@cregis/ui 0.2.14 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
- import { defineComponent as te, useSlots as ur, ref as q, computed as h, createElementBlock as k, openBlock as y, normalizeClass as F, createElementVNode as z, createCommentVNode as X, mergeProps as be, createBlock as Ce, resolveDynamicComponent as Ft, normalizeStyle as de, renderSlot as K, toDisplayString as H, unref as ie, watch as ee, withDirectives as je, vModelDynamic as dr, withModifiers as fr, vModelText as pr, createVNode as Z, withCtx as re, createTextVNode as $e, nextTick as Ke, reactive as Se, provide as Ht, toRef as vr, Fragment as ct, renderList as ut, inject as qt, onMounted as et, onUnmounted as De, onBeforeUnmount as Ut, Transition as mt, render as Qe, h as Yt, toHandlers as it, Teleport as mr, vShow as gt } from "vue";
2
- import { EdsLoad as gr, EdsCloseCircleFill as hr, EdsWarningFill as br, EdsSearch as Xt, EdsArrowDownMiniIos as Kt, EdsArrowRightMiniIos as yr } from "@cregis/icon";
3
- const xr = ["disabled"], wr = ["disabled"], Or = ["disabled"], Ye = /* @__PURE__ */ te({
1
+ import { defineComponent as Q, useSlots as ya, ref as F, computed as v, createElementBlock as y, openBlock as p, normalizeClass as W, createElementVNode as A, createCommentVNode as j, mergeProps as we, createBlock as pe, resolveDynamicComponent as Gt, normalizeStyle as ne, renderSlot as G, toDisplayString as M, unref as Z, watch as J, withDirectives as _e, vModelDynamic as wa, withModifiers as bt, vModelText as xa, createVNode as K, withCtx as ee, createTextVNode as ve, nextTick as Fe, reactive as Ve, provide as Qt, toRef as ka, Fragment as ft, renderList as pt, inject as Zt, onMounted as at, onUnmounted as xe, onBeforeUnmount as Jt, Transition as nt, render as Ee, h as yt, toHandlers as st, Teleport as ea, vShow as wt } from "vue";
2
+ import { EdsLoad as $a, EdsCloseCircleFill as Oa, EdsTickFill as Ca, EdsWarningFill as Sa, EdsSearch as ta, EdsArrowDownMiniIos as aa, EdsArrowRightMiniIos as Ta, EdsAdd as Rt, EdsClose as Va, EdsWarningLonely as Ba } from "@cregis/icon";
3
+ const Ea = ["disabled"], Aa = ["disabled"], Da = ["disabled"], Be = /* @__PURE__ */ Q({
4
4
  name: "Button",
5
5
  inheritAttrs: !1,
6
6
  __name: "Button",
@@ -21,64 +21,64 @@ const xr = ["disabled"], wr = ["disabled"], Or = ["disabled"], Ye = /* @__PURE__
21
21
  isActive: { type: Boolean }
22
22
  },
23
23
  setup(e) {
24
- const t = e, r = ur(), n = q(null);
25
- function a() {
26
- t.disabled || t.loading || n.value?.click();
24
+ const a = e, t = ya(), r = F(null);
25
+ function n() {
26
+ a.disabled || a.loading || r.value?.click();
27
27
  }
28
- const o = h(() => {
29
- const c = t, $ = r.icon;
30
- return !c.icon && typeof $ == "function";
31
- }), s = h(() => t.size === "large" ? "20px" : t.size === "medium" ? "16px" : "12px"), i = h(() => t.size === "large" || t.size === "medium" ? "16px" : "12px"), l = h(() => t.width ? { width: t.width } : void 0), d = h(() => {
32
- if (t.plain || t.text)
33
- switch (t.type) {
28
+ const i = v(() => {
29
+ const c = a, w = t.icon;
30
+ return !c.icon && typeof w == "function";
31
+ }), l = v(() => a.size === "large" ? "20px" : a.size === "medium" ? "16px" : "12px"), o = v(() => a.size === "large" || a.size === "medium" ? "16px" : "12px"), s = v(() => a.width ? { width: a.width } : void 0), d = v(() => {
32
+ if (a.plain || a.text)
33
+ switch (a.type) {
34
34
  case "primary":
35
- return "var(--material-vibrant-brand-primary)";
35
+ return "var(--material-brand-primary)";
36
36
  case "secondary":
37
- return "var(--material-foreground-base-secondary)";
37
+ return "var(--material-base-secondary)";
38
38
  case "danger":
39
- return "var(--material-vibrant-error-primary)";
39
+ return "var(--material-danger-primary)";
40
40
  case "foreground":
41
- return "var(--material-foreground-base-primary)";
41
+ return "var(--material-base-primary)";
42
42
  case "sameWhite":
43
43
  return "var(--material-same-black)";
44
44
  }
45
45
  else
46
- return t.type === "secondary" ? "var(--material-foreground-base-secondary)" : t.type === "foreground" ? "var(--text-face-primary)" : t.type === "sameWhite" ? "var(--text-same-black)" : "var(--material-same-white)";
46
+ return a.type === "secondary" ? "var(--material-base-secondary)" : a.type === "foreground" ? "var(--text-face-primary)" : a.type === "sameWhite" ? "var(--text-same-black-primary)" : "var(--material-same-white-primary)";
47
47
  });
48
- return (c, $) => e.icon || c.$slots.icon ? (y(), k("div", {
48
+ return (c, w) => e.icon || c.$slots.icon ? (p(), y("div", {
49
49
  key: 0,
50
- class: F(["cregis-button__icon-wrapper", { "cregis-button__icon-wrapper--professional": e.iconType === "professional" }])
50
+ class: W(["cregis-button__icon-wrapper", { "cregis-button__icon-wrapper--professional": e.iconType === "professional" }])
51
51
  }, [
52
- z("button", be({
52
+ A("button", we({
53
53
  ref_key: "iconButtonRef",
54
- ref: n
54
+ ref: r
55
55
  }, c.$attrs, {
56
56
  class: ["cregis-button__icon", {
57
57
  [`cregis-button__icon--${e.iconType}`]: e.iconType,
58
58
  [`cregis-button__icon--${e.size}`]: e.size,
59
- "cregis-button__icon--slot": o.value,
59
+ "cregis-button__icon--slot": i.value,
60
60
  "is-disabled": e.disabled,
61
61
  "is-active": e.isActive
62
62
  }],
63
63
  disabled: e.disabled || e.loading
64
64
  }), [
65
- e.icon ? (y(), Ce(Ft(e.icon), {
65
+ e.icon ? (p(), pe(Gt(e.icon), {
66
66
  key: 0,
67
- size: s.value
68
- }, null, 8, ["size"])) : (y(), k("span", {
67
+ size: l.value
68
+ }, null, 8, ["size"])) : (p(), y("span", {
69
69
  key: 1,
70
70
  class: "cregis-button__icon-slot-inner",
71
- style: de({ "--cregis-btn-icon-slot-size": s.value })
71
+ style: ne({ "--cregis-btn-icon-slot-size": l.value })
72
72
  }, [
73
- K(c.$slots, "icon")
73
+ G(c.$slots, "icon")
74
74
  ], 4))
75
- ], 16, xr),
76
- e.iconText ? (y(), k("span", {
75
+ ], 16, Ea),
76
+ e.iconText ? (p(), y("span", {
77
77
  key: 0,
78
- class: F(["cregis-button__icon-text", { "is-disabled": e.disabled }]),
79
- onClick: a
80
- }, H(e.iconText), 3)) : X("", !0)
81
- ], 2)) : e.link ? (y(), k("button", be({ key: 1 }, c.$attrs, {
78
+ class: W(["cregis-button__icon-text", { "is-disabled": e.disabled }]),
79
+ onClick: n
80
+ }, M(e.iconText), 3)) : j("", !0)
81
+ ], 2)) : e.link ? (p(), y("button", we({ key: 1 }, c.$attrs, {
82
82
  class: ["cregis-button__link", {
83
83
  [`cregis-button__link--${e.type}`]: e.type,
84
84
  [`cregis-button__link--${e.size}`]: e.size,
@@ -87,12 +87,12 @@ const xr = ["disabled"], wr = ["disabled"], Or = ["disabled"], Ye = /* @__PURE__
87
87
  }],
88
88
  disabled: e.disabled || e.loading
89
89
  }), [
90
- K(c.$slots, "default")
91
- ], 16, wr)) : (y(), k("button", be({
90
+ G(c.$slots, "default")
91
+ ], 16, Aa)) : (p(), y("button", we({
92
92
  key: 2,
93
93
  ref: "buttonRef"
94
94
  }, c.$attrs, {
95
- style: l.value,
95
+ style: s.value,
96
96
  class: ["cregis-button", {
97
97
  [`cregis-button--${e.type}`]: e.type,
98
98
  [`cregis-button--${e.size}`]: e.size,
@@ -106,24 +106,24 @@ const xr = ["disabled"], wr = ["disabled"], Or = ["disabled"], Ye = /* @__PURE__
106
106
  }],
107
107
  disabled: e.disabled || e.loading
108
108
  }), [
109
- e.loading ? (y(), Ce(ie(gr), {
109
+ e.loading ? (p(), pe(Z($a), {
110
110
  key: 0,
111
111
  class: "loading",
112
- size: i.value,
112
+ size: o.value,
113
113
  color: d.value
114
- }, null, 8, ["size", "color"])) : K(c.$slots, "default", { key: 1 })
115
- ], 16, Or));
114
+ }, null, 8, ["size", "color"])) : G(c.$slots, "default", { key: 1 })
115
+ ], 16, Da));
116
116
  }
117
- }), $r = {
117
+ }), Pa = {
118
118
  key: 0,
119
119
  class: "cregis-input__prefix"
120
- }, kr = ["type", "inputmode", "placeholder", "min", "disabled"], Tr = {
120
+ }, za = ["type", "inputmode", "placeholder", "min", "disabled"], Ra = {
121
121
  key: 2,
122
122
  class: "cregis-input__suffix"
123
- }, Sr = ["disabled", "placeholder", "rows"], Cr = {
123
+ }, La = ["disabled", "placeholder", "rows"], Wa = {
124
124
  key: 0,
125
125
  class: "cregis-textarea__buttons"
126
- }, Qt = /* @__PURE__ */ te({
126
+ }, na = /* @__PURE__ */ Q({
127
127
  name: "Input",
128
128
  inheritAttrs: !1,
129
129
  __name: "Input",
@@ -144,234 +144,234 @@ const xr = ["disabled"], wr = ["disabled"], Or = ["disabled"], Ye = /* @__PURE__
144
144
  clearText: { default: "Clear" }
145
145
  },
146
146
  emits: ["update:modelValue", "input", "change", "focus", "blur", "clear"],
147
- setup(e, { expose: t, emit: r }) {
148
- const n = e, a = r, o = (u) => {
147
+ setup(e, { expose: a, emit: t }) {
148
+ const r = e, n = t, i = (u) => {
149
149
  if (u === "" || u === null || u === void 0) return "";
150
- const v = String(u).trim();
151
- if (v === "") return "";
152
- const B = Number(v.replace(/,/g, ""));
153
- if (!Number.isNaN(B) && B < 0) return Math.abs(B);
154
- if (/^-/.test(v)) {
155
- const I = v.replace(/^-+/, "");
156
- return I === "" ? "" : I;
150
+ const b = String(u).trim();
151
+ if (b === "") return "";
152
+ const z = Number(b.replace(/,/g, ""));
153
+ if (!Number.isNaN(z) && z < 0) return Math.abs(z);
154
+ if (/^-/.test(b)) {
155
+ const q = b.replace(/^-+/, "");
156
+ return q === "" ? "" : q;
157
157
  }
158
158
  return u;
159
- }, s = h(() => {
160
- const u = n.decimals;
159
+ }, l = v(() => {
160
+ const u = r.decimals;
161
161
  return u === void 0 || !Number.isFinite(u) ? null : Math.max(0, Math.floor(u));
162
- }), i = h(
163
- () => n.type === "number" && s.value !== null
164
- ), l = h(
165
- () => i.value ? "text" : n.type
166
- ), d = h(() => i.value ? "decimal" : void 0), c = (u) => u.replace(/[,,。.]/g, "."), $ = (u) => {
162
+ }), o = v(
163
+ () => r.type === "number" && l.value !== null
164
+ ), s = v(
165
+ () => o.value ? "text" : r.type
166
+ ), d = v(() => o.value ? "decimal" : void 0), c = (u) => u.replace(/[,,。.]/g, "."), w = (u) => {
167
167
  if (u === "" || u === null || u === void 0) return "";
168
- let v = c(String(u).trim());
169
- if (v === "") return "";
170
- let B = !1;
171
- !n.nonNegative && v.startsWith("-") && (B = !0, v = v.slice(1)), v = v.replace(/[^\d.]/g, "");
172
- const I = v.indexOf(".");
173
- return I !== -1 && (v = v.slice(0, I + 1) + v.slice(I + 1).replace(/\./g, "")), (B ? "-" : "") + v;
174
- }, P = (u) => {
175
- const v = s.value;
176
- if (v === null) return u;
168
+ let b = c(String(u).trim());
169
+ if (b === "") return "";
170
+ let z = !1;
171
+ !r.nonNegative && b.startsWith("-") && (z = !0, b = b.slice(1)), b = b.replace(/[^\d.]/g, "");
172
+ const q = b.indexOf(".");
173
+ return q !== -1 && (b = b.slice(0, q + 1) + b.slice(q + 1).replace(/\./g, "")), (z ? "-" : "") + b;
174
+ }, $ = (u) => {
175
+ const b = l.value;
176
+ if (b === null) return u;
177
177
  if (u === "" || u === null || u === void 0) return "";
178
- const B = String(u).trim();
179
- if (B === "") return "";
180
- const I = B.startsWith("-");
181
- let g = I ? B.slice(1) : B;
182
- const _ = g.indexOf(".");
183
- if (_ === -1) return u;
184
- const Y = g.slice(0, _), G = g.slice(_ + 1);
185
- return v === 0 ? (I ? "-" : "") + Y : G.length <= v ? u : (I ? "-" : "") + Y + "." + G.slice(0, v);
178
+ const z = String(u).trim();
179
+ if (z === "") return "";
180
+ const q = z.startsWith("-");
181
+ let re = q ? z.slice(1) : z;
182
+ const h = re.indexOf(".");
183
+ if (h === -1) return u;
184
+ const H = re.slice(0, h), Y = re.slice(h + 1);
185
+ return b === 0 ? (q ? "-" : "") + H : Y.length <= b ? u : (q ? "-" : "") + H + "." + Y.slice(0, b);
186
186
  }, m = (u) => {
187
- let v = u;
188
- return i.value && (v = $(v)), n.nonNegative && (v = o(v)), s.value !== null && (v = P(v)), v;
189
- }, b = q(
190
- n.type === "number" ? m(n.modelValue) : n.modelValue
187
+ let b = u;
188
+ return o.value && (b = w(b)), r.nonNegative && (b = i(b)), l.value !== null && (b = $(b)), b;
189
+ }, k = F(
190
+ r.type === "number" ? m(r.modelValue) : r.modelValue
191
191
  );
192
- ee(
193
- () => n.modelValue,
192
+ J(
193
+ () => r.modelValue,
194
194
  (u) => {
195
- b.value = n.type === "number" ? m(u) : u;
195
+ k.value = r.type === "number" ? m(u) : u;
196
196
  }
197
197
  );
198
- const w = q(), T = q(0), V = q(!1);
199
- let R = null;
200
- const L = async () => {
201
- await Ke(), w.value?.focus();
202
- }, O = async () => {
203
- if (n.type === "number") {
204
- const u = m(b.value);
205
- u !== b.value && (b.value = u);
198
+ const O = F(), V = F(0), x = F(!1);
199
+ let B = null;
200
+ const R = async () => {
201
+ await Fe(), O.value?.focus();
202
+ }, C = async () => {
203
+ if (r.type === "number") {
204
+ const u = m(k.value);
205
+ u !== k.value && (k.value = u);
206
206
  }
207
- a("update:modelValue", b.value), a("input", b.value), await Ke(), M();
208
- }, S = () => {
209
- a("change", b.value);
207
+ n("update:modelValue", k.value), n("input", k.value), await Fe(), I();
208
+ }, E = () => {
209
+ n("change", k.value);
210
210
  }, f = (u) => {
211
- V.value = !0, a("focus", u);
212
- }, E = (u) => {
213
- V.value = !1, a("blur", u);
214
- }, D = h(() => n.clearable && !n.disabled && !!b.value && V.value), W = () => {
215
- b.value = "", a("update:modelValue", ""), a("clear"), a("input", ""), a("change", "");
216
- }, M = () => {
217
- R && cancelAnimationFrame(R), R = requestAnimationFrame(() => {
218
- if (!w.value || w.value.tagName !== "INPUT") return;
219
- const u = w.value, v = u.value, B = document.createElement("span");
220
- B.style.position = "absolute", B.style.visibility = "hidden", B.style.whiteSpace = "pre", B.style.font = window.getComputedStyle(u).font, B.style.letterSpacing = window.getComputedStyle(u).letterSpacing, B.textContent = v || " ", document.body.appendChild(B), T.value = B.getBoundingClientRect().width, document.body.removeChild(B);
211
+ x.value = !0, n("focus", u);
212
+ }, S = (u) => {
213
+ x.value = !1, n("blur", u);
214
+ }, P = v(() => r.clearable && !r.disabled && !!k.value && x.value), N = () => {
215
+ k.value = "", n("update:modelValue", ""), n("clear"), n("input", ""), n("change", "");
216
+ }, I = () => {
217
+ B && cancelAnimationFrame(B), B = requestAnimationFrame(() => {
218
+ if (!O.value || O.value.tagName !== "INPUT") return;
219
+ const u = O.value, b = u.value, z = document.createElement("span");
220
+ z.style.position = "absolute", z.style.visibility = "hidden", z.style.whiteSpace = "pre", z.style.font = window.getComputedStyle(u).font, z.style.letterSpacing = window.getComputedStyle(u).letterSpacing, z.textContent = b || " ", document.body.appendChild(z), V.value = z.getBoundingClientRect().width, document.body.removeChild(z);
221
221
  });
222
- }, j = h(() => {
222
+ }, _ = v(() => {
223
223
  const u = {};
224
- return T.value > 0 && (u.position = "absolute", u.left = `${T.value + 16}px`), u;
225
- }), x = async () => {
224
+ return V.value > 0 && (u.position = "absolute", u.left = `${V.value + 16}px`), u;
225
+ }), T = async () => {
226
226
  try {
227
- b.value = await navigator.clipboard.readText(), a("update:modelValue", b.value);
227
+ k.value = await navigator.clipboard.readText(), n("update:modelValue", k.value);
228
228
  } catch (u) {
229
229
  console.error("paste error:", u);
230
230
  }
231
- }, C = h(
232
- () => n.type === "number" && n.nonNegative ? 0 : void 0
233
- ), U = (u) => u === "." || u === "," || u === "," || u === "。" || u === "." || u === "Decimal", Q = (u) => {
234
- if (n.type !== "number" || u.isComposing) return;
235
- const v = s.value;
236
- if ((n.nonNegative || v !== null) && (u.key === "e" || u.key === "E")) {
231
+ }, D = v(
232
+ () => r.type === "number" && r.nonNegative ? 0 : void 0
233
+ ), X = (u) => u === "." || u === "," || u === "," || u === "。" || u === "." || u === "Decimal", te = (u) => {
234
+ if (r.type !== "number" || u.isComposing) return;
235
+ const b = l.value;
236
+ if ((r.nonNegative || b !== null) && (u.key === "e" || u.key === "E")) {
237
237
  u.preventDefault();
238
238
  return;
239
239
  }
240
- if (n.nonNegative && (u.key === "-" || u.key === "+")) {
240
+ if (r.nonNegative && (u.key === "-" || u.key === "+")) {
241
241
  u.preventDefault();
242
242
  return;
243
243
  }
244
- if (v === 0 && U(u.key)) {
244
+ if (b === 0 && X(u.key)) {
245
245
  u.preventDefault();
246
246
  return;
247
247
  }
248
- if (v !== null && v > 0 && U(u.key)) {
249
- const B = u.target;
250
- c(B.value).includes(".") && u.preventDefault();
248
+ if (b !== null && b > 0 && X(u.key)) {
249
+ const z = u.target;
250
+ c(z.value).includes(".") && u.preventDefault();
251
251
  return;
252
252
  }
253
- if (v !== null && v > 0 && u.key !== "." && /^\d$/.test(u.key)) {
254
- const B = u.target, I = c(B.value), g = B.selectionStart, _ = B.selectionEnd;
255
- if (g === null || _ === null) return;
256
- const Y = I.slice(0, g) + u.key + I.slice(_), G = Y.indexOf(".");
257
- G !== -1 && Y.slice(G + 1).replace(/\D/g, "").length > v && u.preventDefault();
253
+ if (b !== null && b > 0 && u.key !== "." && /^\d$/.test(u.key)) {
254
+ const z = u.target, q = c(z.value), re = z.selectionStart, h = z.selectionEnd;
255
+ if (re === null || h === null) return;
256
+ const H = q.slice(0, re) + u.key + q.slice(h), Y = H.indexOf(".");
257
+ Y !== -1 && H.slice(Y + 1).replace(/\D/g, "").length > b && u.preventDefault();
258
258
  }
259
259
  };
260
- return t({
261
- focus: L,
262
- updateTextWidth: M
263
- }), (u, v) => e.type !== "textarea" ? (y(), k("div", {
260
+ return a({
261
+ focus: R,
262
+ updateTextWidth: I
263
+ }), (u, b) => e.type !== "textarea" ? (p(), y("div", {
264
264
  key: 0,
265
- class: F(["cregis-input", {
265
+ class: W(["cregis-input", {
266
266
  [`cregis-input--${e.size}`]: e.size,
267
267
  "is-disabled": e.disabled,
268
268
  "is-prefix": u.$slots.prefix,
269
269
  "is-suffix": u.$slots.suffix
270
270
  }]),
271
- style: de([{ width: e.width }, e.inputStyle])
271
+ style: ne([{ width: e.width }, e.inputStyle])
272
272
  }, [
273
- z("div", {
274
- class: F(["cregis-input__wrapper", { "is-focus": V.value }])
273
+ A("div", {
274
+ class: W(["cregis-input__wrapper", { "is-focus": x.value }])
275
275
  }, [
276
- u.$slots.prefix ? (y(), k("span", $r, [
277
- K(u.$slots, "prefix")
278
- ])) : X("", !0),
279
- je(z("input", be({
276
+ u.$slots.prefix ? (p(), y("span", Pa, [
277
+ G(u.$slots, "prefix")
278
+ ])) : j("", !0),
279
+ _e(A("input", we({
280
280
  class: "cregis-input__inner",
281
- "onUpdate:modelValue": v[0] || (v[0] = (B) => b.value = B),
281
+ "onUpdate:modelValue": b[0] || (b[0] = (z) => k.value = z),
282
282
  ref_key: "inputRef",
283
- ref: w,
284
- type: l.value,
283
+ ref: O,
284
+ type: s.value,
285
285
  inputmode: d.value,
286
286
  placeholder: e.placeholder
287
287
  }, u.$attrs, {
288
- min: C.value,
288
+ min: D.value,
289
289
  spellcheck: "false",
290
290
  disabled: e.disabled,
291
- onInput: O,
292
- onChange: S,
291
+ onInput: C,
292
+ onChange: E,
293
293
  onFocus: f,
294
- onBlur: E,
295
- onKeydown: Q
296
- }), null, 16, kr), [
297
- [dr, b.value]
294
+ onBlur: S,
295
+ onKeydown: te
296
+ }), null, 16, za), [
297
+ [wa, k.value]
298
298
  ]),
299
- e.unit && b.value ? (y(), k("span", {
299
+ e.unit && k.value ? (p(), y("span", {
300
300
  key: 1,
301
- style: de(j.value),
301
+ style: ne(_.value),
302
302
  class: "cregis-input__unit"
303
- }, H(e.unit), 5)) : X("", !0),
304
- u.$slots.suffix || D.value ? (y(), k("span", Tr, [
305
- K(u.$slots, "suffix"),
306
- D.value ? (y(), Ce(Ye, {
303
+ }, M(e.unit), 5)) : j("", !0),
304
+ u.$slots.suffix || P.value ? (p(), y("span", Ra, [
305
+ G(u.$slots, "suffix"),
306
+ P.value ? (p(), pe(Be, {
307
307
  key: 0,
308
- icon: ie(hr),
308
+ icon: Z(Oa),
309
309
  "icon-type": "square",
310
- onClick: W,
311
- onMousedown: v[1] || (v[1] = fr(() => {
310
+ onClick: N,
311
+ onMousedown: b[1] || (b[1] = bt(() => {
312
312
  }, ["prevent"]))
313
- }, null, 8, ["icon"])) : X("", !0)
314
- ])) : X("", !0)
313
+ }, null, 8, ["icon"])) : j("", !0)
314
+ ])) : j("", !0)
315
315
  ], 2)
316
- ], 6)) : (y(), k("div", {
316
+ ], 6)) : (p(), y("div", {
317
317
  key: 1,
318
- class: F(["cregis-textarea", { "is-disabled": e.disabled }]),
319
- style: de([{ width: e.width }, e.inputStyle])
318
+ class: W(["cregis-textarea", { "is-disabled": e.disabled }]),
319
+ style: ne([{ width: e.width }, e.inputStyle])
320
320
  }, [
321
- je(z("textarea", be({ class: "cregis-textarea__wrapper" }, u.$attrs, {
321
+ _e(A("textarea", we({ class: "cregis-textarea__wrapper" }, u.$attrs, {
322
322
  spellcheck: "false",
323
323
  ref_key: "inputRef",
324
- ref: w,
324
+ ref: O,
325
325
  disabled: e.disabled,
326
326
  placeholder: e.placeholder,
327
327
  rows: e.rows,
328
- "onUpdate:modelValue": v[2] || (v[2] = (B) => b.value = B),
329
- onInput: O,
330
- onChange: S,
328
+ "onUpdate:modelValue": b[2] || (b[2] = (z) => k.value = z),
329
+ onInput: C,
330
+ onChange: E,
331
331
  onFocus: f,
332
- onBlur: E
333
- }), null, 16, Sr), [
334
- [pr, b.value]
332
+ onBlur: S
333
+ }), null, 16, La), [
334
+ [xa, k.value]
335
335
  ]),
336
- e.disabled ? X("", !0) : (y(), k("div", Cr, [
337
- Z(Ye, {
336
+ e.disabled ? j("", !0) : (p(), y("div", Wa, [
337
+ K(Be, {
338
338
  class: "cregis-textarea__button",
339
339
  link: "",
340
340
  size: "small",
341
- onClick: x
341
+ onClick: T
342
342
  }, {
343
- default: re(() => [
344
- $e(H(e.pasteText), 1)
343
+ default: ee(() => [
344
+ ve(M(e.pasteText), 1)
345
345
  ]),
346
346
  _: 1
347
347
  }),
348
- Z(Ye, {
348
+ K(Be, {
349
349
  class: "cregis-textarea__button",
350
350
  link: "",
351
351
  size: "small",
352
- disabled: !b.value,
353
- onClick: W
352
+ disabled: !k.value,
353
+ onClick: N
354
354
  }, {
355
- default: re(() => [
356
- $e(H(e.clearText), 1)
355
+ default: ee(() => [
356
+ ve(M(e.clearText), 1)
357
357
  ]),
358
358
  _: 1
359
359
  }, 8, ["disabled"])
360
360
  ]))
361
361
  ], 6));
362
362
  }
363
- }), Pr = ["width", "height"], Er = {
363
+ }), Ma = ["width", "height"], ja = {
364
364
  stroke: "none",
365
365
  "stroke-width": "1",
366
366
  fill: "none",
367
367
  "fill-rule": "evenodd"
368
- }, Vr = { transform: "translate(-394.000000, -457.000000)" }, Br = { transform: "translate(394.000000, 457.000000)" }, Dr = ["width", "height"], Rr = /* @__PURE__ */ te({
368
+ }, Na = { transform: "translate(-394.000000, -457.000000)" }, Ia = { transform: "translate(394.000000, 457.000000)" }, _a = ["width", "height"], Fa = /* @__PURE__ */ Q({
369
369
  __name: "checked-basis",
370
370
  props: {
371
371
  size: { default: "16px" }
372
372
  },
373
373
  setup(e) {
374
- return (t, r) => (y(), k("svg", {
374
+ return (a, t) => (p(), y("svg", {
375
375
  width: e.size,
376
376
  height: e.size,
377
377
  viewBox: "0 0 16 16",
@@ -379,16 +379,16 @@ const xr = ["disabled"], wr = ["disabled"], Or = ["disabled"], Ye = /* @__PURE__
379
379
  xmlns: "http://www.w3.org/2000/svg",
380
380
  "xmlns:xlink": "http://www.w3.org/1999/xlink"
381
381
  }, [
382
- z("g", Er, [
383
- z("g", Vr, [
384
- z("g", Br, [
385
- z("rect", {
382
+ A("g", ja, [
383
+ A("g", Na, [
384
+ A("g", Ia, [
385
+ A("rect", {
386
386
  x: "0",
387
387
  y: "0",
388
388
  width: e.size,
389
389
  height: e.size
390
- }, null, 8, Dr),
391
- r[0] || (r[0] = z("path", {
390
+ }, null, 8, _a),
391
+ t[0] || (t[0] = A("path", {
392
392
  d: "M6.67713976,13.5709642 C7.12567714,13.5709642 7.468039,13.3943662 7.70422535,13.0411701 L13.7562297,3.77789816 C13.8407367,3.65005417 13.9024919,3.52546046 13.9414951,3.40411701 C13.9804984,3.28277356 14,3.16468039 14,3.04983749 C14,2.74647887 13.8976165,2.49566631 13.6928494,2.29739978 C13.4880823,2.09913326 13.2307692,2 12.9209101,2 C12.7063922,2 12.5265439,2.04225352 12.3813651,2.12676056 C12.2361863,2.21126761 12.0975081,2.35536295 11.9653304,2.55904659 L6.65113759,10.9512459 L3.95016251,7.60346696 C3.71830986,7.32177681 3.43011918,7.18093174 3.08559047,7.18093174 C2.77139762,7.18093174 2.51191766,7.28169014 2.3071506,7.48320693 C2.10238353,7.68472373 2,7.93824485 2,8.24377031 C2,8.38028169 2.02329361,8.51083424 2.06988082,8.63542795 C2.11646804,8.76002167 2.19826652,8.88949079 2.31527627,9.02383532 L5.67280607,13.0899242 C5.94149512,13.4106176 6.27627302,13.5709642 6.67713976,13.5709642 Z",
393
393
  fill: "currentColor",
394
394
  "fill-rule": "nonzero"
@@ -396,12 +396,12 @@ const xr = ["disabled"], wr = ["disabled"], Or = ["disabled"], Ye = /* @__PURE__
396
396
  ])
397
397
  ])
398
398
  ])
399
- ], 8, Pr));
399
+ ], 8, Ma));
400
400
  }
401
- }), Ar = {
401
+ }), Ha = {
402
402
  key: 0,
403
403
  class: "cregis-checkbox--indeterminate"
404
- }, ei = /* @__PURE__ */ te({
404
+ }, Ua = /* @__PURE__ */ Q({
405
405
  name: "Checkbox",
406
406
  __name: "Checkbox",
407
407
  props: {
@@ -412,43 +412,43 @@ const xr = ["disabled"], wr = ["disabled"], Or = ["disabled"], Ye = /* @__PURE__
412
412
  indeterminate: { type: Boolean }
413
413
  },
414
414
  emits: ["update:modelValue", "change"],
415
- setup(e, { emit: t }) {
416
- const r = e, n = t, a = h(() => r.modelValue), o = () => {
417
- r.disabled || n("update:modelValue", !a.value);
415
+ setup(e, { emit: a }) {
416
+ const t = e, r = a, n = v(() => t.modelValue), i = () => {
417
+ t.disabled || r("update:modelValue", !n.value);
418
418
  };
419
- return ee(
420
- () => a.value,
419
+ return J(
420
+ () => n.value,
421
421
  () => {
422
- n("change", a.value);
422
+ r("change", n.value);
423
423
  }
424
- ), (s, i) => (y(), k("div", {
424
+ ), (l, o) => (p(), y("div", {
425
425
  class: "cregis-checkbox__wrapper",
426
- onClick: o
426
+ onClick: i
427
427
  }, [
428
- z("div", {
429
- class: F(["cregis-checkbox", {
428
+ A("div", {
429
+ class: W(["cregis-checkbox", {
430
430
  "is-disabled": e.disabled,
431
- "is-checked": a.value,
431
+ "is-checked": n.value,
432
432
  "is-circle": e.circle,
433
433
  "is-indeterminate": e.indeterminate
434
434
  }])
435
435
  }, [
436
- e.indeterminate ? (y(), k("div", Ar)) : (y(), Ce(Rr, {
436
+ e.indeterminate ? (p(), y("div", Ha)) : (p(), pe(Fa, {
437
437
  key: 1,
438
438
  size: "10px"
439
439
  }))
440
440
  ], 2),
441
- s.$slots.default || e.label ? (y(), k("span", {
441
+ l.$slots.default || e.label ? (p(), y("span", {
442
442
  key: 0,
443
- class: F(["cregis-checkbox__label", { "is-disabled": e.disabled }])
443
+ class: W(["cregis-checkbox__label", { "is-disabled": e.disabled }])
444
444
  }, [
445
- K(s.$slots, "default", {}, () => [
446
- $e(H(e.label), 1)
445
+ G(l.$slots, "default", {}, () => [
446
+ ve(M(e.label), 1)
447
447
  ])
448
- ], 2)) : X("", !0)
448
+ ], 2)) : j("", !0)
449
449
  ]));
450
450
  }
451
- }), ti = /* @__PURE__ */ te({
451
+ }), Si = /* @__PURE__ */ Q({
452
452
  name: "Radio",
453
453
  __name: "Radio",
454
454
  props: {
@@ -458,71 +458,71 @@ const xr = ["disabled"], wr = ["disabled"], Or = ["disabled"], Ye = /* @__PURE__
458
458
  disabled: { type: Boolean }
459
459
  },
460
460
  emits: ["update:modelValue", "change"],
461
- setup(e, { emit: t }) {
462
- const r = e, n = t, a = h(() => r.modelValue === r.value), o = () => {
463
- r.disabled || (n("update:modelValue", r.value), n("change", r.value));
461
+ setup(e, { emit: a }) {
462
+ const t = e, r = a, n = v(() => t.modelValue === t.value), i = () => {
463
+ t.disabled || (r("update:modelValue", t.value), r("change", t.value));
464
464
  };
465
- return (s, i) => (y(), k("div", {
465
+ return (l, o) => (p(), y("div", {
466
466
  class: "cregis-radio__wrapper",
467
- onClick: o
467
+ onClick: i
468
468
  }, [
469
- z("div", {
470
- class: F(["cregis-radio", {
469
+ A("div", {
470
+ class: W(["cregis-radio", {
471
471
  "is-disabled": e.disabled,
472
- "is-checked": a.value
472
+ "is-checked": n.value
473
473
  }])
474
- }, [...i[0] || (i[0] = [
475
- z("div", { class: "cregis-radio__inner" }, null, -1)
474
+ }, [...o[0] || (o[0] = [
475
+ A("div", { class: "cregis-radio__inner" }, null, -1)
476
476
  ])], 2),
477
- s.$slots.default || e.label ? (y(), k("span", {
477
+ l.$slots.default || e.label ? (p(), y("span", {
478
478
  key: 0,
479
- class: F(["cregis-radio__label", { "is-disabled": e.disabled }])
479
+ class: W(["cregis-radio__label", { "is-disabled": e.disabled }])
480
480
  }, [
481
- K(s.$slots, "default", {}, () => [
482
- $e(H(e.label), 1)
481
+ G(l.$slots, "default", {}, () => [
482
+ ve(M(e.label), 1)
483
483
  ])
484
- ], 2)) : X("", !0)
484
+ ], 2)) : j("", !0)
485
485
  ]));
486
486
  }
487
- }), ri = /* @__PURE__ */ te({
487
+ }), Ti = /* @__PURE__ */ Q({
488
488
  name: "Divider",
489
489
  __name: "Divider",
490
490
  props: {
491
491
  direction: { default: "horizontal" },
492
492
  borderStyle: { default: "solid" },
493
493
  lineThickness: { default: "0.5px" },
494
- color: { default: "var(--line-page)" },
494
+ color: { default: "var(--stroke-divider-page)" },
495
495
  margin: { default: "8px" },
496
496
  length: {}
497
497
  },
498
498
  setup(e) {
499
- const t = e, r = h(() => {
500
- if (Array.isArray(t.margin)) {
501
- const [a, o] = t.margin;
502
- return t.direction === "horizontal" ? `${a} 0 ${o} 0` : `0 ${o} 0 ${a}`;
499
+ const a = e, t = v(() => {
500
+ if (Array.isArray(a.margin)) {
501
+ const [n, i] = a.margin;
502
+ return a.direction === "horizontal" ? `${n} 0 ${i} 0` : `0 ${i} 0 ${n}`;
503
503
  } else
504
- return t.direction === "horizontal" ? `${t.margin} 0` : `0 ${t.margin}`;
505
- }), n = h(() => t.direction === "horizontal" ? {
506
- width: t.length || "100%",
507
- borderTopWidth: t.lineThickness,
508
- borderTopStyle: t.borderStyle,
509
- borderTopColor: t.color,
510
- margin: r.value
504
+ return a.direction === "horizontal" ? `${a.margin} 0` : `0 ${a.margin}`;
505
+ }), r = v(() => a.direction === "horizontal" ? {
506
+ width: a.length || "100%",
507
+ borderTopWidth: a.lineThickness,
508
+ borderTopStyle: a.borderStyle,
509
+ borderTopColor: a.color,
510
+ margin: t.value
511
511
  } : {
512
- height: t.length || "1rem",
513
- borderLeftWidth: t.lineThickness,
514
- borderLeftStyle: t.borderStyle,
515
- borderLeftColor: t.color,
516
- margin: r.value
512
+ height: a.length || "1rem",
513
+ borderLeftWidth: a.lineThickness,
514
+ borderLeftStyle: a.borderStyle,
515
+ borderLeftColor: a.color,
516
+ margin: t.value
517
517
  });
518
- return (a, o) => (y(), k("div", {
519
- class: F(["cregis-divider", {
518
+ return (n, i) => (p(), y("div", {
519
+ class: W(["cregis-divider", {
520
520
  [`cregis-divider--${e.direction}`]: e.direction
521
521
  }]),
522
- style: de(n.value)
522
+ style: ne(r.value)
523
523
  }, null, 6));
524
524
  }
525
- }), Gt = Symbol("TABS_KEY"), zr = ["onClick"], Wr = { style: { display: "none" } }, ni = /* @__PURE__ */ te({
525
+ }), ra = Symbol("TABS_KEY"), qa = ["onClick"], Ya = { style: { display: "none" } }, Vi = /* @__PURE__ */ Q({
526
526
  name: "Tabs",
527
527
  __name: "Tabs",
528
528
  props: {
@@ -532,44 +532,44 @@ const xr = ["disabled"], wr = ["disabled"], Or = ["disabled"], Ye = /* @__PURE__
532
532
  },
533
533
  emits: ["update:modelValue"],
534
534
  setup(e) {
535
- const t = e, r = Se([]), n = (s) => {
536
- r.some((i) => i.name === s.name) || r.push(s);
537
- }, a = (s) => {
538
- const i = r.findIndex((l) => l.name === s);
539
- i !== -1 && r.splice(i, 1);
540
- }, o = h(() => t.type === "card" ? t.size === "large" ? {
535
+ const a = e, t = Ve([]), r = (l) => {
536
+ t.some((o) => o.name === l.name) || t.push(l);
537
+ }, n = (l) => {
538
+ const o = t.findIndex((s) => s.name === l);
539
+ o !== -1 && t.splice(o, 1);
540
+ }, i = v(() => a.type === "card" ? a.size === "large" ? {
541
541
  borderRadius: "13px"
542
- } : t.size === "medium" ? {
542
+ } : a.size === "medium" ? {
543
543
  borderRadius: "11px"
544
544
  } : {
545
545
  borderRadius: "9px"
546
546
  } : {
547
547
  borderRadius: 0
548
548
  });
549
- return Ht(Gt, {
550
- activeName: vr(t, "modelValue"),
551
- registerTab: n,
552
- unregisterTab: a
553
- }), (s, i) => (y(), k("div", {
554
- class: F(["cregis-tabs", {
549
+ return Qt(ra, {
550
+ activeName: ka(a, "modelValue"),
551
+ registerTab: r,
552
+ unregisterTab: n
553
+ }), (l, o) => (p(), y("div", {
554
+ class: W(["cregis-tabs", {
555
555
  [`cregis-tabs--${e.type}`]: e.type,
556
556
  [`cregis-tabs--${e.size}`]: e.size
557
557
  }])
558
558
  }, [
559
- (y(!0), k(ct, null, ut(r, (l) => (y(), k("div", {
560
- key: l.name,
561
- class: F(["cregis-tabs__item", { "is-active": e.modelValue === l.name }]),
562
- style: de(o.value),
563
- onClick: (d) => s.$emit("update:modelValue", l.name)
559
+ (p(!0), y(ft, null, pt(t, (s) => (p(), y("div", {
560
+ key: s.name,
561
+ class: W(["cregis-tabs__item", { "is-active": e.modelValue === s.name }]),
562
+ style: ne(i.value),
563
+ onClick: (d) => l.$emit("update:modelValue", s.name)
564
564
  }, [
565
- z("span", null, H(l.label), 1)
566
- ], 14, zr))), 128)),
567
- z("div", Wr, [
568
- K(s.$slots, "default")
565
+ A("span", null, M(s.label), 1)
566
+ ], 14, qa))), 128)),
567
+ A("div", Ya, [
568
+ G(l.$slots, "default")
569
569
  ])
570
570
  ], 2));
571
571
  }
572
- }), ai = /* @__PURE__ */ te({
572
+ }), Bi = /* @__PURE__ */ Q({
573
573
  name: "TabPane",
574
574
  __name: "TabPane",
575
575
  props: {
@@ -577,161 +577,179 @@ const xr = ["disabled"], wr = ["disabled"], Or = ["disabled"], Ye = /* @__PURE__
577
577
  name: {}
578
578
  },
579
579
  setup(e) {
580
- const t = e, r = qt(Gt);
581
- if (!r) throw new Error("TabPane must be used within Tabs");
582
- return et(() => {
583
- r.registerTab({ label: t.label, name: t.name });
584
- }), ee(
585
- () => t.label,
586
- (n) => {
587
- r.unregisterTab(t.name), r.registerTab({ label: n, name: t.name });
580
+ const a = e, t = Zt(ra);
581
+ if (!t) throw new Error("TabPane must be used within Tabs");
582
+ return at(() => {
583
+ t.registerTab({ label: a.label, name: a.name });
584
+ }), J(
585
+ () => a.label,
586
+ (r) => {
587
+ t.unregisterTab(a.name), t.registerTab({ label: r, name: a.name });
588
588
  }
589
- ), De(() => {
590
- r.unregisterTab(t.name);
591
- }), (n, a) => null;
589
+ ), xe(() => {
590
+ t.unregisterTab(a.name);
591
+ }), (r, n) => null;
592
592
  }
593
- }), Mr = { class: "cregis-message__wrapper" }, Lr = {
594
- key: 0,
595
- class: "cregis-message",
593
+ }), Xa = {
594
+ key: 1,
595
+ class: "cregis-message--success",
596
596
  role: "status",
597
597
  "aria-live": "polite"
598
- }, jr = /* @__PURE__ */ te({
598
+ }, Ka = { class: "cregis-message__icon" }, Ga = /* @__PURE__ */ Q({
599
599
  name: "Message",
600
600
  __name: "Message",
601
601
  props: {
602
+ type: { default: "default" },
602
603
  message: {},
603
604
  duration: { default: 1e3 },
604
605
  onVanish: {}
605
606
  },
606
607
  setup(e) {
607
- const t = e, r = q(!1);
608
- let n;
609
- const a = () => {
610
- n = window.setTimeout(() => {
611
- r.value = !1;
612
- }, t.duration);
613
- }, o = () => {
614
- t.onVanish?.();
608
+ const a = e, t = F(!1);
609
+ let r;
610
+ const n = () => {
611
+ r = window.setTimeout(() => {
612
+ t.value = !1;
613
+ }, a.duration);
614
+ }, i = () => {
615
+ a.onVanish?.();
615
616
  };
616
- return Ut(() => {
617
- n !== void 0 && clearTimeout(n);
618
- }), Ke(() => {
619
- r.value = !0;
620
- }), (s, i) => (y(), k("div", Mr, [
621
- Z(mt, {
617
+ return Jt(() => {
618
+ r !== void 0 && clearTimeout(r);
619
+ }), Fe(() => {
620
+ t.value = !0;
621
+ }), (l, o) => (p(), y("div", {
622
+ class: W(["cregis-message__wrapper", { "cregis-message__wrapper--success": e.type === "success" }])
623
+ }, [
624
+ K(nt, {
622
625
  name: "cregis-message",
623
- onAfterEnter: a,
624
- onAfterLeave: o
626
+ onAfterEnter: n,
627
+ onAfterLeave: i
625
628
  }, {
626
- default: re(() => [
627
- r.value ? (y(), k("div", Lr, H(e.message), 1)) : X("", !0)
629
+ default: ee(() => [
630
+ t.value && e.type !== "success" ? (p(), y("div", {
631
+ key: 0,
632
+ class: W(["cregis-message", { "cregis-message--danger": e.type === "danger" }]),
633
+ role: "status",
634
+ "aria-live": "polite"
635
+ }, M(e.message), 3)) : t.value && e.type === "success" ? (p(), y("div", Xa, [
636
+ A("div", Ka, [
637
+ K(Z(Ca), {
638
+ size: "16px",
639
+ color: "var(--material-same-white-primary)"
640
+ })
641
+ ]),
642
+ A("p", null, M(e.message), 1)
643
+ ])) : j("", !0)
628
644
  ]),
629
645
  _: 1
630
646
  })
631
- ]));
647
+ ], 2));
632
648
  }
633
649
  });
634
- let ot = !1;
635
- function Nr(e) {
636
- return typeof e == "string" ? { message: e, duration: 1e3 } : {
650
+ let ct = !1;
651
+ function Qa(e) {
652
+ return typeof e == "string" ? { message: e, duration: 1e3, type: "default" } : {
637
653
  message: e.message,
638
- duration: e.duration ?? 1e3
654
+ duration: e.duration ?? 1e3,
655
+ type: e.type ?? "default"
639
656
  };
640
657
  }
641
- function ii(e) {
642
- if (ot) return;
643
- const { message: t, duration: r } = Nr(e);
644
- ot = !0;
658
+ function Lt(e) {
659
+ if (ct) return;
660
+ const { message: a, duration: t, type: r } = Qa(e);
661
+ ct = !0;
645
662
  const n = document.createElement("div");
646
- document.body.appendChild(n), Qe(
647
- Yt(jr, {
648
- message: t,
649
- duration: r,
663
+ document.body.appendChild(n), Ee(
664
+ yt(Ga, {
665
+ message: a,
666
+ duration: t,
667
+ type: r,
650
668
  onVanish: () => {
651
- ot = !1, Qe(null, n), n.remove();
669
+ ct = !1, Ee(null, n), n.remove();
652
670
  }
653
671
  }),
654
672
  n
655
673
  );
656
674
  }
657
- const Ir = { class: "cregis-notification__wrapper" }, _r = {
675
+ const Za = { class: "cregis-notification__wrapper" }, Ja = {
658
676
  key: 0,
659
677
  class: "cregis-notification",
660
678
  role: "status",
661
679
  "aria-live": "polite"
662
- }, Fr = { class: "cregis-notification__content" }, Hr = { class: "cregis-notification__title" }, qr = { class: "cregis-notification__message" }, Ur = /* @__PURE__ */ te({
680
+ }, en = { class: "cregis-notification__content" }, tn = { class: "cregis-notification__title" }, an = { class: "cregis-notification__message" }, nn = /* @__PURE__ */ Q({
663
681
  name: "Notification",
664
682
  __name: "Notification",
665
683
  props: {
666
684
  title: {},
667
685
  message: {},
668
686
  btnText: {},
669
- type: { default: "error" },
687
+ type: { default: "danger" },
670
688
  onVanish: {}
671
689
  },
672
690
  setup(e) {
673
- const t = e, r = q(!1), n = () => {
674
- r.value = !1;
675
- }, a = () => {
676
- t.onVanish?.();
691
+ const a = e, t = F(!1), r = () => {
692
+ t.value = !1;
693
+ }, n = () => {
694
+ a.onVanish?.();
677
695
  };
678
- return Ut(() => {
679
- }), Ke(() => {
680
- r.value = !0;
681
- }), (o, s) => (y(), k("div", Ir, [
682
- Z(mt, {
696
+ return Jt(() => {
697
+ }), Fe(() => {
698
+ t.value = !0;
699
+ }), (i, l) => (p(), y("div", Za, [
700
+ K(nt, {
683
701
  name: "cregis-notification",
684
- onAfterLeave: a
702
+ onAfterLeave: n
685
703
  }, {
686
- default: re(() => [
687
- r.value ? (y(), k("div", _r, [
688
- (y(), Ce(Ft(ie(br)), {
704
+ default: ee(() => [
705
+ t.value ? (p(), y("div", Ja, [
706
+ (p(), pe(Gt(Z(Sa)), {
689
707
  size: "18px",
690
- color: "var(--material-vibrant-error-primary)"
708
+ color: "var(--material-danger-primary)"
691
709
  })),
692
- z("div", Fr, [
693
- z("div", Hr, H(e.title), 1),
694
- z("div", qr, H(e.message), 1)
710
+ A("div", en, [
711
+ A("div", tn, M(e.title), 1),
712
+ A("div", an, M(e.message), 1)
695
713
  ]),
696
- Z(Ye, {
714
+ K(Be, {
697
715
  type: "sameWhite",
698
- onClick: n
716
+ onClick: r
699
717
  }, {
700
- default: re(() => [
701
- $e(H(e.btnText), 1)
718
+ default: ee(() => [
719
+ ve(M(e.btnText), 1)
702
720
  ]),
703
721
  _: 1
704
722
  })
705
- ])) : X("", !0)
723
+ ])) : j("", !0)
706
724
  ]),
707
725
  _: 1
708
726
  })
709
727
  ]));
710
728
  }
711
729
  });
712
- let st = !1;
713
- function oi(e) {
714
- if (st) return;
715
- const { title: t, message: r, type: n, btnText: a } = e;
716
- st = !0;
717
- const o = document.createElement("div");
718
- document.body.appendChild(o), Qe(
719
- Yt(Ur, {
720
- title: t,
721
- message: r,
722
- type: n,
723
- btnText: a,
730
+ let ut = !1;
731
+ function Ei(e) {
732
+ if (ut) return;
733
+ const { title: a, message: t, type: r, btnText: n } = e;
734
+ ut = !0;
735
+ const i = document.createElement("div");
736
+ document.body.appendChild(i), Ee(
737
+ yt(nn, {
738
+ title: a,
739
+ message: t,
740
+ type: r,
741
+ btnText: n,
724
742
  onVanish: () => {
725
- st = !1, Qe(null, o), o.remove();
743
+ ut = !1, Ee(null, i), i.remove();
726
744
  }
727
745
  }),
728
- o
746
+ i
729
747
  );
730
748
  }
731
- const Yr = { class: "cregis-progress__wrapper" }, Xr = { class: "cregis-progress__track-wrap" }, Kr = { class: "cregis-progress cregis-progress--striped active" }, Qr = {
749
+ const rn = { class: "cregis-progress__wrapper" }, on = { class: "cregis-progress__track-wrap" }, ln = { class: "cregis-progress cregis-progress--striped active" }, sn = {
732
750
  key: 0,
733
751
  class: "cregis-progress__sliding-block"
734
- }, si = /* @__PURE__ */ te({
752
+ }, Ai = /* @__PURE__ */ Q({
735
753
  name: "Progress",
736
754
  __name: "Progress",
737
755
  props: {
@@ -741,76 +759,76 @@ const Yr = { class: "cregis-progress__wrapper" }, Xr = { class: "cregis-progress
741
759
  loading: { type: Boolean, default: !1 }
742
760
  },
743
761
  setup(e) {
744
- const t = e, r = h(() => Math.min(100, Math.max(0, t.percentage - 1))), n = h(() => ({
745
- width: `${t.percentage}%`,
746
- height: `${t.strokeWidth}px`
747
- })), a = h(() => ({
748
- "--cregis-progress-tip-left": `${r.value}%`
749
- })), o = h(() => `${Math.round(t.percentage)}%`);
750
- return (s, i) => (y(), k("div", Yr, [
751
- z("div", Xr, [
752
- e.showPercentage && !t.loading ? (y(), k("div", {
762
+ const a = e, t = v(() => Math.min(100, Math.max(0, a.percentage - 1))), r = v(() => ({
763
+ width: `${a.percentage}%`,
764
+ height: `${a.strokeWidth}px`
765
+ })), n = v(() => ({
766
+ "--cregis-progress-tip-left": `${t.value}%`
767
+ })), i = v(() => `${Math.round(a.percentage)}%`);
768
+ return (l, o) => (p(), y("div", rn, [
769
+ A("div", on, [
770
+ e.showPercentage && !a.loading ? (p(), y("div", {
753
771
  key: 0,
754
772
  class: "cregis-progress__tip",
755
- style: de(a.value),
773
+ style: ne(n.value),
756
774
  "aria-live": "polite"
757
- }, H(o.value), 5)) : X("", !0),
758
- z("div", Kr, [
759
- z("div", {
775
+ }, M(i.value), 5)) : j("", !0),
776
+ A("div", ln, [
777
+ A("div", {
760
778
  class: "cregis-progress__bar",
761
- style: de(n.value)
779
+ style: ne(r.value)
762
780
  }, null, 4),
763
- t.loading ? (y(), k("div", Qr)) : X("", !0)
781
+ a.loading ? (p(), y("div", sn)) : j("", !0)
764
782
  ])
765
783
  ])
766
784
  ]));
767
785
  }
768
786
  });
769
- var ne = "top", ce = "bottom", ue = "right", ae = "left", ht = "auto", _e = [ne, ce, ue, ae], Pe = "start", Ne = "end", Gr = "clippingParents", Zt = "viewport", ze = "popper", Zr = "reference", Bt = /* @__PURE__ */ _e.reduce(function(e, t) {
770
- return e.concat([t + "-" + Pe, t + "-" + Ne]);
771
- }, []), Jt = /* @__PURE__ */ [].concat(_e, [ht]).reduce(function(e, t) {
772
- return e.concat([t, t + "-" + Pe, t + "-" + Ne]);
773
- }, []), Jr = "beforeRead", en = "read", tn = "afterRead", rn = "beforeMain", nn = "main", an = "afterMain", on = "beforeWrite", sn = "write", ln = "afterWrite", cn = [Jr, en, tn, rn, nn, an, on, sn, ln];
774
- function ve(e) {
787
+ var oe = "top", de = "bottom", fe = "right", le = "left", xt = "auto", qe = [oe, de, fe, le], Ae = "start", He = "end", cn = "clippingParents", ia = "viewport", We = "popper", un = "reference", Wt = /* @__PURE__ */ qe.reduce(function(e, a) {
788
+ return e.concat([a + "-" + Ae, a + "-" + He]);
789
+ }, []), oa = /* @__PURE__ */ [].concat(qe, [xt]).reduce(function(e, a) {
790
+ return e.concat([a, a + "-" + Ae, a + "-" + He]);
791
+ }, []), dn = "beforeRead", fn = "read", pn = "afterRead", vn = "beforeMain", mn = "main", gn = "afterMain", hn = "beforeWrite", bn = "write", yn = "afterWrite", wn = [dn, fn, pn, vn, mn, gn, hn, bn, yn];
792
+ function he(e) {
775
793
  return e ? (e.nodeName || "").toLowerCase() : null;
776
794
  }
777
- function oe(e) {
795
+ function se(e) {
778
796
  if (e == null)
779
797
  return window;
780
798
  if (e.toString() !== "[object Window]") {
781
- var t = e.ownerDocument;
782
- return t && t.defaultView || window;
799
+ var a = e.ownerDocument;
800
+ return a && a.defaultView || window;
783
801
  }
784
802
  return e;
785
803
  }
786
- function ke(e) {
787
- var t = oe(e).Element;
788
- return e instanceof t || e instanceof Element;
804
+ function Se(e) {
805
+ var a = se(e).Element;
806
+ return e instanceof a || e instanceof Element;
789
807
  }
790
- function le(e) {
791
- var t = oe(e).HTMLElement;
792
- return e instanceof t || e instanceof HTMLElement;
808
+ function ue(e) {
809
+ var a = se(e).HTMLElement;
810
+ return e instanceof a || e instanceof HTMLElement;
793
811
  }
794
- function bt(e) {
812
+ function kt(e) {
795
813
  if (typeof ShadowRoot > "u")
796
814
  return !1;
797
- var t = oe(e).ShadowRoot;
798
- return e instanceof t || e instanceof ShadowRoot;
799
- }
800
- function un(e) {
801
- var t = e.state;
802
- Object.keys(t.elements).forEach(function(r) {
803
- var n = t.styles[r] || {}, a = t.attributes[r] || {}, o = t.elements[r];
804
- !le(o) || !ve(o) || (Object.assign(o.style, n), Object.keys(a).forEach(function(s) {
805
- var i = a[s];
806
- i === !1 ? o.removeAttribute(s) : o.setAttribute(s, i === !0 ? "" : i);
815
+ var a = se(e).ShadowRoot;
816
+ return e instanceof a || e instanceof ShadowRoot;
817
+ }
818
+ function xn(e) {
819
+ var a = e.state;
820
+ Object.keys(a.elements).forEach(function(t) {
821
+ var r = a.styles[t] || {}, n = a.attributes[t] || {}, i = a.elements[t];
822
+ !ue(i) || !he(i) || (Object.assign(i.style, r), Object.keys(n).forEach(function(l) {
823
+ var o = n[l];
824
+ o === !1 ? i.removeAttribute(l) : i.setAttribute(l, o === !0 ? "" : o);
807
825
  }));
808
826
  });
809
827
  }
810
- function dn(e) {
811
- var t = e.state, r = {
828
+ function kn(e) {
829
+ var a = e.state, t = {
812
830
  popper: {
813
- position: t.options.strategy,
831
+ position: a.options.strategy,
814
832
  left: "0",
815
833
  top: "0",
816
834
  margin: "0"
@@ -820,137 +838,137 @@ function dn(e) {
820
838
  },
821
839
  reference: {}
822
840
  };
823
- return Object.assign(t.elements.popper.style, r.popper), t.styles = r, t.elements.arrow && Object.assign(t.elements.arrow.style, r.arrow), function() {
824
- Object.keys(t.elements).forEach(function(n) {
825
- var a = t.elements[n], o = t.attributes[n] || {}, s = Object.keys(t.styles.hasOwnProperty(n) ? t.styles[n] : r[n]), i = s.reduce(function(l, d) {
826
- return l[d] = "", l;
841
+ return Object.assign(a.elements.popper.style, t.popper), a.styles = t, a.elements.arrow && Object.assign(a.elements.arrow.style, t.arrow), function() {
842
+ Object.keys(a.elements).forEach(function(r) {
843
+ var n = a.elements[r], i = a.attributes[r] || {}, l = Object.keys(a.styles.hasOwnProperty(r) ? a.styles[r] : t[r]), o = l.reduce(function(s, d) {
844
+ return s[d] = "", s;
827
845
  }, {});
828
- !le(a) || !ve(a) || (Object.assign(a.style, i), Object.keys(o).forEach(function(l) {
829
- a.removeAttribute(l);
846
+ !ue(n) || !he(n) || (Object.assign(n.style, o), Object.keys(i).forEach(function(s) {
847
+ n.removeAttribute(s);
830
848
  }));
831
849
  });
832
850
  };
833
851
  }
834
- const fn = {
852
+ const $n = {
835
853
  name: "applyStyles",
836
854
  enabled: !0,
837
855
  phase: "write",
838
- fn: un,
839
- effect: dn,
856
+ fn: xn,
857
+ effect: kn,
840
858
  requires: ["computeStyles"]
841
859
  };
842
- function pe(e) {
860
+ function ge(e) {
843
861
  return e.split("-")[0];
844
862
  }
845
- var Oe = Math.max, Ge = Math.min, Ee = Math.round;
846
- function dt() {
863
+ var Ce = Math.max, Ze = Math.min, De = Math.round;
864
+ function vt() {
847
865
  var e = navigator.userAgentData;
848
- return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(t) {
849
- return t.brand + "/" + t.version;
866
+ return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(a) {
867
+ return a.brand + "/" + a.version;
850
868
  }).join(" ") : navigator.userAgent;
851
869
  }
852
- function er() {
853
- return !/^((?!chrome|android).)*safari/i.test(dt());
870
+ function la() {
871
+ return !/^((?!chrome|android).)*safari/i.test(vt());
854
872
  }
855
- function Ve(e, t, r) {
856
- t === void 0 && (t = !1), r === void 0 && (r = !1);
857
- var n = e.getBoundingClientRect(), a = 1, o = 1;
858
- t && le(e) && (a = e.offsetWidth > 0 && Ee(n.width) / e.offsetWidth || 1, o = e.offsetHeight > 0 && Ee(n.height) / e.offsetHeight || 1);
859
- var s = ke(e) ? oe(e) : window, i = s.visualViewport, l = !er() && r, d = (n.left + (l && i ? i.offsetLeft : 0)) / a, c = (n.top + (l && i ? i.offsetTop : 0)) / o, $ = n.width / a, P = n.height / o;
873
+ function Pe(e, a, t) {
874
+ a === void 0 && (a = !1), t === void 0 && (t = !1);
875
+ var r = e.getBoundingClientRect(), n = 1, i = 1;
876
+ a && ue(e) && (n = e.offsetWidth > 0 && De(r.width) / e.offsetWidth || 1, i = e.offsetHeight > 0 && De(r.height) / e.offsetHeight || 1);
877
+ var l = Se(e) ? se(e) : window, o = l.visualViewport, s = !la() && t, d = (r.left + (s && o ? o.offsetLeft : 0)) / n, c = (r.top + (s && o ? o.offsetTop : 0)) / i, w = r.width / n, $ = r.height / i;
860
878
  return {
861
- width: $,
862
- height: P,
879
+ width: w,
880
+ height: $,
863
881
  top: c,
864
- right: d + $,
865
- bottom: c + P,
882
+ right: d + w,
883
+ bottom: c + $,
866
884
  left: d,
867
885
  x: d,
868
886
  y: c
869
887
  };
870
888
  }
871
- function yt(e) {
872
- var t = Ve(e), r = e.offsetWidth, n = e.offsetHeight;
873
- return Math.abs(t.width - r) <= 1 && (r = t.width), Math.abs(t.height - n) <= 1 && (n = t.height), {
889
+ function $t(e) {
890
+ var a = Pe(e), t = e.offsetWidth, r = e.offsetHeight;
891
+ return Math.abs(a.width - t) <= 1 && (t = a.width), Math.abs(a.height - r) <= 1 && (r = a.height), {
874
892
  x: e.offsetLeft,
875
893
  y: e.offsetTop,
876
- width: r,
877
- height: n
894
+ width: t,
895
+ height: r
878
896
  };
879
897
  }
880
- function tr(e, t) {
881
- var r = t.getRootNode && t.getRootNode();
882
- if (e.contains(t))
898
+ function sa(e, a) {
899
+ var t = a.getRootNode && a.getRootNode();
900
+ if (e.contains(a))
883
901
  return !0;
884
- if (r && bt(r)) {
885
- var n = t;
902
+ if (t && kt(t)) {
903
+ var r = a;
886
904
  do {
887
- if (n && e.isSameNode(n))
905
+ if (r && e.isSameNode(r))
888
906
  return !0;
889
- n = n.parentNode || n.host;
890
- } while (n);
907
+ r = r.parentNode || r.host;
908
+ } while (r);
891
909
  }
892
910
  return !1;
893
911
  }
894
- function ge(e) {
895
- return oe(e).getComputedStyle(e);
912
+ function ye(e) {
913
+ return se(e).getComputedStyle(e);
896
914
  }
897
- function pn(e) {
898
- return ["table", "td", "th"].indexOf(ve(e)) >= 0;
915
+ function On(e) {
916
+ return ["table", "td", "th"].indexOf(he(e)) >= 0;
899
917
  }
900
- function ye(e) {
901
- return ((ke(e) ? e.ownerDocument : (
918
+ function ke(e) {
919
+ return ((Se(e) ? e.ownerDocument : (
902
920
  // $FlowFixMe[prop-missing]
903
921
  e.document
904
922
  )) || window.document).documentElement;
905
923
  }
906
- function tt(e) {
907
- return ve(e) === "html" ? e : (
924
+ function rt(e) {
925
+ return he(e) === "html" ? e : (
908
926
  // this is a quicker (but less type safe) way to save quite some bytes from the bundle
909
927
  // $FlowFixMe[incompatible-return]
910
928
  // $FlowFixMe[prop-missing]
911
929
  e.assignedSlot || // step into the shadow DOM of the parent of a slotted node
912
930
  e.parentNode || // DOM Element detected
913
- (bt(e) ? e.host : null) || // ShadowRoot detected
931
+ (kt(e) ? e.host : null) || // ShadowRoot detected
914
932
  // $FlowFixMe[incompatible-call]: HTMLElement is a Node
915
- ye(e)
933
+ ke(e)
916
934
  );
917
935
  }
918
- function Dt(e) {
919
- return !le(e) || // https://github.com/popperjs/popper-core/issues/837
920
- ge(e).position === "fixed" ? null : e.offsetParent;
921
- }
922
- function vn(e) {
923
- var t = /firefox/i.test(dt()), r = /Trident/i.test(dt());
924
- if (r && le(e)) {
925
- var n = ge(e);
926
- if (n.position === "fixed")
936
+ function Mt(e) {
937
+ return !ue(e) || // https://github.com/popperjs/popper-core/issues/837
938
+ ye(e).position === "fixed" ? null : e.offsetParent;
939
+ }
940
+ function Cn(e) {
941
+ var a = /firefox/i.test(vt()), t = /Trident/i.test(vt());
942
+ if (t && ue(e)) {
943
+ var r = ye(e);
944
+ if (r.position === "fixed")
927
945
  return null;
928
946
  }
929
- var a = tt(e);
930
- for (bt(a) && (a = a.host); le(a) && ["html", "body"].indexOf(ve(a)) < 0; ) {
931
- var o = ge(a);
932
- if (o.transform !== "none" || o.perspective !== "none" || o.contain === "paint" || ["transform", "perspective"].indexOf(o.willChange) !== -1 || t && o.willChange === "filter" || t && o.filter && o.filter !== "none")
933
- return a;
934
- a = a.parentNode;
947
+ var n = rt(e);
948
+ for (kt(n) && (n = n.host); ue(n) && ["html", "body"].indexOf(he(n)) < 0; ) {
949
+ var i = ye(n);
950
+ if (i.transform !== "none" || i.perspective !== "none" || i.contain === "paint" || ["transform", "perspective"].indexOf(i.willChange) !== -1 || a && i.willChange === "filter" || a && i.filter && i.filter !== "none")
951
+ return n;
952
+ n = n.parentNode;
935
953
  }
936
954
  return null;
937
955
  }
938
- function Fe(e) {
939
- for (var t = oe(e), r = Dt(e); r && pn(r) && ge(r).position === "static"; )
940
- r = Dt(r);
941
- return r && (ve(r) === "html" || ve(r) === "body" && ge(r).position === "static") ? t : r || vn(e) || t;
956
+ function Ye(e) {
957
+ for (var a = se(e), t = Mt(e); t && On(t) && ye(t).position === "static"; )
958
+ t = Mt(t);
959
+ return t && (he(t) === "html" || he(t) === "body" && ye(t).position === "static") ? a : t || Cn(e) || a;
942
960
  }
943
- function xt(e) {
961
+ function Ot(e) {
944
962
  return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
945
963
  }
946
- function Me(e, t, r) {
947
- return Oe(e, Ge(t, r));
964
+ function je(e, a, t) {
965
+ return Ce(e, Ze(a, t));
948
966
  }
949
- function mn(e, t, r) {
950
- var n = Me(e, t, r);
951
- return n > r ? r : n;
967
+ function Sn(e, a, t) {
968
+ var r = je(e, a, t);
969
+ return r > t ? t : r;
952
970
  }
953
- function rr() {
971
+ function ca() {
954
972
  return {
955
973
  top: 0,
956
974
  right: 0,
@@ -958,221 +976,221 @@ function rr() {
958
976
  left: 0
959
977
  };
960
978
  }
961
- function nr(e) {
962
- return Object.assign({}, rr(), e);
979
+ function ua(e) {
980
+ return Object.assign({}, ca(), e);
963
981
  }
964
- function ar(e, t) {
965
- return t.reduce(function(r, n) {
966
- return r[n] = e, r;
982
+ function da(e, a) {
983
+ return a.reduce(function(t, r) {
984
+ return t[r] = e, t;
967
985
  }, {});
968
986
  }
969
- var gn = function(t, r) {
970
- return t = typeof t == "function" ? t(Object.assign({}, r.rects, {
971
- placement: r.placement
972
- })) : t, nr(typeof t != "number" ? t : ar(t, _e));
987
+ var Tn = function(a, t) {
988
+ return a = typeof a == "function" ? a(Object.assign({}, t.rects, {
989
+ placement: t.placement
990
+ })) : a, ua(typeof a != "number" ? a : da(a, qe));
973
991
  };
974
- function hn(e) {
975
- var t, r = e.state, n = e.name, a = e.options, o = r.elements.arrow, s = r.modifiersData.popperOffsets, i = pe(r.placement), l = xt(i), d = [ae, ue].indexOf(i) >= 0, c = d ? "height" : "width";
976
- if (!(!o || !s)) {
977
- var $ = gn(a.padding, r), P = yt(o), m = l === "y" ? ne : ae, b = l === "y" ? ce : ue, w = r.rects.reference[c] + r.rects.reference[l] - s[l] - r.rects.popper[c], T = s[l] - r.rects.reference[l], V = Fe(o), R = V ? l === "y" ? V.clientHeight || 0 : V.clientWidth || 0 : 0, L = w / 2 - T / 2, O = $[m], S = R - P[c] - $[b], f = R / 2 - P[c] / 2 + L, E = Me(O, f, S), D = l;
978
- r.modifiersData[n] = (t = {}, t[D] = E, t.centerOffset = E - f, t);
992
+ function Vn(e) {
993
+ var a, t = e.state, r = e.name, n = e.options, i = t.elements.arrow, l = t.modifiersData.popperOffsets, o = ge(t.placement), s = Ot(o), d = [le, fe].indexOf(o) >= 0, c = d ? "height" : "width";
994
+ if (!(!i || !l)) {
995
+ var w = Tn(n.padding, t), $ = $t(i), m = s === "y" ? oe : le, k = s === "y" ? de : fe, O = t.rects.reference[c] + t.rects.reference[s] - l[s] - t.rects.popper[c], V = l[s] - t.rects.reference[s], x = Ye(i), B = x ? s === "y" ? x.clientHeight || 0 : x.clientWidth || 0 : 0, R = O / 2 - V / 2, C = w[m], E = B - $[c] - w[k], f = B / 2 - $[c] / 2 + R, S = je(C, f, E), P = s;
996
+ t.modifiersData[r] = (a = {}, a[P] = S, a.centerOffset = S - f, a);
979
997
  }
980
998
  }
981
- function bn(e) {
982
- var t = e.state, r = e.options, n = r.element, a = n === void 0 ? "[data-popper-arrow]" : n;
983
- a != null && (typeof a == "string" && (a = t.elements.popper.querySelector(a), !a) || tr(t.elements.popper, a) && (t.elements.arrow = a));
999
+ function Bn(e) {
1000
+ var a = e.state, t = e.options, r = t.element, n = r === void 0 ? "[data-popper-arrow]" : r;
1001
+ n != null && (typeof n == "string" && (n = a.elements.popper.querySelector(n), !n) || sa(a.elements.popper, n) && (a.elements.arrow = n));
984
1002
  }
985
- const yn = {
1003
+ const En = {
986
1004
  name: "arrow",
987
1005
  enabled: !0,
988
1006
  phase: "main",
989
- fn: hn,
990
- effect: bn,
1007
+ fn: Vn,
1008
+ effect: Bn,
991
1009
  requires: ["popperOffsets"],
992
1010
  requiresIfExists: ["preventOverflow"]
993
1011
  };
994
- function Be(e) {
1012
+ function ze(e) {
995
1013
  return e.split("-")[1];
996
1014
  }
997
- var xn = {
1015
+ var An = {
998
1016
  top: "auto",
999
1017
  right: "auto",
1000
1018
  bottom: "auto",
1001
1019
  left: "auto"
1002
1020
  };
1003
- function wn(e, t) {
1004
- var r = e.x, n = e.y, a = t.devicePixelRatio || 1;
1021
+ function Dn(e, a) {
1022
+ var t = e.x, r = e.y, n = a.devicePixelRatio || 1;
1005
1023
  return {
1006
- x: Ee(r * a) / a || 0,
1007
- y: Ee(n * a) / a || 0
1024
+ x: De(t * n) / n || 0,
1025
+ y: De(r * n) / n || 0
1008
1026
  };
1009
1027
  }
1010
- function Rt(e) {
1011
- var t, r = e.popper, n = e.popperRect, a = e.placement, o = e.variation, s = e.offsets, i = e.position, l = e.gpuAcceleration, d = e.adaptive, c = e.roundOffsets, $ = e.isFixed, P = s.x, m = P === void 0 ? 0 : P, b = s.y, w = b === void 0 ? 0 : b, T = typeof c == "function" ? c({
1028
+ function jt(e) {
1029
+ var a, t = e.popper, r = e.popperRect, n = e.placement, i = e.variation, l = e.offsets, o = e.position, s = e.gpuAcceleration, d = e.adaptive, c = e.roundOffsets, w = e.isFixed, $ = l.x, m = $ === void 0 ? 0 : $, k = l.y, O = k === void 0 ? 0 : k, V = typeof c == "function" ? c({
1012
1030
  x: m,
1013
- y: w
1031
+ y: O
1014
1032
  }) : {
1015
1033
  x: m,
1016
- y: w
1034
+ y: O
1017
1035
  };
1018
- m = T.x, w = T.y;
1019
- var V = s.hasOwnProperty("x"), R = s.hasOwnProperty("y"), L = ae, O = ne, S = window;
1036
+ m = V.x, O = V.y;
1037
+ var x = l.hasOwnProperty("x"), B = l.hasOwnProperty("y"), R = le, C = oe, E = window;
1020
1038
  if (d) {
1021
- var f = Fe(r), E = "clientHeight", D = "clientWidth";
1022
- if (f === oe(r) && (f = ye(r), ge(f).position !== "static" && i === "absolute" && (E = "scrollHeight", D = "scrollWidth")), f = f, a === ne || (a === ae || a === ue) && o === Ne) {
1023
- O = ce;
1024
- var W = $ && f === S && S.visualViewport ? S.visualViewport.height : (
1039
+ var f = Ye(t), S = "clientHeight", P = "clientWidth";
1040
+ if (f === se(t) && (f = ke(t), ye(f).position !== "static" && o === "absolute" && (S = "scrollHeight", P = "scrollWidth")), f = f, n === oe || (n === le || n === fe) && i === He) {
1041
+ C = de;
1042
+ var N = w && f === E && E.visualViewport ? E.visualViewport.height : (
1025
1043
  // $FlowFixMe[prop-missing]
1026
- f[E]
1044
+ f[S]
1027
1045
  );
1028
- w -= W - n.height, w *= l ? 1 : -1;
1046
+ O -= N - r.height, O *= s ? 1 : -1;
1029
1047
  }
1030
- if (a === ae || (a === ne || a === ce) && o === Ne) {
1031
- L = ue;
1032
- var M = $ && f === S && S.visualViewport ? S.visualViewport.width : (
1048
+ if (n === le || (n === oe || n === de) && i === He) {
1049
+ R = fe;
1050
+ var I = w && f === E && E.visualViewport ? E.visualViewport.width : (
1033
1051
  // $FlowFixMe[prop-missing]
1034
- f[D]
1052
+ f[P]
1035
1053
  );
1036
- m -= M - n.width, m *= l ? 1 : -1;
1054
+ m -= I - r.width, m *= s ? 1 : -1;
1037
1055
  }
1038
1056
  }
1039
- var j = Object.assign({
1040
- position: i
1041
- }, d && xn), x = c === !0 ? wn({
1057
+ var _ = Object.assign({
1058
+ position: o
1059
+ }, d && An), T = c === !0 ? Dn({
1042
1060
  x: m,
1043
- y: w
1044
- }, oe(r)) : {
1061
+ y: O
1062
+ }, se(t)) : {
1045
1063
  x: m,
1046
- y: w
1064
+ y: O
1047
1065
  };
1048
- if (m = x.x, w = x.y, l) {
1049
- var C;
1050
- return Object.assign({}, j, (C = {}, C[O] = R ? "0" : "", C[L] = V ? "0" : "", C.transform = (S.devicePixelRatio || 1) <= 1 ? "translate(" + m + "px, " + w + "px)" : "translate3d(" + m + "px, " + w + "px, 0)", C));
1066
+ if (m = T.x, O = T.y, s) {
1067
+ var D;
1068
+ return Object.assign({}, _, (D = {}, D[C] = B ? "0" : "", D[R] = x ? "0" : "", D.transform = (E.devicePixelRatio || 1) <= 1 ? "translate(" + m + "px, " + O + "px)" : "translate3d(" + m + "px, " + O + "px, 0)", D));
1051
1069
  }
1052
- return Object.assign({}, j, (t = {}, t[O] = R ? w + "px" : "", t[L] = V ? m + "px" : "", t.transform = "", t));
1053
- }
1054
- function On(e) {
1055
- var t = e.state, r = e.options, n = r.gpuAcceleration, a = n === void 0 ? !0 : n, o = r.adaptive, s = o === void 0 ? !0 : o, i = r.roundOffsets, l = i === void 0 ? !0 : i, d = {
1056
- placement: pe(t.placement),
1057
- variation: Be(t.placement),
1058
- popper: t.elements.popper,
1059
- popperRect: t.rects.popper,
1060
- gpuAcceleration: a,
1061
- isFixed: t.options.strategy === "fixed"
1070
+ return Object.assign({}, _, (a = {}, a[C] = B ? O + "px" : "", a[R] = x ? m + "px" : "", a.transform = "", a));
1071
+ }
1072
+ function Pn(e) {
1073
+ var a = e.state, t = e.options, r = t.gpuAcceleration, n = r === void 0 ? !0 : r, i = t.adaptive, l = i === void 0 ? !0 : i, o = t.roundOffsets, s = o === void 0 ? !0 : o, d = {
1074
+ placement: ge(a.placement),
1075
+ variation: ze(a.placement),
1076
+ popper: a.elements.popper,
1077
+ popperRect: a.rects.popper,
1078
+ gpuAcceleration: n,
1079
+ isFixed: a.options.strategy === "fixed"
1062
1080
  };
1063
- t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, Rt(Object.assign({}, d, {
1064
- offsets: t.modifiersData.popperOffsets,
1065
- position: t.options.strategy,
1066
- adaptive: s,
1067
- roundOffsets: l
1068
- })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, Rt(Object.assign({}, d, {
1069
- offsets: t.modifiersData.arrow,
1081
+ a.modifiersData.popperOffsets != null && (a.styles.popper = Object.assign({}, a.styles.popper, jt(Object.assign({}, d, {
1082
+ offsets: a.modifiersData.popperOffsets,
1083
+ position: a.options.strategy,
1084
+ adaptive: l,
1085
+ roundOffsets: s
1086
+ })))), a.modifiersData.arrow != null && (a.styles.arrow = Object.assign({}, a.styles.arrow, jt(Object.assign({}, d, {
1087
+ offsets: a.modifiersData.arrow,
1070
1088
  position: "absolute",
1071
1089
  adaptive: !1,
1072
- roundOffsets: l
1073
- })))), t.attributes.popper = Object.assign({}, t.attributes.popper, {
1074
- "data-popper-placement": t.placement
1090
+ roundOffsets: s
1091
+ })))), a.attributes.popper = Object.assign({}, a.attributes.popper, {
1092
+ "data-popper-placement": a.placement
1075
1093
  });
1076
1094
  }
1077
- const $n = {
1095
+ const zn = {
1078
1096
  name: "computeStyles",
1079
1097
  enabled: !0,
1080
1098
  phase: "beforeWrite",
1081
- fn: On,
1099
+ fn: Pn,
1082
1100
  data: {}
1083
1101
  };
1084
- var Ue = {
1102
+ var Ge = {
1085
1103
  passive: !0
1086
1104
  };
1087
- function kn(e) {
1088
- var t = e.state, r = e.instance, n = e.options, a = n.scroll, o = a === void 0 ? !0 : a, s = n.resize, i = s === void 0 ? !0 : s, l = oe(t.elements.popper), d = [].concat(t.scrollParents.reference, t.scrollParents.popper);
1089
- return o && d.forEach(function(c) {
1090
- c.addEventListener("scroll", r.update, Ue);
1091
- }), i && l.addEventListener("resize", r.update, Ue), function() {
1092
- o && d.forEach(function(c) {
1093
- c.removeEventListener("scroll", r.update, Ue);
1094
- }), i && l.removeEventListener("resize", r.update, Ue);
1105
+ function Rn(e) {
1106
+ var a = e.state, t = e.instance, r = e.options, n = r.scroll, i = n === void 0 ? !0 : n, l = r.resize, o = l === void 0 ? !0 : l, s = se(a.elements.popper), d = [].concat(a.scrollParents.reference, a.scrollParents.popper);
1107
+ return i && d.forEach(function(c) {
1108
+ c.addEventListener("scroll", t.update, Ge);
1109
+ }), o && s.addEventListener("resize", t.update, Ge), function() {
1110
+ i && d.forEach(function(c) {
1111
+ c.removeEventListener("scroll", t.update, Ge);
1112
+ }), o && s.removeEventListener("resize", t.update, Ge);
1095
1113
  };
1096
1114
  }
1097
- const Tn = {
1115
+ const Ln = {
1098
1116
  name: "eventListeners",
1099
1117
  enabled: !0,
1100
1118
  phase: "write",
1101
1119
  fn: function() {
1102
1120
  },
1103
- effect: kn,
1121
+ effect: Rn,
1104
1122
  data: {}
1105
1123
  };
1106
- var Sn = {
1124
+ var Wn = {
1107
1125
  left: "right",
1108
1126
  right: "left",
1109
1127
  bottom: "top",
1110
1128
  top: "bottom"
1111
1129
  };
1112
- function Xe(e) {
1113
- return e.replace(/left|right|bottom|top/g, function(t) {
1114
- return Sn[t];
1130
+ function Qe(e) {
1131
+ return e.replace(/left|right|bottom|top/g, function(a) {
1132
+ return Wn[a];
1115
1133
  });
1116
1134
  }
1117
- var Cn = {
1135
+ var Mn = {
1118
1136
  start: "end",
1119
1137
  end: "start"
1120
1138
  };
1121
- function At(e) {
1122
- return e.replace(/start|end/g, function(t) {
1123
- return Cn[t];
1139
+ function Nt(e) {
1140
+ return e.replace(/start|end/g, function(a) {
1141
+ return Mn[a];
1124
1142
  });
1125
1143
  }
1126
- function wt(e) {
1127
- var t = oe(e), r = t.pageXOffset, n = t.pageYOffset;
1144
+ function Ct(e) {
1145
+ var a = se(e), t = a.pageXOffset, r = a.pageYOffset;
1128
1146
  return {
1129
- scrollLeft: r,
1130
- scrollTop: n
1147
+ scrollLeft: t,
1148
+ scrollTop: r
1131
1149
  };
1132
1150
  }
1133
- function Ot(e) {
1134
- return Ve(ye(e)).left + wt(e).scrollLeft;
1135
- }
1136
- function Pn(e, t) {
1137
- var r = oe(e), n = ye(e), a = r.visualViewport, o = n.clientWidth, s = n.clientHeight, i = 0, l = 0;
1138
- if (a) {
1139
- o = a.width, s = a.height;
1140
- var d = er();
1141
- (d || !d && t === "fixed") && (i = a.offsetLeft, l = a.offsetTop);
1151
+ function St(e) {
1152
+ return Pe(ke(e)).left + Ct(e).scrollLeft;
1153
+ }
1154
+ function jn(e, a) {
1155
+ var t = se(e), r = ke(e), n = t.visualViewport, i = r.clientWidth, l = r.clientHeight, o = 0, s = 0;
1156
+ if (n) {
1157
+ i = n.width, l = n.height;
1158
+ var d = la();
1159
+ (d || !d && a === "fixed") && (o = n.offsetLeft, s = n.offsetTop);
1142
1160
  }
1143
1161
  return {
1144
- width: o,
1145
- height: s,
1146
- x: i + Ot(e),
1147
- y: l
1162
+ width: i,
1163
+ height: l,
1164
+ x: o + St(e),
1165
+ y: s
1148
1166
  };
1149
1167
  }
1150
- function En(e) {
1151
- var t, r = ye(e), n = wt(e), a = (t = e.ownerDocument) == null ? void 0 : t.body, o = Oe(r.scrollWidth, r.clientWidth, a ? a.scrollWidth : 0, a ? a.clientWidth : 0), s = Oe(r.scrollHeight, r.clientHeight, a ? a.scrollHeight : 0, a ? a.clientHeight : 0), i = -n.scrollLeft + Ot(e), l = -n.scrollTop;
1152
- return ge(a || r).direction === "rtl" && (i += Oe(r.clientWidth, a ? a.clientWidth : 0) - o), {
1153
- width: o,
1154
- height: s,
1155
- x: i,
1156
- y: l
1168
+ function Nn(e) {
1169
+ var a, t = ke(e), r = Ct(e), n = (a = e.ownerDocument) == null ? void 0 : a.body, i = Ce(t.scrollWidth, t.clientWidth, n ? n.scrollWidth : 0, n ? n.clientWidth : 0), l = Ce(t.scrollHeight, t.clientHeight, n ? n.scrollHeight : 0, n ? n.clientHeight : 0), o = -r.scrollLeft + St(e), s = -r.scrollTop;
1170
+ return ye(n || t).direction === "rtl" && (o += Ce(t.clientWidth, n ? n.clientWidth : 0) - i), {
1171
+ width: i,
1172
+ height: l,
1173
+ x: o,
1174
+ y: s
1157
1175
  };
1158
1176
  }
1159
- function $t(e) {
1160
- var t = ge(e), r = t.overflow, n = t.overflowX, a = t.overflowY;
1161
- return /auto|scroll|overlay|hidden/.test(r + a + n);
1177
+ function Tt(e) {
1178
+ var a = ye(e), t = a.overflow, r = a.overflowX, n = a.overflowY;
1179
+ return /auto|scroll|overlay|hidden/.test(t + n + r);
1162
1180
  }
1163
- function ir(e) {
1164
- return ["html", "body", "#document"].indexOf(ve(e)) >= 0 ? e.ownerDocument.body : le(e) && $t(e) ? e : ir(tt(e));
1181
+ function fa(e) {
1182
+ return ["html", "body", "#document"].indexOf(he(e)) >= 0 ? e.ownerDocument.body : ue(e) && Tt(e) ? e : fa(rt(e));
1165
1183
  }
1166
- function Le(e, t) {
1167
- var r;
1168
- t === void 0 && (t = []);
1169
- var n = ir(e), a = n === ((r = e.ownerDocument) == null ? void 0 : r.body), o = oe(n), s = a ? [o].concat(o.visualViewport || [], $t(n) ? n : []) : n, i = t.concat(s);
1170
- return a ? i : (
1184
+ function Ne(e, a) {
1185
+ var t;
1186
+ a === void 0 && (a = []);
1187
+ var r = fa(e), n = r === ((t = e.ownerDocument) == null ? void 0 : t.body), i = se(r), l = n ? [i].concat(i.visualViewport || [], Tt(r) ? r : []) : r, o = a.concat(l);
1188
+ return n ? o : (
1171
1189
  // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
1172
- i.concat(Le(tt(s)))
1190
+ o.concat(Ne(rt(l)))
1173
1191
  );
1174
1192
  }
1175
- function ft(e) {
1193
+ function mt(e) {
1176
1194
  return Object.assign({}, e, {
1177
1195
  left: e.x,
1178
1196
  top: e.y,
@@ -1180,419 +1198,419 @@ function ft(e) {
1180
1198
  bottom: e.y + e.height
1181
1199
  });
1182
1200
  }
1183
- function Vn(e, t) {
1184
- var r = Ve(e, !1, t === "fixed");
1185
- return r.top = r.top + e.clientTop, r.left = r.left + e.clientLeft, r.bottom = r.top + e.clientHeight, r.right = r.left + e.clientWidth, r.width = e.clientWidth, r.height = e.clientHeight, r.x = r.left, r.y = r.top, r;
1201
+ function In(e, a) {
1202
+ var t = Pe(e, !1, a === "fixed");
1203
+ return t.top = t.top + e.clientTop, t.left = t.left + e.clientLeft, t.bottom = t.top + e.clientHeight, t.right = t.left + e.clientWidth, t.width = e.clientWidth, t.height = e.clientHeight, t.x = t.left, t.y = t.top, t;
1186
1204
  }
1187
- function zt(e, t, r) {
1188
- return t === Zt ? ft(Pn(e, r)) : ke(t) ? Vn(t, r) : ft(En(ye(e)));
1205
+ function It(e, a, t) {
1206
+ return a === ia ? mt(jn(e, t)) : Se(a) ? In(a, t) : mt(Nn(ke(e)));
1189
1207
  }
1190
- function Bn(e) {
1191
- var t = Le(tt(e)), r = ["absolute", "fixed"].indexOf(ge(e).position) >= 0, n = r && le(e) ? Fe(e) : e;
1192
- return ke(n) ? t.filter(function(a) {
1193
- return ke(a) && tr(a, n) && ve(a) !== "body";
1208
+ function _n(e) {
1209
+ var a = Ne(rt(e)), t = ["absolute", "fixed"].indexOf(ye(e).position) >= 0, r = t && ue(e) ? Ye(e) : e;
1210
+ return Se(r) ? a.filter(function(n) {
1211
+ return Se(n) && sa(n, r) && he(n) !== "body";
1194
1212
  }) : [];
1195
1213
  }
1196
- function Dn(e, t, r, n) {
1197
- var a = t === "clippingParents" ? Bn(e) : [].concat(t), o = [].concat(a, [r]), s = o[0], i = o.reduce(function(l, d) {
1198
- var c = zt(e, d, n);
1199
- return l.top = Oe(c.top, l.top), l.right = Ge(c.right, l.right), l.bottom = Ge(c.bottom, l.bottom), l.left = Oe(c.left, l.left), l;
1200
- }, zt(e, s, n));
1201
- return i.width = i.right - i.left, i.height = i.bottom - i.top, i.x = i.left, i.y = i.top, i;
1202
- }
1203
- function or(e) {
1204
- var t = e.reference, r = e.element, n = e.placement, a = n ? pe(n) : null, o = n ? Be(n) : null, s = t.x + t.width / 2 - r.width / 2, i = t.y + t.height / 2 - r.height / 2, l;
1205
- switch (a) {
1206
- case ne:
1207
- l = {
1208
- x: s,
1209
- y: t.y - r.height
1214
+ function Fn(e, a, t, r) {
1215
+ var n = a === "clippingParents" ? _n(e) : [].concat(a), i = [].concat(n, [t]), l = i[0], o = i.reduce(function(s, d) {
1216
+ var c = It(e, d, r);
1217
+ return s.top = Ce(c.top, s.top), s.right = Ze(c.right, s.right), s.bottom = Ze(c.bottom, s.bottom), s.left = Ce(c.left, s.left), s;
1218
+ }, It(e, l, r));
1219
+ return o.width = o.right - o.left, o.height = o.bottom - o.top, o.x = o.left, o.y = o.top, o;
1220
+ }
1221
+ function pa(e) {
1222
+ var a = e.reference, t = e.element, r = e.placement, n = r ? ge(r) : null, i = r ? ze(r) : null, l = a.x + a.width / 2 - t.width / 2, o = a.y + a.height / 2 - t.height / 2, s;
1223
+ switch (n) {
1224
+ case oe:
1225
+ s = {
1226
+ x: l,
1227
+ y: a.y - t.height
1210
1228
  };
1211
1229
  break;
1212
- case ce:
1213
- l = {
1214
- x: s,
1215
- y: t.y + t.height
1230
+ case de:
1231
+ s = {
1232
+ x: l,
1233
+ y: a.y + a.height
1216
1234
  };
1217
1235
  break;
1218
- case ue:
1219
- l = {
1220
- x: t.x + t.width,
1221
- y: i
1236
+ case fe:
1237
+ s = {
1238
+ x: a.x + a.width,
1239
+ y: o
1222
1240
  };
1223
1241
  break;
1224
- case ae:
1225
- l = {
1226
- x: t.x - r.width,
1227
- y: i
1242
+ case le:
1243
+ s = {
1244
+ x: a.x - t.width,
1245
+ y: o
1228
1246
  };
1229
1247
  break;
1230
1248
  default:
1231
- l = {
1232
- x: t.x,
1233
- y: t.y
1249
+ s = {
1250
+ x: a.x,
1251
+ y: a.y
1234
1252
  };
1235
1253
  }
1236
- var d = a ? xt(a) : null;
1254
+ var d = n ? Ot(n) : null;
1237
1255
  if (d != null) {
1238
1256
  var c = d === "y" ? "height" : "width";
1239
- switch (o) {
1240
- case Pe:
1241
- l[d] = l[d] - (t[c] / 2 - r[c] / 2);
1257
+ switch (i) {
1258
+ case Ae:
1259
+ s[d] = s[d] - (a[c] / 2 - t[c] / 2);
1242
1260
  break;
1243
- case Ne:
1244
- l[d] = l[d] + (t[c] / 2 - r[c] / 2);
1261
+ case He:
1262
+ s[d] = s[d] + (a[c] / 2 - t[c] / 2);
1245
1263
  break;
1246
1264
  }
1247
1265
  }
1248
- return l;
1266
+ return s;
1249
1267
  }
1250
- function Ie(e, t) {
1251
- t === void 0 && (t = {});
1252
- var r = t, n = r.placement, a = n === void 0 ? e.placement : n, o = r.strategy, s = o === void 0 ? e.strategy : o, i = r.boundary, l = i === void 0 ? Gr : i, d = r.rootBoundary, c = d === void 0 ? Zt : d, $ = r.elementContext, P = $ === void 0 ? ze : $, m = r.altBoundary, b = m === void 0 ? !1 : m, w = r.padding, T = w === void 0 ? 0 : w, V = nr(typeof T != "number" ? T : ar(T, _e)), R = P === ze ? Zr : ze, L = e.rects.popper, O = e.elements[b ? R : P], S = Dn(ke(O) ? O : O.contextElement || ye(e.elements.popper), l, c, s), f = Ve(e.elements.reference), E = or({
1268
+ function Ue(e, a) {
1269
+ a === void 0 && (a = {});
1270
+ var t = a, r = t.placement, n = r === void 0 ? e.placement : r, i = t.strategy, l = i === void 0 ? e.strategy : i, o = t.boundary, s = o === void 0 ? cn : o, d = t.rootBoundary, c = d === void 0 ? ia : d, w = t.elementContext, $ = w === void 0 ? We : w, m = t.altBoundary, k = m === void 0 ? !1 : m, O = t.padding, V = O === void 0 ? 0 : O, x = ua(typeof V != "number" ? V : da(V, qe)), B = $ === We ? un : We, R = e.rects.popper, C = e.elements[k ? B : $], E = Fn(Se(C) ? C : C.contextElement || ke(e.elements.popper), s, c, l), f = Pe(e.elements.reference), S = pa({
1253
1271
  reference: f,
1254
- element: L,
1255
- placement: a
1256
- }), D = ft(Object.assign({}, L, E)), W = P === ze ? D : f, M = {
1257
- top: S.top - W.top + V.top,
1258
- bottom: W.bottom - S.bottom + V.bottom,
1259
- left: S.left - W.left + V.left,
1260
- right: W.right - S.right + V.right
1261
- }, j = e.modifiersData.offset;
1262
- if (P === ze && j) {
1263
- var x = j[a];
1264
- Object.keys(M).forEach(function(C) {
1265
- var U = [ue, ce].indexOf(C) >= 0 ? 1 : -1, Q = [ne, ce].indexOf(C) >= 0 ? "y" : "x";
1266
- M[C] += x[Q] * U;
1272
+ element: R,
1273
+ placement: n
1274
+ }), P = mt(Object.assign({}, R, S)), N = $ === We ? P : f, I = {
1275
+ top: E.top - N.top + x.top,
1276
+ bottom: N.bottom - E.bottom + x.bottom,
1277
+ left: E.left - N.left + x.left,
1278
+ right: N.right - E.right + x.right
1279
+ }, _ = e.modifiersData.offset;
1280
+ if ($ === We && _) {
1281
+ var T = _[n];
1282
+ Object.keys(I).forEach(function(D) {
1283
+ var X = [fe, de].indexOf(D) >= 0 ? 1 : -1, te = [oe, de].indexOf(D) >= 0 ? "y" : "x";
1284
+ I[D] += T[te] * X;
1267
1285
  });
1268
1286
  }
1269
- return M;
1270
- }
1271
- function Rn(e, t) {
1272
- t === void 0 && (t = {});
1273
- var r = t, n = r.placement, a = r.boundary, o = r.rootBoundary, s = r.padding, i = r.flipVariations, l = r.allowedAutoPlacements, d = l === void 0 ? Jt : l, c = Be(n), $ = c ? i ? Bt : Bt.filter(function(b) {
1274
- return Be(b) === c;
1275
- }) : _e, P = $.filter(function(b) {
1276
- return d.indexOf(b) >= 0;
1287
+ return I;
1288
+ }
1289
+ function Hn(e, a) {
1290
+ a === void 0 && (a = {});
1291
+ var t = a, r = t.placement, n = t.boundary, i = t.rootBoundary, l = t.padding, o = t.flipVariations, s = t.allowedAutoPlacements, d = s === void 0 ? oa : s, c = ze(r), w = c ? o ? Wt : Wt.filter(function(k) {
1292
+ return ze(k) === c;
1293
+ }) : qe, $ = w.filter(function(k) {
1294
+ return d.indexOf(k) >= 0;
1277
1295
  });
1278
- P.length === 0 && (P = $);
1279
- var m = P.reduce(function(b, w) {
1280
- return b[w] = Ie(e, {
1281
- placement: w,
1282
- boundary: a,
1283
- rootBoundary: o,
1284
- padding: s
1285
- })[pe(w)], b;
1296
+ $.length === 0 && ($ = w);
1297
+ var m = $.reduce(function(k, O) {
1298
+ return k[O] = Ue(e, {
1299
+ placement: O,
1300
+ boundary: n,
1301
+ rootBoundary: i,
1302
+ padding: l
1303
+ })[ge(O)], k;
1286
1304
  }, {});
1287
- return Object.keys(m).sort(function(b, w) {
1288
- return m[b] - m[w];
1305
+ return Object.keys(m).sort(function(k, O) {
1306
+ return m[k] - m[O];
1289
1307
  });
1290
1308
  }
1291
- function An(e) {
1292
- if (pe(e) === ht)
1309
+ function Un(e) {
1310
+ if (ge(e) === xt)
1293
1311
  return [];
1294
- var t = Xe(e);
1295
- return [At(e), t, At(t)];
1296
- }
1297
- function zn(e) {
1298
- var t = e.state, r = e.options, n = e.name;
1299
- if (!t.modifiersData[n]._skip) {
1300
- for (var a = r.mainAxis, o = a === void 0 ? !0 : a, s = r.altAxis, i = s === void 0 ? !0 : s, l = r.fallbackPlacements, d = r.padding, c = r.boundary, $ = r.rootBoundary, P = r.altBoundary, m = r.flipVariations, b = m === void 0 ? !0 : m, w = r.allowedAutoPlacements, T = t.options.placement, V = pe(T), R = V === T, L = l || (R || !b ? [Xe(T)] : An(T)), O = [T].concat(L).reduce(function(he, fe) {
1301
- return he.concat(pe(fe) === ht ? Rn(t, {
1302
- placement: fe,
1312
+ var a = Qe(e);
1313
+ return [Nt(e), a, Nt(a)];
1314
+ }
1315
+ function qn(e) {
1316
+ var a = e.state, t = e.options, r = e.name;
1317
+ if (!a.modifiersData[r]._skip) {
1318
+ for (var n = t.mainAxis, i = n === void 0 ? !0 : n, l = t.altAxis, o = l === void 0 ? !0 : l, s = t.fallbackPlacements, d = t.padding, c = t.boundary, w = t.rootBoundary, $ = t.altBoundary, m = t.flipVariations, k = m === void 0 ? !0 : m, O = t.allowedAutoPlacements, V = a.options.placement, x = ge(V), B = x === V, R = s || (B || !k ? [Qe(V)] : Un(V)), C = [V].concat(R).reduce(function(ae, me) {
1319
+ return ae.concat(ge(me) === xt ? Hn(a, {
1320
+ placement: me,
1303
1321
  boundary: c,
1304
- rootBoundary: $,
1322
+ rootBoundary: w,
1305
1323
  padding: d,
1306
- flipVariations: b,
1307
- allowedAutoPlacements: w
1308
- }) : fe);
1309
- }, []), S = t.rects.reference, f = t.rects.popper, E = /* @__PURE__ */ new Map(), D = !0, W = O[0], M = 0; M < O.length; M++) {
1310
- var j = O[M], x = pe(j), C = Be(j) === Pe, U = [ne, ce].indexOf(x) >= 0, Q = U ? "width" : "height", u = Ie(t, {
1311
- placement: j,
1324
+ flipVariations: k,
1325
+ allowedAutoPlacements: O
1326
+ }) : me);
1327
+ }, []), E = a.rects.reference, f = a.rects.popper, S = /* @__PURE__ */ new Map(), P = !0, N = C[0], I = 0; I < C.length; I++) {
1328
+ var _ = C[I], T = ge(_), D = ze(_) === Ae, X = [oe, de].indexOf(T) >= 0, te = X ? "width" : "height", u = Ue(a, {
1329
+ placement: _,
1312
1330
  boundary: c,
1313
- rootBoundary: $,
1314
- altBoundary: P,
1331
+ rootBoundary: w,
1332
+ altBoundary: $,
1315
1333
  padding: d
1316
- }), v = U ? C ? ue : ae : C ? ce : ne;
1317
- S[Q] > f[Q] && (v = Xe(v));
1318
- var B = Xe(v), I = [];
1319
- if (o && I.push(u[x] <= 0), i && I.push(u[v] <= 0, u[B] <= 0), I.every(function(he) {
1320
- return he;
1334
+ }), b = X ? D ? fe : le : D ? de : oe;
1335
+ E[te] > f[te] && (b = Qe(b));
1336
+ var z = Qe(b), q = [];
1337
+ if (i && q.push(u[T] <= 0), o && q.push(u[b] <= 0, u[z] <= 0), q.every(function(ae) {
1338
+ return ae;
1321
1339
  })) {
1322
- W = j, D = !1;
1340
+ N = _, P = !1;
1323
1341
  break;
1324
1342
  }
1325
- E.set(j, I);
1343
+ S.set(_, q);
1326
1344
  }
1327
- if (D)
1328
- for (var g = b ? 3 : 1, _ = function(fe) {
1329
- var xe = O.find(function(Te) {
1330
- var me = E.get(Te);
1331
- if (me)
1332
- return me.slice(0, fe).every(function(Re) {
1345
+ if (P)
1346
+ for (var re = k ? 3 : 1, h = function(me) {
1347
+ var $e = C.find(function(Te) {
1348
+ var be = S.get(Te);
1349
+ if (be)
1350
+ return be.slice(0, me).every(function(Re) {
1333
1351
  return Re;
1334
1352
  });
1335
1353
  });
1336
- if (xe)
1337
- return W = xe, "break";
1338
- }, Y = g; Y > 0; Y--) {
1339
- var G = _(Y);
1340
- if (G === "break") break;
1354
+ if ($e)
1355
+ return N = $e, "break";
1356
+ }, H = re; H > 0; H--) {
1357
+ var Y = h(H);
1358
+ if (Y === "break") break;
1341
1359
  }
1342
- t.placement !== W && (t.modifiersData[n]._skip = !0, t.placement = W, t.reset = !0);
1360
+ a.placement !== N && (a.modifiersData[r]._skip = !0, a.placement = N, a.reset = !0);
1343
1361
  }
1344
1362
  }
1345
- const Wn = {
1363
+ const Yn = {
1346
1364
  name: "flip",
1347
1365
  enabled: !0,
1348
1366
  phase: "main",
1349
- fn: zn,
1367
+ fn: qn,
1350
1368
  requiresIfExists: ["offset"],
1351
1369
  data: {
1352
1370
  _skip: !1
1353
1371
  }
1354
1372
  };
1355
- function Wt(e, t, r) {
1356
- return r === void 0 && (r = {
1373
+ function _t(e, a, t) {
1374
+ return t === void 0 && (t = {
1357
1375
  x: 0,
1358
1376
  y: 0
1359
1377
  }), {
1360
- top: e.top - t.height - r.y,
1361
- right: e.right - t.width + r.x,
1362
- bottom: e.bottom - t.height + r.y,
1363
- left: e.left - t.width - r.x
1378
+ top: e.top - a.height - t.y,
1379
+ right: e.right - a.width + t.x,
1380
+ bottom: e.bottom - a.height + t.y,
1381
+ left: e.left - a.width - t.x
1364
1382
  };
1365
1383
  }
1366
- function Mt(e) {
1367
- return [ne, ue, ce, ae].some(function(t) {
1368
- return e[t] >= 0;
1384
+ function Ft(e) {
1385
+ return [oe, fe, de, le].some(function(a) {
1386
+ return e[a] >= 0;
1369
1387
  });
1370
1388
  }
1371
- function Mn(e) {
1372
- var t = e.state, r = e.name, n = t.rects.reference, a = t.rects.popper, o = t.modifiersData.preventOverflow, s = Ie(t, {
1389
+ function Xn(e) {
1390
+ var a = e.state, t = e.name, r = a.rects.reference, n = a.rects.popper, i = a.modifiersData.preventOverflow, l = Ue(a, {
1373
1391
  elementContext: "reference"
1374
- }), i = Ie(t, {
1392
+ }), o = Ue(a, {
1375
1393
  altBoundary: !0
1376
- }), l = Wt(s, n), d = Wt(i, a, o), c = Mt(l), $ = Mt(d);
1377
- t.modifiersData[r] = {
1378
- referenceClippingOffsets: l,
1394
+ }), s = _t(l, r), d = _t(o, n, i), c = Ft(s), w = Ft(d);
1395
+ a.modifiersData[t] = {
1396
+ referenceClippingOffsets: s,
1379
1397
  popperEscapeOffsets: d,
1380
1398
  isReferenceHidden: c,
1381
- hasPopperEscaped: $
1382
- }, t.attributes.popper = Object.assign({}, t.attributes.popper, {
1399
+ hasPopperEscaped: w
1400
+ }, a.attributes.popper = Object.assign({}, a.attributes.popper, {
1383
1401
  "data-popper-reference-hidden": c,
1384
- "data-popper-escaped": $
1402
+ "data-popper-escaped": w
1385
1403
  });
1386
1404
  }
1387
- const Ln = {
1405
+ const Kn = {
1388
1406
  name: "hide",
1389
1407
  enabled: !0,
1390
1408
  phase: "main",
1391
1409
  requiresIfExists: ["preventOverflow"],
1392
- fn: Mn
1410
+ fn: Xn
1393
1411
  };
1394
- function jn(e, t, r) {
1395
- var n = pe(e), a = [ae, ne].indexOf(n) >= 0 ? -1 : 1, o = typeof r == "function" ? r(Object.assign({}, t, {
1412
+ function Gn(e, a, t) {
1413
+ var r = ge(e), n = [le, oe].indexOf(r) >= 0 ? -1 : 1, i = typeof t == "function" ? t(Object.assign({}, a, {
1396
1414
  placement: e
1397
- })) : r, s = o[0], i = o[1];
1398
- return s = s || 0, i = (i || 0) * a, [ae, ue].indexOf(n) >= 0 ? {
1399
- x: i,
1400
- y: s
1415
+ })) : t, l = i[0], o = i[1];
1416
+ return l = l || 0, o = (o || 0) * n, [le, fe].indexOf(r) >= 0 ? {
1417
+ x: o,
1418
+ y: l
1401
1419
  } : {
1402
- x: s,
1403
- y: i
1420
+ x: l,
1421
+ y: o
1404
1422
  };
1405
1423
  }
1406
- function Nn(e) {
1407
- var t = e.state, r = e.options, n = e.name, a = r.offset, o = a === void 0 ? [0, 0] : a, s = Jt.reduce(function(c, $) {
1408
- return c[$] = jn($, t.rects, o), c;
1409
- }, {}), i = s[t.placement], l = i.x, d = i.y;
1410
- t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += l, t.modifiersData.popperOffsets.y += d), t.modifiersData[n] = s;
1424
+ function Qn(e) {
1425
+ var a = e.state, t = e.options, r = e.name, n = t.offset, i = n === void 0 ? [0, 0] : n, l = oa.reduce(function(c, w) {
1426
+ return c[w] = Gn(w, a.rects, i), c;
1427
+ }, {}), o = l[a.placement], s = o.x, d = o.y;
1428
+ a.modifiersData.popperOffsets != null && (a.modifiersData.popperOffsets.x += s, a.modifiersData.popperOffsets.y += d), a.modifiersData[r] = l;
1411
1429
  }
1412
- const In = {
1430
+ const Zn = {
1413
1431
  name: "offset",
1414
1432
  enabled: !0,
1415
1433
  phase: "main",
1416
1434
  requires: ["popperOffsets"],
1417
- fn: Nn
1435
+ fn: Qn
1418
1436
  };
1419
- function _n(e) {
1420
- var t = e.state, r = e.name;
1421
- t.modifiersData[r] = or({
1422
- reference: t.rects.reference,
1423
- element: t.rects.popper,
1424
- placement: t.placement
1437
+ function Jn(e) {
1438
+ var a = e.state, t = e.name;
1439
+ a.modifiersData[t] = pa({
1440
+ reference: a.rects.reference,
1441
+ element: a.rects.popper,
1442
+ placement: a.placement
1425
1443
  });
1426
1444
  }
1427
- const Fn = {
1445
+ const er = {
1428
1446
  name: "popperOffsets",
1429
1447
  enabled: !0,
1430
1448
  phase: "read",
1431
- fn: _n,
1449
+ fn: Jn,
1432
1450
  data: {}
1433
1451
  };
1434
- function Hn(e) {
1452
+ function tr(e) {
1435
1453
  return e === "x" ? "y" : "x";
1436
1454
  }
1437
- function qn(e) {
1438
- var t = e.state, r = e.options, n = e.name, a = r.mainAxis, o = a === void 0 ? !0 : a, s = r.altAxis, i = s === void 0 ? !1 : s, l = r.boundary, d = r.rootBoundary, c = r.altBoundary, $ = r.padding, P = r.tether, m = P === void 0 ? !0 : P, b = r.tetherOffset, w = b === void 0 ? 0 : b, T = Ie(t, {
1439
- boundary: l,
1455
+ function ar(e) {
1456
+ var a = e.state, t = e.options, r = e.name, n = t.mainAxis, i = n === void 0 ? !0 : n, l = t.altAxis, o = l === void 0 ? !1 : l, s = t.boundary, d = t.rootBoundary, c = t.altBoundary, w = t.padding, $ = t.tether, m = $ === void 0 ? !0 : $, k = t.tetherOffset, O = k === void 0 ? 0 : k, V = Ue(a, {
1457
+ boundary: s,
1440
1458
  rootBoundary: d,
1441
- padding: $,
1459
+ padding: w,
1442
1460
  altBoundary: c
1443
- }), V = pe(t.placement), R = Be(t.placement), L = !R, O = xt(V), S = Hn(O), f = t.modifiersData.popperOffsets, E = t.rects.reference, D = t.rects.popper, W = typeof w == "function" ? w(Object.assign({}, t.rects, {
1444
- placement: t.placement
1445
- })) : w, M = typeof W == "number" ? {
1446
- mainAxis: W,
1447
- altAxis: W
1461
+ }), x = ge(a.placement), B = ze(a.placement), R = !B, C = Ot(x), E = tr(C), f = a.modifiersData.popperOffsets, S = a.rects.reference, P = a.rects.popper, N = typeof O == "function" ? O(Object.assign({}, a.rects, {
1462
+ placement: a.placement
1463
+ })) : O, I = typeof N == "number" ? {
1464
+ mainAxis: N,
1465
+ altAxis: N
1448
1466
  } : Object.assign({
1449
1467
  mainAxis: 0,
1450
1468
  altAxis: 0
1451
- }, W), j = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, x = {
1469
+ }, N), _ = a.modifiersData.offset ? a.modifiersData.offset[a.placement] : null, T = {
1452
1470
  x: 0,
1453
1471
  y: 0
1454
1472
  };
1455
1473
  if (f) {
1456
- if (o) {
1457
- var C, U = O === "y" ? ne : ae, Q = O === "y" ? ce : ue, u = O === "y" ? "height" : "width", v = f[O], B = v + T[U], I = v - T[Q], g = m ? -D[u] / 2 : 0, _ = R === Pe ? E[u] : D[u], Y = R === Pe ? -D[u] : -E[u], G = t.elements.arrow, he = m && G ? yt(G) : {
1474
+ if (i) {
1475
+ var D, X = C === "y" ? oe : le, te = C === "y" ? de : fe, u = C === "y" ? "height" : "width", b = f[C], z = b + V[X], q = b - V[te], re = m ? -P[u] / 2 : 0, h = B === Ae ? S[u] : P[u], H = B === Ae ? -P[u] : -S[u], Y = a.elements.arrow, ae = m && Y ? $t(Y) : {
1458
1476
  width: 0,
1459
1477
  height: 0
1460
- }, fe = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : rr(), xe = fe[U], Te = fe[Q], me = Me(0, E[u], he[u]), Re = L ? E[u] / 2 - g - me - xe - M.mainAxis : _ - me - xe - M.mainAxis, He = L ? -E[u] / 2 + g + me + Te + M.mainAxis : Y + me + Te + M.mainAxis, Ae = t.elements.arrow && Fe(t.elements.arrow), rt = Ae ? O === "y" ? Ae.clientTop || 0 : Ae.clientLeft || 0 : 0, p = (C = j?.[O]) != null ? C : 0, N = v + Re - p - rt, A = v + He - p, se = Me(m ? Ge(B, N) : B, v, m ? Oe(I, A) : I);
1461
- f[O] = se, x[O] = se - v;
1478
+ }, me = a.modifiersData["arrow#persistent"] ? a.modifiersData["arrow#persistent"].padding : ca(), $e = me[X], Te = me[te], be = je(0, S[u], ae[u]), Re = R ? S[u] / 2 - re - be - $e - I.mainAxis : h - be - $e - I.mainAxis, Xe = R ? -S[u] / 2 + re + be + Te + I.mainAxis : H + be + Te + I.mainAxis, Le = a.elements.arrow && Ye(a.elements.arrow), it = Le ? C === "y" ? Le.clientTop || 0 : Le.clientLeft || 0 : 0, g = (D = _?.[C]) != null ? D : 0, U = b + Re - g - it, L = b + Xe - g, ce = je(m ? Ze(z, U) : z, b, m ? Ce(q, L) : q);
1479
+ f[C] = ce, T[C] = ce - b;
1462
1480
  }
1463
- if (i) {
1464
- var J, nt = O === "x" ? ne : ae, kt = O === "x" ? ce : ue, we = f[S], qe = S === "y" ? "height" : "width", Tt = we + T[nt], St = we - T[kt], at = [ne, ae].indexOf(V) !== -1, Ct = (J = j?.[S]) != null ? J : 0, Pt = at ? Tt : we - E[qe] - D[qe] - Ct + M.altAxis, Et = at ? we + E[qe] + D[qe] - Ct - M.altAxis : St, Vt = m && at ? mn(Pt, we, Et) : Me(m ? Pt : Tt, we, m ? Et : St);
1465
- f[S] = Vt, x[S] = Vt - we;
1481
+ if (o) {
1482
+ var ie, ot = C === "x" ? oe : le, Vt = C === "x" ? de : fe, Oe = f[E], Ke = E === "y" ? "height" : "width", Bt = Oe + V[ot], Et = Oe - V[Vt], lt = [oe, le].indexOf(x) !== -1, At = (ie = _?.[E]) != null ? ie : 0, Dt = lt ? Bt : Oe - S[Ke] - P[Ke] - At + I.altAxis, Pt = lt ? Oe + S[Ke] + P[Ke] - At - I.altAxis : Et, zt = m && lt ? Sn(Dt, Oe, Pt) : je(m ? Dt : Bt, Oe, m ? Pt : Et);
1483
+ f[E] = zt, T[E] = zt - Oe;
1466
1484
  }
1467
- t.modifiersData[n] = x;
1485
+ a.modifiersData[r] = T;
1468
1486
  }
1469
1487
  }
1470
- const Un = {
1488
+ const nr = {
1471
1489
  name: "preventOverflow",
1472
1490
  enabled: !0,
1473
1491
  phase: "main",
1474
- fn: qn,
1492
+ fn: ar,
1475
1493
  requiresIfExists: ["offset"]
1476
1494
  };
1477
- function Yn(e) {
1495
+ function rr(e) {
1478
1496
  return {
1479
1497
  scrollLeft: e.scrollLeft,
1480
1498
  scrollTop: e.scrollTop
1481
1499
  };
1482
1500
  }
1483
- function Xn(e) {
1484
- return e === oe(e) || !le(e) ? wt(e) : Yn(e);
1501
+ function ir(e) {
1502
+ return e === se(e) || !ue(e) ? Ct(e) : rr(e);
1485
1503
  }
1486
- function Kn(e) {
1487
- var t = e.getBoundingClientRect(), r = Ee(t.width) / e.offsetWidth || 1, n = Ee(t.height) / e.offsetHeight || 1;
1488
- return r !== 1 || n !== 1;
1504
+ function or(e) {
1505
+ var a = e.getBoundingClientRect(), t = De(a.width) / e.offsetWidth || 1, r = De(a.height) / e.offsetHeight || 1;
1506
+ return t !== 1 || r !== 1;
1489
1507
  }
1490
- function Qn(e, t, r) {
1491
- r === void 0 && (r = !1);
1492
- var n = le(t), a = le(t) && Kn(t), o = ye(t), s = Ve(e, a, r), i = {
1508
+ function lr(e, a, t) {
1509
+ t === void 0 && (t = !1);
1510
+ var r = ue(a), n = ue(a) && or(a), i = ke(a), l = Pe(e, n, t), o = {
1493
1511
  scrollLeft: 0,
1494
1512
  scrollTop: 0
1495
- }, l = {
1513
+ }, s = {
1496
1514
  x: 0,
1497
1515
  y: 0
1498
1516
  };
1499
- return (n || !n && !r) && ((ve(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
1500
- $t(o)) && (i = Xn(t)), le(t) ? (l = Ve(t, !0), l.x += t.clientLeft, l.y += t.clientTop) : o && (l.x = Ot(o))), {
1501
- x: s.left + i.scrollLeft - l.x,
1502
- y: s.top + i.scrollTop - l.y,
1503
- width: s.width,
1504
- height: s.height
1517
+ return (r || !r && !t) && ((he(a) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
1518
+ Tt(i)) && (o = ir(a)), ue(a) ? (s = Pe(a, !0), s.x += a.clientLeft, s.y += a.clientTop) : i && (s.x = St(i))), {
1519
+ x: l.left + o.scrollLeft - s.x,
1520
+ y: l.top + o.scrollTop - s.y,
1521
+ width: l.width,
1522
+ height: l.height
1505
1523
  };
1506
1524
  }
1507
- function Gn(e) {
1508
- var t = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set(), n = [];
1509
- e.forEach(function(o) {
1510
- t.set(o.name, o);
1525
+ function sr(e) {
1526
+ var a = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Set(), r = [];
1527
+ e.forEach(function(i) {
1528
+ a.set(i.name, i);
1511
1529
  });
1512
- function a(o) {
1513
- r.add(o.name);
1514
- var s = [].concat(o.requires || [], o.requiresIfExists || []);
1515
- s.forEach(function(i) {
1516
- if (!r.has(i)) {
1517
- var l = t.get(i);
1518
- l && a(l);
1530
+ function n(i) {
1531
+ t.add(i.name);
1532
+ var l = [].concat(i.requires || [], i.requiresIfExists || []);
1533
+ l.forEach(function(o) {
1534
+ if (!t.has(o)) {
1535
+ var s = a.get(o);
1536
+ s && n(s);
1519
1537
  }
1520
- }), n.push(o);
1538
+ }), r.push(i);
1521
1539
  }
1522
- return e.forEach(function(o) {
1523
- r.has(o.name) || a(o);
1524
- }), n;
1525
- }
1526
- function Zn(e) {
1527
- var t = Gn(e);
1528
- return cn.reduce(function(r, n) {
1529
- return r.concat(t.filter(function(a) {
1530
- return a.phase === n;
1540
+ return e.forEach(function(i) {
1541
+ t.has(i.name) || n(i);
1542
+ }), r;
1543
+ }
1544
+ function cr(e) {
1545
+ var a = sr(e);
1546
+ return wn.reduce(function(t, r) {
1547
+ return t.concat(a.filter(function(n) {
1548
+ return n.phase === r;
1531
1549
  }));
1532
1550
  }, []);
1533
1551
  }
1534
- function Jn(e) {
1535
- var t;
1552
+ function ur(e) {
1553
+ var a;
1536
1554
  return function() {
1537
- return t || (t = new Promise(function(r) {
1555
+ return a || (a = new Promise(function(t) {
1538
1556
  Promise.resolve().then(function() {
1539
- t = void 0, r(e());
1557
+ a = void 0, t(e());
1540
1558
  });
1541
- })), t;
1559
+ })), a;
1542
1560
  };
1543
1561
  }
1544
- function ea(e) {
1545
- var t = e.reduce(function(r, n) {
1546
- var a = r[n.name];
1547
- return r[n.name] = a ? Object.assign({}, a, n, {
1548
- options: Object.assign({}, a.options, n.options),
1549
- data: Object.assign({}, a.data, n.data)
1550
- }) : n, r;
1562
+ function dr(e) {
1563
+ var a = e.reduce(function(t, r) {
1564
+ var n = t[r.name];
1565
+ return t[r.name] = n ? Object.assign({}, n, r, {
1566
+ options: Object.assign({}, n.options, r.options),
1567
+ data: Object.assign({}, n.data, r.data)
1568
+ }) : r, t;
1551
1569
  }, {});
1552
- return Object.keys(t).map(function(r) {
1553
- return t[r];
1570
+ return Object.keys(a).map(function(t) {
1571
+ return a[t];
1554
1572
  });
1555
1573
  }
1556
- var Lt = {
1574
+ var Ht = {
1557
1575
  placement: "bottom",
1558
1576
  modifiers: [],
1559
1577
  strategy: "absolute"
1560
1578
  };
1561
- function jt() {
1562
- for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
1563
- t[r] = arguments[r];
1564
- return !t.some(function(n) {
1565
- return !(n && typeof n.getBoundingClientRect == "function");
1579
+ function Ut() {
1580
+ for (var e = arguments.length, a = new Array(e), t = 0; t < e; t++)
1581
+ a[t] = arguments[t];
1582
+ return !a.some(function(r) {
1583
+ return !(r && typeof r.getBoundingClientRect == "function");
1566
1584
  });
1567
1585
  }
1568
- function ta(e) {
1586
+ function fr(e) {
1569
1587
  e === void 0 && (e = {});
1570
- var t = e, r = t.defaultModifiers, n = r === void 0 ? [] : r, a = t.defaultOptions, o = a === void 0 ? Lt : a;
1571
- return function(i, l, d) {
1572
- d === void 0 && (d = o);
1588
+ var a = e, t = a.defaultModifiers, r = t === void 0 ? [] : t, n = a.defaultOptions, i = n === void 0 ? Ht : n;
1589
+ return function(o, s, d) {
1590
+ d === void 0 && (d = i);
1573
1591
  var c = {
1574
1592
  placement: "bottom",
1575
1593
  orderedModifiers: [],
1576
- options: Object.assign({}, Lt, o),
1594
+ options: Object.assign({}, Ht, i),
1577
1595
  modifiersData: {},
1578
1596
  elements: {
1579
- reference: i,
1580
- popper: l
1597
+ reference: o,
1598
+ popper: s
1581
1599
  },
1582
1600
  attributes: {},
1583
1601
  styles: {}
1584
- }, $ = [], P = !1, m = {
1602
+ }, w = [], $ = !1, m = {
1585
1603
  state: c,
1586
- setOptions: function(V) {
1587
- var R = typeof V == "function" ? V(c.options) : V;
1588
- w(), c.options = Object.assign({}, o, c.options, R), c.scrollParents = {
1589
- reference: ke(i) ? Le(i) : i.contextElement ? Le(i.contextElement) : [],
1590
- popper: Le(l)
1604
+ setOptions: function(x) {
1605
+ var B = typeof x == "function" ? x(c.options) : x;
1606
+ O(), c.options = Object.assign({}, i, c.options, B), c.scrollParents = {
1607
+ reference: Se(o) ? Ne(o) : o.contextElement ? Ne(o.contextElement) : [],
1608
+ popper: Ne(s)
1591
1609
  };
1592
- var L = Zn(ea([].concat(n, c.options.modifiers)));
1593
- return c.orderedModifiers = L.filter(function(O) {
1594
- return O.enabled;
1595
- }), b(), m.update();
1610
+ var R = cr(dr([].concat(r, c.options.modifiers)));
1611
+ return c.orderedModifiers = R.filter(function(C) {
1612
+ return C.enabled;
1613
+ }), k(), m.update();
1596
1614
  },
1597
1615
  // Sync update – it will always be executed, even if not necessary. This
1598
1616
  // is useful for low frequency updates where sync behavior simplifies the
@@ -1600,25 +1618,25 @@ function ta(e) {
1600
1618
  // For high frequency updates (e.g. `resize` and `scroll` events), always
1601
1619
  // prefer the async Popper#update method
1602
1620
  forceUpdate: function() {
1603
- if (!P) {
1604
- var V = c.elements, R = V.reference, L = V.popper;
1605
- if (jt(R, L)) {
1621
+ if (!$) {
1622
+ var x = c.elements, B = x.reference, R = x.popper;
1623
+ if (Ut(B, R)) {
1606
1624
  c.rects = {
1607
- reference: Qn(R, Fe(L), c.options.strategy === "fixed"),
1608
- popper: yt(L)
1609
- }, c.reset = !1, c.placement = c.options.placement, c.orderedModifiers.forEach(function(M) {
1610
- return c.modifiersData[M.name] = Object.assign({}, M.data);
1625
+ reference: lr(B, Ye(R), c.options.strategy === "fixed"),
1626
+ popper: $t(R)
1627
+ }, c.reset = !1, c.placement = c.options.placement, c.orderedModifiers.forEach(function(I) {
1628
+ return c.modifiersData[I.name] = Object.assign({}, I.data);
1611
1629
  });
1612
- for (var O = 0; O < c.orderedModifiers.length; O++) {
1630
+ for (var C = 0; C < c.orderedModifiers.length; C++) {
1613
1631
  if (c.reset === !0) {
1614
- c.reset = !1, O = -1;
1632
+ c.reset = !1, C = -1;
1615
1633
  continue;
1616
1634
  }
1617
- var S = c.orderedModifiers[O], f = S.fn, E = S.options, D = E === void 0 ? {} : E, W = S.name;
1635
+ var E = c.orderedModifiers[C], f = E.fn, S = E.options, P = S === void 0 ? {} : S, N = E.name;
1618
1636
  typeof f == "function" && (c = f({
1619
1637
  state: c,
1620
- options: D,
1621
- name: W,
1638
+ options: P,
1639
+ name: N,
1622
1640
  instance: m
1623
1641
  }) || c);
1624
1642
  }
@@ -1627,173 +1645,173 @@ function ta(e) {
1627
1645
  },
1628
1646
  // Async and optimistically optimized update – it will not be executed if
1629
1647
  // not necessary (debounced to run at most once-per-tick)
1630
- update: Jn(function() {
1631
- return new Promise(function(T) {
1632
- m.forceUpdate(), T(c);
1648
+ update: ur(function() {
1649
+ return new Promise(function(V) {
1650
+ m.forceUpdate(), V(c);
1633
1651
  });
1634
1652
  }),
1635
1653
  destroy: function() {
1636
- w(), P = !0;
1654
+ O(), $ = !0;
1637
1655
  }
1638
1656
  };
1639
- if (!jt(i, l))
1657
+ if (!Ut(o, s))
1640
1658
  return m;
1641
- m.setOptions(d).then(function(T) {
1642
- !P && d.onFirstUpdate && d.onFirstUpdate(T);
1659
+ m.setOptions(d).then(function(V) {
1660
+ !$ && d.onFirstUpdate && d.onFirstUpdate(V);
1643
1661
  });
1644
- function b() {
1645
- c.orderedModifiers.forEach(function(T) {
1646
- var V = T.name, R = T.options, L = R === void 0 ? {} : R, O = T.effect;
1647
- if (typeof O == "function") {
1648
- var S = O({
1662
+ function k() {
1663
+ c.orderedModifiers.forEach(function(V) {
1664
+ var x = V.name, B = V.options, R = B === void 0 ? {} : B, C = V.effect;
1665
+ if (typeof C == "function") {
1666
+ var E = C({
1649
1667
  state: c,
1650
- name: V,
1668
+ name: x,
1651
1669
  instance: m,
1652
- options: L
1670
+ options: R
1653
1671
  }), f = function() {
1654
1672
  };
1655
- $.push(S || f);
1673
+ w.push(E || f);
1656
1674
  }
1657
1675
  });
1658
1676
  }
1659
- function w() {
1660
- $.forEach(function(T) {
1661
- return T();
1662
- }), $ = [];
1677
+ function O() {
1678
+ w.forEach(function(V) {
1679
+ return V();
1680
+ }), w = [];
1663
1681
  }
1664
1682
  return m;
1665
1683
  };
1666
1684
  }
1667
- var ra = [Tn, Fn, $n, fn, In, Wn, Un, yn, Ln], na = /* @__PURE__ */ ta({
1668
- defaultModifiers: ra
1669
- }), aa = typeof global == "object" && global && global.Object === Object && global, ia = typeof self == "object" && self && self.Object === Object && self, sr = aa || ia || Function("return this")(), Ze = sr.Symbol, lr = Object.prototype, oa = lr.hasOwnProperty, sa = lr.toString, We = Ze ? Ze.toStringTag : void 0;
1670
- function la(e) {
1671
- var t = oa.call(e, We), r = e[We];
1685
+ var pr = [Ln, er, zn, $n, Zn, Yn, nr, En, Kn], vr = /* @__PURE__ */ fr({
1686
+ defaultModifiers: pr
1687
+ }), mr = typeof global == "object" && global && global.Object === Object && global, gr = typeof self == "object" && self && self.Object === Object && self, va = mr || gr || Function("return this")(), Je = va.Symbol, ma = Object.prototype, hr = ma.hasOwnProperty, br = ma.toString, Me = Je ? Je.toStringTag : void 0;
1688
+ function yr(e) {
1689
+ var a = hr.call(e, Me), t = e[Me];
1672
1690
  try {
1673
- e[We] = void 0;
1674
- var n = !0;
1691
+ e[Me] = void 0;
1692
+ var r = !0;
1675
1693
  } catch {
1676
1694
  }
1677
- var a = sa.call(e);
1678
- return n && (t ? e[We] = r : delete e[We]), a;
1695
+ var n = br.call(e);
1696
+ return r && (a ? e[Me] = t : delete e[Me]), n;
1679
1697
  }
1680
- var ca = Object.prototype, ua = ca.toString;
1681
- function da(e) {
1682
- return ua.call(e);
1698
+ var wr = Object.prototype, xr = wr.toString;
1699
+ function kr(e) {
1700
+ return xr.call(e);
1683
1701
  }
1684
- var fa = "[object Null]", pa = "[object Undefined]", Nt = Ze ? Ze.toStringTag : void 0;
1685
- function va(e) {
1686
- return e == null ? e === void 0 ? pa : fa : Nt && Nt in Object(e) ? la(e) : da(e);
1702
+ var $r = "[object Null]", Or = "[object Undefined]", qt = Je ? Je.toStringTag : void 0;
1703
+ function Cr(e) {
1704
+ return e == null ? e === void 0 ? Or : $r : qt && qt in Object(e) ? yr(e) : kr(e);
1687
1705
  }
1688
- function ma(e) {
1706
+ function Sr(e) {
1689
1707
  return e != null && typeof e == "object";
1690
1708
  }
1691
- var ga = "[object Symbol]";
1692
- function ha(e) {
1693
- return typeof e == "symbol" || ma(e) && va(e) == ga;
1709
+ var Tr = "[object Symbol]";
1710
+ function Vr(e) {
1711
+ return typeof e == "symbol" || Sr(e) && Cr(e) == Tr;
1694
1712
  }
1695
- var ba = /\s/;
1696
- function ya(e) {
1697
- for (var t = e.length; t-- && ba.test(e.charAt(t)); )
1713
+ var Br = /\s/;
1714
+ function Er(e) {
1715
+ for (var a = e.length; a-- && Br.test(e.charAt(a)); )
1698
1716
  ;
1699
- return t;
1717
+ return a;
1700
1718
  }
1701
- var xa = /^\s+/;
1702
- function wa(e) {
1703
- return e && e.slice(0, ya(e) + 1).replace(xa, "");
1719
+ var Ar = /^\s+/;
1720
+ function Dr(e) {
1721
+ return e && e.slice(0, Er(e) + 1).replace(Ar, "");
1704
1722
  }
1705
- function Je(e) {
1706
- var t = typeof e;
1707
- return e != null && (t == "object" || t == "function");
1723
+ function et(e) {
1724
+ var a = typeof e;
1725
+ return e != null && (a == "object" || a == "function");
1708
1726
  }
1709
- var It = NaN, Oa = /^[-+]0x[0-9a-f]+$/i, $a = /^0b[01]+$/i, ka = /^0o[0-7]+$/i, Ta = parseInt;
1710
- function _t(e) {
1727
+ var Yt = NaN, Pr = /^[-+]0x[0-9a-f]+$/i, zr = /^0b[01]+$/i, Rr = /^0o[0-7]+$/i, Lr = parseInt;
1728
+ function Xt(e) {
1711
1729
  if (typeof e == "number")
1712
1730
  return e;
1713
- if (ha(e))
1714
- return It;
1715
- if (Je(e)) {
1716
- var t = typeof e.valueOf == "function" ? e.valueOf() : e;
1717
- e = Je(t) ? t + "" : t;
1731
+ if (Vr(e))
1732
+ return Yt;
1733
+ if (et(e)) {
1734
+ var a = typeof e.valueOf == "function" ? e.valueOf() : e;
1735
+ e = et(a) ? a + "" : a;
1718
1736
  }
1719
1737
  if (typeof e != "string")
1720
1738
  return e === 0 ? e : +e;
1721
- e = wa(e);
1722
- var r = $a.test(e);
1723
- return r || ka.test(e) ? Ta(e.slice(2), r ? 2 : 8) : Oa.test(e) ? It : +e;
1724
- }
1725
- var lt = function() {
1726
- return sr.Date.now();
1727
- }, Sa = "Expected a function", Ca = Math.max, Pa = Math.min;
1728
- function pt(e, t, r) {
1729
- var n, a, o, s, i, l, d = 0, c = !1, $ = !1, P = !0;
1739
+ e = Dr(e);
1740
+ var t = zr.test(e);
1741
+ return t || Rr.test(e) ? Lr(e.slice(2), t ? 2 : 8) : Pr.test(e) ? Yt : +e;
1742
+ }
1743
+ var dt = function() {
1744
+ return va.Date.now();
1745
+ }, Wr = "Expected a function", Mr = Math.max, jr = Math.min;
1746
+ function gt(e, a, t) {
1747
+ var r, n, i, l, o, s, d = 0, c = !1, w = !1, $ = !0;
1730
1748
  if (typeof e != "function")
1731
- throw new TypeError(Sa);
1732
- t = _t(t) || 0, Je(r) && (c = !!r.leading, $ = "maxWait" in r, o = $ ? Ca(_t(r.maxWait) || 0, t) : o, P = "trailing" in r ? !!r.trailing : P);
1749
+ throw new TypeError(Wr);
1750
+ a = Xt(a) || 0, et(t) && (c = !!t.leading, w = "maxWait" in t, i = w ? Mr(Xt(t.maxWait) || 0, a) : i, $ = "trailing" in t ? !!t.trailing : $);
1733
1751
  function m(f) {
1734
- var E = n, D = a;
1735
- return n = a = void 0, d = f, s = e.apply(D, E), s;
1752
+ var S = r, P = n;
1753
+ return r = n = void 0, d = f, l = e.apply(P, S), l;
1736
1754
  }
1737
- function b(f) {
1738
- return d = f, i = setTimeout(V, t), c ? m(f) : s;
1755
+ function k(f) {
1756
+ return d = f, o = setTimeout(x, a), c ? m(f) : l;
1739
1757
  }
1740
- function w(f) {
1741
- var E = f - l, D = f - d, W = t - E;
1742
- return $ ? Pa(W, o - D) : W;
1758
+ function O(f) {
1759
+ var S = f - s, P = f - d, N = a - S;
1760
+ return w ? jr(N, i - P) : N;
1743
1761
  }
1744
- function T(f) {
1745
- var E = f - l, D = f - d;
1746
- return l === void 0 || E >= t || E < 0 || $ && D >= o;
1762
+ function V(f) {
1763
+ var S = f - s, P = f - d;
1764
+ return s === void 0 || S >= a || S < 0 || w && P >= i;
1747
1765
  }
1748
- function V() {
1749
- var f = lt();
1750
- if (T(f))
1751
- return R(f);
1752
- i = setTimeout(V, w(f));
1766
+ function x() {
1767
+ var f = dt();
1768
+ if (V(f))
1769
+ return B(f);
1770
+ o = setTimeout(x, O(f));
1753
1771
  }
1754
- function R(f) {
1755
- return i = void 0, P && n ? m(f) : (n = a = void 0, s);
1772
+ function B(f) {
1773
+ return o = void 0, $ && r ? m(f) : (r = n = void 0, l);
1756
1774
  }
1757
- function L() {
1758
- i !== void 0 && clearTimeout(i), d = 0, n = l = a = i = void 0;
1775
+ function R() {
1776
+ o !== void 0 && clearTimeout(o), d = 0, r = s = n = o = void 0;
1759
1777
  }
1760
- function O() {
1761
- return i === void 0 ? s : R(lt());
1778
+ function C() {
1779
+ return o === void 0 ? l : B(dt());
1762
1780
  }
1763
- function S() {
1764
- var f = lt(), E = T(f);
1765
- if (n = arguments, a = this, l = f, E) {
1766
- if (i === void 0)
1767
- return b(l);
1768
- if ($)
1769
- return clearTimeout(i), i = setTimeout(V, t), m(l);
1781
+ function E() {
1782
+ var f = dt(), S = V(f);
1783
+ if (r = arguments, n = this, s = f, S) {
1784
+ if (o === void 0)
1785
+ return k(s);
1786
+ if (w)
1787
+ return clearTimeout(o), o = setTimeout(x, a), m(s);
1770
1788
  }
1771
- return i === void 0 && (i = setTimeout(V, t)), s;
1789
+ return o === void 0 && (o = setTimeout(x, a)), l;
1772
1790
  }
1773
- return S.cancel = L, S.flush = O, S;
1791
+ return E.cancel = R, E.flush = C, E;
1774
1792
  }
1775
- var Ea = "Expected a function";
1776
- function Va(e, t, r) {
1777
- var n = !0, a = !0;
1793
+ var Nr = "Expected a function";
1794
+ function Ir(e, a, t) {
1795
+ var r = !0, n = !0;
1778
1796
  if (typeof e != "function")
1779
- throw new TypeError(Ea);
1780
- return Je(r) && (n = "leading" in r ? !!r.leading : n, a = "trailing" in r ? !!r.trailing : a), pt(e, t, {
1781
- leading: n,
1782
- maxWait: t,
1783
- trailing: a
1797
+ throw new TypeError(Nr);
1798
+ return et(t) && (r = "leading" in t ? !!t.leading : r, n = "trailing" in t ? !!t.trailing : n), gt(e, a, {
1799
+ leading: r,
1800
+ maxWait: a,
1801
+ trailing: n
1784
1802
  });
1785
1803
  }
1786
- const Ba = (e, t) => {
1787
- const r = (n) => {
1788
- const a = e.value, o = n.target;
1789
- !a || !o || !(o instanceof Node) || a.contains(o) || t(n);
1804
+ const _r = (e, a) => {
1805
+ const t = (r) => {
1806
+ const n = e.value, i = r.target;
1807
+ !n || !i || !(i instanceof Node) || n.contains(i) || a(r);
1790
1808
  };
1791
- et(() => {
1792
- document.addEventListener("click", r, !0);
1793
- }), De(() => {
1794
- document.removeEventListener("click", r, !0);
1809
+ at(() => {
1810
+ document.addEventListener("click", t, !0);
1811
+ }), xe(() => {
1812
+ document.removeEventListener("click", t, !0);
1795
1813
  });
1796
- }, Da = 80, vt = /* @__PURE__ */ te({
1814
+ }, Fr = 80, ht = /* @__PURE__ */ Q({
1797
1815
  name: "Popover",
1798
1816
  __name: "Popover",
1799
1817
  props: {
@@ -1812,135 +1830,138 @@ const Ba = (e, t) => {
1812
1830
  padding: { default: 4 }
1813
1831
  },
1814
1832
  emits: ["visible-change", "click-outside", "scroll"],
1815
- setup(e, { expose: t, emit: r }) {
1816
- const n = q(!1), a = e, o = h(() => a.preserveContentMount || n.value), s = h(() => !a.preserveContentMount || n.value), i = r, l = q(), d = q(), c = q();
1817
- let $ = null, P = Se({}), m = Se({}), b = Se({});
1818
- const w = (x) => typeof x == "number" ? `${x}px` : x, T = h(() => {
1819
- const x = a.maxPopperHeight;
1820
- return x != null && x !== "";
1821
- }), V = h(() => {
1822
- const x = {}, C = a.popperWidth;
1823
- if (C != null && C !== "" && (x.width = w(C)), T.value) {
1824
- const U = a.maxPopperHeight;
1825
- x.maxHeight = w(U), x.overflowY = "auto", x.scrollbarWidth = "none", x.msOverflowStyle = "none";
1833
+ setup(e, { expose: a, emit: t }) {
1834
+ const r = F(!1), n = e, i = v(() => n.preserveContentMount || r.value), l = v(() => !n.preserveContentMount || r.value), o = t, s = F(), d = F(), c = F();
1835
+ let w = null, $ = Ve({}), m = Ve({}), k = Ve({});
1836
+ const O = (T) => typeof T == "number" ? `${T}px` : T, V = v(() => {
1837
+ const T = n.maxPopperHeight;
1838
+ return T != null && T !== "";
1839
+ }), x = v(() => {
1840
+ const T = {}, D = n.popperWidth;
1841
+ if (D != null && D !== "" && (T.width = O(D)), V.value) {
1842
+ const X = n.maxPopperHeight;
1843
+ T.maxHeight = O(X), T.overflowY = "auto", T.scrollbarWidth = "none", T.msOverflowStyle = "none";
1826
1844
  }
1827
- return x.padding = w(a.padding), x;
1828
- }), R = h(() => ({
1829
- placement: a.placement,
1845
+ return T.padding = O(n.padding), T;
1846
+ }), B = v(() => ({
1847
+ placement: n.placement,
1830
1848
  modifiers: [
1831
1849
  {
1832
1850
  name: "offset",
1833
1851
  options: {
1834
- offset: a.offset
1852
+ offset: n.offset
1835
1853
  }
1836
1854
  }
1837
1855
  ],
1838
- ...a.popoverOptions
1839
- })), L = () => {
1840
- a.disabled || (n.value = !0, i("visible-change", !0));
1841
- }, O = () => {
1842
- n.value = !1, i("visible-change", !1);
1843
- }, S = pt(L, a.openDelay), f = pt(O, a.closeDelay), E = () => {
1844
- a.disabled || (f.cancel(), S());
1845
- }, D = () => {
1846
- S.cancel(), f();
1856
+ ...n.popoverOptions
1857
+ })), R = () => {
1858
+ n.disabled || (r.value = !0, o("visible-change", !0));
1859
+ }, C = () => {
1860
+ r.value = !1, o("visible-change", !1);
1861
+ }, E = gt(R, n.openDelay), f = gt(C, n.closeDelay), S = () => {
1862
+ n.disabled || (f.cancel(), E());
1863
+ }, P = () => {
1864
+ E.cancel(), f();
1847
1865
  };
1848
- Ba(l, (x) => {
1849
- const C = x.target;
1850
- C instanceof Node && c.value?.contains(C) || (a.trigger === "click" && n.value && !a.manual && D(), n.value && i("click-outside", !0));
1866
+ _r(s, (T) => {
1867
+ const D = T.target;
1868
+ D instanceof Node && c.value?.contains(D) || (n.trigger === "click" && r.value && !n.manual && P(), r.value && o("click-outside", !0));
1851
1869
  });
1852
- const W = () => {
1853
- a.disabled || (n.value ? D() : E());
1854
- }, M = () => {
1855
- b = {}, a.trigger === "hover" ? (m.mouseenter = E, P.mouseleave = D, a.teleport && (b.mouseenter = E, b.mouseleave = D)) : a.trigger === "click" && (m.click = W);
1870
+ const N = () => {
1871
+ n.disabled || (r.value ? P() : S());
1872
+ }, I = () => {
1873
+ k = {}, n.trigger === "hover" ? (m.mouseenter = S, $.mouseleave = P, n.teleport && (k.mouseenter = S, k.mouseleave = P)) : n.trigger === "click" && (m.click = N);
1856
1874
  };
1857
- ee(
1858
- () => n.value,
1859
- (x) => {
1860
- x && (d.value && c.value ? $ = na(d.value, c.value, R.value) : $?.destroy());
1875
+ J(
1876
+ () => r.value,
1877
+ (T) => {
1878
+ T && (d.value && c.value ? w = vr(d.value, c.value, B.value) : w?.destroy());
1861
1879
  },
1862
1880
  { flush: "post" }
1863
- ), ee(
1864
- () => a.manual,
1865
- (x) => {
1866
- x ? (m = {}, P = {}, b = {}) : M();
1881
+ ), J(
1882
+ () => n.manual,
1883
+ (T) => {
1884
+ T ? (m = {}, $ = {}, k = {}) : I();
1867
1885
  }
1868
- ), ee(
1869
- () => a.trigger,
1870
- (x, C) => {
1871
- x !== C && (m = {}, P = {}, b = {}, M());
1886
+ ), J(
1887
+ () => n.trigger,
1888
+ (T, D) => {
1889
+ T !== D && (m = {}, $ = {}, k = {}, I());
1872
1890
  }
1873
- ), ee(
1874
- () => a.teleport,
1891
+ ), J(
1892
+ () => n.teleport,
1875
1893
  () => {
1876
- a.manual || M();
1894
+ n.manual || I();
1877
1895
  }
1878
- ), ee(
1879
- () => a.disabled,
1880
- (x) => {
1881
- x && D();
1896
+ ), J(
1897
+ () => n.disabled,
1898
+ (T) => {
1899
+ T && P();
1882
1900
  }
1883
- ), et(() => {
1884
- a.manual || M();
1901
+ ), at(() => {
1902
+ n.manual || I();
1885
1903
  });
1886
- const j = Va((x) => {
1887
- const C = x.target;
1888
- i("scroll", { scrollTop: C.scrollTop, scrollLeft: C.scrollLeft });
1889
- }, Da);
1890
- return De(() => {
1891
- j.cancel(), $?.destroy();
1892
- }), t({
1893
- isOpen: n,
1894
- open: E,
1895
- close: D
1896
- }), (x, C) => (y(), k("div", be({
1904
+ const _ = Ir((T) => {
1905
+ const D = T.target;
1906
+ o("scroll", { scrollTop: D.scrollTop, scrollLeft: D.scrollLeft });
1907
+ }, Fr);
1908
+ return xe(() => {
1909
+ _.cancel(), w?.destroy();
1910
+ }), a({
1911
+ isOpen: r,
1912
+ open: S,
1913
+ close: P
1914
+ }), (T, D) => (p(), y("div", we({
1897
1915
  class: "cregis-popover",
1898
1916
  ref_key: "popoverRef",
1899
- ref: l
1900
- }, it(ie(P), !0)), [
1901
- z("div", be({
1917
+ ref: s
1918
+ }, st(Z($), !0)), [
1919
+ A("div", we({
1902
1920
  class: ["cregis-popover__trigger", { "cregis-popover__trigger--disabled": e.disabled }],
1903
1921
  ref_key: "popoverTriggerRef",
1904
1922
  ref: d
1905
- }, it(ie(m), !0)), [
1906
- K(x.$slots, "reference")
1923
+ }, st(Z(m), !0)), [
1924
+ G(T.$slots, "reference")
1907
1925
  ], 16),
1908
- (y(), Ce(mr, {
1926
+ (p(), pe(ea, {
1909
1927
  to: "body",
1910
1928
  disabled: !e.teleport
1911
1929
  }, [
1912
- Z(mt, { name: "fade" }, {
1913
- default: re(() => [
1914
- o.value ? je((y(), k("div", be({
1930
+ K(nt, { name: "fade" }, {
1931
+ default: ee(() => [
1932
+ i.value ? _e((p(), y("div", we({
1915
1933
  key: 0,
1916
- class: ["cregis-popover__content", { "cregis-popover__content--hide-scrollbar": T.value }],
1934
+ class: ["cregis-popover__content", { "cregis-popover__content--hide-scrollbar": V.value }],
1917
1935
  ref_key: "popoverContentRef",
1918
1936
  ref: c,
1919
- style: V.value
1920
- }, it(ie(b), !0), {
1921
- onScroll: C[0] || (C[0] = //@ts-ignore
1922
- (...U) => ie(j) && ie(j)(...U))
1937
+ style: x.value
1938
+ }, st(Z(k), !0), {
1939
+ onScroll: D[0] || (D[0] = //@ts-ignore
1940
+ (...X) => Z(_) && Z(_)(...X))
1923
1941
  }), [
1924
- K(x.$slots, "default")
1942
+ G(T.$slots, "default")
1925
1943
  ], 16)), [
1926
- [gt, s.value]
1927
- ]) : X("", !0)
1944
+ [wt, l.value]
1945
+ ]) : j("", !0)
1928
1946
  ]),
1929
1947
  _: 3
1930
1948
  })
1931
1949
  ], 8, ["disabled"]))
1932
1950
  ], 16));
1933
1951
  }
1934
- }), cr = Symbol("CregisSelect"), Ra = { class: "cregis-select__trigger-label" }, Aa = { class: "cregis-select__selected" }, za = {
1952
+ }), ga = Symbol("CregisSelect"), Hr = { class: "cregis-select__selected" }, Ur = {
1953
+ key: 0,
1954
+ class: "cregis-select__count"
1955
+ }, qr = {
1935
1956
  key: 1,
1936
1957
  class: "cregis-select__placeholder"
1937
- }, Wa = {
1958
+ }, Yr = {
1938
1959
  key: 0,
1939
1960
  class: "cregis-select__dropdown-empty"
1940
- }, Ma = {
1961
+ }, Xr = {
1941
1962
  key: 2,
1942
1963
  class: "cregis-select__dropdown-filter-empty"
1943
- }, La = { class: "cregis-select__dropdown-content" }, li = /* @__PURE__ */ te({
1964
+ }, Kr = { class: "cregis-select__dropdown-content" }, Di = /* @__PURE__ */ Q({
1944
1965
  name: "Select",
1945
1966
  __name: "Select",
1946
1967
  props: {
@@ -1957,150 +1978,169 @@ const Ba = (e, t) => {
1957
1978
  triggerWidth: { default: "296px" },
1958
1979
  popperWidth: {},
1959
1980
  maxPopperHeight: {},
1960
- searchText: { default: "search" }
1981
+ searchText: { default: "search" },
1982
+ multiple: { type: Boolean }
1961
1983
  },
1962
1984
  emits: ["update:modelValue", "change", "visible-change", "filter-input", "filter-clear"],
1963
- setup(e, { emit: t }) {
1964
- const r = e, n = t, a = q(null), o = q(!1);
1965
- let s = null;
1966
- const i = () => {
1967
- s !== null && (clearTimeout(s), s = null);
1968
- }, l = (g) => {
1969
- o.value = g, n("visible-change", g), !g && r.filterable && (O.value = "", S.value = "", i());
1970
- }, d = (g) => typeof g == "number" ? `n:${g}` : `s:${g}`, c = Se({}), $ = Se({}), P = q(0), m = q(null), b = (g, _, Y) => {
1971
- const G = d(g);
1972
- return P.value++, c[G] = _, $[G] = Y ?? _, () => {
1973
- P.value--, delete c[G], delete $[G];
1985
+ setup(e, { emit: a }) {
1986
+ const t = e, r = a, n = F(null), i = F(!1);
1987
+ let l = null;
1988
+ const o = () => {
1989
+ l !== null && (clearTimeout(l), l = null);
1990
+ }, s = (h) => {
1991
+ i.value = h, r("visible-change", h), !h && t.filterable && (E.value = "", f.value = "", o());
1992
+ }, d = (h) => typeof h == "number" ? `n:${h}` : `s:${h}`, c = Ve({}), w = Ve({}), $ = F(0), m = F(null), k = (h, H, Y) => {
1993
+ const ae = d(h);
1994
+ return $.value++, c[ae] = H, w[ae] = Y ?? H, () => {
1995
+ $.value--, delete c[ae], delete w[ae];
1974
1996
  };
1975
- }, w = h(() => P.value === 0);
1976
- ee(
1977
- () => r.modelValue,
1978
- (g) => {
1979
- if (g == null || g === "") {
1980
- m.value = null;
1981
- return;
1997
+ }, O = v(() => $.value === 0);
1998
+ J(
1999
+ () => t.modelValue,
2000
+ (h) => {
2001
+ if (!t.multiple) {
2002
+ if (h == null || h === "") {
2003
+ m.value = null;
2004
+ return;
2005
+ }
2006
+ m.value && m.value.value !== h && (m.value = null);
1982
2007
  }
1983
- m.value && m.value.value !== g && (m.value = null);
1984
2008
  }
1985
2009
  );
1986
- const T = h(() => {
1987
- const g = r.modelValue;
1988
- return g != null && g !== "";
1989
- }), V = h(() => {
1990
- if (!T.value) return "";
1991
- const g = r.modelValue;
1992
- return m.value?.value === g ? m.value.label : c[d(g)] ?? String(g);
1993
- }), R = (g) => r.modelValue === g, L = (g, _) => {
1994
- r.disabled || (m.value = { value: g, label: _ }, n("update:modelValue", g), n("change", g), a.value?.close());
1995
- }, O = q(""), S = q(""), f = h(() => S.value.trim().toLowerCase()), E = h(() => {
1996
- const g = f.value;
1997
- return !r.filterable || !g ? !0 : Object.keys(c).some((_) => ($[_] ?? c[_]).toLowerCase().includes(g));
1998
- }), D = h(
1999
- () => r.filterable && !!f.value && !E.value && !w.value
2000
- ), W = () => {
2001
- r.filterable && (i(), s = setTimeout(() => {
2002
- S.value = O.value.trim(), s = null;
2003
- }, r.filterDebounceMs));
2010
+ const V = v(() => {
2011
+ if (t.multiple)
2012
+ return Array.isArray(t.modelValue) && t.modelValue.length > 0;
2013
+ const h = t.modelValue;
2014
+ return h != null && h !== "";
2015
+ }), x = v(() => !t.multiple || !Array.isArray(t.modelValue) ? 0 : t.modelValue.length), B = v(() => {
2016
+ if (!V.value) return "";
2017
+ if (t.multiple)
2018
+ return t.modelValue.map((Y) => c[d(Y)] ?? String(Y)).join("、");
2019
+ const h = t.modelValue;
2020
+ return m.value?.value === h ? m.value.label : c[d(h)] ?? String(h);
2021
+ }), R = (h) => t.multiple ? Array.isArray(t.modelValue) && t.modelValue.includes(h) : t.modelValue === h, C = (h, H) => {
2022
+ if (!t.disabled) {
2023
+ if (t.multiple) {
2024
+ const Y = Array.isArray(t.modelValue) ? [...t.modelValue] : [], ae = Y.indexOf(h);
2025
+ ae >= 0 ? Y.splice(ae, 1) : Y.push(h), r("update:modelValue", Y), r("change", Y);
2026
+ return;
2027
+ }
2028
+ m.value = { value: h, label: H }, r("update:modelValue", h), r("change", h), n.value?.close();
2029
+ }
2030
+ }, E = F(""), f = F(""), S = v(() => f.value.trim().toLowerCase()), P = v(() => {
2031
+ const h = S.value;
2032
+ return !t.filterable || !h ? !0 : Object.keys(c).some((H) => (w[H] ?? c[H]).toLowerCase().includes(h));
2033
+ }), N = v(
2034
+ () => t.filterable && !!S.value && !P.value && !O.value
2035
+ ), I = () => {
2036
+ t.filterable && (o(), l = setTimeout(() => {
2037
+ f.value = E.value.trim(), l = null;
2038
+ }, t.filterDebounceMs));
2004
2039
  };
2005
- ee(O, () => {
2006
- r.filterable && W();
2007
- }), ee(
2008
- () => r.filterable,
2009
- (g) => {
2010
- g || (O.value = "", S.value = "", i());
2040
+ J(E, () => {
2041
+ t.filterable && I();
2042
+ }), J(
2043
+ () => t.filterable,
2044
+ (h) => {
2045
+ h || (E.value = "", f.value = "", o());
2011
2046
  }
2012
- ), De(() => i());
2013
- const M = (g) => {
2014
- n("filter-input", String(g ?? ""));
2015
- }, j = () => {
2016
- S.value = "", i(), n("filter-clear");
2047
+ ), xe(() => o());
2048
+ const _ = (h) => {
2049
+ r("filter-input", String(h ?? ""));
2050
+ }, T = () => {
2051
+ f.value = "", o(), r("filter-clear");
2017
2052
  };
2018
- Ht(cr, {
2019
- modelValue: h(() => r.modelValue),
2020
- disabled: h(() => !!r.disabled),
2021
- selectOption: L,
2053
+ Qt(ga, {
2054
+ modelValue: v(() => t.modelValue),
2055
+ multiple: v(() => !!t.multiple),
2056
+ disabled: v(() => !!t.disabled),
2057
+ selectOption: C,
2022
2058
  isOptionSelected: R,
2023
- registerOption: b,
2024
- filterQuery: f
2059
+ registerOption: k,
2060
+ filterQuery: S
2025
2061
  });
2026
- const x = (g) => typeof g == "number" ? `${g}px` : g, C = h(() => {
2027
- if (r.popperWidth) return x(r.popperWidth);
2028
- const g = r.triggerWidth;
2029
- return typeof g == "number" ? g + 8 : `calc(${g} + 8px)`;
2030
- }), U = h(() => typeof C.value == "number" ? `${C.value - 12}px` : `calc(${C.value} - 12px)`), Q = h(() => r.align === "center" ? "bottom" : r.align === "left" ? "bottom-start" : "bottom-end"), u = h(() => ({
2031
- width: x(r.triggerWidth)
2032
- })), v = h(() => r.size === "large" ? "20px" : r.size === "medium" ? "14px" : "12px"), B = q(0), I = (g) => {
2033
- B.value = g.scrollTop;
2062
+ const D = (h) => typeof h == "number" ? `${h}px` : h, X = v(() => {
2063
+ if (t.popperWidth) return D(t.popperWidth);
2064
+ const h = t.triggerWidth;
2065
+ return typeof h == "number" ? h + 8 : `calc(${h} + 8px)`;
2066
+ }), te = v(() => typeof X.value == "number" ? `${X.value - 12}px` : `calc(${X.value} - 12px)`), u = v(() => t.align === "center" ? "bottom" : t.align === "left" ? "bottom-start" : "bottom-end"), b = v(() => ({
2067
+ width: D(t.triggerWidth)
2068
+ })), z = v(() => t.size === "large" ? "20px" : t.size === "medium" ? "14px" : "12px"), q = F(0), re = (h) => {
2069
+ q.value = h.scrollTop;
2034
2070
  };
2035
- return (g, _) => (y(), k("div", {
2036
- class: F(["cregis-select", { "is-disabled": e.disabled }])
2071
+ return (h, H) => (p(), y("div", {
2072
+ class: W(["cregis-select", { "is-disabled": e.disabled }])
2037
2073
  }, [
2038
- Z(vt, {
2074
+ K(ht, {
2039
2075
  ref_key: "popoverRef",
2040
- ref: a,
2076
+ ref: n,
2041
2077
  "preserve-content-mount": "",
2042
- "popper-width": C.value,
2043
- placement: Q.value,
2078
+ "popper-width": X.value,
2079
+ placement: u.value,
2044
2080
  disabled: !!e.disabled,
2045
2081
  padding: 0,
2046
2082
  "max-popper-height": e.maxPopperHeight,
2047
- onVisibleChange: l,
2048
- onScroll: I
2083
+ onVisibleChange: s,
2084
+ onScroll: re
2049
2085
  }, {
2050
- reference: re(() => [
2051
- z("div", {
2052
- class: F(["cregis-select__trigger", { [`cregis-select__trigger--${e.size}`]: e.size, [`cregis-select__trigger--${e.type}`]: e.type }]),
2053
- style: de(u.value)
2086
+ reference: ee(() => [
2087
+ A("div", {
2088
+ class: W(["cregis-select__trigger", { [`cregis-select__trigger--${e.size}`]: e.size, [`cregis-select__trigger--${e.type}`]: e.type }]),
2089
+ style: ne(b.value)
2054
2090
  }, [
2055
- z("div", Ra, [
2056
- T.value ? K(g.$slots, "label", {
2091
+ A("div", {
2092
+ class: W(["cregis-select__trigger-label", { "is-multiple": e.multiple }])
2093
+ }, [
2094
+ V.value ? G(h.$slots, "label", {
2057
2095
  key: 0,
2058
2096
  modelValue: e.modelValue,
2059
- displayText: V.value,
2097
+ displayText: B.value,
2098
+ selectedCount: x.value,
2060
2099
  placeholder: e.placeholder,
2061
- hasSelection: T.value
2100
+ hasSelection: V.value
2062
2101
  }, () => [
2063
- z("p", Aa, H(V.value), 1)
2064
- ]) : (y(), k("p", za, H(e.placeholder), 1))
2065
- ]),
2066
- z("span", {
2067
- class: F(["cregis-select__icon", { "is-open": o.value }])
2102
+ A("p", Hr, M(B.value), 1),
2103
+ e.multiple ? (p(), y("span", Ur, M(x.value), 1)) : j("", !0)
2104
+ ]) : (p(), y("p", qr, M(e.placeholder), 1))
2105
+ ], 2),
2106
+ A("span", {
2107
+ class: W(["cregis-select__icon", { "is-open": i.value }])
2068
2108
  }, [
2069
- Z(ie(Kt), {
2070
- size: v.value,
2071
- color: e.disabled ? "var(--text-base-quaternary)" : "var(--material-foreground-base-secondary)"
2109
+ K(Z(aa), {
2110
+ size: z.value,
2111
+ color: e.disabled ? "var(--text-base-quaternary)" : "var(--material-base-secondary)"
2072
2112
  }, null, 8, ["size", "color"])
2073
2113
  ], 2)
2074
2114
  ], 6)
2075
2115
  ]),
2076
- default: re(() => [
2077
- z("div", {
2078
- class: F(["cregis-select__dropdown", { "is-empty": w.value }])
2116
+ default: ee(() => [
2117
+ A("div", {
2118
+ class: W(["cregis-select__dropdown", { "is-empty": O.value }])
2079
2119
  }, [
2080
- w.value ? (y(), k("p", Wa, H(e.noDataText), 1)) : X("", !0),
2081
- e.filterable && !w.value ? (y(), k("div", {
2120
+ O.value ? (p(), y("p", Yr, M(e.noDataText), 1)) : j("", !0),
2121
+ e.filterable && !O.value ? (p(), y("div", {
2082
2122
  key: 1,
2083
- class: F(["cregis-select__dropdown-filter", { "backdrop-fixed-header": B.value > 10 }])
2123
+ class: W(["cregis-select__dropdown-filter", { "backdrop-fixed-header": q.value > 10 }])
2084
2124
  }, [
2085
- Z(Qt, {
2086
- modelValue: O.value,
2087
- "onUpdate:modelValue": _[0] || (_[0] = (Y) => O.value = Y),
2125
+ K(na, {
2126
+ modelValue: E.value,
2127
+ "onUpdate:modelValue": H[0] || (H[0] = (Y) => E.value = Y),
2088
2128
  placeholder: e.searchText,
2089
- width: U.value,
2129
+ width: te.value,
2090
2130
  size: "small",
2091
2131
  clearable: "",
2092
- onInput: M,
2093
- onClear: j
2132
+ onInput: _,
2133
+ onClear: T
2094
2134
  }, {
2095
- prefix: re(() => [
2096
- Z(ie(Xt), { size: "14px" })
2135
+ prefix: ee(() => [
2136
+ K(Z(ta), { size: "14px" })
2097
2137
  ]),
2098
2138
  _: 1
2099
2139
  }, 8, ["modelValue", "placeholder", "width"])
2100
- ], 2)) : X("", !0),
2101
- D.value ? (y(), k("p", Ma, H(e.noMatchText), 1)) : X("", !0),
2102
- z("div", La, [
2103
- K(g.$slots, "default")
2140
+ ], 2)) : j("", !0),
2141
+ N.value ? (p(), y("p", Xr, M(e.noMatchText), 1)) : j("", !0),
2142
+ A("div", Kr, [
2143
+ G(h.$slots, "default")
2104
2144
  ])
2105
2145
  ], 2)
2106
2146
  ]),
@@ -2108,7 +2148,10 @@ const Ba = (e, t) => {
2108
2148
  }, 8, ["popper-width", "placement", "disabled", "max-popper-height"])
2109
2149
  ], 2));
2110
2150
  }
2111
- }), ja = ["aria-selected"], ci = /* @__PURE__ */ te({
2151
+ }), Gr = ["aria-selected"], Qr = {
2152
+ key: 1,
2153
+ class: "cregis-select__option-content"
2154
+ }, Pi = /* @__PURE__ */ Q({
2112
2155
  name: "Option",
2113
2156
  __name: "Option",
2114
2157
  props: {
@@ -2118,52 +2161,76 @@ const Ba = (e, t) => {
2118
2161
  filterText: {}
2119
2162
  },
2120
2163
  setup(e) {
2121
- const t = e, r = qt(cr, null);
2122
- let n;
2123
- const a = () => t.filterText ?? t.label, o = () => {
2124
- n?.(), r && (n = r.registerOption(t.value, t.label, a()));
2164
+ const a = e, t = Zt(ga, null);
2165
+ let r;
2166
+ const n = () => a.filterText ?? a.label, i = () => {
2167
+ r?.(), t && (r = t.registerOption(a.value, a.label, n()));
2125
2168
  };
2126
- et(o), De(() => n?.()), ee(() => [t.value, t.label, t.filterText], o);
2127
- const s = h(() => r?.isOptionSelected(t.value) ?? !1), i = () => {
2128
- t.disabled || r?.disabled.value || r?.selectOption(t.value, t.label);
2129
- }, l = h(() => r?.filterQuery?.value ?? ""), d = h(() => {
2130
- const c = l.value;
2131
- return c ? a().toLowerCase().includes(c) : !0;
2169
+ at(i), xe(() => r?.()), J(() => [a.value, a.label, a.filterText], i);
2170
+ const l = v(() => t?.multiple.value ?? !1), o = v(() => t?.isOptionSelected(a.value) ?? !1), s = () => {
2171
+ a.disabled || t?.disabled.value || t?.selectOption(a.value, a.label);
2172
+ }, d = () => {
2173
+ s();
2174
+ }, c = v(() => t?.filterQuery?.value ?? ""), w = v(() => {
2175
+ const $ = c.value;
2176
+ return $ ? n().toLowerCase().includes($) : !0;
2132
2177
  });
2133
- return (c, $) => je((y(), k("div", {
2134
- class: F(["cregis-select__option", { "is-selected": s.value, "is-disabled": e.disabled }]),
2178
+ return ($, m) => _e((p(), y("div", {
2179
+ class: W(["cregis-select__option", {
2180
+ "is-selected": o.value && !l.value,
2181
+ "is-disabled": e.disabled,
2182
+ "cregis-select__option--multiple": l.value
2183
+ }]),
2135
2184
  role: "option",
2136
- "aria-selected": s.value,
2137
- onClick: i
2185
+ "aria-selected": o.value,
2186
+ onClick: s
2138
2187
  }, [
2139
- K(c.$slots, "default", {
2188
+ l.value ? (p(), pe(Ua, {
2189
+ key: 0,
2190
+ "model-value": o.value,
2191
+ disabled: e.disabled || !!Z(t)?.disabled.value,
2192
+ onClick: m[0] || (m[0] = bt(() => {
2193
+ }, ["stop"])),
2194
+ "onUpdate:modelValue": d
2195
+ }, null, 8, ["model-value", "disabled"])) : j("", !0),
2196
+ l.value ? (p(), y("div", Qr, [
2197
+ G($.$slots, "default", {
2198
+ label: e.label,
2199
+ value: e.value,
2200
+ disabled: !!e.disabled,
2201
+ selected: o.value
2202
+ }, () => [
2203
+ ve(M(e.label), 1)
2204
+ ])
2205
+ ])) : G($.$slots, "default", {
2206
+ key: 2,
2140
2207
  label: e.label,
2141
2208
  value: e.value,
2142
2209
  disabled: !!e.disabled,
2143
- selected: s.value
2210
+ selected: o.value
2144
2211
  }, () => [
2145
- $e(H(e.label), 1)
2212
+ ve(M(e.label), 1)
2146
2213
  ])
2147
- ], 10, ja)), [
2148
- [gt, d.value]
2214
+ ], 10, Gr)), [
2215
+ [wt, w.value]
2149
2216
  ]);
2150
2217
  }
2151
- }), Na = { class: "cregis-cascader__trigger-label" }, Ia = { class: "cregis-cascader__selected" }, _a = {
2218
+ }), Zr = { class: "cregis-cascader__trigger-label" }, Jr = { class: "cregis-cascader__selected" }, ei = {
2152
2219
  key: 1,
2153
2220
  class: "cregis-cascader__placeholder"
2154
- }, Fa = {
2221
+ }, ti = {
2155
2222
  key: 0,
2156
2223
  class: "cregis-cascader__dropdown-empty"
2157
- }, Ha = {
2224
+ }, ai = {
2158
2225
  key: 2,
2159
2226
  class: "cregis-cascader__dropdown-filter-empty"
2160
- }, qa = { class: "cregis-cascader__dropdown-content" }, Ua = {
2227
+ }, ni = { class: "cregis-cascader__dropdown-content" }, ri = {
2161
2228
  key: 0,
2162
2229
  class: "cregis-cascader__dropdown-item-popover"
2163
- }, Ya = { class: "cregis-cascader__suboption-amount-container" }, Xa = {
2230
+ }, ii = { class: "cregis-cascader__suboption-amount-container" }, oi = {
2164
2231
  key: 0,
2165
2232
  class: "cregis-cascader__suboption-amount"
2166
- }, Ka = { class: "cregis-cascader__suboption-panel" }, Qa = ["onClick"], Ga = ["onClick"], ui = /* @__PURE__ */ te({
2233
+ }, li = { class: "cregis-cascader__suboption-panel" }, si = ["onClick"], ci = ["onClick"], zi = /* @__PURE__ */ Q({
2167
2234
  name: "Cascader",
2168
2235
  __name: "Cascader",
2169
2236
  props: {
@@ -2187,289 +2254,289 @@ const Ba = (e, t) => {
2187
2254
  searchText: { default: "search" }
2188
2255
  },
2189
2256
  emits: ["update:modelValue", "change", "visible-change", "filter-input", "filter-clear"],
2190
- setup(e, { emit: t }) {
2191
- const r = e, n = t, a = q(null), o = q(!1);
2192
- let s = null;
2193
- const i = () => {
2194
- s !== null && (clearTimeout(s), s = null);
2195
- }, l = q(""), d = q(""), c = h(() => d.value.trim().toLowerCase()), $ = () => {
2196
- r.filterable && (i(), s = setTimeout(() => {
2197
- d.value = l.value.trim(), s = null;
2198
- }, r.filterDebounceMs));
2257
+ setup(e, { emit: a }) {
2258
+ const t = e, r = a, n = F(null), i = F(!1);
2259
+ let l = null;
2260
+ const o = () => {
2261
+ l !== null && (clearTimeout(l), l = null);
2262
+ }, s = F(""), d = F(""), c = v(() => d.value.trim().toLowerCase()), w = () => {
2263
+ t.filterable && (o(), l = setTimeout(() => {
2264
+ d.value = s.value.trim(), l = null;
2265
+ }, t.filterDebounceMs));
2199
2266
  };
2200
- ee(l, () => {
2201
- r.filterable && $();
2202
- }), ee(
2203
- () => r.filterable,
2204
- (p) => {
2205
- p || (l.value = "", d.value = "", i());
2267
+ J(s, () => {
2268
+ t.filterable && w();
2269
+ }), J(
2270
+ () => t.filterable,
2271
+ (g) => {
2272
+ g || (s.value = "", d.value = "", o());
2206
2273
  }
2207
- ), De(() => i());
2208
- const P = (p) => {
2209
- n("filter-input", String(p ?? ""));
2274
+ ), xe(() => o());
2275
+ const $ = (g) => {
2276
+ r("filter-input", String(g ?? ""));
2210
2277
  }, m = () => {
2211
- d.value = "", i(), n("filter-clear");
2212
- }, b = (p) => (p.filterText ?? p.label).toLowerCase(), w = (p) => {
2213
- const N = c.value;
2214
- return !N || b(p).includes(N) ? !0 : (p.children ?? []).some((se) => b(se).includes(N));
2215
- }, T = (p, N) => {
2216
- const A = c.value;
2217
- return !A || b(p).includes(A) ? !0 : b(N).includes(A);
2218
- }, V = h(() => r.options.filter((p) => w(p))), R = h(() => r.options.length === 0), L = h(() => (c.value, r.options.some((p) => w(p)))), O = h(
2219
- () => r.filterable && !!d.value.trim() && !L.value && !R.value
2220
- ), S = (p) => {
2221
- o.value = p, n("visible-change", p), !p && r.filterable && (l.value = "", d.value = "", i());
2222
- }, f = q(null), E = (p) => {
2223
- const N = r.options.find((A) => A.value === p);
2224
- if (N)
2278
+ d.value = "", o(), r("filter-clear");
2279
+ }, k = (g) => (g.filterText ?? g.label).toLowerCase(), O = (g) => {
2280
+ const U = c.value;
2281
+ return !U || k(g).includes(U) ? !0 : (g.children ?? []).some((ce) => k(ce).includes(U));
2282
+ }, V = (g, U) => {
2283
+ const L = c.value;
2284
+ return !L || k(g).includes(L) ? !0 : k(U).includes(L);
2285
+ }, x = v(() => t.options.filter((g) => O(g))), B = v(() => t.options.length === 0), R = v(() => (c.value, t.options.some((g) => O(g)))), C = v(
2286
+ () => t.filterable && !!d.value.trim() && !R.value && !B.value
2287
+ ), E = (g) => {
2288
+ i.value = g, r("visible-change", g), !g && t.filterable && (s.value = "", d.value = "", o());
2289
+ }, f = F(null), S = (g) => {
2290
+ const U = t.options.find((L) => L.value === g);
2291
+ if (U)
2225
2292
  return {
2226
2293
  level: 1,
2227
- label: N.label,
2228
- primary: N,
2294
+ label: U.label,
2295
+ primary: U,
2229
2296
  sub: void 0
2230
2297
  };
2231
- for (const A of r.options) {
2232
- const se = A.children?.find((J) => J.value === p);
2233
- if (se)
2298
+ for (const L of t.options) {
2299
+ const ce = L.children?.find((ie) => ie.value === g);
2300
+ if (ce)
2234
2301
  return {
2235
2302
  level: 2,
2236
- label: se.label,
2237
- primary: A,
2238
- sub: se
2303
+ label: ce.label,
2304
+ primary: L,
2305
+ sub: ce
2239
2306
  };
2240
2307
  }
2241
2308
  return {
2242
2309
  level: 0,
2243
- label: String(p),
2310
+ label: String(g),
2244
2311
  primary: void 0,
2245
2312
  sub: void 0
2246
2313
  };
2247
- }, D = h(() => {
2248
- const p = r.modelValue;
2249
- return p == null || p === "" ? {
2314
+ }, P = v(() => {
2315
+ const g = t.modelValue;
2316
+ return g == null || g === "" ? {
2250
2317
  level: 0,
2251
2318
  label: "",
2252
2319
  primary: void 0,
2253
2320
  sub: void 0
2254
- } : f.value !== null && f.value.value === p ? {
2321
+ } : f.value !== null && f.value.value === g ? {
2255
2322
  level: f.value.level,
2256
2323
  label: f.value.label,
2257
2324
  primary: f.value.primary,
2258
2325
  sub: f.value.sub
2259
- } : E(p);
2326
+ } : S(g);
2260
2327
  });
2261
- ee(
2262
- () => r.modelValue,
2263
- (p) => {
2264
- if (p == null || p === "") {
2328
+ J(
2329
+ () => t.modelValue,
2330
+ (g) => {
2331
+ if (g == null || g === "") {
2265
2332
  f.value = null;
2266
2333
  return;
2267
2334
  }
2268
- f.value !== null && f.value.value !== p && (f.value = null);
2335
+ f.value !== null && f.value.value !== g && (f.value = null);
2269
2336
  }
2270
2337
  );
2271
- const W = h(() => D.value.level > 0), M = h(() => D.value.label), j = h(() => r.modelValue), x = h(() => M.value), C = h(() => D.value.level), U = h(() => D.value.primary), Q = h(() => D.value.sub), u = (p) => (p.children?.length ?? 0) > 0, v = (p) => r.modelValue === p, B = (p) => {
2272
- const N = r.modelValue;
2273
- return N == null || N === "" ? !1 : (p.children ?? []).some((A) => A.value === N);
2274
- }, I = (p, N) => {
2275
- r.disabled || p.disabled || N.disabled || (f.value = { value: N.value, label: N.label, level: 2, primary: p, sub: N }, n("update:modelValue", N.value), n("change", N.value), a.value?.close());
2276
- }, g = (p) => {
2277
- r.disabled || p.disabled || u(p) || (f.value = { value: p.value, label: p.label, level: 1, primary: p }, n("update:modelValue", p.value), n("change", p.value), a.value?.close());
2278
- }, _ = (p) => typeof p == "number" ? `${p}px` : p, Y = h(() => {
2279
- if (r.popperWidth !== void 0 && r.popperWidth !== null && r.popperWidth !== "")
2280
- return _(r.popperWidth);
2281
- const p = r.triggerWidth;
2282
- return typeof p == "number" ? `${p + 8}px` : `calc(${p} + 8px)`;
2283
- }), G = h(() => _(r.subPopperWidth)), he = h(() => typeof Y.value == "number" ? `${Y.value - 12}px` : `calc(${Y.value} - 12px)`), fe = h(() => ({
2284
- maxHeight: _(r.maxPopperHeight),
2338
+ const N = v(() => P.value.level > 0), I = v(() => P.value.label), _ = v(() => t.modelValue), T = v(() => I.value), D = v(() => P.value.level), X = v(() => P.value.primary), te = v(() => P.value.sub), u = (g) => (g.children?.length ?? 0) > 0, b = (g) => t.modelValue === g, z = (g) => {
2339
+ const U = t.modelValue;
2340
+ return U == null || U === "" ? !1 : (g.children ?? []).some((L) => L.value === U);
2341
+ }, q = (g, U) => {
2342
+ t.disabled || g.disabled || U.disabled || (f.value = { value: U.value, label: U.label, level: 2, primary: g, sub: U }, r("update:modelValue", U.value), r("change", U.value), n.value?.close());
2343
+ }, re = (g) => {
2344
+ t.disabled || g.disabled || u(g) || (f.value = { value: g.value, label: g.label, level: 1, primary: g }, r("update:modelValue", g.value), r("change", g.value), n.value?.close());
2345
+ }, h = (g) => typeof g == "number" ? `${g}px` : g, H = v(() => {
2346
+ if (t.popperWidth !== void 0 && t.popperWidth !== null && t.popperWidth !== "")
2347
+ return h(t.popperWidth);
2348
+ const g = t.triggerWidth;
2349
+ return typeof g == "number" ? `${g + 8}px` : `calc(${g} + 8px)`;
2350
+ }), Y = v(() => h(t.subPopperWidth)), ae = v(() => typeof H.value == "number" ? `${H.value - 12}px` : `calc(${H.value} - 12px)`), me = v(() => ({
2351
+ maxHeight: h(t.maxPopperHeight),
2285
2352
  overflowY: "auto"
2286
- })), xe = { strategy: "fixed" }, Te = h(() => r.align === "center" ? "bottom" : r.align === "left" ? "bottom-start" : "bottom-end"), me = h(() => ({
2287
- width: _(r.triggerWidth)
2288
- })), Re = h(() => r.size === "large" ? "20px" : r.size === "medium" ? "14px" : "12px"), He = q(0), Ae = (p) => {
2289
- const N = p.target;
2290
- He.value = N.scrollTop;
2291
- }, rt = [-16, -8];
2292
- return (p, N) => (y(), k("div", {
2293
- class: F(["cregis-cascader", { "is-disabled": e.disabled }])
2353
+ })), $e = { strategy: "fixed" }, Te = v(() => t.align === "center" ? "bottom" : t.align === "left" ? "bottom-start" : "bottom-end"), be = v(() => ({
2354
+ width: h(t.triggerWidth)
2355
+ })), Re = v(() => t.size === "large" ? "20px" : t.size === "medium" ? "14px" : "12px"), Xe = F(0), Le = (g) => {
2356
+ const U = g.target;
2357
+ Xe.value = U.scrollTop;
2358
+ }, it = [-16, -8];
2359
+ return (g, U) => (p(), y("div", {
2360
+ class: W(["cregis-cascader", { "is-disabled": e.disabled }])
2294
2361
  }, [
2295
- Z(vt, {
2362
+ K(ht, {
2296
2363
  ref_key: "popoverRef",
2297
- ref: a,
2364
+ ref: n,
2298
2365
  "preserve-content-mount": "",
2299
- "popper-width": Y.value,
2366
+ "popper-width": H.value,
2300
2367
  placement: Te.value,
2301
2368
  offset: e.offset,
2302
2369
  disabled: !!e.disabled,
2303
2370
  padding: 0,
2304
- onVisibleChange: S
2371
+ onVisibleChange: E
2305
2372
  }, {
2306
- reference: re(() => [
2307
- p.$slots.trigger ? K(p.$slots, "trigger", {
2373
+ reference: ee(() => [
2374
+ g.$slots.trigger ? G(g.$slots, "trigger", {
2308
2375
  key: 0,
2309
- modelValue: j.value,
2310
- selectedLabel: x.value,
2311
- level: C.value,
2312
- primaryOption: U.value,
2313
- subOption: Q.value,
2376
+ modelValue: _.value,
2377
+ selectedLabel: T.value,
2378
+ level: D.value,
2379
+ primaryOption: X.value,
2380
+ subOption: te.value,
2314
2381
  placeholder: e.placeholder,
2315
- hasSelection: W.value,
2316
- open: o.value,
2382
+ hasSelection: N.value,
2383
+ open: i.value,
2317
2384
  disabled: !!e.disabled
2318
- }) : (y(), k("div", {
2385
+ }) : (p(), y("div", {
2319
2386
  key: 1,
2320
- class: F(["cregis-cascader__trigger", { [`cregis-cascader__trigger--${e.size}`]: e.size, [`cregis-cascader__trigger--${e.type}`]: e.type }]),
2321
- style: de(me.value)
2387
+ class: W(["cregis-cascader__trigger", { [`cregis-cascader__trigger--${e.size}`]: e.size, [`cregis-cascader__trigger--${e.type}`]: e.type }]),
2388
+ style: ne(be.value)
2322
2389
  }, [
2323
- z("div", Na, [
2324
- W.value ? K(p.$slots, "label", {
2390
+ A("div", Zr, [
2391
+ N.value ? G(g.$slots, "label", {
2325
2392
  key: 0,
2326
- modelValue: j.value,
2327
- selectedLabel: x.value,
2328
- level: C.value,
2329
- primaryOption: U.value,
2330
- subOption: Q.value,
2393
+ modelValue: _.value,
2394
+ selectedLabel: T.value,
2395
+ level: D.value,
2396
+ primaryOption: X.value,
2397
+ subOption: te.value,
2331
2398
  placeholder: e.placeholder,
2332
- hasSelection: W.value
2399
+ hasSelection: N.value
2333
2400
  }, () => [
2334
- z("p", Ia, H(M.value), 1)
2335
- ]) : (y(), k("p", _a, H(e.placeholder), 1))
2401
+ A("p", Jr, M(I.value), 1)
2402
+ ]) : (p(), y("p", ei, M(e.placeholder), 1))
2336
2403
  ]),
2337
- z("span", {
2338
- class: F(["cregis-cascader__icon", { "is-open": o.value }])
2404
+ A("span", {
2405
+ class: W(["cregis-cascader__icon", { "is-open": i.value }])
2339
2406
  }, [
2340
- Z(ie(Kt), {
2407
+ K(Z(aa), {
2341
2408
  size: Re.value,
2342
- color: e.disabled ? "var(--text-base-quaternary)" : "var(--material-foreground-base-secondary)"
2409
+ color: e.disabled ? "var(--text-base-quaternary)" : "var(--material-base-secondary)"
2343
2410
  }, null, 8, ["size", "color"])
2344
2411
  ], 2)
2345
2412
  ], 6))
2346
2413
  ]),
2347
- default: re(() => [
2348
- z("div", {
2349
- class: F(["cregis-cascader__dropdown", { "is-empty": R.value }]),
2350
- style: de(fe.value),
2351
- onScroll: Ae
2414
+ default: ee(() => [
2415
+ A("div", {
2416
+ class: W(["cregis-cascader__dropdown", { "is-empty": B.value }]),
2417
+ style: ne(me.value),
2418
+ onScroll: Le
2352
2419
  }, [
2353
- R.value ? (y(), k("p", Fa, H(e.noDataText), 1)) : X("", !0),
2354
- e.filterable && !R.value ? (y(), k("div", {
2420
+ B.value ? (p(), y("p", ti, M(e.noDataText), 1)) : j("", !0),
2421
+ e.filterable && !B.value ? (p(), y("div", {
2355
2422
  key: 1,
2356
- class: F(["cregis-cascader__dropdown-filter", { "backdrop-fixed-header": He.value > 10 }])
2423
+ class: W(["cregis-cascader__dropdown-filter", { "backdrop-fixed-header": Xe.value > 10 }])
2357
2424
  }, [
2358
- Z(Qt, {
2359
- modelValue: l.value,
2360
- "onUpdate:modelValue": N[0] || (N[0] = (A) => l.value = A),
2425
+ K(na, {
2426
+ modelValue: s.value,
2427
+ "onUpdate:modelValue": U[0] || (U[0] = (L) => s.value = L),
2361
2428
  placeholder: e.searchText,
2362
- width: he.value,
2429
+ width: ae.value,
2363
2430
  size: "small",
2364
2431
  clearable: "",
2365
- onInput: P,
2432
+ onInput: $,
2366
2433
  onClear: m
2367
2434
  }, {
2368
- prefix: re(() => [
2369
- Z(ie(Xt), { size: "14px" })
2435
+ prefix: ee(() => [
2436
+ K(Z(ta), { size: "14px" })
2370
2437
  ]),
2371
2438
  _: 1
2372
2439
  }, 8, ["modelValue", "placeholder", "width"])
2373
- ], 2)) : X("", !0),
2374
- O.value ? (y(), k("p", Ha, H(e.noMatchText), 1)) : X("", !0),
2375
- z("ul", qa, [
2376
- (y(!0), k(ct, null, ut(V.value, (A, se) => (y(), k("li", {
2377
- key: A.value,
2378
- class: F(["cregis-cascader__dropdown-item", { "is-disabled": A.disabled }])
2440
+ ], 2)) : j("", !0),
2441
+ C.value ? (p(), y("p", ai, M(e.noMatchText), 1)) : j("", !0),
2442
+ A("ul", ni, [
2443
+ (p(!0), y(ft, null, pt(x.value, (L, ce) => (p(), y("li", {
2444
+ key: L.value,
2445
+ class: W(["cregis-cascader__dropdown-item", { "is-disabled": L.disabled }])
2379
2446
  }, [
2380
- u(A) ? (y(), k("div", Ua, [
2381
- Z(vt, {
2447
+ u(L) ? (p(), y("div", ri, [
2448
+ K(ht, {
2382
2449
  trigger: "hover",
2383
2450
  placement: "right-start",
2384
- offset: rt,
2385
- "popover-options": xe,
2386
- "popper-width": G.value,
2451
+ offset: it,
2452
+ "popover-options": $e,
2453
+ "popper-width": Y.value,
2387
2454
  padding: 4,
2388
- disabled: !!A.disabled || !!e.disabled
2455
+ disabled: !!L.disabled || !!e.disabled
2389
2456
  }, {
2390
- reference: re(() => [
2391
- z("div", {
2392
- class: F(["cregis-cascader__suboption-trigger", {
2393
- "is-disabled": A.disabled,
2394
- "is-parent-active": B(A)
2457
+ reference: ee(() => [
2458
+ A("div", {
2459
+ class: W(["cregis-cascader__suboption-trigger", {
2460
+ "is-disabled": L.disabled,
2461
+ "is-parent-active": z(L)
2395
2462
  }])
2396
2463
  }, [
2397
- K(p.$slots, "option", {
2398
- modelValue: j.value,
2399
- selectedLabel: x.value,
2400
- level: C.value,
2401
- primaryOption: U.value,
2402
- subOption: Q.value,
2403
- option: A,
2404
- index: se,
2405
- disabled: !!A.disabled,
2406
- selected: v(A.value),
2407
- isParentOfSelected: B(A)
2464
+ G(g.$slots, "option", {
2465
+ modelValue: _.value,
2466
+ selectedLabel: T.value,
2467
+ level: D.value,
2468
+ primaryOption: X.value,
2469
+ subOption: te.value,
2470
+ option: L,
2471
+ index: ce,
2472
+ disabled: !!L.disabled,
2473
+ selected: b(L.value),
2474
+ isParentOfSelected: z(L)
2408
2475
  }, () => [
2409
- z("p", null, H(A.label), 1)
2476
+ A("p", null, M(L.label), 1)
2410
2477
  ]),
2411
- z("div", Ya, [
2412
- e.showSubOptionAmount ? (y(), k("div", Xa, H(A.children.length), 1)) : X("", !0),
2413
- Z(ie(yr), {
2478
+ A("div", ii, [
2479
+ e.showSubOptionAmount ? (p(), y("div", oi, M(L.children.length), 1)) : j("", !0),
2480
+ K(Z(Ta), {
2414
2481
  size: "14px",
2415
2482
  color: "currentColor"
2416
2483
  })
2417
2484
  ])
2418
2485
  ], 2)
2419
2486
  ]),
2420
- default: re(() => [
2421
- z("div", Ka, [
2422
- (y(!0), k(ct, null, ut(A.children, (J, nt) => je((y(), k("div", {
2423
- key: J.value,
2424
- class: F(["cregis-cascader__suboption-row", {
2425
- "is-active": v(J.value),
2426
- "is-disabled": J.disabled
2487
+ default: ee(() => [
2488
+ A("div", li, [
2489
+ (p(!0), y(ft, null, pt(L.children, (ie, ot) => _e((p(), y("div", {
2490
+ key: ie.value,
2491
+ class: W(["cregis-cascader__suboption-row", {
2492
+ "is-active": b(ie.value),
2493
+ "is-disabled": ie.disabled
2427
2494
  }]),
2428
2495
  role: "menuitem",
2429
- onClick: (kt) => I(A, J)
2496
+ onClick: (Vt) => q(L, ie)
2430
2497
  }, [
2431
- K(p.$slots, "subOption", {
2432
- modelValue: j.value,
2433
- selectedLabel: x.value,
2434
- level: C.value,
2435
- primaryOption: U.value,
2436
- subOption: Q.value,
2437
- option: J,
2438
- index: nt,
2439
- parent: A,
2440
- parentIndex: se,
2441
- selected: v(J.value),
2442
- disabled: !!J.disabled
2498
+ G(g.$slots, "subOption", {
2499
+ modelValue: _.value,
2500
+ selectedLabel: T.value,
2501
+ level: D.value,
2502
+ primaryOption: X.value,
2503
+ subOption: te.value,
2504
+ option: ie,
2505
+ index: ot,
2506
+ parent: L,
2507
+ parentIndex: ce,
2508
+ selected: b(ie.value),
2509
+ disabled: !!ie.disabled
2443
2510
  }, () => [
2444
- $e(H(J.label), 1)
2511
+ ve(M(ie.label), 1)
2445
2512
  ])
2446
- ], 10, Qa)), [
2447
- [gt, T(A, J)]
2513
+ ], 10, si)), [
2514
+ [wt, V(L, ie)]
2448
2515
  ])), 128))
2449
2516
  ])
2450
2517
  ]),
2451
2518
  _: 2
2452
2519
  }, 1032, ["popper-width", "disabled"])
2453
- ])) : (y(), k("div", {
2520
+ ])) : (p(), y("div", {
2454
2521
  key: 1,
2455
2522
  class: "cregis-cascader__leaf-only",
2456
- onClick: (J) => g(A)
2523
+ onClick: (ie) => re(L)
2457
2524
  }, [
2458
- K(p.$slots, "option", {
2459
- modelValue: j.value,
2460
- selectedLabel: x.value,
2461
- level: C.value,
2462
- primaryOption: U.value,
2463
- subOption: Q.value,
2464
- option: A,
2465
- index: se,
2466
- disabled: !!A.disabled,
2467
- selected: v(A.value),
2525
+ G(g.$slots, "option", {
2526
+ modelValue: _.value,
2527
+ selectedLabel: T.value,
2528
+ level: D.value,
2529
+ primaryOption: X.value,
2530
+ subOption: te.value,
2531
+ option: L,
2532
+ index: ce,
2533
+ disabled: !!L.disabled,
2534
+ selected: b(L.value),
2468
2535
  isParentOfSelected: !1
2469
2536
  }, () => [
2470
- z("p", null, H(A.label), 1)
2537
+ A("p", null, M(L.label), 1)
2471
2538
  ])
2472
- ], 8, Ga))
2539
+ ], 8, ci))
2473
2540
  ], 2))), 128))
2474
2541
  ])
2475
2542
  ], 38)
@@ -2478,22 +2545,442 @@ const Ba = (e, t) => {
2478
2545
  }, 8, ["popper-width", "placement", "offset", "disabled"])
2479
2546
  ], 2));
2480
2547
  }
2548
+ }), Ri = /* @__PURE__ */ Q({
2549
+ name: "Tag",
2550
+ __name: "Tag",
2551
+ props: {
2552
+ type: { default: "subtle" },
2553
+ size: { default: "medium" },
2554
+ text: {}
2555
+ },
2556
+ setup(e) {
2557
+ return (a, t) => (p(), y("div", {
2558
+ class: W(["cregis-tag", [`cregis-tag--${e.type}`, `cregis-tag--${e.size}`]])
2559
+ }, [
2560
+ G(a.$slots, "default", {}, () => [
2561
+ ve(M(e.text), 1)
2562
+ ])
2563
+ ], 2));
2564
+ }
2565
+ }), Li = /* @__PURE__ */ Q({
2566
+ name: "Switch",
2567
+ __name: "Switch",
2568
+ props: {
2569
+ modelValue: { type: [Boolean, String, Number], default: !1 },
2570
+ size: { default: "medium" },
2571
+ disabled: { type: Boolean, default: !1 },
2572
+ activeValue: { type: [Boolean, String, Number], default: !0 },
2573
+ inactiveValue: { type: [Boolean, String, Number], default: !1 },
2574
+ beforeChange: {}
2575
+ },
2576
+ emits: ["update:modelValue", "change"],
2577
+ setup(e, { emit: a }) {
2578
+ const t = e, r = a, n = F(!1), i = v(() => t.modelValue === t.activeValue), l = async () => {
2579
+ if (t.disabled || n.value) return;
2580
+ const o = i.value ? t.inactiveValue : t.activeValue;
2581
+ if (t.beforeChange) {
2582
+ n.value = !0;
2583
+ try {
2584
+ if (!await t.beforeChange()) return;
2585
+ } catch {
2586
+ return;
2587
+ } finally {
2588
+ n.value = !1;
2589
+ }
2590
+ }
2591
+ r("update:modelValue", o);
2592
+ };
2593
+ return J(
2594
+ () => t.modelValue,
2595
+ (o) => {
2596
+ r("change", o);
2597
+ }
2598
+ ), (o, s) => (p(), y("div", {
2599
+ class: W(["cregis-switch", [
2600
+ `cregis-switch--${e.size}`,
2601
+ { "is-checked": i.value, "is-disabled": e.disabled || n.value }
2602
+ ]]),
2603
+ onClick: l
2604
+ }, [...s[0] || (s[0] = [
2605
+ A("div", { class: "cregis-switch__circle" }, null, -1)
2606
+ ])], 2));
2607
+ }
2608
+ }), ui = { class: "cregis-badge__wrapper" }, Wi = /* @__PURE__ */ Q({
2609
+ name: "Badge",
2610
+ __name: "Badge",
2611
+ props: {
2612
+ value: { default: "" },
2613
+ max: { default: 99 },
2614
+ isDot: { type: Boolean, default: !1 },
2615
+ hidden: { type: Boolean, default: !1 },
2616
+ type: { default: "info" },
2617
+ offset: {}
2618
+ },
2619
+ setup(e) {
2620
+ const a = {
2621
+ normal: [-8, -10],
2622
+ dot: [-2, -2]
2623
+ }, t = e, r = v(() => t.offset ?? (t.isDot ? a.dot : a.normal)), n = v(() => ({
2624
+ top: `${r.value[0]}px`,
2625
+ right: `${r.value[1]}px`
2626
+ }));
2627
+ return (i, l) => (p(), y("div", ui, [
2628
+ e.hidden ? j("", !0) : (p(), y("div", {
2629
+ key: 0,
2630
+ class: W(["cregis-badge", [`cregis-badge--${e.type}`, { "cregis-badge--dot": e.isDot }]]),
2631
+ style: ne(n.value)
2632
+ }, M(e.isDot ? "" : Number(e.value) > e.max ? `${e.max}+` : e.value), 7)),
2633
+ G(i.$slots, "default")
2634
+ ]));
2635
+ }
2636
+ }), di = ["accept", "disabled"], fi = ["src"], pi = {
2637
+ key: 2,
2638
+ class: "cregis-upload__mask"
2639
+ }, Mi = /* @__PURE__ */ Q({
2640
+ name: "Upload",
2641
+ __name: "Upload",
2642
+ props: {
2643
+ modelValue: {},
2644
+ accept: {},
2645
+ size: {},
2646
+ width: { default: 72 },
2647
+ disabled: { type: Boolean },
2648
+ exceedAcceptTip: {},
2649
+ exceedSizeTip: {},
2650
+ onChange: {}
2651
+ },
2652
+ emits: ["update:modelValue"],
2653
+ setup(e, { emit: a }) {
2654
+ const t = e, r = a, n = F(0), i = F(""), l = ["http:", "https:", "blob:"], o = (x) => {
2655
+ if (!x) return !1;
2656
+ if (x.toLowerCase().startsWith("data:image/")) return !0;
2657
+ try {
2658
+ const { protocol: B } = new URL(x, window.location.origin);
2659
+ return l.includes(B);
2660
+ } catch {
2661
+ return x.startsWith("/") && !x.startsWith("//");
2662
+ }
2663
+ }, s = v(() => o(i.value) ? i.value : ""), d = v(() => ({
2664
+ width: typeof t.width == "number" ? `${t.width}px` : t.width,
2665
+ height: typeof t.width == "number" ? `${t.width}px` : t.width
2666
+ })), c = (x) => {
2667
+ const B = x.lastIndexOf(".");
2668
+ return B === -1 ? "" : x.slice(B + 1).toLowerCase();
2669
+ }, w = (x, B) => {
2670
+ const R = B.split(",").map((f) => f.trim()).filter(Boolean);
2671
+ if (!R.length) return !0;
2672
+ const C = c(x.name), E = x.type.toLowerCase();
2673
+ return R.some((f) => {
2674
+ const S = f.toLowerCase();
2675
+ return S.startsWith(".") ? C === S.slice(1) : S.includes("/") ? S.endsWith("/*") ? E.startsWith(S.slice(0, -1)) : E === S : C === S;
2676
+ });
2677
+ }, $ = (x) => {
2678
+ x.value = "";
2679
+ };
2680
+ let m;
2681
+ const k = (x) => {
2682
+ const B = x.target, R = B.files?.[0];
2683
+ if (!R) return;
2684
+ if (t.accept && !w(R, t.accept)) {
2685
+ Lt(t.exceedAcceptTip ?? "The file format does not meet the requirements."), $(B);
2686
+ return;
2687
+ }
2688
+ if (t.size !== void 0 && R.size > t.size * 1024 * 1024) {
2689
+ Lt(t.exceedSizeTip ?? `The file size cannot exceed ${t.size} MB.`), $(B);
2690
+ return;
2691
+ }
2692
+ r("update:modelValue", "");
2693
+ const C = new FormData();
2694
+ C.append("file", R, R.name), t.onChange?.(C), m = setInterval(() => {
2695
+ n.value += 30, n.value >= 90 && clearInterval(m);
2696
+ }, 200);
2697
+ };
2698
+ J(
2699
+ () => t.modelValue,
2700
+ (x) => {
2701
+ x ? (n.value = 100, i.value = x) : (n.value = 0, i.value = "");
2702
+ },
2703
+ {
2704
+ immediate: !0
2705
+ }
2706
+ );
2707
+ const O = v(() => ({
2708
+ width: `${n.value}%`,
2709
+ borderRadius: n.value === 100 ? "0 0 6px 6px" : "0 0 0 6px"
2710
+ })), V = v(() => t.disabled || n.value > 0 && n.value < 100);
2711
+ return xe(() => {
2712
+ m && clearInterval(m);
2713
+ }), (x, B) => (p(), y("div", {
2714
+ class: W(["cregis-upload", { "cregis-upload--disabled": V.value }]),
2715
+ style: ne(d.value)
2716
+ }, [
2717
+ K(Z(Rt), {
2718
+ size: "16px",
2719
+ color: "var(--stroke-base-secondary)"
2720
+ }),
2721
+ A("input", {
2722
+ type: "file",
2723
+ title: "",
2724
+ accept: e.accept,
2725
+ disabled: V.value,
2726
+ onChange: k
2727
+ }, null, 40, di),
2728
+ n.value > 0 && n.value < 100 ? (p(), y("div", {
2729
+ key: 0,
2730
+ class: "cregis-upload__progress",
2731
+ style: ne(O.value)
2732
+ }, null, 4)) : j("", !0),
2733
+ s.value ? (p(), y("img", {
2734
+ key: 1,
2735
+ src: s.value,
2736
+ alt: ""
2737
+ }, null, 8, fi)) : j("", !0),
2738
+ s.value ? (p(), y("div", pi, [
2739
+ K(Z(Rt), {
2740
+ size: "16px",
2741
+ color: "var(--text-same-white-primary)"
2742
+ })
2743
+ ])) : j("", !0)
2744
+ ], 6));
2745
+ }
2481
2746
  });
2747
+ let Ie = 0, ha = "";
2748
+ const vi = () => {
2749
+ Ie === 0 && (ha = document.body.style.overflow, document.body.style.overflow = "hidden"), Ie++;
2750
+ }, Kt = () => {
2751
+ Ie <= 0 || (Ie--, Ie === 0 && (document.body.style.overflow = ha));
2752
+ }, tt = /* @__PURE__ */ Q({
2753
+ name: "Dialog",
2754
+ __name: "Dialog",
2755
+ props: {
2756
+ modelValue: { type: Boolean, default: !1 },
2757
+ width: { default: "50%" },
2758
+ top: { default: "20vh" },
2759
+ alignCenter: { type: Boolean, default: !1 },
2760
+ showClose: { type: Boolean, default: !0 },
2761
+ closeOnClickModal: { type: Boolean, default: !0 },
2762
+ modal: { type: Boolean, default: !0 },
2763
+ lockScroll: { type: Boolean, default: !0 }
2764
+ },
2765
+ emits: ["update:modelValue", "after-leave"],
2766
+ setup(e, { emit: a }) {
2767
+ const t = e, r = a;
2768
+ let n = !1;
2769
+ J(() => [t.modelValue, t.lockScroll], () => {
2770
+ const w = t.modelValue && t.lockScroll;
2771
+ w && !n ? (vi(), n = !0) : !w && n && (Kt(), n = !1);
2772
+ }, { immediate: !0 }), xe(() => {
2773
+ n && (Kt(), n = !1);
2774
+ });
2775
+ const l = v(() => ({
2776
+ width: typeof t.width == "number" ? `${t.width}px` : t.width
2777
+ })), o = v(() => {
2778
+ if (!t.alignCenter)
2779
+ return {
2780
+ paddingTop: t.top
2781
+ };
2782
+ }), s = () => {
2783
+ r("update:modelValue", !1);
2784
+ }, d = () => {
2785
+ t.closeOnClickModal && s();
2786
+ }, c = () => {
2787
+ r("after-leave");
2788
+ };
2789
+ return (w, $) => (p(), pe(ea, { to: "body" }, [
2790
+ K(nt, {
2791
+ name: "cregis-dialog-fade",
2792
+ onAfterLeave: c
2793
+ }, {
2794
+ default: ee(() => [
2795
+ e.modelValue ? (p(), y("div", {
2796
+ key: 0,
2797
+ class: W(["cregis-dialog__wrapper", {
2798
+ "cregis-dialog__wrapper--center": e.alignCenter,
2799
+ "cregis-dialog__wrapper--no-modal": !e.modal
2800
+ }]),
2801
+ style: ne(o.value)
2802
+ }, [
2803
+ e.modal ? (p(), y("div", {
2804
+ key: 0,
2805
+ class: "cregis-dialog__mask",
2806
+ onClick: d
2807
+ })) : j("", !0),
2808
+ A("div", {
2809
+ class: "cregis-dialog",
2810
+ style: ne(l.value),
2811
+ onClick: $[0] || ($[0] = bt(() => {
2812
+ }, ["stop"]))
2813
+ }, [
2814
+ e.showClose ? (p(), y("div", {
2815
+ key: 0,
2816
+ class: "cregis-dialog__close",
2817
+ onClick: s
2818
+ }, [
2819
+ K(Z(Va), {
2820
+ size: "10px",
2821
+ color: "var(--material-same-white-primary)"
2822
+ })
2823
+ ])) : j("", !0),
2824
+ G(w.$slots, "default")
2825
+ ], 4)
2826
+ ], 6)) : j("", !0)
2827
+ ]),
2828
+ _: 3
2829
+ })
2830
+ ]));
2831
+ }
2832
+ }), mi = { class: "cregis-dialog-confirm" }, gi = { class: "cregis-dialog-confirm__icon-wrapper" }, hi = { class: "cregis-dialog-confirm__icon" }, bi = {
2833
+ key: 0,
2834
+ class: "cregis-dialog-confirm__title"
2835
+ }, yi = {
2836
+ key: 1,
2837
+ class: "cregis-dialog-confirm__message"
2838
+ }, wi = { class: "cregis-dialog-confirm__footer" }, xi = /* @__PURE__ */ Q({
2839
+ name: "ConfirmDialog",
2840
+ __name: "ConfirmDialog",
2841
+ props: {
2842
+ title: {},
2843
+ message: {},
2844
+ confirmButtonText: { default: "Confirm" },
2845
+ cancelButtonText: { default: "Cancel" },
2846
+ showConfirmButton: { type: Boolean, default: !0 },
2847
+ showCancelButton: { type: Boolean, default: !0 },
2848
+ closeOnClickModal: { type: Boolean, default: !0 },
2849
+ lockScroll: { type: Boolean, default: !0 },
2850
+ width: { default: "280px" },
2851
+ onConfirm: {},
2852
+ onCancel: {}
2853
+ },
2854
+ emits: ["after-leave"],
2855
+ setup(e, { emit: a }) {
2856
+ const t = e, r = a, n = F(!1), i = F(null), l = F(null), o = async (w) => {
2857
+ if (!i.value) {
2858
+ i.value = w;
2859
+ try {
2860
+ await (w === "confirm" ? t.onConfirm : t.onCancel)?.(), l.value = w, n.value = !1;
2861
+ } catch {
2862
+ i.value = null;
2863
+ }
2864
+ }
2865
+ }, s = () => o("confirm"), d = () => o("cancel"), c = () => {
2866
+ l.value || t.onCancel?.(), i.value = null, l.value = null, r("after-leave");
2867
+ };
2868
+ return Fe(() => {
2869
+ n.value = !0;
2870
+ }), (w, $) => (p(), pe(tt, {
2871
+ modelValue: n.value,
2872
+ "onUpdate:modelValue": $[0] || ($[0] = (m) => n.value = m),
2873
+ width: e.width,
2874
+ "show-close": !1,
2875
+ "close-on-click-modal": e.closeOnClickModal,
2876
+ "lock-scroll": e.lockScroll,
2877
+ onAfterLeave: c
2878
+ }, {
2879
+ default: ee(() => [
2880
+ A("div", mi, [
2881
+ A("div", gi, [
2882
+ A("div", hi, [
2883
+ K(Z(Ba), {
2884
+ "stroke-width": 3.4,
2885
+ size: "24px",
2886
+ color: "var(--text-base-primary)"
2887
+ })
2888
+ ])
2889
+ ]),
2890
+ e.title ? (p(), y("div", bi, M(e.title), 1)) : j("", !0),
2891
+ e.message ? (p(), y("div", yi, M(e.message), 1)) : j("", !0),
2892
+ A("div", wi, [
2893
+ e.showConfirmButton ? (p(), pe(Be, {
2894
+ key: 0,
2895
+ type: "foreground",
2896
+ block: "",
2897
+ loading: i.value === "confirm",
2898
+ onClick: s
2899
+ }, {
2900
+ default: ee(() => [
2901
+ ve(M(e.confirmButtonText), 1)
2902
+ ]),
2903
+ _: 1
2904
+ }, 8, ["loading"])) : j("", !0),
2905
+ e.showCancelButton ? (p(), pe(Be, {
2906
+ key: 1,
2907
+ type: "secondary",
2908
+ text: "",
2909
+ block: "",
2910
+ loading: i.value === "cancel",
2911
+ onClick: d
2912
+ }, {
2913
+ default: ee(() => [
2914
+ ve(M(e.cancelButtonText), 1)
2915
+ ]),
2916
+ _: 1
2917
+ }, 8, ["loading"])) : j("", !0)
2918
+ ])
2919
+ ])
2920
+ ]),
2921
+ _: 1
2922
+ }, 8, ["modelValue", "width", "close-on-click-modal", "lock-scroll"]));
2923
+ }
2924
+ });
2925
+ function ki(e) {
2926
+ return typeof e == "string" ? { message: e } : e;
2927
+ }
2928
+ function $i(e) {
2929
+ return new Promise((a, t) => {
2930
+ const r = ki(e), n = document.createElement("div");
2931
+ document.body.appendChild(n);
2932
+ const i = () => {
2933
+ Ee(null, n), n.remove();
2934
+ };
2935
+ let l = !1;
2936
+ const o = () => {
2937
+ l || (l = !0, a());
2938
+ }, s = (d) => {
2939
+ l || (l = !0, t(d));
2940
+ };
2941
+ Ee(
2942
+ yt(xi, {
2943
+ ...r,
2944
+ onConfirm: async () => {
2945
+ await r.onConfirm?.(), o();
2946
+ },
2947
+ onCancel: async () => {
2948
+ await r.onCancel?.(), s("cancel");
2949
+ },
2950
+ onAfterLeave: () => {
2951
+ i(), l || s("cancel");
2952
+ }
2953
+ }),
2954
+ n
2955
+ );
2956
+ });
2957
+ }
2958
+ const ba = tt;
2959
+ ba.install = (e) => {
2960
+ e.component(tt.name, tt);
2961
+ };
2962
+ ba.confirm = $i;
2482
2963
  export {
2483
- Ye as Button,
2484
- ui as Cascader,
2485
- ei as Checkbox,
2486
- ri as Divider,
2487
- Qt as Input,
2488
- ii as Message,
2489
- oi as Notification,
2490
- ci as Option,
2491
- vt as Popover,
2492
- si as Progress,
2493
- ti as Radio,
2494
- li as Select,
2495
- Gt as TABS_KEY,
2496
- ai as TabPane,
2497
- ni as Tabs,
2498
- cr as selectInjectKey
2964
+ Wi as Badge,
2965
+ Be as Button,
2966
+ zi as Cascader,
2967
+ Ua as Checkbox,
2968
+ ba as Dialog,
2969
+ Ti as Divider,
2970
+ na as Input,
2971
+ Lt as Message,
2972
+ Ei as Notification,
2973
+ Pi as Option,
2974
+ ht as Popover,
2975
+ Ai as Progress,
2976
+ Si as Radio,
2977
+ Di as Select,
2978
+ Li as Switch,
2979
+ ra as TABS_KEY,
2980
+ Bi as TabPane,
2981
+ Vi as Tabs,
2982
+ Ri as Tag,
2983
+ Mi as Upload,
2984
+ $i as confirm,
2985
+ ga as selectInjectKey
2499
2986
  };