@opengis/cms 0.0.11 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,19 @@
1
+ (function(s,Ce){typeof exports=="object"&&typeof module<"u"?module.exports=Ce(require("vue")):typeof define=="function"&&define.amd?define(["vue"],Ce):(s=typeof globalThis<"u"?globalThis:s||self,s.cms=Ce(s.Vue))})(this,function(s){"use strict";function Ce(e,t){return function(){return e.apply(t,arguments)}}const{toString:Cs}=Object.prototype,{getPrototypeOf:Ut}=Object,{iterator:st,toStringTag:Yn}=Symbol,ot=(e=>t=>{const n=Cs.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),te=e=>(e=e.toLowerCase(),t=>ot(t)===e),at=e=>t=>typeof t===e,{isArray:Te}=Array,je=at("undefined");function Ts(e){return e!==null&&!je(e)&&e.constructor!==null&&!je(e.constructor)&&z(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Pn=te("ArrayBuffer");function Bs(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Pn(e.buffer),t}const $s=at("string"),z=at("function"),An=at("number"),it=e=>e!==null&&typeof e=="object",Rs=e=>e===!0||e===!1,lt=e=>{if(ot(e)!=="object")return!1;const t=Ut(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Yn in e)&&!(st in e)},Fs=te("Date"),Ys=te("File"),Ps=te("Blob"),As=te("FileList"),vs=e=>it(e)&&z(e.pipe),Ls=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||z(e.append)&&((t=ot(e))==="formdata"||t==="object"&&z(e.toString)&&e.toString()==="[object FormData]"))},Us=te("URLSearchParams"),[Is,js,Ws,Hs]=["ReadableStream","Request","Response","Headers"].map(te),zs=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function We(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),Te(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const a=n?Object.getOwnPropertyNames(e):Object.keys(e),i=a.length;let l;for(r=0;r<i;r++)l=a[r],t.call(null,e[l],l,e)}}function vn(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const Ee=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ln=e=>!je(e)&&e!==Ee;function It(){const{caseless:e}=Ln(this)&&this||{},t={},n=(r,o)=>{const a=e&&vn(t,o)||o;lt(t[a])&&lt(r)?t[a]=It(t[a],r):lt(r)?t[a]=It({},r):Te(r)?t[a]=r.slice():t[a]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&We(arguments[r],n);return t}const qs=(e,t,n,{allOwnKeys:r}={})=>(We(t,(o,a)=>{n&&z(o)?e[a]=Ce(o,n):e[a]=o},{allOwnKeys:r}),e),Gs=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Js=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Zs=(e,t,n,r)=>{let o,a,i;const l={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)i=o[a],(!r||r(i,e,t))&&!l[i]&&(t[i]=e[i],l[i]=!0);e=n!==!1&&Ut(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Ks=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Xs=e=>{if(!e)return null;if(Te(e))return e;let t=e.length;if(!An(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Qs=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ut(Uint8Array)),eo=(e,t)=>{const r=(e&&e[st]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},to=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},no=te("HTMLFormElement"),ro=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Un=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),so=te("RegExp"),In=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};We(n,(o,a)=>{let i;(i=t(o,a,e))!==!1&&(r[a]=i||o)}),Object.defineProperties(e,r)},oo=e=>{In(e,(t,n)=>{if(z(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(z(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},ao=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return Te(e)?r(e):r(String(e).split(t)),n},io=()=>{},lo=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function co(e){return!!(e&&z(e.append)&&e[Yn]==="FormData"&&e[st])}const uo=e=>{const t=new Array(10),n=(r,o)=>{if(it(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const a=Te(r)?[]:{};return We(r,(i,l)=>{const c=n(i,o+1);!je(c)&&(a[l]=c)}),t[o]=void 0,a}}return r};return n(e,0)},fo=te("AsyncFunction"),ho=e=>e&&(it(e)||z(e))&&z(e.then)&&z(e.catch),jn=((e,t)=>e?setImmediate:t?((n,r)=>(Ee.addEventListener("message",({source:o,data:a})=>{o===Ee&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),Ee.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",z(Ee.postMessage)),mo=typeof queueMicrotask<"u"?queueMicrotask.bind(Ee):typeof process<"u"&&process.nextTick||jn,h={isArray:Te,isArrayBuffer:Pn,isBuffer:Ts,isFormData:Ls,isArrayBufferView:Bs,isString:$s,isNumber:An,isBoolean:Rs,isObject:it,isPlainObject:lt,isReadableStream:Is,isRequest:js,isResponse:Ws,isHeaders:Hs,isUndefined:je,isDate:Fs,isFile:Ys,isBlob:Ps,isRegExp:so,isFunction:z,isStream:vs,isURLSearchParams:Us,isTypedArray:Qs,isFileList:As,forEach:We,merge:It,extend:qs,trim:zs,stripBOM:Gs,inherits:Js,toFlatObject:Zs,kindOf:ot,kindOfTest:te,endsWith:Ks,toArray:Xs,forEachEntry:eo,matchAll:to,isHTMLForm:no,hasOwnProperty:Un,hasOwnProp:Un,reduceDescriptors:In,freezeMethods:oo,toObjectSet:ao,toCamelCase:ro,noop:io,toFiniteNumber:lo,findKey:vn,global:Ee,isContextDefined:Ln,isSpecCompliantForm:co,toJSONObject:uo,isAsyncFn:fo,isThenable:ho,setImmediate:jn,asap:mo,isIterable:e=>e!=null&&z(e[st])};function O(e,t,n,r,o){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),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}h.inherits(O,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:h.toJSONObject(this.config),code:this.code,status:this.status}}});const Wn=O.prototype,Hn={};["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=>{Hn[e]={value:e}}),Object.defineProperties(O,Hn),Object.defineProperty(Wn,"isAxiosError",{value:!0}),O.from=(e,t,n,r,o,a)=>{const i=Object.create(Wn);return h.toFlatObject(e,i,function(c){return c!==Error.prototype},l=>l!=="isAxiosError"),O.call(i,e.message,t,n,r,o),i.cause=e,i.name=e.name,a&&Object.assign(i,a),i};const po=null;function jt(e){return h.isPlainObject(e)||h.isArray(e)}function zn(e){return h.endsWith(e,"[]")?e.slice(0,-2):e}function qn(e,t,n){return e?e.concat(t).map(function(o,a){return o=zn(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function yo(e){return h.isArray(e)&&!e.some(jt)}const go=h.toFlatObject(h,{},null,function(t){return/^is[A-Z]/.test(t)});function ct(e,t,n){if(!h.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=h.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,p){return!h.isUndefined(p[y])});const r=n.metaTokens,o=n.visitor||u,a=n.dots,i=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&h.isSpecCompliantForm(t);if(!h.isFunction(o))throw new TypeError("visitor must be a function");function d(m){if(m===null)return"";if(h.isDate(m))return m.toISOString();if(!c&&h.isBlob(m))throw new O("Blob is not supported. Use a Buffer instead.");return h.isArrayBuffer(m)||h.isTypedArray(m)?c&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function u(m,y,p){let k=m;if(m&&!p&&typeof m=="object"){if(h.endsWith(y,"{}"))y=r?y:y.slice(0,-2),m=JSON.stringify(m);else if(h.isArray(m)&&yo(m)||(h.isFileList(m)||h.endsWith(y,"[]"))&&(k=h.toArray(m)))return y=zn(y),k.forEach(function(g,D){!(h.isUndefined(g)||g===null)&&t.append(i===!0?qn([y],D,a):i===null?y:y+"[]",d(g))}),!1}return jt(m)?!0:(t.append(qn(p,y,a),d(m)),!1)}const f=[],_=Object.assign(go,{defaultVisitor:u,convertValue:d,isVisitable:jt});function w(m,y){if(!h.isUndefined(m)){if(f.indexOf(m)!==-1)throw Error("Circular reference detected in "+y.join("."));f.push(m),h.forEach(m,function(k,b){(!(h.isUndefined(k)||k===null)&&o.call(t,k,h.isString(b)?b.trim():b,y,_))===!0&&w(k,y?y.concat(b):[b])}),f.pop()}}if(!h.isObject(e))throw new TypeError("data must be an object");return w(e),t}function Gn(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Wt(e,t){this._pairs=[],e&&ct(e,this,t)}const Jn=Wt.prototype;Jn.append=function(t,n){this._pairs.push([t,n])},Jn.toString=function(t){const n=t?function(r){return t.call(this,r,Gn)}:Gn;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function _o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Zn(e,t,n){if(!t)return e;const r=n&&n.encode||_o;h.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let a;if(o?a=o(t,n):a=h.isURLSearchParams(t)?t.toString():new Wt(t,n).toString(r),a){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class Kn{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){h.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Xn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},wo={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Wt,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Ht=typeof window<"u"&&typeof document<"u",zt=typeof navigator=="object"&&navigator||void 0,xo=Ht&&(!zt||["ReactNative","NativeScript","NS"].indexOf(zt.product)<0),ko=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",bo=Ht&&window.location.href||"http://localhost",j={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ht,hasStandardBrowserEnv:xo,hasStandardBrowserWebWorkerEnv:ko,navigator:zt,origin:bo},Symbol.toStringTag,{value:"Module"})),...wo};function Eo(e,t){return ct(e,new j.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,a){return j.isNode&&h.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function So(e){return h.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function No(e){const t={},n=Object.keys(e);let r;const o=n.length;let a;for(r=0;r<o;r++)a=n[r],t[a]=e[a];return t}function Qn(e){function t(n,r,o,a){let i=n[a++];if(i==="__proto__")return!0;const l=Number.isFinite(+i),c=a>=n.length;return i=!i&&h.isArray(o)?o.length:i,c?(h.hasOwnProp(o,i)?o[i]=[o[i],r]:o[i]=r,!l):((!o[i]||!h.isObject(o[i]))&&(o[i]=[]),t(n,r,o[i],a)&&h.isArray(o[i])&&(o[i]=No(o[i])),!l)}if(h.isFormData(e)&&h.isFunction(e.entries)){const n={};return h.forEachEntry(e,(r,o)=>{t(So(r),o,n,0)}),n}return null}function Do(e,t,n){if(h.isString(e))try{return(t||JSON.parse)(e),h.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const He={transitional:Xn,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=h.isObject(t);if(a&&h.isHTMLForm(t)&&(t=new FormData(t)),h.isFormData(t))return o?JSON.stringify(Qn(t)):t;if(h.isArrayBuffer(t)||h.isBuffer(t)||h.isStream(t)||h.isFile(t)||h.isBlob(t)||h.isReadableStream(t))return t;if(h.isArrayBufferView(t))return t.buffer;if(h.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Eo(t,this.formSerializer).toString();if((l=h.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return ct(l?{"files[]":t}:t,c&&new c,this.formSerializer)}}return a||o?(n.setContentType("application/json",!1),Do(t)):t}],transformResponse:[function(t){const n=this.transitional||He.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(h.isResponse(t)||h.isReadableStream(t))return t;if(t&&h.isString(t)&&(r&&!this.responseType||o)){const i=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(l){if(i)throw l.name==="SyntaxError"?O.from(l,O.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:j.classes.FormData,Blob:j.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};h.forEach(["delete","get","head","post","put","patch"],e=>{He.headers[e]={}});const Vo=h.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"]),Oo=e=>{const t={};let n,r,o;return e&&e.split(`
2
+ `).forEach(function(i){o=i.indexOf(":"),n=i.substring(0,o).trim().toLowerCase(),r=i.substring(o+1).trim(),!(!n||t[n]&&Vo[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},er=Symbol("internals");function ze(e){return e&&String(e).trim().toLowerCase()}function dt(e){return e===!1||e==null?e:h.isArray(e)?e.map(dt):String(e)}function Mo(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Co=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function qt(e,t,n,r,o){if(h.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!h.isString(t)){if(h.isString(r))return t.indexOf(r)!==-1;if(h.isRegExp(r))return r.test(t)}}function To(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Bo(e,t){const n=h.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,a,i){return this[r].call(this,t,o,a,i)},configurable:!0})})}let q=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function a(l,c,d){const u=ze(c);if(!u)throw new Error("header name must be a non-empty string");const f=h.findKey(o,u);(!f||o[f]===void 0||d===!0||d===void 0&&o[f]!==!1)&&(o[f||c]=dt(l))}const i=(l,c)=>h.forEach(l,(d,u)=>a(d,u,c));if(h.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(h.isString(t)&&(t=t.trim())&&!Co(t))i(Oo(t),n);else if(h.isObject(t)&&h.isIterable(t)){let l={},c,d;for(const u of t){if(!h.isArray(u))throw TypeError("Object iterator must return a key-value pair");l[d=u[0]]=(c=l[d])?h.isArray(c)?[...c,u[1]]:[c,u[1]]:u[1]}i(l,n)}else t!=null&&a(n,t,r);return this}get(t,n){if(t=ze(t),t){const r=h.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return Mo(o);if(h.isFunction(n))return n.call(this,o,r);if(h.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ze(t),t){const r=h.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||qt(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function a(i){if(i=ze(i),i){const l=h.findKey(r,i);l&&(!n||qt(r,r[l],l,n))&&(delete r[l],o=!0)}}return h.isArray(t)?t.forEach(a):a(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const a=n[r];(!t||qt(this,this[a],a,t,!0))&&(delete this[a],o=!0)}return o}normalize(t){const n=this,r={};return h.forEach(this,(o,a)=>{const i=h.findKey(r,a);if(i){n[i]=dt(o),delete n[a];return}const l=t?To(a):String(a).trim();l!==a&&delete n[a],n[l]=dt(o),r[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return h.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&h.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
3
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[er]=this[er]={accessors:{}}).accessors,o=this.prototype;function a(i){const l=ze(i);r[l]||(Bo(o,i),r[l]=!0)}return h.isArray(t)?t.forEach(a):a(t),this}};q.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),h.reduceDescriptors(q.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),h.freezeMethods(q);function Gt(e,t){const n=this||He,r=t||n,o=q.from(r.headers);let a=r.data;return h.forEach(e,function(l){a=l.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function tr(e){return!!(e&&e.__CANCEL__)}function Be(e,t,n){O.call(this,e??"canceled",O.ERR_CANCELED,t,n),this.name="CanceledError"}h.inherits(Be,O,{__CANCEL__:!0});function nr(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new O("Request failed with status code "+n.status,[O.ERR_BAD_REQUEST,O.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function $o(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Ro(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,a=0,i;return t=t!==void 0?t:1e3,function(c){const d=Date.now(),u=r[a];i||(i=d),n[o]=c,r[o]=d;let f=a,_=0;for(;f!==o;)_+=n[f++],f=f%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),d-i<t)return;const w=u&&d-u;return w?Math.round(_*1e3/w):void 0}}function Fo(e,t){let n=0,r=1e3/t,o,a;const i=(d,u=Date.now())=>{n=u,o=null,a&&(clearTimeout(a),a=null),e.apply(null,d)};return[(...d)=>{const u=Date.now(),f=u-n;f>=r?i(d,u):(o=d,a||(a=setTimeout(()=>{a=null,i(o)},r-f)))},()=>o&&i(o)]}const ut=(e,t,n=3)=>{let r=0;const o=Ro(50,250);return Fo(a=>{const i=a.loaded,l=a.lengthComputable?a.total:void 0,c=i-r,d=o(c),u=i<=l;r=i;const f={loaded:i,total:l,progress:l?i/l:void 0,bytes:c,rate:d||void 0,estimated:d&&l&&u?(l-i)/d:void 0,event:a,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(f)},n)},rr=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},sr=e=>(...t)=>h.asap(()=>e(...t)),Yo=j.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,j.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(j.origin),j.navigator&&/(msie|trident)/i.test(j.navigator.userAgent)):()=>!0,Po=j.hasStandardBrowserEnv?{write(e,t,n,r,o,a){const i=[e+"="+encodeURIComponent(t)];h.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),h.isString(r)&&i.push("path="+r),h.isString(o)&&i.push("domain="+o),a===!0&&i.push("secure"),document.cookie=i.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 Ao(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function vo(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function or(e,t,n){let r=!Ao(t);return e&&(r||n==!1)?vo(e,t):t}const ar=e=>e instanceof q?{...e}:e;function Se(e,t){t=t||{};const n={};function r(d,u,f,_){return h.isPlainObject(d)&&h.isPlainObject(u)?h.merge.call({caseless:_},d,u):h.isPlainObject(u)?h.merge({},u):h.isArray(u)?u.slice():u}function o(d,u,f,_){if(h.isUndefined(u)){if(!h.isUndefined(d))return r(void 0,d,f,_)}else return r(d,u,f,_)}function a(d,u){if(!h.isUndefined(u))return r(void 0,u)}function i(d,u){if(h.isUndefined(u)){if(!h.isUndefined(d))return r(void 0,d)}else return r(void 0,u)}function l(d,u,f){if(f in t)return r(d,u);if(f in e)return r(void 0,d)}const c={url:a,method:a,data:a,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:l,headers:(d,u,f)=>o(ar(d),ar(u),f,!0)};return h.forEach(Object.keys(Object.assign({},e,t)),function(u){const f=c[u]||o,_=f(e[u],t[u],u);h.isUndefined(_)&&f!==l||(n[u]=_)}),n}const ir=e=>{const t=Se({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:a,headers:i,auth:l}=t;t.headers=i=q.from(i),t.url=Zn(or(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&i.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let c;if(h.isFormData(n)){if(j.hasStandardBrowserEnv||j.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((c=i.getContentType())!==!1){const[d,...u]=c?c.split(";").map(f=>f.trim()).filter(Boolean):[];i.setContentType([d||"multipart/form-data",...u].join("; "))}}if(j.hasStandardBrowserEnv&&(r&&h.isFunction(r)&&(r=r(t)),r||r!==!1&&Yo(t.url))){const d=o&&a&&Po.read(a);d&&i.set(o,d)}return t},Lo=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const o=ir(e);let a=o.data;const i=q.from(o.headers).normalize();let{responseType:l,onUploadProgress:c,onDownloadProgress:d}=o,u,f,_,w,m;function y(){w&&w(),m&&m(),o.cancelToken&&o.cancelToken.unsubscribe(u),o.signal&&o.signal.removeEventListener("abort",u)}let p=new XMLHttpRequest;p.open(o.method.toUpperCase(),o.url,!0),p.timeout=o.timeout;function k(){if(!p)return;const g=q.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),V={data:!l||l==="text"||l==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:g,config:e,request:p};nr(function($){n($),y()},function($){r($),y()},V),p=null}"onloadend"in p?p.onloadend=k:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(k)},p.onabort=function(){p&&(r(new O("Request aborted",O.ECONNABORTED,e,p)),p=null)},p.onerror=function(){r(new O("Network Error",O.ERR_NETWORK,e,p)),p=null},p.ontimeout=function(){let D=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const V=o.transitional||Xn;o.timeoutErrorMessage&&(D=o.timeoutErrorMessage),r(new O(D,V.clarifyTimeoutError?O.ETIMEDOUT:O.ECONNABORTED,e,p)),p=null},a===void 0&&i.setContentType(null),"setRequestHeader"in p&&h.forEach(i.toJSON(),function(D,V){p.setRequestHeader(V,D)}),h.isUndefined(o.withCredentials)||(p.withCredentials=!!o.withCredentials),l&&l!=="json"&&(p.responseType=o.responseType),d&&([_,m]=ut(d,!0),p.addEventListener("progress",_)),c&&p.upload&&([f,w]=ut(c),p.upload.addEventListener("progress",f),p.upload.addEventListener("loadend",w)),(o.cancelToken||o.signal)&&(u=g=>{p&&(r(!g||g.type?new Be(null,e,p):g),p.abort(),p=null)},o.cancelToken&&o.cancelToken.subscribe(u),o.signal&&(o.signal.aborted?u():o.signal.addEventListener("abort",u)));const b=$o(o.url);if(b&&j.protocols.indexOf(b)===-1){r(new O("Unsupported protocol "+b+":",O.ERR_BAD_REQUEST,e));return}p.send(a||null)})},Uo=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const a=function(d){if(!o){o=!0,l();const u=d instanceof Error?d:this.reason;r.abort(u instanceof O?u:new Be(u instanceof Error?u.message:u))}};let i=t&&setTimeout(()=>{i=null,a(new O(`timeout ${t} of ms exceeded`,O.ETIMEDOUT))},t);const l=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(a):d.removeEventListener("abort",a)}),e=null)};e.forEach(d=>d.addEventListener("abort",a));const{signal:c}=r;return c.unsubscribe=()=>h.asap(l),c}},Io=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},jo=async function*(e,t){for await(const n of Wo(e))yield*Io(n,t)},Wo=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},lr=(e,t,n,r)=>{const o=jo(e,t);let a=0,i,l=c=>{i||(i=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:d,value:u}=await o.next();if(d){l(),c.close();return}let f=u.byteLength;if(n){let _=a+=f;n(_)}c.enqueue(new Uint8Array(u))}catch(d){throw l(d),d}},cancel(c){return l(c),o.return()}},{highWaterMark:2})},ft=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",cr=ft&&typeof ReadableStream=="function",Ho=ft&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),dr=(e,...t)=>{try{return!!e(...t)}catch{return!1}},zo=cr&&dr(()=>{let e=!1;const t=new Request(j.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),ur=64*1024,Jt=cr&&dr(()=>h.isReadableStream(new Response("").body)),ht={stream:Jt&&(e=>e.body)};ft&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!ht[t]&&(ht[t]=h.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new O(`Response type '${t}' is not supported`,O.ERR_NOT_SUPPORT,r)})})})(new Response);const qo=async e=>{if(e==null)return 0;if(h.isBlob(e))return e.size;if(h.isSpecCompliantForm(e))return(await new Request(j.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(h.isArrayBufferView(e)||h.isArrayBuffer(e))return e.byteLength;if(h.isURLSearchParams(e)&&(e=e+""),h.isString(e))return(await Ho(e)).byteLength},Go=async(e,t)=>{const n=h.toFiniteNumber(e.getContentLength());return n??qo(t)},Zt={http:po,xhr:Lo,fetch:ft&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:a,timeout:i,onDownloadProgress:l,onUploadProgress:c,responseType:d,headers:u,withCredentials:f="same-origin",fetchOptions:_}=ir(e);d=d?(d+"").toLowerCase():"text";let w=Uo([o,a&&a.toAbortSignal()],i),m;const y=w&&w.unsubscribe&&(()=>{w.unsubscribe()});let p;try{if(c&&zo&&n!=="get"&&n!=="head"&&(p=await Go(u,r))!==0){let V=new Request(t,{method:"POST",body:r,duplex:"half"}),P;if(h.isFormData(r)&&(P=V.headers.get("content-type"))&&u.setContentType(P),V.body){const[$,Q]=rr(p,ut(sr(c)));r=lr(V.body,ur,$,Q)}}h.isString(f)||(f=f?"include":"omit");const k="credentials"in Request.prototype;m=new Request(t,{..._,signal:w,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:k?f:void 0});let b=await fetch(m);const g=Jt&&(d==="stream"||d==="response");if(Jt&&(l||g&&y)){const V={};["status","statusText","headers"].forEach(ee=>{V[ee]=b[ee]});const P=h.toFiniteNumber(b.headers.get("content-length")),[$,Q]=l&&rr(P,ut(sr(l),!0))||[];b=new Response(lr(b.body,ur,$,()=>{Q&&Q(),y&&y()}),V)}d=d||"text";let D=await ht[h.findKey(ht,d)||"text"](b,e);return!g&&y&&y(),await new Promise((V,P)=>{nr(V,P,{data:D,headers:q.from(b.headers),status:b.status,statusText:b.statusText,config:e,request:m})})}catch(k){throw y&&y(),k&&k.name==="TypeError"&&/Load failed|fetch/i.test(k.message)?Object.assign(new O("Network Error",O.ERR_NETWORK,e,m),{cause:k.cause||k}):O.from(k,k&&k.code,e,m)}})};h.forEach(Zt,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const fr=e=>`- ${e}`,Jo=e=>h.isFunction(e)||e===null||e===!1,hr={getAdapter:e=>{e=h.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let a=0;a<t;a++){n=e[a];let i;if(r=n,!Jo(n)&&(r=Zt[(i=String(n)).toLowerCase()],r===void 0))throw new O(`Unknown adapter '${i}'`);if(r)break;o[i||"#"+a]=r}if(!r){const a=Object.entries(o).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let i=t?a.length>1?`since :
4
+ `+a.map(fr).join(`
5
+ `):" "+fr(a[0]):"as no adapter specified";throw new O("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return r},adapters:Zt};function Kt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Be(null,e)}function mr(e){return Kt(e),e.headers=q.from(e.headers),e.data=Gt.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),hr.getAdapter(e.adapter||He.adapter)(e).then(function(r){return Kt(e),r.data=Gt.call(e,e.transformResponse,r),r.headers=q.from(r.headers),r},function(r){return tr(r)||(Kt(e),r&&r.response&&(r.response.data=Gt.call(e,e.transformResponse,r.response),r.response.headers=q.from(r.response.headers))),Promise.reject(r)})}const pr="1.9.0",mt={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{mt[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const yr={};mt.transitional=function(t,n,r){function o(a,i){return"[Axios v"+pr+"] Transitional option '"+a+"'"+i+(r?". "+r:"")}return(a,i,l)=>{if(t===!1)throw new O(o(i," has been removed"+(n?" in "+n:"")),O.ERR_DEPRECATED);return n&&!yr[i]&&(yr[i]=!0,console.warn(o(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,i,l):!0}},mt.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Zo(e,t,n){if(typeof e!="object")throw new O("options must be an object",O.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const a=r[o],i=t[a];if(i){const l=e[a],c=l===void 0||i(l,a,e);if(c!==!0)throw new O("option "+a+" must be "+c,O.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new O("Unknown option "+a,O.ERR_BAD_OPTION)}}const pt={assertOptions:Zo,validators:mt},ae=pt.validators;let Ne=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Kn,response:new Kn}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const a=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?a&&!String(r.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(r.stack+=`
6
+ `+a):r.stack=a}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Se(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&pt.assertOptions(r,{silentJSONParsing:ae.transitional(ae.boolean),forcedJSONParsing:ae.transitional(ae.boolean),clarifyTimeoutError:ae.transitional(ae.boolean)},!1),o!=null&&(h.isFunction(o)?n.paramsSerializer={serialize:o}:pt.assertOptions(o,{encode:ae.function,serialize:ae.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),pt.assertOptions(n,{baseUrl:ae.spelling("baseURL"),withXsrfToken:ae.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=a&&h.merge(a.common,a[n.method]);a&&h.forEach(["delete","get","head","post","put","patch","common"],m=>{delete a[m]}),n.headers=q.concat(i,a);const l=[];let c=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(n)===!1||(c=c&&y.synchronous,l.unshift(y.fulfilled,y.rejected))});const d=[];this.interceptors.response.forEach(function(y){d.push(y.fulfilled,y.rejected)});let u,f=0,_;if(!c){const m=[mr.bind(this),void 0];for(m.unshift.apply(m,l),m.push.apply(m,d),_=m.length,u=Promise.resolve(n);f<_;)u=u.then(m[f++],m[f++]);return u}_=l.length;let w=n;for(f=0;f<_;){const m=l[f++],y=l[f++];try{w=m(w)}catch(p){y.call(this,p);break}}try{u=mr.call(this,w)}catch(m){return Promise.reject(m)}for(f=0,_=d.length;f<_;)u=u.then(d[f++],d[f++]);return u}getUri(t){t=Se(this.defaults,t);const n=or(t.baseURL,t.url,t.allowAbsoluteUrls);return Zn(n,t.params,t.paramsSerializer)}};h.forEach(["delete","get","head","options"],function(t){Ne.prototype[t]=function(n,r){return this.request(Se(r||{},{method:t,url:n,data:(r||{}).data}))}}),h.forEach(["post","put","patch"],function(t){function n(r){return function(a,i,l){return this.request(Se(l||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:i}))}}Ne.prototype[t]=n(),Ne.prototype[t+"Form"]=n(!0)});let Ko=class Ms{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(o=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](o);r._listeners=null}),this.promise.then=o=>{let a;const i=new Promise(l=>{r.subscribe(l),a=l}).then(o);return i.cancel=function(){r.unsubscribe(a)},i},t(function(a,i,l){r.reason||(r.reason=new Be(a,i,l),n(r.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)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Ms(function(o){t=o}),cancel:t}}};function Xo(e){return function(n){return e.apply(null,n)}}function Qo(e){return h.isObject(e)&&e.isAxiosError===!0}const Xt={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(Xt).forEach(([e,t])=>{Xt[t]=e});function gr(e){const t=new Ne(e),n=Ce(Ne.prototype.request,t);return h.extend(n,Ne.prototype,t,{allOwnKeys:!0}),h.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return gr(Se(e,o))},n}const C=gr(He);C.Axios=Ne,C.CanceledError=Be,C.CancelToken=Ko,C.isCancel=tr,C.VERSION=pr,C.toFormData=ct,C.AxiosError=O,C.Cancel=C.CanceledError,C.all=function(t){return Promise.all(t)},C.spread=Xo,C.isAxiosError=Qo,C.mergeConfig=Se,C.AxiosHeaders=q,C.formToJSON=e=>Qn(h.isHTMLForm(e)?new FormData(e):e),C.getAdapter=hr.getAdapter,C.HttpStatusCode=Xt,C.default=C;const{Axios:cm,AxiosError:dm,CanceledError:um,isCancel:fm,CancelToken:hm,VERSION:mm,all:pm,Cancel:ym,isAxiosError:gm,spread:_m,toFormData:wm,AxiosHeaders:xm,HttpStatusCode:km,formToJSON:bm,getAdapter:Em,mergeConfig:Sm}=C;/*!
7
+ * vue-router v4.5.1
8
+ * (c) 2025 Eduardo San Martin Morote
9
+ * @license MIT
10
+ */var _r;(function(e){e.pop="pop",e.push="push"})(_r||(_r={}));var wr;(function(e){e.back="back",e.forward="forward",e.unknown=""})(wr||(wr={})),Symbol(process.env.NODE_ENV!=="production"?"navigation failure":"");var xr;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(xr||(xr={})),Symbol(process.env.NODE_ENV!=="production"?"router view location matched":""),Symbol(process.env.NODE_ENV!=="production"?"router view depth":"");const ea=Symbol(process.env.NODE_ENV!=="production"?"router":""),ta=Symbol(process.env.NODE_ENV!=="production"?"route location":"");Symbol(process.env.NODE_ENV!=="production"?"router view location":"");function na(){return s.inject(ea)}function yt(e){return s.inject(ta)}const W=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},ra={},sa={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-arrow-left"};function oa(e,t){return s.openBlock(),s.createElementBlock("svg",sa,t[0]||(t[0]=[s.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),s.createElementVNode("path",{d:"M5 12l14 0"},null,-1),s.createElementVNode("path",{d:"M5 12l6 6"},null,-1),s.createElementVNode("path",{d:"M5 12l6 -6"},null,-1)]))}const kr=W(ra,[["render",oa]]),aa=[{key:"title",placeholder:"Назва колонки українською",ua:"Назва колонки українською",type:"text",slots:{row:'<div class="flex items-center gap-2"><img class="block" height="24" width="30" :src="`https://cdn.softpro.ua/data/npm/admin/column-types/icon-${row?.type?.toLowerCase()}.svg`"/> <span class="text-[12px]">{{ row?.title }}</span></div>'},validators:["required"]},{key:"type",type:"radio",ua:"Тип колонки",view:"buttons",style:{class:"!w-[calc(50%-5px)]"},slots:{label:'<div class="flex items-center justify-start w-full gap-4"><img class="block" height="24" width="30" :src="`https://cdn.softpro.ua/data/npm/admin/column-types/icon-${id?.toLowerCase()}.svg`"/><div class="flex flex-col items-start gap-1"><span class="text-black text-[14px]">{{text}}</span><span class="text-[12px]">{{description}}</span></div></div>'},options:[{id:"Text",text:"Текст",description:"Маленький або довгий текст, наприклад заголовок або опис"},{id:"Number",text:"Цифри",description:"Числа (цілі, з плаваючою точкою, десяткові)"},{id:"Email",text:"Електронна пошта",description:"Поле електронної пошти з фоматом перевірки"},{id:"Date",text:"Дата",description:"Вибір дати з годинами, хвилинами та секундами"},{id:"Switcher",text:"Так/Ні",description:"Так чи ні, 1 або 0, вірно чи хибно"},{id:"File",text:"Файл",description:"Різноманітні файли"},{id:"Select",text:"Селект",description:"Список значень, а потім виберіть одне"},{id:"Badge",text:"Бейдж",description:"Стилізоване значення з переліку"}],validators:["required"]},{key:"enabled",type:"Switcher",ua:"Увімкнено",col:6}],br=[{key:"name",type:"Text",ua:"Назва",placeholder:"Назва",validators:["required"]},{key:"template",type:"Text",ua:"Шаблон",placeholder:"Шаблон",validators:["required"]},{key:"description",type:"Text",ua:"Опис",placeholder:"Опис"}],ia={class:"w-full flex justify-center"},la={class:"p-[20px] w-full max-w-[1440px]"},ca={class:"flex items-center justify-between"},da={class:"mt-[10px]"},ua={class:"flex items-end gap-1"},fa={class:"font-medium text-2xl"},ha={class:"text-gray-600 font-medium text-2xl"},ma={class:"text-gray-600"},pa={class:"flex items-center gap-1"},ya={class:"w-full mt-[20px] bg-white rounded-xl"},ga={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},_a={__name:"vs-builder-content",props:{UPDATE:Object},setup(e){var m;const t=yt(),n=(m=s.getCurrentInstance().proxy)==null?void 0:m.$notify,r=e,o=s.computed(()=>{var y;return(y=t==null?void 0:t.params)==null?void 0:y.id}),a=s.ref(null),i=s.ref([]),l=s.ref({}),c=s.ref(!1),d=s.ref(),u=async()=>{var y,p,k,b;try{const{data:g}=await C.get(`/api/cms-builder/${o.value}`);a.value=(y=g==null?void 0:g.rows)==null?void 0:y[0],l.value=(p=g==null?void 0:g.rows)==null?void 0:p[0],i.value=((b=(k=g==null?void 0:g.rows)==null?void 0:k[0])==null?void 0:b.columns)||[]}catch{}},f=async()=>{try{await C.put(`/api/cms-builder/${o.value}`,{...a.value,columns:i.value}),await n({type:"success",title:"Успішно!",message:"Дані оновлено успішно"}),await u()}catch(y){console.log(y),await n({type:"error",title:"Помилка!",message:"При спробі оновити дані виникла помилка"})}},_=async()=>{try{await d.value.doValidation(),await C.put(`/api/cms-builder/${o.value}`,l.value),await n({type:"success",title:"Успішно!",message:"Дані оновлено успішно"}),await u(),c.value=!1,r.UPDATE.getList()}catch(y){console.log(y),await n({type:"error",title:"Помилка!",message:"При спробі оновити дані виникла помилка"})}};s.watch(o,u),s.onMounted(()=>u());const w={key:"type",type:"Autocomplete",ua:"Тип",searchable:!1,options:[{id:"single",text:"Одиночний тип"},{id:"collection",text:"Колекція"}]};return(y,p)=>{var D,V,P;const k=s.resolveComponent("VsDataTable"),b=s.resolveComponent("VsForm"),g=s.resolveComponent("VsDialog");return s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createElementVNode("div",ia,[s.createElementVNode("div",la,[s.createElementVNode("button",{onClick:p[0]||(p[0]=$=>y.$router.back()),class:"text-blue-500 flex gap-2 items-center hover:text-blue-700 duration-300"},[s.createVNode(kr),p[6]||(p[6]=s.createTextVNode(" Повернутися назад "))]),s.createElementVNode("div",ca,[s.createElementVNode("div",da,[s.createElementVNode("div",ua,[s.createElementVNode("h2",fa,s.toDisplayString((D=a.value)==null?void 0:D.name)+" -",1),s.createElementVNode("span",ha,s.toDisplayString((V=a.value)==null?void 0:V.template),1)]),s.createElementVNode("p",ma,s.toDisplayString((P=a.value)==null?void 0:P.description),1)]),s.createElementVNode("div",pa,[s.createElementVNode("button",{onClick:p[1]||(p[1]=$=>c.value=!0),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Редагувати "),s.createElementVNode("button",{onClick:f,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),s.createElementVNode("div",null,[s.createElementVNode("div",ya,[s.createVNode(k,{class:"w-full",colModel:s.unref(aa),modelValue:i.value,"onUpdate:modelValue":p[2]||(p[2]=$=>i.value=$),addition:!1,import:!1,additionBottom:!0},null,8,["colModel","modelValue"])])])])]),s.createVNode(g,{title:"Редагувати",visible:c.value,"onUpdate:visible":p[5]||(p[5]=$=>c.value=$)},{footer:s.withCtx(()=>[s.createElementVNode("div",ga,[s.createElementVNode("button",{onClick:p[4]||(p[4]=$=>c.value=!1),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border rounded-lg border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати"),s.createElementVNode("button",{onClick:_,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:s.withCtx(()=>[s.createElementVNode("div",null,[s.createVNode(b,{modelValue:l.value,"onUpdate:modelValue":p[3]||(p[3]=$=>l.value=$),scheme:[...s.unref(br),w],ref_key:"form",ref:d},null,8,["modelValue","scheme"])])]),_:1},8,["visible"])],64)}}},wa={},xa={xmlns:"http://www.w3.org/2000/svg",width:"5",height:"5",fill:"currentColor",viewBox:"0 0 4 4"};function ka(e,t){return s.openBlock(),s.createElementBlock("svg",xa,t[0]||(t[0]=[s.createElementVNode("rect",{width:"4",height:"4",fill:"currentColor",rx:"2"},null,-1)]))}const Qt=W(wa,[["render",ka]]),ba={},Ea={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-plus"};function Sa(e,t){return s.openBlock(),s.createElementBlock("svg",Ea,t[0]||(t[0]=[s.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),s.createElementVNode("path",{d:"M12 5l0 14"},null,-1),s.createElementVNode("path",{d:"M5 12l14 0"},null,-1)]))}const Er=W(ba,[["render",Sa]]),Na={class:"p-4 w-[260px] border-r h-[100%] overflow-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},Da={class:"flex flex-col space-y-1"},Va={class:"pt-2"},Oa={class:"flex flex-col space-y-1"},Ma={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},Ca={__name:"vs-builder-menu",props:{UPDATE:{},UPDATEModifiers:{}},emits:["update:UPDATE"],setup(e){var f;const t=(f=s.getCurrentInstance().proxy)==null?void 0:f.$notify,n=s.useModel(e,"UPDATE"),r=s.ref(null),o=s.ref(!1),a=s.ref({}),i=s.ref(""),l=s.ref(),c=async()=>{try{const{data:_}=await C.get("/api/cms-builder");r.value=(_==null?void 0:_.rows)||null}catch{}},d=_=>{_==="single"?(a.value={type:"single"},i.value="Створити новий тип"):(a.value={type:"collection"},i.value="Створити колекцію"),o.value=!0},u=async()=>{try{await l.value.doValidation(),await C.post("/api/cms-builder",a.value),await t({type:"success",title:"Успішно!",message:"Об'єкт створено успішно"}),o.value=!1,await c()}catch{await t({type:"error",title:"Помилка!",message:"При спробі створити об'єкт виникла помилка"})}};return c(),s.onMounted(()=>n.value.getList=()=>c()),(_,w)=>{var k,b;const m=s.resolveComponent("router-link"),y=s.resolveComponent("VsForm"),p=s.resolveComponent("VsDialog");return s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createElementVNode("div",Na,[s.createElementVNode("div",null,[w[6]||(w[6]=s.createElementVNode("h2",{v:"",class:"block text-[14px] font-medium text-gray-800 mb-2 dark:text-neutral-200"}," Колекції ",-1)),s.createElementVNode("ul",Da,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList((k=r.value)==null?void 0:k.filter(g=>(g==null?void 0:g.type)=="collection"),g=>{var D,V;return s.openBlock(),s.createElementBlock("li",{key:g==null?void 0:g.id},[s.createVNode(m,{to:`/builder/${g==null?void 0:g.id}`,class:s.normalizeClass([[((V=(D=_.$route)==null?void 0:D.params)==null?void 0:V.id)===(g==null?void 0:g.id)?"bg-gray-200":""],"w-full flex items-center gap-x-3.5 py-2 px-2.5 text-sm text-gray-800 rounded-lg hover:bg-gray-200 focus:outline-none dark:text-white dark:hover:bg-neutral-800 dark:focus:bg-neutral-800"])},{default:s.withCtx(()=>[s.createVNode(Qt,{class:"text-gray-500"}),s.createTextVNode(" "+s.toDisplayString(g==null?void 0:g.name),1)]),_:2},1032,["to","class"])])}),128))]),s.createElementVNode("button",{onClick:w[0]||(w[0]=g=>d("colection")),class:"text-blue-500 flex text-[14px] py-2 px-2 text-nowrap hover:text-blue-700 duration-300 gap-2 items-center"},[s.createVNode(Er,{height:"16",width:"16"}),w[5]||(w[5]=s.createTextVNode(" Створити нову колекцію "))])]),s.createElementVNode("div",Va,[w[8]||(w[8]=s.createElementVNode("h2",{class:"block text-[14px] mb-2 font-medium text-gray-800 dark:text-neutral-200"}," Одиничні типи ",-1)),s.createElementVNode("ul",Oa,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList((b=r.value)==null?void 0:b.filter(g=>(g==null?void 0:g.type)=="single"),g=>{var D,V;return s.openBlock(),s.createElementBlock("li",{key:g==null?void 0:g.id},[s.createVNode(m,{to:`/builder/${g==null?void 0:g.id}`,class:s.normalizeClass([[((V=(D=_.$route)==null?void 0:D.params)==null?void 0:V.id)===(g==null?void 0:g.id)?"bg-gray-200":""],"w-full flex items-center gap-x-3.5 py-2 px-2.5 text-sm text-gray-800 hover:bg-gray-200 rounded-lg focus:outline-none dark:text-white dark:hover:bg-neutral-800 dark:focus:bg-neutral-800"])},{default:s.withCtx(()=>[s.createVNode(Qt,{class:"text-gray-500"}),s.createTextVNode(" "+s.toDisplayString(g==null?void 0:g.name),1)]),_:2},1032,["to","class"])])}),128))]),s.createElementVNode("button",{onClick:w[1]||(w[1]=g=>d("single")),class:"text-blue-500 flex text-[14px] py-2 px-2 hover:text-blue-700 duration-300 gap-2 items-center"},[s.createVNode(Er,{height:"16",width:"16"}),w[7]||(w[7]=s.createTextVNode(" Створити новий тип "))])])]),s.createVNode(p,{visible:o.value,"onUpdate:visible":w[4]||(w[4]=g=>o.value=g),title:i.value},{footer:s.withCtx(()=>[s.createElementVNode("div",Ma,[s.createElementVNode("button",{onClick:w[3]||(w[3]=g=>o.value=!1),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border rounded-lg border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати"),s.createElementVNode("button",{onClick:u,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:s.withCtx(()=>[s.createElementVNode("div",null,[s.createVNode(y,{modelValue:a.value,"onUpdate:modelValue":w[2]||(w[2]=g=>a.value=g),scheme:s.unref(br),ref_key:"form",ref:l},null,8,["modelValue","scheme"])])]),_:1},8,["visible","title"])],64)}}},Ta={props:{title:{type:String,default:()=>"Дані для відображення відсутні"},text:{type:String,default:()=>"Змініть параметри пошуку або спробуйте пізніше"}}},Ba={class:"w-full"},$a={class:"p-5 min-h-[500px] flex flex-col justify-center items-center text-center"},Ra={class:"max-w-sm mx-auto mt-6"},Fa={class:"font-medium text-gray-800 dark:text-neutral-200"},Ya={class:"mt-2 text-sm text-gray-500 dark:text-neutral-500"};function Pa(e,t,n,r,o,a){return s.openBlock(),s.createElementBlock("div",Ba,[s.createElementVNode("div",$a,[t[0]||(t[0]=s.createStaticVNode('<svg class="w-48 mx-auto" viewBox="0 0 178 90" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="27" y="50.5" width="124" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="27" y="50.5" width="124" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-50 dark:stroke-neutral-700/10"></rect><rect x="34.5" y="58" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="61" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="73" width="77" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/30"></rect><rect x="27" y="36" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="39" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="51" width="92" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><g filter="url(#filter1)"><rect x="12" y="6" width="154" height="40" rx="8" fill="currentColor" class="fill-white dark:fill-neutral-800" shape-rendering="crispEdges"></rect><rect x="12.5" y="6.5" width="153" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/60" shape-rendering="crispEdges"></rect><rect x="20" y="14" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="17" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="29" width="106" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect></g><defs><filter id="filter1" x="0" y="0" width="178" height="64" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="6"></feOffset><feGaussianBlur stdDeviation="6"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1187_14810"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1187_14810" result="shape"></feBlend></filter></defs></svg>',1)),s.createElementVNode("div",Ra,[s.createElementVNode("p",Fa,s.toDisplayString(n.title),1),s.createElementVNode("p",Ya,s.toDisplayString(n.text),1)])])])}const gt=W(Ta,[["render",Pa]]),Aa={class:"w-full bg-[#f6f6f9] h-[calc(100vh-60px)]"},va={class:"flex h-full"},La={__name:"vs-builder",setup(e){const t=s.ref({});return(n,r)=>{const o=s.resolveComponent("router-view");return s.openBlock(),s.createElementBlock("div",Aa,[s.createElementVNode("div",va,[s.createVNode(Ca,{UPDATE:t.value,"onUpdate:UPDATE":r[0]||(r[0]=a=>t.value=a)},null,8,["UPDATE"]),s.createVNode(o,null,{default:s.withCtx(({Component:a})=>[a?(s.openBlock(),s.createBlock(s.resolveDynamicComponent(a),{key:0,UPDATE:t.value},null,8,["UPDATE"])):(s.openBlock(),s.createBlock(gt,{key:1,class:"pt-[100px]",text:"Оберіть один з існуючих пунктів меню, або створіть новий"}))]),_:1})])])}}},Ua={class:"p-4 w-[260px] shrink-0 border-r h-[calc(100vh-60px)]"},Ia={class:"flex flex-col space-y-1"},ja={__name:"vs-manager-single-menu",setup(e){const t=s.ref(null);return(async()=>{try{const{data:r}=await C.get("/api/cms-builder");t.value=(r==null?void 0:r.rows)||null}catch{}})(),(r,o)=>{var i;const a=s.resolveComponent("router-link");return s.openBlock(),s.createElementBlock("div",Ua,[o[0]||(o[0]=s.createElementVNode("h2",{class:"block text-[14px] mb-2 font-medium text-gray-800 dark:text-neutral-200"}," Одиничні типи ",-1)),s.createElementVNode("ul",Ia,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList((i=t.value)==null?void 0:i.filter(l=>(l==null?void 0:l.type)=="single"),l=>{var c,d,u;return s.openBlock(),s.createElementBlock("li",{key:(c=r.item)==null?void 0:c.id},[s.createVNode(a,{to:`/manager-single/${l==null?void 0:l.template}`,class:s.normalizeClass([[((u=(d=r.$route)==null?void 0:d.params)==null?void 0:u.template)===(l==null?void 0:l.template)?"bg-gray-200":""],"w-full flex items-center gap-x-3.5 py-2 px-2.5 text-sm text-gray-800 rounded-lg hover:bg-gray-200 focus:outline-none dark:text-white dark:hover:bg-neutral-800 dark:focus:bg-neutral-800"])},{default:s.withCtx(()=>[s.createVNode(Qt,{class:"text-gray-500"}),s.createTextVNode(" "+s.toDisplayString((l==null?void 0:l.name)||(l==null?void 0:l.title)),1)]),_:2},1032,["to","class"])])}),128))])])}}},Wa={class:"w-full bg-[#f6f6f9] h-[calc(100vh-60px)]"},Ha={class:"flex"},za={class:"w-full flex justify-center"},qa={class:"p-[20px] w-full max-w-[1440px]"},Ga={__name:"vs-manager-single",setup(e){return(t,n)=>{const r=s.resolveComponent("VsNotData"),o=s.resolveComponent("router-view");return s.openBlock(),s.createElementBlock("div",Wa,[s.createElementVNode("div",Ha,[s.createVNode(ja),s.createElementVNode("div",za,[s.createElementVNode("div",qa,[s.createVNode(o,null,{default:s.withCtx(({Component:a})=>[a?(s.openBlock(),s.createBlock(s.resolveDynamicComponent(a),{key:0})):(s.openBlock(),s.createBlock(r,{key:1,class:"pt-[100px]",text:"Оберіть один з існуючих пунктів меню, або створіть новий"}))]),_:1})])])])])}}},Ja={class:"w-full flex justify-center bg-gray-100 h-[calc(100vh-60px)]"},Za={class:"p-[20px] w-full max-w-[1440px]"},Ka={class:"flex gap-2 items-center"},Xa={key:0},Qa={key:2},ei={key:3,class:"flex gap-2 items-center hover:text-blue-700 duration-300"},ti={__name:"vs-manager-collection",setup(e){const t=s.ref(null),n=s.ref({firstLevel:"",secondLevel:""});return(async()=>{var o;try{const{data:a}=await C.get("/api/cms-builder");t.value=((o=a==null?void 0:a.rows)==null?void 0:o.filter(i=>(i==null?void 0:i.type)=="collection"))||null}catch{}})(),(o,a)=>{var c,d,u,f,_,w,m,y,p,k,b;const i=s.resolveComponent("router-link"),l=s.resolveComponent("router-view");return s.openBlock(),s.createElementBlock("div",Ja,[s.createElementVNode("div",Za,[s.createElementVNode("div",Ka,[s.createVNode(i,{to:"/manager-collection",class:"flex gap-2 items-center hover:text-blue-700 duration-300"},{default:s.withCtx(()=>a[1]||(a[1]=[s.createTextVNode(" Менеджер колекцій ")])),_:1}),(d=(c=o.$route)==null?void 0:c.params)!=null&&d.template?(s.openBlock(),s.createElementBlock("span",Xa,"/")):s.createCommentVNode("",!0),(f=(u=o.$route)==null?void 0:u.params)!=null&&f.template?(s.openBlock(),s.createBlock(i,{key:1,to:`/manager-collection/${(w=(_=o.$route)==null?void 0:_.params)==null?void 0:w.template}`,class:"flex gap-2 items-center hover:text-blue-700 duration-300"},{default:s.withCtx(()=>{var g;return[s.createTextVNode(s.toDisplayString((g=n.value)==null?void 0:g.firstLevel),1)]}),_:1},8,["to"])):s.createCommentVNode("",!0),(y=(m=o.$route)==null?void 0:m.params)!=null&&y.id?(s.openBlock(),s.createElementBlock("span",Qa,"/")):s.createCommentVNode("",!0),(k=(p=o.$route)==null?void 0:p.params)!=null&&k.id?(s.openBlock(),s.createElementBlock("p",ei,s.toDisplayString((b=n.value)==null?void 0:b.secondLevel),1)):s.createCommentVNode("",!0)]),s.createVNode(l,null,{default:s.withCtx(({Component:g})=>[g?(s.openBlock(),s.createBlock(s.resolveDynamicComponent(g),{key:0,list:t.value,titles:n.value,"onUpdate:titles":a[0]||(a[0]=D=>n.value=D)},null,40,["list","titles"])):(s.openBlock(),s.createBlock(gt,{key:1,class:"pt-[100px]",text:"Оберіть один з існуючих пунктів меню, або створіть новий"}))]),_:1})])])}}};//! moment.js
11
+ //! version : 2.30.1
12
+ //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
13
+ //! license : MIT
14
+ //! momentjs.com
15
+ var Sr;function E(){return Sr.apply(null,arguments)}function ni(e){Sr=e}function ne(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function De(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function R(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function en(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(R(e,t))return!1;return!0}function G(e){return e===void 0}function ue(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function qe(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function Nr(e,t){var n=[],r,o=e.length;for(r=0;r<o;++r)n.push(t(e[r],r));return n}function xe(e,t){for(var n in t)R(t,n)&&(e[n]=t[n]);return R(t,"toString")&&(e.toString=t.toString),R(t,"valueOf")&&(e.valueOf=t.valueOf),e}function ie(e,t,n,r){return Xr(e,t,n,r,!0).utc()}function ri(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function M(e){return e._pf==null&&(e._pf=ri()),e._pf}var tn;Array.prototype.some?tn=Array.prototype.some:tn=function(e){var t=Object(this),n=t.length>>>0,r;for(r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};function nn(e){var t=null,n=!1,r=e._d&&!isNaN(e._d.getTime());if(r&&(t=M(e),n=tn.call(t.parsedDateParts,function(o){return o!=null}),r=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n),e._strict&&(r=r&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=r;else return r;return e._isValid}function _t(e){var t=ie(NaN);return e!=null?xe(M(t),e):M(t).userInvalidated=!0,t}var Dr=E.momentProperties=[],rn=!1;function sn(e,t){var n,r,o,a=Dr.length;if(G(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),G(t._i)||(e._i=t._i),G(t._f)||(e._f=t._f),G(t._l)||(e._l=t._l),G(t._strict)||(e._strict=t._strict),G(t._tzm)||(e._tzm=t._tzm),G(t._isUTC)||(e._isUTC=t._isUTC),G(t._offset)||(e._offset=t._offset),G(t._pf)||(e._pf=M(t)),G(t._locale)||(e._locale=t._locale),a>0)for(n=0;n<a;n++)r=Dr[n],o=t[r],G(o)||(e[r]=o);return e}function Ge(e){sn(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),rn===!1&&(rn=!0,E.updateOffset(this),rn=!1)}function re(e){return e instanceof Ge||e!=null&&e._isAMomentObject!=null}function Vr(e){E.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function Z(e,t){var n=!0;return xe(function(){if(E.deprecationHandler!=null&&E.deprecationHandler(null,e),n){var r=[],o,a,i,l=arguments.length;for(a=0;a<l;a++){if(o="",typeof arguments[a]=="object"){o+=`
16
+ [`+a+"] ";for(i in arguments[0])R(arguments[0],i)&&(o+=i+": "+arguments[0][i]+", ");o=o.slice(0,-2)}else o=arguments[a];r.push(o)}Vr(e+`
17
+ Arguments: `+Array.prototype.slice.call(r).join("")+`
18
+ `+new Error().stack),n=!1}return t.apply(this,arguments)},t)}var Or={};function Mr(e,t){E.deprecationHandler!=null&&E.deprecationHandler(e,t),Or[e]||(Vr(t),Or[e]=!0)}E.suppressDeprecationWarnings=!1,E.deprecationHandler=null;function le(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function si(e){var t,n;for(n in e)R(e,n)&&(t=e[n],le(t)?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function on(e,t){var n=xe({},e),r;for(r in t)R(t,r)&&(De(e[r])&&De(t[r])?(n[r]={},xe(n[r],e[r]),xe(n[r],t[r])):t[r]!=null?n[r]=t[r]:delete n[r]);for(r in e)R(e,r)&&!R(t,r)&&De(e[r])&&(n[r]=xe({},n[r]));return n}function an(e){e!=null&&this.set(e)}var ln;Object.keys?ln=Object.keys:ln=function(e){var t,n=[];for(t in e)R(e,t)&&n.push(t);return n};var oi={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function ai(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return le(r)?r.call(t,n):r}function ce(e,t,n){var r=""+Math.abs(e),o=t-r.length,a=e>=0;return(a?n?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+r}var cn=/(\[[^\[]*\])|(\\)?([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,wt=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,dn={},$e={};function N(e,t,n,r){var o=r;typeof r=="string"&&(o=function(){return this[r]()}),e&&($e[e]=o),t&&($e[t[0]]=function(){return ce(o.apply(this,arguments),t[1],t[2])}),n&&($e[n]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function ii(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function li(e){var t=e.match(cn),n,r;for(n=0,r=t.length;n<r;n++)$e[t[n]]?t[n]=$e[t[n]]:t[n]=ii(t[n]);return function(o){var a="",i;for(i=0;i<r;i++)a+=le(t[i])?t[i].call(o,e):t[i];return a}}function xt(e,t){return e.isValid()?(t=Cr(t,e.localeData()),dn[t]=dn[t]||li(t),dn[t](e)):e.localeData().invalidDate()}function Cr(e,t){var n=5;function r(o){return t.longDateFormat(o)||o}for(wt.lastIndex=0;n>=0&&wt.test(e);)e=e.replace(wt,r),wt.lastIndex=0,n-=1;return e}var ci={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 di(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(cn).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var ui="Invalid date";function fi(){return this._invalidDate}var hi="%d",mi=/\d{1,2}/;function pi(e){return this._ordinal.replace("%d",e)}var yi={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 gi(e,t,n,r){var o=this._relativeTime[n];return le(o)?o(e,t,n,r):o.replace(/%d/i,e)}function _i(e,t){var n=this._relativeTime[e>0?"future":"past"];return le(n)?n(t):n.replace(/%s/i,t)}var Tr={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 K(e){return typeof e=="string"?Tr[e]||Tr[e.toLowerCase()]:void 0}function un(e){var t={},n,r;for(r in e)R(e,r)&&(n=K(r),n&&(t[n]=e[r]));return t}var wi={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 xi(e){var t=[],n;for(n in e)R(e,n)&&t.push({unit:n,priority:wi[n]});return t.sort(function(r,o){return r.priority-o.priority}),t}var Br=/\d/,J=/\d\d/,$r=/\d{3}/,fn=/\d{4}/,kt=/[+-]?\d{6}/,A=/\d\d?/,Rr=/\d\d\d\d?/,Fr=/\d\d\d\d\d\d?/,bt=/\d{1,3}/,hn=/\d{1,4}/,Et=/[+-]?\d{1,6}/,Re=/\d+/,St=/[+-]?\d+/,ki=/Z|[+-]\d\d:?\d\d/gi,Nt=/Z|[+-]\d\d(?::?\d\d)?/gi,bi=/[+-]?\d+(\.\d{1,3})?/,Je=/[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,Fe=/^[1-9]\d?/,mn=/^([1-9]\d|\d)/,Dt;Dt={};function S(e,t,n){Dt[e]=le(t)?t:function(r,o){return r&&n?n:t}}function Ei(e,t){return R(Dt,e)?Dt[e](t._strict,t._locale):new RegExp(Si(e))}function Si(e){return fe(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,n,r,o,a){return n||r||o||a}))}function fe(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function X(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function T(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=X(t)),n}var pn={};function Y(e,t){var n,r=t,o;for(typeof e=="string"&&(e=[e]),ue(t)&&(r=function(a,i){i[t]=T(a)}),o=e.length,n=0;n<o;n++)pn[e[n]]=r}function Ze(e,t){Y(e,function(n,r,o,a){o._w=o._w||{},t(n,o._w,o,a)})}function Ni(e,t,n){t!=null&&R(pn,e)&&pn[e](t,n._a,n,e)}function Vt(e){return e%4===0&&e%100!==0||e%400===0}var H=0,he=1,de=2,I=3,se=4,me=5,Ve=6,Di=7,Vi=8;N("Y",0,0,function(){var e=this.year();return e<=9999?ce(e,4):"+"+e}),N(0,["YY",2],0,function(){return this.year()%100}),N(0,["YYYY",4],0,"year"),N(0,["YYYYY",5],0,"year"),N(0,["YYYYYY",6,!0],0,"year"),S("Y",St),S("YY",A,J),S("YYYY",hn,fn),S("YYYYY",Et,kt),S("YYYYYY",Et,kt),Y(["YYYYY","YYYYYY"],H),Y("YYYY",function(e,t){t[H]=e.length===2?E.parseTwoDigitYear(e):T(e)}),Y("YY",function(e,t){t[H]=E.parseTwoDigitYear(e)}),Y("Y",function(e,t){t[H]=parseInt(e,10)});function Ke(e){return Vt(e)?366:365}E.parseTwoDigitYear=function(e){return T(e)+(T(e)>68?1900:2e3)};var Yr=Ye("FullYear",!0);function Oi(){return Vt(this.year())}function Ye(e,t){return function(n){return n!=null?(Pr(this,e,n),E.updateOffset(this,t),this):Xe(this,e)}}function Xe(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function Pr(e,t,n){var r,o,a,i,l;if(!(!e.isValid()||isNaN(n))){switch(r=e._d,o=e._isUTC,t){case"Milliseconds":return void(o?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(o?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(o?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(o?r.setUTCHours(n):r.setHours(n));case"Date":return void(o?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}a=n,i=e.month(),l=e.date(),l=l===29&&i===1&&!Vt(a)?28:l,o?r.setUTCFullYear(a,i,l):r.setFullYear(a,i,l)}}function Mi(e){return e=K(e),le(this[e])?this[e]():this}function Ci(e,t){if(typeof e=="object"){e=un(e);var n=xi(e),r,o=n.length;for(r=0;r<o;r++)this[n[r].unit](e[n[r].unit])}else if(e=K(e),le(this[e]))return this[e](t);return this}function Ti(e,t){return(e%t+t)%t}var U;Array.prototype.indexOf?U=Array.prototype.indexOf:U=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function yn(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=Ti(t,12);return e+=(t-n)/12,n===1?Vt(e)?29:28:31-n%7%2}N("M",["MM",2],"Mo",function(){return this.month()+1}),N("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),N("MMMM",0,0,function(e){return this.localeData().months(this,e)}),S("M",A,Fe),S("MM",A,J),S("MMM",function(e,t){return t.monthsShortRegex(e)}),S("MMMM",function(e,t){return t.monthsRegex(e)}),Y(["M","MM"],function(e,t){t[he]=T(e)-1}),Y(["MMM","MMMM"],function(e,t,n,r){var o=n._locale.monthsParse(e,r,n._strict);o!=null?t[he]=o:M(n).invalidMonth=e});var Bi="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Ar="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),vr=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,$i=Je,Ri=Je;function Fi(e,t){return e?ne(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||vr).test(t)?"format":"standalone"][e.month()]:ne(this._months)?this._months:this._months.standalone}function Yi(e,t){return e?ne(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[vr.test(t)?"format":"standalone"][e.month()]:ne(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function Pi(e,t,n){var r,o,a,i=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)a=ie([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(a,"").toLocaleLowerCase();return n?t==="MMM"?(o=U.call(this._shortMonthsParse,i),o!==-1?o:null):(o=U.call(this._longMonthsParse,i),o!==-1?o:null):t==="MMM"?(o=U.call(this._shortMonthsParse,i),o!==-1?o:(o=U.call(this._longMonthsParse,i),o!==-1?o:null)):(o=U.call(this._longMonthsParse,i),o!==-1?o:(o=U.call(this._shortMonthsParse,i),o!==-1?o:null))}function Ai(e,t,n){var r,o,a;if(this._monthsParseExact)return Pi.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(o=ie([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),!n&&!this._monthsParse[r]&&(a="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[r]=new RegExp(a.replace(".",""),"i")),n&&t==="MMMM"&&this._longMonthsParse[r].test(e))return r;if(n&&t==="MMM"&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}}function Lr(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=T(t);else if(t=e.localeData().monthsParse(t),!ue(t))return e}var n=t,r=e.date();return r=r<29?r:Math.min(r,yn(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,r):e._d.setMonth(n,r),e}function Ur(e){return e!=null?(Lr(this,e),E.updateOffset(this,!0),this):Xe(this,"Month")}function vi(){return yn(this.year(),this.month())}function Li(e){return this._monthsParseExact?(R(this,"_monthsRegex")||Ir.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(R(this,"_monthsShortRegex")||(this._monthsShortRegex=$i),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function Ui(e){return this._monthsParseExact?(R(this,"_monthsRegex")||Ir.call(this),e?this._monthsStrictRegex:this._monthsRegex):(R(this,"_monthsRegex")||(this._monthsRegex=Ri),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function Ir(){function e(c,d){return d.length-c.length}var t=[],n=[],r=[],o,a,i,l;for(o=0;o<12;o++)a=ie([2e3,o]),i=fe(this.monthsShort(a,"")),l=fe(this.months(a,"")),t.push(i),n.push(l),r.push(l),r.push(i);t.sort(e),n.sort(e),r.sort(e),this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Ii(e,t,n,r,o,a,i){var l;return e<100&&e>=0?(l=new Date(e+400,t,n,r,o,a,i),isFinite(l.getFullYear())&&l.setFullYear(e)):l=new Date(e,t,n,r,o,a,i),l}function Qe(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 Ot(e,t,n){var r=7+t-n,o=(7+Qe(e,0,r).getUTCDay()-t)%7;return-o+r-1}function jr(e,t,n,r,o){var a=(7+n-r)%7,i=Ot(e,r,o),l=1+7*(t-1)+a+i,c,d;return l<=0?(c=e-1,d=Ke(c)+l):l>Ke(e)?(c=e+1,d=l-Ke(e)):(c=e,d=l),{year:c,dayOfYear:d}}function et(e,t,n){var r=Ot(e.year(),t,n),o=Math.floor((e.dayOfYear()-r-1)/7)+1,a,i;return o<1?(i=e.year()-1,a=o+pe(i,t,n)):o>pe(e.year(),t,n)?(a=o-pe(e.year(),t,n),i=e.year()+1):(i=e.year(),a=o),{week:a,year:i}}function pe(e,t,n){var r=Ot(e,t,n),o=Ot(e+1,t,n);return(Ke(e)-r+o)/7}N("w",["ww",2],"wo","week"),N("W",["WW",2],"Wo","isoWeek"),S("w",A,Fe),S("ww",A,J),S("W",A,Fe),S("WW",A,J),Ze(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=T(e)});function ji(e){return et(e,this._week.dow,this._week.doy).week}var Wi={dow:0,doy:6};function Hi(){return this._week.dow}function zi(){return this._week.doy}function qi(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function Gi(e){var t=et(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}N("d",0,"do","day"),N("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),N("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),N("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),N("e",0,0,"weekday"),N("E",0,0,"isoWeekday"),S("d",A),S("e",A),S("E",A),S("dd",function(e,t){return t.weekdaysMinRegex(e)}),S("ddd",function(e,t){return t.weekdaysShortRegex(e)}),S("dddd",function(e,t){return t.weekdaysRegex(e)}),Ze(["dd","ddd","dddd"],function(e,t,n,r){var o=n._locale.weekdaysParse(e,r,n._strict);o!=null?t.d=o:M(n).invalidWeekday=e}),Ze(["d","e","E"],function(e,t,n,r){t[r]=T(e)});function Ji(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function Zi(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function gn(e,t){return e.slice(t,7).concat(e.slice(0,t))}var Ki="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Wr="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Xi="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Qi=Je,el=Je,tl=Je;function nl(e,t){var n=ne(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?gn(n,this._week.dow):e?n[e.day()]:n}function rl(e){return e===!0?gn(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function sl(e){return e===!0?gn(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function ol(e,t,n){var r,o,a,i=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=ie([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return n?t==="dddd"?(o=U.call(this._weekdaysParse,i),o!==-1?o:null):t==="ddd"?(o=U.call(this._shortWeekdaysParse,i),o!==-1?o:null):(o=U.call(this._minWeekdaysParse,i),o!==-1?o:null):t==="dddd"?(o=U.call(this._weekdaysParse,i),o!==-1||(o=U.call(this._shortWeekdaysParse,i),o!==-1)?o:(o=U.call(this._minWeekdaysParse,i),o!==-1?o:null)):t==="ddd"?(o=U.call(this._shortWeekdaysParse,i),o!==-1||(o=U.call(this._weekdaysParse,i),o!==-1)?o:(o=U.call(this._minWeekdaysParse,i),o!==-1?o:null)):(o=U.call(this._minWeekdaysParse,i),o!==-1||(o=U.call(this._weekdaysParse,i),o!==-1)?o:(o=U.call(this._shortWeekdaysParse,i),o!==-1?o:null))}function al(e,t,n){var r,o,a;if(this._weekdaysParseExact)return ol.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(o=ie([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[r]=new RegExp(a.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function il(e){if(!this.isValid())return e!=null?this:NaN;var t=Xe(this,"Day");return e!=null?(e=Ji(e,this.localeData()),this.add(e-t,"d")):t}function ll(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 cl(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=Zi(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function dl(e){return this._weekdaysParseExact?(R(this,"_weekdaysRegex")||_n.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(R(this,"_weekdaysRegex")||(this._weekdaysRegex=Qi),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function ul(e){return this._weekdaysParseExact?(R(this,"_weekdaysRegex")||_n.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(R(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=el),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function fl(e){return this._weekdaysParseExact?(R(this,"_weekdaysRegex")||_n.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(R(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=tl),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function _n(){function e(u,f){return f.length-u.length}var t=[],n=[],r=[],o=[],a,i,l,c,d;for(a=0;a<7;a++)i=ie([2e3,1]).day(a),l=fe(this.weekdaysMin(i,"")),c=fe(this.weekdaysShort(i,"")),d=fe(this.weekdays(i,"")),t.push(l),n.push(c),r.push(d),o.push(l),o.push(c),o.push(d);t.sort(e),n.sort(e),r.sort(e),o.sort(e),this._weekdaysRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function wn(){return this.hours()%12||12}function hl(){return this.hours()||24}N("H",["HH",2],0,"hour"),N("h",["hh",2],0,wn),N("k",["kk",2],0,hl),N("hmm",0,0,function(){return""+wn.apply(this)+ce(this.minutes(),2)}),N("hmmss",0,0,function(){return""+wn.apply(this)+ce(this.minutes(),2)+ce(this.seconds(),2)}),N("Hmm",0,0,function(){return""+this.hours()+ce(this.minutes(),2)}),N("Hmmss",0,0,function(){return""+this.hours()+ce(this.minutes(),2)+ce(this.seconds(),2)});function Hr(e,t){N(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}Hr("a",!0),Hr("A",!1);function zr(e,t){return t._meridiemParse}S("a",zr),S("A",zr),S("H",A,mn),S("h",A,Fe),S("k",A,Fe),S("HH",A,J),S("hh",A,J),S("kk",A,J),S("hmm",Rr),S("hmmss",Fr),S("Hmm",Rr),S("Hmmss",Fr),Y(["H","HH"],I),Y(["k","kk"],function(e,t,n){var r=T(e);t[I]=r===24?0:r}),Y(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),Y(["h","hh"],function(e,t,n){t[I]=T(e),M(n).bigHour=!0}),Y("hmm",function(e,t,n){var r=e.length-2;t[I]=T(e.substr(0,r)),t[se]=T(e.substr(r)),M(n).bigHour=!0}),Y("hmmss",function(e,t,n){var r=e.length-4,o=e.length-2;t[I]=T(e.substr(0,r)),t[se]=T(e.substr(r,2)),t[me]=T(e.substr(o)),M(n).bigHour=!0}),Y("Hmm",function(e,t,n){var r=e.length-2;t[I]=T(e.substr(0,r)),t[se]=T(e.substr(r))}),Y("Hmmss",function(e,t,n){var r=e.length-4,o=e.length-2;t[I]=T(e.substr(0,r)),t[se]=T(e.substr(r,2)),t[me]=T(e.substr(o))});function ml(e){return(e+"").toLowerCase().charAt(0)==="p"}var pl=/[ap]\.?m?\.?/i,yl=Ye("Hours",!0);function gl(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var qr={calendar:oi,longDateFormat:ci,invalidDate:ui,ordinal:hi,dayOfMonthOrdinalParse:mi,relativeTime:yi,months:Bi,monthsShort:Ar,week:Wi,weekdays:Ki,weekdaysMin:Xi,weekdaysShort:Wr,meridiemParse:pl},L={},tt={},nt;function _l(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function Gr(e){return e&&e.toLowerCase().replace("_","-")}function wl(e){for(var t=0,n,r,o,a;t<e.length;){for(a=Gr(e[t]).split("-"),n=a.length,r=Gr(e[t+1]),r=r?r.split("-"):null;n>0;){if(o=Mt(a.slice(0,n).join("-")),o)return o;if(r&&r.length>=n&&_l(a,r)>=n-1)break;n--}t++}return nt}function xl(e){return!!(e&&e.match("^[^/\\\\]*$"))}function Mt(e){var t=null,n;if(L[e]===void 0&&typeof module<"u"&&module&&module.exports&&xl(e))try{t=nt._abbr,n=require,n("./locale/"+e),ke(t)}catch{L[e]=null}return L[e]}function ke(e,t){var n;return e&&(G(t)?n=ye(e):n=xn(e,t),n?nt=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),nt._abbr}function xn(e,t){if(t!==null){var n,r=qr;if(t.abbr=e,L[e]!=null)Mr("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=L[e]._config;else if(t.parentLocale!=null)if(L[t.parentLocale]!=null)r=L[t.parentLocale]._config;else if(n=Mt(t.parentLocale),n!=null)r=n._config;else return tt[t.parentLocale]||(tt[t.parentLocale]=[]),tt[t.parentLocale].push({name:e,config:t}),null;return L[e]=new an(on(r,t)),tt[e]&&tt[e].forEach(function(o){xn(o.name,o.config)}),ke(e),L[e]}else return delete L[e],null}function kl(e,t){if(t!=null){var n,r,o=qr;L[e]!=null&&L[e].parentLocale!=null?L[e].set(on(L[e]._config,t)):(r=Mt(e),r!=null&&(o=r._config),t=on(o,t),r==null&&(t.abbr=e),n=new an(t),n.parentLocale=L[e],L[e]=n),ke(e)}else L[e]!=null&&(L[e].parentLocale!=null?(L[e]=L[e].parentLocale,e===ke()&&ke(e)):L[e]!=null&&delete L[e]);return L[e]}function ye(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return nt;if(!ne(e)){if(t=Mt(e),t)return t;e=[e]}return wl(e)}function bl(){return ln(L)}function kn(e){var t,n=e._a;return n&&M(e).overflow===-2&&(t=n[he]<0||n[he]>11?he:n[de]<1||n[de]>yn(n[H],n[he])?de:n[I]<0||n[I]>24||n[I]===24&&(n[se]!==0||n[me]!==0||n[Ve]!==0)?I:n[se]<0||n[se]>59?se:n[me]<0||n[me]>59?me:n[Ve]<0||n[Ve]>999?Ve:-1,M(e)._overflowDayOfYear&&(t<H||t>de)&&(t=de),M(e)._overflowWeeks&&t===-1&&(t=Di),M(e)._overflowWeekday&&t===-1&&(t=Vi),M(e).overflow=t),e}var El=/^\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)?)?$/,Sl=/^\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)?)?$/,Nl=/Z|[+-]\d\d(?::?\d\d)?/,Ct=[["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]],bn=[["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/]],Dl=/^\/?Date\((-?\d+)/i,Vl=/^(?:(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}))$/,Ol={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 Jr(e){var t,n,r=e._i,o=El.exec(r)||Sl.exec(r),a,i,l,c,d=Ct.length,u=bn.length;if(o){for(M(e).iso=!0,t=0,n=d;t<n;t++)if(Ct[t][1].exec(o[1])){i=Ct[t][0],a=Ct[t][2]!==!1;break}if(i==null){e._isValid=!1;return}if(o[3]){for(t=0,n=u;t<n;t++)if(bn[t][1].exec(o[3])){l=(o[2]||" ")+bn[t][0];break}if(l==null){e._isValid=!1;return}}if(!a&&l!=null){e._isValid=!1;return}if(o[4])if(Nl.exec(o[4]))c="Z";else{e._isValid=!1;return}e._f=i+(l||"")+(c||""),Sn(e)}else e._isValid=!1}function Ml(e,t,n,r,o,a){var i=[Cl(e),Ar.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(o,10)];return a&&i.push(parseInt(a,10)),i}function Cl(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Tl(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Bl(e,t,n){if(e){var r=Wr.indexOf(e),o=new Date(t[0],t[1],t[2]).getDay();if(r!==o)return M(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}function $l(e,t,n){if(e)return Ol[e];if(t)return 0;var r=parseInt(n,10),o=r%100,a=(r-o)/100;return a*60+o}function Zr(e){var t=Vl.exec(Tl(e._i)),n;if(t){if(n=Ml(t[4],t[3],t[2],t[5],t[6],t[7]),!Bl(t[1],n,e))return;e._a=n,e._tzm=$l(t[8],t[9],t[10]),e._d=Qe.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),M(e).rfc2822=!0}else e._isValid=!1}function Rl(e){var t=Dl.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(Jr(e),e._isValid===!1)delete e._isValid;else return;if(Zr(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:E.createFromInputFallback(e)}E.createFromInputFallback=Z("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function Pe(e,t,n){return e??t??n}function Fl(e){var t=new Date(E.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function En(e){var t,n,r=[],o,a,i;if(!e._d){for(o=Fl(e),e._w&&e._a[de]==null&&e._a[he]==null&&Yl(e),e._dayOfYear!=null&&(i=Pe(e._a[H],o[H]),(e._dayOfYear>Ke(i)||e._dayOfYear===0)&&(M(e)._overflowDayOfYear=!0),n=Qe(i,0,e._dayOfYear),e._a[he]=n.getUTCMonth(),e._a[de]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=o[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[I]===24&&e._a[se]===0&&e._a[me]===0&&e._a[Ve]===0&&(e._nextDay=!0,e._a[I]=0),e._d=(e._useUTC?Qe:Ii).apply(null,r),a=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[I]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==a&&(M(e).weekdayMismatch=!0)}}function Yl(e){var t,n,r,o,a,i,l,c,d;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(a=1,i=4,n=Pe(t.GG,e._a[H],et(v(),1,4).year),r=Pe(t.W,1),o=Pe(t.E,1),(o<1||o>7)&&(c=!0)):(a=e._locale._week.dow,i=e._locale._week.doy,d=et(v(),a,i),n=Pe(t.gg,e._a[H],d.year),r=Pe(t.w,d.week),t.d!=null?(o=t.d,(o<0||o>6)&&(c=!0)):t.e!=null?(o=t.e+a,(t.e<0||t.e>6)&&(c=!0)):o=a),r<1||r>pe(n,a,i)?M(e)._overflowWeeks=!0:c!=null?M(e)._overflowWeekday=!0:(l=jr(n,r,o,a,i),e._a[H]=l.year,e._dayOfYear=l.dayOfYear)}E.ISO_8601=function(){},E.RFC_2822=function(){};function Sn(e){if(e._f===E.ISO_8601){Jr(e);return}if(e._f===E.RFC_2822){Zr(e);return}e._a=[],M(e).empty=!0;var t=""+e._i,n,r,o,a,i,l=t.length,c=0,d,u;for(o=Cr(e._f,e._locale).match(cn)||[],u=o.length,n=0;n<u;n++)a=o[n],r=(t.match(Ei(a,e))||[])[0],r&&(i=t.substr(0,t.indexOf(r)),i.length>0&&M(e).unusedInput.push(i),t=t.slice(t.indexOf(r)+r.length),c+=r.length),$e[a]?(r?M(e).empty=!1:M(e).unusedTokens.push(a),Ni(a,r,e)):e._strict&&!r&&M(e).unusedTokens.push(a);M(e).charsLeftOver=l-c,t.length>0&&M(e).unusedInput.push(t),e._a[I]<=12&&M(e).bigHour===!0&&e._a[I]>0&&(M(e).bigHour=void 0),M(e).parsedDateParts=e._a.slice(0),M(e).meridiem=e._meridiem,e._a[I]=Pl(e._locale,e._a[I],e._meridiem),d=M(e).era,d!==null&&(e._a[H]=e._locale.erasConvertYear(d,e._a[H])),En(e),kn(e)}function Pl(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function Al(e){var t,n,r,o,a,i,l=!1,c=e._f.length;if(c===0){M(e).invalidFormat=!0,e._d=new Date(NaN);return}for(o=0;o<c;o++)a=0,i=!1,t=sn({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[o],Sn(t),nn(t)&&(i=!0),a+=M(t).charsLeftOver,a+=M(t).unusedTokens.length*10,M(t).score=a,l?a<r&&(r=a,n=t):(r==null||a<r||i)&&(r=a,n=t,i&&(l=!0));xe(e,n||t)}function vl(e){if(!e._d){var t=un(e._i),n=t.day===void 0?t.date:t.day;e._a=Nr([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(r){return r&&parseInt(r,10)}),En(e)}}function Ll(e){var t=new Ge(kn(Kr(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Kr(e){var t=e._i,n=e._f;return e._locale=e._locale||ye(e._l),t===null||n===void 0&&t===""?_t({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),re(t)?new Ge(kn(t)):(qe(t)?e._d=t:ne(n)?Al(e):n?Sn(e):Ul(e),nn(e)||(e._d=null),e))}function Ul(e){var t=e._i;G(t)?e._d=new Date(E.now()):qe(t)?e._d=new Date(t.valueOf()):typeof t=="string"?Rl(e):ne(t)?(e._a=Nr(t.slice(0),function(n){return parseInt(n,10)}),En(e)):De(t)?vl(e):ue(t)?e._d=new Date(t):E.createFromInputFallback(e)}function Xr(e,t,n,r,o){var a={};return(t===!0||t===!1)&&(r=t,t=void 0),(n===!0||n===!1)&&(r=n,n=void 0),(De(e)&&en(e)||ne(e)&&e.length===0)&&(e=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=o,a._l=n,a._i=e,a._f=t,a._strict=r,Ll(a)}function v(e,t,n,r){return Xr(e,t,n,r,!1)}var Il=Z("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=v.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:_t()}),jl=Z("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=v.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:_t()});function Qr(e,t){var n,r;if(t.length===1&&ne(t[0])&&(t=t[0]),!t.length)return v();for(n=t[0],r=1;r<t.length;++r)(!t[r].isValid()||t[r][e](n))&&(n=t[r]);return n}function Wl(){var e=[].slice.call(arguments,0);return Qr("isBefore",e)}function Hl(){var e=[].slice.call(arguments,0);return Qr("isAfter",e)}var zl=function(){return Date.now?Date.now():+new Date},rt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function ql(e){var t,n=!1,r,o=rt.length;for(t in e)if(R(e,t)&&!(U.call(rt,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(r=0;r<o;++r)if(e[rt[r]]){if(n)return!1;parseFloat(e[rt[r]])!==T(e[rt[r]])&&(n=!0)}return!0}function Gl(){return this._isValid}function Jl(){return oe(NaN)}function Tt(e){var t=un(e),n=t.year||0,r=t.quarter||0,o=t.month||0,a=t.week||t.isoWeek||0,i=t.day||0,l=t.hour||0,c=t.minute||0,d=t.second||0,u=t.millisecond||0;this._isValid=ql(t),this._milliseconds=+u+d*1e3+c*6e4+l*1e3*60*60,this._days=+i+a*7,this._months=+o+r*3+n*12,this._data={},this._locale=ye(),this._bubble()}function Bt(e){return e instanceof Tt}function Nn(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function Zl(e,t,n){var r=Math.min(e.length,t.length),o=Math.abs(e.length-t.length),a=0,i;for(i=0;i<r;i++)T(e[i])!==T(t[i])&&a++;return a+o}function es(e,t){N(e,0,0,function(){var n=this.utcOffset(),r="+";return n<0&&(n=-n,r="-"),r+ce(~~(n/60),2)+t+ce(~~n%60,2)})}es("Z",":"),es("ZZ",""),S("Z",Nt),S("ZZ",Nt),Y(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Dn(Nt,e)});var Kl=/([\+\-]|\d\d)/gi;function Dn(e,t){var n=(t||"").match(e),r,o,a;return n===null?null:(r=n[n.length-1]||[],o=(r+"").match(Kl)||["-",0,0],a=+(o[1]*60)+T(o[2]),a===0?0:o[0]==="+"?a:-a)}function Vn(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(re(e)||qe(e)?e.valueOf():v(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),E.updateOffset(n,!1),n):v(e).local()}function On(e){return-Math.round(e._d.getTimezoneOffset())}E.updateOffset=function(){};function Xl(e,t,n){var r=this._offset||0,o;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=Dn(Nt,e),e===null)return this}else Math.abs(e)<16&&!n&&(e=e*60);return!this._isUTC&&t&&(o=On(this)),this._offset=e,this._isUTC=!0,o!=null&&this.add(o,"m"),r!==e&&(!t||this._changeInProgress?ss(this,oe(e-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,E.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?r:On(this)}function Ql(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function ec(e){return this.utcOffset(0,e)}function tc(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(On(this),"m")),this}function nc(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=Dn(ki,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function rc(e){return this.isValid()?(e=e?v(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function sc(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function oc(){if(!G(this._isDSTShifted))return this._isDSTShifted;var e={},t;return sn(e,this),e=Kr(e),e._a?(t=e._isUTC?ie(e._a):v(e._a),this._isDSTShifted=this.isValid()&&Zl(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function ac(){return this.isValid()?!this._isUTC:!1}function ic(){return this.isValid()?this._isUTC:!1}function ts(){return this.isValid()?this._isUTC&&this._offset===0:!1}var lc=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,cc=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function oe(e,t){var n=e,r=null,o,a,i;return Bt(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:ue(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=lc.exec(e))?(o=r[1]==="-"?-1:1,n={y:0,d:T(r[de])*o,h:T(r[I])*o,m:T(r[se])*o,s:T(r[me])*o,ms:T(Nn(r[Ve]*1e3))*o}):(r=cc.exec(e))?(o=r[1]==="-"?-1:1,n={y:Oe(r[2],o),M:Oe(r[3],o),w:Oe(r[4],o),d:Oe(r[5],o),h:Oe(r[6],o),m:Oe(r[7],o),s:Oe(r[8],o)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(i=dc(v(n.from),v(n.to)),n={},n.ms=i.milliseconds,n.M=i.months),a=new Tt(n),Bt(e)&&R(e,"_locale")&&(a._locale=e._locale),Bt(e)&&R(e,"_isValid")&&(a._isValid=e._isValid),a}oe.fn=Tt.prototype,oe.invalid=Jl;function Oe(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function ns(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 dc(e,t){var n;return e.isValid()&&t.isValid()?(t=Vn(t,e),e.isBefore(t)?n=ns(e,t):(n=ns(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function rs(e,t){return function(n,r){var o,a;return r!==null&&!isNaN(+r)&&(Mr(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."),a=n,n=r,r=a),o=oe(n,r),ss(this,o,e),this}}function ss(e,t,n,r){var o=t._milliseconds,a=Nn(t._days),i=Nn(t._months);e.isValid()&&(r=r??!0,i&&Lr(e,Xe(e,"Month")+i*n),a&&Pr(e,"Date",Xe(e,"Date")+a*n),o&&e._d.setTime(e._d.valueOf()+o*n),r&&E.updateOffset(e,a||i))}var uc=rs(1,"add"),fc=rs(-1,"subtract");function os(e){return typeof e=="string"||e instanceof String}function hc(e){return re(e)||qe(e)||os(e)||ue(e)||pc(e)||mc(e)||e===null||e===void 0}function mc(e){var t=De(e)&&!en(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],o,a,i=r.length;for(o=0;o<i;o+=1)a=r[o],n=n||R(e,a);return t&&n}function pc(e){var t=ne(e),n=!1;return t&&(n=e.filter(function(r){return!ue(r)&&os(e)}).length===0),t&&n}function yc(e){var t=De(e)&&!en(e),n=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],o,a;for(o=0;o<r.length;o+=1)a=r[o],n=n||R(e,a);return t&&n}function gc(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function _c(e,t){arguments.length===1&&(arguments[0]?hc(arguments[0])?(e=arguments[0],t=void 0):yc(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||v(),r=Vn(n,this).startOf("day"),o=E.calendarFormat(this,r)||"sameElse",a=t&&(le(t[o])?t[o].call(this,n):t[o]);return this.format(a||this.localeData().calendar(o,this,v(n)))}function wc(){return new Ge(this)}function xc(e,t){var n=re(e)?e:v(e);return this.isValid()&&n.isValid()?(t=K(t)||"millisecond",t==="millisecond"?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf()):!1}function kc(e,t){var n=re(e)?e:v(e);return this.isValid()&&n.isValid()?(t=K(t)||"millisecond",t==="millisecond"?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf()):!1}function bc(e,t,n,r){var o=re(e)?e:v(e),a=re(t)?t:v(t);return this.isValid()&&o.isValid()&&a.isValid()?(r=r||"()",(r[0]==="("?this.isAfter(o,n):!this.isBefore(o,n))&&(r[1]===")"?this.isBefore(a,n):!this.isAfter(a,n))):!1}function Ec(e,t){var n=re(e)?e:v(e),r;return this.isValid()&&n.isValid()?(t=K(t)||"millisecond",t==="millisecond"?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(t).valueOf()<=r&&r<=this.clone().endOf(t).valueOf())):!1}function Sc(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Nc(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Dc(e,t,n){var r,o,a;if(!this.isValid())return NaN;if(r=Vn(e,this),!r.isValid())return NaN;switch(o=(r.utcOffset()-this.utcOffset())*6e4,t=K(t),t){case"year":a=$t(this,r)/12;break;case"month":a=$t(this,r);break;case"quarter":a=$t(this,r)/3;break;case"second":a=(this-r)/1e3;break;case"minute":a=(this-r)/6e4;break;case"hour":a=(this-r)/36e5;break;case"day":a=(this-r-o)/864e5;break;case"week":a=(this-r-o)/6048e5;break;default:a=this-r}return n?a:X(a)}function $t(e,t){if(e.date()<t.date())return-$t(t,e);var n=(t.year()-e.year())*12+(t.month()-e.month()),r=e.clone().add(n,"months"),o,a;return t-r<0?(o=e.clone().add(n-1,"months"),a=(t-r)/(r-o)):(o=e.clone().add(n+1,"months"),a=(t-r)/(o-r)),-(n+a)||0}E.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",E.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function Vc(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Oc(e){if(!this.isValid())return null;var t=e!==!0,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?xt(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):le(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",xt(n,"Z")):xt(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Mc(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,o,a;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",o="-MM-DD[T]HH:mm:ss.SSS",a=t+'[")]',this.format(n+r+o+a)}function Cc(e){e||(e=this.isUtc()?E.defaultFormatUtc:E.defaultFormat);var t=xt(this,e);return this.localeData().postformat(t)}function Tc(e,t){return this.isValid()&&(re(e)&&e.isValid()||v(e).isValid())?oe({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Bc(e){return this.from(v(),e)}function $c(e,t){return this.isValid()&&(re(e)&&e.isValid()||v(e).isValid())?oe({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Rc(e){return this.to(v(),e)}function as(e){var t;return e===void 0?this._locale._abbr:(t=ye(e),t!=null&&(this._locale=t),this)}var is=Z("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 ls(){return this._locale}var Rt=1e3,Ae=60*Rt,Ft=60*Ae,cs=(365*400+97)*24*Ft;function ve(e,t){return(e%t+t)%t}function ds(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-cs:new Date(e,t,n).valueOf()}function us(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-cs:Date.UTC(e,t,n)}function Fc(e){var t,n;if(e=K(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?us:ds,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-=ve(t+(this._isUTC?0:this.utcOffset()*Ae),Ft);break;case"minute":t=this._d.valueOf(),t-=ve(t,Ae);break;case"second":t=this._d.valueOf(),t-=ve(t,Rt);break}return this._d.setTime(t),E.updateOffset(this,!0),this}function Yc(e){var t,n;if(e=K(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?us:ds,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+=Ft-ve(t+(this._isUTC?0:this.utcOffset()*Ae),Ft)-1;break;case"minute":t=this._d.valueOf(),t+=Ae-ve(t,Ae)-1;break;case"second":t=this._d.valueOf(),t+=Rt-ve(t,Rt)-1;break}return this._d.setTime(t),E.updateOffset(this,!0),this}function Pc(){return this._d.valueOf()-(this._offset||0)*6e4}function Ac(){return Math.floor(this.valueOf()/1e3)}function vc(){return new Date(this.valueOf())}function Lc(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Uc(){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 Ic(){return this.isValid()?this.toISOString():null}function jc(){return nn(this)}function Wc(){return xe({},M(this))}function Hc(){return M(this).overflow}function zc(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}N("N",0,0,"eraAbbr"),N("NN",0,0,"eraAbbr"),N("NNN",0,0,"eraAbbr"),N("NNNN",0,0,"eraName"),N("NNNNN",0,0,"eraNarrow"),N("y",["y",1],"yo","eraYear"),N("y",["yy",2],0,"eraYear"),N("y",["yyy",3],0,"eraYear"),N("y",["yyyy",4],0,"eraYear"),S("N",Mn),S("NN",Mn),S("NNN",Mn),S("NNNN",rd),S("NNNNN",sd),Y(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var o=n._locale.erasParse(e,r,n._strict);o?M(n).era=o:M(n).invalidEra=e}),S("y",Re),S("yy",Re),S("yyy",Re),S("yyyy",Re),S("yo",od),Y(["y","yy","yyy","yyyy"],H),Y(["yo"],function(e,t,n,r){var o;n._locale._eraYearOrdinalRegex&&(o=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[H]=n._locale.eraYearOrdinalParse(e,o):t[H]=parseInt(e,10)});function qc(e,t){var n,r,o,a=this._eras||ye("en")._eras;for(n=0,r=a.length;n<r;++n){switch(typeof a[n].since){case"string":o=E(a[n].since).startOf("day"),a[n].since=o.valueOf();break}switch(typeof a[n].until){case"undefined":a[n].until=1/0;break;case"string":o=E(a[n].until).startOf("day").valueOf(),a[n].until=o.valueOf();break}}return a}function Gc(e,t,n){var r,o,a=this.eras(),i,l,c;for(e=e.toUpperCase(),r=0,o=a.length;r<o;++r)if(i=a[r].name.toUpperCase(),l=a[r].abbr.toUpperCase(),c=a[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(l===e)return a[r];break;case"NNNN":if(i===e)return a[r];break;case"NNNNN":if(c===e)return a[r];break}else if([i,l,c].indexOf(e)>=0)return a[r]}function Jc(e,t){var n=e.since<=e.until?1:-1;return t===void 0?E(e.since).year():E(e.since).year()+(t-e.offset)*n}function Zc(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].name;return""}function Kc(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].narrow;return""}function Xc(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].abbr;return""}function Qc(){var e,t,n,r,o=this.localeData().eras();for(e=0,t=o.length;e<t;++e)if(n=o[e].since<=o[e].until?1:-1,r=this.clone().startOf("day").valueOf(),o[e].since<=r&&r<=o[e].until||o[e].until<=r&&r<=o[e].since)return(this.year()-E(o[e].since).year())*n+o[e].offset;return this.year()}function ed(e){return R(this,"_erasNameRegex")||Cn.call(this),e?this._erasNameRegex:this._erasRegex}function td(e){return R(this,"_erasAbbrRegex")||Cn.call(this),e?this._erasAbbrRegex:this._erasRegex}function nd(e){return R(this,"_erasNarrowRegex")||Cn.call(this),e?this._erasNarrowRegex:this._erasRegex}function Mn(e,t){return t.erasAbbrRegex(e)}function rd(e,t){return t.erasNameRegex(e)}function sd(e,t){return t.erasNarrowRegex(e)}function od(e,t){return t._eraYearOrdinalRegex||Re}function Cn(){var e=[],t=[],n=[],r=[],o,a,i,l,c,d=this.eras();for(o=0,a=d.length;o<a;++o)i=fe(d[o].name),l=fe(d[o].abbr),c=fe(d[o].narrow),t.push(i),e.push(l),n.push(c),r.push(i),r.push(l),r.push(c);this._erasRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}N(0,["gg",2],0,function(){return this.weekYear()%100}),N(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Yt(e,t){N(0,[e,e.length],0,t)}Yt("gggg","weekYear"),Yt("ggggg","weekYear"),Yt("GGGG","isoWeekYear"),Yt("GGGGG","isoWeekYear"),S("G",St),S("g",St),S("GG",A,J),S("gg",A,J),S("GGGG",hn,fn),S("gggg",hn,fn),S("GGGGG",Et,kt),S("ggggg",Et,kt),Ze(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=T(e)}),Ze(["gg","GG"],function(e,t,n,r){t[r]=E.parseTwoDigitYear(e)});function ad(e){return fs.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function id(e){return fs.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function ld(){return pe(this.year(),1,4)}function cd(){return pe(this.isoWeekYear(),1,4)}function dd(){var e=this.localeData()._week;return pe(this.year(),e.dow,e.doy)}function ud(){var e=this.localeData()._week;return pe(this.weekYear(),e.dow,e.doy)}function fs(e,t,n,r,o){var a;return e==null?et(this,r,o).year:(a=pe(e,r,o),t>a&&(t=a),fd.call(this,e,t,n,r,o))}function fd(e,t,n,r,o){var a=jr(e,t,n,r,o),i=Qe(a.year,0,a.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}N("Q",0,"Qo","quarter"),S("Q",Br),Y("Q",function(e,t){t[he]=(T(e)-1)*3});function hd(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}N("D",["DD",2],"Do","date"),S("D",A,Fe),S("DD",A,J),S("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),Y(["D","DD"],de),Y("Do",function(e,t){t[de]=T(e.match(A)[0])});var hs=Ye("Date",!0);N("DDD",["DDDD",3],"DDDo","dayOfYear"),S("DDD",bt),S("DDDD",$r),Y(["DDD","DDDD"],function(e,t,n){n._dayOfYear=T(e)});function md(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}N("m",["mm",2],0,"minute"),S("m",A,mn),S("mm",A,J),Y(["m","mm"],se);var pd=Ye("Minutes",!1);N("s",["ss",2],0,"second"),S("s",A,mn),S("ss",A,J),Y(["s","ss"],me);var yd=Ye("Seconds",!1);N("S",0,0,function(){return~~(this.millisecond()/100)}),N(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),N(0,["SSS",3],0,"millisecond"),N(0,["SSSS",4],0,function(){return this.millisecond()*10}),N(0,["SSSSS",5],0,function(){return this.millisecond()*100}),N(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),N(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),N(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),N(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),S("S",bt,Br),S("SS",bt,J),S("SSS",bt,$r);var be,ms;for(be="SSSS";be.length<=9;be+="S")S(be,Re);function gd(e,t){t[Ve]=T(("0."+e)*1e3)}for(be="S";be.length<=9;be+="S")Y(be,gd);ms=Ye("Milliseconds",!1),N("z",0,0,"zoneAbbr"),N("zz",0,0,"zoneName");function _d(){return this._isUTC?"UTC":""}function wd(){return this._isUTC?"Coordinated Universal Time":""}var x=Ge.prototype;x.add=uc,x.calendar=_c,x.clone=wc,x.diff=Dc,x.endOf=Yc,x.format=Cc,x.from=Tc,x.fromNow=Bc,x.to=$c,x.toNow=Rc,x.get=Mi,x.invalidAt=Hc,x.isAfter=xc,x.isBefore=kc,x.isBetween=bc,x.isSame=Ec,x.isSameOrAfter=Sc,x.isSameOrBefore=Nc,x.isValid=jc,x.lang=is,x.locale=as,x.localeData=ls,x.max=jl,x.min=Il,x.parsingFlags=Wc,x.set=Ci,x.startOf=Fc,x.subtract=fc,x.toArray=Lc,x.toObject=Uc,x.toDate=vc,x.toISOString=Oc,x.inspect=Mc,typeof Symbol<"u"&&Symbol.for!=null&&(x[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),x.toJSON=Ic,x.toString=Vc,x.unix=Ac,x.valueOf=Pc,x.creationData=zc,x.eraName=Zc,x.eraNarrow=Kc,x.eraAbbr=Xc,x.eraYear=Qc,x.year=Yr,x.isLeapYear=Oi,x.weekYear=ad,x.isoWeekYear=id,x.quarter=x.quarters=hd,x.month=Ur,x.daysInMonth=vi,x.week=x.weeks=qi,x.isoWeek=x.isoWeeks=Gi,x.weeksInYear=dd,x.weeksInWeekYear=ud,x.isoWeeksInYear=ld,x.isoWeeksInISOWeekYear=cd,x.date=hs,x.day=x.days=il,x.weekday=ll,x.isoWeekday=cl,x.dayOfYear=md,x.hour=x.hours=yl,x.minute=x.minutes=pd,x.second=x.seconds=yd,x.millisecond=x.milliseconds=ms,x.utcOffset=Xl,x.utc=ec,x.local=tc,x.parseZone=nc,x.hasAlignedHourOffset=rc,x.isDST=sc,x.isLocal=ac,x.isUtcOffset=ic,x.isUtc=ts,x.isUTC=ts,x.zoneAbbr=_d,x.zoneName=wd,x.dates=Z("dates accessor is deprecated. Use date instead.",hs),x.months=Z("months accessor is deprecated. Use month instead",Ur),x.years=Z("years accessor is deprecated. Use year instead",Yr),x.zone=Z("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Ql),x.isDSTShifted=Z("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",oc);function xd(e){return v(e*1e3)}function kd(){return v.apply(null,arguments).parseZone()}function ps(e){return e}var F=an.prototype;F.calendar=ai,F.longDateFormat=di,F.invalidDate=fi,F.ordinal=pi,F.preparse=ps,F.postformat=ps,F.relativeTime=gi,F.pastFuture=_i,F.set=si,F.eras=qc,F.erasParse=Gc,F.erasConvertYear=Jc,F.erasAbbrRegex=td,F.erasNameRegex=ed,F.erasNarrowRegex=nd,F.months=Fi,F.monthsShort=Yi,F.monthsParse=Ai,F.monthsRegex=Ui,F.monthsShortRegex=Li,F.week=ji,F.firstDayOfYear=zi,F.firstDayOfWeek=Hi,F.weekdays=nl,F.weekdaysMin=sl,F.weekdaysShort=rl,F.weekdaysParse=al,F.weekdaysRegex=dl,F.weekdaysShortRegex=ul,F.weekdaysMinRegex=fl,F.isPM=ml,F.meridiem=gl;function Pt(e,t,n,r){var o=ye(),a=ie().set(r,t);return o[n](a,e)}function ys(e,t,n){if(ue(e)&&(t=e,e=void 0),e=e||"",t!=null)return Pt(e,t,n,"month");var r,o=[];for(r=0;r<12;r++)o[r]=Pt(e,r,n,"month");return o}function Tn(e,t,n,r){typeof e=="boolean"?(ue(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,ue(t)&&(n=t,t=void 0),t=t||"");var o=ye(),a=e?o._week.dow:0,i,l=[];if(n!=null)return Pt(t,(n+a)%7,r,"day");for(i=0;i<7;i++)l[i]=Pt(t,(i+a)%7,r,"day");return l}function bd(e,t){return ys(e,t,"months")}function Ed(e,t){return ys(e,t,"monthsShort")}function Sd(e,t,n){return Tn(e,t,n,"weekdays")}function Nd(e,t,n){return Tn(e,t,n,"weekdaysShort")}function Dd(e,t,n){return Tn(e,t,n,"weekdaysMin")}ke("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=T(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}}),E.lang=Z("moment.lang is deprecated. Use moment.locale instead.",ke),E.langData=Z("moment.langData is deprecated. Use moment.localeData instead.",ye);var ge=Math.abs;function Vd(){var e=this._data;return this._milliseconds=ge(this._milliseconds),this._days=ge(this._days),this._months=ge(this._months),e.milliseconds=ge(e.milliseconds),e.seconds=ge(e.seconds),e.minutes=ge(e.minutes),e.hours=ge(e.hours),e.months=ge(e.months),e.years=ge(e.years),this}function gs(e,t,n,r){var o=oe(t,n);return e._milliseconds+=r*o._milliseconds,e._days+=r*o._days,e._months+=r*o._months,e._bubble()}function Od(e,t){return gs(this,e,t,1)}function Md(e,t){return gs(this,e,t,-1)}function _s(e){return e<0?Math.floor(e):Math.ceil(e)}function Cd(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,o,a,i,l,c;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=_s(Bn(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,o=X(e/1e3),r.seconds=o%60,a=X(o/60),r.minutes=a%60,i=X(a/60),r.hours=i%24,t+=X(i/24),c=X(ws(t)),n+=c,t-=_s(Bn(c)),l=X(n/12),n%=12,r.days=t,r.months=n,r.years=l,this}function ws(e){return e*4800/146097}function Bn(e){return e*146097/4800}function Td(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=K(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+ws(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Bn(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function _e(e){return function(){return this.as(e)}}var xs=_e("ms"),Bd=_e("s"),$d=_e("m"),Rd=_e("h"),Fd=_e("d"),Yd=_e("w"),Pd=_e("M"),Ad=_e("Q"),vd=_e("y"),Ld=xs;function Ud(){return oe(this)}function Id(e){return e=K(e),this.isValid()?this[e+"s"]():NaN}function Me(e){return function(){return this.isValid()?this._data[e]:NaN}}var jd=Me("milliseconds"),Wd=Me("seconds"),Hd=Me("minutes"),zd=Me("hours"),qd=Me("days"),Gd=Me("months"),Jd=Me("years");function Zd(){return X(this.days()/7)}var we=Math.round,Le={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Kd(e,t,n,r,o){return o.relativeTime(t||1,!!n,e,r)}function Xd(e,t,n,r){var o=oe(e).abs(),a=we(o.as("s")),i=we(o.as("m")),l=we(o.as("h")),c=we(o.as("d")),d=we(o.as("M")),u=we(o.as("w")),f=we(o.as("y")),_=a<=n.ss&&["s",a]||a<n.s&&["ss",a]||i<=1&&["m"]||i<n.m&&["mm",i]||l<=1&&["h"]||l<n.h&&["hh",l]||c<=1&&["d"]||c<n.d&&["dd",c];return n.w!=null&&(_=_||u<=1&&["w"]||u<n.w&&["ww",u]),_=_||d<=1&&["M"]||d<n.M&&["MM",d]||f<=1&&["y"]||["yy",f],_[2]=t,_[3]=+e>0,_[4]=r,Kd.apply(null,_)}function Qd(e){return e===void 0?we:typeof e=="function"?(we=e,!0):!1}function eu(e,t){return Le[e]===void 0?!1:t===void 0?Le[e]:(Le[e]=t,e==="s"&&(Le.ss=t-1),!0)}function tu(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=Le,o,a;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},Le,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),o=this.localeData(),a=Xd(this,!n,r,o),n&&(a=o.pastFuture(+this,a)),o.postformat(a)}var $n=Math.abs;function Ue(e){return(e>0)-(e<0)||+e}function At(){if(!this.isValid())return this.localeData().invalidDate();var e=$n(this._milliseconds)/1e3,t=$n(this._days),n=$n(this._months),r,o,a,i,l=this.asSeconds(),c,d,u,f;return l?(r=X(e/60),o=X(r/60),e%=60,r%=60,a=X(n/12),n%=12,i=e?e.toFixed(3).replace(/\.?0+$/,""):"",c=l<0?"-":"",d=Ue(this._months)!==Ue(l)?"-":"",u=Ue(this._days)!==Ue(l)?"-":"",f=Ue(this._milliseconds)!==Ue(l)?"-":"",c+"P"+(a?d+a+"Y":"")+(n?d+n+"M":"")+(t?u+t+"D":"")+(o||r||e?"T":"")+(o?f+o+"H":"")+(r?f+r+"M":"")+(e?f+i+"S":"")):"P0D"}var B=Tt.prototype;B.isValid=Gl,B.abs=Vd,B.add=Od,B.subtract=Md,B.as=Td,B.asMilliseconds=xs,B.asSeconds=Bd,B.asMinutes=$d,B.asHours=Rd,B.asDays=Fd,B.asWeeks=Yd,B.asMonths=Pd,B.asQuarters=Ad,B.asYears=vd,B.valueOf=Ld,B._bubble=Cd,B.clone=Ud,B.get=Id,B.milliseconds=jd,B.seconds=Wd,B.minutes=Hd,B.hours=zd,B.days=qd,B.weeks=Zd,B.months=Gd,B.years=Jd,B.humanize=tu,B.toISOString=At,B.toString=At,B.toJSON=At,B.locale=as,B.localeData=ls,B.toIsoString=Z("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",At),B.lang=is,N("X",0,0,"unix"),N("x",0,0,"valueOf"),S("x",St),S("X",bi),Y("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)}),Y("x",function(e,t,n){n._d=new Date(T(e))});//! moment.js
19
+ E.version="2.30.1",ni(v),E.fn=x,E.min=Wl,E.max=Hl,E.now=zl,E.utc=ie,E.unix=xd,E.months=bd,E.isDate=qe,E.locale=ke,E.invalid=_t,E.duration=oe,E.isMoment=re,E.weekdays=Sd,E.parseZone=kd,E.localeData=ye,E.isDuration=Bt,E.monthsShort=Ed,E.weekdaysMin=Dd,E.defineLocale=xn,E.updateLocale=kl,E.locales=bl,E.weekdaysShort=Nd,E.normalizeUnits=K,E.relativeTimeRounding=Qd,E.relativeTimeThreshold=eu,E.calendarFormat=gc,E.prototype=x,E.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 nu={class:"whitespace-nowrap"},ru={__name:"vs-manager-table-date",props:{value:{type:String,default:()=>""}},setup(e){const t=e,n=s.computed(()=>{if(!t.value)return"-";try{const r=E(t.value,"YYYY-MM-DD");return new Date(r).toLocaleDateString("uk-UA",{day:"2-digit",month:"long",year:"numeric"})}catch{return t.value}});return(r,o)=>(s.openBlock(),s.createElementBlock("div",nu,s.toDisplayString(n.value),1))}},su={},ou={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-check"};function au(e,t,n,r,o,a){return s.openBlock(),s.createElementBlock("svg",ou,t[0]||(t[0]=[s.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),s.createElementVNode("path",{d:"M5 12l5 5l10 -10"},null,-1)]))}const ks=W(su,[["render",au]]),bs={__name:"vs-manager-table-switch",props:{value:{type:Boolean,default:()=>!1}},setup(e){return(t,n)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["w-[20px] h-[20px] rounded-md flex items-center justify-center disabled",[e.value?"bg-blue-400":"border"]])},[s.createVNode(ks,{height:"18",width:"18",class:"text-white"})],2))}},Es={switch:bs,switcher:bs,date:ru},iu={class:"w-full"},lu={key:0,class:"relative min-w-full divide-y-2 divide-gray-200 bg-white text-[12px]"},cu={class:"sticky top-[0px] z-[1] bg-white w-full after:absolute after:content-[''] after:block after:w-full after:h-px after:bg-stone-200"},du={class:"divide-y divide-gray-200 dark:divide-neutral-700"},uu=["onClick"],fu={class:"px-4 py-2 text-gray-700 max-w-[250px] admin-component-is"},hu={__name:"vs-manager-collection-table",props:{objectData:Object,template:String},setup(e){const t=[{ua:"Назва",name:"title",format:"Text"},{ua:"Шлях",name:"url",format:"Text"},{ua:"Чи увімкнений",name:"enabled",format:"Switch"},{ua:"Дата створення",name:"cdate",format:"Date"}];return(n,r)=>{var o,a,i;return s.openBlock(),s.createElementBlock("div",iu,[(a=(o=e.objectData)==null?void 0:o.rows)!=null&&a.length?(s.openBlock(),s.createElementBlock("table",lu,[s.createElementVNode("thead",cu,[s.createElementVNode("tr",null,[(s.openBlock(),s.createElementBlock(s.Fragment,null,s.renderList(t,(l,c)=>s.createElementVNode("th",{key:c,class:"text-start px-4 py-2 font-medium text-gray-900 max-w-[250px]"},s.toDisplayString(l==null?void 0:l.ua),1)),64))])]),s.createElementVNode("tbody",du,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList((i=e.objectData)==null?void 0:i.rows,l=>(s.openBlock(),s.createElementBlock("tr",{class:"odd:bg-gray-50",onClick:c=>n.$router.push(`/manager-collection/${e.template}/${l==null?void 0:l.id}`)},[(s.openBlock(),s.createElementBlock(s.Fragment,null,s.renderList(t,c=>{var d;return s.createElementVNode("td",fu,[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(s.unref(Es)[(d=c==null?void 0:c.format)==null?void 0:d.toLowerCase()]||"div"),{value:l==null?void 0:l[c==null?void 0:c.name]},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(l==null?void 0:l[c==null?void 0:c.name]),1)]),_:2},1032,["value"]))])}),64))],8,uu))),256))])])):(s.openBlock(),s.createBlock(gt,{key:1}))])}}},mu=e=>{const t={а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"e",ж:"zh",з:"z",и:"i",й:"y",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"kh",ц:"ts",ч:"ch",ш:"sh",щ:"shch",ы:"y",э:"e",ю:"yu",я:"ya",ь:"",ъ:"",є:"ye",і:"i",ї:"yi",ґ:"g"};return e.toLowerCase().split("").map(n=>t[n]||n).join("").replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").trim("-")},pu={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},yu={__name:"vs-manager-colection-table-add",props:{template:{type:String,default:()=>""}},emits:["update-list"],setup(e,{emit:t}){const n=s.getCurrentInstance().proxy.$notify,r=t,o=e,a=s.ref(!1),i=s.ref({}),l=s.ref(),c=async()=>{try{await l.value.doValidation(),i.value.url=mu(i.value.title),await C.post(`/api/cms-manager/${o.template}`,i.value),n({type:"success",title:"Успушно!",message:"Об'єкт створено успішно"}),i.value={},a.value=!1,r("update-list")}catch{n({type:"error",title:"Помилка!",message:"При спробі створити об'єкт сталася помилка"})}},d=[{key:"title",ua:"Назва",type:"Text",placeholder:"Назва",validators:["required"]},{key:"body",ua:"Контент",type:"TextEditor",validators:["required"]},{ua:"Чи увімкнений",name:"enabled",type:"Switcher"}];return(u,f)=>{const _=s.resolveComponent("VsForm"),w=s.resolveComponent("VsDialog");return s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createElementVNode("button",{onClick:f[0]||(f[0]=m=>a.value=!0),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Створити "),s.createVNode(w,{title:"Створити об'єкт",visible:a.value,"onUpdate:visible":f[3]||(f[3]=m=>a.value=m)},{footer:s.withCtx(()=>[s.createElementVNode("div",pu,[s.createElementVNode("button",{onClick:f[2]||(f[2]=m=>a.value=!1),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border rounded-lg border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати"),s.createElementVNode("button",{onClick:c,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Створити ")])]),default:s.withCtx(()=>[s.createElementVNode("div",null,[s.createVNode(_,{ref_key:"form",ref:l,scheme:d,modelValue:i.value,"onUpdate:modelValue":f[1]||(f[1]=m=>i.value=m)},null,8,["modelValue"])])]),_:1},8,["visible"])],64)}}},gu=(e,t=300)=>{let n;return function(...r){clearTimeout(n),n=setTimeout(()=>{e.apply(this,r)},t)}},_u={class:"bg-white rounded-xl p-[20px] border mt-[20px]"},wu={class:"mb-4 xl:mb-8"},xu={class:"text-lg font-semibold text-gray-800 dark:text-neutral-200"},ku={class:"text-sm text-gray-500 dark:text-neutral-500"},bu={class:"flex items-center"},Eu={class:"flex justify-end ml-auto items-center"},Su={__name:"vs-manager-collection-content",props:{titles:{},titlesModifiers:{}},emits:["update:titles"],setup(e){const t=yt(),n=s.useModel(e,"titles"),r=s.computed(()=>{var l;return(l=t==null?void 0:t.params)==null?void 0:l.template}),o=s.ref(null),a=async(l=null)=>{var c;try{const{data:d}=await C.get(`/api/cms-manager/${r.value}`,{params:{search:l}});o.value=d,n.value.firstLevel=(c=d==null?void 0:d.type)==null?void 0:c.name}catch{}},i=gu(l=>a(l),300);return s.watch(r,a),s.onMounted(()=>a()),(l,c)=>{var d,u,f,_;return s.openBlock(),s.createElementBlock("div",_u,[s.createElementVNode("div",wu,[s.createElementVNode("h1",xu,s.toDisplayString((u=(d=o.value)==null?void 0:d.type)==null?void 0:u.name),1),s.createElementVNode("p",ku,s.toDisplayString((_=(f=o.value)==null?void 0:f.type)==null?void 0:_.description),1)]),s.createElementVNode("div",bu,[s.createElementVNode("input",{type:"text",onInput:c[0]||(c[0]=({target:w})=>s.unref(i)(w.value)),class:"py-2 px-4 block max-w-[400px] w-full bg-gray-100 border-transparent rounded-lg text-sm focus:outline-2 focus:outline-blue-500 h-[36px] mb-[1px]",placeholder:"Пошук за назвою"},null,32),s.createElementVNode("div",Eu,[s.createVNode(yu,{template:r.value,onUpdateList:a},null,8,["template"])])]),s.createVNode(hu,{objectData:o.value,template:r.value},null,8,["objectData","template"])])}}},Nu={class:"flex items-center justify-between"},Du={class:"mt-[10px]"},Vu={class:"font-medium text-2xl"},Ou={class:"text-gray-600"},Mu={class:"w-full mt-[20px] bg-white rounded-xl p-[20px] border"},Cu={__name:"vs-manager-collection-item",props:{titles:{},titlesModifiers:{}},emits:["update:titles"],setup(e){const t=s.getCurrentInstance().proxy.$notify,n=yt(),r=na(),o=s.computed(()=>{var m;return(m=n==null?void 0:n.params)==null?void 0:m.template}),a=s.computed(()=>{var m;return(m=n==null?void 0:n.params)==null?void 0:m.id}),i=s.ref(null),l=s.ref({}),c=s.useModel(e,"titles"),d=s.ref(1),u=async()=>{var m,y,p,k,b;try{const{data:g}=await C.get(`/api/cms-manager/${o.value}/${a.value}`);i.value=(m=g==null?void 0:g.rows)==null?void 0:m[0],l.value=(y=g==null?void 0:g.rows)==null?void 0:y[0],d.value=d.value+1,c.value.secondLevel=(k=(p=g==null?void 0:g.rows)==null?void 0:p[0])==null?void 0:k.title,c.value.firstLevel=(b=g==null?void 0:g.type)==null?void 0:b.name}catch{}},f=async()=>{try{await C.put(`/api/cms-manager/${a.value}`,l.value),await t({type:"success",title:"Успішно!",message:"Дані успішно оновлено"}),u()}catch{await t({type:"error",title:"Помилка!",message:"При спробі оновити дані виникла помилка"})}},_=async()=>{try{await C.delete(`/api/cms-manager/${a.value}`),await t({type:"success",title:"Успішно!",message:"Об'єкт видалено успішно"}),await(r==null?void 0:r.back())}catch{await t({type:"error",title:"Помилка!",message:"При спробі видалити об'єкт виникла помилка"})}};s.watch(o,u),s.onMounted(()=>u());const w={title:{ua:"Назва",type:"Text",placeholder:"Назва",validators:["required"]},body:{ua:"Контент",type:"TextEditor",validators:["required"]},enabled:{ua:"Чи увімкнений",type:"Switcher"}};return(m,y)=>{var k,b;const p=s.resolveComponent("VsForm");return s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createElementVNode("div",Nu,[s.createElementVNode("div",Du,[s.createElementVNode("h2",Vu,s.toDisplayString((k=i.value)==null?void 0:k.title),1),s.createElementVNode("p",Ou,s.toDisplayString((b=i.value)==null?void 0:b.description),1)]),s.createElementVNode("div",{class:"flex items-center gap-1"},[s.createElementVNode("button",{onClick:_,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-red-500 rounded-lg !border-gray-200 hover:bg-red-700 duration-300"}," Видалити "),s.createElementVNode("button",{onClick:f,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),s.createElementVNode("div",null,[s.createElementVNode("div",Mu,[(s.openBlock(),s.createBlock(p,{key:d.value,class:"w-full",scheme:w,modelValue:l.value,"onUpdate:modelValue":y[0]||(y[0]=g=>l.value=g)},null,8,["modelValue"]))])])],64)}}},Tu={class:"flex items-center justify-between"},Bu={class:"mt-[10px]"},$u={class:"font-medium text-2xl"},Ru={class:"text-gray-600"},Fu={class:"w-full mt-[20px] bg-white rounded-xl p-[20px] border"},Yu={__name:"vs-manager-single-content",setup(e){const t=yt(),n=s.computed(()=>{var d;return(d=t==null?void 0:t.params)==null?void 0:d.template}),r=s.ref(null),o=s.ref({}),a=s.ref(1),i=async()=>{var d,u;try{const{data:f}=await C.get(`/api/cms-manager/${n.value}`);r.value=(d=f==null?void 0:f.rows)==null?void 0:d[0],o.value=(u=f==null?void 0:f.rows)==null?void 0:u[0],a.value=a.value+1}catch{}},l=async()=>{var d;try{await C.put(`/api/cms-manager/${(d=r.value)==null?void 0:d.id}`,o.value),await $notify({type:"success",title:"Успішно!",message:"Дані успішно оновлено"}),i()}catch{await $notify({type:"error",title:"Помилка!",message:"При спробі оновити дані виникла помилка"})}};s.watch(n,i),s.onMounted(()=>i());const c={title:{ua:"Назва",type:"Text",placeholder:"Назва"},enabled:{ua:"Чи увімкнений",type:"Switcher"}};return(d,u)=>{var _,w;const f=s.resolveComponent("VsForm");return s.openBlock(),s.createElementBlock("div",null,[s.createElementVNode("button",{onClick:u[0]||(u[0]=m=>d.$router.back()),class:"text-blue-500 flex gap-2 items-center hover:text-blue-700 duration-300"},[s.createVNode(kr,{template:n.value},null,8,["template"]),u[2]||(u[2]=s.createTextVNode(" Повернутися назад "))]),s.createElementVNode("div",Tu,[s.createElementVNode("div",Bu,[s.createElementVNode("h2",$u,s.toDisplayString((_=r.value)==null?void 0:_.title),1),s.createElementVNode("p",Ru,s.toDisplayString((w=r.value)==null?void 0:w.description),1)]),s.createElementVNode("div",{class:"flex items-center gap-1"},[s.createElementVNode("button",{onClick:l,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),s.createElementVNode("div",null,[s.createElementVNode("div",Fu,[(s.openBlock(),s.createBlock(f,{key:a.value,class:"w-full",scheme:c,modelValue:o.value,"onUpdate:modelValue":u[1]||(u[1]=m=>o.value=m)},null,8,["modelValue"]))])])])}}},Pu={},Au={xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function vu(e,t){return s.openBlock(),s.createElementBlock("svg",Au,t[0]||(t[0]=[s.createElementVNode("path",{d:"m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"},null,-1),s.createElementVNode("polyline",{points:"9 22 9 12 15 12 15 22"},null,-1)]))}const Lu=W(Pu,[["render",vu]]),Uu={},Iu={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:"lucide lucide-chevron-right"};function ju(e,t){return s.openBlock(),s.createElementBlock("svg",Iu,t[0]||(t[0]=[s.createElementVNode("path",{d:"m9 18 6-6-6-6"},null,-1)]))}const Ss=W(Uu,[["render",ju]]),Wu={class:"flex items-center space-x-1 text-sm"},Hu=["onClick"],zu={__name:"MediaBreadcrumb",props:{currentPath:{type:Array,required:!0}},emits:["navigate"],setup(e){return(t,n)=>(s.openBlock(),s.createElementBlock("nav",Wu,[s.createElementVNode("button",{class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 hover:bg-accent hover:text-accent-foreground h-8 px-2",onClick:n[0]||(n[0]=r=>t.$emit("navigate",[]))},[s.createVNode(Lu,{class:"h-4 w-4"})]),e.currentPath.length>0?(s.openBlock(),s.createBlock(Ss,{key:0,class:"h-4 w-4 text-muted-foreground"})):s.createCommentVNode("",!0),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(e.currentPath,(r,o)=>(s.openBlock(),s.createElementBlock("div",{key:o,class:"flex items-center"},[s.createElementVNode("button",{class:s.normalizeClass(["inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 hover:bg-accent hover:text-accent-foreground h-8 px-2",{"font-semibold":o===e.currentPath.length-1}]),onClick:a=>t.$emit("navigate",e.currentPath.slice(0,o+1))},s.toDisplayString(r),11,Hu),o<e.currentPath.length-1?(s.openBlock(),s.createBlock(Ss,{key:0,class:"h-4 w-4 text-muted-foreground"})):s.createCommentVNode("",!0)]))),128))]))}},qu={},Gu={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:"lucide lucide-layout-grid h-4 w-4"};function Ju(e,t){return s.openBlock(),s.createElementBlock("svg",Gu,t[0]||(t[0]=[s.createElementVNode("rect",{width:"7",height:"7",x:"3",y:"3",rx:"1"},null,-1),s.createElementVNode("rect",{width:"7",height:"7",x:"14",y:"3",rx:"1"},null,-1),s.createElementVNode("rect",{width:"7",height:"7",x:"14",y:"14",rx:"1"},null,-1),s.createElementVNode("rect",{width:"7",height:"7",x:"3",y:"14",rx:"1"},null,-1)]))}const Zu=W(qu,[["render",Ju]]),Ku={},Xu={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:"lucide lucide-list"};function Qu(e,t){return s.openBlock(),s.createElementBlock("svg",Xu,t[0]||(t[0]=[s.createStaticVNode('<line x1="8" x2="21" y1="6" y2="6"></line><line x1="8" x2="21" y1="12" y2="12"></line><line x1="8" x2="21" y1="18" y2="18"></line><line x1="3" x2="3.01" y1="6" y2="6"></line><line x1="3" x2="3.01" y1="12" y2="12"></line><line x1="3" x2="3.01" y1="18" y2="18"></line>',6)]))}const ef=W(Ku,[["render",Qu]]),tf={},nf={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:"lucide lucide-plus"};function rf(e,t){return s.openBlock(),s.createElementBlock("svg",nf,t[0]||(t[0]=[s.createElementVNode("path",{d:"M5 12h14"},null,-1),s.createElementVNode("path",{d:"M12 5v14"},null,-1)]))}const Ns=W(tf,[["render",rf]]),sf={class:"flex items-center gap-2"},of={class:"border rounded-md inline-flex"},af={__name:"MediaViewControls",props:{modelValue:{type:String,required:!0}},emits:["update:modelValue","create-folder","file-change"],setup(e){return(t,n)=>(s.openBlock(),s.createElementBlock("div",sf,[s.createElementVNode("div",of,[s.createElementVNode("button",{class:s.normalizeClass(["inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground h-10 px-3",{"bg-gray-100":e.modelValue==="grid"}]),onClick:n[0]||(n[0]=r=>t.$emit("update:modelValue","grid")),"aria-label":"Grid view"},[s.createVNode(Zu,{class:"h-4 w-4"})],2),s.createElementVNode("button",{class:s.normalizeClass(["inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground h-10 px-3",{"bg-gray-100":e.modelValue==="list"}]),onClick:n[1]||(n[1]=r=>t.$emit("update:modelValue","list")),"aria-label":"List view"},[s.createVNode(ef,{class:"h-4 w-4"})],2)]),s.createElementVNode("button",{class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border border-input bg-background hover:bg-accent hover:text-accent-foreground h-9 px-3",onClick:n[2]||(n[2]=r=>t.$emit("create-folder"))},[s.createVNode(Ns,{class:"h-4 w-4 mr-2"}),n[5]||(n[5]=s.createTextVNode(" Нова папка "))]),s.createElementVNode("div",null,[s.createElementVNode("input",{type:"file",onChange:n[3]||(n[3]=r=>t.$emit("file-change",r)),ref:"fileInputRef",class:"hidden",multiple:""},null,544),s.createElementVNode("button",{class:"flex bg-black text-white px-3 py-1.5 rounded-md items-center gap-x-2",onClick:n[4]||(n[4]=r=>t.$refs.fileInputRef.click())},[s.createVNode(Ns,{class:"h-4 w-4 mr-2"}),n[6]||(n[6]=s.createTextVNode(" Завантажити "))])])]))}},lf={},cf={"aria-hidden":"true",focusable:"false",role:"img",viewBox:"0 0 16 16",width:"16",height:"16",fill:"currentColor"};function df(e,t){return s.openBlock(),s.createElementBlock("svg",cf,t[0]||(t[0]=[s.createElementVNode("path",{d:"M.513 1.513A1.75 1.75 0 0 1 1.75 1h3.5c.55 0 1.07.26 1.4.7l.9 1.2a.25.25 0 0 0 .2.1H 13a1 1 0 0 1 1 1v.5H2.75a.75.75 0 0 0 0 1.5h11.978a1 1 0 0 1 .994 1.117L15 13.25A1.75 1.75 0 0 1 13.25 15H1.75A1.75 1.75 0 0 1 0 13.25V2.75c0-.464.184-.91.513-1.237Z"},null,-1),s.createElementVNode("path",{d:"M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"},null,-1)]))}const vt=W(lf,[["render",df]]);function Rn(e){if(e===0)return"0 Bytes";const t=1024,n=["Bytes","KB","MB","GB","TB"],r=Math.floor(Math.log(e)/Math.log(t));return Number.parseFloat((e/Math.pow(t,r)).toFixed(2))+" "+n[r]}function Fn(e){return new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}const uf={class:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 gap-4"},ff={key:0,class:"flex flex-col items-center justify-center h-64 text-muted-foreground col-span-full"},hf=["onClick"],mf={class:"flex flex-col items-center text-center"},pf={class:"h-16 w-16 flex items-center justify-center mb-2"},yf={key:0,class:"h-16 w-16 relative"},gf=["src","alt"],_f={class:"w-full truncate text-sm font-medium"},wf={key:0,class:"text-xs text-muted-foreground"},xf=["onClick"],kf={class:"text-sm"},bf={__name:"MediaGrid",props:{files:{type:Array,required:!0},selectedFile:{type:Object,default:null}},emits:["file-click"],setup(e){return(t,n)=>{const r=s.resolveComponent("File");return s.openBlock(),s.createElementBlock("div",uf,[e.files.length===0?(s.openBlock(),s.createElementBlock("div",ff,[s.createVNode(r,{class:"h-12 w-12 mb-2"}),n[0]||(n[0]=s.createElementVNode("p",null,"Немає файлів у цій папці",-1))])):s.createCommentVNode("",!0),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(e.files,o=>{var a;return s.openBlock(),s.createElementBlock(s.Fragment,{key:o.id},[o.type==="file"?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["border rounded-lg p-3 h-[140px] cursor-pointer hover:bg-gray-100",{"bg-accent text-accent-foreground ring-2 ring-primary":((a=e.selectedFile)==null?void 0:a.id)===o.id}]),onClick:i=>t.$emit("file-click",o)},[s.createElementVNode("div",mf,[s.createElementVNode("div",pf,[(o==null?void 0:o.filetype)==="image"&&(o!=null&&o.filepath)?(s.openBlock(),s.createElementBlock("div",yf,[s.createElementVNode("img",{src:o==null?void 0:o.filepath,alt:(o==null?void 0:o.alt)||(o==null?void 0:o.filename),class:"h-full w-full object-cover rounded"},null,8,gf)])):(s.openBlock(),s.createBlock(r,{key:1,class:"h-12 w-12 text-gray-500"}))]),s.createElementVNode("div",_f,s.toDisplayString(o==null?void 0:o.filename),1),o.filesize?(s.openBlock(),s.createElementBlock("div",wf,s.toDisplayString(s.unref(Rn)(o.filesize)),1)):s.createCommentVNode("",!0)])],10,hf)):o.type==="dir"?(s.openBlock(),s.createElementBlock("div",{key:1,class:"border rounded-lg p-3 hover:bg-gray-100 h-[140px] cursor-pointer flex flex-col items-center justify-center",onClick:i=>t.$emit("file-click",o)},[s.createVNode(vt,{class:"h-12 w-12 text-blue-500"}),s.createElementVNode("span",kf,s.toDisplayString(o==null?void 0:o.name),1)],8,xf)):s.createCommentVNode("",!0)],64)}),128))])}}},Ef={},Sf={"aria-hidden":"true",focusable:"false",role:"img",viewBox:"0 0 16 16",width:"16",height:"16",fill:"currentColor"};function Nf(e,t){return s.openBlock(),s.createElementBlock("svg",Sf,t[0]||(t[0]=[s.createElementVNode("path",{d:"M.513 1.513A1.75 1.75 0 0 1 1.75 1h3.5c.55 0 1.07.26 1.4.7l.9 1.2a.25.25 0 0 0 .2.1H 13a1 1 0 0 1 1 1v.5H2.75a.75.75 0 0 0 0 1.5h11.978a1 1 0 0 1 .994 1.117L15 13.25A1.75 1.75 0 0 1 13.25 15H1.75A1.75 1.75 0 0 1 0 13.25V2.75c0-.464.184-.91.513-1.237Z"},null,-1),s.createElementVNode("path",{d:"M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"},null,-1)]))}const Ds=W(Ef,[["render",Nf]]),Df={key:0,class:"flex flex-col items-center justify-center h-64 text-muted-foreground"},Vf={key:1,class:"w-full caption-bottom text-sm"},Of={class:"[&_tr:last-child]:border-0"},Mf=["onClick"],Cf={class:"p-4 align-middle font-medium"},Tf={class:"flex items-center gap-2"},Bf={key:1,class:"h-8 w-8 relative"},$f=["src","alt"],Rf={class:"truncate max-w-[200px]"},Ff={class:"p-4 align-middle"},Yf={class:"p-4 align-middle"},Pf={class:"p-4 align-middle hidden md:table-cell"},Af={__name:"MediaList",props:{files:{type:Array,required:!0},selectedFile:{type:Object,default:null}},emits:["file-click"],setup(e){return(t,n)=>{const r=s.resolveComponent("File");return s.openBlock(),s.createElementBlock("div",null,[e.files.length===0?(s.openBlock(),s.createElementBlock("div",Df,[s.createVNode(r,{class:"h-12 w-12 mb-2"}),n[0]||(n[0]=s.createElementVNode("p",null,"Немає файлів у цій папці",-1))])):(s.openBlock(),s.createElementBlock("table",Vf,[n[1]||(n[1]=s.createElementVNode("thead",{class:"[&_tr]:border-b"},[s.createElementVNode("tr",{class:"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted"},[s.createElementVNode("th",{class:"h-12 px-4 text-left align-middle font-medium text-muted-foreground w-[300px]"}," Назва "),s.createElementVNode("th",{class:"h-12 px-4 text-left align-middle font-medium text-muted-foreground"}," Тип "),s.createElementVNode("th",{class:"h-12 px-4 text-left align-middle font-medium text-muted-foreground"}," Розмір "),s.createElementVNode("th",{class:"h-12 px-4 text-left align-middle font-medium text-muted-foreground hidden md:table-cell"}," Змінено ")])],-1)),s.createElementVNode("tbody",Of,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(e.files,o=>{var a,i,l,c;return s.openBlock(),s.createElementBlock("tr",{key:o.id,class:s.normalizeClass(["border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted cursor-pointer",{"bg-accent":((a=e.selectedFile)==null?void 0:a.id)===o.id}]),onClick:d=>t.$emit("file-click",o)},[s.createElementVNode("td",Cf,[s.createElementVNode("div",Tf,[o.type==="dir"?(s.openBlock(),s.createBlock(vt,{key:0,class:"h-5 w-5 text-blue-500"})):(o==null?void 0:o.filetype)==="image"&&(o!=null&&o.filepath)?(s.openBlock(),s.createElementBlock("div",Bf,[s.createElementVNode("img",{src:o==null?void 0:o.filepath,alt:(o==null?void 0:o.alt)||(o==null?void 0:o.filename),class:"h-full w-full object-cover rounded"},null,8,$f)])):(o==null?void 0:o.filetype)==="image"?(s.openBlock(),s.createBlock(Ds,{key:2,class:"h-5 w-5 text-green-500"})):(s.openBlock(),s.createBlock(r,{key:3,class:"h-5 w-5 text-gray-500"})),s.createElementVNode("span",Rf,s.toDisplayString((o==null?void 0:o.filename)||(o==null?void 0:o.name)),1)])]),s.createElementVNode("td",Ff,s.toDisplayString((o==null?void 0:o.type)==="dir"?"Папка":((l=(i=o==null?void 0:o.filetype)==null?void 0:i.charAt(0))==null?void 0:l.toUpperCase())+((c=o==null?void 0:o.filetype)==null?void 0:c.slice(1))),1),s.createElementVNode("td",Yf,s.toDisplayString((o==null?void 0:o.type)==="dir"?"--":s.unref(Rn)(o==null?void 0:o.filesize)),1),s.createElementVNode("td",Pf,s.toDisplayString(o!=null&&o.updated_at?s.unref(Fn)(o==null?void 0:o.updated_at):"--"),1)],10,Mf)}),128))])]))])}}},vf={},Lf={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function Uf(e,t){return s.openBlock(),s.createElementBlock("svg",Lf,t[0]||(t[0]=[s.createStaticVNode('<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="16" y1="13" x2="8" y2="13"></line><line x1="16" y1="17" x2="8" y2="17"></line><line x1="10" y1="9" x2="8" y2="9"></line>',5)]))}const If=W(vf,[["render",Uf]]),jf={class:"rounded-lg border bg-card text-card-foreground shadow-sm"},Wf={class:"p-6 space-y-4"},Hf={key:0,class:"flex flex-col items-center justify-center h-64 text-muted-foreground"},zf={class:"flex justify-center mb-4"},qf={key:1,class:"h-48 w-full flex items-center justify-center"},Gf=["src","alt"],Jf={class:"font-semibold text-lg truncate"},Zf={class:"text-sm text-muted-foreground"},Kf={class:"space-y-2"},Xf={class:"flex items-center gap-2"},Qf={class:"text-sm ml-auto"},eh={class:"flex items-center gap-2"},th={class:"text-sm ml-auto"},nh={class:"flex items-center gap-2"},rh={class:"text-sm ml-auto"},sh={key:0,class:"flex items-start gap-2"},oh={class:"text-sm ml-auto text-right"},ah={key:1,class:"flex items-start gap-2"},ih={class:"text-sm ml-auto text-right"},lh={__name:"MediaFileInfo",props:{file:{type:Object,default:null}},setup(e){return(t,n)=>{var i,l,c,d,u,f,_,w,m,y,p,k,b,g,D,V,P,$,Q,ee;const r=s.resolveComponent("File"),o=s.resolveComponent("HardDrive"),a=s.resolveComponent("Calendar");return s.openBlock(),s.createElementBlock("div",jf,[n[7]||(n[7]=s.createElementVNode("div",{class:"flex flex-col space-y-1.5 p-6"},[s.createElementVNode("h3",{class:"text-2xl font-semibold leading-none tracking-tight"}," Інформація про файл ")],-1)),s.createElementVNode("div",Wf,[e.file?(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[s.createElementVNode("div",zf,[e.file.filetype==="folder"?(s.openBlock(),s.createBlock(vt,{key:0,class:"h-24 w-24 text-blue-500"})):((i=e.file)==null?void 0:i.filetype)==="image"&&((l=e.file)!=null&&l.filepath)?(s.openBlock(),s.createElementBlock("div",qf,[s.createElementVNode("img",{src:(c=e.file)==null?void 0:c.filepath,alt:((d=e.file)==null?void 0:d.alt)||((u=e.file)==null?void 0:u.filename),class:"max-h-full max-w-full object-contain rounded"},null,8,Gf)])):((f=e.file)==null?void 0:f.filetype)==="image"?(s.openBlock(),s.createBlock(Ds,{key:2,class:"h-24 w-24 text-green-500"})):(s.openBlock(),s.createBlock(r,{key:3,class:"h-24 w-24 text-gray-500"}))]),s.createElementVNode("div",null,[s.createElementVNode("h3",Jf,s.toDisplayString((_=e.file)==null?void 0:_.filename),1),s.createElementVNode("p",Zf,s.toDisplayString(((w=e.file)==null?void 0:w.filetype)==="folder"?"Папка":((m=e.file)==null?void 0:m.filetype.charAt(0).toUpperCase())+((y=e.file)==null?void 0:y.filetype.slice(1))),1)]),n[6]||(n[6]=s.createElementVNode("div",{class:"h-px w-full bg-border"},null,-1)),s.createElementVNode("div",Kf,[s.createElementVNode("div",Xf,[s.createVNode(o,{class:"h-4 w-4 text-muted-foreground"}),n[1]||(n[1]=s.createElementVNode("span",{class:"text-sm"},"Розмір: ",-1)),s.createElementVNode("span",Qf,s.toDisplayString(((p=e.file)==null?void 0:p.filetype)==="folder"?"--":s.unref(Rn)((k=e.file)==null?void 0:k.filesize)),1)]),s.createElementVNode("div",eh,[s.createVNode(a,{class:"h-4 w-4 text-muted-foreground"}),n[2]||(n[2]=s.createElementVNode("span",{class:"text-sm"},"Створено: ",-1)),s.createElementVNode("span",th,s.toDisplayString((b=e.file)!=null&&b.created_at?s.unref(Fn)((g=e.file)==null?void 0:g.created_at):"--"),1)]),s.createElementVNode("div",nh,[s.createVNode(a,{class:"h-4 w-4 text-muted-foreground"}),n[3]||(n[3]=s.createElementVNode("span",{class:"text-sm"},"Змінено: ",-1)),s.createElementVNode("span",rh,s.toDisplayString((D=e.file)!=null&&D.updated_at?s.unref(Fn)((V=e.file)==null?void 0:V.updated_at):"--"),1)]),(P=e.file)!=null&&P.filepath?(s.openBlock(),s.createElementBlock("div",sh,[s.createVNode(vt,{class:"h-4 w-4 text-muted-foreground mt-0.5"}),n[4]||(n[4]=s.createElementVNode("span",{class:"text-sm"},"Шлях: ",-1)),s.createElementVNode("span",oh,s.toDisplayString(($=e.file)==null?void 0:$.filepath),1)])):s.createCommentVNode("",!0),(Q=e.file)!=null&&Q.description?(s.openBlock(),s.createElementBlock("div",ah,[s.createVNode(If,{class:"h-4 w-4 text-muted-foreground mt-0.5"}),n[5]||(n[5]=s.createElementVNode("span",{class:"text-sm"},"Опис: ",-1)),s.createElementVNode("span",ih,s.toDisplayString((ee=e.file)==null?void 0:ee.description),1)])):s.createCommentVNode("",!0)])],64)):(s.openBlock(),s.createElementBlock("div",Hf,n[0]||(n[0]=[s.createElementVNode("p",null,"Виберіть файл для перегляду деталей",-1)])))])])}}},ch={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},dh={__name:"MediaCreateFolder",props:{modelValue:{},modelModifiers:{}},emits:s.mergeModels(["update:modelValue","create"],["update:modelValue"]),setup(e,{emit:t}){const n=s.useModel(e,"modelValue"),r=t,o=s.ref({}),a={name:{name:"name",label:"Назва",type:"Text"}},i=()=>{r("create",{...o.value}),o.value={}};return(l,c)=>{const d=s.resolveComponent("VsForm"),u=s.resolveComponent("VsDialog");return s.openBlock(),s.createBlock(u,{visible:n.value,"onUpdate:visible":c[2]||(c[2]=f=>n.value=f),title:"Створити папку"},{footer:s.withCtx(()=>[s.createElementVNode("div",ch,[s.createElementVNode("button",{onClick:c[1]||(c[1]=f=>l.$emit("update:modelValue",!1)),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border rounded-lg border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати "),s.createElementVNode("button",{onClick:i,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Створити ")])]),default:s.withCtx(()=>[s.createVNode(d,{scheme:a,modelValue:o.value,"onUpdate:modelValue":c[0]||(c[0]=f=>o.value=f)},null,8,["modelValue"])]),_:1},8,["visible"])}}},uh={class:"container mx-auto p-4 min-h-screen"},fh={class:"grid grid-cols-1 lg:grid-cols-4 gap-6"},hh={class:"lg:col-span-3 space-y-4"},mh={class:"flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4"},ph={__name:"vs-media-new",setup(e){const t=s.ref("grid"),n=s.ref([]),r=s.ref(null),o=s.ref([]),a=s.ref(!1),i=s.ref([]),l=w=>{n.value=w,i.value=[...i.value,w],r.value=null,_()},c=()=>{i.value.length>1&&(i.value.pop(),n.value=i.value[i.value.length-1],r.value=null,_())},d=w=>{var m;w.type==="dir"?l([...n.value,w.name]):r.value=w.id===((m=r.value)==null?void 0:m.id)?null:w},u=async w=>{const m=w.target.files[0];if(!m)return;const y=new FormData;y.append("file",m);try{const p=n.value.join("/");await C.post(`/api/site-media/upload?subdir=${p}`,y,{headers:{"Content-Type":"multipart/form-data","X-Skip-Session":"true"}}),await _()}catch(p){error.value="Failed to upload files",console.error("Upload error:",p)}},f=async w=>{try{const m=n.value.join("/");await C.post(`/api/site-media/upload?subdir=${m}/${w.name}`),a.value=!1,await _()}catch{error.value="Failed to create folder"}},_=async()=>{try{const w=n.value.join("/"),m=await C.get("/api/site-media",{params:{subdir:w}});m.data&&m.data.data?o.value=m.data.data.map(y=>({...y,id:y.type==="dir"?`dir-${y.name}`:y.name})):o.value=[]}catch(w){error.value="Failed to fetch files",console.error("Fetch error:",w),o.value=[]}};return s.onMounted(()=>{i.value=[[]],_()}),(w,m)=>(s.openBlock(),s.createElementBlock("div",uh,[m[4]||(m[4]=s.createElementVNode("h1",{class:"text-3xl font-bold mb-6"},"Медіа бібліотека",-1)),s.createElementVNode("div",fh,[s.createElementVNode("div",hh,[s.createElementVNode("div",mh,[s.createVNode(zu,{"current-path":n.value,onNavigate:l,onNavigateBack:c},null,8,["current-path"]),s.createVNode(af,{modelValue:t.value,"onUpdate:modelValue":m[0]||(m[0]=y=>t.value=y),onCreateFolder:m[1]||(m[1]=y=>a.value=!0),onFileChange:u},null,8,["modelValue"])]),m[3]||(m[3]=s.createElementVNode("div",{class:"h-px w-full bg-border"},null,-1)),t.value==="grid"?(s.openBlock(),s.createBlock(bf,{key:0,files:o.value,"selected-file":r.value,onFileClick:d},null,8,["files","selected-file"])):(s.openBlock(),s.createBlock(Af,{key:1,files:o.value,"selected-file":r.value,onFileClick:d},null,8,["files","selected-file"]))]),s.createVNode(lh,{file:r.value},null,8,["file"])]),s.createVNode(dh,{modelValue:a.value,"onUpdate:modelValue":m[2]||(m[2]=y=>a.value=y),onCreate:f},null,8,["modelValue"])]))}},yh={class:"w-full bg-white p-[20px] rounded-lg mt-[20px] border"},gh={key:0,class:"relative min-w-full divide-y-2 divide-gray-200 bg-white text-[12px]"},_h={class:"sticky top-[0px] z-[1] bg-white w-full after:absolute after:content-[''] after:block after:w-full after:h-px after:bg-stone-200"},wh={class:"divide-y divide-gray-200 dark:divide-neutral-700"},xh=["onClick"],kh={class:"px-4 py-2 text-gray-700 max-w-[250px] admin-component-is"},bh={__name:"vs-manager-collection-list",props:{list:Object},setup(e){const t=[{ua:"Назва",name:"name",format:"Text"},{ua:"Опис",name:"description",format:"Text"},{ua:"Дата створення",name:"cdate",format:"Date"}];return(n,r)=>{var o;return s.openBlock(),s.createElementBlock("div",yh,[(o=e.list)!=null&&o.length?(s.openBlock(),s.createElementBlock("table",gh,[s.createElementVNode("thead",_h,[s.createElementVNode("tr",null,[(s.openBlock(),s.createElementBlock(s.Fragment,null,s.renderList(t,(a,i)=>s.createElementVNode("th",{key:i,class:"text-start px-4 py-2 font-medium text-gray-900 max-w-[250px]"},s.toDisplayString(a==null?void 0:a.ua),1)),64))])]),s.createElementVNode("tbody",wh,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(e.list,a=>(s.openBlock(),s.createElementBlock("tr",{class:"odd:bg-gray-50",onClick:i=>n.$router.push(`/manager-collection/${a==null?void 0:a.template}`)},[(s.openBlock(),s.createElementBlock(s.Fragment,null,s.renderList(t,i=>{var l;return s.createElementVNode("td",kh,[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(s.unref(Es)[(l=i==null?void 0:i.format)==null?void 0:l.toLowerCase()]||"div"),{value:a==null?void 0:a[i==null?void 0:i.name]},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(a==null?void 0:a[i==null?void 0:i.name]),1)]),_:2},1032,["value"]))])}),64))],8,xh))),256))])])):(s.openBlock(),s.createBlock(gt,{key:1}))])}}},Eh={class:"flex gap-2 w-full items-center justify-between"},Sh=["checked","onChange"],Nh={__name:"vs-permissions-checkbox",props:{modelValue:{type:Array,default:()=>[]}},emits:["update:modelValue"],setup(e,{emit:t}){const n=["view","add","edit","del"],r=e,o=t,a=(i,l)=>{let c=[...r.modelValue];l?c.includes(i)||c.push(i):c=c.filter(d=>d!==i),o("update:modelValue",c)};return(i,l)=>(s.openBlock(),s.createElementBlock("div",Eh,[(s.openBlock(),s.createElementBlock(s.Fragment,null,s.renderList(n,c=>{var d,u,f;return s.createElementVNode("div",{class:"w-[120px] flex items-center justify-center",key:c},[s.createElementVNode("label",{class:s.normalizeClass(["flex h-[20px] w-[20px] items-center justify-center border text-white rounded cursor-pointer",{"bg-blue-500 border-blue-500":(d=e.modelValue)==null?void 0:d.includes(c)}])},[s.createElementVNode("input",{type:"checkbox",class:"hidden",checked:(u=e.modelValue)==null?void 0:u.includes(c),onChange:_=>a(c,_.target.checked)},null,40,Sh),(f=e.modelValue)!=null&&f.includes(c)?(s.openBlock(),s.createBlock(ks,{key:0})):s.createCommentVNode("",!0)],2)])}),64))]))}},Dh={class:"flex items-center gap-2 mb-2"},Vh={class:"w-full flex flex-col gap-2"},Oh={class:"flex gap-2 items-center w-full p-3 md:gap-x-6"},Mh={class:"flex justify-between w-full"},Ch={class:"text-xs font-medium text-start w-[80px]"},Th={class:"flex gap-2 items-center w-full p-3 bg-gray-100 rounded-lg md:gap-x-6 md:p-5"},Bh={class:"font-semibold text-gray-800 dark:text-neutral-200 w-full max-w-[300px]"},$h={class:"flex justify-between w-full"},Rh=["onClick"],Fh={class:"flex flex-col gap-2 p-3"},Yh={class:"w-full max-w-[300px]"},Ph={class:"text-sm font-medium text-gray-800 dark:text-neutral-200"},Ah={__name:"vs-premissions-component",props:{permissions:{},permissionsModifiers:{}},emits:["update:permissions"],setup(e){const t=s.ref(""),n=s.useModel(e,"permissions"),r=u=>s.computed(()=>{var _;const f=(_=n.value)==null?void 0:_.find(w=>(w==null?void 0:w.user_id)===u);return(f==null?void 0:f.actions)||[]}),o=(u,f)=>{n.value||(n.value=[]);const _=n.value.findIndex(w=>(w==null?void 0:w.user_id)===u);_===-1?n.value.push({user_id:u,actions:f}):n.value[_].actions=f},a=(u,f)=>{const _=i.value[u];if(!_)return;const w=[...n.value||[]],m=_.every(y=>{var k;const p=w.find(b=>(b==null?void 0:b.user_id)===(y==null?void 0:y.user_id));return(k=p==null?void 0:p.actions)==null?void 0:k.includes(f)});_.forEach(y=>{const p=w.findIndex(b=>(b==null?void 0:b.user_id)===(y==null?void 0:y.user_id));let k=[];if(p!==-1&&(k=[...w[p].actions]),m){const b=k.indexOf(f);b>-1&&k.splice(b,1)}else k.includes(f)||k.push(f);p===-1?w.push({user_id:y.user_id,actions:k}):w[p].actions=k}),n.value=w},i=s.computed(()=>{if(!n.value)return{};const u={};return n.value.forEach(f=>{const _=f==null?void 0:f.content_type_id;_&&(u[_]||(u[_]=[]),u[_].push({user_id:f.user_id,subject:f.subject,content_type_id:_,actions:f.actions||[]}))}),u}),l=()=>{},c=()=>{var u;(u=n.value)==null||u.forEach(f=>{f.actions=[]}),t.value=""},d=s.computed(()=>{const u=t.value.toLowerCase().trim();if(!u)return i.value;const f={};return Object.entries(i.value).forEach(([_,w])=>{const m=w.filter(y=>[y==null?void 0:y.subject,y==null?void 0:y.content_type_id,_].filter(Boolean).join(" ").toLowerCase().includes(u));m.length>0&&(f[_]=m)}),f});return(u,f)=>(s.openBlock(),s.createElementBlock("div",null,[s.createElementVNode("div",Dh,[s.withDirectives(s.createElementVNode("input",{type:"text",placeholder:"Пошук за назвою",class:"w-full h-[36px] border focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring rounded-md px-2","onUpdate:modelValue":f[0]||(f[0]=_=>t.value=_),onInput:l},null,544),[[s.vModelText,t.value]]),s.createElementVNode("button",{class:"text-sm border h-[36px] rounded-md px-2 hover:bg-gray-100 transition-all duration-300",onClick:c}," Скинути ")]),s.createElementVNode("div",Vh,[s.createElementVNode("div",Oh,[f[1]||(f[1]=s.createElementVNode("h3",{class:"font-semibold text-gray-800 dark:text-neutral-200 w-full max-w-[300px]"}," Групи ",-1)),s.createElementVNode("div",Mh,[(s.openBlock(),s.createElementBlock(s.Fragment,null,s.renderList(["Перегляд","Додавання","Редагування","Видалення"],_=>s.createElementVNode("p",Ch,s.toDisplayString(_),1)),64))])]),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(d.value,(_,w)=>(s.openBlock(),s.createElementBlock("div",{key:w},[s.createElementVNode("div",Th,[s.createElementVNode("h3",Bh,s.toDisplayString(w),1),s.createElementVNode("div",$h,[(s.openBlock(),s.createElementBlock(s.Fragment,null,s.renderList(["view","add","edit","del"],m=>s.createElementVNode("button",{key:m,class:"text-xs font-medium text-blue-600 text-start w-[80px] decoration-2 hover:underline focus:outline-none focus:underline",onClick:y=>a(w,m)}," Вибрати всі ",8,Rh)),64))])]),s.createElementVNode("div",Fh,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(_,m=>(s.openBlock(),s.createElementBlock("div",{key:m.id,class:"flex gap-2 items-center w-full"},[s.createElementVNode("div",Yh,[s.createElementVNode("p",Ph,s.toDisplayString(m==null?void 0:m.subject),1)]),s.createVNode(Nh,{"model-value":r(m==null?void 0:m.user_id).value,"onUpdate:modelValue":y=>o(m==null?void 0:m.user_id,y),"item-id":m==null?void 0:m.user_id},null,8,["model-value","onUpdate:modelValue","item-id"])]))),128))])]))),128))])]))}},vh={class:"w-full flex justify-center bg-gray-100 h-[calc(100vh-60px)]"},Lh={class:"w-full max-w-[1440px]"},Uh={class:"mt-4 bg-white rounded-lg p-4 border"},Ih={__name:"vs-permissions",setup(e){const t=s.getCurrentInstance().proxy.$notify,n=s.ref([]);(async()=>{try{const{data:a}=await C.get("/api/site-permissions/1");n.value=a==null?void 0:a.permissions}catch{}})();const o=async()=>{try{await C.post("/api/site-permissions/1",{permissions:n.value}),t({title:"Успішно",message:"Права збережено",type:"success"})}catch{t({title:"Помилка",text:"Помилка при збереженні прав",type:"error"})}};return(a,i)=>{var l;return s.openBlock(),s.createElementBlock("section",vh,[s.createElementVNode("div",Lh,[s.createElementVNode("div",{class:"flex items-center justify-between mt-4"},[i[1]||(i[1]=s.createElementVNode("h1",{class:"text-xl font-bold"},"Permissions",-1)),s.createElementVNode("button",{onClick:o,class:"p-2 bg-blue-500 text-white rounded-md"}," Зберегти ")]),s.createElementVNode("div",Uh,[(l=n.value)!=null&&l.length?(s.openBlock(),s.createBlock(Ah,{key:0,permissions:n.value,"onUpdate:permissions":i[0]||(i[0]=c=>n.value=c)},null,8,["permissions"])):s.createCommentVNode("",!0)])])])}}},jh={},Wh={"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 6 10"};function Hh(e,t){return s.openBlock(),s.createElementBlock("svg",Wh,t[0]||(t[0]=[s.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m1 9 4-4-4-4"},null,-1)]))}const zh=W(jh,[["render",Hh]]),qh={class:""},Gh={key:0,class:"ml-5"},Jh=W({__name:"vs-menu-tree-node",props:{item:{type:Object,required:!0},isSiblingDragOver:{type:[String,Number],default:null}},emits:["item-dropped","sibling-drag-enter","sibling-drag-leave","sibling-drop"],setup(e,{emit:t}){const n=e,r=t,o=s.ref(!1),a=s.ref(!1),i=s.ref(!1),l=s.computed(()=>n.item.children&&n.item.children.length>0),c=()=>{l.value&&(o.value=!o.value)},d=D=>{i.value=!0,D.dataTransfer.setData("application/json",JSON.stringify({id:n.item.id,title:n.item.title,url:n.item.url,children:n.item.children||[]})),D.dataTransfer.effectAllowed="move"},u=D=>{D.preventDefault(),D.dataTransfer.dropEffect="move"},f=D=>{a.value=!1,i.value=!1;try{const V=JSON.parse(D.dataTransfer.getData("application/json"));V.id!==n.item.id&&r("item-dropped",{draggedItemId:V.id,targetItemId:n.item.id,draggedItemData:V})}catch(V){console.error("Error parsing drag data:",V)}},_=D=>{a.value=!0},w=D=>{a.value=!1},m=()=>{a.value=!1,i.value=!1},y=D=>{r("item-dropped",D)},p=D=>{D.preventDefault(),D.dataTransfer.dropEffect="move"},k=(D,V)=>{try{const P=JSON.parse(D.dataTransfer.getData("application/json"));r("sibling-drop",D,V)}catch(P){console.error("Error parsing drag data:",P)}},b=(D,V)=>{r("sibling-drag-enter",D,V)},g=(D,V)=>{r("sibling-drag-leave",D,V)};return(D,V)=>{const P=s.resolveComponent("vs-menu-tree-node",!0);return s.openBlock(),s.createElementBlock("div",qh,[s.createElementVNode("div",{class:s.normalizeClass(["drop-zone",{"drop-zone-active":e.isSiblingDragOver===e.item.id}]),onDragover:s.withModifiers(p,["prevent"]),onDrop:V[0]||(V[0]=s.withModifiers($=>k($,e.item.id),["prevent"])),onDragenter:V[1]||(V[1]=s.withModifiers($=>b($,e.item.id),["prevent"])),onDragleave:V[2]||(V[2]=s.withModifiers($=>g($,e.item.id),["prevent"]))},null,34),s.createElementVNode("div",{class:s.normalizeClass(["draggable-item w-full",{"drag-over":a.value,dragging:i.value}]),draggable:"true",onDragstart:d,onDragover:s.withModifiers(u,["prevent"]),onDrop:s.withModifiers(f,["prevent"]),onDragenter:s.withModifiers(_,["prevent"]),onDragleave:s.withModifiers(w,["prevent"]),onDragend:m},[s.createElementVNode("button",{onClick:c,class:"text-inherit flex items-center gap-2 w-full hover:text-blue-600 p-1 px-3 rounded-lg hover:bg-gray-100"},[l.value?(s.openBlock(),s.createBlock(zh,{key:0,class:s.normalizeClass(["h-[8px] w-[8px] text-gray-500 duration-300",{"rotate-90":o.value}])},null,8,["class"])):s.createCommentVNode("",!0),s.createTextVNode(" "+s.toDisplayString(e.item.title),1)])],34),l.value&&o.value?(s.openBlock(),s.createElementBlock("div",Gh,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(e.item.children,$=>(s.openBlock(),s.createBlock(P,{key:$.id,item:$,"is-sibling-drag-over":e.isSiblingDragOver,onItemDropped:y,onSiblingDragEnter:b,onSiblingDragLeave:g,onSiblingDrop:k},null,8,["item","is-sibling-drag-over"]))),128))])):s.createCommentVNode("",!0)])}}},[["__scopeId","data-v-b98f5b2f"]]),Zh={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},Kh=W({__name:"vs-menu-tree-component",props:{isSiblingDragOver:{type:[String,Number],default:null}},emits:["sibling-drag-enter","sibling-drag-leave","sibling-drop"],setup(e,{emit:t}){const n=s.ref(!1);s.ref(!1);const r=s.ref(null),o=s.ref(),a=s.ref([{id:1,title:"Главная",url:"/",children:[]},{id:2,title:"Блог",url:"/blog",children:[{id:3,title:"Последние посты",url:"/blog/latest",children:[{id:4,title:"Новости",url:"/blog/latest/news",children:[]},{id:5,title:"Статьи",url:"/blog/latest/articles",children:[{id:6,title:"Технологии",url:"/blog/latest/articles/tech",children:[]},{id:7,title:"Бизнес",url:"/blog/latest/articles/business",children:[]}]}]},{id:8,title:"Архив",url:"/blog/archive",children:[]}]},{id:9,title:"О нас",url:"/about",children:[{id:10,title:"Команда",url:"/about/team",children:[]},{id:11,title:"Контакты",url:"/about/contacts",children:[{id:12,title:"Офисы",url:"/about/contacts/offices",children:[]},{id:13,title:"Поддержка",url:"/about/contacts/support",children:[]}]}]},{id:14,title:"Услуги",url:"/services",children:[{id:15,title:"Веб-разработка",url:"/services/web",children:[]},{id:16,title:"Мобильные приложения",url:"/services/mobile",children:[]}]}]),i=s.computed(()=>({id:{type:"Text",validators:["required"],label:"ID"},title:{type:"Text",validators:["required"],label:"Назва"},url:{type:"Text",validators:["required"],label:"URL"},parentId:{type:"Select",label:"Родитель",options:l(a.value)}})),l=y=>{const p=[];return y.forEach(k=>{var b;p.push({text:k.title,id:k.id}),k!=null&&k.children&&((b=k==null?void 0:k.children)==null?void 0:b.length)>0&&p.push(...l(k.children))}),p},c=(y,p,k=null)=>{for(let b=0;b<y.length;b++){if(y[b].id===p)return{item:y[b],parent:k,index:b};if(y[b].children&&y[b].children.length>0){const g=c(y[b].children,p,y[b]);if(g)return g}}return null},d=({draggedItemId:y,targetItemId:p,draggedItemData:k})=>{if(y===p)return;const b=c(a.value,y),g=c(a.value,p);if(!b||!g)return;const{parent:D,index:V}=b,{item:P}=g;if(D&&D.id===p)return;const $=(ee,Ie)=>ee.id===Ie?!0:ee.children?ee.children.some(Lt=>$(Lt,Ie)):!1;if($(k,p))return;const Q={id:k.id,title:k.title,url:k.url,children:k.children||[]};D?D.children.splice(V,1):a.value.splice(V,1),P.children||(P.children=[]),P.children.push(Q)},u=(y,p)=>{for(const k of y){if(k.id===p)return k;if(k.children&&k.children.length>0){const b=u(k.children,p);if(b)return b}}return null},f=async()=>{const y={id:String(Math.random()),title:o.value.title,url:o.value.url,children:[]};if(o.value.parentId){const p=u(a.value,o.value.parentId);p&&p.children.push(y)}else a.value.push(y);n.value=!1,o.value={}},_=(y,p)=>{r.value=null;try{const k=JSON.parse(y.dataTransfer.getData("application/json")),b=c(a.value,k.id),g=c(a.value,p);if(!b||!g)return;const{parent:D,index:V}=b,{parent:P,index:$}=g,Q=(Ie,Lt)=>Ie.id===Lt?!0:Ie.children?Ie.children.some(tm=>Q(tm,Lt)):!1;if(Q(k,p))return;const ee={id:k.id,title:k.title,url:k.url,children:k.children||[]};D?D.children.splice(V,1):a.value.splice(V,1),P?P.children.splice($,0,ee):a.value.splice($,0,ee)}catch(k){console.error("Error parsing drag data:",k)}},w=(y,p)=>{r.value=p},m=(y,p)=>{r.value=null};return(y,p)=>{const k=s.resolveComponent("VsForm"),b=s.resolveComponent("VsDialog");return s.openBlock(),s.createElementBlock("div",null,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(a.value,(g,D)=>(s.openBlock(),s.createElementBlock("div",{key:g.id},[s.createVNode(Jh,{item:g,onItemDropped:d,"is-sibling-drag-over":r.value,onSiblingDragEnter:w,onSiblingDragLeave:m,onSiblingDrop:_},null,8,["item","is-sibling-drag-over"])]))),128)),s.createElementVNode("button",{class:"px-3 text-blue-500 hover:text-blue-700 duration-300 hover:underline hover:underline-2",onClick:p[0]||(p[0]=g=>n.value=!0)}," Добавить "),s.createVNode(b,{visible:n.value,"onUpdate:visible":p[3]||(p[3]=g=>n.value=g),title:"Додати елемент меню"},{footer:s.withCtx(()=>[s.createElementVNode("div",Zh,[s.createElementVNode("button",{class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border rounded-lg border-gray-200 hover:bg-gray-100 duration-300",onClick:p[2]||(p[2]=g=>n.value=!1)}," Скасувати"),s.createElementVNode("button",{class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300",onClick:f}," Зберегти ")])]),default:s.withCtx(()=>[s.createVNode(k,{scheme:i.value,modelValue:o.value,"onUpdate:modelValue":p[1]||(p[1]=g=>o.value=g)},null,8,["scheme","modelValue"])]),_:1},8,["visible"])])}}},[["__scopeId","data-v-8b028afb"]]),Xh={class:"w-full flex justify-center bg-gray-100 h-[calc(100vh-60px)]"},Qh={class:"p-[20px] w-full max-w-[1440px]"},em={class:"w-full bg-white rounded-lg p-[20px] border mt-[20px]"},Vs={"vs-builder":La,"vs-builder-content":_a,"vs-manager-single":Ga,"vs-manager-single-content":Yu,"vs-manager-collection":ti,"vs-manager-collection-list":bh,"vs-manager-collection-content":Su,"vs-manager-collection-item-content":Cu,"vs-media":ph,"vs-permissions":Ih,"vs-menu-tree":{__name:"vs-menu-tree",setup(e){return(t,n)=>(s.openBlock(),s.createElementBlock("section",Xh,[s.createElementVNode("div",Qh,[n[0]||(n[0]=s.createElementVNode("h1",null,"Дерево меню",-1)),s.createElementVNode("div",em,[s.createVNode(Kh)])])]))}}},Os={install:e=>{var t;(t=Object.entries(Vs))==null||t.forEach(([n,r])=>e.component(n,r))},components:Vs};return typeof window<"u"&&(window.v3Cms=Os),Os});
package/dist/style.css ADDED
@@ -0,0 +1 @@
1
+ .draggable-item[data-v-b98f5b2f]{cursor:move;-webkit-user-select:none;user-select:none;padding:4px;transition:all .2s ease;border-radius:6px;border:2px solid transparent;position:relative;z-index:1}.draggable-item[data-v-b98f5b2f]:hover{background-color:#f3f4f6}.draggable-item.drag-over[data-v-b98f5b2f]{background-color:#e0f2fe;border-color:#3b82f6;box-shadow:0 0 0 2px #3b82f633;transform:scale(1.02)}.draggable-item.dragging[data-v-b98f5b2f]{opacity:.5;background-color:#dbeafe;border-color:#3b82f6}.draggable-item button[data-v-b98f5b2f]{position:relative;z-index:2}.drop-zone[data-v-b98f5b2f]{height:4px;margin-bottom:4px;transition:all .2s ease}.drop-zone-active[data-v-b98f5b2f]{background-color:#3b82f6;transform:scale(1.01)}.root-drag-over[data-v-8b028afb]{border-color:#3b82f6;background-color:#dbeafe;box-shadow:0 0 0 4px #3b82f633;transform:scale(1.01)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengis/cms",
3
- "version": "0.0.11",
3
+ "version": "0.0.13",
4
4
  "description": "cms",
5
5
  "type": "module",
6
6
  "author": "Softpro",
@@ -35,26 +35,39 @@ export default async function listMedia(req, reply) {
35
35
  [relpath],
36
36
  );
37
37
 
38
- if (!rows.length && false) {
39
- return { data: [], relpath, msg: 'empty rows' };
40
- }
41
-
42
38
  const isDirectory = (await stat(dirpath)).isDirectory();
43
39
 
44
40
  const items = isDirectory ? await readdir(dirpath, { withFileTypes: true }) : [];
45
41
 
42
+ const subdirs = items
43
+ .filter(el => el.isDirectory())
44
+ .map(el => ({ type: 'dir', name: el.name }));
45
+
46
+ if (subdirs.length) {
47
+ await Promise.all(subdirs.map(async (item) => {
48
+ const items = isDirectory ? await readdir(path.join(dirpath, item.name)) : [];
49
+ Object.assign(item, { count: items.length });
50
+ }));
51
+ }
52
+
53
+ const result = { relpath, data: rows.concat(subdirs) };
54
+
55
+ if (config.debug) {
56
+ Object.assign(result, { rootDir });
57
+ }
58
+
59
+ if (!rows.length) {
60
+ return result;
61
+ }
62
+
46
63
  rows.forEach(row => Object.assign(row, {
64
+ type: 'file',
47
65
  url: `${req.routeOptions.url}/${row.id}/file`,
48
66
  filepath: row.url,
67
+ name: row.filename,
49
68
  metadata: `${req.routeOptions.url}/${row.id}`,
50
69
  exists: !!items.find(el => el.isFile() && el.name === path.basename(row.url))
51
70
  }));
52
71
 
53
- const result = { relpath, data: rows };
54
-
55
- if (config.debug) {
56
- Object.assign(result, { rootDir });
57
- }
58
-
59
72
  return result;
60
73
  }
@@ -1 +0,0 @@
1
- const e=[{key:"name",type:"Text",ua:"Назва",placeholder:"Назва",validators:["required"]},{key:"template",type:"Text",ua:"Шаблон",placeholder:"Шаблон",validators:["required"]},{key:"description",type:"Text",ua:"Опис",placeholder:"Опис"}];export{e as s};
@@ -1 +0,0 @@
1
- import{_ as n,c as t,a as o,o as r}from"./index-qmYrZ9-m.js";const l={},s={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-arrow-left"};function a(c,e){return r(),t("svg",s,e[0]||(e[0]=[o("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),o("path",{d:"M5 12l14 0"},null,-1),o("path",{d:"M5 12l6 6"},null,-1),o("path",{d:"M5 12l6 -6"},null,-1)]))}const d=n(l,[["render",a]]);export{d as I};
@@ -1 +0,0 @@
1
- import{_ as n,c as t,o as r,a as e}from"./index-qmYrZ9-m.js";const s={},c={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-check"};function l(i,o,a,p,d,h){return r(),t("svg",c,o[0]||(o[0]=[e("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e("path",{d:"M5 12l5 5l10 -10"},null,-1)]))}const u=n(s,[["render",l]]);export{u as I};
@@ -1 +0,0 @@
1
- import{_ as o,c as r,a as n,o as t}from"./index-qmYrZ9-m.js";const s={},c={"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 6 10"};function a(i,e){return t(),r("svg",c,e[0]||(e[0]=[n("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m1 9 4-4-4-4"},null,-1)]))}const d=o(s,[["render",a]]);export{d as I};
@@ -1 +0,0 @@
1
- import{_ as e,c as o,o as r,a as n}from"./index-qmYrZ9-m.js";const s={},c={xmlns:"http://www.w3.org/2000/svg",width:"5",height:"5",fill:"currentColor",viewBox:"0 0 4 4"};function i(l,t){return r(),o("svg",c,t[0]||(t[0]=[n("rect",{width:"4",height:"4",fill:"currentColor",rx:"2"},null,-1)]))}const _=e(s,[["render",i]]);export{_ as I};