fantasia-ui 0.2.3 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,78 +1,66 @@
1
- var ve = Object.defineProperty, he = Object.defineProperties;
2
- var ge = Object.getOwnPropertyDescriptors;
3
- var oe = Object.getOwnPropertySymbols;
4
- var ye = Object.prototype.hasOwnProperty, be = Object.prototype.propertyIsEnumerable;
5
- var se = (r, e, t) => e in r ? ve(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, ae = (r, e) => {
6
- for (var t in e || (e = {}))
7
- ye.call(e, t) && se(r, t, e[t]);
8
- if (oe)
9
- for (var t of oe(e))
10
- be.call(e, t) && se(r, t, e[t]);
11
- return r;
12
- }, ne = (r, e) => he(r, ge(e));
13
- var le = (r, e, t) => new Promise((s, o) => {
14
- var c = (a) => {
1
+ var ge = Object.defineProperty, be = Object.defineProperties;
2
+ var ye = Object.getOwnPropertyDescriptors;
3
+ var le = Object.getOwnPropertySymbols;
4
+ var $e = Object.prototype.hasOwnProperty, ke = Object.prototype.propertyIsEnumerable;
5
+ var re = (n, e, o) => e in n ? ge(n, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : n[e] = o, ie = (n, e) => {
6
+ for (var o in e || (e = {}))
7
+ $e.call(e, o) && re(n, o, e[o]);
8
+ if (le)
9
+ for (var o of le(e))
10
+ ke.call(e, o) && re(n, o, e[o]);
11
+ return n;
12
+ }, ce = (n, e) => be(n, ye(e));
13
+ var J = (n, e, o) => new Promise((t, s) => {
14
+ var i = (a) => {
15
15
  try {
16
- l(t.next(a));
17
- } catch (_) {
18
- o(_);
16
+ r(o.next(a));
17
+ } catch (f) {
18
+ s(f);
19
19
  }
20
- }, d = (a) => {
20
+ }, u = (a) => {
21
21
  try {
22
- l(t.throw(a));
23
- } catch (_) {
24
- o(_);
22
+ r(o.throw(a));
23
+ } catch (f) {
24
+ s(f);
25
25
  }
26
- }, l = (a) => a.done ? s(a.value) : Promise.resolve(a.value).then(c, d);
27
- l((t = t.apply(r, e)).next());
26
+ }, r = (a) => a.done ? t(a.value) : Promise.resolve(a.value).then(i, u);
27
+ r((o = o.apply(n, e)).next());
28
28
  });
29
- import { defineComponent as y, computed as v, createElementBlock as i, openBlock as n, normalizeStyle as I, unref as u, renderSlot as h, ref as R, watch as ie, resolveComponent as O, createVNode as T, withDirectives as Z, Transition as K, withCtx as B, createCommentVNode as k, createElementVNode as z, vShow as ce, mergeModels as G, useModel as Q, normalizeClass as C, readonly as re, vModelDynamic as $e, Fragment as D, renderList as U, toDisplayString as A, createBlock as L, nextTick as de, onUnmounted as ue, Teleport as fe, withModifiers as pe, resolveDynamicComponent as q, createTextVNode as we, TransitionGroup as ke, useSlots as Fe, defineAsyncComponent as Ce } from "vue";
30
- import { Search as ze, StarOutline as xe, StarHalf as Te, Star as Se, ChevronDownOutline as Me, ChevronBackOutline as Be, EllipsisHorizontal as Ie, ChevronForwardOutline as Ve, CloseCircle as Re, Close as Ae, Person as De } from "@vicons/ionicons5";
31
- import { useEventListener as Le } from "@vueuse/core";
32
- const Pe = (r, e, t) => {
33
- const s = r[e];
34
- return s ? typeof s == "function" ? s() : Promise.resolve(s) : new Promise((o, c) => {
35
- (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(
36
- c.bind(
37
- null,
38
- new Error(
39
- "Unknown variable dynamic import: " + e + (e.split("/").length !== t ? ". Note that variables only represent file names one level deep." : "")
40
- )
41
- )
42
- );
43
- });
44
- }, We = /* @__PURE__ */ y({
29
+ import { defineComponent as g, computed as h, createElementBlock as c, openBlock as l, normalizeStyle as T, unref as p, renderSlot as v, ref as R, watch as ee, resolveComponent as O, createVNode as S, withDirectives as te, Transition as K, withCtx as I, createCommentVNode as y, createElementVNode as z, vShow as ue, mergeModels as H, useModel as Q, normalizeClass as C, readonly as de, vModelDynamic as we, Fragment as P, renderList as G, toDisplayString as V, createBlock as W, nextTick as pe, onUnmounted as oe, Teleport as fe, withModifiers as se, resolveDynamicComponent as Y, createTextVNode as me, TransitionGroup as Fe, useSlots as ze, provide as _e, inject as Ce, onMounted as xe } from "vue";
30
+ import { Search as Se, StarOutline as Me, StarHalf as Ie, Star as Te, ChevronDownOutline as Be, ChevronBackOutline as Ve, EllipsisHorizontal as Re, ChevronForwardOutline as Ae, CloseCircle as Pe, Close as We, Person as je } from "@vicons/ionicons5";
31
+ import { useEventListener as De } from "@vueuse/core";
32
+ const Ee = /* @__PURE__ */ g({
45
33
  __name: "FIcon",
46
34
  props: {
47
35
  color: {},
48
36
  size: { default: "1em" }
49
37
  },
50
- setup(r) {
51
- const e = r, t = v(() => ({
38
+ setup(n) {
39
+ const e = n, o = h(() => ({
52
40
  width: typeof e.size == "number" ? `${e.size}px` : e.size,
53
41
  height: typeof e.size == "number" ? `${e.size}px` : e.size,
54
42
  color: e.color
55
43
  }));
56
- return (s, o) => (n(), i("span", {
44
+ return (t, s) => (l(), c("span", {
57
45
  role: "img",
58
46
  class: "f-icon",
59
- style: I(u(t))
47
+ style: T(p(o))
60
48
  }, [
61
- h(s.$slots, "default", {}, void 0, !0)
49
+ v(t.$slots, "default", {}, void 0, !0)
62
50
  ], 4));
63
51
  }
64
- }), b = (r, e) => {
65
- const t = r.__vccOpts || r;
66
- for (const [s, o] of e)
67
- t[s] = o;
68
- return t;
69
- }, ro = /* @__PURE__ */ b(We, [["__scopeId", "data-v-524b7dbb"]]), He = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1780285609860'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='12961'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cpath%20d='M894.4%20281.504a39.36%2039.36%200%200%200-27.104-11.808l-293.888-10.976-22.016%2046.88%2030.592%2087.2-55.2%2099.008%2022.4%2079.904%2056%2068.48%2081.024-70.496c7.808-6.88%2020.288-6.496%2027.104%201.216l103.904%20106.4c7.296%207.296%206.88%2019.2-0.928%2026.112a18.944%2018.944%200%200%201-13.76%204.896l-284.8-10.624-14.24%2038.72%2015.52%2034.592%20327.488%2011.808c21.504%200.8%2039.616-15.104%2040.096-35.52l18.208-439.296a34.368%2034.368%200%200%200-10.4-26.496zM684.096%20483.2c-32.32-1.184-57.28-26.88-56-57.088%201.28-30.592%2028.416-54.208%2060.288-52.992%2031.904%201.184%2057.312%2026.88%2056%2057.088-1.184%2030.208-28.384%2054.304-60.288%2052.992z%20m-211.104%20253.6l9.92-40.8-231.424%2015.104c-10.784%200.8-19.776-6.496-20.672-16.704a17.856%2017.856%200%200%201%204.672-13.504l171.52-186.272a18.048%2018.048%200%200%201%2014.208-6.112c5.184%200%2010.272%201.984%2014.176%205.696l57.28%2056.704-24.576-60.32%2044-104.288L472%20302.72l16.384-48.096-315.392%2020.8c-21.504%201.184-37.504%2018.784-36.192%2039.072l31.904%20439.424c0.384%209.792%205.184%2018.688%2013.408%2024.896%207.776%206.496%2017.696%209.792%2028%208.992l281.792-18.304-18.88-32.704z'%20p-id='12962'%3e%3c/path%3e%3c/svg%3e", Ee = { class: "f-image" }, Oe = {
52
+ }), b = (n, e) => {
53
+ const o = n.__vccOpts || n;
54
+ for (const [t, s] of e)
55
+ o[t] = s;
56
+ return o;
57
+ }, Le = /* @__PURE__ */ b(Ee, [["__scopeId", "data-v-524b7dbb"]]), Oe = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1780285609860'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='12961'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cpath%20d='M894.4%20281.504a39.36%2039.36%200%200%200-27.104-11.808l-293.888-10.976-22.016%2046.88%2030.592%2087.2-55.2%2099.008%2022.4%2079.904%2056%2068.48%2081.024-70.496c7.808-6.88%2020.288-6.496%2027.104%201.216l103.904%20106.4c7.296%207.296%206.88%2019.2-0.928%2026.112a18.944%2018.944%200%200%201-13.76%204.896l-284.8-10.624-14.24%2038.72%2015.52%2034.592%20327.488%2011.808c21.504%200.8%2039.616-15.104%2040.096-35.52l18.208-439.296a34.368%2034.368%200%200%200-10.4-26.496zM684.096%20483.2c-32.32-1.184-57.28-26.88-56-57.088%201.28-30.592%2028.416-54.208%2060.288-52.992%2031.904%201.184%2057.312%2026.88%2056%2057.088-1.184%2030.208-28.384%2054.304-60.288%2052.992z%20m-211.104%20253.6l9.92-40.8-231.424%2015.104c-10.784%200.8-19.776-6.496-20.672-16.704a17.856%2017.856%200%200%201%204.672-13.504l171.52-186.272a18.048%2018.048%200%200%201%2014.208-6.112c5.184%200%2010.272%201.984%2014.176%205.696l57.28%2056.704-24.576-60.32%2044-104.288L472%20302.72l16.384-48.096-315.392%2020.8c-21.504%201.184-37.504%2018.784-36.192%2039.072l31.904%20439.424c0.384%209.792%205.184%2018.688%2013.408%2024.896%207.776%206.496%2017.696%209.792%2028%208.992l281.792-18.304-18.88-32.704z'%20p-id='12962'%3e%3c/path%3e%3c/svg%3e", He = { class: "f-image" }, Ne = {
70
58
  key: 0,
71
59
  class: "f-image__placeholder"
72
- }, je = {
60
+ }, qe = {
73
61
  key: 0,
74
62
  class: "f-image__error"
75
- }, Ne = ["src", "loading"], Ge = /* @__PURE__ */ y({
63
+ }, Ge = ["src", "loading"], Ue = /* @__PURE__ */ g({
76
64
  __name: "FImage",
77
65
  props: {
78
66
  src: {},
@@ -80,54 +68,54 @@ const Pe = (r, e, t) => {
80
68
  fit: { default: "cover" },
81
69
  lazy: { type: Boolean, default: !0 }
82
70
  },
83
- setup(r) {
84
- const e = r, t = R("loading");
85
- ie(() => e.src, () => {
86
- t.value = "loading";
71
+ setup(n) {
72
+ const e = n, o = R("loading");
73
+ ee(() => e.src, () => {
74
+ o.value = "loading";
87
75
  }, { immediate: !1 });
88
- const s = () => t.value = "loaded", o = () => t.value = "error";
89
- return (c, d) => {
90
- const l = O("f-loading"), a = O("f-icon");
91
- return n(), i("div", Ee, [
92
- T(K, { name: "fade" }, {
93
- default: B(() => [
94
- u(t) === "loading" ? (n(), i("div", Oe, [
95
- T(l, { type: "classic first" })
96
- ])) : k("", !0)
76
+ const t = () => o.value = "loaded", s = () => o.value = "error";
77
+ return (i, u) => {
78
+ const r = O("f-loading"), a = O("f-icon");
79
+ return l(), c("div", He, [
80
+ S(K, { name: "fade" }, {
81
+ default: I(() => [
82
+ p(o) === "loading" ? (l(), c("div", Ne, [
83
+ S(r, { type: "classic first" })
84
+ ])) : y("", !0)
97
85
  ]),
98
86
  _: 1
99
87
  }),
100
- T(K, { name: "fade" }, {
101
- default: B(() => [
102
- u(t) === "error" ? (n(), i("div", je, [
103
- h(c.$slots, "error", {}, () => [
104
- T(a, { size: "48px" }, {
105
- default: B(() => [
106
- T(u(He))
88
+ S(K, { name: "fade" }, {
89
+ default: I(() => [
90
+ p(o) === "error" ? (l(), c("div", qe, [
91
+ v(i.$slots, "error", {}, () => [
92
+ S(a, { size: "48px" }, {
93
+ default: I(() => [
94
+ S(p(Oe))
107
95
  ]),
108
96
  _: 1
109
97
  })
110
98
  ], !0)
111
- ])) : k("", !0)
99
+ ])) : y("", !0)
112
100
  ]),
113
101
  _: 3
114
102
  }),
115
- Z(z("img", {
103
+ te(z("img", {
116
104
  src: e.src,
117
- loading: c.lazy ? "lazy" : "eager",
118
- style: I({ objectFit: e.fit }),
105
+ loading: i.lazy ? "lazy" : "eager",
106
+ style: T({ objectFit: e.fit }),
119
107
  class: "f-image__img",
120
- onLoad: s,
121
- onError: o
122
- }, null, 44, Ne), [
123
- [ce, u(t) === "loaded"]
108
+ onLoad: t,
109
+ onError: s
110
+ }, null, 44, Ge), [
111
+ [ue, p(o) === "loaded"]
124
112
  ])
125
113
  ]);
126
114
  };
127
115
  }
128
- }), io = /* @__PURE__ */ b(Ge, [["__scopeId", "data-v-2948108d"]]), Ue = ["type", "placeholder", "disabled", "readonly", "name", "id"], Xe = /* @__PURE__ */ y({
116
+ }), Xe = /* @__PURE__ */ b(Ue, [["__scopeId", "data-v-2948108d"]]), Ye = ["type", "placeholder", "disabled", "readonly", "name", "id"], Je = /* @__PURE__ */ g({
129
117
  __name: "FInput",
130
- props: /* @__PURE__ */ G({
118
+ props: /* @__PURE__ */ H({
131
119
  placeholder: { default: "输入..." },
132
120
  type: { default: "text" },
133
121
  disabled: { type: Boolean, default: !1 },
@@ -138,85 +126,85 @@ const Pe = (r, e, t) => {
138
126
  modelValue: { default: "" },
139
127
  modelModifiers: {}
140
128
  }),
141
- emits: /* @__PURE__ */ G(["input", "change", "focus", "blur"], ["update:modelValue"]),
142
- setup(r, { emit: e }) {
143
- const t = Q(r, "modelValue"), s = e, o = (a) => {
144
- const _ = a.target.value;
145
- s("input", _);
146
- }, c = (a) => {
147
- const _ = a.target.value;
148
- s("change", _);
149
- }, d = (a) => {
150
- s("focus", a);
151
- }, l = (a) => {
152
- s("blur", a);
129
+ emits: /* @__PURE__ */ H(["input", "change", "focus", "blur"], ["update:modelValue"]),
130
+ setup(n, { emit: e }) {
131
+ const o = Q(n, "modelValue"), t = e, s = (a) => {
132
+ const f = a.target.value;
133
+ t("input", f);
134
+ }, i = (a) => {
135
+ const f = a.target.value;
136
+ t("change", f);
137
+ }, u = (a) => {
138
+ t("focus", a);
139
+ }, r = (a) => {
140
+ t("blur", a);
153
141
  };
154
- return (a, _) => {
155
- const f = O("f-icon");
156
- return n(), i("div", {
157
- class: C(["f-input", { "is-disabled": a.disabled, "is-readonly": "readonly" in a ? a.readonly : u(re) }])
142
+ return (a, f) => {
143
+ const m = O("f-icon");
144
+ return l(), c("div", {
145
+ class: C(["f-input", { "is-disabled": a.disabled, "is-readonly": "readonly" in a ? a.readonly : p(de) }])
158
146
  }, [
159
- T(f, { class: "f-input__icon" }, {
160
- default: B(() => [
161
- T(u(ze))
147
+ S(m, { class: "f-input__icon" }, {
148
+ default: I(() => [
149
+ S(p(Se))
162
150
  ]),
163
151
  _: 1
164
152
  }),
165
- Z(z("input", {
153
+ te(z("input", {
166
154
  class: "f-input__text",
167
- "onUpdate:modelValue": _[0] || (_[0] = (p) => t.value = p),
155
+ "onUpdate:modelValue": f[0] || (f[0] = (d) => o.value = d),
168
156
  type: a.type,
169
157
  placeholder: a.placeholder,
170
158
  disabled: a.disabled,
171
- readonly: "readonly" in a ? a.readonly : u(re),
159
+ readonly: "readonly" in a ? a.readonly : p(de),
172
160
  name: a.name,
173
161
  id: a.id,
174
- onInput: o,
175
- onChange: c,
176
- onFocus: d,
177
- onBlur: l
178
- }, null, 40, Ue), [
179
- [$e, t.value]
162
+ onInput: s,
163
+ onChange: i,
164
+ onFocus: u,
165
+ onBlur: r
166
+ }, null, 40, Ye), [
167
+ [we, o.value]
180
168
  ])
181
169
  ], 2);
182
170
  };
183
171
  }
184
- }), co = /* @__PURE__ */ b(Xe, [["__scopeId", "data-v-6c6d7c63"]]), Ye = {
172
+ }), Ke = /* @__PURE__ */ b(Je, [["__scopeId", "data-v-6c6d7c63"]]), Qe = {
185
173
  key: 0,
186
174
  class: "loop cubes"
187
- }, qe = {
175
+ }, Ze = {
188
176
  key: 2,
189
177
  class: "msg"
190
- }, Je = /* @__PURE__ */ y({
178
+ }, et = /* @__PURE__ */ g({
191
179
  __name: "FLoading",
192
180
  props: {
193
181
  type: { default: "dots" },
194
182
  text: {},
195
183
  mask: { type: Boolean, default: !1 }
196
184
  },
197
- setup(r) {
198
- const e = r;
199
- return (t, s) => (n(), i("div", {
200
- class: C(["flex-center-col size-full loading-container", { "global-mask": t.mask }])
185
+ setup(n) {
186
+ const e = n;
187
+ return (o, t) => (l(), c("div", {
188
+ class: C(["flex-center-col size-full loading-container", { "global-mask": o.mask }])
201
189
  }, [
202
- t.type === "cubes" ? (n(), i("div", Ye, [
203
- (n(), i(D, null, U(6, (o) => z("div", {
190
+ o.type === "cubes" ? (l(), c("div", Qe, [
191
+ (l(), c(P, null, G(6, (s) => z("div", {
204
192
  class: "item cubes",
205
- key: o
193
+ key: s
206
194
  })), 64))
207
- ])) : (n(), i("div", {
195
+ ])) : (l(), c("div", {
208
196
  key: 1,
209
- class: C(["loader", t.type])
197
+ class: C(["loader", o.type])
210
198
  }, null, 2)),
211
- e.text ? (n(), i("p", qe, A(e.text), 1)) : k("", !0)
199
+ e.text ? (l(), c("p", Ze, V(e.text), 1)) : y("", !0)
212
200
  ], 2));
213
201
  }
214
- }), uo = /* @__PURE__ */ b(Je, [["__scopeId", "data-v-26005e98"]]), Ke = ["onMousemove"], Qe = {
202
+ }), tt = /* @__PURE__ */ b(et, [["__scopeId", "data-v-20f58a50"]]), ot = ["onMousemove"], st = {
215
203
  key: 0,
216
204
  class: "f-rate__score"
217
- }, Ze = /* @__PURE__ */ y({
205
+ }, at = /* @__PURE__ */ g({
218
206
  __name: "FRate",
219
- props: /* @__PURE__ */ G({
207
+ props: /* @__PURE__ */ H({
220
208
  modelValue: {},
221
209
  count: { default: 5 },
222
210
  readonly: { type: Boolean, default: !1 },
@@ -230,63 +218,63 @@ const Pe = (r, e, t) => {
230
218
  modelValue: { default: 0 },
231
219
  modelModifiers: {}
232
220
  }),
233
- emits: /* @__PURE__ */ G(["change"], ["update:modelValue"]),
234
- setup(r, { emit: e }) {
235
- const t = Q(r, "modelValue"), s = r, o = e, c = R(null), d = v(() => {
236
- var $;
237
- return ($ = c.value) != null ? $ : t.value;
238
- }), l = v(
239
- () => s.scoreTemplate.replace("{value}", String(t.value))
240
- ), a = v(
241
- () => s.size === "normal" ? 16 : s.size === "small" ? 12 : 20
242
- ), _ = ($) => {
243
- const M = d.value;
244
- return M >= $ ? "full" : s.allowHalf && M >= $ - 0.5 ? "half" : "empty";
245
- }, f = ($) => _($) === "full" ? s.voidColor : s.color, p = ($, M) => {
246
- if (!s.readonly)
247
- if (s.allowHalf) {
248
- const V = $.currentTarget, { left: x, width: H } = V.getBoundingClientRect();
249
- c.value = ($.clientX - x) / H < 0.5 ? M - 0.5 : M;
221
+ emits: /* @__PURE__ */ H(["change"], ["update:modelValue"]),
222
+ setup(n, { emit: e }) {
223
+ const o = Q(n, "modelValue"), t = n, s = e, i = R(null), u = h(() => {
224
+ var w;
225
+ return (w = i.value) != null ? w : o.value;
226
+ }), r = h(
227
+ () => t.scoreTemplate.replace("{value}", String(o.value))
228
+ ), a = h(
229
+ () => t.size === "normal" ? 16 : t.size === "small" ? 12 : 20
230
+ ), f = (w) => {
231
+ const B = u.value;
232
+ return B >= w ? "full" : t.allowHalf && B >= w - 0.5 ? "half" : "empty";
233
+ }, m = (w) => f(w) === "full" ? t.voidColor : t.color, d = (w, B) => {
234
+ if (!t.readonly)
235
+ if (t.allowHalf) {
236
+ const A = w.currentTarget, { left: M, width: E } = A.getBoundingClientRect();
237
+ i.value = (w.clientX - M) / E < 0.5 ? B - 0.5 : B;
250
238
  } else
251
- c.value = M;
252
- }, F = () => {
253
- s.readonly || (c.value = null);
254
- }, S = () => {
255
- var M;
256
- if (s.readonly) return;
257
- const $ = (M = c.value) != null ? M : t.value;
258
- t.value = $, o("change", $);
239
+ i.value = B;
240
+ }, k = () => {
241
+ t.readonly || (i.value = null);
242
+ }, x = () => {
243
+ var B;
244
+ if (t.readonly) return;
245
+ const w = (B = i.value) != null ? B : o.value;
246
+ o.value = w, s("change", w);
259
247
  };
260
- return ($, M) => {
261
- const V = O("f-icon");
262
- return n(), i("div", {
263
- class: C(["f-rate", { "f-rate--readonly": s.readonly }]),
264
- onMouseleave: F
248
+ return (w, B) => {
249
+ const A = O("f-icon");
250
+ return l(), c("div", {
251
+ class: C(["f-rate", { "f-rate--readonly": t.readonly }]),
252
+ onMouseleave: k
265
253
  }, [
266
- (n(!0), i(D, null, U(s.count, (x) => (n(), i("span", {
267
- key: x,
254
+ (l(!0), c(P, null, G(t.count, (M) => (l(), c("span", {
255
+ key: M,
268
256
  class: "f-rate__item",
269
- onMousemove: (H) => p(H, x),
270
- onClick: S
257
+ onMousemove: (E) => d(E, M),
258
+ onClick: x
271
259
  }, [
272
- T(V, {
273
- color: f(x),
274
- size: u(a)
260
+ S(A, {
261
+ color: m(M),
262
+ size: p(a)
275
263
  }, {
276
- default: B(() => [
277
- _(x) === "full" ? (n(), L(u(xe), { key: 0 })) : _(x) === "half" ? (n(), L(u(Te), { key: 1 })) : (n(), L(u(Se), { key: 2 }))
264
+ default: I(() => [
265
+ f(M) === "full" ? (l(), W(p(Me), { key: 0 })) : f(M) === "half" ? (l(), W(p(Ie), { key: 1 })) : (l(), W(p(Te), { key: 2 }))
278
266
  ]),
279
267
  _: 2
280
268
  }, 1032, ["color", "size"])
281
- ], 40, Ke))), 128)),
282
- s.showText ? (n(), i("span", Qe, A(u(l)), 1)) : k("", !0)
269
+ ], 40, ot))), 128)),
270
+ t.showText ? (l(), c("span", st, V(p(r)), 1)) : y("", !0)
283
271
  ], 34);
284
272
  };
285
273
  }
286
- }), fo = /* @__PURE__ */ b(Ze, [["__scopeId", "data-v-d68cd0e3"]]), et = { class: "f-dropdown-wrapper" }, tt = { class: "f-dropdown-content" }, ot = ["onClick"], st = {
274
+ }), nt = /* @__PURE__ */ b(at, [["__scopeId", "data-v-d68cd0e3"]]), lt = { class: "f-dropdown-wrapper" }, rt = { class: "f-dropdown-content" }, it = ["onClick"], ct = {
287
275
  key: 0,
288
276
  class: "opt-icon"
289
- }, at = { class: "opt-label" }, nt = /* @__PURE__ */ y({
277
+ }, dt = { class: "opt-label" }, ut = /* @__PURE__ */ g({
290
278
  __name: "FDropdown",
291
279
  props: {
292
280
  placement: { default: "right-start" },
@@ -296,136 +284,136 @@ const Pe = (r, e, t) => {
296
284
  options: { default: () => [] }
297
285
  },
298
286
  emits: ["select"],
299
- setup(r, { emit: e }) {
300
- const t = r, s = e, o = R(!1), c = R(null), d = R(null), l = R(null), a = R(0), _ = R(0), f = v(() => {
301
- const [m] = t.placement.split("-"), g = (Array.isArray(t.offset) ? t.offset[0] : t.offset) + 4, w = { position: "absolute" };
302
- return m === "right" ? (w.width = `${g}px`, w.left = `-${g}px`, w.top = 0, w.bottom = 0) : m === "left" ? (w.width = `${g}px`, w.right = `-${g}px`, w.top = 0, w.bottom = 0) : m === "bottom" ? (w.height = `${g}px`, w.top = `-${g}px`, w.left = 0, w.right = 0) : m === "top" && (w.height = `${g}px`, w.bottom = `-${g}px`, w.left = 0, w.right = 0), w;
303
- }), p = v(() => {
304
- if (!c.value) return {};
305
- const m = c.value, { placement: j } = t, g = Array.isArray(t.offset) ? t.offset[0] : t.offset, [w, N] = j.split("-"), ee = window.innerWidth, te = window.innerHeight, X = _.value || 160, Y = a.value || 200;
306
- let P = 0, W = 0, E = w;
307
- w === "right" ? (W = m.right + g, W + X > ee && (W = m.left - X - g, E = "left")) : w === "left" ? (W = m.left - X - g, W < 0 && (W = m.right + g, E = "right")) : w === "bottom" ? (P = m.bottom + g, P + Y > te && (P = m.top - Y - g, E = "top")) : w === "top" && (P = m.top - Y - g, P < 0 && (P = m.bottom + g, E = "bottom")), E === "top" || E === "bottom" ? (N === "start" ? W = m.left : N === "end" ? W = m.right - X : W = m.left + (m.width - X) / 2, W = Math.max(8, Math.min(W, ee - X - 8))) : (N === "start" ? P = m.top : N === "end" ? P = m.bottom - Y : P = m.top + (m.height - Y) / 2, P = Math.max(8, Math.min(P, te - Y - 8)));
308
- const me = E === "right" ? "left" : E === "left" ? "right" : N === "start" ? "left" : N === "end" ? "right" : "center", _e = E === "bottom" ? "top" : E === "top" ? "bottom" : N === "start" ? "top" : N === "end" ? "bottom" : "center";
287
+ setup(n, { emit: e }) {
288
+ const o = n, t = e, s = R(!1), i = R(null), u = R(null), r = R(null), a = R(0), f = R(0), m = h(() => {
289
+ const [_] = o.placement.split("-"), $ = (Array.isArray(o.offset) ? o.offset[0] : o.offset) + 4, F = { position: "absolute" };
290
+ return _ === "right" ? (F.width = `${$}px`, F.left = `-${$}px`, F.top = 0, F.bottom = 0) : _ === "left" ? (F.width = `${$}px`, F.right = `-${$}px`, F.top = 0, F.bottom = 0) : _ === "bottom" ? (F.height = `${$}px`, F.top = `-${$}px`, F.left = 0, F.right = 0) : _ === "top" && (F.height = `${$}px`, F.bottom = `-${$}px`, F.left = 0, F.right = 0), F;
291
+ }), d = h(() => {
292
+ if (!i.value) return {};
293
+ const _ = i.value, { placement: N } = o, $ = Array.isArray(o.offset) ? o.offset[0] : o.offset, [F, q] = N.split("-"), ae = window.innerWidth, ne = window.innerHeight, U = f.value || 160, X = a.value || 200;
294
+ let j = 0, D = 0, L = F;
295
+ F === "right" ? (D = _.right + $, D + U > ae && (D = _.left - U - $, L = "left")) : F === "left" ? (D = _.left - U - $, D < 0 && (D = _.right + $, L = "right")) : F === "bottom" ? (j = _.bottom + $, j + X > ne && (j = _.top - X - $, L = "top")) : F === "top" && (j = _.top - X - $, j < 0 && (j = _.bottom + $, L = "bottom")), L === "top" || L === "bottom" ? (q === "start" ? D = _.left : q === "end" ? D = _.right - U : D = _.left + (_.width - U) / 2, D = Math.max(8, Math.min(D, ae - U - 8))) : (q === "start" ? j = _.top : q === "end" ? j = _.bottom - X : j = _.top + (_.height - X) / 2, j = Math.max(8, Math.min(j, ne - X - 8)));
296
+ const he = L === "right" ? "left" : L === "left" ? "right" : q === "start" ? "left" : q === "end" ? "right" : "center", ve = L === "bottom" ? "top" : L === "top" ? "bottom" : q === "start" ? "top" : q === "end" ? "bottom" : "center";
309
297
  return {
310
- top: `${P}px`,
311
- left: `${W}px`,
312
- transformOrigin: `${_e} ${me}`
298
+ top: `${j}px`,
299
+ left: `${D}px`,
300
+ transformOrigin: `${ve} ${he}`
313
301
  };
314
302
  });
315
- let F = null, S = null;
316
- const $ = () => {
317
- F && (clearTimeout(F), F = null);
318
- }, M = (m) => {
319
- t.trigger === "click" && (m.stopPropagation(), o.value ? o.value = !1 : (c.value = d.value.getBoundingClientRect(), o.value = !0));
320
- }, V = () => {
321
- t.trigger === "hover" && ($(), S = setTimeout(() => {
322
- d.value && (c.value = d.value.getBoundingClientRect()), o.value = !0;
303
+ let k = null, x = null;
304
+ const w = () => {
305
+ k && (clearTimeout(k), k = null);
306
+ }, B = (_) => {
307
+ o.trigger === "click" && (_.stopPropagation(), s.value ? s.value = !1 : (i.value = u.value.getBoundingClientRect(), s.value = !0));
308
+ }, A = () => {
309
+ o.trigger === "hover" && (w(), x = setTimeout(() => {
310
+ u.value && (i.value = u.value.getBoundingClientRect()), s.value = !0;
323
311
  }, 400));
324
- }, x = () => {
325
- t.trigger === "hover" && (S && (clearTimeout(S), S = null), F = setTimeout(() => {
326
- o.value = !1;
312
+ }, M = () => {
313
+ o.trigger === "hover" && (x && (clearTimeout(x), x = null), k = setTimeout(() => {
314
+ s.value = !1;
327
315
  }, 400));
328
- }, H = (m) => {
329
- t.trigger !== "click" || !o.value || (o.value = !1);
330
- }, J = (m) => {
331
- m.disabled || (s("select", m.key, m), m.children || (o.value = !1));
316
+ }, E = (_) => {
317
+ o.trigger !== "click" || !s.value || (s.value = !1);
318
+ }, Z = (_) => {
319
+ _.disabled || (t("select", _.key, _), _.children || (s.value = !1));
332
320
  };
333
- return ie(o, (m) => le(null, null, function* () {
334
- var j, g;
335
- m ? (c.value = d.value.getBoundingClientRect(), yield de(), a.value = ((j = l.value) == null ? void 0 : j.offsetHeight) || 200, _.value = ((g = l.value) == null ? void 0 : g.offsetWidth) || 160) : (a.value = 0, _.value = 0);
336
- })), ue(() => {
337
- $(), S && clearTimeout(S);
338
- }), Le(window, "click", H), (m, j) => (n(), i("div", et, [
321
+ return ee(s, (_) => J(null, null, function* () {
322
+ var N, $;
323
+ _ ? (i.value = u.value.getBoundingClientRect(), yield pe(), a.value = ((N = r.value) == null ? void 0 : N.offsetHeight) || 200, f.value = (($ = r.value) == null ? void 0 : $.offsetWidth) || 160) : (a.value = 0, f.value = 0);
324
+ })), oe(() => {
325
+ w(), x && clearTimeout(x);
326
+ }), De(window, "click", E), (_, N) => (l(), c("div", lt, [
339
327
  z("div", {
340
328
  ref_key: "triggerRef",
341
- ref: d,
329
+ ref: u,
342
330
  class: "f-dropdown-trigger-wrapper",
343
- onMouseenter: V,
344
- onMouseleave: x,
345
- onClick: M
331
+ onMouseenter: A,
332
+ onMouseleave: M,
333
+ onClick: B
346
334
  }, [
347
- h(m.$slots, "default", {}, void 0, !0)
335
+ v(_.$slots, "default", {}, void 0, !0)
348
336
  ], 544),
349
- (n(), L(fe, { to: "body" }, [
350
- T(K, { name: "f-dropdown-motion" }, {
351
- default: B(() => [
352
- u(o) ? (n(), i("div", {
337
+ (l(), W(fe, { to: "body" }, [
338
+ S(K, { name: "f-dropdown-motion" }, {
339
+ default: I(() => [
340
+ p(s) ? (l(), c("div", {
353
341
  key: 0,
354
342
  ref_key: "dropdownRef",
355
- ref: l,
343
+ ref: r,
356
344
  class: "f-dropdown-item",
357
- style: I([u(p), { zIndex: m.zIndex }]),
358
- onMouseenter: $,
359
- onMouseleave: x,
360
- onClick: j[0] || (j[0] = pe(() => {
345
+ style: T([p(d), { zIndex: _.zIndex }]),
346
+ onMouseenter: w,
347
+ onMouseleave: M,
348
+ onClick: N[0] || (N[0] = se(() => {
361
349
  }, ["stop"]))
362
350
  }, [
363
- m.trigger === "hover" ? (n(), i("div", {
351
+ _.trigger === "hover" ? (l(), c("div", {
364
352
  key: 0,
365
353
  class: "f-dropdown-bridge",
366
- style: I(u(f))
367
- }, null, 4)) : k("", !0),
368
- z("div", tt, [
369
- m.options && m.options.length > 0 ? (n(!0), i(D, { key: 0 }, U(m.options, (g) => (n(), i("div", {
370
- key: g.key,
371
- class: C(["f-dropdown-option", { "is-disabled": g.disabled }]),
372
- onClick: (w) => J(g)
354
+ style: T(p(m))
355
+ }, null, 4)) : y("", !0),
356
+ z("div", rt, [
357
+ _.options && _.options.length > 0 ? (l(!0), c(P, { key: 0 }, G(_.options, ($) => (l(), c("div", {
358
+ key: $.key,
359
+ class: C(["f-dropdown-option", { "is-disabled": $.disabled }]),
360
+ onClick: (F) => Z($)
373
361
  }, [
374
- g.icon ? (n(), i("span", st, [
375
- (n(), L(q(g.icon)))
376
- ])) : k("", !0),
377
- z("span", at, A(g.label), 1)
378
- ], 10, ot))), 128)) : h(m.$slots, "content", { key: 1 }, void 0, !0)
362
+ $.icon ? (l(), c("span", ct, [
363
+ (l(), W(Y($.icon)))
364
+ ])) : y("", !0),
365
+ z("span", dt, V($.label), 1)
366
+ ], 10, it))), 128)) : v(_.$slots, "content", { key: 1 }, void 0, !0)
379
367
  ])
380
- ], 36)) : k("", !0)
368
+ ], 36)) : y("", !0)
381
369
  ]),
382
370
  _: 3
383
371
  })
384
372
  ]))
385
373
  ]));
386
374
  }
387
- }), po = /* @__PURE__ */ b(nt, [["__scopeId", "data-v-addb3a3b"]]), lt = /* @__PURE__ */ y({
375
+ }), pt = /* @__PURE__ */ b(ut, [["__scopeId", "data-v-addb3a3b"]]), ft = /* @__PURE__ */ g({
388
376
  __name: "FSelect",
389
- props: /* @__PURE__ */ G({
377
+ props: /* @__PURE__ */ H({
390
378
  options: {},
391
379
  placeholder: {}
392
380
  }, {
393
381
  modelValue: {},
394
382
  modelModifiers: {}
395
383
  }),
396
- emits: /* @__PURE__ */ G(["select"], ["update:modelValue"]),
397
- setup(r, { emit: e }) {
398
- const t = r, s = e, o = Q(r, "modelValue"), c = R(!1), d = v(
384
+ emits: /* @__PURE__ */ H(["select"], ["update:modelValue"]),
385
+ setup(n, { emit: e }) {
386
+ const o = n, t = e, s = Q(n, "modelValue"), i = R(!1), u = h(
399
387
  () => {
400
- var f, p, F;
401
- return (F = (f = t.options.find((S) => S.key === o.value)) == null ? void 0 : f.label) != null ? F : (p = t.placeholder) != null ? p : "请选择";
388
+ var m, d, k;
389
+ return (k = (m = o.options.find((x) => x.key === s.value)) == null ? void 0 : m.label) != null ? k : (d = o.placeholder) != null ? d : "请选择";
402
390
  }
403
- ), l = v(() => o.value !== void 0 && o.value !== ""), a = (f, p) => {
404
- o.value = f, s("select", f, p), c.value = !1;
405
- }, _ = (f) => {
406
- c.value = f;
391
+ ), r = h(() => s.value !== void 0 && s.value !== ""), a = (m, d) => {
392
+ s.value = m, t("select", m, d), i.value = !1;
393
+ }, f = (m) => {
394
+ i.value = m;
407
395
  };
408
- return (f, p) => {
409
- const F = O("f-icon"), S = O("f-dropdown");
410
- return n(), L(S, {
411
- options: f.options,
396
+ return (m, d) => {
397
+ const k = O("f-icon"), x = O("f-dropdown");
398
+ return l(), W(x, {
399
+ options: m.options,
412
400
  trigger: "click",
413
401
  onSelect: a,
414
- onShow: p[0] || (p[0] = ($) => _(!0)),
415
- onHide: p[1] || (p[1] = ($) => _(!1)),
402
+ onShow: d[0] || (d[0] = (w) => f(!0)),
403
+ onHide: d[1] || (d[1] = (w) => f(!1)),
416
404
  placement: "bottom",
417
405
  offset: 4
418
406
  }, {
419
- default: B(() => [
407
+ default: I(() => [
420
408
  z("div", {
421
- class: C(["f-select", { "is-active": u(l), "is-open": u(c) }])
409
+ class: C(["f-select", { "is-active": p(r), "is-open": p(i) }])
422
410
  }, [
423
411
  z("span", {
424
- class: C(["f-select__label", { "is-placeholder": !u(l) }])
425
- }, A(u(d)), 3),
426
- T(F, { class: "f-select__arrow" }, {
427
- default: B(() => [
428
- T(u(Me))
412
+ class: C(["f-select__label", { "is-placeholder": !p(r) }])
413
+ }, V(p(u)), 3),
414
+ S(k, { class: "f-select__arrow" }, {
415
+ default: I(() => [
416
+ S(p(Be))
429
417
  ]),
430
418
  _: 1
431
419
  })
@@ -435,12 +423,12 @@ const Pe = (r, e, t) => {
435
423
  }, 8, ["options"]);
436
424
  };
437
425
  }
438
- }), mo = /* @__PURE__ */ b(lt, [["__scopeId", "data-v-25e7d03d"]]), rt = { class: "f-pagination" }, it = { class: "f-pagination__list" }, ct = {
426
+ }), mt = /* @__PURE__ */ b(ft, [["__scopeId", "data-v-25e7d03d"]]), _t = { class: "f-pagination" }, ht = { class: "f-pagination__list" }, vt = {
439
427
  key: 0,
440
428
  class: "page-btn ellipsis"
441
- }, dt = ["onClick"], ut = /* @__PURE__ */ y({
429
+ }, gt = ["onClick"], bt = /* @__PURE__ */ g({
442
430
  __name: "FPagination",
443
- props: /* @__PURE__ */ G({
431
+ props: /* @__PURE__ */ H({
444
432
  total: {},
445
433
  pageSize: { default: 10 },
446
434
  hideOnSingle: { type: Boolean }
@@ -448,51 +436,51 @@ const Pe = (r, e, t) => {
448
436
  modelValue: { default: 1 },
449
437
  modelModifiers: {}
450
438
  }),
451
- emits: /* @__PURE__ */ G(["update:currentPage"], ["update:modelValue"]),
452
- setup(r, { emit: e }) {
453
- const t = r, s = Q(r, "modelValue"), o = v(() => Math.ceil(t.total / t.pageSize) || 1), c = v(() => {
454
- const l = o.value, a = s.value;
455
- return !l || l <= 0 ? [] : l <= 7 ? Array.from({ length: l }, (_, f) => f + 1) : a <= 4 ? [1, 2, 3, 4, 5, "...", l] : a >= l - 3 ? [1, "...", l - 4, l - 3, l - 2, l - 1, l] : [1, "...", a - 1, a, a + 1, "...", l];
456
- }), d = (l) => {
457
- typeof l == "number" && (l < 1 || l > o.value || l === s.value || (s.value = l));
439
+ emits: /* @__PURE__ */ H(["update:currentPage"], ["update:modelValue"]),
440
+ setup(n, { emit: e }) {
441
+ const o = n, t = Q(n, "modelValue"), s = h(() => Math.ceil(o.total / o.pageSize) || 1), i = h(() => {
442
+ const r = s.value, a = t.value;
443
+ return !r || r <= 0 ? [] : r <= 7 ? Array.from({ length: r }, (f, m) => m + 1) : a <= 4 ? [1, 2, 3, 4, 5, "...", r] : a >= r - 3 ? [1, "...", r - 4, r - 3, r - 2, r - 1, r] : [1, "...", a - 1, a, a + 1, "...", r];
444
+ }), u = (r) => {
445
+ typeof r == "number" && (r < 1 || r > s.value || r === t.value || (t.value = r));
458
446
  };
459
- return (l, a) => {
460
- const _ = O("f-icon");
461
- return n(), i("div", rt, [
447
+ return (r, a) => {
448
+ const f = O("f-icon");
449
+ return l(), c("div", _t, [
462
450
  z("button", {
463
- class: C(["page-btn", { disabled: s.value === 1 }]),
464
- onClick: a[0] || (a[0] = (f) => d(s.value - 1))
451
+ class: C(["page-btn", { disabled: t.value === 1 }]),
452
+ onClick: a[0] || (a[0] = (m) => u(t.value - 1))
465
453
  }, [
466
- T(_, null, {
467
- default: B(() => [
468
- T(u(Be))
454
+ S(f, null, {
455
+ default: I(() => [
456
+ S(p(Ve))
469
457
  ]),
470
458
  _: 1
471
459
  })
472
460
  ], 2),
473
- z("ul", it, [
474
- (n(!0), i(D, null, U(u(c), (f, p) => (n(), i(D, { key: p }, [
475
- f === "..." ? (n(), i("li", ct, [
476
- T(_, null, {
477
- default: B(() => [
478
- T(u(Ie))
461
+ z("ul", ht, [
462
+ (l(!0), c(P, null, G(p(i), (m, d) => (l(), c(P, { key: d }, [
463
+ m === "..." ? (l(), c("li", vt, [
464
+ S(f, null, {
465
+ default: I(() => [
466
+ S(p(Re))
479
467
  ]),
480
468
  _: 1
481
469
  })
482
- ])) : (n(), i("li", {
470
+ ])) : (l(), c("li", {
483
471
  key: 1,
484
- class: C(["page-btn", { active: s.value === f }]),
485
- onClick: (F) => d(f)
486
- }, A(f), 11, dt))
472
+ class: C(["page-btn", { active: t.value === m }]),
473
+ onClick: (k) => u(m)
474
+ }, V(m), 11, gt))
487
475
  ], 64))), 128))
488
476
  ]),
489
477
  z("button", {
490
- class: C(["page-btn", { disabled: s.value === u(o) }]),
491
- onClick: a[1] || (a[1] = (f) => d(s.value + 1))
478
+ class: C(["page-btn", { disabled: t.value === p(s) }]),
479
+ onClick: a[1] || (a[1] = (m) => u(t.value + 1))
492
480
  }, [
493
- T(_, null, {
494
- default: B(() => [
495
- T(u(Ve))
481
+ S(f, null, {
482
+ default: I(() => [
483
+ S(p(Ae))
496
484
  ]),
497
485
  _: 1
498
486
  })
@@ -500,87 +488,87 @@ const Pe = (r, e, t) => {
500
488
  ]);
501
489
  };
502
490
  }
503
- }), _o = /* @__PURE__ */ b(ut, [["__scopeId", "data-v-e58f1ac9"]]), ft = {
491
+ }), yt = /* @__PURE__ */ b(bt, [["__scopeId", "data-v-e58f1ac9"]]), $t = {
504
492
  key: 0,
505
493
  class: "f-card__header"
506
- }, pt = {
494
+ }, kt = {
507
495
  key: 0,
508
496
  class: "f-card__header-extra"
509
- }, mt = {
497
+ }, wt = {
510
498
  key: 1,
511
499
  class: "f-card__cover"
512
- }, _t = {
500
+ }, Ft = {
513
501
  key: 2,
514
502
  class: "f-card__body"
515
- }, vt = {
503
+ }, zt = {
516
504
  key: 3,
517
505
  class: "f-card__footer"
518
- }, ht = {
506
+ }, Ct = {
519
507
  key: 0,
520
508
  class: "f-card__header"
521
- }, gt = {
509
+ }, xt = {
522
510
  key: 0,
523
511
  class: "f-card__header-extra"
524
- }, yt = {
512
+ }, St = {
525
513
  key: 1,
526
514
  class: "f-card__cover"
527
- }, bt = { class: "f-card__content" }, $t = {
515
+ }, Mt = { class: "f-card__content" }, It = {
528
516
  key: 0,
529
517
  class: "f-card__body"
530
- }, wt = {
518
+ }, Tt = {
531
519
  key: 1,
532
520
  class: "f-card__footer"
533
- }, kt = /* @__PURE__ */ y({
521
+ }, Bt = /* @__PURE__ */ g({
534
522
  __name: "FCard",
535
523
  props: {
536
524
  hoverable: { type: Boolean, default: !0 },
537
525
  direction: { default: "vertical" }
538
526
  },
539
- setup(r) {
540
- return (e, t) => (n(), i("div", {
527
+ setup(n) {
528
+ return (e, o) => (l(), c("div", {
541
529
  class: C(["f-card", [`f-card--${e.direction}`, { "is-hoverable": e.hoverable }]])
542
530
  }, [
543
- e.direction === "vertical" ? (n(), i(D, { key: 0 }, [
544
- e.$slots.header || e.$slots["header-extra"] ? (n(), i("div", ft, [
545
- h(e.$slots, "header", {}, void 0, !0),
546
- e.$slots["header-extra"] ? (n(), i("div", pt, [
547
- h(e.$slots, "header-extra", {}, void 0, !0)
548
- ])) : k("", !0)
549
- ])) : k("", !0),
550
- e.$slots.cover ? (n(), i("div", mt, [
551
- h(e.$slots, "cover", {}, void 0, !0)
552
- ])) : k("", !0),
553
- e.$slots.default ? (n(), i("div", _t, [
554
- h(e.$slots, "default", {}, void 0, !0)
555
- ])) : k("", !0),
556
- e.$slots.footer ? (n(), i("div", vt, [
557
- h(e.$slots, "footer", {}, void 0, !0)
558
- ])) : k("", !0)
559
- ], 64)) : (n(), i(D, { key: 1 }, [
560
- e.$slots.header || e.$slots["header-extra"] ? (n(), i("div", ht, [
561
- h(e.$slots, "header", {}, void 0, !0),
562
- e.$slots["header-extra"] ? (n(), i("div", gt, [
563
- h(e.$slots, "header-extra", {}, void 0, !0)
564
- ])) : k("", !0)
565
- ])) : k("", !0),
566
- e.$slots.cover ? (n(), i("div", yt, [
567
- h(e.$slots, "cover", {}, void 0, !0)
568
- ])) : k("", !0),
569
- z("div", bt, [
570
- e.$slots.default ? (n(), i("div", $t, [
571
- h(e.$slots, "default", {}, void 0, !0)
572
- ])) : k("", !0),
573
- e.$slots.footer ? (n(), i("div", wt, [
574
- h(e.$slots, "footer", {}, void 0, !0)
575
- ])) : k("", !0)
531
+ e.direction === "vertical" ? (l(), c(P, { key: 0 }, [
532
+ e.$slots.header || e.$slots["header-extra"] ? (l(), c("div", $t, [
533
+ v(e.$slots, "header", {}, void 0, !0),
534
+ e.$slots["header-extra"] ? (l(), c("div", kt, [
535
+ v(e.$slots, "header-extra", {}, void 0, !0)
536
+ ])) : y("", !0)
537
+ ])) : y("", !0),
538
+ e.$slots.cover ? (l(), c("div", wt, [
539
+ v(e.$slots, "cover", {}, void 0, !0)
540
+ ])) : y("", !0),
541
+ e.$slots.default ? (l(), c("div", Ft, [
542
+ v(e.$slots, "default", {}, void 0, !0)
543
+ ])) : y("", !0),
544
+ e.$slots.footer ? (l(), c("div", zt, [
545
+ v(e.$slots, "footer", {}, void 0, !0)
546
+ ])) : y("", !0)
547
+ ], 64)) : (l(), c(P, { key: 1 }, [
548
+ e.$slots.header || e.$slots["header-extra"] ? (l(), c("div", Ct, [
549
+ v(e.$slots, "header", {}, void 0, !0),
550
+ e.$slots["header-extra"] ? (l(), c("div", xt, [
551
+ v(e.$slots, "header-extra", {}, void 0, !0)
552
+ ])) : y("", !0)
553
+ ])) : y("", !0),
554
+ e.$slots.cover ? (l(), c("div", St, [
555
+ v(e.$slots, "cover", {}, void 0, !0)
556
+ ])) : y("", !0),
557
+ z("div", Mt, [
558
+ e.$slots.default ? (l(), c("div", It, [
559
+ v(e.$slots, "default", {}, void 0, !0)
560
+ ])) : y("", !0),
561
+ e.$slots.footer ? (l(), c("div", Tt, [
562
+ v(e.$slots, "footer", {}, void 0, !0)
563
+ ])) : y("", !0)
576
564
  ])
577
565
  ], 64))
578
566
  ], 2));
579
567
  }
580
- }), vo = /* @__PURE__ */ b(kt, [["__scopeId", "data-v-a66fa373"]]), Ft = {
568
+ }), Vt = /* @__PURE__ */ b(Bt, [["__scopeId", "data-v-a66fa373"]]), Rt = {
581
569
  key: 0,
582
570
  class: "f-tag__dot"
583
- }, Ct = /* @__PURE__ */ y({
571
+ }, At = /* @__PURE__ */ g({
584
572
  __name: "FTag",
585
573
  props: {
586
574
  color: {},
@@ -590,36 +578,36 @@ const Pe = (r, e, t) => {
590
578
  size: { default: "normal" }
591
579
  },
592
580
  emits: ["close"],
593
- setup(r, { emit: e }) {
594
- const t = e, s = R(!1);
595
- return (o, c) => {
596
- var l, a, _;
597
- const d = O("f-icon");
598
- return n(), i("span", {
581
+ setup(n, { emit: e }) {
582
+ const o = e, t = R(!1);
583
+ return (s, i) => {
584
+ var r, a, f;
585
+ const u = O("f-icon");
586
+ return l(), c("span", {
599
587
  class: C(["f-tag", [
600
- `f-tag--${(l = o.type) != null ? l : "round"}`,
601
- `f-tag--${(a = o.effect) != null ? a : "light"}`,
602
- (_ = o.color) != null ? _ : "default"
588
+ `f-tag--${(r = s.type) != null ? r : "round"}`,
589
+ `f-tag--${(a = s.effect) != null ? a : "light"}`,
590
+ (f = s.color) != null ? f : "default"
603
591
  ]]),
604
- onMouseenter: c[1] || (c[1] = (f) => s.value = !0),
605
- onMouseleave: c[2] || (c[2] = (f) => s.value = !1)
592
+ onMouseenter: i[1] || (i[1] = (m) => t.value = !0),
593
+ onMouseleave: i[2] || (i[2] = (m) => t.value = !1)
606
594
  }, [
607
- o.type === "dot" ? (n(), i("span", Ft)) : k("", !0),
608
- h(o.$slots, "default", {}, void 0, !0),
609
- o.closable ? (n(), L(d, {
595
+ s.type === "dot" ? (l(), c("span", Rt)) : y("", !0),
596
+ v(s.$slots, "default", {}, void 0, !0),
597
+ s.closable ? (l(), W(u, {
610
598
  key: 1,
611
599
  class: "f-tag__close",
612
- onClick: c[0] || (c[0] = pe((f) => t("close"), ["stop"]))
600
+ onClick: i[0] || (i[0] = se((m) => o("close"), ["stop"]))
613
601
  }, {
614
- default: B(() => [
615
- (n(), L(q(u(s) ? u(Re) : u(Ae))))
602
+ default: I(() => [
603
+ (l(), W(Y(p(t) ? p(Pe) : p(We))))
616
604
  ]),
617
605
  _: 1
618
- })) : k("", !0)
606
+ })) : y("", !0)
619
607
  ], 34);
620
608
  };
621
609
  }
622
- }), ho = /* @__PURE__ */ b(Ct, [["__scopeId", "data-v-9f7974a7"]]), zt = /* @__PURE__ */ y({
610
+ }), Pt = /* @__PURE__ */ b(At, [["__scopeId", "data-v-9f7974a7"]]), Wt = /* @__PURE__ */ g({
623
611
  __name: "FTooltip",
624
612
  props: {
625
613
  content: {},
@@ -629,77 +617,77 @@ const Pe = (r, e, t) => {
629
617
  offset: { default: 6 },
630
618
  maxWidth: { default: 240 }
631
619
  },
632
- setup(r) {
633
- const e = r, t = R(null), s = R(null), o = R(!1), c = R({ top: 0, left: 0 });
634
- let d = null;
635
- const l = () => {
636
- e.disabled || (d = setTimeout(() => {
637
- o.value = !0, de(_);
620
+ setup(n) {
621
+ const e = n, o = R(null), t = R(null), s = R(!1), i = R({ top: 0, left: 0 });
622
+ let u = null;
623
+ const r = () => {
624
+ e.disabled || (u = setTimeout(() => {
625
+ s.value = !0, pe(f);
638
626
  }, e.delay));
639
627
  }, a = () => {
640
- d && clearTimeout(d), o.value = !1;
641
- }, _ = () => {
642
- var J, m;
643
- if (!s.value) return;
644
- const f = (m = (J = t.value) == null ? void 0 : J.firstElementChild) != null ? m : t.value;
645
- if (!f) return;
646
- const p = f.getBoundingClientRect(), F = s.value.getBoundingClientRect(), S = e.offset, [$, M] = e.placement.split("-");
647
- let V = 0, x = 0;
648
- switch ($) {
628
+ u && clearTimeout(u), s.value = !1;
629
+ }, f = () => {
630
+ var Z, _;
631
+ if (!t.value) return;
632
+ const m = (_ = (Z = o.value) == null ? void 0 : Z.firstElementChild) != null ? _ : o.value;
633
+ if (!m) return;
634
+ const d = m.getBoundingClientRect(), k = t.value.getBoundingClientRect(), x = e.offset, [w, B] = e.placement.split("-");
635
+ let A = 0, M = 0;
636
+ switch (w) {
649
637
  case "top":
650
- V = p.top - F.height - S;
638
+ A = d.top - k.height - x;
651
639
  break;
652
640
  case "bottom":
653
- V = p.bottom + S;
641
+ A = d.bottom + x;
654
642
  break;
655
643
  case "left":
656
- x = p.left - F.width - S;
644
+ M = d.left - k.width - x;
657
645
  break;
658
646
  case "right":
659
- x = p.right + S;
647
+ M = d.right + x;
660
648
  break;
661
649
  }
662
- $ === "top" || $ === "bottom" ? M === "start" ? x = p.left : M === "end" ? x = p.right - F.width : x = p.left + (p.width - F.width) / 2 : M === "start" ? V = p.top : M === "end" ? V = p.bottom - F.height : V = p.top + (p.height - F.height) / 2;
663
- const H = 8;
664
- x = Math.max(H, Math.min(x, window.innerWidth - F.width - H)), V = Math.max(H, Math.min(V, window.innerHeight - F.height - H)), c.value = { top: V + window.scrollY, left: x + window.scrollX };
650
+ w === "top" || w === "bottom" ? B === "start" ? M = d.left : B === "end" ? M = d.right - k.width : M = d.left + (d.width - k.width) / 2 : B === "start" ? A = d.top : B === "end" ? A = d.bottom - k.height : A = d.top + (d.height - k.height) / 2;
651
+ const E = 8;
652
+ M = Math.max(E, Math.min(M, window.innerWidth - k.width - E)), A = Math.max(E, Math.min(A, window.innerHeight - k.height - E)), i.value = { top: A + window.scrollY, left: M + window.scrollX };
665
653
  };
666
- return ue(a), (f, p) => (n(), i("div", {
654
+ return oe(a), (m, d) => (l(), c("div", {
667
655
  class: "f-tooltip",
668
656
  ref_key: "triggerRef",
669
- ref: t,
670
- onMouseenter: l,
657
+ ref: o,
658
+ onMouseenter: r,
671
659
  onMouseleave: a
672
660
  }, [
673
- h(f.$slots, "default", {}, void 0, !0),
674
- (n(), L(fe, { to: "body" }, [
675
- T(K, { name: "f-tooltip" }, {
676
- default: B(() => [
677
- u(o) && (f.content || f.$slots.content) ? (n(), i("div", {
661
+ v(m.$slots, "default", {}, void 0, !0),
662
+ (l(), W(fe, { to: "body" }, [
663
+ S(K, { name: "f-tooltip" }, {
664
+ default: I(() => [
665
+ p(s) && (m.content || m.$slots.content) ? (l(), c("div", {
678
666
  key: 0,
679
667
  ref_key: "tooltipRef",
680
- ref: s,
681
- class: C(["f-tooltip-wrapper", `is-${f.placement.split("-")[0]}`]),
682
- style: I({
683
- top: `${u(c).top}px`,
684
- left: `${u(c).left}px`,
685
- maxWidth: `${f.maxWidth}px`
668
+ ref: t,
669
+ class: C(["f-tooltip-wrapper", `is-${m.placement.split("-")[0]}`]),
670
+ style: T({
671
+ top: `${p(i).top}px`,
672
+ left: `${p(i).left}px`,
673
+ maxWidth: `${m.maxWidth}px`
686
674
  })
687
675
  }, [
688
- h(f.$slots, "content", {}, () => [
689
- we(A(f.content), 1)
676
+ v(m.$slots, "content", {}, () => [
677
+ me(V(m.content), 1)
690
678
  ], !0),
691
- p[0] || (p[0] = z("span", { class: "f-tooltip-arrow" }, null, -1))
692
- ], 6)) : k("", !0)
679
+ d[0] || (d[0] = z("span", { class: "f-tooltip-arrow" }, null, -1))
680
+ ], 6)) : y("", !0)
693
681
  ]),
694
682
  _: 3
695
683
  })
696
684
  ]))
697
685
  ], 544));
698
686
  }
699
- }), go = /* @__PURE__ */ b(zt, [["__scopeId", "data-v-be9acca7"]]), xt = { class: "f-progress" }, Tt = {
687
+ }), jt = /* @__PURE__ */ b(Wt, [["__scopeId", "data-v-be9acca7"]]), Dt = { class: "f-progress" }, Et = {
700
688
  key: 0,
701
689
  class: "f-progress__text"
702
- }, St = /* @__PURE__ */ y({
690
+ }, Lt = /* @__PURE__ */ g({
703
691
  __name: "FProgress",
704
692
  props: {
705
693
  percent: {},
@@ -707,25 +695,25 @@ const Pe = (r, e, t) => {
707
695
  showText: { type: Boolean, default: !1 },
708
696
  height: { default: 5 }
709
697
  },
710
- setup(r) {
711
- const e = r, t = v(() => Math.min(100, Math.max(0, e.percent)));
712
- return (s, o) => (n(), i("div", xt, [
698
+ setup(n) {
699
+ const e = n, o = h(() => Math.min(100, Math.max(0, e.percent)));
700
+ return (t, s) => (l(), c("div", Dt, [
713
701
  z("div", {
714
702
  class: "f-progress__track",
715
- style: I({ height: `${s.height}px` })
703
+ style: T({ height: `${t.height}px` })
716
704
  }, [
717
705
  z("div", {
718
706
  class: "f-progress__fill",
719
- style: I({
720
- width: `${u(t)}%`,
721
- background: s.color
707
+ style: T({
708
+ width: `${p(o)}%`,
709
+ background: t.color
722
710
  })
723
711
  }, null, 4)
724
712
  ], 4),
725
- s.showText ? (n(), i("span", Tt, A(u(t)) + "%", 1)) : k("", !0)
713
+ t.showText ? (l(), c("span", Et, V(p(o)) + "%", 1)) : y("", !0)
726
714
  ]));
727
715
  }
728
- }), yo = /* @__PURE__ */ b(St, [["__scopeId", "data-v-c2164d6e"]]), Mt = { class: "f-tabs__nav-container" }, Bt = { class: "f-tabs__nav" }, It = ["onClick"], Vt = { class: "f-tabs__label" }, Rt = /* @__PURE__ */ y({
716
+ }), Ot = /* @__PURE__ */ b(Lt, [["__scopeId", "data-v-c2164d6e"]]), Ht = { class: "f-tabs__nav-container" }, Nt = { class: "f-tabs__nav" }, qt = ["onClick"], Gt = { class: "f-tabs__label" }, Ut = /* @__PURE__ */ g({
729
717
  __name: "FTabs",
730
718
  props: {
731
719
  tabs: {},
@@ -733,93 +721,93 @@ const Pe = (r, e, t) => {
733
721
  type: { default: "line" }
734
722
  },
735
723
  emits: ["update:active", "change"],
736
- setup(r, { emit: e }) {
737
- const t = r, s = e, o = v({
724
+ setup(n, { emit: e }) {
725
+ const o = n, t = e, s = h({
738
726
  get: () => {
739
- var l;
740
- if (t.active && t.tabs.some((a) => a.name === t.active && !a.disabled))
741
- return t.active;
742
- const d = t.tabs.find((a) => !a.disabled);
743
- return (l = d == null ? void 0 : d.name) != null ? l : "";
727
+ var r;
728
+ if (o.active && o.tabs.some((a) => a.name === o.active && !a.disabled))
729
+ return o.active;
730
+ const u = o.tabs.find((a) => !a.disabled);
731
+ return (r = u == null ? void 0 : u.name) != null ? r : "";
744
732
  },
745
- set: (d) => {
746
- s("update:active", d), s("change", d);
733
+ set: (u) => {
734
+ t("update:active", u), t("change", u);
747
735
  }
748
- }), c = (d, l) => {
749
- l || (o.value = d);
736
+ }), i = (u, r) => {
737
+ r || (s.value = u);
750
738
  };
751
- return (d, l) => (n(), i("div", {
752
- class: C(["f-tabs", [`f-tabs--${d.type}`]])
739
+ return (u, r) => (l(), c("div", {
740
+ class: C(["f-tabs", [`f-tabs--${u.type}`]])
753
741
  }, [
754
- z("div", Mt, [
755
- z("div", Bt, [
756
- (n(!0), i(D, null, U(d.tabs, (a) => (n(), i("div", {
742
+ z("div", Ht, [
743
+ z("div", Nt, [
744
+ (l(!0), c(P, null, G(u.tabs, (a) => (l(), c("div", {
757
745
  key: a.name,
758
746
  class: C(["f-tabs__tab", {
759
- active: u(o) === a.name,
747
+ active: p(s) === a.name,
760
748
  disabled: a.disabled
761
749
  }]),
762
- onClick: (_) => c(a.name, a.disabled)
750
+ onClick: (f) => i(a.name, a.disabled)
763
751
  }, [
764
- z("span", Vt, A(a.label), 1)
765
- ], 10, It))), 128))
752
+ z("span", Gt, V(a.label), 1)
753
+ ], 10, qt))), 128))
766
754
  ])
767
755
  ]),
768
- (n(!0), i(D, null, U(d.tabs, (a) => Z((n(), i("div", {
756
+ (l(!0), c(P, null, G(u.tabs, (a) => te((l(), c("div", {
769
757
  key: a.name,
770
758
  class: "f-tabs__panel"
771
759
  }, [
772
- h(d.$slots, a.name, {}, void 0, !0)
760
+ v(u.$slots, a.name, {}, void 0, !0)
773
761
  ])), [
774
- [ce, u(o) === a.name]
762
+ [ue, p(s) === a.name]
775
763
  ])), 128))
776
764
  ], 2));
777
765
  }
778
- }), bo = /* @__PURE__ */ b(Rt, [["__scopeId", "data-v-268fc654"]]), At = {
766
+ }), Xt = /* @__PURE__ */ b(Ut, [["__scopeId", "data-v-268fc654"]]), Yt = {
779
767
  class: "f-breadcrumb__current",
780
768
  "aria-current": "page"
781
- }, Dt = ["href"], Lt = {
769
+ }, Jt = ["href"], Kt = {
782
770
  key: 3,
783
771
  class: "f-breadcrumb__text"
784
- }, Pt = /* @__PURE__ */ y({
772
+ }, Qt = /* @__PURE__ */ g({
785
773
  __name: "FBreadcrumb",
786
774
  props: {
787
775
  items: { default: () => [] },
788
776
  separator: { default: "/" },
789
777
  animated: { type: Boolean, default: !1 }
790
778
  },
791
- setup(r) {
792
- return (e, t) => (n(), i("nav", {
779
+ setup(n) {
780
+ return (e, o) => (l(), c("nav", {
793
781
  class: C(["f-breadcrumb", { "f-breadcrumb--animated": e.animated }]),
794
782
  "aria-label": "breadcrumb"
795
783
  }, [
796
- T(ke, { name: "breadcrumb" }, {
797
- default: B(() => [
798
- (n(!0), i(D, null, U(e.items, (s, o) => (n(), i(D, {
799
- key: s.label
784
+ S(Fe, { name: "breadcrumb" }, {
785
+ default: I(() => [
786
+ (l(!0), c(P, null, G(e.items, (t, s) => (l(), c(P, {
787
+ key: t.label
800
788
  }, [
801
- o > 0 ? (n(), i("span", {
802
- key: `sep-${s.label}`,
789
+ s > 0 ? (l(), c("span", {
790
+ key: `sep-${t.label}`,
803
791
  class: "f-breadcrumb__sep",
804
792
  "aria-hidden": "true"
805
- }, A(e.separator), 1)) : k("", !0),
806
- o === e.items.length - 1 ? h(e.$slots, "default", {
793
+ }, V(e.separator), 1)) : y("", !0),
794
+ s === e.items.length - 1 ? v(e.$slots, "default", {
807
795
  key: 1,
808
- item: s
796
+ item: t
809
797
  }, () => [
810
- z("span", At, A(s.label), 1)
811
- ], !0) : s.href ? (n(), i("a", {
798
+ z("span", Yt, V(t.label), 1)
799
+ ], !0) : t.href ? (l(), c("a", {
812
800
  key: 2,
813
- href: s.href,
801
+ href: t.href,
814
802
  class: "f-breadcrumb__link"
815
- }, A(s.label), 9, Dt)) : (n(), i("span", Lt, A(s.label), 1))
803
+ }, V(t.label), 9, Jt)) : (l(), c("span", Kt, V(t.label), 1))
816
804
  ], 64))), 128))
817
805
  ]),
818
806
  _: 3
819
807
  })
820
808
  ], 2));
821
809
  }
822
- }), $o = /* @__PURE__ */ b(Pt, [["__scopeId", "data-v-bb787dcc"]]), Wt = /* @__PURE__ */ y({
810
+ }), Zt = /* @__PURE__ */ b(Qt, [["__scopeId", "data-v-bb787dcc"]]), eo = /* @__PURE__ */ g({
823
811
  __name: "FCol",
824
812
  props: {
825
813
  span: { default: 24 },
@@ -830,28 +818,28 @@ const Pe = (r, e, t) => {
830
818
  md: {},
831
819
  lg: {}
832
820
  },
833
- setup(r) {
834
- const e = r, t = (c) => typeof c == "number" ? { span: c } : c, s = v(() => ({
821
+ setup(n) {
822
+ const e = n, o = (i) => typeof i == "number" ? { span: i } : i, t = h(() => ({
835
823
  "--col-span": e.span,
836
824
  "--col-offset": e.offset,
837
825
  "--col-order": e.order
838
- })), o = v(() => {
839
- const c = [], d = { xs: e.xs, sm: e.sm, md: e.md, lg: e.lg };
840
- for (const [l, a] of Object.entries(d)) {
826
+ })), s = h(() => {
827
+ const i = [], u = { xs: e.xs, sm: e.sm, md: e.md, lg: e.lg };
828
+ for (const [r, a] of Object.entries(u)) {
841
829
  if (a === void 0) continue;
842
- const { span: _, offset: f, order: p } = t(a);
843
- _ !== void 0 && c.push(`f-col--${l}-${_}`), f !== void 0 && c.push(`f-col--${l}-offset-${f}`), p !== void 0 && c.push(`f-col--${l}-order-${p}`);
830
+ const { span: f, offset: m, order: d } = o(a);
831
+ f !== void 0 && i.push(`f-col--${r}-${f}`), m !== void 0 && i.push(`f-col--${r}-offset-${m}`), d !== void 0 && i.push(`f-col--${r}-order-${d}`);
844
832
  }
845
- return c;
833
+ return i;
846
834
  });
847
- return (c, d) => (n(), i("div", {
848
- class: C(["f-col", u(o)]),
849
- style: I(u(s))
835
+ return (i, u) => (l(), c("div", {
836
+ class: C(["f-col", p(s)]),
837
+ style: T(p(t))
850
838
  }, [
851
- h(c.$slots, "default", {}, void 0, !0)
839
+ v(i.$slots, "default", {}, void 0, !0)
852
840
  ], 6));
853
841
  }
854
- }), wo = /* @__PURE__ */ b(Wt, [["__scopeId", "data-v-5a8b0cb4"]]), Ht = /* @__PURE__ */ y({
842
+ }), to = /* @__PURE__ */ b(eo, [["__scopeId", "data-v-5a8b0cb4"]]), oo = /* @__PURE__ */ g({
855
843
  __name: "FRow",
856
844
  props: {
857
845
  gutter: { default: 0 },
@@ -860,47 +848,47 @@ const Pe = (r, e, t) => {
860
848
  wrap: { default: "wrap" },
861
849
  tag: { default: "div" }
862
850
  },
863
- setup(r) {
864
- const e = r, t = v(
851
+ setup(n) {
852
+ const e = n, o = h(
865
853
  () => Array.isArray(e.gutter) ? e.gutter[0] : e.gutter
866
- ), s = v(
854
+ ), t = h(
867
855
  () => Array.isArray(e.gutter) ? e.gutter[1] : 0
868
- ), o = {
856
+ ), s = {
869
857
  start: "flex-start",
870
858
  end: "flex-end",
871
859
  center: "center",
872
860
  "space-between": "space-between",
873
861
  "space-around": "space-around",
874
862
  "space-evenly": "space-evenly"
875
- }, c = {
863
+ }, i = {
876
864
  top: "flex-start",
877
865
  middle: "center",
878
866
  bottom: "flex-end",
879
867
  stretch: "stretch"
880
- }, d = v(() => ({
881
- marginLeft: t.value ? `-${t.value / 2}px` : void 0,
882
- marginRight: t.value ? `-${t.value / 2}px` : void 0,
883
- rowGap: s.value ? `${s.value}px` : void 0,
884
- justifyContent: o[e.justify],
885
- alignItems: c[e.align],
868
+ }, u = h(() => ({
869
+ marginLeft: o.value ? `-${o.value / 2}px` : void 0,
870
+ marginRight: o.value ? `-${o.value / 2}px` : void 0,
871
+ rowGap: t.value ? `${t.value}px` : void 0,
872
+ justifyContent: s[e.justify],
873
+ alignItems: i[e.align],
886
874
  flexWrap: e.wrap,
887
- "--row-gutter-h": t.value ? `${t.value / 2}px` : "0px"
875
+ "--row-gutter-h": o.value ? `${o.value / 2}px` : "0px"
888
876
  }));
889
- return (l, a) => (n(), L(q(l.tag), {
877
+ return (r, a) => (l(), W(Y(r.tag), {
890
878
  class: "f-row",
891
- style: I(u(d))
879
+ style: T(p(u))
892
880
  }, {
893
- default: B(() => [
894
- h(l.$slots, "default", {}, void 0, !0)
881
+ default: I(() => [
882
+ v(r.$slots, "default", {}, void 0, !0)
895
883
  ]),
896
884
  _: 3
897
885
  }, 8, ["style"]));
898
886
  }
899
- }), ko = /* @__PURE__ */ b(Ht, [["__scopeId", "data-v-72f62339"]]), Et = { class: "f-space__item" }, Ot = {
887
+ }), so = /* @__PURE__ */ b(oo, [["__scopeId", "data-v-72f62339"]]), ao = { class: "f-space__item" }, no = {
900
888
  key: 0,
901
889
  class: "f-space__split",
902
890
  "aria-hidden": "true"
903
- }, jt = /* @__PURE__ */ y({
891
+ }, lo = /* @__PURE__ */ g({
904
892
  __name: "FSpace",
905
893
  props: {
906
894
  direction: { default: "horizontal" },
@@ -910,80 +898,80 @@ const Pe = (r, e, t) => {
910
898
  wrap: { type: Boolean, default: !1 },
911
899
  split: {}
912
900
  },
913
- setup(r) {
914
- const e = r, t = {
901
+ setup(n) {
902
+ const e = n, o = {
915
903
  small: 6,
916
904
  normal: 12,
917
905
  large: 18
918
- }, s = (a) => typeof a == "number" ? a : t[a], o = v(() => {
906
+ }, t = (a) => typeof a == "number" ? a : o[a], s = h(() => {
919
907
  const a = e.size;
920
- return Array.isArray(a) ? `${s(a[1])}px ${s(a[0])}px` : `${s(a)}px`;
921
- }), c = v(() => ({
908
+ return Array.isArray(a) ? `${t(a[1])}px ${t(a[0])}px` : `${t(a)}px`;
909
+ }), i = h(() => ({
922
910
  flexDirection: e.direction === "vertical" ? "column" : "row",
923
911
  alignItems: e.align,
924
912
  justifyContent: e.justify,
925
913
  flexWrap: e.wrap ? "wrap" : "nowrap",
926
- gap: o.value
927
- })), d = Fe(), l = v(() => {
928
- var f;
929
- const a = (f = d.default) == null ? void 0 : f.call(d);
914
+ gap: s.value
915
+ })), u = ze(), r = h(() => {
916
+ var m;
917
+ const a = (m = u.default) == null ? void 0 : m.call(u);
930
918
  if (!a) return [];
931
- const _ = [];
932
- for (const p of a)
933
- p.type === D ? _.push(...p.children) : _.push(p);
934
- return _.filter((p) => p.type !== Comment);
919
+ const f = [];
920
+ for (const d of a)
921
+ d.type === P ? f.push(...d.children) : f.push(d);
922
+ return f.filter((d) => d.type !== Comment);
935
923
  });
936
- return (a, _) => (n(), i("div", {
924
+ return (a, f) => (l(), c("div", {
937
925
  class: "f-space",
938
- style: I(u(c))
926
+ style: T(p(i))
939
927
  }, [
940
- (n(!0), i(D, null, U(u(l), (f, p) => (n(), i(D, { key: p }, [
941
- z("div", Et, [
942
- (n(), L(q(f)))
928
+ (l(!0), c(P, null, G(p(r), (m, d) => (l(), c(P, { key: d }, [
929
+ z("div", ao, [
930
+ (l(), W(Y(m)))
943
931
  ]),
944
- a.split && p < u(l).length - 1 ? (n(), i("span", Ot, A(a.split), 1)) : k("", !0)
932
+ a.split && d < p(r).length - 1 ? (l(), c("span", no, V(a.split), 1)) : y("", !0)
945
933
  ], 64))), 128))
946
934
  ], 4));
947
935
  }
948
- }), Fo = /* @__PURE__ */ b(jt, [["__scopeId", "data-v-5fb3b1a0"]]), Nt = /* @__PURE__ */ y({
936
+ }), ro = /* @__PURE__ */ b(lo, [["__scopeId", "data-v-5fb3b1a0"]]), io = /* @__PURE__ */ g({
949
937
  __name: "FContainer",
950
938
  props: {
951
939
  gap: { default: 12 }
952
940
  },
953
- setup(r) {
954
- const e = r, t = v(() => ({
941
+ setup(n) {
942
+ const e = n, o = h(() => ({
955
943
  gap: typeof e.gap == "number" ? `${e.gap}px` : e.gap
956
944
  }));
957
- return (s, o) => (n(), i("div", {
945
+ return (t, s) => (l(), c("div", {
958
946
  class: "f-container",
959
- style: I(u(t))
947
+ style: T(p(o))
960
948
  }, [
961
- h(s.$slots, "default", {}, void 0, !0)
949
+ v(t.$slots, "default", {}, void 0, !0)
962
950
  ], 4));
963
951
  }
964
- }), Co = /* @__PURE__ */ b(Nt, [["__scopeId", "data-v-08450ddf"]]), Gt = /* @__PURE__ */ y({
952
+ }), co = /* @__PURE__ */ b(io, [["__scopeId", "data-v-08450ddf"]]), uo = /* @__PURE__ */ g({
965
953
  __name: "FDivider",
966
954
  props: {
967
955
  color: {},
968
956
  direction: { default: "horizontal" },
969
957
  line: { default: "solid" }
970
958
  },
971
- setup(r) {
972
- const e = r, t = v(() => {
973
- const s = e.color || "var(--el-color-primary)", o = e.direction === "horizontal";
959
+ setup(n) {
960
+ const e = n, o = h(() => {
961
+ const t = e.color || "var(--el-color-primary)", s = e.direction === "horizontal";
974
962
  return {
975
- borderTop: o ? `${e.line} ${s}` : "none",
976
- borderLeft: o ? "none" : `${e.line} ${s}`,
977
- height: o ? "0" : "100%",
978
- width: o ? "100%" : "0",
979
- margin: o ? "24px 0" : "0"
963
+ borderTop: s ? `${e.line} ${t}` : "none",
964
+ borderLeft: s ? "none" : `${e.line} ${t}`,
965
+ height: s ? "0" : "100%",
966
+ width: s ? "100%" : "0",
967
+ margin: s ? "24px 0" : "0"
980
968
  };
981
969
  });
982
- return (s, o) => (n(), i("hr", {
983
- style: I(t.value)
970
+ return (t, s) => (l(), c("hr", {
971
+ style: T(o.value)
984
972
  }, null, 4));
985
973
  }
986
- }), zo = /* @__PURE__ */ b(Gt, [["__scopeId", "data-v-512ee743"]]), Ut = ["src", "alt"], Xt = /* @__PURE__ */ y({
974
+ }), po = /* @__PURE__ */ b(uo, [["__scopeId", "data-v-512ee743"]]), fo = ["src", "alt"], mo = /* @__PURE__ */ g({
987
975
  __name: "FAvatar",
988
976
  props: {
989
977
  src: {},
@@ -992,39 +980,39 @@ const Pe = (r, e, t) => {
992
980
  shape: { default: "circle" },
993
981
  icon: {}
994
982
  },
995
- setup(r) {
996
- const e = r, t = {
983
+ setup(n) {
984
+ const e = n, o = {
997
985
  small: "32px",
998
986
  normal: "48px",
999
987
  large: "64px"
1000
- }, s = v(() => ({
1001
- width: typeof e.size == "string" ? t[e.size] : `${e.size}px`,
1002
- height: typeof e.size == "string" ? t[e.size] : `${e.size}px`,
988
+ }, t = h(() => ({
989
+ width: typeof e.size == "string" ? o[e.size] : `${e.size}px`,
990
+ height: typeof e.size == "string" ? o[e.size] : `${e.size}px`,
1003
991
  borderRadius: e.shape === "circle" ? "50%" : "8px"
1004
992
  }));
1005
- return (o, c) => {
1006
- const d = O("f-icon");
1007
- return n(), i("div", {
993
+ return (s, i) => {
994
+ const u = O("f-icon");
995
+ return l(), c("div", {
1008
996
  class: "f-avatar",
1009
- style: I(u(s))
997
+ style: T(p(t))
1010
998
  }, [
1011
- o.src ? (n(), i("img", {
999
+ s.src ? (l(), c("img", {
1012
1000
  key: 0,
1013
- src: o.src,
1014
- alt: o.alt
1015
- }, null, 8, Ut)) : (n(), L(d, {
1001
+ src: s.src,
1002
+ alt: s.alt
1003
+ }, null, 8, fo)) : (l(), W(u, {
1016
1004
  key: 1,
1017
1005
  size: 24
1018
1006
  }, {
1019
- default: B(() => [
1020
- (n(), L(q(o.icon ? o.icon : u(De))))
1007
+ default: I(() => [
1008
+ (l(), W(Y(s.icon ? s.icon : p(je))))
1021
1009
  ]),
1022
1010
  _: 1
1023
1011
  }))
1024
1012
  ], 4);
1025
1013
  };
1026
1014
  }
1027
- }), xo = /* @__PURE__ */ b(Xt, [["__scopeId", "data-v-799350d0"]]), Yt = ["disabled"], qt = /* @__PURE__ */ y({
1015
+ }), _o = /* @__PURE__ */ b(mo, [["__scopeId", "data-v-799350d0"]]), ho = ["disabled"], vo = /* @__PURE__ */ g({
1028
1016
  __name: "FButton",
1029
1017
  props: {
1030
1018
  size: { default: "normal" },
@@ -1033,49 +1021,49 @@ const Pe = (r, e, t) => {
1033
1021
  bgColor: {},
1034
1022
  variant: {}
1035
1023
  },
1036
- setup(r) {
1037
- const e = r, t = {
1024
+ setup(n) {
1025
+ const e = n, o = {
1038
1026
  small: { height: "24px", minWidth: "24px", padding: "0 8px", fontSize: "11px" },
1039
1027
  normal: { height: "32px", minWidth: "32px", padding: "0 12px", fontSize: "12px" },
1040
1028
  large: { height: "40px", minWidth: "40px", padding: "0 16px", fontSize: "13px" }
1041
- }, s = v(() => {
1042
- var o;
1043
- return ne(ae({}, (o = t[e.size]) != null ? o : t.normal), {
1029
+ }, t = h(() => {
1030
+ var s;
1031
+ return ce(ie({}, (s = o[e.size]) != null ? s : o.normal), {
1044
1032
  borderRadius: e.round === !0 ? "999px" : typeof e.round == "number" ? `${e.round}px` : "6px",
1045
1033
  backgroundColor: e.bgColor
1046
1034
  });
1047
1035
  });
1048
- return (o, c) => {
1049
- var d;
1050
- return n(), i("button", {
1036
+ return (s, i) => {
1037
+ var u;
1038
+ return l(), c("button", {
1051
1039
  class: C(["f-button", [
1052
- `f-button--${(d = o.variant) != null ? d : "default"}`,
1053
- { "is-disabled": o.disabled }
1040
+ `f-button--${(u = s.variant) != null ? u : "default"}`,
1041
+ { "is-disabled": s.disabled }
1054
1042
  ]]),
1055
- style: I(u(s)),
1056
- disabled: o.disabled
1043
+ style: T(p(t)),
1044
+ disabled: s.disabled
1057
1045
  }, [
1058
- h(o.$slots, "default", {}, void 0, !0)
1059
- ], 14, Yt);
1046
+ v(s.$slots, "default", {}, void 0, !0)
1047
+ ], 14, ho);
1060
1048
  };
1061
1049
  }
1062
- }), To = /* @__PURE__ */ b(qt, [["__scopeId", "data-v-eeff7101"]]), Jt = /* @__PURE__ */ y({
1050
+ }), go = /* @__PURE__ */ b(vo, [["__scopeId", "data-v-eeff7101"]]), bo = /* @__PURE__ */ g({
1063
1051
  __name: "FTypography",
1064
1052
  props: {
1065
1053
  color: { default: "" }
1066
1054
  },
1067
- setup(r) {
1068
- const e = r, t = v(() => ({
1055
+ setup(n) {
1056
+ const e = n, o = h(() => ({
1069
1057
  color: e.color
1070
1058
  }));
1071
- return (s, o) => (n(), i("div", {
1059
+ return (t, s) => (l(), c("div", {
1072
1060
  class: "f-typography",
1073
- style: I(u(t))
1061
+ style: T(p(o))
1074
1062
  }, [
1075
- h(s.$slots, "default", {}, void 0, !0)
1063
+ v(t.$slots, "default", {}, void 0, !0)
1076
1064
  ], 4));
1077
1065
  }
1078
- }), So = /* @__PURE__ */ b(Jt, [["__scopeId", "data-v-54c9aca5"]]), Kt = /* @__PURE__ */ y({
1066
+ }), yo = /* @__PURE__ */ b(bo, [["__scopeId", "data-v-54c9aca5"]]), $o = /* @__PURE__ */ g({
1079
1067
  __name: "FText",
1080
1068
  props: {
1081
1069
  tag: { default: "span" },
@@ -1086,46 +1074,46 @@ const Pe = (r, e, t) => {
1086
1074
  truncate: { type: Boolean },
1087
1075
  italic: { type: Boolean }
1088
1076
  },
1089
- setup(r) {
1090
- const e = r, t = {
1077
+ setup(n) {
1078
+ const e = n, o = {
1091
1079
  1: "3xl",
1092
1080
  2: "2xl",
1093
1081
  3: "xl",
1094
1082
  4: "lg",
1095
1083
  5: "normal",
1096
1084
  6: "sm"
1097
- }, s = {
1085
+ }, t = {
1098
1086
  1: "bolder",
1099
1087
  2: "bold",
1100
1088
  3: "bold",
1101
1089
  4: "medium",
1102
1090
  5: "medium",
1103
1091
  6: "normal"
1104
- }, o = v(() => {
1105
- var l;
1106
- return e.heading ? `h${e.heading}` : (l = e.tag) != null ? l : "span";
1107
- }), c = v(() => {
1108
- var l;
1109
- return (l = e.size) != null ? l : e.heading ? t[e.heading] : "normal";
1110
- }), d = v(() => {
1111
- var l;
1112
- return (l = e.weight) != null ? l : e.heading ? s[e.heading] : "normal";
1092
+ }, s = h(() => {
1093
+ var r;
1094
+ return e.heading ? `h${e.heading}` : (r = e.tag) != null ? r : "span";
1095
+ }), i = h(() => {
1096
+ var r;
1097
+ return (r = e.size) != null ? r : e.heading ? o[e.heading] : "normal";
1098
+ }), u = h(() => {
1099
+ var r;
1100
+ return (r = e.weight) != null ? r : e.heading ? t[e.heading] : "normal";
1113
1101
  });
1114
- return (l, a) => (n(), L(q(u(o)), {
1102
+ return (r, a) => (l(), W(Y(p(s)), {
1115
1103
  class: C(["f-text", [
1116
- `f-text--${u(c)}`,
1117
- `f-text--${u(d)}`,
1118
- l.color && `f-text--${l.color}`,
1119
- { "f-text--truncate": l.truncate, "f-text--italic": l.italic }
1104
+ `f-text--${p(i)}`,
1105
+ `f-text--${p(u)}`,
1106
+ r.color && `f-text--${r.color}`,
1107
+ { "f-text--truncate": r.truncate, "f-text--italic": r.italic }
1120
1108
  ]])
1121
1109
  }, {
1122
- default: B(() => [
1123
- h(l.$slots, "default", {}, void 0, !0)
1110
+ default: I(() => [
1111
+ v(r.$slots, "default", {}, void 0, !0)
1124
1112
  ]),
1125
1113
  _: 3
1126
1114
  }, 8, ["class"]));
1127
1115
  }
1128
- }), Mo = /* @__PURE__ */ b(Kt, [["__scopeId", "data-v-8bcfc6b3"]]), Qt = ["href", "target", "rel"], Zt = /* @__PURE__ */ y({
1116
+ }), ko = /* @__PURE__ */ b($o, [["__scopeId", "data-v-8bcfc6b3"]]), wo = ["href", "target", "rel"], Fo = /* @__PURE__ */ g({
1129
1117
  __name: "FLink",
1130
1118
  props: {
1131
1119
  href: {},
@@ -1134,9 +1122,9 @@ const Pe = (r, e, t) => {
1134
1122
  color: {},
1135
1123
  disabled: { type: Boolean }
1136
1124
  },
1137
- setup(r) {
1138
- const e = r;
1139
- return (t, s) => (n(), i("a", {
1125
+ setup(n) {
1126
+ const e = n;
1127
+ return (o, t) => (l(), c("a", {
1140
1128
  class: C(["f-link", [
1141
1129
  e.color && `f-link--${e.color}`,
1142
1130
  `f-link--underline-${e.underline}`,
@@ -1146,10 +1134,10 @@ const Pe = (r, e, t) => {
1146
1134
  target: e.target,
1147
1135
  rel: e.target === "_blank" ? "noopener noreferrer" : void 0
1148
1136
  }, [
1149
- h(t.$slots, "default", {}, void 0, !0)
1150
- ], 10, Qt));
1137
+ v(o.$slots, "default", {}, void 0, !0)
1138
+ ], 10, wo));
1151
1139
  }
1152
- }), Bo = /* @__PURE__ */ b(Zt, [["__scopeId", "data-v-daaa3e25"]]), eo = { class: "f-badge" }, to = /* @__PURE__ */ y({
1140
+ }), zo = /* @__PURE__ */ b(Fo, [["__scopeId", "data-v-daaa3e25"]]), Co = { class: "f-badge" }, xo = /* @__PURE__ */ g({
1153
1141
  __name: "FBadge",
1154
1142
  props: {
1155
1143
  value: {},
@@ -1159,109 +1147,325 @@ const Pe = (r, e, t) => {
1159
1147
  placement: { default: "top-right" },
1160
1148
  offset: { default: () => [0, 0] }
1161
1149
  },
1162
- setup(r) {
1163
- const e = r, t = v(() => {
1164
- var o;
1165
- return e.dot ? "" : typeof e.value == "number" && e.value > e.max ? `${e.max}+` : (o = e.value) != null ? o : "";
1166
- }), s = v(() => {
1167
- const [o, c] = e.offset;
1150
+ setup(n) {
1151
+ const e = n, o = h(() => {
1152
+ var s;
1153
+ return e.dot ? "" : typeof e.value == "number" && e.value > e.max ? `${e.max}+` : (s = e.value) != null ? s : "";
1154
+ }), t = h(() => {
1155
+ const [s, i] = e.offset;
1168
1156
  return {
1169
- "top-right": { top: 0, right: 0, transform: `translate(calc(50% + ${o}px), calc(-50% + ${c}px))` },
1170
- "top-left": { top: 0, left: 0, transform: `translate(calc(-50% + ${o}px), calc(-50% + ${c}px))` },
1171
- "bottom-right": { bottom: 0, right: 0, transform: `translate(calc(50% + ${o}px), calc(50% + ${c}px))` },
1172
- "bottom-left": { bottom: 0, left: 0, transform: `translate(calc(-50% + ${o}px), calc(50% + ${c}px))` }
1157
+ "top-right": { top: 0, right: 0, transform: `translate(calc(50% + ${s}px), calc(-50% + ${i}px))` },
1158
+ "top-left": { top: 0, left: 0, transform: `translate(calc(-50% + ${s}px), calc(-50% + ${i}px))` },
1159
+ "bottom-right": { bottom: 0, right: 0, transform: `translate(calc(50% + ${s}px), calc(50% + ${i}px))` },
1160
+ "bottom-left": { bottom: 0, left: 0, transform: `translate(calc(-50% + ${s}px), calc(50% + ${i}px))` }
1173
1161
  }[e.placement];
1174
1162
  });
1175
- return (o, c) => (n(), i("div", eo, [
1176
- h(o.$slots, "default", {}, void 0, !0),
1177
- o.dot || o.value !== void 0 && o.value !== "" ? (n(), i("span", {
1163
+ return (s, i) => (l(), c("div", Co, [
1164
+ v(s.$slots, "default", {}, void 0, !0),
1165
+ s.dot || s.value !== void 0 && s.value !== "" ? (l(), c("span", {
1178
1166
  key: 0,
1179
- class: C(["f-badge__content", [`f-badge--${o.type}`, { "f-badge--dot": o.dot }]]),
1180
- style: I(u(s))
1181
- }, A(u(t)), 7)) : k("", !0)
1167
+ class: C(["f-badge__content", [`f-badge--${s.type}`, { "f-badge--dot": s.dot }]]),
1168
+ style: T(p(t))
1169
+ }, V(p(o)), 7)) : y("", !0)
1182
1170
  ]));
1183
1171
  }
1184
- }), Io = /* @__PURE__ */ b(to, [["__scopeId", "data-v-be6947ff"]]), oo = /* @__PURE__ */ y({
1172
+ }), So = /* @__PURE__ */ b(xo, [["__scopeId", "data-v-be6947ff"]]), Mo = /* @__PURE__ */ g({
1185
1173
  __name: "FAffix",
1186
1174
  props: {
1187
1175
  placement: { default: "top-right" },
1188
1176
  offset: { default: () => [8, 8] }
1189
1177
  },
1190
- setup(r) {
1191
- const e = r, t = v(() => {
1192
- const [s, o] = e.offset;
1178
+ setup(n) {
1179
+ const e = n, o = h(() => {
1180
+ const [t, s] = e.offset;
1193
1181
  return {
1194
- "top-left": { top: `${o}px`, left: `${s}px` },
1195
- "top-right": { top: `${o}px`, right: `${s}px` },
1196
- "bottom-left": { bottom: `${o}px`, left: `${s}px` },
1197
- "bottom-right": { bottom: `${o}px`, right: `${s}px` }
1182
+ "top-left": { top: `${s}px`, left: `${t}px` },
1183
+ "top-right": { top: `${s}px`, right: `${t}px` },
1184
+ "bottom-left": { bottom: `${s}px`, left: `${t}px` },
1185
+ "bottom-right": { bottom: `${s}px`, right: `${t}px` }
1198
1186
  }[e.placement];
1199
1187
  });
1200
- return (s, o) => (n(), i("div", {
1188
+ return (t, s) => (l(), c("div", {
1201
1189
  class: "f-affix",
1202
- style: I(u(t))
1190
+ style: T(p(o))
1203
1191
  }, [
1204
- h(s.$slots, "default", {}, void 0, !0)
1192
+ v(t.$slots, "default", {}, void 0, !0)
1205
1193
  ], 4));
1206
1194
  }
1207
- }), Vo = /* @__PURE__ */ b(oo, [["__scopeId", "data-v-8506d679"]]), Ro = (r) => {
1208
- [
1209
- "FInput",
1210
- "FImage",
1211
- "FLoading",
1212
- "FIcon",
1213
- "FRate",
1214
- "FDropdown",
1215
- "FSelect",
1216
- "FPagination",
1217
- "FCard",
1218
- "FTag",
1219
- "FTooltip",
1220
- "FProgress",
1221
- "FTabs",
1222
- "FBreadcrumb",
1223
- "FCol",
1224
- "FRow",
1225
- "FSpace",
1226
- "FContainer",
1227
- "FDivider",
1228
- "FAvatar",
1229
- "FButton",
1230
- "FTypography",
1231
- "FText",
1232
- "FLink",
1233
- "FBadge",
1234
- "FAffix"
1235
- ].forEach((t) => {
1236
- r.component(t, Ce(() => Pe(/* @__PURE__ */ Object.assign({}), `./common/${t}.vue`, 3)));
1195
+ }), Io = /* @__PURE__ */ b(Mo, [["__scopeId", "data-v-8506d679"]]), To = /* @__PURE__ */ g({
1196
+ __name: "FForm",
1197
+ props: {
1198
+ model: {},
1199
+ rules: { default: () => ({}) },
1200
+ labelWidth: { default: "80px" },
1201
+ labelPosition: { default: "right" },
1202
+ size: { default: "normal" }
1203
+ },
1204
+ setup(n, { expose: e }) {
1205
+ const o = n, t = R([]), s = (a) => {
1206
+ t.value.push(a);
1207
+ }, i = (a) => {
1208
+ t.value = t.value.filter((f) => f.prop !== a);
1209
+ };
1210
+ return _e("FFormContext", {
1211
+ model: o.model,
1212
+ rules: o.rules,
1213
+ labelWidth: o.labelWidth,
1214
+ labelPosition: h(() => o.labelPosition),
1215
+ size: h(() => o.size),
1216
+ registerField: s,
1217
+ unregisterField: i
1218
+ }), e({
1219
+ validate: () => J(null, null, function* () {
1220
+ const a = t.value.map((d) => d.validate());
1221
+ if ((yield Promise.all(a)).filter((d) => d !== void 0).length > 0)
1222
+ throw new Error("表单校验失败");
1223
+ return !0;
1224
+ }),
1225
+ resetFields: () => {
1226
+ t.value.forEach((a) => a.clearValidate());
1227
+ }
1228
+ }), (a, f) => (l(), c("form", {
1229
+ class: C(["f-form", [
1230
+ `f-form--label-${a.labelPosition}`,
1231
+ `f-form--size-${a.size}`
1232
+ ]]),
1233
+ onSubmit: f[0] || (f[0] = se(() => {
1234
+ }, ["prevent"]))
1235
+ }, [
1236
+ v(a.$slots, "default", {}, void 0, !0)
1237
+ ], 34));
1238
+ }
1239
+ }), Bo = /* @__PURE__ */ b(To, [["__scopeId", "data-v-21f7de9b"]]), Vo = (n, e) => J(null, null, function* () {
1240
+ const o = Array.isArray(e) ? e : [e];
1241
+ for (let t of o) {
1242
+ t.transform && (n = t.transform(n));
1243
+ const s = n == null || n === "", i = t.whitespace && typeof n == "string" && n.trim() === "";
1244
+ if (t.required && (s || i))
1245
+ return t.message || "此字段为必填项";
1246
+ if (!t.required && s) continue;
1247
+ if (t.type) {
1248
+ const r = Ro(n, t);
1249
+ if (r) return r;
1250
+ }
1251
+ const u = Ao(n, t);
1252
+ if (u) return u;
1253
+ if (t.pattern && !t.pattern.test(String(n)))
1254
+ return t.message || "格式不匹配";
1255
+ if (t.enum && !t.enum.includes(n))
1256
+ return t.message || "不在指定的枚举范围内";
1257
+ if (t.validator) {
1258
+ const r = yield Promise.resolve(t.validator(n, t));
1259
+ if (typeof r == "string") return r;
1260
+ if (r === !1) return t.message || "校验失败";
1261
+ }
1262
+ }
1263
+ }), Ro = (n, e) => {
1264
+ const { type: o, message: t } = e;
1265
+ switch (o) {
1266
+ case "string":
1267
+ if (typeof n != "string") return t || "必须是字符串";
1268
+ break;
1269
+ case "number":
1270
+ if (typeof n != "number" || isNaN(n)) return t || "必须是数字";
1271
+ break;
1272
+ case "integer":
1273
+ if (!Number.isInteger(n)) return t || "必须是整数";
1274
+ break;
1275
+ case "boolean":
1276
+ if (typeof n != "boolean") return t || "必须是布尔值";
1277
+ break;
1278
+ case "array":
1279
+ if (!Array.isArray(n)) return t || "必须是数组";
1280
+ break;
1281
+ case "object":
1282
+ if (typeof n != "object" || n === null) return t || "必须是对象";
1283
+ break;
1284
+ case "email":
1285
+ if (!/^[^\s@]+@([^\s@]+\.)+[^\s@]+$/.test(n)) return t || "邮箱格式不正确";
1286
+ break;
1287
+ case "regexp":
1288
+ if (e.pattern && !e.pattern.test(String(n)))
1289
+ return e.message || "格式不匹配";
1290
+ break;
1291
+ }
1292
+ }, Ao = (n, e) => {
1293
+ const { min: o, max: t, len: s, message: i, type: u } = e, r = u === "number" || u === "integer" || u === "float", a = r && typeof n == "number" ? n : n == null ? void 0 : n.length;
1294
+ if (a !== void 0) {
1295
+ if (s !== void 0 && a !== s)
1296
+ return i || (r ? `值必须等于 ${s}` : `长度必须为 ${s}`);
1297
+ if (o !== void 0 && a < o)
1298
+ return i || (r ? `最小值不能小于 ${o}` : `长度不能小于 ${o}`);
1299
+ if (t !== void 0 && a > t)
1300
+ return i || (r ? `最大值不能大于 ${t}` : `长度不能大于 ${t}`);
1301
+ }
1302
+ }, Po = {
1303
+ key: 0,
1304
+ class: "star"
1305
+ }, Wo = { class: "f-form-item__content" }, jo = {
1306
+ key: 0,
1307
+ class: "f-form-item__error"
1308
+ }, Do = /* @__PURE__ */ g({
1309
+ __name: "FFormItem",
1310
+ props: {
1311
+ label: {},
1312
+ prop: {}
1313
+ },
1314
+ setup(n, { expose: e }) {
1315
+ const o = n, t = Ce("FFormContext"), s = R(""), i = h(() => {
1316
+ var d;
1317
+ return ((d = t == null ? void 0 : t.labelPosition) == null ? void 0 : d.value) || "right";
1318
+ }), u = h(() => {
1319
+ var d;
1320
+ return ((d = t == null ? void 0 : t.size) == null ? void 0 : d.value) || "default";
1321
+ }), r = h(() => {
1322
+ if (!(t != null && t.rules) || !o.prop) return [];
1323
+ const d = t.rules[o.prop] || [];
1324
+ return Array.isArray(d) ? d : [d];
1325
+ }), a = h(() => r.value.some((d) => d.required)), f = () => J(null, null, function* () {
1326
+ if (!o.prop || !t) return;
1327
+ const d = t.model[o.prop], k = yield Vo(d, r.value);
1328
+ return s.value = k || "", k;
1329
+ }), m = () => {
1330
+ s.value = "";
1331
+ };
1332
+ return _e("FFormItemContext", { errorMsg: s, validate: f }), xe(() => {
1333
+ o.prop && (t != null && t.registerField) && t.registerField({ prop: o.prop, validate: f, clearValidate: m });
1334
+ }), oe(() => {
1335
+ o.prop && (t != null && t.unregisterField) && t.unregisterField(o.prop);
1336
+ }), ee(() => t == null ? void 0 : t.model[o.prop], () => {
1337
+ s.value && f();
1338
+ }), e({ validate: f, clearValidate: m }), (d, k) => {
1339
+ var x;
1340
+ return l(), c("div", {
1341
+ class: C(["f-form-item", [
1342
+ `is-label-${p(i)}`,
1343
+ `is-size-${p(u)}`,
1344
+ { "is-error": p(s) }
1345
+ ]])
1346
+ }, [
1347
+ d.label ? (l(), c("label", {
1348
+ key: 0,
1349
+ class: "f-form-item__label",
1350
+ style: T({
1351
+ width: p(i) === "top" ? "100%" : (x = p(t)) == null ? void 0 : x.labelWidth,
1352
+ textAlign: p(i) === "top" ? "left" : p(i)
1353
+ })
1354
+ }, [
1355
+ p(a) ? (l(), c("span", Po, "*")) : y("", !0),
1356
+ me(" " + V(d.label) + ": ", 1)
1357
+ ], 4)) : y("", !0),
1358
+ z("div", Wo, [
1359
+ v(d.$slots, "default", {}, void 0, !0),
1360
+ S(K, { name: "err-slide" }, {
1361
+ default: I(() => [
1362
+ p(s) ? (l(), c("p", jo, V(p(s)), 1)) : y("", !0)
1363
+ ]),
1364
+ _: 1
1365
+ })
1366
+ ])
1367
+ ], 2);
1368
+ };
1369
+ }
1370
+ }), Eo = /* @__PURE__ */ b(Do, [["__scopeId", "data-v-c3d6ec01"]]), Lo = { class: "f-checkbox__wrapper" }, Oo = ["checked", "disabled"], Ho = {
1371
+ key: 0,
1372
+ class: "f-checkbox__label"
1373
+ }, No = /* @__PURE__ */ g({
1374
+ __name: "FCheckbox",
1375
+ props: /* @__PURE__ */ H({
1376
+ label: {},
1377
+ disabled: { type: Boolean }
1378
+ }, {
1379
+ modelValue: { type: Boolean, default: !1 },
1380
+ modelModifiers: {}
1381
+ }),
1382
+ emits: ["update:modelValue"],
1383
+ setup(n) {
1384
+ const e = Q(n, "modelValue"), o = n, t = (s) => {
1385
+ if (o.disabled) return;
1386
+ const i = s.target;
1387
+ e.value = i.checked;
1388
+ };
1389
+ return (s, i) => (l(), c("label", {
1390
+ class: C(["f-checkbox", { "is-disabled": s.disabled }])
1391
+ }, [
1392
+ z("span", Lo, [
1393
+ z("input", {
1394
+ type: "checkbox",
1395
+ checked: e.value,
1396
+ disabled: s.disabled,
1397
+ onChange: t
1398
+ }, null, 40, Oo),
1399
+ i[0] || (i[0] = z("span", { class: "f-checkbox__checkmark" }, null, -1))
1400
+ ]),
1401
+ s.label ? (l(), c("span", Ho, V(s.label), 1)) : y("", !0)
1402
+ ], 2));
1403
+ }
1404
+ }), qo = /* @__PURE__ */ b(No, [["__scopeId", "data-v-633b283a"]]), Go = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1405
+ __proto__: null,
1406
+ FAffix: Io,
1407
+ FAvatar: _o,
1408
+ FBadge: So,
1409
+ FBreadcrumb: Zt,
1410
+ FButton: go,
1411
+ FCard: Vt,
1412
+ FCheckbox: qo,
1413
+ FCol: to,
1414
+ FContainer: co,
1415
+ FDivider: po,
1416
+ FDropdown: pt,
1417
+ FForm: Bo,
1418
+ FFormItem: Eo,
1419
+ FIcon: Le,
1420
+ FImage: Xe,
1421
+ FInput: Ke,
1422
+ FLink: zo,
1423
+ FLoading: tt,
1424
+ FPagination: yt,
1425
+ FProgress: Ot,
1426
+ FRate: nt,
1427
+ FRow: so,
1428
+ FSelect: mt,
1429
+ FSpace: ro,
1430
+ FTabs: Xt,
1431
+ FTag: Pt,
1432
+ FText: ko,
1433
+ FTooltip: jt,
1434
+ FTypography: yo
1435
+ }, Symbol.toStringTag, { value: "Module" })), Ko = (n) => {
1436
+ Object.entries(Go).forEach(([e, o]) => {
1437
+ n.component(e, o);
1237
1438
  });
1238
1439
  };
1239
1440
  export {
1240
- Vo as FAffix,
1241
- xo as FAvatar,
1242
- Io as FBadge,
1243
- $o as FBreadcrumb,
1244
- To as FButton,
1245
- vo as FCard,
1246
- wo as FCol,
1247
- Co as FContainer,
1248
- zo as FDivider,
1249
- po as FDropdown,
1250
- ro as FIcon,
1251
- io as FImage,
1252
- co as FInput,
1253
- Bo as FLink,
1254
- uo as FLoading,
1255
- _o as FPagination,
1256
- yo as FProgress,
1257
- fo as FRate,
1258
- ko as FRow,
1259
- mo as FSelect,
1260
- Fo as FSpace,
1261
- bo as FTabs,
1262
- ho as FTag,
1263
- Mo as FText,
1264
- go as FTooltip,
1265
- So as FTypography,
1266
- Ro as install
1441
+ Io as FAffix,
1442
+ _o as FAvatar,
1443
+ So as FBadge,
1444
+ Zt as FBreadcrumb,
1445
+ go as FButton,
1446
+ Vt as FCard,
1447
+ qo as FCheckbox,
1448
+ to as FCol,
1449
+ co as FContainer,
1450
+ po as FDivider,
1451
+ pt as FDropdown,
1452
+ Bo as FForm,
1453
+ Eo as FFormItem,
1454
+ Le as FIcon,
1455
+ Xe as FImage,
1456
+ Ke as FInput,
1457
+ zo as FLink,
1458
+ tt as FLoading,
1459
+ yt as FPagination,
1460
+ Ot as FProgress,
1461
+ nt as FRate,
1462
+ so as FRow,
1463
+ mt as FSelect,
1464
+ ro as FSpace,
1465
+ Xt as FTabs,
1466
+ Pt as FTag,
1467
+ ko as FText,
1468
+ jt as FTooltip,
1469
+ yo as FTypography,
1470
+ Ko as default
1267
1471
  };