@opengis/admin 0.1.24 → 0.1.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{IconSearch-C8Y-Yjr2.js → IconSearch-DOCujn58.js} +1 -1
- package/dist/{add-page-BspLXytu.js → add-page-YE2OHATZ.js} +1 -1
- package/dist/{admin-interface-81GXyCpn.js → admin-interface-DhsF_Hxe.js} +2 -2
- package/dist/{admin-view-DaFjKeQf.js → admin-view-QFp8Pseb.js} +3 -3
- package/dist/admin.js +1 -1
- package/dist/admin.umd.cjs +1 -1
- package/dist/{card-page-utYuShXw.js → card-page-D5KxxQww.js} +1 -1
- package/dist/{card-view-CboNdj7O.js → card-view-C3M-hYVC.js} +1 -1
- package/dist/{edit-page-CZXJ8D5x.js → edit-page-C9nSZC01.js} +1 -1
- package/dist/{import-file-Ce09Q27V.js → import-file-DFHqs_6d.js} +7 -7
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { openBlock as o, createElementBlock as r, createElementVNode as t } from "vue";
|
|
2
|
-
import { _ as n } from "./import-file-
|
|
2
|
+
import { _ as n } from "./import-file-DFHqs_6d.js";
|
|
3
3
|
const s = {}, c = {
|
|
4
4
|
class: "shrink-0 size-4 text-gray-400 dark:text-white/60",
|
|
5
5
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { u } from "./userMenu-CT1xO2Pt.js";
|
|
2
|
-
import { _ as b, a as c } from "./import-file-
|
|
2
|
+
import { _ as b, a as c } from "./import-file-DFHqs_6d.js";
|
|
3
3
|
import { resolveComponent as h, openBlock as i, createElementBlock as d, createElementVNode as a, createBlock as p, createCommentVNode as f } from "vue";
|
|
4
4
|
const g = {
|
|
5
5
|
data() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { _ as b, a as v } from "./import-file-
|
|
1
|
+
import { _ as b, a as v } from "./import-file-DFHqs_6d.js";
|
|
2
2
|
import { u as B } from "./userMenu-CT1xO2Pt.js";
|
|
3
3
|
import { openBlock as o, createElementBlock as i, createStaticVNode as A, createTextVNode as $, toDisplayString as S, createCommentVNode as w, createElementVNode as l, Fragment as x, resolveComponent as u, createVNode as h, withCtx as _, createBlock as y, withModifiers as ee, renderList as C, withDirectives as Q, vModelCheckbox as te, normalizeClass as re, resolveDynamicComponent as K, Transition as le, vShow as ne } from "vue";
|
|
4
|
-
import { I as se } from "./IconSearch-
|
|
4
|
+
import { I as se } from "./IconSearch-DOCujn58.js";
|
|
5
5
|
const oe = {}, ae = {
|
|
6
6
|
class: "h21yx vs0hq",
|
|
7
7
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { _ as h, a as D } from "./import-file-
|
|
1
|
+
import { _ as h, a as D } from "./import-file-DFHqs_6d.js";
|
|
2
2
|
import { u as y } from "./userMenu-CT1xO2Pt.js";
|
|
3
3
|
import { openBlock as c, createElementBlock as u, createElementVNode as o, createStaticVNode as N, resolveComponent as d, normalizeClass as v, createTextVNode as $, toDisplayString as k, createVNode as p, Transition as O, withCtx as V, withDirectives as S, Fragment as M, renderList as B, vShow as T, createCommentVNode as Q } from "vue";
|
|
4
|
-
import { I as A } from "./IconSearch-
|
|
4
|
+
import { I as A } from "./IconSearch-DOCujn58.js";
|
|
5
5
|
const G = {}, q = {
|
|
6
6
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7
7
|
viewBox: "0 0 24 24",
|
|
@@ -173,7 +173,7 @@ const a1 = /* @__PURE__ */ h(t1, [["render", s1]]), l1 = {
|
|
|
173
173
|
}), e;
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
|
-
}, c1 = { class: "flex flex-col h-[100vh] border-r w-[
|
|
176
|
+
}, c1 = { class: "flex flex-col h-[100vh] border-r w-[260px] shrink-0" }, u1 = { class: "relative" }, i1 = { class: "p-[16px] 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" }, p1 = { class: "pb-3 w-full flex flex-col flex-wrap" }, d1 = {
|
|
177
177
|
key: 0,
|
|
178
178
|
class: "flex flex-col gap-[6px]"
|
|
179
179
|
}, h1 = {
|
package/dist/admin.js
CHANGED
package/dist/admin.umd.cjs
CHANGED
|
@@ -626,4 +626,4 @@ uniform ${O} ${B} u_${U};
|
|
|
626
626
|
<div class="fancybox__carousel"></div>
|
|
627
627
|
<div class="fancybox__footer"></div>
|
|
628
628
|
</div>`},trapFocus:!0,wheel:"zoom"};var Xi,gn;(function(n){n[n.Init=0]="Init",n[n.Ready=1]="Ready",n[n.Closing=2]="Closing",n[n.CustomClosing=3]="CustomClosing",n[n.Destroy=4]="Destroy"})(Xi||(Xi={})),function(n){n[n.Loading=0]="Loading",n[n.Opening=1]="Opening",n[n.Ready=2]="Ready",n[n.Closing=3]="Closing"}(gn||(gn={}));let Wy="",oc=!1,ou=!1,Uo=null;const Gy=()=>{let n="",t="";const o=Xt.getInstance();if(o){const c=o.carousel,d=o.getSlide();if(c&&d){let x=d.slug||void 0,y=d.triggerEl||void 0;t=x||o.option("slug")||"",!t&&y&&y.dataset&&(t=y.dataset.fancybox||""),t&&t!=="true"&&(n="#"+t+(!x&&c.slides.length>1?"-"+(d.index+1):""))}}return{hash:n,slug:t,index:1}},au=()=>{const n=new URL(document.URL).hash,t=n.slice(1).split("-"),o=t[t.length-1],c=o&&/^\+?\d+$/.test(o)&&parseInt(t.pop()||"1",10)||1;return{hash:n,slug:t.join("-"),index:c}},Yy=()=>{const{slug:n,index:t}=au();if(!n)return;let o=document.querySelector(`[data-slug="${n}"]`);if(o&&o.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0})),Xt.getInstance())return;const c=document.querySelectorAll(`[data-fancybox="${n}"]`);c.length&&(o=c[t-1],o&&o.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0})))},Xy=()=>{if(Xt.defaults.Hash===!1)return;const n=Xt.getInstance();if((n==null?void 0:n.options.Hash)===!1)return;const{slug:t,index:o}=au(),{slug:c}=Gy();n&&(t===c?n.jumpTo(o-1):(oc=!0,n.close())),Yy()},Ky=()=>{Uo&&clearTimeout(Uo),queueMicrotask(()=>{Xy()})},Jy=()=>{window.addEventListener("hashchange",Ky,!1),setTimeout(()=>{Xy()},500)};sc&&(/complete|interactive|loaded/.test(document.readyState)?Jy():document.addEventListener("DOMContentLoaded",Jy));const lu="is-zooming-in";class Qy extends Vr{onCreateSlide(t,o,c){const d=this.instance.optionFor(c,"src")||"";c.el&&c.type==="image"&&typeof d=="string"&&this.setImage(c,d)}onRemoveSlide(t,o,c){c.panzoom&&c.panzoom.destroy(),c.panzoom=void 0,c.imageEl=void 0}onChange(t,o,c,d){ni(this.instance.container,lu);for(const x of o.slides){const y=x.panzoom;y&&x.index!==c&&y.reset(.35)}}onClose(){var t;const o=this.instance,c=o.container,d=o.getSlide();if(!c||!c.parentElement||!d)return;const{el:x,contentEl:y,panzoom:h,thumbElSrc:M}=d;if(!x||!M||!y||!h||h.isContentLoading||h.state===ci.Init||h.state===ci.Destroy)return;h.updateMetrics();let D=this.getZoomInfo(d);if(!D)return;this.instance.state=Xi.CustomClosing,c.classList.remove(lu),c.classList.add("is-zooming-out"),y.style.backgroundImage=`url('${M}')`;const A=c.getBoundingClientRect();(((t=window.visualViewport)===null||t===void 0?void 0:t.scale)||1)===1&&Object.assign(c.style,{position:"absolute",top:`${c.offsetTop+window.scrollY}px`,left:`${c.offsetLeft+window.scrollX}px`,bottom:"auto",right:"auto",width:`${A.width}px`,height:`${A.height}px`,overflow:"hidden"});const{x:z,y:L,scale:N,opacity:Y}=D;if(Y){const ee=((oe,he,_e,me)=>{const Ie=he-oe,tt=me-_e;return gt=>_e+((gt-oe)/Ie*tt||0)})(h.scale,N,1,0);h.on("afterTransform",()=>{y.style.opacity=ee(h.scale)+""})}h.on("endAnimation",()=>{o.destroy()}),h.target.a=N,h.target.b=0,h.target.c=0,h.target.d=N,h.panTo({x:z,y:L,scale:N,friction:Y?.2:.33,ignoreBounds:!0}),h.isResting&&o.destroy()}setImage(t,o){const c=this.instance;t.src=o,this.process(t,o).then(d=>{const{contentEl:x,imageEl:y,thumbElSrc:h,el:M}=t;if(c.isClosing()||!x||!y)return;x.offsetHeight;const D=!!c.isOpeningSlide(t)&&this.getZoomInfo(t);if(this.option("protected")&&M){M.addEventListener("contextmenu",L=>{L.preventDefault()});const z=document.createElement("div");dt(z,"fancybox-protected"),x.appendChild(z)}if(h&&D){const z=d.contentRect,L=Math.max(z.fullWidth,z.fullHeight);let N=null;!D.opacity&&L>1200&&(N=document.createElement("img"),dt(N,"fancybox-ghost"),N.src=h,x.appendChild(N));const Y=()=>{N&&(dt(N,"f-fadeFastOut"),setTimeout(()=>{N&&(N.remove(),N=null)},200))};(A=h,new Promise((ee,oe)=>{const he=new Image;he.onload=ee,he.onerror=oe,he.src=A})).then(()=>{c.hideLoading(t),t.state=gn.Opening,this.instance.emit("reveal",t),this.zoomIn(t).then(()=>{Y(),this.instance.done(t)},()=>{}),N&&setTimeout(()=>{Y()},L>2500?800:200)},()=>{c.hideLoading(t),c.revealContent(t)})}else{const z=this.optionFor(t,"initialSize"),L=this.optionFor(t,"zoom"),N={event:c.prevMouseMoveEvent||c.options.event,friction:L?.12:0};let Y=c.optionFor(t,"showClass")||void 0,ee=!0;c.isOpeningSlide(t)&&(z==="full"?d.zoomToFull(N):z==="cover"?d.zoomToCover(N):z==="max"?d.zoomToMax(N):ee=!1,d.stop("current")),ee&&Y&&(Y=d.isDragging?"f-fadeIn":""),c.hideLoading(t),c.revealContent(t,Y)}var A},()=>{c.setError(t,"{{IMAGE_ERROR}}")})}process(t,o){return new Promise((c,d)=>{var x;const y=this.instance,h=t.el;y.clearContent(t),y.showLoading(t);let M=this.optionFor(t,"content");if(typeof M=="string"&&(M=Qr(M)),!M||!Hn(M)){if(M=document.createElement("img"),M instanceof HTMLImageElement){let D="",A=t.caption;D=typeof A=="string"&&A?A.replace(/<[^>]+>/gi,"").substring(0,1e3):`Image ${t.index+1} of ${((x=y.carousel)===null||x===void 0?void 0:x.pages.length)||1}`,M.src=o||"",M.alt=D,M.draggable=!1,t.srcset&&M.setAttribute("srcset",t.srcset),this.instance.isOpeningSlide(t)&&(M.fetchPriority="high")}t.sizes&&M.setAttribute("sizes",t.sizes)}dt(M,"fancybox-image"),t.imageEl=M,y.setContent(t,M,!1),t.panzoom=new $o(h,Un({transformParent:!0},this.option("Panzoom")||{},{content:M,width:(D,A)=>y.optionFor(t,"width","auto",A)||"auto",height:(D,A)=>y.optionFor(t,"height","auto",A)||"auto",wheel:()=>{const D=y.option("wheel");return(D==="zoom"||D=="pan")&&D},click:(D,A)=>{var z,L;if(y.isCompact||y.isClosing()||t.index!==((z=y.getSlide())===null||z===void 0?void 0:z.index))return!1;if(A){const Y=A.composedPath()[0];if(["A","BUTTON","TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].includes(Y.nodeName))return!1}let N=!A||A.target&&((L=t.contentEl)===null||L===void 0?void 0:L.contains(A.target));return y.option(N?"contentClick":"backdropClick")||!1},dblClick:()=>y.isCompact?"toggleZoom":y.option("contentDblClick")||!1,spinner:!1,panOnlyZoomed:!0,wheelLimit:1/0,on:{ready:D=>{c(D)},error:()=>{d()},destroy:()=>{d()}}}))})}zoomIn(t){return new Promise((o,c)=>{const d=this.instance,x=d.container,{panzoom:y,contentEl:h,el:M}=t;y&&y.updateMetrics();const D=this.getZoomInfo(t);if(!(D&&M&&h&&y&&x))return void c();const{x:A,y:z,scale:L,opacity:N}=D,Y=()=>{t.state!==gn.Closing&&(N&&(h.style.opacity=Math.max(Math.min(1,1-(1-y.scale)/(1-L)),0)+""),y.scale>=1&&y.scale>y.targetScale-.1&&o(y))},ee=_e=>{(_e.scale<.99||_e.scale>1.01)&&!_e.isDragging||(ni(x,lu),h.style.opacity="",_e.off("endAnimation",ee),_e.off("touchStart",ee),_e.off("afterTransform",Y),o(_e))};y.on("endAnimation",ee),y.on("touchStart",ee),y.on("afterTransform",Y),y.on(["error","destroy"],()=>{c()}),y.panTo({x:A,y:z,scale:L,friction:0,ignoreBounds:!0}),y.stop("current");const oe={event:y.panMode==="mousemove"?d.prevMouseMoveEvent||d.options.event:void 0},he=this.optionFor(t,"initialSize");dt(x,lu),d.hideLoading(t),he==="full"?y.zoomToFull(oe):he==="cover"?y.zoomToCover(oe):he==="max"?y.zoomToMax(oe):y.reset(.172)})}getZoomInfo(t){const{el:o,imageEl:c,thumbEl:d,panzoom:x}=t,y=this.instance,h=y.container;if(!o||!c||!d||!x||Hy(d)<3||!this.optionFor(t,"zoom")||!h||y.state===Xi.Destroy||getComputedStyle(h).getPropertyValue("--f-images-zoom")==="0")return!1;const M=window.visualViewport||null;if((M?M.scale:1)!==1)return!1;let{top:D,left:A,width:z,height:L}=d.getBoundingClientRect(),{top:N,left:Y,fitWidth:ee,fitHeight:oe}=x.contentRect;if(!(z&&L&&ee&&oe))return!1;const he=x.container.getBoundingClientRect();Y+=he.left,N+=he.top;const _e=-1*(Y+.5*ee-(A+.5*z)),me=-1*(N+.5*oe-(D+.5*L)),Ie=z/ee;let tt=this.option("zoomOpacity")||!1;return tt==="auto"&&(tt=Math.abs(z/L-ee/oe)>.1),{x:_e,y:me,scale:Ie,opacity:tt}}attach(){const t=this,o=t.instance;o.on("Carousel.change",t.onChange),o.on("Carousel.createSlide",t.onCreateSlide),o.on("Carousel.removeSlide",t.onRemoveSlide),o.on("close",t.onClose)}detach(){const t=this,o=t.instance;o.off("Carousel.change",t.onChange),o.off("Carousel.createSlide",t.onCreateSlide),o.off("Carousel.removeSlide",t.onRemoveSlide),o.off("close",t.onClose)}}Object.defineProperty(Qy,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{initialSize:"fit",Panzoom:{maxScale:1},protected:!1,zoom:!0,zoomOpacity:"auto"}}),typeof SuppressedError=="function"&&SuppressedError;const Lp="html",e0="image",Rp="map",Es="youtube",Ho="vimeo",ac="html5video",t0=(n,t={})=>{const o=new URL(n),c=new URLSearchParams(o.search),d=new URLSearchParams;for(const[h,M]of[...c,...Object.entries(t)]){let D=M+"";if(h==="t"){let A=D.match(/((\d*)m)?(\d*)s?/);A&&d.set("start",60*parseInt(A[2]||"0")+parseInt(A[3]||"0")+"")}else d.set(h,D)}let x=d+"",y=n.match(/#t=((.*)?\d+s)/);return y&&(x+=`#t=${y[1]}`),x},$E={ajax:null,autoSize:!0,iframeAttr:{allow:"autoplay; fullscreen",scrolling:"auto"},preload:!0,videoAutoplay:!0,videoRatio:16/9,videoTpl:`<video class="fancybox__html5video" playsinline controls controlsList="nodownload" poster="{{poster}}">
|
|
629
|
-
<source src="{{src}}" type="{{format}}" />Sorry, your browser doesn't support embedded videos.</video>`,videoFormat:"",vimeo:{byline:1,color:"00adef",controls:1,dnt:1,muted:0},youtube:{controls:1,enablejsapi:1,nocookie:1,rel:0,fs:1}},jE=["image","html","ajax","inline","clone","iframe","map","pdf","html5video","youtube","vimeo"];class i0 extends Vr{onBeforeInitSlide(t,o,c){this.processType(c)}onCreateSlide(t,o,c){this.setContent(c)}onClearContent(t,o){o.xhr&&(o.xhr.abort(),o.xhr=null);const c=o.iframeEl;c&&(c.onload=c.onerror=null,c.src="//about:blank",o.iframeEl=null);const d=o.contentEl,x=o.placeholderEl;if(o.type==="inline"&&d&&x)d.classList.remove("fancybox__content"),getComputedStyle(d).getPropertyValue("display")!=="none"&&(d.style.display="none"),setTimeout(()=>{x&&(d&&x.parentNode&&x.parentNode.insertBefore(d,x),x.remove())},0),o.contentEl=void 0,o.placeholderEl=void 0;else for(;o.el&&o.el.firstChild;)o.el.removeChild(o.el.firstChild)}onSelectSlide(t,o,c){c.state===gn.Ready&&this.playVideo()}onUnselectSlide(t,o,c){var d,x;if(c.type===ac){try{(x=(d=c.el)===null||d===void 0?void 0:d.querySelector("video"))===null||x===void 0||x.pause()}catch{}return}let y;c.type===Ho?y={method:"pause",value:"true"}:c.type===Es&&(y={event:"command",func:"pauseVideo"}),y&&c.iframeEl&&c.iframeEl.contentWindow&&c.iframeEl.contentWindow.postMessage(JSON.stringify(y),"*"),c.poller&&clearTimeout(c.poller)}onDone(t,o){t.isCurrentSlide(o)&&!t.isClosing()&&this.playVideo()}onRefresh(t,o){o.slides.forEach(c=>{c.el&&(this.resizeIframe(c),this.setAspectRatio(c))})}onMessage(t){try{let o=JSON.parse(t.data);if(t.origin==="https://player.vimeo.com"){if(o.event==="ready")for(let c of Array.from(document.getElementsByClassName("fancybox__iframe")))c instanceof HTMLIFrameElement&&c.contentWindow===t.source&&(c.dataset.ready="true")}else if(t.origin.match(/^https:\/\/(www.)?youtube(-nocookie)?.com$/)&&o.event==="onReady"){const c=document.getElementById(o.id);c&&(c.dataset.ready="true")}}catch{}}loadAjaxContent(t){const o=this.instance.optionFor(t,"src")||"";this.instance.showLoading(t);const c=this.instance,d=new XMLHttpRequest;c.showLoading(t),d.onreadystatechange=function(){d.readyState===XMLHttpRequest.DONE&&c.state===Xi.Ready&&(c.hideLoading(t),d.status===200?c.setContent(t,d.responseText):c.setError(t,d.status===404?"{{AJAX_NOT_FOUND}}":"{{AJAX_FORBIDDEN}}"))};const x=t.ajax||null;d.open(x?"POST":"GET",o+""),d.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),d.setRequestHeader("X-Requested-With","XMLHttpRequest"),d.send(x),t.xhr=d}setInlineContent(t){let o=null;if(Hn(t.src))o=t.src;else if(typeof t.src=="string"){const c=t.src.split("#",2).pop();o=c?document.getElementById(c):null}if(o){if(t.type==="clone"||o.closest(".fancybox__slide")){o=o.cloneNode(!0);const c=o.dataset.animationName;c&&(o.classList.remove(c),delete o.dataset.animationName);let d=o.getAttribute("id");d=d?`${d}--clone`:`clone-${this.instance.id}-${t.index}`,o.setAttribute("id",d)}else if(o.parentNode){const c=document.createElement("div");c.classList.add("fancybox-placeholder"),o.parentNode.insertBefore(c,o),t.placeholderEl=c}this.instance.setContent(t,o)}else this.instance.setError(t,"{{ELEMENT_NOT_FOUND}}")}setIframeContent(t){const{src:o,el:c}=t;if(!o||typeof o!="string"||!c)return;c.classList.add("is-loading");const d=this.instance,x=document.createElement("iframe");x.className="fancybox__iframe",x.setAttribute("id",`fancybox__iframe_${d.id}_${t.index}`);for(const[h,M]of Object.entries(this.optionFor(t,"iframeAttr")||{}))x.setAttribute(h,M);x.onerror=()=>{d.setError(t,"{{IFRAME_ERROR}}")},t.iframeEl=x;const y=this.optionFor(t,"preload");if(t.type!=="iframe"||y===!1)return x.setAttribute("src",t.src+""),d.setContent(t,x,!1),this.resizeIframe(t),void d.revealContent(t);d.showLoading(t),x.onload=()=>{if(!x.src.length)return;const h=x.dataset.ready!=="true";x.dataset.ready="true",this.resizeIframe(t),h?d.revealContent(t):d.hideLoading(t)},x.setAttribute("src",o),d.setContent(t,x,!1)}resizeIframe(t){const{type:o,iframeEl:c}=t;if(o===Es||o===Ho)return;const d=c==null?void 0:c.parentElement;if(!c||!d)return;let x=t.autoSize;x===void 0&&(x=this.optionFor(t,"autoSize"));let y=t.width||0,h=t.height||0;y&&h&&(x=!1);const M=d&&d.style;if(t.preload!==!1&&x!==!1&&M)try{const D=window.getComputedStyle(d),A=parseFloat(D.paddingLeft)+parseFloat(D.paddingRight),z=parseFloat(D.paddingTop)+parseFloat(D.paddingBottom),L=c.contentWindow;if(L){const N=L.document,Y=N.getElementsByTagName(Lp)[0],ee=N.body;M.width="",ee.style.overflow="hidden",y=y||Y.scrollWidth+A,M.width=`${y}px`,ee.style.overflow="",M.flex="0 0 auto",M.height=`${ee.scrollHeight}px`,h=Y.scrollHeight+z}}catch{}if(y||h){const D={flex:"0 1 auto",width:"",height:""};y&&y!=="auto"&&(D.width=`${y}px`),h&&h!=="auto"&&(D.height=`${h}px`),Object.assign(M,D)}}playVideo(){const t=this.instance.getSlide();if(!t)return;const{el:o}=t;if(!o||!o.offsetParent||!this.optionFor(t,"videoAutoplay"))return;if(t.type===ac)try{const d=o.querySelector("video");if(d){const x=d.play();x!==void 0&&x.then(()=>{}).catch(y=>{d.muted=!0,d.play()})}}catch{}if(t.type!==Es&&t.type!==Ho)return;const c=()=>{if(t.iframeEl&&t.iframeEl.contentWindow){let d;if(t.iframeEl.dataset.ready==="true")return d=t.type===Es?{event:"command",func:"playVideo"}:{method:"play",value:"true"},d&&t.iframeEl.contentWindow.postMessage(JSON.stringify(d),"*"),void(t.poller=void 0);t.type===Es&&(d={event:"listening",id:t.iframeEl.getAttribute("id")},t.iframeEl.contentWindow.postMessage(JSON.stringify(d),"*"))}t.poller=setTimeout(c,250)};c()}processType(t){if(t.html)return t.type=Lp,t.src=t.html,void(t.html="");const o=this.instance.optionFor(t,"src","");if(!o||typeof o!="string")return;let c=t.type,d=null;if(d=o.match(/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(?:watch\?(?:.*&)?v=|v\/|u\/|shorts\/|embed\/?)?(videoseries\?list=(?:.*)|[\w-]{11}|\?listType=(?:.*)&list=(?:.*))(?:.*)/i)){const x=this.optionFor(t,Es),{nocookie:y}=x,h=function(z,L){var N={};for(var Y in z)Object.prototype.hasOwnProperty.call(z,Y)&&L.indexOf(Y)<0&&(N[Y]=z[Y]);if(z!=null&&typeof Object.getOwnPropertySymbols=="function"){var ee=0;for(Y=Object.getOwnPropertySymbols(z);ee<Y.length;ee++)L.indexOf(Y[ee])<0&&Object.prototype.propertyIsEnumerable.call(z,Y[ee])&&(N[Y[ee]]=z[Y[ee]])}return N}(x,["nocookie"]),M=`www.youtube${y?"-nocookie":""}.com`,D=t0(o,h),A=encodeURIComponent(d[2]);t.videoId=A,t.src=`https://${M}/embed/${A}?${D}`,t.thumbSrc=t.thumbSrc||`https://i.ytimg.com/vi/${A}/mqdefault.jpg`,c=Es}else if(d=o.match(/^.+vimeo.com\/(?:\/)?([\d]+)((\/|\?h=)([a-z0-9]+))?(.*)?/)){const x=t0(o,this.optionFor(t,Ho)),y=encodeURIComponent(d[1]),h=d[4]||"";t.videoId=y,t.src=`https://player.vimeo.com/video/${y}?${h?`h=${h}${x?"&":""}`:""}${x}`,c=Ho}if(!c&&t.triggerEl){const x=t.triggerEl.dataset.type;jE.includes(x)&&(c=x)}c||typeof o=="string"&&(o.charAt(0)==="#"?c="inline":(d=o.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i))?(c=ac,t.videoFormat=t.videoFormat||"video/"+(d[1]==="ogv"?"ogg":d[1])):o.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)?c=e0:o.match(/\.(pdf)((\?|#).*)?$/i)&&(c="pdf")),(d=o.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:(?:(?:maps\/(?:place\/(?:.*)\/)?\@(.*),(\d+.?\d+?)z))|(?:\?ll=))(.*)?/i))?(t.src=`https://maps.google.${d[1]}/?ll=${(d[2]?d[2]+"&z="+Math.floor(parseFloat(d[3]))+(d[4]?d[4].replace(/^\//,"&"):""):d[4]+"").replace(/\?/,"&")}&output=${d[4]&&d[4].indexOf("layer=c")>0?"svembed":"embed"}`,c=Rp):(d=o.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:maps\/search\/)(.*)/i))&&(t.src=`https://maps.google.${d[1]}/maps?q=${d[2].replace("query=","q=").replace("api=1","")}&output=embed`,c=Rp),c=c||this.instance.option("defaultType"),t.type=c,c===e0&&(t.thumbSrc=t.thumbSrc||t.src)}setContent(t){const o=this.instance.optionFor(t,"src")||"";if(t&&t.type&&o){switch(t.type){case Lp:this.instance.setContent(t,o);break;case ac:const c=this.option("videoTpl");c&&this.instance.setContent(t,c.replace(/\{\{src\}\}/gi,o+"").replace(/\{\{format\}\}/gi,this.optionFor(t,"videoFormat")||"").replace(/\{\{poster\}\}/gi,t.poster||t.thumbSrc||""));break;case"inline":case"clone":this.setInlineContent(t);break;case"ajax":this.loadAjaxContent(t);break;case"pdf":case Rp:case Es:case Ho:t.preload=!1;case"iframe":this.setIframeContent(t)}this.setAspectRatio(t)}}setAspectRatio(t){const o=t.contentEl;if(!(t.el&&o&&t.type&&[Es,Ho,ac].includes(t.type)))return;let c,d=t.width||"auto",x=t.height||"auto";if(d==="auto"||x==="auto"){c=this.optionFor(t,"videoRatio");const D=(c+"").match(/(\d+)\s*\/\s?(\d+)/);c=D&&D.length>2?parseFloat(D[1])/parseFloat(D[2]):parseFloat(c+"")}else d&&x&&(c=d/x);if(!c)return;o.style.aspectRatio="",o.style.width="",o.style.height="",o.offsetHeight;const y=o.getBoundingClientRect(),h=y.width||1,M=y.height||1;o.style.aspectRatio=c+"",c<h/M?(x=x==="auto"?M:Math.min(M,x),o.style.width="auto",o.style.height=`${x}px`):(d=d==="auto"?h:Math.min(h,d),o.style.width=`${d}px`,o.style.height="auto")}attach(){const t=this,o=t.instance;o.on("Carousel.beforeInitSlide",t.onBeforeInitSlide),o.on("Carousel.createSlide",t.onCreateSlide),o.on("Carousel.selectSlide",t.onSelectSlide),o.on("Carousel.unselectSlide",t.onUnselectSlide),o.on("Carousel.Panzoom.refresh",t.onRefresh),o.on("done",t.onDone),o.on("clearContent",t.onClearContent),window.addEventListener("message",t.onMessage)}detach(){const t=this,o=t.instance;o.off("Carousel.beforeInitSlide",t.onBeforeInitSlide),o.off("Carousel.createSlide",t.onCreateSlide),o.off("Carousel.selectSlide",t.onSelectSlide),o.off("Carousel.unselectSlide",t.onUnselectSlide),o.off("Carousel.Panzoom.refresh",t.onRefresh),o.off("done",t.onDone),o.off("clearContent",t.onClearContent),window.removeEventListener("message",t.onMessage)}}Object.defineProperty(i0,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:$E});const cu="play",hu="pause",lc="ready";class n0 extends Vr{constructor(){super(...arguments),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:lc}),Object.defineProperty(this,"inHover",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"timer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"progressBar",{enumerable:!0,configurable:!0,writable:!0,value:null})}get isActive(){return this.state!==lc}onReady(t){this.option("autoStart")&&(t.isInfinite||t.page<t.pages.length-1)&&this.start()}onChange(){this.removeProgressBar(),this.pause()}onSettle(){this.resume()}onVisibilityChange(){document.visibilityState==="visible"?this.resume():this.pause()}onMouseEnter(){this.inHover=!0,this.pause()}onMouseLeave(){var t;this.inHover=!1,!((t=this.instance.panzoom)===null||t===void 0)&&t.isResting&&this.resume()}onTimerEnd(){const t=this.instance;this.state==="play"&&(t.isInfinite||t.page!==t.pages.length-1?t.slideNext():t.slideTo(0))}removeProgressBar(){this.progressBar&&(this.progressBar.remove(),this.progressBar=null)}createProgressBar(){var t;if(!this.option("showProgress"))return null;this.removeProgressBar();const o=this.instance,c=((t=o.pages[o.page])===null||t===void 0?void 0:t.slides)||[];let d=this.option("progressParentEl");if(d||(d=(c.length===1?c[0].el:null)||o.viewport),!d)return null;const x=document.createElement("div");return dt(x,"f-progress"),d.prepend(x),this.progressBar=x,x.offsetHeight,x}set(){const t=this,o=t.instance;if(o.pages.length<2||t.timer)return;const c=t.option("timeout");t.state=cu,dt(o.container,"has-autoplay");let d=t.createProgressBar();d&&(d.style.transitionDuration=`${c}ms`,d.style.transform="scaleX(1)"),t.timer=setTimeout(()=>{t.timer=null,t.inHover||t.onTimerEnd()},c),t.emit("set")}clear(){const t=this;t.timer&&(clearTimeout(t.timer),t.timer=null),t.removeProgressBar()}start(){const t=this;if(t.set(),t.state!==lc){if(t.option("pauseOnHover")){const o=t.instance.container;o.addEventListener("mouseenter",t.onMouseEnter,!1),o.addEventListener("mouseleave",t.onMouseLeave,!1)}document.addEventListener("visibilitychange",t.onVisibilityChange,!1),t.emit("start")}}stop(){const t=this,o=t.state,c=t.instance.container;t.clear(),t.state=lc,c.removeEventListener("mouseenter",t.onMouseEnter,!1),c.removeEventListener("mouseleave",t.onMouseLeave,!1),document.removeEventListener("visibilitychange",t.onVisibilityChange,!1),ni(c,"has-autoplay"),o!==lc&&t.emit("stop")}pause(){const t=this;t.state===cu&&(t.state=hu,t.clear(),t.emit(hu))}resume(){const t=this,o=t.instance;if(o.isInfinite||o.page!==o.pages.length-1)if(t.state!==cu){if(t.state===hu&&!t.inHover){const c=new Event("resume",{bubbles:!0,cancelable:!0});t.emit("resume",c),c.defaultPrevented||t.set()}}else t.set();else t.stop()}toggle(){this.state===cu||this.state===hu?this.stop():this.start()}attach(){const t=this,o=t.instance;o.on("ready",t.onReady),o.on("Panzoom.startAnimation",t.onChange),o.on("Panzoom.endAnimation",t.onSettle),o.on("Panzoom.touchMove",t.onChange)}detach(){const t=this,o=t.instance;o.off("ready",t.onReady),o.off("Panzoom.startAnimation",t.onChange),o.off("Panzoom.endAnimation",t.onSettle),o.off("Panzoom.touchMove",t.onChange),t.stop()}}Object.defineProperty(n0,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{autoStart:!0,pauseOnHover:!0,progressParentEl:null,showProgress:!0,timeout:3e3}});class r0 extends Vr{constructor(){super(...arguments),Object.defineProperty(this,"ref",{enumerable:!0,configurable:!0,writable:!0,value:null})}onPrepare(t){const o=t.carousel;if(!o)return;const c=t.container;c&&(o.options.Autoplay=Un({autoStart:!1},this.option("Autoplay")||{},{pauseOnHover:!1,timeout:this.option("timeout"),progressParentEl:()=>this.option("progressParentEl")||null,on:{start:()=>{t.emit("startSlideshow")},set:d=>{var x;c.classList.add("has-slideshow"),((x=t.getSlide())===null||x===void 0?void 0:x.state)!==gn.Ready&&d.pause()},stop:()=>{c.classList.remove("has-slideshow"),t.isCompact||t.endIdle(),t.emit("endSlideshow")},resume:(d,x)=>{var y,h,M;!x||!x.cancelable||((y=t.getSlide())===null||y===void 0?void 0:y.state)===gn.Ready&&(!((M=(h=t.carousel)===null||h===void 0?void 0:h.panzoom)===null||M===void 0)&&M.isResting)||x.preventDefault()}}}),o.attachPlugins({Autoplay:n0}),this.ref=o.plugins.Autoplay)}onReady(t){const o=t.carousel,c=this.ref;c&&o&&this.option("playOnStart")&&(o.isInfinite||o.page<o.pages.length-1)&&c.start()}onDone(t,o){const c=this.ref,d=t.carousel;if(!c||!d)return;const x=o.panzoom;x&&x.on("startAnimation",()=>{t.isCurrentSlide(o)&&c.stop()}),t.isCurrentSlide(o)&&c.resume()}onKeydown(t,o){var c;const d=this.ref;d&&o===this.option("key")&&((c=document.activeElement)===null||c===void 0?void 0:c.nodeName)!=="BUTTON"&&d.toggle()}attach(){const t=this,o=t.instance;o.on("Carousel.init",t.onPrepare),o.on("Carousel.ready",t.onReady),o.on("done",t.onDone),o.on("keydown",t.onKeydown)}detach(){const t=this,o=t.instance;o.off("Carousel.init",t.onPrepare),o.off("Carousel.ready",t.onReady),o.off("done",t.onDone),o.off("keydown",t.onKeydown)}}Object.defineProperty(r0,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{key:" ",playOnStart:!1,progressParentEl:n=>{var t;return((t=n.instance.container)===null||t===void 0?void 0:t.querySelector(".fancybox__toolbar [data-fancybox-toggle-slideshow]"))||n.instance.container},timeout:3e3}});const s0={classes:{container:"f-thumbs f-carousel__thumbs",viewport:"f-thumbs__viewport",track:"f-thumbs__track",slide:"f-thumbs__slide",isResting:"is-resting",isSelected:"is-selected",isLoading:"is-loading",hasThumbs:"has-thumbs"},minCount:2,parentEl:null,thumbTpl:'<button class="f-thumbs__slide__button" tabindex="0" type="button" aria-label="{{GOTO}}" data-carousel-index="%i"><img class="f-thumbs__slide__img" data-lazy-src="{{%s}}" alt="" /></button>',type:"modern"};var Ts;(function(n){n[n.Init=0]="Init",n[n.Ready=1]="Ready",n[n.Hidden=2]="Hidden"})(Ts||(Ts={}));const o0="isResting",uu="thumbWidth",$a="thumbHeight",ts="thumbClipWidth";let a0=class extends Vr{constructor(){super(...arguments),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:"modern"}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"track",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"carousel",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"thumbWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbClipWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbHeight",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbGap",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbExtraGap",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:Ts.Init})}get isModern(){return this.type==="modern"}onInitSlide(n,t){const o=t.el?t.el.dataset:void 0;o&&(t.thumbSrc=o.thumbSrc||t.thumbSrc||"",t[ts]=parseFloat(o[ts]||"")||t[ts]||0,t[$a]=parseFloat(o.thumbHeight||"")||t[$a]||0),this.addSlide(t)}onInitSlides(){this.build()}onChange(){var n;if(!this.isModern)return;const t=this.container,o=this.instance,c=o.panzoom,d=this.carousel,x=d?d.panzoom:null,y=o.page;if(c&&d&&x){if(c.isDragging){ni(t,this.cn(o0));let h=((n=d.pages[y])===null||n===void 0?void 0:n.pos)||0;h+=o.getProgress(y)*(this[ts]+this.thumbGap);let M=x.getBounds();-1*h>M.x.min&&-1*h<M.x.max&&x.panTo({x:-1*h,friction:.12})}else es(t,this.cn(o0),c.isResting);this.shiftModern()}}onRefresh(){this.updateProps();for(const n of this.instance.slides||[])this.resizeModernSlide(n);this.shiftModern()}isDisabled(){const n=this.option("minCount")||0;if(n){const o=this.instance;let c=0;for(const d of o.slides||[])d.thumbSrc&&c++;if(c<n)return!0}const t=this.option("type");return["modern","classic"].indexOf(t)<0}getThumb(n){const t=this.option("thumbTpl")||"";return{html:this.instance.localize(t,[["%i",n.index],["%d",n.index+1],["%s",n.thumbSrc||"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"]])}}addSlide(n){const t=this.carousel;t&&t.addSlide(n.index,this.getThumb(n))}getSlides(){const n=[];for(const t of this.instance.slides||[])n.push(this.getThumb(t));return n}resizeModernSlide(n){this.isModern&&(n[uu]=n[ts]&&n[$a]?Math.round(this[$a]*(n[ts]/n[$a])):this[uu])}updateProps(){const n=this.container;if(!n)return;const t=o=>parseFloat(getComputedStyle(n).getPropertyValue("--f-thumb-"+o))||0;this.thumbGap=t("gap"),this.thumbExtraGap=t("extra-gap"),this[uu]=t("width")||40,this[ts]=t("clip-width")||40,this[$a]=t("height")||40}build(){const n=this;if(n.state!==Ts.Init)return;if(n.isDisabled())return void n.emit("disabled");const t=n.instance,o=t.container,c=n.getSlides(),d=n.option("type");n.type=d;const x=n.option("parentEl"),y=n.cn("container"),h=n.cn("track");let M=x==null?void 0:x.querySelector("."+y);M||(M=document.createElement("div"),dt(M,y),x?x.appendChild(M):o.after(M)),dt(M,`is-${d}`),dt(o,n.cn("hasThumbs")),n.container=M,n.updateProps();let D=M.querySelector("."+h);D||(D=document.createElement("div"),dt(D,n.cn("track")),M.appendChild(D)),n.track=D;const A=Un({},{track:D,infinite:!1,center:!0,fill:d==="classic",dragFree:!0,slidesPerPage:1,transition:!1,preload:.25,friction:.12,Panzoom:{maxVelocity:0},Dots:!1,Navigation:!1,classes:{container:"f-thumbs",viewport:"f-thumbs__viewport",track:"f-thumbs__track",slide:"f-thumbs__slide"}},n.option("Carousel")||{},{Sync:{target:t},slides:c}),z=new t.constructor(M,A);z.on("createSlide",(L,N)=>{n.setProps(N.index),n.emit("createSlide",N,N.el)}),z.on("ready",()=>{n.shiftModern(),n.emit("ready")}),z.on("refresh",()=>{n.shiftModern()}),z.on("Panzoom.click",(L,N,Y)=>{n.onClick(Y)}),n.carousel=z,n.state=Ts.Ready}onClick(n){n.preventDefault(),n.stopPropagation();const t=this.instance,{pages:o,page:c}=t,d=ee=>{if(ee){const oe=ee.closest("[data-carousel-index]");if(oe)return[parseInt(oe.dataset.carouselIndex||"",10)||0,oe]}return[-1,void 0]},x=(ee,oe)=>{const he=document.elementFromPoint(ee,oe);return he?d(he):[-1,void 0]};let[y,h]=d(n.target);if(y>-1)return;const M=this[ts],D=n.clientX,A=n.clientY;let[z,L]=x(D-M,A),[N,Y]=x(D+M,A);L&&Y?(y=Math.abs(D-L.getBoundingClientRect().right)<Math.abs(D-Y.getBoundingClientRect().left)?z:N,y===c&&(y=y===z?N:z)):L?y=z:Y&&(y=N),y>-1&&o[y]&&t.slideTo(y)}getShift(n){var t;const o=this,{instance:c}=o,d=o.carousel;if(!c||!d)return 0;const x=o[uu],y=o[ts],h=o.thumbGap,M=o.thumbExtraGap;if(!(!((t=d.slides[n])===null||t===void 0)&&t.el))return 0;const D=.5*(x-y),A=c.pages.length-1;let z=c.getProgress(0),L=c.getProgress(A),N=c.getProgress(n,!1,!0),Y=0,ee=D+M+h;const oe=z<0&&z>-1,he=L>0&&L<1;return n===0?(Y=ee*Math.abs(z),he&&z===1&&(Y-=ee*Math.abs(L))):n===A?(Y=ee*Math.abs(L)*-1,oe&&L===-1&&(Y+=ee*Math.abs(z))):oe||he?(Y=-1*ee,Y+=ee*Math.abs(z),Y+=ee*(1-Math.abs(L))):Y=ee*N,Y}setProps(n){var t;const o=this;if(!o.isModern)return;const{instance:c}=o,d=o.carousel;if(c&&d){const x=(t=d.slides[n])===null||t===void 0?void 0:t.el;if(x&&x.childNodes.length){let y=Ye(1-Math.abs(c.getProgress(n))),h=Ye(o.getShift(n));x.style.setProperty("--progress",y?y+"":""),x.style.setProperty("--shift",h+"")}}}shiftModern(){const n=this;if(!n.isModern)return;const{instance:t,track:o}=n,c=t.panzoom,d=n.carousel;if(!(t&&o&&c&&d)||c.state===ci.Init||c.state===ci.Destroy)return;for(const y of t.slides)n.setProps(y.index);let x=(n[ts]+n.thumbGap)*(d.slides.length||0);o.style.setProperty("--width",x+"")}cleanup(){const n=this;n.carousel&&n.carousel.destroy(),n.carousel=null,n.container&&n.container.remove(),n.container=null,n.track&&n.track.remove(),n.track=null,n.state=Ts.Init,ni(n.instance.container,n.cn("hasThumbs"))}attach(){const n=this,t=n.instance;t.on("initSlide",n.onInitSlide),t.state===Ni.Init?t.on("initSlides",n.onInitSlides):n.onInitSlides(),t.on(["change","Panzoom.afterTransform"],n.onChange),t.on("Panzoom.refresh",n.onRefresh)}detach(){const n=this,t=n.instance;t.off("initSlide",n.onInitSlide),t.off("initSlides",n.onInitSlides),t.off(["change","Panzoom.afterTransform"],n.onChange),t.off("Panzoom.refresh",n.onRefresh),n.cleanup()}};Object.defineProperty(a0,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:s0});const UE=Object.assign(Object.assign({},s0),{key:"t",showOnStart:!0,parentEl:null}),l0="is-masked",c0="aria-hidden";class h0 extends Vr{constructor(){super(...arguments),Object.defineProperty(this,"ref",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"hidden",{enumerable:!0,configurable:!0,writable:!0,value:!1})}get isEnabled(){const t=this.ref;return t&&!t.isDisabled()}get isHidden(){return this.hidden}onClick(t,o){o.stopPropagation()}onCreateSlide(t,o){var c,d,x;const y=((x=(d=(c=this.instance)===null||c===void 0?void 0:c.carousel)===null||d===void 0?void 0:d.slides[o.index])===null||x===void 0?void 0:x.type)||"",h=o.el;if(h&&y){let M=`for-${y}`;["video","youtube","vimeo","html5video"].includes(y)&&(M+=" for-video"),dt(h,M)}}onInit(){var t;const o=this,c=o.instance,d=c.carousel;if(o.ref||!d)return;const x=o.option("parentEl")||c.footer||c.container;if(!x)return;const y=Un({},o.options,{parentEl:x,classes:{container:"f-thumbs fancybox__thumbs"},Carousel:{Sync:{friction:c.option("Carousel.friction")||0}},on:{ready:h=>{const M=h.container;M&&this.hidden&&(o.refresh(),M.style.transition="none",o.hide(),M.offsetHeight,queueMicrotask(()=>{M.style.transition="",o.show()}))}}});y.Carousel=y.Carousel||{},y.Carousel.on=Un(((t=o.options.Carousel)===null||t===void 0?void 0:t.on)||{},{click:this.onClick,createSlide:this.onCreateSlide}),d.options.Thumbs=y,d.attachPlugins({Thumbs:a0}),o.ref=d.plugins.Thumbs,o.option("showOnStart")||(o.ref.state=Ts.Hidden,o.hidden=!0)}onResize(){var t;const o=(t=this.ref)===null||t===void 0?void 0:t.container;o&&(o.style.maxHeight="")}onKeydown(t,o){const c=this.option("key");c&&c===o&&this.toggle()}toggle(){const t=this.ref;if(t&&!t.isDisabled())return t.state===Ts.Hidden?(t.state=Ts.Init,void t.build()):void(this.hidden?this.show():this.hide())}show(){const t=this.ref;if(!t||t.isDisabled())return;const o=t.container;o&&(this.refresh(),o.offsetHeight,o.removeAttribute(c0),o.classList.remove(l0),this.hidden=!1)}hide(){const t=this.ref,o=t&&t.container;o&&(this.refresh(),o.offsetHeight,o.classList.add(l0),o.setAttribute(c0,"true")),this.hidden=!0}refresh(){const t=this.ref;if(!t||!t.state)return;const o=t.container,c=(o==null?void 0:o.firstChild)||null;o&&c&&c.childNodes.length&&(o.style.maxHeight=`${c.getBoundingClientRect().height}px`)}attach(){const t=this,o=t.instance;o.state===Xi.Init?o.on("Carousel.init",t.onInit):t.onInit(),o.on("resize",t.onResize),o.on("keydown",t.onKeydown)}detach(){var t;const o=this,c=o.instance;c.off("Carousel.init",o.onInit),c.off("resize",o.onResize),c.off("keydown",o.onKeydown),(t=c.carousel)===null||t===void 0||t.detachPlugins(["Thumbs"]),o.ref=null}}Object.defineProperty(h0,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:UE});const Op={panLeft:{icon:'<svg><path d="M5 12h14M5 12l6 6M5 12l6-6"/></svg>',change:{panX:-100}},panRight:{icon:'<svg><path d="M5 12h14M13 18l6-6M13 6l6 6"/></svg>',change:{panX:100}},panUp:{icon:'<svg><path d="M12 5v14M18 11l-6-6M6 11l6-6"/></svg>',change:{panY:-100}},panDown:{icon:'<svg><path d="M12 5v14M18 13l-6 6M6 13l6 6"/></svg>',change:{panY:100}},zoomIn:{icon:'<svg><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M11 8v6M8 11h6"/></svg>',action:"zoomIn"},zoomOut:{icon:'<svg><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M8 11h6"/></svg>',action:"zoomOut"},toggle1to1:{icon:'<svg><path d="M3.51 3.07c5.74.02 11.48-.02 17.22.02 1.37.1 2.34 1.64 2.18 3.13 0 4.08.02 8.16 0 12.23-.1 1.54-1.47 2.64-2.79 2.46-5.61-.01-11.24.02-16.86-.01-1.36-.12-2.33-1.65-2.17-3.14 0-4.07-.02-8.16 0-12.23.1-1.36 1.22-2.48 2.42-2.46Z"/><path d="M5.65 8.54h1.49v6.92m8.94-6.92h1.49v6.92M11.5 9.4v.02m0 5.18v0"/></svg>',action:"toggleZoom"},toggleZoom:{icon:'<svg><g><line x1="11" y1="8" x2="11" y2="14"></line></g><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M8 11h6"/></svg>',action:"toggleZoom"},iterateZoom:{icon:'<svg><g><line x1="11" y1="8" x2="11" y2="14"></line></g><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M8 11h6"/></svg>',action:"iterateZoom"},rotateCCW:{icon:'<svg><path d="M15 4.55a8 8 0 0 0-6 14.9M9 15v5H4M18.37 7.16v.01M13 19.94v.01M16.84 18.37v.01M19.37 15.1v.01M19.94 11v.01"/></svg>',action:"rotateCCW"},rotateCW:{icon:'<svg><path d="M9 4.55a8 8 0 0 1 6 14.9M15 15v5h5M5.63 7.16v.01M4.06 11v.01M4.63 15.1v.01M7.16 18.37v.01M11 19.94v.01"/></svg>',action:"rotateCW"},flipX:{icon:'<svg style="stroke-width: 1.3"><path d="M12 3v18M16 7v10h5L16 7M8 7v10H3L8 7"/></svg>',action:"flipX"},flipY:{icon:'<svg style="stroke-width: 1.3"><path d="M3 12h18M7 16h10L7 21v-5M7 8h10L7 3v5"/></svg>',action:"flipY"},fitX:{icon:'<svg><path d="M4 12V6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v6M10 18H3M21 18h-7M6 15l-3 3 3 3M18 15l3 3-3 3"/></svg>',action:"fitX"},fitY:{icon:'<svg><path d="M12 20H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h6M18 14v7M18 3v7M15 18l3 3 3-3M15 6l3-3 3 3"/></svg>',action:"fitY"},reset:{icon:'<svg><path d="M20 11A8.1 8.1 0 0 0 4.5 9M4 5v4h4M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"/></svg>',action:"reset"},toggleFS:{icon:'<svg><g><path d="M14.5 9.5 21 3m0 0h-6m6 0v6M3 21l6.5-6.5M3 21v-6m0 6h6"/></g><g><path d="m14 10 7-7m-7 7h6m-6 0V4M3 21l7-7m0 0v6m0-6H4"/></g></svg>',action:"toggleFS"}};var qo;(function(n){n[n.Init=0]="Init",n[n.Ready=1]="Ready",n[n.Disabled=2]="Disabled"})(qo||(qo={}));const HE={absolute:"auto",display:{left:["infobar"],middle:[],right:["iterateZoom","slideshow","fullscreen","thumbs","close"]},enabled:"auto",items:{infobar:{tpl:'<div class="fancybox__infobar" tabindex="-1"><span data-fancybox-current-index></span>/<span data-fancybox-count></span></div>'},download:{tpl:'<a class="f-button" title="{{DOWNLOAD}}" data-fancybox-download href="javasript:;"><svg><path d="M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2M7 11l5 5 5-5M12 4v12"/></svg></a>'},prev:{tpl:'<button class="f-button" title="{{PREV}}" data-fancybox-prev><svg><path d="m15 6-6 6 6 6"/></svg></button>'},next:{tpl:'<button class="f-button" title="{{NEXT}}" data-fancybox-next><svg><path d="m9 6 6 6-6 6"/></svg></button>'},slideshow:{tpl:'<button class="f-button" title="{{TOGGLE_SLIDESHOW}}" data-fancybox-toggle-slideshow><svg><g><path d="M8 4v16l13 -8z"></path></g><g><path d="M8 4v15M17 4v15"/></g></svg></button>'},fullscreen:{tpl:'<button class="f-button" title="{{TOGGLE_FULLSCREEN}}" data-fancybox-toggle-fullscreen><svg><g><path d="M4 8V6a2 2 0 0 1 2-2h2M4 16v2a2 2 0 0 0 2 2h2M16 4h2a2 2 0 0 1 2 2v2M16 20h2a2 2 0 0 0 2-2v-2"/></g><g><path d="M15 19v-2a2 2 0 0 1 2-2h2M15 5v2a2 2 0 0 0 2 2h2M5 15h2a2 2 0 0 1 2 2v2M5 9h2a2 2 0 0 0 2-2V5"/></g></svg></button>'},thumbs:{tpl:'<button class="f-button" title="{{TOGGLE_THUMBS}}" data-fancybox-toggle-thumbs><svg><circle cx="5.5" cy="5.5" r="1"/><circle cx="12" cy="5.5" r="1"/><circle cx="18.5" cy="5.5" r="1"/><circle cx="5.5" cy="12" r="1"/><circle cx="12" cy="12" r="1"/><circle cx="18.5" cy="12" r="1"/><circle cx="5.5" cy="18.5" r="1"/><circle cx="12" cy="18.5" r="1"/><circle cx="18.5" cy="18.5" r="1"/></svg></button>'},close:{tpl:'<button class="f-button" title="{{CLOSE}}" data-fancybox-close><svg><path d="m19.5 4.5-15 15M4.5 4.5l15 15"/></svg></button>'}},parentEl:null},qE={tabindex:"-1",width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},u0="has-toolbar",Bp="fancybox__toolbar";class d0 extends Vr{constructor(){super(...arguments),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:qo.Init}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null})}onReady(t){var o;if(!t.carousel)return;let c=this.option("display"),d=this.option("absolute"),x=this.option("enabled");if(x==="auto"){const D=this.instance.carousel;let A=0;if(D)for(const z of D.slides)(z.panzoom||z.type==="image")&&A++;A||(x=!1)}x||(c=void 0);let y=0;const h={left:[],middle:[],right:[]};if(c)for(const D of["left","middle","right"])for(const A of c[D]){const z=this.createEl(A);z&&((o=h[D])===null||o===void 0||o.push(z),y++)}let M=null;if(y&&(M=this.createContainer()),M){for(const[D,A]of Object.entries(h)){const z=document.createElement("div");dt(z,Bp+"__column is-"+D);for(const L of A)z.appendChild(L);d!=="auto"||D!=="middle"||A.length||(d=!0),M.appendChild(z)}d===!0&&dt(M,"is-absolute"),this.state=qo.Ready,this.onRefresh()}else this.state=qo.Disabled}onClick(t){var o,c;const d=this.instance,x=d.getSlide(),y=x==null?void 0:x.panzoom,h=t.target,M=h&&Hn(h)?h.dataset:null;if(!M)return;if(M.fancyboxToggleThumbs!==void 0)return t.preventDefault(),t.stopPropagation(),void((o=d.plugins.Thumbs)===null||o===void 0||o.toggle());if(M.fancyboxToggleFullscreen!==void 0)return t.preventDefault(),t.stopPropagation(),void this.instance.toggleFullscreen();if(M.fancyboxToggleSlideshow!==void 0){t.preventDefault(),t.stopPropagation();const z=(c=d.carousel)===null||c===void 0?void 0:c.plugins.Autoplay;let L=z.isActive;return y&&y.panMode==="mousemove"&&!L&&y.reset(),void(L?z.stop():z.start())}const D=M.panzoomAction,A=M.panzoomChange;if((A||D)&&(t.preventDefault(),t.stopPropagation()),A){let z={};try{z=JSON.parse(A)}catch{}y&&y.applyChange(z)}else D&&y&&y[D]&&y[D]()}onChange(){this.onRefresh()}onRefresh(){if(this.instance.isClosing())return;const t=this.container;if(!t)return;const o=this.instance.getSlide();if(!o||o.state!==gn.Ready)return;const c=o&&!o.error&&o.panzoom;for(const y of t.querySelectorAll("[data-panzoom-action]"))c?(y.removeAttribute("disabled"),y.removeAttribute("tabindex")):(y.setAttribute("disabled",""),y.setAttribute("tabindex","-1"));let d=c&&c.canZoomIn(),x=c&&c.canZoomOut();for(const y of t.querySelectorAll('[data-panzoom-action="zoomIn"]'))d?(y.removeAttribute("disabled"),y.removeAttribute("tabindex")):(y.setAttribute("disabled",""),y.setAttribute("tabindex","-1"));for(const y of t.querySelectorAll('[data-panzoom-action="zoomOut"]'))x?(y.removeAttribute("disabled"),y.removeAttribute("tabindex")):(y.setAttribute("disabled",""),y.setAttribute("tabindex","-1"));for(const y of t.querySelectorAll('[data-panzoom-action="toggleZoom"],[data-panzoom-action="iterateZoom"]')){x||d?(y.removeAttribute("disabled"),y.removeAttribute("tabindex")):(y.setAttribute("disabled",""),y.setAttribute("tabindex","-1"));const h=y.querySelector("g");h&&(h.style.display=d?"":"none")}}onDone(t,o){var c;(c=o.panzoom)===null||c===void 0||c.on("afterTransform",()=>{this.instance.isCurrentSlide(o)&&this.onRefresh()}),this.instance.isCurrentSlide(o)&&this.onRefresh()}createContainer(){const t=this.instance.container;if(!t)return null;const o=this.option("parentEl")||t;let c=o.querySelector("."+Bp);return c||(c=document.createElement("div"),dt(c,Bp),o.prepend(c)),c.addEventListener("click",this.onClick,{passive:!1,capture:!0}),t&&dt(t,u0),this.container=c,c}createEl(t){const o=this.instance,c=o.carousel;if(!c||t==="toggleFS"||t==="fullscreen"&&!Zy())return null;let d=null;const x=c.slides.length||0;let y=0,h=0;for(const D of c.slides)(D.panzoom||D.type==="image")&&y++,(D.type==="image"||D.downloadSrc)&&h++;if(x<2&&["infobar","prev","next"].includes(t))return d;if(Op[t]!==void 0&&!y||t==="download"&&!h)return null;if(t==="thumbs"){const D=o.plugins.Thumbs;if(!D||!D.isEnabled)return null}if(t==="slideshow"&&(!c.plugins.Autoplay||x<2))return null;if(Op[t]!==void 0){const D=Op[t];d=document.createElement("button"),d.setAttribute("title",this.instance.localize(`{{${t.toUpperCase()}}}`)),dt(d,"f-button"),D.action&&(d.dataset.panzoomAction=D.action),D.change&&(d.dataset.panzoomChange=JSON.stringify(D.change)),d.appendChild(Qr(this.instance.localize(D.icon)))}else{const D=(this.option("items")||[])[t];D&&(d=Qr(this.instance.localize(D.tpl)),typeof D.click=="function"&&d.addEventListener("click",A=>{A.preventDefault(),A.stopPropagation(),typeof D.click=="function"&&D.click.call(this,this,A)}))}const M=d==null?void 0:d.querySelector("svg");if(M)for(const[D,A]of Object.entries(qE))M.getAttribute(D)||M.setAttribute(D,String(A));return d}removeContainer(){const t=this.container;t&&t.remove(),this.container=null,this.state=qo.Disabled;const o=this.instance.container;o&&ni(o,u0)}attach(){const t=this,o=t.instance;o.on("Carousel.initSlides",t.onReady),o.on("done",t.onDone),o.on(["reveal","Carousel.change"],t.onChange),t.onReady(t.instance)}detach(){const t=this,o=t.instance;o.off("Carousel.initSlides",t.onReady),o.off("done",t.onDone),o.off(["reveal","Carousel.change"],t.onChange),t.removeContainer()}}Object.defineProperty(d0,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:HE});const ZE={Hash:class extends Vr{onReady(){oc=!1}onChange(n){Uo&&clearTimeout(Uo);const{hash:t}=Gy(),{hash:o}=au(),c=n.isOpeningSlide(n.getSlide());c&&(Wy=o===t?"":o),t&&t!==o&&(Uo=setTimeout(()=>{try{if(n.state===Xi.Ready){let d="replaceState";c&&!ou&&(d="pushState",ou=!0),window.history[d]({},document.title,window.location.pathname+window.location.search+t)}}catch{}},300))}onClose(n){if(Uo&&clearTimeout(Uo),!oc&&ou)return ou=!1,oc=!1,void window.history.back();if(!oc)try{window.history.replaceState({},document.title,window.location.pathname+window.location.search+(Wy||""))}catch{}}attach(){const n=this.instance;n.on("ready",this.onReady),n.on(["Carousel.ready","Carousel.change"],this.onChange),n.on("close",this.onClose)}detach(){const n=this.instance;n.off("ready",this.onReady),n.off(["Carousel.ready","Carousel.change"],this.onChange),n.off("close",this.onClose)}static parseURL(){return au()}static startFromUrl(){Yy()}static destroy(){window.removeEventListener("hashchange",Ky,!1)}},Html:i0,Images:Qy,Slideshow:r0,Thumbs:h0,Toolbar:d0},p0="with-fancybox",Fp="hide-scrollbar",f0="--fancybox-scrollbar-compensate",m0="--fancybox-body-margin",Np="aria-hidden",Vp="is-using-tab",$p="is-animated",g0="is-compact",y0="is-loading",jp="is-opening",du="has-caption",ja="disabled",Zo="tabindex",_0="download",Up="href",Ua="src",Ks=n=>typeof n=="string",x0=function(){var n=window.getSelection();return!!n&&n.type==="Range"};let wr,kr=null,Wo=null,b0=0,v0=0,w0=0,k0=0;const Ha=new Map;let WE=0;class Xt extends Tp{get isIdle(){return this.idle}get isCompact(){return this.option("compact")}constructor(t=[],o={},c={}){super(o),Object.defineProperty(this,"userSlides",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"userPlugins",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"idle",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"idleTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"clickTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"pwt",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"ignoreFocusChange",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"startedFs",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:Xi.Init}),Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"footer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"carousel",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"lastFocus",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"prevMouseMoveEvent",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),wr||(wr=Zy()),this.id=o.id||++WE,Ha.set(this.id,this),this.userSlides=t,this.userPlugins=c,queueMicrotask(()=>{this.init()})}init(){if(this.state===Xi.Destroy)return;this.state=Xi.Init,this.attachPlugins(Object.assign(Object.assign({},Xt.Plugins),this.userPlugins)),this.emit("init"),this.emit("attachPlugins"),this.option("hideScrollbar")===!0&&(()=>{if(!sc)return;const o=document,c=o.body,d=o.documentElement;if(c.classList.contains(Fp))return;let x=window.innerWidth-d.getBoundingClientRect().width;const y=parseFloat(window.getComputedStyle(c).marginRight);x<0&&(x=0),d.style.setProperty(f0,`${x}px`),y&&c.style.setProperty(m0,`${y}px`),c.classList.add(Fp)})(),this.initLayout(),this.scale();const t=()=>{this.initCarousel(this.userSlides),this.state=Xi.Ready,this.attachEvents(),this.emit("ready"),setTimeout(()=>{this.container&&this.container.setAttribute(Np,"false")},16)};this.option("Fullscreen.autoStart")&&wr&&!wr.isFullscreen()?wr.request().then(()=>{this.startedFs=!0,t()}).catch(()=>t()):t()}initLayout(){var t,o;const c=this.option("parentEl")||document.body,d=Qr(this.localize(this.option("tpl.main")||""));if(d){if(d.setAttribute("id",`fancybox-${this.id}`),d.setAttribute("aria-label",this.localize("{{MODAL}}")),d.classList.toggle(g0,this.isCompact),dt(d,this.option("mainClass")||""),dt(d,jp),this.container=d,this.footer=d.querySelector(".fancybox__footer"),c.appendChild(d),dt(document.documentElement,p0),kr&&Wo||(kr=document.createElement("span"),dt(kr,"fancybox-focus-guard"),kr.setAttribute(Zo,"0"),kr.setAttribute(Np,"true"),kr.setAttribute("aria-label","Focus guard"),Wo=kr.cloneNode(),(t=d.parentElement)===null||t===void 0||t.insertBefore(kr,d),(o=d.parentElement)===null||o===void 0||o.append(Wo)),d.addEventListener("mousedown",x=>{b0=x.pageX,v0=x.pageY,ni(d,Vp)}),this.option("closeExisting"))for(const x of Ha.values())x.id!==this.id&&x.close();else this.option("animated")&&(dt(d,$p),setTimeout(()=>{this.isClosing()||ni(d,$p)},350));this.emit("initLayout")}}initCarousel(t){const o=this.container;if(!o)return;const c=o.querySelector(".fancybox__carousel");if(!c)return;const d=this.carousel=new jo(c,Un({},{slides:t,transition:"fade",Panzoom:{lockAxis:this.option("dragToClose")?"xy":"x",infinite:!!this.option("dragToClose")&&"y"},Dots:!1,Navigation:{classes:{container:"fancybox__nav",button:"f-button",isNext:"is-next",isPrev:"is-prev"}},initialPage:this.option("startIndex"),l10n:this.option("l10n")},this.option("Carousel")||{}));d.on("*",(x,y,...h)=>{this.emit(`Carousel.${y}`,x,...h)}),d.on(["ready","change"],()=>{this.manageCaption()}),this.on("Carousel.removeSlide",(x,y,h)=>{this.clearContent(h),h.state=void 0}),d.on("Panzoom.touchStart",()=>{var x,y;this.isCompact||this.endIdle(),!((x=document.activeElement)===null||x===void 0)&&x.closest(".f-thumbs")&&((y=this.container)===null||y===void 0||y.focus())}),d.on("settle",()=>{this.idleTimer||this.isCompact||!this.option("idle")||this.setIdle(),this.option("autoFocus")&&!this.isClosing&&this.checkFocus()}),this.option("dragToClose")&&(d.on("Panzoom.afterTransform",(x,y)=>{const h=this.getSlide();if(h&&wp(h.el))return;const M=this.container;if(M){const D=Math.abs(y.current.f),A=D<1?"":Math.max(.5,Math.min(1,1-D/y.contentRect.fitHeight*1.5));M.style.setProperty("--fancybox-ts",A?"0s":""),M.style.setProperty("--fancybox-opacity",A+"")}}),d.on("Panzoom.touchEnd",(x,y,h)=>{var M;const D=this.getSlide();if(D&&wp(D.el)||y.isMobile&&document.activeElement&&["TEXTAREA","INPUT"].indexOf((M=document.activeElement)===null||M===void 0?void 0:M.nodeName)!==-1)return;const A=Math.abs(y.dragOffset.y);y.lockedAxis==="y"&&(A>=200||A>=50&&y.dragOffset.time<300)&&(h&&h.cancelable&&h.preventDefault(),this.close(h,"f-throwOut"+(y.current.f<0?"Up":"Down")))})),d.on("change",x=>{var y;let h=(y=this.getSlide())===null||y===void 0?void 0:y.triggerEl;if(h){const M=new CustomEvent("slideTo",{bubbles:!0,cancelable:!0,detail:x.page});h.dispatchEvent(M)}}),d.on(["refresh","change"],x=>{const y=this.container;if(!y)return;for(const D of y.querySelectorAll("[data-fancybox-current-index]"))D.innerHTML=x.page+1;for(const D of y.querySelectorAll("[data-fancybox-count]"))D.innerHTML=x.pages.length;if(!x.isInfinite){for(const D of y.querySelectorAll("[data-fancybox-next]"))x.page<x.pages.length-1?(D.removeAttribute(ja),D.removeAttribute(Zo)):(D.setAttribute(ja,""),D.setAttribute(Zo,"-1"));for(const D of y.querySelectorAll("[data-fancybox-prev]"))x.page>0?(D.removeAttribute(ja),D.removeAttribute(Zo)):(D.setAttribute(ja,""),D.setAttribute(Zo,"-1"))}const h=this.getSlide();if(!h)return;let M=h.downloadSrc||"";M||h.type!=="image"||h.error||!Ks(h[Ua])||(M=h[Ua]);for(const D of y.querySelectorAll("[data-fancybox-download]")){const A=h.downloadFilename;M?(D.removeAttribute(ja),D.removeAttribute(Zo),D.setAttribute(Up,M),D.setAttribute(_0,A||M),D.setAttribute("target","_blank")):(D.setAttribute(ja,""),D.setAttribute(Zo,"-1"),D.removeAttribute(Up),D.removeAttribute(_0))}}),this.emit("initCarousel")}attachEvents(){const t=this,o=t.container;if(!o)return;o.addEventListener("click",t.onClick,{passive:!1,capture:!1}),o.addEventListener("wheel",t.onWheel,{passive:!1,capture:!1}),document.addEventListener("keydown",t.onKeydown,{passive:!1,capture:!0}),document.addEventListener("visibilitychange",t.onVisibilityChange,!1),document.addEventListener("mousemove",t.onMousemove),t.option("trapFocus")&&document.addEventListener("focus",t.onFocus,!0),window.addEventListener("resize",t.onResize);const c=window.visualViewport;c&&(c.addEventListener("scroll",t.onResize),c.addEventListener("resize",t.onResize))}detachEvents(){const t=this,o=t.container;if(!o)return;document.removeEventListener("keydown",t.onKeydown,{passive:!1,capture:!0}),o.removeEventListener("wheel",t.onWheel,{passive:!1,capture:!1}),o.removeEventListener("click",t.onClick,{passive:!1,capture:!1}),document.removeEventListener("mousemove",t.onMousemove),window.removeEventListener("resize",t.onResize);const c=window.visualViewport;c&&(c.removeEventListener("resize",t.onResize),c.removeEventListener("scroll",t.onResize)),document.removeEventListener("visibilitychange",t.onVisibilityChange,!1),document.removeEventListener("focus",t.onFocus,!0)}scale(){const t=this.container;if(!t)return;const o=window.visualViewport,c=Math.max(1,(o==null?void 0:o.scale)||1);let d="",x="",y="";if(o&&c>1){let h=`${o.offsetLeft}px`,M=`${o.offsetTop}px`;d=o.width*c+"px",x=o.height*c+"px",y=`translate3d(${h}, ${M}, 0) scale(${1/c})`}t.style.transform=y,t.style.width=d,t.style.height=x}onClick(t){var o;const{container:c,isCompact:d}=this;if(!c||this.isClosing())return;!d&&this.option("idle")&&this.resetIdle();const x=t.composedPath()[0];if(x.closest(".fancybox-spinner")||x.closest("[data-fancybox-close]"))return t.preventDefault(),void this.close(t);if(x.closest("[data-fancybox-prev]"))return t.preventDefault(),void this.prev();if(x.closest("[data-fancybox-next]"))return t.preventDefault(),void this.next();if(t.type==="click"&&t.detail===0||Math.abs(t.pageX-b0)>30||Math.abs(t.pageY-v0)>30)return;const y=document.activeElement;if(x0()&&y&&c.contains(y))return;if(d&&((o=this.getSlide())===null||o===void 0?void 0:o.type)==="image")return void(this.clickTimer?(clearTimeout(this.clickTimer),this.clickTimer=null):this.clickTimer=setTimeout(()=>{this.toggleIdle(),this.clickTimer=null},350));if(this.emit("click",t),t.defaultPrevented)return;let h=!1;if(x.closest(".fancybox__content")){if(y){if(y.closest("[contenteditable]"))return;x.matches(Dp)||y.blur()}if(x0())return;h=this.option("contentClick")}else x.closest(".fancybox__carousel")&&!x.matches(Dp)&&(h=this.option("backdropClick"));h==="close"?(t.preventDefault(),this.close(t)):h==="next"?(t.preventDefault(),this.next()):h==="prev"&&(t.preventDefault(),this.prev())}onWheel(t){const o=t.target;let c=this.option("wheel",t);o.closest(".fancybox__thumbs")&&(c="slide");const d=c==="slide",x=[-t.deltaX||0,-t.deltaY||0,-t.detail||0].reduce(function(M,D){return Math.abs(D)>Math.abs(M)?D:M}),y=Math.max(-1,Math.min(1,x)),h=Date.now();this.pwt&&h-this.pwt<300?d&&t.preventDefault():(this.pwt=h,this.emit("wheel",t,y),t.defaultPrevented||(c==="close"?(t.preventDefault(),this.close(t)):c==="slide"&&(Jh(o)||(t.preventDefault(),this[y>0?"prev":"next"]()))))}onScroll(){window.scrollTo(w0,k0)}onKeydown(t){if(!this.isTopmost())return;this.isCompact||!this.option("idle")||this.isClosing()||this.resetIdle();const o=t.key,c=this.option("keyboard");if(!c)return;const d=t.composedPath()[0],x=document.activeElement&&document.activeElement.classList,y=x&&x.contains("f-button")||d.dataset.carouselPage||d.dataset.carouselIndex;if(o!=="Escape"&&!y&&Hn(d)&&(d.isContentEditable||["TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].indexOf(d.nodeName)!==-1)||(t.key==="Tab"?dt(this.container,Vp):ni(this.container,Vp),t.ctrlKey||t.altKey||t.shiftKey))return;this.emit("keydown",o,t);const h=c[o];h&&typeof this[h]=="function"&&(t.preventDefault(),this[h]())}onResize(){const t=this.container;if(!t)return;const o=this.isCompact;t.classList.toggle(g0,o),this.manageCaption(this.getSlide()),this.isCompact?this.clearIdle():this.endIdle(),this.scale(),this.emit("resize")}onFocus(t){this.isTopmost()&&this.checkFocus(t)}onMousemove(t){this.prevMouseMoveEvent=t,!this.isCompact&&this.option("idle")&&this.resetIdle()}onVisibilityChange(){document.visibilityState==="visible"?this.checkFocus():this.endIdle()}manageCloseBtn(t){const o=this.optionFor(t,"closeButton")||!1;if(o==="auto"){const d=this.plugins.Toolbar;if(d&&d.state===qo.Ready)return}if(!o||!t.contentEl||t.closeBtnEl)return;const c=this.option("tpl.closeButton");if(c){const d=Qr(this.localize(c));t.closeBtnEl=t.contentEl.appendChild(d),t.el&&dt(t.el,"has-close-btn")}}manageCaption(t=void 0){var o,c;const d="fancybox__caption",x=this.container;if(!x)return;ni(x,du);const y=this.isCompact||this.option("commonCaption"),h=!y;if(this.caption&&this.stop(this.caption),h&&this.caption&&(this.caption.remove(),this.caption=null),y&&!this.caption)for(const z of((o=this.carousel)===null||o===void 0?void 0:o.slides)||[])z.captionEl&&(z.captionEl.remove(),z.captionEl=void 0,ni(z.el,du),(c=z.el)===null||c===void 0||c.removeAttribute("aria-labelledby"));if(t||(t=this.getSlide()),!t||y&&!this.isCurrentSlide(t))return;const M=t.el;let D=this.optionFor(t,"caption","");if(!D)return void(y&&this.caption&&this.animate(this.caption,"f-fadeOut",()=>{this.caption&&(this.caption.innerHTML="")}));let A=null;if(h){if(A=t.captionEl||null,M&&!A){const z=d+`_${this.id}_${t.index}`;A=document.createElement("div"),dt(A,d),A.setAttribute("id",z),t.captionEl=M.appendChild(A),dt(M,du),M.setAttribute("aria-labelledby",z)}}else A=this.caption,A||(A=x.querySelector("."+d)),!A&&(A=document.createElement("div"),A.dataset.fancyboxCaption="",dt(A,d),(this.footer||x).prepend(A)),dt(x,du),this.caption=A;A&&(A.innerHTML="",Ks(D)||typeof D=="number"?A.innerHTML=D+"":D instanceof HTMLElement&&A.appendChild(D))}checkFocus(t){this.focus(t)}focus(t){var o;if(this.ignoreFocusChange)return;const c=document.activeElement||null,d=(t==null?void 0:t.target)||null,x=this.container,y=(o=this.carousel)===null||o===void 0?void 0:o.viewport;if(!x||!y||!t&&c&&x.contains(c))return;const h=this.getSlide(),M=h&&h.state===gn.Ready?h.el:null;if(!M||M.contains(c)||x===c)return;t&&t.cancelable&&t.preventDefault(),this.ignoreFocusChange=!0;const D=Array.from(x.querySelectorAll(Dp));let A=[],z=null;for(let N of D){const Y=!N.offsetParent||!!N.closest('[aria-hidden="true"]'),ee=M&&M.contains(N),oe=!y.contains(N);if(N===x||(ee||oe)&&!Y){A.push(N);const he=N.dataset.origTabindex;he!==void 0&&he&&(N.tabIndex=parseFloat(he)),N.removeAttribute("data-orig-tabindex"),!N.hasAttribute("autoFocus")&&z||(z=N)}else{const he=N.dataset.origTabindex===void 0?N.getAttribute("tabindex")||"":N.dataset.origTabindex;he&&(N.dataset.origTabindex=he),N.tabIndex=-1}}let L=null;t?(!d||A.indexOf(d)<0)&&(L=z||x,A.length&&(c===Wo?L=A[0]:this.lastFocus!==x&&c!==kr||(L=A[A.length-1]))):L=h&&h.type==="image"?x:z||x,L&&qy(L),this.lastFocus=document.activeElement,this.ignoreFocusChange=!1}next(){const t=this.carousel;t&&t.pages.length>1&&t.slideNext()}prev(){const t=this.carousel;t&&t.pages.length>1&&t.slidePrev()}jumpTo(...t){this.carousel&&this.carousel.slideTo(...t)}isTopmost(){var t;return((t=Xt.getInstance())===null||t===void 0?void 0:t.id)==this.id}animate(t=null,o="",c){if(!t||!o)return void(c&&c());this.stop(t);const d=x=>{x.target===t&&t.dataset.animationName&&(t.removeEventListener("animationend",d),delete t.dataset.animationName,c&&c(),ni(t,o))};t.dataset.animationName=o,t.addEventListener("animationend",d),dt(t,o)}stop(t){t&&t.dispatchEvent(new CustomEvent("animationend",{bubbles:!1,cancelable:!0,currentTarget:t}))}setContent(t,o="",c=!0){if(this.isClosing())return;const d=t.el;if(!d)return;let x=null;if(Hn(o)?x=o:(x=Qr(o+""),Hn(x)||(x=document.createElement("div"),x.innerHTML=o+"")),["img","picture","iframe","video","audio"].includes(x.nodeName.toLowerCase())){const y=document.createElement("div");y.appendChild(x),x=y}Hn(x)&&t.filter&&!t.error&&(x=x.querySelector(t.filter)),x&&Hn(x)?(dt(x,"fancybox__content"),t.id&&x.setAttribute("id",t.id),d.classList.add(`has-${t.error?"error":t.type||"unknown"}`),d.prepend(x),x.style.display==="none"&&(x.style.display=""),getComputedStyle(x).getPropertyValue("display")==="none"&&(x.style.display=t.display||this.option("defaultDisplay")||"flex"),t.contentEl=x,c&&this.revealContent(t),this.manageCloseBtn(t),this.manageCaption(t)):this.setError(t,"{{ELEMENT_NOT_FOUND}}")}revealContent(t,o){const c=t.el,d=t.contentEl;c&&d&&(this.emit("reveal",t),this.hideLoading(t),t.state=gn.Opening,(o=this.isOpeningSlide(t)?o===void 0?this.optionFor(t,"showClass"):o:"f-fadeIn")?this.animate(d,o,()=>{this.done(t)}):this.done(t))}done(t){this.isClosing()||(t.state=gn.Ready,this.emit("done",t),dt(t.el,"is-done"),this.isCurrentSlide(t)&&this.option("autoFocus")&&queueMicrotask(()=>{var o;(o=t.panzoom)===null||o===void 0||o.updateControls(),this.option("autoFocus")&&this.focus()}),this.isOpeningSlide(t)&&(ni(this.container,jp),!this.isCompact&&this.option("idle")&&this.setIdle()))}isCurrentSlide(t){const o=this.getSlide();return!(!t||!o)&&o.index===t.index}isOpeningSlide(t){var o,c;return((o=this.carousel)===null||o===void 0?void 0:o.prevPage)===null&&t&&t.index===((c=this.getSlide())===null||c===void 0?void 0:c.index)}showLoading(t){t.state=gn.Loading;const o=t.el;o&&(dt(o,y0),this.emit("loading",t),t.spinnerEl||setTimeout(()=>{if(!this.isClosing()&&!t.spinnerEl&&t.state===gn.Loading){let c=Qr(Cp);dt(c,"fancybox-spinner"),t.spinnerEl=c,o.prepend(c),this.animate(c,"f-fadeIn")}},250))}hideLoading(t){const o=t.el;if(!o)return;const c=t.spinnerEl;this.isClosing()?c==null||c.remove():(ni(o,y0),c&&this.animate(c,"f-fadeOut",()=>{c.remove()}),t.state===gn.Loading&&(this.emit("loaded",t),t.state=gn.Ready))}setError(t,o){if(this.isClosing())return;const c=new Event("error",{bubbles:!0,cancelable:!0});if(this.emit("error",c,t),c.defaultPrevented)return;t.error=o,this.hideLoading(t),this.clearContent(t);const d=document.createElement("div");d.classList.add("fancybox-error"),d.innerHTML=this.localize(o||"<p>{{ERROR}}</p>"),this.setContent(t,d)}clearContent(t){if(t.state===void 0)return;this.emit("clearContent",t),t.contentEl&&(t.contentEl.remove(),t.contentEl=void 0);const o=t.el;o&&(ni(o,"has-error"),ni(o,"has-unknown"),ni(o,`has-${t.type||"unknown"}`)),t.closeBtnEl&&t.closeBtnEl.remove(),t.closeBtnEl=void 0,t.captionEl&&t.captionEl.remove(),t.captionEl=void 0,t.spinnerEl&&t.spinnerEl.remove(),t.spinnerEl=void 0}getSlide(){var t;const o=this.carousel;return((t=o==null?void 0:o.pages[o==null?void 0:o.page])===null||t===void 0?void 0:t.slides[0])||void 0}close(t,o){if(this.isClosing())return;const c=new Event("shouldClose",{bubbles:!0,cancelable:!0});if(this.emit("shouldClose",c,t),c.defaultPrevented)return;t&&t.cancelable&&(t.preventDefault(),t.stopPropagation());const d=()=>{this.proceedClose(t,o)};this.startedFs&&wr&&wr.isFullscreen()?Promise.resolve(wr.exit()).then(()=>d()):d()}clearIdle(){this.idleTimer&&clearTimeout(this.idleTimer),this.idleTimer=null}setIdle(t=!1){const o=()=>{this.clearIdle(),this.idle=!0,dt(this.container,"is-idle"),this.emit("setIdle")};if(this.clearIdle(),!this.isClosing())if(t)o();else{const c=this.option("idle");c&&(this.idleTimer=setTimeout(o,c))}}endIdle(){this.clearIdle(),this.idle&&!this.isClosing()&&(this.idle=!1,ni(this.container,"is-idle"),this.emit("endIdle"))}resetIdle(){this.endIdle(),this.setIdle()}toggleIdle(){this.idle?this.endIdle():this.setIdle(!0)}toggleFullscreen(){wr&&(wr.isFullscreen()?wr.exit():wr.request().then(()=>{this.startedFs=!0}))}isClosing(){return[Xi.Closing,Xi.CustomClosing,Xi.Destroy].includes(this.state)}proceedClose(t,o){var c,d;this.state=Xi.Closing,this.clearIdle(),this.detachEvents();const x=this.container,y=this.carousel,h=this.getSlide(),M=h&&this.option("placeFocusBack")?h.triggerEl||this.option("triggerEl"):null;if(M&&(Hy(M)?qy(M):M.focus()),x&&(ni(x,jp),dt(x,"is-closing"),x.setAttribute(Np,"true"),this.option("animated")&&dt(x,$p),x.style.pointerEvents="none"),y){y.clearTransitions(),(c=y.panzoom)===null||c===void 0||c.destroy(),(d=y.plugins.Navigation)===null||d===void 0||d.detach();for(const D of y.slides){D.state=gn.Closing,this.hideLoading(D);const A=D.contentEl;A&&this.stop(A);const z=D==null?void 0:D.panzoom;z&&(z.stop(),z.detachEvents(),z.detachObserver()),this.isCurrentSlide(D)||y.emit("removeSlide",D)}}w0=window.scrollX,k0=window.scrollY,window.addEventListener("scroll",this.onScroll),this.emit("close",t),this.state!==Xi.CustomClosing?(o===void 0&&h&&(o=this.optionFor(h,"hideClass")),o&&h?(this.animate(h.contentEl,o,()=>{y&&y.emit("removeSlide",h)}),setTimeout(()=>{this.destroy()},500)):this.destroy()):setTimeout(()=>{this.destroy()},500)}destroy(){var t;if(this.state===Xi.Destroy)return;window.removeEventListener("scroll",this.onScroll),this.state=Xi.Destroy,(t=this.carousel)===null||t===void 0||t.destroy();const o=this.container;o&&o.remove(),Ha.delete(this.id);const c=Xt.getInstance();c?c.focus():(kr&&(kr.remove(),kr=null),Wo&&(Wo.remove(),Wo=null),ni(document.documentElement,p0),(()=>{if(!sc)return;const d=document,x=d.body;x.classList.remove(Fp),x.style.setProperty(m0,""),d.documentElement.style.setProperty(f0,"")})(),this.emit("destroy"))}static bind(t,o,c){if(!sc)return;let d,x="",y={};if(t===void 0?d=document.body:Ks(t)?(d=document.body,x=t,typeof o=="object"&&(y=o||{})):(d=t,Ks(o)&&(x=o),typeof c=="object"&&(y=c||{})),!d||!Hn(d))return;x=x||"[data-fancybox]";const h=Xt.openers.get(d)||new Map;h.set(x,y),Xt.openers.set(d,h),h.size===1&&d.addEventListener("click",Xt.fromEvent)}static unbind(t,o){let c,d="";if(Ks(t)?(c=document.body,d=t):(c=t,Ks(o)&&(d=o)),!c)return;const x=Xt.openers.get(c);x&&d&&x.delete(d),d&&x||(Xt.openers.delete(c),c.removeEventListener("click",Xt.fromEvent))}static destroy(){let t;for(;t=Xt.getInstance();)t.destroy();for(const o of Xt.openers.keys())o.removeEventListener("click",Xt.fromEvent);Xt.openers=new Map}static fromEvent(t){if(t.defaultPrevented||t.button&&t.button!==0||t.ctrlKey||t.metaKey||t.shiftKey)return;let o=t.composedPath()[0];const c=o.closest("[data-fancybox-trigger]");if(c){const Y=c.dataset.fancyboxTrigger||"",ee=document.querySelectorAll(`[data-fancybox="${Y}"]`),oe=parseInt(c.dataset.fancyboxIndex||"",10)||0;o=ee[oe]||o}if(!(o&&o instanceof Element))return;let d,x,y,h;if([...Xt.openers].reverse().find(([Y,ee])=>!(!Y.contains(o)||![...ee].reverse().find(([oe,he])=>{let _e=o.closest(oe);return!!_e&&(d=Y,x=oe,y=_e,h=he,!0)}))),!d||!x||!y)return;h=h||{},t.preventDefault(),o=y;let M=[],D=Un({},zp,h);D.event=t,D.triggerEl=o,D.delegate=c;const A=D.groupAll,z=D.groupAttr,L=z&&o?o.getAttribute(`${z}`):"";if((!o||L||A)&&(M=[].slice.call(d.querySelectorAll(x))),o&&!A&&(M=L?M.filter(Y=>Y.getAttribute(`${z}`)===L):[o]),!M.length)return;const N=Xt.getInstance();return N&&N.options.triggerEl&&M.indexOf(N.options.triggerEl)>-1?void 0:(o&&(D.startIndex=M.indexOf(o)),Xt.fromNodes(M,D))}static fromSelector(t,o,c){let d=null,x="",y={};if(Ks(t)?(d=document.body,x=t,typeof o=="object"&&(y=o||{})):t instanceof HTMLElement&&Ks(o)&&(d=t,x=o,typeof c=="object"&&(y=c||{})),!d||!x)return!1;const h=Xt.openers.get(d);return!!h&&(y=Un({},h.get(x)||{},y),!!y&&Xt.fromNodes(Array.from(d.querySelectorAll(x)),y))}static fromNodes(t,o){o=Un({},zp,o||{});const c=[];for(const d of t){const x=d.dataset||{},y=x[Ua]||d.getAttribute(Up)||d.getAttribute("currentSrc")||d.getAttribute(Ua)||void 0;let h;const M=o.delegate;let D;M&&c.length===o.startIndex&&(h=M instanceof HTMLImageElement?M:M.querySelector("img:not([aria-hidden])")),h||(h=d instanceof HTMLImageElement?d:d.querySelector("img:not([aria-hidden])")),h&&(D=h.currentSrc||h[Ua]||void 0,!D&&h.dataset&&(D=h.dataset.lazySrc||h.dataset[Ua]||void 0));const A={src:y,triggerEl:d,thumbEl:h,thumbElSrc:D,thumbSrc:D};for(const z in x){let L=x[z]+"";L=L!=="false"&&(L==="true"||L),A[z]=L}c.push(A)}return new Xt(c,o)}static getInstance(t){return t?Ha.get(t):Array.from(Ha.values()).reverse().find(o=>!o.isClosing()&&o)||null}static getSlide(){var t;return((t=Xt.getInstance())===null||t===void 0?void 0:t.getSlide())||null}static show(t=[],o={}){return new Xt(t,o)}static next(){const t=Xt.getInstance();t&&t.next()}static prev(){const t=Xt.getInstance();t&&t.prev()}static close(t=!0,...o){if(t)for(const c of Ha.values())c.close(...o);else{const c=Xt.getInstance();c&&c.close(...o)}}}Object.defineProperty(Xt,"version",{enumerable:!0,configurable:!0,writable:!0,value:"5.0.36"}),Object.defineProperty(Xt,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:zp}),Object.defineProperty(Xt,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:ZE}),Object.defineProperty(Xt,"openers",{enumerable:!0,configurable:!0,writable:!0,value:new Map});const GE={props:{options:Object},mounted(){(void 0)(this.$refs.container,"[data-fancybox]",{...this.options||{}})},updated(){(void 0)(this.$refs.container),(void 0)(),(void 0)(this.$refs.container,"[data-fancybox]",{...this.options||{}})},unmounted(){(void 0)()}},YE={ref:"container"};function XE(n,t,o,c,d,x){return v.openBlock(),v.createElementBlock("div",YE,[v.renderSlot(n.$slots,"default")],512)}const KE=vt(GE,[["render",XE]]),JE={props:["text"]},QE={class:"pl-3 text-sm font-medium text-gray-600"};function eT(n,t,o,c,d,x){return v.openBlock(),v.createElementBlock("div",null,[v.createElementVNode("p",QE,v.toDisplayString(o.text),1)])}const tT={components:{Fancybox:KE,VsEmptyWidget:vt(JE,[["render",eT]])},props:{id:{type:String,default:""},readonly:{type:Boolean,default:!1},prefilledData:{type:Array,default:()=>null}},data(){return{carouselOptions:{Carousel:{infinite:!1}},isModalVisible:!1,modal:{},images:[],editAction:!1,selectedFile:null,imageExtensions:["png","jpg","jpeg","gif"]}},watch:{id(){this.getFiles()}},mounted(){this.getFiles()},methods:{async downloadFile(n){const t=document.createElement("a");t.setAttribute("download",n.uploaded_name),t.href=n.file_path,t.click()},handleOpenModal(n){this.selectedFile=n,this.modal=this.prepareModal({title:"Ви впевнені?",message:"Ви впевнені, що хочете видалити це зображення?",confirmButtonText:"Так, я впевнена/ий",cancelButtonText:"Скасувати",confirm:this.deleteFile,updateListOnConfirm:!0}),this.isModalVisible=!0},prepareModal(n){const t={...n};return n.cancel||(t.cancel=()=>{this.isModalVisible=!1}),n.updateListOnConfirm&&(t.confirm=async()=>{await n.confirm(),this.isModalVisible=!1,this.getFiles()}),t},async deleteFile(){try{await mt.delete(`/api/widget/gallery/${this.selectedFile.entity_id}/${this.selectedFile.file_id}`),this.isModalVisible=!1,this.selectedFile="",this.$emit("update","images"),this.getFiles()}catch(n){console.log(n)}},async addFile(n){console.log(n),await Promise.all(Array.from(n.target.files).map(async t=>{const o=new FormData;o.append("file",t);try{const c=`/api/widget/file/${this.id}`;return await mt.post(c,o),this.$emit("update","file-list"),t}catch(c){return console.error(c),null}})),await this.getFiles()},async getFiles(){if(this.prefilledData){this.images=this.prefilledData;return}try{const{data:n}=await mt.get(`/api/widget/gallery/${this.id}`);this.images=n.rows}catch(n){console.error(n)}},size(n,t=2){if(n===0)return"0 Bytes";const o=1024,c=t<0?0:t,d=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],x=Math.floor(Math.log(n)/Math.log(o));return`${parseFloat((n/o**x).toFixed(c))} ${d[x]}`},dateFormat(n){const t={day:"numeric",month:"long",year:"numeric",hour:"numeric",minute:"numeric"};return new Date(n).toLocaleDateString("uk-UK",t)}}},iT={class:"vs-widget-images flex flex-col xl:bg-white xl:rounded-xl dark:xl:bg-neutral-800 dark:xl:border-neutral-700"},nT={class:"flex justify-between items-center gap-x-2 mb-4"},rT={class:"flex justify-end items-center gap-x-2"},sT=["href"],oT=["src","alt"],aT={class:"item__text-content bg-white opacity-0 rounded-b-lg absolute w-full bottom-0 p-3 flex gap-2.5 items-center justify-between"},lT={class:"text-xs"},cT={class:"widget-images__item-desc flex items-center text-xs text-gray-600 flex-wrap"},hT={class:"flex items-center"},uT={class:"text-xs"},dT=["onClick"],pT=["onClick"],fT={class:"p-4"},mT={class:"mt-1 text-gray-500 dark:text-neutral-500"},gT={class:"mt-4 flex justify-end gap-x-3"};function yT(n,t,o,c,d,x){var D;const y=v.resolveComponent("Fancybox"),h=v.resolveComponent("VsEmptyWidget"),M=v.resolveComponent("VsDialog");return v.openBlock(),v.createElementBlock("div",iT,[v.createElementVNode("div",nT,[t[5]||(t[5]=v.createElementVNode("h2",{class:"inline-block font-semibold text-gray-800 dark:text-neutral-200"}," Зображення ",-1)),v.createElementVNode("div",rT,[v.createElementVNode("div",null,[v.createElementVNode("label",null,[v.createElementVNode("input",{type:"file",class:"hidden",onChange:t[0]||(t[0]=A=>x.addFile(A))},null,32),t[4]||(t[4]=v.createElementVNode("div",{class:"py-2 px-2.5 inline-flex relative items-center gap-x-1.5 text-xs rounded-lg border border-blue-200 bg-blue-500 text-white shadow-sm hover:bg-blue-700 cursor-pointer"},[v.createElementVNode("i",{class:"ti ti-upload"}),v.createTextVNode(" Завантажити файл ")],-1))])])])]),(D=d.images)!=null&&D.length?(v.openBlock(),v.createBlock(y,{key:0,options:d.carouselOptions,class:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4"},{default:v.withCtx(()=>[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(d.images,A=>(v.openBlock(),v.createElementBlock("div",{key:A.file_path,class:"relative cursor-pointer rounded-b-lg item hover:shadow-lg h-[200px]"},[v.createElementVNode("a",{"data-fancybox":"gallery",href:A.file_path},[v.createElementVNode("img",{class:"h-full w-full rounded-lg",src:A.file_path||"/icons/no-image.jpg",alt:A.uploaded_name,width:"100%",height:"100%"},null,8,oT),v.createElementVNode("div",aT,[v.createElementVNode("div",null,[v.createElementVNode("span",lT,v.toDisplayString(A.uploaded_name),1),v.createElementVNode("div",cT,[v.createElementVNode("span",hT,v.toDisplayString(x.size(A.size)),1),v.createElementVNode("span",null,v.toDisplayString(x.dateFormat(A.cdate)),1)]),v.createElementVNode("span",uT,v.toDisplayString(A.username),1)]),v.createElementVNode("div",null,[v.createElementVNode("div",{class:v.normalizeClass(["flex items-center justify-center gap-2 hover:bg-gray-200 p-1 rounded",{disabled:o.readonly,"hover:cursor-pointer":!o.readonly}]),onClick:v.withModifiers(z=>x.downloadFile(A),["prevent"])},t[6]||(t[6]=[v.createElementVNode("i",{class:"ti ti-edit"},null,-1)]),10,dT),v.createElementVNode("div",{class:"flex items-center gap-2 hover:bg-gray-200 p-1 rounded hover:cursor-pointer",onClick:v.withModifiers(z=>x.handleOpenModal(A),["prevent"])},t[7]||(t[7]=[v.createElementVNode("i",{class:"ti ti-trash"},null,-1)]),8,pT)])])],8,sT)]))),128))]),_:1},8,["options"])):(v.openBlock(),v.createBlock(h,{key:1,text:"Зображення відсутні"})),v.createVNode(M,{title:d.modal.title,size:"small",visible:d.isModalVisible,"onUpdate:visible":t[3]||(t[3]=A=>d.isModalVisible=A)},{default:v.withCtx(()=>[v.createElementVNode("div",fT,[v.createElementVNode("p",mT,v.toDisplayString(d.modal.message),1),v.createElementVNode("div",gT,[v.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm 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",onClick:t[1]||(t[1]=(...A)=>d.modal.cancel&&d.modal.cancel(...A))},v.toDisplayString(d.modal.cancelButtonText),1),v.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm font-semibold rounded-lg border border-transparent bg-red-500 text-white hover:bg-red-600 disabled:opacity-50 disabled:pointer-events-none",onClick:t[2]||(t[2]=(...A)=>d.modal.confirm&&d.modal.confirm(...A))},v.toDisplayString(d.modal.confirmButtonText),1)])])]),_:1},8,["title","visible"])])}const _T=vt(tT,[["render",yT]]),xT=n=>{const t=/(\b\S)?/g,o=n.match(t);return o?o.join("").toUpperCase():""},bT={props:{name:{type:String,default(){return""}},avatar:{type:String,default(){return""}}},computed:{inItials(){return xT(this.name)}}},vT={class:"mr-2"},wT=["src"],kT={key:1,class:"flex flex-shrink-0 items-center justify-center w-6 h-6 bg-gray-500 text-xs text-white rounded-full"},ST={key:0},ET={key:1,class:"text-sm"};function TT(n,t,o,c,d,x){return v.openBlock(),v.createElementBlock("div",vT,[o.avatar?(v.openBlock(),v.createElementBlock("img",{key:0,src:o.avatar,alt:"avatar",class:"flex flex-shrink-0 items-center justify-center w-6 h-6 rounded-full"},null,8,wT)):o.name?(v.openBlock(),v.createElementBlock("div",kT,[x.inItials.length?(v.openBlock(),v.createElementBlock("span",ST,v.toDisplayString(x.inItials),1)):(v.openBlock(),v.createElementBlock("span",ET,t[0]||(t[0]=[v.createElementVNode("i",{class:"ti ti-user"},null,-1)])))])):v.createCommentVNode("",!0)])}const CT={components:{VsWidgetCommentsAvatar:vt(bT,[["render",TT]])},props:{comment:{type:Object,default:()=>({})},user:{type:Object,default:()=>({})},id:{type:String,default:""}},data(){return{commentContent:this.comment.body,isCommentActionVisible:!1,isOpen:!1,textareaValue:""}},computed:{isUserAutor(){return this.user.uid===this.comment.uid},createDate(){try{const n=Je(this.comment.cdate,"YYYY-MM-DD");return new Date(n).toLocaleDateString("uk-UA",{day:"2-digit",month:"long",year:"numeric"})}catch{return""}}},watch:{isOpen(n){n&&(this.textareaValue=this.comment.body)}},methods:{confirnDeleteComment(){document.body.click(),this.$emit("openModal",{title:"Ви впевнені?",message:"Ви впевнені, що хочете видалити цей коментар?",confirmButtonText:"Так, я впевнена/ий",cancelButtonText:"Скасувати",confirm:this.deleteComment,updateListOnConfirm:!0})},async updateComment(){try{await mt.put(`/api/widget/comment/${this.id}/${this.comment.communication_id}`,{body:this.textareaValue}),this.$emit("list-update"),this.isCommentActionVisible=!1}catch{this.$notify({title:"Помилка!",message:"Сталася помилка",type:"error"})}},async deleteComment(){try{await mt.delete(`/api/widget/comment/${this.id}/${this.comment.communication_id}`),this.$emit("list-update"),this.isCommentActionVisible=!1}catch{this.$notify({title:"Помилка!",message:"Сталася помилка",type:"error"})}},toggleCommentAction(){this.isCommentActionVisible=!this.isCommentActionVisible}}},MT={class:"p-6 text-base bg-white dark:bg-gray-900"},PT={class:"flex justify-between items-center mb-2"},IT={class:"flex items-center"},AT={class:"inline-flex items-center mr-3 text-sm text-gray-900 dark:text-white font-semibold capitalize"},DT={class:"text-sm text-gray-600 dark:text-gray-400"},zT={class:"text-gray-500 dark:text-gray-400"},LT={class:"flex items-center gap-[4px]"},RT={class:"flex flex-col gap-[8px] text-sm font-medium text-gray-500"},OT={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"};function BT(n,t,o,c,d,x){const y=v.resolveComponent("VsWidgetCommentsAvatar"),h=v.resolveComponent("VsDialog");return v.openBlock(),v.createElementBlock(v.Fragment,null,[v.createElementVNode("div",MT,[v.createElementVNode("div",PT,[v.createElementVNode("div",IT,[v.createElementVNode("p",AT,[v.createVNode(y,{name:o.comment.username,avatar:o.comment.avatar},null,8,["name","avatar"]),v.createTextVNode(v.toDisplayString(o.comment.username),1)]),v.createElementVNode("div",DT,v.toDisplayString(x.createDate),1)])]),v.createElementVNode("p",zT,v.toDisplayString(o.comment.body),1),v.createElementVNode("div",LT,[v.createElementVNode("button",{type:"button",class:"block py-2 dark:hover:bg-gray-600 hover:underline dark:hover:text-white text-start duration-300",onClick:t[0]||(t[0]=M=>d.isOpen=!0)}," Редагувати "),v.createElementVNode("button",{type:"button",class:"block py-2 dark:hover:bg-gray-600 hover:underline dark:hover:text-white text-start duration-300",onClick:t[1]||(t[1]=M=>x.confirnDeleteComment())}," Видалити ")])]),v.createVNode(h,{visible:d.isOpen,"onUpdate:visible":t[5]||(t[5]=M=>d.isOpen=M),title:"Редагувати"},{footer:v.withCtx(()=>[v.createElementVNode("div",OT,[v.createElementVNode("button",{onClick:t[3]||(t[3]=M=>d.isOpen=!1),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Відмінити "),v.createElementVNode("button",{onClick:t[4]||(t[4]=(...M)=>x.updateComment&&x.updateComment(...M)),class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:v.withCtx(()=>[v.createElementVNode("label",RT,[t[6]||(t[6]=v.createTextVNode(" Коментар ")),v.withDirectives(v.createElementVNode("textarea",{"onUpdate:modelValue":t[2]||(t[2]=M=>d.textareaValue=M),placeholder:"Напишіть коментар...",class:"w-full h-[200px] border rounded-lg outline-none resize-none p-[20px] focus:border-[2px] focus:border-blue-600 [&::-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"},null,512),[[v.vModelText,d.textareaValue]])])]),_:1},8,["visible"])],64)}const FT={components:{VsWidgetCommentsItem:vt(CT,[["render",BT]])},inject:["activeAddFormEditor"],props:{id:{type:String,default:()=>""},prefilledData:{type:Object,default:null}},data(){return{isLoaded:!1,isLoadFailed:!1,comments:[],user:{},modal:{title:"",message:"",cancel:"",confirm:"",cancelButtonText:"",confirmButtonText:""},isModalVisible:!1}},async created(){await this.getComments()},methods:{async getComments(){if(this.prefilledData){this.comments=this.prefilledData.rows,this.isLoaded=!0;return}try{const{data:n}=await mt.get(`/api/widget/comment/${this.id}`);this.comments=n.rows,this.user=n.user}catch(n){this.isLoadFailed=!0,console.error(n)}this.isLoaded=!0,this.$emit("update-comment-count")},prepareModal(n){const t={...n};return n.cancel||(t.cancel=()=>{this.isModalVisible=!1}),n.updateListOnConfirm&&(t.confirm=async()=>{await n.confirm(),this.isModalVisible=!1}),t},handleOpenModal(n){this.modal=this.prepareModal(n),this.isModalVisible=!0}}},NT={class:"flex flex-col divide-y"},VT={key:0,class:"max-h-[300px] 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"},$T={key:1},jT={class:"p-4"},UT={class:"mt-1 text-gray-500 dark:text-neutral-500"},HT={class:"mt-4 flex justify-end gap-x-3"};function qT(n,t,o,c,d,x){const y=v.resolveComponent("VsErrorOnLoading"),h=v.resolveComponent("VsWidgetCommentsItem"),M=v.resolveComponent("VsLoader"),D=v.resolveComponent("VsDialog");return v.openBlock(),v.createElementBlock("div",NT,[d.isLoaded?(v.openBlock(),v.createElementBlock(v.Fragment,{key:0},[d.isLoadFailed?(v.openBlock(),v.createBlock(y,{key:0})):(v.openBlock(),v.createElementBlock(v.Fragment,{key:1},[d.comments.length?(v.openBlock(),v.createElementBlock("div",VT,[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(d.comments,(A,z)=>(v.openBlock(),v.createBlock(h,{key:z,comment:A,user:d.user,index:z,id:o.id,onListUpdate:x.getComments,class:"border-top",onOpenModal:t[0]||(t[0]=L=>x.handleOpenModal(L))},null,8,["comment","user","index","id","onListUpdate"]))),128))])):(v.openBlock(),v.createElementBlock("div",$T,t[4]||(t[4]=[v.createElementVNode("p",{class:"pl-3 text-sm font-medium text-gray-600"},"Коментарі відсутні",-1)])))],64))],64)):(v.openBlock(),v.createBlock(M,{key:1,class:"justify-center",text:"Please wait..."})),v.createVNode(D,{title:d.modal.title,size:"small",visible:d.isModalVisible,"onUpdate:visible":t[3]||(t[3]=A=>d.isModalVisible=A)},{default:v.withCtx(()=>[v.createElementVNode("div",jT,[v.createElementVNode("p",UT,v.toDisplayString(d.modal.message),1),v.createElementVNode("div",HT,[v.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm 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",onClick:t[1]||(t[1]=(...A)=>d.modal.cancel&&d.modal.cancel(...A))},v.toDisplayString(d.modal.cancelButtonText),1),v.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm font-semibold rounded-lg border border-transparent bg-red-500 text-white hover:bg-red-600 disabled:opacity-50 disabled:pointer-events-none",onClick:t[2]||(t[2]=(...A)=>d.modal.confirm&&d.modal.confirm(...A))},v.toDisplayString(d.modal.confirmButtonText),1)])])]),_:1},8,["title","visible"])])}const ZT=vt(FT,[["render",qT]]),WT={props:{id:{type:String,default:()=>""},autofocus:{type:Boolean,default:()=>!0}},data(){return{isEditorOpen:!1,commentContent:""}},methods:{async addNewComment(){if(this.commentContent)try{await mt.post(`/api/widget/comment/${this.id}`,{body:this.commentContent}),this.commentContent="",this.$emit("list-update")}catch(n){console.error(n)}},setNewContent(n){this.commentContent=n}}},GT={class:"w-full widget-comment-form"},YT={class:"mb-4 bg-white border-gray-200 dark:bg-gray-800 dark:border-gray-700"};function XT(n,t,o,c,d,x){return v.openBlock(),v.createElementBlock("div",GT,[v.createElementVNode("div",YT,[v.withDirectives(v.createElementVNode("textarea",{"onUpdate:modelValue":t[0]||(t[0]=y=>d.commentContent=y),rows:"6",class:"w-full h-[200px] border rounded-lg outline-none resize-none p-[20px] focus:border-[2px] focus:border-blue-600 [&::-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",placeholder:"Напишіть коментар..."},null,512),[[v.vModelText,d.commentContent]])]),v.createElementVNode("button",{ref:"buttonAdd",class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300",onClick:t[1]||(t[1]=(...y)=>x.addNewComment&&x.addNewComment(...y))}," Відправити коментар ",512)])}const KT={components:{VsWidgetCommentsList:ZT,VsWidgetCommentsAddForm:vt(WT,[["render",XT]])},props:{id:{type:String,default(){return""}},prefilledData:{type:Object,default:null}},data(){return{activeAddFormEditor:"",comments:[],totalComment:"0"}},mounted(){this.comments=this.$refs.commentListRef.comments},watch:{comments(n){this.$emit("count-change",n.length)}},methods:{listUpdate(){this.$refs.commentListRef.getComments()},updateCommentCount(){this.totalComment=this.$refs.commentListRef.comments.length||"0"}}},JT={class:"bg-white-200"},QT={class:"flex justify-between items-center gap-x-2 mb-4"},eC={class:"inline-block font-semibold text-gray-800 dark:text-neutral-200"},tC={key:0,class:"inline-block font-semibold text-gray-800 dark:text-neutral-200"};function iC(n,t,o,c,d,x){const y=v.resolveComponent("VsWidgetCommentsAddForm"),h=v.resolveComponent("VsWidgetCommentsList");return v.openBlock(),v.createElementBlock("div",JT,[v.createElementVNode("div",QT,[v.createElementVNode("h2",eC,[t[2]||(t[2]=v.createTextVNode("Коментарі ")),d.comments?(v.openBlock(),v.createElementBlock("span",tC,"("+v.toDisplayString(d.totalComment)+")",1)):v.createCommentVNode("",!0)])]),v.createVNode(y,{class:"mb-6",id:o.id,onListUpdate:t[0]||(t[0]=M=>x.listUpdate())},null,8,["id"]),v.createVNode(h,{id:o.id,onUpdateCommentCount:t[1]||(t[1]=M=>x.updateCommentCount()),"prefilled-data":o.prefilledData,ref:"commentListRef"},null,8,["id","prefilled-data"])])}const nC={"vs-widget-map":zE,"vs-widget-gallery":_T,"vs-widget-comments":vt(KT,[["render",iC]])},rC={},sC={style:{width:"calc(100vw - 300px)",height:"calc(100vh - 60px)"},class:"bg-gray-50 flex items-center justify-center"},oC={...nC,...rC,"vs-dashboard":{__name:"vs-dashboard",setup(n){return(t,o)=>(v.openBlock(),v.createElementBlock("div",sC,o[0]||(o[0]=[v.createElementVNode("div",{class:"p-5 md:p-8 bg-white border border-gray-200 shadow-sm rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},[v.createElementVNode("div",{class:"mb-4 xl:mb-8"},[v.createElementVNode("h1",{class:"text-lg font-semibold text-gray-800 dark:text-neutral-200"}," Members "),v.createElementVNode("p",{class:"text-sm text-gray-500 dark:text-neutral-500"}," Manage members and users of your workspace and set their access level. ")]),v.createElementVNode("div",{class:"space-y-5"},[v.createElementVNode("div",{class:"flex sm:grid sm:grid-cols-2 gap-x-2 sm:gap-x-5"},[v.createElementVNode("div",{class:"relative w-full"},[v.createElementVNode("div",{class:"absolute inset-y-0 start-0 flex items-center pointer-events-none z-20 ps-3.5"},[v.createElementVNode("svg",{class:"shrink-0 size-4 text-gray-500 dark:text-neutral-400",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"},[v.createElementVNode("circle",{cx:"11",cy:"11",r:"8"}),v.createElementVNode("path",{d:"m21 21-4.3-4.3"})])]),v.createElementVNode("input",{type:"text",class:"py-2 ps-10 pe-8 block w-full bg-gray-100 border-transparent rounded-lg text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:border-transparent dark:text-neutral-400 dark:placeholder:text-neutral-400 dark:focus:ring-neutral-600",placeholder:"Search by name or email"}),v.createElementVNode("div",{class:"hidden absolute inset-y-0 end-0 flex items-center pointer-events-none z-20 pe-1"},[v.createElementVNode("button",{type:"button",class:"inline-flex shrink-0 justify-center items-center size-6 rounded-full text-gray-500 hover:text-blue-600 focus:outline-none focus:text-blue-600 dark:text-neutral-500 dark:hover:text-blue-500 dark:focus:text-blue-500","aria-label":"Close"},[v.createElementVNode("span",{class:"sr-only"},"Close"),v.createElementVNode("svg",{class:"shrink-0 size-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[v.createElementVNode("circle",{cx:"12",cy:"12",r:"10"}),v.createElementVNode("path",{d:"m15 9-6 6"}),v.createElementVNode("path",{d:"m9 9 6 6"})])])])]),v.createElementVNode("div",{class:"flex justify-end items-center gap-x-2"},[v.createElementVNode("button",{type:"button",class:"p-2.5 sm:py-2 sm:px-3 inline-flex items-center text-sm 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"},[v.createElementVNode("svg",{class:"shrink-0 sm:me-2 size-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[v.createElementVNode("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),v.createElementVNode("polyline",{points:"7 10 12 15 17 10"}),v.createElementVNode("line",{x1:"12",x2:"12",y1:"15",y2:"3"})]),v.createElementVNode("span",{class:"hidden sm:block"}," Download CSV ")]),v.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-1 text-sm font-medium rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:ring-2 focus:ring-blue-500","data-hs-overlay":"#hs-pro-dshm"},[v.createElementVNode("span",{class:"hidden sm:block"},"Send"),v.createTextVNode("Invite ")])])]),v.createElementVNode("div",{class:"grid sm:grid-cols-2 lg:grid-cols-4 gap-2 xl:gap-4"},[v.createElementVNode("div",{class:"p-4 flex flex-col bg-white border border-gray-200 rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},[v.createElementVNode("div",{class:"flex justify-between items-center mb-1"},[v.createElementVNode("h2",{class:"text-4xl font-semibold text-gray-800 dark:text-neutral-200"}),v.createElementVNode("div",{class:"flex items-center -space-x-2"},[v.createElementVNode("img",{class:"shrink-0 size-7 rounded-full",src:"https://images.unsplash.com/photo-1659482633369-9fe69af50bfb?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=3&w=320&h=320&q=80",alt:"Avatar"})])]),v.createElementVNode("h3",{class:"text-gray-500 dark:text-neutral-500"},"Admin")]),v.createElementVNode("div",{class:"p-4 flex flex-col bg-white border border-gray-200 rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},[v.createElementVNode("div",{class:"flex justify-between items-center mb-1"},[v.createElementVNode("h2",{class:"text-4xl font-semibold text-gray-800 dark:text-neutral-200"}," 5 "),v.createElementVNode("div",{class:"flex items-center -space-x-2"},[v.createElementVNode("img",{class:"shrink-0 size-7 shadow-md rounded-full",src:"https://images.unsplash.com/photo-1659482633369-9fe69af50bfb?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=2.5&w=320&h=320&q=80",alt:"Avatar"}),v.createElementVNode("span",{class:"flex shrink-0 justify-center items-center size-7 bg-white border border-gray-200 text-gray-700 text-xs font-medium uppercase rounded-full dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300"}," L "),v.createElementVNode("img",{class:"shrink-0 size-7 shadow-md rounded-full",src:"https://images.unsplash.com/photo-1679412330254-90cb240038c5?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=2.5&w=320&h=320&q=80",alt:"Avatar"}),v.createElementVNode("img",{class:"shrink-0 size-7 shadow-md rounded-full",src:"https://images.unsplash.com/photo-1659482634023-2c4fda99ac0c?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=2.5&w=320&h=320&q=80",alt:"Avatar"}),v.createElementVNode("span",{class:"flex shrink-0 justify-center items-center size-7 bg-white border border-gray-200 text-gray-700 text-xs font-medium uppercase rounded-full dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300"}," O ")])]),v.createElementVNode("div",{class:"inline-flex items-center gap-x-2"},[v.createElementVNode("h3",{class:"text-gray-500 dark:text-neutral-500"},"Members"),v.createElementVNode("div",{class:"hs-tooltip inline-block"},[v.createElementVNode("svg",{class:"hs-tooltip-toggle shrink-0 size-3.5 text-gray-500 dark:text-neutral-500",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16"},[v.createElementVNode("path",{d:"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"}),v.createElementVNode("path",{d:"m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"})]),v.createElementVNode("div",{class:"hs-tooltip-content hs-tooltip-shown:opacity-100 hs-tooltip-shown:visible opacity-0 inline-block absolute invisible z-20 w-60 py-1.5 px-2.5 bg-gray-900 text-xs text-white rounded dark:bg-neutral-700",role:"tooltip","data-popper-placement":"top",style:{position:"fixed",inset:"auto auto 0px 0px",margin:"0px",transform:"translate(689px, -708px)"}}," Limited Access Members can only access the projects, tasks, and messages explicitly shared with them. ")])])]),v.createElementVNode("div",{class:"p-4 flex flex-col bg-white border border-gray-200 rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},[v.createElementVNode("div",{class:"flex justify-between items-center mb-1"},[v.createElementVNode("h2",{class:"text-4xl font-semibold text-gray-800 dark:text-neutral-200"}," 2 "),v.createElementVNode("div",{class:"flex items-center -space-x-2"},[v.createElementVNode("span",{class:"flex shrink-0 justify-center items-center size-7 bg-white border border-gray-200 text-gray-700 text-xs font-medium uppercase rounded-full dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300"}," L "),v.createElementVNode("span",{class:"flex shrink-0 justify-center items-center size-7 bg-white border border-gray-200 text-gray-700 text-xs font-medium uppercase rounded-full dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300"}," 0 ")])]),v.createElementVNode("div",{class:"inline-flex items-center gap-x-2"},[v.createElementVNode("h3",{class:"text-gray-500 dark:text-neutral-500"}," Limited access members "),v.createElementVNode("div",{class:"hs-tooltip inline-block"},[v.createElementVNode("svg",{class:"hs-tooltip-toggle shrink-0 size-3.5 text-gray-500 dark:text-neutral-500",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16"},[v.createElementVNode("path",{d:"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"}),v.createElementVNode("path",{d:"m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"})]),v.createElementVNode("div",{class:"hs-tooltip-content hs-tooltip-shown:opacity-100 hs-tooltip-shown:visible opacity-0 inline-block absolute invisible z-20 w-60 py-1.5 px-2.5 bg-gray-900 text-xs text-white rounded dark:bg-neutral-700",role:"tooltip","data-popper-placement":"top",style:{position:"fixed",inset:"auto auto 0px 0px",margin:"0px",transform:"translate(1198px, -708px)"}}," Limited Access Members can only access the projects, tasks, and messages explicitly shared with them. ")])])]),v.createElementVNode("div",{class:"p-4 flex flex-col bg-white border border-gray-200 rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},[v.createElementVNode("div",{class:"flex justify-between items-center mb-1"},[v.createElementVNode("h2",{class:"text-4xl font-semibold text-gray-800 dark:text-neutral-200"}," 0 "),v.createElementVNode("div",{class:"flex items-center -space-x-2"})]),v.createElementVNode("h3",{class:"text-gray-500 dark:text-neutral-500"},"Pending invites")])]),v.createElementVNode("div",{class:"overflow-x-auto [&::-webkit-scrollbar]:h-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"},[v.createElementVNode("div",{class:"min-w-full inline-block align-middle"},[v.createElementVNode("table",{class:"min-w-full divide-y divide-gray-200 dark:divide-neutral-700"},[v.createElementVNode("thead",null,[v.createElementVNode("tr",null,[v.createElementVNode("th",{scope:"col",class:"min-w-[250px]"},[v.createElementVNode("div",{class:"pe-4 py-3 text-start flex items-center gap-x-1 text-sm font-medium text-gray-800 dark:text-neutral-200"}," Member ")]),v.createElementVNode("th",{scope:"col",class:"min-w-48"},[v.createElementVNode("div",{class:"px-4 py-3 text-start flex items-center gap-x-1 text-sm font-medium text-gray-800 dark:text-neutral-200"}," Role ")]),v.createElementVNode("th",{scope:"col"},[v.createElementVNode("div",{class:"px-4 py-3 text-start flex items-center gap-x-1 text-sm font-medium text-gray-800 dark:text-neutral-200"}," Email ")]),v.createElementVNode("th",{scope:"col",class:"min-w-36"},[v.createElementVNode("div",{class:"px-4 py-3 text-start flex items-center gap-x-1 text-sm font-medium text-gray-800 dark:text-neutral-200"}," Last activity ")]),v.createElementVNode("th",{scope:"col"},[v.createElementVNode("div",{class:"px-4 py-3 text-start flex items-center gap-x-1 text-sm font-medium text-gray-800 dark:text-neutral-200"}," Status ")])])]),v.createElementVNode("tbody",{class:"divide-y divide-gray-200 dark:divide-neutral-700"},[v.createElementVNode("tr",null,[v.createElementVNode("td",{class:"size-px whitespace-nowrap pe-4 py-3"},[v.createElementVNode("div",{class:"w-full flex items-center gap-x-3"},[v.createElementVNode("img",{class:"shrink-0 size-[38px] rounded-full",src:"https://images.unsplash.com/photo-1659482633369-9fe69af50bfb?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=3&w=320&h=320&q=80",alt:"Avatar"}),v.createElementVNode("div",{class:"grow"},[v.createElementVNode("span",{class:"text-sm font-medium text-gray-800 dark:text-neutral-200"}," James Collins ")])])]),v.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[v.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Admin ")]),v.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[v.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," james@site.com ")]),v.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[v.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Today ")]),v.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[v.createElementVNode("span",{class:"inline-flex items-center gap-x-1.5 py-1.5 px-2.5 text-xs font-medium bg-teal-100 text-teal-800 rounded-full dark:bg-teal-500/10 dark:text-teal-500"},[v.createElementVNode("span",{class:"size-1.5 inline-block bg-gray-800 rounded-full dark:bg-neutral-200"}),v.createTextVNode(" Active ")])])]),v.createElementVNode("tr",null,[v.createElementVNode("td",{class:"size-px whitespace-nowrap pe-4 py-3"},[v.createElementVNode("div",{class:"w-full flex items-center gap-x-3"},[v.createElementVNode("span",{class:"flex shrink-0 justify-center items-center size-[38px] bg-white border border-gray-200 text-gray-700 text-xs font-medium uppercase rounded-full dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300"}," L "),v.createElementVNode("div",{class:"grow"},[v.createElementVNode("span",{class:"text-sm font-medium text-gray-800 dark:text-neutral-200"}," James Collins ")])])]),v.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[v.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Can view ")]),v.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[v.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," liza@site.com ")]),v.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[v.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," 2 days ago ")]),v.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[v.createElementVNode("span",{class:"inline-flex items-center gap-1.5 py-1.5 px-2 text-xs font-medium bg-gray-100 text-gray-800 rounded-full dark:bg-neutral-500/20 dark:text-neutral-400"},[v.createElementVNode("span",{class:"size-1.5 inline-block bg-gray-800 rounded-full dark:bg-neutral-400"}),v.createTextVNode(" Inactive ")])])]),v.createElementVNode("tr",null,[v.createElementVNode("td",{class:"size-px whitespace-nowrap pe-4 py-3"},[v.createElementVNode("div",{class:"w-full flex items-center gap-x-3"},[v.createElementVNode("img",{class:"shrink-0 size-[38px] rounded-full",src:"https://images.unsplash.com/photo-1601935111741-ae98b2b230b0?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=2.5&w=320&h=320&q=80",alt:"Avatar"}),v.createElementVNode("div",{class:"grow"},[v.createElementVNode("span",{class:"text-sm font-medium text-gray-800 dark:text-neutral-200"}," Daniel Hobbs ")])])]),v.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[v.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Can edit ")]),v.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[v.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," dhobbs@site.com ")]),v.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[v.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Today ")]),v.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[v.createElementVNode("span",{class:"inline-flex items-center gap-1.5 py-1.5 px-2 text-xs font-medium bg-gray-100 text-gray-800 rounded-full dark:bg-neutral-500/20 dark:text-neutral-400"},[v.createElementVNode("span",{class:"size-1.5 inline-block bg-gray-800 rounded-full dark:bg-neutral-400"}),v.createTextVNode(" Inactive ")])])]),v.createElementVNode("tr",null,[v.createElementVNode("td",{class:"size-px whitespace-nowrap pe-4 py-3"},[v.createElementVNode("div",{class:"w-full flex items-center gap-x-3"},[v.createElementVNode("img",{class:"shrink-0 size-[38px] rounded-full",src:"https://images.unsplash.com/photo-1679412330254-90cb240038c5?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=2.5&w=320&h=320&q=80",alt:"Avatar"}),v.createElementVNode("div",{class:"grow"},[v.createElementVNode("span",{class:"text-sm font-medium text-gray-800 dark:text-neutral-200"}," Brian Warner ")])])]),v.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[v.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Can edit ")]),v.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[v.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," brian@site.com ")]),v.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[v.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," 1 months ago ")]),v.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[v.createElementVNode("span",{class:"inline-flex items-center gap-x-1.5 py-1.5 px-2.5 text-xs font-medium bg-teal-100 text-teal-800 rounded-full dark:bg-teal-500/10 dark:text-teal-500"},[v.createElementVNode("span",{class:"size-1.5 inline-block bg-gray-800 rounded-full dark:bg-neutral-200"}),v.createTextVNode(" Active ")])])]),v.createElementVNode("tr",null,[v.createElementVNode("td",{class:"size-px whitespace-nowrap pe-4 py-3"},[v.createElementVNode("div",{class:"w-full flex items-center gap-x-3"},[v.createElementVNode("span",{class:"flex shrink-0 justify-center items-center size-[38px] bg-white border border-gray-200 text-gray-700 text-xs font-medium uppercase rounded-full dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300"}," O "),v.createElementVNode("div",{class:"grow"},[v.createElementVNode("span",{class:"text-sm font-medium text-gray-800 dark:text-neutral-200"}," Ols Shols ")])])]),v.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[v.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Can view ")]),v.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[v.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," olsshols@site.com ")]),v.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[v.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," 6 days ago ")]),v.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[v.createElementVNode("span",{class:"inline-flex items-center gap-1.5 py-1.5 px-2 text-xs font-medium bg-gray-100 text-gray-800 rounded-full dark:bg-neutral-500/20 dark:text-neutral-400"},[v.createElementVNode("span",{class:"size-1.5 inline-block bg-gray-800 rounded-full dark:bg-neutral-400"}),v.createTextVNode(" Inactive ")])])])])])])])])],-1)])))}}},aC={install(n,{componentsApp:t={},menu:o=[]}){var x;mt.defaults.baseURL&&(mt.defaults.baseURL=mt.defaults.baseURL);const c=(x=Ey(o))==null?void 0:x.filter(y=>y==null?void 0:y.component).map(y=>({...y,component:t[y==null?void 0:y.component]})),{router:d}=mv(c);Object.entries({...oC,...t}).forEach(([y,h])=>{n.component(y,h)}),n.component("admin",Rb),n.config.globalProperties={...n.config.globalProperties,$componentsConfig:{...XS,componentsApp:t},$router:d},n.use(d)}},nr=v.ref(null),lC={data(){return{formValues:{},scheme:null,table:""}},mounted(){this.getFormScheme()},methods:{flattenMenu(n){const t=[];return n.forEach(o=>{o.menu?t.push(...this.flattenMenu(o.menu)):t.push(o)}),t},async getFormScheme(){var c,d;const n=this.flattenMenu(nr.value);n!=null&&n.length||this.$router.replace("/404");const t=n==null?void 0:n.find(x=>{var y,h;return(x==null?void 0:x.path)==((h=(y=this.$route)==null?void 0:y.query)==null?void 0:h.table)});t||this.$router.replace("/404");const o=t==null?void 0:t.table;this.table=o;try{const{data:{form:x}}=await mt.get(`/api/template/table/${o}`),{data:{rows:y}}=await mt.get(`/api/table-data/${this.table}/${(d=(c=this.$route)==null?void 0:c.query)==null?void 0:d.id}`);this.formValues=y==null?void 0:y[0];const{data:h}=await mt.get(`/api/template/form/${x}`);this.scheme=(h==null?void 0:h.schema)||h}catch{}},async editObject(){var n,t;try{await this.$refs.form.doValidation(),await mt.put(`/api/table/${this.table}/${(t=(n=this.$route)==null?void 0:n.query)==null?void 0:t.id}`,this.formValues),await this.$router.back(),await this.$notify({title:"Успішно!",message:"Об'єкт успішно створено",type:"success"})}catch{this.$notify({title:"Помилка!",message:"Сталася помилка",type:"error"})}}}},cC={style:{width:"calc(100vw - 260px)"}},hC={class:"h-[76px] bg-gray-50 flex items-center justify-between px-[30px]"},uC={class:"flex items-center gap-[6px]"},dC={style:{height:"calc(100vh - 140px)",width:"calc(100vw - 260px)"},class:"bg-gray-50 p-[20px] flex"},pC={class:"bg-white w-full rounded-xl border p-[20px] 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"};function fC(n,t,o,c,d,x){const y=v.resolveComponent("VsForm");return v.openBlock(),v.createElementBlock("div",cC,[v.createElementVNode("div",hC,[t[3]||(t[3]=v.createElementVNode("h2",{class:"text-xl font-medium"},"Редагувати",-1)),v.createElementVNode("div",uC,[v.createElementVNode("button",{onClick:t[0]||(t[0]=h=>n.$router.back()),class:"py-2 px-3 flex items-center gap-x-2 text-sm font-medium rounded-lg border bg-white border-gray-100 text-gray-800 shadow focus:outline-none hover:bg-gray-50 hover:border-gray-100 duration-300"}," Скасувати "),v.createElementVNode("button",{onClick:t[1]||(t[1]=(...h)=>x.editObject&&x.editObject(...h)),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 hover:text-white duration-300"}," Зберегти ")])]),v.createElementVNode("div",dC,[v.createElementVNode("div",pC,[d.scheme?(v.openBlock(),v.createBlock(y,{key:0,ref:"form",scheme:d.scheme,modelValue:d.formValues,"onUpdate:modelValue":t[2]||(t[2]=h=>d.formValues=h),class:"p-0 mt-[20px]"},null,8,["scheme","modelValue"])):v.createCommentVNode("",!0)])])])}const mC=Object.freeze(Object.defineProperty({__proto__:null,default:vt(lC,[["render",fC]])},Symbol.toStringTag,{value:"Module"})),gC={data(){return{formValues:{},scheme:null,table:""}},mounted(){this.getFormScheme()},methods:{flattenMenu(n){const t=[];return n.forEach(o=>{o.menu?t.push(...this.flattenMenu(o.menu)):t.push(o)}),t},async getFormScheme(){const n=this.flattenMenu(nr.value);n!=null&&n.length||this.$router.replace("/404");const t=n==null?void 0:n.find(c=>{var d,x;return(c==null?void 0:c.path)==((x=(d=this.$route)==null?void 0:d.query)==null?void 0:x.table)});t||this.$router.replace("/404");const o=t==null?void 0:t.table;this.table=o;try{const{data:{form:c}}=await mt.get(`/api/template/table/${o}`),{data:d}=await mt.get(`/api/template/form/${c}`);this.scheme=(d==null?void 0:d.schema)||d}catch{}},async createObject(){try{await this.$refs.form.doValidation(),await mt.post(`/api/table/${this.table}`,this.formValues),await this.$router.back(),await this.$notify({title:"Успішно!",message:"Об'єкт успішно створено",type:"success"})}catch{this.$notify({title:"Помилка!",message:"Сталася помилка",type:"error"})}}}},yC={style:{width:"calc(100vw - 260px)"}},_C={class:"h-[76px] bg-gray-50 flex items-center justify-between px-[30px]"},xC={class:"flex items-center gap-[6px]"},bC={style:{height:"calc(100vh - 150px)",width:"calc(100vw - 260px)"},class:"bg-gray-50 p-[20px] flex"},vC={class:"bg-white w-full rounded-xl border p-[20px] 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"};function wC(n,t,o,c,d,x){const y=v.resolveComponent("VsForm");return v.openBlock(),v.createElementBlock("div",yC,[v.createElementVNode("div",_C,[t[3]||(t[3]=v.createElementVNode("h2",{class:"text-xl font-medium"},"Створити",-1)),v.createElementVNode("div",xC,[v.createElementVNode("button",{onClick:t[0]||(t[0]=h=>n.$router.back()),class:"py-2 px-3 flex items-center gap-x-2 text-sm font-medium rounded-lg border bg-white border-gray-100 text-gray-800 shadow focus:outline-none hover:bg-gray-50 hover:border-gray-100 duration-300"}," Скасувати "),v.createElementVNode("button",{onClick:t[1]||(t[1]=(...h)=>x.createObject&&x.createObject(...h)),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 hover:text-white duration-300"}," Зберегти ")])]),v.createElementVNode("div",bC,[v.createElementVNode("div",vC,[d.scheme?(v.openBlock(),v.createBlock(y,{key:0,ref:"form",scheme:d.scheme,modelValue:d.formValues,"onUpdate:modelValue":t[2]||(t[2]=h=>d.formValues=h),class:"p-0 mt-[20px]"},null,8,["scheme","modelValue"])):v.createCommentVNode("",!0)])])])}const kC=Object.freeze(Object.defineProperty({__proto__:null,default:vt(gC,[["render",wC]])},Symbol.toStringTag,{value:"Module"})),SC={};function EC(n,t,o,c,d,x){const y=v.resolveComponent("router-view");return v.openBlock(),v.createBlock(y)}const S0=Object.freeze(Object.defineProperty({__proto__:null,default:vt(SC,[["render",EC]])},Symbol.toStringTag,{value:"Module"})),TC={data(){return{objectData:null,component:""}},computed:{getRoute(){const n=this.flattenMenu(nr.value);n!=null&&n.length||this.$router.replace("/404");const t=n==null?void 0:n.find(o=>{var c,d;return(o==null?void 0:o.table)==((d=(c=this.$route)==null?void 0:c.params)==null?void 0:d.table)});return t||this.$router.replace("/404"),t==null?void 0:t.path},getTitle(){var n,t,o,c,d,x,y,h,M,D,A,z,L,N,Y;if((o=(t=(n=this.objectData)==null?void 0:n.rows)==null?void 0:t[0])!=null&&o.name)return((y=(x=(d=(c=this.objectData)==null?void 0:c.rows)==null?void 0:d[0])==null?void 0:x.name)==null?void 0:y.length)<35?(D=(M=(h=this.objectData)==null?void 0:h.rows)==null?void 0:M[0])==null?void 0:D.name:((N=(L=(z=(A=this.objectData)==null?void 0:A.rows)==null?void 0:z[0])==null?void 0:L.name)==null?void 0:N.slice(0,35))+" ...";{const ee=(Y=this.flattenMenu(nr.value))==null?void 0:Y.find(oe=>{var he,_e;return(oe==null?void 0:oe.table)===((_e=(he=this.$route)==null?void 0:he.params)==null?void 0:_e.table)});return ee==null?void 0:ee.ua}}},async mounted(){await this.getObjectData(),await this.checkActiveComponent()},watch:{component(n){this.$router.replace({...this.$route,query:{tab:n}})}},methods:{async getObjectData(){var o;const{table:n,id:t}=(o=this.$route)==null?void 0:o.params;(!n||!t)&&this.$router.replace("/404");try{const{data:c}=await mt.get(`/api/table-data/${n}/${t}`);this.objectData=c}catch(c){console.error(c)}},getColClass(n){return`col-span-${n||12}`},getGridClass(){return"grid-cols-12"},checkActiveComponent(){var n,t,o,c,d,x,y,h,M;if((t=(n=this.$route)==null?void 0:n.query)!=null&&t.tab)this.component=(c=(o=this.$route)==null?void 0:o.query)==null?void 0:c.tab;else{const D=(x=(d=this.objectData)==null?void 0:d.panels)==null?void 0:x.find(A=>(A==null?void 0:A.type)==="tabs");(y=D==null?void 0:D.items)!=null&&y.length&&(this.component=((h=D.items[0])==null?void 0:h.component)||((M=D.items[0])==null?void 0:M.name))}},flattenMenu(n){const t=[];return n.forEach(o=>{o.menu?t.push(...this.flattenMenu(o.menu)):t.push(o)}),t}}},CC={style:{width:"calc(100vw - 260px)",height:"calc(100vh - 60px)"},class:"bg-gray-50 overflow-y-auto"},MC={class:"h-[76px] bg-gray-50 flex items-center justify-between px-[30px]"},PC={class:""},IC={class:"text-lg md:text-xl font-semibold text-stone-800 dark:text-neutral-200"},AC={class:"flex items-center gap-[6px]"},DC={key:0,class:"border rounded-xl bg-white"},zC={class:"p-[10px] pl-[20px] text-xl"},LC=["innerHTML"],RC={key:1},OC={class:"p-[10px] pl-[20px] text-xl"},BC={key:0,class:"p-[20px] border-t"},FC={key:1,class:"p-[20px] border-t"},NC=["innerHTML"],VC={class:"flex space-x-1 w-[1200px] bg-white border rounded-xl h-[60px] items-center pl-[20px]"},$C=["onClick"],jC={key:0,class:"border rounded-xl bg-white mt-[20px]"},UC={class:"p-[10px] pl-[20px] text-xl"},HC={key:0,class:"p-[20px] border-t"},qC={key:1,class:"p-[20px] border-t"},ZC=["innerHTML"];function WC(n,t,o,c,d,x){var h,M,D;const y=v.resolveComponent("router-link");return v.openBlock(),v.createElementBlock("div",CC,[v.createElementVNode("div",MC,[v.createElementVNode("div",PC,[v.createElementVNode("button",{onClick:t[0]||(t[0]=A=>n.$router.back()),class:"text-sm text-blue-600 decoration-2 hover:underline font-medium focus:outline-none focus:underline dark:text-green-400 dark:hover:text-green-500"}," До таблиці "),v.createElementVNode("h2",IC,v.toDisplayString(x.getTitle),1)]),v.createElementVNode("div",AC,[v.createVNode(y,{to:`/edit?table=${x.getRoute}&id=${(M=(h=n.$route)==null?void 0:h.params)==null?void 0:M.id}`,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 hover:text-white duration-300"},{default:v.withCtx(()=>t[1]||(t[1]=[v.createTextVNode(" Редагувати ")])),_:1},8,["to"])])]),v.createElementVNode("div",{class:v.normalizeClass(["grid gap-[20px]",x.getGridClass()])},[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList((D=d.objectData)==null?void 0:D.panels,(A,z)=>{var L;return v.openBlock(),v.createElementBlock("div",{key:z,class:v.normalizeClass([x.getColClass(A.col),"p-4"])},[A!=null&&A.name?(v.openBlock(),v.createElementBlock("div",DC,[v.createElementVNode("h2",zC,v.toDisplayString((A==null?void 0:A.title)||"Панель"),1),v.createElementVNode("div",{class:"p-[20px] border-t",innerHTML:(L=d.objectData)==null?void 0:L.data[A==null?void 0:A.name]},null,8,LC)])):A.type==="container"?(v.openBlock(),v.createElementBlock("div",RC,[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(A.items,(N,Y)=>{var ee,oe,he,_e,me;return v.openBlock(),v.createElementBlock("div",{key:Y,class:"border rounded-xl bg-white mb-[20px]"},[v.createElementVNode("h2",OC,v.toDisplayString((N==null?void 0:N.title)||"Панель"),1),N!=null&&N.component?(v.openBlock(),v.createElementBlock("div",BC,[(v.openBlock(),v.createBlock(v.resolveDynamicComponent(N.component),{geometry:(oe=(ee=d.objectData)==null?void 0:ee.rows[0])==null?void 0:oe.geom,zoom:16,id:(_e=(he=n.$route)==null?void 0:he.params)==null?void 0:_e.id},null,8,["geometry","id"]))])):v.createCommentVNode("",!0),N!=null&&N.name?(v.openBlock(),v.createElementBlock("div",FC,[v.createElementVNode("div",{innerHTML:(me=d.objectData)==null?void 0:me.data[N==null?void 0:N.name]},null,8,NC)])):v.createCommentVNode("",!0)])}),128))])):v.createCommentVNode("",!0),(A==null?void 0:A.type)==="tabs"?(v.openBlock(),v.createElementBlock(v.Fragment,{key:2},[v.createElementVNode("nav",VC,[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(A==null?void 0:A.items,N=>(v.openBlock(),v.createElementBlock("button",{key:(N==null?void 0:N.name)||(N==null?void 0:N.component),onClick:Y=>d.component=(N==null?void 0:N.component)||(N==null?void 0:N.name),class:v.normalizeClass(["px-2.5 h-[30px] py-1.5 relative inline-flex items-center gap-x-2 text-gray-500 hover:text-gray-800 text-sm whitespace-nowrap rounded-lg focus:outline-none",{"bg-gray-100 text-gray-800 font-semibold after:absolute after:bottom-[-14px] after:left-2.5 after:right-2.5 after:z-10 after:h-0.5 after:bg-gray-800":d.component===(N==null?void 0:N.component)||d.component===(N==null?void 0:N.name),"hover:bg-gray-100":d.component!==(N==null?void 0:N.component)&&d.component!==(N==null?void 0:N.name)}])},v.toDisplayString(N==null?void 0:N.title),11,$C))),128))]),(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(A.items,(N,Y)=>{var ee,oe,he,_e,me;return v.openBlock(),v.createElementBlock(v.Fragment,{key:Y},[d.component===(N==null?void 0:N.component)||d.component===(N==null?void 0:N.name)?(v.openBlock(),v.createElementBlock("div",jC,[v.createElementVNode("h2",UC,v.toDisplayString((N==null?void 0:N.title)||"Панель"),1),N!=null&&N.component?(v.openBlock(),v.createElementBlock("div",HC,[(v.openBlock(),v.createBlock(v.resolveDynamicComponent(N.component),{geometry:(oe=(ee=d.objectData)==null?void 0:ee.rows[0])==null?void 0:oe.geom,zoom:16,id:(_e=(he=n.$route)==null?void 0:he.params)==null?void 0:_e.id},null,8,["geometry","id"]))])):v.createCommentVNode("",!0),N!=null&&N.name?(v.openBlock(),v.createElementBlock("div",qC,[v.createElementVNode("div",{innerHTML:(me=d.objectData)==null?void 0:me.data[N==null?void 0:N.name]},null,8,ZC)])):v.createCommentVNode("",!0)])):v.createCommentVNode("",!0)],64)}),128))],64)):v.createCommentVNode("",!0)],2)}),128))],2)])}const GC=Object.freeze(Object.defineProperty({__proto__:null,default:vt(TC,[["render",WC],["__scopeId","data-v-6289ec55"]])},Symbol.toStringTag,{value:"Module"})),YC={},XC={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 KC(n,t,o,c,d,x){return v.openBlock(),v.createElementBlock("svg",XC,t[0]||(t[0]=[v.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),v.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),v.createElementVNode("path",{d:"M9 12h12l-3 -3"},null,-1),v.createElementVNode("path",{d:"M18 15l3 -3"},null,-1)]))}const JC=vt(YC,[["render",KC]]),QC={},eM={viewBox:"0 0 1823 249",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function tM(n,t,o,c,d,x){return v.openBlock(),v.createElementBlock("svg",eM,t[0]||(t[0]=[v.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 iM=vt(QC,[["render",tM]]),nM={},rM={class:"shrink-0 size-4 text-gray-400 dark:text-white/60",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 sM(n,t,o,c,d,x){return v.openBlock(),v.createElementBlock("svg",rM,t[0]||(t[0]=[v.createElementVNode("circle",{cx:"11",cy:"11",r:"8"},null,-1),v.createElementVNode("path",{d:"m21 21-4.3-4.3"},null,-1)]))}const E0=vt(nM,[["render",sM]]),oM={},aM={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-chevron-down"};function lM(n,t,o,c,d,x){return v.openBlock(),v.createElementBlock("svg",aM,t[0]||(t[0]=[v.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),v.createElementVNode("path",{d:"M6 9l6 6l6 -6"},null,-1)]))}const cM={components:{IconChevronDown:vt(oM,[["render",lM]])},props:{route:Object},mounted(){var n,t,o;(n=this.route)!=null&&n.menu&&(o=(t=this.route)==null?void 0:t.menu)!=null&&o.some(c=>{var d,x;return(c==null?void 0:c.path)===this.$route.path.replace("/","")||((x=(d=this.$route)==null?void 0:d.params)==null?void 0:x.table)===(c==null?void 0:c.table)&&(c==null?void 0:c.table)})&&(this.isOpen=!0)},data(){return{isOpen:!1}}},hM={key:0,class:""},uM={class:"ml-[30px] py-[6px] before:block before:absolute relative w-[196px] flex flex-col gap-[6px] inline-block before:w-[2px] before:h-[100%] before:bg-gray-100 before:left-[-14px] cursor-pointer"},dM={key:1};function pM(n,t,o,c,d,x){var M,D,A,z,L,N,Y,ee,oe,he;const y=v.resolveComponent("IconChevronDown"),h=v.resolveComponent("router-link");return(M=o.route)!=null&&M.menu?(v.openBlock(),v.createElementBlock("div",hM,[v.createElementVNode("button",{onClick:t[0]||(t[0]=_e=>d.isOpen=!d.isOpen),class:v.normalizeClass(["flex cursor-pointer gap-x-3 py-2 px-3 text-sm text-gray-800 justify-start w-full border-none focus:outline-none text-gray-800 rounded-lg items-center hover:bg-gray-100 duration-300",[((A=(D=o.route)==null?void 0:D.menu)==null?void 0:A.some(_e=>{var me,Ie;return(_e==null?void 0:_e.path)===n.$route.path.replace("/","")||(_e==null?void 0:_e.table)===((Ie=(me=n.$route)==null?void 0:me.params)==null?void 0:Ie.table)&&(_e==null?void 0:_e.table)}))&&"bg-gray-100"]])},[v.createTextVNode(v.toDisplayString((z=o.route)==null?void 0:z.ua)+" ",1),v.createVNode(y,{class:v.normalizeClass([[d.isOpen&&"-rotate-180"],"ml-auto duration-300"]),width:"14",height:"14"},null,8,["class"])],2),v.createVNode(v.Transition,{name:"fade"},{default:v.withCtx(()=>{var _e;return[v.withDirectives(v.createElementVNode("ul",uM,[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList((_e=o.route)==null?void 0:_e.menu,(me,Ie)=>{var tt,gt;return v.openBlock(),v.createElementBlock("li",{key:Ie,class:"w-full"},[v.createVNode(h,{to:"/"+(me==null?void 0:me.path),class:v.normalizeClass([[((me==null?void 0:me.path)===n.$route.path.replace("/","")||((gt=(tt=n.$route)==null?void 0:tt.params)==null?void 0:gt.table)===(me==null?void 0:me.table)&&(me==null?void 0:me.table))&&"bg-gray-100"],"flex gap-x-4 py-2 px-3 text-sm text-gray-800 rounded-lg hover:bg-gray-100 focus:outline-none focus:bg-gray-100"])},{default:v.withCtx(()=>[v.createTextVNode(v.toDisplayString(me==null?void 0:me.ua),1)]),_:2},1032,["to","class"])])}),128))],512),[[v.vShow,d.isOpen]])]}),_:1})])):(v.openBlock(),v.createElementBlock("div",dM,[v.createVNode(h,{to:(L=o.route)==null?void 0:L.path,class:v.normalizeClass([[(((N=o.route)==null?void 0:N.path.replace("/",""))===n.$route.path.replace("/","")||((ee=(Y=n.$route)==null?void 0:Y.params)==null?void 0:ee.table)===((oe=o.route)==null?void 0:oe.table)&&((he=o.route)==null?void 0:he.table))&&"bg-gray-100"],"flex gap-x-3 py-2 w-full font-[400] px-3 text-sm text-gray-800 rounded-lg items-center hover:bg-gray-100 duration-300 hover:text-gray-800"])},{default:v.withCtx(()=>{var _e;return[v.createTextVNode(v.toDisplayString((_e=o.route)==null?void 0:_e.ua),1)]}),_:1},8,["to","class"])]))}const fM={components:{IconLogout:JC,NavbarItem:vt(cM,[["render",pM]]),IconLogo:iM,IconSearch:E0},data(){return{activeIndex:null,data:null,searchValue:""}},computed:{data(){var n,t;return(n=this.searchValue)!=null&&n.trim()?(t=this.flattenMenu(nr.value))==null?void 0:t.filter(o=>{var c,d,x;return(x=(c=o==null?void 0:o.ua)==null?void 0:c.toLowerCase())==null?void 0:x.includes((d=this.searchValue)==null?void 0:d.toLowerCase())}):nr.value}},methods:{flattenMenu(n){const t=[];return n.forEach(o=>{o.menu?t.push(...this.flattenMenu(o.menu)):t.push(o)}),t}}},mM={class:"flex flex-col h-[100vh] border-r w-[300px] shrink-0"},gM={class:"relative"},yM={class:"p-[16px] 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"},_M={class:"pb-3 w-full flex flex-col flex-wrap"},xM={key:0,class:"flex flex-col gap-[6px]"},bM={key:1,class:"text-gray-800 text-lg mt-[20px]"};function vM(n,t,o,c,d,x){var A;const y=v.resolveComponent("IconLogo"),h=v.resolveComponent("IconSearch"),M=v.resolveComponent("VsText"),D=v.resolveComponent("NavbarItem");return v.openBlock(),v.createElementBlock("div",mM,[v.createVNode(y,{height:"40",width:"200",class:"my-[20px] ml-[20px]"}),v.createElementVNode("div",gM,[v.createVNode(h,{height:"16",width:"16",class:"absolute top-[12px] left-[30px] text-gray-500 z-[1]"}),v.createVNode(M,{type:"text",modelValue:d.searchValue,"onUpdate:modelValue":t[0]||(t[0]=z=>d.searchValue=z),clearable:!0,placeholder:"Пошук по меню",class:"[&>input]:h-[40px] [&>input]:block [&>input]:rounded-none [&>input]:border-x-0 [&>input]:pl-[60px] [&>input:focus]:outline-none [&>input:focus]:focus:ring-0 [&>input:focus]:border-y-gray-200 [&>input:focus]:border-y-1 [&>input:focus]:border-x-0"},null,8,["modelValue"])]),v.createElementVNode("div",yM,[v.createElementVNode("nav",_M,[(A=x.data)!=null&&A.length?(v.openBlock(),v.createElementBlock("ul",xM,[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(x.data,(z,L)=>(v.openBlock(),v.createElementBlock("li",{key:L,class:"flex flex-col gap-[6px]"},[v.createVNode(D,{route:z},null,8,["route"])]))),128))])):(v.openBlock(),v.createElementBlock("div",bM,"Не знайдено"))])])])}const wM=vt(fM,[["render",vM]]),kM={},SM={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 EM(n,t,o,c,d,x){return v.openBlock(),v.createElementBlock("svg",SM,t[0]||(t[0]=[v.createElementVNode("circle",{cx:"12",cy:"12",r:"10"},null,-1),v.createElementVNode("path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"},null,-1),v.createElementVNode("path",{d:"M12 17h.01"},null,-1)]))}const TM=vt(kM,[["render",EM]]),CM={},MM={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 PM(n,t,o,c,d,x){return v.openBlock(),v.createElementBlock("svg",MM,t[0]||(t[0]=[v.createElementVNode("path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9"},null,-1),v.createElementVNode("path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0"},null,-1)]))}const IM={components:{IconQuestion:TM,IconMessage:vt(CM,[["render",PM]])}},AM={class:"h-[60px] border-b flex justify-end px-[20px]",style:{width:"calc(100vw - 260px)"}},DM={class:"flex items-center gap-[6px]"},zM={href:"docs-softpro.com",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"},LM={class:"hs-tooltip [--placement:bottom] inline-block show"},RM={class:"hs-tooltip-toggle relative 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"};function OM(n,t,o,c,d,x){const y=v.resolveComponent("IconQuestion"),h=v.resolveComponent("IconMessage");return v.openBlock(),v.createElementBlock("div",AM,[v.createElementVNode("div",DM,[v.createElementVNode("a",zM,[v.createVNode(y,{height:"24",width:"24"})]),v.createElementVNode("div",LM,[v.createElementVNode("button",RM,[v.createVNode(h,{height:"24",width:"24"}),t[0]||(t[0]=v.createElementVNode("span",{class:"flex absolute top-0 end-0 -mt-1.5 -me-1.5"},[v.createElementVNode("span",{class:"animate-ping absolute inline-flex size-full rounded-full bg-red-400 opacity-75 dark:bg-red-600"}),v.createElementVNode("span",{class:"relative min-w-[18px] min-h-[18px] inline-flex justify-center items-center text-[10px] bg-red-500 text-white rounded-full px-1"}," 1 ")],-1))]),t[1]||(t[1]=v.createElementVNode("span",{class:"hs-tooltip-content hs-tooltip-shown:opacity-100 hs-tooltip-shown:visible opacity-0 inline-block absolute invisible z-20 py-1.5 px-2.5 bg-gray-900 text-xs text-white rounded-lg dark:bg-neutral-700 hidden",role:"tooltip","data-popper-placement":"bottom",style:{position:"fixed",inset:"0px auto auto 0px",margin:"0px",transform:"translate(1686px, 53px)"}},null,-1))]),t[2]||(t[2]=v.createElementVNode("div",{class:"h-[30px] w-[1px] bg-gray-200 ml-[10px] mr-[10px]"},null,-1)),t[3]||(t[3]=v.createElementVNode("img",{class:"flex-shrink-0 size-[38px] rounded-full",src:"https://images.unsplash.com/photo-1659482633369-9fe69af50bfb?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=3&w=320&h=320&q=80",alt:"Image Description"},null,-1))])])}const BM={components:{navbar:wM,AdminHeader:vt(IM,[["render",OM]])},mounted(){this.getMenu()},computed:{isMenu(){return nr.value}},methods:{async getMenu(){try{const{data:n}=await mt.get("/api/user-menu");nr.value=n}catch{}}}},FM={class:"admin-wrapper"},NM={class:"flex flex-col"};function VM(n,t,o,c,d,x){const y=v.resolveComponent("navbar"),h=v.resolveComponent("admin-header"),M=v.resolveComponent("router-view");return v.openBlock(),v.createElementBlock("div",FM,[v.createVNode(y),v.createElementVNode("div",NM,[x.isMenu?(v.openBlock(),v.createElementBlock(v.Fragment,{key:0},[v.createVNode(h),v.createVNode(M)],64)):v.createCommentVNode("",!0)])])}const $M=Object.freeze(Object.defineProperty({__proto__:null,default:vt(BM,[["render",VM],["__scopeId","data-v-3d7ecdff"]])},Symbol.toStringTag,{value:"Module"})),jM={},UM={class:"h21yx vs0hq",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"};function HM(n,t,o,c,d,x){return v.openBlock(),v.createElementBlock("svg",UM,t[0]||(t[0]=[v.createStaticVNode('<line x1="21" x2="14" y1="4" y2="4"></line><line x1="10" x2="3" y1="4" y2="4"></line><line x1="21" x2="12" y1="12" y2="12"></line><line x1="8" x2="3" y1="12" y2="12"></line><line x1="21" x2="16" y1="20" y2="20"></line><line x1="12" x2="3" y1="20" y2="20"></line><line x1="14" x2="14" y1="2" y2="6"></line><line x1="8" x2="8" y1="10" y2="14"></line><line x1="16" x2="16" y1="18" y2="22"></line>',9)]))}const qM=vt(jM,[["render",HM]]),ZM={data(){return{currentSort:""}},props:{data:{type:Object,default:()=>null},activeColumn:{type:String}},computed:{label(){var n,t;return((n=this.data)==null?void 0:n.ua)||((t=this.data)==null?void 0:t.label)||this.data.title||"null"},selectedSortParam(){var n,t;return(t=(n=this.$route)==null?void 0:n.query)==null?void 0:t.sort},getVisibleIcon(){return this.data.format!=="image"&&this.data.format!=="verify"}},watch:{activeColumn(n){n!==this.data.name&&(this.currentSort="")}},methods:{changeCurrentSort(n){switch(n){case"":return"asc";case"asc":return"desc";case"desc":return"";default:return""}},handleClickSortBtn(n){this.$emit("change-active",this.data.name),this.currentSort=this.changeCurrentSort(n);const t=this.$route.query,{sort:o,...c}=t,d=this.currentSort?`${this.data.name}-${this.currentSort}`:"";this.$router.replace({query:{...c,...d&&{sort:d}}})},isValueEqualToSelected(n){return`${this.data.name}-${n}`===this.selectedSortParam}}},WM={scope:"col",class:"min-w-[200px] max-w-[300px] text-start"},GM={class:"flex-shrink-0 size-3.5",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"},YM={key:0,d:"m7 15 5 5 5-5"},XM={key:1,d:"m7 9 5-5 5 5"},KM={key:1,class:"text-sm text-gray-800 px-[4px] py-2.5 text-start font-normal text-gray-500"};function JM(n,t,o,c,d,x){return v.openBlock(),v.createElementBlock("th",WM,[x.getVisibleIcon?(v.openBlock(),v.createElementBlock("button",{key:0,type:"button",class:"text-sm text-gray-800 px-[4px] py-2.5 text-start font-normal text-gray-500 flex items-center gap-[6px]",onClick:t[0]||(t[0]=y=>x.handleClickSortBtn(d.currentSort))},[v.createTextVNode(v.toDisplayString(x.label)+" ",1),(v.openBlock(),v.createElementBlock("svg",GM,[d.currentSort==="asc"||d.currentSort===""?(v.openBlock(),v.createElementBlock("path",YM)):v.createCommentVNode("",!0),d.currentSort==="desc"||d.currentSort===""?(v.openBlock(),v.createElementBlock("path",XM)):v.createCommentVNode("",!0)]))])):(v.openBlock(),v.createElementBlock("p",KM,v.toDisplayString(x.label),1))])}const QM=vt(ZM,[["render",JM]]),eP={},tP={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-dots-vertical"};function iP(n,t,o,c,d,x){return v.openBlock(),v.createElementBlock("svg",tP,t[0]||(t[0]=[v.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),v.createElementVNode("path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null,-1),v.createElementVNode("path",{d:"M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null,-1),v.createElementVNode("path",{d:"M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null,-1)]))}const nP=vt(eP,[["render",iP]]),rP={},sP={class:"flex-shrink-0 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 oP(n,t,o,c,d,x){return v.openBlock(),v.createElementBlock("svg",sP,t[0]||(t[0]=[v.createStaticVNode('<path d="M3 6h18"></path><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"></path><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"></path><line x1="10" x2="10" y1="11" y2="17"></line><line x1="14" x2="14" y1="11" y2="17"></line>',5)]))}const aP=vt(rP,[["render",oP]]),lP={props:{height:{type:String,default:"16"},width:{type:String,default:"12"},color:{type:String,default:"black"}}},cP={style:{display:"none"}},hP=["height","width","fill"];function uP(n,t,o,c,d,x){return v.openBlock(),v.createElementBlock(v.Fragment,null,[(v.openBlock(),v.createElementBlock("svg",cP,t[0]||(t[0]=[v.createElementVNode("symbol",{id:"icon-pencil",viewBox:"0 0 32 32"},[v.createElementVNode("path",{d:"M27 0c2.761 0 5 2.239 5 5 0 1.126-0.372 2.164-1 3l-2 2-7-7 2-2c0.836-0.628 1.874-1 3-1zM2 23l-2 9 9-2 18.5-18.5-7-7-18.5 18.5zM22.362 11.362l-14 14-1.724-1.724 14-14 1.724 1.724z"})],-1)]))),(v.openBlock(),v.createElementBlock("svg",{height:o.height,width:o.width,fill:o.color},t[1]||(t[1]=[v.createElementVNode("use",{"xlink:href":"#icon-pencil"},null,-1)]),8,hP))],64)}const dP={components:{IconMore:nP,IconDelete:aP,IconEdit:vt(lP,[["render",uP]])},emits:["updateTable"],props:{item:Object,table:String,isForm:null},data(){return{formVisible:!1,isDeleteConfirm:!1,formValue:{},top:0,left:0}},methods:{openConfirm(){this.isDeleteConfirm=!0,document.querySelector("body").click()},async getData(){var n;try{const{data:t}=await mt.get(`/api/table/${this.table}/${(n=this.item)==null?void 0:n.id}`);this.formValue=t}catch(t){console.error(t)}},doSomethingOnCancel(){this.formVisible=!1},async deleteElement(){var n;try{mt.delete(`/api/table/${this.table}/${(n=this.item)==null?void 0:n.id}`),this.$notify({title:"Успішно!",message:"Об`єкт успішно видалeно",type:"success"}),await this.$emit("update-table"),this.isDeleteConfirm=!1}catch{this.$notify({title:"Помилка!",message:"Сталася помилка",type:"error"})}}}},pP={class:"hs-dropdown [--placement:bottom-right] inline-flex"},fP={class:"gap-x-2 p-[4px] rounded-lg shadow-sm hover:border-transparent border focus:outline-none text-black hover:bg-gray-50"},mP={class:"flex flex-col items-start"},gP={key:1,class:"h-[1px] w-[80%] bg-gray-200 ml-auto mr-auto"},yP={class:"p-4"},_P={class:"mt-4 flex justify-end gap-x-3"};function xP(n,t,o,c,d,x){const y=v.resolveComponent("IconMore"),h=v.resolveComponent("IconEdit"),M=v.resolveComponent("router-link"),D=v.resolveComponent("IconDelete"),A=v.resolveComponent("VsPopover"),z=v.resolveComponent("VsDialog");return v.openBlock(),v.createElementBlock(v.Fragment,null,[v.createElementVNode("div",pP,[v.createVNode(A,{trigger:"click",placement:"bottom-left"},{reference:v.withCtx(()=>[v.createElementVNode("button",fP,[v.createVNode(y,{height:"16",width:"16"})])]),default:v.withCtx(()=>{var L,N,Y;return[v.createElementVNode("div",mP,[o.isForm?(v.openBlock(),v.createBlock(M,{key:0,to:`/edit?table=${(N=(L=n.$route)==null?void 0:L.params)==null?void 0:N.catchAll}&id=${(Y=o.item)==null?void 0:Y.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:v.withCtx(()=>[v.createVNode(h,{color:"#000"}),t[4]||(t[4]=v.createTextVNode(" Редагувати "))]),_:1},8,["to"])):v.createCommentVNode("",!0),o.isForm?(v.openBlock(),v.createElementBlock("div",gP)):v.createCommentVNode("",!0),v.createElementVNode("button",{onClick:t[0]||(t[0]=v.withModifiers((...ee)=>x.openConfirm&&x.openConfirm(...ee),["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"},[v.createVNode(D),t[5]||(t[5]=v.createElementVNode("span",{class:"text-gray-800"},"Видалити",-1))])])]}),_:1})]),v.createVNode(z,{visible:d.isDeleteConfirm,"onUpdate:visible":t[3]||(t[3]=L=>d.isDeleteConfirm=L),title:"Ви впевнені?"},{default:v.withCtx(()=>[v.createElementVNode("div",yP,[t[6]||(t[6]=v.createElementVNode("p",{class:"mt-1 text-gray-500 dark:text-neutral-500"}," Ви впевнені, що хочете видалити цей об'єкт? ",-1)),v.createElementVNode("div",_P,[v.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm 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",onClick:t[1]||(t[1]=L=>d.isDeleteConfirm=!1)}," Скасувати "),v.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm font-semibold rounded-lg border border-transparent bg-red-500 text-white hover:bg-red-600 disabled:opacity-50 disabled:pointer-events-none",onClick:t[2]||(t[2]=(...L)=>x.deleteElement&&x.deleteElement(...L))}," Так, я впевнена/ий ")])])]),_:1},8,["visible"])],64)}const bP=vt(dP,[["render",xP]]),vP={},wP={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 kP(n,t,o,c,d,x){return v.openBlock(),v.createElementBlock("svg",wP,t[0]||(t[0]=[v.createElementVNode("path",{d:"m3 16 4 4 4-4"},null,-1),v.createElementVNode("path",{d:"M7 20V4"},null,-1),v.createElementVNode("path",{d:"m21 8-4-4-4 4"},null,-1),v.createElementVNode("path",{d:"M17 4v16"},null,-1)]))}const SP=vt(vP,[["render",kP]]),EP={props:{columns:{type:Object,default:()=>{}},table:{type:String,default:()=>""}},data(){return{tableFormats:["json","csv","xlsx"],format:"",cols:[]}},methods:{async exportTable(){try{const n=await mt.get("/api/export",{params:{table:this.table,format:this.format,cols:this.cols.join(",")},responseType:"blob"}),t=new Blob([n.data],{type:"application/octet-stream"}),o=window.URL.createObjectURL(t),c=document.createElement("a");c.href=o,c.setAttribute("download",`${this.table.split(".")[0]}.${this.format}`),document.body.appendChild(c),c.click(),document.body.removeChild(c),window.URL.revokeObjectURL(o),this.$notify({type:"success",title:"Експорт",message:"Файл успішно експортовано!"})}catch(n){console.error("Ошибка при экспорте файла:",n),this.$notify({type:"error",title:"Помилка",message:"Не вдалося експортувати файл."})}},selectFormat(n){this.format=n}}},TP={class:"p-4"},CP={class:"pb-5 mb-5 last:pb-0 last:mb-0 border-b last:border-b-0 border-gray-200 dark:border-neutral-700"},MP={class:"mt-2 flex row flex-wrap gap-y-[5px] gap-x-[10px]"},PP={class:"pb-5 mb-5 last:pb-0 last:mb-0 border-b last:border-b-0 border-gray-200 dark:border-neutral-700"},IP={class:"mt-2 space-y-2"},AP=["id","onChange"],DP=["for"],zP={class:"pb-5 last:pb-0 last:mb-0 border-b last:border-b-0 border-gray-200 dark:border-neutral-700"},LP={class:"text-center"};function RP(n,t,o,c,d,x){const y=v.resolveComponent("VsCheckbox");return v.openBlock(),v.createElementBlock(v.Fragment,null,[t[4]||(t[4]=v.createElementVNode("div",{class:"dark:border-neutral-700"},null,-1)),v.createElementVNode("div",TP,[v.createElementVNode("div",CP,[t[2]||(t[2]=v.createElementVNode("label",{class:"text-sm text-gray-500 dark:text-neutral-500"}," Виберіть стовпці таблиці для експорту: ",-1)),v.createElementVNode("div",MP,[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(o.columns,(h,M)=>(v.openBlock(),v.createElementBlock("div",{class:"flex items-center",key:M,style:{width:"calc((100% - 10px) / 2)"}},[v.createVNode(y,{class:"py-0 shrink-0 border-gray-300 rounded text-blue-600 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",modelValue:d.cols,"onUpdate:modelValue":t[0]||(t[0]=D=>d.cols=D),value:h==null?void 0:h.name,label:h==null?void 0:h.ua},null,8,["modelValue","value","label"])]))),128))])]),v.createElementVNode("div",PP,[t[3]||(t[3]=v.createElementVNode("label",{class:"text-sm text-gray-500 dark:text-neutral-500"}," Виберіть формат таблиці: ",-1)),v.createElementVNode("div",IP,[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(d.tableFormats,(h,M)=>(v.openBlock(),v.createElementBlock("div",{class:"flex items-center",key:M},[v.createElementVNode("input",{type:"radio",name:"hs-pro-duecmfm",class:"shrink-0 border-gray-300 rounded-full text-blue-600 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:h,onChange:D=>x.selectFormat(h)},null,40,AP),v.createElementVNode("label",{for:h,class:"text-sm text-gray-800 ms-3 dark:text-neutral-400"}," Формат "+v.toDisplayString(h),9,DP)]))),128))])]),v.createElementVNode("div",zP,[v.createElementVNode("div",LP,[v.createElementVNode("button",{type:"button",class:"p-2 inline-flex items-center gap-x-2 text-xs font-medium rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:ring-2 focus:ring-blue-500",onClick:t[1]||(t[1]=(...h)=>x.exportTable&&x.exportTable(...h))}," Завантажити таблицю ")])])])],64)}const OP={components:{IconExport:SP,AdminTableExportForm:vt(EP,[["render",RP]])},props:{table:String,columns:Array},data(){return{isOpen:!1}}};function BP(n,t,o,c,d,x){const y=v.resolveComponent("IconExport"),h=v.resolveComponent("AdminTableExportForm"),M=v.resolveComponent("VsDialog");return v.openBlock(),v.createElementBlock(v.Fragment,null,[v.createElementVNode("button",{onClick:t[0]||(t[0]=D=>d.isOpen=!0),class:"py-2 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"},[v.createVNode(y,{height:"16",width:"16"}),t[2]||(t[2]=v.createTextVNode(" Import / Export ")),t[3]||(t[3]=v.createElementVNode("svg",{class:"shrink-0 size-3.5",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"},[v.createElementVNode("path",{d:"m6 9 6 6 6-6"})],-1))]),v.createVNode(M,{visible:d.isOpen,"onUpdate:visible":t[1]||(t[1]=D=>d.isOpen=D),title:"Експорт таблиці"},{default:v.withCtx(()=>[v.createVNode(h,{table:o.table,columns:o.columns},null,8,["table","columns"])]),_:1},8,["visible"])],64)}const FP=vt(OP,[["render",BP]]),NP={},VP={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 $P(n,t,o,c,d,x){return v.openBlock(),v.createElementBlock("svg",VP,t[0]||(t[0]=[v.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 jP=vt(NP,[["render",$P]]),UP={props:{column:Object},emits:["update-column"],data(){return{value:!1}},watch:{value(n){this.$emit("update-column",{...this.column,hidden:!n})}},mounted(){var n;((n=this.column)==null?void 0:n.hidden)!==!0&&(this.value=!0)}},HP={class:"flex w-full gap-[8px] items-centr"};function qP(n,t,o,c,d,x){var y,h;return v.openBlock(),v.createElementBlock("label",HP,[v.withDirectives(v.createElementVNode("input",{"onUpdate:modelValue":t[0]||(t[0]=M=>d.value=M),type:"checkbox"},null,512),[[v.vModelCheckbox,d.value]]),v.createTextVNode(" "+v.toDisplayString(((y=o.column)==null?void 0:y.ua)||((h=o.column)==null?void 0:h.title)),1)])}const ZP={components:{IconColumns:jP,AdminTableColumnsHiddenItem:vt(UP,[["render",qP]])},emits:["update-columns"],props:{columns:Array},methods:{updateColumn(n){const t=this.columns.findIndex(c=>(c==null?void 0:c.name)===(n==null?void 0:n.name)),o=this.columns;o[t]=n,this.$emit("update-columns",[...o])}}},WP={class:"py-2 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"},GP={class:"flex flex-col gap-[3px] h-[400px] w-[300px] 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"};function YP(n,t,o,c,d,x){const y=v.resolveComponent("IconColumns"),h=v.resolveComponent("AdminTableColumnsHiddenItem"),M=v.resolveComponent("VsPopover");return v.openBlock(),v.createBlock(M,{trigger:"click",placement:"bottom"},{reference:v.withCtx(()=>[v.createElementVNode("button",WP,[v.createVNode(y,{height:"20",width:"16"})])]),default:v.withCtx(()=>[v.createElementVNode("div",null,[t[0]||(t[0]=v.createElementVNode("h2",{class:"text-sm mb-[8px]"},"Оберіть колонки, щоб приховати",-1)),v.createElementVNode("ul",GP,[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(o.columns,(D,A)=>(v.openBlock(),v.createElementBlock("li",{key:A},[v.createVNode(h,{column:D,onUpdateColumn:x.updateColumn},null,8,["column","onUpdateColumn"])]))),128))])])]),_:1})}const XP=vt(ZP,[["render",YP]]),KP={},JP={class:"hidden sm:block shrink-0 size-3",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 16 16"};function QP(n,t,o,c,d,x){return v.openBlock(),v.createElementBlock("svg",JP,t[0]||(t[0]=[v.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 1C8.55228 1 9 1.44772 9 2V7L14 7C14.5523 7 15 7.44771 15 8C15 8.55228 14.5523 9 14 9L9 9V14C9 14.5523 8.55228 15 8 15C7.44772 15 7 14.5523 7 14V9.00001L2 9.00001C1.44772 9.00001 1 8.5523 1 8.00001C0.999999 7.44773 1.44771 7.00001 2 7.00001L7 7.00001V2C7 1.44772 7.44772 1 8 1Z"},null,-1)]))}const eI=vt(KP,[["render",QP]]),tI={},iI={class:"vs-table-interface__table-wrp w-full rounded h-fit overflow-hidden"};function nI(n,t,o,c,d,x){return v.openBlock(),v.createElementBlock("div",iI,t[0]||(t[0]=[v.createStaticVNode('<div><div class="p-5 min-h-[500px] flex flex-col justify-center items-center text-center"><svg class="w-48 mx-auto" viewBox="0 0 178 90" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="27" y="50.5" width="124" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="27" y="50.5" width="124" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-50 dark:stroke-neutral-700/10"></rect><rect x="34.5" y="58" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="61" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="73" width="77" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/30"></rect><rect x="27" y="36" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="39" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="51" width="92" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><g filter="url(#filter1)"><rect x="12" y="6" width="154" height="40" rx="8" fill="currentColor" class="fill-white dark:fill-neutral-800" shape-rendering="crispEdges"></rect><rect x="12.5" y="6.5" width="153" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/60" shape-rendering="crispEdges"></rect><rect x="20" y="14" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="17" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="29" width="106" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect></g><defs><filter id="filter1" x="0" y="0" width="178" height="64" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="6"></feOffset><feGaussianBlur stdDeviation="6"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1187_14810"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1187_14810" result="shape"></feBlend></filter></defs></svg><div class="max-w-sm mx-auto mt-6"><p class="font-medium text-gray-800 dark:text-neutral-200"> Дані для відображення відсутні </p><p class="mt-2 text-sm text-gray-500 dark:text-neutral-500"> Змініть параметри пошуку або спробуйте пізніше </p></div></div></div>',1)]))}const rI={props:{table:String,title:String},components:{IconFilter:qM,AdminTableControl:bP,AdminTableExport:FP,AdminTableColumnsHidden:XP,AdminTableColumn:QM,AdminNodata:vt(tI,[["render",nI]]),IconPlus:eI,IconSearch:E0},data(){return{tableData:{},isFilters:!1,filterScheme:[],page:1,searchValue:"",limit:0,filters:null,activeColumn:"",onFilters:0}},mounted(){var n,t,o,c;this.page=((t=(n=this.$route)==null?void 0:n.query)==null?void 0:t.page)||1,this.limit=((c=(o=this.$route)==null?void 0:o.query)==null?void 0:c.limit)||20,this.getTableData(),this.getFilters()},computed:{defaultPage(){var n,t;return((t=(n=this.$route)==null?void 0:n.query)==null?void 0:t.page)||1},getFilterScheme(){var n;return(n=this.tableData)==null?void 0:n.filters},columns(){var n,t;return(t=(n=this.tableData)==null?void 0:n.columns)==null?void 0:t.filter(o=>(o==null?void 0:o.hidden)!==!0)},isForm(){var n;return(n=this.tableData)==null?void 0:n.form},isNoData(){var n,t;return!((n=this.tableData)!=null&&n.rows)||!((t=this.columns)!=null&&t.length)}},watch:{async table(){this.tableData=null,await this.getTableData()},searchValue(){this.getTableData()},$route:{handler(n,t){var o,c;((o=n==null?void 0:n.params)==null?void 0:o.catchAll)!==((c=t==null?void 0:t.params)==null?void 0:c.catchAll)&&(this.filterScheme=null,this.filters=null,this.onFilters=0,this.getFilters())},deep:!0},limit(n){var t;this.$router.push({query:{...(t=this.$route)==null?void 0:t.query,limit:n}})}},methods:{async getTableData(){var n,t;try{const{data:o}=await mt.get(`/api/template/table/${this.table}`),c=await mt.get(`/api/table-data/${this.table}`,{params:{page:this.page,search:this.searchValue||null,limit:this.limit,filter:this.filters||null,order:((t=(n=this.$route)==null?void 0:n.query)==null?void 0:t.sort)||null}});this.tableData={...o,...(c==null?void 0:c.data)||{}}}catch{}},async getFilters(){var n;try{const{data:t}=await mt.get(`/api/table-filter/${this.table}`);this.filterScheme=(n=t==null?void 0:t.list)==null?void 0:n.map(o=>({...o,label:(o==null?void 0:o.label)||(o==null?void 0:o.ua)}))}catch{}},async handlePageChange(n){const t=this.$route.query;this.page=n,!(!(t!=null&&t.page)&&n===1||t.page===n)&&(await this.$router.replace({query:{...t,page:n}}),await this.getTableData())},async changeLimit(n){this.limit=await n,this.defaultPage=1,await this.getTableData()},closeFilter({target:n}){this.isFilters&&n.classList.contains("filter-container")&&(this.isFilters=!1)},async filterChange({url:n,state:t}){var o;this.filters=n!=="no-url"?n:null,this.onFilters=(o=Object.entries(t))==null?void 0:o.length,this.page=1,await this.getTableData()},changeActiveColumn(n){this.activeColumn=n,this.getTableData()},pushToCard(n){var t;((t=this.tableData)==null?void 0:t.card)===!1||this.$router.push(`/card/${this.table}/${n}`)}}},sI={class:"w-[calc(100vw - 320px)]"},oI={class:"h-[76px] bg-gray-50 flex items-center justify-between px-[30px]"},aI={class:"text-xl font-medium h-[20px]"},lI={style:{height:"calc(100vh - 140px)",width:"calc(100vw - 260px)"},class:"bg-gray-50 p-[20px] flex pt-[10px]"},cI={class:"bg-white w-full rounded-xl border p-[20px]"},hI={class:"flex sm:grid sm:grid-cols-2 gap-x-2 sm:gap-x-5 mb-[10px] relative"},uI={class:"flex gap-[6px] ml-auto"},dI={key:0,class:"font-medium text-[10px] py-0.5 px-[5px] bg-gray-800 text-white leading-3 rounded-full dark:bg-neutral-500"},pI={class:"space-y-5 flex items-start w-full justify-start"},fI={style:{height:"calc(100vh - 310px)"},class:"overflow-x-auto w-full border-t [&::-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"},mI={class:"inline-block w-full align-middle"},gI={key:0,class:"divide-y divide-gray-200 min-w-full dark:divide-neutral-700 relative table-fixed"},yI={class:"sticky top-0 bg-white w-full relative after:absolute after:content-[''] after:block after:w-full after:h-px after:bg-stone-200"},_I={class:"border-stone-200 right-0 z-[1]"},xI={class:"divide-y divide-gray-200"},bI={class:"min-w-[200px] text-start pe-4 py-3 text-sm text-gray-600"},vI=["onClick"],wI={class:"text-center sticky right-0 bg-white w-[80px] px-[10px]"},kI={class:"p-[20px] flex justify-end w-full"},SI={class:"filter-content h-screen bg-white w-[400px] p-[20px] pt-[10px] overflow-x-auto bg-white [&::-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 EI(n,t,o,c,d,x){var _e,me,Ie,tt,gt,Ve;const y=v.resolveComponent("IconPlus"),h=v.resolveComponent("router-link"),M=v.resolveComponent("IconSearch"),D=v.resolveComponent("VsText"),A=v.resolveComponent("AdminTableColumnsHidden"),z=v.resolveComponent("AdminTableExport"),L=v.resolveComponent("IconFilter"),N=v.resolveComponent("AdminTableColumn"),Y=v.resolveComponent("AdminTableControl"),ee=v.resolveComponent("AdminNodata"),oe=v.resolveComponent("VsPagination"),he=v.resolveComponent("VsFilter");return v.openBlock(),v.createElementBlock(v.Fragment,null,[v.createElementVNode("div",sI,[v.createElementVNode("div",oI,[v.createElementVNode("h2",aI,v.toDisplayString(o.title),1),x.isForm?(v.openBlock(),v.createBlock(h,{key:0,to:`/add?table=${(me=(_e=n.$route)==null?void 0:_e.params)==null?void 0:me.catchAll}`,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 hover:text-white duration-300"},{default:v.withCtx(()=>[v.createVNode(y,{height:"16",width:"16"}),t[5]||(t[5]=v.createTextVNode(" Додати "))]),_:1},8,["to"])):v.createCommentVNode("",!0)]),v.createElementVNode("div",lI,[v.createElementVNode("div",cI,[v.createElementVNode("div",hI,[v.createVNode(M,{height:"14",width:"14",class:"absolute top-[10px] left-[14px] text-gray-500 z-[1]"}),v.createVNode(D,{modelValue:d.searchValue,"onUpdate:modelValue":t[0]||(t[0]=rt=>d.searchValue=rt),placeholder:"Пошук...",clearable:!0,class:"[&>input]:py-[7px] [&>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"]),v.createElementVNode("div",uI,[v.createVNode(A,{columns:(Ie=d.tableData)==null?void 0:Ie.columns,onUpdateColumns:t[1]||(t[1]=rt=>d.tableData.columns=rt)},null,8,["columns"]),v.createVNode(z,{table:o.table,columns:(tt=d.tableData)==null?void 0:tt.columns},null,8,["table","columns"]),v.createElementVNode("button",{onClick:t[2]||(t[2]=rt=>d.isFilters=!d.isFilters),class:"py-2 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"},[v.createVNode(L,{height:"16",width:"16"}),t[6]||(t[6]=v.createTextVNode(" Фільтри ")),d.onFilters?(v.openBlock(),v.createElementBlock("span",dI,v.toDisplayString(d.onFilters),1)):v.createCommentVNode("",!0)])])]),v.createElementVNode("div",pI,[v.createElementVNode("div",fI,[v.createElementVNode("div",mI,[x.isNoData?(v.openBlock(),v.createBlock(ee,{key:1})):(v.openBlock(),v.createElementBlock("table",gI,[v.createElementVNode("thead",yI,[v.createElementVNode("tr",_I,[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(x.columns,rt=>(v.openBlock(),v.createBlock(N,{key:rt.name,data:rt,activeColumn:d.activeColumn,onChangeActive:x.changeActiveColumn},null,8,["data","activeColumn","onChangeActive"]))),128)),t[7]||(t[7]=v.createElementVNode("th",{class:"w-[70px] sticky right-0 top-0 bg-white"},null,-1))])]),v.createElementVNode("tbody",xI,[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList((gt=d.tableData)==null?void 0:gt.rows,(rt,xt)=>{var zt,Et,Ki,Pt,ri,Vi,yn,zi;return v.openBlock(),v.createElementBlock("tr",{key:xt},[v.createElementVNode("td",bI,[v.createElementVNode("button",{onClick:()=>x.pushToCard(rt==null?void 0:rt.id),class:v.normalizeClass(["text-sm font-medium",[((zt=d.tableData)==null?void 0:zt.card)===!1?"":"text-blue-600 decoration-2 focus:outline-none focus:underline hover:text-blue-600 hover:underline"]])},[(v.openBlock(),v.createBlock(v.resolveDynamicComponent(((Et=x.columns[0])==null?void 0:Et.format)==="custom"?(Ki=x.columns[0])==null?void 0:Ki.component:n.$componentsConfig[`table-format-${((ri=(Pt=x.columns[0])==null?void 0:Pt.format)==null?void 0:ri.toLowerCase())||"text"}`]),{name:(Vi=x.columns[0])==null?void 0:Vi.name,data:rt,value:rt==null?void 0:rt[(yn=x.columns[0])==null?void 0:yn.name]},null,8,["name","data","value"]))],10,vI)]),(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList((zi=x.columns)==null?void 0:zi.slice(1),ui=>{var an;return v.openBlock(),v.createElementBlock("td",{class:"min-w-[300px] w-full text-start px-[4px] py-3 text-sm text-gray-600",key:ui.name},[(v.openBlock(),v.createBlock(v.resolveDynamicComponent((ui==null?void 0:ui.format)==="custom"?ui==null?void 0:ui.component:n.$componentsConfig[`table-format-${((an=ui==null?void 0:ui.format)==null?void 0:an.toLowerCase())||"text"}`]),{name:ui==null?void 0:ui.name,data:rt,value:rt==null?void 0:rt[ui==null?void 0:ui.name]},null,8,["name","data","value"]))])}),128)),v.createElementVNode("td",wI,[v.createVNode(Y,{isForm:x.isForm,item:rt,table:o.table,onUpdateTable:x.getTableData},null,8,["isForm","item","table","onUpdateTable"])])])}),128))])]))])])]),v.createElementVNode("div",kI,[d.limit?(v.openBlock(),v.createBlock(oe,{key:0,goTo:!1,class:"justify-end","default-page":x.defaultPage,total:((Ve=d.tableData)==null?void 0:Ve.total)||0,pageSize:d.limit,onPageChange:x.handlePageChange,pageSizes:[10,16,20],onPageSizeChange:x.changeLimit},null,8,["default-page","total","pageSize","onPageChange","onPageSizeChange"])):v.createCommentVNode("",!0)])])])]),v.createVNode(v.Transition,{name:"fade"},{default:v.withCtx(()=>{var rt;return[v.withDirectives(v.createElementVNode("div",{onClick:t[4]||(t[4]=(...xt)=>x.closeFilter&&x.closeFilter(...xt)),style:{height:"100vh"},class:"fixed filter-container top-0 flex justify-end items-center z-[2] right-0 left-0 bottom-0 bg-[rgba(0,0,0,0.5)]"},[v.createElementVNode("div",SI,[(rt=d.filterScheme)!=null&&rt.length?(v.openBlock(),v.createBlock(he,{key:0,ref:"filter",scheme:d.filterScheme,layout:"default","apply-vue-router":"",history:"",name:"filter",onFilterChange:x.filterChange,closeFilterBtn:!0,onFilterClose:t[3]||(t[3]=xt=>d.isFilters=!1)},null,8,["scheme","onFilterChange"])):v.createCommentVNode("",!0)])],512),[[v.vShow,d.isFilters]])]}),_:1})],64)}const TI={components:{AdminTable:vt(rI,[["render",EI]])},data(){return{table:!1,interface:"",title:""}},watch:{$route:{async handler(){nr!=null&&nr.value||await this.getMenu(),await this.checkPageType()},deep:!0},title(n){n&&(document.title=n)}},async mounted(){await this.checkPageType()},methods:{flattenMenu(n){const t=[];return n.forEach(o=>{o.menu?t.push(...this.flattenMenu(o.menu)):t.push(o)}),t},async getMenu(){try{const{data:n}=await mt.get("/api/user-menu");nr.value=n}catch{}},async checkPageType(){const n=this.flattenMenu(nr.value);n!=null&&n.length||this.$router.replace("/404");const t=n==null?void 0:n.find(c=>{var d,x;return(c==null?void 0:c.path)==((x=(d=this.$route)==null?void 0:d.params)==null?void 0:x.catchAll)});this.title=t==null?void 0:t.ua,t||this.$router.replace("/404");const o=t==null?void 0:t.table;this.table=o||!1,!o&&this.getInterface()},async getInterface(){var n,t;try{const{data:o}=await mt.get(`/api/template/interface/${((t=(n=this.$route)==null?void 0:n.params)==null?void 0:t.catchAll)||""}`);this.interface=o||""}catch{this.interface=""}}}},CI=["innerHTML"];function MI(n,t,o,c,d,x){const y=v.resolveComponent("AdminTable");return d.table?(v.openBlock(),v.createBlock(y,{key:0,table:d.table,title:d.title},null,8,["table","title"])):(v.openBlock(),v.createElementBlock("div",{key:1,class:"w-full bg-gray-50",style:{height:"calc(100vh - 120px)"},innerHTML:d.interface},null,8,CI))}const PI=Object.freeze(Object.defineProperty({__proto__:null,default:vt(TI,[["render",MI]])},Symbol.toStringTag,{value:"Module"}));return aC});
|
|
629
|
+
<source src="{{src}}" type="{{format}}" />Sorry, your browser doesn't support embedded videos.</video>`,videoFormat:"",vimeo:{byline:1,color:"00adef",controls:1,dnt:1,muted:0},youtube:{controls:1,enablejsapi:1,nocookie:1,rel:0,fs:1}},jE=["image","html","ajax","inline","clone","iframe","map","pdf","html5video","youtube","vimeo"];class i0 extends Vr{onBeforeInitSlide(t,o,c){this.processType(c)}onCreateSlide(t,o,c){this.setContent(c)}onClearContent(t,o){o.xhr&&(o.xhr.abort(),o.xhr=null);const c=o.iframeEl;c&&(c.onload=c.onerror=null,c.src="//about:blank",o.iframeEl=null);const d=o.contentEl,x=o.placeholderEl;if(o.type==="inline"&&d&&x)d.classList.remove("fancybox__content"),getComputedStyle(d).getPropertyValue("display")!=="none"&&(d.style.display="none"),setTimeout(()=>{x&&(d&&x.parentNode&&x.parentNode.insertBefore(d,x),x.remove())},0),o.contentEl=void 0,o.placeholderEl=void 0;else for(;o.el&&o.el.firstChild;)o.el.removeChild(o.el.firstChild)}onSelectSlide(t,o,c){c.state===gn.Ready&&this.playVideo()}onUnselectSlide(t,o,c){var d,x;if(c.type===ac){try{(x=(d=c.el)===null||d===void 0?void 0:d.querySelector("video"))===null||x===void 0||x.pause()}catch{}return}let y;c.type===Ho?y={method:"pause",value:"true"}:c.type===Es&&(y={event:"command",func:"pauseVideo"}),y&&c.iframeEl&&c.iframeEl.contentWindow&&c.iframeEl.contentWindow.postMessage(JSON.stringify(y),"*"),c.poller&&clearTimeout(c.poller)}onDone(t,o){t.isCurrentSlide(o)&&!t.isClosing()&&this.playVideo()}onRefresh(t,o){o.slides.forEach(c=>{c.el&&(this.resizeIframe(c),this.setAspectRatio(c))})}onMessage(t){try{let o=JSON.parse(t.data);if(t.origin==="https://player.vimeo.com"){if(o.event==="ready")for(let c of Array.from(document.getElementsByClassName("fancybox__iframe")))c instanceof HTMLIFrameElement&&c.contentWindow===t.source&&(c.dataset.ready="true")}else if(t.origin.match(/^https:\/\/(www.)?youtube(-nocookie)?.com$/)&&o.event==="onReady"){const c=document.getElementById(o.id);c&&(c.dataset.ready="true")}}catch{}}loadAjaxContent(t){const o=this.instance.optionFor(t,"src")||"";this.instance.showLoading(t);const c=this.instance,d=new XMLHttpRequest;c.showLoading(t),d.onreadystatechange=function(){d.readyState===XMLHttpRequest.DONE&&c.state===Xi.Ready&&(c.hideLoading(t),d.status===200?c.setContent(t,d.responseText):c.setError(t,d.status===404?"{{AJAX_NOT_FOUND}}":"{{AJAX_FORBIDDEN}}"))};const x=t.ajax||null;d.open(x?"POST":"GET",o+""),d.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),d.setRequestHeader("X-Requested-With","XMLHttpRequest"),d.send(x),t.xhr=d}setInlineContent(t){let o=null;if(Hn(t.src))o=t.src;else if(typeof t.src=="string"){const c=t.src.split("#",2).pop();o=c?document.getElementById(c):null}if(o){if(t.type==="clone"||o.closest(".fancybox__slide")){o=o.cloneNode(!0);const c=o.dataset.animationName;c&&(o.classList.remove(c),delete o.dataset.animationName);let d=o.getAttribute("id");d=d?`${d}--clone`:`clone-${this.instance.id}-${t.index}`,o.setAttribute("id",d)}else if(o.parentNode){const c=document.createElement("div");c.classList.add("fancybox-placeholder"),o.parentNode.insertBefore(c,o),t.placeholderEl=c}this.instance.setContent(t,o)}else this.instance.setError(t,"{{ELEMENT_NOT_FOUND}}")}setIframeContent(t){const{src:o,el:c}=t;if(!o||typeof o!="string"||!c)return;c.classList.add("is-loading");const d=this.instance,x=document.createElement("iframe");x.className="fancybox__iframe",x.setAttribute("id",`fancybox__iframe_${d.id}_${t.index}`);for(const[h,M]of Object.entries(this.optionFor(t,"iframeAttr")||{}))x.setAttribute(h,M);x.onerror=()=>{d.setError(t,"{{IFRAME_ERROR}}")},t.iframeEl=x;const y=this.optionFor(t,"preload");if(t.type!=="iframe"||y===!1)return x.setAttribute("src",t.src+""),d.setContent(t,x,!1),this.resizeIframe(t),void d.revealContent(t);d.showLoading(t),x.onload=()=>{if(!x.src.length)return;const h=x.dataset.ready!=="true";x.dataset.ready="true",this.resizeIframe(t),h?d.revealContent(t):d.hideLoading(t)},x.setAttribute("src",o),d.setContent(t,x,!1)}resizeIframe(t){const{type:o,iframeEl:c}=t;if(o===Es||o===Ho)return;const d=c==null?void 0:c.parentElement;if(!c||!d)return;let x=t.autoSize;x===void 0&&(x=this.optionFor(t,"autoSize"));let y=t.width||0,h=t.height||0;y&&h&&(x=!1);const M=d&&d.style;if(t.preload!==!1&&x!==!1&&M)try{const D=window.getComputedStyle(d),A=parseFloat(D.paddingLeft)+parseFloat(D.paddingRight),z=parseFloat(D.paddingTop)+parseFloat(D.paddingBottom),L=c.contentWindow;if(L){const N=L.document,Y=N.getElementsByTagName(Lp)[0],ee=N.body;M.width="",ee.style.overflow="hidden",y=y||Y.scrollWidth+A,M.width=`${y}px`,ee.style.overflow="",M.flex="0 0 auto",M.height=`${ee.scrollHeight}px`,h=Y.scrollHeight+z}}catch{}if(y||h){const D={flex:"0 1 auto",width:"",height:""};y&&y!=="auto"&&(D.width=`${y}px`),h&&h!=="auto"&&(D.height=`${h}px`),Object.assign(M,D)}}playVideo(){const t=this.instance.getSlide();if(!t)return;const{el:o}=t;if(!o||!o.offsetParent||!this.optionFor(t,"videoAutoplay"))return;if(t.type===ac)try{const d=o.querySelector("video");if(d){const x=d.play();x!==void 0&&x.then(()=>{}).catch(y=>{d.muted=!0,d.play()})}}catch{}if(t.type!==Es&&t.type!==Ho)return;const c=()=>{if(t.iframeEl&&t.iframeEl.contentWindow){let d;if(t.iframeEl.dataset.ready==="true")return d=t.type===Es?{event:"command",func:"playVideo"}:{method:"play",value:"true"},d&&t.iframeEl.contentWindow.postMessage(JSON.stringify(d),"*"),void(t.poller=void 0);t.type===Es&&(d={event:"listening",id:t.iframeEl.getAttribute("id")},t.iframeEl.contentWindow.postMessage(JSON.stringify(d),"*"))}t.poller=setTimeout(c,250)};c()}processType(t){if(t.html)return t.type=Lp,t.src=t.html,void(t.html="");const o=this.instance.optionFor(t,"src","");if(!o||typeof o!="string")return;let c=t.type,d=null;if(d=o.match(/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(?:watch\?(?:.*&)?v=|v\/|u\/|shorts\/|embed\/?)?(videoseries\?list=(?:.*)|[\w-]{11}|\?listType=(?:.*)&list=(?:.*))(?:.*)/i)){const x=this.optionFor(t,Es),{nocookie:y}=x,h=function(z,L){var N={};for(var Y in z)Object.prototype.hasOwnProperty.call(z,Y)&&L.indexOf(Y)<0&&(N[Y]=z[Y]);if(z!=null&&typeof Object.getOwnPropertySymbols=="function"){var ee=0;for(Y=Object.getOwnPropertySymbols(z);ee<Y.length;ee++)L.indexOf(Y[ee])<0&&Object.prototype.propertyIsEnumerable.call(z,Y[ee])&&(N[Y[ee]]=z[Y[ee]])}return N}(x,["nocookie"]),M=`www.youtube${y?"-nocookie":""}.com`,D=t0(o,h),A=encodeURIComponent(d[2]);t.videoId=A,t.src=`https://${M}/embed/${A}?${D}`,t.thumbSrc=t.thumbSrc||`https://i.ytimg.com/vi/${A}/mqdefault.jpg`,c=Es}else if(d=o.match(/^.+vimeo.com\/(?:\/)?([\d]+)((\/|\?h=)([a-z0-9]+))?(.*)?/)){const x=t0(o,this.optionFor(t,Ho)),y=encodeURIComponent(d[1]),h=d[4]||"";t.videoId=y,t.src=`https://player.vimeo.com/video/${y}?${h?`h=${h}${x?"&":""}`:""}${x}`,c=Ho}if(!c&&t.triggerEl){const x=t.triggerEl.dataset.type;jE.includes(x)&&(c=x)}c||typeof o=="string"&&(o.charAt(0)==="#"?c="inline":(d=o.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i))?(c=ac,t.videoFormat=t.videoFormat||"video/"+(d[1]==="ogv"?"ogg":d[1])):o.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)?c=e0:o.match(/\.(pdf)((\?|#).*)?$/i)&&(c="pdf")),(d=o.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:(?:(?:maps\/(?:place\/(?:.*)\/)?\@(.*),(\d+.?\d+?)z))|(?:\?ll=))(.*)?/i))?(t.src=`https://maps.google.${d[1]}/?ll=${(d[2]?d[2]+"&z="+Math.floor(parseFloat(d[3]))+(d[4]?d[4].replace(/^\//,"&"):""):d[4]+"").replace(/\?/,"&")}&output=${d[4]&&d[4].indexOf("layer=c")>0?"svembed":"embed"}`,c=Rp):(d=o.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:maps\/search\/)(.*)/i))&&(t.src=`https://maps.google.${d[1]}/maps?q=${d[2].replace("query=","q=").replace("api=1","")}&output=embed`,c=Rp),c=c||this.instance.option("defaultType"),t.type=c,c===e0&&(t.thumbSrc=t.thumbSrc||t.src)}setContent(t){const o=this.instance.optionFor(t,"src")||"";if(t&&t.type&&o){switch(t.type){case Lp:this.instance.setContent(t,o);break;case ac:const c=this.option("videoTpl");c&&this.instance.setContent(t,c.replace(/\{\{src\}\}/gi,o+"").replace(/\{\{format\}\}/gi,this.optionFor(t,"videoFormat")||"").replace(/\{\{poster\}\}/gi,t.poster||t.thumbSrc||""));break;case"inline":case"clone":this.setInlineContent(t);break;case"ajax":this.loadAjaxContent(t);break;case"pdf":case Rp:case Es:case Ho:t.preload=!1;case"iframe":this.setIframeContent(t)}this.setAspectRatio(t)}}setAspectRatio(t){const o=t.contentEl;if(!(t.el&&o&&t.type&&[Es,Ho,ac].includes(t.type)))return;let c,d=t.width||"auto",x=t.height||"auto";if(d==="auto"||x==="auto"){c=this.optionFor(t,"videoRatio");const D=(c+"").match(/(\d+)\s*\/\s?(\d+)/);c=D&&D.length>2?parseFloat(D[1])/parseFloat(D[2]):parseFloat(c+"")}else d&&x&&(c=d/x);if(!c)return;o.style.aspectRatio="",o.style.width="",o.style.height="",o.offsetHeight;const y=o.getBoundingClientRect(),h=y.width||1,M=y.height||1;o.style.aspectRatio=c+"",c<h/M?(x=x==="auto"?M:Math.min(M,x),o.style.width="auto",o.style.height=`${x}px`):(d=d==="auto"?h:Math.min(h,d),o.style.width=`${d}px`,o.style.height="auto")}attach(){const t=this,o=t.instance;o.on("Carousel.beforeInitSlide",t.onBeforeInitSlide),o.on("Carousel.createSlide",t.onCreateSlide),o.on("Carousel.selectSlide",t.onSelectSlide),o.on("Carousel.unselectSlide",t.onUnselectSlide),o.on("Carousel.Panzoom.refresh",t.onRefresh),o.on("done",t.onDone),o.on("clearContent",t.onClearContent),window.addEventListener("message",t.onMessage)}detach(){const t=this,o=t.instance;o.off("Carousel.beforeInitSlide",t.onBeforeInitSlide),o.off("Carousel.createSlide",t.onCreateSlide),o.off("Carousel.selectSlide",t.onSelectSlide),o.off("Carousel.unselectSlide",t.onUnselectSlide),o.off("Carousel.Panzoom.refresh",t.onRefresh),o.off("done",t.onDone),o.off("clearContent",t.onClearContent),window.removeEventListener("message",t.onMessage)}}Object.defineProperty(i0,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:$E});const cu="play",hu="pause",lc="ready";class n0 extends Vr{constructor(){super(...arguments),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:lc}),Object.defineProperty(this,"inHover",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"timer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"progressBar",{enumerable:!0,configurable:!0,writable:!0,value:null})}get isActive(){return this.state!==lc}onReady(t){this.option("autoStart")&&(t.isInfinite||t.page<t.pages.length-1)&&this.start()}onChange(){this.removeProgressBar(),this.pause()}onSettle(){this.resume()}onVisibilityChange(){document.visibilityState==="visible"?this.resume():this.pause()}onMouseEnter(){this.inHover=!0,this.pause()}onMouseLeave(){var t;this.inHover=!1,!((t=this.instance.panzoom)===null||t===void 0)&&t.isResting&&this.resume()}onTimerEnd(){const t=this.instance;this.state==="play"&&(t.isInfinite||t.page!==t.pages.length-1?t.slideNext():t.slideTo(0))}removeProgressBar(){this.progressBar&&(this.progressBar.remove(),this.progressBar=null)}createProgressBar(){var t;if(!this.option("showProgress"))return null;this.removeProgressBar();const o=this.instance,c=((t=o.pages[o.page])===null||t===void 0?void 0:t.slides)||[];let d=this.option("progressParentEl");if(d||(d=(c.length===1?c[0].el:null)||o.viewport),!d)return null;const x=document.createElement("div");return dt(x,"f-progress"),d.prepend(x),this.progressBar=x,x.offsetHeight,x}set(){const t=this,o=t.instance;if(o.pages.length<2||t.timer)return;const c=t.option("timeout");t.state=cu,dt(o.container,"has-autoplay");let d=t.createProgressBar();d&&(d.style.transitionDuration=`${c}ms`,d.style.transform="scaleX(1)"),t.timer=setTimeout(()=>{t.timer=null,t.inHover||t.onTimerEnd()},c),t.emit("set")}clear(){const t=this;t.timer&&(clearTimeout(t.timer),t.timer=null),t.removeProgressBar()}start(){const t=this;if(t.set(),t.state!==lc){if(t.option("pauseOnHover")){const o=t.instance.container;o.addEventListener("mouseenter",t.onMouseEnter,!1),o.addEventListener("mouseleave",t.onMouseLeave,!1)}document.addEventListener("visibilitychange",t.onVisibilityChange,!1),t.emit("start")}}stop(){const t=this,o=t.state,c=t.instance.container;t.clear(),t.state=lc,c.removeEventListener("mouseenter",t.onMouseEnter,!1),c.removeEventListener("mouseleave",t.onMouseLeave,!1),document.removeEventListener("visibilitychange",t.onVisibilityChange,!1),ni(c,"has-autoplay"),o!==lc&&t.emit("stop")}pause(){const t=this;t.state===cu&&(t.state=hu,t.clear(),t.emit(hu))}resume(){const t=this,o=t.instance;if(o.isInfinite||o.page!==o.pages.length-1)if(t.state!==cu){if(t.state===hu&&!t.inHover){const c=new Event("resume",{bubbles:!0,cancelable:!0});t.emit("resume",c),c.defaultPrevented||t.set()}}else t.set();else t.stop()}toggle(){this.state===cu||this.state===hu?this.stop():this.start()}attach(){const t=this,o=t.instance;o.on("ready",t.onReady),o.on("Panzoom.startAnimation",t.onChange),o.on("Panzoom.endAnimation",t.onSettle),o.on("Panzoom.touchMove",t.onChange)}detach(){const t=this,o=t.instance;o.off("ready",t.onReady),o.off("Panzoom.startAnimation",t.onChange),o.off("Panzoom.endAnimation",t.onSettle),o.off("Panzoom.touchMove",t.onChange),t.stop()}}Object.defineProperty(n0,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{autoStart:!0,pauseOnHover:!0,progressParentEl:null,showProgress:!0,timeout:3e3}});class r0 extends Vr{constructor(){super(...arguments),Object.defineProperty(this,"ref",{enumerable:!0,configurable:!0,writable:!0,value:null})}onPrepare(t){const o=t.carousel;if(!o)return;const c=t.container;c&&(o.options.Autoplay=Un({autoStart:!1},this.option("Autoplay")||{},{pauseOnHover:!1,timeout:this.option("timeout"),progressParentEl:()=>this.option("progressParentEl")||null,on:{start:()=>{t.emit("startSlideshow")},set:d=>{var x;c.classList.add("has-slideshow"),((x=t.getSlide())===null||x===void 0?void 0:x.state)!==gn.Ready&&d.pause()},stop:()=>{c.classList.remove("has-slideshow"),t.isCompact||t.endIdle(),t.emit("endSlideshow")},resume:(d,x)=>{var y,h,M;!x||!x.cancelable||((y=t.getSlide())===null||y===void 0?void 0:y.state)===gn.Ready&&(!((M=(h=t.carousel)===null||h===void 0?void 0:h.panzoom)===null||M===void 0)&&M.isResting)||x.preventDefault()}}}),o.attachPlugins({Autoplay:n0}),this.ref=o.plugins.Autoplay)}onReady(t){const o=t.carousel,c=this.ref;c&&o&&this.option("playOnStart")&&(o.isInfinite||o.page<o.pages.length-1)&&c.start()}onDone(t,o){const c=this.ref,d=t.carousel;if(!c||!d)return;const x=o.panzoom;x&&x.on("startAnimation",()=>{t.isCurrentSlide(o)&&c.stop()}),t.isCurrentSlide(o)&&c.resume()}onKeydown(t,o){var c;const d=this.ref;d&&o===this.option("key")&&((c=document.activeElement)===null||c===void 0?void 0:c.nodeName)!=="BUTTON"&&d.toggle()}attach(){const t=this,o=t.instance;o.on("Carousel.init",t.onPrepare),o.on("Carousel.ready",t.onReady),o.on("done",t.onDone),o.on("keydown",t.onKeydown)}detach(){const t=this,o=t.instance;o.off("Carousel.init",t.onPrepare),o.off("Carousel.ready",t.onReady),o.off("done",t.onDone),o.off("keydown",t.onKeydown)}}Object.defineProperty(r0,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{key:" ",playOnStart:!1,progressParentEl:n=>{var t;return((t=n.instance.container)===null||t===void 0?void 0:t.querySelector(".fancybox__toolbar [data-fancybox-toggle-slideshow]"))||n.instance.container},timeout:3e3}});const s0={classes:{container:"f-thumbs f-carousel__thumbs",viewport:"f-thumbs__viewport",track:"f-thumbs__track",slide:"f-thumbs__slide",isResting:"is-resting",isSelected:"is-selected",isLoading:"is-loading",hasThumbs:"has-thumbs"},minCount:2,parentEl:null,thumbTpl:'<button class="f-thumbs__slide__button" tabindex="0" type="button" aria-label="{{GOTO}}" data-carousel-index="%i"><img class="f-thumbs__slide__img" data-lazy-src="{{%s}}" alt="" /></button>',type:"modern"};var Ts;(function(n){n[n.Init=0]="Init",n[n.Ready=1]="Ready",n[n.Hidden=2]="Hidden"})(Ts||(Ts={}));const o0="isResting",uu="thumbWidth",$a="thumbHeight",ts="thumbClipWidth";let a0=class extends Vr{constructor(){super(...arguments),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:"modern"}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"track",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"carousel",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"thumbWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbClipWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbHeight",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbGap",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbExtraGap",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:Ts.Init})}get isModern(){return this.type==="modern"}onInitSlide(n,t){const o=t.el?t.el.dataset:void 0;o&&(t.thumbSrc=o.thumbSrc||t.thumbSrc||"",t[ts]=parseFloat(o[ts]||"")||t[ts]||0,t[$a]=parseFloat(o.thumbHeight||"")||t[$a]||0),this.addSlide(t)}onInitSlides(){this.build()}onChange(){var n;if(!this.isModern)return;const t=this.container,o=this.instance,c=o.panzoom,d=this.carousel,x=d?d.panzoom:null,y=o.page;if(c&&d&&x){if(c.isDragging){ni(t,this.cn(o0));let h=((n=d.pages[y])===null||n===void 0?void 0:n.pos)||0;h+=o.getProgress(y)*(this[ts]+this.thumbGap);let M=x.getBounds();-1*h>M.x.min&&-1*h<M.x.max&&x.panTo({x:-1*h,friction:.12})}else es(t,this.cn(o0),c.isResting);this.shiftModern()}}onRefresh(){this.updateProps();for(const n of this.instance.slides||[])this.resizeModernSlide(n);this.shiftModern()}isDisabled(){const n=this.option("minCount")||0;if(n){const o=this.instance;let c=0;for(const d of o.slides||[])d.thumbSrc&&c++;if(c<n)return!0}const t=this.option("type");return["modern","classic"].indexOf(t)<0}getThumb(n){const t=this.option("thumbTpl")||"";return{html:this.instance.localize(t,[["%i",n.index],["%d",n.index+1],["%s",n.thumbSrc||"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"]])}}addSlide(n){const t=this.carousel;t&&t.addSlide(n.index,this.getThumb(n))}getSlides(){const n=[];for(const t of this.instance.slides||[])n.push(this.getThumb(t));return n}resizeModernSlide(n){this.isModern&&(n[uu]=n[ts]&&n[$a]?Math.round(this[$a]*(n[ts]/n[$a])):this[uu])}updateProps(){const n=this.container;if(!n)return;const t=o=>parseFloat(getComputedStyle(n).getPropertyValue("--f-thumb-"+o))||0;this.thumbGap=t("gap"),this.thumbExtraGap=t("extra-gap"),this[uu]=t("width")||40,this[ts]=t("clip-width")||40,this[$a]=t("height")||40}build(){const n=this;if(n.state!==Ts.Init)return;if(n.isDisabled())return void n.emit("disabled");const t=n.instance,o=t.container,c=n.getSlides(),d=n.option("type");n.type=d;const x=n.option("parentEl"),y=n.cn("container"),h=n.cn("track");let M=x==null?void 0:x.querySelector("."+y);M||(M=document.createElement("div"),dt(M,y),x?x.appendChild(M):o.after(M)),dt(M,`is-${d}`),dt(o,n.cn("hasThumbs")),n.container=M,n.updateProps();let D=M.querySelector("."+h);D||(D=document.createElement("div"),dt(D,n.cn("track")),M.appendChild(D)),n.track=D;const A=Un({},{track:D,infinite:!1,center:!0,fill:d==="classic",dragFree:!0,slidesPerPage:1,transition:!1,preload:.25,friction:.12,Panzoom:{maxVelocity:0},Dots:!1,Navigation:!1,classes:{container:"f-thumbs",viewport:"f-thumbs__viewport",track:"f-thumbs__track",slide:"f-thumbs__slide"}},n.option("Carousel")||{},{Sync:{target:t},slides:c}),z=new t.constructor(M,A);z.on("createSlide",(L,N)=>{n.setProps(N.index),n.emit("createSlide",N,N.el)}),z.on("ready",()=>{n.shiftModern(),n.emit("ready")}),z.on("refresh",()=>{n.shiftModern()}),z.on("Panzoom.click",(L,N,Y)=>{n.onClick(Y)}),n.carousel=z,n.state=Ts.Ready}onClick(n){n.preventDefault(),n.stopPropagation();const t=this.instance,{pages:o,page:c}=t,d=ee=>{if(ee){const oe=ee.closest("[data-carousel-index]");if(oe)return[parseInt(oe.dataset.carouselIndex||"",10)||0,oe]}return[-1,void 0]},x=(ee,oe)=>{const he=document.elementFromPoint(ee,oe);return he?d(he):[-1,void 0]};let[y,h]=d(n.target);if(y>-1)return;const M=this[ts],D=n.clientX,A=n.clientY;let[z,L]=x(D-M,A),[N,Y]=x(D+M,A);L&&Y?(y=Math.abs(D-L.getBoundingClientRect().right)<Math.abs(D-Y.getBoundingClientRect().left)?z:N,y===c&&(y=y===z?N:z)):L?y=z:Y&&(y=N),y>-1&&o[y]&&t.slideTo(y)}getShift(n){var t;const o=this,{instance:c}=o,d=o.carousel;if(!c||!d)return 0;const x=o[uu],y=o[ts],h=o.thumbGap,M=o.thumbExtraGap;if(!(!((t=d.slides[n])===null||t===void 0)&&t.el))return 0;const D=.5*(x-y),A=c.pages.length-1;let z=c.getProgress(0),L=c.getProgress(A),N=c.getProgress(n,!1,!0),Y=0,ee=D+M+h;const oe=z<0&&z>-1,he=L>0&&L<1;return n===0?(Y=ee*Math.abs(z),he&&z===1&&(Y-=ee*Math.abs(L))):n===A?(Y=ee*Math.abs(L)*-1,oe&&L===-1&&(Y+=ee*Math.abs(z))):oe||he?(Y=-1*ee,Y+=ee*Math.abs(z),Y+=ee*(1-Math.abs(L))):Y=ee*N,Y}setProps(n){var t;const o=this;if(!o.isModern)return;const{instance:c}=o,d=o.carousel;if(c&&d){const x=(t=d.slides[n])===null||t===void 0?void 0:t.el;if(x&&x.childNodes.length){let y=Ye(1-Math.abs(c.getProgress(n))),h=Ye(o.getShift(n));x.style.setProperty("--progress",y?y+"":""),x.style.setProperty("--shift",h+"")}}}shiftModern(){const n=this;if(!n.isModern)return;const{instance:t,track:o}=n,c=t.panzoom,d=n.carousel;if(!(t&&o&&c&&d)||c.state===ci.Init||c.state===ci.Destroy)return;for(const y of t.slides)n.setProps(y.index);let x=(n[ts]+n.thumbGap)*(d.slides.length||0);o.style.setProperty("--width",x+"")}cleanup(){const n=this;n.carousel&&n.carousel.destroy(),n.carousel=null,n.container&&n.container.remove(),n.container=null,n.track&&n.track.remove(),n.track=null,n.state=Ts.Init,ni(n.instance.container,n.cn("hasThumbs"))}attach(){const n=this,t=n.instance;t.on("initSlide",n.onInitSlide),t.state===Ni.Init?t.on("initSlides",n.onInitSlides):n.onInitSlides(),t.on(["change","Panzoom.afterTransform"],n.onChange),t.on("Panzoom.refresh",n.onRefresh)}detach(){const n=this,t=n.instance;t.off("initSlide",n.onInitSlide),t.off("initSlides",n.onInitSlides),t.off(["change","Panzoom.afterTransform"],n.onChange),t.off("Panzoom.refresh",n.onRefresh),n.cleanup()}};Object.defineProperty(a0,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:s0});const UE=Object.assign(Object.assign({},s0),{key:"t",showOnStart:!0,parentEl:null}),l0="is-masked",c0="aria-hidden";class h0 extends Vr{constructor(){super(...arguments),Object.defineProperty(this,"ref",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"hidden",{enumerable:!0,configurable:!0,writable:!0,value:!1})}get isEnabled(){const t=this.ref;return t&&!t.isDisabled()}get isHidden(){return this.hidden}onClick(t,o){o.stopPropagation()}onCreateSlide(t,o){var c,d,x;const y=((x=(d=(c=this.instance)===null||c===void 0?void 0:c.carousel)===null||d===void 0?void 0:d.slides[o.index])===null||x===void 0?void 0:x.type)||"",h=o.el;if(h&&y){let M=`for-${y}`;["video","youtube","vimeo","html5video"].includes(y)&&(M+=" for-video"),dt(h,M)}}onInit(){var t;const o=this,c=o.instance,d=c.carousel;if(o.ref||!d)return;const x=o.option("parentEl")||c.footer||c.container;if(!x)return;const y=Un({},o.options,{parentEl:x,classes:{container:"f-thumbs fancybox__thumbs"},Carousel:{Sync:{friction:c.option("Carousel.friction")||0}},on:{ready:h=>{const M=h.container;M&&this.hidden&&(o.refresh(),M.style.transition="none",o.hide(),M.offsetHeight,queueMicrotask(()=>{M.style.transition="",o.show()}))}}});y.Carousel=y.Carousel||{},y.Carousel.on=Un(((t=o.options.Carousel)===null||t===void 0?void 0:t.on)||{},{click:this.onClick,createSlide:this.onCreateSlide}),d.options.Thumbs=y,d.attachPlugins({Thumbs:a0}),o.ref=d.plugins.Thumbs,o.option("showOnStart")||(o.ref.state=Ts.Hidden,o.hidden=!0)}onResize(){var t;const o=(t=this.ref)===null||t===void 0?void 0:t.container;o&&(o.style.maxHeight="")}onKeydown(t,o){const c=this.option("key");c&&c===o&&this.toggle()}toggle(){const t=this.ref;if(t&&!t.isDisabled())return t.state===Ts.Hidden?(t.state=Ts.Init,void t.build()):void(this.hidden?this.show():this.hide())}show(){const t=this.ref;if(!t||t.isDisabled())return;const o=t.container;o&&(this.refresh(),o.offsetHeight,o.removeAttribute(c0),o.classList.remove(l0),this.hidden=!1)}hide(){const t=this.ref,o=t&&t.container;o&&(this.refresh(),o.offsetHeight,o.classList.add(l0),o.setAttribute(c0,"true")),this.hidden=!0}refresh(){const t=this.ref;if(!t||!t.state)return;const o=t.container,c=(o==null?void 0:o.firstChild)||null;o&&c&&c.childNodes.length&&(o.style.maxHeight=`${c.getBoundingClientRect().height}px`)}attach(){const t=this,o=t.instance;o.state===Xi.Init?o.on("Carousel.init",t.onInit):t.onInit(),o.on("resize",t.onResize),o.on("keydown",t.onKeydown)}detach(){var t;const o=this,c=o.instance;c.off("Carousel.init",o.onInit),c.off("resize",o.onResize),c.off("keydown",o.onKeydown),(t=c.carousel)===null||t===void 0||t.detachPlugins(["Thumbs"]),o.ref=null}}Object.defineProperty(h0,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:UE});const Op={panLeft:{icon:'<svg><path d="M5 12h14M5 12l6 6M5 12l6-6"/></svg>',change:{panX:-100}},panRight:{icon:'<svg><path d="M5 12h14M13 18l6-6M13 6l6 6"/></svg>',change:{panX:100}},panUp:{icon:'<svg><path d="M12 5v14M18 11l-6-6M6 11l6-6"/></svg>',change:{panY:-100}},panDown:{icon:'<svg><path d="M12 5v14M18 13l-6 6M6 13l6 6"/></svg>',change:{panY:100}},zoomIn:{icon:'<svg><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M11 8v6M8 11h6"/></svg>',action:"zoomIn"},zoomOut:{icon:'<svg><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M8 11h6"/></svg>',action:"zoomOut"},toggle1to1:{icon:'<svg><path d="M3.51 3.07c5.74.02 11.48-.02 17.22.02 1.37.1 2.34 1.64 2.18 3.13 0 4.08.02 8.16 0 12.23-.1 1.54-1.47 2.64-2.79 2.46-5.61-.01-11.24.02-16.86-.01-1.36-.12-2.33-1.65-2.17-3.14 0-4.07-.02-8.16 0-12.23.1-1.36 1.22-2.48 2.42-2.46Z"/><path d="M5.65 8.54h1.49v6.92m8.94-6.92h1.49v6.92M11.5 9.4v.02m0 5.18v0"/></svg>',action:"toggleZoom"},toggleZoom:{icon:'<svg><g><line x1="11" y1="8" x2="11" y2="14"></line></g><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M8 11h6"/></svg>',action:"toggleZoom"},iterateZoom:{icon:'<svg><g><line x1="11" y1="8" x2="11" y2="14"></line></g><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M8 11h6"/></svg>',action:"iterateZoom"},rotateCCW:{icon:'<svg><path d="M15 4.55a8 8 0 0 0-6 14.9M9 15v5H4M18.37 7.16v.01M13 19.94v.01M16.84 18.37v.01M19.37 15.1v.01M19.94 11v.01"/></svg>',action:"rotateCCW"},rotateCW:{icon:'<svg><path d="M9 4.55a8 8 0 0 1 6 14.9M15 15v5h5M5.63 7.16v.01M4.06 11v.01M4.63 15.1v.01M7.16 18.37v.01M11 19.94v.01"/></svg>',action:"rotateCW"},flipX:{icon:'<svg style="stroke-width: 1.3"><path d="M12 3v18M16 7v10h5L16 7M8 7v10H3L8 7"/></svg>',action:"flipX"},flipY:{icon:'<svg style="stroke-width: 1.3"><path d="M3 12h18M7 16h10L7 21v-5M7 8h10L7 3v5"/></svg>',action:"flipY"},fitX:{icon:'<svg><path d="M4 12V6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v6M10 18H3M21 18h-7M6 15l-3 3 3 3M18 15l3 3-3 3"/></svg>',action:"fitX"},fitY:{icon:'<svg><path d="M12 20H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h6M18 14v7M18 3v7M15 18l3 3 3-3M15 6l3-3 3 3"/></svg>',action:"fitY"},reset:{icon:'<svg><path d="M20 11A8.1 8.1 0 0 0 4.5 9M4 5v4h4M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"/></svg>',action:"reset"},toggleFS:{icon:'<svg><g><path d="M14.5 9.5 21 3m0 0h-6m6 0v6M3 21l6.5-6.5M3 21v-6m0 6h6"/></g><g><path d="m14 10 7-7m-7 7h6m-6 0V4M3 21l7-7m0 0v6m0-6H4"/></g></svg>',action:"toggleFS"}};var qo;(function(n){n[n.Init=0]="Init",n[n.Ready=1]="Ready",n[n.Disabled=2]="Disabled"})(qo||(qo={}));const HE={absolute:"auto",display:{left:["infobar"],middle:[],right:["iterateZoom","slideshow","fullscreen","thumbs","close"]},enabled:"auto",items:{infobar:{tpl:'<div class="fancybox__infobar" tabindex="-1"><span data-fancybox-current-index></span>/<span data-fancybox-count></span></div>'},download:{tpl:'<a class="f-button" title="{{DOWNLOAD}}" data-fancybox-download href="javasript:;"><svg><path d="M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2M7 11l5 5 5-5M12 4v12"/></svg></a>'},prev:{tpl:'<button class="f-button" title="{{PREV}}" data-fancybox-prev><svg><path d="m15 6-6 6 6 6"/></svg></button>'},next:{tpl:'<button class="f-button" title="{{NEXT}}" data-fancybox-next><svg><path d="m9 6 6 6-6 6"/></svg></button>'},slideshow:{tpl:'<button class="f-button" title="{{TOGGLE_SLIDESHOW}}" data-fancybox-toggle-slideshow><svg><g><path d="M8 4v16l13 -8z"></path></g><g><path d="M8 4v15M17 4v15"/></g></svg></button>'},fullscreen:{tpl:'<button class="f-button" title="{{TOGGLE_FULLSCREEN}}" data-fancybox-toggle-fullscreen><svg><g><path d="M4 8V6a2 2 0 0 1 2-2h2M4 16v2a2 2 0 0 0 2 2h2M16 4h2a2 2 0 0 1 2 2v2M16 20h2a2 2 0 0 0 2-2v-2"/></g><g><path d="M15 19v-2a2 2 0 0 1 2-2h2M15 5v2a2 2 0 0 0 2 2h2M5 15h2a2 2 0 0 1 2 2v2M5 9h2a2 2 0 0 0 2-2V5"/></g></svg></button>'},thumbs:{tpl:'<button class="f-button" title="{{TOGGLE_THUMBS}}" data-fancybox-toggle-thumbs><svg><circle cx="5.5" cy="5.5" r="1"/><circle cx="12" cy="5.5" r="1"/><circle cx="18.5" cy="5.5" r="1"/><circle cx="5.5" cy="12" r="1"/><circle cx="12" cy="12" r="1"/><circle cx="18.5" cy="12" r="1"/><circle cx="5.5" cy="18.5" r="1"/><circle cx="12" cy="18.5" r="1"/><circle cx="18.5" cy="18.5" r="1"/></svg></button>'},close:{tpl:'<button class="f-button" title="{{CLOSE}}" data-fancybox-close><svg><path d="m19.5 4.5-15 15M4.5 4.5l15 15"/></svg></button>'}},parentEl:null},qE={tabindex:"-1",width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},u0="has-toolbar",Bp="fancybox__toolbar";class d0 extends Vr{constructor(){super(...arguments),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:qo.Init}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null})}onReady(t){var o;if(!t.carousel)return;let c=this.option("display"),d=this.option("absolute"),x=this.option("enabled");if(x==="auto"){const D=this.instance.carousel;let A=0;if(D)for(const z of D.slides)(z.panzoom||z.type==="image")&&A++;A||(x=!1)}x||(c=void 0);let y=0;const h={left:[],middle:[],right:[]};if(c)for(const D of["left","middle","right"])for(const A of c[D]){const z=this.createEl(A);z&&((o=h[D])===null||o===void 0||o.push(z),y++)}let M=null;if(y&&(M=this.createContainer()),M){for(const[D,A]of Object.entries(h)){const z=document.createElement("div");dt(z,Bp+"__column is-"+D);for(const L of A)z.appendChild(L);d!=="auto"||D!=="middle"||A.length||(d=!0),M.appendChild(z)}d===!0&&dt(M,"is-absolute"),this.state=qo.Ready,this.onRefresh()}else this.state=qo.Disabled}onClick(t){var o,c;const d=this.instance,x=d.getSlide(),y=x==null?void 0:x.panzoom,h=t.target,M=h&&Hn(h)?h.dataset:null;if(!M)return;if(M.fancyboxToggleThumbs!==void 0)return t.preventDefault(),t.stopPropagation(),void((o=d.plugins.Thumbs)===null||o===void 0||o.toggle());if(M.fancyboxToggleFullscreen!==void 0)return t.preventDefault(),t.stopPropagation(),void this.instance.toggleFullscreen();if(M.fancyboxToggleSlideshow!==void 0){t.preventDefault(),t.stopPropagation();const z=(c=d.carousel)===null||c===void 0?void 0:c.plugins.Autoplay;let L=z.isActive;return y&&y.panMode==="mousemove"&&!L&&y.reset(),void(L?z.stop():z.start())}const D=M.panzoomAction,A=M.panzoomChange;if((A||D)&&(t.preventDefault(),t.stopPropagation()),A){let z={};try{z=JSON.parse(A)}catch{}y&&y.applyChange(z)}else D&&y&&y[D]&&y[D]()}onChange(){this.onRefresh()}onRefresh(){if(this.instance.isClosing())return;const t=this.container;if(!t)return;const o=this.instance.getSlide();if(!o||o.state!==gn.Ready)return;const c=o&&!o.error&&o.panzoom;for(const y of t.querySelectorAll("[data-panzoom-action]"))c?(y.removeAttribute("disabled"),y.removeAttribute("tabindex")):(y.setAttribute("disabled",""),y.setAttribute("tabindex","-1"));let d=c&&c.canZoomIn(),x=c&&c.canZoomOut();for(const y of t.querySelectorAll('[data-panzoom-action="zoomIn"]'))d?(y.removeAttribute("disabled"),y.removeAttribute("tabindex")):(y.setAttribute("disabled",""),y.setAttribute("tabindex","-1"));for(const y of t.querySelectorAll('[data-panzoom-action="zoomOut"]'))x?(y.removeAttribute("disabled"),y.removeAttribute("tabindex")):(y.setAttribute("disabled",""),y.setAttribute("tabindex","-1"));for(const y of t.querySelectorAll('[data-panzoom-action="toggleZoom"],[data-panzoom-action="iterateZoom"]')){x||d?(y.removeAttribute("disabled"),y.removeAttribute("tabindex")):(y.setAttribute("disabled",""),y.setAttribute("tabindex","-1"));const h=y.querySelector("g");h&&(h.style.display=d?"":"none")}}onDone(t,o){var c;(c=o.panzoom)===null||c===void 0||c.on("afterTransform",()=>{this.instance.isCurrentSlide(o)&&this.onRefresh()}),this.instance.isCurrentSlide(o)&&this.onRefresh()}createContainer(){const t=this.instance.container;if(!t)return null;const o=this.option("parentEl")||t;let c=o.querySelector("."+Bp);return c||(c=document.createElement("div"),dt(c,Bp),o.prepend(c)),c.addEventListener("click",this.onClick,{passive:!1,capture:!0}),t&&dt(t,u0),this.container=c,c}createEl(t){const o=this.instance,c=o.carousel;if(!c||t==="toggleFS"||t==="fullscreen"&&!Zy())return null;let d=null;const x=c.slides.length||0;let y=0,h=0;for(const D of c.slides)(D.panzoom||D.type==="image")&&y++,(D.type==="image"||D.downloadSrc)&&h++;if(x<2&&["infobar","prev","next"].includes(t))return d;if(Op[t]!==void 0&&!y||t==="download"&&!h)return null;if(t==="thumbs"){const D=o.plugins.Thumbs;if(!D||!D.isEnabled)return null}if(t==="slideshow"&&(!c.plugins.Autoplay||x<2))return null;if(Op[t]!==void 0){const D=Op[t];d=document.createElement("button"),d.setAttribute("title",this.instance.localize(`{{${t.toUpperCase()}}}`)),dt(d,"f-button"),D.action&&(d.dataset.panzoomAction=D.action),D.change&&(d.dataset.panzoomChange=JSON.stringify(D.change)),d.appendChild(Qr(this.instance.localize(D.icon)))}else{const D=(this.option("items")||[])[t];D&&(d=Qr(this.instance.localize(D.tpl)),typeof D.click=="function"&&d.addEventListener("click",A=>{A.preventDefault(),A.stopPropagation(),typeof D.click=="function"&&D.click.call(this,this,A)}))}const M=d==null?void 0:d.querySelector("svg");if(M)for(const[D,A]of Object.entries(qE))M.getAttribute(D)||M.setAttribute(D,String(A));return d}removeContainer(){const t=this.container;t&&t.remove(),this.container=null,this.state=qo.Disabled;const o=this.instance.container;o&&ni(o,u0)}attach(){const t=this,o=t.instance;o.on("Carousel.initSlides",t.onReady),o.on("done",t.onDone),o.on(["reveal","Carousel.change"],t.onChange),t.onReady(t.instance)}detach(){const t=this,o=t.instance;o.off("Carousel.initSlides",t.onReady),o.off("done",t.onDone),o.off(["reveal","Carousel.change"],t.onChange),t.removeContainer()}}Object.defineProperty(d0,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:HE});const ZE={Hash:class extends Vr{onReady(){oc=!1}onChange(n){Uo&&clearTimeout(Uo);const{hash:t}=Gy(),{hash:o}=au(),c=n.isOpeningSlide(n.getSlide());c&&(Wy=o===t?"":o),t&&t!==o&&(Uo=setTimeout(()=>{try{if(n.state===Xi.Ready){let d="replaceState";c&&!ou&&(d="pushState",ou=!0),window.history[d]({},document.title,window.location.pathname+window.location.search+t)}}catch{}},300))}onClose(n){if(Uo&&clearTimeout(Uo),!oc&&ou)return ou=!1,oc=!1,void window.history.back();if(!oc)try{window.history.replaceState({},document.title,window.location.pathname+window.location.search+(Wy||""))}catch{}}attach(){const n=this.instance;n.on("ready",this.onReady),n.on(["Carousel.ready","Carousel.change"],this.onChange),n.on("close",this.onClose)}detach(){const n=this.instance;n.off("ready",this.onReady),n.off(["Carousel.ready","Carousel.change"],this.onChange),n.off("close",this.onClose)}static parseURL(){return au()}static startFromUrl(){Yy()}static destroy(){window.removeEventListener("hashchange",Ky,!1)}},Html:i0,Images:Qy,Slideshow:r0,Thumbs:h0,Toolbar:d0},p0="with-fancybox",Fp="hide-scrollbar",f0="--fancybox-scrollbar-compensate",m0="--fancybox-body-margin",Np="aria-hidden",Vp="is-using-tab",$p="is-animated",g0="is-compact",y0="is-loading",jp="is-opening",du="has-caption",ja="disabled",Zo="tabindex",_0="download",Up="href",Ua="src",Ks=n=>typeof n=="string",x0=function(){var n=window.getSelection();return!!n&&n.type==="Range"};let wr,kr=null,Wo=null,b0=0,v0=0,w0=0,k0=0;const Ha=new Map;let WE=0;class Xt extends Tp{get isIdle(){return this.idle}get isCompact(){return this.option("compact")}constructor(t=[],o={},c={}){super(o),Object.defineProperty(this,"userSlides",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"userPlugins",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"idle",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"idleTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"clickTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"pwt",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"ignoreFocusChange",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"startedFs",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:Xi.Init}),Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"footer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"carousel",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"lastFocus",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"prevMouseMoveEvent",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),wr||(wr=Zy()),this.id=o.id||++WE,Ha.set(this.id,this),this.userSlides=t,this.userPlugins=c,queueMicrotask(()=>{this.init()})}init(){if(this.state===Xi.Destroy)return;this.state=Xi.Init,this.attachPlugins(Object.assign(Object.assign({},Xt.Plugins),this.userPlugins)),this.emit("init"),this.emit("attachPlugins"),this.option("hideScrollbar")===!0&&(()=>{if(!sc)return;const o=document,c=o.body,d=o.documentElement;if(c.classList.contains(Fp))return;let x=window.innerWidth-d.getBoundingClientRect().width;const y=parseFloat(window.getComputedStyle(c).marginRight);x<0&&(x=0),d.style.setProperty(f0,`${x}px`),y&&c.style.setProperty(m0,`${y}px`),c.classList.add(Fp)})(),this.initLayout(),this.scale();const t=()=>{this.initCarousel(this.userSlides),this.state=Xi.Ready,this.attachEvents(),this.emit("ready"),setTimeout(()=>{this.container&&this.container.setAttribute(Np,"false")},16)};this.option("Fullscreen.autoStart")&&wr&&!wr.isFullscreen()?wr.request().then(()=>{this.startedFs=!0,t()}).catch(()=>t()):t()}initLayout(){var t,o;const c=this.option("parentEl")||document.body,d=Qr(this.localize(this.option("tpl.main")||""));if(d){if(d.setAttribute("id",`fancybox-${this.id}`),d.setAttribute("aria-label",this.localize("{{MODAL}}")),d.classList.toggle(g0,this.isCompact),dt(d,this.option("mainClass")||""),dt(d,jp),this.container=d,this.footer=d.querySelector(".fancybox__footer"),c.appendChild(d),dt(document.documentElement,p0),kr&&Wo||(kr=document.createElement("span"),dt(kr,"fancybox-focus-guard"),kr.setAttribute(Zo,"0"),kr.setAttribute(Np,"true"),kr.setAttribute("aria-label","Focus guard"),Wo=kr.cloneNode(),(t=d.parentElement)===null||t===void 0||t.insertBefore(kr,d),(o=d.parentElement)===null||o===void 0||o.append(Wo)),d.addEventListener("mousedown",x=>{b0=x.pageX,v0=x.pageY,ni(d,Vp)}),this.option("closeExisting"))for(const x of Ha.values())x.id!==this.id&&x.close();else this.option("animated")&&(dt(d,$p),setTimeout(()=>{this.isClosing()||ni(d,$p)},350));this.emit("initLayout")}}initCarousel(t){const o=this.container;if(!o)return;const c=o.querySelector(".fancybox__carousel");if(!c)return;const d=this.carousel=new jo(c,Un({},{slides:t,transition:"fade",Panzoom:{lockAxis:this.option("dragToClose")?"xy":"x",infinite:!!this.option("dragToClose")&&"y"},Dots:!1,Navigation:{classes:{container:"fancybox__nav",button:"f-button",isNext:"is-next",isPrev:"is-prev"}},initialPage:this.option("startIndex"),l10n:this.option("l10n")},this.option("Carousel")||{}));d.on("*",(x,y,...h)=>{this.emit(`Carousel.${y}`,x,...h)}),d.on(["ready","change"],()=>{this.manageCaption()}),this.on("Carousel.removeSlide",(x,y,h)=>{this.clearContent(h),h.state=void 0}),d.on("Panzoom.touchStart",()=>{var x,y;this.isCompact||this.endIdle(),!((x=document.activeElement)===null||x===void 0)&&x.closest(".f-thumbs")&&((y=this.container)===null||y===void 0||y.focus())}),d.on("settle",()=>{this.idleTimer||this.isCompact||!this.option("idle")||this.setIdle(),this.option("autoFocus")&&!this.isClosing&&this.checkFocus()}),this.option("dragToClose")&&(d.on("Panzoom.afterTransform",(x,y)=>{const h=this.getSlide();if(h&&wp(h.el))return;const M=this.container;if(M){const D=Math.abs(y.current.f),A=D<1?"":Math.max(.5,Math.min(1,1-D/y.contentRect.fitHeight*1.5));M.style.setProperty("--fancybox-ts",A?"0s":""),M.style.setProperty("--fancybox-opacity",A+"")}}),d.on("Panzoom.touchEnd",(x,y,h)=>{var M;const D=this.getSlide();if(D&&wp(D.el)||y.isMobile&&document.activeElement&&["TEXTAREA","INPUT"].indexOf((M=document.activeElement)===null||M===void 0?void 0:M.nodeName)!==-1)return;const A=Math.abs(y.dragOffset.y);y.lockedAxis==="y"&&(A>=200||A>=50&&y.dragOffset.time<300)&&(h&&h.cancelable&&h.preventDefault(),this.close(h,"f-throwOut"+(y.current.f<0?"Up":"Down")))})),d.on("change",x=>{var y;let h=(y=this.getSlide())===null||y===void 0?void 0:y.triggerEl;if(h){const M=new CustomEvent("slideTo",{bubbles:!0,cancelable:!0,detail:x.page});h.dispatchEvent(M)}}),d.on(["refresh","change"],x=>{const y=this.container;if(!y)return;for(const D of y.querySelectorAll("[data-fancybox-current-index]"))D.innerHTML=x.page+1;for(const D of y.querySelectorAll("[data-fancybox-count]"))D.innerHTML=x.pages.length;if(!x.isInfinite){for(const D of y.querySelectorAll("[data-fancybox-next]"))x.page<x.pages.length-1?(D.removeAttribute(ja),D.removeAttribute(Zo)):(D.setAttribute(ja,""),D.setAttribute(Zo,"-1"));for(const D of y.querySelectorAll("[data-fancybox-prev]"))x.page>0?(D.removeAttribute(ja),D.removeAttribute(Zo)):(D.setAttribute(ja,""),D.setAttribute(Zo,"-1"))}const h=this.getSlide();if(!h)return;let M=h.downloadSrc||"";M||h.type!=="image"||h.error||!Ks(h[Ua])||(M=h[Ua]);for(const D of y.querySelectorAll("[data-fancybox-download]")){const A=h.downloadFilename;M?(D.removeAttribute(ja),D.removeAttribute(Zo),D.setAttribute(Up,M),D.setAttribute(_0,A||M),D.setAttribute("target","_blank")):(D.setAttribute(ja,""),D.setAttribute(Zo,"-1"),D.removeAttribute(Up),D.removeAttribute(_0))}}),this.emit("initCarousel")}attachEvents(){const t=this,o=t.container;if(!o)return;o.addEventListener("click",t.onClick,{passive:!1,capture:!1}),o.addEventListener("wheel",t.onWheel,{passive:!1,capture:!1}),document.addEventListener("keydown",t.onKeydown,{passive:!1,capture:!0}),document.addEventListener("visibilitychange",t.onVisibilityChange,!1),document.addEventListener("mousemove",t.onMousemove),t.option("trapFocus")&&document.addEventListener("focus",t.onFocus,!0),window.addEventListener("resize",t.onResize);const c=window.visualViewport;c&&(c.addEventListener("scroll",t.onResize),c.addEventListener("resize",t.onResize))}detachEvents(){const t=this,o=t.container;if(!o)return;document.removeEventListener("keydown",t.onKeydown,{passive:!1,capture:!0}),o.removeEventListener("wheel",t.onWheel,{passive:!1,capture:!1}),o.removeEventListener("click",t.onClick,{passive:!1,capture:!1}),document.removeEventListener("mousemove",t.onMousemove),window.removeEventListener("resize",t.onResize);const c=window.visualViewport;c&&(c.removeEventListener("resize",t.onResize),c.removeEventListener("scroll",t.onResize)),document.removeEventListener("visibilitychange",t.onVisibilityChange,!1),document.removeEventListener("focus",t.onFocus,!0)}scale(){const t=this.container;if(!t)return;const o=window.visualViewport,c=Math.max(1,(o==null?void 0:o.scale)||1);let d="",x="",y="";if(o&&c>1){let h=`${o.offsetLeft}px`,M=`${o.offsetTop}px`;d=o.width*c+"px",x=o.height*c+"px",y=`translate3d(${h}, ${M}, 0) scale(${1/c})`}t.style.transform=y,t.style.width=d,t.style.height=x}onClick(t){var o;const{container:c,isCompact:d}=this;if(!c||this.isClosing())return;!d&&this.option("idle")&&this.resetIdle();const x=t.composedPath()[0];if(x.closest(".fancybox-spinner")||x.closest("[data-fancybox-close]"))return t.preventDefault(),void this.close(t);if(x.closest("[data-fancybox-prev]"))return t.preventDefault(),void this.prev();if(x.closest("[data-fancybox-next]"))return t.preventDefault(),void this.next();if(t.type==="click"&&t.detail===0||Math.abs(t.pageX-b0)>30||Math.abs(t.pageY-v0)>30)return;const y=document.activeElement;if(x0()&&y&&c.contains(y))return;if(d&&((o=this.getSlide())===null||o===void 0?void 0:o.type)==="image")return void(this.clickTimer?(clearTimeout(this.clickTimer),this.clickTimer=null):this.clickTimer=setTimeout(()=>{this.toggleIdle(),this.clickTimer=null},350));if(this.emit("click",t),t.defaultPrevented)return;let h=!1;if(x.closest(".fancybox__content")){if(y){if(y.closest("[contenteditable]"))return;x.matches(Dp)||y.blur()}if(x0())return;h=this.option("contentClick")}else x.closest(".fancybox__carousel")&&!x.matches(Dp)&&(h=this.option("backdropClick"));h==="close"?(t.preventDefault(),this.close(t)):h==="next"?(t.preventDefault(),this.next()):h==="prev"&&(t.preventDefault(),this.prev())}onWheel(t){const o=t.target;let c=this.option("wheel",t);o.closest(".fancybox__thumbs")&&(c="slide");const d=c==="slide",x=[-t.deltaX||0,-t.deltaY||0,-t.detail||0].reduce(function(M,D){return Math.abs(D)>Math.abs(M)?D:M}),y=Math.max(-1,Math.min(1,x)),h=Date.now();this.pwt&&h-this.pwt<300?d&&t.preventDefault():(this.pwt=h,this.emit("wheel",t,y),t.defaultPrevented||(c==="close"?(t.preventDefault(),this.close(t)):c==="slide"&&(Jh(o)||(t.preventDefault(),this[y>0?"prev":"next"]()))))}onScroll(){window.scrollTo(w0,k0)}onKeydown(t){if(!this.isTopmost())return;this.isCompact||!this.option("idle")||this.isClosing()||this.resetIdle();const o=t.key,c=this.option("keyboard");if(!c)return;const d=t.composedPath()[0],x=document.activeElement&&document.activeElement.classList,y=x&&x.contains("f-button")||d.dataset.carouselPage||d.dataset.carouselIndex;if(o!=="Escape"&&!y&&Hn(d)&&(d.isContentEditable||["TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].indexOf(d.nodeName)!==-1)||(t.key==="Tab"?dt(this.container,Vp):ni(this.container,Vp),t.ctrlKey||t.altKey||t.shiftKey))return;this.emit("keydown",o,t);const h=c[o];h&&typeof this[h]=="function"&&(t.preventDefault(),this[h]())}onResize(){const t=this.container;if(!t)return;const o=this.isCompact;t.classList.toggle(g0,o),this.manageCaption(this.getSlide()),this.isCompact?this.clearIdle():this.endIdle(),this.scale(),this.emit("resize")}onFocus(t){this.isTopmost()&&this.checkFocus(t)}onMousemove(t){this.prevMouseMoveEvent=t,!this.isCompact&&this.option("idle")&&this.resetIdle()}onVisibilityChange(){document.visibilityState==="visible"?this.checkFocus():this.endIdle()}manageCloseBtn(t){const o=this.optionFor(t,"closeButton")||!1;if(o==="auto"){const d=this.plugins.Toolbar;if(d&&d.state===qo.Ready)return}if(!o||!t.contentEl||t.closeBtnEl)return;const c=this.option("tpl.closeButton");if(c){const d=Qr(this.localize(c));t.closeBtnEl=t.contentEl.appendChild(d),t.el&&dt(t.el,"has-close-btn")}}manageCaption(t=void 0){var o,c;const d="fancybox__caption",x=this.container;if(!x)return;ni(x,du);const y=this.isCompact||this.option("commonCaption"),h=!y;if(this.caption&&this.stop(this.caption),h&&this.caption&&(this.caption.remove(),this.caption=null),y&&!this.caption)for(const z of((o=this.carousel)===null||o===void 0?void 0:o.slides)||[])z.captionEl&&(z.captionEl.remove(),z.captionEl=void 0,ni(z.el,du),(c=z.el)===null||c===void 0||c.removeAttribute("aria-labelledby"));if(t||(t=this.getSlide()),!t||y&&!this.isCurrentSlide(t))return;const M=t.el;let D=this.optionFor(t,"caption","");if(!D)return void(y&&this.caption&&this.animate(this.caption,"f-fadeOut",()=>{this.caption&&(this.caption.innerHTML="")}));let A=null;if(h){if(A=t.captionEl||null,M&&!A){const z=d+`_${this.id}_${t.index}`;A=document.createElement("div"),dt(A,d),A.setAttribute("id",z),t.captionEl=M.appendChild(A),dt(M,du),M.setAttribute("aria-labelledby",z)}}else A=this.caption,A||(A=x.querySelector("."+d)),!A&&(A=document.createElement("div"),A.dataset.fancyboxCaption="",dt(A,d),(this.footer||x).prepend(A)),dt(x,du),this.caption=A;A&&(A.innerHTML="",Ks(D)||typeof D=="number"?A.innerHTML=D+"":D instanceof HTMLElement&&A.appendChild(D))}checkFocus(t){this.focus(t)}focus(t){var o;if(this.ignoreFocusChange)return;const c=document.activeElement||null,d=(t==null?void 0:t.target)||null,x=this.container,y=(o=this.carousel)===null||o===void 0?void 0:o.viewport;if(!x||!y||!t&&c&&x.contains(c))return;const h=this.getSlide(),M=h&&h.state===gn.Ready?h.el:null;if(!M||M.contains(c)||x===c)return;t&&t.cancelable&&t.preventDefault(),this.ignoreFocusChange=!0;const D=Array.from(x.querySelectorAll(Dp));let A=[],z=null;for(let N of D){const Y=!N.offsetParent||!!N.closest('[aria-hidden="true"]'),ee=M&&M.contains(N),oe=!y.contains(N);if(N===x||(ee||oe)&&!Y){A.push(N);const he=N.dataset.origTabindex;he!==void 0&&he&&(N.tabIndex=parseFloat(he)),N.removeAttribute("data-orig-tabindex"),!N.hasAttribute("autoFocus")&&z||(z=N)}else{const he=N.dataset.origTabindex===void 0?N.getAttribute("tabindex")||"":N.dataset.origTabindex;he&&(N.dataset.origTabindex=he),N.tabIndex=-1}}let L=null;t?(!d||A.indexOf(d)<0)&&(L=z||x,A.length&&(c===Wo?L=A[0]:this.lastFocus!==x&&c!==kr||(L=A[A.length-1]))):L=h&&h.type==="image"?x:z||x,L&&qy(L),this.lastFocus=document.activeElement,this.ignoreFocusChange=!1}next(){const t=this.carousel;t&&t.pages.length>1&&t.slideNext()}prev(){const t=this.carousel;t&&t.pages.length>1&&t.slidePrev()}jumpTo(...t){this.carousel&&this.carousel.slideTo(...t)}isTopmost(){var t;return((t=Xt.getInstance())===null||t===void 0?void 0:t.id)==this.id}animate(t=null,o="",c){if(!t||!o)return void(c&&c());this.stop(t);const d=x=>{x.target===t&&t.dataset.animationName&&(t.removeEventListener("animationend",d),delete t.dataset.animationName,c&&c(),ni(t,o))};t.dataset.animationName=o,t.addEventListener("animationend",d),dt(t,o)}stop(t){t&&t.dispatchEvent(new CustomEvent("animationend",{bubbles:!1,cancelable:!0,currentTarget:t}))}setContent(t,o="",c=!0){if(this.isClosing())return;const d=t.el;if(!d)return;let x=null;if(Hn(o)?x=o:(x=Qr(o+""),Hn(x)||(x=document.createElement("div"),x.innerHTML=o+"")),["img","picture","iframe","video","audio"].includes(x.nodeName.toLowerCase())){const y=document.createElement("div");y.appendChild(x),x=y}Hn(x)&&t.filter&&!t.error&&(x=x.querySelector(t.filter)),x&&Hn(x)?(dt(x,"fancybox__content"),t.id&&x.setAttribute("id",t.id),d.classList.add(`has-${t.error?"error":t.type||"unknown"}`),d.prepend(x),x.style.display==="none"&&(x.style.display=""),getComputedStyle(x).getPropertyValue("display")==="none"&&(x.style.display=t.display||this.option("defaultDisplay")||"flex"),t.contentEl=x,c&&this.revealContent(t),this.manageCloseBtn(t),this.manageCaption(t)):this.setError(t,"{{ELEMENT_NOT_FOUND}}")}revealContent(t,o){const c=t.el,d=t.contentEl;c&&d&&(this.emit("reveal",t),this.hideLoading(t),t.state=gn.Opening,(o=this.isOpeningSlide(t)?o===void 0?this.optionFor(t,"showClass"):o:"f-fadeIn")?this.animate(d,o,()=>{this.done(t)}):this.done(t))}done(t){this.isClosing()||(t.state=gn.Ready,this.emit("done",t),dt(t.el,"is-done"),this.isCurrentSlide(t)&&this.option("autoFocus")&&queueMicrotask(()=>{var o;(o=t.panzoom)===null||o===void 0||o.updateControls(),this.option("autoFocus")&&this.focus()}),this.isOpeningSlide(t)&&(ni(this.container,jp),!this.isCompact&&this.option("idle")&&this.setIdle()))}isCurrentSlide(t){const o=this.getSlide();return!(!t||!o)&&o.index===t.index}isOpeningSlide(t){var o,c;return((o=this.carousel)===null||o===void 0?void 0:o.prevPage)===null&&t&&t.index===((c=this.getSlide())===null||c===void 0?void 0:c.index)}showLoading(t){t.state=gn.Loading;const o=t.el;o&&(dt(o,y0),this.emit("loading",t),t.spinnerEl||setTimeout(()=>{if(!this.isClosing()&&!t.spinnerEl&&t.state===gn.Loading){let c=Qr(Cp);dt(c,"fancybox-spinner"),t.spinnerEl=c,o.prepend(c),this.animate(c,"f-fadeIn")}},250))}hideLoading(t){const o=t.el;if(!o)return;const c=t.spinnerEl;this.isClosing()?c==null||c.remove():(ni(o,y0),c&&this.animate(c,"f-fadeOut",()=>{c.remove()}),t.state===gn.Loading&&(this.emit("loaded",t),t.state=gn.Ready))}setError(t,o){if(this.isClosing())return;const c=new Event("error",{bubbles:!0,cancelable:!0});if(this.emit("error",c,t),c.defaultPrevented)return;t.error=o,this.hideLoading(t),this.clearContent(t);const d=document.createElement("div");d.classList.add("fancybox-error"),d.innerHTML=this.localize(o||"<p>{{ERROR}}</p>"),this.setContent(t,d)}clearContent(t){if(t.state===void 0)return;this.emit("clearContent",t),t.contentEl&&(t.contentEl.remove(),t.contentEl=void 0);const o=t.el;o&&(ni(o,"has-error"),ni(o,"has-unknown"),ni(o,`has-${t.type||"unknown"}`)),t.closeBtnEl&&t.closeBtnEl.remove(),t.closeBtnEl=void 0,t.captionEl&&t.captionEl.remove(),t.captionEl=void 0,t.spinnerEl&&t.spinnerEl.remove(),t.spinnerEl=void 0}getSlide(){var t;const o=this.carousel;return((t=o==null?void 0:o.pages[o==null?void 0:o.page])===null||t===void 0?void 0:t.slides[0])||void 0}close(t,o){if(this.isClosing())return;const c=new Event("shouldClose",{bubbles:!0,cancelable:!0});if(this.emit("shouldClose",c,t),c.defaultPrevented)return;t&&t.cancelable&&(t.preventDefault(),t.stopPropagation());const d=()=>{this.proceedClose(t,o)};this.startedFs&&wr&&wr.isFullscreen()?Promise.resolve(wr.exit()).then(()=>d()):d()}clearIdle(){this.idleTimer&&clearTimeout(this.idleTimer),this.idleTimer=null}setIdle(t=!1){const o=()=>{this.clearIdle(),this.idle=!0,dt(this.container,"is-idle"),this.emit("setIdle")};if(this.clearIdle(),!this.isClosing())if(t)o();else{const c=this.option("idle");c&&(this.idleTimer=setTimeout(o,c))}}endIdle(){this.clearIdle(),this.idle&&!this.isClosing()&&(this.idle=!1,ni(this.container,"is-idle"),this.emit("endIdle"))}resetIdle(){this.endIdle(),this.setIdle()}toggleIdle(){this.idle?this.endIdle():this.setIdle(!0)}toggleFullscreen(){wr&&(wr.isFullscreen()?wr.exit():wr.request().then(()=>{this.startedFs=!0}))}isClosing(){return[Xi.Closing,Xi.CustomClosing,Xi.Destroy].includes(this.state)}proceedClose(t,o){var c,d;this.state=Xi.Closing,this.clearIdle(),this.detachEvents();const x=this.container,y=this.carousel,h=this.getSlide(),M=h&&this.option("placeFocusBack")?h.triggerEl||this.option("triggerEl"):null;if(M&&(Hy(M)?qy(M):M.focus()),x&&(ni(x,jp),dt(x,"is-closing"),x.setAttribute(Np,"true"),this.option("animated")&&dt(x,$p),x.style.pointerEvents="none"),y){y.clearTransitions(),(c=y.panzoom)===null||c===void 0||c.destroy(),(d=y.plugins.Navigation)===null||d===void 0||d.detach();for(const D of y.slides){D.state=gn.Closing,this.hideLoading(D);const A=D.contentEl;A&&this.stop(A);const z=D==null?void 0:D.panzoom;z&&(z.stop(),z.detachEvents(),z.detachObserver()),this.isCurrentSlide(D)||y.emit("removeSlide",D)}}w0=window.scrollX,k0=window.scrollY,window.addEventListener("scroll",this.onScroll),this.emit("close",t),this.state!==Xi.CustomClosing?(o===void 0&&h&&(o=this.optionFor(h,"hideClass")),o&&h?(this.animate(h.contentEl,o,()=>{y&&y.emit("removeSlide",h)}),setTimeout(()=>{this.destroy()},500)):this.destroy()):setTimeout(()=>{this.destroy()},500)}destroy(){var t;if(this.state===Xi.Destroy)return;window.removeEventListener("scroll",this.onScroll),this.state=Xi.Destroy,(t=this.carousel)===null||t===void 0||t.destroy();const o=this.container;o&&o.remove(),Ha.delete(this.id);const c=Xt.getInstance();c?c.focus():(kr&&(kr.remove(),kr=null),Wo&&(Wo.remove(),Wo=null),ni(document.documentElement,p0),(()=>{if(!sc)return;const d=document,x=d.body;x.classList.remove(Fp),x.style.setProperty(m0,""),d.documentElement.style.setProperty(f0,"")})(),this.emit("destroy"))}static bind(t,o,c){if(!sc)return;let d,x="",y={};if(t===void 0?d=document.body:Ks(t)?(d=document.body,x=t,typeof o=="object"&&(y=o||{})):(d=t,Ks(o)&&(x=o),typeof c=="object"&&(y=c||{})),!d||!Hn(d))return;x=x||"[data-fancybox]";const h=Xt.openers.get(d)||new Map;h.set(x,y),Xt.openers.set(d,h),h.size===1&&d.addEventListener("click",Xt.fromEvent)}static unbind(t,o){let c,d="";if(Ks(t)?(c=document.body,d=t):(c=t,Ks(o)&&(d=o)),!c)return;const x=Xt.openers.get(c);x&&d&&x.delete(d),d&&x||(Xt.openers.delete(c),c.removeEventListener("click",Xt.fromEvent))}static destroy(){let t;for(;t=Xt.getInstance();)t.destroy();for(const o of Xt.openers.keys())o.removeEventListener("click",Xt.fromEvent);Xt.openers=new Map}static fromEvent(t){if(t.defaultPrevented||t.button&&t.button!==0||t.ctrlKey||t.metaKey||t.shiftKey)return;let o=t.composedPath()[0];const c=o.closest("[data-fancybox-trigger]");if(c){const Y=c.dataset.fancyboxTrigger||"",ee=document.querySelectorAll(`[data-fancybox="${Y}"]`),oe=parseInt(c.dataset.fancyboxIndex||"",10)||0;o=ee[oe]||o}if(!(o&&o instanceof Element))return;let d,x,y,h;if([...Xt.openers].reverse().find(([Y,ee])=>!(!Y.contains(o)||![...ee].reverse().find(([oe,he])=>{let _e=o.closest(oe);return!!_e&&(d=Y,x=oe,y=_e,h=he,!0)}))),!d||!x||!y)return;h=h||{},t.preventDefault(),o=y;let M=[],D=Un({},zp,h);D.event=t,D.triggerEl=o,D.delegate=c;const A=D.groupAll,z=D.groupAttr,L=z&&o?o.getAttribute(`${z}`):"";if((!o||L||A)&&(M=[].slice.call(d.querySelectorAll(x))),o&&!A&&(M=L?M.filter(Y=>Y.getAttribute(`${z}`)===L):[o]),!M.length)return;const N=Xt.getInstance();return N&&N.options.triggerEl&&M.indexOf(N.options.triggerEl)>-1?void 0:(o&&(D.startIndex=M.indexOf(o)),Xt.fromNodes(M,D))}static fromSelector(t,o,c){let d=null,x="",y={};if(Ks(t)?(d=document.body,x=t,typeof o=="object"&&(y=o||{})):t instanceof HTMLElement&&Ks(o)&&(d=t,x=o,typeof c=="object"&&(y=c||{})),!d||!x)return!1;const h=Xt.openers.get(d);return!!h&&(y=Un({},h.get(x)||{},y),!!y&&Xt.fromNodes(Array.from(d.querySelectorAll(x)),y))}static fromNodes(t,o){o=Un({},zp,o||{});const c=[];for(const d of t){const x=d.dataset||{},y=x[Ua]||d.getAttribute(Up)||d.getAttribute("currentSrc")||d.getAttribute(Ua)||void 0;let h;const M=o.delegate;let D;M&&c.length===o.startIndex&&(h=M instanceof HTMLImageElement?M:M.querySelector("img:not([aria-hidden])")),h||(h=d instanceof HTMLImageElement?d:d.querySelector("img:not([aria-hidden])")),h&&(D=h.currentSrc||h[Ua]||void 0,!D&&h.dataset&&(D=h.dataset.lazySrc||h.dataset[Ua]||void 0));const A={src:y,triggerEl:d,thumbEl:h,thumbElSrc:D,thumbSrc:D};for(const z in x){let L=x[z]+"";L=L!=="false"&&(L==="true"||L),A[z]=L}c.push(A)}return new Xt(c,o)}static getInstance(t){return t?Ha.get(t):Array.from(Ha.values()).reverse().find(o=>!o.isClosing()&&o)||null}static getSlide(){var t;return((t=Xt.getInstance())===null||t===void 0?void 0:t.getSlide())||null}static show(t=[],o={}){return new Xt(t,o)}static next(){const t=Xt.getInstance();t&&t.next()}static prev(){const t=Xt.getInstance();t&&t.prev()}static close(t=!0,...o){if(t)for(const c of Ha.values())c.close(...o);else{const c=Xt.getInstance();c&&c.close(...o)}}}Object.defineProperty(Xt,"version",{enumerable:!0,configurable:!0,writable:!0,value:"5.0.36"}),Object.defineProperty(Xt,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:zp}),Object.defineProperty(Xt,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:ZE}),Object.defineProperty(Xt,"openers",{enumerable:!0,configurable:!0,writable:!0,value:new Map});const GE={props:{options:Object},mounted(){(void 0)(this.$refs.container,"[data-fancybox]",{...this.options||{}})},updated(){(void 0)(this.$refs.container),(void 0)(),(void 0)(this.$refs.container,"[data-fancybox]",{...this.options||{}})},unmounted(){(void 0)()}},YE={ref:"container"};function XE(n,t,o,c,d,x){return v.openBlock(),v.createElementBlock("div",YE,[v.renderSlot(n.$slots,"default")],512)}const KE=vt(GE,[["render",XE]]),JE={props:["text"]},QE={class:"pl-3 text-sm font-medium text-gray-600"};function eT(n,t,o,c,d,x){return v.openBlock(),v.createElementBlock("div",null,[v.createElementVNode("p",QE,v.toDisplayString(o.text),1)])}const tT={components:{Fancybox:KE,VsEmptyWidget:vt(JE,[["render",eT]])},props:{id:{type:String,default:""},readonly:{type:Boolean,default:!1},prefilledData:{type:Array,default:()=>null}},data(){return{carouselOptions:{Carousel:{infinite:!1}},isModalVisible:!1,modal:{},images:[],editAction:!1,selectedFile:null,imageExtensions:["png","jpg","jpeg","gif"]}},watch:{id(){this.getFiles()}},mounted(){this.getFiles()},methods:{async downloadFile(n){const t=document.createElement("a");t.setAttribute("download",n.uploaded_name),t.href=n.file_path,t.click()},handleOpenModal(n){this.selectedFile=n,this.modal=this.prepareModal({title:"Ви впевнені?",message:"Ви впевнені, що хочете видалити це зображення?",confirmButtonText:"Так, я впевнена/ий",cancelButtonText:"Скасувати",confirm:this.deleteFile,updateListOnConfirm:!0}),this.isModalVisible=!0},prepareModal(n){const t={...n};return n.cancel||(t.cancel=()=>{this.isModalVisible=!1}),n.updateListOnConfirm&&(t.confirm=async()=>{await n.confirm(),this.isModalVisible=!1,this.getFiles()}),t},async deleteFile(){try{await mt.delete(`/api/widget/gallery/${this.selectedFile.entity_id}/${this.selectedFile.file_id}`),this.isModalVisible=!1,this.selectedFile="",this.$emit("update","images"),this.getFiles()}catch(n){console.log(n)}},async addFile(n){console.log(n),await Promise.all(Array.from(n.target.files).map(async t=>{const o=new FormData;o.append("file",t);try{const c=`/api/widget/file/${this.id}`;return await mt.post(c,o),this.$emit("update","file-list"),t}catch(c){return console.error(c),null}})),await this.getFiles()},async getFiles(){if(this.prefilledData){this.images=this.prefilledData;return}try{const{data:n}=await mt.get(`/api/widget/gallery/${this.id}`);this.images=n.rows}catch(n){console.error(n)}},size(n,t=2){if(n===0)return"0 Bytes";const o=1024,c=t<0?0:t,d=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],x=Math.floor(Math.log(n)/Math.log(o));return`${parseFloat((n/o**x).toFixed(c))} ${d[x]}`},dateFormat(n){const t={day:"numeric",month:"long",year:"numeric",hour:"numeric",minute:"numeric"};return new Date(n).toLocaleDateString("uk-UK",t)}}},iT={class:"vs-widget-images flex flex-col xl:bg-white xl:rounded-xl dark:xl:bg-neutral-800 dark:xl:border-neutral-700"},nT={class:"flex justify-between items-center gap-x-2 mb-4"},rT={class:"flex justify-end items-center gap-x-2"},sT=["href"],oT=["src","alt"],aT={class:"item__text-content bg-white opacity-0 rounded-b-lg absolute w-full bottom-0 p-3 flex gap-2.5 items-center justify-between"},lT={class:"text-xs"},cT={class:"widget-images__item-desc flex items-center text-xs text-gray-600 flex-wrap"},hT={class:"flex items-center"},uT={class:"text-xs"},dT=["onClick"],pT=["onClick"],fT={class:"p-4"},mT={class:"mt-1 text-gray-500 dark:text-neutral-500"},gT={class:"mt-4 flex justify-end gap-x-3"};function yT(n,t,o,c,d,x){var D;const y=v.resolveComponent("Fancybox"),h=v.resolveComponent("VsEmptyWidget"),M=v.resolveComponent("VsDialog");return v.openBlock(),v.createElementBlock("div",iT,[v.createElementVNode("div",nT,[t[5]||(t[5]=v.createElementVNode("h2",{class:"inline-block font-semibold text-gray-800 dark:text-neutral-200"}," Зображення ",-1)),v.createElementVNode("div",rT,[v.createElementVNode("div",null,[v.createElementVNode("label",null,[v.createElementVNode("input",{type:"file",class:"hidden",onChange:t[0]||(t[0]=A=>x.addFile(A))},null,32),t[4]||(t[4]=v.createElementVNode("div",{class:"py-2 px-2.5 inline-flex relative items-center gap-x-1.5 text-xs rounded-lg border border-blue-200 bg-blue-500 text-white shadow-sm hover:bg-blue-700 cursor-pointer"},[v.createElementVNode("i",{class:"ti ti-upload"}),v.createTextVNode(" Завантажити файл ")],-1))])])])]),(D=d.images)!=null&&D.length?(v.openBlock(),v.createBlock(y,{key:0,options:d.carouselOptions,class:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4"},{default:v.withCtx(()=>[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(d.images,A=>(v.openBlock(),v.createElementBlock("div",{key:A.file_path,class:"relative cursor-pointer rounded-b-lg item hover:shadow-lg h-[200px]"},[v.createElementVNode("a",{"data-fancybox":"gallery",href:A.file_path},[v.createElementVNode("img",{class:"h-full w-full rounded-lg",src:A.file_path||"/icons/no-image.jpg",alt:A.uploaded_name,width:"100%",height:"100%"},null,8,oT),v.createElementVNode("div",aT,[v.createElementVNode("div",null,[v.createElementVNode("span",lT,v.toDisplayString(A.uploaded_name),1),v.createElementVNode("div",cT,[v.createElementVNode("span",hT,v.toDisplayString(x.size(A.size)),1),v.createElementVNode("span",null,v.toDisplayString(x.dateFormat(A.cdate)),1)]),v.createElementVNode("span",uT,v.toDisplayString(A.username),1)]),v.createElementVNode("div",null,[v.createElementVNode("div",{class:v.normalizeClass(["flex items-center justify-center gap-2 hover:bg-gray-200 p-1 rounded",{disabled:o.readonly,"hover:cursor-pointer":!o.readonly}]),onClick:v.withModifiers(z=>x.downloadFile(A),["prevent"])},t[6]||(t[6]=[v.createElementVNode("i",{class:"ti ti-edit"},null,-1)]),10,dT),v.createElementVNode("div",{class:"flex items-center gap-2 hover:bg-gray-200 p-1 rounded hover:cursor-pointer",onClick:v.withModifiers(z=>x.handleOpenModal(A),["prevent"])},t[7]||(t[7]=[v.createElementVNode("i",{class:"ti ti-trash"},null,-1)]),8,pT)])])],8,sT)]))),128))]),_:1},8,["options"])):(v.openBlock(),v.createBlock(h,{key:1,text:"Зображення відсутні"})),v.createVNode(M,{title:d.modal.title,size:"small",visible:d.isModalVisible,"onUpdate:visible":t[3]||(t[3]=A=>d.isModalVisible=A)},{default:v.withCtx(()=>[v.createElementVNode("div",fT,[v.createElementVNode("p",mT,v.toDisplayString(d.modal.message),1),v.createElementVNode("div",gT,[v.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm 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",onClick:t[1]||(t[1]=(...A)=>d.modal.cancel&&d.modal.cancel(...A))},v.toDisplayString(d.modal.cancelButtonText),1),v.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm font-semibold rounded-lg border border-transparent bg-red-500 text-white hover:bg-red-600 disabled:opacity-50 disabled:pointer-events-none",onClick:t[2]||(t[2]=(...A)=>d.modal.confirm&&d.modal.confirm(...A))},v.toDisplayString(d.modal.confirmButtonText),1)])])]),_:1},8,["title","visible"])])}const _T=vt(tT,[["render",yT]]),xT=n=>{const t=/(\b\S)?/g,o=n.match(t);return o?o.join("").toUpperCase():""},bT={props:{name:{type:String,default(){return""}},avatar:{type:String,default(){return""}}},computed:{inItials(){return xT(this.name)}}},vT={class:"mr-2"},wT=["src"],kT={key:1,class:"flex flex-shrink-0 items-center justify-center w-6 h-6 bg-gray-500 text-xs text-white rounded-full"},ST={key:0},ET={key:1,class:"text-sm"};function TT(n,t,o,c,d,x){return v.openBlock(),v.createElementBlock("div",vT,[o.avatar?(v.openBlock(),v.createElementBlock("img",{key:0,src:o.avatar,alt:"avatar",class:"flex flex-shrink-0 items-center justify-center w-6 h-6 rounded-full"},null,8,wT)):o.name?(v.openBlock(),v.createElementBlock("div",kT,[x.inItials.length?(v.openBlock(),v.createElementBlock("span",ST,v.toDisplayString(x.inItials),1)):(v.openBlock(),v.createElementBlock("span",ET,t[0]||(t[0]=[v.createElementVNode("i",{class:"ti ti-user"},null,-1)])))])):v.createCommentVNode("",!0)])}const CT={components:{VsWidgetCommentsAvatar:vt(bT,[["render",TT]])},props:{comment:{type:Object,default:()=>({})},user:{type:Object,default:()=>({})},id:{type:String,default:""}},data(){return{commentContent:this.comment.body,isCommentActionVisible:!1,isOpen:!1,textareaValue:""}},computed:{isUserAutor(){return this.user.uid===this.comment.uid},createDate(){try{const n=Je(this.comment.cdate,"YYYY-MM-DD");return new Date(n).toLocaleDateString("uk-UA",{day:"2-digit",month:"long",year:"numeric"})}catch{return""}}},watch:{isOpen(n){n&&(this.textareaValue=this.comment.body)}},methods:{confirnDeleteComment(){document.body.click(),this.$emit("openModal",{title:"Ви впевнені?",message:"Ви впевнені, що хочете видалити цей коментар?",confirmButtonText:"Так, я впевнена/ий",cancelButtonText:"Скасувати",confirm:this.deleteComment,updateListOnConfirm:!0})},async updateComment(){try{await mt.put(`/api/widget/comment/${this.id}/${this.comment.communication_id}`,{body:this.textareaValue}),this.$emit("list-update"),this.isCommentActionVisible=!1}catch{this.$notify({title:"Помилка!",message:"Сталася помилка",type:"error"})}},async deleteComment(){try{await mt.delete(`/api/widget/comment/${this.id}/${this.comment.communication_id}`),this.$emit("list-update"),this.isCommentActionVisible=!1}catch{this.$notify({title:"Помилка!",message:"Сталася помилка",type:"error"})}},toggleCommentAction(){this.isCommentActionVisible=!this.isCommentActionVisible}}},MT={class:"p-6 text-base bg-white dark:bg-gray-900"},PT={class:"flex justify-between items-center mb-2"},IT={class:"flex items-center"},AT={class:"inline-flex items-center mr-3 text-sm text-gray-900 dark:text-white font-semibold capitalize"},DT={class:"text-sm text-gray-600 dark:text-gray-400"},zT={class:"text-gray-500 dark:text-gray-400"},LT={class:"flex items-center gap-[4px]"},RT={class:"flex flex-col gap-[8px] text-sm font-medium text-gray-500"},OT={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"};function BT(n,t,o,c,d,x){const y=v.resolveComponent("VsWidgetCommentsAvatar"),h=v.resolveComponent("VsDialog");return v.openBlock(),v.createElementBlock(v.Fragment,null,[v.createElementVNode("div",MT,[v.createElementVNode("div",PT,[v.createElementVNode("div",IT,[v.createElementVNode("p",AT,[v.createVNode(y,{name:o.comment.username,avatar:o.comment.avatar},null,8,["name","avatar"]),v.createTextVNode(v.toDisplayString(o.comment.username),1)]),v.createElementVNode("div",DT,v.toDisplayString(x.createDate),1)])]),v.createElementVNode("p",zT,v.toDisplayString(o.comment.body),1),v.createElementVNode("div",LT,[v.createElementVNode("button",{type:"button",class:"block py-2 dark:hover:bg-gray-600 hover:underline dark:hover:text-white text-start duration-300",onClick:t[0]||(t[0]=M=>d.isOpen=!0)}," Редагувати "),v.createElementVNode("button",{type:"button",class:"block py-2 dark:hover:bg-gray-600 hover:underline dark:hover:text-white text-start duration-300",onClick:t[1]||(t[1]=M=>x.confirnDeleteComment())}," Видалити ")])]),v.createVNode(h,{visible:d.isOpen,"onUpdate:visible":t[5]||(t[5]=M=>d.isOpen=M),title:"Редагувати"},{footer:v.withCtx(()=>[v.createElementVNode("div",OT,[v.createElementVNode("button",{onClick:t[3]||(t[3]=M=>d.isOpen=!1),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Відмінити "),v.createElementVNode("button",{onClick:t[4]||(t[4]=(...M)=>x.updateComment&&x.updateComment(...M)),class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:v.withCtx(()=>[v.createElementVNode("label",RT,[t[6]||(t[6]=v.createTextVNode(" Коментар ")),v.withDirectives(v.createElementVNode("textarea",{"onUpdate:modelValue":t[2]||(t[2]=M=>d.textareaValue=M),placeholder:"Напишіть коментар...",class:"w-full h-[200px] border rounded-lg outline-none resize-none p-[20px] focus:border-[2px] focus:border-blue-600 [&::-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"},null,512),[[v.vModelText,d.textareaValue]])])]),_:1},8,["visible"])],64)}const FT={components:{VsWidgetCommentsItem:vt(CT,[["render",BT]])},inject:["activeAddFormEditor"],props:{id:{type:String,default:()=>""},prefilledData:{type:Object,default:null}},data(){return{isLoaded:!1,isLoadFailed:!1,comments:[],user:{},modal:{title:"",message:"",cancel:"",confirm:"",cancelButtonText:"",confirmButtonText:""},isModalVisible:!1}},async created(){await this.getComments()},methods:{async getComments(){if(this.prefilledData){this.comments=this.prefilledData.rows,this.isLoaded=!0;return}try{const{data:n}=await mt.get(`/api/widget/comment/${this.id}`);this.comments=n.rows,this.user=n.user}catch(n){this.isLoadFailed=!0,console.error(n)}this.isLoaded=!0,this.$emit("update-comment-count")},prepareModal(n){const t={...n};return n.cancel||(t.cancel=()=>{this.isModalVisible=!1}),n.updateListOnConfirm&&(t.confirm=async()=>{await n.confirm(),this.isModalVisible=!1}),t},handleOpenModal(n){this.modal=this.prepareModal(n),this.isModalVisible=!0}}},NT={class:"flex flex-col divide-y"},VT={key:0,class:"max-h-[300px] 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"},$T={key:1},jT={class:"p-4"},UT={class:"mt-1 text-gray-500 dark:text-neutral-500"},HT={class:"mt-4 flex justify-end gap-x-3"};function qT(n,t,o,c,d,x){const y=v.resolveComponent("VsErrorOnLoading"),h=v.resolveComponent("VsWidgetCommentsItem"),M=v.resolveComponent("VsLoader"),D=v.resolveComponent("VsDialog");return v.openBlock(),v.createElementBlock("div",NT,[d.isLoaded?(v.openBlock(),v.createElementBlock(v.Fragment,{key:0},[d.isLoadFailed?(v.openBlock(),v.createBlock(y,{key:0})):(v.openBlock(),v.createElementBlock(v.Fragment,{key:1},[d.comments.length?(v.openBlock(),v.createElementBlock("div",VT,[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(d.comments,(A,z)=>(v.openBlock(),v.createBlock(h,{key:z,comment:A,user:d.user,index:z,id:o.id,onListUpdate:x.getComments,class:"border-top",onOpenModal:t[0]||(t[0]=L=>x.handleOpenModal(L))},null,8,["comment","user","index","id","onListUpdate"]))),128))])):(v.openBlock(),v.createElementBlock("div",$T,t[4]||(t[4]=[v.createElementVNode("p",{class:"pl-3 text-sm font-medium text-gray-600"},"Коментарі відсутні",-1)])))],64))],64)):(v.openBlock(),v.createBlock(M,{key:1,class:"justify-center",text:"Please wait..."})),v.createVNode(D,{title:d.modal.title,size:"small",visible:d.isModalVisible,"onUpdate:visible":t[3]||(t[3]=A=>d.isModalVisible=A)},{default:v.withCtx(()=>[v.createElementVNode("div",jT,[v.createElementVNode("p",UT,v.toDisplayString(d.modal.message),1),v.createElementVNode("div",HT,[v.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm 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",onClick:t[1]||(t[1]=(...A)=>d.modal.cancel&&d.modal.cancel(...A))},v.toDisplayString(d.modal.cancelButtonText),1),v.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm font-semibold rounded-lg border border-transparent bg-red-500 text-white hover:bg-red-600 disabled:opacity-50 disabled:pointer-events-none",onClick:t[2]||(t[2]=(...A)=>d.modal.confirm&&d.modal.confirm(...A))},v.toDisplayString(d.modal.confirmButtonText),1)])])]),_:1},8,["title","visible"])])}const ZT=vt(FT,[["render",qT]]),WT={props:{id:{type:String,default:()=>""},autofocus:{type:Boolean,default:()=>!0}},data(){return{isEditorOpen:!1,commentContent:""}},methods:{async addNewComment(){if(this.commentContent)try{await mt.post(`/api/widget/comment/${this.id}`,{body:this.commentContent}),this.commentContent="",this.$emit("list-update")}catch(n){console.error(n)}},setNewContent(n){this.commentContent=n}}},GT={class:"w-full widget-comment-form"},YT={class:"mb-4 bg-white border-gray-200 dark:bg-gray-800 dark:border-gray-700"};function XT(n,t,o,c,d,x){return v.openBlock(),v.createElementBlock("div",GT,[v.createElementVNode("div",YT,[v.withDirectives(v.createElementVNode("textarea",{"onUpdate:modelValue":t[0]||(t[0]=y=>d.commentContent=y),rows:"6",class:"w-full h-[200px] border rounded-lg outline-none resize-none p-[20px] focus:border-[2px] focus:border-blue-600 [&::-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",placeholder:"Напишіть коментар..."},null,512),[[v.vModelText,d.commentContent]])]),v.createElementVNode("button",{ref:"buttonAdd",class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300",onClick:t[1]||(t[1]=(...y)=>x.addNewComment&&x.addNewComment(...y))}," Відправити коментар ",512)])}const KT={components:{VsWidgetCommentsList:ZT,VsWidgetCommentsAddForm:vt(WT,[["render",XT]])},props:{id:{type:String,default(){return""}},prefilledData:{type:Object,default:null}},data(){return{activeAddFormEditor:"",comments:[],totalComment:"0"}},mounted(){this.comments=this.$refs.commentListRef.comments},watch:{comments(n){this.$emit("count-change",n.length)}},methods:{listUpdate(){this.$refs.commentListRef.getComments()},updateCommentCount(){this.totalComment=this.$refs.commentListRef.comments.length||"0"}}},JT={class:"bg-white-200"},QT={class:"flex justify-between items-center gap-x-2 mb-4"},eC={class:"inline-block font-semibold text-gray-800 dark:text-neutral-200"},tC={key:0,class:"inline-block font-semibold text-gray-800 dark:text-neutral-200"};function iC(n,t,o,c,d,x){const y=v.resolveComponent("VsWidgetCommentsAddForm"),h=v.resolveComponent("VsWidgetCommentsList");return v.openBlock(),v.createElementBlock("div",JT,[v.createElementVNode("div",QT,[v.createElementVNode("h2",eC,[t[2]||(t[2]=v.createTextVNode("Коментарі ")),d.comments?(v.openBlock(),v.createElementBlock("span",tC,"("+v.toDisplayString(d.totalComment)+")",1)):v.createCommentVNode("",!0)])]),v.createVNode(y,{class:"mb-6",id:o.id,onListUpdate:t[0]||(t[0]=M=>x.listUpdate())},null,8,["id"]),v.createVNode(h,{id:o.id,onUpdateCommentCount:t[1]||(t[1]=M=>x.updateCommentCount()),"prefilled-data":o.prefilledData,ref:"commentListRef"},null,8,["id","prefilled-data"])])}const nC={"vs-widget-map":zE,"vs-widget-gallery":_T,"vs-widget-comments":vt(KT,[["render",iC]])},rC={},sC={style:{width:"calc(100vw - 300px)",height:"calc(100vh - 60px)"},class:"bg-gray-50 flex items-center justify-center"},oC={...nC,...rC,"vs-dashboard":{__name:"vs-dashboard",setup(n){return(t,o)=>(v.openBlock(),v.createElementBlock("div",sC,o[0]||(o[0]=[v.createElementVNode("div",{class:"p-5 md:p-8 bg-white border border-gray-200 shadow-sm rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},[v.createElementVNode("div",{class:"mb-4 xl:mb-8"},[v.createElementVNode("h1",{class:"text-lg font-semibold text-gray-800 dark:text-neutral-200"}," Members "),v.createElementVNode("p",{class:"text-sm text-gray-500 dark:text-neutral-500"}," Manage members and users of your workspace and set their access level. ")]),v.createElementVNode("div",{class:"space-y-5"},[v.createElementVNode("div",{class:"flex sm:grid sm:grid-cols-2 gap-x-2 sm:gap-x-5"},[v.createElementVNode("div",{class:"relative w-full"},[v.createElementVNode("div",{class:"absolute inset-y-0 start-0 flex items-center pointer-events-none z-20 ps-3.5"},[v.createElementVNode("svg",{class:"shrink-0 size-4 text-gray-500 dark:text-neutral-400",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"},[v.createElementVNode("circle",{cx:"11",cy:"11",r:"8"}),v.createElementVNode("path",{d:"m21 21-4.3-4.3"})])]),v.createElementVNode("input",{type:"text",class:"py-2 ps-10 pe-8 block w-full bg-gray-100 border-transparent rounded-lg text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:border-transparent dark:text-neutral-400 dark:placeholder:text-neutral-400 dark:focus:ring-neutral-600",placeholder:"Search by name or email"}),v.createElementVNode("div",{class:"hidden absolute inset-y-0 end-0 flex items-center pointer-events-none z-20 pe-1"},[v.createElementVNode("button",{type:"button",class:"inline-flex shrink-0 justify-center items-center size-6 rounded-full text-gray-500 hover:text-blue-600 focus:outline-none focus:text-blue-600 dark:text-neutral-500 dark:hover:text-blue-500 dark:focus:text-blue-500","aria-label":"Close"},[v.createElementVNode("span",{class:"sr-only"},"Close"),v.createElementVNode("svg",{class:"shrink-0 size-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[v.createElementVNode("circle",{cx:"12",cy:"12",r:"10"}),v.createElementVNode("path",{d:"m15 9-6 6"}),v.createElementVNode("path",{d:"m9 9 6 6"})])])])]),v.createElementVNode("div",{class:"flex justify-end items-center gap-x-2"},[v.createElementVNode("button",{type:"button",class:"p-2.5 sm:py-2 sm:px-3 inline-flex items-center text-sm 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"},[v.createElementVNode("svg",{class:"shrink-0 sm:me-2 size-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[v.createElementVNode("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),v.createElementVNode("polyline",{points:"7 10 12 15 17 10"}),v.createElementVNode("line",{x1:"12",x2:"12",y1:"15",y2:"3"})]),v.createElementVNode("span",{class:"hidden sm:block"}," Download CSV ")]),v.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-1 text-sm font-medium rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:ring-2 focus:ring-blue-500","data-hs-overlay":"#hs-pro-dshm"},[v.createElementVNode("span",{class:"hidden sm:block"},"Send"),v.createTextVNode("Invite ")])])]),v.createElementVNode("div",{class:"grid sm:grid-cols-2 lg:grid-cols-4 gap-2 xl:gap-4"},[v.createElementVNode("div",{class:"p-4 flex flex-col bg-white border border-gray-200 rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},[v.createElementVNode("div",{class:"flex justify-between items-center mb-1"},[v.createElementVNode("h2",{class:"text-4xl font-semibold text-gray-800 dark:text-neutral-200"}),v.createElementVNode("div",{class:"flex items-center -space-x-2"},[v.createElementVNode("img",{class:"shrink-0 size-7 rounded-full",src:"https://images.unsplash.com/photo-1659482633369-9fe69af50bfb?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=3&w=320&h=320&q=80",alt:"Avatar"})])]),v.createElementVNode("h3",{class:"text-gray-500 dark:text-neutral-500"},"Admin")]),v.createElementVNode("div",{class:"p-4 flex flex-col bg-white border border-gray-200 rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},[v.createElementVNode("div",{class:"flex justify-between items-center mb-1"},[v.createElementVNode("h2",{class:"text-4xl font-semibold text-gray-800 dark:text-neutral-200"}," 5 "),v.createElementVNode("div",{class:"flex items-center -space-x-2"},[v.createElementVNode("img",{class:"shrink-0 size-7 shadow-md rounded-full",src:"https://images.unsplash.com/photo-1659482633369-9fe69af50bfb?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=2.5&w=320&h=320&q=80",alt:"Avatar"}),v.createElementVNode("span",{class:"flex shrink-0 justify-center items-center size-7 bg-white border border-gray-200 text-gray-700 text-xs font-medium uppercase rounded-full dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300"}," L "),v.createElementVNode("img",{class:"shrink-0 size-7 shadow-md rounded-full",src:"https://images.unsplash.com/photo-1679412330254-90cb240038c5?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=2.5&w=320&h=320&q=80",alt:"Avatar"}),v.createElementVNode("img",{class:"shrink-0 size-7 shadow-md rounded-full",src:"https://images.unsplash.com/photo-1659482634023-2c4fda99ac0c?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=2.5&w=320&h=320&q=80",alt:"Avatar"}),v.createElementVNode("span",{class:"flex shrink-0 justify-center items-center size-7 bg-white border border-gray-200 text-gray-700 text-xs font-medium uppercase rounded-full dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300"}," O ")])]),v.createElementVNode("div",{class:"inline-flex items-center gap-x-2"},[v.createElementVNode("h3",{class:"text-gray-500 dark:text-neutral-500"},"Members"),v.createElementVNode("div",{class:"hs-tooltip inline-block"},[v.createElementVNode("svg",{class:"hs-tooltip-toggle shrink-0 size-3.5 text-gray-500 dark:text-neutral-500",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16"},[v.createElementVNode("path",{d:"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"}),v.createElementVNode("path",{d:"m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"})]),v.createElementVNode("div",{class:"hs-tooltip-content hs-tooltip-shown:opacity-100 hs-tooltip-shown:visible opacity-0 inline-block absolute invisible z-20 w-60 py-1.5 px-2.5 bg-gray-900 text-xs text-white rounded dark:bg-neutral-700",role:"tooltip","data-popper-placement":"top",style:{position:"fixed",inset:"auto auto 0px 0px",margin:"0px",transform:"translate(689px, -708px)"}}," Limited Access Members can only access the projects, tasks, and messages explicitly shared with them. ")])])]),v.createElementVNode("div",{class:"p-4 flex flex-col bg-white border border-gray-200 rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},[v.createElementVNode("div",{class:"flex justify-between items-center mb-1"},[v.createElementVNode("h2",{class:"text-4xl font-semibold text-gray-800 dark:text-neutral-200"}," 2 "),v.createElementVNode("div",{class:"flex items-center -space-x-2"},[v.createElementVNode("span",{class:"flex shrink-0 justify-center items-center size-7 bg-white border border-gray-200 text-gray-700 text-xs font-medium uppercase rounded-full dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300"}," L "),v.createElementVNode("span",{class:"flex shrink-0 justify-center items-center size-7 bg-white border border-gray-200 text-gray-700 text-xs font-medium uppercase rounded-full dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300"}," 0 ")])]),v.createElementVNode("div",{class:"inline-flex items-center gap-x-2"},[v.createElementVNode("h3",{class:"text-gray-500 dark:text-neutral-500"}," Limited access members "),v.createElementVNode("div",{class:"hs-tooltip inline-block"},[v.createElementVNode("svg",{class:"hs-tooltip-toggle shrink-0 size-3.5 text-gray-500 dark:text-neutral-500",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16"},[v.createElementVNode("path",{d:"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"}),v.createElementVNode("path",{d:"m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"})]),v.createElementVNode("div",{class:"hs-tooltip-content hs-tooltip-shown:opacity-100 hs-tooltip-shown:visible opacity-0 inline-block absolute invisible z-20 w-60 py-1.5 px-2.5 bg-gray-900 text-xs text-white rounded dark:bg-neutral-700",role:"tooltip","data-popper-placement":"top",style:{position:"fixed",inset:"auto auto 0px 0px",margin:"0px",transform:"translate(1198px, -708px)"}}," Limited Access Members can only access the projects, tasks, and messages explicitly shared with them. ")])])]),v.createElementVNode("div",{class:"p-4 flex flex-col bg-white border border-gray-200 rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},[v.createElementVNode("div",{class:"flex justify-between items-center mb-1"},[v.createElementVNode("h2",{class:"text-4xl font-semibold text-gray-800 dark:text-neutral-200"}," 0 "),v.createElementVNode("div",{class:"flex items-center -space-x-2"})]),v.createElementVNode("h3",{class:"text-gray-500 dark:text-neutral-500"},"Pending invites")])]),v.createElementVNode("div",{class:"overflow-x-auto [&::-webkit-scrollbar]:h-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"},[v.createElementVNode("div",{class:"min-w-full inline-block align-middle"},[v.createElementVNode("table",{class:"min-w-full divide-y divide-gray-200 dark:divide-neutral-700"},[v.createElementVNode("thead",null,[v.createElementVNode("tr",null,[v.createElementVNode("th",{scope:"col",class:"min-w-[250px]"},[v.createElementVNode("div",{class:"pe-4 py-3 text-start flex items-center gap-x-1 text-sm font-medium text-gray-800 dark:text-neutral-200"}," Member ")]),v.createElementVNode("th",{scope:"col",class:"min-w-48"},[v.createElementVNode("div",{class:"px-4 py-3 text-start flex items-center gap-x-1 text-sm font-medium text-gray-800 dark:text-neutral-200"}," Role ")]),v.createElementVNode("th",{scope:"col"},[v.createElementVNode("div",{class:"px-4 py-3 text-start flex items-center gap-x-1 text-sm font-medium text-gray-800 dark:text-neutral-200"}," Email ")]),v.createElementVNode("th",{scope:"col",class:"min-w-36"},[v.createElementVNode("div",{class:"px-4 py-3 text-start flex items-center gap-x-1 text-sm font-medium text-gray-800 dark:text-neutral-200"}," Last activity ")]),v.createElementVNode("th",{scope:"col"},[v.createElementVNode("div",{class:"px-4 py-3 text-start flex items-center gap-x-1 text-sm font-medium text-gray-800 dark:text-neutral-200"}," Status ")])])]),v.createElementVNode("tbody",{class:"divide-y divide-gray-200 dark:divide-neutral-700"},[v.createElementVNode("tr",null,[v.createElementVNode("td",{class:"size-px whitespace-nowrap pe-4 py-3"},[v.createElementVNode("div",{class:"w-full flex items-center gap-x-3"},[v.createElementVNode("img",{class:"shrink-0 size-[38px] rounded-full",src:"https://images.unsplash.com/photo-1659482633369-9fe69af50bfb?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=3&w=320&h=320&q=80",alt:"Avatar"}),v.createElementVNode("div",{class:"grow"},[v.createElementVNode("span",{class:"text-sm font-medium text-gray-800 dark:text-neutral-200"}," James Collins ")])])]),v.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[v.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Admin ")]),v.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[v.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," james@site.com ")]),v.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[v.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Today ")]),v.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[v.createElementVNode("span",{class:"inline-flex items-center gap-x-1.5 py-1.5 px-2.5 text-xs font-medium bg-teal-100 text-teal-800 rounded-full dark:bg-teal-500/10 dark:text-teal-500"},[v.createElementVNode("span",{class:"size-1.5 inline-block bg-gray-800 rounded-full dark:bg-neutral-200"}),v.createTextVNode(" Active ")])])]),v.createElementVNode("tr",null,[v.createElementVNode("td",{class:"size-px whitespace-nowrap pe-4 py-3"},[v.createElementVNode("div",{class:"w-full flex items-center gap-x-3"},[v.createElementVNode("span",{class:"flex shrink-0 justify-center items-center size-[38px] bg-white border border-gray-200 text-gray-700 text-xs font-medium uppercase rounded-full dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300"}," L "),v.createElementVNode("div",{class:"grow"},[v.createElementVNode("span",{class:"text-sm font-medium text-gray-800 dark:text-neutral-200"}," James Collins ")])])]),v.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[v.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Can view ")]),v.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[v.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," liza@site.com ")]),v.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[v.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," 2 days ago ")]),v.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[v.createElementVNode("span",{class:"inline-flex items-center gap-1.5 py-1.5 px-2 text-xs font-medium bg-gray-100 text-gray-800 rounded-full dark:bg-neutral-500/20 dark:text-neutral-400"},[v.createElementVNode("span",{class:"size-1.5 inline-block bg-gray-800 rounded-full dark:bg-neutral-400"}),v.createTextVNode(" Inactive ")])])]),v.createElementVNode("tr",null,[v.createElementVNode("td",{class:"size-px whitespace-nowrap pe-4 py-3"},[v.createElementVNode("div",{class:"w-full flex items-center gap-x-3"},[v.createElementVNode("img",{class:"shrink-0 size-[38px] rounded-full",src:"https://images.unsplash.com/photo-1601935111741-ae98b2b230b0?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=2.5&w=320&h=320&q=80",alt:"Avatar"}),v.createElementVNode("div",{class:"grow"},[v.createElementVNode("span",{class:"text-sm font-medium text-gray-800 dark:text-neutral-200"}," Daniel Hobbs ")])])]),v.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[v.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Can edit ")]),v.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[v.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," dhobbs@site.com ")]),v.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[v.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Today ")]),v.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[v.createElementVNode("span",{class:"inline-flex items-center gap-1.5 py-1.5 px-2 text-xs font-medium bg-gray-100 text-gray-800 rounded-full dark:bg-neutral-500/20 dark:text-neutral-400"},[v.createElementVNode("span",{class:"size-1.5 inline-block bg-gray-800 rounded-full dark:bg-neutral-400"}),v.createTextVNode(" Inactive ")])])]),v.createElementVNode("tr",null,[v.createElementVNode("td",{class:"size-px whitespace-nowrap pe-4 py-3"},[v.createElementVNode("div",{class:"w-full flex items-center gap-x-3"},[v.createElementVNode("img",{class:"shrink-0 size-[38px] rounded-full",src:"https://images.unsplash.com/photo-1679412330254-90cb240038c5?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=2.5&w=320&h=320&q=80",alt:"Avatar"}),v.createElementVNode("div",{class:"grow"},[v.createElementVNode("span",{class:"text-sm font-medium text-gray-800 dark:text-neutral-200"}," Brian Warner ")])])]),v.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[v.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Can edit ")]),v.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[v.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," brian@site.com ")]),v.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[v.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," 1 months ago ")]),v.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[v.createElementVNode("span",{class:"inline-flex items-center gap-x-1.5 py-1.5 px-2.5 text-xs font-medium bg-teal-100 text-teal-800 rounded-full dark:bg-teal-500/10 dark:text-teal-500"},[v.createElementVNode("span",{class:"size-1.5 inline-block bg-gray-800 rounded-full dark:bg-neutral-200"}),v.createTextVNode(" Active ")])])]),v.createElementVNode("tr",null,[v.createElementVNode("td",{class:"size-px whitespace-nowrap pe-4 py-3"},[v.createElementVNode("div",{class:"w-full flex items-center gap-x-3"},[v.createElementVNode("span",{class:"flex shrink-0 justify-center items-center size-[38px] bg-white border border-gray-200 text-gray-700 text-xs font-medium uppercase rounded-full dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300"}," O "),v.createElementVNode("div",{class:"grow"},[v.createElementVNode("span",{class:"text-sm font-medium text-gray-800 dark:text-neutral-200"}," Ols Shols ")])])]),v.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[v.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Can view ")]),v.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[v.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," olsshols@site.com ")]),v.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[v.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," 6 days ago ")]),v.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[v.createElementVNode("span",{class:"inline-flex items-center gap-1.5 py-1.5 px-2 text-xs font-medium bg-gray-100 text-gray-800 rounded-full dark:bg-neutral-500/20 dark:text-neutral-400"},[v.createElementVNode("span",{class:"size-1.5 inline-block bg-gray-800 rounded-full dark:bg-neutral-400"}),v.createTextVNode(" Inactive ")])])])])])])])])],-1)])))}}},aC={install(n,{componentsApp:t={},menu:o=[]}){var x;mt.defaults.baseURL&&(mt.defaults.baseURL=mt.defaults.baseURL);const c=(x=Ey(o))==null?void 0:x.filter(y=>y==null?void 0:y.component).map(y=>({...y,component:t[y==null?void 0:y.component]})),{router:d}=mv(c);Object.entries({...oC,...t}).forEach(([y,h])=>{n.component(y,h)}),n.component("admin",Rb),n.config.globalProperties={...n.config.globalProperties,$componentsConfig:{...XS,componentsApp:t},$router:d},n.use(d)}},nr=v.ref(null),lC={data(){return{formValues:{},scheme:null,table:""}},mounted(){this.getFormScheme()},methods:{flattenMenu(n){const t=[];return n.forEach(o=>{o.menu?t.push(...this.flattenMenu(o.menu)):t.push(o)}),t},async getFormScheme(){var c,d;const n=this.flattenMenu(nr.value);n!=null&&n.length||this.$router.replace("/404");const t=n==null?void 0:n.find(x=>{var y,h;return(x==null?void 0:x.path)==((h=(y=this.$route)==null?void 0:y.query)==null?void 0:h.table)});t||this.$router.replace("/404");const o=t==null?void 0:t.table;this.table=o;try{const{data:{form:x}}=await mt.get(`/api/template/table/${o}`),{data:{rows:y}}=await mt.get(`/api/table-data/${this.table}/${(d=(c=this.$route)==null?void 0:c.query)==null?void 0:d.id}`);this.formValues=y==null?void 0:y[0];const{data:h}=await mt.get(`/api/template/form/${x}`);this.scheme=(h==null?void 0:h.schema)||h}catch{}},async editObject(){var n,t;try{await this.$refs.form.doValidation(),await mt.put(`/api/table/${this.table}/${(t=(n=this.$route)==null?void 0:n.query)==null?void 0:t.id}`,this.formValues),await this.$router.back(),await this.$notify({title:"Успішно!",message:"Об'єкт успішно створено",type:"success"})}catch{this.$notify({title:"Помилка!",message:"Сталася помилка",type:"error"})}}}},cC={style:{width:"calc(100vw - 260px)"}},hC={class:"h-[76px] bg-gray-50 flex items-center justify-between px-[30px]"},uC={class:"flex items-center gap-[6px]"},dC={style:{height:"calc(100vh - 140px)",width:"calc(100vw - 260px)"},class:"bg-gray-50 p-[20px] flex"},pC={class:"bg-white w-full rounded-xl border p-[20px] 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"};function fC(n,t,o,c,d,x){const y=v.resolveComponent("VsForm");return v.openBlock(),v.createElementBlock("div",cC,[v.createElementVNode("div",hC,[t[3]||(t[3]=v.createElementVNode("h2",{class:"text-xl font-medium"},"Редагувати",-1)),v.createElementVNode("div",uC,[v.createElementVNode("button",{onClick:t[0]||(t[0]=h=>n.$router.back()),class:"py-2 px-3 flex items-center gap-x-2 text-sm font-medium rounded-lg border bg-white border-gray-100 text-gray-800 shadow focus:outline-none hover:bg-gray-50 hover:border-gray-100 duration-300"}," Скасувати "),v.createElementVNode("button",{onClick:t[1]||(t[1]=(...h)=>x.editObject&&x.editObject(...h)),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 hover:text-white duration-300"}," Зберегти ")])]),v.createElementVNode("div",dC,[v.createElementVNode("div",pC,[d.scheme?(v.openBlock(),v.createBlock(y,{key:0,ref:"form",scheme:d.scheme,modelValue:d.formValues,"onUpdate:modelValue":t[2]||(t[2]=h=>d.formValues=h),class:"p-0 mt-[20px]"},null,8,["scheme","modelValue"])):v.createCommentVNode("",!0)])])])}const mC=Object.freeze(Object.defineProperty({__proto__:null,default:vt(lC,[["render",fC]])},Symbol.toStringTag,{value:"Module"})),gC={data(){return{formValues:{},scheme:null,table:""}},mounted(){this.getFormScheme()},methods:{flattenMenu(n){const t=[];return n.forEach(o=>{o.menu?t.push(...this.flattenMenu(o.menu)):t.push(o)}),t},async getFormScheme(){const n=this.flattenMenu(nr.value);n!=null&&n.length||this.$router.replace("/404");const t=n==null?void 0:n.find(c=>{var d,x;return(c==null?void 0:c.path)==((x=(d=this.$route)==null?void 0:d.query)==null?void 0:x.table)});t||this.$router.replace("/404");const o=t==null?void 0:t.table;this.table=o;try{const{data:{form:c}}=await mt.get(`/api/template/table/${o}`),{data:d}=await mt.get(`/api/template/form/${c}`);this.scheme=(d==null?void 0:d.schema)||d}catch{}},async createObject(){try{await this.$refs.form.doValidation(),await mt.post(`/api/table/${this.table}`,this.formValues),await this.$router.back(),await this.$notify({title:"Успішно!",message:"Об'єкт успішно створено",type:"success"})}catch{this.$notify({title:"Помилка!",message:"Сталася помилка",type:"error"})}}}},yC={style:{width:"calc(100vw - 260px)"}},_C={class:"h-[76px] bg-gray-50 flex items-center justify-between px-[30px]"},xC={class:"flex items-center gap-[6px]"},bC={style:{height:"calc(100vh - 150px)",width:"calc(100vw - 260px)"},class:"bg-gray-50 p-[20px] flex"},vC={class:"bg-white w-full rounded-xl border p-[20px] 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"};function wC(n,t,o,c,d,x){const y=v.resolveComponent("VsForm");return v.openBlock(),v.createElementBlock("div",yC,[v.createElementVNode("div",_C,[t[3]||(t[3]=v.createElementVNode("h2",{class:"text-xl font-medium"},"Створити",-1)),v.createElementVNode("div",xC,[v.createElementVNode("button",{onClick:t[0]||(t[0]=h=>n.$router.back()),class:"py-2 px-3 flex items-center gap-x-2 text-sm font-medium rounded-lg border bg-white border-gray-100 text-gray-800 shadow focus:outline-none hover:bg-gray-50 hover:border-gray-100 duration-300"}," Скасувати "),v.createElementVNode("button",{onClick:t[1]||(t[1]=(...h)=>x.createObject&&x.createObject(...h)),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 hover:text-white duration-300"}," Зберегти ")])]),v.createElementVNode("div",bC,[v.createElementVNode("div",vC,[d.scheme?(v.openBlock(),v.createBlock(y,{key:0,ref:"form",scheme:d.scheme,modelValue:d.formValues,"onUpdate:modelValue":t[2]||(t[2]=h=>d.formValues=h),class:"p-0 mt-[20px]"},null,8,["scheme","modelValue"])):v.createCommentVNode("",!0)])])])}const kC=Object.freeze(Object.defineProperty({__proto__:null,default:vt(gC,[["render",wC]])},Symbol.toStringTag,{value:"Module"})),SC={};function EC(n,t,o,c,d,x){const y=v.resolveComponent("router-view");return v.openBlock(),v.createBlock(y)}const S0=Object.freeze(Object.defineProperty({__proto__:null,default:vt(SC,[["render",EC]])},Symbol.toStringTag,{value:"Module"})),TC={data(){return{objectData:null,component:""}},computed:{getRoute(){const n=this.flattenMenu(nr.value);n!=null&&n.length||this.$router.replace("/404");const t=n==null?void 0:n.find(o=>{var c,d;return(o==null?void 0:o.table)==((d=(c=this.$route)==null?void 0:c.params)==null?void 0:d.table)});return t||this.$router.replace("/404"),t==null?void 0:t.path},getTitle(){var n,t,o,c,d,x,y,h,M,D,A,z,L,N,Y;if((o=(t=(n=this.objectData)==null?void 0:n.rows)==null?void 0:t[0])!=null&&o.name)return((y=(x=(d=(c=this.objectData)==null?void 0:c.rows)==null?void 0:d[0])==null?void 0:x.name)==null?void 0:y.length)<35?(D=(M=(h=this.objectData)==null?void 0:h.rows)==null?void 0:M[0])==null?void 0:D.name:((N=(L=(z=(A=this.objectData)==null?void 0:A.rows)==null?void 0:z[0])==null?void 0:L.name)==null?void 0:N.slice(0,35))+" ...";{const ee=(Y=this.flattenMenu(nr.value))==null?void 0:Y.find(oe=>{var he,_e;return(oe==null?void 0:oe.table)===((_e=(he=this.$route)==null?void 0:he.params)==null?void 0:_e.table)});return ee==null?void 0:ee.ua}}},async mounted(){await this.getObjectData(),await this.checkActiveComponent()},watch:{component(n){this.$router.replace({...this.$route,query:{tab:n}})}},methods:{async getObjectData(){var o;const{table:n,id:t}=(o=this.$route)==null?void 0:o.params;(!n||!t)&&this.$router.replace("/404");try{const{data:c}=await mt.get(`/api/table-data/${n}/${t}`);this.objectData=c}catch(c){console.error(c)}},getColClass(n){return`col-span-${n||12}`},getGridClass(){return"grid-cols-12"},checkActiveComponent(){var n,t,o,c,d,x,y,h,M;if((t=(n=this.$route)==null?void 0:n.query)!=null&&t.tab)this.component=(c=(o=this.$route)==null?void 0:o.query)==null?void 0:c.tab;else{const D=(x=(d=this.objectData)==null?void 0:d.panels)==null?void 0:x.find(A=>(A==null?void 0:A.type)==="tabs");(y=D==null?void 0:D.items)!=null&&y.length&&(this.component=((h=D.items[0])==null?void 0:h.component)||((M=D.items[0])==null?void 0:M.name))}},flattenMenu(n){const t=[];return n.forEach(o=>{o.menu?t.push(...this.flattenMenu(o.menu)):t.push(o)}),t}}},CC={style:{width:"calc(100vw - 260px)",height:"calc(100vh - 60px)"},class:"bg-gray-50 overflow-y-auto"},MC={class:"h-[76px] bg-gray-50 flex items-center justify-between px-[30px]"},PC={class:""},IC={class:"text-lg md:text-xl font-semibold text-stone-800 dark:text-neutral-200"},AC={class:"flex items-center gap-[6px]"},DC={key:0,class:"border rounded-xl bg-white"},zC={class:"p-[10px] pl-[20px] text-xl"},LC=["innerHTML"],RC={key:1},OC={class:"p-[10px] pl-[20px] text-xl"},BC={key:0,class:"p-[20px] border-t"},FC={key:1,class:"p-[20px] border-t"},NC=["innerHTML"],VC={class:"flex space-x-1 w-[1200px] bg-white border rounded-xl h-[60px] items-center pl-[20px]"},$C=["onClick"],jC={key:0,class:"border rounded-xl bg-white mt-[20px]"},UC={class:"p-[10px] pl-[20px] text-xl"},HC={key:0,class:"p-[20px] border-t"},qC={key:1,class:"p-[20px] border-t"},ZC=["innerHTML"];function WC(n,t,o,c,d,x){var h,M,D;const y=v.resolveComponent("router-link");return v.openBlock(),v.createElementBlock("div",CC,[v.createElementVNode("div",MC,[v.createElementVNode("div",PC,[v.createElementVNode("button",{onClick:t[0]||(t[0]=A=>n.$router.back()),class:"text-sm text-blue-600 decoration-2 hover:underline font-medium focus:outline-none focus:underline dark:text-green-400 dark:hover:text-green-500"}," До таблиці "),v.createElementVNode("h2",IC,v.toDisplayString(x.getTitle),1)]),v.createElementVNode("div",AC,[v.createVNode(y,{to:`/edit?table=${x.getRoute}&id=${(M=(h=n.$route)==null?void 0:h.params)==null?void 0:M.id}`,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 hover:text-white duration-300"},{default:v.withCtx(()=>t[1]||(t[1]=[v.createTextVNode(" Редагувати ")])),_:1},8,["to"])])]),v.createElementVNode("div",{class:v.normalizeClass(["grid gap-[20px]",x.getGridClass()])},[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList((D=d.objectData)==null?void 0:D.panels,(A,z)=>{var L;return v.openBlock(),v.createElementBlock("div",{key:z,class:v.normalizeClass([x.getColClass(A.col),"p-4"])},[A!=null&&A.name?(v.openBlock(),v.createElementBlock("div",DC,[v.createElementVNode("h2",zC,v.toDisplayString((A==null?void 0:A.title)||"Панель"),1),v.createElementVNode("div",{class:"p-[20px] border-t",innerHTML:(L=d.objectData)==null?void 0:L.data[A==null?void 0:A.name]},null,8,LC)])):A.type==="container"?(v.openBlock(),v.createElementBlock("div",RC,[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(A.items,(N,Y)=>{var ee,oe,he,_e,me;return v.openBlock(),v.createElementBlock("div",{key:Y,class:"border rounded-xl bg-white mb-[20px]"},[v.createElementVNode("h2",OC,v.toDisplayString((N==null?void 0:N.title)||"Панель"),1),N!=null&&N.component?(v.openBlock(),v.createElementBlock("div",BC,[(v.openBlock(),v.createBlock(v.resolveDynamicComponent(N.component),{geometry:(oe=(ee=d.objectData)==null?void 0:ee.rows[0])==null?void 0:oe.geom,zoom:16,id:(_e=(he=n.$route)==null?void 0:he.params)==null?void 0:_e.id},null,8,["geometry","id"]))])):v.createCommentVNode("",!0),N!=null&&N.name?(v.openBlock(),v.createElementBlock("div",FC,[v.createElementVNode("div",{innerHTML:(me=d.objectData)==null?void 0:me.data[N==null?void 0:N.name]},null,8,NC)])):v.createCommentVNode("",!0)])}),128))])):v.createCommentVNode("",!0),(A==null?void 0:A.type)==="tabs"?(v.openBlock(),v.createElementBlock(v.Fragment,{key:2},[v.createElementVNode("nav",VC,[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(A==null?void 0:A.items,N=>(v.openBlock(),v.createElementBlock("button",{key:(N==null?void 0:N.name)||(N==null?void 0:N.component),onClick:Y=>d.component=(N==null?void 0:N.component)||(N==null?void 0:N.name),class:v.normalizeClass(["px-2.5 h-[30px] py-1.5 relative inline-flex items-center gap-x-2 text-gray-500 hover:text-gray-800 text-sm whitespace-nowrap rounded-lg focus:outline-none",{"bg-gray-100 text-gray-800 font-semibold after:absolute after:bottom-[-14px] after:left-2.5 after:right-2.5 after:z-10 after:h-0.5 after:bg-gray-800":d.component===(N==null?void 0:N.component)||d.component===(N==null?void 0:N.name),"hover:bg-gray-100":d.component!==(N==null?void 0:N.component)&&d.component!==(N==null?void 0:N.name)}])},v.toDisplayString(N==null?void 0:N.title),11,$C))),128))]),(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(A.items,(N,Y)=>{var ee,oe,he,_e,me;return v.openBlock(),v.createElementBlock(v.Fragment,{key:Y},[d.component===(N==null?void 0:N.component)||d.component===(N==null?void 0:N.name)?(v.openBlock(),v.createElementBlock("div",jC,[v.createElementVNode("h2",UC,v.toDisplayString((N==null?void 0:N.title)||"Панель"),1),N!=null&&N.component?(v.openBlock(),v.createElementBlock("div",HC,[(v.openBlock(),v.createBlock(v.resolveDynamicComponent(N.component),{geometry:(oe=(ee=d.objectData)==null?void 0:ee.rows[0])==null?void 0:oe.geom,zoom:16,id:(_e=(he=n.$route)==null?void 0:he.params)==null?void 0:_e.id},null,8,["geometry","id"]))])):v.createCommentVNode("",!0),N!=null&&N.name?(v.openBlock(),v.createElementBlock("div",qC,[v.createElementVNode("div",{innerHTML:(me=d.objectData)==null?void 0:me.data[N==null?void 0:N.name]},null,8,ZC)])):v.createCommentVNode("",!0)])):v.createCommentVNode("",!0)],64)}),128))],64)):v.createCommentVNode("",!0)],2)}),128))],2)])}const GC=Object.freeze(Object.defineProperty({__proto__:null,default:vt(TC,[["render",WC],["__scopeId","data-v-6289ec55"]])},Symbol.toStringTag,{value:"Module"})),YC={},XC={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 KC(n,t,o,c,d,x){return v.openBlock(),v.createElementBlock("svg",XC,t[0]||(t[0]=[v.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),v.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),v.createElementVNode("path",{d:"M9 12h12l-3 -3"},null,-1),v.createElementVNode("path",{d:"M18 15l3 -3"},null,-1)]))}const JC=vt(YC,[["render",KC]]),QC={},eM={viewBox:"0 0 1823 249",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function tM(n,t,o,c,d,x){return v.openBlock(),v.createElementBlock("svg",eM,t[0]||(t[0]=[v.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 iM=vt(QC,[["render",tM]]),nM={},rM={class:"shrink-0 size-4 text-gray-400 dark:text-white/60",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 sM(n,t,o,c,d,x){return v.openBlock(),v.createElementBlock("svg",rM,t[0]||(t[0]=[v.createElementVNode("circle",{cx:"11",cy:"11",r:"8"},null,-1),v.createElementVNode("path",{d:"m21 21-4.3-4.3"},null,-1)]))}const E0=vt(nM,[["render",sM]]),oM={},aM={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-chevron-down"};function lM(n,t,o,c,d,x){return v.openBlock(),v.createElementBlock("svg",aM,t[0]||(t[0]=[v.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),v.createElementVNode("path",{d:"M6 9l6 6l6 -6"},null,-1)]))}const cM={components:{IconChevronDown:vt(oM,[["render",lM]])},props:{route:Object},mounted(){var n,t,o;(n=this.route)!=null&&n.menu&&(o=(t=this.route)==null?void 0:t.menu)!=null&&o.some(c=>{var d,x;return(c==null?void 0:c.path)===this.$route.path.replace("/","")||((x=(d=this.$route)==null?void 0:d.params)==null?void 0:x.table)===(c==null?void 0:c.table)&&(c==null?void 0:c.table)})&&(this.isOpen=!0)},data(){return{isOpen:!1}}},hM={key:0,class:""},uM={class:"ml-[30px] py-[6px] before:block before:absolute relative w-[196px] flex flex-col gap-[6px] inline-block before:w-[2px] before:h-[100%] before:bg-gray-100 before:left-[-14px] cursor-pointer"},dM={key:1};function pM(n,t,o,c,d,x){var M,D,A,z,L,N,Y,ee,oe,he;const y=v.resolveComponent("IconChevronDown"),h=v.resolveComponent("router-link");return(M=o.route)!=null&&M.menu?(v.openBlock(),v.createElementBlock("div",hM,[v.createElementVNode("button",{onClick:t[0]||(t[0]=_e=>d.isOpen=!d.isOpen),class:v.normalizeClass(["flex cursor-pointer gap-x-3 py-2 px-3 text-sm text-gray-800 justify-start w-full border-none focus:outline-none text-gray-800 rounded-lg items-center hover:bg-gray-100 duration-300",[((A=(D=o.route)==null?void 0:D.menu)==null?void 0:A.some(_e=>{var me,Ie;return(_e==null?void 0:_e.path)===n.$route.path.replace("/","")||(_e==null?void 0:_e.table)===((Ie=(me=n.$route)==null?void 0:me.params)==null?void 0:Ie.table)&&(_e==null?void 0:_e.table)}))&&"bg-gray-100"]])},[v.createTextVNode(v.toDisplayString((z=o.route)==null?void 0:z.ua)+" ",1),v.createVNode(y,{class:v.normalizeClass([[d.isOpen&&"-rotate-180"],"ml-auto duration-300"]),width:"14",height:"14"},null,8,["class"])],2),v.createVNode(v.Transition,{name:"fade"},{default:v.withCtx(()=>{var _e;return[v.withDirectives(v.createElementVNode("ul",uM,[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList((_e=o.route)==null?void 0:_e.menu,(me,Ie)=>{var tt,gt;return v.openBlock(),v.createElementBlock("li",{key:Ie,class:"w-full"},[v.createVNode(h,{to:"/"+(me==null?void 0:me.path),class:v.normalizeClass([[((me==null?void 0:me.path)===n.$route.path.replace("/","")||((gt=(tt=n.$route)==null?void 0:tt.params)==null?void 0:gt.table)===(me==null?void 0:me.table)&&(me==null?void 0:me.table))&&"bg-gray-100"],"flex gap-x-4 py-2 px-3 text-sm text-gray-800 rounded-lg hover:bg-gray-100 focus:outline-none focus:bg-gray-100"])},{default:v.withCtx(()=>[v.createTextVNode(v.toDisplayString(me==null?void 0:me.ua),1)]),_:2},1032,["to","class"])])}),128))],512),[[v.vShow,d.isOpen]])]}),_:1})])):(v.openBlock(),v.createElementBlock("div",dM,[v.createVNode(h,{to:(L=o.route)==null?void 0:L.path,class:v.normalizeClass([[(((N=o.route)==null?void 0:N.path.replace("/",""))===n.$route.path.replace("/","")||((ee=(Y=n.$route)==null?void 0:Y.params)==null?void 0:ee.table)===((oe=o.route)==null?void 0:oe.table)&&((he=o.route)==null?void 0:he.table))&&"bg-gray-100"],"flex gap-x-3 py-2 w-full font-[400] px-3 text-sm text-gray-800 rounded-lg items-center hover:bg-gray-100 duration-300 hover:text-gray-800"])},{default:v.withCtx(()=>{var _e;return[v.createTextVNode(v.toDisplayString((_e=o.route)==null?void 0:_e.ua),1)]}),_:1},8,["to","class"])]))}const fM={components:{IconLogout:JC,NavbarItem:vt(cM,[["render",pM]]),IconLogo:iM,IconSearch:E0},data(){return{activeIndex:null,data:null,searchValue:""}},computed:{data(){var n,t;return(n=this.searchValue)!=null&&n.trim()?(t=this.flattenMenu(nr.value))==null?void 0:t.filter(o=>{var c,d,x;return(x=(c=o==null?void 0:o.ua)==null?void 0:c.toLowerCase())==null?void 0:x.includes((d=this.searchValue)==null?void 0:d.toLowerCase())}):nr.value}},methods:{flattenMenu(n){const t=[];return n.forEach(o=>{o.menu?t.push(...this.flattenMenu(o.menu)):t.push(o)}),t}}},mM={class:"flex flex-col h-[100vh] border-r w-[260px] shrink-0"},gM={class:"relative"},yM={class:"p-[16px] 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"},_M={class:"pb-3 w-full flex flex-col flex-wrap"},xM={key:0,class:"flex flex-col gap-[6px]"},bM={key:1,class:"text-gray-800 text-lg mt-[20px]"};function vM(n,t,o,c,d,x){var A;const y=v.resolveComponent("IconLogo"),h=v.resolveComponent("IconSearch"),M=v.resolveComponent("VsText"),D=v.resolveComponent("NavbarItem");return v.openBlock(),v.createElementBlock("div",mM,[v.createVNode(y,{height:"40",width:"200",class:"my-[20px] ml-[20px]"}),v.createElementVNode("div",gM,[v.createVNode(h,{height:"16",width:"16",class:"absolute top-[12px] left-[30px] text-gray-500 z-[1]"}),v.createVNode(M,{type:"text",modelValue:d.searchValue,"onUpdate:modelValue":t[0]||(t[0]=z=>d.searchValue=z),clearable:!0,placeholder:"Пошук по меню",class:"[&>input]:h-[40px] [&>input]:block [&>input]:rounded-none [&>input]:border-x-0 [&>input]:pl-[60px] [&>input:focus]:outline-none [&>input:focus]:focus:ring-0 [&>input:focus]:border-y-gray-200 [&>input:focus]:border-y-1 [&>input:focus]:border-x-0"},null,8,["modelValue"])]),v.createElementVNode("div",yM,[v.createElementVNode("nav",_M,[(A=x.data)!=null&&A.length?(v.openBlock(),v.createElementBlock("ul",xM,[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(x.data,(z,L)=>(v.openBlock(),v.createElementBlock("li",{key:L,class:"flex flex-col gap-[6px]"},[v.createVNode(D,{route:z},null,8,["route"])]))),128))])):(v.openBlock(),v.createElementBlock("div",bM,"Не знайдено"))])])])}const wM=vt(fM,[["render",vM]]),kM={},SM={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 EM(n,t,o,c,d,x){return v.openBlock(),v.createElementBlock("svg",SM,t[0]||(t[0]=[v.createElementVNode("circle",{cx:"12",cy:"12",r:"10"},null,-1),v.createElementVNode("path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"},null,-1),v.createElementVNode("path",{d:"M12 17h.01"},null,-1)]))}const TM=vt(kM,[["render",EM]]),CM={},MM={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 PM(n,t,o,c,d,x){return v.openBlock(),v.createElementBlock("svg",MM,t[0]||(t[0]=[v.createElementVNode("path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9"},null,-1),v.createElementVNode("path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0"},null,-1)]))}const IM={components:{IconQuestion:TM,IconMessage:vt(CM,[["render",PM]])}},AM={class:"h-[60px] border-b flex justify-end px-[20px]",style:{width:"calc(100vw - 260px)"}},DM={class:"flex items-center gap-[6px]"},zM={href:"docs-softpro.com",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"},LM={class:"hs-tooltip [--placement:bottom] inline-block show"},RM={class:"hs-tooltip-toggle relative 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"};function OM(n,t,o,c,d,x){const y=v.resolveComponent("IconQuestion"),h=v.resolveComponent("IconMessage");return v.openBlock(),v.createElementBlock("div",AM,[v.createElementVNode("div",DM,[v.createElementVNode("a",zM,[v.createVNode(y,{height:"24",width:"24"})]),v.createElementVNode("div",LM,[v.createElementVNode("button",RM,[v.createVNode(h,{height:"24",width:"24"}),t[0]||(t[0]=v.createElementVNode("span",{class:"flex absolute top-0 end-0 -mt-1.5 -me-1.5"},[v.createElementVNode("span",{class:"animate-ping absolute inline-flex size-full rounded-full bg-red-400 opacity-75 dark:bg-red-600"}),v.createElementVNode("span",{class:"relative min-w-[18px] min-h-[18px] inline-flex justify-center items-center text-[10px] bg-red-500 text-white rounded-full px-1"}," 1 ")],-1))]),t[1]||(t[1]=v.createElementVNode("span",{class:"hs-tooltip-content hs-tooltip-shown:opacity-100 hs-tooltip-shown:visible opacity-0 inline-block absolute invisible z-20 py-1.5 px-2.5 bg-gray-900 text-xs text-white rounded-lg dark:bg-neutral-700 hidden",role:"tooltip","data-popper-placement":"bottom",style:{position:"fixed",inset:"0px auto auto 0px",margin:"0px",transform:"translate(1686px, 53px)"}},null,-1))]),t[2]||(t[2]=v.createElementVNode("div",{class:"h-[30px] w-[1px] bg-gray-200 ml-[10px] mr-[10px]"},null,-1)),t[3]||(t[3]=v.createElementVNode("img",{class:"flex-shrink-0 size-[38px] rounded-full",src:"https://images.unsplash.com/photo-1659482633369-9fe69af50bfb?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=3&w=320&h=320&q=80",alt:"Image Description"},null,-1))])])}const BM={components:{navbar:wM,AdminHeader:vt(IM,[["render",OM]])},mounted(){this.getMenu()},computed:{isMenu(){return nr.value}},methods:{async getMenu(){try{const{data:n}=await mt.get("/api/user-menu");nr.value=n}catch{}}}},FM={class:"admin-wrapper"},NM={class:"flex flex-col"};function VM(n,t,o,c,d,x){const y=v.resolveComponent("navbar"),h=v.resolveComponent("admin-header"),M=v.resolveComponent("router-view");return v.openBlock(),v.createElementBlock("div",FM,[v.createVNode(y),v.createElementVNode("div",NM,[x.isMenu?(v.openBlock(),v.createElementBlock(v.Fragment,{key:0},[v.createVNode(h),v.createVNode(M)],64)):v.createCommentVNode("",!0)])])}const $M=Object.freeze(Object.defineProperty({__proto__:null,default:vt(BM,[["render",VM],["__scopeId","data-v-3d7ecdff"]])},Symbol.toStringTag,{value:"Module"})),jM={},UM={class:"h21yx vs0hq",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"};function HM(n,t,o,c,d,x){return v.openBlock(),v.createElementBlock("svg",UM,t[0]||(t[0]=[v.createStaticVNode('<line x1="21" x2="14" y1="4" y2="4"></line><line x1="10" x2="3" y1="4" y2="4"></line><line x1="21" x2="12" y1="12" y2="12"></line><line x1="8" x2="3" y1="12" y2="12"></line><line x1="21" x2="16" y1="20" y2="20"></line><line x1="12" x2="3" y1="20" y2="20"></line><line x1="14" x2="14" y1="2" y2="6"></line><line x1="8" x2="8" y1="10" y2="14"></line><line x1="16" x2="16" y1="18" y2="22"></line>',9)]))}const qM=vt(jM,[["render",HM]]),ZM={data(){return{currentSort:""}},props:{data:{type:Object,default:()=>null},activeColumn:{type:String}},computed:{label(){var n,t;return((n=this.data)==null?void 0:n.ua)||((t=this.data)==null?void 0:t.label)||this.data.title||"null"},selectedSortParam(){var n,t;return(t=(n=this.$route)==null?void 0:n.query)==null?void 0:t.sort},getVisibleIcon(){return this.data.format!=="image"&&this.data.format!=="verify"}},watch:{activeColumn(n){n!==this.data.name&&(this.currentSort="")}},methods:{changeCurrentSort(n){switch(n){case"":return"asc";case"asc":return"desc";case"desc":return"";default:return""}},handleClickSortBtn(n){this.$emit("change-active",this.data.name),this.currentSort=this.changeCurrentSort(n);const t=this.$route.query,{sort:o,...c}=t,d=this.currentSort?`${this.data.name}-${this.currentSort}`:"";this.$router.replace({query:{...c,...d&&{sort:d}}})},isValueEqualToSelected(n){return`${this.data.name}-${n}`===this.selectedSortParam}}},WM={scope:"col",class:"min-w-[200px] max-w-[300px] text-start"},GM={class:"flex-shrink-0 size-3.5",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"},YM={key:0,d:"m7 15 5 5 5-5"},XM={key:1,d:"m7 9 5-5 5 5"},KM={key:1,class:"text-sm text-gray-800 px-[4px] py-2.5 text-start font-normal text-gray-500"};function JM(n,t,o,c,d,x){return v.openBlock(),v.createElementBlock("th",WM,[x.getVisibleIcon?(v.openBlock(),v.createElementBlock("button",{key:0,type:"button",class:"text-sm text-gray-800 px-[4px] py-2.5 text-start font-normal text-gray-500 flex items-center gap-[6px]",onClick:t[0]||(t[0]=y=>x.handleClickSortBtn(d.currentSort))},[v.createTextVNode(v.toDisplayString(x.label)+" ",1),(v.openBlock(),v.createElementBlock("svg",GM,[d.currentSort==="asc"||d.currentSort===""?(v.openBlock(),v.createElementBlock("path",YM)):v.createCommentVNode("",!0),d.currentSort==="desc"||d.currentSort===""?(v.openBlock(),v.createElementBlock("path",XM)):v.createCommentVNode("",!0)]))])):(v.openBlock(),v.createElementBlock("p",KM,v.toDisplayString(x.label),1))])}const QM=vt(ZM,[["render",JM]]),eP={},tP={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-dots-vertical"};function iP(n,t,o,c,d,x){return v.openBlock(),v.createElementBlock("svg",tP,t[0]||(t[0]=[v.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),v.createElementVNode("path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null,-1),v.createElementVNode("path",{d:"M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null,-1),v.createElementVNode("path",{d:"M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null,-1)]))}const nP=vt(eP,[["render",iP]]),rP={},sP={class:"flex-shrink-0 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 oP(n,t,o,c,d,x){return v.openBlock(),v.createElementBlock("svg",sP,t[0]||(t[0]=[v.createStaticVNode('<path d="M3 6h18"></path><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"></path><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"></path><line x1="10" x2="10" y1="11" y2="17"></line><line x1="14" x2="14" y1="11" y2="17"></line>',5)]))}const aP=vt(rP,[["render",oP]]),lP={props:{height:{type:String,default:"16"},width:{type:String,default:"12"},color:{type:String,default:"black"}}},cP={style:{display:"none"}},hP=["height","width","fill"];function uP(n,t,o,c,d,x){return v.openBlock(),v.createElementBlock(v.Fragment,null,[(v.openBlock(),v.createElementBlock("svg",cP,t[0]||(t[0]=[v.createElementVNode("symbol",{id:"icon-pencil",viewBox:"0 0 32 32"},[v.createElementVNode("path",{d:"M27 0c2.761 0 5 2.239 5 5 0 1.126-0.372 2.164-1 3l-2 2-7-7 2-2c0.836-0.628 1.874-1 3-1zM2 23l-2 9 9-2 18.5-18.5-7-7-18.5 18.5zM22.362 11.362l-14 14-1.724-1.724 14-14 1.724 1.724z"})],-1)]))),(v.openBlock(),v.createElementBlock("svg",{height:o.height,width:o.width,fill:o.color},t[1]||(t[1]=[v.createElementVNode("use",{"xlink:href":"#icon-pencil"},null,-1)]),8,hP))],64)}const dP={components:{IconMore:nP,IconDelete:aP,IconEdit:vt(lP,[["render",uP]])},emits:["updateTable"],props:{item:Object,table:String,isForm:null},data(){return{formVisible:!1,isDeleteConfirm:!1,formValue:{},top:0,left:0}},methods:{openConfirm(){this.isDeleteConfirm=!0,document.querySelector("body").click()},async getData(){var n;try{const{data:t}=await mt.get(`/api/table/${this.table}/${(n=this.item)==null?void 0:n.id}`);this.formValue=t}catch(t){console.error(t)}},doSomethingOnCancel(){this.formVisible=!1},async deleteElement(){var n;try{mt.delete(`/api/table/${this.table}/${(n=this.item)==null?void 0:n.id}`),this.$notify({title:"Успішно!",message:"Об`єкт успішно видалeно",type:"success"}),await this.$emit("update-table"),this.isDeleteConfirm=!1}catch{this.$notify({title:"Помилка!",message:"Сталася помилка",type:"error"})}}}},pP={class:"hs-dropdown [--placement:bottom-right] inline-flex"},fP={class:"gap-x-2 p-[4px] rounded-lg shadow-sm hover:border-transparent border focus:outline-none text-black hover:bg-gray-50"},mP={class:"flex flex-col items-start"},gP={key:1,class:"h-[1px] w-[80%] bg-gray-200 ml-auto mr-auto"},yP={class:"p-4"},_P={class:"mt-4 flex justify-end gap-x-3"};function xP(n,t,o,c,d,x){const y=v.resolveComponent("IconMore"),h=v.resolveComponent("IconEdit"),M=v.resolveComponent("router-link"),D=v.resolveComponent("IconDelete"),A=v.resolveComponent("VsPopover"),z=v.resolveComponent("VsDialog");return v.openBlock(),v.createElementBlock(v.Fragment,null,[v.createElementVNode("div",pP,[v.createVNode(A,{trigger:"click",placement:"bottom-left"},{reference:v.withCtx(()=>[v.createElementVNode("button",fP,[v.createVNode(y,{height:"16",width:"16"})])]),default:v.withCtx(()=>{var L,N,Y;return[v.createElementVNode("div",mP,[o.isForm?(v.openBlock(),v.createBlock(M,{key:0,to:`/edit?table=${(N=(L=n.$route)==null?void 0:L.params)==null?void 0:N.catchAll}&id=${(Y=o.item)==null?void 0:Y.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:v.withCtx(()=>[v.createVNode(h,{color:"#000"}),t[4]||(t[4]=v.createTextVNode(" Редагувати "))]),_:1},8,["to"])):v.createCommentVNode("",!0),o.isForm?(v.openBlock(),v.createElementBlock("div",gP)):v.createCommentVNode("",!0),v.createElementVNode("button",{onClick:t[0]||(t[0]=v.withModifiers((...ee)=>x.openConfirm&&x.openConfirm(...ee),["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"},[v.createVNode(D),t[5]||(t[5]=v.createElementVNode("span",{class:"text-gray-800"},"Видалити",-1))])])]}),_:1})]),v.createVNode(z,{visible:d.isDeleteConfirm,"onUpdate:visible":t[3]||(t[3]=L=>d.isDeleteConfirm=L),title:"Ви впевнені?"},{default:v.withCtx(()=>[v.createElementVNode("div",yP,[t[6]||(t[6]=v.createElementVNode("p",{class:"mt-1 text-gray-500 dark:text-neutral-500"}," Ви впевнені, що хочете видалити цей об'єкт? ",-1)),v.createElementVNode("div",_P,[v.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm 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",onClick:t[1]||(t[1]=L=>d.isDeleteConfirm=!1)}," Скасувати "),v.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm font-semibold rounded-lg border border-transparent bg-red-500 text-white hover:bg-red-600 disabled:opacity-50 disabled:pointer-events-none",onClick:t[2]||(t[2]=(...L)=>x.deleteElement&&x.deleteElement(...L))}," Так, я впевнена/ий ")])])]),_:1},8,["visible"])],64)}const bP=vt(dP,[["render",xP]]),vP={},wP={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 kP(n,t,o,c,d,x){return v.openBlock(),v.createElementBlock("svg",wP,t[0]||(t[0]=[v.createElementVNode("path",{d:"m3 16 4 4 4-4"},null,-1),v.createElementVNode("path",{d:"M7 20V4"},null,-1),v.createElementVNode("path",{d:"m21 8-4-4-4 4"},null,-1),v.createElementVNode("path",{d:"M17 4v16"},null,-1)]))}const SP=vt(vP,[["render",kP]]),EP={props:{columns:{type:Object,default:()=>{}},table:{type:String,default:()=>""}},data(){return{tableFormats:["json","csv","xlsx"],format:"",cols:[]}},methods:{async exportTable(){try{const n=await mt.get("/api/export",{params:{table:this.table,format:this.format,cols:this.cols.join(",")},responseType:"blob"}),t=new Blob([n.data],{type:"application/octet-stream"}),o=window.URL.createObjectURL(t),c=document.createElement("a");c.href=o,c.setAttribute("download",`${this.table.split(".")[0]}.${this.format}`),document.body.appendChild(c),c.click(),document.body.removeChild(c),window.URL.revokeObjectURL(o),this.$notify({type:"success",title:"Експорт",message:"Файл успішно експортовано!"})}catch(n){console.error("Ошибка при экспорте файла:",n),this.$notify({type:"error",title:"Помилка",message:"Не вдалося експортувати файл."})}},selectFormat(n){this.format=n}}},TP={class:"p-4"},CP={class:"pb-5 mb-5 last:pb-0 last:mb-0 border-b last:border-b-0 border-gray-200 dark:border-neutral-700"},MP={class:"mt-2 flex row flex-wrap gap-y-[5px] gap-x-[10px]"},PP={class:"pb-5 mb-5 last:pb-0 last:mb-0 border-b last:border-b-0 border-gray-200 dark:border-neutral-700"},IP={class:"mt-2 space-y-2"},AP=["id","onChange"],DP=["for"],zP={class:"pb-5 last:pb-0 last:mb-0 border-b last:border-b-0 border-gray-200 dark:border-neutral-700"},LP={class:"text-center"};function RP(n,t,o,c,d,x){const y=v.resolveComponent("VsCheckbox");return v.openBlock(),v.createElementBlock(v.Fragment,null,[t[4]||(t[4]=v.createElementVNode("div",{class:"dark:border-neutral-700"},null,-1)),v.createElementVNode("div",TP,[v.createElementVNode("div",CP,[t[2]||(t[2]=v.createElementVNode("label",{class:"text-sm text-gray-500 dark:text-neutral-500"}," Виберіть стовпці таблиці для експорту: ",-1)),v.createElementVNode("div",MP,[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(o.columns,(h,M)=>(v.openBlock(),v.createElementBlock("div",{class:"flex items-center",key:M,style:{width:"calc((100% - 10px) / 2)"}},[v.createVNode(y,{class:"py-0 shrink-0 border-gray-300 rounded text-blue-600 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",modelValue:d.cols,"onUpdate:modelValue":t[0]||(t[0]=D=>d.cols=D),value:h==null?void 0:h.name,label:h==null?void 0:h.ua},null,8,["modelValue","value","label"])]))),128))])]),v.createElementVNode("div",PP,[t[3]||(t[3]=v.createElementVNode("label",{class:"text-sm text-gray-500 dark:text-neutral-500"}," Виберіть формат таблиці: ",-1)),v.createElementVNode("div",IP,[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(d.tableFormats,(h,M)=>(v.openBlock(),v.createElementBlock("div",{class:"flex items-center",key:M},[v.createElementVNode("input",{type:"radio",name:"hs-pro-duecmfm",class:"shrink-0 border-gray-300 rounded-full text-blue-600 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:h,onChange:D=>x.selectFormat(h)},null,40,AP),v.createElementVNode("label",{for:h,class:"text-sm text-gray-800 ms-3 dark:text-neutral-400"}," Формат "+v.toDisplayString(h),9,DP)]))),128))])]),v.createElementVNode("div",zP,[v.createElementVNode("div",LP,[v.createElementVNode("button",{type:"button",class:"p-2 inline-flex items-center gap-x-2 text-xs font-medium rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:ring-2 focus:ring-blue-500",onClick:t[1]||(t[1]=(...h)=>x.exportTable&&x.exportTable(...h))}," Завантажити таблицю ")])])])],64)}const OP={components:{IconExport:SP,AdminTableExportForm:vt(EP,[["render",RP]])},props:{table:String,columns:Array},data(){return{isOpen:!1}}};function BP(n,t,o,c,d,x){const y=v.resolveComponent("IconExport"),h=v.resolveComponent("AdminTableExportForm"),M=v.resolveComponent("VsDialog");return v.openBlock(),v.createElementBlock(v.Fragment,null,[v.createElementVNode("button",{onClick:t[0]||(t[0]=D=>d.isOpen=!0),class:"py-2 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"},[v.createVNode(y,{height:"16",width:"16"}),t[2]||(t[2]=v.createTextVNode(" Import / Export ")),t[3]||(t[3]=v.createElementVNode("svg",{class:"shrink-0 size-3.5",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"},[v.createElementVNode("path",{d:"m6 9 6 6 6-6"})],-1))]),v.createVNode(M,{visible:d.isOpen,"onUpdate:visible":t[1]||(t[1]=D=>d.isOpen=D),title:"Експорт таблиці"},{default:v.withCtx(()=>[v.createVNode(h,{table:o.table,columns:o.columns},null,8,["table","columns"])]),_:1},8,["visible"])],64)}const FP=vt(OP,[["render",BP]]),NP={},VP={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 $P(n,t,o,c,d,x){return v.openBlock(),v.createElementBlock("svg",VP,t[0]||(t[0]=[v.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 jP=vt(NP,[["render",$P]]),UP={props:{column:Object},emits:["update-column"],data(){return{value:!1}},watch:{value(n){this.$emit("update-column",{...this.column,hidden:!n})}},mounted(){var n;((n=this.column)==null?void 0:n.hidden)!==!0&&(this.value=!0)}},HP={class:"flex w-full gap-[8px] items-centr"};function qP(n,t,o,c,d,x){var y,h;return v.openBlock(),v.createElementBlock("label",HP,[v.withDirectives(v.createElementVNode("input",{"onUpdate:modelValue":t[0]||(t[0]=M=>d.value=M),type:"checkbox"},null,512),[[v.vModelCheckbox,d.value]]),v.createTextVNode(" "+v.toDisplayString(((y=o.column)==null?void 0:y.ua)||((h=o.column)==null?void 0:h.title)),1)])}const ZP={components:{IconColumns:jP,AdminTableColumnsHiddenItem:vt(UP,[["render",qP]])},emits:["update-columns"],props:{columns:Array},methods:{updateColumn(n){const t=this.columns.findIndex(c=>(c==null?void 0:c.name)===(n==null?void 0:n.name)),o=this.columns;o[t]=n,this.$emit("update-columns",[...o])}}},WP={class:"py-2 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"},GP={class:"flex flex-col gap-[3px] h-[400px] w-[300px] 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"};function YP(n,t,o,c,d,x){const y=v.resolveComponent("IconColumns"),h=v.resolveComponent("AdminTableColumnsHiddenItem"),M=v.resolveComponent("VsPopover");return v.openBlock(),v.createBlock(M,{trigger:"click",placement:"bottom"},{reference:v.withCtx(()=>[v.createElementVNode("button",WP,[v.createVNode(y,{height:"20",width:"16"})])]),default:v.withCtx(()=>[v.createElementVNode("div",null,[t[0]||(t[0]=v.createElementVNode("h2",{class:"text-sm mb-[8px]"},"Оберіть колонки, щоб приховати",-1)),v.createElementVNode("ul",GP,[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(o.columns,(D,A)=>(v.openBlock(),v.createElementBlock("li",{key:A},[v.createVNode(h,{column:D,onUpdateColumn:x.updateColumn},null,8,["column","onUpdateColumn"])]))),128))])])]),_:1})}const XP=vt(ZP,[["render",YP]]),KP={},JP={class:"hidden sm:block shrink-0 size-3",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 16 16"};function QP(n,t,o,c,d,x){return v.openBlock(),v.createElementBlock("svg",JP,t[0]||(t[0]=[v.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 1C8.55228 1 9 1.44772 9 2V7L14 7C14.5523 7 15 7.44771 15 8C15 8.55228 14.5523 9 14 9L9 9V14C9 14.5523 8.55228 15 8 15C7.44772 15 7 14.5523 7 14V9.00001L2 9.00001C1.44772 9.00001 1 8.5523 1 8.00001C0.999999 7.44773 1.44771 7.00001 2 7.00001L7 7.00001V2C7 1.44772 7.44772 1 8 1Z"},null,-1)]))}const eI=vt(KP,[["render",QP]]),tI={},iI={class:"vs-table-interface__table-wrp w-full rounded h-fit overflow-hidden"};function nI(n,t,o,c,d,x){return v.openBlock(),v.createElementBlock("div",iI,t[0]||(t[0]=[v.createStaticVNode('<div><div class="p-5 min-h-[500px] flex flex-col justify-center items-center text-center"><svg class="w-48 mx-auto" viewBox="0 0 178 90" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="27" y="50.5" width="124" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="27" y="50.5" width="124" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-50 dark:stroke-neutral-700/10"></rect><rect x="34.5" y="58" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="61" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="73" width="77" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/30"></rect><rect x="27" y="36" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="39" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="51" width="92" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><g filter="url(#filter1)"><rect x="12" y="6" width="154" height="40" rx="8" fill="currentColor" class="fill-white dark:fill-neutral-800" shape-rendering="crispEdges"></rect><rect x="12.5" y="6.5" width="153" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/60" shape-rendering="crispEdges"></rect><rect x="20" y="14" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="17" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="29" width="106" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect></g><defs><filter id="filter1" x="0" y="0" width="178" height="64" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="6"></feOffset><feGaussianBlur stdDeviation="6"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1187_14810"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1187_14810" result="shape"></feBlend></filter></defs></svg><div class="max-w-sm mx-auto mt-6"><p class="font-medium text-gray-800 dark:text-neutral-200"> Дані для відображення відсутні </p><p class="mt-2 text-sm text-gray-500 dark:text-neutral-500"> Змініть параметри пошуку або спробуйте пізніше </p></div></div></div>',1)]))}const rI={props:{table:String,title:String},components:{IconFilter:qM,AdminTableControl:bP,AdminTableExport:FP,AdminTableColumnsHidden:XP,AdminTableColumn:QM,AdminNodata:vt(tI,[["render",nI]]),IconPlus:eI,IconSearch:E0},data(){return{tableData:{},isFilters:!1,filterScheme:[],page:1,searchValue:"",limit:0,filters:null,activeColumn:"",onFilters:0}},mounted(){var n,t,o,c;this.page=((t=(n=this.$route)==null?void 0:n.query)==null?void 0:t.page)||1,this.limit=((c=(o=this.$route)==null?void 0:o.query)==null?void 0:c.limit)||20,this.getTableData(),this.getFilters()},computed:{defaultPage(){var n,t;return((t=(n=this.$route)==null?void 0:n.query)==null?void 0:t.page)||1},getFilterScheme(){var n;return(n=this.tableData)==null?void 0:n.filters},columns(){var n,t;return(t=(n=this.tableData)==null?void 0:n.columns)==null?void 0:t.filter(o=>(o==null?void 0:o.hidden)!==!0)},isForm(){var n;return(n=this.tableData)==null?void 0:n.form},isNoData(){var n,t;return!((n=this.tableData)!=null&&n.rows)||!((t=this.columns)!=null&&t.length)}},watch:{async table(){this.tableData=null,await this.getTableData()},searchValue(){this.getTableData()},$route:{handler(n,t){var o,c;((o=n==null?void 0:n.params)==null?void 0:o.catchAll)!==((c=t==null?void 0:t.params)==null?void 0:c.catchAll)&&(this.filterScheme=null,this.filters=null,this.onFilters=0,this.getFilters())},deep:!0},limit(n){var t;this.$router.push({query:{...(t=this.$route)==null?void 0:t.query,limit:n}})}},methods:{async getTableData(){var n,t;try{const{data:o}=await mt.get(`/api/template/table/${this.table}`),c=await mt.get(`/api/table-data/${this.table}`,{params:{page:this.page,search:this.searchValue||null,limit:this.limit,filter:this.filters||null,order:((t=(n=this.$route)==null?void 0:n.query)==null?void 0:t.sort)||null}});this.tableData={...o,...(c==null?void 0:c.data)||{}}}catch{}},async getFilters(){var n;try{const{data:t}=await mt.get(`/api/table-filter/${this.table}`);this.filterScheme=(n=t==null?void 0:t.list)==null?void 0:n.map(o=>({...o,label:(o==null?void 0:o.label)||(o==null?void 0:o.ua)}))}catch{}},async handlePageChange(n){const t=this.$route.query;this.page=n,!(!(t!=null&&t.page)&&n===1||t.page===n)&&(await this.$router.replace({query:{...t,page:n}}),await this.getTableData())},async changeLimit(n){this.limit=await n,this.defaultPage=1,await this.getTableData()},closeFilter({target:n}){this.isFilters&&n.classList.contains("filter-container")&&(this.isFilters=!1)},async filterChange({url:n,state:t}){var o;this.filters=n!=="no-url"?n:null,this.onFilters=(o=Object.entries(t))==null?void 0:o.length,this.page=1,await this.getTableData()},changeActiveColumn(n){this.activeColumn=n,this.getTableData()},pushToCard(n){var t;((t=this.tableData)==null?void 0:t.card)===!1||this.$router.push(`/card/${this.table}/${n}`)}}},sI={class:"w-[calc(100vw - 320px)]"},oI={class:"h-[76px] bg-gray-50 flex items-center justify-between px-[30px]"},aI={class:"text-xl font-medium h-[20px]"},lI={style:{height:"calc(100vh - 140px)",width:"calc(100vw - 260px)"},class:"bg-gray-50 p-[20px] flex pt-[10px]"},cI={class:"bg-white w-full rounded-xl border p-[20px]"},hI={class:"flex sm:grid sm:grid-cols-2 gap-x-2 sm:gap-x-5 mb-[10px] relative"},uI={class:"flex gap-[6px] ml-auto"},dI={key:0,class:"font-medium text-[10px] py-0.5 px-[5px] bg-gray-800 text-white leading-3 rounded-full dark:bg-neutral-500"},pI={class:"space-y-5 flex items-start w-full justify-start"},fI={style:{height:"calc(100vh - 310px)"},class:"overflow-x-auto w-full border-t [&::-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"},mI={class:"inline-block w-full align-middle"},gI={key:0,class:"divide-y divide-gray-200 min-w-full dark:divide-neutral-700 relative table-fixed"},yI={class:"sticky top-0 bg-white w-full relative after:absolute after:content-[''] after:block after:w-full after:h-px after:bg-stone-200"},_I={class:"border-stone-200 right-0 z-[1]"},xI={class:"divide-y divide-gray-200"},bI={class:"min-w-[200px] text-start pe-4 py-3 text-sm text-gray-600"},vI=["onClick"],wI={class:"text-center sticky right-0 bg-white w-[80px] px-[10px]"},kI={class:"p-[20px] flex justify-end w-full"},SI={class:"filter-content h-screen bg-white w-[400px] p-[20px] pt-[10px] overflow-x-auto bg-white [&::-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 EI(n,t,o,c,d,x){var _e,me,Ie,tt,gt,Ve;const y=v.resolveComponent("IconPlus"),h=v.resolveComponent("router-link"),M=v.resolveComponent("IconSearch"),D=v.resolveComponent("VsText"),A=v.resolveComponent("AdminTableColumnsHidden"),z=v.resolveComponent("AdminTableExport"),L=v.resolveComponent("IconFilter"),N=v.resolveComponent("AdminTableColumn"),Y=v.resolveComponent("AdminTableControl"),ee=v.resolveComponent("AdminNodata"),oe=v.resolveComponent("VsPagination"),he=v.resolveComponent("VsFilter");return v.openBlock(),v.createElementBlock(v.Fragment,null,[v.createElementVNode("div",sI,[v.createElementVNode("div",oI,[v.createElementVNode("h2",aI,v.toDisplayString(o.title),1),x.isForm?(v.openBlock(),v.createBlock(h,{key:0,to:`/add?table=${(me=(_e=n.$route)==null?void 0:_e.params)==null?void 0:me.catchAll}`,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 hover:text-white duration-300"},{default:v.withCtx(()=>[v.createVNode(y,{height:"16",width:"16"}),t[5]||(t[5]=v.createTextVNode(" Додати "))]),_:1},8,["to"])):v.createCommentVNode("",!0)]),v.createElementVNode("div",lI,[v.createElementVNode("div",cI,[v.createElementVNode("div",hI,[v.createVNode(M,{height:"14",width:"14",class:"absolute top-[10px] left-[14px] text-gray-500 z-[1]"}),v.createVNode(D,{modelValue:d.searchValue,"onUpdate:modelValue":t[0]||(t[0]=rt=>d.searchValue=rt),placeholder:"Пошук...",clearable:!0,class:"[&>input]:py-[7px] [&>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"]),v.createElementVNode("div",uI,[v.createVNode(A,{columns:(Ie=d.tableData)==null?void 0:Ie.columns,onUpdateColumns:t[1]||(t[1]=rt=>d.tableData.columns=rt)},null,8,["columns"]),v.createVNode(z,{table:o.table,columns:(tt=d.tableData)==null?void 0:tt.columns},null,8,["table","columns"]),v.createElementVNode("button",{onClick:t[2]||(t[2]=rt=>d.isFilters=!d.isFilters),class:"py-2 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"},[v.createVNode(L,{height:"16",width:"16"}),t[6]||(t[6]=v.createTextVNode(" Фільтри ")),d.onFilters?(v.openBlock(),v.createElementBlock("span",dI,v.toDisplayString(d.onFilters),1)):v.createCommentVNode("",!0)])])]),v.createElementVNode("div",pI,[v.createElementVNode("div",fI,[v.createElementVNode("div",mI,[x.isNoData?(v.openBlock(),v.createBlock(ee,{key:1})):(v.openBlock(),v.createElementBlock("table",gI,[v.createElementVNode("thead",yI,[v.createElementVNode("tr",_I,[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(x.columns,rt=>(v.openBlock(),v.createBlock(N,{key:rt.name,data:rt,activeColumn:d.activeColumn,onChangeActive:x.changeActiveColumn},null,8,["data","activeColumn","onChangeActive"]))),128)),t[7]||(t[7]=v.createElementVNode("th",{class:"w-[70px] sticky right-0 top-0 bg-white"},null,-1))])]),v.createElementVNode("tbody",xI,[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList((gt=d.tableData)==null?void 0:gt.rows,(rt,xt)=>{var zt,Et,Ki,Pt,ri,Vi,yn,zi;return v.openBlock(),v.createElementBlock("tr",{key:xt},[v.createElementVNode("td",bI,[v.createElementVNode("button",{onClick:()=>x.pushToCard(rt==null?void 0:rt.id),class:v.normalizeClass(["text-sm font-medium",[((zt=d.tableData)==null?void 0:zt.card)===!1?"":"text-blue-600 decoration-2 focus:outline-none focus:underline hover:text-blue-600 hover:underline"]])},[(v.openBlock(),v.createBlock(v.resolveDynamicComponent(((Et=x.columns[0])==null?void 0:Et.format)==="custom"?(Ki=x.columns[0])==null?void 0:Ki.component:n.$componentsConfig[`table-format-${((ri=(Pt=x.columns[0])==null?void 0:Pt.format)==null?void 0:ri.toLowerCase())||"text"}`]),{name:(Vi=x.columns[0])==null?void 0:Vi.name,data:rt,value:rt==null?void 0:rt[(yn=x.columns[0])==null?void 0:yn.name]},null,8,["name","data","value"]))],10,vI)]),(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList((zi=x.columns)==null?void 0:zi.slice(1),ui=>{var an;return v.openBlock(),v.createElementBlock("td",{class:"min-w-[300px] w-full text-start px-[4px] py-3 text-sm text-gray-600",key:ui.name},[(v.openBlock(),v.createBlock(v.resolveDynamicComponent((ui==null?void 0:ui.format)==="custom"?ui==null?void 0:ui.component:n.$componentsConfig[`table-format-${((an=ui==null?void 0:ui.format)==null?void 0:an.toLowerCase())||"text"}`]),{name:ui==null?void 0:ui.name,data:rt,value:rt==null?void 0:rt[ui==null?void 0:ui.name]},null,8,["name","data","value"]))])}),128)),v.createElementVNode("td",wI,[v.createVNode(Y,{isForm:x.isForm,item:rt,table:o.table,onUpdateTable:x.getTableData},null,8,["isForm","item","table","onUpdateTable"])])])}),128))])]))])])]),v.createElementVNode("div",kI,[d.limit?(v.openBlock(),v.createBlock(oe,{key:0,goTo:!1,class:"justify-end","default-page":x.defaultPage,total:((Ve=d.tableData)==null?void 0:Ve.total)||0,pageSize:d.limit,onPageChange:x.handlePageChange,pageSizes:[10,16,20],onPageSizeChange:x.changeLimit},null,8,["default-page","total","pageSize","onPageChange","onPageSizeChange"])):v.createCommentVNode("",!0)])])])]),v.createVNode(v.Transition,{name:"fade"},{default:v.withCtx(()=>{var rt;return[v.withDirectives(v.createElementVNode("div",{onClick:t[4]||(t[4]=(...xt)=>x.closeFilter&&x.closeFilter(...xt)),style:{height:"100vh"},class:"fixed filter-container top-0 flex justify-end items-center z-[2] right-0 left-0 bottom-0 bg-[rgba(0,0,0,0.5)]"},[v.createElementVNode("div",SI,[(rt=d.filterScheme)!=null&&rt.length?(v.openBlock(),v.createBlock(he,{key:0,ref:"filter",scheme:d.filterScheme,layout:"default","apply-vue-router":"",history:"",name:"filter",onFilterChange:x.filterChange,closeFilterBtn:!0,onFilterClose:t[3]||(t[3]=xt=>d.isFilters=!1)},null,8,["scheme","onFilterChange"])):v.createCommentVNode("",!0)])],512),[[v.vShow,d.isFilters]])]}),_:1})],64)}const TI={components:{AdminTable:vt(rI,[["render",EI]])},data(){return{table:!1,interface:"",title:""}},watch:{$route:{async handler(){nr!=null&&nr.value||await this.getMenu(),await this.checkPageType()},deep:!0},title(n){n&&(document.title=n)}},async mounted(){await this.checkPageType()},methods:{flattenMenu(n){const t=[];return n.forEach(o=>{o.menu?t.push(...this.flattenMenu(o.menu)):t.push(o)}),t},async getMenu(){try{const{data:n}=await mt.get("/api/user-menu");nr.value=n}catch{}},async checkPageType(){const n=this.flattenMenu(nr.value);n!=null&&n.length||this.$router.replace("/404");const t=n==null?void 0:n.find(c=>{var d,x;return(c==null?void 0:c.path)==((x=(d=this.$route)==null?void 0:d.params)==null?void 0:x.catchAll)});this.title=t==null?void 0:t.ua,t||this.$router.replace("/404");const o=t==null?void 0:t.table;this.table=o||!1,!o&&this.getInterface()},async getInterface(){var n,t;try{const{data:o}=await mt.get(`/api/template/interface/${((t=(n=this.$route)==null?void 0:n.params)==null?void 0:t.catchAll)||""}`);this.interface=o||""}catch{this.interface=""}}}},CI=["innerHTML"];function MI(n,t,o,c,d,x){const y=v.resolveComponent("AdminTable");return d.table?(v.openBlock(),v.createBlock(y,{key:0,table:d.table,title:d.title},null,8,["table","title"])):(v.openBlock(),v.createElementBlock("div",{key:1,class:"w-full bg-gray-50",style:{height:"calc(100vh - 120px)"},innerHTML:d.interface},null,8,CI))}const PI=Object.freeze(Object.defineProperty({__proto__:null,default:vt(TI,[["render",MI]])},Symbol.toStringTag,{value:"Module"}));return aC});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { u as $ } from "./userMenu-CT1xO2Pt.js";
|
|
2
|
-
import { _ as V, a as z } from "./import-file-
|
|
2
|
+
import { _ as V, a as z } from "./import-file-DFHqs_6d.js";
|
|
3
3
|
import { resolveComponent as N, openBlock as n, createElementBlock as c, createElementVNode as u, toDisplayString as j, createVNode as q, withCtx as B, createTextVNode as E, normalizeClass as T, Fragment as k, renderList as M, createBlock as L, resolveDynamicComponent as H, createCommentVNode as v } from "vue";
|
|
4
4
|
const A = {
|
|
5
5
|
data() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { u as m } from "./userMenu-CT1xO2Pt.js";
|
|
2
|
-
import { _ as b, a as n } from "./import-file-
|
|
2
|
+
import { _ as b, a as n } from "./import-file-DFHqs_6d.js";
|
|
3
3
|
import { resolveComponent as d, openBlock as u, createElementBlock as h, createElementVNode as i, createBlock as p, createCommentVNode as f } from "vue";
|
|
4
4
|
const g = {
|
|
5
5
|
data() {
|
|
@@ -3577,17 +3577,17 @@ function O2(s, i) {
|
|
|
3577
3577
|
return [a, c, f];
|
|
3578
3578
|
}
|
|
3579
3579
|
const F2 = [
|
|
3580
|
-
{ name: "edit", path: "/edit", component: () => import("./edit-page-
|
|
3581
|
-
{ name: "add", path: "/add", component: () => import("./add-page-
|
|
3580
|
+
{ name: "edit", path: "/edit", component: () => import("./edit-page-C9nSZC01.js") },
|
|
3581
|
+
{ name: "add", path: "/add", component: () => import("./add-page-YE2OHATZ.js") },
|
|
3582
3582
|
{
|
|
3583
3583
|
name: "card-view",
|
|
3584
3584
|
path: "/card",
|
|
3585
|
-
component: () => import("./card-view-
|
|
3585
|
+
component: () => import("./card-view-C3M-hYVC.js"),
|
|
3586
3586
|
children: [{
|
|
3587
3587
|
name: "table",
|
|
3588
3588
|
path: ":table",
|
|
3589
|
-
component: () => import("./card-view-
|
|
3590
|
-
children: [{ name: "card", path: ":id", component: () => import("./card-page-
|
|
3589
|
+
component: () => import("./card-view-C3M-hYVC.js"),
|
|
3590
|
+
children: [{ name: "card", path: ":id", component: () => import("./card-page-D5KxxQww.js") }]
|
|
3591
3591
|
}]
|
|
3592
3592
|
}
|
|
3593
3593
|
], B2 = {}, N2 = { class: "bg-gray-200 w-full px-16 md:px-0 h-screen flex items-center justify-center" }, j2 = { class: "bg-white border border-gray-200 flex flex-col items-center justify-center px-4 md:px-8 lg:px-24 py-8 rounded-lg shadow-2xl" };
|
|
@@ -3635,13 +3635,13 @@ const $2 = /* @__PURE__ */ Fi(B2, [["render", V2]]), U2 = (s) => {
|
|
|
3635
3635
|
{
|
|
3636
3636
|
path: "/",
|
|
3637
3637
|
name: "global",
|
|
3638
|
-
component: () => import("./admin-view-
|
|
3638
|
+
component: () => import("./admin-view-QFp8Pseb.js"),
|
|
3639
3639
|
children: [
|
|
3640
3640
|
...i,
|
|
3641
3641
|
...s,
|
|
3642
3642
|
{
|
|
3643
3643
|
path: "/:catchAll(.*)",
|
|
3644
|
-
component: () => import("./admin-interface-
|
|
3644
|
+
component: () => import("./admin-interface-DhsF_Hxe.js")
|
|
3645
3645
|
}
|
|
3646
3646
|
]
|
|
3647
3647
|
}
|