@opengis/admin 0.4.44 → 0.4.46
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/{add-page-C9tARcx8.js → add-page-C85Hn-23.js} +1 -1
- package/dist/{admin-interface-D7_wEZsm.js → admin-interface-CGWdWoBu.js} +2 -2
- package/dist/{admin-view-A8jlmn4f.js → admin-view-CMkqUi2p.js} +1 -1
- package/dist/admin.js +1 -1
- package/dist/admin.umd.cjs +3 -3
- package/dist/{card-view-i3yry4IY.js → card-view-TO8krUo7.js} +1 -1
- package/dist/{edit-page-65fxe3RR.js → edit-page-DIfmLmCA.js} +1 -1
- package/dist/{import-file-IsquGoyk.js → import-file-CXhtzaP6.js} +13 -13
- package/dist/{profile-page-D5xenZti.js → profile-page-Cp9qQTuf.js} +1 -1
- package/package.json +1 -1
package/dist/admin.umd.cjs
CHANGED
|
@@ -29,7 +29,7 @@ Use slot props instead:
|
|
|
29
29
|
- Location:`,Te),q({});let rt;if(Te.path!=null)Pn.NODE_ENV!=="production"&&"params"in Te&&!("name"in Te)&&Object.keys(Te.params).length&&Kt(`Path "${Te.path}" was passed with params but they will be ignored. Use a named route alongside params instead.`),rt=xn({},Te,{path:Jf(n,Te.path,nt.path).path});else{const Bt=xn({},Te.params);for(const _n in Bt)Bt[_n]==null&&delete Bt[_n];rt=xn({},Te,{params:C(Bt)}),nt.params=C(nt.params)}const wt=e.resolve(rt,nt),Vt=Te.hash||"";Pn.NODE_ENV!=="production"&&Vt&&!Vt.startsWith("#")&&Kt(`A \`hash\` should always start with the character "#". Replace "${Vt}" with "#${Vt}".`),wt.params=E(T(wt.params));const un=SS(r,xn({},Te,{hash:xS(Vt),path:wt.path})),zt=o.createHref(un);return Pn.NODE_ENV!=="production"&&(zt.startsWith("//")?Kt(`Location "${Te}" resolved to "${zt}". A resolved location cannot start with multiple slashes.`):wt.matched.length||Kt(`No match found for location with path "${Te.path!=null?Te.path:Te}"`)),xn({fullPath:un,hash:Vt,query:r===eb?FS(Te.query):Te.query||{}},wt,{redirectedFrom:void 0,href:zt})}function J(Te){return typeof Te=="string"?Jf(n,Te,b.value.path):xn({},Te)}function Q(Te,nt){if(k!==Te)return Al(or.NAVIGATION_CANCELLED,{from:nt,to:Te})}function me(Te){return we(Te)}function Ee(Te){return me(xn(J(Te),{replace:!0}))}function Ve(Te,nt){const rt=Te.matched[Te.matched.length-1];if(rt&&rt.redirect){const{redirect:wt}=rt;let Vt=typeof wt=="function"?wt(Te,nt):wt;if(typeof Vt=="string"&&(Vt=Vt.includes("?")||Vt.includes("#")?Vt=J(Vt):{path:Vt},Vt.params={}),Pn.NODE_ENV!=="production"&&Vt.path==null&&!("name"in Vt))throw Kt(`Invalid redirect found:
|
|
30
30
|
${JSON.stringify(Vt,null,2)}
|
|
31
31
|
when navigating to "${Te.fullPath}". A redirect must contain a name or path. This will break in production.`),new Error("Invalid redirect");return xn({query:Te.query,hash:Te.hash,params:Vt.path!=null?{}:Te.params},Vt)}}function we(Te,nt){const rt=k=q(Te),wt=b.value,Vt=Te.state,un=Te.force,zt=Te.replace===!0,Bt=Ve(rt,wt);if(Bt)return we(xn(J(Bt),{state:typeof Bt=="object"?xn({},Vt,Bt.state):Vt,force:un,replace:zt}),nt||rt);const _n=rt;_n.redirectedFrom=nt;let Ce;return!un&&Y_(r,wt,rt)&&(Ce=Al(or.NAVIGATION_DUPLICATED,{to:_n,from:wt}),Wt(wt,wt,!0,!1)),(Ce?Promise.resolve(Ce):Ue(_n,wt)).catch(zn=>Zs(zn)?Zs(zn,or.NAVIGATION_GUARD_REDIRECT)?zn:dn(zn):Ut(zn,_n,wt)).then(zn=>{if(zn){if(Zs(zn,or.NAVIGATION_GUARD_REDIRECT))return Pn.NODE_ENV!=="production"&&Y_(r,q(zn.to),_n)&&nt&&(nt._count=nt._count?nt._count+1:1)>30?(Kt(`Detected a possibly infinite redirection in a navigation guard when going from "${wt.fullPath}" to "${_n.fullPath}". Aborting to avoid a Stack Overflow.
|
|
32
|
-
Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.`),Promise.reject(new Error("Infinite redirect in navigation guard"))):we(xn({replace:zt},J(zn.to),{state:typeof zn.to=="object"?xn({},Vt,zn.to.state):Vt,force:un}),nt||_n)}else zn=He(_n,wt,!0,zt,Vt);return Xe(_n,wt,zn),zn})}function Re(Te,nt){const rt=Q(Te,nt);return rt?Promise.reject(rt):Promise.resolve()}function Ne(Te){const nt=gn.values().next().value;return nt&&typeof nt.runWithContext=="function"?nt.runWithContext(Te):Te()}function Ue(Te,nt){let rt;const[wt,Vt,un]=US(Te,nt);rt=sm(wt.reverse(),"beforeRouteLeave",Te,nt);for(const Bt of wt)Bt.leaveGuards.forEach(_n=>{rt.push(Po(_n,Te,nt))});const zt=Re.bind(null,Te,nt);return rt.push(zt),Wn(rt).then(()=>{rt=[];for(const Bt of d.list())rt.push(Po(Bt,Te,nt));return rt.push(zt),Wn(rt)}).then(()=>{rt=sm(Vt,"beforeRouteUpdate",Te,nt);for(const Bt of Vt)Bt.updateGuards.forEach(_n=>{rt.push(Po(_n,Te,nt))});return rt.push(zt),Wn(rt)}).then(()=>{rt=[];for(const Bt of un)if(Bt.beforeEnter)if(Mi(Bt.beforeEnter))for(const _n of Bt.beforeEnter)rt.push(Po(_n,Te,nt));else rt.push(Po(Bt.beforeEnter,Te,nt));return rt.push(zt),Wn(rt)}).then(()=>(Te.matched.forEach(Bt=>Bt.enterCallbacks={}),rt=sm(un,"beforeRouteEnter",Te,nt,Ne),rt.push(zt),Wn(rt))).then(()=>{rt=[];for(const Bt of p.list())rt.push(Po(Bt,Te,nt));return rt.push(zt),Wn(rt)}).catch(Bt=>Zs(Bt,or.NAVIGATION_CANCELLED)?Bt:Promise.reject(Bt))}function Xe(Te,nt,rt){c.list().forEach(wt=>Ne(()=>wt(Te,nt,rt)))}function He(Te,nt,rt,wt,Vt){const un=Q(Te,nt);if(un)return un;const zt=nt===Io,Bt=Gs?history.state:{};rt&&(wt||zt?o.replace(Te.fullPath,xn({scroll:zt&&Bt&&Bt.scroll},Vt)):o.push(Te.fullPath,Vt)),b.value=Te,Wt(Te,nt,rt,zt),dn()}let tt;function ce(){tt||(tt=o.listen((Te,nt,rt)=>{if(!yn.listening)return;const wt=q(Te),Vt=Ve(wt,yn.currentRoute.value);if(Vt){we(xn(Vt,{replace:!0,force:!0}),wt).catch(id);return}k=wt;const un=b.value;Gs&&NS(J_(un.fullPath,rt.delta),sh()),Ue(wt,un).catch(zt=>Zs(zt,or.NAVIGATION_ABORTED|or.NAVIGATION_CANCELLED)?zt:Zs(zt,or.NAVIGATION_GUARD_REDIRECT)?(we(xn(J(zt.to),{force:!0}),wt).then(Bt=>{Zs(Bt,or.NAVIGATION_ABORTED|or.NAVIGATION_DUPLICATED)&&!rt.delta&&rt.type===Qf.pop&&o.go(-1,!1)}).catch(id),Promise.reject()):(rt.delta&&o.go(-rt.delta,!1),Ut(zt,wt,un))).then(zt=>{zt=zt||He(wt,un,!1),zt&&(rt.delta&&!Zs(zt,or.NAVIGATION_CANCELLED)?o.go(-rt.delta,!1):rt.type===Qf.pop&&Zs(zt,or.NAVIGATION_ABORTED|or.NAVIGATION_DUPLICATED)&&o.go(-1,!1)),Xe(wt,un,zt)}).catch(id)}))}let $t=sd(),ut=sd(),Ft;function Ut(Te,nt,rt){dn(Te);const wt=ut.list();return wt.length?wt.forEach(Vt=>Vt(Te,nt,rt)):(Pn.NODE_ENV!=="production"&&Kt("uncaught error during route navigation:"),console.error(Te)),Promise.reject(Te)}function cn(){return Ft&&b.value!==Io?Promise.resolve():new Promise((Te,nt)=>{$t.add([Te,nt])})}function dn(Te){return Ft||(Ft=!Te,ce(),$t.list().forEach(([nt,rt])=>Te?rt(Te):nt()),$t.reset()),Te}function Wt(Te,nt,rt,wt){const{scrollBehavior:Vt}=t;if(!Gs||!Vt)return Promise.resolve();const un=!rt&&BS(J_(Te.fullPath,0))||(wt||!rt)&&history.state&&history.state.scroll||null;return a.nextTick().then(()=>Vt(Te,nt,un)).then(zt=>zt&&RS(zt)).catch(zt=>Ut(zt,Te,nt))}const en=Te=>o.go(Te);let mn;const gn=new Set,yn={currentRoute:b,listening:!0,addRoute:I,removeRoute:N,clearRoutes:e.clearRoutes,hasRoute:F,getRoutes:$,resolve:q,options:t,push:me,replace:Ee,go:en,back:()=>en(-1),forward:()=>en(1),beforeEach:d.add,beforeResolve:p.add,afterEach:c.add,onError:ut.add,isReady:cn,install(Te){Te.component("RouterLink",ET),Te.component("RouterView",AT),Te.config.globalProperties.$router=yn,Object.defineProperty(Te.config.globalProperties,"$route",{enumerable:!0,get:()=>a.unref(b)}),Gs&&!mn&&b.value===Io&&(mn=!0,me(o.location).catch(wt=>{Pn.NODE_ENV!=="production"&&Kt("Unexpected error when starting the router:",wt)}));const nt={};for(const wt in Io)Object.defineProperty(nt,wt,{get:()=>b.value[wt],enumerable:!0});Te.provide(ah,yn),Te.provide(rm,a.shallowReactive(nt)),Te.provide(im,b);const rt=Te.unmount;gn.add(Te),Te.unmount=function(){gn.delete(Te),gn.size<1&&(k=Io,tt&&tt(),tt=null,b.value=Io,mn=!1,Ft=!1),rt()},Pn.NODE_ENV!=="production"&&Gs&&WS(Te,yn,e)}};function Wn(Te){return Te.reduce((nt,rt)=>nt.then(()=>Ne(rt)),Promise.resolve())}return yn}function IT(){return a.inject(ah)}function ad(t){return a.inject(rm)}const PT=[{name:"edit",path:"/edit",component:()=>Promise.resolve().then(()=>M9)},{name:"add",path:"/add",component:()=>Promise.resolve().then(()=>z9)},{path:"/profile",name:"profile",component:()=>Promise.resolve().then(()=>H9)},{name:"card-view",path:"/card",component:()=>Promise.resolve().then(()=>B2),children:[{name:"table",path:":table",component:()=>Promise.resolve().then(()=>B2),children:[{name:"card",path:":id",component:()=>Promise.resolve().then(()=>T7)}]}]}],Le=(t,e)=>{const n=t.__vccOpts||t;for(const[r,o]of e)n[r]=o;return n},RT={},NT={class:"bg-gray-200 w-full px-16 md:px-0 h-screen flex items-center justify-center"},BT={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"};function VT(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("div",NT,[a.createElementVNode("div",BT,[e[2]||(e[2]=a.createElementVNode("p",{class:"text-6xl md:text-7xl lg:text-9xl font-bold tracking-wider text-gray-300"}," 404 ",-1)),e[3]||(e[3]=a.createElementVNode("p",{class:"text-2xl md:text-3xl lg:text-5xl font-bold tracking-wider text-gray-500 mt-4"}," Сторінку не знайдено ",-1)),e[4]||(e[4]=a.createElementVNode("p",{class:"text-gray-500 mt-4 pb-4 border-b-2 text-center"}," Вибачте, така сторінка не існує ",-1)),a.createElementVNode("div",{onClick:e[0]||(e[0]=p=>t.$router.push("/")),class:"flex cursor-pointer items-center space-x-2 bg-blue-600 hover:bg-blue-700 text-gray-100 px-4 py-2 mt-6 rounded transition duration-150",title:"Return Home"},[...e[1]||(e[1]=[a.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor"},[a.createElementVNode("path",{"fill-rule":"evenodd",d:"M9.707 14.707a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 1.414L7.414 9H15a1 1 0 110 2H7.414l2.293 2.293a1 1 0 010 1.414z","clip-rule":"evenodd"})],-1),a.createElementVNode("span",null,"Повернутись на головну",-1)])])])])}const zT=Le(RT,[["render",VT]]),OT=t=>{const e=PT.map(r=>({...r}));return{router:MT({history:iT(),routes:[{path:"/404",name:"404",component:zT},{path:"/",name:"home",component:()=>Promise.resolve().then(()=>vq),children:[...t,...e,{path:"/:catchAll(.*)",component:()=>Promise.resolve().then(()=>OZ)}]}]}),routerData:e}},LT={props:{value:{type:null,default:()=>""},data:{type:Object},table:{type:String},name:String,data:Object,edit:{type:null,default:()=>!1},column:Object},methods:{async changeData(t){var e;try{const{data:n}=await Oe.get(`/api/table/${this.table}/${(e=this.data)==null?void 0:e.id}`);await Oe.put(`/api/table/${n==null?void 0:n.token}`,{...n,[this.name]:t}),await this.$emit("update-table")}catch(n){console.log(n)}}}},FT={key:1};function $T(t,e,n,r,o,d){var c,b;const p=a.resolveComponent("VsInlineEdit");return n.edit?(a.openBlock(),a.createBlock(p,{key:0,"model-value":n.value,onUpdateValue:d.changeData,title:((c=n.column)==null?void 0:c.ua)||((b=n.column)==null?void 0:b.text)},{default:a.withCtx(()=>{var k,E;return[a.createElementVNode("button",{class:a.normalizeClass([(k=n.value)!=null&&k.trim()?"underline decoration-dashed decoration-[1px] decoration-blue-600":null])},a.toDisplayString((E=n.value)!=null&&E.trim()?n.value:"-"),3)]}),_:1},8,["model-value","onUpdateValue","title"])):(a.openBlock(),a.createElementBlock("div",FT,a.toDisplayString(n.value||"-"),1))}const ch=Le(LT,[["render",$T]]),jT={},UT={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"};function HT(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",UT,[...e[0]||(e[0]=[a.createElementVNode("path",{d:"M20 6 9 17l-5-5"},null,-1)])])}const Dl=Le(jT,[["render",HT]]),WT={class:"w-[170px]"},qT={key:0,class:"p-1 border-b border-gray-200 dark:border-neutral-800"},GT={class:"flex flex-col gap-y-0.5 p-1 max-h-[220px] overflow-y-auto [&::-webkit-scrollbar]:h-2 [&::-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"},ZT=["value","onChange"],YT={class:"text-sm text-gray-800 ms-2"},XT={key:0,class:"flex items-center px-3 text-[13px] py-1 rounded-md cursor-pointer group"},wb={__name:"admin-badge-edit",props:{options:Array,value:[String,Number,Boolean]},emits:["update:value"],setup(t,{emit:e}){const n=e,r=t,o=a.ref(r.value),d=a.ref(""),p=a.ref("popover"),c=a.computed(()=>{var C;return((C=r.options)==null?void 0:C.length)>0}),b=a.computed(()=>{var C;return(C=r.options)==null?void 0:C.filter(T=>{var I,N,$;return($=(I=T==null?void 0:T.text)==null?void 0:I.toLowerCase())==null?void 0:$.includes((N=d.value)==null?void 0:N.toLowerCase())})}),k=C=>{o.value===C?o.value="":o.value=C,n("update:value",o),p.value.togglePopover()},E=async C=>{if(document.body.click(),C.stopPropagation(),c.value)p.value.togglePopover();else{const T=a.watch(()=>c.value,I=>{I&&(T(),p.value.togglePopover())})}};return(C,T)=>{const I=a.resolveComponent("VsPopover");return a.openBlock(),a.createBlock(I,{ref_key:"popover",ref:p},{reference:a.withCtx(()=>[a.createElementVNode("div",{onClick:E},[a.renderSlot(C.$slots,"default")])]),default:a.withCtx(()=>{var N,$;return[a.createElementVNode("div",WT,[((N=t.options)==null?void 0:N.length)>6?(a.openBlock(),a.createElementBlock("div",qT,[a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":T[0]||(T[0]=F=>d.value=F),type:"text",placeholder:"Пошук",class:"py-1.5 px-3 block w-full bg-gray-100 border-transparent rounded-lg text-sm placeholder:text-gray-500 focus:outline-none focus:border-teal-500 focus:ring-teal-500 focus:bg-white disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-transparent dark:text-neutral-400 dark:placeholder:text-neutral-400 dark:focus:ring-neutral-600 dark:focus:bg-neutral-900"},null,512),[[a.vModelText,d.value]])])):a.createCommentVNode("",!0),a.createElementVNode("div",GT,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(b.value,F=>(a.openBlock(),a.createElementBlock("label",{key:F==null?void 0:F.id,class:a.normalizeClass(["flex items-center px-3 py-1 rounded-md cursor-pointer group hover:bg-gray-100",{"bg-gray-100":o.value===(F==null?void 0:F.id)}])},[a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":T[1]||(T[1]=q=>o.value=q),value:F==null?void 0:F.id,type:"checkbox",class:"w-1 h-3 border-0 rounded-full appearance-none shrink-0 checked:bg-none",style:a.normalizeStyle({backgroundColor:(F==null?void 0:F.color)||"#ffffff"}),onChange:q=>k(F==null?void 0:F.id)},null,44,ZT),[[a.vModelCheckbox,o.value]]),a.createElementVNode("span",YT,a.toDisplayString(F==null?void 0:F.text),1),o.value===(F==null?void 0:F.id)?(a.openBlock(),a.createBlock(Dl,{key:0,class:"ml-auto size-3 shrink-0"})):a.createCommentVNode("",!0)],2))),128)),($=b.value)!=null&&$.length?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",XT," Нічого не знайдено "))])])]}),_:3},512)}}},KT={components:{AdminBadgeEdit:wb},props:{data:Object,name:String,table:String,column:Object,edit:{type:null,default:()=>!1}},computed:{getData(){var t;return(t=this.data)==null?void 0:t[this.name+"_data"]}},watch:{value(t){typeof t=="string"&&this.changeData(t)}},data(){var t,e;return{optionsList:[],value:(e=(t=this.data)==null?void 0:t[this.name+"_data"])==null?void 0:e.id}},methods:{async getOptions(){var t;try{const{data:e}=await Oe.get(`/api/suggest/${(t=this.column)==null?void 0:t.data}`);this.optionsList=e}catch{}},getBGColor(t){if(t!=null&&t.includes("#")){let e;if(/^#([A-Fa-f0-9]{3}){1,2}$/.test(t))return e=t.substring(1).split(""),e.length==3&&(e=[e[0],e[0],e[1],e[1],e[2],e[2]]),e="0x"+e.join(""),"rgba("+[e>>16&255,e>>8&255,e&255].join(",")+",0.1)";this.$notify({type:"error",message:"Невірний формат кольору",title:"Помилка"})}else if(typeof t=="string"){const e=document.createElement("div");e.style.color=t,document.body.appendChild(e);const n=getComputedStyle(e).color;return document.body.removeChild(e),n.replace("rgb","rgba").replace(")",", 0.1)")}else this.$notify({type:"error",message:"Невірний формат кольору",title:"Помилка"})},async changeData(t){var e,n;try{const r=await Oe.get(`/api/table/${this.table}/${(e=this.data)==null?void 0:e.id}`);await Oe.put(`/api/table/${(n=r==null?void 0:r.data)==null?void 0:n.token}`,{...r==null?void 0:r.data,[this.name]:t}),await this.$emit("update-table")}catch(r){console.log(r)}}}},JT={key:1,class:"px-[20px] py-[4px]"},QT={key:1,class:"flex justify-start w-full"},eA={key:1};function tA(t,e,n,r,o,d){var c,b,k;const p=a.resolveComponent("AdminBadgeEdit");return n.edit?(a.openBlock(),a.createBlock(p,{key:0,options:o.optionsList,value:o.value,"onUpdate:value":e[1]||(e[1]=E=>o.value=E)},{default:a.withCtx(()=>{var E,C,T;return[a.createElementVNode("div",{class:"flex justify-start w-full cursor-pointer",onClick:e[0]||(e[0]=(...I)=>d.getOptions&&d.getOptions(...I))},[d.getData?(a.openBlock(),a.createElementBlock("div",{key:0,class:"py-0.5 px-2.5 inline-flex items-center text-center text-nowrap gap-x-1.5 text-[11px] font-medium bg-green-100 text-green-800 rounded-full",style:a.normalizeStyle({backgroundColor:d.getBGColor((E=d.getData)==null?void 0:E.color),color:(C=d.getData)==null?void 0:C.color})},a.toDisplayString((T=d.getData)==null?void 0:T.text),5)):(a.openBlock(),a.createElementBlock("div",JT,"-"))])]}),_:1},8,["options","value"])):(a.openBlock(),a.createElementBlock("div",QT,[d.getData?(a.openBlock(),a.createElementBlock("div",{key:0,class:"py-0.5 px-2.5 inline-flex items-center gap-x-1.5 text-[11px] font-medium bg-green-100 text-green-800 rounded-full",style:a.normalizeStyle({backgroundColor:d.getBGColor((c=d.getData)==null?void 0:c.color),color:(b=d.getData)==null?void 0:b.color})},a.toDisplayString((k=d.getData)==null?void 0:k.text),5)):(a.openBlock(),a.createElementBlock("div",eA,"-"))]))}const kb=Le(KT,[["render",tA]]),nA={},rA={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-check"};function iA(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",rA,[...e[0]||(e[0]=[a.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),a.createElementVNode("path",{d:"M5 12l5 5l10 -10"},null,-1)])])}const Eb=Le(nA,[["render",iA]]),sA={components:{IconCheck:Eb},props:{value:Boolean,data:{type:Object},table:{type:String},name:String,data:Object,edit:{type:null,default:()=>!1},column:Object},data(){return{checkValue:this.value}},watch:{checkValue(t){this.changeData(t)}},methods:{async changeData(t){var e;try{const{data:n}=await Oe.get(`/api/table/${this.table}/${(e=this.data)==null?void 0:e.id}`);await Oe.put(`/api/table/${n==null?void 0:n.token}`,{...n,[this.name]:t}),await this.$emit("update-table")}catch(n){console.log(n)}}}},oA={key:0};function aA(t,e,n,r,o,d){const p=a.resolveComponent("IconCheck");return n.edit?(a.openBlock(),a.createElementBlock("div",oA,[a.createElementVNode("label",{class:a.normalizeClass(["w-[20px] h-[20px] rounded-md flex items-center justify-center duration-100 cursor-pointer",[o.checkValue?"bg-blue-400":"border"]])},[a.withDirectives(a.createElementVNode("input",{type:"checkbox",class:"hidden","onUpdate:modelValue":e[0]||(e[0]=c=>o.checkValue=c)},null,512),[[a.vModelCheckbox,o.checkValue]]),a.createVNode(p,{height:"18",width:"18",class:"text-white"})],2)])):(a.openBlock(),a.createElementBlock("div",{key:1,class:a.normalizeClass(["w-[20px] h-[20px] rounded-md flex items-center justify-center disabled",[n.value?"bg-blue-400":"border"]])},[a.createVNode(p,{height:"18",width:"18",class:"text-white"})],2))}const Da=Le(sA,[["render",aA]]),lA={components:{AdminBadgeEdit:wb},props:{data:Object,name:String,column:Object,table:String,edit:{type:Boolean,default:()=>!1}},data(){var t,e;return{optionsList:[],value:(e=(t=this.data)==null?void 0:t[this.name+"_data"])==null?void 0:e.id}},watch:{value(t){typeof t=="string"&&this.changeData(t)}},computed:{getData(){var t,e,n;return((e=(t=this.data)==null?void 0:t[this.name+"_data"])==null?void 0:e.text)||((n=this.data)==null?void 0:n[this.name+"_text"])}},methods:{async getOptions(){var t;try{const{data:e}=await Oe.get(`/api/suggest/${(t=this.column)==null?void 0:t.data}`);this.optionsList=e}catch{}},async changeData(t){var e,n;try{const r=await Oe.get(`/api/table/${this.table}/${(e=this.data)==null?void 0:e.id}`);await Oe.put(`/api/table/${(n=r==null?void 0:r.data)==null?void 0:n.token}`,{...r.data,[this.name]:t}),await this.$emit("update-table")}catch(r){console.log(r)}}}},cA={key:0},dA={key:1,class:"text-gray-600 cursor-pointer dark:text-neutral-400"},uA={key:1,class:"cursor-pointer px-[20px] py-[10px]"},hA={key:0},pA={key:1},fA={key:1};function mA(t,e,n,r,o,d){const p=a.resolveComponent("AdminBadgeEdit");return a.openBlock(),a.createElementBlock("div",null,[n.edit?(a.openBlock(),a.createBlock(p,{key:0,options:o.optionsList,value:o.value,"onUpdate:value":e[1]||(e[1]=c=>o.value=c)},{default:a.withCtx(()=>[a.createElementVNode("div",{onClick:e[0]||(e[0]=(...c)=>d.getOptions&&d.getOptions(...c))},[d.getData?(a.openBlock(),a.createElementBlock("div",cA,[typeof d.getData=="object"?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:0},a.renderList(d.getData,(c,b)=>(a.openBlock(),a.createElementBlock("div",{key:b,class:"text-gray-600 cursor-pointer dark:text-neutral-400"},a.toDisplayString(c),1))),128)):(a.openBlock(),a.createElementBlock("div",dA,a.toDisplayString(d.getData),1))])):(a.openBlock(),a.createElementBlock("div",uA,"-"))])]),_:1},8,["options","value"])):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[d.getData?(a.openBlock(),a.createElementBlock("div",hA,[typeof d.getData=="object"?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:0},a.renderList(d.getData,(c,b)=>(a.openBlock(),a.createElementBlock("div",{key:b},a.toDisplayString(c),1))),128)):(a.openBlock(),a.createElementBlock("div",pA,a.toDisplayString(d.getData),1))])):(a.openBlock(),a.createElementBlock("div",fA,"-"))],64))])}const Cb=Le(lA,[["render",mA]]),gA={props:{value:{type:[String,Number],default:()=>""},data:Object,name:String},computed:{getData(){var t,e;return((t=this.data)==null?void 0:t[this.name])||((e=this.data)==null?void 0:e[this.name+"_data"])}},methods:{}},yA={class:"flex justify-start w-full gap-[6px] flex-wrap"},_A={class:"p-2 bg-gray-100 text-gray-800 text-xs rounded-md dark:bg-neutral-700 dark:text-neutral-200"},bA={key:1};function xA(t,e,n,r,o,d){var p;return a.openBlock(),a.createElementBlock("div",yA,[(p=d.getData)!=null&&p.length?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:0},a.renderList(d.getData,c=>(a.openBlock(),a.createElementBlock("div",_A,a.toDisplayString(c),1))),256)):(a.openBlock(),a.createElementBlock("div",bA,"-"))])}const Sb=Le(gA,[["render",xA]]);//! moment.js
|
|
32
|
+
Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.`),Promise.reject(new Error("Infinite redirect in navigation guard"))):we(xn({replace:zt},J(zn.to),{state:typeof zn.to=="object"?xn({},Vt,zn.to.state):Vt,force:un}),nt||_n)}else zn=He(_n,wt,!0,zt,Vt);return Xe(_n,wt,zn),zn})}function Re(Te,nt){const rt=Q(Te,nt);return rt?Promise.reject(rt):Promise.resolve()}function Ne(Te){const nt=gn.values().next().value;return nt&&typeof nt.runWithContext=="function"?nt.runWithContext(Te):Te()}function Ue(Te,nt){let rt;const[wt,Vt,un]=US(Te,nt);rt=sm(wt.reverse(),"beforeRouteLeave",Te,nt);for(const Bt of wt)Bt.leaveGuards.forEach(_n=>{rt.push(Po(_n,Te,nt))});const zt=Re.bind(null,Te,nt);return rt.push(zt),Wn(rt).then(()=>{rt=[];for(const Bt of d.list())rt.push(Po(Bt,Te,nt));return rt.push(zt),Wn(rt)}).then(()=>{rt=sm(Vt,"beforeRouteUpdate",Te,nt);for(const Bt of Vt)Bt.updateGuards.forEach(_n=>{rt.push(Po(_n,Te,nt))});return rt.push(zt),Wn(rt)}).then(()=>{rt=[];for(const Bt of un)if(Bt.beforeEnter)if(Mi(Bt.beforeEnter))for(const _n of Bt.beforeEnter)rt.push(Po(_n,Te,nt));else rt.push(Po(Bt.beforeEnter,Te,nt));return rt.push(zt),Wn(rt)}).then(()=>(Te.matched.forEach(Bt=>Bt.enterCallbacks={}),rt=sm(un,"beforeRouteEnter",Te,nt,Ne),rt.push(zt),Wn(rt))).then(()=>{rt=[];for(const Bt of p.list())rt.push(Po(Bt,Te,nt));return rt.push(zt),Wn(rt)}).catch(Bt=>Zs(Bt,or.NAVIGATION_CANCELLED)?Bt:Promise.reject(Bt))}function Xe(Te,nt,rt){c.list().forEach(wt=>Ne(()=>wt(Te,nt,rt)))}function He(Te,nt,rt,wt,Vt){const un=Q(Te,nt);if(un)return un;const zt=nt===Io,Bt=Gs?history.state:{};rt&&(wt||zt?o.replace(Te.fullPath,xn({scroll:zt&&Bt&&Bt.scroll},Vt)):o.push(Te.fullPath,Vt)),b.value=Te,Wt(Te,nt,rt,zt),dn()}let tt;function ce(){tt||(tt=o.listen((Te,nt,rt)=>{if(!yn.listening)return;const wt=q(Te),Vt=Ve(wt,yn.currentRoute.value);if(Vt){we(xn(Vt,{replace:!0,force:!0}),wt).catch(id);return}k=wt;const un=b.value;Gs&&NS(J_(un.fullPath,rt.delta),sh()),Ue(wt,un).catch(zt=>Zs(zt,or.NAVIGATION_ABORTED|or.NAVIGATION_CANCELLED)?zt:Zs(zt,or.NAVIGATION_GUARD_REDIRECT)?(we(xn(J(zt.to),{force:!0}),wt).then(Bt=>{Zs(Bt,or.NAVIGATION_ABORTED|or.NAVIGATION_DUPLICATED)&&!rt.delta&&rt.type===Qf.pop&&o.go(-1,!1)}).catch(id),Promise.reject()):(rt.delta&&o.go(-rt.delta,!1),Ut(zt,wt,un))).then(zt=>{zt=zt||He(wt,un,!1),zt&&(rt.delta&&!Zs(zt,or.NAVIGATION_CANCELLED)?o.go(-rt.delta,!1):rt.type===Qf.pop&&Zs(zt,or.NAVIGATION_ABORTED|or.NAVIGATION_DUPLICATED)&&o.go(-1,!1)),Xe(wt,un,zt)}).catch(id)}))}let $t=sd(),ut=sd(),Ft;function Ut(Te,nt,rt){dn(Te);const wt=ut.list();return wt.length?wt.forEach(Vt=>Vt(Te,nt,rt)):(Pn.NODE_ENV!=="production"&&Kt("uncaught error during route navigation:"),console.error(Te)),Promise.reject(Te)}function cn(){return Ft&&b.value!==Io?Promise.resolve():new Promise((Te,nt)=>{$t.add([Te,nt])})}function dn(Te){return Ft||(Ft=!Te,ce(),$t.list().forEach(([nt,rt])=>Te?rt(Te):nt()),$t.reset()),Te}function Wt(Te,nt,rt,wt){const{scrollBehavior:Vt}=t;if(!Gs||!Vt)return Promise.resolve();const un=!rt&&BS(J_(Te.fullPath,0))||(wt||!rt)&&history.state&&history.state.scroll||null;return a.nextTick().then(()=>Vt(Te,nt,un)).then(zt=>zt&&RS(zt)).catch(zt=>Ut(zt,Te,nt))}const en=Te=>o.go(Te);let mn;const gn=new Set,yn={currentRoute:b,listening:!0,addRoute:I,removeRoute:N,clearRoutes:e.clearRoutes,hasRoute:F,getRoutes:$,resolve:q,options:t,push:me,replace:Ee,go:en,back:()=>en(-1),forward:()=>en(1),beforeEach:d.add,beforeResolve:p.add,afterEach:c.add,onError:ut.add,isReady:cn,install(Te){Te.component("RouterLink",ET),Te.component("RouterView",AT),Te.config.globalProperties.$router=yn,Object.defineProperty(Te.config.globalProperties,"$route",{enumerable:!0,get:()=>a.unref(b)}),Gs&&!mn&&b.value===Io&&(mn=!0,me(o.location).catch(wt=>{Pn.NODE_ENV!=="production"&&Kt("Unexpected error when starting the router:",wt)}));const nt={};for(const wt in Io)Object.defineProperty(nt,wt,{get:()=>b.value[wt],enumerable:!0});Te.provide(ah,yn),Te.provide(rm,a.shallowReactive(nt)),Te.provide(im,b);const rt=Te.unmount;gn.add(Te),Te.unmount=function(){gn.delete(Te),gn.size<1&&(k=Io,tt&&tt(),tt=null,b.value=Io,mn=!1,Ft=!1),rt()},Pn.NODE_ENV!=="production"&&Gs&&WS(Te,yn,e)}};function Wn(Te){return Te.reduce((nt,rt)=>nt.then(()=>Ne(rt)),Promise.resolve())}return yn}function IT(){return a.inject(ah)}function ad(t){return a.inject(rm)}const PT=[{name:"edit",path:"/edit",component:()=>Promise.resolve().then(()=>M9)},{name:"add",path:"/add",component:()=>Promise.resolve().then(()=>z9)},{path:"/profile",name:"profile",component:()=>Promise.resolve().then(()=>H9)},{name:"card-view",path:"/card",component:()=>Promise.resolve().then(()=>B2),children:[{name:"table",path:":table",component:()=>Promise.resolve().then(()=>B2),children:[{name:"card",path:":id",component:()=>Promise.resolve().then(()=>T7)}]}]}],Le=(t,e)=>{const n=t.__vccOpts||t;for(const[r,o]of e)n[r]=o;return n},RT={},NT={class:"bg-gray-200 w-full px-16 md:px-0 h-screen flex items-center justify-center"},BT={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"};function VT(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("div",NT,[a.createElementVNode("div",BT,[e[2]||(e[2]=a.createElementVNode("p",{class:"text-6xl md:text-7xl lg:text-9xl font-bold tracking-wider text-gray-300"}," 404 ",-1)),e[3]||(e[3]=a.createElementVNode("p",{class:"text-2xl md:text-3xl lg:text-5xl font-bold tracking-wider text-gray-500 mt-4"}," Сторінку не знайдено ",-1)),e[4]||(e[4]=a.createElementVNode("p",{class:"text-gray-500 mt-4 pb-4 border-b-2 text-center"}," Вибачте, така сторінка не існує ",-1)),a.createElementVNode("div",{onClick:e[0]||(e[0]=p=>t.$router.push("/")),class:"flex cursor-pointer items-center space-x-2 bg-blue-600 hover:bg-blue-700 text-gray-100 px-4 py-2 mt-6 rounded transition duration-150",title:"Return Home"},[...e[1]||(e[1]=[a.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor"},[a.createElementVNode("path",{"fill-rule":"evenodd",d:"M9.707 14.707a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 1.414L7.414 9H15a1 1 0 110 2H7.414l2.293 2.293a1 1 0 010 1.414z","clip-rule":"evenodd"})],-1),a.createElementVNode("span",null,"Повернутись на головну",-1)])])])])}const zT=Le(RT,[["render",VT]]),OT=t=>{const e=PT.map(r=>({...r}));return{router:MT({history:iT(),routes:[{path:"/404",name:"404",component:zT},{path:"/",name:"home",component:()=>Promise.resolve().then(()=>vq),children:[...t,...e,{path:"/:catchAll(.*)",component:()=>Promise.resolve().then(()=>OZ)}]}]}),routerData:e}},LT={props:{value:{type:null,default:()=>""},data:{type:Object},table:{type:String},name:String,data:Object,edit:{type:null,default:()=>!1},column:Object},methods:{async changeData(t){var e;try{const{data:n}=await Oe.get(`/api/form/${this.table}/${(e=this.data)==null?void 0:e.id}`);await Oe.put(`/api/table/${n==null?void 0:n.token}`,{...n,[this.name]:t}),await this.$emit("update-table")}catch(n){console.log(n)}}}},FT={key:1};function $T(t,e,n,r,o,d){var c,b;const p=a.resolveComponent("VsInlineEdit");return n.edit?(a.openBlock(),a.createBlock(p,{key:0,"model-value":n.value,onUpdateValue:d.changeData,title:((c=n.column)==null?void 0:c.ua)||((b=n.column)==null?void 0:b.text)},{default:a.withCtx(()=>{var k,E;return[a.createElementVNode("button",{class:a.normalizeClass([(k=n.value)!=null&&k.trim()?"underline decoration-dashed decoration-[1px] decoration-blue-600":null])},a.toDisplayString((E=n.value)!=null&&E.trim()?n.value:"-"),3)]}),_:1},8,["model-value","onUpdateValue","title"])):(a.openBlock(),a.createElementBlock("div",FT,a.toDisplayString(n.value||"-"),1))}const ch=Le(LT,[["render",$T]]),jT={},UT={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"};function HT(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",UT,[...e[0]||(e[0]=[a.createElementVNode("path",{d:"M20 6 9 17l-5-5"},null,-1)])])}const Dl=Le(jT,[["render",HT]]),WT={class:"w-[170px]"},qT={key:0,class:"p-1 border-b border-gray-200 dark:border-neutral-800"},GT={class:"flex flex-col gap-y-0.5 p-1 max-h-[220px] overflow-y-auto [&::-webkit-scrollbar]:h-2 [&::-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"},ZT=["value","onChange"],YT={class:"text-sm text-gray-800 ms-2"},XT={key:0,class:"flex items-center px-3 text-[13px] py-1 rounded-md cursor-pointer group"},wb={__name:"admin-badge-edit",props:{options:Array,value:[String,Number,Boolean]},emits:["update:value"],setup(t,{emit:e}){const n=e,r=t,o=a.ref(r.value),d=a.ref(""),p=a.ref("popover"),c=a.computed(()=>{var C;return((C=r.options)==null?void 0:C.length)>0}),b=a.computed(()=>{var C;return(C=r.options)==null?void 0:C.filter(T=>{var I,N,$;return($=(I=T==null?void 0:T.text)==null?void 0:I.toLowerCase())==null?void 0:$.includes((N=d.value)==null?void 0:N.toLowerCase())})}),k=C=>{o.value===C?o.value="":o.value=C,n("update:value",o),p.value.togglePopover()},E=async C=>{if(document.body.click(),C.stopPropagation(),c.value)p.value.togglePopover();else{const T=a.watch(()=>c.value,I=>{I&&(T(),p.value.togglePopover())})}};return(C,T)=>{const I=a.resolveComponent("VsPopover");return a.openBlock(),a.createBlock(I,{ref_key:"popover",ref:p},{reference:a.withCtx(()=>[a.createElementVNode("div",{onClick:E},[a.renderSlot(C.$slots,"default")])]),default:a.withCtx(()=>{var N,$;return[a.createElementVNode("div",WT,[((N=t.options)==null?void 0:N.length)>6?(a.openBlock(),a.createElementBlock("div",qT,[a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":T[0]||(T[0]=F=>d.value=F),type:"text",placeholder:"Пошук",class:"py-1.5 px-3 block w-full bg-gray-100 border-transparent rounded-lg text-sm placeholder:text-gray-500 focus:outline-none focus:border-teal-500 focus:ring-teal-500 focus:bg-white disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-transparent dark:text-neutral-400 dark:placeholder:text-neutral-400 dark:focus:ring-neutral-600 dark:focus:bg-neutral-900"},null,512),[[a.vModelText,d.value]])])):a.createCommentVNode("",!0),a.createElementVNode("div",GT,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(b.value,F=>(a.openBlock(),a.createElementBlock("label",{key:F==null?void 0:F.id,class:a.normalizeClass(["flex items-center px-3 py-1 rounded-md cursor-pointer group hover:bg-gray-100",{"bg-gray-100":o.value===(F==null?void 0:F.id)}])},[a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":T[1]||(T[1]=q=>o.value=q),value:F==null?void 0:F.id,type:"checkbox",class:"w-1 h-3 border-0 rounded-full appearance-none shrink-0 checked:bg-none",style:a.normalizeStyle({backgroundColor:(F==null?void 0:F.color)||"#ffffff"}),onChange:q=>k(F==null?void 0:F.id)},null,44,ZT),[[a.vModelCheckbox,o.value]]),a.createElementVNode("span",YT,a.toDisplayString(F==null?void 0:F.text),1),o.value===(F==null?void 0:F.id)?(a.openBlock(),a.createBlock(Dl,{key:0,class:"ml-auto size-3 shrink-0"})):a.createCommentVNode("",!0)],2))),128)),($=b.value)!=null&&$.length?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",XT," Нічого не знайдено "))])])]}),_:3},512)}}},KT={components:{AdminBadgeEdit:wb},props:{data:Object,name:String,table:String,column:Object,edit:{type:null,default:()=>!1}},computed:{getData(){var t;return(t=this.data)==null?void 0:t[this.name+"_data"]}},watch:{value(t){typeof t=="string"&&this.changeData(t)}},data(){var t,e;return{optionsList:[],value:(e=(t=this.data)==null?void 0:t[this.name+"_data"])==null?void 0:e.id}},methods:{async getOptions(){var t;try{const{data:e}=await Oe.get(`/api/suggest/${(t=this.column)==null?void 0:t.data}`);this.optionsList=e}catch{}},getBGColor(t){if(t!=null&&t.includes("#")){let e;if(/^#([A-Fa-f0-9]{3}){1,2}$/.test(t))return e=t.substring(1).split(""),e.length==3&&(e=[e[0],e[0],e[1],e[1],e[2],e[2]]),e="0x"+e.join(""),"rgba("+[e>>16&255,e>>8&255,e&255].join(",")+",0.1)";this.$notify({type:"error",message:"Невірний формат кольору",title:"Помилка"})}else if(typeof t=="string"){const e=document.createElement("div");e.style.color=t,document.body.appendChild(e);const n=getComputedStyle(e).color;return document.body.removeChild(e),n.replace("rgb","rgba").replace(")",", 0.1)")}else this.$notify({type:"error",message:"Невірний формат кольору",title:"Помилка"})},async changeData(t){var e,n;try{const r=await Oe.get(`/api/form/${this.table}/${(e=this.data)==null?void 0:e.id}`);await Oe.put(`/api/table/${(n=r==null?void 0:r.data)==null?void 0:n.token}`,{...r==null?void 0:r.data,[this.name]:t}),await this.$emit("update-table")}catch(r){console.log(r)}}}},JT={key:1,class:"px-[20px] py-[4px]"},QT={key:1,class:"flex justify-start w-full"},eA={key:1};function tA(t,e,n,r,o,d){var c,b,k;const p=a.resolveComponent("AdminBadgeEdit");return n.edit?(a.openBlock(),a.createBlock(p,{key:0,options:o.optionsList,value:o.value,"onUpdate:value":e[1]||(e[1]=E=>o.value=E)},{default:a.withCtx(()=>{var E,C,T;return[a.createElementVNode("div",{class:"flex justify-start w-full cursor-pointer",onClick:e[0]||(e[0]=(...I)=>d.getOptions&&d.getOptions(...I))},[d.getData?(a.openBlock(),a.createElementBlock("div",{key:0,class:"py-0.5 px-2.5 inline-flex items-center text-center text-nowrap gap-x-1.5 text-[11px] font-medium bg-green-100 text-green-800 rounded-full",style:a.normalizeStyle({backgroundColor:d.getBGColor((E=d.getData)==null?void 0:E.color),color:(C=d.getData)==null?void 0:C.color})},a.toDisplayString((T=d.getData)==null?void 0:T.text),5)):(a.openBlock(),a.createElementBlock("div",JT,"-"))])]}),_:1},8,["options","value"])):(a.openBlock(),a.createElementBlock("div",QT,[d.getData?(a.openBlock(),a.createElementBlock("div",{key:0,class:"py-0.5 px-2.5 inline-flex items-center gap-x-1.5 text-[11px] font-medium bg-green-100 text-green-800 rounded-full",style:a.normalizeStyle({backgroundColor:d.getBGColor((c=d.getData)==null?void 0:c.color),color:(b=d.getData)==null?void 0:b.color})},a.toDisplayString((k=d.getData)==null?void 0:k.text),5)):(a.openBlock(),a.createElementBlock("div",eA,"-"))]))}const kb=Le(KT,[["render",tA]]),nA={},rA={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-check"};function iA(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",rA,[...e[0]||(e[0]=[a.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),a.createElementVNode("path",{d:"M5 12l5 5l10 -10"},null,-1)])])}const Eb=Le(nA,[["render",iA]]),sA={components:{IconCheck:Eb},props:{value:Boolean,data:{type:Object},table:{type:String},name:String,data:Object,edit:{type:null,default:()=>!1},column:Object},data(){return{checkValue:this.value}},watch:{checkValue(t){this.changeData(t)}},methods:{async changeData(t){var e;try{const{data:n}=await Oe.get(`/api/form/${this.table}/${(e=this.data)==null?void 0:e.id}`);await Oe.put(`/api/table/${n==null?void 0:n.token}`,{...n,[this.name]:t}),await this.$emit("update-table")}catch(n){console.log(n)}}}},oA={key:0};function aA(t,e,n,r,o,d){const p=a.resolveComponent("IconCheck");return n.edit?(a.openBlock(),a.createElementBlock("div",oA,[a.createElementVNode("label",{class:a.normalizeClass(["w-[20px] h-[20px] rounded-md flex items-center justify-center duration-100 cursor-pointer",[o.checkValue?"bg-blue-400":"border"]])},[a.withDirectives(a.createElementVNode("input",{type:"checkbox",class:"hidden","onUpdate:modelValue":e[0]||(e[0]=c=>o.checkValue=c)},null,512),[[a.vModelCheckbox,o.checkValue]]),a.createVNode(p,{height:"18",width:"18",class:"text-white"})],2)])):(a.openBlock(),a.createElementBlock("div",{key:1,class:a.normalizeClass(["w-[20px] h-[20px] rounded-md flex items-center justify-center disabled",[n.value?"bg-blue-400":"border"]])},[a.createVNode(p,{height:"18",width:"18",class:"text-white"})],2))}const Da=Le(sA,[["render",aA]]),lA={components:{AdminBadgeEdit:wb},props:{data:Object,name:String,column:Object,table:String,edit:{type:Boolean,default:()=>!1}},data(){var t,e;return{optionsList:[],value:(e=(t=this.data)==null?void 0:t[this.name+"_data"])==null?void 0:e.id}},watch:{value(t){typeof t=="string"&&this.changeData(t)}},computed:{getData(){var t,e,n;return((e=(t=this.data)==null?void 0:t[this.name+"_data"])==null?void 0:e.text)||((n=this.data)==null?void 0:n[this.name+"_text"])}},methods:{async getOptions(){var t;try{const{data:e}=await Oe.get(`/api/suggest/${(t=this.column)==null?void 0:t.data}`);this.optionsList=e}catch{}},async changeData(t){var e,n;try{const r=await Oe.get(`/api/form/${this.table}/${(e=this.data)==null?void 0:e.id}`);await Oe.put(`/api/table/${(n=r==null?void 0:r.data)==null?void 0:n.token}`,{...r.data,[this.name]:t}),await this.$emit("update-table")}catch(r){console.log(r)}}}},cA={key:0},dA={key:1,class:"text-gray-600 cursor-pointer dark:text-neutral-400"},uA={key:1,class:"cursor-pointer px-[20px] py-[10px]"},hA={key:0},pA={key:1},fA={key:1};function mA(t,e,n,r,o,d){const p=a.resolveComponent("AdminBadgeEdit");return a.openBlock(),a.createElementBlock("div",null,[n.edit?(a.openBlock(),a.createBlock(p,{key:0,options:o.optionsList,value:o.value,"onUpdate:value":e[1]||(e[1]=c=>o.value=c)},{default:a.withCtx(()=>[a.createElementVNode("div",{onClick:e[0]||(e[0]=(...c)=>d.getOptions&&d.getOptions(...c))},[d.getData?(a.openBlock(),a.createElementBlock("div",cA,[typeof d.getData=="object"?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:0},a.renderList(d.getData,(c,b)=>(a.openBlock(),a.createElementBlock("div",{key:b,class:"text-gray-600 cursor-pointer dark:text-neutral-400"},a.toDisplayString(c),1))),128)):(a.openBlock(),a.createElementBlock("div",dA,a.toDisplayString(d.getData),1))])):(a.openBlock(),a.createElementBlock("div",uA,"-"))])]),_:1},8,["options","value"])):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[d.getData?(a.openBlock(),a.createElementBlock("div",hA,[typeof d.getData=="object"?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:0},a.renderList(d.getData,(c,b)=>(a.openBlock(),a.createElementBlock("div",{key:b},a.toDisplayString(c),1))),128)):(a.openBlock(),a.createElementBlock("div",pA,a.toDisplayString(d.getData),1))])):(a.openBlock(),a.createElementBlock("div",fA,"-"))],64))])}const Cb=Le(lA,[["render",mA]]),gA={props:{value:{type:[String,Number],default:()=>""},data:Object,name:String},computed:{getData(){var t,e;return((t=this.data)==null?void 0:t[this.name])||((e=this.data)==null?void 0:e[this.name+"_data"])}},methods:{}},yA={class:"flex justify-start w-full gap-[6px] flex-wrap"},_A={class:"p-2 bg-gray-100 text-gray-800 text-xs rounded-md dark:bg-neutral-700 dark:text-neutral-200"},bA={key:1};function xA(t,e,n,r,o,d){var p;return a.openBlock(),a.createElementBlock("div",yA,[(p=d.getData)!=null&&p.length?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:0},a.renderList(d.getData,c=>(a.openBlock(),a.createElementBlock("div",_A,a.toDisplayString(c),1))),256)):(a.openBlock(),a.createElementBlock("div",bA,"-"))])}const Sb=Le(gA,[["render",xA]]);//! moment.js
|
|
33
33
|
//! version : 2.30.1
|
|
34
34
|
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
|
|
35
35
|
//! license : MIT
|
|
@@ -38,7 +38,7 @@ var Tb;function ft(){return Tb.apply(null,arguments)}function vA(t){Tb=t}functio
|
|
|
38
38
|
[`+d+"] ";for(p in arguments[0])vn(arguments[0],p)&&(o+=p+": "+arguments[0][p]+", ");o=o.slice(0,-2)}else o=arguments[d];r.push(o)}Mb(t+`
|
|
39
39
|
Arguments: `+Array.prototype.slice.call(r).join("")+`
|
|
40
40
|
`+new Error().stack),n=!1}return e.apply(this,arguments)},e)}var Ib={};function Pb(t,e){ft.deprecationHandler!=null&&ft.deprecationHandler(t,e),Ib[t]||(Mb(e),Ib[t]=!0)}ft.suppressDeprecationWarnings=!1,ft.deprecationHandler=null;function Ts(t){return typeof Function<"u"&&t instanceof Function||Object.prototype.toString.call(t)==="[object Function]"}function kA(t){var e,n;for(n in t)vn(t,n)&&(e=t[n],Ts(e)?this[n]=e:this["_"+n]=e);this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function pm(t,e){var n=Ro({},t),r;for(r in e)vn(e,r)&&(Ma(t[r])&&Ma(e[r])?(n[r]={},Ro(n[r],t[r]),Ro(n[r],e[r])):e[r]!=null?n[r]=e[r]:delete n[r]);for(r in t)vn(t,r)&&!vn(e,r)&&Ma(t[r])&&(n[r]=Ro({},n[r]));return n}function fm(t){t!=null&&this.set(t)}var mm;Object.keys?mm=Object.keys:mm=function(t){var e,n=[];for(e in t)vn(t,e)&&n.push(e);return n};var EA={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function CA(t,e,n){var r=this._calendar[t]||this._calendar.sameElse;return Ts(r)?r.call(e,n):r}function As(t,e,n){var r=""+Math.abs(t),o=e-r.length,d=t>=0;return(d?n?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+r}var gm=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,uh=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,ym={},Ml={};function Dt(t,e,n,r){var o=r;typeof r=="string"&&(o=function(){return this[r]()}),t&&(Ml[t]=o),e&&(Ml[e[0]]=function(){return As(o.apply(this,arguments),e[1],e[2])}),n&&(Ml[n]=function(){return this.localeData().ordinal(o.apply(this,arguments),t)})}function SA(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function TA(t){var e=t.match(gm),n,r;for(n=0,r=e.length;n<r;n++)Ml[e[n]]?e[n]=Ml[e[n]]:e[n]=SA(e[n]);return function(o){var d="",p;for(p=0;p<r;p++)d+=Ts(e[p])?e[p].call(o,t):e[p];return d}}function hh(t,e){return t.isValid()?(e=Rb(e,t.localeData()),ym[e]=ym[e]||TA(e),ym[e](t)):t.localeData().invalidDate()}function Rb(t,e){var n=5;function r(o){return e.longDateFormat(o)||o}for(uh.lastIndex=0;n>=0&&uh.test(t);)t=t.replace(uh,r),uh.lastIndex=0,n-=1;return t}var AA={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function DA(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.match(gm).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[t])}var MA="Invalid date";function IA(){return this._invalidDate}var PA="%d",RA=/\d{1,2}/;function NA(t){return this._ordinal.replace("%d",t)}var BA={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function VA(t,e,n,r){var o=this._relativeTime[n];return Ts(o)?o(t,e,n,r):o.replace(/%d/i,t)}function zA(t,e){var n=this._relativeTime[t>0?"future":"past"];return Ts(n)?n(e):n.replace(/%s/i,e)}var Nb={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function Ki(t){return typeof t=="string"?Nb[t]||Nb[t.toLowerCase()]:void 0}function _m(t){var e={},n,r;for(r in t)vn(t,r)&&(n=Ki(r),n&&(e[n]=t[r]));return e}var OA={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function LA(t){var e=[],n;for(n in t)vn(t,n)&&e.push({unit:n,priority:OA[n]});return e.sort(function(r,o){return r.priority-o.priority}),e}var Bb=/\d/,Ii=/\d\d/,Vb=/\d{3}/,bm=/\d{4}/,ph=/[+-]?\d{6}/,Gn=/\d\d?/,zb=/\d\d\d\d?/,Ob=/\d\d\d\d\d\d?/,fh=/\d{1,3}/,xm=/\d{1,4}/,mh=/[+-]?\d{1,6}/,Il=/\d+/,gh=/[+-]?\d+/,FA=/Z|[+-]\d\d:?\d\d/gi,yh=/Z|[+-]\d\d(?::?\d\d)?/gi,$A=/[+-]?\d+(\.\d{1,3})?/,dd=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Pl=/^[1-9]\d?/,vm=/^([1-9]\d|\d)/,_h;_h={};function bt(t,e,n){_h[t]=Ts(e)?e:function(r,o){return r&&n?n:e}}function jA(t,e){return vn(_h,t)?_h[t](e._strict,e._locale):new RegExp(UA(t))}function UA(t){return Xs(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,n,r,o,d){return n||r||o||d}))}function Xs(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Ji(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function sn(t){var e=+t,n=0;return e!==0&&isFinite(e)&&(n=Ji(e)),n}var wm={};function Bn(t,e){var n,r=e,o;for(typeof t=="string"&&(t=[t]),Ys(e)&&(r=function(d,p){p[e]=sn(d)}),o=t.length,n=0;n<o;n++)wm[t[n]]=r}function ud(t,e){Bn(t,function(n,r,o,d){o._w=o._w||{},e(n,o._w,o,d)})}function HA(t,e,n){e!=null&&vn(wm,t)&&wm[t](e,n._a,n,t)}function bh(t){return t%4===0&&t%100!==0||t%400===0}var Ur=0,Ks=1,Ds=2,xr=3,ps=4,Js=5,Ia=6,WA=7,qA=8;Dt("Y",0,0,function(){var t=this.year();return t<=9999?As(t,4):"+"+t}),Dt(0,["YY",2],0,function(){return this.year()%100}),Dt(0,["YYYY",4],0,"year"),Dt(0,["YYYYY",5],0,"year"),Dt(0,["YYYYYY",6,!0],0,"year"),bt("Y",gh),bt("YY",Gn,Ii),bt("YYYY",xm,bm),bt("YYYYY",mh,ph),bt("YYYYYY",mh,ph),Bn(["YYYYY","YYYYYY"],Ur),Bn("YYYY",function(t,e){e[Ur]=t.length===2?ft.parseTwoDigitYear(t):sn(t)}),Bn("YY",function(t,e){e[Ur]=ft.parseTwoDigitYear(t)}),Bn("Y",function(t,e){e[Ur]=parseInt(t,10)});function hd(t){return bh(t)?366:365}ft.parseTwoDigitYear=function(t){return sn(t)+(sn(t)>68?1900:2e3)};var Lb=Rl("FullYear",!0);function GA(){return bh(this.year())}function Rl(t,e){return function(n){return n!=null?(Fb(this,t,n),ft.updateOffset(this,e),this):pd(this,t)}}function pd(t,e){if(!t.isValid())return NaN;var n=t._d,r=t._isUTC;switch(e){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function Fb(t,e,n){var r,o,d,p,c;if(!(!t.isValid()||isNaN(n))){switch(r=t._d,o=t._isUTC,e){case"Milliseconds":return void(o?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(o?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(o?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(o?r.setUTCHours(n):r.setHours(n));case"Date":return void(o?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}d=n,p=t.month(),c=t.date(),c=c===29&&p===1&&!bh(d)?28:c,o?r.setUTCFullYear(d,p,c):r.setFullYear(d,p,c)}}function ZA(t){return t=Ki(t),Ts(this[t])?this[t]():this}function YA(t,e){if(typeof t=="object"){t=_m(t);var n=LA(t),r,o=n.length;for(r=0;r<o;r++)this[n[r].unit](t[n[r].unit])}else if(t=Ki(t),Ts(this[t]))return this[t](e);return this}function XA(t,e){return(t%e+e)%e}var dr;Array.prototype.indexOf?dr=Array.prototype.indexOf:dr=function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1};function km(t,e){if(isNaN(t)||isNaN(e))return NaN;var n=XA(e,12);return t+=(e-n)/12,n===1?bh(t)?29:28:31-n%7%2}Dt("M",["MM",2],"Mo",function(){return this.month()+1}),Dt("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),Dt("MMMM",0,0,function(t){return this.localeData().months(this,t)}),bt("M",Gn,Pl),bt("MM",Gn,Ii),bt("MMM",function(t,e){return e.monthsShortRegex(t)}),bt("MMMM",function(t,e){return e.monthsRegex(t)}),Bn(["M","MM"],function(t,e){e[Ks]=sn(t)-1}),Bn(["MMM","MMMM"],function(t,e,n,r){var o=n._locale.monthsParse(t,r,n._strict);o!=null?e[Ks]=o:Zt(n).invalidMonth=t});var KA="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),$b="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),jb=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,JA=dd,QA=dd;function eD(t,e){return t?us(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||jb).test(e)?"format":"standalone"][t.month()]:us(this._months)?this._months:this._months.standalone}function tD(t,e){return t?us(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[jb.test(e)?"format":"standalone"][t.month()]:us(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function nD(t,e,n){var r,o,d,p=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)d=Ss([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(d,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(d,"").toLocaleLowerCase();return n?e==="MMM"?(o=dr.call(this._shortMonthsParse,p),o!==-1?o:null):(o=dr.call(this._longMonthsParse,p),o!==-1?o:null):e==="MMM"?(o=dr.call(this._shortMonthsParse,p),o!==-1?o:(o=dr.call(this._longMonthsParse,p),o!==-1?o:null)):(o=dr.call(this._longMonthsParse,p),o!==-1?o:(o=dr.call(this._shortMonthsParse,p),o!==-1?o:null))}function rD(t,e,n){var r,o,d;if(this._monthsParseExact)return nD.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(o=Ss([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),!n&&!this._monthsParse[r]&&(d="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[r]=new RegExp(d.replace(".",""),"i")),n&&e==="MMMM"&&this._longMonthsParse[r].test(t))return r;if(n&&e==="MMM"&&this._shortMonthsParse[r].test(t))return r;if(!n&&this._monthsParse[r].test(t))return r}}function Ub(t,e){if(!t.isValid())return t;if(typeof e=="string"){if(/^\d+$/.test(e))e=sn(e);else if(e=t.localeData().monthsParse(e),!Ys(e))return t}var n=e,r=t.date();return r=r<29?r:Math.min(r,km(t.year(),n)),t._isUTC?t._d.setUTCMonth(n,r):t._d.setMonth(n,r),t}function Hb(t){return t!=null?(Ub(this,t),ft.updateOffset(this,!0),this):pd(this,"Month")}function iD(){return km(this.year(),this.month())}function sD(t){return this._monthsParseExact?(vn(this,"_monthsRegex")||Wb.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(vn(this,"_monthsShortRegex")||(this._monthsShortRegex=JA),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)}function oD(t){return this._monthsParseExact?(vn(this,"_monthsRegex")||Wb.call(this),t?this._monthsStrictRegex:this._monthsRegex):(vn(this,"_monthsRegex")||(this._monthsRegex=QA),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)}function Wb(){function t(b,k){return k.length-b.length}var e=[],n=[],r=[],o,d,p,c;for(o=0;o<12;o++)d=Ss([2e3,o]),p=Xs(this.monthsShort(d,"")),c=Xs(this.months(d,"")),e.push(p),n.push(c),r.push(c),r.push(p);e.sort(t),n.sort(t),r.sort(t),this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+e.join("|")+")","i")}function aD(t,e,n,r,o,d,p){var c;return t<100&&t>=0?(c=new Date(t+400,e,n,r,o,d,p),isFinite(c.getFullYear())&&c.setFullYear(t)):c=new Date(t,e,n,r,o,d,p),c}function fd(t){var e,n;return t<100&&t>=0?(n=Array.prototype.slice.call(arguments),n[0]=t+400,e=new Date(Date.UTC.apply(null,n)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)):e=new Date(Date.UTC.apply(null,arguments)),e}function xh(t,e,n){var r=7+e-n,o=(7+fd(t,0,r).getUTCDay()-e)%7;return-o+r-1}function qb(t,e,n,r,o){var d=(7+n-r)%7,p=xh(t,r,o),c=1+7*(e-1)+d+p,b,k;return c<=0?(b=t-1,k=hd(b)+c):c>hd(t)?(b=t+1,k=c-hd(t)):(b=t,k=c),{year:b,dayOfYear:k}}function md(t,e,n){var r=xh(t.year(),e,n),o=Math.floor((t.dayOfYear()-r-1)/7)+1,d,p;return o<1?(p=t.year()-1,d=o+Qs(p,e,n)):o>Qs(t.year(),e,n)?(d=o-Qs(t.year(),e,n),p=t.year()+1):(p=t.year(),d=o),{week:d,year:p}}function Qs(t,e,n){var r=xh(t,e,n),o=xh(t+1,e,n);return(hd(t)-r+o)/7}Dt("w",["ww",2],"wo","week"),Dt("W",["WW",2],"Wo","isoWeek"),bt("w",Gn,Pl),bt("ww",Gn,Ii),bt("W",Gn,Pl),bt("WW",Gn,Ii),ud(["w","ww","W","WW"],function(t,e,n,r){e[r.substr(0,1)]=sn(t)});function lD(t){return md(t,this._week.dow,this._week.doy).week}var cD={dow:0,doy:6};function dD(){return this._week.dow}function uD(){return this._week.doy}function hD(t){var e=this.localeData().week(this);return t==null?e:this.add((t-e)*7,"d")}function pD(t){var e=md(this,1,4).week;return t==null?e:this.add((t-e)*7,"d")}Dt("d",0,"do","day"),Dt("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),Dt("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),Dt("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),Dt("e",0,0,"weekday"),Dt("E",0,0,"isoWeekday"),bt("d",Gn),bt("e",Gn),bt("E",Gn),bt("dd",function(t,e){return e.weekdaysMinRegex(t)}),bt("ddd",function(t,e){return e.weekdaysShortRegex(t)}),bt("dddd",function(t,e){return e.weekdaysRegex(t)}),ud(["dd","ddd","dddd"],function(t,e,n,r){var o=n._locale.weekdaysParse(t,r,n._strict);o!=null?e.d=o:Zt(n).invalidWeekday=t}),ud(["d","e","E"],function(t,e,n,r){e[r]=sn(t)});function fD(t,e){return typeof t!="string"?t:isNaN(t)?(t=e.weekdaysParse(t),typeof t=="number"?t:null):parseInt(t,10)}function mD(t,e){return typeof t=="string"?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}function Em(t,e){return t.slice(e,7).concat(t.slice(0,e))}var gD="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Gb="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),yD="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),_D=dd,bD=dd,xD=dd;function vD(t,e){var n=us(this._weekdays)?this._weekdays:this._weekdays[t&&t!==!0&&this._weekdays.isFormat.test(e)?"format":"standalone"];return t===!0?Em(n,this._week.dow):t?n[t.day()]:n}function wD(t){return t===!0?Em(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort}function kD(t){return t===!0?Em(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin}function ED(t,e,n){var r,o,d,p=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)d=Ss([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(d,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(d,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(d,"").toLocaleLowerCase();return n?e==="dddd"?(o=dr.call(this._weekdaysParse,p),o!==-1?o:null):e==="ddd"?(o=dr.call(this._shortWeekdaysParse,p),o!==-1?o:null):(o=dr.call(this._minWeekdaysParse,p),o!==-1?o:null):e==="dddd"?(o=dr.call(this._weekdaysParse,p),o!==-1||(o=dr.call(this._shortWeekdaysParse,p),o!==-1)?o:(o=dr.call(this._minWeekdaysParse,p),o!==-1?o:null)):e==="ddd"?(o=dr.call(this._shortWeekdaysParse,p),o!==-1||(o=dr.call(this._weekdaysParse,p),o!==-1)?o:(o=dr.call(this._minWeekdaysParse,p),o!==-1?o:null)):(o=dr.call(this._minWeekdaysParse,p),o!==-1||(o=dr.call(this._weekdaysParse,p),o!==-1)?o:(o=dr.call(this._shortWeekdaysParse,p),o!==-1?o:null))}function CD(t,e,n){var r,o,d;if(this._weekdaysParseExact)return ED.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(o=Ss([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(d="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[r]=new RegExp(d.replace(".",""),"i")),n&&e==="dddd"&&this._fullWeekdaysParse[r].test(t))return r;if(n&&e==="ddd"&&this._shortWeekdaysParse[r].test(t))return r;if(n&&e==="dd"&&this._minWeekdaysParse[r].test(t))return r;if(!n&&this._weekdaysParse[r].test(t))return r}}function SD(t){if(!this.isValid())return t!=null?this:NaN;var e=pd(this,"Day");return t!=null?(t=fD(t,this.localeData()),this.add(t-e,"d")):e}function TD(t){if(!this.isValid())return t!=null?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return t==null?e:this.add(t-e,"d")}function AD(t){if(!this.isValid())return t!=null?this:NaN;if(t!=null){var e=mD(t,this.localeData());return this.day(this.day()%7?e:e-7)}else return this.day()||7}function DD(t){return this._weekdaysParseExact?(vn(this,"_weekdaysRegex")||Cm.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(vn(this,"_weekdaysRegex")||(this._weekdaysRegex=_D),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}function MD(t){return this._weekdaysParseExact?(vn(this,"_weekdaysRegex")||Cm.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(vn(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=bD),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function ID(t){return this._weekdaysParseExact?(vn(this,"_weekdaysRegex")||Cm.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(vn(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=xD),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Cm(){function t(E,C){return C.length-E.length}var e=[],n=[],r=[],o=[],d,p,c,b,k;for(d=0;d<7;d++)p=Ss([2e3,1]).day(d),c=Xs(this.weekdaysMin(p,"")),b=Xs(this.weekdaysShort(p,"")),k=Xs(this.weekdays(p,"")),e.push(c),n.push(b),r.push(k),o.push(c),o.push(b),o.push(k);e.sort(t),n.sort(t),r.sort(t),o.sort(t),this._weekdaysRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+e.join("|")+")","i")}function Sm(){return this.hours()%12||12}function PD(){return this.hours()||24}Dt("H",["HH",2],0,"hour"),Dt("h",["hh",2],0,Sm),Dt("k",["kk",2],0,PD),Dt("hmm",0,0,function(){return""+Sm.apply(this)+As(this.minutes(),2)}),Dt("hmmss",0,0,function(){return""+Sm.apply(this)+As(this.minutes(),2)+As(this.seconds(),2)}),Dt("Hmm",0,0,function(){return""+this.hours()+As(this.minutes(),2)}),Dt("Hmmss",0,0,function(){return""+this.hours()+As(this.minutes(),2)+As(this.seconds(),2)});function Zb(t,e){Dt(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}Zb("a",!0),Zb("A",!1);function Yb(t,e){return e._meridiemParse}bt("a",Yb),bt("A",Yb),bt("H",Gn,vm),bt("h",Gn,Pl),bt("k",Gn,Pl),bt("HH",Gn,Ii),bt("hh",Gn,Ii),bt("kk",Gn,Ii),bt("hmm",zb),bt("hmmss",Ob),bt("Hmm",zb),bt("Hmmss",Ob),Bn(["H","HH"],xr),Bn(["k","kk"],function(t,e,n){var r=sn(t);e[xr]=r===24?0:r}),Bn(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t}),Bn(["h","hh"],function(t,e,n){e[xr]=sn(t),Zt(n).bigHour=!0}),Bn("hmm",function(t,e,n){var r=t.length-2;e[xr]=sn(t.substr(0,r)),e[ps]=sn(t.substr(r)),Zt(n).bigHour=!0}),Bn("hmmss",function(t,e,n){var r=t.length-4,o=t.length-2;e[xr]=sn(t.substr(0,r)),e[ps]=sn(t.substr(r,2)),e[Js]=sn(t.substr(o)),Zt(n).bigHour=!0}),Bn("Hmm",function(t,e,n){var r=t.length-2;e[xr]=sn(t.substr(0,r)),e[ps]=sn(t.substr(r))}),Bn("Hmmss",function(t,e,n){var r=t.length-4,o=t.length-2;e[xr]=sn(t.substr(0,r)),e[ps]=sn(t.substr(r,2)),e[Js]=sn(t.substr(o))});function RD(t){return(t+"").toLowerCase().charAt(0)==="p"}var ND=/[ap]\.?m?\.?/i,BD=Rl("Hours",!0);function VD(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"}var Xb={calendar:EA,longDateFormat:AA,invalidDate:MA,ordinal:PA,dayOfMonthOrdinalParse:RA,relativeTime:BA,months:KA,monthsShort:$b,week:cD,weekdays:gD,weekdaysMin:yD,weekdaysShort:Gb,meridiemParse:ND},Jn={},gd={},yd;function zD(t,e){var n,r=Math.min(t.length,e.length);for(n=0;n<r;n+=1)if(t[n]!==e[n])return n;return r}function Kb(t){return t&&t.toLowerCase().replace("_","-")}function OD(t){for(var e=0,n,r,o,d;e<t.length;){for(d=Kb(t[e]).split("-"),n=d.length,r=Kb(t[e+1]),r=r?r.split("-"):null;n>0;){if(o=vh(d.slice(0,n).join("-")),o)return o;if(r&&r.length>=n&&zD(d,r)>=n-1)break;n--}e++}return yd}function LD(t){return!!(t&&t.match("^[^/\\\\]*$"))}function vh(t){var e=null,n;if(Jn[t]===void 0&&typeof module<"u"&&module&&module.exports&&LD(t))try{e=yd._abbr,n=require,n("./locale/"+t),No(e)}catch{Jn[t]=null}return Jn[t]}function No(t,e){var n;return t&&(yi(e)?n=eo(t):n=Tm(t,e),n?yd=n:typeof console<"u"&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),yd._abbr}function Tm(t,e){if(e!==null){var n,r=Xb;if(e.abbr=t,Jn[t]!=null)Pb("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=Jn[t]._config;else if(e.parentLocale!=null)if(Jn[e.parentLocale]!=null)r=Jn[e.parentLocale]._config;else if(n=vh(e.parentLocale),n!=null)r=n._config;else return gd[e.parentLocale]||(gd[e.parentLocale]=[]),gd[e.parentLocale].push({name:t,config:e}),null;return Jn[t]=new fm(pm(r,e)),gd[t]&&gd[t].forEach(function(o){Tm(o.name,o.config)}),No(t),Jn[t]}else return delete Jn[t],null}function FD(t,e){if(e!=null){var n,r,o=Xb;Jn[t]!=null&&Jn[t].parentLocale!=null?Jn[t].set(pm(Jn[t]._config,e)):(r=vh(t),r!=null&&(o=r._config),e=pm(o,e),r==null&&(e.abbr=t),n=new fm(e),n.parentLocale=Jn[t],Jn[t]=n),No(t)}else Jn[t]!=null&&(Jn[t].parentLocale!=null?(Jn[t]=Jn[t].parentLocale,t===No()&&No(t)):Jn[t]!=null&&delete Jn[t]);return Jn[t]}function eo(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return yd;if(!us(t)){if(e=vh(t),e)return e;t=[t]}return OD(t)}function $D(){return mm(Jn)}function Am(t){var e,n=t._a;return n&&Zt(t).overflow===-2&&(e=n[Ks]<0||n[Ks]>11?Ks:n[Ds]<1||n[Ds]>km(n[Ur],n[Ks])?Ds:n[xr]<0||n[xr]>24||n[xr]===24&&(n[ps]!==0||n[Js]!==0||n[Ia]!==0)?xr:n[ps]<0||n[ps]>59?ps:n[Js]<0||n[Js]>59?Js:n[Ia]<0||n[Ia]>999?Ia:-1,Zt(t)._overflowDayOfYear&&(e<Ur||e>Ds)&&(e=Ds),Zt(t)._overflowWeeks&&e===-1&&(e=WA),Zt(t)._overflowWeekday&&e===-1&&(e=qA),Zt(t).overflow=e),t}var jD=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,UD=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,HD=/Z|[+-]\d\d(?::?\d\d)?/,wh=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Dm=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],WD=/^\/?Date\((-?\d+)/i,qD=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,GD={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Jb(t){var e,n,r=t._i,o=jD.exec(r)||UD.exec(r),d,p,c,b,k=wh.length,E=Dm.length;if(o){for(Zt(t).iso=!0,e=0,n=k;e<n;e++)if(wh[e][1].exec(o[1])){p=wh[e][0],d=wh[e][2]!==!1;break}if(p==null){t._isValid=!1;return}if(o[3]){for(e=0,n=E;e<n;e++)if(Dm[e][1].exec(o[3])){c=(o[2]||" ")+Dm[e][0];break}if(c==null){t._isValid=!1;return}}if(!d&&c!=null){t._isValid=!1;return}if(o[4])if(HD.exec(o[4]))b="Z";else{t._isValid=!1;return}t._f=p+(c||"")+(b||""),Im(t)}else t._isValid=!1}function ZD(t,e,n,r,o,d){var p=[YD(t),$b.indexOf(e),parseInt(n,10),parseInt(r,10),parseInt(o,10)];return d&&p.push(parseInt(d,10)),p}function YD(t){var e=parseInt(t,10);return e<=49?2e3+e:e<=999?1900+e:e}function XD(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function KD(t,e,n){if(t){var r=Gb.indexOf(t),o=new Date(e[0],e[1],e[2]).getDay();if(r!==o)return Zt(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}function JD(t,e,n){if(t)return GD[t];if(e)return 0;var r=parseInt(n,10),o=r%100,d=(r-o)/100;return d*60+o}function Qb(t){var e=qD.exec(XD(t._i)),n;if(e){if(n=ZD(e[4],e[3],e[2],e[5],e[6],e[7]),!KD(e[1],n,t))return;t._a=n,t._tzm=JD(e[8],e[9],e[10]),t._d=fd.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),Zt(t).rfc2822=!0}else t._isValid=!1}function QD(t){var e=WD.exec(t._i);if(e!==null){t._d=new Date(+e[1]);return}if(Jb(t),t._isValid===!1)delete t._isValid;else return;if(Qb(t),t._isValid===!1)delete t._isValid;else return;t._strict?t._isValid=!1:ft.createFromInputFallback(t)}ft.createFromInputFallback=Xi("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))});function Nl(t,e,n){return t??e??n}function eM(t){var e=new Date(ft.now());return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function Mm(t){var e,n,r=[],o,d,p;if(!t._d){for(o=eM(t),t._w&&t._a[Ds]==null&&t._a[Ks]==null&&tM(t),t._dayOfYear!=null&&(p=Nl(t._a[Ur],o[Ur]),(t._dayOfYear>hd(p)||t._dayOfYear===0)&&(Zt(t)._overflowDayOfYear=!0),n=fd(p,0,t._dayOfYear),t._a[Ks]=n.getUTCMonth(),t._a[Ds]=n.getUTCDate()),e=0;e<3&&t._a[e]==null;++e)t._a[e]=r[e]=o[e];for(;e<7;e++)t._a[e]=r[e]=t._a[e]==null?e===2?1:0:t._a[e];t._a[xr]===24&&t._a[ps]===0&&t._a[Js]===0&&t._a[Ia]===0&&(t._nextDay=!0,t._a[xr]=0),t._d=(t._useUTC?fd:aD).apply(null,r),d=t._useUTC?t._d.getUTCDay():t._d.getDay(),t._tzm!=null&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[xr]=24),t._w&&typeof t._w.d<"u"&&t._w.d!==d&&(Zt(t).weekdayMismatch=!0)}}function tM(t){var e,n,r,o,d,p,c,b,k;e=t._w,e.GG!=null||e.W!=null||e.E!=null?(d=1,p=4,n=Nl(e.GG,t._a[Ur],md(Zn(),1,4).year),r=Nl(e.W,1),o=Nl(e.E,1),(o<1||o>7)&&(b=!0)):(d=t._locale._week.dow,p=t._locale._week.doy,k=md(Zn(),d,p),n=Nl(e.gg,t._a[Ur],k.year),r=Nl(e.w,k.week),e.d!=null?(o=e.d,(o<0||o>6)&&(b=!0)):e.e!=null?(o=e.e+d,(e.e<0||e.e>6)&&(b=!0)):o=d),r<1||r>Qs(n,d,p)?Zt(t)._overflowWeeks=!0:b!=null?Zt(t)._overflowWeekday=!0:(c=qb(n,r,o,d,p),t._a[Ur]=c.year,t._dayOfYear=c.dayOfYear)}ft.ISO_8601=function(){},ft.RFC_2822=function(){};function Im(t){if(t._f===ft.ISO_8601){Jb(t);return}if(t._f===ft.RFC_2822){Qb(t);return}t._a=[],Zt(t).empty=!0;var e=""+t._i,n,r,o,d,p,c=e.length,b=0,k,E;for(o=Rb(t._f,t._locale).match(gm)||[],E=o.length,n=0;n<E;n++)d=o[n],r=(e.match(jA(d,t))||[])[0],r&&(p=e.substr(0,e.indexOf(r)),p.length>0&&Zt(t).unusedInput.push(p),e=e.slice(e.indexOf(r)+r.length),b+=r.length),Ml[d]?(r?Zt(t).empty=!1:Zt(t).unusedTokens.push(d),HA(d,r,t)):t._strict&&!r&&Zt(t).unusedTokens.push(d);Zt(t).charsLeftOver=c-b,e.length>0&&Zt(t).unusedInput.push(e),t._a[xr]<=12&&Zt(t).bigHour===!0&&t._a[xr]>0&&(Zt(t).bigHour=void 0),Zt(t).parsedDateParts=t._a.slice(0),Zt(t).meridiem=t._meridiem,t._a[xr]=nM(t._locale,t._a[xr],t._meridiem),k=Zt(t).era,k!==null&&(t._a[Ur]=t._locale.erasConvertYear(k,t._a[Ur])),Mm(t),Am(t)}function nM(t,e,n){var r;return n==null?e:t.meridiemHour!=null?t.meridiemHour(e,n):(t.isPM!=null&&(r=t.isPM(n),r&&e<12&&(e+=12),!r&&e===12&&(e=0)),e)}function rM(t){var e,n,r,o,d,p,c=!1,b=t._f.length;if(b===0){Zt(t).invalidFormat=!0,t._d=new Date(NaN);return}for(o=0;o<b;o++)d=0,p=!1,e=hm({},t),t._useUTC!=null&&(e._useUTC=t._useUTC),e._f=t._f[o],Im(e),dm(e)&&(p=!0),d+=Zt(e).charsLeftOver,d+=Zt(e).unusedTokens.length*10,Zt(e).score=d,c?d<r&&(r=d,n=e):(r==null||d<r||p)&&(r=d,n=e,p&&(c=!0));Ro(t,n||e)}function iM(t){if(!t._d){var e=_m(t._i),n=e.day===void 0?e.date:e.day;t._a=Ab([e.year,e.month,n,e.hour,e.minute,e.second,e.millisecond],function(r){return r&&parseInt(r,10)}),Mm(t)}}function sM(t){var e=new cd(Am(ex(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function ex(t){var e=t._i,n=t._f;return t._locale=t._locale||eo(t._l),e===null||n===void 0&&e===""?dh({nullInput:!0}):(typeof e=="string"&&(t._i=e=t._locale.preparse(e)),hs(e)?new cd(Am(e)):(ld(e)?t._d=e:us(n)?rM(t):n?Im(t):oM(t),dm(t)||(t._d=null),t))}function oM(t){var e=t._i;yi(e)?t._d=new Date(ft.now()):ld(e)?t._d=new Date(e.valueOf()):typeof e=="string"?QD(t):us(e)?(t._a=Ab(e.slice(0),function(n){return parseInt(n,10)}),Mm(t)):Ma(e)?iM(t):Ys(e)?t._d=new Date(e):ft.createFromInputFallback(t)}function tx(t,e,n,r,o){var d={};return(e===!0||e===!1)&&(r=e,e=void 0),(n===!0||n===!1)&&(r=n,n=void 0),(Ma(t)&&lm(t)||us(t)&&t.length===0)&&(t=void 0),d._isAMomentObject=!0,d._useUTC=d._isUTC=o,d._l=n,d._i=t,d._f=e,d._strict=r,sM(d)}function Zn(t,e,n,r){return tx(t,e,n,r,!1)}var aM=Xi("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=Zn.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:dh()}),lM=Xi("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=Zn.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:dh()});function nx(t,e){var n,r;if(e.length===1&&us(e[0])&&(e=e[0]),!e.length)return Zn();for(n=e[0],r=1;r<e.length;++r)(!e[r].isValid()||e[r][t](n))&&(n=e[r]);return n}function cM(){var t=[].slice.call(arguments,0);return nx("isBefore",t)}function dM(){var t=[].slice.call(arguments,0);return nx("isAfter",t)}var uM=function(){return Date.now?Date.now():+new Date},_d=["year","quarter","month","week","day","hour","minute","second","millisecond"];function hM(t){var e,n=!1,r,o=_d.length;for(e in t)if(vn(t,e)&&!(dr.call(_d,e)!==-1&&(t[e]==null||!isNaN(t[e]))))return!1;for(r=0;r<o;++r)if(t[_d[r]]){if(n)return!1;parseFloat(t[_d[r]])!==sn(t[_d[r]])&&(n=!0)}return!0}function pM(){return this._isValid}function fM(){return fs(NaN)}function kh(t){var e=_m(t),n=e.year||0,r=e.quarter||0,o=e.month||0,d=e.week||e.isoWeek||0,p=e.day||0,c=e.hour||0,b=e.minute||0,k=e.second||0,E=e.millisecond||0;this._isValid=hM(e),this._milliseconds=+E+k*1e3+b*6e4+c*1e3*60*60,this._days=+p+d*7,this._months=+o+r*3+n*12,this._data={},this._locale=eo(),this._bubble()}function Eh(t){return t instanceof kh}function Pm(t){return t<0?Math.round(-1*t)*-1:Math.round(t)}function mM(t,e,n){var r=Math.min(t.length,e.length),o=Math.abs(t.length-e.length),d=0,p;for(p=0;p<r;p++)sn(t[p])!==sn(e[p])&&d++;return d+o}function rx(t,e){Dt(t,0,0,function(){var n=this.utcOffset(),r="+";return n<0&&(n=-n,r="-"),r+As(~~(n/60),2)+e+As(~~n%60,2)})}rx("Z",":"),rx("ZZ",""),bt("Z",yh),bt("ZZ",yh),Bn(["Z","ZZ"],function(t,e,n){n._useUTC=!0,n._tzm=Rm(yh,t)});var gM=/([\+\-]|\d\d)/gi;function Rm(t,e){var n=(e||"").match(t),r,o,d;return n===null?null:(r=n[n.length-1]||[],o=(r+"").match(gM)||["-",0,0],d=+(o[1]*60)+sn(o[2]),d===0?0:o[0]==="+"?d:-d)}function Nm(t,e){var n,r;return e._isUTC?(n=e.clone(),r=(hs(t)||ld(t)?t.valueOf():Zn(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),ft.updateOffset(n,!1),n):Zn(t).local()}function Bm(t){return-Math.round(t._d.getTimezoneOffset())}ft.updateOffset=function(){};function yM(t,e,n){var r=this._offset||0,o;if(!this.isValid())return t!=null?this:NaN;if(t!=null){if(typeof t=="string"){if(t=Rm(yh,t),t===null)return this}else Math.abs(t)<16&&!n&&(t=t*60);return!this._isUTC&&e&&(o=Bm(this)),this._offset=t,this._isUTC=!0,o!=null&&this.add(o,"m"),r!==t&&(!e||this._changeInProgress?ax(this,fs(t-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,ft.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?r:Bm(this)}function _M(t,e){return t!=null?(typeof t!="string"&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function bM(t){return this.utcOffset(0,t)}function xM(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Bm(this),"m")),this}function vM(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var t=Rm(FA,this._i);t!=null?this.utcOffset(t):this.utcOffset(0,!0)}return this}function wM(t){return this.isValid()?(t=t?Zn(t).utcOffset():0,(this.utcOffset()-t)%60===0):!1}function kM(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function EM(){if(!yi(this._isDSTShifted))return this._isDSTShifted;var t={},e;return hm(t,this),t=ex(t),t._a?(e=t._isUTC?Ss(t._a):Zn(t._a),this._isDSTShifted=this.isValid()&&mM(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function CM(){return this.isValid()?!this._isUTC:!1}function SM(){return this.isValid()?this._isUTC:!1}function ix(){return this.isValid()?this._isUTC&&this._offset===0:!1}var TM=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,AM=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function fs(t,e){var n=t,r=null,o,d,p;return Eh(t)?n={ms:t._milliseconds,d:t._days,M:t._months}:Ys(t)||!isNaN(+t)?(n={},e?n[e]=+t:n.milliseconds=+t):(r=TM.exec(t))?(o=r[1]==="-"?-1:1,n={y:0,d:sn(r[Ds])*o,h:sn(r[xr])*o,m:sn(r[ps])*o,s:sn(r[Js])*o,ms:sn(Pm(r[Ia]*1e3))*o}):(r=AM.exec(t))?(o=r[1]==="-"?-1:1,n={y:Pa(r[2],o),M:Pa(r[3],o),w:Pa(r[4],o),d:Pa(r[5],o),h:Pa(r[6],o),m:Pa(r[7],o),s:Pa(r[8],o)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(p=DM(Zn(n.from),Zn(n.to)),n={},n.ms=p.milliseconds,n.M=p.months),d=new kh(n),Eh(t)&&vn(t,"_locale")&&(d._locale=t._locale),Eh(t)&&vn(t,"_isValid")&&(d._isValid=t._isValid),d}fs.fn=kh.prototype,fs.invalid=fM;function Pa(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function sx(t,e){var n={};return n.months=e.month()-t.month()+(e.year()-t.year())*12,t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function DM(t,e){var n;return t.isValid()&&e.isValid()?(e=Nm(e,t),t.isBefore(e)?n=sx(t,e):(n=sx(e,t),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function ox(t,e){return function(n,r){var o,d;return r!==null&&!isNaN(+r)&&(Pb(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),d=n,n=r,r=d),o=fs(n,r),ax(this,o,t),this}}function ax(t,e,n,r){var o=e._milliseconds,d=Pm(e._days),p=Pm(e._months);t.isValid()&&(r=r??!0,p&&Ub(t,pd(t,"Month")+p*n),d&&Fb(t,"Date",pd(t,"Date")+d*n),o&&t._d.setTime(t._d.valueOf()+o*n),r&&ft.updateOffset(t,d||p))}var MM=ox(1,"add"),IM=ox(-1,"subtract");function lx(t){return typeof t=="string"||t instanceof String}function PM(t){return hs(t)||ld(t)||lx(t)||Ys(t)||NM(t)||RM(t)||t===null||t===void 0}function RM(t){var e=Ma(t)&&!lm(t),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],o,d,p=r.length;for(o=0;o<p;o+=1)d=r[o],n=n||vn(t,d);return e&&n}function NM(t){var e=us(t),n=!1;return e&&(n=t.filter(function(r){return!Ys(r)&&lx(t)}).length===0),e&&n}function BM(t){var e=Ma(t)&&!lm(t),n=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],o,d;for(o=0;o<r.length;o+=1)d=r[o],n=n||vn(t,d);return e&&n}function VM(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function zM(t,e){arguments.length===1&&(arguments[0]?PM(arguments[0])?(t=arguments[0],e=void 0):BM(arguments[0])&&(e=arguments[0],t=void 0):(t=void 0,e=void 0));var n=t||Zn(),r=Nm(n,this).startOf("day"),o=ft.calendarFormat(this,r)||"sameElse",d=e&&(Ts(e[o])?e[o].call(this,n):e[o]);return this.format(d||this.localeData().calendar(o,this,Zn(n)))}function OM(){return new cd(this)}function LM(t,e){var n=hs(t)?t:Zn(t);return this.isValid()&&n.isValid()?(e=Ki(e)||"millisecond",e==="millisecond"?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(e).valueOf()):!1}function FM(t,e){var n=hs(t)?t:Zn(t);return this.isValid()&&n.isValid()?(e=Ki(e)||"millisecond",e==="millisecond"?this.valueOf()<n.valueOf():this.clone().endOf(e).valueOf()<n.valueOf()):!1}function $M(t,e,n,r){var o=hs(t)?t:Zn(t),d=hs(e)?e:Zn(e);return this.isValid()&&o.isValid()&&d.isValid()?(r=r||"()",(r[0]==="("?this.isAfter(o,n):!this.isBefore(o,n))&&(r[1]===")"?this.isBefore(d,n):!this.isAfter(d,n))):!1}function jM(t,e){var n=hs(t)?t:Zn(t),r;return this.isValid()&&n.isValid()?(e=Ki(e)||"millisecond",e==="millisecond"?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(e).valueOf()<=r&&r<=this.clone().endOf(e).valueOf())):!1}function UM(t,e){return this.isSame(t,e)||this.isAfter(t,e)}function HM(t,e){return this.isSame(t,e)||this.isBefore(t,e)}function WM(t,e,n){var r,o,d;if(!this.isValid())return NaN;if(r=Nm(t,this),!r.isValid())return NaN;switch(o=(r.utcOffset()-this.utcOffset())*6e4,e=Ki(e),e){case"year":d=Ch(this,r)/12;break;case"month":d=Ch(this,r);break;case"quarter":d=Ch(this,r)/3;break;case"second":d=(this-r)/1e3;break;case"minute":d=(this-r)/6e4;break;case"hour":d=(this-r)/36e5;break;case"day":d=(this-r-o)/864e5;break;case"week":d=(this-r-o)/6048e5;break;default:d=this-r}return n?d:Ji(d)}function Ch(t,e){if(t.date()<e.date())return-Ch(e,t);var n=(e.year()-t.year())*12+(e.month()-t.month()),r=t.clone().add(n,"months"),o,d;return e-r<0?(o=t.clone().add(n-1,"months"),d=(e-r)/(r-o)):(o=t.clone().add(n+1,"months"),d=(e-r)/(o-r)),-(n+d)||0}ft.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",ft.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function qM(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function GM(t){if(!this.isValid())return null;var e=t!==!0,n=e?this.clone().utc():this;return n.year()<0||n.year()>9999?hh(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Ts(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",hh(n,"Z")):hh(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function ZM(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="",n,r,o,d;return this.isLocal()||(t=this.utcOffset()===0?"moment.utc":"moment.parseZone",e="Z"),n="["+t+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",o="-MM-DD[T]HH:mm:ss.SSS",d=e+'[")]',this.format(n+r+o+d)}function YM(t){t||(t=this.isUtc()?ft.defaultFormatUtc:ft.defaultFormat);var e=hh(this,t);return this.localeData().postformat(e)}function XM(t,e){return this.isValid()&&(hs(t)&&t.isValid()||Zn(t).isValid())?fs({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function KM(t){return this.from(Zn(),t)}function JM(t,e){return this.isValid()&&(hs(t)&&t.isValid()||Zn(t).isValid())?fs({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function QM(t){return this.to(Zn(),t)}function cx(t){var e;return t===void 0?this._locale._abbr:(e=eo(t),e!=null&&(this._locale=e),this)}var dx=Xi("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return t===void 0?this.localeData():this.locale(t)});function ux(){return this._locale}var Sh=1e3,Bl=60*Sh,Th=60*Bl,hx=(365*400+97)*24*Th;function Vl(t,e){return(t%e+e)%e}function px(t,e,n){return t<100&&t>=0?new Date(t+400,e,n)-hx:new Date(t,e,n).valueOf()}function fx(t,e,n){return t<100&&t>=0?Date.UTC(t+400,e,n)-hx:Date.UTC(t,e,n)}function eI(t){var e,n;if(t=Ki(t),t===void 0||t==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?fx:px,t){case"year":e=n(this.year(),0,1);break;case"quarter":e=n(this.year(),this.month()-this.month()%3,1);break;case"month":e=n(this.year(),this.month(),1);break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=n(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=Vl(e+(this._isUTC?0:this.utcOffset()*Bl),Th);break;case"minute":e=this._d.valueOf(),e-=Vl(e,Bl);break;case"second":e=this._d.valueOf(),e-=Vl(e,Sh);break}return this._d.setTime(e),ft.updateOffset(this,!0),this}function tI(t){var e,n;if(t=Ki(t),t===void 0||t==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?fx:px,t){case"year":e=n(this.year()+1,0,1)-1;break;case"quarter":e=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=n(this.year(),this.month()+1,1)-1;break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=Th-Vl(e+(this._isUTC?0:this.utcOffset()*Bl),Th)-1;break;case"minute":e=this._d.valueOf(),e+=Bl-Vl(e,Bl)-1;break;case"second":e=this._d.valueOf(),e+=Sh-Vl(e,Sh)-1;break}return this._d.setTime(e),ft.updateOffset(this,!0),this}function nI(){return this._d.valueOf()-(this._offset||0)*6e4}function rI(){return Math.floor(this.valueOf()/1e3)}function iI(){return new Date(this.valueOf())}function sI(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function oI(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function aI(){return this.isValid()?this.toISOString():null}function lI(){return dm(this)}function cI(){return Ro({},Zt(this))}function dI(){return Zt(this).overflow}function uI(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Dt("N",0,0,"eraAbbr"),Dt("NN",0,0,"eraAbbr"),Dt("NNN",0,0,"eraAbbr"),Dt("NNNN",0,0,"eraName"),Dt("NNNNN",0,0,"eraNarrow"),Dt("y",["y",1],"yo","eraYear"),Dt("y",["yy",2],0,"eraYear"),Dt("y",["yyy",3],0,"eraYear"),Dt("y",["yyyy",4],0,"eraYear"),bt("N",Vm),bt("NN",Vm),bt("NNN",Vm),bt("NNNN",wI),bt("NNNNN",kI),Bn(["N","NN","NNN","NNNN","NNNNN"],function(t,e,n,r){var o=n._locale.erasParse(t,r,n._strict);o?Zt(n).era=o:Zt(n).invalidEra=t}),bt("y",Il),bt("yy",Il),bt("yyy",Il),bt("yyyy",Il),bt("yo",EI),Bn(["y","yy","yyy","yyyy"],Ur),Bn(["yo"],function(t,e,n,r){var o;n._locale._eraYearOrdinalRegex&&(o=t.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?e[Ur]=n._locale.eraYearOrdinalParse(t,o):e[Ur]=parseInt(t,10)});function hI(t,e){var n,r,o,d=this._eras||eo("en")._eras;for(n=0,r=d.length;n<r;++n){switch(typeof d[n].since){case"string":o=ft(d[n].since).startOf("day"),d[n].since=o.valueOf();break}switch(typeof d[n].until){case"undefined":d[n].until=1/0;break;case"string":o=ft(d[n].until).startOf("day").valueOf(),d[n].until=o.valueOf();break}}return d}function pI(t,e,n){var r,o,d=this.eras(),p,c,b;for(t=t.toUpperCase(),r=0,o=d.length;r<o;++r)if(p=d[r].name.toUpperCase(),c=d[r].abbr.toUpperCase(),b=d[r].narrow.toUpperCase(),n)switch(e){case"N":case"NN":case"NNN":if(c===t)return d[r];break;case"NNNN":if(p===t)return d[r];break;case"NNNNN":if(b===t)return d[r];break}else if([p,c,b].indexOf(t)>=0)return d[r]}function fI(t,e){var n=t.since<=t.until?1:-1;return e===void 0?ft(t.since).year():ft(t.since).year()+(e-t.offset)*n}function mI(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t)if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until||r[t].until<=n&&n<=r[t].since)return r[t].name;return""}function gI(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t)if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until||r[t].until<=n&&n<=r[t].since)return r[t].narrow;return""}function yI(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t)if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until||r[t].until<=n&&n<=r[t].since)return r[t].abbr;return""}function _I(){var t,e,n,r,o=this.localeData().eras();for(t=0,e=o.length;t<e;++t)if(n=o[t].since<=o[t].until?1:-1,r=this.clone().startOf("day").valueOf(),o[t].since<=r&&r<=o[t].until||o[t].until<=r&&r<=o[t].since)return(this.year()-ft(o[t].since).year())*n+o[t].offset;return this.year()}function bI(t){return vn(this,"_erasNameRegex")||zm.call(this),t?this._erasNameRegex:this._erasRegex}function xI(t){return vn(this,"_erasAbbrRegex")||zm.call(this),t?this._erasAbbrRegex:this._erasRegex}function vI(t){return vn(this,"_erasNarrowRegex")||zm.call(this),t?this._erasNarrowRegex:this._erasRegex}function Vm(t,e){return e.erasAbbrRegex(t)}function wI(t,e){return e.erasNameRegex(t)}function kI(t,e){return e.erasNarrowRegex(t)}function EI(t,e){return e._eraYearOrdinalRegex||Il}function zm(){var t=[],e=[],n=[],r=[],o,d,p,c,b,k=this.eras();for(o=0,d=k.length;o<d;++o)p=Xs(k[o].name),c=Xs(k[o].abbr),b=Xs(k[o].narrow),e.push(p),t.push(c),n.push(b),r.push(p),r.push(c),r.push(b);this._erasRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+e.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+t.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}Dt(0,["gg",2],0,function(){return this.weekYear()%100}),Dt(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Ah(t,e){Dt(0,[t,t.length],0,e)}Ah("gggg","weekYear"),Ah("ggggg","weekYear"),Ah("GGGG","isoWeekYear"),Ah("GGGGG","isoWeekYear"),bt("G",gh),bt("g",gh),bt("GG",Gn,Ii),bt("gg",Gn,Ii),bt("GGGG",xm,bm),bt("gggg",xm,bm),bt("GGGGG",mh,ph),bt("ggggg",mh,ph),ud(["gggg","ggggg","GGGG","GGGGG"],function(t,e,n,r){e[r.substr(0,2)]=sn(t)}),ud(["gg","GG"],function(t,e,n,r){e[r]=ft.parseTwoDigitYear(t)});function CI(t){return mx.call(this,t,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function SI(t){return mx.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)}function TI(){return Qs(this.year(),1,4)}function AI(){return Qs(this.isoWeekYear(),1,4)}function DI(){var t=this.localeData()._week;return Qs(this.year(),t.dow,t.doy)}function MI(){var t=this.localeData()._week;return Qs(this.weekYear(),t.dow,t.doy)}function mx(t,e,n,r,o){var d;return t==null?md(this,r,o).year:(d=Qs(t,r,o),e>d&&(e=d),II.call(this,t,e,n,r,o))}function II(t,e,n,r,o){var d=qb(t,e,n,r,o),p=fd(d.year,0,d.dayOfYear);return this.year(p.getUTCFullYear()),this.month(p.getUTCMonth()),this.date(p.getUTCDate()),this}Dt("Q",0,"Qo","quarter"),bt("Q",Bb),Bn("Q",function(t,e){e[Ks]=(sn(t)-1)*3});function PI(t){return t==null?Math.ceil((this.month()+1)/3):this.month((t-1)*3+this.month()%3)}Dt("D",["DD",2],"Do","date"),bt("D",Gn,Pl),bt("DD",Gn,Ii),bt("Do",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient}),Bn(["D","DD"],Ds),Bn("Do",function(t,e){e[Ds]=sn(t.match(Gn)[0])});var gx=Rl("Date",!0);Dt("DDD",["DDDD",3],"DDDo","dayOfYear"),bt("DDD",fh),bt("DDDD",Vb),Bn(["DDD","DDDD"],function(t,e,n){n._dayOfYear=sn(t)});function RI(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return t==null?e:this.add(t-e,"d")}Dt("m",["mm",2],0,"minute"),bt("m",Gn,vm),bt("mm",Gn,Ii),Bn(["m","mm"],ps);var NI=Rl("Minutes",!1);Dt("s",["ss",2],0,"second"),bt("s",Gn,vm),bt("ss",Gn,Ii),Bn(["s","ss"],Js);var BI=Rl("Seconds",!1);Dt("S",0,0,function(){return~~(this.millisecond()/100)}),Dt(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),Dt(0,["SSS",3],0,"millisecond"),Dt(0,["SSSS",4],0,function(){return this.millisecond()*10}),Dt(0,["SSSSS",5],0,function(){return this.millisecond()*100}),Dt(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),Dt(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),Dt(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),Dt(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),bt("S",fh,Bb),bt("SS",fh,Ii),bt("SSS",fh,Vb);var Bo,yx;for(Bo="SSSS";Bo.length<=9;Bo+="S")bt(Bo,Il);function VI(t,e){e[Ia]=sn(("0."+t)*1e3)}for(Bo="S";Bo.length<=9;Bo+="S")Bn(Bo,VI);yx=Rl("Milliseconds",!1),Dt("z",0,0,"zoneAbbr"),Dt("zz",0,0,"zoneName");function zI(){return this._isUTC?"UTC":""}function OI(){return this._isUTC?"Coordinated Universal Time":""}var We=cd.prototype;We.add=MM,We.calendar=zM,We.clone=OM,We.diff=WM,We.endOf=tI,We.format=YM,We.from=XM,We.fromNow=KM,We.to=JM,We.toNow=QM,We.get=ZA,We.invalidAt=dI,We.isAfter=LM,We.isBefore=FM,We.isBetween=$M,We.isSame=jM,We.isSameOrAfter=UM,We.isSameOrBefore=HM,We.isValid=lI,We.lang=dx,We.locale=cx,We.localeData=ux,We.max=lM,We.min=aM,We.parsingFlags=cI,We.set=YA,We.startOf=eI,We.subtract=IM,We.toArray=sI,We.toObject=oI,We.toDate=iI,We.toISOString=GM,We.inspect=ZM,typeof Symbol<"u"&&Symbol.for!=null&&(We[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),We.toJSON=aI,We.toString=qM,We.unix=rI,We.valueOf=nI,We.creationData=uI,We.eraName=mI,We.eraNarrow=gI,We.eraAbbr=yI,We.eraYear=_I,We.year=Lb,We.isLeapYear=GA,We.weekYear=CI,We.isoWeekYear=SI,We.quarter=We.quarters=PI,We.month=Hb,We.daysInMonth=iD,We.week=We.weeks=hD,We.isoWeek=We.isoWeeks=pD,We.weeksInYear=DI,We.weeksInWeekYear=MI,We.isoWeeksInYear=TI,We.isoWeeksInISOWeekYear=AI,We.date=gx,We.day=We.days=SD,We.weekday=TD,We.isoWeekday=AD,We.dayOfYear=RI,We.hour=We.hours=BD,We.minute=We.minutes=NI,We.second=We.seconds=BI,We.millisecond=We.milliseconds=yx,We.utcOffset=yM,We.utc=bM,We.local=xM,We.parseZone=vM,We.hasAlignedHourOffset=wM,We.isDST=kM,We.isLocal=CM,We.isUtcOffset=SM,We.isUtc=ix,We.isUTC=ix,We.zoneAbbr=zI,We.zoneName=OI,We.dates=Xi("dates accessor is deprecated. Use date instead.",gx),We.months=Xi("months accessor is deprecated. Use month instead",Hb),We.years=Xi("years accessor is deprecated. Use year instead",Lb),We.zone=Xi("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",_M),We.isDSTShifted=Xi("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",EM);function LI(t){return Zn(t*1e3)}function FI(){return Zn.apply(null,arguments).parseZone()}function _x(t){return t}var wn=fm.prototype;wn.calendar=CA,wn.longDateFormat=DA,wn.invalidDate=IA,wn.ordinal=NA,wn.preparse=_x,wn.postformat=_x,wn.relativeTime=VA,wn.pastFuture=zA,wn.set=kA,wn.eras=hI,wn.erasParse=pI,wn.erasConvertYear=fI,wn.erasAbbrRegex=xI,wn.erasNameRegex=bI,wn.erasNarrowRegex=vI,wn.months=eD,wn.monthsShort=tD,wn.monthsParse=rD,wn.monthsRegex=oD,wn.monthsShortRegex=sD,wn.week=lD,wn.firstDayOfYear=uD,wn.firstDayOfWeek=dD,wn.weekdays=vD,wn.weekdaysMin=kD,wn.weekdaysShort=wD,wn.weekdaysParse=CD,wn.weekdaysRegex=DD,wn.weekdaysShortRegex=MD,wn.weekdaysMinRegex=ID,wn.isPM=RD,wn.meridiem=VD;function Dh(t,e,n,r){var o=eo(),d=Ss().set(r,e);return o[n](d,t)}function bx(t,e,n){if(Ys(t)&&(e=t,t=void 0),t=t||"",e!=null)return Dh(t,e,n,"month");var r,o=[];for(r=0;r<12;r++)o[r]=Dh(t,r,n,"month");return o}function Om(t,e,n,r){typeof t=="boolean"?(Ys(e)&&(n=e,e=void 0),e=e||""):(e=t,n=e,t=!1,Ys(e)&&(n=e,e=void 0),e=e||"");var o=eo(),d=t?o._week.dow:0,p,c=[];if(n!=null)return Dh(e,(n+d)%7,r,"day");for(p=0;p<7;p++)c[p]=Dh(e,(p+d)%7,r,"day");return c}function $I(t,e){return bx(t,e,"months")}function jI(t,e){return bx(t,e,"monthsShort")}function UI(t,e,n){return Om(t,e,n,"weekdays")}function HI(t,e,n){return Om(t,e,n,"weekdaysShort")}function WI(t,e,n){return Om(t,e,n,"weekdaysMin")}No("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,n=sn(t%100/10)===1?"th":e===1?"st":e===2?"nd":e===3?"rd":"th";return t+n}}),ft.lang=Xi("moment.lang is deprecated. Use moment.locale instead.",No),ft.langData=Xi("moment.langData is deprecated. Use moment.localeData instead.",eo);var to=Math.abs;function qI(){var t=this._data;return this._milliseconds=to(this._milliseconds),this._days=to(this._days),this._months=to(this._months),t.milliseconds=to(t.milliseconds),t.seconds=to(t.seconds),t.minutes=to(t.minutes),t.hours=to(t.hours),t.months=to(t.months),t.years=to(t.years),this}function xx(t,e,n,r){var o=fs(e,n);return t._milliseconds+=r*o._milliseconds,t._days+=r*o._days,t._months+=r*o._months,t._bubble()}function GI(t,e){return xx(this,t,e,1)}function ZI(t,e){return xx(this,t,e,-1)}function vx(t){return t<0?Math.floor(t):Math.ceil(t)}function YI(){var t=this._milliseconds,e=this._days,n=this._months,r=this._data,o,d,p,c,b;return t>=0&&e>=0&&n>=0||t<=0&&e<=0&&n<=0||(t+=vx(Lm(n)+e)*864e5,e=0,n=0),r.milliseconds=t%1e3,o=Ji(t/1e3),r.seconds=o%60,d=Ji(o/60),r.minutes=d%60,p=Ji(d/60),r.hours=p%24,e+=Ji(p/24),b=Ji(wx(e)),n+=b,e-=vx(Lm(b)),c=Ji(n/12),n%=12,r.days=e,r.months=n,r.years=c,this}function wx(t){return t*4800/146097}function Lm(t){return t*146097/4800}function XI(t){if(!this.isValid())return NaN;var e,n,r=this._milliseconds;if(t=Ki(t),t==="month"||t==="quarter"||t==="year")switch(e=this._days+r/864e5,n=this._months+wx(e),t){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(e=this._days+Math.round(Lm(this._months)),t){case"week":return e/7+r/6048e5;case"day":return e+r/864e5;case"hour":return e*24+r/36e5;case"minute":return e*1440+r/6e4;case"second":return e*86400+r/1e3;case"millisecond":return Math.floor(e*864e5)+r;default:throw new Error("Unknown unit "+t)}}function no(t){return function(){return this.as(t)}}var kx=no("ms"),KI=no("s"),JI=no("m"),QI=no("h"),eP=no("d"),tP=no("w"),nP=no("M"),rP=no("Q"),iP=no("y"),sP=kx;function oP(){return fs(this)}function aP(t){return t=Ki(t),this.isValid()?this[t+"s"]():NaN}function Ra(t){return function(){return this.isValid()?this._data[t]:NaN}}var lP=Ra("milliseconds"),cP=Ra("seconds"),dP=Ra("minutes"),uP=Ra("hours"),hP=Ra("days"),pP=Ra("months"),fP=Ra("years");function mP(){return Ji(this.days()/7)}var ro=Math.round,zl={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function gP(t,e,n,r,o){return o.relativeTime(e||1,!!n,t,r)}function yP(t,e,n,r){var o=fs(t).abs(),d=ro(o.as("s")),p=ro(o.as("m")),c=ro(o.as("h")),b=ro(o.as("d")),k=ro(o.as("M")),E=ro(o.as("w")),C=ro(o.as("y")),T=d<=n.ss&&["s",d]||d<n.s&&["ss",d]||p<=1&&["m"]||p<n.m&&["mm",p]||c<=1&&["h"]||c<n.h&&["hh",c]||b<=1&&["d"]||b<n.d&&["dd",b];return n.w!=null&&(T=T||E<=1&&["w"]||E<n.w&&["ww",E]),T=T||k<=1&&["M"]||k<n.M&&["MM",k]||C<=1&&["y"]||["yy",C],T[2]=e,T[3]=+t>0,T[4]=r,gP.apply(null,T)}function _P(t){return t===void 0?ro:typeof t=="function"?(ro=t,!0):!1}function bP(t,e){return zl[t]===void 0?!1:e===void 0?zl[t]:(zl[t]=e,t==="s"&&(zl.ss=e-1),!0)}function xP(t,e){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=zl,o,d;return typeof t=="object"&&(e=t,t=!1),typeof t=="boolean"&&(n=t),typeof e=="object"&&(r=Object.assign({},zl,e),e.s!=null&&e.ss==null&&(r.ss=e.s-1)),o=this.localeData(),d=yP(this,!n,r,o),n&&(d=o.pastFuture(+this,d)),o.postformat(d)}var Fm=Math.abs;function Ol(t){return(t>0)-(t<0)||+t}function Mh(){if(!this.isValid())return this.localeData().invalidDate();var t=Fm(this._milliseconds)/1e3,e=Fm(this._days),n=Fm(this._months),r,o,d,p,c=this.asSeconds(),b,k,E,C;return c?(r=Ji(t/60),o=Ji(r/60),t%=60,r%=60,d=Ji(n/12),n%=12,p=t?t.toFixed(3).replace(/\.?0+$/,""):"",b=c<0?"-":"",k=Ol(this._months)!==Ol(c)?"-":"",E=Ol(this._days)!==Ol(c)?"-":"",C=Ol(this._milliseconds)!==Ol(c)?"-":"",b+"P"+(d?k+d+"Y":"")+(n?k+n+"M":"")+(e?E+e+"D":"")+(o||r||t?"T":"")+(o?C+o+"H":"")+(r?C+r+"M":"")+(t?C+p+"S":"")):"P0D"}var pn=kh.prototype;pn.isValid=pM,pn.abs=qI,pn.add=GI,pn.subtract=ZI,pn.as=XI,pn.asMilliseconds=kx,pn.asSeconds=KI,pn.asMinutes=JI,pn.asHours=QI,pn.asDays=eP,pn.asWeeks=tP,pn.asMonths=nP,pn.asQuarters=rP,pn.asYears=iP,pn.valueOf=sP,pn._bubble=YI,pn.clone=oP,pn.get=aP,pn.milliseconds=lP,pn.seconds=cP,pn.minutes=dP,pn.hours=uP,pn.days=hP,pn.weeks=mP,pn.months=pP,pn.years=fP,pn.humanize=xP,pn.toISOString=Mh,pn.toString=Mh,pn.toJSON=Mh,pn.locale=cx,pn.localeData=ux,pn.toIsoString=Xi("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Mh),pn.lang=dx,Dt("X",0,0,"unix"),Dt("x",0,0,"valueOf"),bt("x",gh),bt("X",$A),Bn("X",function(t,e,n){n._d=new Date(parseFloat(t)*1e3)}),Bn("x",function(t,e,n){n._d=new Date(sn(t))});//! moment.js
|
|
41
|
-
ft.version="2.30.1",vA(Zn),ft.fn=We,ft.min=cM,ft.max=dM,ft.now=uM,ft.utc=Ss,ft.unix=LI,ft.months=$I,ft.isDate=ld,ft.locale=No,ft.invalid=dh,ft.duration=fs,ft.isMoment=hs,ft.weekdays=UI,ft.parseZone=FI,ft.localeData=eo,ft.isDuration=Eh,ft.monthsShort=jI,ft.weekdaysMin=WI,ft.defineLocale=Tm,ft.updateLocale=FD,ft.locales=$D,ft.weekdaysShort=HI,ft.normalizeUnits=Ki,ft.relativeTimeRounding=_P,ft.relativeTimeThreshold=bP,ft.calendarFormat=VM,ft.prototype=We,ft.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const vP={props:{data:Object,name:String,table:String,edit:{type:null,default:()=>!1},value:null,column:Object},computed:{dateValue(){var t;if(!((t=this.data)!=null&&t[this.name]))return"-";try{const e=ft(this.data[this.name],"YYYY-MM-DD");return new Date(e).toLocaleDateString("uk-UA",{day:"2-digit",month:"long",year:"numeric"})}catch{return this.value}}},methods:{async changeData(t){var e,n;try{const r=await Oe.get(`/api/
|
|
41
|
+
ft.version="2.30.1",vA(Zn),ft.fn=We,ft.min=cM,ft.max=dM,ft.now=uM,ft.utc=Ss,ft.unix=LI,ft.months=$I,ft.isDate=ld,ft.locale=No,ft.invalid=dh,ft.duration=fs,ft.isMoment=hs,ft.weekdays=UI,ft.parseZone=FI,ft.localeData=eo,ft.isDuration=Eh,ft.monthsShort=jI,ft.weekdaysMin=WI,ft.defineLocale=Tm,ft.updateLocale=FD,ft.locales=$D,ft.weekdaysShort=HI,ft.normalizeUnits=Ki,ft.relativeTimeRounding=_P,ft.relativeTimeThreshold=bP,ft.calendarFormat=VM,ft.prototype=We,ft.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const vP={props:{data:Object,name:String,table:String,edit:{type:null,default:()=>!1},value:null,column:Object},computed:{dateValue(){var t;if(!((t=this.data)!=null&&t[this.name]))return"-";try{const e=ft(this.data[this.name],"YYYY-MM-DD");return new Date(e).toLocaleDateString("uk-UA",{day:"2-digit",month:"long",year:"numeric"})}catch{return this.value}}},methods:{async changeData(t){var e,n;try{const r=await Oe.get(`/api/form/${this.table}/${(e=this.data)==null?void 0:e.id}`);await Oe.put(`/api/table/${(n=r==null?void 0:r.data)==null?void 0:n.token}`,{...r==null?void 0:r.data,[this.name]:t}),await this.$emit("update-table")}catch(r){console.log(r)}}}},wP={class:"underline whitespace-nowrap decoration-dashed decoration-[1px] decoration-blue-600"},kP={key:1,class:"whitespace-nowrap"};function EP(t,e,n,r,o,d){var c;const p=a.resolveComponent("VsInlineEdit");return n.edit?(a.openBlock(),a.createBlock(p,{key:0,"model-value":((c=n.data)==null?void 0:c[n.name])||null,component:"vs-form-calendar",onUpdateValue:d.changeData},{default:a.withCtx(()=>[a.createElementVNode("div",wP,a.toDisplayString(d.dateValue),1)]),_:1},8,["model-value","onUpdateValue"])):(a.openBlock(),a.createElementBlock("div",kP,a.toDisplayString(d.dateValue),1))}const $m=Le(vP,[["render",EP]]),CP=a.defineComponent({name:"VsNumberValue",props:{value:{type:null,default:()=>""},data:{type:Object},table:{type:String},name:String,data:Object,edit:{type:null,default:()=>!1},column:Object},computed:{formattedValue(){var t;try{return new Intl.NumberFormat("ua",((t=this.column)==null?void 0:t.options)||{}).format(this.data[this.name])}catch(e){return console.error("Formatting error:",e.message),this.value}}},methods:{async changeData(t){var e;try{const{data:n}=await Oe.get(`/api/form/${this.table}/${(e=this.data)==null?void 0:e.id}`);await Oe.put(`/api/table/${n==null?void 0:n.token}`,{...n,[this.name]:t}),await this.$emit("update-table")}catch(n){console.log(n)}}}}),SP={key:1,class:"block w-full pr-[10px] text-left"};function TP(t,e,n,r,o,d){var c,b;const p=a.resolveComponent("VsInlineEdit");return t.edit?(a.openBlock(),a.createBlock(p,{key:0,"model-value":t.value,onUpdateValue:t.changeData,title:((c=t.column)==null?void 0:c.ua)||((b=t.column)==null?void 0:b.text)},{default:a.withCtx(()=>{var k;return[a.createElementVNode("button",{class:a.normalizeClass([(k=t.value)!=null&&k.trim()?"underline decoration-dashed decoration-[1px] decoration-blue-600":null])},a.toDisplayString(t.formattedValue||"-"),3)]}),_:1},8,["model-value","onUpdateValue","title"])):(a.openBlock(),a.createElementBlock("span",SP,a.toDisplayString(t.formattedValue),1))}const Ex=Le(CP,[["render",TP]]),AP={class:"text-start"},Cx={__name:"vs-format-slot",props:{column:Object,data:Object,table:String,data:Object,name:String,value:null},setup(t){var o,d,p,c,b;const{asyncTemplateSlot:e}=(b=(c=(p=(d=(o=a.getCurrentInstance())==null?void 0:o.appContext)==null?void 0:d.app)==null?void 0:p.config)==null?void 0:c.globalProperties)==null?void 0:b.utils,n=a.getCurrentInstance().appContext.app,r=["data","column","table","name","value"];return n.component(t.name)||e(t.name,t.column.slot.content,r),(k,E)=>(a.openBlock(),a.createElementBlock("div",AP,[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(t.name),{column:t.column,table:t.table,name:t.name,data:t.data,value:t.value},null,8,["column","table","name","data","value"]))]))}},Sx={"table-format-text":ch,"table-format-select":Cb,"table-format-badge":kb,"table-format-swetch":Da,"table-format-switch":Da,"table-format-check":Da,"table-format-html":ch,"table-format-tags":Sb,"table-format-date":$m,"table-format-number":Ex,"table-format-slot":Cx};var DP=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function MP(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Tx={exports:{}};/**
|
|
42
42
|
* MapLibre GL JS
|
|
43
43
|
* @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v4.7.1/LICENSE.txt
|
|
44
44
|
*/(function(t,e){(function(n,r){t.exports=r()})(DP,function(){var n={},r={};function o(p,c,b){if(r[p]=b,p==="index"){var k="var sharedModule = {}; ("+r.shared+")(sharedModule); ("+r.worker+")(sharedModule);",E={};return r.shared(E),r.index(n,E),typeof window<"u"&&n.setWorkerUrl(window.URL.createObjectURL(new Blob([k],{type:"text/javascript"}))),n}}o("shared",["exports"],function(p){function c(l,s,u,f){return new(u||(u=Promise))(function(y,v){function w(R){try{D(f.next(R))}catch(B){v(B)}}function S(R){try{D(f.throw(R))}catch(B){v(B)}}function D(R){var B;R.done?y(R.value):(B=R.value,B instanceof u?B:new u(function(z){z(B)})).then(w,S)}D((f=f.apply(l,s||[])).next())})}function b(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}typeof SuppressedError=="function"&&SuppressedError;var k=E;function E(l,s){this.x=l,this.y=s}E.prototype={clone:function(){return new E(this.x,this.y)},add:function(l){return this.clone()._add(l)},sub:function(l){return this.clone()._sub(l)},multByPoint:function(l){return this.clone()._multByPoint(l)},divByPoint:function(l){return this.clone()._divByPoint(l)},mult:function(l){return this.clone()._mult(l)},div:function(l){return this.clone()._div(l)},rotate:function(l){return this.clone()._rotate(l)},rotateAround:function(l,s){return this.clone()._rotateAround(l,s)},matMult:function(l){return this.clone()._matMult(l)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(l){return this.x===l.x&&this.y===l.y},dist:function(l){return Math.sqrt(this.distSqr(l))},distSqr:function(l){var s=l.x-this.x,u=l.y-this.y;return s*s+u*u},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(l){return Math.atan2(this.y-l.y,this.x-l.x)},angleWith:function(l){return this.angleWithSep(l.x,l.y)},angleWithSep:function(l,s){return Math.atan2(this.x*s-this.y*l,this.x*l+this.y*s)},_matMult:function(l){var s=l[2]*this.x+l[3]*this.y;return this.x=l[0]*this.x+l[1]*this.y,this.y=s,this},_add:function(l){return this.x+=l.x,this.y+=l.y,this},_sub:function(l){return this.x-=l.x,this.y-=l.y,this},_mult:function(l){return this.x*=l,this.y*=l,this},_div:function(l){return this.x/=l,this.y/=l,this},_multByPoint:function(l){return this.x*=l.x,this.y*=l.y,this},_divByPoint:function(l){return this.x/=l.x,this.y/=l.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var l=this.y;return this.y=this.x,this.x=-l,this},_rotate:function(l){var s=Math.cos(l),u=Math.sin(l),f=u*this.x+s*this.y;return this.x=s*this.x-u*this.y,this.y=f,this},_rotateAround:function(l,s){var u=Math.cos(l),f=Math.sin(l),y=s.y+f*(this.x-s.x)+u*(this.y-s.y);return this.x=s.x+u*(this.x-s.x)-f*(this.y-s.y),this.y=y,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},E.convert=function(l){return l instanceof E?l:Array.isArray(l)?new E(l[0],l[1]):l};var C=b(k),T=I;function I(l,s,u,f){this.cx=3*l,this.bx=3*(u-l)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*s,this.by=3*(f-s)-this.cy,this.ay=1-this.cy-this.by,this.p1x=l,this.p1y=s,this.p2x=u,this.p2y=f}I.prototype={sampleCurveX:function(l){return((this.ax*l+this.bx)*l+this.cx)*l},sampleCurveY:function(l){return((this.ay*l+this.by)*l+this.cy)*l},sampleCurveDerivativeX:function(l){return(3*this.ax*l+2*this.bx)*l+this.cx},solveCurveX:function(l,s){if(s===void 0&&(s=1e-6),l<0)return 0;if(l>1)return 1;for(var u=l,f=0;f<8;f++){var y=this.sampleCurveX(u)-l;if(Math.abs(y)<s)return u;var v=this.sampleCurveDerivativeX(u);if(Math.abs(v)<1e-6)break;u-=y/v}var w=0,S=1;for(u=l,f=0;f<20&&(y=this.sampleCurveX(u),!(Math.abs(y-l)<s));f++)l>y?w=u:S=u,u=.5*(S-w)+w;return u},solve:function(l,s){return this.sampleCurveY(this.solveCurveX(l,s))}};var N=b(T);let $,F;function q(){return $==null&&($=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),$}function J(){if(F==null&&(F=!1,q())){const s=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(s){for(let f=0;f<5*5;f++){const y=4*f;s.fillStyle=`rgb(${y},${y+1},${y+2})`,s.fillRect(f%5,Math.floor(f/5),1,1)}const u=s.getImageData(0,0,5,5).data;for(let f=0;f<5*5*4;f++)if(f%4!=3&&u[f]!==f){F=!0;break}}}return F||!1}function Q(l,s,u,f){const y=new N(l,s,u,f);return v=>y.solve(v)}const me=Q(.25,.1,.25,1);function Ee(l,s,u){return Math.min(u,Math.max(s,l))}function Ve(l,s,u){const f=u-s,y=((l-s)%f+f)%f+s;return y===s?u:y}function we(l,...s){for(const u of s)for(const f in u)l[f]=u[f];return l}let Re=1;function Ne(l,s,u){const f={};for(const y in l)f[y]=s.call(this,l[y],y,l);return f}function Ue(l,s,u){const f={};for(const y in l)s.call(this,l[y],y,l)&&(f[y]=l[y]);return f}function Xe(l){return Array.isArray(l)?l.map(Xe):typeof l=="object"&&l?Ne(l,Xe):l}const He={};function tt(l){He[l]||(typeof console<"u"&&console.warn(l),He[l]=!0)}function ce(l,s,u){return(u.y-l.y)*(s.x-l.x)>(s.y-l.y)*(u.x-l.x)}function $t(l){return typeof WorkerGlobalScope<"u"&&l!==void 0&&l instanceof WorkerGlobalScope}let ut=null;function Ft(l){return typeof ImageBitmap<"u"&&l instanceof ImageBitmap}const Ut="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function cn(l,s,u,f,y){return c(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");const v=new VideoFrame(l,{timestamp:0});try{const w=v==null?void 0:v.format;if(!w||!w.startsWith("BGR")&&!w.startsWith("RGB"))throw new Error(`Unrecognized format ${w}`);const S=w.startsWith("BGR"),D=new Uint8ClampedArray(f*y*4);if(yield v.copyTo(D,function(R,B,z,j,W){const Z=4*Math.max(-B,0),Y=(Math.max(0,z)-z)*j*4+Z,ne=4*j,oe=Math.max(0,B),ve=Math.max(0,z);return{rect:{x:oe,y:ve,width:Math.min(R.width,B+j)-oe,height:Math.min(R.height,z+W)-ve},layout:[{offset:Y,stride:ne}]}}(l,s,u,f,y)),S)for(let R=0;R<D.length;R+=4){const B=D[R];D[R]=D[R+2],D[R+2]=B}return D}finally{v.close()}})}let dn,Wt;const en="AbortError";function mn(){return new Error(en)}const gn={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function yn(l){return gn.REGISTERED_PROTOCOLS[l.substring(0,l.indexOf("://"))]}const Wn="global-dispatcher";class Te extends Error{constructor(s,u,f,y){super(`AJAXError: ${u} (${s}): ${f}`),this.status=s,this.statusText=u,this.url=f,this.body=y}}const nt=()=>$t(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,rt=function(l,s){if(/:\/\//.test(l.url)&&!/^https?:|^file:/.test(l.url)){const f=yn(l.url);if(f)return f(l,s);if($t(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:l,targetMapId:Wn},s)}if(!(/^file:/.test(u=l.url)||/^file:/.test(nt())&&!/^\w+:/.test(u))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(f,y){return c(this,void 0,void 0,function*(){const v=new Request(f.url,{method:f.method||"GET",body:f.body,credentials:f.credentials,headers:f.headers,cache:f.cache,referrer:nt(),signal:y.signal});f.type!=="json"||v.headers.has("Accept")||v.headers.set("Accept","application/json");const w=yield fetch(v);if(!w.ok){const R=yield w.blob();throw new Te(w.status,w.statusText,f.url,R)}let S;S=f.type==="arrayBuffer"||f.type==="image"?w.arrayBuffer():f.type==="json"?w.json():w.text();const D=yield S;if(y.signal.aborted)throw mn();return{data:D,cacheControl:w.headers.get("Cache-Control"),expires:w.headers.get("Expires")}})}(l,s);if($t(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:l,mustQueue:!0,targetMapId:Wn},s)}var u;return function(f,y){return new Promise((v,w)=>{var S;const D=new XMLHttpRequest;D.open(f.method||"GET",f.url,!0),f.type!=="arrayBuffer"&&f.type!=="image"||(D.responseType="arraybuffer");for(const R in f.headers)D.setRequestHeader(R,f.headers[R]);f.type==="json"&&(D.responseType="text",!((S=f.headers)===null||S===void 0)&&S.Accept||D.setRequestHeader("Accept","application/json")),D.withCredentials=f.credentials==="include",D.onerror=()=>{w(new Error(D.statusText))},D.onload=()=>{if(!y.signal.aborted)if((D.status>=200&&D.status<300||D.status===0)&&D.response!==null){let R=D.response;if(f.type==="json")try{R=JSON.parse(D.response)}catch(B){return void w(B)}v({data:R,cacheControl:D.getResponseHeader("Cache-Control"),expires:D.getResponseHeader("Expires")})}else{const R=new Blob([D.response],{type:D.getResponseHeader("Content-Type")});w(new Te(D.status,D.statusText,f.url,R))}},y.signal.addEventListener("abort",()=>{D.abort(),w(mn())}),D.send(f.body)})}(l,s)};function wt(l){if(!l||l.indexOf("://")<=0||l.indexOf("data:image/")===0||l.indexOf("blob:")===0)return!0;const s=new URL(l),u=window.location;return s.protocol===u.protocol&&s.host===u.host}function Vt(l,s,u){u[l]&&u[l].indexOf(s)!==-1||(u[l]=u[l]||[],u[l].push(s))}function un(l,s,u){if(u&&u[l]){const f=u[l].indexOf(s);f!==-1&&u[l].splice(f,1)}}class zt{constructor(s,u={}){we(this,u),this.type=s}}class Bt extends zt{constructor(s,u={}){super("error",we({error:s},u))}}class _n{on(s,u){return this._listeners=this._listeners||{},Vt(s,u,this._listeners),this}off(s,u){return un(s,u,this._listeners),un(s,u,this._oneTimeListeners),this}once(s,u){return u?(this._oneTimeListeners=this._oneTimeListeners||{},Vt(s,u,this._oneTimeListeners),this):new Promise(f=>this.once(s,f))}fire(s,u){typeof s=="string"&&(s=new zt(s,u||{}));const f=s.type;if(this.listens(f)){s.target=this;const y=this._listeners&&this._listeners[f]?this._listeners[f].slice():[];for(const S of y)S.call(this,s);const v=this._oneTimeListeners&&this._oneTimeListeners[f]?this._oneTimeListeners[f].slice():[];for(const S of v)un(f,S,this._oneTimeListeners),S.call(this,s);const w=this._eventedParent;w&&(we(s,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),w.fire(s))}else s instanceof Bt&&console.error(s.error);return this}listens(s){return this._listeners&&this._listeners[s]&&this._listeners[s].length>0||this._oneTimeListeners&&this._oneTimeListeners[s]&&this._oneTimeListeners[s].length>0||this._eventedParent&&this._eventedParent.listens(s)}setEventedParent(s,u){return this._eventedParent=s,this._eventedParentData=u,this}}var Ce={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"enum",default:"mercator",values:{mercator:{},globe:{}}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};const zn=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Vs(l,s){const u={};for(const f in l)f!=="ref"&&(u[f]=l[f]);return zn.forEach(f=>{f in s&&(u[f]=s[f])}),u}function tn(l,s){if(Array.isArray(l)){if(!Array.isArray(s)||l.length!==s.length)return!1;for(let u=0;u<l.length;u++)if(!tn(l[u],s[u]))return!1;return!0}if(typeof l=="object"&&l!==null&&s!==null){if(typeof s!="object"||Object.keys(l).length!==Object.keys(s).length)return!1;for(const u in l)if(!tn(l[u],s[u]))return!1;return!0}return l===s}function On(l,s){l.push(s)}function zs(l,s,u){On(u,{command:"addSource",args:[l,s[l]]})}function ht(l,s,u){On(s,{command:"removeSource",args:[l]}),u[l]=!0}function Tr(l,s,u,f){ht(l,u,f),zs(l,s,u)}function vi(l,s,u){let f;for(f in l[u])if(Object.prototype.hasOwnProperty.call(l[u],f)&&f!=="data"&&!tn(l[u][f],s[u][f]))return!1;for(f in s[u])if(Object.prototype.hasOwnProperty.call(s[u],f)&&f!=="data"&&!tn(l[u][f],s[u][f]))return!1;return!0}function vr(l,s,u,f,y,v){l=l||{},s=s||{};for(const w in l)Object.prototype.hasOwnProperty.call(l,w)&&(tn(l[w],s[w])||u.push({command:v,args:[f,w,s[w],y]}));for(const w in s)Object.prototype.hasOwnProperty.call(s,w)&&!Object.prototype.hasOwnProperty.call(l,w)&&(tn(l[w],s[w])||u.push({command:v,args:[f,w,s[w],y]}))}function Ni(l){return l.id}function Bi(l,s){return l[s.id]=s,l}class je{constructor(s,u,f,y){this.message=(s?`${s}: `:"")+f,y&&(this.identifier=y),u!=null&&u.__line__&&(this.line=u.__line__)}}function si(l,...s){for(const u of s)for(const f in u)l[f]=u[f];return l}class fr extends Error{constructor(s,u){super(u),this.message=u,this.key=s}}class oi{constructor(s,u=[]){this.parent=s,this.bindings={};for(const[f,y]of u)this.bindings[f]=y}concat(s){return new oi(this,s)}get(s){if(this.bindings[s])return this.bindings[s];if(this.parent)return this.parent.get(s);throw new Error(`${s} not found in scope.`)}has(s){return!!this.bindings[s]||!!this.parent&&this.parent.has(s)}}const Vi={kind:"null"},qe={kind:"number"},Lt={kind:"string"},At={kind:"boolean"},wr={kind:"color"},Gr={kind:"object"},Et={kind:"value"},zi={kind:"collator"},bs={kind:"formatted"},Os={kind:"padding"},rs={kind:"resolvedImage"},se={kind:"variableAnchorOffsetCollection"};function H(l,s){return{kind:"array",itemType:l,N:s}}function U(l){if(l.kind==="array"){const s=U(l.itemType);return typeof l.N=="number"?`array<${s}, ${l.N}>`:l.itemType.kind==="value"?"array":`array<${s}>`}return l.kind}const X=[Vi,qe,Lt,At,wr,bs,Gr,H(Et),Os,rs,se];function re(l,s){if(s.kind==="error")return null;if(l.kind==="array"){if(s.kind==="array"&&(s.N===0&&s.itemType.kind==="value"||!re(l.itemType,s.itemType))&&(typeof l.N!="number"||l.N===s.N))return null}else{if(l.kind===s.kind)return null;if(l.kind==="value"){for(const u of X)if(!re(u,s))return null}}return`Expected ${U(l)} but found ${U(s)} instead.`}function fe(l,s){return s.some(u=>u.kind===l.kind)}function ye(l,s){return s.some(u=>u==="null"?l===null:u==="array"?Array.isArray(l):u==="object"?l&&!Array.isArray(l)&&typeof l=="object":u===typeof l)}function xe(l,s){return l.kind==="array"&&s.kind==="array"?l.itemType.kind===s.itemType.kind&&typeof l.N=="number":l.kind===s.kind}const ue=.96422,Me=.82521,ze=4/29,Se=6/29,Ge=3*Se*Se,vt=Se*Se*Se,kt=Math.PI/180,nn=180/Math.PI;function Ot(l){return(l%=360)<0&&(l+=360),l}function rn([l,s,u,f]){let y,v;const w=ar((.2225045*(l=Yt(l))+.7168786*(s=Yt(s))+.0606169*(u=Yt(u)))/1);l===s&&s===u?y=v=w:(y=ar((.4360747*l+.3850649*s+.1430804*u)/ue),v=ar((.0139322*l+.0971045*s+.7141733*u)/Me));const S=116*w-16;return[S<0?0:S,500*(y-w),200*(w-v),f]}function Yt(l){return l<=.04045?l/12.92:Math.pow((l+.055)/1.055,2.4)}function ar(l){return l>vt?Math.pow(l,1/3):l/Ge+ze}function Xn([l,s,u,f]){let y=(l+16)/116,v=isNaN(s)?y:y+s/500,w=isNaN(u)?y:y-u/200;return y=1*En(y),v=ue*En(v),w=Me*En(w),[Ht(3.1338561*v-1.6168667*y-.4906146*w),Ht(-.9787684*v+1.9161415*y+.033454*w),Ht(.0719453*v-.2289914*y+1.4052427*w),f]}function Ht(l){return(l=l<=.00304?12.92*l:1.055*Math.pow(l,1/2.4)-.055)<0?0:l>1?1:l}function En(l){return l>Se?l*l*l:Ge*(l-ze)}function qn(l){return parseInt(l.padEnd(2,l),16)/255}function mr(l,s){return kr(s?l/100:l,0,1)}function kr(l,s,u){return Math.min(Math.max(s,l),u)}function Vr(l){return!l.some(Number.isNaN)}const qo={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};class Cn{constructor(s,u,f,y=1,v=!0){this.r=s,this.g=u,this.b=f,this.a=y,v||(this.r*=y,this.g*=y,this.b*=y,y||this.overwriteGetter("rgb",[s,u,f,y]))}static parse(s){if(s instanceof Cn)return s;if(typeof s!="string")return;const u=function(f){if((f=f.toLowerCase().trim())==="transparent")return[0,0,0,0];const y=qo[f];if(y){const[w,S,D]=y;return[w/255,S/255,D/255,1]}if(f.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(f)){const w=f.length<6?1:2;let S=1;return[qn(f.slice(S,S+=w)),qn(f.slice(S,S+=w)),qn(f.slice(S,S+=w)),qn(f.slice(S,S+w)||"ff")]}if(f.startsWith("rgb")){const w=f.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(w){const[S,D,R,B,z,j,W,Z,Y,ne,oe,ve]=w,pe=[B||" ",W||" ",ne].join("");if(pe===" "||pe===" /"||pe===",,"||pe===",,,"){const be=[R,j,Y].join(""),Ae=be==="%%%"?100:be===""?255:0;if(Ae){const Fe=[kr(+D/Ae,0,1),kr(+z/Ae,0,1),kr(+Z/Ae,0,1),oe?mr(+oe,ve):1];if(Vr(Fe))return Fe}}return}}const v=f.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(v){const[w,S,D,R,B,z,j,W,Z]=v,Y=[D||" ",B||" ",j].join("");if(Y===" "||Y===" /"||Y===",,"||Y===",,,"){const ne=[+S,kr(+R,0,100),kr(+z,0,100),W?mr(+W,Z):1];if(Vr(ne))return function([oe,ve,pe,be]){function Ae(Fe){const ot=(Fe+oe/30)%12,Ct=ve*Math.min(pe,1-pe);return pe-Ct*Math.max(-1,Math.min(ot-3,9-ot,1))}return oe=Ot(oe),ve/=100,pe/=100,[Ae(0),Ae(8),Ae(4),be]}(ne)}}}(s);return u?new Cn(...u,!1):void 0}get rgb(){const{r:s,g:u,b:f,a:y}=this,v=y||1/0;return this.overwriteGetter("rgb",[s/v,u/v,f/v,y])}get hcl(){return this.overwriteGetter("hcl",function(s){const[u,f,y,v]=rn(s),w=Math.sqrt(f*f+y*y);return[Math.round(1e4*w)?Ot(Math.atan2(y,f)*nn):NaN,w,u,v]}(this.rgb))}get lab(){return this.overwriteGetter("lab",rn(this.rgb))}overwriteGetter(s,u){return Object.defineProperty(this,s,{value:u}),u}toString(){const[s,u,f,y]=this.rgb;return`rgba(${[s,u,f].map(v=>Math.round(255*v)).join(",")},${y})`}}Cn.black=new Cn(0,0,0,1),Cn.white=new Cn(1,1,1,1),Cn.transparent=new Cn(0,0,0,0),Cn.red=new Cn(1,0,0,1);class Fd{constructor(s,u,f){this.sensitivity=s?u?"variant":"case":u?"accent":"base",this.locale=f,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(s,u){return this.collator.compare(s,u)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class $d{constructor(s,u,f,y,v){this.text=s,this.image=u,this.scale=f,this.fontStack=y,this.textColor=v}}class ai{constructor(s){this.sections=s}static fromString(s){return new ai([new $d(s,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(s=>s.text.length!==0||s.image&&s.image.name.length!==0)}static factory(s){return s instanceof ai?s:ai.fromString(s)}toString(){return this.sections.length===0?"":this.sections.map(s=>s.text).join("")}}class li{constructor(s){this.values=s.slice()}static parse(s){if(s instanceof li)return s;if(typeof s=="number")return new li([s,s,s,s]);if(Array.isArray(s)&&!(s.length<1||s.length>4)){for(const u of s)if(typeof u!="number")return;switch(s.length){case 1:s=[s[0],s[0],s[0],s[0]];break;case 2:s=[s[0],s[1],s[0],s[1]];break;case 3:s=[s[0],s[1],s[2],s[1]]}return new li(s)}}toString(){return JSON.stringify(this.values)}}const Ly=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class wi{constructor(s){this.values=s.slice()}static parse(s){if(s instanceof wi)return s;if(Array.isArray(s)&&!(s.length<1)&&s.length%2==0){for(let u=0;u<s.length;u+=2){const f=s[u],y=s[u+1];if(typeof f!="string"||!Ly.has(f)||!Array.isArray(y)||y.length!==2||typeof y[0]!="number"||typeof y[1]!="number")return}return new wi(s)}}toString(){return JSON.stringify(this.values)}}class ci{constructor(s){this.name=s.name,this.available=s.available}toString(){return this.name}static fromString(s){return s?new ci({name:s,available:!1}):null}}function Go(l,s,u,f){return typeof l=="number"&&l>=0&&l<=255&&typeof s=="number"&&s>=0&&s<=255&&typeof u=="number"&&u>=0&&u<=255?f===void 0||typeof f=="number"&&f>=0&&f<=1?null:`Invalid rgba value [${[l,s,u,f].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof f=="number"?[l,s,u,f]:[l,s,u]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function po(l){if(l===null||typeof l=="string"||typeof l=="boolean"||typeof l=="number"||l instanceof Cn||l instanceof Fd||l instanceof ai||l instanceof li||l instanceof wi||l instanceof ci)return!0;if(Array.isArray(l)){for(const s of l)if(!po(s))return!1;return!0}if(typeof l=="object"){for(const s in l)if(!po(l[s]))return!1;return!0}return!1}function lr(l){if(l===null)return Vi;if(typeof l=="string")return Lt;if(typeof l=="boolean")return At;if(typeof l=="number")return qe;if(l instanceof Cn)return wr;if(l instanceof Fd)return zi;if(l instanceof ai)return bs;if(l instanceof li)return Os;if(l instanceof wi)return se;if(l instanceof ci)return rs;if(Array.isArray(l)){const s=l.length;let u;for(const f of l){const y=lr(f);if(u){if(u===y)continue;u=Et;break}u=y}return H(u||Et,s)}return Gr}function Xa(l){const s=typeof l;return l===null?"":s==="string"||s==="number"||s==="boolean"?String(l):l instanceof Cn||l instanceof ai||l instanceof li||l instanceof wi||l instanceof ci?l.toString():JSON.stringify(l)}class Oi{constructor(s,u){this.type=s,this.value=u}static parse(s,u){if(s.length!==2)return u.error(`'literal' expression requires exactly one argument, but found ${s.length-1} instead.`);if(!po(s[1]))return u.error("invalid value");const f=s[1];let y=lr(f);const v=u.expectedType;return y.kind!=="array"||y.N!==0||!v||v.kind!=="array"||typeof v.N=="number"&&v.N!==0||(y=v),new Oi(y,f)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class ir{constructor(s){this.name="ExpressionEvaluationError",this.message=s}toJSON(){return this.message}}const ic={string:Lt,number:qe,boolean:At,object:Gr};class Li{constructor(s,u){this.type=s,this.args=u}static parse(s,u){if(s.length<2)return u.error("Expected at least one argument.");let f,y=1;const v=s[0];if(v==="array"){let S,D;if(s.length>2){const R=s[1];if(typeof R!="string"||!(R in ic)||R==="object")return u.error('The item type argument of "array" must be one of string, number, boolean',1);S=ic[R],y++}else S=Et;if(s.length>3){if(s[2]!==null&&(typeof s[2]!="number"||s[2]<0||s[2]!==Math.floor(s[2])))return u.error('The length argument to "array" must be a positive integer literal',2);D=s[2],y++}f=H(S,D)}else{if(!ic[v])throw new Error(`Types doesn't contain name = ${v}`);f=ic[v]}const w=[];for(;y<s.length;y++){const S=u.parse(s[y],y,Et);if(!S)return null;w.push(S)}return new Li(f,w)}evaluate(s){for(let u=0;u<this.args.length;u++){const f=this.args[u].evaluate(s);if(!re(this.type,lr(f)))return f;if(u===this.args.length-1)throw new ir(`Expected value to be of type ${U(this.type)}, but found ${U(lr(f))} instead.`)}throw new Error}eachChild(s){this.args.forEach(s)}outputDefined(){return this.args.every(s=>s.outputDefined())}}const jd={"to-boolean":At,"to-color":wr,"to-number":qe,"to-string":Lt};class Fi{constructor(s,u){this.type=s,this.args=u}static parse(s,u){if(s.length<2)return u.error("Expected at least one argument.");const f=s[0];if(!jd[f])throw new Error(`Can't parse ${f} as it is not part of the known types`);if((f==="to-boolean"||f==="to-string")&&s.length!==2)return u.error("Expected one argument.");const y=jd[f],v=[];for(let w=1;w<s.length;w++){const S=u.parse(s[w],w,Et);if(!S)return null;v.push(S)}return new Fi(y,v)}evaluate(s){switch(this.type.kind){case"boolean":return!!this.args[0].evaluate(s);case"color":{let u,f;for(const y of this.args){if(u=y.evaluate(s),f=null,u instanceof Cn)return u;if(typeof u=="string"){const v=s.parseColor(u);if(v)return v}else if(Array.isArray(u)&&(f=u.length<3||u.length>4?`Invalid rbga value ${JSON.stringify(u)}: expected an array containing either three or four numeric values.`:Go(u[0],u[1],u[2],u[3]),!f))return new Cn(u[0]/255,u[1]/255,u[2]/255,u[3])}throw new ir(f||`Could not parse color from value '${typeof u=="string"?u:JSON.stringify(u)}'`)}case"padding":{let u;for(const f of this.args){u=f.evaluate(s);const y=li.parse(u);if(y)return y}throw new ir(`Could not parse padding from value '${typeof u=="string"?u:JSON.stringify(u)}'`)}case"variableAnchorOffsetCollection":{let u;for(const f of this.args){u=f.evaluate(s);const y=wi.parse(u);if(y)return y}throw new ir(`Could not parse variableAnchorOffsetCollection from value '${typeof u=="string"?u:JSON.stringify(u)}'`)}case"number":{let u=null;for(const f of this.args){if(u=f.evaluate(s),u===null)return 0;const y=Number(u);if(!isNaN(y))return y}throw new ir(`Could not convert ${JSON.stringify(u)} to number.`)}case"formatted":return ai.fromString(Xa(this.args[0].evaluate(s)));case"resolvedImage":return ci.fromString(Xa(this.args[0].evaluate(s)));default:return Xa(this.args[0].evaluate(s))}}eachChild(s){this.args.forEach(s)}outputDefined(){return this.args.every(s=>s.outputDefined())}}const Fy=["Unknown","Point","LineString","Polygon"];class sc{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?Fy[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(s){let u=this._parseColorCache[s];return u||(u=this._parseColorCache[s]=Cn.parse(s)),u}}class fo{constructor(s,u,f=[],y,v=new oi,w=[]){this.registry=s,this.path=f,this.key=f.map(S=>`[${S}]`).join(""),this.scope=v,this.errors=w,this.expectedType=y,this._isConstant=u}parse(s,u,f,y,v={}){return u?this.concat(u,f,y)._parse(s,v):this._parse(s,v)}_parse(s,u){function f(y,v,w){return w==="assert"?new Li(v,[y]):w==="coerce"?new Fi(v,[y]):y}if(s!==null&&typeof s!="string"&&typeof s!="boolean"&&typeof s!="number"||(s=["literal",s]),Array.isArray(s)){if(s.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const y=s[0];if(typeof y!="string")return this.error(`Expression name must be a string, but found ${typeof y} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const v=this.registry[y];if(v){let w=v.parse(s,this);if(!w)return null;if(this.expectedType){const S=this.expectedType,D=w.type;if(S.kind!=="string"&&S.kind!=="number"&&S.kind!=="boolean"&&S.kind!=="object"&&S.kind!=="array"||D.kind!=="value")if(S.kind!=="color"&&S.kind!=="formatted"&&S.kind!=="resolvedImage"||D.kind!=="value"&&D.kind!=="string")if(S.kind!=="padding"||D.kind!=="value"&&D.kind!=="number"&&D.kind!=="array")if(S.kind!=="variableAnchorOffsetCollection"||D.kind!=="value"&&D.kind!=="array"){if(this.checkSubtype(S,D))return null}else w=f(w,S,u.typeAnnotation||"coerce");else w=f(w,S,u.typeAnnotation||"coerce");else w=f(w,S,u.typeAnnotation||"coerce");else w=f(w,S,u.typeAnnotation||"assert")}if(!(w instanceof Oi)&&w.type.kind!=="resolvedImage"&&this._isConstant(w)){const S=new sc;try{w=new Oi(w.type,w.evaluate(S))}catch(D){return this.error(D.message),null}}return w}return this.error(`Unknown expression "${y}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(s===void 0?"'undefined' value invalid. Use null instead.":typeof s=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof s} instead.`)}concat(s,u,f){const y=typeof s=="number"?this.path.concat(s):this.path,v=f?this.scope.concat(f):this.scope;return new fo(this.registry,this._isConstant,y,u||null,v,this.errors)}error(s,...u){const f=`${this.key}${u.map(y=>`[${y}]`).join("")}`;this.errors.push(new fr(f,s))}checkSubtype(s,u){const f=re(s,u);return f&&this.error(f),f}}class Ls{constructor(s,u){this.type=u.type,this.bindings=[].concat(s),this.result=u}evaluate(s){return this.result.evaluate(s)}eachChild(s){for(const u of this.bindings)s(u[1]);s(this.result)}static parse(s,u){if(s.length<4)return u.error(`Expected at least 3 arguments, but found ${s.length-1} instead.`);const f=[];for(let v=1;v<s.length-1;v+=2){const w=s[v];if(typeof w!="string")return u.error(`Expected string, but found ${typeof w} instead.`,v);if(/[^a-zA-Z0-9_]/.test(w))return u.error("Variable names must contain only alphanumeric characters or '_'.",v);const S=u.parse(s[v+1],v+1);if(!S)return null;f.push([w,S])}const y=u.parse(s[s.length-1],s.length-1,u.expectedType,f);return y?new Ls(f,y):null}outputDefined(){return this.result.outputDefined()}}class hn{constructor(s,u){this.type=u.type,this.name=s,this.boundExpression=u}static parse(s,u){if(s.length!==2||typeof s[1]!="string")return u.error("'var' expression requires exactly one string literal argument.");const f=s[1];return u.scope.has(f)?new hn(f,u.scope.get(f)):u.error(`Unknown variable "${f}". Make sure "${f}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(s){return this.boundExpression.evaluate(s)}eachChild(){}outputDefined(){return!1}}class Ud{constructor(s,u,f){this.type=s,this.index=u,this.input=f}static parse(s,u){if(s.length!==3)return u.error(`Expected 2 arguments, but found ${s.length-1} instead.`);const f=u.parse(s[1],1,qe),y=u.parse(s[2],2,H(u.expectedType||Et));return f&&y?new Ud(y.type.itemType,f,y):null}evaluate(s){const u=this.index.evaluate(s),f=this.input.evaluate(s);if(u<0)throw new ir(`Array index out of bounds: ${u} < 0.`);if(u>=f.length)throw new ir(`Array index out of bounds: ${u} > ${f.length-1}.`);if(u!==Math.floor(u))throw new ir(`Array index must be an integer, but found ${u} instead.`);return f[u]}eachChild(s){s(this.index),s(this.input)}outputDefined(){return!1}}class Hd{constructor(s,u){this.type=At,this.needle=s,this.haystack=u}static parse(s,u){if(s.length!==3)return u.error(`Expected 2 arguments, but found ${s.length-1} instead.`);const f=u.parse(s[1],1,Et),y=u.parse(s[2],2,Et);return f&&y?fe(f.type,[At,Lt,qe,Vi,Et])?new Hd(f,y):u.error(`Expected first argument to be of type boolean, string, number or null, but found ${U(f.type)} instead`):null}evaluate(s){const u=this.needle.evaluate(s),f=this.haystack.evaluate(s);if(!f)return!1;if(!ye(u,["boolean","string","number","null"]))throw new ir(`Expected first argument to be of type boolean, string, number or null, but found ${U(lr(u))} instead.`);if(!ye(f,["string","array"]))throw new ir(`Expected second argument to be of type array or string, but found ${U(lr(f))} instead.`);return f.indexOf(u)>=0}eachChild(s){s(this.needle),s(this.haystack)}outputDefined(){return!0}}class Zo{constructor(s,u,f){this.type=qe,this.needle=s,this.haystack=u,this.fromIndex=f}static parse(s,u){if(s.length<=2||s.length>=5)return u.error(`Expected 3 or 4 arguments, but found ${s.length-1} instead.`);const f=u.parse(s[1],1,Et),y=u.parse(s[2],2,Et);if(!f||!y)return null;if(!fe(f.type,[At,Lt,qe,Vi,Et]))return u.error(`Expected first argument to be of type boolean, string, number or null, but found ${U(f.type)} instead`);if(s.length===4){const v=u.parse(s[3],3,qe);return v?new Zo(f,y,v):null}return new Zo(f,y)}evaluate(s){const u=this.needle.evaluate(s),f=this.haystack.evaluate(s);if(!ye(u,["boolean","string","number","null"]))throw new ir(`Expected first argument to be of type boolean, string, number or null, but found ${U(lr(u))} instead.`);let y;if(this.fromIndex&&(y=this.fromIndex.evaluate(s)),ye(f,["string"])){const v=f.indexOf(u,y);return v===-1?-1:[...f.slice(0,v)].length}if(ye(f,["array"]))return f.indexOf(u,y);throw new ir(`Expected second argument to be of type array or string, but found ${U(lr(f))} instead.`)}eachChild(s){s(this.needle),s(this.haystack),this.fromIndex&&s(this.fromIndex)}outputDefined(){return!1}}class Wd{constructor(s,u,f,y,v,w){this.inputType=s,this.type=u,this.input=f,this.cases=y,this.outputs=v,this.otherwise=w}static parse(s,u){if(s.length<5)return u.error(`Expected at least 4 arguments, but found only ${s.length-1}.`);if(s.length%2!=1)return u.error("Expected an even number of arguments.");let f,y;u.expectedType&&u.expectedType.kind!=="value"&&(y=u.expectedType);const v={},w=[];for(let R=2;R<s.length-1;R+=2){let B=s[R];const z=s[R+1];Array.isArray(B)||(B=[B]);const j=u.concat(R);if(B.length===0)return j.error("Expected at least one branch label.");for(const Z of B){if(typeof Z!="number"&&typeof Z!="string")return j.error("Branch labels must be numbers or strings.");if(typeof Z=="number"&&Math.abs(Z)>Number.MAX_SAFE_INTEGER)return j.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof Z=="number"&&Math.floor(Z)!==Z)return j.error("Numeric branch labels must be integer values.");if(f){if(j.checkSubtype(f,lr(Z)))return null}else f=lr(Z);if(v[String(Z)]!==void 0)return j.error("Branch labels must be unique.");v[String(Z)]=w.length}const W=u.parse(z,R,y);if(!W)return null;y=y||W.type,w.push(W)}const S=u.parse(s[1],1,Et);if(!S)return null;const D=u.parse(s[s.length-1],s.length-1,y);return D?S.type.kind!=="value"&&u.concat(1).checkSubtype(f,S.type)?null:new Wd(f,y,S,v,w,D):null}evaluate(s){const u=this.input.evaluate(s);return(lr(u)===this.inputType&&this.outputs[this.cases[u]]||this.otherwise).evaluate(s)}eachChild(s){s(this.input),this.outputs.forEach(s),s(this.otherwise)}outputDefined(){return this.outputs.every(s=>s.outputDefined())&&this.otherwise.outputDefined()}}class oc{constructor(s,u,f){this.type=s,this.branches=u,this.otherwise=f}static parse(s,u){if(s.length<4)return u.error(`Expected at least 3 arguments, but found only ${s.length-1}.`);if(s.length%2!=0)return u.error("Expected an odd number of arguments.");let f;u.expectedType&&u.expectedType.kind!=="value"&&(f=u.expectedType);const y=[];for(let w=1;w<s.length-1;w+=2){const S=u.parse(s[w],w,At);if(!S)return null;const D=u.parse(s[w+1],w+1,f);if(!D)return null;y.push([S,D]),f=f||D.type}const v=u.parse(s[s.length-1],s.length-1,f);if(!v)return null;if(!f)throw new Error("Can't infer output type");return new oc(f,y,v)}evaluate(s){for(const[u,f]of this.branches)if(u.evaluate(s))return f.evaluate(s);return this.otherwise.evaluate(s)}eachChild(s){for(const[u,f]of this.branches)s(u),s(f);s(this.otherwise)}outputDefined(){return this.branches.every(([s,u])=>u.outputDefined())&&this.otherwise.outputDefined()}}class Ka{constructor(s,u,f,y){this.type=s,this.input=u,this.beginIndex=f,this.endIndex=y}static parse(s,u){if(s.length<=2||s.length>=5)return u.error(`Expected 3 or 4 arguments, but found ${s.length-1} instead.`);const f=u.parse(s[1],1,Et),y=u.parse(s[2],2,qe);if(!f||!y)return null;if(!fe(f.type,[H(Et),Lt,Et]))return u.error(`Expected first argument to be of type array or string, but found ${U(f.type)} instead`);if(s.length===4){const v=u.parse(s[3],3,qe);return v?new Ka(f.type,f,y,v):null}return new Ka(f.type,f,y)}evaluate(s){const u=this.input.evaluate(s),f=this.beginIndex.evaluate(s);let y;if(this.endIndex&&(y=this.endIndex.evaluate(s)),ye(u,["string"]))return[...u].slice(f,y).join("");if(ye(u,["array"]))return u.slice(f,y);throw new ir(`Expected first argument to be of type array or string, but found ${U(lr(u))} instead.`)}eachChild(s){s(this.input),s(this.beginIndex),this.endIndex&&s(this.endIndex)}outputDefined(){return!1}}function ac(l,s){const u=l.length-1;let f,y,v=0,w=u,S=0;for(;v<=w;)if(S=Math.floor((v+w)/2),f=l[S],y=l[S+1],f<=s){if(S===u||s<y)return S;v=S+1}else{if(!(f>s))throw new ir("Input is not a number.");w=S-1}return 0}class Yo{constructor(s,u,f){this.type=s,this.input=u,this.labels=[],this.outputs=[];for(const[y,v]of f)this.labels.push(y),this.outputs.push(v)}static parse(s,u){if(s.length-1<4)return u.error(`Expected at least 4 arguments, but found only ${s.length-1}.`);if((s.length-1)%2!=0)return u.error("Expected an even number of arguments.");const f=u.parse(s[1],1,qe);if(!f)return null;const y=[];let v=null;u.expectedType&&u.expectedType.kind!=="value"&&(v=u.expectedType);for(let w=1;w<s.length;w+=2){const S=w===1?-1/0:s[w],D=s[w+1],R=w,B=w+1;if(typeof S!="number")return u.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',R);if(y.length&&y[y.length-1][0]>=S)return u.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',R);const z=u.parse(D,B,v);if(!z)return null;v=v||z.type,y.push([S,z])}return new Yo(v,f,y)}evaluate(s){const u=this.labels,f=this.outputs;if(u.length===1)return f[0].evaluate(s);const y=this.input.evaluate(s);if(y<=u[0])return f[0].evaluate(s);const v=u.length;return y>=u[v-1]?f[v-1].evaluate(s):f[ac(u,y)].evaluate(s)}eachChild(s){s(this.input);for(const u of this.outputs)s(u)}outputDefined(){return this.outputs.every(s=>s.outputDefined())}}function Np(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var $y=Bp;function Bp(l,s,u,f){this.cx=3*l,this.bx=3*(u-l)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*s,this.by=3*(f-s)-this.cy,this.ay=1-this.cy-this.by,this.p1x=l,this.p1y=s,this.p2x=u,this.p2y=f}Bp.prototype={sampleCurveX:function(l){return((this.ax*l+this.bx)*l+this.cx)*l},sampleCurveY:function(l){return((this.ay*l+this.by)*l+this.cy)*l},sampleCurveDerivativeX:function(l){return(3*this.ax*l+2*this.bx)*l+this.cx},solveCurveX:function(l,s){if(s===void 0&&(s=1e-6),l<0)return 0;if(l>1)return 1;for(var u=l,f=0;f<8;f++){var y=this.sampleCurveX(u)-l;if(Math.abs(y)<s)return u;var v=this.sampleCurveDerivativeX(u);if(Math.abs(v)<1e-6)break;u-=y/v}var w=0,S=1;for(u=l,f=0;f<20&&(y=this.sampleCurveX(u),!(Math.abs(y-l)<s));f++)l>y?w=u:S=u,u=.5*(S-w)+w;return u},solve:function(l,s){return this.sampleCurveY(this.solveCurveX(l,s))}};var jy=Np($y);function mo(l,s,u){return l+u*(s-l)}function Ja(l,s,u){return l.map((f,y)=>mo(f,s[y],u))}const Zr={number:mo,color:function(l,s,u,f="rgb"){switch(f){case"rgb":{const[y,v,w,S]=Ja(l.rgb,s.rgb,u);return new Cn(y,v,w,S,!1)}case"hcl":{const[y,v,w,S]=l.hcl,[D,R,B,z]=s.hcl;let j,W;if(isNaN(y)||isNaN(D))isNaN(y)?isNaN(D)?j=NaN:(j=D,w!==1&&w!==0||(W=R)):(j=y,B!==1&&B!==0||(W=v));else{let ve=D-y;D>y&&ve>180?ve-=360:D<y&&y-D>180&&(ve+=360),j=y+u*ve}const[Z,Y,ne,oe]=function([ve,pe,be,Ae]){return ve=isNaN(ve)?0:ve*kt,Xn([be,Math.cos(ve)*pe,Math.sin(ve)*pe,Ae])}([j,W??mo(v,R,u),mo(w,B,u),mo(S,z,u)]);return new Cn(Z,Y,ne,oe,!1)}case"lab":{const[y,v,w,S]=Xn(Ja(l.lab,s.lab,u));return new Cn(y,v,w,S,!1)}}},array:Ja,padding:function(l,s,u){return new li(Ja(l.values,s.values,u))},variableAnchorOffsetCollection:function(l,s,u){const f=l.values,y=s.values;if(f.length!==y.length)throw new ir(`Cannot interpolate values of different length. from: ${l.toString()}, to: ${s.toString()}`);const v=[];for(let w=0;w<f.length;w+=2){if(f[w]!==y[w])throw new ir(`Cannot interpolate values containing mismatched anchors. from[${w}]: ${f[w]}, to[${w}]: ${y[w]}`);v.push(f[w]);const[S,D]=f[w+1],[R,B]=y[w+1];v.push([mo(S,R,u),mo(D,B,u)])}return new wi(v)}};class Yr{constructor(s,u,f,y,v){this.type=s,this.operator=u,this.interpolation=f,this.input=y,this.labels=[],this.outputs=[];for(const[w,S]of v)this.labels.push(w),this.outputs.push(S)}static interpolationFactor(s,u,f,y){let v=0;if(s.name==="exponential")v=lc(u,s.base,f,y);else if(s.name==="linear")v=lc(u,1,f,y);else if(s.name==="cubic-bezier"){const w=s.controlPoints;v=new jy(w[0],w[1],w[2],w[3]).solve(lc(u,1,f,y))}return v}static parse(s,u){let[f,y,v,...w]=s;if(!Array.isArray(y)||y.length===0)return u.error("Expected an interpolation type expression.",1);if(y[0]==="linear")y={name:"linear"};else if(y[0]==="exponential"){const R=y[1];if(typeof R!="number")return u.error("Exponential interpolation requires a numeric base.",1,1);y={name:"exponential",base:R}}else{if(y[0]!=="cubic-bezier")return u.error(`Unknown interpolation type ${String(y[0])}`,1,0);{const R=y.slice(1);if(R.length!==4||R.some(B=>typeof B!="number"||B<0||B>1))return u.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);y={name:"cubic-bezier",controlPoints:R}}}if(s.length-1<4)return u.error(`Expected at least 4 arguments, but found only ${s.length-1}.`);if((s.length-1)%2!=0)return u.error("Expected an even number of arguments.");if(v=u.parse(v,2,qe),!v)return null;const S=[];let D=null;f==="interpolate-hcl"||f==="interpolate-lab"?D=wr:u.expectedType&&u.expectedType.kind!=="value"&&(D=u.expectedType);for(let R=0;R<w.length;R+=2){const B=w[R],z=w[R+1],j=R+3,W=R+4;if(typeof B!="number")return u.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',j);if(S.length&&S[S.length-1][0]>=B)return u.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',j);const Z=u.parse(z,W,D);if(!Z)return null;D=D||Z.type,S.push([B,Z])}return xe(D,qe)||xe(D,wr)||xe(D,Os)||xe(D,se)||xe(D,H(qe))?new Yr(D,f,y,v,S):u.error(`Type ${U(D)} is not interpolatable.`)}evaluate(s){const u=this.labels,f=this.outputs;if(u.length===1)return f[0].evaluate(s);const y=this.input.evaluate(s);if(y<=u[0])return f[0].evaluate(s);const v=u.length;if(y>=u[v-1])return f[v-1].evaluate(s);const w=ac(u,y),S=Yr.interpolationFactor(this.interpolation,y,u[w],u[w+1]),D=f[w].evaluate(s),R=f[w+1].evaluate(s);switch(this.operator){case"interpolate":return Zr[this.type.kind](D,R,S);case"interpolate-hcl":return Zr.color(D,R,S,"hcl");case"interpolate-lab":return Zr.color(D,R,S,"lab")}}eachChild(s){s(this.input);for(const u of this.outputs)s(u)}outputDefined(){return this.outputs.every(s=>s.outputDefined())}}function lc(l,s,u,f){const y=f-u,v=l-u;return y===0?0:s===1?v/y:(Math.pow(s,v)-1)/(Math.pow(s,y)-1)}class cc{constructor(s,u){this.type=s,this.args=u}static parse(s,u){if(s.length<2)return u.error("Expectected at least one argument.");let f=null;const y=u.expectedType;y&&y.kind!=="value"&&(f=y);const v=[];for(const S of s.slice(1)){const D=u.parse(S,1+v.length,f,void 0,{typeAnnotation:"omit"});if(!D)return null;f=f||D.type,v.push(D)}if(!f)throw new Error("No output type");const w=y&&v.some(S=>re(y,S.type));return new cc(w?Et:f,v)}evaluate(s){let u,f=null,y=0;for(const v of this.args)if(y++,f=v.evaluate(s),f&&f instanceof ci&&!f.available&&(u||(u=f.name),f=null,y===this.args.length&&(f=u)),f!==null)break;return f}eachChild(s){this.args.forEach(s)}outputDefined(){return this.args.every(s=>s.outputDefined())}}function dc(l,s){return l==="=="||l==="!="?s.kind==="boolean"||s.kind==="string"||s.kind==="number"||s.kind==="null"||s.kind==="value":s.kind==="string"||s.kind==="number"||s.kind==="value"}function Vp(l,s,u,f){return f.compare(s,u)===0}function Xo(l,s,u){const f=l!=="=="&&l!=="!=";return class EE{constructor(v,w,S){this.type=At,this.lhs=v,this.rhs=w,this.collator=S,this.hasUntypedArgument=v.type.kind==="value"||w.type.kind==="value"}static parse(v,w){if(v.length!==3&&v.length!==4)return w.error("Expected two or three arguments.");const S=v[0];let D=w.parse(v[1],1,Et);if(!D)return null;if(!dc(S,D.type))return w.concat(1).error(`"${S}" comparisons are not supported for type '${U(D.type)}'.`);let R=w.parse(v[2],2,Et);if(!R)return null;if(!dc(S,R.type))return w.concat(2).error(`"${S}" comparisons are not supported for type '${U(R.type)}'.`);if(D.type.kind!==R.type.kind&&D.type.kind!=="value"&&R.type.kind!=="value")return w.error(`Cannot compare types '${U(D.type)}' and '${U(R.type)}'.`);f&&(D.type.kind==="value"&&R.type.kind!=="value"?D=new Li(R.type,[D]):D.type.kind!=="value"&&R.type.kind==="value"&&(R=new Li(D.type,[R])));let B=null;if(v.length===4){if(D.type.kind!=="string"&&R.type.kind!=="string"&&D.type.kind!=="value"&&R.type.kind!=="value")return w.error("Cannot use collator to compare non-string types.");if(B=w.parse(v[3],3,zi),!B)return null}return new EE(D,R,B)}evaluate(v){const w=this.lhs.evaluate(v),S=this.rhs.evaluate(v);if(f&&this.hasUntypedArgument){const D=lr(w),R=lr(S);if(D.kind!==R.kind||D.kind!=="string"&&D.kind!=="number")throw new ir(`Expected arguments for "${l}" to be (string, string) or (number, number), but found (${D.kind}, ${R.kind}) instead.`)}if(this.collator&&!f&&this.hasUntypedArgument){const D=lr(w),R=lr(S);if(D.kind!=="string"||R.kind!=="string")return s(v,w,S)}return this.collator?u(v,w,S,this.collator.evaluate(v)):s(v,w,S)}eachChild(v){v(this.lhs),v(this.rhs),this.collator&&v(this.collator)}outputDefined(){return!0}}}const Uy=Xo("==",function(l,s,u){return s===u},Vp),zp=Xo("!=",function(l,s,u){return s!==u},function(l,s,u,f){return!Vp(0,s,u,f)}),Op=Xo("<",function(l,s,u){return s<u},function(l,s,u,f){return f.compare(s,u)<0}),Hy=Xo(">",function(l,s,u){return s>u},function(l,s,u,f){return f.compare(s,u)>0}),Wy=Xo("<=",function(l,s,u){return s<=u},function(l,s,u,f){return f.compare(s,u)<=0}),Lp=Xo(">=",function(l,s,u){return s>=u},function(l,s,u,f){return f.compare(s,u)>=0});class Qa{constructor(s,u,f){this.type=zi,this.locale=f,this.caseSensitive=s,this.diacriticSensitive=u}static parse(s,u){if(s.length!==2)return u.error("Expected one argument.");const f=s[1];if(typeof f!="object"||Array.isArray(f))return u.error("Collator options argument must be an object.");const y=u.parse(f["case-sensitive"]!==void 0&&f["case-sensitive"],1,At);if(!y)return null;const v=u.parse(f["diacritic-sensitive"]!==void 0&&f["diacritic-sensitive"],1,At);if(!v)return null;let w=null;return f.locale&&(w=u.parse(f.locale,1,Lt),!w)?null:new Qa(y,v,w)}evaluate(s){return new Fd(this.caseSensitive.evaluate(s),this.diacriticSensitive.evaluate(s),this.locale?this.locale.evaluate(s):null)}eachChild(s){s(this.caseSensitive),s(this.diacriticSensitive),this.locale&&s(this.locale)}outputDefined(){return!1}}class qd{constructor(s,u,f,y,v){this.type=Lt,this.number=s,this.locale=u,this.currency=f,this.minFractionDigits=y,this.maxFractionDigits=v}static parse(s,u){if(s.length!==3)return u.error("Expected two arguments.");const f=u.parse(s[1],1,qe);if(!f)return null;const y=s[2];if(typeof y!="object"||Array.isArray(y))return u.error("NumberFormat options argument must be an object.");let v=null;if(y.locale&&(v=u.parse(y.locale,1,Lt),!v))return null;let w=null;if(y.currency&&(w=u.parse(y.currency,1,Lt),!w))return null;let S=null;if(y["min-fraction-digits"]&&(S=u.parse(y["min-fraction-digits"],1,qe),!S))return null;let D=null;return y["max-fraction-digits"]&&(D=u.parse(y["max-fraction-digits"],1,qe),!D)?null:new qd(f,v,w,S,D)}evaluate(s){return new Intl.NumberFormat(this.locale?this.locale.evaluate(s):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(s):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(s):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(s):void 0}).format(this.number.evaluate(s))}eachChild(s){s(this.number),this.locale&&s(this.locale),this.currency&&s(this.currency),this.minFractionDigits&&s(this.minFractionDigits),this.maxFractionDigits&&s(this.maxFractionDigits)}outputDefined(){return!1}}class uc{constructor(s){this.type=bs,this.sections=s}static parse(s,u){if(s.length<2)return u.error("Expected at least one argument.");const f=s[1];if(!Array.isArray(f)&&typeof f=="object")return u.error("First argument must be an image or text section.");const y=[];let v=!1;for(let w=1;w<=s.length-1;++w){const S=s[w];if(v&&typeof S=="object"&&!Array.isArray(S)){v=!1;let D=null;if(S["font-scale"]&&(D=u.parse(S["font-scale"],1,qe),!D))return null;let R=null;if(S["text-font"]&&(R=u.parse(S["text-font"],1,H(Lt)),!R))return null;let B=null;if(S["text-color"]&&(B=u.parse(S["text-color"],1,wr),!B))return null;const z=y[y.length-1];z.scale=D,z.font=R,z.textColor=B}else{const D=u.parse(s[w],1,Et);if(!D)return null;const R=D.type.kind;if(R!=="string"&&R!=="value"&&R!=="null"&&R!=="resolvedImage")return u.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");v=!0,y.push({content:D,scale:null,font:null,textColor:null})}}return new uc(y)}evaluate(s){return new ai(this.sections.map(u=>{const f=u.content.evaluate(s);return lr(f)===rs?new $d("",f,null,null,null):new $d(Xa(f),null,u.scale?u.scale.evaluate(s):null,u.font?u.font.evaluate(s).join(","):null,u.textColor?u.textColor.evaluate(s):null)}))}eachChild(s){for(const u of this.sections)s(u.content),u.scale&&s(u.scale),u.font&&s(u.font),u.textColor&&s(u.textColor)}outputDefined(){return!1}}class Gd{constructor(s){this.type=rs,this.input=s}static parse(s,u){if(s.length!==2)return u.error("Expected two arguments.");const f=u.parse(s[1],1,Lt);return f?new Gd(f):u.error("No image name provided.")}evaluate(s){const u=this.input.evaluate(s),f=ci.fromString(u);return f&&s.availableImages&&(f.available=s.availableImages.indexOf(u)>-1),f}eachChild(s){s(this.input)}outputDefined(){return!1}}class Zd{constructor(s){this.type=qe,this.input=s}static parse(s,u){if(s.length!==2)return u.error(`Expected 1 argument, but found ${s.length-1} instead.`);const f=u.parse(s[1],1);return f?f.type.kind!=="array"&&f.type.kind!=="string"&&f.type.kind!=="value"?u.error(`Expected argument of type string or array, but found ${U(f.type)} instead.`):new Zd(f):null}evaluate(s){const u=this.input.evaluate(s);if(typeof u=="string")return[...u].length;if(Array.isArray(u))return u.length;throw new ir(`Expected value to be of type string or array, but found ${U(lr(u))} instead.`)}eachChild(s){s(this.input)}outputDefined(){return!1}}const is=8192;function qy(l,s){const u=(180+l[0])/360,f=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+l[1]*Math.PI/360)))/360,y=Math.pow(2,s.z);return[Math.round(u*y*is),Math.round(f*y*is)]}function Yd(l,s){const u=Math.pow(2,s.z);return[(y=(l[0]/is+s.x)/u,360*y-180),(f=(l[1]/is+s.y)/u,360/Math.PI*Math.atan(Math.exp((180-360*f)*Math.PI/180))-90)];var f,y}function go(l,s){l[0]=Math.min(l[0],s[0]),l[1]=Math.min(l[1],s[1]),l[2]=Math.max(l[2],s[0]),l[3]=Math.max(l[3],s[1])}function Fs(l,s){return!(l[0]<=s[0]||l[2]>=s[2]||l[1]<=s[1]||l[3]>=s[3])}function bn(l,s,u){const f=l[0]-s[0],y=l[1]-s[1],v=l[0]-u[0],w=l[1]-u[1];return f*w-v*y==0&&f*v<=0&&y*w<=0}function hc(l,s,u,f){return(y=[f[0]-u[0],f[1]-u[1]])[0]*(v=[s[0]-l[0],s[1]-l[1]])[1]-y[1]*v[0]!=0&&!(!$p(l,s,u,f)||!$p(u,f,l,s));var y,v}function Gy(l,s,u){for(const f of u)for(let y=0;y<f.length-1;++y)if(hc(l,s,f[y],f[y+1]))return!0;return!1}function Ko(l,s,u=!1){let f=!1;for(const S of s)for(let D=0;D<S.length-1;D++){if(bn(l,S[D],S[D+1]))return u;(v=S[D])[1]>(y=l)[1]!=(w=S[D+1])[1]>y[1]&&y[0]<(w[0]-v[0])*(y[1]-v[1])/(w[1]-v[1])+v[0]&&(f=!f)}var y,v,w;return f}function Zy(l,s){for(const u of s)if(Ko(l,u))return!0;return!1}function Fp(l,s){for(const u of l)if(!Ko(u,s))return!1;for(let u=0;u<l.length-1;++u)if(Gy(l[u],l[u+1],s))return!1;return!0}function Yy(l,s){for(const u of s)if(Fp(l,u))return!0;return!1}function $p(l,s,u,f){const y=f[0]-u[0],v=f[1]-u[1],w=(l[0]-u[0])*v-y*(l[1]-u[1]),S=(s[0]-u[0])*v-y*(s[1]-u[1]);return w>0&&S<0||w<0&&S>0}function Xd(l,s,u){const f=[];for(let y=0;y<l.length;y++){const v=[];for(let w=0;w<l[y].length;w++){const S=qy(l[y][w],u);go(s,S),v.push(S)}f.push(v)}return f}function jp(l,s,u){const f=[];for(let y=0;y<l.length;y++){const v=Xd(l[y],s,u);f.push(v)}return f}function Up(l,s,u,f){if(l[0]<u[0]||l[0]>u[2]){const y=.5*f;let v=l[0]-u[0]>y?-f:u[0]-l[0]>y?f:0;v===0&&(v=l[0]-u[2]>y?-f:u[2]-l[0]>y?f:0),l[0]+=v}go(s,l)}function Hp(l,s,u,f){const y=Math.pow(2,f.z)*is,v=[f.x*is,f.y*is],w=[];for(const S of l)for(const D of S){const R=[D.x+v[0],D.y+v[1]];Up(R,s,u,y),w.push(R)}return w}function Wp(l,s,u,f){const y=Math.pow(2,f.z)*is,v=[f.x*is,f.y*is],w=[];for(const D of l){const R=[];for(const B of D){const z=[B.x+v[0],B.y+v[1]];go(s,z),R.push(z)}w.push(R)}if(s[2]-s[0]<=y/2){(S=s)[0]=S[1]=1/0,S[2]=S[3]=-1/0;for(const D of w)for(const R of D)Up(R,s,u,y)}var S;return w}class yo{constructor(s,u){this.type=At,this.geojson=s,this.geometries=u}static parse(s,u){if(s.length!==2)return u.error(`'within' expression requires exactly one argument, but found ${s.length-1} instead.`);if(po(s[1])){const f=s[1];if(f.type==="FeatureCollection"){const y=[];for(const v of f.features){const{type:w,coordinates:S}=v.geometry;w==="Polygon"&&y.push(S),w==="MultiPolygon"&&y.push(...S)}if(y.length)return new yo(f,{type:"MultiPolygon",coordinates:y})}else if(f.type==="Feature"){const y=f.geometry.type;if(y==="Polygon"||y==="MultiPolygon")return new yo(f,f.geometry)}else if(f.type==="Polygon"||f.type==="MultiPolygon")return new yo(f,f)}return u.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(s){if(s.geometry()!=null&&s.canonicalID()!=null){if(s.geometryType()==="Point")return function(u,f){const y=[1/0,1/0,-1/0,-1/0],v=[1/0,1/0,-1/0,-1/0],w=u.canonicalID();if(f.type==="Polygon"){const S=Xd(f.coordinates,v,w),D=Hp(u.geometry(),y,v,w);if(!Fs(y,v))return!1;for(const R of D)if(!Ko(R,S))return!1}if(f.type==="MultiPolygon"){const S=jp(f.coordinates,v,w),D=Hp(u.geometry(),y,v,w);if(!Fs(y,v))return!1;for(const R of D)if(!Zy(R,S))return!1}return!0}(s,this.geometries);if(s.geometryType()==="LineString")return function(u,f){const y=[1/0,1/0,-1/0,-1/0],v=[1/0,1/0,-1/0,-1/0],w=u.canonicalID();if(f.type==="Polygon"){const S=Xd(f.coordinates,v,w),D=Wp(u.geometry(),y,v,w);if(!Fs(y,v))return!1;for(const R of D)if(!Fp(R,S))return!1}if(f.type==="MultiPolygon"){const S=jp(f.coordinates,v,w),D=Wp(u.geometry(),y,v,w);if(!Fs(y,v))return!1;for(const R of D)if(!Yy(R,S))return!1}return!0}(s,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let qp=class{constructor(l=[],s=(u,f)=>u<f?-1:u>f?1:0){if(this.data=l,this.length=this.data.length,this.compare=s,this.length>0)for(let u=(this.length>>1)-1;u>=0;u--)this._down(u)}push(l){this.data.push(l),this._up(this.length++)}pop(){if(this.length===0)return;const l=this.data[0],s=this.data.pop();return--this.length>0&&(this.data[0]=s,this._down(0)),l}peek(){return this.data[0]}_up(l){const{data:s,compare:u}=this,f=s[l];for(;l>0;){const y=l-1>>1,v=s[y];if(u(f,v)>=0)break;s[l]=v,l=y}s[l]=f}_down(l){const{data:s,compare:u}=this,f=this.length>>1,y=s[l];for(;l<f;){let v=1+(l<<1);const w=v+1;if(w<this.length&&u(s[w],s[v])<0&&(v=w),u(s[v],y)>=0)break;s[l]=s[v],l=v}s[l]=y}};function Xy(l,s,u,f,y){Gp(l,s,u,f||l.length-1,y||Ky)}function Gp(l,s,u,f,y){for(;f>u;){if(f-u>600){var v=f-u+1,w=s-u+1,S=Math.log(v),D=.5*Math.exp(2*S/3),R=.5*Math.sqrt(S*D*(v-D)/v)*(w-v/2<0?-1:1);Gp(l,s,Math.max(u,Math.floor(s-w*D/v+R)),Math.min(f,Math.floor(s+(v-w)*D/v+R)),y)}var B=l[s],z=u,j=f;for(el(l,u,s),y(l[f],B)>0&&el(l,u,f);z<j;){for(el(l,z,j),z++,j--;y(l[z],B)<0;)z++;for(;y(l[j],B)>0;)j--}y(l[u],B)===0?el(l,u,j):el(l,++j,f),j<=s&&(u=j+1),s<=j&&(f=j-1)}}function el(l,s,u){var f=l[s];l[s]=l[u],l[u]=f}function Ky(l,s){return l<s?-1:l>s?1:0}function pc(l,s){if(l.length<=1)return[l];const u=[];let f,y;for(const v of l){const w=Qy(v);w!==0&&(v.area=Math.abs(w),y===void 0&&(y=w<0),y===w<0?(f&&u.push(f),f=[v]):f.push(v))}if(f&&u.push(f),s>1)for(let v=0;v<u.length;v++)u[v].length<=s||(Xy(u[v],s,1,u[v].length-1,Jy),u[v]=u[v].slice(0,s));return u}function Jy(l,s){return s.area-l.area}function Qy(l){let s=0;for(let u,f,y=0,v=l.length,w=v-1;y<v;w=y++)u=l[y],f=l[w],s+=(f.x-u.x)*(u.y+f.y);return s}const Zp=1/298.257223563,Yp=Zp*(2-Zp),Xp=Math.PI/180;class Kd{constructor(s){const u=6378.137*Xp*1e3,f=Math.cos(s*Xp),y=1/(1-Yp*(1-f*f)),v=Math.sqrt(y);this.kx=u*v*f,this.ky=u*v*y*(1-Yp)}distance(s,u){const f=this.wrap(s[0]-u[0])*this.kx,y=(s[1]-u[1])*this.ky;return Math.sqrt(f*f+y*y)}pointOnLine(s,u){let f,y,v,w,S=1/0;for(let D=0;D<s.length-1;D++){let R=s[D][0],B=s[D][1],z=this.wrap(s[D+1][0]-R)*this.kx,j=(s[D+1][1]-B)*this.ky,W=0;z===0&&j===0||(W=(this.wrap(u[0]-R)*this.kx*z+(u[1]-B)*this.ky*j)/(z*z+j*j),W>1?(R=s[D+1][0],B=s[D+1][1]):W>0&&(R+=z/this.kx*W,B+=j/this.ky*W)),z=this.wrap(u[0]-R)*this.kx,j=(u[1]-B)*this.ky;const Z=z*z+j*j;Z<S&&(S=Z,f=R,y=B,v=D,w=W)}return{point:[f,y],index:v,t:Math.max(0,Math.min(1,w))}}wrap(s){for(;s<-180;)s+=360;for(;s>180;)s-=360;return s}}function Kp(l,s){return s[0]-l[0]}function fc(l){return l[1]-l[0]+1}function xs(l,s){return l[1]>=l[0]&&l[1]<s}function Jd(l,s){if(l[0]>l[1])return[null,null];const u=fc(l);if(s){if(u===2)return[l,null];const y=Math.floor(u/2);return[[l[0],l[0]+y],[l[0]+y,l[1]]]}if(u===1)return[l,null];const f=Math.floor(u/2)-1;return[[l[0],l[0]+f],[l[0]+f+1,l[1]]]}function Qd(l,s){if(!xs(s,l.length))return[1/0,1/0,-1/0,-1/0];const u=[1/0,1/0,-1/0,-1/0];for(let f=s[0];f<=s[1];++f)go(u,l[f]);return u}function eu(l){const s=[1/0,1/0,-1/0,-1/0];for(const u of l)for(const f of u)go(s,f);return s}function mc(l){return l[0]!==-1/0&&l[1]!==-1/0&&l[2]!==1/0&&l[3]!==1/0}function tu(l,s,u){if(!mc(l)||!mc(s))return NaN;let f=0,y=0;return l[2]<s[0]&&(f=s[0]-l[2]),l[0]>s[2]&&(f=l[0]-s[2]),l[1]>s[3]&&(y=l[1]-s[3]),l[3]<s[1]&&(y=s[1]-l[3]),u.distance([0,0],[f,y])}function _o(l,s,u){const f=u.pointOnLine(s,l);return u.distance(l,f.point)}function nu(l,s,u,f,y){const v=Math.min(_o(l,[u,f],y),_o(s,[u,f],y)),w=Math.min(_o(u,[l,s],y),_o(f,[l,s],y));return Math.min(v,w)}function e0(l,s,u,f,y){if(!xs(s,l.length)||!xs(f,u.length))return 1/0;let v=1/0;for(let w=s[0];w<s[1];++w){const S=l[w],D=l[w+1];for(let R=f[0];R<f[1];++R){const B=u[R],z=u[R+1];if(hc(S,D,B,z))return 0;v=Math.min(v,nu(S,D,B,z,y))}}return v}function er(l,s,u,f,y){if(!xs(s,l.length)||!xs(f,u.length))return NaN;let v=1/0;for(let w=s[0];w<=s[1];++w)for(let S=f[0];S<=f[1];++S)if(v=Math.min(v,y.distance(l[w],u[S])),v===0)return v;return v}function t0(l,s,u){if(Ko(l,s,!0))return 0;let f=1/0;for(const y of s){const v=y[0],w=y[y.length-1];if(v!==w&&(f=Math.min(f,_o(l,[w,v],u)),f===0))return f;const S=u.pointOnLine(y,l);if(f=Math.min(f,u.distance(l,S.point)),f===0)return f}return f}function qt(l,s,u,f){if(!xs(s,l.length))return NaN;for(let v=s[0];v<=s[1];++v)if(Ko(l[v],u,!0))return 0;let y=1/0;for(let v=s[0];v<s[1];++v){const w=l[v],S=l[v+1];for(const D of u)for(let R=0,B=D.length,z=B-1;R<B;z=R++){const j=D[z],W=D[R];if(hc(w,S,j,W))return 0;y=Math.min(y,nu(w,S,j,W,f))}}return y}function gc(l,s){for(const u of l)for(const f of u)if(Ko(f,s,!0))return!0;return!1}function Rn(l,s,u,f=1/0){const y=eu(l),v=eu(s);if(f!==1/0&&tu(y,v,u)>=f)return f;if(Fs(y,v)){if(gc(l,s))return 0}else if(gc(s,l))return 0;let w=1/0;for(const S of l)for(let D=0,R=S.length,B=R-1;D<R;B=D++){const z=S[B],j=S[D];for(const W of s)for(let Z=0,Y=W.length,ne=Y-1;Z<Y;ne=Z++){const oe=W[ne],ve=W[Z];if(hc(z,j,oe,ve))return 0;w=Math.min(w,nu(z,j,oe,ve,u))}}return w}function Tn(l,s,u,f,y,v){if(!v)return;const w=tu(Qd(f,v),y,u);w<s&&l.push([w,v,[0,0]])}function bo(l,s,u,f,y,v,w){if(!v||!w)return;const S=tu(Qd(f,v),Qd(y,w),u);S<s&&l.push([S,v,w])}function tl(l,s,u,f,y=1/0){let v=Math.min(f.distance(l[0],u[0][0]),y);if(v===0)return v;const w=new qp([[0,[0,l.length-1],[0,0]]],Kp),S=eu(u);for(;w.length>0;){const D=w.pop();if(D[0]>=v)continue;const R=D[1],B=s?50:100;if(fc(R)<=B){if(!xs(R,l.length))return NaN;if(s){const z=qt(l,R,u,f);if(isNaN(z)||z===0)return z;v=Math.min(v,z)}else for(let z=R[0];z<=R[1];++z){const j=t0(l[z],u,f);if(v=Math.min(v,j),v===0)return 0}}else{const z=Jd(R,s);Tn(w,v,f,l,S,z[0]),Tn(w,v,f,l,S,z[1])}}return v}function nl(l,s,u,f,y,v=1/0){let w=Math.min(v,y.distance(l[0],u[0]));if(w===0)return w;const S=new qp([[0,[0,l.length-1],[0,u.length-1]]],Kp);for(;S.length>0;){const D=S.pop();if(D[0]>=w)continue;const R=D[1],B=D[2],z=s?50:100,j=f?50:100;if(fc(R)<=z&&fc(B)<=j){if(!xs(R,l.length)&&xs(B,u.length))return NaN;let W;if(s&&f)W=e0(l,R,u,B,y),w=Math.min(w,W);else if(s&&!f){const Z=l.slice(R[0],R[1]+1);for(let Y=B[0];Y<=B[1];++Y)if(W=_o(u[Y],Z,y),w=Math.min(w,W),w===0)return w}else if(!s&&f){const Z=u.slice(B[0],B[1]+1);for(let Y=R[0];Y<=R[1];++Y)if(W=_o(l[Y],Z,y),w=Math.min(w,W),w===0)return w}else W=er(l,R,u,B,y),w=Math.min(w,W)}else{const W=Jd(R,s),Z=Jd(B,f);bo(S,w,y,l,u,W[0],Z[0]),bo(S,w,y,l,u,W[0],Z[1]),bo(S,w,y,l,u,W[1],Z[0]),bo(S,w,y,l,u,W[1],Z[1])}}return w}function ru(l){return l.type==="MultiPolygon"?l.coordinates.map(s=>({type:"Polygon",coordinates:s})):l.type==="MultiLineString"?l.coordinates.map(s=>({type:"LineString",coordinates:s})):l.type==="MultiPoint"?l.coordinates.map(s=>({type:"Point",coordinates:s})):[l]}class xo{constructor(s,u){this.type=qe,this.geojson=s,this.geometries=u}static parse(s,u){if(s.length!==2)return u.error(`'distance' expression requires exactly one argument, but found ${s.length-1} instead.`);if(po(s[1])){const f=s[1];if(f.type==="FeatureCollection")return new xo(f,f.features.map(y=>ru(y.geometry)).flat());if(f.type==="Feature")return new xo(f,ru(f.geometry));if("type"in f&&"coordinates"in f)return new xo(f,ru(f))}return u.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(s){if(s.geometry()!=null&&s.canonicalID()!=null){if(s.geometryType()==="Point")return function(u,f){const y=u.geometry(),v=y.flat().map(D=>Yd([D.x,D.y],u.canonical));if(y.length===0)return NaN;const w=new Kd(v[0][1]);let S=1/0;for(const D of f){switch(D.type){case"Point":S=Math.min(S,nl(v,!1,[D.coordinates],!1,w,S));break;case"LineString":S=Math.min(S,nl(v,!1,D.coordinates,!0,w,S));break;case"Polygon":S=Math.min(S,tl(v,!1,D.coordinates,w,S))}if(S===0)return S}return S}(s,this.geometries);if(s.geometryType()==="LineString")return function(u,f){const y=u.geometry(),v=y.flat().map(D=>Yd([D.x,D.y],u.canonical));if(y.length===0)return NaN;const w=new Kd(v[0][1]);let S=1/0;for(const D of f){switch(D.type){case"Point":S=Math.min(S,nl(v,!0,[D.coordinates],!1,w,S));break;case"LineString":S=Math.min(S,nl(v,!0,D.coordinates,!0,w,S));break;case"Polygon":S=Math.min(S,tl(v,!0,D.coordinates,w,S))}if(S===0)return S}return S}(s,this.geometries);if(s.geometryType()==="Polygon")return function(u,f){const y=u.geometry();if(y.length===0||y[0].length===0)return NaN;const v=pc(y,0).map(D=>D.map(R=>R.map(B=>Yd([B.x,B.y],u.canonical)))),w=new Kd(v[0][0][0][1]);let S=1/0;for(const D of f)for(const R of v){switch(D.type){case"Point":S=Math.min(S,tl([D.coordinates],!1,R,w,S));break;case"LineString":S=Math.min(S,tl(D.coordinates,!0,R,w,S));break;case"Polygon":S=Math.min(S,Rn(R,D.coordinates,w,S))}if(S===0)return S}return S}(s,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}const Jo={"==":Uy,"!=":zp,">":Hy,"<":Op,">=":Lp,"<=":Wy,array:Li,at:Ud,boolean:Li,case:oc,coalesce:cc,collator:Qa,format:uc,image:Gd,in:Hd,"index-of":Zo,interpolate:Yr,"interpolate-hcl":Yr,"interpolate-lab":Yr,length:Zd,let:Ls,literal:Oi,match:Wd,number:Li,"number-format":qd,object:Li,slice:Ka,step:Yo,string:Li,"to-boolean":Fi,"to-color":Fi,"to-number":Fi,"to-string":Fi,var:hn,within:yo,distance:xo};class ki{constructor(s,u,f,y){this.name=s,this.type=u,this._evaluate=f,this.args=y}evaluate(s){return this._evaluate(s,this.args)}eachChild(s){this.args.forEach(s)}outputDefined(){return!1}static parse(s,u){const f=s[0],y=ki.definitions[f];if(!y)return u.error(`Unknown expression "${f}". If you wanted a literal array, use ["literal", [...]].`,0);const v=Array.isArray(y)?y[0]:y.type,w=Array.isArray(y)?[[y[1],y[2]]]:y.overloads,S=w.filter(([R])=>!Array.isArray(R)||R.length===s.length-1);let D=null;for(const[R,B]of S){D=new fo(u.registry,rl,u.path,null,u.scope);const z=[];let j=!1;for(let W=1;W<s.length;W++){const Z=s[W],Y=Array.isArray(R)?R[W-1]:R.type,ne=D.parse(Z,1+z.length,Y);if(!ne){j=!0;break}z.push(ne)}if(!j)if(Array.isArray(R)&&R.length!==z.length)D.error(`Expected ${R.length} arguments, but found ${z.length} instead.`);else{for(let W=0;W<z.length;W++){const Z=Array.isArray(R)?R[W]:R.type,Y=z[W];D.concat(W+1).checkSubtype(Z,Y.type)}if(D.errors.length===0)return new ki(f,v,B,z)}}if(S.length===1)u.errors.push(...D.errors);else{const R=(S.length?S:w).map(([z])=>{return j=z,Array.isArray(j)?`(${j.map(U).join(", ")})`:`(${U(j.type)}...)`;var j}).join(" | "),B=[];for(let z=1;z<s.length;z++){const j=u.parse(s[z],1+B.length);if(!j)return null;B.push(U(j.type))}u.error(`Expected arguments of type ${R}, but found (${B.join(", ")}) instead.`)}return null}static register(s,u){ki.definitions=u;for(const f in u)s[f]=ki}}function iu(l,[s,u,f,y]){s=s.evaluate(l),u=u.evaluate(l),f=f.evaluate(l);const v=y?y.evaluate(l):1,w=Go(s,u,f,v);if(w)throw new ir(w);return new Cn(s/255,u/255,f/255,v,!1)}function su(l,s){return l in s}function ou(l,s){const u=s[l];return u===void 0?null:u}function vo(l){return{type:l}}function rl(l){if(l instanceof hn)return rl(l.boundExpression);if(l instanceof ki&&l.name==="error"||l instanceof Qa||l instanceof yo||l instanceof xo)return!1;const s=l instanceof Fi||l instanceof Li;let u=!0;return l.eachChild(f=>{u=s?u&&rl(f):u&&f instanceof Oi}),!!u&&il(l)&&sl(l,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function il(l){if(l instanceof ki&&(l.name==="get"&&l.args.length===1||l.name==="feature-state"||l.name==="has"&&l.args.length===1||l.name==="properties"||l.name==="geometry-type"||l.name==="id"||/^filter-/.test(l.name))||l instanceof yo||l instanceof xo)return!1;let s=!0;return l.eachChild(u=>{s&&!il(u)&&(s=!1)}),s}function Qo(l){if(l instanceof ki&&l.name==="feature-state")return!1;let s=!0;return l.eachChild(u=>{s&&!Qo(u)&&(s=!1)}),s}function sl(l,s){if(l instanceof ki&&s.indexOf(l.name)>=0)return!1;let u=!0;return l.eachChild(f=>{u&&!sl(f,s)&&(u=!1)}),u}function yc(l){return{result:"success",value:l}}function ea(l){return{result:"error",value:l}}function ta(l){return l["property-type"]==="data-driven"||l["property-type"]==="cross-faded-data-driven"}function Jp(l){return!!l.expression&&l.expression.parameters.indexOf("zoom")>-1}function au(l){return!!l.expression&&l.expression.interpolated}function on(l){return l instanceof Number?"number":l instanceof String?"string":l instanceof Boolean?"boolean":Array.isArray(l)?"array":l===null?"null":typeof l}function _c(l){return typeof l=="object"&&l!==null&&!Array.isArray(l)}function n0(l){return l}function Qp(l,s){const u=s.type==="color",f=l.stops&&typeof l.stops[0][0]=="object",y=f||!(f||l.property!==void 0),v=l.type||(au(s)?"exponential":"interval");if(u||s.type==="padding"){const B=u?Cn.parse:li.parse;(l=si({},l)).stops&&(l.stops=l.stops.map(z=>[z[0],B(z[1])])),l.default=B(l.default?l.default:s.default)}if(l.colorSpace&&(w=l.colorSpace)!=="rgb"&&w!=="hcl"&&w!=="lab")throw new Error(`Unknown color space: "${l.colorSpace}"`);var w;let S,D,R;if(v==="exponential")S=tf;else if(v==="interval")S=bc;else if(v==="categorical"){S=ef,D=Object.create(null);for(const B of l.stops)D[B[0]]=B[1];R=typeof l.stops[0][0]}else{if(v!=="identity")throw new Error(`Unknown function type "${v}"`);S=nf}if(f){const B={},z=[];for(let Z=0;Z<l.stops.length;Z++){const Y=l.stops[Z],ne=Y[0].zoom;B[ne]===void 0&&(B[ne]={zoom:ne,type:l.type,property:l.property,default:l.default,stops:[]},z.push(ne)),B[ne].stops.push([Y[0].value,Y[1]])}const j=[];for(const Z of z)j.push([B[Z].zoom,Qp(B[Z],s)]);const W={name:"linear"};return{kind:"composite",interpolationType:W,interpolationFactor:Yr.interpolationFactor.bind(void 0,W),zoomStops:j.map(Z=>Z[0]),evaluate:({zoom:Z},Y)=>tf({stops:j,base:l.base},s,Z).evaluate(Z,Y)}}if(y){const B=v==="exponential"?{name:"exponential",base:l.base!==void 0?l.base:1}:null;return{kind:"camera",interpolationType:B,interpolationFactor:Yr.interpolationFactor.bind(void 0,B),zoomStops:l.stops.map(z=>z[0]),evaluate:({zoom:z})=>S(l,s,z,D,R)}}return{kind:"source",evaluate(B,z){const j=z&&z.properties?z.properties[l.property]:void 0;return j===void 0?na(l.default,s.default):S(l,s,j,D,R)}}}function na(l,s,u){return l!==void 0?l:s!==void 0?s:u!==void 0?u:void 0}function ef(l,s,u,f,y){return na(typeof u===y?f[u]:void 0,l.default,s.default)}function bc(l,s,u){if(on(u)!=="number")return na(l.default,s.default);const f=l.stops.length;if(f===1||u<=l.stops[0][0])return l.stops[0][1];if(u>=l.stops[f-1][0])return l.stops[f-1][1];const y=ac(l.stops.map(v=>v[0]),u);return l.stops[y][1]}function tf(l,s,u){const f=l.base!==void 0?l.base:1;if(on(u)!=="number")return na(l.default,s.default);const y=l.stops.length;if(y===1||u<=l.stops[0][0])return l.stops[0][1];if(u>=l.stops[y-1][0])return l.stops[y-1][1];const v=ac(l.stops.map(B=>B[0]),u),w=function(B,z,j,W){const Z=W-j,Y=B-j;return Z===0?0:z===1?Y/Z:(Math.pow(z,Y)-1)/(Math.pow(z,Z)-1)}(u,f,l.stops[v][0],l.stops[v+1][0]),S=l.stops[v][1],D=l.stops[v+1][1],R=Zr[s.type]||n0;return typeof S.evaluate=="function"?{evaluate(...B){const z=S.evaluate.apply(void 0,B),j=D.evaluate.apply(void 0,B);if(z!==void 0&&j!==void 0)return R(z,j,w,l.colorSpace)}}:R(S,D,w,l.colorSpace)}function nf(l,s,u){switch(s.type){case"color":u=Cn.parse(u);break;case"formatted":u=ai.fromString(u.toString());break;case"resolvedImage":u=ci.fromString(u.toString());break;case"padding":u=li.parse(u);break;default:on(u)===s.type||s.type==="enum"&&s.values[u]||(u=void 0)}return na(u,l.default,s.default)}ki.register(Jo,{error:[{kind:"error"},[Lt],(l,[s])=>{throw new ir(s.evaluate(l))}],typeof:[Lt,[Et],(l,[s])=>U(lr(s.evaluate(l)))],"to-rgba":[H(qe,4),[wr],(l,[s])=>{const[u,f,y,v]=s.evaluate(l).rgb;return[255*u,255*f,255*y,v]}],rgb:[wr,[qe,qe,qe],iu],rgba:[wr,[qe,qe,qe,qe],iu],has:{type:At,overloads:[[[Lt],(l,[s])=>su(s.evaluate(l),l.properties())],[[Lt,Gr],(l,[s,u])=>su(s.evaluate(l),u.evaluate(l))]]},get:{type:Et,overloads:[[[Lt],(l,[s])=>ou(s.evaluate(l),l.properties())],[[Lt,Gr],(l,[s,u])=>ou(s.evaluate(l),u.evaluate(l))]]},"feature-state":[Et,[Lt],(l,[s])=>ou(s.evaluate(l),l.featureState||{})],properties:[Gr,[],l=>l.properties()],"geometry-type":[Lt,[],l=>l.geometryType()],id:[Et,[],l=>l.id()],zoom:[qe,[],l=>l.globals.zoom],"heatmap-density":[qe,[],l=>l.globals.heatmapDensity||0],"line-progress":[qe,[],l=>l.globals.lineProgress||0],accumulated:[Et,[],l=>l.globals.accumulated===void 0?null:l.globals.accumulated],"+":[qe,vo(qe),(l,s)=>{let u=0;for(const f of s)u+=f.evaluate(l);return u}],"*":[qe,vo(qe),(l,s)=>{let u=1;for(const f of s)u*=f.evaluate(l);return u}],"-":{type:qe,overloads:[[[qe,qe],(l,[s,u])=>s.evaluate(l)-u.evaluate(l)],[[qe],(l,[s])=>-s.evaluate(l)]]},"/":[qe,[qe,qe],(l,[s,u])=>s.evaluate(l)/u.evaluate(l)],"%":[qe,[qe,qe],(l,[s,u])=>s.evaluate(l)%u.evaluate(l)],ln2:[qe,[],()=>Math.LN2],pi:[qe,[],()=>Math.PI],e:[qe,[],()=>Math.E],"^":[qe,[qe,qe],(l,[s,u])=>Math.pow(s.evaluate(l),u.evaluate(l))],sqrt:[qe,[qe],(l,[s])=>Math.sqrt(s.evaluate(l))],log10:[qe,[qe],(l,[s])=>Math.log(s.evaluate(l))/Math.LN10],ln:[qe,[qe],(l,[s])=>Math.log(s.evaluate(l))],log2:[qe,[qe],(l,[s])=>Math.log(s.evaluate(l))/Math.LN2],sin:[qe,[qe],(l,[s])=>Math.sin(s.evaluate(l))],cos:[qe,[qe],(l,[s])=>Math.cos(s.evaluate(l))],tan:[qe,[qe],(l,[s])=>Math.tan(s.evaluate(l))],asin:[qe,[qe],(l,[s])=>Math.asin(s.evaluate(l))],acos:[qe,[qe],(l,[s])=>Math.acos(s.evaluate(l))],atan:[qe,[qe],(l,[s])=>Math.atan(s.evaluate(l))],min:[qe,vo(qe),(l,s)=>Math.min(...s.map(u=>u.evaluate(l)))],max:[qe,vo(qe),(l,s)=>Math.max(...s.map(u=>u.evaluate(l)))],abs:[qe,[qe],(l,[s])=>Math.abs(s.evaluate(l))],round:[qe,[qe],(l,[s])=>{const u=s.evaluate(l);return u<0?-Math.round(-u):Math.round(u)}],floor:[qe,[qe],(l,[s])=>Math.floor(s.evaluate(l))],ceil:[qe,[qe],(l,[s])=>Math.ceil(s.evaluate(l))],"filter-==":[At,[Lt,Et],(l,[s,u])=>l.properties()[s.value]===u.value],"filter-id-==":[At,[Et],(l,[s])=>l.id()===s.value],"filter-type-==":[At,[Lt],(l,[s])=>l.geometryType()===s.value],"filter-<":[At,[Lt,Et],(l,[s,u])=>{const f=l.properties()[s.value],y=u.value;return typeof f==typeof y&&f<y}],"filter-id-<":[At,[Et],(l,[s])=>{const u=l.id(),f=s.value;return typeof u==typeof f&&u<f}],"filter->":[At,[Lt,Et],(l,[s,u])=>{const f=l.properties()[s.value],y=u.value;return typeof f==typeof y&&f>y}],"filter-id->":[At,[Et],(l,[s])=>{const u=l.id(),f=s.value;return typeof u==typeof f&&u>f}],"filter-<=":[At,[Lt,Et],(l,[s,u])=>{const f=l.properties()[s.value],y=u.value;return typeof f==typeof y&&f<=y}],"filter-id-<=":[At,[Et],(l,[s])=>{const u=l.id(),f=s.value;return typeof u==typeof f&&u<=f}],"filter->=":[At,[Lt,Et],(l,[s,u])=>{const f=l.properties()[s.value],y=u.value;return typeof f==typeof y&&f>=y}],"filter-id->=":[At,[Et],(l,[s])=>{const u=l.id(),f=s.value;return typeof u==typeof f&&u>=f}],"filter-has":[At,[Et],(l,[s])=>s.value in l.properties()],"filter-has-id":[At,[],l=>l.id()!==null&&l.id()!==void 0],"filter-type-in":[At,[H(Lt)],(l,[s])=>s.value.indexOf(l.geometryType())>=0],"filter-id-in":[At,[H(Et)],(l,[s])=>s.value.indexOf(l.id())>=0],"filter-in-small":[At,[Lt,H(Et)],(l,[s,u])=>u.value.indexOf(l.properties()[s.value])>=0],"filter-in-large":[At,[Lt,H(Et)],(l,[s,u])=>function(f,y,v,w){for(;v<=w;){const S=v+w>>1;if(y[S]===f)return!0;y[S]>f?w=S-1:v=S+1}return!1}(l.properties()[s.value],u.value,0,u.value.length-1)],all:{type:At,overloads:[[[At,At],(l,[s,u])=>s.evaluate(l)&&u.evaluate(l)],[vo(At),(l,s)=>{for(const u of s)if(!u.evaluate(l))return!1;return!0}]]},any:{type:At,overloads:[[[At,At],(l,[s,u])=>s.evaluate(l)||u.evaluate(l)],[vo(At),(l,s)=>{for(const u of s)if(u.evaluate(l))return!0;return!1}]]},"!":[At,[At],(l,[s])=>!s.evaluate(l)],"is-supported-script":[At,[Lt],(l,[s])=>{const u=l.globals&&l.globals.isSupportedScript;return!u||u(s.evaluate(l))}],upcase:[Lt,[Lt],(l,[s])=>s.evaluate(l).toUpperCase()],downcase:[Lt,[Lt],(l,[s])=>s.evaluate(l).toLowerCase()],concat:[Lt,vo(Et),(l,s)=>s.map(u=>Xa(u.evaluate(l))).join("")],"resolved-locale":[Lt,[zi],(l,[s])=>s.evaluate(l).resolvedLocale()]});class xc{constructor(s,u){var f;this.expression=s,this._warningHistory={},this._evaluator=new sc,this._defaultValue=u?(f=u).type==="color"&&_c(f.default)?new Cn(0,0,0,0):f.type==="color"?Cn.parse(f.default)||null:f.type==="padding"?li.parse(f.default)||null:f.type==="variableAnchorOffsetCollection"?wi.parse(f.default)||null:f.default===void 0?null:f.default:null,this._enumValues=u&&u.type==="enum"?u.values:null}evaluateWithoutErrorHandling(s,u,f,y,v,w){return this._evaluator.globals=s,this._evaluator.feature=u,this._evaluator.featureState=f,this._evaluator.canonical=y,this._evaluator.availableImages=v||null,this._evaluator.formattedSection=w,this.expression.evaluate(this._evaluator)}evaluate(s,u,f,y,v,w){this._evaluator.globals=s,this._evaluator.feature=u||null,this._evaluator.featureState=f||null,this._evaluator.canonical=y,this._evaluator.availableImages=v||null,this._evaluator.formattedSection=w||null;try{const S=this.expression.evaluate(this._evaluator);if(S==null||typeof S=="number"&&S!=S)return this._defaultValue;if(this._enumValues&&!(S in this._enumValues))throw new ir(`Expected value to be one of ${Object.keys(this._enumValues).map(D=>JSON.stringify(D)).join(", ")}, but found ${JSON.stringify(S)} instead.`);return S}catch(S){return this._warningHistory[S.message]||(this._warningHistory[S.message]=!0,typeof console<"u"&&console.warn(S.message)),this._defaultValue}}}function vc(l){return Array.isArray(l)&&l.length>0&&typeof l[0]=="string"&&l[0]in Jo}function ra(l,s){const u=new fo(Jo,rl,[],s?function(y){const v={color:wr,string:Lt,number:qe,enum:Lt,boolean:At,formatted:bs,padding:Os,resolvedImage:rs,variableAnchorOffsetCollection:se};return y.type==="array"?H(v[y.value]||Et,y.length):v[y.type]}(s):void 0),f=u.parse(l,void 0,void 0,void 0,s&&s.type==="string"?{typeAnnotation:"coerce"}:void 0);return f?yc(new xc(f,s)):ea(u.errors)}class ia{constructor(s,u){this.kind=s,this._styleExpression=u,this.isStateDependent=s!=="constant"&&!Qo(u.expression)}evaluateWithoutErrorHandling(s,u,f,y,v,w){return this._styleExpression.evaluateWithoutErrorHandling(s,u,f,y,v,w)}evaluate(s,u,f,y,v,w){return this._styleExpression.evaluate(s,u,f,y,v,w)}}class sa{constructor(s,u,f,y){this.kind=s,this.zoomStops=f,this._styleExpression=u,this.isStateDependent=s!=="camera"&&!Qo(u.expression),this.interpolationType=y}evaluateWithoutErrorHandling(s,u,f,y,v,w){return this._styleExpression.evaluateWithoutErrorHandling(s,u,f,y,v,w)}evaluate(s,u,f,y,v,w){return this._styleExpression.evaluate(s,u,f,y,v,w)}interpolationFactor(s,u,f){return this.interpolationType?Yr.interpolationFactor(this.interpolationType,s,u,f):0}}function lu(l,s){const u=ra(l,s);if(u.result==="error")return u;const f=u.value.expression,y=il(f);if(!y&&!ta(s))return ea([new fr("","data expressions not supported")]);const v=sl(f,["zoom"]);if(!v&&!Jp(s))return ea([new fr("","zoom expressions not supported")]);const w=ol(f);return w||v?w instanceof fr?ea([w]):w instanceof Yr&&!au(s)?ea([new fr("",'"interpolate" expressions cannot be used with this property')]):yc(w?new sa(y?"camera":"composite",u.value,w.labels,w instanceof Yr?w.interpolation:void 0):new ia(y?"constant":"source",u.value)):ea([new fr("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class oa{constructor(s,u){this._parameters=s,this._specification=u,si(this,Qp(this._parameters,this._specification))}static deserialize(s){return new oa(s._parameters,s._specification)}static serialize(s){return{_parameters:s._parameters,_specification:s._specification}}}function ol(l){let s=null;if(l instanceof Ls)s=ol(l.result);else if(l instanceof cc){for(const u of l.args)if(s=ol(u),s)break}else(l instanceof Yo||l instanceof Yr)&&l.input instanceof ki&&l.input.name==="zoom"&&(s=l);return s instanceof fr||l.eachChild(u=>{const f=ol(u);f instanceof fr?s=f:!s&&f?s=new fr("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):s&&f&&s!==f&&(s=new fr("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),s}function wc(l){if(l===!0||l===!1)return!0;if(!Array.isArray(l)||l.length===0)return!1;switch(l[0]){case"has":return l.length>=2&&l[1]!=="$id"&&l[1]!=="$type";case"in":return l.length>=3&&(typeof l[1]!="string"||Array.isArray(l[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return l.length!==3||Array.isArray(l[1])||Array.isArray(l[2]);case"any":case"all":for(const s of l.slice(1))if(!wc(s)&&typeof s!="boolean")return!1;return!0;default:return!0}}const kc={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function cu(l){if(l==null)return{filter:()=>!0,needGeometry:!1};wc(l)||(l=Ec(l));const s=ra(l,kc);if(s.result==="error")throw new Error(s.value.map(u=>`${u.key}: ${u.message}`).join(", "));return{filter:(u,f,y)=>s.value.evaluate(u,f,{},y),needGeometry:rf(l)}}function r0(l,s){return l<s?-1:l>s?1:0}function rf(l){if(!Array.isArray(l))return!1;if(l[0]==="within"||l[0]==="distance")return!0;for(let s=1;s<l.length;s++)if(rf(l[s]))return!0;return!1}function Ec(l){if(!l)return!0;const s=l[0];return l.length<=1?s!=="any":s==="=="?du(l[1],l[2],"=="):s==="!="?Ar(du(l[1],l[2],"==")):s==="<"||s===">"||s==="<="||s===">="?du(l[1],l[2],s):s==="any"?(u=l.slice(1),["any"].concat(u.map(Ec))):s==="all"?["all"].concat(l.slice(1).map(Ec)):s==="none"?["all"].concat(l.slice(1).map(Ec).map(Ar)):s==="in"?al(l[1],l.slice(2)):s==="!in"?Ar(al(l[1],l.slice(2))):s==="has"?ll(l[1]):s!=="!has"||Ar(ll(l[1]));var u}function du(l,s,u){switch(l){case"$type":return[`filter-type-${u}`,s];case"$id":return[`filter-id-${u}`,s];default:return[`filter-${u}`,l,s]}}function al(l,s){if(s.length===0)return!1;switch(l){case"$type":return["filter-type-in",["literal",s]];case"$id":return["filter-id-in",["literal",s]];default:return s.length>200&&!s.some(u=>typeof u!=typeof s[0])?["filter-in-large",l,["literal",s.sort(r0)]]:["filter-in-small",l,["literal",s]]}}function ll(l){switch(l){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",l]}}function Ar(l){return["!",l]}function wo(l){const s=typeof l;if(s==="number"||s==="boolean"||s==="string"||l==null)return JSON.stringify(l);if(Array.isArray(l)){let y="[";for(const v of l)y+=`${wo(v)},`;return`${y}]`}const u=Object.keys(l).sort();let f="{";for(let y=0;y<u.length;y++)f+=`${JSON.stringify(u[y])}:${wo(l[u[y]])},`;return`${f}}`}function sf(l){let s="";for(const u of zn)s+=`/${wo(l[u])}`;return s}function of(l){const s=l.value;return s?[new je(l.key,s,"constants have been deprecated as of v8")]:[]}function tr(l){return l instanceof Number||l instanceof String||l instanceof Boolean?l.valueOf():l}function $i(l){if(Array.isArray(l))return l.map($i);if(l instanceof Object&&!(l instanceof Number||l instanceof String||l instanceof Boolean)){const s={};for(const u in l)s[u]=$i(l[u]);return s}return tr(l)}function di(l){const s=l.key,u=l.value,f=l.valueSpec||{},y=l.objectElementValidators||{},v=l.style,w=l.styleSpec,S=l.validateSpec;let D=[];const R=on(u);if(R!=="object")return[new je(s,u,`object expected, ${R} found`)];for(const B in u){const z=B.split(".")[0],j=f[z]||f["*"];let W;if(y[z])W=y[z];else if(f[z])W=S;else if(y["*"])W=y["*"];else{if(!f["*"]){D.push(new je(s,u[B],`unknown property "${B}"`));continue}W=S}D=D.concat(W({key:(s&&`${s}.`)+B,value:u[B],valueSpec:j,style:v,styleSpec:w,object:u,objectKey:B,validateSpec:S},u))}for(const B in f)y[B]||f[B].required&&f[B].default===void 0&&u[B]===void 0&&D.push(new je(s,u,`missing required property "${B}"`));return D}function cl(l){const s=l.value,u=l.valueSpec,f=l.style,y=l.styleSpec,v=l.key,w=l.arrayElementValidator||l.validateSpec;if(on(s)!=="array")return[new je(v,s,`array expected, ${on(s)} found`)];if(u.length&&s.length!==u.length)return[new je(v,s,`array length ${u.length} expected, length ${s.length} found`)];if(u["min-length"]&&s.length<u["min-length"])return[new je(v,s,`array length at least ${u["min-length"]} expected, length ${s.length} found`)];let S={type:u.value,values:u.values};y.$version<7&&(S.function=u.function),on(u.value)==="object"&&(S=u.value);let D=[];for(let R=0;R<s.length;R++)D=D.concat(w({array:s,arrayIndex:R,value:s[R],valueSpec:S,validateSpec:l.validateSpec,style:f,styleSpec:y,key:`${v}[${R}]`}));return D}function uu(l){const s=l.key,u=l.value,f=l.valueSpec;let y=on(u);return y==="number"&&u!=u&&(y="NaN"),y!=="number"?[new je(s,u,`number expected, ${y} found`)]:"minimum"in f&&u<f.minimum?[new je(s,u,`${u} is less than the minimum value ${f.minimum}`)]:"maximum"in f&&u>f.maximum?[new je(s,u,`${u} is greater than the maximum value ${f.maximum}`)]:[]}function Cc(l){const s=l.valueSpec,u=tr(l.value.type);let f,y,v,w={};const S=u!=="categorical"&&l.value.property===void 0,D=!S,R=on(l.value.stops)==="array"&&on(l.value.stops[0])==="array"&&on(l.value.stops[0][0])==="object",B=di({key:l.key,value:l.value,valueSpec:l.styleSpec.function,validateSpec:l.validateSpec,style:l.style,styleSpec:l.styleSpec,objectElementValidators:{stops:function(W){if(u==="identity")return[new je(W.key,W.value,'identity function may not have a "stops" property')];let Z=[];const Y=W.value;return Z=Z.concat(cl({key:W.key,value:Y,valueSpec:W.valueSpec,validateSpec:W.validateSpec,style:W.style,styleSpec:W.styleSpec,arrayElementValidator:z})),on(Y)==="array"&&Y.length===0&&Z.push(new je(W.key,Y,"array must have at least one stop")),Z},default:function(W){return W.validateSpec({key:W.key,value:W.value,valueSpec:s,validateSpec:W.validateSpec,style:W.style,styleSpec:W.styleSpec})}}});return u==="identity"&&S&&B.push(new je(l.key,l.value,'missing required property "property"')),u==="identity"||l.value.stops||B.push(new je(l.key,l.value,'missing required property "stops"')),u==="exponential"&&l.valueSpec.expression&&!au(l.valueSpec)&&B.push(new je(l.key,l.value,"exponential functions not supported")),l.styleSpec.$version>=8&&(D&&!ta(l.valueSpec)?B.push(new je(l.key,l.value,"property functions not supported")):S&&!Jp(l.valueSpec)&&B.push(new je(l.key,l.value,"zoom functions not supported"))),u!=="categorical"&&!R||l.value.property!==void 0||B.push(new je(l.key,l.value,'"property" property is required')),B;function z(W){let Z=[];const Y=W.value,ne=W.key;if(on(Y)!=="array")return[new je(ne,Y,`array expected, ${on(Y)} found`)];if(Y.length!==2)return[new je(ne,Y,`array length 2 expected, length ${Y.length} found`)];if(R){if(on(Y[0])!=="object")return[new je(ne,Y,`object expected, ${on(Y[0])} found`)];if(Y[0].zoom===void 0)return[new je(ne,Y,"object stop key must have zoom")];if(Y[0].value===void 0)return[new je(ne,Y,"object stop key must have value")];if(v&&v>tr(Y[0].zoom))return[new je(ne,Y[0].zoom,"stop zoom values must appear in ascending order")];tr(Y[0].zoom)!==v&&(v=tr(Y[0].zoom),y=void 0,w={}),Z=Z.concat(di({key:`${ne}[0]`,value:Y[0],valueSpec:{zoom:{}},validateSpec:W.validateSpec,style:W.style,styleSpec:W.styleSpec,objectElementValidators:{zoom:uu,value:j}}))}else Z=Z.concat(j({key:`${ne}[0]`,value:Y[0],validateSpec:W.validateSpec,style:W.style,styleSpec:W.styleSpec},Y));return vc($i(Y[1]))?Z.concat([new je(`${ne}[1]`,Y[1],"expressions are not allowed in function stops.")]):Z.concat(W.validateSpec({key:`${ne}[1]`,value:Y[1],valueSpec:s,validateSpec:W.validateSpec,style:W.style,styleSpec:W.styleSpec}))}function j(W,Z){const Y=on(W.value),ne=tr(W.value),oe=W.value!==null?W.value:Z;if(f){if(Y!==f)return[new je(W.key,oe,`${Y} stop domain type must match previous stop domain type ${f}`)]}else f=Y;if(Y!=="number"&&Y!=="string"&&Y!=="boolean")return[new je(W.key,oe,"stop domain value must be a number, string, or boolean")];if(Y!=="number"&&u!=="categorical"){let ve=`number expected, ${Y} found`;return ta(s)&&u===void 0&&(ve+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new je(W.key,oe,ve)]}return u!=="categorical"||Y!=="number"||isFinite(ne)&&Math.floor(ne)===ne?u!=="categorical"&&Y==="number"&&y!==void 0&&ne<y?[new je(W.key,oe,"stop domain values must appear in ascending order")]:(y=ne,u==="categorical"&&ne in w?[new je(W.key,oe,"stop domain values must be unique")]:(w[ne]=!0,[])):[new je(W.key,oe,`integer expected, found ${ne}`)]}}function aa(l){const s=(l.expressionContext==="property"?lu:ra)($i(l.value),l.valueSpec);if(s.result==="error")return s.value.map(f=>new je(`${l.key}${f.key}`,l.value,f.message));const u=s.value.expression||s.value._styleExpression.expression;if(l.expressionContext==="property"&&l.propertyKey==="text-font"&&!u.outputDefined())return[new je(l.key,l.value,`Invalid data expression for "${l.propertyKey}". Output values must be contained as literals within the expression.`)];if(l.expressionContext==="property"&&l.propertyType==="layout"&&!Qo(u))return[new je(l.key,l.value,'"feature-state" data expressions are not supported with layout properties.')];if(l.expressionContext==="filter"&&!Qo(u))return[new je(l.key,l.value,'"feature-state" data expressions are not supported with filters.')];if(l.expressionContext&&l.expressionContext.indexOf("cluster")===0){if(!sl(u,["zoom","feature-state"]))return[new je(l.key,l.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(l.expressionContext==="cluster-initial"&&!il(u))return[new je(l.key,l.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function vs(l){const s=l.key,u=l.value,f=l.valueSpec,y=[];return Array.isArray(f.values)?f.values.indexOf(tr(u))===-1&&y.push(new je(s,u,`expected one of [${f.values.join(", ")}], ${JSON.stringify(u)} found`)):Object.keys(f.values).indexOf(tr(u))===-1&&y.push(new je(s,u,`expected one of [${Object.keys(f.values).join(", ")}], ${JSON.stringify(u)} found`)),y}function hu(l){return wc($i(l.value))?aa(si({},l,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Sc(l)}function Sc(l){const s=l.value,u=l.key;if(on(s)!=="array")return[new je(u,s,`array expected, ${on(s)} found`)];const f=l.styleSpec;let y,v=[];if(s.length<1)return[new je(u,s,"filter array must have at least 1 element")];switch(v=v.concat(vs({key:`${u}[0]`,value:s[0],valueSpec:f.filter_operator,style:l.style,styleSpec:l.styleSpec})),tr(s[0])){case"<":case"<=":case">":case">=":s.length>=2&&tr(s[1])==="$type"&&v.push(new je(u,s,`"$type" cannot be use with operator "${s[0]}"`));case"==":case"!=":s.length!==3&&v.push(new je(u,s,`filter array for operator "${s[0]}" must have 3 elements`));case"in":case"!in":s.length>=2&&(y=on(s[1]),y!=="string"&&v.push(new je(`${u}[1]`,s[1],`string expected, ${y} found`)));for(let w=2;w<s.length;w++)y=on(s[w]),tr(s[1])==="$type"?v=v.concat(vs({key:`${u}[${w}]`,value:s[w],valueSpec:f.geometry_type,style:l.style,styleSpec:l.styleSpec})):y!=="string"&&y!=="number"&&y!=="boolean"&&v.push(new je(`${u}[${w}]`,s[w],`string, number, or boolean expected, ${y} found`));break;case"any":case"all":case"none":for(let w=1;w<s.length;w++)v=v.concat(Sc({key:`${u}[${w}]`,value:s[w],style:l.style,styleSpec:l.styleSpec}));break;case"has":case"!has":y=on(s[1]),s.length!==2?v.push(new je(u,s,`filter array for "${s[0]}" operator must have 2 elements`)):y!=="string"&&v.push(new je(`${u}[1]`,s[1],`string expected, ${y} found`))}return v}function pu(l,s){const u=l.key,f=l.validateSpec,y=l.style,v=l.styleSpec,w=l.value,S=l.objectKey,D=v[`${s}_${l.layerType}`];if(!D)return[];const R=S.match(/^(.*)-transition$/);if(s==="paint"&&R&&D[R[1]]&&D[R[1]].transition)return f({key:u,value:w,valueSpec:v.transition,style:y,styleSpec:v});const B=l.valueSpec||D[S];if(!B)return[new je(u,w,`unknown property "${S}"`)];let z;if(on(w)==="string"&&ta(B)&&!B.tokens&&(z=/^{([^}]+)}$/.exec(w)))return[new je(u,w,`"${S}" does not support interpolation syntax
|
|
@@ -658,4 +658,4 @@ uniform ${O} ${L} u_${G};
|
|
|
658
658
|
`}).mount(p)},{Fancybox:_9}=Gh,zy={$form:f9,$api:g9,$map:y9,$preview:({media:t})=>{const e=document.querySelector("#app");if(!e){console.error('Modal root element with id "#app" not found!');return}const n=document.createElement("div");e.appendChild(n),a.createApp({data(){return{items:Array.isArray(t)?t:[t]}},mounted(){this.$nextTick(()=>{_9.show(this.items.map(o=>{const d=typeof o=="string"&&o.endsWith(".pdf");return{src:o,type:d?"iframe":"image"}}),{groupAll:!0,Thumbs:{autoStart:!0}})})},template:`
|
|
659
659
|
<div style="display: none;"></div> <!-- Keeps container hidden -->
|
|
660
660
|
`}).mount(n)}};window.addEventListener("click",t=>{var n,r,o;const e=(n=t==null?void 0:t.target)==null?void 0:n.closest("[_href]");if(e&&(e==null?void 0:e.tagName)==="A"){const d=e==null?void 0:e.getAttribute("_href");(o=(r=window==null?void 0:window.app)==null?void 0:r.router)==null||o.push(d),t==null||t.preventDefault()}});const b9=()=>{const t=a.defineCustomElement(By);customElements.define("admin-info",t)},x9=["black","gray","red","yellow","green","blue","indigo","purple","pink","rose","amber","lime","emerald","teal","cyan","sky","violet","fuchsia","lavender","zinc","neutral","stone"],v9=["white"];let Ld,R2;const w9=async()=>{try{const{data:t}=await Oe.get("/api/user-menu"),e=t.menus;return ii.value=e,Ld=t.settings,R2=t.user,Iy(e)}catch(t){return console.error(t),[]}},k9=(t,e)=>{Object.entries(e).forEach(([n,r])=>{t.component(n,r)})},N2={async install(t,{componentsApp:e={},settings:n,routes:r=[]}){try{b9(),(n.sidebarDark??!0)&&(n.sidebarDark=!v9.includes(n.sidebarColor)),n.buttonColor||(n.buttonColor=x9.includes(n.sidebarColor)?n.sidebarColor:"blue");const d=(await w9()).filter(c=>c==null?void 0:c.component).map(c=>({...c,component:{...Vy,...e}[c==null?void 0:c.component]}));et.value={...et.value,...n,...(Ld==null?void 0:Ld.admin)||{}},k9(t,{...Vy,...e}),t.component("admin",tS);const{router:p}=await OT(d.concat(r));window.app={...t,router:p},window.v3plugin={...t.config.globalProperties,...zy},t.config.globalProperties={...t.config.globalProperties,$componentsConfig:{...Sx,componentsApp:e},$router:p,$v3plugin:zy,$utils:{reloadCardPage:ih},$settings:Ld,$adminSettings:et.value,$user:R2},t.use(p)}catch(o){console.error(o)}},components:Vy,plugins:zy};typeof window<"u"&&(window.v3Admin=N2);const E9={data(){return{formValues:{},scheme:null,table:"",token:"",style:null}},mounted(){this.getFormScheme()},computed:{color(){return et.value.buttonColor||"blue"}},methods:{flattenMenu(t){const e=[];return t.forEach(n=>{n.menu?e.push(...this.flattenMenu(n.menu)):e.push(n)}),e},async getFormScheme(){var r,o,d,p,c,b;const t=this.flattenMenu(ii.value);t!=null&&t.length||this.$router.replace("/404");const e=t==null?void 0:t.find(k=>{var E,C;return(k==null?void 0:k.path)==((C=(E=this.$route)==null?void 0:E.query)==null?void 0:C.table)});e||this.$router.replace("/404");const n=e==null?void 0:e.table;this.table=n;try{const{data:{form:k}}=await Oe.get(`/api/template/table/${n}`),{data:E}=await Oe.get(`/api/table/${this.table}/${(o=(r=this.$route)==null?void 0:r.query)==null?void 0:o.id}`);this.formValues=E||{};const{data:C}=await Oe.get(`/api/form/${this.table}${(p=(d=this.$route)==null?void 0:d.query)!=null&&p.id?`/${(b=(c=this.$route)==null?void 0:c.query)==null?void 0:b.id}`:""}`);this.scheme=(C==null?void 0:C.schema)||C,this.style=(C==null?void 0:C.style)||null,this.token=(C==null?void 0:C.token)||""}catch{}},async onlyEditObject(){var e,n,r,o,d,p,c,b,k,E,C;const t=(n=(e=this.$refs.form)==null?void 0:e.$refs)==null?void 0:n.form;try{await t.doValidation(),await Oe.put(`/api/table/${this.token}`,this.formValues),await this.$notify({title:"Успішно!",message:"Об'єкт успішно створено",type:"success"})}catch(T){const I=((r=T==null?void 0:T.response)==null?void 0:r.data)||"";let N=((c=(p=(d=(o=Object.entries(t==null?void 0:t.formErrors))==null?void 0:o[0])==null?void 0:d[1])==null?void 0:p[0])==null?void 0:c.message)==="Це поле обов'язкове"?"Заповніть обов'язкові поля":(C=(E=(k=(b=Object.entries(t==null?void 0:t.formErrors))==null?void 0:b[0])==null?void 0:k[1])==null?void 0:E[0])==null?void 0:C.message;this.$notify({title:"Помилка!",message:I||N||"Сталася помилка валідаціі",type:"error"})}},getGroupedErrorNotification(t,e){if(!t||!e)return"";const n={};return Object.entries(t).forEach(([o,d])=>{var c;const p=((c=e[o])==null?void 0:c.ua)||o;d.forEach(b=>{const k=b.message;n[k]||(n[k]=[]),n[k].push(`"${p}"`)})}),Object.entries(n).map(([o,d])=>`<b>${o}:</b> ${d.join(", ")}`).join("<br>")||"Сталася помилка валідації"},async editObjectAndRedirect(t=!0){var n,r;const e=(r=(n=this.$refs.form)==null?void 0:n.$refs)==null?void 0:r.form;try{t&&await e.doValidation(),await Oe.put(`/api/table/${this.token}${t?"":"?draft=1"}`,this.formValues),await this.$router.back(),await this.$notify({title:"Успішно!",message:"Об'єкт успішно створено",type:"success"})}catch{const d=this.getGroupedErrorNotification(e==null?void 0:e.formErrors,e==null?void 0:e.scheme);this.$notify({title:"Помилка!",message:d,type:"error"})}}}},C9={class:"bg-gray-100 lg:w-[calc(100vw-260px)] w-[100vw]"},S9={class:"h-[76px] mt-[15px] flex items-center justify-between mx-[20px] px-[20px] bg-white rounded-xl"},T9={class:"flex items-center gap-[6px]"},A9={class:"bg-white w-full rounded-xl"};function D9(t,e,n,r,o,d){var c,b,k;const p=a.resolveComponent("VsFormWithNavigation");return a.openBlock(),a.createElementBlock("div",C9,[a.createElementVNode("div",S9,[e[4]||(e[4]=a.createElementVNode("h2",{class:"text-xl font-medium"},"Редагувати",-1)),a.createElementVNode("div",T9,[a.createElementVNode("button",{onClick:e[0]||(e[0]=E=>t.$router.back()),class:"flex items-center px-3 py-2 text-sm font-medium text-gray-800 duration-300 bg-white border border-gray-100 rounded-lg shadow gap-x-2 focus:outline-none hover:bg-gray-50 hover:border-gray-100"}," Скасувати "),(c=o.style)!=null&&c.draft?(a.openBlock(),a.createElementBlock("button",{key:0,onClick:e[1]||(e[1]=E=>d.editObjectAndRedirect(!1)),class:a.normalizeClass(`inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-${d.color}-700 border border-transparent rounded-lg gap-x-2 hover:bg-${d.color}-800 hover:text-white`)}," Зберегти DRAFT ",2)):a.createCommentVNode("",!0),a.createElementVNode("button",{onClick:e[2]||(e[2]=(...E)=>d.editObjectAndRedirect&&d.editObjectAndRedirect(...E)),class:a.normalizeClass(`inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-${d.color}-700 border border-transparent rounded-lg gap-x-2 hover:bg-${d.color}-800 hover:text-white`)}," Зберегти ",2)])]),a.createElementVNode("div",{style:a.normalizeStyle({height:((b=t.$adminSettings)==null?void 0:b.header)===!1?"calc(100vh - 91px)":"calc(100vh - 150px)"}),class:"bg-gray-100 p-[20px] flex lg:w-[calc(100vw-260px)] w-[100vw] overflow-hidden"},[a.createElementVNode("div",A9,[o.scheme?(a.openBlock(),a.createBlock(p,{key:0,ref:"form",scheme:o.scheme,columns:(k=o.style)==null?void 0:k.columns,style:a.normalizeStyle(o.style),modelValue:o.formValues,"onUpdate:modelValue":e[3]||(e[3]=E=>o.formValues=E),class:"p-[20px] h-full"},null,8,["scheme","columns","style","modelValue"])):a.createCommentVNode("",!0)])],4)])}const M9=Object.freeze(Object.defineProperty({__proto__:null,default:Le(E9,[["render",D9]])},Symbol.toStringTag,{value:"Module"})),I9={data(){return{formValues:{},scheme:null,table:"",token:"",api:"",style:null}},mounted(){this.getFormScheme()},computed:{color(){return et.value.buttonColor||"blue"}},methods:{flattenMenu(t){const e=[];return t.forEach(n=>{n.menu?e.push(...this.flattenMenu(n.menu)):e.push(n)}),e},async getFormScheme(){const t=this.flattenMenu(ii.value);t!=null&&t.length||this.$router.replace("/404");const e=t==null?void 0:t.find(r=>{var o,d;return(r==null?void 0:r.path)==((d=(o=this.$route)==null?void 0:o.query)==null?void 0:d.table)});e||this.$router.replace("/404");const n=e==null?void 0:e.table;this.table=n;try{const{data:r}=await Oe.get(`/api/form/${n}`);this.scheme=(r==null?void 0:r.schema)||r,this.style=(r==null?void 0:r.style)||null,this.api=(r==null?void 0:r.api)||"",this.token=(r==null?void 0:r.token)||""}catch{}},getGroupedErrorNotification(t,e){if(!t||!e)return"";const n={};return Object.entries(t).forEach(([o,d])=>{var c;const p=((c=e[o])==null?void 0:c.ua)||o;d.forEach(b=>{const k=b.message;n[k]||(n[k]=[]),n[k].push(`"${p}"`)})}),Object.entries(n).map(([o,d])=>`<b>${o}:</b> ${d.join(", ")}`).join("<br>")||"Сталася помилка валідації"},async createObject(){var e,n,r,o,d;const t=(n=(e=this.$refs.form)==null?void 0:e.$refs)==null?void 0:n.form;try{await t.doValidation(),await Oe.post(this.api||`/api/table/${this.token}`,this.formValues),await this.$router.back(),await this.$notify({title:"Успішно!",message:"Об'єкт успішно створено",type:"success"})}catch(p){const c=this.getGroupedErrorNotification(t==null?void 0:t.formErrors,t==null?void 0:t.scheme);this.$notify({title:"Помилка!",message:((o=(r=p==null?void 0:p.response)==null?void 0:r.data)==null?void 0:o.error)||((d=p==null?void 0:p.response)==null?void 0:d.data)||c,type:"error"})}}}},P9={class:"bg-gray-100 lg:w-[calc(100vw-260px)] w-[100vw]"},R9={class:"h-[76px] mt-[15px] flex items-center justify-between mx-[20px] px-[20px] bg-white rounded-xl"},N9={class:"flex items-center gap-[6px]"},B9={class:"bg-white w-full rounded-xl"};function V9(t,e,n,r,o,d){var c;const p=a.resolveComponent("VsFormWithNavigation");return a.openBlock(),a.createElementBlock("div",P9,[a.createElementVNode("div",R9,[e[3]||(e[3]=a.createElementVNode("h2",{class:"text-xl font-medium"},"Створити",-1)),a.createElementVNode("div",N9,[a.createElementVNode("button",{onClick:e[0]||(e[0]=b=>t.$router.back()),class:"flex items-center px-3 py-2 text-sm font-medium text-gray-800 duration-300 bg-white border border-gray-100 rounded-lg shadow gap-x-2 focus:outline-none hover:bg-gray-50 hover:border-gray-100"}," Скасувати "),a.createElementVNode("button",{onClick:e[1]||(e[1]=(...b)=>d.createObject&&d.createObject(...b)),class:a.normalizeClass(`inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-${d.color}-700 border border-transparent rounded-lg gap-x-2 hover:bg-${d.color}-800 hover:text-white`)}," Зберегти ",2)])]),a.createElementVNode("div",{style:a.normalizeStyle({height:((c=t.$adminSettings)==null?void 0:c.header)===!1?"calc(100vh - 91px)":"calc(100vh - 150px)"}),class:"bg-gray-100 p-[20px] flex lg:w-[calc(100vw-260px)] w-[100vw] overflow-hidden"},[a.createElementVNode("div",B9,[o.scheme?(a.openBlock(),a.createBlock(p,{key:0,ref:"form",scheme:o.scheme,style:a.normalizeStyle(o.style),modelValue:o.formValues,"onUpdate:modelValue":e[2]||(e[2]=b=>o.formValues=b),class:"h-full p-[20px]"},null,8,["scheme","style","modelValue"])):a.createCommentVNode("",!0)])],4)])}const z9=Object.freeze(Object.defineProperty({__proto__:null,default:Le(I9,[["render",V9]])},Symbol.toStringTag,{value:"Module"}));a.ref(null);const O9={data(){return{formScheme:null,uid:null,userData:null}},async created(){await this.getUserData(),await this.getFormScheme()},methods:{async getUserData(){var n;const{data:t}=await Oe.get("/user");this.uid=(n=t==null?void 0:t.user)==null?void 0:n.uid;const{data:e}=await Oe.get(`/api/table/admin.users.table/${this.uid}`);this.userData=e},async updateUser(){try{await Oe.put(`/api/user/${this.uid}`,this.userData),await this.$notify({title:"Успішно!",message:"Дані успішно оновлені",type:"success"})}catch(t){this.$notify({title:"Помилка!",message:`Сталася помилка редагування.
|
|
661
|
-
${t.toString()}`,type:"error"})}},async getFormScheme(){try{const{data:t}=await Oe.get("/api/template/form/admin.profile.form");this.formScheme=t.schema}catch(t){console.error(t)}}}},L9={class:"flex justify-center pt-[20px] pb-[20px] pl-[20px] h-[calc(100vh-58px)]"},F9={class:"bg-white rounded-xl p-[20px]"},$9={class:"flex-1 overflow-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},j9={class:"flex"};function U9(t,e,n,r,o,d){const p=a.resolveComponent("VsForm");return a.openBlock(),a.createElementBlock("div",L9,[a.createElementVNode("div",F9,[a.createTextVNode(a.toDisplayString(t.user)+" ",1),e[2]||(e[2]=a.createElementVNode("h2",{class:"mb-[20px] text-center"},"Профіль",-1)),a.createElementVNode("div",$9,[o.formScheme?(a.openBlock(),a.createBlock(p,{key:0,scheme:o.formScheme,modelValue:o.userData,"onUpdate:modelValue":e[0]||(e[0]=c=>o.userData=c),class:"pb-0"},null,8,["scheme","modelValue"])):a.createCommentVNode("",!0),a.createElementVNode("div",j9,[a.createElementVNode("button",{onClick:e[1]||(e[1]=(...c)=>d.updateUser&&d.updateUser(...c)),class:"ml-auto text-[18px] bg-blue-500 text-white px-[8px] py-[4px] rounded hover:bg-blue-700 duration-300"}," Зберегти ")])])])])}const H9=Object.freeze(Object.defineProperty({__proto__:null,default:Le(O9,[["render",U9]])},Symbol.toStringTag,{value:"Module"})),W9={};function q9(t,e,n,r,o,d){const p=a.resolveComponent("router-view");return a.openBlock(),a.createBlock(p)}const B2=Object.freeze(Object.defineProperty({__proto__:null,default:Le(W9,[["render",q9]])},Symbol.toStringTag,{value:"Module"})),G9={},Z9={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 Y9(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",Z9,[...e[0]||(e[0]=[a.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),a.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),a.createElementVNode("path",{d:"M9 12h12l-3 -3"},null,-1),a.createElementVNode("path",{d:"M18 15l3 -3"},null,-1)])])}const Oy=Le(G9,[["render",Y9]]),X9={},K9={viewBox:"0 0 1823 249",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function J9(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",K9,[...e[0]||(e[0]=[a.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 V2=Le(X9,[["render",J9]]),Q9={components:{IconChevronDown:Od},props:{route:Object,searchable:String},mounted(){var t,e;(e=(t=this.route)==null?void 0:t.menu)!=null&&e.some(n=>{var r,o;return(n==null?void 0:n.path)===this.$route.path.replace("/","")||((o=(r=this.$route)==null?void 0:r.params)==null?void 0:o.table)===(n==null?void 0:n.table)&&(n==null?void 0:n.table)})&&(this.isOpen=!0)},watch:{route:{immediate:!0,handler(t){t!=null&&t.open&&(this.isOpen=!0)}}},data(){return{isOpen:!1,arr:[]}},computed:{darkMode(){var t;return(t=et==null?void 0:et.value)==null?void 0:t.sidebarDark}},methods:{highLight(t){if(!this.searchable)return t;const e=this.searchable.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),n=new RegExp(`(${e})(\\s*)`,"gi");return t.replace(n,(r,o,d)=>`<span style="color:#1989fa;">${o}</span>${d}`)}}},eW={key:0,class:""},tW={key:0,class:"py-0.5 px-2 inline-flex items-center gap-x-1.5 text-xs font-medium bg-blue-100 text-blue-800 rounded-full dark:bg-blue-500/10 dark:text-blue-500"},nW={key:1},rW=["innerHTML"];function iW(t,e,n,r,o,d){var b,k,E,C,T,I,N,$,F,q,J,Q,me,Ee,Ve;const p=a.resolveComponent("IconChevronDown"),c=a.resolveComponent("router-link");return(b=n.route)!=null&&b.menu?(a.openBlock(),a.createElementBlock("div",eW,[a.createElementVNode("button",{onClick:e[0]||(e[0]=we=>o.isOpen=!o.isOpen),class:a.normalizeClass(["flex items-center justify-start w-full px-3 py-2 text-sm text-left text-gray-800 duration-300 border-none rounded-lg cursor-pointer gap-x-3 focus:outline-none hover:bg-gray-100",[((E=(k=n.route)==null?void 0:k.menu)==null?void 0:E.some(we=>{var Re,Ne;return(we==null?void 0:we.path)===t.$route.path.replace("/","")||(we==null?void 0:we.table)===((Ne=(Re=t.$route)==null?void 0:Re.params)==null?void 0:Ne.table)&&(we==null?void 0:we.table)}))&&(d.darkMode?"bg-white/10":"bg-gray-100"),{"text-white/80 hover:bg-white/10 hover:text-white/80 focus:bg-white/10":d.darkMode,"text-gray-800 hover:bg-gray-100 hover:text-gray-800 focus:bg-gray-100":!d.darkMode}]])},[a.createTextVNode(a.toDisplayString((C=n.route)==null?void 0:C.ua)+" ",1),(T=n.route)!=null&&T.new?(a.openBlock(),a.createElementBlock("span",tW,"Нове")):a.createCommentVNode("",!0),a.createVNode(p,{class:a.normalizeClass([[o.isOpen&&"-rotate-180"],"ml-auto duration-300 flex-shrink-0"]),width:"14",height:"14"},null,8,["class"])],2),a.createVNode(a.Transition,{name:"fade"},{default:a.withCtx(()=>{var we;return[a.withDirectives(a.createElementVNode("ul",{class:a.normalizeClass(["ml-[28px] pt-[6px] before:block before:absolute relative w-[calc(100%-28px)] flex-col gap-y-1.5 inline-flex before:w-[2px] before:h-[100%] before:left-[-10px] cursor-pointer",d.darkMode?"before:bg-white/10":"before:bg-gray-100"])},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((we=n.route)==null?void 0:we.menu,(Re,Ne)=>{var Ue,Xe;return a.openBlock(),a.createElementBlock("li",{key:Ne,class:"w-full"},[a.createVNode(c,{innerHTML:d.highLight(Re==null?void 0:Re.ua),to:"/"+(Re==null?void 0:Re.path),class:a.normalizeClass([[((Re==null?void 0:Re.path)===t.$route.path.replace("/","")||((Xe=(Ue=t.$route)==null?void 0:Ue.params)==null?void 0:Xe.table)===(Re==null?void 0:Re.table)&&(Re==null?void 0:Re.table))&&(d.darkMode?"bg-white/10":"bg-gray-100"),{"text-white/80 hover:bg-white/10 hover:text-white/80 focus:bg-white/10":d.darkMode,"text-gray-800 hover:bg-gray-100 hover:text-gray-800 focus:bg-gray-100":!d.darkMode}],"block px-3 py-2 text-sm rounded-lg focus:outline-none focus:bg-gray-100"])},null,8,["innerHTML","to","class"])])}),128))],2),[[a.vShow,o.isOpen]])]}),_:1})])):(I=n.route)!=null&&I.hidden?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",nW,[a.createVNode(c,{to:(($=(N=n.route)==null?void 0:N.path)==null?void 0:$[0])==="/"?(F=n.route)==null?void 0:F.path:"/"+((q=n.route)==null?void 0:q.path),class:a.normalizeClass([[(((J=n.route)==null?void 0:J.path.replace("/",""))===t.$route.path.replace("/","")||((me=(Q=t.$route)==null?void 0:Q.params)==null?void 0:me.table)===((Ee=n.route)==null?void 0:Ee.table)&&((Ve=n.route)==null?void 0:Ve.table))&&(d.darkMode?"bg-white/10":"bg-gray-100"),{"text-white/80 hover:bg-white/10 hover:text-white/80 focus:bg-white/10 ":d.darkMode,"text-gray-800 hover:bg-gray-100 hover:text-gray-800 focus:bg-gray-100 ":!d.darkMode}],"flex items-center w-full px-3 py-2 text-sm text-gray-800 duration-300 rounded-lg gap-x-3"])},{default:a.withCtx(()=>{var we;return[a.createElementVNode("span",{innerHTML:d.highLight((we=n.route)==null?void 0:we.ua)},null,8,rW)]}),_:1},8,["to","class"])]))}const sW=Le(Q9,[["render",iW]]),oW={},aW={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 lW(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",aW,[...e[0]||(e[0]=[a.createElementVNode("circle",{cx:"12",cy:"12",r:"10"},null,-1),a.createElementVNode("path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"},null,-1),a.createElementVNode("path",{d:"M12 17h.01"},null,-1)])])}const z2=Le(oW,[["render",lW]]),cW={},dW={class:"shrink-0 size-4 rounded-full",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function uW(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",dW,[...e[0]||(e[0]=[a.createStaticVNode('<g fill-rule="evenodd"><g stroke-width="1pt"><path fill="#bd3d44" d="M0 0h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0z" transform="scale(3.9385)"></path><path fill="#fff" d="M0 10h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0z" transform="scale(3.9385)"></path></g><path fill="#192f5d" d="M0 0h98.8v70H0z" transform="scale(3.9385)"></path><path fill="#fff" d="M8.2 3l1 2.8H12L9.7 7.5l.9 2.7-2.4-1.7L6 10.2l.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8H45l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.4 1.7 1 2.7L74 8.5l-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9L92 7.5l1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm-74.1 7l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7H65zm16.4 0l1 2.8H86l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm-74 7l.8 2.8h3l-2.4 1.7.9 2.7-2.4-1.7L6 24.2l.9-2.7-2.4-1.7h3zm16.4 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8H45l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9L92 21.5l1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm-74.1 7l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7H65zm16.4 0l1 2.8H86l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm-74 7l.8 2.8h3l-2.4 1.7.9 2.7-2.4-1.7L6 38.2l.9-2.7-2.4-1.7h3zm16.4 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8H45l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9L92 35.5l1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm-74.1 7l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7H65zm16.4 0l1 2.8H86l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm-74 7l.8 2.8h3l-2.4 1.7.9 2.7-2.4-1.7L6 52.2l.9-2.7-2.4-1.7h3zm16.4 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8H45l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9L92 49.5l1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm-74.1 7l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7H65zm16.4 0l1 2.8H86l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm-74 7l.8 2.8h3l-2.4 1.7.9 2.7-2.4-1.7L6 66.2l.9-2.7-2.4-1.7h3zm16.4 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8H45l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9L92 63.5l1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9z" transform="scale(3.9385)"></path></g>',1)])])}const hW=Le(cW,[["render",uW]]),pW={},fW={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1",width:"256",height:"256",viewBox:"0 0 256 256","xml:space":"preserve"};function mW(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",fW,[...e[0]||(e[0]=[a.createElementVNode("defs",null,null,-1),a.createElementVNode("g",{style:{stroke:"none","stroke-width":"0","stroke-dasharray":"none","stroke-linecap":"butt","stroke-linejoin":"miter","stroke-miterlimit":"10",fill:"none","fill-rule":"nonzero",opacity:"1"},transform:"translate(1.4065934065934016 1.4065934065934016) scale(2.81 2.81)"},[a.createElementVNode("path",{d:"M 45 90 C 20.147 90 0 69.853 0 45 h 90 C 90 69.853 69.853 90 45 90 z",style:{stroke:"none","stroke-width":"1","stroke-dasharray":"none","stroke-linecap":"butt","stroke-linejoin":"miter","stroke-miterlimit":"10",fill:"rgb(255,213,0)","fill-rule":"nonzero",opacity:"1"},transform:" matrix(1 0 0 1 0 0) ","stroke-linecap":"round"}),a.createElementVNode("path",{d:"M 45 0 C 20.147 0 0 20.147 0 45 h 90 C 90 20.147 69.853 0 45 0 z",style:{stroke:"none","stroke-width":"1","stroke-dasharray":"none","stroke-linecap":"butt","stroke-linejoin":"miter","stroke-miterlimit":"10",fill:"rgb(0,91,187)","fill-rule":"nonzero",opacity:"1"},transform:" matrix(1 0 0 1 0 0) ","stroke-linecap":"round"})],-1)])])}const gW=Le(pW,[["render",mW]]),yW={},_W={class:"shrink-0 size-3.5 text-gray-800 dark:text-neutral-200",xmlns:"http:.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function bW(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",_W,[...e[0]||(e[0]=[a.createElementVNode("polyline",{points:"20 6 9 17 4 12"},null,-1)])])}const xW={components:{IconQuestion:z2,IconUSA:hW,IconUkraine:gW,IconTick:Le(yW,[["render",bW]])},props:["docs","languages"],data(){return{currentLang:"ukraine",languagesOptions:[{titleEN:"English",titleUA:"Англійська",id:"english",icon:"IconUSA"},{titleEN:"Ukraine",titleUA:"Українська",id:"ukraine",icon:"IconUkraine"}]}},computed:{selectedLang(){return this.languagesOptions.find(t=>t.id===this.currentLang)},darkMode(){var t;return(t=et==null?void 0:et.value)==null?void 0:t.sidebarDark}},methods:{changeLang(t){this.$refs.langPopover.togglePopover(),this.currentLang=t}}},vW={class:"flex justify-center items-center gap-x-2"},wW=["onClick"],kW={class:"text-gray-800"},EW={class:"ms-auto"},CW={class:"truncate"};function SW(t,e,n,r,o,d){const p=a.resolveComponent("IconTick"),c=a.resolveComponent("VsPopover");return n.docs||n.languages?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["py-2 px-5 border-t dark:border-neutral-700",d.darkMode?"border-white/10 ":"border-gray-200"])},[a.createElementVNode("div",vW,[a.createVNode(c,{trigger:"click",placement:"top",ref:"langPopover"},{reference:a.withCtx(()=>{var b,k,E;return[a.createElementVNode("button",{type:"button","aria-expanded":"false",class:a.normalizeClass(["relative py-2 px-3 flex items-center gap-x-2 text-nowrap w-full cursor-pointer border rounded-full text-start text-sm text-gray-800 focus:outline-none",d.darkMode?"border-white/10 bg-transparent text-white/80 hover:bg-white/10 focus:bg-white/10":"border-gray-200 bg-white hover:bg-gray-100 focus:bg-gray-100"])},[a.createElementVNode("div",null,[(a.openBlock(),a.createBlock(a.resolveDynamicComponent((b=d.selectedLang)==null?void 0:b.icon),{class:"w-[16px] h-[16px] rounded-full"}))]),a.createElementVNode("span",CW,a.toDisplayString(o.currentLang==="ukraine"?(k=d.selectedLang)==null?void 0:k.titleUA:(E=d.selectedLang)==null?void 0:E.titleEN),1)],2)]}),default:a.withCtx(()=>[a.createElementVNode("div",null,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.languagesOptions,b=>(a.openBlock(),a.createElementBlock("button",{key:b.id,type:"button",onClick:k=>d.changeLang(b.id),class:a.normalizeClass(["flex items-center gap-x-2 cursor-pointer dark:hs-selected:bg-neutral-800 py-2 px-4 w-full text-sm text-gray-800 hover:bg-gray-100 rounded-lg focus:outline-none focus:bg-gray-100 dark:text-neutral-300 dark:hover:bg-neutral-800 dark:focus:bg-neutral-800 selected",(b==null?void 0:b.id)===o.currentLang?"bg-gray-100":""])},[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(b==null?void 0:b.icon),{class:"w-[16px] h-[16px] rounded-full"})),a.createElementVNode("div",kW,a.toDisplayString(o.currentLang==="ukraine"?b==null?void 0:b.titleUA:b==null?void 0:b.titleEN),1),a.createElementVNode("span",EW,[(b==null?void 0:b.id)===o.currentLang?(a.openBlock(),a.createBlock(p,{key:0})):a.createCommentVNode("",!0)])],10,wW))),128))])]),_:1},512)])],2)):a.createCommentVNode("",!0)}const O2=Le(xW,[["render",SW]]),TW={components:{IconLogout:Oy,NavbarItem:sW,IconLogo:V2,IconSearch:Pp,NavbarFooter:O2},data(){return{activeIndex:null,searchValue:""}},computed:{data(){var t;return(t=this.searchValue)!=null&&t.trim()?this.filterMenu(ii.value,this.searchValue):ii.value},logo(){var t,e,n;return((e=(t=this.$settings)==null?void 0:t.admin)==null?void 0:e.logo)||((n=et.value)==null?void 0:n.logo)||"/assets/logo.svg"},docs(){var t;return(t=et==null?void 0:et.value)==null?void 0:t.docs},languages(){var t;return(t=et==null?void 0:et.value)==null?void 0:t.languages},darkMode(){var t;return((t=et==null?void 0:et.value)==null?void 0:t.sidebarDark)||!1},darkColor(){var e,n,r;const t=((e=et==null?void 0:et.value)==null?void 0:e.sidebarColor)||((n=et==null?void 0:et.value)==null?void 0:n.color)||((r=et==null?void 0:et.value)!=null&&r.sidebarDark?"blue":"white");return t.includes("-")||t.includes("[")?t:t+"-950"}},watch:{"$route.path"(){this.$parent.showMenu=!1}},methods:{filterMenu(t,e){return t.map(n=>{var r,o;if(n.menu){const d=this.filterMenu(n.menu,e);if(d.length>0)return{...n,menu:d,open:!0}}else if((o=(r=n.ua)==null?void 0:r.toLowerCase())!=null&&o.includes(e.toLowerCase()))return n;return null}).filter(Boolean)}}},AW={class:"h-[46px] w-full px-5 lg:px-8 mb-[10px]"},DW={href:"/"},MW=["src"],IW={class:"px-2 lg:px-5"},PW={class:"px-2 lg:px-5 flex flex-col flex-wrap w-full pb-3"},RW={key:0,class:"flex flex-col gap-y-1"};function NW(t,e,n,r,o,d){var k;const p=a.resolveComponent("VsText"),c=a.resolveComponent("NavbarItem"),b=a.resolveComponent("NavbarFooter");return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["lg:flex lg:relative lg:left-0 flex-col h-[100vh] pt-3 border-r w-[260px] top-0 bottom-0 shrink-0 absolute transition left-[-100%] z-[11]",{"left-0":t.$parent.showMenu,["bg-"+d.darkColor]:d.darkColor,"bg-white":!d.darkMode&&!d.darkColor}])},[a.createElementVNode("div",AW,[a.createElementVNode("a",DW,[a.createElementVNode("img",{src:d.logo,class:"object-contain w-full h-full"},null,8,MW)])]),a.createElementVNode("div",IW,[a.createVNode(p,{type:"text",modelValue:o.searchValue,"onUpdate:modelValue":e[0]||(e[0]=E=>o.searchValue=E),clearable:!0,icon:"search","icon-position":"left",placeholder:"Пошук по меню",class:a.normalizeClass(["[&>input]:h-[38px]",{"[&>input]:bg-[#172554] [&>input]:text-white/80 [&>input]:placeholder:text-white/40 [&>input]:border [&>input]:border-white/50":d.darkMode,["[&>input]:bg-"+d.darkColor]:d.darkColor,["focus:[&>input]:border-"+d.darkColor+"-500"]:d.darkMode}])},null,8,["modelValue","class"])]),a.createElementVNode("div",{class:a.normalizeClass(["py-[10px] overflow-y-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500",d.languages||d.docs?"h-[calc(100vh-161px)]":"h-[calc(100vh-110px)]"])},[a.createElementVNode("nav",PW,[(k=d.data)!=null&&k.length?(a.openBlock(),a.createElementBlock("ul",RW,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(d.data,(E,C)=>(a.openBlock(),a.createElementBlock("li",{key:C,class:"flex flex-col gap-[6px]"},[a.createVNode(c,{route:E,searchable:o.searchValue},null,8,["route","searchable"])]))),128))])):(a.openBlock(),a.createElementBlock("div",{key:1,class:a.normalizeClass(["text-lg mt-[20px]",{"text-white/80":d.darkMode,"text-gray-800":!d.darkMode}])}," Не знайдено ",2))])],2),d.docs||d.languages?(a.openBlock(),a.createBlock(b,{key:0,docs:d.docs,languages:d.languages},null,8,["docs","languages"])):a.createCommentVNode("",!0)],2)}const L2=Le(TW,[["render",NW],["__scopeId","data-v-7817bab2"]]),BW={components:{IconChevronDown:Od},props:{route:Object,searchable:String},mounted(){var t,e;(e=(t=this.route)==null?void 0:t.menu)!=null&&e.some(n=>{var r,o;return(n==null?void 0:n.path)===this.$route.path.replace("/","")||((o=(r=this.$route)==null?void 0:r.params)==null?void 0:o.table)===(n==null?void 0:n.table)&&(n==null?void 0:n.table)})&&(this.isOpen=!0)},watch:{route:{immediate:!0,handler(t){t!=null&&t.open&&(this.isOpen=!0)}}},data(){return{isOpen:!1,arr:[]}},computed:{darkMode(){var t;return(t=et==null?void 0:et.value)==null?void 0:t.sidebarDark}},methods:{highLight(t){if(!this.searchable)return t;const e=this.searchable.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),n=new RegExp(`(${e})(\\s*)`,"gi");return t.replace(n,(r,o,d)=>`<span style="color:#1989fa;">${o}</span>${d}`)}}},VW={key:0,class:""},zW={key:0,class:"py-0.5 px-2 inline-flex items-center gap-x-1.5 text-xs font-medium bg-blue-100 text-blue-800 rounded-full dark:bg-blue-500/10 dark:text-blue-500"},OW={class:"ml-[28px] pt-[6px] before:block before:absolute relative w-[calc(100%-28px)] before:bg-gray-200 flex-col gap-y-1.5 inline-flex before:w-[2px] before:h-[100%] before:left-[-10px] cursor-pointer"},LW={key:1},FW=["innerHTML"];function $W(t,e,n,r,o,d){var b,k,E,C,T,I,N,$,F,q,J,Q,me,Ee,Ve;const p=a.resolveComponent("IconChevronDown"),c=a.resolveComponent("router-link");return(b=n.route)!=null&&b.menu?(a.openBlock(),a.createElementBlock("div",VW,[a.createElementVNode("button",{onClick:e[0]||(e[0]=we=>o.isOpen=!o.isOpen),class:a.normalizeClass(["flex items-center justify-start w-full px-3 py-2 text-sm text-left text-gray-800 duration-300 border-none rounded-lg cursor-pointer gap-x-3 focus:outline-none hover:bg-gray-200",[((E=(k=n.route)==null?void 0:k.menu)==null?void 0:E.some(we=>{var Re,Ne;return(we==null?void 0:we.path)===t.$route.path.replace("/","")||(we==null?void 0:we.table)===((Ne=(Re=t.$route)==null?void 0:Re.params)==null?void 0:Ne.table)&&(we==null?void 0:we.table)}))&&"bg-gray-200"]])},[a.createTextVNode(a.toDisplayString((C=n.route)==null?void 0:C.ua)+" ",1),(T=n.route)!=null&&T.new?(a.openBlock(),a.createElementBlock("span",zW,"Нове")):a.createCommentVNode("",!0),a.createVNode(p,{class:a.normalizeClass([[o.isOpen&&"-rotate-180"],"ml-auto duration-300"]),width:"14",height:"14"},null,8,["class"])],2),a.createVNode(a.Transition,{name:"fade"},{default:a.withCtx(()=>{var we;return[a.withDirectives(a.createElementVNode("ul",OW,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((we=n.route)==null?void 0:we.menu,(Re,Ne)=>{var Ue,Xe;return a.openBlock(),a.createElementBlock("li",{key:Ne,class:"w-full"},[a.createVNode(c,{innerHTML:d.highLight(Re==null?void 0:Re.ua),to:"/"+(Re==null?void 0:Re.path),class:a.normalizeClass([[((Re==null?void 0:Re.path)===t.$route.path.replace("/","")||((Xe=(Ue=t.$route)==null?void 0:Ue.params)==null?void 0:Xe.table)===(Re==null?void 0:Re.table)&&(Re==null?void 0:Re.table))&&"bg-gray-200"],"block px-3 py-2 text-sm rounded-lg focus:outline-none hover:bg-gray-200 focus:bg-gray-200"])},null,8,["innerHTML","to","class"])])}),128))],512),[[a.vShow,o.isOpen]])]}),_:1})])):(I=n.route)!=null&&I.hidden?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",LW,[a.createVNode(c,{to:(($=(N=n.route)==null?void 0:N.path)==null?void 0:$[0])==="/"?(F=n.route)==null?void 0:F.path:"/"+((q=n.route)==null?void 0:q.path),class:a.normalizeClass([[(((J=n.route)==null?void 0:J.path.replace("/",""))===t.$route.path.replace("/","")||((me=(Q=t.$route)==null?void 0:Q.params)==null?void 0:me.table)===((Ee=n.route)==null?void 0:Ee.table)&&((Ve=n.route)==null?void 0:Ve.table))&&"bg-gray-200"],"flex items-center w-full px-3 py-2 text-sm text-gray-800 duration-300 rounded-lg gap-x-3 hover:bg-gray-200 focus:bg-gray-200"])},{default:a.withCtx(()=>{var we;return[a.createElementVNode("span",{innerHTML:d.highLight((we=n.route)==null?void 0:we.ua)},null,8,FW)]}),_:1},8,["to","class"])]))}const jW=Le(BW,[["render",$W]]),UW={class:"relative w-fit mx-auto"},HW={key:0,class:"w-60 duration absolute top-full left-0 z-20 bg-white rounded-xl shadow-xl block"},WW={class:"p-1"},qW={__name:"navbar-gray-dropdown",setup(t){const e=a.ref(!1);return a.onMounted(()=>{document.addEventListener("click",n=>{n.target.closest(".navbar-gray-dropdown")||(e.value=!1)})}),(n,r)=>{var d;const o=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("div",UW,[a.createElementVNode("button",{onClick:r[0]||(r[0]=p=>e.value=!e.value),type:"button",class:"py-1 px-2 navbar-gray-dropdown inline-flex justify-center items-center gap-x-1 font-semibold rounded-lg text-gray-800 hover:text-purple-600 focus:outline-hidden focus:text-purple-600 disabled:opacity-50 disabled:pointer-events-none dark:text-neutral-300 dark:hover:text-purple-500 dark:focus:text-purple-500"},[a.createTextVNode(a.toDisplayString((d=n.$user)==null?void 0:d.user_name)+" ",1),a.createVNode(Rp,{width:"16",height:"16"})]),e.value?(a.openBlock(),a.createElementBlock("div",HW,[a.createElementVNode("div",WW,[r[2]||(r[2]=a.createElementVNode("a",{class:"flex items-center gap-x-3 py-2 px-3 rounded-lg text-sm text-gray-800 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-hidden focus:bg-gray-100 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",href:"#"}," Профіль ",-1)),a.createVNode(o,{class:"flex items-center gap-x-3 py-2 px-3 rounded-lg text-sm text-gray-800 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-hidden focus:bg-gray-100 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",to:"/admin.settings"},{default:a.withCtx(()=>[...r[1]||(r[1]=[a.createTextVNode(" Налаштування ",-1)])]),_:1})]),r[3]||(r[3]=a.createElementVNode("div",{class:"p-1 border-t border-gray-200 dark:border-neutral-700"},[a.createElementVNode("a",{class:"flex items-center gap-x-3 py-2 px-3 rounded-lg text-sm text-gray-800 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-hidden focus:bg-gray-100 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",href:"/logout"}," Вийти ")],-1))])):a.createCommentVNode("",!0)])}}},GW={class:"p-4 flex flex-col justify-center border-b relative max-h-[192px]"},ZW={components:{IconLogout:Oy,NavbarItem:jW,IconLogo:V2,IconSearch:Pp,NavbarFooter:O2,NavbarUser:{__name:"navbar-gray-user",setup(t){return(e,n)=>(a.openBlock(),a.createElementBlock("div",GW,[a.createVNode(yg,{class:"!absolute top-[8px] right-[8px]",placement:"left"}),n[0]||(n[0]=a.createElementVNode("div",{class:"flex size-24 justify-center items-center shrink-0 rounded-full overflow-hidden mx-auto mb-2"},[a.createElementVNode("img",{class:"object-cover h-[130px] w-[130px]",src:"https://media.istockphoto.com/id/1337144146/vector/default-avatar-profile-icon-vector.jpg?s=612x612&w=0&k=20&c=BIbFwuv7FxTWvh5S3vB6bkT0Qv8Vn8N5Ffseq84ClGI=",alt:"Avatar"})],-1)),a.createVNode(qW)]))}}},data(){return{activeIndex:null,searchValue:""}},computed:{data(){var t;return(t=this.searchValue)!=null&&t.trim()?this.filterMenu(ii.value,this.searchValue):ii.value},logo(){var t,e,n;return((e=(t=this.$settings)==null?void 0:t.admin)==null?void 0:e.logo)||((n=et.value)==null?void 0:n.logo)||"/assets/logo.svg"},docs(){var t;return(t=et==null?void 0:et.value)==null?void 0:t.docs},languages(){var t;return(t=et==null?void 0:et.value)==null?void 0:t.languages},darkMode(){var t;return((t=et==null?void 0:et.value)==null?void 0:t.sidebarDark)||!1},darkColor(){var e,n,r;const t=((e=et==null?void 0:et.value)==null?void 0:e.sidebarColor)||((n=et==null?void 0:et.value)==null?void 0:n.color)||((r=et==null?void 0:et.value)!=null&&r.sidebarDark?"blue":"white");return t.includes("-")||t.includes("[")?t:t+"-950"}},watch:{"$route.path"(){this.$parent.showMenu=!1}},methods:{filterMenu(t,e){return t.map(n=>{var r,o;if(n.menu){const d=this.filterMenu(n.menu,e);if(d.length>0)return{...n,menu:d,open:!0}}else if((o=(r=n.ua)==null?void 0:r.toLowerCase())!=null&&o.includes(e.toLowerCase()))return n;return null}).filter(Boolean)}}},YW={class:"px-2 lg:px-5 flex flex-col flex-wrap w-full pb-3"},XW={key:0,class:"flex flex-col gap-y-1"},KW={class:"h-[55px] border-t w-full px-5 shrink-0 lg:px-5 flex items-center"},JW={href:"/"},QW=["src"];function eq(t,e,n,r,o,d){var b;const p=a.resolveComponent("NavbarUser"),c=a.resolveComponent("NavbarItem");return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["lg:flex lg:relative lg:left-0 flex-col h-[100vh] border-r w-[260px] bg-gray-100 top-0 bottom-0 shrink-0 absolute transition left-[-100%] z-[11]",{"left-0":t.$parent.showMenu}])},[a.createVNode(p),a.createElementVNode("div",{class:a.normalizeClass(["py-[10px] overflow-y-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500",d.languages||d.docs?"h-[calc(100vh-161px)]":"h-[calc(100vh-110px)]"])},[a.createElementVNode("nav",YW,[(b=d.data)!=null&&b.length?(a.openBlock(),a.createElementBlock("ul",XW,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(d.data,(k,E)=>(a.openBlock(),a.createElementBlock("li",{key:E,class:"flex flex-col gap-[6px]"},[a.createVNode(c,{route:k,searchable:o.searchValue},null,8,["route","searchable"])]))),128))])):(a.openBlock(),a.createElementBlock("div",{key:1,class:a.normalizeClass(["text-lg mt-[20px]",{"text-white/80":d.darkMode,"text-gray-800":!d.darkMode}])}," Не знайдено ",2))])],2),a.createElementVNode("div",KW,[a.createElementVNode("a",JW,[a.createElementVNode("img",{src:d.logo,class:"object-contain max-h-[40px]"},null,8,QW)])])],2)}const tq=Le(ZW,[["render",eq],["__scopeId","data-v-3cea82a7"]]),nq={__name:"navbar",setup(t){const e={default:L2,gray:tq},n=a.computed(()=>{var r;return e[(r=et.value)==null?void 0:r.navbar]||L2});return(r,o)=>(a.openBlock(),a.createBlock(a.resolveDynamicComponent(n.value)))}},rq={components:{IconQuestion:z2,IconUser:Vv,AdminNotification:yg,IconUserOutline:Pv,IconLogout:Oy},data(){return{userData:null,isVisible:!1}},computed:{headerBadgeTitle(){var t;return(t=et.value)==null?void 0:t.headerBadge},headerBadgeColor(){var t;return(t=et.value)==null?void 0:t.headerBadgeColor}},watch:{isVisible(t){t?setTimeout(()=>window.addEventListener("click",this.closeOnOutsideClick),0):window.removeEventListener("click",this.closeOnOutsideClick)}},created(){this.userData=this.$user,Ry.value=this.$settings},methods:{async logout(){try{await Oe.get("/logout"),await window.history.pushState({},"","/login"),await location.reload(),localStorage.removeItem("user")}catch{}},closeOnOutsideClick(){this.isVisible=!1}},beforeUnmount(){window.removeEventListener("click",this.closeOnOutsideClick)}},iq={class:"flex items-center gap-[6px]"},sq={href:"/docs-user",class:"size-[38px] inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent text-gray-500 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-100 dark:text-neutral-400 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"},oq={href:"/docs-user",class:"size-[38px] inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent text-gray-500 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-100 dark:text-neutral-400 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"},aq={class:"relative"},lq=["src"],cq={key:1,class:"size-[40px] rounded-full bg-gray-200 flex items-center justify-center"},dq=["src"],uq={key:1,class:"flex items-center justify-center bg-gray-200 rounded-full size-10"},hq={class:"grow"},pq={class:"block text-sm font-medium text-gray-800 dark:text-neutral-200"},fq={class:"text-xs text-gray-500 dark:text-neutral-500"},mq={class:"flex flex-col space-y-0.5"};function gq(t,e,n,r,o,d){const p=a.resolveComponent("IconQuestion"),c=a.resolveComponent("VsPopover"),b=a.resolveComponent("AdminNotification"),k=a.resolveComponent("IconUser"),E=a.resolveComponent("router-link"),C=a.resolveComponent("IconUserOutline"),T=a.resolveComponent("IconLogout");return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["h-[58px] border-b flex items-center px-[20px]",d.headerBadgeTitle?"justify-between":"justify-end"])},[d.headerBadgeTitle?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["py-1.5 px-2.5 flex justify-center items-center text-white hover:bg-gray-900 focus:bg-gray-900 dark:bg-neutral-100 dark:text-neutral-800 dark:hover:bg-white dark:focus:bg-white.class text-nowrap text-xs sm:text-[13px] rounded-lg disabled:opacity-50 disabled:pointer-events-none focus:outline-none dark:text-neutral-400",{["bg-"+d.headerBadgeColor]:d.headerBadgeColor,"bg-gray-800":!d.headerBadgeColor}])},a.toDisplayString(d.headerBadgeTitle),3)):a.createCommentVNode("",!0),a.createElementVNode("div",{class:"flex lg:hidden",onClick:e[0]||(e[0]=I=>t.$parent.showMenu=!0)},[...e[4]||(e[4]=[a.createStaticVNode('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-menu-2"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M4 6l16 0"></path><path d="M4 12l16 0"></path><path d="M4 18l16 0"></path></svg>',1)])]),a.createElementVNode("div",iq,[a.createVNode(c,{trigger:"hover"},{reference:a.withCtx(()=>[a.createElementVNode("a",sq,[a.createVNode(p,{height:"24",width:"24"})])]),default:a.withCtx(()=>[e[5]||(e[5]=a.createTextVNode(" Допомога ",-1))]),_:1}),a.createVNode(c,{trigger:"hover"},{reference:a.withCtx(()=>[a.createElementVNode("a",oq,[a.createVNode(b)])]),default:a.withCtx(()=>[e[6]||(e[6]=a.createTextVNode(" Сповіщення ",-1))]),_:1}),e[12]||(e[12]=a.createElementVNode("div",{class:"h-[30px] w-[1px] bg-gray-200 ml-[10px] mr-[10px]"},null,-1)),a.createElementVNode("div",aq,[a.createElementVNode("div",{onClick:e[1]||(e[1]=I=>o.isVisible=!0),class:"cursor-pointer"},[a.createVNode(c,{trigger:"hover"},{reference:a.withCtx(()=>{var I,N,$,F;return[(N=(I=o.userData)==null?void 0:I.user)!=null&&N.avatar?(a.openBlock(),a.createElementBlock("img",{key:0,class:"flex-shrink-0 size-[30px] rounded-full",src:(F=($=o.userData)==null?void 0:$.user)==null?void 0:F.avatar,alt:"Image Description"},null,8,lq)):(a.openBlock(),a.createElementBlock("div",cq,[a.createVNode(k)]))]}),default:a.withCtx(()=>[e[7]||(e[7]=a.createTextVNode(" Профіль ",-1))]),_:1})]),o.isVisible?(a.openBlock(),a.createElementBlock("div",{key:0,onClick:e[3]||(e[3]=a.withModifiers(()=>{},["stop"])),class:"fixed p-2 bg-white w-[240px] top-[55px] right-[20px] rounded-xl z-[1] shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] dark:shadow-[0_10px_40px_10px_rgba(0,0,0,0.2)] dark:bg-neutral-900 block"},[a.createVNode(E,{to:"profile",disabled:!0,class:"py-2 px-2.5 flex items-center gap-3 rounded-lg hover:bg-gray-100 focus:outline-none focus:bg-gray-100 dark:hover:bg-neutral-800 dark:focus:bg-neutral-800"},{default:a.withCtx(()=>{var I,N,$,F,q,J,Q,me,Ee,Ve;return[(N=(I=o.userData)==null?void 0:I.user)!=null&&N.avatar?(a.openBlock(),a.createElementBlock("img",{key:0,class:"rounded-full shrink-0 size-10",src:(F=($=o.userData)==null?void 0:$.user)==null?void 0:F.avatar,alt:"Image Description"},null,8,dq)):(a.openBlock(),a.createElementBlock("div",uq,[a.createVNode(k,{class:"w-[16px]"})])),a.createElementVNode("div",hq,[a.createElementVNode("span",pq,a.toDisplayString(((J=(q=o.userData)==null?void 0:q.user)==null?void 0:J.username)||((me=(Q=o.userData)==null?void 0:Q.user)==null?void 0:me.user_name)||"User User"),1),a.createElementVNode("p",fq,a.toDisplayString(((Ve=(Ee=o.userData)==null?void 0:Ee.user)==null?void 0:Ve.email)||"email не вказано"),1)])]}),_:1}),e[10]||(e[10]=a.createElementVNode("div",{class:"my-2 mx-2.5 h-px bg-gray-200 dark:bg-neutral-700"},null,-1)),a.createElementVNode("ul",mq,[a.createElementVNode("li",null,[a.createVNode(E,{to:"profile",class:"w-full flex items-center gap-x-3.5 py-2 px-2.5 text-sm text-gray-800 rounded-lg hover:bg-gray-100 focus:outline-none focus:bg-gray-100 dark:text-white dark:hover:bg-neutral-800 dark:focus:bg-neutral-800",disabled:"true"},{default:a.withCtx(()=>[a.createVNode(C,{class:"size-4"}),e[8]||(e[8]=a.createTextVNode(" Профіль ",-1))]),_:1})])]),e[11]||(e[11]=a.createElementVNode("div",{class:"my-2 mx-2.5 h-px bg-gray-200 dark:bg-neutral-700"},null,-1)),a.createElementVNode("p",null,[a.createElementVNode("button",{type:"button",onClick:e[2]||(e[2]=(...I)=>d.logout&&d.logout(...I)),class:"w-full flex items-center gap-x-3.5 py-2 px-2.5 text-sm text-gray-800 rounded-lg hover:bg-gray-100 hover:text-red-500 focus:outline-none focus:bg-gray-100 focus:text-red-500 dark:text-white dark:hover:bg-neutral-800 dark:focus:bg-neutral-800 dark:hover:text-red-500 dark:focus:text-red-500"},[a.createVNode(T,{class:"size-4"}),e[9]||(e[9]=a.createTextVNode(" Вийти ",-1))])])])):a.createCommentVNode("",!0)])])],2)}const yq={components:{navbar:nq,AdminHeader:Le(rq,[["render",gq]])},data(){return{showMenu:!1}},computed:{isMenu(){return ii.value||null},header(){var t,e;return((t=et.value)==null?void 0:t.header)===!1?!1:((e=et.value)==null?void 0:e.header)||"admin-header"}}},_q={class:"admin-wrapper"},bq={class:"flex flex-col w-full"};function xq(t,e,n,r,o,d){const p=a.resolveComponent("navbar"),c=a.resolveComponent("router-view");return a.openBlock(),a.createElementBlock("div",_q,[a.createVNode(p),o.showMenu?(a.openBlock(),a.createElementBlock("div",{key:0,onClick:e[0]||(e[0]=b=>o.showMenu=!1),class:"z-[10] lg:hidden transition duration fixed inset-0 bg-gray-900 bg-opacity-50 dark:bg-opacity-80 dark:bg-neutral-900"})):a.createCommentVNode("",!0),a.createElementVNode("div",bq,[d.isMenu?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[d.header?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(d.header),{key:0})):a.createCommentVNode("",!0),a.createVNode(c)],64)):a.createCommentVNode("",!0)])])}const vq=Object.freeze(Object.defineProperty({__proto__:null,default:Le(yq,[["render",xq],["__scopeId","data-v-804a7309"]])},Symbol.toStringTag,{value:"Module"})),wq={data(){return{currentSort:""}},props:{data:{type:Object,default:()=>null},activeColumn:{type:String}},mounted(){this.$emit("update-ref",this.$refs.column)},computed:{label(){var t,e;return((t=this.data)==null?void 0:t.ua)||((e=this.data)==null?void 0:e.label)||this.data.title||"null"},selectedSortParam(){var t,e;return(e=(t=this.$route)==null?void 0:t.query)==null?void 0:e.sort},getVisibleIcon(){return this.data.format!=="image"&&this.data.format!=="verify"}},watch:{activeColumn(t){t!==this.data.name&&(this.currentSort="")}},methods:{changeCurrentSort(t){switch(t){case"":return"asc";case"asc":return"desc";case"desc":return"";default:return""}},handleClickSortBtn(t){this.$emit("change-active",this.data.name),this.currentSort=this.changeCurrentSort(t);const e=this.$route.query,{sort:n,...r}=e,o=this.currentSort?`${this.data.name}-${this.currentSort}`:"";this.$router.replace({query:{...r,...o&&{sort:o}}})},isValueEqualToSelected(t){return`${this.data.name}-${t}`===this.selectedSortParam}}},kq={scope:"col",class:"text-start",ref:"column"},Eq={class:"w-[24px]"},Cq={key:1,class:"flex items-center px-1 py-3 font-medium text-gray-800 text-start gap-x-1 dark:text-neutral-200"};function Sq(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("th",kq,[d.getVisibleIcon?(a.openBlock(),a.createElementBlock("button",{key:0,type:"button",class:"flex items-center px-1 py-2 font-medium text-gray-800 text-start gap-x-1 dark:text-neutral-200",onClick:e[0]||(e[0]=p=>d.handleClickSortBtn(o.currentSort))},[a.createTextVNode(a.toDisplayString(d.label)+" ",1),a.createElementVNode("span",Eq,[o.currentSort?(a.openBlock(),a.createElementBlock("svg",{key:0,class:a.normalizeClass(["shrink-0 size-3.5",{"rotate-180":o.currentSort==="asc"}]),xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[...e[1]||(e[1]=[a.createElementVNode("path",{d:"m5 12 7-7 7 7"},null,-1),a.createElementVNode("path",{d:"M12 19V5"},null,-1)])],2)):a.createCommentVNode("",!0)])])):(a.openBlock(),a.createElementBlock("p",Cq,a.toDisplayString(d.label),1))],512)}const Tq=Le(wq,[["render",Sq]]),Aq={},Dq={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-link"};function Mq(t,e){return a.openBlock(),a.createElementBlock("svg",Dq,[...e[0]||(e[0]=[a.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),a.createElementVNode("path",{d:"M9 15l6 -6"},null,-1),a.createElementVNode("path",{d:"M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464"},null,-1),a.createElementVNode("path",{d:"M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463"},null,-1)])])}const Iq={components:{IconMore:pg,IconDelete:fg,IconEdit:mg,IconLink:Le(Aq,[["render",Mq]])},emits:["updateTable"],props:{item:Object,table:String,isForm:null,actions:Array,default:()=>[]},data(){return{formVisible:!1,isDeleteConfirm:!1,formValue:{},top:0,left:0}},computed:{getCustomActions(){return this.actions.filter(t=>typeof t=="object")}},methods:{openConfirm(){this.isDeleteConfirm=!0,document.querySelector("body").click()},async getData(){var t;try{const{data:e}=await Oe.get(`/api/table/${this.table}/${(t=this.item)==null?void 0:t.id}`);this.formValue=e}catch(e){console.error(e)}},doSomethingOnCancel(){this.formVisible=!1},async deleteElement(){var t,e;try{const{data:n}=await Oe.get(`/api/table/${this.table}/${(t=this.item)==null?void 0:t.id}`);await Oe.delete(`/api/table/${n==null?void 0:n.token}`),await this.$notify({title:"Успішно!",message:"Об`єкт успішно видалeно",type:"success"}),await this.$emit("update-table")}catch(n){this.$notify({title:"Помилка!",message:(e=n==null?void 0:n.response)==null?void 0:e.data,type:"error"})}finally{this.isDeleteConfirm=!1}},async customButtonAction(t){var e,n,r;document.querySelector("body").click(),t!=null&&t.form?(await this.$v3plugin.$form({form:t==null?void 0:t.form,id:(e=this.item)==null?void 0:e.id,api:t==null?void 0:t.api,title:t==null?void 0:t.title}),await this.$emit("update-table")):t!=null&&t.api?(await this.$v3plugin.$api({confirm:t==null?void 0:t.confirm,api:t==null?void 0:t.api,method:t==null?void 0:t.method,id:(n=this.item)==null?void 0:n.id,isId:(t==null?void 0:t.isId)||!1}),await this.$emit("update-table")):t!=null&&t.href&&this.$router.push((t==null?void 0:t.href)+((r=this.item)==null?void 0:r.id))}}},Pq={class:"inline-flex"},Rq={class:"inline-flex items-center justify-center bg-white border rounded-lg shadow-sm size-7 gap-x-2 border-stone-200 text-stone-800 hover:bg-stone-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-50"},Nq={class:"flex flex-col items-start"},Bq=["onClick"],Vq={class:"text-gray-800"},zq={key:1,class:"h-[1px] w-[80%] bg-gray-200 ml-auto mr-auto"},Oq={class:"flex justify-end p-[16px] pr-0 gap-x-3"};function Lq(t,e,n,r,o,d){const p=a.resolveComponent("IconMore"),c=a.resolveComponent("IconEdit"),b=a.resolveComponent("router-link"),k=a.resolveComponent("IconLink"),E=a.resolveComponent("IconDelete"),C=a.resolveComponent("VsPopover"),T=a.resolveComponent("VsConfirm");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",Pq,[a.createVNode(C,{trigger:"click",placement:"bottom-left"},{reference:a.withCtx(()=>[a.createElementVNode("button",Rq,[a.createVNode(p,{height:"16",width:"16"})])]),default:a.withCtx(()=>{var I,N,$,F,q;return[a.createElementVNode("div",Nq,[(I=n.actions)!=null&&I.includes("edit")&&n.isForm?(a.openBlock(),a.createBlock(b,{key:0,to:`/edit?table=${($=(N=t.$route)==null?void 0:N.params)==null?void 0:$.catchAll}&id=${(F=n.item)==null?void 0:F.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:a.withCtx(()=>[a.createVNode(c,{color:"#000"}),e[4]||(e[4]=a.createTextVNode(" Редагувати ",-1))]),_:1},8,["to"])):a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(d.getCustomActions,(J,Q)=>(a.openBlock(),a.createElementBlock("button",{key:Q,onClick:me=>d.customButtonAction(J),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"},[J!=null&&J.href?(a.openBlock(),a.createBlock(k,{key:0,class:"size-3.5"})):a.createCommentVNode("",!0),a.createElementVNode("span",Vq,a.toDisplayString(J==null?void 0:J.label),1)],8,Bq))),128)),n.isForm?(a.openBlock(),a.createElementBlock("div",zq)):a.createCommentVNode("",!0),(q=n.actions)!=null&&q.includes("del")?(a.openBlock(),a.createElementBlock("button",{key:2,onClick:e[0]||(e[0]=a.withModifiers((...J)=>d.openConfirm&&d.openConfirm(...J),["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"},[a.createVNode(E),e[5]||(e[5]=a.createElementVNode("span",{class:"text-gray-800"},"Видалити",-1))])):a.createCommentVNode("",!0)])]}),_:1})]),a.createVNode(T,{visible:o.isDeleteConfirm,"onUpdate:visible":e[3]||(e[3]=I=>o.isDeleteConfirm=I),size:"small",title:"Ви впевнені?"},{default:a.withCtx(()=>[e[6]||(e[6]=a.createElementVNode("p",{class:"mt-1 text-sm text-gray-600 dark:text-neutral-400"}," Ви впевнені, що хочете видалити цей об'єкт? ",-1)),a.createElementVNode("div",Oq,[a.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-xs font-medium duration-300 border rounded-lg shadow-sm hover:bg-gray-100 gap-x-2 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50",onClick:e[1]||(e[1]=I=>o.isDeleteConfirm=!1)}," Скасувати "),a.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-xs font-medium text-white duration-300 bg-red-500 rounded-lg gap-x-2 hover:bg-red-700 disabled:opacity-50 disabled:pointer-events-none",onClick:e[2]||(e[2]=(...I)=>d.deleteElement&&d.deleteElement(...I))}," Так, я впевнена(ий) ")])]),_:1},8,["visible"])],64)}const Fq=Le(Iq,[["render",Lq]]),$q={},jq={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 Uq(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",jq,[...e[0]||(e[0]=[a.createElementVNode("path",{d:"m3 16 4 4 4-4"},null,-1),a.createElementVNode("path",{d:"M7 20V4"},null,-1),a.createElementVNode("path",{d:"m21 8-4-4-4 4"},null,-1),a.createElementVNode("path",{d:"M17 4v16"},null,-1)])])}const Hq=Le($q,[["render",Uq]]),Wq={},qq={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-rosette-discount-check"};function Gq(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",qq,[...e[0]||(e[0]=[a.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),a.createElementVNode("path",{d:"M5 7.2a2.2 2.2 0 0 1 2.2 -2.2h1a2.2 2.2 0 0 0 1.55 -.64l.7 -.7a2.2 2.2 0 0 1 3.12 0l.7 .7c.412 .41 .97 .64 1.55 .64h1a2.2 2.2 0 0 1 2.2 2.2v1c0 .58 .23 1.138 .64 1.55l.7 .7a2.2 2.2 0 0 1 0 3.12l-.7 .7a2.2 2.2 0 0 0 -.64 1.55v1a2.2 2.2 0 0 1 -2.2 2.2h-1a2.2 2.2 0 0 0 -1.55 .64l-.7 .7a2.2 2.2 0 0 1 -3.12 0l-.7 -.7a2.2 2.2 0 0 0 -1.55 -.64h-1a2.2 2.2 0 0 1 -2.2 -2.2v-1a2.2 2.2 0 0 0 -.64 -1.55l-.7 -.7a2.2 2.2 0 0 1 0 -3.12l.7 -.7a2.2 2.2 0 0 0 .64 -1.55v-1"},null,-1),a.createElementVNode("path",{d:"M9 12l2 2l4 -4"},null,-1)])])}const Zq={components:{IconExport:Hq,IconChevronDown:Od,IconSuccess:Le(Wq,[["render",Gq]])},props:{table:String,columns:Array,page:[String,Number],filterCustom:String,filterState:String,filters:String},data(){return{isOpen:!1,tableFormats:["json","csv","xlsx"],format:"",cols:[],activeAction:"",isSuccessTemplate:!1,actions:[{name:"choceAll",function:this.choceAll,label:"Вибрати усі"},{name:"choceVisible",function:this.choceVisible,label:"Вибрати поточні"},{name:"clearAll",function:this.clearAll,label:"Жодного"}],es:null,progress:0}},watch:{isOpen(t){t||(this.format="",this.cols=[],this.activeAction="",this.isSuccessTemplate=!1)}},computed:{color(){return et.value.buttonColor||"blue"}},methods:{async downloadBlob(t){const e=await Oe.get(t||"/api/export",{params:{table:this.table,format:this.format,cols:this.cols.join(","),page:this.page,filter:this.filters||null,state:this.filterState||null,custom:this.filterCustom||null},responseType:"blob"}),n=new Blob([e.data],{type:"application/octet-stream"}),r=document.createElement("a");r.href=URL.createObjectURL(n),r.download=`${this.table.split(".")[0]}.${this.format}`,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(r.href),this.isSuccessTemplate=!0,this.$notify({type:"success",title:"Експорт",message:"Файл успішно експортовано!"})},async exportTable(){var e;try{await Oe.get("/api/export",{params:{table:this.table,format:this.format,cols:this.cols.join(","),page:this.page,filter:this.filters||null,state:this.filterState||null,custom:this.filterCustom||null,stream:!0},validateStatus:n=>n===200}),await this.downloadBlob();return}catch{}const t=new URLSearchParams({table:this.table,format:this.format,cols:this.cols.join(","),page:this.page,filter:this.filters||"",state:this.filterState||"",custom:this.filterCustom||""});(e=this.es)==null||e.close(),this.es=new EventSource(`/api/export?${t.toString()}`),this.es.addEventListener("progress",n=>{try{const{percent:r}=JSON.parse(n.data);this.progress=r}catch{console.log("progress",n.data)}}),this.es.addEventListener("done",async n=>{this.es.close(),this.es=null;const{url:r}=JSON.parse(n.data||"{}");await this.downloadBlob(r)}),this.es.onerror=n=>{var r;console.error("SSE error",n),this.$notify({type:"error",title:"Помилка",message:"Потік експорту перервано."}),(r=this.es)==null||r.close()}},selectFormat(t){this.format=t},choceAll(){var t;this.cols=(t=this.columns)==null?void 0:t.map(e=>e==null?void 0:e.name),this.activeAction="choceAll"},clearAll(){this.cols=[],this.activeAction="clearAll"},choceVisible(){var t,e;this.cols=(e=(t=this.columns)==null?void 0:t.filter(n=>(n==null?void 0:n.hidden)!==!0))==null?void 0:e.map(n=>n==null?void 0:n.name),this.activeAction="choceVisible"}}},Yq={key:0,class:"flex flex-col items-center"},Xq={key:1,class:"p-4"},Kq={class:"pb-5 mb-5 border-b border-gray-200 last:pb-0 last:mb-0 last:border-b-0 dark:border-neutral-700"},Jq={class:"flex items-center gap-[10px] -ml-[10px] my-[10px]"},Qq=["onClick"],eG={key:0,class:"block h-[8px] w-[8px] rounded-full bg-blue-500"},tG={class:"mt-2 flex row flex-wrap gap-y-[5px] gap-x-[10px]"},nG={class:"pb-5 mb-5 border-b border-gray-200 last:pb-0 last:mb-0 last:border-b-0 dark:border-neutral-700"},rG={class:"mt-2 space-y-2"},iG=["id","onChange"],sG=["for"],oG={key:0,class:"flex w-full justify-end p-[20px] gap-[6px] border-t"},aG={key:1,class:"flex w-full justify-end p-[20px] gap-[6px] border-t"};function lG(t,e,n,r,o,d){const p=a.resolveComponent("IconExport"),c=a.resolveComponent("IconSuccess"),b=a.resolveComponent("VsCheckbox"),k=a.resolveComponent("VsDialog");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("button",{onClick:e[0]||(e[0]=E=>o.isOpen=!0),class:"py-2 max-h-[34px] px-2.5 md:inline-flex hidden items-center gap-x-1.5 text-xs font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"},[a.createVNode(p,{height:"16",width:"16"}),e[7]||(e[7]=a.createTextVNode(" Експорт ",-1))]),a.createVNode(k,{visible:o.isOpen,"onUpdate:visible":e[6]||(e[6]=E=>o.isOpen=E),title:"Експорт таблиці",size:"small",closeClickBack:!0},{footer:a.withCtx(()=>[o.isSuccessTemplate?(a.openBlock(),a.createElementBlock("div",oG,[a.createElementVNode("button",{type:"button",class:"inline-flex items-center justify-center px-3 py-2 text-sm font-medium text-gray-800 align-middle bg-white border border-gray-200 rounded-lg shadow-sm text-nowrap text-start hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",onClick:e[2]||(e[2]=E=>o.isOpen=!1)}," Закрити "),a.createElementVNode("button",{type:"button",class:"inline-flex items-center justify-center px-3 py-2 text-sm font-medium text-white align-middle bg-blue-600 border border-blue-600 rounded-lg shadow-sm text-nowrap gap-x-2 text-start hover:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:ring-1 focus:ring-blue-300 dark:focus:ring-blue-500",onClick:e[3]||(e[3]=E=>o.isSuccessTemplate=!1)}," Вигрузити ще ")])):(a.openBlock(),a.createElementBlock("div",aG,[a.createElementVNode("button",{type:"button",class:"inline-flex items-center justify-center px-3 py-2 text-sm font-medium text-gray-800 align-middle bg-white border border-gray-200 rounded-lg shadow-sm text-nowrap text-start hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",onClick:e[4]||(e[4]=E=>o.isOpen=!1)}," Скасувати "),a.createElementVNode("button",{type:"button",class:a.normalizeClass(`inline-flex items-center justify-center px-3 py-2 text-sm font-medium text-white align-middle bg-${d.color}-700 rounded-lg shadow-sm text-nowrap gap-x-2 text-start hover:bg-${d.color}-800 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:ring-1 focus:ring-${d.color}-300 dark:focus:ring-${d.color}-500`),onClick:e[5]||(e[5]=(...E)=>d.exportTable&&d.exportTable(...E))}," Завантажити таблицю ",2)]))]),default:a.withCtx(()=>[o.isSuccessTemplate?(a.openBlock(),a.createElementBlock("div",Yq,[a.createVNode(c,{height:"100",width:"100",class:"text-green-200 mb-[20px]"}),e[8]||(e[8]=a.createElementVNode("h2",null,"Звіт сформовано і збережено",-1))])):(a.openBlock(),a.createElementBlock("div",Xq,[a.createElementVNode("div",Kq,[e[9]||(e[9]=a.createElementVNode("h2",{class:"text-sm font-[600] text-gray-500"}," Виберіть стовпці таблиці для експорту: ",-1)),a.createElementVNode("div",Jq,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.actions,E=>(a.openBlock(),a.createElementBlock("button",{key:E==null?void 0:E.name,onClick:E==null?void 0:E.function,class:"inline-flex items-center gap-[8px] justify-center px-3 py-2 text-sm font-medium text-gray-800 align-middle bg-white border-gray-200 text-nowrap text-start"},[a.createElementVNode("span",{class:a.normalizeClass(["h-[14px] w-[14px] border rounded-full flex items-center justify-center",{"border-blue-500":(E==null?void 0:E.name)===o.activeAction}])},[(E==null?void 0:E.name)===o.activeAction?(a.openBlock(),a.createElementBlock("span",eG)):a.createCommentVNode("",!0)],2),a.createTextVNode(" "+a.toDisplayString(E==null?void 0:E.label),1)],8,Qq))),128))]),a.createElementVNode("div",tG,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.columns,(E,C)=>(a.openBlock(),a.createElementBlock("div",{class:"flex items-center",key:C,style:{width:"calc((100% - 10px) / 2)"}},[a.createVNode(b,{class:"[&>label]:text-sm [&>label]:text-gray-800 [&>label]:ms-3 !gap-x-[1px] !p-0",modelValue:o.cols,"onUpdate:modelValue":e[1]||(e[1]=T=>o.cols=T),value:E==null?void 0:E.name,label:E==null?void 0:E.ua},null,8,["modelValue","value","label"])]))),128))])]),a.createElementVNode("div",nG,[e[10]||(e[10]=a.createElementVNode("h2",{class:"text-sm font-[600] text-gray-500"}," Виберіть формат таблиці: ",-1)),a.createElementVNode("div",rG,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.tableFormats,(E,C)=>(a.openBlock(),a.createElementBlock("div",{class:"flex items-center",key:C},[a.createElementVNode("input",{type:"radio",name:"hs-pro-duecmfm",class:"text-blue-600 border-gray-300 rounded-full shrink-0 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-500 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-800",id:E,onChange:T=>d.selectFormat(E)},null,40,iG),a.createElementVNode("label",{for:E,class:"text-sm text-gray-800 ms-3 dark:text-neutral-400"}," Формат "+a.toDisplayString(E),9,sG)]))),128))])])]))]),_:1},8,["visible"])],64)}const cG=Le(Zq,[["render",lG]]),dG={},uG={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-minus"};function hG(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",uG,[...e[0]||(e[0]=[a.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),a.createElementVNode("path",{d:"M5 12l14 0"},null,-1)])])}const pG={components:{IconPlus:Gl,IconMinus:Le(dG,[["render",hG]])},props:{title:String,defaultValue:{type:Boolean,default:()=>!1}},data(){return{expanded:this.defaultValue}}},fG={class:"hs-accordion"},mG={class:"py-0.5 flex items-center gap-x-0.5 w-full"},gG={class:"text-sm font-medium"},yG={class:"relative inline-block w-full duration-150 cursor-pointer before:block before:absolute b"};function _G(t,e,n,r,o,d){const p=a.resolveComponent("IconPlus"),c=a.resolveComponent("IconMinus");return a.openBlock(),a.createElementBlock("div",null,[a.createElementVNode("div",null,[a.createElementVNode("div",fG,[a.createElementVNode("div",mG,[a.createElementVNode("div",{onClick:e[0]||(e[0]=b=>o.expanded=!o.expanded),class:"rounded-md cursor-pointer grow"},[a.createElementVNode("span",gG,a.toDisplayString(n.title),1)]),a.createElementVNode("button",{class:"flex items-center justify-center rounded-md size-6 hover:bg-gray-100",onClick:e[1]||(e[1]=b=>o.expanded=!o.expanded)},[o.expanded?(a.openBlock(),a.createBlock(c,{key:1,width:"14"})):(a.openBlock(),a.createBlock(p,{key:0}))])]),a.createVNode(a.Transition,{name:"fade"},{default:a.withCtx(()=>[a.withDirectives(a.createElementVNode("div",yG,[a.renderSlot(t.$slots,"default",{},void 0,!0)],512),[[a.vShow,o.expanded]])]),_:3})])])])}const bG={components:{AdminComponentIs:Ed,AdminTree:Le(pG,[["render",_G],["__scopeId","data-v-c6318482"]]),VsNoData:Ya,VsWidgetComments:Mv,VsWidgetMap:Um,VsWidgetFileList:Dv},props:{table:String,columns:Array,row:Object}},xG={class:"pl-2 hs-accordion w-[360px] shrink-0 overflow-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar:horizontal]:h-[8px] [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500",style:{height:"calc(100vh - 229px)"}},vG={style:{height:"calc(100vh - 360px)"},class:"pl-2"},wG={class:"flow-root mt-[10px]"},kG={class:"divide-y divide-gray-100 text-[12px]"},EG={class:"grid grid-cols-1 gap-1 py-3 even:bg-gray-50 sm:grid-cols-3 sm:gap-4"},CG={class:"font-medium text-gray-900"},SG={class:"text-gray-700 sm:col-span-2"};function TG(t,e,n,r,o,d){var k,E,C,T;const p=a.resolveComponent("AdminComponentIs"),c=a.resolveComponent("VsWidgetFileList"),b=a.resolveComponent("VsNoData");return a.openBlock(),a.createElementBlock("div",xG,[e[0]||(e[0]=a.createElementVNode("div",{class:"pl-[10px] py-[9px]"},[a.createElementVNode("h2",{class:"text-sm font-medium text-center"},"Інформація про об'єкт")],-1)),a.createElementVNode("div",vG,[(E=(k=t.$route)==null?void 0:k.query)!=null&&E.card?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createElementVNode("div",wG,[a.createElementVNode("dl",kG,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.columns,I=>(a.openBlock(),a.createElementBlock("div",EG,[a.createElementVNode("dt",CG,a.toDisplayString((I==null?void 0:I.ua)||(I==null?void 0:I.title)),1),a.createElementVNode("dd",SG,[a.createVNode(p,{row:n.row,column:I,table:n.table},null,8,["row","column","table"])])]))),256))])]),(a.openBlock(),a.createBlock(c,{key:(C=n.row)==null?void 0:C.id,id:(T=n.row)==null?void 0:T.id,class:"mt-10"},null,8,["id"]))],64)):(a.openBlock(),a.createBlock(b,{key:1,text:"Оберіть один з об'єктів в таблиці для відображення інформаціі про нього"}))])])}const AG=Le(bG,[["render",TG]]),DG={emits:["filterChange"],props:{scheme:{type:Object},onFilters:{type:Number},table:{type:String}},components:{IconFilter:Rv},data(){return{isFilters:!1}},methods:{closeFilter({target:t}){this.isFilters&&t.classList.contains("filter-container")&&(this.isFilters=!1)}}},MG={key:0,class:"px-[7px] text-[10px] py-[1px] font-[700] text-white bg-blue-500 rounded-full"},IG={class:"filter-content h-screen bg-white w-[400px] overflow-x-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar:horizontal]:h-[8px] [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"};function PG(t,e,n,r,o,d){const p=a.resolveComponent("IconFilter"),c=a.resolveComponent("VsFilter");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("button",{onClick:e[0]||(e[0]=b=>o.isFilters=!o.isFilters),class:"py-2 px-2.5 max-h-[34px] inline-flex items-center gap-x-1.5 text-xs font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none"},[a.createVNode(p,{height:"16",width:"16"}),e[4]||(e[4]=a.createTextVNode(" Фільтри ",-1)),n.onFilters?(a.openBlock(),a.createElementBlock("span",MG,a.toDisplayString(n.onFilters),1)):a.createCommentVNode("",!0)]),a.createVNode(a.Transition,{name:"fade"},{default:a.withCtx(()=>{var b;return[(a.openBlock(),a.createBlock(a.Teleport,{to:"#modal"},[a.withDirectives(a.createElementVNode("div",{onClick:e[3]||(e[3]=(...k)=>d.closeFilter&&d.closeFilter(...k)),style:{height:"100vh"},class:"fixed filter-container top-0 flex justify-end items-center z-[12] right-0 left-0 bottom-0 bg-[rgba(0,0,0,0.2)]"},[a.createElementVNode("div",IG,[(b=n.scheme)!=null&&b.length?(a.openBlock(),a.createBlock(c,{key:0,ref:"filter",scheme:n.scheme,layout:"default","apply-vue-router":"",history:"",name:"filter",footer:!0,background:!0,onFilterChange:e[1]||(e[1]=k=>t.$emit("filterChange",k)),closeFilterBtn:!0,onFilterClose:e[2]||(e[2]=k=>o.isFilters=!1)},null,8,["scheme"])):a.createCommentVNode("",!0)])],512),[[a.vShow,o.isFilters]])]))]}),_:1})],64)}const RG=Le(DG,[["render",PG]]),NG={props:{tabsList:{type:Array,default:()=>[]},filterState:String}},BG={class:"relative flex space-x-1 mb-[20px] after:absolute after:w-[99%] after:bottom-0 after:inset-x-0 after:border-b-2 after:border-gray-200 dark:after:border-neutral-700","aria-label":"Tabs",role:"tablist","aria-orientation":"horizontal"},VG=["onClick"];function zG(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("nav",BG,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.tabsList,p=>(a.openBlock(),a.createElementBlock("button",{onClick:c=>t.$emit("update:filterState",p==null?void 0:p.name),class:a.normalizeClass(["hs-tab-active:after:bg-gray-800 hs-tab-active:text-gray-800 px-2.5 py-1.5 mb-2 relative inline-flex justify-center items-center gap-x-2 hover:bg-gray-100 text-gray-500 hover:text-gray-800 text-sm rounded-lg disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-100 after:absolute after:-bottom-2 after:inset-x-0 after:z-10 after:h-0.5 after:pointer-events-none dark:hs-tab-active:text-neutral-200 dark:hs-tab-active:after:bg-neutral-400 dark:text-neutral-500 dark:hover:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700 active",{" font-semibold after:absolute after:bottom-[-8px] after:left-2.5 after:right-2.5 after:z-10 after:h-0.5 after:bg-gray-800":(p==null?void 0:p.name)===n.filterState}])},a.toDisplayString(p==null?void 0:p.label),11,VG))),256))])}const OG=Le(NG,[["render",zG]]),LG={},FG={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-filter"};function $G(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",FG,[...e[0]||(e[0]=[a.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),a.createElementVNode("path",{d:"M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z"},null,-1)])])}const jG={components:{IconFilter2:Le(LG,[["render",$G]]),IconCheck2:Dl},props:{filterCustom:String,customList:Array}},UG={class:"py-2 max-h-[34px] px-2.5 inline-flex items-center gap-x-1.5 text-xs font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"},HG={class:"flex flex-col p-[2px] gap-[2px] w-[170px]"},WG=["onClick"],qG={class:"text-sm text-gray-800"};function GG(t,e,n,r,o,d){const p=a.resolveComponent("IconFilter2"),c=a.resolveComponent("IconCheck2"),b=a.resolveComponent("VsPopover");return a.openBlock(),a.createBlock(b,{ref:"popover",placement:"bottom"},{reference:a.withCtx(()=>[a.createElementVNode("button",UG,[a.createVNode(p,{height:"20",width:"20"})])]),default:a.withCtx(()=>[a.createElementVNode("div",HG,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.customList,(k,E)=>(a.openBlock(),a.createElementBlock("button",{onClick:C=>{var T;t.$emit("update:filterCustom",k==null?void 0:k.name),(T=t.$refs)==null||T.popover.togglePopover()},key:E,class:a.normalizeClass(["flex items-center px-3 py-1 rounded-md cursor-pointer group hover:bg-gray-100",{"bg-gray-100":n.filterCustom===(k==null?void 0:k.name)}])},[a.createElementVNode("span",qG,a.toDisplayString(k==null?void 0:k.label),1),n.filterCustom===(k==null?void 0:k.name)?(a.openBlock(),a.createBlock(c,{key:0,class:"ml-auto size-3 shrink-0"})):a.createCommentVNode("",!0)],10,WG))),128)),a.createElementVNode("button",{class:"flex items-center px-3 py-1 rounded-md cursor-pointer group hover:bg-gray-100",onClick:e[0]||(e[0]=k=>{var E;t.$emit("update:filterCustom",void 0),(E=t.$refs)==null||E.popover.togglePopover()})}," Скинути фільтри ")])]),_:1},512)}const ZG=Le(jG,[["render",GG]]),YG={class:"flex items-center gap-x-2"},XG={__name:"admin-table-custom-buttons",props:{slots:Object,data:Object},setup(t){var c,b,k,E,C;const{asyncTemplateSlot:e}=(C=(E=(k=(b=(c=a.getCurrentInstance())==null?void 0:c.appContext)==null?void 0:b.app)==null?void 0:k.config)==null?void 0:E.globalProperties)==null?void 0:C.utils,n=a.ref(""),r=a.ref(""),o=t,d=()=>{var T,I,N,$,F;if((T=o.slots)!=null&&T.panelLeft||(r.value="div"),(N=(I=o.slots)==null?void 0:I.panelLeft)!=null&&N.includes("<")){const q=e("PanelLeft",($=o.slots)==null?void 0:$.panelLeft,["name"]);r.value=q}else r.value=(F=o.slots)==null?void 0:F.panelLeft},p=()=>{var T,I,N,$,F;if((T=o.slots)!=null&&T.panelRight||(n.value="div"),(N=(I=o.slots)==null?void 0:I.panelRight)!=null&&N.includes("<")){const q=e("PanelRight",($=o.slots)==null?void 0:$.panelRight,["name"]);n.value=q}else n.value=(F=o.slots)==null?void 0:F.panelRight};return d(),p(),(T,I)=>(a.openBlock(),a.createElementBlock("div",YG,[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(r.value),{data:t.data},null,8,["data"])),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(n.value),{data:t.data},null,8,["data"]))]))}},KG={__name:"admin-custom-button-add",props:{slots:Object},setup(t){var d,p,c,b,k;const{asyncTemplateSlot:e}=(k=(b=(c=(p=(d=a.getCurrentInstance())==null?void 0:d.appContext)==null?void 0:p.app)==null?void 0:c.config)==null?void 0:b.globalProperties)==null?void 0:k.utils,n=a.ref(""),r=t;return(()=>{var E,C,T,I,N;if((E=r.slots)!=null&&E.addButton||(n.value="div"),(T=(C=r.slots)==null?void 0:C.addButton)!=null&&T.includes("<")){const $=e("addButton",(I=r.slots)==null?void 0:I.addButton,["IconPlus"]);n.value=$}else n.value=(N=r.slots)==null?void 0:N.addButton})(),(E,C)=>n.value?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(n.value),{key:0,IconPlus:Gl})):a.createCommentVNode("",!0)}},JG={key:0,class:"px-1 py-3 text-gray-800 font-[500]"},QG={key:1,class:"px-1 py-3 text-gray-800 font-[700]"},eZ={__name:"admin-table-totals-list",props:{columns:{type:Array,default:()=>[]},agg:{type:Object,default:()=>{}}},setup(t){return(e,n)=>(a.openBlock(),a.createElementBlock("tr",null,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.columns,r=>{var o;return a.openBlock(),a.createElementBlock(a.Fragment,{key:r==null?void 0:r.name},[(o=t.agg)!=null&&o[r==null?void 0:r.name]?(a.openBlock(),a.createElementBlock("td",JG,[a.createVNode(Ed,{column:r,row:t.agg},null,8,["column","row"])])):(a.openBlock(),a.createElementBlock("td",QG))],64)}),128))]))}},tZ={},nZ={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-check"};function rZ(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",nZ,[...e[0]||(e[0]=[a.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),a.createElementVNode("path",{d:"M5 12l5 5l10 -10"},null,-1)])])}const iZ=Le(tZ,[["render",rZ]]),sZ=a.defineComponent({components:{IconChevronDown:Rp,IconCheck:iZ},props:{total:{type:Number,default:()=>0},pageSize:{type:Number,default:()=>20},maxPages:{type:Number,default:()=>10},defaultPage:{type:Number,default:()=>1},pageSizes:{type:Array,default:[]}},data(){return{page:1,pages:[],isDropdownOpen:!1,pageSizeLocal:null}},mounted(){this.pageSizeLocal=this.pageSize},watch:{total:{immediate:!0,handler(){this.initPages()}},defaultPage:{immediate:!0,handler(t){this.page=t,this.updatePages(t)}},pageSizeLocal(t,e){e&&(this.isDropdownOpen=!1,this.setCurrentPage(1))}},computed:{pagesCount(){return Math.ceil(this.total/this.pageSizeLocal)},disableNextClick(){return this.page>=this.pagesCount},disablePrevClick(){return this.page<=1}},methods:{initPages(){if(this.total<=0){this.pages=[1];return}this.updatePages(this.page)},handleSetPage(t){const e=t.replace(/\D/g,"");if(e>this.pagesCount){this.$refs.currentPage.innerText=this.page;return}else this.$refs.currentPage.innerText=e;this.setCurrentPage(e)},updatePages(t){const e=Math.floor(this.maxPages/2);let n=Math.max(t-e,1),r=n+this.maxPages-1;r>this.pagesCount&&(r=this.pagesCount,n=Math.max(r-this.maxPages+1,1)),this.pages=Array.from({length:r-n+1},(o,d)=>n+d)},handleClickPrev(){this.disablePrevClick||(this.setCurrentPage(this.page-1),this.updatePages(this.page),this.$emit("prevClick"))},handleClickNext(){this.disableNextClick||(this.setCurrentPage(parseInt(this.page)+1),this.updatePages(this.page),this.$emit("nextClick"))},setCurrentPage(t){this.page=t,this.$emit("pageChange",this.page,this.pageSizeLocal),this.updatePages(t)},keydownEnter(t){t.preventDefault(),t.target.blur()}}}),oZ={class:"flex items-center w-full"},aZ={class:"flex items-center mx-[8px]"},lZ={class:"min-h-[38px] flex justify-center items-center text-stone-500 py-2 px-1.5 text-sm"},cZ={key:0,class:"flex items-center justify-center ml-3 gap-x-5"},dZ={class:"relative"},uZ={class:"z-50 bg-white shadow-md rounded-lg p-1 space-y-0.5 dark:bg-neutral-800 dark:border dark:border-neutral-700 dark:divide-neutral-700 absolute bottom-[100%]"},hZ=["onClick"];function pZ(t,e,n,r,o,d){const p=a.resolveComponent("IconChevronDown"),c=a.resolveComponent("IconCheck");return a.openBlock(),a.createElementBlock("nav",oZ,[a.createElementVNode("button",{type:"button",onClick:e[0]||(e[0]=(...b)=>t.handleClickPrev&&t.handleClickPrev(...b)),class:a.normalizeClass(["min-h-[38px] min-w-[38px] py-2 px-2.5 inline-flex justify-center items-center gap-x-2 text-sm rounded-lg text-stone-800 hover:bg-stone-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-100",{"opacity-50 pointer-events-none":t.disablePrevClick}])},[a.createVNode(p,{height:"16",width:"16",class:"rotate-90"})],2),a.createElementVNode("div",aZ,[a.createElementVNode("span",{ref:"currentPage",contenteditable:"true",onKeydown:e[1]||(e[1]=a.withKeys((...b)=>t.keydownEnter&&t.keydownEnter(...b),["enter"])),onBlur:e[2]||(e[2]=b=>t.handleSetPage(b.target.innerText)),class:"min-h-[38px] max-h-[38px] overflow-hidden min-w-[38px] flex justify-center items-center bg-stone-100 text-stone-800 py-2 px-3 outline-blue-600 text-sm rounded-lg disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:text-white"},a.toDisplayString(t.page),545),e[5]||(e[5]=a.createElementVNode("span",{class:"min-h-[38px] flex justify-center items-center text-stone-500 py-2 px-1.5 text-sm"},"з",-1)),a.createElementVNode("span",lZ,a.toDisplayString(t.pagesCount),1)]),a.createElementVNode("button",{type:"button",onClick:e[3]||(e[3]=(...b)=>t.handleClickNext&&t.handleClickNext(...b)),class:a.normalizeClass([{"opacity-50 pointer-events-none":t.disableNextClick},"min-h-[38px] min-w-[38px] py-2 px-2.5 inline-flex justify-center items-center gap-x-2 text-sm rounded-lg text-stone-800 hover:bg-stone-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-100"])},[a.createVNode(p,{height:"16",width:"16",class:"-rotate-90"})],2),t.pageSizes.length?(a.openBlock(),a.createElementBlock("div",cZ,[a.createElementVNode("div",dZ,[a.withDirectives(a.createElementVNode("div",uZ,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.pageSizes,b=>(a.openBlock(),a.createElementBlock("button",{type:"button",class:"w-full flex items-center gap-x-3.5 py-2 px-3 rounded-lg text-sm",onClick:k=>t.pageSizeLocal=b},[a.createTextVNode(a.toDisplayString(b)+" ",1),b===t.pageSizeLocal?(a.openBlock(),a.createBlock(c,{key:0,width:"14",height:"14",class:"text-blue-600"})):a.createCommentVNode("",!0)],8,hZ))),256))],512),[[a.vShow,t.isDropdownOpen]]),t.pageSizes.length?(a.openBlock(),a.createElementBlock("button",{key:0,type:"button",class:"text-sm h-[32px] min-w-8 py-3 px-3.5 inline-flex items-center gap-x-1 rounded-lg border border-gray-200 text-gray-800 shadow-sm hover:bg-gray-50 focus:outline-none focus:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none dark:border-neutral-700 dark:text-white dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",onClick:e[4]||(e[4]=b=>t.isDropdownOpen=!t.isDropdownOpen)},[a.createTextVNode(a.toDisplayString(t.pageSizeLocal)+" ",1),a.createVNode(p,{height:"16",width:"16"})])):a.createCommentVNode("",!0)])])):a.createCommentVNode("",!0)])}const fZ={props:{table:String,title:String,search:String},components:{AdminTableControl:Fq,AdminTableExport:cG,AdminTableColumnsHidden:Bv,AdminTableColumn:Tq,AdminNodata:gg,IconPlus:Gl,IconSearch:Pp,AdminTableCardInfo:AG,IconOpenCard:A2,AdminComponentIs:Ed,AdminTableFilters:RG,AdminTableTabs:OG,AdminTableCustomFilters:ZG,AdminTableCustomButtons:XG,AdminCustomButtonAdd:KG,AdminTableTotalsList:eZ,AdminTablePagination:Le(sZ,[["render",pZ]])},data(){return{tableData:{},filterScheme:[],page:1,searchValue:"",limit:0,filters:null,activeColumn:"",isVisibleCardInfo:!1,onFilters:0,filterState:null,filterCustom:null,visibleColumns:[],initialHiddenColumns:"",columnsWidth:{}}},async mounted(){await this.checkUrlMounted(),await this.getTableData(),await this.getFilters(),window.addEventListener("reloadTablePage",this.getTableData)},unmounted(){window.removeEventListener("reloadTablePage",this.getTableData)},computed:{color(){return et.value.buttonColor||"blue"},fontSize(){return`text-[${et.value.fontSize||13}px]`},defaultPage(){var t,e;return((e=(t=this.$route)==null?void 0:t.query)==null?void 0:e.page)||1},columns(){var t,e;return(e=(t=this.tableData)==null?void 0:t.columns)==null?void 0:e.filter(n=>(n==null?void 0:n.hidden)!==!0)},isForm(){var t,e,n,r,o;return((t=this.tableData)==null?void 0:t.form)&&(((n=(e=this.tableData)==null?void 0:e.actions)==null?void 0:n.includes("add"))||((o=(r=this.tableData)==null?void 0:r.actions)==null?void 0:o.includes("edit")))},isNoData(){var t,e;return!((t=this.tableData)!=null&&t.rows)||!((e=this.columns)!=null&&e.length)},activeCardRow(){var t,e;return((e=(t=this.tableData)==null?void 0:t.rows)==null?void 0:e.find(n=>{var r,o;return(n==null?void 0:n.id)===((o=(r=this.$route)==null?void 0:r.query)==null?void 0:o.card)}))||{}},getActions(){var t;return(t=this.tableData)==null?void 0:t.actions}},watch:{searchValue:{handler:Ny(async function(t){var e;this.page=1,await this.getTableData(),this.$router.push({...this.$route,query:{...(e=this.$route)==null?void 0:e.query,search:t||void 0,page:1}})},500)},$route:{async handler(t,e){var n,r;((n=t==null?void 0:t.params)==null?void 0:n.catchAll)!==((r=e==null?void 0:e.params)==null?void 0:r.catchAll)&&(this.visibleColumns=[],this.tableData=null,this.columnsWidth={},this.unmountedData(),this.getFilters(),await this.getTableData())},deep:!0},limit(t){var e;this.$router.replace({...this.$route,query:{...(e=this.$route)==null?void 0:e.query,limit:t}})},filterState(t){var e;t&&(this.$router.replace({...this.$route,query:{...(e=this.$route)==null?void 0:e.query,state:t}}),this.getTableData())},filterCustom(t){var e;this.$router.replace({...this.$route,query:{...(e=this.$route)==null?void 0:e.query,custom:t}}),this.getTableData()},columns(t){var e,n,r,o;this.visibleColumns=t==null?void 0:t.map(d=>d==null?void 0:d.name),this.initialHiddenColumns===((e=this.visibleColumns)==null?void 0:e.join(","))&&(this.visibleColumns=[]),this.$router.replace({...this.$route,query:{...(n=this.$route)==null?void 0:n.query,columns:(r=this.visibleColumns)!=null&&r.length?(o=this.visibleColumns)==null?void 0:o.join(","):void 0}})}},methods:{async checkUrlMounted(){var t,e,n,r,o,d,p,c,b,k,E,C,T,I,N,$,F,q,J,Q,me;this.page=((e=(t=this.$route)==null?void 0:t.query)==null?void 0:e.page)||1,this.limit=((r=(n=this.$route)==null?void 0:n.query)==null?void 0:r.limit)||20,(d=(o=this.$route)==null?void 0:o.query)!=null&&d.filter&&(this.filters=((b=decodeURI((c=(p=this.$route)==null?void 0:p.query)==null?void 0:c.filter))==null?void 0:b.replaceAll("+"," "))||null),this.filters&&(this.onFilters=((E=(k=this.filters)==null?void 0:k.split("="))==null?void 0:E.length)-1),this.filterState=((T=(C=this.$route)==null?void 0:C.query)==null?void 0:T.state)||null,this.filterCustom=((N=(I=this.$route)==null?void 0:I.query)==null?void 0:N.custom)||null,this.searchValue=((F=($=this.$route)==null?void 0:$.query)==null?void 0:F.search)||"",this.visibleColumns=((Q=(J=(q=this.$route)==null?void 0:q.query)==null?void 0:J.columns)==null?void 0:Q.split(","))||[],(me=this.$route)!=null&&me.query.card&&(this.isVisibleCardInfo=!0)},rowWidth(t){var n,r;const e=(r=(n=this.tableData)==null?void 0:n.columns)==null?void 0:r.find(o=>o.name===t);if(e){const o=e==null?void 0:e.width;return typeof o=="number"?`${o}px`:o!=null&&o.includes("px")?o:`${o}px`}},unmountedData(){this.page=1,this.visibleColumns=[],this.filterCustom=null,this.filterState=null,this.isVisibleCardInfo=!1,this.filterScheme=null,this.filters=null,this.onFilters=0,this.searchValue=""},async getTableData(){var t,e,n,r,o,d,p,c,b,k,E;try{const{data:C}=await Oe.get(`/api/template/table/${this.table}`),T=await Oe.get(`/api/table-data/${this.table}`,{params:{page:this.page,search:this.searchValue||null,limit:this.limit,filter:this.filters||null,order:((e=(t=this.$route)==null?void 0:t.query)==null?void 0:e.sort)||null,state:this.filterState||null,custom:this.filterCustom||null}});this.tableData={...C,...(T==null?void 0:T.data)||{}},this.initialHiddenColumns=(d=(o=(r=(n=this.tableData)==null?void 0:n.columns)==null?void 0:r.filter(I=>(I==null?void 0:I.hidden)!==!0))==null?void 0:o.map(I=>I==null?void 0:I.name))==null?void 0:d.join(","),(p=this.visibleColumns)!=null&&p.length?(c=this.tableData)==null||c.columns.forEach(I=>{var N;(N=this.visibleColumns)!=null&&N.includes(I==null?void 0:I.name)?I.hidden=!1:I.hidden=!0}):this.visibleColumns=(E=(k=(b=this.tableData)==null?void 0:b.columns)==null?void 0:k.filter(I=>(I==null?void 0:I.hidden)!==!0))==null?void 0:E.map(I=>I==null?void 0:I.name),setTimeout(()=>{var I,N;(N=(I=this.tableData)==null?void 0:I.columns)==null||N.forEach(({name:$})=>{var F,q,J,Q,me,Ee;(q=(F=this.columnsWidth)==null?void 0:F[$])!=null&&q.ref&&(this.columnsWidth[$].width=parseInt((Ee=(me=(Q=(J=this.columnsWidth)==null?void 0:J[$])==null?void 0:Q.ref)==null?void 0:me.getBoundingClientRect())==null?void 0:Ee.width)+"px")})})}catch{}},async getFilters(){var t;try{const{data:e}=await Oe.get(`/api/table-filter/${this.table}`);this.filterScheme=(t=e==null?void 0:e.list)==null?void 0:t.map(n=>({...n,label:(n==null?void 0:n.label)||(n==null?void 0:n.ua)}))}catch{}},async handlePageChange(t,e){const n=this.$route.query;this.page=t,this.limit=e,await this.$router.replace({query:{...n,page:t,limit:e}}),await this.getTableData()},async filterChange({url:t,state:e}){var n;this.filters=t!=="no-url"?t:null,this.onFilters=(n=Object.entries(e))==null?void 0:n.length,this.page=1,await this.getTableData()},changeActiveColumn(t){this.activeColumn=t,this.getTableData()},pushToCard(t){var e;((e=this.tableData)==null?void 0:e.card)===!1||this.$router.push(`/card/${this.table}/${t}`)},pushToLinkCard(t,e){t!=null&&t.link&&this.$router.push(`/card/${t==null?void 0:t.link}/${e==null?void 0:e[t==null?void 0:t.name]}`)},changeActiveCardInfo(t){var e;this.isVisibleCardInfo&&this.$router.push({...this.$route,query:{...(e=this.$route)==null?void 0:e.query,card:t}})},toggleCardInfo(){var t;this.isVisibleCardInfo=!this.isVisibleCardInfo,this.isVisibleCardInfo||this.$router.push({...this.$route,query:{...(t=this.$route)==null?void 0:t.query,card:void 0}})},getCustomStyles(t){return[t!=null&&t.link?" text-blue-800 hover:underline decoration-1":"",t!=null&&t.align?` text-${(t==null?void 0:t.align)||"left"}`:"",`text-${(t==null?void 0:t.wrap)||"wrap"}`]}}},mZ={class:"w-[calc(100vw - 320px)] bg-gray-100"},gZ={class:"h-[76px] mt-[15px] flex items-center justify-between mx-[20px] px-[20px] bg-white rounded-xl"},yZ={class:"text-lg font-semibold text-gray-800 dark:text-neutral-200"},_Z={class:"bg-white w-full rounded-xl p-[20px] pr-0"},bZ={class:"flex"},xZ={class:"flex gap-[6px] ml-auto"},vZ={class:"inline-block w-full align-middle"},wZ={class:"sticky top-[-1px] z-[2] bg-white w-full after:absolute after:content-[''] after:block after:w-full after:h-px after:bg-stone-200"},kZ={class:"right-0"},EZ={key:0,class:"w-[70px] sticky right-0 top-0"},CZ={class:"divide-y divide-gray-200 z-[1] relative text-gray-600"},SZ=["onClick"],TZ=["onClick"],AZ=["onClick"],DZ={class:"flex items-center justify-start w-full px-1 py-2"},MZ={class:"w-[200px] md:inline-flex hidden"},IZ={class:"text-sm text-gray-600 dark:text-neutral-400"},PZ={class:"font-semibold text-gray-800 dark:text-neutral-200"},RZ={key:0};function NZ(t,e,n,r,o,d){var Ne,Ue,Xe,He,tt,ce,$t,ut,Ft,Ut,cn,dn,Wt,en,mn,gn,yn,Wn,Te,nt,rt,wt,Vt,un,zt,Bt,_n,Ce,zn,Vs,tn,On,zs;const p=a.resolveComponent("AdminCustomButtonAdd"),c=a.resolveComponent("IconPlus"),b=a.resolveComponent("router-link"),k=a.resolveComponent("AdminTableTabs"),E=a.resolveComponent("IconSearch"),C=a.resolveComponent("VsText"),T=a.resolveComponent("AdminTableCustomButtons"),I=a.resolveComponent("AdminTableCustomFilters"),N=a.resolveComponent("AdminTableColumnsHidden"),$=a.resolveComponent("AdminTableExport"),F=a.resolveComponent("AdminTableFilters"),q=a.resolveComponent("IconOpenCard"),J=a.resolveComponent("AdminTableColumn"),Q=a.resolveComponent("AdminComponentIs"),me=a.resolveComponent("AdminTableControl"),Ee=a.resolveComponent("AdminTableTotalsList"),Ve=a.resolveComponent("AdminNodata"),we=a.resolveComponent("AdminTablePagination"),Re=a.resolveComponent("AdminTableCardInfo");return a.openBlock(),a.createElementBlock("div",mZ,[a.createElementVNode("div",gZ,[a.createElementVNode("h2",yZ,a.toDisplayString(n.title),1),d.isForm?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[(Ue=(Ne=o.tableData)==null?void 0:Ne.slots)!=null&&Ue.addButton?(a.openBlock(),a.createBlock(p,{key:0,slots:(Xe=o.tableData)==null?void 0:Xe.slots},null,8,["slots"])):(a.openBlock(),a.createBlock(b,{key:1,to:`/add?table=${(tt=(He=t.$route)==null?void 0:He.params)==null?void 0:tt.catchAll}`,class:a.normalizeClass(`inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-${d.color}-700 border border-transparent rounded-lg gap-x-2 hover:bg-${d.color}-800 hover:text-white`)},{default:a.withCtx(()=>[a.createVNode(c,{height:"16",width:"16"}),e[5]||(e[5]=a.createTextVNode(" Додати ",-1))]),_:1},8,["to","class"]))],64)):a.createCommentVNode("",!0)]),a.createElementVNode("div",{style:a.normalizeStyle({height:((ce=t.$adminSettings)==null?void 0:ce.header)===!1?"calc(100vh - 91px)":"calc(100vh - 155px)"}),class:"bg-gray-100 p-[20px] flex pt-[10px] lg:w-[calc(100vw-260px)] w-[100vw]"},[a.createElementVNode("div",_Z,[(ut=($t=o.tableData)==null?void 0:$t.filterState)!=null&&ut.length?(a.openBlock(),a.createBlock(k,{key:0,tabsList:(Ft=o.tableData)==null?void 0:Ft.filterState,filterState:o.filterState,"onUpdate:filterState":e[0]||(e[0]=ht=>o.filterState=ht)},null,8,["tabsList","filterState"])):a.createCommentVNode("",!0),a.createElementVNode("div",bZ,[a.createElementVNode("div",{class:a.normalizeClass([o.isVisibleCardInfo?"w-[calc(100%-360px)]":"w-full"])},[a.createElementVNode("div",{class:a.normalizeClass(["flex sm:grid sm:grid-cols-2 gap-x-2 sm:gap-x-5 mb-[10px] relative",{"pr-[20px]":!o.isVisibleCardInfo}])},[a.createVNode(E,{height:"14",width:"14",class:"absolute top-[10px] left-[14px] text-gray-500 z-[1]"}),a.createVNode(C,{modelValue:o.searchValue,"onUpdate:modelValue":e[1]||(e[1]=ht=>o.searchValue=ht),placeholder:n.search||"Пошук...",clearable:!0,class:"[&>input]:py-[7px] [&>input]:max-h-[36px] [&>input]:ps-10 [&>input]:pe-8 [&>input]:block [&>input]:w-full [&>input]:bg-gray-100 [&>input]:border-transparent [&>input]:rounded-lg [&>input]:text-sm [&>input]:focus:bg-white [&>input]:focus:border-blue-500 [&>input]:focus:ring-blue-500 [&>input]:disabled:opacity-50 [&>input]:disabled:pointer-events-none [&>input]:dark:bg-neutral-700 [&>input]:dark:border-transparent [&>input]:dark:text-neutral-400 [&>input]:dark:placeholder:text-neutral-400 dark:focus:bg-neutral-800 dark:focus:ring-neutral-600"},null,8,["modelValue","placeholder"]),a.createElementVNode("div",xZ,[(Ut=o.tableData)!=null&&Ut.slots?(a.openBlock(),a.createBlock(T,{key:0,data:o.tableData,slots:(cn=o.tableData)==null?void 0:cn.slots},null,8,["data","slots"])):a.createCommentVNode("",!0),(Wt=(dn=o.tableData)==null?void 0:dn.filterCustom)!=null&&Wt.length?(a.openBlock(),a.createBlock(I,{key:1,customList:(en=o.tableData)==null?void 0:en.filterCustom,filterCustom:o.filterCustom,"onUpdate:filterCustom":e[2]||(e[2]=ht=>o.filterCustom=ht)},null,8,["customList","filterCustom"])):a.createCommentVNode("",!0),a.createVNode(N,{columns:(mn=o.tableData)==null?void 0:mn.columns,onUpdateColumns:e[3]||(e[3]=ht=>o.tableData.columns=ht)},null,8,["columns"]),((gn=o.tableData)==null?void 0:gn.export)!==!1?(a.openBlock(),a.createBlock($,{key:2,table:n.table,columns:(yn=o.tableData)==null?void 0:yn.columns,page:o.page,"filter-state":o.filterState,"filter-custom":o.filterCustom,filters:o.filters},null,8,["table","columns","page","filter-state","filter-custom","filters"])):a.createCommentVNode("",!0),(Wn=o.filterScheme)!=null&&Wn.length?(a.openBlock(),a.createBlock(F,{key:3,scheme:o.filterScheme,onFilters:o.onFilters,table:n.table,onFilterChange:d.filterChange},null,8,["scheme","onFilters","table","onFilterChange"])):a.createCommentVNode("",!0),a.createElementVNode("button",{onClick:e[4]||(e[4]=(...ht)=>d.toggleCardInfo&&d.toggleCardInfo(...ht)),class:"py-2 px-2.5 max-h-[34px] md:inline-flex hidden items-center gap-x-1.5 text-xs font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"},[a.createVNode(q,{class:a.normalizeClass({"rotate-180 duration-300":!o.isVisibleCardInfo})},null,8,["class"])])])],2),a.createElementVNode("div",{class:a.normalizeClass(["flex items-start justify-start w-full space-y-5",{"pr-[20px]":!o.isVisibleCardInfo}])},[a.createElementVNode("div",{style:a.normalizeStyle({height:`calc(100vh - ${((Te=t.$adminSettings)==null?void 0:Te.header)===!1?(rt=(nt=o.tableData)==null?void 0:nt.filterState)!=null&&rt.length?330:270:(Vt=(wt=o.tableData)==null?void 0:wt.filterState)!=null&&Vt.length?380:320}px)`}),class:"overflow-x-auto w-full [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},[a.createElementVNode("div",vZ,[d.isNoData?(a.openBlock(),a.createBlock(Ve,{key:1})):(a.openBlock(),a.createElementBlock("table",{key:0,class:a.normalizeClass([d.fontSize,"relative min-w-full my-2 divide-y divide-gray-200 table-fixed w-max dark:divide-neutral-700"])},[a.createElementVNode("thead",wZ,[a.createElementVNode("tr",kZ,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(d.columns,ht=>{var Tr,vi;return a.openBlock(),a.createBlock(J,{key:ht.name,style:a.normalizeStyle({width:((vi=(Tr=o.columnsWidth)==null?void 0:Tr[ht==null?void 0:ht.name])==null?void 0:vi.width)||d.rowWidth(ht==null?void 0:ht.name),textAlign:ht==null?void 0:ht.align,wordBreak:ht==null?void 0:ht.wrap}),data:ht,activeColumn:o.activeColumn,onUpdateRef:vr=>{var Ni,Bi;(Bi=(Ni=o.columnsWidth)==null?void 0:Ni[ht==null?void 0:ht.name])!=null&&Bi.ref||(o.columnsWidth[ht.name]={ref:vr})},onChangeActive:d.changeActiveColumn},null,8,["style","data","activeColumn","onUpdateRef","onChangeActive"])}),128)),(zt=(un=d.getActions)==null?void 0:un.filter(ht=>ht!=="add"&&ht!=="view"))!=null&&zt.length?(a.openBlock(),a.createElementBlock("th",EZ)):a.createCommentVNode("",!0)])]),a.createElementVNode("tbody",CZ,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((Bt=o.tableData)==null?void 0:Bt.rows,(ht,Tr)=>{var vi,vr,Ni,Bi,je,si,fr,oi,Vi,qe,Lt,At,wr,Gr;return a.openBlock(),a.createElementBlock("tr",{key:(ht==null?void 0:ht.id)||Tr,class:a.normalizeClass({"bg-gray-100":((vr=(vi=t.$route)==null?void 0:vi.query)==null?void 0:vr.card)===(ht==null?void 0:ht.id),"odd:bg-gray-50":((Bi=(Ni=t.$route)==null?void 0:Ni.query)==null?void 0:Bi.card)!==(ht==null?void 0:ht.id)})},[a.createElementVNode("td",{class:a.normalizeClass(["px-1 py-2.5 pr-5",[(je=d.columns[0])!=null&&je.align?`text-${((si=d.columns[0])==null?void 0:si.align)||"left"}`:""]]),onClick:Et=>d.changeActiveCardInfo(ht==null?void 0:ht.id)},[a.createElementVNode("button",{onClick:Et=>{d.pushToCard(ht==null?void 0:ht.id),d.pushToLinkCard(d.columns[0],ht)},class:a.normalizeClass(["font-medium text-start",[...d.getCustomStyles(d.columns[0]),((fr=this.tableData)==null?void 0:fr.card)===!1?"":` text-${d.color}-800 decoration-2 focus:outline-none focus:underline hover:text-${d.color}-700 hover:underline`]])},[a.createVNode(Q,{row:ht,column:d.columns[0],table:n.table,onUpdateTable:d.getTableData},null,8,["row","column","table","onUpdateTable"])],10,TZ)],10,SZ),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((oi=d.columns)==null?void 0:oi.slice(1),Et=>(a.openBlock(),a.createElementBlock("td",{onClick:zi=>{d.changeActiveCardInfo(ht==null?void 0:ht.id),d.pushToLinkCard(Et,ht)},class:a.normalizeClass(["px-1 py-2.5 pr-5",d.getCustomStyles(Et)]),key:Et.name},[a.createVNode(Q,{row:ht,column:Et,table:n.table,onUpdateTable:d.getTableData},null,8,["row","column","table","onUpdateTable"])],10,AZ))),128)),(qe=(Vi=d.getActions)==null?void 0:Vi.filter(Et=>Et!=="add"&&Et!=="view"))!=null&&qe.length?(a.openBlock(),a.createElementBlock("td",{key:0,class:a.normalizeClass(["text-center sticky right-0 w-[80px] px-[10px]",{"bg-gray-50":((At=(Lt=t.$route)==null?void 0:Lt.query)==null?void 0:At.card)===(ht==null?void 0:ht.id)||!(Tr%2),"bg-white":((Gr=(wr=t.$route)==null?void 0:wr.query)==null?void 0:Gr.card)!==(ht==null?void 0:ht.id)&&Tr%2}])},[a.createVNode(me,{actions:d.getActions,isForm:d.isForm,item:ht,table:n.table,onUpdateTable:d.getTableData},null,8,["actions","isForm","item","table","onUpdateTable"])],2)):a.createCommentVNode("",!0)],2)}),128))]),a.createVNode(Ee,{columns:d.columns,agg:(_n=o.tableData)==null?void 0:_n.agg},null,8,["columns","agg"])],2))])],4)],2),a.createElementVNode("div",DZ,[a.createElementVNode("div",MZ,[a.createElementVNode("p",IZ,[a.createElementVNode("span",PZ,[a.createTextVNode(" Об'єктів: "+a.toDisplayString(Intl.NumberFormat("ua").format(o.limit<((Ce=o.tableData)==null?void 0:Ce.filtered)?o.limit:((zn=o.tableData)==null?void 0:zn.filtered)||0))+" ",1),o.limit<((Vs=o.tableData)==null?void 0:Vs.filtered)?(a.openBlock(),a.createElementBlock("span",RZ," з "+a.toDisplayString(Intl.NumberFormat("ua").format(((tn=o.tableData)==null?void 0:tn.filtered)||0)),1)):a.createCommentVNode("",!0)])])]),Math.ceil((On=o.tableData)==null?void 0:On.filtered)>10?(a.openBlock(),a.createBlock(we,{key:0,class:"justify-end mr-10","default-page":parseInt(d.defaultPage),total:((zs=o.tableData)==null?void 0:zs.filtered)||0,onPageChange:d.handlePageChange,pageSize:parseInt(o.limit),pageSizes:[10,20,50,100]},null,8,["default-page","total","onPageChange","pageSize"])):a.createCommentVNode("",!0)])],2),a.createVNode(a.Transition,{name:"slide-fade"},{default:a.withCtx(()=>{var ht;return[o.isVisibleCardInfo?(a.openBlock(),a.createBlock(Re,{key:0,table:n.table,columns:(ht=o.tableData)==null?void 0:ht.columns,row:d.activeCardRow},null,8,["table","columns","row"])):a.createCommentVNode("",!0)]}),_:1})])])],4)])}const BZ={components:{AdminTable:Le(fZ,[["render",NZ],["__scopeId","data-v-ca941f11"]])},data(){return{table:!1,interface:"",search:""}},watch:{$route:{async handler(){ii!=null&&ii.value||await this.getMenu(),await this.checkPageType()},deep:!0},title(t){var e;t&&(document.title=(((e=et.value)==null?void 0:e.titlePrefix)||"")+t)}},async mounted(){await this.checkPageType()},methods:{flattenMenu(t){const e=[];return t.forEach(n=>{n.menu?e.push(...this.flattenMenu(n.menu)):e.push(n)}),e},async checkPageType(){var r,o;const t=this.flattenMenu(ii.value);t!=null&&t.length||this.$router.replace("/404");const e=t==null?void 0:t.find(d=>{var p,c;return(d==null?void 0:d.path)==((c=(p=this.$route)==null?void 0:p.params)==null?void 0:c.catchAll)});this.title=e==null?void 0:e.ua,e||this.$router.replace("/404"),e!=null&&e.component&&this.$router.replace((o=(r=this.$route)==null?void 0:r.params)==null?void 0:o.catchAll);const n=e==null?void 0:e.table;this.table=n||!1,this.search=(e==null?void 0:e.search)||"",!n&&this.getInterface()},async getInterface(){var t,e;try{const{data:n}=await Oe.get(`/api/template/interface/${((e=(t=this.$route)==null?void 0:t.params)==null?void 0:e.catchAll)||""}`);this.interface=n||""}catch{this.interface=""}}}},VZ=["innerHTML"];function zZ(t,e,n,r,o,d){const p=a.resolveComponent("AdminTable");return o.table?(a.openBlock(),a.createBlock(p,{key:0,table:o.table,title:t.title,search:o.search},null,8,["table","title","search"])):(a.openBlock(),a.createElementBlock("div",{key:1,class:"w-full bg-gray-50",style:{height:"calc(100vh - 120px)"},innerHTML:o.interface},null,8,VZ))}const OZ=Object.freeze(Object.defineProperty({__proto__:null,default:Le(BZ,[["render",zZ]])},Symbol.toStringTag,{value:"Module"}));return N2});
|
|
661
|
+
${t.toString()}`,type:"error"})}},async getFormScheme(){try{const{data:t}=await Oe.get("/api/template/form/admin.profile.form");this.formScheme=t.schema}catch(t){console.error(t)}}}},L9={class:"flex justify-center pt-[20px] pb-[20px] pl-[20px] h-[calc(100vh-58px)]"},F9={class:"bg-white rounded-xl p-[20px]"},$9={class:"flex-1 overflow-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},j9={class:"flex"};function U9(t,e,n,r,o,d){const p=a.resolveComponent("VsForm");return a.openBlock(),a.createElementBlock("div",L9,[a.createElementVNode("div",F9,[a.createTextVNode(a.toDisplayString(t.user)+" ",1),e[2]||(e[2]=a.createElementVNode("h2",{class:"mb-[20px] text-center"},"Профіль",-1)),a.createElementVNode("div",$9,[o.formScheme?(a.openBlock(),a.createBlock(p,{key:0,scheme:o.formScheme,modelValue:o.userData,"onUpdate:modelValue":e[0]||(e[0]=c=>o.userData=c),class:"pb-0"},null,8,["scheme","modelValue"])):a.createCommentVNode("",!0),a.createElementVNode("div",j9,[a.createElementVNode("button",{onClick:e[1]||(e[1]=(...c)=>d.updateUser&&d.updateUser(...c)),class:"ml-auto text-[18px] bg-blue-500 text-white px-[8px] py-[4px] rounded hover:bg-blue-700 duration-300"}," Зберегти ")])])])])}const H9=Object.freeze(Object.defineProperty({__proto__:null,default:Le(O9,[["render",U9]])},Symbol.toStringTag,{value:"Module"})),W9={};function q9(t,e,n,r,o,d){const p=a.resolveComponent("router-view");return a.openBlock(),a.createBlock(p)}const B2=Object.freeze(Object.defineProperty({__proto__:null,default:Le(W9,[["render",q9]])},Symbol.toStringTag,{value:"Module"})),G9={},Z9={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 Y9(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",Z9,[...e[0]||(e[0]=[a.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),a.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),a.createElementVNode("path",{d:"M9 12h12l-3 -3"},null,-1),a.createElementVNode("path",{d:"M18 15l3 -3"},null,-1)])])}const Oy=Le(G9,[["render",Y9]]),X9={},K9={viewBox:"0 0 1823 249",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function J9(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",K9,[...e[0]||(e[0]=[a.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 V2=Le(X9,[["render",J9]]),Q9={components:{IconChevronDown:Od},props:{route:Object,searchable:String},mounted(){var t,e;(e=(t=this.route)==null?void 0:t.menu)!=null&&e.some(n=>{var r,o;return(n==null?void 0:n.path)===this.$route.path.replace("/","")||((o=(r=this.$route)==null?void 0:r.params)==null?void 0:o.table)===(n==null?void 0:n.table)&&(n==null?void 0:n.table)})&&(this.isOpen=!0)},watch:{route:{immediate:!0,handler(t){t!=null&&t.open&&(this.isOpen=!0)}}},data(){return{isOpen:!1,arr:[]}},computed:{darkMode(){var t;return(t=et==null?void 0:et.value)==null?void 0:t.sidebarDark}},methods:{highLight(t){if(!this.searchable)return t;const e=this.searchable.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),n=new RegExp(`(${e})(\\s*)`,"gi");return t.replace(n,(r,o,d)=>`<span style="color:#1989fa;">${o}</span>${d}`)}}},eW={key:0,class:""},tW={key:0,class:"py-0.5 px-2 inline-flex items-center gap-x-1.5 text-xs font-medium bg-blue-100 text-blue-800 rounded-full dark:bg-blue-500/10 dark:text-blue-500"},nW={key:1},rW=["innerHTML"];function iW(t,e,n,r,o,d){var b,k,E,C,T,I,N,$,F,q,J,Q,me,Ee,Ve;const p=a.resolveComponent("IconChevronDown"),c=a.resolveComponent("router-link");return(b=n.route)!=null&&b.menu?(a.openBlock(),a.createElementBlock("div",eW,[a.createElementVNode("button",{onClick:e[0]||(e[0]=we=>o.isOpen=!o.isOpen),class:a.normalizeClass(["flex items-center justify-start w-full px-3 py-2 text-sm text-left text-gray-800 duration-300 border-none rounded-lg cursor-pointer gap-x-3 focus:outline-none hover:bg-gray-100",[((E=(k=n.route)==null?void 0:k.menu)==null?void 0:E.some(we=>{var Re,Ne;return(we==null?void 0:we.path)===t.$route.path.replace("/","")||(we==null?void 0:we.table)===((Ne=(Re=t.$route)==null?void 0:Re.params)==null?void 0:Ne.table)&&(we==null?void 0:we.table)}))&&(d.darkMode?"bg-white/10":"bg-gray-100"),{"text-white/80 hover:bg-white/10 hover:text-white/80 focus:bg-white/10":d.darkMode,"text-gray-800 hover:bg-gray-100 hover:text-gray-800 focus:bg-gray-100":!d.darkMode}]])},[a.createTextVNode(a.toDisplayString((C=n.route)==null?void 0:C.ua)+" ",1),(T=n.route)!=null&&T.new?(a.openBlock(),a.createElementBlock("span",tW,"Нове")):a.createCommentVNode("",!0),a.createVNode(p,{class:a.normalizeClass([[o.isOpen&&"-rotate-180"],"ml-auto duration-300 flex-shrink-0"]),width:"14",height:"14"},null,8,["class"])],2),a.createVNode(a.Transition,{name:"fade"},{default:a.withCtx(()=>{var we;return[a.withDirectives(a.createElementVNode("ul",{class:a.normalizeClass(["ml-[28px] pt-[6px] before:block before:absolute relative w-[calc(100%-28px)] flex-col gap-y-1.5 inline-flex before:w-[2px] before:h-[100%] before:left-[-10px] cursor-pointer",d.darkMode?"before:bg-white/10":"before:bg-gray-100"])},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((we=n.route)==null?void 0:we.menu,(Re,Ne)=>{var Ue,Xe;return a.openBlock(),a.createElementBlock("li",{key:Ne,class:"w-full"},[a.createVNode(c,{innerHTML:d.highLight(Re==null?void 0:Re.ua),to:"/"+(Re==null?void 0:Re.path),class:a.normalizeClass([[((Re==null?void 0:Re.path)===t.$route.path.replace("/","")||((Xe=(Ue=t.$route)==null?void 0:Ue.params)==null?void 0:Xe.table)===(Re==null?void 0:Re.table)&&(Re==null?void 0:Re.table))&&(d.darkMode?"bg-white/10":"bg-gray-100"),{"text-white/80 hover:bg-white/10 hover:text-white/80 focus:bg-white/10":d.darkMode,"text-gray-800 hover:bg-gray-100 hover:text-gray-800 focus:bg-gray-100":!d.darkMode}],"block px-3 py-2 text-sm rounded-lg focus:outline-none focus:bg-gray-100"])},null,8,["innerHTML","to","class"])])}),128))],2),[[a.vShow,o.isOpen]])]}),_:1})])):(I=n.route)!=null&&I.hidden?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",nW,[a.createVNode(c,{to:(($=(N=n.route)==null?void 0:N.path)==null?void 0:$[0])==="/"?(F=n.route)==null?void 0:F.path:"/"+((q=n.route)==null?void 0:q.path),class:a.normalizeClass([[(((J=n.route)==null?void 0:J.path.replace("/",""))===t.$route.path.replace("/","")||((me=(Q=t.$route)==null?void 0:Q.params)==null?void 0:me.table)===((Ee=n.route)==null?void 0:Ee.table)&&((Ve=n.route)==null?void 0:Ve.table))&&(d.darkMode?"bg-white/10":"bg-gray-100"),{"text-white/80 hover:bg-white/10 hover:text-white/80 focus:bg-white/10 ":d.darkMode,"text-gray-800 hover:bg-gray-100 hover:text-gray-800 focus:bg-gray-100 ":!d.darkMode}],"flex items-center w-full px-3 py-2 text-sm text-gray-800 duration-300 rounded-lg gap-x-3"])},{default:a.withCtx(()=>{var we;return[a.createElementVNode("span",{innerHTML:d.highLight((we=n.route)==null?void 0:we.ua)},null,8,rW)]}),_:1},8,["to","class"])]))}const sW=Le(Q9,[["render",iW]]),oW={},aW={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 lW(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",aW,[...e[0]||(e[0]=[a.createElementVNode("circle",{cx:"12",cy:"12",r:"10"},null,-1),a.createElementVNode("path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"},null,-1),a.createElementVNode("path",{d:"M12 17h.01"},null,-1)])])}const z2=Le(oW,[["render",lW]]),cW={},dW={class:"shrink-0 size-4 rounded-full",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function uW(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",dW,[...e[0]||(e[0]=[a.createStaticVNode('<g fill-rule="evenodd"><g stroke-width="1pt"><path fill="#bd3d44" d="M0 0h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0z" transform="scale(3.9385)"></path><path fill="#fff" d="M0 10h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0z" transform="scale(3.9385)"></path></g><path fill="#192f5d" d="M0 0h98.8v70H0z" transform="scale(3.9385)"></path><path fill="#fff" d="M8.2 3l1 2.8H12L9.7 7.5l.9 2.7-2.4-1.7L6 10.2l.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8H45l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.4 1.7 1 2.7L74 8.5l-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9L92 7.5l1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm-74.1 7l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7H65zm16.4 0l1 2.8H86l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm-74 7l.8 2.8h3l-2.4 1.7.9 2.7-2.4-1.7L6 24.2l.9-2.7-2.4-1.7h3zm16.4 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8H45l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9L92 21.5l1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm-74.1 7l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7H65zm16.4 0l1 2.8H86l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm-74 7l.8 2.8h3l-2.4 1.7.9 2.7-2.4-1.7L6 38.2l.9-2.7-2.4-1.7h3zm16.4 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8H45l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9L92 35.5l1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm-74.1 7l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7H65zm16.4 0l1 2.8H86l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm-74 7l.8 2.8h3l-2.4 1.7.9 2.7-2.4-1.7L6 52.2l.9-2.7-2.4-1.7h3zm16.4 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8H45l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9L92 49.5l1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm-74.1 7l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7H65zm16.4 0l1 2.8H86l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm-74 7l.8 2.8h3l-2.4 1.7.9 2.7-2.4-1.7L6 66.2l.9-2.7-2.4-1.7h3zm16.4 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8H45l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9L92 63.5l1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9z" transform="scale(3.9385)"></path></g>',1)])])}const hW=Le(cW,[["render",uW]]),pW={},fW={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1",width:"256",height:"256",viewBox:"0 0 256 256","xml:space":"preserve"};function mW(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",fW,[...e[0]||(e[0]=[a.createElementVNode("defs",null,null,-1),a.createElementVNode("g",{style:{stroke:"none","stroke-width":"0","stroke-dasharray":"none","stroke-linecap":"butt","stroke-linejoin":"miter","stroke-miterlimit":"10",fill:"none","fill-rule":"nonzero",opacity:"1"},transform:"translate(1.4065934065934016 1.4065934065934016) scale(2.81 2.81)"},[a.createElementVNode("path",{d:"M 45 90 C 20.147 90 0 69.853 0 45 h 90 C 90 69.853 69.853 90 45 90 z",style:{stroke:"none","stroke-width":"1","stroke-dasharray":"none","stroke-linecap":"butt","stroke-linejoin":"miter","stroke-miterlimit":"10",fill:"rgb(255,213,0)","fill-rule":"nonzero",opacity:"1"},transform:" matrix(1 0 0 1 0 0) ","stroke-linecap":"round"}),a.createElementVNode("path",{d:"M 45 0 C 20.147 0 0 20.147 0 45 h 90 C 90 20.147 69.853 0 45 0 z",style:{stroke:"none","stroke-width":"1","stroke-dasharray":"none","stroke-linecap":"butt","stroke-linejoin":"miter","stroke-miterlimit":"10",fill:"rgb(0,91,187)","fill-rule":"nonzero",opacity:"1"},transform:" matrix(1 0 0 1 0 0) ","stroke-linecap":"round"})],-1)])])}const gW=Le(pW,[["render",mW]]),yW={},_W={class:"shrink-0 size-3.5 text-gray-800 dark:text-neutral-200",xmlns:"http:.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function bW(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",_W,[...e[0]||(e[0]=[a.createElementVNode("polyline",{points:"20 6 9 17 4 12"},null,-1)])])}const xW={components:{IconQuestion:z2,IconUSA:hW,IconUkraine:gW,IconTick:Le(yW,[["render",bW]])},props:["docs","languages"],data(){return{currentLang:"ukraine",languagesOptions:[{titleEN:"English",titleUA:"Англійська",id:"english",icon:"IconUSA"},{titleEN:"Ukraine",titleUA:"Українська",id:"ukraine",icon:"IconUkraine"}]}},computed:{selectedLang(){return this.languagesOptions.find(t=>t.id===this.currentLang)},darkMode(){var t;return(t=et==null?void 0:et.value)==null?void 0:t.sidebarDark}},methods:{changeLang(t){this.$refs.langPopover.togglePopover(),this.currentLang=t}}},vW={class:"flex justify-center items-center gap-x-2"},wW=["onClick"],kW={class:"text-gray-800"},EW={class:"ms-auto"},CW={class:"truncate"};function SW(t,e,n,r,o,d){const p=a.resolveComponent("IconTick"),c=a.resolveComponent("VsPopover");return n.docs||n.languages?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["py-2 px-5 border-t dark:border-neutral-700",d.darkMode?"border-white/10 ":"border-gray-200"])},[a.createElementVNode("div",vW,[a.createVNode(c,{trigger:"click",placement:"top",ref:"langPopover"},{reference:a.withCtx(()=>{var b,k,E;return[a.createElementVNode("button",{type:"button","aria-expanded":"false",class:a.normalizeClass(["relative py-2 px-3 flex items-center gap-x-2 text-nowrap w-full cursor-pointer border rounded-full text-start text-sm text-gray-800 focus:outline-none",d.darkMode?"border-white/10 bg-transparent text-white/80 hover:bg-white/10 focus:bg-white/10":"border-gray-200 bg-white hover:bg-gray-100 focus:bg-gray-100"])},[a.createElementVNode("div",null,[(a.openBlock(),a.createBlock(a.resolveDynamicComponent((b=d.selectedLang)==null?void 0:b.icon),{class:"w-[16px] h-[16px] rounded-full"}))]),a.createElementVNode("span",CW,a.toDisplayString(o.currentLang==="ukraine"?(k=d.selectedLang)==null?void 0:k.titleUA:(E=d.selectedLang)==null?void 0:E.titleEN),1)],2)]}),default:a.withCtx(()=>[a.createElementVNode("div",null,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.languagesOptions,b=>(a.openBlock(),a.createElementBlock("button",{key:b.id,type:"button",onClick:k=>d.changeLang(b.id),class:a.normalizeClass(["flex items-center gap-x-2 cursor-pointer dark:hs-selected:bg-neutral-800 py-2 px-4 w-full text-sm text-gray-800 hover:bg-gray-100 rounded-lg focus:outline-none focus:bg-gray-100 dark:text-neutral-300 dark:hover:bg-neutral-800 dark:focus:bg-neutral-800 selected",(b==null?void 0:b.id)===o.currentLang?"bg-gray-100":""])},[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(b==null?void 0:b.icon),{class:"w-[16px] h-[16px] rounded-full"})),a.createElementVNode("div",kW,a.toDisplayString(o.currentLang==="ukraine"?b==null?void 0:b.titleUA:b==null?void 0:b.titleEN),1),a.createElementVNode("span",EW,[(b==null?void 0:b.id)===o.currentLang?(a.openBlock(),a.createBlock(p,{key:0})):a.createCommentVNode("",!0)])],10,wW))),128))])]),_:1},512)])],2)):a.createCommentVNode("",!0)}const O2=Le(xW,[["render",SW]]),TW={components:{IconLogout:Oy,NavbarItem:sW,IconLogo:V2,IconSearch:Pp,NavbarFooter:O2},data(){return{activeIndex:null,searchValue:""}},computed:{data(){var t;return(t=this.searchValue)!=null&&t.trim()?this.filterMenu(ii.value,this.searchValue):ii.value},logo(){var t,e,n;return((e=(t=this.$settings)==null?void 0:t.admin)==null?void 0:e.logo)||((n=et.value)==null?void 0:n.logo)||"/assets/logo.svg"},docs(){var t;return(t=et==null?void 0:et.value)==null?void 0:t.docs},languages(){var t;return(t=et==null?void 0:et.value)==null?void 0:t.languages},darkMode(){var t;return((t=et==null?void 0:et.value)==null?void 0:t.sidebarDark)||!1},darkColor(){var e,n,r;const t=((e=et==null?void 0:et.value)==null?void 0:e.sidebarColor)||((n=et==null?void 0:et.value)==null?void 0:n.color)||((r=et==null?void 0:et.value)!=null&&r.sidebarDark?"blue":"white");return t.includes("-")||t.includes("[")?t:t+"-950"}},watch:{"$route.path"(){this.$parent.showMenu=!1}},methods:{filterMenu(t,e){return t.map(n=>{var r,o;if(n.menu){const d=this.filterMenu(n.menu,e);if(d.length>0)return{...n,menu:d,open:!0}}else if((o=(r=n.ua)==null?void 0:r.toLowerCase())!=null&&o.includes(e.toLowerCase()))return n;return null}).filter(Boolean)}}},AW={class:"h-[46px] w-full px-5 lg:px-8 mb-[10px]"},DW={href:"/"},MW=["src"],IW={class:"px-2 lg:px-5"},PW={class:"px-2 lg:px-5 flex flex-col flex-wrap w-full pb-3"},RW={key:0,class:"flex flex-col gap-y-1"};function NW(t,e,n,r,o,d){var k;const p=a.resolveComponent("VsText"),c=a.resolveComponent("NavbarItem"),b=a.resolveComponent("NavbarFooter");return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["lg:flex lg:relative lg:left-0 flex-col h-[100vh] pt-3 border-r w-[260px] top-0 bottom-0 shrink-0 absolute transition left-[-100%] z-[11]",{"left-0":t.$parent.showMenu,["bg-"+d.darkColor]:d.darkColor,"bg-white":!d.darkMode&&!d.darkColor}])},[a.createElementVNode("div",AW,[a.createElementVNode("a",DW,[a.createElementVNode("img",{src:d.logo,class:"object-contain w-full h-full"},null,8,MW)])]),a.createElementVNode("div",IW,[a.createVNode(p,{type:"text",modelValue:o.searchValue,"onUpdate:modelValue":e[0]||(e[0]=E=>o.searchValue=E),clearable:!0,icon:"search","icon-position":"left",placeholder:"Пошук по меню",class:a.normalizeClass(["[&>input]:h-[38px]",{"[&>input]:bg-[#172554] [&>input]:text-white/80 [&>input]:placeholder:text-white/40 [&>input]:border [&>input]:border-white/50":d.darkMode,["[&>input]:bg-"+d.darkColor]:d.darkColor,["focus:[&>input]:border-"+d.darkColor+"-500"]:d.darkMode}])},null,8,["modelValue","class"])]),a.createElementVNode("div",{class:a.normalizeClass(["py-[10px] overflow-y-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500",d.languages||d.docs?"h-[calc(100vh-161px)]":"h-[calc(100vh-110px)]"])},[a.createElementVNode("nav",PW,[(k=d.data)!=null&&k.length?(a.openBlock(),a.createElementBlock("ul",RW,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(d.data,(E,C)=>(a.openBlock(),a.createElementBlock("li",{key:C,class:"flex flex-col gap-[6px]"},[a.createVNode(c,{route:E,searchable:o.searchValue},null,8,["route","searchable"])]))),128))])):(a.openBlock(),a.createElementBlock("div",{key:1,class:a.normalizeClass(["text-lg mt-[20px]",{"text-white/80":d.darkMode,"text-gray-800":!d.darkMode}])}," Не знайдено ",2))])],2),d.docs||d.languages?(a.openBlock(),a.createBlock(b,{key:0,docs:d.docs,languages:d.languages},null,8,["docs","languages"])):a.createCommentVNode("",!0)],2)}const L2=Le(TW,[["render",NW],["__scopeId","data-v-7817bab2"]]),BW={components:{IconChevronDown:Od},props:{route:Object,searchable:String},mounted(){var t,e;(e=(t=this.route)==null?void 0:t.menu)!=null&&e.some(n=>{var r,o;return(n==null?void 0:n.path)===this.$route.path.replace("/","")||((o=(r=this.$route)==null?void 0:r.params)==null?void 0:o.table)===(n==null?void 0:n.table)&&(n==null?void 0:n.table)})&&(this.isOpen=!0)},watch:{route:{immediate:!0,handler(t){t!=null&&t.open&&(this.isOpen=!0)}}},data(){return{isOpen:!1,arr:[]}},computed:{darkMode(){var t;return(t=et==null?void 0:et.value)==null?void 0:t.sidebarDark}},methods:{highLight(t){if(!this.searchable)return t;const e=this.searchable.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),n=new RegExp(`(${e})(\\s*)`,"gi");return t.replace(n,(r,o,d)=>`<span style="color:#1989fa;">${o}</span>${d}`)}}},VW={key:0,class:""},zW={key:0,class:"py-0.5 px-2 inline-flex items-center gap-x-1.5 text-xs font-medium bg-blue-100 text-blue-800 rounded-full dark:bg-blue-500/10 dark:text-blue-500"},OW={class:"ml-[28px] pt-[6px] before:block before:absolute relative w-[calc(100%-28px)] before:bg-gray-200 flex-col gap-y-1.5 inline-flex before:w-[2px] before:h-[100%] before:left-[-10px] cursor-pointer"},LW={key:1},FW=["innerHTML"];function $W(t,e,n,r,o,d){var b,k,E,C,T,I,N,$,F,q,J,Q,me,Ee,Ve;const p=a.resolveComponent("IconChevronDown"),c=a.resolveComponent("router-link");return(b=n.route)!=null&&b.menu?(a.openBlock(),a.createElementBlock("div",VW,[a.createElementVNode("button",{onClick:e[0]||(e[0]=we=>o.isOpen=!o.isOpen),class:a.normalizeClass(["flex items-center justify-start w-full px-3 py-2 text-sm text-left text-gray-800 duration-300 border-none rounded-lg cursor-pointer gap-x-3 focus:outline-none hover:bg-gray-200",[((E=(k=n.route)==null?void 0:k.menu)==null?void 0:E.some(we=>{var Re,Ne;return(we==null?void 0:we.path)===t.$route.path.replace("/","")||(we==null?void 0:we.table)===((Ne=(Re=t.$route)==null?void 0:Re.params)==null?void 0:Ne.table)&&(we==null?void 0:we.table)}))&&"bg-gray-200"]])},[a.createTextVNode(a.toDisplayString((C=n.route)==null?void 0:C.ua)+" ",1),(T=n.route)!=null&&T.new?(a.openBlock(),a.createElementBlock("span",zW,"Нове")):a.createCommentVNode("",!0),a.createVNode(p,{class:a.normalizeClass([[o.isOpen&&"-rotate-180"],"ml-auto duration-300"]),width:"14",height:"14"},null,8,["class"])],2),a.createVNode(a.Transition,{name:"fade"},{default:a.withCtx(()=>{var we;return[a.withDirectives(a.createElementVNode("ul",OW,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((we=n.route)==null?void 0:we.menu,(Re,Ne)=>{var Ue,Xe;return a.openBlock(),a.createElementBlock("li",{key:Ne,class:"w-full"},[a.createVNode(c,{innerHTML:d.highLight(Re==null?void 0:Re.ua),to:"/"+(Re==null?void 0:Re.path),class:a.normalizeClass([[((Re==null?void 0:Re.path)===t.$route.path.replace("/","")||((Xe=(Ue=t.$route)==null?void 0:Ue.params)==null?void 0:Xe.table)===(Re==null?void 0:Re.table)&&(Re==null?void 0:Re.table))&&"bg-gray-200"],"block px-3 py-2 text-sm rounded-lg focus:outline-none hover:bg-gray-200 focus:bg-gray-200"])},null,8,["innerHTML","to","class"])])}),128))],512),[[a.vShow,o.isOpen]])]}),_:1})])):(I=n.route)!=null&&I.hidden?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",LW,[a.createVNode(c,{to:(($=(N=n.route)==null?void 0:N.path)==null?void 0:$[0])==="/"?(F=n.route)==null?void 0:F.path:"/"+((q=n.route)==null?void 0:q.path),class:a.normalizeClass([[(((J=n.route)==null?void 0:J.path.replace("/",""))===t.$route.path.replace("/","")||((me=(Q=t.$route)==null?void 0:Q.params)==null?void 0:me.table)===((Ee=n.route)==null?void 0:Ee.table)&&((Ve=n.route)==null?void 0:Ve.table))&&"bg-gray-200"],"flex items-center w-full px-3 py-2 text-sm text-gray-800 duration-300 rounded-lg gap-x-3 hover:bg-gray-200 focus:bg-gray-200"])},{default:a.withCtx(()=>{var we;return[a.createElementVNode("span",{innerHTML:d.highLight((we=n.route)==null?void 0:we.ua)},null,8,FW)]}),_:1},8,["to","class"])]))}const jW=Le(BW,[["render",$W]]),UW={class:"relative w-fit mx-auto"},HW={key:0,class:"w-60 duration absolute top-full left-0 z-20 bg-white rounded-xl shadow-xl block"},WW={class:"p-1"},qW={__name:"navbar-gray-dropdown",setup(t){const e=a.ref(!1);return a.onMounted(()=>{document.addEventListener("click",n=>{n.target.closest(".navbar-gray-dropdown")||(e.value=!1)})}),(n,r)=>{var d;const o=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("div",UW,[a.createElementVNode("button",{onClick:r[0]||(r[0]=p=>e.value=!e.value),type:"button",class:"py-1 px-2 navbar-gray-dropdown inline-flex justify-center items-center gap-x-1 font-semibold rounded-lg text-gray-800 hover:text-purple-600 focus:outline-hidden focus:text-purple-600 disabled:opacity-50 disabled:pointer-events-none dark:text-neutral-300 dark:hover:text-purple-500 dark:focus:text-purple-500"},[a.createTextVNode(a.toDisplayString((d=n.$user)==null?void 0:d.user_name)+" ",1),a.createVNode(Rp,{width:"16",height:"16"})]),e.value?(a.openBlock(),a.createElementBlock("div",HW,[a.createElementVNode("div",WW,[r[2]||(r[2]=a.createElementVNode("a",{class:"flex items-center gap-x-3 py-2 px-3 rounded-lg text-sm text-gray-800 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-hidden focus:bg-gray-100 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",href:"#"}," Профіль ",-1)),a.createVNode(o,{class:"flex items-center gap-x-3 py-2 px-3 rounded-lg text-sm text-gray-800 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-hidden focus:bg-gray-100 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",to:"/admin.settings"},{default:a.withCtx(()=>[...r[1]||(r[1]=[a.createTextVNode(" Налаштування ",-1)])]),_:1})]),r[3]||(r[3]=a.createElementVNode("div",{class:"p-1 border-t border-gray-200 dark:border-neutral-700"},[a.createElementVNode("a",{class:"flex items-center gap-x-3 py-2 px-3 rounded-lg text-sm text-gray-800 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-hidden focus:bg-gray-100 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",href:"/logout"}," Вийти ")],-1))])):a.createCommentVNode("",!0)])}}},GW={class:"p-4 flex flex-col justify-center border-b relative max-h-[192px]"},ZW={components:{IconLogout:Oy,NavbarItem:jW,IconLogo:V2,IconSearch:Pp,NavbarFooter:O2,NavbarUser:{__name:"navbar-gray-user",setup(t){return(e,n)=>(a.openBlock(),a.createElementBlock("div",GW,[a.createVNode(yg,{class:"!absolute top-[8px] right-[8px]",placement:"left"}),n[0]||(n[0]=a.createElementVNode("div",{class:"flex size-24 justify-center items-center shrink-0 rounded-full overflow-hidden mx-auto mb-2"},[a.createElementVNode("img",{class:"object-cover h-[130px] w-[130px]",src:"https://media.istockphoto.com/id/1337144146/vector/default-avatar-profile-icon-vector.jpg?s=612x612&w=0&k=20&c=BIbFwuv7FxTWvh5S3vB6bkT0Qv8Vn8N5Ffseq84ClGI=",alt:"Avatar"})],-1)),a.createVNode(qW)]))}}},data(){return{activeIndex:null,searchValue:""}},computed:{data(){var t;return(t=this.searchValue)!=null&&t.trim()?this.filterMenu(ii.value,this.searchValue):ii.value},logo(){var t,e,n;return((e=(t=this.$settings)==null?void 0:t.admin)==null?void 0:e.logo)||((n=et.value)==null?void 0:n.logo)||"/assets/logo.svg"},docs(){var t;return(t=et==null?void 0:et.value)==null?void 0:t.docs},languages(){var t;return(t=et==null?void 0:et.value)==null?void 0:t.languages},darkMode(){var t;return((t=et==null?void 0:et.value)==null?void 0:t.sidebarDark)||!1},darkColor(){var e,n,r;const t=((e=et==null?void 0:et.value)==null?void 0:e.sidebarColor)||((n=et==null?void 0:et.value)==null?void 0:n.color)||((r=et==null?void 0:et.value)!=null&&r.sidebarDark?"blue":"white");return t.includes("-")||t.includes("[")?t:t+"-950"}},watch:{"$route.path"(){this.$parent.showMenu=!1}},methods:{filterMenu(t,e){return t.map(n=>{var r,o;if(n.menu){const d=this.filterMenu(n.menu,e);if(d.length>0)return{...n,menu:d,open:!0}}else if((o=(r=n.ua)==null?void 0:r.toLowerCase())!=null&&o.includes(e.toLowerCase()))return n;return null}).filter(Boolean)}}},YW={class:"px-2 lg:px-5 flex flex-col flex-wrap w-full pb-3"},XW={key:0,class:"flex flex-col gap-y-1"},KW={class:"h-[55px] border-t w-full px-5 shrink-0 lg:px-5 flex items-center"},JW={href:"/"},QW=["src"];function eq(t,e,n,r,o,d){var b;const p=a.resolveComponent("NavbarUser"),c=a.resolveComponent("NavbarItem");return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["lg:flex lg:relative lg:left-0 flex-col h-[100vh] border-r w-[260px] bg-gray-100 top-0 bottom-0 shrink-0 absolute transition left-[-100%] z-[11]",{"left-0":t.$parent.showMenu}])},[a.createVNode(p),a.createElementVNode("div",{class:a.normalizeClass(["py-[10px] overflow-y-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500",d.languages||d.docs?"h-[calc(100vh-161px)]":"h-[calc(100vh-110px)]"])},[a.createElementVNode("nav",YW,[(b=d.data)!=null&&b.length?(a.openBlock(),a.createElementBlock("ul",XW,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(d.data,(k,E)=>(a.openBlock(),a.createElementBlock("li",{key:E,class:"flex flex-col gap-[6px]"},[a.createVNode(c,{route:k,searchable:o.searchValue},null,8,["route","searchable"])]))),128))])):(a.openBlock(),a.createElementBlock("div",{key:1,class:a.normalizeClass(["text-lg mt-[20px]",{"text-white/80":d.darkMode,"text-gray-800":!d.darkMode}])}," Не знайдено ",2))])],2),a.createElementVNode("div",KW,[a.createElementVNode("a",JW,[a.createElementVNode("img",{src:d.logo,class:"object-contain max-h-[40px]"},null,8,QW)])])],2)}const tq=Le(ZW,[["render",eq],["__scopeId","data-v-3cea82a7"]]),nq={__name:"navbar",setup(t){const e={default:L2,gray:tq},n=a.computed(()=>{var r;return e[(r=et.value)==null?void 0:r.navbar]||L2});return(r,o)=>(a.openBlock(),a.createBlock(a.resolveDynamicComponent(n.value)))}},rq={components:{IconQuestion:z2,IconUser:Vv,AdminNotification:yg,IconUserOutline:Pv,IconLogout:Oy},data(){return{userData:null,isVisible:!1}},computed:{headerBadgeTitle(){var t;return(t=et.value)==null?void 0:t.headerBadge},headerBadgeColor(){var t;return(t=et.value)==null?void 0:t.headerBadgeColor}},watch:{isVisible(t){t?setTimeout(()=>window.addEventListener("click",this.closeOnOutsideClick),0):window.removeEventListener("click",this.closeOnOutsideClick)}},created(){this.userData=this.$user,Ry.value=this.$settings},methods:{async logout(){try{await Oe.get("/logout"),await window.history.pushState({},"","/login"),await location.reload(),localStorage.removeItem("user")}catch{}},closeOnOutsideClick(){this.isVisible=!1}},beforeUnmount(){window.removeEventListener("click",this.closeOnOutsideClick)}},iq={class:"flex items-center gap-[6px]"},sq={href:"/docs-user",class:"size-[38px] inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent text-gray-500 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-100 dark:text-neutral-400 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"},oq={href:"/docs-user",class:"size-[38px] inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent text-gray-500 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-100 dark:text-neutral-400 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"},aq={class:"relative"},lq=["src"],cq={key:1,class:"size-[40px] rounded-full bg-gray-200 flex items-center justify-center"},dq=["src"],uq={key:1,class:"flex items-center justify-center bg-gray-200 rounded-full size-10"},hq={class:"grow"},pq={class:"block text-sm font-medium text-gray-800 dark:text-neutral-200"},fq={class:"text-xs text-gray-500 dark:text-neutral-500"},mq={class:"flex flex-col space-y-0.5"};function gq(t,e,n,r,o,d){const p=a.resolveComponent("IconQuestion"),c=a.resolveComponent("VsPopover"),b=a.resolveComponent("AdminNotification"),k=a.resolveComponent("IconUser"),E=a.resolveComponent("router-link"),C=a.resolveComponent("IconUserOutline"),T=a.resolveComponent("IconLogout");return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["h-[58px] border-b flex items-center px-[20px]",d.headerBadgeTitle?"justify-between":"justify-end"])},[d.headerBadgeTitle?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["py-1.5 px-2.5 flex justify-center items-center text-white hover:bg-gray-900 focus:bg-gray-900 dark:bg-neutral-100 dark:text-neutral-800 dark:hover:bg-white dark:focus:bg-white.class text-nowrap text-xs sm:text-[13px] rounded-lg disabled:opacity-50 disabled:pointer-events-none focus:outline-none dark:text-neutral-400",{["bg-"+d.headerBadgeColor]:d.headerBadgeColor,"bg-gray-800":!d.headerBadgeColor}])},a.toDisplayString(d.headerBadgeTitle),3)):a.createCommentVNode("",!0),a.createElementVNode("div",{class:"flex lg:hidden",onClick:e[0]||(e[0]=I=>t.$parent.showMenu=!0)},[...e[4]||(e[4]=[a.createStaticVNode('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-menu-2"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M4 6l16 0"></path><path d="M4 12l16 0"></path><path d="M4 18l16 0"></path></svg>',1)])]),a.createElementVNode("div",iq,[a.createVNode(c,{trigger:"hover"},{reference:a.withCtx(()=>[a.createElementVNode("a",sq,[a.createVNode(p,{height:"24",width:"24"})])]),default:a.withCtx(()=>[e[5]||(e[5]=a.createTextVNode(" Допомога ",-1))]),_:1}),a.createVNode(c,{trigger:"hover"},{reference:a.withCtx(()=>[a.createElementVNode("a",oq,[a.createVNode(b)])]),default:a.withCtx(()=>[e[6]||(e[6]=a.createTextVNode(" Сповіщення ",-1))]),_:1}),e[12]||(e[12]=a.createElementVNode("div",{class:"h-[30px] w-[1px] bg-gray-200 ml-[10px] mr-[10px]"},null,-1)),a.createElementVNode("div",aq,[a.createElementVNode("div",{onClick:e[1]||(e[1]=I=>o.isVisible=!0),class:"cursor-pointer"},[a.createVNode(c,{trigger:"hover"},{reference:a.withCtx(()=>{var I,N,$,F;return[(N=(I=o.userData)==null?void 0:I.user)!=null&&N.avatar?(a.openBlock(),a.createElementBlock("img",{key:0,class:"flex-shrink-0 size-[30px] rounded-full",src:(F=($=o.userData)==null?void 0:$.user)==null?void 0:F.avatar,alt:"Image Description"},null,8,lq)):(a.openBlock(),a.createElementBlock("div",cq,[a.createVNode(k)]))]}),default:a.withCtx(()=>[e[7]||(e[7]=a.createTextVNode(" Профіль ",-1))]),_:1})]),o.isVisible?(a.openBlock(),a.createElementBlock("div",{key:0,onClick:e[3]||(e[3]=a.withModifiers(()=>{},["stop"])),class:"fixed p-2 bg-white w-[240px] top-[55px] right-[20px] rounded-xl z-[1] shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] dark:shadow-[0_10px_40px_10px_rgba(0,0,0,0.2)] dark:bg-neutral-900 block"},[a.createVNode(E,{to:"profile",disabled:!0,class:"py-2 px-2.5 flex items-center gap-3 rounded-lg hover:bg-gray-100 focus:outline-none focus:bg-gray-100 dark:hover:bg-neutral-800 dark:focus:bg-neutral-800"},{default:a.withCtx(()=>{var I,N,$,F,q,J,Q,me,Ee,Ve;return[(N=(I=o.userData)==null?void 0:I.user)!=null&&N.avatar?(a.openBlock(),a.createElementBlock("img",{key:0,class:"rounded-full shrink-0 size-10",src:(F=($=o.userData)==null?void 0:$.user)==null?void 0:F.avatar,alt:"Image Description"},null,8,dq)):(a.openBlock(),a.createElementBlock("div",uq,[a.createVNode(k,{class:"w-[16px]"})])),a.createElementVNode("div",hq,[a.createElementVNode("span",pq,a.toDisplayString(((J=(q=o.userData)==null?void 0:q.user)==null?void 0:J.username)||((me=(Q=o.userData)==null?void 0:Q.user)==null?void 0:me.user_name)||"User User"),1),a.createElementVNode("p",fq,a.toDisplayString(((Ve=(Ee=o.userData)==null?void 0:Ee.user)==null?void 0:Ve.email)||"email не вказано"),1)])]}),_:1}),e[10]||(e[10]=a.createElementVNode("div",{class:"my-2 mx-2.5 h-px bg-gray-200 dark:bg-neutral-700"},null,-1)),a.createElementVNode("ul",mq,[a.createElementVNode("li",null,[a.createVNode(E,{to:"profile",class:"w-full flex items-center gap-x-3.5 py-2 px-2.5 text-sm text-gray-800 rounded-lg hover:bg-gray-100 focus:outline-none focus:bg-gray-100 dark:text-white dark:hover:bg-neutral-800 dark:focus:bg-neutral-800",disabled:"true"},{default:a.withCtx(()=>[a.createVNode(C,{class:"size-4"}),e[8]||(e[8]=a.createTextVNode(" Профіль ",-1))]),_:1})])]),e[11]||(e[11]=a.createElementVNode("div",{class:"my-2 mx-2.5 h-px bg-gray-200 dark:bg-neutral-700"},null,-1)),a.createElementVNode("p",null,[a.createElementVNode("button",{type:"button",onClick:e[2]||(e[2]=(...I)=>d.logout&&d.logout(...I)),class:"w-full flex items-center gap-x-3.5 py-2 px-2.5 text-sm text-gray-800 rounded-lg hover:bg-gray-100 hover:text-red-500 focus:outline-none focus:bg-gray-100 focus:text-red-500 dark:text-white dark:hover:bg-neutral-800 dark:focus:bg-neutral-800 dark:hover:text-red-500 dark:focus:text-red-500"},[a.createVNode(T,{class:"size-4"}),e[9]||(e[9]=a.createTextVNode(" Вийти ",-1))])])])):a.createCommentVNode("",!0)])])],2)}const yq={components:{navbar:nq,AdminHeader:Le(rq,[["render",gq]])},data(){return{showMenu:!1}},computed:{isMenu(){return ii.value||null},header(){var t,e;return((t=et.value)==null?void 0:t.header)===!1?!1:((e=et.value)==null?void 0:e.header)||"admin-header"}}},_q={class:"admin-wrapper"},bq={class:"flex flex-col w-full"};function xq(t,e,n,r,o,d){const p=a.resolveComponent("navbar"),c=a.resolveComponent("router-view");return a.openBlock(),a.createElementBlock("div",_q,[a.createVNode(p),o.showMenu?(a.openBlock(),a.createElementBlock("div",{key:0,onClick:e[0]||(e[0]=b=>o.showMenu=!1),class:"z-[10] lg:hidden transition duration fixed inset-0 bg-gray-900 bg-opacity-50 dark:bg-opacity-80 dark:bg-neutral-900"})):a.createCommentVNode("",!0),a.createElementVNode("div",bq,[d.isMenu?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[d.header?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(d.header),{key:0})):a.createCommentVNode("",!0),a.createVNode(c)],64)):a.createCommentVNode("",!0)])])}const vq=Object.freeze(Object.defineProperty({__proto__:null,default:Le(yq,[["render",xq],["__scopeId","data-v-804a7309"]])},Symbol.toStringTag,{value:"Module"})),wq={data(){return{currentSort:""}},props:{data:{type:Object,default:()=>null},activeColumn:{type:String}},mounted(){this.$emit("update-ref",this.$refs.column)},computed:{label(){var t,e;return((t=this.data)==null?void 0:t.ua)||((e=this.data)==null?void 0:e.label)||this.data.title||"null"},selectedSortParam(){var t,e;return(e=(t=this.$route)==null?void 0:t.query)==null?void 0:e.sort},getVisibleIcon(){return this.data.format!=="image"&&this.data.format!=="verify"}},watch:{activeColumn(t){t!==this.data.name&&(this.currentSort="")}},methods:{changeCurrentSort(t){switch(t){case"":return"asc";case"asc":return"desc";case"desc":return"";default:return""}},handleClickSortBtn(t){this.$emit("change-active",this.data.name),this.currentSort=this.changeCurrentSort(t);const e=this.$route.query,{sort:n,...r}=e,o=this.currentSort?`${this.data.name}-${this.currentSort}`:"";this.$router.replace({query:{...r,...o&&{sort:o}}})},isValueEqualToSelected(t){return`${this.data.name}-${t}`===this.selectedSortParam}}},kq={scope:"col",class:"text-start",ref:"column"},Eq={class:"w-[24px]"},Cq={key:1,class:"flex items-center px-1 py-3 font-medium text-gray-800 text-start gap-x-1 dark:text-neutral-200"};function Sq(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("th",kq,[d.getVisibleIcon?(a.openBlock(),a.createElementBlock("button",{key:0,type:"button",class:"flex items-center px-1 py-2 font-medium text-gray-800 text-start gap-x-1 dark:text-neutral-200",onClick:e[0]||(e[0]=p=>d.handleClickSortBtn(o.currentSort))},[a.createTextVNode(a.toDisplayString(d.label)+" ",1),a.createElementVNode("span",Eq,[o.currentSort?(a.openBlock(),a.createElementBlock("svg",{key:0,class:a.normalizeClass(["shrink-0 size-3.5",{"rotate-180":o.currentSort==="asc"}]),xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[...e[1]||(e[1]=[a.createElementVNode("path",{d:"m5 12 7-7 7 7"},null,-1),a.createElementVNode("path",{d:"M12 19V5"},null,-1)])],2)):a.createCommentVNode("",!0)])])):(a.openBlock(),a.createElementBlock("p",Cq,a.toDisplayString(d.label),1))],512)}const Tq=Le(wq,[["render",Sq]]),Aq={},Dq={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-link"};function Mq(t,e){return a.openBlock(),a.createElementBlock("svg",Dq,[...e[0]||(e[0]=[a.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),a.createElementVNode("path",{d:"M9 15l6 -6"},null,-1),a.createElementVNode("path",{d:"M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464"},null,-1),a.createElementVNode("path",{d:"M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463"},null,-1)])])}const Iq={components:{IconMore:pg,IconDelete:fg,IconEdit:mg,IconLink:Le(Aq,[["render",Mq]])},emits:["updateTable"],props:{item:Object,table:String,isForm:null,actions:Array,default:()=>[]},data(){return{formVisible:!1,isDeleteConfirm:!1,formValue:{},top:0,left:0}},computed:{getCustomActions(){return this.actions.filter(t=>typeof t=="object")}},methods:{openConfirm(){this.isDeleteConfirm=!0,document.querySelector("body").click()},async getData(){var t;try{const{data:e}=await Oe.get(`/api/table/${this.table}/${(t=this.item)==null?void 0:t.id}`);this.formValue=e}catch(e){console.error(e)}},doSomethingOnCancel(){this.formVisible=!1},async deleteElement(){var t,e;try{const{data:n}=await Oe.get(`/api/form/${this.table}/${(t=this.item)==null?void 0:t.id}`);await Oe.delete(`/api/table/${n==null?void 0:n.token}`),await this.$notify({title:"Успішно!",message:"Об`єкт успішно видалeно",type:"success"}),await this.$emit("update-table")}catch(n){this.$notify({title:"Помилка!",message:(e=n==null?void 0:n.response)==null?void 0:e.data,type:"error"})}finally{this.isDeleteConfirm=!1}},async customButtonAction(t){var e,n,r;document.querySelector("body").click(),t!=null&&t.form?(await this.$v3plugin.$form({form:t==null?void 0:t.form,id:(e=this.item)==null?void 0:e.id,api:t==null?void 0:t.api,title:t==null?void 0:t.title}),await this.$emit("update-table")):t!=null&&t.api?(await this.$v3plugin.$api({confirm:t==null?void 0:t.confirm,api:t==null?void 0:t.api,method:t==null?void 0:t.method,id:(n=this.item)==null?void 0:n.id,isId:(t==null?void 0:t.isId)||!1}),await this.$emit("update-table")):t!=null&&t.href&&this.$router.push((t==null?void 0:t.href)+((r=this.item)==null?void 0:r.id))}}},Pq={class:"inline-flex"},Rq={class:"inline-flex items-center justify-center bg-white border rounded-lg shadow-sm size-7 gap-x-2 border-stone-200 text-stone-800 hover:bg-stone-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-50"},Nq={class:"flex flex-col items-start"},Bq=["onClick"],Vq={class:"text-gray-800"},zq={key:1,class:"h-[1px] w-[80%] bg-gray-200 ml-auto mr-auto"},Oq={class:"flex justify-end p-[16px] pr-0 gap-x-3"};function Lq(t,e,n,r,o,d){const p=a.resolveComponent("IconMore"),c=a.resolveComponent("IconEdit"),b=a.resolveComponent("router-link"),k=a.resolveComponent("IconLink"),E=a.resolveComponent("IconDelete"),C=a.resolveComponent("VsPopover"),T=a.resolveComponent("VsConfirm");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",Pq,[a.createVNode(C,{trigger:"click",placement:"bottom-left"},{reference:a.withCtx(()=>[a.createElementVNode("button",Rq,[a.createVNode(p,{height:"16",width:"16"})])]),default:a.withCtx(()=>{var I,N,$,F,q;return[a.createElementVNode("div",Nq,[(I=n.actions)!=null&&I.includes("edit")&&n.isForm?(a.openBlock(),a.createBlock(b,{key:0,to:`/edit?table=${($=(N=t.$route)==null?void 0:N.params)==null?void 0:$.catchAll}&id=${(F=n.item)==null?void 0:F.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:a.withCtx(()=>[a.createVNode(c,{color:"#000"}),e[4]||(e[4]=a.createTextVNode(" Редагувати ",-1))]),_:1},8,["to"])):a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(d.getCustomActions,(J,Q)=>(a.openBlock(),a.createElementBlock("button",{key:Q,onClick:me=>d.customButtonAction(J),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"},[J!=null&&J.href?(a.openBlock(),a.createBlock(k,{key:0,class:"size-3.5"})):a.createCommentVNode("",!0),a.createElementVNode("span",Vq,a.toDisplayString(J==null?void 0:J.label),1)],8,Bq))),128)),n.isForm?(a.openBlock(),a.createElementBlock("div",zq)):a.createCommentVNode("",!0),(q=n.actions)!=null&&q.includes("del")?(a.openBlock(),a.createElementBlock("button",{key:2,onClick:e[0]||(e[0]=a.withModifiers((...J)=>d.openConfirm&&d.openConfirm(...J),["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"},[a.createVNode(E),e[5]||(e[5]=a.createElementVNode("span",{class:"text-gray-800"},"Видалити",-1))])):a.createCommentVNode("",!0)])]}),_:1})]),a.createVNode(T,{visible:o.isDeleteConfirm,"onUpdate:visible":e[3]||(e[3]=I=>o.isDeleteConfirm=I),size:"small",title:"Ви впевнені?"},{default:a.withCtx(()=>[e[6]||(e[6]=a.createElementVNode("p",{class:"mt-1 text-sm text-gray-600 dark:text-neutral-400"}," Ви впевнені, що хочете видалити цей об'єкт? ",-1)),a.createElementVNode("div",Oq,[a.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-xs font-medium duration-300 border rounded-lg shadow-sm hover:bg-gray-100 gap-x-2 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50",onClick:e[1]||(e[1]=I=>o.isDeleteConfirm=!1)}," Скасувати "),a.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-xs font-medium text-white duration-300 bg-red-500 rounded-lg gap-x-2 hover:bg-red-700 disabled:opacity-50 disabled:pointer-events-none",onClick:e[2]||(e[2]=(...I)=>d.deleteElement&&d.deleteElement(...I))}," Так, я впевнена(ий) ")])]),_:1},8,["visible"])],64)}const Fq=Le(Iq,[["render",Lq]]),$q={},jq={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 Uq(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",jq,[...e[0]||(e[0]=[a.createElementVNode("path",{d:"m3 16 4 4 4-4"},null,-1),a.createElementVNode("path",{d:"M7 20V4"},null,-1),a.createElementVNode("path",{d:"m21 8-4-4-4 4"},null,-1),a.createElementVNode("path",{d:"M17 4v16"},null,-1)])])}const Hq=Le($q,[["render",Uq]]),Wq={},qq={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-rosette-discount-check"};function Gq(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",qq,[...e[0]||(e[0]=[a.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),a.createElementVNode("path",{d:"M5 7.2a2.2 2.2 0 0 1 2.2 -2.2h1a2.2 2.2 0 0 0 1.55 -.64l.7 -.7a2.2 2.2 0 0 1 3.12 0l.7 .7c.412 .41 .97 .64 1.55 .64h1a2.2 2.2 0 0 1 2.2 2.2v1c0 .58 .23 1.138 .64 1.55l.7 .7a2.2 2.2 0 0 1 0 3.12l-.7 .7a2.2 2.2 0 0 0 -.64 1.55v1a2.2 2.2 0 0 1 -2.2 2.2h-1a2.2 2.2 0 0 0 -1.55 .64l-.7 .7a2.2 2.2 0 0 1 -3.12 0l-.7 -.7a2.2 2.2 0 0 0 -1.55 -.64h-1a2.2 2.2 0 0 1 -2.2 -2.2v-1a2.2 2.2 0 0 0 -.64 -1.55l-.7 -.7a2.2 2.2 0 0 1 0 -3.12l.7 -.7a2.2 2.2 0 0 0 .64 -1.55v-1"},null,-1),a.createElementVNode("path",{d:"M9 12l2 2l4 -4"},null,-1)])])}const Zq={components:{IconExport:Hq,IconChevronDown:Od,IconSuccess:Le(Wq,[["render",Gq]])},props:{table:String,columns:Array,page:[String,Number],filterCustom:String,filterState:String,filters:String},data(){return{isOpen:!1,tableFormats:["json","csv","xlsx"],format:"",cols:[],activeAction:"",isSuccessTemplate:!1,actions:[{name:"choceAll",function:this.choceAll,label:"Вибрати усі"},{name:"choceVisible",function:this.choceVisible,label:"Вибрати поточні"},{name:"clearAll",function:this.clearAll,label:"Жодного"}],es:null,progress:0}},watch:{isOpen(t){t||(this.format="",this.cols=[],this.activeAction="",this.isSuccessTemplate=!1)}},computed:{color(){return et.value.buttonColor||"blue"}},methods:{async downloadBlob(t){const e=await Oe.get(t||"/api/export",{params:{table:this.table,format:this.format,cols:this.cols.join(","),page:this.page,filter:this.filters||null,state:this.filterState||null,custom:this.filterCustom||null},responseType:"blob"}),n=new Blob([e.data],{type:"application/octet-stream"}),r=document.createElement("a");r.href=URL.createObjectURL(n),r.download=`${this.table.split(".")[0]}.${this.format}`,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(r.href),this.isSuccessTemplate=!0,this.$notify({type:"success",title:"Експорт",message:"Файл успішно експортовано!"})},async exportTable(){var e;try{await Oe.get("/api/export",{params:{table:this.table,format:this.format,cols:this.cols.join(","),page:this.page,filter:this.filters||null,state:this.filterState||null,custom:this.filterCustom||null,stream:!0},validateStatus:n=>n===200}),await this.downloadBlob();return}catch{}const t=new URLSearchParams({table:this.table,format:this.format,cols:this.cols.join(","),page:this.page,filter:this.filters||"",state:this.filterState||"",custom:this.filterCustom||""});(e=this.es)==null||e.close(),this.es=new EventSource(`/api/export?${t.toString()}`),this.es.addEventListener("progress",n=>{try{const{percent:r}=JSON.parse(n.data);this.progress=r}catch{console.log("progress",n.data)}}),this.es.addEventListener("done",async n=>{this.es.close(),this.es=null;const{url:r}=JSON.parse(n.data||"{}");await this.downloadBlob(r)}),this.es.onerror=n=>{var r;console.error("SSE error",n),this.$notify({type:"error",title:"Помилка",message:"Потік експорту перервано."}),(r=this.es)==null||r.close()}},selectFormat(t){this.format=t},choceAll(){var t;this.cols=(t=this.columns)==null?void 0:t.map(e=>e==null?void 0:e.name),this.activeAction="choceAll"},clearAll(){this.cols=[],this.activeAction="clearAll"},choceVisible(){var t,e;this.cols=(e=(t=this.columns)==null?void 0:t.filter(n=>(n==null?void 0:n.hidden)!==!0))==null?void 0:e.map(n=>n==null?void 0:n.name),this.activeAction="choceVisible"}}},Yq={key:0,class:"flex flex-col items-center"},Xq={key:1,class:"p-4"},Kq={class:"pb-5 mb-5 border-b border-gray-200 last:pb-0 last:mb-0 last:border-b-0 dark:border-neutral-700"},Jq={class:"flex items-center gap-[10px] -ml-[10px] my-[10px]"},Qq=["onClick"],eG={key:0,class:"block h-[8px] w-[8px] rounded-full bg-blue-500"},tG={class:"mt-2 flex row flex-wrap gap-y-[5px] gap-x-[10px]"},nG={class:"pb-5 mb-5 border-b border-gray-200 last:pb-0 last:mb-0 last:border-b-0 dark:border-neutral-700"},rG={class:"mt-2 space-y-2"},iG=["id","onChange"],sG=["for"],oG={key:0,class:"flex w-full justify-end p-[20px] gap-[6px] border-t"},aG={key:1,class:"flex w-full justify-end p-[20px] gap-[6px] border-t"};function lG(t,e,n,r,o,d){const p=a.resolveComponent("IconExport"),c=a.resolveComponent("IconSuccess"),b=a.resolveComponent("VsCheckbox"),k=a.resolveComponent("VsDialog");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("button",{onClick:e[0]||(e[0]=E=>o.isOpen=!0),class:"py-2 max-h-[34px] px-2.5 md:inline-flex hidden items-center gap-x-1.5 text-xs font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"},[a.createVNode(p,{height:"16",width:"16"}),e[7]||(e[7]=a.createTextVNode(" Експорт ",-1))]),a.createVNode(k,{visible:o.isOpen,"onUpdate:visible":e[6]||(e[6]=E=>o.isOpen=E),title:"Експорт таблиці",size:"small",closeClickBack:!0},{footer:a.withCtx(()=>[o.isSuccessTemplate?(a.openBlock(),a.createElementBlock("div",oG,[a.createElementVNode("button",{type:"button",class:"inline-flex items-center justify-center px-3 py-2 text-sm font-medium text-gray-800 align-middle bg-white border border-gray-200 rounded-lg shadow-sm text-nowrap text-start hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",onClick:e[2]||(e[2]=E=>o.isOpen=!1)}," Закрити "),a.createElementVNode("button",{type:"button",class:"inline-flex items-center justify-center px-3 py-2 text-sm font-medium text-white align-middle bg-blue-600 border border-blue-600 rounded-lg shadow-sm text-nowrap gap-x-2 text-start hover:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:ring-1 focus:ring-blue-300 dark:focus:ring-blue-500",onClick:e[3]||(e[3]=E=>o.isSuccessTemplate=!1)}," Вигрузити ще ")])):(a.openBlock(),a.createElementBlock("div",aG,[a.createElementVNode("button",{type:"button",class:"inline-flex items-center justify-center px-3 py-2 text-sm font-medium text-gray-800 align-middle bg-white border border-gray-200 rounded-lg shadow-sm text-nowrap text-start hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",onClick:e[4]||(e[4]=E=>o.isOpen=!1)}," Скасувати "),a.createElementVNode("button",{type:"button",class:a.normalizeClass(`inline-flex items-center justify-center px-3 py-2 text-sm font-medium text-white align-middle bg-${d.color}-700 rounded-lg shadow-sm text-nowrap gap-x-2 text-start hover:bg-${d.color}-800 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:ring-1 focus:ring-${d.color}-300 dark:focus:ring-${d.color}-500`),onClick:e[5]||(e[5]=(...E)=>d.exportTable&&d.exportTable(...E))}," Завантажити таблицю ",2)]))]),default:a.withCtx(()=>[o.isSuccessTemplate?(a.openBlock(),a.createElementBlock("div",Yq,[a.createVNode(c,{height:"100",width:"100",class:"text-green-200 mb-[20px]"}),e[8]||(e[8]=a.createElementVNode("h2",null,"Звіт сформовано і збережено",-1))])):(a.openBlock(),a.createElementBlock("div",Xq,[a.createElementVNode("div",Kq,[e[9]||(e[9]=a.createElementVNode("h2",{class:"text-sm font-[600] text-gray-500"}," Виберіть стовпці таблиці для експорту: ",-1)),a.createElementVNode("div",Jq,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.actions,E=>(a.openBlock(),a.createElementBlock("button",{key:E==null?void 0:E.name,onClick:E==null?void 0:E.function,class:"inline-flex items-center gap-[8px] justify-center px-3 py-2 text-sm font-medium text-gray-800 align-middle bg-white border-gray-200 text-nowrap text-start"},[a.createElementVNode("span",{class:a.normalizeClass(["h-[14px] w-[14px] border rounded-full flex items-center justify-center",{"border-blue-500":(E==null?void 0:E.name)===o.activeAction}])},[(E==null?void 0:E.name)===o.activeAction?(a.openBlock(),a.createElementBlock("span",eG)):a.createCommentVNode("",!0)],2),a.createTextVNode(" "+a.toDisplayString(E==null?void 0:E.label),1)],8,Qq))),128))]),a.createElementVNode("div",tG,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.columns,(E,C)=>(a.openBlock(),a.createElementBlock("div",{class:"flex items-center",key:C,style:{width:"calc((100% - 10px) / 2)"}},[a.createVNode(b,{class:"[&>label]:text-sm [&>label]:text-gray-800 [&>label]:ms-3 !gap-x-[1px] !p-0",modelValue:o.cols,"onUpdate:modelValue":e[1]||(e[1]=T=>o.cols=T),value:E==null?void 0:E.name,label:E==null?void 0:E.ua},null,8,["modelValue","value","label"])]))),128))])]),a.createElementVNode("div",nG,[e[10]||(e[10]=a.createElementVNode("h2",{class:"text-sm font-[600] text-gray-500"}," Виберіть формат таблиці: ",-1)),a.createElementVNode("div",rG,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.tableFormats,(E,C)=>(a.openBlock(),a.createElementBlock("div",{class:"flex items-center",key:C},[a.createElementVNode("input",{type:"radio",name:"hs-pro-duecmfm",class:"text-blue-600 border-gray-300 rounded-full shrink-0 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-500 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-800",id:E,onChange:T=>d.selectFormat(E)},null,40,iG),a.createElementVNode("label",{for:E,class:"text-sm text-gray-800 ms-3 dark:text-neutral-400"}," Формат "+a.toDisplayString(E),9,sG)]))),128))])])]))]),_:1},8,["visible"])],64)}const cG=Le(Zq,[["render",lG]]),dG={},uG={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-minus"};function hG(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",uG,[...e[0]||(e[0]=[a.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),a.createElementVNode("path",{d:"M5 12l14 0"},null,-1)])])}const pG={components:{IconPlus:Gl,IconMinus:Le(dG,[["render",hG]])},props:{title:String,defaultValue:{type:Boolean,default:()=>!1}},data(){return{expanded:this.defaultValue}}},fG={class:"hs-accordion"},mG={class:"py-0.5 flex items-center gap-x-0.5 w-full"},gG={class:"text-sm font-medium"},yG={class:"relative inline-block w-full duration-150 cursor-pointer before:block before:absolute b"};function _G(t,e,n,r,o,d){const p=a.resolveComponent("IconPlus"),c=a.resolveComponent("IconMinus");return a.openBlock(),a.createElementBlock("div",null,[a.createElementVNode("div",null,[a.createElementVNode("div",fG,[a.createElementVNode("div",mG,[a.createElementVNode("div",{onClick:e[0]||(e[0]=b=>o.expanded=!o.expanded),class:"rounded-md cursor-pointer grow"},[a.createElementVNode("span",gG,a.toDisplayString(n.title),1)]),a.createElementVNode("button",{class:"flex items-center justify-center rounded-md size-6 hover:bg-gray-100",onClick:e[1]||(e[1]=b=>o.expanded=!o.expanded)},[o.expanded?(a.openBlock(),a.createBlock(c,{key:1,width:"14"})):(a.openBlock(),a.createBlock(p,{key:0}))])]),a.createVNode(a.Transition,{name:"fade"},{default:a.withCtx(()=>[a.withDirectives(a.createElementVNode("div",yG,[a.renderSlot(t.$slots,"default",{},void 0,!0)],512),[[a.vShow,o.expanded]])]),_:3})])])])}const bG={components:{AdminComponentIs:Ed,AdminTree:Le(pG,[["render",_G],["__scopeId","data-v-c6318482"]]),VsNoData:Ya,VsWidgetComments:Mv,VsWidgetMap:Um,VsWidgetFileList:Dv},props:{table:String,columns:Array,row:Object}},xG={class:"pl-2 hs-accordion w-[360px] shrink-0 overflow-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar:horizontal]:h-[8px] [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500",style:{height:"calc(100vh - 229px)"}},vG={style:{height:"calc(100vh - 360px)"},class:"pl-2"},wG={class:"flow-root mt-[10px]"},kG={class:"divide-y divide-gray-100 text-[12px]"},EG={class:"grid grid-cols-1 gap-1 py-3 even:bg-gray-50 sm:grid-cols-3 sm:gap-4"},CG={class:"font-medium text-gray-900"},SG={class:"text-gray-700 sm:col-span-2"};function TG(t,e,n,r,o,d){var k,E,C,T;const p=a.resolveComponent("AdminComponentIs"),c=a.resolveComponent("VsWidgetFileList"),b=a.resolveComponent("VsNoData");return a.openBlock(),a.createElementBlock("div",xG,[e[0]||(e[0]=a.createElementVNode("div",{class:"pl-[10px] py-[9px]"},[a.createElementVNode("h2",{class:"text-sm font-medium text-center"},"Інформація про об'єкт")],-1)),a.createElementVNode("div",vG,[(E=(k=t.$route)==null?void 0:k.query)!=null&&E.card?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createElementVNode("div",wG,[a.createElementVNode("dl",kG,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.columns,I=>(a.openBlock(),a.createElementBlock("div",EG,[a.createElementVNode("dt",CG,a.toDisplayString((I==null?void 0:I.ua)||(I==null?void 0:I.title)),1),a.createElementVNode("dd",SG,[a.createVNode(p,{row:n.row,column:I,table:n.table},null,8,["row","column","table"])])]))),256))])]),(a.openBlock(),a.createBlock(c,{key:(C=n.row)==null?void 0:C.id,id:(T=n.row)==null?void 0:T.id,class:"mt-10"},null,8,["id"]))],64)):(a.openBlock(),a.createBlock(b,{key:1,text:"Оберіть один з об'єктів в таблиці для відображення інформаціі про нього"}))])])}const AG=Le(bG,[["render",TG]]),DG={emits:["filterChange"],props:{scheme:{type:Object},onFilters:{type:Number},table:{type:String}},components:{IconFilter:Rv},data(){return{isFilters:!1}},methods:{closeFilter({target:t}){this.isFilters&&t.classList.contains("filter-container")&&(this.isFilters=!1)}}},MG={key:0,class:"px-[7px] text-[10px] py-[1px] font-[700] text-white bg-blue-500 rounded-full"},IG={class:"filter-content h-screen bg-white w-[400px] overflow-x-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar:horizontal]:h-[8px] [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"};function PG(t,e,n,r,o,d){const p=a.resolveComponent("IconFilter"),c=a.resolveComponent("VsFilter");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("button",{onClick:e[0]||(e[0]=b=>o.isFilters=!o.isFilters),class:"py-2 px-2.5 max-h-[34px] inline-flex items-center gap-x-1.5 text-xs font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none"},[a.createVNode(p,{height:"16",width:"16"}),e[4]||(e[4]=a.createTextVNode(" Фільтри ",-1)),n.onFilters?(a.openBlock(),a.createElementBlock("span",MG,a.toDisplayString(n.onFilters),1)):a.createCommentVNode("",!0)]),a.createVNode(a.Transition,{name:"fade"},{default:a.withCtx(()=>{var b;return[(a.openBlock(),a.createBlock(a.Teleport,{to:"#modal"},[a.withDirectives(a.createElementVNode("div",{onClick:e[3]||(e[3]=(...k)=>d.closeFilter&&d.closeFilter(...k)),style:{height:"100vh"},class:"fixed filter-container top-0 flex justify-end items-center z-[12] right-0 left-0 bottom-0 bg-[rgba(0,0,0,0.2)]"},[a.createElementVNode("div",IG,[(b=n.scheme)!=null&&b.length?(a.openBlock(),a.createBlock(c,{key:0,ref:"filter",scheme:n.scheme,layout:"default","apply-vue-router":"",history:"",name:"filter",footer:!0,background:!0,onFilterChange:e[1]||(e[1]=k=>t.$emit("filterChange",k)),closeFilterBtn:!0,onFilterClose:e[2]||(e[2]=k=>o.isFilters=!1)},null,8,["scheme"])):a.createCommentVNode("",!0)])],512),[[a.vShow,o.isFilters]])]))]}),_:1})],64)}const RG=Le(DG,[["render",PG]]),NG={props:{tabsList:{type:Array,default:()=>[]},filterState:String}},BG={class:"relative flex space-x-1 mb-[20px] after:absolute after:w-[99%] after:bottom-0 after:inset-x-0 after:border-b-2 after:border-gray-200 dark:after:border-neutral-700","aria-label":"Tabs",role:"tablist","aria-orientation":"horizontal"},VG=["onClick"];function zG(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("nav",BG,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.tabsList,p=>(a.openBlock(),a.createElementBlock("button",{onClick:c=>t.$emit("update:filterState",p==null?void 0:p.name),class:a.normalizeClass(["hs-tab-active:after:bg-gray-800 hs-tab-active:text-gray-800 px-2.5 py-1.5 mb-2 relative inline-flex justify-center items-center gap-x-2 hover:bg-gray-100 text-gray-500 hover:text-gray-800 text-sm rounded-lg disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-100 after:absolute after:-bottom-2 after:inset-x-0 after:z-10 after:h-0.5 after:pointer-events-none dark:hs-tab-active:text-neutral-200 dark:hs-tab-active:after:bg-neutral-400 dark:text-neutral-500 dark:hover:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700 active",{" font-semibold after:absolute after:bottom-[-8px] after:left-2.5 after:right-2.5 after:z-10 after:h-0.5 after:bg-gray-800":(p==null?void 0:p.name)===n.filterState}])},a.toDisplayString(p==null?void 0:p.label),11,VG))),256))])}const OG=Le(NG,[["render",zG]]),LG={},FG={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-filter"};function $G(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",FG,[...e[0]||(e[0]=[a.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),a.createElementVNode("path",{d:"M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z"},null,-1)])])}const jG={components:{IconFilter2:Le(LG,[["render",$G]]),IconCheck2:Dl},props:{filterCustom:String,customList:Array}},UG={class:"py-2 max-h-[34px] px-2.5 inline-flex items-center gap-x-1.5 text-xs font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"},HG={class:"flex flex-col p-[2px] gap-[2px] w-[170px]"},WG=["onClick"],qG={class:"text-sm text-gray-800"};function GG(t,e,n,r,o,d){const p=a.resolveComponent("IconFilter2"),c=a.resolveComponent("IconCheck2"),b=a.resolveComponent("VsPopover");return a.openBlock(),a.createBlock(b,{ref:"popover",placement:"bottom"},{reference:a.withCtx(()=>[a.createElementVNode("button",UG,[a.createVNode(p,{height:"20",width:"20"})])]),default:a.withCtx(()=>[a.createElementVNode("div",HG,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.customList,(k,E)=>(a.openBlock(),a.createElementBlock("button",{onClick:C=>{var T;t.$emit("update:filterCustom",k==null?void 0:k.name),(T=t.$refs)==null||T.popover.togglePopover()},key:E,class:a.normalizeClass(["flex items-center px-3 py-1 rounded-md cursor-pointer group hover:bg-gray-100",{"bg-gray-100":n.filterCustom===(k==null?void 0:k.name)}])},[a.createElementVNode("span",qG,a.toDisplayString(k==null?void 0:k.label),1),n.filterCustom===(k==null?void 0:k.name)?(a.openBlock(),a.createBlock(c,{key:0,class:"ml-auto size-3 shrink-0"})):a.createCommentVNode("",!0)],10,WG))),128)),a.createElementVNode("button",{class:"flex items-center px-3 py-1 rounded-md cursor-pointer group hover:bg-gray-100",onClick:e[0]||(e[0]=k=>{var E;t.$emit("update:filterCustom",void 0),(E=t.$refs)==null||E.popover.togglePopover()})}," Скинути фільтри ")])]),_:1},512)}const ZG=Le(jG,[["render",GG]]),YG={class:"flex items-center gap-x-2"},XG={__name:"admin-table-custom-buttons",props:{slots:Object,data:Object},setup(t){var c,b,k,E,C;const{asyncTemplateSlot:e}=(C=(E=(k=(b=(c=a.getCurrentInstance())==null?void 0:c.appContext)==null?void 0:b.app)==null?void 0:k.config)==null?void 0:E.globalProperties)==null?void 0:C.utils,n=a.ref(""),r=a.ref(""),o=t,d=()=>{var T,I,N,$,F;if((T=o.slots)!=null&&T.panelLeft||(r.value="div"),(N=(I=o.slots)==null?void 0:I.panelLeft)!=null&&N.includes("<")){const q=e("PanelLeft",($=o.slots)==null?void 0:$.panelLeft,["name"]);r.value=q}else r.value=(F=o.slots)==null?void 0:F.panelLeft},p=()=>{var T,I,N,$,F;if((T=o.slots)!=null&&T.panelRight||(n.value="div"),(N=(I=o.slots)==null?void 0:I.panelRight)!=null&&N.includes("<")){const q=e("PanelRight",($=o.slots)==null?void 0:$.panelRight,["name"]);n.value=q}else n.value=(F=o.slots)==null?void 0:F.panelRight};return d(),p(),(T,I)=>(a.openBlock(),a.createElementBlock("div",YG,[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(r.value),{data:t.data},null,8,["data"])),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(n.value),{data:t.data},null,8,["data"]))]))}},KG={__name:"admin-custom-button-add",props:{slots:Object},setup(t){var d,p,c,b,k;const{asyncTemplateSlot:e}=(k=(b=(c=(p=(d=a.getCurrentInstance())==null?void 0:d.appContext)==null?void 0:p.app)==null?void 0:c.config)==null?void 0:b.globalProperties)==null?void 0:k.utils,n=a.ref(""),r=t;return(()=>{var E,C,T,I,N;if((E=r.slots)!=null&&E.addButton||(n.value="div"),(T=(C=r.slots)==null?void 0:C.addButton)!=null&&T.includes("<")){const $=e("addButton",(I=r.slots)==null?void 0:I.addButton,["IconPlus"]);n.value=$}else n.value=(N=r.slots)==null?void 0:N.addButton})(),(E,C)=>n.value?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(n.value),{key:0,IconPlus:Gl})):a.createCommentVNode("",!0)}},JG={key:0,class:"px-1 py-3 text-gray-800 font-[500]"},QG={key:1,class:"px-1 py-3 text-gray-800 font-[700]"},eZ={__name:"admin-table-totals-list",props:{columns:{type:Array,default:()=>[]},agg:{type:Object,default:()=>{}}},setup(t){return(e,n)=>(a.openBlock(),a.createElementBlock("tr",null,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.columns,r=>{var o;return a.openBlock(),a.createElementBlock(a.Fragment,{key:r==null?void 0:r.name},[(o=t.agg)!=null&&o[r==null?void 0:r.name]?(a.openBlock(),a.createElementBlock("td",JG,[a.createVNode(Ed,{column:r,row:t.agg},null,8,["column","row"])])):(a.openBlock(),a.createElementBlock("td",QG))],64)}),128))]))}},tZ={},nZ={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-check"};function rZ(t,e,n,r,o,d){return a.openBlock(),a.createElementBlock("svg",nZ,[...e[0]||(e[0]=[a.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),a.createElementVNode("path",{d:"M5 12l5 5l10 -10"},null,-1)])])}const iZ=Le(tZ,[["render",rZ]]),sZ=a.defineComponent({components:{IconChevronDown:Rp,IconCheck:iZ},props:{total:{type:Number,default:()=>0},pageSize:{type:Number,default:()=>20},maxPages:{type:Number,default:()=>10},defaultPage:{type:Number,default:()=>1},pageSizes:{type:Array,default:[]}},data(){return{page:1,pages:[],isDropdownOpen:!1,pageSizeLocal:null}},mounted(){this.pageSizeLocal=this.pageSize},watch:{total:{immediate:!0,handler(){this.initPages()}},defaultPage:{immediate:!0,handler(t){this.page=t,this.updatePages(t)}},pageSizeLocal(t,e){e&&(this.isDropdownOpen=!1,this.setCurrentPage(1))}},computed:{pagesCount(){return Math.ceil(this.total/this.pageSizeLocal)},disableNextClick(){return this.page>=this.pagesCount},disablePrevClick(){return this.page<=1}},methods:{initPages(){if(this.total<=0){this.pages=[1];return}this.updatePages(this.page)},handleSetPage(t){const e=t.replace(/\D/g,"");if(e>this.pagesCount){this.$refs.currentPage.innerText=this.page;return}else this.$refs.currentPage.innerText=e;this.setCurrentPage(e)},updatePages(t){const e=Math.floor(this.maxPages/2);let n=Math.max(t-e,1),r=n+this.maxPages-1;r>this.pagesCount&&(r=this.pagesCount,n=Math.max(r-this.maxPages+1,1)),this.pages=Array.from({length:r-n+1},(o,d)=>n+d)},handleClickPrev(){this.disablePrevClick||(this.setCurrentPage(this.page-1),this.updatePages(this.page),this.$emit("prevClick"))},handleClickNext(){this.disableNextClick||(this.setCurrentPage(parseInt(this.page)+1),this.updatePages(this.page),this.$emit("nextClick"))},setCurrentPage(t){this.page=t,this.$emit("pageChange",this.page,this.pageSizeLocal),this.updatePages(t)},keydownEnter(t){t.preventDefault(),t.target.blur()}}}),oZ={class:"flex items-center w-full"},aZ={class:"flex items-center mx-[8px]"},lZ={class:"min-h-[38px] flex justify-center items-center text-stone-500 py-2 px-1.5 text-sm"},cZ={key:0,class:"flex items-center justify-center ml-3 gap-x-5"},dZ={class:"relative"},uZ={class:"z-50 bg-white shadow-md rounded-lg p-1 space-y-0.5 dark:bg-neutral-800 dark:border dark:border-neutral-700 dark:divide-neutral-700 absolute bottom-[100%]"},hZ=["onClick"];function pZ(t,e,n,r,o,d){const p=a.resolveComponent("IconChevronDown"),c=a.resolveComponent("IconCheck");return a.openBlock(),a.createElementBlock("nav",oZ,[a.createElementVNode("button",{type:"button",onClick:e[0]||(e[0]=(...b)=>t.handleClickPrev&&t.handleClickPrev(...b)),class:a.normalizeClass(["min-h-[38px] min-w-[38px] py-2 px-2.5 inline-flex justify-center items-center gap-x-2 text-sm rounded-lg text-stone-800 hover:bg-stone-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-100",{"opacity-50 pointer-events-none":t.disablePrevClick}])},[a.createVNode(p,{height:"16",width:"16",class:"rotate-90"})],2),a.createElementVNode("div",aZ,[a.createElementVNode("span",{ref:"currentPage",contenteditable:"true",onKeydown:e[1]||(e[1]=a.withKeys((...b)=>t.keydownEnter&&t.keydownEnter(...b),["enter"])),onBlur:e[2]||(e[2]=b=>t.handleSetPage(b.target.innerText)),class:"min-h-[38px] max-h-[38px] overflow-hidden min-w-[38px] flex justify-center items-center bg-stone-100 text-stone-800 py-2 px-3 outline-blue-600 text-sm rounded-lg disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:text-white"},a.toDisplayString(t.page),545),e[5]||(e[5]=a.createElementVNode("span",{class:"min-h-[38px] flex justify-center items-center text-stone-500 py-2 px-1.5 text-sm"},"з",-1)),a.createElementVNode("span",lZ,a.toDisplayString(t.pagesCount),1)]),a.createElementVNode("button",{type:"button",onClick:e[3]||(e[3]=(...b)=>t.handleClickNext&&t.handleClickNext(...b)),class:a.normalizeClass([{"opacity-50 pointer-events-none":t.disableNextClick},"min-h-[38px] min-w-[38px] py-2 px-2.5 inline-flex justify-center items-center gap-x-2 text-sm rounded-lg text-stone-800 hover:bg-stone-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-100"])},[a.createVNode(p,{height:"16",width:"16",class:"-rotate-90"})],2),t.pageSizes.length?(a.openBlock(),a.createElementBlock("div",cZ,[a.createElementVNode("div",dZ,[a.withDirectives(a.createElementVNode("div",uZ,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.pageSizes,b=>(a.openBlock(),a.createElementBlock("button",{type:"button",class:"w-full flex items-center gap-x-3.5 py-2 px-3 rounded-lg text-sm",onClick:k=>t.pageSizeLocal=b},[a.createTextVNode(a.toDisplayString(b)+" ",1),b===t.pageSizeLocal?(a.openBlock(),a.createBlock(c,{key:0,width:"14",height:"14",class:"text-blue-600"})):a.createCommentVNode("",!0)],8,hZ))),256))],512),[[a.vShow,t.isDropdownOpen]]),t.pageSizes.length?(a.openBlock(),a.createElementBlock("button",{key:0,type:"button",class:"text-sm h-[32px] min-w-8 py-3 px-3.5 inline-flex items-center gap-x-1 rounded-lg border border-gray-200 text-gray-800 shadow-sm hover:bg-gray-50 focus:outline-none focus:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none dark:border-neutral-700 dark:text-white dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",onClick:e[4]||(e[4]=b=>t.isDropdownOpen=!t.isDropdownOpen)},[a.createTextVNode(a.toDisplayString(t.pageSizeLocal)+" ",1),a.createVNode(p,{height:"16",width:"16"})])):a.createCommentVNode("",!0)])])):a.createCommentVNode("",!0)])}const fZ={props:{table:String,title:String,search:String},components:{AdminTableControl:Fq,AdminTableExport:cG,AdminTableColumnsHidden:Bv,AdminTableColumn:Tq,AdminNodata:gg,IconPlus:Gl,IconSearch:Pp,AdminTableCardInfo:AG,IconOpenCard:A2,AdminComponentIs:Ed,AdminTableFilters:RG,AdminTableTabs:OG,AdminTableCustomFilters:ZG,AdminTableCustomButtons:XG,AdminCustomButtonAdd:KG,AdminTableTotalsList:eZ,AdminTablePagination:Le(sZ,[["render",pZ]])},data(){return{tableData:{},filterScheme:[],page:1,searchValue:"",limit:0,filters:null,activeColumn:"",isVisibleCardInfo:!1,onFilters:0,filterState:null,filterCustom:null,visibleColumns:[],initialHiddenColumns:"",columnsWidth:{}}},async mounted(){await this.checkUrlMounted(),await this.getTableData(),await this.getFilters(),window.addEventListener("reloadTablePage",this.getTableData)},unmounted(){window.removeEventListener("reloadTablePage",this.getTableData)},computed:{color(){return et.value.buttonColor||"blue"},fontSize(){return`text-[${et.value.fontSize||13}px]`},defaultPage(){var t,e;return((e=(t=this.$route)==null?void 0:t.query)==null?void 0:e.page)||1},columns(){var t,e;return(e=(t=this.tableData)==null?void 0:t.columns)==null?void 0:e.filter(n=>(n==null?void 0:n.hidden)!==!0)},isForm(){var t,e,n,r,o;return((t=this.tableData)==null?void 0:t.form)&&(((n=(e=this.tableData)==null?void 0:e.actions)==null?void 0:n.includes("add"))||((o=(r=this.tableData)==null?void 0:r.actions)==null?void 0:o.includes("edit")))},isNoData(){var t,e;return!((t=this.tableData)!=null&&t.rows)||!((e=this.columns)!=null&&e.length)},activeCardRow(){var t,e;return((e=(t=this.tableData)==null?void 0:t.rows)==null?void 0:e.find(n=>{var r,o;return(n==null?void 0:n.id)===((o=(r=this.$route)==null?void 0:r.query)==null?void 0:o.card)}))||{}},getActions(){var t;return(t=this.tableData)==null?void 0:t.actions}},watch:{searchValue:{handler:Ny(async function(t){var e;this.page=1,await this.getTableData(),this.$router.push({...this.$route,query:{...(e=this.$route)==null?void 0:e.query,search:t||void 0,page:1}})},500)},$route:{async handler(t,e){var n,r;((n=t==null?void 0:t.params)==null?void 0:n.catchAll)!==((r=e==null?void 0:e.params)==null?void 0:r.catchAll)&&(this.visibleColumns=[],this.tableData=null,this.columnsWidth={},this.unmountedData(),this.getFilters(),await this.getTableData())},deep:!0},limit(t){var e;this.$router.replace({...this.$route,query:{...(e=this.$route)==null?void 0:e.query,limit:t}})},filterState(t){var e;t&&(this.$router.replace({...this.$route,query:{...(e=this.$route)==null?void 0:e.query,state:t}}),this.getTableData())},filterCustom(t){var e;this.$router.replace({...this.$route,query:{...(e=this.$route)==null?void 0:e.query,custom:t}}),this.getTableData()},columns(t){var e,n,r,o;this.visibleColumns=t==null?void 0:t.map(d=>d==null?void 0:d.name),this.initialHiddenColumns===((e=this.visibleColumns)==null?void 0:e.join(","))&&(this.visibleColumns=[]),this.$router.replace({...this.$route,query:{...(n=this.$route)==null?void 0:n.query,columns:(r=this.visibleColumns)!=null&&r.length?(o=this.visibleColumns)==null?void 0:o.join(","):void 0}})}},methods:{async checkUrlMounted(){var t,e,n,r,o,d,p,c,b,k,E,C,T,I,N,$,F,q,J,Q,me;this.page=((e=(t=this.$route)==null?void 0:t.query)==null?void 0:e.page)||1,this.limit=((r=(n=this.$route)==null?void 0:n.query)==null?void 0:r.limit)||20,(d=(o=this.$route)==null?void 0:o.query)!=null&&d.filter&&(this.filters=((b=decodeURI((c=(p=this.$route)==null?void 0:p.query)==null?void 0:c.filter))==null?void 0:b.replaceAll("+"," "))||null),this.filters&&(this.onFilters=((E=(k=this.filters)==null?void 0:k.split("="))==null?void 0:E.length)-1),this.filterState=((T=(C=this.$route)==null?void 0:C.query)==null?void 0:T.state)||null,this.filterCustom=((N=(I=this.$route)==null?void 0:I.query)==null?void 0:N.custom)||null,this.searchValue=((F=($=this.$route)==null?void 0:$.query)==null?void 0:F.search)||"",this.visibleColumns=((Q=(J=(q=this.$route)==null?void 0:q.query)==null?void 0:J.columns)==null?void 0:Q.split(","))||[],(me=this.$route)!=null&&me.query.card&&(this.isVisibleCardInfo=!0)},rowWidth(t){var n,r;const e=(r=(n=this.tableData)==null?void 0:n.columns)==null?void 0:r.find(o=>o.name===t);if(e){const o=e==null?void 0:e.width;return typeof o=="number"?`${o}px`:o!=null&&o.includes("px")?o:`${o}px`}},unmountedData(){this.page=1,this.visibleColumns=[],this.filterCustom=null,this.filterState=null,this.isVisibleCardInfo=!1,this.filterScheme=null,this.filters=null,this.onFilters=0,this.searchValue=""},async getTableData(){var t,e,n,r,o,d,p,c,b,k,E;try{const{data:C}=await Oe.get(`/api/template/table/${this.table}`),T=await Oe.get(`/api/table-data/${this.table}`,{params:{page:this.page,search:this.searchValue||null,limit:this.limit,filter:this.filters||null,order:((e=(t=this.$route)==null?void 0:t.query)==null?void 0:e.sort)||null,state:this.filterState||null,custom:this.filterCustom||null}});this.tableData={...C,...(T==null?void 0:T.data)||{}},this.initialHiddenColumns=(d=(o=(r=(n=this.tableData)==null?void 0:n.columns)==null?void 0:r.filter(I=>(I==null?void 0:I.hidden)!==!0))==null?void 0:o.map(I=>I==null?void 0:I.name))==null?void 0:d.join(","),(p=this.visibleColumns)!=null&&p.length?(c=this.tableData)==null||c.columns.forEach(I=>{var N;(N=this.visibleColumns)!=null&&N.includes(I==null?void 0:I.name)?I.hidden=!1:I.hidden=!0}):this.visibleColumns=(E=(k=(b=this.tableData)==null?void 0:b.columns)==null?void 0:k.filter(I=>(I==null?void 0:I.hidden)!==!0))==null?void 0:E.map(I=>I==null?void 0:I.name),setTimeout(()=>{var I,N;(N=(I=this.tableData)==null?void 0:I.columns)==null||N.forEach(({name:$})=>{var F,q,J,Q,me,Ee;(q=(F=this.columnsWidth)==null?void 0:F[$])!=null&&q.ref&&(this.columnsWidth[$].width=parseInt((Ee=(me=(Q=(J=this.columnsWidth)==null?void 0:J[$])==null?void 0:Q.ref)==null?void 0:me.getBoundingClientRect())==null?void 0:Ee.width)+"px")})})}catch{}},async getFilters(){var t;try{const{data:e}=await Oe.get(`/api/table-filter/${this.table}`);this.filterScheme=(t=e==null?void 0:e.list)==null?void 0:t.map(n=>({...n,label:(n==null?void 0:n.label)||(n==null?void 0:n.ua)}))}catch{}},async handlePageChange(t,e){const n=this.$route.query;this.page=t,this.limit=e,await this.$router.replace({query:{...n,page:t,limit:e}}),await this.getTableData()},async filterChange({url:t,state:e}){var n;this.filters=t!=="no-url"?t:null,this.onFilters=(n=Object.entries(e))==null?void 0:n.length,this.page=1,await this.getTableData()},changeActiveColumn(t){this.activeColumn=t,this.getTableData()},pushToCard(t){var e;((e=this.tableData)==null?void 0:e.card)===!1||this.$router.push(`/card/${this.table}/${t}`)},pushToLinkCard(t,e){t!=null&&t.link&&this.$router.push(`/card/${t==null?void 0:t.link}/${e==null?void 0:e[t==null?void 0:t.name]}`)},changeActiveCardInfo(t){var e;this.isVisibleCardInfo&&this.$router.push({...this.$route,query:{...(e=this.$route)==null?void 0:e.query,card:t}})},toggleCardInfo(){var t;this.isVisibleCardInfo=!this.isVisibleCardInfo,this.isVisibleCardInfo||this.$router.push({...this.$route,query:{...(t=this.$route)==null?void 0:t.query,card:void 0}})},getCustomStyles(t){return[t!=null&&t.link?" text-blue-800 hover:underline decoration-1":"",t!=null&&t.align?` text-${(t==null?void 0:t.align)||"left"}`:"",`text-${(t==null?void 0:t.wrap)||"wrap"}`]}}},mZ={class:"w-[calc(100vw - 320px)] bg-gray-100"},gZ={class:"h-[76px] mt-[15px] flex items-center justify-between mx-[20px] px-[20px] bg-white rounded-xl"},yZ={class:"text-lg font-semibold text-gray-800 dark:text-neutral-200"},_Z={class:"bg-white w-full rounded-xl p-[20px] pr-0"},bZ={class:"flex"},xZ={class:"flex gap-[6px] ml-auto"},vZ={class:"inline-block w-full align-middle"},wZ={class:"sticky top-[-1px] z-[2] bg-white w-full after:absolute after:content-[''] after:block after:w-full after:h-px after:bg-stone-200"},kZ={class:"right-0"},EZ={key:0,class:"w-[70px] sticky right-0 top-0"},CZ={class:"divide-y divide-gray-200 z-[1] relative text-gray-600"},SZ=["onClick"],TZ=["onClick"],AZ=["onClick"],DZ={class:"flex items-center justify-start w-full px-1 py-2"},MZ={class:"w-[200px] md:inline-flex hidden"},IZ={class:"text-sm text-gray-600 dark:text-neutral-400"},PZ={class:"font-semibold text-gray-800 dark:text-neutral-200"},RZ={key:0};function NZ(t,e,n,r,o,d){var Ne,Ue,Xe,He,tt,ce,$t,ut,Ft,Ut,cn,dn,Wt,en,mn,gn,yn,Wn,Te,nt,rt,wt,Vt,un,zt,Bt,_n,Ce,zn,Vs,tn,On,zs;const p=a.resolveComponent("AdminCustomButtonAdd"),c=a.resolveComponent("IconPlus"),b=a.resolveComponent("router-link"),k=a.resolveComponent("AdminTableTabs"),E=a.resolveComponent("IconSearch"),C=a.resolveComponent("VsText"),T=a.resolveComponent("AdminTableCustomButtons"),I=a.resolveComponent("AdminTableCustomFilters"),N=a.resolveComponent("AdminTableColumnsHidden"),$=a.resolveComponent("AdminTableExport"),F=a.resolveComponent("AdminTableFilters"),q=a.resolveComponent("IconOpenCard"),J=a.resolveComponent("AdminTableColumn"),Q=a.resolveComponent("AdminComponentIs"),me=a.resolveComponent("AdminTableControl"),Ee=a.resolveComponent("AdminTableTotalsList"),Ve=a.resolveComponent("AdminNodata"),we=a.resolveComponent("AdminTablePagination"),Re=a.resolveComponent("AdminTableCardInfo");return a.openBlock(),a.createElementBlock("div",mZ,[a.createElementVNode("div",gZ,[a.createElementVNode("h2",yZ,a.toDisplayString(n.title),1),d.isForm?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[(Ue=(Ne=o.tableData)==null?void 0:Ne.slots)!=null&&Ue.addButton?(a.openBlock(),a.createBlock(p,{key:0,slots:(Xe=o.tableData)==null?void 0:Xe.slots},null,8,["slots"])):(a.openBlock(),a.createBlock(b,{key:1,to:`/add?table=${(tt=(He=t.$route)==null?void 0:He.params)==null?void 0:tt.catchAll}`,class:a.normalizeClass(`inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-${d.color}-700 border border-transparent rounded-lg gap-x-2 hover:bg-${d.color}-800 hover:text-white`)},{default:a.withCtx(()=>[a.createVNode(c,{height:"16",width:"16"}),e[5]||(e[5]=a.createTextVNode(" Додати ",-1))]),_:1},8,["to","class"]))],64)):a.createCommentVNode("",!0)]),a.createElementVNode("div",{style:a.normalizeStyle({height:((ce=t.$adminSettings)==null?void 0:ce.header)===!1?"calc(100vh - 91px)":"calc(100vh - 155px)"}),class:"bg-gray-100 p-[20px] flex pt-[10px] lg:w-[calc(100vw-260px)] w-[100vw]"},[a.createElementVNode("div",_Z,[(ut=($t=o.tableData)==null?void 0:$t.filterState)!=null&&ut.length?(a.openBlock(),a.createBlock(k,{key:0,tabsList:(Ft=o.tableData)==null?void 0:Ft.filterState,filterState:o.filterState,"onUpdate:filterState":e[0]||(e[0]=ht=>o.filterState=ht)},null,8,["tabsList","filterState"])):a.createCommentVNode("",!0),a.createElementVNode("div",bZ,[a.createElementVNode("div",{class:a.normalizeClass([o.isVisibleCardInfo?"w-[calc(100%-360px)]":"w-full"])},[a.createElementVNode("div",{class:a.normalizeClass(["flex sm:grid sm:grid-cols-2 gap-x-2 sm:gap-x-5 mb-[10px] relative",{"pr-[20px]":!o.isVisibleCardInfo}])},[a.createVNode(E,{height:"14",width:"14",class:"absolute top-[10px] left-[14px] text-gray-500 z-[1]"}),a.createVNode(C,{modelValue:o.searchValue,"onUpdate:modelValue":e[1]||(e[1]=ht=>o.searchValue=ht),placeholder:n.search||"Пошук...",clearable:!0,class:"[&>input]:py-[7px] [&>input]:max-h-[36px] [&>input]:ps-10 [&>input]:pe-8 [&>input]:block [&>input]:w-full [&>input]:bg-gray-100 [&>input]:border-transparent [&>input]:rounded-lg [&>input]:text-sm [&>input]:focus:bg-white [&>input]:focus:border-blue-500 [&>input]:focus:ring-blue-500 [&>input]:disabled:opacity-50 [&>input]:disabled:pointer-events-none [&>input]:dark:bg-neutral-700 [&>input]:dark:border-transparent [&>input]:dark:text-neutral-400 [&>input]:dark:placeholder:text-neutral-400 dark:focus:bg-neutral-800 dark:focus:ring-neutral-600"},null,8,["modelValue","placeholder"]),a.createElementVNode("div",xZ,[(Ut=o.tableData)!=null&&Ut.slots?(a.openBlock(),a.createBlock(T,{key:0,data:o.tableData,slots:(cn=o.tableData)==null?void 0:cn.slots},null,8,["data","slots"])):a.createCommentVNode("",!0),(Wt=(dn=o.tableData)==null?void 0:dn.filterCustom)!=null&&Wt.length?(a.openBlock(),a.createBlock(I,{key:1,customList:(en=o.tableData)==null?void 0:en.filterCustom,filterCustom:o.filterCustom,"onUpdate:filterCustom":e[2]||(e[2]=ht=>o.filterCustom=ht)},null,8,["customList","filterCustom"])):a.createCommentVNode("",!0),a.createVNode(N,{columns:(mn=o.tableData)==null?void 0:mn.columns,onUpdateColumns:e[3]||(e[3]=ht=>o.tableData.columns=ht)},null,8,["columns"]),((gn=o.tableData)==null?void 0:gn.export)!==!1?(a.openBlock(),a.createBlock($,{key:2,table:n.table,columns:(yn=o.tableData)==null?void 0:yn.columns,page:o.page,"filter-state":o.filterState,"filter-custom":o.filterCustom,filters:o.filters},null,8,["table","columns","page","filter-state","filter-custom","filters"])):a.createCommentVNode("",!0),(Wn=o.filterScheme)!=null&&Wn.length?(a.openBlock(),a.createBlock(F,{key:3,scheme:o.filterScheme,onFilters:o.onFilters,table:n.table,onFilterChange:d.filterChange},null,8,["scheme","onFilters","table","onFilterChange"])):a.createCommentVNode("",!0),a.createElementVNode("button",{onClick:e[4]||(e[4]=(...ht)=>d.toggleCardInfo&&d.toggleCardInfo(...ht)),class:"py-2 px-2.5 max-h-[34px] md:inline-flex hidden items-center gap-x-1.5 text-xs font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"},[a.createVNode(q,{class:a.normalizeClass({"rotate-180 duration-300":!o.isVisibleCardInfo})},null,8,["class"])])])],2),a.createElementVNode("div",{class:a.normalizeClass(["flex items-start justify-start w-full space-y-5",{"pr-[20px]":!o.isVisibleCardInfo}])},[a.createElementVNode("div",{style:a.normalizeStyle({height:`calc(100vh - ${((Te=t.$adminSettings)==null?void 0:Te.header)===!1?(rt=(nt=o.tableData)==null?void 0:nt.filterState)!=null&&rt.length?330:270:(Vt=(wt=o.tableData)==null?void 0:wt.filterState)!=null&&Vt.length?380:320}px)`}),class:"overflow-x-auto w-full [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},[a.createElementVNode("div",vZ,[d.isNoData?(a.openBlock(),a.createBlock(Ve,{key:1})):(a.openBlock(),a.createElementBlock("table",{key:0,class:a.normalizeClass([d.fontSize,"relative min-w-full my-2 divide-y divide-gray-200 table-fixed w-max dark:divide-neutral-700"])},[a.createElementVNode("thead",wZ,[a.createElementVNode("tr",kZ,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(d.columns,ht=>{var Tr,vi;return a.openBlock(),a.createBlock(J,{key:ht.name,style:a.normalizeStyle({width:((vi=(Tr=o.columnsWidth)==null?void 0:Tr[ht==null?void 0:ht.name])==null?void 0:vi.width)||d.rowWidth(ht==null?void 0:ht.name),textAlign:ht==null?void 0:ht.align,wordBreak:ht==null?void 0:ht.wrap}),data:ht,activeColumn:o.activeColumn,onUpdateRef:vr=>{var Ni,Bi;(Bi=(Ni=o.columnsWidth)==null?void 0:Ni[ht==null?void 0:ht.name])!=null&&Bi.ref||(o.columnsWidth[ht.name]={ref:vr})},onChangeActive:d.changeActiveColumn},null,8,["style","data","activeColumn","onUpdateRef","onChangeActive"])}),128)),(zt=(un=d.getActions)==null?void 0:un.filter(ht=>ht!=="add"&&ht!=="view"))!=null&&zt.length?(a.openBlock(),a.createElementBlock("th",EZ)):a.createCommentVNode("",!0)])]),a.createElementVNode("tbody",CZ,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((Bt=o.tableData)==null?void 0:Bt.rows,(ht,Tr)=>{var vi,vr,Ni,Bi,je,si,fr,oi,Vi,qe,Lt,At,wr,Gr;return a.openBlock(),a.createElementBlock("tr",{key:(ht==null?void 0:ht.id)||Tr,class:a.normalizeClass({"bg-gray-100":((vr=(vi=t.$route)==null?void 0:vi.query)==null?void 0:vr.card)===(ht==null?void 0:ht.id),"odd:bg-gray-50":((Bi=(Ni=t.$route)==null?void 0:Ni.query)==null?void 0:Bi.card)!==(ht==null?void 0:ht.id)})},[a.createElementVNode("td",{class:a.normalizeClass(["px-1 py-2.5 pr-5",[(je=d.columns[0])!=null&&je.align?`text-${((si=d.columns[0])==null?void 0:si.align)||"left"}`:""]]),onClick:Et=>d.changeActiveCardInfo(ht==null?void 0:ht.id)},[a.createElementVNode("button",{onClick:Et=>{d.pushToCard(ht==null?void 0:ht.id),d.pushToLinkCard(d.columns[0],ht)},class:a.normalizeClass(["font-medium text-start",[...d.getCustomStyles(d.columns[0]),((fr=this.tableData)==null?void 0:fr.card)===!1?"":` text-${d.color}-800 decoration-2 focus:outline-none focus:underline hover:text-${d.color}-700 hover:underline`]])},[a.createVNode(Q,{row:ht,column:d.columns[0],table:n.table,onUpdateTable:d.getTableData},null,8,["row","column","table","onUpdateTable"])],10,TZ)],10,SZ),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((oi=d.columns)==null?void 0:oi.slice(1),Et=>(a.openBlock(),a.createElementBlock("td",{onClick:zi=>{d.changeActiveCardInfo(ht==null?void 0:ht.id),d.pushToLinkCard(Et,ht)},class:a.normalizeClass(["px-1 py-2.5 pr-5",d.getCustomStyles(Et)]),key:Et.name},[a.createVNode(Q,{row:ht,column:Et,table:n.table,onUpdateTable:d.getTableData},null,8,["row","column","table","onUpdateTable"])],10,AZ))),128)),(qe=(Vi=d.getActions)==null?void 0:Vi.filter(Et=>Et!=="add"&&Et!=="view"))!=null&&qe.length?(a.openBlock(),a.createElementBlock("td",{key:0,class:a.normalizeClass(["text-center sticky right-0 w-[80px] px-[10px]",{"bg-gray-50":((At=(Lt=t.$route)==null?void 0:Lt.query)==null?void 0:At.card)===(ht==null?void 0:ht.id)||!(Tr%2),"bg-white":((Gr=(wr=t.$route)==null?void 0:wr.query)==null?void 0:Gr.card)!==(ht==null?void 0:ht.id)&&Tr%2}])},[a.createVNode(me,{actions:d.getActions,isForm:d.isForm,item:ht,table:n.table,onUpdateTable:d.getTableData},null,8,["actions","isForm","item","table","onUpdateTable"])],2)):a.createCommentVNode("",!0)],2)}),128))]),a.createVNode(Ee,{columns:d.columns,agg:(_n=o.tableData)==null?void 0:_n.agg},null,8,["columns","agg"])],2))])],4)],2),a.createElementVNode("div",DZ,[a.createElementVNode("div",MZ,[a.createElementVNode("p",IZ,[a.createElementVNode("span",PZ,[a.createTextVNode(" Об'єктів: "+a.toDisplayString(Intl.NumberFormat("ua").format(o.limit<((Ce=o.tableData)==null?void 0:Ce.filtered)?o.limit:((zn=o.tableData)==null?void 0:zn.filtered)||0))+" ",1),o.limit<((Vs=o.tableData)==null?void 0:Vs.filtered)?(a.openBlock(),a.createElementBlock("span",RZ," з "+a.toDisplayString(Intl.NumberFormat("ua").format(((tn=o.tableData)==null?void 0:tn.filtered)||0)),1)):a.createCommentVNode("",!0)])])]),Math.ceil((On=o.tableData)==null?void 0:On.filtered)>10?(a.openBlock(),a.createBlock(we,{key:0,class:"justify-end mr-10","default-page":parseInt(d.defaultPage),total:((zs=o.tableData)==null?void 0:zs.filtered)||0,onPageChange:d.handlePageChange,pageSize:parseInt(o.limit),pageSizes:[10,20,50,100]},null,8,["default-page","total","onPageChange","pageSize"])):a.createCommentVNode("",!0)])],2),a.createVNode(a.Transition,{name:"slide-fade"},{default:a.withCtx(()=>{var ht;return[o.isVisibleCardInfo?(a.openBlock(),a.createBlock(Re,{key:0,table:n.table,columns:(ht=o.tableData)==null?void 0:ht.columns,row:d.activeCardRow},null,8,["table","columns","row"])):a.createCommentVNode("",!0)]}),_:1})])])],4)])}const BZ={components:{AdminTable:Le(fZ,[["render",NZ],["__scopeId","data-v-ca941f11"]])},data(){return{table:!1,interface:"",search:""}},watch:{$route:{async handler(){ii!=null&&ii.value||await this.getMenu(),await this.checkPageType()},deep:!0},title(t){var e;t&&(document.title=(((e=et.value)==null?void 0:e.titlePrefix)||"")+t)}},async mounted(){await this.checkPageType()},methods:{flattenMenu(t){const e=[];return t.forEach(n=>{n.menu?e.push(...this.flattenMenu(n.menu)):e.push(n)}),e},async checkPageType(){var r,o;const t=this.flattenMenu(ii.value);t!=null&&t.length||this.$router.replace("/404");const e=t==null?void 0:t.find(d=>{var p,c;return(d==null?void 0:d.path)==((c=(p=this.$route)==null?void 0:p.params)==null?void 0:c.catchAll)});this.title=e==null?void 0:e.ua,e||this.$router.replace("/404"),e!=null&&e.component&&this.$router.replace((o=(r=this.$route)==null?void 0:r.params)==null?void 0:o.catchAll);const n=e==null?void 0:e.table;this.table=n||!1,this.search=(e==null?void 0:e.search)||"",!n&&this.getInterface()},async getInterface(){var t,e;try{const{data:n}=await Oe.get(`/api/template/interface/${((e=(t=this.$route)==null?void 0:t.params)==null?void 0:e.catchAll)||""}`);this.interface=n||""}catch{this.interface=""}}}},VZ=["innerHTML"];function zZ(t,e,n,r,o,d){const p=a.resolveComponent("AdminTable");return o.table?(a.openBlock(),a.createBlock(p,{key:0,table:o.table,title:t.title,search:o.search},null,8,["table","title","search"])):(a.openBlock(),a.createElementBlock("div",{key:1,class:"w-full bg-gray-50",style:{height:"calc(100vh - 120px)"},innerHTML:o.interface},null,8,VZ))}const OZ=Object.freeze(Object.defineProperty({__proto__:null,default:Le(BZ,[["render",zZ]])},Symbol.toStringTag,{value:"Module"}));return N2});
|