UNPKG

@opengis/admin

Version:

This project Softpro Admin

1,258 lines 74 kB
import { _ as A, h as Ke, i as Je, j as Ge, f as q, I as Qe, s as R, k as J, V as Xe, l as Ye, m as Ze, n as et, A as G, o as tt, p as st, b as nt, q as lt, r as at, a as rt, t as ot, v as it, u as Ee } from "./import-file-BgK4s__E.js"; import { createElementBlock as u, openBlock as r, createTextVNode as L, createElementVNode as a, toDisplayString as T, createCommentVNode as k, normalizeClass as w, resolveComponent as p, Fragment as $, createVNode as x, withCtx as P, createBlock as y, renderList as V, withModifiers as ut, Transition as Q, withDirectives as X, renderSlot as dt, vShow as Y, Teleport as ct, getCurrentInstance as Ue, ref as H, resolveDynamicComponent as K, defineComponent as ht, withKeys as pt, normalizeStyle as W } from "vue"; const bt = { data() { return { currentSort: "" }; }, props: { data: { type: Object, default: () => null }, activeColumn: { type: String } }, mounted() { this.$emit("update-ref", this.$refs.column); }, computed: { label() { var e, t; return ((e = this.data) == null ? void 0 : e.ua) || ((t = this.data) == null ? void 0 : t.label) || this.data.title || "null"; }, selectedSortParam() { var e, t; return (t = (e = this.$route) == null ? void 0 : e.query) == null ? void 0 : t.sort; }, getVisibleIcon() { return this.data.format !== "image" && this.data.format !== "verify"; } }, watch: { activeColumn(e) { e !== this.data.name && (this.currentSort = ""); } }, methods: { changeCurrentSort(e) { switch (e) { case "": return "asc"; case "asc": return "desc"; case "desc": return ""; default: return ""; } }, handleClickSortBtn(e) { this.$emit("change-active", this.data.name), this.currentSort = this.changeCurrentSort(e); const t = this.$route.query, { sort: n, ...o } = t, s = this.currentSort ? `${this.data.name}-${this.currentSort}` : ""; this.$router.replace({ query: { ...o, ...s && { sort: s } } }); }, isValueEqualToSelected(e) { return `${this.data.name}-${e}` === this.selectedSortParam; } } }, ft = { scope: "col", class: "text-start", ref: "column" }, gt = { class: "w-[24px]" }, mt = { key: 1, class: "flex items-center px-1 py-3 font-medium text-gray-800 text-start gap-x-1 dark:text-neutral-200" }; function xt(e, t, n, o, s, l) { return r(), u("th", ft, [ l.getVisibleIcon ? (r(), u("button", { key: 0, type: "button", class: "flex items-center px-1 py-2 font-medium text-gray-800 text-start gap-x-1 dark:text-neutral-200", onClick: t[0] || (t[0] = (h) => l.handleClickSortBtn(s.currentSort)) }, [ L(T(l.label) + " ", 1), a("span", gt, [ s.currentSort ? (r(), u("svg", { key: 0, class: w(["shrink-0 size-3.5", { "rotate-180": s.currentSort === "asc" }]), 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" }, t[1] || (t[1] = [ a("path", { d: "m5 12 7-7 7 7" }, null, -1), a("path", { d: "M12 19V5" }, null, -1) ]), 2)) : k("", !0) ]) ])) : (r(), u("p", mt, T(l.label), 1)) ], 512); } const yt = /* @__PURE__ */ A(bt, [["render", xt]]), vt = {}, kt = { 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: "icon icon-tabler icons-tabler-outline icon-tabler-link" }; function _t(e, t) { return r(), u("svg", kt, t[0] || (t[0] = [ a("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }, null, -1), a("path", { d: "M9 15l6 -6" }, null, -1), a("path", { d: "M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464" }, null, -1), a("path", { d: "M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463" }, null, -1) ])); } const Ct = /* @__PURE__ */ A(vt, [["render", _t]]), wt = { components: { IconMore: Ge, IconDelete: Je, IconEdit: Ke, IconLink: Ct }, emits: ["updateTable"], props: { item: Object, table: String, isForm: null, actions: Array, default: () => [] }, data() { return { formVisible: !1, isDeleteConfirm: !1, formValue: {}, top: 0, left: 0 }; }, computed: { getCustomActions() { return this.actions.filter((e) => typeof e == "object"); } }, methods: { openConfirm() { this.isDeleteConfirm = !0, document.querySelector("body").click(); }, async getData() { var e; try { const { data: t } = await q.get( `/api/table/${this.table}/${(e = this.item) == null ? void 0 : e.id}` ); this.formValue = t; } catch (t) { console.error(t); } }, doSomethingOnCancel() { this.formVisible = !1; }, async deleteElement() { var e, t; try { const { data: n } = await q.get( `/api/table/${this.table}/${(e = this.item) == null ? void 0 : e.id}` ); await q.delete(`/api/table/${n == null ? void 0 : n.token}`), await this.$notify({ title: "Успішно!", message: "Об`єкт успішно видалeно", type: "success" }), await this.$emit("update-table"); } catch (n) { this.$notify({ title: "Помилка!", message: (t = n == null ? void 0 : n.response) == null ? void 0 : t.data, type: "error" }); } finally { this.isDeleteConfirm = !1; } }, async customButtonAction(e) { var t, n, o; document.querySelector("body").click(), e != null && e.form ? (await this.$v3plugin.$form({ form: e == null ? void 0 : e.form, id: (t = this.item) == null ? void 0 : t.id, api: e == null ? void 0 : e.api, title: e == null ? void 0 : e.title }), await this.$emit("update-table")) : e != null && e.api ? (await this.$v3plugin.$api({ confirm: e == null ? void 0 : e.confirm, api: e == null ? void 0 : e.api, method: e == null ? void 0 : e.method, id: (n = this.item) == null ? void 0 : n.id, isId: (e == null ? void 0 : e.isId) || !1 }), await this.$emit("update-table")) : e != null && e.href && this.$router.push((e == null ? void 0 : e.href) + ((o = this.item) == null ? void 0 : o.id)); } } }, $t = { class: "inline-flex" }, St = { class: "inline-flex items-center justify-center bg-white border rounded-lg shadow-sm size-7 gap-x-2 border-stone-200 text-stone-800 hover:bg-stone-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-50" }, Tt = { class: "flex flex-col items-start" }, At = ["onClick"], It = { class: "text-gray-800" }, Dt = { key: 1, class: "h-[1px] w-[80%] bg-gray-200 ml-auto mr-auto" }, Pt = { class: "flex justify-end p-[16px] pr-0 gap-x-3" }; function Vt(e, t, n, o, s, l) { const h = p("IconMore"), g = p("IconEdit"), b = p("router-link"), f = p("IconLink"), d = p("IconDelete"), v = p("VsPopover"), m = p("VsConfirm"); return r(), u($, null, [ a("div", $t, [ x(v, { trigger: "click", placement: "bottom-left" }, { reference: P(() => [ a("button", St, [ x(h, { height: "16", width: "16" }) ]) ]), default: P(() => { var c, _, C, I, D; return [ a("div", Tt, [ (c = n.actions) != null && c.includes("edit") && n.isForm ? (r(), y(b, { key: 0, to: `/edit?table=${(C = (_ = e.$route) == null ? void 0 : _.params) == null ? void 0 : C.catchAll}&id=${(I = n.item) == null ? void 0 : I.id}`, class: "w-full flex items-center gap-x-3 py-1.5 px-2 rounded-lg text-[13px] text-stone-800 hover:bg-stone-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-100" }, { default: P(() => [ x(g, { color: "#000" }), t[4] || (t[4] = L(" Редагувати ")) ]), _: 1, __: [4] }, 8, ["to"])) : k("", !0), (r(!0), u($, null, V(l.getCustomActions, (S, F) => (r(), u("button", { key: F, onClick: (z) => l.customButtonAction(S), class: "w-full flex items-center gap-x-3 py-1.5 px-2 rounded-lg text-[13px] text-stone-800 hover:bg-stone-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-100" }, [ S != null && S.href ? (r(), y(f, { key: 0, class: "size-3.5" })) : k("", !0), a("span", It, T(S == null ? void 0 : S.label), 1) ], 8, At))), 128)), n.isForm ? (r(), u("div", Dt)) : k("", !0), (D = n.actions) != null && D.includes("del") ? (r(), u("button", { key: 2, onClick: t[0] || (t[0] = ut((...S) => l.openConfirm && l.openConfirm(...S), ["stop"])), class: "w-full flex items-center gap-x-3 py-1.5 px-2 rounded-lg text-[13px] text-stone-800 hover:bg-stone-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-100" }, [ x(d), t[5] || (t[5] = a("span", { class: "text-gray-800" }, "Видалити", -1)) ])) : k("", !0) ]) ]; }), _: 1 }) ]), x(m, { visible: s.isDeleteConfirm, "onUpdate:visible": t[3] || (t[3] = (c) => s.isDeleteConfirm = c), size: "small", title: "Ви впевнені?" }, { default: P(() => [ t[6] || (t[6] = a("p", { class: "mt-1 text-sm text-gray-600 dark:text-neutral-400" }, " Ви впевнені, що хочете видалити цей об'єкт? ", -1)), a("div", Pt, [ a("button", { type: "button", class: "inline-flex items-center px-3 py-2 text-xs font-medium duration-300 border rounded-lg shadow-sm hover:bg-gray-100 gap-x-2 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50", onClick: t[1] || (t[1] = (c) => s.isDeleteConfirm = !1) }, " Скасувати "), a("button", { type: "button", class: "inline-flex items-center px-3 py-2 text-xs font-medium text-white duration-300 bg-red-500 rounded-lg gap-x-2 hover:bg-red-700 disabled:opacity-50 disabled:pointer-events-none", onClick: t[2] || (t[2] = (...c) => l.deleteElement && l.deleteElement(...c)) }, " Так, я впевнена(ий) ") ]) ]), _: 1, __: [6] }, 8, ["visible"]) ], 64); } const Ft = /* @__PURE__ */ A(wt, [["render", Vt]]), jt = {}, Lt = { 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" }; function zt(e, t, n, o, s, l) { return r(), u("svg", Lt, t[0] || (t[0] = [ a("path", { d: "m3 16 4 4 4-4" }, null, -1), a("path", { d: "M7 20V4" }, null, -1), a("path", { d: "m21 8-4-4-4 4" }, null, -1), a("path", { d: "M17 4v16" }, null, -1) ])); } const qt = /* @__PURE__ */ A(jt, [["render", zt]]), Mt = {}, Bt = { 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: "icon icon-tabler icons-tabler-outline icon-tabler-rosette-discount-check" }; function Nt(e, t, n, o, s, l) { return r(), u("svg", Bt, t[0] || (t[0] = [ a("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }, null, -1), a("path", { d: "M5 7.2a2.2 2.2 0 0 1 2.2 -2.2h1a2.2 2.2 0 0 0 1.55 -.64l.7 -.7a2.2 2.2 0 0 1 3.12 0l.7 .7c.412 .41 .97 .64 1.55 .64h1a2.2 2.2 0 0 1 2.2 2.2v1c0 .58 .23 1.138 .64 1.55l.7 .7a2.2 2.2 0 0 1 0 3.12l-.7 .7a2.2 2.2 0 0 0 -.64 1.55v1a2.2 2.2 0 0 1 -2.2 2.2h-1a2.2 2.2 0 0 0 -1.55 .64l-.7 .7a2.2 2.2 0 0 1 -3.12 0l-.7 -.7a2.2 2.2 0 0 0 -1.55 -.64h-1a2.2 2.2 0 0 1 -2.2 -2.2v-1a2.2 2.2 0 0 0 -.64 -1.55l-.7 -.7a2.2 2.2 0 0 1 0 -3.12l.7 -.7a2.2 2.2 0 0 0 .64 -1.55v-1" }, null, -1), a("path", { d: "M9 12l2 2l4 -4" }, null, -1) ])); } const Ot = /* @__PURE__ */ A(Mt, [["render", Nt]]), Et = { components: { IconExport: qt, IconChevronDown: Qe, IconSuccess: Ot }, props: { table: String, columns: Array, page: [String, Number], filterCustom: String, filterState: String, filters: String }, data() { return { isOpen: !1, tableFormats: ["json", "csv", "xlsx"], format: "", cols: [], activeAction: "", isSuccessTemplate: !1, actions: [ { name: "choceAll", function: this.choceAll, label: "Вибрати усі" }, { name: "choceVisible", function: this.choceVisible, label: "Вибрати поточні" }, { name: "clearAll", function: this.clearAll, label: "Жодного" } ] }; }, watch: { isOpen(e) { e || (this.format = "", this.cols = [], this.activeAction = "", this.isSuccessTemplate = !1); } }, computed: { color() { return R.value.buttonColor || "blue"; } }, methods: { async exportTable() { var e; if (!((e = this.cols) != null && e.length)) { this.$notify({ type: "error", title: "Помилка", message: "Оберіть колонки для експорту!" }); return; } if (!this.format) { this.$notify({ type: "error", title: "Помилка", message: "Оберіть формат!" }); return; } try { const t = await q.get("/api/export", { params: { table: this.table, format: this.format, cols: this.cols.join(","), page: this.page, filter: this.filters || null, state: this.filterState || null, custom: this.filterCustom || null }, responseType: "blob" }), n = await t.data.text(), o = n != null && n.includes(";") ? null : JSON == null ? void 0 : JSON.parse(n), s = new Blob([t.data], { type: "application/octet-stream" }), l = window.URL.createObjectURL(s), h = document.createElement("a"); if (h.href = l, h.setAttribute( "download", `${this.table.split(".")[0]}.${this.format}` ), document.body.appendChild(h), typeof o == "string") { this.exportTable(); return; } h.click(), document.body.removeChild(h), window.URL.revokeObjectURL(l), this.$notify({ type: "success", title: "Експорт", message: "Файл успішно експортовано!" }), this.isSuccessTemplate = !0; } catch (t) { console.log(t), this.$notify({ type: "error", title: "Помилка", message: "Не вдалося експортувати файл." }); } }, selectFormat(e) { this.format = e; }, choceAll() { var e; this.cols = (e = this.columns) == null ? void 0 : e.map((t) => t == null ? void 0 : t.name), this.activeAction = "choceAll"; }, clearAll() { this.cols = [], this.activeAction = "clearAll"; }, choceVisible() { var e, t; this.cols = (t = (e = this.columns) == null ? void 0 : e.filter((n) => (n == null ? void 0 : n.hidden) !== !0)) == null ? void 0 : t.map((n) => n == null ? void 0 : n.name), this.activeAction = "choceVisible"; } } }, Ut = { key: 0, class: "flex flex-col items-center" }, Rt = { key: 1, class: "p-4" }, Wt = { class: "pb-5 mb-5 border-b border-gray-200 last:pb-0 last:mb-0 last:border-b-0 dark:border-neutral-700" }, Ht = { class: "flex items-center gap-[10px] -ml-[10px] my-[10px]" }, Kt = ["onClick"], Jt = { key: 0, class: "block h-[8px] w-[8px] rounded-full bg-blue-500" }, Gt = { class: "mt-2 flex row flex-wrap gap-y-[5px] gap-x-[10px]" }, Qt = { class: "pb-5 mb-5 border-b border-gray-200 last:pb-0 last:mb-0 last:border-b-0 dark:border-neutral-700" }, Xt = { class: "mt-2 space-y-2" }, Yt = ["id", "onChange"], Zt = ["for"], es = { key: 0, class: "flex w-full justify-end p-[20px] gap-[6px] border-t" }, ts = { key: 1, class: "flex w-full justify-end p-[20px] gap-[6px] border-t" }; function ss(e, t, n, o, s, l) { const h = p("IconExport"), g = p("IconSuccess"), b = p("VsCheckbox"), f = p("VsDialog"); return r(), u($, null, [ a("button", { onClick: t[0] || (t[0] = (d) => s.isOpen = !0), 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" }, [ x(h, { height: "16", width: "16" }), t[7] || (t[7] = L(" Експорт ")) ]), x(f, { visible: s.isOpen, "onUpdate:visible": t[6] || (t[6] = (d) => s.isOpen = d), title: "Експорт таблиці", size: "small", closeClickBack: !0 }, { footer: P(() => [ s.isSuccessTemplate ? (r(), u("div", es, [ a("button", { type: "button", 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", onClick: t[2] || (t[2] = (d) => s.isOpen = !1) }, " Закрити "), a("button", { type: "button", class: "inline-flex items-center justify-center px-3 py-2 text-sm font-medium text-white align-middle bg-blue-600 border border-blue-600 rounded-lg shadow-sm text-nowrap gap-x-2 text-start hover:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:ring-1 focus:ring-blue-300 dark:focus:ring-blue-500", onClick: t[3] || (t[3] = (d) => s.isSuccessTemplate = !1) }, " Вигрузити ще ") ])) : (r(), u("div", ts, [ a("button", { type: "button", 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", onClick: t[4] || (t[4] = (d) => s.isOpen = !1) }, " Скасувати "), a("button", { type: "button", class: w(`inline-flex items-center justify-center px-3 py-2 text-sm font-medium text-white align-middle bg-${l.color}-700 rounded-lg shadow-sm text-nowrap gap-x-2 text-start hover:bg-${l.color}-800 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:ring-1 focus:ring-${l.color}-300 dark:focus:ring-${l.color}-500`), onClick: t[5] || (t[5] = (...d) => l.exportTable && l.exportTable(...d)) }, " Завантажити таблицю ", 2) ])) ]), default: P(() => [ s.isSuccessTemplate ? (r(), u("div", Ut, [ x(g, { height: "100", width: "100", class: "text-green-200 mb-[20px]" }), t[8] || (t[8] = a("h2", null, "Звіт сформовано і збережено", -1)) ])) : (r(), u("div", Rt, [ a("div", Wt, [ t[9] || (t[9] = a("h2", { class: "text-sm font-[600] text-gray-500" }, " Виберіть стовпці таблиці для експорту: ", -1)), a("div", Ht, [ (r(!0), u($, null, V(s.actions, (d) => (r(), u("button", { key: d == null ? void 0 : d.name, onClick: d == null ? void 0 : d.function, 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" }, [ a("span", { class: w(["h-[14px] w-[14px] border rounded-full flex items-center justify-center", { "border-blue-500": (d == null ? void 0 : d.name) === s.activeAction }]) }, [ (d == null ? void 0 : d.name) === s.activeAction ? (r(), u("span", Jt)) : k("", !0) ], 2), L(" " + T(d == null ? void 0 : d.label), 1) ], 8, Kt))), 128)) ]), a("div", Gt, [ (r(!0), u($, null, V(n.columns, (d, v) => (r(), u("div", { class: "flex items-center", key: v, style: { width: "calc((100% - 10px) / 2)" } }, [ x(b, { class: "[&>label]:text-sm [&>label]:text-gray-800 [&>label]:ms-3 !gap-x-[1px] !p-0", modelValue: s.cols, "onUpdate:modelValue": t[1] || (t[1] = (m) => s.cols = m), value: d == null ? void 0 : d.name, label: d == null ? void 0 : d.ua }, null, 8, ["modelValue", "value", "label"]) ]))), 128)) ]) ]), a("div", Qt, [ t[10] || (t[10] = a("h2", { class: "text-sm font-[600] text-gray-500" }, " Виберіть формат таблиці: ", -1)), a("div", Xt, [ (r(!0), u($, null, V(s.tableFormats, (d, v) => (r(), u("div", { class: "flex items-center", key: v }, [ a("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: d, onChange: (m) => l.selectFormat(d) }, null, 40, Yt), a("label", { for: d, class: "text-sm text-gray-800 ms-3 dark:text-neutral-400" }, " Формат " + T(d), 9, Zt) ]))), 128)) ]) ]) ])) ]), _: 1 }, 8, ["visible"]) ], 64); } const ns = /* @__PURE__ */ A(Et, [["render", ss]]), ls = {}, as = { 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-minus" }; function rs(e, t, n, o, s, l) { return r(), u("svg", as, t[0] || (t[0] = [ a("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }, null, -1), a("path", { d: "M5 12l14 0" }, null, -1) ])); } const os = /* @__PURE__ */ A(ls, [["render", rs]]), is = { components: { IconPlus: J, IconMinus: os }, props: { title: String, defaultValue: { type: Boolean, default: () => !1 } }, data() { return { expanded: this.defaultValue }; } }, us = { class: "hs-accordion" }, ds = { class: "py-0.5 flex items-center gap-x-0.5 w-full" }, cs = { class: "text-sm font-medium" }, hs = { class: "relative inline-block w-full duration-150 cursor-pointer before:block before:absolute b" }; function ps(e, t, n, o, s, l) { const h = p("IconPlus"), g = p("IconMinus"); return r(), u("div", null, [ a("div", null, [ a("div", us, [ a("div", ds, [ a("div", { onClick: t[0] || (t[0] = (b) => s.expanded = !s.expanded), class: "rounded-md cursor-pointer grow" }, [ a("span", cs, T(n.title), 1) ]), a("button", { class: "flex items-center justify-center rounded-md size-6 hover:bg-gray-100", onClick: t[1] || (t[1] = (b) => s.expanded = !s.expanded) }, [ s.expanded ? (r(), y(g, { key: 1, width: "14" })) : (r(), y(h, { key: 0 })) ]) ]), x(Q, { name: "fade" }, { default: P(() => [ X(a("div", hs, [ dt(e.$slots, "default", {}, void 0, !0) ], 512), [ [Y, s.expanded] ]) ]), _: 3 }) ]) ]) ]); } const bs = /* @__PURE__ */ A(is, [["render", ps], ["__scopeId", "data-v-c6318482"]]), fs = { components: { AdminComponentIs: G, AdminTree: bs, VsNoData: et, VsWidgetComments: Ze, VsWidgetMap: Ye, VsWidgetFileList: Xe }, props: { table: String, columns: Array, row: Object } }, gs = { class: "pl-2 hs-accordion w-[360px] shrink-0 overflow-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar:horizontal]:h-[8px] [&::-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", style: { height: "calc(100vh - 229px)" } }, ms = { style: { height: "calc(100vh - 360px)" }, class: "pl-2" }, xs = { class: "flow-root mt-[10px]" }, ys = { class: "divide-y divide-gray-100 text-[12px]" }, vs = { class: "grid grid-cols-1 gap-1 py-3 even:bg-gray-50 sm:grid-cols-3 sm:gap-4" }, ks = { class: "font-medium text-gray-900" }, _s = { class: "text-gray-700 sm:col-span-2" }; function Cs(e, t, n, o, s, l) { var f, d, v, m; const h = p("AdminComponentIs"), g = p("VsWidgetFileList"), b = p("VsNoData"); return r(), u("div", gs, [ t[0] || (t[0] = a("div", { class: "pl-[10px] py-[9px]" }, [ a("h2", { class: "text-sm font-medium text-center" }, "Інформація про об'єкт") ], -1)), a("div", ms, [ (d = (f = e.$route) == null ? void 0 : f.query) != null && d.card ? (r(), u($, { key: 0 }, [ a("div", xs, [ a("dl", ys, [ (r(!0), u($, null, V(n.columns, (c) => (r(), u("div", vs, [ a("dt", ks, T((c == null ? void 0 : c.ua) || (c == null ? void 0 : c.title)), 1), a("dd", _s, [ x(h, { row: n.row, column: c, table: n.table }, null, 8, ["row", "column", "table"]) ]) ]))), 256)) ]) ]), (r(), y(g, { key: (v = n.row) == null ? void 0 : v.id, id: (m = n.row) == null ? void 0 : m.id, class: "mt-10" }, null, 8, ["id"])) ], 64)) : (r(), y(b, { key: 1, text: "Оберіть один з об'єктів в таблиці для відображення інформаціі про нього" })) ]) ]); } const ws = /* @__PURE__ */ A(fs, [["render", Cs]]), $s = { emits: ["filterChange"], props: { scheme: { type: Object }, onFilters: { type: Number }, table: { type: String } }, components: { IconFilter: tt }, data() { return { isFilters: !1 }; }, methods: { closeFilter({ target: e }) { this.isFilters && e.classList.contains("filter-container") && (this.isFilters = !1); } } }, Ss = { key: 0, class: "px-[7px] text-[10px] py-[1px] font-[700] text-white bg-blue-500 rounded-full" }, Ts = { class: "filter-content h-screen bg-white w-[400px] overflow-x-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar:horizontal]:h-[8px] [&::-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" }; function As(e, t, n, o, s, l) { const h = p("IconFilter"), g = p("VsFilter"); return r(), u($, null, [ a("button", { onClick: t[0] || (t[0] = (b) => s.isFilters = !s.isFilters), class: "py-2 px-2.5 max-h-[34px] inline-flex 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" }, [ x(h, { height: "16", width: "16" }), t[4] || (t[4] = L(" Фільтри ")), n.onFilters ? (r(), u("span", Ss, T(n.onFilters), 1)) : k("", !0) ]), x(Q, { name: "fade" }, { default: P(() => { var b; return [ (r(), y(ct, { to: "#modal" }, [ X(a("div", { onClick: t[3] || (t[3] = (...f) => l.closeFilter && l.closeFilter(...f)), style: { height: "100vh" }, class: "fixed filter-container top-0 flex justify-end items-center z-[12] right-0 left-0 bottom-0 bg-[rgba(0,0,0,0.2)]" }, [ a("div", Ts, [ (b = n.scheme) != null && b.length ? (r(), y(g, { key: 0, ref: "filter", scheme: n.scheme, layout: "default", "apply-vue-router": "", history: "", token: n.table, name: "filter", footer: !0, background: !0, onFilterChange: t[1] || (t[1] = (f) => e.$emit("filterChange", f)), closeFilterBtn: !0, onFilterClose: t[2] || (t[2] = (f) => s.isFilters = !1) }, null, 8, ["scheme", "token"])) : k("", !0) ]) ], 512), [ [Y, s.isFilters] ]) ])) ]; }), _: 1 }) ], 64); } const Is = /* @__PURE__ */ A($s, [["render", As]]), Ds = { props: { tabsList: { type: Array, default: () => [] }, filterState: String } }, Ps = { class: "relative flex space-x-1 mb-[20px] after:absolute after:w-[99%] after:bottom-0 after:inset-x-0 after:border-b-2 after:border-gray-200 dark:after:border-neutral-700", "aria-label": "Tabs", role: "tablist", "aria-orientation": "horizontal" }, Vs = ["onClick"]; function Fs(e, t, n, o, s, l) { return r(), u("nav", Ps, [ (r(!0), u($, null, V(n.tabsList, (h) => (r(), u("button", { onClick: (g) => e.$emit("update:filterState", h == null ? void 0 : h.name), class: w(["hs-tab-active:after:bg-gray-800 hs-tab-active:text-gray-800 px-2.5 py-1.5 mb-2 relative inline-flex justify-center items-center gap-x-2 hover:bg-gray-100 text-gray-500 hover:text-gray-800 text-sm rounded-lg disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-100 after:absolute after:-bottom-2 after:inset-x-0 after:z-10 after:h-0.5 after:pointer-events-none dark:hs-tab-active:text-neutral-200 dark:hs-tab-active:after:bg-neutral-400 dark:text-neutral-500 dark:hover:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700 active", { " font-semibold after:absolute after:bottom-[-8px] after:left-2.5 after:right-2.5 after:z-10 after:h-0.5 after:bg-gray-800": (h == null ? void 0 : h.name) === n.filterState }]) }, T(h == null ? void 0 : h.label), 11, Vs))), 256)) ]); } const js = /* @__PURE__ */ A(Ds, [["render", Fs]]), Ls = {}, zs = { 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-filter" }; function qs(e, t, n, o, s, l) { return r(), u("svg", zs, t[0] || (t[0] = [ a("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }, null, -1), a("path", { d: "M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z" }, null, -1) ])); } const Ms = /* @__PURE__ */ A(Ls, [["render", qs]]), Bs = { components: { IconFilter2: Ms, IconCheck2: st }, props: { filterCustom: String, customList: Array } }, Ns = { class: "py-2 max-h-[34px] px-2.5 inline-flex 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" }, Os = { class: "flex flex-col p-[2px] gap-[2px] w-[170px]" }, Es = ["onClick"], Us = { class: "text-sm text-gray-800" }; function Rs(e, t, n, o, s, l) { const h = p("IconFilter2"), g = p("IconCheck2"), b = p("VsPopover"); return r(), y(b, { ref: "popover", placement: "bottom" }, { reference: P(() => [ a("button", Ns, [ x(h, { height: "20", width: "20" }) ]) ]), default: P(() => [ a("div", Os, [ (r(!0), u($, null, V(n.customList, (f, d) => (r(), u("button", { onClick: (v) => { var m; e.$emit("update:filterCustom", f == null ? void 0 : f.name), (m = e.$refs) == null || m.popover.togglePopover(); }, key: d, class: w(["flex items-center px-3 py-1 rounded-md cursor-pointer group hover:bg-gray-100", { "bg-gray-100": n.filterCustom === (f == null ? void 0 : f.name) }]) }, [ a("span", Us, T(f == null ? void 0 : f.label), 1), n.filterCustom === (f == null ? void 0 : f.name) ? (r(), y(g, { key: 0, class: "ml-auto size-3 shrink-0" })) : k("", !0) ], 10, Es))), 128)), a("button", { class: "flex items-center px-3 py-1 rounded-md cursor-pointer group hover:bg-gray-100", onClick: t[0] || (t[0] = (f) => { var d; e.$emit("update:filterCustom", void 0), (d = e.$refs) == null || d.popover.togglePopover(); }) }, " Скинути фільтри ") ]) ]), _: 1 }, 512); } const Ws = /* @__PURE__ */ A(Bs, [["render", Rs]]), Hs = { class: "flex items-center gap-x-2" }, Ks = { __name: "admin-table-custom-buttons", props: { slots: Object, data: Object }, setup(e) { var g, b, f, d, v; const { asyncTemplateSlot: t } = (v = (d = (f = (b = (g = Ue()) == null ? void 0 : g.appContext) == null ? void 0 : b.app) == null ? void 0 : f.config) == null ? void 0 : d.globalProperties) == null ? void 0 : v.utils, n = H(""), o = H(""), s = e, l = () => { var m, c, _, C, I; if ((m = s.slots) != null && m.panelLeft || (o.value = "div"), (_ = (c = s.slots) == null ? void 0 : c.panelLeft) != null && _.includes("<")) { const D = t("PanelLeft", (C = s.slots) == null ? void 0 : C.panelLeft, [ "name" ]); o.value = D; } else o.value = (I = s.slots) == null ? void 0 : I.panelLeft; }, h = () => { var m, c, _, C, I; if ((m = s.slots) != null && m.panelRight || (n.value = "div"), (_ = (c = s.slots) == null ? void 0 : c.panelRight) != null && _.includes("<")) { const D = t("PanelRight", (C = s.slots) == null ? void 0 : C.panelRight, [ "name" ]); n.value = D; } else n.value = (I = s.slots) == null ? void 0 : I.panelRight; }; return l(), h(), (m, c) => (r(), u("div", Hs, [ (r(), y(K(o.value), { data: e.data }, null, 8, ["data"])), (r(), y(K(n.value), { data: e.data }, null, 8, ["data"])) ])); } }, Js = { __name: "admin-custom-button-add", props: { slots: Object }, setup(e) { var l, h, g, b, f; const { asyncTemplateSlot: t } = (f = (b = (g = (h = (l = Ue()) == null ? void 0 : l.appContext) == null ? void 0 : h.app) == null ? void 0 : g.config) == null ? void 0 : b.globalProperties) == null ? void 0 : f.utils, n = H(""), o = e; return (() => { var d, v, m, c, _; if ((d = o.slots) != null && d.addButton || (n.value = "div"), (m = (v = o.slots) == null ? void 0 : v.addButton) != null && m.includes("<")) { const C = t("addButton", (c = o.slots) == null ? void 0 : c.addButton, [ "IconPlus" ]); n.value = C; } else n.value = (_ = o.slots) == null ? void 0 : _.addButton; })(), (d, v) => n.value ? (r(), y(K(n.value), { key: 0, IconPlus: J })) : k("", !0); } }, Gs = { key: 0, class: "px-1 py-3 text-gray-800 font-[500]" }, Qs = { key: 1, class: "px-1 py-3 text-gray-800 font-[700]" }, Xs = { __name: "admin-table-totals-list", props: { columns: { type: Array, default: () => [] }, agg: { type: Object, default: () => { } } }, setup(e) { return (t, n) => (r(), u("tr", null, [ (r(!0), u($, null, V(e.columns, (o) => { var s; return r(), u($, { key: o == null ? void 0 : o.name }, [ (s = e.agg) != null && s[o == null ? void 0 : o.name] ? (r(), u("td", Gs, [ x(G, { column: o, row: e.agg }, null, 8, ["column", "row"]) ])) : (r(), u("td", Qs)) ], 64); }), 128)) ])); } }, Ys = {}, Zs = { 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-check" }; function en(e, t, n, o, s, l) { return r(), u("svg", Zs, t[0] || (t[0] = [ a("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }, null, -1), a("path", { d: "M5 12l5 5l10 -10" }, null, -1) ])); } const tn = /* @__PURE__ */ A(Ys, [["render", en]]), sn = ht({ components: { IconChevronDown: nt, IconCheck: tn }, props: { total: { type: Number, default: () => 0 }, pageSize: { type: Number, default: () => 20 }, maxPages: { type: Number, default: () => 10 }, defaultPage: { type: Number, default: () => 1 }, pageSizes: { type: Array, default: [] } }, data() { return { page: 1, pages: [], isDropdownOpen: !1, pageSizeLocal: null }; }, mounted() { this.pageSizeLocal = this.pageSize; }, watch: { total: { immediate: !0, handler() { this.initPages(); } }, defaultPage: { immediate: !0, handler(e) { this.page = e, this.updatePages(e); } }, pageSizeLocal(e, t) { t && (this.isDropdownOpen = !1, this.setCurrentPage(1)); } }, computed: { pagesCount() { return Math.ceil(this.total / this.pageSizeLocal); }, disableNextClick() { return this.page >= this.pagesCount; }, disablePrevClick() { return this.page <= 1; } }, methods: { initPages() { if (this.total <= 0) { this.pages = [1]; return; } this.updatePages(this.page); }, handleSetPage(e) { const t = e.replace(/\D/g, ""); if (t > this.pagesCount) { this.$refs.currentPage.innerText = this.page; return; } else this.$refs.currentPage.innerText = t; this.setCurrentPage(t); }, updatePages(e) { const t = Math.floor(this.maxPages / 2); let n = Math.max(e - t, 1), o = n + this.maxPages - 1; o > this.pagesCount && (o = this.pagesCount, n = Math.max(o - this.maxPages + 1, 1)), this.pages = Array.from( { length: o - n + 1 }, (s, l) => n + l ); }, handleClickPrev() { this.disablePrevClick || (this.setCurrentPage(this.page - 1), this.updatePages(this.page), this.$emit("prevClick")); }, handleClickNext() { this.disableNextClick || (this.setCurrentPage(parseInt(this.page) + 1), this.updatePages(this.page), this.$emit("nextClick")); }, setCurrentPage(e) { this.page = e, this.$emit("pageChange", this.page, this.pageSizeLocal), this.updatePages(e); }, keydownEnter(e) { e.preventDefault(), e.target.blur(); } } }), nn = { class: "flex items-center w-full" }, ln = { class: "flex items-center mx-[8px]" }, an = { class: "min-h-[38px] flex justify-center items-center text-stone-500 py-2 px-1.5 text-sm" }, rn = { key: 0, class: "flex items-center justify-center ml-3 gap-x-5" }, on = { class: "relative" }, un = { class: "z-50 bg-white shadow-md rounded-lg p-1 space-y-0.5 dark:bg-neutral-800 dark:border dark:border-neutral-700 dark:divide-neutral-700 absolute bottom-[100%]" }, dn = ["onClick"]; function cn(e, t, n, o, s, l) { const h = p("IconChevronDown"), g = p("IconCheck"); return r(), u("nav", nn, [ a("button", { type: "button", onClick: t[0] || (t[0] = (...b) => e.handleClickPrev && e.handleClickPrev(...b)), class: w(["min-h-[38px] min-w-[38px] py-2 px-2.5 inline-flex justify-center items-center gap-x-2 text-sm rounded-lg text-stone-800 hover:bg-stone-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-100", { "opacity-50 pointer-events-none": e.disablePrevClick }]) }, [ x(h, { height: "16", width: "16", class: "rotate-90" }) ], 2), a("div", ln, [ a("span", { ref: "currentPage", contenteditable: "true", onKeydown: t[1] || (t[1] = pt((...b) => e.keydownEnter && e.keydownEnter(...b), ["enter"])), onBlur: t[2] || (t[2] = (b) => e.handleSetPage(b.target.innerText)), class: "min-h-[38px] max-h-[38px] overflow-hidden min-w-[38px] flex justify-center items-center bg-stone-100 text-stone-800 py-2 px-3 outline-blue-600 text-sm rounded-lg disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:text-white" }, T(e.page), 545), t[5] || (t[5] = a("span", { class: "min-h-[38px] flex justify-center items-center text-stone-500 py-2 px-1.5 text-sm" }, "з", -1)), a("span", an, T(e.pagesCount), 1) ]), a("button", { type: "button", onClick: t[3] || (t[3] = (...b) => e.handleClickNext && e.handleClickNext(...b)), class: w([{ "opacity-50 pointer-events-none": e.disableNextClick }, "min-h-[38px] min-w-[38px] py-2 px-2.5 inline-flex justify-center items-center gap-x-2 text-sm rounded-lg text-stone-800 hover:bg-stone-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-100"]) }, [ x(h, { height: "16", width: "16", class: "-rotate-90" }) ], 2), e.pageSizes.length ? (r(), u("div", rn, [ a("div", on, [ X(a("div", un, [ (r(!0), u($, null, V(e.pageSizes, (b) => (r(), u("button", { type: "button", class: "w-full flex items-center gap-x-3.5 py-2 px-3 rounded-lg text-sm", onClick: (f) => e.pageSizeLocal = b }, [ L(T(b) + " ", 1), b === e.pageSizeLocal ? (r(), y(g, { key: 0, width: "14", height: "14", class: "text-blue-600" })) : k("", !0) ], 8, dn))), 256)) ], 512), [ [Y, e.isDropdownOpen] ]), e.pageSizes.length ? (r(), u("button", { key: 0, type: "button", class: "text-sm h-[32px] min-w-8 py-3 px-3.5 inline-flex items-center gap-x-1 rounded-lg border border-gray-200 text-gray-800 shadow-sm hover:bg-gray-50 focus:outline-none focus:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none dark:border-neutral-700 dark:text-white dark:hover:bg-neutral-700 dark:focus:bg-neutral-700", onClick: t[4] || (t[4] = (b) => e.isDropdownOpen = !e.isDropdownOpen) }, [ L(T(e.pageSizeLocal) + " ", 1), x(h, { height: "16", width: "16" }) ])) : k("", !0) ]) ])) : k("", !0) ]); } const hn = /* @__PURE__ */ A(sn, [["render", cn]]), pn = { props: { table: String, title: String, search: String }, components: { AdminTableControl: Ft, AdminTableExport: ns, // AdminTablePrint, AdminTableColumnsHidden: it, AdminTableColumn: yt, AdminNodata: ot, IconPlus: J, IconSearch: rt, AdminTableCardInfo: ws, IconOpenCard: at, AdminComponentIs: G, AdminTableFilters: Is, AdminTableTabs: js, AdminTableCustomFilters: Ws, AdminTableCustomButtons: Ks, AdminCustomButtonAdd: Js, AdminTableTotalsList: Xs, AdminTablePagination: hn }, data() { return { tableData: {}, filterScheme: [], page: 1, searchValue: "", limit: 0, filters: null, activeColumn: "", isVisibleCardInfo: !1, onFilters: 0, filterState: null, filterCustom: null, visibleColumns: [], initialHiddenColumns: "", columnsWidth: {} }; }, async mounted() { await this.checkUrlMounted(), await this.getTableData(), await this.getFilters(), window.addEventListener("reloadTablePage", this.getTableData); }, unmounted() { window.removeEventListener("reloadTablePage", this.getTableData); }, computed: { color() { return R.value.buttonColor || "blue"; }, fontSize() { return `text-[${R.value.fontSize || 13}px]`; }, defaultPage() { var e, t; return ((t = (e = this.$route) == null ? void 0 : e.query) == null ? void 0 : t.page) || 1; }, columns() { var e, t; return (t = (e = this.tableData) == null ? void 0 : e.columns) == null ? void 0 : t.filter((n) => (n == null ? void 0 : n.hidden) !== !0); }, isForm() { var e, t, n, o, s; return ((e = this.tableData) == null ? void 0 : e.form) && (((n = (t = this.tableData) == null ? void 0 : t.actions) == null ? void 0 : n.includes("add")) || ((s = (o = this.tableData) == null ? void 0 : o.actions) == null ? void 0 : s.includes("edit"))); }, isNoData() { var e, t; return !((e = this.tableData) != null && e.rows) || !((t = this.columns) != null && t.length); }, activeCardRow() { var e, t; return ((t = (e = this.tableData) == null ? void 0 : e.rows) == null ? void 0 : t.find((n) => { var o, s; return (n == null ? void 0 : n.id) === ((s = (o = this.$route) == null ? void 0 : o.query) == null ? void 0 : s.card); })) || {}; }, getActions() { var e; return (e = this.tableData) == null ? void 0 : e.actions; } }, watch: { // async table() { // this.tableData = null; // this.columnsWidth = {}; // await this.getTableData(); // }, searchValue: { handler: lt(async function(e) { var t; this.page = 1, await this.getTableData(), this.$router.push({ ...this.$route, query: { ...(t = this.$route) == null ? void 0 : t.query, search: e || void 0, page: 1 } }); }, 500) }, $route: { async handler(e, t) { var n, o; ((n = e == null ? void 0 : e.params) == null ? void 0 : n.catchAll) !== ((o = t == null ? void 0 : t.params) == null ? void 0 : o.catchAll) && (this.visibleColumns = [], this.tableData = null, this.columnsWidth = {}, this.unmountedData(), this.getFilters(), await this.getTableData()); }, deep: !0 }, limit(e) { var t; this.$router.replace({ ...this.$route, query: { ...(t = this.$route) == null ? void 0 : t.query, limit: e } }); }, filterState(e) { var t; e && (this.$router.replace({ ...this.$route, query: { ...(t = this.$route) == null ? void 0 : t.query, state: e } }), this.getTableData()); }, filterCustom(e) { var t; this.$router.replace({ ...this.$route, query: { ...(t = this.$route) == null ? void 0 : t.query, custom: e } }), this.getTableData(); }, columns(e) { var t, n, o, s; this.visibleColumns = e == null ? void 0 : e.map((l) => l == null ? void 0 : l.name), this.initialHiddenColumns === ((t = this.visibleColumns) == null ? void 0 : t.join(",")) && (this.visibleColumns = []), this.$router.replace({ ...this.$route, query: { ...(n = this.$route) == null ? void 0 : n.query, columns: (o = this.visibleColumns) != null && o.length ? (s = this.visibleColumns) == null ? void 0 : s.join(",") : void 0 } }); } }, methods: { async checkUrlMounted() { var e, t, n, o, s, l, h, g, b, f, d, v, m, c, _, C, I, D, S, F, z; this.page = ((t = (e = this.$route) == null ? void 0 : e.query) == null ? void 0 : t.page) || 1, this.limit = ((o = (n = this.$route) == null ? void 0 : n.query) == null ? void 0 : o.limit) || 20, (l = (s = this.$route) == null ? void 0 : s.query) != null && l.filter && (this.filters = ((b = decodeURI((g = (h = this.$route) == null ? void 0 : h.query) == null ? void 0 : g.filter)) == null ? void 0 : b.replaceAll("+", " ")) || null), this.filters && (this.onFilters = ((d = (f = this.filters) == null ? void 0 : f.split("=")) == null ? void 0 : d.length) - 1), this.filterState = ((m = (v = this.$route) == null ? void 0 : v.query) == null ? void 0 : m.state) || null, this.filterCustom = ((_ = (c = this.$route)