@opengis/admin 0.3.79 → 0.3.80

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,4 +1,4 @@
1
- import { _ as d, f as m, u as f, s as g } from "./import-file-DyHdxyPP.js";
1
+ import { _ as d, f as m, u as f, s as g } from "./import-file-Cro1RJWt.js";
2
2
  import { resolveComponent as b, createElementBlock as x, openBlock as h, createElementVNode as i, normalizeClass as y, normalizeStyle as p, createBlock as w, createCommentVNode as v } from "vue";
3
3
  const $ = {
4
4
  data() {
@@ -1,4 +1,4 @@
1
- import { _ as S, h as Je, i as Ge, j as Qe, f as M, I as Xe, s as E, k as Ue, l as Q, V as Ye, m as Ze, n as et, o as tt, A as X, p as st, b as nt, q as at, r as lt, a as rt, t as ot, u as Ee } from "./import-file-DyHdxyPP.js";
1
+ import { _ as S, h as Je, i as Ge, j as Qe, f as M, I as Xe, s as E, k as Ue, l as Q, V as Ye, m as Ze, n as et, o as tt, A as X, p as st, b as nt, q as at, r as lt, a as rt, t as ot, u as Ee } from "./import-file-Cro1RJWt.js";
2
2
  import { createElementBlock as i, openBlock as r, createTextVNode as P, createElementVNode as l, toDisplayString as A, createCommentVNode as k, normalizeClass as w, resolveComponent as f, Fragment as $, createVNode as x, withCtx as D, createBlock as v, renderList as V, withModifiers as it, createStaticVNode as dt, withDirectives as U, vModelCheckbox as ut, Transition as W, vModelText as ct, renderSlot as ht, vShow as Y, Teleport as pt, getCurrentInstance as Re, ref as J, resolveDynamicComponent as G, defineComponent as bt, withKeys as ft, normalizeStyle as K } from "vue";
3
3
  const gt = {
4
4
  data() {
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as u, openBlock as n, createElementVNode as o, createStaticVNode as Q, resolveComponent as p, createCommentVNode as w, createVNode as h, normalizeClass as f, createTextVNode as V, toDisplayString as B, Transition as q, withCtx as _, withDirectives as W, Fragment as U, renderList as P, vShow as J, createBlock as T, resolveDynamicComponent as F, ref as le, onMounted as ae, computed as oe, withModifiers as ne } from "vue";
2
- import { _ as y, I as K, s as g, a as X, u as A, b as se, c as Y, d as ue, e as ie, f as de, g as ce } from "./import-file-DyHdxyPP.js";
2
+ import { _ as y, I as K, s as g, a as X, u as A, b as se, c as Y, d as ue, e as ie, f as de, g as ce } from "./import-file-Cro1RJWt.js";
3
3
  import "./user-B_2kh6ic.js";
4
4
  const he = {}, ge = {
5
5
  xmlns: "http://www.w3.org/2000/svg",
@@ -116,7 +116,7 @@ function ye(t, e, r, s, a, l) {
116
116
  V(B((H = r.route) == null ? void 0 : H.ua) + " ", 1),
117
117
  (E = r.route) != null && E.new ? (n(), u("span", ke, "Нове")) : w("", !0),
118
118
  h(b, {
119
- class: f([[a.isOpen && "-rotate-180"], "ml-auto duration-300"]),
119
+ class: f([[a.isOpen && "-rotate-180"], "ml-auto duration-300 flex-shrink-0"]),
120
120
  width: "14",
121
121
  height: "14"
122
122
  }, null, 8, ["class"])
package/dist/admin.js CHANGED
@@ -1,4 +1,4 @@
1
- import { v as f } from "./import-file-DyHdxyPP.js";
1
+ import { v as f } from "./import-file-Cro1RJWt.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -769,4 +769,4 @@ img.ProseMirror-separator {
769
769
  </div>
770
770
  `}).mount(a)},{Fancybox:eae}=Im,zv={$form:Xoe,$api:Joe,$map:Qoe,$preview:({media:t})=>{const e=document.querySelector("#app");if(!e){console.error('Modal root element with id "#app" not found!');return}const n=document.createElement("div");e.appendChild(n),d.createApp({data(){return{items:Array.isArray(t)?t:[t]}},mounted(){this.$nextTick(()=>{eae.show(this.items.map(i=>{const s=typeof i=="string"&&i.endsWith(".pdf");return{src:i,type:s?"iframe":"image"}}),{groupAll:!0,Thumbs:{autoStart:!0}})})},template:`
771
771
  <div style="display: none;"></div> <!-- Keeps container hidden -->
772
- `}).mount(n)}};window.addEventListener("click",t=>{var n,r,i;const e=(n=t==null?void 0:t.target)==null?void 0:n.closest("[_href]");if(e&&(e==null?void 0:e.tagName)==="A"){const s=e==null?void 0:e.getAttribute("_href");(i=(r=window==null?void 0:window.app)==null?void 0:r.router)==null||i.push(s),t==null||t.preventDefault()}});const tae=()=>{const t=d.defineCustomElement(Bv);customElements.define("admin-info",t)},nae=["black","gray","red","yellow","green","blue","indigo","purple","pink","rose","amber","lime","emerald","teal","cyan","sky","violet","fuchsia","lavender","zinc","neutral","stone"],rae=["white"];let vf,MI;const iae=async()=>{try{const{data:t}=await Ue.get("/api/user-menu"),e=t.menus;return Bi.value=e,vf=t.settings,MI=t.user,Pv(e)}catch(t){return console.error(t),[]}},sae=(t,e)=>{Object.entries(e).forEach(([n,r])=>{t.component(n,r)})},DI={async install(t,{componentsApp:e={},settings:n,routes:r=[]}){try{tae(),(n.sidebarDark??!0)&&(n.sidebarDark=!rae.includes(n.sidebarColor)),n.buttonColor||(n.buttonColor=nae.includes(n.sidebarColor)?n.sidebarColor:"blue");const s=(await iae()).filter(o=>o==null?void 0:o.component).map(o=>({...o,component:{...Vv,...e}[o==null?void 0:o.component]}));it.value={...it.value,...n,...(vf==null?void 0:vf.admin)||{}},sae(t,{...Vv,...e}),t.component("admin",JR);const{router:a}=await RB(s.concat(r));window.app={...t,router:a},window.v3plugin={...t.config.globalProperties,...zv},t.config.globalProperties={...t.config.globalProperties,$componentsConfig:{...I2,componentsApp:e},$router:a,$v3plugin:zv,$utils:{reloadCardPage:jp},$settings:vf,$adminSettings:it.value,$user:MI},t.use(a)}catch(i){console.error(i)}},components:Vv,plugins:zv};typeof window<"u"&&(window.v3Admin=DI);const oae={data(){return{formValues:{},scheme:null,table:"",token:"",style:null}},mounted(){this.getFormScheme()},computed:{color(){return it.value.buttonColor||"blue"}},methods:{flattenMenu(t){const e=[];return t.forEach(n=>{n.menu?e.push(...this.flattenMenu(n.menu)):e.push(n)}),e},async getFormScheme(){var r,i;const t=this.flattenMenu(Bi.value);t!=null&&t.length||this.$router.replace("/404");const e=t==null?void 0:t.find(s=>{var a,o;return(s==null?void 0:s.path)==((o=(a=this.$route)==null?void 0:a.query)==null?void 0:o.table)});e||this.$router.replace("/404");const n=e==null?void 0:e.table;this.table=n;try{const{data:{form:s}}=await Ue.get(`/api/template/table/${n}`),{data:a}=await Ue.get(`/api/table/${this.table}/${(i=(r=this.$route)==null?void 0:r.query)==null?void 0:i.id}`);this.token=(a==null?void 0:a.token)||"",this.formValues=a||{};const{data:o}=await Ue.get(`/api/template/form/${s}`);this.scheme=(o==null?void 0:o.schema)||o,this.style=(o==null?void 0:o.style)||null}catch{}},async onlyEditObject(){var e,n,r,i,s,a,o,p,g,y,v;const t=(n=(e=this.$refs.form)==null?void 0:e.$refs)==null?void 0:n.form;try{await t.doValidation(),await Ue.put(`/api/table/${this.token}`,this.formValues),await this.$notify({title:"Успішно!",message:"Об'єкт успішно створено",type:"success"})}catch(w){const T=((r=w==null?void 0:w.response)==null?void 0:r.data)||"";let D=((o=(a=(s=(i=Object.entries(t==null?void 0:t.formErrors))==null?void 0:i[0])==null?void 0:s[1])==null?void 0:a[0])==null?void 0:o.message)==="Це поле обов'язкове"?"Заповніть обов'язкові поля":(v=(y=(g=(p=Object.entries(t==null?void 0:t.formErrors))==null?void 0:p[0])==null?void 0:g[1])==null?void 0:y[0])==null?void 0:v.message;this.$notify({title:"Помилка!",message:T||D||"Сталася помилка валідаціі",type:"error"})}},getGroupedErrorNotification(t,e){if(!t||!e)return"";const n={};return Object.entries(t).forEach(([i,s])=>{var o;const a=((o=e[i])==null?void 0:o.ua)||i;s.forEach(p=>{const g=p.message;n[g]||(n[g]=[]),n[g].push(`"${a}"`)})}),Object.entries(n).map(([i,s])=>`<b>${i}:</b> ${s.join(", ")}`).join("<br>")||"Сталася помилка валідації"},async editObjectAndRedirect(t=!0){var n,r;const e=(r=(n=this.$refs.form)==null?void 0:n.$refs)==null?void 0:r.form;try{t&&await e.doValidation(),await Ue.put(`/api/table/${this.token}${t?"":"?draft=1"}`,this.formValues),await this.$router.back(),await this.$notify({title:"Успішно!",message:"Об'єкт успішно створено",type:"success"})}catch{const s=this.getGroupedErrorNotification(e==null?void 0:e.formErrors,e==null?void 0:e.scheme);this.$notify({title:"Помилка!",message:s,type:"error"})}}}},aae={class:"bg-gray-100 lg:w-[calc(100vw-260px)] w-[100vw]"},lae={class:"h-[76px] mt-[15px] flex items-center justify-between mx-[20px] px-[20px] bg-white rounded-xl"},cae={class:"flex items-center gap-[6px]"},dae={class:"bg-white w-full rounded-xl"};function uae(t,e,n,r,i,s){var o,p,g;const a=d.resolveComponent("VsFormWithNavigation");return d.openBlock(),d.createElementBlock("div",aae,[d.createElementVNode("div",lae,[e[4]||(e[4]=d.createElementVNode("h2",{class:"text-xl font-medium"},"Редагувати",-1)),d.createElementVNode("div",cae,[d.createElementVNode("button",{onClick:e[0]||(e[0]=y=>t.$router.back()),class:"flex items-center px-3 py-2 text-sm font-medium text-gray-800 duration-300 bg-white border border-gray-100 rounded-lg shadow gap-x-2 focus:outline-none hover:bg-gray-50 hover:border-gray-100"}," Скасувати "),(o=i.style)!=null&&o.draft?(d.openBlock(),d.createElementBlock("button",{key:0,onClick:e[1]||(e[1]=y=>s.editObjectAndRedirect(!1)),class:d.normalizeClass(`inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-${s.color}-700 border border-transparent rounded-lg gap-x-2 hover:bg-${s.color}-800 hover:text-white`)}," Зберегти DRAFT ",2)):d.createCommentVNode("",!0),d.createElementVNode("button",{onClick:e[2]||(e[2]=(...y)=>s.editObjectAndRedirect&&s.editObjectAndRedirect(...y)),class:d.normalizeClass(`inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-${s.color}-700 border border-transparent rounded-lg gap-x-2 hover:bg-${s.color}-800 hover:text-white`)}," Зберегти ",2)])]),d.createElementVNode("div",{style:d.normalizeStyle({height:((p=t.$adminSettings)==null?void 0:p.header)===!1?"calc(100vh - 91px)":"calc(100vh - 150px)"}),class:"bg-gray-100 p-[20px] flex lg:w-[calc(100vw-260px)] w-[100vw] overflow-hidden"},[d.createElementVNode("div",dae,[i.scheme?(d.openBlock(),d.createBlock(a,{key:0,ref:"form",scheme:i.scheme,columns:(g=i.style)==null?void 0:g.columns,style:d.normalizeStyle(i.style),modelValue:i.formValues,"onUpdate:modelValue":e[3]||(e[3]=y=>i.formValues=y),class:"p-[20px] h-full"},null,8,["scheme","columns","style","modelValue"])):d.createCommentVNode("",!0)])],4)])}const hae=Object.freeze(Object.defineProperty({__proto__:null,default:Fe(oae,[["render",uae]])},Symbol.toStringTag,{value:"Module"})),fae={data(){return{formValues:{},scheme:null,table:"",token:"",api:"",style:null}},mounted(){this.getFormScheme()},computed:{color(){return it.value.buttonColor||"blue"}},methods:{flattenMenu(t){const e=[];return t.forEach(n=>{n.menu?e.push(...this.flattenMenu(n.menu)):e.push(n)}),e},async getFormScheme(){var r,i;const t=this.flattenMenu(Bi.value);t!=null&&t.length||this.$router.replace("/404");const e=t==null?void 0:t.find(s=>{var a,o;return(s==null?void 0:s.path)==((o=(a=this.$route)==null?void 0:a.query)==null?void 0:o.table)});e||this.$router.replace("/404");const n=e==null?void 0:e.table;this.table=n;try{const s=await Ue.get(`/api/table-data/${n}`),{data:a}=await Ue.get(`/api/template/form/${(r=s==null?void 0:s.data)==null?void 0:r.form}`);this.scheme=(a==null?void 0:a.schema)||a,this.style=(a==null?void 0:a.style)||null,this.api=(a==null?void 0:a.api)||"",this.token=((i=s==null?void 0:s.data)==null?void 0:i.addToken)||""}catch{}},getGroupedErrorNotification(t,e){if(!t||!e)return"";const n={};return Object.entries(t).forEach(([i,s])=>{var o;const a=((o=e[i])==null?void 0:o.ua)||i;s.forEach(p=>{const g=p.message;n[g]||(n[g]=[]),n[g].push(`"${a}"`)})}),Object.entries(n).map(([i,s])=>`<b>${i}:</b> ${s.join(", ")}`).join("<br>")||"Сталася помилка валідації"},async createObject(){var e,n,r;const t=(n=(e=this.$refs.form)==null?void 0:e.$refs)==null?void 0:n.form;try{await t.doValidation(),await Ue.post(this.api||`/api/table/${this.token}`,this.formValues),await this.$router.back(),await this.$notify({title:"Успішно!",message:"Об'єкт успішно створено",type:"success"})}catch(i){const s=this.getGroupedErrorNotification(t==null?void 0:t.formErrors,t==null?void 0:t.scheme);this.$notify({title:"Помилка!",message:((r=i==null?void 0:i.response)==null?void 0:r.data)||s,type:"error"})}}}},pae={class:"bg-gray-100 lg:w-[calc(100vw-260px)] w-[100vw]"},mae={class:"h-[76px] mt-[15px] flex items-center justify-between mx-[20px] px-[20px] bg-white rounded-xl"},gae={class:"flex items-center gap-[6px]"},yae={class:"bg-white w-full rounded-xl"};function bae(t,e,n,r,i,s){var o;const a=d.resolveComponent("VsFormWithNavigation");return d.openBlock(),d.createElementBlock("div",pae,[d.createElementVNode("div",mae,[e[3]||(e[3]=d.createElementVNode("h2",{class:"text-xl font-medium"},"Створити",-1)),d.createElementVNode("div",gae,[d.createElementVNode("button",{onClick:e[0]||(e[0]=p=>t.$router.back()),class:"flex items-center px-3 py-2 text-sm font-medium text-gray-800 duration-300 bg-white border border-gray-100 rounded-lg shadow gap-x-2 focus:outline-none hover:bg-gray-50 hover:border-gray-100"}," Скасувати "),d.createElementVNode("button",{onClick:e[1]||(e[1]=(...p)=>s.createObject&&s.createObject(...p)),class:d.normalizeClass(`inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-${s.color}-700 border border-transparent rounded-lg gap-x-2 hover:bg-${s.color}-800 hover:text-white`)}," Зберегти ",2)])]),d.createElementVNode("div",{style:d.normalizeStyle({height:((o=t.$adminSettings)==null?void 0:o.header)===!1?"calc(100vh - 91px)":"calc(100vh - 150px)"}),class:"bg-gray-100 p-[20px] flex lg:w-[calc(100vw-260px)] w-[100vw] overflow-hidden"},[d.createElementVNode("div",yae,[i.scheme?(d.openBlock(),d.createBlock(a,{key:0,ref:"form",scheme:i.scheme,style:d.normalizeStyle(i.style),modelValue:i.formValues,"onUpdate:modelValue":e[2]||(e[2]=p=>i.formValues=p),class:"h-full p-[20px]"},null,8,["scheme","style","modelValue"])):d.createCommentVNode("",!0)])],4)])}const _ae=Object.freeze(Object.defineProperty({__proto__:null,default:Fe(fae,[["render",bae]])},Symbol.toStringTag,{value:"Module"})),xae=d.ref(null),vae={data(){return{formScheme:null,formValues:{}}},mounted(){this.getFormScheme()},computed:{userData(){return xae.value}},methods:{async updateUser(){var t;try{await Ue.put(`/user/${(t=this.userData.user)==null?void 0:t.uid}`,this.formValues),await this.$notify({title:"Успішно!",message:"Дані успішно оновлені",type:"success"})}catch{this.$notify({title:"Помилка!",message:"Сталася помилка",type:"error"})}},async getFormScheme(){var t,e,n,r;try{const{data:i}=await Ue.get("/api/template/form/admin.profile.form");console.log(this.userData);for(const s in i==null?void 0:i.schema)(e=(t=this.userData)==null?void 0:t.user)!=null&&e[s]&&(this.formValues[s]=(r=(n=this.userData)==null?void 0:n.user)==null?void 0:r[s]);this.formScheme=i.schema}catch(i){console.error(i)}}}},wae={class:"flex justify-center pt-[20px] pb-[20px] pl-[20px] h-[calc(100vh-58px)]"},kae={class:"bg-white rounded-xl p-[20px]"},Eae={class:"flex-1 overflow-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},Sae={class:"flex"};function Cae(t,e,n,r,i,s){const a=d.resolveComponent("VsForm");return d.openBlock(),d.createElementBlock("div",wae,[d.createElementVNode("div",kae,[e[2]||(e[2]=d.createElementVNode("h2",{class:"mb-[20px] text-center"},"Профіль",-1)),d.createElementVNode("div",Eae,[i.formScheme?(d.openBlock(),d.createBlock(a,{key:0,scheme:i.formScheme,modelValue:i.formValues,"onUpdate:modelValue":e[0]||(e[0]=o=>i.formValues=o),class:"pb-0"},null,8,["scheme","modelValue"])):d.createCommentVNode("",!0),d.createElementVNode("div",Sae,[d.createElementVNode("button",{onClick:e[1]||(e[1]=(...o)=>s.updateUser&&s.updateUser(...o)),class:"ml-auto text-[18px] bg-blue-500 text-white px-[8px] py-[4px] rounded hover:bg-blue-700 duration-300"}," Зберегти ")])])])])}const Tae=Object.freeze(Object.defineProperty({__proto__:null,default:Fe(vae,[["render",Cae]])},Symbol.toStringTag,{value:"Module"})),Aae={};function Mae(t,e,n,r,i,s){const a=d.resolveComponent("router-view");return d.openBlock(),d.createBlock(a)}const II=Object.freeze(Object.defineProperty({__proto__:null,default:Fe(Aae,[["render",Mae]])},Symbol.toStringTag,{value:"Module"})),Dae={},Iae={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-logout"};function Pae(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",Iae,e[0]||(e[0]=[d.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),d.createElementVNode("path",{d:"M14 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2"},null,-1),d.createElementVNode("path",{d:"M9 12h12l-3 -3"},null,-1),d.createElementVNode("path",{d:"M18 15l3 -3"},null,-1)]))}const Lv=Fe(Dae,[["render",Pae]]),Nae={},Rae={viewBox:"0 0 1823 249",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Oae(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",Rae,e[0]||(e[0]=[d.createStaticVNode('<path d="M218.88 96.05C223.55 99.19 228.69 101.56 234.09 103.07V145.42C212.05 151.54 195.83 171.79 195.83 195.75C195.83 200.22 196.41 204.65 197.53 208.94L160.92 230.08C156.82 226.06 152.08 222.73 146.91 220.24V171.62C164.83 163.13 176.59 145.06 176.59 124.48C176.59 123.17 176.54 121.86 176.44 120.56L218.88 96.05ZM220.32 79.09L160.97 113.36C162.04 116.88 162.61 120.61 162.61 124.48C162.61 142.66 149.93 157.87 132.93 161.76V230.05C143.4 232.46 152.23 239.16 157.46 248.21L215 214.99C211.7 209.34 209.81 202.77 209.81 195.75C209.81 174.62 226.94 157.49 248.07 157.49V91.02C237.14 91.02 227.29 86.43 220.32 79.09Z" fill="#CE3936"></path><path d="M161.39 19.13L197.44 39.94C196.39 44.11 195.84 48.42 195.84 52.75C195.84 54.21 195.9 55.65 196.02 57.1L153.9 81.42C145.27 75.5 134.95 72.24 124.36 72.24C113.83 72.24 103.57 75.47 94.96 81.32L52.71 56.93C52.82 55.55 52.88 54.16 52.88 52.76C52.88 48.43 52.34 44.12 51.28 39.95L87.3 19.16C96.98 28.89 110.26 34.58 124.34 34.58C138.42 34.57 151.7 28.87 161.39 19.13ZM157.77 0.919983C151.24 12.66 138.71 20.6 124.33 20.6C109.95 20.6 97.44 12.67 90.9 0.939983L33.9 33.85C37.08 39.43 38.91 45.88 38.91 52.76C38.91 56.71 38.31 60.52 37.2 64.11L96.46 98.32C103.44 90.87 113.36 86.22 124.37 86.22C135.44 86.22 145.41 90.93 152.39 98.44L211.59 64.27C210.45 60.64 209.83 56.78 209.83 52.77C209.83 45.89 211.65 39.44 214.84 33.86L157.77 0.919983Z" fill="#CE3936"></path><path d="M29.97 95.95L72.28 120.38C72.17 121.74 72.12 123.1 72.12 124.47C72.12 145.02 83.86 163.08 101.74 171.58V220.23C96.58 222.71 91.84 226.04 87.75 230.05L51.17 208.93C52.29 204.64 52.87 200.21 52.87 195.74C52.87 171.78 36.65 151.53 14.61 145.41V103.06C20.07 101.55 25.27 99.14 29.97 95.95ZM28.5 78.97C21.52 86.38 11.63 91.02 0.640015 91.02V157.49C21.77 157.49 38.9 174.62 38.9 195.75C38.9 202.77 37 209.33 33.71 214.99L91.2 248.18C96.43 239.14 105.25 232.45 115.71 230.04V161.73C98.74 157.81 86.09 142.62 86.09 124.46C86.09 120.54 86.68 116.75 87.78 113.18L28.5 78.97Z" fill="#CE3936"></path><path d="M498.39 177.5V144.88C498.39 128.55 485.11 115.27 468.78 115.27H343.22C342.69 115.27 342.18 115.32 341.67 115.4H337.19C332.35 115.4 328.42 111.46 328.42 106.63V74C328.42 69.16 332.36 65.23 337.19 65.23H486.33C492.08 65.23 496.75 60.57 496.75 54.81C496.75 49.06 492.08 44.39 486.33 44.39H337.19C320.86 44.39 307.58 57.67 307.58 74V106.62C307.58 122.95 320.86 136.23 337.19 136.23H462.75C463.28 136.23 463.79 136.18 464.3 136.1H468.78C473.62 136.1 477.55 140.04 477.55 144.87V177.49C477.55 182.33 473.61 186.26 468.78 186.26H319.64C313.89 186.26 309.22 190.92 309.22 196.68C309.22 202.43 313.89 207.1 319.64 207.1H468.78C485.11 207.11 498.39 193.83 498.39 177.5Z" fill="#CE3935"></path><path d="M710.7 177.32V75.24C710.7 58.91 697.42 45.63 681.09 45.63H550.05C533.72 45.63 520.44 58.91 520.44 75.24V177.32C520.44 193.65 533.72 206.93 550.05 206.93H681.1C697.42 206.93 710.7 193.65 710.7 177.32ZM541.27 75.24C541.27 70.4 545.21 66.47 550.04 66.47H681.09C685.93 66.47 689.86 70.41 689.86 75.24V177.32C689.86 182.16 685.92 186.09 681.09 186.09H550.05C545.21 186.09 541.28 182.15 541.28 177.32V75.24H541.27Z" fill="#CE3935"></path><path d="M1823 177.32V75.24C1823 58.91 1809.72 45.63 1793.39 45.63H1662.34C1646.01 45.63 1632.73 58.91 1632.73 75.24V177.32C1632.73 193.65 1646.01 206.93 1662.34 206.93H1793.39C1809.72 206.93 1823 193.65 1823 177.32ZM1653.57 75.24C1653.57 70.4 1657.51 66.47 1662.34 66.47H1793.39C1798.23 66.47 1802.16 70.41 1802.16 75.24V177.32C1802.16 182.16 1798.22 186.09 1793.39 186.09H1662.34C1657.5 186.09 1653.57 182.15 1653.57 177.32V75.24Z" fill="#CE3935"></path><path d="M756.76 196.51V152H849.42C855.17 152 859.84 147.34 859.84 141.58C859.84 135.83 855.17 131.16 849.42 131.16H756.76V75.23C756.76 70.39 760.7 66.46 765.53 66.46H893.29C899.04 66.46 903.71 61.8 903.71 56.04C903.71 50.29 899.04 45.62 893.29 45.62H765.53C749.2 45.62 735.92 58.9 735.92 75.23V196.5C735.92 202.25 740.59 206.92 746.34 206.92C752.09 206.93 756.76 202.27 756.76 196.51Z" fill="#CE3935"></path><path d="M933.86 66.47H1006.51V194.32C1006.51 200.07 1011.18 204.74 1016.93 204.74C1022.68 204.74 1027.35 200.07 1027.35 194.32V66.47H1100C1105.75 66.47 1110.42 61.81 1110.42 56.05C1110.42 50.3 1105.76 45.63 1100 45.63H933.86C928.11 45.63 923.44 50.29 923.44 56.05C923.45 61.81 928.11 66.47 933.86 66.47Z" fill="#CE3935"></path><path d="M1218.44 204.19C1224.19 204.19 1228.86 199.53 1228.86 193.77V152H1368.13C1384.46 152 1397.74 138.72 1397.74 122.39V75.24C1397.74 58.91 1384.46 45.63 1368.13 45.63H1237.63C1221.3 45.63 1208.02 58.91 1208.02 75.24V193.77C1208.02 199.53 1212.68 204.19 1218.44 204.19ZM1237.63 66.47H1368.13C1372.97 66.47 1376.9 70.41 1376.9 75.24V122.39C1376.9 127.23 1372.96 131.16 1368.13 131.16H1228.86V75.23C1228.86 70.41 1232.79 66.47 1237.63 66.47Z" fill="#CE3935"></path><path d="M1430.64 204.19C1436.39 204.19 1441.06 199.53 1441.06 193.77V152H1523.95C1524.57 153.18 1525.42 154.26 1526.51 155.17L1581.89 201.23C1583.83 202.85 1586.2 203.64 1588.55 203.64C1591.54 203.64 1594.5 202.36 1596.57 199.88C1600.25 195.46 1599.64 188.89 1595.22 185.21L1555.29 152H1580.33C1596.66 152 1609.94 138.72 1609.94 122.39V75.24C1609.94 58.91 1596.66 45.63 1580.33 45.63H1449.83C1433.5 45.63 1420.22 58.91 1420.22 75.24V193.77C1420.22 199.53 1424.88 204.19 1430.64 204.19ZM1449.83 66.47H1580.33C1585.17 66.47 1589.1 70.41 1589.1 75.24V122.39C1589.1 127.23 1585.17 131.16 1580.33 131.16H1441.06V75.23C1441.05 70.41 1444.99 66.47 1449.83 66.47Z" fill="#CE3935"></path>',10)]))}const PI=Fe(Nae,[["render",Oae]]),Bae={components:{IconChevronDown:xf},props:{route:Object,searchable:String},mounted(){var t,e;(e=(t=this.route)==null?void 0:t.menu)!=null&&e.some(n=>{var r,i;return(n==null?void 0:n.path)===this.$route.path.replace("/","")||((i=(r=this.$route)==null?void 0:r.params)==null?void 0:i.table)===(n==null?void 0:n.table)&&(n==null?void 0:n.table)})&&(this.isOpen=!0)},watch:{route:{immediate:!0,handler(t){t!=null&&t.open&&(this.isOpen=!0)}}},data(){return{isOpen:!1,arr:[]}},computed:{darkMode(){var t;return(t=it==null?void 0:it.value)==null?void 0:t.sidebarDark}},methods:{highLight(t){if(!this.searchable)return t;const e=this.searchable.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),n=new RegExp(`(${e})(\\s*)`,"gi");return t.replace(n,(r,i,s)=>`<span style="color:#1989fa;">${i}</span>${s}`)}}},Vae={key:0,class:""},zae={key:0,class:"py-0.5 px-2 inline-flex items-center gap-x-1.5 text-xs font-medium bg-blue-100 text-blue-800 rounded-full dark:bg-blue-500/10 dark:text-blue-500"},Lae={key:1},Fae=["innerHTML"];function $ae(t,e,n,r,i,s){var p,g,y,v,w,T,D,N,B,L,U,Z,Y,ue,pe;const a=d.resolveComponent("IconChevronDown"),o=d.resolveComponent("router-link");return(p=n.route)!=null&&p.menu?(d.openBlock(),d.createElementBlock("div",Vae,[d.createElementVNode("button",{onClick:e[0]||(e[0]=ye=>i.isOpen=!i.isOpen),class:d.normalizeClass(["flex items-center justify-start w-full px-3 py-2 text-sm text-left text-gray-800 duration-300 border-none rounded-lg cursor-pointer gap-x-3 focus:outline-none hover:bg-gray-100",[((y=(g=n.route)==null?void 0:g.menu)==null?void 0:y.some(ye=>{var Me,ke;return(ye==null?void 0:ye.path)===t.$route.path.replace("/","")||(ye==null?void 0:ye.table)===((ke=(Me=t.$route)==null?void 0:Me.params)==null?void 0:ke.table)&&(ye==null?void 0:ye.table)}))&&(s.darkMode?"bg-white/10":"bg-gray-100"),{"text-white/80 hover:bg-white/10 hover:text-white/80 focus:bg-white/10":s.darkMode,"text-gray-800 hover:bg-gray-100 hover:text-gray-800 focus:bg-gray-100":!s.darkMode}]])},[d.createTextVNode(d.toDisplayString((v=n.route)==null?void 0:v.ua)+" ",1),(w=n.route)!=null&&w.new?(d.openBlock(),d.createElementBlock("span",zae,"Нове")):d.createCommentVNode("",!0),d.createVNode(a,{class:d.normalizeClass([[i.isOpen&&"-rotate-180"],"ml-auto duration-300"]),width:"14",height:"14"},null,8,["class"])],2),d.createVNode(d.Transition,{name:"fade"},{default:d.withCtx(()=>{var ye;return[d.withDirectives(d.createElementVNode("ul",{class:d.normalizeClass(["ml-[28px] pt-[6px] before:block before:absolute relative w-[calc(100%-28px)] flex-col gap-y-1.5 inline-flex before:w-[2px] before:h-[100%] before:left-[-10px] cursor-pointer",s.darkMode?"before:bg-white/10":"before:bg-gray-100"])},[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList((ye=n.route)==null?void 0:ye.menu,(Me,ke)=>{var Re,ze;return d.openBlock(),d.createElementBlock("li",{key:ke,class:"w-full"},[d.createVNode(o,{innerHTML:s.highLight(Me==null?void 0:Me.ua),to:"/"+(Me==null?void 0:Me.path),class:d.normalizeClass([[((Me==null?void 0:Me.path)===t.$route.path.replace("/","")||((ze=(Re=t.$route)==null?void 0:Re.params)==null?void 0:ze.table)===(Me==null?void 0:Me.table)&&(Me==null?void 0:Me.table))&&(s.darkMode?"bg-white/10":"bg-gray-100"),{"text-white/80 hover:bg-white/10 hover:text-white/80 focus:bg-white/10":s.darkMode,"text-gray-800 hover:bg-gray-100 hover:text-gray-800 focus:bg-gray-100":!s.darkMode}],"block px-3 py-2 text-sm rounded-lg focus:outline-none focus:bg-gray-100"])},null,8,["innerHTML","to","class"])])}),128))],2),[[d.vShow,i.isOpen]])]}),_:1})])):(T=n.route)!=null&&T.hidden?d.createCommentVNode("",!0):(d.openBlock(),d.createElementBlock("div",Lae,[d.createVNode(o,{to:((N=(D=n.route)==null?void 0:D.path)==null?void 0:N[0])==="/"?(B=n.route)==null?void 0:B.path:"/"+((L=n.route)==null?void 0:L.path),class:d.normalizeClass([[(((U=n.route)==null?void 0:U.path.replace("/",""))===t.$route.path.replace("/","")||((Y=(Z=t.$route)==null?void 0:Z.params)==null?void 0:Y.table)===((ue=n.route)==null?void 0:ue.table)&&((pe=n.route)==null?void 0:pe.table))&&(s.darkMode?"bg-white/10":"bg-gray-100"),{"text-white/80 hover:bg-white/10 hover:text-white/80 focus:bg-white/10 ":s.darkMode,"text-gray-800 hover:bg-gray-100 hover:text-gray-800 focus:bg-gray-100 ":!s.darkMode}],"flex items-center w-full px-3 py-2 text-sm text-gray-800 duration-300 rounded-lg gap-x-3"])},{default:d.withCtx(()=>{var ye;return[d.createElementVNode("span",{innerHTML:s.highLight((ye=n.route)==null?void 0:ye.ua)},null,8,Fae)]}),_:1},8,["to","class"])]))}const jae=Fe(Bae,[["render",$ae]]),Hae={},Uae={class:"flex-shrink-0 size-4",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 Wae(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",Uae,e[0]||(e[0]=[d.createElementVNode("circle",{cx:"12",cy:"12",r:"10"},null,-1),d.createElementVNode("path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"},null,-1),d.createElementVNode("path",{d:"M12 17h.01"},null,-1)]))}const NI=Fe(Hae,[["render",Wae]]),qae={},Gae={class:"shrink-0 size-4 rounded-full",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function Yae(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",Gae,e[0]||(e[0]=[d.createStaticVNode('<g fill-rule="evenodd"><g stroke-width="1pt"><path fill="#bd3d44" d="M0 0h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0z" transform="scale(3.9385)"></path><path fill="#fff" d="M0 10h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0z" transform="scale(3.9385)"></path></g><path fill="#192f5d" d="M0 0h98.8v70H0z" transform="scale(3.9385)"></path><path fill="#fff" d="M8.2 3l1 2.8H12L9.7 7.5l.9 2.7-2.4-1.7L6 10.2l.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8H45l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.4 1.7 1 2.7L74 8.5l-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9L92 7.5l1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm-74.1 7l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7H65zm16.4 0l1 2.8H86l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm-74 7l.8 2.8h3l-2.4 1.7.9 2.7-2.4-1.7L6 24.2l.9-2.7-2.4-1.7h3zm16.4 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8H45l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9L92 21.5l1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm-74.1 7l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7H65zm16.4 0l1 2.8H86l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm-74 7l.8 2.8h3l-2.4 1.7.9 2.7-2.4-1.7L6 38.2l.9-2.7-2.4-1.7h3zm16.4 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8H45l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9L92 35.5l1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm-74.1 7l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7H65zm16.4 0l1 2.8H86l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm-74 7l.8 2.8h3l-2.4 1.7.9 2.7-2.4-1.7L6 52.2l.9-2.7-2.4-1.7h3zm16.4 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8H45l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9L92 49.5l1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm-74.1 7l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7H65zm16.4 0l1 2.8H86l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm-74 7l.8 2.8h3l-2.4 1.7.9 2.7-2.4-1.7L6 66.2l.9-2.7-2.4-1.7h3zm16.4 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8H45l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9L92 63.5l1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9z" transform="scale(3.9385)"></path></g>',1)]))}const Zae=Fe(qae,[["render",Yae]]),Xae={},Kae={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1",width:"256",height:"256",viewBox:"0 0 256 256","xml:space":"preserve"};function Jae(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",Kae,e[0]||(e[0]=[d.createElementVNode("defs",null,null,-1),d.createElementVNode("g",{style:{stroke:"none","stroke-width":"0","stroke-dasharray":"none","stroke-linecap":"butt","stroke-linejoin":"miter","stroke-miterlimit":"10",fill:"none","fill-rule":"nonzero",opacity:"1"},transform:"translate(1.4065934065934016 1.4065934065934016) scale(2.81 2.81)"},[d.createElementVNode("path",{d:"M 45 90 C 20.147 90 0 69.853 0 45 h 90 C 90 69.853 69.853 90 45 90 z",style:{stroke:"none","stroke-width":"1","stroke-dasharray":"none","stroke-linecap":"butt","stroke-linejoin":"miter","stroke-miterlimit":"10",fill:"rgb(255,213,0)","fill-rule":"nonzero",opacity:"1"},transform:" matrix(1 0 0 1 0 0) ","stroke-linecap":"round"}),d.createElementVNode("path",{d:"M 45 0 C 20.147 0 0 20.147 0 45 h 90 C 90 20.147 69.853 0 45 0 z",style:{stroke:"none","stroke-width":"1","stroke-dasharray":"none","stroke-linecap":"butt","stroke-linejoin":"miter","stroke-miterlimit":"10",fill:"rgb(0,91,187)","fill-rule":"nonzero",opacity:"1"},transform:" matrix(1 0 0 1 0 0) ","stroke-linecap":"round"})],-1)]))}const Qae=Fe(Xae,[["render",Jae]]),ele={},tle={class:"shrink-0 size-3.5 text-gray-800 dark:text-neutral-200",xmlns:"http:.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"};function nle(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",tle,e[0]||(e[0]=[d.createElementVNode("polyline",{points:"20 6 9 17 4 12"},null,-1)]))}const rle={components:{IconQuestion:NI,IconUSA:Zae,IconUkraine:Qae,IconTick:Fe(ele,[["render",nle]])},props:["docs","languages"],data(){return{currentLang:"ukraine",languagesOptions:[{titleEN:"English",titleUA:"Англійська",id:"english",icon:"IconUSA"},{titleEN:"Ukraine",titleUA:"Українська",id:"ukraine",icon:"IconUkraine"}]}},computed:{selectedLang(){return this.languagesOptions.find(t=>t.id===this.currentLang)},darkMode(){var t;return(t=it==null?void 0:it.value)==null?void 0:t.sidebarDark}},methods:{changeLang(t){this.$refs.langPopover.togglePopover(),this.currentLang=t}}},ile={class:"flex justify-center items-center gap-x-2"},sle=["onClick"],ole={class:"text-gray-800"},ale={class:"ms-auto"},lle={class:"truncate"};function cle(t,e,n,r,i,s){const a=d.resolveComponent("IconTick"),o=d.resolveComponent("VsPopover");return n.docs||n.languages?(d.openBlock(),d.createElementBlock("div",{key:0,class:d.normalizeClass(["py-2 px-5 border-t dark:border-neutral-700",s.darkMode?"border-white/10 ":"border-gray-200"])},[d.createElementVNode("div",ile,[d.createVNode(o,{trigger:"click",placement:"top",ref:"langPopover"},{reference:d.withCtx(()=>{var p,g,y;return[d.createElementVNode("button",{type:"button","aria-expanded":"false",class:d.normalizeClass(["relative py-2 px-3 flex items-center gap-x-2 text-nowrap w-full cursor-pointer border rounded-full text-start text-sm text-gray-800 focus:outline-none",s.darkMode?"border-white/10 bg-transparent text-white/80 hover:bg-white/10 focus:bg-white/10":"border-gray-200 bg-white hover:bg-gray-100 focus:bg-gray-100"])},[d.createElementVNode("div",null,[(d.openBlock(),d.createBlock(d.resolveDynamicComponent((p=s.selectedLang)==null?void 0:p.icon),{class:"w-[16px] h-[16px] rounded-full"}))]),d.createElementVNode("span",lle,d.toDisplayString(i.currentLang==="ukraine"?(g=s.selectedLang)==null?void 0:g.titleUA:(y=s.selectedLang)==null?void 0:y.titleEN),1)],2)]}),default:d.withCtx(()=>[d.createElementVNode("div",null,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(i.languagesOptions,p=>(d.openBlock(),d.createElementBlock("button",{key:p.id,type:"button",onClick:g=>s.changeLang(p.id),class:d.normalizeClass(["flex items-center gap-x-2 cursor-pointer dark:hs-selected:bg-neutral-800 py-2 px-4 w-full text-sm text-gray-800 hover:bg-gray-100 rounded-lg focus:outline-none focus:bg-gray-100 dark:text-neutral-300 dark:hover:bg-neutral-800 dark:focus:bg-neutral-800 selected",(p==null?void 0:p.id)===i.currentLang?"bg-gray-100":""])},[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(p==null?void 0:p.icon),{class:"w-[16px] h-[16px] rounded-full"})),d.createElementVNode("div",ole,d.toDisplayString(i.currentLang==="ukraine"?p==null?void 0:p.titleUA:p==null?void 0:p.titleEN),1),d.createElementVNode("span",ale,[(p==null?void 0:p.id)===i.currentLang?(d.openBlock(),d.createBlock(a,{key:0})):d.createCommentVNode("",!0)])],10,sle))),128))])]),_:1},512)])],2)):d.createCommentVNode("",!0)}const RI=Fe(rle,[["render",cle]]),dle={components:{IconLogout:Lv,NavbarItem:jae,IconLogo:PI,IconSearch:ly,NavbarFooter:RI},data(){return{activeIndex:null,searchValue:""}},computed:{data(){var t;return(t=this.searchValue)!=null&&t.trim()?this.filterMenu(Bi.value,this.searchValue):Bi.value},logo(){var t,e,n;return((e=(t=this.$settings)==null?void 0:t.admin)==null?void 0:e.logo)||((n=it.value)==null?void 0:n.logo)||"/assets/logo.svg"},docs(){var t;return(t=it==null?void 0:it.value)==null?void 0:t.docs},languages(){var t;return(t=it==null?void 0:it.value)==null?void 0:t.languages},darkMode(){var t;return((t=it==null?void 0:it.value)==null?void 0:t.sidebarDark)||!1},darkColor(){var e,n,r;const t=((e=it==null?void 0:it.value)==null?void 0:e.sidebarColor)||((n=it==null?void 0:it.value)==null?void 0:n.color)||((r=it==null?void 0:it.value)!=null&&r.sidebarDark?"blue":"white");return t.includes("-")||t.includes("[")?t:t+"-950"}},watch:{"$route.path"(){this.$parent.showMenu=!1}},methods:{filterMenu(t,e){return t.map(n=>{var r,i;if(n.menu){const s=this.filterMenu(n.menu,e);if(s.length>0)return{...n,menu:s,open:!0}}else if((i=(r=n.ua)==null?void 0:r.toLowerCase())!=null&&i.includes(e.toLowerCase()))return n;return null}).filter(Boolean)}}},ule={class:"h-[46px] w-full px-5 lg:px-8 mb-[10px]"},hle={href:"/"},fle=["src"],ple={class:"px-2 lg:px-5"},mle={class:"px-2 lg:px-5 flex flex-col flex-wrap w-full pb-3"},gle={key:0,class:"flex flex-col gap-y-1"};function yle(t,e,n,r,i,s){var g;const a=d.resolveComponent("VsText"),o=d.resolveComponent("NavbarItem"),p=d.resolveComponent("NavbarFooter");return d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["lg:flex lg:relative lg:left-0 flex-col h-[100vh] pt-3 border-r w-[260px] top-0 bottom-0 shrink-0 absolute transition left-[-100%] z-[11]",{"left-0":t.$parent.showMenu,["bg-"+s.darkColor]:s.darkColor,"bg-white":!s.darkMode&&!s.darkColor}])},[d.createElementVNode("div",ule,[d.createElementVNode("a",hle,[d.createElementVNode("img",{src:s.logo,class:"object-contain w-full h-full"},null,8,fle)])]),d.createElementVNode("div",ple,[d.createVNode(a,{type:"text",modelValue:i.searchValue,"onUpdate:modelValue":e[0]||(e[0]=y=>i.searchValue=y),clearable:!0,icon:"search","icon-position":"left",placeholder:"Пошук по меню",class:d.normalizeClass(["[&>input]:h-[38px]",{"[&>input]:bg-[#172554] [&>input]:text-white/80 [&>input]:placeholder:text-white/40 [&>input]:border [&>input]:border-white/50":s.darkMode,["[&>input]:bg-"+s.darkColor]:s.darkColor,["focus:[&>input]:border-"+s.darkColor+"-500"]:s.darkMode}])},null,8,["modelValue","class"])]),d.createElementVNode("div",{class:d.normalizeClass(["py-[10px] overflow-y-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500",s.languages||s.docs?"h-[calc(100vh-161px)]":"h-[calc(100vh-110px)]"])},[d.createElementVNode("nav",mle,[(g=s.data)!=null&&g.length?(d.openBlock(),d.createElementBlock("ul",gle,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(s.data,(y,v)=>(d.openBlock(),d.createElementBlock("li",{key:v,class:"flex flex-col gap-[6px]"},[d.createVNode(o,{route:y,searchable:i.searchValue},null,8,["route","searchable"])]))),128))])):(d.openBlock(),d.createElementBlock("div",{key:1,class:d.normalizeClass(["text-lg mt-[20px]",{"text-white/80":s.darkMode,"text-gray-800":!s.darkMode}])}," Не знайдено ",2))])],2),s.docs||s.languages?(d.openBlock(),d.createBlock(p,{key:0,docs:s.docs,languages:s.languages},null,8,["docs","languages"])):d.createCommentVNode("",!0)],2)}const OI=Fe(dle,[["render",yle],["__scopeId","data-v-7817bab2"]]),ble={components:{IconChevronDown:xf},props:{route:Object,searchable:String},mounted(){var t,e;(e=(t=this.route)==null?void 0:t.menu)!=null&&e.some(n=>{var r,i;return(n==null?void 0:n.path)===this.$route.path.replace("/","")||((i=(r=this.$route)==null?void 0:r.params)==null?void 0:i.table)===(n==null?void 0:n.table)&&(n==null?void 0:n.table)})&&(this.isOpen=!0)},watch:{route:{immediate:!0,handler(t){t!=null&&t.open&&(this.isOpen=!0)}}},data(){return{isOpen:!1,arr:[]}},computed:{darkMode(){var t;return(t=it==null?void 0:it.value)==null?void 0:t.sidebarDark}},methods:{highLight(t){if(!this.searchable)return t;const e=this.searchable.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),n=new RegExp(`(${e})(\\s*)`,"gi");return t.replace(n,(r,i,s)=>`<span style="color:#1989fa;">${i}</span>${s}`)}}},_le={key:0,class:""},xle={key:0,class:"py-0.5 px-2 inline-flex items-center gap-x-1.5 text-xs font-medium bg-blue-100 text-blue-800 rounded-full dark:bg-blue-500/10 dark:text-blue-500"},vle={class:"ml-[28px] pt-[6px] before:block before:absolute relative w-[calc(100%-28px)] before:bg-gray-200 flex-col gap-y-1.5 inline-flex before:w-[2px] before:h-[100%] before:left-[-10px] cursor-pointer"},wle={key:1},kle=["innerHTML"];function Ele(t,e,n,r,i,s){var p,g,y,v,w,T,D,N,B,L,U,Z,Y,ue,pe;const a=d.resolveComponent("IconChevronDown"),o=d.resolveComponent("router-link");return(p=n.route)!=null&&p.menu?(d.openBlock(),d.createElementBlock("div",_le,[d.createElementVNode("button",{onClick:e[0]||(e[0]=ye=>i.isOpen=!i.isOpen),class:d.normalizeClass(["flex items-center justify-start w-full px-3 py-2 text-sm text-left text-gray-800 duration-300 border-none rounded-lg cursor-pointer gap-x-3 focus:outline-none hover:bg-gray-200",[((y=(g=n.route)==null?void 0:g.menu)==null?void 0:y.some(ye=>{var Me,ke;return(ye==null?void 0:ye.path)===t.$route.path.replace("/","")||(ye==null?void 0:ye.table)===((ke=(Me=t.$route)==null?void 0:Me.params)==null?void 0:ke.table)&&(ye==null?void 0:ye.table)}))&&"bg-gray-200"]])},[d.createTextVNode(d.toDisplayString((v=n.route)==null?void 0:v.ua)+" ",1),(w=n.route)!=null&&w.new?(d.openBlock(),d.createElementBlock("span",xle,"Нове")):d.createCommentVNode("",!0),d.createVNode(a,{class:d.normalizeClass([[i.isOpen&&"-rotate-180"],"ml-auto duration-300"]),width:"14",height:"14"},null,8,["class"])],2),d.createVNode(d.Transition,{name:"fade"},{default:d.withCtx(()=>{var ye;return[d.withDirectives(d.createElementVNode("ul",vle,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList((ye=n.route)==null?void 0:ye.menu,(Me,ke)=>{var Re,ze;return d.openBlock(),d.createElementBlock("li",{key:ke,class:"w-full"},[d.createVNode(o,{innerHTML:s.highLight(Me==null?void 0:Me.ua),to:"/"+(Me==null?void 0:Me.path),class:d.normalizeClass([[((Me==null?void 0:Me.path)===t.$route.path.replace("/","")||((ze=(Re=t.$route)==null?void 0:Re.params)==null?void 0:ze.table)===(Me==null?void 0:Me.table)&&(Me==null?void 0:Me.table))&&"bg-gray-200"],"block px-3 py-2 text-sm rounded-lg focus:outline-none hover:bg-gray-200 focus:bg-gray-200"])},null,8,["innerHTML","to","class"])])}),128))],512),[[d.vShow,i.isOpen]])]}),_:1})])):(T=n.route)!=null&&T.hidden?d.createCommentVNode("",!0):(d.openBlock(),d.createElementBlock("div",wle,[d.createVNode(o,{to:((N=(D=n.route)==null?void 0:D.path)==null?void 0:N[0])==="/"?(B=n.route)==null?void 0:B.path:"/"+((L=n.route)==null?void 0:L.path),class:d.normalizeClass([[(((U=n.route)==null?void 0:U.path.replace("/",""))===t.$route.path.replace("/","")||((Y=(Z=t.$route)==null?void 0:Z.params)==null?void 0:Y.table)===((ue=n.route)==null?void 0:ue.table)&&((pe=n.route)==null?void 0:pe.table))&&"bg-gray-200"],"flex items-center w-full px-3 py-2 text-sm text-gray-800 duration-300 rounded-lg gap-x-3 hover:bg-gray-200 focus:bg-gray-200"])},{default:d.withCtx(()=>{var ye;return[d.createElementVNode("span",{innerHTML:s.highLight((ye=n.route)==null?void 0:ye.ua)},null,8,kle)]}),_:1},8,["to","class"])]))}const Sle=Fe(ble,[["render",Ele]]),Cle={class:"relative w-fit mx-auto"},Tle={key:0,class:"w-60 duration absolute top-full left-0 z-20 bg-white rounded-xl shadow-xl block"},Ale={class:"p-1"},Mle={__name:"navbar-gray-dropdown",setup(t){const e=d.ref(!1);return d.onMounted(()=>{document.addEventListener("click",n=>{n.target.closest(".navbar-gray-dropdown")||(e.value=!1)})}),(n,r)=>{var s;const i=d.resolveComponent("router-link");return d.openBlock(),d.createElementBlock("div",Cle,[d.createElementVNode("button",{onClick:r[0]||(r[0]=a=>e.value=!e.value),type:"button",class:"py-1 px-2 navbar-gray-dropdown inline-flex justify-center items-center gap-x-1 font-semibold rounded-lg text-gray-800 hover:text-purple-600 focus:outline-hidden focus:text-purple-600 disabled:opacity-50 disabled:pointer-events-none dark:text-neutral-300 dark:hover:text-purple-500 dark:focus:text-purple-500"},[d.createTextVNode(d.toDisplayString((s=n.$user)==null?void 0:s.user_name)+" ",1),d.createVNode(cy,{width:"16",height:"16"})]),e.value?(d.openBlock(),d.createElementBlock("div",Tle,[d.createElementVNode("div",Ale,[r[2]||(r[2]=d.createElementVNode("a",{class:"flex items-center gap-x-3 py-2 px-3 rounded-lg text-sm text-gray-800 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-hidden focus:bg-gray-100 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",href:"#"}," Профіль ",-1)),d.createVNode(i,{class:"flex items-center gap-x-3 py-2 px-3 rounded-lg text-sm text-gray-800 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-hidden focus:bg-gray-100 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",to:"/admin.settings"},{default:d.withCtx(()=>r[1]||(r[1]=[d.createTextVNode(" Налаштування ")])),_:1})]),r[3]||(r[3]=d.createElementVNode("div",{class:"p-1 border-t border-gray-200 dark:border-neutral-700"},[d.createElementVNode("a",{class:"flex items-center gap-x-3 py-2 px-3 rounded-lg text-sm text-gray-800 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-hidden focus:bg-gray-100 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",href:"/logout"}," Вийти ")],-1))])):d.createCommentVNode("",!0)])}}},Dle={class:"p-4 flex flex-col justify-center border-b relative max-h-[192px]"},Ile={components:{IconLogout:Lv,NavbarItem:Sle,IconLogo:PI,IconSearch:ly,NavbarFooter:RI,NavbarUser:{__name:"navbar-gray-user",setup(t){return(e,n)=>(d.openBlock(),d.createElementBlock("div",Dle,[d.createVNode(_x,{class:"!absolute top-[8px] right-[8px]",placement:"left"}),n[0]||(n[0]=d.createElementVNode("div",{class:"flex size-24 justify-center items-center shrink-0 rounded-full overflow-hidden mx-auto mb-2"},[d.createElementVNode("img",{class:"object-cover h-[130px] w-[130px]",src:"https://media.istockphoto.com/id/1337144146/vector/default-avatar-profile-icon-vector.jpg?s=612x612&w=0&k=20&c=BIbFwuv7FxTWvh5S3vB6bkT0Qv8Vn8N5Ffseq84ClGI=",alt:"Avatar"})],-1)),d.createVNode(Mle)]))}}},data(){return{activeIndex:null,searchValue:""}},computed:{data(){var t;return(t=this.searchValue)!=null&&t.trim()?this.filterMenu(Bi.value,this.searchValue):Bi.value},logo(){var t,e,n;return((e=(t=this.$settings)==null?void 0:t.admin)==null?void 0:e.logo)||((n=it.value)==null?void 0:n.logo)||"/assets/logo.svg"},docs(){var t;return(t=it==null?void 0:it.value)==null?void 0:t.docs},languages(){var t;return(t=it==null?void 0:it.value)==null?void 0:t.languages},darkMode(){var t;return((t=it==null?void 0:it.value)==null?void 0:t.sidebarDark)||!1},darkColor(){var e,n,r;const t=((e=it==null?void 0:it.value)==null?void 0:e.sidebarColor)||((n=it==null?void 0:it.value)==null?void 0:n.color)||((r=it==null?void 0:it.value)!=null&&r.sidebarDark?"blue":"white");return t.includes("-")||t.includes("[")?t:t+"-950"}},watch:{"$route.path"(){this.$parent.showMenu=!1}},methods:{filterMenu(t,e){return t.map(n=>{var r,i;if(n.menu){const s=this.filterMenu(n.menu,e);if(s.length>0)return{...n,menu:s,open:!0}}else if((i=(r=n.ua)==null?void 0:r.toLowerCase())!=null&&i.includes(e.toLowerCase()))return n;return null}).filter(Boolean)}}},Ple={class:"px-2 lg:px-5 flex flex-col flex-wrap w-full pb-3"},Nle={key:0,class:"flex flex-col gap-y-1"},Rle={class:"h-[55px] border-t w-full px-5 shrink-0 lg:px-5 flex items-center"},Ole={href:"/"},Ble=["src"];function Vle(t,e,n,r,i,s){var p;const a=d.resolveComponent("NavbarUser"),o=d.resolveComponent("NavbarItem");return d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["lg:flex lg:relative lg:left-0 flex-col h-[100vh] border-r w-[260px] bg-gray-100 top-0 bottom-0 shrink-0 absolute transition left-[-100%] z-[11]",{"left-0":t.$parent.showMenu}])},[d.createVNode(a),d.createElementVNode("div",{class:d.normalizeClass(["py-[10px] overflow-y-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500",s.languages||s.docs?"h-[calc(100vh-161px)]":"h-[calc(100vh-110px)]"])},[d.createElementVNode("nav",Ple,[(p=s.data)!=null&&p.length?(d.openBlock(),d.createElementBlock("ul",Nle,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(s.data,(g,y)=>(d.openBlock(),d.createElementBlock("li",{key:y,class:"flex flex-col gap-[6px]"},[d.createVNode(o,{route:g,searchable:i.searchValue},null,8,["route","searchable"])]))),128))])):(d.openBlock(),d.createElementBlock("div",{key:1,class:d.normalizeClass(["text-lg mt-[20px]",{"text-white/80":s.darkMode,"text-gray-800":!s.darkMode}])}," Не знайдено ",2))])],2),d.createElementVNode("div",Rle,[d.createElementVNode("a",Ole,[d.createElementVNode("img",{src:s.logo,class:"object-contain max-h-[40px]"},null,8,Ble)])])],2)}const zle=Fe(Ile,[["render",Vle],["__scopeId","data-v-3cea82a7"]]),Lle={__name:"navbar",setup(t){const e={default:OI,gray:zle},n=d.computed(()=>{var r;return e[(r=it.value)==null?void 0:r.navbar]||OI});return(r,i)=>(d.openBlock(),d.createBlock(d.resolveDynamicComponent(n.value)))}},Fle={components:{IconQuestion:NI,IconUser:DA,AdminNotification:_x,IconUserOutline:AA,IconLogout:Lv},data(){return{userData:null,isVisible:!1}},computed:{headerBadgeTitle(){var t;return(t=it.value)==null?void 0:t.headerBadge},headerBadgeColor(){var t;return(t=it.value)==null?void 0:t.headerBadgeColor}},watch:{isVisible(t){t?setTimeout(()=>window.addEventListener("click",this.closeOnOutsideClick),0):window.removeEventListener("click",this.closeOnOutsideClick)}},created(){this.userData=this.$user,Rv.value=this.$settings},methods:{async logout(){try{await Ue.get("/logout"),await window.history.pushState({},"","/login"),await location.reload(),localStorage.removeItem("user")}catch{}},closeOnOutsideClick(){this.isVisible=!1}},beforeUnmount(){window.removeEventListener("click",this.closeOnOutsideClick)}},$le={class:"flex items-center gap-[6px]"},jle={href:"/docs-user",class:"size-[38px] inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent text-gray-500 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-100 dark:text-neutral-400 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"},Hle={href:"/docs-user",class:"size-[38px] inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent text-gray-500 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-100 dark:text-neutral-400 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"},Ule={class:"relative"},Wle=["src"],qle={key:1,class:"size-[40px] rounded-full bg-gray-200 flex items-center justify-center"},Gle=["src"],Yle={key:1,class:"flex items-center justify-center bg-gray-200 rounded-full size-10"},Zle={class:"grow"},Xle={class:"block text-sm font-medium text-gray-800 dark:text-neutral-200"},Kle={class:"text-xs text-gray-500 dark:text-neutral-500"},Jle={class:"flex flex-col space-y-0.5"};function Qle(t,e,n,r,i,s){const a=d.resolveComponent("IconQuestion"),o=d.resolveComponent("VsPopover"),p=d.resolveComponent("AdminNotification"),g=d.resolveComponent("IconUser"),y=d.resolveComponent("router-link"),v=d.resolveComponent("IconUserOutline"),w=d.resolveComponent("IconLogout");return d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["h-[58px] border-b flex items-center px-[20px]",s.headerBadgeTitle?"justify-between":"justify-end"])},[s.headerBadgeTitle?(d.openBlock(),d.createElementBlock("div",{key:0,class:d.normalizeClass(["py-1.5 px-2.5 flex justify-center items-center text-white hover:bg-gray-900 focus:bg-gray-900 dark:bg-neutral-100 dark:text-neutral-800 dark:hover:bg-white dark:focus:bg-white.class text-nowrap text-xs sm:text-[13px] rounded-lg disabled:opacity-50 disabled:pointer-events-none focus:outline-none dark:text-neutral-400",{["bg-"+s.headerBadgeColor]:s.headerBadgeColor,"bg-gray-800":!s.headerBadgeColor}])},d.toDisplayString(s.headerBadgeTitle),3)):d.createCommentVNode("",!0),d.createElementVNode("div",{class:"flex lg:hidden",onClick:e[0]||(e[0]=T=>t.$parent.showMenu=!0)},e[4]||(e[4]=[d.createStaticVNode('<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="icon icon-tabler icons-tabler-outline icon-tabler-menu-2"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M4 6l16 0"></path><path d="M4 12l16 0"></path><path d="M4 18l16 0"></path></svg>',1)])),d.createElementVNode("div",$le,[d.createVNode(o,{trigger:"hover"},{reference:d.withCtx(()=>[d.createElementVNode("a",jle,[d.createVNode(a,{height:"24",width:"24"})])]),default:d.withCtx(()=>[e[5]||(e[5]=d.createTextVNode(" Допомога "))]),_:1}),d.createVNode(o,{trigger:"hover"},{reference:d.withCtx(()=>[d.createElementVNode("a",Hle,[d.createVNode(p)])]),default:d.withCtx(()=>[e[6]||(e[6]=d.createTextVNode(" Сповіщення "))]),_:1}),e[12]||(e[12]=d.createElementVNode("div",{class:"h-[30px] w-[1px] bg-gray-200 ml-[10px] mr-[10px]"},null,-1)),d.createElementVNode("div",Ule,[d.createElementVNode("div",{onClick:e[1]||(e[1]=T=>i.isVisible=!0),class:"cursor-pointer"},[d.createVNode(o,{trigger:"hover"},{reference:d.withCtx(()=>{var T,D,N,B;return[(D=(T=i.userData)==null?void 0:T.user)!=null&&D.avatar?(d.openBlock(),d.createElementBlock("img",{key:0,class:"flex-shrink-0 size-[30px] rounded-full",src:(B=(N=i.userData)==null?void 0:N.user)==null?void 0:B.avatar,alt:"Image Description"},null,8,Wle)):(d.openBlock(),d.createElementBlock("div",qle,[d.createVNode(g)]))]}),default:d.withCtx(()=>[e[7]||(e[7]=d.createTextVNode(" Профіль "))]),_:1})]),i.isVisible?(d.openBlock(),d.createElementBlock("div",{key:0,onClick:e[3]||(e[3]=d.withModifiers(()=>{},["stop"])),class:"fixed p-2 bg-white w-[240px] top-[55px] right-[20px] rounded-xl z-[1] shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] dark:shadow-[0_10px_40px_10px_rgba(0,0,0,0.2)] dark:bg-neutral-900 block"},[d.createVNode(y,{to:"profile",disabled:!0,class:"py-2 px-2.5 flex items-center gap-3 rounded-lg hover:bg-gray-100 focus:outline-none focus:bg-gray-100 dark:hover:bg-neutral-800 dark:focus:bg-neutral-800"},{default:d.withCtx(()=>{var T,D,N,B,L,U,Z,Y,ue,pe;return[(D=(T=i.userData)==null?void 0:T.user)!=null&&D.avatar?(d.openBlock(),d.createElementBlock("img",{key:0,class:"rounded-full shrink-0 size-10",src:(B=(N=i.userData)==null?void 0:N.user)==null?void 0:B.avatar,alt:"Image Description"},null,8,Gle)):(d.openBlock(),d.createElementBlock("div",Yle,[d.createVNode(g,{class:"w-[16px]"})])),d.createElementVNode("div",Zle,[d.createElementVNode("span",Xle,d.toDisplayString(((U=(L=i.userData)==null?void 0:L.user)==null?void 0:U.username)||((Y=(Z=i.userData)==null?void 0:Z.user)==null?void 0:Y.user_name)||"User User"),1),d.createElementVNode("p",Kle,d.toDisplayString(((pe=(ue=i.userData)==null?void 0:ue.user)==null?void 0:pe.email)||"email не вказано"),1)])]}),_:1}),e[10]||(e[10]=d.createElementVNode("div",{class:"my-2 mx-2.5 h-px bg-gray-200 dark:bg-neutral-700"},null,-1)),d.createElementVNode("ul",Jle,[d.createElementVNode("li",null,[d.createVNode(y,{to:"profile",class:"w-full flex items-center gap-x-3.5 py-2 px-2.5 text-sm text-gray-800 rounded-lg hover:bg-gray-100 focus:outline-none focus:bg-gray-100 dark:text-white dark:hover:bg-neutral-800 dark:focus:bg-neutral-800",disabled:"true"},{default:d.withCtx(()=>[d.createVNode(v,{class:"size-4"}),e[8]||(e[8]=d.createTextVNode(" Профіль "))]),_:1})])]),e[11]||(e[11]=d.createElementVNode("div",{class:"my-2 mx-2.5 h-px bg-gray-200 dark:bg-neutral-700"},null,-1)),d.createElementVNode("p",null,[d.createElementVNode("button",{type:"button",onClick:e[2]||(e[2]=(...T)=>s.logout&&s.logout(...T)),class:"w-full flex items-center gap-x-3.5 py-2 px-2.5 text-sm text-gray-800 rounded-lg hover:bg-gray-100 hover:text-red-500 focus:outline-none focus:bg-gray-100 focus:text-red-500 dark:text-white dark:hover:bg-neutral-800 dark:focus:bg-neutral-800 dark:hover:text-red-500 dark:focus:text-red-500"},[d.createVNode(w,{class:"size-4"}),e[9]||(e[9]=d.createTextVNode(" Вийти "))])])])):d.createCommentVNode("",!0)])])],2)}const ece={components:{navbar:Lle,AdminHeader:Fe(Fle,[["render",Qle]])},data(){return{showMenu:!1}},computed:{isMenu(){return Bi.value||null},header(){var t,e;return((t=it.value)==null?void 0:t.header)===!1?!1:((e=it.value)==null?void 0:e.header)||"admin-header"}}},tce={class:"admin-wrapper"},nce={class:"flex flex-col w-full"};function rce(t,e,n,r,i,s){const a=d.resolveComponent("navbar"),o=d.resolveComponent("router-view");return d.openBlock(),d.createElementBlock("div",tce,[d.createVNode(a),i.showMenu?(d.openBlock(),d.createElementBlock("div",{key:0,onClick:e[0]||(e[0]=p=>i.showMenu=!1),class:"z-[10] lg:hidden transition duration fixed inset-0 bg-gray-900 bg-opacity-50 dark:bg-opacity-80 dark:bg-neutral-900"})):d.createCommentVNode("",!0),d.createElementVNode("div",nce,[s.isMenu?(d.openBlock(),d.createElementBlock(d.Fragment,{key:0},[s.header?(d.openBlock(),d.createBlock(d.resolveDynamicComponent(s.header),{key:0})):d.createCommentVNode("",!0),d.createVNode(o)],64)):d.createCommentVNode("",!0)])])}const ice=Object.freeze(Object.defineProperty({__proto__:null,default:Fe(ece,[["render",rce],["__scopeId","data-v-804a7309"]])},Symbol.toStringTag,{value:"Module"})),sce={data(){return{currentSort:""}},props:{data:{type:Object,default:()=>null},activeColumn:{type:String}},mounted(){this.$emit("update-ref",this.$refs.column)},computed:{label(){var t,e;return((t=this.data)==null?void 0:t.ua)||((e=this.data)==null?void 0:e.label)||this.data.title||"null"},selectedSortParam(){var t,e;return(e=(t=this.$route)==null?void 0:t.query)==null?void 0:e.sort},getVisibleIcon(){return this.data.format!=="image"&&this.data.format!=="verify"}},watch:{activeColumn(t){t!==this.data.name&&(this.currentSort="")}},methods:{changeCurrentSort(t){switch(t){case"":return"asc";case"asc":return"desc";case"desc":return"";default:return""}},handleClickSortBtn(t){this.$emit("change-active",this.data.name),this.currentSort=this.changeCurrentSort(t);const e=this.$route.query,{sort:n,...r}=e,i=this.currentSort?`${this.data.name}-${this.currentSort}`:"";this.$router.replace({query:{...r,...i&&{sort:i}}})},isValueEqualToSelected(t){return`${this.data.name}-${t}`===this.selectedSortParam}}},oce={scope:"col",class:"text-start",ref:"column"},ace={class:"w-[24px]"},lce={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 cce(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("th",oce,[s.getVisibleIcon?(d.openBlock(),d.createElementBlock("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:e[0]||(e[0]=a=>s.handleClickSortBtn(i.currentSort))},[d.createTextVNode(d.toDisplayString(s.label)+" ",1),d.createElementVNode("span",ace,[i.currentSort?(d.openBlock(),d.createElementBlock("svg",{key:0,class:d.normalizeClass(["shrink-0 size-3.5",{"rotate-180":i.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"},e[1]||(e[1]=[d.createElementVNode("path",{d:"m5 12 7-7 7 7"},null,-1),d.createElementVNode("path",{d:"M12 19V5"},null,-1)]),2)):d.createCommentVNode("",!0)])])):(d.openBlock(),d.createElementBlock("p",lce,d.toDisplayString(s.label),1))],512)}const dce=Fe(sce,[["render",cce]]),uce={components:{IconMore:Eg,IconDelete:gx,IconEdit:yx},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(t=>typeof t=="object")}},methods:{openConfirm(){this.isDeleteConfirm=!0,document.querySelector("body").click()},async getData(){var t;try{const{data:e}=await Ue.get(`/api/table/${this.table}/${(t=this.item)==null?void 0:t.id}`);this.formValue=e}catch(e){console.error(e)}},doSomethingOnCancel(){this.formVisible=!1},async deleteElement(){var t,e;try{const{data:n}=await Ue.get(`/api/table/${this.table}/${(t=this.item)==null?void 0:t.id}`);await Ue.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:(e=n==null?void 0:n.response)==null?void 0:e.data,type:"error"})}finally{this.isDeleteConfirm=!1}},async customButtonAction(t){var e,n;document.querySelector("body").click(),t!=null&&t.form?(await this.$v3plugin.$form({form:t==null?void 0:t.form,id:(e=this.item)==null?void 0:e.id,api:t==null?void 0:t.api,title:t==null?void 0:t.title}),await this.$emit("update-table")):(await this.$v3plugin.$api({confirm:t==null?void 0:t.confirm,api:t==null?void 0:t.api,method:t==null?void 0:t.method,id:(n=this.item)==null?void 0:n.id,isId:(t==null?void 0:t.isId)||!1}),await this.$emit("update-table"))}}},hce={class:"inline-flex"},fce={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"},pce={class:"flex flex-col items-start"},mce=["onClick"],gce={class:"text-gray-800"},yce={key:1,class:"h-[1px] w-[80%] bg-gray-200 ml-auto mr-auto"},bce={class:"flex justify-end p-[16px] pr-0 gap-x-3"};function _ce(t,e,n,r,i,s){const a=d.resolveComponent("IconMore"),o=d.resolveComponent("IconEdit"),p=d.resolveComponent("router-link"),g=d.resolveComponent("IconDelete"),y=d.resolveComponent("VsPopover"),v=d.resolveComponent("VsConfirm");return d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createElementVNode("div",hce,[d.createVNode(y,{trigger:"click",placement:"bottom-left"},{reference:d.withCtx(()=>[d.createElementVNode("button",fce,[d.createVNode(a,{height:"16",width:"16"})])]),default:d.withCtx(()=>{var w,T,D,N,B;return[d.createElementVNode("div",pce,[(w=n.actions)!=null&&w.includes("edit")&&n.isForm?(d.openBlock(),d.createBlock(p,{key:0,to:`/edit?table=${(D=(T=t.$route)==null?void 0:T.params)==null?void 0:D.catchAll}&id=${(N=n.item)==null?void 0:N.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:d.withCtx(()=>[d.createVNode(o,{color:"#000"}),e[4]||(e[4]=d.createTextVNode(" Редагувати "))]),_:1},8,["to"])):d.createCommentVNode("",!0),(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(s.getCustomActions,(L,U)=>(d.openBlock(),d.createElementBlock("button",{key:U,onClick:Z=>s.customButtonAction(L),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"},[d.createVNode(g,{class:"opacity-0"}),d.createElementVNode("span",gce,d.toDisplayString(L==null?void 0:L.label),1)],8,mce))),128)),n.isForm?(d.openBlock(),d.createElementBlock("div",yce)):d.createCommentVNode("",!0),(B=n.actions)!=null&&B.includes("del")?(d.openBlock(),d.createElementBlock("button",{key:2,onClick:e[0]||(e[0]=d.withModifiers((...L)=>s.openConfirm&&s.openConfirm(...L),["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"},[d.createVNode(g),e[5]||(e[5]=d.createElementVNode("span",{class:"text-gray-800"},"Видалити",-1))])):d.createCommentVNode("",!0)])]}),_:1})]),d.createVNode(v,{visible:i.isDeleteConfirm,"onUpdate:visible":e[3]||(e[3]=w=>i.isDeleteConfirm=w),size:"small",title:"Ви впевнені?"},{default:d.withCtx(()=>[e[6]||(e[6]=d.createElementVNode("p",{class:"mt-1 text-sm text-gray-600 dark:text-neutral-400"}," Ви впевнені, що хочете видалити цей об'єкт? ",-1)),d.createElementVNode("div",bce,[d.createElementVNode("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:e[1]||(e[1]=w=>i.isDeleteConfirm=!1)}," Скасувати "),d.createElementVNode("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:e[2]||(e[2]=(...w)=>s.deleteElement&&s.deleteElement(...w))}," Так, я впевнена(ий) ")])]),_:1},8,["visible"])],64)}const xce=Fe(uce,[["render",_ce]]),vce={},wce={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 kce(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",wce,e[0]||(e[0]=[d.createElementVNode("path",{d:"m3 16 4 4 4-4"},null,-1),d.createElementVNode("path",{d:"M7 20V4"},null,-1),d.createElementVNode("path",{d:"m21 8-4-4-4 4"},null,-1),d.createElementVNode("path",{d:"M17 4v16"},null,-1)]))}const Ece=Fe(vce,[["render",kce]]),Sce={},Cce={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 Tce(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",Cce,e[0]||(e[0]=[d.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),d.createElementVNode("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),d.createElementVNode("path",{d:"M9 12l2 2l4 -4"},null,-1)]))}const Ace={components:{IconExport:Ece,IconChevronDown:xf,IconSuccess:Fe(Sce,[["render",Tce]])},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(t){t||(this.format="",this.cols=[],this.activeAction="",this.isSuccessTemplate=!1)}},computed:{color(){return it.value.buttonColor||"blue"}},methods:{async exportTable(){var t;if(!((t=this.cols)!=null&&t.length)){this.$notify({type:"error",title:"Помилка",message:"Оберіть колонки для експорту!"});return}if(!this.format){this.$notify({type:"error",title:"Помилка",message:"Оберіть формат!"});return}try{const e=await Ue.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 e.data.text(),r=n!=null&&n.includes(";")?null:JSON==null?void 0:JSON.parse(n),i=new Blob([e.data],{type:"application/octet-stream"}),s=window.URL.createObjectURL(i),a=document.createElement("a");if(a.href=s,a.setAttribute("download",`${this.table.split(".")[0]}.${this.format}`),document.body.appendChild(a),typeof r=="string"){this.exportTable();return}a.click(),document.body.removeChild(a),window.URL.revokeObjectURL(s),this.$notify({type:"success",title:"Експорт",message:"Файл успішно експортовано!"}),this.isSuccessTemplate=!0}catch(e){console.log(e),this.$notify({type:"error",title:"Помилка",message:"Не вдалося експортувати файл."})}},selectFormat(t){this.format=t},choceAll(){var t;this.cols=(t=this.columns)==null?void 0:t.map(e=>e==null?void 0:e.name),this.activeAction="choceAll"},clearAll(){this.cols=[],this.activeAction="clearAll"},choceVisible(){var t,e;this.cols=(e=(t=this.columns)==null?void 0:t.filter(n=>(n==null?void 0:n.hidden)!==!0))==null?void 0:e.map(n=>n==null?void 0:n.name),this.activeAction="choceVisible"}}},Mce={key:0,class:"flex flex-col items-center"},Dce={key:1,class:"p-4"},Ice={class:"pb-5 mb-5 border-b border-gray-200 last:pb-0 last:mb-0 last:border-b-0 dark:border-neutral-700"},Pce={class:"flex items-center gap-[10px] -ml-[10px] my-[10px]"},Nce=["onClick"],Rce={key:0,class:"block h-[8px] w-[8px] rounded-full bg-blue-500"},Oce={class:"mt-2 flex row flex-wrap gap-y-[5px] gap-x-[10px]"},Bce={class:"pb-5 mb-5 border-b border-gray-200 last:pb-0 last:mb-0 last:border-b-0 dark:border-neutral-700"},Vce={class:"mt-2 space-y-2"},zce=["id","onChange"],Lce=["for"],Fce={key:0,class:"flex w-full justify-end p-[20px] gap-[6px] border-t"},$ce={key:1,class:"flex w-full justify-end p-[20px] gap-[6px] border-t"};function jce(t,e,n,r,i,s){const a=d.resolveComponent("IconExport"),o=d.resolveComponent("IconSuccess"),p=d.resolveComponent("VsCheckbox"),g=d.resolveComponent("VsDialog");return d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createElementVNode("button",{onClick:e[0]||(e[0]=y=>i.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"},[d.createVNode(a,{height:"16",width:"16"}),e[7]||(e[7]=d.createTextVNode(" Експорт "))]),d.createVNode(g,{visible:i.isOpen,"onUpdate:visible":e[6]||(e[6]=y=>i.isOpen=y),title:"Експорт таблиці",size:"small",closeClickBack:!0},{footer:d.withCtx(()=>[i.isSuccessTemplate?(d.openBlock(),d.createElementBlock("div",Fce,[d.createElementVNode("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:e[2]||(e[2]=y=>i.isOpen=!1)}," Закрити "),d.createElementVNode("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:e[3]||(e[3]=y=>i.isSuccessTemplate=!1)}," Вигрузити ще ")])):(d.openBlock(),d.createElementBlock("div",$ce,[d.createElementVNode("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:e[4]||(e[4]=y=>i.isOpen=!1)}," Скасувати "),d.createElementVNode("button",{type:"button",class:d.normalizeClass(`inline-flex items-center justify-center px-3 py-2 text-sm font-medium text-white align-middle bg-${s.color}-700 rounded-lg shadow-sm text-nowrap gap-x-2 text-start hover:bg-${s.color}-800 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:ring-1 focus:ring-${s.color}-300 dark:focus:ring-${s.color}-500`),onClick:e[5]||(e[5]=(...y)=>s.exportTable&&s.exportTable(...y))}," Завантажити таблицю ",2)]))]),default:d.withCtx(()=>[i.isSuccessTemplate?(d.openBlock(),d.createElementBlock("div",Mce,[d.createVNode(o,{height:"100",width:"100",class:"text-green-200 mb-[20px]"}),e[8]||(e[8]=d.createElementVNode("h2",null,"Звіт сформовано і збережено",-1))])):(d.openBlock(),d.createElementBlock("div",Dce,[d.createElementVNode("div",Ice,[e[9]||(e[9]=d.createElementVNode("h2",{class:"text-sm font-[600] text-gray-500"}," Виберіть стовпці таблиці для експорту: ",-1)),d.createElementVNode("div",Pce,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(i.actions,y=>(d.openBlock(),d.createElementBlock("button",{key:y==null?void 0:y.name,onClick:y==null?void 0:y.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"},[d.createElementVNode("span",{class:d.normalizeClass(["h-[14px] w-[14px] border rounded-full flex items-center justify-center",{"border-blue-500":(y==null?void 0:y.name)===i.activeAction}])},[(y==null?void 0:y.name)===i.activeAction?(d.openBlock(),d.createElementBlock("span",Rce)):d.createCommentVNode("",!0)],2),d.createTextVNode(" "+d.toDisplayString(y==null?void 0:y.label),1)],8,Nce))),128))]),d.createElementVNode("div",Oce,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(n.columns,(y,v)=>(d.openBlock(),d.createElementBlock("div",{class:"flex items-center",key:v,style:{width:"calc((100% - 10px) / 2)"}},[d.createVNode(p,{class:"[&>label]:text-sm [&>label]:text-gray-800 [&>label]:ms-3 !gap-x-[1px] !p-0",modelValue:i.cols,"onUpdate:modelValue":e[1]||(e[1]=w=>i.cols=w),value:y==null?void 0:y.name,label:y==null?void 0:y.ua},null,8,["modelValue","value","label"])]))),128))])]),d.createElementVNode("div",Bce,[e[10]||(e[10]=d.createElementVNode("h2",{class:"text-sm font-[600] text-gray-500"}," Виберіть формат таблиці: ",-1)),d.createElementVNode("div",Vce,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(i.tableFormats,(y,v)=>(d.openBlock(),d.createElementBlock("div",{class:"flex items-center",key:v},[d.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:y,onChange:w=>s.selectFormat(y)},null,40,zce),d.createElementVNode("label",{for:y,class:"text-sm text-gray-800 ms-3 dark:text-neutral-400"}," Формат "+d.toDisplayString(y),9,Lce)]))),128))])])]))]),_:1},8,["visible"])],64)}const Hce=Fe(Ace,[["render",jce]]),Uce={},Wce={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"};function qce(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",Wce,e[0]||(e[0]=[d.createStaticVNode('<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>',9)]))}const Gce=Fe(Uce,[["render",qce]]),Yce={props:{column:Object},emits:["update-column"],components:{IconCheck2:cd},data(){return{value:!1}},watch:{value(t){this.$emit("update-column",{...this.column,hidden:!t})}},computed:{color(){return it.value.buttonColor||"blue"}},mounted(){var t;((t=this.column)==null?void 0:t.hidden)!==!0&&(this.value=!0)}},Zce={class:"flex justify-between items-center py-1.5 px-3 cursor-pointer rounded-lg hover:bg-gray-100 has-[:disabled]:opacity-50 has-[:disabled]:pointer-events-none dark:hover:bg-neutral-800"},Xce={class:"flex justify-between flex-1 items-center gap-x-2.5 cursor-pointer text-[13px] text-gray-800 dark:text-neutral-300"};function Kce(t,e,n,r,i,s){var o,p;const a=d.resolveComponent("IconCheck2");return d.openBlock(),d.createElementBlock("div",Zce,[d.createElementVNode("label",Xce,[d.createTextVNode(d.toDisplayString(((o=n.column)==null?void 0:o.ua)||((p=n.column)==null?void 0:p.title))+" ",1),d.withDirectives(d.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":e[0]||(e[0]=g=>i.value=g),class:"hidden"},null,512),[[d.vModelCheckbox,i.value]]),d.createElementVNode("span",{class:d.normalizeClass(["flex items-center justify-center text-white border border-gray-300 rounded shrink-0 size-4 focus:ring-blue-500",[i.value?"bg-"+s.color+"-600 border-0":"bg-white"]])},[d.createVNode(a,{height:"12",width:"12"})],2)])])}const Jce={components:{IconColumns:Gce,AdminTableColumnsHiddenItem:Fe(Yce,[["render",Kce]])},emits:["update-columns"],props:{columns:Array},data(){return{searchValue:"",visible:!1}},computed:{filteredColumn(){var t;return(t=this.columns)==null?void 0:t.filter(e=>{var n,r,i,s,a,o;return((i=(n=e==null?void 0:e.ua)==null?void 0:n.toLowerCase())==null?void 0:i.includes((r=this.searchValue)==null?void 0:r.toLowerCase()))||((o=(s=e==null?void 0:e.title)==null?void 0:s.toLowerCase())==null?void 0:o.includes((a=this.searchValue)==null?void 0:a.toLowerCase()))})}},methods:{toggleVisible(){this.visible=!this.visible,this.visible?document.addEventListener("click",this.handleClickOutside):document.removeEventListener("click",this.handleClickOutside)},handleClickOutside(t){const e=this.$refs.wrapper;e&&!e.contains(t.target)&&(this.visible=!1,document.removeEventListener("click",this.handleClickOutside))},updateColumn(t){const e=this.columns.findIndex(r=>(r==null?void 0:r.name)===(t==null?void 0:t.name)),n=this.columns;n[e]=t,this.$emit("update-columns",[...n])}},beforeUnmount(){document.removeEventListener("click",this.handleClickOutside)}},Qce={class:"relative",ref:"wrapper"},ede={key:0,class:"absolute left-[50%] top-[110%] translate-x-[-50%] z-10 w-64 transition-[opacity,margin] duration bg-white rounded-xl shadow-lg dark:bg-neutral-900"},tde={class:"relative p-1 border-gray-200 border-y dark:border-neutral-800"},nde={class:"p-1 pt-3 max-h-80 overflow-y-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},rde={key:0,class:"block px-3 mb-2 text-xs text-gray-500 dark:text-neutral-500"},ide={class:"space-y-1"},sde={key:1,class:"flex items-center px-3 text-[13px] py-1.5 px-3 rounded-md cursor-pointer group"};function ode(t,e,n,r,i,s){const a=d.resolveComponent("IconColumns"),o=d.resolveComponent("AdminTableColumnsHiddenItem");return d.openBlock(),d.createElementBlock("div",Qce,[d.createElementVNode("button",{onClick:e[0]||(e[0]=(...p)=>s.toggleVisible&&s.toggleVisible(...p)),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"},[d.createVNode(a,{height:"20",width:"16"})]),d.createVNode(d.Transition,{name:"fade"},{default:d.withCtx(()=>{var p,g;return[i.visible?(d.openBlock(),d.createElementBlock("div",ede,[e[2]||(e[2]=d.createElementVNode("div",{class:"flex items-center justify-between h-[48px] px-4 py-2 gap-x-2 text-sm font-medium text-gray-800"}," Колонки ",-1)),d.createElementVNode("div",tde,[d.withDirectives(d.createElementVNode("input",{"onUpdate:modelValue":e[1]||(e[1]=y=>i.searchValue=y),type:"text",class:"py-1.5 px-3 block w-full border-transparent rounded-lg sm:text-sm text-base placeholder:text-gray-500 hover:bg-gray-100 focus:outline-none focus:border-transparent focus:ring-0 focus:bg-gray-100 disabled:opacity-100 disabled:pointer-events-none dark:bg-transparent dark:border-transparent dark:text-neutral-400 dark:placeholder:text-neutral-400 dark:hover:bg-neutral-800 dark:focus:ring-neutral-600 dark:focus:bg-neutral-800",placeholder:"Пошук",autofocus:""},null,512),[[d.vModelText,i.searchValue]])]),d.createElementVNode("div",nde,[(p=s.filteredColumn)!=null&&p.length?(d.openBlock(),d.createElementBlock("span",rde," Оберіть колонки для відображення ")):d.createCommentVNode("",!0),d.createElementVNode("div",ide,[(g=s.filteredColumn)!=null&&g.length?(d.openBlock(!0),d.createElementBlock(d.Fragment,{key:0},d.renderList(s.filteredColumn,(y,v)=>(d.openBlock(),d.createBlock(o,{key:v,column:y,onUpdateColumn:s.updateColumn},null,8,["column","onUpdateColumn"]))),128)):(d.openBlock(),d.createElementBlock("div",sde," Нічого не знайдено "))])])])):d.createCommentVNode("",!0)]}),_:1})],512)}const ade=Fe(Jce,[["render",ode]]),lde={},cde={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 dde(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",cde,e[0]||(e[0]=[d.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),d.createElementVNode("path",{d:"M5 12l14 0"},null,-1)]))}const ude={components:{IconPlus:Xd,IconMinus:Fe(lde,[["render",dde]])},props:{title:String,defaultValue:{type:Boolean,default:()=>!1}},data(){return{expanded:this.defaultValue}}},hde={class:"hs-accordion"},fde={class:"py-0.5 flex items-center gap-x-0.5 w-full"},pde={class:"text-sm font-medium"},mde={class:"relative inline-block w-full duration-150 cursor-pointer before:block before:absolute b"};function gde(t,e,n,r,i,s){const a=d.resolveComponent("IconPlus"),o=d.resolveComponent("IconMinus");return d.openBlock(),d.createElementBlock("div",null,[d.createElementVNode("div",null,[d.createElementVNode("div",hde,[d.createElementVNode("div",fde,[d.createElementVNode("div",{onClick:e[0]||(e[0]=p=>i.expanded=!i.expanded),class:"rounded-md cursor-pointer grow"},[d.createElementVNode("span",pde,d.toDisplayString(n.title),1)]),d.createElementVNode("button",{class:"flex items-center justify-center rounded-md size-6 hover:bg-gray-100",onClick:e[1]||(e[1]=p=>i.expanded=!i.expanded)},[i.expanded?(d.openBlock(),d.createBlock(o,{key:1,width:"14"})):(d.openBlock(),d.createBlock(a,{key:0}))])]),d.createVNode(d.Transition,{name:"fade"},{default:d.withCtx(()=>[d.withDirectives(d.createElementVNode("div",mde,[d.renderSlot(t.$slots,"default",{},void 0,!0)],512),[[d.vShow,i.expanded]])]),_:3})])])])}const yde={components:{AdminComponentIs:sf,AdminTree:Fe(ude,[["render",gde],["__scopeId","data-v-c6318482"]]),VsNoData:Dc,VsWidgetComments:CA,VsWidgetMap:bb,VsWidgetFileList:RE},props:{table:String,columns:Array,row:Object}},bde={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)"}},_de={style:{height:"calc(100vh - 360px)"},class:"pl-2"},xde={class:"flow-root mt-[10px]"},vde={class:"divide-y divide-gray-100 text-[12px]"},wde={class:"grid grid-cols-1 gap-1 py-3 even:bg-gray-50 sm:grid-cols-3 sm:gap-4"},kde={class:"font-medium text-gray-900"},Ede={class:"text-gray-700 sm:col-span-2"};function Sde(t,e,n,r,i,s){var g,y,v,w;const a=d.resolveComponent("AdminComponentIs"),o=d.resolveComponent("VsWidgetFileList"),p=d.resolveComponent("VsNoData");return d.openBlock(),d.createElementBlock("div",bde,[e[0]||(e[0]=d.createElementVNode("div",{class:"pl-[10px] py-[9px]"},[d.createElementVNode("h2",{class:"text-sm font-medium text-center"},"Інформація про об'єкт")],-1)),d.createElementVNode("div",_de,[(y=(g=t.$route)==null?void 0:g.query)!=null&&y.card?(d.openBlock(),d.createElementBlock(d.Fragment,{key:0},[d.createElementVNode("div",xde,[d.createElementVNode("dl",vde,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(n.columns,T=>(d.openBlock(),d.createElementBlock("div",wde,[d.createElementVNode("dt",kde,d.toDisplayString((T==null?void 0:T.ua)||(T==null?void 0:T.title)),1),d.createElementVNode("dd",Ede,[d.createVNode(a,{row:n.row,column:T,table:n.table},null,8,["row","column","table"])])]))),256))])]),(d.openBlock(),d.createBlock(o,{key:(v=n.row)==null?void 0:v.id,id:(w=n.row)==null?void 0:w.id,class:"mt-10"},null,8,["id"]))],64)):(d.openBlock(),d.createBlock(p,{key:1,text:"Оберіть один з об'єктів в таблиці для відображення інформаціі про нього"}))])])}const Cde=Fe(yde,[["render",Sde]]),Tde={emits:["filterChange"],props:{scheme:{type:Object},onFilters:{type:Number},table:{type:String}},components:{IconFilter:MA},data(){return{isFilters:!1}},methods:{closeFilter({target:t}){this.isFilters&&t.classList.contains("filter-container")&&(this.isFilters=!1)}}},Ade={key:0,class:"px-[7px] text-[10px] py-[1px] font-[700] text-white bg-blue-500 rounded-full"},Mde={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 Dde(t,e,n,r,i,s){const a=d.resolveComponent("IconFilter"),o=d.resolveComponent("VsFilter");return d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createElementVNode("button",{onClick:e[0]||(e[0]=p=>i.isFilters=!i.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"},[d.createVNode(a,{height:"16",width:"16"}),e[4]||(e[4]=d.createTextVNode(" Фільтри ")),n.onFilters?(d.openBlock(),d.createElementBlock("span",Ade,d.toDisplayString(n.onFilters),1)):d.createCommentVNode("",!0)]),d.createVNode(d.Transition,{name:"fade"},{default:d.withCtx(()=>{var p;return[(d.openBlock(),d.createBlock(d.Teleport,{to:"#modal"},[d.withDirectives(d.createElementVNode("div",{onClick:e[3]||(e[3]=(...g)=>s.closeFilter&&s.closeFilter(...g)),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)]"},[d.createElementVNode("div",Mde,[(p=n.scheme)!=null&&p.length?(d.openBlock(),d.createBlock(o,{key:0,ref:"filter",scheme:n.scheme,layout:"default","apply-vue-router":"",history:"",token:n.table,name:"filter",footer:!0,background:!0,onFilterChange:e[1]||(e[1]=g=>t.$emit("filterChange",g)),closeFilterBtn:!0,onFilterClose:e[2]||(e[2]=g=>i.isFilters=!1)},null,8,["scheme","token"])):d.createCommentVNode("",!0)])],512),[[d.vShow,i.isFilters]])]))]}),_:1})],64)}const Ide=Fe(Tde,[["render",Dde]]),Pde={props:{tabsList:{type:Array,default:()=>[]},filterState:String}},Nde={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"},Rde=["onClick"];function Ode(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("nav",Nde,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(n.tabsList,a=>(d.openBlock(),d.createElementBlock("button",{onClick:o=>t.$emit("update:filterState",a==null?void 0:a.name),class:d.normalizeClass(["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":(a==null?void 0:a.name)===n.filterState}])},d.toDisplayString(a==null?void 0:a.label),11,Rde))),256))])}const Bde=Fe(Pde,[["render",Ode]]),Vde={},zde={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 Lde(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",zde,e[0]||(e[0]=[d.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),d.createElementVNode("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 Fde={components:{IconFilter2:Fe(Vde,[["render",Lde]]),IconCheck2:cd},props:{filterCustom:String,customList:Array}},$de={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"},jde={class:"flex flex-col p-[2px] gap-[2px] w-[170px]"},Hde=["onClick"],Ude={class:"text-sm text-gray-800"};function Wde(t,e,n,r,i,s){const a=d.resolveComponent("IconFilter2"),o=d.resolveComponent("IconCheck2"),p=d.resolveComponent("VsPopover");return d.openBlock(),d.createBlock(p,{ref:"popover",placement:"bottom"},{reference:d.withCtx(()=>[d.createElementVNode("button",$de,[d.createVNode(a,{height:"20",width:"20"})])]),default:d.withCtx(()=>[d.createElementVNode("div",jde,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(n.customList,(g,y)=>(d.openBlock(),d.createElementBlock("button",{onClick:v=>{var w;t.$emit("update:filterCustom",g==null?void 0:g.name),(w=t.$refs)==null||w.popover.togglePopover()},key:y,class:d.normalizeClass(["flex items-center px-3 py-1 rounded-md cursor-pointer group hover:bg-gray-100",{"bg-gray-100":n.filterCustom===(g==null?void 0:g.name)}])},[d.createElementVNode("span",Ude,d.toDisplayString(g==null?void 0:g.label),1),n.filterCustom===(g==null?void 0:g.name)?(d.openBlock(),d.createBlock(o,{key:0,class:"ml-auto size-3 shrink-0"})):d.createCommentVNode("",!0)],10,Hde))),128)),d.createElementVNode("button",{class:"flex items-center px-3 py-1 rounded-md cursor-pointer group hover:bg-gray-100",onClick:e[0]||(e[0]=g=>{var y;t.$emit("update:filterCustom",void 0),(y=t.$refs)==null||y.popover.togglePopover()})}," Скинути фільтри ")])]),_:1},512)}const qde=Fe(Fde,[["render",Wde]]),Gde={class:"flex items-center gap-x-2"},Yde={__name:"admin-table-custom-buttons",props:{slots:Object,data:Object},setup(t){var o,p,g,y,v;const{asyncTemplateSlot:e}=(v=(y=(g=(p=(o=d.getCurrentInstance())==null?void 0:o.appContext)==null?void 0:p.app)==null?void 0:g.config)==null?void 0:y.globalProperties)==null?void 0:v.utils,n=d.ref(""),r=d.ref(""),i=t,s=()=>{var w,T,D,N,B;if((w=i.slots)!=null&&w.panelLeft||(r.value="div"),(D=(T=i.slots)==null?void 0:T.panelLeft)!=null&&D.includes("<")){const L=e("PanelLeft",(N=i.slots)==null?void 0:N.panelLeft,["name"]);r.value=L}else r.value=(B=i.slots)==null?void 0:B.panelLeft},a=()=>{var w,T,D,N,B;if((w=i.slots)!=null&&w.panelRight||(n.value="div"),(D=(T=i.slots)==null?void 0:T.panelRight)!=null&&D.includes("<")){const L=e("PanelRight",(N=i.slots)==null?void 0:N.panelRight,["name"]);n.value=L}else n.value=(B=i.slots)==null?void 0:B.panelRight};return s(),a(),(w,T)=>(d.openBlock(),d.createElementBlock("div",Gde,[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(r.value),{data:t.data},null,8,["data"])),(d.openBlock(),d.createBlock(d.resolveDynamicComponent(n.value),{data:t.data},null,8,["data"]))]))}},Zde={__name:"admin-custom-button-add",props:{slots:Object},setup(t){var s,a,o,p,g;const{asyncTemplateSlot:e}=(g=(p=(o=(a=(s=d.getCurrentInstance())==null?void 0:s.appContext)==null?void 0:a.app)==null?void 0:o.config)==null?void 0:p.globalProperties)==null?void 0:g.utils,n=d.ref(""),r=t;return(()=>{var y,v,w,T,D;if((y=r.slots)!=null&&y.addButton||(n.value="div"),(w=(v=r.slots)==null?void 0:v.addButton)!=null&&w.includes("<")){const N=e("addButton",(T=r.slots)==null?void 0:T.addButton,["IconPlus"]);n.value=N}else n.value=(D=r.slots)==null?void 0:D.addButton})(),(y,v)=>n.value?(d.openBlock(),d.createBlock(d.resolveDynamicComponent(n.value),{key:0,IconPlus:Xd})):d.createCommentVNode("",!0)}},Xde={key:0,class:"px-1 py-3 text-gray-800 font-[500]"},Kde={key:1,class:"px-1 py-3 text-gray-800 font-[700]"},Jde={__name:"admin-table-totals-list",props:{columns:{type:Array,default:()=>[]},agg:{type:Object,default:()=>{}}},setup(t){return(e,n)=>(d.openBlock(),d.createElementBlock("tr",null,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(t.columns,r=>{var i;return d.openBlock(),d.createElementBlock(d.Fragment,{key:r==null?void 0:r.name},[(i=t.agg)!=null&&i[r==null?void 0:r.name]?(d.openBlock(),d.createElementBlock("td",Xde,[d.createVNode(sf,{column:r,row:t.agg},null,8,["column","row"])])):(d.openBlock(),d.createElementBlock("td",Kde))],64)}),128))]))}},Qde={},eue={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 tue(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",eue,e[0]||(e[0]=[d.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),d.createElementVNode("path",{d:"M5 12l5 5l10 -10"},null,-1)]))}const nue=Fe(Qde,[["render",tue]]),rue=d.defineComponent({components:{IconChevronDown:cy,IconCheck:nue},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(t){this.page=t,this.updatePages(t)}},pageSizeLocal(t,e){e&&(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(t){const e=t.replace(/\D/g,"");if(e>this.pagesCount){this.$refs.currentPage.innerText=this.page;return}else this.$refs.currentPage.innerText=e;this.setCurrentPage(e)},updatePages(t){const e=Math.floor(this.maxPages/2);let n=Math.max(t-e,1),r=n+this.maxPages-1;r>this.pagesCount&&(r=this.pagesCount,n=Math.max(r-this.maxPages+1,1)),this.pages=Array.from({length:r-n+1},(i,s)=>n+s)},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(t){this.page=t,this.$emit("pageChange",this.page,this.pageSizeLocal),this.updatePages(t)},keydownEnter(t){t.preventDefault(),t.target.blur()}}}),iue={class:"flex items-center w-full"},sue={class:"flex items-center mx-[8px]"},oue={class:"min-h-[38px] flex justify-center items-center text-stone-500 py-2 px-1.5 text-sm"},aue={key:0,class:"flex items-center justify-center ml-3 gap-x-5"},lue={class:"relative"},cue={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%]"},due=["onClick"];function uue(t,e,n,r,i,s){const a=d.resolveComponent("IconChevronDown"),o=d.resolveComponent("IconCheck");return d.openBlock(),d.createElementBlock("nav",iue,[d.createElementVNode("button",{type:"button",onClick:e[0]||(e[0]=(...p)=>t.handleClickPrev&&t.handleClickPrev(...p)),class:d.normalizeClass(["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":t.disablePrevClick}])},[d.createVNode(a,{height:"16",width:"16",class:"rotate-90"})],2),d.createElementVNode("div",sue,[d.createElementVNode("span",{ref:"currentPage",contenteditable:"true",onKeydown:e[1]||(e[1]=d.withKeys((...p)=>t.keydownEnter&&t.keydownEnter(...p),["enter"])),onBlur:e[2]||(e[2]=p=>t.handleSetPage(p.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"},d.toDisplayString(t.page),545),e[5]||(e[5]=d.createElementVNode("span",{class:"min-h-[38px] flex justify-center items-center text-stone-500 py-2 px-1.5 text-sm"},"з",-1)),d.createElementVNode("span",oue,d.toDisplayString(t.pagesCount),1)]),d.createElementVNode("button",{type:"button",onClick:e[3]||(e[3]=(...p)=>t.handleClickNext&&t.handleClickNext(...p)),class:d.normalizeClass([{"opacity-50 pointer-events-none":t.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"])},[d.createVNode(a,{height:"16",width:"16",class:"-rotate-90"})],2),t.pageSizes.length?(d.openBlock(),d.createElementBlock("div",aue,[d.createElementVNode("div",lue,[d.withDirectives(d.createElementVNode("div",cue,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(t.pageSizes,p=>(d.openBlock(),d.createElementBlock("button",{type:"button",class:"w-full flex items-center gap-x-3.5 py-2 px-3 rounded-lg text-sm",onClick:g=>t.pageSizeLocal=p},[d.createTextVNode(d.toDisplayString(p)+" ",1),p===t.pageSizeLocal?(d.openBlock(),d.createBlock(o,{key:0,width:"14",height:"14",class:"text-blue-600"})):d.createCommentVNode("",!0)],8,due))),256))],512),[[d.vShow,t.isDropdownOpen]]),t.pageSizes.length?(d.openBlock(),d.createElementBlock("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:e[4]||(e[4]=p=>t.isDropdownOpen=!t.isDropdownOpen)},[d.createTextVNode(d.toDisplayString(t.pageSizeLocal)+" ",1),d.createVNode(a,{height:"16",width:"16"})])):d.createCommentVNode("",!0)])])):d.createCommentVNode("",!0)])}const hue={props:{table:String,title:String,search:String},components:{AdminTableControl:xce,AdminTableExport:Hce,AdminTableColumnsHidden:ade,AdminTableColumn:dce,AdminNodata:bx,IconPlus:Xd,IconSearch:ly,AdminTableCardInfo:Cde,IconOpenCard:EI,AdminComponentIs:sf,AdminTableFilters:Ide,AdminTableTabs:Bde,AdminTableCustomFilters:qde,AdminTableCustomButtons:Yde,AdminCustomButtonAdd:Zde,AdminTableTotalsList:Jde,AdminTablePagination:Fe(rue,[["render",uue]])},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 it.value.buttonColor||"blue"},fontSize(){return`text-[${it.value.fontSize||13}px]`},defaultPage(){var t,e;return((e=(t=this.$route)==null?void 0:t.query)==null?void 0:e.page)||1},columns(){var t,e;return(e=(t=this.tableData)==null?void 0:t.columns)==null?void 0:e.filter(n=>(n==null?void 0:n.hidden)!==!0)},isForm(){var t,e,n,r,i;return((t=this.tableData)==null?void 0:t.form)&&(((n=(e=this.tableData)==null?void 0:e.actions)==null?void 0:n.includes("add"))||((i=(r=this.tableData)==null?void 0:r.actions)==null?void 0:i.includes("edit")))},isNoData(){var t,e;return!((t=this.tableData)!=null&&t.rows)||!((e=this.columns)!=null&&e.length)},activeCardRow(){var t,e;return((e=(t=this.tableData)==null?void 0:t.rows)==null?void 0:e.find(n=>{var r,i;return(n==null?void 0:n.id)===((i=(r=this.$route)==null?void 0:r.query)==null?void 0:i.card)}))||{}},getActions(){var t;return(t=this.tableData)==null?void 0:t.actions}},watch:{async table(){this.tableData=null,this.columnsWidth={},await this.getTableData()},searchValue:{handler:Ov(async function(t){var e;this.page=1,await this.getTableData(),this.$router.push({...this.$route,query:{...(e=this.$route)==null?void 0:e.query,search:t||void 0,page:1}})},500)},$route:{async handler(t,e){var n,r;((n=t==null?void 0:t.params)==null?void 0:n.catchAll)!==((r=e==null?void 0:e.params)==null?void 0:r.catchAll)&&(this.visibleColumns=[],this.unmountedData(),this.getFilters(),await this.getTableData())},deep:!0},limit(t){var e;this.$router.replace({...this.$route,query:{...(e=this.$route)==null?void 0:e.query,limit:t}})},filterState(t){var e;t&&(this.$router.replace({...this.$route,query:{...(e=this.$route)==null?void 0:e.query,state:t}}),this.getTableData())},filterCustom(t){var e;this.$router.replace({...this.$route,query:{...(e=this.$route)==null?void 0:e.query,custom:t}}),this.getTableData()},columns(t){var e,n,r,i;this.visibleColumns=t==null?void 0:t.map(s=>s==null?void 0:s.name),this.initialHiddenColumns===((e=this.visibleColumns)==null?void 0:e.join(","))&&(this.visibleColumns=[]),this.$router.replace({...this.$route,query:{...(n=this.$route)==null?void 0:n.query,columns:(r=this.visibleColumns)!=null&&r.length?(i=this.visibleColumns)==null?void 0:i.join(","):void 0}})}},methods:{async checkUrlMounted(){var t,e,n,r,i,s,a,o,p,g,y,v,w,T,D,N,B,L,U,Z,Y;this.page=((e=(t=this.$route)==null?void 0:t.query)==null?void 0:e.page)||1,this.limit=((r=(n=this.$route)==null?void 0:n.query)==null?void 0:r.limit)||20,(s=(i=this.$route)==null?void 0:i.query)!=null&&s.filter&&(this.filters=((p=decodeURI((o=(a=this.$route)==null?void 0:a.query)==null?void 0:o.filter))==null?void 0:p.replaceAll("+"," "))||null),this.filters&&(this.onFilters=((y=(g=this.filters)==null?void 0:g.split("="))==null?void 0:y.length)-1),this.filterState=((w=(v=this.$route)==null?void 0:v.query)==null?void 0:w.state)||null,this.filterCustom=((D=(T=this.$route)==null?void 0:T.query)==null?void 0:D.custom)||null,this.searchValue=((B=(N=this.$route)==null?void 0:N.query)==null?void 0:B.search)||"",this.visibleColumns=((Z=(U=(L=this.$route)==null?void 0:L.query)==null?void 0:U.columns)==null?void 0:Z.split(","))||[],(Y=this.$route)!=null&&Y.query.card&&(this.isVisibleCardInfo=!0)},rowWidth(t){var n,r;const e=(r=(n=this.tableData)==null?void 0:n.columns)==null?void 0:r.find(i=>i.name===t);if(e){const i=e==null?void 0:e.width;return typeof i=="number"?`${i}px`:i!=null&&i.includes("px")?i:`${i}px`}},unmountedData(){this.page=1,this.visibleColumns=[],this.filterCustom=null,this.filterState=null,this.isVisibleCardInfo=!1,this.filterScheme=null,this.filters=null,this.onFilters=0,this.searchValue=""},async getTableData(){var t,e,n,r,i,s,a,o,p,g,y;try{const{data:v}=await Ue.get(`/api/template/table/${this.table}`),w=await Ue.get(`/api/table-data/${this.table}`,{params:{page:this.page,search:this.searchValue||null,limit:this.limit,filter:this.filters||null,order:((e=(t=this.$route)==null?void 0:t.query)==null?void 0:e.sort)||null,state:this.filterState||null,custom:this.filterCustom||null}});this.tableData={...v,...(w==null?void 0:w.data)||{}},this.initialHiddenColumns=(s=(i=(r=(n=this.tableData)==null?void 0:n.columns)==null?void 0:r.filter(T=>(T==null?void 0:T.hidden)!==!0))==null?void 0:i.map(T=>T==null?void 0:T.name))==null?void 0:s.join(","),(a=this.visibleColumns)!=null&&a.length?(o=this.tableData)==null||o.columns.forEach(T=>{var D;(D=this.visibleColumns)!=null&&D.includes(T==null?void 0:T.name)?T.hidden=!1:T.hidden=!0}):this.visibleColumns=(y=(g=(p=this.tableData)==null?void 0:p.columns)==null?void 0:g.filter(T=>(T==null?void 0:T.hidden)!==!0))==null?void 0:y.map(T=>T==null?void 0:T.name),setTimeout(()=>{var T,D;(D=(T=this.tableData)==null?void 0:T.columns)==null||D.forEach(({name:N})=>{var B,L,U,Z,Y,ue;(L=(B=this.columnsWidth)==null?void 0:B[N])!=null&&L.ref&&(this.columnsWidth[N].width=parseInt((ue=(Y=(Z=(U=this.columnsWidth)==null?void 0:U[N])==null?void 0:Z.ref)==null?void 0:Y.getBoundingClientRect())==null?void 0:ue.width)+"px")})})}catch{}},async getFilters(){var t;try{const{data:e}=await Ue.get(`/api/table-filter/${this.table}`);this.filterScheme=(t=e==null?void 0:e.list)==null?void 0:t.map(n=>({...n,label:(n==null?void 0:n.label)||(n==null?void 0:n.ua)}))}catch{}},async handlePageChange(t,e){const n=this.$route.query;this.page=t,this.limit=e,await this.$router.replace({query:{...n,page:t,limit:e}}),await this.getTableData()},async filterChange({url:t,state:e}){var n;this.filters=t!=="no-url"?t:null,this.onFilters=(n=Object.entries(e))==null?void 0:n.length,this.page=1,await this.getTableData()},changeActiveColumn(t){this.activeColumn=t,this.getTableData()},pushToCard(t){var e;((e=this.tableData)==null?void 0:e.card)===!1||this.$router.push(`/card/${this.table}/${t}`)},pushToLinkCard(t,e){t!=null&&t.link&&this.$router.push(`/card/${t==null?void 0:t.link}/${e==null?void 0:e[t==null?void 0:t.name]}`)},changeActiveCardInfo(t){var e;this.isVisibleCardInfo&&this.$router.push({...this.$route,query:{...(e=this.$route)==null?void 0:e.query,card:t}})},toggleCardInfo(){var t;this.isVisibleCardInfo=!this.isVisibleCardInfo,this.isVisibleCardInfo||this.$router.push({...this.$route,query:{...(t=this.$route)==null?void 0:t.query,card:void 0}})},getCustomStyles(t){return[t!=null&&t.link?" text-blue-800 hover:underline decoration-1":"",t!=null&&t.align?` text-${(t==null?void 0:t.align)||"left"}`:"",`text-${(t==null?void 0:t.wrap)||"wrap"}`]}}},fue={class:"w-[calc(100vw - 320px)] bg-gray-100"},pue={class:"h-[76px] mt-[15px] flex items-center justify-between mx-[20px] px-[20px] bg-white rounded-xl"},mue={class:"text-lg font-semibold text-gray-800 dark:text-neutral-200"},gue={class:"bg-white w-full rounded-xl p-[20px] pr-0"},yue={class:"flex"},bue={class:"flex gap-[6px] ml-auto"},_ue={class:"inline-block w-full align-middle"},xue={class:"sticky top-[-1px] z-[2] bg-white w-full after:absolute after:content-[''] after:block after:w-full after:h-px after:bg-stone-200"},vue={class:"right-0"},wue={key:0,class:"w-[70px] sticky right-0 top-0"},kue={class:"divide-y divide-gray-200 z-[1] relative text-gray-600"},Eue=["onClick"],Sue=["onClick"],Cue=["onClick"],Tue={class:"flex items-center justify-start w-full px-1 py-2"},Aue={class:"w-[200px] md:inline-flex hidden"},Mue={class:"text-sm text-gray-600 dark:text-neutral-400"},Due={class:"font-semibold text-gray-800 dark:text-neutral-200"},Iue={key:0};function Pue(t,e,n,r,i,s){var ke,Re,ze,$e,qe,fe,ft,Mt,Dt,Bt,qt,Xt,Zt,on,En,_n,gn,xn,De,Xe,Qe,pt,Gt,un,zt,Vt,yn,Ae,In,Vi,nn,bn,Vr;const a=d.resolveComponent("AdminCustomButtonAdd"),o=d.resolveComponent("IconPlus"),p=d.resolveComponent("router-link"),g=d.resolveComponent("AdminTableTabs"),y=d.resolveComponent("IconSearch"),v=d.resolveComponent("VsText"),w=d.resolveComponent("AdminTableCustomButtons"),T=d.resolveComponent("AdminTableCustomFilters"),D=d.resolveComponent("AdminTableColumnsHidden"),N=d.resolveComponent("AdminTableExport"),B=d.resolveComponent("AdminTableFilters"),L=d.resolveComponent("IconOpenCard"),U=d.resolveComponent("AdminTableColumn"),Z=d.resolveComponent("AdminComponentIs"),Y=d.resolveComponent("AdminTableControl"),ue=d.resolveComponent("AdminTableTotalsList"),pe=d.resolveComponent("AdminNodata"),ye=d.resolveComponent("AdminTablePagination"),Me=d.resolveComponent("AdminTableCardInfo");return d.openBlock(),d.createElementBlock("div",fue,[d.createElementVNode("div",pue,[d.createElementVNode("h2",mue,d.toDisplayString(n.title),1),s.isForm?(d.openBlock(),d.createElementBlock(d.Fragment,{key:0},[(Re=(ke=i.tableData)==null?void 0:ke.slots)!=null&&Re.addButton?(d.openBlock(),d.createBlock(a,{key:0,slots:(ze=i.tableData)==null?void 0:ze.slots},null,8,["slots"])):(d.openBlock(),d.createBlock(p,{key:1,to:`/add?table=${(qe=($e=t.$route)==null?void 0:$e.params)==null?void 0:qe.catchAll}`,class:d.normalizeClass(`inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-${s.color}-700 border border-transparent rounded-lg gap-x-2 hover:bg-${s.color}-800 hover:text-white`)},{default:d.withCtx(()=>[d.createVNode(o,{height:"16",width:"16"}),e[5]||(e[5]=d.createTextVNode(" Додати "))]),_:1},8,["to","class"]))],64)):d.createCommentVNode("",!0)]),d.createElementVNode("div",{style:d.normalizeStyle({height:((fe=t.$adminSettings)==null?void 0:fe.header)===!1?"calc(100vh - 91px)":"calc(100vh - 155px)"}),class:"bg-gray-100 p-[20px] flex pt-[10px] lg:w-[calc(100vw-260px)] w-[100vw]"},[d.createElementVNode("div",gue,[(Mt=(ft=i.tableData)==null?void 0:ft.filterState)!=null&&Mt.length?(d.openBlock(),d.createBlock(g,{key:0,tabsList:(Dt=i.tableData)==null?void 0:Dt.filterState,filterState:i.filterState,"onUpdate:filterState":e[0]||(e[0]=ut=>i.filterState=ut)},null,8,["tabsList","filterState"])):d.createCommentVNode("",!0),d.createElementVNode("div",yue,[d.createElementVNode("div",{class:d.normalizeClass([i.isVisibleCardInfo?"w-[calc(100%-360px)]":"w-full"])},[d.createElementVNode("div",{class:d.normalizeClass(["flex sm:grid sm:grid-cols-2 gap-x-2 sm:gap-x-5 mb-[10px] relative",{"pr-[20px]":!i.isVisibleCardInfo}])},[d.createVNode(y,{height:"14",width:"14",class:"absolute top-[10px] left-[14px] text-gray-500 z-[1]"}),d.createVNode(v,{modelValue:i.searchValue,"onUpdate:modelValue":e[1]||(e[1]=ut=>i.searchValue=ut),placeholder:n.search||"Пошук...",clearable:!0,class:"[&>input]:py-[7px] [&>input]:max-h-[36px] [&>input]:ps-10 [&>input]:pe-8 [&>input]:block [&>input]:w-full [&>input]:bg-gray-100 [&>input]:border-transparent [&>input]:rounded-lg [&>input]:text-sm [&>input]:focus:bg-white [&>input]:focus:border-blue-500 [&>input]:focus:ring-blue-500 [&>input]:disabled:opacity-50 [&>input]:disabled:pointer-events-none [&>input]:dark:bg-neutral-700 [&>input]:dark:border-transparent [&>input]:dark:text-neutral-400 [&>input]:dark:placeholder:text-neutral-400 dark:focus:bg-neutral-800 dark:focus:ring-neutral-600"},null,8,["modelValue","placeholder"]),d.createElementVNode("div",bue,[(Bt=i.tableData)!=null&&Bt.slots?(d.openBlock(),d.createBlock(w,{key:0,data:i.tableData,slots:(qt=i.tableData)==null?void 0:qt.slots},null,8,["data","slots"])):d.createCommentVNode("",!0),(Zt=(Xt=i.tableData)==null?void 0:Xt.filterCustom)!=null&&Zt.length?(d.openBlock(),d.createBlock(T,{key:1,customList:(on=i.tableData)==null?void 0:on.filterCustom,filterCustom:i.filterCustom,"onUpdate:filterCustom":e[2]||(e[2]=ut=>i.filterCustom=ut)},null,8,["customList","filterCustom"])):d.createCommentVNode("",!0),d.createVNode(D,{columns:(En=i.tableData)==null?void 0:En.columns,onUpdateColumns:e[3]||(e[3]=ut=>i.tableData.columns=ut)},null,8,["columns"]),((_n=i.tableData)==null?void 0:_n.export)!==!1?(d.openBlock(),d.createBlock(N,{key:2,table:n.table,columns:(gn=i.tableData)==null?void 0:gn.columns,page:i.page,"filter-state":i.filterState,"filter-custom":i.filterCustom,filters:i.filters},null,8,["table","columns","page","filter-state","filter-custom","filters"])):d.createCommentVNode("",!0),(xn=i.filterScheme)!=null&&xn.length?(d.openBlock(),d.createBlock(B,{key:3,scheme:i.filterScheme,onFilters:i.onFilters,table:n.table,onFilterChange:s.filterChange},null,8,["scheme","onFilters","table","onFilterChange"])):d.createCommentVNode("",!0),d.createElementVNode("button",{onClick:e[4]||(e[4]=(...ut)=>s.toggleCardInfo&&s.toggleCardInfo(...ut)),class:"py-2 px-2.5 max-h-[34px] 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"},[d.createVNode(L,{class:d.normalizeClass({"rotate-180 duration-300":!i.isVisibleCardInfo})},null,8,["class"])])])],2),d.createElementVNode("div",{class:d.normalizeClass(["flex items-start justify-start w-full space-y-5",{"pr-[20px]":!i.isVisibleCardInfo}])},[d.createElementVNode("div",{style:d.normalizeStyle({height:`calc(100vh - ${((De=t.$adminSettings)==null?void 0:De.header)===!1?(Qe=(Xe=i.tableData)==null?void 0:Xe.filterState)!=null&&Qe.length?330:270:(Gt=(pt=i.tableData)==null?void 0:pt.filterState)!=null&&Gt.length?380:320}px)`}),class:"overflow-x-auto w-full [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},[d.createElementVNode("div",_ue,[s.isNoData?(d.openBlock(),d.createBlock(pe,{key:1})):(d.openBlock(),d.createElementBlock("table",{key:0,class:d.normalizeClass([s.fontSize,"relative min-w-full my-2 divide-y divide-gray-200 table-fixed w-max dark:divide-neutral-700"])},[d.createElementVNode("thead",xue,[d.createElementVNode("tr",vue,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(s.columns,ut=>{var ir,Ir;return d.openBlock(),d.createBlock(U,{key:ut.name,style:d.normalizeStyle({width:((Ir=(ir=i.columnsWidth)==null?void 0:ir[ut==null?void 0:ut.name])==null?void 0:Ir.width)||s.rowWidth(ut==null?void 0:ut.name),textAlign:ut==null?void 0:ut.align,wordBreak:ut==null?void 0:ut.wrap}),data:ut,activeColumn:i.activeColumn,onUpdateRef:hr=>{var Yr,Zr;(Zr=(Yr=i.columnsWidth)==null?void 0:Yr[ut==null?void 0:ut.name])!=null&&Zr.ref||(i.columnsWidth[ut.name]={ref:hr})},onChangeActive:s.changeActiveColumn},null,8,["style","data","activeColumn","onUpdateRef","onChangeActive"])}),128)),(zt=(un=s.getActions)==null?void 0:un.filter(ut=>ut!=="add"&&ut!=="view"))!=null&&zt.length?(d.openBlock(),d.createElementBlock("th",wue)):d.createCommentVNode("",!0)])]),d.createElementVNode("tbody",kue,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList((Vt=i.tableData)==null?void 0:Vt.rows,(ut,ir)=>{var Ir,hr,Yr,Zr,Ge,li,vr,ci,zi,Ke,Te,je,Ct,Kt;return d.openBlock(),d.createElementBlock("tr",{key:(ut==null?void 0:ut.id)||ir,class:d.normalizeClass({"bg-gray-100":((hr=(Ir=t.$route)==null?void 0:Ir.query)==null?void 0:hr.card)===(ut==null?void 0:ut.id),"odd:bg-gray-50":((Zr=(Yr=t.$route)==null?void 0:Yr.query)==null?void 0:Zr.card)!==(ut==null?void 0:ut.id)})},[d.createElementVNode("td",{class:d.normalizeClass(["px-1 py-2.5 pr-5",[(Ge=s.columns[0])!=null&&Ge.align?`text-${((li=s.columns[0])==null?void 0:li.align)||"left"}`:""]]),onClick:Je=>s.changeActiveCardInfo(ut==null?void 0:ut.id)},[d.createElementVNode("button",{onClick:Je=>{s.pushToCard(ut==null?void 0:ut.id),s.pushToLinkCard(s.columns[0],ut)},class:d.normalizeClass(["font-medium text-start",[...s.getCustomStyles(s.columns[0]),((vr=this.tableData)==null?void 0:vr.card)===!1?"":` text-${s.color}-800 decoration-2 focus:outline-none focus:underline hover:text-${s.color}-700 hover:underline`]])},[d.createVNode(Z,{row:ut,column:s.columns[0],table:n.table,onUpdateTable:s.getTableData},null,8,["row","column","table","onUpdateTable"])],10,Sue)],10,Eue),(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList((ci=s.columns)==null?void 0:ci.slice(1),Je=>(d.openBlock(),d.createElementBlock("td",{onClick:Wn=>{s.changeActiveCardInfo(ut==null?void 0:ut.id),s.pushToLinkCard(Je,ut)},class:d.normalizeClass(["px-1 py-2.5 pr-5",s.getCustomStyles(Je)]),key:Je.name},[d.createVNode(Z,{row:ut,column:Je,table:n.table,onUpdateTable:s.getTableData},null,8,["row","column","table","onUpdateTable"])],10,Cue))),128)),(Ke=(zi=s.getActions)==null?void 0:zi.filter(Je=>Je!=="add"&&Je!=="view"))!=null&&Ke.length?(d.openBlock(),d.createElementBlock("td",{key:0,class:d.normalizeClass(["text-center sticky right-0 w-[80px] px-[10px]",{"bg-gray-50":((je=(Te=t.$route)==null?void 0:Te.query)==null?void 0:je.card)===(ut==null?void 0:ut.id)||!(ir%2),"bg-white":((Kt=(Ct=t.$route)==null?void 0:Ct.query)==null?void 0:Kt.card)!==(ut==null?void 0:ut.id)&&ir%2}])},[d.createVNode(Y,{actions:s.getActions,isForm:s.isForm,item:ut,table:n.table,onUpdateTable:s.getTableData},null,8,["actions","isForm","item","table","onUpdateTable"])],2)):d.createCommentVNode("",!0)],2)}),128))]),d.createVNode(ue,{columns:s.columns,agg:(yn=i.tableData)==null?void 0:yn.agg},null,8,["columns","agg"])],2))])],4)],2),d.createElementVNode("div",Tue,[d.createElementVNode("div",Aue,[d.createElementVNode("p",Mue,[d.createElementVNode("span",Due,[d.createTextVNode(" Об'єктів: "+d.toDisplayString(Intl.NumberFormat("ua").format(i.limit<((Ae=i.tableData)==null?void 0:Ae.filtered)?i.limit:(In=i.tableData)==null?void 0:In.filtered))+" ",1),i.limit<((Vi=i.tableData)==null?void 0:Vi.filtered)?(d.openBlock(),d.createElementBlock("span",Iue," з "+d.toDisplayString(Intl.NumberFormat("ua").format(((nn=i.tableData)==null?void 0:nn.filtered)||0)),1)):d.createCommentVNode("",!0)])])]),Math.ceil((bn=i.tableData)==null?void 0:bn.filtered)>10?(d.openBlock(),d.createBlock(ye,{key:0,class:"justify-end mr-10","default-page":parseInt(s.defaultPage),total:((Vr=i.tableData)==null?void 0:Vr.filtered)||0,onPageChange:s.handlePageChange,pageSize:parseInt(i.limit),pageSizes:[10,20,50,100]},null,8,["default-page","total","onPageChange","pageSize"])):d.createCommentVNode("",!0)])],2),d.createVNode(d.Transition,{name:"slide-fade"},{default:d.withCtx(()=>{var ut;return[i.isVisibleCardInfo?(d.openBlock(),d.createBlock(Me,{key:0,table:n.table,columns:(ut=i.tableData)==null?void 0:ut.columns,row:s.activeCardRow},null,8,["table","columns","row"])):d.createCommentVNode("",!0)]}),_:1})])])],4)])}const Nue={components:{AdminTable:Fe(hue,[["render",Pue],["__scopeId","data-v-1205a7b8"]])},data(){return{table:!1,interface:"",search:""}},watch:{$route:{async handler(){Bi!=null&&Bi.value||await this.getMenu(),await this.checkPageType()},deep:!0},title(t){var e;t&&(document.title=(((e=it.value)==null?void 0:e.titlePrefix)||"")+t)}},async mounted(){await this.checkPageType()},methods:{flattenMenu(t){const e=[];return t.forEach(n=>{n.menu?e.push(...this.flattenMenu(n.menu)):e.push(n)}),e},async checkPageType(){var r,i;const t=this.flattenMenu(Bi.value);t!=null&&t.length||this.$router.replace("/404");const e=t==null?void 0:t.find(s=>{var a,o;return(s==null?void 0:s.path)==((o=(a=this.$route)==null?void 0:a.params)==null?void 0:o.catchAll)});this.title=e==null?void 0:e.ua,e||this.$router.replace("/404"),e!=null&&e.component&&this.$router.replace((i=(r=this.$route)==null?void 0:r.params)==null?void 0:i.catchAll);const n=e==null?void 0:e.table;this.table=n||!1,this.search=(e==null?void 0:e.search)||"",!n&&this.getInterface()},async getInterface(){var t,e;try{const{data:n}=await Ue.get(`/api/template/interface/${((e=(t=this.$route)==null?void 0:t.params)==null?void 0:e.catchAll)||""}`);this.interface=n||""}catch{this.interface=""}}}},Rue=["innerHTML"];function Oue(t,e,n,r,i,s){const a=d.resolveComponent("AdminTable");return i.table?(d.openBlock(),d.createBlock(a,{key:0,table:i.table,title:t.title,search:i.search},null,8,["table","title","search"])):(d.openBlock(),d.createElementBlock("div",{key:1,class:"w-full bg-gray-50",style:{height:"calc(100vh - 120px)"},innerHTML:i.interface},null,8,Rue))}const Bue=Object.freeze(Object.defineProperty({__proto__:null,default:Fe(Nue,[["render",Oue]])},Symbol.toStringTag,{value:"Module"}));return DI});
772
+ `}).mount(n)}};window.addEventListener("click",t=>{var n,r,i;const e=(n=t==null?void 0:t.target)==null?void 0:n.closest("[_href]");if(e&&(e==null?void 0:e.tagName)==="A"){const s=e==null?void 0:e.getAttribute("_href");(i=(r=window==null?void 0:window.app)==null?void 0:r.router)==null||i.push(s),t==null||t.preventDefault()}});const tae=()=>{const t=d.defineCustomElement(Bv);customElements.define("admin-info",t)},nae=["black","gray","red","yellow","green","blue","indigo","purple","pink","rose","amber","lime","emerald","teal","cyan","sky","violet","fuchsia","lavender","zinc","neutral","stone"],rae=["white"];let vf,MI;const iae=async()=>{try{const{data:t}=await Ue.get("/api/user-menu"),e=t.menus;return Bi.value=e,vf=t.settings,MI=t.user,Pv(e)}catch(t){return console.error(t),[]}},sae=(t,e)=>{Object.entries(e).forEach(([n,r])=>{t.component(n,r)})},DI={async install(t,{componentsApp:e={},settings:n,routes:r=[]}){try{tae(),(n.sidebarDark??!0)&&(n.sidebarDark=!rae.includes(n.sidebarColor)),n.buttonColor||(n.buttonColor=nae.includes(n.sidebarColor)?n.sidebarColor:"blue");const s=(await iae()).filter(o=>o==null?void 0:o.component).map(o=>({...o,component:{...Vv,...e}[o==null?void 0:o.component]}));it.value={...it.value,...n,...(vf==null?void 0:vf.admin)||{}},sae(t,{...Vv,...e}),t.component("admin",JR);const{router:a}=await RB(s.concat(r));window.app={...t,router:a},window.v3plugin={...t.config.globalProperties,...zv},t.config.globalProperties={...t.config.globalProperties,$componentsConfig:{...I2,componentsApp:e},$router:a,$v3plugin:zv,$utils:{reloadCardPage:jp},$settings:vf,$adminSettings:it.value,$user:MI},t.use(a)}catch(i){console.error(i)}},components:Vv,plugins:zv};typeof window<"u"&&(window.v3Admin=DI);const oae={data(){return{formValues:{},scheme:null,table:"",token:"",style:null}},mounted(){this.getFormScheme()},computed:{color(){return it.value.buttonColor||"blue"}},methods:{flattenMenu(t){const e=[];return t.forEach(n=>{n.menu?e.push(...this.flattenMenu(n.menu)):e.push(n)}),e},async getFormScheme(){var r,i;const t=this.flattenMenu(Bi.value);t!=null&&t.length||this.$router.replace("/404");const e=t==null?void 0:t.find(s=>{var a,o;return(s==null?void 0:s.path)==((o=(a=this.$route)==null?void 0:a.query)==null?void 0:o.table)});e||this.$router.replace("/404");const n=e==null?void 0:e.table;this.table=n;try{const{data:{form:s}}=await Ue.get(`/api/template/table/${n}`),{data:a}=await Ue.get(`/api/table/${this.table}/${(i=(r=this.$route)==null?void 0:r.query)==null?void 0:i.id}`);this.token=(a==null?void 0:a.token)||"",this.formValues=a||{};const{data:o}=await Ue.get(`/api/template/form/${s}`);this.scheme=(o==null?void 0:o.schema)||o,this.style=(o==null?void 0:o.style)||null}catch{}},async onlyEditObject(){var e,n,r,i,s,a,o,p,g,y,v;const t=(n=(e=this.$refs.form)==null?void 0:e.$refs)==null?void 0:n.form;try{await t.doValidation(),await Ue.put(`/api/table/${this.token}`,this.formValues),await this.$notify({title:"Успішно!",message:"Об'єкт успішно створено",type:"success"})}catch(w){const T=((r=w==null?void 0:w.response)==null?void 0:r.data)||"";let D=((o=(a=(s=(i=Object.entries(t==null?void 0:t.formErrors))==null?void 0:i[0])==null?void 0:s[1])==null?void 0:a[0])==null?void 0:o.message)==="Це поле обов'язкове"?"Заповніть обов'язкові поля":(v=(y=(g=(p=Object.entries(t==null?void 0:t.formErrors))==null?void 0:p[0])==null?void 0:g[1])==null?void 0:y[0])==null?void 0:v.message;this.$notify({title:"Помилка!",message:T||D||"Сталася помилка валідаціі",type:"error"})}},getGroupedErrorNotification(t,e){if(!t||!e)return"";const n={};return Object.entries(t).forEach(([i,s])=>{var o;const a=((o=e[i])==null?void 0:o.ua)||i;s.forEach(p=>{const g=p.message;n[g]||(n[g]=[]),n[g].push(`"${a}"`)})}),Object.entries(n).map(([i,s])=>`<b>${i}:</b> ${s.join(", ")}`).join("<br>")||"Сталася помилка валідації"},async editObjectAndRedirect(t=!0){var n,r;const e=(r=(n=this.$refs.form)==null?void 0:n.$refs)==null?void 0:r.form;try{t&&await e.doValidation(),await Ue.put(`/api/table/${this.token}${t?"":"?draft=1"}`,this.formValues),await this.$router.back(),await this.$notify({title:"Успішно!",message:"Об'єкт успішно створено",type:"success"})}catch{const s=this.getGroupedErrorNotification(e==null?void 0:e.formErrors,e==null?void 0:e.scheme);this.$notify({title:"Помилка!",message:s,type:"error"})}}}},aae={class:"bg-gray-100 lg:w-[calc(100vw-260px)] w-[100vw]"},lae={class:"h-[76px] mt-[15px] flex items-center justify-between mx-[20px] px-[20px] bg-white rounded-xl"},cae={class:"flex items-center gap-[6px]"},dae={class:"bg-white w-full rounded-xl"};function uae(t,e,n,r,i,s){var o,p,g;const a=d.resolveComponent("VsFormWithNavigation");return d.openBlock(),d.createElementBlock("div",aae,[d.createElementVNode("div",lae,[e[4]||(e[4]=d.createElementVNode("h2",{class:"text-xl font-medium"},"Редагувати",-1)),d.createElementVNode("div",cae,[d.createElementVNode("button",{onClick:e[0]||(e[0]=y=>t.$router.back()),class:"flex items-center px-3 py-2 text-sm font-medium text-gray-800 duration-300 bg-white border border-gray-100 rounded-lg shadow gap-x-2 focus:outline-none hover:bg-gray-50 hover:border-gray-100"}," Скасувати "),(o=i.style)!=null&&o.draft?(d.openBlock(),d.createElementBlock("button",{key:0,onClick:e[1]||(e[1]=y=>s.editObjectAndRedirect(!1)),class:d.normalizeClass(`inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-${s.color}-700 border border-transparent rounded-lg gap-x-2 hover:bg-${s.color}-800 hover:text-white`)}," Зберегти DRAFT ",2)):d.createCommentVNode("",!0),d.createElementVNode("button",{onClick:e[2]||(e[2]=(...y)=>s.editObjectAndRedirect&&s.editObjectAndRedirect(...y)),class:d.normalizeClass(`inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-${s.color}-700 border border-transparent rounded-lg gap-x-2 hover:bg-${s.color}-800 hover:text-white`)}," Зберегти ",2)])]),d.createElementVNode("div",{style:d.normalizeStyle({height:((p=t.$adminSettings)==null?void 0:p.header)===!1?"calc(100vh - 91px)":"calc(100vh - 150px)"}),class:"bg-gray-100 p-[20px] flex lg:w-[calc(100vw-260px)] w-[100vw] overflow-hidden"},[d.createElementVNode("div",dae,[i.scheme?(d.openBlock(),d.createBlock(a,{key:0,ref:"form",scheme:i.scheme,columns:(g=i.style)==null?void 0:g.columns,style:d.normalizeStyle(i.style),modelValue:i.formValues,"onUpdate:modelValue":e[3]||(e[3]=y=>i.formValues=y),class:"p-[20px] h-full"},null,8,["scheme","columns","style","modelValue"])):d.createCommentVNode("",!0)])],4)])}const hae=Object.freeze(Object.defineProperty({__proto__:null,default:Fe(oae,[["render",uae]])},Symbol.toStringTag,{value:"Module"})),fae={data(){return{formValues:{},scheme:null,table:"",token:"",api:"",style:null}},mounted(){this.getFormScheme()},computed:{color(){return it.value.buttonColor||"blue"}},methods:{flattenMenu(t){const e=[];return t.forEach(n=>{n.menu?e.push(...this.flattenMenu(n.menu)):e.push(n)}),e},async getFormScheme(){var r,i;const t=this.flattenMenu(Bi.value);t!=null&&t.length||this.$router.replace("/404");const e=t==null?void 0:t.find(s=>{var a,o;return(s==null?void 0:s.path)==((o=(a=this.$route)==null?void 0:a.query)==null?void 0:o.table)});e||this.$router.replace("/404");const n=e==null?void 0:e.table;this.table=n;try{const s=await Ue.get(`/api/table-data/${n}`),{data:a}=await Ue.get(`/api/template/form/${(r=s==null?void 0:s.data)==null?void 0:r.form}`);this.scheme=(a==null?void 0:a.schema)||a,this.style=(a==null?void 0:a.style)||null,this.api=(a==null?void 0:a.api)||"",this.token=((i=s==null?void 0:s.data)==null?void 0:i.addToken)||""}catch{}},getGroupedErrorNotification(t,e){if(!t||!e)return"";const n={};return Object.entries(t).forEach(([i,s])=>{var o;const a=((o=e[i])==null?void 0:o.ua)||i;s.forEach(p=>{const g=p.message;n[g]||(n[g]=[]),n[g].push(`"${a}"`)})}),Object.entries(n).map(([i,s])=>`<b>${i}:</b> ${s.join(", ")}`).join("<br>")||"Сталася помилка валідації"},async createObject(){var e,n,r;const t=(n=(e=this.$refs.form)==null?void 0:e.$refs)==null?void 0:n.form;try{await t.doValidation(),await Ue.post(this.api||`/api/table/${this.token}`,this.formValues),await this.$router.back(),await this.$notify({title:"Успішно!",message:"Об'єкт успішно створено",type:"success"})}catch(i){const s=this.getGroupedErrorNotification(t==null?void 0:t.formErrors,t==null?void 0:t.scheme);this.$notify({title:"Помилка!",message:((r=i==null?void 0:i.response)==null?void 0:r.data)||s,type:"error"})}}}},pae={class:"bg-gray-100 lg:w-[calc(100vw-260px)] w-[100vw]"},mae={class:"h-[76px] mt-[15px] flex items-center justify-between mx-[20px] px-[20px] bg-white rounded-xl"},gae={class:"flex items-center gap-[6px]"},yae={class:"bg-white w-full rounded-xl"};function bae(t,e,n,r,i,s){var o;const a=d.resolveComponent("VsFormWithNavigation");return d.openBlock(),d.createElementBlock("div",pae,[d.createElementVNode("div",mae,[e[3]||(e[3]=d.createElementVNode("h2",{class:"text-xl font-medium"},"Створити",-1)),d.createElementVNode("div",gae,[d.createElementVNode("button",{onClick:e[0]||(e[0]=p=>t.$router.back()),class:"flex items-center px-3 py-2 text-sm font-medium text-gray-800 duration-300 bg-white border border-gray-100 rounded-lg shadow gap-x-2 focus:outline-none hover:bg-gray-50 hover:border-gray-100"}," Скасувати "),d.createElementVNode("button",{onClick:e[1]||(e[1]=(...p)=>s.createObject&&s.createObject(...p)),class:d.normalizeClass(`inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-${s.color}-700 border border-transparent rounded-lg gap-x-2 hover:bg-${s.color}-800 hover:text-white`)}," Зберегти ",2)])]),d.createElementVNode("div",{style:d.normalizeStyle({height:((o=t.$adminSettings)==null?void 0:o.header)===!1?"calc(100vh - 91px)":"calc(100vh - 150px)"}),class:"bg-gray-100 p-[20px] flex lg:w-[calc(100vw-260px)] w-[100vw] overflow-hidden"},[d.createElementVNode("div",yae,[i.scheme?(d.openBlock(),d.createBlock(a,{key:0,ref:"form",scheme:i.scheme,style:d.normalizeStyle(i.style),modelValue:i.formValues,"onUpdate:modelValue":e[2]||(e[2]=p=>i.formValues=p),class:"h-full p-[20px]"},null,8,["scheme","style","modelValue"])):d.createCommentVNode("",!0)])],4)])}const _ae=Object.freeze(Object.defineProperty({__proto__:null,default:Fe(fae,[["render",bae]])},Symbol.toStringTag,{value:"Module"})),xae=d.ref(null),vae={data(){return{formScheme:null,formValues:{}}},mounted(){this.getFormScheme()},computed:{userData(){return xae.value}},methods:{async updateUser(){var t;try{await Ue.put(`/user/${(t=this.userData.user)==null?void 0:t.uid}`,this.formValues),await this.$notify({title:"Успішно!",message:"Дані успішно оновлені",type:"success"})}catch{this.$notify({title:"Помилка!",message:"Сталася помилка",type:"error"})}},async getFormScheme(){var t,e,n,r;try{const{data:i}=await Ue.get("/api/template/form/admin.profile.form");console.log(this.userData);for(const s in i==null?void 0:i.schema)(e=(t=this.userData)==null?void 0:t.user)!=null&&e[s]&&(this.formValues[s]=(r=(n=this.userData)==null?void 0:n.user)==null?void 0:r[s]);this.formScheme=i.schema}catch(i){console.error(i)}}}},wae={class:"flex justify-center pt-[20px] pb-[20px] pl-[20px] h-[calc(100vh-58px)]"},kae={class:"bg-white rounded-xl p-[20px]"},Eae={class:"flex-1 overflow-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},Sae={class:"flex"};function Cae(t,e,n,r,i,s){const a=d.resolveComponent("VsForm");return d.openBlock(),d.createElementBlock("div",wae,[d.createElementVNode("div",kae,[e[2]||(e[2]=d.createElementVNode("h2",{class:"mb-[20px] text-center"},"Профіль",-1)),d.createElementVNode("div",Eae,[i.formScheme?(d.openBlock(),d.createBlock(a,{key:0,scheme:i.formScheme,modelValue:i.formValues,"onUpdate:modelValue":e[0]||(e[0]=o=>i.formValues=o),class:"pb-0"},null,8,["scheme","modelValue"])):d.createCommentVNode("",!0),d.createElementVNode("div",Sae,[d.createElementVNode("button",{onClick:e[1]||(e[1]=(...o)=>s.updateUser&&s.updateUser(...o)),class:"ml-auto text-[18px] bg-blue-500 text-white px-[8px] py-[4px] rounded hover:bg-blue-700 duration-300"}," Зберегти ")])])])])}const Tae=Object.freeze(Object.defineProperty({__proto__:null,default:Fe(vae,[["render",Cae]])},Symbol.toStringTag,{value:"Module"})),Aae={};function Mae(t,e,n,r,i,s){const a=d.resolveComponent("router-view");return d.openBlock(),d.createBlock(a)}const II=Object.freeze(Object.defineProperty({__proto__:null,default:Fe(Aae,[["render",Mae]])},Symbol.toStringTag,{value:"Module"})),Dae={},Iae={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-logout"};function Pae(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",Iae,e[0]||(e[0]=[d.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),d.createElementVNode("path",{d:"M14 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2"},null,-1),d.createElementVNode("path",{d:"M9 12h12l-3 -3"},null,-1),d.createElementVNode("path",{d:"M18 15l3 -3"},null,-1)]))}const Lv=Fe(Dae,[["render",Pae]]),Nae={},Rae={viewBox:"0 0 1823 249",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Oae(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",Rae,e[0]||(e[0]=[d.createStaticVNode('<path d="M218.88 96.05C223.55 99.19 228.69 101.56 234.09 103.07V145.42C212.05 151.54 195.83 171.79 195.83 195.75C195.83 200.22 196.41 204.65 197.53 208.94L160.92 230.08C156.82 226.06 152.08 222.73 146.91 220.24V171.62C164.83 163.13 176.59 145.06 176.59 124.48C176.59 123.17 176.54 121.86 176.44 120.56L218.88 96.05ZM220.32 79.09L160.97 113.36C162.04 116.88 162.61 120.61 162.61 124.48C162.61 142.66 149.93 157.87 132.93 161.76V230.05C143.4 232.46 152.23 239.16 157.46 248.21L215 214.99C211.7 209.34 209.81 202.77 209.81 195.75C209.81 174.62 226.94 157.49 248.07 157.49V91.02C237.14 91.02 227.29 86.43 220.32 79.09Z" fill="#CE3936"></path><path d="M161.39 19.13L197.44 39.94C196.39 44.11 195.84 48.42 195.84 52.75C195.84 54.21 195.9 55.65 196.02 57.1L153.9 81.42C145.27 75.5 134.95 72.24 124.36 72.24C113.83 72.24 103.57 75.47 94.96 81.32L52.71 56.93C52.82 55.55 52.88 54.16 52.88 52.76C52.88 48.43 52.34 44.12 51.28 39.95L87.3 19.16C96.98 28.89 110.26 34.58 124.34 34.58C138.42 34.57 151.7 28.87 161.39 19.13ZM157.77 0.919983C151.24 12.66 138.71 20.6 124.33 20.6C109.95 20.6 97.44 12.67 90.9 0.939983L33.9 33.85C37.08 39.43 38.91 45.88 38.91 52.76C38.91 56.71 38.31 60.52 37.2 64.11L96.46 98.32C103.44 90.87 113.36 86.22 124.37 86.22C135.44 86.22 145.41 90.93 152.39 98.44L211.59 64.27C210.45 60.64 209.83 56.78 209.83 52.77C209.83 45.89 211.65 39.44 214.84 33.86L157.77 0.919983Z" fill="#CE3936"></path><path d="M29.97 95.95L72.28 120.38C72.17 121.74 72.12 123.1 72.12 124.47C72.12 145.02 83.86 163.08 101.74 171.58V220.23C96.58 222.71 91.84 226.04 87.75 230.05L51.17 208.93C52.29 204.64 52.87 200.21 52.87 195.74C52.87 171.78 36.65 151.53 14.61 145.41V103.06C20.07 101.55 25.27 99.14 29.97 95.95ZM28.5 78.97C21.52 86.38 11.63 91.02 0.640015 91.02V157.49C21.77 157.49 38.9 174.62 38.9 195.75C38.9 202.77 37 209.33 33.71 214.99L91.2 248.18C96.43 239.14 105.25 232.45 115.71 230.04V161.73C98.74 157.81 86.09 142.62 86.09 124.46C86.09 120.54 86.68 116.75 87.78 113.18L28.5 78.97Z" fill="#CE3936"></path><path d="M498.39 177.5V144.88C498.39 128.55 485.11 115.27 468.78 115.27H343.22C342.69 115.27 342.18 115.32 341.67 115.4H337.19C332.35 115.4 328.42 111.46 328.42 106.63V74C328.42 69.16 332.36 65.23 337.19 65.23H486.33C492.08 65.23 496.75 60.57 496.75 54.81C496.75 49.06 492.08 44.39 486.33 44.39H337.19C320.86 44.39 307.58 57.67 307.58 74V106.62C307.58 122.95 320.86 136.23 337.19 136.23H462.75C463.28 136.23 463.79 136.18 464.3 136.1H468.78C473.62 136.1 477.55 140.04 477.55 144.87V177.49C477.55 182.33 473.61 186.26 468.78 186.26H319.64C313.89 186.26 309.22 190.92 309.22 196.68C309.22 202.43 313.89 207.1 319.64 207.1H468.78C485.11 207.11 498.39 193.83 498.39 177.5Z" fill="#CE3935"></path><path d="M710.7 177.32V75.24C710.7 58.91 697.42 45.63 681.09 45.63H550.05C533.72 45.63 520.44 58.91 520.44 75.24V177.32C520.44 193.65 533.72 206.93 550.05 206.93H681.1C697.42 206.93 710.7 193.65 710.7 177.32ZM541.27 75.24C541.27 70.4 545.21 66.47 550.04 66.47H681.09C685.93 66.47 689.86 70.41 689.86 75.24V177.32C689.86 182.16 685.92 186.09 681.09 186.09H550.05C545.21 186.09 541.28 182.15 541.28 177.32V75.24H541.27Z" fill="#CE3935"></path><path d="M1823 177.32V75.24C1823 58.91 1809.72 45.63 1793.39 45.63H1662.34C1646.01 45.63 1632.73 58.91 1632.73 75.24V177.32C1632.73 193.65 1646.01 206.93 1662.34 206.93H1793.39C1809.72 206.93 1823 193.65 1823 177.32ZM1653.57 75.24C1653.57 70.4 1657.51 66.47 1662.34 66.47H1793.39C1798.23 66.47 1802.16 70.41 1802.16 75.24V177.32C1802.16 182.16 1798.22 186.09 1793.39 186.09H1662.34C1657.5 186.09 1653.57 182.15 1653.57 177.32V75.24Z" fill="#CE3935"></path><path d="M756.76 196.51V152H849.42C855.17 152 859.84 147.34 859.84 141.58C859.84 135.83 855.17 131.16 849.42 131.16H756.76V75.23C756.76 70.39 760.7 66.46 765.53 66.46H893.29C899.04 66.46 903.71 61.8 903.71 56.04C903.71 50.29 899.04 45.62 893.29 45.62H765.53C749.2 45.62 735.92 58.9 735.92 75.23V196.5C735.92 202.25 740.59 206.92 746.34 206.92C752.09 206.93 756.76 202.27 756.76 196.51Z" fill="#CE3935"></path><path d="M933.86 66.47H1006.51V194.32C1006.51 200.07 1011.18 204.74 1016.93 204.74C1022.68 204.74 1027.35 200.07 1027.35 194.32V66.47H1100C1105.75 66.47 1110.42 61.81 1110.42 56.05C1110.42 50.3 1105.76 45.63 1100 45.63H933.86C928.11 45.63 923.44 50.29 923.44 56.05C923.45 61.81 928.11 66.47 933.86 66.47Z" fill="#CE3935"></path><path d="M1218.44 204.19C1224.19 204.19 1228.86 199.53 1228.86 193.77V152H1368.13C1384.46 152 1397.74 138.72 1397.74 122.39V75.24C1397.74 58.91 1384.46 45.63 1368.13 45.63H1237.63C1221.3 45.63 1208.02 58.91 1208.02 75.24V193.77C1208.02 199.53 1212.68 204.19 1218.44 204.19ZM1237.63 66.47H1368.13C1372.97 66.47 1376.9 70.41 1376.9 75.24V122.39C1376.9 127.23 1372.96 131.16 1368.13 131.16H1228.86V75.23C1228.86 70.41 1232.79 66.47 1237.63 66.47Z" fill="#CE3935"></path><path d="M1430.64 204.19C1436.39 204.19 1441.06 199.53 1441.06 193.77V152H1523.95C1524.57 153.18 1525.42 154.26 1526.51 155.17L1581.89 201.23C1583.83 202.85 1586.2 203.64 1588.55 203.64C1591.54 203.64 1594.5 202.36 1596.57 199.88C1600.25 195.46 1599.64 188.89 1595.22 185.21L1555.29 152H1580.33C1596.66 152 1609.94 138.72 1609.94 122.39V75.24C1609.94 58.91 1596.66 45.63 1580.33 45.63H1449.83C1433.5 45.63 1420.22 58.91 1420.22 75.24V193.77C1420.22 199.53 1424.88 204.19 1430.64 204.19ZM1449.83 66.47H1580.33C1585.17 66.47 1589.1 70.41 1589.1 75.24V122.39C1589.1 127.23 1585.17 131.16 1580.33 131.16H1441.06V75.23C1441.05 70.41 1444.99 66.47 1449.83 66.47Z" fill="#CE3935"></path>',10)]))}const PI=Fe(Nae,[["render",Oae]]),Bae={components:{IconChevronDown:xf},props:{route:Object,searchable:String},mounted(){var t,e;(e=(t=this.route)==null?void 0:t.menu)!=null&&e.some(n=>{var r,i;return(n==null?void 0:n.path)===this.$route.path.replace("/","")||((i=(r=this.$route)==null?void 0:r.params)==null?void 0:i.table)===(n==null?void 0:n.table)&&(n==null?void 0:n.table)})&&(this.isOpen=!0)},watch:{route:{immediate:!0,handler(t){t!=null&&t.open&&(this.isOpen=!0)}}},data(){return{isOpen:!1,arr:[]}},computed:{darkMode(){var t;return(t=it==null?void 0:it.value)==null?void 0:t.sidebarDark}},methods:{highLight(t){if(!this.searchable)return t;const e=this.searchable.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),n=new RegExp(`(${e})(\\s*)`,"gi");return t.replace(n,(r,i,s)=>`<span style="color:#1989fa;">${i}</span>${s}`)}}},Vae={key:0,class:""},zae={key:0,class:"py-0.5 px-2 inline-flex items-center gap-x-1.5 text-xs font-medium bg-blue-100 text-blue-800 rounded-full dark:bg-blue-500/10 dark:text-blue-500"},Lae={key:1},Fae=["innerHTML"];function $ae(t,e,n,r,i,s){var p,g,y,v,w,T,D,N,B,L,U,Z,Y,ue,pe;const a=d.resolveComponent("IconChevronDown"),o=d.resolveComponent("router-link");return(p=n.route)!=null&&p.menu?(d.openBlock(),d.createElementBlock("div",Vae,[d.createElementVNode("button",{onClick:e[0]||(e[0]=ye=>i.isOpen=!i.isOpen),class:d.normalizeClass(["flex items-center justify-start w-full px-3 py-2 text-sm text-left text-gray-800 duration-300 border-none rounded-lg cursor-pointer gap-x-3 focus:outline-none hover:bg-gray-100",[((y=(g=n.route)==null?void 0:g.menu)==null?void 0:y.some(ye=>{var Me,ke;return(ye==null?void 0:ye.path)===t.$route.path.replace("/","")||(ye==null?void 0:ye.table)===((ke=(Me=t.$route)==null?void 0:Me.params)==null?void 0:ke.table)&&(ye==null?void 0:ye.table)}))&&(s.darkMode?"bg-white/10":"bg-gray-100"),{"text-white/80 hover:bg-white/10 hover:text-white/80 focus:bg-white/10":s.darkMode,"text-gray-800 hover:bg-gray-100 hover:text-gray-800 focus:bg-gray-100":!s.darkMode}]])},[d.createTextVNode(d.toDisplayString((v=n.route)==null?void 0:v.ua)+" ",1),(w=n.route)!=null&&w.new?(d.openBlock(),d.createElementBlock("span",zae,"Нове")):d.createCommentVNode("",!0),d.createVNode(a,{class:d.normalizeClass([[i.isOpen&&"-rotate-180"],"ml-auto duration-300 flex-shrink-0"]),width:"14",height:"14"},null,8,["class"])],2),d.createVNode(d.Transition,{name:"fade"},{default:d.withCtx(()=>{var ye;return[d.withDirectives(d.createElementVNode("ul",{class:d.normalizeClass(["ml-[28px] pt-[6px] before:block before:absolute relative w-[calc(100%-28px)] flex-col gap-y-1.5 inline-flex before:w-[2px] before:h-[100%] before:left-[-10px] cursor-pointer",s.darkMode?"before:bg-white/10":"before:bg-gray-100"])},[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList((ye=n.route)==null?void 0:ye.menu,(Me,ke)=>{var Re,ze;return d.openBlock(),d.createElementBlock("li",{key:ke,class:"w-full"},[d.createVNode(o,{innerHTML:s.highLight(Me==null?void 0:Me.ua),to:"/"+(Me==null?void 0:Me.path),class:d.normalizeClass([[((Me==null?void 0:Me.path)===t.$route.path.replace("/","")||((ze=(Re=t.$route)==null?void 0:Re.params)==null?void 0:ze.table)===(Me==null?void 0:Me.table)&&(Me==null?void 0:Me.table))&&(s.darkMode?"bg-white/10":"bg-gray-100"),{"text-white/80 hover:bg-white/10 hover:text-white/80 focus:bg-white/10":s.darkMode,"text-gray-800 hover:bg-gray-100 hover:text-gray-800 focus:bg-gray-100":!s.darkMode}],"block px-3 py-2 text-sm rounded-lg focus:outline-none focus:bg-gray-100"])},null,8,["innerHTML","to","class"])])}),128))],2),[[d.vShow,i.isOpen]])]}),_:1})])):(T=n.route)!=null&&T.hidden?d.createCommentVNode("",!0):(d.openBlock(),d.createElementBlock("div",Lae,[d.createVNode(o,{to:((N=(D=n.route)==null?void 0:D.path)==null?void 0:N[0])==="/"?(B=n.route)==null?void 0:B.path:"/"+((L=n.route)==null?void 0:L.path),class:d.normalizeClass([[(((U=n.route)==null?void 0:U.path.replace("/",""))===t.$route.path.replace("/","")||((Y=(Z=t.$route)==null?void 0:Z.params)==null?void 0:Y.table)===((ue=n.route)==null?void 0:ue.table)&&((pe=n.route)==null?void 0:pe.table))&&(s.darkMode?"bg-white/10":"bg-gray-100"),{"text-white/80 hover:bg-white/10 hover:text-white/80 focus:bg-white/10 ":s.darkMode,"text-gray-800 hover:bg-gray-100 hover:text-gray-800 focus:bg-gray-100 ":!s.darkMode}],"flex items-center w-full px-3 py-2 text-sm text-gray-800 duration-300 rounded-lg gap-x-3"])},{default:d.withCtx(()=>{var ye;return[d.createElementVNode("span",{innerHTML:s.highLight((ye=n.route)==null?void 0:ye.ua)},null,8,Fae)]}),_:1},8,["to","class"])]))}const jae=Fe(Bae,[["render",$ae]]),Hae={},Uae={class:"flex-shrink-0 size-4",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 Wae(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",Uae,e[0]||(e[0]=[d.createElementVNode("circle",{cx:"12",cy:"12",r:"10"},null,-1),d.createElementVNode("path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"},null,-1),d.createElementVNode("path",{d:"M12 17h.01"},null,-1)]))}const NI=Fe(Hae,[["render",Wae]]),qae={},Gae={class:"shrink-0 size-4 rounded-full",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function Yae(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",Gae,e[0]||(e[0]=[d.createStaticVNode('<g fill-rule="evenodd"><g stroke-width="1pt"><path fill="#bd3d44" d="M0 0h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0z" transform="scale(3.9385)"></path><path fill="#fff" d="M0 10h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0z" transform="scale(3.9385)"></path></g><path fill="#192f5d" d="M0 0h98.8v70H0z" transform="scale(3.9385)"></path><path fill="#fff" d="M8.2 3l1 2.8H12L9.7 7.5l.9 2.7-2.4-1.7L6 10.2l.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8H45l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.4 1.7 1 2.7L74 8.5l-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9L92 7.5l1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm-74.1 7l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7H65zm16.4 0l1 2.8H86l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm-74 7l.8 2.8h3l-2.4 1.7.9 2.7-2.4-1.7L6 24.2l.9-2.7-2.4-1.7h3zm16.4 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8H45l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9L92 21.5l1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm-74.1 7l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7H65zm16.4 0l1 2.8H86l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm-74 7l.8 2.8h3l-2.4 1.7.9 2.7-2.4-1.7L6 38.2l.9-2.7-2.4-1.7h3zm16.4 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8H45l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9L92 35.5l1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm-74.1 7l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7H65zm16.4 0l1 2.8H86l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm-74 7l.8 2.8h3l-2.4 1.7.9 2.7-2.4-1.7L6 52.2l.9-2.7-2.4-1.7h3zm16.4 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8H45l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9L92 49.5l1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm-74.1 7l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7H65zm16.4 0l1 2.8H86l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm-74 7l.8 2.8h3l-2.4 1.7.9 2.7-2.4-1.7L6 66.2l.9-2.7-2.4-1.7h3zm16.4 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8H45l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9L92 63.5l1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9z" transform="scale(3.9385)"></path></g>',1)]))}const Zae=Fe(qae,[["render",Yae]]),Xae={},Kae={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1",width:"256",height:"256",viewBox:"0 0 256 256","xml:space":"preserve"};function Jae(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",Kae,e[0]||(e[0]=[d.createElementVNode("defs",null,null,-1),d.createElementVNode("g",{style:{stroke:"none","stroke-width":"0","stroke-dasharray":"none","stroke-linecap":"butt","stroke-linejoin":"miter","stroke-miterlimit":"10",fill:"none","fill-rule":"nonzero",opacity:"1"},transform:"translate(1.4065934065934016 1.4065934065934016) scale(2.81 2.81)"},[d.createElementVNode("path",{d:"M 45 90 C 20.147 90 0 69.853 0 45 h 90 C 90 69.853 69.853 90 45 90 z",style:{stroke:"none","stroke-width":"1","stroke-dasharray":"none","stroke-linecap":"butt","stroke-linejoin":"miter","stroke-miterlimit":"10",fill:"rgb(255,213,0)","fill-rule":"nonzero",opacity:"1"},transform:" matrix(1 0 0 1 0 0) ","stroke-linecap":"round"}),d.createElementVNode("path",{d:"M 45 0 C 20.147 0 0 20.147 0 45 h 90 C 90 20.147 69.853 0 45 0 z",style:{stroke:"none","stroke-width":"1","stroke-dasharray":"none","stroke-linecap":"butt","stroke-linejoin":"miter","stroke-miterlimit":"10",fill:"rgb(0,91,187)","fill-rule":"nonzero",opacity:"1"},transform:" matrix(1 0 0 1 0 0) ","stroke-linecap":"round"})],-1)]))}const Qae=Fe(Xae,[["render",Jae]]),ele={},tle={class:"shrink-0 size-3.5 text-gray-800 dark:text-neutral-200",xmlns:"http:.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"};function nle(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",tle,e[0]||(e[0]=[d.createElementVNode("polyline",{points:"20 6 9 17 4 12"},null,-1)]))}const rle={components:{IconQuestion:NI,IconUSA:Zae,IconUkraine:Qae,IconTick:Fe(ele,[["render",nle]])},props:["docs","languages"],data(){return{currentLang:"ukraine",languagesOptions:[{titleEN:"English",titleUA:"Англійська",id:"english",icon:"IconUSA"},{titleEN:"Ukraine",titleUA:"Українська",id:"ukraine",icon:"IconUkraine"}]}},computed:{selectedLang(){return this.languagesOptions.find(t=>t.id===this.currentLang)},darkMode(){var t;return(t=it==null?void 0:it.value)==null?void 0:t.sidebarDark}},methods:{changeLang(t){this.$refs.langPopover.togglePopover(),this.currentLang=t}}},ile={class:"flex justify-center items-center gap-x-2"},sle=["onClick"],ole={class:"text-gray-800"},ale={class:"ms-auto"},lle={class:"truncate"};function cle(t,e,n,r,i,s){const a=d.resolveComponent("IconTick"),o=d.resolveComponent("VsPopover");return n.docs||n.languages?(d.openBlock(),d.createElementBlock("div",{key:0,class:d.normalizeClass(["py-2 px-5 border-t dark:border-neutral-700",s.darkMode?"border-white/10 ":"border-gray-200"])},[d.createElementVNode("div",ile,[d.createVNode(o,{trigger:"click",placement:"top",ref:"langPopover"},{reference:d.withCtx(()=>{var p,g,y;return[d.createElementVNode("button",{type:"button","aria-expanded":"false",class:d.normalizeClass(["relative py-2 px-3 flex items-center gap-x-2 text-nowrap w-full cursor-pointer border rounded-full text-start text-sm text-gray-800 focus:outline-none",s.darkMode?"border-white/10 bg-transparent text-white/80 hover:bg-white/10 focus:bg-white/10":"border-gray-200 bg-white hover:bg-gray-100 focus:bg-gray-100"])},[d.createElementVNode("div",null,[(d.openBlock(),d.createBlock(d.resolveDynamicComponent((p=s.selectedLang)==null?void 0:p.icon),{class:"w-[16px] h-[16px] rounded-full"}))]),d.createElementVNode("span",lle,d.toDisplayString(i.currentLang==="ukraine"?(g=s.selectedLang)==null?void 0:g.titleUA:(y=s.selectedLang)==null?void 0:y.titleEN),1)],2)]}),default:d.withCtx(()=>[d.createElementVNode("div",null,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(i.languagesOptions,p=>(d.openBlock(),d.createElementBlock("button",{key:p.id,type:"button",onClick:g=>s.changeLang(p.id),class:d.normalizeClass(["flex items-center gap-x-2 cursor-pointer dark:hs-selected:bg-neutral-800 py-2 px-4 w-full text-sm text-gray-800 hover:bg-gray-100 rounded-lg focus:outline-none focus:bg-gray-100 dark:text-neutral-300 dark:hover:bg-neutral-800 dark:focus:bg-neutral-800 selected",(p==null?void 0:p.id)===i.currentLang?"bg-gray-100":""])},[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(p==null?void 0:p.icon),{class:"w-[16px] h-[16px] rounded-full"})),d.createElementVNode("div",ole,d.toDisplayString(i.currentLang==="ukraine"?p==null?void 0:p.titleUA:p==null?void 0:p.titleEN),1),d.createElementVNode("span",ale,[(p==null?void 0:p.id)===i.currentLang?(d.openBlock(),d.createBlock(a,{key:0})):d.createCommentVNode("",!0)])],10,sle))),128))])]),_:1},512)])],2)):d.createCommentVNode("",!0)}const RI=Fe(rle,[["render",cle]]),dle={components:{IconLogout:Lv,NavbarItem:jae,IconLogo:PI,IconSearch:ly,NavbarFooter:RI},data(){return{activeIndex:null,searchValue:""}},computed:{data(){var t;return(t=this.searchValue)!=null&&t.trim()?this.filterMenu(Bi.value,this.searchValue):Bi.value},logo(){var t,e,n;return((e=(t=this.$settings)==null?void 0:t.admin)==null?void 0:e.logo)||((n=it.value)==null?void 0:n.logo)||"/assets/logo.svg"},docs(){var t;return(t=it==null?void 0:it.value)==null?void 0:t.docs},languages(){var t;return(t=it==null?void 0:it.value)==null?void 0:t.languages},darkMode(){var t;return((t=it==null?void 0:it.value)==null?void 0:t.sidebarDark)||!1},darkColor(){var e,n,r;const t=((e=it==null?void 0:it.value)==null?void 0:e.sidebarColor)||((n=it==null?void 0:it.value)==null?void 0:n.color)||((r=it==null?void 0:it.value)!=null&&r.sidebarDark?"blue":"white");return t.includes("-")||t.includes("[")?t:t+"-950"}},watch:{"$route.path"(){this.$parent.showMenu=!1}},methods:{filterMenu(t,e){return t.map(n=>{var r,i;if(n.menu){const s=this.filterMenu(n.menu,e);if(s.length>0)return{...n,menu:s,open:!0}}else if((i=(r=n.ua)==null?void 0:r.toLowerCase())!=null&&i.includes(e.toLowerCase()))return n;return null}).filter(Boolean)}}},ule={class:"h-[46px] w-full px-5 lg:px-8 mb-[10px]"},hle={href:"/"},fle=["src"],ple={class:"px-2 lg:px-5"},mle={class:"px-2 lg:px-5 flex flex-col flex-wrap w-full pb-3"},gle={key:0,class:"flex flex-col gap-y-1"};function yle(t,e,n,r,i,s){var g;const a=d.resolveComponent("VsText"),o=d.resolveComponent("NavbarItem"),p=d.resolveComponent("NavbarFooter");return d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["lg:flex lg:relative lg:left-0 flex-col h-[100vh] pt-3 border-r w-[260px] top-0 bottom-0 shrink-0 absolute transition left-[-100%] z-[11]",{"left-0":t.$parent.showMenu,["bg-"+s.darkColor]:s.darkColor,"bg-white":!s.darkMode&&!s.darkColor}])},[d.createElementVNode("div",ule,[d.createElementVNode("a",hle,[d.createElementVNode("img",{src:s.logo,class:"object-contain w-full h-full"},null,8,fle)])]),d.createElementVNode("div",ple,[d.createVNode(a,{type:"text",modelValue:i.searchValue,"onUpdate:modelValue":e[0]||(e[0]=y=>i.searchValue=y),clearable:!0,icon:"search","icon-position":"left",placeholder:"Пошук по меню",class:d.normalizeClass(["[&>input]:h-[38px]",{"[&>input]:bg-[#172554] [&>input]:text-white/80 [&>input]:placeholder:text-white/40 [&>input]:border [&>input]:border-white/50":s.darkMode,["[&>input]:bg-"+s.darkColor]:s.darkColor,["focus:[&>input]:border-"+s.darkColor+"-500"]:s.darkMode}])},null,8,["modelValue","class"])]),d.createElementVNode("div",{class:d.normalizeClass(["py-[10px] overflow-y-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500",s.languages||s.docs?"h-[calc(100vh-161px)]":"h-[calc(100vh-110px)]"])},[d.createElementVNode("nav",mle,[(g=s.data)!=null&&g.length?(d.openBlock(),d.createElementBlock("ul",gle,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(s.data,(y,v)=>(d.openBlock(),d.createElementBlock("li",{key:v,class:"flex flex-col gap-[6px]"},[d.createVNode(o,{route:y,searchable:i.searchValue},null,8,["route","searchable"])]))),128))])):(d.openBlock(),d.createElementBlock("div",{key:1,class:d.normalizeClass(["text-lg mt-[20px]",{"text-white/80":s.darkMode,"text-gray-800":!s.darkMode}])}," Не знайдено ",2))])],2),s.docs||s.languages?(d.openBlock(),d.createBlock(p,{key:0,docs:s.docs,languages:s.languages},null,8,["docs","languages"])):d.createCommentVNode("",!0)],2)}const OI=Fe(dle,[["render",yle],["__scopeId","data-v-7817bab2"]]),ble={components:{IconChevronDown:xf},props:{route:Object,searchable:String},mounted(){var t,e;(e=(t=this.route)==null?void 0:t.menu)!=null&&e.some(n=>{var r,i;return(n==null?void 0:n.path)===this.$route.path.replace("/","")||((i=(r=this.$route)==null?void 0:r.params)==null?void 0:i.table)===(n==null?void 0:n.table)&&(n==null?void 0:n.table)})&&(this.isOpen=!0)},watch:{route:{immediate:!0,handler(t){t!=null&&t.open&&(this.isOpen=!0)}}},data(){return{isOpen:!1,arr:[]}},computed:{darkMode(){var t;return(t=it==null?void 0:it.value)==null?void 0:t.sidebarDark}},methods:{highLight(t){if(!this.searchable)return t;const e=this.searchable.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),n=new RegExp(`(${e})(\\s*)`,"gi");return t.replace(n,(r,i,s)=>`<span style="color:#1989fa;">${i}</span>${s}`)}}},_le={key:0,class:""},xle={key:0,class:"py-0.5 px-2 inline-flex items-center gap-x-1.5 text-xs font-medium bg-blue-100 text-blue-800 rounded-full dark:bg-blue-500/10 dark:text-blue-500"},vle={class:"ml-[28px] pt-[6px] before:block before:absolute relative w-[calc(100%-28px)] before:bg-gray-200 flex-col gap-y-1.5 inline-flex before:w-[2px] before:h-[100%] before:left-[-10px] cursor-pointer"},wle={key:1},kle=["innerHTML"];function Ele(t,e,n,r,i,s){var p,g,y,v,w,T,D,N,B,L,U,Z,Y,ue,pe;const a=d.resolveComponent("IconChevronDown"),o=d.resolveComponent("router-link");return(p=n.route)!=null&&p.menu?(d.openBlock(),d.createElementBlock("div",_le,[d.createElementVNode("button",{onClick:e[0]||(e[0]=ye=>i.isOpen=!i.isOpen),class:d.normalizeClass(["flex items-center justify-start w-full px-3 py-2 text-sm text-left text-gray-800 duration-300 border-none rounded-lg cursor-pointer gap-x-3 focus:outline-none hover:bg-gray-200",[((y=(g=n.route)==null?void 0:g.menu)==null?void 0:y.some(ye=>{var Me,ke;return(ye==null?void 0:ye.path)===t.$route.path.replace("/","")||(ye==null?void 0:ye.table)===((ke=(Me=t.$route)==null?void 0:Me.params)==null?void 0:ke.table)&&(ye==null?void 0:ye.table)}))&&"bg-gray-200"]])},[d.createTextVNode(d.toDisplayString((v=n.route)==null?void 0:v.ua)+" ",1),(w=n.route)!=null&&w.new?(d.openBlock(),d.createElementBlock("span",xle,"Нове")):d.createCommentVNode("",!0),d.createVNode(a,{class:d.normalizeClass([[i.isOpen&&"-rotate-180"],"ml-auto duration-300"]),width:"14",height:"14"},null,8,["class"])],2),d.createVNode(d.Transition,{name:"fade"},{default:d.withCtx(()=>{var ye;return[d.withDirectives(d.createElementVNode("ul",vle,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList((ye=n.route)==null?void 0:ye.menu,(Me,ke)=>{var Re,ze;return d.openBlock(),d.createElementBlock("li",{key:ke,class:"w-full"},[d.createVNode(o,{innerHTML:s.highLight(Me==null?void 0:Me.ua),to:"/"+(Me==null?void 0:Me.path),class:d.normalizeClass([[((Me==null?void 0:Me.path)===t.$route.path.replace("/","")||((ze=(Re=t.$route)==null?void 0:Re.params)==null?void 0:ze.table)===(Me==null?void 0:Me.table)&&(Me==null?void 0:Me.table))&&"bg-gray-200"],"block px-3 py-2 text-sm rounded-lg focus:outline-none hover:bg-gray-200 focus:bg-gray-200"])},null,8,["innerHTML","to","class"])])}),128))],512),[[d.vShow,i.isOpen]])]}),_:1})])):(T=n.route)!=null&&T.hidden?d.createCommentVNode("",!0):(d.openBlock(),d.createElementBlock("div",wle,[d.createVNode(o,{to:((N=(D=n.route)==null?void 0:D.path)==null?void 0:N[0])==="/"?(B=n.route)==null?void 0:B.path:"/"+((L=n.route)==null?void 0:L.path),class:d.normalizeClass([[(((U=n.route)==null?void 0:U.path.replace("/",""))===t.$route.path.replace("/","")||((Y=(Z=t.$route)==null?void 0:Z.params)==null?void 0:Y.table)===((ue=n.route)==null?void 0:ue.table)&&((pe=n.route)==null?void 0:pe.table))&&"bg-gray-200"],"flex items-center w-full px-3 py-2 text-sm text-gray-800 duration-300 rounded-lg gap-x-3 hover:bg-gray-200 focus:bg-gray-200"])},{default:d.withCtx(()=>{var ye;return[d.createElementVNode("span",{innerHTML:s.highLight((ye=n.route)==null?void 0:ye.ua)},null,8,kle)]}),_:1},8,["to","class"])]))}const Sle=Fe(ble,[["render",Ele]]),Cle={class:"relative w-fit mx-auto"},Tle={key:0,class:"w-60 duration absolute top-full left-0 z-20 bg-white rounded-xl shadow-xl block"},Ale={class:"p-1"},Mle={__name:"navbar-gray-dropdown",setup(t){const e=d.ref(!1);return d.onMounted(()=>{document.addEventListener("click",n=>{n.target.closest(".navbar-gray-dropdown")||(e.value=!1)})}),(n,r)=>{var s;const i=d.resolveComponent("router-link");return d.openBlock(),d.createElementBlock("div",Cle,[d.createElementVNode("button",{onClick:r[0]||(r[0]=a=>e.value=!e.value),type:"button",class:"py-1 px-2 navbar-gray-dropdown inline-flex justify-center items-center gap-x-1 font-semibold rounded-lg text-gray-800 hover:text-purple-600 focus:outline-hidden focus:text-purple-600 disabled:opacity-50 disabled:pointer-events-none dark:text-neutral-300 dark:hover:text-purple-500 dark:focus:text-purple-500"},[d.createTextVNode(d.toDisplayString((s=n.$user)==null?void 0:s.user_name)+" ",1),d.createVNode(cy,{width:"16",height:"16"})]),e.value?(d.openBlock(),d.createElementBlock("div",Tle,[d.createElementVNode("div",Ale,[r[2]||(r[2]=d.createElementVNode("a",{class:"flex items-center gap-x-3 py-2 px-3 rounded-lg text-sm text-gray-800 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-hidden focus:bg-gray-100 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",href:"#"}," Профіль ",-1)),d.createVNode(i,{class:"flex items-center gap-x-3 py-2 px-3 rounded-lg text-sm text-gray-800 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-hidden focus:bg-gray-100 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",to:"/admin.settings"},{default:d.withCtx(()=>r[1]||(r[1]=[d.createTextVNode(" Налаштування ")])),_:1})]),r[3]||(r[3]=d.createElementVNode("div",{class:"p-1 border-t border-gray-200 dark:border-neutral-700"},[d.createElementVNode("a",{class:"flex items-center gap-x-3 py-2 px-3 rounded-lg text-sm text-gray-800 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-hidden focus:bg-gray-100 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",href:"/logout"}," Вийти ")],-1))])):d.createCommentVNode("",!0)])}}},Dle={class:"p-4 flex flex-col justify-center border-b relative max-h-[192px]"},Ile={components:{IconLogout:Lv,NavbarItem:Sle,IconLogo:PI,IconSearch:ly,NavbarFooter:RI,NavbarUser:{__name:"navbar-gray-user",setup(t){return(e,n)=>(d.openBlock(),d.createElementBlock("div",Dle,[d.createVNode(_x,{class:"!absolute top-[8px] right-[8px]",placement:"left"}),n[0]||(n[0]=d.createElementVNode("div",{class:"flex size-24 justify-center items-center shrink-0 rounded-full overflow-hidden mx-auto mb-2"},[d.createElementVNode("img",{class:"object-cover h-[130px] w-[130px]",src:"https://media.istockphoto.com/id/1337144146/vector/default-avatar-profile-icon-vector.jpg?s=612x612&w=0&k=20&c=BIbFwuv7FxTWvh5S3vB6bkT0Qv8Vn8N5Ffseq84ClGI=",alt:"Avatar"})],-1)),d.createVNode(Mle)]))}}},data(){return{activeIndex:null,searchValue:""}},computed:{data(){var t;return(t=this.searchValue)!=null&&t.trim()?this.filterMenu(Bi.value,this.searchValue):Bi.value},logo(){var t,e,n;return((e=(t=this.$settings)==null?void 0:t.admin)==null?void 0:e.logo)||((n=it.value)==null?void 0:n.logo)||"/assets/logo.svg"},docs(){var t;return(t=it==null?void 0:it.value)==null?void 0:t.docs},languages(){var t;return(t=it==null?void 0:it.value)==null?void 0:t.languages},darkMode(){var t;return((t=it==null?void 0:it.value)==null?void 0:t.sidebarDark)||!1},darkColor(){var e,n,r;const t=((e=it==null?void 0:it.value)==null?void 0:e.sidebarColor)||((n=it==null?void 0:it.value)==null?void 0:n.color)||((r=it==null?void 0:it.value)!=null&&r.sidebarDark?"blue":"white");return t.includes("-")||t.includes("[")?t:t+"-950"}},watch:{"$route.path"(){this.$parent.showMenu=!1}},methods:{filterMenu(t,e){return t.map(n=>{var r,i;if(n.menu){const s=this.filterMenu(n.menu,e);if(s.length>0)return{...n,menu:s,open:!0}}else if((i=(r=n.ua)==null?void 0:r.toLowerCase())!=null&&i.includes(e.toLowerCase()))return n;return null}).filter(Boolean)}}},Ple={class:"px-2 lg:px-5 flex flex-col flex-wrap w-full pb-3"},Nle={key:0,class:"flex flex-col gap-y-1"},Rle={class:"h-[55px] border-t w-full px-5 shrink-0 lg:px-5 flex items-center"},Ole={href:"/"},Ble=["src"];function Vle(t,e,n,r,i,s){var p;const a=d.resolveComponent("NavbarUser"),o=d.resolveComponent("NavbarItem");return d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["lg:flex lg:relative lg:left-0 flex-col h-[100vh] border-r w-[260px] bg-gray-100 top-0 bottom-0 shrink-0 absolute transition left-[-100%] z-[11]",{"left-0":t.$parent.showMenu}])},[d.createVNode(a),d.createElementVNode("div",{class:d.normalizeClass(["py-[10px] overflow-y-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500",s.languages||s.docs?"h-[calc(100vh-161px)]":"h-[calc(100vh-110px)]"])},[d.createElementVNode("nav",Ple,[(p=s.data)!=null&&p.length?(d.openBlock(),d.createElementBlock("ul",Nle,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(s.data,(g,y)=>(d.openBlock(),d.createElementBlock("li",{key:y,class:"flex flex-col gap-[6px]"},[d.createVNode(o,{route:g,searchable:i.searchValue},null,8,["route","searchable"])]))),128))])):(d.openBlock(),d.createElementBlock("div",{key:1,class:d.normalizeClass(["text-lg mt-[20px]",{"text-white/80":s.darkMode,"text-gray-800":!s.darkMode}])}," Не знайдено ",2))])],2),d.createElementVNode("div",Rle,[d.createElementVNode("a",Ole,[d.createElementVNode("img",{src:s.logo,class:"object-contain max-h-[40px]"},null,8,Ble)])])],2)}const zle=Fe(Ile,[["render",Vle],["__scopeId","data-v-3cea82a7"]]),Lle={__name:"navbar",setup(t){const e={default:OI,gray:zle},n=d.computed(()=>{var r;return e[(r=it.value)==null?void 0:r.navbar]||OI});return(r,i)=>(d.openBlock(),d.createBlock(d.resolveDynamicComponent(n.value)))}},Fle={components:{IconQuestion:NI,IconUser:DA,AdminNotification:_x,IconUserOutline:AA,IconLogout:Lv},data(){return{userData:null,isVisible:!1}},computed:{headerBadgeTitle(){var t;return(t=it.value)==null?void 0:t.headerBadge},headerBadgeColor(){var t;return(t=it.value)==null?void 0:t.headerBadgeColor}},watch:{isVisible(t){t?setTimeout(()=>window.addEventListener("click",this.closeOnOutsideClick),0):window.removeEventListener("click",this.closeOnOutsideClick)}},created(){this.userData=this.$user,Rv.value=this.$settings},methods:{async logout(){try{await Ue.get("/logout"),await window.history.pushState({},"","/login"),await location.reload(),localStorage.removeItem("user")}catch{}},closeOnOutsideClick(){this.isVisible=!1}},beforeUnmount(){window.removeEventListener("click",this.closeOnOutsideClick)}},$le={class:"flex items-center gap-[6px]"},jle={href:"/docs-user",class:"size-[38px] inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent text-gray-500 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-100 dark:text-neutral-400 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"},Hle={href:"/docs-user",class:"size-[38px] inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent text-gray-500 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-100 dark:text-neutral-400 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"},Ule={class:"relative"},Wle=["src"],qle={key:1,class:"size-[40px] rounded-full bg-gray-200 flex items-center justify-center"},Gle=["src"],Yle={key:1,class:"flex items-center justify-center bg-gray-200 rounded-full size-10"},Zle={class:"grow"},Xle={class:"block text-sm font-medium text-gray-800 dark:text-neutral-200"},Kle={class:"text-xs text-gray-500 dark:text-neutral-500"},Jle={class:"flex flex-col space-y-0.5"};function Qle(t,e,n,r,i,s){const a=d.resolveComponent("IconQuestion"),o=d.resolveComponent("VsPopover"),p=d.resolveComponent("AdminNotification"),g=d.resolveComponent("IconUser"),y=d.resolveComponent("router-link"),v=d.resolveComponent("IconUserOutline"),w=d.resolveComponent("IconLogout");return d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["h-[58px] border-b flex items-center px-[20px]",s.headerBadgeTitle?"justify-between":"justify-end"])},[s.headerBadgeTitle?(d.openBlock(),d.createElementBlock("div",{key:0,class:d.normalizeClass(["py-1.5 px-2.5 flex justify-center items-center text-white hover:bg-gray-900 focus:bg-gray-900 dark:bg-neutral-100 dark:text-neutral-800 dark:hover:bg-white dark:focus:bg-white.class text-nowrap text-xs sm:text-[13px] rounded-lg disabled:opacity-50 disabled:pointer-events-none focus:outline-none dark:text-neutral-400",{["bg-"+s.headerBadgeColor]:s.headerBadgeColor,"bg-gray-800":!s.headerBadgeColor}])},d.toDisplayString(s.headerBadgeTitle),3)):d.createCommentVNode("",!0),d.createElementVNode("div",{class:"flex lg:hidden",onClick:e[0]||(e[0]=T=>t.$parent.showMenu=!0)},e[4]||(e[4]=[d.createStaticVNode('<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="icon icon-tabler icons-tabler-outline icon-tabler-menu-2"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M4 6l16 0"></path><path d="M4 12l16 0"></path><path d="M4 18l16 0"></path></svg>',1)])),d.createElementVNode("div",$le,[d.createVNode(o,{trigger:"hover"},{reference:d.withCtx(()=>[d.createElementVNode("a",jle,[d.createVNode(a,{height:"24",width:"24"})])]),default:d.withCtx(()=>[e[5]||(e[5]=d.createTextVNode(" Допомога "))]),_:1}),d.createVNode(o,{trigger:"hover"},{reference:d.withCtx(()=>[d.createElementVNode("a",Hle,[d.createVNode(p)])]),default:d.withCtx(()=>[e[6]||(e[6]=d.createTextVNode(" Сповіщення "))]),_:1}),e[12]||(e[12]=d.createElementVNode("div",{class:"h-[30px] w-[1px] bg-gray-200 ml-[10px] mr-[10px]"},null,-1)),d.createElementVNode("div",Ule,[d.createElementVNode("div",{onClick:e[1]||(e[1]=T=>i.isVisible=!0),class:"cursor-pointer"},[d.createVNode(o,{trigger:"hover"},{reference:d.withCtx(()=>{var T,D,N,B;return[(D=(T=i.userData)==null?void 0:T.user)!=null&&D.avatar?(d.openBlock(),d.createElementBlock("img",{key:0,class:"flex-shrink-0 size-[30px] rounded-full",src:(B=(N=i.userData)==null?void 0:N.user)==null?void 0:B.avatar,alt:"Image Description"},null,8,Wle)):(d.openBlock(),d.createElementBlock("div",qle,[d.createVNode(g)]))]}),default:d.withCtx(()=>[e[7]||(e[7]=d.createTextVNode(" Профіль "))]),_:1})]),i.isVisible?(d.openBlock(),d.createElementBlock("div",{key:0,onClick:e[3]||(e[3]=d.withModifiers(()=>{},["stop"])),class:"fixed p-2 bg-white w-[240px] top-[55px] right-[20px] rounded-xl z-[1] shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] dark:shadow-[0_10px_40px_10px_rgba(0,0,0,0.2)] dark:bg-neutral-900 block"},[d.createVNode(y,{to:"profile",disabled:!0,class:"py-2 px-2.5 flex items-center gap-3 rounded-lg hover:bg-gray-100 focus:outline-none focus:bg-gray-100 dark:hover:bg-neutral-800 dark:focus:bg-neutral-800"},{default:d.withCtx(()=>{var T,D,N,B,L,U,Z,Y,ue,pe;return[(D=(T=i.userData)==null?void 0:T.user)!=null&&D.avatar?(d.openBlock(),d.createElementBlock("img",{key:0,class:"rounded-full shrink-0 size-10",src:(B=(N=i.userData)==null?void 0:N.user)==null?void 0:B.avatar,alt:"Image Description"},null,8,Gle)):(d.openBlock(),d.createElementBlock("div",Yle,[d.createVNode(g,{class:"w-[16px]"})])),d.createElementVNode("div",Zle,[d.createElementVNode("span",Xle,d.toDisplayString(((U=(L=i.userData)==null?void 0:L.user)==null?void 0:U.username)||((Y=(Z=i.userData)==null?void 0:Z.user)==null?void 0:Y.user_name)||"User User"),1),d.createElementVNode("p",Kle,d.toDisplayString(((pe=(ue=i.userData)==null?void 0:ue.user)==null?void 0:pe.email)||"email не вказано"),1)])]}),_:1}),e[10]||(e[10]=d.createElementVNode("div",{class:"my-2 mx-2.5 h-px bg-gray-200 dark:bg-neutral-700"},null,-1)),d.createElementVNode("ul",Jle,[d.createElementVNode("li",null,[d.createVNode(y,{to:"profile",class:"w-full flex items-center gap-x-3.5 py-2 px-2.5 text-sm text-gray-800 rounded-lg hover:bg-gray-100 focus:outline-none focus:bg-gray-100 dark:text-white dark:hover:bg-neutral-800 dark:focus:bg-neutral-800",disabled:"true"},{default:d.withCtx(()=>[d.createVNode(v,{class:"size-4"}),e[8]||(e[8]=d.createTextVNode(" Профіль "))]),_:1})])]),e[11]||(e[11]=d.createElementVNode("div",{class:"my-2 mx-2.5 h-px bg-gray-200 dark:bg-neutral-700"},null,-1)),d.createElementVNode("p",null,[d.createElementVNode("button",{type:"button",onClick:e[2]||(e[2]=(...T)=>s.logout&&s.logout(...T)),class:"w-full flex items-center gap-x-3.5 py-2 px-2.5 text-sm text-gray-800 rounded-lg hover:bg-gray-100 hover:text-red-500 focus:outline-none focus:bg-gray-100 focus:text-red-500 dark:text-white dark:hover:bg-neutral-800 dark:focus:bg-neutral-800 dark:hover:text-red-500 dark:focus:text-red-500"},[d.createVNode(w,{class:"size-4"}),e[9]||(e[9]=d.createTextVNode(" Вийти "))])])])):d.createCommentVNode("",!0)])])],2)}const ece={components:{navbar:Lle,AdminHeader:Fe(Fle,[["render",Qle]])},data(){return{showMenu:!1}},computed:{isMenu(){return Bi.value||null},header(){var t,e;return((t=it.value)==null?void 0:t.header)===!1?!1:((e=it.value)==null?void 0:e.header)||"admin-header"}}},tce={class:"admin-wrapper"},nce={class:"flex flex-col w-full"};function rce(t,e,n,r,i,s){const a=d.resolveComponent("navbar"),o=d.resolveComponent("router-view");return d.openBlock(),d.createElementBlock("div",tce,[d.createVNode(a),i.showMenu?(d.openBlock(),d.createElementBlock("div",{key:0,onClick:e[0]||(e[0]=p=>i.showMenu=!1),class:"z-[10] lg:hidden transition duration fixed inset-0 bg-gray-900 bg-opacity-50 dark:bg-opacity-80 dark:bg-neutral-900"})):d.createCommentVNode("",!0),d.createElementVNode("div",nce,[s.isMenu?(d.openBlock(),d.createElementBlock(d.Fragment,{key:0},[s.header?(d.openBlock(),d.createBlock(d.resolveDynamicComponent(s.header),{key:0})):d.createCommentVNode("",!0),d.createVNode(o)],64)):d.createCommentVNode("",!0)])])}const ice=Object.freeze(Object.defineProperty({__proto__:null,default:Fe(ece,[["render",rce],["__scopeId","data-v-804a7309"]])},Symbol.toStringTag,{value:"Module"})),sce={data(){return{currentSort:""}},props:{data:{type:Object,default:()=>null},activeColumn:{type:String}},mounted(){this.$emit("update-ref",this.$refs.column)},computed:{label(){var t,e;return((t=this.data)==null?void 0:t.ua)||((e=this.data)==null?void 0:e.label)||this.data.title||"null"},selectedSortParam(){var t,e;return(e=(t=this.$route)==null?void 0:t.query)==null?void 0:e.sort},getVisibleIcon(){return this.data.format!=="image"&&this.data.format!=="verify"}},watch:{activeColumn(t){t!==this.data.name&&(this.currentSort="")}},methods:{changeCurrentSort(t){switch(t){case"":return"asc";case"asc":return"desc";case"desc":return"";default:return""}},handleClickSortBtn(t){this.$emit("change-active",this.data.name),this.currentSort=this.changeCurrentSort(t);const e=this.$route.query,{sort:n,...r}=e,i=this.currentSort?`${this.data.name}-${this.currentSort}`:"";this.$router.replace({query:{...r,...i&&{sort:i}}})},isValueEqualToSelected(t){return`${this.data.name}-${t}`===this.selectedSortParam}}},oce={scope:"col",class:"text-start",ref:"column"},ace={class:"w-[24px]"},lce={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 cce(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("th",oce,[s.getVisibleIcon?(d.openBlock(),d.createElementBlock("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:e[0]||(e[0]=a=>s.handleClickSortBtn(i.currentSort))},[d.createTextVNode(d.toDisplayString(s.label)+" ",1),d.createElementVNode("span",ace,[i.currentSort?(d.openBlock(),d.createElementBlock("svg",{key:0,class:d.normalizeClass(["shrink-0 size-3.5",{"rotate-180":i.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"},e[1]||(e[1]=[d.createElementVNode("path",{d:"m5 12 7-7 7 7"},null,-1),d.createElementVNode("path",{d:"M12 19V5"},null,-1)]),2)):d.createCommentVNode("",!0)])])):(d.openBlock(),d.createElementBlock("p",lce,d.toDisplayString(s.label),1))],512)}const dce=Fe(sce,[["render",cce]]),uce={components:{IconMore:Eg,IconDelete:gx,IconEdit:yx},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(t=>typeof t=="object")}},methods:{openConfirm(){this.isDeleteConfirm=!0,document.querySelector("body").click()},async getData(){var t;try{const{data:e}=await Ue.get(`/api/table/${this.table}/${(t=this.item)==null?void 0:t.id}`);this.formValue=e}catch(e){console.error(e)}},doSomethingOnCancel(){this.formVisible=!1},async deleteElement(){var t,e;try{const{data:n}=await Ue.get(`/api/table/${this.table}/${(t=this.item)==null?void 0:t.id}`);await Ue.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:(e=n==null?void 0:n.response)==null?void 0:e.data,type:"error"})}finally{this.isDeleteConfirm=!1}},async customButtonAction(t){var e,n;document.querySelector("body").click(),t!=null&&t.form?(await this.$v3plugin.$form({form:t==null?void 0:t.form,id:(e=this.item)==null?void 0:e.id,api:t==null?void 0:t.api,title:t==null?void 0:t.title}),await this.$emit("update-table")):(await this.$v3plugin.$api({confirm:t==null?void 0:t.confirm,api:t==null?void 0:t.api,method:t==null?void 0:t.method,id:(n=this.item)==null?void 0:n.id,isId:(t==null?void 0:t.isId)||!1}),await this.$emit("update-table"))}}},hce={class:"inline-flex"},fce={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"},pce={class:"flex flex-col items-start"},mce=["onClick"],gce={class:"text-gray-800"},yce={key:1,class:"h-[1px] w-[80%] bg-gray-200 ml-auto mr-auto"},bce={class:"flex justify-end p-[16px] pr-0 gap-x-3"};function _ce(t,e,n,r,i,s){const a=d.resolveComponent("IconMore"),o=d.resolveComponent("IconEdit"),p=d.resolveComponent("router-link"),g=d.resolveComponent("IconDelete"),y=d.resolveComponent("VsPopover"),v=d.resolveComponent("VsConfirm");return d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createElementVNode("div",hce,[d.createVNode(y,{trigger:"click",placement:"bottom-left"},{reference:d.withCtx(()=>[d.createElementVNode("button",fce,[d.createVNode(a,{height:"16",width:"16"})])]),default:d.withCtx(()=>{var w,T,D,N,B;return[d.createElementVNode("div",pce,[(w=n.actions)!=null&&w.includes("edit")&&n.isForm?(d.openBlock(),d.createBlock(p,{key:0,to:`/edit?table=${(D=(T=t.$route)==null?void 0:T.params)==null?void 0:D.catchAll}&id=${(N=n.item)==null?void 0:N.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:d.withCtx(()=>[d.createVNode(o,{color:"#000"}),e[4]||(e[4]=d.createTextVNode(" Редагувати "))]),_:1},8,["to"])):d.createCommentVNode("",!0),(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(s.getCustomActions,(L,U)=>(d.openBlock(),d.createElementBlock("button",{key:U,onClick:Z=>s.customButtonAction(L),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"},[d.createVNode(g,{class:"opacity-0"}),d.createElementVNode("span",gce,d.toDisplayString(L==null?void 0:L.label),1)],8,mce))),128)),n.isForm?(d.openBlock(),d.createElementBlock("div",yce)):d.createCommentVNode("",!0),(B=n.actions)!=null&&B.includes("del")?(d.openBlock(),d.createElementBlock("button",{key:2,onClick:e[0]||(e[0]=d.withModifiers((...L)=>s.openConfirm&&s.openConfirm(...L),["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"},[d.createVNode(g),e[5]||(e[5]=d.createElementVNode("span",{class:"text-gray-800"},"Видалити",-1))])):d.createCommentVNode("",!0)])]}),_:1})]),d.createVNode(v,{visible:i.isDeleteConfirm,"onUpdate:visible":e[3]||(e[3]=w=>i.isDeleteConfirm=w),size:"small",title:"Ви впевнені?"},{default:d.withCtx(()=>[e[6]||(e[6]=d.createElementVNode("p",{class:"mt-1 text-sm text-gray-600 dark:text-neutral-400"}," Ви впевнені, що хочете видалити цей об'єкт? ",-1)),d.createElementVNode("div",bce,[d.createElementVNode("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:e[1]||(e[1]=w=>i.isDeleteConfirm=!1)}," Скасувати "),d.createElementVNode("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:e[2]||(e[2]=(...w)=>s.deleteElement&&s.deleteElement(...w))}," Так, я впевнена(ий) ")])]),_:1},8,["visible"])],64)}const xce=Fe(uce,[["render",_ce]]),vce={},wce={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 kce(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",wce,e[0]||(e[0]=[d.createElementVNode("path",{d:"m3 16 4 4 4-4"},null,-1),d.createElementVNode("path",{d:"M7 20V4"},null,-1),d.createElementVNode("path",{d:"m21 8-4-4-4 4"},null,-1),d.createElementVNode("path",{d:"M17 4v16"},null,-1)]))}const Ece=Fe(vce,[["render",kce]]),Sce={},Cce={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 Tce(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",Cce,e[0]||(e[0]=[d.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),d.createElementVNode("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),d.createElementVNode("path",{d:"M9 12l2 2l4 -4"},null,-1)]))}const Ace={components:{IconExport:Ece,IconChevronDown:xf,IconSuccess:Fe(Sce,[["render",Tce]])},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(t){t||(this.format="",this.cols=[],this.activeAction="",this.isSuccessTemplate=!1)}},computed:{color(){return it.value.buttonColor||"blue"}},methods:{async exportTable(){var t;if(!((t=this.cols)!=null&&t.length)){this.$notify({type:"error",title:"Помилка",message:"Оберіть колонки для експорту!"});return}if(!this.format){this.$notify({type:"error",title:"Помилка",message:"Оберіть формат!"});return}try{const e=await Ue.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 e.data.text(),r=n!=null&&n.includes(";")?null:JSON==null?void 0:JSON.parse(n),i=new Blob([e.data],{type:"application/octet-stream"}),s=window.URL.createObjectURL(i),a=document.createElement("a");if(a.href=s,a.setAttribute("download",`${this.table.split(".")[0]}.${this.format}`),document.body.appendChild(a),typeof r=="string"){this.exportTable();return}a.click(),document.body.removeChild(a),window.URL.revokeObjectURL(s),this.$notify({type:"success",title:"Експорт",message:"Файл успішно експортовано!"}),this.isSuccessTemplate=!0}catch(e){console.log(e),this.$notify({type:"error",title:"Помилка",message:"Не вдалося експортувати файл."})}},selectFormat(t){this.format=t},choceAll(){var t;this.cols=(t=this.columns)==null?void 0:t.map(e=>e==null?void 0:e.name),this.activeAction="choceAll"},clearAll(){this.cols=[],this.activeAction="clearAll"},choceVisible(){var t,e;this.cols=(e=(t=this.columns)==null?void 0:t.filter(n=>(n==null?void 0:n.hidden)!==!0))==null?void 0:e.map(n=>n==null?void 0:n.name),this.activeAction="choceVisible"}}},Mce={key:0,class:"flex flex-col items-center"},Dce={key:1,class:"p-4"},Ice={class:"pb-5 mb-5 border-b border-gray-200 last:pb-0 last:mb-0 last:border-b-0 dark:border-neutral-700"},Pce={class:"flex items-center gap-[10px] -ml-[10px] my-[10px]"},Nce=["onClick"],Rce={key:0,class:"block h-[8px] w-[8px] rounded-full bg-blue-500"},Oce={class:"mt-2 flex row flex-wrap gap-y-[5px] gap-x-[10px]"},Bce={class:"pb-5 mb-5 border-b border-gray-200 last:pb-0 last:mb-0 last:border-b-0 dark:border-neutral-700"},Vce={class:"mt-2 space-y-2"},zce=["id","onChange"],Lce=["for"],Fce={key:0,class:"flex w-full justify-end p-[20px] gap-[6px] border-t"},$ce={key:1,class:"flex w-full justify-end p-[20px] gap-[6px] border-t"};function jce(t,e,n,r,i,s){const a=d.resolveComponent("IconExport"),o=d.resolveComponent("IconSuccess"),p=d.resolveComponent("VsCheckbox"),g=d.resolveComponent("VsDialog");return d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createElementVNode("button",{onClick:e[0]||(e[0]=y=>i.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"},[d.createVNode(a,{height:"16",width:"16"}),e[7]||(e[7]=d.createTextVNode(" Експорт "))]),d.createVNode(g,{visible:i.isOpen,"onUpdate:visible":e[6]||(e[6]=y=>i.isOpen=y),title:"Експорт таблиці",size:"small",closeClickBack:!0},{footer:d.withCtx(()=>[i.isSuccessTemplate?(d.openBlock(),d.createElementBlock("div",Fce,[d.createElementVNode("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:e[2]||(e[2]=y=>i.isOpen=!1)}," Закрити "),d.createElementVNode("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:e[3]||(e[3]=y=>i.isSuccessTemplate=!1)}," Вигрузити ще ")])):(d.openBlock(),d.createElementBlock("div",$ce,[d.createElementVNode("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:e[4]||(e[4]=y=>i.isOpen=!1)}," Скасувати "),d.createElementVNode("button",{type:"button",class:d.normalizeClass(`inline-flex items-center justify-center px-3 py-2 text-sm font-medium text-white align-middle bg-${s.color}-700 rounded-lg shadow-sm text-nowrap gap-x-2 text-start hover:bg-${s.color}-800 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:ring-1 focus:ring-${s.color}-300 dark:focus:ring-${s.color}-500`),onClick:e[5]||(e[5]=(...y)=>s.exportTable&&s.exportTable(...y))}," Завантажити таблицю ",2)]))]),default:d.withCtx(()=>[i.isSuccessTemplate?(d.openBlock(),d.createElementBlock("div",Mce,[d.createVNode(o,{height:"100",width:"100",class:"text-green-200 mb-[20px]"}),e[8]||(e[8]=d.createElementVNode("h2",null,"Звіт сформовано і збережено",-1))])):(d.openBlock(),d.createElementBlock("div",Dce,[d.createElementVNode("div",Ice,[e[9]||(e[9]=d.createElementVNode("h2",{class:"text-sm font-[600] text-gray-500"}," Виберіть стовпці таблиці для експорту: ",-1)),d.createElementVNode("div",Pce,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(i.actions,y=>(d.openBlock(),d.createElementBlock("button",{key:y==null?void 0:y.name,onClick:y==null?void 0:y.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"},[d.createElementVNode("span",{class:d.normalizeClass(["h-[14px] w-[14px] border rounded-full flex items-center justify-center",{"border-blue-500":(y==null?void 0:y.name)===i.activeAction}])},[(y==null?void 0:y.name)===i.activeAction?(d.openBlock(),d.createElementBlock("span",Rce)):d.createCommentVNode("",!0)],2),d.createTextVNode(" "+d.toDisplayString(y==null?void 0:y.label),1)],8,Nce))),128))]),d.createElementVNode("div",Oce,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(n.columns,(y,v)=>(d.openBlock(),d.createElementBlock("div",{class:"flex items-center",key:v,style:{width:"calc((100% - 10px) / 2)"}},[d.createVNode(p,{class:"[&>label]:text-sm [&>label]:text-gray-800 [&>label]:ms-3 !gap-x-[1px] !p-0",modelValue:i.cols,"onUpdate:modelValue":e[1]||(e[1]=w=>i.cols=w),value:y==null?void 0:y.name,label:y==null?void 0:y.ua},null,8,["modelValue","value","label"])]))),128))])]),d.createElementVNode("div",Bce,[e[10]||(e[10]=d.createElementVNode("h2",{class:"text-sm font-[600] text-gray-500"}," Виберіть формат таблиці: ",-1)),d.createElementVNode("div",Vce,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(i.tableFormats,(y,v)=>(d.openBlock(),d.createElementBlock("div",{class:"flex items-center",key:v},[d.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:y,onChange:w=>s.selectFormat(y)},null,40,zce),d.createElementVNode("label",{for:y,class:"text-sm text-gray-800 ms-3 dark:text-neutral-400"}," Формат "+d.toDisplayString(y),9,Lce)]))),128))])])]))]),_:1},8,["visible"])],64)}const Hce=Fe(Ace,[["render",jce]]),Uce={},Wce={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"};function qce(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",Wce,e[0]||(e[0]=[d.createStaticVNode('<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>',9)]))}const Gce=Fe(Uce,[["render",qce]]),Yce={props:{column:Object},emits:["update-column"],components:{IconCheck2:cd},data(){return{value:!1}},watch:{value(t){this.$emit("update-column",{...this.column,hidden:!t})}},computed:{color(){return it.value.buttonColor||"blue"}},mounted(){var t;((t=this.column)==null?void 0:t.hidden)!==!0&&(this.value=!0)}},Zce={class:"flex justify-between items-center py-1.5 px-3 cursor-pointer rounded-lg hover:bg-gray-100 has-[:disabled]:opacity-50 has-[:disabled]:pointer-events-none dark:hover:bg-neutral-800"},Xce={class:"flex justify-between flex-1 items-center gap-x-2.5 cursor-pointer text-[13px] text-gray-800 dark:text-neutral-300"};function Kce(t,e,n,r,i,s){var o,p;const a=d.resolveComponent("IconCheck2");return d.openBlock(),d.createElementBlock("div",Zce,[d.createElementVNode("label",Xce,[d.createTextVNode(d.toDisplayString(((o=n.column)==null?void 0:o.ua)||((p=n.column)==null?void 0:p.title))+" ",1),d.withDirectives(d.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":e[0]||(e[0]=g=>i.value=g),class:"hidden"},null,512),[[d.vModelCheckbox,i.value]]),d.createElementVNode("span",{class:d.normalizeClass(["flex items-center justify-center text-white border border-gray-300 rounded shrink-0 size-4 focus:ring-blue-500",[i.value?"bg-"+s.color+"-600 border-0":"bg-white"]])},[d.createVNode(a,{height:"12",width:"12"})],2)])])}const Jce={components:{IconColumns:Gce,AdminTableColumnsHiddenItem:Fe(Yce,[["render",Kce]])},emits:["update-columns"],props:{columns:Array},data(){return{searchValue:"",visible:!1}},computed:{filteredColumn(){var t;return(t=this.columns)==null?void 0:t.filter(e=>{var n,r,i,s,a,o;return((i=(n=e==null?void 0:e.ua)==null?void 0:n.toLowerCase())==null?void 0:i.includes((r=this.searchValue)==null?void 0:r.toLowerCase()))||((o=(s=e==null?void 0:e.title)==null?void 0:s.toLowerCase())==null?void 0:o.includes((a=this.searchValue)==null?void 0:a.toLowerCase()))})}},methods:{toggleVisible(){this.visible=!this.visible,this.visible?document.addEventListener("click",this.handleClickOutside):document.removeEventListener("click",this.handleClickOutside)},handleClickOutside(t){const e=this.$refs.wrapper;e&&!e.contains(t.target)&&(this.visible=!1,document.removeEventListener("click",this.handleClickOutside))},updateColumn(t){const e=this.columns.findIndex(r=>(r==null?void 0:r.name)===(t==null?void 0:t.name)),n=this.columns;n[e]=t,this.$emit("update-columns",[...n])}},beforeUnmount(){document.removeEventListener("click",this.handleClickOutside)}},Qce={class:"relative",ref:"wrapper"},ede={key:0,class:"absolute left-[50%] top-[110%] translate-x-[-50%] z-10 w-64 transition-[opacity,margin] duration bg-white rounded-xl shadow-lg dark:bg-neutral-900"},tde={class:"relative p-1 border-gray-200 border-y dark:border-neutral-800"},nde={class:"p-1 pt-3 max-h-80 overflow-y-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},rde={key:0,class:"block px-3 mb-2 text-xs text-gray-500 dark:text-neutral-500"},ide={class:"space-y-1"},sde={key:1,class:"flex items-center px-3 text-[13px] py-1.5 px-3 rounded-md cursor-pointer group"};function ode(t,e,n,r,i,s){const a=d.resolveComponent("IconColumns"),o=d.resolveComponent("AdminTableColumnsHiddenItem");return d.openBlock(),d.createElementBlock("div",Qce,[d.createElementVNode("button",{onClick:e[0]||(e[0]=(...p)=>s.toggleVisible&&s.toggleVisible(...p)),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"},[d.createVNode(a,{height:"20",width:"16"})]),d.createVNode(d.Transition,{name:"fade"},{default:d.withCtx(()=>{var p,g;return[i.visible?(d.openBlock(),d.createElementBlock("div",ede,[e[2]||(e[2]=d.createElementVNode("div",{class:"flex items-center justify-between h-[48px] px-4 py-2 gap-x-2 text-sm font-medium text-gray-800"}," Колонки ",-1)),d.createElementVNode("div",tde,[d.withDirectives(d.createElementVNode("input",{"onUpdate:modelValue":e[1]||(e[1]=y=>i.searchValue=y),type:"text",class:"py-1.5 px-3 block w-full border-transparent rounded-lg sm:text-sm text-base placeholder:text-gray-500 hover:bg-gray-100 focus:outline-none focus:border-transparent focus:ring-0 focus:bg-gray-100 disabled:opacity-100 disabled:pointer-events-none dark:bg-transparent dark:border-transparent dark:text-neutral-400 dark:placeholder:text-neutral-400 dark:hover:bg-neutral-800 dark:focus:ring-neutral-600 dark:focus:bg-neutral-800",placeholder:"Пошук",autofocus:""},null,512),[[d.vModelText,i.searchValue]])]),d.createElementVNode("div",nde,[(p=s.filteredColumn)!=null&&p.length?(d.openBlock(),d.createElementBlock("span",rde," Оберіть колонки для відображення ")):d.createCommentVNode("",!0),d.createElementVNode("div",ide,[(g=s.filteredColumn)!=null&&g.length?(d.openBlock(!0),d.createElementBlock(d.Fragment,{key:0},d.renderList(s.filteredColumn,(y,v)=>(d.openBlock(),d.createBlock(o,{key:v,column:y,onUpdateColumn:s.updateColumn},null,8,["column","onUpdateColumn"]))),128)):(d.openBlock(),d.createElementBlock("div",sde," Нічого не знайдено "))])])])):d.createCommentVNode("",!0)]}),_:1})],512)}const ade=Fe(Jce,[["render",ode]]),lde={},cde={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 dde(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",cde,e[0]||(e[0]=[d.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),d.createElementVNode("path",{d:"M5 12l14 0"},null,-1)]))}const ude={components:{IconPlus:Xd,IconMinus:Fe(lde,[["render",dde]])},props:{title:String,defaultValue:{type:Boolean,default:()=>!1}},data(){return{expanded:this.defaultValue}}},hde={class:"hs-accordion"},fde={class:"py-0.5 flex items-center gap-x-0.5 w-full"},pde={class:"text-sm font-medium"},mde={class:"relative inline-block w-full duration-150 cursor-pointer before:block before:absolute b"};function gde(t,e,n,r,i,s){const a=d.resolveComponent("IconPlus"),o=d.resolveComponent("IconMinus");return d.openBlock(),d.createElementBlock("div",null,[d.createElementVNode("div",null,[d.createElementVNode("div",hde,[d.createElementVNode("div",fde,[d.createElementVNode("div",{onClick:e[0]||(e[0]=p=>i.expanded=!i.expanded),class:"rounded-md cursor-pointer grow"},[d.createElementVNode("span",pde,d.toDisplayString(n.title),1)]),d.createElementVNode("button",{class:"flex items-center justify-center rounded-md size-6 hover:bg-gray-100",onClick:e[1]||(e[1]=p=>i.expanded=!i.expanded)},[i.expanded?(d.openBlock(),d.createBlock(o,{key:1,width:"14"})):(d.openBlock(),d.createBlock(a,{key:0}))])]),d.createVNode(d.Transition,{name:"fade"},{default:d.withCtx(()=>[d.withDirectives(d.createElementVNode("div",mde,[d.renderSlot(t.$slots,"default",{},void 0,!0)],512),[[d.vShow,i.expanded]])]),_:3})])])])}const yde={components:{AdminComponentIs:sf,AdminTree:Fe(ude,[["render",gde],["__scopeId","data-v-c6318482"]]),VsNoData:Dc,VsWidgetComments:CA,VsWidgetMap:bb,VsWidgetFileList:RE},props:{table:String,columns:Array,row:Object}},bde={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)"}},_de={style:{height:"calc(100vh - 360px)"},class:"pl-2"},xde={class:"flow-root mt-[10px]"},vde={class:"divide-y divide-gray-100 text-[12px]"},wde={class:"grid grid-cols-1 gap-1 py-3 even:bg-gray-50 sm:grid-cols-3 sm:gap-4"},kde={class:"font-medium text-gray-900"},Ede={class:"text-gray-700 sm:col-span-2"};function Sde(t,e,n,r,i,s){var g,y,v,w;const a=d.resolveComponent("AdminComponentIs"),o=d.resolveComponent("VsWidgetFileList"),p=d.resolveComponent("VsNoData");return d.openBlock(),d.createElementBlock("div",bde,[e[0]||(e[0]=d.createElementVNode("div",{class:"pl-[10px] py-[9px]"},[d.createElementVNode("h2",{class:"text-sm font-medium text-center"},"Інформація про об'єкт")],-1)),d.createElementVNode("div",_de,[(y=(g=t.$route)==null?void 0:g.query)!=null&&y.card?(d.openBlock(),d.createElementBlock(d.Fragment,{key:0},[d.createElementVNode("div",xde,[d.createElementVNode("dl",vde,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(n.columns,T=>(d.openBlock(),d.createElementBlock("div",wde,[d.createElementVNode("dt",kde,d.toDisplayString((T==null?void 0:T.ua)||(T==null?void 0:T.title)),1),d.createElementVNode("dd",Ede,[d.createVNode(a,{row:n.row,column:T,table:n.table},null,8,["row","column","table"])])]))),256))])]),(d.openBlock(),d.createBlock(o,{key:(v=n.row)==null?void 0:v.id,id:(w=n.row)==null?void 0:w.id,class:"mt-10"},null,8,["id"]))],64)):(d.openBlock(),d.createBlock(p,{key:1,text:"Оберіть один з об'єктів в таблиці для відображення інформаціі про нього"}))])])}const Cde=Fe(yde,[["render",Sde]]),Tde={emits:["filterChange"],props:{scheme:{type:Object},onFilters:{type:Number},table:{type:String}},components:{IconFilter:MA},data(){return{isFilters:!1}},methods:{closeFilter({target:t}){this.isFilters&&t.classList.contains("filter-container")&&(this.isFilters=!1)}}},Ade={key:0,class:"px-[7px] text-[10px] py-[1px] font-[700] text-white bg-blue-500 rounded-full"},Mde={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 Dde(t,e,n,r,i,s){const a=d.resolveComponent("IconFilter"),o=d.resolveComponent("VsFilter");return d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createElementVNode("button",{onClick:e[0]||(e[0]=p=>i.isFilters=!i.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"},[d.createVNode(a,{height:"16",width:"16"}),e[4]||(e[4]=d.createTextVNode(" Фільтри ")),n.onFilters?(d.openBlock(),d.createElementBlock("span",Ade,d.toDisplayString(n.onFilters),1)):d.createCommentVNode("",!0)]),d.createVNode(d.Transition,{name:"fade"},{default:d.withCtx(()=>{var p;return[(d.openBlock(),d.createBlock(d.Teleport,{to:"#modal"},[d.withDirectives(d.createElementVNode("div",{onClick:e[3]||(e[3]=(...g)=>s.closeFilter&&s.closeFilter(...g)),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)]"},[d.createElementVNode("div",Mde,[(p=n.scheme)!=null&&p.length?(d.openBlock(),d.createBlock(o,{key:0,ref:"filter",scheme:n.scheme,layout:"default","apply-vue-router":"",history:"",token:n.table,name:"filter",footer:!0,background:!0,onFilterChange:e[1]||(e[1]=g=>t.$emit("filterChange",g)),closeFilterBtn:!0,onFilterClose:e[2]||(e[2]=g=>i.isFilters=!1)},null,8,["scheme","token"])):d.createCommentVNode("",!0)])],512),[[d.vShow,i.isFilters]])]))]}),_:1})],64)}const Ide=Fe(Tde,[["render",Dde]]),Pde={props:{tabsList:{type:Array,default:()=>[]},filterState:String}},Nde={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"},Rde=["onClick"];function Ode(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("nav",Nde,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(n.tabsList,a=>(d.openBlock(),d.createElementBlock("button",{onClick:o=>t.$emit("update:filterState",a==null?void 0:a.name),class:d.normalizeClass(["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":(a==null?void 0:a.name)===n.filterState}])},d.toDisplayString(a==null?void 0:a.label),11,Rde))),256))])}const Bde=Fe(Pde,[["render",Ode]]),Vde={},zde={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 Lde(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",zde,e[0]||(e[0]=[d.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),d.createElementVNode("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 Fde={components:{IconFilter2:Fe(Vde,[["render",Lde]]),IconCheck2:cd},props:{filterCustom:String,customList:Array}},$de={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"},jde={class:"flex flex-col p-[2px] gap-[2px] w-[170px]"},Hde=["onClick"],Ude={class:"text-sm text-gray-800"};function Wde(t,e,n,r,i,s){const a=d.resolveComponent("IconFilter2"),o=d.resolveComponent("IconCheck2"),p=d.resolveComponent("VsPopover");return d.openBlock(),d.createBlock(p,{ref:"popover",placement:"bottom"},{reference:d.withCtx(()=>[d.createElementVNode("button",$de,[d.createVNode(a,{height:"20",width:"20"})])]),default:d.withCtx(()=>[d.createElementVNode("div",jde,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(n.customList,(g,y)=>(d.openBlock(),d.createElementBlock("button",{onClick:v=>{var w;t.$emit("update:filterCustom",g==null?void 0:g.name),(w=t.$refs)==null||w.popover.togglePopover()},key:y,class:d.normalizeClass(["flex items-center px-3 py-1 rounded-md cursor-pointer group hover:bg-gray-100",{"bg-gray-100":n.filterCustom===(g==null?void 0:g.name)}])},[d.createElementVNode("span",Ude,d.toDisplayString(g==null?void 0:g.label),1),n.filterCustom===(g==null?void 0:g.name)?(d.openBlock(),d.createBlock(o,{key:0,class:"ml-auto size-3 shrink-0"})):d.createCommentVNode("",!0)],10,Hde))),128)),d.createElementVNode("button",{class:"flex items-center px-3 py-1 rounded-md cursor-pointer group hover:bg-gray-100",onClick:e[0]||(e[0]=g=>{var y;t.$emit("update:filterCustom",void 0),(y=t.$refs)==null||y.popover.togglePopover()})}," Скинути фільтри ")])]),_:1},512)}const qde=Fe(Fde,[["render",Wde]]),Gde={class:"flex items-center gap-x-2"},Yde={__name:"admin-table-custom-buttons",props:{slots:Object,data:Object},setup(t){var o,p,g,y,v;const{asyncTemplateSlot:e}=(v=(y=(g=(p=(o=d.getCurrentInstance())==null?void 0:o.appContext)==null?void 0:p.app)==null?void 0:g.config)==null?void 0:y.globalProperties)==null?void 0:v.utils,n=d.ref(""),r=d.ref(""),i=t,s=()=>{var w,T,D,N,B;if((w=i.slots)!=null&&w.panelLeft||(r.value="div"),(D=(T=i.slots)==null?void 0:T.panelLeft)!=null&&D.includes("<")){const L=e("PanelLeft",(N=i.slots)==null?void 0:N.panelLeft,["name"]);r.value=L}else r.value=(B=i.slots)==null?void 0:B.panelLeft},a=()=>{var w,T,D,N,B;if((w=i.slots)!=null&&w.panelRight||(n.value="div"),(D=(T=i.slots)==null?void 0:T.panelRight)!=null&&D.includes("<")){const L=e("PanelRight",(N=i.slots)==null?void 0:N.panelRight,["name"]);n.value=L}else n.value=(B=i.slots)==null?void 0:B.panelRight};return s(),a(),(w,T)=>(d.openBlock(),d.createElementBlock("div",Gde,[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(r.value),{data:t.data},null,8,["data"])),(d.openBlock(),d.createBlock(d.resolveDynamicComponent(n.value),{data:t.data},null,8,["data"]))]))}},Zde={__name:"admin-custom-button-add",props:{slots:Object},setup(t){var s,a,o,p,g;const{asyncTemplateSlot:e}=(g=(p=(o=(a=(s=d.getCurrentInstance())==null?void 0:s.appContext)==null?void 0:a.app)==null?void 0:o.config)==null?void 0:p.globalProperties)==null?void 0:g.utils,n=d.ref(""),r=t;return(()=>{var y,v,w,T,D;if((y=r.slots)!=null&&y.addButton||(n.value="div"),(w=(v=r.slots)==null?void 0:v.addButton)!=null&&w.includes("<")){const N=e("addButton",(T=r.slots)==null?void 0:T.addButton,["IconPlus"]);n.value=N}else n.value=(D=r.slots)==null?void 0:D.addButton})(),(y,v)=>n.value?(d.openBlock(),d.createBlock(d.resolveDynamicComponent(n.value),{key:0,IconPlus:Xd})):d.createCommentVNode("",!0)}},Xde={key:0,class:"px-1 py-3 text-gray-800 font-[500]"},Kde={key:1,class:"px-1 py-3 text-gray-800 font-[700]"},Jde={__name:"admin-table-totals-list",props:{columns:{type:Array,default:()=>[]},agg:{type:Object,default:()=>{}}},setup(t){return(e,n)=>(d.openBlock(),d.createElementBlock("tr",null,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(t.columns,r=>{var i;return d.openBlock(),d.createElementBlock(d.Fragment,{key:r==null?void 0:r.name},[(i=t.agg)!=null&&i[r==null?void 0:r.name]?(d.openBlock(),d.createElementBlock("td",Xde,[d.createVNode(sf,{column:r,row:t.agg},null,8,["column","row"])])):(d.openBlock(),d.createElementBlock("td",Kde))],64)}),128))]))}},Qde={},eue={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 tue(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",eue,e[0]||(e[0]=[d.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),d.createElementVNode("path",{d:"M5 12l5 5l10 -10"},null,-1)]))}const nue=Fe(Qde,[["render",tue]]),rue=d.defineComponent({components:{IconChevronDown:cy,IconCheck:nue},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(t){this.page=t,this.updatePages(t)}},pageSizeLocal(t,e){e&&(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(t){const e=t.replace(/\D/g,"");if(e>this.pagesCount){this.$refs.currentPage.innerText=this.page;return}else this.$refs.currentPage.innerText=e;this.setCurrentPage(e)},updatePages(t){const e=Math.floor(this.maxPages/2);let n=Math.max(t-e,1),r=n+this.maxPages-1;r>this.pagesCount&&(r=this.pagesCount,n=Math.max(r-this.maxPages+1,1)),this.pages=Array.from({length:r-n+1},(i,s)=>n+s)},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(t){this.page=t,this.$emit("pageChange",this.page,this.pageSizeLocal),this.updatePages(t)},keydownEnter(t){t.preventDefault(),t.target.blur()}}}),iue={class:"flex items-center w-full"},sue={class:"flex items-center mx-[8px]"},oue={class:"min-h-[38px] flex justify-center items-center text-stone-500 py-2 px-1.5 text-sm"},aue={key:0,class:"flex items-center justify-center ml-3 gap-x-5"},lue={class:"relative"},cue={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%]"},due=["onClick"];function uue(t,e,n,r,i,s){const a=d.resolveComponent("IconChevronDown"),o=d.resolveComponent("IconCheck");return d.openBlock(),d.createElementBlock("nav",iue,[d.createElementVNode("button",{type:"button",onClick:e[0]||(e[0]=(...p)=>t.handleClickPrev&&t.handleClickPrev(...p)),class:d.normalizeClass(["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":t.disablePrevClick}])},[d.createVNode(a,{height:"16",width:"16",class:"rotate-90"})],2),d.createElementVNode("div",sue,[d.createElementVNode("span",{ref:"currentPage",contenteditable:"true",onKeydown:e[1]||(e[1]=d.withKeys((...p)=>t.keydownEnter&&t.keydownEnter(...p),["enter"])),onBlur:e[2]||(e[2]=p=>t.handleSetPage(p.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"},d.toDisplayString(t.page),545),e[5]||(e[5]=d.createElementVNode("span",{class:"min-h-[38px] flex justify-center items-center text-stone-500 py-2 px-1.5 text-sm"},"з",-1)),d.createElementVNode("span",oue,d.toDisplayString(t.pagesCount),1)]),d.createElementVNode("button",{type:"button",onClick:e[3]||(e[3]=(...p)=>t.handleClickNext&&t.handleClickNext(...p)),class:d.normalizeClass([{"opacity-50 pointer-events-none":t.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"])},[d.createVNode(a,{height:"16",width:"16",class:"-rotate-90"})],2),t.pageSizes.length?(d.openBlock(),d.createElementBlock("div",aue,[d.createElementVNode("div",lue,[d.withDirectives(d.createElementVNode("div",cue,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(t.pageSizes,p=>(d.openBlock(),d.createElementBlock("button",{type:"button",class:"w-full flex items-center gap-x-3.5 py-2 px-3 rounded-lg text-sm",onClick:g=>t.pageSizeLocal=p},[d.createTextVNode(d.toDisplayString(p)+" ",1),p===t.pageSizeLocal?(d.openBlock(),d.createBlock(o,{key:0,width:"14",height:"14",class:"text-blue-600"})):d.createCommentVNode("",!0)],8,due))),256))],512),[[d.vShow,t.isDropdownOpen]]),t.pageSizes.length?(d.openBlock(),d.createElementBlock("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:e[4]||(e[4]=p=>t.isDropdownOpen=!t.isDropdownOpen)},[d.createTextVNode(d.toDisplayString(t.pageSizeLocal)+" ",1),d.createVNode(a,{height:"16",width:"16"})])):d.createCommentVNode("",!0)])])):d.createCommentVNode("",!0)])}const hue={props:{table:String,title:String,search:String},components:{AdminTableControl:xce,AdminTableExport:Hce,AdminTableColumnsHidden:ade,AdminTableColumn:dce,AdminNodata:bx,IconPlus:Xd,IconSearch:ly,AdminTableCardInfo:Cde,IconOpenCard:EI,AdminComponentIs:sf,AdminTableFilters:Ide,AdminTableTabs:Bde,AdminTableCustomFilters:qde,AdminTableCustomButtons:Yde,AdminCustomButtonAdd:Zde,AdminTableTotalsList:Jde,AdminTablePagination:Fe(rue,[["render",uue]])},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 it.value.buttonColor||"blue"},fontSize(){return`text-[${it.value.fontSize||13}px]`},defaultPage(){var t,e;return((e=(t=this.$route)==null?void 0:t.query)==null?void 0:e.page)||1},columns(){var t,e;return(e=(t=this.tableData)==null?void 0:t.columns)==null?void 0:e.filter(n=>(n==null?void 0:n.hidden)!==!0)},isForm(){var t,e,n,r,i;return((t=this.tableData)==null?void 0:t.form)&&(((n=(e=this.tableData)==null?void 0:e.actions)==null?void 0:n.includes("add"))||((i=(r=this.tableData)==null?void 0:r.actions)==null?void 0:i.includes("edit")))},isNoData(){var t,e;return!((t=this.tableData)!=null&&t.rows)||!((e=this.columns)!=null&&e.length)},activeCardRow(){var t,e;return((e=(t=this.tableData)==null?void 0:t.rows)==null?void 0:e.find(n=>{var r,i;return(n==null?void 0:n.id)===((i=(r=this.$route)==null?void 0:r.query)==null?void 0:i.card)}))||{}},getActions(){var t;return(t=this.tableData)==null?void 0:t.actions}},watch:{async table(){this.tableData=null,this.columnsWidth={},await this.getTableData()},searchValue:{handler:Ov(async function(t){var e;this.page=1,await this.getTableData(),this.$router.push({...this.$route,query:{...(e=this.$route)==null?void 0:e.query,search:t||void 0,page:1}})},500)},$route:{async handler(t,e){var n,r;((n=t==null?void 0:t.params)==null?void 0:n.catchAll)!==((r=e==null?void 0:e.params)==null?void 0:r.catchAll)&&(this.visibleColumns=[],this.unmountedData(),this.getFilters(),await this.getTableData())},deep:!0},limit(t){var e;this.$router.replace({...this.$route,query:{...(e=this.$route)==null?void 0:e.query,limit:t}})},filterState(t){var e;t&&(this.$router.replace({...this.$route,query:{...(e=this.$route)==null?void 0:e.query,state:t}}),this.getTableData())},filterCustom(t){var e;this.$router.replace({...this.$route,query:{...(e=this.$route)==null?void 0:e.query,custom:t}}),this.getTableData()},columns(t){var e,n,r,i;this.visibleColumns=t==null?void 0:t.map(s=>s==null?void 0:s.name),this.initialHiddenColumns===((e=this.visibleColumns)==null?void 0:e.join(","))&&(this.visibleColumns=[]),this.$router.replace({...this.$route,query:{...(n=this.$route)==null?void 0:n.query,columns:(r=this.visibleColumns)!=null&&r.length?(i=this.visibleColumns)==null?void 0:i.join(","):void 0}})}},methods:{async checkUrlMounted(){var t,e,n,r,i,s,a,o,p,g,y,v,w,T,D,N,B,L,U,Z,Y;this.page=((e=(t=this.$route)==null?void 0:t.query)==null?void 0:e.page)||1,this.limit=((r=(n=this.$route)==null?void 0:n.query)==null?void 0:r.limit)||20,(s=(i=this.$route)==null?void 0:i.query)!=null&&s.filter&&(this.filters=((p=decodeURI((o=(a=this.$route)==null?void 0:a.query)==null?void 0:o.filter))==null?void 0:p.replaceAll("+"," "))||null),this.filters&&(this.onFilters=((y=(g=this.filters)==null?void 0:g.split("="))==null?void 0:y.length)-1),this.filterState=((w=(v=this.$route)==null?void 0:v.query)==null?void 0:w.state)||null,this.filterCustom=((D=(T=this.$route)==null?void 0:T.query)==null?void 0:D.custom)||null,this.searchValue=((B=(N=this.$route)==null?void 0:N.query)==null?void 0:B.search)||"",this.visibleColumns=((Z=(U=(L=this.$route)==null?void 0:L.query)==null?void 0:U.columns)==null?void 0:Z.split(","))||[],(Y=this.$route)!=null&&Y.query.card&&(this.isVisibleCardInfo=!0)},rowWidth(t){var n,r;const e=(r=(n=this.tableData)==null?void 0:n.columns)==null?void 0:r.find(i=>i.name===t);if(e){const i=e==null?void 0:e.width;return typeof i=="number"?`${i}px`:i!=null&&i.includes("px")?i:`${i}px`}},unmountedData(){this.page=1,this.visibleColumns=[],this.filterCustom=null,this.filterState=null,this.isVisibleCardInfo=!1,this.filterScheme=null,this.filters=null,this.onFilters=0,this.searchValue=""},async getTableData(){var t,e,n,r,i,s,a,o,p,g,y;try{const{data:v}=await Ue.get(`/api/template/table/${this.table}`),w=await Ue.get(`/api/table-data/${this.table}`,{params:{page:this.page,search:this.searchValue||null,limit:this.limit,filter:this.filters||null,order:((e=(t=this.$route)==null?void 0:t.query)==null?void 0:e.sort)||null,state:this.filterState||null,custom:this.filterCustom||null}});this.tableData={...v,...(w==null?void 0:w.data)||{}},this.initialHiddenColumns=(s=(i=(r=(n=this.tableData)==null?void 0:n.columns)==null?void 0:r.filter(T=>(T==null?void 0:T.hidden)!==!0))==null?void 0:i.map(T=>T==null?void 0:T.name))==null?void 0:s.join(","),(a=this.visibleColumns)!=null&&a.length?(o=this.tableData)==null||o.columns.forEach(T=>{var D;(D=this.visibleColumns)!=null&&D.includes(T==null?void 0:T.name)?T.hidden=!1:T.hidden=!0}):this.visibleColumns=(y=(g=(p=this.tableData)==null?void 0:p.columns)==null?void 0:g.filter(T=>(T==null?void 0:T.hidden)!==!0))==null?void 0:y.map(T=>T==null?void 0:T.name),setTimeout(()=>{var T,D;(D=(T=this.tableData)==null?void 0:T.columns)==null||D.forEach(({name:N})=>{var B,L,U,Z,Y,ue;(L=(B=this.columnsWidth)==null?void 0:B[N])!=null&&L.ref&&(this.columnsWidth[N].width=parseInt((ue=(Y=(Z=(U=this.columnsWidth)==null?void 0:U[N])==null?void 0:Z.ref)==null?void 0:Y.getBoundingClientRect())==null?void 0:ue.width)+"px")})})}catch{}},async getFilters(){var t;try{const{data:e}=await Ue.get(`/api/table-filter/${this.table}`);this.filterScheme=(t=e==null?void 0:e.list)==null?void 0:t.map(n=>({...n,label:(n==null?void 0:n.label)||(n==null?void 0:n.ua)}))}catch{}},async handlePageChange(t,e){const n=this.$route.query;this.page=t,this.limit=e,await this.$router.replace({query:{...n,page:t,limit:e}}),await this.getTableData()},async filterChange({url:t,state:e}){var n;this.filters=t!=="no-url"?t:null,this.onFilters=(n=Object.entries(e))==null?void 0:n.length,this.page=1,await this.getTableData()},changeActiveColumn(t){this.activeColumn=t,this.getTableData()},pushToCard(t){var e;((e=this.tableData)==null?void 0:e.card)===!1||this.$router.push(`/card/${this.table}/${t}`)},pushToLinkCard(t,e){t!=null&&t.link&&this.$router.push(`/card/${t==null?void 0:t.link}/${e==null?void 0:e[t==null?void 0:t.name]}`)},changeActiveCardInfo(t){var e;this.isVisibleCardInfo&&this.$router.push({...this.$route,query:{...(e=this.$route)==null?void 0:e.query,card:t}})},toggleCardInfo(){var t;this.isVisibleCardInfo=!this.isVisibleCardInfo,this.isVisibleCardInfo||this.$router.push({...this.$route,query:{...(t=this.$route)==null?void 0:t.query,card:void 0}})},getCustomStyles(t){return[t!=null&&t.link?" text-blue-800 hover:underline decoration-1":"",t!=null&&t.align?` text-${(t==null?void 0:t.align)||"left"}`:"",`text-${(t==null?void 0:t.wrap)||"wrap"}`]}}},fue={class:"w-[calc(100vw - 320px)] bg-gray-100"},pue={class:"h-[76px] mt-[15px] flex items-center justify-between mx-[20px] px-[20px] bg-white rounded-xl"},mue={class:"text-lg font-semibold text-gray-800 dark:text-neutral-200"},gue={class:"bg-white w-full rounded-xl p-[20px] pr-0"},yue={class:"flex"},bue={class:"flex gap-[6px] ml-auto"},_ue={class:"inline-block w-full align-middle"},xue={class:"sticky top-[-1px] z-[2] bg-white w-full after:absolute after:content-[''] after:block after:w-full after:h-px after:bg-stone-200"},vue={class:"right-0"},wue={key:0,class:"w-[70px] sticky right-0 top-0"},kue={class:"divide-y divide-gray-200 z-[1] relative text-gray-600"},Eue=["onClick"],Sue=["onClick"],Cue=["onClick"],Tue={class:"flex items-center justify-start w-full px-1 py-2"},Aue={class:"w-[200px] md:inline-flex hidden"},Mue={class:"text-sm text-gray-600 dark:text-neutral-400"},Due={class:"font-semibold text-gray-800 dark:text-neutral-200"},Iue={key:0};function Pue(t,e,n,r,i,s){var ke,Re,ze,$e,qe,fe,ft,Mt,Dt,Bt,qt,Xt,Zt,on,En,_n,gn,xn,De,Xe,Qe,pt,Gt,un,zt,Vt,yn,Ae,In,Vi,nn,bn,Vr;const a=d.resolveComponent("AdminCustomButtonAdd"),o=d.resolveComponent("IconPlus"),p=d.resolveComponent("router-link"),g=d.resolveComponent("AdminTableTabs"),y=d.resolveComponent("IconSearch"),v=d.resolveComponent("VsText"),w=d.resolveComponent("AdminTableCustomButtons"),T=d.resolveComponent("AdminTableCustomFilters"),D=d.resolveComponent("AdminTableColumnsHidden"),N=d.resolveComponent("AdminTableExport"),B=d.resolveComponent("AdminTableFilters"),L=d.resolveComponent("IconOpenCard"),U=d.resolveComponent("AdminTableColumn"),Z=d.resolveComponent("AdminComponentIs"),Y=d.resolveComponent("AdminTableControl"),ue=d.resolveComponent("AdminTableTotalsList"),pe=d.resolveComponent("AdminNodata"),ye=d.resolveComponent("AdminTablePagination"),Me=d.resolveComponent("AdminTableCardInfo");return d.openBlock(),d.createElementBlock("div",fue,[d.createElementVNode("div",pue,[d.createElementVNode("h2",mue,d.toDisplayString(n.title),1),s.isForm?(d.openBlock(),d.createElementBlock(d.Fragment,{key:0},[(Re=(ke=i.tableData)==null?void 0:ke.slots)!=null&&Re.addButton?(d.openBlock(),d.createBlock(a,{key:0,slots:(ze=i.tableData)==null?void 0:ze.slots},null,8,["slots"])):(d.openBlock(),d.createBlock(p,{key:1,to:`/add?table=${(qe=($e=t.$route)==null?void 0:$e.params)==null?void 0:qe.catchAll}`,class:d.normalizeClass(`inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-${s.color}-700 border border-transparent rounded-lg gap-x-2 hover:bg-${s.color}-800 hover:text-white`)},{default:d.withCtx(()=>[d.createVNode(o,{height:"16",width:"16"}),e[5]||(e[5]=d.createTextVNode(" Додати "))]),_:1},8,["to","class"]))],64)):d.createCommentVNode("",!0)]),d.createElementVNode("div",{style:d.normalizeStyle({height:((fe=t.$adminSettings)==null?void 0:fe.header)===!1?"calc(100vh - 91px)":"calc(100vh - 155px)"}),class:"bg-gray-100 p-[20px] flex pt-[10px] lg:w-[calc(100vw-260px)] w-[100vw]"},[d.createElementVNode("div",gue,[(Mt=(ft=i.tableData)==null?void 0:ft.filterState)!=null&&Mt.length?(d.openBlock(),d.createBlock(g,{key:0,tabsList:(Dt=i.tableData)==null?void 0:Dt.filterState,filterState:i.filterState,"onUpdate:filterState":e[0]||(e[0]=ut=>i.filterState=ut)},null,8,["tabsList","filterState"])):d.createCommentVNode("",!0),d.createElementVNode("div",yue,[d.createElementVNode("div",{class:d.normalizeClass([i.isVisibleCardInfo?"w-[calc(100%-360px)]":"w-full"])},[d.createElementVNode("div",{class:d.normalizeClass(["flex sm:grid sm:grid-cols-2 gap-x-2 sm:gap-x-5 mb-[10px] relative",{"pr-[20px]":!i.isVisibleCardInfo}])},[d.createVNode(y,{height:"14",width:"14",class:"absolute top-[10px] left-[14px] text-gray-500 z-[1]"}),d.createVNode(v,{modelValue:i.searchValue,"onUpdate:modelValue":e[1]||(e[1]=ut=>i.searchValue=ut),placeholder:n.search||"Пошук...",clearable:!0,class:"[&>input]:py-[7px] [&>input]:max-h-[36px] [&>input]:ps-10 [&>input]:pe-8 [&>input]:block [&>input]:w-full [&>input]:bg-gray-100 [&>input]:border-transparent [&>input]:rounded-lg [&>input]:text-sm [&>input]:focus:bg-white [&>input]:focus:border-blue-500 [&>input]:focus:ring-blue-500 [&>input]:disabled:opacity-50 [&>input]:disabled:pointer-events-none [&>input]:dark:bg-neutral-700 [&>input]:dark:border-transparent [&>input]:dark:text-neutral-400 [&>input]:dark:placeholder:text-neutral-400 dark:focus:bg-neutral-800 dark:focus:ring-neutral-600"},null,8,["modelValue","placeholder"]),d.createElementVNode("div",bue,[(Bt=i.tableData)!=null&&Bt.slots?(d.openBlock(),d.createBlock(w,{key:0,data:i.tableData,slots:(qt=i.tableData)==null?void 0:qt.slots},null,8,["data","slots"])):d.createCommentVNode("",!0),(Zt=(Xt=i.tableData)==null?void 0:Xt.filterCustom)!=null&&Zt.length?(d.openBlock(),d.createBlock(T,{key:1,customList:(on=i.tableData)==null?void 0:on.filterCustom,filterCustom:i.filterCustom,"onUpdate:filterCustom":e[2]||(e[2]=ut=>i.filterCustom=ut)},null,8,["customList","filterCustom"])):d.createCommentVNode("",!0),d.createVNode(D,{columns:(En=i.tableData)==null?void 0:En.columns,onUpdateColumns:e[3]||(e[3]=ut=>i.tableData.columns=ut)},null,8,["columns"]),((_n=i.tableData)==null?void 0:_n.export)!==!1?(d.openBlock(),d.createBlock(N,{key:2,table:n.table,columns:(gn=i.tableData)==null?void 0:gn.columns,page:i.page,"filter-state":i.filterState,"filter-custom":i.filterCustom,filters:i.filters},null,8,["table","columns","page","filter-state","filter-custom","filters"])):d.createCommentVNode("",!0),(xn=i.filterScheme)!=null&&xn.length?(d.openBlock(),d.createBlock(B,{key:3,scheme:i.filterScheme,onFilters:i.onFilters,table:n.table,onFilterChange:s.filterChange},null,8,["scheme","onFilters","table","onFilterChange"])):d.createCommentVNode("",!0),d.createElementVNode("button",{onClick:e[4]||(e[4]=(...ut)=>s.toggleCardInfo&&s.toggleCardInfo(...ut)),class:"py-2 px-2.5 max-h-[34px] 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"},[d.createVNode(L,{class:d.normalizeClass({"rotate-180 duration-300":!i.isVisibleCardInfo})},null,8,["class"])])])],2),d.createElementVNode("div",{class:d.normalizeClass(["flex items-start justify-start w-full space-y-5",{"pr-[20px]":!i.isVisibleCardInfo}])},[d.createElementVNode("div",{style:d.normalizeStyle({height:`calc(100vh - ${((De=t.$adminSettings)==null?void 0:De.header)===!1?(Qe=(Xe=i.tableData)==null?void 0:Xe.filterState)!=null&&Qe.length?330:270:(Gt=(pt=i.tableData)==null?void 0:pt.filterState)!=null&&Gt.length?380:320}px)`}),class:"overflow-x-auto w-full [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},[d.createElementVNode("div",_ue,[s.isNoData?(d.openBlock(),d.createBlock(pe,{key:1})):(d.openBlock(),d.createElementBlock("table",{key:0,class:d.normalizeClass([s.fontSize,"relative min-w-full my-2 divide-y divide-gray-200 table-fixed w-max dark:divide-neutral-700"])},[d.createElementVNode("thead",xue,[d.createElementVNode("tr",vue,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(s.columns,ut=>{var ir,Ir;return d.openBlock(),d.createBlock(U,{key:ut.name,style:d.normalizeStyle({width:((Ir=(ir=i.columnsWidth)==null?void 0:ir[ut==null?void 0:ut.name])==null?void 0:Ir.width)||s.rowWidth(ut==null?void 0:ut.name),textAlign:ut==null?void 0:ut.align,wordBreak:ut==null?void 0:ut.wrap}),data:ut,activeColumn:i.activeColumn,onUpdateRef:hr=>{var Yr,Zr;(Zr=(Yr=i.columnsWidth)==null?void 0:Yr[ut==null?void 0:ut.name])!=null&&Zr.ref||(i.columnsWidth[ut.name]={ref:hr})},onChangeActive:s.changeActiveColumn},null,8,["style","data","activeColumn","onUpdateRef","onChangeActive"])}),128)),(zt=(un=s.getActions)==null?void 0:un.filter(ut=>ut!=="add"&&ut!=="view"))!=null&&zt.length?(d.openBlock(),d.createElementBlock("th",wue)):d.createCommentVNode("",!0)])]),d.createElementVNode("tbody",kue,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList((Vt=i.tableData)==null?void 0:Vt.rows,(ut,ir)=>{var Ir,hr,Yr,Zr,Ge,li,vr,ci,zi,Ke,Te,je,Ct,Kt;return d.openBlock(),d.createElementBlock("tr",{key:(ut==null?void 0:ut.id)||ir,class:d.normalizeClass({"bg-gray-100":((hr=(Ir=t.$route)==null?void 0:Ir.query)==null?void 0:hr.card)===(ut==null?void 0:ut.id),"odd:bg-gray-50":((Zr=(Yr=t.$route)==null?void 0:Yr.query)==null?void 0:Zr.card)!==(ut==null?void 0:ut.id)})},[d.createElementVNode("td",{class:d.normalizeClass(["px-1 py-2.5 pr-5",[(Ge=s.columns[0])!=null&&Ge.align?`text-${((li=s.columns[0])==null?void 0:li.align)||"left"}`:""]]),onClick:Je=>s.changeActiveCardInfo(ut==null?void 0:ut.id)},[d.createElementVNode("button",{onClick:Je=>{s.pushToCard(ut==null?void 0:ut.id),s.pushToLinkCard(s.columns[0],ut)},class:d.normalizeClass(["font-medium text-start",[...s.getCustomStyles(s.columns[0]),((vr=this.tableData)==null?void 0:vr.card)===!1?"":` text-${s.color}-800 decoration-2 focus:outline-none focus:underline hover:text-${s.color}-700 hover:underline`]])},[d.createVNode(Z,{row:ut,column:s.columns[0],table:n.table,onUpdateTable:s.getTableData},null,8,["row","column","table","onUpdateTable"])],10,Sue)],10,Eue),(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList((ci=s.columns)==null?void 0:ci.slice(1),Je=>(d.openBlock(),d.createElementBlock("td",{onClick:Wn=>{s.changeActiveCardInfo(ut==null?void 0:ut.id),s.pushToLinkCard(Je,ut)},class:d.normalizeClass(["px-1 py-2.5 pr-5",s.getCustomStyles(Je)]),key:Je.name},[d.createVNode(Z,{row:ut,column:Je,table:n.table,onUpdateTable:s.getTableData},null,8,["row","column","table","onUpdateTable"])],10,Cue))),128)),(Ke=(zi=s.getActions)==null?void 0:zi.filter(Je=>Je!=="add"&&Je!=="view"))!=null&&Ke.length?(d.openBlock(),d.createElementBlock("td",{key:0,class:d.normalizeClass(["text-center sticky right-0 w-[80px] px-[10px]",{"bg-gray-50":((je=(Te=t.$route)==null?void 0:Te.query)==null?void 0:je.card)===(ut==null?void 0:ut.id)||!(ir%2),"bg-white":((Kt=(Ct=t.$route)==null?void 0:Ct.query)==null?void 0:Kt.card)!==(ut==null?void 0:ut.id)&&ir%2}])},[d.createVNode(Y,{actions:s.getActions,isForm:s.isForm,item:ut,table:n.table,onUpdateTable:s.getTableData},null,8,["actions","isForm","item","table","onUpdateTable"])],2)):d.createCommentVNode("",!0)],2)}),128))]),d.createVNode(ue,{columns:s.columns,agg:(yn=i.tableData)==null?void 0:yn.agg},null,8,["columns","agg"])],2))])],4)],2),d.createElementVNode("div",Tue,[d.createElementVNode("div",Aue,[d.createElementVNode("p",Mue,[d.createElementVNode("span",Due,[d.createTextVNode(" Об'єктів: "+d.toDisplayString(Intl.NumberFormat("ua").format(i.limit<((Ae=i.tableData)==null?void 0:Ae.filtered)?i.limit:(In=i.tableData)==null?void 0:In.filtered))+" ",1),i.limit<((Vi=i.tableData)==null?void 0:Vi.filtered)?(d.openBlock(),d.createElementBlock("span",Iue," з "+d.toDisplayString(Intl.NumberFormat("ua").format(((nn=i.tableData)==null?void 0:nn.filtered)||0)),1)):d.createCommentVNode("",!0)])])]),Math.ceil((bn=i.tableData)==null?void 0:bn.filtered)>10?(d.openBlock(),d.createBlock(ye,{key:0,class:"justify-end mr-10","default-page":parseInt(s.defaultPage),total:((Vr=i.tableData)==null?void 0:Vr.filtered)||0,onPageChange:s.handlePageChange,pageSize:parseInt(i.limit),pageSizes:[10,20,50,100]},null,8,["default-page","total","onPageChange","pageSize"])):d.createCommentVNode("",!0)])],2),d.createVNode(d.Transition,{name:"slide-fade"},{default:d.withCtx(()=>{var ut;return[i.isVisibleCardInfo?(d.openBlock(),d.createBlock(Me,{key:0,table:n.table,columns:(ut=i.tableData)==null?void 0:ut.columns,row:s.activeCardRow},null,8,["table","columns","row"])):d.createCommentVNode("",!0)]}),_:1})])])],4)])}const Nue={components:{AdminTable:Fe(hue,[["render",Pue],["__scopeId","data-v-1205a7b8"]])},data(){return{table:!1,interface:"",search:""}},watch:{$route:{async handler(){Bi!=null&&Bi.value||await this.getMenu(),await this.checkPageType()},deep:!0},title(t){var e;t&&(document.title=(((e=it.value)==null?void 0:e.titlePrefix)||"")+t)}},async mounted(){await this.checkPageType()},methods:{flattenMenu(t){const e=[];return t.forEach(n=>{n.menu?e.push(...this.flattenMenu(n.menu)):e.push(n)}),e},async checkPageType(){var r,i;const t=this.flattenMenu(Bi.value);t!=null&&t.length||this.$router.replace("/404");const e=t==null?void 0:t.find(s=>{var a,o;return(s==null?void 0:s.path)==((o=(a=this.$route)==null?void 0:a.params)==null?void 0:o.catchAll)});this.title=e==null?void 0:e.ua,e||this.$router.replace("/404"),e!=null&&e.component&&this.$router.replace((i=(r=this.$route)==null?void 0:r.params)==null?void 0:i.catchAll);const n=e==null?void 0:e.table;this.table=n||!1,this.search=(e==null?void 0:e.search)||"",!n&&this.getInterface()},async getInterface(){var t,e;try{const{data:n}=await Ue.get(`/api/template/interface/${((e=(t=this.$route)==null?void 0:t.params)==null?void 0:e.catchAll)||""}`);this.interface=n||""}catch{this.interface=""}}}},Rue=["innerHTML"];function Oue(t,e,n,r,i,s){const a=d.resolveComponent("AdminTable");return i.table?(d.openBlock(),d.createBlock(a,{key:0,table:i.table,title:t.title,search:i.search},null,8,["table","title","search"])):(d.openBlock(),d.createElementBlock("div",{key:1,class:"w-full bg-gray-50",style:{height:"calc(100vh - 120px)"},innerHTML:i.interface},null,8,Rue))}const Bue=Object.freeze(Object.defineProperty({__proto__:null,default:Fe(Nue,[["render",Oue]])},Symbol.toStringTag,{value:"Module"}));return DI});
@@ -1,5 +1,5 @@
1
1
  import { resolveComponent as e, createBlock as r, openBlock as t } from "vue";
2
- import { _ as c } from "./import-file-DyHdxyPP.js";
2
+ import { _ as c } from "./import-file-Cro1RJWt.js";
3
3
  const n = {};
4
4
  function s(_, p, a, i, f, m) {
5
5
  const o = e("router-view");
@@ -1,4 +1,4 @@
1
- import { _ as $, f as d, u as k, s as V } from "./import-file-DyHdxyPP.js";
1
+ import { _ as $, f as d, u as k, s as V } from "./import-file-Cro1RJWt.js";
2
2
  import { resolveComponent as j, createElementBlock as g, openBlock as p, createElementVNode as m, createCommentVNode as b, normalizeClass as x, normalizeStyle as y, createBlock as E } from "vue";
3
3
  const O = {
4
4
  data() {
@@ -3724,27 +3724,27 @@ const lB = [
3724
3724
  {
3725
3725
  name: "edit",
3726
3726
  path: "/edit",
3727
- component: () => import("./edit-page-sxUa27zw.js")
3727
+ component: () => import("./edit-page-_DF3uoYz.js")
3728
3728
  },
3729
3729
  {
3730
3730
  name: "add",
3731
3731
  path: "/add",
3732
- component: () => import("./add-page-DHcV6ZVu.js")
3732
+ component: () => import("./add-page-Dt8lgbvx.js")
3733
3733
  },
3734
3734
  {
3735
3735
  path: "/profile",
3736
3736
  name: "profile",
3737
- component: () => import("./profile-page-DmjElRBr.js")
3737
+ component: () => import("./profile-page-BJf6JVWZ.js")
3738
3738
  },
3739
3739
  {
3740
3740
  name: "card-view",
3741
3741
  path: "/card",
3742
- component: () => import("./card-view-fIhBcWi3.js"),
3742
+ component: () => import("./card-view-aNoH4d5f.js"),
3743
3743
  children: [
3744
3744
  {
3745
3745
  name: "table",
3746
3746
  path: ":table",
3747
- component: () => import("./card-view-fIhBcWi3.js"),
3747
+ component: () => import("./card-view-aNoH4d5f.js"),
3748
3748
  children: [
3749
3749
  {
3750
3750
  name: "card",
@@ -3805,14 +3805,14 @@ const fB = /* @__PURE__ */ ft(cB, [["render", hB]]), pB = (t) => {
3805
3805
  {
3806
3806
  path: "/",
3807
3807
  name: "home",
3808
- component: () => import("./admin-view-CyAdQyhH.js"),
3808
+ component: () => import("./admin-view-CNfEVdPq.js"),
3809
3809
  children: [
3810
3810
  ...e,
3811
3811
  ...t,
3812
3812
  // { path: '/', redirect: '/home' },
3813
3813
  {
3814
3814
  path: "/:catchAll(.*)",
3815
- component: () => import("./admin-interface-sixpdw0Z.js")
3815
+ component: () => import("./admin-interface-CTf14Mox.js")
3816
3816
  }
3817
3817
  ]
3818
3818
  }
@@ -1,4 +1,4 @@
1
- import { _ as n, f as m } from "./import-file-DyHdxyPP.js";
1
+ import { _ as n, f as m } from "./import-file-Cro1RJWt.js";
2
2
  import { u as p } from "./user-B_2kh6ic.js";
3
3
  import { resolveComponent as f, createElementBlock as d, openBlock as u, createElementVNode as o, createBlock as h, createCommentVNode as b } from "vue";
4
4
  const x = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengis/admin",
3
- "version": "0.3.79",
3
+ "version": "0.3.80",
4
4
  "description": "This project Softpro Admin",
5
5
  "main": "dist/admin.js",
6
6
  "type": "module",