vgapp 0.3.6 → 0.3.8
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.
|
@@ -149,7 +149,7 @@ class VGFormSender extends BaseModule {
|
|
|
149
149
|
if (!_this._params.interceptors.error) {
|
|
150
150
|
_this._alertError(event, data);
|
|
151
151
|
} else {
|
|
152
|
-
execute(_this._params.callback.afterError
|
|
152
|
+
execute(_this._params.callback.afterError, [_this._element, _this, event, data]);
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
} else if (typeof status === 'string' && status === 'success') {
|
|
@@ -159,7 +159,7 @@ class VGFormSender extends BaseModule {
|
|
|
159
159
|
if (!_this._params.interceptors.success) {
|
|
160
160
|
_this._alertSuccess(event, data);
|
|
161
161
|
} else {
|
|
162
|
-
execute(_this._params.callback.afterSuccess
|
|
162
|
+
execute(_this._params.callback.afterSuccess, [_this._element, _this, event, data]);
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
165
|
}
|
|
@@ -413,7 +413,7 @@ class VGFormSender extends BaseModule {
|
|
|
413
413
|
code = ' ' + data.text + ' (' + data.code + ')';
|
|
414
414
|
}
|
|
415
415
|
|
|
416
|
-
if (title) txt += '<h4 class="vg-alert-content--title">' +
|
|
416
|
+
if (!title) txt += '<h4 class="vg-alert-content--title">' + code + '</h4>';
|
|
417
417
|
|
|
418
418
|
if ('message' in response) {
|
|
419
419
|
txt += '<div class="vg-alert-content--message">' + response.message + '</div>'
|
package/build/vgapp.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! For license information please see vgapp.js.LICENSE.txt */
|
|
2
|
-
var vg;(()=>{"use strict";var e={d:(t,s)=>{for(var a in s)e.o(s,a)&&!e.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:s[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function s(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}e.r(t),e.d(t,{VGAlert:()=>As,VGCollapse:()=>ke,VGDataTable:()=>Fs,VGDropdown:()=>tt,VGFormSender:()=>jt,VGLawCookie:()=>ts,VGModal:()=>Et,VGNav:()=>He,VGRollup:()=>Yt,VGSelect:()=>ks,VGSidebar:()=>de,VGSpy:()=>Rs,VGToast:()=>Ds});const a=e=>!!r(e)&&void 0!==e.nodeType,i=e=>!e||e.nodeType!==Node.ELEMENT_NODE||!!e.classList.contains("disabled")||(void 0!==e.disabled?e.disabled:e.hasAttribute("disabled")&&"false"!==e.getAttribute("disabled"));function n(e){if(!a(e)||0===e.getClientRects().length)return!1;const t="visible"===getComputedStyle(e).getPropertyValue("visibility"),s=e.closest("details:not([open])");if(!s)return t;if(s!==e){const t=e.closest("summary");if(t&&t.parentNode!==s)return!1;if(null===t)return!1}return t}function r(e){return e&&"object"==typeof e}function o(e){if("true"===e)return!0;if("false"===e)return!1;if(e===Number(e).toString())return Number(e);if(""===e||"null"===e)return null;if("string"!=typeof e)return e;try{return JSON.parse(decodeURIComponent(e))}catch{return e}}function l(...e){const t=e=>e&&"object"==typeof e;return e.reduce(((e,s)=>(Object.keys(s).forEach((a=>{const i=e[a],n=s[a];Array.isArray(i)&&Array.isArray(n)?e[a]=i.concat(...n):t(i)&&t(n)?e[a]=l(i,n):e[a]=n})),e)),{})}function d(e,t=[],s=e){return"function"==typeof e?e(...t):s}const c="transitionend",m=e=>{e.offsetHeight},h=()=>{};function u(e=7){let t="";let s=0;for(;s<e;)t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".charAt(Math.floor(62*Math.random())),s+=1;return t}const p=()=>"rtl"===document.documentElement.dir,g=e=>{let t=e.getAttribute("data-vg-target");if(!t||"#"===t){let s=e.getAttribute("href");if(!s||!s.includes("#")&&!s.startsWith("."))return null;s.includes("#")&&!s.startsWith("#")&&(s=`#${s.split("#")[1]}`),t=s&&"#"!==s?s.trim():null}return t?t.split(",").map((e=>(e=>(e&&window.CSS&&window.CSS.escape&&(e=e.replace(/#([^\s"#']+)/g,((e,t)=>`#${CSS.escape(t)}`))),e))(e))).join(","):null},_={find:(e,t=document.documentElement)=>a(e)?e:Element.prototype.querySelector.call(t,e),findAll:(e,t=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(t,e)),getSelectorFromElement(e){const t=g(e);return t&&_.find(t)?t:null},getElementFromSelector(e){const t=g(e);return t?_.find(t):null},getMultipleElementsFromSelector(e){const t=g(e);return t?_.findAll(t):[]},prev:e=>e.previousElementSibling||null},f=_,v=new Map,b={set(e,t,s){v.has(e)||v.set(e,new Map);const a=v.get(e);a.has(t)||0===a.size?a.set(t,s):console.error(`VGApp не допускает более одного экземпляра для каждого элемента. Связанный экземпляр: ${Array.from(a.keys())[0]}.`)},get:(e,t)=>v.has(e)&&v.get(e).get(t)||null,remove(e,t){if(!v.has(e))return;const s=v.get(e);s.delete(t),0===s.size&&v.delete(e)}},w={get(e,t="data",s=!0){if(!e)return{};if("data"===t){let t=["data-vg-toggle","data-vg-target","data-vg-dismiss"],a={},i=[].filter.call(e.attributes,(function(e){return/^data-/.test(e.name)}));return i.length&&i.forEach((function(e){let i=e.name;t.includes(i)||(s&&(i=i.slice(5)),a[i]=o(e.value))})),a}return"all"===t?e.getAttributeNames().reduce(((t,s)=>({...t,[s]:e.getAttribute(s)})),{}):e.getAttribute(t)},has:(e,t)=>e.hasAttribute(t),set(e,t,s){a(e)&&t&&e.setAttribute(t,s)},remove(e,t){a(e)&&t&&e.removeAttribute(t)},hide(e){e.style.display="none"},show(e,t="block"){e.style.display=t}},y=class{constructor(e,t=null){this._params=this.merge(e,t)}get(){return this._params}fromElement(e){return a(e)?w.get(e):{}}merge(e,t){let s=l(e,this.fromElement(t));for(let e in s)if(-1!==e.indexOf("-")){let t=e.split("-"),a=o(s[e]);t[0]in s&&t[1]in s[t[0]]&&(s[t[0]][t[1]]=a),delete s[e]}return"params"in s&&(s=l(s,s.params),delete s.params),s}},k=/[^.]*(?=\..*)\.|.*/,L=/\..*/,x=/::\d+$/,E={};let A=1;const C={mouseenter:"mouseover",mouseleave:"mouseout"},S=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","submit","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","popstate","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function T(e,t){return t&&`${t}::${A++}`||e.uidEvent||A++}function M(e){const t=T(e);return e.uidEvent=t,E[t]=E[t]||{},E[t]}function O(e,t,s=null){return Object.values(e).find((e=>e.callable===t&&e.delegationSelector===s))}function $(e,t,s){const a="string"==typeof t,i=a?s:t||s;let n=(r=(r=e).replace(L,""),C[r]||r);var r;return S.has(n)||(n=e),[a,i,n]}function I(e,t,s,a,i){if("string"!=typeof t||!e)return;let[n,r,o]=$(t,s,a);if(t in C){const e=e=>function(t){if(!t.relatedTarget||t.relatedTarget!==t.delegateTarget&&!t.delegateTarget.contains(t.relatedTarget))return e.call(this,t)};r=e(r)}const l=M(e),d=l[o]||(l[o]={}),c=O(d,r,n?s:null);if(c)return void(c.oneOff=c.oneOff&&i);const m=T(r,t.replace(k,"")),h=n?function(e,t,s){return function a(i){const n=e.querySelectorAll(t);for(let{target:r}=i;r&&r!==this;r=r.parentNode)for(const o of n)if(o===r)return j(i,{delegateTarget:r}),a.oneOff&&q.off(e,i.type,t,s),s.apply(r,[i])}}(e,s,r):function(e,t){return function s(a){return j(a,{delegateTarget:e}),s.oneOff&&q.off(e,a.type,t),t.apply(e,[a])}}(e,r);h.delegationSelector=n?s:null,h.callable=r,h.oneOff=i,h.uidEvent=m,d[m]=h,e.addEventListener(o,h,n)}function P(e,t,s,a,i){const n=O(t[s],a,i);n&&(e.removeEventListener(s,n,Boolean(i)),delete t[s][n.uidEvent])}function N(e,t,s,a){const i=t[s]||{};for(const[n,r]of Object.entries(i))n.includes(a)&&P(e,t,s,r.callable,r.delegationSelector)}function j(e,t={}){for(const[s,a]of Object.entries(t))try{e[s]=a}catch{Object.defineProperty(e,s,{configurable:!0,get:()=>a})}return e}const q={on(e,t,s,a){I(e,t,s,a,!1)},one(e,t,s,a){I(e,t,s,a,!0)},off(e,t,s,a){if("string"!=typeof t||!e)return;const[i,n,r]=$(t,s,a),o=r!==t,l=M(e),d=l[r]||{},c=t.startsWith(".");if(void 0===n){if(c)for(const s of Object.keys(l))N(e,l,s,t.slice(1));for(const[s,a]of Object.entries(d)){const i=s.replace(x,"");o&&!t.includes(i)||P(e,l,r,a.callable,a.delegationSelector)}}else{if(!Object.keys(d).length)return;P(e,l,r,n,i?s:null)}},trigger(e,t,s){if("string"!=typeof t||!e)return null;const a=j(new Event(t,{bubbles:!0,cancelable:!0}),s);return e.dispatchEvent(a),a}},H=q,D=e=>({error:'<svg viewBox="0 0 87 87" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="ui-success" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Group-2" transform="translate(2.000000, 2.000000)"><circle id="Oval-2" stroke="rgba(252, 191, 191, .5)" stroke-width="4" cx="41.5" cy="41.5" r="41.5"></circle><circle class="ui-error-circle" stroke="#F74444" stroke-width="4" cx="41.5" cy="41.5" r="41.5"></circle><path class="ui-error-line1" d="M22.244224,22 L60.4279902,60.1837662" id="Line" stroke="#F74444" stroke-width="3" stroke-linecap="square"></path><path class="ui-error-line2" d="M60.755776,21 L23.244224,59.8443492" id="Line" stroke="#F74444" stroke-width="3" stroke-linecap="square"></path></g></g></svg>',success:'<svg viewBox="0 0 87 87" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="ui-error" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Group-3" transform="translate(2.000000, 2.000000)"><circle id="Oval-2" stroke="rgba(117, 183, 152, 0.4)" stroke-width="4" cx="41.5" cy="41.5" r="41.5"></circle><circle class="ui-success-circle" id="Oval-2" stroke="#A5DC86" stroke-width="4" cx="41.5" cy="41.5" r="41.5"></circle><polyline class="ui-success-path" id="Path-2" stroke="#A5DC86" stroke-width="4" points="19 38.8036813 31.1020744 54.8046875 63.299221 28"></polyline></g></g></svg>',waiting:'<svg viewBox="0 0 87 87" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="ui-waiting" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Group-3" transform="translate(2.000000, 2.000000)"><circle id="Oval-2" stroke="rgba(255, 218, 106, 0.4)" stroke-width="4" cx="41.5" cy="41.5" r="41.5"></circle><circle class="ui-waiting-circle" id="Oval-2" stroke="#ffda6a" stroke-width="4" cx="41.5" cy="41.5" r="41.5"></circle><path class="ui-waiting-line1" d="M43 63C54.598 63 64 53.598 64 42C64 30.402 54.598 21 43 21C31.402 21 22 30.402 22 42C22 53.598 31.402 63 43 63Z" stroke-width="3" stroke="#ffda6a" stroke-linecap="round" stroke-linejoin="round"/><path class="ui-waiting-line2" d="M40.6667 32.6641V44.3307H52.3334" stroke="#ffda6a" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/></g></g></svg>',dots:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-three-dots-vertical" viewBox="0 0 16 16"><path d="M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0z"/></svg>',cross:'<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 224.512 224.512" xml:space="preserve"><g><polygon points="224.507,6.997 217.521,0 112.256,105.258 6.998,0 0.005,6.997 105.263,112.254 0.005,217.512 6.998,224.512 112.256,119.24 217.521,224.512 224.507,217.512 119.249,112.254 "/></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g></svg>'}[e]??{}),B=(e,t="hide")=>{const s=`click.dismiss.${e.EVENT_KEY}`,a=e.NAME;H.on(document,s,`[data-vg-dismiss="${a}"]`,(function(s){if(["A","AREA"].includes(this.tagName)&&s.preventDefault(),i(this))return;const n=f.getSelectorFromElement(this)||this.closest(`.vg-${a}`);e.getOrCreateInstance(n)[t]()}))},F={x:function(){if("undefined"!=typeof XMLHttpRequest)return new XMLHttpRequest;let e,t=["MSXML2.XmlHttp.6.0","MSXML2.XmlHttp.5.0","MSXML2.XmlHttp.4.0","MSXML2.XmlHttp.3.0","MSXML2.XmlHttp.2.0","Microsoft.XmlHttp"];for(let s=0;s<t.length;s++)try{e=new ActiveXObject(t[s]);break}catch(e){}return e},send:function(e,t,s,a,i){void 0===i&&(i=!0);let n=F.x();n.open(s,e,i),n.setRequestHeader("X-Requested-With","XMLHttpRequest"),n.onreadystatechange=function(){4===n.readyState&&(200===n.status?t("success",{text:n.statusText,response:n.responseText,code:n.status}):t("error",{text:n.statusText,response:n.responseText,code:n.status}))},n.send(a)},get:function(e,t,a,i){let n=[];if(!s(t))for(let e of t)n.push(encodeURIComponent(e[0])+"="+encodeURIComponent(e[1]));F.send(e+(n.length?"?"+n.join("&"):""),a,"GET",null,i)},post:function(e,t,s,a){F.send(e,s,"POST",t,a)}},R=class{constructor(e,t,s={}){this._params=l({enable:!1,in:"animate__backInUp",out:"animate__backOutUp",delay:0,duration:800},s),this.classes={animated:"animate__animated",duration:"animate__duration-"+this._params.duration},this._params.enable&&a(e)&&(this._element=e,this._name_key=t,this._element.classList.contains(this.classes.animated)||(this._element.classList.add(this.classes.animated),this._element.classList.add(this.classes.duration)),this._triggers())}_triggers(){H.on(this._element,this._name_key+".show",(()=>{this._element.classList.remove(this._params.out),this._element.classList.add(this._params.in)})),H.on(this._element,this._name_key+".hide",(()=>{this._element.classList.remove(this._params.in),this._element.classList.add(this._params.out)})),H.on(this._element,this._name_key+".hidden",(()=>{this._element.classList.remove(this._params.out)}))}},z=class{constructor(e){if(e){if(this._element=f.find(e),!this._element)throw new Error("Товарищ! Первый параметр не должен быть пустым!");this._params={},b.set(this._element,this.constructor.NAME_KEY,this)}}_getParams(e,t){return new y(t,e).get()}dispose(){b.remove(this._element,this.constructor.NAME_KEY),H.off(this._element,this.constructor.EVENT_KEY);for(const e of Object.getOwnPropertyNames(this))this[e]=null}_route(e){const t=this;let s=null;const a=e=>{s&&(s.innerHTML=e)};t._params.hasOwnProperty("ajax")&&t._params.ajax.route&&(!1 in t._params.ajax&&(t._params.ajax.method="get"),"target"in t._params.ajax&&t._params.ajax.target&&(s=f.find(t._params.ajax.target)),"loader"in t._params.ajax&&t._params.ajax.loader&&a('<div class="vg-loader"></div>'),F[t._params.ajax.method](t._params.ajax.route,t._params.ajax.data||{},(function(t,s){a(s.response),d(e,[t,s])})))}_dismissElement(){let e=D("cross"),t=this._element.querySelector(".vg-btn-close");t&&(t.querySelector("svg")||t.insertAdjacentHTML("beforeend",e))}_queueCallback(e,t,s=!0,a){!function(e,t,s=!0,a){if(!s)return void d(e);const i=a||(e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:s}=window.getComputedStyle(e);const a=Number.parseFloat(t),i=Number.parseFloat(s);return a||i?(t=t.split(",")[0],s=s.split(",")[0],1e3*(Number.parseFloat(t)+Number.parseFloat(s))):0})(t)+5;let n=!1;const r=({target:s})=>{s===t&&(n=!0,t.removeEventListener(c,r),d(e))};t.addEventListener(c,r),setTimeout((()=>{n||(e=>{e.dispatchEvent(new Event(c))})(t)}),i)}(e,t,s,a)}_animation(e,t,s={}){new R(e,t,s)}static getInstance(e){return b.get(f.find(e),this.NAME_KEY)}static getOrCreateInstance(e,t={}){return this.getInstance(e)||new this(e,s(t)?{}:t)}static get DATA_KEY(){return`vg.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}},Y=class{static append(){document.body.style.paddingRight=function(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}()+"px",document.body.style.overflow="hidden"}static destroy(){document.body.style.overflow="",document.body.style.paddingRight="",w.get(document.body,"style")||w.remove(document.body,"style")}},X="vg-backdrop",K="fade";class V{static show(e){V._append(),d(e)}static hide(e){V._destroy(),d(e)}static _append(){if(f.find("."+X))return!1;let e=document.createElement("div");e.classList.add(X),document.body.append(e),setTimeout((()=>{e.classList.add(K)}),50),H.on(e,"mousedown.vg.backdrop",(()=>{V.hide(),Y.destroy()}))}static _destroy(){let e=f.find("."+X);e&&(e.classList.remove(K),setTimeout((()=>{e.remove()}),500))}}const G=V,W="vg.sidebar",U="show",J="vg-sidebar-open",Q=`${W}.hide`,Z=`${W}.hidden`,ee=`${W}.show`,te=`${W}.shown`,se=`${W}.loaded`,ae=`keydown.dismiss.${W}`,ie=`hidePrevented.${W}`,ne=`click.${W}.data.api`,re=`popstate.${W}.data.api`,oe=`DOMContentLoaded.${W}.data.api`;class le extends z{constructor(e,t={}){super(e,t),this._params=this._getParams(e,l({backdrop:!0,overflow:!0,keyboard:!0,hash:!1,animation:{enable:!1,in:"animate__rollIn",out:"animate__rollOut",delay:800},ajax:{route:"",target:"",method:"get",loader:!1}},t)),this._addEventListeners(),this._dismissElement(),this._params.animation.delay=this._params.animation.enable?this._params.animation.delay:0,this._animation(this._element,le.NAME_KEY,this._params.animation)}static get NAME(){return"sidebar"}static get NAME_KEY(){return W}toggle(e){return this._isShown()?this.hide():this.show(e)}show(e){const t=this;i(t._element)||(e&&(t._params=t._getParams(e,t._params)),t._route((function(e,s){H.trigger(t._element,se,{stats:e,data:s})})),H.trigger(t._element,ee,{relatedTarget:e}).defaultPrevented||(t._params.backdrop&&G.show(),t._params.overflow&&Y.append(),this._params.hash&&(window.history.pushState(null,"vg-sidebar-open","#"+this._element.id),H.on(window,re,(()=>{this.hide()}))),t._element.classList.add(U),document.body.classList.add(J),t._queueCallback((()=>{H.on(f.find(".vg-backdrop"),"mousedown.vg.backdrop",(function(){t.hide()})),H.trigger(t._element,te,{relatedTarget:e})}),t._element,!0,50)))}hide(){const e=this;i(e._element)||H.trigger(this._element,Q).defaultPrevented||setTimeout((()=>{e._element.setAttribute("aria-expanded",!1),e._element.classList.remove(U),this._queueCallback((()=>{e._params.backdrop&&G.hide((function(){e._params.overflow&&Y.destroy()})),e._params.overflow&&Y.destroy(),e._params.hash&&history.pushState("",document.title,window.location.pathname+window.location.search),document.body.classList.remove(J),H.trigger(this._element,Z)}),this._element,!0)}),this._params.animation.delay)}dispose(){super.dispose()}_isShown(){return this._element.classList.contains(U)}_addEventListeners(){H.on(document,ae,(e=>{"Escape"===e.key&&(this._params.keyboard?this.hide():H.trigger(this._element,ie))}))}}B(le),H.on(document,ne,'[data-vg-toggle="sidebar"]',(function(e){const t=f.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&e.preventDefault(),i(this))return;this.setAttribute("aria-expanded",!0),H.one(t,Z,(()=>{this.setAttribute("aria-expanded",!1)}));const s=f.find(".vg-sidebar.show");s&&s!==t&&le.getInstance(s).hide(),le.getOrCreateInstance(t).toggle(this)})),H.on(document,oe,(function(){let e=window.location.hash.slice(1);if(e){let t=f.find("#"+e);if(t&&t.classList.contains("vg-sidebar")){if(i(t))return;le.getOrCreateInstance(t).toggle()}}}));const de=le,ce="vg.collapse",me="show",he="vg-collapse",ue="vg-collapsing",pe=`:scope .${he} .${he}`,ge='[data-vg-toggle="collapse"]',_e=`${ce}.hide`,fe=`${ce}.hidden`,ve=`${ce}.show`,be=`${ce}.shown`,we=`click.${ce}.data.api`;class ye extends z{constructor(e,t={}){super(e,t),this._params=this._getParams(e,l({toggle:!0,parent:null,ajax:{route:"",target:"",method:"get",loader:!1}},t)),this._isTransitioning=!1,this._triggerArray=[];const s=f.findAll(ge);for(const e of s){const t=f.getSelectorFromElement(e),s=f.findAll(t).filter((e=>e===this._element));null!==t&&s.length&&this._triggerArray.push(e)}this._initializeChildren(),this._params.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._params.toggle&&this.toggle()}static get NAME(){return"collapse"}static get NAME_KEY(){return ce}toggle(e){return this._isShown()?this.hide():this.show(e)}show(){const e=this;if(e._isTransitioning||e._isShown())return;let t=[];if(!(e._params.parent&&(t=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter((e=>e!==this._element)).map((e=>ye.getOrCreateInstance(e,{toggle:!1})))),t.length&&t[0]._isTransitioning||H.trigger(e._element,ve).defaultPrevented)){for(const e of t)e.hide();e._element.classList.remove(he),e._element.classList.add(ue),e._element.style.height=0,e._addAriaAndCollapsedClass(e._triggerArray,!0),e._isTransitioning=!0,e._route(),e._queueCallback((()=>{e._isTransitioning=!1,e._element.classList.remove(ue),e._element.classList.add(he,me),e._element.style.height="",H.trigger(e._element,be)}),e._element,!0),e._element.style.height=`${e._element.scrollHeight}px`}}hide(){const e=this;if(!e._isTransitioning&&e._isShown()&&!H.trigger(e._element,_e).defaultPrevented){e._element.style.height=`${this._element.getBoundingClientRect().height}px`,m(e._element),e._element.classList.add(ue),e._element.classList.remove(he,me);for(const t of e._triggerArray){const s=f.getElementFromSelector(t);s&&!e._isShown(s)&&e._addAriaAndCollapsedClass([t],!1)}e._isTransitioning=!0,e._element.style.height="",e._queueCallback((()=>{e._isTransitioning=!1,e._element.classList.remove(ue),e._element.classList.add(he),H.trigger(e._element,fe)}),e._element,!0)}}dispose(){super.dispose()}_isShown(e=this._element){return e.classList.contains(me)}_addAriaAndCollapsedClass(e,t){if(e.length)for(const s of e)this._changeStateButton(s,t)}_initializeChildren(){if(!this._params.parent)return;const e=this._getFirstLevelChildren(ge);for(const t of e){const e=f.getElementFromSelector(t);e&&this._addAriaAndCollapsedClass([t],this._isShown(e))}}_getFirstLevelChildren(e){const t=f.find(pe,this._params.parent);return f.find(e,this._params.parent).filter((e=>!t.includes(e)))}_changeStateButton(e,t){e.classList.toggle("vg-collapsed",!t),e.setAttribute("aria-expanded",t),e.innerHTML=w.get(e,`data-${t?"hide":"show"}-text`)||e.innerHTML}}H.on(document,we,ge,(function(e){("A"===e.target.tagName||e.delegateTarget&&"A"===e.delegateTarget.tagName)&&e.preventDefault(),f.getMultipleElementsFromSelector(this).forEach((function(e){ye.getOrCreateInstance(e,{toggle:!1}).toggle()}))}));const ke=ye,Le=class{constructor(){this.breakpoints={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400,xxxl:1600}}static check(e){return(new this).define(e)}static checkMobileOrTablet(){let e=!1;var t;return t=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.slice(0,4)))&&(e=!0),e}define(e){let t=window.innerWidth,s=this._checkResponsiveClass(e),a=this.breakpoints,i=Object.keys(a).find((e=>a[e]===s)),n=Object.keys(a),r=n.indexOf(i);return t>=a[n[r+1]]}_checkResponsiveClass(e){let t=e._element,s=e._params,a=0;return a=t.classList.contains(s.classes.XXXL)?this.breakpoints.xxxl:t.classList.contains(s.classes.XXL)?this.breakpoints.xxl:t.classList.contains(s.classes.XL)?this.breakpoints.xl:t.classList.contains(s.classes.LG)?this.breakpoints.lg:t.classList.contains(s.classes.MD)?this.breakpoints.md:t.classList.contains(s.classes.SM)?this.breakpoints.sm:(t.classList.contains(s.classes.XS),this.breakpoints.xs),a}},xe="vg.nav",Ee="show",Ae="fade",Ce="active",Se=`${xe}.hide`,Te=`${xe}.hidden`,Me=`${xe}.show`,Oe=`${xe}.shown`,$e=`mouseover.${xe}.data.api`,Ie=`mouseout.${xe}.data.api`,Pe=`click.${xe}.data.api`,Ne=`keyup.${xe}.data.api`,je=`resize.${xe}.data.api`;class qe extends z{constructor(e,t={}){super(e),this._params=this._getParams(e,l({breakpoint:!1,placement:"horizontal",classes:{hamburgerActive:"vg-nav-hamburger-active",hamburgerAlways:"vg-nav-hamburger-always",hamburger:"vg-nav-hamburger",container:"vg-nav-container",wrapper:"vg-nav-wrapper",active:"vg-nav-active",expand:"vg-nav-expand",cloned:"vg-nav-cloned",hover:"vg-nav-hover",flip:"vg-nav-flip",XXXL:"vg-nav-xxxl",XXL:"vg-nav-xxl",XL:"vg-nav-xl",LG:"vg-nav-lg",MD:"vg-nav-md",SM:"vg-nav-sm",XS:"vg-nav-xs"},expand:!0,hover:!1,position:!0,collapse:!0,toggle:'<span class="default"></span>',hamburger:{enable:!0,always:!1,title:"",body:null},callback:h,animation:!0,timeoutAnimation:300,ajax:{route:"",target:"",method:"get"}},t)),this._navigation=null,this.navigation="."+this._params.classes.wrapper,this.movedLinks=[],this.$links=f.findAll("."+this._params.classes.wrapper+" > li",this.navigation),!1===this._params.animation&&(this._params.timeoutAnimation=10)}static get NAME(){return"nav"}static get NAME_KEY(){return xe}get navigation(){return this._navigation}set navigation(e){let t=f.find(e,this._element);t&&(this._navigation=t)}build(){if(!this.navigation)return;let e=this._params;if(this._element.classList.add(e.classes.container),this._element.classList.add("vg-nav-"+e.placement),e.breakpoint||(e.expand=!1),e.hamburger.always?this._element.classList.add(e.classes.hamburgerAlways):e.breakpoint&&e.expand?!1!==e.breakpoint&&this._element.classList.add("vg-nav-"+e.breakpoint):this._element.classList.add(e.classes.expand),e.hover&&(this._element.classList.add(e.classes.hover),Le.checkMobileOrTablet()&&this._element.classList.remove(e.classes.hover)),e.expand&&!e.hamburger.body&&null===f.find("."+e.classes.hamburger,this._element)){let t="",s='<span class="'+e.classes.hamburger+'--lines"><span></span><span></span><span></span></span>';e.hamburger.title&&(t='<span class="'+e.classes.hamburger+'--title">'+e.hamburger.title+"</span>"),null!==e.hamburger.body&&(s=e.hamburger.body),this._element.insertAdjacentHTML("afterbegin",'<a href="#sidebar-nav" class="'+e.classes.hamburger+'" data-vg-toggle="sidebar">'+t+s+"</a>")}if(e.toggle){let t=[...f.findAll(".dropdown-mega > a, .dropdown > a",this._element)],s='<span class="toggle">'+e.toggle+"</span>";t.length&&t.forEach((function(e){e.querySelector(".toggle")||e.closest(".dots")||(e.setAttribute("aria-expanded","false"),e.insertAdjacentHTML("beforeend",s))}))}e.collapse&&Le.check(this)&&"vertical"!==e.placement&&function(e){let t=e.navigation.clientWidth,s=0,a=f.find(".dots",e.navigation),i=D("dots");if(e.$links.length){if(a)s=a.clientWidth;else{let t=f.find("a",e.$links[0]),a=getComputedStyle(t);s=o(a.paddingLeft.slice(0,-2))+o(a.paddingRight.slice(0,-2))+16}for(let i of e.$links)s+=i.getBoundingClientRect().width,t<s?(e.movedLinks.push(i),i.remove()):e.movedLinks.length&&(a?e.navigation.insertBefore(e.movedLinks[0],a):e.navigation.appendChild(e.movedLinks[0]),e.movedLinks.splice(0,1));e.movedLinks.length?a||e.navigation.insertAdjacentHTML("beforeend",'<li class="dropdown dots"><a href="#" aria-expanded="false">'+i+"</a></li>"):a&&a.remove();let n=e.navigation.querySelector(".dots");if(n&&e.movedLinks.length){let t=n.querySelector("ul");if(t)for(let s of e.movedLinks)t.prepend(s);else{let t=document.createElement("ul");t.classList.add("dropdown-content"),t.classList.add("right");for(let s of e.movedLinks)t.prepend(s);n.appendChild(t)}}}}(this),"afterInit"in this._params.callback&&d(this._params.callback.afterInit,[this])}show(e){let t=e.relatedTarget;if(!t||i(t))return;if(t.closest(".dropdown-content")||t.classList.add("first"),H.trigger(t,Me,{relatedTarget:e}).defaultPrevented)return;let s=f.find(".dropdown-content",t),a=t.firstElementChild;a&&a.setAttribute("aria-expanded","true"),s.classList.add(Ee),t.classList.add(Ce),function(e){let{width:t,right:s}=e.getBoundingClientRect(),a=window.innerWidth-s-t;e.classList.remove("right"),e.classList.remove("left");let i=e.closest("li").querySelectorAll("ul");if(a>t)for(const e of i)e.classList.add("left");else for(const e of i)e.classList.add("right")}(s),this._queueCallback((()=>{s.classList.add(Ae),H.trigger(t,Oe,e)}),s,!0,50)}hide(e){const t=this;if("ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))H.off(e,"mouseover",h);let s=e.relatedTarget;if("elm"in e&&e.elm&&(s=e.elm),s){if(H.trigger(s,Se).defaultPrevented)return;s.classList.remove(Ce),s.classList.contains("first")&&s.classList.remove("first"),[...f.findAll("."+Ee,s)].forEach((function(s,a){s.classList.remove(Ae);let i=s.closest(".dropdown");i.classList.contains(Ce)&&i.classList.remove(Ce);let n=s.previousElementSibling;if(n&&n.setAttribute("aria-expanded","false"),0===a){const a=()=>{s.classList.remove(Ee),H.trigger(s,Te,e)};t._queueCallback(a,s,!0,500)}}))}}static init(e,t={}){const s=qe.getOrCreateInstance(e,t);s.build();let a=f.findAll(".dropdown",s._navigation);s._params.hover?[...a].forEach((function(e){let t=null;H.on(e,$e,(function(e){if(t)return;qe.hideOpenDrops(e);let a=e.target.closest(".dropdown");if(!a)return;if(!s.navigation.contains(a))return;t=a;let i={relatedTarget:a};s.show(i)})),H.on(e,Ie,(function(e){if(!t)return;let a=e.relatedTarget.closest(".dropdown"),i=t;for(;a;){if(a===t)return;a=a.parentNode}t=null,s.hide({relatedTarget:a,elm:i})}))})):(H.on(document,Ne,qe.clearDrops),H.on(document,Pe,qe.clearDrops),H.on(document,Pe,".vg-nav a",(function(e){if(!w.has(this,"aria-expanded"))return;"click"in s._params.callback&&d(s._params.callback.click,[this]),e.preventDefault();let t=this.closest(".vg-nav"),a=t.querySelector(".first"),r=this.closest(".dropdown");if(r&&(!i(r)||n(r))){if(a&&this.closest(".first")){if(r.classList.contains("active"))return void s.hide({relatedTarget:r})}else[...f.findAll(".active",t)].forEach((function(e){e&&e!==r&&s.hide({relatedTarget:e})}));s.show({relatedTarget:r})}})));const r=document.getElementById("sidebar-nav");let o=s._element.querySelector("."+s._params.classes.hamburger);r&&o&&(r.addEventListener("vg.sidebar.show",(function(){o.classList.add(s._params.classes.hamburgerActive)})),r.addEventListener("vg.sidebar.hide",(function(){o.classList.remove(s._params.classes.hamburgerActive)})))}static clearDrops(e){2===e.button||"keyup"===e.type&&"Tab"!==e.key||qe.hideOpenDrops(e)}static hideOpenDrops(e){const t=f.findAll(".dropdown:not(.disabled):not(:disabled).active");for(const s of t){const t=qe.getInstance(s.closest(".vg-nav"));if(!t)continue;if(e.target.closest(".first"))return;const a={relatedTarget:s};"click"===e.type&&(a.clickEvent=e),t.hide(a)}}}H.on(window,je,(function(){f.find(".vg-nav")&&qe.getOrCreateInstance(".vg-nav",{}).build()}));const He=qe,De=class{constructor(e={}){this.params=l({element:null,drop:null},e)}_getPlacement(){const e=this,t=e=>{let s=e.parentNode,a=getComputedStyle(s).overflow;return"BODY"===s.tagName?null:"visible"!==a?s:void t(s)};let s,a,i=!1,n=e.params.drop.getBoundingClientRect(),r=e.params.element.getBoundingClientRect();if(t(e.params.element))i=!0,s=n.top,a=n.left;else{let t=getComputedStyle(e.params.drop);s=o(t.top.slice(0,-2)),a=o(t.left.slice(0,-2))}return n.left+n.width>window.innerWidth&&(a=r.width-n.width),{isFixed:i,top:s,left:a}}},Be="vg.dropdown",Fe="show",Re="fade",ze="vg-dropdown-content",Ye='[data-vg-toggle="dropdown"]',Xe=`${Be}.hide`,Ke=`${Be}.hidden`,Ve=`${Be}.show`,Ge=`${Be}.shown`,We=`keyup.${Be}.data.api`,Ue=`keydown.${Be}.data.api`,Je=`click.${Be}.data.api`,Qe=`mouseover.${Be}.data.api`,Ze=`mouseout.${Be}.data.api`;class et extends z{constructor(e,t){super(e,t);let s={offset:[0,2],backdrop:!1,overflow:!1,keyboard:!1,placement:"bottom",timeoutAnimation:350,hover:!1,ajax:{route:"",target:"",method:"get",loader:!1},animation:{enable:!1,in:"animate__flipInY",out:"animate__flipOutY",delay:800}};"offset"in t&&Array.isArray(t.offset)&&(s.offset=t.offset),this._params=this._getParams(e,l(s,t));const a=f.getElementFromSelector(this._element);this._parent=this._element.parentNode,this._drop=a||f.find("."+ze,this._parent),this._isPlacement=!1,this._params.animation.delay=this._params.animation.enable?this._params.animation.delay:0,this._animation(this._drop,et.NAME_KEY,this._params.animation)}static get NAME(){return"dropdown"}static get NAME_KEY(){return Be}toggle(){return this._isShown()?this.hide():this.show()}show(){if(i(this._element)||this._isShown())return;const e={relatedTarget:this._element};if(!H.trigger(this._element,Ve,e).defaultPrevented){if("ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))H.on(e,"mouseover",h);this._route(),this._element.setAttribute("aria-expanded",!0),this._element.classList.add(Fe),this._drop.classList.add(Fe),this._setPlacement(),this._params.backdrop&&!this._params.hover&&G.show(),this._params.overflow&&(Y.append(),document.body.classList.add("dropdown-open")),this._queueCallback((()=>{this._drop.classList.add(Re),H.trigger(this._element,Ge,e)}),this._drop,!0,50)}}hide(){if(i(this._element)||!this._isShown())return;const e={relatedTarget:this._element};this._completeHide(e)}dispose(){return super.dispose()}_isShown(){return this._element.classList.contains(Fe)}_completeHide(e){if(!H.trigger(this._element,Xe,e).defaultPrevented){if("ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))H.off(e,"mouseover",h);if(this._drop.classList.remove(Re),this._element.classList.remove(Fe),this._element.setAttribute("aria-expanded","false"),this._params.backdrop&&!this._params.hover){const e=this;G.hide((function(){e._params.overflow&&Y.destroy()}))}this._params.overflow&&(Y.destroy(),document.body.classList.remove("dropdown-open")),setTimeout((()=>{this._queueCallback((()=>{this._drop.classList.remove(Fe),H.trigger(this._element,Ke,e)}),this._parent,!0,10)}),this._params.animation.delay)}}_setPlacement(){const e=this;if(!e._isPlacement){let t=new De({element:this._parent,drop:this._drop})._getPlacement();t.isFixed&&(e._drop.style.position="fixed",e._drop.style.transform="translateY(-20%)"),e._drop.style.left=t.left+"px",e._drop.style.top=t.top+"px"}e._params.offset&&(e._drop.style.paddingTop=e._params.offset[1]+"px",e._drop.style.paddingRight=e._params.offset[0]+"px"),e._isPlacement=!0}static init(e,t={}){const s=et.getOrCreateInstance(e,t);if(s._params.hover){let e=null;H.on(s._parent,Qe,(function(t){if(e)return;et.hideOpenToggles(t);let a=t.target.closest(".vg-dropdown");a&&s._parent.contains(a)&&(e=a,s.show())})),H.on(s._parent,Ze,(function(t){if(!e)return;let a=t.relatedTarget;for(;a;){if(a===e)return;a=a.parentNode}e=null,s._completeHide({relatedTarget:s._element})}))}else H.on(document,We,Ye,et.keydownHandler),H.on(document,Ue,"."+ze,et.keydownHandler),H.on(document,We,et.clearDrops),H.on(document,Je,et.clearDrops),H.on(e,Je,(function(e){e.preventDefault(),s.toggle()}))}static hideOpenToggles(e){const t=f.findAll('[data-vg-toggle="dropdown"]:not(.disabled):not(:disabled).show');for(const s of t){const t=et.getInstance(s);if(!t)continue;if(e.target.closest("."+ze)===t._drop)return;if(e.composedPath().includes(t._element))continue;const a={relatedTarget:t._element};"click"===e.type&&(a.clickEvent=e),t._completeHide(a)}}static keydownHandler(e){const t=/input|textarea/i.test(e.target.tagName),s="Escape"===e.key,a=["ArrowUp","ArrowDown"].includes(e.key);if(!a&&!s)return;if(t&&!s)return;e.preventDefault();const i=this.matches(Ye)?this:f.find(Ye,e.delegateTarget.parentNode),n=et.getOrCreateInstance(i);if(a)return e.stopPropagation(),void n.show();n._isShown()&&(e.stopPropagation(),n.hide(),i.focus())}static clearDrops(e){2===e.button||"keyup"===e.type&&"Tab"!==e.key||et.hideOpenToggles(e)}}const tt=et,st=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",at=".sticky-top",it="padding-right",nt="margin-right",rt=class{constructor(){this._element=document.body}getWidth(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}hide(){const e=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,it,(t=>t+e)),this._setElementAttributes(st,it,(t=>t+e)),this._setElementAttributes(at,nt,(t=>t-e))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,it),this._resetElementAttributes(st,it),this._resetElementAttributes(at,nt)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,t,s){const a=this.getWidth();this._applyManipulationCallback(e,(e=>{if(e!==this._element&&window.innerWidth>e.clientWidth+a)return;this._saveInitialAttribute(e,t);const i=window.getComputedStyle(e).getPropertyValue(t);e.style.setProperty(t,`${s(Number.parseFloat(i))}px`)}))}_saveInitialAttribute(e,t){const s=e.style.getPropertyValue(t);s&&w.get(e,t,s)}_resetElementAttributes(e,t){this._applyManipulationCallback(e,(e=>{const s=w.get(e,t);null!==s?(w.remove(e,t),e.style.setProperty(t,s)):e.style.removeProperty(t)}))}_applyManipulationCallback(e,t){if(a(e))t(e);else for(const s of f.findAll(e,this._element))t(s)}},ot="vg.modal",lt="vg-modal-open",dt="show",ct="vg-modal-static",mt=`${ot}.hide`,ht=`${ot}.hidden`,ut=`${ot}.show`,pt=`${ot}.shown`,gt=`${ot}.resize`,_t=`${ot}.loaded`,ft=`keydown.dismiss.${ot}`,vt=`hidePrevented.${ot}`,bt=`click.${ot}.data.api`,wt=`mousedown.dismiss${ot}`,yt=`click.dismiss${ot}`,kt=`DOMContentLoaded.${ot}.data.api`,Lt=`popstate.${ot}.data.api`;class xt extends z{constructor(e,t={}){super(e,t),this._params=this._getParams(e,l({backdrop:!0,focus:!0,keyboard:!0,fields:[],hash:!1,centered:!1,ajax:{route:"",target:"",method:"get",loader:!1},animation:{enable:!1,in:"animate__rollIn",out:"animate__rollOut",delay:100,duration:800},classes:{general:"vg-modal",dialog:"vg-modal-dialog",content:"vg-modal-content",header:"vg-modal-header",title:"vg-modal-title",body:"vg-modal-body",footer:"vg-modal-footer"}},t)),this._button=null,this._dialog=f.find(".vg-modal-dialog",this._element),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new rt,this._addEventListeners(),this._dismissElement(),this._params.animation.delay=this._params.animation.enable?this._params.animation.delay:0,this._animation(this._element,xt.NAME_KEY,this._params.animation)}static get NAME(){return"modal"}static get NAME_KEY(){return ot}static init(e,t,s){xt.build(e,t,s)}static build(e,t,s){if("string"!=typeof e)return;let a=document.createElement("div");a.classList.add("vg-modal","fade"),a.id=e;let i=document.createElement("div");i.classList.add("vg-modal-dialog"),"centered"in t&&t.centered&&i.classList.add("vg-modal-dialog-centered");let n=document.createElement("div");n.classList.add("vg-modal-content");let r=document.createElement("button");w.set(r,"type","button"),w.set(r,"data-vg-dismiss","modal"),w.set(r,"data-vg-target","#"+e),w.set(r,"aria-label","close"),r.classList.add("vg-btn-close"),n.append(r);let o=document.createElement("div");o.classList.add("vg-modal-body"),n.append(o),i.append(n),a.append(i),document.body.append(a);const l=xt.getOrCreateInstance(a,t);return d(s,[l]),l}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){const t=this;i(t._element)||(this._params=this._getParams(e,this._params),t._route((function(e,s){H.trigger(t._element,_t,{stats:e,data:s})})),H.trigger(this._element,ut,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._params.hash&&(window.history.pushState(null,"vg-sidebar-open","#"+this._element.id),H.on(window,Lt,(()=>{this.hide()}))),this._scrollBar.hide(),document.body.classList.add(lt),this._addFieldsInModal(e),this._adjustDialog(),G.show((()=>this._showElement(e)))))}hide(e=[]){this._isShown&&!this._isTransitioning&&(H.trigger(this._element,mt).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,setTimeout((()=>{this._element.classList.remove(dt),this._queueCallback((()=>this._hideModal(e)),this._element,this._isAnimatedFade())}),this._params.animation.delay)))}_hideModal(e){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,e.length||(this._params.hash&&history.pushState("",document.title,window.location.pathname+window.location.search),G.hide((()=>{document.body.classList.remove(lt),this._resetAdjustments(),this._scrollBar.reset(),H.trigger(this._element,ht)})))}_showElement(e){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const t=f.find(".vg-modal-body",this._dialog);t&&(t.scrollTop=0),m(this._element),this._element.classList.add(dt),this._queueCallback((()=>{this._isTransitioning=!1,H.trigger(this._element,pt,{relatedTarget:e})}),this._dialog,this._isAnimatedFade())}_isAnimatedFade(){return this._element.classList.contains("fade")}_adjustDialog(){const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._scrollBar.getWidth(),s=t>0;if(s&&!e){const e=p()?"paddingLeft":"paddingRight";this._element.style[e]=`${t}px`}if(!s&&e){const e=p()?"paddingRight":"paddingLeft";this._element.style[e]=`${t}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}_addEventListeners(){H.on(this._element,ft,(e=>{"Escape"===e.key&&(this._params.keyboard?this.hide():this._triggerBackdropTransition())})),H.on(window,gt,(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),H.on(this._element,wt,(e=>{H.one(this._element,yt,(t=>{this._element===e.target&&this._element===t.target&&("static"!==this._params.backdrop?this._params.backdrop&&this.hide():this._triggerBackdropTransition())}))}))}_triggerBackdropTransition(){if(H.trigger(this._element,vt).defaultPrevented)return;const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._element.style.overflowY;"hidden"===t||this._element.classList.contains(ct)||(e||(this._element.style.overflowY="hidden"),this._element.classList.add(ct),this._queueCallback((()=>{this._element.classList.remove(ct),this._queueCallback((()=>{this._element.style.overflowY=t}),this._dialog)}),this._dialog))}_addFieldsInModal(e){this._params=this._getParams(e,this._params),this._params.fields.length&&this._params.fields.forEach((e=>{if(!1 in e&&!1 in e)return;let t=f.findAll("[data-"+e.name+"]",this._element);if(t.length)for(const s of t)switch(s.tagName){case"INPUT":s.value=e.value;break;case"IMG":w.set(s,"src",e.value);break;default:s.innerHTML=e.value}}))}}B(xt),H.on(document,bt,'[data-vg-toggle="modal"]',(function(e){const t=f.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&e.preventDefault(),H.one(t,ut,(e=>{e.defaultPrevented}));const s=f.find(".vg-modal.show");s&&xt.getInstance(s).hide([s]),xt.getOrCreateInstance(t).toggle(this)})),H.on(document,kt,(function(){let e=window.location.hash.slice(1);if(e){let t=f.find("#"+e);if(t&&t.classList.contains("vg-modal")){if(i(t))return;xt.getOrCreateInstance(t).toggle()}}}));const Et=xt,At=[{type:"pass-open",template:'<span data-vg-toggle="vgpass" class="[[classes]]" title="Показать / Скрыть" data-bs-toggle="tooltip"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M288 80c-65.2 0-118.8 29.6-159.9 67.7C89.6 183.5 63 226 49.4 256c13.6 30 40.2 72.5 78.6 108.3C169.2 402.4 222.8 432 288 432s118.8-29.6 159.9-67.7C486.4 328.5 513 286 526.6 256c-13.6-30-40.2-72.5-78.6-108.3C406.8 109.6 353.2 80 288 80zM95.4 112.6C142.5 68.8 207.2 32 288 32s145.5 36.8 192.6 80.6c46.8 43.5 78.1 95.4 93 131.1c3.3 7.9 3.3 16.7 0 24.6c-14.9 35.7-46.2 87.7-93 131.1C433.5 443.2 368.8 480 288 480s-145.5-36.8-192.6-80.6C48.6 356 17.3 304 2.5 268.3c-3.3-7.9-3.3-16.7 0-24.6C17.3 208 48.6 156 95.4 112.6zM288 336c44.2 0 80-35.8 80-80s-35.8-80-80-80c-.7 0-1.3 0-2 0c1.3 5.1 2 10.5 2 16c0 35.3-28.7 64-64 64c-5.5 0-10.9-.7-16-2c0 .7 0 1.3 0 2c0 44.2 35.8 80 80 80zm0-208a128 128 0 1 1 0 256 128 128 0 1 1 0-256z"/></svg></span>'},{type:"pass-close",template:'<span data-vg-toggle="vgpass" class="[[classes]]" title="Показать / Скрыть" data-bs-toggle="tooltip"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512">\x3c!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--\x3e<path d="M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.6 386.7c39.6-40.6 66.4-86.1 79.9-118.4c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-68.2 0-125 26.3-169.3 60.8L38.8 5.1zm151 118.3C226 97.7 269.5 80 320 80c65.2 0 118.8 29.6 159.9 67.7C518.4 183.5 545 226 558.6 256c-12.6 28-36.6 66.8-70.9 100.9l-53.8-42.2c9.1-17.6 14.2-37.5 14.2-58.7c0-70.7-57.3-128-128-128c-32.2 0-61.7 11.9-84.2 31.5l-46.1-36.1zM394.9 284.2l-81.5-63.9c4.2-8.5 6.6-18.2 6.6-28.3c0-5.5-.7-10.9-2-16c.7 0 1.3 0 2 0c44.2 0 80 35.8 80 80c0 9.9-1.8 19.4-5.1 28.2zm9.4 130.3C378.8 425.4 350.7 432 320 432c-65.2 0-118.8-29.6-159.9-67.7C121.6 328.5 95 286 81.4 256c8.3-18.4 21.5-41.5 39.4-64.8L83.1 161.5C60.3 191.2 44 220.8 34.5 243.7c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c47.8 0 89.9-12.9 126.2-32.5l-41.9-33zM192 256c0 70.7 57.3 128 128 128c13.3 0 26.1-2 38.2-5.8L302 334c-23.5-5.4-43.1-21.2-53.7-42.3l-56.1-44.2c-.2 2.8-.3 5.6-.3 8.5z"/></svg></span>'}],Ct=class{constructor(e,t={}){if(!e)throw new Error("Element is required");this._element=e,this._params=l({insert:"afterend",classes:[]},t)}render(e,t){let s=this.toHTML(e,t);"afterend"===this._params.insert&&this._element.insertAdjacentHTML("afterend",s)}toHTML(e=0,t){let s="";for(const e of At)e.type===this._params.template&&(s=e.template);if(s)return s=s.replace("[[classes]]",this._params.classes.join(" ")),d(t,[this._element,this._params,s]),s}setContent(){}},St="vg.hideshowpass",Tt="show",Mt=`click.${St}.data.api`;class Ot extends z{constructor(e,t={}){super(e,t),this._params=this._getParams(e,l({},t))}static get NAME(){return"hideshowpass"}static get NAME_KEY(){return St}toggle(e){return this._isShown()?this.hide(e):this.show(e)}show(e){e&&(this._params=this._getParams(e,this._params)),this._element.classList.add(Tt),e.remove(),this.build(!0),w.set(this._element,"type","text")}hide(e){this._element.classList.remove(Tt),e.remove(),this.build(!1),w.set(this._element,"type","password")}_isShown(){return this._element.classList.contains(Tt)}static init(e,t){Ot.getOrCreateInstance(e,t).build(!1)}build(e=!1){this._params.template=e?"pass-open":"pass-close",new Ct(this._element,this._params).render()}}H.on(document,Mt,'[data-vg-toggle="vgpass"]',(function(e){const t=f.prev(this);t&&(["A","AREA"].includes(this.tagName)&&e.preventDefault(),i(this)||(this.setAttribute("aria-expanded",!0),Ot.getOrCreateInstance(t).toggle(this)))}));const $t=Ot,It="vg.fs",Pt=`submit.${It}.data.api`;class Nt extends z{constructor(e,t={}){super(e,t),this._params=this._getParams(e,l({response:{enabled:!1,errors:!1,title:"",message:""},redirect:{error:"",success:""},validate:!1,submit:!1,fields:[],timeout:50,pass:{enabled:!0,template:"pass-open",classes:["vg-form-sender--hide-show-pass"],insert:"afterend"},alert:{enabled:!0,type:"modal",errors:!0},ajax:{route:"",target:"",method:"get"},classes:{general:"vg-form-sender",alertCollapse:"vg-form-sender-collapse",alertModal:"vg-form-sender-modal",validation:"needs-validation",wasValidate:"was-validated",content:"vg-form-sender--content"},callback:{afterInit:h,afterSuccess:h,afterError:h},interceptors:{success:!1,error:!1}},t)),this._params.ajax.route=w.get(this._element,"action").toLowerCase(),this._params.ajax.method=w.get(this._element,"method").toLowerCase(),this._button=f.find('[type="submit"]',this._element)||f.find('[form="'+this._element.id+'"]')||null,this._params.isBtnText="false"!==w.get(this._element,"data-btn-text"),this._params.isJsonParse="false"!==w.get(this._element,"data-json-parse"),this._params.isShowPass="true"===w.get(this._element,"data-show-pass")}static get NAME(){return"form-sender"}static get NAME_KEY(){return It}build(){return this._element.classList.add(this._params.classes.general),[...f.findAll("input, textarea, select",this._element)].forEach((e=>{n(e)&&e.parentElement.classList.add(this._params.classes.content)})),this._params.validate&&(w.set(this._element,"novalidate",""),this._element.classList.add(this._params.classes.validation)),this._params.pass.enabled&&[...f.findAll('input[type="password"]',this._element)].forEach((e=>{$t.init(e,this._params.pass)})),d(this._params.callback.afterInit,[this._element,this]),this}request(e,t){const s=this;s._alertBefore(),s._params.ajax.data=e,s._route((function(e,a){s._element.classList.remove("was-validated"),s._params.response.enabled&&(a.response=s._params.response),s._params.alert.enabled&&("string"==typeof e&&"error"===e?s._params.redirect.error?window.location.href=s._params.redirect.error:s._params.interceptors.error?d(s._params.callback.afterError(),[s._element,s,t,a]):s._alertError(t,a):"string"==typeof e&&"success"===e&&(s._params.redirect.success?window.location.href=s._params.redirect.success:s._params.interceptors.success?d(s._params.callback.afterSuccess(),[s._element,s,t,a]):s._alertSuccess(t,a)))}))}_alertBefore(){const e=this;"collapse"===e._params.alert.type&&[...document.getElementsByClassName(e._params.classes.alertCollapse)].forEach((function(e){e&&e.classList.contains("show")&&ke.getOrCreateInstance(e,{toggle:!1}).hide()})),e._statusButton("before"),H.trigger(e._element,"vg.fs.before",e)}_alertError(e,t){const s=this;s._statusButton("after"),s._jsonParse(t,"error"),H.trigger(s._element,"vg.fs.error",[e,s,t])}_alertSuccess(e,t){const s=this;s._statusButton("after"),s._jsonParse(t,"success"),H.trigger(s._element,"vg.fs.success",[e,s,t])}_statusButton(e){const t=this;if(!t._button)return;let s=t._button,a={send:"Отправляем...",text:"Отправить"};if(w.has(t._button,"data-spinner")&&"before"===e&&t._button.insertAdjacentHTML("afterbegin",'<span class="spinner-border spinner-border-sm me-2"></span>'),w.has(t._button,"data-text"))a.text=w.get(t._button,"data-text");else{let e=t._button.querySelector("[data-text]");e&&(a.text=w.get(e,"data-text"),s=e)}if(w.has(t._button,"data-text-send"))a.send=w.get(t._button,"data-text-send");else{let e=t._button.querySelector("[data-text-send]");e&&(a.send=w.get(e,"data-text-send"),s=e)}if("before"===e&&(t._params.isBtnText&&(s.innerHTML=a.send),w.set(t._button,"disabled","disabled")),"after"===e){t._params.isBtnText&&(s.innerHTML=a.text),w.remove(t._button,"disabled");let e=t._button.querySelector(".spinner-border");e&&e.remove()}}_jsonParse(e,t){const s=this;if(s._params.isJsonParse&&"string"==typeof e){let a={};try{a=JSON.parse(e),s.alert(a,t)}catch(a){s.alert(e,t)}}else s.alert(e,t)}alert(e,t){const s=this;if(r(e)&&"code"in e&&e.code&&200===e.code&&"response"in e&&e.response){let s=o(e.response);"string"==typeof s?-1===s.indexOf("Parse error")&&-1===s.indexOf("syntax error")||(t="error",e={response:{title:"Error",message:"Something went wrong, please repeat later"},text:"Something went wrong, please repeat later"}):"errors"in s&&o(s.errors)&&(t=o(s.errors)?"error":"success")}s._params.alert.enabled&&("modal"===s._params.alert.type&&s._alertModal(e,t),"collapse"===s._params.alert.type&&s._alertCollapse(e,t))}_alertModal(e,t){const s=this;[...document.getElementsByClassName("modal")].forEach((function(e){e&&e.classList.contains("show")&&bootstrap.Modal.getOrCreateInstance(e).hide()})),[...document.getElementsByClassName("vg-modal")].forEach((function(e){if(e&&e.classList.contains("show")){const t=Et.getOrCreateInstance(e);t.hide([t])}}));let a=s._params.classes.general+"-"+u(),i=f.find("."+s._params.classes.alertModal);i&&i.remove(),setTimeout((()=>{Et.init(a,{classes:{alert:s._params.classes.alertModal}},(function(a){let i=a._element;i.classList.add(s._params.classes.alertModal);let n=f.find(".vg-modal-body",i);n&&n.append(s.setDataRelationStatus(i,t,e,"modal")),a.toggle()}))}),s._params.timeout)}_alertCollapse(e,t){const s=this;let a=f.find("."+s._params.classes.alertCollapse);a||(a=document.createElement("div"),a.classList.add(s._params.classes.alertCollapse),a.classList.add("vg-collapse"),a.id=s._params.classes.general+"-"+u(),a.append(s.setDataRelationStatus(a,t,e,"collapse")),s._element.prepend(a)),ke.getOrCreateInstance(a,{toggle:!1}).toggle()}setDataRelationStatus(e,t,s,a){let i=f.find(".vg-alert-"+t,e);if(r(s)){if("error"===t&&"code"in s&&200!==s.code&&"text"in s&&!s.text)switch(s.text="Something went wrong, please repeat later",s.code){case 400:s.text="Bad Request";break;case 401:case 403:s.text="Unauthorized";break;case 413:s.text="Forbidden";break;case 404:s.text="Not Found";break;case 422:s.text="Unprocessable Entity";break;case 500:s.text="Internal Server Error";break;case 504:s.text="Gateway Timeout"}if("response"in s){let e=o(s.response),a="",i="",n="";if("string"!=typeof e){if(!("view"in e)){if("title"in e&&(a=e.title),"error"===t&&200!==s.code&&this._params.alert.errors&&(n=" "+s.text+" ("+s.code+")"),a&&(i+='<h4 class="vg-alert-content--title">'+a+n+"</h4>"),"message"in e&&(i+='<div class="vg-alert-content--message">'+e.message+"</div>"),"errors"in e&&this._params.alert.errors){let t=o(e.errors)||null;if(r(t))for(const e in t)Array.isArray(t[e])?t[e].forEach((function(e){i+="<div>"+e+"</div>"})):i="<div>"+t[e]+"</div>"}s={view:i}}}else s.view=e}}if(i)f.find(".vg-alert-content--text",i).innerHTML=s.view;else{i=document.createElement("div"),i.classList.add("vg-alert","vg-alert-"+t,"vg-alert-"+a);let e=document.createElement("div");e.classList.add("vg-alert-content");let n=document.createElement("div");n.classList.add("vg-alert-content--icon");let r=document.createElement("i");r.innerHTML=D(t),n.append(r),e.append(n);let o=document.createElement("div");o.classList.add("vg-alert-content--text"),o.innerHTML=s.view,e.append(o),i.append(e)}return i}static init(e,t={}){Nt.getOrCreateInstance(e,t).build()}}H.on(document,Pt,(function(e){if(!w.has(e.target,"data-vgformsender"))return;const t=Nt.getOrCreateInstance(e.target,{});if(t){if(t._params.validate&&!t._element.checkValidity())return e.preventDefault(),e.stopPropagation(),t._element.classList.add(t._params.classes.wasValidate),!1;if(!t._params.submit){e.preventDefault();let s=new FormData(t._element);return t.request(s,e)}}}));const jt=Nt,qt="vg.rollup",Ht="show",Dt="vg-rollup-display--none",Bt=`${qt}.hide`,Ft=`${qt}.show`,Rt=`click.${qt}.data.api`;class zt extends z{constructor(e,t={}){super(e,t),this._params=this._getParams(e,l({content:"text",offset:0,cnt:0,fade:!0,transition:!1,number:!1,height:0,ellipsis:{line:null},more:" еще ",button:{enable:!0,more:"Показать",less:"Свернуть"}},t)),this.classes={container:"vg-rollup",hidden:"vg-rollup-content--hidden",fade:"vg-rollup-content--fade",ellipsis:"vg-rollup-content--ellipsis",button:"vg-rollup-content--button",transition:"vg-rollup-content--transition"},this.total=0,this.count=0,this.offset=0,this.isOffset=!1,this._params.offset>0&&(this.offset=this._params.offset+this._params.cnt||0,this.isOffset=!0),this.build()}static get NAME(){return"rollup"}static get NAME_KEY(){return qt}static toggle(e,t){const s=zt.getOrCreateInstance(e);if(s.isShow()){let e="";if(s._params.number){let t=s.total-s.count;t>0&&(e=s._params.more+t)}t.setAttribute("aria-expanded",!1),s._element.classList.remove(Ht),t.innerHTML=s._params.button.more+e,s.switch(s._element,!0),H.trigger(s._element,Bt,{relatedTarget:t})}else s._element.classList.add(Ht),t.innerHTML=s._params.button.less,s.offset>0&&(s.isOffset?t.innerHTML=s._params.button.more:t.innerHTML=s._params.button.less),s.switch(s._element,!1),H.trigger(s._element,Ft,{relatedTarget:t})}build(e=null,t=!0){let s=this,a=e||s._element,i=a.clientHeight,n=s._params.height||i/2;a.classList.add(s.classes.container);let r=s._params.fade,o=s._params.transition,l=null!==s._params.ellipsis.line,d=s._params.button.enable,c=s._params.number;if(t||s.switch(a),i>n&&"text"===s._params.content)a.classList.add(s.classes.hidden),a.style.height=n+"px",m(),h(),u(),p();else if("elements"===s._params.content){let e=s._params.elements||"item",t=a.querySelectorAll("."+e),i=s._params.cnt||5,n=1;s.total=t.length,s.count=i;for(const e of t)n>i&&e.classList.add(Dt),n++;!0===d&&(d=n-1>i),m(),h(),u(),p()}function m(){if(l){let e=s._params.ellipsis.line;r=!1,e?(a.classList.add(s.classes.ellipsis),a.style.webkitLineClamp=e):console.log("Переменная [data-line] или параметр[line] не должны быть пустыми")}}function h(){o&&a.classList.add(s.classes.transition)}function u(){r&&a.classList.add(s.classes.fade)}function p(){if(t&&(a.setAttribute("id",a.id),d)){let e="";if(c){let t=s.total-s.count;t>0&&(e=s._params.more+t)}let t=s._params.button.more;a.insertAdjacentHTML("afterend",'<div class="'+s.classes.button+'"><a href="#" aria-expanded="false" data-vg-toggle="rollup" data-vg-target="#'+a.id+'">'+t+e+"</a></div>")}}}switch(e,t=!1){const s=this;if(t)this.build(e,!1);else if(e.classList.remove(this.classes.hidden),e.classList.remove(this.classes.ellipsis),e.classList.remove(this.classes.fade),e.removeAttribute("style"),"elements"===s._params.content){let t=s._params.elements,a=[...e.querySelectorAll("."+t)];if(a.length)if(s.offset>0){let t=s._params.elements,a=[...e.querySelectorAll("."+t)];a.slice(s.count,s.offset).forEach((e=>e.classList.remove(Dt))),s.offset=s.offset+s.settings.offset,s.offset>a.length&&(s.isOffset=!1,s.offset=0)}else a.forEach((e=>e.classList.remove(Dt)))}}isShow(){return this._element.classList.contains(Ht)}static init(e,t={},s){d(s,[zt.getOrCreateInstance(e,t)])}}H.on(document,Rt,'[data-vg-toggle="rollup"]',(function(e){const t=f.getElementFromSelector(this);t&&(["A","AREA"].includes(this.tagName)&&e.preventDefault(),i(this)||(this.setAttribute("aria-expanded",!0),zt.toggle(t,this)))}));const Yt=zt;function Xt(e){for(let t=1;t<arguments.length;t++){let s=arguments[t];for(let t in s)e[t]=s[t]}return e}const Kt=function e(t,s){function a(e,a,i){if("undefined"==typeof document)return;"number"==typeof(i=Xt({},s,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);let n="";for(let e in i)i[e]&&(n+="; "+e,!0!==i[e]&&(n+="="+i[e].split(";")[0]));return document.cookie=e+"="+t.write(a,e)+n}return Object.create({set:a,get:function(e){if("undefined"==typeof document||arguments.length&&!e)return;let s=document.cookie?document.cookie.split("; "):[],a={};for(let i=0;i<s.length;i++){let n=s[i].split("="),r=n.slice(1).join("=");try{let s=decodeURIComponent(n[0]);if(a[s]=t.read(r,s),e===s)break}catch(e){}}return e?a[e]:a},remove:function(e,t){a(e,"",Xt({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,Xt({},this.attributes,t))},withConverter:function(t){return e(Xt({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(s)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"}),Vt="vg.lawcookie",Gt="show",Wt=`${Vt}.hide`,Ut=`${Vt}.hidden`,Jt=`${Vt}.show`,Qt=`${Vt}.shown`,Zt=`click.${Vt}.data.api`;class es extends z{static sParams={};constructor(e,t={}){super(e,t),this._params=this._getParams(e,l({storage:"local",delay:500,cookie:{name:"lawCookie",value:"yes",attributes:{}},animation:{enable:!0,in:"animate__fadeInUp",out:"animate__fadeOutDown",delay:800},ajax:{route:"",target:"",method:"get"}},t)),es.sParams=this._params,this._params.animation.delay=this._params.animation.enable?this._params.animation.delay:0,this._animation(this._element,es.NAME_KEY,this._params.animation)}static get NAME(){return"lawcookie"}static get NAME_KEY(){return Vt}toggle(){return this._isShown()?this.hide():this.show()}_isShown(){return this.storage().get()}show(){i(this._element)||H.trigger(this._element,Jt,{}).defaultPrevented||(this._element.classList.add(Gt),this._queueCallback((()=>{H.trigger(this._element,Qt,{})}),this._element,!0,this._params.delay))}hide(){H.trigger(this._element,Wt).defaultPrevented||setTimeout((()=>{this._element.classList.remove(Gt),this._queueCallback((()=>H.trigger(this._element,Ut)),this._element,!0)}),this._params.animation.delay)}storage(){return this._storage={isCookie:"cookie"===this._params.storage,storage:"cookie"===this._params.storage?Kt:localStorage,name:this._params.cookie.name,value:this._params.cookie.value,attributes:this._params.cookie.attributes},this}get(){return this._storage.isCookie?this._storage.storage.get(this._storage.name):this._storage.storage.getItem(this._storage.name)}set(){this._storage.isCookie?this._storage.storage.set(this._storage.name,this._storage.value,this._storage.attributes):this._storage.storage.setItem(this._storage.name,this._storage.value)}dispose(){super.dispose()}static reset(){Kt.remove(es.sParams.cookie.name),localStorage.clear(),location.reload()}static init(e,t={}){es.getOrCreateInstance(e,t).toggle()}}B(es),H.on(document,Zt,'[data-vg-toggle="lawcookie"]',(function(e){if(["A","AREA"].includes(this.tagName)&&e.preventDefault(),i(this))return;const t=f.find("#vg-lawcookie");if(!t)return;const s=es.getOrCreateInstance(t);s.storage().set(),s.hide()})),H.on(document,Zt,'[data-vg-toggle="lawcookie-clear"]',(function(e){if(["A","AREA"].includes(this.tagName)&&e.preventDefault(),i(this))return;const t=f.find("#vg-lawcookie");t&&(es.getOrCreateInstance(t).dispose(),location.reload())}));const ts=es,ss="vg.select",as="show",is="active",ns="vg-select",rs="vg-select-dropdown",os="vg-select-list",ls="vg-select-list--option",ds="vg-select-list--optgroup",cs="vg-select-current",ms=`click.${ss}.data.api`,hs=`keyup.${ss}.data.api`,us=`reset.${ss}.data.api`,ps=`${ss}.change`,gs=`${ss}.hide`,_s=`${ss}.hidden`,fs=`${ss}.show`,vs=`${ss}.shown`,bs='[data-vg-toggle="select"]';let ws;class ys extends z{constructor(e,t={}){super(e,t),this._params=this._getParams(e,l({search:!1,placeholder:""},t)),e.parentElement.style.position="relative",this._drop=f.find("."+rs,this._element),this.refresh()}static get NAME(){return"select"}static get NAME_KEY(){return ss}static buildListOptions(e,t){let a=e.options,i=document.createElement("ul");i.classList.add(os);let n=e.querySelectorAll("optgroup");if(n.length){let e=!1;[...n].forEach((function(t){let s=document.createElement("ol");s.classList.add(ds);let a=document.createElement("li");a.innerHTML=t.label.trim(),a.classList.add("vg-select-list--optgroup-title"),s.prepend(a),r(f.findAll("option",t),s,e),i.append(s),e=!0}))}else r(a,i,!1);return t.append(i),i;function r(t,a,i){let n=0;for(const r of t){let t=document.createElement("li");t.innerHTML=r.innerHTML.trim().replace(/<\/[^>]+(>|$)/g,""),t.dataset.value=w.get(r,"value"),t.classList.add(ls),w.set(t,"data-vg-toggle","select-option");let o=w.get(r);if(!s(o))for(const e of Object.keys(o))w.set(t,"data-"+e,o[e]);n!==e.selectedIndex||i||t.classList.add("selected"),w.has(r,"disabled")&&t.classList.add("disabled"),w.has(r,"hidden")&&t.classList.add("hidden"),a.append(t),n++}}}static build(e,t){let a,i=e.dataset.placeholder||"",n=e.dataset.search||!1;if("true"===e.dataset?.inited&&!t)return;t&&ys.destroy(e),a=i&&0===e.selectedIndex?'<span class="vg-select-current--placeholder">'+i+"<span>":e.options[e.selectedIndex].innerText;let r=w.get(e,"class"),o=document.createElement("div");r=r.split(" ");for(const e of r)o.classList.add(e);w.has(e,"disabled")&&o.classList.add("disabled");let l=w.get(e);if(!s(l))for(const e of Object.keys(l))w.set(o,"data-"+e,l[e]);let d=document.createElement("div");d.classList.add(cs),w.set(d,"data-vg-toggle","select"),w.set(d,"aria-expanded","false"),d.innerHTML=a.trim(),o.append(d);let c=document.createElement("div");if(c.classList.add(rs),o.append(c),ys.buildListOptions(e,c),e.insertAdjacentElement("afterend",o),e.dataset.inited="true",n){let e=document.createElement("div");e.classList.add("vg-select-search");let t=document.createElement("input");w.set(t,"name","vg-select-search"),w.set(t,"type","text"),w.set(t,"placeholder","Поиск..."),e.append(t),c.prepend(e)}return o}toggle(e){return this._isShown()?this.hide():this.show(e)}show(e){if(!i(this._element)&&!H.trigger(this._element,fs,{relatedTarget:e}).defaultPrevented){if("ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))H.on(e,"mouseover",h);if(this._element.classList.add(as),this._params.search){let e=f.find("input",this._element);e&&e.focus()}this._queueCallback((()=>{this._element.classList.add(is),H.trigger(this._element,vs,{relatedTarget:e})}),this._drop,!0,50)}}hide(){!i(this._element)&&this._isShown()&&this._completeHide()}_completeHide(){if(H.trigger(this._element,gs,{}).defaultPrevented)return;this._element.classList.remove(is);let e=f.find(bs,this._element);if(w.set(e,"aria-expanded","false"),"ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))H.off(e,"mouseover",h);this._queueCallback((()=>{this._element.classList.remove(as),H.trigger(this._element,_s,{})}),this._drop,!0,10)}_isShown(){return this._element.classList.contains(as)}refresh(){const e=this._element.previousSibling;new MutationObserver((()=>{clearTimeout(ws),ws=setTimeout((()=>{ys.build(e,!0)}),100)})).observe(e,{attributeFilter:["disabled","required","style","hidden"],childList:!0,subtree:!0,characterDataOldValue:!0})}dispose(){super.dispose()}static destroy(e){let t=e.nextElementSibling;t&&t.classList.contains(ns)&&(t.remove(),e.selectedIndex=0,[...e.querySelectorAll("option")].forEach((function(t,s){t.hasAttribute("selected")&&(e.selectedIndex=s)})))}static hideOpenToggles(e){const t=f.findAll(".vg-select:not(.disabled):not(:disabled).show");for(const s of t){const t=ys.getInstance(s);if(!t)continue;if(e.target.closest("."+ns)===t._element)return;if(e.composedPath().includes(t._element))continue;const a={relatedTarget:t._element};"click"===e.type&&(a.clickEvent=e),t._completeHide(a)}}static clearDrops(e){2===e.button||"keyup"===e.type&&"Tab"!==e.key||ys.hideOpenToggles(e)}static changeSelector(e,t,a={}){!r(a)&&s(a)||(e.value=o(t),H.trigger(e,ps,{data:a}),H.trigger(e,"change",{data:a}))}static init(e,t={},s=!1){let a=ys.build(e);ys.getOrCreateInstance(a,t)}}H.on(document,ms,ys.clearDrops),H.on(document,ms,bs,(function(){const e=this.closest("."+ns);w.set(this,"aria-expanded",!0);const t=f.find(".vg-select.show");t&&t!==e&&ys.getInstance(t).hide(),ys.getOrCreateInstance(e).toggle(this)})),H.on(document,ms,'[data-vg-toggle="select-option"]',(function(e){let t=e.target;if(!t.classList.contains("disabled")){let e=t.closest("."+ns),s=e.querySelectorAll("."+ls);if(s.length)for(const e of s)e.classList.remove("selected");t.classList.add("selected"),e.querySelector("."+cs).innerText=t.innerText,e.classList.remove("show");let a=e.previousSibling;ys.changeSelector(a,t.dataset.value,{value:t.dataset.value,title:t.innerHTML})}})),H.on(document,hs,"[name=vg-select-search]",(function(e){let t=this,s=t?.closest("."+rs).querySelector("."+os);if(s){let e=[...s.querySelectorAll("."+ls)],a=[...s.querySelectorAll("."+ds)],i=t?.value;e=e.concat(a);for(const t of e)w.show(t);if(i.length){i=i.trim(),i=i.toLowerCase(),i=function(e){let t,s="й ц у к е н г ш щ з х ъ ф ы в а п р о л д ж э я ч с м и т ь б ю".split(/ +/g),a="q w e r t y u i o p [ ] a s d f g h j k l ; ' z x c v b n m , .".split(/ +/g);for(t=0;t<s.length;t++)e=(e=e.split(a[t]).join(s[t])).split(a[t].toUpperCase()).join(s[t].toUpperCase());return e}(i);for(const t of e)-1===t.innerText.toLowerCase().indexOf(i)&&w.hide(t)}}})),H.on(document,us,"form",(function(){f.findAll("select."+ns,this).forEach((e=>{ys.build(e,!0)}))}));const ks=ys,Ls="vg.alert",xs=`click.${Ls}.data.api`;class Es extends z{constructor(e,t={}){super(e,t),this._params=this._getParams(e,l({modal:{centered:!1,backdrop:!0,overflow:!0,keyboard:!0,animation:{enable:!1,in:"animate__rollIn",out:"animate__rollOut",delay:0}},toast:{},elements:{button:""},dialog:"modal",mode:"alert"},t))}static get NAME(){return"alert"}static get NAME_KEY(){return Ls}static run(...e){}toggle(e){}promise(e){}_build(){return"modal"===this._params.dialog?this._buildModal():"toast"===this._params.dialog?this._buildToast():void 0}_buildModal(){let e="vg-alert-"+u(),t=f.find(".vg-alert-modal");return t&&t.remove(),Et.build(e,this._params.modal,(e=>{let t=e._element;t.classList.add("vg-alert-modal");let s=f.find(".vg-modal-body",t);if(s){let e='<div class="message">'+this._params.message+"</div>";e+='<div class="buttons">',this._params.elements.button&&(e+='<a href="#" data-vg-dismiss="modal" class="btn btn-primary">'+this._params.elements.button+"</a>"),e+="</div>",s.innerHTML=e}}))}_buildToast(){}}H.on(document,xs,'[data-vg-toggle="alert"]',(function(e){})),window.alert=e=>{Es.run(e)};const As=Es,Cs="vg.toast",Ss="vg-toast-open",Ts="show",Ms=`${Cs}.hide`,Os=`${Cs}.hidden`,$s=`${Cs}.show`,Is=`${Cs}.shown`,Ps=`${Cs}.loaded`,Ns=`keydown.dismiss.${Cs}`,js=`hidePrevented.${Cs}`,qs=`click.${Cs}.data.api`;class Hs extends z{constructor(e,t={}){super(e,t),this._params=this._getParams(e,l({static:!0,placement:"bottom center",autohide:!1,delay:3e3,enableClickToast:!0,enableButtonClose:!0,keyboard:!0,theme:"dark",stack:{enable:!0,max:5},animation:{enable:!0,in:"animate__fadeIn",out:"animate__fadeOut",delay:400},ajax:{route:"",target:"",method:"get",loader:!1}},t)),this._params.animation.delay=this._params.animation.enable?this._params.animation.delay:0,this._animation(this._element,Hs.NAME_KEY,this._params.animation),this._dismissElement(),this._addEventListeners(),this._timeout=null}static get NAME(){return"toast"}static get NAME_KEY(){return Cs}static run(e,t={},s){return Hs.build(e,t,s)}static build(e,t,s){t=l({placement:"bottom center",static:!1,theme:"dark",stack:{enable:!1}},t);let a=document.createElement("div");a.classList.add("vg-toast"),a.id="vg-toast-"+u(),"theme"in t&&a.classList.add("vg-toast-"+t.theme),"placement"in t&&t.placement.split(" ").forEach((e=>a.classList.add(e)));let i=document.createElement("div");if(i.classList.add("vg-toast-wrapper"),"type"in t){let e=document.createElement("div");e.classList.add("vg-toast-icon"),i.append(e)}let n=document.createElement("div");n.classList.add("vg-toast-content");let r=document.createElement("div");if(r.classList.add("vg-toast-body"),"string"==typeof e)r.innerHTML=e,n.append(r);else if(Array.isArray(e))if(e.length>1){let t=document.createElement("div");t.classList.add("vg-toast-header"),t.innerHTML=e[0],n.append(t),r.innerHTML=e[1],n.append(r)}else r.innerHTML=e[0],n.append(r);if(i.append(n),"enableButtonClose"in t&&t.enableButtonClose){let e=document.createElement("div");e.classList.add("vg-toast-button"),e.innerHTML='<button class="vg-btn-close" data-vg-dismiss="toast"></button>',i.append(e)}a.append(i),document.body.append(a);let o=Hs.getOrCreateInstance(a,t);d(s,[o]),o.show()}toggle(e){return this._isShown()?this.hide():this.show(e)}show(e){i(this._element)||(this._clearTimeout(),this._params=this._getParams(e||{},this._params),this._route((function(e,t){H.trigger(this._element,Ps,{stats:e,data:t})})),H.trigger(this._element,$s,{relatedTarget:e}).defaultPrevented||(this._element.classList.add(Ts),document.body.classList.add(Ss),this._setPlacement(),this._queueCallback((()=>{this._element.classList.add(Ts),H.trigger(this._element,Is,{relatedTarget:e}),this._scheduleHide()}),this._element,!0,0)))}hide(){i(this._element)||H.trigger(this._element,Ms).defaultPrevented||setTimeout((()=>{this._element?.classList.remove(Ts),this._queueCallback((()=>{document.body.classList.remove(Ss),H.trigger(this._element,Os),this._params.stack.enable&&this._setPlacement(),this._params.static||this.dispose()}),this._element,!1,this._params.animation.delay)}),this._params.animation.delay)}dispose(){this._clearTimeout(),this._isShown()&&this._element.classList.remove(Ts),this._params.static||this._element.remove(),super.dispose()}_scheduleHide(){this._params.autohide&&(this._timeout=setTimeout((()=>{this.hide()}),this._params.delay))}_isShown(){return this._element.classList.contains(Ts)}_setPlacement(){let e=this._enableStack();if(this._params.stack.enable&&e.length>this._params.stack.max){let t=e.shift();Hs.getInstance(t.el).hide()}e.forEach((e=>{let t=e.el.classList.contains("top"),s=e.el.classList.contains("bottom"),a=e.el.classList.contains("left"),i=e.el.classList.contains("right"),n=e.el.classList.contains("center");t||s||n||i||a||(s=!0,n=!0),n?a?(e.el.style.left=0,e.el.style.bottom="calc(50% - ("+e.top+"px))"):i?(e.el.style.right=0,e.el.style.bottom="calc(50% - ("+e.top+"px))"):s?(e.el.style.left="calc(50% - ("+e.el.clientWidth+"px) / 2)",e.el.style.bottom=e.top+"px"):t?(e.el.style.left="calc(50% - ("+e.el.clientWidth+"px) / 2)",e.el.style.top=e.top+"px"):(e.el.style.left="calc(50% - ("+e.el.clientHeight+"px) / 2)",e.el.style.bottom="calc(50% - "+e.top+"px)"):(a&&(e.el.style.left=0),s&&(e.el.style.bottom=e.top+"px"),t&&(e.el.style.top=e.top+"px"),i&&(e.el.style.right=0))}))}_enableStack(){let e=[...f.findAll(".vg-toast.show")],t=0;return this._params.stack.enable?(e=e.map((e=>({el:e,top:e.clientHeight}))),e.map((function(e,s){return 0===s?{el:e.el,top:0}:(t+=e.top,{el:e.el,top:t})}))):(e.forEach((e=>{e!==this._element&&Hs.getInstance(e).hide()})),[{el:this._element,top:0}])}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}_addEventListeners(){H.on(document,Ns,(e=>{"Escape"===e.key&&(this._params.keyboard?this.hide():H.trigger(this._element,js))})),this._params.enableClickToast&&(this._element.classList.add("vg-toast-pointer"),H.on(document,qs,"#"+this._element.id,(()=>{this.hide()})))}}B(Hs),H.on(document,qs,'[data-vg-toggle="toast"]',(function(e){const t=f.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&e.preventDefault(),i(this)||(this.setAttribute("aria-expanded",!0),H.one(t,Os,(()=>{this.setAttribute("aria-expanded",!1)})),Hs.getOrCreateInstance(t).toggle(this))}));const Ds=Hs;class Bs extends z{constructor(e,t){super(e,t),this._params=this._getParams(e,l({mode:"table",table:{padding:0,width:0,classes:[]},paginate:{enabled:!0,stack:!0,items:10},loader:!0,ajax:{enabled:!0,route:"",target:"",method:"get",loader:!1}},t)),this.paginateCount=this._params.paginate.items,this.paginateCountSlice=0}static get NAME(){return"datatable"}static get NAME_KEY(){return"vg.datatable"}static init(e,t={}){Bs.getOrCreateInstance(e,t).build()}build(){}_setBuildMode(e={}){"table"===this._params.mode&&this._modeBuildTable(e)}_modeBuildTable(e){}_modeBuildList(e){}_modeBuildCard(e){}}const Fs=Bs,Rs=class extends z{constructor(e,t={}){super(e,t),this._params=this._getParams(e,l({speed:1500,offset:0,easing:"easeInOutSine",isState:!1,onActive:h,onClick:h,activeClass:["active"]},t)),this.isClick=!1,this.links=this._element.querySelectorAll("[data-vg-target]").length?this._element.querySelectorAll("[data-vg-target]"):this._element.querySelectorAll("a"),this.onLoad(),this.onClick(),this.onScroll()}static get NAME(){return"spy"}static get NAME_KEY(){return"vg.spy"}onLoad(){let e=this;document.addEventListener("DOMContentLoaded",(function(){e.setCurrentSection(null)}))}onClick(){let e=this;e.links.forEach((t=>{t&&(t.onclick=function(t){return d(e._params.onClick,[t,this]),e.setCurrentSection(this),!1})}))}onScroll(){let e=this;e.isClick||(window.onscroll=function(){e.setCurrentSection(null)})}setCurrentSection(e=null){if(this.removeCurrentActive(),this._params.isState){let t=window.location.hash;if(t){let s=document.querySelector('[href="'+t+'"]')||document.querySelector('[href="/'+t+'"]')||document.querySelector('[data-vg-target="'+t.replace("#","")+'"]')||null;null!==s&&(e=s)}}if(e){let a=this.attributes(e,"target"),i=this.attributes(e,"offset"),n=document.getElementById(a);if(n){let r=n.offsetTop+i+this._params.offset,o=window.scrollY||document.documentElement.scrollTop,l=this._params.speed,d=this._params.easing,c=0;this.removeCurrentActive(),this.setActive(e,n);let m=Math.max(.1,Math.min(Math.abs(o-r)/l,.8)),h={easeOutSine:function(e){return Math.sin(e*(Math.PI/2))},easeInOutSine:function(e){return-.5*(Math.cos(Math.PI*e)-1)},easeInOutQuint:function(e){return(e/=.5)<1?.5*Math.pow(e,5):.5*(Math.pow(e-2,5)+2)}};function u(){c+=1/60;let e=c/m,t=h[d](e);e<1?(requestAnimFrame(u),window.scrollTo(0,o+(r-o)*t)):window.scrollTo(0,r)}window.requestAnimFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)},u(),this.isClick=!1}}else for(let p=0;p<this.links.length;p++){let g=this.attributes(this.links[p],"target"),_=this.attributes(this.links[p],"offset"),f=document.getElementById(g);if(f){let v=f.offsetTop+_+this._params.offset,b=v+f.offsetHeight,w=document.documentElement.scrollTop||document.body.scrollTop;w>=v&&w<b&&(this.removeCurrentActive({ignore:this.links[p]}),this.setActive(this.links[p],f))}}}setActive(e,t){const s=this._params.activeClass.every((function(t){return e.classList.contains(t)}));if(this._params.isState){let t=this.attributes(e,"text"),s=this.attributes(e,"target");history.pushState("",document.title+t,"#"+s)}s||(t&&t.classList.add(...this._params.activeClass),e&&e.classList.add(...this._params.activeClass),d(this._params.onActive,[e,t]))}removeCurrentActive(e={ignore:null}){for(let t=0;t<this.links.length;t++){let s=this.attributes(this.links[t],"target"),a=document.getElementById(s);e.ignore!==this.links[t]&&a&&(this.links[t].classList.remove(...this._params.activeClass),a.classList.remove(...this._params.activeClass))}}attributes(e,t=""){let s=e.getAttribute("href")||e.dataset.vgTarget;"undefined"!==s&&-1!==s.indexOf("#")?(s=s.replace(/(^.+)#/gm,""),-1!==s.indexOf("#")&&(s=s.replace("#",""))):"undefined"!==s&&-1===s.indexOf("#")&&(s="");let a=e.dataset.vgOffset?parseInt(e.dataset.vgOffset):0,i=e.innerHTML;return"target"===t?s:"offset"===t?a:"text"===t?i:{target:s,offset:a,text:i}}};vg=t})();
|
|
2
|
+
var vg;(()=>{"use strict";var e={d:(t,s)=>{for(var a in s)e.o(s,a)&&!e.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:s[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function s(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}e.r(t),e.d(t,{VGAlert:()=>As,VGCollapse:()=>ke,VGDataTable:()=>Fs,VGDropdown:()=>tt,VGFormSender:()=>jt,VGLawCookie:()=>ts,VGModal:()=>Et,VGNav:()=>He,VGRollup:()=>Yt,VGSelect:()=>ks,VGSidebar:()=>de,VGSpy:()=>Rs,VGToast:()=>Ds});const a=e=>!!r(e)&&void 0!==e.nodeType,i=e=>!e||e.nodeType!==Node.ELEMENT_NODE||!!e.classList.contains("disabled")||(void 0!==e.disabled?e.disabled:e.hasAttribute("disabled")&&"false"!==e.getAttribute("disabled"));function n(e){if(!a(e)||0===e.getClientRects().length)return!1;const t="visible"===getComputedStyle(e).getPropertyValue("visibility"),s=e.closest("details:not([open])");if(!s)return t;if(s!==e){const t=e.closest("summary");if(t&&t.parentNode!==s)return!1;if(null===t)return!1}return t}function r(e){return e&&"object"==typeof e}function o(e){if("true"===e)return!0;if("false"===e)return!1;if(e===Number(e).toString())return Number(e);if(""===e||"null"===e)return null;if("string"!=typeof e)return e;try{return JSON.parse(decodeURIComponent(e))}catch{return e}}function l(...e){const t=e=>e&&"object"==typeof e;return e.reduce(((e,s)=>(Object.keys(s).forEach((a=>{const i=e[a],n=s[a];Array.isArray(i)&&Array.isArray(n)?e[a]=i.concat(...n):t(i)&&t(n)?e[a]=l(i,n):e[a]=n})),e)),{})}function d(e,t=[],s=e){return"function"==typeof e?e(...t):s}const c="transitionend",m=e=>{e.offsetHeight},h=()=>{};function u(e=7){let t="";let s=0;for(;s<e;)t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".charAt(Math.floor(62*Math.random())),s+=1;return t}const p=()=>"rtl"===document.documentElement.dir,g=e=>{let t=e.getAttribute("data-vg-target");if(!t||"#"===t){let s=e.getAttribute("href");if(!s||!s.includes("#")&&!s.startsWith("."))return null;s.includes("#")&&!s.startsWith("#")&&(s=`#${s.split("#")[1]}`),t=s&&"#"!==s?s.trim():null}return t?t.split(",").map((e=>(e=>(e&&window.CSS&&window.CSS.escape&&(e=e.replace(/#([^\s"#']+)/g,((e,t)=>`#${CSS.escape(t)}`))),e))(e))).join(","):null},_={find:(e,t=document.documentElement)=>a(e)?e:Element.prototype.querySelector.call(t,e),findAll:(e,t=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(t,e)),getSelectorFromElement(e){const t=g(e);return t&&_.find(t)?t:null},getElementFromSelector(e){const t=g(e);return t?_.find(t):null},getMultipleElementsFromSelector(e){const t=g(e);return t?_.findAll(t):[]},prev:e=>e.previousElementSibling||null},f=_,v=new Map,b={set(e,t,s){v.has(e)||v.set(e,new Map);const a=v.get(e);a.has(t)||0===a.size?a.set(t,s):console.error(`VGApp не допускает более одного экземпляра для каждого элемента. Связанный экземпляр: ${Array.from(a.keys())[0]}.`)},get:(e,t)=>v.has(e)&&v.get(e).get(t)||null,remove(e,t){if(!v.has(e))return;const s=v.get(e);s.delete(t),0===s.size&&v.delete(e)}},w={get(e,t="data",s=!0){if(!e)return{};if("data"===t){let t=["data-vg-toggle","data-vg-target","data-vg-dismiss"],a={},i=[].filter.call(e.attributes,(function(e){return/^data-/.test(e.name)}));return i.length&&i.forEach((function(e){let i=e.name;t.includes(i)||(s&&(i=i.slice(5)),a[i]=o(e.value))})),a}return"all"===t?e.getAttributeNames().reduce(((t,s)=>({...t,[s]:e.getAttribute(s)})),{}):e.getAttribute(t)},has:(e,t)=>e.hasAttribute(t),set(e,t,s){a(e)&&t&&e.setAttribute(t,s)},remove(e,t){a(e)&&t&&e.removeAttribute(t)},hide(e){e.style.display="none"},show(e,t="block"){e.style.display=t}},y=class{constructor(e,t=null){this._params=this.merge(e,t)}get(){return this._params}fromElement(e){return a(e)?w.get(e):{}}merge(e,t){let s=l(e,this.fromElement(t));for(let e in s)if(-1!==e.indexOf("-")){let t=e.split("-"),a=o(s[e]);t[0]in s&&t[1]in s[t[0]]&&(s[t[0]][t[1]]=a),delete s[e]}return"params"in s&&(s=l(s,s.params),delete s.params),s}},k=/[^.]*(?=\..*)\.|.*/,L=/\..*/,x=/::\d+$/,E={};let A=1;const C={mouseenter:"mouseover",mouseleave:"mouseout"},S=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","submit","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","popstate","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function T(e,t){return t&&`${t}::${A++}`||e.uidEvent||A++}function M(e){const t=T(e);return e.uidEvent=t,E[t]=E[t]||{},E[t]}function O(e,t,s=null){return Object.values(e).find((e=>e.callable===t&&e.delegationSelector===s))}function $(e,t,s){const a="string"==typeof t,i=a?s:t||s;let n=(r=(r=e).replace(L,""),C[r]||r);var r;return S.has(n)||(n=e),[a,i,n]}function I(e,t,s,a,i){if("string"!=typeof t||!e)return;let[n,r,o]=$(t,s,a);if(t in C){const e=e=>function(t){if(!t.relatedTarget||t.relatedTarget!==t.delegateTarget&&!t.delegateTarget.contains(t.relatedTarget))return e.call(this,t)};r=e(r)}const l=M(e),d=l[o]||(l[o]={}),c=O(d,r,n?s:null);if(c)return void(c.oneOff=c.oneOff&&i);const m=T(r,t.replace(k,"")),h=n?function(e,t,s){return function a(i){const n=e.querySelectorAll(t);for(let{target:r}=i;r&&r!==this;r=r.parentNode)for(const o of n)if(o===r)return j(i,{delegateTarget:r}),a.oneOff&&q.off(e,i.type,t,s),s.apply(r,[i])}}(e,s,r):function(e,t){return function s(a){return j(a,{delegateTarget:e}),s.oneOff&&q.off(e,a.type,t),t.apply(e,[a])}}(e,r);h.delegationSelector=n?s:null,h.callable=r,h.oneOff=i,h.uidEvent=m,d[m]=h,e.addEventListener(o,h,n)}function P(e,t,s,a,i){const n=O(t[s],a,i);n&&(e.removeEventListener(s,n,Boolean(i)),delete t[s][n.uidEvent])}function N(e,t,s,a){const i=t[s]||{};for(const[n,r]of Object.entries(i))n.includes(a)&&P(e,t,s,r.callable,r.delegationSelector)}function j(e,t={}){for(const[s,a]of Object.entries(t))try{e[s]=a}catch{Object.defineProperty(e,s,{configurable:!0,get:()=>a})}return e}const q={on(e,t,s,a){I(e,t,s,a,!1)},one(e,t,s,a){I(e,t,s,a,!0)},off(e,t,s,a){if("string"!=typeof t||!e)return;const[i,n,r]=$(t,s,a),o=r!==t,l=M(e),d=l[r]||{},c=t.startsWith(".");if(void 0===n){if(c)for(const s of Object.keys(l))N(e,l,s,t.slice(1));for(const[s,a]of Object.entries(d)){const i=s.replace(x,"");o&&!t.includes(i)||P(e,l,r,a.callable,a.delegationSelector)}}else{if(!Object.keys(d).length)return;P(e,l,r,n,i?s:null)}},trigger(e,t,s){if("string"!=typeof t||!e)return null;const a=j(new Event(t,{bubbles:!0,cancelable:!0}),s);return e.dispatchEvent(a),a}},H=q,D=e=>({error:'<svg viewBox="0 0 87 87" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="ui-success" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Group-2" transform="translate(2.000000, 2.000000)"><circle id="Oval-2" stroke="rgba(252, 191, 191, .5)" stroke-width="4" cx="41.5" cy="41.5" r="41.5"></circle><circle class="ui-error-circle" stroke="#F74444" stroke-width="4" cx="41.5" cy="41.5" r="41.5"></circle><path class="ui-error-line1" d="M22.244224,22 L60.4279902,60.1837662" id="Line" stroke="#F74444" stroke-width="3" stroke-linecap="square"></path><path class="ui-error-line2" d="M60.755776,21 L23.244224,59.8443492" id="Line" stroke="#F74444" stroke-width="3" stroke-linecap="square"></path></g></g></svg>',success:'<svg viewBox="0 0 87 87" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="ui-error" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Group-3" transform="translate(2.000000, 2.000000)"><circle id="Oval-2" stroke="rgba(117, 183, 152, 0.4)" stroke-width="4" cx="41.5" cy="41.5" r="41.5"></circle><circle class="ui-success-circle" id="Oval-2" stroke="#A5DC86" stroke-width="4" cx="41.5" cy="41.5" r="41.5"></circle><polyline class="ui-success-path" id="Path-2" stroke="#A5DC86" stroke-width="4" points="19 38.8036813 31.1020744 54.8046875 63.299221 28"></polyline></g></g></svg>',waiting:'<svg viewBox="0 0 87 87" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="ui-waiting" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Group-3" transform="translate(2.000000, 2.000000)"><circle id="Oval-2" stroke="rgba(255, 218, 106, 0.4)" stroke-width="4" cx="41.5" cy="41.5" r="41.5"></circle><circle class="ui-waiting-circle" id="Oval-2" stroke="#ffda6a" stroke-width="4" cx="41.5" cy="41.5" r="41.5"></circle><path class="ui-waiting-line1" d="M43 63C54.598 63 64 53.598 64 42C64 30.402 54.598 21 43 21C31.402 21 22 30.402 22 42C22 53.598 31.402 63 43 63Z" stroke-width="3" stroke="#ffda6a" stroke-linecap="round" stroke-linejoin="round"/><path class="ui-waiting-line2" d="M40.6667 32.6641V44.3307H52.3334" stroke="#ffda6a" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/></g></g></svg>',dots:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-three-dots-vertical" viewBox="0 0 16 16"><path d="M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0z"/></svg>',cross:'<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 224.512 224.512" xml:space="preserve"><g><polygon points="224.507,6.997 217.521,0 112.256,105.258 6.998,0 0.005,6.997 105.263,112.254 0.005,217.512 6.998,224.512 112.256,119.24 217.521,224.512 224.507,217.512 119.249,112.254 "/></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g></svg>'}[e]??{}),B=(e,t="hide")=>{const s=`click.dismiss.${e.EVENT_KEY}`,a=e.NAME;H.on(document,s,`[data-vg-dismiss="${a}"]`,(function(s){if(["A","AREA"].includes(this.tagName)&&s.preventDefault(),i(this))return;const n=f.getSelectorFromElement(this)||this.closest(`.vg-${a}`);e.getOrCreateInstance(n)[t]()}))},F={x:function(){if("undefined"!=typeof XMLHttpRequest)return new XMLHttpRequest;let e,t=["MSXML2.XmlHttp.6.0","MSXML2.XmlHttp.5.0","MSXML2.XmlHttp.4.0","MSXML2.XmlHttp.3.0","MSXML2.XmlHttp.2.0","Microsoft.XmlHttp"];for(let s=0;s<t.length;s++)try{e=new ActiveXObject(t[s]);break}catch(e){}return e},send:function(e,t,s,a,i){void 0===i&&(i=!0);let n=F.x();n.open(s,e,i),n.setRequestHeader("X-Requested-With","XMLHttpRequest"),n.onreadystatechange=function(){4===n.readyState&&(200===n.status?t("success",{text:n.statusText,response:n.responseText,code:n.status}):t("error",{text:n.statusText,response:n.responseText,code:n.status}))},n.send(a)},get:function(e,t,a,i){let n=[];if(!s(t))for(let e of t)n.push(encodeURIComponent(e[0])+"="+encodeURIComponent(e[1]));F.send(e+(n.length?"?"+n.join("&"):""),a,"GET",null,i)},post:function(e,t,s,a){F.send(e,s,"POST",t,a)}},R=class{constructor(e,t,s={}){this._params=l({enable:!1,in:"animate__backInUp",out:"animate__backOutUp",delay:0,duration:800},s),this.classes={animated:"animate__animated",duration:"animate__duration-"+this._params.duration},this._params.enable&&a(e)&&(this._element=e,this._name_key=t,this._element.classList.contains(this.classes.animated)||(this._element.classList.add(this.classes.animated),this._element.classList.add(this.classes.duration)),this._triggers())}_triggers(){H.on(this._element,this._name_key+".show",(()=>{this._element.classList.remove(this._params.out),this._element.classList.add(this._params.in)})),H.on(this._element,this._name_key+".hide",(()=>{this._element.classList.remove(this._params.in),this._element.classList.add(this._params.out)})),H.on(this._element,this._name_key+".hidden",(()=>{this._element.classList.remove(this._params.out)}))}},z=class{constructor(e){if(e){if(this._element=f.find(e),!this._element)throw new Error("Товарищ! Первый параметр не должен быть пустым!");this._params={},b.set(this._element,this.constructor.NAME_KEY,this)}}_getParams(e,t){return new y(t,e).get()}dispose(){b.remove(this._element,this.constructor.NAME_KEY),H.off(this._element,this.constructor.EVENT_KEY);for(const e of Object.getOwnPropertyNames(this))this[e]=null}_route(e){const t=this;let s=null;const a=e=>{s&&(s.innerHTML=e)};t._params.hasOwnProperty("ajax")&&t._params.ajax.route&&(!1 in t._params.ajax&&(t._params.ajax.method="get"),"target"in t._params.ajax&&t._params.ajax.target&&(s=f.find(t._params.ajax.target)),"loader"in t._params.ajax&&t._params.ajax.loader&&a('<div class="vg-loader"></div>'),F[t._params.ajax.method](t._params.ajax.route,t._params.ajax.data||{},(function(t,s){a(s.response),d(e,[t,s])})))}_dismissElement(){let e=D("cross"),t=this._element.querySelector(".vg-btn-close");t&&(t.querySelector("svg")||t.insertAdjacentHTML("beforeend",e))}_queueCallback(e,t,s=!0,a){!function(e,t,s=!0,a){if(!s)return void d(e);const i=a||(e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:s}=window.getComputedStyle(e);const a=Number.parseFloat(t),i=Number.parseFloat(s);return a||i?(t=t.split(",")[0],s=s.split(",")[0],1e3*(Number.parseFloat(t)+Number.parseFloat(s))):0})(t)+5;let n=!1;const r=({target:s})=>{s===t&&(n=!0,t.removeEventListener(c,r),d(e))};t.addEventListener(c,r),setTimeout((()=>{n||(e=>{e.dispatchEvent(new Event(c))})(t)}),i)}(e,t,s,a)}_animation(e,t,s={}){new R(e,t,s)}static getInstance(e){return b.get(f.find(e),this.NAME_KEY)}static getOrCreateInstance(e,t={}){return this.getInstance(e)||new this(e,s(t)?{}:t)}static get DATA_KEY(){return`vg.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}},Y=class{static append(){document.body.style.paddingRight=function(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}()+"px",document.body.style.overflow="hidden"}static destroy(){document.body.style.overflow="",document.body.style.paddingRight="",w.get(document.body,"style")||w.remove(document.body,"style")}},X="vg-backdrop",K="fade";class V{static show(e){V._append(),d(e)}static hide(e){V._destroy(),d(e)}static _append(){if(f.find("."+X))return!1;let e=document.createElement("div");e.classList.add(X),document.body.append(e),setTimeout((()=>{e.classList.add(K)}),50),H.on(e,"mousedown.vg.backdrop",(()=>{V.hide(),Y.destroy()}))}static _destroy(){let e=f.find("."+X);e&&(e.classList.remove(K),setTimeout((()=>{e.remove()}),500))}}const G=V,W="vg.sidebar",U="show",J="vg-sidebar-open",Q=`${W}.hide`,Z=`${W}.hidden`,ee=`${W}.show`,te=`${W}.shown`,se=`${W}.loaded`,ae=`keydown.dismiss.${W}`,ie=`hidePrevented.${W}`,ne=`click.${W}.data.api`,re=`popstate.${W}.data.api`,oe=`DOMContentLoaded.${W}.data.api`;class le extends z{constructor(e,t={}){super(e,t),this._params=this._getParams(e,l({backdrop:!0,overflow:!0,keyboard:!0,hash:!1,animation:{enable:!1,in:"animate__rollIn",out:"animate__rollOut",delay:800},ajax:{route:"",target:"",method:"get",loader:!1}},t)),this._addEventListeners(),this._dismissElement(),this._params.animation.delay=this._params.animation.enable?this._params.animation.delay:0,this._animation(this._element,le.NAME_KEY,this._params.animation)}static get NAME(){return"sidebar"}static get NAME_KEY(){return W}toggle(e){return this._isShown()?this.hide():this.show(e)}show(e){const t=this;i(t._element)||(e&&(t._params=t._getParams(e,t._params)),t._route((function(e,s){H.trigger(t._element,se,{stats:e,data:s})})),H.trigger(t._element,ee,{relatedTarget:e}).defaultPrevented||(t._params.backdrop&&G.show(),t._params.overflow&&Y.append(),this._params.hash&&(window.history.pushState(null,"vg-sidebar-open","#"+this._element.id),H.on(window,re,(()=>{this.hide()}))),t._element.classList.add(U),document.body.classList.add(J),t._queueCallback((()=>{H.on(f.find(".vg-backdrop"),"mousedown.vg.backdrop",(function(){t.hide()})),H.trigger(t._element,te,{relatedTarget:e})}),t._element,!0,50)))}hide(){const e=this;i(e._element)||H.trigger(this._element,Q).defaultPrevented||setTimeout((()=>{e._element.setAttribute("aria-expanded",!1),e._element.classList.remove(U),this._queueCallback((()=>{e._params.backdrop&&G.hide((function(){e._params.overflow&&Y.destroy()})),e._params.overflow&&Y.destroy(),e._params.hash&&history.pushState("",document.title,window.location.pathname+window.location.search),document.body.classList.remove(J),H.trigger(this._element,Z)}),this._element,!0)}),this._params.animation.delay)}dispose(){super.dispose()}_isShown(){return this._element.classList.contains(U)}_addEventListeners(){H.on(document,ae,(e=>{"Escape"===e.key&&(this._params.keyboard?this.hide():H.trigger(this._element,ie))}))}}B(le),H.on(document,ne,'[data-vg-toggle="sidebar"]',(function(e){const t=f.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&e.preventDefault(),i(this))return;this.setAttribute("aria-expanded",!0),H.one(t,Z,(()=>{this.setAttribute("aria-expanded",!1)}));const s=f.find(".vg-sidebar.show");s&&s!==t&&le.getInstance(s).hide(),le.getOrCreateInstance(t).toggle(this)})),H.on(document,oe,(function(){let e=window.location.hash.slice(1);if(e){let t=f.find("#"+e);if(t&&t.classList.contains("vg-sidebar")){if(i(t))return;le.getOrCreateInstance(t).toggle()}}}));const de=le,ce="vg.collapse",me="show",he="vg-collapse",ue="vg-collapsing",pe=`:scope .${he} .${he}`,ge='[data-vg-toggle="collapse"]',_e=`${ce}.hide`,fe=`${ce}.hidden`,ve=`${ce}.show`,be=`${ce}.shown`,we=`click.${ce}.data.api`;class ye extends z{constructor(e,t={}){super(e,t),this._params=this._getParams(e,l({toggle:!0,parent:null,ajax:{route:"",target:"",method:"get",loader:!1}},t)),this._isTransitioning=!1,this._triggerArray=[];const s=f.findAll(ge);for(const e of s){const t=f.getSelectorFromElement(e),s=f.findAll(t).filter((e=>e===this._element));null!==t&&s.length&&this._triggerArray.push(e)}this._initializeChildren(),this._params.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._params.toggle&&this.toggle()}static get NAME(){return"collapse"}static get NAME_KEY(){return ce}toggle(e){return this._isShown()?this.hide():this.show(e)}show(){const e=this;if(e._isTransitioning||e._isShown())return;let t=[];if(!(e._params.parent&&(t=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter((e=>e!==this._element)).map((e=>ye.getOrCreateInstance(e,{toggle:!1})))),t.length&&t[0]._isTransitioning||H.trigger(e._element,ve).defaultPrevented)){for(const e of t)e.hide();e._element.classList.remove(he),e._element.classList.add(ue),e._element.style.height=0,e._addAriaAndCollapsedClass(e._triggerArray,!0),e._isTransitioning=!0,e._route(),e._queueCallback((()=>{e._isTransitioning=!1,e._element.classList.remove(ue),e._element.classList.add(he,me),e._element.style.height="",H.trigger(e._element,be)}),e._element,!0),e._element.style.height=`${e._element.scrollHeight}px`}}hide(){const e=this;if(!e._isTransitioning&&e._isShown()&&!H.trigger(e._element,_e).defaultPrevented){e._element.style.height=`${this._element.getBoundingClientRect().height}px`,m(e._element),e._element.classList.add(ue),e._element.classList.remove(he,me);for(const t of e._triggerArray){const s=f.getElementFromSelector(t);s&&!e._isShown(s)&&e._addAriaAndCollapsedClass([t],!1)}e._isTransitioning=!0,e._element.style.height="",e._queueCallback((()=>{e._isTransitioning=!1,e._element.classList.remove(ue),e._element.classList.add(he),H.trigger(e._element,fe)}),e._element,!0)}}dispose(){super.dispose()}_isShown(e=this._element){return e.classList.contains(me)}_addAriaAndCollapsedClass(e,t){if(e.length)for(const s of e)this._changeStateButton(s,t)}_initializeChildren(){if(!this._params.parent)return;const e=this._getFirstLevelChildren(ge);for(const t of e){const e=f.getElementFromSelector(t);e&&this._addAriaAndCollapsedClass([t],this._isShown(e))}}_getFirstLevelChildren(e){const t=f.find(pe,this._params.parent);return f.find(e,this._params.parent).filter((e=>!t.includes(e)))}_changeStateButton(e,t){e.classList.toggle("vg-collapsed",!t),e.setAttribute("aria-expanded",t),e.innerHTML=w.get(e,`data-${t?"hide":"show"}-text`)||e.innerHTML}}H.on(document,we,ge,(function(e){("A"===e.target.tagName||e.delegateTarget&&"A"===e.delegateTarget.tagName)&&e.preventDefault(),f.getMultipleElementsFromSelector(this).forEach((function(e){ye.getOrCreateInstance(e,{toggle:!1}).toggle()}))}));const ke=ye,Le=class{constructor(){this.breakpoints={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400,xxxl:1600}}static check(e){return(new this).define(e)}static checkMobileOrTablet(){let e=!1;var t;return t=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.slice(0,4)))&&(e=!0),e}define(e){let t=window.innerWidth,s=this._checkResponsiveClass(e),a=this.breakpoints,i=Object.keys(a).find((e=>a[e]===s)),n=Object.keys(a),r=n.indexOf(i);return t>=a[n[r+1]]}_checkResponsiveClass(e){let t=e._element,s=e._params,a=0;return a=t.classList.contains(s.classes.XXXL)?this.breakpoints.xxxl:t.classList.contains(s.classes.XXL)?this.breakpoints.xxl:t.classList.contains(s.classes.XL)?this.breakpoints.xl:t.classList.contains(s.classes.LG)?this.breakpoints.lg:t.classList.contains(s.classes.MD)?this.breakpoints.md:t.classList.contains(s.classes.SM)?this.breakpoints.sm:(t.classList.contains(s.classes.XS),this.breakpoints.xs),a}},xe="vg.nav",Ee="show",Ae="fade",Ce="active",Se=`${xe}.hide`,Te=`${xe}.hidden`,Me=`${xe}.show`,Oe=`${xe}.shown`,$e=`mouseover.${xe}.data.api`,Ie=`mouseout.${xe}.data.api`,Pe=`click.${xe}.data.api`,Ne=`keyup.${xe}.data.api`,je=`resize.${xe}.data.api`;class qe extends z{constructor(e,t={}){super(e),this._params=this._getParams(e,l({breakpoint:!1,placement:"horizontal",classes:{hamburgerActive:"vg-nav-hamburger-active",hamburgerAlways:"vg-nav-hamburger-always",hamburger:"vg-nav-hamburger",container:"vg-nav-container",wrapper:"vg-nav-wrapper",active:"vg-nav-active",expand:"vg-nav-expand",cloned:"vg-nav-cloned",hover:"vg-nav-hover",flip:"vg-nav-flip",XXXL:"vg-nav-xxxl",XXL:"vg-nav-xxl",XL:"vg-nav-xl",LG:"vg-nav-lg",MD:"vg-nav-md",SM:"vg-nav-sm",XS:"vg-nav-xs"},expand:!0,hover:!1,position:!0,collapse:!0,toggle:'<span class="default"></span>',hamburger:{enable:!0,always:!1,title:"",body:null},callback:h,animation:!0,timeoutAnimation:300,ajax:{route:"",target:"",method:"get"}},t)),this._navigation=null,this.navigation="."+this._params.classes.wrapper,this.movedLinks=[],this.$links=f.findAll("."+this._params.classes.wrapper+" > li",this.navigation),!1===this._params.animation&&(this._params.timeoutAnimation=10)}static get NAME(){return"nav"}static get NAME_KEY(){return xe}get navigation(){return this._navigation}set navigation(e){let t=f.find(e,this._element);t&&(this._navigation=t)}build(){if(!this.navigation)return;let e=this._params;if(this._element.classList.add(e.classes.container),this._element.classList.add("vg-nav-"+e.placement),e.breakpoint||(e.expand=!1),e.hamburger.always?this._element.classList.add(e.classes.hamburgerAlways):e.breakpoint&&e.expand?!1!==e.breakpoint&&this._element.classList.add("vg-nav-"+e.breakpoint):this._element.classList.add(e.classes.expand),e.hover&&(this._element.classList.add(e.classes.hover),Le.checkMobileOrTablet()&&this._element.classList.remove(e.classes.hover)),e.expand&&!e.hamburger.body&&null===f.find("."+e.classes.hamburger,this._element)){let t="",s='<span class="'+e.classes.hamburger+'--lines"><span></span><span></span><span></span></span>';e.hamburger.title&&(t='<span class="'+e.classes.hamburger+'--title">'+e.hamburger.title+"</span>"),null!==e.hamburger.body&&(s=e.hamburger.body),this._element.insertAdjacentHTML("afterbegin",'<a href="#sidebar-nav" class="'+e.classes.hamburger+'" data-vg-toggle="sidebar">'+t+s+"</a>")}if(e.toggle){let t=[...f.findAll(".dropdown-mega > a, .dropdown > a",this._element)],s='<span class="toggle">'+e.toggle+"</span>";t.length&&t.forEach((function(e){e.querySelector(".toggle")||e.closest(".dots")||(e.setAttribute("aria-expanded","false"),e.insertAdjacentHTML("beforeend",s))}))}e.collapse&&Le.check(this)&&"vertical"!==e.placement&&function(e){let t=e.navigation.clientWidth,s=0,a=f.find(".dots",e.navigation),i=D("dots");if(e.$links.length){if(a)s=a.clientWidth;else{let t=f.find("a",e.$links[0]),a=getComputedStyle(t);s=o(a.paddingLeft.slice(0,-2))+o(a.paddingRight.slice(0,-2))+16}for(let i of e.$links)s+=i.getBoundingClientRect().width,t<s?(e.movedLinks.push(i),i.remove()):e.movedLinks.length&&(a?e.navigation.insertBefore(e.movedLinks[0],a):e.navigation.appendChild(e.movedLinks[0]),e.movedLinks.splice(0,1));e.movedLinks.length?a||e.navigation.insertAdjacentHTML("beforeend",'<li class="dropdown dots"><a href="#" aria-expanded="false">'+i+"</a></li>"):a&&a.remove();let n=e.navigation.querySelector(".dots");if(n&&e.movedLinks.length){let t=n.querySelector("ul");if(t)for(let s of e.movedLinks)t.prepend(s);else{let t=document.createElement("ul");t.classList.add("dropdown-content"),t.classList.add("right");for(let s of e.movedLinks)t.prepend(s);n.appendChild(t)}}}}(this),"afterInit"in this._params.callback&&d(this._params.callback.afterInit,[this])}show(e){let t=e.relatedTarget;if(!t||i(t))return;if(t.closest(".dropdown-content")||t.classList.add("first"),H.trigger(t,Me,{relatedTarget:e}).defaultPrevented)return;let s=f.find(".dropdown-content",t),a=t.firstElementChild;a&&a.setAttribute("aria-expanded","true"),s.classList.add(Ee),t.classList.add(Ce),function(e){let{width:t,right:s}=e.getBoundingClientRect(),a=window.innerWidth-s-t;e.classList.remove("right"),e.classList.remove("left");let i=e.closest("li").querySelectorAll("ul");if(a>t)for(const e of i)e.classList.add("left");else for(const e of i)e.classList.add("right")}(s),this._queueCallback((()=>{s.classList.add(Ae),H.trigger(t,Oe,e)}),s,!0,50)}hide(e){const t=this;if("ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))H.off(e,"mouseover",h);let s=e.relatedTarget;if("elm"in e&&e.elm&&(s=e.elm),s){if(H.trigger(s,Se).defaultPrevented)return;s.classList.remove(Ce),s.classList.contains("first")&&s.classList.remove("first"),[...f.findAll("."+Ee,s)].forEach((function(s,a){s.classList.remove(Ae);let i=s.closest(".dropdown");i.classList.contains(Ce)&&i.classList.remove(Ce);let n=s.previousElementSibling;if(n&&n.setAttribute("aria-expanded","false"),0===a){const a=()=>{s.classList.remove(Ee),H.trigger(s,Te,e)};t._queueCallback(a,s,!0,500)}}))}}static init(e,t={}){const s=qe.getOrCreateInstance(e,t);s.build();let a=f.findAll(".dropdown",s._navigation);s._params.hover?[...a].forEach((function(e){let t=null;H.on(e,$e,(function(e){if(t)return;qe.hideOpenDrops(e);let a=e.target.closest(".dropdown");if(!a)return;if(!s.navigation.contains(a))return;t=a;let i={relatedTarget:a};s.show(i)})),H.on(e,Ie,(function(e){if(!t)return;let a=e.relatedTarget.closest(".dropdown"),i=t;for(;a;){if(a===t)return;a=a.parentNode}t=null,s.hide({relatedTarget:a,elm:i})}))})):(H.on(document,Ne,qe.clearDrops),H.on(document,Pe,qe.clearDrops),H.on(document,Pe,".vg-nav a",(function(e){if(!w.has(this,"aria-expanded"))return;"click"in s._params.callback&&d(s._params.callback.click,[this]),e.preventDefault();let t=this.closest(".vg-nav"),a=t.querySelector(".first"),r=this.closest(".dropdown");if(r&&(!i(r)||n(r))){if(a&&this.closest(".first")){if(r.classList.contains("active"))return void s.hide({relatedTarget:r})}else[...f.findAll(".active",t)].forEach((function(e){e&&e!==r&&s.hide({relatedTarget:e})}));s.show({relatedTarget:r})}})));const r=document.getElementById("sidebar-nav");let o=s._element.querySelector("."+s._params.classes.hamburger);r&&o&&(r.addEventListener("vg.sidebar.show",(function(){o.classList.add(s._params.classes.hamburgerActive)})),r.addEventListener("vg.sidebar.hide",(function(){o.classList.remove(s._params.classes.hamburgerActive)})))}static clearDrops(e){2===e.button||"keyup"===e.type&&"Tab"!==e.key||qe.hideOpenDrops(e)}static hideOpenDrops(e){const t=f.findAll(".dropdown:not(.disabled):not(:disabled).active");for(const s of t){const t=qe.getInstance(s.closest(".vg-nav"));if(!t)continue;if(e.target.closest(".first"))return;const a={relatedTarget:s};"click"===e.type&&(a.clickEvent=e),t.hide(a)}}}H.on(window,je,(function(){f.find(".vg-nav")&&qe.getOrCreateInstance(".vg-nav",{}).build()}));const He=qe,De=class{constructor(e={}){this.params=l({element:null,drop:null},e)}_getPlacement(){const e=this,t=e=>{let s=e.parentNode,a=getComputedStyle(s).overflow;return"BODY"===s.tagName?null:"visible"!==a?s:void t(s)};let s,a,i=!1,n=e.params.drop.getBoundingClientRect(),r=e.params.element.getBoundingClientRect();if(t(e.params.element))i=!0,s=n.top,a=n.left;else{let t=getComputedStyle(e.params.drop);s=o(t.top.slice(0,-2)),a=o(t.left.slice(0,-2))}return n.left+n.width>window.innerWidth&&(a=r.width-n.width),{isFixed:i,top:s,left:a}}},Be="vg.dropdown",Fe="show",Re="fade",ze="vg-dropdown-content",Ye='[data-vg-toggle="dropdown"]',Xe=`${Be}.hide`,Ke=`${Be}.hidden`,Ve=`${Be}.show`,Ge=`${Be}.shown`,We=`keyup.${Be}.data.api`,Ue=`keydown.${Be}.data.api`,Je=`click.${Be}.data.api`,Qe=`mouseover.${Be}.data.api`,Ze=`mouseout.${Be}.data.api`;class et extends z{constructor(e,t){super(e,t);let s={offset:[0,2],backdrop:!1,overflow:!1,keyboard:!1,placement:"bottom",timeoutAnimation:350,hover:!1,ajax:{route:"",target:"",method:"get",loader:!1},animation:{enable:!1,in:"animate__flipInY",out:"animate__flipOutY",delay:800}};"offset"in t&&Array.isArray(t.offset)&&(s.offset=t.offset),this._params=this._getParams(e,l(s,t));const a=f.getElementFromSelector(this._element);this._parent=this._element.parentNode,this._drop=a||f.find("."+ze,this._parent),this._isPlacement=!1,this._params.animation.delay=this._params.animation.enable?this._params.animation.delay:0,this._animation(this._drop,et.NAME_KEY,this._params.animation)}static get NAME(){return"dropdown"}static get NAME_KEY(){return Be}toggle(){return this._isShown()?this.hide():this.show()}show(){if(i(this._element)||this._isShown())return;const e={relatedTarget:this._element};if(!H.trigger(this._element,Ve,e).defaultPrevented){if("ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))H.on(e,"mouseover",h);this._route(),this._element.setAttribute("aria-expanded",!0),this._element.classList.add(Fe),this._drop.classList.add(Fe),this._setPlacement(),this._params.backdrop&&!this._params.hover&&G.show(),this._params.overflow&&(Y.append(),document.body.classList.add("dropdown-open")),this._queueCallback((()=>{this._drop.classList.add(Re),H.trigger(this._element,Ge,e)}),this._drop,!0,50)}}hide(){if(i(this._element)||!this._isShown())return;const e={relatedTarget:this._element};this._completeHide(e)}dispose(){return super.dispose()}_isShown(){return this._element.classList.contains(Fe)}_completeHide(e){if(!H.trigger(this._element,Xe,e).defaultPrevented){if("ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))H.off(e,"mouseover",h);if(this._drop.classList.remove(Re),this._element.classList.remove(Fe),this._element.setAttribute("aria-expanded","false"),this._params.backdrop&&!this._params.hover){const e=this;G.hide((function(){e._params.overflow&&Y.destroy()}))}this._params.overflow&&(Y.destroy(),document.body.classList.remove("dropdown-open")),setTimeout((()=>{this._queueCallback((()=>{this._drop.classList.remove(Fe),H.trigger(this._element,Ke,e)}),this._parent,!0,10)}),this._params.animation.delay)}}_setPlacement(){const e=this;if(!e._isPlacement){let t=new De({element:this._parent,drop:this._drop})._getPlacement();t.isFixed&&(e._drop.style.position="fixed",e._drop.style.transform="translateY(-20%)"),e._drop.style.left=t.left+"px",e._drop.style.top=t.top+"px"}e._params.offset&&(e._drop.style.paddingTop=e._params.offset[1]+"px",e._drop.style.paddingRight=e._params.offset[0]+"px"),e._isPlacement=!0}static init(e,t={}){const s=et.getOrCreateInstance(e,t);if(s._params.hover){let e=null;H.on(s._parent,Qe,(function(t){if(e)return;et.hideOpenToggles(t);let a=t.target.closest(".vg-dropdown");a&&s._parent.contains(a)&&(e=a,s.show())})),H.on(s._parent,Ze,(function(t){if(!e)return;let a=t.relatedTarget;for(;a;){if(a===e)return;a=a.parentNode}e=null,s._completeHide({relatedTarget:s._element})}))}else H.on(document,We,Ye,et.keydownHandler),H.on(document,Ue,"."+ze,et.keydownHandler),H.on(document,We,et.clearDrops),H.on(document,Je,et.clearDrops),H.on(e,Je,(function(e){e.preventDefault(),s.toggle()}))}static hideOpenToggles(e){const t=f.findAll('[data-vg-toggle="dropdown"]:not(.disabled):not(:disabled).show');for(const s of t){const t=et.getInstance(s);if(!t)continue;if(e.target.closest("."+ze)===t._drop)return;if(e.composedPath().includes(t._element))continue;const a={relatedTarget:t._element};"click"===e.type&&(a.clickEvent=e),t._completeHide(a)}}static keydownHandler(e){const t=/input|textarea/i.test(e.target.tagName),s="Escape"===e.key,a=["ArrowUp","ArrowDown"].includes(e.key);if(!a&&!s)return;if(t&&!s)return;e.preventDefault();const i=this.matches(Ye)?this:f.find(Ye,e.delegateTarget.parentNode),n=et.getOrCreateInstance(i);if(a)return e.stopPropagation(),void n.show();n._isShown()&&(e.stopPropagation(),n.hide(),i.focus())}static clearDrops(e){2===e.button||"keyup"===e.type&&"Tab"!==e.key||et.hideOpenToggles(e)}}const tt=et,st=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",at=".sticky-top",it="padding-right",nt="margin-right",rt=class{constructor(){this._element=document.body}getWidth(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}hide(){const e=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,it,(t=>t+e)),this._setElementAttributes(st,it,(t=>t+e)),this._setElementAttributes(at,nt,(t=>t-e))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,it),this._resetElementAttributes(st,it),this._resetElementAttributes(at,nt)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,t,s){const a=this.getWidth();this._applyManipulationCallback(e,(e=>{if(e!==this._element&&window.innerWidth>e.clientWidth+a)return;this._saveInitialAttribute(e,t);const i=window.getComputedStyle(e).getPropertyValue(t);e.style.setProperty(t,`${s(Number.parseFloat(i))}px`)}))}_saveInitialAttribute(e,t){const s=e.style.getPropertyValue(t);s&&w.get(e,t,s)}_resetElementAttributes(e,t){this._applyManipulationCallback(e,(e=>{const s=w.get(e,t);null!==s?(w.remove(e,t),e.style.setProperty(t,s)):e.style.removeProperty(t)}))}_applyManipulationCallback(e,t){if(a(e))t(e);else for(const s of f.findAll(e,this._element))t(s)}},ot="vg.modal",lt="vg-modal-open",dt="show",ct="vg-modal-static",mt=`${ot}.hide`,ht=`${ot}.hidden`,ut=`${ot}.show`,pt=`${ot}.shown`,gt=`${ot}.resize`,_t=`${ot}.loaded`,ft=`keydown.dismiss.${ot}`,vt=`hidePrevented.${ot}`,bt=`click.${ot}.data.api`,wt=`mousedown.dismiss${ot}`,yt=`click.dismiss${ot}`,kt=`DOMContentLoaded.${ot}.data.api`,Lt=`popstate.${ot}.data.api`;class xt extends z{constructor(e,t={}){super(e,t),this._params=this._getParams(e,l({backdrop:!0,focus:!0,keyboard:!0,fields:[],hash:!1,centered:!1,ajax:{route:"",target:"",method:"get",loader:!1},animation:{enable:!1,in:"animate__rollIn",out:"animate__rollOut",delay:100,duration:800},classes:{general:"vg-modal",dialog:"vg-modal-dialog",content:"vg-modal-content",header:"vg-modal-header",title:"vg-modal-title",body:"vg-modal-body",footer:"vg-modal-footer"}},t)),this._button=null,this._dialog=f.find(".vg-modal-dialog",this._element),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new rt,this._addEventListeners(),this._dismissElement(),this._params.animation.delay=this._params.animation.enable?this._params.animation.delay:0,this._animation(this._element,xt.NAME_KEY,this._params.animation)}static get NAME(){return"modal"}static get NAME_KEY(){return ot}static init(e,t,s){xt.build(e,t,s)}static build(e,t,s){if("string"!=typeof e)return;let a=document.createElement("div");a.classList.add("vg-modal","fade"),a.id=e;let i=document.createElement("div");i.classList.add("vg-modal-dialog"),"centered"in t&&t.centered&&i.classList.add("vg-modal-dialog-centered");let n=document.createElement("div");n.classList.add("vg-modal-content");let r=document.createElement("button");w.set(r,"type","button"),w.set(r,"data-vg-dismiss","modal"),w.set(r,"data-vg-target","#"+e),w.set(r,"aria-label","close"),r.classList.add("vg-btn-close"),n.append(r);let o=document.createElement("div");o.classList.add("vg-modal-body"),n.append(o),i.append(n),a.append(i),document.body.append(a);const l=xt.getOrCreateInstance(a,t);return d(s,[l]),l}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){const t=this;i(t._element)||(this._params=this._getParams(e,this._params),t._route((function(e,s){H.trigger(t._element,_t,{stats:e,data:s})})),H.trigger(this._element,ut,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._params.hash&&(window.history.pushState(null,"vg-sidebar-open","#"+this._element.id),H.on(window,Lt,(()=>{this.hide()}))),this._scrollBar.hide(),document.body.classList.add(lt),this._addFieldsInModal(e),this._adjustDialog(),G.show((()=>this._showElement(e)))))}hide(e=[]){this._isShown&&!this._isTransitioning&&(H.trigger(this._element,mt).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,setTimeout((()=>{this._element.classList.remove(dt),this._queueCallback((()=>this._hideModal(e)),this._element,this._isAnimatedFade())}),this._params.animation.delay)))}_hideModal(e){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,e.length||(this._params.hash&&history.pushState("",document.title,window.location.pathname+window.location.search),G.hide((()=>{document.body.classList.remove(lt),this._resetAdjustments(),this._scrollBar.reset(),H.trigger(this._element,ht)})))}_showElement(e){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const t=f.find(".vg-modal-body",this._dialog);t&&(t.scrollTop=0),m(this._element),this._element.classList.add(dt),this._queueCallback((()=>{this._isTransitioning=!1,H.trigger(this._element,pt,{relatedTarget:e})}),this._dialog,this._isAnimatedFade())}_isAnimatedFade(){return this._element.classList.contains("fade")}_adjustDialog(){const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._scrollBar.getWidth(),s=t>0;if(s&&!e){const e=p()?"paddingLeft":"paddingRight";this._element.style[e]=`${t}px`}if(!s&&e){const e=p()?"paddingRight":"paddingLeft";this._element.style[e]=`${t}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}_addEventListeners(){H.on(this._element,ft,(e=>{"Escape"===e.key&&(this._params.keyboard?this.hide():this._triggerBackdropTransition())})),H.on(window,gt,(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),H.on(this._element,wt,(e=>{H.one(this._element,yt,(t=>{this._element===e.target&&this._element===t.target&&("static"!==this._params.backdrop?this._params.backdrop&&this.hide():this._triggerBackdropTransition())}))}))}_triggerBackdropTransition(){if(H.trigger(this._element,vt).defaultPrevented)return;const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._element.style.overflowY;"hidden"===t||this._element.classList.contains(ct)||(e||(this._element.style.overflowY="hidden"),this._element.classList.add(ct),this._queueCallback((()=>{this._element.classList.remove(ct),this._queueCallback((()=>{this._element.style.overflowY=t}),this._dialog)}),this._dialog))}_addFieldsInModal(e){this._params=this._getParams(e,this._params),this._params.fields.length&&this._params.fields.forEach((e=>{if(!1 in e&&!1 in e)return;let t=f.findAll("[data-"+e.name+"]",this._element);if(t.length)for(const s of t)switch(s.tagName){case"INPUT":s.value=e.value;break;case"IMG":w.set(s,"src",e.value);break;default:s.innerHTML=e.value}}))}}B(xt),H.on(document,bt,'[data-vg-toggle="modal"]',(function(e){const t=f.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&e.preventDefault(),H.one(t,ut,(e=>{e.defaultPrevented}));const s=f.find(".vg-modal.show");s&&xt.getInstance(s).hide([s]),xt.getOrCreateInstance(t).toggle(this)})),H.on(document,kt,(function(){let e=window.location.hash.slice(1);if(e){let t=f.find("#"+e);if(t&&t.classList.contains("vg-modal")){if(i(t))return;xt.getOrCreateInstance(t).toggle()}}}));const Et=xt,At=[{type:"pass-open",template:'<span data-vg-toggle="vgpass" class="[[classes]]" title="Показать / Скрыть" data-bs-toggle="tooltip"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M288 80c-65.2 0-118.8 29.6-159.9 67.7C89.6 183.5 63 226 49.4 256c13.6 30 40.2 72.5 78.6 108.3C169.2 402.4 222.8 432 288 432s118.8-29.6 159.9-67.7C486.4 328.5 513 286 526.6 256c-13.6-30-40.2-72.5-78.6-108.3C406.8 109.6 353.2 80 288 80zM95.4 112.6C142.5 68.8 207.2 32 288 32s145.5 36.8 192.6 80.6c46.8 43.5 78.1 95.4 93 131.1c3.3 7.9 3.3 16.7 0 24.6c-14.9 35.7-46.2 87.7-93 131.1C433.5 443.2 368.8 480 288 480s-145.5-36.8-192.6-80.6C48.6 356 17.3 304 2.5 268.3c-3.3-7.9-3.3-16.7 0-24.6C17.3 208 48.6 156 95.4 112.6zM288 336c44.2 0 80-35.8 80-80s-35.8-80-80-80c-.7 0-1.3 0-2 0c1.3 5.1 2 10.5 2 16c0 35.3-28.7 64-64 64c-5.5 0-10.9-.7-16-2c0 .7 0 1.3 0 2c0 44.2 35.8 80 80 80zm0-208a128 128 0 1 1 0 256 128 128 0 1 1 0-256z"/></svg></span>'},{type:"pass-close",template:'<span data-vg-toggle="vgpass" class="[[classes]]" title="Показать / Скрыть" data-bs-toggle="tooltip"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512">\x3c!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--\x3e<path d="M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.6 386.7c39.6-40.6 66.4-86.1 79.9-118.4c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-68.2 0-125 26.3-169.3 60.8L38.8 5.1zm151 118.3C226 97.7 269.5 80 320 80c65.2 0 118.8 29.6 159.9 67.7C518.4 183.5 545 226 558.6 256c-12.6 28-36.6 66.8-70.9 100.9l-53.8-42.2c9.1-17.6 14.2-37.5 14.2-58.7c0-70.7-57.3-128-128-128c-32.2 0-61.7 11.9-84.2 31.5l-46.1-36.1zM394.9 284.2l-81.5-63.9c4.2-8.5 6.6-18.2 6.6-28.3c0-5.5-.7-10.9-2-16c.7 0 1.3 0 2 0c44.2 0 80 35.8 80 80c0 9.9-1.8 19.4-5.1 28.2zm9.4 130.3C378.8 425.4 350.7 432 320 432c-65.2 0-118.8-29.6-159.9-67.7C121.6 328.5 95 286 81.4 256c8.3-18.4 21.5-41.5 39.4-64.8L83.1 161.5C60.3 191.2 44 220.8 34.5 243.7c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c47.8 0 89.9-12.9 126.2-32.5l-41.9-33zM192 256c0 70.7 57.3 128 128 128c13.3 0 26.1-2 38.2-5.8L302 334c-23.5-5.4-43.1-21.2-53.7-42.3l-56.1-44.2c-.2 2.8-.3 5.6-.3 8.5z"/></svg></span>'}],Ct=class{constructor(e,t={}){if(!e)throw new Error("Element is required");this._element=e,this._params=l({insert:"afterend",classes:[]},t)}render(e,t){let s=this.toHTML(e,t);"afterend"===this._params.insert&&this._element.insertAdjacentHTML("afterend",s)}toHTML(e=0,t){let s="";for(const e of At)e.type===this._params.template&&(s=e.template);if(s)return s=s.replace("[[classes]]",this._params.classes.join(" ")),d(t,[this._element,this._params,s]),s}setContent(){}},St="vg.hideshowpass",Tt="show",Mt=`click.${St}.data.api`;class Ot extends z{constructor(e,t={}){super(e,t),this._params=this._getParams(e,l({},t))}static get NAME(){return"hideshowpass"}static get NAME_KEY(){return St}toggle(e){return this._isShown()?this.hide(e):this.show(e)}show(e){e&&(this._params=this._getParams(e,this._params)),this._element.classList.add(Tt),e.remove(),this.build(!0),w.set(this._element,"type","text")}hide(e){this._element.classList.remove(Tt),e.remove(),this.build(!1),w.set(this._element,"type","password")}_isShown(){return this._element.classList.contains(Tt)}static init(e,t){Ot.getOrCreateInstance(e,t).build(!1)}build(e=!1){this._params.template=e?"pass-open":"pass-close",new Ct(this._element,this._params).render()}}H.on(document,Mt,'[data-vg-toggle="vgpass"]',(function(e){const t=f.prev(this);t&&(["A","AREA"].includes(this.tagName)&&e.preventDefault(),i(this)||(this.setAttribute("aria-expanded",!0),Ot.getOrCreateInstance(t).toggle(this)))}));const $t=Ot,It="vg.fs",Pt=`submit.${It}.data.api`;class Nt extends z{constructor(e,t={}){super(e,t),this._params=this._getParams(e,l({response:{enabled:!1,errors:!1,title:"",message:""},redirect:{error:"",success:""},validate:!1,submit:!1,fields:[],timeout:50,pass:{enabled:!0,template:"pass-open",classes:["vg-form-sender--hide-show-pass"],insert:"afterend"},alert:{enabled:!0,type:"modal",errors:!0},ajax:{route:"",target:"",method:"get"},classes:{general:"vg-form-sender",alertCollapse:"vg-form-sender-collapse",alertModal:"vg-form-sender-modal",validation:"needs-validation",wasValidate:"was-validated",content:"vg-form-sender--content"},callback:{afterInit:h,afterSuccess:h,afterError:h},interceptors:{success:!1,error:!1}},t)),this._params.ajax.route=w.get(this._element,"action").toLowerCase(),this._params.ajax.method=w.get(this._element,"method").toLowerCase(),this._button=f.find('[type="submit"]',this._element)||f.find('[form="'+this._element.id+'"]')||null,this._params.isBtnText="false"!==w.get(this._element,"data-btn-text"),this._params.isJsonParse="false"!==w.get(this._element,"data-json-parse"),this._params.isShowPass="true"===w.get(this._element,"data-show-pass")}static get NAME(){return"form-sender"}static get NAME_KEY(){return It}build(){return this._element.classList.add(this._params.classes.general),[...f.findAll("input, textarea, select",this._element)].forEach((e=>{n(e)&&e.parentElement.classList.add(this._params.classes.content)})),this._params.validate&&(w.set(this._element,"novalidate",""),this._element.classList.add(this._params.classes.validation)),this._params.pass.enabled&&[...f.findAll('input[type="password"]',this._element)].forEach((e=>{$t.init(e,this._params.pass)})),d(this._params.callback.afterInit,[this._element,this]),this}request(e,t){const s=this;s._alertBefore(),s._params.ajax.data=e,s._route((function(e,a){s._element.classList.remove("was-validated"),s._params.response.enabled&&(a.response=s._params.response),s._params.alert.enabled&&("string"==typeof e&&"error"===e?s._params.redirect.error?window.location.href=s._params.redirect.error:s._params.interceptors.error?d(s._params.callback.afterError,[s._element,s,t,a]):s._alertError(t,a):"string"==typeof e&&"success"===e&&(s._params.redirect.success?window.location.href=s._params.redirect.success:s._params.interceptors.success?d(s._params.callback.afterSuccess,[s._element,s,t,a]):s._alertSuccess(t,a)))}))}_alertBefore(){const e=this;"collapse"===e._params.alert.type&&[...document.getElementsByClassName(e._params.classes.alertCollapse)].forEach((function(e){e&&e.classList.contains("show")&&ke.getOrCreateInstance(e,{toggle:!1}).hide()})),e._statusButton("before"),H.trigger(e._element,"vg.fs.before",e)}_alertError(e,t){const s=this;s._statusButton("after"),s._jsonParse(t,"error"),H.trigger(s._element,"vg.fs.error",[e,s,t])}_alertSuccess(e,t){const s=this;s._statusButton("after"),s._jsonParse(t,"success"),H.trigger(s._element,"vg.fs.success",[e,s,t])}_statusButton(e){const t=this;if(!t._button)return;let s=t._button,a={send:"Отправляем...",text:"Отправить"};if(w.has(t._button,"data-spinner")&&"before"===e&&t._button.insertAdjacentHTML("afterbegin",'<span class="spinner-border spinner-border-sm me-2"></span>'),w.has(t._button,"data-text"))a.text=w.get(t._button,"data-text");else{let e=t._button.querySelector("[data-text]");e&&(a.text=w.get(e,"data-text"),s=e)}if(w.has(t._button,"data-text-send"))a.send=w.get(t._button,"data-text-send");else{let e=t._button.querySelector("[data-text-send]");e&&(a.send=w.get(e,"data-text-send"),s=e)}if("before"===e&&(t._params.isBtnText&&(s.innerHTML=a.send),w.set(t._button,"disabled","disabled")),"after"===e){t._params.isBtnText&&(s.innerHTML=a.text),w.remove(t._button,"disabled");let e=t._button.querySelector(".spinner-border");e&&e.remove()}}_jsonParse(e,t){const s=this;if(s._params.isJsonParse&&"string"==typeof e){let a={};try{a=JSON.parse(e),s.alert(a,t)}catch(a){s.alert(e,t)}}else s.alert(e,t)}alert(e,t){const s=this;if(r(e)&&"code"in e&&e.code&&200===e.code&&"response"in e&&e.response){let s=o(e.response);"string"==typeof s?-1===s.indexOf("Parse error")&&-1===s.indexOf("syntax error")||(t="error",e={response:{title:"Error",message:"Something went wrong, please repeat later"},text:"Something went wrong, please repeat later"}):"errors"in s&&o(s.errors)&&(t=o(s.errors)?"error":"success")}s._params.alert.enabled&&("modal"===s._params.alert.type&&s._alertModal(e,t),"collapse"===s._params.alert.type&&s._alertCollapse(e,t))}_alertModal(e,t){const s=this;[...document.getElementsByClassName("modal")].forEach((function(e){e&&e.classList.contains("show")&&bootstrap.Modal.getOrCreateInstance(e).hide()})),[...document.getElementsByClassName("vg-modal")].forEach((function(e){if(e&&e.classList.contains("show")){const t=Et.getOrCreateInstance(e);t.hide([t])}}));let a=s._params.classes.general+"-"+u(),i=f.find("."+s._params.classes.alertModal);i&&i.remove(),setTimeout((()=>{Et.init(a,{classes:{alert:s._params.classes.alertModal}},(function(a){let i=a._element;i.classList.add(s._params.classes.alertModal);let n=f.find(".vg-modal-body",i);n&&n.append(s.setDataRelationStatus(i,t,e,"modal")),a.toggle()}))}),s._params.timeout)}_alertCollapse(e,t){const s=this;let a=f.find("."+s._params.classes.alertCollapse);a||(a=document.createElement("div"),a.classList.add(s._params.classes.alertCollapse),a.classList.add("vg-collapse"),a.id=s._params.classes.general+"-"+u(),a.append(s.setDataRelationStatus(a,t,e,"collapse")),s._element.prepend(a)),ke.getOrCreateInstance(a,{toggle:!1}).toggle()}setDataRelationStatus(e,t,s,a){let i=f.find(".vg-alert-"+t,e);if(r(s)){if("error"===t&&"code"in s&&200!==s.code&&"text"in s&&!s.text)switch(s.text="Something went wrong, please repeat later",s.code){case 400:s.text="Bad Request";break;case 401:case 403:s.text="Unauthorized";break;case 413:s.text="Forbidden";break;case 404:s.text="Not Found";break;case 422:s.text="Unprocessable Entity";break;case 500:s.text="Internal Server Error";break;case 504:s.text="Gateway Timeout"}if("response"in s){let e=o(s.response),a="",i="",n="";if("string"!=typeof e){if(!("view"in e)){if("title"in e&&(a=e.title),"error"===t&&200!==s.code&&this._params.alert.errors&&(n=" "+s.text+" ("+s.code+")"),a||(i+='<h4 class="vg-alert-content--title">'+n+"</h4>"),"message"in e&&(i+='<div class="vg-alert-content--message">'+e.message+"</div>"),"errors"in e&&this._params.alert.errors){let t=o(e.errors)||null;if(r(t))for(const e in t)Array.isArray(t[e])?t[e].forEach((function(e){i+="<div>"+e+"</div>"})):i="<div>"+t[e]+"</div>"}s={view:i}}}else s.view=e}}if(i)f.find(".vg-alert-content--text",i).innerHTML=s.view;else{i=document.createElement("div"),i.classList.add("vg-alert","vg-alert-"+t,"vg-alert-"+a);let e=document.createElement("div");e.classList.add("vg-alert-content");let n=document.createElement("div");n.classList.add("vg-alert-content--icon");let r=document.createElement("i");r.innerHTML=D(t),n.append(r),e.append(n);let o=document.createElement("div");o.classList.add("vg-alert-content--text"),o.innerHTML=s.view,e.append(o),i.append(e)}return i}static init(e,t={}){Nt.getOrCreateInstance(e,t).build()}}H.on(document,Pt,(function(e){if(!w.has(e.target,"data-vgformsender"))return;const t=Nt.getOrCreateInstance(e.target,{});if(t){if(t._params.validate&&!t._element.checkValidity())return e.preventDefault(),e.stopPropagation(),t._element.classList.add(t._params.classes.wasValidate),!1;if(!t._params.submit){e.preventDefault();let s=new FormData(t._element);return t.request(s,e)}}}));const jt=Nt,qt="vg.rollup",Ht="show",Dt="vg-rollup-display--none",Bt=`${qt}.hide`,Ft=`${qt}.show`,Rt=`click.${qt}.data.api`;class zt extends z{constructor(e,t={}){super(e,t),this._params=this._getParams(e,l({content:"text",offset:0,cnt:0,fade:!0,transition:!1,number:!1,height:0,ellipsis:{line:null},more:" еще ",button:{enable:!0,more:"Показать",less:"Свернуть"}},t)),this.classes={container:"vg-rollup",hidden:"vg-rollup-content--hidden",fade:"vg-rollup-content--fade",ellipsis:"vg-rollup-content--ellipsis",button:"vg-rollup-content--button",transition:"vg-rollup-content--transition"},this.total=0,this.count=0,this.offset=0,this.isOffset=!1,this._params.offset>0&&(this.offset=this._params.offset+this._params.cnt||0,this.isOffset=!0),this.build()}static get NAME(){return"rollup"}static get NAME_KEY(){return qt}static toggle(e,t){const s=zt.getOrCreateInstance(e);if(s.isShow()){let e="";if(s._params.number){let t=s.total-s.count;t>0&&(e=s._params.more+t)}t.setAttribute("aria-expanded",!1),s._element.classList.remove(Ht),t.innerHTML=s._params.button.more+e,s.switch(s._element,!0),H.trigger(s._element,Bt,{relatedTarget:t})}else s._element.classList.add(Ht),t.innerHTML=s._params.button.less,s.offset>0&&(s.isOffset?t.innerHTML=s._params.button.more:t.innerHTML=s._params.button.less),s.switch(s._element,!1),H.trigger(s._element,Ft,{relatedTarget:t})}build(e=null,t=!0){let s=this,a=e||s._element,i=a.clientHeight,n=s._params.height||i/2;a.classList.add(s.classes.container);let r=s._params.fade,o=s._params.transition,l=null!==s._params.ellipsis.line,d=s._params.button.enable,c=s._params.number;if(t||s.switch(a),i>n&&"text"===s._params.content)a.classList.add(s.classes.hidden),a.style.height=n+"px",m(),h(),u(),p();else if("elements"===s._params.content){let e=s._params.elements||"item",t=a.querySelectorAll("."+e),i=s._params.cnt||5,n=1;s.total=t.length,s.count=i;for(const e of t)n>i&&e.classList.add(Dt),n++;!0===d&&(d=n-1>i),m(),h(),u(),p()}function m(){if(l){let e=s._params.ellipsis.line;r=!1,e?(a.classList.add(s.classes.ellipsis),a.style.webkitLineClamp=e):console.log("Переменная [data-line] или параметр[line] не должны быть пустыми")}}function h(){o&&a.classList.add(s.classes.transition)}function u(){r&&a.classList.add(s.classes.fade)}function p(){if(t&&(a.setAttribute("id",a.id),d)){let e="";if(c){let t=s.total-s.count;t>0&&(e=s._params.more+t)}let t=s._params.button.more;a.insertAdjacentHTML("afterend",'<div class="'+s.classes.button+'"><a href="#" aria-expanded="false" data-vg-toggle="rollup" data-vg-target="#'+a.id+'">'+t+e+"</a></div>")}}}switch(e,t=!1){const s=this;if(t)this.build(e,!1);else if(e.classList.remove(this.classes.hidden),e.classList.remove(this.classes.ellipsis),e.classList.remove(this.classes.fade),e.removeAttribute("style"),"elements"===s._params.content){let t=s._params.elements,a=[...e.querySelectorAll("."+t)];if(a.length)if(s.offset>0){let t=s._params.elements,a=[...e.querySelectorAll("."+t)];a.slice(s.count,s.offset).forEach((e=>e.classList.remove(Dt))),s.offset=s.offset+s.settings.offset,s.offset>a.length&&(s.isOffset=!1,s.offset=0)}else a.forEach((e=>e.classList.remove(Dt)))}}isShow(){return this._element.classList.contains(Ht)}static init(e,t={},s){d(s,[zt.getOrCreateInstance(e,t)])}}H.on(document,Rt,'[data-vg-toggle="rollup"]',(function(e){const t=f.getElementFromSelector(this);t&&(["A","AREA"].includes(this.tagName)&&e.preventDefault(),i(this)||(this.setAttribute("aria-expanded",!0),zt.toggle(t,this)))}));const Yt=zt;function Xt(e){for(let t=1;t<arguments.length;t++){let s=arguments[t];for(let t in s)e[t]=s[t]}return e}const Kt=function e(t,s){function a(e,a,i){if("undefined"==typeof document)return;"number"==typeof(i=Xt({},s,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);let n="";for(let e in i)i[e]&&(n+="; "+e,!0!==i[e]&&(n+="="+i[e].split(";")[0]));return document.cookie=e+"="+t.write(a,e)+n}return Object.create({set:a,get:function(e){if("undefined"==typeof document||arguments.length&&!e)return;let s=document.cookie?document.cookie.split("; "):[],a={};for(let i=0;i<s.length;i++){let n=s[i].split("="),r=n.slice(1).join("=");try{let s=decodeURIComponent(n[0]);if(a[s]=t.read(r,s),e===s)break}catch(e){}}return e?a[e]:a},remove:function(e,t){a(e,"",Xt({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,Xt({},this.attributes,t))},withConverter:function(t){return e(Xt({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(s)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"}),Vt="vg.lawcookie",Gt="show",Wt=`${Vt}.hide`,Ut=`${Vt}.hidden`,Jt=`${Vt}.show`,Qt=`${Vt}.shown`,Zt=`click.${Vt}.data.api`;class es extends z{static sParams={};constructor(e,t={}){super(e,t),this._params=this._getParams(e,l({storage:"local",delay:500,cookie:{name:"lawCookie",value:"yes",attributes:{}},animation:{enable:!0,in:"animate__fadeInUp",out:"animate__fadeOutDown",delay:800},ajax:{route:"",target:"",method:"get"}},t)),es.sParams=this._params,this._params.animation.delay=this._params.animation.enable?this._params.animation.delay:0,this._animation(this._element,es.NAME_KEY,this._params.animation)}static get NAME(){return"lawcookie"}static get NAME_KEY(){return Vt}toggle(){return this._isShown()?this.hide():this.show()}_isShown(){return this.storage().get()}show(){i(this._element)||H.trigger(this._element,Jt,{}).defaultPrevented||(this._element.classList.add(Gt),this._queueCallback((()=>{H.trigger(this._element,Qt,{})}),this._element,!0,this._params.delay))}hide(){H.trigger(this._element,Wt).defaultPrevented||setTimeout((()=>{this._element.classList.remove(Gt),this._queueCallback((()=>H.trigger(this._element,Ut)),this._element,!0)}),this._params.animation.delay)}storage(){return this._storage={isCookie:"cookie"===this._params.storage,storage:"cookie"===this._params.storage?Kt:localStorage,name:this._params.cookie.name,value:this._params.cookie.value,attributes:this._params.cookie.attributes},this}get(){return this._storage.isCookie?this._storage.storage.get(this._storage.name):this._storage.storage.getItem(this._storage.name)}set(){this._storage.isCookie?this._storage.storage.set(this._storage.name,this._storage.value,this._storage.attributes):this._storage.storage.setItem(this._storage.name,this._storage.value)}dispose(){super.dispose()}static reset(){Kt.remove(es.sParams.cookie.name),localStorage.clear(),location.reload()}static init(e,t={}){es.getOrCreateInstance(e,t).toggle()}}B(es),H.on(document,Zt,'[data-vg-toggle="lawcookie"]',(function(e){if(["A","AREA"].includes(this.tagName)&&e.preventDefault(),i(this))return;const t=f.find("#vg-lawcookie");if(!t)return;const s=es.getOrCreateInstance(t);s.storage().set(),s.hide()})),H.on(document,Zt,'[data-vg-toggle="lawcookie-clear"]',(function(e){if(["A","AREA"].includes(this.tagName)&&e.preventDefault(),i(this))return;const t=f.find("#vg-lawcookie");t&&(es.getOrCreateInstance(t).dispose(),location.reload())}));const ts=es,ss="vg.select",as="show",is="active",ns="vg-select",rs="vg-select-dropdown",os="vg-select-list",ls="vg-select-list--option",ds="vg-select-list--optgroup",cs="vg-select-current",ms=`click.${ss}.data.api`,hs=`keyup.${ss}.data.api`,us=`reset.${ss}.data.api`,ps=`${ss}.change`,gs=`${ss}.hide`,_s=`${ss}.hidden`,fs=`${ss}.show`,vs=`${ss}.shown`,bs='[data-vg-toggle="select"]';let ws;class ys extends z{constructor(e,t={}){super(e,t),this._params=this._getParams(e,l({search:!1,placeholder:""},t)),e.parentElement.style.position="relative",this._drop=f.find("."+rs,this._element),this.refresh()}static get NAME(){return"select"}static get NAME_KEY(){return ss}static buildListOptions(e,t){let a=e.options,i=document.createElement("ul");i.classList.add(os);let n=e.querySelectorAll("optgroup");if(n.length){let e=!1;[...n].forEach((function(t){let s=document.createElement("ol");s.classList.add(ds);let a=document.createElement("li");a.innerHTML=t.label.trim(),a.classList.add("vg-select-list--optgroup-title"),s.prepend(a),r(f.findAll("option",t),s,e),i.append(s),e=!0}))}else r(a,i,!1);return t.append(i),i;function r(t,a,i){let n=0;for(const r of t){let t=document.createElement("li");t.innerHTML=r.innerHTML.trim().replace(/<\/[^>]+(>|$)/g,""),t.dataset.value=w.get(r,"value"),t.classList.add(ls),w.set(t,"data-vg-toggle","select-option");let o=w.get(r);if(!s(o))for(const e of Object.keys(o))w.set(t,"data-"+e,o[e]);n!==e.selectedIndex||i||t.classList.add("selected"),w.has(r,"disabled")&&t.classList.add("disabled"),w.has(r,"hidden")&&t.classList.add("hidden"),a.append(t),n++}}}static build(e,t){let a,i=e.dataset.placeholder||"",n=e.dataset.search||!1;if("true"===e.dataset?.inited&&!t)return;t&&ys.destroy(e),a=i&&0===e.selectedIndex?'<span class="vg-select-current--placeholder">'+i+"<span>":e.options[e.selectedIndex].innerText;let r=w.get(e,"class"),o=document.createElement("div");r=r.split(" ");for(const e of r)o.classList.add(e);w.has(e,"disabled")&&o.classList.add("disabled");let l=w.get(e);if(!s(l))for(const e of Object.keys(l))w.set(o,"data-"+e,l[e]);let d=document.createElement("div");d.classList.add(cs),w.set(d,"data-vg-toggle","select"),w.set(d,"aria-expanded","false"),d.innerHTML=a.trim(),o.append(d);let c=document.createElement("div");if(c.classList.add(rs),o.append(c),ys.buildListOptions(e,c),e.insertAdjacentElement("afterend",o),e.dataset.inited="true",n){let e=document.createElement("div");e.classList.add("vg-select-search");let t=document.createElement("input");w.set(t,"name","vg-select-search"),w.set(t,"type","text"),w.set(t,"placeholder","Поиск..."),e.append(t),c.prepend(e)}return o}toggle(e){return this._isShown()?this.hide():this.show(e)}show(e){if(!i(this._element)&&!H.trigger(this._element,fs,{relatedTarget:e}).defaultPrevented){if("ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))H.on(e,"mouseover",h);if(this._element.classList.add(as),this._params.search){let e=f.find("input",this._element);e&&e.focus()}this._queueCallback((()=>{this._element.classList.add(is),H.trigger(this._element,vs,{relatedTarget:e})}),this._drop,!0,50)}}hide(){!i(this._element)&&this._isShown()&&this._completeHide()}_completeHide(){if(H.trigger(this._element,gs,{}).defaultPrevented)return;this._element.classList.remove(is);let e=f.find(bs,this._element);if(w.set(e,"aria-expanded","false"),"ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))H.off(e,"mouseover",h);this._queueCallback((()=>{this._element.classList.remove(as),H.trigger(this._element,_s,{})}),this._drop,!0,10)}_isShown(){return this._element.classList.contains(as)}refresh(){const e=this._element.previousSibling;new MutationObserver((()=>{clearTimeout(ws),ws=setTimeout((()=>{ys.build(e,!0)}),100)})).observe(e,{attributeFilter:["disabled","required","style","hidden"],childList:!0,subtree:!0,characterDataOldValue:!0})}dispose(){super.dispose()}static destroy(e){let t=e.nextElementSibling;t&&t.classList.contains(ns)&&(t.remove(),e.selectedIndex=0,[...e.querySelectorAll("option")].forEach((function(t,s){t.hasAttribute("selected")&&(e.selectedIndex=s)})))}static hideOpenToggles(e){const t=f.findAll(".vg-select:not(.disabled):not(:disabled).show");for(const s of t){const t=ys.getInstance(s);if(!t)continue;if(e.target.closest("."+ns)===t._element)return;if(e.composedPath().includes(t._element))continue;const a={relatedTarget:t._element};"click"===e.type&&(a.clickEvent=e),t._completeHide(a)}}static clearDrops(e){2===e.button||"keyup"===e.type&&"Tab"!==e.key||ys.hideOpenToggles(e)}static changeSelector(e,t,a={}){!r(a)&&s(a)||(e.value=o(t),H.trigger(e,ps,{data:a}),H.trigger(e,"change",{data:a}))}static init(e,t={},s=!1){let a=ys.build(e);ys.getOrCreateInstance(a,t)}}H.on(document,ms,ys.clearDrops),H.on(document,ms,bs,(function(){const e=this.closest("."+ns);w.set(this,"aria-expanded",!0);const t=f.find(".vg-select.show");t&&t!==e&&ys.getInstance(t).hide(),ys.getOrCreateInstance(e).toggle(this)})),H.on(document,ms,'[data-vg-toggle="select-option"]',(function(e){let t=e.target;if(!t.classList.contains("disabled")){let e=t.closest("."+ns),s=e.querySelectorAll("."+ls);if(s.length)for(const e of s)e.classList.remove("selected");t.classList.add("selected"),e.querySelector("."+cs).innerText=t.innerText,e.classList.remove("show");let a=e.previousSibling;ys.changeSelector(a,t.dataset.value,{value:t.dataset.value,title:t.innerHTML})}})),H.on(document,hs,"[name=vg-select-search]",(function(e){let t=this,s=t?.closest("."+rs).querySelector("."+os);if(s){let e=[...s.querySelectorAll("."+ls)],a=[...s.querySelectorAll("."+ds)],i=t?.value;e=e.concat(a);for(const t of e)w.show(t);if(i.length){i=i.trim(),i=i.toLowerCase(),i=function(e){let t,s="й ц у к е н г ш щ з х ъ ф ы в а п р о л д ж э я ч с м и т ь б ю".split(/ +/g),a="q w e r t y u i o p [ ] a s d f g h j k l ; ' z x c v b n m , .".split(/ +/g);for(t=0;t<s.length;t++)e=(e=e.split(a[t]).join(s[t])).split(a[t].toUpperCase()).join(s[t].toUpperCase());return e}(i);for(const t of e)-1===t.innerText.toLowerCase().indexOf(i)&&w.hide(t)}}})),H.on(document,us,"form",(function(){f.findAll("select."+ns,this).forEach((e=>{ys.build(e,!0)}))}));const ks=ys,Ls="vg.alert",xs=`click.${Ls}.data.api`;class Es extends z{constructor(e,t={}){super(e,t),this._params=this._getParams(e,l({modal:{centered:!1,backdrop:!0,overflow:!0,keyboard:!0,animation:{enable:!1,in:"animate__rollIn",out:"animate__rollOut",delay:0}},toast:{},elements:{button:""},dialog:"modal",mode:"alert"},t))}static get NAME(){return"alert"}static get NAME_KEY(){return Ls}static run(...e){}toggle(e){}promise(e){}_build(){return"modal"===this._params.dialog?this._buildModal():"toast"===this._params.dialog?this._buildToast():void 0}_buildModal(){let e="vg-alert-"+u(),t=f.find(".vg-alert-modal");return t&&t.remove(),Et.build(e,this._params.modal,(e=>{let t=e._element;t.classList.add("vg-alert-modal");let s=f.find(".vg-modal-body",t);if(s){let e='<div class="message">'+this._params.message+"</div>";e+='<div class="buttons">',this._params.elements.button&&(e+='<a href="#" data-vg-dismiss="modal" class="btn btn-primary">'+this._params.elements.button+"</a>"),e+="</div>",s.innerHTML=e}}))}_buildToast(){}}H.on(document,xs,'[data-vg-toggle="alert"]',(function(e){})),window.alert=e=>{Es.run(e)};const As=Es,Cs="vg.toast",Ss="vg-toast-open",Ts="show",Ms=`${Cs}.hide`,Os=`${Cs}.hidden`,$s=`${Cs}.show`,Is=`${Cs}.shown`,Ps=`${Cs}.loaded`,Ns=`keydown.dismiss.${Cs}`,js=`hidePrevented.${Cs}`,qs=`click.${Cs}.data.api`;class Hs extends z{constructor(e,t={}){super(e,t),this._params=this._getParams(e,l({static:!0,placement:"bottom center",autohide:!1,delay:3e3,enableClickToast:!0,enableButtonClose:!0,keyboard:!0,theme:"dark",stack:{enable:!0,max:5},animation:{enable:!0,in:"animate__fadeIn",out:"animate__fadeOut",delay:400},ajax:{route:"",target:"",method:"get",loader:!1}},t)),this._params.animation.delay=this._params.animation.enable?this._params.animation.delay:0,this._animation(this._element,Hs.NAME_KEY,this._params.animation),this._dismissElement(),this._addEventListeners(),this._timeout=null}static get NAME(){return"toast"}static get NAME_KEY(){return Cs}static run(e,t={},s){return Hs.build(e,t,s)}static build(e,t,s){t=l({placement:"bottom center",static:!1,theme:"dark",stack:{enable:!1}},t);let a=document.createElement("div");a.classList.add("vg-toast"),a.id="vg-toast-"+u(),"theme"in t&&a.classList.add("vg-toast-"+t.theme),"placement"in t&&t.placement.split(" ").forEach((e=>a.classList.add(e)));let i=document.createElement("div");if(i.classList.add("vg-toast-wrapper"),"type"in t){let e=document.createElement("div");e.classList.add("vg-toast-icon"),i.append(e)}let n=document.createElement("div");n.classList.add("vg-toast-content");let r=document.createElement("div");if(r.classList.add("vg-toast-body"),"string"==typeof e)r.innerHTML=e,n.append(r);else if(Array.isArray(e))if(e.length>1){let t=document.createElement("div");t.classList.add("vg-toast-header"),t.innerHTML=e[0],n.append(t),r.innerHTML=e[1],n.append(r)}else r.innerHTML=e[0],n.append(r);if(i.append(n),"enableButtonClose"in t&&t.enableButtonClose){let e=document.createElement("div");e.classList.add("vg-toast-button"),e.innerHTML='<button class="vg-btn-close" data-vg-dismiss="toast"></button>',i.append(e)}a.append(i),document.body.append(a);let o=Hs.getOrCreateInstance(a,t);d(s,[o]),o.show()}toggle(e){return this._isShown()?this.hide():this.show(e)}show(e){i(this._element)||(this._clearTimeout(),this._params=this._getParams(e||{},this._params),this._route((function(e,t){H.trigger(this._element,Ps,{stats:e,data:t})})),H.trigger(this._element,$s,{relatedTarget:e}).defaultPrevented||(this._element.classList.add(Ts),document.body.classList.add(Ss),this._setPlacement(),this._queueCallback((()=>{this._element.classList.add(Ts),H.trigger(this._element,Is,{relatedTarget:e}),this._scheduleHide()}),this._element,!0,0)))}hide(){i(this._element)||H.trigger(this._element,Ms).defaultPrevented||setTimeout((()=>{this._element?.classList.remove(Ts),this._queueCallback((()=>{document.body.classList.remove(Ss),H.trigger(this._element,Os),this._params.stack.enable&&this._setPlacement(),this._params.static||this.dispose()}),this._element,!1,this._params.animation.delay)}),this._params.animation.delay)}dispose(){this._clearTimeout(),this._isShown()&&this._element.classList.remove(Ts),this._params.static||this._element.remove(),super.dispose()}_scheduleHide(){this._params.autohide&&(this._timeout=setTimeout((()=>{this.hide()}),this._params.delay))}_isShown(){return this._element.classList.contains(Ts)}_setPlacement(){let e=this._enableStack();if(this._params.stack.enable&&e.length>this._params.stack.max){let t=e.shift();Hs.getInstance(t.el).hide()}e.forEach((e=>{let t=e.el.classList.contains("top"),s=e.el.classList.contains("bottom"),a=e.el.classList.contains("left"),i=e.el.classList.contains("right"),n=e.el.classList.contains("center");t||s||n||i||a||(s=!0,n=!0),n?a?(e.el.style.left=0,e.el.style.bottom="calc(50% - ("+e.top+"px))"):i?(e.el.style.right=0,e.el.style.bottom="calc(50% - ("+e.top+"px))"):s?(e.el.style.left="calc(50% - ("+e.el.clientWidth+"px) / 2)",e.el.style.bottom=e.top+"px"):t?(e.el.style.left="calc(50% - ("+e.el.clientWidth+"px) / 2)",e.el.style.top=e.top+"px"):(e.el.style.left="calc(50% - ("+e.el.clientHeight+"px) / 2)",e.el.style.bottom="calc(50% - "+e.top+"px)"):(a&&(e.el.style.left=0),s&&(e.el.style.bottom=e.top+"px"),t&&(e.el.style.top=e.top+"px"),i&&(e.el.style.right=0))}))}_enableStack(){let e=[...f.findAll(".vg-toast.show")],t=0;return this._params.stack.enable?(e=e.map((e=>({el:e,top:e.clientHeight}))),e.map((function(e,s){return 0===s?{el:e.el,top:0}:(t+=e.top,{el:e.el,top:t})}))):(e.forEach((e=>{e!==this._element&&Hs.getInstance(e).hide()})),[{el:this._element,top:0}])}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}_addEventListeners(){H.on(document,Ns,(e=>{"Escape"===e.key&&(this._params.keyboard?this.hide():H.trigger(this._element,js))})),this._params.enableClickToast&&(this._element.classList.add("vg-toast-pointer"),H.on(document,qs,"#"+this._element.id,(()=>{this.hide()})))}}B(Hs),H.on(document,qs,'[data-vg-toggle="toast"]',(function(e){const t=f.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&e.preventDefault(),i(this)||(this.setAttribute("aria-expanded",!0),H.one(t,Os,(()=>{this.setAttribute("aria-expanded",!1)})),Hs.getOrCreateInstance(t).toggle(this))}));const Ds=Hs;class Bs extends z{constructor(e,t){super(e,t),this._params=this._getParams(e,l({mode:"table",table:{padding:0,width:0,classes:[]},paginate:{enabled:!0,stack:!0,items:10},loader:!0,ajax:{enabled:!0,route:"",target:"",method:"get",loader:!1}},t)),this.paginateCount=this._params.paginate.items,this.paginateCountSlice=0}static get NAME(){return"datatable"}static get NAME_KEY(){return"vg.datatable"}static init(e,t={}){Bs.getOrCreateInstance(e,t).build()}build(){}_setBuildMode(e={}){"table"===this._params.mode&&this._modeBuildTable(e)}_modeBuildTable(e){}_modeBuildList(e){}_modeBuildCard(e){}}const Fs=Bs,Rs=class extends z{constructor(e,t={}){super(e,t),this._params=this._getParams(e,l({speed:1500,offset:0,easing:"easeInOutSine",isState:!1,onActive:h,onClick:h,activeClass:["active"]},t)),this.isClick=!1,this.links=this._element.querySelectorAll("[data-vg-target]").length?this._element.querySelectorAll("[data-vg-target]"):this._element.querySelectorAll("a"),this.onLoad(),this.onClick(),this.onScroll()}static get NAME(){return"spy"}static get NAME_KEY(){return"vg.spy"}onLoad(){let e=this;document.addEventListener("DOMContentLoaded",(function(){e.setCurrentSection(null)}))}onClick(){let e=this;e.links.forEach((t=>{t&&(t.onclick=function(t){return d(e._params.onClick,[t,this]),e.setCurrentSection(this),!1})}))}onScroll(){let e=this;e.isClick||(window.onscroll=function(){e.setCurrentSection(null)})}setCurrentSection(e=null){if(this.removeCurrentActive(),this._params.isState){let t=window.location.hash;if(t){let s=document.querySelector('[href="'+t+'"]')||document.querySelector('[href="/'+t+'"]')||document.querySelector('[data-vg-target="'+t.replace("#","")+'"]')||null;null!==s&&(e=s)}}if(e){let a=this.attributes(e,"target"),i=this.attributes(e,"offset"),n=document.getElementById(a);if(n){let r=n.offsetTop+i+this._params.offset,o=window.scrollY||document.documentElement.scrollTop,l=this._params.speed,d=this._params.easing,c=0;this.removeCurrentActive(),this.setActive(e,n);let m=Math.max(.1,Math.min(Math.abs(o-r)/l,.8)),h={easeOutSine:function(e){return Math.sin(e*(Math.PI/2))},easeInOutSine:function(e){return-.5*(Math.cos(Math.PI*e)-1)},easeInOutQuint:function(e){return(e/=.5)<1?.5*Math.pow(e,5):.5*(Math.pow(e-2,5)+2)}};function u(){c+=1/60;let e=c/m,t=h[d](e);e<1?(requestAnimFrame(u),window.scrollTo(0,o+(r-o)*t)):window.scrollTo(0,r)}window.requestAnimFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)},u(),this.isClick=!1}}else for(let p=0;p<this.links.length;p++){let g=this.attributes(this.links[p],"target"),_=this.attributes(this.links[p],"offset"),f=document.getElementById(g);if(f){let v=f.offsetTop+_+this._params.offset,b=v+f.offsetHeight,w=document.documentElement.scrollTop||document.body.scrollTop;w>=v&&w<b&&(this.removeCurrentActive({ignore:this.links[p]}),this.setActive(this.links[p],f))}}}setActive(e,t){const s=this._params.activeClass.every((function(t){return e.classList.contains(t)}));if(this._params.isState){let t=this.attributes(e,"text"),s=this.attributes(e,"target");history.pushState("",document.title+t,"#"+s)}s||(t&&t.classList.add(...this._params.activeClass),e&&e.classList.add(...this._params.activeClass),d(this._params.onActive,[e,t]))}removeCurrentActive(e={ignore:null}){for(let t=0;t<this.links.length;t++){let s=this.attributes(this.links[t],"target"),a=document.getElementById(s);e.ignore!==this.links[t]&&a&&(this.links[t].classList.remove(...this._params.activeClass),a.classList.remove(...this._params.activeClass))}}attributes(e,t=""){let s=e.getAttribute("href")||e.dataset.vgTarget;"undefined"!==s&&-1!==s.indexOf("#")?(s=s.replace(/(^.+)#/gm,""),-1!==s.indexOf("#")&&(s=s.replace("#",""))):"undefined"!==s&&-1===s.indexOf("#")&&(s="");let a=e.dataset.vgOffset?parseInt(e.dataset.vgOffset):0,i=e.innerHTML;return"target"===t?s:"offset"===t?a:"text"===t?i:{target:s,offset:a,text:i}}};vg=t})();
|
|
3
3
|
//# sourceMappingURL=vgapp.js.map
|