@opengis/filter 0.1.3 → 0.1.5

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