@opengis/table 0.0.32 → 0.0.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTable.vue.d.ts","sourceRoot":"","sources":["../../src/components/DataTable.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DataTable.vue.d.ts","sourceRoot":"","sources":["../../src/components/DataTable.vue"],"names":[],"mappings":"AA27BA,OAAO,KAAK,EACV,MAAM,EAAE,sBAAsB,EAAE,SAAS,EAAiB,UAAU,EACrE,MAAM,UAAU,CAAC;AAmqClB,QAAA,IAAI,OAAO;;CAAU,EAAE,QAAQ;;CAAW,EAAE,QAAQ;;;CAAW,EAAE,QAAQ;;;CAAW,EAAE,QAAQ;;;CAAW,EAAE,QAAQ;;CAAW,EAAE,QAAQ;;CAAY,CAAE;AACtJ,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GACzC;IAAE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC5C;IAAE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC5C;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC3C;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC3C;IAAE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC5C;IAAE,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAgEpD,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6EAQnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAa1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Export.vue.d.ts","sourceRoot":"","sources":["../../src/components/Export.vue"],"names":[],"mappings":"AA6PA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAMlC,KAAK,WAAW,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;;
|
|
1
|
+
{"version":3,"file":"Export.vue.d.ts","sourceRoot":"","sources":["../../src/components/Export.vue"],"names":[],"mappings":"AA6PA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAMlC,KAAK,WAAW,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;;AA8wBxD,wBAMG"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as yr from "vue";
|
|
2
|
-
import { getCurrentInstance as bs, defineComponent as ie, useAttrs as xs, ref as $, computed as q, onUnmounted as Bt, onMounted as Ge, watch as Te, onBeforeUnmount as ks, createElementBlock as k, openBlock as v, Fragment as se, createElementVNode as d, createBlock as Ce, normalizeClass as L, unref as Z, createStaticVNode as hn, Teleport as jt, createCommentVNode as Y, normalizeStyle as lt, toDisplayString as A, withDirectives as
|
|
2
|
+
import { getCurrentInstance as bs, defineComponent as ie, useAttrs as xs, ref as $, computed as q, onUnmounted as Bt, onMounted as Ge, watch as Te, onBeforeUnmount as ks, createElementBlock as k, openBlock as v, Fragment as se, createElementVNode as d, createBlock as Ce, normalizeClass as L, unref as Z, createStaticVNode as hn, Teleport as jt, createCommentVNode as Y, normalizeStyle as lt, toDisplayString as A, withDirectives as we, vModelText as _t, withModifiers as ot, renderList as Se, createTextVNode as be, nextTick as mn, renderSlot as Ae, withKeys as Jt, vModelSelect as br, useSlots as ws, provide as xr, withCtx as kr, resolveDynamicComponent as xt, createVNode as wr, inject as Er, vShow as Es, vModelCheckbox as Sr, vModelRadio as Yt } from "vue";
|
|
3
3
|
const Kn = {
|
|
4
4
|
en: {
|
|
5
5
|
choose: "Оберіть колонки для відображення",
|
|
@@ -57,46 +57,46 @@ const Nr = { class: "flex items-center justify-between h-[48px] px-4 py-2 gap-x-
|
|
|
57
57
|
},
|
|
58
58
|
emits: ["update:columns"],
|
|
59
59
|
setup(e, { emit: t }) {
|
|
60
|
-
const n = gn(), s = e, r = t, i = xs(), o = $(!1), a = $(""), l = $(s.columns), u = $(null), m = $(null), c = $(null), f = $({ top: 0, left: 0 }), h = q(() => a.value ? l.value.filter((
|
|
61
|
-
|
|
60
|
+
const n = gn(), s = e, r = t, i = xs(), o = $(!1), a = $(""), l = $(s.columns), u = $(null), m = $(null), c = $(null), f = $({ top: 0, left: 0 }), h = q(() => a.value ? l.value.filter((E) => E.ua.toLowerCase().includes(a.value.toLowerCase())) : l.value), x = $("uk"), y = (E) => {
|
|
61
|
+
E.detail.key === "locale" && (x.value = E.detail.newValue);
|
|
62
62
|
};
|
|
63
63
|
Bt(() => {
|
|
64
64
|
window.removeEventListener("storage", y);
|
|
65
65
|
}), Ge(() => {
|
|
66
66
|
window.addEventListener("storage", y), x.value = localStorage.locale;
|
|
67
|
-
}), Te(l, (
|
|
68
|
-
r("update:columns",
|
|
69
|
-
}, { deep: !0 }), Te(() => s.columns, (
|
|
70
|
-
JSON.stringify(
|
|
67
|
+
}), Te(l, (E) => {
|
|
68
|
+
r("update:columns", E);
|
|
69
|
+
}, { deep: !0 }), Te(() => s.columns, (E) => {
|
|
70
|
+
JSON.stringify(E) !== JSON.stringify(l.value) && (l.value = [...E]);
|
|
71
71
|
}, { deep: !0 });
|
|
72
|
-
function O(
|
|
73
|
-
Object.assign(
|
|
72
|
+
function O(E) {
|
|
73
|
+
Object.assign(E, { hidden: !E.hidden });
|
|
74
74
|
}
|
|
75
75
|
function _() {
|
|
76
76
|
o.value = !o.value, mn(() => {
|
|
77
77
|
if (o.value && (c.value?.focus(), u.value && m.value)) {
|
|
78
|
-
const
|
|
78
|
+
const E = u.value.getBoundingClientRect();
|
|
79
79
|
f.value = {
|
|
80
|
-
top:
|
|
81
|
-
left:
|
|
80
|
+
top: E.bottom + window.scrollY + 5,
|
|
81
|
+
left: E.left + window.scrollX - 220
|
|
82
82
|
};
|
|
83
83
|
}
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
|
-
function R(
|
|
87
|
-
o.value && m.value && u.value && !m.value.contains(
|
|
86
|
+
function R(E) {
|
|
87
|
+
o.value && m.value && u.value && !m.value.contains(E.target) && !u.value.contains(E.target) && (o.value = !1);
|
|
88
88
|
}
|
|
89
89
|
return Ge(() => {
|
|
90
90
|
document.addEventListener("click", R, !0);
|
|
91
91
|
}), ks(() => {
|
|
92
92
|
document.removeEventListener("click", R, !0);
|
|
93
|
-
}), (
|
|
93
|
+
}), (E, w) => (v(), k(se, null, [
|
|
94
94
|
d("button", {
|
|
95
95
|
onClick: _,
|
|
96
96
|
ref_key: "buttonRef",
|
|
97
97
|
ref: u,
|
|
98
98
|
class: L([[Z(i).class], "py-2 max-h-[34px] px-2.5 md:inline-flex hidden items-center gap-x-1.5 text-xs font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"])
|
|
99
|
-
},
|
|
99
|
+
}, w[2] || (w[2] = [
|
|
100
100
|
hn('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-columns" height="20" width="16"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M4 6l5.5 0"></path><path d="M4 10l5.5 0"></path><path d="M4 14l5.5 0"></path><path d="M4 18l5.5 0"></path><path d="M14.5 6l5.5 0"></path><path d="M14.5 10l5.5 0"></path><path d="M14.5 14l5.5 0"></path><path d="M14.5 18l5.5 0"></path></svg>', 1)
|
|
101
101
|
]), 2),
|
|
102
102
|
(v(), Ce(jt, { to: "body" }, [
|
|
@@ -109,11 +109,11 @@ const Nr = { class: "flex items-center justify-between h-[48px] px-4 py-2 gap-x-
|
|
|
109
109
|
}, [
|
|
110
110
|
d("div", Nr, A(Z(n)("table.columns")), 1),
|
|
111
111
|
d("div", Cr, [
|
|
112
|
-
|
|
112
|
+
we(d("input", {
|
|
113
113
|
type: "text",
|
|
114
114
|
ref_key: "searchInput",
|
|
115
115
|
ref: c,
|
|
116
|
-
"onUpdate:modelValue":
|
|
116
|
+
"onUpdate:modelValue": w[0] || (w[0] = (C) => a.value = C),
|
|
117
117
|
class: "py-1.5 px-3 w-full rounded-xs sm:text-sm text-base placeholder:text-gray-500 hover:bg-gray-100 hover:border-blue-100 text-gray-800 focus:outline-none focus:bg-gray-100",
|
|
118
118
|
placeholder: Z(n)("table.search")
|
|
119
119
|
}, null, 8, Tr), [
|
|
@@ -124,7 +124,7 @@ const Nr = { class: "flex items-center justify-between h-[48px] px-4 py-2 gap-x-
|
|
|
124
124
|
d("span", Ir, A(Z(n)("table.choose")), 1),
|
|
125
125
|
d("div", {
|
|
126
126
|
class: "space-y-1",
|
|
127
|
-
onClick:
|
|
127
|
+
onClick: w[1] || (w[1] = ot(() => {
|
|
128
128
|
}, ["stop"]))
|
|
129
129
|
}, [
|
|
130
130
|
(v(!0), k(se, null, Se(h.value, (C) => (v(), k("div", {
|
|
@@ -141,7 +141,7 @@ const Nr = { class: "flex items-center justify-between h-[48px] px-4 py-2 gap-x-
|
|
|
141
141
|
}, null, 8, $r),
|
|
142
142
|
d("span", {
|
|
143
143
|
class: L(["flex items-center justify-center text-white border border-gray-300 rounded shrink-0 size-4 focus:ring-blue-500 pointer-events-none", C.hidden ? "bg-white" : "bg-blue-600 border-0"])
|
|
144
|
-
},
|
|
144
|
+
}, w[3] || (w[3] = [
|
|
145
145
|
d("svg", {
|
|
146
146
|
xmlns: "http://www.w3.org/2000/svg",
|
|
147
147
|
width: "12",
|
|
@@ -670,11 +670,11 @@ const ct = Symbol(process.env.NODE_ENV !== "production" ? "Fragment" : ""), at =
|
|
|
670
670
|
process.env.NODE_ENV !== "production" ? "BaseTransition" : ""
|
|
671
671
|
), Je = Symbol(process.env.NODE_ENV !== "production" ? "openBlock" : ""), Ns = Symbol(process.env.NODE_ENV !== "production" ? "createBlock" : ""), Cs = Symbol(
|
|
672
672
|
process.env.NODE_ENV !== "production" ? "createElementBlock" : ""
|
|
673
|
-
), kn = Symbol(process.env.NODE_ENV !== "production" ? "createVNode" : ""),
|
|
673
|
+
), kn = Symbol(process.env.NODE_ENV !== "production" ? "createVNode" : ""), wn = Symbol(
|
|
674
674
|
process.env.NODE_ENV !== "production" ? "createElementVNode" : ""
|
|
675
675
|
), mt = Symbol(
|
|
676
676
|
process.env.NODE_ENV !== "production" ? "createCommentVNode" : ""
|
|
677
|
-
),
|
|
677
|
+
), En = Symbol(
|
|
678
678
|
process.env.NODE_ENV !== "production" ? "createTextVNode" : ""
|
|
679
679
|
), Ts = Symbol(
|
|
680
680
|
process.env.NODE_ENV !== "production" ? "createStaticVNode" : ""
|
|
@@ -698,11 +698,11 @@ const ct = Symbol(process.env.NODE_ENV !== "production" ? "Fragment" : ""), at =
|
|
|
698
698
|
process.env.NODE_ENV !== "production" ? "normalizeProps" : ""
|
|
699
699
|
), gt = Symbol(
|
|
700
700
|
process.env.NODE_ENV !== "production" ? "guardReactiveProps" : ""
|
|
701
|
-
), An = Symbol(process.env.NODE_ENV !== "production" ? "toHandlers" : ""), sn = Symbol(process.env.NODE_ENV !== "production" ? "camelize" : ""),
|
|
701
|
+
), An = Symbol(process.env.NODE_ENV !== "production" ? "toHandlers" : ""), sn = Symbol(process.env.NODE_ENV !== "production" ? "camelize" : ""), wi = Symbol(process.env.NODE_ENV !== "production" ? "capitalize" : ""), rn = Symbol(
|
|
702
702
|
process.env.NODE_ENV !== "production" ? "toHandlerKey" : ""
|
|
703
703
|
), $t = Symbol(
|
|
704
704
|
process.env.NODE_ENV !== "production" ? "setBlockTracking" : ""
|
|
705
|
-
),
|
|
705
|
+
), Ei = Symbol(process.env.NODE_ENV !== "production" ? "pushScopeId" : ""), Si = Symbol(process.env.NODE_ENV !== "production" ? "popScopeId" : ""), $n = Symbol(process.env.NODE_ENV !== "production" ? "withCtx" : ""), _i = Symbol(process.env.NODE_ENV !== "production" ? "unref" : ""), Ni = Symbol(process.env.NODE_ENV !== "production" ? "isRef" : ""), Vn = Symbol(process.env.NODE_ENV !== "production" ? "withMemo" : ""), Ds = Symbol(process.env.NODE_ENV !== "production" ? "isMemoSame" : ""), Qe = {
|
|
706
706
|
[ct]: "Fragment",
|
|
707
707
|
[at]: "Teleport",
|
|
708
708
|
[xn]: "Suspense",
|
|
@@ -712,9 +712,9 @@ const ct = Symbol(process.env.NODE_ENV !== "production" ? "Fragment" : ""), at =
|
|
|
712
712
|
[Ns]: "createBlock",
|
|
713
713
|
[Cs]: "createElementBlock",
|
|
714
714
|
[kn]: "createVNode",
|
|
715
|
-
[
|
|
715
|
+
[wn]: "createElementVNode",
|
|
716
716
|
[mt]: "createCommentVNode",
|
|
717
|
-
[
|
|
717
|
+
[En]: "createTextVNode",
|
|
718
718
|
[Ts]: "createStaticVNode",
|
|
719
719
|
[Sn]: "resolveComponent",
|
|
720
720
|
[_n]: "resolveDynamicComponent",
|
|
@@ -732,10 +732,10 @@ const ct = Symbol(process.env.NODE_ENV !== "production" ? "Fragment" : ""), at =
|
|
|
732
732
|
[gt]: "guardReactiveProps",
|
|
733
733
|
[An]: "toHandlers",
|
|
734
734
|
[sn]: "camelize",
|
|
735
|
-
[
|
|
735
|
+
[wi]: "capitalize",
|
|
736
736
|
[rn]: "toHandlerKey",
|
|
737
737
|
[$t]: "setBlockTracking",
|
|
738
|
-
[
|
|
738
|
+
[Ei]: "pushScopeId",
|
|
739
739
|
[Si]: "popScopeId",
|
|
740
740
|
[$n]: "withCtx",
|
|
741
741
|
[_i]: "unref",
|
|
@@ -869,7 +869,7 @@ function Ii(e) {
|
|
|
869
869
|
};
|
|
870
870
|
}
|
|
871
871
|
function tt(e, t) {
|
|
872
|
-
return e || t ? kn :
|
|
872
|
+
return e || t ? kn : wn;
|
|
873
873
|
}
|
|
874
874
|
function nt(e, t) {
|
|
875
875
|
return e || t ? Ns : Cs;
|
|
@@ -1600,14 +1600,14 @@ let F = Ls, ht = null, $e = "", le = null, z = null, fe = "", De = -1, ze = -1,
|
|
|
1600
1600
|
const X = [], J = new Di(X, {
|
|
1601
1601
|
onerr: de,
|
|
1602
1602
|
ontext(e, t) {
|
|
1603
|
-
|
|
1603
|
+
wt(ae(e, t), e, t);
|
|
1604
1604
|
},
|
|
1605
1605
|
ontextentity(e, t, n) {
|
|
1606
|
-
|
|
1606
|
+
wt(e, t, n);
|
|
1607
1607
|
},
|
|
1608
1608
|
oninterpolation(e, t) {
|
|
1609
1609
|
if (Me)
|
|
1610
|
-
return
|
|
1610
|
+
return wt(ae(e, t), e, t);
|
|
1611
1611
|
let n = e + J.delimiterOpen.length, s = t - J.delimiterClose.length;
|
|
1612
1612
|
for (; ge($e.charCodeAt(n)); )
|
|
1613
1613
|
n++;
|
|
@@ -1813,7 +1813,7 @@ const X = [], J = new Di(X, {
|
|
|
1813
1813
|
Ct(X[t], e - 1), de(24, X[t].loc.start.offset);
|
|
1814
1814
|
},
|
|
1815
1815
|
oncdata(e, t) {
|
|
1816
|
-
X[0].ns !== 0 ?
|
|
1816
|
+
X[0].ns !== 0 ? wt(ae(e, t), e, t) : de(1, e - 9);
|
|
1817
1817
|
},
|
|
1818
1818
|
onprocessinginstruction(e) {
|
|
1819
1819
|
(X[0] ? X[0].ns : F.ns) === 0 && de(
|
|
@@ -1870,7 +1870,7 @@ function ts(e) {
|
|
|
1870
1870
|
const { tag: t, ns: n } = le;
|
|
1871
1871
|
n === 0 && F.isPreTag(t) && Pn++, F.isVoidTag(t) ? Ct(le, e) : (X.unshift(le), (n === 1 || n === 2) && (J.inXML = !0)), le = null;
|
|
1872
1872
|
}
|
|
1873
|
-
function
|
|
1873
|
+
function wt(e, t, n) {
|
|
1874
1874
|
{
|
|
1875
1875
|
const i = X[0] && X[0].tag;
|
|
1876
1876
|
i !== "script" && i !== "style" && e.includes("&") && (e = F.decodeEntities(e, !1));
|
|
@@ -2326,8 +2326,8 @@ function lo(e, {
|
|
|
2326
2326
|
ssrCssVars: O = "",
|
|
2327
2327
|
bindingMetadata: _ = ri,
|
|
2328
2328
|
inline: R = !1,
|
|
2329
|
-
isTS:
|
|
2330
|
-
onError:
|
|
2329
|
+
isTS: E = !1,
|
|
2330
|
+
onError: w = Rn,
|
|
2331
2331
|
onWarn: C = As,
|
|
2332
2332
|
compatConfig: T
|
|
2333
2333
|
}) {
|
|
@@ -2352,8 +2352,8 @@ function lo(e, {
|
|
|
2352
2352
|
ssrCssVars: O,
|
|
2353
2353
|
bindingMetadata: _,
|
|
2354
2354
|
inline: R,
|
|
2355
|
-
isTS:
|
|
2356
|
-
onError:
|
|
2355
|
+
isTS: E,
|
|
2356
|
+
onError: w,
|
|
2357
2357
|
onWarn: C,
|
|
2358
2358
|
compatConfig: T,
|
|
2359
2359
|
// state
|
|
@@ -2647,9 +2647,9 @@ function mo(e, t) {
|
|
|
2647
2647
|
), e.hoists.length)) {
|
|
2648
2648
|
const c = [
|
|
2649
2649
|
kn,
|
|
2650
|
-
En,
|
|
2651
|
-
mt,
|
|
2652
2650
|
wn,
|
|
2651
|
+
mt,
|
|
2652
|
+
En,
|
|
2653
2653
|
Ts
|
|
2654
2654
|
].filter((f) => m.includes(f)).map(Ks).join(", ");
|
|
2655
2655
|
r(
|
|
@@ -2744,7 +2744,7 @@ function ce(e, t) {
|
|
|
2744
2744
|
ko(e, t);
|
|
2745
2745
|
break;
|
|
2746
2746
|
case 13:
|
|
2747
|
-
|
|
2747
|
+
wo(e, t);
|
|
2748
2748
|
break;
|
|
2749
2749
|
case 14:
|
|
2750
2750
|
So(e, t);
|
|
@@ -2829,7 +2829,7 @@ function ko(e, t) {
|
|
|
2829
2829
|
e
|
|
2830
2830
|
);
|
|
2831
2831
|
}
|
|
2832
|
-
function
|
|
2832
|
+
function wo(e, t) {
|
|
2833
2833
|
const { push: n, helper: s, pure: r } = t, {
|
|
2834
2834
|
tag: i,
|
|
2835
2835
|
props: o,
|
|
@@ -2855,11 +2855,11 @@ function Eo(e, t) {
|
|
|
2855
2855
|
m && n(s(Tn) + "("), c && n(`(${s(Je)}(${f ? "true" : ""}), `), r && n(Ht);
|
|
2856
2856
|
const y = c ? nt(t.inSSR, h) : tt(t.inSSR, h);
|
|
2857
2857
|
n(s(y) + "(", -2, e), vt(
|
|
2858
|
-
|
|
2858
|
+
Eo([i, o, a, x, u]),
|
|
2859
2859
|
t
|
|
2860
2860
|
), n(")"), c && n(")"), m && (n(", "), ce(m, t), n(")"));
|
|
2861
2861
|
}
|
|
2862
|
-
function
|
|
2862
|
+
function Eo(e) {
|
|
2863
2863
|
let t = e.length;
|
|
2864
2864
|
for (; t-- && e[t] == null; )
|
|
2865
2865
|
;
|
|
@@ -3171,14 +3171,14 @@ const Lo = (e, t, n) => {
|
|
|
3171
3171
|
), () => {
|
|
3172
3172
|
let y;
|
|
3173
3173
|
const { children: O } = i;
|
|
3174
|
-
process.env.NODE_ENV !== "production" && a && e.children.some((
|
|
3175
|
-
if (
|
|
3176
|
-
const
|
|
3177
|
-
if (
|
|
3174
|
+
process.env.NODE_ENV !== "production" && a && e.children.some((E) => {
|
|
3175
|
+
if (E.type === 1) {
|
|
3176
|
+
const w = ft(E, "key");
|
|
3177
|
+
if (w)
|
|
3178
3178
|
return n.onError(
|
|
3179
3179
|
K(
|
|
3180
3180
|
33,
|
|
3181
|
-
|
|
3181
|
+
w.loc
|
|
3182
3182
|
)
|
|
3183
3183
|
), !0;
|
|
3184
3184
|
}
|
|
@@ -3200,12 +3200,12 @@ const Lo = (e, t, n) => {
|
|
|
3200
3200
|
)) : r(
|
|
3201
3201
|
tt(n.inSSR, y.isComponent)
|
|
3202
3202
|
)), y.isBlock = !h, y.isBlock ? (s(Je), s(nt(n.inSSR, y.isComponent))) : s(tt(n.inSSR, y.isComponent))), l) {
|
|
3203
|
-
const
|
|
3203
|
+
const E = et(
|
|
3204
3204
|
un(i.parseResult, [
|
|
3205
3205
|
V("_cached")
|
|
3206
3206
|
])
|
|
3207
3207
|
);
|
|
3208
|
-
|
|
3208
|
+
E.body = Ii([
|
|
3209
3209
|
_e(["const _memo = (", l.exp, ")"]),
|
|
3210
3210
|
_e([
|
|
3211
3211
|
"if (_cached",
|
|
@@ -3218,7 +3218,7 @@ const Lo = (e, t, n) => {
|
|
|
3218
3218
|
V("_item.memo = _memo"),
|
|
3219
3219
|
V("return _item")
|
|
3220
3220
|
]), o.arguments.push(
|
|
3221
|
-
|
|
3221
|
+
E,
|
|
3222
3222
|
V("_cache"),
|
|
3223
3223
|
V(String(n.cached.length))
|
|
3224
3224
|
), n.cached.push(null);
|
|
@@ -3335,20 +3335,20 @@ function zo(e, t, n = Uo) {
|
|
|
3335
3335
|
break;
|
|
3336
3336
|
}
|
|
3337
3337
|
u = !0;
|
|
3338
|
-
const { children:
|
|
3338
|
+
const { children: E, loc: w } = _, {
|
|
3339
3339
|
arg: C = V("default", !0),
|
|
3340
3340
|
exp: T,
|
|
3341
3341
|
loc: I
|
|
3342
3342
|
} = R;
|
|
3343
3343
|
let S;
|
|
3344
3344
|
he(C) ? S = C ? C.content : "default" : a = !0;
|
|
3345
|
-
const N = pe(_, "for"), B = n(T, N,
|
|
3345
|
+
const N = pe(_, "for"), B = n(T, N, E, w);
|
|
3346
3346
|
let j, M;
|
|
3347
3347
|
if (j = pe(_, "if"))
|
|
3348
3348
|
a = !0, o.push(
|
|
3349
3349
|
on(
|
|
3350
3350
|
j.exp,
|
|
3351
|
-
|
|
3351
|
+
Et(C, B, h++),
|
|
3352
3352
|
as
|
|
3353
3353
|
)
|
|
3354
3354
|
);
|
|
@@ -3367,13 +3367,13 @@ function zo(e, t, n = Uo) {
|
|
|
3367
3367
|
G = G.alternate;
|
|
3368
3368
|
G.alternate = M.exp ? on(
|
|
3369
3369
|
M.exp,
|
|
3370
|
-
|
|
3370
|
+
Et(
|
|
3371
3371
|
C,
|
|
3372
3372
|
B,
|
|
3373
3373
|
h++
|
|
3374
3374
|
),
|
|
3375
3375
|
as
|
|
3376
|
-
) :
|
|
3376
|
+
) : Et(C, B, h++);
|
|
3377
3377
|
} else
|
|
3378
3378
|
t.onError(
|
|
3379
3379
|
K(30, M.loc)
|
|
@@ -3386,7 +3386,7 @@ function zo(e, t, n = Uo) {
|
|
|
3386
3386
|
H.source,
|
|
3387
3387
|
et(
|
|
3388
3388
|
un(H),
|
|
3389
|
-
|
|
3389
|
+
Et(C, B),
|
|
3390
3390
|
!0
|
|
3391
3391
|
)
|
|
3392
3392
|
])
|
|
@@ -3414,8 +3414,8 @@ function zo(e, t, n = Uo) {
|
|
|
3414
3414
|
}
|
|
3415
3415
|
if (!l) {
|
|
3416
3416
|
const O = (_, R) => {
|
|
3417
|
-
const
|
|
3418
|
-
return t.compatConfig && (
|
|
3417
|
+
const E = n(_, void 0, R, r);
|
|
3418
|
+
return t.compatConfig && (E.isNonScopedSlot = !0), ee("default", E);
|
|
3419
3419
|
};
|
|
3420
3420
|
u ? c.length && // #3766
|
|
3421
3421
|
// with whitespace: 'preserve', whitespaces between slots will end up in
|
|
@@ -3452,7 +3452,7 @@ function zo(e, t, n = Uo) {
|
|
|
3452
3452
|
hasDynamicSlots: a
|
|
3453
3453
|
};
|
|
3454
3454
|
}
|
|
3455
|
-
function
|
|
3455
|
+
function Et(e, t, n) {
|
|
3456
3456
|
const s = [
|
|
3457
3457
|
ee("name", e),
|
|
3458
3458
|
ee("fn", t)
|
|
@@ -3569,7 +3569,7 @@ function Zs(e, t, n = e.props, s, r, i = !1) {
|
|
|
3569
3569
|
const { tag: o, loc: a, children: l } = e;
|
|
3570
3570
|
let u = [];
|
|
3571
3571
|
const m = [], c = [], f = l.length > 0;
|
|
3572
|
-
let h = !1, x = 0, y = !1, O = !1, _ = !1, R = !1,
|
|
3572
|
+
let h = !1, x = 0, y = !1, O = !1, _ = !1, R = !1, E = !1, w = !1;
|
|
3573
3573
|
const C = [], T = (B) => {
|
|
3574
3574
|
u.length && (m.push(
|
|
3575
3575
|
xe(ls(u), a)
|
|
@@ -3588,11 +3588,11 @@ function Zs(e, t, n = e.props, s, r, i = !1) {
|
|
|
3588
3588
|
// dedicated fast path.
|
|
3589
3589
|
M.toLowerCase() !== "onclick" && // omit v-model handlers
|
|
3590
3590
|
M !== "onUpdate:modelValue" && // omit onVnodeXXX hooks
|
|
3591
|
-
!Gn(M) && (R = !0), H && Gn(M) && (
|
|
3591
|
+
!Gn(M) && (R = !0), H && Gn(M) && (w = !0), H && j.type === 14 && (j = j.arguments[0]), j.type === 20 || (j.type === 4 || j.type === 8) && ve(j, t) > 0)
|
|
3592
3592
|
return;
|
|
3593
3593
|
M === "ref" ? y = !0 : M === "class" ? O = !0 : M === "style" ? _ = !0 : M !== "key" && !C.includes(M) && C.push(M), s && (M === "class" || M === "style") && !C.includes(M) && C.push(M);
|
|
3594
3594
|
} else
|
|
3595
|
-
|
|
3595
|
+
E = !0;
|
|
3596
3596
|
};
|
|
3597
3597
|
for (let B = 0; B < n.length; B++) {
|
|
3598
3598
|
const j = n[B];
|
|
@@ -3633,7 +3633,7 @@ function Zs(e, t, n = e.props, s, r, i = !1) {
|
|
|
3633
3633
|
// before children
|
|
3634
3634
|
Be && f && Re(H, "vue:before-update")) && (h = !0), Ne && Re(H, "ref") && I(), !H && (Ne || Be)
|
|
3635
3635
|
) {
|
|
3636
|
-
if (
|
|
3636
|
+
if (E = !0, W)
|
|
3637
3637
|
if (Ne) {
|
|
3638
3638
|
if (T(), process.env.NODE_ENV !== "production" && m.some((ke) => ke.type === 15 ? ke.properties.some(({ key: je }) => je.type !== 4 || !je.isStatic ? !0 : je.content !== "class" && je.content !== "style" && !nn(je.content)) : !0) && st(
|
|
3639
3639
|
"COMPILER_V_BIND_OBJECT_ORDER",
|
|
@@ -3679,7 +3679,7 @@ function Zs(e, t, n = e.props, s, r, i = !1) {
|
|
|
3679
3679
|
) : N = m[0]) : u.length && (N = xe(
|
|
3680
3680
|
ls(u),
|
|
3681
3681
|
a
|
|
3682
|
-
)),
|
|
3682
|
+
)), E ? x |= 16 : (O && !s && (x |= 2), _ && !s && (x |= 4), C.length && (x |= 8), R && (x |= 32)), !h && (x === 0 || x === 32) && (y || w || c.length > 0) && (x |= 512), !t.inSSR && N)
|
|
3683
3683
|
switch (N.type) {
|
|
3684
3684
|
case 15:
|
|
3685
3685
|
let B = -1, j = -1, M = !1;
|
|
@@ -3921,7 +3921,7 @@ const Qs = (e, t, n, s) => {
|
|
|
3921
3921
|
content: o,
|
|
3922
3922
|
loc: o.loc,
|
|
3923
3923
|
codegenNode: ne(
|
|
3924
|
-
t.helper(
|
|
3924
|
+
t.helper(En),
|
|
3925
3925
|
a
|
|
3926
3926
|
)
|
|
3927
3927
|
};
|
|
@@ -4231,7 +4231,7 @@ const aa = {
|
|
|
4231
4231
|
3
|
|
4232
4232
|
);
|
|
4233
4233
|
};
|
|
4234
|
-
function
|
|
4234
|
+
function Ee(e, t) {
|
|
4235
4235
|
return K(
|
|
4236
4236
|
e,
|
|
4237
4237
|
t,
|
|
@@ -4253,9 +4253,9 @@ const ua = {
|
|
|
4253
4253
|
}, da = (e, t, n) => {
|
|
4254
4254
|
const { exp: s, loc: r } = e;
|
|
4255
4255
|
return s || n.onError(
|
|
4256
|
-
|
|
4256
|
+
Ee(53, r)
|
|
4257
4257
|
), t.children.length && (n.onError(
|
|
4258
|
-
|
|
4258
|
+
Ee(54, r)
|
|
4259
4259
|
), t.children.length = 0), {
|
|
4260
4260
|
props: [
|
|
4261
4261
|
ee(
|
|
@@ -4267,9 +4267,9 @@ const ua = {
|
|
|
4267
4267
|
}, fa = (e, t, n) => {
|
|
4268
4268
|
const { exp: s, loc: r } = e;
|
|
4269
4269
|
return s || n.onError(
|
|
4270
|
-
|
|
4270
|
+
Ee(55, r)
|
|
4271
4271
|
), t.children.length && (n.onError(
|
|
4272
|
-
|
|
4272
|
+
Ee(56, r)
|
|
4273
4273
|
), t.children.length = 0), {
|
|
4274
4274
|
props: [
|
|
4275
4275
|
ee(
|
|
@@ -4287,7 +4287,7 @@ const ua = {
|
|
|
4287
4287
|
if (!s.props.length || t.tagType === 1)
|
|
4288
4288
|
return s;
|
|
4289
4289
|
e.arg && n.onError(
|
|
4290
|
-
|
|
4290
|
+
Ee(
|
|
4291
4291
|
58,
|
|
4292
4292
|
e.arg.loc
|
|
4293
4293
|
)
|
|
@@ -4295,7 +4295,7 @@ const ua = {
|
|
|
4295
4295
|
function r() {
|
|
4296
4296
|
const a = pe(t, "bind");
|
|
4297
4297
|
a && Re(a.arg, "value") && n.onError(
|
|
4298
|
-
|
|
4298
|
+
Ee(
|
|
4299
4299
|
60,
|
|
4300
4300
|
a.loc
|
|
4301
4301
|
)
|
|
@@ -4319,7 +4319,7 @@ const ua = {
|
|
|
4319
4319
|
break;
|
|
4320
4320
|
case "file":
|
|
4321
4321
|
l = !0, n.onError(
|
|
4322
|
-
|
|
4322
|
+
Ee(
|
|
4323
4323
|
59,
|
|
4324
4324
|
e.loc
|
|
4325
4325
|
)
|
|
@@ -4334,7 +4334,7 @@ const ua = {
|
|
|
4334
4334
|
l || (s.needRuntime = n.helper(a));
|
|
4335
4335
|
} else
|
|
4336
4336
|
n.onError(
|
|
4337
|
-
|
|
4337
|
+
Ee(
|
|
4338
4338
|
57,
|
|
4339
4339
|
e.loc
|
|
4340
4340
|
)
|
|
@@ -4388,7 +4388,7 @@ const ua = {
|
|
|
4388
4388
|
}), ba = (e, t, n) => {
|
|
4389
4389
|
const { exp: s, loc: r } = e;
|
|
4390
4390
|
return s || n.onError(
|
|
4391
|
-
|
|
4391
|
+
Ee(61, r)
|
|
4392
4392
|
), {
|
|
4393
4393
|
props: [],
|
|
4394
4394
|
needRuntime: n.helper(ar)
|
|
@@ -4399,7 +4399,7 @@ const ua = {
|
|
|
4399
4399
|
if (!e.children.length)
|
|
4400
4400
|
return;
|
|
4401
4401
|
ur(e) && t.onError(
|
|
4402
|
-
|
|
4402
|
+
Ee(
|
|
4403
4403
|
62,
|
|
4404
4404
|
{
|
|
4405
4405
|
start: e.children[0].loc.start,
|
|
@@ -4428,13 +4428,13 @@ function ur(e) {
|
|
|
4428
4428
|
}
|
|
4429
4429
|
const ka = (e, t) => {
|
|
4430
4430
|
e.type === 1 && e.tagType === 0 && (e.tag === "script" || e.tag === "style") && (process.env.NODE_ENV !== "production" && t.onError(
|
|
4431
|
-
|
|
4431
|
+
Ee(
|
|
4432
4432
|
63,
|
|
4433
4433
|
e.loc
|
|
4434
4434
|
)
|
|
4435
4435
|
), t.removeNode());
|
|
4436
4436
|
};
|
|
4437
|
-
function
|
|
4437
|
+
function wa(e, t) {
|
|
4438
4438
|
return e === "template" ? !0 : e in ps ? ps[e].has(t) : t in hs ? hs[t].has(e) : !(e in ms && ms[e].has(t) || t in gs && gs[t].has(e));
|
|
4439
4439
|
}
|
|
4440
4440
|
const Ze = /* @__PURE__ */ new Set(["h1", "h2", "h3", "h4", "h5", "h6"]), He = /* @__PURE__ */ new Set([]), ps = {
|
|
@@ -4577,8 +4577,8 @@ const Ze = /* @__PURE__ */ new Set(["h1", "h2", "h3", "h4", "h5", "h6"]), He = /
|
|
|
4577
4577
|
h4: Ze,
|
|
4578
4578
|
h5: Ze,
|
|
4579
4579
|
h6: Ze
|
|
4580
|
-
},
|
|
4581
|
-
if (e.type === 1 && e.tagType === 0 && t.parent && t.parent.type === 1 && t.parent.tagType === 0 && !
|
|
4580
|
+
}, Ea = (e, t) => {
|
|
4581
|
+
if (e.type === 1 && e.tagType === 0 && t.parent && t.parent.type === 1 && t.parent.tagType === 0 && !wa(t.parent.tag, e.tag)) {
|
|
4582
4582
|
const n = new SyntaxError(
|
|
4583
4583
|
`<${e.tag}> cannot be child of <${t.parent.tag}>, according to HTML specifications. This can cause hydration errors or potentially disrupt future functionality.`
|
|
4584
4584
|
);
|
|
@@ -4586,7 +4586,7 @@ const Ze = /* @__PURE__ */ new Set(["h1", "h2", "h3", "h4", "h5", "h6"]), He = /
|
|
|
4586
4586
|
}
|
|
4587
4587
|
}, Sa = [
|
|
4588
4588
|
la,
|
|
4589
|
-
...process.env.NODE_ENV !== "production" ? [xa,
|
|
4589
|
+
...process.env.NODE_ENV !== "production" ? [xa, Ea] : []
|
|
4590
4590
|
], _a = {
|
|
4591
4591
|
cloak: ia,
|
|
4592
4592
|
html: da,
|
|
@@ -4754,15 +4754,15 @@ const Ta = { class: "py-10 flex flex-col justify-center items-center text-center
|
|
|
4754
4754
|
function R() {
|
|
4755
4755
|
n.editable && (a.value = !a.value, s("update", n.row, n.column.name, a.value));
|
|
4756
4756
|
}
|
|
4757
|
-
function
|
|
4757
|
+
function E(T) {
|
|
4758
4758
|
return n.color ? n.color.startsWith("#") ? T.replace("{c}", `[${n.color}]`) : T.replace("{c}", `${n.color}-500`) : T.replace("{c}", "cyan-500");
|
|
4759
4759
|
}
|
|
4760
|
-
const
|
|
4761
|
-
border:
|
|
4762
|
-
ring:
|
|
4763
|
-
text:
|
|
4764
|
-
hover:
|
|
4765
|
-
bg:
|
|
4760
|
+
const w = q(() => ({
|
|
4761
|
+
border: E("border-{c}"),
|
|
4762
|
+
ring: E("focus:ring-{c}"),
|
|
4763
|
+
text: E("text-{c}"),
|
|
4764
|
+
hover: E("hover:text-{c}"),
|
|
4765
|
+
bg: E("bg-{c} hover:bg-{c}/90")
|
|
4766
4766
|
}));
|
|
4767
4767
|
async function C() {
|
|
4768
4768
|
if (c.value === "select" && !(n.options && n.options.length > 0 || n.column?.schema?.[n.column?.name]?.options?.length > 0) && l.value.length === 0 && n.fetchOptions)
|
|
@@ -4785,9 +4785,9 @@ const Ta = { class: "py-10 flex flex-col justify-center items-center text-center
|
|
|
4785
4785
|
"data-state": a.value ? "checked" : "unchecked",
|
|
4786
4786
|
class: L([
|
|
4787
4787
|
"peer size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] h-4 w-4 flex items-center justify-center",
|
|
4788
|
-
a.value ?
|
|
4789
|
-
|
|
4790
|
-
a.value ?
|
|
4788
|
+
a.value ? w.value.border : "",
|
|
4789
|
+
w.value.ring,
|
|
4790
|
+
a.value ? w.value.bg : ""
|
|
4791
4791
|
]),
|
|
4792
4792
|
onClick: ot(R, ["stop"])
|
|
4793
4793
|
}, [
|
|
@@ -4821,7 +4821,7 @@ const Ta = { class: "py-10 flex flex-col justify-center items-center text-center
|
|
|
4821
4821
|
fill: "none",
|
|
4822
4822
|
viewBox: "0 0 24 24",
|
|
4823
4823
|
stroke: "currentColor",
|
|
4824
|
-
class: L(["w-4 h-4 opacity-0 group-hover:opacity-100 transition-opacity",
|
|
4824
|
+
class: L(["w-4 h-4 opacity-0 group-hover:opacity-100 transition-opacity", w.value.text])
|
|
4825
4825
|
}, I[5] || (I[5] = [
|
|
4826
4826
|
d("path", {
|
|
4827
4827
|
"stroke-linecap": "round",
|
|
@@ -4873,23 +4873,23 @@ const Ta = { class: "py-10 flex flex-col justify-center items-center text-center
|
|
|
4873
4873
|
d("h3", Wa, " Редагувати " + A(T.column[u.value] || T.column.header || T.column.ua || T.column.name), 1),
|
|
4874
4874
|
d("div", Ga, [
|
|
4875
4875
|
d("label", Ja, A(T.column[u.value] || T.column.header || T.column.ua || T.column.name), 1),
|
|
4876
|
-
c.value === "text" ?
|
|
4876
|
+
c.value === "text" ? we((v(), k("input", {
|
|
4877
4877
|
key: 0,
|
|
4878
4878
|
ref_key: "inputRef",
|
|
4879
4879
|
ref: i,
|
|
4880
4880
|
"onUpdate:modelValue": I[0] || (I[0] = (S) => a.value = S),
|
|
4881
4881
|
type: "text",
|
|
4882
|
-
class: L(["w-full rounded-md border px-3 py-2 text-sm outline-none border-gray-300",
|
|
4882
|
+
class: L(["w-full rounded-md border px-3 py-2 text-sm outline-none border-gray-300", w.value.ring, w.value.border]),
|
|
4883
4883
|
onKeyup: Jt(y, ["enter"])
|
|
4884
4884
|
}, null, 34)), [
|
|
4885
4885
|
[_t, a.value]
|
|
4886
|
-
]) : c.value === "number" ?
|
|
4886
|
+
]) : c.value === "number" ? we((v(), k("input", {
|
|
4887
4887
|
key: 1,
|
|
4888
4888
|
ref_key: "inputRef",
|
|
4889
4889
|
ref: i,
|
|
4890
4890
|
"onUpdate:modelValue": I[1] || (I[1] = (S) => a.value = S),
|
|
4891
4891
|
type: "number",
|
|
4892
|
-
class: L(["w-full rounded-md border px-3 py-2 text-sm outline-none border-gray-300",
|
|
4892
|
+
class: L(["w-full rounded-md border px-3 py-2 text-sm outline-none border-gray-300", w.value.ring, w.value.border]),
|
|
4893
4893
|
onKeyup: Jt(y, ["enter"])
|
|
4894
4894
|
}, null, 34)), [
|
|
4895
4895
|
[
|
|
@@ -4898,22 +4898,22 @@ const Ta = { class: "py-10 flex flex-col justify-center items-center text-center
|
|
|
4898
4898
|
void 0,
|
|
4899
4899
|
{ number: !0 }
|
|
4900
4900
|
]
|
|
4901
|
-
]) : c.value === "date" ?
|
|
4901
|
+
]) : c.value === "date" ? we((v(), k("input", {
|
|
4902
4902
|
key: 2,
|
|
4903
4903
|
ref_key: "inputRef",
|
|
4904
4904
|
ref: i,
|
|
4905
4905
|
"onUpdate:modelValue": I[2] || (I[2] = (S) => a.value = S),
|
|
4906
4906
|
type: "date",
|
|
4907
|
-
class: L(["w-full rounded-md border px-3 py-2 text-sm outline-none border-gray-300",
|
|
4907
|
+
class: L(["w-full rounded-md border px-3 py-2 text-sm outline-none border-gray-300", w.value.ring, w.value.border]),
|
|
4908
4908
|
onChange: y
|
|
4909
4909
|
}, null, 34)), [
|
|
4910
4910
|
[_t, a.value]
|
|
4911
|
-
]) : c.value === "select" ?
|
|
4911
|
+
]) : c.value === "select" ? we((v(), k("select", {
|
|
4912
4912
|
key: 3,
|
|
4913
4913
|
ref_key: "inputRef",
|
|
4914
4914
|
ref: i,
|
|
4915
4915
|
"onUpdate:modelValue": I[3] || (I[3] = (S) => a.value = S),
|
|
4916
|
-
class: L(["w-full rounded-md border px-3 py-2 text-sm outline-none bg-white border-gray-300",
|
|
4916
|
+
class: L(["w-full rounded-md border px-3 py-2 text-sm outline-none bg-white border-gray-300", w.value.ring, w.value.border])
|
|
4917
4917
|
}, [
|
|
4918
4918
|
I[9] || (I[9] = d("option", {
|
|
4919
4919
|
disabled: "",
|
|
@@ -4935,7 +4935,7 @@ const Ta = { class: "py-10 flex flex-col justify-center items-center text-center
|
|
|
4935
4935
|
}, " Скасувати "),
|
|
4936
4936
|
d("button", {
|
|
4937
4937
|
type: "button",
|
|
4938
|
-
class: L(["px-4 py-1.5 text-sm rounded-md text-white",
|
|
4938
|
+
class: L(["px-4 py-1.5 text-sm rounded-md text-white", w.value.bg]),
|
|
4939
4939
|
onClick: y
|
|
4940
4940
|
}, " Зберегти ", 2)
|
|
4941
4941
|
])
|
|
@@ -4998,7 +4998,7 @@ const Ta = { class: "py-10 flex flex-col justify-center items-center text-center
|
|
|
4998
4998
|
const n = e, s = t, r = $(n.selectedRows || []), i = $(n.defaultSort.map((p) => ({
|
|
4999
4999
|
field: p.name,
|
|
5000
5000
|
direction: p.asc ? "asc" : "desc"
|
|
5001
|
-
}))), o = $([]), a = $([]), l = $(!1), u = $(null), m = $(n.router), c =
|
|
5001
|
+
}))), o = $([]), a = $([]), l = $(!1), u = $(null), m = $(n.router), c = ws(), f = q(() => c.action);
|
|
5002
5002
|
function h(p) {
|
|
5003
5003
|
if (m.value) {
|
|
5004
5004
|
m.value.push(p);
|
|
@@ -5034,9 +5034,9 @@ const Ta = { class: "py-10 flex flex-col justify-center items-center text-center
|
|
|
5034
5034
|
const y = (p) => r.value.some((D) => D === p), O = (p) => {
|
|
5035
5035
|
const D = r.value.findIndex((b) => b === p);
|
|
5036
5036
|
D > -1 ? r.value.splice(D, 1) : r.value.push(p), s("update:selectedRows", [...r.value]);
|
|
5037
|
-
}, _ = q(() => x.value.length > 0 && r.value.length === x.value.length), R = q(() => r.value.length > 0 && r.value.length < x.value.length),
|
|
5037
|
+
}, _ = q(() => x.value.length > 0 && r.value.length === x.value.length), R = q(() => r.value.length > 0 && r.value.length < x.value.length), E = () => {
|
|
5038
5038
|
_.value ? r.value = [] : r.value = [...x.value], s("update:selectedRows", [...r.value]);
|
|
5039
|
-
},
|
|
5039
|
+
}, w = (p, D) => {
|
|
5040
5040
|
if (!n.sortable) return;
|
|
5041
5041
|
if (D?.ctrlKey || D?.metaKey) {
|
|
5042
5042
|
const g = i.value.findIndex((U) => U.field === p);
|
|
@@ -5090,7 +5090,7 @@ const Ta = { class: "py-10 flex flex-col justify-center items-center text-center
|
|
|
5090
5090
|
const g = `${p.name}${P}`;
|
|
5091
5091
|
return D[g] ? D[g] : null;
|
|
5092
5092
|
}).find((P) => P) || (p.link ? b || "-" : b);
|
|
5093
|
-
}, B = (p) => p.width ? p.width === "w-full" ? "w-full" : typeof p.width == "string" ? `w-[${p.width}px] max-w-[${p.width}px] min-w-[${p.width}px]` : typeof p.width == "number" ? `w-[${p.width}px] max-w-[${p.width}px] min-w-[${p.width}px]` : "" : "", j = $(n.page), M = $(n.limit), H = $(n.total), W = $(1), G = $(10), me = $(0), Ne = q(() => n.api ? W.value : j.value), Be = q(() => n.api ? G.value : M.value), rt = q(() => n.api ? me.value : H.value), Q = q(() => {
|
|
5093
|
+
}, B = (p) => p.width ? p.width === "w-full" ? "w-full" : typeof p.width == "string" ? `w-[${p.width}px] max-w-[${p.width}px] min-w-[${p.width}px]` : typeof p.width == "number" ? `w-[${p.width}px] max-w-[${p.width}px] min-w-[${p.width}px]` : "" : "max-w-[350px]", j = $(n.page), M = $(n.limit), H = $(n.total), W = $(1), G = $(10), me = $(0), Ne = q(() => n.api ? W.value : j.value), Be = q(() => n.api ? G.value : M.value), rt = q(() => n.api ? me.value : H.value), Q = q(() => {
|
|
5094
5094
|
const { theme: p } = n;
|
|
5095
5095
|
return p === "dark" ? {
|
|
5096
5096
|
container: "dark",
|
|
@@ -5284,7 +5284,7 @@ const Ta = { class: "py-10 flex flex-col justify-center items-center text-center
|
|
|
5284
5284
|
type: "checkbox",
|
|
5285
5285
|
checked: _.value,
|
|
5286
5286
|
indeterminate: R.value,
|
|
5287
|
-
onChange:
|
|
5287
|
+
onChange: E,
|
|
5288
5288
|
class: L(["h-4 w-4 focus:ring-blue-500 rounded", Q.value.checkbox])
|
|
5289
5289
|
}, null, 42, nl)
|
|
5290
5290
|
], 2)) : Y("", !0),
|
|
@@ -5301,7 +5301,7 @@ const Ta = { class: "py-10 flex flex-col justify-center items-center text-center
|
|
|
5301
5301
|
it.value.header
|
|
5302
5302
|
]
|
|
5303
5303
|
)),
|
|
5304
|
-
onClick: (P) => I(b) ?
|
|
5304
|
+
onClick: (P) => I(b) ? w(b.name, P) : void 0
|
|
5305
5305
|
}, [
|
|
5306
5306
|
d("div", rl, [
|
|
5307
5307
|
d("div", il, [
|
|
@@ -5473,7 +5473,7 @@ const Ta = { class: "py-10 flex flex-col justify-center items-center text-center
|
|
|
5473
5473
|
d("td", {
|
|
5474
5474
|
colspan: Un.value.length
|
|
5475
5475
|
}, [
|
|
5476
|
-
|
|
5476
|
+
wr(Aa)
|
|
5477
5477
|
], 8, pl)
|
|
5478
5478
|
])
|
|
5479
5479
|
], 2)) : Y("", !0)
|
|
@@ -5512,7 +5512,7 @@ const Ta = { class: "py-10 flex flex-col justify-center items-center text-center
|
|
|
5512
5512
|
suffix: {}
|
|
5513
5513
|
},
|
|
5514
5514
|
setup(e) {
|
|
5515
|
-
const t = e, n =
|
|
5515
|
+
const t = e, n = ws(), s = Er("registerColumn");
|
|
5516
5516
|
return Ge(() => {
|
|
5517
5517
|
if (s) {
|
|
5518
5518
|
const {
|
|
@@ -5540,8 +5540,8 @@ const Ta = { class: "py-10 flex flex-col justify-center items-center text-center
|
|
|
5540
5540
|
...x
|
|
5541
5541
|
};
|
|
5542
5542
|
console.log("Registering column:", R);
|
|
5543
|
-
const
|
|
5544
|
-
s(R,
|
|
5543
|
+
const E = n.body;
|
|
5544
|
+
s(R, E);
|
|
5545
5545
|
}
|
|
5546
5546
|
}), (r, i) => (v(), k("div", hl, [
|
|
5547
5547
|
Ae(r.$slots, "body", { data: {} })
|
|
@@ -5559,7 +5559,7 @@ const Ta = { class: "py-10 flex flex-col justify-center items-center text-center
|
|
|
5559
5559
|
d("div", vl, " Обрано: " + A(n.value) + " з " + A(s.totalCount) + " записів ", 1)
|
|
5560
5560
|
]));
|
|
5561
5561
|
}
|
|
5562
|
-
}), bl = { class: "mt-4" }, xl = { class: "border-b border-gray-200 dark:border-gray-700" }, kl = { class: "-mb-px flex space-x-8" },
|
|
5562
|
+
}), bl = { class: "mt-4" }, xl = { class: "border-b border-gray-200 dark:border-gray-700" }, kl = { class: "-mb-px flex space-x-8" }, wl = ["onClick"], El = { class: "mt-4" }, Sl = { class: "bg-gray-900 rounded-lg overflow-hidden" }, _l = { class: "flex items-center justify-between px-4 py-2 bg-gray-800 border-b border-gray-700" }, Nl = { class: "text-sm text-gray-300" }, Cl = ["onClick"], Tl = { class: "p-4 text-sm text-gray-100 overflow-x-auto" }, Ol = /* @__PURE__ */ ie({
|
|
5563
5563
|
__name: "CodeTabs",
|
|
5564
5564
|
props: {
|
|
5565
5565
|
tabs: {},
|
|
@@ -5583,11 +5583,11 @@ const Ta = { class: "py-10 flex flex-col justify-center items-center text-center
|
|
|
5583
5583
|
"py-2 px-1 border-b-2 font-medium text-sm transition-colors",
|
|
5584
5584
|
n.value === o.id ? "border-blue-500 text-blue-600 dark:text-blue-400" : "border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300 dark:text-gray-400 dark:hover:text-gray-300"
|
|
5585
5585
|
])
|
|
5586
|
-
}, A(o.label), 11,
|
|
5586
|
+
}, A(o.label), 11, wl))), 128))
|
|
5587
5587
|
])
|
|
5588
5588
|
]),
|
|
5589
|
-
d("div",
|
|
5590
|
-
(v(!0), k(se, null, Se(r.tabs, (o) =>
|
|
5589
|
+
d("div", El, [
|
|
5590
|
+
(v(!0), k(se, null, Se(r.tabs, (o) => we((v(), k("div", {
|
|
5591
5591
|
key: o.id
|
|
5592
5592
|
}, [
|
|
5593
5593
|
d("div", Sl, [
|
|
@@ -5618,7 +5618,7 @@ const Ta = { class: "py-10 flex flex-col justify-center items-center text-center
|
|
|
5618
5618
|
])
|
|
5619
5619
|
])
|
|
5620
5620
|
])), [
|
|
5621
|
-
[
|
|
5621
|
+
[Es, n.value === o.id]
|
|
5622
5622
|
])), 128))
|
|
5623
5623
|
])
|
|
5624
5624
|
]));
|
|
@@ -5626,7 +5626,7 @@ const Ta = { class: "py-10 flex flex-col justify-center items-center text-center
|
|
|
5626
5626
|
}), Il = {
|
|
5627
5627
|
key: 0,
|
|
5628
5628
|
class: "vs-dialog-overlay vs-dialog w-full h-full fixed top-0 start-0 z-[80] bg-black bg-opacity-50"
|
|
5629
|
-
}, Dl = { class: "m-[10px] fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 min-h-0 h-fit max-h-[80vh] overflow-hidden opacity-1 flex flex-col bg-white dark:bg-[#1A1A1A] border dark:border-[#454545] pointer-events-auto shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-xl md:w-5/12 w-9/12" }, Al = { class: "py-2.5 px-4 flex justify-between items-center border-0 border-b border-solid border-gray-200 dark:border-b-[#454545]" }, $l = { class: "font-medium text-gray-800 dark:text-[#ffffff]" }, Vl = { class: "sr-only" }, Ml = { class: "ui-dialog__content p-4" }, Rl = { class: "p-4" }, Ll = { class: "pb-5 mb-5 border-b border-gray-200 last:pb-0 last:mb-0 last:border-b-0 dark:border-neutral-700" }, Pl = { class: "text-sm font-[600] text-gray-500" }, Fl = { class: "flex items-center gap-[10px] -ml-[10px] my-[10px]" }, Bl = { class: "h-[14px] w-[14px] border rounded-full flex items-center justify-center" }, jl = {
|
|
5629
|
+
}, Dl = { class: "m-[10px] fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 min-h-0 h-fit max-h-[80vh] overflow-hidden opacity-1 flex flex-col bg-white dark:bg-[#1A1A1A] border dark:border-[#454545] pointer-events-auto shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-xl md:w-5/12 w-9/12" }, Al = { class: "py-2.5 px-4 flex justify-between items-center border-0 border-b border-solid border-gray-200 dark:border-b-[#454545]" }, $l = { class: "font-medium text-gray-800 dark:text-[#ffffff]" }, Vl = { class: "sr-only" }, Ml = { class: "ui-dialog__content p-4 overflow-y-auto flex-1" }, Rl = { class: "p-4" }, Ll = { class: "pb-5 mb-5 border-b border-gray-200 last:pb-0 last:mb-0 last:border-b-0 dark:border-neutral-700" }, Pl = { class: "text-sm font-[600] text-gray-500" }, Fl = { class: "flex items-center gap-[10px] -ml-[10px] my-[10px]" }, Bl = { class: "h-[14px] w-[14px] border rounded-full flex items-center justify-center" }, jl = {
|
|
5630
5630
|
key: 0,
|
|
5631
5631
|
class: "block h-[8px] w-[8px] rounded-full bg-blue-500"
|
|
5632
5632
|
}, Ul = { class: "h-[14px] w-[14px] border rounded-full flex items-center justify-center" }, zl = {
|
|
@@ -5664,17 +5664,17 @@ const Ta = { class: "py-10 flex flex-col justify-center items-center text-center
|
|
|
5664
5664
|
setup(e) {
|
|
5665
5665
|
const t = bs(), n = gn(), s = e, r = $(!1), i = $([]), o = $("json"), a = $(!1), l = $("all"), u = q(() => s.columns ?? []), m = xs();
|
|
5666
5666
|
function c() {
|
|
5667
|
-
i.value = u.value.map((
|
|
5667
|
+
i.value = u.value.map((E) => E.name), o.value = "json", r.value = !0;
|
|
5668
5668
|
}
|
|
5669
5669
|
function f() {
|
|
5670
5670
|
r.value = !1;
|
|
5671
5671
|
}
|
|
5672
5672
|
function h() {
|
|
5673
|
-
i.value = u.value.map((
|
|
5673
|
+
i.value = u.value.map((E) => E.name), l.value = "all";
|
|
5674
5674
|
}
|
|
5675
5675
|
function x() {
|
|
5676
|
-
const
|
|
5677
|
-
i.value =
|
|
5676
|
+
const E = u.value.filter((w) => !w.hidden).map((w) => w.name);
|
|
5677
|
+
i.value = E.length ? E : u.value.map((w) => w.name), l.value = "active";
|
|
5678
5678
|
}
|
|
5679
5679
|
function y() {
|
|
5680
5680
|
i.value = [], l.value = "none";
|
|
@@ -5682,39 +5682,39 @@ const Ta = { class: "py-10 flex flex-col justify-center items-center text-center
|
|
|
5682
5682
|
async function O() {
|
|
5683
5683
|
if (i.value.length === 0) return;
|
|
5684
5684
|
a.value = !0;
|
|
5685
|
-
const
|
|
5685
|
+
const E = new URLSearchParams({
|
|
5686
5686
|
table: s.table,
|
|
5687
5687
|
format: o.value,
|
|
5688
5688
|
columns: i.value.join(",")
|
|
5689
5689
|
});
|
|
5690
5690
|
try {
|
|
5691
|
-
const
|
|
5691
|
+
const w = await fetch(`/api/export?${E.toString()}`, {
|
|
5692
5692
|
method: "GET"
|
|
5693
5693
|
});
|
|
5694
|
-
if (!
|
|
5695
|
-
const C = await
|
|
5694
|
+
if (!w.ok) throw new Error("Export failed");
|
|
5695
|
+
const C = await w.blob(), T = URL.createObjectURL(C), I = document.createElement("a");
|
|
5696
5696
|
I.href = T, I.download = `${s.table}.${o.value}`, document.body.appendChild(I), I.click(), I.remove(), URL.revokeObjectURL(T), f();
|
|
5697
|
-
} catch (
|
|
5698
|
-
console.error(
|
|
5697
|
+
} catch (w) {
|
|
5698
|
+
console.error(w);
|
|
5699
5699
|
const { $notify: C = console.log } = t?.appContext?.config?.globalProperties || {};
|
|
5700
5700
|
C({ type: "error", title: "Помилка", message: "Не вдалося єкспортувати файл" });
|
|
5701
5701
|
} finally {
|
|
5702
5702
|
a.value = !1;
|
|
5703
5703
|
}
|
|
5704
5704
|
}
|
|
5705
|
-
const _ = $("uk"), R = (
|
|
5706
|
-
|
|
5705
|
+
const _ = $("uk"), R = (E) => {
|
|
5706
|
+
E.detail.key === "locale" && (_.value = E.detail.newValue);
|
|
5707
5707
|
};
|
|
5708
5708
|
return Bt(() => {
|
|
5709
5709
|
window.removeEventListener("storage", R);
|
|
5710
5710
|
}), Ge(() => {
|
|
5711
5711
|
window.addEventListener("storage", R), _.value = localStorage.locale;
|
|
5712
|
-
}), (
|
|
5712
|
+
}), (E, w) => (v(), k(se, null, [
|
|
5713
5713
|
d("button", {
|
|
5714
5714
|
onClick: c,
|
|
5715
5715
|
class: L([[Z(m).class], "py-2 max-h-[34px] px-2.5 md:inline-flex hidden items-center gap-x-1.5 text-xs font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"])
|
|
5716
5716
|
}, [
|
|
5717
|
-
|
|
5717
|
+
w[4] || (w[4] = hn('<svg class="flex-shrink-0 mt-0.5 size-3.5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" height="16" width="16"><path d="m3 16 4 4 4-4"></path><path d="M7 20V4"></path><path d="m21 8-4-4-4 4"></path><path d="M17 4v16"></path></svg>', 1)),
|
|
5718
5718
|
be(" " + A(Z(n)("table.export")), 1)
|
|
5719
5719
|
], 2),
|
|
5720
5720
|
(v(), Ce(jt, { to: "body" }, [
|
|
@@ -5728,7 +5728,7 @@ const Ta = { class: "py-10 flex flex-col justify-center items-center text-center
|
|
|
5728
5728
|
class: "size-8 inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:hover:bg-neutral-600 dark:text-neutral-400 dark:focus:bg-neutral-600"
|
|
5729
5729
|
}, [
|
|
5730
5730
|
d("span", Vl, A(Z(n)("table.close")), 1),
|
|
5731
|
-
|
|
5731
|
+
w[5] || (w[5] = d("svg", {
|
|
5732
5732
|
class: "flex-shrink-0 w-4 h-4",
|
|
5733
5733
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5734
5734
|
width: "24",
|
|
@@ -5786,12 +5786,12 @@ const Ta = { class: "py-10 flex flex-col justify-center items-center text-center
|
|
|
5786
5786
|
}, [
|
|
5787
5787
|
d("div", Wl, [
|
|
5788
5788
|
d("div", Gl, [
|
|
5789
|
-
|
|
5789
|
+
we(d("input", {
|
|
5790
5790
|
type: "checkbox",
|
|
5791
5791
|
class: "shrink-0 border border-solid hidden border-gray-200 w-3.5 h-3.5 rounded text-blue-600 focus:ring-offset-0 dark:bg-neutral-800 dark:border-neutral-700 cursor-pointer",
|
|
5792
5792
|
id: "radio-" + C.name,
|
|
5793
5793
|
value: C.name,
|
|
5794
|
-
"onUpdate:modelValue":
|
|
5794
|
+
"onUpdate:modelValue": w[0] || (w[0] = (T) => i.value = T)
|
|
5795
5795
|
}, null, 8, Jl), [
|
|
5796
5796
|
[Sr, i.value]
|
|
5797
5797
|
]),
|
|
@@ -5803,7 +5803,7 @@ const Ta = { class: "py-10 flex flex-col justify-center items-center text-center
|
|
|
5803
5803
|
class: "h-[16px] text-white w-[16px] flex items-center justify-center shrink-0 border rounded bg-white",
|
|
5804
5804
|
style: lt(i.value.includes(C.name) ? "background-color: rgb(37,99,235); border-color: transparent;" : "")
|
|
5805
5805
|
}, [
|
|
5806
|
-
|
|
5806
|
+
we((v(), k("svg", Xl, w[6] || (w[6] = [
|
|
5807
5807
|
d("path", {
|
|
5808
5808
|
stroke: "none",
|
|
5809
5809
|
d: "M0 0h24v24H0z",
|
|
@@ -5811,7 +5811,7 @@ const Ta = { class: "py-10 flex flex-col justify-center items-center text-center
|
|
|
5811
5811
|
}, null, -1),
|
|
5812
5812
|
d("path", { d: "M5 12l5 5l10 -10" }, null, -1)
|
|
5813
5813
|
]), 512)), [
|
|
5814
|
-
[
|
|
5814
|
+
[Es, i.value.includes(C.name)]
|
|
5815
5815
|
])
|
|
5816
5816
|
], 4),
|
|
5817
5817
|
d("span", Zl, A(C[_.value] || C.header || C.ua || C.name), 1)
|
|
@@ -5825,39 +5825,39 @@ const Ta = { class: "py-10 flex flex-col justify-center items-center text-center
|
|
|
5825
5825
|
d("h2", ec, A(Z(n)("table.chooseFormat")), 1),
|
|
5826
5826
|
d("div", tc, [
|
|
5827
5827
|
d("div", nc, [
|
|
5828
|
-
|
|
5828
|
+
we(d("input", {
|
|
5829
5829
|
type: "radio",
|
|
5830
5830
|
name: "hs-pro-duecmfm",
|
|
5831
5831
|
class: "text-blue-600 border-gray-300 rounded-full shrink-0 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-500 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-800",
|
|
5832
5832
|
id: "json",
|
|
5833
5833
|
value: "json",
|
|
5834
|
-
"onUpdate:modelValue":
|
|
5834
|
+
"onUpdate:modelValue": w[1] || (w[1] = (C) => o.value = C)
|
|
5835
5835
|
}, null, 512), [
|
|
5836
5836
|
[Yt, o.value]
|
|
5837
5837
|
]),
|
|
5838
5838
|
d("label", sc, A(Z(n)("table.format.json")), 1)
|
|
5839
5839
|
]),
|
|
5840
5840
|
d("div", rc, [
|
|
5841
|
-
|
|
5841
|
+
we(d("input", {
|
|
5842
5842
|
type: "radio",
|
|
5843
5843
|
name: "hs-pro-duecmfm",
|
|
5844
5844
|
class: "text-blue-600 border-gray-300 rounded-full shrink-0 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-500 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-800",
|
|
5845
5845
|
id: "csv",
|
|
5846
5846
|
value: "csv",
|
|
5847
|
-
"onUpdate:modelValue":
|
|
5847
|
+
"onUpdate:modelValue": w[2] || (w[2] = (C) => o.value = C)
|
|
5848
5848
|
}, null, 512), [
|
|
5849
5849
|
[Yt, o.value]
|
|
5850
5850
|
]),
|
|
5851
5851
|
d("label", ic, A(Z(n)("table.format.csv")), 1)
|
|
5852
5852
|
]),
|
|
5853
5853
|
d("div", oc, [
|
|
5854
|
-
|
|
5854
|
+
we(d("input", {
|
|
5855
5855
|
type: "radio",
|
|
5856
5856
|
name: "hs-pro-duecmfm",
|
|
5857
5857
|
class: "text-blue-600 border-gray-300 rounded-full shrink-0 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-500 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-800",
|
|
5858
5858
|
id: "xlsx",
|
|
5859
5859
|
value: "xlsx",
|
|
5860
|
-
"onUpdate:modelValue":
|
|
5860
|
+
"onUpdate:modelValue": w[3] || (w[3] = (C) => o.value = C)
|
|
5861
5861
|
}, null, 512), [
|
|
5862
5862
|
[Yt, o.value]
|
|
5863
5863
|
]),
|
package/dist/index.umd.js
CHANGED
|
@@ -18,4 +18,4 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
18
18
|
* @vue/compiler-dom v3.5.17
|
|
19
19
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
20
20
|
* @license MIT
|
|
21
|
-
**/const xs=Symbol(process.env.NODE_ENV!=="production"?"vModelRadio":""),Ns=Symbol(process.env.NODE_ENV!=="production"?"vModelCheckbox":""),ws=Symbol(process.env.NODE_ENV!=="production"?"vModelText":""),Ss=Symbol(process.env.NODE_ENV!=="production"?"vModelSelect":""),pn=Symbol(process.env.NODE_ENV!=="production"?"vModelDynamic":""),Cs=Symbol(process.env.NODE_ENV!=="production"?"vOnModifiersGuard":""),_s=Symbol(process.env.NODE_ENV!=="production"?"vOnKeysGuard":""),Ts=Symbol(process.env.NODE_ENV!=="production"?"vShow":""),fn=Symbol(process.env.NODE_ENV!=="production"?"Transition":""),Os=Symbol(process.env.NODE_ENV!=="production"?"TransitionGroup":"");jr({[xs]:"vModelRadio",[Ns]:"vModelCheckbox",[ws]:"vModelText",[Ss]:"vModelSelect",[pn]:"vModelDynamic",[Cs]:"withModifiers",[_s]:"withKeys",[Ts]:"vShow",[fn]:"Transition",[Os]:"TransitionGroup"});let Fe;function vi(e,t=!1){return Fe||(Fe=document.createElement("div")),t?(Fe.innerHTML=`<div foo="${e.replace(/"/g,""")}">`,Fe.children[0].getAttribute("foo")):(Fe.innerHTML=e,Fe.textContent)}const yi={parseMode:"html",isVoidTag:$r,isNativeTag:e=>Br(e)||Ir(e)||Ar(e),isPreTag:e=>e==="pre",isIgnoreNewlineTag:e=>e==="pre"||e==="textarea",decodeEntities:vi,isBuiltInComponent:e=>{if(e==="Transition"||e==="transition")return fn;if(e==="TransitionGroup"||e==="transition-group")return Os},getNamespace(e,t,n){let r=t?t.ns:n;if(t&&r===2)if(t.tag==="annotation-xml"){if(e==="svg")return 1;t.props.some(o=>o.type===6&&o.name==="encoding"&&o.value!=null&&(o.value.content==="text/html"||o.value.content==="application/xhtml+xml"))&&(r=0)}else/^m(?:[ions]|text)$/.test(t.tag)&&e!=="mglyph"&&e!=="malignmark"&&(r=0);else t&&r===1&&(t.tag==="foreignObject"||t.tag==="desc"||t.tag==="title")&&(r=0);if(r===0){if(e==="svg")return 1;if(e==="math")return 2}return r}},bi=e=>{e.type===1&&e.props.forEach((t,n)=>{t.type===6&&t.name==="style"&&t.value&&(e.props[n]={type:7,name:"bind",arg:D("style",!0,t.loc),exp:Ei(t.value.content,t.loc),modifiers:[],loc:t.loc})})},Ei=(e,t)=>{const n=Cr(e);return D(JSON.stringify(n),!1,t,3)};function fe(e,t){return j(e,t,process.env.NODE_ENV!=="production"?ki:void 0)}const ki={53:"v-html is missing expression.",54:"v-html will override element children.",55:"v-text is missing expression.",56:"v-text will override element children.",57:"v-model can only be used on <input>, <textarea> and <select> elements.",58:"v-model argument is not supported on plain elements.",59:"v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.",60:"Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.",61:"v-show is missing expression.",62:"<Transition> expects exactly one child element or component.",63:"Tags with side effect (<script> and <style>) are ignored in client component templates."},xi=(e,t,n)=>{const{exp:r,loc:o}=e;return r||n.onError(fe(53,o)),t.children.length&&(n.onError(fe(54,o)),t.children.length=0),{props:[W(D("innerHTML",!0,o),r||D("",!0))]}},Ni=(e,t,n)=>{const{exp:r,loc:o}=e;return r||n.onError(fe(55,o)),t.children.length&&(n.onError(fe(56,o)),t.children.length=0),{props:[W(D("textContent",!0),r?ae(r,n)>0?r:Y(n.helperString(st),[r],o):D("",!0))]}},wi=(e,t,n)=>{const r=bs(e,t,n);if(!r.props.length||t.tagType===1)return r;e.arg&&n.onError(fe(58,e.arg.loc));function o(){const a=se(t,"bind");a&&Ne(a.arg,"value")&&n.onError(fe(60,a.loc))}const{tag:i}=t,l=n.isCustomElement(i);if(i==="input"||i==="textarea"||i==="select"||l){let a=ws,c=!1;if(i==="input"||l){const p=Je(t,"type");if(p){if(p.type===7)a=pn;else if(p.value)switch(p.value.content){case"radio":a=xs;break;case"checkbox":a=Ns;break;case"file":c=!0,n.onError(fe(59,e.loc));break;default:process.env.NODE_ENV!=="production"&&o();break}}else Vr(t)?a=pn:process.env.NODE_ENV!=="production"&&o()}else i==="select"?a=Ss:process.env.NODE_ENV!=="production"&&o();c||(r.needRuntime=n.helper(a))}else n.onError(fe(57,e.loc));return r.props=r.props.filter(a=>!(a.key.type===4&&a.key.content==="modelValue")),r},Si=he("passive,once,capture"),Ci=he("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),_i=he("left,right"),Ds=he("onkeyup,onkeydown,onkeypress"),Ti=(e,t,n,r)=>{const o=[],i=[],l=[];for(let a=0;a<t.length;a++){const c=t[a].content;c==="native"&&Pe("COMPILER_V_ON_NATIVE",n,r)||Si(c)?l.push(c):_i(c)?ne(e)?Ds(e.content.toLowerCase())?o.push(c):i.push(c):(o.push(c),i.push(c)):Ci(c)?i.push(c):o.push(c)}return{keyModifiers:o,nonKeyModifiers:i,eventOptionModifiers:l}},Bs=(e,t)=>ne(e)&&e.content.toLowerCase()==="onclick"?D(t,!0):e.type!==4?pe(["(",e,`) === "onClick" ? "${t}" : (`,e,")"]):e,Oi=(e,t,n)=>vs(e,t,n,r=>{const{modifiers:o}=e;if(!o.length)return r;let{key:i,value:l}=r.props[0];const{keyModifiers:a,nonKeyModifiers:c,eventOptionModifiers:p}=Ti(i,o,n,e.loc);if(c.includes("right")&&(i=Bs(i,"onContextmenu")),c.includes("middle")&&(i=Bs(i,"onMouseup")),c.length&&(l=Y(n.helper(Cs),[l,JSON.stringify(c)])),a.length&&(!ne(i)||Ds(i.content.toLowerCase()))&&(l=Y(n.helper(_s),[l,JSON.stringify(a)])),p.length){const m=p.map(Bt).join("");i=ne(i)?D(`${i.content}${m}`,!0):pe(["(",i,`) + "${m}"`])}return{props:[W(i,l)]}}),Di=(e,t,n)=>{const{exp:r,loc:o}=e;return r||n.onError(fe(61,o)),{props:[],needRuntime:n.helper(Ts)}},Bi=(e,t)=>{if(e.type===1&&e.tagType===1&&t.isBuiltInComponent(e.tag)===fn)return()=>{if(!e.children.length)return;Is(e)&&t.onError(fe(62,{start:e.children[0].loc.start,end:e.children[e.children.length-1].loc.end,source:""}));const r=e.children[0];if(r.type===1)for(const o of r.props)o.type===7&&o.name==="show"&&e.props.push({type:6,name:"persisted",nameLoc:e.loc,value:void 0,loc:e.loc})}};function Is(e){const t=e.children=e.children.filter(r=>r.type!==3&&!(r.type===2&&!r.content.trim())),n=t[0];return t.length!==1||n.type===11||n.type===9&&n.branches.some(Is)}const Ii=(e,t)=>{e.type===1&&e.tagType===0&&(e.tag==="script"||e.tag==="style")&&(process.env.NODE_ENV!=="production"&&t.onError(fe(63,e.loc)),t.removeNode())};function Ai(e,t){return e==="template"?!0:e in As?As[e].has(t):t in $s?$s[t].has(e):!(e in Ms&&Ms[e].has(t)||t in Rs&&Rs[t].has(e))}const je=new Set(["h1","h2","h3","h4","h5","h6"]),De=new Set([]),As={head:new Set(["base","basefront","bgsound","link","meta","title","noscript","noframes","style","script","template"]),optgroup:new Set(["option"]),select:new Set(["optgroup","option","hr"]),table:new Set(["caption","colgroup","tbody","tfoot","thead"]),tr:new Set(["td","th"]),colgroup:new Set(["col"]),tbody:new Set(["tr"]),thead:new Set(["tr"]),tfoot:new Set(["tr"]),script:De,iframe:De,option:De,textarea:De,style:De,title:De},$s={html:De,body:new Set(["html"]),head:new Set(["html"]),td:new Set(["tr"]),colgroup:new Set(["table"]),caption:new Set(["table"]),tbody:new Set(["table"]),tfoot:new Set(["table"]),col:new Set(["colgroup"]),th:new Set(["tr"]),thead:new Set(["table"]),tr:new Set(["tbody","thead","tfoot"]),dd:new Set(["dl","div"]),dt:new Set(["dl","div"]),figcaption:new Set(["figure"]),summary:new Set(["details"]),area:new Set(["map"])},Ms={p:new Set(["address","article","aside","blockquote","center","details","dialog","dir","div","dl","fieldset","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","main","nav","menu","ol","p","pre","section","table","ul"]),svg:new Set(["b","blockquote","br","code","dd","div","dl","dt","em","embed","h1","h2","h3","h4","h5","h6","hr","i","img","li","menu","meta","ol","p","pre","ruby","s","small","span","strong","sub","sup","table","u","ul","var"])},Rs={a:new Set(["a"]),button:new Set(["button"]),dd:new Set(["dd","dt"]),dt:new Set(["dd","dt"]),form:new Set(["form"]),li:new Set(["li"]),h1:je,h2:je,h3:je,h4:je,h5:je,h6:je},$i=(e,t)=>{if(e.type===1&&e.tagType===0&&t.parent&&t.parent.type===1&&t.parent.tagType===0&&!Ai(t.parent.tag,e.tag)){const n=new SyntaxError(`<${e.tag}> cannot be child of <${t.parent.tag}>, according to HTML specifications. This can cause hydration errors or potentially disrupt future functionality.`);n.loc=e.loc,t.onWarn(n)}},Mi=[bi,...process.env.NODE_ENV!=="production"?[Bi,$i]:[]],Ri={cloak:gi,html:xi,text:Ni,model:wi,on:Oi,show:Di};function Li(e,t={}){return mi(e,be({},yi,t,{nodeTransforms:[Ii,...Mi,...t.nodeTransforms||[]],directiveTransforms:be({},Ri,t.directiveTransforms||{}),transformHoist:null}))}function Pi(e,t){const n=e.trim().startsWith("<")?e:`<span>${e}</span>`,{code:r}=Li(n,{mode:"function"}),o=new Function("Vue",`${r}; return render`)(Js);return s.defineComponent({name:"DynamicFromString",props:t?.props??{},emits:t?.emits??[],setup(i,l){return t?.setup?.()??{}},render:o})}const un={};function Ls(e){return un[e]||(un[e]=Pi(e,{props:{row:Object,value:null,data:Object,column:Object}})),un[e]}const Fi={class:"py-10 flex flex-col justify-center items-center text-center"},ji={class:"max-w-sm mx-auto"},zi={class:"mt-2 font-medium text-gray-800 dark:text-neutral-200"},Ui={class:"mb-5 text-sm text-gray-500 dark:text-neutral-500"},Hi=s.defineComponent({__name:"nodata",props:{title:{default:"No data"},description:{default:"No data here yet. We will notify you when there's an update."}},setup(e){return(t,n)=>(s.openBlock(),s.createElementBlock("div",Fi,[n[0]||(n[0]=s.createStaticVNode('<svg class="w-48 mx-auto mb-4" width="178" height="90" viewBox="0 0 178 90" fill="none" xmlns="http://www.w3.org/2000/svg"><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(#filter19)"><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="filter19" 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></svg>',1)),s.createElementVNode("div",ji,[s.createElementVNode("p",zi,s.toDisplayString(t.title),1),s.createElementVNode("p",Ui,s.toDisplayString(t.description),1)])]))}}),qi=["aria-checked","data-state"],Ki={key:0,"data-state":"checked","data-slot":"checkbox-indicator",class:"flex items-center justify-center transition-none text-white"},Wi={class:"truncate"},Gi=["onKeydown"],Ji={key:0,class:"hs-dropdown-menu hs-dropdown-open:opacity-100 w-44 transition-[opacity,margin] duration z-11 bg-white rounded-xl shadow-lg dark:bg-neutral-950",role:"menu","aria-orientation":"vertical","aria-labelledby":"hs-pro-inthmtdid1"},Yi={class:"py-2 px-4"},Xi={class:"block font-medium text-[13px] text-gray-800 dark:text-neutral-200"},Zi={class:"truncate"},Qi={class:"p-1 border-t border-gray-200 dark:border-neutral-800"},Vi={class:"space-y-0.5 max-h-48 overflow-y-auto [&::-webkit-scrollbar]:w-1 [&::-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"},el=["onClick"],tl={key:0,class:"shrink-0 size-3.5 flex justify-center items-center"},nl={key:1,class:"shrink-0 size-3.5 ms-auto",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},sl={key:1,class:"p-4"},rl={class:"text-base font-semibold text-gray-800 mb-3"},ol={class:"mb-4"},il={class:"block text-sm font-medium text-gray-700 mb-1"},ll=["value"],al={class:"flex justify-end gap-2 border-t pt-3"},cl=s.defineComponent({__name:"EditableCell",props:{row:{},column:{},value:{},format:{},options:{},accent:{},editable:{type:Boolean},color:{},classContent:{},fetchOptions:{type:Function}},emits:["edit","update"],setup(e,{emit:t}){const n=e,r=t,o=s.ref(!1),i=s.ref(null),l=s.ref(null),a=s.ref(n.value),c=s.ref([]),p=s.ref("uk"),m=C=>{C.detail.key==="locale"&&(p.value=C.detail.newValue)};s.watch(()=>n.value,C=>{a.value=C});const d=s.computed(()=>{const C=n.column?.schema?.[n.column?.name];if(C?.type)switch(C.type){case"Text":return"text";case"Number":return"number";case"Switcher":return"boolean";case"Autocomplete":return"select";case"Date":return"date";default:return"text"}const x=(n.format||n.column?.format||"text").toLowerCase();return["text","number","date","select","boolean"].includes(x)?x:"text"}),f=s.computed(()=>(n.column?.schema?.[n.column?.name]?.options||n.options||c.value||[]).map(T=>({value:T.id??T.value,color:T.color,label:T.text??T.label}))),h=s.ref(null);function b(){n.editable&&(o.value||document.dispatchEvent(new CustomEvent("close-all-popovers")),o.value=!o.value,o.value&&s.nextTick(()=>{i.value?.focus?.(),i.value?.showPicker?.(),d.value==="select"&&S()}))}function v(){r("edit",n.row,n.column.name,a.value),r("update",n.row,n.column.name,a.value),o.value=!1}function _(){a.value=n.value,o.value=!1}function N(C){if(!o.value)return;const T=C.target;h.value&&!h.value.contains(T)&&(o.value=!1)}s.onMounted(()=>{document.addEventListener("click",N),window.addEventListener("storage",m),p.value=localStorage.locale,document.addEventListener("close-all-popovers",()=>{o.value=!1})}),s.onBeforeUnmount(()=>{document.removeEventListener("click",N),window.removeEventListener("storage",m),document.removeEventListener("close-all-popovers",()=>{o.value=!1})});function I(){n.editable&&(a.value=!a.value,r("update",n.row,n.column.name,a.value))}function k(C){return n.color?n.color.startsWith("#")?C.replace("{c}",`[${n.color}]`):C.replace("{c}",`${n.color}-500`):C.replace("{c}","cyan-500")}const E=s.computed(()=>({border:k("border-{c}"),ring:k("focus:ring-{c}"),text:k("text-{c}"),hover:k("hover:text-{c}"),bg:k("bg-{c} hover:bg-{c}/90")}));async function S(){if(d.value==="select"&&!(n.options&&n.options.length>0||n.column?.schema?.[n.column?.name]?.options?.length>0)&&c.value.length===0&&n.fetchOptions)try{c.value=await n.fetchOptions(n.column.name)}catch(C){console.error(`Не удалось загрузить options для ${n.column.name}`,C)}}return(C,T)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(C.classContent?C.classContent:"relative group w-full"),ref_key:"cellRef",ref:h},[d.value==="boolean"&&C.editable?(s.openBlock(),s.createElementBlock("button",{key:0,type:"button",role:"checkbox","aria-checked":a.value?"true":"false","data-state":a.value?"checked":"unchecked",class:s.normalizeClass(["peer size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] h-4 w-4 flex items-center justify-center",a.value?E.value.border:"",E.value.ring,a.value?E.value.bg:""]),onClick:s.withModifiers(I,["stop"])},[a.value?(s.openBlock(),s.createElementBlock("span",Ki,T[4]||(T[4]=[s.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-check size-3.5"},[s.createElementVNode("path",{d:"M20 6 9 17l-5-5"})],-1)]))):s.createCommentVNode("",!0)],10,qi)):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[s.createElementVNode("div",{class:"flex items-center justify-between cursor-pointer",onClick:s.withModifiers(b,["stop"])},[s.createElementVNode("span",Wi,[s.renderSlot(C.$slots,"default")]),C.editable?(s.openBlock(),s.createElementBlock("svg",{key:0,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",class:s.normalizeClass(["w-4 h-4 opacity-0 group-hover:opacity-100 transition-opacity",E.value.text])},T[5]||(T[5]=[s.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L7.5 21H3v-4.5L16.732 3.732z"},null,-1)]),2)):s.createCommentVNode("",!0)]),o.value?(s.openBlock(),s.createElementBlock("div",{key:0,ref_key:"popoverRef",ref:l,class:s.normalizeClass(["absolute top-0 left-[50px] ml-2 z-50 bg-white border rounded-lg shadow-lg",d.value==="select"?"":"w-[450px]"]),onKeydown:s.withKeys(s.withModifiers(_,["stop","prevent"]),["esc"])},[d.value==="select"?(s.openBlock(),s.createElementBlock("div",Ji,[s.createElementVNode("div",Yi,[s.createElementVNode("span",Xi,[s.createElementVNode("span",Zi," Редагувати "+s.toDisplayString(C.column[p.value]||C.column.header||C.column.ua||C.column.name),1)])]),s.createElementVNode("div",Qi,[s.createElementVNode("div",Vi,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(f.value,x=>(s.openBlock(),s.createElementBlock("label",{key:x.value.toString(),onClick:s.withModifiers(()=>{a.value=x.value,v()},["prevent"]),class:"py-1.5 px-3 group flex items-center gap-x-3 rounded-lg cursor-pointer text-[13px] text-gray-800 hover:bg-gray-100 dark:text-neutral-200 dark:hover:bg-neutral-800 dark:focus:bg-neutral-800"},[T[8]||(T[8]=s.createElementVNode("input",{type:"radio",class:"hidden",id:"hs-pro-chthuts1op",name:"hs-pro-chthuts1"},null,-1)),x.color?(s.openBlock(),s.createElementBlock("span",tl,T[6]||(T[6]=[s.createElementVNode("span",{class:"shrink-0 size-2 block mx-auto bg-emerald-500 rounded-full"},null,-1)]))):s.createCommentVNode("",!0),s.createTextVNode(" "+s.toDisplayString(x.label)+" ",1),a.value===x.value?(s.openBlock(),s.createElementBlock("svg",nl,T[7]||(T[7]=[s.createElementVNode("path",{d:"M20 6 9 17l-5-5"},null,-1)]))):s.createCommentVNode("",!0)],8,el))),128))])])])):(s.openBlock(),s.createElementBlock("div",sl,[s.createElementVNode("h3",rl," Редагувати "+s.toDisplayString(C.column[p.value]||C.column.header||C.column.ua||C.column.name),1),s.createElementVNode("div",ol,[s.createElementVNode("label",il,s.toDisplayString(C.column[p.value]||C.column.header||C.column.ua||C.column.name),1),d.value==="text"?s.withDirectives((s.openBlock(),s.createElementBlock("input",{key:0,ref_key:"inputRef",ref:i,"onUpdate:modelValue":T[0]||(T[0]=x=>a.value=x),type:"text",class:s.normalizeClass(["w-full rounded-md border px-3 py-2 text-sm outline-none border-gray-300",E.value.ring,E.value.border]),onKeyup:s.withKeys(v,["enter"])},null,34)),[[s.vModelText,a.value]]):d.value==="number"?s.withDirectives((s.openBlock(),s.createElementBlock("input",{key:1,ref_key:"inputRef",ref:i,"onUpdate:modelValue":T[1]||(T[1]=x=>a.value=x),type:"number",class:s.normalizeClass(["w-full rounded-md border px-3 py-2 text-sm outline-none border-gray-300",E.value.ring,E.value.border]),onKeyup:s.withKeys(v,["enter"])},null,34)),[[s.vModelText,a.value,void 0,{number:!0}]]):d.value==="date"?s.withDirectives((s.openBlock(),s.createElementBlock("input",{key:2,ref_key:"inputRef",ref:i,"onUpdate:modelValue":T[2]||(T[2]=x=>a.value=x),type:"date",class:s.normalizeClass(["w-full rounded-md border px-3 py-2 text-sm outline-none border-gray-300",E.value.ring,E.value.border]),onChange:v},null,34)),[[s.vModelText,a.value]]):d.value==="select"?s.withDirectives((s.openBlock(),s.createElementBlock("select",{key:3,ref_key:"inputRef",ref:i,"onUpdate:modelValue":T[3]||(T[3]=x=>a.value=x),class:s.normalizeClass(["w-full rounded-md border px-3 py-2 text-sm outline-none bg-white border-gray-300",E.value.ring,E.value.border])},[T[9]||(T[9]=s.createElementVNode("option",{disabled:"",value:""},"-- виберіть --",-1)),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(f.value,x=>(s.openBlock(),s.createElementBlock("option",{key:x.value.toString(),value:x.value},s.toDisplayString(x.label),9,ll))),128))],2)),[[s.vModelSelect,a.value]]):s.createCommentVNode("",!0)]),s.createElementVNode("div",al,[s.createElementVNode("button",{type:"button",class:"px-4 py-1.5 text-sm rounded-md border border-gray-300 text-gray-700 bg-white hover:bg-gray-50",onClick:_}," Скасувати "),s.createElementVNode("button",{type:"button",class:s.normalizeClass(["px-4 py-1.5 text-sm rounded-md text-white",E.value.bg]),onClick:v}," Зберегти ",2)])]))],42,Gi)):s.createCommentVNode("",!0)],64))],2))}}),dl={key:0,class:"text-center py-8"},pl={class:"inline-flex items-center space-x-2"},fl={key:2,class:"overflow-x-auto"},ul=["checked","indeterminate"],hl=["onClick"],ml={class:"flex items-center justify-between"},gl={class:"flex items-center gap-1.5"},vl={key:0,class:"relative group"},yl=["onMouseenter"],bl={key:0,class:"ml-1 text-xs"},El=["onClick"],kl=["checked","onChange"],xl=["onClick"],Nl={key:1,class:"text-center"},wl=["colspan"],kt=s.defineComponent({name:"DataTable",__name:"DataTable",props:{rows:{default:()=>[]},columns:{default:()=>[]},api:{},router:{},tableStyle:{default:""},size:{default:"medium"},theme:{default:"light"},loading:{type:Boolean,default:!1},classWrapper:{default:""},classTable:{default:"min-w-full divide-y divide-gray-200 dark:divide-gray-700"},classTbody:{default:""},classTr:{default:""},classTd:{default:""},classTh:{default:""},classThead:{default:""},classContent:{default:""},classLink:{default:""},selectable:{type:Boolean,default:!1},selectedRows:{default:()=>[]},limit:{default:10},page:{default:1},total:{default:0},showPagination:{type:Boolean,default:!0},sortable:{type:Boolean,default:!1},defaultSort:{default:()=>[]},clickable:{type:Boolean,default:!1},getCellData:{type:Function,default:void 0},form:{},color:{default:"blue"}},emits:["update:page","update:selectedRows","row-click","sort","cell-update"],setup(e,{emit:t}){const n=e,r=t,o=s.ref(n.selectedRows||[]),i=s.ref(n.defaultSort.map(u=>({field:u.name,direction:u.asc?"asc":"desc"}))),l=s.ref([]),a=s.ref([]),c=s.ref(!1),p=s.ref(null),m=s.ref(n.router),d=s.useSlots(),f=s.computed(()=>d.action);function h(u){if(m.value){m.value.push(u);return}location.href=u}const b=s.computed(()=>{if(n.api)return l.value;if(n.sortable&&i.value.length>0){const u=[...n.rows];return u.sort((O,y)=>{for(const A of i.value){if(!A.direction)return 0;const g=O[A.field],P=y[A.field];if(g==null)return 1;if(P==null)return-1;let te=0;typeof g=="string"&&typeof P=="string"?te=g.localeCompare(P):g<P?te=-1:g>P?te=1:te=0;const ze=A.direction==="desc"?-te:te;if(ze!==0)return ze}return 0}),u}return n.rows});s.watch(()=>n.selectedRows,u=>{o.value=u||[]});const v=u=>o.value.some(O=>O===u),_=u=>{const O=o.value.findIndex(y=>y===u);O>-1?o.value.splice(O,1):o.value.push(u),r("update:selectedRows",[...o.value])},N=s.computed(()=>b.value.length>0&&o.value.length===b.value.length),I=s.computed(()=>o.value.length>0&&o.value.length<b.value.length),k=()=>{N.value?o.value=[]:o.value=[...b.value],r("update:selectedRows",[...o.value])},E=(u,O)=>{if(!n.sortable)return;if(O?.ctrlKey||O?.metaKey){const g=i.value.findIndex(P=>P.field===u);if(g>=0){const P=i.value[g];P.direction==="asc"?P.direction="desc":P.direction==="desc"&&i.value.splice(g,1)}else i.value.unshift({field:u,direction:"asc"})}else{const g=i.value.find(P=>P.field===u);g?g.direction==="asc"?g.direction="desc":g.direction==="desc"&&(i.value=[]):i.value=[{field:u,direction:"asc"}]}const A=i.value.filter(g=>g.direction).map(g=>({name:g.field,asc:g.direction==="asc"}));r("sort",A),n.api&&ue()},S=u=>i.value.find(y=>y.field===u)?.direction==="asc",C=u=>{const O=i.value.find(y=>y.field===u);if(!O)return"";switch(O.direction){case"asc":return"↑";case"desc":return"↓";default:return"↕️"}},T=u=>n.sortable&&u.sortable!==!1,x=u=>{n.clickable&&r("row-click",u)},w=(u,O)=>{const y=O[u.name];if(n.getCellData||u.getCellData){const A=u.getCellData||n.getCellData;if(A){const g={name:u.name,row:O,value:y};return A(g)}}return["_data","_text"].map(A=>{const g=`${u.name}${A}`;return O[g]?O[g]:null}).find(A=>A)||(u.link?y||"-":y)},R=u=>u.width?u.width==="w-full"?"w-full":typeof u.width=="string"?`w-[${u.width}px] max-w-[${u.width}px] min-w-[${u.width}px]`:typeof u.width=="number"?`w-[${u.width}px] max-w-[${u.width}px] min-w-[${u.width}px]`:"":"",L=s.ref(n.page),B=s.ref(n.limit),F=s.ref(n.total),U=s.ref(1),H=s.ref(10),ce=s.ref(0),ge=s.computed(()=>n.api?U.value:L.value),Be=s.computed(()=>n.api?H.value:B.value),Qe=s.computed(()=>n.api?ce.value:F.value),G=s.computed(()=>{const{theme:u}=n;return u==="dark"?{container:"dark",loading:"text-gray-400",error:"text-red-400",thead:"bg-gray-800",th:"text-gray-300",thHover:"hover:bg-gray-700",tbody:"bg-gray-900 divide-gray-700",tr:"hover:bg-gray-800",td:"text-gray-300",empty:"text-gray-400",checkbox:"border-gray-600 bg-gray-700 text-blue-400"}:u==="light"?{container:"",loading:"text-gray-500",error:"text-red-500",thead:"bg-gray-50",th:"text-gray-500",thHover:"hover:bg-gray-100",tbody:"bg-white divide-gray-200",tr:"hover:bg-gray-50",td:"text-gray-900",empty:"text-gray-500",checkbox:"border-gray-300 bg-white text-blue-600"}:{container:"",loading:"text-gray-500 dark:text-gray-400",error:"text-red-500 dark:text-red-400",thead:"bg-gray-50 dark:bg-gray-800",th:"text-gray-500 dark:text-gray-300",thHover:"hover:bg-gray-100 dark:hover:bg-gray-700",tbody:"bg-white dark:bg-gray-900 divide-gray-200 dark:divide-gray-700",tr:"hover:bg-gray-50 dark:hover:bg-gray-800",td:"text-gray-900 dark:text-gray-300",empty:"text-gray-500 dark:text-gray-400",checkbox:"border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 text-blue-600 dark:text-blue-400"}});s.watch(()=>n.page,u=>{L.value=u}),s.watch(()=>n.limit,u=>{B.value=u}),s.watch(()=>n.total,u=>{F.value=u});async function ue(){if(n.api){c.value=!0,p.value=null;try{const u=new URL(n.api,window.location.origin);if(u.searchParams.set("page",ge.value.toString()),u.searchParams.set("limit",Be.value.toString()),i.value.length>0){const A=i.value.filter(g=>g.direction).map(g=>`${g.field}:${g.direction}`).join(",");A&&u.searchParams.set("sort",A)}const O=await fetch(u.toString());if(!O.ok)throw new Error(`HTTP error! status: ${O.status}`);const y=await O.json();y.rows&&Array.isArray(y.rows)&&(l.value=y.rows),y.columns&&Array.isArray(y.columns)&&(a.value=y.columns),y.total!==void 0&&(n.api?ce.value=y.total:F.value=y.total)}catch(u){p.value=u instanceof Error?u.message:"Failed to fetch data",console.error("Error fetching data:",u)}finally{c.value=!1}}}const Ie=u=>{n.api?U.value=u:(L.value=u,r("update:page",u)),n.api&&ue()},ba=s.computed(()=>n.showPagination&&Qe.value>0),Ve=s.computed(()=>({small:{header:"px-3 py-2 text-xs",cell:"px-3 py-2 text-xs"},medium:{header:"px-6 py-3 text-xs",cell:"px-6 py-4 text-sm"},large:{header:"px-8 py-4 text-sm",cell:"px-8 py-6 text-base"}})[n.size]),Ea=wt(),xt=s.ref("uk"),Us=u=>{u.detail.key==="locale"&&(xt.value=u.detail.newValue)};s.onUnmounted(()=>{window.removeEventListener("resize",Us)}),s.onMounted(()=>{window.addEventListener("storage",Us),xt.value=localStorage.locale,n.api&&(n.page&&(U.value=n.page),n.limit&&(H.value=n.limit),n.total&&(ce.value=n.total),ue())}),s.watch(()=>n.api,u=>{u&&(U.value=n.page||1,H.value=n.limit||10,ce.value=n.total||0,ue())});const Hs=s.computed(()=>n.api?a.value:n.columns),hn=s.ref([]),Nt=s.ref({});s.provide("registerColumn",(u,O)=>{hn.value.push(u),O&&u.slotName&&(Nt.value[u.name]=O)});const mn=s.computed(()=>{const u=Hs.value||[],O=[],y=d.default?.();if(y){const A=y.filter(g=>g.type?.name==="Column"||g.type==="Column"||g.type&&typeof g.type=="object"&&g.type.name==="Column").map(g=>{const P=g.props||g.componentProps||{},te=P.field||P.name||"",ze=P.header||P.label||"",Ws=g.children&&g.children.body,vn={name:te,ua:ze,format:P.format||"text",slotName:Ws?"body":void 0,...P};return Ws&&vn.name&&(Nt.value[vn.name]=g.children.body),vn});O.push(...A)}if(hn.value.length>0&&O.push(...hn.value),O.length>0){const A=[],g=new Set(O.map(P=>P.name));return u.forEach(P=>{g.has(P.name)||A.push(P)}),A.push(...O),console.log("Combined columns:",{default:u.length,custom:O.length,combined:A.length}),A}return u.length>0?u:[]}),ka=(u="text")=>St[u.toLowerCase()]||St.text,Ae=s.ref({});async function xa(u){const{data:O,api:y}=mn.value.find(A=>A.name===u);if(Ae.value[u])return Ae.value[u];if(O||y){const A=y||`/api/suggest/${O}?json=1`,P=await(await fetch(A)).json();P.data&&Array.isArray(P.data)&&(Ae.value[u]=P.data.map(te=>({value:te.id??te.value,label:te.text??te.label})))}return Ae.value[u]}function Na(u,O,y,A){const g=A;g!==-1&&(n.rows[g]={...n.rows[g],[O]:y}),r("cell-update",u,O,y)}function qs(u){const y=`info:${xt.value}`;return u[y]?u[y]:u.info?u.info:null}const gn=s.ref(null),Ks=s.ref({top:"0px",left:"0px"});function wa(u,O){const y=u.currentTarget.getBoundingClientRect();gn.value=O,Ks.value={top:`${y.bottom+4}px`,left:`${Math.min(y.left,window.innerWidth-230)}px`}}function Sa(){gn.value=null}return s.watch(()=>n.form,async u=>{u&&(Ae.value={})}),s.onMounted(()=>{n.form&&(Ae.value={})}),(u,O)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["w-full",G.value.container])},[c.value||n.loading?(s.openBlock(),s.createElementBlock("div",dl,[s.createElementVNode("div",pl,[O[0]||(O[0]=s.createElementVNode("div",{class:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-600"},null,-1)),s.createElementVNode("span",{class:s.normalizeClass(G.value.loading)},"Loading...",2)])])):p.value?(s.openBlock(),s.createElementBlock("div",{key:1,class:s.normalizeClass(["text-center py-8",G.value.error])},s.toDisplayString(p.value),3)):n.loading?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock("div",fl,[s.createElementVNode("div",{class:s.normalizeClass(u.classWrapper?u.classWrapper:"relative w-full overflow-auto")},[s.createElementVNode("table",{class:s.normalizeClass(u.classTable),style:s.normalizeStyle(u.tableStyle)},[s.createElementVNode("thead",{class:s.normalizeClass(u.classThead||G.value.thead)},[s.createElementVNode("tr",null,[u.selectable?(s.openBlock(),s.createElementBlock("th",{key:0,class:s.normalizeClass(["text-left font-medium uppercase tracking-wider",G.value.th,Ve.value.header,n.classTh,"w-12"])},[s.createElementVNode("input",{type:"checkbox",checked:N.value,indeterminate:I.value,onChange:k,class:s.normalizeClass(["h-4 w-4 focus:ring-blue-500 rounded",G.value.checkbox])},null,42,ul)],2)):s.createCommentVNode("",!0),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(mn.value.filter(y=>!y.hidden),y=>(s.openBlock(),s.createElementBlock("th",{key:y.name,class:s.normalizeClass([y.align?`text-${y.align}`:"",T(y)?["cursor-pointer",G.value.thHover]:"",R(y)].concat(n.classTh||["text-left font-medium uppercase tracking-wider",G.value.th,Ve.value.header])),onClick:A=>T(y)?E(y.name,A):void 0},[s.createElementVNode("div",ml,[s.createElementVNode("div",gl,[s.createElementVNode("span",null,s.toDisplayString(y[xt.value]||y.header||y.ua||y.name),1),qs(y)?(s.openBlock(),s.createElementBlock("div",vl,[(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"text-gray-400 cursor-help",onMouseenter:A=>wa(A,y.name),onMouseleave:Sa},O[1]||(O[1]=[s.createElementVNode("circle",{cx:"12",cy:"12",r:"10"},null,-1),s.createElementVNode("path",{d:"M12 16v-4"},null,-1),s.createElementVNode("path",{d:"M12 8h.01"},null,-1)]),40,yl)),(s.openBlock(),s.createBlock(s.Teleport,{to:"body"},[gn.value===y.name?(s.openBlock(),s.createElementBlock("div",{key:0,style:s.normalizeStyle(Ks.value),class:"fixed z-[9999] w-56 p-2 bg-gray-900 text-white text-xs rounded-lg shadow-lg pointer-events-none transition-opacity duration-200"},s.toDisplayString(qs(y)),5)):s.createCommentVNode("",!0)]))])):s.createCommentVNode("",!0)]),T(y)?(s.openBlock(),s.createElementBlock("span",bl,[s.renderSlot(u.$slots,"sort",{asc:S(y.name)},()=>[s.createTextVNode(s.toDisplayString(C(y.name)),1)])])):s.createCommentVNode("",!0)])],10,hl))),128)),f.value?(s.openBlock(),s.createElementBlock("th",{key:1,class:s.normalizeClass(["w-[100px]",n.classTh||["text-left font-medium uppercase tracking-wider",G.value.th,Ve.value.header]])},s.toDisplayString(s.unref(Ea)("table.actions")),3)):s.createCommentVNode("",!0)])],2),b.value.length?(s.openBlock(),s.createElementBlock("tbody",{key:0,class:s.normalizeClass(u.classTbody||G.value.tbody)},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(b.value,(y,A)=>(s.openBlock(),s.createElementBlock(s.Fragment,{key:A},[s.createElementVNode("tr",{class:s.normalizeClass(n.classTr||[G.value.tr,n.clickable?"cursor-pointer":""]),onClick:g=>n.clickable?x(y):void 0},[u.selectable?(s.openBlock(),s.createElementBlock("td",{key:0,class:s.normalizeClass(["whitespace-nowrap",G.value.td,Ve.value.cell,n.classTd,"w-12"])},[s.createElementVNode("input",{type:"checkbox",checked:v(y),onChange:g=>_(y),class:s.normalizeClass(["h-4 w-4 focus:ring-blue-500 rounded",G.value.checkbox])},null,42,kl)],2)):s.createCommentVNode("",!0),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(mn.value.filter(g=>!g.hidden),g=>(s.openBlock(),s.createElementBlock("td",{key:g.name,class:s.normalizeClass(n.classTd?[n.classTd,R(g)]:["whitespace-nowrap",G.value.td,Ve.value.cell,g.align?`text-${g.align}`:"",R(g)])},[(s.openBlock(),s.createBlock(cl,{"class-content":n.classContent,key:y,editable:g.edit,row:y,column:g,value:y[g.name],format:g.format,options:Ae.value[g.name]||[],color:u.color,onUpdate:(P,te,ze)=>Na(P,te,ze,A),"fetch-options":xa},{default:s.withCtx(()=>[g.action&&f.value?s.renderSlot(u.$slots,"action",{key:0,row:y}):s.unref(d).number&&g.format==="number"?s.renderSlot(u.$slots,"number",{key:1,row:y,value:w(g,y)}):s.unref(d).badge&&g.format==="badge"?s.renderSlot(u.$slots,"badge",{key:2,row:y,value:w(g,y)}):s.unref(d).array&&g.format==="array"?s.renderSlot(u.$slots,"array",{key:3,row:y,value:w(g,y)}):g.slotName&&Nt.value[g.name]?(s.openBlock(),s.createBlock(s.resolveDynamicComponent(Nt.value[g.name]),{key:4,data:y,value:w(g,y),row:y,column:g},null,8,["data","value","row","column"])):g.link?(s.openBlock(),s.createElementBlock("a",{key:5,class:s.normalizeClass(u.classLink||"hover:text-blue-900 cursor-pointer text-blue-700 hover:underline"),onClick:P=>h(g.link.replace("{id}",y.id))},[g.slot&&typeof g.slot=="string"?(s.openBlock(),s.createBlock(s.resolveDynamicComponent(s.unref(Ls)(g.slot)),{key:0,row:y,value:y,data:y,column:g},null,8,["row","value","data","column"])):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[s.createTextVNode(s.toDisplayString(w(g,y)),1)],64))],10,xl)):g.slot&&g.format==="slot"&&typeof g.slot=="string"?(s.openBlock(),s.createBlock(s.resolveDynamicComponent(s.unref(Ls)(g.slot)),{key:6,row:y,value:w(g,y),data:y,column:g},null,8,["row","value","data","column"])):(s.openBlock(),s.createBlock(s.resolveDynamicComponent(ka(g.format)),{key:7,value:w(g,y),row:y,column:g,href:g.link},null,8,["value","row","column","href"]))]),_:2},1032,["class-content","editable","row","column","value","format","options","color","onUpdate"]))],2))),128)),f.value?(s.openBlock(),s.createElementBlock("td",Nl,[s.renderSlot(u.$slots,"action",{row:y})])):s.createCommentVNode("",!0)],10,El),s.createElementVNode("tr",null,[s.renderSlot(u.$slots,"under-row",{row:y})])],64))),128))],2)):s.createCommentVNode("",!0),b.value.length===0?(s.openBlock(),s.createElementBlock("tbody",{key:1,class:s.normalizeClass(["text-center py-8",G.value.empty])},[s.createElementVNode("tr",null,[s.createElementVNode("td",{colspan:Hs.value.length},[s.createVNode(Hi)],8,wl)])],2)):s.createCommentVNode("",!0)],6)],2)])),ba.value&&!c.value&&!n.loading&&!p.value?(s.openBlock(),s.createBlock(Ct,{key:3,page:ge.value,limit:Be.value,total:Qe.value,theme:n.theme,size:n.size,"onUpdate:page":Ie},null,8,["page","limit","total","theme","size"])):s.createCommentVNode("",!0)],2))}}),Sl={style:{display:"none"}},Ps=s.defineComponent({name:"Column",__name:"Column",props:{field:{},name:{},header:{},label:{},format:{},hidden:{type:Boolean},sortable:{type:Boolean},width:{},align:{},slot:{},slotName:{},link:{},action:{type:Boolean},getCellData:{type:Function},suffix:{}},setup(e){const t=e,n=s.useSlots(),r=s.inject("registerColumn");return s.onMounted(()=>{if(r){const{field:o,name:i,header:l,label:a,format:c,slotName:p,link:m,action:d,getCellData:f,suffix:h,...b}=t,I={name:o||i||"",ua:l||a||"",format:c||"text",slotName:p||(n.body?"body":void 0),link:m,action:d,getCellData:f,suffix:h,...b};console.log("Registering column:",I);const k=n.body;r(I,k)}}),(o,i)=>(s.openBlock(),s.createElementBlock("div",Sl,[s.renderSlot(o.$slots,"body",{data:{}})]))}}),Cl={class:"mt-4"},_l={class:"text-sm text-gray-600 dark:text-gray-300"},Fs=s.defineComponent({__name:"SelectionInfo",props:{selectedRows:{},totalCount:{}},setup(e){const t=e,n=s.computed(()=>t.selectedRows.length);return(r,o)=>(s.openBlock(),s.createElementBlock("div",Cl,[s.createElementVNode("div",_l," Обрано: "+s.toDisplayString(n.value)+" з "+s.toDisplayString(r.totalCount)+" записів ",1)]))}}),Tl={class:"mt-4"},Ol={class:"border-b border-gray-200 dark:border-gray-700"},Dl={class:"-mb-px flex space-x-8"},Bl=["onClick"],Il={class:"mt-4"},Al={class:"bg-gray-900 rounded-lg overflow-hidden"},$l={class:"flex items-center justify-between px-4 py-2 bg-gray-800 border-b border-gray-700"},Ml={class:"text-sm text-gray-300"},Rl=["onClick"],Ll={class:"p-4 text-sm text-gray-100 overflow-x-auto"},js=s.defineComponent({__name:"CodeTabs",props:{tabs:{},defaultTab:{default:void 0}},setup(e){const t=e,n=s.ref(t.defaultTab||t.tabs[0]?.id||""),r=async o=>{try{await navigator.clipboard.writeText(o),console.log("Код скопійовано!")}catch(i){console.error("Помилка копіювання:",i)}};return(o,i)=>(s.openBlock(),s.createElementBlock("div",Tl,[s.createElementVNode("div",Ol,[s.createElementVNode("nav",Dl,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(o.tabs,l=>(s.openBlock(),s.createElementBlock("button",{key:l.id,onClick:a=>n.value=l.id,class:s.normalizeClass(["py-2 px-1 border-b-2 font-medium text-sm transition-colors",n.value===l.id?"border-blue-500 text-blue-600 dark:text-blue-400":"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300 dark:text-gray-400 dark:hover:text-gray-300"])},s.toDisplayString(l.label),11,Bl))),128))])]),s.createElementVNode("div",Il,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(o.tabs,l=>s.withDirectives((s.openBlock(),s.createElementBlock("div",{key:l.id},[s.createElementVNode("div",Al,[s.createElementVNode("div",$l,[s.createElementVNode("span",Ml,s.toDisplayString(l.label),1),s.createElementVNode("button",{onClick:a=>r(l.content),class:"text-gray-400 hover:text-white transition-colors",title:"Копіювати код"},i[0]||(i[0]=[s.createElementVNode("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[s.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})],-1)]),8,Rl)]),s.createElementVNode("pre",Ll,[s.createElementVNode("code",null,s.toDisplayString(l.content),1)])])])),[[s.vShow,n.value===l.id]])),128))])]))}}),Pl={key:0,class:"vs-dialog-overlay vs-dialog w-full h-full fixed top-0 start-0 z-[80] bg-black bg-opacity-50"},Fl={class:"m-[10px] fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 min-h-0 h-fit max-h-[80vh] overflow-hidden opacity-1 flex flex-col bg-white dark:bg-[#1A1A1A] border dark:border-[#454545] pointer-events-auto shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-xl md:w-5/12 w-9/12"},jl={class:"py-2.5 px-4 flex justify-between items-center border-0 border-b border-solid border-gray-200 dark:border-b-[#454545]"},zl={class:"font-medium text-gray-800 dark:text-[#ffffff]"},Ul={class:"sr-only"},Hl={class:"ui-dialog__content p-4"},ql={class:"p-4"},Kl={class:"pb-5 mb-5 border-b border-gray-200 last:pb-0 last:mb-0 last:border-b-0 dark:border-neutral-700"},Wl={class:"text-sm font-[600] text-gray-500"},Gl={class:"flex items-center gap-[10px] -ml-[10px] my-[10px]"},Jl={class:"h-[14px] w-[14px] border rounded-full flex items-center justify-center"},Yl={key:0,class:"block h-[8px] w-[8px] rounded-full bg-blue-500"},Xl={class:"h-[14px] w-[14px] border rounded-full flex items-center justify-center"},Zl={key:0,class:"block h-[8px] w-[8px] rounded-full bg-blue-500"},Ql={class:"h-[14px] w-[14px] border rounded-full flex items-center justify-center"},Vl={key:0,class:"block h-[8px] w-[8px] rounded-full bg-blue-500"},ea={class:"mt-2 flex row flex-wrap gap-y-[5px] gap-x-[10px]"},ta={class:"flex items-center [&>label]:text-sm [&>label]:text-gray-800 [&>label]:ms-3 !gap-x-[1px] !p-0"},na={class:"flex items-center gap-[4px]"},sa=["id","value"],ra=["for"],oa={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"4","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-check",height:"12",width:"12"},ia={class:"text-[13px] text-gray-500 flex items-center gap-x-1 ml-1 dark:text-neutral-400"},la={class:"pb-5 mb-5 border-b border-gray-200 last:pb-0 last:mb-0 last:border-b-0 dark:border-neutral-700"},aa={class:"text-sm font-[600] text-gray-500"},ca={class:"mt-2 space-y-2"},da={class:"flex items-center"},pa={for:"json",class:"text-sm text-gray-800 ms-3 dark:text-neutral-400"},fa={class:"flex items-center"},ua={for:"csv",class:"text-sm text-gray-800 ms-3 dark:text-neutral-400"},ha={class:"flex items-center"},ma={for:"xlsx",class:"text-sm text-gray-800 ms-3 dark:text-neutral-400"},ga={class:"flex justify-end gap-x-2"},va={class:"flex w-full justify-end p-[20px] gap-[6px] border-t"},ya=["disabled"],zs=s.defineComponent({__name:"Export",props:{table:{},columns:{}},setup(e){const t=s.getCurrentInstance(),n=wt(),r=e,o=s.ref(!1),i=s.ref([]),l=s.ref("json"),a=s.ref(!1),c=s.ref("all"),p=s.computed(()=>r.columns??[]),m=s.useAttrs();function d(){i.value=p.value.map(k=>k.name),l.value="json",o.value=!0}function f(){o.value=!1}function h(){i.value=p.value.map(k=>k.name),c.value="all"}function b(){const k=p.value.filter(E=>!E.hidden).map(E=>E.name);i.value=k.length?k:p.value.map(E=>E.name),c.value="active"}function v(){i.value=[],c.value="none"}async function _(){if(i.value.length===0)return;a.value=!0;const k=new URLSearchParams({table:r.table,format:l.value,columns:i.value.join(",")});try{const E=await fetch(`/api/export?${k.toString()}`,{method:"GET"});if(!E.ok)throw new Error("Export failed");const S=await E.blob(),C=URL.createObjectURL(S),T=document.createElement("a");T.href=C,T.download=`${r.table}.${l.value}`,document.body.appendChild(T),T.click(),T.remove(),URL.revokeObjectURL(C),f()}catch(E){console.error(E);const{$notify:S=console.log}=t?.appContext?.config?.globalProperties||{};S({type:"error",title:"Помилка",message:"Не вдалося єкспортувати файл"})}finally{a.value=!1}}const N=s.ref("uk"),I=k=>{k.detail.key==="locale"&&(N.value=k.detail.newValue)};return s.onUnmounted(()=>{window.removeEventListener("storage",I)}),s.onMounted(()=>{window.addEventListener("storage",I),N.value=localStorage.locale}),(k,E)=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createElementVNode("button",{onClick:d,class:s.normalizeClass([[s.unref(m).class],"py-2 max-h-[34px] px-2.5 md:inline-flex hidden items-center gap-x-1.5 text-xs font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"])},[E[4]||(E[4]=s.createStaticVNode('<svg class="flex-shrink-0 mt-0.5 size-3.5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" height="16" width="16"><path d="m3 16 4 4 4-4"></path><path d="M7 20V4"></path><path d="m21 8-4-4-4 4"></path><path d="M17 4v16"></path></svg>',1)),s.createTextVNode(" "+s.toDisplayString(s.unref(n)("table.export")),1)],2),(s.openBlock(),s.createBlock(s.Teleport,{to:"body"},[o.value?(s.openBlock(),s.createElementBlock("div",Pl,[s.createElementVNode("div",Fl,[s.createElementVNode("div",jl,[s.createElementVNode("h3",zl,s.toDisplayString(s.unref(n)("table.exportTitle")),1),s.createElementVNode("button",{type:"button",onClick:f,class:"size-8 inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:hover:bg-neutral-600 dark:text-neutral-400 dark:focus:bg-neutral-600"},[s.createElementVNode("span",Ul,s.toDisplayString(s.unref(n)("table.close")),1),E[5]||(E[5]=s.createElementVNode("svg",{class:"flex-shrink-0 w-4 h-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[s.createElementVNode("path",{d:"M18 6 6 18"}),s.createElementVNode("path",{d:"m6 6 12 12"})],-1))])]),s.createElementVNode("div",Hl,[s.createElementVNode("div",ql,[s.createElementVNode("div",Kl,[s.createElementVNode("h2",Wl,s.toDisplayString(s.unref(n)("table.chooseColumns")),1),s.createElementVNode("div",Gl,[s.createElementVNode("button",{onClick:h,class:"inline-flex items-center gap-[8px] justify-center px-3 py-2 text-sm font-medium text-gray-800 align-middle bg-white border-gray-200 text-nowrap text-start"},[s.createElementVNode("span",Jl,[c.value==="all"?(s.openBlock(),s.createElementBlock("span",Yl)):s.createCommentVNode("",!0)]),s.createTextVNode(" "+s.toDisplayString(s.unref(n)("table.selectAll")),1)]),s.createElementVNode("button",{onClick:b,class:"inline-flex items-center gap-[8px] justify-center px-3 py-2 text-sm font-medium text-gray-800 align-middle bg-white border-gray-200 text-nowrap text-start"},[s.createElementVNode("span",Xl,[c.value==="active"?(s.openBlock(),s.createElementBlock("span",Zl)):s.createCommentVNode("",!0)]),s.createTextVNode(" "+s.toDisplayString(s.unref(n)("table.selectCurrent")),1)]),s.createElementVNode("button",{onClick:v,class:"inline-flex items-center gap-[8px] justify-center px-3 py-2 text-sm font-medium text-gray-800 align-middle bg-white border-gray-200 text-nowrap text-start"},[s.createElementVNode("span",Ql,[c.value==="none"?(s.openBlock(),s.createElementBlock("span",Vl)):s.createCommentVNode("",!0)]),s.createTextVNode(" "+s.toDisplayString(s.unref(n)("table.none")),1)])]),s.createElementVNode("div",ea,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(p.value,S=>(s.openBlock(),s.createElementBlock("div",{class:"flex items-center",style:{width:"calc(50% - 5px)"},key:S.name},[s.createElementVNode("div",ta,[s.createElementVNode("div",na,[s.withDirectives(s.createElementVNode("input",{type:"checkbox",class:"shrink-0 border border-solid hidden border-gray-200 w-3.5 h-3.5 rounded text-blue-600 focus:ring-offset-0 dark:bg-neutral-800 dark:border-neutral-700 cursor-pointer",id:"radio-"+S.name,value:S.name,"onUpdate:modelValue":E[0]||(E[0]=C=>i.value=C)},null,8,sa),[[s.vModelCheckbox,i.value]]),s.createElementVNode("label",{for:"radio-"+S.name,class:"flex flex-1 checkbox-label items-center gap-x-3 cursor-pointer text-sm text-gray-800 dark:text-neutral-300"},[s.createElementVNode("div",{class:"h-[16px] text-white w-[16px] flex items-center justify-center shrink-0 border rounded bg-white",style:s.normalizeStyle(i.value.includes(S.name)?"background-color: rgb(37,99,235); border-color: transparent;":"")},[s.withDirectives((s.openBlock(),s.createElementBlock("svg",oa,E[6]||(E[6]=[s.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),s.createElementVNode("path",{d:"M5 12l5 5l10 -10"},null,-1)]),512)),[[s.vShow,i.value.includes(S.name)]])],4),s.createElementVNode("span",ia,s.toDisplayString(S[N.value]||S.header||S.ua||S.name),1)],8,ra)])])]))),128))])]),s.createElementVNode("div",la,[s.createElementVNode("h2",aa,s.toDisplayString(s.unref(n)("table.chooseFormat")),1),s.createElementVNode("div",ca,[s.createElementVNode("div",da,[s.withDirectives(s.createElementVNode("input",{type:"radio",name:"hs-pro-duecmfm",class:"text-blue-600 border-gray-300 rounded-full shrink-0 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-500 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-800",id:"json",value:"json","onUpdate:modelValue":E[1]||(E[1]=S=>l.value=S)},null,512),[[s.vModelRadio,l.value]]),s.createElementVNode("label",pa,s.toDisplayString(s.unref(n)("table.format.json")),1)]),s.createElementVNode("div",fa,[s.withDirectives(s.createElementVNode("input",{type:"radio",name:"hs-pro-duecmfm",class:"text-blue-600 border-gray-300 rounded-full shrink-0 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-500 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-800",id:"csv",value:"csv","onUpdate:modelValue":E[2]||(E[2]=S=>l.value=S)},null,512),[[s.vModelRadio,l.value]]),s.createElementVNode("label",ua,s.toDisplayString(s.unref(n)("table.format.csv")),1)]),s.createElementVNode("div",ha,[s.withDirectives(s.createElementVNode("input",{type:"radio",name:"hs-pro-duecmfm",class:"text-blue-600 border-gray-300 rounded-full shrink-0 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-500 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-800",id:"xlsx",value:"xlsx","onUpdate:modelValue":E[3]||(E[3]=S=>l.value=S)},null,512),[[s.vModelRadio,l.value]]),s.createElementVNode("label",ma,s.toDisplayString(s.unref(n)("table.format.xlsx")),1)])])])])]),s.createElementVNode("div",ga,[s.createElementVNode("div",va,[s.createElementVNode("button",{type:"button",onClick:f,class:"inline-flex items-center justify-center px-3 py-2 text-sm font-medium text-gray-800 align-middle bg-white border border-gray-200 rounded-lg shadow-sm text-nowrap text-start hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"},s.toDisplayString(s.unref(n)("table.cancel")),1),s.createElementVNode("button",{type:"button",onClick:_,disabled:i.value.length===0||a.value,class:"inline-flex items-center justify-center px-3 py-2 text-sm font-medium text-white align-middle bg-blue-700 rounded-lg shadow-sm text-nowrap gap-x-2 text-start hover:bg-blue-800 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:ring-1 focus:ring-blue-300 dark:focus:ring-blue-500"},s.toDisplayString(s.unref(n)("table.download")),9,ya)])])])])):s.createCommentVNode("",!0)]))],64))}});kt.install=function(t){t.component("DataTable",kt),t.component("Column",Ps),t.component("Pagination",Ct),t.component("SelectionInfo",Fs),t.component("CodeTabs",js),t.component("ColumnsSettings",bn),t.component("Export",zs)},K.ArrayFormat=wn,K.BadgeFormat=Nn,K.BooleanFormat=Cn,K.CodeTabs=js,K.Column=Ps,K.ColumnsSettings=bn,K.DataTable=kt,K.DateFormat=kn,K.Export=zs,K.GeomFormat=_n,K.NumberFormat=En,K.Pagination=Ct,K.SelectFormat=Sn,K.SelectionInfo=Fs,K.TextFormat=xn,K.default=kt,K.formatComponents=St,Object.defineProperties(K,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
21
|
+
**/const xs=Symbol(process.env.NODE_ENV!=="production"?"vModelRadio":""),Ns=Symbol(process.env.NODE_ENV!=="production"?"vModelCheckbox":""),ws=Symbol(process.env.NODE_ENV!=="production"?"vModelText":""),Ss=Symbol(process.env.NODE_ENV!=="production"?"vModelSelect":""),pn=Symbol(process.env.NODE_ENV!=="production"?"vModelDynamic":""),Cs=Symbol(process.env.NODE_ENV!=="production"?"vOnModifiersGuard":""),_s=Symbol(process.env.NODE_ENV!=="production"?"vOnKeysGuard":""),Ts=Symbol(process.env.NODE_ENV!=="production"?"vShow":""),fn=Symbol(process.env.NODE_ENV!=="production"?"Transition":""),Os=Symbol(process.env.NODE_ENV!=="production"?"TransitionGroup":"");jr({[xs]:"vModelRadio",[Ns]:"vModelCheckbox",[ws]:"vModelText",[Ss]:"vModelSelect",[pn]:"vModelDynamic",[Cs]:"withModifiers",[_s]:"withKeys",[Ts]:"vShow",[fn]:"Transition",[Os]:"TransitionGroup"});let Fe;function vi(e,t=!1){return Fe||(Fe=document.createElement("div")),t?(Fe.innerHTML=`<div foo="${e.replace(/"/g,""")}">`,Fe.children[0].getAttribute("foo")):(Fe.innerHTML=e,Fe.textContent)}const yi={parseMode:"html",isVoidTag:$r,isNativeTag:e=>Br(e)||Ir(e)||Ar(e),isPreTag:e=>e==="pre",isIgnoreNewlineTag:e=>e==="pre"||e==="textarea",decodeEntities:vi,isBuiltInComponent:e=>{if(e==="Transition"||e==="transition")return fn;if(e==="TransitionGroup"||e==="transition-group")return Os},getNamespace(e,t,n){let r=t?t.ns:n;if(t&&r===2)if(t.tag==="annotation-xml"){if(e==="svg")return 1;t.props.some(o=>o.type===6&&o.name==="encoding"&&o.value!=null&&(o.value.content==="text/html"||o.value.content==="application/xhtml+xml"))&&(r=0)}else/^m(?:[ions]|text)$/.test(t.tag)&&e!=="mglyph"&&e!=="malignmark"&&(r=0);else t&&r===1&&(t.tag==="foreignObject"||t.tag==="desc"||t.tag==="title")&&(r=0);if(r===0){if(e==="svg")return 1;if(e==="math")return 2}return r}},bi=e=>{e.type===1&&e.props.forEach((t,n)=>{t.type===6&&t.name==="style"&&t.value&&(e.props[n]={type:7,name:"bind",arg:D("style",!0,t.loc),exp:Ei(t.value.content,t.loc),modifiers:[],loc:t.loc})})},Ei=(e,t)=>{const n=Cr(e);return D(JSON.stringify(n),!1,t,3)};function fe(e,t){return j(e,t,process.env.NODE_ENV!=="production"?ki:void 0)}const ki={53:"v-html is missing expression.",54:"v-html will override element children.",55:"v-text is missing expression.",56:"v-text will override element children.",57:"v-model can only be used on <input>, <textarea> and <select> elements.",58:"v-model argument is not supported on plain elements.",59:"v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.",60:"Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.",61:"v-show is missing expression.",62:"<Transition> expects exactly one child element or component.",63:"Tags with side effect (<script> and <style>) are ignored in client component templates."},xi=(e,t,n)=>{const{exp:r,loc:o}=e;return r||n.onError(fe(53,o)),t.children.length&&(n.onError(fe(54,o)),t.children.length=0),{props:[W(D("innerHTML",!0,o),r||D("",!0))]}},Ni=(e,t,n)=>{const{exp:r,loc:o}=e;return r||n.onError(fe(55,o)),t.children.length&&(n.onError(fe(56,o)),t.children.length=0),{props:[W(D("textContent",!0),r?ae(r,n)>0?r:Y(n.helperString(st),[r],o):D("",!0))]}},wi=(e,t,n)=>{const r=bs(e,t,n);if(!r.props.length||t.tagType===1)return r;e.arg&&n.onError(fe(58,e.arg.loc));function o(){const a=se(t,"bind");a&&Ne(a.arg,"value")&&n.onError(fe(60,a.loc))}const{tag:i}=t,l=n.isCustomElement(i);if(i==="input"||i==="textarea"||i==="select"||l){let a=ws,c=!1;if(i==="input"||l){const p=Je(t,"type");if(p){if(p.type===7)a=pn;else if(p.value)switch(p.value.content){case"radio":a=xs;break;case"checkbox":a=Ns;break;case"file":c=!0,n.onError(fe(59,e.loc));break;default:process.env.NODE_ENV!=="production"&&o();break}}else Vr(t)?a=pn:process.env.NODE_ENV!=="production"&&o()}else i==="select"?a=Ss:process.env.NODE_ENV!=="production"&&o();c||(r.needRuntime=n.helper(a))}else n.onError(fe(57,e.loc));return r.props=r.props.filter(a=>!(a.key.type===4&&a.key.content==="modelValue")),r},Si=he("passive,once,capture"),Ci=he("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),_i=he("left,right"),Ds=he("onkeyup,onkeydown,onkeypress"),Ti=(e,t,n,r)=>{const o=[],i=[],l=[];for(let a=0;a<t.length;a++){const c=t[a].content;c==="native"&&Pe("COMPILER_V_ON_NATIVE",n,r)||Si(c)?l.push(c):_i(c)?ne(e)?Ds(e.content.toLowerCase())?o.push(c):i.push(c):(o.push(c),i.push(c)):Ci(c)?i.push(c):o.push(c)}return{keyModifiers:o,nonKeyModifiers:i,eventOptionModifiers:l}},Bs=(e,t)=>ne(e)&&e.content.toLowerCase()==="onclick"?D(t,!0):e.type!==4?pe(["(",e,`) === "onClick" ? "${t}" : (`,e,")"]):e,Oi=(e,t,n)=>vs(e,t,n,r=>{const{modifiers:o}=e;if(!o.length)return r;let{key:i,value:l}=r.props[0];const{keyModifiers:a,nonKeyModifiers:c,eventOptionModifiers:p}=Ti(i,o,n,e.loc);if(c.includes("right")&&(i=Bs(i,"onContextmenu")),c.includes("middle")&&(i=Bs(i,"onMouseup")),c.length&&(l=Y(n.helper(Cs),[l,JSON.stringify(c)])),a.length&&(!ne(i)||Ds(i.content.toLowerCase()))&&(l=Y(n.helper(_s),[l,JSON.stringify(a)])),p.length){const m=p.map(Bt).join("");i=ne(i)?D(`${i.content}${m}`,!0):pe(["(",i,`) + "${m}"`])}return{props:[W(i,l)]}}),Di=(e,t,n)=>{const{exp:r,loc:o}=e;return r||n.onError(fe(61,o)),{props:[],needRuntime:n.helper(Ts)}},Bi=(e,t)=>{if(e.type===1&&e.tagType===1&&t.isBuiltInComponent(e.tag)===fn)return()=>{if(!e.children.length)return;Is(e)&&t.onError(fe(62,{start:e.children[0].loc.start,end:e.children[e.children.length-1].loc.end,source:""}));const r=e.children[0];if(r.type===1)for(const o of r.props)o.type===7&&o.name==="show"&&e.props.push({type:6,name:"persisted",nameLoc:e.loc,value:void 0,loc:e.loc})}};function Is(e){const t=e.children=e.children.filter(r=>r.type!==3&&!(r.type===2&&!r.content.trim())),n=t[0];return t.length!==1||n.type===11||n.type===9&&n.branches.some(Is)}const Ii=(e,t)=>{e.type===1&&e.tagType===0&&(e.tag==="script"||e.tag==="style")&&(process.env.NODE_ENV!=="production"&&t.onError(fe(63,e.loc)),t.removeNode())};function Ai(e,t){return e==="template"?!0:e in As?As[e].has(t):t in $s?$s[t].has(e):!(e in Ms&&Ms[e].has(t)||t in Rs&&Rs[t].has(e))}const je=new Set(["h1","h2","h3","h4","h5","h6"]),De=new Set([]),As={head:new Set(["base","basefront","bgsound","link","meta","title","noscript","noframes","style","script","template"]),optgroup:new Set(["option"]),select:new Set(["optgroup","option","hr"]),table:new Set(["caption","colgroup","tbody","tfoot","thead"]),tr:new Set(["td","th"]),colgroup:new Set(["col"]),tbody:new Set(["tr"]),thead:new Set(["tr"]),tfoot:new Set(["tr"]),script:De,iframe:De,option:De,textarea:De,style:De,title:De},$s={html:De,body:new Set(["html"]),head:new Set(["html"]),td:new Set(["tr"]),colgroup:new Set(["table"]),caption:new Set(["table"]),tbody:new Set(["table"]),tfoot:new Set(["table"]),col:new Set(["colgroup"]),th:new Set(["tr"]),thead:new Set(["table"]),tr:new Set(["tbody","thead","tfoot"]),dd:new Set(["dl","div"]),dt:new Set(["dl","div"]),figcaption:new Set(["figure"]),summary:new Set(["details"]),area:new Set(["map"])},Ms={p:new Set(["address","article","aside","blockquote","center","details","dialog","dir","div","dl","fieldset","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","main","nav","menu","ol","p","pre","section","table","ul"]),svg:new Set(["b","blockquote","br","code","dd","div","dl","dt","em","embed","h1","h2","h3","h4","h5","h6","hr","i","img","li","menu","meta","ol","p","pre","ruby","s","small","span","strong","sub","sup","table","u","ul","var"])},Rs={a:new Set(["a"]),button:new Set(["button"]),dd:new Set(["dd","dt"]),dt:new Set(["dd","dt"]),form:new Set(["form"]),li:new Set(["li"]),h1:je,h2:je,h3:je,h4:je,h5:je,h6:je},$i=(e,t)=>{if(e.type===1&&e.tagType===0&&t.parent&&t.parent.type===1&&t.parent.tagType===0&&!Ai(t.parent.tag,e.tag)){const n=new SyntaxError(`<${e.tag}> cannot be child of <${t.parent.tag}>, according to HTML specifications. This can cause hydration errors or potentially disrupt future functionality.`);n.loc=e.loc,t.onWarn(n)}},Mi=[bi,...process.env.NODE_ENV!=="production"?[Bi,$i]:[]],Ri={cloak:gi,html:xi,text:Ni,model:wi,on:Oi,show:Di};function Li(e,t={}){return mi(e,be({},yi,t,{nodeTransforms:[Ii,...Mi,...t.nodeTransforms||[]],directiveTransforms:be({},Ri,t.directiveTransforms||{}),transformHoist:null}))}function Pi(e,t){const n=e.trim().startsWith("<")?e:`<span>${e}</span>`,{code:r}=Li(n,{mode:"function"}),o=new Function("Vue",`${r}; return render`)(Js);return s.defineComponent({name:"DynamicFromString",props:t?.props??{},emits:t?.emits??[],setup(i,l){return t?.setup?.()??{}},render:o})}const un={};function Ls(e){return un[e]||(un[e]=Pi(e,{props:{row:Object,value:null,data:Object,column:Object}})),un[e]}const Fi={class:"py-10 flex flex-col justify-center items-center text-center"},ji={class:"max-w-sm mx-auto"},zi={class:"mt-2 font-medium text-gray-800 dark:text-neutral-200"},Ui={class:"mb-5 text-sm text-gray-500 dark:text-neutral-500"},Hi=s.defineComponent({__name:"nodata",props:{title:{default:"No data"},description:{default:"No data here yet. We will notify you when there's an update."}},setup(e){return(t,n)=>(s.openBlock(),s.createElementBlock("div",Fi,[n[0]||(n[0]=s.createStaticVNode('<svg class="w-48 mx-auto mb-4" width="178" height="90" viewBox="0 0 178 90" fill="none" xmlns="http://www.w3.org/2000/svg"><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(#filter19)"><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="filter19" 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></svg>',1)),s.createElementVNode("div",ji,[s.createElementVNode("p",zi,s.toDisplayString(t.title),1),s.createElementVNode("p",Ui,s.toDisplayString(t.description),1)])]))}}),qi=["aria-checked","data-state"],Ki={key:0,"data-state":"checked","data-slot":"checkbox-indicator",class:"flex items-center justify-center transition-none text-white"},Wi={class:"truncate"},Gi=["onKeydown"],Ji={key:0,class:"hs-dropdown-menu hs-dropdown-open:opacity-100 w-44 transition-[opacity,margin] duration z-11 bg-white rounded-xl shadow-lg dark:bg-neutral-950",role:"menu","aria-orientation":"vertical","aria-labelledby":"hs-pro-inthmtdid1"},Yi={class:"py-2 px-4"},Xi={class:"block font-medium text-[13px] text-gray-800 dark:text-neutral-200"},Zi={class:"truncate"},Qi={class:"p-1 border-t border-gray-200 dark:border-neutral-800"},Vi={class:"space-y-0.5 max-h-48 overflow-y-auto [&::-webkit-scrollbar]:w-1 [&::-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"},el=["onClick"],tl={key:0,class:"shrink-0 size-3.5 flex justify-center items-center"},nl={key:1,class:"shrink-0 size-3.5 ms-auto",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},sl={key:1,class:"p-4"},rl={class:"text-base font-semibold text-gray-800 mb-3"},ol={class:"mb-4"},il={class:"block text-sm font-medium text-gray-700 mb-1"},ll=["value"],al={class:"flex justify-end gap-2 border-t pt-3"},cl=s.defineComponent({__name:"EditableCell",props:{row:{},column:{},value:{},format:{},options:{},accent:{},editable:{type:Boolean},color:{},classContent:{},fetchOptions:{type:Function}},emits:["edit","update"],setup(e,{emit:t}){const n=e,r=t,o=s.ref(!1),i=s.ref(null),l=s.ref(null),a=s.ref(n.value),c=s.ref([]),p=s.ref("uk"),m=C=>{C.detail.key==="locale"&&(p.value=C.detail.newValue)};s.watch(()=>n.value,C=>{a.value=C});const d=s.computed(()=>{const C=n.column?.schema?.[n.column?.name];if(C?.type)switch(C.type){case"Text":return"text";case"Number":return"number";case"Switcher":return"boolean";case"Autocomplete":return"select";case"Date":return"date";default:return"text"}const x=(n.format||n.column?.format||"text").toLowerCase();return["text","number","date","select","boolean"].includes(x)?x:"text"}),f=s.computed(()=>(n.column?.schema?.[n.column?.name]?.options||n.options||c.value||[]).map(T=>({value:T.id??T.value,color:T.color,label:T.text??T.label}))),h=s.ref(null);function b(){n.editable&&(o.value||document.dispatchEvent(new CustomEvent("close-all-popovers")),o.value=!o.value,o.value&&s.nextTick(()=>{i.value?.focus?.(),i.value?.showPicker?.(),d.value==="select"&&S()}))}function v(){r("edit",n.row,n.column.name,a.value),r("update",n.row,n.column.name,a.value),o.value=!1}function _(){a.value=n.value,o.value=!1}function N(C){if(!o.value)return;const T=C.target;h.value&&!h.value.contains(T)&&(o.value=!1)}s.onMounted(()=>{document.addEventListener("click",N),window.addEventListener("storage",m),p.value=localStorage.locale,document.addEventListener("close-all-popovers",()=>{o.value=!1})}),s.onBeforeUnmount(()=>{document.removeEventListener("click",N),window.removeEventListener("storage",m),document.removeEventListener("close-all-popovers",()=>{o.value=!1})});function I(){n.editable&&(a.value=!a.value,r("update",n.row,n.column.name,a.value))}function k(C){return n.color?n.color.startsWith("#")?C.replace("{c}",`[${n.color}]`):C.replace("{c}",`${n.color}-500`):C.replace("{c}","cyan-500")}const E=s.computed(()=>({border:k("border-{c}"),ring:k("focus:ring-{c}"),text:k("text-{c}"),hover:k("hover:text-{c}"),bg:k("bg-{c} hover:bg-{c}/90")}));async function S(){if(d.value==="select"&&!(n.options&&n.options.length>0||n.column?.schema?.[n.column?.name]?.options?.length>0)&&c.value.length===0&&n.fetchOptions)try{c.value=await n.fetchOptions(n.column.name)}catch(C){console.error(`Не удалось загрузить options для ${n.column.name}`,C)}}return(C,T)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(C.classContent?C.classContent:"relative group w-full"),ref_key:"cellRef",ref:h},[d.value==="boolean"&&C.editable?(s.openBlock(),s.createElementBlock("button",{key:0,type:"button",role:"checkbox","aria-checked":a.value?"true":"false","data-state":a.value?"checked":"unchecked",class:s.normalizeClass(["peer size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] h-4 w-4 flex items-center justify-center",a.value?E.value.border:"",E.value.ring,a.value?E.value.bg:""]),onClick:s.withModifiers(I,["stop"])},[a.value?(s.openBlock(),s.createElementBlock("span",Ki,T[4]||(T[4]=[s.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-check size-3.5"},[s.createElementVNode("path",{d:"M20 6 9 17l-5-5"})],-1)]))):s.createCommentVNode("",!0)],10,qi)):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[s.createElementVNode("div",{class:"flex items-center justify-between cursor-pointer",onClick:s.withModifiers(b,["stop"])},[s.createElementVNode("span",Wi,[s.renderSlot(C.$slots,"default")]),C.editable?(s.openBlock(),s.createElementBlock("svg",{key:0,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",class:s.normalizeClass(["w-4 h-4 opacity-0 group-hover:opacity-100 transition-opacity",E.value.text])},T[5]||(T[5]=[s.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L7.5 21H3v-4.5L16.732 3.732z"},null,-1)]),2)):s.createCommentVNode("",!0)]),o.value?(s.openBlock(),s.createElementBlock("div",{key:0,ref_key:"popoverRef",ref:l,class:s.normalizeClass(["absolute top-0 left-[50px] ml-2 z-50 bg-white border rounded-lg shadow-lg",d.value==="select"?"":"w-[450px]"]),onKeydown:s.withKeys(s.withModifiers(_,["stop","prevent"]),["esc"])},[d.value==="select"?(s.openBlock(),s.createElementBlock("div",Ji,[s.createElementVNode("div",Yi,[s.createElementVNode("span",Xi,[s.createElementVNode("span",Zi," Редагувати "+s.toDisplayString(C.column[p.value]||C.column.header||C.column.ua||C.column.name),1)])]),s.createElementVNode("div",Qi,[s.createElementVNode("div",Vi,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(f.value,x=>(s.openBlock(),s.createElementBlock("label",{key:x.value.toString(),onClick:s.withModifiers(()=>{a.value=x.value,v()},["prevent"]),class:"py-1.5 px-3 group flex items-center gap-x-3 rounded-lg cursor-pointer text-[13px] text-gray-800 hover:bg-gray-100 dark:text-neutral-200 dark:hover:bg-neutral-800 dark:focus:bg-neutral-800"},[T[8]||(T[8]=s.createElementVNode("input",{type:"radio",class:"hidden",id:"hs-pro-chthuts1op",name:"hs-pro-chthuts1"},null,-1)),x.color?(s.openBlock(),s.createElementBlock("span",tl,T[6]||(T[6]=[s.createElementVNode("span",{class:"shrink-0 size-2 block mx-auto bg-emerald-500 rounded-full"},null,-1)]))):s.createCommentVNode("",!0),s.createTextVNode(" "+s.toDisplayString(x.label)+" ",1),a.value===x.value?(s.openBlock(),s.createElementBlock("svg",nl,T[7]||(T[7]=[s.createElementVNode("path",{d:"M20 6 9 17l-5-5"},null,-1)]))):s.createCommentVNode("",!0)],8,el))),128))])])])):(s.openBlock(),s.createElementBlock("div",sl,[s.createElementVNode("h3",rl," Редагувати "+s.toDisplayString(C.column[p.value]||C.column.header||C.column.ua||C.column.name),1),s.createElementVNode("div",ol,[s.createElementVNode("label",il,s.toDisplayString(C.column[p.value]||C.column.header||C.column.ua||C.column.name),1),d.value==="text"?s.withDirectives((s.openBlock(),s.createElementBlock("input",{key:0,ref_key:"inputRef",ref:i,"onUpdate:modelValue":T[0]||(T[0]=x=>a.value=x),type:"text",class:s.normalizeClass(["w-full rounded-md border px-3 py-2 text-sm outline-none border-gray-300",E.value.ring,E.value.border]),onKeyup:s.withKeys(v,["enter"])},null,34)),[[s.vModelText,a.value]]):d.value==="number"?s.withDirectives((s.openBlock(),s.createElementBlock("input",{key:1,ref_key:"inputRef",ref:i,"onUpdate:modelValue":T[1]||(T[1]=x=>a.value=x),type:"number",class:s.normalizeClass(["w-full rounded-md border px-3 py-2 text-sm outline-none border-gray-300",E.value.ring,E.value.border]),onKeyup:s.withKeys(v,["enter"])},null,34)),[[s.vModelText,a.value,void 0,{number:!0}]]):d.value==="date"?s.withDirectives((s.openBlock(),s.createElementBlock("input",{key:2,ref_key:"inputRef",ref:i,"onUpdate:modelValue":T[2]||(T[2]=x=>a.value=x),type:"date",class:s.normalizeClass(["w-full rounded-md border px-3 py-2 text-sm outline-none border-gray-300",E.value.ring,E.value.border]),onChange:v},null,34)),[[s.vModelText,a.value]]):d.value==="select"?s.withDirectives((s.openBlock(),s.createElementBlock("select",{key:3,ref_key:"inputRef",ref:i,"onUpdate:modelValue":T[3]||(T[3]=x=>a.value=x),class:s.normalizeClass(["w-full rounded-md border px-3 py-2 text-sm outline-none bg-white border-gray-300",E.value.ring,E.value.border])},[T[9]||(T[9]=s.createElementVNode("option",{disabled:"",value:""},"-- виберіть --",-1)),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(f.value,x=>(s.openBlock(),s.createElementBlock("option",{key:x.value.toString(),value:x.value},s.toDisplayString(x.label),9,ll))),128))],2)),[[s.vModelSelect,a.value]]):s.createCommentVNode("",!0)]),s.createElementVNode("div",al,[s.createElementVNode("button",{type:"button",class:"px-4 py-1.5 text-sm rounded-md border border-gray-300 text-gray-700 bg-white hover:bg-gray-50",onClick:_}," Скасувати "),s.createElementVNode("button",{type:"button",class:s.normalizeClass(["px-4 py-1.5 text-sm rounded-md text-white",E.value.bg]),onClick:v}," Зберегти ",2)])]))],42,Gi)):s.createCommentVNode("",!0)],64))],2))}}),dl={key:0,class:"text-center py-8"},pl={class:"inline-flex items-center space-x-2"},fl={key:2,class:"overflow-x-auto"},ul=["checked","indeterminate"],hl=["onClick"],ml={class:"flex items-center justify-between"},gl={class:"flex items-center gap-1.5"},vl={key:0,class:"relative group"},yl=["onMouseenter"],bl={key:0,class:"ml-1 text-xs"},El=["onClick"],kl=["checked","onChange"],xl=["onClick"],Nl={key:1,class:"text-center"},wl=["colspan"],kt=s.defineComponent({name:"DataTable",__name:"DataTable",props:{rows:{default:()=>[]},columns:{default:()=>[]},api:{},router:{},tableStyle:{default:""},size:{default:"medium"},theme:{default:"light"},loading:{type:Boolean,default:!1},classWrapper:{default:""},classTable:{default:"min-w-full divide-y divide-gray-200 dark:divide-gray-700"},classTbody:{default:""},classTr:{default:""},classTd:{default:""},classTh:{default:""},classThead:{default:""},classContent:{default:""},classLink:{default:""},selectable:{type:Boolean,default:!1},selectedRows:{default:()=>[]},limit:{default:10},page:{default:1},total:{default:0},showPagination:{type:Boolean,default:!0},sortable:{type:Boolean,default:!1},defaultSort:{default:()=>[]},clickable:{type:Boolean,default:!1},getCellData:{type:Function,default:void 0},form:{},color:{default:"blue"}},emits:["update:page","update:selectedRows","row-click","sort","cell-update"],setup(e,{emit:t}){const n=e,r=t,o=s.ref(n.selectedRows||[]),i=s.ref(n.defaultSort.map(u=>({field:u.name,direction:u.asc?"asc":"desc"}))),l=s.ref([]),a=s.ref([]),c=s.ref(!1),p=s.ref(null),m=s.ref(n.router),d=s.useSlots(),f=s.computed(()=>d.action);function h(u){if(m.value){m.value.push(u);return}location.href=u}const b=s.computed(()=>{if(n.api)return l.value;if(n.sortable&&i.value.length>0){const u=[...n.rows];return u.sort((O,y)=>{for(const A of i.value){if(!A.direction)return 0;const g=O[A.field],P=y[A.field];if(g==null)return 1;if(P==null)return-1;let te=0;typeof g=="string"&&typeof P=="string"?te=g.localeCompare(P):g<P?te=-1:g>P?te=1:te=0;const ze=A.direction==="desc"?-te:te;if(ze!==0)return ze}return 0}),u}return n.rows});s.watch(()=>n.selectedRows,u=>{o.value=u||[]});const v=u=>o.value.some(O=>O===u),_=u=>{const O=o.value.findIndex(y=>y===u);O>-1?o.value.splice(O,1):o.value.push(u),r("update:selectedRows",[...o.value])},N=s.computed(()=>b.value.length>0&&o.value.length===b.value.length),I=s.computed(()=>o.value.length>0&&o.value.length<b.value.length),k=()=>{N.value?o.value=[]:o.value=[...b.value],r("update:selectedRows",[...o.value])},E=(u,O)=>{if(!n.sortable)return;if(O?.ctrlKey||O?.metaKey){const g=i.value.findIndex(P=>P.field===u);if(g>=0){const P=i.value[g];P.direction==="asc"?P.direction="desc":P.direction==="desc"&&i.value.splice(g,1)}else i.value.unshift({field:u,direction:"asc"})}else{const g=i.value.find(P=>P.field===u);g?g.direction==="asc"?g.direction="desc":g.direction==="desc"&&(i.value=[]):i.value=[{field:u,direction:"asc"}]}const A=i.value.filter(g=>g.direction).map(g=>({name:g.field,asc:g.direction==="asc"}));r("sort",A),n.api&&ue()},S=u=>i.value.find(y=>y.field===u)?.direction==="asc",C=u=>{const O=i.value.find(y=>y.field===u);if(!O)return"";switch(O.direction){case"asc":return"↑";case"desc":return"↓";default:return"↕️"}},T=u=>n.sortable&&u.sortable!==!1,x=u=>{n.clickable&&r("row-click",u)},w=(u,O)=>{const y=O[u.name];if(n.getCellData||u.getCellData){const A=u.getCellData||n.getCellData;if(A){const g={name:u.name,row:O,value:y};return A(g)}}return["_data","_text"].map(A=>{const g=`${u.name}${A}`;return O[g]?O[g]:null}).find(A=>A)||(u.link?y||"-":y)},R=u=>u.width?u.width==="w-full"?"w-full":typeof u.width=="string"?`w-[${u.width}px] max-w-[${u.width}px] min-w-[${u.width}px]`:typeof u.width=="number"?`w-[${u.width}px] max-w-[${u.width}px] min-w-[${u.width}px]`:"":"max-w-[350px]",L=s.ref(n.page),B=s.ref(n.limit),F=s.ref(n.total),U=s.ref(1),H=s.ref(10),ce=s.ref(0),ge=s.computed(()=>n.api?U.value:L.value),Be=s.computed(()=>n.api?H.value:B.value),Qe=s.computed(()=>n.api?ce.value:F.value),G=s.computed(()=>{const{theme:u}=n;return u==="dark"?{container:"dark",loading:"text-gray-400",error:"text-red-400",thead:"bg-gray-800",th:"text-gray-300",thHover:"hover:bg-gray-700",tbody:"bg-gray-900 divide-gray-700",tr:"hover:bg-gray-800",td:"text-gray-300",empty:"text-gray-400",checkbox:"border-gray-600 bg-gray-700 text-blue-400"}:u==="light"?{container:"",loading:"text-gray-500",error:"text-red-500",thead:"bg-gray-50",th:"text-gray-500",thHover:"hover:bg-gray-100",tbody:"bg-white divide-gray-200",tr:"hover:bg-gray-50",td:"text-gray-900",empty:"text-gray-500",checkbox:"border-gray-300 bg-white text-blue-600"}:{container:"",loading:"text-gray-500 dark:text-gray-400",error:"text-red-500 dark:text-red-400",thead:"bg-gray-50 dark:bg-gray-800",th:"text-gray-500 dark:text-gray-300",thHover:"hover:bg-gray-100 dark:hover:bg-gray-700",tbody:"bg-white dark:bg-gray-900 divide-gray-200 dark:divide-gray-700",tr:"hover:bg-gray-50 dark:hover:bg-gray-800",td:"text-gray-900 dark:text-gray-300",empty:"text-gray-500 dark:text-gray-400",checkbox:"border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 text-blue-600 dark:text-blue-400"}});s.watch(()=>n.page,u=>{L.value=u}),s.watch(()=>n.limit,u=>{B.value=u}),s.watch(()=>n.total,u=>{F.value=u});async function ue(){if(n.api){c.value=!0,p.value=null;try{const u=new URL(n.api,window.location.origin);if(u.searchParams.set("page",ge.value.toString()),u.searchParams.set("limit",Be.value.toString()),i.value.length>0){const A=i.value.filter(g=>g.direction).map(g=>`${g.field}:${g.direction}`).join(",");A&&u.searchParams.set("sort",A)}const O=await fetch(u.toString());if(!O.ok)throw new Error(`HTTP error! status: ${O.status}`);const y=await O.json();y.rows&&Array.isArray(y.rows)&&(l.value=y.rows),y.columns&&Array.isArray(y.columns)&&(a.value=y.columns),y.total!==void 0&&(n.api?ce.value=y.total:F.value=y.total)}catch(u){p.value=u instanceof Error?u.message:"Failed to fetch data",console.error("Error fetching data:",u)}finally{c.value=!1}}}const Ie=u=>{n.api?U.value=u:(L.value=u,r("update:page",u)),n.api&&ue()},ba=s.computed(()=>n.showPagination&&Qe.value>0),Ve=s.computed(()=>({small:{header:"px-3 py-2 text-xs",cell:"px-3 py-2 text-xs"},medium:{header:"px-6 py-3 text-xs",cell:"px-6 py-4 text-sm"},large:{header:"px-8 py-4 text-sm",cell:"px-8 py-6 text-base"}})[n.size]),Ea=wt(),xt=s.ref("uk"),Us=u=>{u.detail.key==="locale"&&(xt.value=u.detail.newValue)};s.onUnmounted(()=>{window.removeEventListener("resize",Us)}),s.onMounted(()=>{window.addEventListener("storage",Us),xt.value=localStorage.locale,n.api&&(n.page&&(U.value=n.page),n.limit&&(H.value=n.limit),n.total&&(ce.value=n.total),ue())}),s.watch(()=>n.api,u=>{u&&(U.value=n.page||1,H.value=n.limit||10,ce.value=n.total||0,ue())});const Hs=s.computed(()=>n.api?a.value:n.columns),hn=s.ref([]),Nt=s.ref({});s.provide("registerColumn",(u,O)=>{hn.value.push(u),O&&u.slotName&&(Nt.value[u.name]=O)});const mn=s.computed(()=>{const u=Hs.value||[],O=[],y=d.default?.();if(y){const A=y.filter(g=>g.type?.name==="Column"||g.type==="Column"||g.type&&typeof g.type=="object"&&g.type.name==="Column").map(g=>{const P=g.props||g.componentProps||{},te=P.field||P.name||"",ze=P.header||P.label||"",Ws=g.children&&g.children.body,vn={name:te,ua:ze,format:P.format||"text",slotName:Ws?"body":void 0,...P};return Ws&&vn.name&&(Nt.value[vn.name]=g.children.body),vn});O.push(...A)}if(hn.value.length>0&&O.push(...hn.value),O.length>0){const A=[],g=new Set(O.map(P=>P.name));return u.forEach(P=>{g.has(P.name)||A.push(P)}),A.push(...O),console.log("Combined columns:",{default:u.length,custom:O.length,combined:A.length}),A}return u.length>0?u:[]}),ka=(u="text")=>St[u.toLowerCase()]||St.text,Ae=s.ref({});async function xa(u){const{data:O,api:y}=mn.value.find(A=>A.name===u);if(Ae.value[u])return Ae.value[u];if(O||y){const A=y||`/api/suggest/${O}?json=1`,P=await(await fetch(A)).json();P.data&&Array.isArray(P.data)&&(Ae.value[u]=P.data.map(te=>({value:te.id??te.value,label:te.text??te.label})))}return Ae.value[u]}function Na(u,O,y,A){const g=A;g!==-1&&(n.rows[g]={...n.rows[g],[O]:y}),r("cell-update",u,O,y)}function qs(u){const y=`info:${xt.value}`;return u[y]?u[y]:u.info?u.info:null}const gn=s.ref(null),Ks=s.ref({top:"0px",left:"0px"});function wa(u,O){const y=u.currentTarget.getBoundingClientRect();gn.value=O,Ks.value={top:`${y.bottom+4}px`,left:`${Math.min(y.left,window.innerWidth-230)}px`}}function Sa(){gn.value=null}return s.watch(()=>n.form,async u=>{u&&(Ae.value={})}),s.onMounted(()=>{n.form&&(Ae.value={})}),(u,O)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["w-full",G.value.container])},[c.value||n.loading?(s.openBlock(),s.createElementBlock("div",dl,[s.createElementVNode("div",pl,[O[0]||(O[0]=s.createElementVNode("div",{class:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-600"},null,-1)),s.createElementVNode("span",{class:s.normalizeClass(G.value.loading)},"Loading...",2)])])):p.value?(s.openBlock(),s.createElementBlock("div",{key:1,class:s.normalizeClass(["text-center py-8",G.value.error])},s.toDisplayString(p.value),3)):n.loading?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock("div",fl,[s.createElementVNode("div",{class:s.normalizeClass(u.classWrapper?u.classWrapper:"relative w-full overflow-auto")},[s.createElementVNode("table",{class:s.normalizeClass(u.classTable),style:s.normalizeStyle(u.tableStyle)},[s.createElementVNode("thead",{class:s.normalizeClass(u.classThead||G.value.thead)},[s.createElementVNode("tr",null,[u.selectable?(s.openBlock(),s.createElementBlock("th",{key:0,class:s.normalizeClass(["text-left font-medium uppercase tracking-wider",G.value.th,Ve.value.header,n.classTh,"w-12"])},[s.createElementVNode("input",{type:"checkbox",checked:N.value,indeterminate:I.value,onChange:k,class:s.normalizeClass(["h-4 w-4 focus:ring-blue-500 rounded",G.value.checkbox])},null,42,ul)],2)):s.createCommentVNode("",!0),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(mn.value.filter(y=>!y.hidden),y=>(s.openBlock(),s.createElementBlock("th",{key:y.name,class:s.normalizeClass([y.align?`text-${y.align}`:"",T(y)?["cursor-pointer",G.value.thHover]:"",R(y)].concat(n.classTh||["text-left font-medium uppercase tracking-wider",G.value.th,Ve.value.header])),onClick:A=>T(y)?E(y.name,A):void 0},[s.createElementVNode("div",ml,[s.createElementVNode("div",gl,[s.createElementVNode("span",null,s.toDisplayString(y[xt.value]||y.header||y.ua||y.name),1),qs(y)?(s.openBlock(),s.createElementBlock("div",vl,[(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"text-gray-400 cursor-help",onMouseenter:A=>wa(A,y.name),onMouseleave:Sa},O[1]||(O[1]=[s.createElementVNode("circle",{cx:"12",cy:"12",r:"10"},null,-1),s.createElementVNode("path",{d:"M12 16v-4"},null,-1),s.createElementVNode("path",{d:"M12 8h.01"},null,-1)]),40,yl)),(s.openBlock(),s.createBlock(s.Teleport,{to:"body"},[gn.value===y.name?(s.openBlock(),s.createElementBlock("div",{key:0,style:s.normalizeStyle(Ks.value),class:"fixed z-[9999] w-56 p-2 bg-gray-900 text-white text-xs rounded-lg shadow-lg pointer-events-none transition-opacity duration-200"},s.toDisplayString(qs(y)),5)):s.createCommentVNode("",!0)]))])):s.createCommentVNode("",!0)]),T(y)?(s.openBlock(),s.createElementBlock("span",bl,[s.renderSlot(u.$slots,"sort",{asc:S(y.name)},()=>[s.createTextVNode(s.toDisplayString(C(y.name)),1)])])):s.createCommentVNode("",!0)])],10,hl))),128)),f.value?(s.openBlock(),s.createElementBlock("th",{key:1,class:s.normalizeClass(["w-[100px]",n.classTh||["text-left font-medium uppercase tracking-wider",G.value.th,Ve.value.header]])},s.toDisplayString(s.unref(Ea)("table.actions")),3)):s.createCommentVNode("",!0)])],2),b.value.length?(s.openBlock(),s.createElementBlock("tbody",{key:0,class:s.normalizeClass(u.classTbody||G.value.tbody)},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(b.value,(y,A)=>(s.openBlock(),s.createElementBlock(s.Fragment,{key:A},[s.createElementVNode("tr",{class:s.normalizeClass(n.classTr||[G.value.tr,n.clickable?"cursor-pointer":""]),onClick:g=>n.clickable?x(y):void 0},[u.selectable?(s.openBlock(),s.createElementBlock("td",{key:0,class:s.normalizeClass(["whitespace-nowrap",G.value.td,Ve.value.cell,n.classTd,"w-12"])},[s.createElementVNode("input",{type:"checkbox",checked:v(y),onChange:g=>_(y),class:s.normalizeClass(["h-4 w-4 focus:ring-blue-500 rounded",G.value.checkbox])},null,42,kl)],2)):s.createCommentVNode("",!0),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(mn.value.filter(g=>!g.hidden),g=>(s.openBlock(),s.createElementBlock("td",{key:g.name,class:s.normalizeClass(n.classTd?[n.classTd,R(g)]:["whitespace-nowrap",G.value.td,Ve.value.cell,g.align?`text-${g.align}`:"",R(g)])},[(s.openBlock(),s.createBlock(cl,{"class-content":n.classContent,key:y,editable:g.edit,row:y,column:g,value:y[g.name],format:g.format,options:Ae.value[g.name]||[],color:u.color,onUpdate:(P,te,ze)=>Na(P,te,ze,A),"fetch-options":xa},{default:s.withCtx(()=>[g.action&&f.value?s.renderSlot(u.$slots,"action",{key:0,row:y}):s.unref(d).number&&g.format==="number"?s.renderSlot(u.$slots,"number",{key:1,row:y,value:w(g,y)}):s.unref(d).badge&&g.format==="badge"?s.renderSlot(u.$slots,"badge",{key:2,row:y,value:w(g,y)}):s.unref(d).array&&g.format==="array"?s.renderSlot(u.$slots,"array",{key:3,row:y,value:w(g,y)}):g.slotName&&Nt.value[g.name]?(s.openBlock(),s.createBlock(s.resolveDynamicComponent(Nt.value[g.name]),{key:4,data:y,value:w(g,y),row:y,column:g},null,8,["data","value","row","column"])):g.link?(s.openBlock(),s.createElementBlock("a",{key:5,class:s.normalizeClass(u.classLink||"hover:text-blue-900 cursor-pointer text-blue-700 hover:underline"),onClick:P=>h(g.link.replace("{id}",y.id))},[g.slot&&typeof g.slot=="string"?(s.openBlock(),s.createBlock(s.resolveDynamicComponent(s.unref(Ls)(g.slot)),{key:0,row:y,value:y,data:y,column:g},null,8,["row","value","data","column"])):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[s.createTextVNode(s.toDisplayString(w(g,y)),1)],64))],10,xl)):g.slot&&g.format==="slot"&&typeof g.slot=="string"?(s.openBlock(),s.createBlock(s.resolveDynamicComponent(s.unref(Ls)(g.slot)),{key:6,row:y,value:w(g,y),data:y,column:g},null,8,["row","value","data","column"])):(s.openBlock(),s.createBlock(s.resolveDynamicComponent(ka(g.format)),{key:7,value:w(g,y),row:y,column:g,href:g.link},null,8,["value","row","column","href"]))]),_:2},1032,["class-content","editable","row","column","value","format","options","color","onUpdate"]))],2))),128)),f.value?(s.openBlock(),s.createElementBlock("td",Nl,[s.renderSlot(u.$slots,"action",{row:y})])):s.createCommentVNode("",!0)],10,El),s.createElementVNode("tr",null,[s.renderSlot(u.$slots,"under-row",{row:y})])],64))),128))],2)):s.createCommentVNode("",!0),b.value.length===0?(s.openBlock(),s.createElementBlock("tbody",{key:1,class:s.normalizeClass(["text-center py-8",G.value.empty])},[s.createElementVNode("tr",null,[s.createElementVNode("td",{colspan:Hs.value.length},[s.createVNode(Hi)],8,wl)])],2)):s.createCommentVNode("",!0)],6)],2)])),ba.value&&!c.value&&!n.loading&&!p.value?(s.openBlock(),s.createBlock(Ct,{key:3,page:ge.value,limit:Be.value,total:Qe.value,theme:n.theme,size:n.size,"onUpdate:page":Ie},null,8,["page","limit","total","theme","size"])):s.createCommentVNode("",!0)],2))}}),Sl={style:{display:"none"}},Ps=s.defineComponent({name:"Column",__name:"Column",props:{field:{},name:{},header:{},label:{},format:{},hidden:{type:Boolean},sortable:{type:Boolean},width:{},align:{},slot:{},slotName:{},link:{},action:{type:Boolean},getCellData:{type:Function},suffix:{}},setup(e){const t=e,n=s.useSlots(),r=s.inject("registerColumn");return s.onMounted(()=>{if(r){const{field:o,name:i,header:l,label:a,format:c,slotName:p,link:m,action:d,getCellData:f,suffix:h,...b}=t,I={name:o||i||"",ua:l||a||"",format:c||"text",slotName:p||(n.body?"body":void 0),link:m,action:d,getCellData:f,suffix:h,...b};console.log("Registering column:",I);const k=n.body;r(I,k)}}),(o,i)=>(s.openBlock(),s.createElementBlock("div",Sl,[s.renderSlot(o.$slots,"body",{data:{}})]))}}),Cl={class:"mt-4"},_l={class:"text-sm text-gray-600 dark:text-gray-300"},Fs=s.defineComponent({__name:"SelectionInfo",props:{selectedRows:{},totalCount:{}},setup(e){const t=e,n=s.computed(()=>t.selectedRows.length);return(r,o)=>(s.openBlock(),s.createElementBlock("div",Cl,[s.createElementVNode("div",_l," Обрано: "+s.toDisplayString(n.value)+" з "+s.toDisplayString(r.totalCount)+" записів ",1)]))}}),Tl={class:"mt-4"},Ol={class:"border-b border-gray-200 dark:border-gray-700"},Dl={class:"-mb-px flex space-x-8"},Bl=["onClick"],Il={class:"mt-4"},Al={class:"bg-gray-900 rounded-lg overflow-hidden"},$l={class:"flex items-center justify-between px-4 py-2 bg-gray-800 border-b border-gray-700"},Ml={class:"text-sm text-gray-300"},Rl=["onClick"],Ll={class:"p-4 text-sm text-gray-100 overflow-x-auto"},js=s.defineComponent({__name:"CodeTabs",props:{tabs:{},defaultTab:{default:void 0}},setup(e){const t=e,n=s.ref(t.defaultTab||t.tabs[0]?.id||""),r=async o=>{try{await navigator.clipboard.writeText(o),console.log("Код скопійовано!")}catch(i){console.error("Помилка копіювання:",i)}};return(o,i)=>(s.openBlock(),s.createElementBlock("div",Tl,[s.createElementVNode("div",Ol,[s.createElementVNode("nav",Dl,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(o.tabs,l=>(s.openBlock(),s.createElementBlock("button",{key:l.id,onClick:a=>n.value=l.id,class:s.normalizeClass(["py-2 px-1 border-b-2 font-medium text-sm transition-colors",n.value===l.id?"border-blue-500 text-blue-600 dark:text-blue-400":"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300 dark:text-gray-400 dark:hover:text-gray-300"])},s.toDisplayString(l.label),11,Bl))),128))])]),s.createElementVNode("div",Il,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(o.tabs,l=>s.withDirectives((s.openBlock(),s.createElementBlock("div",{key:l.id},[s.createElementVNode("div",Al,[s.createElementVNode("div",$l,[s.createElementVNode("span",Ml,s.toDisplayString(l.label),1),s.createElementVNode("button",{onClick:a=>r(l.content),class:"text-gray-400 hover:text-white transition-colors",title:"Копіювати код"},i[0]||(i[0]=[s.createElementVNode("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[s.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})],-1)]),8,Rl)]),s.createElementVNode("pre",Ll,[s.createElementVNode("code",null,s.toDisplayString(l.content),1)])])])),[[s.vShow,n.value===l.id]])),128))])]))}}),Pl={key:0,class:"vs-dialog-overlay vs-dialog w-full h-full fixed top-0 start-0 z-[80] bg-black bg-opacity-50"},Fl={class:"m-[10px] fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 min-h-0 h-fit max-h-[80vh] overflow-hidden opacity-1 flex flex-col bg-white dark:bg-[#1A1A1A] border dark:border-[#454545] pointer-events-auto shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-xl md:w-5/12 w-9/12"},jl={class:"py-2.5 px-4 flex justify-between items-center border-0 border-b border-solid border-gray-200 dark:border-b-[#454545]"},zl={class:"font-medium text-gray-800 dark:text-[#ffffff]"},Ul={class:"sr-only"},Hl={class:"ui-dialog__content p-4 overflow-y-auto flex-1"},ql={class:"p-4"},Kl={class:"pb-5 mb-5 border-b border-gray-200 last:pb-0 last:mb-0 last:border-b-0 dark:border-neutral-700"},Wl={class:"text-sm font-[600] text-gray-500"},Gl={class:"flex items-center gap-[10px] -ml-[10px] my-[10px]"},Jl={class:"h-[14px] w-[14px] border rounded-full flex items-center justify-center"},Yl={key:0,class:"block h-[8px] w-[8px] rounded-full bg-blue-500"},Xl={class:"h-[14px] w-[14px] border rounded-full flex items-center justify-center"},Zl={key:0,class:"block h-[8px] w-[8px] rounded-full bg-blue-500"},Ql={class:"h-[14px] w-[14px] border rounded-full flex items-center justify-center"},Vl={key:0,class:"block h-[8px] w-[8px] rounded-full bg-blue-500"},ea={class:"mt-2 flex row flex-wrap gap-y-[5px] gap-x-[10px]"},ta={class:"flex items-center [&>label]:text-sm [&>label]:text-gray-800 [&>label]:ms-3 !gap-x-[1px] !p-0"},na={class:"flex items-center gap-[4px]"},sa=["id","value"],ra=["for"],oa={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"4","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-check",height:"12",width:"12"},ia={class:"text-[13px] text-gray-500 flex items-center gap-x-1 ml-1 dark:text-neutral-400"},la={class:"pb-5 mb-5 border-b border-gray-200 last:pb-0 last:mb-0 last:border-b-0 dark:border-neutral-700"},aa={class:"text-sm font-[600] text-gray-500"},ca={class:"mt-2 space-y-2"},da={class:"flex items-center"},pa={for:"json",class:"text-sm text-gray-800 ms-3 dark:text-neutral-400"},fa={class:"flex items-center"},ua={for:"csv",class:"text-sm text-gray-800 ms-3 dark:text-neutral-400"},ha={class:"flex items-center"},ma={for:"xlsx",class:"text-sm text-gray-800 ms-3 dark:text-neutral-400"},ga={class:"flex justify-end gap-x-2"},va={class:"flex w-full justify-end p-[20px] gap-[6px] border-t"},ya=["disabled"],zs=s.defineComponent({__name:"Export",props:{table:{},columns:{}},setup(e){const t=s.getCurrentInstance(),n=wt(),r=e,o=s.ref(!1),i=s.ref([]),l=s.ref("json"),a=s.ref(!1),c=s.ref("all"),p=s.computed(()=>r.columns??[]),m=s.useAttrs();function d(){i.value=p.value.map(k=>k.name),l.value="json",o.value=!0}function f(){o.value=!1}function h(){i.value=p.value.map(k=>k.name),c.value="all"}function b(){const k=p.value.filter(E=>!E.hidden).map(E=>E.name);i.value=k.length?k:p.value.map(E=>E.name),c.value="active"}function v(){i.value=[],c.value="none"}async function _(){if(i.value.length===0)return;a.value=!0;const k=new URLSearchParams({table:r.table,format:l.value,columns:i.value.join(",")});try{const E=await fetch(`/api/export?${k.toString()}`,{method:"GET"});if(!E.ok)throw new Error("Export failed");const S=await E.blob(),C=URL.createObjectURL(S),T=document.createElement("a");T.href=C,T.download=`${r.table}.${l.value}`,document.body.appendChild(T),T.click(),T.remove(),URL.revokeObjectURL(C),f()}catch(E){console.error(E);const{$notify:S=console.log}=t?.appContext?.config?.globalProperties||{};S({type:"error",title:"Помилка",message:"Не вдалося єкспортувати файл"})}finally{a.value=!1}}const N=s.ref("uk"),I=k=>{k.detail.key==="locale"&&(N.value=k.detail.newValue)};return s.onUnmounted(()=>{window.removeEventListener("storage",I)}),s.onMounted(()=>{window.addEventListener("storage",I),N.value=localStorage.locale}),(k,E)=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createElementVNode("button",{onClick:d,class:s.normalizeClass([[s.unref(m).class],"py-2 max-h-[34px] px-2.5 md:inline-flex hidden items-center gap-x-1.5 text-xs font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"])},[E[4]||(E[4]=s.createStaticVNode('<svg class="flex-shrink-0 mt-0.5 size-3.5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" height="16" width="16"><path d="m3 16 4 4 4-4"></path><path d="M7 20V4"></path><path d="m21 8-4-4-4 4"></path><path d="M17 4v16"></path></svg>',1)),s.createTextVNode(" "+s.toDisplayString(s.unref(n)("table.export")),1)],2),(s.openBlock(),s.createBlock(s.Teleport,{to:"body"},[o.value?(s.openBlock(),s.createElementBlock("div",Pl,[s.createElementVNode("div",Fl,[s.createElementVNode("div",jl,[s.createElementVNode("h3",zl,s.toDisplayString(s.unref(n)("table.exportTitle")),1),s.createElementVNode("button",{type:"button",onClick:f,class:"size-8 inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:hover:bg-neutral-600 dark:text-neutral-400 dark:focus:bg-neutral-600"},[s.createElementVNode("span",Ul,s.toDisplayString(s.unref(n)("table.close")),1),E[5]||(E[5]=s.createElementVNode("svg",{class:"flex-shrink-0 w-4 h-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[s.createElementVNode("path",{d:"M18 6 6 18"}),s.createElementVNode("path",{d:"m6 6 12 12"})],-1))])]),s.createElementVNode("div",Hl,[s.createElementVNode("div",ql,[s.createElementVNode("div",Kl,[s.createElementVNode("h2",Wl,s.toDisplayString(s.unref(n)("table.chooseColumns")),1),s.createElementVNode("div",Gl,[s.createElementVNode("button",{onClick:h,class:"inline-flex items-center gap-[8px] justify-center px-3 py-2 text-sm font-medium text-gray-800 align-middle bg-white border-gray-200 text-nowrap text-start"},[s.createElementVNode("span",Jl,[c.value==="all"?(s.openBlock(),s.createElementBlock("span",Yl)):s.createCommentVNode("",!0)]),s.createTextVNode(" "+s.toDisplayString(s.unref(n)("table.selectAll")),1)]),s.createElementVNode("button",{onClick:b,class:"inline-flex items-center gap-[8px] justify-center px-3 py-2 text-sm font-medium text-gray-800 align-middle bg-white border-gray-200 text-nowrap text-start"},[s.createElementVNode("span",Xl,[c.value==="active"?(s.openBlock(),s.createElementBlock("span",Zl)):s.createCommentVNode("",!0)]),s.createTextVNode(" "+s.toDisplayString(s.unref(n)("table.selectCurrent")),1)]),s.createElementVNode("button",{onClick:v,class:"inline-flex items-center gap-[8px] justify-center px-3 py-2 text-sm font-medium text-gray-800 align-middle bg-white border-gray-200 text-nowrap text-start"},[s.createElementVNode("span",Ql,[c.value==="none"?(s.openBlock(),s.createElementBlock("span",Vl)):s.createCommentVNode("",!0)]),s.createTextVNode(" "+s.toDisplayString(s.unref(n)("table.none")),1)])]),s.createElementVNode("div",ea,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(p.value,S=>(s.openBlock(),s.createElementBlock("div",{class:"flex items-center",style:{width:"calc(50% - 5px)"},key:S.name},[s.createElementVNode("div",ta,[s.createElementVNode("div",na,[s.withDirectives(s.createElementVNode("input",{type:"checkbox",class:"shrink-0 border border-solid hidden border-gray-200 w-3.5 h-3.5 rounded text-blue-600 focus:ring-offset-0 dark:bg-neutral-800 dark:border-neutral-700 cursor-pointer",id:"radio-"+S.name,value:S.name,"onUpdate:modelValue":E[0]||(E[0]=C=>i.value=C)},null,8,sa),[[s.vModelCheckbox,i.value]]),s.createElementVNode("label",{for:"radio-"+S.name,class:"flex flex-1 checkbox-label items-center gap-x-3 cursor-pointer text-sm text-gray-800 dark:text-neutral-300"},[s.createElementVNode("div",{class:"h-[16px] text-white w-[16px] flex items-center justify-center shrink-0 border rounded bg-white",style:s.normalizeStyle(i.value.includes(S.name)?"background-color: rgb(37,99,235); border-color: transparent;":"")},[s.withDirectives((s.openBlock(),s.createElementBlock("svg",oa,E[6]||(E[6]=[s.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),s.createElementVNode("path",{d:"M5 12l5 5l10 -10"},null,-1)]),512)),[[s.vShow,i.value.includes(S.name)]])],4),s.createElementVNode("span",ia,s.toDisplayString(S[N.value]||S.header||S.ua||S.name),1)],8,ra)])])]))),128))])]),s.createElementVNode("div",la,[s.createElementVNode("h2",aa,s.toDisplayString(s.unref(n)("table.chooseFormat")),1),s.createElementVNode("div",ca,[s.createElementVNode("div",da,[s.withDirectives(s.createElementVNode("input",{type:"radio",name:"hs-pro-duecmfm",class:"text-blue-600 border-gray-300 rounded-full shrink-0 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-500 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-800",id:"json",value:"json","onUpdate:modelValue":E[1]||(E[1]=S=>l.value=S)},null,512),[[s.vModelRadio,l.value]]),s.createElementVNode("label",pa,s.toDisplayString(s.unref(n)("table.format.json")),1)]),s.createElementVNode("div",fa,[s.withDirectives(s.createElementVNode("input",{type:"radio",name:"hs-pro-duecmfm",class:"text-blue-600 border-gray-300 rounded-full shrink-0 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-500 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-800",id:"csv",value:"csv","onUpdate:modelValue":E[2]||(E[2]=S=>l.value=S)},null,512),[[s.vModelRadio,l.value]]),s.createElementVNode("label",ua,s.toDisplayString(s.unref(n)("table.format.csv")),1)]),s.createElementVNode("div",ha,[s.withDirectives(s.createElementVNode("input",{type:"radio",name:"hs-pro-duecmfm",class:"text-blue-600 border-gray-300 rounded-full shrink-0 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-500 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-800",id:"xlsx",value:"xlsx","onUpdate:modelValue":E[3]||(E[3]=S=>l.value=S)},null,512),[[s.vModelRadio,l.value]]),s.createElementVNode("label",ma,s.toDisplayString(s.unref(n)("table.format.xlsx")),1)])])])])]),s.createElementVNode("div",ga,[s.createElementVNode("div",va,[s.createElementVNode("button",{type:"button",onClick:f,class:"inline-flex items-center justify-center px-3 py-2 text-sm font-medium text-gray-800 align-middle bg-white border border-gray-200 rounded-lg shadow-sm text-nowrap text-start hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"},s.toDisplayString(s.unref(n)("table.cancel")),1),s.createElementVNode("button",{type:"button",onClick:_,disabled:i.value.length===0||a.value,class:"inline-flex items-center justify-center px-3 py-2 text-sm font-medium text-white align-middle bg-blue-700 rounded-lg shadow-sm text-nowrap gap-x-2 text-start hover:bg-blue-800 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:ring-1 focus:ring-blue-300 dark:focus:ring-blue-500"},s.toDisplayString(s.unref(n)("table.download")),9,ya)])])])])):s.createCommentVNode("",!0)]))],64))}});kt.install=function(t){t.component("DataTable",kt),t.component("Column",Ps),t.component("Pagination",Ct),t.component("SelectionInfo",Fs),t.component("CodeTabs",js),t.component("ColumnsSettings",bn),t.component("Export",zs)},K.ArrayFormat=wn,K.BadgeFormat=Nn,K.BooleanFormat=Cn,K.CodeTabs=js,K.Column=Ps,K.ColumnsSettings=bn,K.DataTable=kt,K.DateFormat=kn,K.Export=zs,K.GeomFormat=_n,K.NumberFormat=En,K.Pagination=Ct,K.SelectFormat=Sn,K.SelectionInfo=Fs,K.TextFormat=xn,K.default=kt,K.formatComponents=St,Object.defineProperties(K,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|