bootstrap-italia
Version:
Bootstrap Italia è un tema Bootstrap 5 per la creazione di applicazioni web nel pieno rispetto delle linee guida di design per i siti internet e i servizi digitali della PA
1 lines • 253 kB
JavaScript
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@splidejs/splide"),require("@popperjs/core"),require("video.js"),require("animejs/lib/anime.es.js")):"function"==typeof define&&define.amd?define(["@splidejs/splide","@popperjs/core","video.js","animejs/lib/anime.es.js"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap=e(t.Splide,t.Popper,t.videojs,t.anime)}(this,(function(t,e,i,n){"use strict";function s(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const i in t)if("default"!==i){const n=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,n.get?n:{enumerable:!0,get:()=>t[i]})}return e.default=t,Object.freeze(e)}const o=s(e);!function(){const t={NODE_ENV:"production"};try{if(process)return process.env=Object.assign({},process.env),void Object.assign(process.env,t)}catch(t){}globalThis.process={env:t}}();const r="data-focus-mouse";class a{constructor(){this._usingMouse=!1,this._bindEvents()}_bindEvents(){if("undefined"==typeof document)return;["keydown","mousedown"].forEach((t=>{document.addEventListener(t,(t=>{this._usingMouse="mousedown"===t.type}))})),document.addEventListener("focusin",(t=>{this._usingMouse&&t.target&&t.target.setAttribute(r,!0)})),document.addEventListener("focusout",(t=>{t.target&&t.target.setAttribute(r,!1)}))}}new a;const l=()=>{"undefined"==typeof window||window.BOOTSTRAP_ITALIA_VERSION||(new a,window.BOOTSTRAP_ITALIA_VERSION="2.14.0")};l();const c={ck3:{}},u={rememberChoice:(t,e)=>{c.ck3[t]=e,localStorage.setItem("bs-ck3",JSON.stringify(c.ck3))},isChoiceRemembered:t=>(c.ck3=JSON.parse(localStorage.getItem("bs-ck3")||"{}"),c.ck3[t]||!1),clearAllRememberedChoices:()=>{localStorage.removeItem("bs-ck3")}},h=new Map,d={set(t,e,i){h.has(t)||h.set(t,new Map);const n=h.get(t);n.has(e)||0===n.size?n.set(e,i):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(n.keys())[0]}.`)},get:(t,e)=>h.has(t)&&h.get(t).get(e)||null,remove(t,e){if(!h.has(t))return;const i=h.get(t);i.delete(e),0===i.size&&h.delete(t)}},f="transitionend",p=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let i=t.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i=`#${i.split("#")[1]}`),e=i&&"#"!==i?i.trim():null}return e},m=t=>{const e=p(t);return e&&document.querySelector(e)?e:null},g=t=>{const e=p(t);return e?document.querySelector(e):null},_=t=>!(!t||"object"!=typeof t)&&void 0!==t.nodeType,b=t=>_(t)?t:"string"==typeof t&&t.length>0?document.querySelector(t):null,v=t=>{if(!_(t)||0===t.getClientRects().length)return!1;const e="visible"===getComputedStyle(t).getPropertyValue("visibility"),i=t.closest("details:not([open])");if(!i)return e;if(i!==t){const e=t.closest("summary");if(e&&e.parentNode!==i)return!1;if(null===e)return!1}return e},y=t=>!t||t.nodeType!==Node.ELEMENT_NODE||(!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled"))),w=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?w(t.parentNode):null},E=()=>{},C=t=>{t.offsetHeight},S=()=>"undefined"!=typeof window&&"undefined"!=typeof document&&"rtl"===document.documentElement.dir,k=t=>{"function"==typeof t&&t()},x=(t,e,i=!0)=>{if(!i)return void k(t);const n=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:i}=window.getComputedStyle(t);const n=Number.parseFloat(e),s=Number.parseFloat(i);return n||s?(e=e.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(i))):0})(e)+5;let s=!1;const o=({target:i})=>{i===e&&(s=!0,e.removeEventListener(f,o),k(t))};e.addEventListener(f,o),setTimeout((()=>{s||e.dispatchEvent(new Event(f))}),n)},T=(t,e,i,n)=>{const s=t.length;let o=t.indexOf(e);return-1===o?!i&&n?t[s-1]:t[0]:(o+=i?1:-1,n&&(o=(o+s)%s),t[Math.max(0,Math.min(o,s-1))])},A=/[^.]*(?=\..*)\.|.*/,O=/\..*/,L=/::\d+$/,I={};let P=1;const M={mouseenter:"mouseover",mouseleave:"mouseout"},F=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function $(t,e){return e&&`${e}::${P++}`||t.uidEvent||P++}function j(t){const e=$(t);return t.uidEvent=e,I[e]=I[e]||{},I[e]}function N(t,e,i=null){return Object.values(t).find((t=>t.callable===e&&t.delegationSelector===i))}function D(t,e,i){const n="string"==typeof e,s=n?i:e||i;let o=(r=(r=t).replace(O,""),M[r]||r);var r;return F.has(o)||(o=t),[n,s,o]}function R(t,e,i,n,s){if("string"!=typeof e||!t)return;let[o,r,a]=D(e,i,n);if(e in M){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};r=t(r)}const l=j(t),c=l[a]||(l[a]={}),u=N(c,r,o?i:null);if(u)return void(u.oneOff=u.oneOff&&s);const h=$(r,e.replace(A,"")),d=o?function(t,e,i){return function n(s){const o=t.querySelectorAll(e);for(let{target:r}=s;r&&r!==this;r=r.parentNode)for(const a of o)if(a===r)return W(s,{delegateTarget:r}),n.oneOff&&z.off(t,s.type,e,i),i.apply(r,[s])}}(t,i,r):function(t,e){return function i(n){return W(n,{delegateTarget:t}),i.oneOff&&z.off(t,n.type,e),e.apply(t,[n])}}(t,r);d.delegationSelector=o?i:null,d.callable=r,d.oneOff=s,d.uidEvent=h,c[h]=d,t.addEventListener(a,d,o)}function B(t,e,i,n,s){const o=N(e[i],n,s);o&&(t.removeEventListener(i,o,Boolean(s)),delete e[i][o.uidEvent])}function V(t,e,i,n){const s=e[i]||{};for(const o of Object.keys(s))if(o.includes(n)){const n=s[o];B(t,e,i,n.callable,n.delegationSelector)}}const z={on(t,e,i,n){R(t,e,i,n,!1)},one(t,e,i,n){R(t,e,i,n,!0)},off(t,e,i,n){if("string"!=typeof e||!t)return;const[s,o,r]=D(e,i,n),a=r!==e,l=j(t),c=l[r]||{},u=e.startsWith(".");if(void 0===o){if(u)for(const i of Object.keys(l))V(t,l,i,e.slice(1));for(const i of Object.keys(c)){const n=i.replace(L,"");if(!a||e.includes(n)){const e=c[i];B(t,l,r,e.callable,e.delegationSelector)}}}else{if(!Object.keys(c).length)return;B(t,l,r,o,s?i:null)}},trigger(t,e,i){if("string"!=typeof e||!t)return null;let n=new Event(e,{bubbles:!0,cancelable:!0});return n=W(n,i),t.dispatchEvent(n),n}};function W(t,e){for(const[i,n]of Object.entries(e||{}))try{t[i]=n}catch{Object.defineProperty(t,i,{configurable:!0,get:()=>n})}return t}function q(t){if("true"===t)return!0;if("false"===t)return!1;if(t===Number(t).toString())return Number(t);if(""===t||"null"===t)return null;if("string"!=typeof t)return t;try{return JSON.parse(decodeURIComponent(t))}catch{return t}}function H(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}const U={setDataAttribute(t,e,i){t.setAttribute(`data-bs-${H(e)}`,i)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${H(e)}`)},getDataAttributes(t){if(!t)return{};const e={},i=Object.keys(t.dataset).filter((t=>t.startsWith("bs")&&!t.startsWith("bsConfig")));for(const n of i){let i=n.replace(/^bs/,"");i=i.charAt(0).toLowerCase()+i.slice(1,i.length),e[i]=q(t.dataset[n])}return e},getDataAttribute:(t,e)=>q(t.getAttribute(`data-bs-${H(e)}`))};class G{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,e){const i=_(e)?U.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"==typeof i?i:{},..._(e)?U.getDataAttributes(e):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const n of Object.keys(e)){const s=e[n],o=t[n],r=_(o)?"element":null==(i=o)?`${i}`:Object.prototype.toString.call(i).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(s).test(r))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${n}" provided type "${r}" but expected type "${s}".`)}var i}}class K extends G{constructor(t,e){super(),(t=b(t))&&(this._element=t,this._config=this._getConfig(e),d.set(this._element,this.constructor.DATA_KEY,this))}dispose(){d.remove(this._element,this.constructor.DATA_KEY),z.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,i=!0){x(t,e,i)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return d.get(b(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return"5.2.3"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const Y={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter((t=>t.matches(e))),parents(t,e){const i=[];let n=t.parentNode.closest(e);for(;n;)i.push(n),n=n.parentNode.closest(e);return i},prev(t,e){let i=t.previousElementSibling;for(;i;){if(i.matches(e))return[i];i=i.previousElementSibling}return[]},next(t,e){let i=t.nextElementSibling;for(;i;){if(i.matches(e))return[i];i=i.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((t=>`${t}:not([tabindex^="-"])`)).join(",");return this.find(e,t).filter((t=>!y(t)&&v(t)))}},Q={slideFocus:!1,rewind:!0,perMove:1,i18n:{prev:"Slide precedente",next:"Slide successiva",first:"Vai alla prima slide",last:"Vai all’ultima slide",slideX:"Vai alla slide %s",pageX:"Vai a pagina %s",play:"Attiva autoplay",pause:"Pausa autoplay",carousel:"Carosello",select:"Seleziona una slide da mostrare",slide:"slide",slideLabel:"%s di %s"}},X={"it-carousel-landscape-abstract-three-cols":{type:"slide",perPage:3,gap:24,padding:{left:0,right:0},arrows:!1,breakpoints:{768:{perPage:1,gap:24,padding:{left:0,right:0},arrows:!1},992:{perPage:2,gap:24,padding:{left:40,right:40},arrows:!1}}},"it-carousel-landscape-abstract-three-cols-arrow-visible":{type:"slide",perPage:3,gap:24,padding:{left:0,right:0},arrows:!0,breakpoints:{768:{perPage:1,gap:24,padding:{left:40,right:40},arrows:!0},992:{perPage:2,gap:24,padding:{left:40,right:40},arrows:!0}}},"it-big-img":{type:"loop",perPage:1,gap:48,padding:{left:320,right:320},arrows:!1,breakpoints:{768:{perPage:1,gap:0,padding:{left:0,right:0},arrows:!1},992:{perPage:1,gap:24,padding:{left:160,right:160},arrows:!1}}},"it-standard-image":{type:"loop",perPage:3,gap:24,padding:{left:48,right:48},arrows:!1,breakpoints:{768:{perPage:1,gap:24,padding:{left:40,right:40},arrows:!1},992:{perPage:2,gap:24,padding:{left:48,right:48},arrows:!1}}},"it-carousel-landscape-abstract":{type:"slide",perPage:1,gap:24,padding:{left:0,right:0},arrows:!1,breakpoints:{768:{perPage:1,gap:24,padding:{left:0,right:0},arrows:!1},992:{perPage:1,gap:24,padding:{left:24,right:24},arrows:!1}}},"it-calendar-wrapper":{type:"slide",perPage:4,gap:0,padding:{left:0,right:0},arrows:!1,breakpoints:{560:{perPage:1,gap:0,padding:{left:24,right:24},arrows:!1},768:{perPage:2,gap:0,padding:{left:0,right:0},arrows:!1},992:{perPage:3,gap:0,padding:{left:0,right:0},arrows:!1}}}};class Z extends K{constructor(e){super(e),this._config=this._getConfig(),this._splide=new t(this._element,this._config),this._init()}dispose(){this._splide.destroy(),super.dispose()}static get NAME(){return"carousel"}_init(){this._splide.mount()}_getConfig(){let t=Object.assign({},Q);return Object.keys(X).forEach((e=>{this._element.classList.contains(e)&&(t=Object.assign({},t,X[e]))})),t}}"undefined"!=typeof window&&"undefined"!=typeof document&&z.on(window,"load.bs.carousel.data-api",(()=>{Y.find("[data-bs-carousel-splide]").forEach((t=>{Z.getOrCreateInstance(t)}))}));const J=".bs.inputlabel",tt=`focus${J}`,et=`blur${J}`,it=`change${J}`,nt="active";class st{constructor(t){this._element=t,this._init()}static get NAME(){return"inputlabel"}static getInputFromLabel=t=>{if("undefined"!=typeof window&&"undefined"!=typeof document)return document.querySelector("#"+CSS.escape(t.getAttribute("for")))};_init(){const t=this._getLabel();t&&!t.classList.contains(nt)&&(this._labelOut(),this._labelOver()),t&&null===t.getAttribute("it-bs-static")&&this._bindEvents()}_bindEvents(){["date","time"].includes(this._element.getAttribute("type"))||("file"===this._element.getAttribute("type")?z.on(this._element,et,(()=>{this._labelOut()})):(z.on(this._element,tt,(()=>{this._labelOut()})),z.on(this._element,et,(()=>{this._labelOver()})),z.on(this._element,it,(()=>{this._labelToggle()}))))}_getLabel(){return Y.findOne('label[for="'+this._element.getAttribute("id")+'"]')}_isEmpty(){return"number"===this._element.getAttribute("type")?!this._element.value&&!this._element.getAttribute("placeholder")&&!this._element.validity.badInput:!this._element.value&&!this._element.getAttribute("placeholder")}_labelOut(){const t=this._getLabel();t&&t.classList.add(nt)}_labelOver(){if(this._isEmpty()){const t=this._getLabel();t&&t.classList.remove(nt)}}_labelToggle(){this._isEmpty()?this._labelOver():this._labelOut()}}const ot=".bs.inputnumber",rt=`click${ot}`,at=`change${ot}`,lt=`click${ot}.data-api`,ct=".input-number",ut='input[data-bs-input][type="number"]',ht='button[class^="input-number-"]';class dt extends K{constructor(t){super(t),this._wrapperElement=this._element.closest(ct),this._label=new st(t),this._init(),this._bindEvents()}static get NAME(){return"inputnumber"}_init(){this._wrapperElement&&this._inputResize()}_bindEvents(){this._wrapperElement&&(Y.find(ht,this._wrapperElement).forEach((t=>{z.on(t,rt,(e=>{e.preventDefault(),this._incrDecr(t.classList.contains("input-number-sub")),this._label._labelOut()}))})),z.on(this._element,at,(()=>this._checkLimit())))}_inputResize(){if(this._wrapperElement.classList.contains("input-number-adaptive")){let t=null;t="calc(70px + "+this._element.value.length+"ch)",t&&(this._element.style.width=t)}}_incrDecr(t){let e=0;if(!this._element.disabled&&!this._element.readonly&&(""!==this._element.value&&(e=parseFloat(this._element.value)),!isNaN(e))){let i=parseFloat(this._element.getAttribute("step"));i||(i=1),this._element.value=e+i*(t?-1:1),z.trigger(this._element,at),z.trigger(this._element,"input")}}_checkLimit(){const t=parseFloat(this._element.value);if(!isNaN(t)){let e=t;const i=parseFloat(this._element.getAttribute("max")),n=parseFloat(this._element.getAttribute("min"));n&&t<n&&(e=n),i&&t>i&&(e=i),this._element.value=e}this._inputResize()}}"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("DOMContentLoaded",(function(){document.querySelectorAll(ut+", label").forEach((function(t){const e=st.getInputFromLabel(t)||t;var i;(i=e)&&i.matches(ut)&&i.parentNode.querySelector(ht)&&dt.getOrCreateInstance(i)}))})),z.on(document,lt,ht,(function(){const t=this.closest(ct);if(t){const e=Y.findOne(ut,t);e&&dt.getOrCreateInstance(e)}})));const ft="show";class pt extends K{constructor(t){super(t),this._isShown=!t.matches("[aria-hidden=true]"),this._isTransitioning=!1}static get NAME(){return"dimmer"}show(){this._isShown||this._isTransitioning||(this._isShown=!0,this._isAnimated()&&(this._isTransitioning=!0),this._showElement())}hide(){if(!this._isShown||this._isTransitioning)return;this._isShown=!1;const t=this._isAnimated();t&&(this._isTransitioning=!0),this._element.classList.remove(ft),this._queueCallback((()=>this._hideElement()),this._element,t)}_isAnimated(){return this._element.classList.contains("fade")}_showElement(){const t=this._isAnimated();this._element.removeAttribute("aria-hidden"),t&&C(this._element),this._element.classList.add(ft);this._queueCallback((()=>{this._isTransitioning=!1}),this._element,t)}_hideElement(){this._element.setAttribute("aria-hidden",!0),this._isTransitioning=!1}}"undefined"!=typeof window&&"undefined"!=typeof document&&z.on(document,"click.bs.dimmer.data-api",'[data-bs-toggle="dimmer"]',(function(){const t=g(this),e=pt.getOrCreateInstance(t);this.checked?e.show():e.hide()}));const mt=(t,e="hide")=>{const i=`click.dismiss${t.EVENT_KEY}`,n=t.NAME;z.on(document,i,`[data-bs-dismiss="${n}"]`,(function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),y(this))return;const s=g(this)||this.closest(`.${n}`);t.getOrCreateInstance(s)[e]()}))},gt=".bs.notification",_t=`click${gt}.data-api`,bt=`hidden${gt}`,vt=`show${gt}`,yt={timeout:0},wt="show";class Et extends K{constructor(t,e){super(t),this._config=this._getConfig(e),this._isShown=this._element.classList.contains(wt),this._isTransitioning=!1,this._toId=null}static get NAME(){return"notification"}show(t,e){if(this._isShown||this._isTransitioning)return;const i=t||this._getElementTimeout(e);this._isShown=!0,this._isAnimated()&&(this._isTransitioning=!0),this._showElement(i)}hide(){if(!this._isShown||this._isTransitioning)return;this._isShown=!1;const t=this._isAnimated();t&&(this._isTransitioning=!0),this._element.classList.remove(wt),this._queueCallback((()=>this._hideElement()),this._element,t)}toggle(t){this._isShown?this.hide():this.show(null,t)}_isAnimated(){return this._element.classList.contains("fade")}_showElement(t){const e=this._isAnimated();this._element.style.display="block",this._element.removeAttribute("aria-hidden"),e&&C(this._element),this._element.classList.add(wt);this._queueCallback((()=>{this._isTransitioning=!1,t&&this._setTimeout(t,(()=>this.hide()))}),this._element,e)}_hideElement(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._isTransitioning=!1}_getConfig(t){return t={...yt,...U.getDataAttributes(this._element),..."object"==typeof t?t:{}}}_getElementTimeout(t){const e=t?parseInt(t.getAttribute("data-bs-timeout")):null;return e>0?e:this._config.timeout}_setTimeout(t,e){this._clearTimeout(),setTimeout(e,t)}_clearTimeout(){this._toId&&(clearTimeout(this._toId),this._toId=null)}}"undefined"!=typeof window&&"undefined"!=typeof document&&(z.on(document,_t,'[data-bs-toggle="notification"]',(function(t){const e=g(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),z.one(e,vt,(t=>{t.defaultPrevented||z.one(e,bt,(()=>{v(this)&&this.focus()}))}));Et.getOrCreateInstance(e).toggle(this)})),mt(Et));const Ct="cookiebar",St=".bs.cookiebar",kt=".data-api",xt="cookies_consent",Tt=`close${St}`,At=`closed${St}`,Ot=`load${St}${kt}`,Lt=`click${St}${kt}`,It="show";class Pt extends K{constructor(t){super(t),this._isShown=this._element.classList.contains(It),this._isTransitioning=!1}static get NAME(){return Ct}static get VERSION(){return"5.0.0"}show(){this._isShown||this._isTransitioning||(this._isShown=!0,this._isAnimated()&&(this._isTransitioning=!0),this._showElement())}hide(){if(!this._isShown||this._isTransitioning)return;this._isShown=!1;const t=this._isAnimated();t&&(this._isTransitioning=!0),this._element.classList.remove(It),this._queueCallback((()=>this._hideElement()),this._element,t)}accept(t){t=t||this._element;const e=this._getRootElement(t);this._triggerCloseEvent(e).defaultPrevented||(this._setCookieEU(),this.hide())}static clearCookie(){"undefined"!=typeof document&&(document.cookie=xt+"=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;")}_isAnimated(){return this._element.classList.contains("fade")}_showElement(){const t=this._isAnimated();this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-live","polite"),t&&C(this._element),this._element.classList.add(It);this._queueCallback((()=>{this._isTransitioning=!1}),this._element,t)}_hideElement(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-live"),this._isTransitioning=!1}_setCookieEU(){var t=new Date;t.setDate(t.getDate()+30);var e=escape("true")+"; expires="+t.toUTCString();"undefined"!=typeof document&&(document.cookie=xt+"="+e+"; path=/; SameSite=Strict")}_getRootElement(t){const e=g(t);let i=null;return e&&(i=e),i||(i=t.closest(".cookiebar")),i}_triggerCloseEvent(t){return z.trigger(t,Tt)}_removeElement(t){t.classList.remove(It),t.setAttribute("aria-hidden","true"),t.setAttribute("aria-live","off"),z.trigger(t,At),this.dispose()}static _handleAccept(t){return function(e){e&&e.preventDefault(),t.close(this)}}static _handleConsent(t){return function(e){e&&e.preventDefault(),t.close(this)}}static _getCookieEU(){if("undefined"!=typeof document){var t,e,i,n=document.cookie.split(";");for(t=0;t<n.length;t++)if(e=n[t].substring(0,n[t].indexOf("=")),i=n[t].substring(n[t].indexOf("=")+1),(e=e.replace(/^\s+|\s+$/g,""))==xt)return unescape(i)}}}"undefined"!=typeof window&&"undefined"!=typeof document&&(z.on(document,Lt,'[data-bs-accept="cookiebar"]',(function(t){if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),y(this))return;const e=g(this)||this.closest(`.${Ct}`);Pt.getOrCreateInstance(e).accept()})),z.on(window,Ot,(function(){if(!Pt._getCookieEU()){if("undefined"==typeof document)return;document.querySelectorAll(".cookiebar").forEach((t=>{Pt.getOrCreateInstance(t).show()}))}})));const Mt=()=>{if("undefined"!=typeof window)return window.matchMedia("(max-width: 991px)").matches},Ft=(t,e)=>{let i=null;return e.forEach(((e,n)=>{e===t&&(i=n)})),i},$t=(t,e,i)=>{i={isDirectionTop:!1,isLimit:!1,loop:!1,..."object"==typeof i?i:{}};const n=Ft(t,e);let s=null;if(i.isLimit&&i.isDirectionTop&&n>0)s=e[0];else if(i.isLimit&&n<e.length-1)s=e[e.length-1];else if(i.isDirectionTop){if(!i.loop&&0===n)return;s=e[0===n?e.length-1:n-1]}else{if(!i.loop&&n===e.length-1)return;s=e[n===e.length-1?0:n+1]}s&&s.focus()},jt="pagescroll-scroll-disabled";let Nt=!1,Dt="undefined"==typeof document?0:document.scrollingElement?document.scrollingElement.scrollTop:0;const Rt="undefined"==typeof document?null:document.querySelector("html");"undefined"!=typeof document&&document.addEventListener("scroll",(()=>{Nt&&(document.scrollingElement.scrollTop=Dt)}));const Bt=".bs.navbarcollapsible",Vt=`click${Bt}.data-api`,zt=`click${Bt}`,Wt=`keyup${Bt}`,qt=`keydown${Bt}`,Ht=`hide${Bt}`,Ut=`hidden${Bt}`,Gt=`show${Bt}`,Kt=`shown${Bt}`,Yt=`resize${Bt}`,Qt="show",Xt="expanded",Zt=".close-menu",Jt=".nav-link",te=".nav-item .list-item",ee=".it-heading-link",ie=".it-footer-link";class ne extends K{constructor(t){super(t),this._isShown=this._element.classList.contains(Xt),this._isTransitioning=!1,this._isMobile=Mt(),this._isKeyShift=!1,this._currItemIdx=0,this._btnClose=Y.findOne(".close-div button",this._element),this._btnBack=Y.findOne(".it-back-button",this._element),this._menuWrapper=Y.findOne(".menu-wrapper",this._element),this._overlay=null,this._setOverlay(),this._menuItems=Y.find([Jt,te,ee,ie,Zt].join(","),this._element),this._bindEvents()}static get NAME(){return"navbarcollapsible"}show(t){if(this._isShown||this._isTransitioning)return;z.trigger(this._element,Gt,{relatedTarget:t}).defaultPrevented||(this._btnBack&&this._btnBack.classList.add(Qt),this._isShown=!0,"undefined"!=typeof document&&(Nt=!0,Dt=document.scrollingElement.scrollTop,Rt.classList.add(jt)),this._showElement())}hide(){if(!this._isShown||this._isTransitioning)return;if(z.trigger(this._element,Ht).defaultPrevented)return;this._isShown=!1;const t=this._isAnimated();t&&(this._isTransitioning=!0),this._btnBack&&this._btnBack.classList.remove(Qt),this._overlay&&this._overlay.classList.remove(Qt),this._element.classList.remove(Xt),"undefined"!=typeof document&&(Nt=!1,Rt.classList.remove(jt)),this._queueCallback((()=>this._hideElement()),this._menuWrapper,t)}toggle(t){this._isShown?this.hide():this.show(t)}dispose(){"undefined"!=typeof window&&"undefined"!=typeof document&&(z.off(window,Yt),super.dispose())}_bindEvents(){"undefined"!=typeof window&&"undefined"!=typeof document&&(z.on(window,Yt,(()=>this._onResize())),this._overlay&&z.on(this._overlay,zt,(()=>this.hide())),z.on(this._btnClose,zt,(t=>{t.preventDefault(),this.hide()})),z.on(this._btnBack,zt,(t=>{t.preventDefault(),this.hide()})),this._menuItems.forEach((t=>{z.on(t,qt,(t=>this._isMobile&&this._onMenuItemKeyDown(t))),z.on(t,Wt,(t=>this._isMobile&&this._onMenuItemKeyUp(t))),z.on(t,zt,(t=>this._isMobile&&this._onMenuItemClick(t)))})))}_onResize(){this._isMobile=Mt()}_onMenuItemKeyUp(t){"Shift"===t.key&&(this._isKeyShift=!1)}_onMenuItemKeyDown(t){"Shift"===t.key&&(this._isKeyShift=!0),"Tab"===t.key&&(t.preventDefault(),this._focusNext())}_onMenuItemClick(t){this.currItemIdx=Ft(t.currentTarget,this._menuItems)}_isAnimated(){return!0}_isElementHidden(t){return null===t.offsetParent}_showElement(){const t=this._isAnimated();this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-expanded",!0),this._overlay&&(this._overlay.style.display="block"),t&&C(this._element),this._element.classList.add(Xt),this._overlay&&this._overlay.classList.add(Qt);this._queueCallback((()=>{this._isTransitioning=!1;const t=this._getNextVisibleItem(0);t.item&&(t.item.focus(),this._currItemIdx=t.index),z.trigger(this._element,Kt)}),this._menuWrapper,t)}_hideElement(){this._overlay&&(this._overlay.style.display="none"),this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-expanded"),this._isTransitioning=!1,z.trigger(this._element,Ut)}_setOverlay(){this._overlay=Y.findOne(".overlay",this._element),this._isAnimated&&this._overlay.classList.add("fade")}_focusNext(){let t=this._currItemIdx+(this._isKeyShift?-1:1);t<0?t=this._menuItems.length-1:t>=this._menuItems.length&&(t=0);const e=this._getNextVisibleItem(t,this._isKeyShift);e.item&&(e.item.focus(),this._currItemIdx=e.index)}_getNextVisibleItem(t,e){let i=null,n=null,s=t,o=e?-1:1,r=!1;for(;!(i||s==t&&r);)s==t&&(r=!0),this._isElementHidden(this._menuItems[s])||(i=this._menuItems[s],n=s),s+=o,s<0?s=this._menuItems.length-1:s>=this._menuItems.length&&(s=0);return{item:i,index:n}}}"undefined"!=typeof window&&"undefined"!=typeof document&&z.on(document,Vt,'[data-bs-toggle="navbarcollapsible"]',(function(t){const e=g(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),z.one(e,Gt,(t=>{t.defaultPrevented||z.one(e,Ut,(()=>{v(this)&&this.focus()}))}));ne.getOrCreateInstance(e).toggle(this)}));const se=".bs.accordion",oe=`keydown${se}`,re=`keydown${se}.data-api`,ae='.accordion-item > .accordion-header [data-bs-toggle="collapse"]';class le extends K{constructor(t){super(t),this._bindEvents()}static get NAME(){return"accordion"}handleKeyDown(t,e,i){const n={ArrowDown:t=>this._focusNext(t),ArrowUp:t=>this._focusPrev(t),Home:t=>this._focusFirst(t),End:t=>this._focusLast(t)};"function"==typeof n[t]&&(i&&i.preventDefault(),n[t](e))}_bindEvents(){Y.find(ae,this._element).forEach((t=>{z.on(t,oe,(t=>{this.handleKeyDown(t.key,t.currentTarget,t)}))}))}_getHeadButtons(){return Y.find(":scope > "+ae,this._element)}_focusNext(t){$t(t,this._getHeadButtons(),{loop:!0})}_focusPrev(t){$t(t,this._getHeadButtons(),{isDirectionTop:!0,loop:!0})}_focusFirst(t){$t(t,this._getHeadButtons(),{isDirectionTop:!0,isLimit:!0})}_focusLast(t){$t(t,this._getHeadButtons(),{isLimit:!0})}}var ce;"undefined"!=typeof window&&"undefined"!=typeof document&&z.on(document,re,ae,(function(t){const e=this.closest(".accordion");if(e){le.getOrCreateInstance(e).handleKeyDown(t.key,this,t)}}));var ue=new Uint8Array(16);function he(){if(!ce&&!(ce="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ce(ue)}const de=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var fe=[],pe=0;pe<256;++pe)fe.push((pe+256).toString(16).substr(1));function me(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=(fe[t[e+0]]+fe[t[e+1]]+fe[t[e+2]]+fe[t[e+3]]+"-"+fe[t[e+4]]+fe[t[e+5]]+"-"+fe[t[e+6]]+fe[t[e+7]]+"-"+fe[t[e+8]]+fe[t[e+9]]+"-"+fe[t[e+10]]+fe[t[e+11]]+fe[t[e+12]]+fe[t[e+13]]+fe[t[e+14]]+fe[t[e+15]]).toLowerCase();if(!function(t){return"string"==typeof t&&de.test(t)}(i))throw TypeError("Stringified UUID is invalid");return i}function ge(t,e,i){var n=(t=t||{}).random||(t.rng||he)();return n[6]=15&n[6]|64,n[8]=63&n[8]|128,me(n)}let _e=!1,be=[];class ve{constructor(t,e){this.id=t,this._callback=e}dispose(){ye(this.id)}_execute(t){this._callback(t)}}const ye=t=>{be=be.filter((e=>e.id!==t))},we=t=>{if("undefined"!=typeof document){if(be.length||"undefined"!=typeof window&&"undefined"!=typeof document&&document.addEventListener("scroll",(t=>{_e||(window.requestAnimationFrame((()=>{be.forEach((e=>e.cb._execute(t))),_e=!1})),_e=!0)})),"function"==typeof t){const e=new ve(ge(),t);return be.push({id:e.id,cb:e}),e}return console.error("[onDocumentScroll] the provided data has to be of type function"),null}},Ee={duration:800,easing:"easeInOutSine"},Ce=(t,e)=>{if("undefined"==typeof window||"undefined"==typeof document)return;const i=("object"==typeof e?e:{}).complete,s=window.document.scrollingElement||window.document.body||window.document.documentElement,o=s.style.scrollBehavior;e={scrollTop:t||0,...Ee,..."object"==typeof e?e:{}},s.style.scrollBehavior="auto",e.complete=t=>{s.style.scrollBehavior=o,"function"==typeof i&&i(t)},n({targets:s,...e})},Se="active",ke="ul.link-list",xe="a.nav-link",Te=`${xe}.${Se}`,Ae=`${xe}[href^="#"]`,Oe={scrollPadding:10,duration:800,easing:"easeInOutSine"};class Le extends K{constructor(t,e){super(t),this._config=this._getConfig(e),this._togglerElement=Y.findOne(".custom-navbar-toggler",this._element),this._sectionContainer=Y.findOne(".it-page-sections-container"),this._collapsible=this._getCollapsible(),this._isCollapseOpened=!1,this._callbackQueue=[],this._scrollCb=null,this._bindEvents()}static get NAME(){return"navscroll"}setScrollPadding(t){this._config.scrollPadding=t}dispose(){this._scrollCb&&this._scrollCb.dispose(),super.dispose()}_getConfig(t){return t={...Oe,...U.getDataAttributes(this._element),..."object"==typeof t?t:{}}}_bindEvents(){this._scrollCb=we((()=>this._onScroll())),this._collapsible&&(z.on(this._collapsible._element,"shown.bs.navbarcollapsible",(()=>this._onCollapseOpened())),z.on(this._collapsible._element,"hidden.bs.navbarcollapsible",(()=>this._onCollapseClosed()))),Y.find(Ae,this._element).forEach((t=>{t.addEventListener("click",(()=>{const e=()=>this._scrollToHash(t.hash);this._isCollapseOpened?(this._callbackQueue.push(e),this._collapsible.hide()):e()}))})),"undefined"!=typeof window&&"undefined"!=typeof document&&z.on(window,"load",(()=>{setTimeout((()=>this._onScroll()),150)}))}_onCollapseOpened(){this._isCollapseOpened=!0}_onCollapseClosed(){for(;this._callbackQueue.length>0;){const t=this._callbackQueue.shift();"function"==typeof t&&t()}this._isCollapseOpened=!1}_getParentLinks(t){const e=[];let i=t.closest(ke),n=null,s=!1;for(;i&&!s;){const t=i.closest("li.nav-link, li.nav-item");if(t){const i=t.querySelector(xe);i&&e.push(i)}n=i,i=(i.parentElement||i).closest(ke),i===n&&(s=!0)}return e}_decorateToggler(t){if(this._togglerElement){const e=Y.findOne(".it-list",this._togglerElement);this._togglerElement.innerText="",this._togglerElement.textContent="",this._togglerElement.append(e),this._togglerElement.append(t)}}_scrollToHash(t){const e=Y.findOne(t,this._sectionContainer);e&&(Ce(e.offsetTop-this._getScrollPadding(),{duration:this._config.duration,easing:this._config.easing}),history.pushState?history.pushState(null,null,t):location.hash=t)}_updateProgress(t){if(!t)return;const e=Y.find(".it-navscroll-progressbar");if(e){const i=Math.abs(t.getBoundingClientRect().top)/t.getBoundingClientRect().height*100,n=Math.min(100,Math.max(0,i));e.forEach((e=>{t.getBoundingClientRect().top<=0?(e.style.width=n+"%",e.setAttribute("aria-valuenow",n)):(e.style.width="0%",e.setAttribute("aria-valuenow",0))}))}}_onScroll(){const t=this._sectionContainer?this._sectionContainer.offsetTop:0;if("undefined"==typeof document)return;const e=document.scrollingElement.scrollTop-t,i=Y.find(xe,this._element),n=this._getScrollPadding();Y.find(".it-page-section").forEach(((s,o)=>{if(s.offsetTop-t<=e+n&&(Y.find(Te,this._element).forEach((t=>{t.classList.remove(Se)})),o<i.length)){const t=i[o];this._getParentLinks(t).forEach((t=>{t.classList.add(Se)})),t.classList.add(Se),this._decorateToggler(t.innerText)}})),this._updateProgress(this._sectionContainer)}_getCollapsible(){const t=Y.findOne(".navbar-collapsable",this._element);return t?ne.getOrCreateInstance(t):null}_getScrollPadding(){return"function"==typeof this._config.scrollPadding?this._config.scrollPadding():this._config.scrollPadding}}if("undefined"!=typeof window&&"undefined"!=typeof document){Y.find("[data-bs-navscroll]").map((t=>{Le.getOrCreateInstance(t)}))}const Ie=".bs.sticky",Pe=`resize${Ie}`,Me=`on${Ie}`,Fe=`off${Ie}`,$e="bs-is-sticky",je="bs-is-fixed",Ne='[data-bs-toggle="sticky"]',De={positionType:"sticky",stickyClassName:"",stackable:!1,paddingTop:0};class Re extends K{constructor(t,e){super(t),this._config=this._getConfig(e),this._isSticky=!1,this._wrapper=null,this._stickyTarget=Y.findOne(m(this._element),this._element)||this._element,this._stickyTargetMobile=Y.findOne(this._element.getAttribute("data-bs-target-mobile"),this._element)||this._stickyTarget,this._stickyLimit=0,this._stickyLimitMobile=0,this._setLimit(),this._scrollCb=null,this._isMobile=Mt(),this._prevTop=0,this._onScroll(),this._bindEvents()}dispose(){"undefined"!=typeof window&&"undefined"!=typeof document&&(z.off(window,Pe),this._scrollCb.dispose(),super.dispose())}static get NAME(){return"sticky"}_getConfig(t){return t={...De,...U.getDataAttributes(this._element),..."object"==typeof t?t:{}}}_bindEvents(){"undefined"!=typeof window&&"undefined"!=typeof document&&(z.on(window,Pe,(()=>this._onResize())),this._scrollCb=we((()=>this._onScroll())))}_onResize(){this._isMobile=Mt(),this._setLimit()}_onScroll(){this._checkSticky()}_setLimit(){this._stickyLimit=this._cumulativeOffset(this._stickyTarget).top,this._stickyLimitMobile=this._cumulativeOffset(this._stickyTargetMobile).top}_getLimit(){let t=this._isMobile?this._stickyLimitMobile:this._stickyLimit;return this._config.stackable&&this._getStickySimblings().forEach(((e,i)=>{const n=e.getBoundingClientRect();t-=n.height+(0===i?parseFloat(e.style.top):0)})),t>0?t:0}_cumulativeOffset(t){let e=0,i=0;do{e+=t.offsetTop||0,i+=t.offsetLeft||0,t=t.offsetParent}while(t);return{top:e,left:i}}_isTypeSticky(){return"sticky"===this._config.positionType}_checkSticky(){this._isSticky||this._setLimit();const t=this._getLimit();"undefined"!=typeof window&&window.pageYOffset>t?this._setSticky():this._unsetSticky()}_setSticky(){if(!this._isSticky){this._isSticky=!0;let t=$e;this._isTypeSticky()||(t=je,this._wrapper=this._createWrapper()),this._element.classList.add(t),this._config.stickyClassName&&this._element.classList.add(this._config.stickyClassName),this._prevTop=this._element.style.top,this._element.style.top=this._getPositionTop()+"px",z.trigger(this._element,Me)}}_unsetSticky(){if(this._isSticky){let t=$e;this._isTypeSticky()||(t=je,this._destroyWrapper()),this._element.classList.remove(t),this._config.stickyClassName&&this._element.classList.remove(this._config.stickyClassName),this._element.style.top=this._prevTop,this._isSticky=!1,z.trigger(this._element,Fe)}}_createWrapper(){if("undefined"==typeof document)return;const t=document.createElement("div");return t.classList.add("bs-it-sticky-wrapper"),t.style.width="100%",t.style.height=this._element.getBoundingClientRect().height+"px",t.style.overflow="hidden",this._element.parentNode.insertBefore(t,this._element),t.appendChild(this._element),t}_destroyWrapper(){this._wrapper&&(this._wrapper.parentNode.insertBefore(this._element,this._wrapper),this._wrapper.remove())}_getStickySimblings(){return Y.find(Ne).filter((t=>{const e=Re.getInstance(t);return!(!e||!e._isSticky||t===this._element)}))}_getPositionTop(){let t=0;return this._config.stackable?(this._getStickySimblings().forEach(((e,i)=>{const n=e.getBoundingClientRect();t+=n.height+(0===i?parseFloat(e.style.top):0)})),t):t+this._config.paddingTop}}"undefined"!=typeof window&&"undefined"!=typeof document&&we((()=>{Y.find(Ne).map((t=>{Re.getOrCreateInstance(t)}))}));const Be="cloned-element",Ve=`.${Be}`,ze=new Map;class We{constructor(t){if(ze.get(t))return null;this._element=t,this._elementObj=Re.getOrCreateInstance(t),ze.set(t,this._elementObj),this._bindEvents(),this._toggleClonedElement(this._element.classList.contains("is-sticky"))}static getOrCreateInstance(t){return ze.get(t)||new this(t)}_bindEvents(){this._element.addEventListener("on.bs.sticky",(()=>this._toggleClonedElement(!0))),this._element.addEventListener("off.bs.sticky",(()=>this._toggleClonedElement(!1)))}_toggleClonedElement(t=!0){if(!v(Y.findOne(".custom-navbar-toggler",this._element))){const e=Y.findOne(".menu-wrapper",this._element);if(t){const t=Y.findOne(".it-brand-wrapper",this._element),i=Y.findOne(".it-search-wrapper",this._element),n=Y.findOne(".it-user-wrapper",this._element),s=t?t.cloneNode(!0):null,o=i?i.cloneNode(!0):null,r=n?n.cloneNode(!0):null;s&&e.insertBefore(s,e.childNodes[0]).classList.add(Be),o&&e.appendChild(o).classList.add(Be),r&&(e.appendChild(r).classList.add(Be),e.appendChild(r).classList.remove("show"))}else Y.find(Ve,this._element).forEach((t=>{t.parentElement.removeChild(t)}))}}}we((()=>{Y.find('.it-header-sticky [data-bs-toggle="sticky"]').map((t=>{We.getOrCreateInstance(t)}))}));var qe=Object.defineProperty,He=(t,e,i)=>(((t,e,i)=>{e in t?qe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i})(t,"symbol"!=typeof e?e+"":e,i),i);const Ue=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,Ge=/^-?[0-9]\d*$/,Ke=/^(?=.*[A-Za-z])(?=.*\d).{8,}$/,Ye=/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/,Qe=t=>"string"!=typeof t||""===t;var Xe=(t=>(t.Required="required",t.Email="email",t.MinLength="minLength",t.MaxLength="maxLength",t.Password="password",t.Number="number",t.Integer="integer",t.MaxNumber="maxNumber",t.MinNumber="minNumber",t.StrongPassword="strongPassword",t.CustomRegexp="customRegexp",t.MinFilesCount="minFilesCount",t.MaxFilesCount="maxFilesCount",t.Files="files",t))(Xe||{}),Ze=(t=>(t.Required="required",t))(Ze||{}),Je=(t=>(t.Label="label",t.LabelArrow="labelArrow",t))(Je||{});const ti=[{key:Xe.Required,dict:{en:"The field is required"}},{key:Xe.Email,dict:{en:"Email has invalid format"}},{key:Xe.MaxLength,dict:{en:"The field must contain a maximum of :value characters"}},{key:Xe.MinLength,dict:{en:"The field must contain a minimum of :value characters"}},{key:Xe.Password,dict:{en:"Password must contain minimum eight characters, at least one letter and one number"}},{key:Xe.StrongPassword,dict:{en:"Password should contain minimum eight characters, at least one uppercase letter, one lowercase letter, one number and one special character"}},{key:Xe.Number,dict:{en:"Value should be a number"}},{key:Xe.MaxNumber,dict:{en:"Number should be less or equal than :value"}},{key:Xe.MinNumber,dict:{en:"Number should be more or equal than :value"}},{key:Xe.MinFilesCount,dict:{en:"Files count should be more or equal than :value"}},{key:Xe.MaxFilesCount,dict:{en:"Files count should be less or equal than :value"}},{key:Xe.Files,dict:{en:"Uploaded files have one or several invalid properties (extension/size/type etc)."}}],ei=t=>"object"==typeof t&&null!==t&&"then"in t&&"function"==typeof t.then,ii=t=>Array.isArray(t)?t.filter((t=>t.length>0)):"string"==typeof t&&t.trim()?[...t.split(" ").filter((t=>t.length>0))]:[],ni=t=>t instanceof Element||t instanceof HTMLDocument,si={errorFieldStyle:{color:"#b81111",border:"1px solid #B81111"},errorFieldCssClass:"just-validate-error-field",successFieldCssClass:"just-validate-success-field",errorLabelStyle:{color:"#b81111"},errorLabelCssClass:"just-validate-error-label",successLabelCssClass:"just-validate-success-label",focusInvalidField:!0,lockForm:!0,testingMode:!1,validateBeforeSubmitting:!1,submitFormAutomatically:!1};class oi{constructor(t,e,i){He(this,"form",null),He(this,"fields",{}),He(this,"groupFields",{}),He(this,"errors",{}),He(this,"isValid",!1),He(this,"isSubmitted",!1),He(this,"globalConfig",si),He(this,"errorLabels",{}),He(this,"successLabels",{}),He(this,"eventListeners",[]),He(this,"dictLocale",ti),He(this,"currentLocale","en"),He(this,"customStyleTags",{}),He(this,"onSuccessCallback"),He(this,"onFailCallback"),He(this,"onValidateCallback"),He(this,"tooltips",[]),He(this,"lastScrollPosition"),He(this,"isScrollTick"),He(this,"fieldIds",new Map),He(this,"getKeyByFieldSelector",(t=>this.fieldIds.get(t))),He(this,"getFieldSelectorByKey",(t=>{for(const[e,i]of this.fieldIds)if(t===i)return e})),He(this,"getCompatibleFields",(()=>{const t={};return Object.keys(this.fields).forEach((e=>{let i=e;const n=this.getFieldSelectorByKey(e);"string"==typeof n&&(i=n),t[i]={...this.fields[e]}})),t})),He(this,"setKeyByFieldSelector",(t=>{if(this.fieldIds.has(t))return this.fieldIds.get(t);const e=String(this.fieldIds.size+1);return this.fieldIds.set(t,e),e})),He(this,"refreshAllTooltips",(()=>{this.tooltips.forEach((t=>{t.refresh()}))})),He(this,"handleDocumentScroll",(()=>{this.lastScrollPosition=window.scrollY,this.isScrollTick||(window.requestAnimationFrame((()=>{this.refreshAllTooltips(),this.isScrollTick=!1})),this.isScrollTick=!0)})),He(this,"formSubmitHandler",(t=>{t.preventDefault(),this.isSubmitted=!0,this.validateHandler(t)})),He(this,"handleFieldChange",(t=>{let e;for(const i in this.fields){if(this.fields[i].elem===t){e=i;break}}e&&(this.fields[e].touched=!0,this.validateField(e,!0))})),He(this,"handleGroupChange",(t=>{let e;for(const i in this.groupFields){if(this.groupFields[i].elems.find((e=>e===t))){e=i;break}}e&&(this.groupFields[e].touched=!0,this.validateGroup(e,!0))})),He(this,"handlerChange",(t=>{t.target&&(this.handleFieldChange(t.target),this.handleGroupChange(t.target),this.renderErrors())})),this.initialize(t,e,i)}initialize(t,e,i){if(this.form=null,this.errors={},this.isValid=!1,this.isSubmitted=!1,this.globalConfig=si,this.errorLabels={},this.successLabels={},this.eventListeners=[],this.customStyleTags={},this.tooltips=[],this.currentLocale="en","string"==typeof t){const e=document.querySelector(t);if(!e)throw Error(`Form with ${t} selector not found! Please check the form selector`);this.setForm(e)}else{if(!(t instanceof HTMLFormElement))throw Error("Form selector is not valid. Please specify a string selector or a DOM element.");this.setForm(t)}if(this.globalConfig={...si,...e},i&&(this.dictLocale=[...i,...ti]),this.isTooltip()){const t=document.createElement("style");t.textContent=".just-validate-error-label[data-tooltip=true]{position:fixed;padding:4px 8px;background:#423f3f;color:#fff;white-space:nowrap;z-index:10;border-radius:4px;transform:translateY(-5px)}.just-validate-error-label[data-tooltip=true]:before{content:'';width:0;height:0;border-left:solid 5px transparent;border-right:solid 5px transparent;border-bottom:solid 5px #423f3f;position:absolute;z-index:3;display:block;bottom:-5px;transform:rotate(180deg);left:calc(50% - 5px)}.just-validate-error-label[data-tooltip=true][data-direction=left]{transform:translateX(-5px)}.just-validate-error-label[data-tooltip=true][data-direction=left]:before{right:-7px;bottom:auto;left:auto;top:calc(50% - 2px);transform:rotate(90deg)}.just-validate-error-label[data-tooltip=true][data-direction=right]{transform:translateX(5px)}.just-validate-error-label[data-tooltip=true][data-direction=right]:before{right:auto;bottom:auto;left:-7px;top:calc(50% - 2px);transform:rotate(-90deg)}.just-validate-error-label[data-tooltip=true][data-direction=bottom]{transform:translateY(5px)}.just-validate-error-label[data-tooltip=true][data-direction=bottom]:before{right:auto;bottom:auto;left:calc(50% - 5px);top:-5px;transform:rotate(0)}",this.customStyleTags[Je.Label]=document.head.appendChild(t),this.addListener("scroll",document,this.handleDocumentScroll)}}getLocalisedString(t,e,i){var n;const s=null!=i?i:t;let o=null==(n=this.dictLocale.find((t=>t.key===s)))?void 0:n.dict[this.currentLocale];if(o||i&&(o=i),o&&void 0!==e)switch(t){case Xe.MaxLength:case Xe.MinLength:case Xe.MaxNumber:case Xe.MinNumber:case Xe.MinFilesCount:case Xe.MaxFilesCount:o=o.replace(":value",String(e))}return o||i||"Value is incorrect"}getFieldErrorMessage(t,e){const i="function"==typeof t.errorMessage?t.errorMessage(this.getElemValue(e),this.fields):t.errorMessage;return this.getLocalisedString(t.rule,t.value,i)}getFieldSuccessMessage(t,e){const i="function"==typeof t?t(this.getElemValue(e),this.fields):t;return this.getLocalisedString(void 0,void 0,i)}getGroupErrorMessage(t){return this.getLocalisedString(t.rule,void 0,t.errorMessage)}getGroupSuccessMessage(t){if(t.successMessage)return this.getLocalisedString(void 0,void 0,t.successMessage)}setFieldInvalid(t,e){this.fields[t].isValid=!1,this.fields[t].errorMessage=this.getFieldErrorMessage(e,this.fields[t].elem)}setFieldValid(t,e){this.fields[t].isValid=!0,void 0!==e&&(this.fields[t].successMessage=this.getFieldSuccessMessage(e,this.fields[t].elem))}setGroupInvalid(t,e){this.groupFields[t].isValid=!1,this.groupFields[t].errorMessage=this.getGroupErrorMessage(e)}setGroupValid(t,e){this.groupFields[t].isValid=!0,this.groupFields[t].successMessage=this.getGroupSuccessMessage(e)}getElemValue(t){switch(t.type){case"checkbox":return t.checked;case"file":return t.files;default:return t.value}}validateGroupRule(t,e,i){if(i.rule===Ze.Required)e.every((t=>!t.checked))?this.setGroupInvalid(t,i):this.setGroupValid(t,i)}validateFieldRule(t,e,i,n=!1){const s=i.value,o=this.getElemValue(e);if(i.plugin){i.plugin(o,this.getCompatibleFields())||this.setFieldInvalid(t,i)}else{switch(i.rule){case Xe.Required:(t=>{let e=t;return"string"==typeof t&&(e=t.trim()),!e})(o)&&this.setFieldInvalid(t,i);break;case Xe.Email:if(Qe(o))break;r=o,Ue.test(r)||this.setFieldInvalid(t,i);break;case Xe.MaxLength:if(void 0===s){console.error(`Value for ${i.rule} rule for [${t}] field is not defined. The field will be always invalid.`),this.setFieldInvalid(t,i);break}if("number"!=typeof s){console.error(`Value for ${i.rule} rule for [${t}] should be a number. The field will be always invalid.`),this.setFieldInvalid(t,i);break}if(Qe(o))break;((t,e)=>t.length>e)(o,s)&&this.setFieldInvalid(t,i);break;case Xe.MinLength:if(void 0===s){console.error(`Value for ${i.rule} rule for [${t}] field is not defined. The field will be always invalid.`),this.setFieldInvalid(t,i);break}if("number"!=typeof s){console.error(`Value for ${i.rule} rule for [${t}] should be a number. The field will be always invalid.`),this.setFieldInvalid(t,i);break}if(Qe(o))break;((t,e)=>t.length<e)(o,s)&&this.setFieldInvalid(t,i);break;case Xe.Password:if(Qe(o))break;(t=>Ke.test(t))(o)||this.setFieldInvalid(t,i);break;case Xe.StrongPassword:if(Qe(o))break;(t=>Ye.test(t))(o)||this.setFieldInvalid(t,i);break;case Xe.Number:if(Qe(o))break;(t=>"string"==typeof t&&!isNaN(+t)&&!isNaN(parseFloat(t)))(o)||this.setFieldInvalid(t,i);break;case Xe.Integer:if(Qe(o))break;(t=>Ge.test(t))(o)||this.setFieldInvalid(t,i);break;case Xe.MaxNumber:{if(void 0===s){console.error(`Value for ${i.rule} rule for [${t}] field is not defined. The field will be always invalid.`),this.setFieldInvalid(t,i);break}if("number"!=typeof s){console.error(`Value for ${i.rule} rule for [${t}] field should be a number. The field will be always invalid.`),this.setFieldInvalid(t,i);break}if(Qe(o))break;const e=+o;(Number.isNaN(e)||((t,e)=>t>e)(e,s))&&this.setFieldInvalid(t,i);break}case Xe.MinNumber:{if(void 0===s){console.error(`Value for ${i.rule} rule for [${t}] field is not defined. The field will be always invalid.`),this.setFieldInvalid(t,i);break}if("number"!=typeof s){console.error(`Value for ${i.rule} rule for [${t}] field should be a number. The field will be always invalid.`),this.setFieldInvalid(t,i);break}if(Qe(o))break;const e=+o;(Number.isNaN(e)||((t,e)=>t<e)(e,s))&&this.setFieldInvalid(t,i);break}case Xe.CustomRegexp:{if(void 0===s)return console.error(`Value for ${i.rule} rule for [${t}] field is not defined. This field will be always invalid.`),void this.setFieldInvalid(t,i);let e;try{e=new RegExp(s)}catch(e){console.error(`Value for ${i.rule} rule for [${t}] should be a valid regexp. This field will be always invalid.`),this.setFieldInvalid(t,i);break}const n=String(o);""===n||e.test(n)||this.setFieldInvalid(t,i);break}case Xe.MinFilesCount:if(void 0===s){console.error(`Value for ${i.rule} rule for [${t}] field is not defined. This field will be always invalid.`),this.setFieldInvalid(t,i);break}if("number"!=typeof s){console.error(`Value for ${i.rule} rule for [${t}] field should be a number. The field will be always invalid.`),this.setFieldInvalid(t,i);break}if(Number.isFinite(null==o?void 0:o.length)&&o.length<s){this.setFieldInvalid(t,i);break}break;case Xe.MaxFilesCount:if(void 0===s){console.error(`Value for ${i.rule} rule for [${t}] field is not defined. This field will be always invalid.`),this.setFieldInvalid(t,i);break}if("number"!=typeof s){console.error(`Value for ${i.rule} rule for [${t}] field should be a n