@cregis/ui 0.1.11 → 0.2.1

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,15 +1,16 @@
1
- import { defineComponent as k, computed as y, createElementBlock as r, openBlock as s, createElementVNode as u, createCommentVNode as h, mergeProps as x, createBlock as z, renderSlot as v, resolveDynamicComponent as Y, normalizeClass as g, toDisplayString as p, unref as W, ref as C, watch as S, normalizeStyle as $, withDirectives as F, vModelDynamic as j, withModifiers as Z, vModelText as G, createVNode as D, withCtx as P, createTextVNode as T, nextTick as M, reactive as H, provide as J, toRef as Q, Fragment as X, renderList as _, inject as ee, onMounted as te, onUnmounted as ae } from "vue";
2
- import { EdsLoad as ie, EdsCloseCircleFill as le } from "@cregis/icon";
3
- const ne = {
1
+ import { defineComponent as Q, useSlots as ur, computed as g, createElementBlock as x, openBlock as b, createElementVNode as V, createCommentVNode as I, mergeProps as xe, createBlock as We, resolveDynamicComponent as It, normalizeStyle as ue, renderSlot as q, normalizeClass as j, toDisplayString as M, unref as ae, ref as _, watch as J, withDirectives as Le, vModelDynamic as dr, withModifiers as fr, vModelText as pr, createVNode as U, withCtx as Z, createTextVNode as $e, nextTick as Ye, reactive as je, provide as Nt, toRef as vr, Fragment as st, renderList as lt, inject as Ft, onMounted as Je, onUnmounted as Ee, onBeforeUnmount as Ht, Transition as pt, render as Ke, h as qt, toHandlers as Pt, vShow as vt } from "vue";
2
+ import { EdsLoad as mr, EdsCloseCircleFill as gr, EdsWarningFill as hr, EdsSearch as Ut, EdsArrowDownMiniIos as Xt, EdsArrowRightMiniIos as br } from "@cregis/icon";
3
+ const yr = {
4
4
  key: 0,
5
5
  class: "cregis-button__icon-wrapper"
6
- }, se = ["disabled"], oe = ["disabled"], re = ["disabled"], B = /* @__PURE__ */ k({
6
+ }, wr = ["disabled"], xr = ["disabled"], Or = ["disabled"], Ue = /* @__PURE__ */ Q({
7
7
  name: "Button",
8
8
  inheritAttrs: !1,
9
9
  __name: "Button",
10
10
  props: {
11
11
  type: { default: "primary" },
12
12
  size: { default: "medium" },
13
+ width: {},
13
14
  plain: { type: Boolean },
14
15
  text: { type: Boolean },
15
16
  disabled: { type: Boolean },
@@ -23,7 +24,10 @@ const ne = {
23
24
  isActive: { type: Boolean }
24
25
  },
25
26
  setup(e) {
26
- const t = e, i = y(() => t.size === "large" ? "20px" : t.size === "medium" ? "16px" : "12px"), d = y(() => t.size === "large" || t.size === "medium" ? "16px" : "12px"), l = y(() => {
27
+ const t = e, r = ur(), n = g(() => {
28
+ const s = t, d = r.icon;
29
+ return !s.icon && typeof d == "function";
30
+ }), a = g(() => t.size === "large" ? "20px" : t.size === "medium" ? "16px" : "12px"), i = g(() => t.size === "large" || t.size === "medium" ? "16px" : "12px"), l = g(() => t.width ? { width: t.width } : void 0), o = g(() => {
27
31
  if (t.plain || t.text)
28
32
  switch (t.type) {
29
33
  case "primary":
@@ -40,26 +44,33 @@ const ne = {
40
44
  else
41
45
  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)";
42
46
  });
43
- return (a, o) => e.icon || a.$slots.icon ? (s(), r("div", ne, [
44
- u("button", x(a.$attrs, {
47
+ return (s, d) => e.icon || s.$slots.icon ? (b(), x("div", yr, [
48
+ V("button", xe(s.$attrs, {
45
49
  class: ["cregis-button__icon", {
46
50
  [`cregis-button__icon--${e.iconType}`]: e.iconType,
47
51
  [`cregis-button__icon--${e.size}`]: e.size,
52
+ "cregis-button__icon--slot": n.value,
48
53
  "is-disabled": e.disabled,
49
54
  "is-active": e.isActive
50
55
  }],
51
56
  disabled: e.disabled || e.loading
52
57
  }), [
53
- e.icon ? (s(), z(Y(e.icon), {
58
+ e.icon ? (b(), We(It(e.icon), {
54
59
  key: 0,
55
- size: i.value
56
- }, null, 8, ["size"])) : v(a.$slots, "icon", { key: 1 })
57
- ], 16, se),
58
- e.iconText ? (s(), r("span", {
60
+ size: a.value
61
+ }, null, 8, ["size"])) : (b(), x("span", {
62
+ key: 1,
63
+ class: "cregis-button__icon-slot-inner",
64
+ style: ue({ "--cregis-btn-icon-slot-size": a.value })
65
+ }, [
66
+ q(s.$slots, "icon")
67
+ ], 4))
68
+ ], 16, wr),
69
+ e.iconText ? (b(), x("span", {
59
70
  key: 0,
60
- class: g(["cregis-button__icon-text", { "is-disabled": e.disabled }])
61
- }, p(e.iconText), 3)) : h("", !0)
62
- ])) : e.link ? (s(), r("button", x({ key: 1 }, a.$attrs, {
71
+ class: j(["cregis-button__icon-text", { "is-disabled": e.disabled }])
72
+ }, M(e.iconText), 3)) : I("", !0)
73
+ ])) : e.link ? (b(), x("button", xe({ key: 1 }, s.$attrs, {
63
74
  class: ["cregis-button__link", {
64
75
  [`cregis-button__link--${e.type}`]: e.type,
65
76
  [`cregis-button__link--${e.size}`]: e.size,
@@ -68,11 +79,12 @@ const ne = {
68
79
  }],
69
80
  disabled: e.disabled || e.loading
70
81
  }), [
71
- v(a.$slots, "default")
72
- ], 16, oe)) : (s(), r("button", x({
82
+ q(s.$slots, "default")
83
+ ], 16, xr)) : (b(), x("button", xe({
73
84
  key: 2,
74
85
  ref: "buttonRef"
75
- }, a.$attrs, {
86
+ }, s.$attrs, {
87
+ style: l.value,
76
88
  class: ["cregis-button", {
77
89
  [`cregis-button--${e.type}`]: e.type,
78
90
  [`cregis-button--${e.size}`]: e.size,
@@ -86,24 +98,24 @@ const ne = {
86
98
  }],
87
99
  disabled: e.disabled || e.loading
88
100
  }), [
89
- e.loading ? (s(), z(W(ie), {
101
+ e.loading ? (b(), We(ae(mr), {
90
102
  key: 0,
91
103
  class: "loading",
92
- size: d.value,
93
- color: l.value
94
- }, null, 8, ["size", "color"])) : v(a.$slots, "default", { key: 1 })
95
- ], 16, re));
104
+ size: i.value,
105
+ color: o.value
106
+ }, null, 8, ["size", "color"])) : q(s.$slots, "default", { key: 1 })
107
+ ], 16, Or));
96
108
  }
97
- }), de = {
109
+ }), $r = {
98
110
  key: 0,
99
111
  class: "cregis-input__prefix"
100
- }, ue = ["type", "placeholder", "disabled"], ce = {
112
+ }, kr = ["type", "placeholder", "disabled"], Tr = {
101
113
  key: 2,
102
114
  class: "cregis-input__suffix"
103
- }, me = ["disabled", "placeholder", "rows"], be = {
115
+ }, Sr = ["disabled", "placeholder", "rows"], Cr = {
104
116
  key: 0,
105
117
  class: "cregis-textarea__buttons"
106
- }, ze = /* @__PURE__ */ k({
118
+ }, Yt = /* @__PURE__ */ Q({
107
119
  name: "Input",
108
120
  inheritAttrs: !1,
109
121
  __name: "Input",
@@ -120,154 +132,154 @@ const ne = {
120
132
  rows: { default: 3 }
121
133
  },
122
134
  emits: ["update:modelValue", "input", "change", "focus", "blur", "clear"],
123
- setup(e, { expose: t, emit: i }) {
124
- const d = e, l = i, a = C(d.modelValue);
125
- S(
126
- () => d.modelValue,
127
- (n) => {
128
- a.value = n;
135
+ setup(e, { expose: t, emit: r }) {
136
+ const n = e, a = r, i = _(n.modelValue);
137
+ J(
138
+ () => n.modelValue,
139
+ (f) => {
140
+ i.value = f;
129
141
  }
130
142
  );
131
- const o = C(), c = C(0), f = C(!1);
132
- let w = null;
133
- const q = async () => {
134
- await M(), o.value?.focus();
135
- }, V = async () => {
136
- l("update:modelValue", a.value), l("input", a.value), await M(), E();
137
- }, R = () => {
138
- l("change", a.value);
139
- }, A = (n) => {
140
- f.value = !0, l("focus", n);
141
- }, I = (n) => {
142
- f.value = !1, l("blur", n);
143
- }, L = y(() => d.clearable && !d.disabled && !!a.value && f.value), N = () => {
144
- a.value = "", l("update:modelValue", ""), l("clear"), l("input", ""), l("change", "");
145
- }, E = () => {
146
- w && cancelAnimationFrame(w), w = requestAnimationFrame(() => {
147
- if (!o.value || o.value.tagName !== "INPUT") return;
148
- const n = o.value, b = n.value, m = document.createElement("span");
149
- m.style.position = "absolute", m.style.visibility = "hidden", m.style.whiteSpace = "pre", m.style.font = window.getComputedStyle(n).font, m.style.letterSpacing = window.getComputedStyle(n).letterSpacing, m.textContent = b || " ", document.body.appendChild(m), c.value = m.getBoundingClientRect().width, document.body.removeChild(m);
143
+ const l = _(), o = _(0), s = _(!1);
144
+ let d = null;
145
+ const c = async () => {
146
+ await Ye(), l.value?.focus();
147
+ }, w = async () => {
148
+ a("update:modelValue", i.value), a("input", i.value), await Ye(), C();
149
+ }, k = () => {
150
+ a("change", i.value);
151
+ }, v = (f) => {
152
+ s.value = !0, a("focus", f);
153
+ }, S = (f) => {
154
+ s.value = !1, a("blur", f);
155
+ }, O = g(() => n.clearable && !n.disabled && !!i.value && s.value), $ = () => {
156
+ i.value = "", a("update:modelValue", ""), a("clear"), a("input", ""), a("change", "");
157
+ }, C = () => {
158
+ d && cancelAnimationFrame(d), d = requestAnimationFrame(() => {
159
+ if (!l.value || l.value.tagName !== "INPUT") return;
160
+ const f = l.value, m = f.value, u = document.createElement("span");
161
+ u.style.position = "absolute", u.style.visibility = "hidden", u.style.whiteSpace = "pre", u.style.font = window.getComputedStyle(f).font, u.style.letterSpacing = window.getComputedStyle(f).letterSpacing, u.textContent = m || " ", document.body.appendChild(u), o.value = u.getBoundingClientRect().width, document.body.removeChild(u);
150
162
  });
151
- }, K = y(() => {
152
- const n = {};
153
- return c.value > 0 && (n.position = "absolute", n.left = `${c.value + 16}px`), n;
154
- }), O = async () => {
163
+ }, E = g(() => {
164
+ const f = {};
165
+ return o.value > 0 && (f.position = "absolute", f.left = `${o.value + 16}px`), f;
166
+ }), R = async () => {
155
167
  try {
156
- a.value = await navigator.clipboard.readText();
157
- } catch (n) {
158
- console.error("paste error:", n);
168
+ i.value = await navigator.clipboard.readText();
169
+ } catch (f) {
170
+ console.error("paste error:", f);
159
171
  }
160
172
  };
161
173
  return t({
162
- focus: q,
163
- updateTextWidth: E
164
- }), (n, b) => e.type !== "textarea" ? (s(), r("div", {
174
+ focus: c,
175
+ updateTextWidth: C
176
+ }), (f, m) => e.type !== "textarea" ? (b(), x("div", {
165
177
  key: 0,
166
- class: g(["cregis-input", {
178
+ class: j(["cregis-input", {
167
179
  [`cregis-input--${e.size}`]: e.size,
168
180
  "is-disabled": e.disabled,
169
- "is-prefix": n.$slots.prefix,
170
- "is-suffix": n.$slots.suffix
181
+ "is-prefix": f.$slots.prefix,
182
+ "is-suffix": f.$slots.suffix
171
183
  }]),
172
- style: $([{ width: e.width }, e.inputStyle])
184
+ style: ue([{ width: e.width }, e.inputStyle])
173
185
  }, [
174
- u("div", {
175
- class: g(["cregis-input__wrapper", { "is-focus": f.value }])
186
+ V("div", {
187
+ class: j(["cregis-input__wrapper", { "is-focus": s.value }])
176
188
  }, [
177
- n.$slots.prefix ? (s(), r("span", de, [
178
- v(n.$slots, "prefix")
179
- ])) : h("", !0),
180
- F(u("input", x({
189
+ f.$slots.prefix ? (b(), x("span", $r, [
190
+ q(f.$slots, "prefix")
191
+ ])) : I("", !0),
192
+ Le(V("input", xe({
181
193
  class: "cregis-input__inner",
182
- "onUpdate:modelValue": b[0] || (b[0] = (m) => a.value = m),
194
+ "onUpdate:modelValue": m[0] || (m[0] = (u) => i.value = u),
183
195
  ref_key: "inputRef",
184
- ref: o,
196
+ ref: l,
185
197
  type: e.type,
186
198
  placeholder: e.placeholder
187
- }, n.$attrs, {
199
+ }, f.$attrs, {
188
200
  disabled: e.disabled,
189
- onInput: V,
190
- onChange: R,
191
- onFocus: A,
192
- onBlur: I
193
- }), null, 16, ue), [
194
- [j, a.value]
201
+ onInput: w,
202
+ onChange: k,
203
+ onFocus: v,
204
+ onBlur: S
205
+ }), null, 16, kr), [
206
+ [dr, i.value]
195
207
  ]),
196
- e.unit && a.value ? (s(), r("span", {
208
+ e.unit && i.value ? (b(), x("span", {
197
209
  key: 1,
198
- style: $(K.value),
210
+ style: ue(E.value),
199
211
  class: "cregis-input__unit"
200
- }, p(e.unit), 5)) : h("", !0),
201
- n.$slots.suffix || L.value ? (s(), r("span", ce, [
202
- v(n.$slots, "suffix"),
203
- L.value ? (s(), z(B, {
212
+ }, M(e.unit), 5)) : I("", !0),
213
+ f.$slots.suffix || O.value ? (b(), x("span", Tr, [
214
+ q(f.$slots, "suffix"),
215
+ O.value ? (b(), We(Ue, {
204
216
  key: 0,
205
- icon: W(le),
217
+ icon: ae(gr),
206
218
  "icon-type": "square",
207
- onClick: N,
208
- onMousedown: b[1] || (b[1] = Z(() => {
219
+ onClick: $,
220
+ onMousedown: m[1] || (m[1] = fr(() => {
209
221
  }, ["prevent"]))
210
- }, null, 8, ["icon"])) : h("", !0)
211
- ])) : h("", !0)
222
+ }, null, 8, ["icon"])) : I("", !0)
223
+ ])) : I("", !0)
212
224
  ], 2)
213
- ], 6)) : (s(), r("div", {
225
+ ], 6)) : (b(), x("div", {
214
226
  key: 1,
215
- class: g(["cregis-textarea", { "is-disabled": e.disabled }]),
216
- style: $([{ width: e.width }, e.inputStyle])
227
+ class: j(["cregis-textarea", { "is-disabled": e.disabled }]),
228
+ style: ue([{ width: e.width }, e.inputStyle])
217
229
  }, [
218
- F(u("textarea", x({ class: "cregis-textarea__wrapper" }, n.$attrs, {
230
+ Le(V("textarea", xe({ class: "cregis-textarea__wrapper" }, f.$attrs, {
219
231
  ref_key: "inputRef",
220
- ref: o,
232
+ ref: l,
221
233
  disabled: e.disabled,
222
234
  placeholder: e.placeholder,
223
235
  rows: e.rows,
224
- "onUpdate:modelValue": b[2] || (b[2] = (m) => a.value = m),
225
- onInput: V,
226
- onChange: R,
227
- onFocus: A,
228
- onBlur: I
229
- }), null, 16, me), [
230
- [G, a.value]
236
+ "onUpdate:modelValue": m[2] || (m[2] = (u) => i.value = u),
237
+ onInput: w,
238
+ onChange: k,
239
+ onFocus: v,
240
+ onBlur: S
241
+ }), null, 16, Sr), [
242
+ [pr, i.value]
231
243
  ]),
232
- e.disabled ? h("", !0) : (s(), r("div", be, [
233
- D(B, {
244
+ e.disabled ? I("", !0) : (b(), x("div", Cr, [
245
+ U(Ue, {
234
246
  class: "cregis-textarea__button",
235
247
  link: "",
236
248
  size: "small",
237
- onClick: O
249
+ onClick: R
238
250
  }, {
239
- default: P(() => [...b[3] || (b[3] = [
240
- T(" Paste ", -1)
251
+ default: Z(() => [...m[3] || (m[3] = [
252
+ $e(" Paste ", -1)
241
253
  ])]),
242
254
  _: 1
243
255
  }),
244
- D(B, {
256
+ U(Ue, {
245
257
  class: "cregis-textarea__button",
246
258
  link: "",
247
259
  size: "small",
248
- disabled: !a.value,
249
- onClick: N
260
+ disabled: !i.value,
261
+ onClick: $
250
262
  }, {
251
- default: P(() => [...b[4] || (b[4] = [
252
- T(" Clear ", -1)
263
+ default: Z(() => [...m[4] || (m[4] = [
264
+ $e(" Clear ", -1)
253
265
  ])]),
254
266
  _: 1
255
267
  }, 8, ["disabled"])
256
268
  ]))
257
269
  ], 6));
258
270
  }
259
- }), fe = ["width", "height"], ge = {
271
+ }), Pr = ["width", "height"], Vr = {
260
272
  stroke: "none",
261
273
  "stroke-width": "1",
262
274
  fill: "none",
263
275
  "fill-rule": "evenodd"
264
- }, ye = { transform: "translate(-394.000000, -457.000000)" }, he = { transform: "translate(394.000000, 457.000000)" }, ve = ["width", "height"], ke = /* @__PURE__ */ k({
276
+ }, Er = { transform: "translate(-394.000000, -457.000000)" }, Br = { transform: "translate(394.000000, 457.000000)" }, Ar = ["width", "height"], Rr = /* @__PURE__ */ Q({
265
277
  __name: "checked-basis",
266
278
  props: {
267
279
  size: { default: "16px" }
268
280
  },
269
281
  setup(e) {
270
- return (t, i) => (s(), r("svg", {
282
+ return (t, r) => (b(), x("svg", {
271
283
  width: e.size,
272
284
  height: e.size,
273
285
  viewBox: "0 0 16 16",
@@ -275,16 +287,16 @@ const ne = {
275
287
  xmlns: "http://www.w3.org/2000/svg",
276
288
  "xmlns:xlink": "http://www.w3.org/1999/xlink"
277
289
  }, [
278
- u("g", ge, [
279
- u("g", ye, [
280
- u("g", he, [
281
- u("rect", {
290
+ V("g", Vr, [
291
+ V("g", Er, [
292
+ V("g", Br, [
293
+ V("rect", {
282
294
  x: "0",
283
295
  y: "0",
284
296
  width: e.size,
285
297
  height: e.size
286
- }, null, 8, ve),
287
- i[0] || (i[0] = u("path", {
298
+ }, null, 8, Ar),
299
+ r[0] || (r[0] = V("path", {
288
300
  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",
289
301
  fill: "currentColor",
290
302
  "fill-rule": "nonzero"
@@ -292,12 +304,12 @@ const ne = {
292
304
  ])
293
305
  ])
294
306
  ])
295
- ], 8, fe));
307
+ ], 8, Pr));
296
308
  }
297
- }), xe = {
309
+ }), Dr = {
298
310
  key: 0,
299
311
  class: "cregis-checkbox--indeterminate"
300
- }, Te = /* @__PURE__ */ k({
312
+ }, ei = /* @__PURE__ */ Q({
301
313
  name: "Checkbox",
302
314
  __name: "Checkbox",
303
315
  props: {
@@ -309,42 +321,42 @@ const ne = {
309
321
  },
310
322
  emits: ["update:modelValue", "change"],
311
323
  setup(e, { emit: t }) {
312
- const i = e, d = t, l = y(() => i.modelValue), a = () => {
313
- i.disabled || d("update:modelValue", !l.value);
324
+ const r = e, n = t, a = g(() => r.modelValue), i = () => {
325
+ r.disabled || n("update:modelValue", !a.value);
314
326
  };
315
- return S(
316
- () => l.value,
327
+ return J(
328
+ () => a.value,
317
329
  () => {
318
- d("change", l.value);
330
+ n("change", a.value);
319
331
  }
320
- ), (o, c) => (s(), r("div", {
332
+ ), (l, o) => (b(), x("div", {
321
333
  class: "cregis-checkbox__wrapper",
322
- onClick: a
334
+ onClick: i
323
335
  }, [
324
- u("div", {
325
- class: g(["cregis-checkbox", {
336
+ V("div", {
337
+ class: j(["cregis-checkbox", {
326
338
  "is-disabled": e.disabled,
327
- "is-checked": l.value,
339
+ "is-checked": a.value,
328
340
  "is-circle": e.circle,
329
341
  "is-indeterminate": e.indeterminate
330
342
  }])
331
343
  }, [
332
- e.indeterminate ? (s(), r("div", xe)) : (s(), z(ke, {
344
+ e.indeterminate ? (b(), x("div", Dr)) : (b(), We(Rr, {
333
345
  key: 1,
334
346
  size: "10px"
335
347
  }))
336
348
  ], 2),
337
- o.$slots.default || e.label ? (s(), r("span", {
349
+ l.$slots.default || e.label ? (b(), x("span", {
338
350
  key: 0,
339
- class: g(["cregis-checkbox__label", { "is-disabled": e.disabled }])
351
+ class: j(["cregis-checkbox__label", { "is-disabled": e.disabled }])
340
352
  }, [
341
- v(o.$slots, "default", {}, () => [
342
- T(p(e.label), 1)
353
+ q(l.$slots, "default", {}, () => [
354
+ $e(M(e.label), 1)
343
355
  ])
344
- ], 2)) : h("", !0)
356
+ ], 2)) : I("", !0)
345
357
  ]));
346
358
  }
347
- }), Be = /* @__PURE__ */ k({
359
+ }), ti = /* @__PURE__ */ Q({
348
360
  name: "Radio",
349
361
  __name: "Radio",
350
362
  props: {
@@ -355,32 +367,32 @@ const ne = {
355
367
  },
356
368
  emits: ["update:modelValue", "change"],
357
369
  setup(e, { emit: t }) {
358
- const i = e, d = t, l = y(() => i.modelValue === i.value), a = () => {
359
- i.disabled || (d("update:modelValue", i.value), d("change", i.value));
370
+ const r = e, n = t, a = g(() => r.modelValue === r.value), i = () => {
371
+ r.disabled || (n("update:modelValue", r.value), n("change", r.value));
360
372
  };
361
- return (o, c) => (s(), r("div", {
373
+ return (l, o) => (b(), x("div", {
362
374
  class: "cregis-radio__wrapper",
363
- onClick: a
375
+ onClick: i
364
376
  }, [
365
- u("div", {
366
- class: g(["cregis-radio", {
377
+ V("div", {
378
+ class: j(["cregis-radio", {
367
379
  "is-disabled": e.disabled,
368
- "is-checked": l.value
380
+ "is-checked": a.value
369
381
  }])
370
- }, [...c[0] || (c[0] = [
371
- u("div", { class: "cregis-radio__inner" }, null, -1)
382
+ }, [...o[0] || (o[0] = [
383
+ V("div", { class: "cregis-radio__inner" }, null, -1)
372
384
  ])], 2),
373
- o.$slots.default || e.label ? (s(), r("span", {
385
+ l.$slots.default || e.label ? (b(), x("span", {
374
386
  key: 0,
375
- class: g(["cregis-radio__label", { "is-disabled": e.disabled }])
387
+ class: j(["cregis-radio__label", { "is-disabled": e.disabled }])
376
388
  }, [
377
- v(o.$slots, "default", {}, () => [
378
- T(p(e.label), 1)
389
+ q(l.$slots, "default", {}, () => [
390
+ $e(M(e.label), 1)
379
391
  ])
380
- ], 2)) : h("", !0)
392
+ ], 2)) : I("", !0)
381
393
  ]));
382
394
  }
383
- }), Se = /* @__PURE__ */ k({
395
+ }), ri = /* @__PURE__ */ Q({
384
396
  name: "Divider",
385
397
  __name: "Divider",
386
398
  props: {
@@ -392,33 +404,33 @@ const ne = {
392
404
  length: {}
393
405
  },
394
406
  setup(e) {
395
- const t = e, i = y(() => {
407
+ const t = e, r = g(() => {
396
408
  if (Array.isArray(t.margin)) {
397
- const [l, a] = t.margin;
398
- return t.direction === "horizontal" ? `${l} 0 ${a} 0` : `0 ${a} 0 ${l}`;
409
+ const [a, i] = t.margin;
410
+ return t.direction === "horizontal" ? `${a} 0 ${i} 0` : `0 ${i} 0 ${a}`;
399
411
  } else
400
412
  return t.direction === "horizontal" ? `${t.margin} 0` : `0 ${t.margin}`;
401
- }), d = y(() => t.direction === "horizontal" ? {
413
+ }), n = g(() => t.direction === "horizontal" ? {
402
414
  width: t.length || "100%",
403
415
  borderTopWidth: t.lineThickness,
404
416
  borderTopStyle: t.borderStyle,
405
417
  borderTopColor: t.color,
406
- margin: i.value
418
+ margin: r.value
407
419
  } : {
408
420
  height: t.length || "1rem",
409
421
  borderLeftWidth: t.lineThickness,
410
422
  borderLeftStyle: t.borderStyle,
411
423
  borderLeftColor: t.color,
412
- margin: i.value
424
+ margin: r.value
413
425
  });
414
- return (l, a) => (s(), r("div", {
415
- class: g(["cregis-divider", {
426
+ return (a, i) => (b(), x("div", {
427
+ class: j(["cregis-divider", {
416
428
  [`cregis-divider--${e.direction}`]: e.direction
417
429
  }]),
418
- style: $(d.value)
430
+ style: ue(n.value)
419
431
  }, null, 6));
420
432
  }
421
- }), U = Symbol("TABS_KEY"), $e = ["onClick"], pe = { style: { display: "none" } }, Ve = /* @__PURE__ */ k({
433
+ }), Kt = Symbol("TABS_KEY"), zr = ["onClick"], Wr = { style: { display: "none" } }, ai = /* @__PURE__ */ Q({
422
434
  name: "Tabs",
423
435
  __name: "Tabs",
424
436
  props: {
@@ -428,12 +440,12 @@ const ne = {
428
440
  },
429
441
  emits: ["update:modelValue"],
430
442
  setup(e) {
431
- const t = e, i = H([]), d = (o) => {
432
- i.some((c) => c.name === o.name) || i.push(o);
433
- }, l = (o) => {
434
- const c = i.findIndex((f) => f.name === o);
435
- c !== -1 && i.splice(c, 1);
436
- }, a = y(() => t.type === "card" ? t.size === "large" ? {
443
+ const t = e, r = je([]), n = (l) => {
444
+ r.some((o) => o.name === l.name) || r.push(l);
445
+ }, a = (l) => {
446
+ const o = r.findIndex((s) => s.name === l);
447
+ o !== -1 && r.splice(o, 1);
448
+ }, i = g(() => t.type === "card" ? t.size === "large" ? {
437
449
  borderRadius: "13px"
438
450
  } : t.size === "medium" ? {
439
451
  borderRadius: "11px"
@@ -442,30 +454,30 @@ const ne = {
442
454
  } : {
443
455
  borderRadius: 0
444
456
  });
445
- return J(U, {
446
- activeName: Q(t, "modelValue"),
447
- registerTab: d,
448
- unregisterTab: l
449
- }), (o, c) => (s(), r("div", {
450
- class: g(["cregis-tabs", {
457
+ return Nt(Kt, {
458
+ activeName: vr(t, "modelValue"),
459
+ registerTab: n,
460
+ unregisterTab: a
461
+ }), (l, o) => (b(), x("div", {
462
+ class: j(["cregis-tabs", {
451
463
  [`cregis-tabs--${e.type}`]: e.type,
452
464
  [`cregis-tabs--${e.size}`]: e.size
453
465
  }])
454
466
  }, [
455
- (s(!0), r(X, null, _(i, (f) => (s(), r("div", {
456
- key: f.name,
457
- class: g(["cregis-tabs__item", { "is-active": e.modelValue === f.name }]),
458
- style: $(a.value),
459
- onClick: (w) => o.$emit("update:modelValue", f.name)
467
+ (b(!0), x(st, null, lt(r, (s) => (b(), x("div", {
468
+ key: s.name,
469
+ class: j(["cregis-tabs__item", { "is-active": e.modelValue === s.name }]),
470
+ style: ue(i.value),
471
+ onClick: (d) => l.$emit("update:modelValue", s.name)
460
472
  }, [
461
- u("span", null, p(f.label), 1)
462
- ], 14, $e))), 128)),
463
- u("div", pe, [
464
- v(o.$slots, "default")
473
+ V("span", null, M(s.label), 1)
474
+ ], 14, zr))), 128)),
475
+ V("div", Wr, [
476
+ q(l.$slots, "default")
465
477
  ])
466
478
  ], 2));
467
479
  }
468
- }), Re = /* @__PURE__ */ k({
480
+ }), ni = /* @__PURE__ */ Q({
469
481
  name: "TabPane",
470
482
  __name: "TabPane",
471
483
  props: {
@@ -473,28 +485,1902 @@ const ne = {
473
485
  name: {}
474
486
  },
475
487
  setup(e) {
476
- const t = e, i = ee(U);
477
- if (!i) throw new Error("TabPane must be used within Tabs");
478
- return te(() => {
479
- i.registerTab({ label: t.label, name: t.name });
480
- }), S(
488
+ const t = e, r = Ft(Kt);
489
+ if (!r) throw new Error("TabPane must be used within Tabs");
490
+ return Je(() => {
491
+ r.registerTab({ label: t.label, name: t.name });
492
+ }), J(
481
493
  () => t.label,
482
- (d) => {
483
- i.unregisterTab(t.name), i.registerTab({ label: d, name: t.name });
494
+ (n) => {
495
+ r.unregisterTab(t.name), r.registerTab({ label: n, name: t.name });
496
+ }
497
+ ), Ee(() => {
498
+ r.unregisterTab(t.name);
499
+ }), (n, a) => null;
500
+ }
501
+ }), Lr = { class: "cregis-message__wrapper" }, jr = {
502
+ key: 0,
503
+ class: "cregis-message",
504
+ role: "status",
505
+ "aria-live": "polite"
506
+ }, Mr = /* @__PURE__ */ Q({
507
+ name: "Message",
508
+ __name: "Message",
509
+ props: {
510
+ message: {},
511
+ duration: { default: 1e3 },
512
+ onVanish: {}
513
+ },
514
+ setup(e) {
515
+ const t = e, r = _(!1);
516
+ let n;
517
+ const a = () => {
518
+ n = window.setTimeout(() => {
519
+ r.value = !1;
520
+ }, t.duration);
521
+ }, i = () => {
522
+ t.onVanish?.();
523
+ };
524
+ return Ht(() => {
525
+ n !== void 0 && clearTimeout(n);
526
+ }), Ye(() => {
527
+ r.value = !0;
528
+ }), (l, o) => (b(), x("div", Lr, [
529
+ U(pt, {
530
+ name: "cregis-message",
531
+ onAfterEnter: a,
532
+ onAfterLeave: i
533
+ }, {
534
+ default: Z(() => [
535
+ r.value ? (b(), x("div", jr, M(e.message), 1)) : I("", !0)
536
+ ]),
537
+ _: 1
538
+ })
539
+ ]));
540
+ }
541
+ });
542
+ let nt = !1;
543
+ function _r(e) {
544
+ return typeof e == "string" ? { message: e, duration: 1e3 } : {
545
+ message: e.message,
546
+ duration: e.duration ?? 1e3
547
+ };
548
+ }
549
+ function ii(e) {
550
+ if (nt) return;
551
+ const { message: t, duration: r } = _r(e);
552
+ nt = !0;
553
+ const n = document.createElement("div");
554
+ document.body.appendChild(n), Ke(
555
+ qt(Mr, {
556
+ message: t,
557
+ duration: r,
558
+ onVanish: () => {
559
+ nt = !1, Ke(null, n), n.remove();
484
560
  }
485
- ), ae(() => {
486
- i.unregisterTab(t.name);
487
- }), () => {
561
+ }),
562
+ n
563
+ );
564
+ }
565
+ const Ir = { class: "cregis-notification__wrapper" }, Nr = {
566
+ key: 0,
567
+ class: "cregis-notification",
568
+ role: "status",
569
+ "aria-live": "polite"
570
+ }, Fr = { class: "cregis-notification__content" }, Hr = { class: "cregis-notification__title" }, qr = { class: "cregis-notification__message" }, Ur = /* @__PURE__ */ Q({
571
+ name: "Notification",
572
+ __name: "Notification",
573
+ props: {
574
+ title: {},
575
+ message: {},
576
+ btnText: {},
577
+ type: { default: "error" },
578
+ onVanish: {}
579
+ },
580
+ setup(e) {
581
+ const t = e, r = _(!1), n = () => {
582
+ r.value = !1;
583
+ }, a = () => {
584
+ t.onVanish?.();
488
585
  };
586
+ return Ht(() => {
587
+ }), Ye(() => {
588
+ r.value = !0;
589
+ }), (i, l) => (b(), x("div", Ir, [
590
+ U(pt, {
591
+ name: "cregis-notification",
592
+ onAfterLeave: a
593
+ }, {
594
+ default: Z(() => [
595
+ r.value ? (b(), x("div", Nr, [
596
+ (b(), We(It(ae(hr)), {
597
+ size: "18px",
598
+ color: "var(--material-vibrant-error-primary)"
599
+ })),
600
+ V("div", Fr, [
601
+ V("div", Hr, M(e.title), 1),
602
+ V("div", qr, M(e.message), 1)
603
+ ]),
604
+ U(Ue, {
605
+ type: "sameWhite",
606
+ onClick: n
607
+ }, {
608
+ default: Z(() => [
609
+ $e(M(e.btnText), 1)
610
+ ]),
611
+ _: 1
612
+ })
613
+ ])) : I("", !0)
614
+ ]),
615
+ _: 1
616
+ })
617
+ ]));
618
+ }
619
+ });
620
+ let it = !1;
621
+ function oi(e) {
622
+ if (it) return;
623
+ const { title: t, message: r, type: n, btnText: a } = e;
624
+ it = !0;
625
+ const i = document.createElement("div");
626
+ document.body.appendChild(i), Ke(
627
+ qt(Ur, {
628
+ title: t,
629
+ message: r,
630
+ type: n,
631
+ btnText: a,
632
+ onVanish: () => {
633
+ it = !1, Ke(null, i), i.remove();
634
+ }
635
+ }),
636
+ i
637
+ );
638
+ }
639
+ const Xr = { class: "cregis-progress__wrapper" }, Yr = { class: "cregis-progress__track-wrap" }, Kr = { class: "cregis-progress cregis-progress--striped active" }, Qr = {
640
+ key: 0,
641
+ class: "cregis-progress__sliding-block"
642
+ }, si = /* @__PURE__ */ Q({
643
+ name: "Progress",
644
+ __name: "Progress",
645
+ props: {
646
+ percentage: {},
647
+ strokeWidth: { default: 12 },
648
+ showPercentage: { type: Boolean, default: !0 }
649
+ },
650
+ setup(e) {
651
+ const t = e, r = g(() => Math.min(100, Math.max(0, t.percentage - 1))), n = g(() => ({
652
+ width: `${t.percentage}%`,
653
+ height: `${t.strokeWidth}px`
654
+ })), a = g(() => ({
655
+ "--cregis-progress-tip-left": `${r.value}%`
656
+ })), i = g(() => `${Math.round(t.percentage)}%`);
657
+ return (l, o) => (b(), x("div", Xr, [
658
+ V("div", Yr, [
659
+ e.showPercentage && t.percentage > 0 ? (b(), x("div", {
660
+ key: 0,
661
+ class: "cregis-progress__tip",
662
+ style: ue(a.value),
663
+ "aria-live": "polite"
664
+ }, M(i.value), 5)) : I("", !0),
665
+ V("div", Kr, [
666
+ V("div", {
667
+ class: "cregis-progress__bar",
668
+ style: ue(n.value)
669
+ }, null, 4),
670
+ t.percentage === 0 ? (b(), x("div", Qr)) : I("", !0)
671
+ ])
672
+ ])
673
+ ]));
674
+ }
675
+ });
676
+ var ee = "top", ie = "bottom", oe = "right", te = "left", mt = "auto", Ie = [ee, ie, oe, te], Se = "start", Me = "end", Gr = "clippingParents", Qt = "viewport", Ae = "popper", Zr = "reference", Vt = /* @__PURE__ */ Ie.reduce(function(e, t) {
677
+ return e.concat([t + "-" + Se, t + "-" + Me]);
678
+ }, []), Gt = /* @__PURE__ */ [].concat(Ie, [mt]).reduce(function(e, t) {
679
+ return e.concat([t, t + "-" + Se, t + "-" + Me]);
680
+ }, []), Jr = "beforeRead", ea = "read", ta = "afterRead", ra = "beforeMain", aa = "main", na = "afterMain", ia = "beforeWrite", oa = "write", sa = "afterWrite", la = [Jr, ea, ta, ra, aa, na, ia, oa, sa];
681
+ function me(e) {
682
+ return e ? (e.nodeName || "").toLowerCase() : null;
683
+ }
684
+ function re(e) {
685
+ if (e == null)
686
+ return window;
687
+ if (e.toString() !== "[object Window]") {
688
+ var t = e.ownerDocument;
689
+ return t && t.defaultView || window;
690
+ }
691
+ return e;
692
+ }
693
+ function ke(e) {
694
+ var t = re(e).Element;
695
+ return e instanceof t || e instanceof Element;
696
+ }
697
+ function ne(e) {
698
+ var t = re(e).HTMLElement;
699
+ return e instanceof t || e instanceof HTMLElement;
700
+ }
701
+ function gt(e) {
702
+ if (typeof ShadowRoot > "u")
703
+ return !1;
704
+ var t = re(e).ShadowRoot;
705
+ return e instanceof t || e instanceof ShadowRoot;
706
+ }
707
+ function ca(e) {
708
+ var t = e.state;
709
+ Object.keys(t.elements).forEach(function(r) {
710
+ var n = t.styles[r] || {}, a = t.attributes[r] || {}, i = t.elements[r];
711
+ !ne(i) || !me(i) || (Object.assign(i.style, n), Object.keys(a).forEach(function(l) {
712
+ var o = a[l];
713
+ o === !1 ? i.removeAttribute(l) : i.setAttribute(l, o === !0 ? "" : o);
714
+ }));
715
+ });
716
+ }
717
+ function ua(e) {
718
+ var t = e.state, r = {
719
+ popper: {
720
+ position: t.options.strategy,
721
+ left: "0",
722
+ top: "0",
723
+ margin: "0"
724
+ },
725
+ arrow: {
726
+ position: "absolute"
727
+ },
728
+ reference: {}
729
+ };
730
+ return Object.assign(t.elements.popper.style, r.popper), t.styles = r, t.elements.arrow && Object.assign(t.elements.arrow.style, r.arrow), function() {
731
+ Object.keys(t.elements).forEach(function(n) {
732
+ var a = t.elements[n], i = t.attributes[n] || {}, l = Object.keys(t.styles.hasOwnProperty(n) ? t.styles[n] : r[n]), o = l.reduce(function(s, d) {
733
+ return s[d] = "", s;
734
+ }, {});
735
+ !ne(a) || !me(a) || (Object.assign(a.style, o), Object.keys(i).forEach(function(s) {
736
+ a.removeAttribute(s);
737
+ }));
738
+ });
739
+ };
740
+ }
741
+ const da = {
742
+ name: "applyStyles",
743
+ enabled: !0,
744
+ phase: "write",
745
+ fn: ca,
746
+ effect: ua,
747
+ requires: ["computeStyles"]
748
+ };
749
+ function ve(e) {
750
+ return e.split("-")[0];
751
+ }
752
+ var Oe = Math.max, Qe = Math.min, Ce = Math.round;
753
+ function ct() {
754
+ var e = navigator.userAgentData;
755
+ return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(t) {
756
+ return t.brand + "/" + t.version;
757
+ }).join(" ") : navigator.userAgent;
758
+ }
759
+ function Zt() {
760
+ return !/^((?!chrome|android).)*safari/i.test(ct());
761
+ }
762
+ function Pe(e, t, r) {
763
+ t === void 0 && (t = !1), r === void 0 && (r = !1);
764
+ var n = e.getBoundingClientRect(), a = 1, i = 1;
765
+ t && ne(e) && (a = e.offsetWidth > 0 && Ce(n.width) / e.offsetWidth || 1, i = e.offsetHeight > 0 && Ce(n.height) / e.offsetHeight || 1);
766
+ var l = ke(e) ? re(e) : window, o = l.visualViewport, s = !Zt() && r, d = (n.left + (s && o ? o.offsetLeft : 0)) / a, c = (n.top + (s && o ? o.offsetTop : 0)) / i, w = n.width / a, k = n.height / i;
767
+ return {
768
+ width: w,
769
+ height: k,
770
+ top: c,
771
+ right: d + w,
772
+ bottom: c + k,
773
+ left: d,
774
+ x: d,
775
+ y: c
776
+ };
777
+ }
778
+ function ht(e) {
779
+ var t = Pe(e), r = e.offsetWidth, n = e.offsetHeight;
780
+ return Math.abs(t.width - r) <= 1 && (r = t.width), Math.abs(t.height - n) <= 1 && (n = t.height), {
781
+ x: e.offsetLeft,
782
+ y: e.offsetTop,
783
+ width: r,
784
+ height: n
785
+ };
786
+ }
787
+ function Jt(e, t) {
788
+ var r = t.getRootNode && t.getRootNode();
789
+ if (e.contains(t))
790
+ return !0;
791
+ if (r && gt(r)) {
792
+ var n = t;
793
+ do {
794
+ if (n && e.isSameNode(n))
795
+ return !0;
796
+ n = n.parentNode || n.host;
797
+ } while (n);
798
+ }
799
+ return !1;
800
+ }
801
+ function ge(e) {
802
+ return re(e).getComputedStyle(e);
803
+ }
804
+ function fa(e) {
805
+ return ["table", "td", "th"].indexOf(me(e)) >= 0;
806
+ }
807
+ function be(e) {
808
+ return ((ke(e) ? e.ownerDocument : (
809
+ // $FlowFixMe[prop-missing]
810
+ e.document
811
+ )) || window.document).documentElement;
812
+ }
813
+ function et(e) {
814
+ return me(e) === "html" ? e : (
815
+ // this is a quicker (but less type safe) way to save quite some bytes from the bundle
816
+ // $FlowFixMe[incompatible-return]
817
+ // $FlowFixMe[prop-missing]
818
+ e.assignedSlot || // step into the shadow DOM of the parent of a slotted node
819
+ e.parentNode || // DOM Element detected
820
+ (gt(e) ? e.host : null) || // ShadowRoot detected
821
+ // $FlowFixMe[incompatible-call]: HTMLElement is a Node
822
+ be(e)
823
+ );
824
+ }
825
+ function Et(e) {
826
+ return !ne(e) || // https://github.com/popperjs/popper-core/issues/837
827
+ ge(e).position === "fixed" ? null : e.offsetParent;
828
+ }
829
+ function pa(e) {
830
+ var t = /firefox/i.test(ct()), r = /Trident/i.test(ct());
831
+ if (r && ne(e)) {
832
+ var n = ge(e);
833
+ if (n.position === "fixed")
834
+ return null;
835
+ }
836
+ var a = et(e);
837
+ for (gt(a) && (a = a.host); ne(a) && ["html", "body"].indexOf(me(a)) < 0; ) {
838
+ var i = ge(a);
839
+ if (i.transform !== "none" || i.perspective !== "none" || i.contain === "paint" || ["transform", "perspective"].indexOf(i.willChange) !== -1 || t && i.willChange === "filter" || t && i.filter && i.filter !== "none")
840
+ return a;
841
+ a = a.parentNode;
842
+ }
843
+ return null;
844
+ }
845
+ function Ne(e) {
846
+ for (var t = re(e), r = Et(e); r && fa(r) && ge(r).position === "static"; )
847
+ r = Et(r);
848
+ return r && (me(r) === "html" || me(r) === "body" && ge(r).position === "static") ? t : r || pa(e) || t;
849
+ }
850
+ function bt(e) {
851
+ return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
852
+ }
853
+ function De(e, t, r) {
854
+ return Oe(e, Qe(t, r));
855
+ }
856
+ function va(e, t, r) {
857
+ var n = De(e, t, r);
858
+ return n > r ? r : n;
859
+ }
860
+ function er() {
861
+ return {
862
+ top: 0,
863
+ right: 0,
864
+ bottom: 0,
865
+ left: 0
866
+ };
867
+ }
868
+ function tr(e) {
869
+ return Object.assign({}, er(), e);
870
+ }
871
+ function rr(e, t) {
872
+ return t.reduce(function(r, n) {
873
+ return r[n] = e, r;
874
+ }, {});
875
+ }
876
+ var ma = function(t, r) {
877
+ return t = typeof t == "function" ? t(Object.assign({}, r.rects, {
878
+ placement: r.placement
879
+ })) : t, tr(typeof t != "number" ? t : rr(t, Ie));
880
+ };
881
+ function ga(e) {
882
+ var t, r = e.state, n = e.name, a = e.options, i = r.elements.arrow, l = r.modifiersData.popperOffsets, o = ve(r.placement), s = bt(o), d = [te, oe].indexOf(o) >= 0, c = d ? "height" : "width";
883
+ if (!(!i || !l)) {
884
+ var w = ma(a.padding, r), k = ht(i), v = s === "y" ? ee : te, S = s === "y" ? ie : oe, O = r.rects.reference[c] + r.rects.reference[s] - l[s] - r.rects.popper[c], $ = l[s] - r.rects.reference[s], C = Ne(i), E = C ? s === "y" ? C.clientHeight || 0 : C.clientWidth || 0 : 0, R = O / 2 - $ / 2, f = w[v], m = E - k[c] - w[S], u = E / 2 - k[c] / 2 + R, T = De(f, u, m), B = s;
885
+ r.modifiersData[n] = (t = {}, t[B] = T, t.centerOffset = T - u, t);
886
+ }
887
+ }
888
+ function ha(e) {
889
+ var t = e.state, r = e.options, n = r.element, a = n === void 0 ? "[data-popper-arrow]" : n;
890
+ a != null && (typeof a == "string" && (a = t.elements.popper.querySelector(a), !a) || Jt(t.elements.popper, a) && (t.elements.arrow = a));
891
+ }
892
+ const ba = {
893
+ name: "arrow",
894
+ enabled: !0,
895
+ phase: "main",
896
+ fn: ga,
897
+ effect: ha,
898
+ requires: ["popperOffsets"],
899
+ requiresIfExists: ["preventOverflow"]
900
+ };
901
+ function Ve(e) {
902
+ return e.split("-")[1];
903
+ }
904
+ var ya = {
905
+ top: "auto",
906
+ right: "auto",
907
+ bottom: "auto",
908
+ left: "auto"
909
+ };
910
+ function wa(e, t) {
911
+ var r = e.x, n = e.y, a = t.devicePixelRatio || 1;
912
+ return {
913
+ x: Ce(r * a) / a || 0,
914
+ y: Ce(n * a) / a || 0
915
+ };
916
+ }
917
+ function Bt(e) {
918
+ var t, r = e.popper, n = e.popperRect, a = e.placement, i = e.variation, l = e.offsets, o = e.position, s = e.gpuAcceleration, d = e.adaptive, c = e.roundOffsets, w = e.isFixed, k = l.x, v = k === void 0 ? 0 : k, S = l.y, O = S === void 0 ? 0 : S, $ = typeof c == "function" ? c({
919
+ x: v,
920
+ y: O
921
+ }) : {
922
+ x: v,
923
+ y: O
924
+ };
925
+ v = $.x, O = $.y;
926
+ var C = l.hasOwnProperty("x"), E = l.hasOwnProperty("y"), R = te, f = ee, m = window;
927
+ if (d) {
928
+ var u = Ne(r), T = "clientHeight", B = "clientWidth";
929
+ if (u === re(r) && (u = be(r), ge(u).position !== "static" && o === "absolute" && (T = "scrollHeight", B = "scrollWidth")), u = u, a === ee || (a === te || a === oe) && i === Me) {
930
+ f = ie;
931
+ var D = w && u === m && m.visualViewport ? m.visualViewport.height : (
932
+ // $FlowFixMe[prop-missing]
933
+ u[T]
934
+ );
935
+ O -= D - n.height, O *= s ? 1 : -1;
936
+ }
937
+ if (a === te || (a === ee || a === ie) && i === Me) {
938
+ R = oe;
939
+ var W = w && u === m && m.visualViewport ? m.visualViewport.width : (
940
+ // $FlowFixMe[prop-missing]
941
+ u[B]
942
+ );
943
+ v -= W - n.width, v *= s ? 1 : -1;
944
+ }
945
+ }
946
+ var y = Object.assign({
947
+ position: o
948
+ }, d && ya), A = c === !0 ? wa({
949
+ x: v,
950
+ y: O
951
+ }, re(r)) : {
952
+ x: v,
953
+ y: O
954
+ };
955
+ if (v = A.x, O = A.y, s) {
956
+ var z;
957
+ return Object.assign({}, y, (z = {}, z[f] = E ? "0" : "", z[R] = C ? "0" : "", z.transform = (m.devicePixelRatio || 1) <= 1 ? "translate(" + v + "px, " + O + "px)" : "translate3d(" + v + "px, " + O + "px, 0)", z));
958
+ }
959
+ return Object.assign({}, y, (t = {}, t[f] = E ? O + "px" : "", t[R] = C ? v + "px" : "", t.transform = "", t));
960
+ }
961
+ function xa(e) {
962
+ var t = e.state, r = e.options, n = r.gpuAcceleration, a = n === void 0 ? !0 : n, i = r.adaptive, l = i === void 0 ? !0 : i, o = r.roundOffsets, s = o === void 0 ? !0 : o, d = {
963
+ placement: ve(t.placement),
964
+ variation: Ve(t.placement),
965
+ popper: t.elements.popper,
966
+ popperRect: t.rects.popper,
967
+ gpuAcceleration: a,
968
+ isFixed: t.options.strategy === "fixed"
969
+ };
970
+ t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, Bt(Object.assign({}, d, {
971
+ offsets: t.modifiersData.popperOffsets,
972
+ position: t.options.strategy,
973
+ adaptive: l,
974
+ roundOffsets: s
975
+ })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, Bt(Object.assign({}, d, {
976
+ offsets: t.modifiersData.arrow,
977
+ position: "absolute",
978
+ adaptive: !1,
979
+ roundOffsets: s
980
+ })))), t.attributes.popper = Object.assign({}, t.attributes.popper, {
981
+ "data-popper-placement": t.placement
982
+ });
983
+ }
984
+ const Oa = {
985
+ name: "computeStyles",
986
+ enabled: !0,
987
+ phase: "beforeWrite",
988
+ fn: xa,
989
+ data: {}
990
+ };
991
+ var qe = {
992
+ passive: !0
993
+ };
994
+ function $a(e) {
995
+ var t = e.state, r = e.instance, n = e.options, a = n.scroll, i = a === void 0 ? !0 : a, l = n.resize, o = l === void 0 ? !0 : l, s = re(t.elements.popper), d = [].concat(t.scrollParents.reference, t.scrollParents.popper);
996
+ return i && d.forEach(function(c) {
997
+ c.addEventListener("scroll", r.update, qe);
998
+ }), o && s.addEventListener("resize", r.update, qe), function() {
999
+ i && d.forEach(function(c) {
1000
+ c.removeEventListener("scroll", r.update, qe);
1001
+ }), o && s.removeEventListener("resize", r.update, qe);
1002
+ };
1003
+ }
1004
+ const ka = {
1005
+ name: "eventListeners",
1006
+ enabled: !0,
1007
+ phase: "write",
1008
+ fn: function() {
1009
+ },
1010
+ effect: $a,
1011
+ data: {}
1012
+ };
1013
+ var Ta = {
1014
+ left: "right",
1015
+ right: "left",
1016
+ bottom: "top",
1017
+ top: "bottom"
1018
+ };
1019
+ function Xe(e) {
1020
+ return e.replace(/left|right|bottom|top/g, function(t) {
1021
+ return Ta[t];
1022
+ });
1023
+ }
1024
+ var Sa = {
1025
+ start: "end",
1026
+ end: "start"
1027
+ };
1028
+ function At(e) {
1029
+ return e.replace(/start|end/g, function(t) {
1030
+ return Sa[t];
1031
+ });
1032
+ }
1033
+ function yt(e) {
1034
+ var t = re(e), r = t.pageXOffset, n = t.pageYOffset;
1035
+ return {
1036
+ scrollLeft: r,
1037
+ scrollTop: n
1038
+ };
1039
+ }
1040
+ function wt(e) {
1041
+ return Pe(be(e)).left + yt(e).scrollLeft;
1042
+ }
1043
+ function Ca(e, t) {
1044
+ var r = re(e), n = be(e), a = r.visualViewport, i = n.clientWidth, l = n.clientHeight, o = 0, s = 0;
1045
+ if (a) {
1046
+ i = a.width, l = a.height;
1047
+ var d = Zt();
1048
+ (d || !d && t === "fixed") && (o = a.offsetLeft, s = a.offsetTop);
1049
+ }
1050
+ return {
1051
+ width: i,
1052
+ height: l,
1053
+ x: o + wt(e),
1054
+ y: s
1055
+ };
1056
+ }
1057
+ function Pa(e) {
1058
+ var t, r = be(e), n = yt(e), a = (t = e.ownerDocument) == null ? void 0 : t.body, i = Oe(r.scrollWidth, r.clientWidth, a ? a.scrollWidth : 0, a ? a.clientWidth : 0), l = Oe(r.scrollHeight, r.clientHeight, a ? a.scrollHeight : 0, a ? a.clientHeight : 0), o = -n.scrollLeft + wt(e), s = -n.scrollTop;
1059
+ return ge(a || r).direction === "rtl" && (o += Oe(r.clientWidth, a ? a.clientWidth : 0) - i), {
1060
+ width: i,
1061
+ height: l,
1062
+ x: o,
1063
+ y: s
1064
+ };
1065
+ }
1066
+ function xt(e) {
1067
+ var t = ge(e), r = t.overflow, n = t.overflowX, a = t.overflowY;
1068
+ return /auto|scroll|overlay|hidden/.test(r + a + n);
1069
+ }
1070
+ function ar(e) {
1071
+ return ["html", "body", "#document"].indexOf(me(e)) >= 0 ? e.ownerDocument.body : ne(e) && xt(e) ? e : ar(et(e));
1072
+ }
1073
+ function ze(e, t) {
1074
+ var r;
1075
+ t === void 0 && (t = []);
1076
+ var n = ar(e), a = n === ((r = e.ownerDocument) == null ? void 0 : r.body), i = re(n), l = a ? [i].concat(i.visualViewport || [], xt(n) ? n : []) : n, o = t.concat(l);
1077
+ return a ? o : (
1078
+ // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
1079
+ o.concat(ze(et(l)))
1080
+ );
1081
+ }
1082
+ function ut(e) {
1083
+ return Object.assign({}, e, {
1084
+ left: e.x,
1085
+ top: e.y,
1086
+ right: e.x + e.width,
1087
+ bottom: e.y + e.height
1088
+ });
1089
+ }
1090
+ function Va(e, t) {
1091
+ var r = Pe(e, !1, t === "fixed");
1092
+ 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;
1093
+ }
1094
+ function Rt(e, t, r) {
1095
+ return t === Qt ? ut(Ca(e, r)) : ke(t) ? Va(t, r) : ut(Pa(be(e)));
1096
+ }
1097
+ function Ea(e) {
1098
+ var t = ze(et(e)), r = ["absolute", "fixed"].indexOf(ge(e).position) >= 0, n = r && ne(e) ? Ne(e) : e;
1099
+ return ke(n) ? t.filter(function(a) {
1100
+ return ke(a) && Jt(a, n) && me(a) !== "body";
1101
+ }) : [];
1102
+ }
1103
+ function Ba(e, t, r, n) {
1104
+ var a = t === "clippingParents" ? Ea(e) : [].concat(t), i = [].concat(a, [r]), l = i[0], o = i.reduce(function(s, d) {
1105
+ var c = Rt(e, d, n);
1106
+ return s.top = Oe(c.top, s.top), s.right = Qe(c.right, s.right), s.bottom = Qe(c.bottom, s.bottom), s.left = Oe(c.left, s.left), s;
1107
+ }, Rt(e, l, n));
1108
+ return o.width = o.right - o.left, o.height = o.bottom - o.top, o.x = o.left, o.y = o.top, o;
1109
+ }
1110
+ function nr(e) {
1111
+ var t = e.reference, r = e.element, n = e.placement, a = n ? ve(n) : null, i = n ? Ve(n) : null, l = t.x + t.width / 2 - r.width / 2, o = t.y + t.height / 2 - r.height / 2, s;
1112
+ switch (a) {
1113
+ case ee:
1114
+ s = {
1115
+ x: l,
1116
+ y: t.y - r.height
1117
+ };
1118
+ break;
1119
+ case ie:
1120
+ s = {
1121
+ x: l,
1122
+ y: t.y + t.height
1123
+ };
1124
+ break;
1125
+ case oe:
1126
+ s = {
1127
+ x: t.x + t.width,
1128
+ y: o
1129
+ };
1130
+ break;
1131
+ case te:
1132
+ s = {
1133
+ x: t.x - r.width,
1134
+ y: o
1135
+ };
1136
+ break;
1137
+ default:
1138
+ s = {
1139
+ x: t.x,
1140
+ y: t.y
1141
+ };
1142
+ }
1143
+ var d = a ? bt(a) : null;
1144
+ if (d != null) {
1145
+ var c = d === "y" ? "height" : "width";
1146
+ switch (i) {
1147
+ case Se:
1148
+ s[d] = s[d] - (t[c] / 2 - r[c] / 2);
1149
+ break;
1150
+ case Me:
1151
+ s[d] = s[d] + (t[c] / 2 - r[c] / 2);
1152
+ break;
1153
+ }
1154
+ }
1155
+ return s;
1156
+ }
1157
+ function _e(e, t) {
1158
+ t === void 0 && (t = {});
1159
+ var r = t, n = r.placement, a = n === void 0 ? e.placement : n, i = r.strategy, l = i === void 0 ? e.strategy : i, o = r.boundary, s = o === void 0 ? Gr : o, d = r.rootBoundary, c = d === void 0 ? Qt : d, w = r.elementContext, k = w === void 0 ? Ae : w, v = r.altBoundary, S = v === void 0 ? !1 : v, O = r.padding, $ = O === void 0 ? 0 : O, C = tr(typeof $ != "number" ? $ : rr($, Ie)), E = k === Ae ? Zr : Ae, R = e.rects.popper, f = e.elements[S ? E : k], m = Ba(ke(f) ? f : f.contextElement || be(e.elements.popper), s, c, l), u = Pe(e.elements.reference), T = nr({
1160
+ reference: u,
1161
+ element: R,
1162
+ placement: a
1163
+ }), B = ut(Object.assign({}, R, T)), D = k === Ae ? B : u, W = {
1164
+ top: m.top - D.top + C.top,
1165
+ bottom: D.bottom - m.bottom + C.bottom,
1166
+ left: m.left - D.left + C.left,
1167
+ right: D.right - m.right + C.right
1168
+ }, y = e.modifiersData.offset;
1169
+ if (k === Ae && y) {
1170
+ var A = y[a];
1171
+ Object.keys(W).forEach(function(z) {
1172
+ var X = [oe, ie].indexOf(z) >= 0 ? 1 : -1, Y = [ee, ie].indexOf(z) >= 0 ? "y" : "x";
1173
+ W[z] += A[Y] * X;
1174
+ });
1175
+ }
1176
+ return W;
1177
+ }
1178
+ function Aa(e, t) {
1179
+ t === void 0 && (t = {});
1180
+ var r = t, n = r.placement, a = r.boundary, i = r.rootBoundary, l = r.padding, o = r.flipVariations, s = r.allowedAutoPlacements, d = s === void 0 ? Gt : s, c = Ve(n), w = c ? o ? Vt : Vt.filter(function(S) {
1181
+ return Ve(S) === c;
1182
+ }) : Ie, k = w.filter(function(S) {
1183
+ return d.indexOf(S) >= 0;
1184
+ });
1185
+ k.length === 0 && (k = w);
1186
+ var v = k.reduce(function(S, O) {
1187
+ return S[O] = _e(e, {
1188
+ placement: O,
1189
+ boundary: a,
1190
+ rootBoundary: i,
1191
+ padding: l
1192
+ })[ve(O)], S;
1193
+ }, {});
1194
+ return Object.keys(v).sort(function(S, O) {
1195
+ return v[S] - v[O];
1196
+ });
1197
+ }
1198
+ function Ra(e) {
1199
+ if (ve(e) === mt)
1200
+ return [];
1201
+ var t = Xe(e);
1202
+ return [At(e), t, At(t)];
1203
+ }
1204
+ function Da(e) {
1205
+ var t = e.state, r = e.options, n = e.name;
1206
+ if (!t.modifiersData[n]._skip) {
1207
+ for (var a = r.mainAxis, i = a === void 0 ? !0 : a, l = r.altAxis, o = l === void 0 ? !0 : l, s = r.fallbackPlacements, d = r.padding, c = r.boundary, w = r.rootBoundary, k = r.altBoundary, v = r.flipVariations, S = v === void 0 ? !0 : v, O = r.allowedAutoPlacements, $ = t.options.placement, C = ve($), E = C === $, R = s || (E || !S ? [Xe($)] : Ra($)), f = [$].concat(R).reduce(function(he, fe) {
1208
+ return he.concat(ve(fe) === mt ? Aa(t, {
1209
+ placement: fe,
1210
+ boundary: c,
1211
+ rootBoundary: w,
1212
+ padding: d,
1213
+ flipVariations: S,
1214
+ allowedAutoPlacements: O
1215
+ }) : fe);
1216
+ }, []), m = t.rects.reference, u = t.rects.popper, T = /* @__PURE__ */ new Map(), B = !0, D = f[0], W = 0; W < f.length; W++) {
1217
+ var y = f[W], A = ve(y), z = Ve(y) === Se, X = [ee, ie].indexOf(A) >= 0, Y = X ? "width" : "height", N = _e(t, {
1218
+ placement: y,
1219
+ boundary: c,
1220
+ rootBoundary: w,
1221
+ altBoundary: k,
1222
+ padding: d
1223
+ }), F = X ? z ? oe : te : z ? ie : ee;
1224
+ m[Y] > u[Y] && (F = Xe(F));
1225
+ var de = Xe(F), se = [];
1226
+ if (i && se.push(N[A] <= 0), o && se.push(N[F] <= 0, N[de] <= 0), se.every(function(he) {
1227
+ return he;
1228
+ })) {
1229
+ D = y, B = !1;
1230
+ break;
1231
+ }
1232
+ T.set(y, se);
1233
+ }
1234
+ if (B)
1235
+ for (var h = S ? 3 : 1, H = function(fe) {
1236
+ var ye = f.find(function(Te) {
1237
+ var pe = T.get(Te);
1238
+ if (pe)
1239
+ return pe.slice(0, fe).every(function(Be) {
1240
+ return Be;
1241
+ });
1242
+ });
1243
+ if (ye)
1244
+ return D = ye, "break";
1245
+ }, K = h; K > 0; K--) {
1246
+ var le = H(K);
1247
+ if (le === "break") break;
1248
+ }
1249
+ t.placement !== D && (t.modifiersData[n]._skip = !0, t.placement = D, t.reset = !0);
1250
+ }
1251
+ }
1252
+ const za = {
1253
+ name: "flip",
1254
+ enabled: !0,
1255
+ phase: "main",
1256
+ fn: Da,
1257
+ requiresIfExists: ["offset"],
1258
+ data: {
1259
+ _skip: !1
1260
+ }
1261
+ };
1262
+ function Dt(e, t, r) {
1263
+ return r === void 0 && (r = {
1264
+ x: 0,
1265
+ y: 0
1266
+ }), {
1267
+ top: e.top - t.height - r.y,
1268
+ right: e.right - t.width + r.x,
1269
+ bottom: e.bottom - t.height + r.y,
1270
+ left: e.left - t.width - r.x
1271
+ };
1272
+ }
1273
+ function zt(e) {
1274
+ return [ee, oe, ie, te].some(function(t) {
1275
+ return e[t] >= 0;
1276
+ });
1277
+ }
1278
+ function Wa(e) {
1279
+ var t = e.state, r = e.name, n = t.rects.reference, a = t.rects.popper, i = t.modifiersData.preventOverflow, l = _e(t, {
1280
+ elementContext: "reference"
1281
+ }), o = _e(t, {
1282
+ altBoundary: !0
1283
+ }), s = Dt(l, n), d = Dt(o, a, i), c = zt(s), w = zt(d);
1284
+ t.modifiersData[r] = {
1285
+ referenceClippingOffsets: s,
1286
+ popperEscapeOffsets: d,
1287
+ isReferenceHidden: c,
1288
+ hasPopperEscaped: w
1289
+ }, t.attributes.popper = Object.assign({}, t.attributes.popper, {
1290
+ "data-popper-reference-hidden": c,
1291
+ "data-popper-escaped": w
1292
+ });
1293
+ }
1294
+ const La = {
1295
+ name: "hide",
1296
+ enabled: !0,
1297
+ phase: "main",
1298
+ requiresIfExists: ["preventOverflow"],
1299
+ fn: Wa
1300
+ };
1301
+ function ja(e, t, r) {
1302
+ var n = ve(e), a = [te, ee].indexOf(n) >= 0 ? -1 : 1, i = typeof r == "function" ? r(Object.assign({}, t, {
1303
+ placement: e
1304
+ })) : r, l = i[0], o = i[1];
1305
+ return l = l || 0, o = (o || 0) * a, [te, oe].indexOf(n) >= 0 ? {
1306
+ x: o,
1307
+ y: l
1308
+ } : {
1309
+ x: l,
1310
+ y: o
1311
+ };
1312
+ }
1313
+ function Ma(e) {
1314
+ var t = e.state, r = e.options, n = e.name, a = r.offset, i = a === void 0 ? [0, 0] : a, l = Gt.reduce(function(c, w) {
1315
+ return c[w] = ja(w, t.rects, i), c;
1316
+ }, {}), o = l[t.placement], s = o.x, d = o.y;
1317
+ t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += s, t.modifiersData.popperOffsets.y += d), t.modifiersData[n] = l;
1318
+ }
1319
+ const _a = {
1320
+ name: "offset",
1321
+ enabled: !0,
1322
+ phase: "main",
1323
+ requires: ["popperOffsets"],
1324
+ fn: Ma
1325
+ };
1326
+ function Ia(e) {
1327
+ var t = e.state, r = e.name;
1328
+ t.modifiersData[r] = nr({
1329
+ reference: t.rects.reference,
1330
+ element: t.rects.popper,
1331
+ placement: t.placement
1332
+ });
1333
+ }
1334
+ const Na = {
1335
+ name: "popperOffsets",
1336
+ enabled: !0,
1337
+ phase: "read",
1338
+ fn: Ia,
1339
+ data: {}
1340
+ };
1341
+ function Fa(e) {
1342
+ return e === "x" ? "y" : "x";
1343
+ }
1344
+ function Ha(e) {
1345
+ var t = e.state, r = e.options, n = e.name, a = r.mainAxis, i = a === void 0 ? !0 : a, l = r.altAxis, o = l === void 0 ? !1 : l, s = r.boundary, d = r.rootBoundary, c = r.altBoundary, w = r.padding, k = r.tether, v = k === void 0 ? !0 : k, S = r.tetherOffset, O = S === void 0 ? 0 : S, $ = _e(t, {
1346
+ boundary: s,
1347
+ rootBoundary: d,
1348
+ padding: w,
1349
+ altBoundary: c
1350
+ }), C = ve(t.placement), E = Ve(t.placement), R = !E, f = bt(C), m = Fa(f), u = t.modifiersData.popperOffsets, T = t.rects.reference, B = t.rects.popper, D = typeof O == "function" ? O(Object.assign({}, t.rects, {
1351
+ placement: t.placement
1352
+ })) : O, W = typeof D == "number" ? {
1353
+ mainAxis: D,
1354
+ altAxis: D
1355
+ } : Object.assign({
1356
+ mainAxis: 0,
1357
+ altAxis: 0
1358
+ }, D), y = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, A = {
1359
+ x: 0,
1360
+ y: 0
1361
+ };
1362
+ if (u) {
1363
+ if (i) {
1364
+ var z, X = f === "y" ? ee : te, Y = f === "y" ? ie : oe, N = f === "y" ? "height" : "width", F = u[f], de = F + $[X], se = F - $[Y], h = v ? -B[N] / 2 : 0, H = E === Se ? T[N] : B[N], K = E === Se ? -B[N] : -T[N], le = t.elements.arrow, he = v && le ? ht(le) : {
1365
+ width: 0,
1366
+ height: 0
1367
+ }, fe = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : er(), ye = fe[X], Te = fe[Y], pe = De(0, T[N], he[N]), Be = R ? T[N] / 2 - h - pe - ye - W.mainAxis : H - pe - ye - W.mainAxis, tt = R ? -T[N] / 2 + h + pe + Te + W.mainAxis : K + pe + Te + W.mainAxis, p = t.elements.arrow && Ne(t.elements.arrow), L = p ? f === "y" ? p.clientTop || 0 : p.clientLeft || 0 : 0, P = (z = y?.[f]) != null ? z : 0, ce = F + Be - P - L, G = F + tt - P, Fe = De(v ? Qe(de, ce) : de, F, v ? Oe(se, G) : se);
1368
+ u[f] = Fe, A[f] = Fe - F;
1369
+ }
1370
+ if (o) {
1371
+ var rt, lr = f === "x" ? ee : te, cr = f === "x" ? ie : oe, we = u[m], He = m === "y" ? "height" : "width", Ot = we + $[lr], $t = we - $[cr], at = [ee, te].indexOf(C) !== -1, kt = (rt = y?.[m]) != null ? rt : 0, Tt = at ? Ot : we - T[He] - B[He] - kt + W.altAxis, St = at ? we + T[He] + B[He] - kt - W.altAxis : $t, Ct = v && at ? va(Tt, we, St) : De(v ? Tt : Ot, we, v ? St : $t);
1372
+ u[m] = Ct, A[m] = Ct - we;
1373
+ }
1374
+ t.modifiersData[n] = A;
1375
+ }
1376
+ }
1377
+ const qa = {
1378
+ name: "preventOverflow",
1379
+ enabled: !0,
1380
+ phase: "main",
1381
+ fn: Ha,
1382
+ requiresIfExists: ["offset"]
1383
+ };
1384
+ function Ua(e) {
1385
+ return {
1386
+ scrollLeft: e.scrollLeft,
1387
+ scrollTop: e.scrollTop
1388
+ };
1389
+ }
1390
+ function Xa(e) {
1391
+ return e === re(e) || !ne(e) ? yt(e) : Ua(e);
1392
+ }
1393
+ function Ya(e) {
1394
+ var t = e.getBoundingClientRect(), r = Ce(t.width) / e.offsetWidth || 1, n = Ce(t.height) / e.offsetHeight || 1;
1395
+ return r !== 1 || n !== 1;
1396
+ }
1397
+ function Ka(e, t, r) {
1398
+ r === void 0 && (r = !1);
1399
+ var n = ne(t), a = ne(t) && Ya(t), i = be(t), l = Pe(e, a, r), o = {
1400
+ scrollLeft: 0,
1401
+ scrollTop: 0
1402
+ }, s = {
1403
+ x: 0,
1404
+ y: 0
1405
+ };
1406
+ return (n || !n && !r) && ((me(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
1407
+ xt(i)) && (o = Xa(t)), ne(t) ? (s = Pe(t, !0), s.x += t.clientLeft, s.y += t.clientTop) : i && (s.x = wt(i))), {
1408
+ x: l.left + o.scrollLeft - s.x,
1409
+ y: l.top + o.scrollTop - s.y,
1410
+ width: l.width,
1411
+ height: l.height
1412
+ };
1413
+ }
1414
+ function Qa(e) {
1415
+ var t = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set(), n = [];
1416
+ e.forEach(function(i) {
1417
+ t.set(i.name, i);
1418
+ });
1419
+ function a(i) {
1420
+ r.add(i.name);
1421
+ var l = [].concat(i.requires || [], i.requiresIfExists || []);
1422
+ l.forEach(function(o) {
1423
+ if (!r.has(o)) {
1424
+ var s = t.get(o);
1425
+ s && a(s);
1426
+ }
1427
+ }), n.push(i);
1428
+ }
1429
+ return e.forEach(function(i) {
1430
+ r.has(i.name) || a(i);
1431
+ }), n;
1432
+ }
1433
+ function Ga(e) {
1434
+ var t = Qa(e);
1435
+ return la.reduce(function(r, n) {
1436
+ return r.concat(t.filter(function(a) {
1437
+ return a.phase === n;
1438
+ }));
1439
+ }, []);
1440
+ }
1441
+ function Za(e) {
1442
+ var t;
1443
+ return function() {
1444
+ return t || (t = new Promise(function(r) {
1445
+ Promise.resolve().then(function() {
1446
+ t = void 0, r(e());
1447
+ });
1448
+ })), t;
1449
+ };
1450
+ }
1451
+ function Ja(e) {
1452
+ var t = e.reduce(function(r, n) {
1453
+ var a = r[n.name];
1454
+ return r[n.name] = a ? Object.assign({}, a, n, {
1455
+ options: Object.assign({}, a.options, n.options),
1456
+ data: Object.assign({}, a.data, n.data)
1457
+ }) : n, r;
1458
+ }, {});
1459
+ return Object.keys(t).map(function(r) {
1460
+ return t[r];
1461
+ });
1462
+ }
1463
+ var Wt = {
1464
+ placement: "bottom",
1465
+ modifiers: [],
1466
+ strategy: "absolute"
1467
+ };
1468
+ function Lt() {
1469
+ for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
1470
+ t[r] = arguments[r];
1471
+ return !t.some(function(n) {
1472
+ return !(n && typeof n.getBoundingClientRect == "function");
1473
+ });
1474
+ }
1475
+ function en(e) {
1476
+ e === void 0 && (e = {});
1477
+ var t = e, r = t.defaultModifiers, n = r === void 0 ? [] : r, a = t.defaultOptions, i = a === void 0 ? Wt : a;
1478
+ return function(o, s, d) {
1479
+ d === void 0 && (d = i);
1480
+ var c = {
1481
+ placement: "bottom",
1482
+ orderedModifiers: [],
1483
+ options: Object.assign({}, Wt, i),
1484
+ modifiersData: {},
1485
+ elements: {
1486
+ reference: o,
1487
+ popper: s
1488
+ },
1489
+ attributes: {},
1490
+ styles: {}
1491
+ }, w = [], k = !1, v = {
1492
+ state: c,
1493
+ setOptions: function(C) {
1494
+ var E = typeof C == "function" ? C(c.options) : C;
1495
+ O(), c.options = Object.assign({}, i, c.options, E), c.scrollParents = {
1496
+ reference: ke(o) ? ze(o) : o.contextElement ? ze(o.contextElement) : [],
1497
+ popper: ze(s)
1498
+ };
1499
+ var R = Ga(Ja([].concat(n, c.options.modifiers)));
1500
+ return c.orderedModifiers = R.filter(function(f) {
1501
+ return f.enabled;
1502
+ }), S(), v.update();
1503
+ },
1504
+ // Sync update – it will always be executed, even if not necessary. This
1505
+ // is useful for low frequency updates where sync behavior simplifies the
1506
+ // logic.
1507
+ // For high frequency updates (e.g. `resize` and `scroll` events), always
1508
+ // prefer the async Popper#update method
1509
+ forceUpdate: function() {
1510
+ if (!k) {
1511
+ var C = c.elements, E = C.reference, R = C.popper;
1512
+ if (Lt(E, R)) {
1513
+ c.rects = {
1514
+ reference: Ka(E, Ne(R), c.options.strategy === "fixed"),
1515
+ popper: ht(R)
1516
+ }, c.reset = !1, c.placement = c.options.placement, c.orderedModifiers.forEach(function(W) {
1517
+ return c.modifiersData[W.name] = Object.assign({}, W.data);
1518
+ });
1519
+ for (var f = 0; f < c.orderedModifiers.length; f++) {
1520
+ if (c.reset === !0) {
1521
+ c.reset = !1, f = -1;
1522
+ continue;
1523
+ }
1524
+ var m = c.orderedModifiers[f], u = m.fn, T = m.options, B = T === void 0 ? {} : T, D = m.name;
1525
+ typeof u == "function" && (c = u({
1526
+ state: c,
1527
+ options: B,
1528
+ name: D,
1529
+ instance: v
1530
+ }) || c);
1531
+ }
1532
+ }
1533
+ }
1534
+ },
1535
+ // Async and optimistically optimized update – it will not be executed if
1536
+ // not necessary (debounced to run at most once-per-tick)
1537
+ update: Za(function() {
1538
+ return new Promise(function($) {
1539
+ v.forceUpdate(), $(c);
1540
+ });
1541
+ }),
1542
+ destroy: function() {
1543
+ O(), k = !0;
1544
+ }
1545
+ };
1546
+ if (!Lt(o, s))
1547
+ return v;
1548
+ v.setOptions(d).then(function($) {
1549
+ !k && d.onFirstUpdate && d.onFirstUpdate($);
1550
+ });
1551
+ function S() {
1552
+ c.orderedModifiers.forEach(function($) {
1553
+ var C = $.name, E = $.options, R = E === void 0 ? {} : E, f = $.effect;
1554
+ if (typeof f == "function") {
1555
+ var m = f({
1556
+ state: c,
1557
+ name: C,
1558
+ instance: v,
1559
+ options: R
1560
+ }), u = function() {
1561
+ };
1562
+ w.push(m || u);
1563
+ }
1564
+ });
1565
+ }
1566
+ function O() {
1567
+ w.forEach(function($) {
1568
+ return $();
1569
+ }), w = [];
1570
+ }
1571
+ return v;
1572
+ };
1573
+ }
1574
+ var tn = [ka, Na, Oa, da, _a, za, qa, ba, La], rn = /* @__PURE__ */ en({
1575
+ defaultModifiers: tn
1576
+ }), an = typeof global == "object" && global && global.Object === Object && global, nn = typeof self == "object" && self && self.Object === Object && self, ir = an || nn || Function("return this")(), Ge = ir.Symbol, or = Object.prototype, on = or.hasOwnProperty, sn = or.toString, Re = Ge ? Ge.toStringTag : void 0;
1577
+ function ln(e) {
1578
+ var t = on.call(e, Re), r = e[Re];
1579
+ try {
1580
+ e[Re] = void 0;
1581
+ var n = !0;
1582
+ } catch {
1583
+ }
1584
+ var a = sn.call(e);
1585
+ return n && (t ? e[Re] = r : delete e[Re]), a;
1586
+ }
1587
+ var cn = Object.prototype, un = cn.toString;
1588
+ function dn(e) {
1589
+ return un.call(e);
1590
+ }
1591
+ var fn = "[object Null]", pn = "[object Undefined]", jt = Ge ? Ge.toStringTag : void 0;
1592
+ function vn(e) {
1593
+ return e == null ? e === void 0 ? pn : fn : jt && jt in Object(e) ? ln(e) : dn(e);
1594
+ }
1595
+ function mn(e) {
1596
+ return e != null && typeof e == "object";
1597
+ }
1598
+ var gn = "[object Symbol]";
1599
+ function hn(e) {
1600
+ return typeof e == "symbol" || mn(e) && vn(e) == gn;
1601
+ }
1602
+ var bn = /\s/;
1603
+ function yn(e) {
1604
+ for (var t = e.length; t-- && bn.test(e.charAt(t)); )
1605
+ ;
1606
+ return t;
1607
+ }
1608
+ var wn = /^\s+/;
1609
+ function xn(e) {
1610
+ return e && e.slice(0, yn(e) + 1).replace(wn, "");
1611
+ }
1612
+ function Ze(e) {
1613
+ var t = typeof e;
1614
+ return e != null && (t == "object" || t == "function");
1615
+ }
1616
+ var Mt = NaN, On = /^[-+]0x[0-9a-f]+$/i, $n = /^0b[01]+$/i, kn = /^0o[0-7]+$/i, Tn = parseInt;
1617
+ function _t(e) {
1618
+ if (typeof e == "number")
1619
+ return e;
1620
+ if (hn(e))
1621
+ return Mt;
1622
+ if (Ze(e)) {
1623
+ var t = typeof e.valueOf == "function" ? e.valueOf() : e;
1624
+ e = Ze(t) ? t + "" : t;
1625
+ }
1626
+ if (typeof e != "string")
1627
+ return e === 0 ? e : +e;
1628
+ e = xn(e);
1629
+ var r = $n.test(e);
1630
+ return r || kn.test(e) ? Tn(e.slice(2), r ? 2 : 8) : On.test(e) ? Mt : +e;
1631
+ }
1632
+ var ot = function() {
1633
+ return ir.Date.now();
1634
+ }, Sn = "Expected a function", Cn = Math.max, Pn = Math.min;
1635
+ function dt(e, t, r) {
1636
+ var n, a, i, l, o, s, d = 0, c = !1, w = !1, k = !0;
1637
+ if (typeof e != "function")
1638
+ throw new TypeError(Sn);
1639
+ t = _t(t) || 0, Ze(r) && (c = !!r.leading, w = "maxWait" in r, i = w ? Cn(_t(r.maxWait) || 0, t) : i, k = "trailing" in r ? !!r.trailing : k);
1640
+ function v(u) {
1641
+ var T = n, B = a;
1642
+ return n = a = void 0, d = u, l = e.apply(B, T), l;
1643
+ }
1644
+ function S(u) {
1645
+ return d = u, o = setTimeout(C, t), c ? v(u) : l;
1646
+ }
1647
+ function O(u) {
1648
+ var T = u - s, B = u - d, D = t - T;
1649
+ return w ? Pn(D, i - B) : D;
1650
+ }
1651
+ function $(u) {
1652
+ var T = u - s, B = u - d;
1653
+ return s === void 0 || T >= t || T < 0 || w && B >= i;
1654
+ }
1655
+ function C() {
1656
+ var u = ot();
1657
+ if ($(u))
1658
+ return E(u);
1659
+ o = setTimeout(C, O(u));
1660
+ }
1661
+ function E(u) {
1662
+ return o = void 0, k && n ? v(u) : (n = a = void 0, l);
1663
+ }
1664
+ function R() {
1665
+ o !== void 0 && clearTimeout(o), d = 0, n = s = a = o = void 0;
1666
+ }
1667
+ function f() {
1668
+ return o === void 0 ? l : E(ot());
1669
+ }
1670
+ function m() {
1671
+ var u = ot(), T = $(u);
1672
+ if (n = arguments, a = this, s = u, T) {
1673
+ if (o === void 0)
1674
+ return S(s);
1675
+ if (w)
1676
+ return clearTimeout(o), o = setTimeout(C, t), v(s);
1677
+ }
1678
+ return o === void 0 && (o = setTimeout(C, t)), l;
1679
+ }
1680
+ return m.cancel = R, m.flush = f, m;
1681
+ }
1682
+ var Vn = "Expected a function";
1683
+ function En(e, t, r) {
1684
+ var n = !0, a = !0;
1685
+ if (typeof e != "function")
1686
+ throw new TypeError(Vn);
1687
+ return Ze(r) && (n = "leading" in r ? !!r.leading : n, a = "trailing" in r ? !!r.trailing : a), dt(e, t, {
1688
+ leading: n,
1689
+ maxWait: t,
1690
+ trailing: a
1691
+ });
1692
+ }
1693
+ const Bn = (e, t) => {
1694
+ const r = (n) => {
1695
+ const a = e.value, i = n.target;
1696
+ !a || !i || !(i instanceof Node) || a.contains(i) || t(n);
1697
+ };
1698
+ Je(() => {
1699
+ document.addEventListener("click", r, !0);
1700
+ }), Ee(() => {
1701
+ document.removeEventListener("click", r, !0);
1702
+ });
1703
+ }, An = 80, ft = /* @__PURE__ */ Q({
1704
+ name: "Popover",
1705
+ __name: "Popover",
1706
+ props: {
1707
+ preserveContentMount: { type: Boolean, default: !1 },
1708
+ trigger: { default: "click" },
1709
+ placement: { default: "bottom-start" },
1710
+ manual: { type: Boolean, default: !1 },
1711
+ disabled: { type: Boolean, default: !1 },
1712
+ popoverOptions: {},
1713
+ openDelay: { default: 0 },
1714
+ closeDelay: { default: 0 },
1715
+ popperWidth: {},
1716
+ maxPopperHeight: {},
1717
+ offset: { default: () => [0, 0] },
1718
+ padding: { default: 4 }
1719
+ },
1720
+ emits: ["visible-change", "click-outside", "scroll"],
1721
+ setup(e, { expose: t, emit: r }) {
1722
+ const n = _(!1), a = e, i = g(() => a.preserveContentMount || n.value), l = g(() => !a.preserveContentMount || n.value), o = r, s = _(), d = _(), c = _();
1723
+ let w = null, k = je({}), v = je({});
1724
+ const S = (y) => typeof y == "number" ? `${y}px` : y, O = g(() => {
1725
+ const y = a.maxPopperHeight;
1726
+ return y != null && y !== "";
1727
+ }), $ = g(() => {
1728
+ const y = {}, A = a.popperWidth;
1729
+ if (A != null && A !== "" && (y.width = S(A)), O.value) {
1730
+ const z = a.maxPopperHeight;
1731
+ y.maxHeight = S(z), y.overflowY = "auto", y.scrollbarWidth = "none", y.msOverflowStyle = "none";
1732
+ }
1733
+ return y.padding = S(a.padding), y;
1734
+ }), C = g(() => ({
1735
+ placement: a.placement,
1736
+ modifiers: [
1737
+ {
1738
+ name: "offset",
1739
+ options: {
1740
+ offset: a.offset
1741
+ }
1742
+ }
1743
+ ],
1744
+ ...a.popoverOptions
1745
+ })), E = () => {
1746
+ a.disabled || (n.value = !0, o("visible-change", !0));
1747
+ }, R = () => {
1748
+ n.value = !1, o("visible-change", !1);
1749
+ }, f = dt(E, a.openDelay), m = dt(R, a.closeDelay), u = () => {
1750
+ a.disabled || (m.cancel(), f());
1751
+ }, T = () => {
1752
+ f.cancel(), m();
1753
+ };
1754
+ Bn(s, () => {
1755
+ a.trigger === "click" && n.value && !a.manual && T(), n.value && o("click-outside", !0);
1756
+ });
1757
+ const B = () => {
1758
+ a.disabled || (n.value ? T() : u());
1759
+ }, D = () => {
1760
+ a.trigger === "hover" ? (v.mouseenter = u, k.mouseleave = T) : a.trigger === "click" && (v.click = B);
1761
+ };
1762
+ J(
1763
+ () => n.value,
1764
+ (y) => {
1765
+ y && (d.value && c.value ? w = rn(d.value, c.value, C.value) : w?.destroy());
1766
+ },
1767
+ { flush: "post" }
1768
+ ), J(
1769
+ () => a.manual,
1770
+ (y) => {
1771
+ y ? (v = {}, k = {}) : D();
1772
+ }
1773
+ ), J(
1774
+ () => a.trigger,
1775
+ (y, A) => {
1776
+ y !== A && (v = {}, k = {}, D());
1777
+ }
1778
+ ), J(
1779
+ () => a.disabled,
1780
+ (y) => {
1781
+ y && T();
1782
+ }
1783
+ ), Je(() => {
1784
+ a.manual || D();
1785
+ });
1786
+ const W = En((y) => {
1787
+ const A = y.target;
1788
+ o("scroll", { scrollTop: A.scrollTop, scrollLeft: A.scrollLeft });
1789
+ }, An);
1790
+ return Ee(() => {
1791
+ W.cancel(), w?.destroy();
1792
+ }), t({
1793
+ isOpen: n,
1794
+ open: u,
1795
+ close: T
1796
+ }), (y, A) => (b(), x("div", xe({
1797
+ class: "cregis-popover",
1798
+ ref_key: "popoverRef",
1799
+ ref: s
1800
+ }, Pt(ae(k), !0)), [
1801
+ V("div", xe({
1802
+ class: ["cregis-popover__trigger", { "cregis-popover__trigger--disabled": e.disabled }],
1803
+ ref_key: "popoverTriggerRef",
1804
+ ref: d
1805
+ }, Pt(ae(v), !0)), [
1806
+ q(y.$slots, "reference")
1807
+ ], 16),
1808
+ U(pt, { name: "fade" }, {
1809
+ default: Z(() => [
1810
+ i.value ? Le((b(), x("div", {
1811
+ key: 0,
1812
+ class: j(["cregis-popover__content", { "cregis-popover__content--hide-scrollbar": O.value }]),
1813
+ ref_key: "popoverContentRef",
1814
+ ref: c,
1815
+ style: ue($.value),
1816
+ onScroll: A[0] || (A[0] = //@ts-ignore
1817
+ (...z) => ae(W) && ae(W)(...z))
1818
+ }, [
1819
+ q(y.$slots, "default")
1820
+ ], 38)), [
1821
+ [vt, l.value]
1822
+ ]) : I("", !0)
1823
+ ]),
1824
+ _: 3
1825
+ })
1826
+ ], 16));
1827
+ }
1828
+ }), sr = Symbol("CregisSelect"), Rn = { class: "cregis-select__trigger-label" }, Dn = { class: "cregis-select__selected" }, zn = {
1829
+ key: 1,
1830
+ class: "cregis-select__placeholder"
1831
+ }, Wn = {
1832
+ key: 0,
1833
+ class: "cregis-select__dropdown-empty"
1834
+ }, Ln = {
1835
+ key: 2,
1836
+ class: "cregis-select__dropdown-filter-empty"
1837
+ }, jn = { class: "cregis-select__dropdown-content" }, li = /* @__PURE__ */ Q({
1838
+ name: "Select",
1839
+ __name: "Select",
1840
+ props: {
1841
+ modelValue: {},
1842
+ type: { default: "default" },
1843
+ size: { default: "large" },
1844
+ align: { default: "center" },
1845
+ placeholder: { default: "Please select" },
1846
+ disabled: { type: Boolean },
1847
+ filterable: { type: Boolean },
1848
+ filterDebounceMs: { default: 200 },
1849
+ noDataText: { default: "No data" },
1850
+ noMatchText: { default: "No matching data" },
1851
+ triggerWidth: { default: "296px" },
1852
+ popperWidth: {},
1853
+ maxPopperHeight: {}
1854
+ },
1855
+ emits: ["update:modelValue", "change", "visible-change", "filter-input", "filter-clear"],
1856
+ setup(e, { emit: t }) {
1857
+ const r = e, n = t, a = _(null), i = _(!1);
1858
+ let l = null;
1859
+ const o = () => {
1860
+ l !== null && (clearTimeout(l), l = null);
1861
+ }, s = (h) => {
1862
+ i.value = h, n("visible-change", h), !h && r.filterable && (f.value = "", m.value = "", o());
1863
+ }, d = (h) => typeof h == "number" ? `n:${h}` : `s:${h}`, c = je({}), w = je({}), k = _(0), v = _(null), S = (h, H, K) => {
1864
+ const le = d(h);
1865
+ return k.value++, c[le] = H, w[le] = K ?? H, () => {
1866
+ k.value--, delete c[le], delete w[le];
1867
+ };
1868
+ }, O = g(() => k.value === 0);
1869
+ J(
1870
+ () => r.modelValue,
1871
+ (h) => {
1872
+ if (h == null || h === "") {
1873
+ v.value = null;
1874
+ return;
1875
+ }
1876
+ v.value && v.value.value !== h && (v.value = null);
1877
+ }
1878
+ );
1879
+ const $ = g(() => {
1880
+ const h = r.modelValue;
1881
+ return h != null && h !== "";
1882
+ }), C = g(() => {
1883
+ if (!$.value) return "";
1884
+ const h = r.modelValue;
1885
+ return v.value?.value === h ? v.value.label : c[d(h)] ?? String(h);
1886
+ }), E = (h) => r.modelValue === h, R = (h, H) => {
1887
+ r.disabled || (v.value = { value: h, label: H }, n("update:modelValue", h), n("change", h), a.value?.close());
1888
+ }, f = _(""), m = _(""), u = g(() => m.value.trim().toLowerCase()), T = g(() => {
1889
+ const h = u.value;
1890
+ return !r.filterable || !h ? !0 : Object.keys(c).some((H) => (w[H] ?? c[H]).toLowerCase().includes(h));
1891
+ }), B = g(
1892
+ () => r.filterable && !!u.value && !T.value && !O.value
1893
+ ), D = () => {
1894
+ r.filterable && (o(), l = setTimeout(() => {
1895
+ m.value = f.value.trim(), l = null;
1896
+ }, r.filterDebounceMs));
1897
+ };
1898
+ J(f, () => {
1899
+ r.filterable && D();
1900
+ }), J(
1901
+ () => r.filterable,
1902
+ (h) => {
1903
+ h || (f.value = "", m.value = "", o());
1904
+ }
1905
+ ), Ee(() => o());
1906
+ const W = (h) => {
1907
+ n("filter-input", String(h ?? ""));
1908
+ }, y = () => {
1909
+ m.value = "", o(), n("filter-clear");
1910
+ };
1911
+ Nt(sr, {
1912
+ modelValue: g(() => r.modelValue),
1913
+ disabled: g(() => !!r.disabled),
1914
+ selectOption: R,
1915
+ isOptionSelected: E,
1916
+ registerOption: S,
1917
+ filterQuery: u
1918
+ });
1919
+ const A = (h) => typeof h == "number" ? `${h}px` : h, z = g(() => {
1920
+ if (r.popperWidth) return A(r.popperWidth);
1921
+ const h = r.triggerWidth;
1922
+ return typeof h == "number" ? h + 8 : `calc(${h} + 8px)`;
1923
+ }), X = g(() => typeof z.value == "number" ? `${z.value - 12}px` : `calc(${z.value} - 12px)`), Y = g(() => r.align === "center" ? "bottom" : r.align === "left" ? "bottom-start" : "bottom-end"), N = g(() => ({
1924
+ width: A(r.triggerWidth)
1925
+ })), F = g(() => r.size === "large" ? "20px" : r.size === "medium" ? "14px" : "12px"), de = _(0), se = (h) => {
1926
+ de.value = h.scrollTop;
1927
+ };
1928
+ return (h, H) => (b(), x("div", {
1929
+ class: j(["cregis-select", { "is-disabled": e.disabled }])
1930
+ }, [
1931
+ U(ft, {
1932
+ ref_key: "popoverRef",
1933
+ ref: a,
1934
+ "preserve-content-mount": "",
1935
+ "popper-width": z.value,
1936
+ placement: Y.value,
1937
+ disabled: !!e.disabled,
1938
+ padding: 0,
1939
+ "max-popper-height": e.maxPopperHeight,
1940
+ onVisibleChange: s,
1941
+ onScroll: se
1942
+ }, {
1943
+ reference: Z(() => [
1944
+ V("div", {
1945
+ class: j(["cregis-select__trigger", { [`cregis-select__trigger--${e.size}`]: e.size, [`cregis-select__trigger--${e.type}`]: e.type }]),
1946
+ style: ue(N.value)
1947
+ }, [
1948
+ V("div", Rn, [
1949
+ $.value ? q(h.$slots, "label", {
1950
+ key: 0,
1951
+ modelValue: e.modelValue,
1952
+ displayText: C.value,
1953
+ placeholder: e.placeholder,
1954
+ hasSelection: $.value
1955
+ }, () => [
1956
+ V("p", Dn, M(C.value), 1)
1957
+ ]) : (b(), x("p", zn, M(e.placeholder), 1))
1958
+ ]),
1959
+ V("span", {
1960
+ class: j(["cregis-select__icon", { "is-open": i.value }])
1961
+ }, [
1962
+ U(ae(Xt), {
1963
+ size: F.value,
1964
+ color: e.disabled ? "var(--text-base-quaternary)" : "var(--material-foreground-base-secondary)"
1965
+ }, null, 8, ["size", "color"])
1966
+ ], 2)
1967
+ ], 6)
1968
+ ]),
1969
+ default: Z(() => [
1970
+ V("div", {
1971
+ class: j(["cregis-select__dropdown", { "is-empty": O.value }])
1972
+ }, [
1973
+ O.value ? (b(), x("p", Wn, M(e.noDataText), 1)) : I("", !0),
1974
+ e.filterable ? (b(), x("div", {
1975
+ key: 1,
1976
+ class: j(["cregis-select__dropdown-filter", { "backdrop-fixed-header": de.value > 10 }])
1977
+ }, [
1978
+ U(Yt, {
1979
+ modelValue: f.value,
1980
+ "onUpdate:modelValue": H[0] || (H[0] = (K) => f.value = K),
1981
+ placeholder: "search",
1982
+ width: X.value,
1983
+ size: "small",
1984
+ clearable: "",
1985
+ onInput: W,
1986
+ onClear: y
1987
+ }, {
1988
+ prefix: Z(() => [
1989
+ U(ae(Ut), { size: "14px" })
1990
+ ]),
1991
+ _: 1
1992
+ }, 8, ["modelValue", "width"])
1993
+ ], 2)) : I("", !0),
1994
+ B.value ? (b(), x("p", Ln, M(e.noMatchText), 1)) : I("", !0),
1995
+ V("div", jn, [
1996
+ q(h.$slots, "default")
1997
+ ])
1998
+ ], 2)
1999
+ ]),
2000
+ _: 3
2001
+ }, 8, ["popper-width", "placement", "disabled", "max-popper-height"])
2002
+ ], 2));
2003
+ }
2004
+ }), Mn = ["aria-selected"], ci = /* @__PURE__ */ Q({
2005
+ name: "Option",
2006
+ __name: "Option",
2007
+ props: {
2008
+ label: {},
2009
+ value: {},
2010
+ disabled: { type: Boolean },
2011
+ filterText: {}
2012
+ },
2013
+ setup(e) {
2014
+ const t = e, r = Ft(sr, null);
2015
+ let n;
2016
+ const a = () => t.filterText ?? t.label, i = () => {
2017
+ n?.(), r && (n = r.registerOption(t.value, t.label, a()));
2018
+ };
2019
+ Je(i), Ee(() => n?.()), J(() => [t.value, t.label, t.filterText], i);
2020
+ const l = g(() => r?.isOptionSelected(t.value) ?? !1), o = () => {
2021
+ t.disabled || r?.disabled.value || r?.selectOption(t.value, t.label);
2022
+ }, s = g(() => r?.filterQuery?.value ?? ""), d = g(() => {
2023
+ const c = s.value;
2024
+ return c ? a().toLowerCase().includes(c) : !0;
2025
+ });
2026
+ return (c, w) => Le((b(), x("div", {
2027
+ class: j(["cregis-select__option", { "is-selected": l.value, "is-disabled": e.disabled }]),
2028
+ role: "option",
2029
+ "aria-selected": l.value,
2030
+ onClick: o
2031
+ }, [
2032
+ q(c.$slots, "default", {
2033
+ label: e.label,
2034
+ value: e.value,
2035
+ disabled: !!e.disabled,
2036
+ selected: l.value
2037
+ }, () => [
2038
+ $e(M(e.label), 1)
2039
+ ])
2040
+ ], 10, Mn)), [
2041
+ [vt, d.value]
2042
+ ]);
2043
+ }
2044
+ }), _n = { class: "cregis-cascader__trigger-label" }, In = { class: "cregis-cascader__selected" }, Nn = {
2045
+ key: 1,
2046
+ class: "cregis-cascader__placeholder"
2047
+ }, Fn = {
2048
+ key: 0,
2049
+ class: "cregis-cascader__dropdown-empty"
2050
+ }, Hn = {
2051
+ key: 2,
2052
+ class: "cregis-cascader__dropdown-filter-empty"
2053
+ }, qn = { class: "cregis-cascader__dropdown-content" }, Un = {
2054
+ key: 0,
2055
+ class: "cregis-cascader__dropdown-item-popover"
2056
+ }, Xn = { class: "cregis-cascader__suboption-amount-container" }, Yn = {
2057
+ key: 0,
2058
+ class: "cregis-cascader__suboption-amount"
2059
+ }, Kn = { class: "cregis-cascader__suboption-panel" }, Qn = ["onClick"], Gn = ["onClick"], ui = /* @__PURE__ */ Q({
2060
+ name: "Cascader",
2061
+ __name: "Cascader",
2062
+ props: {
2063
+ modelValue: {},
2064
+ options: { default: () => [] },
2065
+ type: { default: "default" },
2066
+ size: { default: "large" },
2067
+ align: { default: "center" },
2068
+ placeholder: { default: "Please select" },
2069
+ disabled: { type: Boolean },
2070
+ filterable: { type: Boolean },
2071
+ filterDebounceMs: { default: 200 },
2072
+ noDataText: { default: "No data" },
2073
+ noMatchText: { default: "No matching data" },
2074
+ triggerWidth: { default: "296px" },
2075
+ popperWidth: {},
2076
+ subPopperWidth: { default: "200px" },
2077
+ maxPopperHeight: {},
2078
+ offset: { default: () => [0, 0] },
2079
+ showSubOptionAmount: { type: Boolean, default: !0 }
2080
+ },
2081
+ emits: ["update:modelValue", "change", "visible-change", "filter-input", "filter-clear"],
2082
+ setup(e, { emit: t }) {
2083
+ const r = e, n = t, a = _(null), i = _(!1);
2084
+ let l = null;
2085
+ const o = () => {
2086
+ l !== null && (clearTimeout(l), l = null);
2087
+ }, s = _(""), d = _(""), c = g(() => d.value.trim().toLowerCase()), w = () => {
2088
+ r.filterable && (o(), l = setTimeout(() => {
2089
+ d.value = s.value.trim(), l = null;
2090
+ }, r.filterDebounceMs));
2091
+ };
2092
+ J(s, () => {
2093
+ r.filterable && w();
2094
+ }), J(
2095
+ () => r.filterable,
2096
+ (p) => {
2097
+ p || (s.value = "", d.value = "", o());
2098
+ }
2099
+ ), Ee(() => o());
2100
+ const k = (p) => {
2101
+ n("filter-input", String(p ?? ""));
2102
+ }, v = () => {
2103
+ d.value = "", o(), n("filter-clear");
2104
+ }, S = (p) => (p.filterText ?? p.label).toLowerCase(), O = (p) => {
2105
+ const L = c.value;
2106
+ return !L || S(p).includes(L) ? !0 : (p.children ?? []).some((ce) => S(ce).includes(L));
2107
+ }, $ = (p, L) => {
2108
+ const P = c.value;
2109
+ return !P || S(p).includes(P) ? !0 : S(L).includes(P);
2110
+ }, C = g(() => r.options.filter((p) => O(p))), E = g(() => r.options.length === 0), R = g(() => (c.value, r.options.some((p) => O(p)))), f = g(
2111
+ () => r.filterable && !!d.value.trim() && !R.value && !E.value
2112
+ ), m = (p) => {
2113
+ i.value = p, n("visible-change", p), !p && r.filterable && (s.value = "", d.value = "", o());
2114
+ }, u = _(null), T = (p) => {
2115
+ const L = r.options.find((P) => P.value === p);
2116
+ if (L)
2117
+ return {
2118
+ level: 1,
2119
+ label: L.label,
2120
+ primary: L,
2121
+ sub: void 0
2122
+ };
2123
+ for (const P of r.options) {
2124
+ const ce = P.children?.find((G) => G.value === p);
2125
+ if (ce)
2126
+ return {
2127
+ level: 2,
2128
+ label: ce.label,
2129
+ primary: P,
2130
+ sub: ce
2131
+ };
2132
+ }
2133
+ return {
2134
+ level: 0,
2135
+ label: String(p),
2136
+ primary: void 0,
2137
+ sub: void 0
2138
+ };
2139
+ }, B = g(() => {
2140
+ const p = r.modelValue;
2141
+ return p == null || p === "" ? {
2142
+ level: 0,
2143
+ label: "",
2144
+ primary: void 0,
2145
+ sub: void 0
2146
+ } : u.value !== null && u.value.value === p ? {
2147
+ level: u.value.level,
2148
+ label: u.value.label,
2149
+ primary: u.value.primary,
2150
+ sub: u.value.sub
2151
+ } : T(p);
2152
+ });
2153
+ J(
2154
+ () => r.modelValue,
2155
+ (p) => {
2156
+ if (p == null || p === "") {
2157
+ u.value = null;
2158
+ return;
2159
+ }
2160
+ u.value !== null && u.value.value !== p && (u.value = null);
2161
+ }
2162
+ );
2163
+ const D = g(() => B.value.level > 0), W = g(() => B.value.label), y = g(() => r.modelValue), A = g(() => W.value), z = g(() => B.value.level), X = g(() => B.value.primary), Y = g(() => B.value.sub), N = (p) => (p.children?.length ?? 0) > 0, F = (p) => r.modelValue === p, de = (p) => {
2164
+ const L = r.modelValue;
2165
+ return L == null || L === "" ? !1 : (p.children ?? []).some((P) => P.value === L);
2166
+ }, se = (p, L) => {
2167
+ r.disabled || p.disabled || L.disabled || (u.value = { value: L.value, label: L.label, level: 2, primary: p, sub: L }, n("update:modelValue", L.value), n("change", L.value), a.value?.close());
2168
+ }, h = (p) => {
2169
+ r.disabled || p.disabled || N(p) || (u.value = { value: p.value, label: p.label, level: 1, primary: p }, n("update:modelValue", p.value), n("change", p.value), a.value?.close());
2170
+ }, H = (p) => typeof p == "number" ? `${p}px` : p, K = g(() => {
2171
+ if (r.popperWidth !== void 0 && r.popperWidth !== null && r.popperWidth !== "")
2172
+ return H(r.popperWidth);
2173
+ const p = r.triggerWidth;
2174
+ return typeof p == "number" ? `${p + 8}px` : `calc(${p} + 8px)`;
2175
+ }), le = g(() => H(r.subPopperWidth)), he = g(() => typeof K.value == "number" ? `${K.value - 12}px` : `calc(${K.value} - 12px)`), fe = g(() => r.align === "center" ? "bottom" : r.align === "left" ? "bottom-start" : "bottom-end"), ye = g(() => ({
2176
+ width: H(r.triggerWidth)
2177
+ })), Te = g(() => r.size === "large" ? "20px" : r.size === "medium" ? "14px" : "12px"), pe = _(0), Be = (p) => {
2178
+ pe.value = p.scrollTop;
2179
+ }, tt = [-16, -8];
2180
+ return (p, L) => (b(), x("div", {
2181
+ class: j(["cregis-cascader", { "is-disabled": e.disabled }])
2182
+ }, [
2183
+ U(ft, {
2184
+ ref_key: "popoverRef",
2185
+ ref: a,
2186
+ "preserve-content-mount": "",
2187
+ "popper-width": K.value,
2188
+ placement: fe.value,
2189
+ offset: e.offset,
2190
+ disabled: !!e.disabled,
2191
+ padding: 0,
2192
+ "max-popper-height": e.maxPopperHeight,
2193
+ onVisibleChange: m,
2194
+ onScroll: Be
2195
+ }, {
2196
+ reference: Z(() => [
2197
+ p.$slots.trigger ? q(p.$slots, "trigger", {
2198
+ key: 0,
2199
+ modelValue: y.value,
2200
+ selectedLabel: A.value,
2201
+ level: z.value,
2202
+ primaryOption: X.value,
2203
+ subOption: Y.value,
2204
+ placeholder: e.placeholder,
2205
+ hasSelection: D.value,
2206
+ open: i.value,
2207
+ disabled: !!e.disabled
2208
+ }) : (b(), x("div", {
2209
+ key: 1,
2210
+ class: j(["cregis-cascader__trigger", { [`cregis-cascader__trigger--${e.size}`]: e.size, [`cregis-cascader__trigger--${e.type}`]: e.type }]),
2211
+ style: ue(ye.value)
2212
+ }, [
2213
+ V("div", _n, [
2214
+ D.value ? q(p.$slots, "label", {
2215
+ key: 0,
2216
+ modelValue: y.value,
2217
+ selectedLabel: A.value,
2218
+ level: z.value,
2219
+ primaryOption: X.value,
2220
+ subOption: Y.value,
2221
+ placeholder: e.placeholder,
2222
+ hasSelection: D.value
2223
+ }, () => [
2224
+ V("p", In, M(W.value), 1)
2225
+ ]) : (b(), x("p", Nn, M(e.placeholder), 1))
2226
+ ]),
2227
+ V("span", {
2228
+ class: j(["cregis-cascader__icon", { "is-open": i.value }])
2229
+ }, [
2230
+ U(ae(Xt), {
2231
+ size: Te.value,
2232
+ color: e.disabled ? "var(--text-base-quaternary)" : "var(--material-foreground-base-secondary)"
2233
+ }, null, 8, ["size", "color"])
2234
+ ], 2)
2235
+ ], 6))
2236
+ ]),
2237
+ default: Z(() => [
2238
+ V("div", {
2239
+ class: j(["cregis-cascader__dropdown", { "is-empty": E.value }])
2240
+ }, [
2241
+ E.value ? (b(), x("p", Fn, M(e.noDataText), 1)) : I("", !0),
2242
+ e.filterable ? (b(), x("div", {
2243
+ key: 1,
2244
+ class: j(["cregis-cascader__dropdown-filter", { "backdrop-fixed-header": pe.value > 10 }])
2245
+ }, [
2246
+ U(Yt, {
2247
+ modelValue: s.value,
2248
+ "onUpdate:modelValue": L[0] || (L[0] = (P) => s.value = P),
2249
+ placeholder: "search",
2250
+ width: he.value,
2251
+ size: "small",
2252
+ clearable: "",
2253
+ onInput: k,
2254
+ onClear: v
2255
+ }, {
2256
+ prefix: Z(() => [
2257
+ U(ae(Ut), { size: "14px" })
2258
+ ]),
2259
+ _: 1
2260
+ }, 8, ["modelValue", "width"])
2261
+ ], 2)) : I("", !0),
2262
+ f.value ? (b(), x("p", Hn, M(e.noMatchText), 1)) : I("", !0),
2263
+ V("ul", qn, [
2264
+ (b(!0), x(st, null, lt(C.value, (P, ce) => (b(), x("li", {
2265
+ key: P.value,
2266
+ class: j(["cregis-cascader__dropdown-item", { "is-disabled": P.disabled }])
2267
+ }, [
2268
+ N(P) ? (b(), x("div", Un, [
2269
+ U(ft, {
2270
+ trigger: "hover",
2271
+ placement: "right-start",
2272
+ offset: tt,
2273
+ "popper-width": le.value,
2274
+ padding: 4,
2275
+ disabled: !!P.disabled || !!e.disabled
2276
+ }, {
2277
+ reference: Z(() => [
2278
+ V("div", {
2279
+ class: j(["cregis-cascader__suboption-trigger", {
2280
+ "is-disabled": P.disabled,
2281
+ "is-parent-active": de(P)
2282
+ }])
2283
+ }, [
2284
+ q(p.$slots, "option", {
2285
+ modelValue: y.value,
2286
+ selectedLabel: A.value,
2287
+ level: z.value,
2288
+ primaryOption: X.value,
2289
+ subOption: Y.value,
2290
+ option: P,
2291
+ index: ce,
2292
+ disabled: !!P.disabled,
2293
+ selected: F(P.value),
2294
+ isParentOfSelected: de(P)
2295
+ }, () => [
2296
+ V("p", null, M(P.label), 1)
2297
+ ]),
2298
+ V("div", Xn, [
2299
+ e.showSubOptionAmount ? (b(), x("div", Yn, M(P.children.length), 1)) : I("", !0),
2300
+ U(ae(br), {
2301
+ size: "14px",
2302
+ color: "currentColor"
2303
+ })
2304
+ ])
2305
+ ], 2)
2306
+ ]),
2307
+ default: Z(() => [
2308
+ V("div", Kn, [
2309
+ (b(!0), x(st, null, lt(P.children, (G, Fe) => Le((b(), x("div", {
2310
+ key: G.value,
2311
+ class: j(["cregis-cascader__suboption-row", {
2312
+ "is-active": F(G.value),
2313
+ "is-disabled": G.disabled
2314
+ }]),
2315
+ role: "menuitem",
2316
+ onClick: (rt) => se(P, G)
2317
+ }, [
2318
+ q(p.$slots, "subOption", {
2319
+ modelValue: y.value,
2320
+ selectedLabel: A.value,
2321
+ level: z.value,
2322
+ primaryOption: X.value,
2323
+ subOption: Y.value,
2324
+ option: G,
2325
+ index: Fe,
2326
+ parent: P,
2327
+ parentIndex: ce,
2328
+ selected: F(G.value),
2329
+ disabled: !!G.disabled
2330
+ }, () => [
2331
+ $e(M(G.label), 1)
2332
+ ])
2333
+ ], 10, Qn)), [
2334
+ [vt, $(P, G)]
2335
+ ])), 128))
2336
+ ])
2337
+ ]),
2338
+ _: 2
2339
+ }, 1032, ["popper-width", "disabled"])
2340
+ ])) : (b(), x("div", {
2341
+ key: 1,
2342
+ class: "cregis-cascader__leaf-only",
2343
+ onClick: (G) => h(P)
2344
+ }, [
2345
+ q(p.$slots, "option", {
2346
+ modelValue: y.value,
2347
+ selectedLabel: A.value,
2348
+ level: z.value,
2349
+ primaryOption: X.value,
2350
+ subOption: Y.value,
2351
+ option: P,
2352
+ index: ce,
2353
+ disabled: !!P.disabled,
2354
+ selected: F(P.value),
2355
+ isParentOfSelected: !1
2356
+ }, () => [
2357
+ V("p", null, M(P.label), 1)
2358
+ ])
2359
+ ], 8, Gn))
2360
+ ], 2))), 128))
2361
+ ])
2362
+ ], 2)
2363
+ ]),
2364
+ _: 3
2365
+ }, 8, ["popper-width", "placement", "offset", "disabled", "max-popper-height"])
2366
+ ], 2));
489
2367
  }
490
2368
  });
491
2369
  export {
492
- B as Button,
493
- Te as Checkbox,
494
- Se as Divider,
495
- ze as Input,
496
- Be as Radio,
497
- U as TABS_KEY,
498
- Re as TabPane,
499
- Ve as Tabs
2370
+ Ue as Button,
2371
+ ui as Cascader,
2372
+ ei as Checkbox,
2373
+ ri as Divider,
2374
+ Yt as Input,
2375
+ ii as Message,
2376
+ oi as Notification,
2377
+ ci as Option,
2378
+ ft as Popover,
2379
+ si as Progress,
2380
+ ti as Radio,
2381
+ li as Select,
2382
+ Kt as TABS_KEY,
2383
+ ni as TabPane,
2384
+ ai as Tabs,
2385
+ sr as selectInjectKey
500
2386
  };