(function(a,Se){typeof exports=="object"&&typeof module<"u"?module.exports=Se(require("vue")):typeof define=="function"&&define.amd?define(["vue"],Se):(a=typeof globalThis<"u"?globalThis:a||self,a.v3filter=Se(a.Vue))})(this,function(a){"use strict";function Se(e,t){return function(){return e.apply(t,arguments)}}const{toString:_r}=Object.prototype,{getPrototypeOf:Vt}=Object,Ze=(e=>t=>{const n=_r.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),X=e=>(e=e.toLowerCase(),t=>Ze(t)===e),Je=e=>t=>typeof t===e,{isArray:De}=Array,Pe=Je("undefined");function Sr(e){return e!==null&&!Pe(e)&&e.constructor!==null&&!Pe(e.constructor)&&U(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Sn=X("ArrayBuffer");function Dr(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Sn(e.buffer),t}const xr=Je("string"),U=Je("function"),Dn=Je("number"),Ke=e=>e!==null&&typeof e=="object",Er=e=>e===!0||e===!1,Xe=e=>{if(Ze(e)!=="object")return!1;const t=Vt(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Vr=X("Date"),Cr=X("File"),Or=X("Blob"),Mr=X("FileList"),Nr=e=>Ke(e)&&U(e.pipe),$r=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||U(e.append)&&((t=Ze(e))==="formdata"||t==="object"&&U(e.toString)&&e.toString()==="[object FormData]"))},Tr=X("URLSearchParams"),Br=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Fe(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let s,r;if(typeof e!="object"&&(e=[e]),De(e))for(s=0,r=e.length;s0;)if(r=n[s],t===r.toLowerCase())return r;return null}const En=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Vn=e=>!Pe(e)&&e!==En;function Ct(){const{caseless:e}=Vn(this)&&this||{},t={},n=(s,r)=>{const i=e&&xn(t,r)||r;Xe(t[i])&&Xe(s)?t[i]=Ct(t[i],s):Xe(s)?t[i]=Ct({},s):De(s)?t[i]=s.slice():t[i]=s};for(let s=0,r=arguments.length;s(Fe(t,(r,i)=>{n&&U(r)?e[i]=Se(r,n):e[i]=r},{allOwnKeys:s}),e),Fr=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Lr=(e,t,n,s)=>{e.prototype=Object.create(t.prototype,s),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Yr=(e,t,n,s)=>{let r,i,o;const l={};if(t=t||{},e==null)return t;do{for(r=Object.getOwnPropertyNames(e),i=r.length;i-- >0;)o=r[i],(!s||s(o,e,t))&&!l[o]&&(t[o]=e[o],l[o]=!0);e=n!==!1&&Vt(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Rr=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const s=e.indexOf(t,n);return s!==-1&&s===n},Ar=e=>{if(!e)return null;if(De(e))return e;let t=e.length;if(!Dn(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},vr=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Vt(Uint8Array)),Ir=(e,t)=>{const s=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=s.next())&&!r.done;){const i=r.value;t.call(e,i[0],i[1])}},Ur=(e,t)=>{let n;const s=[];for(;(n=e.exec(t))!==null;)s.push(n);return s},Wr=X("HTMLFormElement"),jr=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,s,r){return s.toUpperCase()+r}),Cn=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Hr=X("RegExp"),On=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),s={};Fe(n,(r,i)=>{let o;(o=t(r,i,e))!==!1&&(s[i]=o||r)}),Object.defineProperties(e,s)},zr=e=>{On(e,(t,n)=>{if(U(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const s=e[n];if(U(s)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},qr=(e,t)=>{const n={},s=r=>{r.forEach(i=>{n[i]=!0})};return De(e)?s(e):s(String(e).split(t)),n},Gr=()=>{},Zr=(e,t)=>(e=+e,Number.isFinite(e)?e:t),Ot="abcdefghijklmnopqrstuvwxyz",Mn="0123456789",Nn={DIGIT:Mn,ALPHA:Ot,ALPHA_DIGIT:Ot+Ot.toUpperCase()+Mn},Jr=(e=16,t=Nn.ALPHA_DIGIT)=>{let n="";const{length:s}=t;for(;e--;)n+=t[Math.random()*s|0];return n};function Kr(e){return!!(e&&U(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Xr=e=>{const t=new Array(10),n=(s,r)=>{if(Ke(s)){if(t.indexOf(s)>=0)return;if(!("toJSON"in s)){t[r]=s;const i=De(s)?[]:{};return Fe(s,(o,l)=>{const d=n(o,r+1);!Pe(d)&&(i[l]=d)}),t[r]=void 0,i}}return s};return n(e,0)},Qr=X("AsyncFunction"),u={isArray:De,isArrayBuffer:Sn,isBuffer:Sr,isFormData:$r,isArrayBufferView:Dr,isString:xr,isNumber:Dn,isBoolean:Er,isObject:Ke,isPlainObject:Xe,isUndefined:Pe,isDate:Vr,isFile:Cr,isBlob:Or,isRegExp:Hr,isFunction:U,isStream:Nr,isURLSearchParams:Tr,isTypedArray:vr,isFileList:Mr,forEach:Fe,merge:Ct,extend:Pr,trim:Br,stripBOM:Fr,inherits:Lr,toFlatObject:Yr,kindOf:Ze,kindOfTest:X,endsWith:Rr,toArray:Ar,forEachEntry:Ir,matchAll:Ur,isHTMLForm:Wr,hasOwnProperty:Cn,hasOwnProp:Cn,reduceDescriptors:On,freezeMethods:zr,toObjectSet:qr,toCamelCase:jr,noop:Gr,toFiniteNumber:Zr,findKey:xn,global:En,isContextDefined:Vn,ALPHABET:Nn,generateString:Jr,isSpecCompliantForm:Kr,toJSONObject:Xr,isAsyncFn:Qr,isThenable:e=>e&&(Ke(e)||U(e))&&U(e.then)&&U(e.catch)};function x(e,t,n,s,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),s&&(this.request=s),r&&(this.response=r)}u.inherits(x,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:u.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const $n=x.prototype,Tn={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Tn[e]={value:e}}),Object.defineProperties(x,Tn),Object.defineProperty($n,"isAxiosError",{value:!0}),x.from=(e,t,n,s,r,i)=>{const o=Object.create($n);return u.toFlatObject(e,o,function(d){return d!==Error.prototype},l=>l!=="isAxiosError"),x.call(o,e.message,t,n,s,r),o.cause=e,o.name=e.name,i&&Object.assign(o,i),o};const ea=null;function Mt(e){return u.isPlainObject(e)||u.isArray(e)}function Bn(e){return u.endsWith(e,"[]")?e.slice(0,-2):e}function Pn(e,t,n){return e?e.concat(t).map(function(r,i){return r=Bn(r),!n&&i?"["+r+"]":r}).join(n?".":""):t}function ta(e){return u.isArray(e)&&!e.some(Mt)}const na=u.toFlatObject(u,{},null,function(t){return/^is[A-Z]/.test(t)});function Qe(e,t,n){if(!u.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=u.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(w,F){return!u.isUndefined(F[w])});const s=n.metaTokens,r=n.visitor||f,i=n.dots,o=n.indexes,d=(n.Blob||typeof Blob<"u"&&Blob)&&u.isSpecCompliantForm(t);if(!u.isFunction(r))throw new TypeError("visitor must be a function");function c(b){if(b===null)return"";if(u.isDate(b))return b.toISOString();if(!d&&u.isBlob(b))throw new x("Blob is not supported. Use a Buffer instead.");return u.isArrayBuffer(b)||u.isTypedArray(b)?d&&typeof Blob=="function"?new Blob([b]):Buffer.from(b):b}function f(b,w,F){let Y=b;if(b&&!F&&typeof b=="object"){if(u.endsWith(w,"{}"))w=s?w:w.slice(0,-2),b=JSON.stringify(b);else if(u.isArray(b)&&ta(b)||(u.isFileList(b)||u.endsWith(w,"[]"))&&(Y=u.toArray(b)))return w=Bn(w),Y.forEach(function(K,Et){!(u.isUndefined(K)||K===null)&&t.append(o===!0?Pn([w],Et,i):o===null?w:w+"[]",c(K))}),!1}return Mt(b)?!0:(t.append(Pn(F,w,i),c(b)),!1)}const h=[],S=Object.assign(na,{defaultVisitor:f,convertValue:c,isVisitable:Mt});function k(b,w){if(!u.isUndefined(b)){if(h.indexOf(b)!==-1)throw Error("Circular reference detected in "+w.join("."));h.push(b),u.forEach(b,function(Y,J){(!(u.isUndefined(Y)||Y===null)&&r.call(t,Y,u.isString(J)?J.trim():J,w,S))===!0&&k(Y,w?w.concat(J):[J])}),h.pop()}}if(!u.isObject(e))throw new TypeError("data must be an object");return k(e),t}function Fn(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(s){return t[s]})}function Nt(e,t){this._pairs=[],e&&Qe(e,this,t)}const Ln=Nt.prototype;Ln.append=function(t,n){this._pairs.push([t,n])},Ln.toString=function(t){const n=t?function(s){return t.call(this,s,Fn)}:Fn;return this._pairs.map(function(r){return n(r[0])+"="+n(r[1])},"").join("&")};function sa(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Yn(e,t,n){if(!t)return e;const s=n&&n.encode||sa,r=n&&n.serialize;let i;if(r?i=r(t,n):i=u.isURLSearchParams(t)?t.toString():new Nt(t,n).toString(s),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Rn{constructor(){this.handlers=[]}use(t,n,s){return this.handlers.push({fulfilled:t,rejected:n,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){u.forEach(this.handlers,function(s){s!==null&&t(s)})}}const An={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ra={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Nt,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},vn=typeof window<"u"&&typeof document<"u",aa=(e=>vn&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),ia=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Q={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:vn,hasStandardBrowserEnv:aa,hasStandardBrowserWebWorkerEnv:ia},Symbol.toStringTag,{value:"Module"})),...ra};function oa(e,t){return Qe(e,new Q.classes.URLSearchParams,Object.assign({visitor:function(n,s,r,i){return Q.isNode&&u.isBuffer(n)?(this.append(s,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function la(e){return u.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function da(e){const t={},n=Object.keys(e);let s;const r=n.length;let i;for(s=0;s=n.length;return o=!o&&u.isArray(r)?r.length:o,d?(u.hasOwnProp(r,o)?r[o]=[r[o],s]:r[o]=s,!l):((!r[o]||!u.isObject(r[o]))&&(r[o]=[]),t(n,s,r[o],i)&&u.isArray(r[o])&&(r[o]=da(r[o])),!l)}if(u.isFormData(e)&&u.isFunction(e.entries)){const n={};return u.forEachEntry(e,(s,r)=>{t(la(s),r,n,0)}),n}return null}function ca(e,t,n){if(u.isString(e))try{return(t||JSON.parse)(e),u.trim(e)}catch(s){if(s.name!=="SyntaxError")throw s}return(n||JSON.stringify)(e)}const $t={transitional:An,adapter:["xhr","http"],transformRequest:[function(t,n){const s=n.getContentType()||"",r=s.indexOf("application/json")>-1,i=u.isObject(t);if(i&&u.isHTMLForm(t)&&(t=new FormData(t)),u.isFormData(t))return r?JSON.stringify(In(t)):t;if(u.isArrayBuffer(t)||u.isBuffer(t)||u.isStream(t)||u.isFile(t)||u.isBlob(t))return t;if(u.isArrayBufferView(t))return t.buffer;if(u.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(i){if(s.indexOf("application/x-www-form-urlencoded")>-1)return oa(t,this.formSerializer).toString();if((l=u.isFileList(t))||s.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return Qe(l?{"files[]":t}:t,d&&new d,this.formSerializer)}}return i||r?(n.setContentType("application/json",!1),ca(t)):t}],transformResponse:[function(t){const n=this.transitional||$t.transitional,s=n&&n.forcedJSONParsing,r=this.responseType==="json";if(t&&u.isString(t)&&(s&&!this.responseType||r)){const o=!(n&&n.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(l){if(o)throw l.name==="SyntaxError"?x.from(l,x.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Q.classes.FormData,Blob:Q.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};u.forEach(["delete","get","head","post","put","patch"],e=>{$t.headers[e]={}});const Tt=$t,ua=u.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ha=e=>{const t={};let n,s,r;return e&&e.split(` `).forEach(function(o){r=o.indexOf(":"),n=o.substring(0,r).trim().toLowerCase(),s=o.substring(r+1).trim(),!(!n||t[n]&&ua[n])&&(n==="set-cookie"?t[n]?t[n].push(s):t[n]=[s]:t[n]=t[n]?t[n]+", "+s:s)}),t},Un=Symbol("internals");function Le(e){return e&&String(e).trim().toLowerCase()}function et(e){return e===!1||e==null?e:u.isArray(e)?e.map(et):String(e)}function fa(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=n.exec(e);)t[s[1]]=s[2];return t}const ma=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Bt(e,t,n,s,r){if(u.isFunction(s))return s.call(this,t,n);if(r&&(t=n),!!u.isString(t)){if(u.isString(s))return t.indexOf(s)!==-1;if(u.isRegExp(s))return s.test(t)}}function pa(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,s)=>n.toUpperCase()+s)}function ya(e,t){const n=u.toCamelCase(" "+t);["get","set","has"].forEach(s=>{Object.defineProperty(e,s+n,{value:function(r,i,o){return this[s].call(this,t,r,i,o)},configurable:!0})})}class tt{constructor(t){t&&this.set(t)}set(t,n,s){const r=this;function i(l,d,c){const f=Le(d);if(!f)throw new Error("header name must be a non-empty string");const h=u.findKey(r,f);(!h||r[h]===void 0||c===!0||c===void 0&&r[h]!==!1)&&(r[h||d]=et(l))}const o=(l,d)=>u.forEach(l,(c,f)=>i(c,f,d));return u.isPlainObject(t)||t instanceof this.constructor?o(t,n):u.isString(t)&&(t=t.trim())&&!ma(t)?o(ha(t),n):t!=null&&i(n,t,s),this}get(t,n){if(t=Le(t),t){const s=u.findKey(this,t);if(s){const r=this[s];if(!n)return r;if(n===!0)return fa(r);if(u.isFunction(n))return n.call(this,r,s);if(u.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Le(t),t){const s=u.findKey(this,t);return!!(s&&this[s]!==void 0&&(!n||Bt(this,this[s],s,n)))}return!1}delete(t,n){const s=this;let r=!1;function i(o){if(o=Le(o),o){const l=u.findKey(s,o);l&&(!n||Bt(s,s[l],l,n))&&(delete s[l],r=!0)}}return u.isArray(t)?t.forEach(i):i(t),r}clear(t){const n=Object.keys(this);let s=n.length,r=!1;for(;s--;){const i=n[s];(!t||Bt(this,this[i],i,t,!0))&&(delete this[i],r=!0)}return r}normalize(t){const n=this,s={};return u.forEach(this,(r,i)=>{const o=u.findKey(s,i);if(o){n[o]=et(r),delete n[i];return}const l=t?pa(i):String(i).trim();l!==i&&delete n[i],n[l]=et(r),s[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return u.forEach(this,(s,r)=>{s!=null&&s!==!1&&(n[r]=t&&u.isArray(s)?s.join(", "):s)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const s=new this(t);return n.forEach(r=>s.set(r)),s}static accessor(t){const s=(this[Un]=this[Un]={accessors:{}}).accessors,r=this.prototype;function i(o){const l=Le(o);s[l]||(ya(r,o),s[l]=!0)}return u.isArray(t)?t.forEach(i):i(t),this}}tt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),u.reduceDescriptors(tt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(s){this[n]=s}}}),u.freezeMethods(tt);const re=tt;function Pt(e,t){const n=this||Tt,s=t||n,r=re.from(s.headers);let i=s.data;return u.forEach(e,function(l){i=l.call(n,i,r.normalize(),t?t.status:void 0)}),r.normalize(),i}function Wn(e){return!!(e&&e.__CANCEL__)}function Ye(e,t,n){x.call(this,e??"canceled",x.ERR_CANCELED,t,n),this.name="CanceledError"}u.inherits(Ye,x,{__CANCEL__:!0});function ga(e,t,n){const s=n.config.validateStatus;!n.status||!s||s(n.status)?e(n):t(new x("Request failed with status code "+n.status,[x.ERR_BAD_REQUEST,x.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const ba=Q.hasStandardBrowserEnv?{write(e,t,n,s,r,i){const o=[e+"="+encodeURIComponent(t)];u.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),u.isString(s)&&o.push("path="+s),u.isString(r)&&o.push("domain="+r),i===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function wa(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function ka(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function jn(e,t){return e&&!wa(t)?ka(e,t):t}const _a=Q.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let s;function r(i){let o=i;return t&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return s=r(window.location.href),function(o){const l=u.isString(o)?r(o):o;return l.protocol===s.protocol&&l.host===s.host}}():function(){return function(){return!0}}();function Sa(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Da(e,t){e=e||10;const n=new Array(e),s=new Array(e);let r=0,i=0,o;return t=t!==void 0?t:1e3,function(d){const c=Date.now(),f=s[i];o||(o=c),n[r]=d,s[r]=c;let h=i,S=0;for(;h!==r;)S+=n[h++],h=h%e;if(r=(r+1)%e,r===i&&(i=(i+1)%e),c-o{const i=r.loaded,o=r.lengthComputable?r.total:void 0,l=i-n,d=s(l),c=i<=o;n=i;const f={loaded:i,total:o,progress:o?i/o:void 0,bytes:l,rate:d||void 0,estimated:d&&o&&c?(o-i)/d:void 0,event:r};f[t?"download":"upload"]=!0,e(f)}}const Ft={http:ea,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,s){let r=e.data;const i=re.from(e.headers).normalize();let{responseType:o,withXSRFToken:l}=e,d;function c(){e.cancelToken&&e.cancelToken.unsubscribe(d),e.signal&&e.signal.removeEventListener("abort",d)}let f;if(u.isFormData(r)){if(Q.hasStandardBrowserEnv||Q.hasStandardBrowserWebWorkerEnv)i.setContentType(!1);else if((f=i.getContentType())!==!1){const[w,...F]=f?f.split(";").map(Y=>Y.trim()).filter(Boolean):[];i.setContentType([w||"multipart/form-data",...F].join("; "))}}let h=new XMLHttpRequest;if(e.auth){const w=e.auth.username||"",F=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(w+":"+F))}const S=jn(e.baseURL,e.url);h.open(e.method.toUpperCase(),Yn(S,e.params,e.paramsSerializer),!0),h.timeout=e.timeout;function k(){if(!h)return;const w=re.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),Y={data:!o||o==="text"||o==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:w,config:e,request:h};ga(function(K){n(K),c()},function(K){s(K),c()},Y),h=null}if("onloadend"in h?h.onloadend=k:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(k)},h.onabort=function(){h&&(s(new x("Request aborted",x.ECONNABORTED,e,h)),h=null)},h.onerror=function(){s(new x("Network Error",x.ERR_NETWORK,e,h)),h=null},h.ontimeout=function(){let F=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const Y=e.transitional||An;e.timeoutErrorMessage&&(F=e.timeoutErrorMessage),s(new x(F,Y.clarifyTimeoutError?x.ETIMEDOUT:x.ECONNABORTED,e,h)),h=null},Q.hasStandardBrowserEnv&&(l&&u.isFunction(l)&&(l=l(e)),l||l!==!1&&_a(S))){const w=e.xsrfHeaderName&&e.xsrfCookieName&&ba.read(e.xsrfCookieName);w&&i.set(e.xsrfHeaderName,w)}r===void 0&&i.setContentType(null),"setRequestHeader"in h&&u.forEach(i.toJSON(),function(F,Y){h.setRequestHeader(Y,F)}),u.isUndefined(e.withCredentials)||(h.withCredentials=!!e.withCredentials),o&&o!=="json"&&(h.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&h.addEventListener("progress",Hn(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&h.upload&&h.upload.addEventListener("progress",Hn(e.onUploadProgress)),(e.cancelToken||e.signal)&&(d=w=>{h&&(s(!w||w.type?new Ye(null,e,h):w),h.abort(),h=null)},e.cancelToken&&e.cancelToken.subscribe(d),e.signal&&(e.signal.aborted?d():e.signal.addEventListener("abort",d)));const b=Sa(S);if(b&&Q.protocols.indexOf(b)===-1){s(new x("Unsupported protocol "+b+":",x.ERR_BAD_REQUEST,e));return}h.send(r||null)})}};u.forEach(Ft,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const zn=e=>`- ${e}`,xa=e=>u.isFunction(e)||e===null||e===!1,qn={getAdapter:e=>{e=u.isArray(e)?e:[e];const{length:t}=e;let n,s;const r={};for(let i=0;i`adapter ${l} `+(d===!1?"is not supported by the environment":"is not available in the build"));let o=t?i.length>1?`since : `+i.map(zn).join(` `):" "+zn(i[0]):"as no adapter specified";throw new x("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return s},adapters:Ft};function Lt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ye(null,e)}function Gn(e){return Lt(e),e.headers=re.from(e.headers),e.data=Pt.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),qn.getAdapter(e.adapter||Tt.adapter)(e).then(function(s){return Lt(e),s.data=Pt.call(e,e.transformResponse,s),s.headers=re.from(s.headers),s},function(s){return Wn(s)||(Lt(e),s&&s.response&&(s.response.data=Pt.call(e,e.transformResponse,s.response),s.response.headers=re.from(s.response.headers))),Promise.reject(s)})}const Zn=e=>e instanceof re?e.toJSON():e;function xe(e,t){t=t||{};const n={};function s(c,f,h){return u.isPlainObject(c)&&u.isPlainObject(f)?u.merge.call({caseless:h},c,f):u.isPlainObject(f)?u.merge({},f):u.isArray(f)?f.slice():f}function r(c,f,h){if(u.isUndefined(f)){if(!u.isUndefined(c))return s(void 0,c,h)}else return s(c,f,h)}function i(c,f){if(!u.isUndefined(f))return s(void 0,f)}function o(c,f){if(u.isUndefined(f)){if(!u.isUndefined(c))return s(void 0,c)}else return s(void 0,f)}function l(c,f,h){if(h in t)return s(c,f);if(h in e)return s(void 0,c)}const d={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:l,headers:(c,f)=>r(Zn(c),Zn(f),!0)};return u.forEach(Object.keys(Object.assign({},e,t)),function(f){const h=d[f]||r,S=h(e[f],t[f],f);u.isUndefined(S)&&h!==l||(n[f]=S)}),n}const Jn="1.6.7",Yt={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Yt[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}});const Kn={};Yt.transitional=function(t,n,s){function r(i,o){return"[Axios v"+Jn+"] Transitional option '"+i+"'"+o+(s?". "+s:"")}return(i,o,l)=>{if(t===!1)throw new x(r(o," has been removed"+(n?" in "+n:"")),x.ERR_DEPRECATED);return n&&!Kn[o]&&(Kn[o]=!0,console.warn(r(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,o,l):!0}};function Ea(e,t,n){if(typeof e!="object")throw new x("options must be an object",x.ERR_BAD_OPTION_VALUE);const s=Object.keys(e);let r=s.length;for(;r-- >0;){const i=s[r],o=t[i];if(o){const l=e[i],d=l===void 0||o(l,i,e);if(d!==!0)throw new x("option "+i+" must be "+d,x.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new x("Unknown option "+i,x.ERR_BAD_OPTION)}}const Rt={assertOptions:Ea,validators:Yt},me=Rt.validators;class nt{constructor(t){this.defaults=t,this.interceptors={request:new Rn,response:new Rn}}async request(t,n){try{return await this._request(t,n)}catch(s){if(s instanceof Error){let r;Error.captureStackTrace?Error.captureStackTrace(r={}):r=new Error;const i=r.stack?r.stack.replace(/^.+\n/,""):"";s.stack?i&&!String(s.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(s.stack+=` `+i):s.stack=i}throw s}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=xe(this.defaults,n);const{transitional:s,paramsSerializer:r,headers:i}=n;s!==void 0&&Rt.assertOptions(s,{silentJSONParsing:me.transitional(me.boolean),forcedJSONParsing:me.transitional(me.boolean),clarifyTimeoutError:me.transitional(me.boolean)},!1),r!=null&&(u.isFunction(r)?n.paramsSerializer={serialize:r}:Rt.assertOptions(r,{encode:me.function,serialize:me.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&u.merge(i.common,i[n.method]);i&&u.forEach(["delete","get","head","post","put","patch","common"],b=>{delete i[b]}),n.headers=re.concat(o,i);const l=[];let d=!0;this.interceptors.request.forEach(function(w){typeof w.runWhen=="function"&&w.runWhen(n)===!1||(d=d&&w.synchronous,l.unshift(w.fulfilled,w.rejected))});const c=[];this.interceptors.response.forEach(function(w){c.push(w.fulfilled,w.rejected)});let f,h=0,S;if(!d){const b=[Gn.bind(this),void 0];for(b.unshift.apply(b,l),b.push.apply(b,c),S=b.length,f=Promise.resolve(n);h{if(!s._listeners)return;let i=s._listeners.length;for(;i-- >0;)s._listeners[i](r);s._listeners=null}),this.promise.then=r=>{let i;const o=new Promise(l=>{s.subscribe(l),i=l}).then(r);return o.cancel=function(){s.unsubscribe(i)},o},t(function(i,o,l){s.reason||(s.reason=new Ye(i,o,l),n(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new At(function(r){t=r}),cancel:t}}}const Va=At;function Ca(e){return function(n){return e.apply(null,n)}}function Oa(e){return u.isObject(e)&&e.isAxiosError===!0}const vt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(vt).forEach(([e,t])=>{vt[t]=e});const Ma=vt;function Xn(e){const t=new st(e),n=Se(st.prototype.request,t);return u.extend(n,st.prototype,t,{allOwnKeys:!0}),u.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return Xn(xe(e,r))},n}const B=Xn(Tt);B.Axios=st,B.CanceledError=Ye,B.CancelToken=Va,B.isCancel=Wn,B.VERSION=Jn,B.toFormData=Qe,B.AxiosError=x,B.Cancel=B.CanceledError,B.all=function(t){return Promise.all(t)},B.spread=Ca,B.isAxiosError=Oa,B.mergeConfig=xe,B.AxiosHeaders=re,B.formToJSON=e=>In(u.isHTMLForm(e)?new FormData(e):e),B.getAdapter=qn.getAdapter,B.HttpStatusCode=Ma,B.default=B;const Na={props:{type:{type:String,default:()=>""},title:{type:String,default:()=>""},color:{type:String,default:"blue"},size:{type:String,default:()=>""},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},icon:{type:String,default:()=>""},circle:Boolean,square:Boolean},data(){return{buttonClass:{}}},computed:{buttonData(){var e;return((e=this.buttonClass)==null?void 0:e[this.type])||this.buttonClass.default}},watch:{color:{immediate:!0,handler(e){this.buttonClass={primary:{params:{"border-1 border-transparent text-white":!0,[`bg-${e}-500`]:!0,[`hover:bg-${e}-600`]:!0,[`focus:ring-${e}-500`]:!0}},text:{params:{"border border-transparent":!0,[`text-${e}-500`]:!0,[`hover:bg-${e}-100`]:!0,[`focus:ring-${e}-500`]:!0}},plain:{params:{"border border-transparent hover:text-white ring-offset-white":!0,[`bg-${e}-100`]:!0,[`text-${e}-500`]:!0,[`hover:bg-${e}-500`]:!0,[`focus:ring-${e}-500`]:!0}},border:{params:{"border font-medium bg-white shadow-sm align-middle hover:bg-gray-50 focus:ring-offset-white":!0,[`text-${e}-700`]:!0,[`focus:ring-${e}-600`]:!0}},link:{params:{"border border-transparent ring-offset-white":!0,[`text-${e}-600`]:!0,[`hover:text-${e}-700`]:!0,[`focus:ring-${e}-600`]:!0}},default:{params:{"border !border-gray-200 hover:text-white bg-white":!0,[`text-${e}-500`]:!0,[`hover:border-${e}-500`]:!0,[`hover:bg-${e}-500`]:!0,[`focus:ring-${e}-500`]:!0}}}}}}},O=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},$a=e=>(a.pushScopeId("data-v-747ea7c9"),e=e(),a.popScopeId(),e),Ta={key:1,role:"status"},Ba=[$a(()=>a.createElementVNode("svg",{"aria-hidden":"true",class:"inline w-4 h-4 text-gray-200 animate-spin fill-blue-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a.createElementVNode("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),a.createElementVNode("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})],-1))];function Pa(e,t,n,s,r,i){return a.openBlock(),a.createElementBlock("button",{type:"button",class:a.normalizeClass(["vs-button inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all",{...i.buttonData.params,[n.size==="mini"?"py-1 px-3":n.size==="large"?"py-3 px-7":"py-1.5 px-5"]:!0,[n.disabled?"disabled opacity-50 focus:ring-0 focus:ring-offset-0 cursor-not-allowed":"focus:ring-1 focus:ring-offset-1"]:!0,"!px-2 !py-2 !rounded-full":n.circle,"!px-2 !py-2 !rounded-md":n.square}])},[a.renderSlot(e.$slots,"default",{},()=>[a.createTextVNode(a.toDisplayString(n.title),1)],!0),n.icon?(a.openBlock(),a.createElementBlock("i",{key:0,class:a.normalizeClass(["ti "+n.icon,"pointer-events-none"])},null,2)):a.createCommentVNode("",!0),n.loading?(a.openBlock(),a.createElementBlock("div",Ta,Ba)):a.createCommentVNode("",!0)],2)}const Fa=O(Na,[["render",Pa],["__scopeId","data-v-747ea7c9"]]),La=e=>new Date(e).toLocaleDateString("uk-UK",{month:"short",year:"numeric"}),Ya=e=>new Date(e).toLocaleDateString("uk-UK",{year:"numeric"}),Ra=e=>{const t=new Date(e);return`${Math.floor((t.getMonth()+3)/3)} квартал ${t.getFullYear()}`},Aa={},va={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-chevron-down"},Ia=[a.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),a.createElementVNode("path",{d:"M6 9l6 6l6 -6"},null,-1)];function Ua(e,t){return a.openBlock(),a.createElementBlock("svg",va,Ia)}const Wa=O(Aa,[["render",Ua]]),ja={},Ha={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-x"},za=[a.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),a.createElementVNode("path",{d:"M18 6l-12 12"},null,-1),a.createElementVNode("path",{d:"M6 6l12 12"},null,-1)];function qa(e,t){return a.openBlock(),a.createElementBlock("svg",Ha,za)}const Qn=O(ja,[["render",qa]]),Ga=a.defineComponent({props:{refreshName:{type:String,default:()=>""},options:{type:Array,default:()=>{const e=new Date;new Date(e).setDate(e.getDate()-10);const n=Math.floor((e.getMonth()+3)/3),s=n-1===0?4:n-1,r=(f,h)=>{const S=(f-1)*3,k=h==="from"?new Date(e.getFullYear(),S,1):new Date(e.getFullYear(),S+3,0);return[k.getFullYear(),k.getMonth(),k.getDate()]},i=e.getDay(),o=new Date(e);o.setDate(e.getDate()-i+1);const l=new Date(o);l.setDate(o.getDate()+6);const d=new Date(o);d.setDate(o.getDate()-7);const c=new Date(d);return c.setDate(d.getDate()+6),[{title:"Сьогодні",date:{from:[e.getFullYear(),e.getMonth(),e.getDate()],to:[e.getFullYear(),e.getMonth(),e.getDate()]},type:"day",arrows:!0},{title:"Вчора",date:{from:[e.getFullYear(),e.getMonth(),e.getDate()-1],to:[e.getFullYear(),e.getMonth(),e.getDate()-1]},type:"day",arrows:!0},{isDivider:!0},{title:"Останні 7 днів",date:{from:[e.getFullYear(),e.getMonth(),e.getDate()-7],to:[e.getFullYear(),e.getMonth(),e.getDate()]}},{title:"Останній місяць",date:{from:[e.getFullYear(),e.getMonth(),e.getDate()-30],to:[e.getFullYear(),e.getMonth(),e.getDate()]}},{title:"Останні 12 місяців",date:{from:[e.getFullYear()-1,e.getMonth(),e.getDate()],to:[e.getFullYear(),e.getMonth(),e.getDate()]}},{isDivider:!0},{title:"Попередній тиждень",date:{from:[d.getFullYear(),d.getMonth(),d.getDate()],to:[c.getFullYear(),c.getMonth(),c.getDate()]},type:"week",arrows:!0},{title:"Поточний тиждень",date:{from:[o.getFullYear(),o.getMonth(),o.getDate()],to:[l.getFullYear(),l.getMonth(),l.getDate()]},type:"week",arrows:!0},{isDivider:!0},{title:"Попередній місяць",date:{from:[e.getFullYear(),e.getMonth()-1,1],to:[e.getFullYear(),e.getMonth(),1]},arrows:!0,type:"month"},{title:"Поточний місяць",date:{from:[e.getFullYear(),e.getMonth(),1],to:[e.getFullYear(),e.getMonth(),e.getDate()]},arrows:!0,type:"month"},{isDivider:!0},{title:"Попередній рік",date:{from:[e.getFullYear()-1,0,1],to:[e.getFullYear(),0,1]},arrows:!0,type:"year"},{title:"Поточний рік",date:{from:[e.getFullYear(),0,1],to:[e.getFullYear(),e.getMonth(),e.getDate()]},arrows:!0,type:"year"},{isDivider:!0},{title:"Попередній квартал",date:{from:r(s,"from"),to:r(s,"to")},arrows:!0,type:"quarter"},{title:"Поточний квартал",date:{from:r(n,"from"),to:[e.getFullYear(),e.getMonth(),e.getDate()]},arrows:!0,type:"quarter"}]}},placeholder:{type:String,default:"Оберіть дату"},clearable:{type:Boolean,default:!1},modelValue:{type:String,default:""}},components:{IconChevronDown:Wa,IconX:Qn},data(){return{date:null,dropdownVisible:!1,isCustomDate:!1,currentOption:null,startDate:null,endDate:null,amountUnits:4}},mounted(){const e=new Date,t=new Date(e);t.setDate(e.getDate()-5),this.startDate=this.formatDate(t),this.endDate=this.formatDate(e),this.modelValue&&(this.setDate(),this.setSelectedOption()),window.addEventListener("resize",this.dropdownSetParams),window.addEventListener("click",this.closeDropdownOnClickOutside),window.addEventListener(this.refreshName,this.resetValue)},beforeUnmount(){window.removeEventListener("resize",this.dropdownSetParams),window.removeEventListener("click",this.closeDropdownOnClickOutside),window.removeEventListener(this.refreshName,this.resetValue)},computed:{filterLabel(){var n,s;const e=!this.currentOption&&this.modelValue;if((this.isCustomDate||e)&&this.date)switch((n=this.currentOption)==null?void 0:n.type){case"day":return this.selectedRange;case"month":return La(this.date.from);case"year":return Ya(this.date.from);case"quarter":return Ra(this.date.from);default:return this.selectedRange}return((s=this.currentOption)==null?void 0:s.title)||this.placeholder},selectedRange(){if(!this.date)return"";const e=this.date.from.toLocaleDateString("uk-UA"),t=this.date.to.toLocaleDateString("uk-UA");return!e||!t?"":`${e}-${t}`}},methods:{formatDate(e){const t=e.getFullYear(),n=String(e.getMonth()+1).padStart(2,"0"),s=String(e.getDate()).padStart(2,"0");return`${t}-${n}-${s}`},parseDate(e){const[t,n,s]=e.split("-").map(Number);return new Date(t,n-1,s)},closeDropdownOnClickOutside(e){var t,n;(n=(t=this.$refs)==null?void 0:t.body)!=null&&n.contains(e==null?void 0:e.target)||(this.dropdownVisible=!1,document.removeEventListener("scroll",this.closeDropdownOnScroll,!0))},handleDateChange(){const e=this.parseDate(this.startDate),t=this.parseDate(this.endDate);this.startDate&&this.endDate&&(this.date={from:e,to:t},this.currentOption={title:"Вибраний діапазон",date:{from:[e.getFullYear(),e.getMonth(),e.getDate()],to:[t.getFullYear(),t.getMonth(),t.getDate()]},type:"range"},this.handleSelect(this.currentOption))},handleAmounntChange(){const e=new Date;this.currentOption.title==="Дні"?this.date={from:[e.getFullYear(),e.getMonth(),e.getDate()-this.amountUnits],to:[e.getFullYear(),e.getMonth(),e.getDate()]}:this.date={from:[e.getFullYear(),e.getMonth(),e.getDate()-this.amountUnits*30],to:[e.getFullYear(),e.getMonth(),e.getDate()]},this.$emit("update:modelValue",this.selectedRange)},handleArrowClick(e="next"){var r,i;const t=e==="next"?1:-1,n=this.changeDateRange(t,(r=this.date)==null?void 0:r.from),s=this.changeDateRange(t,(i=this.date)==null?void 0:i.to);this.date={from:new Date(n),to:new Date(s)},this.isCustomDate=!0,this.$emit("update:modelValue",this.selectedRange)},changeDateRange(e,t){if(!this.currentOption)return"";const{type:n="day"}=this.currentOption,s=t||new Date,r=s.getFullYear(),i=s.getMonth(),o=s.getDate();switch(n){case"day":return new Date().setFullYear(r,i,o+e);case"month":return new Date().setFullYear(r,i+e,o);case"quarter":return new Date().setFullYear(r,i+e*3,o);case"year":return new Date().setFullYear(r+e,i,o);case"week":const l=new Date(r,i,o),d=e*7;return l.setDate(l.getDate()+d),l;default:return""}},handleSelect(e){const{date:t=null}=e,n=this.generateDate(t.from),s=this.generateDate(t.to);this.date={from:n,to:s},this.currentOption=e,this.$emit("update:modelValue",this.selectedRange),this.dropdownVisible=!1,this.isCustomDate=!1},setSelectedOption(){this.currentOption=this.options.find(e=>{if(!e.date)return!1;const t=this.generateDate(e.date.from),n=this.generateDate(e.date.to);return this.date?this.isSameDate(t,this.date.from)&&this.isSameDate(n,this.date.to):!1})||null},generateDate(e){return new Date(...e)},toggleDropdown(){this.dropdownVisible=!this.dropdownVisible,this.dropdownVisible?(document.addEventListener("scroll",this.closeDropdownOnScroll,!0),window.addEventListener("click",this.closeDropdownOnClickOutside),this.dropdownSetParams()):document.removeEventListener("scroll",this.closeDropdownOnScroll,!0)},closeDropdownOnScroll(){this.dropdownVisible&&(this.dropdownVisible=!1,document.removeEventListener("scroll",this.closeDropdownOnScroll,!0))},dropdownSetParams(){var s;const e=(s=this.$refs)==null?void 0:s.body,t=e==null?void 0:e.getBoundingClientRect(),n=this.$refs.list;if(n){const r=t.top,i=n.clientHeight,o=window.innerHeight>=t.bottom+i+15?r+38:r-i-8;n.style.position="fixed",n.style.top=`${o+4}px`,n.style.left=`${t.left}px`,n.style.width=`${t.width}px`}},setDate(){const[e,t]=this.modelValue.split("-"),[n,s,r]=e.split("."),[i,o,l]=t.split(".");this.date={from:this.generateDate([+r,+s-1,+n]),to:this.generateDate([+l,+o-1,+i])}},resetValue(){this.date={from:new Date,to:new Date},this.isCustomDate=!1,this.dropdownVisible=!1,this.currentOption=null,this.$emit("update:modelValue","")},isSameDate(e,t){return Math.floor(e.getTime()/1e3)===Math.floor(t.getTime()/1e3)}},watch:{modelValue(e){e||(this.date={from:new Date,to:new Date},this.isCustomDate=!1,this.dropdownVisible=!1,this.currentOption=null)}}}),Za={key:0,class:"shrink-0 inline-flex rounded-lg"},Ja={class:"inline-flex w-full"},Ka={class:"inline-flex w-full overflow-hidden"},Xa=["title"],Qa={key:1,class:"shrink-0 inline-flex rounded-lg"},ei={key:2,class:"inline-flex gap-4 w-full rounded-lg"},ti={key:3,class:"shrink-0 inline-flex rounded-lg"},ni={ref:"list",class:"vsTailwind w-full bg-white top-[44px] rounded-lg shadow h-[300px] z-10",style:{"background-color":"white"}},si={class:"overflow-auto h-[300px] vsTailwind"},ri={key:0,class:"mt-2 pt-2 border-t"},ai=["onClick"];function ii(e,t,n,s,r,i){var d,c,f,h,S;const o=a.resolveComponent("IconChevronDown"),l=a.resolveComponent("IconX");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",{class:a.normalizeClass(["filter-date relative h-auto flex gap-2 w-full",(d=e.currentOption)!=null&&d.showDateRangePicker?"flex-wrap":""]),ref:"body"},[(c=e.currentOption)!=null&&c.arrows?(a.openBlock(),a.createElementBlock("div",Za,[a.createElementVNode("button",{onClick:t[0]||(t[0]=a.withModifiers(k=>e.handleArrowClick("prev"),["stop"])),type:"button",title:"Попередній період",class:"p-2 inline-flex items-center gap-x-2 -ms-px first:rounded-s-lg first:ms-0 last:rounded-e-lg text-sm focus:z-10 border border-solid border-gray-200 bg-white text-gray-800 hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none"},[a.createVNode(o,{width:"15px",class:"text-gray-800 rotate-[90deg]"})])])):a.createCommentVNode("",!0),a.createElementVNode("div",Ja,[a.createElementVNode("div",Ka,[a.createElementVNode("button",{type:"button",class:"filter-date__button hs-select-disabled:pointer-events-none h-[40px] relative py-2 px-4 flex text-nowrap w-full cursor-pointer bg-white border border-solid border-stone-200 rounded-lg text-start text-sm text-stone-800 focus:border-blue-600 focus:border-2 focus:ring-blue-600",onClick:t[1]||(t[1]=(...k)=>e.toggleDropdown&&e.toggleDropdown(...k))},[a.createElementVNode("span",{class:a.normalizeClass(["w-full text-left h-full truncate",{"opacity-50":!e.modelValue}]),title:e.selectedRange},a.toDisplayString(e.filterLabel),11,Xa),e.clearable&&e.modelValue.length?(a.openBlock(),a.createBlock(l,{key:0,onClick:a.withModifiers(e.resetValue,["stop"]),width:"15px",class:"shrink-0 text-gray-500 text-sm hover:text-red-500"},null,8,["onClick"])):a.createCommentVNode("",!0),a.createVNode(o,{width:"15px",class:a.normalizeClass(["shrink-0 text-gray-500 text-sm transition-transform",{"rotate-180":e.dropdownVisible}])},null,8,["class"])])])]),(f=e.currentOption)!=null&&f.arrows?(a.openBlock(),a.createElementBlock("div",Qa,[a.createElementVNode("button",{onClick:t[2]||(t[2]=a.withModifiers(k=>e.handleArrowClick("next"),["stop"])),type:"button",title:"Наступний період",class:"p-2 inline-flex items-center gap-x-2 -ms-px first:rounded-s-lg first:ms-0 last:rounded-e-lg text-sm focus:z-10 border border-solid border-gray-200 bg-white text-gray-800 hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none mr-2"},[a.createVNode(o,{width:"15px",class:"text-gray-800 rotate-[270deg]"})])])):a.createCommentVNode("",!0),(h=e.currentOption)!=null&&h.showDateRangePicker?(a.openBlock(),a.createElementBlock("div",ei,[a.withDirectives(a.createElementVNode("input",{type:"date","onUpdate:modelValue":t[3]||(t[3]=k=>e.startDate=k),onChange:t[4]||(t[4]=k=>e.handleDateChange()),class:"mb-2 p-2 border px-4 text-sm h-[38px] rounded-lg w-[calc((100%-16px)/2)]"},null,544),[[a.vModelText,e.startDate]]),a.withDirectives(a.createElementVNode("input",{type:"date","onUpdate:modelValue":t[5]||(t[5]=k=>e.endDate=k),onChange:t[6]||(t[6]=k=>e.handleDateChange()),class:"p-2 border px-4 text-sm h-[38px] rounded-lg w-[calc((100%-16px)/2)]"},null,544),[[a.vModelText,e.endDate]])])):a.createCommentVNode("",!0),(S=e.currentOption)!=null&&S.showAmount?(a.openBlock(),a.createElementBlock("div",ti,[a.withDirectives(a.createElementVNode("input",{type:"number","onUpdate:modelValue":t[7]||(t[7]=k=>e.amountUnits=k),onChange:t[8]||(t[8]=k=>e.handleAmounntChange()),class:"mb-2 p-2 border px-4 text-sm h-[38px] w-[80px] rounded-lg"},null,544),[[a.vModelText,e.amountUnits]])])):a.createCommentVNode("",!0)],2),(a.openBlock(),a.createBlock(a.Teleport,{to:"body"},[a.withDirectives(a.createElementVNode("div",ni,[a.createElementVNode("div",si,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.options,(k,b)=>(a.openBlock(),a.createElementBlock("div",{key:b},[k!=null&&k.isDivider?(a.openBlock(),a.createElementBlock("div",ri)):(a.openBlock(),a.createElementBlock("button",{key:1,onClick:a.withModifiers(w=>e.handleSelect(k),["stop"]),type:"button",class:"filter-date__item block cursor-pointer text-left hs-selected:bg-stone-100 py-2 px-4 w-full text-sm text-stone-800 hover:bg-stone-100 rounded-lg focus:outline-none focus:bg-stone-100"},a.toDisplayString(k==null?void 0:k.title),9,ai))]))),128))])],512),[[a.vShow,e.dropdownVisible]])]))],64)}const oi=O(Ga,[["render",ii],["__scopeId","data-v-24cd495a"]]),li=(e,t=300)=>{let n;return function(...r){clearTimeout(n),n=setTimeout(()=>{e.apply(this,r)},t)}},es=a.defineComponent({data(){return{debouncedUpdateModelValue:li(e=>{this.$emit("update:modelValue",e)},500)}}}),di={},ci={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-x"},ui=[a.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),a.createElementVNode("path",{d:"M18 6l-12 12"},null,-1),a.createElementVNode("path",{d:"M6 6l12 12"},null,-1)];function hi(e,t,n,s,r,i){return a.openBlock(),a.createElementBlock("svg",ci,ui)}const fi=O(di,[["render",hi]]),mi={},pi={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-search"},yi=[a.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),a.createElementVNode("path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"},null,-1),a.createElementVNode("path",{d:"M21 21l-6 -6"},null,-1)];function gi(e,t){return a.openBlock(),a.createElementBlock("svg",pi,yi)}const bi=O(mi,[["render",gi]]),wi=a.defineComponent({props:{icon:{type:String,default:()=>""},disabled:{type:Boolean,default:()=>!1},clearable:{type:Boolean,default:()=>!1},modelValue:{type:String,default:()=>""},placeholder:{type:String,default:()=>""},iconPosition:{type:String,default:()=>"right"},type:{type:String,default:()=>"text"}},components:{IconClose:fi,IconSearch:bi},emits:["onInput","update:modelValue","blur","focus"],computed:{value:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e)}},clearIconStyle(){return[{"right-8":this.icon&&this.iconPosition==="right","right-3":!this.icon||this.iconPosition!=="right","pointer-events-none":this.disabled}]},iconStylePosition(){return[{"left-3":this.icon&&this.iconPosition==="left","right-3":this.icon&&this.iconPosition==="right"}]},inputStyle(){return[{"!pr-8":this.clearable&&!this.icon,"!pr-16":this.clearable&&this.icon&&this.iconPosition==="right","!pl-8":this.icon&&this.iconPosition==="left","!pr-[50px]":this.clearable&&this.value&&this.icon&&this.iconPosition==="right"}]}},methods:{handleInput(){this.$emit("onInput",this.modelValue)},handleBlur(){this.$emit("blur")},handleFocus(){this.$emit("focus")},clearInput(){this.$emit("update:modelValue",""),this.$emit("onInput","")}}}),ki={class:"flex items-center gap-[6px] h-[34px] pr-[8px] pl-[4px] absolute top-[2px] right-[1px] z-[100] rounded"},_i=["disabled","type","placeholder"];function Si(e,t,n,s,r,i){const o=a.resolveComponent("IconClose"),l=a.resolveComponent("IconSearch");return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["vs-form-text relative",{"cursor-not-allowed":e.disabled}])},[a.createElementVNode("div",ki,[e.clearable&&e.value?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["absolute bottom-2/4 z-50 translate-y-2/4 right-3 rounded cursor-pointer",e.clearIconStyle]),onClick:t[0]||(t[0]=(...d)=>e.clearInput&&e.clearInput(...d))},[a.createVNode(o,{width:"15px",height:"15px",class:"stroke-gray-500 hover:stroke-red-500 transition-all"})],2)):a.createCommentVNode("",!0),e.icon&&e.icon.includes("search")?(a.openBlock(),a.createElementBlock("div",{key:1,class:a.normalizeClass(["absolute bottom-2/4 z-50 translate-y-2/4 rounded",e.iconStylePosition])},[a.createVNode(l,{width:"15px",height:"15px",class:"stroke-gray-500 transition-all"})],2)):e.icon?(a.openBlock(),a.createElementBlock("i",{key:2,class:a.normalizeClass(["absolute bottom-2/4 translate-y-2/4 text-gray-500 cursor-pointer",["ti "+e.icon,e.iconStylePosition]])},null,2)):a.createCommentVNode("",!0)]),a.withDirectives(a.createElementVNode("input",{disabled:e.disabled,type:e.type,onInput:t[1]||(t[1]=(...d)=>e.handleInput&&e.handleInput(...d)),placeholder:e.placeholder,"onUpdate:modelValue":t[2]||(t[2]=d=>e.value=d),onFocus:t[3]||(t[3]=(...d)=>e.handleFocus&&e.handleFocus(...d)),onBlur:t[4]||(t[4]=(...d)=>e.handleBlur&&e.handleBlur(...d)),class:a.normalizeClass([e.inputStyle,"py-2 pr-[100px] px-3 block h-[38px] border border-solid w-[100%] overflow-hidden overflow-ellipsis placeholder:text-nowrap border-stone-200 rounded-lg text-sm text-stone-800 placeholder:text-stone-500 focus:z-10 focus:border-blue-600 outline-none focus:border-2"])},null,42,_i),[[a.vModelDynamic,e.value]])],2)}const ts=O(wi,[["render",Si],["__scopeId","data-v-7dc85aba"]]),Di={components:{VsText:ts},mixins:[es],props:{defaultValue:{type:String,default:()=>""},modelValue:{type:String,default:e=>e.defaultValue},icon:{type:String,default:()=>"ti ti-search"},disabled:{type:Boolean,default:()=>!1},placeholder:{type:[String,Object],default:()=>""},iconPosition:{type:String,default:()=>"right"}},computed:{value:{get(){return this.modelValue},set(e){this.debouncedUpdateModelValue(e)}},placeholderValue(){var e;return((e=this.placeholder)==null?void 0:e.ua)||this.placeholder}}};function xi(e,t,n,s,r,i){const o=a.resolveComponent("VsText");return a.openBlock(),a.createBlock(o,{modelValue:i.value,"onUpdate:modelValue":t[0]||(t[0]=l=>i.value=l),icon:n.icon,clearable:"",iconPosition:n.iconPosition,disabled:n.disabled,placeholder:i.placeholderValue},null,8,["modelValue","icon","iconPosition","disabled","placeholder"])}const Ei=O(Di,[["render",xi]]),Vi=a.defineComponent({components:{VsFormText:ts},emits:["onSearch","update:modelValue","menuKeyUp","menuKeyDown","menuEnterSelect","close-list"],props:{disabled:{type:Boolean,default:()=>!1},placeholder:{type:String,default:()=>"Обрати"},clearable:{type:Boolean,default:()=>!1},modelValue:{type:[String,Array,Number],default:()=>""},multiple:{type:Boolean,default:()=>!1},searchable:{type:Boolean,default:()=>!1},searchPlaceholder:{type:String,default:()=>"Search..."},searchIcon:{type:String,default:()=>"ti-search"},lazyLoad:{type:Function,default:null},searchHighlight:{type:Boolean,default:()=>!1}},watch:{modelValue:{handler(){this.currentOption=null,this.getValue(),this.searchValue="",this.handleSearch()}}},computed:{tooltip(){return this.selectedOptions.map(e=>e==null?void 0:e.label).join(",")}},data(){return{list:{canClose:!1,visible:!1},currentOption:null,searchValue:"",selectedOptions:[]}},mounted(){window.addEventListener("keydown",this.handleKeyDown),window.addEventListener("click",this.clickOnBody,!1),window.addEventListener("resize",this.boundList),window.addEventListener("scroll",this.handleScroll,!0),window.addEventListener("popstate",this.handleBrowserBackButton),this.lazyLoad!==null&&typeof this.lazyLoad=="function"?this.lazyLoad().then(()=>{this.getValue()}):this.getValue()},beforeUnmount(){window.removeEventListener("keydown",this.handleKeyDown),window.removeEventListener("click",this.clickOnBody),window.removeEventListener("resize",this.boundList),window.removeEventListener("scroll",this.handleScroll),window.removeEventListener("popstate",this.handleBrowserBackButton)},methods:{handleScroll(e){const t=this.$refs.list,n=this.$refs.button;this.list.visible&&t&&n&&!t.contains(e.target)&&!n.contains(e.target)&&this.closeList()},toggleDropdown(){var e;if(!this.disabled&&(this.list.visible=!this.list.visible,this.list.visible||this.$emit("close-list"),this.list.visible)){this.$nextTick(()=>{this.boundList()});const t=(e=this.$refs.autocompleteSearch.$el)==null?void 0:e.querySelector("input");t&&this.$nextTick(()=>{setTimeout(()=>{t.focus()},50)})}},handleKeyDown(e){if(this.list.visible){const{keyCode:t}=e;switch([38,40].includes(t)&&e.preventDefault(),t){case 38:this.$emit("menuKeyUp");break;case 40:this.$emit("menuKeyDown");break;case 13:this.$emit("menuEnterSelect"),this.multiple||this.closeList();break}}},clickOnBody(){this.list.canClose&&(this.list.visible=!1,this.$emit("close-list"))},handleBrowserBackButton(){this.list.visible&&(this.list.visible=!1,this.$emit("close-list"))},boundList(){var s,r;const e=(s=this.$refs)==null?void 0:s.button,t=e==null?void 0:e.getBoundingClientRect();if(!this.list.visible)return;const n=(r=this.$refs)==null?void 0:r.list;if(n){const i=t.top,o=n.clientHeight,l=window.innerHeight>=t.bottom+o+15?i+38:i-o-8;n.style.top=`${l}px`,n.style.left=`${t.left}px`,n.style.width=`${e.clientWidth}px`}},disallowBodyClick(e){const{type:t}=e;switch(this.boundList(),t){case"mouseenter":this.list.canClose=!1;break;default:this.list.canClose=!0;break}},getValue(){const e=this.$slots.default(),t=typeof e=="string"?[]:e,n=r=>r.reduce((i,o)=>{const l=o==null?void 0:o.children;return Array.isArray(l)&&!o.dynamicProps&&!o.key?i.concat(n(l)):i.concat(o)},[]),s=n(t);this.multiple?this.setMultipleOption(s):this.setSingleOption(s)},clearValue(){this.$emit("update:modelValue",this.multiple?[]:"")},closeList(){this.list.visible=!1,this.$emit("close-list")},setSingleOption(e){const t=e.find(n=>{var r,i;const s=((r=n==null?void 0:n.props)==null?void 0:r.value)||((i=n==null?void 0:n.props)==null?void 0:i.label);if(typeof this.modelValue!="object")return s==this.modelValue});if(t){const n=t==null?void 0:t.props;this.currentOption=n}this.closeList()},setMultipleOption(e){this.selectedOptions=e.reduce((t,n)=>{var r,i;const s=((r=n==null?void 0:n.props)==null?void 0:r.value)||((i=n==null?void 0:n.props)==null?void 0:i.label);return this.modelValue&&this.modelValue.includes(s)?t.concat(n.props):t},[])},returnLabel(e){return(e==null?void 0:e.label)||(e==null?void 0:e.value)||e},handleSearch(){this.$emit("onSearch",this.searchValue)}}}),Ci=["title"],Oi={key:0,class:"flex items-center"},Mi={key:1,class:"opacity-50 truncate pr-4"},Ni={class:"vsTailwind",ref:"list",style:{position:"fixed","z-index":"10002"}},$i={ref:"listWrapper",class:"filter-autocomplete__list vsTailwind"};function Ti(e,t,n,s,r,i){var l,d;const o=a.resolveComponent("VsFormText");return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["filter-autocomplete relative min-w-[6rem] vsTailwind",{"cursor-not-allowed":e.disabled}]),onMouseenter:t[6]||(t[6]=(...c)=>e.disallowBodyClick&&e.disallowBodyClick(...c)),onMouseleave:t[7]||(t[7]=(...c)=>e.disallowBodyClick&&e.disallowBodyClick(...c))},[a.createElementVNode("button",{title:e.tooltip,class:a.normalizeClass(["hs-select-disabled:pointer-events-none hs-select-disabled:opacity-50 relative py-2 px-4 pe-9 flex text-nowrap w-full cursor-pointer bg-white border border-solid rounded-lg text-start text-sm text-stone-800 focus:outline-none",{"opacity-50 pointer-events-none":e.disabled,"border-blue-600 border-2":e.list.visible,"border-stone-200":!e.list.visible}]),ref:"button",type:"button",onClick:t[1]||(t[1]=(...c)=>e.toggleDropdown&&e.toggleDropdown(...c))},[e.selectedOptions.length||e.currentOption?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[e.multiple?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode(a.toDisplayString(`Обрано: ${e.selectedOptions.length}`),1)],64)):(a.openBlock(),a.createElementBlock("div",Oi,[typeof e.currentOption=="object"&&((l=e.currentOption)!=null&&l.color)?(a.openBlock(),a.createElementBlock("div",{key:0,class:"w-4 h-4 rounded-md mr-2",style:a.normalizeStyle({"background-color":e.currentOption.color})},null,4)):a.createCommentVNode("",!0),a.createTextVNode(" "+a.toDisplayString(e.returnLabel(e.currentOption)),1)]))],64)):(a.openBlock(),a.createElementBlock("div",Mi,a.toDisplayString(e.placeholder),1)),a.withDirectives(a.createElementVNode("i",{class:"absolute bottom-2/4 z-50 translate-y-2/4 ti ti-x right-8 hover:text-red-500 text-gray-500",onClick:t[0]||(t[0]=a.withModifiers((...c)=>e.clearValue&&e.clearValue(...c),["stop"]))},null,512),[[a.vShow,e.clearable&&((d=e.modelValue)==null?void 0:d.length)]]),a.createElementVNode("i",{class:a.normalizeClass(["ti ti-chevron-down absolute right-3 translate-y-2/4 bottom-1/2 text-500-gray text-gray-500",{"rotate-180":e.list.visible}])},null,2)],10,Ci),(a.openBlock(),a.createBlock(a.Teleport,{to:"body"},[a.createElementVNode("div",Ni,[a.withDirectives(a.createElementVNode("div",{class:"filter-autocomplete__wrapper overflow-y-auto absolute mt-2 z-50 w-full min-w-36 max-h-72 p-1 space-y-0.5 bg-white rounded-xl shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] top-full opened",onMouseenter:t[4]||(t[4]=(...c)=>e.disallowBodyClick&&e.disallowBodyClick(...c)),onMouseleave:t[5]||(t[5]=(...c)=>e.disallowBodyClick&&e.disallowBodyClick(...c))},[a.withDirectives(a.createVNode(o,{modelValue:e.searchValue,"onUpdate:modelValue":t[2]||(t[2]=c=>e.searchValue=c),class:"mb-2",placeholder:e.searchPlaceholder,icon:e.searchIcon,ref:"autocompleteSearch",onClick:t[3]||(t[3]=a.withModifiers(()=>{},["stop","self"])),onOnInput:e.handleSearch},null,8,["modelValue","placeholder","icon","onOnInput"]),[[a.vShow,e.searchable]]),a.createElementVNode("div",$i,[a.renderSlot(e.$slots,"default")],512)],544),[[a.vShow,e.list.visible]])],512)]))],34)}const Bi=O(Vi,[["render",Ti]]),Pi=a.defineComponent({props:{isHighlighted:{type:Boolean,default:()=>!1},value:{type:String,default:()=>""},label:{type:String,default:()=>""},color:{type:String,default:()=>""}},computed:{parentInstance(){return this.$parent},parentValue(){return this.parentInstance.modelValue},parentSearchValue(){return this.parentInstance.searchValue},parentMultiple(){return this.parentInstance.multiple},isValueEqualParentValue(){const e=this.value||this.label;return this.parentMultiple?this.parentValue.includes(e):this.parentValue==e},activeClass(){return`${this.parentMultiple?"":"cursor-default"}`},highlightedText(){var e;return!this.parentSearchValue||!((e=this.parentInstance)!=null&&e.searchHighlight)?this.label:this.label.replace(new RegExp(this.parentSearchValue,"gi"),t=>`${t}`)}},methods:{handleClick(){const e=this.value||this.label,t=this.parentInstance;if(e===this.parentValue&&!this.parentMultiple){t.closeList();return}if(this.parentMultiple){const n=Array.isArray(this.parentValue)?this.parentValue:[];this.parentValue.includes(e)?t.$emit("update:modelValue",n.filter(s=>s!==e)):t.$emit("update:modelValue",n.concat(e))}else t.$emit("update:modelValue",e)}}}),Fi={class:"flex justify-between items-center w-full"},Li={class:"flex items-center"},Yi=["innerHTML"],Ri={key:0,class:"flex-shrink-0 w-3.5 h-3.5 text-blue-600",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},Ai=[a.createElementVNode("polyline",{points:"20 6 9 17 4 12"},null,-1)];function vi(e,t,n,s,r,i){return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["form-autocomplete__item cursor-pointer hs-selected:bg-stone-100 py-2 px-4 w-full text-sm text-stone-800 hover:bg-stone-100 rounded-lg focus:outline-none focus:bg-stone-100",{[e.activeClass]:e.isValueEqualParentValue,"bg-gray-100":e.isHighlighted}]),onClick:t[0]||(t[0]=a.withModifiers((...o)=>e.handleClick&&e.handleClick(...o),["stop"]))},[a.createElementVNode("div",Fi,[a.createElementVNode("div",Li,[e.color?(a.openBlock(),a.createElementBlock("div",{key:0,class:"w-4 h-4 rounded-md mr-2 fle",style:a.normalizeStyle({"background-color":e.color,flex:"0 0 auto"})},null,4)):a.createCommentVNode("",!0),a.createElementVNode("div",{innerHTML:e.highlightedText,class:a.normalizeClass({"font-medium":e.isValueEqualParentValue})},null,10,Yi)]),e.isValueEqualParentValue?(a.openBlock(),a.createElementBlock("svg",Ri,Ai)):a.createCommentVNode("",!0)])],2)}const Ii=O(Pi,[["render",vi]]),Ui=a.defineComponent({components:{VsAutocomplete:Bi,VsAutocompleteOption:Ii},props:{select:{type:String,default:""},options:{type:Array,default:null},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},placeholder:{type:String,default:""},modelValue:{type:[String,Array,Number],default:""},multiple:{type:Boolean,default:!0},searchable:{type:Boolean,default:!0},searchPlaceholder:{type:String,default:"Search..."},searchIcon:{type:String,default:"ti-search"},token:{type:String,default:""},apiPrefix:{type:String,default:"api-user"}},data(){return{firstInstance:null,optionsList:null,searchList:[],search:"",optionsLoading:!1,highlightedIndex:-1,upValues:[]}},watch:{value(){this.search=""}},computed:{value:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e)}},searchData(){var i;const e=this.upValues,t=(this.optionsList||[]).filter(o=>e.includes(`${o.id}`)),n=(this.optionsList||[]).filter(o=>!e.includes(`${o.id}`)),s=e.length?[...t,...n]:[...this.optionsList||[]],r=(i=this.search)==null?void 0:i.toLowerCase();return r?s==null?void 0:s.filter(o=>{var l,d;return(d=(l=o.text)==null?void 0:l.toLowerCase())==null?void 0:d.includes(r)}):s},getOptionsList(){return this.search?this.searchList:this.searchData},isSearchable(){return this.optionsList?this.optionsList.length>=10&&this.searchable:!1}},methods:{async loadData(){this.modelValue&&await this.handleFocus()},async handleFocus(){this.optionsList||(this.optionsList=await this.getOptions())},async getOptions(){try{if(this.options)return this.options;const e=await this.requestData();return this.firstInstance||(this.firstInstance={count:e==null?void 0:e.count,total:e==null?void 0:e.total,limit:e==null?void 0:e.limit}),(e==null?void 0:e.data)||[]}catch(e){return console.error(e),null}},async requestData({val:e,search:t}={val:"",search:""}){const n=setTimeout(()=>{this.optionsLoading=!0},600),s=()=>{clearTimeout(n),this.optionsLoading=!1};try{if(!this.select)return s(),null;const{data:r}=await B.get(`/${this.apiPrefix}/suggest/${this.select}?json=1&token=${this.token}${t}${e}`);return s(),r}catch(r){return s(),console.error(r),null}},async handleSearch(e){var t;this.search=e,this.highlightedIndex=-1,this.firstInstance&&this.firstInstance.total>=50&&(this.searchList=(t=await this.requestData({search:`&key=${e==null?void 0:e.toLowerCase()}`,val:""}))==null?void 0:t.data)},getTitle(e){return typeof e=="string"?e:((e==null?void 0:e.text)||"Не визначено").toString()},handleKeyNavigation(e="next"){var r;const t=(((r=this.searchData)==null?void 0:r.length)||0)-1,n=this.$refs.autocomplete.$refs.listWrapper;switch(e){case"next":this.highlightedIndex{const o=i;o.innerText===s&&o.scrollIntoView({block:"center",inline:"center"})})},menuEnterSelect(){const e=this.getHighlightedValue();this.$emit("update:modelValue",e)},getHighlightedValue(e){var n;const t=(n=this.searchData)==null?void 0:n[this.highlightedIndex];return t?e?t==null?void 0:t[e]:(t.id||t.text).toString():""},async closeOptionsList(){Array.isArray(this.value)&&(this.upValues=await this.modelValue)}}}),Wi={class:"relative"},ji={key:0,class:"animate-spin absolute z-10 top-2.5 right-9 inline-block w-4 h-4 border-[3px] border-current border-t-transparent text-blue-600 rounded-full",role:"status","aria-label":"loading"},Hi=[a.createElementVNode("span",{class:"sr-only"},"Loading...",-1)],zi={class:"mr-auto"},qi={key:1,class:"text-center"};function Gi(e,t,n,s,r,i){const o=a.resolveComponent("VsAutocompleteOption"),l=a.resolveComponent("VsAutocomplete");return a.openBlock(),a.createElementBlock("div",Wi,[e.optionsLoading?(a.openBlock(),a.createElementBlock("div",ji,Hi)):a.createCommentVNode("",!0),a.createVNode(l,{onOnSearch:e.handleSearch,class:"[&>button>p]:m-0 [&>button>p]:text-sm",ref:"autocomplete",onClick:e.handleFocus,modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=d=>e.value=d),lazyLoad:e.loadData,placeholder:e.placeholder,disabled:e.disabled,clearable:e.clearable,multiple:e.multiple,searchable:e.isSearchable,onMenuEnterSelect:e.menuEnterSelect,onMenuKeyDown:t[1]||(t[1]=d=>e.handleKeyNavigation("next")),onMenuKeyUp:t[2]||(t[2]=d=>e.handleKeyNavigation("prev")),onCloseList:e.closeOptionsList,searchPlaceholder:e.searchPlaceholder,searchIcon:e.searchIcon},{default:a.withCtx(()=>{var d;return[(d=e.optionsList)!=null&&d.length?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:0},a.renderList(e.getOptionsList,(c,f)=>{var h;return a.openBlock(),a.createBlock(o,{label:e.getTitle(c),value:typeof c.id=="string"?c.id:((h=c.id)==null?void 0:h.toString())||"id не визначено",color:c==null?void 0:c.color,key:c.id||c.id,highlight:f===e.highlightedIndex},{default:a.withCtx(()=>[c.color?(a.openBlock(),a.createElementBlock("div",{key:0,class:"w-3 h-3 rounded",style:a.normalizeStyle({"background-color":c.color,flex:"0 0 auto"})},null,4)):a.createCommentVNode("",!0),a.createElementVNode("div",zi,a.toDisplayString(e.getTitle(c)),1)]),_:2},1032,["label","value","color","highlight"])}),128)):(a.openBlock(),a.createElementBlock("div",qi,"Дані не знайдено"))]}),_:1},8,["onOnSearch","onClick","modelValue","lazyLoad","placeholder","disabled","clearable","multiple","searchable","onMenuEnterSelect","onCloseList","searchPlaceholder","searchIcon"])])}const ns=O(Ui,[["render",Gi]]),Zi=a.defineComponent({props:{value:{type:[String,Number],default:()=>""},label:{type:[String,Number],default:()=>""},disabled:{type:Boolean,default:()=>!1},modelValue:{type:[Array,Boolean],default:()=>!1}},emits:["update:modelValue"],data(){return{id:`radio-${Math.floor(Math.random()*1e4)}`}},computed:{modelState:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e)}}}}),Ji={class:"flex"},Ki=["value","id","disabled"],Xi=["for"];function Qi(e,t,n,s,r,i){return a.openBlock(),a.createElementBlock("div",Ji,[a.withDirectives(a.createElementVNode("input",{type:"checkbox",value:e.value,"onUpdate:modelValue":t[0]||(t[0]=o=>e.modelState=o),class:"shrink-0 mt-0.5 border-gray-200 rounded text-blue-600 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none",id:e.id,disabled:e.disabled},null,8,Ki),[[a.vModelCheckbox,e.modelState]]),a.createElementVNode("label",{for:e.id,class:"text-sm text-gray-500 ms-3"},[a.renderSlot(e.$slots,"default",{},()=>[a.createTextVNode(a.toDisplayString(e.label),1)])],8,Xi)])}const eo=O(Zi,[["render",Qi]]),to=a.defineComponent({components:{VsCheckbox:eo},props:{options:{type:Array,default:()=>null},select:{type:Array,default:()=>[]},modelValue:{type:[Boolean,Array],default:({options:e})=>(e==null?void 0:e.length)>1?[]:!1},count:{type:Boolean,default:()=>!0},disabled:{type:Boolean,default:()=>!1}},data(){return{optionList:[],showHiddenData:!1}},computed:{value:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e)}},aviableFields(){const e=(n,s)=>(s==null?void 0:s.count)-(n==null?void 0:n.count);return(this.showHiddenData?this.optionList:this.optionList.filter(n=>(n==null?void 0:n.count)!==0)).sort(e)},isAnyOptionWithColor(){return!!this.optionList.find(t=>t.color)},anyEmptyData(){return this.optionList.some(e=>(e==null?void 0:e.count)===0)}},async mounted(){this.optionList=await this.getOptions()},methods:{toggleHiddenFields(){this.showHiddenData=!this.showHiddenData},optionValue(e){return e.id===null||e.id===void 0?"null":e.id},optionLabel(e){return(e==null?void 0:e.text)||e.id||"Не визначено"},notLastChild(e){return e!==this.optionList.length-1},async getOptions(){try{if(this.options||!this.select)return this.options;const{data:e}=await B.get(`/api-user/suggest/${this.select}?limit=50`);return e}catch(e){return console.error(e),[]}}}}),no={class:"vs-filter-checkbox flex flex-col gap-y-2"},so={class:"w-full flex items-center justify-between"},ro={class:"font-normal"},ao={key:0,class:"bg-gray-100 px-2 py-1 text-xs rounded-lg"};function io(e,t,n,s,r,i){const o=a.resolveComponent("VsCheckbox");return a.openBlock(),a.createElementBlock("div",no,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.aviableFields,l=>(a.openBlock(),a.createElementBlock("div",{class:"flex items-center w-full",key:l.id},[e.isAnyOptionWithColor?(a.openBlock(),a.createElementBlock("div",{key:0,class:"w-2 h-2 inline-block bg-gray-500 rounded-full me-2",style:a.normalizeStyle({"background-color":l.color})},null,4)):a.createCommentVNode("",!0),a.createElementVNode("div",so,[a.createVNode(o,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=d=>e.value=d),class:"!py-0",label:e.optionLabel(l),value:e.optionValue(l),disabled:e.disabled},{default:a.withCtx(()=>[a.createElementVNode("span",ro,a.toDisplayString(e.optionLabel(l)),1)]),_:2},1032,["modelValue","label","value","disabled"]),(l==null?void 0:l.count)!==void 0&&e.count?(a.openBlock(),a.createElementBlock("div",ao,a.toDisplayString(l.count),1)):a.createCommentVNode("",!0)])]))),128)),e.anyEmptyData?(a.openBlock(),a.createElementBlock("div",{key:0,class:"my-1 transition-all cursor-pointer text-blue-400 hover:text-blue-500 text-xs",onClick:t[1]||(t[1]=(...l)=>e.toggleHiddenFields&&e.toggleHiddenFields(...l))},a.toDisplayString(e.showHiddenData?"Приховати пусті фільтри":"Показати пусті фільтри"),1)):a.createCommentVNode("",!0)])}const ss=O(to,[["render",io]]),oo={mixins:[es],props:{modelValue:{type:String,default:()=>""},disabled:{type:Boolean,default:()=>!1},step:{type:Number,default:1},min:{type:Number,default:()=>0},max:{type:Number,default:()=>1e5},refreshName:{type:String,default:()=>""}},data(){return{refreshEvent:()=>{}}},computed:{minmax:{get(){const[e,t]=this.modelValue.split("-");return typeof t>"u"?{min:"",max:""}:{min:e,max:t}},set(e){if(e.min===null&&e.max===null)return;const t=`${e.min||"min"}-${e.max||"max"}`;t==="min-max"?this.debouncedUpdateModelValue(""):this.debouncedUpdateModelValue(t)}}},mounted(){this.refreshEvent=()=>{this.minmax={min:null,max:null}},window.addEventListener(this.refreshName,this.refreshEvent)},beforeUnmount(){window.removeEventListener(this.refreshName,this.refreshEvent)},created(){if(!this.modelValue)return;const[e,t]=this.modelValue.split(new RegExp("(?<=\\d)-(?=-?\\d)","g"));this.minmax={min:e,max:t}},methods:{handleChange(e,t){let n=e.target.value;n=n.slice(0,10),this.minmax={...this.minmax,[t]:n}}}},lo={class:"flex justify-between gap-4"},co={for:"FilterFrom",class:"flex items-center w-full"},uo=["value","disabled","min","max","step"],ho={for:"FilterTo",class:"flex items-center w-full"},fo=["value","disabled","min","max","step"];function mo(e,t,n,s,r,i){return a.openBlock(),a.createElementBlock("div",lo,[a.createElementVNode("label",co,[a.createElementVNode("input",{id:"FilterFrom",type:"number",class:"vs-filter-range py-2 px-3 block w-full border h-[38px] border-solid border-stone-200 rounded-lg text-sm text-stone-800 placeholder:text-stone-500 focus:z-10 focus:border-blue-600 focus:border-2 focus:ring-blue-500",value:i.minmax.min,disabled:n.disabled,placeholder:"Мін",min:n.min,max:n.max,step:n.step,style:{outline:"none"},onInput:t[0]||(t[0]=o=>i.handleChange(o,"min"))},null,40,uo)]),a.createElementVNode("label",ho,[a.createElementVNode("input",{id:"FilterTo",type:"number",class:"vs-filter-range py-2 px-3 block w-full border border-solid h-[38px] border-stone-200 rounded-lg text-sm text-stone-800 placeholder:text-stone-500 focus:z-10 focus:border-blue-600 focus:border-2 focus:ring-blue-500",value:i.minmax.max,disabled:n.disabled,min:n.min,max:n.max,placeholder:"Макс",step:n.step,style:{outline:"none"},onInput:t[1]||(t[1]=o=>i.handleChange(o,"max"))},null,40,fo)])])}const po=O(oo,[["render",mo]]),yo=a.defineComponent({props:{value:{type:[String,Number],default:()=>""},label:{type:[String,Number],default:()=>""},modelValue:{type:[Array,String],default:()=>""},disabled:{type:Boolean,default:()=>!1}},emits:["update:modelValue"],data(){return{id:`radio-${Math.floor(Math.random()*1e4)}`}},computed:{modelState:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e)}}}}),go={class:"w-full flex items-center gap-x-3 py-2"},bo=["value","name","id","disabled"],wo=["for"];function ko(e,t,n,s,r,i){return a.openBlock(),a.createElementBlock("div",go,[a.withDirectives(a.createElementVNode("input",{value:e.value,"onUpdate:modelValue":t[0]||(t[0]=o=>e.modelState=o),type:"radio",name:e.id,class:a.normalizeClass(["bg-transparent border border-solid border-gray-200 focus:ring-white focus:ring-offset-0 cursor-pointer",{"!cursor-not-allowed":e.disabled}]),id:e.id,disabled:e.disabled},null,10,bo),[[a.vModelRadio,e.modelState]]),a.createElementVNode("label",{for:e.id,class:a.normalizeClass(["flex flex-1 items-center gap-x-3 cursor-pointer text-sm text-gray-800",{"!cursor-not-allowed":e.disabled}])},[a.renderSlot(e.$slots,"default",{},()=>[a.createTextVNode(a.toDisplayString(e.label),1)])],10,wo)])}const _o={components:{VsRadio:O(yo,[["render",ko]])},props:{options:{type:Array,default:()=>[]},modelValue:{type:[Boolean,Array],default:({options:e})=>e.length>1?[]:!1},disabled:{type:Boolean,default:()=>!1}},data(){return{}},computed:{value:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e)}}},methods:{optionValue(e){return e.id===null||e.id===void 0?"null":e.id},optionLabel(e){return(e==null?void 0:e.text)||e},notLastChild(e){return this.options.length-1!==e}}},So={class:"flex flex-col gap-y-2"};function Do(e,t,n,s,r,i){const o=a.resolveComponent("VsRadio");return a.openBlock(),a.createElementBlock("div",So,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.options,l=>(a.openBlock(),a.createBlock(o,{modelValue:i.value,"onUpdate:modelValue":t[0]||(t[0]=d=>i.value=d),class:"!py-0",label:i.optionLabel(l),value:i.optionValue(l),key:l.id,disabled:n.disabled},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(i.optionLabel(l)),1)]),_:2},1032,["modelValue","label","value","disabled"]))),128))])}const xo=O(_o,[["render",Do]]),Eo={props:{content:{type:String,default:()=>""},position:{type:String,default:()=>"top"}},data(){return{tooltipVisible:!1}},methods:{showTooltip(){this.tooltipVisible=!0},hideTooltip(){this.tooltipVisible=!1},getTooltipPosition(){switch(this.position){case"left":return"tooltip-left";case"right":return"tooltip-right";case"bottom":return"tooltip-bottom";default:return"tooltip-top"}}}},Vo=a.createElementVNode("button",null,"Hover Me",-1);function Co(e,t,n,s,r,i){return a.openBlock(),a.createElementBlock("div",{onMouseenter:t[0]||(t[0]=(...o)=>i.showTooltip&&i.showTooltip(...o)),onMouseleave:t[1]||(t[1]=(...o)=>i.hideTooltip&&i.hideTooltip(...o)),class:"vs-tooltip relative self-center cursor-pointer"},[a.renderSlot(e.$slots,"reference",{},()=>[Vo]),r.tooltipVisible?(a.openBlock(),a.createElementBlock("span",{key:0,class:a.normalizeClass(["vs-tooltip__content inline-block absolute max-w-md z-10 py-1 px-2 bg-white text-xs font-medium text-black rounded-md border border-[#dcdfe6]",i.getTooltipPosition()])},a.toDisplayString(n.content),3)):a.createCommentVNode("",!0)],32)}const Oo=O(Eo,[["render",Co]]),Mo=a.defineComponent({props:{isOpen:{type:Boolean,default:()=>!1},placement:{type:String,default:"right"},gap:{type:Number,default:8},width:{type:[String,Number],default:""},disabled:{type:Boolean,default:!1}},data(){return{isVisible:this.isOpen}},mounted(){window.addEventListener("click",this.handleOutsideClick),window.addEventListener("popstate",this.handleBrowserBackButton)},beforeUnmount(){window.removeEventListener("click",this.handleOutsideClick),window.removeEventListener("popstate",this.handleBrowserBackButton)},watch:{isVisible(e){e?(window.addEventListener("scroll",this.getSettings),window.addEventListener("resize",this.getSettings),this.getSettings()):(window.removeEventListener("scroll",this.getSettings),window.removeEventListener("resize",this.getSettings))}},methods:{getSettings(){this.$nextTick(()=>{const{placement:e}=this,{contentPop:t,popoverRef:n}=this.$refs,s=t==null?void 0:t.getBoundingClientRect(),r=n==null?void 0:n.getBoundingClientRect();if(r&&s&&t){let i,o;switch(e){case"top":i=r.top-s.height-this.gap,o=r.left-s.width/2+r.width/2;break;case"bottom":i=r.bottom+this.gap,o=r.left-s.width/2+r.width/2;break;case"left":i=r.top-s.height/2+r.height/2,o=r.left-s.width-this.gap;break;case"right":i=r.top-s.height/2+r.height/2,o=r.right+this.gap;break;case"top-right":i=r.top-s.height-this.gap,o=r.right-s.width;break;case"top-left":i=r.top-s.height-this.gap,o=r.left;break;case"bottom-right":i=r.bottom+this.gap,o=r.right-s.width;break;case"bottom-left":i=r.bottom+this.gap,o=r.left;break}t instanceof HTMLElement&&(t.style.top=`${i}px`,t.style.left=`${o}px`,t.style.position="fixed")}})},togglePopover(){this.isVisible=!this.isVisible,this.getSettings()},handleOutsideClick(e){var s,r;if(!e){this.isVisible=!1;return}const t=(s=this.$refs)==null?void 0:s.popoverRef,n=(r=this.$refs)==null?void 0:r.contentPop;t&&t.contains(e.target)||n&&!n.contains(e.target)&&(this.isVisible=!1)},handleBrowserBackButton(){this.isVisible&&(this.isVisible=!1)}}}),No={ref:"popover",class:"vs-popover"},$o={class:"text-center"},To=a.createElementVNode("button",null,"Click me!",-1),Bo={class:"py-2 px-4 w-full text-sm text-stone-800 bg-white shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-lg focus:outline-none focus:bg-stone-100 after:h-4 after:absolute after:-bottom-4 after:start-0 after:w-full before:h-4 before:absolute before:-top-4 before:start-0 before:w-full"},Po=a.createElementVNode("span",null,"Popover content",-1);function Fo(e,t,n,s,r,i){return a.openBlock(),a.createElementBlock("div",No,[a.createElementVNode("div",$o,[a.createElementVNode("div",{ref:"popoverRef",onClick:t[0]||(t[0]=(...o)=>e.togglePopover&&e.togglePopover(...o)),class:a.normalizeClass({"pointer-events-none":e.disabled})},[a.renderSlot(e.$slots,"reference",{},()=>[To])],2),(a.openBlock(),a.createBlock(a.Teleport,{to:"body"},[a.createVNode(a.Transition,{name:"fade"},{default:a.withCtx(()=>[a.withDirectives(a.createElementVNode("div",{class:a.normalizeClass(["vsTailwind vs-popover__content",e.placement]),ref:"contentPop",style:a.normalizeStyle({width:e.width?e.width+"px":"fit-content",zIndex:10002})},[a.createElementVNode("div",Bo,[a.renderSlot(e.$slots,"default",{},()=>[Po])])],6),[[a.vShow,e.isVisible]])]),_:3})]))])],512)}const rs=O(Mo,[["render",Fo]]),Lo=a.defineComponent({components:{VsTooltip:Oo,VsPopover:rs},props:{modelValue:{type:Array,default:()=>[]},options:{type:Array,default:()=>null},maxVisible:{type:Number,default:()=>6},disabled:{type:Boolean,default:()=>!1}},computed:{value:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e)}},mainList(){return this.options.slice(0,this.maxVisible)},extraList(){return this.options.slice(this.maxVisible)}},methods:{handleSelect(e){this.disabled||(this.isActiveItem(e)?this.$emit("update:modelValue",this.value.filter(t=>t!==e)):this.$emit("update:modelValue",this.value.concat(e)))},isActiveItem(e){return this.value.includes(e)},getStyles(e){return this.disabled?"cursor-not-allowed":e==="main"?"hover:z-10":"hover:bg-gray-200"}},watch:{value:{deep:!0,handler(){this.value||(this.value=[])}}}}),Yo={class:"flex [&>:not(:first-of-type)]:-ml-3"},Ro=["onClick"],Ao=["src","alt"],vo={class:"w-12 h-12 rounded-full bg-gray-400 text-white"},Io={class:"flex flex-col"},Uo=["onClick"],Wo={class:"flex items-center gap-2"},jo=["src","alt"];function Ho(e,t,n,s,r,i){const o=a.resolveComponent("VsTooltip"),l=a.resolveComponent("VsPopover");return a.openBlock(),a.createElementBlock("div",Yo,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.mainList,d=>(a.openBlock(),a.createElementBlock("button",{key:d.id,class:a.normalizeClass(["w-12 h-12 rounded-full relative",e.getStyles("main")]),onClick:c=>e.handleSelect(d.name)},[a.createVNode(o,{content:d.name},{reference:a.withCtx(()=>[a.createElementVNode("img",{class:a.normalizeClass(["w-12 h-12 object-cover rounded-full border-2 p-[2px] bg-white",{"!border-blue-500":e.isActiveItem(d.name)}]),src:d.img,alt:d.name},null,10,Ao)]),_:2},1032,["content"])],10,Ro))),128)),e.extraList.length>0?(a.openBlock(),a.createBlock(l,{key:0,placement:"bottom-left"},{reference:a.withCtx(()=>[a.createElementVNode("button",vo,a.toDisplayString(`+${e.extraList.length}`),1)]),default:a.withCtx(()=>[a.createElementVNode("div",Io,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.extraList,d=>(a.openBlock(),a.createElementBlock("button",{key:d.id,class:a.normalizeClass(["p-2 rounded",e.getStyles("extra")]),onClick:c=>e.handleSelect(d.name)},[a.createElementVNode("div",Wo,[a.createElementVNode("img",{class:a.normalizeClass(["w-10 h-10 rounded-full p-[2px] bg-white border-2",{"!border-blue-500":e.isActiveItem(d.name)}]),src:d.img,alt:d.name},null,10,jo),a.createElementVNode("p",null,a.toDisplayString(d.name),1)])],10,Uo))),128))])]),_:1})):a.createCommentVNode("",!0)])}const zo=O(Lo,[["render",Ho]]),qo=a.defineComponent({props:{total:{type:Number,default:()=>0},pageSize:{type:Number,default:()=>10},maxPages:{type:Number,default:()=>10},defaultPage:{type:Number,default:()=>0}},data(){return{page:1,pages:[]}},watch:{total:{immediate:!0,handler(){this.initPages()}}},computed:{pagesCount(){return Math.ceil(this.total/this.pageSize)},disableNextClick(){return this.page>=this.pagesCount},disablePrevClick(){return this.page<=1},firstPageVisible(){return this.pages.includes(1)},lastPageVisible(){return this.pages.includes(this.pagesCount)},halfOfPagesIndex(){return Math.floor(this.maxPerPage/2)},maxPerPage(){return this.maxPagesthis.pagesCount?this.pagesCount:e?1:this.defaultPage,n=[];for(let s=0;sn))for(;e!==this.pages[this.halfOfPagesIndex]&&(!this.lastPageVisible||en);)this.pages=this.pages.map(s=>s+(this.halfOfPagesIndex>t?-1:1))}}}),Go={class:"flex items-center gap-x-1"},Zo=[a.createElementVNode("svg",{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"},[a.createElementVNode("path",{d:"m15 18-6-6 6-6"})],-1),a.createElementVNode("span",{"aria-hidden":"true",class:"sr-only"},"Previous",-1)],Jo={class:"flex items-center gap-x-1"},Ko=["onClick"],Xo=[a.createElementVNode("span",{"aria-hidden":"true",class:"sr-only"},"Next",-1),a.createElementVNode("svg",{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"},[a.createElementVNode("path",{d:"m9 18 6-6-6-6"})],-1)];function Qo(e,t,n,s,r,i){return a.openBlock(),a.createElementBlock("nav",Go,[a.createElementVNode("button",{type:"button",onClick:t[0]||(t[0]=(...o)=>e.handleClickPrev&&e.handleClickPrev(...o)),class:a.normalizeClass([{"opacity-30 pointer-events-none cursor-not-allowed":e.disablePrevClick},"min-h-[30px] min-w-[30px] py-2 px-2.5 inline-flex justify-center items-center gap-x-2 text-sm rounded-lg border border-white hover:border-stone-200 bg-white text-stone-800 hover:shadow-sm hover:bg-stone-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-50"])},Zo,2),a.createElementVNode("div",Jo,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.pages,o=>(a.openBlock(),a.createElementBlock("button",{key:o,type:"button",onClick:l=>e.setCurrentPage(o),class:a.normalizeClass(o===e.page?"min-h-[30px] min-w-[30px] max-w-fit flex justify-center items-center border border-gray-200 text-gray-600 py-2 px-3 text-sm rounded-lg focus:outline-none focus:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none":" min-h-[30px] min-w-[30px] max-w-fit flex justify-center items-center border border-transparent text-gray-500 hover:bg-gray-100 py-2 px-3 text-sm rounded-lg focus:outline-none focus:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none")},a.toDisplayString(o),11,Ko))),128))]),a.createElementVNode("button",{type:"button",onClick:t[1]||(t[1]=(...o)=>e.handleClickNext&&e.handleClickNext(...o)),class:a.normalizeClass([{"opacity-30 pointer-events-none cursor-not-allowed":e.disableNextClick},"min-h-[30px] min-w-[30px] py-2 px-2.5 inline-flex justify-center items-center gap-x-2 text-sm rounded-lg border border-white hover:border-stone-200 bg-white text-stone-800 hover:shadow-sm hover:bg-stone-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-50"])},Xo,2)])}const el=O(qo,[["render",Qo]]),tl=a.defineComponent({components:{VsPagination:el},props:{modelValue:{type:[String],default:()=>"1"},origin:{type:Object,default:()=>null}},data(){return{currentPage:0}},inject:["paginationTotal","pageSize"],computed:{total(){return Number(this.paginationTotal)},maxPages(){return this.origin.maxPages},pageMaxSize(){var t;return((t=this==null?void 0:this.origin)==null?void 0:t.pageSize)||this.pageSize||10},defaultPage(){return Number(this.modelValue)},originHasNoTeleport(){return!this.origin.teleport}},watch:{total(){this.handlePageChange(1)}},methods:{handlePageChange(e){if(this.currentPage){if(this.modelValue==="1"&&e===1)return;this.$emit("update:modelValue",`${e||1}`)}this.currentPage=e}}});function nl(e,t,n,s,r,i){const o=a.resolveComponent("VsPagination");return e.originHasNoTeleport?(a.openBlock(),a.createBlock(o,{key:0,total:e.total,maxPages:e.maxPages,pageSize:e.pageMaxSize,defaultPage:e.defaultPage,onPageChange:e.handlePageChange,class:"vsTailwind d-flex"},null,8,["total","maxPages","pageSize","defaultPage","onPageChange"])):(a.openBlock(),a.createBlock(a.Teleport,{key:1,to:e.origin.teleport},[a.createVNode(o,{total:e.total,defaultPage:e.defaultPage,onPageChange:e.handlePageChange,pageSize:e.pageMaxSize},null,8,["total","defaultPage","onPageChange","pageSize"])],8,["to"]))}const sl=O(tl,[["render",nl]]);//! moment.js //! version : 2.30.1 //! authors : Tim Wood, Iskren Chernev, Moment.js contributors //! license : MIT //! momentjs.com var as;function p(){return as.apply(null,arguments)}function rl(e){as=e}function z(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function be(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function V(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function It(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(V(e,t))return!1;return!0}function A(e){return e===void 0}function ae(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function Re(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function is(e,t){var n=[],s,r=e.length;for(s=0;s>>0,s;for(s=0;s0)for(n=0;n=0;return(i?n?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+s}var Zt=/(\[[^\[]*\])|(\\)?([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,at=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Jt={},Ee={};function g(e,t,n,s){var r=s;typeof s=="string"&&(r=function(){return this[s]()}),e&&(Ee[e]=r),t&&(Ee[t[0]]=function(){return ne(r.apply(this,arguments),t[1],t[2])}),n&&(Ee[n]=function(){return this.localeData().ordinal(r.apply(this,arguments),e)})}function dl(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function cl(e){var t=e.match(Zt),n,s;for(n=0,s=t.length;n=0&&at.test(e);)e=e.replace(at,s),at.lastIndex=0,n-=1;return e}var ul={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 hl(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(Zt).map(function(s){return s==="MMMM"||s==="MM"||s==="DD"||s==="dddd"?s.slice(1):s}).join(""),this._longDateFormat[e])}var fl="Invalid date";function ml(){return this._invalidDate}var pl="%d",yl=/\d{1,2}/;function gl(e){return this._ordinal.replace("%d",e)}var bl={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 wl(e,t,n,s){var r=this._relativeTime[n];return te(r)?r(e,t,n,s):r.replace(/%d/i,e)}function kl(e,t){var n=this._relativeTime[e>0?"future":"past"];return te(n)?n(t):n.replace(/%s/i,t)}var hs={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 j(e){return typeof e=="string"?hs[e]||hs[e.toLowerCase()]:void 0}function Kt(e){var t={},n,s;for(s in e)V(e,s)&&(n=j(s),n&&(t[n]=e[s]));return t}var _l={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 Sl(e){var t=[],n;for(n in e)V(e,n)&&t.push({unit:n,priority:_l[n]});return t.sort(function(s,r){return s.priority-r.priority}),t}var fs=/\d/,v=/\d\d/,ms=/\d{3}/,Xt=/\d{4}/,ot=/[+-]?\d{6}/,N=/\d\d?/,ps=/\d\d\d\d?/,ys=/\d\d\d\d\d\d?/,lt=/\d{1,3}/,Qt=/\d{1,4}/,dt=/[+-]?\d{1,6}/,Ve=/\d+/,ct=/[+-]?\d+/,Dl=/Z|[+-]\d\d:?\d\d/gi,ut=/Z|[+-]\d\d(?::?\d\d)?/gi,xl=/[+-]?\d+(\.\d{1,3})?/,ve=/[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,Ce=/^[1-9]\d?/,en=/^([1-9]\d|\d)/,ht;ht={};function y(e,t,n){ht[e]=te(t)?t:function(s,r){return s&&n?n:t}}function El(e,t){return V(ht,e)?ht[e](t._strict,t._locale):new RegExp(Vl(e))}function Vl(e){return ie(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,n,s,r,i){return n||s||r||i}))}function ie(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function H(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function D(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=H(t)),n}var tn={};function M(e,t){var n,s=t,r;for(typeof e=="string"&&(e=[e]),ae(t)&&(s=function(i,o){o[t]=D(i)}),r=e.length,n=0;n68?1900:2e3)};var gs=Oe("FullYear",!0);function Nl(){return ft(this.year())}function Oe(e,t){return function(n){return n!=null?(bs(this,e,n),p.updateOffset(this,t),this):We(this,e)}}function We(e,t){if(!e.isValid())return NaN;var n=e._d,s=e._isUTC;switch(t){case"Milliseconds":return s?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return s?n.getUTCSeconds():n.getSeconds();case"Minutes":return s?n.getUTCMinutes():n.getMinutes();case"Hours":return s?n.getUTCHours():n.getHours();case"Date":return s?n.getUTCDate():n.getDate();case"Day":return s?n.getUTCDay():n.getDay();case"Month":return s?n.getUTCMonth():n.getMonth();case"FullYear":return s?n.getUTCFullYear():n.getFullYear();default:return NaN}}function bs(e,t,n){var s,r,i,o,l;if(!(!e.isValid()||isNaN(n))){switch(s=e._d,r=e._isUTC,t){case"Milliseconds":return void(r?s.setUTCMilliseconds(n):s.setMilliseconds(n));case"Seconds":return void(r?s.setUTCSeconds(n):s.setSeconds(n));case"Minutes":return void(r?s.setUTCMinutes(n):s.setMinutes(n));case"Hours":return void(r?s.setUTCHours(n):s.setHours(n));case"Date":return void(r?s.setUTCDate(n):s.setDate(n));case"FullYear":break;default:return}i=n,o=e.month(),l=e.date(),l=l===29&&o===1&&!ft(i)?28:l,r?s.setUTCFullYear(i,o,l):s.setFullYear(i,o,l)}}function $l(e){return e=j(e),te(this[e])?this[e]():this}function Tl(e,t){if(typeof e=="object"){e=Kt(e);var n=Sl(e),s,r=n.length;for(s=0;s=0?(l=new Date(e+400,t,n,s,r,i,o),isFinite(l.getFullYear())&&l.setFullYear(e)):l=new Date(e,t,n,s,r,i,o),l}function je(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function mt(e,t,n){var s=7+t-n,r=(7+je(e,0,s).getUTCDay()-t)%7;return-r+s-1}function xs(e,t,n,s,r){var i=(7+n-s)%7,o=mt(e,s,r),l=1+7*(t-1)+i+o,d,c;return l<=0?(d=e-1,c=Ue(d)+l):l>Ue(e)?(d=e+1,c=l-Ue(e)):(d=e,c=l),{year:d,dayOfYear:c}}function He(e,t,n){var s=mt(e.year(),t,n),r=Math.floor((e.dayOfYear()-s-1)/7)+1,i,o;return r<1?(o=e.year()-1,i=r+de(o,t,n)):r>de(e.year(),t,n)?(i=r-de(e.year(),t,n),o=e.year()+1):(o=e.year(),i=r),{week:i,year:o}}function de(e,t,n){var s=mt(e,t,n),r=mt(e+1,t,n);return(Ue(e)-s+r)/7}g("w",["ww",2],"wo","week"),g("W",["WW",2],"Wo","isoWeek"),y("w",N,Ce),y("ww",N,v),y("W",N,Ce),y("WW",N,v),Ie(["w","ww","W","WW"],function(e,t,n,s){t[s.substr(0,1)]=D(e)});function Hl(e){return He(e,this._week.dow,this._week.doy).week}var zl={dow:0,doy:6};function ql(){return this._week.dow}function Gl(){return this._week.doy}function Zl(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function Jl(e){var t=He(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}g("d",0,"do","day"),g("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),g("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),g("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),g("e",0,0,"weekday"),g("E",0,0,"isoWeekday"),y("d",N),y("e",N),y("E",N),y("dd",function(e,t){return t.weekdaysMinRegex(e)}),y("ddd",function(e,t){return t.weekdaysShortRegex(e)}),y("dddd",function(e,t){return t.weekdaysRegex(e)}),Ie(["dd","ddd","dddd"],function(e,t,n,s){var r=n._locale.weekdaysParse(e,s,n._strict);r!=null?t.d=r:_(n).invalidWeekday=e}),Ie(["d","e","E"],function(e,t,n,s){t[s]=D(e)});function Kl(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function Xl(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function sn(e,t){return e.slice(t,7).concat(e.slice(0,t))}var Ql="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Es="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),ed="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),td=ve,nd=ve,sd=ve;function rd(e,t){var n=z(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?sn(n,this._week.dow):e?n[e.day()]:n}function ad(e){return e===!0?sn(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function id(e){return e===!0?sn(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function od(e,t,n){var s,r,i,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)i=ee([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(i,"").toLocaleLowerCase();return n?t==="dddd"?(r=P.call(this._weekdaysParse,o),r!==-1?r:null):t==="ddd"?(r=P.call(this._shortWeekdaysParse,o),r!==-1?r:null):(r=P.call(this._minWeekdaysParse,o),r!==-1?r:null):t==="dddd"?(r=P.call(this._weekdaysParse,o),r!==-1||(r=P.call(this._shortWeekdaysParse,o),r!==-1)?r:(r=P.call(this._minWeekdaysParse,o),r!==-1?r:null)):t==="ddd"?(r=P.call(this._shortWeekdaysParse,o),r!==-1||(r=P.call(this._weekdaysParse,o),r!==-1)?r:(r=P.call(this._minWeekdaysParse,o),r!==-1?r:null)):(r=P.call(this._minWeekdaysParse,o),r!==-1||(r=P.call(this._weekdaysParse,o),r!==-1)?r:(r=P.call(this._shortWeekdaysParse,o),r!==-1?r:null))}function ld(e,t,n){var s,r,i;if(this._weekdaysParseExact)return od.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(r=ee([2e3,1]).day(s),n&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(r,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(r,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(r,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[s]||(i="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[s]=new RegExp(i.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[s].test(e))return s;if(n&&t==="ddd"&&this._shortWeekdaysParse[s].test(e))return s;if(n&&t==="dd"&&this._minWeekdaysParse[s].test(e))return s;if(!n&&this._weekdaysParse[s].test(e))return s}}function dd(e){if(!this.isValid())return e!=null?this:NaN;var t=We(this,"Day");return e!=null?(e=Kl(e,this.localeData()),this.add(e-t,"d")):t}function cd(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function ud(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=Xl(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function hd(e){return this._weekdaysParseExact?(V(this,"_weekdaysRegex")||rn.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(V(this,"_weekdaysRegex")||(this._weekdaysRegex=td),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function fd(e){return this._weekdaysParseExact?(V(this,"_weekdaysRegex")||rn.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(V(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=nd),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function md(e){return this._weekdaysParseExact?(V(this,"_weekdaysRegex")||rn.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(V(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=sd),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function rn(){function e(f,h){return h.length-f.length}var t=[],n=[],s=[],r=[],i,o,l,d,c;for(i=0;i<7;i++)o=ee([2e3,1]).day(i),l=ie(this.weekdaysMin(o,"")),d=ie(this.weekdaysShort(o,"")),c=ie(this.weekdays(o,"")),t.push(l),n.push(d),s.push(c),r.push(l),r.push(d),r.push(c);t.sort(e),n.sort(e),s.sort(e),r.sort(e),this._weekdaysRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function an(){return this.hours()%12||12}function pd(){return this.hours()||24}g("H",["HH",2],0,"hour"),g("h",["hh",2],0,an),g("k",["kk",2],0,pd),g("hmm",0,0,function(){return""+an.apply(this)+ne(this.minutes(),2)}),g("hmmss",0,0,function(){return""+an.apply(this)+ne(this.minutes(),2)+ne(this.seconds(),2)}),g("Hmm",0,0,function(){return""+this.hours()+ne(this.minutes(),2)}),g("Hmmss",0,0,function(){return""+this.hours()+ne(this.minutes(),2)+ne(this.seconds(),2)});function Vs(e,t){g(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}Vs("a",!0),Vs("A",!1);function Cs(e,t){return t._meridiemParse}y("a",Cs),y("A",Cs),y("H",N,en),y("h",N,Ce),y("k",N,Ce),y("HH",N,v),y("hh",N,v),y("kk",N,v),y("hmm",ps),y("hmmss",ys),y("Hmm",ps),y("Hmmss",ys),M(["H","HH"],L),M(["k","kk"],function(e,t,n){var s=D(e);t[L]=s===24?0:s}),M(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),M(["h","hh"],function(e,t,n){t[L]=D(e),_(n).bigHour=!0}),M("hmm",function(e,t,n){var s=e.length-2;t[L]=D(e.substr(0,s)),t[G]=D(e.substr(s)),_(n).bigHour=!0}),M("hmmss",function(e,t,n){var s=e.length-4,r=e.length-2;t[L]=D(e.substr(0,s)),t[G]=D(e.substr(s,2)),t[le]=D(e.substr(r)),_(n).bigHour=!0}),M("Hmm",function(e,t,n){var s=e.length-2;t[L]=D(e.substr(0,s)),t[G]=D(e.substr(s))}),M("Hmmss",function(e,t,n){var s=e.length-4,r=e.length-2;t[L]=D(e.substr(0,s)),t[G]=D(e.substr(s,2)),t[le]=D(e.substr(r))});function yd(e){return(e+"").toLowerCase().charAt(0)==="p"}var gd=/[ap]\.?m?\.?/i,bd=Oe("Hours",!0);function wd(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var Os={calendar:ol,longDateFormat:ul,invalidDate:fl,ordinal:pl,dayOfMonthOrdinalParse:yl,relativeTime:bl,months:Pl,monthsShort:ws,week:zl,weekdays:Ql,weekdaysMin:ed,weekdaysShort:Es,meridiemParse:gd},T={},ze={},qe;function kd(e,t){var n,s=Math.min(e.length,t.length);for(n=0;n0;){if(r=pt(i.slice(0,n).join("-")),r)return r;if(s&&s.length>=n&&kd(i,s)>=n-1)break;n--}t++}return qe}function Sd(e){return!!(e&&e.match("^[^/\\\\]*$"))}function pt(e){var t=null,n;if(T[e]===void 0&&typeof module<"u"&&module&&module.exports&&Sd(e))try{t=qe._abbr,n=require,n("./locale/"+e),ye(t)}catch{T[e]=null}return T[e]}function ye(e,t){var n;return e&&(A(t)?n=ce(e):n=on(e,t),n?qe=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),qe._abbr}function on(e,t){if(t!==null){var n,s=Os;if(t.abbr=e,T[e]!=null)cs("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."),s=T[e]._config;else if(t.parentLocale!=null)if(T[t.parentLocale]!=null)s=T[t.parentLocale]._config;else if(n=pt(t.parentLocale),n!=null)s=n._config;else return ze[t.parentLocale]||(ze[t.parentLocale]=[]),ze[t.parentLocale].push({name:e,config:t}),null;return T[e]=new qt(zt(s,t)),ze[e]&&ze[e].forEach(function(r){on(r.name,r.config)}),ye(e),T[e]}else return delete T[e],null}function Dd(e,t){if(t!=null){var n,s,r=Os;T[e]!=null&&T[e].parentLocale!=null?T[e].set(zt(T[e]._config,t)):(s=pt(e),s!=null&&(r=s._config),t=zt(r,t),s==null&&(t.abbr=e),n=new qt(t),n.parentLocale=T[e],T[e]=n),ye(e)}else T[e]!=null&&(T[e].parentLocale!=null?(T[e]=T[e].parentLocale,e===ye()&&ye(e)):T[e]!=null&&delete T[e]);return T[e]}function ce(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return qe;if(!z(e)){if(t=pt(e),t)return t;e=[e]}return _d(e)}function xd(){return Gt(T)}function ln(e){var t,n=e._a;return n&&_(e).overflow===-2&&(t=n[oe]<0||n[oe]>11?oe:n[se]<1||n[se]>nn(n[R],n[oe])?se:n[L]<0||n[L]>24||n[L]===24&&(n[G]!==0||n[le]!==0||n[we]!==0)?L:n[G]<0||n[G]>59?G:n[le]<0||n[le]>59?le:n[we]<0||n[we]>999?we:-1,_(e)._overflowDayOfYear&&(tse)&&(t=se),_(e)._overflowWeeks&&t===-1&&(t=Ol),_(e)._overflowWeekday&&t===-1&&(t=Ml),_(e).overflow=t),e}var Ed=/^\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)?)?$/,Vd=/^\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)?)?$/,Cd=/Z|[+-]\d\d(?::?\d\d)?/,yt=[["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]],dn=[["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/]],Od=/^\/?Date\((-?\d+)/i,Md=/^(?:(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}))$/,Nd={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 Ns(e){var t,n,s=e._i,r=Ed.exec(s)||Vd.exec(s),i,o,l,d,c=yt.length,f=dn.length;if(r){for(_(e).iso=!0,t=0,n=c;tUe(o)||e._dayOfYear===0)&&(_(e)._overflowDayOfYear=!0),n=je(o,0,e._dayOfYear),e._a[oe]=n.getUTCMonth(),e._a[se]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=s[t]=r[t];for(;t<7;t++)e._a[t]=s[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[L]===24&&e._a[G]===0&&e._a[le]===0&&e._a[we]===0&&(e._nextDay=!0,e._a[L]=0),e._d=(e._useUTC?je:jl).apply(null,s),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[L]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==i&&(_(e).weekdayMismatch=!0)}}function Rd(e){var t,n,s,r,i,o,l,d,c;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(i=1,o=4,n=Me(t.GG,e._a[R],He($(),1,4).year),s=Me(t.W,1),r=Me(t.E,1),(r<1||r>7)&&(d=!0)):(i=e._locale._week.dow,o=e._locale._week.doy,c=He($(),i,o),n=Me(t.gg,e._a[R],c.year),s=Me(t.w,c.week),t.d!=null?(r=t.d,(r<0||r>6)&&(d=!0)):t.e!=null?(r=t.e+i,(t.e<0||t.e>6)&&(d=!0)):r=i),s<1||s>de(n,i,o)?_(e)._overflowWeeks=!0:d!=null?_(e)._overflowWeekday=!0:(l=xs(n,s,r,i,o),e._a[R]=l.year,e._dayOfYear=l.dayOfYear)}p.ISO_8601=function(){},p.RFC_2822=function(){};function un(e){if(e._f===p.ISO_8601){Ns(e);return}if(e._f===p.RFC_2822){$s(e);return}e._a=[],_(e).empty=!0;var t=""+e._i,n,s,r,i,o,l=t.length,d=0,c,f;for(r=us(e._f,e._locale).match(Zt)||[],f=r.length,n=0;n0&&_(e).unusedInput.push(o),t=t.slice(t.indexOf(s)+s.length),d+=s.length),Ee[i]?(s?_(e).empty=!1:_(e).unusedTokens.push(i),Cl(i,s,e)):e._strict&&!s&&_(e).unusedTokens.push(i);_(e).charsLeftOver=l-d,t.length>0&&_(e).unusedInput.push(t),e._a[L]<=12&&_(e).bigHour===!0&&e._a[L]>0&&(_(e).bigHour=void 0),_(e).parsedDateParts=e._a.slice(0),_(e).meridiem=e._meridiem,e._a[L]=Ad(e._locale,e._a[L],e._meridiem),c=_(e).era,c!==null&&(e._a[R]=e._locale.erasConvertYear(c,e._a[R])),cn(e),ln(e)}function Ad(e,t,n){var s;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(s=e.isPM(n),s&&t<12&&(t+=12),!s&&t===12&&(t=0)),t)}function vd(e){var t,n,s,r,i,o,l=!1,d=e._f.length;if(d===0){_(e).invalidFormat=!0,e._d=new Date(NaN);return}for(r=0;rthis?this:e:rt()});function Ps(e,t){var n,s;if(t.length===1&&z(t[0])&&(t=t[0]),!t.length)return $();for(n=t[0],s=1;sthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function oc(){if(!A(this._isDSTShifted))return this._isDSTShifted;var e={},t;return Ht(e,this),e=Ts(e),e._a?(t=e._isUTC?ee(e._a):$(e._a),this._isDSTShifted=this.isValid()&&Xd(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function lc(){return this.isValid()?!this._isUTC:!1}function dc(){return this.isValid()?this._isUTC:!1}function Ls(){return this.isValid()?this._isUTC&&this._offset===0:!1}var cc=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,uc=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Z(e,t){var n=e,s=null,r,i,o;return bt(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:ae(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(s=cc.exec(e))?(r=s[1]==="-"?-1:1,n={y:0,d:D(s[se])*r,h:D(s[L])*r,m:D(s[G])*r,s:D(s[le])*r,ms:D(hn(s[we]*1e3))*r}):(s=uc.exec(e))?(r=s[1]==="-"?-1:1,n={y:ke(s[2],r),M:ke(s[3],r),w:ke(s[4],r),d:ke(s[5],r),h:ke(s[6],r),m:ke(s[7],r),s:ke(s[8],r)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(o=hc($(n.from),$(n.to)),n={},n.ms=o.milliseconds,n.M=o.months),i=new gt(n),bt(e)&&V(e,"_locale")&&(i._locale=e._locale),bt(e)&&V(e,"_isValid")&&(i._isValid=e._isValid),i}Z.fn=gt.prototype,Z.invalid=Kd;function ke(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Ys(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function hc(e,t){var n;return e.isValid()&&t.isValid()?(t=mn(t,e),e.isBefore(t)?n=Ys(e,t):(n=Ys(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Rs(e,t){return function(n,s){var r,i;return s!==null&&!isNaN(+s)&&(cs(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=s,s=i),r=Z(n,s),As(this,r,e),this}}function As(e,t,n,s){var r=t._milliseconds,i=hn(t._days),o=hn(t._months);e.isValid()&&(s=s??!0,o&&_s(e,We(e,"Month")+o*n),i&&bs(e,"Date",We(e,"Date")+i*n),r&&e._d.setTime(e._d.valueOf()+r*n),s&&p.updateOffset(e,i||o))}var fc=Rs(1,"add"),mc=Rs(-1,"subtract");function vs(e){return typeof e=="string"||e instanceof String}function pc(e){return q(e)||Re(e)||vs(e)||ae(e)||gc(e)||yc(e)||e===null||e===void 0}function yc(e){var t=be(e)&&!It(e),n=!1,s=["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,i,o=s.length;for(r=0;rn.valueOf():n.valueOf()9999?it(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):te(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",it(n,"Z")):it(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function $c(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,s,r,i;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',s=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",r="-MM-DD[T]HH:mm:ss.SSS",i=t+'[")]',this.format(n+s+r+i)}function Tc(e){e||(e=this.isUtc()?p.defaultFormatUtc:p.defaultFormat);var t=it(this,e);return this.localeData().postformat(t)}function Bc(e,t){return this.isValid()&&(q(e)&&e.isValid()||$(e).isValid())?Z({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Pc(e){return this.from($(),e)}function Fc(e,t){return this.isValid()&&(q(e)&&e.isValid()||$(e).isValid())?Z({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Lc(e){return this.to($(),e)}function Is(e){var t;return e===void 0?this._locale._abbr:(t=ce(e),t!=null&&(this._locale=t),this)}var Us=W("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function Ws(){return this._locale}var kt=1e3,Ne=60*kt,_t=60*Ne,js=(365*400+97)*24*_t;function $e(e,t){return(e%t+t)%t}function Hs(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-js:new Date(e,t,n).valueOf()}function zs(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-js:Date.UTC(e,t,n)}function Yc(e){var t,n;if(e=j(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?zs:Hs,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=$e(t+(this._isUTC?0:this.utcOffset()*Ne),_t);break;case"minute":t=this._d.valueOf(),t-=$e(t,Ne);break;case"second":t=this._d.valueOf(),t-=$e(t,kt);break}return this._d.setTime(t),p.updateOffset(this,!0),this}function Rc(e){var t,n;if(e=j(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?zs:Hs,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=_t-$e(t+(this._isUTC?0:this.utcOffset()*Ne),_t)-1;break;case"minute":t=this._d.valueOf(),t+=Ne-$e(t,Ne)-1;break;case"second":t=this._d.valueOf(),t+=kt-$e(t,kt)-1;break}return this._d.setTime(t),p.updateOffset(this,!0),this}function Ac(){return this._d.valueOf()-(this._offset||0)*6e4}function vc(){return Math.floor(this.valueOf()/1e3)}function Ic(){return new Date(this.valueOf())}function Uc(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Wc(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function jc(){return this.isValid()?this.toISOString():null}function Hc(){return Wt(this)}function zc(){return pe({},_(this))}function qc(){return _(this).overflow}function Gc(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}g("N",0,0,"eraAbbr"),g("NN",0,0,"eraAbbr"),g("NNN",0,0,"eraAbbr"),g("NNNN",0,0,"eraName"),g("NNNNN",0,0,"eraNarrow"),g("y",["y",1],"yo","eraYear"),g("y",["yy",2],0,"eraYear"),g("y",["yyy",3],0,"eraYear"),g("y",["yyyy",4],0,"eraYear"),y("N",yn),y("NN",yn),y("NNN",yn),y("NNNN",au),y("NNNNN",iu),M(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,s){var r=n._locale.erasParse(e,s,n._strict);r?_(n).era=r:_(n).invalidEra=e}),y("y",Ve),y("yy",Ve),y("yyy",Ve),y("yyyy",Ve),y("yo",ou),M(["y","yy","yyy","yyyy"],R),M(["yo"],function(e,t,n,s){var r;n._locale._eraYearOrdinalRegex&&(r=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[R]=n._locale.eraYearOrdinalParse(e,r):t[R]=parseInt(e,10)});function Zc(e,t){var n,s,r,i=this._eras||ce("en")._eras;for(n=0,s=i.length;n=0)return i[s]}function Kc(e,t){var n=e.since<=e.until?1:-1;return t===void 0?p(e.since).year():p(e.since).year()+(t-e.offset)*n}function Xc(){var e,t,n,s=this.localeData().eras();for(e=0,t=s.length;ei&&(t=i),mu.call(this,e,t,n,s,r))}function mu(e,t,n,s,r){var i=xs(e,t,n,s,r),o=je(i.year,0,i.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}g("Q",0,"Qo","quarter"),y("Q",fs),M("Q",function(e,t){t[oe]=(D(e)-1)*3});function pu(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}g("D",["DD",2],"Do","date"),y("D",N,Ce),y("DD",N,v),y("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),M(["D","DD"],se),M("Do",function(e,t){t[se]=D(e.match(N)[0])});var Gs=Oe("Date",!0);g("DDD",["DDDD",3],"DDDo","dayOfYear"),y("DDD",lt),y("DDDD",ms),M(["DDD","DDDD"],function(e,t,n){n._dayOfYear=D(e)});function yu(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}g("m",["mm",2],0,"minute"),y("m",N,en),y("mm",N,v),M(["m","mm"],G);var gu=Oe("Minutes",!1);g("s",["ss",2],0,"second"),y("s",N,en),y("ss",N,v),M(["s","ss"],le);var bu=Oe("Seconds",!1);g("S",0,0,function(){return~~(this.millisecond()/100)}),g(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),g(0,["SSS",3],0,"millisecond"),g(0,["SSSS",4],0,function(){return this.millisecond()*10}),g(0,["SSSSS",5],0,function(){return this.millisecond()*100}),g(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),g(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),g(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),g(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),y("S",lt,fs),y("SS",lt,v),y("SSS",lt,ms);var ge,Zs;for(ge="SSSS";ge.length<=9;ge+="S")y(ge,Ve);function wu(e,t){t[we]=D(("0."+e)*1e3)}for(ge="S";ge.length<=9;ge+="S")M(ge,wu);Zs=Oe("Milliseconds",!1),g("z",0,0,"zoneAbbr"),g("zz",0,0,"zoneName");function ku(){return this._isUTC?"UTC":""}function _u(){return this._isUTC?"Coordinated Universal Time":""}var m=Ae.prototype;m.add=fc,m.calendar=kc,m.clone=_c,m.diff=Oc,m.endOf=Rc,m.format=Tc,m.from=Bc,m.fromNow=Pc,m.to=Fc,m.toNow=Lc,m.get=$l,m.invalidAt=qc,m.isAfter=Sc,m.isBefore=Dc,m.isBetween=xc,m.isSame=Ec,m.isSameOrAfter=Vc,m.isSameOrBefore=Cc,m.isValid=Hc,m.lang=Us,m.locale=Is,m.localeData=Ws,m.max=Hd,m.min=jd,m.parsingFlags=zc,m.set=Tl,m.startOf=Yc,m.subtract=mc,m.toArray=Uc,m.toObject=Wc,m.toDate=Ic,m.toISOString=Nc,m.inspect=$c,typeof Symbol<"u"&&Symbol.for!=null&&(m[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),m.toJSON=jc,m.toString=Mc,m.unix=vc,m.valueOf=Ac,m.creationData=Gc,m.eraName=Xc,m.eraNarrow=Qc,m.eraAbbr=eu,m.eraYear=tu,m.year=gs,m.isLeapYear=Nl,m.weekYear=lu,m.isoWeekYear=du,m.quarter=m.quarters=pu,m.month=Ss,m.daysInMonth=Il,m.week=m.weeks=Zl,m.isoWeek=m.isoWeeks=Jl,m.weeksInYear=hu,m.weeksInWeekYear=fu,m.isoWeeksInYear=cu,m.isoWeeksInISOWeekYear=uu,m.date=Gs,m.day=m.days=dd,m.weekday=cd,m.isoWeekday=ud,m.dayOfYear=yu,m.hour=m.hours=bd,m.minute=m.minutes=gu,m.second=m.seconds=bu,m.millisecond=m.milliseconds=Zs,m.utcOffset=ec,m.utc=nc,m.local=sc,m.parseZone=rc,m.hasAlignedHourOffset=ac,m.isDST=ic,m.isLocal=lc,m.isUtcOffset=dc,m.isUtc=Ls,m.isUTC=Ls,m.zoneAbbr=ku,m.zoneName=_u,m.dates=W("dates accessor is deprecated. Use date instead.",Gs),m.months=W("months accessor is deprecated. Use month instead",Ss),m.years=W("years accessor is deprecated. Use year instead",gs),m.zone=W("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",tc),m.isDSTShifted=W("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",oc);function Su(e){return $(e*1e3)}function Du(){return $.apply(null,arguments).parseZone()}function Js(e){return e}var C=qt.prototype;C.calendar=ll,C.longDateFormat=hl,C.invalidDate=ml,C.ordinal=gl,C.preparse=Js,C.postformat=Js,C.relativeTime=wl,C.pastFuture=kl,C.set=il,C.eras=Zc,C.erasParse=Jc,C.erasConvertYear=Kc,C.erasAbbrRegex=su,C.erasNameRegex=nu,C.erasNarrowRegex=ru,C.months=Yl,C.monthsShort=Rl,C.monthsParse=vl,C.monthsRegex=Wl,C.monthsShortRegex=Ul,C.week=Hl,C.firstDayOfYear=Gl,C.firstDayOfWeek=ql,C.weekdays=rd,C.weekdaysMin=id,C.weekdaysShort=ad,C.weekdaysParse=ld,C.weekdaysRegex=hd,C.weekdaysShortRegex=fd,C.weekdaysMinRegex=md,C.isPM=yd,C.meridiem=wd;function Dt(e,t,n,s){var r=ce(),i=ee().set(s,t);return r[n](i,e)}function Ks(e,t,n){if(ae(e)&&(t=e,e=void 0),e=e||"",t!=null)return Dt(e,t,n,"month");var s,r=[];for(s=0;s<12;s++)r[s]=Dt(e,s,n,"month");return r}function bn(e,t,n,s){typeof e=="boolean"?(ae(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,ae(t)&&(n=t,t=void 0),t=t||"");var r=ce(),i=e?r._week.dow:0,o,l=[];if(n!=null)return Dt(t,(n+i)%7,s,"day");for(o=0;o<7;o++)l[o]=Dt(t,(o+i)%7,s,"day");return l}function xu(e,t){return Ks(e,t,"months")}function Eu(e,t){return Ks(e,t,"monthsShort")}function Vu(e,t,n){return bn(e,t,n,"weekdays")}function Cu(e,t,n){return bn(e,t,n,"weekdaysShort")}function Ou(e,t,n){return bn(e,t,n,"weekdaysMin")}ye("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(e){var t=e%10,n=D(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}}),p.lang=W("moment.lang is deprecated. Use moment.locale instead.",ye),p.langData=W("moment.langData is deprecated. Use moment.localeData instead.",ce);var ue=Math.abs;function Mu(){var e=this._data;return this._milliseconds=ue(this._milliseconds),this._days=ue(this._days),this._months=ue(this._months),e.milliseconds=ue(e.milliseconds),e.seconds=ue(e.seconds),e.minutes=ue(e.minutes),e.hours=ue(e.hours),e.months=ue(e.months),e.years=ue(e.years),this}function Xs(e,t,n,s){var r=Z(t,n);return e._milliseconds+=s*r._milliseconds,e._days+=s*r._days,e._months+=s*r._months,e._bubble()}function Nu(e,t){return Xs(this,e,t,1)}function $u(e,t){return Xs(this,e,t,-1)}function Qs(e){return e<0?Math.floor(e):Math.ceil(e)}function Tu(){var e=this._milliseconds,t=this._days,n=this._months,s=this._data,r,i,o,l,d;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=Qs(wn(n)+t)*864e5,t=0,n=0),s.milliseconds=e%1e3,r=H(e/1e3),s.seconds=r%60,i=H(r/60),s.minutes=i%60,o=H(i/60),s.hours=o%24,t+=H(o/24),d=H(er(t)),n+=d,t-=Qs(wn(d)),l=H(n/12),n%=12,s.days=t,s.months=n,s.years=l,this}function er(e){return e*4800/146097}function wn(e){return e*146097/4800}function Bu(e){if(!this.isValid())return NaN;var t,n,s=this._milliseconds;if(e=j(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+s/864e5,n=this._months+er(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(wn(this._months)),e){case"week":return t/7+s/6048e5;case"day":return t+s/864e5;case"hour":return t*24+s/36e5;case"minute":return t*1440+s/6e4;case"second":return t*86400+s/1e3;case"millisecond":return Math.floor(t*864e5)+s;default:throw new Error("Unknown unit "+e)}}function he(e){return function(){return this.as(e)}}var tr=he("ms"),Pu=he("s"),Fu=he("m"),Lu=he("h"),Yu=he("d"),Ru=he("w"),Au=he("M"),vu=he("Q"),Iu=he("y"),Uu=tr;function Wu(){return Z(this)}function ju(e){return e=j(e),this.isValid()?this[e+"s"]():NaN}function _e(e){return function(){return this.isValid()?this._data[e]:NaN}}var Hu=_e("milliseconds"),zu=_e("seconds"),qu=_e("minutes"),Gu=_e("hours"),Zu=_e("days"),Ju=_e("months"),Ku=_e("years");function Xu(){return H(this.days()/7)}var fe=Math.round,Te={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Qu(e,t,n,s,r){return r.relativeTime(t||1,!!n,e,s)}function eh(e,t,n,s){var r=Z(e).abs(),i=fe(r.as("s")),o=fe(r.as("m")),l=fe(r.as("h")),d=fe(r.as("d")),c=fe(r.as("M")),f=fe(r.as("w")),h=fe(r.as("y")),S=i<=n.ss&&["s",i]||i0,S[4]=s,Qu.apply(null,S)}function th(e){return e===void 0?fe:typeof e=="function"?(fe=e,!0):!1}function nh(e,t){return Te[e]===void 0?!1:t===void 0?Te[e]:(Te[e]=t,e==="s"&&(Te.ss=t-1),!0)}function sh(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,s=Te,r,i;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(s=Object.assign({},Te,t),t.s!=null&&t.ss==null&&(s.ss=t.s-1)),r=this.localeData(),i=eh(this,!n,s,r),n&&(i=r.pastFuture(+this,i)),r.postformat(i)}var kn=Math.abs;function Be(e){return(e>0)-(e<0)||+e}function xt(){if(!this.isValid())return this.localeData().invalidDate();var e=kn(this._milliseconds)/1e3,t=kn(this._days),n=kn(this._months),s,r,i,o,l=this.asSeconds(),d,c,f,h;return l?(s=H(e/60),r=H(s/60),e%=60,s%=60,i=H(n/12),n%=12,o=e?e.toFixed(3).replace(/\.?0+$/,""):"",d=l<0?"-":"",c=Be(this._months)!==Be(l)?"-":"",f=Be(this._days)!==Be(l)?"-":"",h=Be(this._milliseconds)!==Be(l)?"-":"",d+"P"+(i?c+i+"Y":"")+(n?c+n+"M":"")+(t?f+t+"D":"")+(r||s||e?"T":"")+(r?h+r+"H":"")+(s?h+s+"M":"")+(e?h+o+"S":"")):"P0D"}var E=gt.prototype;E.isValid=Jd,E.abs=Mu,E.add=Nu,E.subtract=$u,E.as=Bu,E.asMilliseconds=tr,E.asSeconds=Pu,E.asMinutes=Fu,E.asHours=Lu,E.asDays=Yu,E.asWeeks=Ru,E.asMonths=Au,E.asQuarters=vu,E.asYears=Iu,E.valueOf=Uu,E._bubble=Tu,E.clone=Wu,E.get=ju,E.milliseconds=Hu,E.seconds=zu,E.minutes=qu,E.hours=Gu,E.days=Zu,E.weeks=Xu,E.months=Ju,E.years=Ku,E.humanize=sh,E.toISOString=xt,E.toString=xt,E.toJSON=xt,E.locale=Is,E.localeData=Ws,E.toIsoString=W("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",xt),E.lang=Us,g("X",0,0,"unix"),g("x",0,0,"valueOf"),y("x",ct),y("X",xl),M("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)}),M("x",function(e,t,n){n._d=new Date(D(e))});//! moment.js p.version="2.30.1",rl($),p.fn=m,p.min=zd,p.max=qd,p.now=Gd,p.utc=ee,p.unix=Su,p.months=xu,p.isDate=Re,p.locale=ye,p.invalid=rt,p.duration=Z,p.isMoment=q,p.weekdays=Vu,p.parseZone=Du,p.localeData=ce,p.isDuration=bt,p.monthsShort=Eu,p.weekdaysMin=Ou,p.defineLocale=on,p.updateLocale=Dd,p.locales=xd,p.weekdaysShort=Cu,p.normalizeUnits=j,p.relativeTimeRounding=th,p.relativeTimeThreshold=nh,p.calendarFormat=wc,p.prototype=m,p.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 rh={props:{modelValue:{type:String,default:()=>""}},data(){return{date:{day:new Date().getDate(),month:new Date().getMonth(),year:new Date().getFullYear()},selectedDate:null}},computed:{daysInMonth(){return this.getDaysMonth(this.date)},monthName(){const{day:e,month:t,year:n}=this.date;return new Date(n,t,e).toLocaleDateString("uk-UA",{month:"long"})}},created(){if(this.modelValue){const e=p(this.modelValue,"YYYY.MM.DD").toDate();this.setDate(e),this.selectedDate=this.date}},methods:{selectDay(e){this.selectedDate={...this.date,day:e};const t=p(this.createTemporaryDate(this.selectedDate)).format("YYYY.MM.DD");this.$emit("update:modelValue",t)},getDaysMonth({year:e,month:t}={}){return 32-new Date(e,t,32).getDate()},changeMonth(e){const t=e==="next"?1:-1,n=this.createTemporaryDate(this.date);n.setMonth(n.getMonth()+t),this.setDate(new Date(n))},changeYear(e){const t=this.createTemporaryDate(this.date),n=e==="next"?1:-1;t.setFullYear(t.getFullYear()+n),this.setDate(new Date(t))},createTemporaryDate({day:e,month:t,year:n}={}){return new Date(n,t,e)},setDate(e){this.date={day:e.getDate(),month:e.getMonth(),year:e.getFullYear()}},isDateEqualCurrent(e){var r,i,o;const t=this.date.month===((r=this.selectedDate)==null?void 0:r.month),n=this.date.year===((i=this.selectedDate)==null?void 0:i.year);return((o=this.selectedDate)==null?void 0:o.day)===e&&t&&n},isDateEqualToday(e){const t=new Date,n=this.date.year===t.getFullYear(),s=this.date.month===t.getMonth(),r=e===t.getDate();return n&&s&&r},daysToFirst(e){const t=["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота"],n=e==="last"?1:this.daysInMonth,s=this.createTemporaryDate({...this.date,day:n}),r=t.indexOf(t[s.getDay()]);return e==="next"?[...t].slice(r,t.length).length:[...t].slice(0,r-1).length}},watch:{modelValue(e){e||(this.selectedDate=null)}}},ah={class:"w-fit",style:{"max-width":"300px"}},ih={class:"grid grid-cols-5 items-center gap-x-3 mx-1.5 pb-3"},oh={class:"col-span-1 flex justify-start"},lh=[a.createElementVNode("svg",{class:"flex-shrink-0 w-4 h-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[a.createElementVNode("path",{d:"m15 18-6-6 6-6"}),a.createElementVNode("path",{d:"m9 18-6-6 6-6"})],-1)],dh=[a.createElementVNode("svg",{class:"flex-shrink-0 w-4 h-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[a.createElementVNode("path",{d:"m15 18-6-6 6-6"})],-1)],ch={class:"col-span-3 flex justify-center items-center gap-x-1 text-gray-600"},uh=a.createElementVNode("span",{class:"font-serif"},"/",-1),hh={class:"font-serif"},fh={class:"col-span-1 flex justify-end"},mh=[a.createElementVNode("svg",{class:"flex-shrink-0 w-4 h-4",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[a.createElementVNode("path",{d:"m9 18 6-6-6-6"})],-1)],ph=[a.createElementVNode("svg",{class:"flex-shrink-0 w-4 h-4",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[a.createElementVNode("path",{d:"m9 18 6-6-6-6"}),a.createElementVNode("path",{d:"m15 18 6-6-6-6"})],-1)],yh={class:"flex pb-1.5 border-b"},gh={class:"flex flex-wrap"},bh=["onClick","data-testid"],wh=a.createElementVNode("div",{class:"flex"},null,-1);function kh(e,t,n,s,r,i){return a.openBlock(),a.createElementBlock("div",ah,[a.createElementVNode("div",ih,[a.createElementVNode("div",oh,[a.createElementVNode("button",{type:"button",class:"w-8 h-8 flex justify-center items-center text-gray-600 hover:bg-gray-100 rounded-full disabled:opacity-50 disabled:pointer-events-none",onClick:t[0]||(t[0]=o=>i.changeYear("prev"))},lh),a.createElementVNode("button",{type:"button",class:"w-8 h-8 flex justify-center items-center text-gray-600 hover:bg-gray-100 rounded-full disabled:opacity-50 disabled:pointer-events-none",onClick:t[1]||(t[1]=o=>i.changeMonth("prev"))},dh)]),a.createElementVNode("div",ch,[a.createElementVNode("div",null,a.toDisplayString(e.date.year),1),uh,a.createElementVNode("div",hh,a.toDisplayString(i.monthName),1)]),a.createElementVNode("div",fh,[a.createElementVNode("button",{type:"button",class:"w-8 h-8 flex justify-center items-center text-gray-600 hover:bg-gray-100 rounded-full disabled:opacity-50 disabled:pointer-events-none",onClick:t[2]||(t[2]=o=>i.changeMonth("next"))},mh),a.createElementVNode("button",{type:"button",class:"w-8 h-8 flex justify-center items-center text-gray-600 hover:bg-gray-100 rounded-full disabled:opacity-50 disabled:pointer-events-none",onClick:t[3]||(t[3]=o=>i.changeYear("next"))},ph)])]),a.createElementVNode("div",yh,[(a.openBlock(),a.createElementBlock(a.Fragment,null,a.renderList(["Пн","Вт","Ср","Чт","Пт","Сб","Нд"],o=>a.createElementVNode("span",{class:"m-px w-10 block text-center text-xs text-gray-600 font-serif",key:o},a.toDisplayString(o),1)),64))]),a.createElementVNode("div",gh,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(i.daysToFirst("last"),(o,l)=>(a.openBlock(),a.createElementBlock("button",{type:"button",key:l,class:"m-px w-10 h-10 flex justify-center items-center border border-transparent text-sm text-gray-600 hover:border-blue-600 hover:text-blue-600 rounded-full disabled:text-gray-300 disabled:pointer-events-none",disabled:""},a.toDisplayString(i.getDaysMonth({...e.date,month:e.date.month-1})-i.daysToFirst("last")+(l+1)),1))),128)),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(i.daysInMonth,o=>(a.openBlock(),a.createElementBlock("button",{key:o,onClick:l=>i.selectDay(o),type:"button","data-testid":i.isDateEqualCurrent(o)?"active-day":"",class:a.normalizeClass(["m-px w-10 h-10 transition-all flex justify-center items-center border border-transparent text-sm hover:border-blue-600 hover:text-blue-600 rounded-full disabled:text-gray-300 disabled:pointer-events-none",[i.isDateEqualCurrent(o)?"bg-blue-500 !text-white hover:text-white":"",i.isDateEqualToday(o)?"text-blue-600":"text-gray-600"]])},a.toDisplayString(o),11,bh))),128)),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(i.daysToFirst("next"),(o,l)=>(a.openBlock(),a.createElementBlock("button",{type:"button",key:l,class:"m-px w-10 h-10 flex justify-center items-center border border-transparent text-sm text-gray-600 hover:border-blue-600 hover:text-blue-600 rounded-full disabled:text-gray-300 disabled:pointer-events-none",disabled:""},a.toDisplayString(o),1))),128))]),wh])}const _h=O(rh,[["render",kh]]),Sh=a.defineComponent({components:{VsCalendar:_h,VsPopover:rs},props:{modelValue:{type:String,default:""},disabled:{type:Boolean,default:()=>!1},clearable:{type:Boolean,default:()=>!0},now:{type:Boolean,default:()=>!1},multiple:{type:Boolean,default:()=>!0}},data(){return{valueStart:null,valueEnd:null}},watch:{valueStart(e){if(document.body.click(),this.multiple){if(!this.valueEnd)return;this.$emit("update:modelValue",`${e}-${this.valueEnd}`)}else this.$emit("update:modelValue",e)},valueEnd(e){this.multiple&&(document.body.click(),this.valueStart&&this.$emit("update:modelValue",`${this.valueStart}-${e}`))}},mounted(){if(this.now)this.valueStart=this.covertFromDateToString(),this.valueEnd=this.covertFromDateToString();else if(this.multiple){if(!this.modelValue)return;const[e,t]=this.modelValue.split("-");this.valueStart=e,this.valueEnd=t}else this.valueStart=this.modelValue},methods:{clearInput(){this.$emit("update:modelValue","")},covertFromDateToString(){const e=new Date,t=e.getFullYear(),n=String(e.getMonth()+1).padStart(2,"0"),s=String(e.getDate()).padStart(2,"0");return`${t}.${n}.${s}`},formatDate(e){const t=new Date(e);if(isNaN(t.getTime()))return"Invalid Date";const n={year:"numeric",month:"long",day:"numeric"};return t.toLocaleDateString("uk-UA",n)}}}),Dh={class:"flex gap-[16px] w-full"},xh={class:"px-2",style:{width:"calc(50% - 10px)"}},Eh=["disabled"],Vh=a.createElementVNode("i",{class:"ti ti-calendar"},null,-1),Ch={class:"px-2",style:{width:"calc(50% - 10px)"}},Oh=["disabled"],Mh=a.createElementVNode("i",{class:"ti ti-calendar"},null,-1);function Nh(e,t,n,s,r,i){const o=a.resolveComponent("VsCalendar"),l=a.resolveComponent("VsPopover");return a.openBlock(),a.createElementBlock("div",Dh,[a.createVNode(l,{placement:"bottom-left",ref:"popover1",fixed:!1,disabled:e.disabled,class:a.normalizeClass(["w-full",{"cursor-not-allowed":e.disabled}])},{reference:a.withCtx(()=>[a.createElementVNode("button",{type:"button",disabled:e.disabled,class:a.normalizeClass([{"pointer-events-none":e.disabled,"opacity-50":e.disabled},"vs-datepicker__button hs-select-disabled:pointer-events-none hs-select-disabled:opacity-50 relative py-2 px-4 pe-9 flex text-nowrap w-full cursor-pointer bg-white border border-solid border-stone-200 rounded-lg text-start text-sm text-stone-800 focus:outline-none focus:ring-2 focus:ring-blue-500 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-200 dark:focus:outline-none dark:focus:ring-1 dark:focus:ring-neutral-600"])},[a.createElementVNode("div",{class:a.normalizeClass({"text-gray-400":!e.valueStart})},[Vh,a.createTextVNode(" "+a.toDisplayString(e.valueStart?e.formatDate(e.valueStart):"Оберіть дату..."),1)],2),e.clearable&&e.valueStart?(a.openBlock(),a.createElementBlock("i",{key:0,class:"absolute bottom-2/4 translate-y-2/4 ti ti-x right-2 hover:text-red-500",onClick:t[1]||(t[1]=a.withModifiers((...d)=>e.clearInput&&e.clearInput(...d),["stop"]))})):a.createCommentVNode("",!0)],10,Eh)]),default:a.withCtx(()=>[a.createElementVNode("div",xh,[a.createVNode(o,{modelValue:e.valueStart,"onUpdate:modelValue":t[0]||(t[0]=d=>e.valueStart=d),class:"vs-datepicker__calendar"},null,8,["modelValue"])])]),_:1},8,["disabled","class"]),e.multiple?(a.openBlock(),a.createBlock(l,{key:0,placement:"bottom-left",ref:"popover2",fixed:!1,disabled:e.disabled,class:a.normalizeClass(["w-full",{"cursor-not-allowed":e.disabled}])},{reference:a.withCtx(()=>[a.createElementVNode("button",{type:"button",disabled:e.disabled,class:a.normalizeClass([{"pointer-events-none":e.disabled,"opacity-50":e.disabled},"vs-datepicker__button hs-select-disabled:pointer-events-none hs-select-disabled:opacity-50 relative py-2 px-4 pe-9 flex text-nowrap w-full cursor-pointer bg-white border border-solid border-stone-200 rounded-lg text-start text-sm text-stone-800 focus:outline-none focus:ring-2 focus:ring-blue-500 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-200 dark:focus:outline-none dark:focus:ring-1 dark:focus:ring-neutral-600"])},[a.createElementVNode("div",{class:a.normalizeClass({"text-gray-400":!e.valueEnd})},[Mh,a.createTextVNode(" "+a.toDisplayString(e.valueEnd?e.formatDate(e.valueEnd):"Оберіть дату..."),1)],2),e.clearable&&e.valueEnd?(a.openBlock(),a.createElementBlock("i",{key:0,class:"absolute bottom-2/4 translate-y-2/4 ti ti-x right-2 hover:text-red-500",onClick:t[3]||(t[3]=a.withModifiers((...d)=>e.clearInput&&e.clearInput(...d),["stop"]))})):a.createCommentVNode("",!0)],10,Oh)]),default:a.withCtx(()=>[a.createElementVNode("div",Ch,[a.createVNode(o,{modelValue:e.valueEnd,"onUpdate:modelValue":t[2]||(t[2]=d=>e.valueEnd=d),class:"vs-datepicker__calendar"},null,8,["modelValue"])])]),_:1},8,["disabled","class"])):a.createCommentVNode("",!0)])}const I={date:{component:oi,type:"auto",canUseWithoutLayout:!0},datepicker:{component:O(Sh,[["render",Nh]]),type:"auto",canUseWithoutLayout:!0},text:{component:Ei,type:"auto",canUseWithoutLayout:!0},autocomplete:{component:ns,type:"array",canUseWithoutLayout:!0},select:{component:ns,type:"array",canUseWithoutLayout:!0},checkbox:{component:ss,type:"array"},check:{component:ss,type:"array"},radio:{component:xo,type:"auto"},range:{component:po,type:"auto"},avatar:{component:zo,type:"array",canUseWithoutLayout:!0},pagination:{component:sl,type:"auto",canUseWithoutLayout:!0}},$h=Object.keys(I).reduce((e,t)=>{var s;const n=((s=I==null?void 0:I[t])==null?void 0:s.component)||null;return n?{...e,[`vs-filter-${t}`]:n}:(console.warn(`Key ${t} doesn't have component!`),e)},{}),_n={props:{label:{type:String,default:()=>""},isOpen:{type:Boolean,default:()=>!1},data:{type:[String,Array,Boolean,Number],default:()=>""}}},Th={mixins:[_n],props:{isOpen:{type:Boolean,default:()=>!1}},data(){return{isAccordionOpen:this.isOpen}}},Bh={class:"overflow-hidden rounded bg-white border border-solid border-gray-200"},Ph={class:"flex items-center"},Fh={class:"text-xs font-bold text-start"},Lh={key:0,class:"inline-flex items-center justify-center w-2 h-2 ms-2 text-xs font-semibold text-blue-800 bg-blue-600 rounded-full"},Yh={class:"flex items-center"},Rh={class:"p-2"};function Ah(e,t,n,s,r,i){var o,l;return a.openBlock(),a.createElementBlock("div",Bh,[a.createElementVNode("button",{ref:"accordionBtn",type:"button",class:"flex cursor-pointer relative items-center w-full flex justify-between gap-2 p-2 text-gray-900 transition",onClick:t[1]||(t[1]=d=>r.isAccordionOpen=!r.isAccordionOpen)},[a.createElementVNode("div",Ph,[a.createElementVNode("span",Fh,a.toDisplayString(e.label),1),(o=e.data)!=null&&o.length?(a.openBlock(),a.createElementBlock("span",Lh)):a.createCommentVNode("",!0)]),a.createElementVNode("span",Yh,[(l=e.data)!=null&&l.length?(a.openBlock(),a.createElementBlock("i",{key:0,class:"ti ti-reload mr-1 active:rotate-90 transition-all hover:text-blue-500",onClick:t[0]||(t[0]=a.withModifiers(d=>e.$emit("refresh"),["stop"]))})):a.createCommentVNode("",!0),a.createElementVNode("i",{class:a.normalizeClass(["ti ti-chevron-down shrink-0 text-gray-500 text-sm transition-transform",{"rotate-180":r.isAccordionOpen}])},null,2)])],512),a.createElementVNode("div",{class:a.normalizeClass(["w-full overflow-hidden transition-[height] duration-300 border-t border-solid border-gray-200",{hidden:!r.isAccordionOpen}])},[a.createElementVNode("div",Rh,[a.renderSlot(e.$slots,"default")])],2)])}const vh=O(Th,[["render",Ah]]),Ih={},Uh={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-reload"},Wh=[a.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),a.createElementVNode("path",{d:"M19.933 13.041a8 8 0 1 1 -9.925 -8.788c3.899 -1 7.935 1.007 9.425 4.747"},null,-1),a.createElementVNode("path",{d:"M20 4v5h-5"},null,-1)];function jh(e,t){return a.openBlock(),a.createElementBlock("svg",Uh,Wh)}const nr=O(Ih,[["render",jh]]),Hh=a.defineComponent({mixins:[_n],components:{IconReload:nr},data(){return{}}}),zh={class:"block mb-4 text-sm font-medium text-gray-800 dark:text-neutral-200"},qh={class:"flex items-center"},Gh={class:"text-sm font-semibold max-w-[80%] overflow-hidden overflow-ellipsis text-nowrap"},Zh={key:0,class:"inline-flex items-center justify-center w-2 h-2 ms-2 text-xs font-semibold text-blue-800 bg-blue-600 rounded-full"},Jh={class:"filter-layout__body"};function Kh(e,t,n,s,r,i){var l,d;const o=a.resolveComponent("IconReload");return a.openBlock(),a.createElementBlock("div",null,[a.createElementVNode("div",zh,[a.createElementVNode("div",qh,[a.createElementVNode("span",Gh,a.toDisplayString(e.label),1),(l=e.data)!=null&&l.length?(a.openBlock(),a.createElementBlock("span",Zh)):a.createCommentVNode("",!0)]),(d=e.data)!=null&&d.length?(a.openBlock(),a.createBlock(o,{key:0,width:"15px",class:"inline mr-1 active:rotate-90 cursor-pointer transition-all absolute right-1 top-1 text-gray-800 hover:text-blue-500",onClick:t[0]||(t[0]=a.withModifiers(c=>e.$emit("refresh"),["stop"]))})):a.createCommentVNode("",!0)]),a.createElementVNode("div",Jh,[a.renderSlot(e.$slots,"default")])])}const Xh=O(Hh,[["render",Kh]]),Qh={mixins:[_n],props:{isOpen:{type:Boolean,default:()=>!1}},computed:{selectedData(){return this.data.length?`Обрано: ${Array.isArray(this.data)?this.data.join():this.data}`:""},filterLabel(){return this.selectedData||this.label}}},ef={type:"button",class:"w-[200px] rounded-lg bg-white border border-solid border-gray-200 flex cursor-pointer items-center flex justify-between gap-x-1 py-2 px-4 text-gray-900 transition"},tf=["title"],nf=a.createElementVNode("i",{class:"ti ti-chevron-down shrink-0 text-gray-500 text-sm transition-transform active:rotate-180"},null,-1),sf={class:"p-2"};function rf(e,t,n,s,r,i){const o=a.resolveComponent("VsPopover");return a.openBlock(),a.createBlock(o,{"is-open":e.isAccordionOpen,placement:"bottom-left"},{reference:a.withCtx(()=>{var l;return[a.createElementVNode("button",ef,[a.createElementVNode("span",{class:a.normalizeClass(["w-full text-left text-sm whitespace-nowrap text-ellipsis overflow-hidden",{"text-black":i.selectedData}]),title:i.filterLabel},a.toDisplayString(i.filterLabel),11,tf),(l=e.data)!=null&&l.length?(a.openBlock(),a.createElementBlock("i",{key:0,class:"ti ti-x active:rotate-90 text-sm transition-all hover:text-red-500",onClick:t[0]||(t[0]=a.withModifiers(d=>e.$emit("refresh"),["stop"]))})):a.createCommentVNode("",!0),nf])]}),default:a.withCtx(()=>[a.createElementVNode("div",sf,[a.renderSlot(e.$slots,"default")])]),_:3},8,["is-open"])}const af={components:{...$h,...{VsFilterBlockAccordion:vh,VsFilterBlockDefault:Xh,VsFilterBlockList:O(Qh,[["render",rf]])}},props:{modelValue:{type:Object,default:()=>{}},data:{type:Object,default:()=>{}},layout:{type:String,default:()=>"default"}},inject:["meta"],computed:{componentType(){var e,t;return(t=(e=this.data)==null?void 0:e.type)==null?void 0:t.toLowerCase()},componentName(){return`vs-filter-${this.componentType}`},layoutType(){var e,t;return((t=(e=this.data)==null?void 0:e.layout)==null?void 0:t.toLowerCase())||this.layout},layoutName(){return this.isWithoutLayout?"div":`vs-filter-block-${this.layoutType}`},refreshName(){return`refresh-${this.data.id}`},isListLayout(){return this.layoutType==="list"},isWithoutLayout(){return this.isListLayout&&!!I[this.componentType].canUseWithoutLayout},isPaginatorWithTeleport(){return this.componentType==="pagination"&&!!this.data.teleport},layoutWrpStyles(){const e=this.componentType==="avatar",t=this.componentType==="date";let n=e?"":`${t?220:200}px`;this.componentName=="vs-filter-date"&&(n="");const s=this.isPaginatorWithTeleport?"none":"inline-flex",r=this.isListLayout?"5px 8px 5px 0":"0 0 0 0",i=this.isListLayout?n:"100%";return{display:s,margin:r,width:i}},token(){return this.meta?this.meta.token:""},value:{get(){return this.modelValue[this.data.id]},set(e){this.updateValues(e)}}},data(){return{event:null}},mounted(){this.event=new CustomEvent(this.refreshName)},methods:{updateValues(e){this.$emit("update:modelValue",{...this.modelValue,[this.data.id]:e})},refreshData(){var n;window.dispatchEvent(this.event);let e="";(I[this.componentType].type==="array"||((n=this.data)==null?void 0:n.multiple))&&(e=[]),this.updateValues(e)}}};function of(e,t,n,s,r,i){var o;return a.openBlock(),a.createElementBlock("div",{style:a.normalizeStyle(i.layoutWrpStyles)},[(o=n.data)!=null&&o.disabled?a.createCommentVNode("",!0):(a.openBlock(),a.createBlock(a.resolveDynamicComponent(i.layoutName),{key:0,isOpen:n.data.isOpen,label:n.data.label||"-",data:n.modelValue[n.data.id],class:"w-full mb-4 relative",onRefresh:i.refreshData},{default:a.withCtx(()=>{var l,d,c,f,h,S,k,b,w,F,Y,J,K,Et,or,lr,dr,cr,ur,hr,fr,mr,pr,yr,gr,br,wr,kr;return[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(i.componentName),{id:(l=n.data)==null?void 0:l.id,modelValue:i.value,"onUpdate:modelValue":t[0]||(t[0]=Ef=>i.value=Ef),clearable:"",origin:n.data,placeholder:((d=n.data)==null?void 0:d.placeholder)||((c=n.data)==null?void 0:c.ua)||((f=n.data)==null?void 0:f.label)||"",options:(h=n.data)==null?void 0:h.options,"api-prefix":(S=n.data)==null?void 0:S.apiPrefix,select:((k=n.data)==null?void 0:k.select)||((b=n.data)==null?void 0:b.data),name:(w=n.data)==null?void 0:w.name,loading:(F=n.data)==null?void 0:F.loading,disabled:(Y=n.data)==null?void 0:Y.disabled,readonly:(J=n.data)==null?void 0:J.readonly,color:(K=n.data)==null?void 0:K.color,value:(Et=n.data)==null?void 0:Et.value,count:(or=n.data)==null?void 0:or.count,size:(lr=n.data)==null?void 0:lr.size,icon:(dr=n.data)==null?void 0:dr.icon,multiple:(cr=n.data)==null?void 0:cr.multiple,"active-icon":(ur=n.data)==null?void 0:ur.activeIcon,"inactive-icon":(hr=n.data)==null?void 0:hr.inactiveIcon,"active-text":(fr=n.data)==null?void 0:fr.activeText,"inactive-text":(mr=n.data)==null?void 0:mr.inactiveText,min:(pr=n.data)==null?void 0:pr.min,max:(yr=n.data)==null?void 0:yr.max,step:(gr=n.data)==null?void 0:gr.step,divider:(br=n.data)==null?void 0:br.divider,"refresh-name":i.refreshName,token:i.token,"max-visible":(wr=n.data)==null?void 0:wr.maxVisible,searchPlaceholder:(kr=n.data)==null?void 0:kr.searchPlaceholder},null,8,["id","modelValue","origin","placeholder","options","api-prefix","select","name","loading","disabled","readonly","color","value","count","size","icon","multiple","active-icon","inactive-icon","active-text","inactive-text","min","max","step","divider","refresh-name","token","max-visible","searchPlaceholder"]))]}),_:1},40,["isOpen","label","data","onRefresh"]))],4)}const lf=O(af,[["render",of]]),sr=e=>Array.isArray(e)||typeof e=="string"?e.length:(typeof e=="object"&&!Array.isArray(e),!1),df={props:{to:{type:String,default:()=>""}},data(){return{isMounted:!1}},mounted(){this.isMounted=!0}};function cf(e,t,n,s,r,i){return r.isMounted?(a.openBlock(),a.createBlock(a.Teleport,{key:0,to:n.to},[a.renderSlot(e.$slots,"default")],8,["to"])):a.createCommentVNode("",!0)}const uf=O(df,[["render",cf]]),hf=a.defineComponent({components:{VsMountedTeleport:uf},props:{activeFilters:{type:Object,default:()=>{}},teleportTo:{type:String,default:()=>""}},computed:{isActiveFiltersEmpty(){return Object.keys(this.activeFilters).length===0}},methods:{handleClear(e){this.$emit("clear",e)},handleClearAll(){this.$emit("clear-all")}}}),ff={key:0,class:"w-full flex gap-3"};function mf(e,t,n,s,r,i){const o=a.resolveComponent("VsButton"),l=a.resolveComponent("VsMountedTeleport");return a.openBlock(),a.createBlock(l,{to:e.teleportTo},{default:a.withCtx(()=>[e.isActiveFiltersEmpty?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",ff,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.activeFilters,(d,c)=>(a.openBlock(),a.createBlock(o,{key:c,title:`${d}`,icon:"ti-x",size:"mini",onClick:f=>e.handleClear(c)},null,8,["title","onClick"]))),128)),a.createVNode(o,{class:"text-xs",size:"mini",title:"Очистити",square:"",icon:"ti-reload",onClick:e.handleClearAll},null,8,["onClick"])]))]),_:1},8,["to"])}const pf={components:{VsFilterLayout:lf,VsActiveFiltersPanel:O(hf,[["render",mf]]),VsButton:Fa,IconReload:nr,IconX:Qn},props:{modelValue:{type:Object,default:()=>null},SEO:{type:Boolean,default:()=>!1},scheme:{type:[String,Object,Array],default:()=>[]},layout:{type:String,default:()=>"default"},urlSeparator:{type:String,default:()=>""},applyVueRouter:{type:Boolean,default:()=>!1},divider:{type:String,default:()=>"|"},paginationSelector:{type:Boolean,default:()=>!1},paginationTeleport:{type:String,default:()=>""},paginationTotal:{type:[String,Number],default:()=>"0"},pageSize:{type:[String,Number],default:()=>10},activeFiltersTeleport:{type:String,default:()=>""},token:{type:String,default:()=>""},api:{type:String,default:()=>""},history:{type:Boolean,default:()=>!1},name:{type:String,default:()=>""},closeFilterBtn:{type:Boolean,default:()=>!1}},provide(){return{meta:{token:this.token},paginationTotal:a.computed(()=>this.paginationTotal),pageSize:a.computed(()=>this.pageSize)}},data(){return{filterValues:null,components:[],filterUrl:""}},computed:{isListLayout(){return this.layout==="list"},stateDivider(){return["|",":",";","$","*"].includes(this.divider)?this.divider:(console.warn(`Filter Warning: Warning! Your divider doesn't include one of special symbol ["|", ":", ";", '$', "*"], it will be replaced to '|'`),"|")},activeFilters(){if(!this.filterValues)return{};const e=Object.entries(this.filterValues).filter(t=>sr(t==null?void 0:t[1]));return Object.fromEntries(e)},filteredActiveFilters(){if(Object.keys(this.activeFilters).length===0)return{};const e=["page"],t=Object.entries(this.activeFilters).filter(n=>!e.includes(n==null?void 0:n[0]));return Object.fromEntries(t)},filteredActiveFiltersLength(){return Object.keys(this.filteredActiveFilters).length}},watch:{filterValues:{deep:!0,handler(e,t){this.SEO?this.filterUrl=this.$SEOSetUrl(t,e):this.formatFilterData(t);const s={url:this.filterUrl||"no-url",name:this.name,state:this.activeFilters};t&&(this.$emit("update:modelValue",s.state),this.$emit("filterChange",s)),this.$emit("immediateChange",s)}}},async mounted(){if(this.components=await this.getComponentsData(),this.paginationSelector&&(this.components=this.components.concat({id:"page",type:"pagination",layout:"list",teleport:this.paginationTeleport})),!this.history&&this.modelValue){this.filterValues=this.modelValue;return}this.SEO?this.filterValues=this.$SEOCreateFilterState(this.components):await this.createFilterState()},methods:{requiredUrl(){const t=window.location.hash.slice(2),n=window.location.search;return this.applyVueRouter?n:t},componentName({type:e}){return`vs-filter-${e.toLowerCase()}`},addEvents(){},async getComponentsData(){if(!this.api)return this.scheme;try{const{data:e}=await B.get(this.api);return e.map(n=>{const s=(n==null?void 0:n.name)||"",r=(n==null?void 0:n.label)||(n==null?void 0:n.title)||(n==null?void 0:n.ua)||(n==null?void 0:n.ru)||"Назва відсутня",o={...Object.entries(n).reduce((d,[c,f])=>["name","label","data"].includes(c)?d:{...d,[c]:f},{}),id:s,label:r},l=(n==null?void 0:n.data)||(n==null?void 0:n.options)||(n==null?void 0:n.select)||null;return l&&Array.isArray(l)&&(o.options=(l==null?void 0:l.map(d=>{const c=(d==null?void 0:d.text)||(d==null?void 0:d.title),f=(d==null?void 0:d.id)||(d==null?void 0:d.val);return{...d,id:f,text:c,identifier:Math.floor(Math.random()*1e4)}}))||null),o})}catch(e){return console.error(e),null}},getRouteData(){const e=this.requiredUrl();return decodeURIComponent(e.replace(/%25/g,"")).split(/[?&]/gm).reduce((n,s)=>{if(!s)return n;const r=s.indexOf("="),i=s.slice(0,r),o=decodeURI(s.slice(r+1));return{...n,[i]:o}},{})},catchUrlFields(){const e=this.getRouteData()[this.name],t=new RegExp(`[${this.stateDivider}=]`,"gm"),n=(e==null?void 0:e.split(t))||[];return n.reduce((r,i,o)=>{if(o%2)return r;const l=this.formatByFieldType(i,(n==null?void 0:n[o+1])||"");return{...r,[i]:l}},{})},formatByFieldType(e,t){var i,o;const s=(i=this.components.find(l=>l.id===e).type)==null?void 0:i.toLowerCase(),r=((o=I==null?void 0:I[s])==null?void 0:o.type)||"auto";return r==="array"?t.split(",").filter(l=>l):r==="boolean"?JSON.parse(t):t},getFilterState(e){return this.components.reduce((t,n)=>{var l;if(!(n!=null&&n.id))throw new Error("CreateState Error: input has no id!");typeof n.id=="number"&&console.warn(`CreateState Warning: input id ${n.id} has type Number, it will be converted in String!`);const s=n.type.toLowerCase(),r=n.id.toString(),i=((l=I==null?void 0:I[s])==null?void 0:l.type)||"auto";let o="";return i==="array"?o=[]:i==="boolean"&&(o=!1),{...t,[r]:(e==null?void 0:e[r])!==void 0?e[r]:o}},{})},async createFilterState(){const e=this.catchUrlFields(),t=this.getFilterState(e);this.filterValues=t},compareHash(e=""){const t=this.requiredUrl(),n=this.name.toString(),s=`${n}=${e}`;if(!t.length)return`?${s}`;const r=o=>e?o:!o.includes(this.name);return t.split(/[?&]/gm).filter(r).reduce((o,l)=>{if(!l)return o;const d=o.includes("?")?"&":"?";return l.match(`${n}=`)?`${o}${d}${s}`:t.match(`${n}=`)?`${o}${d}${l}`:`${o}${d}${l}&${s}`},"")},formatFilterData(e=!0){const t=Object.entries(this.activeFilters),n=t.reduce((r,i,o)=>{const[l,d]=i,c=o!==t.length-1?this.stateDivider:"";let f;return Array.isArray(d)?f=`${l}=${d.join(",")}`:f=`${l}=${d}`,`${r}${f}${c}`},""),s=this.compareHash(n);if(this.filterUrl=n,this.applyVueRouter){n?this.$router.push({query:{...this.$route.query,[this.name]:n}}):this.$router.push({query:{...Object.entries(this.$route.query).reduce((r,[i,o])=>i===this.name?r:{...r,[i]:o},{})}});return}this.history&&e&&window.history.pushState({},"",`${window.location.pathname}${this.urlSeparator}#/${s}`)},clearAll(){this.filterValues=this.getFilterState()},clearFilter(e){const t=`filter-${e}`;this.$refs[t][0].refreshData()}}},yf={class:"vs-filter"},gf={key:0,class:"flex items-center text-black justify-between"},bf={class:"py-3 text-start text-sm font-normal whitespace-nowrap text-gray-500 flex gap-[6px] items-center"},wf={key:0,class:"font-medium text-[10px] h-[14px] w-[14px] flex items-center justify-center bg-blue-600 text-white leading-3 rounded-full dark:bg-neutral-500"},kf={class:"display flex gap-[10px] h-[34px]"},_f={key:0,class:"flex items-center gap-2"},Sf={key:2};function Df(e,t,n,s,r,i){const o=a.resolveComponent("IconReload"),l=a.resolveComponent("IconX"),d=a.resolveComponent("VsFilterLayout"),c=a.resolveComponent("VsButton"),f=a.resolveComponent("vs-active-filters-panel");return a.openBlock(),a.createElementBlock("div",yf,[i.isListLayout?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",gf,[a.createElementVNode("p",bf,[a.createTextVNode(" Фільтри "),i.filteredActiveFiltersLength?(a.openBlock(),a.createElementBlock("span",wf,a.toDisplayString(i.filteredActiveFiltersLength),1)):a.createCommentVNode("",!0)]),a.createElementVNode("div",kf,[i.filteredActiveFiltersLength?(a.openBlock(),a.createElementBlock("div",_f,[a.createElementVNode("button",{onClick:t[0]||(t[0]=(...h)=>i.clearAll&&i.clearAll(...h)),class:"h-[40px] px-[8px] flex items-center gap-[4px] border rounded-lg hover:bg-gray-100 duration-300"},[a.createTextVNode(" Очистити "),a.createVNode(o,{height:"14",width:"14"})])])):a.createCommentVNode("",!0),n.closeFilterBtn?(a.openBlock(),a.createElementBlock("button",{key:1,onClick:t[1]||(t[1]=h=>e.$emit("filter-close")),class:"h-[32px] w-[32px] rounded-full bg-gray-100 hover:bg-gray-200 flex items-center justify-center text-xl duration-300"},[a.createVNode(l,{height:"16",width:"16"})])):a.createCommentVNode("",!0)])])),e.filterValues?(a.openBlock(),a.createElementBlock("div",{key:1,class:a.normalizeClass(["vst-filters vsTailwind flex items-center",[n.layout==="list"?"flex-row flex-wrap":"flex-col w-full"]])},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.components,(h,S)=>(a.openBlock(),a.createBlock(d,{modelValue:e.filterValues,"onUpdate:modelValue":t[2]||(t[2]=k=>e.filterValues=k),data:h,layout:n.layout,key:S,ref_for:!0,ref:"filter-"+h.id},null,8,["modelValue","data","layout"]))),128)),i.isListLayout&&i.filteredActiveFiltersLength?(a.openBlock(),a.createBlock(c,{key:0,class:"text-xs",size:"mini",title:"Очистити",square:"",icon:"ti-reload",onClick:i.clearAll},null,8,["onClick"])):a.createCommentVNode("",!0)],2)):(a.openBlock(),a.createElementBlock("div",Sf,"loading")),n.activeFiltersTeleport?(a.openBlock(),a.createBlock(f,{key:3,"teleport-to":n.activeFiltersTeleport,"active-filters":i.filteredActiveFilters,onClear:i.clearFilter,onClearAll:i.clearAll},null,8,["teleport-to","active-filters","onClear","onClearAll"])):a.createCommentVNode("",!0)])}const rr=O(pf,[["render",Df]]),xf=typeof window>"u"?{}:{$SEOUrlCreator(e){return e?Object.entries(e).filter(n=>sr(n[1])).reduce((n,[s,r],i)=>`${n}${i?";":""}${s}=${r}`,""):""},$SEOSetUrl(e,t){if(!e)return"";const n=this.$SEOUrlCreator(e),s=this.$SEOUrlCreator(t),r=()=>{var c,f;const o=((c=window.location)==null?void 0:c.search)||((f=window.location)==null?void 0:f.hash)||"",{pathname:l}=window.location,d=l[l.length-1]==="/"?"":"/";window.history.pushState({},"",`${window.location.origin}${l}${d}${s}${o}`)},i=()=>{const o=encodeURI(n),l=window.location.href.split(o),d=!n&&l.length!==2;if(l.length!==2&&d)throw new Error("Filter url error: SEO url has damaged!");const[c,f]=l;window.history.pushState({},"",`${c}${s}${f||""}`)};return!Object.keys(e).length||!n?r():i(),s},$SEOCreateFilterState(e){return decodeURIComponent(window.location.pathname).split(/[;/]/gm).reduce((s,r)=>{var h;const i=e.find(S=>r.match(`${S.id}=`));if(!i)return s;const o=(h=i==null?void 0:i.type)==null?void 0:h.toLowerCase();if(!o)throw new Error("Filter component error: component doesn't have type!");const[l,d]=r.split("="),f=I[o].type==="array"?d.split(","):d;return{...s,[l]:f}},{})}},ar={install:e=>{e.config.globalProperties={...e.config.globalProperties,...xf}}},ir={install:async(e,t={defaultColorTheme:"system"})=>{e.use(ar),e.component("VsFilter",rr)},plugins:ar,components:{VsFilter:rr}};return typeof window<"u"&&(window.v3filter=ir),ir});