@opengis/filter 0.1.8 → 0.1.9

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