@opengis/admin 0.2.44 → 0.2.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.
@@ -42,7 +42,7 @@ var Kx;function ht(){return Kx.apply(null,arguments)}function vP(n){Kx=n}functio
42
42
  [`+a+"] ";for(u in arguments[0])xn(arguments[0],u)&&(r+=u+": "+arguments[0][u]+", ");r=r.slice(0,-2)}else r=arguments[a];i.push(r)}e1(n+`
43
43
  Arguments: `+Array.prototype.slice.call(i).join("")+`
44
44
  `+new Error().stack),t=!1}return e.apply(this,arguments)},e)}var t1={};function n1(n,e){ht.deprecationHandler!=null&&ht.deprecationHandler(n,e),t1[n]||(e1(e),t1[n]=!0)}ht.suppressDeprecationWarnings=!1,ht.deprecationHandler=null;function Xs(n){return typeof Function<"u"&&n instanceof Function||Object.prototype.toString.call(n)==="[object Function]"}function kP(n){var e,t;for(t in n)xn(n,t)&&(e=n[t],Xs(e)?this[t]=e:this["_"+t]=e);this._config=n,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function Ag(n,e){var t=aa({},n),i;for(i in e)xn(e,i)&&(dl(n[i])&&dl(e[i])?(t[i]={},aa(t[i],n[i]),aa(t[i],e[i])):e[i]!=null?t[i]=e[i]:delete t[i]);for(i in n)xn(n,i)&&!xn(e,i)&&dl(n[i])&&(t[i]=aa({},t[i]));return t}function Pg(n){n!=null&&this.set(n)}var Ig;Object.keys?Ig=Object.keys:Ig=function(n){var e,t=[];for(e in n)xn(n,e)&&t.push(e);return t};var SP={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function EP(n,e,t){var i=this._calendar[n]||this._calendar.sameElse;return Xs(i)?i.call(e,t):i}function Ks(n,e,t){var i=""+Math.abs(n),r=e-i.length,a=n>=0;return(a?t?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+i}var Dg=/(\[[^\[]*\])|(\\)?([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,xp=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Og={},mc={};function Pt(n,e,t,i){var r=i;typeof i=="string"&&(r=function(){return this[i]()}),n&&(mc[n]=r),e&&(mc[e[0]]=function(){return Ks(r.apply(this,arguments),e[1],e[2])}),t&&(mc[t]=function(){return this.localeData().ordinal(r.apply(this,arguments),n)})}function CP(n){return n.match(/\[[\s\S]/)?n.replace(/^\[|\]$/g,""):n.replace(/\\/g,"")}function TP(n){var e=n.match(Dg),t,i;for(t=0,i=e.length;t<i;t++)mc[e[t]]?e[t]=mc[e[t]]:e[t]=CP(e[t]);return function(r){var a="",u;for(u=0;u<i;u++)a+=Xs(e[u])?e[u].call(r,n):e[u];return a}}function vp(n,e){return n.isValid()?(e=i1(e,n.localeData()),Og[e]=Og[e]||TP(e),Og[e](n)):n.localeData().invalidDate()}function i1(n,e){var t=5;function i(r){return e.longDateFormat(r)||r}for(xp.lastIndex=0;t>=0&&xp.test(n);)n=n.replace(xp,i),xp.lastIndex=0,t-=1;return n}var MP={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 AP(n){var e=this._longDateFormat[n],t=this._longDateFormat[n.toUpperCase()];return e||!t?e:(this._longDateFormat[n]=t.match(Dg).map(function(i){return i==="MMMM"||i==="MM"||i==="DD"||i==="dddd"?i.slice(1):i}).join(""),this._longDateFormat[n])}var PP="Invalid date";function IP(){return this._invalidDate}var DP="%d",OP=/\d{1,2}/;function BP(n){return this._ordinal.replace("%d",n)}var NP={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 zP(n,e,t,i){var r=this._relativeTime[t];return Xs(r)?r(n,e,t,i):r.replace(/%d/i,n)}function RP(n,e){var t=this._relativeTime[n>0?"future":"past"];return Xs(t)?t(e):t.replace(/%s/i,e)}var r1={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 fs(n){return typeof n=="string"?r1[n]||r1[n.toLowerCase()]:void 0}function Bg(n){var e={},t,i;for(i in n)xn(n,i)&&(t=fs(i),t&&(e[t]=n[i]));return e}var LP={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 VP(n){var e=[],t;for(t in n)xn(n,t)&&e.push({unit:t,priority:LP[t]});return e.sort(function(i,r){return i.priority-r.priority}),e}var s1=/\d/,Gr=/\d\d/,o1=/\d{3}/,Ng=/\d{4}/,wp=/[+-]?\d{6}/,Wn=/\d\d?/,a1=/\d\d\d\d?/,l1=/\d\d\d\d\d\d?/,kp=/\d{1,3}/,zg=/\d{1,4}/,Sp=/[+-]?\d{1,6}/,gc=/\d+/,Ep=/[+-]?\d+/,FP=/Z|[+-]\d\d:?\d\d/gi,Cp=/Z|[+-]\d\d(?::?\d\d)?/gi,$P=/[+-]?\d+(\.\d{1,3})?/,sh=/[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,yc=/^[1-9]\d?/,Rg=/^([1-9]\d|\d)/,Tp;Tp={};function bt(n,e,t){Tp[n]=Xs(e)?e:function(i,r){return i&&t?t:e}}function jP(n,e){return xn(Tp,n)?Tp[n](e._strict,e._locale):new RegExp(UP(n))}function UP(n){return wo(n.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,i,r,a){return t||i||r||a}))}function wo(n){return n.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function ms(n){return n<0?Math.ceil(n)||0:Math.floor(n)}function cn(n){var e=+n,t=0;return e!==0&&isFinite(e)&&(t=ms(e)),t}var Lg={};function Nn(n,e){var t,i=e,r;for(typeof n=="string"&&(n=[n]),vo(e)&&(i=function(a,u){u[e]=cn(a)}),r=n.length,t=0;t<r;t++)Lg[n[t]]=i}function oh(n,e){Nn(n,function(t,i,r,a){r._w=r._w||{},e(t,r._w,r,a)})}function HP(n,e,t){e!=null&&xn(Lg,n)&&Lg[n](e,t._a,t,n)}function Mp(n){return n%4===0&&n%100!==0||n%400===0}var Qi=0,ko=1,Js=2,xi=3,Rs=4,So=5,pl=6,qP=7,WP=8;Pt("Y",0,0,function(){var n=this.year();return n<=9999?Ks(n,4):"+"+n}),Pt(0,["YY",2],0,function(){return this.year()%100}),Pt(0,["YYYY",4],0,"year"),Pt(0,["YYYYY",5],0,"year"),Pt(0,["YYYYYY",6,!0],0,"year"),bt("Y",Ep),bt("YY",Wn,Gr),bt("YYYY",zg,Ng),bt("YYYYY",Sp,wp),bt("YYYYYY",Sp,wp),Nn(["YYYYY","YYYYYY"],Qi),Nn("YYYY",function(n,e){e[Qi]=n.length===2?ht.parseTwoDigitYear(n):cn(n)}),Nn("YY",function(n,e){e[Qi]=ht.parseTwoDigitYear(n)}),Nn("Y",function(n,e){e[Qi]=parseInt(n,10)});function ah(n){return Mp(n)?366:365}ht.parseTwoDigitYear=function(n){return cn(n)+(cn(n)>68?1900:2e3)};var c1=_c("FullYear",!0);function GP(){return Mp(this.year())}function _c(n,e){return function(t){return t!=null?(u1(this,n,t),ht.updateOffset(this,e),this):lh(this,n)}}function lh(n,e){if(!n.isValid())return NaN;var t=n._d,i=n._isUTC;switch(e){case"Milliseconds":return i?t.getUTCMilliseconds():t.getMilliseconds();case"Seconds":return i?t.getUTCSeconds():t.getSeconds();case"Minutes":return i?t.getUTCMinutes():t.getMinutes();case"Hours":return i?t.getUTCHours():t.getHours();case"Date":return i?t.getUTCDate():t.getDate();case"Day":return i?t.getUTCDay():t.getDay();case"Month":return i?t.getUTCMonth():t.getMonth();case"FullYear":return i?t.getUTCFullYear():t.getFullYear();default:return NaN}}function u1(n,e,t){var i,r,a,u,l;if(!(!n.isValid()||isNaN(t))){switch(i=n._d,r=n._isUTC,e){case"Milliseconds":return void(r?i.setUTCMilliseconds(t):i.setMilliseconds(t));case"Seconds":return void(r?i.setUTCSeconds(t):i.setSeconds(t));case"Minutes":return void(r?i.setUTCMinutes(t):i.setMinutes(t));case"Hours":return void(r?i.setUTCHours(t):i.setHours(t));case"Date":return void(r?i.setUTCDate(t):i.setDate(t));case"FullYear":break;default:return}a=t,u=n.month(),l=n.date(),l=l===29&&u===1&&!Mp(a)?28:l,r?i.setUTCFullYear(a,u,l):i.setFullYear(a,u,l)}}function ZP(n){return n=fs(n),Xs(this[n])?this[n]():this}function YP(n,e){if(typeof n=="object"){n=Bg(n);var t=VP(n),i,r=t.length;for(i=0;i<r;i++)this[t[i].unit](n[t[i].unit])}else if(n=fs(n),Xs(this[n]))return this[n](e);return this}function XP(n,e){return(n%e+e)%e}var ui;Array.prototype.indexOf?ui=Array.prototype.indexOf:ui=function(n){var e;for(e=0;e<this.length;++e)if(this[e]===n)return e;return-1};function Vg(n,e){if(isNaN(n)||isNaN(e))return NaN;var t=XP(e,12);return n+=(e-t)/12,t===1?Mp(n)?29:28:31-t%7%2}Pt("M",["MM",2],"Mo",function(){return this.month()+1}),Pt("MMM",0,0,function(n){return this.localeData().monthsShort(this,n)}),Pt("MMMM",0,0,function(n){return this.localeData().months(this,n)}),bt("M",Wn,yc),bt("MM",Wn,Gr),bt("MMM",function(n,e){return e.monthsShortRegex(n)}),bt("MMMM",function(n,e){return e.monthsRegex(n)}),Nn(["M","MM"],function(n,e){e[ko]=cn(n)-1}),Nn(["MMM","MMMM"],function(n,e,t,i){var r=t._locale.monthsParse(n,i,t._strict);r!=null?e[ko]=r:Yt(t).invalidMonth=n});var KP="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),h1="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),d1=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,JP=sh,QP=sh;function eI(n,e){return n?Ns(this._months)?this._months[n.month()]:this._months[(this._months.isFormat||d1).test(e)?"format":"standalone"][n.month()]:Ns(this._months)?this._months:this._months.standalone}function tI(n,e){return n?Ns(this._monthsShort)?this._monthsShort[n.month()]:this._monthsShort[d1.test(e)?"format":"standalone"][n.month()]:Ns(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function nI(n,e,t){var i,r,a,u=n.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],i=0;i<12;++i)a=Ys([2e3,i]),this._shortMonthsParse[i]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[i]=this.months(a,"").toLocaleLowerCase();return t?e==="MMM"?(r=ui.call(this._shortMonthsParse,u),r!==-1?r:null):(r=ui.call(this._longMonthsParse,u),r!==-1?r:null):e==="MMM"?(r=ui.call(this._shortMonthsParse,u),r!==-1?r:(r=ui.call(this._longMonthsParse,u),r!==-1?r:null)):(r=ui.call(this._longMonthsParse,u),r!==-1?r:(r=ui.call(this._shortMonthsParse,u),r!==-1?r:null))}function iI(n,e,t){var i,r,a;if(this._monthsParseExact)return nI.call(this,n,e,t);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++){if(r=Ys([2e3,i]),t&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(r,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(r,"").replace(".","")+"$","i")),!t&&!this._monthsParse[i]&&(a="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[i]=new RegExp(a.replace(".",""),"i")),t&&e==="MMMM"&&this._longMonthsParse[i].test(n))return i;if(t&&e==="MMM"&&this._shortMonthsParse[i].test(n))return i;if(!t&&this._monthsParse[i].test(n))return i}}function p1(n,e){if(!n.isValid())return n;if(typeof e=="string"){if(/^\d+$/.test(e))e=cn(e);else if(e=n.localeData().monthsParse(e),!vo(e))return n}var t=e,i=n.date();return i=i<29?i:Math.min(i,Vg(n.year(),t)),n._isUTC?n._d.setUTCMonth(t,i):n._d.setMonth(t,i),n}function f1(n){return n!=null?(p1(this,n),ht.updateOffset(this,!0),this):lh(this,"Month")}function rI(){return Vg(this.year(),this.month())}function sI(n){return this._monthsParseExact?(xn(this,"_monthsRegex")||m1.call(this),n?this._monthsShortStrictRegex:this._monthsShortRegex):(xn(this,"_monthsShortRegex")||(this._monthsShortRegex=JP),this._monthsShortStrictRegex&&n?this._monthsShortStrictRegex:this._monthsShortRegex)}function oI(n){return this._monthsParseExact?(xn(this,"_monthsRegex")||m1.call(this),n?this._monthsStrictRegex:this._monthsRegex):(xn(this,"_monthsRegex")||(this._monthsRegex=QP),this._monthsStrictRegex&&n?this._monthsStrictRegex:this._monthsRegex)}function m1(){function n(m,b){return b.length-m.length}var e=[],t=[],i=[],r,a,u,l;for(r=0;r<12;r++)a=Ys([2e3,r]),u=wo(this.monthsShort(a,"")),l=wo(this.months(a,"")),e.push(u),t.push(l),i.push(l),i.push(u);e.sort(n),t.sort(n),i.sort(n),this._monthsRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+t.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+e.join("|")+")","i")}function aI(n,e,t,i,r,a,u){var l;return n<100&&n>=0?(l=new Date(n+400,e,t,i,r,a,u),isFinite(l.getFullYear())&&l.setFullYear(n)):l=new Date(n,e,t,i,r,a,u),l}function ch(n){var e,t;return n<100&&n>=0?(t=Array.prototype.slice.call(arguments),t[0]=n+400,e=new Date(Date.UTC.apply(null,t)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(n)):e=new Date(Date.UTC.apply(null,arguments)),e}function Ap(n,e,t){var i=7+e-t,r=(7+ch(n,0,i).getUTCDay()-e)%7;return-r+i-1}function g1(n,e,t,i,r){var a=(7+t-i)%7,u=Ap(n,i,r),l=1+7*(e-1)+a+u,m,b;return l<=0?(m=n-1,b=ah(m)+l):l>ah(n)?(m=n+1,b=l-ah(n)):(m=n,b=l),{year:m,dayOfYear:b}}function uh(n,e,t){var i=Ap(n.year(),e,t),r=Math.floor((n.dayOfYear()-i-1)/7)+1,a,u;return r<1?(u=n.year()-1,a=r+Eo(u,e,t)):r>Eo(n.year(),e,t)?(a=r-Eo(n.year(),e,t),u=n.year()+1):(u=n.year(),a=r),{week:a,year:u}}function Eo(n,e,t){var i=Ap(n,e,t),r=Ap(n+1,e,t);return(ah(n)-i+r)/7}Pt("w",["ww",2],"wo","week"),Pt("W",["WW",2],"Wo","isoWeek"),bt("w",Wn,yc),bt("ww",Wn,Gr),bt("W",Wn,yc),bt("WW",Wn,Gr),oh(["w","ww","W","WW"],function(n,e,t,i){e[i.substr(0,1)]=cn(n)});function lI(n){return uh(n,this._week.dow,this._week.doy).week}var cI={dow:0,doy:6};function uI(){return this._week.dow}function hI(){return this._week.doy}function dI(n){var e=this.localeData().week(this);return n==null?e:this.add((n-e)*7,"d")}function pI(n){var e=uh(this,1,4).week;return n==null?e:this.add((n-e)*7,"d")}Pt("d",0,"do","day"),Pt("dd",0,0,function(n){return this.localeData().weekdaysMin(this,n)}),Pt("ddd",0,0,function(n){return this.localeData().weekdaysShort(this,n)}),Pt("dddd",0,0,function(n){return this.localeData().weekdays(this,n)}),Pt("e",0,0,"weekday"),Pt("E",0,0,"isoWeekday"),bt("d",Wn),bt("e",Wn),bt("E",Wn),bt("dd",function(n,e){return e.weekdaysMinRegex(n)}),bt("ddd",function(n,e){return e.weekdaysShortRegex(n)}),bt("dddd",function(n,e){return e.weekdaysRegex(n)}),oh(["dd","ddd","dddd"],function(n,e,t,i){var r=t._locale.weekdaysParse(n,i,t._strict);r!=null?e.d=r:Yt(t).invalidWeekday=n}),oh(["d","e","E"],function(n,e,t,i){e[i]=cn(n)});function fI(n,e){return typeof n!="string"?n:isNaN(n)?(n=e.weekdaysParse(n),typeof n=="number"?n:null):parseInt(n,10)}function mI(n,e){return typeof n=="string"?e.weekdaysParse(n)%7||7:isNaN(n)?null:n}function Fg(n,e){return n.slice(e,7).concat(n.slice(0,e))}var gI="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),y1="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),yI="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),_I=sh,bI=sh,xI=sh;function vI(n,e){var t=Ns(this._weekdays)?this._weekdays:this._weekdays[n&&n!==!0&&this._weekdays.isFormat.test(e)?"format":"standalone"];return n===!0?Fg(t,this._week.dow):n?t[n.day()]:t}function wI(n){return n===!0?Fg(this._weekdaysShort,this._week.dow):n?this._weekdaysShort[n.day()]:this._weekdaysShort}function kI(n){return n===!0?Fg(this._weekdaysMin,this._week.dow):n?this._weekdaysMin[n.day()]:this._weekdaysMin}function SI(n,e,t){var i,r,a,u=n.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)a=Ys([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(a,"").toLocaleLowerCase();return t?e==="dddd"?(r=ui.call(this._weekdaysParse,u),r!==-1?r:null):e==="ddd"?(r=ui.call(this._shortWeekdaysParse,u),r!==-1?r:null):(r=ui.call(this._minWeekdaysParse,u),r!==-1?r:null):e==="dddd"?(r=ui.call(this._weekdaysParse,u),r!==-1||(r=ui.call(this._shortWeekdaysParse,u),r!==-1)?r:(r=ui.call(this._minWeekdaysParse,u),r!==-1?r:null)):e==="ddd"?(r=ui.call(this._shortWeekdaysParse,u),r!==-1||(r=ui.call(this._weekdaysParse,u),r!==-1)?r:(r=ui.call(this._minWeekdaysParse,u),r!==-1?r:null)):(r=ui.call(this._minWeekdaysParse,u),r!==-1||(r=ui.call(this._weekdaysParse,u),r!==-1)?r:(r=ui.call(this._shortWeekdaysParse,u),r!==-1?r:null))}function EI(n,e,t){var i,r,a;if(this._weekdaysParseExact)return SI.call(this,n,e,t);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(r=Ys([2e3,1]).day(i),t&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(r,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(r,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(r,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[i]||(a="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[i]=new RegExp(a.replace(".",""),"i")),t&&e==="dddd"&&this._fullWeekdaysParse[i].test(n))return i;if(t&&e==="ddd"&&this._shortWeekdaysParse[i].test(n))return i;if(t&&e==="dd"&&this._minWeekdaysParse[i].test(n))return i;if(!t&&this._weekdaysParse[i].test(n))return i}}function CI(n){if(!this.isValid())return n!=null?this:NaN;var e=lh(this,"Day");return n!=null?(n=fI(n,this.localeData()),this.add(n-e,"d")):e}function TI(n){if(!this.isValid())return n!=null?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return n==null?e:this.add(n-e,"d")}function MI(n){if(!this.isValid())return n!=null?this:NaN;if(n!=null){var e=mI(n,this.localeData());return this.day(this.day()%7?e:e-7)}else return this.day()||7}function AI(n){return this._weekdaysParseExact?(xn(this,"_weekdaysRegex")||$g.call(this),n?this._weekdaysStrictRegex:this._weekdaysRegex):(xn(this,"_weekdaysRegex")||(this._weekdaysRegex=_I),this._weekdaysStrictRegex&&n?this._weekdaysStrictRegex:this._weekdaysRegex)}function PI(n){return this._weekdaysParseExact?(xn(this,"_weekdaysRegex")||$g.call(this),n?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(xn(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=bI),this._weekdaysShortStrictRegex&&n?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function II(n){return this._weekdaysParseExact?(xn(this,"_weekdaysRegex")||$g.call(this),n?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(xn(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=xI),this._weekdaysMinStrictRegex&&n?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function $g(){function n(w,E){return E.length-w.length}var e=[],t=[],i=[],r=[],a,u,l,m,b;for(a=0;a<7;a++)u=Ys([2e3,1]).day(a),l=wo(this.weekdaysMin(u,"")),m=wo(this.weekdaysShort(u,"")),b=wo(this.weekdays(u,"")),e.push(l),t.push(m),i.push(b),r.push(l),r.push(m),r.push(b);e.sort(n),t.sort(n),i.sort(n),r.sort(n),this._weekdaysRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+t.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+e.join("|")+")","i")}function jg(){return this.hours()%12||12}function DI(){return this.hours()||24}Pt("H",["HH",2],0,"hour"),Pt("h",["hh",2],0,jg),Pt("k",["kk",2],0,DI),Pt("hmm",0,0,function(){return""+jg.apply(this)+Ks(this.minutes(),2)}),Pt("hmmss",0,0,function(){return""+jg.apply(this)+Ks(this.minutes(),2)+Ks(this.seconds(),2)}),Pt("Hmm",0,0,function(){return""+this.hours()+Ks(this.minutes(),2)}),Pt("Hmmss",0,0,function(){return""+this.hours()+Ks(this.minutes(),2)+Ks(this.seconds(),2)});function _1(n,e){Pt(n,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}_1("a",!0),_1("A",!1);function b1(n,e){return e._meridiemParse}bt("a",b1),bt("A",b1),bt("H",Wn,Rg),bt("h",Wn,yc),bt("k",Wn,yc),bt("HH",Wn,Gr),bt("hh",Wn,Gr),bt("kk",Wn,Gr),bt("hmm",a1),bt("hmmss",l1),bt("Hmm",a1),bt("Hmmss",l1),Nn(["H","HH"],xi),Nn(["k","kk"],function(n,e,t){var i=cn(n);e[xi]=i===24?0:i}),Nn(["a","A"],function(n,e,t){t._isPm=t._locale.isPM(n),t._meridiem=n}),Nn(["h","hh"],function(n,e,t){e[xi]=cn(n),Yt(t).bigHour=!0}),Nn("hmm",function(n,e,t){var i=n.length-2;e[xi]=cn(n.substr(0,i)),e[Rs]=cn(n.substr(i)),Yt(t).bigHour=!0}),Nn("hmmss",function(n,e,t){var i=n.length-4,r=n.length-2;e[xi]=cn(n.substr(0,i)),e[Rs]=cn(n.substr(i,2)),e[So]=cn(n.substr(r)),Yt(t).bigHour=!0}),Nn("Hmm",function(n,e,t){var i=n.length-2;e[xi]=cn(n.substr(0,i)),e[Rs]=cn(n.substr(i))}),Nn("Hmmss",function(n,e,t){var i=n.length-4,r=n.length-2;e[xi]=cn(n.substr(0,i)),e[Rs]=cn(n.substr(i,2)),e[So]=cn(n.substr(r))});function OI(n){return(n+"").toLowerCase().charAt(0)==="p"}var BI=/[ap]\.?m?\.?/i,NI=_c("Hours",!0);function zI(n,e,t){return n>11?t?"pm":"PM":t?"am":"AM"}var x1={calendar:SP,longDateFormat:MP,invalidDate:PP,ordinal:DP,dayOfMonthOrdinalParse:OP,relativeTime:NP,months:KP,monthsShort:h1,week:cI,weekdays:gI,weekdaysMin:yI,weekdaysShort:y1,meridiemParse:BI},Xn={},hh={},dh;function RI(n,e){var t,i=Math.min(n.length,e.length);for(t=0;t<i;t+=1)if(n[t]!==e[t])return t;return i}function v1(n){return n&&n.toLowerCase().replace("_","-")}function LI(n){for(var e=0,t,i,r,a;e<n.length;){for(a=v1(n[e]).split("-"),t=a.length,i=v1(n[e+1]),i=i?i.split("-"):null;t>0;){if(r=Pp(a.slice(0,t).join("-")),r)return r;if(i&&i.length>=t&&RI(a,i)>=t-1)break;t--}e++}return dh}function VI(n){return!!(n&&n.match("^[^/\\\\]*$"))}function Pp(n){var e=null,t;if(Xn[n]===void 0&&typeof module<"u"&&module&&module.exports&&VI(n))try{e=dh._abbr,t=require,t("./locale/"+n),la(e)}catch{Xn[n]=null}return Xn[n]}function la(n,e){var t;return n&&(Tr(e)?t=Co(n):t=Ug(n,e),t?dh=t:typeof console<"u"&&console.warn&&console.warn("Locale "+n+" not found. Did you forget to load it?")),dh._abbr}function Ug(n,e){if(e!==null){var t,i=x1;if(e.abbr=n,Xn[n]!=null)n1("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."),i=Xn[n]._config;else if(e.parentLocale!=null)if(Xn[e.parentLocale]!=null)i=Xn[e.parentLocale]._config;else if(t=Pp(e.parentLocale),t!=null)i=t._config;else return hh[e.parentLocale]||(hh[e.parentLocale]=[]),hh[e.parentLocale].push({name:n,config:e}),null;return Xn[n]=new Pg(Ag(i,e)),hh[n]&&hh[n].forEach(function(r){Ug(r.name,r.config)}),la(n),Xn[n]}else return delete Xn[n],null}function FI(n,e){if(e!=null){var t,i,r=x1;Xn[n]!=null&&Xn[n].parentLocale!=null?Xn[n].set(Ag(Xn[n]._config,e)):(i=Pp(n),i!=null&&(r=i._config),e=Ag(r,e),i==null&&(e.abbr=n),t=new Pg(e),t.parentLocale=Xn[n],Xn[n]=t),la(n)}else Xn[n]!=null&&(Xn[n].parentLocale!=null?(Xn[n]=Xn[n].parentLocale,n===la()&&la(n)):Xn[n]!=null&&delete Xn[n]);return Xn[n]}function Co(n){var e;if(n&&n._locale&&n._locale._abbr&&(n=n._locale._abbr),!n)return dh;if(!Ns(n)){if(e=Pp(n),e)return e;n=[n]}return LI(n)}function $I(){return Ig(Xn)}function Hg(n){var e,t=n._a;return t&&Yt(n).overflow===-2&&(e=t[ko]<0||t[ko]>11?ko:t[Js]<1||t[Js]>Vg(t[Qi],t[ko])?Js:t[xi]<0||t[xi]>24||t[xi]===24&&(t[Rs]!==0||t[So]!==0||t[pl]!==0)?xi:t[Rs]<0||t[Rs]>59?Rs:t[So]<0||t[So]>59?So:t[pl]<0||t[pl]>999?pl:-1,Yt(n)._overflowDayOfYear&&(e<Qi||e>Js)&&(e=Js),Yt(n)._overflowWeeks&&e===-1&&(e=qP),Yt(n)._overflowWeekday&&e===-1&&(e=WP),Yt(n).overflow=e),n}var jI=/^\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)?)?$/,UI=/^\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)?)?$/,HI=/Z|[+-]\d\d(?::?\d\d)?/,Ip=[["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]],qg=[["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/]],qI=/^\/?Date\((-?\d+)/i,WI=/^(?:(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}))$/,GI={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 w1(n){var e,t,i=n._i,r=jI.exec(i)||UI.exec(i),a,u,l,m,b=Ip.length,w=qg.length;if(r){for(Yt(n).iso=!0,e=0,t=b;e<t;e++)if(Ip[e][1].exec(r[1])){u=Ip[e][0],a=Ip[e][2]!==!1;break}if(u==null){n._isValid=!1;return}if(r[3]){for(e=0,t=w;e<t;e++)if(qg[e][1].exec(r[3])){l=(r[2]||" ")+qg[e][0];break}if(l==null){n._isValid=!1;return}}if(!a&&l!=null){n._isValid=!1;return}if(r[4])if(HI.exec(r[4]))m="Z";else{n._isValid=!1;return}n._f=u+(l||"")+(m||""),Gg(n)}else n._isValid=!1}function ZI(n,e,t,i,r,a){var u=[YI(n),h1.indexOf(e),parseInt(t,10),parseInt(i,10),parseInt(r,10)];return a&&u.push(parseInt(a,10)),u}function YI(n){var e=parseInt(n,10);return e<=49?2e3+e:e<=999?1900+e:e}function XI(n){return n.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function KI(n,e,t){if(n){var i=y1.indexOf(n),r=new Date(e[0],e[1],e[2]).getDay();if(i!==r)return Yt(t).weekdayMismatch=!0,t._isValid=!1,!1}return!0}function JI(n,e,t){if(n)return GI[n];if(e)return 0;var i=parseInt(t,10),r=i%100,a=(i-r)/100;return a*60+r}function k1(n){var e=WI.exec(XI(n._i)),t;if(e){if(t=ZI(e[4],e[3],e[2],e[5],e[6],e[7]),!KI(e[1],t,n))return;n._a=t,n._tzm=JI(e[8],e[9],e[10]),n._d=ch.apply(null,n._a),n._d.setUTCMinutes(n._d.getUTCMinutes()-n._tzm),Yt(n).rfc2822=!0}else n._isValid=!1}function QI(n){var e=qI.exec(n._i);if(e!==null){n._d=new Date(+e[1]);return}if(w1(n),n._isValid===!1)delete n._isValid;else return;if(k1(n),n._isValid===!1)delete n._isValid;else return;n._strict?n._isValid=!1:ht.createFromInputFallback(n)}ht.createFromInputFallback=ps("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(n){n._d=new Date(n._i+(n._useUTC?" UTC":""))});function bc(n,e,t){return n??e??t}function eD(n){var e=new Date(ht.now());return n._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function Wg(n){var e,t,i=[],r,a,u;if(!n._d){for(r=eD(n),n._w&&n._a[Js]==null&&n._a[ko]==null&&tD(n),n._dayOfYear!=null&&(u=bc(n._a[Qi],r[Qi]),(n._dayOfYear>ah(u)||n._dayOfYear===0)&&(Yt(n)._overflowDayOfYear=!0),t=ch(u,0,n._dayOfYear),n._a[ko]=t.getUTCMonth(),n._a[Js]=t.getUTCDate()),e=0;e<3&&n._a[e]==null;++e)n._a[e]=i[e]=r[e];for(;e<7;e++)n._a[e]=i[e]=n._a[e]==null?e===2?1:0:n._a[e];n._a[xi]===24&&n._a[Rs]===0&&n._a[So]===0&&n._a[pl]===0&&(n._nextDay=!0,n._a[xi]=0),n._d=(n._useUTC?ch:aI).apply(null,i),a=n._useUTC?n._d.getUTCDay():n._d.getDay(),n._tzm!=null&&n._d.setUTCMinutes(n._d.getUTCMinutes()-n._tzm),n._nextDay&&(n._a[xi]=24),n._w&&typeof n._w.d<"u"&&n._w.d!==a&&(Yt(n).weekdayMismatch=!0)}}function tD(n){var e,t,i,r,a,u,l,m,b;e=n._w,e.GG!=null||e.W!=null||e.E!=null?(a=1,u=4,t=bc(e.GG,n._a[Qi],uh(Gn(),1,4).year),i=bc(e.W,1),r=bc(e.E,1),(r<1||r>7)&&(m=!0)):(a=n._locale._week.dow,u=n._locale._week.doy,b=uh(Gn(),a,u),t=bc(e.gg,n._a[Qi],b.year),i=bc(e.w,b.week),e.d!=null?(r=e.d,(r<0||r>6)&&(m=!0)):e.e!=null?(r=e.e+a,(e.e<0||e.e>6)&&(m=!0)):r=a),i<1||i>Eo(t,a,u)?Yt(n)._overflowWeeks=!0:m!=null?Yt(n)._overflowWeekday=!0:(l=g1(t,i,r,a,u),n._a[Qi]=l.year,n._dayOfYear=l.dayOfYear)}ht.ISO_8601=function(){},ht.RFC_2822=function(){};function Gg(n){if(n._f===ht.ISO_8601){w1(n);return}if(n._f===ht.RFC_2822){k1(n);return}n._a=[],Yt(n).empty=!0;var e=""+n._i,t,i,r,a,u,l=e.length,m=0,b,w;for(r=i1(n._f,n._locale).match(Dg)||[],w=r.length,t=0;t<w;t++)a=r[t],i=(e.match(jP(a,n))||[])[0],i&&(u=e.substr(0,e.indexOf(i)),u.length>0&&Yt(n).unusedInput.push(u),e=e.slice(e.indexOf(i)+i.length),m+=i.length),mc[a]?(i?Yt(n).empty=!1:Yt(n).unusedTokens.push(a),HP(a,i,n)):n._strict&&!i&&Yt(n).unusedTokens.push(a);Yt(n).charsLeftOver=l-m,e.length>0&&Yt(n).unusedInput.push(e),n._a[xi]<=12&&Yt(n).bigHour===!0&&n._a[xi]>0&&(Yt(n).bigHour=void 0),Yt(n).parsedDateParts=n._a.slice(0),Yt(n).meridiem=n._meridiem,n._a[xi]=nD(n._locale,n._a[xi],n._meridiem),b=Yt(n).era,b!==null&&(n._a[Qi]=n._locale.erasConvertYear(b,n._a[Qi])),Wg(n),Hg(n)}function nD(n,e,t){var i;return t==null?e:n.meridiemHour!=null?n.meridiemHour(e,t):(n.isPM!=null&&(i=n.isPM(t),i&&e<12&&(e+=12),!i&&e===12&&(e=0)),e)}function iD(n){var e,t,i,r,a,u,l=!1,m=n._f.length;if(m===0){Yt(n).invalidFormat=!0,n._d=new Date(NaN);return}for(r=0;r<m;r++)a=0,u=!1,e=Mg({},n),n._useUTC!=null&&(e._useUTC=n._useUTC),e._f=n._f[r],Gg(e),Cg(e)&&(u=!0),a+=Yt(e).charsLeftOver,a+=Yt(e).unusedTokens.length*10,Yt(e).score=a,l?a<i&&(i=a,t=e):(i==null||a<i||u)&&(i=a,t=e,u&&(l=!0));aa(n,t||e)}function rD(n){if(!n._d){var e=Bg(n._i),t=e.day===void 0?e.date:e.day;n._a=Jx([e.year,e.month,t,e.hour,e.minute,e.second,e.millisecond],function(i){return i&&parseInt(i,10)}),Wg(n)}}function sD(n){var e=new rh(Hg(S1(n)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function S1(n){var e=n._i,t=n._f;return n._locale=n._locale||Co(n._l),e===null||t===void 0&&e===""?bp({nullInput:!0}):(typeof e=="string"&&(n._i=e=n._locale.preparse(e)),zs(e)?new rh(Hg(e)):(ih(e)?n._d=e:Ns(t)?iD(n):t?Gg(n):oD(n),Cg(n)||(n._d=null),n))}function oD(n){var e=n._i;Tr(e)?n._d=new Date(ht.now()):ih(e)?n._d=new Date(e.valueOf()):typeof e=="string"?QI(n):Ns(e)?(n._a=Jx(e.slice(0),function(t){return parseInt(t,10)}),Wg(n)):dl(e)?rD(n):vo(e)?n._d=new Date(e):ht.createFromInputFallback(n)}function E1(n,e,t,i,r){var a={};return(e===!0||e===!1)&&(i=e,e=void 0),(t===!0||t===!1)&&(i=t,t=void 0),(dl(n)&&Sg(n)||Ns(n)&&n.length===0)&&(n=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=r,a._l=t,a._i=n,a._f=e,a._strict=i,sD(a)}function Gn(n,e,t,i){return E1(n,e,t,i,!1)}var aD=ps("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var n=Gn.apply(null,arguments);return this.isValid()&&n.isValid()?n<this?this:n:bp()}),lD=ps("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var n=Gn.apply(null,arguments);return this.isValid()&&n.isValid()?n>this?this:n:bp()});function C1(n,e){var t,i;if(e.length===1&&Ns(e[0])&&(e=e[0]),!e.length)return Gn();for(t=e[0],i=1;i<e.length;++i)(!e[i].isValid()||e[i][n](t))&&(t=e[i]);return t}function cD(){var n=[].slice.call(arguments,0);return C1("isBefore",n)}function uD(){var n=[].slice.call(arguments,0);return C1("isAfter",n)}var hD=function(){return Date.now?Date.now():+new Date},ph=["year","quarter","month","week","day","hour","minute","second","millisecond"];function dD(n){var e,t=!1,i,r=ph.length;for(e in n)if(xn(n,e)&&!(ui.call(ph,e)!==-1&&(n[e]==null||!isNaN(n[e]))))return!1;for(i=0;i<r;++i)if(n[ph[i]]){if(t)return!1;parseFloat(n[ph[i]])!==cn(n[ph[i]])&&(t=!0)}return!0}function pD(){return this._isValid}function fD(){return Ls(NaN)}function Dp(n){var e=Bg(n),t=e.year||0,i=e.quarter||0,r=e.month||0,a=e.week||e.isoWeek||0,u=e.day||0,l=e.hour||0,m=e.minute||0,b=e.second||0,w=e.millisecond||0;this._isValid=dD(e),this._milliseconds=+w+b*1e3+m*6e4+l*1e3*60*60,this._days=+u+a*7,this._months=+r+i*3+t*12,this._data={},this._locale=Co(),this._bubble()}function Op(n){return n instanceof Dp}function Zg(n){return n<0?Math.round(-1*n)*-1:Math.round(n)}function mD(n,e,t){var i=Math.min(n.length,e.length),r=Math.abs(n.length-e.length),a=0,u;for(u=0;u<i;u++)cn(n[u])!==cn(e[u])&&a++;return a+r}function T1(n,e){Pt(n,0,0,function(){var t=this.utcOffset(),i="+";return t<0&&(t=-t,i="-"),i+Ks(~~(t/60),2)+e+Ks(~~t%60,2)})}T1("Z",":"),T1("ZZ",""),bt("Z",Cp),bt("ZZ",Cp),Nn(["Z","ZZ"],function(n,e,t){t._useUTC=!0,t._tzm=Yg(Cp,n)});var gD=/([\+\-]|\d\d)/gi;function Yg(n,e){var t=(e||"").match(n),i,r,a;return t===null?null:(i=t[t.length-1]||[],r=(i+"").match(gD)||["-",0,0],a=+(r[1]*60)+cn(r[2]),a===0?0:r[0]==="+"?a:-a)}function Xg(n,e){var t,i;return e._isUTC?(t=e.clone(),i=(zs(n)||ih(n)?n.valueOf():Gn(n).valueOf())-t.valueOf(),t._d.setTime(t._d.valueOf()+i),ht.updateOffset(t,!1),t):Gn(n).local()}function Kg(n){return-Math.round(n._d.getTimezoneOffset())}ht.updateOffset=function(){};function yD(n,e,t){var i=this._offset||0,r;if(!this.isValid())return n!=null?this:NaN;if(n!=null){if(typeof n=="string"){if(n=Yg(Cp,n),n===null)return this}else Math.abs(n)<16&&!t&&(n=n*60);return!this._isUTC&&e&&(r=Kg(this)),this._offset=n,this._isUTC=!0,r!=null&&this.add(r,"m"),i!==n&&(!e||this._changeInProgress?I1(this,Ls(n-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,ht.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?i:Kg(this)}function _D(n,e){return n!=null?(typeof n!="string"&&(n=-n),this.utcOffset(n,e),this):-this.utcOffset()}function bD(n){return this.utcOffset(0,n)}function xD(n){return this._isUTC&&(this.utcOffset(0,n),this._isUTC=!1,n&&this.subtract(Kg(this),"m")),this}function vD(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var n=Yg(FP,this._i);n!=null?this.utcOffset(n):this.utcOffset(0,!0)}return this}function wD(n){return this.isValid()?(n=n?Gn(n).utcOffset():0,(this.utcOffset()-n)%60===0):!1}function kD(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function SD(){if(!Tr(this._isDSTShifted))return this._isDSTShifted;var n={},e;return Mg(n,this),n=S1(n),n._a?(e=n._isUTC?Ys(n._a):Gn(n._a),this._isDSTShifted=this.isValid()&&mD(n._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function ED(){return this.isValid()?!this._isUTC:!1}function CD(){return this.isValid()?this._isUTC:!1}function M1(){return this.isValid()?this._isUTC&&this._offset===0:!1}var TD=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,MD=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Ls(n,e){var t=n,i=null,r,a,u;return Op(n)?t={ms:n._milliseconds,d:n._days,M:n._months}:vo(n)||!isNaN(+n)?(t={},e?t[e]=+n:t.milliseconds=+n):(i=TD.exec(n))?(r=i[1]==="-"?-1:1,t={y:0,d:cn(i[Js])*r,h:cn(i[xi])*r,m:cn(i[Rs])*r,s:cn(i[So])*r,ms:cn(Zg(i[pl]*1e3))*r}):(i=MD.exec(n))?(r=i[1]==="-"?-1:1,t={y:fl(i[2],r),M:fl(i[3],r),w:fl(i[4],r),d:fl(i[5],r),h:fl(i[6],r),m:fl(i[7],r),s:fl(i[8],r)}):t==null?t={}:typeof t=="object"&&("from"in t||"to"in t)&&(u=AD(Gn(t.from),Gn(t.to)),t={},t.ms=u.milliseconds,t.M=u.months),a=new Dp(t),Op(n)&&xn(n,"_locale")&&(a._locale=n._locale),Op(n)&&xn(n,"_isValid")&&(a._isValid=n._isValid),a}Ls.fn=Dp.prototype,Ls.invalid=fD;function fl(n,e){var t=n&&parseFloat(n.replace(",","."));return(isNaN(t)?0:t)*e}function A1(n,e){var t={};return t.months=e.month()-n.month()+(e.year()-n.year())*12,n.clone().add(t.months,"M").isAfter(e)&&--t.months,t.milliseconds=+e-+n.clone().add(t.months,"M"),t}function AD(n,e){var t;return n.isValid()&&e.isValid()?(e=Xg(e,n),n.isBefore(e)?t=A1(n,e):(t=A1(e,n),t.milliseconds=-t.milliseconds,t.months=-t.months),t):{milliseconds:0,months:0}}function P1(n,e){return function(t,i){var r,a;return i!==null&&!isNaN(+i)&&(n1(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."),a=t,t=i,i=a),r=Ls(t,i),I1(this,r,n),this}}function I1(n,e,t,i){var r=e._milliseconds,a=Zg(e._days),u=Zg(e._months);n.isValid()&&(i=i??!0,u&&p1(n,lh(n,"Month")+u*t),a&&u1(n,"Date",lh(n,"Date")+a*t),r&&n._d.setTime(n._d.valueOf()+r*t),i&&ht.updateOffset(n,a||u))}var PD=P1(1,"add"),ID=P1(-1,"subtract");function D1(n){return typeof n=="string"||n instanceof String}function DD(n){return zs(n)||ih(n)||D1(n)||vo(n)||BD(n)||OD(n)||n===null||n===void 0}function OD(n){var e=dl(n)&&!Sg(n),t=!1,i=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],r,a,u=i.length;for(r=0;r<u;r+=1)a=i[r],t=t||xn(n,a);return e&&t}function BD(n){var e=Ns(n),t=!1;return e&&(t=n.filter(function(i){return!vo(i)&&D1(n)}).length===0),e&&t}function ND(n){var e=dl(n)&&!Sg(n),t=!1,i=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],r,a;for(r=0;r<i.length;r+=1)a=i[r],t=t||xn(n,a);return e&&t}function zD(n,e){var t=n.diff(e,"days",!0);return t<-6?"sameElse":t<-1?"lastWeek":t<0?"lastDay":t<1?"sameDay":t<2?"nextDay":t<7?"nextWeek":"sameElse"}function RD(n,e){arguments.length===1&&(arguments[0]?DD(arguments[0])?(n=arguments[0],e=void 0):ND(arguments[0])&&(e=arguments[0],n=void 0):(n=void 0,e=void 0));var t=n||Gn(),i=Xg(t,this).startOf("day"),r=ht.calendarFormat(this,i)||"sameElse",a=e&&(Xs(e[r])?e[r].call(this,t):e[r]);return this.format(a||this.localeData().calendar(r,this,Gn(t)))}function LD(){return new rh(this)}function VD(n,e){var t=zs(n)?n:Gn(n);return this.isValid()&&t.isValid()?(e=fs(e)||"millisecond",e==="millisecond"?this.valueOf()>t.valueOf():t.valueOf()<this.clone().startOf(e).valueOf()):!1}function FD(n,e){var t=zs(n)?n:Gn(n);return this.isValid()&&t.isValid()?(e=fs(e)||"millisecond",e==="millisecond"?this.valueOf()<t.valueOf():this.clone().endOf(e).valueOf()<t.valueOf()):!1}function $D(n,e,t,i){var r=zs(n)?n:Gn(n),a=zs(e)?e:Gn(e);return this.isValid()&&r.isValid()&&a.isValid()?(i=i||"()",(i[0]==="("?this.isAfter(r,t):!this.isBefore(r,t))&&(i[1]===")"?this.isBefore(a,t):!this.isAfter(a,t))):!1}function jD(n,e){var t=zs(n)?n:Gn(n),i;return this.isValid()&&t.isValid()?(e=fs(e)||"millisecond",e==="millisecond"?this.valueOf()===t.valueOf():(i=t.valueOf(),this.clone().startOf(e).valueOf()<=i&&i<=this.clone().endOf(e).valueOf())):!1}function UD(n,e){return this.isSame(n,e)||this.isAfter(n,e)}function HD(n,e){return this.isSame(n,e)||this.isBefore(n,e)}function qD(n,e,t){var i,r,a;if(!this.isValid())return NaN;if(i=Xg(n,this),!i.isValid())return NaN;switch(r=(i.utcOffset()-this.utcOffset())*6e4,e=fs(e),e){case"year":a=Bp(this,i)/12;break;case"month":a=Bp(this,i);break;case"quarter":a=Bp(this,i)/3;break;case"second":a=(this-i)/1e3;break;case"minute":a=(this-i)/6e4;break;case"hour":a=(this-i)/36e5;break;case"day":a=(this-i-r)/864e5;break;case"week":a=(this-i-r)/6048e5;break;default:a=this-i}return t?a:ms(a)}function Bp(n,e){if(n.date()<e.date())return-Bp(e,n);var t=(e.year()-n.year())*12+(e.month()-n.month()),i=n.clone().add(t,"months"),r,a;return e-i<0?(r=n.clone().add(t-1,"months"),a=(e-i)/(i-r)):(r=n.clone().add(t+1,"months"),a=(e-i)/(r-i)),-(t+a)||0}ht.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",ht.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function WD(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function GD(n){if(!this.isValid())return null;var e=n!==!0,t=e?this.clone().utc():this;return t.year()<0||t.year()>9999?vp(t,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Xs(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",vp(t,"Z")):vp(t,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function ZD(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var n="moment",e="",t,i,r,a;return this.isLocal()||(n=this.utcOffset()===0?"moment.utc":"moment.parseZone",e="Z"),t="["+n+'("]',i=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",r="-MM-DD[T]HH:mm:ss.SSS",a=e+'[")]',this.format(t+i+r+a)}function YD(n){n||(n=this.isUtc()?ht.defaultFormatUtc:ht.defaultFormat);var e=vp(this,n);return this.localeData().postformat(e)}function XD(n,e){return this.isValid()&&(zs(n)&&n.isValid()||Gn(n).isValid())?Ls({to:this,from:n}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function KD(n){return this.from(Gn(),n)}function JD(n,e){return this.isValid()&&(zs(n)&&n.isValid()||Gn(n).isValid())?Ls({from:this,to:n}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function QD(n){return this.to(Gn(),n)}function O1(n){var e;return n===void 0?this._locale._abbr:(e=Co(n),e!=null&&(this._locale=e),this)}var B1=ps("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(n){return n===void 0?this.localeData():this.locale(n)});function N1(){return this._locale}var Np=1e3,xc=60*Np,zp=60*xc,z1=(365*400+97)*24*zp;function vc(n,e){return(n%e+e)%e}function R1(n,e,t){return n<100&&n>=0?new Date(n+400,e,t)-z1:new Date(n,e,t).valueOf()}function L1(n,e,t){return n<100&&n>=0?Date.UTC(n+400,e,t)-z1:Date.UTC(n,e,t)}function eO(n){var e,t;if(n=fs(n),n===void 0||n==="millisecond"||!this.isValid())return this;switch(t=this._isUTC?L1:R1,n){case"year":e=t(this.year(),0,1);break;case"quarter":e=t(this.year(),this.month()-this.month()%3,1);break;case"month":e=t(this.year(),this.month(),1);break;case"week":e=t(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=t(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=t(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=vc(e+(this._isUTC?0:this.utcOffset()*xc),zp);break;case"minute":e=this._d.valueOf(),e-=vc(e,xc);break;case"second":e=this._d.valueOf(),e-=vc(e,Np);break}return this._d.setTime(e),ht.updateOffset(this,!0),this}function tO(n){var e,t;if(n=fs(n),n===void 0||n==="millisecond"||!this.isValid())return this;switch(t=this._isUTC?L1:R1,n){case"year":e=t(this.year()+1,0,1)-1;break;case"quarter":e=t(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=t(this.year(),this.month()+1,1)-1;break;case"week":e=t(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=t(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=t(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=zp-vc(e+(this._isUTC?0:this.utcOffset()*xc),zp)-1;break;case"minute":e=this._d.valueOf(),e+=xc-vc(e,xc)-1;break;case"second":e=this._d.valueOf(),e+=Np-vc(e,Np)-1;break}return this._d.setTime(e),ht.updateOffset(this,!0),this}function nO(){return this._d.valueOf()-(this._offset||0)*6e4}function iO(){return Math.floor(this.valueOf()/1e3)}function rO(){return new Date(this.valueOf())}function sO(){var n=this;return[n.year(),n.month(),n.date(),n.hour(),n.minute(),n.second(),n.millisecond()]}function oO(){var n=this;return{years:n.year(),months:n.month(),date:n.date(),hours:n.hours(),minutes:n.minutes(),seconds:n.seconds(),milliseconds:n.milliseconds()}}function aO(){return this.isValid()?this.toISOString():null}function lO(){return Cg(this)}function cO(){return aa({},Yt(this))}function uO(){return Yt(this).overflow}function hO(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Pt("N",0,0,"eraAbbr"),Pt("NN",0,0,"eraAbbr"),Pt("NNN",0,0,"eraAbbr"),Pt("NNNN",0,0,"eraName"),Pt("NNNNN",0,0,"eraNarrow"),Pt("y",["y",1],"yo","eraYear"),Pt("y",["yy",2],0,"eraYear"),Pt("y",["yyy",3],0,"eraYear"),Pt("y",["yyyy",4],0,"eraYear"),bt("N",Jg),bt("NN",Jg),bt("NNN",Jg),bt("NNNN",wO),bt("NNNNN",kO),Nn(["N","NN","NNN","NNNN","NNNNN"],function(n,e,t,i){var r=t._locale.erasParse(n,i,t._strict);r?Yt(t).era=r:Yt(t).invalidEra=n}),bt("y",gc),bt("yy",gc),bt("yyy",gc),bt("yyyy",gc),bt("yo",SO),Nn(["y","yy","yyy","yyyy"],Qi),Nn(["yo"],function(n,e,t,i){var r;t._locale._eraYearOrdinalRegex&&(r=n.match(t._locale._eraYearOrdinalRegex)),t._locale.eraYearOrdinalParse?e[Qi]=t._locale.eraYearOrdinalParse(n,r):e[Qi]=parseInt(n,10)});function dO(n,e){var t,i,r,a=this._eras||Co("en")._eras;for(t=0,i=a.length;t<i;++t){switch(typeof a[t].since){case"string":r=ht(a[t].since).startOf("day"),a[t].since=r.valueOf();break}switch(typeof a[t].until){case"undefined":a[t].until=1/0;break;case"string":r=ht(a[t].until).startOf("day").valueOf(),a[t].until=r.valueOf();break}}return a}function pO(n,e,t){var i,r,a=this.eras(),u,l,m;for(n=n.toUpperCase(),i=0,r=a.length;i<r;++i)if(u=a[i].name.toUpperCase(),l=a[i].abbr.toUpperCase(),m=a[i].narrow.toUpperCase(),t)switch(e){case"N":case"NN":case"NNN":if(l===n)return a[i];break;case"NNNN":if(u===n)return a[i];break;case"NNNNN":if(m===n)return a[i];break}else if([u,l,m].indexOf(n)>=0)return a[i]}function fO(n,e){var t=n.since<=n.until?1:-1;return e===void 0?ht(n.since).year():ht(n.since).year()+(e-n.offset)*t}function mO(){var n,e,t,i=this.localeData().eras();for(n=0,e=i.length;n<e;++n)if(t=this.clone().startOf("day").valueOf(),i[n].since<=t&&t<=i[n].until||i[n].until<=t&&t<=i[n].since)return i[n].name;return""}function gO(){var n,e,t,i=this.localeData().eras();for(n=0,e=i.length;n<e;++n)if(t=this.clone().startOf("day").valueOf(),i[n].since<=t&&t<=i[n].until||i[n].until<=t&&t<=i[n].since)return i[n].narrow;return""}function yO(){var n,e,t,i=this.localeData().eras();for(n=0,e=i.length;n<e;++n)if(t=this.clone().startOf("day").valueOf(),i[n].since<=t&&t<=i[n].until||i[n].until<=t&&t<=i[n].since)return i[n].abbr;return""}function _O(){var n,e,t,i,r=this.localeData().eras();for(n=0,e=r.length;n<e;++n)if(t=r[n].since<=r[n].until?1:-1,i=this.clone().startOf("day").valueOf(),r[n].since<=i&&i<=r[n].until||r[n].until<=i&&i<=r[n].since)return(this.year()-ht(r[n].since).year())*t+r[n].offset;return this.year()}function bO(n){return xn(this,"_erasNameRegex")||Qg.call(this),n?this._erasNameRegex:this._erasRegex}function xO(n){return xn(this,"_erasAbbrRegex")||Qg.call(this),n?this._erasAbbrRegex:this._erasRegex}function vO(n){return xn(this,"_erasNarrowRegex")||Qg.call(this),n?this._erasNarrowRegex:this._erasRegex}function Jg(n,e){return e.erasAbbrRegex(n)}function wO(n,e){return e.erasNameRegex(n)}function kO(n,e){return e.erasNarrowRegex(n)}function SO(n,e){return e._eraYearOrdinalRegex||gc}function Qg(){var n=[],e=[],t=[],i=[],r,a,u,l,m,b=this.eras();for(r=0,a=b.length;r<a;++r)u=wo(b[r].name),l=wo(b[r].abbr),m=wo(b[r].narrow),e.push(u),n.push(l),t.push(m),i.push(u),i.push(l),i.push(m);this._erasRegex=new RegExp("^("+i.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+e.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+t.join("|")+")","i")}Pt(0,["gg",2],0,function(){return this.weekYear()%100}),Pt(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Rp(n,e){Pt(0,[n,n.length],0,e)}Rp("gggg","weekYear"),Rp("ggggg","weekYear"),Rp("GGGG","isoWeekYear"),Rp("GGGGG","isoWeekYear"),bt("G",Ep),bt("g",Ep),bt("GG",Wn,Gr),bt("gg",Wn,Gr),bt("GGGG",zg,Ng),bt("gggg",zg,Ng),bt("GGGGG",Sp,wp),bt("ggggg",Sp,wp),oh(["gggg","ggggg","GGGG","GGGGG"],function(n,e,t,i){e[i.substr(0,2)]=cn(n)}),oh(["gg","GG"],function(n,e,t,i){e[i]=ht.parseTwoDigitYear(n)});function EO(n){return V1.call(this,n,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function CO(n){return V1.call(this,n,this.isoWeek(),this.isoWeekday(),1,4)}function TO(){return Eo(this.year(),1,4)}function MO(){return Eo(this.isoWeekYear(),1,4)}function AO(){var n=this.localeData()._week;return Eo(this.year(),n.dow,n.doy)}function PO(){var n=this.localeData()._week;return Eo(this.weekYear(),n.dow,n.doy)}function V1(n,e,t,i,r){var a;return n==null?uh(this,i,r).year:(a=Eo(n,i,r),e>a&&(e=a),IO.call(this,n,e,t,i,r))}function IO(n,e,t,i,r){var a=g1(n,e,t,i,r),u=ch(a.year,0,a.dayOfYear);return this.year(u.getUTCFullYear()),this.month(u.getUTCMonth()),this.date(u.getUTCDate()),this}Pt("Q",0,"Qo","quarter"),bt("Q",s1),Nn("Q",function(n,e){e[ko]=(cn(n)-1)*3});function DO(n){return n==null?Math.ceil((this.month()+1)/3):this.month((n-1)*3+this.month()%3)}Pt("D",["DD",2],"Do","date"),bt("D",Wn,yc),bt("DD",Wn,Gr),bt("Do",function(n,e){return n?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient}),Nn(["D","DD"],Js),Nn("Do",function(n,e){e[Js]=cn(n.match(Wn)[0])});var F1=_c("Date",!0);Pt("DDD",["DDDD",3],"DDDo","dayOfYear"),bt("DDD",kp),bt("DDDD",o1),Nn(["DDD","DDDD"],function(n,e,t){t._dayOfYear=cn(n)});function OO(n){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return n==null?e:this.add(n-e,"d")}Pt("m",["mm",2],0,"minute"),bt("m",Wn,Rg),bt("mm",Wn,Gr),Nn(["m","mm"],Rs);var BO=_c("Minutes",!1);Pt("s",["ss",2],0,"second"),bt("s",Wn,Rg),bt("ss",Wn,Gr),Nn(["s","ss"],So);var NO=_c("Seconds",!1);Pt("S",0,0,function(){return~~(this.millisecond()/100)}),Pt(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),Pt(0,["SSS",3],0,"millisecond"),Pt(0,["SSSS",4],0,function(){return this.millisecond()*10}),Pt(0,["SSSSS",5],0,function(){return this.millisecond()*100}),Pt(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),Pt(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),Pt(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),Pt(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),bt("S",kp,s1),bt("SS",kp,Gr),bt("SSS",kp,o1);var ca,$1;for(ca="SSSS";ca.length<=9;ca+="S")bt(ca,gc);function zO(n,e){e[pl]=cn(("0."+n)*1e3)}for(ca="S";ca.length<=9;ca+="S")Nn(ca,zO);$1=_c("Milliseconds",!1),Pt("z",0,0,"zoneAbbr"),Pt("zz",0,0,"zoneName");function RO(){return this._isUTC?"UTC":""}function LO(){return this._isUTC?"Coordinated Universal Time":""}var He=rh.prototype;He.add=PD,He.calendar=RD,He.clone=LD,He.diff=qD,He.endOf=tO,He.format=YD,He.from=XD,He.fromNow=KD,He.to=JD,He.toNow=QD,He.get=ZP,He.invalidAt=uO,He.isAfter=VD,He.isBefore=FD,He.isBetween=$D,He.isSame=jD,He.isSameOrAfter=UD,He.isSameOrBefore=HD,He.isValid=lO,He.lang=B1,He.locale=O1,He.localeData=N1,He.max=lD,He.min=aD,He.parsingFlags=cO,He.set=YP,He.startOf=eO,He.subtract=ID,He.toArray=sO,He.toObject=oO,He.toDate=rO,He.toISOString=GD,He.inspect=ZD,typeof Symbol<"u"&&Symbol.for!=null&&(He[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),He.toJSON=aO,He.toString=WD,He.unix=iO,He.valueOf=nO,He.creationData=hO,He.eraName=mO,He.eraNarrow=gO,He.eraAbbr=yO,He.eraYear=_O,He.year=c1,He.isLeapYear=GP,He.weekYear=EO,He.isoWeekYear=CO,He.quarter=He.quarters=DO,He.month=f1,He.daysInMonth=rI,He.week=He.weeks=dI,He.isoWeek=He.isoWeeks=pI,He.weeksInYear=AO,He.weeksInWeekYear=PO,He.isoWeeksInYear=TO,He.isoWeeksInISOWeekYear=MO,He.date=F1,He.day=He.days=CI,He.weekday=TI,He.isoWeekday=MI,He.dayOfYear=OO,He.hour=He.hours=NI,He.minute=He.minutes=BO,He.second=He.seconds=NO,He.millisecond=He.milliseconds=$1,He.utcOffset=yD,He.utc=bD,He.local=xD,He.parseZone=vD,He.hasAlignedHourOffset=wD,He.isDST=kD,He.isLocal=ED,He.isUtcOffset=CD,He.isUtc=M1,He.isUTC=M1,He.zoneAbbr=RO,He.zoneName=LO,He.dates=ps("dates accessor is deprecated. Use date instead.",F1),He.months=ps("months accessor is deprecated. Use month instead",f1),He.years=ps("years accessor is deprecated. Use year instead",c1),He.zone=ps("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",_D),He.isDSTShifted=ps("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",SD);function VO(n){return Gn(n*1e3)}function FO(){return Gn.apply(null,arguments).parseZone()}function j1(n){return n}var vn=Pg.prototype;vn.calendar=EP,vn.longDateFormat=AP,vn.invalidDate=IP,vn.ordinal=BP,vn.preparse=j1,vn.postformat=j1,vn.relativeTime=zP,vn.pastFuture=RP,vn.set=kP,vn.eras=dO,vn.erasParse=pO,vn.erasConvertYear=fO,vn.erasAbbrRegex=xO,vn.erasNameRegex=bO,vn.erasNarrowRegex=vO,vn.months=eI,vn.monthsShort=tI,vn.monthsParse=iI,vn.monthsRegex=oI,vn.monthsShortRegex=sI,vn.week=lI,vn.firstDayOfYear=hI,vn.firstDayOfWeek=uI,vn.weekdays=vI,vn.weekdaysMin=kI,vn.weekdaysShort=wI,vn.weekdaysParse=EI,vn.weekdaysRegex=AI,vn.weekdaysShortRegex=PI,vn.weekdaysMinRegex=II,vn.isPM=OI,vn.meridiem=zI;function Lp(n,e,t,i){var r=Co(),a=Ys().set(i,e);return r[t](a,n)}function U1(n,e,t){if(vo(n)&&(e=n,n=void 0),n=n||"",e!=null)return Lp(n,e,t,"month");var i,r=[];for(i=0;i<12;i++)r[i]=Lp(n,i,t,"month");return r}function ey(n,e,t,i){typeof n=="boolean"?(vo(e)&&(t=e,e=void 0),e=e||""):(e=n,t=e,n=!1,vo(e)&&(t=e,e=void 0),e=e||"");var r=Co(),a=n?r._week.dow:0,u,l=[];if(t!=null)return Lp(e,(t+a)%7,i,"day");for(u=0;u<7;u++)l[u]=Lp(e,(u+a)%7,i,"day");return l}function $O(n,e){return U1(n,e,"months")}function jO(n,e){return U1(n,e,"monthsShort")}function UO(n,e,t){return ey(n,e,t,"weekdays")}function HO(n,e,t){return ey(n,e,t,"weekdaysShort")}function qO(n,e,t){return ey(n,e,t,"weekdaysMin")}la("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(n){var e=n%10,t=cn(n%100/10)===1?"th":e===1?"st":e===2?"nd":e===3?"rd":"th";return n+t}}),ht.lang=ps("moment.lang is deprecated. Use moment.locale instead.",la),ht.langData=ps("moment.langData is deprecated. Use moment.localeData instead.",Co);var To=Math.abs;function WO(){var n=this._data;return this._milliseconds=To(this._milliseconds),this._days=To(this._days),this._months=To(this._months),n.milliseconds=To(n.milliseconds),n.seconds=To(n.seconds),n.minutes=To(n.minutes),n.hours=To(n.hours),n.months=To(n.months),n.years=To(n.years),this}function H1(n,e,t,i){var r=Ls(e,t);return n._milliseconds+=i*r._milliseconds,n._days+=i*r._days,n._months+=i*r._months,n._bubble()}function GO(n,e){return H1(this,n,e,1)}function ZO(n,e){return H1(this,n,e,-1)}function q1(n){return n<0?Math.floor(n):Math.ceil(n)}function YO(){var n=this._milliseconds,e=this._days,t=this._months,i=this._data,r,a,u,l,m;return n>=0&&e>=0&&t>=0||n<=0&&e<=0&&t<=0||(n+=q1(ty(t)+e)*864e5,e=0,t=0),i.milliseconds=n%1e3,r=ms(n/1e3),i.seconds=r%60,a=ms(r/60),i.minutes=a%60,u=ms(a/60),i.hours=u%24,e+=ms(u/24),m=ms(W1(e)),t+=m,e-=q1(ty(m)),l=ms(t/12),t%=12,i.days=e,i.months=t,i.years=l,this}function W1(n){return n*4800/146097}function ty(n){return n*146097/4800}function XO(n){if(!this.isValid())return NaN;var e,t,i=this._milliseconds;if(n=fs(n),n==="month"||n==="quarter"||n==="year")switch(e=this._days+i/864e5,t=this._months+W1(e),n){case"month":return t;case"quarter":return t/3;case"year":return t/12}else switch(e=this._days+Math.round(ty(this._months)),n){case"week":return e/7+i/6048e5;case"day":return e+i/864e5;case"hour":return e*24+i/36e5;case"minute":return e*1440+i/6e4;case"second":return e*86400+i/1e3;case"millisecond":return Math.floor(e*864e5)+i;default:throw new Error("Unknown unit "+n)}}function Mo(n){return function(){return this.as(n)}}var G1=Mo("ms"),KO=Mo("s"),JO=Mo("m"),QO=Mo("h"),eB=Mo("d"),tB=Mo("w"),nB=Mo("M"),iB=Mo("Q"),rB=Mo("y"),sB=G1;function oB(){return Ls(this)}function aB(n){return n=fs(n),this.isValid()?this[n+"s"]():NaN}function ml(n){return function(){return this.isValid()?this._data[n]:NaN}}var lB=ml("milliseconds"),cB=ml("seconds"),uB=ml("minutes"),hB=ml("hours"),dB=ml("days"),pB=ml("months"),fB=ml("years");function mB(){return ms(this.days()/7)}var Ao=Math.round,wc={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function gB(n,e,t,i,r){return r.relativeTime(e||1,!!t,n,i)}function yB(n,e,t,i){var r=Ls(n).abs(),a=Ao(r.as("s")),u=Ao(r.as("m")),l=Ao(r.as("h")),m=Ao(r.as("d")),b=Ao(r.as("M")),w=Ao(r.as("w")),E=Ao(r.as("y")),C=a<=t.ss&&["s",a]||a<t.s&&["ss",a]||u<=1&&["m"]||u<t.m&&["mm",u]||l<=1&&["h"]||l<t.h&&["hh",l]||m<=1&&["d"]||m<t.d&&["dd",m];return t.w!=null&&(C=C||w<=1&&["w"]||w<t.w&&["ww",w]),C=C||b<=1&&["M"]||b<t.M&&["MM",b]||E<=1&&["y"]||["yy",E],C[2]=e,C[3]=+n>0,C[4]=i,gB.apply(null,C)}function _B(n){return n===void 0?Ao:typeof n=="function"?(Ao=n,!0):!1}function bB(n,e){return wc[n]===void 0?!1:e===void 0?wc[n]:(wc[n]=e,n==="s"&&(wc.ss=e-1),!0)}function xB(n,e){if(!this.isValid())return this.localeData().invalidDate();var t=!1,i=wc,r,a;return typeof n=="object"&&(e=n,n=!1),typeof n=="boolean"&&(t=n),typeof e=="object"&&(i=Object.assign({},wc,e),e.s!=null&&e.ss==null&&(i.ss=e.s-1)),r=this.localeData(),a=yB(this,!t,i,r),t&&(a=r.pastFuture(+this,a)),r.postformat(a)}var ny=Math.abs;function kc(n){return(n>0)-(n<0)||+n}function Vp(){if(!this.isValid())return this.localeData().invalidDate();var n=ny(this._milliseconds)/1e3,e=ny(this._days),t=ny(this._months),i,r,a,u,l=this.asSeconds(),m,b,w,E;return l?(i=ms(n/60),r=ms(i/60),n%=60,i%=60,a=ms(t/12),t%=12,u=n?n.toFixed(3).replace(/\.?0+$/,""):"",m=l<0?"-":"",b=kc(this._months)!==kc(l)?"-":"",w=kc(this._days)!==kc(l)?"-":"",E=kc(this._milliseconds)!==kc(l)?"-":"",m+"P"+(a?b+a+"Y":"")+(t?b+t+"M":"")+(e?w+e+"D":"")+(r||i||n?"T":"")+(r?E+r+"H":"")+(i?E+i+"M":"")+(n?E+u+"S":"")):"P0D"}var mn=Dp.prototype;mn.isValid=pD,mn.abs=WO,mn.add=GO,mn.subtract=ZO,mn.as=XO,mn.asMilliseconds=G1,mn.asSeconds=KO,mn.asMinutes=JO,mn.asHours=QO,mn.asDays=eB,mn.asWeeks=tB,mn.asMonths=nB,mn.asQuarters=iB,mn.asYears=rB,mn.valueOf=sB,mn._bubble=YO,mn.clone=oB,mn.get=aB,mn.milliseconds=lB,mn.seconds=cB,mn.minutes=uB,mn.hours=hB,mn.days=dB,mn.weeks=mB,mn.months=pB,mn.years=fB,mn.humanize=xB,mn.toISOString=Vp,mn.toString=Vp,mn.toJSON=Vp,mn.locale=O1,mn.localeData=N1,mn.toIsoString=ps("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Vp),mn.lang=B1,Pt("X",0,0,"unix"),Pt("x",0,0,"valueOf"),bt("x",Ep),bt("X",$P),Nn("X",function(n,e,t){t._d=new Date(parseFloat(n)*1e3)}),Nn("x",function(n,e,t){t._d=new Date(cn(n))});//! moment.js
45
- ht.version="2.30.1",vP(Gn),ht.fn=He,ht.min=cD,ht.max=uD,ht.now=hD,ht.utc=Ys,ht.unix=VO,ht.months=$O,ht.isDate=ih,ht.locale=la,ht.invalid=bp,ht.duration=Ls,ht.isMoment=zs,ht.weekdays=UO,ht.parseZone=FO,ht.localeData=Co,ht.isDuration=Op,ht.monthsShort=jO,ht.weekdaysMin=qO,ht.defineLocale=Ug,ht.updateLocale=FI,ht.locales=$I,ht.weekdaysShort=HO,ht.normalizeUnits=fs,ht.relativeTimeRounding=_B,ht.relativeTimeThreshold=bB,ht.calendarFormat=zD,ht.prototype=He,ht.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 vB={props:{data:Object,name:String,table:String,edit:{type:null,default:()=>!1},value:null,column:Object},computed:{dateValue(){var n;if(!((n=this.data)!=null&&n[this.name]))return"-";try{const e=ht(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(n){var e,t;try{const i=await ut.get(`/api/table/${this.table}/${(e=this.data)==null?void 0:e.id}`);await ut.put(`/api/table/${(t=i==null?void 0:i.data)==null?void 0:t.token}`,{...i==null?void 0:i.data,[this.name]:n}),await this.$emit("update-table")}catch(i){console.log(i)}}}},wB={class:"underline whitespace-nowrap decoration-dashed decoration-[1px] decoration-blue-600"},kB={key:1,class:"whitespace-nowrap"};function SB(n,e,t,i,r,a){var l;const u=f.resolveComponent("VsInlineEdit");return t.edit?(f.openBlock(),f.createBlock(u,{key:0,"model-value":((l=t.data)==null?void 0:l[t.name])||null,component:"vs-datepicker",onUpdateValue:a.changeData},{default:f.withCtx(()=>[f.createElementVNode("div",wB,f.toDisplayString(a.dateValue),1)]),_:1},8,["model-value","onUpdateValue"])):(f.openBlock(),f.createElementBlock("div",kB,f.toDisplayString(a.dateValue),1))}const iy=Ue(vB,[["render",SB]]),EB=f.defineComponent({name:"VsNumberValue",props:{data:{type:Object},name:String},computed:{formattedValue(){try{return new Intl.NumberFormat("ua",{notation:"compact"}).format(this.data[this.name])}catch(n){return console.error("Formatting error:",n.message),this.value}}}}),CB={class:"block w-full pr-[10px] text-left"};function TB(n,e,t,i,r,a){return f.openBlock(),f.createElementBlock("span",CB,f.toDisplayString(n.formattedValue),1)}const Z1=Ue(EB,[["render",TB]]),MB={class:"text-start"},Y1={__name:"vs-format-slot",props:{column:Object,data:Object,table:String,data:Object,name:String,value:null},setup(n){var r,a,u,l,m;const{asyncTemplateSlot:e}=(m=(l=(u=(a=(r=f.getCurrentInstance())==null?void 0:r.appContext)==null?void 0:a.app)==null?void 0:u.config)==null?void 0:l.globalProperties)==null?void 0:m.utils,t=f.getCurrentInstance().appContext.app,i=["data","column","table","name","value"];return t.component(n.name)||e(n.name,n.column.slot.content,i),(b,w)=>(f.openBlock(),f.createElementBlock("div",MB,[(f.openBlock(),f.createBlock(f.resolveDynamicComponent(n.name),{column:n.column,table:n.table,name:n.name,data:n.data,value:n.value},null,8,["column","table","name","data","value"]))]))}},AB={"table-format-text":yp,"table-format-select":Yx,"table-format-badge":Gx,"table-format-swetch":_p,"table-format-check":_p,"table-format-html":yp,"table-format-tags":Xx,"table-format-date":iy,"table-format-number":Z1,"table-format-slot":Y1};var PB=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function IB(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var X1={exports:{}};/**
45
+ ht.version="2.30.1",vP(Gn),ht.fn=He,ht.min=cD,ht.max=uD,ht.now=hD,ht.utc=Ys,ht.unix=VO,ht.months=$O,ht.isDate=ih,ht.locale=la,ht.invalid=bp,ht.duration=Ls,ht.isMoment=zs,ht.weekdays=UO,ht.parseZone=FO,ht.localeData=Co,ht.isDuration=Op,ht.monthsShort=jO,ht.weekdaysMin=qO,ht.defineLocale=Ug,ht.updateLocale=FI,ht.locales=$I,ht.weekdaysShort=HO,ht.normalizeUnits=fs,ht.relativeTimeRounding=_B,ht.relativeTimeThreshold=bB,ht.calendarFormat=zD,ht.prototype=He,ht.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 vB={props:{data:Object,name:String,table:String,edit:{type:null,default:()=>!1},value:null,column:Object},computed:{dateValue(){var n;if(!((n=this.data)!=null&&n[this.name]))return"-";try{const e=ht(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(n){var e,t;try{const i=await ut.get(`/api/table/${this.table}/${(e=this.data)==null?void 0:e.id}`);await ut.put(`/api/table/${(t=i==null?void 0:i.data)==null?void 0:t.token}`,{...i==null?void 0:i.data,[this.name]:n}),await this.$emit("update-table")}catch(i){console.log(i)}}}},wB={class:"underline whitespace-nowrap decoration-dashed decoration-[1px] decoration-blue-600"},kB={key:1,class:"whitespace-nowrap"};function SB(n,e,t,i,r,a){var l;const u=f.resolveComponent("VsInlineEdit");return t.edit?(f.openBlock(),f.createBlock(u,{key:0,"model-value":((l=t.data)==null?void 0:l[t.name])||null,component:"vs-form-calendar",onUpdateValue:a.changeData},{default:f.withCtx(()=>[f.createElementVNode("div",wB,f.toDisplayString(a.dateValue),1)]),_:1},8,["model-value","onUpdateValue"])):(f.openBlock(),f.createElementBlock("div",kB,f.toDisplayString(a.dateValue),1))}const iy=Ue(vB,[["render",SB]]),EB=f.defineComponent({name:"VsNumberValue",props:{data:{type:Object},name:String},computed:{formattedValue(){try{return new Intl.NumberFormat("ua",{notation:"compact"}).format(this.data[this.name])}catch(n){return console.error("Formatting error:",n.message),this.value}}}}),CB={class:"block w-full pr-[10px] text-left"};function TB(n,e,t,i,r,a){return f.openBlock(),f.createElementBlock("span",CB,f.toDisplayString(n.formattedValue),1)}const Z1=Ue(EB,[["render",TB]]),MB={class:"text-start"},Y1={__name:"vs-format-slot",props:{column:Object,data:Object,table:String,data:Object,name:String,value:null},setup(n){var r,a,u,l,m;const{asyncTemplateSlot:e}=(m=(l=(u=(a=(r=f.getCurrentInstance())==null?void 0:r.appContext)==null?void 0:a.app)==null?void 0:u.config)==null?void 0:l.globalProperties)==null?void 0:m.utils,t=f.getCurrentInstance().appContext.app,i=["data","column","table","name","value"];return t.component(n.name)||e(n.name,n.column.slot.content,i),(b,w)=>(f.openBlock(),f.createElementBlock("div",MB,[(f.openBlock(),f.createBlock(f.resolveDynamicComponent(n.name),{column:n.column,table:n.table,name:n.name,data:n.data,value:n.value},null,8,["column","table","name","data","value"]))]))}},AB={"table-format-text":yp,"table-format-select":Yx,"table-format-badge":Gx,"table-format-swetch":_p,"table-format-check":_p,"table-format-html":yp,"table-format-tags":Xx,"table-format-date":iy,"table-format-number":Z1,"table-format-slot":Y1};var PB=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function IB(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var X1={exports:{}};/**
46
46
  * MapLibre GL JS
47
47
  * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v4.7.0/LICENSE.txt
48
48
  */(function(n,e){(function(t,i){n.exports=i()})(PB,function(){var t={},i={};function r(u,l,m){if(i[u]=m,u==="index"){var b="var sharedModule = {}; ("+i.shared+")(sharedModule); ("+i.worker+")(sharedModule);",w={};return i.shared(w),i.index(t,w),typeof window<"u"&&t.setWorkerUrl(window.URL.createObjectURL(new Blob([b],{type:"text/javascript"}))),t}}r("shared",["exports"],function(u){function l(c,o,h,p){return new(h||(h=Promise))(function(_,k){function S(B){try{P(p.next(B))}catch(N){k(N)}}function T(B){try{P(p.throw(B))}catch(N){k(N)}}function P(B){var N;B.done?_(B.value):(N=B.value,N instanceof h?N:new h(function(L){L(N)})).then(S,T)}P((p=p.apply(c,o||[])).next())})}function m(c){return c&&c.__esModule&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c}typeof SuppressedError=="function"&&SuppressedError;var b=w;function w(c,o){this.x=c,this.y=o}w.prototype={clone:function(){return new w(this.x,this.y)},add:function(c){return this.clone()._add(c)},sub:function(c){return this.clone()._sub(c)},multByPoint:function(c){return this.clone()._multByPoint(c)},divByPoint:function(c){return this.clone()._divByPoint(c)},mult:function(c){return this.clone()._mult(c)},div:function(c){return this.clone()._div(c)},rotate:function(c){return this.clone()._rotate(c)},rotateAround:function(c,o){return this.clone()._rotateAround(c,o)},matMult:function(c){return this.clone()._matMult(c)},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(c){return this.x===c.x&&this.y===c.y},dist:function(c){return Math.sqrt(this.distSqr(c))},distSqr:function(c){var o=c.x-this.x,h=c.y-this.y;return o*o+h*h},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(c){return Math.atan2(this.y-c.y,this.x-c.x)},angleWith:function(c){return this.angleWithSep(c.x,c.y)},angleWithSep:function(c,o){return Math.atan2(this.x*o-this.y*c,this.x*c+this.y*o)},_matMult:function(c){var o=c[2]*this.x+c[3]*this.y;return this.x=c[0]*this.x+c[1]*this.y,this.y=o,this},_add:function(c){return this.x+=c.x,this.y+=c.y,this},_sub:function(c){return this.x-=c.x,this.y-=c.y,this},_mult:function(c){return this.x*=c,this.y*=c,this},_div:function(c){return this.x/=c,this.y/=c,this},_multByPoint:function(c){return this.x*=c.x,this.y*=c.y,this},_divByPoint:function(c){return this.x/=c.x,this.y/=c.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var c=this.y;return this.y=this.x,this.x=-c,this},_rotate:function(c){var o=Math.cos(c),h=Math.sin(c),p=h*this.x+o*this.y;return this.x=o*this.x-h*this.y,this.y=p,this},_rotateAround:function(c,o){var h=Math.cos(c),p=Math.sin(c),_=o.y+p*(this.x-o.x)+h*(this.y-o.y);return this.x=o.x+h*(this.x-o.x)-p*(this.y-o.y),this.y=_,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},w.convert=function(c){return c instanceof w?c:Array.isArray(c)?new w(c[0],c[1]):c};var E=m(b),C=A;function A(c,o,h,p){this.cx=3*c,this.bx=3*(h-c)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*o,this.by=3*(p-o)-this.cy,this.ay=1-this.cy-this.by,this.p1x=c,this.p1y=o,this.p2x=h,this.p2y=p}A.prototype={sampleCurveX:function(c){return((this.ax*c+this.bx)*c+this.cx)*c},sampleCurveY:function(c){return((this.ay*c+this.by)*c+this.cy)*c},sampleCurveDerivativeX:function(c){return(3*this.ax*c+2*this.bx)*c+this.cx},solveCurveX:function(c,o){if(o===void 0&&(o=1e-6),c<0)return 0;if(c>1)return 1;for(var h=c,p=0;p<8;p++){var _=this.sampleCurveX(h)-c;if(Math.abs(_)<o)return h;var k=this.sampleCurveDerivativeX(h);if(Math.abs(k)<1e-6)break;h-=_/k}var S=0,T=1;for(h=c,p=0;p<20&&(_=this.sampleCurveX(h),!(Math.abs(_-c)<o));p++)c>_?S=h:T=h,h=.5*(T-S)+S;return h},solve:function(c,o){return this.sampleCurveY(this.solveCurveX(c,o))}};var D=m(C);let R,$;function G(){return R==null&&(R=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),R}function ee(){if($==null&&($=!1,G())){const o=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(o){for(let p=0;p<5*5;p++){const _=4*p;o.fillStyle=`rgb(${_},${_+1},${_+2})`,o.fillRect(p%5,Math.floor(p/5),1,1)}const h=o.getImageData(0,0,5,5).data;for(let p=0;p<5*5*4;p++)if(p%4!=3&&h[p]!==p){$=!0;break}}}return $||!1}function ce(c,o,h,p){const _=new D(c,o,h,p);return k=>_.solve(k)}const U=ce(.25,.1,.25,1);function Me(c,o,h){return Math.min(h,Math.max(o,c))}function ke(c,o,h){const p=h-o,_=((c-o)%p+p)%p+o;return _===o?h:_}function Pe(c,...o){for(const h of o)for(const p in h)c[p]=h[p];return c}let $e=1;function Be(c,o,h){const p={};for(const _ in c)p[_]=o.call(this,c[_],_,c);return p}function pt(c,o,h){const p={};for(const _ in c)o.call(this,c[_],_,c)&&(p[_]=c[_]);return p}function tt(c){return Array.isArray(c)?c.map(tt):typeof c=="object"&&c?Be(c,tt):c}const Nt={};function rt(c){Nt[c]||(typeof console<"u"&&console.warn(c),Nt[c]=!0)}function Mt(c,o,h){return(h.y-c.y)*(o.x-c.x)>(o.y-c.y)*(h.x-c.x)}function Rt(c){return typeof WorkerGlobalScope<"u"&&c!==void 0&&c instanceof WorkerGlobalScope}let Ft=null;function zt(c){return typeof ImageBitmap<"u"&&c instanceof ImageBitmap}const Ht="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function yn(c,o,h,p,_){return l(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");const k=new VideoFrame(c,{timestamp:0});try{const S=k==null?void 0:k.format;if(!S||!S.startsWith("BGR")&&!S.startsWith("RGB"))throw new Error(`Unrecognized format ${S}`);const T=S.startsWith("BGR"),P=new Uint8ClampedArray(p*_*4);if(yield k.copyTo(P,function(B,N,L,j,W){const Y=4*Math.max(-N,0),K=(Math.max(0,L)-L)*j*4+Y,ie=4*j,oe=Math.max(0,N),be=Math.max(0,L);return{rect:{x:oe,y:be,width:Math.min(B.width,N+j)-oe,height:Math.min(B.height,L+W)-be},layout:[{offset:K,stride:ie}]}}(c,o,h,p,_)),T)for(let B=0;B<P.length;B+=4){const N=P[B];P[B]=P[B+2],P[B+2]=N}return P}finally{k.close()}})}let dn,wn;const pn="AbortError";function ti(){return new Error(pn)}const zn={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function In(c){return zn.REGISTERED_PROTOCOLS[c.substring(0,c.indexOf("://"))]}const Rn="global-dispatcher";class Ee extends Error{constructor(o,h,p,_){super(`AJAXError: ${h} (${o}): ${p}`),this.status=o,this.statusText=h,this.url=p,this.body=_}}const je=()=>Rt(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,Ye=function(c,o){if(/:\/\//.test(c.url)&&!/^https?:|^file:/.test(c.url)){const p=In(c.url);if(p)return p(c,o);if(Rt(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:c,targetMapId:Rn},o)}if(!(/^file:/.test(h=c.url)||/^file:/.test(je())&&!/^\w+:/.test(h))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(p,_){return l(this,void 0,void 0,function*(){const k=new Request(p.url,{method:p.method||"GET",body:p.body,credentials:p.credentials,headers:p.headers,cache:p.cache,referrer:je(),signal:_.signal});p.type!=="json"||k.headers.has("Accept")||k.headers.set("Accept","application/json");const S=yield fetch(k);if(!S.ok){const B=yield S.blob();throw new Ee(S.status,S.statusText,p.url,B)}let T;T=p.type==="arrayBuffer"||p.type==="image"?S.arrayBuffer():p.type==="json"?S.json():S.text();const P=yield T;if(_.signal.aborted)throw ti();return{data:P,cacheControl:S.headers.get("Cache-Control"),expires:S.headers.get("Expires")}})}(c,o);if(Rt(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:c,mustQueue:!0,targetMapId:Rn},o)}var h;return function(p,_){return new Promise((k,S)=>{var T;const P=new XMLHttpRequest;P.open(p.method||"GET",p.url,!0),p.type!=="arrayBuffer"&&p.type!=="image"||(P.responseType="arraybuffer");for(const B in p.headers)P.setRequestHeader(B,p.headers[B]);p.type==="json"&&(P.responseType="text",!((T=p.headers)===null||T===void 0)&&T.Accept||P.setRequestHeader("Accept","application/json")),P.withCredentials=p.credentials==="include",P.onerror=()=>{S(new Error(P.statusText))},P.onload=()=>{if(!_.signal.aborted)if((P.status>=200&&P.status<300||P.status===0)&&P.response!==null){let B=P.response;if(p.type==="json")try{B=JSON.parse(P.response)}catch(N){return void S(N)}k({data:B,cacheControl:P.getResponseHeader("Cache-Control"),expires:P.getResponseHeader("Expires")})}else{const B=new Blob([P.response],{type:P.getResponseHeader("Content-Type")});S(new Ee(P.status,P.statusText,p.url,B))}},_.signal.addEventListener("abort",()=>{P.abort(),S(ti())}),P.send(p.body)})}(c,o)};function ot(c){if(!c||c.indexOf("://")<=0||c.indexOf("data:image/")===0||c.indexOf("blob:")===0)return!0;const o=new URL(c),h=window.location;return o.protocol===h.protocol&&o.host===h.host}function Lt(c,o,h){h[c]&&h[c].indexOf(o)!==-1||(h[c]=h[c]||[],h[c].push(o))}function Qt(c,o,h){if(h&&h[c]){const p=h[c].indexOf(o);p!==-1&&h[c].splice(p,1)}}class At{constructor(o,h={}){Pe(this,h),this.type=o}}class Re extends At{constructor(o,h={}){super("error",Pe({error:o},h))}}class sn{on(o,h){return this._listeners=this._listeners||{},Lt(o,h,this._listeners),this}off(o,h){return Qt(o,h,this._listeners),Qt(o,h,this._oneTimeListeners),this}once(o,h){return h?(this._oneTimeListeners=this._oneTimeListeners||{},Lt(o,h,this._oneTimeListeners),this):new Promise(p=>this.once(o,p))}fire(o,h){typeof o=="string"&&(o=new At(o,h||{}));const p=o.type;if(this.listens(p)){o.target=this;const _=this._listeners&&this._listeners[p]?this._listeners[p].slice():[];for(const T of _)T.call(this,o);const k=this._oneTimeListeners&&this._oneTimeListeners[p]?this._oneTimeListeners[p].slice():[];for(const T of k)Qt(p,T,this._oneTimeListeners),T.call(this,o);const S=this._eventedParent;S&&(Pe(o,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),S.fire(o))}else o instanceof Re&&console.error(o.error);return this}listens(o){return this._listeners&&this._listeners[o]&&this._listeners[o].length>0||this._oneTimeListeners&&this._oneTimeListeners[o]&&this._oneTimeListeners[o].length>0||this._eventedParent&&this._eventedParent.listens(o)}setEventedParent(o,h){return this._eventedParent=o,this._eventedParentData=h,this}}var ve={$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 _n=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function mr(c,o){const h={};for(const p in c)p!=="ref"&&(h[p]=c[p]);return _n.forEach(p=>{p in o&&(h[p]=o[p])}),h}function qt(c,o){if(Array.isArray(c)){if(!Array.isArray(o)||c.length!==o.length)return!1;for(let h=0;h<c.length;h++)if(!qt(c[h],o[h]))return!1;return!0}if(typeof c=="object"&&c!==null&&o!==null){if(typeof o!="object"||Object.keys(c).length!==Object.keys(o).length)return!1;for(const h in c)if(!qt(c[h],o[h]))return!1;return!0}return c===o}function on(c,o){c.push(o)}function vi(c,o,h){on(h,{command:"addSource",args:[c,o[c]]})}function wi(c,o,h){on(o,{command:"removeSource",args:[c]}),h[c]=!0}function si(c,o,h,p){wi(c,h,p),vi(c,o,h)}function Wi(c,o,h){let p;for(p in c[h])if(Object.prototype.hasOwnProperty.call(c[h],p)&&p!=="data"&&!qt(c[h][p],o[h][p]))return!1;for(p in o[h])if(Object.prototype.hasOwnProperty.call(o[h],p)&&p!=="data"&&!qt(c[h][p],o[h][p]))return!1;return!0}function oi(c,o,h,p,_,k){c=c||{},o=o||{};for(const S in c)Object.prototype.hasOwnProperty.call(c,S)&&(qt(c[S],o[S])||h.push({command:k,args:[p,S,o[S],_]}));for(const S in o)Object.prototype.hasOwnProperty.call(o,S)&&!Object.prototype.hasOwnProperty.call(c,S)&&(qt(c[S],o[S])||h.push({command:k,args:[p,S,o[S],_]}))}function Oi(c){return c.id}function Qr(c,o){return c[o.id]=o,c}class Ve{constructor(o,h,p,_){this.message=(o?`${o}: `:"")+p,_&&(this.identifier=_),h!=null&&h.__line__&&(this.line=h.__line__)}}function Nr(c,...o){for(const h of o)for(const p in h)c[p]=h[p];return c}class ki extends Error{constructor(o,h){super(h),this.message=h,this.key=o}}class zr{constructor(o,h=[]){this.parent=o,this.bindings={};for(const[p,_]of h)this.bindings[p]=_}concat(o){return new zr(this,o)}get(o){if(this.bindings[o])return this.bindings[o];if(this.parent)return this.parent.get(o);throw new Error(`${o} not found in scope.`)}has(o){return!!this.bindings[o]||!!this.parent&&this.parent.has(o)}}const Ts={kind:"null"},Ge={kind:"number"},we={kind:"string"},Ne={kind:"boolean"},wt={kind:"color"},Wt={kind:"object"},Qe={kind:"value"},Ln={kind:"collator"},Kn={kind:"formatted"},Gi={kind:"padding"},gr={kind:"resolvedImage"},se={kind:"variableAnchorOffsetCollection"};function q(c,o){return{kind:"array",itemType:c,N:o}}function H(c){if(c.kind==="array"){const o=H(c.itemType);return typeof c.N=="number"?`array<${o}, ${c.N}>`:c.itemType.kind==="value"?"array":`array<${o}>`}return c.kind}const X=[Ts,Ge,we,Ne,wt,Kn,Wt,q(Qe),Gi,gr,se];function ne(c,o){if(o.kind==="error")return null;if(c.kind==="array"){if(o.kind==="array"&&(o.N===0&&o.itemType.kind==="value"||!ne(c.itemType,o.itemType))&&(typeof c.N!="number"||c.N===o.N))return null}else{if(c.kind===o.kind)return null;if(c.kind==="value"){for(const h of X)if(!ne(h,o))return null}}return`Expected ${H(c)} but found ${H(o)} instead.`}function de(c,o){return o.some(h=>h.kind===c.kind)}function fe(c,o){return o.some(h=>h==="null"?c===null:h==="array"?Array.isArray(c):h==="object"?c&&!Array.isArray(c)&&typeof c=="object":h===typeof c)}function _e(c,o){return c.kind==="array"&&o.kind==="array"?c.itemType.kind===o.itemType.kind&&typeof c.N=="number":c.kind===o.kind}const ue=.96422,Te=.82521,Oe=4/29,Se=6/29,qe=3*Se*Se,vt=Se*Se*Se,St=Math.PI/180,an=180/Math.PI;function Vt(c){return(c%=360)<0&&(c+=360),c}function ln([c,o,h,p]){let _,k;const S=ai((.2225045*(c=Kt(c))+.7168786*(o=Kt(o))+.0606169*(h=Kt(h)))/1);c===o&&o===h?_=k=S:(_=ai((.4360747*c+.3850649*o+.1430804*h)/ue),k=ai((.0139322*c+.0971045*o+.7141733*h)/Te));const T=116*S-16;return[T<0?0:T,500*(_-S),200*(S-k),p]}function Kt(c){return c<=.04045?c/12.92:Math.pow((c+.055)/1.055,2.4)}function ai(c){return c>vt?Math.pow(c,1/3):c/qe+Oe}function Zn([c,o,h,p]){let _=(c+16)/116,k=isNaN(o)?_:_+o/500,S=isNaN(h)?_:_-h/200;return _=1*kn(_),k=ue*kn(k),S=Te*kn(S),[Ut(3.1338561*k-1.6168667*_-.4906146*S),Ut(-.9787684*k+1.9161415*_+.033454*S),Ut(.0719453*k-.2289914*_+1.4052427*S),p]}function Ut(c){return(c=c<=.00304?12.92*c:1.055*Math.pow(c,1/2.4)-.055)<0?0:c>1?1:c}function kn(c){return c>Se?c*c*c:qe*(c-Oe)}function qn(c){return parseInt(c.padEnd(2,c),16)/255}function gi(c,o){return Si(o?c/100:c,0,1)}function Si(c,o,h){return Math.min(Math.max(o,c),h)}function Zi(c){return!c.some(Number.isNaN)}const Aa={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 Sn{constructor(o,h,p,_=1,k=!0){this.r=o,this.g=h,this.b=p,this.a=_,k||(this.r*=_,this.g*=_,this.b*=_,_||this.overwriteGetter("rgb",[o,h,p,_]))}static parse(o){if(o instanceof Sn)return o;if(typeof o!="string")return;const h=function(p){if((p=p.toLowerCase().trim())==="transparent")return[0,0,0,0];const _=Aa[p];if(_){const[S,T,P]=_;return[S/255,T/255,P/255,1]}if(p.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(p)){const S=p.length<6?1:2;let T=1;return[qn(p.slice(T,T+=S)),qn(p.slice(T,T+=S)),qn(p.slice(T,T+=S)),qn(p.slice(T,T+S)||"ff")]}if(p.startsWith("rgb")){const S=p.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(S){const[T,P,B,N,L,j,W,Y,K,ie,oe,be]=S,pe=[N||" ",W||" ",ie].join("");if(pe===" "||pe===" /"||pe===",,"||pe===",,,"){const ye=[B,j,K].join(""),Ce=ye==="%%%"?100:ye===""?255:0;if(Ce){const ze=[Si(+P/Ce,0,1),Si(+L/Ce,0,1),Si(+Y/Ce,0,1),oe?gi(+oe,be):1];if(Zi(ze))return ze}}return}}const k=p.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(k){const[S,T,P,B,N,L,j,W,Y]=k,K=[P||" ",N||" ",j].join("");if(K===" "||K===" /"||K===",,"||K===",,,"){const ie=[+T,Si(+B,0,100),Si(+L,0,100),W?gi(+W,Y):1];if(Zi(ie))return function([oe,be,pe,ye]){function Ce(ze){const it=(ze+oe/30)%12,Et=be*Math.min(pe,1-pe);return pe-Et*Math.max(-1,Math.min(it-3,9-it,1))}return oe=Vt(oe),be/=100,pe/=100,[Ce(0),Ce(8),Ce(4),ye]}(ie)}}}(o);return h?new Sn(...h,!1):void 0}get rgb(){const{r:o,g:h,b:p,a:_}=this,k=_||1/0;return this.overwriteGetter("rgb",[o/k,h/k,p/k,_])}get hcl(){return this.overwriteGetter("hcl",function(o){const[h,p,_,k]=ln(o),S=Math.sqrt(p*p+_*_);return[Math.round(1e4*S)?Vt(Math.atan2(_,p)*an):NaN,S,h,k]}(this.rgb))}get lab(){return this.overwriteGetter("lab",ln(this.rgb))}overwriteGetter(o,h){return Object.defineProperty(this,o,{value:h}),h}toString(){const[o,h,p,_]=this.rgb;return`rgba(${[o,h,p].map(k=>Math.round(255*k)).join(",")},${_})`}}Sn.black=new Sn(0,0,0,1),Sn.white=new Sn(1,1,1,1),Sn.transparent=new Sn(0,0,0,0),Sn.red=new Sn(1,0,0,1);class Xh{constructor(o,h,p){this.sensitivity=o?h?"variant":"case":h?"accent":"base",this.locale=p,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(o,h){return this.collator.compare(o,h)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Kh{constructor(o,h,p,_,k){this.text=o,this.image=h,this.scale=p,this.fontStack=_,this.textColor=k}}class yr{constructor(o){this.sections=o}static fromString(o){return new yr([new Kh(o,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(o=>o.text.length!==0||o.image&&o.image.name.length!==0)}static factory(o){return o instanceof yr?o:yr.fromString(o)}toString(){return this.sections.length===0?"":this.sections.map(o=>o.text).join("")}}class _r{constructor(o){this.values=o.slice()}static parse(o){if(o instanceof _r)return o;if(typeof o=="number")return new _r([o,o,o,o]);if(Array.isArray(o)&&!(o.length<1||o.length>4)){for(const h of o)if(typeof h!="number")return;switch(o.length){case 1:o=[o[0],o[0],o[0],o[0]];break;case 2:o=[o[0],o[1],o[0],o[1]];break;case 3:o=[o[0],o[1],o[2],o[1]]}return new _r(o)}}toString(){return JSON.stringify(this.values)}}const l_=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class Rr{constructor(o){this.values=o.slice()}static parse(o){if(o instanceof Rr)return o;if(Array.isArray(o)&&!(o.length<1)&&o.length%2==0){for(let h=0;h<o.length;h+=2){const p=o[h],_=o[h+1];if(typeof p!="string"||!l_.has(p)||!Array.isArray(_)||_.length!==2||typeof _[0]!="number"||typeof _[1]!="number")return}return new Rr(o)}}toString(){return JSON.stringify(this.values)}}class br{constructor(o){this.name=o.name,this.available=o.available}toString(){return this.name}static fromString(o){return o?new br({name:o,available:!1}):null}}function Pa(c,o,h,p){return typeof c=="number"&&c>=0&&c<=255&&typeof o=="number"&&o>=0&&o<=255&&typeof h=="number"&&h>=0&&h<=255?p===void 0||typeof p=="number"&&p>=0&&p<=1?null:`Invalid rgba value [${[c,o,h,p].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof p=="number"?[c,o,h,p]:[c,o,h]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Vo(c){if(c===null||typeof c=="string"||typeof c=="boolean"||typeof c=="number"||c instanceof Sn||c instanceof Xh||c instanceof yr||c instanceof _r||c instanceof Rr||c instanceof br)return!0;if(Array.isArray(c)){for(const o of c)if(!Vo(o))return!1;return!0}if(typeof c=="object"){for(const o in c)if(!Vo(c[o]))return!1;return!0}return!1}function li(c){if(c===null)return Ts;if(typeof c=="string")return we;if(typeof c=="boolean")return Ne;if(typeof c=="number")return Ge;if(c instanceof Sn)return wt;if(c instanceof Xh)return Ln;if(c instanceof yr)return Kn;if(c instanceof _r)return Gi;if(c instanceof Rr)return se;if(c instanceof br)return gr;if(Array.isArray(c)){const o=c.length;let h;for(const p of c){const _=li(p);if(h){if(h===_)continue;h=Qe;break}h=_}return q(h||Qe,o)}return Wt}function Rl(c){const o=typeof c;return c===null?"":o==="string"||o==="number"||o==="boolean"?String(c):c instanceof Sn||c instanceof yr||c instanceof _r||c instanceof Rr||c instanceof br?c.toString():JSON.stringify(c)}class es{constructor(o,h){this.type=o,this.value=h}static parse(o,h){if(o.length!==2)return h.error(`'literal' expression requires exactly one argument, but found ${o.length-1} instead.`);if(!Vo(o[1]))return h.error("invalid value");const p=o[1];let _=li(p);const k=h.expectedType;return _.kind!=="array"||_.N!==0||!k||k.kind!=="array"||typeof k.N=="number"&&k.N!==0||(_=k),new es(_,p)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class ni{constructor(o){this.name="ExpressionEvaluationError",this.message=o}toJSON(){return this.message}}const eu={string:we,number:Ge,boolean:Ne,object:Wt};class ts{constructor(o,h){this.type=o,this.args=h}static parse(o,h){if(o.length<2)return h.error("Expected at least one argument.");let p,_=1;const k=o[0];if(k==="array"){let T,P;if(o.length>2){const B=o[1];if(typeof B!="string"||!(B in eu)||B==="object")return h.error('The item type argument of "array" must be one of string, number, boolean',1);T=eu[B],_++}else T=Qe;if(o.length>3){if(o[2]!==null&&(typeof o[2]!="number"||o[2]<0||o[2]!==Math.floor(o[2])))return h.error('The length argument to "array" must be a positive integer literal',2);P=o[2],_++}p=q(T,P)}else{if(!eu[k])throw new Error(`Types doesn't contain name = ${k}`);p=eu[k]}const S=[];for(;_<o.length;_++){const T=h.parse(o[_],_,Qe);if(!T)return null;S.push(T)}return new ts(p,S)}evaluate(o){for(let h=0;h<this.args.length;h++){const p=this.args[h].evaluate(o);if(!ne(this.type,li(p)))return p;if(h===this.args.length-1)throw new ni(`Expected value to be of type ${H(this.type)}, but found ${H(li(p))} instead.`)}throw new Error}eachChild(o){this.args.forEach(o)}outputDefined(){return this.args.every(o=>o.outputDefined())}}const Jh={"to-boolean":Ne,"to-color":wt,"to-number":Ge,"to-string":we};class ns{constructor(o,h){this.type=o,this.args=h}static parse(o,h){if(o.length<2)return h.error("Expected at least one argument.");const p=o[0];if(!Jh[p])throw new Error(`Can't parse ${p} as it is not part of the known types`);if((p==="to-boolean"||p==="to-string")&&o.length!==2)return h.error("Expected one argument.");const _=Jh[p],k=[];for(let S=1;S<o.length;S++){const T=h.parse(o[S],S,Qe);if(!T)return null;k.push(T)}return new ns(_,k)}evaluate(o){switch(this.type.kind){case"boolean":return!!this.args[0].evaluate(o);case"color":{let h,p;for(const _ of this.args){if(h=_.evaluate(o),p=null,h instanceof Sn)return h;if(typeof h=="string"){const k=o.parseColor(h);if(k)return k}else if(Array.isArray(h)&&(p=h.length<3||h.length>4?`Invalid rbga value ${JSON.stringify(h)}: expected an array containing either three or four numeric values.`:Pa(h[0],h[1],h[2],h[3]),!p))return new Sn(h[0]/255,h[1]/255,h[2]/255,h[3])}throw new ni(p||`Could not parse color from value '${typeof h=="string"?h:JSON.stringify(h)}'`)}case"padding":{let h;for(const p of this.args){h=p.evaluate(o);const _=_r.parse(h);if(_)return _}throw new ni(`Could not parse padding from value '${typeof h=="string"?h:JSON.stringify(h)}'`)}case"variableAnchorOffsetCollection":{let h;for(const p of this.args){h=p.evaluate(o);const _=Rr.parse(h);if(_)return _}throw new ni(`Could not parse variableAnchorOffsetCollection from value '${typeof h=="string"?h:JSON.stringify(h)}'`)}case"number":{let h=null;for(const p of this.args){if(h=p.evaluate(o),h===null)return 0;const _=Number(h);if(!isNaN(_))return _}throw new ni(`Could not convert ${JSON.stringify(h)} to number.`)}case"formatted":return yr.fromString(Rl(this.args[0].evaluate(o)));case"resolvedImage":return br.fromString(Rl(this.args[0].evaluate(o)));default:return Rl(this.args[0].evaluate(o))}}eachChild(o){this.args.forEach(o)}outputDefined(){return this.args.every(o=>o.outputDefined())}}const c_=["Unknown","Point","LineString","Polygon"];class tu{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"?c_[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(o){let h=this._parseColorCache[o];return h||(h=this._parseColorCache[o]=Sn.parse(o)),h}}class Fo{constructor(o,h,p=[],_,k=new zr,S=[]){this.registry=o,this.path=p,this.key=p.map(T=>`[${T}]`).join(""),this.scope=k,this.errors=S,this.expectedType=_,this._isConstant=h}parse(o,h,p,_,k={}){return h?this.concat(h,p,_)._parse(o,k):this._parse(o,k)}_parse(o,h){function p(_,k,S){return S==="assert"?new ts(k,[_]):S==="coerce"?new ns(k,[_]):_}if(o!==null&&typeof o!="string"&&typeof o!="boolean"&&typeof o!="number"||(o=["literal",o]),Array.isArray(o)){if(o.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const _=o[0];if(typeof _!="string")return this.error(`Expression name must be a string, but found ${typeof _} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const k=this.registry[_];if(k){let S=k.parse(o,this);if(!S)return null;if(this.expectedType){const T=this.expectedType,P=S.type;if(T.kind!=="string"&&T.kind!=="number"&&T.kind!=="boolean"&&T.kind!=="object"&&T.kind!=="array"||P.kind!=="value")if(T.kind!=="color"&&T.kind!=="formatted"&&T.kind!=="resolvedImage"||P.kind!=="value"&&P.kind!=="string")if(T.kind!=="padding"||P.kind!=="value"&&P.kind!=="number"&&P.kind!=="array")if(T.kind!=="variableAnchorOffsetCollection"||P.kind!=="value"&&P.kind!=="array"){if(this.checkSubtype(T,P))return null}else S=p(S,T,h.typeAnnotation||"coerce");else S=p(S,T,h.typeAnnotation||"coerce");else S=p(S,T,h.typeAnnotation||"coerce");else S=p(S,T,h.typeAnnotation||"assert")}if(!(S instanceof es)&&S.type.kind!=="resolvedImage"&&this._isConstant(S)){const T=new tu;try{S=new es(S.type,S.evaluate(T))}catch(P){return this.error(P.message),null}}return S}return this.error(`Unknown expression "${_}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(o===void 0?"'undefined' value invalid. Use null instead.":typeof o=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof o} instead.`)}concat(o,h,p){const _=typeof o=="number"?this.path.concat(o):this.path,k=p?this.scope.concat(p):this.scope;return new Fo(this.registry,this._isConstant,_,h||null,k,this.errors)}error(o,...h){const p=`${this.key}${h.map(_=>`[${_}]`).join("")}`;this.errors.push(new ki(p,o))}checkSubtype(o,h){const p=ne(o,h);return p&&this.error(p),p}}class uo{constructor(o,h){this.type=h.type,this.bindings=[].concat(o),this.result=h}evaluate(o){return this.result.evaluate(o)}eachChild(o){for(const h of this.bindings)o(h[1]);o(this.result)}static parse(o,h){if(o.length<4)return h.error(`Expected at least 3 arguments, but found ${o.length-1} instead.`);const p=[];for(let k=1;k<o.length-1;k+=2){const S=o[k];if(typeof S!="string")return h.error(`Expected string, but found ${typeof S} instead.`,k);if(/[^a-zA-Z0-9_]/.test(S))return h.error("Variable names must contain only alphanumeric characters or '_'.",k);const T=h.parse(o[k+1],k+1);if(!T)return null;p.push([S,T])}const _=h.parse(o[o.length-1],o.length-1,h.expectedType,p);return _?new uo(p,_):null}outputDefined(){return this.result.outputDefined()}}class fn{constructor(o,h){this.type=h.type,this.name=o,this.boundExpression=h}static parse(o,h){if(o.length!==2||typeof o[1]!="string")return h.error("'var' expression requires exactly one string literal argument.");const p=o[1];return h.scope.has(p)?new fn(p,h.scope.get(p)):h.error(`Unknown variable "${p}". Make sure "${p}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(o){return this.boundExpression.evaluate(o)}eachChild(){}outputDefined(){return!1}}class Qh{constructor(o,h,p){this.type=o,this.index=h,this.input=p}static parse(o,h){if(o.length!==3)return h.error(`Expected 2 arguments, but found ${o.length-1} instead.`);const p=h.parse(o[1],1,Ge),_=h.parse(o[2],2,q(h.expectedType||Qe));return p&&_?new Qh(_.type.itemType,p,_):null}evaluate(o){const h=this.index.evaluate(o),p=this.input.evaluate(o);if(h<0)throw new ni(`Array index out of bounds: ${h} < 0.`);if(h>=p.length)throw new ni(`Array index out of bounds: ${h} > ${p.length-1}.`);if(h!==Math.floor(h))throw new ni(`Array index must be an integer, but found ${h} instead.`);return p[h]}eachChild(o){o(this.index),o(this.input)}outputDefined(){return!1}}class ed{constructor(o,h){this.type=Ne,this.needle=o,this.haystack=h}static parse(o,h){if(o.length!==3)return h.error(`Expected 2 arguments, but found ${o.length-1} instead.`);const p=h.parse(o[1],1,Qe),_=h.parse(o[2],2,Qe);return p&&_?de(p.type,[Ne,we,Ge,Ts,Qe])?new ed(p,_):h.error(`Expected first argument to be of type boolean, string, number or null, but found ${H(p.type)} instead`):null}evaluate(o){const h=this.needle.evaluate(o),p=this.haystack.evaluate(o);if(!p)return!1;if(!fe(h,["boolean","string","number","null"]))throw new ni(`Expected first argument to be of type boolean, string, number or null, but found ${H(li(h))} instead.`);if(!fe(p,["string","array"]))throw new ni(`Expected second argument to be of type array or string, but found ${H(li(p))} instead.`);return p.indexOf(h)>=0}eachChild(o){o(this.needle),o(this.haystack)}outputDefined(){return!0}}class Ia{constructor(o,h,p){this.type=Ge,this.needle=o,this.haystack=h,this.fromIndex=p}static parse(o,h){if(o.length<=2||o.length>=5)return h.error(`Expected 3 or 4 arguments, but found ${o.length-1} instead.`);const p=h.parse(o[1],1,Qe),_=h.parse(o[2],2,Qe);if(!p||!_)return null;if(!de(p.type,[Ne,we,Ge,Ts,Qe]))return h.error(`Expected first argument to be of type boolean, string, number or null, but found ${H(p.type)} instead`);if(o.length===4){const k=h.parse(o[3],3,Ge);return k?new Ia(p,_,k):null}return new Ia(p,_)}evaluate(o){const h=this.needle.evaluate(o),p=this.haystack.evaluate(o);if(!fe(h,["boolean","string","number","null"]))throw new ni(`Expected first argument to be of type boolean, string, number or null, but found ${H(li(h))} instead.`);let _;if(this.fromIndex&&(_=this.fromIndex.evaluate(o)),fe(p,["string"])){const k=p.indexOf(h,_);return k===-1?-1:[...p.slice(0,k)].length}if(fe(p,["array"]))return p.indexOf(h,_);throw new ni(`Expected second argument to be of type array or string, but found ${H(li(p))} instead.`)}eachChild(o){o(this.needle),o(this.haystack),this.fromIndex&&o(this.fromIndex)}outputDefined(){return!1}}class td{constructor(o,h,p,_,k,S){this.inputType=o,this.type=h,this.input=p,this.cases=_,this.outputs=k,this.otherwise=S}static parse(o,h){if(o.length<5)return h.error(`Expected at least 4 arguments, but found only ${o.length-1}.`);if(o.length%2!=1)return h.error("Expected an even number of arguments.");let p,_;h.expectedType&&h.expectedType.kind!=="value"&&(_=h.expectedType);const k={},S=[];for(let B=2;B<o.length-1;B+=2){let N=o[B];const L=o[B+1];Array.isArray(N)||(N=[N]);const j=h.concat(B);if(N.length===0)return j.error("Expected at least one branch label.");for(const Y of N){if(typeof Y!="number"&&typeof Y!="string")return j.error("Branch labels must be numbers or strings.");if(typeof Y=="number"&&Math.abs(Y)>Number.MAX_SAFE_INTEGER)return j.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof Y=="number"&&Math.floor(Y)!==Y)return j.error("Numeric branch labels must be integer values.");if(p){if(j.checkSubtype(p,li(Y)))return null}else p=li(Y);if(k[String(Y)]!==void 0)return j.error("Branch labels must be unique.");k[String(Y)]=S.length}const W=h.parse(L,B,_);if(!W)return null;_=_||W.type,S.push(W)}const T=h.parse(o[1],1,Qe);if(!T)return null;const P=h.parse(o[o.length-1],o.length-1,_);return P?T.type.kind!=="value"&&h.concat(1).checkSubtype(p,T.type)?null:new td(p,_,T,k,S,P):null}evaluate(o){const h=this.input.evaluate(o);return(li(h)===this.inputType&&this.outputs[this.cases[h]]||this.otherwise).evaluate(o)}eachChild(o){o(this.input),this.outputs.forEach(o),o(this.otherwise)}outputDefined(){return this.outputs.every(o=>o.outputDefined())&&this.otherwise.outputDefined()}}class nu{constructor(o,h,p){this.type=o,this.branches=h,this.otherwise=p}static parse(o,h){if(o.length<4)return h.error(`Expected at least 3 arguments, but found only ${o.length-1}.`);if(o.length%2!=0)return h.error("Expected an odd number of arguments.");let p;h.expectedType&&h.expectedType.kind!=="value"&&(p=h.expectedType);const _=[];for(let S=1;S<o.length-1;S+=2){const T=h.parse(o[S],S,Ne);if(!T)return null;const P=h.parse(o[S+1],S+1,p);if(!P)return null;_.push([T,P]),p=p||P.type}const k=h.parse(o[o.length-1],o.length-1,p);if(!k)return null;if(!p)throw new Error("Can't infer output type");return new nu(p,_,k)}evaluate(o){for(const[h,p]of this.branches)if(h.evaluate(o))return p.evaluate(o);return this.otherwise.evaluate(o)}eachChild(o){for(const[h,p]of this.branches)o(h),o(p);o(this.otherwise)}outputDefined(){return this.branches.every(([o,h])=>h.outputDefined())&&this.otherwise.outputDefined()}}class Ll{constructor(o,h,p,_){this.type=o,this.input=h,this.beginIndex=p,this.endIndex=_}static parse(o,h){if(o.length<=2||o.length>=5)return h.error(`Expected 3 or 4 arguments, but found ${o.length-1} instead.`);const p=h.parse(o[1],1,Qe),_=h.parse(o[2],2,Ge);if(!p||!_)return null;if(!de(p.type,[q(Qe),we,Qe]))return h.error(`Expected first argument to be of type array or string, but found ${H(p.type)} instead`);if(o.length===4){const k=h.parse(o[3],3,Ge);return k?new Ll(p.type,p,_,k):null}return new Ll(p.type,p,_)}evaluate(o){const h=this.input.evaluate(o),p=this.beginIndex.evaluate(o);let _;if(this.endIndex&&(_=this.endIndex.evaluate(o)),fe(h,["string"]))return[...h].slice(p,_).join("");if(fe(h,["array"]))return h.slice(p,_);throw new ni(`Expected first argument to be of type array or string, but found ${H(li(h))} instead.`)}eachChild(o){o(this.input),o(this.beginIndex),this.endIndex&&o(this.endIndex)}outputDefined(){return!1}}function iu(c,o){const h=c.length-1;let p,_,k=0,S=h,T=0;for(;k<=S;)if(T=Math.floor((k+S)/2),p=c[T],_=c[T+1],p<=o){if(T===h||o<_)return T;k=T+1}else{if(!(p>o))throw new ni("Input is not a number.");S=T-1}return 0}class Da{constructor(o,h,p){this.type=o,this.input=h,this.labels=[],this.outputs=[];for(const[_,k]of p)this.labels.push(_),this.outputs.push(k)}static parse(o,h){if(o.length-1<4)return h.error(`Expected at least 4 arguments, but found only ${o.length-1}.`);if((o.length-1)%2!=0)return h.error("Expected an even number of arguments.");const p=h.parse(o[1],1,Ge);if(!p)return null;const _=[];let k=null;h.expectedType&&h.expectedType.kind!=="value"&&(k=h.expectedType);for(let S=1;S<o.length;S+=2){const T=S===1?-1/0:o[S],P=o[S+1],B=S,N=S+1;if(typeof T!="number")return h.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',B);if(_.length&&_[_.length-1][0]>=T)return h.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',B);const L=h.parse(P,N,k);if(!L)return null;k=k||L.type,_.push([T,L])}return new Da(k,p,_)}evaluate(o){const h=this.labels,p=this.outputs;if(h.length===1)return p[0].evaluate(o);const _=this.input.evaluate(o);if(_<=h[0])return p[0].evaluate(o);const k=h.length;return _>=h[k-1]?p[k-1].evaluate(o):p[iu(h,_)].evaluate(o)}eachChild(o){o(this.input);for(const h of this.outputs)o(h)}outputDefined(){return this.outputs.every(o=>o.outputDefined())}}function Zf(c){return c&&c.__esModule&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c}var u_=Yf;function Yf(c,o,h,p){this.cx=3*c,this.bx=3*(h-c)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*o,this.by=3*(p-o)-this.cy,this.ay=1-this.cy-this.by,this.p1x=c,this.p1y=o,this.p2x=h,this.p2y=p}Yf.prototype={sampleCurveX:function(c){return((this.ax*c+this.bx)*c+this.cx)*c},sampleCurveY:function(c){return((this.ay*c+this.by)*c+this.cy)*c},sampleCurveDerivativeX:function(c){return(3*this.ax*c+2*this.bx)*c+this.cx},solveCurveX:function(c,o){if(o===void 0&&(o=1e-6),c<0)return 0;if(c>1)return 1;for(var h=c,p=0;p<8;p++){var _=this.sampleCurveX(h)-c;if(Math.abs(_)<o)return h;var k=this.sampleCurveDerivativeX(h);if(Math.abs(k)<1e-6)break;h-=_/k}var S=0,T=1;for(h=c,p=0;p<20&&(_=this.sampleCurveX(h),!(Math.abs(_-c)<o));p++)c>_?S=h:T=h,h=.5*(T-S)+S;return h},solve:function(c,o){return this.sampleCurveY(this.solveCurveX(c,o))}};var h_=Zf(u_);function $o(c,o,h){return c+h*(o-c)}function Vl(c,o,h){return c.map((p,_)=>$o(p,o[_],h))}const rr={number:$o,color:function(c,o,h,p="rgb"){switch(p){case"rgb":{const[_,k,S,T]=Vl(c.rgb,o.rgb,h);return new Sn(_,k,S,T,!1)}case"hcl":{const[_,k,S,T]=c.hcl,[P,B,N,L]=o.hcl;let j,W;if(isNaN(_)||isNaN(P))isNaN(_)?isNaN(P)?j=NaN:(j=P,S!==1&&S!==0||(W=B)):(j=_,N!==1&&N!==0||(W=k));else{let be=P-_;P>_&&be>180?be-=360:P<_&&_-P>180&&(be+=360),j=_+h*be}const[Y,K,ie,oe]=function([be,pe,ye,Ce]){return be=isNaN(be)?0:be*St,Zn([ye,Math.cos(be)*pe,Math.sin(be)*pe,Ce])}([j,W??$o(k,B,h),$o(S,N,h),$o(T,L,h)]);return new Sn(Y,K,ie,oe,!1)}case"lab":{const[_,k,S,T]=Zn(Vl(c.lab,o.lab,h));return new Sn(_,k,S,T,!1)}}},array:Vl,padding:function(c,o,h){return new _r(Vl(c.values,o.values,h))},variableAnchorOffsetCollection:function(c,o,h){const p=c.values,_=o.values;if(p.length!==_.length)throw new ni(`Cannot interpolate values of different length. from: ${c.toString()}, to: ${o.toString()}`);const k=[];for(let S=0;S<p.length;S+=2){if(p[S]!==_[S])throw new ni(`Cannot interpolate values containing mismatched anchors. from[${S}]: ${p[S]}, to[${S}]: ${_[S]}`);k.push(p[S]);const[T,P]=p[S+1],[B,N]=_[S+1];k.push([$o(T,B,h),$o(P,N,h)])}return new Rr(k)}};class sr{constructor(o,h,p,_,k){this.type=o,this.operator=h,this.interpolation=p,this.input=_,this.labels=[],this.outputs=[];for(const[S,T]of k)this.labels.push(S),this.outputs.push(T)}static interpolationFactor(o,h,p,_){let k=0;if(o.name==="exponential")k=ru(h,o.base,p,_);else if(o.name==="linear")k=ru(h,1,p,_);else if(o.name==="cubic-bezier"){const S=o.controlPoints;k=new h_(S[0],S[1],S[2],S[3]).solve(ru(h,1,p,_))}return k}static parse(o,h){let[p,_,k,...S]=o;if(!Array.isArray(_)||_.length===0)return h.error("Expected an interpolation type expression.",1);if(_[0]==="linear")_={name:"linear"};else if(_[0]==="exponential"){const B=_[1];if(typeof B!="number")return h.error("Exponential interpolation requires a numeric base.",1,1);_={name:"exponential",base:B}}else{if(_[0]!=="cubic-bezier")return h.error(`Unknown interpolation type ${String(_[0])}`,1,0);{const B=_.slice(1);if(B.length!==4||B.some(N=>typeof N!="number"||N<0||N>1))return h.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);_={name:"cubic-bezier",controlPoints:B}}}if(o.length-1<4)return h.error(`Expected at least 4 arguments, but found only ${o.length-1}.`);if((o.length-1)%2!=0)return h.error("Expected an even number of arguments.");if(k=h.parse(k,2,Ge),!k)return null;const T=[];let P=null;p==="interpolate-hcl"||p==="interpolate-lab"?P=wt:h.expectedType&&h.expectedType.kind!=="value"&&(P=h.expectedType);for(let B=0;B<S.length;B+=2){const N=S[B],L=S[B+1],j=B+3,W=B+4;if(typeof N!="number")return h.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',j);if(T.length&&T[T.length-1][0]>=N)return h.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',j);const Y=h.parse(L,W,P);if(!Y)return null;P=P||Y.type,T.push([N,Y])}return _e(P,Ge)||_e(P,wt)||_e(P,Gi)||_e(P,se)||_e(P,q(Ge))?new sr(P,p,_,k,T):h.error(`Type ${H(P)} is not interpolatable.`)}evaluate(o){const h=this.labels,p=this.outputs;if(h.length===1)return p[0].evaluate(o);const _=this.input.evaluate(o);if(_<=h[0])return p[0].evaluate(o);const k=h.length;if(_>=h[k-1])return p[k-1].evaluate(o);const S=iu(h,_),T=sr.interpolationFactor(this.interpolation,_,h[S],h[S+1]),P=p[S].evaluate(o),B=p[S+1].evaluate(o);switch(this.operator){case"interpolate":return rr[this.type.kind](P,B,T);case"interpolate-hcl":return rr.color(P,B,T,"hcl");case"interpolate-lab":return rr.color(P,B,T,"lab")}}eachChild(o){o(this.input);for(const h of this.outputs)o(h)}outputDefined(){return this.outputs.every(o=>o.outputDefined())}}function ru(c,o,h,p){const _=p-h,k=c-h;return _===0?0:o===1?k/_:(Math.pow(o,k)-1)/(Math.pow(o,_)-1)}class su{constructor(o,h){this.type=o,this.args=h}static parse(o,h){if(o.length<2)return h.error("Expectected at least one argument.");let p=null;const _=h.expectedType;_&&_.kind!=="value"&&(p=_);const k=[];for(const T of o.slice(1)){const P=h.parse(T,1+k.length,p,void 0,{typeAnnotation:"omit"});if(!P)return null;p=p||P.type,k.push(P)}if(!p)throw new Error("No output type");const S=_&&k.some(T=>ne(_,T.type));return new su(S?Qe:p,k)}evaluate(o){let h,p=null,_=0;for(const k of this.args)if(_++,p=k.evaluate(o),p&&p instanceof br&&!p.available&&(h||(h=p.name),p=null,_===this.args.length&&(p=h)),p!==null)break;return p}eachChild(o){this.args.forEach(o)}outputDefined(){return this.args.every(o=>o.outputDefined())}}function ou(c,o){return c==="=="||c==="!="?o.kind==="boolean"||o.kind==="string"||o.kind==="number"||o.kind==="null"||o.kind==="value":o.kind==="string"||o.kind==="number"||o.kind==="value"}function Xf(c,o,h,p){return p.compare(o,h)===0}function Oa(c,o,h){const p=c!=="=="&&c!=="!=";return class AC{constructor(k,S,T){this.type=Ne,this.lhs=k,this.rhs=S,this.collator=T,this.hasUntypedArgument=k.type.kind==="value"||S.type.kind==="value"}static parse(k,S){if(k.length!==3&&k.length!==4)return S.error("Expected two or three arguments.");const T=k[0];let P=S.parse(k[1],1,Qe);if(!P)return null;if(!ou(T,P.type))return S.concat(1).error(`"${T}" comparisons are not supported for type '${H(P.type)}'.`);let B=S.parse(k[2],2,Qe);if(!B)return null;if(!ou(T,B.type))return S.concat(2).error(`"${T}" comparisons are not supported for type '${H(B.type)}'.`);if(P.type.kind!==B.type.kind&&P.type.kind!=="value"&&B.type.kind!=="value")return S.error(`Cannot compare types '${H(P.type)}' and '${H(B.type)}'.`);p&&(P.type.kind==="value"&&B.type.kind!=="value"?P=new ts(B.type,[P]):P.type.kind!=="value"&&B.type.kind==="value"&&(B=new ts(P.type,[B])));let N=null;if(k.length===4){if(P.type.kind!=="string"&&B.type.kind!=="string"&&P.type.kind!=="value"&&B.type.kind!=="value")return S.error("Cannot use collator to compare non-string types.");if(N=S.parse(k[3],3,Ln),!N)return null}return new AC(P,B,N)}evaluate(k){const S=this.lhs.evaluate(k),T=this.rhs.evaluate(k);if(p&&this.hasUntypedArgument){const P=li(S),B=li(T);if(P.kind!==B.kind||P.kind!=="string"&&P.kind!=="number")throw new ni(`Expected arguments for "${c}" to be (string, string) or (number, number), but found (${P.kind}, ${B.kind}) instead.`)}if(this.collator&&!p&&this.hasUntypedArgument){const P=li(S),B=li(T);if(P.kind!=="string"||B.kind!=="string")return o(k,S,T)}return this.collator?h(k,S,T,this.collator.evaluate(k)):o(k,S,T)}eachChild(k){k(this.lhs),k(this.rhs),this.collator&&k(this.collator)}outputDefined(){return!0}}}const d_=Oa("==",function(c,o,h){return o===h},Xf),Kf=Oa("!=",function(c,o,h){return o!==h},function(c,o,h,p){return!Xf(0,o,h,p)}),Jf=Oa("<",function(c,o,h){return o<h},function(c,o,h,p){return p.compare(o,h)<0}),p_=Oa(">",function(c,o,h){return o>h},function(c,o,h,p){return p.compare(o,h)>0}),f_=Oa("<=",function(c,o,h){return o<=h},function(c,o,h,p){return p.compare(o,h)<=0}),Qf=Oa(">=",function(c,o,h){return o>=h},function(c,o,h,p){return p.compare(o,h)>=0});class Fl{constructor(o,h,p){this.type=Ln,this.locale=p,this.caseSensitive=o,this.diacriticSensitive=h}static parse(o,h){if(o.length!==2)return h.error("Expected one argument.");const p=o[1];if(typeof p!="object"||Array.isArray(p))return h.error("Collator options argument must be an object.");const _=h.parse(p["case-sensitive"]!==void 0&&p["case-sensitive"],1,Ne);if(!_)return null;const k=h.parse(p["diacritic-sensitive"]!==void 0&&p["diacritic-sensitive"],1,Ne);if(!k)return null;let S=null;return p.locale&&(S=h.parse(p.locale,1,we),!S)?null:new Fl(_,k,S)}evaluate(o){return new Xh(this.caseSensitive.evaluate(o),this.diacriticSensitive.evaluate(o),this.locale?this.locale.evaluate(o):null)}eachChild(o){o(this.caseSensitive),o(this.diacriticSensitive),this.locale&&o(this.locale)}outputDefined(){return!1}}class nd{constructor(o,h,p,_,k){this.type=we,this.number=o,this.locale=h,this.currency=p,this.minFractionDigits=_,this.maxFractionDigits=k}static parse(o,h){if(o.length!==3)return h.error("Expected two arguments.");const p=h.parse(o[1],1,Ge);if(!p)return null;const _=o[2];if(typeof _!="object"||Array.isArray(_))return h.error("NumberFormat options argument must be an object.");let k=null;if(_.locale&&(k=h.parse(_.locale,1,we),!k))return null;let S=null;if(_.currency&&(S=h.parse(_.currency,1,we),!S))return null;let T=null;if(_["min-fraction-digits"]&&(T=h.parse(_["min-fraction-digits"],1,Ge),!T))return null;let P=null;return _["max-fraction-digits"]&&(P=h.parse(_["max-fraction-digits"],1,Ge),!P)?null:new nd(p,k,S,T,P)}evaluate(o){return new Intl.NumberFormat(this.locale?this.locale.evaluate(o):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(o):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(o):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(o):void 0}).format(this.number.evaluate(o))}eachChild(o){o(this.number),this.locale&&o(this.locale),this.currency&&o(this.currency),this.minFractionDigits&&o(this.minFractionDigits),this.maxFractionDigits&&o(this.maxFractionDigits)}outputDefined(){return!1}}class au{constructor(o){this.type=Kn,this.sections=o}static parse(o,h){if(o.length<2)return h.error("Expected at least one argument.");const p=o[1];if(!Array.isArray(p)&&typeof p=="object")return h.error("First argument must be an image or text section.");const _=[];let k=!1;for(let S=1;S<=o.length-1;++S){const T=o[S];if(k&&typeof T=="object"&&!Array.isArray(T)){k=!1;let P=null;if(T["font-scale"]&&(P=h.parse(T["font-scale"],1,Ge),!P))return null;let B=null;if(T["text-font"]&&(B=h.parse(T["text-font"],1,q(we)),!B))return null;let N=null;if(T["text-color"]&&(N=h.parse(T["text-color"],1,wt),!N))return null;const L=_[_.length-1];L.scale=P,L.font=B,L.textColor=N}else{const P=h.parse(o[S],1,Qe);if(!P)return null;const B=P.type.kind;if(B!=="string"&&B!=="value"&&B!=="null"&&B!=="resolvedImage")return h.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");k=!0,_.push({content:P,scale:null,font:null,textColor:null})}}return new au(_)}evaluate(o){return new yr(this.sections.map(h=>{const p=h.content.evaluate(o);return li(p)===gr?new Kh("",p,null,null,null):new Kh(Rl(p),null,h.scale?h.scale.evaluate(o):null,h.font?h.font.evaluate(o).join(","):null,h.textColor?h.textColor.evaluate(o):null)}))}eachChild(o){for(const h of this.sections)o(h.content),h.scale&&o(h.scale),h.font&&o(h.font),h.textColor&&o(h.textColor)}outputDefined(){return!1}}class id{constructor(o){this.type=gr,this.input=o}static parse(o,h){if(o.length!==2)return h.error("Expected two arguments.");const p=h.parse(o[1],1,we);return p?new id(p):h.error("No image name provided.")}evaluate(o){const h=this.input.evaluate(o),p=br.fromString(h);return p&&o.availableImages&&(p.available=o.availableImages.indexOf(h)>-1),p}eachChild(o){o(this.input)}outputDefined(){return!1}}class rd{constructor(o){this.type=Ge,this.input=o}static parse(o,h){if(o.length!==2)return h.error(`Expected 1 argument, but found ${o.length-1} instead.`);const p=h.parse(o[1],1);return p?p.type.kind!=="array"&&p.type.kind!=="string"&&p.type.kind!=="value"?h.error(`Expected argument of type string or array, but found ${H(p.type)} instead.`):new rd(p):null}evaluate(o){const h=this.input.evaluate(o);if(typeof h=="string")return[...h].length;if(Array.isArray(h))return h.length;throw new ni(`Expected value to be of type string or array, but found ${H(li(h))} instead.`)}eachChild(o){o(this.input)}outputDefined(){return!1}}const Ms=8192;function m_(c,o){const h=(180+c[0])/360,p=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+c[1]*Math.PI/360)))/360,_=Math.pow(2,o.z);return[Math.round(h*_*Ms),Math.round(p*_*Ms)]}function sd(c,o){const h=Math.pow(2,o.z);return[(_=(c[0]/Ms+o.x)/h,360*_-180),(p=(c[1]/Ms+o.y)/h,360/Math.PI*Math.atan(Math.exp((180-360*p)*Math.PI/180))-90)];var p,_}function jo(c,o){c[0]=Math.min(c[0],o[0]),c[1]=Math.min(c[1],o[1]),c[2]=Math.max(c[2],o[0]),c[3]=Math.max(c[3],o[1])}function ho(c,o){return!(c[0]<=o[0]||c[2]>=o[2]||c[1]<=o[1]||c[3]>=o[3])}function bn(c,o,h){const p=c[0]-o[0],_=c[1]-o[1],k=c[0]-h[0],S=c[1]-h[1];return p*S-k*_==0&&p*k<=0&&_*S<=0}function lu(c,o,h,p){return(_=[p[0]-h[0],p[1]-h[1]])[0]*(k=[o[0]-c[0],o[1]-c[1]])[1]-_[1]*k[0]!=0&&!(!tm(c,o,h,p)||!tm(h,p,c,o));var _,k}function g_(c,o,h){for(const p of h)for(let _=0;_<p.length-1;++_)if(lu(c,o,p[_],p[_+1]))return!0;return!1}function Ba(c,o,h=!1){let p=!1;for(const T of o)for(let P=0;P<T.length-1;P++){if(bn(c,T[P],T[P+1]))return h;(k=T[P])[1]>(_=c)[1]!=(S=T[P+1])[1]>_[1]&&_[0]<(S[0]-k[0])*(_[1]-k[1])/(S[1]-k[1])+k[0]&&(p=!p)}var _,k,S;return p}function y_(c,o){for(const h of o)if(Ba(c,h))return!0;return!1}function em(c,o){for(const h of c)if(!Ba(h,o))return!1;for(let h=0;h<c.length-1;++h)if(g_(c[h],c[h+1],o))return!1;return!0}function __(c,o){for(const h of o)if(em(c,h))return!0;return!1}function tm(c,o,h,p){const _=p[0]-h[0],k=p[1]-h[1],S=(c[0]-h[0])*k-_*(c[1]-h[1]),T=(o[0]-h[0])*k-_*(o[1]-h[1]);return S>0&&T<0||S<0&&T>0}function od(c,o,h){const p=[];for(let _=0;_<c.length;_++){const k=[];for(let S=0;S<c[_].length;S++){const T=m_(c[_][S],h);jo(o,T),k.push(T)}p.push(k)}return p}function nm(c,o,h){const p=[];for(let _=0;_<c.length;_++){const k=od(c[_],o,h);p.push(k)}return p}function im(c,o,h,p){if(c[0]<h[0]||c[0]>h[2]){const _=.5*p;let k=c[0]-h[0]>_?-p:h[0]-c[0]>_?p:0;k===0&&(k=c[0]-h[2]>_?-p:h[2]-c[0]>_?p:0),c[0]+=k}jo(o,c)}function rm(c,o,h,p){const _=Math.pow(2,p.z)*Ms,k=[p.x*Ms,p.y*Ms],S=[];for(const T of c)for(const P of T){const B=[P.x+k[0],P.y+k[1]];im(B,o,h,_),S.push(B)}return S}function sm(c,o,h,p){const _=Math.pow(2,p.z)*Ms,k=[p.x*Ms,p.y*Ms],S=[];for(const P of c){const B=[];for(const N of P){const L=[N.x+k[0],N.y+k[1]];jo(o,L),B.push(L)}S.push(B)}if(o[2]-o[0]<=_/2){(T=o)[0]=T[1]=1/0,T[2]=T[3]=-1/0;for(const P of S)for(const B of P)im(B,o,h,_)}var T;return S}class Uo{constructor(o,h){this.type=Ne,this.geojson=o,this.geometries=h}static parse(o,h){if(o.length!==2)return h.error(`'within' expression requires exactly one argument, but found ${o.length-1} instead.`);if(Vo(o[1])){const p=o[1];if(p.type==="FeatureCollection"){const _=[];for(const k of p.features){const{type:S,coordinates:T}=k.geometry;S==="Polygon"&&_.push(T),S==="MultiPolygon"&&_.push(...T)}if(_.length)return new Uo(p,{type:"MultiPolygon",coordinates:_})}else if(p.type==="Feature"){const _=p.geometry.type;if(_==="Polygon"||_==="MultiPolygon")return new Uo(p,p.geometry)}else if(p.type==="Polygon"||p.type==="MultiPolygon")return new Uo(p,p)}return h.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(o){if(o.geometry()!=null&&o.canonicalID()!=null){if(o.geometryType()==="Point")return function(h,p){const _=[1/0,1/0,-1/0,-1/0],k=[1/0,1/0,-1/0,-1/0],S=h.canonicalID();if(p.type==="Polygon"){const T=od(p.coordinates,k,S),P=rm(h.geometry(),_,k,S);if(!ho(_,k))return!1;for(const B of P)if(!Ba(B,T))return!1}if(p.type==="MultiPolygon"){const T=nm(p.coordinates,k,S),P=rm(h.geometry(),_,k,S);if(!ho(_,k))return!1;for(const B of P)if(!y_(B,T))return!1}return!0}(o,this.geometries);if(o.geometryType()==="LineString")return function(h,p){const _=[1/0,1/0,-1/0,-1/0],k=[1/0,1/0,-1/0,-1/0],S=h.canonicalID();if(p.type==="Polygon"){const T=od(p.coordinates,k,S),P=sm(h.geometry(),_,k,S);if(!ho(_,k))return!1;for(const B of P)if(!em(B,T))return!1}if(p.type==="MultiPolygon"){const T=nm(p.coordinates,k,S),P=sm(h.geometry(),_,k,S);if(!ho(_,k))return!1;for(const B of P)if(!__(B,T))return!1}return!0}(o,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let om=class{constructor(c=[],o=(h,p)=>h<p?-1:h>p?1:0){if(this.data=c,this.length=this.data.length,this.compare=o,this.length>0)for(let h=(this.length>>1)-1;h>=0;h--)this._down(h)}push(c){this.data.push(c),this._up(this.length++)}pop(){if(this.length===0)return;const c=this.data[0],o=this.data.pop();return--this.length>0&&(this.data[0]=o,this._down(0)),c}peek(){return this.data[0]}_up(c){const{data:o,compare:h}=this,p=o[c];for(;c>0;){const _=c-1>>1,k=o[_];if(h(p,k)>=0)break;o[c]=k,c=_}o[c]=p}_down(c){const{data:o,compare:h}=this,p=this.length>>1,_=o[c];for(;c<p;){let k=1+(c<<1);const S=k+1;if(S<this.length&&h(o[S],o[k])<0&&(k=S),h(o[k],_)>=0)break;o[c]=o[k],c=k}o[c]=_}};function b_(c,o,h,p,_){am(c,o,h,p||c.length-1,_||x_)}function am(c,o,h,p,_){for(;p>h;){if(p-h>600){var k=p-h+1,S=o-h+1,T=Math.log(k),P=.5*Math.exp(2*T/3),B=.5*Math.sqrt(T*P*(k-P)/k)*(S-k/2<0?-1:1);am(c,o,Math.max(h,Math.floor(o-S*P/k+B)),Math.min(p,Math.floor(o+(k-S)*P/k+B)),_)}var N=c[o],L=h,j=p;for($l(c,h,o),_(c[p],N)>0&&$l(c,h,p);L<j;){for($l(c,L,j),L++,j--;_(c[L],N)<0;)L++;for(;_(c[j],N)>0;)j--}_(c[h],N)===0?$l(c,h,j):$l(c,++j,p),j<=o&&(h=j+1),o<=j&&(p=j-1)}}function $l(c,o,h){var p=c[o];c[o]=c[h],c[h]=p}function x_(c,o){return c<o?-1:c>o?1:0}function cu(c,o){if(c.length<=1)return[c];const h=[];let p,_;for(const k of c){const S=w_(k);S!==0&&(k.area=Math.abs(S),_===void 0&&(_=S<0),_===S<0?(p&&h.push(p),p=[k]):p.push(k))}if(p&&h.push(p),o>1)for(let k=0;k<h.length;k++)h[k].length<=o||(b_(h[k],o,1,h[k].length-1,v_),h[k]=h[k].slice(0,o));return h}function v_(c,o){return o.area-c.area}function w_(c){let o=0;for(let h,p,_=0,k=c.length,S=k-1;_<k;S=_++)h=c[_],p=c[S],o+=(p.x-h.x)*(h.y+p.y);return o}const lm=1/298.257223563,cm=lm*(2-lm),um=Math.PI/180;class ad{constructor(o){const h=6378.137*um*1e3,p=Math.cos(o*um),_=1/(1-cm*(1-p*p)),k=Math.sqrt(_);this.kx=h*k*p,this.ky=h*k*_*(1-cm)}distance(o,h){const p=this.wrap(o[0]-h[0])*this.kx,_=(o[1]-h[1])*this.ky;return Math.sqrt(p*p+_*_)}pointOnLine(o,h){let p,_,k,S,T=1/0;for(let P=0;P<o.length-1;P++){let B=o[P][0],N=o[P][1],L=this.wrap(o[P+1][0]-B)*this.kx,j=(o[P+1][1]-N)*this.ky,W=0;L===0&&j===0||(W=(this.wrap(h[0]-B)*this.kx*L+(h[1]-N)*this.ky*j)/(L*L+j*j),W>1?(B=o[P+1][0],N=o[P+1][1]):W>0&&(B+=L/this.kx*W,N+=j/this.ky*W)),L=this.wrap(h[0]-B)*this.kx,j=(h[1]-N)*this.ky;const Y=L*L+j*j;Y<T&&(T=Y,p=B,_=N,k=P,S=W)}return{point:[p,_],index:k,t:Math.max(0,Math.min(1,S))}}wrap(o){for(;o<-180;)o+=360;for(;o>180;)o-=360;return o}}function hm(c,o){return o[0]-c[0]}function uu(c){return c[1]-c[0]+1}function Hs(c,o){return c[1]>=c[0]&&c[1]<o}function ld(c,o){if(c[0]>c[1])return[null,null];const h=uu(c);if(o){if(h===2)return[c,null];const _=Math.floor(h/2);return[[c[0],c[0]+_],[c[0]+_,c[1]]]}if(h===1)return[c,null];const p=Math.floor(h/2)-1;return[[c[0],c[0]+p],[c[0]+p+1,c[1]]]}function cd(c,o){if(!Hs(o,c.length))return[1/0,1/0,-1/0,-1/0];const h=[1/0,1/0,-1/0,-1/0];for(let p=o[0];p<=o[1];++p)jo(h,c[p]);return h}function ud(c){const o=[1/0,1/0,-1/0,-1/0];for(const h of c)for(const p of h)jo(o,p);return o}function hu(c){return c[0]!==-1/0&&c[1]!==-1/0&&c[2]!==1/0&&c[3]!==1/0}function hd(c,o,h){if(!hu(c)||!hu(o))return NaN;let p=0,_=0;return c[2]<o[0]&&(p=o[0]-c[2]),c[0]>o[2]&&(p=c[0]-o[2]),c[1]>o[3]&&(_=c[1]-o[3]),c[3]<o[1]&&(_=o[1]-c[3]),h.distance([0,0],[p,_])}function Ho(c,o,h){const p=h.pointOnLine(o,c);return h.distance(c,p.point)}function dd(c,o,h,p,_){const k=Math.min(Ho(c,[h,p],_),Ho(o,[h,p],_)),S=Math.min(Ho(h,[c,o],_),Ho(p,[c,o],_));return Math.min(k,S)}function k_(c,o,h,p,_){if(!Hs(o,c.length)||!Hs(p,h.length))return 1/0;let k=1/0;for(let S=o[0];S<o[1];++S){const T=c[S],P=c[S+1];for(let B=p[0];B<p[1];++B){const N=h[B],L=h[B+1];if(lu(T,P,N,L))return 0;k=Math.min(k,dd(T,P,N,L,_))}}return k}function Jn(c,o,h,p,_){if(!Hs(o,c.length)||!Hs(p,h.length))return NaN;let k=1/0;for(let S=o[0];S<=o[1];++S)for(let T=p[0];T<=p[1];++T)if(k=Math.min(k,_.distance(c[S],h[T])),k===0)return k;return k}function S_(c,o,h){if(Ba(c,o,!0))return 0;let p=1/0;for(const _ of o){const k=_[0],S=_[_.length-1];if(k!==S&&(p=Math.min(p,Ho(c,[S,k],h)),p===0))return p;const T=h.pointOnLine(_,c);if(p=Math.min(p,h.distance(c,T.point)),p===0)return p}return p}function Gt(c,o,h,p){if(!Hs(o,c.length))return NaN;for(let k=o[0];k<=o[1];++k)if(Ba(c[k],h,!0))return 0;let _=1/0;for(let k=o[0];k<o[1];++k){const S=c[k],T=c[k+1];for(const P of h)for(let B=0,N=P.length,L=N-1;B<N;L=B++){const j=P[L],W=P[B];if(lu(S,T,j,W))return 0;_=Math.min(_,dd(S,T,j,W,p))}}return _}function du(c,o){for(const h of c)for(const p of h)if(Ba(p,o,!0))return!0;return!1}function On(c,o,h,p=1/0){const _=ud(c),k=ud(o);if(p!==1/0&&hd(_,k,h)>=p)return p;if(ho(_,k)){if(du(c,o))return 0}else if(du(o,c))return 0;let S=1/0;for(const T of c)for(let P=0,B=T.length,N=B-1;P<B;N=P++){const L=T[N],j=T[P];for(const W of o)for(let Y=0,K=W.length,ie=K-1;Y<K;ie=Y++){const oe=W[ie],be=W[Y];if(lu(L,j,oe,be))return 0;S=Math.min(S,dd(L,j,oe,be,h))}}return S}function Tn(c,o,h,p,_,k){if(!k)return;const S=hd(cd(p,k),_,h);S<o&&c.push([S,k,[0,0]])}function qo(c,o,h,p,_,k,S){if(!k||!S)return;const T=hd(cd(p,k),cd(_,S),h);T<o&&c.push([T,k,S])}function jl(c,o,h,p,_=1/0){let k=Math.min(p.distance(c[0],h[0][0]),_);if(k===0)return k;const S=new om([[0,[0,c.length-1],[0,0]]],hm),T=ud(h);for(;S.length>0;){const P=S.pop();if(P[0]>=k)continue;const B=P[1],N=o?50:100;if(uu(B)<=N){if(!Hs(B,c.length))return NaN;if(o){const L=Gt(c,B,h,p);if(isNaN(L)||L===0)return L;k=Math.min(k,L)}else for(let L=B[0];L<=B[1];++L){const j=S_(c[L],h,p);if(k=Math.min(k,j),k===0)return 0}}else{const L=ld(B,o);Tn(S,k,p,c,T,L[0]),Tn(S,k,p,c,T,L[1])}}return k}function Ul(c,o,h,p,_,k=1/0){let S=Math.min(k,_.distance(c[0],h[0]));if(S===0)return S;const T=new om([[0,[0,c.length-1],[0,h.length-1]]],hm);for(;T.length>0;){const P=T.pop();if(P[0]>=S)continue;const B=P[1],N=P[2],L=o?50:100,j=p?50:100;if(uu(B)<=L&&uu(N)<=j){if(!Hs(B,c.length)&&Hs(N,h.length))return NaN;let W;if(o&&p)W=k_(c,B,h,N,_),S=Math.min(S,W);else if(o&&!p){const Y=c.slice(B[0],B[1]+1);for(let K=N[0];K<=N[1];++K)if(W=Ho(h[K],Y,_),S=Math.min(S,W),S===0)return S}else if(!o&&p){const Y=h.slice(N[0],N[1]+1);for(let K=B[0];K<=B[1];++K)if(W=Ho(c[K],Y,_),S=Math.min(S,W),S===0)return S}else W=Jn(c,B,h,N,_),S=Math.min(S,W)}else{const W=ld(B,o),Y=ld(N,p);qo(T,S,_,c,h,W[0],Y[0]),qo(T,S,_,c,h,W[0],Y[1]),qo(T,S,_,c,h,W[1],Y[0]),qo(T,S,_,c,h,W[1],Y[1])}}return S}function pd(c){return c.type==="MultiPolygon"?c.coordinates.map(o=>({type:"Polygon",coordinates:o})):c.type==="MultiLineString"?c.coordinates.map(o=>({type:"LineString",coordinates:o})):c.type==="MultiPoint"?c.coordinates.map(o=>({type:"Point",coordinates:o})):[c]}class Wo{constructor(o,h){this.type=Ge,this.geojson=o,this.geometries=h}static parse(o,h){if(o.length!==2)return h.error(`'distance' expression requires exactly one argument, but found ${o.length-1} instead.`);if(Vo(o[1])){const p=o[1];if(p.type==="FeatureCollection")return new Wo(p,p.features.map(_=>pd(_.geometry)).flat());if(p.type==="Feature")return new Wo(p,pd(p.geometry));if("type"in p&&"coordinates"in p)return new Wo(p,pd(p))}return h.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(o){if(o.geometry()!=null&&o.canonicalID()!=null){if(o.geometryType()==="Point")return function(h,p){const _=h.geometry(),k=_.flat().map(P=>sd([P.x,P.y],h.canonical));if(_.length===0)return NaN;const S=new ad(k[0][1]);let T=1/0;for(const P of p){switch(P.type){case"Point":T=Math.min(T,Ul(k,!1,[P.coordinates],!1,S,T));break;case"LineString":T=Math.min(T,Ul(k,!1,P.coordinates,!0,S,T));break;case"Polygon":T=Math.min(T,jl(k,!1,P.coordinates,S,T))}if(T===0)return T}return T}(o,this.geometries);if(o.geometryType()==="LineString")return function(h,p){const _=h.geometry(),k=_.flat().map(P=>sd([P.x,P.y],h.canonical));if(_.length===0)return NaN;const S=new ad(k[0][1]);let T=1/0;for(const P of p){switch(P.type){case"Point":T=Math.min(T,Ul(k,!0,[P.coordinates],!1,S,T));break;case"LineString":T=Math.min(T,Ul(k,!0,P.coordinates,!0,S,T));break;case"Polygon":T=Math.min(T,jl(k,!0,P.coordinates,S,T))}if(T===0)return T}return T}(o,this.geometries);if(o.geometryType()==="Polygon")return function(h,p){const _=h.geometry();if(_.length===0||_[0].length===0)return NaN;const k=cu(_,0).map(P=>P.map(B=>B.map(N=>sd([N.x,N.y],h.canonical)))),S=new ad(k[0][0][0][1]);let T=1/0;for(const P of p)for(const B of k){switch(P.type){case"Point":T=Math.min(T,jl([P.coordinates],!1,B,S,T));break;case"LineString":T=Math.min(T,jl(P.coordinates,!0,B,S,T));break;case"Polygon":T=Math.min(T,On(B,P.coordinates,S,T))}if(T===0)return T}return T}(o,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}const Na={"==":d_,"!=":Kf,">":p_,"<":Jf,">=":Qf,"<=":f_,array:ts,at:Qh,boolean:ts,case:nu,coalesce:su,collator:Fl,format:au,image:id,in:ed,"index-of":Ia,interpolate:sr,"interpolate-hcl":sr,"interpolate-lab":sr,length:rd,let:uo,literal:es,match:td,number:ts,"number-format":nd,object:ts,slice:Ll,step:Da,string:ts,"to-boolean":ns,"to-color":ns,"to-number":ns,"to-string":ns,var:fn,within:Uo,distance:Wo};class Lr{constructor(o,h,p,_){this.name=o,this.type=h,this._evaluate=p,this.args=_}evaluate(o){return this._evaluate(o,this.args)}eachChild(o){this.args.forEach(o)}outputDefined(){return!1}static parse(o,h){const p=o[0],_=Lr.definitions[p];if(!_)return h.error(`Unknown expression "${p}". If you wanted a literal array, use ["literal", [...]].`,0);const k=Array.isArray(_)?_[0]:_.type,S=Array.isArray(_)?[[_[1],_[2]]]:_.overloads,T=S.filter(([B])=>!Array.isArray(B)||B.length===o.length-1);let P=null;for(const[B,N]of T){P=new Fo(h.registry,Hl,h.path,null,h.scope);const L=[];let j=!1;for(let W=1;W<o.length;W++){const Y=o[W],K=Array.isArray(B)?B[W-1]:B.type,ie=P.parse(Y,1+L.length,K);if(!ie){j=!0;break}L.push(ie)}if(!j)if(Array.isArray(B)&&B.length!==L.length)P.error(`Expected ${B.length} arguments, but found ${L.length} instead.`);else{for(let W=0;W<L.length;W++){const Y=Array.isArray(B)?B[W]:B.type,K=L[W];P.concat(W+1).checkSubtype(Y,K.type)}if(P.errors.length===0)return new Lr(p,k,N,L)}}if(T.length===1)h.errors.push(...P.errors);else{const B=(T.length?T:S).map(([L])=>{return j=L,Array.isArray(j)?`(${j.map(H).join(", ")})`:`(${H(j.type)}...)`;var j}).join(" | "),N=[];for(let L=1;L<o.length;L++){const j=h.parse(o[L],1+N.length);if(!j)return null;N.push(H(j.type))}h.error(`Expected arguments of type ${B}, but found (${N.join(", ")}) instead.`)}return null}static register(o,h){Lr.definitions=h;for(const p in h)o[p]=Lr}}function fd(c,[o,h,p,_]){o=o.evaluate(c),h=h.evaluate(c),p=p.evaluate(c);const k=_?_.evaluate(c):1,S=Pa(o,h,p,k);if(S)throw new ni(S);return new Sn(o/255,h/255,p/255,k,!1)}function md(c,o){return c in o}function gd(c,o){const h=o[c];return h===void 0?null:h}function Go(c){return{type:c}}function Hl(c){if(c instanceof fn)return Hl(c.boundExpression);if(c instanceof Lr&&c.name==="error"||c instanceof Fl||c instanceof Uo||c instanceof Wo)return!1;const o=c instanceof ns||c instanceof ts;let h=!0;return c.eachChild(p=>{h=o?h&&Hl(p):h&&p instanceof es}),!!h&&ql(c)&&Wl(c,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function ql(c){if(c instanceof Lr&&(c.name==="get"&&c.args.length===1||c.name==="feature-state"||c.name==="has"&&c.args.length===1||c.name==="properties"||c.name==="geometry-type"||c.name==="id"||/^filter-/.test(c.name))||c instanceof Uo||c instanceof Wo)return!1;let o=!0;return c.eachChild(h=>{o&&!ql(h)&&(o=!1)}),o}function za(c){if(c instanceof Lr&&c.name==="feature-state")return!1;let o=!0;return c.eachChild(h=>{o&&!za(h)&&(o=!1)}),o}function Wl(c,o){if(c instanceof Lr&&o.indexOf(c.name)>=0)return!1;let h=!0;return c.eachChild(p=>{h&&!Wl(p,o)&&(h=!1)}),h}function pu(c){return{result:"success",value:c}}function Ra(c){return{result:"error",value:c}}function La(c){return c["property-type"]==="data-driven"||c["property-type"]==="cross-faded-data-driven"}function dm(c){return!!c.expression&&c.expression.parameters.indexOf("zoom")>-1}function yd(c){return!!c.expression&&c.expression.interpolated}function un(c){return c instanceof Number?"number":c instanceof String?"string":c instanceof Boolean?"boolean":Array.isArray(c)?"array":c===null?"null":typeof c}function fu(c){return typeof c=="object"&&c!==null&&!Array.isArray(c)}function E_(c){return c}function pm(c,o){const h=o.type==="color",p=c.stops&&typeof c.stops[0][0]=="object",_=p||!(p||c.property!==void 0),k=c.type||(yd(o)?"exponential":"interval");if(h||o.type==="padding"){const N=h?Sn.parse:_r.parse;(c=Nr({},c)).stops&&(c.stops=c.stops.map(L=>[L[0],N(L[1])])),c.default=N(c.default?c.default:o.default)}if(c.colorSpace&&(S=c.colorSpace)!=="rgb"&&S!=="hcl"&&S!=="lab")throw new Error(`Unknown color space: "${c.colorSpace}"`);var S;let T,P,B;if(k==="exponential")T=mm;else if(k==="interval")T=mu;else if(k==="categorical"){T=fm,P=Object.create(null);for(const N of c.stops)P[N[0]]=N[1];B=typeof c.stops[0][0]}else{if(k!=="identity")throw new Error(`Unknown function type "${k}"`);T=gm}if(p){const N={},L=[];for(let Y=0;Y<c.stops.length;Y++){const K=c.stops[Y],ie=K[0].zoom;N[ie]===void 0&&(N[ie]={zoom:ie,type:c.type,property:c.property,default:c.default,stops:[]},L.push(ie)),N[ie].stops.push([K[0].value,K[1]])}const j=[];for(const Y of L)j.push([N[Y].zoom,pm(N[Y],o)]);const W={name:"linear"};return{kind:"composite",interpolationType:W,interpolationFactor:sr.interpolationFactor.bind(void 0,W),zoomStops:j.map(Y=>Y[0]),evaluate:({zoom:Y},K)=>mm({stops:j,base:c.base},o,Y).evaluate(Y,K)}}if(_){const N=k==="exponential"?{name:"exponential",base:c.base!==void 0?c.base:1}:null;return{kind:"camera",interpolationType:N,interpolationFactor:sr.interpolationFactor.bind(void 0,N),zoomStops:c.stops.map(L=>L[0]),evaluate:({zoom:L})=>T(c,o,L,P,B)}}return{kind:"source",evaluate(N,L){const j=L&&L.properties?L.properties[c.property]:void 0;return j===void 0?Va(c.default,o.default):T(c,o,j,P,B)}}}function Va(c,o,h){return c!==void 0?c:o!==void 0?o:h!==void 0?h:void 0}function fm(c,o,h,p,_){return Va(typeof h===_?p[h]:void 0,c.default,o.default)}function mu(c,o,h){if(un(h)!=="number")return Va(c.default,o.default);const p=c.stops.length;if(p===1||h<=c.stops[0][0])return c.stops[0][1];if(h>=c.stops[p-1][0])return c.stops[p-1][1];const _=iu(c.stops.map(k=>k[0]),h);return c.stops[_][1]}function mm(c,o,h){const p=c.base!==void 0?c.base:1;if(un(h)!=="number")return Va(c.default,o.default);const _=c.stops.length;if(_===1||h<=c.stops[0][0])return c.stops[0][1];if(h>=c.stops[_-1][0])return c.stops[_-1][1];const k=iu(c.stops.map(N=>N[0]),h),S=function(N,L,j,W){const Y=W-j,K=N-j;return Y===0?0:L===1?K/Y:(Math.pow(L,K)-1)/(Math.pow(L,Y)-1)}(h,p,c.stops[k][0],c.stops[k+1][0]),T=c.stops[k][1],P=c.stops[k+1][1],B=rr[o.type]||E_;return typeof T.evaluate=="function"?{evaluate(...N){const L=T.evaluate.apply(void 0,N),j=P.evaluate.apply(void 0,N);if(L!==void 0&&j!==void 0)return B(L,j,S,c.colorSpace)}}:B(T,P,S,c.colorSpace)}function gm(c,o,h){switch(o.type){case"color":h=Sn.parse(h);break;case"formatted":h=yr.fromString(h.toString());break;case"resolvedImage":h=br.fromString(h.toString());break;case"padding":h=_r.parse(h);break;default:un(h)===o.type||o.type==="enum"&&o.values[h]||(h=void 0)}return Va(h,c.default,o.default)}Lr.register(Na,{error:[{kind:"error"},[we],(c,[o])=>{throw new ni(o.evaluate(c))}],typeof:[we,[Qe],(c,[o])=>H(li(o.evaluate(c)))],"to-rgba":[q(Ge,4),[wt],(c,[o])=>{const[h,p,_,k]=o.evaluate(c).rgb;return[255*h,255*p,255*_,k]}],rgb:[wt,[Ge,Ge,Ge],fd],rgba:[wt,[Ge,Ge,Ge,Ge],fd],has:{type:Ne,overloads:[[[we],(c,[o])=>md(o.evaluate(c),c.properties())],[[we,Wt],(c,[o,h])=>md(o.evaluate(c),h.evaluate(c))]]},get:{type:Qe,overloads:[[[we],(c,[o])=>gd(o.evaluate(c),c.properties())],[[we,Wt],(c,[o,h])=>gd(o.evaluate(c),h.evaluate(c))]]},"feature-state":[Qe,[we],(c,[o])=>gd(o.evaluate(c),c.featureState||{})],properties:[Wt,[],c=>c.properties()],"geometry-type":[we,[],c=>c.geometryType()],id:[Qe,[],c=>c.id()],zoom:[Ge,[],c=>c.globals.zoom],"heatmap-density":[Ge,[],c=>c.globals.heatmapDensity||0],"line-progress":[Ge,[],c=>c.globals.lineProgress||0],accumulated:[Qe,[],c=>c.globals.accumulated===void 0?null:c.globals.accumulated],"+":[Ge,Go(Ge),(c,o)=>{let h=0;for(const p of o)h+=p.evaluate(c);return h}],"*":[Ge,Go(Ge),(c,o)=>{let h=1;for(const p of o)h*=p.evaluate(c);return h}],"-":{type:Ge,overloads:[[[Ge,Ge],(c,[o,h])=>o.evaluate(c)-h.evaluate(c)],[[Ge],(c,[o])=>-o.evaluate(c)]]},"/":[Ge,[Ge,Ge],(c,[o,h])=>o.evaluate(c)/h.evaluate(c)],"%":[Ge,[Ge,Ge],(c,[o,h])=>o.evaluate(c)%h.evaluate(c)],ln2:[Ge,[],()=>Math.LN2],pi:[Ge,[],()=>Math.PI],e:[Ge,[],()=>Math.E],"^":[Ge,[Ge,Ge],(c,[o,h])=>Math.pow(o.evaluate(c),h.evaluate(c))],sqrt:[Ge,[Ge],(c,[o])=>Math.sqrt(o.evaluate(c))],log10:[Ge,[Ge],(c,[o])=>Math.log(o.evaluate(c))/Math.LN10],ln:[Ge,[Ge],(c,[o])=>Math.log(o.evaluate(c))],log2:[Ge,[Ge],(c,[o])=>Math.log(o.evaluate(c))/Math.LN2],sin:[Ge,[Ge],(c,[o])=>Math.sin(o.evaluate(c))],cos:[Ge,[Ge],(c,[o])=>Math.cos(o.evaluate(c))],tan:[Ge,[Ge],(c,[o])=>Math.tan(o.evaluate(c))],asin:[Ge,[Ge],(c,[o])=>Math.asin(o.evaluate(c))],acos:[Ge,[Ge],(c,[o])=>Math.acos(o.evaluate(c))],atan:[Ge,[Ge],(c,[o])=>Math.atan(o.evaluate(c))],min:[Ge,Go(Ge),(c,o)=>Math.min(...o.map(h=>h.evaluate(c)))],max:[Ge,Go(Ge),(c,o)=>Math.max(...o.map(h=>h.evaluate(c)))],abs:[Ge,[Ge],(c,[o])=>Math.abs(o.evaluate(c))],round:[Ge,[Ge],(c,[o])=>{const h=o.evaluate(c);return h<0?-Math.round(-h):Math.round(h)}],floor:[Ge,[Ge],(c,[o])=>Math.floor(o.evaluate(c))],ceil:[Ge,[Ge],(c,[o])=>Math.ceil(o.evaluate(c))],"filter-==":[Ne,[we,Qe],(c,[o,h])=>c.properties()[o.value]===h.value],"filter-id-==":[Ne,[Qe],(c,[o])=>c.id()===o.value],"filter-type-==":[Ne,[we],(c,[o])=>c.geometryType()===o.value],"filter-<":[Ne,[we,Qe],(c,[o,h])=>{const p=c.properties()[o.value],_=h.value;return typeof p==typeof _&&p<_}],"filter-id-<":[Ne,[Qe],(c,[o])=>{const h=c.id(),p=o.value;return typeof h==typeof p&&h<p}],"filter->":[Ne,[we,Qe],(c,[o,h])=>{const p=c.properties()[o.value],_=h.value;return typeof p==typeof _&&p>_}],"filter-id->":[Ne,[Qe],(c,[o])=>{const h=c.id(),p=o.value;return typeof h==typeof p&&h>p}],"filter-<=":[Ne,[we,Qe],(c,[o,h])=>{const p=c.properties()[o.value],_=h.value;return typeof p==typeof _&&p<=_}],"filter-id-<=":[Ne,[Qe],(c,[o])=>{const h=c.id(),p=o.value;return typeof h==typeof p&&h<=p}],"filter->=":[Ne,[we,Qe],(c,[o,h])=>{const p=c.properties()[o.value],_=h.value;return typeof p==typeof _&&p>=_}],"filter-id->=":[Ne,[Qe],(c,[o])=>{const h=c.id(),p=o.value;return typeof h==typeof p&&h>=p}],"filter-has":[Ne,[Qe],(c,[o])=>o.value in c.properties()],"filter-has-id":[Ne,[],c=>c.id()!==null&&c.id()!==void 0],"filter-type-in":[Ne,[q(we)],(c,[o])=>o.value.indexOf(c.geometryType())>=0],"filter-id-in":[Ne,[q(Qe)],(c,[o])=>o.value.indexOf(c.id())>=0],"filter-in-small":[Ne,[we,q(Qe)],(c,[o,h])=>h.value.indexOf(c.properties()[o.value])>=0],"filter-in-large":[Ne,[we,q(Qe)],(c,[o,h])=>function(p,_,k,S){for(;k<=S;){const T=k+S>>1;if(_[T]===p)return!0;_[T]>p?S=T-1:k=T+1}return!1}(c.properties()[o.value],h.value,0,h.value.length-1)],all:{type:Ne,overloads:[[[Ne,Ne],(c,[o,h])=>o.evaluate(c)&&h.evaluate(c)],[Go(Ne),(c,o)=>{for(const h of o)if(!h.evaluate(c))return!1;return!0}]]},any:{type:Ne,overloads:[[[Ne,Ne],(c,[o,h])=>o.evaluate(c)||h.evaluate(c)],[Go(Ne),(c,o)=>{for(const h of o)if(h.evaluate(c))return!0;return!1}]]},"!":[Ne,[Ne],(c,[o])=>!o.evaluate(c)],"is-supported-script":[Ne,[we],(c,[o])=>{const h=c.globals&&c.globals.isSupportedScript;return!h||h(o.evaluate(c))}],upcase:[we,[we],(c,[o])=>o.evaluate(c).toUpperCase()],downcase:[we,[we],(c,[o])=>o.evaluate(c).toLowerCase()],concat:[we,Go(Qe),(c,o)=>o.map(h=>Rl(h.evaluate(c))).join("")],"resolved-locale":[we,[Ln],(c,[o])=>o.evaluate(c).resolvedLocale()]});class gu{constructor(o,h){var p;this.expression=o,this._warningHistory={},this._evaluator=new tu,this._defaultValue=h?(p=h).type==="color"&&fu(p.default)?new Sn(0,0,0,0):p.type==="color"?Sn.parse(p.default)||null:p.type==="padding"?_r.parse(p.default)||null:p.type==="variableAnchorOffsetCollection"?Rr.parse(p.default)||null:p.default===void 0?null:p.default:null,this._enumValues=h&&h.type==="enum"?h.values:null}evaluateWithoutErrorHandling(o,h,p,_,k,S){return this._evaluator.globals=o,this._evaluator.feature=h,this._evaluator.featureState=p,this._evaluator.canonical=_,this._evaluator.availableImages=k||null,this._evaluator.formattedSection=S,this.expression.evaluate(this._evaluator)}evaluate(o,h,p,_,k,S){this._evaluator.globals=o,this._evaluator.feature=h||null,this._evaluator.featureState=p||null,this._evaluator.canonical=_,this._evaluator.availableImages=k||null,this._evaluator.formattedSection=S||null;try{const T=this.expression.evaluate(this._evaluator);if(T==null||typeof T=="number"&&T!=T)return this._defaultValue;if(this._enumValues&&!(T in this._enumValues))throw new ni(`Expected value to be one of ${Object.keys(this._enumValues).map(P=>JSON.stringify(P)).join(", ")}, but found ${JSON.stringify(T)} instead.`);return T}catch(T){return this._warningHistory[T.message]||(this._warningHistory[T.message]=!0,typeof console<"u"&&console.warn(T.message)),this._defaultValue}}}function yu(c){return Array.isArray(c)&&c.length>0&&typeof c[0]=="string"&&c[0]in Na}function Fa(c,o){const h=new Fo(Na,Hl,[],o?function(_){const k={color:wt,string:we,number:Ge,enum:we,boolean:Ne,formatted:Kn,padding:Gi,resolvedImage:gr,variableAnchorOffsetCollection:se};return _.type==="array"?q(k[_.value]||Qe,_.length):k[_.type]}(o):void 0),p=h.parse(c,void 0,void 0,void 0,o&&o.type==="string"?{typeAnnotation:"coerce"}:void 0);return p?pu(new gu(p,o)):Ra(h.errors)}class $a{constructor(o,h){this.kind=o,this._styleExpression=h,this.isStateDependent=o!=="constant"&&!za(h.expression)}evaluateWithoutErrorHandling(o,h,p,_,k,S){return this._styleExpression.evaluateWithoutErrorHandling(o,h,p,_,k,S)}evaluate(o,h,p,_,k,S){return this._styleExpression.evaluate(o,h,p,_,k,S)}}class ja{constructor(o,h,p,_){this.kind=o,this.zoomStops=p,this._styleExpression=h,this.isStateDependent=o!=="camera"&&!za(h.expression),this.interpolationType=_}evaluateWithoutErrorHandling(o,h,p,_,k,S){return this._styleExpression.evaluateWithoutErrorHandling(o,h,p,_,k,S)}evaluate(o,h,p,_,k,S){return this._styleExpression.evaluate(o,h,p,_,k,S)}interpolationFactor(o,h,p){return this.interpolationType?sr.interpolationFactor(this.interpolationType,o,h,p):0}}function _d(c,o){const h=Fa(c,o);if(h.result==="error")return h;const p=h.value.expression,_=ql(p);if(!_&&!La(o))return Ra([new ki("","data expressions not supported")]);const k=Wl(p,["zoom"]);if(!k&&!dm(o))return Ra([new ki("","zoom expressions not supported")]);const S=Gl(p);return S||k?S instanceof ki?Ra([S]):S instanceof sr&&!yd(o)?Ra([new ki("",'"interpolate" expressions cannot be used with this property')]):pu(S?new ja(_?"camera":"composite",h.value,S.labels,S instanceof sr?S.interpolation:void 0):new $a(_?"constant":"source",h.value)):Ra([new ki("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class Ua{constructor(o,h){this._parameters=o,this._specification=h,Nr(this,pm(this._parameters,this._specification))}static deserialize(o){return new Ua(o._parameters,o._specification)}static serialize(o){return{_parameters:o._parameters,_specification:o._specification}}}function Gl(c){let o=null;if(c instanceof uo)o=Gl(c.result);else if(c instanceof su){for(const h of c.args)if(o=Gl(h),o)break}else(c instanceof Da||c instanceof sr)&&c.input instanceof Lr&&c.input.name==="zoom"&&(o=c);return o instanceof ki||c.eachChild(h=>{const p=Gl(h);p instanceof ki?o=p:!o&&p?o=new ki("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):o&&p&&o!==p&&(o=new ki("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),o}function _u(c){if(c===!0||c===!1)return!0;if(!Array.isArray(c)||c.length===0)return!1;switch(c[0]){case"has":return c.length>=2&&c[1]!=="$id"&&c[1]!=="$type";case"in":return c.length>=3&&(typeof c[1]!="string"||Array.isArray(c[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return c.length!==3||Array.isArray(c[1])||Array.isArray(c[2]);case"any":case"all":for(const o of c.slice(1))if(!_u(o)&&typeof o!="boolean")return!1;return!0;default:return!0}}const bu={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function bd(c){if(c==null)return{filter:()=>!0,needGeometry:!1};_u(c)||(c=xu(c));const o=Fa(c,bu);if(o.result==="error")throw new Error(o.value.map(h=>`${h.key}: ${h.message}`).join(", "));return{filter:(h,p,_)=>o.value.evaluate(h,p,{},_),needGeometry:ym(c)}}function C_(c,o){return c<o?-1:c>o?1:0}function ym(c){if(!Array.isArray(c))return!1;if(c[0]==="within"||c[0]==="distance")return!0;for(let o=1;o<c.length;o++)if(ym(c[o]))return!0;return!1}function xu(c){if(!c)return!0;const o=c[0];return c.length<=1?o!=="any":o==="=="?xd(c[1],c[2],"=="):o==="!="?Bi(xd(c[1],c[2],"==")):o==="<"||o===">"||o==="<="||o===">="?xd(c[1],c[2],o):o==="any"?(h=c.slice(1),["any"].concat(h.map(xu))):o==="all"?["all"].concat(c.slice(1).map(xu)):o==="none"?["all"].concat(c.slice(1).map(xu).map(Bi)):o==="in"?Zl(c[1],c.slice(2)):o==="!in"?Bi(Zl(c[1],c.slice(2))):o==="has"?Yl(c[1]):o!=="!has"||Bi(Yl(c[1]));var h}function xd(c,o,h){switch(c){case"$type":return[`filter-type-${h}`,o];case"$id":return[`filter-id-${h}`,o];default:return[`filter-${h}`,c,o]}}function Zl(c,o){if(o.length===0)return!1;switch(c){case"$type":return["filter-type-in",["literal",o]];case"$id":return["filter-id-in",["literal",o]];default:return o.length>200&&!o.some(h=>typeof h!=typeof o[0])?["filter-in-large",c,["literal",o.sort(C_)]]:["filter-in-small",c,["literal",o]]}}function Yl(c){switch(c){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",c]}}function Bi(c){return["!",c]}function Zo(c){const o=typeof c;if(o==="number"||o==="boolean"||o==="string"||c==null)return JSON.stringify(c);if(Array.isArray(c)){let _="[";for(const k of c)_+=`${Zo(k)},`;return`${_}]`}const h=Object.keys(c).sort();let p="{";for(let _=0;_<h.length;_++)p+=`${JSON.stringify(h[_])}:${Zo(c[h[_]])},`;return`${p}}`}function _m(c){let o="";for(const h of _n)o+=`/${Zo(c[h])}`;return o}function bm(c){const o=c.value;return o?[new Ve(c.key,o,"constants have been deprecated as of v8")]:[]}function Qn(c){return c instanceof Number||c instanceof String||c instanceof Boolean?c.valueOf():c}function is(c){if(Array.isArray(c))return c.map(is);if(c instanceof Object&&!(c instanceof Number||c instanceof String||c instanceof Boolean)){const o={};for(const h in c)o[h]=is(c[h]);return o}return Qn(c)}function xr(c){const o=c.key,h=c.value,p=c.valueSpec||{},_=c.objectElementValidators||{},k=c.style,S=c.styleSpec,T=c.validateSpec;let P=[];const B=un(h);if(B!=="object")return[new Ve(o,h,`object expected, ${B} found`)];for(const N in h){const L=N.split(".")[0],j=p[L]||p["*"];let W;if(_[L])W=_[L];else if(p[L])W=T;else if(_["*"])W=_["*"];else{if(!p["*"]){P.push(new Ve(o,h[N],`unknown property "${N}"`));continue}W=T}P=P.concat(W({key:(o&&`${o}.`)+N,value:h[N],valueSpec:j,style:k,styleSpec:S,object:h,objectKey:N,validateSpec:T},h))}for(const N in p)_[N]||p[N].required&&p[N].default===void 0&&h[N]===void 0&&P.push(new Ve(o,h,`missing required property "${N}"`));return P}function Xl(c){const o=c.value,h=c.valueSpec,p=c.style,_=c.styleSpec,k=c.key,S=c.arrayElementValidator||c.validateSpec;if(un(o)!=="array")return[new Ve(k,o,`array expected, ${un(o)} found`)];if(h.length&&o.length!==h.length)return[new Ve(k,o,`array length ${h.length} expected, length ${o.length} found`)];if(h["min-length"]&&o.length<h["min-length"])return[new Ve(k,o,`array length at least ${h["min-length"]} expected, length ${o.length} found`)];let T={type:h.value,values:h.values};_.$version<7&&(T.function=h.function),un(h.value)==="object"&&(T=h.value);let P=[];for(let B=0;B<o.length;B++)P=P.concat(S({array:o,arrayIndex:B,value:o[B],valueSpec:T,validateSpec:c.validateSpec,style:p,styleSpec:_,key:`${k}[${B}]`}));return P}function vd(c){const o=c.key,h=c.value,p=c.valueSpec;let _=un(h);return _==="number"&&h!=h&&(_="NaN"),_!=="number"?[new Ve(o,h,`number expected, ${_} found`)]:"minimum"in p&&h<p.minimum?[new Ve(o,h,`${h} is less than the minimum value ${p.minimum}`)]:"maximum"in p&&h>p.maximum?[new Ve(o,h,`${h} is greater than the maximum value ${p.maximum}`)]:[]}function vu(c){const o=c.valueSpec,h=Qn(c.value.type);let p,_,k,S={};const T=h!=="categorical"&&c.value.property===void 0,P=!T,B=un(c.value.stops)==="array"&&un(c.value.stops[0])==="array"&&un(c.value.stops[0][0])==="object",N=xr({key:c.key,value:c.value,valueSpec:c.styleSpec.function,validateSpec:c.validateSpec,style:c.style,styleSpec:c.styleSpec,objectElementValidators:{stops:function(W){if(h==="identity")return[new Ve(W.key,W.value,'identity function may not have a "stops" property')];let Y=[];const K=W.value;return Y=Y.concat(Xl({key:W.key,value:K,valueSpec:W.valueSpec,validateSpec:W.validateSpec,style:W.style,styleSpec:W.styleSpec,arrayElementValidator:L})),un(K)==="array"&&K.length===0&&Y.push(new Ve(W.key,K,"array must have at least one stop")),Y},default:function(W){return W.validateSpec({key:W.key,value:W.value,valueSpec:o,validateSpec:W.validateSpec,style:W.style,styleSpec:W.styleSpec})}}});return h==="identity"&&T&&N.push(new Ve(c.key,c.value,'missing required property "property"')),h==="identity"||c.value.stops||N.push(new Ve(c.key,c.value,'missing required property "stops"')),h==="exponential"&&c.valueSpec.expression&&!yd(c.valueSpec)&&N.push(new Ve(c.key,c.value,"exponential functions not supported")),c.styleSpec.$version>=8&&(P&&!La(c.valueSpec)?N.push(new Ve(c.key,c.value,"property functions not supported")):T&&!dm(c.valueSpec)&&N.push(new Ve(c.key,c.value,"zoom functions not supported"))),h!=="categorical"&&!B||c.value.property!==void 0||N.push(new Ve(c.key,c.value,'"property" property is required')),N;function L(W){let Y=[];const K=W.value,ie=W.key;if(un(K)!=="array")return[new Ve(ie,K,`array expected, ${un(K)} found`)];if(K.length!==2)return[new Ve(ie,K,`array length 2 expected, length ${K.length} found`)];if(B){if(un(K[0])!=="object")return[new Ve(ie,K,`object expected, ${un(K[0])} found`)];if(K[0].zoom===void 0)return[new Ve(ie,K,"object stop key must have zoom")];if(K[0].value===void 0)return[new Ve(ie,K,"object stop key must have value")];if(k&&k>Qn(K[0].zoom))return[new Ve(ie,K[0].zoom,"stop zoom values must appear in ascending order")];Qn(K[0].zoom)!==k&&(k=Qn(K[0].zoom),_=void 0,S={}),Y=Y.concat(xr({key:`${ie}[0]`,value:K[0],valueSpec:{zoom:{}},validateSpec:W.validateSpec,style:W.style,styleSpec:W.styleSpec,objectElementValidators:{zoom:vd,value:j}}))}else Y=Y.concat(j({key:`${ie}[0]`,value:K[0],valueSpec:{},validateSpec:W.validateSpec,style:W.style,styleSpec:W.styleSpec},K));return yu(is(K[1]))?Y.concat([new Ve(`${ie}[1]`,K[1],"expressions are not allowed in function stops.")]):Y.concat(W.validateSpec({key:`${ie}[1]`,value:K[1],valueSpec:o,validateSpec:W.validateSpec,style:W.style,styleSpec:W.styleSpec}))}function j(W,Y){const K=un(W.value),ie=Qn(W.value),oe=W.value!==null?W.value:Y;if(p){if(K!==p)return[new Ve(W.key,oe,`${K} stop domain type must match previous stop domain type ${p}`)]}else p=K;if(K!=="number"&&K!=="string"&&K!=="boolean")return[new Ve(W.key,oe,"stop domain value must be a number, string, or boolean")];if(K!=="number"&&h!=="categorical"){let be=`number expected, ${K} found`;return La(o)&&h===void 0&&(be+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Ve(W.key,oe,be)]}return h!=="categorical"||K!=="number"||isFinite(ie)&&Math.floor(ie)===ie?h!=="categorical"&&K==="number"&&_!==void 0&&ie<_?[new Ve(W.key,oe,"stop domain values must appear in ascending order")]:(_=ie,h==="categorical"&&ie in S?[new Ve(W.key,oe,"stop domain values must be unique")]:(S[ie]=!0,[])):[new Ve(W.key,oe,`integer expected, found ${ie}`)]}}function Ha(c){const o=(c.expressionContext==="property"?_d:Fa)(is(c.value),c.valueSpec);if(o.result==="error")return o.value.map(p=>new Ve(`${c.key}${p.key}`,c.value,p.message));const h=o.value.expression||o.value._styleExpression.expression;if(c.expressionContext==="property"&&c.propertyKey==="text-font"&&!h.outputDefined())return[new Ve(c.key,c.value,`Invalid data expression for "${c.propertyKey}". Output values must be contained as literals within the expression.`)];if(c.expressionContext==="property"&&c.propertyType==="layout"&&!za(h))return[new Ve(c.key,c.value,'"feature-state" data expressions are not supported with layout properties.')];if(c.expressionContext==="filter"&&!za(h))return[new Ve(c.key,c.value,'"feature-state" data expressions are not supported with filters.')];if(c.expressionContext&&c.expressionContext.indexOf("cluster")===0){if(!Wl(h,["zoom","feature-state"]))return[new Ve(c.key,c.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(c.expressionContext==="cluster-initial"&&!ql(h))return[new Ve(c.key,c.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function qs(c){const o=c.key,h=c.value,p=c.valueSpec,_=[];return Array.isArray(p.values)?p.values.indexOf(Qn(h))===-1&&_.push(new Ve(o,h,`expected one of [${p.values.join(", ")}], ${JSON.stringify(h)} found`)):Object.keys(p.values).indexOf(Qn(h))===-1&&_.push(new Ve(o,h,`expected one of [${Object.keys(p.values).join(", ")}], ${JSON.stringify(h)} found`)),_}function wd(c){return _u(is(c.value))?Ha(Nr({},c,{expressionContext:"filter",valueSpec:{value:"boolean"}})):wu(c)}function wu(c){const o=c.value,h=c.key;if(un(o)!=="array")return[new Ve(h,o,`array expected, ${un(o)} found`)];const p=c.styleSpec;let _,k=[];if(o.length<1)return[new Ve(h,o,"filter array must have at least 1 element")];switch(k=k.concat(qs({key:`${h}[0]`,value:o[0],valueSpec:p.filter_operator,style:c.style,styleSpec:c.styleSpec})),Qn(o[0])){case"<":case"<=":case">":case">=":o.length>=2&&Qn(o[1])==="$type"&&k.push(new Ve(h,o,`"$type" cannot be use with operator "${o[0]}"`));case"==":case"!=":o.length!==3&&k.push(new Ve(h,o,`filter array for operator "${o[0]}" must have 3 elements`));case"in":case"!in":o.length>=2&&(_=un(o[1]),_!=="string"&&k.push(new Ve(`${h}[1]`,o[1],`string expected, ${_} found`)));for(let S=2;S<o.length;S++)_=un(o[S]),Qn(o[1])==="$type"?k=k.concat(qs({key:`${h}[${S}]`,value:o[S],valueSpec:p.geometry_type,style:c.style,styleSpec:c.styleSpec})):_!=="string"&&_!=="number"&&_!=="boolean"&&k.push(new Ve(`${h}[${S}]`,o[S],`string, number, or boolean expected, ${_} found`));break;case"any":case"all":case"none":for(let S=1;S<o.length;S++)k=k.concat(wu({key:`${h}[${S}]`,value:o[S],style:c.style,styleSpec:c.styleSpec}));break;case"has":case"!has":_=un(o[1]),o.length!==2?k.push(new Ve(h,o,`filter array for "${o[0]}" operator must have 2 elements`)):_!=="string"&&k.push(new Ve(`${h}[1]`,o[1],`string expected, ${_} found`))}return k}function kd(c,o){const h=c.key,p=c.validateSpec,_=c.style,k=c.styleSpec,S=c.value,T=c.objectKey,P=k[`${o}_${c.layerType}`];if(!P)return[];const B=T.match(/^(.*)-transition$/);if(o==="paint"&&B&&P[B[1]]&&P[B[1]].transition)return p({key:h,value:S,valueSpec:k.transition,style:_,styleSpec:k});const N=c.valueSpec||P[T];if(!N)return[new Ve(h,S,`unknown property "${T}"`)];let L;if(un(S)==="string"&&La(N)&&!N.tokens&&(L=/^{([^}]+)}$/.exec(S)))return[new Ve(h,S,`"${T}" does not support interpolation syntax
@@ -791,4 +791,4 @@ img.ProseMirror-separator {
791
791
  </div>
792
792
  `}).mount(u)},{Fancybox:dU}=Ty,o_={$form:lU,$api:uU,$map:hU,$preview:({media:n})=>{const e=document.querySelector("#app");if(!e){console.error('Modal root element with id "#app" not found!');return}const t=document.createElement("div");e.appendChild(t),f.createApp({data(){return{items:Array.isArray(n)?n:[n]}},mounted(){this.$nextTick(()=>{dU.show(this.items.map(r=>{const a=typeof r=="string"&&r.endsWith(".pdf");return{src:r,type:a?"iframe":"image"}}),{groupAll:!0,Thumbs:{autoStart:!0}})})},template:`
793
793
  <div style="display: none;"></div> <!-- Keeps container hidden -->
794
- `}).mount(t)}};window.addEventListener("click",n=>{var t,i,r;const e=(t=n==null?void 0:n.target)==null?void 0:t.closest("[_href]");if(e&&(e==null?void 0:e.tagName)==="A"){const a=e==null?void 0:e.getAttribute("_href");(r=(i=window==null?void 0:window.app)==null?void 0:i.router)==null||r.push(a),n==null||n.preventDefault()}});const pU=async()=>{try{const{data:n}=await ut.get("/api/user-menu");return Jr.value=n,t_(n)}catch(n){return console.error(n),[]}},fU=(n,e)=>{Object.entries(e).forEach(([t,i])=>{n.component(t,i)})},mU={async install(n,{componentsApp:e={},settings:t,routes:i=[]}){ia.value={...ia,...t};try{const a=(await pU()).filter(l=>l==null?void 0:l.component).map(l=>({...l,component:{...s_,...e}[l==null?void 0:l.component]}));fU(n,{...s_,...e}),n.component("admin",eM);const{router:u}=await zA(a.concat(i));window.app={...n,router:u},window.v3plugin={...n.config.globalProperties,...o_},n.config.globalProperties={...n.config.globalProperties,$componentsConfig:{...AB,componentsApp:e},$router:u,$v3plugin:o_,$utils:{reloadCardPage:Gf}},n.use(u)}catch(r){console.error(r)}},components:s_,plugins:o_},gU={data(){return{formValues:{},scheme:null,table:"",token:""}},mounted(){this.getFormScheme()},methods:{flattenMenu(n){const e=[];return n.forEach(t=>{t.menu?e.push(...this.flattenMenu(t.menu)):e.push(t)}),e},async getFormScheme(){var i,r;const n=this.flattenMenu(Jr.value);n!=null&&n.length||this.$router.replace("/404");const e=n==null?void 0:n.find(a=>{var u,l;return(a==null?void 0:a.path)==((l=(u=this.$route)==null?void 0:u.query)==null?void 0:l.table)});e||this.$router.replace("/404");const t=e==null?void 0:e.table;this.table=t;try{const{data:{form:a}}=await ut.get(`/api/template/table/${t}`),{data:u}=await ut.get(`/api/table/${this.table}/${(r=(i=this.$route)==null?void 0:i.query)==null?void 0:r.id}`);this.token=(u==null?void 0:u.token)||"",this.formValues=u||{};const{data:l}=await ut.get(`/api/template/form/${a}`);this.scheme=(l==null?void 0:l.schema)||l}catch{}},async onlyEditObject(){var e,t,i,r,a,u,l,m,b;const n=this.$refs.form;try{await n.doValidation(),await ut.put(`/api/table/${this.token}`,this.formValues),await this.$notify({title:"Успішно!",message:"Об'єкт успішно створено",type:"success"})}catch(w){const E=((e=w==null?void 0:w.response)==null?void 0:e.data)||"";let C=((a=(r=(i=(t=Object.entries(n==null?void 0:n.formErrors))==null?void 0:t[0])==null?void 0:i[1])==null?void 0:r[0])==null?void 0:a.message)==="Це поле обов'язкове"?"Заповніть обов'язкові поля":(b=(m=(l=(u=Object.entries(n==null?void 0:n.formErrors))==null?void 0:u[0])==null?void 0:l[1])==null?void 0:m[0])==null?void 0:b.message;this.$notify({title:"Помилка!",message:E||C||"Сталася помилка валідаціі",type:"error"})}},async editObjectAndRedirect(){var e,t,i,r,a,u,l,m,b;const n=this.$refs.form;try{await n.doValidation(),await ut.put(`/api/table/${this.token}`,this.formValues),await this.$router.back(),await this.$notify({title:"Успішно!",message:"Об'єкт успішно створено",type:"success"})}catch(w){const E=((e=w==null?void 0:w.response)==null?void 0:e.data)||"";let C=((a=(r=(i=(t=Object.entries(n==null?void 0:n.formErrors))==null?void 0:t[0])==null?void 0:i[1])==null?void 0:r[0])==null?void 0:a.message)==="Це поле обов'язкове"?"Заповніть обов'язкові поля":(b=(m=(l=(u=Object.entries(n==null?void 0:n.formErrors))==null?void 0:u[0])==null?void 0:l[1])==null?void 0:m[0])==null?void 0:b.message;this.$notify({title:"Помилка!",message:E||C||"Сталася помилка валідаціі",type:"error"})}}}},yU={class:"bg-gray-50 lg:w-[calc(100vw-260px)] w-[100vw]"},_U={class:"h-[76px] mt-[15px] flex items-center justify-between mx-[20px] px-[20px] bg-white border rounded-xl"},bU={class:"flex items-center gap-[6px]"},xU={style:{height:"calc(100vh - 155px)"},class:"bg-gray-50 p-[20px] flex lg:w-[calc(100vw-260px)] w-[100vw]"},vU={class:"bg-white w-full rounded-xl border p-[20px] overflow-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar:horizontal]:h-[8px] [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"};function wU(n,e,t,i,r,a){const u=f.resolveComponent("VsForm");return f.openBlock(),f.createElementBlock("div",yU,[f.createElementVNode("div",_U,[e[3]||(e[3]=f.createElementVNode("h2",{class:"text-xl font-medium"},"Редагувати",-1)),f.createElementVNode("div",bU,[f.createElementVNode("button",{onClick:e[0]||(e[0]=l=>n.$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"}," Скасувати "),f.createElementVNode("button",{onClick:e[1]||(e[1]=(...l)=>a.editObjectAndRedirect&&a.editObjectAndRedirect(...l)),class:"inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-blue-600 border border-transparent rounded-lg gap-x-2 hover:bg-blue-700 hover:text-white"}," Зберегти ")])]),f.createElementVNode("div",xU,[f.createElementVNode("div",vU,[r.scheme?(f.openBlock(),f.createBlock(u,{key:0,ref:"form",scheme:r.scheme,modelValue:r.formValues,"onUpdate:modelValue":e[2]||(e[2]=l=>r.formValues=l),class:"p-0 mt-[20px]"},null,8,["scheme","modelValue"])):f.createCommentVNode("",!0)])])])}const kU=Object.freeze(Object.defineProperty({__proto__:null,default:Ue(gU,[["render",wU]])},Symbol.toStringTag,{value:"Module"})),SU={data(){return{formValues:{},scheme:null,table:"",token:"",api:""}},mounted(){this.getFormScheme()},methods:{flattenMenu(n){const e=[];return n.forEach(t=>{t.menu?e.push(...this.flattenMenu(t.menu)):e.push(t)}),e},async getFormScheme(){var i,r;const n=this.flattenMenu(Jr.value);n!=null&&n.length||this.$router.replace("/404");const e=n==null?void 0:n.find(a=>{var u,l;return(a==null?void 0:a.path)==((l=(u=this.$route)==null?void 0:u.query)==null?void 0:l.table)});e||this.$router.replace("/404");const t=e==null?void 0:e.table;this.table=t;try{const a=await ut.get(`/api/table-data/${t}`),{data:u}=await ut.get(`/api/template/form/${(i=a==null?void 0:a.data)==null?void 0:i.form}`);this.scheme=(u==null?void 0:u.schema)||u,this.api=(u==null?void 0:u.api)||"",this.token=(r=a==null?void 0:a.data)==null?void 0:r.addToken}catch{}},async createObject(){var e,t,i,r,a,u,l,m,b;const n=this.$refs.form;try{await n.doValidation(),await ut.post(this.api||`/api/table/${this.token}`,this.formValues),await this.$router.back(),await this.$notify({title:"Успішно!",message:"Об'єкт успішно створено",type:"success"})}catch(w){const E=((e=w==null?void 0:w.response)==null?void 0:e.data)||"";let C=((a=(r=(i=(t=Object.entries(n==null?void 0:n.formErrors))==null?void 0:t[0])==null?void 0:i[1])==null?void 0:r[0])==null?void 0:a.message)==="Це поле обов'язкове"?"Заповніть обов'язкові поля":(b=(m=(l=(u=Object.entries(n==null?void 0:n.formErrors))==null?void 0:u[0])==null?void 0:l[1])==null?void 0:m[0])==null?void 0:b.message;this.$notify({title:"Помилка!",message:E||C||"Сталася помилка валідаціі",type:"error"})}}}},EU={class:"bg-gray-50 lg:w-[calc(100vw-260px)] w-[100vw]"},CU={class:"h-[76px] mt-[15px] flex items-center justify-between mx-[20px] px-[20px] bg-white border rounded-xl"},TU={class:"flex items-center gap-[6px]"},MU={style:{height:"calc(100vh - 165px)"},class:"bg-gray-50 p-[20px] flex lg:w-[calc(100vw-260px)] w-[100vw]"},AU={class:"bg-white w-full rounded-xl border p-[20px] overflow-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar:horizontal]:h-[8px] [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"};function PU(n,e,t,i,r,a){const u=f.resolveComponent("VsForm");return f.openBlock(),f.createElementBlock("div",EU,[f.createElementVNode("div",CU,[e[3]||(e[3]=f.createElementVNode("h2",{class:"text-xl font-medium"},"Створити",-1)),f.createElementVNode("div",TU,[f.createElementVNode("button",{onClick:e[0]||(e[0]=l=>n.$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"}," Скасувати "),f.createElementVNode("button",{onClick:e[1]||(e[1]=(...l)=>a.createObject&&a.createObject(...l)),class:"inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-blue-600 border border-transparent rounded-lg gap-x-2 hover:bg-blue-700 hover:text-white"}," Зберегти ")])]),f.createElementVNode("div",MU,[f.createElementVNode("div",AU,[r.scheme?(f.openBlock(),f.createBlock(u,{key:0,ref:"form",scheme:r.scheme,modelValue:r.formValues,"onUpdate:modelValue":e[2]||(e[2]=l=>r.formValues=l),class:"p-0 mt-[20px]"},null,8,["scheme","modelValue"])):f.createCommentVNode("",!0)])])])}const IU=Object.freeze(Object.defineProperty({__proto__:null,default:Ue(SU,[["render",PU]])},Symbol.toStringTag,{value:"Module"})),DU={};function OU(n,e,t,i,r,a){const u=f.resolveComponent("router-view");return f.openBlock(),f.createBlock(u)}const HS=Object.freeze(Object.defineProperty({__proto__:null,default:Ue(DU,[["render",OU]])},Symbol.toStringTag,{value:"Module"})),BU={},NU={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 zU(n,e,t,i,r,a){return f.openBlock(),f.createElementBlock("svg",NU,e[0]||(e[0]=[f.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),f.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),f.createElementVNode("path",{d:"M9 12h12l-3 -3"},null,-1),f.createElementVNode("path",{d:"M18 15l3 -3"},null,-1)]))}const RU=Ue(BU,[["render",zU]]),LU={},VU={viewBox:"0 0 1823 249",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function FU(n,e,t,i,r,a){return f.openBlock(),f.createElementBlock("svg",VU,e[0]||(e[0]=[f.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 $U=Ue(LU,[["render",FU]]),jU={components:{IconChevronDown:i_},props:{route:Object,searchable:String},mounted(){var n,e,t;(n=this.route)!=null&&n.menu&&(t=(e=this.route)==null?void 0:e.menu)!=null&&t.some(i=>{var r,a;return(i==null?void 0:i.path)===this.$route.path.replace("/","")||((a=(r=this.$route)==null?void 0:r.params)==null?void 0:a.table)===(i==null?void 0:i.table)&&(i==null?void 0:i.table)})&&(this.isOpen=!0)},watch:{route(n){n!=null&&n.open&&(this.isOpen=!0)}},data(){return{isOpen:!1}},methods:{highLight(n){if(!this.searchable)return n;const e=this.searchable.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),t=new RegExp(`(${e})(\\s*)`,"gi");return n.replace(t,(i,r,a)=>`<span style="color:#1989fa;">${r}</span>${a}`)}}},UU={key:0,class:""},HU={class:"ml-[30px] py-[6px] before:block before:absolute relative w-[196px] flex flex-col gap-[6px] inline-block before:w-[2px] before:h-[100%] before:bg-gray-100 before:left-[-14px] cursor-pointer"},qU={key:1};function WU(n,e,t,i,r,a){var m,b,w,E,C,A,D,R,$,G,ee,ce,U,Me,ke;const u=f.resolveComponent("IconChevronDown"),l=f.resolveComponent("router-link");return(m=t.route)!=null&&m.menu?(f.openBlock(),f.createElementBlock("div",UU,[f.createElementVNode("button",{onClick:e[0]||(e[0]=Pe=>r.isOpen=!r.isOpen),class:f.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",[((w=(b=t.route)==null?void 0:b.menu)==null?void 0:w.some(Pe=>{var $e,Be;return(Pe==null?void 0:Pe.path)===n.$route.path.replace("/","")||(Pe==null?void 0:Pe.table)===((Be=($e=n.$route)==null?void 0:$e.params)==null?void 0:Be.table)&&(Pe==null?void 0:Pe.table)}))&&"bg-gray-100"]])},[f.createTextVNode(f.toDisplayString((E=t.route)==null?void 0:E.ua)+" ",1),f.createVNode(u,{class:f.normalizeClass([[r.isOpen&&"-rotate-180"],"ml-auto duration-300"]),width:"14",height:"14"},null,8,["class"])],2),f.createVNode(f.Transition,{name:"fade"},{default:f.withCtx(()=>{var Pe;return[f.withDirectives(f.createElementVNode("ul",HU,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList((Pe=t.route)==null?void 0:Pe.menu,($e,Be)=>{var pt,tt;return f.openBlock(),f.createElementBlock("li",{key:Be,class:"w-full"},[f.createVNode(l,{innerHTML:a.highLight($e==null?void 0:$e.ua),to:"/"+($e==null?void 0:$e.path),class:f.normalizeClass([[(($e==null?void 0:$e.path)===n.$route.path.replace("/","")||((tt=(pt=n.$route)==null?void 0:pt.params)==null?void 0:tt.table)===($e==null?void 0:$e.table)&&($e==null?void 0:$e.table))&&"bg-gray-100"],"block px-3 py-2 text-sm text-gray-800 rounded-lg hover:bg-gray-100 focus:outline-none focus:bg-gray-100"])},null,8,["innerHTML","to","class"])])}),128))],512),[[f.vShow,r.isOpen]])]}),_:1})])):(C=t.route)!=null&&C.hidden?f.createCommentVNode("",!0):(f.openBlock(),f.createElementBlock("div",qU,[f.createVNode(l,{innerHTML:a.highLight((A=t.route)==null?void 0:A.ua),to:((R=(D=t.route)==null?void 0:D.path)==null?void 0:R[0])==="/"?($=t.route)==null?void 0:$.path:"/"+((G=t.route)==null?void 0:G.path),class:f.normalizeClass([[(((ee=t.route)==null?void 0:ee.path.replace("/",""))===n.$route.path.replace("/","")||((U=(ce=n.$route)==null?void 0:ce.params)==null?void 0:U.table)===((Me=t.route)==null?void 0:Me.table)&&((ke=t.route)==null?void 0:ke.table))&&"bg-gray-100"],"inline-block py-2 w-full font-[400] px-3 text-sm text-gray-800 rounded-lg items-center hover:bg-gray-100 duration-300 hover:text-gray-800"])},null,8,["innerHTML","to","class"])]))}const GU={components:{IconLogout:RU,NavbarItem:Ue(jU,[["render",WU]]),IconLogo:$U,IconSearch:n_},data(){return{activeIndex:null,searchValue:""}},computed:{data(){var n;return(n=this.searchValue)!=null&&n.trim()?this.filterMenu(Jr.value,this.searchValue):Jr.value},logo(){var n;return((n=ia.value)==null?void 0:n.logo)||"/assets/logo.svg"}},watch:{"$route.path"(){this.$parent.showMenu=!1}},methods:{filterMenu(n,e){return n.map(t=>{var i,r;if(t.menu){const a=this.filterMenu(t.menu,e);if(a.length>0)return{...t,menu:a,open:!0}}else if((r=(i=t.ua)==null?void 0:i.toLowerCase())!=null&&r.includes(e.toLowerCase()))return t;return null}).filter(Boolean)}}},ZU={class:"h-[59px] w-full p-[4px] mb-[10px]"},YU=["src"],XU={class:"relative mx-[16px]"},KU={class:"p-[16px] lg:h-full h-[calc(100vh-110px)] 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"},JU={class:"flex flex-col flex-wrap w-full pb-3"},QU={key:0,class:"flex flex-col gap-[6px]"},e9={key:1,class:"text-gray-800 text-lg mt-[20px]"};function t9(n,e,t,i,r,a){var b;const u=f.resolveComponent("IconSearch"),l=f.resolveComponent("VsText"),m=f.resolveComponent("NavbarItem");return f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(["lg:flex lg:relative lg:left-0 flex-col h-[100vh] border-r w-[260px] top-0 bottom-0 shrink-0 absolute transition left-[-100%] z-[11] bg-white",[{"left-0":n.$parent.showMenu}]])},[f.createElementVNode("div",ZU,[f.createElementVNode("img",{src:a.logo,class:"object-contain w-full h-full"},null,8,YU)]),f.createElementVNode("div",XU,[f.createVNode(u,{height:"16",width:"16",class:"absolute top-[12px] left-[16px] text-gray-500 z-[1]"}),f.createVNode(l,{type:"text",modelValue:r.searchValue,"onUpdate:modelValue":e[0]||(e[0]=w=>r.searchValue=w),clearable:!0,placeholder:"Пошук по меню",class:"[&>input]:h-[40px] [&>input]:block [&>input]:pl-[40px] [&>input:focus]:outline-none [&>input:focus]:focus:ring-0 [&>input:focus]:border-y-gray-200 [&>input:focus]:border-y-1 [&>input:focus]:border-x-0"},null,8,["modelValue"])]),f.createElementVNode("div",KU,[f.createElementVNode("nav",JU,[(b=a.data)!=null&&b.length?(f.openBlock(),f.createElementBlock("ul",QU,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.data,(w,E)=>(f.openBlock(),f.createElementBlock("li",{key:E,class:"flex flex-col gap-[6px]"},[f.createVNode(m,{route:w,searchable:r.searchValue},null,8,["route","searchable"])]))),128))])):(f.openBlock(),f.createElementBlock("div",e9,"Не знайдено"))])])],2)}const n9=Ue(GU,[["render",t9]]),i9={},r9={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 s9(n,e,t,i,r,a){return f.openBlock(),f.createElementBlock("svg",r9,e[0]||(e[0]=[f.createElementVNode("circle",{cx:"12",cy:"12",r:"10"},null,-1),f.createElementVNode("path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"},null,-1),f.createElementVNode("path",{d:"M12 17h.01"},null,-1)]))}const o9={components:{IconQuestion:Ue(i9,[["render",s9]]),IconUser:FS,AdminNotification:$S},mounted(){this.getUserData()},data(){return{userData:null,isVisible:!1}},watch:{isVisible(n){n?setTimeout(()=>window.addEventListener("click",this.closeOnOutsideClick),0):window.removeEventListener("click",this.closeOnOutsideClick)}},methods:{async getUserData(){try{const{data:n}=await ut.get("/user");this.userData=n}catch{}},async logout(){try{await ut.get("/logout"),await window.history.pushState({},"","/login"),await location.reload(),localStorage.removeItem("user")}catch{}},closeOnOutsideClick(){this.isVisible=!1}},beforeUnmount(){window.removeEventListener("click",this.closeOnOutsideClick)}},a9={class:"h-[60px] border-b flex lg:justify-end justify-between items-center px-[20px]"},l9={class:"flex items-center gap-[6px]"},c9={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"},u9={class:"relative"},h9=["src"],d9={key:1,class:"size-[40px] rounded-full bg-gray-200 flex items-center justify-center"},p9={class:"p-[10px] gap-[6px] items-center border-b flex justify-between"},f9=["src"],m9={key:1,class:"size-[40px] rounded-full bg-gray-200 flex items-center justify-center"},g9={class:"text-[14px] mr-[10px] text-gray-500"},y9={class:"flex flex-col p-[4px]"};function _9(n,e,t,i,r,a){var w,E,C,A,D,R,$,G,ee,ce;const u=f.resolveComponent("IconQuestion"),l=f.resolveComponent("AdminNotification"),m=f.resolveComponent("IconUser"),b=f.resolveComponent("router-link");return f.openBlock(),f.createElementBlock("div",a9,[f.createElementVNode("div",{class:"lg:hidden flex",onClick:e[0]||(e[0]=U=>n.$parent.showMenu=!0)},e[4]||(e[4]=[f.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)])),f.createElementVNode("div",l9,[f.createElementVNode("a",c9,[f.createVNode(u,{height:"24",width:"24"})]),f.createVNode(l),e[6]||(e[6]=f.createElementVNode("div",{class:"h-[30px] w-[1px] bg-gray-200 ml-[10px] mr-[10px]"},null,-1)),f.createElementVNode("div",u9,[f.createElementVNode("div",{onClick:e[1]||(e[1]=U=>r.isVisible=!0),class:"cursor-pointer"},[(E=(w=r.userData)==null?void 0:w.user)!=null&&E.avatar?(f.openBlock(),f.createElementBlock("img",{key:0,class:"flex-shrink-0 size-[30px] rounded-full",src:(A=(C=r.userData)==null?void 0:C.user)==null?void 0:A.avatar,alt:"Image Description"},null,8,h9)):(f.openBlock(),f.createElementBlock("div",d9,[f.createVNode(m)]))]),r.isVisible?(f.openBlock(),f.createElementBlock("div",{key:0,onClick:e[3]||(e[3]=f.withModifiers(()=>{},["stop"])),class:"fixed bg-white w-[180px] top-[55px] right-[20px] shadow-xl rounded-xl z-[1]"},[f.createElementVNode("div",p9,[(R=(D=r.userData)==null?void 0:D.user)!=null&&R.avatar?(f.openBlock(),f.createElementBlock("img",{key:0,class:"flex-shrink-0 size-[30px] rounded-full",src:(G=($=r.userData)==null?void 0:$.user)==null?void 0:G.avatar,alt:"Image Description"},null,8,f9)):(f.openBlock(),f.createElementBlock("div",m9,[f.createVNode(m)])),f.createElementVNode("div",null,[f.createElementVNode("p",g9,f.toDisplayString((ce=(ee=r.userData)==null?void 0:ee.user)==null?void 0:ce.username),1)])]),f.createElementVNode("div",y9,[f.createVNode(b,{to:"profile",disabled:!0,class:"p-[8px] block rounded-lg w-full mb-[4px] text-start hover:bg-gray-100 !duration-300"},{default:f.withCtx(()=>e[5]||(e[5]=[f.createTextVNode("Профіль")])),_:1}),f.createElementVNode("button",{onClick:e[2]||(e[2]=(...U)=>a.logout&&a.logout(...U)),class:"p-[8px] block rounded-lg w-full text-start hover:bg-gray-100 !duration-300"}," Вийти ")])])):f.createCommentVNode("",!0)])])])}const b9={components:{navbar:n9,AdminHeader:Ue(o9,[["render",_9]])},data(){return{showMenu:!1}},computed:{isMenu(){return Jr.value||null},header(){var n;return((n=ia.value)==null?void 0:n.header)||"admin-header"}}},x9={class:"admin-wrapper"},v9={class:"flex flex-col w-full"};function w9(n,e,t,i,r,a){const u=f.resolveComponent("navbar"),l=f.resolveComponent("router-view");return f.openBlock(),f.createElementBlock("div",x9,[f.createVNode(u),r.showMenu?(f.openBlock(),f.createElementBlock("div",{key:0,onClick:e[0]||(e[0]=m=>r.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"})):f.createCommentVNode("",!0),f.createElementVNode("div",v9,[a.isMenu?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[(f.openBlock(),f.createBlock(f.resolveDynamicComponent(a.header))),f.createVNode(l)],64)):f.createCommentVNode("",!0)])])}const k9=Object.freeze(Object.defineProperty({__proto__:null,default:Ue(b9,[["render",w9],["__scopeId","data-v-79c10cab"]])},Symbol.toStringTag,{value:"Module"})),S9={data(){return{currentSort:""}},props:{data:{type:Object,default:()=>null},activeColumn:{type:String}},computed:{label(){var n,e;return((n=this.data)==null?void 0:n.ua)||((e=this.data)==null?void 0:e.label)||this.data.title||"null"},selectedSortParam(){var n,e;return(e=(n=this.$route)==null?void 0:n.query)==null?void 0:e.sort},getVisibleIcon(){return this.data.format!=="image"&&this.data.format!=="verify"}},watch:{activeColumn(n){n!==this.data.name&&(this.currentSort="")}},methods:{changeCurrentSort(n){switch(n){case"":return"asc";case"asc":return"desc";case"desc":return"";default:return""}},handleClickSortBtn(n){this.$emit("change-active",this.data.name),this.currentSort=this.changeCurrentSort(n);const e=this.$route.query,{sort:t,...i}=e,r=this.currentSort?`${this.data.name}-${this.currentSort}`:"";this.$router.replace({query:{...i,...r&&{sort:r}}})},isValueEqualToSelected(n){return`${this.data.name}-${n}`===this.selectedSortParam}}},E9={scope:"col",class:"text-start px-2 py-1"},C9={class:"flex-shrink-0 size-3.5",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},T9={key:0,d:"m7 15 5 5 5-5"},M9={key:1,d:"m7 9 5-5 5 5"},A9={key:1,class:"text-sm text-stone-500 px-[4px] py-2.5 text-start font-normal"};function P9(n,e,t,i,r,a){return f.openBlock(),f.createElementBlock("th",E9,[a.getVisibleIcon?(f.openBlock(),f.createElementBlock("button",{key:0,type:"button",class:"text-sm text-stone-500 px-[4px] py-2.5 text-start font-normal flex items-center gap-[6px]",onClick:e[0]||(e[0]=u=>a.handleClickSortBtn(r.currentSort))},[f.createTextVNode(f.toDisplayString(a.label)+" ",1),(f.openBlock(),f.createElementBlock("svg",C9,[r.currentSort==="asc"||r.currentSort===""?(f.openBlock(),f.createElementBlock("path",T9)):f.createCommentVNode("",!0),r.currentSort==="desc"||r.currentSort===""?(f.openBlock(),f.createElementBlock("path",M9)):f.createCommentVNode("",!0)]))])):(f.openBlock(),f.createElementBlock("p",A9,f.toDisplayString(a.label),1))])}const I9=Ue(S9,[["render",P9]]),D9={components:{IconMore:J0,IconDelete:RS,IconEdit:LS},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(n=>typeof n=="object")}},methods:{openConfirm(){this.isDeleteConfirm=!0,document.querySelector("body").click()},async getData(){var n;try{const{data:e}=await ut.get(`/api/table/${this.table}/${(n=this.item)==null?void 0:n.id}`);this.formValue=e}catch(e){console.error(e)}},doSomethingOnCancel(){this.formVisible=!1},async deleteElement(){var n,e;try{const{data:t}=await ut.get(`/api/table/${this.table}/${(n=this.item)==null?void 0:n.id}`);await ut.delete(`/api/table/${t==null?void 0:t.token}`),await this.$notify({title:"Успішно!",message:"Об`єкт успішно видалeно",type:"success"}),await this.$emit("update-table")}catch(t){this.$notify({title:"Помилка!",message:(e=t==null?void 0:t.response)==null?void 0:e.data,type:"error"})}finally{this.isDeleteConfirm=!1}},async customButtonAction(n){var e,t;document.querySelector("body").click(),n!=null&&n.form?(await this.$v3plugin.$form({form:n==null?void 0:n.form,id:(e=this.item)==null?void 0:e.id,api:n==null?void 0:n.api,title:n==null?void 0:n.title}),await this.$emit("update-table")):await this.$v3plugin.$api({confirm:n==null?void 0:n.confirm,api:n==null?void 0:n.api,method:n==null?void 0:n.method,id:(t=this.item)==null?void 0:t.id,isId:(n==null?void 0:n.isId)||!1})}}},O9={class:"inline-flex"},B9={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"},N9={class:"flex flex-col items-start"},z9=["onClick"],R9={class:"text-gray-800"},L9={key:1,class:"h-[1px] w-[80%] bg-gray-200 ml-auto mr-auto"},V9={class:"p-4"},F9={class:"flex justify-end mt-4 gap-x-3"};function $9(n,e,t,i,r,a){const u=f.resolveComponent("IconMore"),l=f.resolveComponent("IconEdit"),m=f.resolveComponent("router-link"),b=f.resolveComponent("IconDelete"),w=f.resolveComponent("VsPopover"),E=f.resolveComponent("VsDialog");return f.openBlock(),f.createElementBlock(f.Fragment,null,[f.createElementVNode("div",O9,[f.createVNode(w,{trigger:"click",placement:"bottom-left"},{reference:f.withCtx(()=>[f.createElementVNode("button",B9,[f.createVNode(u,{height:"16",width:"16"})])]),default:f.withCtx(()=>{var C,A,D,R,$;return[f.createElementVNode("div",N9,[(C=t.actions)!=null&&C.includes("edit")&&t.isForm?(f.openBlock(),f.createBlock(m,{key:0,to:`/edit?table=${(D=(A=n.$route)==null?void 0:A.params)==null?void 0:D.catchAll}&id=${(R=t.item)==null?void 0:R.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:f.withCtx(()=>[f.createVNode(l,{color:"#000"}),e[4]||(e[4]=f.createTextVNode(" Редагувати "))]),_:1},8,["to"])):f.createCommentVNode("",!0),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.getCustomActions,(G,ee)=>(f.openBlock(),f.createElementBlock("button",{key:ee,onClick:ce=>a.customButtonAction(G),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"},[f.createVNode(b,{class:"opacity-0"}),f.createElementVNode("span",R9,f.toDisplayString(G==null?void 0:G.label),1)],8,z9))),128)),t.isForm?(f.openBlock(),f.createElementBlock("div",L9)):f.createCommentVNode("",!0),($=t.actions)!=null&&$.includes("del")?(f.openBlock(),f.createElementBlock("button",{key:2,onClick:e[0]||(e[0]=f.withModifiers((...G)=>a.openConfirm&&a.openConfirm(...G),["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"},[f.createVNode(b),e[5]||(e[5]=f.createElementVNode("span",{class:"text-gray-800"},"Видалити",-1))])):f.createCommentVNode("",!0)])]}),_:1})]),f.createVNode(E,{visible:r.isDeleteConfirm,"onUpdate:visible":e[3]||(e[3]=C=>r.isDeleteConfirm=C),size:"small",title:"Ви впевнені?"},{default:f.withCtx(()=>[f.createElementVNode("div",V9,[e[6]||(e[6]=f.createElementVNode("p",{class:"mt-1 text-gray-500 dark:text-neutral-500"}," Ви впевнені, що хочете видалити цей об'єкт? ",-1)),f.createElementVNode("div",F9,[f.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-sm font-medium text-gray-800 bg-white border border-gray-200 rounded-lg shadow-sm gap-x-2 hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",onClick:e[1]||(e[1]=C=>r.isDeleteConfirm=!1)}," Скасувати "),f.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-sm font-semibold text-white bg-red-500 border border-transparent rounded-lg gap-x-2 hover:bg-red-600 disabled:opacity-50 disabled:pointer-events-none",onClick:e[2]||(e[2]=(...C)=>a.deleteElement&&a.deleteElement(...C))}," Так, я впевнена(ий) ")])])]),_:1},8,["visible"])],64)}const j9=Ue(D9,[["render",$9]]),U9={},H9={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 q9(n,e,t,i,r,a){return f.openBlock(),f.createElementBlock("svg",H9,e[0]||(e[0]=[f.createElementVNode("path",{d:"m3 16 4 4 4-4"},null,-1),f.createElementVNode("path",{d:"M7 20V4"},null,-1),f.createElementVNode("path",{d:"m21 8-4-4-4 4"},null,-1),f.createElementVNode("path",{d:"M17 4v16"},null,-1)]))}const W9=Ue(U9,[["render",q9]]),G9={},Z9={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 Y9(n,e,t,i,r,a){return f.openBlock(),f.createElementBlock("svg",Z9,e[0]||(e[0]=[f.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),f.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),f.createElementVNode("path",{d:"M9 12l2 2l4 -4"},null,-1)]))}const X9={components:{IconExport:W9,IconChevronDown:i_,IconSuccess:Ue(G9,[["render",Y9]])},props:{table:String,columns:Array,page:[String,Number],filterCustom:String,filterState:String,filters:String},data(){return{isOpen:!1,tableFormats:["json","csv","xlsx"],format:"",cols:[],activeAction:"",isSuccessTemplate:!1,actions:[{name:"choceAll",function:this.choceAll,label:"Вибрати усі"},{name:"choceVisible",function:this.choceVisible,label:"Вибрати поточні"},{name:"clearAll",function:this.clearAll,label:"Жодного"}]}},watch:{isOpen(n){n||(this.format="",this.cols=[],this.activeAction="",this.isSuccessTemplate=!1)}},methods:{async exportTable(){var n;if(!((n=this.cols)!=null&&n.length)){this.$notify({type:"error",title:"Помилка",message:"Оберіть колонки для експорту!"});return}if(!this.format){this.$notify({type:"error",title:"Помилка",message:"Оберіть формат!"});return}try{const e=await ut.get("/api/export",{params:{table:this.table,format:this.format,cols:this.cols.join(","),page:this.page,filter:this.filters||null,state:this.filterState||null,custom:this.filterCustom||null},responseType:"blob"}),t=await e.data.text(),i=t!=null&&t.includes(";")?null:JSON==null?void 0:JSON.parse(t),r=new Blob([e.data],{type:"application/octet-stream"}),a=window.URL.createObjectURL(r),u=document.createElement("a");if(u.href=a,u.setAttribute("download",`${this.table.split(".")[0]}.${this.format}`),document.body.appendChild(u),typeof i=="string"){this.exportTable();return}u.click(),document.body.removeChild(u),window.URL.revokeObjectURL(a),this.$notify({type:"success",title:"Експорт",message:"Файл успішно експортовано!"}),this.isSuccessTemplate=!0}catch(e){console.log(e),this.$notify({type:"error",title:"Помилка",message:"Не вдалося експортувати файл."})}},selectFormat(n){this.format=n},choceAll(){var n;this.cols=(n=this.columns)==null?void 0:n.map(e=>e==null?void 0:e.name),this.activeAction="choceAll"},clearAll(){this.cols=[],this.activeAction="clearAll"},choceVisible(){var n,e;this.cols=(e=(n=this.columns)==null?void 0:n.filter(t=>(t==null?void 0:t.hidden)!==!0))==null?void 0:e.map(t=>t==null?void 0:t.name),this.activeAction="choceVisible"}}},K9={key:0,class:"flex flex-col items-center"},J9={key:1,class:"p-4"},Q9={class:"pb-5 mb-5 border-b border-gray-200 last:pb-0 last:mb-0 last:border-b-0 dark:border-neutral-700"},eH={class:"flex items-center"},tH={class:"flex items-center gap-[10px] ml-auto"},nH=["onClick"],iH={key:0,class:"block h-[8px] w-[8px] rounded-full bg-blue-500"},rH={class:"mt-2 flex row flex-wrap gap-y-[5px] gap-x-[10px]"},sH={class:"pb-5 mb-5 border-b border-gray-200 last:pb-0 last:mb-0 last:border-b-0 dark:border-neutral-700"},oH={class:"mt-2 space-y-2"},aH=["id","onChange"],lH=["for"],cH={key:0,class:"flex w-full justify-end p-[20px] gap-[6px] border-t"},uH={key:1,class:"flex w-full justify-end p-[20px] gap-[6px] border-t"};function hH(n,e,t,i,r,a){const u=f.resolveComponent("IconExport"),l=f.resolveComponent("IconChevronDown"),m=f.resolveComponent("IconSuccess"),b=f.resolveComponent("VsCheckbox"),w=f.resolveComponent("VsDialog");return f.openBlock(),f.createElementBlock(f.Fragment,null,[f.createElementVNode("button",{onClick:e[0]||(e[0]=E=>r.isOpen=!0),class:"py-2 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"},[f.createVNode(u,{height:"16",width:"16"}),e[7]||(e[7]=f.createTextVNode(" Експорт ")),f.createVNode(l,{height:"12",width:"16"})]),f.createVNode(w,{visible:r.isOpen,"onUpdate:visible":e[6]||(e[6]=E=>r.isOpen=E),title:"Експорт таблиці",size:"small",closeClickBack:!0},{footer:f.withCtx(()=>[r.isSuccessTemplate?(f.openBlock(),f.createElementBlock("div",cH,[f.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=>r.isOpen=!1)}," Закрити "),f.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=>r.isSuccessTemplate=!1)}," Вигрузити ще ")])):(f.openBlock(),f.createElementBlock("div",uH,[f.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=>r.isOpen=!1)}," Скасувати "),f.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[5]||(e[5]=(...E)=>a.exportTable&&a.exportTable(...E))}," Завантажити таблицю ")]))]),default:f.withCtx(()=>[r.isSuccessTemplate?(f.openBlock(),f.createElementBlock("div",K9,[f.createVNode(m,{height:"100",width:"100",class:"text-green-200 mb-[20px]"}),e[8]||(e[8]=f.createElementVNode("h2",null,"Звіт сформовано і збережено",-1))])):(f.openBlock(),f.createElementBlock("div",J9,[f.createElementVNode("div",Q9,[f.createElementVNode("div",eH,[e[9]||(e[9]=f.createElementVNode("h2",{class:"text-sm text-gray-500"}," Виберіть стовпці таблиці для експорту: ",-1)),f.createElementVNode("div",tH,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(r.actions,E=>(f.openBlock(),f.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"},[f.createElementVNode("span",{class:f.normalizeClass(["h-[14px] w-[14px] border rounded-full flex items-center justify-center",{"border-blue-500":(E==null?void 0:E.name)===r.activeAction}])},[(E==null?void 0:E.name)===r.activeAction?(f.openBlock(),f.createElementBlock("span",iH)):f.createCommentVNode("",!0)],2),f.createTextVNode(" "+f.toDisplayString(E==null?void 0:E.label),1)],8,nH))),128))])]),f.createElementVNode("div",rH,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(t.columns,(E,C)=>(f.openBlock(),f.createElementBlock("div",{class:"flex items-center",key:C,style:{width:"calc((100% - 10px) / 2)"}},[f.createVNode(b,{class:"[&>label]:text-sm [&>label]:text-gray-800 [&>label]:ms-3 !gap-x-[1px] !p-0",modelValue:r.cols,"onUpdate:modelValue":e[1]||(e[1]=A=>r.cols=A),value:E==null?void 0:E.name,label:E==null?void 0:E.ua},null,8,["modelValue","value","label"])]))),128))])]),f.createElementVNode("div",sH,[e[10]||(e[10]=f.createElementVNode("h2",{class:"text-sm text-gray-500"},"Виберіть формат таблиці:",-1)),f.createElementVNode("div",oH,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(r.tableFormats,(E,C)=>(f.openBlock(),f.createElementBlock("div",{class:"flex items-center",key:C},[f.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:A=>a.selectFormat(E)},null,40,aH),f.createElementVNode("label",{for:E,class:"text-sm text-gray-800 ms-3 dark:text-neutral-400"}," Формат "+f.toDisplayString(E),9,lH)]))),128))])])]))]),_:1},8,["visible"])],64)}const dH=Ue(X9,[["render",hH]]),pH={},fH={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-columns"};function mH(n,e,t,i,r,a){return f.openBlock(),f.createElementBlock("svg",fH,e[0]||(e[0]=[f.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M4 6l5.5 0"></path><path d="M4 10l5.5 0"></path><path d="M4 14l5.5 0"></path><path d="M4 18l5.5 0"></path><path d="M14.5 6l5.5 0"></path><path d="M14.5 10l5.5 0"></path><path d="M14.5 14l5.5 0"></path><path d="M14.5 18l5.5 0"></path>',9)]))}const gH=Ue(pH,[["render",mH]]),yH={props:{column:Object},emits:["update-column"],data(){return{value:!1}},watch:{value(n){this.$emit("update-column",{...this.column,hidden:!n})}},mounted(){var n;((n=this.column)==null?void 0:n.hidden)!==!0&&(this.value=!0)}},_H={class:"flex w-full gap-[8px] items-centr"};function bH(n,e,t,i,r,a){var u,l;return f.openBlock(),f.createElementBlock("label",_H,[f.withDirectives(f.createElementVNode("input",{"onUpdate:modelValue":e[0]||(e[0]=m=>r.value=m),type:"checkbox"},null,512),[[f.vModelCheckbox,r.value]]),f.createTextVNode(" "+f.toDisplayString(((u=t.column)==null?void 0:u.ua)||((l=t.column)==null?void 0:l.title)),1)])}const xH={components:{IconColumns:gH,AdminTableColumnsHiddenItem:Ue(yH,[["render",bH]])},emits:["update-columns"],props:{columns:Array},methods:{updateColumn(n){const e=this.columns.findIndex(i=>(i==null?void 0:i.name)===(n==null?void 0:n.name)),t=this.columns;t[e]=n,this.$emit("update-columns",[...t])}}},vH={class:"py-2 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"},wH={class:"py-[10px] px-[10px] w-[260px]"},kH={class:"flex flex-col gap-[3px] max-h-[400px] w-full overflow-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar:horizontal]:h-[8px] [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"};function SH(n,e,t,i,r,a){const u=f.resolveComponent("IconColumns"),l=f.resolveComponent("AdminTableColumnsHiddenItem"),m=f.resolveComponent("VsPopover");return f.openBlock(),f.createBlock(m,{trigger:"click",placement:"bottom"},{reference:f.withCtx(()=>[f.createElementVNode("button",vH,[f.createVNode(u,{height:"20",width:"16"})])]),default:f.withCtx(()=>[f.createElementVNode("div",wH,[e[0]||(e[0]=f.createElementVNode("h2",{class:"text-sm mb-[8px]"},"Оберіть колонки, щоб приховати",-1)),f.createElementVNode("ul",kH,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(t.columns,(b,w)=>(f.openBlock(),f.createElementBlock("li",{key:w},[f.createVNode(l,{column:b,onUpdateColumn:a.updateColumn},null,8,["column","onUpdateColumn"])]))),128))])])]),_:1})}const EH=Ue(xH,[["render",SH]]),CH={},TH={class:"hidden sm:block shrink-0 size-3",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 16 16"};function MH(n,e,t,i,r,a){return f.openBlock(),f.createElementBlock("svg",TH,e[0]||(e[0]=[f.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 1C8.55228 1 9 1.44772 9 2V7L14 7C14.5523 7 15 7.44771 15 8C15 8.55228 14.5523 9 14 9L9 9V14C9 14.5523 8.55228 15 8 15C7.44772 15 7 14.5523 7 14V9.00001L2 9.00001C1.44772 9.00001 1 8.5523 1 8.00001C0.999999 7.44773 1.44771 7.00001 2 7.00001L7 7.00001V2C7 1.44772 7.44772 1 8 1Z"},null,-1)]))}const a_=Ue(CH,[["render",MH]]),AH={props:{row:Object,column:Object,table:String}};function PH(n,e,t,i,r,a){var u,l,m,b,w,E,C,A;return f.openBlock(),f.createBlock(f.resolveDynamicComponent(((u=t.column)==null?void 0:u.format)==="custom"?(l=t.column)==null?void 0:l.component:`table-format-${((b=(m=t.column)==null?void 0:m.format)==null?void 0:b.toLowerCase())||"text"}`),{onUpdateTable:e[0]||(e[0]=D=>n.$emit("update-table")),name:(w=t.column)==null?void 0:w.name,data:t.row,value:(C=t.row)==null?void 0:C[(E=t.column)==null?void 0:E.name],table:t.table,column:t.column,edit:(A=t.column)==null?void 0:A.edit},null,40,["name","data","value","table","column","edit"])}const qS=Ue(AH,[["render",PH]]),IH={},DH={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 OH(n,e,t,i,r,a){return f.openBlock(),f.createElementBlock("svg",DH,e[0]||(e[0]=[f.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),f.createElementVNode("path",{d:"M5 12l14 0"},null,-1)]))}const BH={components:{IconPlus:a_,IconMinus:Ue(IH,[["render",OH]])},props:{title:String,defaultValue:{type:Boolean,default:()=>!1}},data(){return{expanded:this.defaultValue}}},NH={class:"hs-accordion"},zH={class:"py-0.5 flex items-center gap-x-0.5 w-full"},RH={class:"text-sm font-medium"},LH={class:"relative inline-block w-full duration-150 cursor-pointer before:block before:absolute b"};function VH(n,e,t,i,r,a){const u=f.resolveComponent("IconPlus"),l=f.resolveComponent("IconMinus");return f.openBlock(),f.createElementBlock("div",null,[f.createElementVNode("div",null,[f.createElementVNode("div",NH,[f.createElementVNode("div",zH,[f.createElementVNode("div",{onClick:e[0]||(e[0]=m=>r.expanded=!r.expanded),class:"rounded-md cursor-pointer grow"},[f.createElementVNode("span",RH,f.toDisplayString(t.title),1)]),f.createElementVNode("button",{class:"flex items-center justify-center rounded-md size-6 hover:bg-gray-100",onClick:e[1]||(e[1]=m=>r.expanded=!r.expanded)},[r.expanded?(f.openBlock(),f.createBlock(l,{key:1,width:"14"})):(f.openBlock(),f.createBlock(u,{key:0}))])]),f.createVNode(f.Transition,{name:"fade"},{default:f.withCtx(()=>[f.withDirectives(f.createElementVNode("div",LH,[f.renderSlot(n.$slots,"default",{},void 0,!0)],512),[[f.vShow,r.expanded]])]),_:3})])])])}const FH={components:{AdminComponentIs:qS,AdminTree:Ue(BH,[["render",VH],["__scopeId","data-v-e1f274c9"]]),VsNoData:jS,VsWidgetComments:NS,VsWidgetMap:ry,VsWidgetFileList:Xv},props:{table:String,columns:Array,row:Object}},$H={class:"hs-accordion border-gray-100 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 - 310px)"}},jH={class:"border-l",style:{height:"calc(100vh - 360px)"}},UH={class:"flex items-center justify-between py-1 gap-x-4"},HH={class:"col-span-1"},qH={class:"inline-flex items-center gap-x-2 text-[13px] text-gray-500 dark:text-neutral-500"},WH={class:"col-span-2"},GH={class:"font-medium text-[13px] text-gray-800 dark:text-neutral-200"},ZH={class:"table-info-card"},YH={class:"table-info-card"};function XH(n,e,t,i,r,a){var C,A,D;const u=f.resolveComponent("AdminComponentIs"),l=f.resolveComponent("AdminTree"),m=f.resolveComponent("VsWidgetMap"),b=f.resolveComponent("VsNoData"),w=f.resolveComponent("VsWidgetComments"),E=f.resolveComponent("VsWidgetFileList");return f.openBlock(),f.createElementBlock("div",$H,[e[0]||(e[0]=f.createElementVNode("div",{class:"p-[10px] pl-[18px] pb-[18px] border-b"},[f.createElementVNode("h2",{class:"text-sm font-medium"},"Інформація про об'єкт")],-1)),f.createElementVNode("div",jH,[(A=(C=n.$route)==null?void 0:C.query)!=null&&A.card?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[t.row?(f.openBlock(),f.createBlock(l,{key:0,defaultValue:!0,title:"Основна інформація",class:"border-b p-[10px] py-[16px]"},{default:f.withCtx(()=>[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(t.columns,R=>(f.openBlock(),f.createElementBlock("dl",UH,[f.createElementVNode("dt",HH,[f.createElementVNode("p",qH,f.toDisplayString((R==null?void 0:R.ua)||(R==null?void 0:R.title))+": ",1)]),f.createElementVNode("dd",WH,[f.createElementVNode("p",GH,[f.createVNode(u,{row:t.row,column:R,table:t.table},null,8,["row","column","table"])])])]))),256))]),_:1})):f.createCommentVNode("",!0),(D=t.row)!=null&&D.geom?(f.openBlock(),f.createBlock(l,{key:1,title:"Карта",class:"border-b p-[10px] py-[16px]"},{default:f.withCtx(()=>{var R,$;return[(R=t.row)!=null&&R.geom?(f.openBlock(),f.createBlock(m,{key:0,geometry:($=t.row)==null?void 0:$.geom,zoom:14},null,8,["geometry"])):(f.openBlock(),f.createBlock(b,{key:1,title:"У об'єкта відсутня геометрія",text:"",class:"[&>div]:h-[200px] [&>div]:min-h-[400px] h-[400px]"}))]}),_:1})):f.createCommentVNode("",!0),f.createVNode(l,{title:"Коментарі",class:"border-b p-[10px] py-[16px]"},{default:f.withCtx(()=>{var R;return[f.createElementVNode("div",ZH,[f.createVNode(w,{id:(R=t.row)==null?void 0:R.id},null,8,["id"])])]}),_:1}),f.createVNode(l,{title:"Файли",class:"border-b p-[10px] py-[16px]"},{default:f.withCtx(()=>{var R;return[f.createElementVNode("div",YH,[f.createVNode(E,{id:(R=t.row)==null?void 0:R.id},null,8,["id"])])]}),_:1})],64)):(f.openBlock(),f.createBlock(b,{key:1,text:"Оберіть один з об'єктів в таблиці для відображення інформаціі про нього"}))])])}const KH=Ue(FH,[["render",XH]]),JH={},QH={class:"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 eq(n,e,t,i,r,a){return f.openBlock(),f.createElementBlock("svg",QH,e[0]||(e[0]=[f.createElementVNode("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"},null,-1),f.createElementVNode("path",{d:"M15 3v18"},null,-1),f.createElementVNode("path",{d:"m8 9 3 3-3 3"},null,-1)]))}const tq=Ue(JH,[["render",eq]]),nq={},iq={class:"h21yx vs0hq",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function rq(n,e,t,i,r,a){return f.openBlock(),f.createElementBlock("svg",iq,e[0]||(e[0]=[f.createStaticVNode('<line x1="21" x2="14" y1="4" y2="4"></line><line x1="10" x2="3" y1="4" y2="4"></line><line x1="21" x2="12" y1="12" y2="12"></line><line x1="8" x2="3" y1="12" y2="12"></line><line x1="21" x2="16" y1="20" y2="20"></line><line x1="12" x2="3" y1="20" y2="20"></line><line x1="14" x2="14" y1="2" y2="6"></line><line x1="8" x2="8" y1="10" y2="14"></line><line x1="16" x2="16" y1="18" y2="22"></line>',9)]))}const sq={emits:["filterChange"],props:{scheme:{type:Object},onFilters:{type:Number},table:{type:String}},components:{IconFilter:Ue(nq,[["render",rq]])},data(){return{isFilters:!1}},methods:{closeFilter({target:n}){this.isFilters&&n.classList.contains("filter-container")&&(this.isFilters=!1)}}},oq={key:0,class:"font-medium text-[10px] py-0.5 px-[5px] bg-gray-800 text-white leading-3 rounded-full dark:bg-neutral-500"},aq={class:"filter-content h-screen bg-white w-[400px] p-[20px] pt-[10px] overflow-x-auto bg-white [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar:horizontal]:h-[8px] [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"};function lq(n,e,t,i,r,a){const u=f.resolveComponent("IconFilter"),l=f.resolveComponent("VsFilter");return f.openBlock(),f.createElementBlock(f.Fragment,null,[f.createElementVNode("button",{onClick:e[0]||(e[0]=m=>r.isFilters=!r.isFilters),class:"py-2 px-2.5 inline-flex items-center gap-x-1.5 text-xs font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"},[f.createVNode(u,{height:"16",width:"16"}),e[4]||(e[4]=f.createTextVNode(" Фільтри ")),t.onFilters?(f.openBlock(),f.createElementBlock("span",oq,f.toDisplayString(t.onFilters),1)):f.createCommentVNode("",!0)]),f.createVNode(f.Transition,{name:"fade"},{default:f.withCtx(()=>{var m;return[f.withDirectives(f.createElementVNode("div",{onClick:e[3]||(e[3]=(...b)=>a.closeFilter&&a.closeFilter(...b)),style:{height:"100vh"},class:"fixed filter-container top-0 flex justify-end items-center z-[2] right-0 left-0 bottom-0 bg-[rgba(0,0,0,0.5)]"},[f.createElementVNode("div",aq,[(m=t.scheme)!=null&&m.length?(f.openBlock(),f.createBlock(l,{key:0,ref:"filter",scheme:t.scheme,layout:"default","apply-vue-router":"",history:"",token:t.table,name:"filter",onFilterChange:e[1]||(e[1]=b=>n.$emit("filterChange",b)),closeFilterBtn:!0,onFilterClose:e[2]||(e[2]=b=>r.isFilters=!1)},null,8,["scheme","token"])):f.createCommentVNode("",!0)])],512),[[f.vShow,r.isFilters]])]}),_:1})],64)}const cq=Ue(sq,[["render",lq]]),uq={props:{tabsList:{type:Array,default:()=>[]},filterState:String}},hq={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"},dq=["onClick"];function pq(n,e,t,i,r,a){return f.openBlock(),f.createElementBlock("nav",hq,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(t.tabsList,u=>(f.openBlock(),f.createElementBlock("button",{onClick:l=>n.$emit("update:filterState",u==null?void 0:u.name),class:f.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":(u==null?void 0:u.name)===t.filterState}])},f.toDisplayString(u==null?void 0:u.label),11,dq))),256))])}const fq=Ue(uq,[["render",pq]]),mq={},gq={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 yq(n,e,t,i,r,a){return f.openBlock(),f.createElementBlock("svg",gq,e[0]||(e[0]=[f.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),f.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 _q={components:{IconFilter2:Ue(mq,[["render",yq]])},props:{filterCustom:String,customList:Array}},bq={class:"py-2 px-2.5 inline-flex items-center gap-x-1.5 text-xs font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"},xq={class:"flex flex-col gap-[4px]"},vq=["onClick"];function wq(n,e,t,i,r,a){const u=f.resolveComponent("IconFilter2"),l=f.resolveComponent("VsPopover");return f.openBlock(),f.createBlock(l,{ref:"popover",placement:"bottom"},{reference:f.withCtx(()=>[f.createElementVNode("button",bq,[f.createVNode(u,{height:"20",width:"20"})])]),default:f.withCtx(()=>[f.createElementVNode("div",xq,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(t.customList,(m,b)=>(f.openBlock(),f.createElementBlock("button",{onClick:w=>{var E;n.$emit("update:filterCustom",m==null?void 0:m.name),(E=n.$refs)==null||E.popover.togglePopover()},key:b,class:f.normalizeClass(["p-[8px] block rounded-lg w-[140px] text-start hover:bg-gray-100 !duration-300",{"bg-gray-100":t.filterCustom===(m==null?void 0:m.name)}])},f.toDisplayString(m==null?void 0:m.label),11,vq))),128)),f.createElementVNode("button",{class:"p-[8px] block rounded-lg w-[140px] text-start hover:bg-gray-100 !duration-300",onClick:e[0]||(e[0]=m=>{var b;n.$emit("update:filterCustom",void 0),(b=n.$refs)==null||b.popover.togglePopover()})}," Скинути фільтри ")])]),_:1},512)}const kq=Ue(_q,[["render",wq]]),Sq={class:"flex items-center gap-x-2"},Eq={props:{table:String,title:String},components:{AdminTableControl:j9,AdminTableExport:dH,AdminTableColumnsHidden:EH,AdminTableColumn:I9,AdminNodata:e_,IconPlus:a_,IconSearch:n_,AdminTableCardInfo:KH,IconOpenCard:tq,AdminComponentIs:qS,AdminTableFilters:cq,AdminTableTabs:fq,AdminTableCustomFilters:kq,AdminTableCustomButtons:{__name:"admin-table-custom-buttons",props:{slots:Object},setup(n){var l,m,b,w,E;const{asyncTemplateSlot:e}=(E=(w=(b=(m=(l=f.getCurrentInstance())==null?void 0:l.appContext)==null?void 0:m.app)==null?void 0:b.config)==null?void 0:w.globalProperties)==null?void 0:E.utils,t=f.ref(""),i=f.ref(""),r=n,a=()=>{var C,A,D,R,$;if((C=r.slots)!=null&&C.panelLeft||(i.value="div"),(D=(A=r.slots)==null?void 0:A.panelLeft)!=null&&D.includes("<")){const G=e("PanelLeft",(R=r.slots)==null?void 0:R.panelLeft,["name"]);i.value=G}else i.value=($=r.slots)==null?void 0:$.panelLeft},u=()=>{var C,A,D,R,$;if((C=r.slots)!=null&&C.panelRight||(t.value="div"),(D=(A=r.slots)==null?void 0:A.panelRight)!=null&&D.includes("<")){const G=e("PanelRight",(R=r.slots)==null?void 0:R.panelRight,["name"]);t.value=G}else t.value=($=r.slots)==null?void 0:$.panelRight};return a(),u(),(C,A)=>(f.openBlock(),f.createElementBlock("div",Sq,[(f.openBlock(),f.createBlock(f.resolveDynamicComponent(i.value))),(f.openBlock(),f.createBlock(f.resolveDynamicComponent(t.value)))]))}},AdminCustomButtonAdd:{__name:"admin-custom-button-add",props:{slots:Object},setup(n){var a,u,l,m,b;const{asyncTemplateSlot:e}=(b=(m=(l=(u=(a=f.getCurrentInstance())==null?void 0:a.appContext)==null?void 0:u.app)==null?void 0:l.config)==null?void 0:m.globalProperties)==null?void 0:b.utils,t=f.ref(""),i=n;return(()=>{var w,E,C,A,D;if((w=i.slots)!=null&&w.addButton||(t.value="div"),(C=(E=i.slots)==null?void 0:E.addButton)!=null&&C.includes("<")){const R=e("addButton",(A=i.slots)==null?void 0:A.addButton,["IconPlus"]);t.value=R}else t.value=(D=i.slots)==null?void 0:D.addButton})(),(w,E)=>t.value?(f.openBlock(),f.createBlock(f.resolveDynamicComponent(t.value),{key:0,IconPlus:a_})):f.createCommentVNode("",!0)}}},data(){return{tableData:{},filterScheme:[],page:1,searchValue:"",limit:0,filters:null,activeColumn:"",isVisibleCardInfo:!1,onFilters:0,filterState:null,filterCustom:null,visibleColumns:[],initialHiddenColumns:""}},async mounted(){await this.checkUrlMounted(),await this.getTableData(),await this.getFilters()},computed:{defaultPage(){var n,e;return((e=(n=this.$route)==null?void 0:n.query)==null?void 0:e.page)||1},columns(){var n,e;return(e=(n=this.tableData)==null?void 0:n.columns)==null?void 0:e.filter(t=>(t==null?void 0:t.hidden)!==!0)},isForm(){var n,e,t;return((n=this.tableData)==null?void 0:n.form)&&((t=(e=this.tableData)==null?void 0:e.actions)==null?void 0:t.includes("add"))},isNoData(){var n,e;return!((n=this.tableData)!=null&&n.rows)||!((e=this.columns)!=null&&e.length)},activeCardRow(){var n,e;return((e=(n=this.tableData)==null?void 0:n.rows)==null?void 0:e.find(t=>{var i,r;return(t==null?void 0:t.id)===((r=(i=this.$route)==null?void 0:i.query)==null?void 0:r.card)}))||{}},getActions(){var n;return(n=this.tableData)==null?void 0:n.actions}},watch:{async table(){this.tableData=null,await this.getTableData()},searchValue:{handler:((n,e=300)=>{let t;return function(...i){clearTimeout(t),t=setTimeout(()=>{n.apply(this,i)},e)}})(async function(n){var e;await this.getTableData(),this.$router.push({...this.$route,query:{...(e=this.$route)==null?void 0:e.query,search:n||void 0}})},500)},$route:{handler(n,e){var t,i;((t=n==null?void 0:n.params)==null?void 0:t.catchAll)!==((i=e==null?void 0:e.params)==null?void 0:i.catchAll)&&(this.visibleColumns=[],this.unmountedData(),this.getFilters())},deep:!0},limit(n){var e;this.$router.replace({query:{...(e=this.$route)==null?void 0:e.query,limit:n}})},filterState(n){var e;n&&(this.$router.replace({...this.$route,query:{...(e=this.$route)==null?void 0:e.query,filterState:n}}),this.getTableData())},filterCustom(n){var e;this.$router.replace({...this.$route,query:{...(e=this.$route)==null?void 0:e.query,custom:n}}),this.getTableData()},columns(n){var e,t,i,r;this.visibleColumns=n==null?void 0:n.map(a=>a==null?void 0:a.name),this.initialHiddenColumns===((e=this.visibleColumns)==null?void 0:e.join(","))&&(this.visibleColumns=[]),this.$router.replace({...this.$route,query:{...(t=this.$route)==null?void 0:t.query,columns:(i=this.visibleColumns)!=null&&i.length?(r=this.visibleColumns)==null?void 0:r.join(","):void 0}})}},methods:{async checkUrlMounted(){var n,e,t,i,r,a,u,l,m,b,w,E,C,A,D,R,$;this.page=((e=(n=this.$route)==null?void 0:n.query)==null?void 0:e.page)||1,this.limit=((i=(t=this.$route)==null?void 0:t.query)==null?void 0:i.limit)||20,this.filters=((u=decodeURI((a=(r=this.$route)==null?void 0:r.query)==null?void 0:a.filter))==null?void 0:u.replaceAll("+"," "))||null,this.filterState=((m=(l=this.$route)==null?void 0:l.query)==null?void 0:m.filterState)||null,this.filterCustom=((w=(b=this.$route)==null?void 0:b.query)==null?void 0:w.custom)||null,this.searchValue=((C=(E=this.$route)==null?void 0:E.query)==null?void 0:C.search)||"",this.visibleColumns=((R=(D=(A=this.$route)==null?void 0:A.query)==null?void 0:D.columns)==null?void 0:R.split(","))||[],($=this.$route)!=null&&$.query.card&&(this.isVisibleCardInfo=!0)},rowWidth(n){var t,i;const e=(i=(t=this.tableData)==null?void 0:t.columns)==null?void 0:i.find(r=>r.name===n);if(e){const r=e==null?void 0:e.width;return typeof r=="number"?`${r}px`:r!=null&&r.includes("px")?r:`${r}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 n,e,t,i,r,a,u,l,m,b,w;try{const{data:E}=await ut.get(`/api/template/table/${this.table}`),C=await ut.get(`/api/table-data/${this.table}`,{params:{page:this.page,search:this.searchValue||null,limit:this.limit,filter:this.filters||null,order:((e=(n=this.$route)==null?void 0:n.query)==null?void 0:e.sort)||null,state:this.filterState||null,custom:this.filterCustom||null}});this.tableData={...E,...(C==null?void 0:C.data)||{}},this.initialHiddenColumns=(a=(r=(i=(t=this.tableData)==null?void 0:t.columns)==null?void 0:i.filter(A=>(A==null?void 0:A.hidden)!==!0))==null?void 0:r.map(A=>A==null?void 0:A.name))==null?void 0:a.join(","),(u=this.visibleColumns)!=null&&u.length?(l=this.tableData)==null||l.columns.forEach(A=>{var D;(D=this.visibleColumns)!=null&&D.includes(A==null?void 0:A.name)?A.hidden=!1:A.hidden=!0}):this.visibleColumns=(w=(b=(m=this.tableData)==null?void 0:m.columns)==null?void 0:b.filter(A=>(A==null?void 0:A.hidden)!==!0))==null?void 0:w.map(A=>A==null?void 0:A.name)}catch{}},async getFilters(){var n;try{const{data:e}=await ut.get(`/api/table-filter/${this.table}`);this.filterScheme=(n=e==null?void 0:e.list)==null?void 0:n.map(t=>({...t,label:(t==null?void 0:t.label)||(t==null?void 0:t.ua)}))}catch{}},async handlePageChange(n){const e=this.$route.query;this.page=n,!(!(e!=null&&e.page)&&n===1||e.page===n)&&(await this.$router.replace({query:{...e,page:n}}),await this.getTableData())},async changeLimit(n){this.limit=await n,this.defaultPage=1,await this.getTableData()},async filterChange({url:n,state:e}){var t;this.filters=n!=="no-url"?n:null,this.onFilters=(t=Object.entries(e))==null?void 0:t.length,this.page=1,await this.getTableData()},changeActiveColumn(n){this.activeColumn=n,this.getTableData()},pushToCard(n){var e;((e=this.tableData)==null?void 0:e.card)===!1||this.$router.push(`/card/${this.table}/${n}`)},changeActiveCardInfo(n){var e;this.isVisibleCardInfo&&this.$router.push({...this.$route,query:{...(e=this.$route)==null?void 0:e.query,card:n}})},toggleCardInfo(){var n;this.isVisibleCardInfo=!this.isVisibleCardInfo,this.isVisibleCardInfo||this.$router.push({...this.$route,query:{...(n=this.$route)==null?void 0:n.query,card:void 0}})}}},Cq={class:"w-[calc(100vw - 320px)] bg-gray-50"},Tq={class:"h-[76px] mt-[15px] flex items-center justify-between mx-[20px] px-[20px] bg-white border rounded-xl"},Mq={class:"text-xl font-medium"},Aq={style:{height:"calc(100vh - 155px)"},class:"bg-gray-50 p-[20px] flex pt-[10px] lg:w-[calc(100vw-260px)] w-[100vw]"},Pq={class:"bg-white w-full rounded-xl border p-[20px] pr-0"},Iq={class:"flex"},Dq={class:"flex gap-[6px] ml-auto"},Oq={class:"inline-block w-full align-middle"},Bq={key:0,class:"relative min-w-full divide-y divide-gray-200 table-fixed w-max dark:divide-neutral-700"},Nq={class:"sticky top-[-1px] bg-white w-full after:absolute after:content-[''] after:block after:w-full after:h-px after:bg-stone-200"},zq={class:"right-0 border-t border-stone-200"},Rq={key:0,class:"w-[70px] sticky right-0 top-0"},Lq={class:"divide-y divide-gray-200"},Vq={class:"px-4 py-3 text-sm text-gray-600"},Fq=["onClick"],$q=["onClick"],jq={class:"p-[20px] flex justify-start items-center w-full"},Uq={class:"w-[200px] md:inline-flex hidden"},Hq={class:"text-sm text-gray-600 dark:text-neutral-400"},qq={class:"font-semibold text-gray-800 dark:text-neutral-200"},Wq={key:0},Gq={key:0,class:"font-semibold text-gray-800 dark:text-neutral-200"};function Zq(n,e,t,i,r,a){var $e,Be,pt,tt,Nt,rt,Mt,Rt,Ft,zt,Ht,yn,dn,wn,pn,ti,zn,In,Rn,Ee,je,Ye,ot,Lt,Qt,At;const u=f.resolveComponent("AdminCustomButtonAdd"),l=f.resolveComponent("IconPlus"),m=f.resolveComponent("router-link"),b=f.resolveComponent("AdminTableTabs"),w=f.resolveComponent("IconSearch"),E=f.resolveComponent("VsText"),C=f.resolveComponent("AdminTableCustomButtons"),A=f.resolveComponent("AdminTableCustomFilters"),D=f.resolveComponent("AdminTableColumnsHidden"),R=f.resolveComponent("AdminTableExport"),$=f.resolveComponent("AdminTableFilters"),G=f.resolveComponent("IconOpenCard"),ee=f.resolveComponent("AdminTableColumn"),ce=f.resolveComponent("AdminComponentIs"),U=f.resolveComponent("AdminTableControl"),Me=f.resolveComponent("AdminNodata"),ke=f.resolveComponent("VsPagination"),Pe=f.resolveComponent("AdminTableCardInfo");return f.openBlock(),f.createElementBlock("div",Cq,[f.createElementVNode("div",Tq,[f.createElementVNode("h2",Mq,f.toDisplayString(t.title),1),a.isForm?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[(Be=($e=r.tableData)==null?void 0:$e.slots)!=null&&Be.addButton?(f.openBlock(),f.createBlock(u,{key:0,slots:(pt=r.tableData)==null?void 0:pt.slots},null,8,["slots"])):(f.openBlock(),f.createBlock(m,{key:1,to:`/add?table=${(Nt=(tt=n.$route)==null?void 0:tt.params)==null?void 0:Nt.catchAll}`,class:"inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-blue-600 border border-transparent rounded-lg gap-x-2 hover:bg-blue-700 hover:text-white"},{default:f.withCtx(()=>[f.createVNode(l,{height:"16",width:"16"}),e[5]||(e[5]=f.createTextVNode(" Додати "))]),_:1},8,["to"]))],64)):f.createCommentVNode("",!0)]),f.createElementVNode("div",Aq,[f.createElementVNode("div",Pq,[(Mt=(rt=r.tableData)==null?void 0:rt.filterState)!=null&&Mt.length?(f.openBlock(),f.createBlock(b,{key:0,tabsList:(Rt=r.tableData)==null?void 0:Rt.filterState,filterState:r.filterState,"onUpdate:filterState":e[0]||(e[0]=Re=>r.filterState=Re)},null,8,["tabsList","filterState"])):f.createCommentVNode("",!0),f.createElementVNode("div",Iq,[f.createElementVNode("div",{class:f.normalizeClass([r.isVisibleCardInfo?"w-[calc(100%-360px)]":"w-full"])},[f.createElementVNode("div",{class:f.normalizeClass(["flex sm:grid sm:grid-cols-2 gap-x-2 sm:gap-x-5 mb-[10px] relative",{"pr-[20px]":!r.isVisibleCardInfo}])},[f.createVNode(w,{height:"14",width:"14",class:"absolute top-[10px] left-[14px] text-gray-500 z-[1]"}),f.createVNode(E,{modelValue:r.searchValue,"onUpdate:modelValue":e[1]||(e[1]=Re=>r.searchValue=Re),placeholder:"Пошук...",clearable:!0,class:"[&>input]:py-[7px] [&>input]:ps-10 [&>input]:pe-8 [&>input]:block [&>input]:w-full [&>input]:bg-gray-100 [&>input]:border-transparent [&>input]:rounded-lg [&>input]:text-sm [&>input]:focus:bg-white [&>input]:focus:border-blue-500 [&>input]:focus:ring-blue-500 [&>input]:disabled:opacity-50 [&>input]:disabled:pointer-events-none [&>input]:dark:bg-neutral-700 [&>input]:dark:border-transparent [&>input]:dark:text-neutral-400 [&>input]:dark:placeholder:text-neutral-400 dark:focus:bg-neutral-800 dark:focus:ring-neutral-600"},null,8,["modelValue"]),f.createElementVNode("div",Dq,[(Ft=r.tableData)!=null&&Ft.slots?(f.openBlock(),f.createBlock(C,{key:0,slots:(zt=r.tableData)==null?void 0:zt.slots},null,8,["slots"])):f.createCommentVNode("",!0),(yn=(Ht=r.tableData)==null?void 0:Ht.filterCustom)!=null&&yn.length?(f.openBlock(),f.createBlock(A,{key:1,customList:(dn=r.tableData)==null?void 0:dn.filterCustom,filterCustom:r.filterCustom,"onUpdate:filterCustom":e[2]||(e[2]=Re=>r.filterCustom=Re)},null,8,["customList","filterCustom"])):f.createCommentVNode("",!0),f.createVNode(D,{columns:(wn=r.tableData)==null?void 0:wn.columns,onUpdateColumns:e[3]||(e[3]=Re=>r.tableData.columns=Re)},null,8,["columns"]),((pn=r.tableData)==null?void 0:pn.export)!==!1?(f.openBlock(),f.createBlock(R,{key:2,table:t.table,columns:(ti=r.tableData)==null?void 0:ti.columns,page:r.page,"filter-state":r.filterState,"filter-custom":r.filterCustom,filters:r.filters},null,8,["table","columns","page","filter-state","filter-custom","filters"])):f.createCommentVNode("",!0),(zn=r.filterScheme)!=null&&zn.length?(f.openBlock(),f.createBlock($,{key:3,scheme:r.filterScheme,onFilters:r.onFilters,table:t.table,onFilterChange:a.filterChange},null,8,["scheme","onFilters","table","onFilterChange"])):f.createCommentVNode("",!0),f.createElementVNode("button",{onClick:e[4]||(e[4]=(...Re)=>a.toggleCardInfo&&a.toggleCardInfo(...Re)),class:"py-2 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"},[f.createVNode(G,{class:f.normalizeClass({"rotate-180 duration-300":!r.isVisibleCardInfo})},null,8,["class"])])])],2),f.createElementVNode("div",{class:f.normalizeClass(["flex items-start justify-start w-full space-y-5",{"pr-[20px]":!r.isVisibleCardInfo}])},[f.createElementVNode("div",{style:f.normalizeStyle({height:(Rn=(In=r.tableData)==null?void 0:In.filterState)!=null&&Rn.length?"calc(100vh - 370px)":"calc(100vh - 330px)"}),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"},[f.createElementVNode("div",Oq,[a.isNoData?(f.openBlock(),f.createBlock(Me,{key:1})):(f.openBlock(),f.createElementBlock("table",Bq,[f.createElementVNode("thead",Nq,[f.createElementVNode("tr",zq,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.columns,Re=>(f.openBlock(),f.createBlock(ee,{key:Re.name,style:f.normalizeStyle({width:a.rowWidth(Re==null?void 0:Re.name),textAlign:Re==null?void 0:Re.align,wordBreak:Re==null?void 0:Re.wrap}),data:Re,activeColumn:r.activeColumn,onChangeActive:a.changeActiveColumn},null,8,["style","data","activeColumn","onChangeActive"]))),128)),(je=(Ee=a.getActions)==null?void 0:Ee.filter(Re=>Re!=="add"&&Re!=="view"))!=null&&je.length?(f.openBlock(),f.createElementBlock("th",Rq)):f.createCommentVNode("",!0)])]),f.createElementVNode("tbody",Lq,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList((Ye=r.tableData)==null?void 0:Ye.rows,(Re,sn)=>{var ve,_n,mr,qt,on,vi,wi,si,Wi,oi;return f.openBlock(),f.createElementBlock("tr",{key:sn,class:f.normalizeClass({"bg-gray-50":((_n=(ve=n.$route)==null?void 0:ve.query)==null?void 0:_n.card)===(Re==null?void 0:Re.id)})},[f.createElementVNode("td",Vq,[f.createElementVNode("button",{onClick:()=>a.pushToCard(Re==null?void 0:Re.id),class:f.normalizeClass(["text-sm font-medium",[((mr=r.tableData)==null?void 0:mr.card)===!1?"":"text-blue-600 decoration-2 focus:outline-none focus:underline hover:text-blue-600 hover:underline"]])},[f.createVNode(ce,{row:Re,column:a.columns[0],table:t.table,onUpdateTable:a.getTableData},null,8,["row","column","table","onUpdateTable"])],10,Fq)]),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList((qt=a.columns)==null?void 0:qt.slice(1),Oi=>(f.openBlock(),f.createElementBlock("td",{onClick:Qr=>a.changeActiveCardInfo(Re==null?void 0:Re.id),class:f.normalizeClass(["px-3 py-3 text-sm text-gray-600 text-start",{"cursor-pointer":r.isVisibleCardInfo}]),key:Oi.name},[f.createVNode(ce,{row:Re,column:Oi,table:t.table,onUpdateTable:a.getTableData},null,8,["row","column","table","onUpdateTable"])],10,$q))),128)),(vi=(on=a.getActions)==null?void 0:on.filter(Oi=>Oi!=="add"&&Oi!=="view"))!=null&&vi.length?(f.openBlock(),f.createElementBlock("td",{key:0,class:f.normalizeClass(["text-center sticky right-0 w-[80px] px-[10px]",{"bg-gray-50":((si=(wi=n.$route)==null?void 0:wi.query)==null?void 0:si.card)===(Re==null?void 0:Re.id),"bg-white":((oi=(Wi=n.$route)==null?void 0:Wi.query)==null?void 0:oi.card)!==(Re==null?void 0:Re.id)}])},[f.createVNode(U,{actions:a.getActions,isForm:a.isForm,item:Re,table:t.table,onUpdateTable:a.getTableData},null,8,["actions","isForm","item","table","onUpdateTable"])],2)):f.createCommentVNode("",!0)],2)}),128))])]))])],4)],2),f.createElementVNode("div",jq,[f.createElementVNode("div",Uq,[f.createElementVNode("p",Hq,[f.createElementVNode("span",qq,[f.createTextVNode(f.toDisplayString(r.filters||r.searchValue?"Знайдено":"Об'єктів")+" "+f.toDisplayString(((ot=r.tableData)==null?void 0:ot.count)||"0 ")+" ",1),r.filters||r.searchValue?(f.openBlock(),f.createElementBlock("span",Wq," з")):f.createCommentVNode("",!0)]),r.filters||r.searchValue?(f.openBlock(),f.createElementBlock("span",Gq,f.toDisplayString(" "+((Lt=r.tableData)==null?void 0:Lt.filtered)||0),1)):f.createCommentVNode("",!0)])]),Math.ceil(((Qt=r.tableData)==null?void 0:Qt.filtered)/r.limit)>1?(f.openBlock(),f.createBlock(ke,{key:0,goTo:!1,class:"justify-end","default-page":parseInt(a.defaultPage),total:((At=r.tableData)==null?void 0:At.filtered)||0,pageSize:parseInt(r.limit),onPageChange:a.handlePageChange,pageSizes:[10,16,20],onPageSizeChange:a.changeLimit,backgroundColor:"#F3F4F6"},null,8,["default-page","total","pageSize","onPageChange","onPageSizeChange"])):f.createCommentVNode("",!0)])],2),f.createVNode(f.Transition,{name:"slide-fade"},{default:f.withCtx(()=>{var Re;return[r.isVisibleCardInfo?(f.openBlock(),f.createBlock(Pe,{key:0,table:t.table,columns:(Re=r.tableData)==null?void 0:Re.columns,row:a.activeCardRow},null,8,["table","columns","row"])):f.createCommentVNode("",!0)]}),_:1})])])])])}const Yq={components:{AdminTable:Ue(Eq,[["render",Zq],["__scopeId","data-v-5b7d20f1"]])},data(){return{table:!1,interface:"",title:""}},watch:{$route:{async handler(){Jr!=null&&Jr.value||await this.getMenu(),await this.checkPageType()},deep:!0},title(n){var e;n&&(document.title=(((e=ia.value)==null?void 0:e.titlePrefix)||"")+n)}},async mounted(){await this.checkPageType()},methods:{flattenMenu(n){const e=[];return n.forEach(t=>{t.menu?e.push(...this.flattenMenu(t.menu)):e.push(t)}),e},async checkPageType(){var i,r;const n=this.flattenMenu(Jr.value);n!=null&&n.length||this.$router.replace("/404");const e=n==null?void 0:n.find(a=>{var u,l;return(a==null?void 0:a.path)==((l=(u=this.$route)==null?void 0:u.params)==null?void 0:l.catchAll)});this.title=e==null?void 0:e.ua,e||this.$router.replace("/404"),e!=null&&e.component&&this.$router.replace((r=(i=this.$route)==null?void 0:i.params)==null?void 0:r.catchAll);const t=e==null?void 0:e.table;this.table=t||!1,!t&&this.getInterface()},async getInterface(){var n,e;try{const{data:t}=await ut.get(`/api/template/interface/${((e=(n=this.$route)==null?void 0:n.params)==null?void 0:e.catchAll)||""}`);this.interface=t||""}catch{this.interface=""}}}},Xq=["innerHTML"];function Kq(n,e,t,i,r,a){const u=f.resolveComponent("AdminTable");return r.table?(f.openBlock(),f.createBlock(u,{key:0,table:r.table,title:r.title},null,8,["table","title"])):(f.openBlock(),f.createElementBlock("div",{key:1,class:"w-full bg-gray-50",style:{height:"calc(100vh - 120px)"},innerHTML:r.interface},null,8,Xq))}const Jq=Object.freeze(Object.defineProperty({__proto__:null,default:Ue(Yq,[["render",Kq]])},Symbol.toStringTag,{value:"Module"}));return mU});
794
+ `}).mount(t)}};window.addEventListener("click",n=>{var t,i,r;const e=(t=n==null?void 0:n.target)==null?void 0:t.closest("[_href]");if(e&&(e==null?void 0:e.tagName)==="A"){const a=e==null?void 0:e.getAttribute("_href");(r=(i=window==null?void 0:window.app)==null?void 0:i.router)==null||r.push(a),n==null||n.preventDefault()}});const pU=async()=>{try{const{data:n}=await ut.get("/api/user-menu");return Jr.value=n,t_(n)}catch(n){return console.error(n),[]}},fU=(n,e)=>{Object.entries(e).forEach(([t,i])=>{n.component(t,i)})},mU={async install(n,{componentsApp:e={},settings:t,routes:i=[]}){ia.value={...ia,...t};try{const a=(await pU()).filter(l=>l==null?void 0:l.component).map(l=>({...l,component:{...s_,...e}[l==null?void 0:l.component]}));fU(n,{...s_,...e}),n.component("admin",eM);const{router:u}=await zA(a.concat(i));window.app={...n,router:u},window.v3plugin={...n.config.globalProperties,...o_},n.config.globalProperties={...n.config.globalProperties,$componentsConfig:{...AB,componentsApp:e},$router:u,$v3plugin:o_,$utils:{reloadCardPage:Gf}},n.use(u)}catch(r){console.error(r)}},components:s_,plugins:o_},gU={data(){return{formValues:{},scheme:null,table:"",token:"",style:null}},mounted(){this.getFormScheme()},methods:{flattenMenu(n){const e=[];return n.forEach(t=>{t.menu?e.push(...this.flattenMenu(t.menu)):e.push(t)}),e},async getFormScheme(){var i,r;const n=this.flattenMenu(Jr.value);n!=null&&n.length||this.$router.replace("/404");const e=n==null?void 0:n.find(a=>{var u,l;return(a==null?void 0:a.path)==((l=(u=this.$route)==null?void 0:u.query)==null?void 0:l.table)});e||this.$router.replace("/404");const t=e==null?void 0:e.table;this.table=t;try{const{data:{form:a}}=await ut.get(`/api/template/table/${t}`),{data:u}=await ut.get(`/api/table/${this.table}/${(r=(i=this.$route)==null?void 0:i.query)==null?void 0:r.id}`);this.token=(u==null?void 0:u.token)||"",this.formValues=u||{};const{data:l}=await ut.get(`/api/template/form/${a}`);this.scheme=(l==null?void 0:l.schema)||l,this.style=(l==null?void 0:l.style)||null}catch{}},async onlyEditObject(){var e,t,i,r,a,u,l,m,b;const n=this.$refs.form;try{await n.doValidation(),await ut.put(`/api/table/${this.token}`,this.formValues),await this.$notify({title:"Успішно!",message:"Об'єкт успішно створено",type:"success"})}catch(w){const E=((e=w==null?void 0:w.response)==null?void 0:e.data)||"";let C=((a=(r=(i=(t=Object.entries(n==null?void 0:n.formErrors))==null?void 0:t[0])==null?void 0:i[1])==null?void 0:r[0])==null?void 0:a.message)==="Це поле обов'язкове"?"Заповніть обов'язкові поля":(b=(m=(l=(u=Object.entries(n==null?void 0:n.formErrors))==null?void 0:u[0])==null?void 0:l[1])==null?void 0:m[0])==null?void 0:b.message;this.$notify({title:"Помилка!",message:E||C||"Сталася помилка валідаціі",type:"error"})}},async editObjectAndRedirect(){var e,t,i,r,a,u,l,m,b;const n=this.$refs.form;try{await n.doValidation(),await ut.put(`/api/table/${this.token}`,this.formValues),await this.$router.back(),await this.$notify({title:"Успішно!",message:"Об'єкт успішно створено",type:"success"})}catch(w){const E=((e=w==null?void 0:w.response)==null?void 0:e.data)||"";let C=((a=(r=(i=(t=Object.entries(n==null?void 0:n.formErrors))==null?void 0:t[0])==null?void 0:i[1])==null?void 0:r[0])==null?void 0:a.message)==="Це поле обов'язкове"?"Заповніть обов'язкові поля":(b=(m=(l=(u=Object.entries(n==null?void 0:n.formErrors))==null?void 0:u[0])==null?void 0:l[1])==null?void 0:m[0])==null?void 0:b.message;this.$notify({title:"Помилка!",message:E||C||"Сталася помилка валідаціі",type:"error"})}}}},yU={class:"bg-gray-50 lg:w-[calc(100vw-260px)] w-[100vw]"},_U={class:"h-[76px] mt-[15px] flex items-center justify-between mx-[20px] px-[20px] bg-white border rounded-xl"},bU={class:"flex items-center gap-[6px]"},xU={style:{height:"calc(100vh - 155px)"},class:"bg-gray-50 p-[20px] flex lg:w-[calc(100vw-260px)] w-[100vw]"},vU={class:"bg-white w-full rounded-xl border p-[20px] overflow-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar:horizontal]:h-[8px] [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"};function wU(n,e,t,i,r,a){var l;const u=f.resolveComponent("VsForm");return f.openBlock(),f.createElementBlock("div",yU,[f.createElementVNode("div",_U,[e[3]||(e[3]=f.createElementVNode("h2",{class:"text-xl font-medium"},"Редагувати",-1)),f.createElementVNode("div",bU,[f.createElementVNode("button",{onClick:e[0]||(e[0]=m=>n.$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"}," Скасувати "),f.createElementVNode("button",{onClick:e[1]||(e[1]=(...m)=>a.editObjectAndRedirect&&a.editObjectAndRedirect(...m)),class:"inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-blue-600 border border-transparent rounded-lg gap-x-2 hover:bg-blue-700 hover:text-white"}," Зберегти ")])]),f.createElementVNode("div",xU,[f.createElementVNode("div",vU,[r.scheme?(f.openBlock(),f.createBlock(u,{key:0,ref:"form",scheme:r.scheme,columns:(l=r.style)==null?void 0:l.columns,style:f.normalizeStyle(r.style),modelValue:r.formValues,"onUpdate:modelValue":e[2]||(e[2]=m=>r.formValues=m),class:"p-0 mt-[20px]"},null,8,["scheme","columns","style","modelValue"])):f.createCommentVNode("",!0)])])])}const kU=Object.freeze(Object.defineProperty({__proto__:null,default:Ue(gU,[["render",wU]])},Symbol.toStringTag,{value:"Module"})),SU={data(){return{formValues:{},scheme:null,table:"",token:"",api:"",style:null}},mounted(){this.getFormScheme()},methods:{flattenMenu(n){const e=[];return n.forEach(t=>{t.menu?e.push(...this.flattenMenu(t.menu)):e.push(t)}),e},async getFormScheme(){var i,r;const n=this.flattenMenu(Jr.value);n!=null&&n.length||this.$router.replace("/404");const e=n==null?void 0:n.find(a=>{var u,l;return(a==null?void 0:a.path)==((l=(u=this.$route)==null?void 0:u.query)==null?void 0:l.table)});e||this.$router.replace("/404");const t=e==null?void 0:e.table;this.table=t;try{const a=await ut.get(`/api/table-data/${t}`),{data:u}=await ut.get(`/api/template/form/${(i=a==null?void 0:a.data)==null?void 0:i.form}`);this.scheme=(u==null?void 0:u.schema)||u,this.style=(u==null?void 0:u.style)||null,this.api=(u==null?void 0:u.api)||"",this.token=(r=a==null?void 0:a.data)==null?void 0:r.addToken}catch{}},async createObject(){var e,t,i,r,a,u,l,m,b;const n=this.$refs.form;try{await n.doValidation(),await ut.post(this.api||`/api/table/${this.token}`,this.formValues),await this.$router.back(),await this.$notify({title:"Успішно!",message:"Об'єкт успішно створено",type:"success"})}catch(w){const E=((e=w==null?void 0:w.response)==null?void 0:e.data)||"";let C=((a=(r=(i=(t=Object.entries(n==null?void 0:n.formErrors))==null?void 0:t[0])==null?void 0:i[1])==null?void 0:r[0])==null?void 0:a.message)==="Це поле обов'язкове"?"Заповніть обов'язкові поля":(b=(m=(l=(u=Object.entries(n==null?void 0:n.formErrors))==null?void 0:u[0])==null?void 0:l[1])==null?void 0:m[0])==null?void 0:b.message;this.$notify({title:"Помилка!",message:E||C||"Сталася помилка валідаціі",type:"error"})}}}},EU={class:"bg-gray-50 lg:w-[calc(100vw-260px)] w-[100vw]"},CU={class:"h-[76px] mt-[15px] flex items-center justify-between mx-[20px] px-[20px] bg-white border rounded-xl"},TU={class:"flex items-center gap-[6px]"},MU={style:{height:"calc(100vh - 165px)"},class:"bg-gray-50 p-[20px] flex lg:w-[calc(100vw-260px)] w-[100vw]"},AU={class:"bg-white w-full rounded-xl border p-[20px] overflow-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar:horizontal]:h-[8px] [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"};function PU(n,e,t,i,r,a){const u=f.resolveComponent("VsForm");return f.openBlock(),f.createElementBlock("div",EU,[f.createElementVNode("div",CU,[e[3]||(e[3]=f.createElementVNode("h2",{class:"text-xl font-medium"},"Створити",-1)),f.createElementVNode("div",TU,[f.createElementVNode("button",{onClick:e[0]||(e[0]=l=>n.$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"}," Скасувати "),f.createElementVNode("button",{onClick:e[1]||(e[1]=(...l)=>a.createObject&&a.createObject(...l)),class:"inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-blue-600 border border-transparent rounded-lg gap-x-2 hover:bg-blue-700 hover:text-white"}," Зберегти ")])]),f.createElementVNode("div",MU,[f.createElementVNode("div",AU,[r.scheme?(f.openBlock(),f.createBlock(u,{key:0,ref:"form",scheme:r.scheme,style:f.normalizeStyle(r.style),modelValue:r.formValues,"onUpdate:modelValue":e[2]||(e[2]=l=>r.formValues=l),class:"p-0 mt-[20px]"},null,8,["scheme","style","modelValue"])):f.createCommentVNode("",!0)])])])}const IU=Object.freeze(Object.defineProperty({__proto__:null,default:Ue(SU,[["render",PU]])},Symbol.toStringTag,{value:"Module"})),DU={};function OU(n,e,t,i,r,a){const u=f.resolveComponent("router-view");return f.openBlock(),f.createBlock(u)}const HS=Object.freeze(Object.defineProperty({__proto__:null,default:Ue(DU,[["render",OU]])},Symbol.toStringTag,{value:"Module"})),BU={},NU={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 zU(n,e,t,i,r,a){return f.openBlock(),f.createElementBlock("svg",NU,e[0]||(e[0]=[f.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),f.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),f.createElementVNode("path",{d:"M9 12h12l-3 -3"},null,-1),f.createElementVNode("path",{d:"M18 15l3 -3"},null,-1)]))}const RU=Ue(BU,[["render",zU]]),LU={},VU={viewBox:"0 0 1823 249",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function FU(n,e,t,i,r,a){return f.openBlock(),f.createElementBlock("svg",VU,e[0]||(e[0]=[f.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 $U=Ue(LU,[["render",FU]]),jU={components:{IconChevronDown:i_},props:{route:Object,searchable:String},mounted(){var n,e,t;(n=this.route)!=null&&n.menu&&(t=(e=this.route)==null?void 0:e.menu)!=null&&t.some(i=>{var r,a;return(i==null?void 0:i.path)===this.$route.path.replace("/","")||((a=(r=this.$route)==null?void 0:r.params)==null?void 0:a.table)===(i==null?void 0:i.table)&&(i==null?void 0:i.table)})&&(this.isOpen=!0)},watch:{route(n){n!=null&&n.open&&(this.isOpen=!0)}},data(){return{isOpen:!1}},methods:{highLight(n){if(!this.searchable)return n;const e=this.searchable.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),t=new RegExp(`(${e})(\\s*)`,"gi");return n.replace(t,(i,r,a)=>`<span style="color:#1989fa;">${r}</span>${a}`)}}},UU={key:0,class:""},HU={class:"ml-[30px] py-[6px] before:block before:absolute relative w-[196px] flex flex-col gap-[6px] inline-block before:w-[2px] before:h-[100%] before:bg-gray-100 before:left-[-14px] cursor-pointer"},qU={key:1};function WU(n,e,t,i,r,a){var m,b,w,E,C,A,D,R,$,G,ee,ce,U,Me,ke;const u=f.resolveComponent("IconChevronDown"),l=f.resolveComponent("router-link");return(m=t.route)!=null&&m.menu?(f.openBlock(),f.createElementBlock("div",UU,[f.createElementVNode("button",{onClick:e[0]||(e[0]=Pe=>r.isOpen=!r.isOpen),class:f.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",[((w=(b=t.route)==null?void 0:b.menu)==null?void 0:w.some(Pe=>{var $e,Be;return(Pe==null?void 0:Pe.path)===n.$route.path.replace("/","")||(Pe==null?void 0:Pe.table)===((Be=($e=n.$route)==null?void 0:$e.params)==null?void 0:Be.table)&&(Pe==null?void 0:Pe.table)}))&&"bg-gray-100"]])},[f.createTextVNode(f.toDisplayString((E=t.route)==null?void 0:E.ua)+" ",1),f.createVNode(u,{class:f.normalizeClass([[r.isOpen&&"-rotate-180"],"ml-auto duration-300"]),width:"14",height:"14"},null,8,["class"])],2),f.createVNode(f.Transition,{name:"fade"},{default:f.withCtx(()=>{var Pe;return[f.withDirectives(f.createElementVNode("ul",HU,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList((Pe=t.route)==null?void 0:Pe.menu,($e,Be)=>{var pt,tt;return f.openBlock(),f.createElementBlock("li",{key:Be,class:"w-full"},[f.createVNode(l,{innerHTML:a.highLight($e==null?void 0:$e.ua),to:"/"+($e==null?void 0:$e.path),class:f.normalizeClass([[(($e==null?void 0:$e.path)===n.$route.path.replace("/","")||((tt=(pt=n.$route)==null?void 0:pt.params)==null?void 0:tt.table)===($e==null?void 0:$e.table)&&($e==null?void 0:$e.table))&&"bg-gray-100"],"block px-3 py-2 text-sm text-gray-800 rounded-lg hover:bg-gray-100 focus:outline-none focus:bg-gray-100"])},null,8,["innerHTML","to","class"])])}),128))],512),[[f.vShow,r.isOpen]])]}),_:1})])):(C=t.route)!=null&&C.hidden?f.createCommentVNode("",!0):(f.openBlock(),f.createElementBlock("div",qU,[f.createVNode(l,{innerHTML:a.highLight((A=t.route)==null?void 0:A.ua),to:((R=(D=t.route)==null?void 0:D.path)==null?void 0:R[0])==="/"?($=t.route)==null?void 0:$.path:"/"+((G=t.route)==null?void 0:G.path),class:f.normalizeClass([[(((ee=t.route)==null?void 0:ee.path.replace("/",""))===n.$route.path.replace("/","")||((U=(ce=n.$route)==null?void 0:ce.params)==null?void 0:U.table)===((Me=t.route)==null?void 0:Me.table)&&((ke=t.route)==null?void 0:ke.table))&&"bg-gray-100"],"inline-block py-2 w-full font-[400] px-3 text-sm text-gray-800 rounded-lg items-center hover:bg-gray-100 duration-300 hover:text-gray-800"])},null,8,["innerHTML","to","class"])]))}const GU={components:{IconLogout:RU,NavbarItem:Ue(jU,[["render",WU]]),IconLogo:$U,IconSearch:n_},data(){return{activeIndex:null,searchValue:""}},computed:{data(){var n;return(n=this.searchValue)!=null&&n.trim()?this.filterMenu(Jr.value,this.searchValue):Jr.value},logo(){var n;return((n=ia.value)==null?void 0:n.logo)||"/assets/logo.svg"}},watch:{"$route.path"(){this.$parent.showMenu=!1}},methods:{filterMenu(n,e){return n.map(t=>{var i,r;if(t.menu){const a=this.filterMenu(t.menu,e);if(a.length>0)return{...t,menu:a,open:!0}}else if((r=(i=t.ua)==null?void 0:i.toLowerCase())!=null&&r.includes(e.toLowerCase()))return t;return null}).filter(Boolean)}}},ZU={class:"h-[59px] w-full p-[4px] mb-[10px]"},YU=["src"],XU={class:"relative mx-[16px]"},KU={class:"p-[16px] lg:h-full h-[calc(100vh-110px)] 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"},JU={class:"flex flex-col flex-wrap w-full pb-3"},QU={key:0,class:"flex flex-col gap-[6px]"},e9={key:1,class:"text-gray-800 text-lg mt-[20px]"};function t9(n,e,t,i,r,a){var b;const u=f.resolveComponent("IconSearch"),l=f.resolveComponent("VsText"),m=f.resolveComponent("NavbarItem");return f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(["lg:flex lg:relative lg:left-0 flex-col h-[100vh] border-r w-[260px] top-0 bottom-0 shrink-0 absolute transition left-[-100%] z-[11] bg-white",[{"left-0":n.$parent.showMenu}]])},[f.createElementVNode("div",ZU,[f.createElementVNode("img",{src:a.logo,class:"object-contain w-full h-full"},null,8,YU)]),f.createElementVNode("div",XU,[f.createVNode(u,{height:"16",width:"16",class:"absolute top-[12px] left-[16px] text-gray-500 z-[1]"}),f.createVNode(l,{type:"text",modelValue:r.searchValue,"onUpdate:modelValue":e[0]||(e[0]=w=>r.searchValue=w),clearable:!0,placeholder:"Пошук по меню",class:"[&>input]:h-[40px] [&>input]:block [&>input]:pl-[40px] [&>input:focus]:outline-none [&>input:focus]:focus:ring-0 [&>input:focus]:border-y-gray-200 [&>input:focus]:border-y-1 [&>input:focus]:border-x-0"},null,8,["modelValue"])]),f.createElementVNode("div",KU,[f.createElementVNode("nav",JU,[(b=a.data)!=null&&b.length?(f.openBlock(),f.createElementBlock("ul",QU,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.data,(w,E)=>(f.openBlock(),f.createElementBlock("li",{key:E,class:"flex flex-col gap-[6px]"},[f.createVNode(m,{route:w,searchable:r.searchValue},null,8,["route","searchable"])]))),128))])):(f.openBlock(),f.createElementBlock("div",e9,"Не знайдено"))])])],2)}const n9=Ue(GU,[["render",t9]]),i9={},r9={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 s9(n,e,t,i,r,a){return f.openBlock(),f.createElementBlock("svg",r9,e[0]||(e[0]=[f.createElementVNode("circle",{cx:"12",cy:"12",r:"10"},null,-1),f.createElementVNode("path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"},null,-1),f.createElementVNode("path",{d:"M12 17h.01"},null,-1)]))}const o9={components:{IconQuestion:Ue(i9,[["render",s9]]),IconUser:FS,AdminNotification:$S},mounted(){this.getUserData()},data(){return{userData:null,isVisible:!1}},watch:{isVisible(n){n?setTimeout(()=>window.addEventListener("click",this.closeOnOutsideClick),0):window.removeEventListener("click",this.closeOnOutsideClick)}},methods:{async getUserData(){try{const{data:n}=await ut.get("/user");this.userData=n}catch{}},async logout(){try{await ut.get("/logout"),await window.history.pushState({},"","/login"),await location.reload(),localStorage.removeItem("user")}catch{}},closeOnOutsideClick(){this.isVisible=!1}},beforeUnmount(){window.removeEventListener("click",this.closeOnOutsideClick)}},a9={class:"h-[60px] border-b flex lg:justify-end justify-between items-center px-[20px]"},l9={class:"flex items-center gap-[6px]"},c9={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"},u9={class:"relative"},h9=["src"],d9={key:1,class:"size-[40px] rounded-full bg-gray-200 flex items-center justify-center"},p9={class:"p-[10px] gap-[6px] items-center border-b flex justify-between"},f9=["src"],m9={key:1,class:"size-[40px] rounded-full bg-gray-200 flex items-center justify-center"},g9={class:"text-[14px] mr-[10px] text-gray-500"},y9={class:"flex flex-col p-[4px]"};function _9(n,e,t,i,r,a){var w,E,C,A,D,R,$,G,ee,ce;const u=f.resolveComponent("IconQuestion"),l=f.resolveComponent("AdminNotification"),m=f.resolveComponent("IconUser"),b=f.resolveComponent("router-link");return f.openBlock(),f.createElementBlock("div",a9,[f.createElementVNode("div",{class:"lg:hidden flex",onClick:e[0]||(e[0]=U=>n.$parent.showMenu=!0)},e[4]||(e[4]=[f.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)])),f.createElementVNode("div",l9,[f.createElementVNode("a",c9,[f.createVNode(u,{height:"24",width:"24"})]),f.createVNode(l),e[6]||(e[6]=f.createElementVNode("div",{class:"h-[30px] w-[1px] bg-gray-200 ml-[10px] mr-[10px]"},null,-1)),f.createElementVNode("div",u9,[f.createElementVNode("div",{onClick:e[1]||(e[1]=U=>r.isVisible=!0),class:"cursor-pointer"},[(E=(w=r.userData)==null?void 0:w.user)!=null&&E.avatar?(f.openBlock(),f.createElementBlock("img",{key:0,class:"flex-shrink-0 size-[30px] rounded-full",src:(A=(C=r.userData)==null?void 0:C.user)==null?void 0:A.avatar,alt:"Image Description"},null,8,h9)):(f.openBlock(),f.createElementBlock("div",d9,[f.createVNode(m)]))]),r.isVisible?(f.openBlock(),f.createElementBlock("div",{key:0,onClick:e[3]||(e[3]=f.withModifiers(()=>{},["stop"])),class:"fixed bg-white w-[180px] top-[55px] right-[20px] shadow-xl rounded-xl z-[1]"},[f.createElementVNode("div",p9,[(R=(D=r.userData)==null?void 0:D.user)!=null&&R.avatar?(f.openBlock(),f.createElementBlock("img",{key:0,class:"flex-shrink-0 size-[30px] rounded-full",src:(G=($=r.userData)==null?void 0:$.user)==null?void 0:G.avatar,alt:"Image Description"},null,8,f9)):(f.openBlock(),f.createElementBlock("div",m9,[f.createVNode(m)])),f.createElementVNode("div",null,[f.createElementVNode("p",g9,f.toDisplayString((ce=(ee=r.userData)==null?void 0:ee.user)==null?void 0:ce.username),1)])]),f.createElementVNode("div",y9,[f.createVNode(b,{to:"profile",disabled:!0,class:"p-[8px] block rounded-lg w-full mb-[4px] text-start hover:bg-gray-100 !duration-300"},{default:f.withCtx(()=>e[5]||(e[5]=[f.createTextVNode("Профіль")])),_:1}),f.createElementVNode("button",{onClick:e[2]||(e[2]=(...U)=>a.logout&&a.logout(...U)),class:"p-[8px] block rounded-lg w-full text-start hover:bg-gray-100 !duration-300"}," Вийти ")])])):f.createCommentVNode("",!0)])])])}const b9={components:{navbar:n9,AdminHeader:Ue(o9,[["render",_9]])},data(){return{showMenu:!1}},computed:{isMenu(){return Jr.value||null},header(){var n;return((n=ia.value)==null?void 0:n.header)||"admin-header"}}},x9={class:"admin-wrapper"},v9={class:"flex flex-col w-full"};function w9(n,e,t,i,r,a){const u=f.resolveComponent("navbar"),l=f.resolveComponent("router-view");return f.openBlock(),f.createElementBlock("div",x9,[f.createVNode(u),r.showMenu?(f.openBlock(),f.createElementBlock("div",{key:0,onClick:e[0]||(e[0]=m=>r.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"})):f.createCommentVNode("",!0),f.createElementVNode("div",v9,[a.isMenu?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[(f.openBlock(),f.createBlock(f.resolveDynamicComponent(a.header))),f.createVNode(l)],64)):f.createCommentVNode("",!0)])])}const k9=Object.freeze(Object.defineProperty({__proto__:null,default:Ue(b9,[["render",w9],["__scopeId","data-v-79c10cab"]])},Symbol.toStringTag,{value:"Module"})),S9={data(){return{currentSort:""}},props:{data:{type:Object,default:()=>null},activeColumn:{type:String}},computed:{label(){var n,e;return((n=this.data)==null?void 0:n.ua)||((e=this.data)==null?void 0:e.label)||this.data.title||"null"},selectedSortParam(){var n,e;return(e=(n=this.$route)==null?void 0:n.query)==null?void 0:e.sort},getVisibleIcon(){return this.data.format!=="image"&&this.data.format!=="verify"}},watch:{activeColumn(n){n!==this.data.name&&(this.currentSort="")}},methods:{changeCurrentSort(n){switch(n){case"":return"asc";case"asc":return"desc";case"desc":return"";default:return""}},handleClickSortBtn(n){this.$emit("change-active",this.data.name),this.currentSort=this.changeCurrentSort(n);const e=this.$route.query,{sort:t,...i}=e,r=this.currentSort?`${this.data.name}-${this.currentSort}`:"";this.$router.replace({query:{...i,...r&&{sort:r}}})},isValueEqualToSelected(n){return`${this.data.name}-${n}`===this.selectedSortParam}}},E9={scope:"col",class:"text-start px-2 py-1"},C9={class:"flex-shrink-0 size-3.5",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},T9={key:0,d:"m7 15 5 5 5-5"},M9={key:1,d:"m7 9 5-5 5 5"},A9={key:1,class:"text-sm text-stone-500 px-[4px] py-2.5 text-start font-normal"};function P9(n,e,t,i,r,a){return f.openBlock(),f.createElementBlock("th",E9,[a.getVisibleIcon?(f.openBlock(),f.createElementBlock("button",{key:0,type:"button",class:"text-sm text-stone-500 px-[4px] py-2.5 text-start font-normal flex items-center gap-[6px]",onClick:e[0]||(e[0]=u=>a.handleClickSortBtn(r.currentSort))},[f.createTextVNode(f.toDisplayString(a.label)+" ",1),(f.openBlock(),f.createElementBlock("svg",C9,[r.currentSort==="asc"||r.currentSort===""?(f.openBlock(),f.createElementBlock("path",T9)):f.createCommentVNode("",!0),r.currentSort==="desc"||r.currentSort===""?(f.openBlock(),f.createElementBlock("path",M9)):f.createCommentVNode("",!0)]))])):(f.openBlock(),f.createElementBlock("p",A9,f.toDisplayString(a.label),1))])}const I9=Ue(S9,[["render",P9]]),D9={components:{IconMore:J0,IconDelete:RS,IconEdit:LS},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(n=>typeof n=="object")}},methods:{openConfirm(){this.isDeleteConfirm=!0,document.querySelector("body").click()},async getData(){var n;try{const{data:e}=await ut.get(`/api/table/${this.table}/${(n=this.item)==null?void 0:n.id}`);this.formValue=e}catch(e){console.error(e)}},doSomethingOnCancel(){this.formVisible=!1},async deleteElement(){var n,e;try{const{data:t}=await ut.get(`/api/table/${this.table}/${(n=this.item)==null?void 0:n.id}`);await ut.delete(`/api/table/${t==null?void 0:t.token}`),await this.$notify({title:"Успішно!",message:"Об`єкт успішно видалeно",type:"success"}),await this.$emit("update-table")}catch(t){this.$notify({title:"Помилка!",message:(e=t==null?void 0:t.response)==null?void 0:e.data,type:"error"})}finally{this.isDeleteConfirm=!1}},async customButtonAction(n){var e,t;document.querySelector("body").click(),n!=null&&n.form?(await this.$v3plugin.$form({form:n==null?void 0:n.form,id:(e=this.item)==null?void 0:e.id,api:n==null?void 0:n.api,title:n==null?void 0:n.title}),await this.$emit("update-table")):await this.$v3plugin.$api({confirm:n==null?void 0:n.confirm,api:n==null?void 0:n.api,method:n==null?void 0:n.method,id:(t=this.item)==null?void 0:t.id,isId:(n==null?void 0:n.isId)||!1})}}},O9={class:"inline-flex"},B9={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"},N9={class:"flex flex-col items-start"},z9=["onClick"],R9={class:"text-gray-800"},L9={key:1,class:"h-[1px] w-[80%] bg-gray-200 ml-auto mr-auto"},V9={class:"p-4"},F9={class:"flex justify-end mt-4 gap-x-3"};function $9(n,e,t,i,r,a){const u=f.resolveComponent("IconMore"),l=f.resolveComponent("IconEdit"),m=f.resolveComponent("router-link"),b=f.resolveComponent("IconDelete"),w=f.resolveComponent("VsPopover"),E=f.resolveComponent("VsDialog");return f.openBlock(),f.createElementBlock(f.Fragment,null,[f.createElementVNode("div",O9,[f.createVNode(w,{trigger:"click",placement:"bottom-left"},{reference:f.withCtx(()=>[f.createElementVNode("button",B9,[f.createVNode(u,{height:"16",width:"16"})])]),default:f.withCtx(()=>{var C,A,D,R,$;return[f.createElementVNode("div",N9,[(C=t.actions)!=null&&C.includes("edit")&&t.isForm?(f.openBlock(),f.createBlock(m,{key:0,to:`/edit?table=${(D=(A=n.$route)==null?void 0:A.params)==null?void 0:D.catchAll}&id=${(R=t.item)==null?void 0:R.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:f.withCtx(()=>[f.createVNode(l,{color:"#000"}),e[4]||(e[4]=f.createTextVNode(" Редагувати "))]),_:1},8,["to"])):f.createCommentVNode("",!0),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.getCustomActions,(G,ee)=>(f.openBlock(),f.createElementBlock("button",{key:ee,onClick:ce=>a.customButtonAction(G),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"},[f.createVNode(b,{class:"opacity-0"}),f.createElementVNode("span",R9,f.toDisplayString(G==null?void 0:G.label),1)],8,z9))),128)),t.isForm?(f.openBlock(),f.createElementBlock("div",L9)):f.createCommentVNode("",!0),($=t.actions)!=null&&$.includes("del")?(f.openBlock(),f.createElementBlock("button",{key:2,onClick:e[0]||(e[0]=f.withModifiers((...G)=>a.openConfirm&&a.openConfirm(...G),["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"},[f.createVNode(b),e[5]||(e[5]=f.createElementVNode("span",{class:"text-gray-800"},"Видалити",-1))])):f.createCommentVNode("",!0)])]}),_:1})]),f.createVNode(E,{visible:r.isDeleteConfirm,"onUpdate:visible":e[3]||(e[3]=C=>r.isDeleteConfirm=C),size:"small",title:"Ви впевнені?"},{default:f.withCtx(()=>[f.createElementVNode("div",V9,[e[6]||(e[6]=f.createElementVNode("p",{class:"mt-1 text-gray-500 dark:text-neutral-500"}," Ви впевнені, що хочете видалити цей об'єкт? ",-1)),f.createElementVNode("div",F9,[f.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-sm font-medium text-gray-800 bg-white border border-gray-200 rounded-lg shadow-sm gap-x-2 hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",onClick:e[1]||(e[1]=C=>r.isDeleteConfirm=!1)}," Скасувати "),f.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-sm font-semibold text-white bg-red-500 border border-transparent rounded-lg gap-x-2 hover:bg-red-600 disabled:opacity-50 disabled:pointer-events-none",onClick:e[2]||(e[2]=(...C)=>a.deleteElement&&a.deleteElement(...C))}," Так, я впевнена(ий) ")])])]),_:1},8,["visible"])],64)}const j9=Ue(D9,[["render",$9]]),U9={},H9={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 q9(n,e,t,i,r,a){return f.openBlock(),f.createElementBlock("svg",H9,e[0]||(e[0]=[f.createElementVNode("path",{d:"m3 16 4 4 4-4"},null,-1),f.createElementVNode("path",{d:"M7 20V4"},null,-1),f.createElementVNode("path",{d:"m21 8-4-4-4 4"},null,-1),f.createElementVNode("path",{d:"M17 4v16"},null,-1)]))}const W9=Ue(U9,[["render",q9]]),G9={},Z9={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 Y9(n,e,t,i,r,a){return f.openBlock(),f.createElementBlock("svg",Z9,e[0]||(e[0]=[f.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),f.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),f.createElementVNode("path",{d:"M9 12l2 2l4 -4"},null,-1)]))}const X9={components:{IconExport:W9,IconChevronDown:i_,IconSuccess:Ue(G9,[["render",Y9]])},props:{table:String,columns:Array,page:[String,Number],filterCustom:String,filterState:String,filters:String},data(){return{isOpen:!1,tableFormats:["json","csv","xlsx"],format:"",cols:[],activeAction:"",isSuccessTemplate:!1,actions:[{name:"choceAll",function:this.choceAll,label:"Вибрати усі"},{name:"choceVisible",function:this.choceVisible,label:"Вибрати поточні"},{name:"clearAll",function:this.clearAll,label:"Жодного"}]}},watch:{isOpen(n){n||(this.format="",this.cols=[],this.activeAction="",this.isSuccessTemplate=!1)}},methods:{async exportTable(){var n;if(!((n=this.cols)!=null&&n.length)){this.$notify({type:"error",title:"Помилка",message:"Оберіть колонки для експорту!"});return}if(!this.format){this.$notify({type:"error",title:"Помилка",message:"Оберіть формат!"});return}try{const e=await ut.get("/api/export",{params:{table:this.table,format:this.format,cols:this.cols.join(","),page:this.page,filter:this.filters||null,state:this.filterState||null,custom:this.filterCustom||null},responseType:"blob"}),t=await e.data.text(),i=t!=null&&t.includes(";")?null:JSON==null?void 0:JSON.parse(t),r=new Blob([e.data],{type:"application/octet-stream"}),a=window.URL.createObjectURL(r),u=document.createElement("a");if(u.href=a,u.setAttribute("download",`${this.table.split(".")[0]}.${this.format}`),document.body.appendChild(u),typeof i=="string"){this.exportTable();return}u.click(),document.body.removeChild(u),window.URL.revokeObjectURL(a),this.$notify({type:"success",title:"Експорт",message:"Файл успішно експортовано!"}),this.isSuccessTemplate=!0}catch(e){console.log(e),this.$notify({type:"error",title:"Помилка",message:"Не вдалося експортувати файл."})}},selectFormat(n){this.format=n},choceAll(){var n;this.cols=(n=this.columns)==null?void 0:n.map(e=>e==null?void 0:e.name),this.activeAction="choceAll"},clearAll(){this.cols=[],this.activeAction="clearAll"},choceVisible(){var n,e;this.cols=(e=(n=this.columns)==null?void 0:n.filter(t=>(t==null?void 0:t.hidden)!==!0))==null?void 0:e.map(t=>t==null?void 0:t.name),this.activeAction="choceVisible"}}},K9={key:0,class:"flex flex-col items-center"},J9={key:1,class:"p-4"},Q9={class:"pb-5 mb-5 border-b border-gray-200 last:pb-0 last:mb-0 last:border-b-0 dark:border-neutral-700"},eH={class:"flex items-center"},tH={class:"flex items-center gap-[10px] ml-auto"},nH=["onClick"],iH={key:0,class:"block h-[8px] w-[8px] rounded-full bg-blue-500"},rH={class:"mt-2 flex row flex-wrap gap-y-[5px] gap-x-[10px]"},sH={class:"pb-5 mb-5 border-b border-gray-200 last:pb-0 last:mb-0 last:border-b-0 dark:border-neutral-700"},oH={class:"mt-2 space-y-2"},aH=["id","onChange"],lH=["for"],cH={key:0,class:"flex w-full justify-end p-[20px] gap-[6px] border-t"},uH={key:1,class:"flex w-full justify-end p-[20px] gap-[6px] border-t"};function hH(n,e,t,i,r,a){const u=f.resolveComponent("IconExport"),l=f.resolveComponent("IconChevronDown"),m=f.resolveComponent("IconSuccess"),b=f.resolveComponent("VsCheckbox"),w=f.resolveComponent("VsDialog");return f.openBlock(),f.createElementBlock(f.Fragment,null,[f.createElementVNode("button",{onClick:e[0]||(e[0]=E=>r.isOpen=!0),class:"py-2 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"},[f.createVNode(u,{height:"16",width:"16"}),e[7]||(e[7]=f.createTextVNode(" Експорт ")),f.createVNode(l,{height:"12",width:"16"})]),f.createVNode(w,{visible:r.isOpen,"onUpdate:visible":e[6]||(e[6]=E=>r.isOpen=E),title:"Експорт таблиці",size:"small",closeClickBack:!0},{footer:f.withCtx(()=>[r.isSuccessTemplate?(f.openBlock(),f.createElementBlock("div",cH,[f.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=>r.isOpen=!1)}," Закрити "),f.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=>r.isSuccessTemplate=!1)}," Вигрузити ще ")])):(f.openBlock(),f.createElementBlock("div",uH,[f.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=>r.isOpen=!1)}," Скасувати "),f.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[5]||(e[5]=(...E)=>a.exportTable&&a.exportTable(...E))}," Завантажити таблицю ")]))]),default:f.withCtx(()=>[r.isSuccessTemplate?(f.openBlock(),f.createElementBlock("div",K9,[f.createVNode(m,{height:"100",width:"100",class:"text-green-200 mb-[20px]"}),e[8]||(e[8]=f.createElementVNode("h2",null,"Звіт сформовано і збережено",-1))])):(f.openBlock(),f.createElementBlock("div",J9,[f.createElementVNode("div",Q9,[f.createElementVNode("div",eH,[e[9]||(e[9]=f.createElementVNode("h2",{class:"text-sm text-gray-500"}," Виберіть стовпці таблиці для експорту: ",-1)),f.createElementVNode("div",tH,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(r.actions,E=>(f.openBlock(),f.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"},[f.createElementVNode("span",{class:f.normalizeClass(["h-[14px] w-[14px] border rounded-full flex items-center justify-center",{"border-blue-500":(E==null?void 0:E.name)===r.activeAction}])},[(E==null?void 0:E.name)===r.activeAction?(f.openBlock(),f.createElementBlock("span",iH)):f.createCommentVNode("",!0)],2),f.createTextVNode(" "+f.toDisplayString(E==null?void 0:E.label),1)],8,nH))),128))])]),f.createElementVNode("div",rH,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(t.columns,(E,C)=>(f.openBlock(),f.createElementBlock("div",{class:"flex items-center",key:C,style:{width:"calc((100% - 10px) / 2)"}},[f.createVNode(b,{class:"[&>label]:text-sm [&>label]:text-gray-800 [&>label]:ms-3 !gap-x-[1px] !p-0",modelValue:r.cols,"onUpdate:modelValue":e[1]||(e[1]=A=>r.cols=A),value:E==null?void 0:E.name,label:E==null?void 0:E.ua},null,8,["modelValue","value","label"])]))),128))])]),f.createElementVNode("div",sH,[e[10]||(e[10]=f.createElementVNode("h2",{class:"text-sm text-gray-500"},"Виберіть формат таблиці:",-1)),f.createElementVNode("div",oH,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(r.tableFormats,(E,C)=>(f.openBlock(),f.createElementBlock("div",{class:"flex items-center",key:C},[f.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:A=>a.selectFormat(E)},null,40,aH),f.createElementVNode("label",{for:E,class:"text-sm text-gray-800 ms-3 dark:text-neutral-400"}," Формат "+f.toDisplayString(E),9,lH)]))),128))])])]))]),_:1},8,["visible"])],64)}const dH=Ue(X9,[["render",hH]]),pH={},fH={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-columns"};function mH(n,e,t,i,r,a){return f.openBlock(),f.createElementBlock("svg",fH,e[0]||(e[0]=[f.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M4 6l5.5 0"></path><path d="M4 10l5.5 0"></path><path d="M4 14l5.5 0"></path><path d="M4 18l5.5 0"></path><path d="M14.5 6l5.5 0"></path><path d="M14.5 10l5.5 0"></path><path d="M14.5 14l5.5 0"></path><path d="M14.5 18l5.5 0"></path>',9)]))}const gH=Ue(pH,[["render",mH]]),yH={props:{column:Object},emits:["update-column"],data(){return{value:!1}},watch:{value(n){this.$emit("update-column",{...this.column,hidden:!n})}},mounted(){var n;((n=this.column)==null?void 0:n.hidden)!==!0&&(this.value=!0)}},_H={class:"flex w-full gap-[8px] items-centr"};function bH(n,e,t,i,r,a){var u,l;return f.openBlock(),f.createElementBlock("label",_H,[f.withDirectives(f.createElementVNode("input",{"onUpdate:modelValue":e[0]||(e[0]=m=>r.value=m),type:"checkbox"},null,512),[[f.vModelCheckbox,r.value]]),f.createTextVNode(" "+f.toDisplayString(((u=t.column)==null?void 0:u.ua)||((l=t.column)==null?void 0:l.title)),1)])}const xH={components:{IconColumns:gH,AdminTableColumnsHiddenItem:Ue(yH,[["render",bH]])},emits:["update-columns"],props:{columns:Array},methods:{updateColumn(n){const e=this.columns.findIndex(i=>(i==null?void 0:i.name)===(n==null?void 0:n.name)),t=this.columns;t[e]=n,this.$emit("update-columns",[...t])}}},vH={class:"py-2 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"},wH={class:"py-[10px] px-[10px] w-[260px]"},kH={class:"flex flex-col gap-[3px] max-h-[400px] w-full overflow-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar:horizontal]:h-[8px] [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"};function SH(n,e,t,i,r,a){const u=f.resolveComponent("IconColumns"),l=f.resolveComponent("AdminTableColumnsHiddenItem"),m=f.resolveComponent("VsPopover");return f.openBlock(),f.createBlock(m,{trigger:"click",placement:"bottom"},{reference:f.withCtx(()=>[f.createElementVNode("button",vH,[f.createVNode(u,{height:"20",width:"16"})])]),default:f.withCtx(()=>[f.createElementVNode("div",wH,[e[0]||(e[0]=f.createElementVNode("h2",{class:"text-sm mb-[8px]"},"Оберіть колонки, щоб приховати",-1)),f.createElementVNode("ul",kH,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(t.columns,(b,w)=>(f.openBlock(),f.createElementBlock("li",{key:w},[f.createVNode(l,{column:b,onUpdateColumn:a.updateColumn},null,8,["column","onUpdateColumn"])]))),128))])])]),_:1})}const EH=Ue(xH,[["render",SH]]),CH={},TH={class:"hidden sm:block shrink-0 size-3",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 16 16"};function MH(n,e,t,i,r,a){return f.openBlock(),f.createElementBlock("svg",TH,e[0]||(e[0]=[f.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 1C8.55228 1 9 1.44772 9 2V7L14 7C14.5523 7 15 7.44771 15 8C15 8.55228 14.5523 9 14 9L9 9V14C9 14.5523 8.55228 15 8 15C7.44772 15 7 14.5523 7 14V9.00001L2 9.00001C1.44772 9.00001 1 8.5523 1 8.00001C0.999999 7.44773 1.44771 7.00001 2 7.00001L7 7.00001V2C7 1.44772 7.44772 1 8 1Z"},null,-1)]))}const a_=Ue(CH,[["render",MH]]),AH={props:{row:Object,column:Object,table:String}};function PH(n,e,t,i,r,a){var u,l,m,b,w,E,C,A;return f.openBlock(),f.createBlock(f.resolveDynamicComponent(((u=t.column)==null?void 0:u.format)==="custom"?(l=t.column)==null?void 0:l.component:`table-format-${((b=(m=t.column)==null?void 0:m.format)==null?void 0:b.toLowerCase())||"text"}`),{onUpdateTable:e[0]||(e[0]=D=>n.$emit("update-table")),name:(w=t.column)==null?void 0:w.name,data:t.row,value:(C=t.row)==null?void 0:C[(E=t.column)==null?void 0:E.name],table:t.table,column:t.column,edit:(A=t.column)==null?void 0:A.edit},null,40,["name","data","value","table","column","edit"])}const qS=Ue(AH,[["render",PH]]),IH={},DH={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 OH(n,e,t,i,r,a){return f.openBlock(),f.createElementBlock("svg",DH,e[0]||(e[0]=[f.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),f.createElementVNode("path",{d:"M5 12l14 0"},null,-1)]))}const BH={components:{IconPlus:a_,IconMinus:Ue(IH,[["render",OH]])},props:{title:String,defaultValue:{type:Boolean,default:()=>!1}},data(){return{expanded:this.defaultValue}}},NH={class:"hs-accordion"},zH={class:"py-0.5 flex items-center gap-x-0.5 w-full"},RH={class:"text-sm font-medium"},LH={class:"relative inline-block w-full duration-150 cursor-pointer before:block before:absolute b"};function VH(n,e,t,i,r,a){const u=f.resolveComponent("IconPlus"),l=f.resolveComponent("IconMinus");return f.openBlock(),f.createElementBlock("div",null,[f.createElementVNode("div",null,[f.createElementVNode("div",NH,[f.createElementVNode("div",zH,[f.createElementVNode("div",{onClick:e[0]||(e[0]=m=>r.expanded=!r.expanded),class:"rounded-md cursor-pointer grow"},[f.createElementVNode("span",RH,f.toDisplayString(t.title),1)]),f.createElementVNode("button",{class:"flex items-center justify-center rounded-md size-6 hover:bg-gray-100",onClick:e[1]||(e[1]=m=>r.expanded=!r.expanded)},[r.expanded?(f.openBlock(),f.createBlock(l,{key:1,width:"14"})):(f.openBlock(),f.createBlock(u,{key:0}))])]),f.createVNode(f.Transition,{name:"fade"},{default:f.withCtx(()=>[f.withDirectives(f.createElementVNode("div",LH,[f.renderSlot(n.$slots,"default",{},void 0,!0)],512),[[f.vShow,r.expanded]])]),_:3})])])])}const FH={components:{AdminComponentIs:qS,AdminTree:Ue(BH,[["render",VH],["__scopeId","data-v-e1f274c9"]]),VsNoData:jS,VsWidgetComments:NS,VsWidgetMap:ry,VsWidgetFileList:Xv},props:{table:String,columns:Array,row:Object}},$H={class:"hs-accordion border-gray-100 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 - 310px)"}},jH={class:"border-l",style:{height:"calc(100vh - 360px)"}},UH={class:"flex items-center justify-between py-1 gap-x-4"},HH={class:"col-span-1"},qH={class:"inline-flex items-center gap-x-2 text-[13px] text-gray-500 dark:text-neutral-500"},WH={class:"col-span-2"},GH={class:"font-medium text-[13px] text-gray-800 dark:text-neutral-200"},ZH={class:"table-info-card"},YH={class:"table-info-card"};function XH(n,e,t,i,r,a){var C,A,D;const u=f.resolveComponent("AdminComponentIs"),l=f.resolveComponent("AdminTree"),m=f.resolveComponent("VsWidgetMap"),b=f.resolveComponent("VsNoData"),w=f.resolveComponent("VsWidgetComments"),E=f.resolveComponent("VsWidgetFileList");return f.openBlock(),f.createElementBlock("div",$H,[e[0]||(e[0]=f.createElementVNode("div",{class:"p-[10px] pl-[18px] pb-[18px] border-b"},[f.createElementVNode("h2",{class:"text-sm font-medium"},"Інформація про об'єкт")],-1)),f.createElementVNode("div",jH,[(A=(C=n.$route)==null?void 0:C.query)!=null&&A.card?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[t.row?(f.openBlock(),f.createBlock(l,{key:0,defaultValue:!0,title:"Основна інформація",class:"border-b p-[10px] py-[16px]"},{default:f.withCtx(()=>[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(t.columns,R=>(f.openBlock(),f.createElementBlock("dl",UH,[f.createElementVNode("dt",HH,[f.createElementVNode("p",qH,f.toDisplayString((R==null?void 0:R.ua)||(R==null?void 0:R.title))+": ",1)]),f.createElementVNode("dd",WH,[f.createElementVNode("p",GH,[f.createVNode(u,{row:t.row,column:R,table:t.table},null,8,["row","column","table"])])])]))),256))]),_:1})):f.createCommentVNode("",!0),(D=t.row)!=null&&D.geom?(f.openBlock(),f.createBlock(l,{key:1,title:"Карта",class:"border-b p-[10px] py-[16px]"},{default:f.withCtx(()=>{var R,$;return[(R=t.row)!=null&&R.geom?(f.openBlock(),f.createBlock(m,{key:0,geometry:($=t.row)==null?void 0:$.geom,zoom:14},null,8,["geometry"])):(f.openBlock(),f.createBlock(b,{key:1,title:"У об'єкта відсутня геометрія",text:"",class:"[&>div]:h-[200px] [&>div]:min-h-[400px] h-[400px]"}))]}),_:1})):f.createCommentVNode("",!0),f.createVNode(l,{title:"Коментарі",class:"border-b p-[10px] py-[16px]"},{default:f.withCtx(()=>{var R;return[f.createElementVNode("div",ZH,[f.createVNode(w,{id:(R=t.row)==null?void 0:R.id},null,8,["id"])])]}),_:1}),f.createVNode(l,{title:"Файли",class:"border-b p-[10px] py-[16px]"},{default:f.withCtx(()=>{var R;return[f.createElementVNode("div",YH,[f.createVNode(E,{id:(R=t.row)==null?void 0:R.id},null,8,["id"])])]}),_:1})],64)):(f.openBlock(),f.createBlock(b,{key:1,text:"Оберіть один з об'єктів в таблиці для відображення інформаціі про нього"}))])])}const KH=Ue(FH,[["render",XH]]),JH={},QH={class:"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 eq(n,e,t,i,r,a){return f.openBlock(),f.createElementBlock("svg",QH,e[0]||(e[0]=[f.createElementVNode("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"},null,-1),f.createElementVNode("path",{d:"M15 3v18"},null,-1),f.createElementVNode("path",{d:"m8 9 3 3-3 3"},null,-1)]))}const tq=Ue(JH,[["render",eq]]),nq={},iq={class:"h21yx vs0hq",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function rq(n,e,t,i,r,a){return f.openBlock(),f.createElementBlock("svg",iq,e[0]||(e[0]=[f.createStaticVNode('<line x1="21" x2="14" y1="4" y2="4"></line><line x1="10" x2="3" y1="4" y2="4"></line><line x1="21" x2="12" y1="12" y2="12"></line><line x1="8" x2="3" y1="12" y2="12"></line><line x1="21" x2="16" y1="20" y2="20"></line><line x1="12" x2="3" y1="20" y2="20"></line><line x1="14" x2="14" y1="2" y2="6"></line><line x1="8" x2="8" y1="10" y2="14"></line><line x1="16" x2="16" y1="18" y2="22"></line>',9)]))}const sq={emits:["filterChange"],props:{scheme:{type:Object},onFilters:{type:Number},table:{type:String}},components:{IconFilter:Ue(nq,[["render",rq]])},data(){return{isFilters:!1}},methods:{closeFilter({target:n}){this.isFilters&&n.classList.contains("filter-container")&&(this.isFilters=!1)}}},oq={key:0,class:"font-medium text-[10px] py-0.5 px-[5px] bg-gray-800 text-white leading-3 rounded-full dark:bg-neutral-500"},aq={class:"filter-content h-screen bg-white w-[400px] p-[20px] pt-[10px] overflow-x-auto bg-white [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar:horizontal]:h-[8px] [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"};function lq(n,e,t,i,r,a){const u=f.resolveComponent("IconFilter"),l=f.resolveComponent("VsFilter");return f.openBlock(),f.createElementBlock(f.Fragment,null,[f.createElementVNode("button",{onClick:e[0]||(e[0]=m=>r.isFilters=!r.isFilters),class:"py-2 px-2.5 inline-flex items-center gap-x-1.5 text-xs font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"},[f.createVNode(u,{height:"16",width:"16"}),e[4]||(e[4]=f.createTextVNode(" Фільтри ")),t.onFilters?(f.openBlock(),f.createElementBlock("span",oq,f.toDisplayString(t.onFilters),1)):f.createCommentVNode("",!0)]),f.createVNode(f.Transition,{name:"fade"},{default:f.withCtx(()=>{var m;return[f.withDirectives(f.createElementVNode("div",{onClick:e[3]||(e[3]=(...b)=>a.closeFilter&&a.closeFilter(...b)),style:{height:"100vh"},class:"fixed filter-container top-0 flex justify-end items-center z-[2] right-0 left-0 bottom-0 bg-[rgba(0,0,0,0.5)]"},[f.createElementVNode("div",aq,[(m=t.scheme)!=null&&m.length?(f.openBlock(),f.createBlock(l,{key:0,ref:"filter",scheme:t.scheme,layout:"default","apply-vue-router":"",history:"",token:t.table,name:"filter",onFilterChange:e[1]||(e[1]=b=>n.$emit("filterChange",b)),closeFilterBtn:!0,onFilterClose:e[2]||(e[2]=b=>r.isFilters=!1)},null,8,["scheme","token"])):f.createCommentVNode("",!0)])],512),[[f.vShow,r.isFilters]])]}),_:1})],64)}const cq=Ue(sq,[["render",lq]]),uq={props:{tabsList:{type:Array,default:()=>[]},filterState:String}},hq={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"},dq=["onClick"];function pq(n,e,t,i,r,a){return f.openBlock(),f.createElementBlock("nav",hq,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(t.tabsList,u=>(f.openBlock(),f.createElementBlock("button",{onClick:l=>n.$emit("update:filterState",u==null?void 0:u.name),class:f.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":(u==null?void 0:u.name)===t.filterState}])},f.toDisplayString(u==null?void 0:u.label),11,dq))),256))])}const fq=Ue(uq,[["render",pq]]),mq={},gq={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 yq(n,e,t,i,r,a){return f.openBlock(),f.createElementBlock("svg",gq,e[0]||(e[0]=[f.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),f.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 _q={components:{IconFilter2:Ue(mq,[["render",yq]])},props:{filterCustom:String,customList:Array}},bq={class:"py-2 px-2.5 inline-flex items-center gap-x-1.5 text-xs font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"},xq={class:"flex flex-col gap-[4px]"},vq=["onClick"];function wq(n,e,t,i,r,a){const u=f.resolveComponent("IconFilter2"),l=f.resolveComponent("VsPopover");return f.openBlock(),f.createBlock(l,{ref:"popover",placement:"bottom"},{reference:f.withCtx(()=>[f.createElementVNode("button",bq,[f.createVNode(u,{height:"20",width:"20"})])]),default:f.withCtx(()=>[f.createElementVNode("div",xq,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(t.customList,(m,b)=>(f.openBlock(),f.createElementBlock("button",{onClick:w=>{var E;n.$emit("update:filterCustom",m==null?void 0:m.name),(E=n.$refs)==null||E.popover.togglePopover()},key:b,class:f.normalizeClass(["p-[8px] block rounded-lg w-[140px] text-start hover:bg-gray-100 !duration-300",{"bg-gray-100":t.filterCustom===(m==null?void 0:m.name)}])},f.toDisplayString(m==null?void 0:m.label),11,vq))),128)),f.createElementVNode("button",{class:"p-[8px] block rounded-lg w-[140px] text-start hover:bg-gray-100 !duration-300",onClick:e[0]||(e[0]=m=>{var b;n.$emit("update:filterCustom",void 0),(b=n.$refs)==null||b.popover.togglePopover()})}," Скинути фільтри ")])]),_:1},512)}const kq=Ue(_q,[["render",wq]]),Sq={class:"flex items-center gap-x-2"},Eq={props:{table:String,title:String},components:{AdminTableControl:j9,AdminTableExport:dH,AdminTableColumnsHidden:EH,AdminTableColumn:I9,AdminNodata:e_,IconPlus:a_,IconSearch:n_,AdminTableCardInfo:KH,IconOpenCard:tq,AdminComponentIs:qS,AdminTableFilters:cq,AdminTableTabs:fq,AdminTableCustomFilters:kq,AdminTableCustomButtons:{__name:"admin-table-custom-buttons",props:{slots:Object},setup(n){var l,m,b,w,E;const{asyncTemplateSlot:e}=(E=(w=(b=(m=(l=f.getCurrentInstance())==null?void 0:l.appContext)==null?void 0:m.app)==null?void 0:b.config)==null?void 0:w.globalProperties)==null?void 0:E.utils,t=f.ref(""),i=f.ref(""),r=n,a=()=>{var C,A,D,R,$;if((C=r.slots)!=null&&C.panelLeft||(i.value="div"),(D=(A=r.slots)==null?void 0:A.panelLeft)!=null&&D.includes("<")){const G=e("PanelLeft",(R=r.slots)==null?void 0:R.panelLeft,["name"]);i.value=G}else i.value=($=r.slots)==null?void 0:$.panelLeft},u=()=>{var C,A,D,R,$;if((C=r.slots)!=null&&C.panelRight||(t.value="div"),(D=(A=r.slots)==null?void 0:A.panelRight)!=null&&D.includes("<")){const G=e("PanelRight",(R=r.slots)==null?void 0:R.panelRight,["name"]);t.value=G}else t.value=($=r.slots)==null?void 0:$.panelRight};return a(),u(),(C,A)=>(f.openBlock(),f.createElementBlock("div",Sq,[(f.openBlock(),f.createBlock(f.resolveDynamicComponent(i.value))),(f.openBlock(),f.createBlock(f.resolveDynamicComponent(t.value)))]))}},AdminCustomButtonAdd:{__name:"admin-custom-button-add",props:{slots:Object},setup(n){var a,u,l,m,b;const{asyncTemplateSlot:e}=(b=(m=(l=(u=(a=f.getCurrentInstance())==null?void 0:a.appContext)==null?void 0:u.app)==null?void 0:l.config)==null?void 0:m.globalProperties)==null?void 0:b.utils,t=f.ref(""),i=n;return(()=>{var w,E,C,A,D;if((w=i.slots)!=null&&w.addButton||(t.value="div"),(C=(E=i.slots)==null?void 0:E.addButton)!=null&&C.includes("<")){const R=e("addButton",(A=i.slots)==null?void 0:A.addButton,["IconPlus"]);t.value=R}else t.value=(D=i.slots)==null?void 0:D.addButton})(),(w,E)=>t.value?(f.openBlock(),f.createBlock(f.resolveDynamicComponent(t.value),{key:0,IconPlus:a_})):f.createCommentVNode("",!0)}}},data(){return{tableData:{},filterScheme:[],page:1,searchValue:"",limit:0,filters:null,activeColumn:"",isVisibleCardInfo:!1,onFilters:0,filterState:null,filterCustom:null,visibleColumns:[],initialHiddenColumns:""}},async mounted(){await this.checkUrlMounted(),await this.getTableData(),await this.getFilters()},computed:{defaultPage(){var n,e;return((e=(n=this.$route)==null?void 0:n.query)==null?void 0:e.page)||1},columns(){var n,e;return(e=(n=this.tableData)==null?void 0:n.columns)==null?void 0:e.filter(t=>(t==null?void 0:t.hidden)!==!0)},isForm(){var n,e,t;return((n=this.tableData)==null?void 0:n.form)&&((t=(e=this.tableData)==null?void 0:e.actions)==null?void 0:t.includes("add"))},isNoData(){var n,e;return!((n=this.tableData)!=null&&n.rows)||!((e=this.columns)!=null&&e.length)},activeCardRow(){var n,e;return((e=(n=this.tableData)==null?void 0:n.rows)==null?void 0:e.find(t=>{var i,r;return(t==null?void 0:t.id)===((r=(i=this.$route)==null?void 0:i.query)==null?void 0:r.card)}))||{}},getActions(){var n;return(n=this.tableData)==null?void 0:n.actions}},watch:{async table(){this.tableData=null,await this.getTableData()},searchValue:{handler:((n,e=300)=>{let t;return function(...i){clearTimeout(t),t=setTimeout(()=>{n.apply(this,i)},e)}})(async function(n){var e;await this.getTableData(),this.$router.push({...this.$route,query:{...(e=this.$route)==null?void 0:e.query,search:n||void 0}})},500)},$route:{handler(n,e){var t,i;((t=n==null?void 0:n.params)==null?void 0:t.catchAll)!==((i=e==null?void 0:e.params)==null?void 0:i.catchAll)&&(this.visibleColumns=[],this.unmountedData(),this.getFilters())},deep:!0},limit(n){var e;this.$router.replace({query:{...(e=this.$route)==null?void 0:e.query,limit:n}})},filterState(n){var e;n&&(this.$router.replace({...this.$route,query:{...(e=this.$route)==null?void 0:e.query,filterState:n}}),this.getTableData())},filterCustom(n){var e;this.$router.replace({...this.$route,query:{...(e=this.$route)==null?void 0:e.query,custom:n}}),this.getTableData()},columns(n){var e,t,i,r;this.visibleColumns=n==null?void 0:n.map(a=>a==null?void 0:a.name),this.initialHiddenColumns===((e=this.visibleColumns)==null?void 0:e.join(","))&&(this.visibleColumns=[]),this.$router.replace({...this.$route,query:{...(t=this.$route)==null?void 0:t.query,columns:(i=this.visibleColumns)!=null&&i.length?(r=this.visibleColumns)==null?void 0:r.join(","):void 0}})}},methods:{async checkUrlMounted(){var n,e,t,i,r,a,u,l,m,b,w,E,C,A,D,R,$;this.page=((e=(n=this.$route)==null?void 0:n.query)==null?void 0:e.page)||1,this.limit=((i=(t=this.$route)==null?void 0:t.query)==null?void 0:i.limit)||20,this.filters=((u=decodeURI((a=(r=this.$route)==null?void 0:r.query)==null?void 0:a.filter))==null?void 0:u.replaceAll("+"," "))||null,this.filterState=((m=(l=this.$route)==null?void 0:l.query)==null?void 0:m.filterState)||null,this.filterCustom=((w=(b=this.$route)==null?void 0:b.query)==null?void 0:w.custom)||null,this.searchValue=((C=(E=this.$route)==null?void 0:E.query)==null?void 0:C.search)||"",this.visibleColumns=((R=(D=(A=this.$route)==null?void 0:A.query)==null?void 0:D.columns)==null?void 0:R.split(","))||[],($=this.$route)!=null&&$.query.card&&(this.isVisibleCardInfo=!0)},rowWidth(n){var t,i;const e=(i=(t=this.tableData)==null?void 0:t.columns)==null?void 0:i.find(r=>r.name===n);if(e){const r=e==null?void 0:e.width;return typeof r=="number"?`${r}px`:r!=null&&r.includes("px")?r:`${r}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 n,e,t,i,r,a,u,l,m,b,w;try{const{data:E}=await ut.get(`/api/template/table/${this.table}`),C=await ut.get(`/api/table-data/${this.table}`,{params:{page:this.page,search:this.searchValue||null,limit:this.limit,filter:this.filters||null,order:((e=(n=this.$route)==null?void 0:n.query)==null?void 0:e.sort)||null,state:this.filterState||null,custom:this.filterCustom||null}});this.tableData={...E,...(C==null?void 0:C.data)||{}},this.initialHiddenColumns=(a=(r=(i=(t=this.tableData)==null?void 0:t.columns)==null?void 0:i.filter(A=>(A==null?void 0:A.hidden)!==!0))==null?void 0:r.map(A=>A==null?void 0:A.name))==null?void 0:a.join(","),(u=this.visibleColumns)!=null&&u.length?(l=this.tableData)==null||l.columns.forEach(A=>{var D;(D=this.visibleColumns)!=null&&D.includes(A==null?void 0:A.name)?A.hidden=!1:A.hidden=!0}):this.visibleColumns=(w=(b=(m=this.tableData)==null?void 0:m.columns)==null?void 0:b.filter(A=>(A==null?void 0:A.hidden)!==!0))==null?void 0:w.map(A=>A==null?void 0:A.name)}catch{}},async getFilters(){var n;try{const{data:e}=await ut.get(`/api/table-filter/${this.table}`);this.filterScheme=(n=e==null?void 0:e.list)==null?void 0:n.map(t=>({...t,label:(t==null?void 0:t.label)||(t==null?void 0:t.ua)}))}catch{}},async handlePageChange(n){const e=this.$route.query;this.page=n,!(!(e!=null&&e.page)&&n===1||e.page===n)&&(await this.$router.replace({query:{...e,page:n}}),await this.getTableData())},async changeLimit(n){this.limit=await n,this.defaultPage=1,await this.getTableData()},async filterChange({url:n,state:e}){var t;this.filters=n!=="no-url"?n:null,this.onFilters=(t=Object.entries(e))==null?void 0:t.length,this.page=1,await this.getTableData()},changeActiveColumn(n){this.activeColumn=n,this.getTableData()},pushToCard(n){var e;((e=this.tableData)==null?void 0:e.card)===!1||this.$router.push(`/card/${this.table}/${n}`)},changeActiveCardInfo(n){var e;this.isVisibleCardInfo&&this.$router.push({...this.$route,query:{...(e=this.$route)==null?void 0:e.query,card:n}})},toggleCardInfo(){var n;this.isVisibleCardInfo=!this.isVisibleCardInfo,this.isVisibleCardInfo||this.$router.push({...this.$route,query:{...(n=this.$route)==null?void 0:n.query,card:void 0}})}}},Cq={class:"w-[calc(100vw - 320px)] bg-gray-50"},Tq={class:"h-[76px] mt-[15px] flex items-center justify-between mx-[20px] px-[20px] bg-white border rounded-xl"},Mq={class:"text-xl font-medium"},Aq={style:{height:"calc(100vh - 155px)"},class:"bg-gray-50 p-[20px] flex pt-[10px] lg:w-[calc(100vw-260px)] w-[100vw]"},Pq={class:"bg-white w-full rounded-xl border p-[20px] pr-0"},Iq={class:"flex"},Dq={class:"flex gap-[6px] ml-auto"},Oq={class:"inline-block w-full align-middle"},Bq={key:0,class:"relative min-w-full divide-y divide-gray-200 table-fixed w-max dark:divide-neutral-700"},Nq={class:"sticky top-[-1px] bg-white w-full after:absolute after:content-[''] after:block after:w-full after:h-px after:bg-stone-200"},zq={class:"right-0 border-t border-stone-200"},Rq={key:0,class:"w-[70px] sticky right-0 top-0"},Lq={class:"divide-y divide-gray-200"},Vq={class:"px-4 py-3 text-sm text-gray-600"},Fq=["onClick"],$q=["onClick"],jq={class:"p-[20px] flex justify-start items-center w-full"},Uq={class:"w-[200px] md:inline-flex hidden"},Hq={class:"text-sm text-gray-600 dark:text-neutral-400"},qq={class:"font-semibold text-gray-800 dark:text-neutral-200"},Wq={key:0},Gq={key:0,class:"font-semibold text-gray-800 dark:text-neutral-200"};function Zq(n,e,t,i,r,a){var $e,Be,pt,tt,Nt,rt,Mt,Rt,Ft,zt,Ht,yn,dn,wn,pn,ti,zn,In,Rn,Ee,je,Ye,ot,Lt,Qt,At;const u=f.resolveComponent("AdminCustomButtonAdd"),l=f.resolveComponent("IconPlus"),m=f.resolveComponent("router-link"),b=f.resolveComponent("AdminTableTabs"),w=f.resolveComponent("IconSearch"),E=f.resolveComponent("VsText"),C=f.resolveComponent("AdminTableCustomButtons"),A=f.resolveComponent("AdminTableCustomFilters"),D=f.resolveComponent("AdminTableColumnsHidden"),R=f.resolveComponent("AdminTableExport"),$=f.resolveComponent("AdminTableFilters"),G=f.resolveComponent("IconOpenCard"),ee=f.resolveComponent("AdminTableColumn"),ce=f.resolveComponent("AdminComponentIs"),U=f.resolveComponent("AdminTableControl"),Me=f.resolveComponent("AdminNodata"),ke=f.resolveComponent("VsPagination"),Pe=f.resolveComponent("AdminTableCardInfo");return f.openBlock(),f.createElementBlock("div",Cq,[f.createElementVNode("div",Tq,[f.createElementVNode("h2",Mq,f.toDisplayString(t.title),1),a.isForm?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[(Be=($e=r.tableData)==null?void 0:$e.slots)!=null&&Be.addButton?(f.openBlock(),f.createBlock(u,{key:0,slots:(pt=r.tableData)==null?void 0:pt.slots},null,8,["slots"])):(f.openBlock(),f.createBlock(m,{key:1,to:`/add?table=${(Nt=(tt=n.$route)==null?void 0:tt.params)==null?void 0:Nt.catchAll}`,class:"inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-blue-600 border border-transparent rounded-lg gap-x-2 hover:bg-blue-700 hover:text-white"},{default:f.withCtx(()=>[f.createVNode(l,{height:"16",width:"16"}),e[5]||(e[5]=f.createTextVNode(" Додати "))]),_:1},8,["to"]))],64)):f.createCommentVNode("",!0)]),f.createElementVNode("div",Aq,[f.createElementVNode("div",Pq,[(Mt=(rt=r.tableData)==null?void 0:rt.filterState)!=null&&Mt.length?(f.openBlock(),f.createBlock(b,{key:0,tabsList:(Rt=r.tableData)==null?void 0:Rt.filterState,filterState:r.filterState,"onUpdate:filterState":e[0]||(e[0]=Re=>r.filterState=Re)},null,8,["tabsList","filterState"])):f.createCommentVNode("",!0),f.createElementVNode("div",Iq,[f.createElementVNode("div",{class:f.normalizeClass([r.isVisibleCardInfo?"w-[calc(100%-360px)]":"w-full"])},[f.createElementVNode("div",{class:f.normalizeClass(["flex sm:grid sm:grid-cols-2 gap-x-2 sm:gap-x-5 mb-[10px] relative",{"pr-[20px]":!r.isVisibleCardInfo}])},[f.createVNode(w,{height:"14",width:"14",class:"absolute top-[10px] left-[14px] text-gray-500 z-[1]"}),f.createVNode(E,{modelValue:r.searchValue,"onUpdate:modelValue":e[1]||(e[1]=Re=>r.searchValue=Re),placeholder:"Пошук...",clearable:!0,class:"[&>input]:py-[7px] [&>input]:ps-10 [&>input]:pe-8 [&>input]:block [&>input]:w-full [&>input]:bg-gray-100 [&>input]:border-transparent [&>input]:rounded-lg [&>input]:text-sm [&>input]:focus:bg-white [&>input]:focus:border-blue-500 [&>input]:focus:ring-blue-500 [&>input]:disabled:opacity-50 [&>input]:disabled:pointer-events-none [&>input]:dark:bg-neutral-700 [&>input]:dark:border-transparent [&>input]:dark:text-neutral-400 [&>input]:dark:placeholder:text-neutral-400 dark:focus:bg-neutral-800 dark:focus:ring-neutral-600"},null,8,["modelValue"]),f.createElementVNode("div",Dq,[(Ft=r.tableData)!=null&&Ft.slots?(f.openBlock(),f.createBlock(C,{key:0,slots:(zt=r.tableData)==null?void 0:zt.slots},null,8,["slots"])):f.createCommentVNode("",!0),(yn=(Ht=r.tableData)==null?void 0:Ht.filterCustom)!=null&&yn.length?(f.openBlock(),f.createBlock(A,{key:1,customList:(dn=r.tableData)==null?void 0:dn.filterCustom,filterCustom:r.filterCustom,"onUpdate:filterCustom":e[2]||(e[2]=Re=>r.filterCustom=Re)},null,8,["customList","filterCustom"])):f.createCommentVNode("",!0),f.createVNode(D,{columns:(wn=r.tableData)==null?void 0:wn.columns,onUpdateColumns:e[3]||(e[3]=Re=>r.tableData.columns=Re)},null,8,["columns"]),((pn=r.tableData)==null?void 0:pn.export)!==!1?(f.openBlock(),f.createBlock(R,{key:2,table:t.table,columns:(ti=r.tableData)==null?void 0:ti.columns,page:r.page,"filter-state":r.filterState,"filter-custom":r.filterCustom,filters:r.filters},null,8,["table","columns","page","filter-state","filter-custom","filters"])):f.createCommentVNode("",!0),(zn=r.filterScheme)!=null&&zn.length?(f.openBlock(),f.createBlock($,{key:3,scheme:r.filterScheme,onFilters:r.onFilters,table:t.table,onFilterChange:a.filterChange},null,8,["scheme","onFilters","table","onFilterChange"])):f.createCommentVNode("",!0),f.createElementVNode("button",{onClick:e[4]||(e[4]=(...Re)=>a.toggleCardInfo&&a.toggleCardInfo(...Re)),class:"py-2 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"},[f.createVNode(G,{class:f.normalizeClass({"rotate-180 duration-300":!r.isVisibleCardInfo})},null,8,["class"])])])],2),f.createElementVNode("div",{class:f.normalizeClass(["flex items-start justify-start w-full space-y-5",{"pr-[20px]":!r.isVisibleCardInfo}])},[f.createElementVNode("div",{style:f.normalizeStyle({height:(Rn=(In=r.tableData)==null?void 0:In.filterState)!=null&&Rn.length?"calc(100vh - 370px)":"calc(100vh - 330px)"}),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"},[f.createElementVNode("div",Oq,[a.isNoData?(f.openBlock(),f.createBlock(Me,{key:1})):(f.openBlock(),f.createElementBlock("table",Bq,[f.createElementVNode("thead",Nq,[f.createElementVNode("tr",zq,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.columns,Re=>(f.openBlock(),f.createBlock(ee,{key:Re.name,style:f.normalizeStyle({width:a.rowWidth(Re==null?void 0:Re.name),textAlign:Re==null?void 0:Re.align,wordBreak:Re==null?void 0:Re.wrap}),data:Re,activeColumn:r.activeColumn,onChangeActive:a.changeActiveColumn},null,8,["style","data","activeColumn","onChangeActive"]))),128)),(je=(Ee=a.getActions)==null?void 0:Ee.filter(Re=>Re!=="add"&&Re!=="view"))!=null&&je.length?(f.openBlock(),f.createElementBlock("th",Rq)):f.createCommentVNode("",!0)])]),f.createElementVNode("tbody",Lq,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList((Ye=r.tableData)==null?void 0:Ye.rows,(Re,sn)=>{var ve,_n,mr,qt,on,vi,wi,si,Wi,oi;return f.openBlock(),f.createElementBlock("tr",{key:sn,class:f.normalizeClass({"bg-gray-50":((_n=(ve=n.$route)==null?void 0:ve.query)==null?void 0:_n.card)===(Re==null?void 0:Re.id)})},[f.createElementVNode("td",Vq,[f.createElementVNode("button",{onClick:()=>a.pushToCard(Re==null?void 0:Re.id),class:f.normalizeClass(["text-sm font-medium",[((mr=r.tableData)==null?void 0:mr.card)===!1?"":"text-blue-600 decoration-2 focus:outline-none focus:underline hover:text-blue-600 hover:underline"]])},[f.createVNode(ce,{row:Re,column:a.columns[0],table:t.table,onUpdateTable:a.getTableData},null,8,["row","column","table","onUpdateTable"])],10,Fq)]),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList((qt=a.columns)==null?void 0:qt.slice(1),Oi=>(f.openBlock(),f.createElementBlock("td",{onClick:Qr=>a.changeActiveCardInfo(Re==null?void 0:Re.id),class:f.normalizeClass(["px-3 py-3 text-sm text-gray-600 text-start",{"cursor-pointer":r.isVisibleCardInfo}]),key:Oi.name},[f.createVNode(ce,{row:Re,column:Oi,table:t.table,onUpdateTable:a.getTableData},null,8,["row","column","table","onUpdateTable"])],10,$q))),128)),(vi=(on=a.getActions)==null?void 0:on.filter(Oi=>Oi!=="add"&&Oi!=="view"))!=null&&vi.length?(f.openBlock(),f.createElementBlock("td",{key:0,class:f.normalizeClass(["text-center sticky right-0 w-[80px] px-[10px]",{"bg-gray-50":((si=(wi=n.$route)==null?void 0:wi.query)==null?void 0:si.card)===(Re==null?void 0:Re.id),"bg-white":((oi=(Wi=n.$route)==null?void 0:Wi.query)==null?void 0:oi.card)!==(Re==null?void 0:Re.id)}])},[f.createVNode(U,{actions:a.getActions,isForm:a.isForm,item:Re,table:t.table,onUpdateTable:a.getTableData},null,8,["actions","isForm","item","table","onUpdateTable"])],2)):f.createCommentVNode("",!0)],2)}),128))])]))])],4)],2),f.createElementVNode("div",jq,[f.createElementVNode("div",Uq,[f.createElementVNode("p",Hq,[f.createElementVNode("span",qq,[f.createTextVNode(f.toDisplayString(r.filters||r.searchValue?"Знайдено":"Об'єктів")+" "+f.toDisplayString(((ot=r.tableData)==null?void 0:ot.count)||"0 ")+" ",1),r.filters||r.searchValue?(f.openBlock(),f.createElementBlock("span",Wq," з")):f.createCommentVNode("",!0)]),r.filters||r.searchValue?(f.openBlock(),f.createElementBlock("span",Gq,f.toDisplayString(" "+((Lt=r.tableData)==null?void 0:Lt.filtered)||0),1)):f.createCommentVNode("",!0)])]),Math.ceil(((Qt=r.tableData)==null?void 0:Qt.filtered)/r.limit)>1?(f.openBlock(),f.createBlock(ke,{key:0,goTo:!1,class:"justify-end","default-page":parseInt(a.defaultPage),total:((At=r.tableData)==null?void 0:At.filtered)||0,pageSize:parseInt(r.limit),onPageChange:a.handlePageChange,pageSizes:[10,16,20],onPageSizeChange:a.changeLimit,backgroundColor:"#F3F4F6"},null,8,["default-page","total","pageSize","onPageChange","onPageSizeChange"])):f.createCommentVNode("",!0)])],2),f.createVNode(f.Transition,{name:"slide-fade"},{default:f.withCtx(()=>{var Re;return[r.isVisibleCardInfo?(f.openBlock(),f.createBlock(Pe,{key:0,table:t.table,columns:(Re=r.tableData)==null?void 0:Re.columns,row:a.activeCardRow},null,8,["table","columns","row"])):f.createCommentVNode("",!0)]}),_:1})])])])])}const Yq={components:{AdminTable:Ue(Eq,[["render",Zq],["__scopeId","data-v-5b7d20f1"]])},data(){return{table:!1,interface:"",title:""}},watch:{$route:{async handler(){Jr!=null&&Jr.value||await this.getMenu(),await this.checkPageType()},deep:!0},title(n){var e;n&&(document.title=(((e=ia.value)==null?void 0:e.titlePrefix)||"")+n)}},async mounted(){await this.checkPageType()},methods:{flattenMenu(n){const e=[];return n.forEach(t=>{t.menu?e.push(...this.flattenMenu(t.menu)):e.push(t)}),e},async checkPageType(){var i,r;const n=this.flattenMenu(Jr.value);n!=null&&n.length||this.$router.replace("/404");const e=n==null?void 0:n.find(a=>{var u,l;return(a==null?void 0:a.path)==((l=(u=this.$route)==null?void 0:u.params)==null?void 0:l.catchAll)});this.title=e==null?void 0:e.ua,e||this.$router.replace("/404"),e!=null&&e.component&&this.$router.replace((r=(i=this.$route)==null?void 0:i.params)==null?void 0:r.catchAll);const t=e==null?void 0:e.table;this.table=t||!1,!t&&this.getInterface()},async getInterface(){var n,e;try{const{data:t}=await ut.get(`/api/template/interface/${((e=(n=this.$route)==null?void 0:n.params)==null?void 0:e.catchAll)||""}`);this.interface=t||""}catch{this.interface=""}}}},Xq=["innerHTML"];function Kq(n,e,t,i,r,a){const u=f.resolveComponent("AdminTable");return r.table?(f.openBlock(),f.createBlock(u,{key:0,table:r.table,title:r.title},null,8,["table","title"])):(f.openBlock(),f.createElementBlock("div",{key:1,class:"w-full bg-gray-50",style:{height:"calc(100vh - 120px)"},innerHTML:r.interface},null,8,Xq))}const Jq=Object.freeze(Object.defineProperty({__proto__:null,default:Ue(Yq,[["render",Kq]])},Symbol.toStringTag,{value:"Module"}));return mU});