@opengis/filter 0.1.10 → 0.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
- import { createElementBlock as w, openBlock as c, createElementVNode as u, defineComponent as U, ref as S, withModifiers as Be, normalizeClass as _, createCommentVNode as $, toDisplayString as A, computed as E, watch as F, createStaticVNode as Ue, Fragment as j, renderList as q, unref as e, createBlock as M, createVNode as Y, createTextVNode as z, withDirectives as I, vShow as H, getCurrentInstance as Oe, vModelText as Q, onBeforeUnmount as me, onMounted as ue, isRef as ze, Teleport as Re, normalizeStyle as Me, renderSlot as ce, nextTick as ve, withCtx as te, resolveDynamicComponent as J, mergeProps as P, toRaw as se, cloneVNode as Ne, useSlots as pe } from "vue";
1
+ import { createElementBlock as _, openBlock as f, createElementVNode as d, defineComponent as O, ref as $, withModifiers as Ae, normalizeClass as K, createCommentVNode as V, toDisplayString as S, computed as E, watch as M, createStaticVNode as Ue, Fragment as F, renderList as W, unref as e, createBlock as R, createVNode as P, createTextVNode as N, withDirectives as U, vShow as G, getCurrentInstance as Oe, vModelText as H, onBeforeUnmount as fe, onMounted as ue, isRef as ze, Teleport as De, normalizeStyle as Be, renderSlot as de, nextTick as pe, withCtx as te, resolveDynamicComponent as J, mergeProps as q, toRaw as se, cloneVNode as Ne, useSlots as me } from "vue";
2
2
  import { notify as we } from "@opengis/core";
3
- const G = (t, n) => {
4
- const v = t.__vccOpts || t;
5
- for (const [l, r] of n)
6
- v[l] = r;
7
- return v;
3
+ const X = (u, o) => {
4
+ const b = u.__vccOpts || u;
5
+ for (const [t, n] of o)
6
+ b[t] = n;
7
+ return b;
8
8
  }, Ye = {}, Pe = {
9
9
  xmlns: "http://www.w3.org/2000/svg",
10
10
  width: "15px",
@@ -17,18 +17,18 @@ const G = (t, n) => {
17
17
  "stroke-linejoin": "round",
18
18
  class: "icon icon-tabler icons-tabler-outline icon-tabler-reload absolute inline mr-1 text-gray-800 transition-all cursor-pointer active:rotate-90 right-1 top-1 hover:text-blue-500"
19
19
  };
20
- function qe(t, n) {
21
- return c(), w("svg", Pe, [...n[0] || (n[0] = [
22
- u("path", {
20
+ function qe(u, o) {
21
+ return f(), _("svg", Pe, o[0] || (o[0] = [
22
+ d("path", {
23
23
  stroke: "none",
24
24
  d: "M0 0h24v24H0z",
25
25
  fill: "none"
26
26
  }, null, -1),
27
- u("path", { d: "M19.933 13.041a8 8 0 1 1 -9.925 -8.788c3.899 -1 7.935 1.007 9.425 4.747" }, null, -1),
28
- u("path", { d: "M20 4v5h-5" }, null, -1)
29
- ])]);
27
+ d("path", { d: "M19.933 13.041a8 8 0 1 1 -9.925 -8.788c3.899 -1 7.935 1.007 9.425 4.747" }, null, -1),
28
+ d("path", { d: "M20 4v5h-5" }, null, -1)
29
+ ]));
30
30
  }
31
- const We = /* @__PURE__ */ G(Ye, [["render", qe]]), Qe = { class: "flex items-center justify-between w-full text-sm" }, He = { class: "flex items-center cursor-pointer w-full" }, Ge = {
31
+ const We = /* @__PURE__ */ X(Ye, [["render", qe]]), Qe = { class: "flex items-center justify-between w-full text-sm" }, He = { class: "flex items-center cursor-pointer w-full" }, Ge = {
32
32
  key: 0,
33
33
  width: "16",
34
34
  height: "auto",
@@ -36,7 +36,7 @@ const We = /* @__PURE__ */ G(Ye, [["render", qe]]), Qe = { class: "flex items-ce
36
36
  }, Xe = ["value"], Ze = { class: "w-[calc(100%-18px)] flex flex-row items-center justify-between pl-[10px]" }, Je = { class: "flex flex-row items-center font-normal text-gray-800 gap-x-1" }, et = {
37
37
  key: 0,
38
38
  class: "text-xs text-gray-500 dark:text-neutral-500 pr-1"
39
- }, ye = /* @__PURE__ */ U({
39
+ }, ve = /* @__PURE__ */ O({
40
40
  __name: "list-item",
41
41
  props: {
42
42
  layout: {},
@@ -49,44 +49,44 @@ const We = /* @__PURE__ */ G(Ye, [["render", qe]]), Qe = { class: "flex items-ce
49
49
  highlighted: { type: Boolean }
50
50
  },
51
51
  emits: ["itemClick"],
52
- setup(t, { expose: n, emit: v }) {
53
- const l = t, r = v;
54
- function a() {
55
- r("itemClick", l.value);
52
+ setup(u, { expose: o, emit: b }) {
53
+ const t = u, n = b;
54
+ function l() {
55
+ n("itemClick", t.value);
56
56
  }
57
- const b = S(null);
58
- return n({ el: b }), (o, f) => (c(), w("div", {
57
+ const x = $(null);
58
+ return o({ el: x }), (a, v) => (f(), _("div", {
59
59
  class: "flex items-center w-full rounded-lg group hover:bg-gray-100",
60
60
  ref_key: "el",
61
- ref: b
61
+ ref: x
62
62
  }, [
63
- u("div", Qe, [
64
- u("div", He, [
65
- u("label", {
63
+ d("div", Qe, [
64
+ d("div", He, [
65
+ d("label", {
66
66
  for: "radio-9740",
67
- class: _([
68
- ["inline", "popover"].includes(t.layout) ? "text-sm text-gray-500 px-2 w-full py-2 cursor-pointer !flex flex-row items-center" : "flex flex-row items-center w-full px-2 py-2 text-sm text-gray-500 cursor-pointer",
69
- { "bg-blue-100": t.highlighted }
67
+ class: K([
68
+ ["inline", "popover"].includes(a.layout) ? "text-sm text-gray-500 px-2 w-full py-2 cursor-pointer !flex flex-row items-center" : "flex flex-row items-center w-full px-2 py-2 text-sm text-gray-500 cursor-pointer",
69
+ { "bg-blue-100": a.highlighted }
70
70
  ]),
71
- onClick: Be(a, ["stop", "prevent"])
71
+ onClick: Ae(l, ["stop", "prevent"])
72
72
  }, [
73
- u("div", {
74
- class: _(["w-[18px] h-[18px] border flex items-center justify-center", [
75
- t.type == "checkbox" ? "rounded-[4px]" : "rounded-full",
76
- t.color ? `bg-[${t.color}] border-[#ffffff]` : t.isSelected ? "bg-[#2563eb] border-[#ffffff]" : "bg-[#ffffff] border-[#d9d9d9]"
73
+ d("div", {
74
+ class: K(["w-[18px] h-[18px] border flex items-center justify-center", [
75
+ a.type == "checkbox" ? "rounded-[4px]" : "rounded-full",
76
+ a.color ? `bg-[${a.color}] border-[#ffffff]` : a.isSelected ? "bg-[#2563eb] border-[#ffffff]" : "bg-[#ffffff] border-[#d9d9d9]"
77
77
  ]])
78
78
  }, [
79
- t.isSelected ? (c(), w("img", Ge)) : $("", !0)
79
+ a.isSelected ? (f(), _("img", Ge)) : V("", !0)
80
80
  ], 2),
81
- u("input", {
81
+ d("input", {
82
82
  type: "checkbox",
83
83
  class: "hidden",
84
84
  id: "radio-9740",
85
- value: t.value
85
+ value: a.value
86
86
  }, null, 8, Xe),
87
- u("div", Ze, [
88
- u("span", Je, A(t.label ?? "Відсутні данні"), 1),
89
- t.count ? (c(), w("div", et, " (" + A(t.count) + ") ", 1)) : $("", !0)
87
+ d("div", Ze, [
88
+ d("span", Je, S(a.label ?? "Відсутні данні"), 1),
89
+ a.count ? (f(), _("div", et, " (" + S(a.count) + ") ", 1)) : V("", !0)
90
90
  ])
91
91
  ], 2)
92
92
  ])
@@ -94,56 +94,56 @@ const We = /* @__PURE__ */ G(Ye, [["render", qe]]), Qe = { class: "flex items-ce
94
94
  ], 512));
95
95
  }
96
96
  });
97
- function Fe(t, n) {
97
+ function Re(u, o) {
98
98
  const {
99
- options: v = [],
100
- limit: l = 20
101
- } = t;
102
- function r(d) {
103
- return Array.isArray(d) ? d[0] : d;
104
- }
105
- const a = S(r(t.modelValue)), b = S(""), o = S(!1), f = S([]), p = S("id"), y = S("text"), i = S(!1), h = S(t.layout !== "popover" && v.length > l);
106
- function k(d) {
107
- const x = d.find(Boolean) ?? {}, B = ["id", "value", "code", "key"].find((K) => K in x) ?? "id", R = ["text", "label", "name", "title"].find((K) => K in x) ?? "text";
108
- return { autoValueKey: B, autoLabelKey: R };
109
- }
110
- if (v.length > 0) {
111
- const d = k(v);
112
- p.value = d.autoValueKey, y.value = d.autoLabelKey;
113
- }
114
- const V = E(() => {
115
- const d = f.value;
116
- return t.layout === "popover" || i.value ? d : d.slice(0, l);
99
+ options: b = [],
100
+ limit: t = 20
101
+ } = u;
102
+ function n(i) {
103
+ return Array.isArray(i) ? i[0] : i;
104
+ }
105
+ const l = $(n(u.modelValue)), x = $(""), a = $(!1), v = $([]), m = $("id"), p = $("text"), r = $(!1), c = $(u.layout !== "popover" && b.length > t);
106
+ function C(i) {
107
+ const w = i.find(Boolean) ?? {}, D = ["id", "value", "code", "key"].find((j) => j in w) ?? "id", B = ["text", "label", "name", "title"].find((j) => j in w) ?? "text";
108
+ return { autoValueKey: D, autoLabelKey: B };
109
+ }
110
+ if (b.length > 0) {
111
+ const i = C(b);
112
+ m.value = i.autoValueKey, p.value = i.autoLabelKey;
113
+ }
114
+ const k = E(() => {
115
+ const i = v.value;
116
+ return u.layout === "popover" || r.value ? i : i.slice(0, t);
117
117
  });
118
- F(() => t.modelValue, (d) => {
119
- a.value = r(d);
120
- }, { immediate: !0 }), f.value = [...v].sort((d, x) => t.sort === "count" ? x.count && d.count ? x.count - d.count : 0 : t.sort === "name" ? String(d[y.value] ?? "").localeCompare(String(x[y.value] ?? "")) : 0);
121
- function m(d) {
122
- return a.value === d[p.value];
118
+ M(() => u.modelValue, (i) => {
119
+ l.value = n(i);
120
+ }, { immediate: !0 }), v.value = [...b].sort((i, w) => u.sort === "count" ? w.count && i.count ? w.count - i.count : 0 : u.sort === "name" ? String(i[p.value] ?? "").localeCompare(String(w[p.value] ?? "")) : 0);
121
+ function g(i) {
122
+ return l.value === i[m.value];
123
123
  }
124
- function s(d) {
125
- a.value = d[p.value], n("update:modelValue", a.value), n("change", { name: t.name, value: a.value });
124
+ function s(i) {
125
+ l.value = i[m.value], o("update:modelValue", l.value), o("change", { name: u.name, value: l.value });
126
126
  }
127
- function g() {
128
- a.value = void 0, n("update:modelValue", a.value), n("clear", t.name);
127
+ function h() {
128
+ l.value = void 0, o("update:modelValue", l.value), o("clear", u.name);
129
129
  }
130
- function C() {
131
- i.value = !i.value;
130
+ function y() {
131
+ r.value = !r.value;
132
132
  }
133
133
  return {
134
- innerValue: a,
135
- searchTerm: b,
136
- filteredOptions: V,
137
- isSelected: m,
134
+ innerValue: l,
135
+ searchTerm: x,
136
+ filteredOptions: k,
137
+ isSelected: g,
138
138
  selectItem: s,
139
- clear: g,
140
- toggleShowAll: C,
141
- isReqProc: o,
142
- showAll: i,
143
- isEnableShowAll: h,
144
- labelKey: y,
145
- valueKey: p,
146
- allOptions: f
139
+ clear: h,
140
+ toggleShowAll: y,
141
+ isReqProc: a,
142
+ showAll: r,
143
+ isEnableShowAll: c,
144
+ labelKey: p,
145
+ valueKey: m,
146
+ allOptions: v
147
147
  };
148
148
  }
149
149
  const tt = {}, lt = {
@@ -152,12 +152,12 @@ const tt = {}, lt = {
152
152
  fill: "none",
153
153
  xmlns: "http://www.w3.org/2000/svg"
154
154
  };
155
- function at(t, n) {
156
- return c(), w("svg", lt, [...n[0] || (n[0] = [
155
+ function ot(u, o) {
156
+ return f(), _("svg", lt, o[0] || (o[0] = [
157
157
  Ue('<rect x="27" y="50.5" width="124" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="27" y="50.5" width="124" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-50 dark:stroke-neutral-700/10"></rect><rect x="34.5" y="58" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="61" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="73" width="77" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/30"></rect><rect x="27" y="36" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="39" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="51" width="92" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><g filter="url(#filter1)"><rect x="12" y="6" width="154" height="40" rx="8" fill="currentColor" class="fill-white dark:fill-neutral-800" shape-rendering="crispEdges"></rect><rect x="12.5" y="6.5" width="153" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/60" shape-rendering="crispEdges"></rect><rect x="20" y="14" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="17" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="29" width="106" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect></g><defs><filter id="filter1" x="0" y="0" width="178" height="64" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="6"></feOffset><feGaussianBlur stdDeviation="6"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1187_14810"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1187_14810" result="shape"></feBlend></filter></defs>', 12)
158
- ])]);
158
+ ]));
159
159
  }
160
- const ge = /* @__PURE__ */ G(tt, [["render", at]]), nt = {}, ot = {
160
+ const ye = /* @__PURE__ */ X(tt, [["render", ot]]), at = {}, nt = {
161
161
  xmlns: "http://www.w3.org/2000/svg",
162
162
  width: "24",
163
163
  height: "24",
@@ -169,17 +169,17 @@ const ge = /* @__PURE__ */ G(tt, [["render", at]]), nt = {}, ot = {
169
169
  "stroke-linejoin": "round",
170
170
  class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down w-[14px] rotate"
171
171
  };
172
- function rt(t, n) {
173
- return c(), w("svg", ot, [...n[0] || (n[0] = [
174
- u("path", {
172
+ function rt(u, o) {
173
+ return f(), _("svg", nt, o[0] || (o[0] = [
174
+ d("path", {
175
175
  stroke: "none",
176
176
  d: "M0 0h24v24H0z",
177
177
  fill: "none"
178
178
  }, null, -1),
179
- u("path", { d: "M6 9l6 6l6 -6" }, null, -1)
180
- ])]);
179
+ d("path", { d: "M6 9l6 6l6 -6" }, null, -1)
180
+ ]));
181
181
  }
182
- const de = /* @__PURE__ */ G(nt, [["render", rt]]), st = {}, it = {
182
+ const ce = /* @__PURE__ */ X(at, [["render", rt]]), st = {}, it = {
183
183
  xmlns: "http://www.w3.org/2000/svg",
184
184
  width: "24",
185
185
  height: "24",
@@ -191,26 +191,26 @@ const de = /* @__PURE__ */ G(nt, [["render", rt]]), st = {}, it = {
191
191
  "stroke-linejoin": "round",
192
192
  class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down w-[14px] rotate-[180deg]"
193
193
  };
194
- function ut(t, n) {
195
- return c(), w("svg", it, [...n[0] || (n[0] = [
196
- u("path", {
194
+ function ut(u, o) {
195
+ return f(), _("svg", it, o[0] || (o[0] = [
196
+ d("path", {
197
197
  stroke: "none",
198
198
  d: "M0 0h24v24H0z",
199
199
  fill: "none"
200
200
  }, null, -1),
201
- u("path", { d: "M6 9l6 6l6 -6" }, null, -1)
202
- ])]);
201
+ d("path", { d: "M6 9l6 6l6 -6" }, null, -1)
202
+ ]));
203
203
  }
204
- const be = /* @__PURE__ */ G(st, [["render", ut]]), ct = {
204
+ const ge = /* @__PURE__ */ X(st, [["render", ut]]), dt = {
205
205
  key: 0,
206
206
  class: "w-full"
207
- }, dt = { class: "flex flex-col items-center justify-center p-5 text-center" }, ft = {
207
+ }, ct = { class: "flex flex-col items-center justify-center p-5 text-center" }, ft = {
208
208
  key: 0,
209
209
  class: "flex justify-between p-2 border-t bg-gray-50 text-xs text-gray-500"
210
- }, mt = {
210
+ }, pt = {
211
211
  key: 1,
212
212
  class: "flex justify-between items-center text-xs text-gray-500 p-1 border-t"
213
- }, vt = /* @__PURE__ */ U({
213
+ }, mt = /* @__PURE__ */ O({
214
214
  __name: "radio",
215
215
  props: {
216
216
  id: {},
@@ -238,161 +238,161 @@ const be = /* @__PURE__ */ G(st, [["render", ut]]), ct = {
238
238
  ua: {}
239
239
  },
240
240
  emits: ["update:modelValue", "change", "clear"],
241
- setup(t, { expose: n, emit: v }) {
242
- const l = t, r = S(null), a = v, {
243
- innerValue: b,
244
- filteredOptions: o,
245
- isSelected: f,
246
- selectItem: p,
247
- clear: y,
248
- toggleShowAll: i,
249
- isReqProc: h,
250
- showAll: k,
251
- isEnableShowAll: V,
252
- labelKey: m,
241
+ setup(u, { expose: o, emit: b }) {
242
+ const t = u, n = $(null), l = b, {
243
+ innerValue: x,
244
+ filteredOptions: a,
245
+ isSelected: v,
246
+ selectItem: m,
247
+ clear: p,
248
+ toggleShowAll: r,
249
+ isReqProc: c,
250
+ showAll: C,
251
+ isEnableShowAll: k,
252
+ labelKey: g,
253
253
  valueKey: s,
254
- allOptions: g
255
- } = Fe({
256
- ...l,
257
- modelValue: l.modelValue ?? l.default ?? ""
258
- }, a);
259
- return n({
260
- clear: y,
261
- inputTextRef: r
262
- }), F(
263
- () => l.modelValue,
264
- (C) => {
265
- C === void 0 && (b.value = void 0);
254
+ allOptions: h
255
+ } = Re({
256
+ ...t,
257
+ modelValue: t.modelValue ?? t.default ?? ""
258
+ }, l);
259
+ return o({
260
+ clear: p,
261
+ inputTextRef: n
262
+ }), M(
263
+ () => t.modelValue,
264
+ (y) => {
265
+ y === void 0 && (x.value = void 0);
266
266
  }
267
- ), (C, d) => (c(), w("div", {
268
- class: _([t.layout === "popover" ? "flex flex-col h-full" : "flex flex-col vs-filter-checkbox"])
267
+ ), (y, i) => (f(), _("div", {
268
+ class: K([y.layout === "popover" ? "flex flex-col h-full" : "flex flex-col vs-filter-checkbox"])
269
269
  }, [
270
- u("div", {
271
- class: _([
272
- t.layout === "popover" ? "flex-1 overflow-y-auto max-h-64 p-2" : "",
273
- t.layout === "inline" ? "flex-1 overflow-y-auto max-h-80" : ""
270
+ d("div", {
271
+ class: K([
272
+ y.layout === "popover" ? "flex-1 overflow-y-auto max-h-64 p-2" : "",
273
+ y.layout === "inline" ? "flex-1 overflow-y-auto max-h-80" : ""
274
274
  ])
275
275
  }, [
276
- (c(!0), w(j, null, q(e(o), (x) => (c(), M(ye, {
277
- layout: t.layout,
278
- key: x[e(s)],
279
- count: x.count,
280
- label: x[e(m)],
281
- color: x.color,
276
+ (f(!0), _(F, null, W(e(a), (w) => (f(), R(ve, {
277
+ layout: y.layout,
278
+ key: w[e(s)],
279
+ count: w.count,
280
+ label: w[e(g)],
281
+ color: w.color,
282
282
  type: "radio",
283
- value: x[e(s)],
284
- "is-selected": e(f)(x),
285
- onItemClick: (B) => e(p)(x)
283
+ value: w[e(s)],
284
+ "is-selected": e(v)(w),
285
+ onItemClick: (D) => e(m)(w)
286
286
  }, null, 8, ["layout", "count", "label", "color", "value", "is-selected", "onItemClick"]))), 128))
287
287
  ], 2),
288
- t.type === "select" && e(o).length === 0 && !e(h) ? (c(), w("div", ct, [
289
- u("div", dt, [
290
- Y(ge),
291
- d[4] || (d[4] = u("div", { class: "max-w-sm mx-auto mt-6" }, [
292
- u("p", { class: "font-medium text-gray-800 dark:text-neutral-200" }, "За вашим запитом нічого не знайдено"),
293
- u("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" })
288
+ y.type === "select" && e(a).length === 0 && !e(c) ? (f(), _("div", dt, [
289
+ d("div", ct, [
290
+ P(ye),
291
+ i[4] || (i[4] = d("div", { class: "max-w-sm mx-auto mt-6" }, [
292
+ d("p", { class: "font-medium text-gray-800 dark:text-neutral-200" }, "За вашим запитом нічого не знайдено"),
293
+ d("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" })
294
294
  ], -1))
295
295
  ])
296
- ])) : $("", !0),
297
- t.layout !== "popover" && t.type !== "select" ? (c(), w(j, { key: 1 }, [
298
- !e(k) && e(V) ? (c(), w("div", {
296
+ ])) : V("", !0),
297
+ y.layout !== "popover" && y.type !== "select" ? (f(), _(F, { key: 1 }, [
298
+ !e(C) && e(k) ? (f(), _("div", {
299
299
  key: 0,
300
- onClick: d[0] || (d[0] = //@ts-ignore
301
- (...x) => e(i) && e(i)(...x)),
300
+ onClick: i[0] || (i[0] = //@ts-ignore
301
+ (...w) => e(r) && e(r)(...w)),
302
302
  class: "inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"
303
303
  }, [
304
- d[5] || (d[5] = z(" Показати більше ", -1)),
305
- Y(de)
306
- ])) : $("", !0),
307
- e(k) ? (c(), w("div", {
304
+ i[5] || (i[5] = N(" Показати більше ", -1)),
305
+ P(ce)
306
+ ])) : V("", !0),
307
+ e(C) ? (f(), _("div", {
308
308
  key: 1,
309
- onClick: d[1] || (d[1] = //@ts-ignore
310
- (...x) => e(i) && e(i)(...x)),
309
+ onClick: i[1] || (i[1] = //@ts-ignore
310
+ (...w) => e(r) && e(r)(...w)),
311
311
  class: "inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"
312
312
  }, [
313
- d[6] || (d[6] = z(" Показати менше ", -1)),
314
- Y(be)
315
- ])) : $("", !0)
316
- ], 64)) : $("", !0),
317
- t.cleanable ? (c(), w(j, { key: 2 }, [
318
- t.layout === "inline" ? (c(), w("div", ft, [
319
- z(A(e(b) || e(b) === null ? 1 : 0) + " з " + A(e(g).length) + " обрано ", 1),
320
- I(u("button", {
313
+ i[6] || (i[6] = N(" Показати менше ", -1)),
314
+ P(ge)
315
+ ])) : V("", !0)
316
+ ], 64)) : V("", !0),
317
+ y.cleanable ? (f(), _(F, { key: 2 }, [
318
+ y.layout === "inline" ? (f(), _("div", ft, [
319
+ N(S(e(x) || e(x) === null ? 1 : 0) + " з " + S(e(h).length) + " обрано ", 1),
320
+ U(d("button", {
321
321
  class: "text-gray-600 hover:text-gray-800",
322
- onClick: d[2] || (d[2] = //@ts-ignore
323
- (...x) => e(y) && e(y)(...x))
322
+ onClick: i[2] || (i[2] = //@ts-ignore
323
+ (...w) => e(p) && e(p)(...w))
324
324
  }, " Очистити ", 512), [
325
- [H, e(b) !== "" && e(b) !== void 0]
325
+ [G, e(x) !== "" && e(x) !== void 0]
326
326
  ])
327
- ])) : $("", !0),
328
- t.layout === "popover" ? (c(), w("div", mt, [
329
- u("span", null, A(e(b) || e(b) === null ? 1 : 0) + " з " + A(e(g).length) + " обрано", 1),
330
- I(u("button", {
327
+ ])) : V("", !0),
328
+ y.layout === "popover" ? (f(), _("div", pt, [
329
+ d("span", null, S(e(x) || e(x) === null ? 1 : 0) + " з " + S(e(h).length) + " обрано", 1),
330
+ U(d("button", {
331
331
  class: "text-gray-600 hover:text-gray-800",
332
- onClick: d[3] || (d[3] = //@ts-ignore
333
- (...x) => e(y) && e(y)(...x))
332
+ onClick: i[3] || (i[3] = //@ts-ignore
333
+ (...w) => e(p) && e(p)(...w))
334
334
  }, " Очистити ", 512), [
335
- [H, e(b) !== "" && e(b) !== void 0]
335
+ [G, e(x) !== "" && e(x) !== void 0]
336
336
  ])
337
- ])) : $("", !0)
338
- ], 64)) : $("", !0)
337
+ ])) : V("", !0)
338
+ ], 64)) : V("", !0)
339
339
  ], 2));
340
340
  }
341
341
  });
342
- function _e(t, n) {
342
+ function Me(u, o) {
343
343
  const {
344
- options: v = [],
345
- limit: l = 20
346
- } = t;
347
- function r(d) {
348
- return Array.isArray(d) ? d : d ? [d] : [];
349
- }
350
- const a = S(r(t.modelValue)), b = S(""), o = S(!1), f = S([]), p = S("id"), y = S("text"), i = S(!1), h = S(t.layout !== "popover" && v.length > l);
351
- function k(d) {
352
- const x = d.find(Boolean) ?? {}, B = ["id", "value", "code", "key"].find((K) => K in x) ?? "id", R = ["text", "label", "name", "title"].find((K) => K in x) ?? "text";
353
- return { autoValueKey: B, autoLabelKey: R };
354
- }
355
- if (v.length > 0) {
356
- const d = k(v);
357
- p.value = d.autoValueKey, y.value = d.autoLabelKey;
358
- }
359
- const V = E(() => {
360
- const d = f.value;
361
- return t.layout === "popover" || i.value ? d : d.slice(0, l);
344
+ options: b = [],
345
+ limit: t = 20
346
+ } = u;
347
+ function n(i) {
348
+ return Array.isArray(i) ? i : i ? [i] : [];
349
+ }
350
+ const l = $(n(u.modelValue)), x = $(""), a = $(!1), v = $([]), m = $("id"), p = $("text"), r = $(!1), c = $(u.layout !== "popover" && b.length > t);
351
+ function C(i) {
352
+ const w = i.find(Boolean) ?? {}, D = ["id", "value", "code", "key"].find((j) => j in w) ?? "id", B = ["text", "label", "name", "title"].find((j) => j in w) ?? "text";
353
+ return { autoValueKey: D, autoLabelKey: B };
354
+ }
355
+ if (b.length > 0) {
356
+ const i = C(b);
357
+ m.value = i.autoValueKey, p.value = i.autoLabelKey;
358
+ }
359
+ const k = E(() => {
360
+ const i = v.value;
361
+ return u.layout === "popover" || r.value ? i : i.slice(0, t);
362
362
  });
363
- F(() => t.modelValue, (d) => {
364
- a.value = r(d);
365
- }, { immediate: !0 }), f.value = [...v].sort((d, x) => t.sort === "count" ? x.count && d.count ? x.count - d.count : 0 : t.sort === "name" ? String(d[y.value]).localeCompare(String(x[y.value])) : 0);
366
- function m(d) {
367
- return a.value && a.value.includes(d[p.value]);
363
+ M(() => u.modelValue, (i) => {
364
+ l.value = n(i);
365
+ }, { immediate: !0 }), v.value = [...b].sort((i, w) => u.sort === "count" ? w.count && i.count ? w.count - i.count : 0 : u.sort === "name" ? String(i[p.value]).localeCompare(String(w[p.value])) : 0);
366
+ function g(i) {
367
+ return l.value && l.value.includes(i[m.value]);
368
368
  }
369
- function s(d) {
370
- const x = a.value.includes(d[p.value]);
371
- a.value = x ? a.value.filter((B) => B !== d[p.value]) : [...a.value, d[p.value]], n("update:modelValue", a.value), n("change", { name: t.name, value: a.value });
369
+ function s(i) {
370
+ const w = l.value.includes(i[m.value]);
371
+ l.value = w ? l.value.filter((D) => D !== i[m.value]) : [...l.value, i[m.value]], o("update:modelValue", l.value), o("change", { name: u.name, value: l.value });
372
372
  }
373
- function g() {
374
- a.value = [], n("update:modelValue", a.value), n("clear", t.name);
373
+ function h() {
374
+ l.value = [], o("update:modelValue", l.value), o("clear", u.name);
375
375
  }
376
- function C() {
377
- i.value = !i.value;
376
+ function y() {
377
+ r.value = !r.value;
378
378
  }
379
379
  return {
380
- innerValue: a,
381
- searchTerm: b,
382
- filteredOptions: V,
383
- isSelected: m,
380
+ innerValue: l,
381
+ searchTerm: x,
382
+ filteredOptions: k,
383
+ isSelected: g,
384
384
  selectItem: s,
385
- clear: g,
386
- toggleShowAll: C,
387
- isReqProc: o,
388
- showAll: i,
389
- isEnableShowAll: h,
390
- labelKey: y,
391
- valueKey: p,
392
- allOptions: f
385
+ clear: h,
386
+ toggleShowAll: y,
387
+ isReqProc: a,
388
+ showAll: r,
389
+ isEnableShowAll: c,
390
+ labelKey: p,
391
+ valueKey: m,
392
+ allOptions: v
393
393
  };
394
394
  }
395
- const Ce = {
395
+ const ke = {
396
396
  en: {
397
397
  search: "Search",
398
398
  more: "Show more",
@@ -428,24 +428,24 @@ const Ce = {
428
428
  next: "Настпуний період"
429
429
  }
430
430
  };
431
- function pt(t) {
432
- const n = t.split(".")[1];
433
- return (Ce[localStorage.locale || navigator.language] || Ce.uk)[n];
431
+ function vt(u) {
432
+ const o = u.split(".")[1];
433
+ return (ke[localStorage.locale || navigator.language] || ke.uk)[o];
434
434
  }
435
435
  function re() {
436
- const t = Oe();
437
- return t.appContext.config.globalProperties.$i18n ? t.appContext.config.globalProperties.$t : pt;
436
+ const u = Oe();
437
+ return u.appContext.config.globalProperties.$i18n ? u.appContext.config.globalProperties.$t : vt;
438
438
  }
439
439
  const yt = {
440
440
  key: 0,
441
441
  class: "w-full"
442
- }, gt = { class: "flex flex-col items-center justify-center p-5 text-center" }, bt = { class: "max-w-sm mx-auto mt-6" }, xt = { class: "font-medium text-gray-800 dark:text-neutral-200" }, ht = {
442
+ }, gt = { class: "flex flex-col items-center justify-center p-5 text-center" }, bt = { class: "max-w-sm mx-auto mt-6" }, ht = { class: "font-medium text-gray-800 dark:text-neutral-200" }, xt = {
443
443
  key: 0,
444
444
  class: "flex justify-between p-2 border-t bg-gray-50 text-xs text-gray-500"
445
- }, kt = {
445
+ }, wt = {
446
446
  key: 1,
447
447
  class: "flex justify-between items-center text-xs text-gray-500 p-1 border-t"
448
- }, Ve = /* @__PURE__ */ U({
448
+ }, Ce = /* @__PURE__ */ O({
449
449
  __name: "checkbox",
450
450
  props: {
451
451
  id: {},
@@ -473,105 +473,105 @@ const yt = {
473
473
  ua: {}
474
474
  },
475
475
  emits: ["update:modelValue", "change", "clear"],
476
- setup(t, { expose: n, emit: v }) {
477
- const l = re(), r = t, a = v, {
478
- innerValue: b,
479
- filteredOptions: o,
480
- isSelected: f,
481
- selectItem: p,
482
- clear: y,
483
- toggleShowAll: i,
484
- isReqProc: h,
485
- showAll: k,
486
- isEnableShowAll: V,
487
- labelKey: m,
476
+ setup(u, { expose: o, emit: b }) {
477
+ const t = re(), n = u, l = b, {
478
+ innerValue: x,
479
+ filteredOptions: a,
480
+ isSelected: v,
481
+ selectItem: m,
482
+ clear: p,
483
+ toggleShowAll: r,
484
+ isReqProc: c,
485
+ showAll: C,
486
+ isEnableShowAll: k,
487
+ labelKey: g,
488
488
  valueKey: s,
489
- allOptions: g
490
- } = _e({
491
- ...r,
492
- modelValue: r.modelValue
493
- }, a);
494
- return F(
495
- () => r.modelValue,
496
- (C) => {
497
- C === void 0 && (b.value = []);
489
+ allOptions: h
490
+ } = Me({
491
+ ...n,
492
+ modelValue: n.modelValue
493
+ }, l);
494
+ return M(
495
+ () => n.modelValue,
496
+ (y) => {
497
+ y === void 0 && (x.value = []);
498
498
  }
499
- ), n({
500
- clear: y
501
- }), (C, d) => (c(), w("div", {
502
- class: _([t.layout === "popover" ? "flex flex-col h-full" : "flex flex-col vs-filter-checkbox space-y-0.5"])
499
+ ), o({
500
+ clear: p
501
+ }), (y, i) => (f(), _("div", {
502
+ class: K([y.layout === "popover" ? "flex flex-col h-full" : "flex flex-col vs-filter-checkbox space-y-0.5"])
503
503
  }, [
504
- u("div", {
505
- class: _([
506
- t.layout === "popover" ? "flex-1 overflow-y-auto max-h-64 p-2" : "",
507
- t.layout === "inline" ? "flex-1 overflow-y-auto max-h-80" : ""
504
+ d("div", {
505
+ class: K([
506
+ y.layout === "popover" ? "flex-1 overflow-y-auto max-h-64 p-2" : "",
507
+ y.layout === "inline" ? "flex-1 overflow-y-auto max-h-80" : ""
508
508
  ])
509
509
  }, [
510
- (c(!0), w(j, null, q(e(o), (x) => (c(), M(ye, {
511
- layout: t.layout,
512
- count: x.count,
513
- label: x[e(m)],
514
- color: x.color,
510
+ (f(!0), _(F, null, W(e(a), (w) => (f(), R(ve, {
511
+ layout: y.layout,
512
+ count: w.count,
513
+ label: w[e(g)],
514
+ color: w.color,
515
515
  type: "checkbox",
516
- value: x[e(s)],
517
- "is-selected": e(f)(x),
518
- onItemClick: (B) => e(p)(x)
516
+ value: w[e(s)],
517
+ "is-selected": e(v)(w),
518
+ onItemClick: (D) => e(m)(w)
519
519
  }, null, 8, ["layout", "count", "label", "color", "value", "is-selected", "onItemClick"]))), 256))
520
520
  ], 2),
521
- t.type === "select" && e(o).length === 0 && !e(h) ? (c(), w("div", yt, [
522
- u("div", gt, [
523
- Y(ge),
524
- u("div", bt, [
525
- u("p", xt, A(e(l)("filter.notfound")), 1),
526
- d[4] || (d[4] = u("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" }, null, -1))
521
+ y.type === "select" && e(a).length === 0 && !e(c) ? (f(), _("div", yt, [
522
+ d("div", gt, [
523
+ P(ye),
524
+ d("div", bt, [
525
+ d("p", ht, S(e(t)("filter.notfound")), 1),
526
+ i[4] || (i[4] = d("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" }, null, -1))
527
527
  ])
528
528
  ])
529
- ])) : $("", !0),
530
- t.layout !== "popover" && t.type !== "select" ? (c(), w(j, { key: 1 }, [
531
- !e(k) && e(V) ? (c(), w("div", {
529
+ ])) : V("", !0),
530
+ y.layout !== "popover" && y.type !== "select" ? (f(), _(F, { key: 1 }, [
531
+ !e(C) && e(k) ? (f(), _("div", {
532
532
  key: 0,
533
- onClick: d[0] || (d[0] = //@ts-ignore
534
- (...x) => e(i) && e(i)(...x)),
533
+ onClick: i[0] || (i[0] = //@ts-ignore
534
+ (...w) => e(r) && e(r)(...w)),
535
535
  class: "inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"
536
536
  }, [
537
- z(A(e(l)("filter.more")) + " ", 1),
538
- Y(de)
539
- ])) : $("", !0),
540
- e(k) ? (c(), w("div", {
537
+ N(S(e(t)("filter.more")) + " ", 1),
538
+ P(ce)
539
+ ])) : V("", !0),
540
+ e(C) ? (f(), _("div", {
541
541
  key: 1,
542
- onClick: d[1] || (d[1] = //@ts-ignore
543
- (...x) => e(i) && e(i)(...x)),
542
+ onClick: i[1] || (i[1] = //@ts-ignore
543
+ (...w) => e(r) && e(r)(...w)),
544
544
  class: "inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"
545
545
  }, [
546
- z(A(e(l)("filter.less")) + " ", 1),
547
- Y(be)
548
- ])) : $("", !0)
549
- ], 64)) : $("", !0),
550
- t.cleanable ? (c(), w(j, { key: 2 }, [
551
- t.layout === "inline" ? (c(), w("div", ht, [
552
- z(A(e(b).length) + " / " + A(e(g).length) + " " + A(e(l)("filter.selected")) + " ", 1),
553
- I(u("button", {
546
+ N(S(e(t)("filter.less")) + " ", 1),
547
+ P(ge)
548
+ ])) : V("", !0)
549
+ ], 64)) : V("", !0),
550
+ y.cleanable ? (f(), _(F, { key: 2 }, [
551
+ y.layout === "inline" ? (f(), _("div", xt, [
552
+ N(S(e(x).length) + " / " + S(e(h).length) + " " + S(e(t)("filter.selected")) + " ", 1),
553
+ U(d("button", {
554
554
  class: "text-gray-600 hover:text-gray-800",
555
- onClick: d[2] || (d[2] = //@ts-ignore
556
- (...x) => e(y) && e(y)(...x))
557
- }, A(e(l)("filter.clear")), 513), [
558
- [H, e(b).length !== 0]
555
+ onClick: i[2] || (i[2] = //@ts-ignore
556
+ (...w) => e(p) && e(p)(...w))
557
+ }, S(e(t)("filter.clear")), 513), [
558
+ [G, e(x).length !== 0]
559
559
  ])
560
- ])) : $("", !0),
561
- t.layout === "popover" ? (c(), w("div", kt, [
562
- u("span", null, A(e(b).length) + " / " + A(e(g).length) + " " + A(e(l)("filter.selected")), 1),
563
- I(u("button", {
560
+ ])) : V("", !0),
561
+ y.layout === "popover" ? (f(), _("div", wt, [
562
+ d("span", null, S(e(x).length) + " / " + S(e(h).length) + " " + S(e(t)("filter.selected")), 1),
563
+ U(d("button", {
564
564
  class: "text-gray-600 hover:text-gray-800",
565
- onClick: d[3] || (d[3] = //@ts-ignore
566
- (...x) => e(y) && e(y)(...x))
567
- }, A(e(l)("filter.clear")), 513), [
568
- [H, e(b).length !== 0]
565
+ onClick: i[3] || (i[3] = //@ts-ignore
566
+ (...w) => e(p) && e(p)(...w))
567
+ }, S(e(t)("filter.clear")), 513), [
568
+ [G, e(x).length !== 0]
569
569
  ])
570
- ])) : $("", !0)
571
- ], 64)) : $("", !0)
570
+ ])) : V("", !0)
571
+ ], 64)) : V("", !0)
572
572
  ], 2));
573
573
  }
574
- }), wt = {}, Ct = {
574
+ }), kt = {}, Ct = {
575
575
  xmlns: "http://www.w3.org/2000/svg",
576
576
  width: "15px",
577
577
  height: "15px",
@@ -583,18 +583,18 @@ const yt = {
583
583
  "stroke-linejoin": "round",
584
584
  class: "icon icon-tabler icons-tabler-outline icon-tabler-search stroke-gray-500 transition-all"
585
585
  };
586
- function Vt(t, n) {
587
- return c(), w("svg", Ct, [...n[0] || (n[0] = [
588
- u("path", {
586
+ function _t(u, o) {
587
+ return f(), _("svg", Ct, o[0] || (o[0] = [
588
+ d("path", {
589
589
  stroke: "none",
590
590
  d: "M0 0h24v24H0z",
591
591
  fill: "none"
592
592
  }, null, -1),
593
- u("path", { d: "M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0" }, null, -1),
594
- u("path", { d: "M21 21l-6 -6" }, null, -1)
595
- ])]);
593
+ d("path", { d: "M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0" }, null, -1),
594
+ d("path", { d: "M21 21l-6 -6" }, null, -1)
595
+ ]));
596
596
  }
597
- const je = /* @__PURE__ */ G(wt, [["render", Vt]]), $t = {}, St = {
597
+ const Fe = /* @__PURE__ */ X(kt, [["render", _t]]), Vt = {}, $t = {
598
598
  xmlns: "http://www.w3.org/2000/svg",
599
599
  viewBox: "0 0 24 24",
600
600
  fill: "none",
@@ -606,24 +606,24 @@ const je = /* @__PURE__ */ G(wt, [["render", Vt]]), $t = {}, St = {
606
606
  width: "15px",
607
607
  height: "15px"
608
608
  };
609
- function At(t, n) {
610
- return c(), w("svg", St, [...n[0] || (n[0] = [
611
- u("path", {
609
+ function St(u, o) {
610
+ return f(), _("svg", $t, o[0] || (o[0] = [
611
+ d("path", {
612
612
  stroke: "none",
613
613
  d: "M0 0h24v24H0z",
614
614
  fill: "none"
615
615
  }, null, -1),
616
- u("path", { d: "M18 6l-12 12" }, null, -1),
617
- u("path", { d: "M6 6l12 12" }, null, -1)
618
- ])]);
616
+ d("path", { d: "M18 6l-12 12" }, null, -1),
617
+ d("path", { d: "M6 6l12 12" }, null, -1)
618
+ ]));
619
619
  }
620
- const Ke = /* @__PURE__ */ G($t, [["render", At]]);
621
- class fe {
622
- static getWidthClass(n) {
623
- return typeof n == "number" ? `max-w-[${n}px]` : typeof n == "string" ? n.endsWith("%") || n.endsWith("px") ? `max-w-[${n}]` : `max-w-${n}` : "w-full";
620
+ const je = /* @__PURE__ */ X(Vt, [["render", St]]);
621
+ class Ke {
622
+ static getWidthClass(o) {
623
+ return console.log(o), typeof o == "number" ? `max-w-[${o}px] min-w-[${o}px]` : typeof o == "string" ? o.endsWith("%") || o.endsWith("px") ? `max-w-[${o}]` : `max-w-${o}` : "w-full";
624
624
  }
625
625
  }
626
- const Dt = { class: "absolute bottom-2/4 translate-y-2/4 cursor-pointer left-3" }, Bt = ["placeholder"], Rt = /* @__PURE__ */ U({
626
+ const At = { class: "absolute bottom-2/4 translate-y-2/4 cursor-pointer left-3" }, Dt = ["placeholder"], Bt = /* @__PURE__ */ O({
627
627
  __name: "text-input",
628
628
  props: {
629
629
  id: {},
@@ -651,71 +651,71 @@ const Dt = { class: "absolute bottom-2/4 translate-y-2/4 cursor-pointer left-3"
651
651
  ua: {}
652
652
  },
653
653
  emits: ["update:modelValue", "change", "clear"],
654
- setup(t, { emit: n }) {
655
- const v = t, l = S((v.placeholder || v.label || v.title || v.name || "search").toString()), r = n, a = S(v.modelValue?.toString() ?? "");
656
- F(
657
- () => v.modelValue,
658
- (p) => {
659
- p !== a.value && (a.value = p?.toString() ?? "");
654
+ setup(u, { emit: o }) {
655
+ const b = u, t = $((b.placeholder || b.label || b.title || b.name || "search").toString()), n = o, l = $(b.modelValue?.toString() ?? "");
656
+ M(
657
+ () => b.modelValue,
658
+ (m) => {
659
+ m !== l.value && (l.value = m?.toString() ?? "");
660
660
  }
661
661
  );
662
- let b = null;
663
- function o() {
664
- if (a.value = a.value.trimStart(), a.value.length === 0) {
665
- f();
662
+ let x = null;
663
+ function a() {
664
+ if (l.value = l.value.trimStart(), l.value.length === 0) {
665
+ v();
666
666
  return;
667
667
  }
668
- b && clearTimeout(b), b = setTimeout(() => {
669
- r("update:modelValue", a.value), r("change", { name: v.name, value: a.value });
668
+ x && clearTimeout(x), x = setTimeout(() => {
669
+ n("update:modelValue", l.value), n("change", { name: b.name, value: l.value });
670
670
  }, 300);
671
671
  }
672
- function f() {
673
- a.value = "", r("update:modelValue", ""), r("clear", v.name);
672
+ function v() {
673
+ l.value = "", n("update:modelValue", ""), n("clear", b.name);
674
674
  }
675
- return (p, y) => (c(), w("div", {
676
- class: _([
675
+ return (m, p) => (f(), _("div", {
676
+ class: K([
677
677
  "vs-form-text relative bg-white rounded-lg [&>input]:py-[7px] [&>input]:max-h-[38px] [&>input]:ps-10 [&>input]:pe-8 [&>input]:block [&>input]:w-full [&>input]:bg-gray-100 [&>input]:border-transparent [&>input]:rounded-lg [&>input]:text-sm [&>input]:focus:bg-white [&>input]:focus:border-blue-500 [&>input]:focus:ring-blue-500 [&>input]:disabled:opacity-50 [&>input]:disabled:pointer-events-none [&>input]:dark:bg-neutral-700 [&>input]:dark:border-transparent [&>input]:dark:text-neutral-400 [&>input]:dark:placeholder:text-neutral-400 dark:focus:bg-neutral-800 dark:focus:ring-neutral-600",
678
- t.layout === "inline" ? e(fe).getWidthClass(t.width) : "mb-2" + (t.layout === "popover" ? " m-2" : "")
678
+ m.layout === "inline" ? e(Ke).getWidthClass(m.width) : "mb-2" + (m.layout === "popover" ? " m-2" : "")
679
679
  ])
680
680
  }, [
681
- u("div", Dt, [
682
- Y(je)
681
+ d("div", At, [
682
+ P(Fe)
683
683
  ]),
684
- a.value !== "" ? (c(), w("div", {
684
+ l.value !== "" ? (f(), _("div", {
685
685
  key: 0,
686
- onClick: f,
686
+ onClick: v,
687
687
  class: "absolute bottom-2/4 translate-y-2/4 right-3 cursor-pointer"
688
688
  }, [
689
- Y(Ke)
690
- ])) : $("", !0),
691
- I(u("input", {
689
+ P(je)
690
+ ])) : V("", !0),
691
+ U(d("input", {
692
692
  type: "text",
693
- "onUpdate:modelValue": y[0] || (y[0] = (i) => a.value = i),
694
- onInput: o,
695
- placeholder: l.value,
693
+ "onUpdate:modelValue": p[0] || (p[0] = (r) => l.value = r),
694
+ onInput: a,
695
+ placeholder: t.value,
696
696
  class: "!pr-7 !pl-8 bg-white h-[38px] min-w-[100px] text-sm py-2 px-3 block w-full border border-solid placeholder:text-nowrap border-stone-200 rounded-lg text-sm text-stone-800 placeholder:text-stone-400 focus:border-2 focus:z-10 focus:border-blue-500 focus:ring-blue-500 focus:outline-blue-500"
697
- }, null, 40, Bt), [
698
- [Q, a.value]
697
+ }, null, 40, Dt), [
698
+ [H, l.value]
699
699
  ])
700
700
  ], 2));
701
701
  }
702
702
  });
703
- function Le(t = { color: "blue" }) {
703
+ function Le(u = { color: "blue" }) {
704
704
  return E(() => {
705
- const v = `w-full px-3 py-2 border-solid border border-gray-300 text-sm rounded focus:outline-none focus:ring-2 focus:ring-${t.color}-500 focus:border-transparent`;
706
- return t?.size === "sm" ? `${v}h-[32px]` : `${v}h-[38px]`;
705
+ const b = `w-full px-3 py-2 border-solid border border-gray-300 text-sm rounded focus:outline-none focus:ring-2 focus:ring-${u.color}-500 focus:border-transparent`;
706
+ return u?.size === "sm" ? `${b}h-[32px]` : `${b}h-[38px]`;
707
707
  });
708
708
  }
709
- function Mt() {
709
+ function Rt() {
710
710
  return "rounded-md font-medium border-gray-200 border-solid disabled:pointer-events-none disabled:opacity-50 px-4 py-2 w-full bg-transparent border text-black text-sm h-[38px]";
711
711
  }
712
- function Ft() {
712
+ function Mt() {
713
713
  return "font-medium border-gray-200 border-solid disabled:pointer-events-none disabled:opacity-50 border h-7 rounded-md text-xs px-2 py-1 hover:bg-gray-100";
714
714
  }
715
- function Ee(t) {
716
- return t === "ghost" ? "inline-flex relative py-2 px-4 items-center gap-x-2 text-sm font-medium rounded-lg border border-transparent text-gray-600 hover:bg-blue-100 hover:text-gray-800 focus:outline-hidden focus:bg-gray-100 focus:text-gray-800 disabled:opacity-50 disabled:pointer-events-none dark:text-gray-500 dark:hover:bg-blue-800/30 dark:hover:text-blue-400 dark:focus:bg-blue-800/30 dark:focus:text-blue-400" : t === "soft" ? "inline-flex relative py-2 px-4 items-center gap-x-2 text-sm font-medium rounded-lg border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 hover:bg-gray-200 focus:outline-hidden focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:text-blue-400 dark:hover:bg-blue-900 dark:focus:bg-blue-900" : "relative border-solid border-gray-200 focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border-input hover:bg-gray-100 border px-4 py-2 gap-2 bg-transparent h-[38px]";
715
+ function Ee(u) {
716
+ return u === "ghost" ? "inline-flex relative py-2 px-4 items-center gap-x-2 text-sm font-medium rounded-lg border border-transparent text-gray-600 hover:bg-blue-100 hover:text-gray-800 focus:outline-hidden focus:bg-gray-100 focus:text-gray-800 disabled:opacity-50 disabled:pointer-events-none dark:text-gray-500 dark:hover:bg-blue-800/30 dark:hover:text-blue-400 dark:focus:bg-blue-800/30 dark:focus:text-blue-400" : u === "soft" ? "inline-flex relative py-2 px-4 items-center gap-x-2 text-sm font-medium rounded-lg border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 hover:bg-gray-200 focus:outline-hidden focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:text-blue-400 dark:hover:bg-blue-900 dark:focus:bg-blue-900" : "relative border-solid border-gray-200 focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border-input hover:bg-gray-100 border px-4 py-2 gap-2 bg-transparent h-[38px]";
717
717
  }
718
- const _t = {
718
+ const Ft = {
719
719
  key: 0,
720
720
  class: "block text-xs font-medium text-gray-600 mb-1"
721
721
  }, jt = ["placeholder", "disabled"], Kt = {
@@ -725,7 +725,7 @@ const _t = {
725
725
  key: 0,
726
726
  class: "block text-xs font-medium text-gray-600 mb-1"
727
727
  }, Et = ["placeholder", "disabled"], Tt = ["disabled"];
728
- const It = /* @__PURE__ */ U({
728
+ const It = /* @__PURE__ */ O({
729
729
  __name: "range-input",
730
730
  props: {
731
731
  id: {},
@@ -753,211 +753,211 @@ const It = /* @__PURE__ */ U({
753
753
  ua: {}
754
754
  },
755
755
  emits: ["update:modelValue", "change", "clear"],
756
- setup(t, { expose: n, emit: v }) {
757
- const l = Le(), r = Mt(), a = re(), b = t, o = S(
758
- b.modelValue ?? b.default ?? []
759
- ), f = v, p = E({
760
- get: () => b.modelValue ?? o.value,
761
- set: (h) => {
762
- b.modelValue !== void 0 ? f("update:modelValue", h) : o.value = h;
756
+ setup(u, { expose: o, emit: b }) {
757
+ const t = Le(), n = Rt(), l = re(), x = u, a = $(
758
+ x.modelValue ?? x.default ?? []
759
+ ), v = b, m = E({
760
+ get: () => x.modelValue ?? a.value,
761
+ set: (c) => {
762
+ x.modelValue !== void 0 ? v("update:modelValue", c) : a.value = c;
763
763
  }
764
764
  });
765
- function y() {
766
- f("change", { name: b.name, value: p.value || o.value });
765
+ function p() {
766
+ v("change", { name: x.name, value: m.value || a.value });
767
767
  }
768
- function i() {
769
- o.value = [], p.value = o.value, f("clear", b.name);
768
+ function r() {
769
+ a.value = [], m.value = a.value, v("clear", x.name);
770
770
  }
771
- return F(() => b.modelValue, (h) => {
772
- h !== void 0 && b.layout !== "popover" ? (o.value = h, f("update:modelValue", h)) : o.value = [];
773
- }), n({
774
- clear: i,
775
- currentValue: p
776
- }), (h, k) => (c(), w(j, null, [
777
- u("div", null, [
778
- u("div", {
779
- class: _(t.layout === "vertical" ? "inline-flex items-center gap-2" : "space-y-3 p-2")
771
+ return M(() => x.modelValue, (c) => {
772
+ c !== void 0 && x.layout !== "popover" ? (a.value = c, v("update:modelValue", c)) : a.value = [];
773
+ }), o({
774
+ clear: r,
775
+ currentValue: m
776
+ }), (c, C) => (f(), _(F, null, [
777
+ d("div", null, [
778
+ d("div", {
779
+ class: K(c.layout === "vertical" ? "inline-flex items-center gap-2" : "space-y-3 p-2")
780
780
  }, [
781
- u("div", null, [
782
- t.layout !== "vertical" ? (c(), w("label", _t, A(e(a)("filter.from")), 1)) : $("", !0),
783
- I(u("input", {
781
+ d("div", null, [
782
+ c.layout !== "vertical" ? (f(), _("label", Ft, S(e(l)("filter.from")), 1)) : V("", !0),
783
+ U(d("input", {
784
784
  type: "number",
785
- class: _(e(l)),
786
- placeholder: t.placeholder?.[0] ?? "min",
785
+ class: K(e(t)),
786
+ placeholder: c.placeholder?.[0] ?? "min",
787
787
  step: "1",
788
788
  style: { outline: "none" },
789
- "onUpdate:modelValue": k[0] || (k[0] = (V) => p.value[0] = V),
790
- disabled: t.disabled
789
+ "onUpdate:modelValue": C[0] || (C[0] = (k) => m.value[0] = k),
790
+ disabled: c.disabled
791
791
  }, null, 10, jt), [
792
- [Q, p.value[0]]
792
+ [H, m.value[0]]
793
793
  ])
794
794
  ]),
795
- t.layout === "vertical" ? (c(), w("label", Kt, " - ")) : $("", !0),
796
- u("div", null, [
797
- t.layout !== "vertical" ? (c(), w("label", Lt, A(e(a)("filter.to")), 1)) : $("", !0),
798
- I(u("input", {
795
+ c.layout === "vertical" ? (f(), _("label", Kt, " - ")) : V("", !0),
796
+ d("div", null, [
797
+ c.layout !== "vertical" ? (f(), _("label", Lt, S(e(l)("filter.to")), 1)) : V("", !0),
798
+ U(d("input", {
799
799
  type: "number",
800
- class: _(e(l)),
801
- placeholder: t.placeholder?.[1] ?? "max",
800
+ class: K(e(t)),
801
+ placeholder: c.placeholder?.[1] ?? "max",
802
802
  min: "0",
803
803
  max: "1000000000000000",
804
804
  step: "1",
805
805
  style: { outline: "none" },
806
- "onUpdate:modelValue": k[1] || (k[1] = (V) => p.value[1] = V),
807
- disabled: t.disabled
806
+ "onUpdate:modelValue": C[1] || (C[1] = (k) => m.value[1] = k),
807
+ disabled: c.disabled
808
808
  }, null, 10, Et), [
809
- [Q, p.value[1]]
809
+ [H, m.value[1]]
810
810
  ])
811
811
  ]),
812
- ["popover", "inline", "vertical"].includes(t.layout) ? (c(), w("button", {
812
+ ["popover", "inline", "vertical"].includes(c.layout) ? (f(), _("button", {
813
813
  key: 1,
814
- onClick: y,
815
- class: _(e(r) + (t.layout === "vertical" ? " w-[50px]" : " bg-blue-100 hover:bg-blue-200"))
816
- }, A(t.layout === "vertical" ? "Ok" : e(a)("filter.apply")), 3)) : $("", !0),
817
- ["popover", "inline"].includes(t.layout) ? (c(), w("button", {
814
+ onClick: p,
815
+ class: K(e(n) + (c.layout === "vertical" ? " w-[50px]" : " bg-blue-100 hover:bg-blue-200"))
816
+ }, S(c.layout === "vertical" ? "Ok" : e(l)("filter.apply")), 3)) : V("", !0),
817
+ ["popover", "inline"].includes(c.layout) ? (f(), _("button", {
818
818
  key: 2,
819
- disabled: !(p.value[0] || p.value[1]),
820
- onClick: i,
821
- class: _(e(r) + " hover:bg-gray-100")
822
- }, A(e(a)("filter.clear")), 11, Tt)) : $("", !0)
819
+ disabled: !(m.value[0] || m.value[1]),
820
+ onClick: r,
821
+ class: K(e(n) + " hover:bg-gray-100")
822
+ }, S(e(l)("filter.clear")), 11, Tt)) : V("", !0)
823
823
  ], 2)
824
824
  ]),
825
- (t.cleanable && o.value.length, $("", !0))
825
+ (c.cleanable && a.value.length, V("", !0))
826
826
  ], 64));
827
827
  }
828
828
  });
829
- function Ut(t) {
830
- return String(t).charAt(0).toUpperCase() + String(t).slice(1);
829
+ function Ut(u) {
830
+ return String(u).charAt(0).toUpperCase() + String(u).slice(1);
831
831
  }
832
- class N {
833
- static format(n) {
834
- const v = n.getFullYear(), l = (n.getMonth() + 1).toString().padStart(2, "0"), r = n.getDate().toString().padStart(2, "0");
835
- return `${v}-${l}-${r}`;
836
- }
837
- static getShiftedDay(n, v = 0) {
838
- const l = n ? new Date(n) : /* @__PURE__ */ new Date();
839
- return l.setDate(l.getDate() + v), this.format(l);
840
- }
841
- static getLastWeekRange(n, v, l = 0) {
842
- if (n && v) {
843
- const p = new Date(n), y = new Date(v);
844
- return p.setDate(p.getDate() + l * 7), y.setDate(y.getDate() + l * 7), [this.format(p), this.format(y)];
832
+ class Y {
833
+ static format(o) {
834
+ const b = o.getFullYear(), t = (o.getMonth() + 1).toString().padStart(2, "0"), n = o.getDate().toString().padStart(2, "0");
835
+ return `${b}-${t}-${n}`;
836
+ }
837
+ static getShiftedDay(o, b = 0) {
838
+ const t = o ? new Date(o) : /* @__PURE__ */ new Date();
839
+ return t.setDate(t.getDate() + b), this.format(t);
840
+ }
841
+ static getLastWeekRange(o, b, t = 0) {
842
+ if (o && b) {
843
+ const m = new Date(o), p = new Date(b);
844
+ return m.setDate(m.getDate() + t * 7), p.setDate(p.getDate() + t * 7), [this.format(m), this.format(p)];
845
845
  }
846
- const r = /* @__PURE__ */ new Date(), a = r.getDay(), b = a === 0 ? 13 : a - 1 + 7, o = new Date(r);
847
- o.setDate(r.getDate() - b + l * 7);
848
- const f = new Date(o);
849
- return f.setDate(o.getDate() + 6), [this.format(o), this.format(f)];
850
- }
851
- static getMonthRange(n, v, l = 0) {
852
- let r;
853
- n ? r = new Date(n) : r = /* @__PURE__ */ new Date(), r = new Date(r.getFullYear(), r.getMonth() + l, 1);
854
- const a = r, b = new Date(r.getFullYear(), r.getMonth() + 1, 0);
855
- return [this.format(a), this.format(b)];
856
- }
857
- static getQuarterRange(n, v, l = 0) {
858
- const r = n || v, a = r ? new Date(r) : /* @__PURE__ */ new Date();
859
- let b = Math.floor(a.getMonth() / 3);
860
- b += l;
861
- const o = (b % 4 + 4) % 4 * 3, f = a.getFullYear() + Math.floor(b / 4), p = new Date(f, o, 1), y = new Date(f, o + 3, 0);
862
- return [this.format(p), this.format(y)];
863
- }
864
- static getYear(n, v = 0) {
865
- let l;
866
- return n && /^\d{4}$/.test(n) ? l = parseInt(n, 10) : n ? l = new Date(n).getFullYear() : l = (/* @__PURE__ */ new Date()).getFullYear(), String(l + v);
867
- }
868
- static getYearRange(n, v = 0) {
869
- let l;
870
- return n && /^\d{4}$/.test(n) ? l = parseInt(n, 10) : n ? l = new Date(n).getFullYear() : l = (/* @__PURE__ */ new Date()).getFullYear(), [
871
- this.format(new Date(l + v, 0, 1)),
872
- this.format(new Date(l + v + 1, 0, 0))
846
+ const n = /* @__PURE__ */ new Date(), l = n.getDay(), x = l === 0 ? 13 : l - 1 + 7, a = new Date(n);
847
+ a.setDate(n.getDate() - x + t * 7);
848
+ const v = new Date(a);
849
+ return v.setDate(a.getDate() + 6), [this.format(a), this.format(v)];
850
+ }
851
+ static getMonthRange(o, b, t = 0) {
852
+ let n;
853
+ o ? n = new Date(o) : n = /* @__PURE__ */ new Date(), n = new Date(n.getFullYear(), n.getMonth() + t, 1);
854
+ const l = n, x = new Date(n.getFullYear(), n.getMonth() + 1, 0);
855
+ return [this.format(l), this.format(x)];
856
+ }
857
+ static getQuarterRange(o, b, t = 0) {
858
+ const n = o || b, l = n ? new Date(n) : /* @__PURE__ */ new Date();
859
+ let x = Math.floor(l.getMonth() / 3);
860
+ x += t;
861
+ const a = (x % 4 + 4) % 4 * 3, v = l.getFullYear() + Math.floor(x / 4), m = new Date(v, a, 1), p = new Date(v, a + 3, 0);
862
+ return [this.format(m), this.format(p)];
863
+ }
864
+ static getYear(o, b = 0) {
865
+ let t;
866
+ return o && /^\d{4}$/.test(o) ? t = parseInt(o, 10) : o ? t = new Date(o).getFullYear() : t = (/* @__PURE__ */ new Date()).getFullYear(), String(t + b);
867
+ }
868
+ static getYearRange(o, b = 0) {
869
+ let t;
870
+ return o && /^\d{4}$/.test(o) ? t = parseInt(o, 10) : o ? t = new Date(o).getFullYear() : t = (/* @__PURE__ */ new Date()).getFullYear(), [
871
+ this.format(new Date(t + b, 0, 1)),
872
+ this.format(new Date(t + b + 1, 0, 0))
873
873
  ];
874
874
  }
875
- static getRangeFromDaysBefore(n) {
876
- const v = /* @__PURE__ */ new Date(), l = new Date(v.getTime());
877
- return l.setDate(v.getDate() - n), [this.format(l), this.format(v)];
875
+ static getRangeFromDaysBefore(o) {
876
+ const b = /* @__PURE__ */ new Date(), t = new Date(b.getTime());
877
+ return t.setDate(b.getDate() - o), [this.format(t), this.format(b)];
878
878
  }
879
879
  }
880
- function Te(t, n) {
880
+ function Te(u, o) {
881
881
  const {
882
- popoverRef: v
883
- } = t, l = re(), r = S(""), a = S(
884
- t.modelValue ?? t.default ?? []
885
- ), b = S(0);
886
- function o() {
887
- const g = N.getRangeFromDaysBefore(b.value);
888
- return a.value = [...g], n("change", { name: t.name, value: a.value }), n("update:modelValue", a.value), g;
889
- }
890
- function f(g) {
891
- r.value = g, v.value?.close();
892
- const C = [];
893
- switch (r.value) {
882
+ popoverRef: b
883
+ } = u, t = re(), n = $(""), l = $(
884
+ u.modelValue ?? u.default ?? []
885
+ ), x = $(0);
886
+ function a() {
887
+ const h = Y.getRangeFromDaysBefore(x.value);
888
+ return l.value = [...h], o("change", { name: u.name, value: l.value }), o("update:modelValue", l.value), h;
889
+ }
890
+ function v(h) {
891
+ n.value = h, b.value?.close();
892
+ const y = [];
893
+ switch (n.value) {
894
894
  case "today":
895
- C.push(N.getShiftedDay()), C.push(N.getShiftedDay());
895
+ y.push(Y.getShiftedDay()), y.push(Y.getShiftedDay());
896
896
  break;
897
897
  case "week":
898
- C.push(...N.getLastWeekRange());
898
+ y.push(...Y.getLastWeekRange());
899
899
  break;
900
900
  case "month":
901
- C.push(...N.getMonthRange());
901
+ y.push(...Y.getMonthRange());
902
902
  break;
903
903
  case "quarter":
904
- C.push(...N.getQuarterRange());
904
+ y.push(...Y.getQuarterRange());
905
905
  break;
906
906
  case "year":
907
- C.push(...N.getYearRange());
907
+ y.push(...Y.getYearRange());
908
908
  break;
909
909
  case "last_7_days":
910
- b.value = 7, o();
910
+ x.value = 7, a();
911
911
  break;
912
912
  case "range":
913
- b.value = 7, C.push(...o());
913
+ x.value = 7, y.push(...a());
914
914
  break;
915
915
  }
916
- a.value = [...C], n("change", { name: t.name, value: a.value }), n("update:modelValue", a.value);
916
+ l.value = [...y], o("change", { name: u.name, value: l.value }), o("update:modelValue", l.value);
917
917
  }
918
- function p() {
919
- const g = [];
920
- switch (r.value) {
918
+ function m() {
919
+ const h = [];
920
+ switch (n.value) {
921
921
  case "today":
922
- g.push(N.getShiftedDay(a.value[0], 1));
922
+ h.push(Y.getShiftedDay(l.value[0], 1));
923
923
  break;
924
924
  case "week":
925
- g.push(...N.getLastWeekRange(a.value[0], a.value[1], 1));
925
+ h.push(...Y.getLastWeekRange(l.value[0], l.value[1], 1));
926
926
  break;
927
927
  case "month":
928
- g.push(...N.getMonthRange(a.value[0], a.value[1], 1));
928
+ h.push(...Y.getMonthRange(l.value[0], l.value[1], 1));
929
929
  break;
930
930
  case "quarter":
931
- g.push(...N.getQuarterRange(a.value[0], a.value[1], 1));
931
+ h.push(...Y.getQuarterRange(l.value[0], l.value[1], 1));
932
932
  break;
933
933
  case "year":
934
- g.push(...N.getYearRange(a.value[0], 1));
934
+ h.push(...Y.getYearRange(l.value[0], 1));
935
935
  break;
936
936
  }
937
- a.value = [...g], n("change", { name: t.name, value: a.value }), n("update:modelValue", a.value);
937
+ l.value = [...h], o("change", { name: u.name, value: l.value }), o("update:modelValue", l.value);
938
938
  }
939
- function y() {
940
- const g = [];
941
- switch (r.value) {
939
+ function p() {
940
+ const h = [];
941
+ switch (n.value) {
942
942
  case "today":
943
- g.push(N.getShiftedDay(a.value[0], -1));
943
+ h.push(Y.getShiftedDay(l.value[0], -1));
944
944
  break;
945
945
  case "week":
946
- g.push(...N.getLastWeekRange(a.value[0], a.value[1], -1));
946
+ h.push(...Y.getLastWeekRange(l.value[0], l.value[1], -1));
947
947
  break;
948
948
  case "month":
949
- g.push(...N.getMonthRange(a.value[0], a.value[1], -1));
949
+ h.push(...Y.getMonthRange(l.value[0], l.value[1], -1));
950
950
  break;
951
951
  case "quarter":
952
- g.push(...N.getQuarterRange(a.value[0], a.value[1], -1));
952
+ h.push(...Y.getQuarterRange(l.value[0], l.value[1], -1));
953
953
  break;
954
954
  case "year":
955
- g.push(...N.getYearRange(a.value[0], -1));
955
+ h.push(...Y.getYearRange(l.value[0], -1));
956
956
  break;
957
957
  }
958
- a.value = [...g], n("change", { name: t.name, value: a.value }), n("update:modelValue", a.value);
958
+ l.value = [...h], o("change", { name: u.name, value: l.value }), o("update:modelValue", l.value);
959
959
  }
960
- const i = [
960
+ const r = [
961
961
  "Січень",
962
962
  "Лютий",
963
963
  "Березень",
@@ -971,59 +971,59 @@ function Te(t, n) {
971
971
  "Листопад",
972
972
  "Грудень"
973
973
  ];
974
- function h(g) {
975
- const [C, d, x] = g.split("-");
976
- return `${x}.${d}.${C}`;
974
+ function c(h) {
975
+ const [y, i, w] = h.split("-");
976
+ return `${w}.${i}.${y}`;
977
977
  }
978
- function k(g, C = "long") {
979
- const d = new Date(Date.UTC(2e3, g - 1, 1));
980
- return new Intl.DateTimeFormat(localStorage.locale, { month: C, timeZone: "UTC" }).format(d);
978
+ function C(h, y = "long") {
979
+ const i = new Date(Date.UTC(2e3, h - 1, 1));
980
+ return new Intl.DateTimeFormat(localStorage.locale, { month: y, timeZone: "UTC" }).format(i);
981
981
  }
982
- function V(g) {
983
- const { value: C } = a;
984
- switch (g) {
982
+ function k(h) {
983
+ const { value: y } = l;
984
+ switch (h) {
985
985
  case "today":
986
- return h(C[0]);
986
+ return c(y[0]);
987
987
  case "range":
988
988
  return "Період";
989
989
  case "week":
990
- return C[0] && C[1] ? `${h(C[0])} – ${h(C[1])}` : "";
990
+ return y[0] && y[1] ? `${c(y[0])} – ${c(y[1])}` : "";
991
991
  case "quarter":
992
- if (C[0]) {
993
- const d = new Date(C[0]), x = d.getFullYear(), B = d.getMonth();
994
- return `${Math.floor(B / 3) + 1} ${l("filter.quarter")} ${x}`;
992
+ if (y[0]) {
993
+ const i = new Date(y[0]), w = i.getFullYear(), D = i.getMonth();
994
+ return `${Math.floor(D / 3) + 1} ${t("filter.quarter")} ${w}`;
995
995
  }
996
996
  return "";
997
997
  case "month":
998
- if (C[0]) {
999
- const [d, x] = C[0].split("-");
1000
- return `${k(parseInt(x, 10))} ${d}`;
998
+ if (y[0]) {
999
+ const [i, w] = y[0].split("-");
1000
+ return `${C(parseInt(w, 10))} ${i}`;
1001
1001
  }
1002
1002
  return "";
1003
1003
  case "year":
1004
- return C[0] || "";
1004
+ return y[0] || "";
1005
1005
  case "last_7_days":
1006
1006
  return "За останні дні";
1007
1007
  default:
1008
- return t.label ?? "";
1008
+ return u.label ?? "";
1009
1009
  }
1010
1010
  }
1011
- const m = E(() => r.value ? V(r.value) : t.label ?? "");
1011
+ const g = E(() => n.value ? k(n.value) : u.label ?? "");
1012
1012
  function s() {
1013
- r.value = "", a.value = [], n("update:modelValue", []), n("clear", t.name);
1013
+ n.value = "", l.value = [], o("update:modelValue", []), o("clear", u.name);
1014
1014
  }
1015
1015
  return {
1016
- activeMode: r,
1017
- innerValue: a,
1018
- daysBefore: b,
1019
- onDaysBeforeChange: o,
1020
- onSelectChange: f,
1021
- nextClick: p,
1022
- prevClick: y,
1023
- ukMonths: i,
1024
- formatDisplayDate: h,
1025
- getModeLabel: V,
1026
- currentLabel: m,
1016
+ activeMode: n,
1017
+ innerValue: l,
1018
+ daysBefore: x,
1019
+ onDaysBeforeChange: a,
1020
+ onSelectChange: v,
1021
+ nextClick: m,
1022
+ prevClick: p,
1023
+ ukMonths: r,
1024
+ formatDisplayDate: c,
1025
+ getModeLabel: k,
1026
+ currentLabel: g,
1027
1027
  clear: s
1028
1028
  };
1029
1029
  }
@@ -1043,7 +1043,7 @@ const Ot = {
1043
1043
  key: 0,
1044
1044
  class: "block text-xs font-medium text-gray-600 mb-1"
1045
1045
  }, Ht = ["min", "disabled"], Gt = { class: "flex gap-1 pt-2" }, Xt = ["onClick"];
1046
- const Zt = /* @__PURE__ */ U({
1046
+ const Zt = /* @__PURE__ */ O({
1047
1047
  __name: "date-input",
1048
1048
  props: {
1049
1049
  id: {},
@@ -1071,241 +1071,241 @@ const Zt = /* @__PURE__ */ U({
1071
1071
  ua: {}
1072
1072
  },
1073
1073
  emits: ["update:modelValue", "change", "clear"],
1074
- setup(t, { expose: n, emit: v }) {
1075
- const l = t, r = Le(), a = Ft(), b = v, o = S(null), {
1076
- activeMode: f,
1077
- innerValue: p,
1078
- onSelectChange: y,
1079
- nextClick: i,
1080
- prevClick: h,
1081
- clear: k
1074
+ setup(u, { expose: o, emit: b }) {
1075
+ const t = u, n = Le(), l = Mt(), x = b, a = $(null), {
1076
+ activeMode: v,
1077
+ innerValue: m,
1078
+ onSelectChange: p,
1079
+ nextClick: r,
1080
+ prevClick: c,
1081
+ clear: C
1082
1082
  } = Te({
1083
- ...l,
1084
- popoverRef: o
1085
- }, b);
1086
- return F(() => l.modelValue, (V) => {
1087
- V !== void 0 ? (p.value = V, b("update:modelValue", V)) : (f.value = "", p.value = []);
1088
- }), n({
1089
- clear: k,
1090
- popoverRef: o
1091
- }), (V, m) => (c(), w(j, null, [
1092
- t.layout === "inline" ? (c(), w("div", Ot, [
1093
- e(f) !== "" && e(f) === "range" ? (c(), w("div", zt, [
1094
- I(u("input", {
1083
+ ...t,
1084
+ popoverRef: a
1085
+ }, x);
1086
+ return M(() => t.modelValue, (k) => {
1087
+ k !== void 0 ? (m.value = k, x("update:modelValue", k)) : (v.value = "", m.value = []);
1088
+ }), o({
1089
+ clear: C,
1090
+ popoverRef: a
1091
+ }), (k, g) => (f(), _(F, null, [
1092
+ k.layout === "inline" ? (f(), _("div", Ot, [
1093
+ e(v) !== "" && e(v) === "range" ? (f(), _("div", zt, [
1094
+ U(d("input", {
1095
1095
  type: "date",
1096
- max: e(p)[1],
1096
+ max: e(m)[1],
1097
1097
  locale: "uk-UA",
1098
- "onUpdate:modelValue": m[0] || (m[0] = (s) => e(p)[0] = s),
1098
+ "onUpdate:modelValue": g[0] || (g[0] = (s) => e(m)[0] = s),
1099
1099
  class: "px-2 p-0 border text-[12px] max-w-[calc(50%-5px)] h-[38px] rounded-lg focus:outline-blue-600",
1100
- disabled: t.disabled
1100
+ disabled: k.disabled
1101
1101
  }, null, 8, Nt), [
1102
- [Q, e(p)[0]]
1102
+ [H, e(m)[0]]
1103
1103
  ]),
1104
- I(u("input", {
1104
+ U(d("input", {
1105
1105
  type: "date",
1106
- min: e(p)[0],
1106
+ min: e(m)[0],
1107
1107
  locale: "uk-UA",
1108
- "onUpdate:modelValue": m[1] || (m[1] = (s) => e(p)[1] = s),
1108
+ "onUpdate:modelValue": g[1] || (g[1] = (s) => e(m)[1] = s),
1109
1109
  class: "px-2 p-0 border text-[12px] max-w-[calc(50%-5px)] h-[38px] rounded-lg focus:outline-blue-600 appearance-auto",
1110
- disabled: t.disabled
1110
+ disabled: k.disabled
1111
1111
  }, null, 8, Yt), [
1112
- [Q, e(p)[1]]
1112
+ [H, e(m)[1]]
1113
1113
  ])
1114
- ])) : $("", !0)
1115
- ])) : $("", !0),
1116
- u("div", {
1117
- class: _(t.layout === "popover" ? "space-y-3 p-2" : "flex items-center gap-2")
1114
+ ])) : V("", !0)
1115
+ ])) : V("", !0),
1116
+ d("div", {
1117
+ class: K(k.layout === "popover" ? "space-y-3 p-2" : "flex items-center gap-2")
1118
1118
  }, [
1119
- u("div", {
1120
- class: _(t.layout !== "popover" ? "w-[48%]" : "")
1119
+ d("div", {
1120
+ class: K(k.layout !== "popover" ? "w-[48%]" : "")
1121
1121
  }, [
1122
- t.layout === "popover" ? (c(), w("label", Pt, "Від")) : $("", !0),
1123
- I(u("input", {
1122
+ k.layout === "popover" ? (f(), _("label", Pt, "Від")) : V("", !0),
1123
+ U(d("input", {
1124
1124
  type: "date",
1125
- max: e(p)[1],
1125
+ max: e(m)[1],
1126
1126
  locale: "uk-UA",
1127
- "onUpdate:modelValue": m[2] || (m[2] = (s) => e(p)[0] = s),
1128
- class: _(e(r)),
1129
- disabled: t.disabled
1127
+ "onUpdate:modelValue": g[2] || (g[2] = (s) => e(m)[0] = s),
1128
+ class: K(e(n)),
1129
+ disabled: k.disabled
1130
1130
  }, null, 10, qt), [
1131
- [Q, e(p)[0]]
1131
+ [H, e(m)[0]]
1132
1132
  ])
1133
1133
  ], 2),
1134
- t.layout !== "popover" ? (c(), w("label", Wt, " - ")) : $("", !0),
1135
- u("div", {
1136
- class: _(t.layout !== "popover" ? "w-[48%]" : "")
1134
+ k.layout !== "popover" ? (f(), _("label", Wt, " - ")) : V("", !0),
1135
+ d("div", {
1136
+ class: K(k.layout !== "popover" ? "w-[48%]" : "")
1137
1137
  }, [
1138
- t.layout === "popover" ? (c(), w("label", Qt, "До")) : $("", !0),
1139
- I(u("input", {
1138
+ k.layout === "popover" ? (f(), _("label", Qt, "До")) : V("", !0),
1139
+ U(d("input", {
1140
1140
  type: "date",
1141
- min: e(p)[0],
1141
+ min: e(m)[0],
1142
1142
  locale: "uk-UA",
1143
- "onUpdate:modelValue": m[3] || (m[3] = (s) => e(p)[1] = s),
1144
- class: _(e(r)),
1145
- disabled: t.disabled
1143
+ "onUpdate:modelValue": g[3] || (g[3] = (s) => e(m)[1] = s),
1144
+ class: K(e(n)),
1145
+ disabled: k.disabled
1146
1146
  }, null, 10, Ht), [
1147
- [Q, e(p)[1]]
1147
+ [H, e(m)[1]]
1148
1148
  ])
1149
1149
  ], 2)
1150
1150
  ], 2),
1151
- u("div", Gt, [
1152
- (c(), w(j, null, q(["today", "week", "month", "quarter", "year"], (s) => u("button", {
1151
+ d("div", Gt, [
1152
+ (f(), _(F, null, W(["today", "week", "month", "quarter", "year"], (s) => d("button", {
1153
1153
  key: s,
1154
- class: _(e(a) + (e(f) === s ? " bg-blue-100" : "")),
1155
- onClick: (g) => e(y)(s)
1156
- }, A(e(Ut)(s)), 11, Xt)), 64)),
1157
- u("button", {
1158
- class: _(e(a)),
1159
- onClick: m[4] || (m[4] = //@ts-ignore
1160
- (...s) => e(h) && e(h)(...s))
1154
+ class: K(e(l) + (e(v) === s ? " bg-blue-100" : "")),
1155
+ onClick: (h) => e(p)(s)
1156
+ }, S(e(Ut)(s)), 11, Xt)), 64)),
1157
+ d("button", {
1158
+ class: K(e(l)),
1159
+ onClick: g[4] || (g[4] = //@ts-ignore
1160
+ (...s) => e(c) && e(c)(...s))
1161
1161
  }, " <", 2),
1162
- u("button", {
1163
- class: _(e(a)),
1164
- onClick: m[5] || (m[5] = //@ts-ignore
1165
- (...s) => e(i) && e(i)(...s))
1162
+ d("button", {
1163
+ class: K(e(l)),
1164
+ onClick: g[5] || (g[5] = //@ts-ignore
1165
+ (...s) => e(r) && e(r)(...s))
1166
1166
  }, " >", 2)
1167
1167
  ]),
1168
- (t.cleanable, $("", !0))
1168
+ (k.cleanable, V("", !0))
1169
1169
  ], 64));
1170
1170
  }
1171
1171
  });
1172
- function Jt(t, n) {
1172
+ function Jt(u, o) {
1173
1173
  const {
1174
- api: v,
1175
- options: l = [],
1176
- limit: r = 20,
1177
- dataKey: a = "data"
1178
- } = t, b = t.multi;
1179
- function o(D) {
1180
- return b ? Array.isArray(D) ? D : D ? [D] : [] : Array.isArray(D) ? D[0] : D;
1181
- }
1182
- const f = S(o(t.modelValue)), p = S(""), y = S(!1), i = S(l), h = S("id"), k = S("text"), V = S(!1), m = S(t.layout !== "popover" && l.length > r), s = S([]), g = S(0);
1183
- function C(D) {
1184
- const O = D.find(Boolean) ?? {}, W = ["id", "value", "code", "key"].find((oe) => oe in O) ?? "id", ne = ["text", "label", "name", "title"].find((oe) => oe in O) ?? "text";
1185
- return { autoValueKey: W, autoLabelKey: ne };
1186
- }
1187
- if (l.length > 0) {
1188
- const D = C(l);
1189
- h.value = D.autoValueKey, k.value = D.autoLabelKey;
1190
- }
1191
- const d = E(() => {
1192
- if (v) return i.value;
1193
- const D = i.value;
1194
- if (t.layout === "popover") return D;
1195
- if (!p.value)
1196
- return V.value ? D : D.slice(0, r);
1197
- const O = p.value.toLowerCase();
1198
- return D.filter((W) => W[k.value].toLowerCase().includes(O));
1174
+ api: b,
1175
+ options: t = [],
1176
+ limit: n = 20,
1177
+ dataKey: l = "data"
1178
+ } = u, x = u.multi;
1179
+ function a(A) {
1180
+ return x ? Array.isArray(A) ? A : A ? [A] : [] : Array.isArray(A) ? A[0] : A;
1181
+ }
1182
+ const v = $(a(u.modelValue)), m = $(""), p = $(!1), r = $(t), c = $("id"), C = $("text"), k = $(!1), g = $(u.layout !== "popover" && t.length > n), s = $([]), h = $(0);
1183
+ function y(A) {
1184
+ const z = A.find(Boolean) ?? {}, Q = ["id", "value", "code", "key"].find((ne) => ne in z) ?? "id", ae = ["text", "label", "name", "title"].find((ne) => ne in z) ?? "text";
1185
+ return { autoValueKey: Q, autoLabelKey: ae };
1186
+ }
1187
+ if (t.length > 0) {
1188
+ const A = y(t);
1189
+ c.value = A.autoValueKey, C.value = A.autoLabelKey;
1190
+ }
1191
+ const i = E(() => {
1192
+ if (b) return r.value;
1193
+ const A = r.value;
1194
+ if (u.layout === "popover") return A;
1195
+ if (!m.value)
1196
+ return k.value ? A : A.slice(0, n);
1197
+ const z = m.value.toLowerCase();
1198
+ return A.filter((Q) => Q[C.value].toLowerCase().includes(z));
1199
1199
  });
1200
- let x = null;
1201
- async function B(D) {
1202
- if (v) {
1203
- y.value = !0;
1200
+ let w = null;
1201
+ async function D(A) {
1202
+ if (b) {
1203
+ p.value = !0;
1204
1204
  try {
1205
- const O = new URL(v, window.location.origin);
1206
- O.searchParams.set("json", "1"), O.searchParams.set("key", D), O.searchParams.set("limit", r.toString());
1207
- const W = await fetch(O.toString());
1208
- if (!W.ok) {
1209
- we({ type: "error", title: "Error", message: "Failed to fetch remote options" }), i.value = [];
1205
+ const z = new URL(b, window.location.origin);
1206
+ z.searchParams.set("json", "1"), z.searchParams.set("key", A), z.searchParams.set("limit", n.toString());
1207
+ const Q = await fetch(z.toString());
1208
+ if (!Q.ok) {
1209
+ we({ type: "error", title: "Error", message: "Failed to fetch remote options" }), r.value = [];
1210
1210
  return;
1211
1211
  }
1212
- const ne = await W.json();
1213
- if (!ne[a]) {
1214
- we({ type: "error", title: "Error", message: ne }), i.value = [];
1212
+ const ae = await Q.json();
1213
+ if (!ae[l]) {
1214
+ we({ type: "error", title: "Error", message: ae }), r.value = [];
1215
1215
  return;
1216
1216
  }
1217
- if (i.value = ne[a], i.value.length > 0) {
1218
- const oe = C(i.value);
1219
- h.value = oe.autoValueKey, k.value = oe.autoLabelKey;
1217
+ if (r.value = ae[l], r.value.length > 0) {
1218
+ const ne = y(r.value);
1219
+ c.value = ne.autoValueKey, C.value = ne.autoLabelKey;
1220
1220
  }
1221
- g.value = ne.total;
1222
- } catch (O) {
1223
- console.error("Failed to fetch remote options:", O);
1221
+ h.value = ae.total;
1222
+ } catch (z) {
1223
+ console.error("Failed to fetch remote options:", z);
1224
1224
  } finally {
1225
- y.value = !1;
1225
+ p.value = !1;
1226
1226
  }
1227
1227
  }
1228
1228
  }
1229
- F(p, (D) => {
1230
- v && (x && clearTimeout(x), x = setTimeout(() => {
1231
- B(D);
1229
+ M(m, (A) => {
1230
+ b && (w && clearTimeout(w), w = setTimeout(() => {
1231
+ D(A);
1232
1232
  }, 200));
1233
- }), F(() => t.modelValue, (D) => {
1234
- f.value = o(D);
1233
+ }), M(() => u.modelValue, (A) => {
1234
+ v.value = a(A);
1235
1235
  }, { immediate: !0 });
1236
- function R(D) {
1237
- return b && Array.isArray(f.value) ? f.value.includes(D[h.value]) : f.value && f.value === D[h.value];
1236
+ function B(A) {
1237
+ return x && Array.isArray(v.value) ? v.value.includes(A[c.value]) : v.value && v.value === A[c.value];
1238
1238
  }
1239
- function K(D) {
1240
- if (b && !Array.isArray(f.value) && (f.value = []), b && Array.isArray(f.value)) {
1241
- const O = f.value.includes(D[h.value]);
1242
- f.value = O ? f.value.filter((W) => W !== D[h.value]) : [...f.value, D[h.value]], s.value = O ? s.value.filter((W) => W !== D[k.value]) : [...s.value, D[k.value]];
1239
+ function j(A) {
1240
+ if (x && !Array.isArray(v.value) && (v.value = []), x && Array.isArray(v.value)) {
1241
+ const z = v.value.includes(A[c.value]);
1242
+ v.value = z ? v.value.filter((Q) => Q !== A[c.value]) : [...v.value, A[c.value]], s.value = z ? s.value.filter((Q) => Q !== A[C.value]) : [...s.value, A[C.value]];
1243
1243
  } else
1244
- f.value = D[h.value], s.value = D[k.value];
1245
- n("update:modelValue", f.value), n("change", { name: t.name, value: f.value });
1244
+ v.value = A[c.value], s.value = A[C.value];
1245
+ o("update:modelValue", v.value), o("change", { name: u.name, value: v.value });
1246
1246
  }
1247
- function X() {
1248
- b ? (f.value = [], s.value = []) : (f.value = void 0, s.value = []), n("update:modelValue", f.value), n("clear", t.name);
1247
+ function Z() {
1248
+ x ? (v.value = [], s.value = []) : (v.value = void 0, s.value = []), o("update:modelValue", v.value), o("clear", u.name);
1249
1249
  }
1250
- function ae() {
1251
- x && clearTimeout(x), p.value = "", V.value = !1;
1250
+ function oe() {
1251
+ w && clearTimeout(w), m.value = "", k.value = !1;
1252
1252
  }
1253
- function Z() {
1254
- V.value = !V.value;
1253
+ function T() {
1254
+ k.value = !k.value;
1255
1255
  }
1256
- me(() => {
1257
- x && clearTimeout(x);
1256
+ fe(() => {
1257
+ w && clearTimeout(w);
1258
1258
  });
1259
- const L = S(-1);
1260
- F(d, () => {
1261
- L.value = d.value.length > 0 ? 0 : -1;
1259
+ const L = $(-1);
1260
+ M(i, () => {
1261
+ L.value = i.value.length > 0 ? 0 : -1;
1262
1262
  });
1263
- function T(D) {
1264
- const O = d.value.length;
1265
- if (D.key === "ArrowDown")
1266
- D.preventDefault(), L.value = (L.value + 1) % O;
1267
- else if (D.key === "ArrowUp")
1268
- D.preventDefault(), L.value = (L.value - 1 + O) % O;
1269
- else if (D.key === "Enter" && (D.preventDefault(), L.value >= 0 && L.value < d.value.length)) {
1270
- const W = d.value[L.value];
1271
- K(W);
1263
+ function I(A) {
1264
+ const z = i.value.length;
1265
+ if (A.key === "ArrowDown")
1266
+ A.preventDefault(), L.value = (L.value + 1) % z;
1267
+ else if (A.key === "ArrowUp")
1268
+ A.preventDefault(), L.value = (L.value - 1 + z) % z;
1269
+ else if (A.key === "Enter" && (A.preventDefault(), L.value >= 0 && L.value < i.value.length)) {
1270
+ const Q = i.value[L.value];
1271
+ j(Q);
1272
1272
  }
1273
1273
  }
1274
1274
  function ie() {
1275
- v && i.value.length === 0 && p.value.length === 0 && B(p.value);
1275
+ b && r.value.length === 0 && m.value.length === 0 && D(m.value);
1276
1276
  }
1277
1277
  return {
1278
- innerValue: f,
1279
- searchTerm: p,
1280
- filteredOptions: d,
1281
- isSelected: R,
1282
- selectItem: K,
1283
- clear: X,
1284
- resetSearch: ae,
1285
- toggleShowAll: Z,
1286
- isReqProc: y,
1287
- showAll: V,
1288
- isEnableShowAll: m,
1289
- labelKey: k,
1290
- valueKey: h,
1291
- allOptions: i,
1278
+ innerValue: v,
1279
+ searchTerm: m,
1280
+ filteredOptions: i,
1281
+ isSelected: B,
1282
+ selectItem: j,
1283
+ clear: Z,
1284
+ resetSearch: oe,
1285
+ toggleShowAll: T,
1286
+ isReqProc: p,
1287
+ showAll: k,
1288
+ isEnableShowAll: g,
1289
+ labelKey: C,
1290
+ valueKey: c,
1291
+ allOptions: r,
1292
1292
  highlightedIndex: L,
1293
- onKeyDown: T,
1293
+ onKeyDown: I,
1294
1294
  selectedLabels: s,
1295
- totalCount: g,
1295
+ totalCount: h,
1296
1296
  loadData: ie
1297
1297
  };
1298
1298
  }
1299
1299
  const el = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relative justify-center" }, tl = ["placeholder"], ll = {
1300
1300
  key: 0,
1301
1301
  class: "w-full"
1302
- }, al = { class: "flex flex-col items-center justify-center p-5 text-center" }, nl = { class: "max-w-sm mx-auto mt-6" }, ol = { class: "font-medium text-gray-800 dark:text-neutral-200" }, rl = {
1302
+ }, ol = { class: "flex flex-col items-center justify-center p-5 text-center" }, al = { class: "max-w-sm mx-auto mt-6" }, nl = { class: "font-medium text-gray-800 dark:text-neutral-200" }, rl = {
1303
1303
  key: 0,
1304
1304
  class: "flex justify-between p-2 border-t bg-gray-50 text-xs text-gray-500"
1305
1305
  }, sl = {
1306
1306
  key: 1,
1307
1307
  class: "flex justify-between items-center text-xs text-gray-500 p-1 border-t"
1308
- }, il = /* @__PURE__ */ U({
1308
+ }, il = /* @__PURE__ */ O({
1309
1309
  __name: "select",
1310
1310
  props: {
1311
1311
  id: {},
@@ -1333,154 +1333,154 @@ const el = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
1333
1333
  ua: {}
1334
1334
  },
1335
1335
  emits: ["update:modelValue", "change", "clear"],
1336
- setup(t, { expose: n, emit: v }) {
1337
- const l = re(), r = t, a = v, b = S(null), {
1338
- innerValue: o,
1339
- filteredOptions: f,
1340
- isSelected: p,
1341
- selectItem: y,
1342
- clear: i,
1343
- resetSearch: h,
1344
- toggleShowAll: k,
1345
- isReqProc: V,
1346
- showAll: m,
1336
+ setup(u, { expose: o, emit: b }) {
1337
+ const t = re(), n = u, l = b, x = $(null), {
1338
+ innerValue: a,
1339
+ filteredOptions: v,
1340
+ isSelected: m,
1341
+ selectItem: p,
1342
+ clear: r,
1343
+ resetSearch: c,
1344
+ toggleShowAll: C,
1345
+ isReqProc: k,
1346
+ showAll: g,
1347
1347
  isEnableShowAll: s,
1348
- searchTerm: g,
1349
- labelKey: C,
1350
- valueKey: d,
1351
- highlightedIndex: x,
1352
- onKeyDown: B,
1353
- selectedLabels: R,
1354
- totalCount: K,
1355
- loadData: X
1348
+ searchTerm: h,
1349
+ labelKey: y,
1350
+ valueKey: i,
1351
+ highlightedIndex: w,
1352
+ onKeyDown: D,
1353
+ selectedLabels: B,
1354
+ totalCount: j,
1355
+ loadData: Z
1356
1356
  } = Jt({
1357
- ...r,
1358
- modelValue: r.modelValue
1359
- }, a);
1357
+ ...n,
1358
+ modelValue: n.modelValue
1359
+ }, l);
1360
1360
  ue(() => {
1361
- h(), r.layout !== "inline" && (X(), b.value && r.layout === "popover" && b.value.focus());
1362
- }), F(
1363
- () => r.modelValue,
1364
- (Z) => {
1365
- Z === void 0 && (r.multi ? o.value = [] : o.value = void 0);
1361
+ c(), n.layout !== "inline" && (Z(), x.value && n.layout === "popover" && x.value.focus());
1362
+ }), M(
1363
+ () => n.modelValue,
1364
+ (T) => {
1365
+ T === void 0 && (n.multi ? a.value = [] : a.value = void 0);
1366
1366
  }
1367
1367
  );
1368
- const ae = S([]);
1369
- return F(x, (Z) => {
1370
- Z >= 0 && ae.value[Z] && ae.value[Z]?.scrollIntoView({
1368
+ const oe = $([]);
1369
+ return M(w, (T) => {
1370
+ T >= 0 && oe.value[T] && oe.value[T]?.scrollIntoView({
1371
1371
  block: "nearest",
1372
1372
  behavior: "smooth"
1373
1373
  });
1374
- }), F(f, () => {
1375
- ae.value = [];
1376
- }), n({
1377
- clear: i,
1378
- inputTextRef: b,
1379
- selectedLabels: R,
1380
- loadData: X
1381
- }), (Z, L) => (c(), w("div", {
1382
- class: _([t.layout === "popover" ? "flex flex-col h-full" : "flex flex-col vs-filter-checkbox space-y-0.5"])
1374
+ }), M(v, () => {
1375
+ oe.value = [];
1376
+ }), o({
1377
+ clear: r,
1378
+ inputTextRef: x,
1379
+ selectedLabels: B,
1380
+ loadData: Z
1381
+ }), (T, L) => (f(), _("div", {
1382
+ class: K([T.layout === "popover" ? "flex flex-col h-full" : "flex flex-col vs-filter-checkbox space-y-0.5"])
1383
1383
  }, [
1384
- u("div", el, [
1385
- I(u("input", {
1386
- "onUpdate:modelValue": L[0] || (L[0] = (T) => ze(g) ? g.value = T : null),
1384
+ d("div", el, [
1385
+ U(d("input", {
1386
+ "onUpdate:modelValue": L[0] || (L[0] = (I) => ze(h) ? h.value = I : null),
1387
1387
  onKeydown: L[1] || (L[1] = //@ts-ignore
1388
- (...T) => e(B) && e(B)(...T)),
1388
+ (...I) => e(D) && e(D)(...I)),
1389
1389
  class: "w-full h-full text-[13px] px-4 border rounded-sm pl-9 focus:outline-none focus:ring-ring focus:ring-1 focus:ring-blue-500 text-gray-700",
1390
- placeholder: e(l)("filter.search"),
1390
+ placeholder: e(t)("filter.search"),
1391
1391
  type: "text",
1392
1392
  ref_key: "inputTextRef",
1393
- ref: b
1393
+ ref: x
1394
1394
  }, null, 40, tl), [
1395
- [Q, e(g)]
1395
+ [H, e(h)]
1396
1396
  ]),
1397
- Y(je, { class: "absolute text-gray-400 -translate-y-1/2 left-4 top-1/2" }),
1398
- e(g) != "" ? (c(), M(Ke, {
1397
+ P(Fe, { class: "absolute text-gray-400 -translate-y-1/2 left-4 top-1/2" }),
1398
+ e(h) != "" ? (f(), R(je, {
1399
1399
  key: 0,
1400
- onClick: L[2] || (L[2] = (T) => g.value = ""),
1400
+ onClick: L[2] || (L[2] = (I) => h.value = ""),
1401
1401
  class: "absolute text-gray-400 -translate-y-1/2 cursor-pointer hover:text-red-500 right-4 top-1/2"
1402
- })) : $("", !0)
1402
+ })) : V("", !0)
1403
1403
  ]),
1404
- u("div", {
1405
- class: _([
1406
- t.layout === "popover" ? "flex-1 overflow-y-auto max-h-64 p-2" : "",
1407
- t.layout === "inline" ? "flex-1 overflow-y-auto max-h-80" : ""
1404
+ d("div", {
1405
+ class: K([
1406
+ T.layout === "popover" ? "flex-1 overflow-y-auto max-h-64 p-2" : "",
1407
+ T.layout === "inline" ? "flex-1 overflow-y-auto max-h-80" : ""
1408
1408
  ])
1409
1409
  }, [
1410
- (c(!0), w(j, null, q(e(f), (T, ie) => (c(), M(ye, {
1411
- layout: t.layout,
1412
- count: T.count,
1413
- label: T[e(C)],
1414
- color: T.color,
1415
- type: t.multi ? "checkbox" : "radio",
1416
- value: T[e(d)],
1417
- "is-selected": e(p)(T),
1418
- highlighted: ie === e(x),
1419
- onItemClick: (D) => e(y)(T),
1410
+ (f(!0), _(F, null, W(e(v), (I, ie) => (f(), R(ve, {
1411
+ layout: T.layout,
1412
+ count: I.count,
1413
+ label: I[e(y)],
1414
+ color: I.color,
1415
+ type: T.multi ? "checkbox" : "radio",
1416
+ value: I[e(i)],
1417
+ "is-selected": e(m)(I),
1418
+ highlighted: ie === e(w),
1419
+ onItemClick: (A) => e(p)(I),
1420
1420
  ref_for: !0,
1421
- ref: (D) => ae.value[ie] = D?.el
1421
+ ref: (A) => oe.value[ie] = A?.el
1422
1422
  }, null, 8, ["layout", "count", "label", "color", "type", "value", "is-selected", "highlighted", "onItemClick"]))), 256))
1423
1423
  ], 2),
1424
- t.type === "select" && e(f).length === 0 && !e(V) ? (c(), w("div", ll, [
1425
- u("div", al, [
1426
- Y(ge),
1427
- u("div", nl, [
1428
- u("p", ol, A(e(l)("filter.notfound")), 1),
1429
- L[7] || (L[7] = u("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" }, null, -1))
1424
+ T.type === "select" && e(v).length === 0 && !e(k) ? (f(), _("div", ll, [
1425
+ d("div", ol, [
1426
+ P(ye),
1427
+ d("div", al, [
1428
+ d("p", nl, S(e(t)("filter.notfound")), 1),
1429
+ L[7] || (L[7] = d("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" }, null, -1))
1430
1430
  ])
1431
1431
  ])
1432
- ])) : $("", !0),
1433
- t.layout !== "popover" && t.type !== "select" ? (c(), w(j, { key: 1 }, [
1434
- !e(m) && e(s) ? (c(), w("div", {
1432
+ ])) : V("", !0),
1433
+ T.layout !== "popover" && T.type !== "select" ? (f(), _(F, { key: 1 }, [
1434
+ !e(g) && e(s) ? (f(), _("div", {
1435
1435
  key: 0,
1436
1436
  onClick: L[3] || (L[3] = //@ts-ignore
1437
- (...T) => e(k) && e(k)(...T)),
1437
+ (...I) => e(C) && e(C)(...I)),
1438
1438
  class: "inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"
1439
1439
  }, [
1440
- z(A(e(l)("filter.more")) + " ", 1),
1441
- Y(de)
1442
- ])) : $("", !0),
1443
- e(m) ? (c(), w("div", {
1440
+ N(S(e(t)("filter.more")) + " ", 1),
1441
+ P(ce)
1442
+ ])) : V("", !0),
1443
+ e(g) ? (f(), _("div", {
1444
1444
  key: 1,
1445
1445
  onClick: L[4] || (L[4] = //@ts-ignore
1446
- (...T) => e(k) && e(k)(...T)),
1446
+ (...I) => e(C) && e(C)(...I)),
1447
1447
  class: "inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"
1448
1448
  }, [
1449
- z(A(e(l)("filter.less")) + " ", 1),
1450
- Y(be)
1451
- ])) : $("", !0)
1452
- ], 64)) : $("", !0),
1453
- t.cleanable ? (c(), w(j, { key: 2 }, [
1454
- t.layout === "inline" ? (c(), w("div", rl, [
1455
- z(A(t.multi && Array.isArray(e(o)) ? e(o)?.length : e(o) !== void 0 && (e(o) || e(o) === null) ? 1 : 0) + " / " + A(e(K)) + " " + A(e(l)("filter.selected")) + " ", 1),
1456
- I(u("button", {
1449
+ N(S(e(t)("filter.less")) + " ", 1),
1450
+ P(ge)
1451
+ ])) : V("", !0)
1452
+ ], 64)) : V("", !0),
1453
+ T.cleanable ? (f(), _(F, { key: 2 }, [
1454
+ T.layout === "inline" ? (f(), _("div", rl, [
1455
+ N(S(T.multi && Array.isArray(e(a)) ? e(a)?.length : e(a) !== void 0 && (e(a) || e(a) === null) ? 1 : 0) + " / " + S(e(j)) + " " + S(e(t)("filter.selected")) + " ", 1),
1456
+ U(d("button", {
1457
1457
  class: "text-gray-600 hover:text-gray-800",
1458
1458
  onClick: L[5] || (L[5] = //@ts-ignore
1459
- (...T) => e(i) && e(i)(...T))
1460
- }, A(e(l)("filter.clear")), 513), [
1461
- [H, e(o) !== "" && e(o) !== void 0 || e(o)]
1459
+ (...I) => e(r) && e(r)(...I))
1460
+ }, S(e(t)("filter.clear")), 513), [
1461
+ [G, e(a) !== "" && e(a) !== void 0 || e(a)]
1462
1462
  ])
1463
- ])) : $("", !0),
1464
- t.layout === "popover" ? (c(), w("div", sl, [
1465
- u("span", null, A(t.multi && Array.isArray(e(o)) ? e(o)?.length : e(o) !== void 0 && (e(o) || e(o) === null) ? 1 : 0) + " / " + A(e(K)) + " " + A(e(l)("filter.selected")), 1),
1466
- I(u("button", {
1463
+ ])) : V("", !0),
1464
+ T.layout === "popover" ? (f(), _("div", sl, [
1465
+ d("span", null, S(T.multi && Array.isArray(e(a)) ? e(a)?.length : e(a) !== void 0 && (e(a) || e(a) === null) ? 1 : 0) + " / " + S(e(j)) + " " + S(e(t)("filter.selected")), 1),
1466
+ U(d("button", {
1467
1467
  class: "text-gray-600 hover:text-gray-800",
1468
1468
  onClick: L[6] || (L[6] = //@ts-ignore
1469
- (...T) => e(i) && e(i)(...T))
1470
- }, A(e(l)("filter.clear")), 513), [
1471
- [H, e(o) !== "" && e(o) !== void 0 || e(o)]
1469
+ (...I) => e(r) && e(r)(...I))
1470
+ }, S(e(t)("filter.clear")), 513), [
1471
+ [G, e(a) !== "" && e(a) !== void 0 || e(a)]
1472
1472
  ])
1473
- ])) : $("", !0)
1474
- ], 64)) : $("", !0)
1473
+ ])) : V("", !0)
1474
+ ], 64)) : V("", !0)
1475
1475
  ], 2));
1476
1476
  }
1477
- }), ul = ["for", "onClick"], cl = ["id", "name", "value"], dl = { class: "block" }, fl = {
1477
+ }), ul = ["for", "onClick"], dl = ["id", "name", "value"], cl = { class: "block" }, fl = {
1478
1478
  key: 0,
1479
1479
  class: "flex justify-between p-2 border-t bg-gray-50 text-xs text-gray-500"
1480
- }, ml = {
1480
+ }, pl = {
1481
1481
  key: 1,
1482
1482
  class: "flex justify-between items-center text-xs text-gray-500 p-1 border-t"
1483
- }, vl = /* @__PURE__ */ U({
1483
+ }, ml = /* @__PURE__ */ O({
1484
1484
  __name: "tag-field",
1485
1485
  props: {
1486
1486
  id: {},
@@ -1508,77 +1508,77 @@ const el = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
1508
1508
  ua: {}
1509
1509
  },
1510
1510
  emits: ["update:modelValue", "change", "clear"],
1511
- setup(t, { expose: n, emit: v }) {
1512
- const l = t, r = v, {
1513
- innerValue: a,
1514
- isSelected: b,
1515
- selectItem: o,
1516
- clear: f,
1517
- labelKey: p,
1518
- valueKey: y,
1519
- allOptions: i
1520
- } = l.multi ? _e({
1521
- ...l,
1522
- modelValue: l.modelValue ?? l.default ?? []
1523
- }, r) : Fe({
1524
- ...l,
1525
- modelValue: l.modelValue !== void 0 ? l.modelValue : l.default ?? ""
1526
- }, r);
1527
- return n({
1528
- clear: f
1529
- }), F(
1530
- () => l.modelValue,
1531
- (h) => {
1532
- h === void 0 && (l.multi ? a.value = [] : a.value = void 0);
1511
+ setup(u, { expose: o, emit: b }) {
1512
+ const t = u, n = b, {
1513
+ innerValue: l,
1514
+ isSelected: x,
1515
+ selectItem: a,
1516
+ clear: v,
1517
+ labelKey: m,
1518
+ valueKey: p,
1519
+ allOptions: r
1520
+ } = t.multi ? Me({
1521
+ ...t,
1522
+ modelValue: t.modelValue ?? t.default ?? []
1523
+ }, n) : Re({
1524
+ ...t,
1525
+ modelValue: t.modelValue !== void 0 ? t.modelValue : t.default ?? ""
1526
+ }, n);
1527
+ return o({
1528
+ clear: v
1529
+ }), M(
1530
+ () => t.modelValue,
1531
+ (c) => {
1532
+ c === void 0 && (t.multi ? l.value = [] : l.value = void 0);
1533
1533
  }
1534
- ), (h, k) => (c(), w(j, null, [
1535
- u("div", {
1536
- class: _(["grid grid-cols-3 gap-2 mx-[1px]", t.layout === "popover" ? "m-1" : "mb-1"])
1534
+ ), (c, C) => (f(), _(F, null, [
1535
+ d("div", {
1536
+ class: K(["grid grid-cols-3 gap-2 mx-[1px]", c.layout === "popover" ? "m-1" : "mb-1"])
1537
1537
  }, [
1538
- (c(!0), w(j, null, q(e(i), (V) => (c(), w("label", {
1539
- key: `item-${V[e(y)]}`,
1540
- for: `item-${V[e(y)]}`,
1541
- onClick: Be((m) => e(o)(V), ["stop", "prevent"]),
1542
- class: _([e(b)(V) ? "ring-2 ring-indigo-600" : "", "p-2.5 group relative flex justify-center items-center gap-x-12 text-center text-xs bg-white text-gray-800 border border-gray-200 cursor-pointer rounded-lg dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-200 peer-checked:text-indigo-600 dark:has-checked:text-indigo-500 peer-checked:border-indigo-600 dark:has-checked:border-indigo-500 peer-checked:ring peer-checked:shadow focus:ring dark:has-checked:ring-indigo-500 has-disabled:pointer-events-none has-disabled:text-gray-200 dark:has-disabled:text-neutral-700 has-disabled:after:absolute has-disabled:after:inset-0 has-disabled:after:bg-[linear-gradient(to_right_bottom,transparent_calc(50%-1px),var(--color-gray-200)_calc(50%-1px),var(--color-gray-200)_50%,transparent_50%)] dark:has-disabled:after:bg-[linear-gradient(to_right_bottom,transparent_calc(50%-1px),var(--color-neutral-700)_calc(50%-1px),var(--color-neutral-700)_50%,transparent_50%)]"])
1538
+ (f(!0), _(F, null, W(e(r), (k) => (f(), _("label", {
1539
+ key: `item-${k[e(p)]}`,
1540
+ for: `item-${k[e(p)]}`,
1541
+ onClick: Ae((g) => e(a)(k), ["stop", "prevent"]),
1542
+ class: K([e(x)(k) ? "ring-2 ring-indigo-600" : "", "p-2.5 group relative flex justify-center items-center gap-x-12 text-center text-xs bg-white text-gray-800 border border-gray-200 cursor-pointer rounded-lg dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-200 peer-checked:text-indigo-600 dark:has-checked:text-indigo-500 peer-checked:border-indigo-600 dark:has-checked:border-indigo-500 peer-checked:ring peer-checked:shadow focus:ring dark:has-checked:ring-indigo-500 has-disabled:pointer-events-none has-disabled:text-gray-200 dark:has-disabled:text-neutral-700 has-disabled:after:absolute has-disabled:after:inset-0 has-disabled:after:bg-[linear-gradient(to_right_bottom,transparent_calc(50%-1px),var(--color-gray-200)_calc(50%-1px),var(--color-gray-200)_50%,transparent_50%)] dark:has-disabled:after:bg-[linear-gradient(to_right_bottom,transparent_calc(50%-1px),var(--color-neutral-700)_calc(50%-1px),var(--color-neutral-700)_50%,transparent_50%)]"])
1543
1543
  }, [
1544
- u("input", {
1544
+ d("input", {
1545
1545
  type: "checkbox",
1546
- id: `item-${V[e(y)]}`,
1546
+ id: `item-${k[e(p)]}`,
1547
1547
  class: "hidden w4poy border-gray-200 g41z1 g22e3 axcnw dark:text-indigo-500 dark:border-neutral-700 dark:focus:ring-neutral-900",
1548
- name: `item-${V[e(y)]}`,
1549
- value: V[e(y)]
1550
- }, null, 8, cl),
1551
- u("span", dl, A(V[e(p)]), 1)
1548
+ name: `item-${k[e(p)]}`,
1549
+ value: k[e(p)]
1550
+ }, null, 8, dl),
1551
+ d("span", cl, S(k[e(m)]), 1)
1552
1552
  ], 10, ul))), 128))
1553
1553
  ], 2),
1554
- t.cleanable ? (c(), w(j, { key: 0 }, [
1555
- t.layout === "inline" ? (c(), w("div", fl, [
1556
- z(A(t.multi && Array.isArray(e(a)) ? e(a)?.length : e(a) !== void 0 && (e(a) || e(a) === null) ? 1 : 0) + " з " + A(e(i).length) + " обрано ", 1),
1557
- I(u("button", {
1554
+ c.cleanable ? (f(), _(F, { key: 0 }, [
1555
+ c.layout === "inline" ? (f(), _("div", fl, [
1556
+ N(S(c.multi && Array.isArray(e(l)) ? e(l)?.length : e(l) !== void 0 && (e(l) || e(l) === null) ? 1 : 0) + " з " + S(e(r).length) + " обрано ", 1),
1557
+ U(d("button", {
1558
1558
  class: "text-gray-600 hover:text-gray-800",
1559
- onClick: k[0] || (k[0] = //@ts-ignore
1560
- (...V) => e(f) && e(f)(...V))
1559
+ onClick: C[0] || (C[0] = //@ts-ignore
1560
+ (...k) => e(v) && e(v)(...k))
1561
1561
  }, " Очистити ", 512), [
1562
- [H, e(a) !== "" && e(a) !== void 0 || e(a)]
1562
+ [G, e(l) !== "" && e(l) !== void 0 || e(l)]
1563
1563
  ])
1564
- ])) : $("", !0),
1565
- t.layout === "popover" ? (c(), w("div", ml, [
1566
- u("span", null, A(t.multi && Array.isArray(e(a)) ? e(a)?.length : e(a) !== void 0 && (e(a) || e(a) === null) ? 1 : 0) + " з " + A(e(i).length) + " обрано", 1),
1567
- I(u("button", {
1564
+ ])) : V("", !0),
1565
+ c.layout === "popover" ? (f(), _("div", pl, [
1566
+ d("span", null, S(c.multi && Array.isArray(e(l)) ? e(l)?.length : e(l) !== void 0 && (e(l) || e(l) === null) ? 1 : 0) + " з " + S(e(r).length) + " обрано", 1),
1567
+ U(d("button", {
1568
1568
  class: "text-gray-600 hover:text-gray-800",
1569
- onClick: k[1] || (k[1] = //@ts-ignore
1570
- (...V) => e(f) && e(f)(...V))
1569
+ onClick: C[1] || (C[1] = //@ts-ignore
1570
+ (...k) => e(v) && e(v)(...k))
1571
1571
  }, " Очистити ", 512), [
1572
- [H, e(a) !== void 0 && e(a) !== "" || e(a)]
1572
+ [G, e(l) !== void 0 && e(l) !== "" || e(l)]
1573
1573
  ])
1574
- ])) : $("", !0)
1575
- ], 64)) : $("", !0)
1574
+ ])) : V("", !0)
1575
+ ], 64)) : V("", !0)
1576
1576
  ], 64));
1577
1577
  }
1578
- }), pl = ["disabled", "title"], yl = {
1578
+ }), vl = ["disabled", "title"], yl = { class: "truncate text-ellipsis block text-left w-full" }, gl = {
1579
1579
  key: 0,
1580
1580
  class: "absolute top-0 end-0 inline-flex min-h-[10px] min-w-[10px] z-10 items-center py-0.5 rounded-full text-xs font-medium transform -translate-y-1/2 translate-x-1/2 bg-blue-600 text-white px-1"
1581
- }, gl = { class: "w-full text-sm text-stone-800 bg-white shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-lg focus:outline-none focus:bg-stone-100 after:h-4 after:absolute after:-bottom-4 after:start-0 after:w-full before:h-4 before:absolute before:-top-4 before:start-0 before:w-full" }, bl = { class: "w-[360px] max-h-[500px] overflow-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-1 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500 before:w-full p-2" }, xe = /* @__PURE__ */ U({
1581
+ }, bl = { class: "w-full text-sm text-stone-800 bg-white shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-lg focus:outline-none focus:bg-stone-100 after:h-4 after:absolute after:-bottom-4 after:start-0 after:w-full before:h-4 before:absolute before:-top-4 before:start-0 before:w-full" }, hl = { class: "w-[360px] max-h-[500px] overflow-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-1 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500 before:w-full p-2" }, be = /* @__PURE__ */ O({
1582
1582
  __name: "popover-field",
1583
1583
  props: {
1584
1584
  disabled: { type: Boolean, default: !1 },
@@ -1595,80 +1595,78 @@ const el = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
1595
1595
  mode: {},
1596
1596
  layout: {}
1597
1597
  },
1598
- setup(t, { expose: n }) {
1599
- const v = t, l = E(() => Ee(v.mode)), r = S(!1), a = S({ top: 0, left: 0 }), b = S(null), o = S(null), f = S(null);
1600
- function p() {
1601
- const C = o.value, d = f.value;
1602
- if (!C || !d) return;
1603
- const x = C.getBoundingClientRect(), B = d.offsetWidth, R = window.innerWidth, K = x.bottom + 8;
1604
- let { left: X } = x;
1605
- X + B > R && (X = Math.max(R - B - 10, 10)), a.value = { top: K, left: X };
1598
+ setup(u, { expose: o }) {
1599
+ const b = u, t = E(() => Ee(b.mode)), n = $(!1), l = $({ top: 0, left: 0 }), x = $(null), a = $(null), v = $(null);
1600
+ function m() {
1601
+ const y = a.value, i = v.value;
1602
+ if (!y || !i) return;
1603
+ const w = y.getBoundingClientRect(), D = i.offsetWidth, B = window.innerWidth, j = w.bottom + 8;
1604
+ let { left: Z } = w;
1605
+ Z + D > B && (Z = Math.max(B - D - 10, 10)), l.value = { top: j, left: Z };
1606
1606
  }
1607
- function y() {
1608
- console.log("~~~~~~~~~~"), console.log(r.value), r.value = !r.value, console.log(r.value), r.value && ve(() => {
1609
- p(), v.fieldRef?.inputTextRef && v.fieldRef?.inputTextRef?.focus?.(), v.fieldRef?.loadData && v.fieldRef?.loadData?.();
1607
+ function p() {
1608
+ console.log("~~~~~~~~~~"), console.log(n.value), n.value = !n.value, console.log(n.value), n.value && pe(() => {
1609
+ m(), b.fieldRef?.inputTextRef && b.fieldRef?.inputTextRef?.focus?.(), b.fieldRef?.loadData && b.fieldRef?.loadData?.();
1610
1610
  });
1611
1611
  }
1612
- function i(C) {
1613
- !b.value?.contains(C.target) && !f.value?.contains(C.target) && !o.value?.contains(C.target) && (r.value = !1);
1612
+ function r(y) {
1613
+ !x.value?.contains(y.target) && !v.value?.contains(y.target) && !a.value?.contains(y.target) && (n.value = !1);
1614
1614
  }
1615
- function h(C) {
1616
- C.key === "Escape" && (r.value = !1);
1615
+ function c(y) {
1616
+ y.key === "Escape" && (n.value = !1);
1617
1617
  }
1618
- const k = S(!1), V = S("ua"), m = (C) => {
1619
- C.detail.key === "locale" && (V.value = C.detail.newValue);
1618
+ const C = $(!1), k = $("ua"), g = (y) => {
1619
+ y.detail.key === "locale" && (k.value = y.detail.newValue);
1620
1620
  };
1621
1621
  ue(() => {
1622
- k.value = !0, V.value = localStorage.locale, window.addEventListener("storage", m), document.addEventListener("click", i, !0), document.addEventListener("keydown", h), window.addEventListener("scroll", p, !0);
1623
- }), me(() => {
1624
- window.removeEventListener("resize", m), document.removeEventListener("click", i, !0), document.removeEventListener("keydown", h), window.removeEventListener("scroll", p, !0);
1622
+ C.value = !0, k.value = localStorage.locale, window.addEventListener("storage", g), document.addEventListener("click", r, !0), document.addEventListener("keydown", c), window.addEventListener("scroll", m, !0);
1623
+ }), fe(() => {
1624
+ window.removeEventListener("resize", g), document.removeEventListener("click", r, !0), document.removeEventListener("keydown", c), window.removeEventListener("scroll", m, !0);
1625
1625
  });
1626
1626
  function s() {
1627
- r.value = !1;
1627
+ n.value = !1;
1628
1628
  }
1629
- n({ close: s });
1630
- const g = E(() => {
1631
- const C = v.fieldRef?.selectedLabels;
1632
- return !C || ["inline"].includes(v.layout || "") ? v[V.value] || (v.label ?? "") : Array.isArray(C) ? C.length > 0 ? C.join(", ") : v.label ?? "" : String(C);
1629
+ o({ close: s });
1630
+ const h = E(() => {
1631
+ const y = b.fieldRef?.selectedLabels;
1632
+ return !y || ["inline"].includes(b.layout || "") ? b[k.value] || (b.label ?? "") : Array.isArray(y) ? y.length > 0 ? y.join(", ") : b.label ?? "" : String(y);
1633
1633
  });
1634
- return (C, d) => (c(), w("div", null, [
1635
- u("button", {
1636
- onClick: y,
1637
- disabled: t.disabled,
1634
+ return (y, i) => (f(), _("div", null, [
1635
+ d("button", {
1636
+ onClick: p,
1637
+ disabled: y.disabled,
1638
1638
  ref_key: "triggerRef",
1639
- ref: o,
1640
- title: t.label,
1641
- class: _(l.value + " " + (t.width ? e(fe).getWidthClass(t.width) : "w-full"))
1639
+ ref: a,
1640
+ title: y.label,
1641
+ class: K(t.value + " " + (y.width ? e(Ke).getWidthClass(y.width) : "w-full"))
1642
1642
  }, [
1643
- u("span", {
1644
- class: _(["truncate text-ellipsis block", t.width ? e(fe).getWidthClass(t.width - 50) : "w-full"])
1645
- }, A(g.value), 3),
1646
- Y(de, { class: "h-4 w-4" }),
1647
- (Array.isArray(t.currentValue) ? t.currentValue === null || t.currentValue.length > 0 : t.currentValue === null || t.currentValue) && t.layout === "inline" ? (c(), w("span", yl)) : $("", !0)
1648
- ], 10, pl),
1649
- k.value ? (c(), M(Re, {
1643
+ d("span", yl, S(h.value), 1),
1644
+ P(ce, { class: "h-4 w-4" }),
1645
+ (Array.isArray(y.currentValue) ? y.currentValue === null || y.currentValue.length > 0 : y.currentValue === null || y.currentValue) && y.layout === "inline" ? (f(), _("span", gl)) : V("", !0)
1646
+ ], 10, vl),
1647
+ C.value ? (f(), R(De, {
1650
1648
  key: 0,
1651
1649
  to: "body"
1652
1650
  }, [
1653
- I(u("div", {
1651
+ U(d("div", {
1654
1652
  ref_key: "popperRef",
1655
- ref: f,
1653
+ ref: v,
1656
1654
  class: "vsTailwind vs-popover__content bottom-right w-fit fixed z-[1000]",
1657
- style: Me({ top: `${a.value.top}px`, left: `${a.value.left}px` }),
1655
+ style: Be({ top: `${l.value.top}px`, left: `${l.value.left}px` }),
1658
1656
  "data-inside-popover": ""
1659
1657
  }, [
1660
- u("div", gl, [
1661
- u("div", bl, [
1662
- ce(C.$slots, "default")
1658
+ d("div", bl, [
1659
+ d("div", hl, [
1660
+ de(y.$slots, "default")
1663
1661
  ])
1664
1662
  ])
1665
1663
  ], 4), [
1666
- [H, r.value]
1664
+ [G, n.value]
1667
1665
  ])
1668
- ])) : $("", !0)
1666
+ ])) : V("", !0)
1669
1667
  ]));
1670
1668
  }
1671
- }), xl = {}, hl = {
1669
+ }), xl = {}, wl = {
1672
1670
  xmlns: "http://www.w3.org/2000/svg",
1673
1671
  width: "24",
1674
1672
  height: "24",
@@ -1680,12 +1678,12 @@ const el = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
1680
1678
  "stroke-linejoin": "round",
1681
1679
  class: "text-blue-600 w-[16px] h-[16px]"
1682
1680
  };
1683
- function kl(t, n) {
1684
- return c(), w("svg", hl, [...n[0] || (n[0] = [
1685
- u("path", { d: "M20 6 9 17l-5-5" }, null, -1)
1686
- ])]);
1681
+ function kl(u, o) {
1682
+ return f(), _("svg", wl, o[0] || (o[0] = [
1683
+ d("path", { d: "M20 6 9 17l-5-5" }, null, -1)
1684
+ ]));
1687
1685
  }
1688
- const ee = /* @__PURE__ */ G(xl, [["render", kl]]), wl = {}, Cl = {
1686
+ const ee = /* @__PURE__ */ X(xl, [["render", kl]]), Cl = {}, _l = {
1689
1687
  xmlns: "http://www.w3.org/2000/svg",
1690
1688
  width: "15px",
1691
1689
  height: "24",
@@ -1697,17 +1695,17 @@ const ee = /* @__PURE__ */ G(xl, [["render", kl]]), wl = {}, Cl = {
1697
1695
  "stroke-linejoin": "round",
1698
1696
  class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down text-gray-800 rotate-[90deg]"
1699
1697
  };
1700
- function Vl(t, n) {
1701
- return c(), w("svg", Cl, [...n[0] || (n[0] = [
1702
- u("path", {
1698
+ function Vl(u, o) {
1699
+ return f(), _("svg", _l, o[0] || (o[0] = [
1700
+ d("path", {
1703
1701
  stroke: "none",
1704
1702
  d: "M0 0h24v24H0z",
1705
1703
  fill: "none"
1706
1704
  }, null, -1),
1707
- u("path", { d: "M6 9l6 6l6 -6" }, null, -1)
1708
- ])]);
1705
+ d("path", { d: "M6 9l6 6l6 -6" }, null, -1)
1706
+ ]));
1709
1707
  }
1710
- const $l = /* @__PURE__ */ G(wl, [["render", Vl]]), Sl = {}, Al = {
1708
+ const $l = /* @__PURE__ */ X(Cl, [["render", Vl]]), Sl = {}, Al = {
1711
1709
  xmlns: "http://www.w3.org/2000/svg",
1712
1710
  width: "15px",
1713
1711
  height: "24",
@@ -1719,21 +1717,21 @@ const $l = /* @__PURE__ */ G(wl, [["render", Vl]]), Sl = {}, Al = {
1719
1717
  "stroke-linejoin": "round",
1720
1718
  class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down text-gray-800 rotate-[270deg]"
1721
1719
  };
1722
- function Dl(t, n) {
1723
- return c(), w("svg", Al, [...n[0] || (n[0] = [
1724
- u("path", {
1720
+ function Dl(u, o) {
1721
+ return f(), _("svg", Al, o[0] || (o[0] = [
1722
+ d("path", {
1725
1723
  stroke: "none",
1726
1724
  d: "M0 0h24v24H0z",
1727
1725
  fill: "none"
1728
1726
  }, null, -1),
1729
- u("path", { d: "M6 9l6 6l6 -6" }, null, -1)
1730
- ])]);
1727
+ d("path", { d: "M6 9l6 6l6 -6" }, null, -1)
1728
+ ]));
1731
1729
  }
1732
- const Bl = /* @__PURE__ */ G(Sl, [["render", Dl]]), Rl = { class: "flex" }, Ml = { class: "mb-1" }, Fl = { class: "mb-1" }, _l = { class: "inline-flex rounded-lg shrink-0 pl-1" }, jl = ["title"], Kl = { class: "inline-flex rounded-lg shrink-0 pl-1" }, Ll = ["title"], El = {
1730
+ const Bl = /* @__PURE__ */ X(Sl, [["render", Dl]]), Rl = { class: "flex" }, Ml = { class: "mb-1" }, Fl = { class: "mb-1" }, jl = { class: "inline-flex rounded-lg shrink-0 pl-1" }, Kl = ["title"], Ll = { class: "inline-flex rounded-lg shrink-0 pl-1" }, El = ["title"], Tl = {
1733
1731
  key: 1,
1734
1732
  class: "flex gap-1 !w-[75%] rounded-lg"
1735
- }, Tl = ["max", "disabled"], Il = ["min", "disabled"];
1736
- const Ul = /* @__PURE__ */ U({
1733
+ }, Il = ["max", "disabled"], Ul = ["min", "disabled"];
1734
+ const Ol = /* @__PURE__ */ O({
1737
1735
  __name: "date-input-inline",
1738
1736
  props: {
1739
1737
  id: {},
@@ -1761,191 +1759,193 @@ const Ul = /* @__PURE__ */ U({
1761
1759
  ua: {}
1762
1760
  },
1763
1761
  emits: ["update:modelValue", "change", "clear"],
1764
- setup(t, { expose: n, emit: v }) {
1765
- const l = re(), r = t, a = v, b = S(null), {
1766
- activeMode: o,
1767
- innerValue: f,
1768
- onSelectChange: p,
1769
- nextClick: y,
1770
- prevClick: i,
1771
- currentLabel: h,
1772
- clear: k
1762
+ setup(u, { expose: o, emit: b }) {
1763
+ const t = re(), n = u, l = b, x = $(null), {
1764
+ activeMode: a,
1765
+ innerValue: v,
1766
+ onSelectChange: m,
1767
+ nextClick: p,
1768
+ prevClick: r,
1769
+ currentLabel: c,
1770
+ clear: C
1773
1771
  } = Te({
1774
- ...r,
1775
- popoverRef: b
1776
- }, a);
1777
- return F(() => r.modelValue, (V) => {
1778
- V !== void 0 ? (f.value = V, a("update:modelValue", V)) : (o.value = "", f.value = []);
1779
- }), n({
1780
- clear: k,
1781
- popoverRef: b
1782
- }), (V, m) => (c(), w(j, null, [
1783
- u("div", Rl, [
1784
- Y(xe, {
1772
+ ...n,
1773
+ popoverRef: x
1774
+ }, l);
1775
+ return M(() => n.modelValue, (k) => {
1776
+ k !== void 0 ? (v.value = k, l("update:modelValue", k)) : (a.value = "", v.value = []);
1777
+ }), o({
1778
+ clear: C,
1779
+ popoverRef: x
1780
+ }), (k, g) => (f(), _(F, null, [
1781
+ d("div", Rl, [
1782
+ P(be, {
1785
1783
  ref_key: "popoverRef",
1786
- ref: b,
1787
- label: e(h),
1788
- "current-value": e(f),
1789
- mode: t.mode,
1790
- onClear: e(k),
1791
- layout: t.layout
1784
+ ref: x,
1785
+ label: e(c),
1786
+ "current-value": e(v),
1787
+ mode: k.mode,
1788
+ width: typeof k.width == "number" && e(v).length ? k.width - 70 : k.width,
1789
+ onClear: e(C),
1790
+ layout: k.layout
1792
1791
  }, {
1793
1792
  default: te(() => [
1794
- u("div", null, [
1795
- u("button", {
1793
+ d("div", null, [
1794
+ d("button", {
1796
1795
  type: "button",
1797
- onClick: m[0] || (m[0] = (s) => e(p)("range")),
1796
+ onClick: g[0] || (g[0] = (s) => e(m)("range")),
1798
1797
  class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-lg cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"
1799
1798
  }, [
1800
- z(A(e(l)("filter.period")) + " ", 1),
1801
- e(o) === "range" ? (c(), M(ee, { key: 0 })) : $("", !0)
1799
+ N(S(e(t)("filter.period")) + " ", 1),
1800
+ e(a) === "range" ? (f(), R(ee, { key: 0 })) : V("", !0)
1802
1801
  ])
1803
1802
  ]),
1804
- m[12] || (m[12] = u("div", null, [
1805
- u("div", { class: "pt-1 mt-1 border-t" })
1803
+ g[12] || (g[12] = d("div", null, [
1804
+ d("div", { class: "pt-1 mt-1 border-t" })
1806
1805
  ], -1)),
1807
- u("div", null, [
1808
- u("button", {
1806
+ d("div", null, [
1807
+ d("button", {
1809
1808
  type: "button",
1810
- onClick: m[1] || (m[1] = (s) => e(p)("today")),
1809
+ onClick: g[1] || (g[1] = (s) => e(m)("today")),
1811
1810
  class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-lg cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"
1812
1811
  }, [
1813
- z(A(e(l)("filter.today")) + " ", 1),
1814
- e(o) === "today" ? (c(), M(ee, { key: 0 })) : $("", !0)
1812
+ N(S(e(t)("filter.today")) + " ", 1),
1813
+ e(a) === "today" ? (f(), R(ee, { key: 0 })) : V("", !0)
1815
1814
  ])
1816
1815
  ]),
1817
- u("div", null, [
1818
- u("button", {
1816
+ d("div", null, [
1817
+ d("button", {
1819
1818
  type: "button",
1820
- onClick: m[2] || (m[2] = (s) => e(p)("week")),
1819
+ onClick: g[2] || (g[2] = (s) => e(m)("week")),
1821
1820
  class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-lg cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"
1822
1821
  }, [
1823
- z(A(e(l)("filter.week")) + " ", 1),
1824
- e(o) === "week" ? (c(), M(ee, { key: 0 })) : $("", !0)
1822
+ N(S(e(t)("filter.week")) + " ", 1),
1823
+ e(a) === "week" ? (f(), R(ee, { key: 0 })) : V("", !0)
1825
1824
  ])
1826
1825
  ]),
1827
- u("div", null, [
1828
- u("button", {
1826
+ d("div", null, [
1827
+ d("button", {
1829
1828
  type: "button",
1830
- onClick: m[3] || (m[3] = (s) => e(p)("month")),
1829
+ onClick: g[3] || (g[3] = (s) => e(m)("month")),
1831
1830
  class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-lg cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"
1832
1831
  }, [
1833
- z(A(e(l)("filter.month")) + " ", 1),
1834
- e(o) === "month" ? (c(), M(ee, { key: 0 })) : $("", !0)
1832
+ N(S(e(t)("filter.month")) + " ", 1),
1833
+ e(a) === "month" ? (f(), R(ee, { key: 0 })) : V("", !0)
1835
1834
  ])
1836
1835
  ]),
1837
- u("div", null, [
1838
- u("button", {
1836
+ d("div", null, [
1837
+ d("button", {
1839
1838
  type: "button",
1840
- onClick: m[4] || (m[4] = (s) => e(p)("quarter")),
1839
+ onClick: g[4] || (g[4] = (s) => e(m)("quarter")),
1841
1840
  class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-lg cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"
1842
1841
  }, [
1843
- z(A(e(l)("filter.quarter")) + " ", 1),
1844
- e(o) === "quarter" ? (c(), M(ee, { key: 0 })) : $("", !0)
1842
+ N(S(e(t)("filter.quarter")) + " ", 1),
1843
+ e(a) === "quarter" ? (f(), R(ee, { key: 0 })) : V("", !0)
1845
1844
  ])
1846
1845
  ]),
1847
- u("div", Ml, [
1848
- u("button", {
1846
+ d("div", Ml, [
1847
+ d("button", {
1849
1848
  type: "button",
1850
- onClick: m[5] || (m[5] = (s) => e(p)("year")),
1849
+ onClick: g[5] || (g[5] = (s) => e(m)("year")),
1851
1850
  class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-lg cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"
1852
1851
  }, [
1853
- z(A(e(l)("filter.year")) + " ", 1),
1854
- e(o) === "year" ? (c(), M(ee, { key: 0 })) : $("", !0)
1852
+ N(S(e(t)("filter.year")) + " ", 1),
1853
+ e(a) === "year" ? (f(), R(ee, { key: 0 })) : V("", !0)
1855
1854
  ])
1856
1855
  ]),
1857
- u("div", Fl, [
1858
- u("button", {
1856
+ d("div", Fl, [
1857
+ d("button", {
1859
1858
  type: "button",
1860
- onClick: m[6] || (m[6] = (s) => e(k)()),
1859
+ onClick: g[6] || (g[6] = (s) => e(C)()),
1861
1860
  class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-lg cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"
1862
1861
  }, [
1863
- z(A(e(l)("filter.alltime")) + " ", 1),
1864
- e(f)[0] ? $("", !0) : (c(), M(ee, { key: 0 }))
1862
+ N(S(e(t)("filter.alltime")) + " ", 1),
1863
+ e(v)[0] ? V("", !0) : (f(), R(ee, { key: 0 }))
1865
1864
  ])
1866
1865
  ])
1867
1866
  ]),
1868
- _: 1
1869
- }, 8, ["label", "current-value", "mode", "onClear", "layout"]),
1870
- e(o) !== "" && e(o) !== "range" && e(o) !== "last_7_days" ? (c(), w(j, { key: 0 }, [
1871
- u("div", _l, [
1872
- u("button", {
1867
+ _: 1,
1868
+ __: [12]
1869
+ }, 8, ["label", "current-value", "mode", "width", "onClear", "layout"]),
1870
+ e(a) !== "" && e(a) !== "range" && e(a) !== "last_7_days" ? (f(), _(F, { key: 0 }, [
1871
+ d("div", jl, [
1872
+ d("button", {
1873
1873
  type: "button",
1874
- title: e(l)("filter.prev"),
1874
+ title: e(t)("filter.prev"),
1875
1875
  class: "inline-flex h-[38px] items-center px-2 text-sm text-gray-800 bg-gray-100 gap-x-2 -ms-px first:rounded-s-lg first:ms-0 last:rounded-e-lg focus:z-10 hover:bg-gray-200 focus:bg-gray-200 duration-300",
1876
- onClick: m[7] || (m[7] = //@ts-ignore
1877
- (...s) => e(i) && e(i)(...s))
1876
+ onClick: g[7] || (g[7] = //@ts-ignore
1877
+ (...s) => e(r) && e(r)(...s))
1878
1878
  }, [
1879
- Y($l)
1880
- ], 8, jl)
1879
+ P($l)
1880
+ ], 8, Kl)
1881
1881
  ]),
1882
- u("div", Kl, [
1883
- u("button", {
1882
+ d("div", Ll, [
1883
+ d("button", {
1884
1884
  type: "button",
1885
- title: e(l)("filter.next"),
1885
+ title: e(t)("filter.next"),
1886
1886
  class: "inline-flex h-[38px] items-center px-2 text-sm text-gray-800 gap-x-2 bg-gray-100 -ms-px first:rounded-s-lg first:ms-0 last:rounded-e-lg focus:z-10 hover:bg-gray-200 focus:bg-gray-200 duration-300",
1887
- onClick: m[8] || (m[8] = //@ts-ignore
1888
- (...s) => e(y) && e(y)(...s))
1887
+ onClick: g[8] || (g[8] = //@ts-ignore
1888
+ (...s) => e(p) && e(p)(...s))
1889
1889
  }, [
1890
- Y(Bl)
1891
- ], 8, Ll)
1890
+ P(Bl)
1891
+ ], 8, El)
1892
1892
  ])
1893
- ], 64)) : $("", !0),
1894
- e(o) !== "" && e(o) === "range" ? (c(), w("div", El, [
1895
- I(u("input", {
1893
+ ], 64)) : V("", !0),
1894
+ e(a) !== "" && e(a) === "range" ? (f(), _("div", Tl, [
1895
+ U(d("input", {
1896
1896
  type: "date",
1897
- max: e(f)[1],
1897
+ max: e(v)[1],
1898
1898
  locale: "uk-UA",
1899
- "onUpdate:modelValue": m[9] || (m[9] = (s) => e(f)[0] = s),
1899
+ "onUpdate:modelValue": g[9] || (g[9] = (s) => e(v)[0] = s),
1900
1900
  class: "px-2 p-0 border text-[12px] max-w-[calc(50%-5px)] h-[38px] rounded-lg focus:outline-blue-600",
1901
- disabled: t.disabled
1902
- }, null, 8, Tl), [
1903
- [Q, e(f)[0]]
1901
+ disabled: k.disabled
1902
+ }, null, 8, Il), [
1903
+ [H, e(v)[0]]
1904
1904
  ]),
1905
- I(u("input", {
1905
+ U(d("input", {
1906
1906
  type: "date",
1907
- min: e(f)[0],
1907
+ min: e(v)[0],
1908
1908
  locale: "uk-UA",
1909
- "onUpdate:modelValue": m[10] || (m[10] = (s) => e(f)[1] = s),
1909
+ "onUpdate:modelValue": g[10] || (g[10] = (s) => e(v)[1] = s),
1910
1910
  class: "px-2 p-0 border text-[12px] max-w-[calc(50%-5px)] h-[38px] rounded-lg focus:outline-blue-600 appearance-auto",
1911
- disabled: t.disabled
1912
- }, null, 8, Il), [
1913
- [Q, e(f)[1]]
1911
+ disabled: k.disabled
1912
+ }, null, 8, Ul), [
1913
+ [H, e(v)[1]]
1914
1914
  ])
1915
- ])) : $("", !0)
1915
+ ])) : V("", !0)
1916
1916
  ]),
1917
- (t.cleanable, $("", !0))
1917
+ (k.cleanable, V("", !0))
1918
1918
  ], 64));
1919
1919
  }
1920
- }), $e = {
1921
- radio: vt,
1922
- checkbox: Ve,
1923
- check: Ve,
1924
- text: Rt,
1920
+ }), _e = {
1921
+ radio: mt,
1922
+ checkbox: Ce,
1923
+ check: Ce,
1924
+ text: Bt,
1925
1925
  range: It,
1926
1926
  date: Zt,
1927
1927
  select: il,
1928
- tag: vl,
1929
- "date:inline": Ul
1928
+ tag: ml,
1929
+ "date:inline": Ol
1930
1930
  };
1931
- function he(t, n) {
1932
- let v;
1933
- switch (t.toLowerCase()) {
1931
+ function he(u, o) {
1932
+ let b;
1933
+ switch (u.toLowerCase()) {
1934
1934
  case "autocomplete":
1935
- v = "select";
1935
+ b = "select";
1936
1936
  break;
1937
1937
  case "check":
1938
- v = "checkbox";
1938
+ b = "checkbox";
1939
1939
  break;
1940
1940
  default:
1941
- v = t?.toString().toLowerCase();
1941
+ b = u?.toString().toLowerCase();
1942
1942
  }
1943
- return v === "date" && n && n === "inline" && (v = "date:inline"), {
1944
- component: $e[v] || $e.text,
1945
- type: v
1943
+ return b === "date" && o && o === "inline" && (b = "date:inline"), {
1944
+ component: _e[b] || _e.text,
1945
+ type: b
1946
1946
  };
1947
1947
  }
1948
- const Ol = { style: { display: "inline-flex", margin: "0px", width: "100%" } }, zl = { class: "relative w-full mb-2 p-4 bg-white rounded-lg shadow-sm" }, Nl = { class: "block mb-3 text-sm font-medium text-gray-800 dark:text-neutral-200" }, Yl = { class: "flex items-center" }, Pl = { class: "text-sm font-medium max-w-[80%] text-gray-800 flex items-center gap-x-1" }, ql = { class: "filter-layout__body" }, Wl = /* @__PURE__ */ U({
1948
+ const zl = { style: { display: "inline-flex", margin: "0px", width: "100%" } }, Nl = { class: "relative w-full mb-2 p-4 bg-white rounded-lg shadow-sm" }, Yl = { class: "block mb-3 text-sm font-medium text-gray-800 dark:text-neutral-200" }, Pl = { class: "flex items-center" }, ql = { class: "text-sm font-medium max-w-[80%] text-gray-800 flex items-center gap-x-1" }, Wl = { class: "filter-layout__body" }, Ql = /* @__PURE__ */ O({
1949
1949
  __name: "vertical-layout",
1950
1950
  props: {
1951
1951
  id: {},
@@ -1973,69 +1973,69 @@ const Ol = { style: { display: "inline-flex", margin: "0px", width: "100%" } },
1973
1973
  ua: {}
1974
1974
  },
1975
1975
  emits: ["update:modelValue", "change", "clear"],
1976
- setup(t, { expose: n, emit: v }) {
1977
- const l = t, r = v, a = S(), b = he(l.type, l.layout), o = E({
1978
- get: () => l.modelValue,
1979
- set: (i) => r("update:modelValue", i)
1976
+ setup(u, { expose: o, emit: b }) {
1977
+ const t = u, n = b, l = $(), x = he(t.type, t.layout), a = E({
1978
+ get: () => t.modelValue,
1979
+ set: (r) => n("update:modelValue", r)
1980
1980
  });
1981
- function f(i) {
1982
- r("clear", i);
1981
+ function v(r) {
1982
+ n("clear", r);
1983
1983
  }
1984
- function p(i, h) {
1985
- r("change", { name: i, value: h }), l.modelValue !== void 0 && r("update:modelValue", h);
1984
+ function m(r, c) {
1985
+ n("change", { name: r, value: c }), t.modelValue !== void 0 && n("update:modelValue", c);
1986
1986
  }
1987
- function y() {
1988
- a.value && a.value.clear(), r("clear", l.name);
1987
+ function p() {
1988
+ n("clear", t.name);
1989
1989
  }
1990
- return F(
1991
- () => l.default,
1992
- (i) => {
1993
- o.value = i;
1990
+ return M(
1991
+ () => t.default,
1992
+ (r) => {
1993
+ a.value = r;
1994
1994
  }
1995
- ), F(
1996
- () => l.modelValue,
1997
- (i) => {
1998
- o.value = i;
1995
+ ), M(
1996
+ () => t.modelValue,
1997
+ (r) => {
1998
+ a.value = r;
1999
1999
  }
2000
- ), n({
2001
- filterRef: a
2002
- }), (i, h) => (c(), w("div", Ol, [
2003
- u("div", zl, [
2004
- u("div", Nl, [
2005
- u("div", Yl, [
2006
- u("span", Pl, A(t.label), 1)
2000
+ ), o({
2001
+ filterRef: l
2002
+ }), (r, c) => (f(), _("div", zl, [
2003
+ d("div", Nl, [
2004
+ d("div", Yl, [
2005
+ d("div", Pl, [
2006
+ d("span", ql, S(r.label), 1)
2007
2007
  ]),
2008
- typeof o.value == "string" && o.value.trim() !== "" || Array.isArray(o.value) && o.value.length > 0 && o.value.some((k) => k !== void 0) || o.value === null ? (c(), M(We, {
2008
+ typeof a.value == "string" && a.value.trim() !== "" || Array.isArray(a.value) && a.value.length > 0 && a.value.some((C) => C !== void 0) || a.value === null ? (f(), R(We, {
2009
2009
  key: 0,
2010
- onClick: y
2011
- })) : $("", !0)
2010
+ onClick: p
2011
+ })) : V("", !0)
2012
2012
  ]),
2013
- u("div", ql, [
2014
- e(b)?.type !== "select" ? (c(), M(J(e(b)?.component), P({ key: 0 }, l, {
2015
- type: e(b)?.type,
2016
- onChange: h[0] || (h[0] = (k) => p(k.name, k.value)),
2017
- onClear: h[1] || (h[1] = (k) => f(k)),
2013
+ d("div", Wl, [
2014
+ e(x)?.type !== "select" ? (f(), R(J(e(x)?.component), q({ key: 0 }, t, {
2015
+ type: e(x)?.type,
2016
+ onChange: c[0] || (c[0] = (C) => m(C.name, C.value)),
2017
+ onClear: c[1] || (c[1] = (C) => v(C)),
2018
2018
  ref_key: "filterRef",
2019
- ref: a
2020
- }), null, 16, ["type"])) : (c(), M(xe, {
2019
+ ref: l
2020
+ }), null, 16, ["type"])) : (f(), R(be, {
2021
2021
  key: 1,
2022
- "current-value": o.value,
2023
- label: t.label,
2024
- mode: t.mode,
2025
- onClear: y,
2026
- fieldRef: a.value,
2022
+ "current-value": a.value,
2023
+ label: r.label,
2024
+ mode: r.mode,
2025
+ onClear: p,
2026
+ fieldRef: l.value,
2027
2027
  width: void 0,
2028
- disabled: t.disabled,
2028
+ disabled: r.disabled,
2029
2029
  layout: "vertical"
2030
2030
  }, {
2031
2031
  default: te(() => [
2032
- (c(), M(J(e(b)?.component), P({
2032
+ (f(), R(J(e(x)?.component), q({
2033
2033
  ref_key: "filterRef",
2034
- ref: a
2035
- }, l, {
2036
- type: e(b)?.type,
2037
- onChange: h[2] || (h[2] = (k) => p(k.name, k.value)),
2038
- onClear: h[3] || (h[3] = (k) => f(k))
2034
+ ref: l
2035
+ }, t, {
2036
+ type: e(x)?.type,
2037
+ onChange: c[2] || (c[2] = (C) => m(C.name, C.value)),
2038
+ onClear: c[3] || (c[3] = (C) => v(C))
2039
2039
  }), null, 16, ["type"]))
2040
2040
  ]),
2041
2041
  _: 1
@@ -2044,7 +2044,7 @@ const Ol = { style: { display: "inline-flex", margin: "0px", width: "100%" } },
2044
2044
  ])
2045
2045
  ]));
2046
2046
  }
2047
- }), Se = /* @__PURE__ */ U({
2047
+ }), Ve = /* @__PURE__ */ O({
2048
2048
  __name: "inline-layout",
2049
2049
  props: {
2050
2050
  id: {},
@@ -2072,63 +2072,63 @@ const Ol = { style: { display: "inline-flex", margin: "0px", width: "100%" } },
2072
2072
  ua: {}
2073
2073
  },
2074
2074
  emits: ["update:modelValue", "change", "clear"],
2075
- setup(t, { expose: n, emit: v }) {
2076
- const l = t, r = v, a = S(), b = he(l.type, l.layout), o = E({
2077
- get: () => l.modelValue,
2078
- set: (y) => r("update:modelValue", y)
2075
+ setup(u, { expose: o, emit: b }) {
2076
+ const t = u, n = b, l = $(), x = he(t.type, t.layout), a = E({
2077
+ get: () => t.modelValue,
2078
+ set: (p) => n("update:modelValue", p)
2079
2079
  });
2080
- function f(y = l.name) {
2081
- r("clear", y);
2080
+ function v(p = t.name) {
2081
+ n("clear", p);
2082
2082
  }
2083
- function p(y, i) {
2084
- r("change", { name: y, value: i }), l.modelValue !== void 0 && r("update:modelValue", i);
2083
+ function m(p, r) {
2084
+ n("change", { name: p, value: r }), t.modelValue !== void 0 && n("update:modelValue", r);
2085
2085
  }
2086
- return F(
2087
- () => l.default,
2088
- (y) => {
2089
- o.value = y;
2086
+ return M(
2087
+ () => t.default,
2088
+ (p) => {
2089
+ a.value = p;
2090
2090
  }
2091
- ), F(
2092
- () => l.modelValue,
2093
- (y) => {
2094
- o.value = y;
2091
+ ), M(
2092
+ () => t.modelValue,
2093
+ (p) => {
2094
+ a.value = p;
2095
2095
  }
2096
- ), n({
2097
- filterRef: a
2098
- }), (y, i) => ["text", "date"].includes(t.type.toLocaleLowerCase()) ? (c(), M(J(e(b)?.component), P({ key: 0 }, l, {
2099
- type: e(b)?.type,
2100
- onChange: i[0] || (i[0] = (h) => p(h.name, h.value)),
2101
- onClear: i[1] || (i[1] = (h) => f(h)),
2102
- disabled: t.disabled,
2103
- modelValue: o.value,
2104
- "onUpdate:modelValue": i[2] || (i[2] = (h) => o.value = h)
2105
- }), null, 16, ["type", "disabled", "modelValue"])) : (c(), M(xe, {
2096
+ ), o({
2097
+ filterRef: l
2098
+ }), (p, r) => ["text", "date"].includes(p.type.toLocaleLowerCase()) ? (f(), R(J(e(x)?.component), q({ key: 0 }, t, {
2099
+ type: e(x)?.type,
2100
+ onChange: r[0] || (r[0] = (c) => m(c.name, c.value)),
2101
+ onClear: r[1] || (r[1] = (c) => v(c)),
2102
+ disabled: p.disabled,
2103
+ modelValue: a.value,
2104
+ "onUpdate:modelValue": r[2] || (r[2] = (c) => a.value = c)
2105
+ }), null, 16, ["type", "disabled", "modelValue"])) : (f(), R(be, {
2106
2106
  key: 1,
2107
- "current-value": o.value,
2108
- label: t.label,
2109
- mode: t.mode,
2110
- onClear: f,
2111
- fieldRef: a.value,
2112
- width: l.width,
2113
- disabled: t.disabled,
2107
+ "current-value": a.value,
2108
+ label: p.label,
2109
+ mode: p.mode,
2110
+ onClear: v,
2111
+ fieldRef: l.value,
2112
+ width: t.width,
2113
+ disabled: p.disabled,
2114
2114
  layout: "inline"
2115
2115
  }, {
2116
2116
  default: te(() => [
2117
- (c(), M(J(e(b)?.component), P({
2117
+ (f(), R(J(e(x)?.component), q({
2118
2118
  ref_key: "filterRef",
2119
- ref: a
2120
- }, l, {
2121
- modelValue: o.value,
2122
- "onUpdate:modelValue": i[3] || (i[3] = (h) => o.value = h),
2123
- type: e(b)?.type,
2124
- onChange: i[4] || (i[4] = (h) => p(h.name, h.value)),
2125
- onClear: i[5] || (i[5] = (h) => f(h))
2119
+ ref: l
2120
+ }, t, {
2121
+ modelValue: a.value,
2122
+ "onUpdate:modelValue": r[3] || (r[3] = (c) => a.value = c),
2123
+ type: e(x)?.type,
2124
+ onChange: r[4] || (r[4] = (c) => m(c.name, c.value)),
2125
+ onClear: r[5] || (r[5] = (c) => v(c))
2126
2126
  }), null, 16, ["modelValue", "type"]))
2127
2127
  ]),
2128
2128
  _: 1
2129
2129
  }, 8, ["current-value", "label", "mode", "fieldRef", "width", "disabled"]));
2130
2130
  }
2131
- }), Ql = /* @__PURE__ */ U({
2131
+ }), Hl = /* @__PURE__ */ O({
2132
2132
  __name: "popover-layout",
2133
2133
  props: {
2134
2134
  id: {},
@@ -2156,45 +2156,45 @@ const Ol = { style: { display: "inline-flex", margin: "0px", width: "100%" } },
2156
2156
  ua: {}
2157
2157
  },
2158
2158
  emits: ["update:modelValue", "change", "clear"],
2159
- setup(t, { expose: n, emit: v }) {
2160
- const l = t, r = v, a = S(), b = S(he(l.type, l.layout)), o = E({
2161
- get: () => l.modelValue,
2162
- set: (y) => r("update:modelValue", y)
2159
+ setup(u, { expose: o, emit: b }) {
2160
+ const t = u, n = b, l = $(), x = $(he(t.type, t.layout)), a = E({
2161
+ get: () => t.modelValue,
2162
+ set: (p) => n("update:modelValue", p)
2163
2163
  });
2164
- function f(y) {
2165
- r("clear", y);
2164
+ function v(p) {
2165
+ n("clear", p);
2166
2166
  }
2167
- function p(y, i) {
2168
- r("change", { name: y, value: i }), l.modelValue !== void 0 && r("update:modelValue", i);
2167
+ function m(p, r) {
2168
+ n("change", { name: p, value: r }), t.modelValue !== void 0 && n("update:modelValue", r);
2169
2169
  }
2170
- return F(
2171
- () => l.default,
2172
- (y) => {
2173
- o.value = y;
2170
+ return M(
2171
+ () => t.default,
2172
+ (p) => {
2173
+ a.value = p;
2174
2174
  }
2175
- ), F(
2176
- () => l.modelValue,
2177
- (y) => {
2178
- o.value = y;
2175
+ ), M(
2176
+ () => t.modelValue,
2177
+ (p) => {
2178
+ a.value = p;
2179
2179
  }
2180
- ), F(
2181
- () => l,
2182
- (y) => {
2183
- o.value = y;
2180
+ ), M(
2181
+ () => t,
2182
+ (p) => {
2183
+ a.value = p;
2184
2184
  }
2185
- ), n({
2186
- filterRef: a
2187
- }), (y, i) => (c(), M(J(b.value?.component), P(l, {
2188
- type: b.value?.type,
2189
- modelValue: o.value,
2190
- "onUpdate:modelValue": i[0] || (i[0] = (h) => o.value = h),
2191
- onChange: i[1] || (i[1] = (h) => p(h.name, h.value)),
2192
- onClear: i[2] || (i[2] = (h) => f(h)),
2185
+ ), o({
2186
+ filterRef: l
2187
+ }), (p, r) => (f(), R(J(x.value?.component), q(t, {
2188
+ type: x.value?.type,
2189
+ modelValue: a.value,
2190
+ "onUpdate:modelValue": r[0] || (r[0] = (c) => a.value = c),
2191
+ onChange: r[1] || (r[1] = (c) => m(c.name, c.value)),
2192
+ onClear: r[2] || (r[2] = (c) => v(c)),
2193
2193
  ref_key: "filterRef",
2194
- ref: a
2194
+ ref: l
2195
2195
  }), null, 16, ["type", "modelValue"]));
2196
2196
  }
2197
- }), le = /* @__PURE__ */ U({
2197
+ }), le = /* @__PURE__ */ O({
2198
2198
  __name: "filter-field",
2199
2199
  props: {
2200
2200
  id: {},
@@ -2222,182 +2222,182 @@ const Ol = { style: { display: "inline-flex", margin: "0px", width: "100%" } },
2222
2222
  ua: {}
2223
2223
  },
2224
2224
  emits: ["update:modelValue", "change", "clear"],
2225
- setup(t, { expose: n, emit: v }) {
2226
- const l = t, r = v, a = S(), b = E({
2227
- get: () => l.modelValue,
2228
- set: (y) => r("update:modelValue", y)
2225
+ setup(u, { expose: o, emit: b }) {
2226
+ const t = u, n = b, l = $(), x = E({
2227
+ get: () => t.modelValue,
2228
+ set: (p) => n("update:modelValue", p)
2229
2229
  });
2230
- function o(y) {
2231
- r("clear", y);
2230
+ function a(p) {
2231
+ n("clear", p);
2232
2232
  }
2233
- function f(y, i) {
2234
- r("change", { name: y, value: i }), l.modelValue !== void 0 && r("update:modelValue", i);
2233
+ function v(p, r) {
2234
+ n("change", { name: p, value: r }), t.modelValue !== void 0 && n("update:modelValue", r);
2235
2235
  }
2236
- F(
2237
- () => l.default,
2238
- (y) => {
2239
- b.value = y;
2236
+ M(
2237
+ () => t.default,
2238
+ (p) => {
2239
+ x.value = p;
2240
2240
  }
2241
- ), F(
2242
- () => l.modelValue,
2243
- (y) => {
2244
- b.value = y;
2241
+ ), M(
2242
+ () => t.modelValue,
2243
+ (p) => {
2244
+ x.value = p;
2245
2245
  }
2246
- ), n({
2247
- filterRef: a
2246
+ ), o({
2247
+ filterRef: l
2248
2248
  });
2249
- function p() {
2250
- switch (l.layout) {
2249
+ function m() {
2250
+ switch (t.layout) {
2251
2251
  case "inline":
2252
- return Se;
2252
+ return Ve;
2253
2253
  case "vertical":
2254
- return Wl;
2255
- case "popover":
2256
2254
  return Ql;
2255
+ case "popover":
2256
+ return Hl;
2257
2257
  default:
2258
- return Se;
2258
+ return Ve;
2259
2259
  }
2260
2260
  }
2261
- return (y, i) => (c(), M(J(p()), P(l, {
2262
- onChange: i[0] || (i[0] = (h) => f(h.name, h.value)),
2263
- onClear: i[1] || (i[1] = (h) => o(h)),
2264
- modelValue: b.value,
2265
- "onUpdate:modelValue": i[2] || (i[2] = (h) => b.value = h)
2261
+ return (p, r) => (f(), R(J(m()), q(t, {
2262
+ onChange: r[0] || (r[0] = (c) => v(c.name, c.value)),
2263
+ onClear: r[1] || (r[1] = (c) => a(c)),
2264
+ modelValue: x.value,
2265
+ "onUpdate:modelValue": r[2] || (r[2] = (c) => x.value = c)
2266
2266
  }), null, 16, ["modelValue"]));
2267
2267
  }
2268
2268
  });
2269
- function ke(t, n) {
2269
+ function xe(u, o) {
2270
2270
  const {
2271
- slots: v
2272
- } = t, l = S(t.value ?? {}), r = E(() => (se(v?.default?.()) ?? []).flatMap((g) => Array.isArray(g.children) ? g.children : [g]));
2273
- function a(s) {
2274
- delete l.value[s], n("clear", {
2275
- data: se(l.value),
2271
+ slots: b
2272
+ } = u, t = $(u.value ?? {}), n = E(() => (se(b?.default?.()) ?? []).flatMap((h) => Array.isArray(h.children) ? h.children : [h]));
2273
+ function l(s) {
2274
+ delete t.value[s], o("clear", {
2275
+ data: se(t.value),
2276
2276
  name: s
2277
2277
  });
2278
2278
  }
2279
- function b(s, g) {
2280
- g === void 0 ? a(s) : l.value = {
2281
- ...l.value,
2282
- [s]: g
2283
- }, n("change", {
2284
- data: se(l.value),
2279
+ function x(s, h) {
2280
+ h === void 0 ? l(s) : t.value = {
2281
+ ...t.value,
2282
+ [s]: h
2283
+ }, o("change", {
2284
+ data: se(t.value),
2285
2285
  name: s,
2286
- value: g
2286
+ value: h
2287
2287
  });
2288
2288
  }
2289
- const o = E(() => r.value.map((s) => {
2290
- const g = s.props?.name;
2289
+ const a = E(() => n.value.map((s) => {
2290
+ const h = s.props?.name;
2291
2291
  return Ne(s, {
2292
2292
  ...s.props,
2293
- layout: t.view,
2293
+ layout: u.view,
2294
2294
  showClean: !0,
2295
- modelValue: l.value[g],
2296
- "onUpdate:modelValue": (C) => {
2297
- b(g, C);
2295
+ modelValue: t.value[h],
2296
+ "onUpdate:modelValue": (y) => {
2297
+ x(h, y);
2298
2298
  },
2299
- onClear: () => a(g)
2299
+ onClear: () => l(h)
2300
2300
  });
2301
- })), f = E(
2301
+ })), v = E(
2302
2302
  () => new Map(
2303
- o.value.map((s) => {
2304
- const g = s.props?.name;
2305
- return g ? [g, s] : null;
2303
+ a.value.map((s) => {
2304
+ const h = s.props?.name;
2305
+ return h ? [h, s] : null;
2306
2306
  }).filter((s) => s !== null)
2307
2307
  )
2308
2308
  );
2309
- function p(s = !1) {
2310
- l.value = {}, s || n("clearAll", {
2311
- data: se(l.value),
2309
+ function m(s = !1) {
2310
+ t.value = {}, s || o("clearAll", {
2311
+ data: se(t.value),
2312
2312
  name: "ALL"
2313
2313
  });
2314
2314
  }
2315
- const y = S(""), i = E(() => t.schema?.value ? Object.entries(l.value).filter(([s, g]) => t.schema && !(s in t.schema.value) ? !1 : Array.isArray(g) ? g.some((C) => C !== "" && C !== void 0) : g !== "" && g !== void 0).length : 0), h = S();
2316
- F(y, async () => {
2317
- await ve(), h?.value?.filterRef?.inputTextRef && h.value.filterRef.inputTextRef.focus();
2315
+ const p = $(""), r = E(() => u.schema?.value ? Object.entries(t.value).filter(([s, h]) => u.schema && !(s in u.schema.value) ? !1 : Array.isArray(h) ? h.some((y) => y !== "" && y !== void 0) : h !== "" && h !== void 0).length : 0), c = $();
2316
+ M(p, async () => {
2317
+ await pe(), c?.value?.filterRef?.inputTextRef && c.value.filterRef.inputTextRef.focus();
2318
2318
  });
2319
- const k = E(() => t.schema?.value ? Object.fromEntries(Object.entries(t.schema?.value).slice(0, t.limit)) : {}), V = E(() => {
2320
- if (o.value.length === 0) return [];
2319
+ const C = E(() => u.schema?.value ? Object.fromEntries(Object.entries(u.schema?.value).slice(0, u.limit)) : {}), k = E(() => {
2320
+ if (a.value.length === 0) return [];
2321
2321
  let s = 0;
2322
- if (t.schema?.value) {
2323
- const g = Object.entries(t.schema.value).length;
2324
- t.limit && g < t.limit ? s = t.limit - g : s = 0;
2322
+ if (u.schema?.value) {
2323
+ const h = Object.entries(u.schema.value).length;
2324
+ u.limit && h < u.limit ? s = u.limit - h : s = 0;
2325
2325
  }
2326
- return o.value.slice(0, s);
2327
- }), m = E(() => o.value.length === 0 ? [] : t.view !== "inline" ? o.value : o.value.slice(V.value.length));
2326
+ return a.value.slice(0, s);
2327
+ }), g = E(() => a.value.length === 0 ? [] : u.view !== "inline" ? a.value : a.value.slice(k.value.length));
2328
2328
  return {
2329
- activeFilter: l,
2330
- activeFilterCount: i,
2331
- onFilterChange: b,
2332
- clearFilter: a,
2333
- clearAllFilters: p,
2334
- limitedSchema: k,
2335
- filtersSlot: o,
2336
- limitedFiltersSlot: V,
2337
- popoverFiltersSlot: m,
2338
- vnodeMap: f,
2339
- selectedFilter: y,
2340
- filterRef: h
2329
+ activeFilter: t,
2330
+ activeFilterCount: r,
2331
+ onFilterChange: x,
2332
+ clearFilter: l,
2333
+ clearAllFilters: m,
2334
+ limitedSchema: C,
2335
+ filtersSlot: a,
2336
+ limitedFiltersSlot: k,
2337
+ popoverFiltersSlot: g,
2338
+ vnodeMap: v,
2339
+ selectedFilter: p,
2340
+ filterRef: c
2341
2341
  };
2342
2342
  }
2343
- const Hl = /* @__PURE__ */ U({
2343
+ const Gl = /* @__PURE__ */ O({
2344
2344
  __name: "popover",
2345
2345
  emits: ["open", "close"],
2346
- setup(t, { emit: n }) {
2347
- const v = S(!1), l = S(null), r = S(null), a = S(null), b = S({ top: "0px", left: "0px", position: "absolute" });
2348
- function o() {
2349
- v.value = !v.value;
2346
+ setup(u, { emit: o }) {
2347
+ const b = $(!1), t = $(null), n = $(null), l = $(null), x = $({ top: "0px", left: "0px", position: "absolute" });
2348
+ function a() {
2349
+ b.value = !b.value;
2350
2350
  }
2351
- function f() {
2352
- const k = a.value, V = l.value;
2353
- if (!k || !V) return;
2354
- const m = k.getBoundingClientRect(), s = V.offsetWidth, g = window.innerWidth - m.left;
2355
- let C = m.left + window.scrollX;
2356
- s > g && (C = window.innerWidth - s - 8, C < 8 && (C = 8)), b.value = {
2351
+ function v() {
2352
+ const C = l.value, k = t.value;
2353
+ if (!C || !k) return;
2354
+ const g = C.getBoundingClientRect(), s = k.offsetWidth, h = window.innerWidth - g.left;
2355
+ let y = g.left + window.scrollX;
2356
+ s > h && (y = window.innerWidth - s - 8, y < 8 && (y = 8)), x.value = {
2357
2357
  position: "absolute",
2358
- top: `${m.bottom + window.scrollY + 8}px`,
2359
- left: `${C}px`
2358
+ top: `${g.bottom + window.scrollY + 8}px`,
2359
+ left: `${y}px`
2360
2360
  };
2361
2361
  }
2362
- const p = E(() => Object.entries(b.value).map((k) => k.join(":")).join(";"));
2363
- function y(k) {
2364
- const V = k.target;
2365
- !a.value?.contains(k.target) && !l.value?.contains(k.target) && !V.closest("[data-inside-popover]") && (v.value = !1);
2362
+ const m = E(() => Object.entries(x.value).map((C) => C.join(":")).join(";"));
2363
+ function p(C) {
2364
+ const k = C.target;
2365
+ !l.value?.contains(C.target) && !t.value?.contains(C.target) && !k.closest("[data-inside-popover]") && (b.value = !1);
2366
2366
  }
2367
- const i = S(!1);
2367
+ const r = $(!1);
2368
2368
  ue(() => {
2369
- i.value = !0;
2369
+ r.value = !0;
2370
2370
  }), ue(() => {
2371
- a.value = r.value?.querySelector("[data-popover-trigger]") || null, a.value?.addEventListener("click", o), document.addEventListener("click", y), window.addEventListener("resize", f), window.addEventListener("scroll", f, !0);
2372
- }), me(() => {
2373
- a.value?.removeEventListener("click", o), document.removeEventListener("click", y), window.removeEventListener("resize", f), window.removeEventListener("scroll", f, !0);
2371
+ l.value = n.value?.querySelector("[data-popover-trigger]") || null, l.value?.addEventListener("click", a), document.addEventListener("click", p), window.addEventListener("resize", v), window.addEventListener("scroll", v, !0);
2372
+ }), fe(() => {
2373
+ l.value?.removeEventListener("click", a), document.removeEventListener("click", p), window.removeEventListener("resize", v), window.removeEventListener("scroll", v, !0);
2374
2374
  });
2375
- const h = n;
2376
- return F(v, async (k) => {
2377
- k ? (h("open"), await ve(), f()) : h("close");
2378
- }), (k, V) => (c(), w("div", {
2375
+ const c = o;
2376
+ return M(b, async (C) => {
2377
+ C ? (c("open"), await pe(), v()) : c("close");
2378
+ }), (C, k) => (f(), _("div", {
2379
2379
  ref_key: "wrapperRef",
2380
- ref: r
2380
+ ref: n
2381
2381
  }, [
2382
- ce(k.$slots, "trigger"),
2383
- i.value ? (c(), M(Re, {
2382
+ de(C.$slots, "trigger"),
2383
+ r.value ? (f(), R(De, {
2384
2384
  key: 0,
2385
2385
  to: "body"
2386
2386
  }, [
2387
- I(u("div", {
2387
+ U(d("div", {
2388
2388
  ref_key: "popoverRef",
2389
- ref: l,
2389
+ ref: t,
2390
2390
  class: "absolute z-[50] w-[600px] rounded-md border bg-white shadow-md",
2391
- style: Me(p.value)
2391
+ style: Be(m.value)
2392
2392
  }, [
2393
- ce(k.$slots, "default")
2393
+ de(C.$slots, "default")
2394
2394
  ], 4), [
2395
- [H, v.value]
2395
+ [G, b.value]
2396
2396
  ])
2397
- ])) : $("", !0)
2397
+ ])) : V("", !0)
2398
2398
  ], 512));
2399
2399
  }
2400
- }), Gl = {}, Xl = {
2400
+ }), Xl = {}, Zl = {
2401
2401
  xmlns: "http://www.w3.org/2000/svg",
2402
2402
  width: "24",
2403
2403
  height: "24",
@@ -2409,27 +2409,27 @@ const Hl = /* @__PURE__ */ U({
2409
2409
  "stroke-linejoin": "round",
2410
2410
  class: "lucide lucide-filter h-4 w-4"
2411
2411
  };
2412
- function Zl(t, n) {
2413
- return c(), w("svg", Xl, [...n[0] || (n[0] = [
2414
- u("polygon", { points: "22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3" }, null, -1)
2415
- ])]);
2412
+ function Jl(u, o) {
2413
+ return f(), _("svg", Zl, o[0] || (o[0] = [
2414
+ d("polygon", { points: "22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3" }, null, -1)
2415
+ ]));
2416
2416
  }
2417
- const Jl = /* @__PURE__ */ G(Gl, [["render", Zl]]), ea = {
2417
+ const eo = /* @__PURE__ */ X(Xl, [["render", Jl]]), to = {
2418
2418
  key: 0,
2419
2419
  class: "inline-flex rounded-sm items-center border font-semibold border-transparent hover:bg-secondary/80 bg-blue-500 text-white text-xs px-1.5"
2420
- }, ta = { class: "flex" }, la = { class: "w-64 border-r border-gray-200" }, aa = { class: "p-2" }, na = ["onClick"], oa = { class: "flex items-center gap-2" }, ra = { class: "text-sm font-medium" }, sa = {
2420
+ }, lo = { class: "flex" }, oo = { class: "w-64 border-r border-gray-200" }, ao = { class: "p-2" }, no = ["onClick"], ro = { class: "flex items-center gap-2" }, so = { class: "text-sm font-medium" }, io = {
2421
2421
  key: 0,
2422
2422
  class: "inline-flex items-center rounded-full border font-semibold transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent hover:bg-secondary/80 bg-blue-100 text-blue-700 text-xs p-2"
2423
- }, ia = ["onClick"], ua = { class: "flex items-center gap-2" }, ca = { class: "text-sm font-medium" }, da = {
2423
+ }, uo = ["onClick"], co = { class: "flex items-center gap-2" }, fo = { class: "text-sm font-medium" }, po = {
2424
2424
  key: 0,
2425
2425
  class: "inline-flex items-center rounded-full border font-semibold transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent hover:bg-secondary/80 bg-blue-100 text-blue-700 text-xs p-2"
2426
- }, fa = {
2426
+ }, mo = {
2427
2427
  key: 0,
2428
2428
  class: "p-2 border-t"
2429
- }, ma = { class: "flex-1 min-h-[300px] overflow-y-auto" }, va = {
2429
+ }, vo = { class: "flex-1 min-h-[300px] overflow-y-auto" }, yo = {
2430
2430
  key: 0,
2431
2431
  class: "flex items-center justify-center h-full text-gray-500"
2432
- }, Ie = /* @__PURE__ */ U({
2432
+ }, Ie = /* @__PURE__ */ O({
2433
2433
  __name: "popover-filter-layout",
2434
2434
  props: {
2435
2435
  schema: {},
@@ -2437,151 +2437,152 @@ const Jl = /* @__PURE__ */ G(Gl, [["render", Zl]]), ea = {
2437
2437
  value: {},
2438
2438
  history: { type: Boolean },
2439
2439
  mode: {},
2440
- limit: { default: 3 }
2440
+ limit: { default: 3 },
2441
+ width: {}
2441
2442
  },
2442
2443
  emits: ["change", "clear", "clearAll"],
2443
- setup(t, { expose: n, emit: v }) {
2444
- const l = t, r = Ee(l.mode), a = pe(), b = v, o = S({}), f = E(() => o?.value ? l.view !== "inline" ? o?.value : Object.fromEntries(Object.entries(o?.value).slice(l.limit)) : {}), {
2445
- activeFilter: p,
2446
- activeFilterCount: y,
2447
- onFilterChange: i,
2448
- clearFilter: h,
2449
- clearAllFilters: k,
2450
- popoverFiltersSlot: V,
2451
- selectedFilter: m,
2444
+ setup(u, { expose: o, emit: b }) {
2445
+ const t = u, n = Ee(t.mode), l = me(), x = b, a = $({}), v = E(() => a?.value ? t.view !== "inline" ? a?.value : Object.fromEntries(Object.entries(a?.value).slice(t.limit)) : {}), {
2446
+ activeFilter: m,
2447
+ activeFilterCount: p,
2448
+ onFilterChange: r,
2449
+ clearFilter: c,
2450
+ clearAllFilters: C,
2451
+ popoverFiltersSlot: k,
2452
+ selectedFilter: g,
2452
2453
  filterRef: s
2453
- } = ke({
2454
- ...l,
2455
- schema: o.value,
2456
- slots: a
2457
- }, b);
2458
- function g() {
2459
- if (f.value) {
2460
- const [C] = Object.keys(f.value);
2461
- m.value = C;
2462
- } else V.value.length > 0 ? m.value = V.value[0].props.name : m.value = "";
2454
+ } = xe({
2455
+ ...t,
2456
+ schema: a.value,
2457
+ slots: l
2458
+ }, x);
2459
+ function h() {
2460
+ if (v.value) {
2461
+ const [y] = Object.keys(v.value);
2462
+ g.value = y;
2463
+ } else k.value.length > 0 ? g.value = k.value[0].props.name : g.value = "";
2463
2464
  }
2464
- return F(
2465
- () => l.schema,
2466
- (C) => {
2467
- o.value = C;
2465
+ return M(
2466
+ () => t.schema,
2467
+ (y) => {
2468
+ a.value = y;
2468
2469
  },
2469
2470
  { deep: !0, immediate: !0 }
2470
- ), n({
2471
- clearFilter: h,
2472
- clearAllFilters: k
2473
- }), (C, d) => (c(), M(Hl, {
2474
- onOpen: g,
2475
- onClose: d[5] || (d[5] = (x) => m.value = "")
2471
+ ), o({
2472
+ clearFilter: c,
2473
+ clearAllFilters: C
2474
+ }), (y, i) => (f(), R(Gl, {
2475
+ onOpen: h,
2476
+ onClose: i[5] || (i[5] = (w) => g.value = "")
2476
2477
  }, {
2477
2478
  trigger: te(() => [
2478
- u("button", {
2479
+ d("button", {
2479
2480
  "data-popover-trigger": "",
2480
2481
  "aria-haspopup": "dialog",
2481
2482
  "aria-expanded": "false",
2482
- class: _(
2483
- e(r) + (e(y) > 0 ? "bg-blue-50 border-blue-200 text-blue-700 hover:bg-blue-100" : "text-gray-800 hover:bg-gray-200 focus:bg-gray-200")
2483
+ class: K(
2484
+ e(n) + (e(p) > 0 ? "bg-blue-50 border-blue-200 text-blue-700 hover:bg-blue-100" : "text-gray-800 hover:bg-gray-200 focus:bg-gray-200")
2484
2485
  ),
2485
2486
  type: "button"
2486
2487
  }, [
2487
- Y(Jl),
2488
- d[6] || (d[6] = z(" Фільтр ", -1)),
2489
- e(y) > 0 ? (c(), w("div", ea, A(e(y)), 1)) : $("", !0)
2488
+ P(eo),
2489
+ i[6] || (i[6] = N(" Фільтр ", -1)),
2490
+ e(p) > 0 ? (f(), _("div", to, S(e(p)), 1)) : V("", !0)
2490
2491
  ], 2)
2491
2492
  ]),
2492
2493
  default: te(() => [
2493
- u("div", ta, [
2494
- u("div", la, [
2495
- d[7] || (d[7] = u("div", { class: "p-4 border-b" }, [
2496
- u("p", { class: "text-sm text-gray-600" }, "Select a field to start creating a filter.")
2494
+ d("div", lo, [
2495
+ d("div", oo, [
2496
+ i[7] || (i[7] = d("div", { class: "p-4 border-b" }, [
2497
+ d("p", { class: "text-sm text-gray-600" }, "Select a field to start creating a filter.")
2497
2498
  ], -1)),
2498
- u("div", aa, [
2499
- t.schema ? (c(!0), w(j, { key: 0 }, q(Object.entries(f.value), ([x, B]) => (c(), w("button", {
2500
- key: x,
2499
+ d("div", ao, [
2500
+ y.schema ? (f(!0), _(F, { key: 0 }, W(Object.entries(v.value), ([w, D]) => (f(), _("button", {
2501
+ key: w,
2501
2502
  onClick: () => {
2502
- m.value = x;
2503
+ g.value = w;
2503
2504
  },
2504
- class: _([
2505
+ class: K([
2505
2506
  "w-full flex items-center justify-between px-3 py-2 text-left hover:bg-gray-50 transition-colors",
2506
- e(m) === x ? "bg-blue-50 text-blue-700 border-l-2 border-blue-500" : "text-gray-700"
2507
+ e(g) === w ? "bg-blue-50 text-blue-700 border-l-2 border-blue-500" : "text-gray-700"
2507
2508
  ])
2508
2509
  }, [
2509
- u("div", oa, [
2510
- u("span", ra, A(B.label), 1)
2510
+ d("div", ro, [
2511
+ d("span", so, S(D.label), 1)
2511
2512
  ]),
2512
- (Array.isArray(e(p)[x]) ? e(p)[x]?.length > 0 : e(p)[x] || e(p)[x] === null) ? (c(), w("div", sa)) : $("", !0)
2513
- ], 10, na))), 128)) : $("", !0),
2514
- (c(!0), w(j, null, q(e(V), (x, B) => (c(), w("button", {
2515
- key: "slot-" + B,
2516
- onClick: (R) => m.value = x.props.name,
2517
- class: _([
2513
+ (Array.isArray(e(m)[w]) ? e(m)[w]?.length > 0 : e(m)[w] || e(m)[w] === null) ? (f(), _("div", io)) : V("", !0)
2514
+ ], 10, no))), 128)) : V("", !0),
2515
+ (f(!0), _(F, null, W(e(k), (w, D) => (f(), _("button", {
2516
+ key: "slot-" + D,
2517
+ onClick: (B) => g.value = w.props.name,
2518
+ class: K([
2518
2519
  "w-full flex items-center justify-between px-3 py-2 text-left hover:bg-gray-50 transition-colors",
2519
- e(m) === x.props.name ? "bg-blue-50 text-blue-700 border-l-2 border-blue-500" : ""
2520
+ e(g) === w.props.name ? "bg-blue-50 text-blue-700 border-l-2 border-blue-500" : ""
2520
2521
  ])
2521
2522
  }, [
2522
- u("div", ua, [
2523
- u("span", ca, A(x.props.label), 1)
2523
+ d("div", co, [
2524
+ d("span", fo, S(w.props.label), 1)
2524
2525
  ]),
2525
- e(p)[x.props.name]?.length > 0 ? (c(), w("div", da)) : $("", !0)
2526
- ], 10, ia))), 128))
2526
+ e(m)[w.props.name]?.length > 0 ? (f(), _("div", po)) : V("", !0)
2527
+ ], 10, uo))), 128))
2527
2528
  ]),
2528
- e(y) > 0 ? (c(), w("div", fa, [
2529
- u("button", {
2529
+ e(p) > 0 ? (f(), _("div", mo, [
2530
+ d("button", {
2530
2531
  class: "w-full px-3 py-2 text-left text-sm text-gray-600 hover:bg-gray-50 transition-colors",
2531
- onClick: d[0] || (d[0] = (x) => e(k)()),
2532
+ onClick: i[0] || (i[0] = (w) => e(C)()),
2532
2533
  "data-inside-popover": ""
2533
2534
  }, " Очистити всі ")
2534
- ])) : $("", !0)
2535
+ ])) : V("", !0)
2535
2536
  ]),
2536
- u("div", ma, [
2537
- e(m) === "" ? (c(), w("div", va, [...d[8] || (d[8] = [
2538
- u("p", { class: "text-sm" }, "Select a field to start creating a filter.", -1)
2539
- ])])) : $("", !0),
2540
- e(m) ? (c(), w(j, { key: 1 }, [
2541
- f.value ? (c(!0), w(j, { key: 0 }, q(Object.entries(f.value), ([x, B]) => (c(), w(j, null, [
2542
- e(m) === x ? (c(), M(le, P({
2543
- key: x,
2537
+ d("div", vo, [
2538
+ e(g) === "" ? (f(), _("div", yo, i[8] || (i[8] = [
2539
+ d("p", { class: "text-sm" }, "Select a field to start creating a filter.", -1)
2540
+ ]))) : V("", !0),
2541
+ e(g) ? (f(), _(F, { key: 1 }, [
2542
+ v.value ? (f(!0), _(F, { key: 0 }, W(Object.entries(v.value), ([w, D]) => (f(), _(F, null, [
2543
+ e(g) === w ? (f(), R(le, q({
2544
+ key: w,
2544
2545
  layout: "popover",
2545
2546
  ref_for: !0,
2546
2547
  ref_key: "filterRef",
2547
2548
  ref: s
2548
- }, { ref_for: !0 }, B, {
2549
- onChange: d[1] || (d[1] = (R) => e(i)(R.name, R.value)),
2550
- onClear: d[2] || (d[2] = (R) => {
2551
- e(h)(R), e(i)(R, void 0);
2549
+ }, { ref_for: !0 }, D, {
2550
+ onChange: i[1] || (i[1] = (B) => e(r)(B.name, B.value)),
2551
+ onClear: i[2] || (i[2] = (B) => {
2552
+ e(c)(B), e(r)(B, void 0);
2552
2553
  }),
2553
- modelValue: e(p)[x],
2554
- "onUpdate:modelValue": (R) => e(p)[x] = R,
2554
+ modelValue: e(m)[w],
2555
+ "onUpdate:modelValue": (B) => e(m)[w] = B,
2555
2556
  cleanable: !0
2556
- }), null, 16, ["modelValue", "onUpdate:modelValue"])) : $("", !0)
2557
- ], 64))), 256)) : $("", !0),
2558
- (c(!0), w(j, null, q(e(V), (x, B) => (c(), w(j, {
2559
- key: "slot-" + B
2557
+ }), null, 16, ["modelValue", "onUpdate:modelValue"])) : V("", !0)
2558
+ ], 64))), 256)) : V("", !0),
2559
+ (f(!0), _(F, null, W(e(k), (w, D) => (f(), _(F, {
2560
+ key: "slot-" + D
2560
2561
  }, [
2561
- e(m) === x.props.name ? (c(), M(le, P({
2562
+ e(g) === w.props.name ? (f(), R(le, q({
2562
2563
  key: 0,
2563
2564
  layout: "popover"
2564
- }, { ref_for: !0 }, x.props, {
2565
+ }, { ref_for: !0 }, w.props, {
2565
2566
  ref_for: !0,
2566
2567
  ref_key: "filterRef",
2567
2568
  ref: s,
2568
- onChange: d[3] || (d[3] = (R) => e(i)(R.name, R.value)),
2569
- onClear: d[4] || (d[4] = (R) => {
2570
- e(h)(R), e(i)(R, void 0);
2569
+ onChange: i[3] || (i[3] = (B) => e(r)(B.name, B.value)),
2570
+ onClear: i[4] || (i[4] = (B) => {
2571
+ e(c)(B), e(r)(B, void 0);
2571
2572
  }),
2572
- modelValue: e(p)[x.props.name],
2573
- "onUpdate:modelValue": (R) => e(p)[x.props.name] = R,
2573
+ modelValue: e(m)[w.props.name],
2574
+ "onUpdate:modelValue": (B) => e(m)[w.props.name] = B,
2574
2575
  cleanable: !0
2575
- }), null, 16, ["modelValue", "onUpdate:modelValue"])) : $("", !0)
2576
+ }), null, 16, ["modelValue", "onUpdate:modelValue"])) : V("", !0)
2576
2577
  ], 64))), 128))
2577
- ], 64)) : $("", !0)
2578
+ ], 64)) : V("", !0)
2578
2579
  ])
2579
2580
  ])
2580
2581
  ]),
2581
2582
  _: 1
2582
2583
  }));
2583
2584
  }
2584
- }), pa = { class: "flex gap-1 items-center flex-wrap" }, Ae = /* @__PURE__ */ U({
2585
+ }), go = { class: "flex gap-1 items-center flex-wrap" }, $e = /* @__PURE__ */ O({
2585
2586
  __name: "inline-filter-layout",
2586
2587
  props: {
2587
2588
  schema: {},
@@ -2589,93 +2590,97 @@ const Jl = /* @__PURE__ */ G(Gl, [["render", Zl]]), ea = {
2589
2590
  value: {},
2590
2591
  history: { type: Boolean },
2591
2592
  mode: {},
2592
- limit: { default: 3 }
2593
+ limit: { default: 3 },
2594
+ width: {}
2593
2595
  },
2594
2596
  emits: ["change", "clear", "clearAll"],
2595
- setup(t, { expose: n, emit: v }) {
2596
- const l = re(), r = t, a = v, b = pe(), o = S({}), f = E(() => Object.keys(r.schema).length > r.limit), {
2597
- activeFilter: p,
2598
- activeFilterCount: y,
2599
- onFilterChange: i,
2600
- clearFilter: h,
2601
- clearAllFilters: k,
2602
- limitedSchema: V,
2603
- filtersSlot: m,
2597
+ setup(u, { expose: o, emit: b }) {
2598
+ const t = re(), n = u;
2599
+ console.log(n.width);
2600
+ const l = b, x = me(), a = $({}), v = E(() => Object.keys(n.schema).length > n.limit), {
2601
+ activeFilter: m,
2602
+ activeFilterCount: p,
2603
+ onFilterChange: r,
2604
+ clearFilter: c,
2605
+ clearAllFilters: C,
2606
+ limitedSchema: k,
2607
+ filtersSlot: g,
2604
2608
  limitedFiltersSlot: s
2605
- } = ke(
2609
+ } = xe(
2606
2610
  {
2607
- ...r,
2608
- schema: o,
2609
- slots: b
2611
+ ...n,
2612
+ schema: a,
2613
+ slots: x
2610
2614
  },
2611
- a
2612
- ), g = S();
2613
- function C() {
2614
- g.value && g.value.clearAllFilters(!0), k();
2615
+ l
2616
+ ), h = $();
2617
+ function y() {
2618
+ h.value && h.value.clearAllFilters(!0), C();
2615
2619
  }
2616
- return F(
2617
- () => r.schema,
2618
- (d) => {
2619
- o.value = d;
2620
+ return M(
2621
+ () => n.schema,
2622
+ (i) => {
2623
+ a.value = i;
2620
2624
  },
2621
2625
  { deep: !0, immediate: !0 }
2622
- ), n({
2623
- clearFilter: h,
2624
- clearAllFilters: k
2625
- }), (d, x) => (c(), w("div", pa, [
2626
- t.schema ? (c(!0), w(j, { key: 0 }, q(Object.entries(e(V)), ([B, R]) => (c(), M(le, P({
2627
- key: B,
2628
- mode: t.mode
2629
- }, { ref_for: !0 }, R, {
2630
- onChange: x[0] || (x[0] = (K) => e(i)(K.name, K.value)),
2631
- onClear: e(h),
2626
+ ), o({
2627
+ clearFilter: c,
2628
+ clearAllFilters: C
2629
+ }), (i, w) => (f(), _("div", go, [
2630
+ i.schema ? (f(!0), _(F, { key: 0 }, W(Object.entries(e(k)), ([D, B]) => (f(), R(le, q({
2631
+ key: D,
2632
+ mode: i.mode,
2633
+ width: i.width ? i.width : B?.width
2634
+ }, { ref_for: !0 }, B, {
2635
+ onChange: w[0] || (w[0] = (j) => e(r)(j.name, j.value)),
2636
+ onClear: e(c),
2632
2637
  layout: "inline",
2633
2638
  cleanable: !0,
2634
- modelValue: e(p)[B],
2635
- "onUpdate:modelValue": (K) => e(p)[B] = K
2636
- }), null, 16, ["mode", "onClear", "modelValue", "onUpdate:modelValue"]))), 128)) : $("", !0),
2637
- (c(!0), w(j, null, q(e(s), (B, R) => (c(), M(le, P({
2638
- key: "slot-" + R,
2639
+ modelValue: e(m)[D],
2640
+ "onUpdate:modelValue": (j) => e(m)[D] = j
2641
+ }), null, 16, ["mode", "width", "onClear", "modelValue", "onUpdate:modelValue"]))), 128)) : V("", !0),
2642
+ (f(!0), _(F, null, W(e(s), (D, B) => (f(), R(le, q({
2643
+ key: "slot-" + B,
2639
2644
  layout: "inline"
2640
- }, { ref_for: !0 }, B.props, {
2641
- onChange: x[1] || (x[1] = (K) => e(i)(K.name, K.value)),
2642
- onClear: x[2] || (x[2] = (K) => {
2643
- e(h)(K), e(i)(K, void 0);
2645
+ }, { ref_for: !0 }, D.props, {
2646
+ onChange: w[1] || (w[1] = (j) => e(r)(j.name, j.value)),
2647
+ onClear: w[2] || (w[2] = (j) => {
2648
+ e(c)(j), e(r)(j, void 0);
2644
2649
  }),
2645
2650
  cleanable: !0,
2646
- modelValue: e(p)[B.props.name],
2647
- "onUpdate:modelValue": (K) => e(p)[B.props.name] = K
2651
+ modelValue: e(m)[D.props.name],
2652
+ "onUpdate:modelValue": (j) => e(m)[D.props.name] = j
2648
2653
  }), null, 16, ["modelValue", "onUpdate:modelValue"]))), 128)),
2649
- f.value ? (c(), M(Ie, P({ key: 1 }, r, {
2650
- schema: t.schema,
2651
- limit: t.limit,
2652
- onChange: x[3] || (x[3] = (B) => e(i)(B.name, B.value)),
2653
- onClearAll: x[4] || (x[4] = (B) => e(k)()),
2654
- onClear: x[5] || (x[5] = (B) => e(h)(B.name)),
2655
- mode: t.mode,
2654
+ v.value ? (f(), R(Ie, q({ key: 1 }, n, {
2655
+ schema: i.schema,
2656
+ limit: i.limit,
2657
+ onChange: w[3] || (w[3] = (D) => e(r)(D.name, D.value)),
2658
+ onClearAll: w[4] || (w[4] = (D) => e(C)()),
2659
+ onClear: w[5] || (w[5] = (D) => e(c)(D.name)),
2660
+ mode: i.mode,
2656
2661
  ref_key: "popoverRef",
2657
- ref: g,
2662
+ ref: h,
2658
2663
  cleanable: !0
2659
2664
  }), {
2660
2665
  default: te(() => [
2661
- (c(!0), w(j, null, q(e(m), (B, R) => (c(), M(J(B), P({
2662
- key: "slot-" + R,
2666
+ (f(!0), _(F, null, W(e(g), (D, B) => (f(), R(J(D), q({
2667
+ key: "slot-" + B,
2663
2668
  layout: "popover"
2664
- }, { ref_for: !0 }, B.props, { cleanable: !0 }), null, 16))), 128))
2669
+ }, { ref_for: !0 }, D.props, { cleanable: !0 }), null, 16))), 128))
2665
2670
  ]),
2666
2671
  _: 1
2667
- }, 16, ["schema", "limit", "mode"])) : $("", !0),
2668
- e(y) > 0 ? (c(), w("button", {
2672
+ }, 16, ["schema", "limit", "mode"])) : V("", !0),
2673
+ e(p) > 0 ? (f(), _("button", {
2669
2674
  key: 2,
2670
- onClick: C,
2675
+ onClick: y,
2671
2676
  class: "relative py-2 px-3 inline-flex justify-center items-center gap-x-2 text-sm font-medium rounded-lg bg-gray-100 border border-transparent text-gray-800 hover:bg-gray-200 focus:bg-gray-200"
2672
- }, A(e(l)("filter.clear")), 1)) : $("", !0)
2677
+ }, S(e(t)("filter.clear")), 1)) : V("", !0)
2673
2678
  ]));
2674
2679
  }
2675
- }), ya = {
2680
+ }), bo = {
2676
2681
  key: 0,
2677
2682
  class: "p-2 overflow-y-auto overflow-hidden [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500 dark:bg-neutral-800 max-h-[calc(100%-142px)] h-full bg-gray-100"
2678
- }, ga = { class: "flex items-center vst-filters vsTailwind flex-col w-full" }, ba = /* @__PURE__ */ U({
2683
+ }, ho = { class: "flex items-center vst-filters vsTailwind flex-col w-full" }, xo = /* @__PURE__ */ O({
2679
2684
  __name: "vertical-filter-layout",
2680
2685
  props: {
2681
2686
  schema: {},
@@ -2683,60 +2688,61 @@ const Jl = /* @__PURE__ */ G(Gl, [["render", Zl]]), ea = {
2683
2688
  value: {},
2684
2689
  history: { type: Boolean },
2685
2690
  mode: {},
2686
- limit: { default: 3 }
2691
+ limit: { default: 3 },
2692
+ width: {}
2687
2693
  },
2688
2694
  emits: ["change", "clear", "clearAll"],
2689
- setup(t, { expose: n, emit: v }) {
2690
- const l = t, r = v, a = pe(), {
2691
- activeFilter: b,
2692
- activeFilterCount: o,
2693
- onFilterChange: f,
2694
- clearFilter: p,
2695
- clearAllFilters: y,
2696
- filtersSlot: i
2697
- } = ke({
2698
- ...l,
2699
- slots: a
2700
- }, r);
2701
- return n({
2702
- clearFilter: p,
2703
- clearAllFilters: y
2704
- }), (h, k) => t.view === "vertical" ? (c(), w("div", ya, [
2705
- u("div", ga, [
2706
- e(o) > 0 ? (c(), w("button", {
2695
+ setup(u, { expose: o, emit: b }) {
2696
+ const t = u, n = b, l = me(), {
2697
+ activeFilter: x,
2698
+ activeFilterCount: a,
2699
+ onFilterChange: v,
2700
+ clearFilter: m,
2701
+ clearAllFilters: p,
2702
+ filtersSlot: r
2703
+ } = xe({
2704
+ ...t,
2705
+ slots: l
2706
+ }, n);
2707
+ return o({
2708
+ clearFilter: m,
2709
+ clearAllFilters: p
2710
+ }), (c, C) => c.view === "vertical" ? (f(), _("div", bo, [
2711
+ d("div", ho, [
2712
+ e(a) > 0 ? (f(), _("button", {
2707
2713
  key: 0,
2708
- onClick: k[0] || (k[0] = (V) => e(y)()),
2714
+ onClick: C[0] || (C[0] = (k) => e(p)()),
2709
2715
  "data-popover-trigger": "",
2710
2716
  "aria-haspopup": "dialog",
2711
2717
  "aria-expanded": "false",
2712
2718
  class: "w-full ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:text-accent-foreground border h-10 px-4 py-2 gap-2 m-2 bg-white text-gray-800 hover:bg-gray-200 focus:bg-gray-200",
2713
2719
  type: "button"
2714
- }, " Очистити ")) : $("", !0),
2715
- t.schema ? (c(!0), w(j, { key: 1 }, q(Object.entries(t.schema), ([V, m]) => (c(), M(le, P({ layout: "vertical" }, { ref_for: !0 }, m, {
2716
- onChange: k[1] || (k[1] = (s) => e(f)(s.name, s.value)),
2717
- onClear: k[2] || (k[2] = (s) => {
2718
- e(p)(s), e(f)(s, void 0);
2720
+ }, " Очистити ")) : V("", !0),
2721
+ c.schema ? (f(!0), _(F, { key: 1 }, W(Object.entries(c.schema), ([k, g]) => (f(), R(le, q({ layout: "vertical" }, { ref_for: !0 }, g, {
2722
+ onChange: C[1] || (C[1] = (s) => e(v)(s.name, s.value)),
2723
+ onClear: C[2] || (C[2] = (s) => {
2724
+ e(m)(s), e(v)(s, void 0);
2719
2725
  }),
2720
- modelValue: e(b)[V],
2721
- "onUpdate:modelValue": (s) => e(b)[V] = s,
2726
+ modelValue: e(x)[k],
2727
+ "onUpdate:modelValue": (s) => e(x)[k] = s,
2722
2728
  showClean: !0
2723
- }), null, 16, ["modelValue", "onUpdate:modelValue"]))), 256)) : $("", !0),
2724
- (c(!0), w(j, null, q(e(i), (V, m) => (c(), M(le, P({
2725
- key: "slot-" + m,
2729
+ }), null, 16, ["modelValue", "onUpdate:modelValue"]))), 256)) : V("", !0),
2730
+ (f(!0), _(F, null, W(e(r), (k, g) => (f(), R(le, q({
2731
+ key: "slot-" + g,
2726
2732
  layout: "vertical"
2727
- }, { ref_for: !0 }, V.props, {
2728
- onChange: k[3] || (k[3] = (s) => e(f)(s.name, s.value)),
2729
- onClear: k[4] || (k[4] = (s) => {
2730
- e(p)(s), e(f)(s, void 0);
2733
+ }, { ref_for: !0 }, k.props, {
2734
+ onChange: C[3] || (C[3] = (s) => e(v)(s.name, s.value)),
2735
+ onClear: C[4] || (C[4] = (s) => {
2736
+ e(m)(s), e(v)(s, void 0);
2731
2737
  }),
2732
- modelValue: e(b)[V.props.name],
2733
- "onUpdate:modelValue": (s) => e(b)[V.props.name] = s,
2738
+ modelValue: e(x)[k.props.name],
2739
+ "onUpdate:modelValue": (s) => e(x)[k.props.name] = s,
2734
2740
  showClean: !0
2735
2741
  }), null, 16, ["modelValue", "onUpdate:modelValue"]))), 128))
2736
2742
  ])
2737
- ])) : $("", !0);
2743
+ ])) : V("", !0);
2738
2744
  }
2739
- }), De = /* @__PURE__ */ U({
2745
+ }), Se = /* @__PURE__ */ O({
2740
2746
  __name: "filter",
2741
2747
  props: {
2742
2748
  schema: {},
@@ -2744,126 +2750,127 @@ const Jl = /* @__PURE__ */ G(Gl, [["render", Zl]]), ea = {
2744
2750
  value: {},
2745
2751
  history: { type: Boolean },
2746
2752
  mode: {},
2747
- limit: { default: 3 }
2753
+ limit: { default: 3 },
2754
+ width: {}
2748
2755
  },
2749
2756
  emits: ["change", "clear", "clearAll"],
2750
- setup(t, { expose: n, emit: v }) {
2751
- const l = t, r = S(l.value ?? {}), a = v, b = S();
2752
- function o(m) {
2753
- if (Array.isArray(m))
2754
- return m.map((s) => o(s));
2755
- if (m !== null && typeof m == "object") {
2756
- const s = se(m), g = {};
2757
- for (const C in s)
2758
- g[C] = o(s[C]);
2759
- return g;
2757
+ setup(u, { expose: o, emit: b }) {
2758
+ const t = u, n = $(t.value ?? {}), l = b, x = $();
2759
+ function a(g) {
2760
+ if (Array.isArray(g))
2761
+ return g.map((s) => a(s));
2762
+ if (g !== null && typeof g == "object") {
2763
+ const s = se(g), h = {};
2764
+ for (const y in s)
2765
+ h[y] = a(s[y]);
2766
+ return h;
2760
2767
  }
2761
- return m;
2768
+ return g;
2762
2769
  }
2763
- function f(m, s) {
2764
- s !== void 0 ? r.value = {
2765
- ...r.value,
2766
- [m]: s
2767
- } : delete r.value[m], a("change", {
2768
- data: o(r.value),
2769
- name: m,
2770
- value: o(s)
2770
+ function v(g, s) {
2771
+ s !== void 0 ? n.value = {
2772
+ ...n.value,
2773
+ [g]: s
2774
+ } : delete n.value[g], l("change", {
2775
+ data: a(n.value),
2776
+ name: g,
2777
+ value: a(s)
2771
2778
  });
2772
2779
  }
2773
- function p(m) {
2774
- delete r.value[m], a("clear", {
2775
- data: o(r.value),
2776
- name: m
2777
- }), a("change", {
2778
- data: o(r.value),
2779
- name: m,
2780
+ function m(g) {
2781
+ delete n.value[g], l("clear", {
2782
+ data: a(n.value),
2783
+ name: g
2784
+ }), l("change", {
2785
+ data: a(n.value),
2786
+ name: g,
2780
2787
  value: null
2781
2788
  });
2782
2789
  }
2783
- function y() {
2784
- r.value = {}, a("clear", {
2785
- data: o(r.value),
2790
+ function p() {
2791
+ n.value = {}, l("clear", {
2792
+ data: a(n.value),
2786
2793
  name: "ALL"
2787
- }), a("change", {
2788
- data: o(r.value),
2794
+ }), l("change", {
2795
+ data: a(n.value),
2789
2796
  name: "ALL",
2790
2797
  value: null
2791
2798
  });
2792
2799
  }
2793
- const i = S({});
2794
- function h() {
2795
- switch (l.view) {
2800
+ const r = $({});
2801
+ function c() {
2802
+ switch (t.view) {
2796
2803
  case "inline":
2797
- return Ae;
2804
+ return $e;
2798
2805
  case "vertical":
2799
- return ba;
2806
+ return xo;
2800
2807
  case "popover":
2801
2808
  return Ie;
2802
2809
  default:
2803
- return Ae;
2810
+ return $e;
2804
2811
  }
2805
2812
  }
2806
- F(
2807
- () => l.schema,
2808
- (m) => {
2809
- if (!m) {
2810
- i.value = {};
2813
+ M(
2814
+ () => t.schema,
2815
+ (g) => {
2816
+ if (!g) {
2817
+ r.value = {};
2811
2818
  return;
2812
2819
  }
2813
- if (Array.isArray(m) && !m.length) {
2814
- i.value = {};
2820
+ if (Array.isArray(g) && !g.length) {
2821
+ r.value = {};
2815
2822
  return;
2816
2823
  }
2817
- Array.isArray(m) ? i.value = m.filter((s) => s.type).reduce((s, g) => (Object.assign(g, {
2818
- name: g.id || g.name,
2819
- type: { datepicker: "date" }[g.type.toLowerCase()] || g.type.toLowerCase(),
2820
- label: g.label || g.ua
2821
- }), s[g.name] = g, g.data && !g.api && !g.options && Object.assign(g, { api: `/api/suggest/${g.data}` }), s), {}) : (Object.entries(m).forEach(([s, g]) => {
2822
- Object.assign(g, { name: s || g.name || g.id, type: g.type.toLowerCase() });
2823
- }), i.value = { ...m });
2824
+ Array.isArray(g) ? r.value = g.filter((s) => s.type).reduce((s, h) => (Object.assign(h, {
2825
+ name: h.id || h.name,
2826
+ type: { datepicker: "date" }[h.type.toLowerCase()] || h.type.toLowerCase(),
2827
+ label: h.label || h.ua
2828
+ }), s[h.name] = h, h.data && !h.api && !h.options && Object.assign(h, { api: `/api/suggest/${h.data}` }), s), {}) : (Object.entries(g).forEach(([s, h]) => {
2829
+ Object.assign(h, { name: s || h.name || h.id, type: h.type.toLowerCase() });
2830
+ }), r.value = { ...g });
2824
2831
  },
2825
2832
  { immediate: !0, deep: !0 }
2826
2833
  );
2827
- function k(m) {
2828
- b.value.clearFilter(m), p(m);
2834
+ function C(g) {
2835
+ x.value.clearFilter(g), m(g);
2829
2836
  }
2830
- function V() {
2831
- b.value.clearAllFilters(), y();
2837
+ function k() {
2838
+ x.value.clearAllFilters(), p();
2832
2839
  }
2833
- return F(
2834
- () => r.value,
2835
- (m) => {
2836
- if (l.history) {
2837
- const s = new URL(window.location.href), g = new URLSearchParams(window.location.search);
2838
- Object.keys(m).length > 0 ? g.set(
2840
+ return M(
2841
+ () => n.value,
2842
+ (g) => {
2843
+ if (t.history) {
2844
+ const s = new URL(window.location.href), h = new URLSearchParams(window.location.search);
2845
+ Object.keys(g).length > 0 ? h.set(
2839
2846
  "filter",
2840
- Object.entries(m).filter(([, C]) => C).map(([C, d]) => `${C}=${d}`).join("|")
2841
- ) : g.delete("filter"), s.search = decodeURI(g.toString()), window.history.pushState({}, "", s);
2847
+ Object.entries(g).filter(([, y]) => y).map(([y, i]) => `${y}=${i}`).join("|")
2848
+ ) : h.delete("filter"), s.search = decodeURI(h.toString()), window.history.pushState({}, "", s);
2842
2849
  }
2843
2850
  }
2844
- ), n({
2845
- clearAllFilters: V,
2846
- clearFilter: k
2847
- }), (m, s) => (c(), M(J(h()), P(l, {
2848
- schema: i.value,
2849
- onChange: s[0] || (s[0] = (g) => f(g.name, g.value)),
2850
- onClear: s[1] || (s[1] = (g) => p(g.name)),
2851
- onClearAll: y,
2851
+ ), o({
2852
+ clearAllFilters: k,
2853
+ clearFilter: C
2854
+ }), (g, s) => (f(), R(J(c()), q(t, {
2855
+ schema: r.value,
2856
+ onChange: s[0] || (s[0] = (h) => v(h.name, h.value)),
2857
+ onClear: s[1] || (s[1] = (h) => m(h.name)),
2858
+ onClearAll: p,
2852
2859
  ref_key: "filterRef",
2853
- ref: b
2860
+ ref: x
2854
2861
  }), {
2855
2862
  default: te(() => [
2856
- ce(m.$slots, "default")
2863
+ de(g.$slots, "default")
2857
2864
  ]),
2858
2865
  _: 3
2859
2866
  }, 16, ["schema"]));
2860
2867
  }
2861
2868
  });
2862
- De.install = function(n) {
2863
- n.component("Filter", De), n.component("FilterField", le);
2869
+ Se.install = function(o) {
2870
+ o.component("Filter", Se), o.component("FilterField", le);
2864
2871
  };
2865
2872
  export {
2866
- De as Filter,
2873
+ Se as Filter,
2867
2874
  le as FilterField,
2868
- De as default
2875
+ Se as default
2869
2876
  };