bootstrap-italia 2.13.2 → 2.13.3

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.
Files changed (44) hide show
  1. package/dist/css/bootstrap-italia.min.css +1 -1
  2. package/dist/css/bootstrap-italia.min.css.map +1 -1
  3. package/dist/js/bootstrap-italia.bundle.min.js +10 -10
  4. package/dist/js/bootstrap-italia.min.js +1 -1
  5. package/dist/version.js +1 -1
  6. package/dist/version.js.map +1 -1
  7. package/package.json +2 -2
  8. package/src/js/version.js +1 -1
  9. package/src/scss/base/_version.scss +1 -1
  10. package/types/plugins/accordion.d.ts +1 -1
  11. package/types/plugins/alert.d.ts +1 -1
  12. package/types/plugins/back-to-top.d.ts +1 -1
  13. package/types/plugins/button.d.ts +1 -1
  14. package/types/plugins/carousel-bi.d.ts +1 -1
  15. package/types/plugins/carousel.d.ts +1 -1
  16. package/types/plugins/collapse.d.ts +1 -1
  17. package/types/plugins/cookiebar.d.ts +1 -1
  18. package/types/plugins/dimmer.d.ts +1 -1
  19. package/types/plugins/dropdown.d.ts +1 -1
  20. package/types/plugins/form.d.ts +1 -1
  21. package/types/plugins/forward.d.ts +1 -1
  22. package/types/plugins/header-sticky.d.ts +1 -1
  23. package/types/plugins/history-back.d.ts +1 -1
  24. package/types/plugins/input-number.d.ts +1 -1
  25. package/types/plugins/input-password.d.ts +1 -1
  26. package/types/plugins/input-search-autocomplete.d.ts +1 -1
  27. package/types/plugins/input.d.ts +1 -1
  28. package/types/plugins/list.d.ts +1 -1
  29. package/types/plugins/masonry.d.ts +1 -1
  30. package/types/plugins/modal.d.ts +1 -1
  31. package/types/plugins/navbar-collapsible.d.ts +1 -1
  32. package/types/plugins/navscroll.d.ts +1 -1
  33. package/types/plugins/notification.d.ts +1 -1
  34. package/types/plugins/offcanvas.d.ts +1 -1
  35. package/types/plugins/popover.d.ts +1 -1
  36. package/types/plugins/progress-donut.d.ts +1 -1
  37. package/types/plugins/scrollspy.d.ts +1 -1
  38. package/types/plugins/select-autocomplete.d.ts +1 -1
  39. package/types/plugins/tab.d.ts +1 -1
  40. package/types/plugins/toast.d.ts +1 -1
  41. package/types/plugins/tooltip.d.ts +1 -1
  42. package/types/plugins/transfer.d.ts +1 -1
  43. package/types/plugins/upload-dragdrop.d.ts +1 -1
  44. package/types/plugins/video.ts +2 -4
@@ -1,4 +1,4 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@popperjs/core"),require("video.js"),require("animejs/lib/anime.es.js"),require("@splidejs/splide"),require("accessible-autocomplete")):"function"==typeof define&&define.amd?define(["@popperjs/core","video.js","animejs/lib/anime.es.js","@splidejs/splide","accessible-autocomplete"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap=e(t.Popper,t.videojs,t.anime,t.Splide,t.accessibleAutocomplete)}(this,(function(t,e,i,s,n){"use strict";function o(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const i in t)if("default"!==i){const s=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>t[i]})}return e.default=t,Object.freeze(e)}const r=o(t);!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 a="data-focus-mouse",l="focus--mouse";class c{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.classList.add(l),t.target.setAttribute(a,!0))})),document.addEventListener("focusout",(t=>{t.target&&(t.target.classList.remove(l),t.target.setAttribute(a,!1))}))}}new c;const h=()=>{"undefined"==typeof window||window.BOOTSTRAP_ITALIA_VERSION||(new c,window.BOOTSTRAP_ITALIA_VERSION="2.13.2")};h();const u={ck3:{}},d={rememberChoice:(t,e)=>{u.ck3[t]=e,localStorage.setItem("bs-ck3",JSON.stringify(u.ck3))},isChoiceRemembered:t=>(u.ck3=JSON.parse(localStorage.getItem("bs-ck3")||"{}"),u.ck3[t]||!1),clearAllRememberedChoices:()=>{localStorage.removeItem("bs-ck3")}},f=new Map,p={set(t,e,i){f.has(t)||f.set(t,new Map);const s=f.get(t);s.has(e)||0===s.size?s.set(e,i):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(s.keys())[0]}.`)},get:(t,e)=>f.has(t)&&f.get(t).get(e)||null,remove(t,e){if(!f.has(t))return;const i=f.get(t);i.delete(e),0===i.size&&f.delete(t)}},m="transitionend",g=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},_=t=>{const e=g(t);return e&&document.querySelector(e)?e:null},b=t=>{const e=g(t);return e?document.querySelector(e):null},v=t=>{t.dispatchEvent(new Event(m))},y=t=>!(!t||"object"!=typeof t)&&void 0!==t.nodeType,w=t=>y(t)?t:"string"==typeof t&&t.length>0?document.querySelector(t):null,E=t=>{if(!y(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},C=t=>!t||t.nodeType!==Node.ELEMENT_NODE||(!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled"))),S=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?S(t.parentNode):null},k=()=>{},T=t=>{t.offsetHeight},A=()=>"undefined"!=typeof window&&"undefined"!=typeof document&&"rtl"===document.documentElement.dir,L=t=>{"function"==typeof t&&t()},x=(t,e,i=!0)=>{if(!i)return void L(t);const s=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:i}=window.getComputedStyle(t);const s=Number.parseFloat(e),n=Number.parseFloat(i);return s||n?(e=e.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(i))):0})(e)+5;let n=!1;const o=({target:i})=>{i===e&&(n=!0,e.removeEventListener(m,o),L(t))};e.addEventListener(m,o),setTimeout((()=>{n||v(e)}),s)},O=(t,e,i,s)=>{const n=t.length;let o=t.indexOf(e);return-1===o?!i&&s?t[n-1]:t[0]:(o+=i?1:-1,s&&(o=(o+n)%n),t[Math.max(0,Math.min(o,n-1))])},I=/[^.]*(?=\..*)\.|.*/,P=/\..*/,M=/::\d+$/,$={};let F=1;const j={mouseenter:"mouseover",mouseleave:"mouseout"},N=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 D(t,e){return e&&`${e}::${F++}`||t.uidEvent||F++}function R(t){const e=D(t);return t.uidEvent=e,$[e]=$[e]||{},$[e]}function B(t,e,i=null){return Object.values(t).find((t=>t.callable===e&&t.delegationSelector===i))}function V(t,e,i){const s="string"==typeof e,n=s?i:e||i;let o=(r=(r=t).replace(P,""),j[r]||r);var r;return N.has(o)||(o=t),[s,n,o]}function z(t,e,i,s,n){if("string"!=typeof e||!t)return;let[o,r,a]=V(e,i,s);if(e in j){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=R(t),c=l[a]||(l[a]={}),h=B(c,r,o?i:null);if(h)return void(h.oneOff=h.oneOff&&n);const u=D(r,e.replace(I,"")),d=o?function(t,e,i){return function s(n){const o=t.querySelectorAll(e);for(let{target:r}=n;r&&r!==this;r=r.parentNode)for(const a of o)if(a===r)return G(n,{delegateTarget:r}),s.oneOff&&H.off(t,n.type,e,i),i.apply(r,[n])}}(t,i,r):function(t,e){return function i(s){return G(s,{delegateTarget:t}),i.oneOff&&H.off(t,s.type,e),e.apply(t,[s])}}(t,r);d.delegationSelector=o?i:null,d.callable=r,d.oneOff=n,d.uidEvent=u,c[u]=d,t.addEventListener(a,d,o)}function W(t,e,i,s,n){const o=B(e[i],s,n);o&&(t.removeEventListener(i,o,Boolean(n)),delete e[i][o.uidEvent])}function q(t,e,i,s){const n=e[i]||{};for(const o of Object.keys(n))if(o.includes(s)){const s=n[o];W(t,e,i,s.callable,s.delegationSelector)}}const H={on(t,e,i,s){z(t,e,i,s,!1)},one(t,e,i,s){z(t,e,i,s,!0)},off(t,e,i,s){if("string"!=typeof e||!t)return;const[n,o,r]=V(e,i,s),a=r!==e,l=R(t),c=l[r]||{},h=e.startsWith(".");if(void 0===o){if(h)for(const i of Object.keys(l))q(t,l,i,e.slice(1));for(const i of Object.keys(c)){const s=i.replace(M,"");if(!a||e.includes(s)){const e=c[i];W(t,l,r,e.callable,e.delegationSelector)}}}else{if(!Object.keys(c).length)return;W(t,l,r,o,n?i:null)}},trigger(t,e,i){if("string"!=typeof e||!t)return null;let s=new Event(e,{bubbles:!0,cancelable:!0});return s=G(s,i),t.dispatchEvent(s),s}};function G(t,e){for(const[i,s]of Object.entries(e||{}))try{t[i]=s}catch{Object.defineProperty(t,i,{configurable:!0,get:()=>s})}return t}function U(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 Y(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}const X={setDataAttribute(t,e,i){t.setAttribute(`data-bs-${Y(e)}`,i)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${Y(e)}`)},getDataAttributes(t){if(!t)return{};const e={},i=Object.keys(t.dataset).filter((t=>t.startsWith("bs")&&!t.startsWith("bsConfig")));for(const s of i){let i=s.replace(/^bs/,"");i=i.charAt(0).toLowerCase()+i.slice(1,i.length),e[i]=U(t.dataset[s])}return e},getDataAttribute:(t,e)=>U(t.getAttribute(`data-bs-${Y(e)}`))};class K{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=y(e)?X.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"==typeof i?i:{},...y(e)?X.getDataAttributes(e):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const s of Object.keys(e)){const n=e[s],o=t[s],r=y(o)?"element":null==(i=o)?`${i}`:Object.prototype.toString.call(i).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(n).test(r))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${s}" provided type "${r}" but expected type "${n}".`)}var i}}class Q extends K{constructor(t,e){super(),(t=w(t))&&(this._element=t,this._config=this._getConfig(e),p.set(this._element,this.constructor.DATA_KEY,this))}dispose(){p.remove(this._element,this.constructor.DATA_KEY),H.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 p.get(w(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 Z={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 s=t.parentNode.closest(e);for(;s;)i.push(s),s=s.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=>!C(t)&&E(t)))}},J={slideFocus:!0,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"}},tt={"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 et extends Q{constructor(t){super(t),this._config=this._getConfig(),this._splide=new s(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({},J);return Object.keys(tt).forEach((e=>{this._element.classList.contains(e)&&(t=Object.assign({},t,tt[e]))})),t}}"undefined"!=typeof window&&"undefined"!=typeof document&&H.on(window,"load.bs.carousel.data-api",(()=>{Z.find("[data-bs-carousel-splide]").forEach((t=>{et.getOrCreateInstance(t)}))}));const it=".bs.inputlabel",st=`focus${it}`,nt=`blur${it}`,ot=`change${it}`,rt="active";class at{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(rt)&&(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")?H.on(this._element,nt,(()=>{this._labelOut()})):(H.on(this._element,st,(()=>{this._labelOut()})),H.on(this._element,nt,(()=>{this._labelOver()})),H.on(this._element,ot,(()=>{this._labelToggle()}))))}_getLabel(){return Z.findOne('label[for="'+this._element.getAttribute("id")+'"]')}_isEmpty(){return!this._element.value&&!this._element.getAttribute("placeholder")}_labelOut(){const t=this._getLabel();t&&t.classList.add(rt)}_labelOver(){if(this._isEmpty()){const t=this._getLabel();t&&t.classList.remove(rt)}}_labelToggle(){this._isEmpty()?this._labelOver():this._labelOut()}}const lt=".bs.inputnumber",ct=`click${lt}`,ht=`change${lt}`,ut=`click${lt}.data-api`,dt=".input-number",ft='input[data-bs-input][type="number"]',pt='button[class^="input-number-"]';class mt extends Q{constructor(t){super(t),this._wrapperElement=this._element.closest(dt),this._label=new at(t),this._init(),this._bindEvents()}static get NAME(){return"inputnumber"}_init(){this._wrapperElement&&this._inputResize()}_bindEvents(){this._wrapperElement&&(Z.find(pt,this._wrapperElement).forEach((t=>{H.on(t,ct,(e=>{e.preventDefault(),this._incrDecr(t.classList.contains("input-number-sub")),this._label._labelOut()}))})),H.on(this._element,ht,(()=>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){var e=0;if(""!==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),H.trigger(this._element,ht),H.trigger(this._element,"input")}}_checkLimit(){const t=parseFloat(this._element.value);if(!isNaN(t)){let e=t;const i=parseFloat(this._element.getAttribute("max")),s=parseFloat(this._element.getAttribute("min"));s&&t<s&&(e=s),i&&t>i&&(e=i),this._element.value=e}this._inputResize()}}"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("DOMContentLoaded",(function(){document.querySelectorAll(ft+", label").forEach((function(t){const e=at.getInputFromLabel(t)||t;var i;(i=e)&&i.matches(ft)&&i.parentNode.querySelector(pt)&&mt.getOrCreateInstance(i)}))})),H.on(document,ut,pt,(function(){const t=this.closest(dt);if(t){const e=Z.findOne(ft,t);e&&mt.getOrCreateInstance(e)}})));const gt="show";class _t extends Q{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(gt),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&&T(this._element),this._element.classList.add(gt);this._queueCallback((()=>{this._isTransitioning=!1}),this._element,t)}_hideElement(){this._element.setAttribute("aria-hidden",!0),this._isTransitioning=!1}}"undefined"!=typeof window&&"undefined"!=typeof document&&H.on(document,"click.bs.dimmer.data-api",'[data-bs-toggle="dimmer"]',(function(){const t=b(this),e=_t.getOrCreateInstance(t);this.checked?e.show():e.hide()}));const bt=(t,e="hide")=>{const i=`click.dismiss${t.EVENT_KEY}`,s=t.NAME;H.on(document,i,`[data-bs-dismiss="${s}"]`,(function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),C(this))return;const n=b(this)||this.closest(`.${s}`);t.getOrCreateInstance(n)[e]()}))},vt=".bs.notification",yt=`click${vt}.data-api`,wt=`hidden${vt}`,Et=`show${vt}`,Ct={timeout:0},St="show";class kt extends Q{constructor(t,e){super(t),this._config=this._getConfig(e),this._isShown=this._element.classList.contains(St),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(St),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&&T(this._element),this._element.classList.add(St);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={...Ct,...X.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&&(H.on(document,yt,'[data-bs-toggle="notification"]',(function(t){const e=b(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),H.one(e,Et,(t=>{t.defaultPrevented||H.one(e,wt,(()=>{E(this)&&this.focus()}))}));kt.getOrCreateInstance(e).toggle(this)})),bt(kt));const Tt="cookiebar",At=".bs.cookiebar",Lt=".data-api",xt="cookies_consent",Ot=`close${At}`,It=`closed${At}`,Pt=`load${At}${Lt}`,Mt=`click${At}${Lt}`,$t="show";class Ft extends Q{constructor(t){super(t),this._isShown=this._element.classList.contains($t),this._isTransitioning=!1}static get NAME(){return Tt}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($t),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&&T(this._element),this._element.classList.add($t);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=b(t);let i=null;return e&&(i=e),i||(i=t.closest(".cookiebar")),i}_triggerCloseEvent(t){return H.trigger(t,Ot)}_removeElement(t){t.classList.remove($t),t.setAttribute("aria-hidden","true"),t.setAttribute("aria-live","off"),H.trigger(t,It),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,s=document.cookie.split(";");for(t=0;t<s.length;t++)if(e=s[t].substring(0,s[t].indexOf("=")),i=s[t].substring(s[t].indexOf("=")+1),(e=e.replace(/^\s+|\s+$/g,""))==xt)return unescape(i)}}}"undefined"!=typeof window&&"undefined"!=typeof document&&(H.on(document,Mt,'[data-bs-accept="cookiebar"]',(function(t){if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),C(this))return;const e=b(this)||this.closest(`.${Tt}`);Ft.getOrCreateInstance(e).accept()})),H.on(window,Pt,(function(){if(!Ft._getCookieEU()){if("undefined"==typeof document)return;document.querySelectorAll(".cookiebar").forEach((t=>{Ft.getOrCreateInstance(t).show()}))}})));const jt=()=>{if("undefined"!=typeof window)return window.matchMedia("(max-width: 991px)").matches},Nt=(t,e)=>{let i=null;return e.forEach(((e,s)=>{e===t&&(i=s)})),i},Dt=(t,e,i)=>{i={isDirectionTop:!1,isLimit:!1,loop:!1,..."object"==typeof i?i:{}};const s=Nt(t,e);let n=null;if(i.isLimit&&i.isDirectionTop&&s>0)n=e[0];else if(i.isLimit&&s<e.length-1)n=e[e.length-1];else if(i.isDirectionTop){if(!i.loop&&0===s)return;n=e[0===s?e.length-1:s-1]}else{if(!i.loop&&s===e.length-1)return;n=e[s===e.length-1?0:s+1]}n&&n.focus()},Rt="pagescroll-scroll-disabled";let Bt=!1,Vt="undefined"==typeof document?0:document.scrollingElement.scrollTop;const zt="undefined"==typeof document?null:document.querySelector("html");"undefined"!=typeof document&&document.addEventListener("scroll",(()=>{Bt&&(document.scrollingElement.scrollTop=Vt)}));const Wt=".bs.navbarcollapsible",qt=`click${Wt}.data-api`,Ht=`click${Wt}`,Gt=`keyup${Wt}`,Ut=`keydown${Wt}`,Yt=`hide${Wt}`,Xt=`hidden${Wt}`,Kt=`show${Wt}`,Qt=`shown${Wt}`,Zt=`resize${Wt}`,Jt="show",te="expanded",ee=".close-menu",ie=".nav-link",se=".nav-item .list-item",ne=".it-heading-link",oe=".it-footer-link";class re extends Q{constructor(t){super(t),this._isShown=this._element.classList.contains(te),this._isTransitioning=!1,this._isMobile=jt(),this._isKeyShift=!1,this._currItemIdx=0,this._btnClose=Z.findOne(".close-div button",this._element),this._btnBack=Z.findOne(".it-back-button",this._element),this._menuWrapper=Z.findOne(".menu-wrapper",this._element),this._overlay=null,this._setOverlay(),this._menuItems=Z.find([ie,se,ne,oe,ee].join(","),this._element),this._bindEvents()}static get NAME(){return"navbarcollapsible"}show(t){if(this._isShown||this._isTransitioning)return;H.trigger(this._element,Kt,{relatedTarget:t}).defaultPrevented||(this._btnBack&&this._btnBack.classList.add(Jt),this._isShown=!0,"undefined"!=typeof document&&(Bt=!0,Vt=document.scrollingElement.scrollTop,zt.classList.add(Rt)),this._showElement())}hide(){if(!this._isShown||this._isTransitioning)return;if(H.trigger(this._element,Yt).defaultPrevented)return;this._isShown=!1;const t=this._isAnimated();t&&(this._isTransitioning=!0),this._btnBack&&this._btnBack.classList.remove(Jt),this._overlay&&this._overlay.classList.remove(Jt),this._element.classList.remove(te),"undefined"!=typeof document&&(Bt=!1,zt.classList.remove(Rt)),this._queueCallback((()=>this._hideElement()),this._menuWrapper,t)}toggle(t){this._isShown?this.hide():this.show(t)}dispose(){"undefined"!=typeof window&&"undefined"!=typeof document&&(H.off(window,Zt),super.dispose())}_bindEvents(){"undefined"!=typeof window&&"undefined"!=typeof document&&(H.on(window,Zt,(()=>this._onResize())),this._overlay&&H.on(this._overlay,Ht,(()=>this.hide())),H.on(this._btnClose,Ht,(t=>{t.preventDefault(),this.hide()})),H.on(this._btnBack,Ht,(t=>{t.preventDefault(),this.hide()})),this._menuItems.forEach((t=>{H.on(t,Ut,(t=>this._isMobile&&this._onMenuItemKeyDown(t))),H.on(t,Gt,(t=>this._isMobile&&this._onMenuItemKeyUp(t))),H.on(t,Ht,(t=>this._isMobile&&this._onMenuItemClick(t)))})))}_onResize(){this._isMobile=jt()}_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=Nt(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&&T(this._element),this._element.classList.add(te),this._overlay&&this._overlay.classList.add(Jt);this._queueCallback((()=>{this._isTransitioning=!1;const t=this._getNextVisibleItem(0);t.item&&(t.item.focus(),this._currItemIdx=t.index),H.trigger(this._element,Qt)}),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,H.trigger(this._element,Xt)}_setOverlay(){this._overlay=Z.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,s=null,n=t,o=e?-1:1,r=!1;for(;!(i||n==t&&r);)n==t&&(r=!0),this._isElementHidden(this._menuItems[n])||(i=this._menuItems[n],s=n),n+=o,n<0?n=this._menuItems.length-1:n>=this._menuItems.length&&(n=0);return{item:i,index:s}}}"undefined"!=typeof window&&"undefined"!=typeof document&&H.on(document,qt,'[data-bs-toggle="navbarcollapsible"]',(function(t){const e=b(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),H.one(e,Kt,(t=>{t.defaultPrevented||H.one(e,Xt,(()=>{E(this)&&this.focus()}))}));re.getOrCreateInstance(e).toggle(this)}));const ae=".bs.accordion",le=`keydown${ae}`,ce=`keydown${ae}.data-api`,he='.accordion-item > .accordion-header [data-bs-toggle="collapse"]';class ue extends Q{constructor(t){super(t),this._bindEvents()}static get NAME(){return"accordion"}handleKeyDown(t,e,i){const s={ArrowDown:t=>this._focusNext(t),ArrowUp:t=>this._focusPrev(t),Home:t=>this._focusFirst(t),End:t=>this._focusLast(t)};"function"==typeof s[t]&&(i&&i.preventDefault(),s[t](e))}_bindEvents(){Z.find(he,this._element).forEach((t=>{H.on(t,le,(t=>{this.handleKeyDown(t.key,t.currentTarget,t)}))}))}_getHeadButtons(){return Z.find(":scope > "+he,this._element)}_focusNext(t){Dt(t,this._getHeadButtons(),{loop:!0})}_focusPrev(t){Dt(t,this._getHeadButtons(),{isDirectionTop:!0,loop:!0})}_focusFirst(t){Dt(t,this._getHeadButtons(),{isDirectionTop:!0,isLimit:!0})}_focusLast(t){Dt(t,this._getHeadButtons(),{isLimit:!0})}}var de;"undefined"!=typeof window&&"undefined"!=typeof document&&H.on(document,ce,he,(function(t){const e=this.closest(".accordion");if(e){ue.getOrCreateInstance(e).handleKeyDown(t.key,this,t)}}));var fe=new Uint8Array(16);function pe(){if(!de&&!(de="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 de(fe)}const me=/^(?:[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 ge=[],_e=0;_e<256;++_e)ge.push((_e+256).toString(16).substr(1));function be(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=(ge[t[e+0]]+ge[t[e+1]]+ge[t[e+2]]+ge[t[e+3]]+"-"+ge[t[e+4]]+ge[t[e+5]]+"-"+ge[t[e+6]]+ge[t[e+7]]+"-"+ge[t[e+8]]+ge[t[e+9]]+"-"+ge[t[e+10]]+ge[t[e+11]]+ge[t[e+12]]+ge[t[e+13]]+ge[t[e+14]]+ge[t[e+15]]).toLowerCase();if(!function(t){return"string"==typeof t&&me.test(t)}(i))throw TypeError("Stringified UUID is invalid");return i}function ve(t,e,i){var s=(t=t||{}).random||(t.rng||pe)();return s[6]=15&s[6]|64,s[8]=63&s[8]|128,be(s)}let ye=!1,we=[];class Ee{constructor(t,e){this.id=t,this._callback=e}dispose(){Ce(this.id)}_execute(t){this._callback(t)}}const Ce=t=>{we=we.filter((e=>e.id!==t))},Se=t=>{if("undefined"!=typeof document){if(we.length||"undefined"!=typeof window&&"undefined"!=typeof document&&document.addEventListener("scroll",(t=>{ye||(window.requestAnimationFrame((()=>{we.forEach((e=>e.cb._execute(t))),ye=!1})),ye=!0)})),"function"==typeof t){const e=new Ee(ve(),t);return we.push({id:e.id,cb:e}),e}return console.error("[onDocumentScroll] the provided data has to be of type function"),null}},ke={duration:800,easing:"easeInOutSine"},Te=(t,e)=>{if("undefined"==typeof window||"undefined"==typeof document)return;const s=("object"==typeof e?e:{}).complete,n=window.document.scrollingElement||window.document.body||window.document.documentElement,o=n.style.scrollBehavior;e={scrollTop:t||0,...ke,..."object"==typeof e?e:{}},n.style.scrollBehavior="auto",e.complete=t=>{n.style.scrollBehavior=o,"function"==typeof s&&s(t)},i({targets:n,...e})},Ae="active",Le="ul.link-list",xe="a.nav-link",Oe=`${xe}.${Ae}`,Ie=`${xe}[href^="#"]`,Pe={scrollPadding:10,duration:800,easing:"easeInOutSine"};class Me extends Q{constructor(t,e){super(t),this._config=this._getConfig(e),this._togglerElement=Z.findOne(".custom-navbar-toggler",this._element),this._sectionContainer=Z.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={...Pe,...X.getDataAttributes(this._element),..."object"==typeof t?t:{}}}_bindEvents(){this._scrollCb=Se((()=>this._onScroll())),this._collapsible&&(H.on(this._collapsible._element,"shown.bs.navbarcollapsible",(()=>this._onCollapseOpened())),H.on(this._collapsible._element,"hidden.bs.navbarcollapsible",(()=>this._onCollapseClosed()))),Z.find(Ie,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&&H.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(Le),s=null,n=!1;for(;i&&!n;){const t=i.closest("li.nav-link, li.nav-item");if(t){const i=t.querySelector(xe);i&&e.push(i)}s=i,i=(i.parentElement||i).closest(Le),i===s&&(n=!0)}return e}_decorateToggler(t){if(this._togglerElement){const e=Z.findOne(".it-list",this._togglerElement);this._togglerElement.innerText="",this._togglerElement.textContent="",this._togglerElement.append(e),this._togglerElement.append(t)}}_scrollToHash(t){const e=Z.findOne(t,this._sectionContainer);e&&(Te(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=Z.find(".it-navscroll-progressbar");if(e){const i=Math.abs(t.getBoundingClientRect().top)/t.getBoundingClientRect().height*100,s=Math.min(100,Math.max(0,i));e.forEach((e=>{t.getBoundingClientRect().top<=0?(e.style.width=s+"%",e.setAttribute("aria-valuenow",s)):(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=Z.find(xe,this._element),s=this._getScrollPadding();Z.find(".it-page-section").forEach(((n,o)=>{if(n.offsetTop-t<=e+s&&(Z.find(Oe,this._element).forEach((t=>{t.classList.remove(Ae)})),o<i.length)){const t=i[o];this._getParentLinks(t).forEach((t=>{t.classList.add(Ae)})),t.classList.add(Ae),this._decorateToggler(t.innerText)}})),this._updateProgress(this._sectionContainer)}_getCollapsible(){const t=Z.findOne(".navbar-collapsable",this._element);return t?re.getOrCreateInstance(t):null}_getScrollPadding(){return"function"==typeof this._config.scrollPadding?this._config.scrollPadding():this._config.scrollPadding}}if("undefined"!=typeof window&&"undefined"!=typeof document){Z.find("[data-bs-navscroll]").map((t=>{Me.getOrCreateInstance(t)}))}const $e=".bs.sticky",Fe=`resize${$e}`,je=`on${$e}`,Ne=`off${$e}`,De="bs-is-sticky",Re="bs-is-fixed",Be='[data-bs-toggle="sticky"]',Ve={positionType:"sticky",stickyClassName:"",stackable:!1,paddingTop:0};class ze extends Q{constructor(t,e){super(t),this._config=this._getConfig(e),this._isSticky=!1,this._wrapper=null,this._stickyTarget=Z.findOne(_(this._element),this._element)||this._element,this._stickyTargetMobile=Z.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=jt(),this._prevTop=0,this._onScroll(),this._bindEvents()}dispose(){"undefined"!=typeof window&&"undefined"!=typeof document&&(H.off(window,Fe),this._scrollCb.dispose(),super.dispose())}static get NAME(){return"sticky"}_getConfig(t){return t={...Ve,...X.getDataAttributes(this._element),..."object"==typeof t?t:{}}}_bindEvents(){"undefined"!=typeof window&&"undefined"!=typeof document&&(H.on(window,Fe,(()=>this._onResize())),this._scrollCb=Se((()=>this._onScroll())))}_onResize(){this._isMobile=jt(),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 s=e.getBoundingClientRect();t-=s.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=De;this._isTypeSticky()||(t=Re,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",H.trigger(this._element,je)}}_unsetSticky(){if(this._isSticky){let t=De;this._isTypeSticky()||(t=Re,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,H.trigger(this._element,Ne)}}_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 Z.find(Be).filter((t=>{const e=ze.getInstance(t);return!(!e||!e._isSticky||t===this._element)}))}_getPositionTop(){let t=0;return this._config.stackable?(this._getStickySimblings().forEach(((e,i)=>{const s=e.getBoundingClientRect();t+=s.height+(0===i?parseFloat(e.style.top):0)})),t):t+this._config.paddingTop}}"undefined"!=typeof window&&"undefined"!=typeof document&&Se((()=>{Z.find(Be).map((t=>{ze.getOrCreateInstance(t)}))}));const We="cloned-element",qe=`.${We}`,He=new Map;class Ge{constructor(t){if(He.get(t))return null;this._element=t,this._elementObj=ze.getOrCreateInstance(t),He.set(t,this._elementObj),this._bindEvents(),this._toggleClonedElement(this._element.classList.contains("is-sticky"))}static getOrCreateInstance(t){return He.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(!E(Z.findOne(".custom-navbar-toggler",this._element))){const e=Z.findOne(".menu-wrapper",this._element);if(t){const t=Z.findOne(".it-brand-wrapper",this._element),i=Z.findOne(".it-search-wrapper",this._element),s=Z.findOne(".it-user-wrapper",this._element),n=t?t.cloneNode(!0):null,o=i?i.cloneNode(!0):null,r=s?s.cloneNode(!0):null;n&&e.insertBefore(n,e.childNodes[0]).classList.add(We),o&&e.appendChild(o).classList.add(We),r&&(e.appendChild(r).classList.add(We),e.appendChild(r).classList.remove("show"))}else Z.find(qe,this._element).forEach((t=>{t.parentElement.removeChild(t)}))}}}Se((()=>{Z.find(".it-header-sticky").map((t=>{Ge.getOrCreateInstance(t)}))}));var Ue=Object.defineProperty,Ye=(t,e,i)=>(((t,e,i)=>{e in t?Ue(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i})(t,"symbol"!=typeof e?e+"":e,i),i);const Xe=/^(([^<>()[\]\\.,;:\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,}))$/,Ke=/^-?[0-9]\d*$/,Qe=/^(?=.*[A-Za-z])(?=.*\d).{8,}$/,Ze=/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/,Je=t=>"string"!=typeof t||""===t;var ti=(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))(ti||{}),ei=(t=>(t.Required="required",t))(ei||{}),ii=(t=>(t.Label="label",t.LabelArrow="labelArrow",t))(ii||{});const si=[{key:ti.Required,dict:{en:"The field is required"}},{key:ti.Email,dict:{en:"Email has invalid format"}},{key:ti.MaxLength,dict:{en:"The field must contain a maximum of :value characters"}},{key:ti.MinLength,dict:{en:"The field must contain a minimum of :value characters"}},{key:ti.Password,dict:{en:"Password must contain minimum eight characters, at least one letter and one number"}},{key:ti.StrongPassword,dict:{en:"Password should contain minimum eight characters, at least one uppercase letter, one lowercase letter, one number and one special character"}},{key:ti.Number,dict:{en:"Value should be a number"}},{key:ti.MaxNumber,dict:{en:"Number should be less or equal than :value"}},{key:ti.MinNumber,dict:{en:"Number should be more or equal than :value"}},{key:ti.MinFilesCount,dict:{en:"Files count should be more or equal than :value"}},{key:ti.MaxFilesCount,dict:{en:"Files count should be less or equal than :value"}},{key:ti.Files,dict:{en:"Uploaded files have one or several invalid properties (extension/size/type etc)."}}],ni=t=>"object"==typeof t&&null!==t&&"then"in t&&"function"==typeof t.then,oi=t=>Array.isArray(t)?t.filter((t=>t.length>0)):"string"==typeof t&&t.trim()?[...t.split(" ").filter((t=>t.length>0))]:[],ri=t=>t instanceof Element||t instanceof HTMLDocument,ai={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 li{constructor(t,e,i){Ye(this,"form",null),Ye(this,"fields",{}),Ye(this,"groupFields",{}),Ye(this,"errors",{}),Ye(this,"isValid",!1),Ye(this,"isSubmitted",!1),Ye(this,"globalConfig",ai),Ye(this,"errorLabels",{}),Ye(this,"successLabels",{}),Ye(this,"eventListeners",[]),Ye(this,"dictLocale",si),Ye(this,"currentLocale","en"),Ye(this,"customStyleTags",{}),Ye(this,"onSuccessCallback"),Ye(this,"onFailCallback"),Ye(this,"onValidateCallback"),Ye(this,"tooltips",[]),Ye(this,"lastScrollPosition"),Ye(this,"isScrollTick"),Ye(this,"fieldIds",new Map),Ye(this,"getKeyByFieldSelector",(t=>this.fieldIds.get(t))),Ye(this,"getFieldSelectorByKey",(t=>{for(const[e,i]of this.fieldIds)if(t===i)return e})),Ye(this,"getCompatibleFields",(()=>{const t={};return Object.keys(this.fields).forEach((e=>{let i=e;const s=this.getFieldSelectorByKey(e);"string"==typeof s&&(i=s),t[i]={...this.fields[e]}})),t})),Ye(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})),Ye(this,"refreshAllTooltips",(()=>{this.tooltips.forEach((t=>{t.refresh()}))})),Ye(this,"handleDocumentScroll",(()=>{this.lastScrollPosition=window.scrollY,this.isScrollTick||(window.requestAnimationFrame((()=>{this.refreshAllTooltips(),this.isScrollTick=!1})),this.isScrollTick=!0)})),Ye(this,"formSubmitHandler",(t=>{t.preventDefault(),this.isSubmitted=!0,this.validateHandler(t)})),Ye(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))})),Ye(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))})),Ye(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=ai,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={...ai,...e},i&&(this.dictLocale=[...i,...si]),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[ii.Label]=document.head.appendChild(t),this.addListener("scroll",document,this.handleDocumentScroll)}}getLocalisedString(t,e,i){var s;const n=null!=i?i:t;let o=null==(s=this.dictLocale.find((t=>t.key===n)))?void 0:s.dict[this.currentLocale];if(o||i&&(o=i),o&&void 0!==e)switch(t){case ti.MaxLength:case ti.MinLength:case ti.MaxNumber:case ti.MinNumber:case ti.MinFilesCount:case ti.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===ei.Required)e.every((t=>!t.checked))?this.setGroupInvalid(t,i):this.setGroupValid(t,i)}validateFieldRule(t,e,i,s=!1){const n=i.value,o=this.getElemValue(e);if(i.plugin){i.plugin(o,this.getCompatibleFields())||this.setFieldInvalid(t,i)}else{switch(i.rule){case ti.Required:(t=>{let e=t;return"string"==typeof t&&(e=t.trim()),!e})(o)&&this.setFieldInvalid(t,i);break;case ti.Email:if(Je(o))break;r=o,Xe.test(r)||this.setFieldInvalid(t,i);break;case ti.MaxLength:if(void 0===n){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 n){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(Je(o))break;((t,e)=>t.length>e)(o,n)&&this.setFieldInvalid(t,i);break;case ti.MinLength:if(void 0===n){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 n){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(Je(o))break;((t,e)=>t.length<e)(o,n)&&this.setFieldInvalid(t,i);break;case ti.Password:if(Je(o))break;(t=>Qe.test(t))(o)||this.setFieldInvalid(t,i);break;case ti.StrongPassword:if(Je(o))break;(t=>Ze.test(t))(o)||this.setFieldInvalid(t,i);break;case ti.Number:if(Je(o))break;(t=>"string"==typeof t&&!isNaN(+t)&&!isNaN(parseFloat(t)))(o)||this.setFieldInvalid(t,i);break;case ti.Integer:if(Je(o))break;(t=>Ke.test(t))(o)||this.setFieldInvalid(t,i);break;case ti.MaxNumber:{if(void 0===n){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 n){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(Je(o))break;const e=+o;(Number.isNaN(e)||((t,e)=>t>e)(e,n))&&this.setFieldInvalid(t,i);break}case ti.MinNumber:{if(void 0===n){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 n){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(Je(o))break;const e=+o;(Number.isNaN(e)||((t,e)=>t<e)(e,n))&&this.setFieldInvalid(t,i);break}case ti.CustomRegexp:{if(void 0===n)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(n)}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 s=String(o);""===s||e.test(s)||this.setFieldInvalid(t,i);break}case ti.MinFilesCount:if(void 0===n){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 n){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<n){this.setFieldInvalid(t,i);break}break;case ti.MaxFilesCount:if(void 0===n){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 n){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>n){this.setFieldInvalid(t,i);break}break;case ti.Files:{if(void 0===n)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);if("object"!=typeof n)return console.error(`Value for ${i.rule} rule for [${t}] field should be an object. This field will be always invalid.`),void this.setFieldInvalid(t,i);const e=n.files;if("object"!=typeof e)return console.error(`Value for ${i.rule} rule for [${t}] field should be an object with files array. This field will be always invalid.`),void this.setFieldInvalid(t,i);const s=(t,e)=>{const i=Number.isFinite(e.minSize)&&t.size<e.minSize,s=Number.isFinite(e.maxSize)&&t.size>e.maxSize,n=Array.isArray(e.names)&&!e.names.includes(t.name),o=Array.isArray(e.extensions)&&!e.extensions.includes(t.name.split(".")[t.name.split(".").length-1]),r=Array.isArray(e.types)&&!e.types.includes(t.type);return i||s||n||o||r};if("object"==typeof o&&null!==o)for(let n=0,r=o.length;n<r;++n){const r=o.item(n);if(!r){this.setFieldInvalid(t,i);break}if(s(r,e)){this.setFieldInvalid(t,i);break}}break}default:{if("function"!=typeof i.validator)return console.error(`Validator for custom rule for [${t}] field should be a function. This field will be always invalid.`),void this.setFieldInvalid(t,i);const e=i.validator(o,this.getCompatibleFields());if("boolean"!=typeof e&&"function"!=typeof e&&console.error(`Validator return value for [${t}] field should be boolean or function. It will be cast to boolean.`),"function"==typeof e){if(!s){this.fields[t].asyncCheckPending=!1;const s=e();return ni(s)?s.then((e=>{e||this.setFieldInvalid(t,i)})).catch((()=>{this.setFieldInvalid(t,i)})):(console.error(`Validator function for custom rule for [${t}] field should return a Promise. This field will be always invalid.`),void this.setFieldInvalid(t,i))}this.fields[t].asyncCheckPending=!0}e||this.setFieldInvalid(t,i)}}var r}}isFormValid(){let t=!0;for(let e=0,i=Object.values(this.fields).length;e<i;++e){const i=Object.values(this.fields)[e];if(void 0===i.isValid){t=void 0;break}if(!1===i.isValid){t=!1;break}}for(let e=0,i=Object.values(this.groupFields).length;e<i;++e){const i=Object.values(this.groupFields)[e];if(void 0===i.isValid){t=void 0;break}if(!1===i.isValid){t=!1;break}}return t}validateField(t,e=!1){var i;const s=this.fields[t];s.isValid=!0;const n=[];return[...s.rules].reverse().forEach((i=>{const o=this.validateFieldRule(t,s.elem,i,e);ni(o)&&n.push(o)})),s.isValid&&this.setFieldValid(t,null==(i=s.config)?void 0:i.successMessage),Promise.allSettled(n).finally((()=>{var t;e&&(null==(t=this.onValidateCallback)||t.call(this,{isValid:this.isFormValid(),isSubmitted:this.isSubmitted,fields:this.getCompatibleFields(),groups:{...this.groupFields}}))}))}revalidateField(t){if("string"!=typeof t&&!ri(t))throw Error("Field selector is not valid. Please specify a string selector or a valid DOM element.");const e=this.getKeyByFieldSelector(t);return e&&this.fields[e]?new Promise((t=>{this.validateField(e,!0).finally((()=>{this.clearFieldStyle(e),this.clearFieldLabel(e),this.renderFieldError(e,!0),t(!!this.fields[e].isValid)}))})):(console.error("Field not found. Check the field selector."),Promise.reject())}revalidateGroup(t){if("string"!=typeof t&&!ri(t))throw Error("Group selector is not valid. Please specify a string selector or a valid DOM element.");const e=this.getKeyByFieldSelector(t);return e&&this.groupFields[e]?new Promise((t=>{this.validateGroup(e).finally((()=>{this.clearFieldLabel(e),this.renderGroupError(e,!0),t(!!this.groupFields[e].isValid)}))})):(console.error("Group not found. Check the group selector."),Promise.reject())}validateGroup(t,e=!1){const i=this.groupFields[t],s=[];return[...i.rules].reverse().forEach((e=>{const n=this.validateGroupRule(t,i.elems,e);ni(n)&&s.push(n)})),Promise.allSettled(s).finally((()=>{var t;e&&(null==(t=this.onValidateCallback)||t.call(this,{isValid:this.isFormValid(),isSubmitted:this.isSubmitted,fields:this.getCompatibleFields(),groups:{...this.groupFields}}))}))}focusInvalidField(){for(const t in this.fields){const e=this.fields[t];if(!e.isValid){setTimeout((()=>e.elem.focus()),0);break}}}afterSubmitValidation(t=!1){this.renderErrors(t),this.globalConfig.focusInvalidField&&this.focusInvalidField()}validate(t=!1){return new Promise((e=>{const i=[];Object.keys(this.fields).forEach((t=>{const e=this.validateField(t);ni(e)&&i.push(e)})),Object.keys(this.groupFields).forEach((t=>{const e=this.validateGroup(t);ni(e)&&i.push(e)})),Promise.allSettled(i).then((()=>{var s;this.afterSubmitValidation(t),null==(s=this.onValidateCallback)||s.call(this,{isValid:this.isFormValid(),isSubmitted:this.isSubmitted,fields:this.getCompatibleFields(),groups:{...this.groupFields}}),e(!!i.length)}))}))}revalidate(){return new Promise((t=>{this.validateHandler(void 0,!0).finally((()=>{this.globalConfig.focusInvalidField&&this.focusInvalidField(),t(this.isValid)}))}))}validateHandler(t,e=!1){return this.globalConfig.lockForm&&this.lockForm(),this.validate(e).finally((()=>{var e,i,s;this.globalConfig.lockForm&&this.unlockForm(),this.isValid?(null==(e=this.onSuccessCallback)||e.call(this,t),this.globalConfig.submitFormAutomatically&&(null==(i=null==t?void 0:t.currentTarget)||i.submit())):null==(s=this.onFailCallback)||s.call(this,this.getCompatibleFields(),this.groupFields)}))}setForm(t){this.form=t,this.form.setAttribute("novalidate","novalidate"),this.removeListener("submit",this.form,this.formSubmitHandler),this.addListener("submit",this.form,this.formSubmitHandler)}addListener(t,e,i){e.addEventListener(t,i),this.eventListeners.push({type:t,elem:e,func:i})}removeListener(t,e,i){e.removeEventListener(t,i),this.eventListeners=this.eventListeners.filter((i=>i.type!==t||i.elem!==e))}addField(t,e,i){if("string"!=typeof t&&!ri(t))throw Error("Field selector is not valid. Please specify a string selector or a valid DOM element.");let s;if(s="string"==typeof t?this.form.querySelector(t):t,!s)throw Error("Field doesn't exist in the DOM! Please check the field selector.");if(!Array.isArray(e)||!e.length)throw Error("Rules argument should be an array and should contain at least 1 element.");e.forEach((t=>{if(!("rule"in t||"validator"in t||"plugin"in t))throw Error("Rules argument must contain at least one rule or validator property.");if(!(t.validator||t.plugin||t.rule&&Object.values(ti).includes(t.rule)))throw Error(`Rule should be one of these types: ${Object.values(ti).join(", ")}. Provided value: ${t.rule}`)}));const n=this.setKeyByFieldSelector(t);return this.fields[n]={elem:s,rules:e,isValid:void 0,touched:!1,config:i},this.setListeners(s),(this.isSubmitted||this.globalConfig.validateBeforeSubmitting)&&this.validateField(n),this}removeField(t){if("string"!=typeof t&&!ri(t))throw Error("Field selector is not valid. Please specify a string selector or a valid DOM element.");const e=this.getKeyByFieldSelector(t);if(!e||!this.fields[e])return console.error("Field not found. Check the field selector."),this;const i=this.getListenerType(this.fields[e].elem.type);return this.removeListener(i,this.fields[e].elem,this.handlerChange),this.clearErrors(),delete this.fields[e],this}removeGroup(t){if("string"!=typeof t)throw Error("Group selector is not valid. Please specify a string selector.");const e=this.getKeyByFieldSelector(t);return e&&this.groupFields[e]?(this.groupFields[e].elems.forEach((t=>{const e=this.getListenerType(t.type);this.removeListener(e,t,this.handlerChange)})),this.clearErrors(),delete this.groupFields[e],this):(console.error("Group not found. Check the group selector."),this)}addRequiredGroup(t,e,i,s){if("string"!=typeof t&&!ri(t))throw Error("Group selector is not valid. Please specify a string selector or a valid DOM element.");let n;if(n="string"==typeof t?this.form.querySelector(t):t,!n)throw Error("Group selector not found! Please check the group selector.");const o=n.querySelectorAll("input"),r=Array.from(o).filter((t=>{const e=((t,e)=>{const i=[...e].reverse();for(let e=0,s=i.length;e<s;++e){const s=i[e];for(const e in t){const i=t[e];if(i.groupElem===s)return[e,i]}}return null})(this.groupFields,(t=>{let e=t;const i=[];for(;e;)i.unshift(e),e=e.parentNode;return i})(t));return!e||e[1].elems.find((e=>e!==t))})),a=this.setKeyByFieldSelector(t);return this.groupFields[a]={rules:[{rule:ei.Required,errorMessage:e,successMessage:s}],groupElem:n,elems:r,touched:!1,isValid:void 0,config:i},o.forEach((t=>{this.setListeners(t)})),this}getListenerType(t){switch(t){case"checkbox":case"select-one":case"file":case"radio":return"change";default:return"input"}}setListeners(t){const e=this.getListenerType(t.type);this.removeListener(e,t,this.handlerChange),this.addListener(e,t,this.handlerChange)}clearFieldLabel(t){var e,i;null==(e=this.errorLabels[t])||e.remove(),null==(i=this.successLabels[t])||i.remove()}clearFieldStyle(t){var e,i,s,n;const o=this.fields[t],r=(null==(e=o.config)?void 0:e.errorFieldStyle)||this.globalConfig.errorFieldStyle;Object.keys(r).forEach((t=>{o.elem.style[t]=""}));const a=(null==(i=o.config)?void 0:i.successFieldStyle)||this.globalConfig.successFieldStyle||{};Object.keys(a).forEach((t=>{o.elem.style[t]=""})),o.elem.classList.remove(...oi((null==(s=o.config)?void 0:s.errorFieldCssClass)||this.globalConfig.errorFieldCssClass),...oi((null==(n=o.config)?void 0:n.successFieldCssClass)||this.globalConfig.successFieldCssClass))}clearErrors(){var t,e;Object.keys(this.errorLabels).forEach((t=>this.errorLabels[t].remove())),Object.keys(this.successLabels).forEach((t=>this.successLabels[t].remove()));for(const t in this.fields)this.clearFieldStyle(t);for(const i in this.groupFields){const s=this.groupFields[i],n=(null==(t=s.config)?void 0:t.errorFieldStyle)||this.globalConfig.errorFieldStyle;Object.keys(n).forEach((t=>{s.elems.forEach((e=>{var i;e.style[t]="",e.classList.remove(...oi((null==(i=s.config)?void 0:i.errorFieldCssClass)||this.globalConfig.errorFieldCssClass))}))}));const o=(null==(e=s.config)?void 0:e.successFieldStyle)||this.globalConfig.successFieldStyle||{};Object.keys(o).forEach((t=>{s.elems.forEach((e=>{var i;e.style[t]="",e.classList.remove(...oi((null==(i=s.config)?void 0:i.successFieldCssClass)||this.globalConfig.successFieldCssClass))}))}))}this.tooltips=[]}isTooltip(){return!!this.globalConfig.tooltip}lockForm(){const t=this.form.querySelectorAll("input, textarea, button, select");for(let e=0,i=t.length;e<i;++e)t[e].setAttribute("data-just-validate-fallback-disabled",t[e].disabled?"true":"false"),t[e].setAttribute("disabled","disabled"),t[e].style.pointerEvents="none",t[e].style.webkitFilter="grayscale(100%)",t[e].style.filter="grayscale(100%)"}unlockForm(){const t=this.form.querySelectorAll("input, textarea, button, select");for(let e=0,i=t.length;e<i;++e)"true"!==t[e].getAttribute("data-just-validate-fallback-disabled")&&t[e].removeAttribute("disabled"),t[e].style.pointerEvents="",t[e].style.webkitFilter="",t[e].style.filter=""}renderTooltip(t,e,i){var s;const{top:n,left:o,width:r,height:a}=t.getBoundingClientRect(),l=e.getBoundingClientRect(),c=i||(null==(s=this.globalConfig.tooltip)?void 0:s.position);switch(c){case"left":e.style.top=n+a/2-l.height/2+"px",e.style.left=o-l.width-5+"px";break;case"top":e.style.top=n-l.height-5+"px",e.style.left=o+r/2-l.width/2+"px";break;case"right":e.style.top=n+a/2-l.height/2+"px",e.style.left=`${o+r+5}px`;break;case"bottom":e.style.top=`${n+a+5}px`,e.style.left=o+r/2-l.width/2+"px"}e.dataset.direction=c;return{refresh:()=>{this.renderTooltip(t,e,i)}}}createErrorLabelElem(t,e,i){const s=document.createElement("div");s.innerHTML=e;const n=this.isTooltip()?null==i?void 0:i.errorLabelStyle:(null==i?void 0:i.errorLabelStyle)||this.globalConfig.errorLabelStyle;return Object.assign(s.style,n),s.classList.add(...oi((null==i?void 0:i.errorLabelCssClass)||this.globalConfig.errorLabelCssClass),"just-validate-error-label"),this.isTooltip()&&(s.dataset.tooltip="true"),this.globalConfig.testingMode&&(s.dataset.testId=`error-label-${t}`),this.errorLabels[t]=s,s}createSuccessLabelElem(t,e,i){if(void 0===e)return null;const s=document.createElement("div");s.innerHTML=e;const n=(null==i?void 0:i.successLabelStyle)||this.globalConfig.successLabelStyle;return Object.assign(s.style,n),s.classList.add(...oi((null==i?void 0:i.successLabelCssClass)||this.globalConfig.successLabelCssClass),"just-validate-success-label"),this.globalConfig.testingMode&&(s.dataset.testId=`success-label-${t}`),this.successLabels[t]=s,s}renderErrorsContainer(t,e){const i=e||this.globalConfig.errorsContainer;if("string"==typeof i){const e=this.form.querySelector(i);if(e)return e.appendChild(t),!0;console.error(`Error container with ${i} selector not found. Errors will be rendered as usual`)}return i instanceof Element?(i.appendChild(t),!0):(void 0!==i&&console.error("Error container not found. It should be a string or existing Element. Errors will be rendered as usual"),!1)}renderGroupLabel(t,e,i,s){if(!s){if(this.renderErrorsContainer(e,i))return}t.appendChild(e)}renderFieldLabel(t,e,i,s){var n,o,r,a,l,c,h;if(!s){if(this.renderErrorsContainer(e,i))return}if("checkbox"===t.type||"radio"===t.type){const i=document.querySelector(`label[for="${t.getAttribute("id")}"]`);"label"===(null==(o=null==(n=t.parentElement)?void 0:n.tagName)?void 0:o.toLowerCase())?null==(a=null==(r=t.parentElement)?void 0:r.parentElement)||a.appendChild(e):i?null==(l=i.parentElement)||l.appendChild(e):null==(c=t.parentElement)||c.appendChild(e)}else null==(h=t.parentElement)||h.appendChild(e)}showLabels(t,e){Object.keys(t).forEach(((i,s)=>{const n=t[i],o=this.getKeyByFieldSelector(i);if(!o||!this.fields[o])return void console.error("Field not found. Check the field selector.");const r=this.fields[o];r.isValid=!e,this.clearFieldStyle(o),this.clearFieldLabel(o),this.renderFieldError(o,!1,n),0===s&&this.globalConfig.focusInvalidField&&setTimeout((()=>r.elem.focus()),0)}))}showErrors(t){if("object"!=typeof t)throw Error("[showErrors]: Errors should be an object with key: value format");this.showLabels(t,!0)}showSuccessLabels(t){if("object"!=typeof t)throw Error("[showSuccessLabels]: Labels should be an object with key: value format");this.showLabels(t,!1)}renderFieldError(t,e=!1,i){var s,n,o,r,a,l;const c=this.fields[t];if(!1===c.isValid&&(this.isValid=!1),void 0===c.isValid||!e&&!this.isSubmitted&&!c.touched&&void 0===i)return;if(c.isValid){if(!c.asyncCheckPending){const e=this.createSuccessLabelElem(t,void 0!==i?i:c.successMessage,c.config);e&&this.renderFieldLabel(c.elem,e,null==(s=c.config)?void 0:s.errorsContainer,!0),c.elem.classList.add(...oi((null==(n=c.config)?void 0:n.successFieldCssClass)||this.globalConfig.successFieldCssClass))}return}c.elem.classList.add(...oi((null==(o=c.config)?void 0:o.errorFieldCssClass)||this.globalConfig.errorFieldCssClass));const h=this.createErrorLabelElem(t,void 0!==i?i:c.errorMessage,c.config);this.renderFieldLabel(c.elem,h,null==(r=c.config)?void 0:r.errorsContainer),this.isTooltip()&&this.tooltips.push(this.renderTooltip(c.elem,h,null==(l=null==(a=c.config)?void 0:a.tooltip)?void 0:l.position))}renderGroupError(t,e=!0){var i,s,n,o;const r=this.groupFields[t];if(!1===r.isValid&&(this.isValid=!1),void 0===r.isValid||!e&&!this.isSubmitted&&!r.touched)return;if(r.isValid){r.elems.forEach((t=>{var e,i;Object.assign(t.style,(null==(e=r.config)?void 0:e.successFieldStyle)||this.globalConfig.successFieldStyle),t.classList.add(...oi((null==(i=r.config)?void 0:i.successFieldCssClass)||this.globalConfig.successFieldCssClass))}));const e=this.createSuccessLabelElem(t,r.successMessage,r.config);return void(e&&this.renderGroupLabel(r.groupElem,e,null==(i=r.config)?void 0:i.errorsContainer,!0))}this.isValid=!1,r.elems.forEach((t=>{var e,i;Object.assign(t.style,(null==(e=r.config)?void 0:e.errorFieldStyle)||this.globalConfig.errorFieldStyle),t.classList.add(...oi((null==(i=r.config)?void 0:i.errorFieldCssClass)||this.globalConfig.errorFieldCssClass))}));const a=this.createErrorLabelElem(t,r.errorMessage,r.config);this.renderGroupLabel(r.groupElem,a,null==(s=r.config)?void 0:s.errorsContainer),this.isTooltip()&&this.tooltips.push(this.renderTooltip(r.groupElem,a,null==(o=null==(n=r.config)?void 0:n.tooltip)?void 0:o.position))}renderErrors(t=!1){if(this.isSubmitted||t||this.globalConfig.validateBeforeSubmitting){this.clearErrors(),this.isValid=!0;for(const t in this.groupFields)this.renderGroupError(t);for(const t in this.fields)this.renderFieldError(t)}}destroy(){this.eventListeners.forEach((t=>{this.removeListener(t.type,t.elem,t.func)})),Object.keys(this.customStyleTags).forEach((t=>{this.customStyleTags[t].remove()})),this.clearErrors(),this.globalConfig.lockForm&&this.unlockForm()}refresh(){this.destroy(),this.form?(this.initialize(this.form,this.globalConfig),Object.keys(this.fields).forEach((t=>{const e=this.getFieldSelectorByKey(t);e&&this.addField(e,[...this.fields[t].rules],this.fields[t].config)}))):console.error("Cannot initialize the library! Form is not defined")}setCurrentLocale(t){"string"==typeof t||void 0===t?(this.currentLocale=t,this.isSubmitted&&this.validate()):console.error("Current locale should be a string")}onSuccess(t){return this.onSuccessCallback=t,this}onFail(t){return this.onFailCallback=t,this}onValidate(t){return this.onValidateCallback=t,this}}class ci{constructor(t,e,i,s,n){this.targetNode=t,this.classToWatch=e,this.classAddedCallback=i,this.classRemovedCallback=s,this.observer=null,this.lastClassState=t.classList.contains(this.classToWatch),this.ignoreToggle=!!n,this.init()}init(){this.observer=new MutationObserver((t=>this.mutationCallback(t))),this.observe()}observe(){this.observer.observe(this.targetNode,{attributes:!0})}disconnect(){this.observer.disconnect()}mutationCallback(t){for(let e of t)if("attributes"===e.type&&"class"===e.attributeName){let t=e.target.classList.contains(this.classToWatch);(this.ignoreToggle||this.lastClassState!==t)&&(this.lastClassState=t,t?"function"==typeof this.classAddedCallback&&this.classAddedCallback():"function"==typeof this.classRemovedCallback&&this.classRemovedCallback())}}}class hi{constructor(t,e,i,s){this.targetNode=t,this.contentSelector=e,this.contentAddedCallback=i,this.contentRemovedCallback=s,this.observer=null,this.init()}init(){this.observer=new MutationObserver((t=>this.mutationCallback(t))),this.observe()}observe(){this.observer.observe(this.targetNode,{childList:!0,subtree:!0})}disconnect(){this.observer.disconnect()}mutationCallback(t){for(let e of t)"childList"===e.type&&(e.addedNodes.forEach((t=>{this._callbackExec(t)})),e.removedNodes.forEach((t=>{this._callbackExec(t,!0)})))}_callbackExec(t,e){const i=t.matches&&t.matches(this.contentSelector)?[t]:t.querySelectorAll?t.querySelectorAll(this.contentSelector):null,s=e&&"function"==typeof this.contentRemovedCallback?this.contentRemovedCallback:"function"==typeof this.contentAddedCallback?this.contentAddedCallback:null;i&&s&&i.forEach((t=>s(t)))}}const ui={errorFieldCssClass:"is-invalid",errorLabelCssClass:"just-validate-error-label"},di="justvalidatebi";class fi extends Q{constructor(t){super(t),this._label=new at(t),this._bindEvents()}static get NAME(){return"input"}_bindEvents(){"file"===this._element.getAttribute("type")&&H.on(this._element,"change.bs.input",(()=>{this._handleFileDescription()}))}_handleFileDescription(){const t=[];let e="";Array.from(this._element.files).forEach((e=>{const i=Math.round(parseInt(e.size,10)/1024);t.push(e.name+" ("+i+"kb)")})),this._element.files.length>1&&(e=this._element.files.length+" file da caricare: ");const i=Z.findOne('label[for="'+this._element.getAttribute("id")+'"] label.form-file-name',this._element);i&&(i.innerText=e+t.join("; "))}}const pi=["select",'input[data-bs-input][type="password"]',"input.input-password[data-bs-input]",'input[data-bs-autocomplete][type="search"]','input[type="time"]','input[type="radio"]','input[type="checkbox"]'];"undefined"!=typeof document&&document.addEventListener("DOMContentLoaded",(function(){document.querySelectorAll("input, textarea, label").forEach((function(t){(t=>{const e=!!pi.find((e=>t.matches(e))),i=!("number"!==t.getAttribute("type")||!t.parentNode.querySelector('button[class^="input-number-"]'));e||i||fi.getOrCreateInstance(t)})(at.getInputFromLabel(t)||t)}))}));const mi={autocomplete:[]},gi="autocomplete-list-show",_i="data-bs-autocomplete",bi="input["+_i+'][type="search"]';class vi extends Q{constructor(t,e){super(t),this._config=this._getConfig(e),this._items=[],this._autocompleteElement=null,this._label=new at(t),this._init(),this._bindEvents()}static get NAME(){return"inputsearchautocomplete"}search(){const t=this._element.value;
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@popperjs/core"),require("video.js"),require("animejs/lib/anime.es.js"),require("@splidejs/splide"),require("accessible-autocomplete")):"function"==typeof define&&define.amd?define(["@popperjs/core","video.js","animejs/lib/anime.es.js","@splidejs/splide","accessible-autocomplete"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap=e(t.Popper,t.videojs,t.anime,t.Splide,t.accessibleAutocomplete)}(this,(function(t,e,i,s,n){"use strict";function o(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const i in t)if("default"!==i){const s=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>t[i]})}return e.default=t,Object.freeze(e)}const r=o(t);!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 a="data-focus-mouse",l="focus--mouse";class c{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.classList.add(l),t.target.setAttribute(a,!0))})),document.addEventListener("focusout",(t=>{t.target&&(t.target.classList.remove(l),t.target.setAttribute(a,!1))}))}}new c;const h=()=>{"undefined"==typeof window||window.BOOTSTRAP_ITALIA_VERSION||(new c,window.BOOTSTRAP_ITALIA_VERSION="2.13.3")};h();const u={ck3:{}},d={rememberChoice:(t,e)=>{u.ck3[t]=e,localStorage.setItem("bs-ck3",JSON.stringify(u.ck3))},isChoiceRemembered:t=>(u.ck3=JSON.parse(localStorage.getItem("bs-ck3")||"{}"),u.ck3[t]||!1),clearAllRememberedChoices:()=>{localStorage.removeItem("bs-ck3")}},f=new Map,p={set(t,e,i){f.has(t)||f.set(t,new Map);const s=f.get(t);s.has(e)||0===s.size?s.set(e,i):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(s.keys())[0]}.`)},get:(t,e)=>f.has(t)&&f.get(t).get(e)||null,remove(t,e){if(!f.has(t))return;const i=f.get(t);i.delete(e),0===i.size&&f.delete(t)}},m="transitionend",g=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},_=t=>{const e=g(t);return e&&document.querySelector(e)?e:null},b=t=>{const e=g(t);return e?document.querySelector(e):null},v=t=>{t.dispatchEvent(new Event(m))},y=t=>!(!t||"object"!=typeof t)&&void 0!==t.nodeType,w=t=>y(t)?t:"string"==typeof t&&t.length>0?document.querySelector(t):null,E=t=>{if(!y(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},C=t=>!t||t.nodeType!==Node.ELEMENT_NODE||(!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled"))),S=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?S(t.parentNode):null},k=()=>{},T=t=>{t.offsetHeight},A=()=>"undefined"!=typeof window&&"undefined"!=typeof document&&"rtl"===document.documentElement.dir,L=t=>{"function"==typeof t&&t()},x=(t,e,i=!0)=>{if(!i)return void L(t);const s=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:i}=window.getComputedStyle(t);const s=Number.parseFloat(e),n=Number.parseFloat(i);return s||n?(e=e.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(i))):0})(e)+5;let n=!1;const o=({target:i})=>{i===e&&(n=!0,e.removeEventListener(m,o),L(t))};e.addEventListener(m,o),setTimeout((()=>{n||v(e)}),s)},O=(t,e,i,s)=>{const n=t.length;let o=t.indexOf(e);return-1===o?!i&&s?t[n-1]:t[0]:(o+=i?1:-1,s&&(o=(o+n)%n),t[Math.max(0,Math.min(o,n-1))])},I=/[^.]*(?=\..*)\.|.*/,P=/\..*/,M=/::\d+$/,$={};let F=1;const j={mouseenter:"mouseover",mouseleave:"mouseout"},N=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 D(t,e){return e&&`${e}::${F++}`||t.uidEvent||F++}function R(t){const e=D(t);return t.uidEvent=e,$[e]=$[e]||{},$[e]}function B(t,e,i=null){return Object.values(t).find((t=>t.callable===e&&t.delegationSelector===i))}function V(t,e,i){const s="string"==typeof e,n=s?i:e||i;let o=(r=(r=t).replace(P,""),j[r]||r);var r;return N.has(o)||(o=t),[s,n,o]}function z(t,e,i,s,n){if("string"!=typeof e||!t)return;let[o,r,a]=V(e,i,s);if(e in j){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=R(t),c=l[a]||(l[a]={}),h=B(c,r,o?i:null);if(h)return void(h.oneOff=h.oneOff&&n);const u=D(r,e.replace(I,"")),d=o?function(t,e,i){return function s(n){const o=t.querySelectorAll(e);for(let{target:r}=n;r&&r!==this;r=r.parentNode)for(const a of o)if(a===r)return G(n,{delegateTarget:r}),s.oneOff&&H.off(t,n.type,e,i),i.apply(r,[n])}}(t,i,r):function(t,e){return function i(s){return G(s,{delegateTarget:t}),i.oneOff&&H.off(t,s.type,e),e.apply(t,[s])}}(t,r);d.delegationSelector=o?i:null,d.callable=r,d.oneOff=n,d.uidEvent=u,c[u]=d,t.addEventListener(a,d,o)}function W(t,e,i,s,n){const o=B(e[i],s,n);o&&(t.removeEventListener(i,o,Boolean(n)),delete e[i][o.uidEvent])}function q(t,e,i,s){const n=e[i]||{};for(const o of Object.keys(n))if(o.includes(s)){const s=n[o];W(t,e,i,s.callable,s.delegationSelector)}}const H={on(t,e,i,s){z(t,e,i,s,!1)},one(t,e,i,s){z(t,e,i,s,!0)},off(t,e,i,s){if("string"!=typeof e||!t)return;const[n,o,r]=V(e,i,s),a=r!==e,l=R(t),c=l[r]||{},h=e.startsWith(".");if(void 0===o){if(h)for(const i of Object.keys(l))q(t,l,i,e.slice(1));for(const i of Object.keys(c)){const s=i.replace(M,"");if(!a||e.includes(s)){const e=c[i];W(t,l,r,e.callable,e.delegationSelector)}}}else{if(!Object.keys(c).length)return;W(t,l,r,o,n?i:null)}},trigger(t,e,i){if("string"!=typeof e||!t)return null;let s=new Event(e,{bubbles:!0,cancelable:!0});return s=G(s,i),t.dispatchEvent(s),s}};function G(t,e){for(const[i,s]of Object.entries(e||{}))try{t[i]=s}catch{Object.defineProperty(t,i,{configurable:!0,get:()=>s})}return t}function U(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 Y(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}const X={setDataAttribute(t,e,i){t.setAttribute(`data-bs-${Y(e)}`,i)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${Y(e)}`)},getDataAttributes(t){if(!t)return{};const e={},i=Object.keys(t.dataset).filter((t=>t.startsWith("bs")&&!t.startsWith("bsConfig")));for(const s of i){let i=s.replace(/^bs/,"");i=i.charAt(0).toLowerCase()+i.slice(1,i.length),e[i]=U(t.dataset[s])}return e},getDataAttribute:(t,e)=>U(t.getAttribute(`data-bs-${Y(e)}`))};class K{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=y(e)?X.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"==typeof i?i:{},...y(e)?X.getDataAttributes(e):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const s of Object.keys(e)){const n=e[s],o=t[s],r=y(o)?"element":null==(i=o)?`${i}`:Object.prototype.toString.call(i).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(n).test(r))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${s}" provided type "${r}" but expected type "${n}".`)}var i}}class Q extends K{constructor(t,e){super(),(t=w(t))&&(this._element=t,this._config=this._getConfig(e),p.set(this._element,this.constructor.DATA_KEY,this))}dispose(){p.remove(this._element,this.constructor.DATA_KEY),H.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 p.get(w(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 Z={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 s=t.parentNode.closest(e);for(;s;)i.push(s),s=s.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=>!C(t)&&E(t)))}},J={slideFocus:!0,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"}},tt={"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 et extends Q{constructor(t){super(t),this._config=this._getConfig(),this._splide=new s(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({},J);return Object.keys(tt).forEach((e=>{this._element.classList.contains(e)&&(t=Object.assign({},t,tt[e]))})),t}}"undefined"!=typeof window&&"undefined"!=typeof document&&H.on(window,"load.bs.carousel.data-api",(()=>{Z.find("[data-bs-carousel-splide]").forEach((t=>{et.getOrCreateInstance(t)}))}));const it=".bs.inputlabel",st=`focus${it}`,nt=`blur${it}`,ot=`change${it}`,rt="active";class at{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(rt)&&(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")?H.on(this._element,nt,(()=>{this._labelOut()})):(H.on(this._element,st,(()=>{this._labelOut()})),H.on(this._element,nt,(()=>{this._labelOver()})),H.on(this._element,ot,(()=>{this._labelToggle()}))))}_getLabel(){return Z.findOne('label[for="'+this._element.getAttribute("id")+'"]')}_isEmpty(){return!this._element.value&&!this._element.getAttribute("placeholder")}_labelOut(){const t=this._getLabel();t&&t.classList.add(rt)}_labelOver(){if(this._isEmpty()){const t=this._getLabel();t&&t.classList.remove(rt)}}_labelToggle(){this._isEmpty()?this._labelOver():this._labelOut()}}const lt=".bs.inputnumber",ct=`click${lt}`,ht=`change${lt}`,ut=`click${lt}.data-api`,dt=".input-number",ft='input[data-bs-input][type="number"]',pt='button[class^="input-number-"]';class mt extends Q{constructor(t){super(t),this._wrapperElement=this._element.closest(dt),this._label=new at(t),this._init(),this._bindEvents()}static get NAME(){return"inputnumber"}_init(){this._wrapperElement&&this._inputResize()}_bindEvents(){this._wrapperElement&&(Z.find(pt,this._wrapperElement).forEach((t=>{H.on(t,ct,(e=>{e.preventDefault(),this._incrDecr(t.classList.contains("input-number-sub")),this._label._labelOut()}))})),H.on(this._element,ht,(()=>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){var e=0;if(""!==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),H.trigger(this._element,ht),H.trigger(this._element,"input")}}_checkLimit(){const t=parseFloat(this._element.value);if(!isNaN(t)){let e=t;const i=parseFloat(this._element.getAttribute("max")),s=parseFloat(this._element.getAttribute("min"));s&&t<s&&(e=s),i&&t>i&&(e=i),this._element.value=e}this._inputResize()}}"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("DOMContentLoaded",(function(){document.querySelectorAll(ft+", label").forEach((function(t){const e=at.getInputFromLabel(t)||t;var i;(i=e)&&i.matches(ft)&&i.parentNode.querySelector(pt)&&mt.getOrCreateInstance(i)}))})),H.on(document,ut,pt,(function(){const t=this.closest(dt);if(t){const e=Z.findOne(ft,t);e&&mt.getOrCreateInstance(e)}})));const gt="show";class _t extends Q{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(gt),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&&T(this._element),this._element.classList.add(gt);this._queueCallback((()=>{this._isTransitioning=!1}),this._element,t)}_hideElement(){this._element.setAttribute("aria-hidden",!0),this._isTransitioning=!1}}"undefined"!=typeof window&&"undefined"!=typeof document&&H.on(document,"click.bs.dimmer.data-api",'[data-bs-toggle="dimmer"]',(function(){const t=b(this),e=_t.getOrCreateInstance(t);this.checked?e.show():e.hide()}));const bt=(t,e="hide")=>{const i=`click.dismiss${t.EVENT_KEY}`,s=t.NAME;H.on(document,i,`[data-bs-dismiss="${s}"]`,(function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),C(this))return;const n=b(this)||this.closest(`.${s}`);t.getOrCreateInstance(n)[e]()}))},vt=".bs.notification",yt=`click${vt}.data-api`,wt=`hidden${vt}`,Et=`show${vt}`,Ct={timeout:0},St="show";class kt extends Q{constructor(t,e){super(t),this._config=this._getConfig(e),this._isShown=this._element.classList.contains(St),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(St),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&&T(this._element),this._element.classList.add(St);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={...Ct,...X.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&&(H.on(document,yt,'[data-bs-toggle="notification"]',(function(t){const e=b(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),H.one(e,Et,(t=>{t.defaultPrevented||H.one(e,wt,(()=>{E(this)&&this.focus()}))}));kt.getOrCreateInstance(e).toggle(this)})),bt(kt));const Tt="cookiebar",At=".bs.cookiebar",Lt=".data-api",xt="cookies_consent",Ot=`close${At}`,It=`closed${At}`,Pt=`load${At}${Lt}`,Mt=`click${At}${Lt}`,$t="show";class Ft extends Q{constructor(t){super(t),this._isShown=this._element.classList.contains($t),this._isTransitioning=!1}static get NAME(){return Tt}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($t),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&&T(this._element),this._element.classList.add($t);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=b(t);let i=null;return e&&(i=e),i||(i=t.closest(".cookiebar")),i}_triggerCloseEvent(t){return H.trigger(t,Ot)}_removeElement(t){t.classList.remove($t),t.setAttribute("aria-hidden","true"),t.setAttribute("aria-live","off"),H.trigger(t,It),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,s=document.cookie.split(";");for(t=0;t<s.length;t++)if(e=s[t].substring(0,s[t].indexOf("=")),i=s[t].substring(s[t].indexOf("=")+1),(e=e.replace(/^\s+|\s+$/g,""))==xt)return unescape(i)}}}"undefined"!=typeof window&&"undefined"!=typeof document&&(H.on(document,Mt,'[data-bs-accept="cookiebar"]',(function(t){if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),C(this))return;const e=b(this)||this.closest(`.${Tt}`);Ft.getOrCreateInstance(e).accept()})),H.on(window,Pt,(function(){if(!Ft._getCookieEU()){if("undefined"==typeof document)return;document.querySelectorAll(".cookiebar").forEach((t=>{Ft.getOrCreateInstance(t).show()}))}})));const jt=()=>{if("undefined"!=typeof window)return window.matchMedia("(max-width: 991px)").matches},Nt=(t,e)=>{let i=null;return e.forEach(((e,s)=>{e===t&&(i=s)})),i},Dt=(t,e,i)=>{i={isDirectionTop:!1,isLimit:!1,loop:!1,..."object"==typeof i?i:{}};const s=Nt(t,e);let n=null;if(i.isLimit&&i.isDirectionTop&&s>0)n=e[0];else if(i.isLimit&&s<e.length-1)n=e[e.length-1];else if(i.isDirectionTop){if(!i.loop&&0===s)return;n=e[0===s?e.length-1:s-1]}else{if(!i.loop&&s===e.length-1)return;n=e[s===e.length-1?0:s+1]}n&&n.focus()},Rt="pagescroll-scroll-disabled";let Bt=!1,Vt="undefined"==typeof document?0:document.scrollingElement.scrollTop;const zt="undefined"==typeof document?null:document.querySelector("html");"undefined"!=typeof document&&document.addEventListener("scroll",(()=>{Bt&&(document.scrollingElement.scrollTop=Vt)}));const Wt=".bs.navbarcollapsible",qt=`click${Wt}.data-api`,Ht=`click${Wt}`,Gt=`keyup${Wt}`,Ut=`keydown${Wt}`,Yt=`hide${Wt}`,Xt=`hidden${Wt}`,Kt=`show${Wt}`,Qt=`shown${Wt}`,Zt=`resize${Wt}`,Jt="show",te="expanded",ee=".close-menu",ie=".nav-link",se=".nav-item .list-item",ne=".it-heading-link",oe=".it-footer-link";class re extends Q{constructor(t){super(t),this._isShown=this._element.classList.contains(te),this._isTransitioning=!1,this._isMobile=jt(),this._isKeyShift=!1,this._currItemIdx=0,this._btnClose=Z.findOne(".close-div button",this._element),this._btnBack=Z.findOne(".it-back-button",this._element),this._menuWrapper=Z.findOne(".menu-wrapper",this._element),this._overlay=null,this._setOverlay(),this._menuItems=Z.find([ie,se,ne,oe,ee].join(","),this._element),this._bindEvents()}static get NAME(){return"navbarcollapsible"}show(t){if(this._isShown||this._isTransitioning)return;H.trigger(this._element,Kt,{relatedTarget:t}).defaultPrevented||(this._btnBack&&this._btnBack.classList.add(Jt),this._isShown=!0,"undefined"!=typeof document&&(Bt=!0,Vt=document.scrollingElement.scrollTop,zt.classList.add(Rt)),this._showElement())}hide(){if(!this._isShown||this._isTransitioning)return;if(H.trigger(this._element,Yt).defaultPrevented)return;this._isShown=!1;const t=this._isAnimated();t&&(this._isTransitioning=!0),this._btnBack&&this._btnBack.classList.remove(Jt),this._overlay&&this._overlay.classList.remove(Jt),this._element.classList.remove(te),"undefined"!=typeof document&&(Bt=!1,zt.classList.remove(Rt)),this._queueCallback((()=>this._hideElement()),this._menuWrapper,t)}toggle(t){this._isShown?this.hide():this.show(t)}dispose(){"undefined"!=typeof window&&"undefined"!=typeof document&&(H.off(window,Zt),super.dispose())}_bindEvents(){"undefined"!=typeof window&&"undefined"!=typeof document&&(H.on(window,Zt,(()=>this._onResize())),this._overlay&&H.on(this._overlay,Ht,(()=>this.hide())),H.on(this._btnClose,Ht,(t=>{t.preventDefault(),this.hide()})),H.on(this._btnBack,Ht,(t=>{t.preventDefault(),this.hide()})),this._menuItems.forEach((t=>{H.on(t,Ut,(t=>this._isMobile&&this._onMenuItemKeyDown(t))),H.on(t,Gt,(t=>this._isMobile&&this._onMenuItemKeyUp(t))),H.on(t,Ht,(t=>this._isMobile&&this._onMenuItemClick(t)))})))}_onResize(){this._isMobile=jt()}_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=Nt(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&&T(this._element),this._element.classList.add(te),this._overlay&&this._overlay.classList.add(Jt);this._queueCallback((()=>{this._isTransitioning=!1;const t=this._getNextVisibleItem(0);t.item&&(t.item.focus(),this._currItemIdx=t.index),H.trigger(this._element,Qt)}),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,H.trigger(this._element,Xt)}_setOverlay(){this._overlay=Z.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,s=null,n=t,o=e?-1:1,r=!1;for(;!(i||n==t&&r);)n==t&&(r=!0),this._isElementHidden(this._menuItems[n])||(i=this._menuItems[n],s=n),n+=o,n<0?n=this._menuItems.length-1:n>=this._menuItems.length&&(n=0);return{item:i,index:s}}}"undefined"!=typeof window&&"undefined"!=typeof document&&H.on(document,qt,'[data-bs-toggle="navbarcollapsible"]',(function(t){const e=b(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),H.one(e,Kt,(t=>{t.defaultPrevented||H.one(e,Xt,(()=>{E(this)&&this.focus()}))}));re.getOrCreateInstance(e).toggle(this)}));const ae=".bs.accordion",le=`keydown${ae}`,ce=`keydown${ae}.data-api`,he='.accordion-item > .accordion-header [data-bs-toggle="collapse"]';class ue extends Q{constructor(t){super(t),this._bindEvents()}static get NAME(){return"accordion"}handleKeyDown(t,e,i){const s={ArrowDown:t=>this._focusNext(t),ArrowUp:t=>this._focusPrev(t),Home:t=>this._focusFirst(t),End:t=>this._focusLast(t)};"function"==typeof s[t]&&(i&&i.preventDefault(),s[t](e))}_bindEvents(){Z.find(he,this._element).forEach((t=>{H.on(t,le,(t=>{this.handleKeyDown(t.key,t.currentTarget,t)}))}))}_getHeadButtons(){return Z.find(":scope > "+he,this._element)}_focusNext(t){Dt(t,this._getHeadButtons(),{loop:!0})}_focusPrev(t){Dt(t,this._getHeadButtons(),{isDirectionTop:!0,loop:!0})}_focusFirst(t){Dt(t,this._getHeadButtons(),{isDirectionTop:!0,isLimit:!0})}_focusLast(t){Dt(t,this._getHeadButtons(),{isLimit:!0})}}var de;"undefined"!=typeof window&&"undefined"!=typeof document&&H.on(document,ce,he,(function(t){const e=this.closest(".accordion");if(e){ue.getOrCreateInstance(e).handleKeyDown(t.key,this,t)}}));var fe=new Uint8Array(16);function pe(){if(!de&&!(de="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 de(fe)}const me=/^(?:[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 ge=[],_e=0;_e<256;++_e)ge.push((_e+256).toString(16).substr(1));function be(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=(ge[t[e+0]]+ge[t[e+1]]+ge[t[e+2]]+ge[t[e+3]]+"-"+ge[t[e+4]]+ge[t[e+5]]+"-"+ge[t[e+6]]+ge[t[e+7]]+"-"+ge[t[e+8]]+ge[t[e+9]]+"-"+ge[t[e+10]]+ge[t[e+11]]+ge[t[e+12]]+ge[t[e+13]]+ge[t[e+14]]+ge[t[e+15]]).toLowerCase();if(!function(t){return"string"==typeof t&&me.test(t)}(i))throw TypeError("Stringified UUID is invalid");return i}function ve(t,e,i){var s=(t=t||{}).random||(t.rng||pe)();return s[6]=15&s[6]|64,s[8]=63&s[8]|128,be(s)}let ye=!1,we=[];class Ee{constructor(t,e){this.id=t,this._callback=e}dispose(){Ce(this.id)}_execute(t){this._callback(t)}}const Ce=t=>{we=we.filter((e=>e.id!==t))},Se=t=>{if("undefined"!=typeof document){if(we.length||"undefined"!=typeof window&&"undefined"!=typeof document&&document.addEventListener("scroll",(t=>{ye||(window.requestAnimationFrame((()=>{we.forEach((e=>e.cb._execute(t))),ye=!1})),ye=!0)})),"function"==typeof t){const e=new Ee(ve(),t);return we.push({id:e.id,cb:e}),e}return console.error("[onDocumentScroll] the provided data has to be of type function"),null}},ke={duration:800,easing:"easeInOutSine"},Te=(t,e)=>{if("undefined"==typeof window||"undefined"==typeof document)return;const s=("object"==typeof e?e:{}).complete,n=window.document.scrollingElement||window.document.body||window.document.documentElement,o=n.style.scrollBehavior;e={scrollTop:t||0,...ke,..."object"==typeof e?e:{}},n.style.scrollBehavior="auto",e.complete=t=>{n.style.scrollBehavior=o,"function"==typeof s&&s(t)},i({targets:n,...e})},Ae="active",Le="ul.link-list",xe="a.nav-link",Oe=`${xe}.${Ae}`,Ie=`${xe}[href^="#"]`,Pe={scrollPadding:10,duration:800,easing:"easeInOutSine"};class Me extends Q{constructor(t,e){super(t),this._config=this._getConfig(e),this._togglerElement=Z.findOne(".custom-navbar-toggler",this._element),this._sectionContainer=Z.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={...Pe,...X.getDataAttributes(this._element),..."object"==typeof t?t:{}}}_bindEvents(){this._scrollCb=Se((()=>this._onScroll())),this._collapsible&&(H.on(this._collapsible._element,"shown.bs.navbarcollapsible",(()=>this._onCollapseOpened())),H.on(this._collapsible._element,"hidden.bs.navbarcollapsible",(()=>this._onCollapseClosed()))),Z.find(Ie,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&&H.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(Le),s=null,n=!1;for(;i&&!n;){const t=i.closest("li.nav-link, li.nav-item");if(t){const i=t.querySelector(xe);i&&e.push(i)}s=i,i=(i.parentElement||i).closest(Le),i===s&&(n=!0)}return e}_decorateToggler(t){if(this._togglerElement){const e=Z.findOne(".it-list",this._togglerElement);this._togglerElement.innerText="",this._togglerElement.textContent="",this._togglerElement.append(e),this._togglerElement.append(t)}}_scrollToHash(t){const e=Z.findOne(t,this._sectionContainer);e&&(Te(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=Z.find(".it-navscroll-progressbar");if(e){const i=Math.abs(t.getBoundingClientRect().top)/t.getBoundingClientRect().height*100,s=Math.min(100,Math.max(0,i));e.forEach((e=>{t.getBoundingClientRect().top<=0?(e.style.width=s+"%",e.setAttribute("aria-valuenow",s)):(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=Z.find(xe,this._element),s=this._getScrollPadding();Z.find(".it-page-section").forEach(((n,o)=>{if(n.offsetTop-t<=e+s&&(Z.find(Oe,this._element).forEach((t=>{t.classList.remove(Ae)})),o<i.length)){const t=i[o];this._getParentLinks(t).forEach((t=>{t.classList.add(Ae)})),t.classList.add(Ae),this._decorateToggler(t.innerText)}})),this._updateProgress(this._sectionContainer)}_getCollapsible(){const t=Z.findOne(".navbar-collapsable",this._element);return t?re.getOrCreateInstance(t):null}_getScrollPadding(){return"function"==typeof this._config.scrollPadding?this._config.scrollPadding():this._config.scrollPadding}}if("undefined"!=typeof window&&"undefined"!=typeof document){Z.find("[data-bs-navscroll]").map((t=>{Me.getOrCreateInstance(t)}))}const $e=".bs.sticky",Fe=`resize${$e}`,je=`on${$e}`,Ne=`off${$e}`,De="bs-is-sticky",Re="bs-is-fixed",Be='[data-bs-toggle="sticky"]',Ve={positionType:"sticky",stickyClassName:"",stackable:!1,paddingTop:0};class ze extends Q{constructor(t,e){super(t),this._config=this._getConfig(e),this._isSticky=!1,this._wrapper=null,this._stickyTarget=Z.findOne(_(this._element),this._element)||this._element,this._stickyTargetMobile=Z.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=jt(),this._prevTop=0,this._onScroll(),this._bindEvents()}dispose(){"undefined"!=typeof window&&"undefined"!=typeof document&&(H.off(window,Fe),this._scrollCb.dispose(),super.dispose())}static get NAME(){return"sticky"}_getConfig(t){return t={...Ve,...X.getDataAttributes(this._element),..."object"==typeof t?t:{}}}_bindEvents(){"undefined"!=typeof window&&"undefined"!=typeof document&&(H.on(window,Fe,(()=>this._onResize())),this._scrollCb=Se((()=>this._onScroll())))}_onResize(){this._isMobile=jt(),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 s=e.getBoundingClientRect();t-=s.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=De;this._isTypeSticky()||(t=Re,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",H.trigger(this._element,je)}}_unsetSticky(){if(this._isSticky){let t=De;this._isTypeSticky()||(t=Re,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,H.trigger(this._element,Ne)}}_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 Z.find(Be).filter((t=>{const e=ze.getInstance(t);return!(!e||!e._isSticky||t===this._element)}))}_getPositionTop(){let t=0;return this._config.stackable?(this._getStickySimblings().forEach(((e,i)=>{const s=e.getBoundingClientRect();t+=s.height+(0===i?parseFloat(e.style.top):0)})),t):t+this._config.paddingTop}}"undefined"!=typeof window&&"undefined"!=typeof document&&Se((()=>{Z.find(Be).map((t=>{ze.getOrCreateInstance(t)}))}));const We="cloned-element",qe=`.${We}`,He=new Map;class Ge{constructor(t){if(He.get(t))return null;this._element=t,this._elementObj=ze.getOrCreateInstance(t),He.set(t,this._elementObj),this._bindEvents(),this._toggleClonedElement(this._element.classList.contains("is-sticky"))}static getOrCreateInstance(t){return He.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(!E(Z.findOne(".custom-navbar-toggler",this._element))){const e=Z.findOne(".menu-wrapper",this._element);if(t){const t=Z.findOne(".it-brand-wrapper",this._element),i=Z.findOne(".it-search-wrapper",this._element),s=Z.findOne(".it-user-wrapper",this._element),n=t?t.cloneNode(!0):null,o=i?i.cloneNode(!0):null,r=s?s.cloneNode(!0):null;n&&e.insertBefore(n,e.childNodes[0]).classList.add(We),o&&e.appendChild(o).classList.add(We),r&&(e.appendChild(r).classList.add(We),e.appendChild(r).classList.remove("show"))}else Z.find(qe,this._element).forEach((t=>{t.parentElement.removeChild(t)}))}}}Se((()=>{Z.find(".it-header-sticky").map((t=>{Ge.getOrCreateInstance(t)}))}));var Ue=Object.defineProperty,Ye=(t,e,i)=>(((t,e,i)=>{e in t?Ue(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i})(t,"symbol"!=typeof e?e+"":e,i),i);const Xe=/^(([^<>()[\]\\.,;:\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,}))$/,Ke=/^-?[0-9]\d*$/,Qe=/^(?=.*[A-Za-z])(?=.*\d).{8,}$/,Ze=/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/,Je=t=>"string"!=typeof t||""===t;var ti=(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))(ti||{}),ei=(t=>(t.Required="required",t))(ei||{}),ii=(t=>(t.Label="label",t.LabelArrow="labelArrow",t))(ii||{});const si=[{key:ti.Required,dict:{en:"The field is required"}},{key:ti.Email,dict:{en:"Email has invalid format"}},{key:ti.MaxLength,dict:{en:"The field must contain a maximum of :value characters"}},{key:ti.MinLength,dict:{en:"The field must contain a minimum of :value characters"}},{key:ti.Password,dict:{en:"Password must contain minimum eight characters, at least one letter and one number"}},{key:ti.StrongPassword,dict:{en:"Password should contain minimum eight characters, at least one uppercase letter, one lowercase letter, one number and one special character"}},{key:ti.Number,dict:{en:"Value should be a number"}},{key:ti.MaxNumber,dict:{en:"Number should be less or equal than :value"}},{key:ti.MinNumber,dict:{en:"Number should be more or equal than :value"}},{key:ti.MinFilesCount,dict:{en:"Files count should be more or equal than :value"}},{key:ti.MaxFilesCount,dict:{en:"Files count should be less or equal than :value"}},{key:ti.Files,dict:{en:"Uploaded files have one or several invalid properties (extension/size/type etc)."}}],ni=t=>"object"==typeof t&&null!==t&&"then"in t&&"function"==typeof t.then,oi=t=>Array.isArray(t)?t.filter((t=>t.length>0)):"string"==typeof t&&t.trim()?[...t.split(" ").filter((t=>t.length>0))]:[],ri=t=>t instanceof Element||t instanceof HTMLDocument,ai={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 li{constructor(t,e,i){Ye(this,"form",null),Ye(this,"fields",{}),Ye(this,"groupFields",{}),Ye(this,"errors",{}),Ye(this,"isValid",!1),Ye(this,"isSubmitted",!1),Ye(this,"globalConfig",ai),Ye(this,"errorLabels",{}),Ye(this,"successLabels",{}),Ye(this,"eventListeners",[]),Ye(this,"dictLocale",si),Ye(this,"currentLocale","en"),Ye(this,"customStyleTags",{}),Ye(this,"onSuccessCallback"),Ye(this,"onFailCallback"),Ye(this,"onValidateCallback"),Ye(this,"tooltips",[]),Ye(this,"lastScrollPosition"),Ye(this,"isScrollTick"),Ye(this,"fieldIds",new Map),Ye(this,"getKeyByFieldSelector",(t=>this.fieldIds.get(t))),Ye(this,"getFieldSelectorByKey",(t=>{for(const[e,i]of this.fieldIds)if(t===i)return e})),Ye(this,"getCompatibleFields",(()=>{const t={};return Object.keys(this.fields).forEach((e=>{let i=e;const s=this.getFieldSelectorByKey(e);"string"==typeof s&&(i=s),t[i]={...this.fields[e]}})),t})),Ye(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})),Ye(this,"refreshAllTooltips",(()=>{this.tooltips.forEach((t=>{t.refresh()}))})),Ye(this,"handleDocumentScroll",(()=>{this.lastScrollPosition=window.scrollY,this.isScrollTick||(window.requestAnimationFrame((()=>{this.refreshAllTooltips(),this.isScrollTick=!1})),this.isScrollTick=!0)})),Ye(this,"formSubmitHandler",(t=>{t.preventDefault(),this.isSubmitted=!0,this.validateHandler(t)})),Ye(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))})),Ye(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))})),Ye(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=ai,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={...ai,...e},i&&(this.dictLocale=[...i,...si]),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[ii.Label]=document.head.appendChild(t),this.addListener("scroll",document,this.handleDocumentScroll)}}getLocalisedString(t,e,i){var s;const n=null!=i?i:t;let o=null==(s=this.dictLocale.find((t=>t.key===n)))?void 0:s.dict[this.currentLocale];if(o||i&&(o=i),o&&void 0!==e)switch(t){case ti.MaxLength:case ti.MinLength:case ti.MaxNumber:case ti.MinNumber:case ti.MinFilesCount:case ti.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===ei.Required)e.every((t=>!t.checked))?this.setGroupInvalid(t,i):this.setGroupValid(t,i)}validateFieldRule(t,e,i,s=!1){const n=i.value,o=this.getElemValue(e);if(i.plugin){i.plugin(o,this.getCompatibleFields())||this.setFieldInvalid(t,i)}else{switch(i.rule){case ti.Required:(t=>{let e=t;return"string"==typeof t&&(e=t.trim()),!e})(o)&&this.setFieldInvalid(t,i);break;case ti.Email:if(Je(o))break;r=o,Xe.test(r)||this.setFieldInvalid(t,i);break;case ti.MaxLength:if(void 0===n){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 n){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(Je(o))break;((t,e)=>t.length>e)(o,n)&&this.setFieldInvalid(t,i);break;case ti.MinLength:if(void 0===n){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 n){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(Je(o))break;((t,e)=>t.length<e)(o,n)&&this.setFieldInvalid(t,i);break;case ti.Password:if(Je(o))break;(t=>Qe.test(t))(o)||this.setFieldInvalid(t,i);break;case ti.StrongPassword:if(Je(o))break;(t=>Ze.test(t))(o)||this.setFieldInvalid(t,i);break;case ti.Number:if(Je(o))break;(t=>"string"==typeof t&&!isNaN(+t)&&!isNaN(parseFloat(t)))(o)||this.setFieldInvalid(t,i);break;case ti.Integer:if(Je(o))break;(t=>Ke.test(t))(o)||this.setFieldInvalid(t,i);break;case ti.MaxNumber:{if(void 0===n){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 n){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(Je(o))break;const e=+o;(Number.isNaN(e)||((t,e)=>t>e)(e,n))&&this.setFieldInvalid(t,i);break}case ti.MinNumber:{if(void 0===n){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 n){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(Je(o))break;const e=+o;(Number.isNaN(e)||((t,e)=>t<e)(e,n))&&this.setFieldInvalid(t,i);break}case ti.CustomRegexp:{if(void 0===n)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(n)}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 s=String(o);""===s||e.test(s)||this.setFieldInvalid(t,i);break}case ti.MinFilesCount:if(void 0===n){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 n){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<n){this.setFieldInvalid(t,i);break}break;case ti.MaxFilesCount:if(void 0===n){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 n){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>n){this.setFieldInvalid(t,i);break}break;case ti.Files:{if(void 0===n)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);if("object"!=typeof n)return console.error(`Value for ${i.rule} rule for [${t}] field should be an object. This field will be always invalid.`),void this.setFieldInvalid(t,i);const e=n.files;if("object"!=typeof e)return console.error(`Value for ${i.rule} rule for [${t}] field should be an object with files array. This field will be always invalid.`),void this.setFieldInvalid(t,i);const s=(t,e)=>{const i=Number.isFinite(e.minSize)&&t.size<e.minSize,s=Number.isFinite(e.maxSize)&&t.size>e.maxSize,n=Array.isArray(e.names)&&!e.names.includes(t.name),o=Array.isArray(e.extensions)&&!e.extensions.includes(t.name.split(".")[t.name.split(".").length-1]),r=Array.isArray(e.types)&&!e.types.includes(t.type);return i||s||n||o||r};if("object"==typeof o&&null!==o)for(let n=0,r=o.length;n<r;++n){const r=o.item(n);if(!r){this.setFieldInvalid(t,i);break}if(s(r,e)){this.setFieldInvalid(t,i);break}}break}default:{if("function"!=typeof i.validator)return console.error(`Validator for custom rule for [${t}] field should be a function. This field will be always invalid.`),void this.setFieldInvalid(t,i);const e=i.validator(o,this.getCompatibleFields());if("boolean"!=typeof e&&"function"!=typeof e&&console.error(`Validator return value for [${t}] field should be boolean or function. It will be cast to boolean.`),"function"==typeof e){if(!s){this.fields[t].asyncCheckPending=!1;const s=e();return ni(s)?s.then((e=>{e||this.setFieldInvalid(t,i)})).catch((()=>{this.setFieldInvalid(t,i)})):(console.error(`Validator function for custom rule for [${t}] field should return a Promise. This field will be always invalid.`),void this.setFieldInvalid(t,i))}this.fields[t].asyncCheckPending=!0}e||this.setFieldInvalid(t,i)}}var r}}isFormValid(){let t=!0;for(let e=0,i=Object.values(this.fields).length;e<i;++e){const i=Object.values(this.fields)[e];if(void 0===i.isValid){t=void 0;break}if(!1===i.isValid){t=!1;break}}for(let e=0,i=Object.values(this.groupFields).length;e<i;++e){const i=Object.values(this.groupFields)[e];if(void 0===i.isValid){t=void 0;break}if(!1===i.isValid){t=!1;break}}return t}validateField(t,e=!1){var i;const s=this.fields[t];s.isValid=!0;const n=[];return[...s.rules].reverse().forEach((i=>{const o=this.validateFieldRule(t,s.elem,i,e);ni(o)&&n.push(o)})),s.isValid&&this.setFieldValid(t,null==(i=s.config)?void 0:i.successMessage),Promise.allSettled(n).finally((()=>{var t;e&&(null==(t=this.onValidateCallback)||t.call(this,{isValid:this.isFormValid(),isSubmitted:this.isSubmitted,fields:this.getCompatibleFields(),groups:{...this.groupFields}}))}))}revalidateField(t){if("string"!=typeof t&&!ri(t))throw Error("Field selector is not valid. Please specify a string selector or a valid DOM element.");const e=this.getKeyByFieldSelector(t);return e&&this.fields[e]?new Promise((t=>{this.validateField(e,!0).finally((()=>{this.clearFieldStyle(e),this.clearFieldLabel(e),this.renderFieldError(e,!0),t(!!this.fields[e].isValid)}))})):(console.error("Field not found. Check the field selector."),Promise.reject())}revalidateGroup(t){if("string"!=typeof t&&!ri(t))throw Error("Group selector is not valid. Please specify a string selector or a valid DOM element.");const e=this.getKeyByFieldSelector(t);return e&&this.groupFields[e]?new Promise((t=>{this.validateGroup(e).finally((()=>{this.clearFieldLabel(e),this.renderGroupError(e,!0),t(!!this.groupFields[e].isValid)}))})):(console.error("Group not found. Check the group selector."),Promise.reject())}validateGroup(t,e=!1){const i=this.groupFields[t],s=[];return[...i.rules].reverse().forEach((e=>{const n=this.validateGroupRule(t,i.elems,e);ni(n)&&s.push(n)})),Promise.allSettled(s).finally((()=>{var t;e&&(null==(t=this.onValidateCallback)||t.call(this,{isValid:this.isFormValid(),isSubmitted:this.isSubmitted,fields:this.getCompatibleFields(),groups:{...this.groupFields}}))}))}focusInvalidField(){for(const t in this.fields){const e=this.fields[t];if(!e.isValid){setTimeout((()=>e.elem.focus()),0);break}}}afterSubmitValidation(t=!1){this.renderErrors(t),this.globalConfig.focusInvalidField&&this.focusInvalidField()}validate(t=!1){return new Promise((e=>{const i=[];Object.keys(this.fields).forEach((t=>{const e=this.validateField(t);ni(e)&&i.push(e)})),Object.keys(this.groupFields).forEach((t=>{const e=this.validateGroup(t);ni(e)&&i.push(e)})),Promise.allSettled(i).then((()=>{var s;this.afterSubmitValidation(t),null==(s=this.onValidateCallback)||s.call(this,{isValid:this.isFormValid(),isSubmitted:this.isSubmitted,fields:this.getCompatibleFields(),groups:{...this.groupFields}}),e(!!i.length)}))}))}revalidate(){return new Promise((t=>{this.validateHandler(void 0,!0).finally((()=>{this.globalConfig.focusInvalidField&&this.focusInvalidField(),t(this.isValid)}))}))}validateHandler(t,e=!1){return this.globalConfig.lockForm&&this.lockForm(),this.validate(e).finally((()=>{var e,i,s;this.globalConfig.lockForm&&this.unlockForm(),this.isValid?(null==(e=this.onSuccessCallback)||e.call(this,t),this.globalConfig.submitFormAutomatically&&(null==(i=null==t?void 0:t.currentTarget)||i.submit())):null==(s=this.onFailCallback)||s.call(this,this.getCompatibleFields(),this.groupFields)}))}setForm(t){this.form=t,this.form.setAttribute("novalidate","novalidate"),this.removeListener("submit",this.form,this.formSubmitHandler),this.addListener("submit",this.form,this.formSubmitHandler)}addListener(t,e,i){e.addEventListener(t,i),this.eventListeners.push({type:t,elem:e,func:i})}removeListener(t,e,i){e.removeEventListener(t,i),this.eventListeners=this.eventListeners.filter((i=>i.type!==t||i.elem!==e))}addField(t,e,i){if("string"!=typeof t&&!ri(t))throw Error("Field selector is not valid. Please specify a string selector or a valid DOM element.");let s;if(s="string"==typeof t?this.form.querySelector(t):t,!s)throw Error("Field doesn't exist in the DOM! Please check the field selector.");if(!Array.isArray(e)||!e.length)throw Error("Rules argument should be an array and should contain at least 1 element.");e.forEach((t=>{if(!("rule"in t||"validator"in t||"plugin"in t))throw Error("Rules argument must contain at least one rule or validator property.");if(!(t.validator||t.plugin||t.rule&&Object.values(ti).includes(t.rule)))throw Error(`Rule should be one of these types: ${Object.values(ti).join(", ")}. Provided value: ${t.rule}`)}));const n=this.setKeyByFieldSelector(t);return this.fields[n]={elem:s,rules:e,isValid:void 0,touched:!1,config:i},this.setListeners(s),(this.isSubmitted||this.globalConfig.validateBeforeSubmitting)&&this.validateField(n),this}removeField(t){if("string"!=typeof t&&!ri(t))throw Error("Field selector is not valid. Please specify a string selector or a valid DOM element.");const e=this.getKeyByFieldSelector(t);if(!e||!this.fields[e])return console.error("Field not found. Check the field selector."),this;const i=this.getListenerType(this.fields[e].elem.type);return this.removeListener(i,this.fields[e].elem,this.handlerChange),this.clearErrors(),delete this.fields[e],this}removeGroup(t){if("string"!=typeof t)throw Error("Group selector is not valid. Please specify a string selector.");const e=this.getKeyByFieldSelector(t);return e&&this.groupFields[e]?(this.groupFields[e].elems.forEach((t=>{const e=this.getListenerType(t.type);this.removeListener(e,t,this.handlerChange)})),this.clearErrors(),delete this.groupFields[e],this):(console.error("Group not found. Check the group selector."),this)}addRequiredGroup(t,e,i,s){if("string"!=typeof t&&!ri(t))throw Error("Group selector is not valid. Please specify a string selector or a valid DOM element.");let n;if(n="string"==typeof t?this.form.querySelector(t):t,!n)throw Error("Group selector not found! Please check the group selector.");const o=n.querySelectorAll("input"),r=Array.from(o).filter((t=>{const e=((t,e)=>{const i=[...e].reverse();for(let e=0,s=i.length;e<s;++e){const s=i[e];for(const e in t){const i=t[e];if(i.groupElem===s)return[e,i]}}return null})(this.groupFields,(t=>{let e=t;const i=[];for(;e;)i.unshift(e),e=e.parentNode;return i})(t));return!e||e[1].elems.find((e=>e!==t))})),a=this.setKeyByFieldSelector(t);return this.groupFields[a]={rules:[{rule:ei.Required,errorMessage:e,successMessage:s}],groupElem:n,elems:r,touched:!1,isValid:void 0,config:i},o.forEach((t=>{this.setListeners(t)})),this}getListenerType(t){switch(t){case"checkbox":case"select-one":case"file":case"radio":return"change";default:return"input"}}setListeners(t){const e=this.getListenerType(t.type);this.removeListener(e,t,this.handlerChange),this.addListener(e,t,this.handlerChange)}clearFieldLabel(t){var e,i;null==(e=this.errorLabels[t])||e.remove(),null==(i=this.successLabels[t])||i.remove()}clearFieldStyle(t){var e,i,s,n;const o=this.fields[t],r=(null==(e=o.config)?void 0:e.errorFieldStyle)||this.globalConfig.errorFieldStyle;Object.keys(r).forEach((t=>{o.elem.style[t]=""}));const a=(null==(i=o.config)?void 0:i.successFieldStyle)||this.globalConfig.successFieldStyle||{};Object.keys(a).forEach((t=>{o.elem.style[t]=""})),o.elem.classList.remove(...oi((null==(s=o.config)?void 0:s.errorFieldCssClass)||this.globalConfig.errorFieldCssClass),...oi((null==(n=o.config)?void 0:n.successFieldCssClass)||this.globalConfig.successFieldCssClass))}clearErrors(){var t,e;Object.keys(this.errorLabels).forEach((t=>this.errorLabels[t].remove())),Object.keys(this.successLabels).forEach((t=>this.successLabels[t].remove()));for(const t in this.fields)this.clearFieldStyle(t);for(const i in this.groupFields){const s=this.groupFields[i],n=(null==(t=s.config)?void 0:t.errorFieldStyle)||this.globalConfig.errorFieldStyle;Object.keys(n).forEach((t=>{s.elems.forEach((e=>{var i;e.style[t]="",e.classList.remove(...oi((null==(i=s.config)?void 0:i.errorFieldCssClass)||this.globalConfig.errorFieldCssClass))}))}));const o=(null==(e=s.config)?void 0:e.successFieldStyle)||this.globalConfig.successFieldStyle||{};Object.keys(o).forEach((t=>{s.elems.forEach((e=>{var i;e.style[t]="",e.classList.remove(...oi((null==(i=s.config)?void 0:i.successFieldCssClass)||this.globalConfig.successFieldCssClass))}))}))}this.tooltips=[]}isTooltip(){return!!this.globalConfig.tooltip}lockForm(){const t=this.form.querySelectorAll("input, textarea, button, select");for(let e=0,i=t.length;e<i;++e)t[e].setAttribute("data-just-validate-fallback-disabled",t[e].disabled?"true":"false"),t[e].setAttribute("disabled","disabled"),t[e].style.pointerEvents="none",t[e].style.webkitFilter="grayscale(100%)",t[e].style.filter="grayscale(100%)"}unlockForm(){const t=this.form.querySelectorAll("input, textarea, button, select");for(let e=0,i=t.length;e<i;++e)"true"!==t[e].getAttribute("data-just-validate-fallback-disabled")&&t[e].removeAttribute("disabled"),t[e].style.pointerEvents="",t[e].style.webkitFilter="",t[e].style.filter=""}renderTooltip(t,e,i){var s;const{top:n,left:o,width:r,height:a}=t.getBoundingClientRect(),l=e.getBoundingClientRect(),c=i||(null==(s=this.globalConfig.tooltip)?void 0:s.position);switch(c){case"left":e.style.top=n+a/2-l.height/2+"px",e.style.left=o-l.width-5+"px";break;case"top":e.style.top=n-l.height-5+"px",e.style.left=o+r/2-l.width/2+"px";break;case"right":e.style.top=n+a/2-l.height/2+"px",e.style.left=`${o+r+5}px`;break;case"bottom":e.style.top=`${n+a+5}px`,e.style.left=o+r/2-l.width/2+"px"}e.dataset.direction=c;return{refresh:()=>{this.renderTooltip(t,e,i)}}}createErrorLabelElem(t,e,i){const s=document.createElement("div");s.innerHTML=e;const n=this.isTooltip()?null==i?void 0:i.errorLabelStyle:(null==i?void 0:i.errorLabelStyle)||this.globalConfig.errorLabelStyle;return Object.assign(s.style,n),s.classList.add(...oi((null==i?void 0:i.errorLabelCssClass)||this.globalConfig.errorLabelCssClass),"just-validate-error-label"),this.isTooltip()&&(s.dataset.tooltip="true"),this.globalConfig.testingMode&&(s.dataset.testId=`error-label-${t}`),this.errorLabels[t]=s,s}createSuccessLabelElem(t,e,i){if(void 0===e)return null;const s=document.createElement("div");s.innerHTML=e;const n=(null==i?void 0:i.successLabelStyle)||this.globalConfig.successLabelStyle;return Object.assign(s.style,n),s.classList.add(...oi((null==i?void 0:i.successLabelCssClass)||this.globalConfig.successLabelCssClass),"just-validate-success-label"),this.globalConfig.testingMode&&(s.dataset.testId=`success-label-${t}`),this.successLabels[t]=s,s}renderErrorsContainer(t,e){const i=e||this.globalConfig.errorsContainer;if("string"==typeof i){const e=this.form.querySelector(i);if(e)return e.appendChild(t),!0;console.error(`Error container with ${i} selector not found. Errors will be rendered as usual`)}return i instanceof Element?(i.appendChild(t),!0):(void 0!==i&&console.error("Error container not found. It should be a string or existing Element. Errors will be rendered as usual"),!1)}renderGroupLabel(t,e,i,s){if(!s){if(this.renderErrorsContainer(e,i))return}t.appendChild(e)}renderFieldLabel(t,e,i,s){var n,o,r,a,l,c,h;if(!s){if(this.renderErrorsContainer(e,i))return}if("checkbox"===t.type||"radio"===t.type){const i=document.querySelector(`label[for="${t.getAttribute("id")}"]`);"label"===(null==(o=null==(n=t.parentElement)?void 0:n.tagName)?void 0:o.toLowerCase())?null==(a=null==(r=t.parentElement)?void 0:r.parentElement)||a.appendChild(e):i?null==(l=i.parentElement)||l.appendChild(e):null==(c=t.parentElement)||c.appendChild(e)}else null==(h=t.parentElement)||h.appendChild(e)}showLabels(t,e){Object.keys(t).forEach(((i,s)=>{const n=t[i],o=this.getKeyByFieldSelector(i);if(!o||!this.fields[o])return void console.error("Field not found. Check the field selector.");const r=this.fields[o];r.isValid=!e,this.clearFieldStyle(o),this.clearFieldLabel(o),this.renderFieldError(o,!1,n),0===s&&this.globalConfig.focusInvalidField&&setTimeout((()=>r.elem.focus()),0)}))}showErrors(t){if("object"!=typeof t)throw Error("[showErrors]: Errors should be an object with key: value format");this.showLabels(t,!0)}showSuccessLabels(t){if("object"!=typeof t)throw Error("[showSuccessLabels]: Labels should be an object with key: value format");this.showLabels(t,!1)}renderFieldError(t,e=!1,i){var s,n,o,r,a,l;const c=this.fields[t];if(!1===c.isValid&&(this.isValid=!1),void 0===c.isValid||!e&&!this.isSubmitted&&!c.touched&&void 0===i)return;if(c.isValid){if(!c.asyncCheckPending){const e=this.createSuccessLabelElem(t,void 0!==i?i:c.successMessage,c.config);e&&this.renderFieldLabel(c.elem,e,null==(s=c.config)?void 0:s.errorsContainer,!0),c.elem.classList.add(...oi((null==(n=c.config)?void 0:n.successFieldCssClass)||this.globalConfig.successFieldCssClass))}return}c.elem.classList.add(...oi((null==(o=c.config)?void 0:o.errorFieldCssClass)||this.globalConfig.errorFieldCssClass));const h=this.createErrorLabelElem(t,void 0!==i?i:c.errorMessage,c.config);this.renderFieldLabel(c.elem,h,null==(r=c.config)?void 0:r.errorsContainer),this.isTooltip()&&this.tooltips.push(this.renderTooltip(c.elem,h,null==(l=null==(a=c.config)?void 0:a.tooltip)?void 0:l.position))}renderGroupError(t,e=!0){var i,s,n,o;const r=this.groupFields[t];if(!1===r.isValid&&(this.isValid=!1),void 0===r.isValid||!e&&!this.isSubmitted&&!r.touched)return;if(r.isValid){r.elems.forEach((t=>{var e,i;Object.assign(t.style,(null==(e=r.config)?void 0:e.successFieldStyle)||this.globalConfig.successFieldStyle),t.classList.add(...oi((null==(i=r.config)?void 0:i.successFieldCssClass)||this.globalConfig.successFieldCssClass))}));const e=this.createSuccessLabelElem(t,r.successMessage,r.config);return void(e&&this.renderGroupLabel(r.groupElem,e,null==(i=r.config)?void 0:i.errorsContainer,!0))}this.isValid=!1,r.elems.forEach((t=>{var e,i;Object.assign(t.style,(null==(e=r.config)?void 0:e.errorFieldStyle)||this.globalConfig.errorFieldStyle),t.classList.add(...oi((null==(i=r.config)?void 0:i.errorFieldCssClass)||this.globalConfig.errorFieldCssClass))}));const a=this.createErrorLabelElem(t,r.errorMessage,r.config);this.renderGroupLabel(r.groupElem,a,null==(s=r.config)?void 0:s.errorsContainer),this.isTooltip()&&this.tooltips.push(this.renderTooltip(r.groupElem,a,null==(o=null==(n=r.config)?void 0:n.tooltip)?void 0:o.position))}renderErrors(t=!1){if(this.isSubmitted||t||this.globalConfig.validateBeforeSubmitting){this.clearErrors(),this.isValid=!0;for(const t in this.groupFields)this.renderGroupError(t);for(const t in this.fields)this.renderFieldError(t)}}destroy(){this.eventListeners.forEach((t=>{this.removeListener(t.type,t.elem,t.func)})),Object.keys(this.customStyleTags).forEach((t=>{this.customStyleTags[t].remove()})),this.clearErrors(),this.globalConfig.lockForm&&this.unlockForm()}refresh(){this.destroy(),this.form?(this.initialize(this.form,this.globalConfig),Object.keys(this.fields).forEach((t=>{const e=this.getFieldSelectorByKey(t);e&&this.addField(e,[...this.fields[t].rules],this.fields[t].config)}))):console.error("Cannot initialize the library! Form is not defined")}setCurrentLocale(t){"string"==typeof t||void 0===t?(this.currentLocale=t,this.isSubmitted&&this.validate()):console.error("Current locale should be a string")}onSuccess(t){return this.onSuccessCallback=t,this}onFail(t){return this.onFailCallback=t,this}onValidate(t){return this.onValidateCallback=t,this}}class ci{constructor(t,e,i,s,n){this.targetNode=t,this.classToWatch=e,this.classAddedCallback=i,this.classRemovedCallback=s,this.observer=null,this.lastClassState=t.classList.contains(this.classToWatch),this.ignoreToggle=!!n,this.init()}init(){this.observer=new MutationObserver((t=>this.mutationCallback(t))),this.observe()}observe(){this.observer.observe(this.targetNode,{attributes:!0})}disconnect(){this.observer.disconnect()}mutationCallback(t){for(let e of t)if("attributes"===e.type&&"class"===e.attributeName){let t=e.target.classList.contains(this.classToWatch);(this.ignoreToggle||this.lastClassState!==t)&&(this.lastClassState=t,t?"function"==typeof this.classAddedCallback&&this.classAddedCallback():"function"==typeof this.classRemovedCallback&&this.classRemovedCallback())}}}class hi{constructor(t,e,i,s){this.targetNode=t,this.contentSelector=e,this.contentAddedCallback=i,this.contentRemovedCallback=s,this.observer=null,this.init()}init(){this.observer=new MutationObserver((t=>this.mutationCallback(t))),this.observe()}observe(){this.observer.observe(this.targetNode,{childList:!0,subtree:!0})}disconnect(){this.observer.disconnect()}mutationCallback(t){for(let e of t)"childList"===e.type&&(e.addedNodes.forEach((t=>{this._callbackExec(t)})),e.removedNodes.forEach((t=>{this._callbackExec(t,!0)})))}_callbackExec(t,e){const i=t.matches&&t.matches(this.contentSelector)?[t]:t.querySelectorAll?t.querySelectorAll(this.contentSelector):null,s=e&&"function"==typeof this.contentRemovedCallback?this.contentRemovedCallback:"function"==typeof this.contentAddedCallback?this.contentAddedCallback:null;i&&s&&i.forEach((t=>s(t)))}}const ui={errorFieldCssClass:"is-invalid",errorLabelCssClass:"just-validate-error-label"},di="justvalidatebi";class fi extends Q{constructor(t){super(t),this._label=new at(t),this._bindEvents()}static get NAME(){return"input"}_bindEvents(){"file"===this._element.getAttribute("type")&&H.on(this._element,"change.bs.input",(()=>{this._handleFileDescription()}))}_handleFileDescription(){const t=[];let e="";Array.from(this._element.files).forEach((e=>{const i=Math.round(parseInt(e.size,10)/1024);t.push(e.name+" ("+i+"kb)")})),this._element.files.length>1&&(e=this._element.files.length+" file da caricare: ");const i=Z.findOne('label[for="'+this._element.getAttribute("id")+'"] label.form-file-name',this._element);i&&(i.innerText=e+t.join("; "))}}const pi=["select",'input[data-bs-input][type="password"]',"input.input-password[data-bs-input]",'input[data-bs-autocomplete][type="search"]','input[type="time"]','input[type="radio"]','input[type="checkbox"]'];"undefined"!=typeof document&&document.addEventListener("DOMContentLoaded",(function(){document.querySelectorAll("input, textarea, label").forEach((function(t){(t=>{const e=!!pi.find((e=>t.matches(e))),i=!("number"!==t.getAttribute("type")||!t.parentNode.querySelector('button[class^="input-number-"]'));e||i||fi.getOrCreateInstance(t)})(at.getInputFromLabel(t)||t)}))}));const mi={autocomplete:[]},gi="autocomplete-list-show",_i="data-bs-autocomplete",bi="input["+_i+'][type="search"]';class vi extends Q{constructor(t,e){super(t),this._config=this._getConfig(e),this._items=[],this._autocompleteElement=null,this._label=new at(t),this._init(),this._bindEvents()}static get NAME(){return"inputsearchautocomplete"}search(){const t=this._element.value;
2
2
  //!!! $autocomplete.empty()
3
3
  this._autocompleteElement.innerHTML="",t?this._items.forEach((e=>{let i=new RegExp("("+t+")","gi"),s=e.text.replace(i,"<mark>$1</mark>"),n=e.label?"<em>"+e.label+"</em>":"",o=e.icon?e.icon:"",r=e.link?e.link:"#";-1!==s.toLowerCase().indexOf(t.toLowerCase())&&(this._autocompleteElement.classList.add(gi),this._autocompleteElement.appendChild(this._createOption(r,s,n,o)))})):this._autocompleteElement.classList.remove(gi)}_getConfig(t){return t={...mi,..."object"==typeof t?t:{}}}_getItems(){try{return JSON.parse(this._element.getAttribute(_i))}catch(t){return console.error("[InputSearchAutocomplete] invalid data provided for "+_i+" attribute",t),[]}}_init(){if(this._element.classList.contains("autocomplete")){if("undefined"==typeof document)return;this._items=this._getItems(),this._autocompleteElement=document.createElement("ul"),this._autocompleteElement.classList.add("autocomplete-list"),this._element.parentNode.insertBefore(this._autocompleteElement,this._element.nextSibling)}}_bindEvents(){H.on(this._element,"keyup.bs.inputsearchautocomplete",(()=>this.search()))}_createOption(t,e,i,s){if("undefined"==typeof document)return;const n=document.createElement("li");return n.innerHTML=`<a href="${t}">\n ${s}\n <span class="autocomplete-list-text">\n <span>${e}</span>\n ${i}\n </span>\n </a>`,n}}"undefined"!=typeof document&&document.addEventListener("DOMContentLoaded",(function(){document.querySelectorAll(bi+", label").forEach((function(t){const e=at.getInputFromLabel(t)||t;var i;(i=e)&&i.matches(bi)&&vi.getOrCreateInstance(i)}))}));const yi=".bs.inputpassword",wi=".data-api",Ei={shortPass:"Password troppo breve",badPass:"Password debole.",goodPass:"Password abbastanza sicura.",strongPass:"Password sicura.",minimumLength:8,suggestionsLabel:"Suggerimenti per una buona password:",suggestionFollowed:"suggerimenti seguito",suggestionFollowedPlural:"suggerimenti seguiti",suggestionOf:"di",suggestionMetLabel:"Soddisfatto: ",suggestionMetIconPath:"\n M9.6 16.9 4 11.4l.8-.7 4.8 4.8 8.5-8.4.7.7-9.2 9.1z\n ",suggestionLength:"Almeno {minLength} caratteri.",suggestionUppercase:"Una o più maiuscole.",suggestionLowercase:"Una o più minuscole.",suggestionNumber:"Uno o più numeri.",suggestionSpecial:"Uno o più caratteri speciali."},Ci=`click${yi}`,Si=`keyup${yi}`,ki=`score${yi}`,Ti=`text${yi}`,Ai=`suggs${yi}`,Li=`click${yi}${wi}`,xi=`mousedown${yi}${wi}`,Oi=`keyup${yi}${wi}`,Ii='input[data-bs-input][type="password"]',Pi=".password-icon";class Mi extends Q{constructor(t,e){super(t),this._config=this._getConfig(e),this._isCustom=this._element.classList.contains("input-password"),this._meter=this._element.parentNode.querySelector(".password-strength-meter"),this._grayBarElement=null,this._colorBarElement=null,this._textElement=null,this._suggsElement=null,this._showPwdElement=null,this._text={},this._label=new at(t),this._suggestions=[{key:"length",text:t=>t.suggestionLength.replace("{minLength}",t.minimumLength.toString()),test:(t,e)=>t.length>=e.minimumLength},{key:"uppercase",text:t=>t.suggestionUppercase,test:t=>/[A-Z]/.test(t)},{key:"lowercase",text:t=>t.suggestionLowercase,test:t=>/[a-z]/.test(t)},{key:"number",text:t=>t.suggestionNumber,test:t=>/[0-9]/.test(t)},{key:"special",text:t=>t.suggestionSpecial,test:t=>/[^A-Za-z0-9]/.test(t)}],this._init(),this._bindEvents()}static get NAME(){return"inputpassword"}_getConfig(t){return t={...Ei,...X.getDataAttributes(this._element),..."object"==typeof t?t:{}}}_init(){this._isCustom&&(this._handleAutofill(),this._showPwdElement=Z.findOne(Pi,this._element.parentNode),this._meter&&(this._grayBarElement=this._meter.querySelector(".password-meter"),this._colorBarElement=this._meter.querySelector(".progress-bar"),this._textElement=this._meter.querySelector(".strength-meter-info"),this._suggsElement=this._meter.querySelector(".strenght-meter-suggestions"),this._textElement&&(this._config=Object.assign({},this._config,{...X.getDataAttributes(this._textElement)})),this._suggsElement&&this._createsuggestionsList()))}_bindEvents(){this._isCustom&&(this._showPwdElement&&H.on(this._showPwdElement,Ci,(()=>this._toggleShowPassword())),this._meter&&(H.on(this._element,Si,(()=>this._checkPassword())),H.on(this._element,"input",(()=>this._checkPassword()))))}_handleAutofill(){const t=()=>{""!==this._element.value&&(this._label._labelOut(),this._checkPassword())};t(),setTimeout(t,100),H.on(this._element,"animationstart",(e=>{"onAutoFillStart"===e.animationName&&t()}))}_toggleShowPassword(){const t="password"===this._element.getAttribute("type");Z.find('[class^="password-icon"]',this._showPwdElement).forEach((t=>t.classList.toggle("d-none"))),this._element.setAttribute("type",t?"text":"password"),this._showPwdElement.setAttribute("aria-checked",t.toString())}_checkPassword(){const t=this._element.value,e=this._calculateScore(t);this._updateMeter(e),this._updateText(e,t),this._updateSuggestions(t)}_updateMeter(t){const e=t<0?0:t;this._colorBarElement&&(this._colorBarElement.classList.forEach((t=>{t.match(/(^|\s)bg-\S+/g)&&this._colorBarElement.classList.remove(t)})),this._colorBarElement.classList.add(`bg-${this._scoreColor(t)}`),this._colorBarElement.style.width=`${e}%`,this._colorBarElement.setAttribute("aria-valuenow",e)),H.trigger(this._element,ki)}_updateText(t,e){if(this._textElement){let i=this._scoreText(t);if(this._suggsElement){const{completedCount:t,totalCount:s}=this._getCompletedSuggestions(e),n=1===t?this._config.suggestionFollowed:this._config.suggestionFollowedPlural;i+=` ${t} ${this._config.suggestionOf} ${s} ${n}.`}this._textElement.textContent!==i&&(this._textElement.textContent=i,this._textElement.classList.forEach((t=>{t.match(/(^|\s)text-\S+/g)&&this._textElement.classList.remove(t)})),this._textElement.classList.add(`text-${this._scoreColor(t)}`),H.trigger(this._element,Ti))}}_updateSuggestions(t){this._suggsElement&&(this._updateSuggestionsList(t),H.trigger(this._element,Ai))}_getCompletedSuggestions(t){let e=0;const i=this._suggestions.length;return this._suggestions.forEach((i=>{i.test(t,this._config)&&e++})),{completedCount:e,totalCount:i}}_createsuggestionsList(){if(this._suggsElement.querySelector(".password-suggestions"))return;const t=document.createElement("label");t.className="visually-hidden",t.htmlFor="suggestions",t.textContent=Ei.suggestionsLabel;const e=document.createElement("div");e.id="suggestions",e.className="password-suggestions",this._suggestions.forEach((t=>{const i=document.createElement("div");i.className="suggestion",i.dataset.suggestion=t.key;const s=this._createIconCheck(),n=document.createElement("span");n.textContent=t.text(this._config),i.appendChild(s),i.appendChild(n),e.appendChild(i)})),this._suggsElement.appendChild(t),this._suggsElement.appendChild(e)}_createIconCheck(){const t=document.createElementNS("http://www.w3.org/2000/svg","svg");t.setAttribute("class","icon icon-xs me-1 d-none"),t.setAttribute("aria-label",this._config.suggestionMetLabel),t.setAttribute("viewBox","0 0 24 24"),t.style.width="1em",t.style.height="1em";const e=document.createElementNS("http://www.w3.org/2000/svg","path");return e.setAttribute("d",this._config.suggestionMetIconPath.trim()),t.appendChild(e),t}_updateSuggestionsList(t){this._suggsElement&&this._suggestions.forEach((e=>{const i=this._suggsElement.querySelector(`[data-suggestion="${e.key}"]`);if(i){const s=e.test(t,this._config),n=i.querySelector(".icon");n&&n.classList.toggle("d-none",!s)}}))}_scoreText(t){return-1===t?this._config.shortPass:-2===t?"":(t=t<0?0:t)<26||t<51?this._config.badPass:t<76?this._config.goodPass:this._config.strongPass}_scoreColor(t){return-1===t||-2===t||t<26?"danger":t<51?"warning":"success"}_calculateScore(t){var e=0;if(0===t.trim().length)return-2;if(t.length<this._config.minimumLength)return-1;e+=4*t.length,e+=this._checkRepetition(1,t).length-t.length,e+=this._checkRepetition(2,t).length-t.length,e+=this._checkRepetition(3,t).length-t.length,e+=this._checkRepetition(4,t).length-t.length,t.match(/(.*[0-9].*[0-9].*[0-9])/)&&(e+=5);var i=".*[!,@,#,$,%,^,&,*,?,_,~]";return i=new RegExp("("+i+i+")"),t.match(i)&&(e+=5),t.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/)&&(e+=10),t.match(/([a-zA-Z])/)&&t.match(/([0-9])/)&&(e+=15),t.match(/([!,@,#,$,%,^,&,*,?,_,~])/)&&t.match(/([0-9])/)&&(e+=15),t.match(/([!,@,#,$,%,^,&,*,?,_,~])/)&&t.match(/([a-zA-Z])/)&&(e+=15),(t.match(/^\w+$/)||t.match(/^\d+$/))&&(e-=10),e>100&&(e=100),e<0&&(e=0),e}_checkRepetition(t,e){for(var i="",s=!1,n=0;n<e.length;n++){s=!0;for(var o=0;o<t&&o+n+t<e.length;o++)s=s&&e.charAt(o+n)===e.charAt(o+n+t);o<t&&(s=!1),s?(n+=t-1,s=!1):i+=e.charAt(n)}return i}}if("undefined"!=typeof window&&"undefined"!=typeof document){const t=t=>t&&t.matches(Ii)?Mi.getOrCreateInstance(t):null,e=()=>{const t=Z.findOne(Ii);t&&Mi.getOrCreateInstance(t)};"loading"!==document.readyState?e():document.addEventListener("DOMContentLoaded",e),H.on(document,xi,Ii+", label",(function(){const e=at.getInputFromLabel(this)||this;t(e)})),H.on(document,Oi,Ii+", label",(function(){const e=at.getInputFromLabel(this)||this,i=t(e);i&&i._label&&i._label._labelOut()})),H.on(document,Li,Pi,(function(){const t=this.parentNode&&this.parentNode.querySelector(Ii);t&&Mi.getOrCreateInstance(t)}))}var $i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Fi(t,e){return t(e={exports:{}},e.exports),e.exports}var ji,Ni=Fi((function(t,e){
4
4
  /*! Shifty 2.20.4 - https://github.com/jeremyckahn/shifty */
package/dist/version.js CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
  // NOTE:bootstrap italia version variable, useful to check for the current version
10
10
 
11
- const BOOTSTRAP_ITALIA_VERSION = '2.13.2';
11
+ const BOOTSTRAP_ITALIA_VERSION = '2.13.3';
12
12
 
13
13
  export { BOOTSTRAP_ITALIA_VERSION as default };
14
14
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sources":["../src/js/version.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap Italia (https://italia.github.io/bootstrap-italia/)\n * Authors: https://github.com/italia/bootstrap-italia/blob/main/AUTHORS\n * Licensed under BSD-3-Clause license (https://github.com/italia/bootstrap-italia/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n// NOTE:bootstrap italia version variable, useful to check for the current version\n\nconst BOOTSTRAP_ITALIA_VERSION = '2.13.2'\nexport default BOOTSTRAP_ITALIA_VERSION\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEK,MAAC,wBAAwB,GAAG;;;;"}
1
+ {"version":3,"file":"version.js","sources":["../src/js/version.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap Italia (https://italia.github.io/bootstrap-italia/)\n * Authors: https://github.com/italia/bootstrap-italia/blob/main/AUTHORS\n * Licensed under BSD-3-Clause license (https://github.com/italia/bootstrap-italia/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n// NOTE:bootstrap italia version variable, useful to check for the current version\n\nconst BOOTSTRAP_ITALIA_VERSION = '2.13.3'\nexport default BOOTSTRAP_ITALIA_VERSION\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEK,MAAC,wBAAwB,GAAG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bootstrap-italia",
3
- "version": "2.13.2",
3
+ "version": "2.13.3",
4
4
  "keywords": [
5
5
  "css",
6
6
  "sass",
@@ -104,6 +104,6 @@
104
104
  "minimasonry": "^1.3.2",
105
105
  "progressbar.js": "^1.1.0",
106
106
  "uuid": "^8.3.2",
107
- "video.js": "^8.0.4"
107
+ "video.js": "^8.21.0"
108
108
  }
109
109
  }
package/src/js/version.js CHANGED
@@ -8,5 +8,5 @@
8
8
 
9
9
  // NOTE:bootstrap italia version variable, useful to check for the current version
10
10
 
11
- const BOOTSTRAP_ITALIA_VERSION = '2.13.2'
11
+ const BOOTSTRAP_ITALIA_VERSION = '2.13.3'
12
12
  export default BOOTSTRAP_ITALIA_VERSION
@@ -1,3 +1,3 @@
1
1
  :root {
2
- --bootstrap-italia-version: '2.13.2';
2
+ --bootstrap-italia-version: '2.13.3';
3
3
  }
@@ -1,5 +1,5 @@
1
1
  import { default as BaseComponent } from 'bootstrap/js/dist/base-component'
2
- import { GetInstanceFactory, GetOrCreateInstanceFactory } from 'bootstrap/js/dist/base-component';
2
+ import { type GetInstanceFactory, type GetOrCreateInstanceFactory } from 'bootstrap/js/dist/base-component';
3
3
 
4
4
  type KeyName = 'ArrowDown' | 'ArrowUp' | 'Home' | 'End'
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { Alert as BSAlert } from 'bootstrap'
2
- import { GetInstanceFactory, GetOrCreateInstanceFactory } from 'bootstrap/js/dist/base-component';
2
+ import { type GetInstanceFactory, type GetOrCreateInstanceFactory } from 'bootstrap/js/dist/base-component';
3
3
 
4
4
  declare class Alert extends BSAlert {
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  import { default as BaseComponent } from 'bootstrap/js/dist/base-component'
2
- import { GetInstanceFactory, GetOrCreateInstanceFactory } from 'bootstrap/js/dist/base-component';
2
+ import { type GetInstanceFactory, type GetOrCreateInstanceFactory } from 'bootstrap/js/dist/base-component';
3
3
 
4
4
  declare class BackToTop extends BaseComponent {
5
5
  static get NAME(): string
@@ -1,5 +1,5 @@
1
1
  import { Button as BSButton } from 'bootstrap'
2
- import { GetInstanceFactory, GetOrCreateInstanceFactory } from 'bootstrap/js/dist/base-component';
2
+ import { type GetInstanceFactory, type GetOrCreateInstanceFactory } from 'bootstrap/js/dist/base-component';
3
3
 
4
4
  declare class Button extends BSButton {
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  import { default as BaseComponent } from 'bootstrap/js/dist/base-component'
2
- import { GetInstanceFactory, GetOrCreateInstanceFactory } from 'bootstrap/js/dist/base-component';
2
+ import { type GetInstanceFactory, type GetOrCreateInstanceFactory } from 'bootstrap/js/dist/base-component';
3
3
 
4
4
  import Splide from '@splidejs/splide'
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { Carousel as BSCarousel } from 'bootstrap'
2
- import { GetInstanceFactory, GetOrCreateInstanceFactory } from 'bootstrap/js/dist/base-component';
2
+ import { type GetInstanceFactory, type GetOrCreateInstanceFactory } from 'bootstrap/js/dist/base-component';
3
3
 
4
4
  declare class Carousel extends BSCarousel {
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  import { Collapse as BSCollapse } from 'bootstrap'
2
- import { GetInstanceFactory, GetOrCreateInstanceFactory } from 'bootstrap/js/dist/base-component';
2
+ import { type GetInstanceFactory, type GetOrCreateInstanceFactory } from 'bootstrap/js/dist/base-component';
3
3
 
4
4
  declare class Collapse extends BSCollapse {
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  import { default as BaseComponent } from 'bootstrap/js/dist/base-component'
2
- import { GetInstanceFactory, GetOrCreateInstanceFactory } from 'bootstrap/js/dist/base-component';
2
+ import { type GetInstanceFactory, type GetOrCreateInstanceFactory } from 'bootstrap/js/dist/base-component';
3
3
 
4
4
  /**
5
5
  * ------------------------------------------------------------------------
@@ -1,5 +1,5 @@
1
1
  import { default as BaseComponent } from 'bootstrap/js/dist/base-component'
2
- import { GetInstanceFactory, GetOrCreateInstanceFactory } from 'bootstrap/js/dist/base-component';
2
+ import { type GetInstanceFactory, type GetOrCreateInstanceFactory } from 'bootstrap/js/dist/base-component';
3
3
 
4
4
  declare class Dimmer extends BaseComponent {
5
5
  static get NAME(): string
@@ -1,5 +1,5 @@
1
1
  import { Dropdown as BSDropdown } from 'bootstrap'
2
- import { GetInstanceFactory, GetOrCreateInstanceFactory } from 'bootstrap/js/dist/base-component';
2
+ import { type GetInstanceFactory, type GetOrCreateInstanceFactory } from 'bootstrap/js/dist/base-component';
3
3
 
4
4
  declare class Dropdown extends BSDropdown {
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  import { default as BaseComponent } from 'bootstrap/js/dist/base-component'
2
- import { GetInstanceFactory, GetOrCreateInstanceFactory } from 'bootstrap/js/dist/base-component';
2
+ import { type GetInstanceFactory, type GetOrCreateInstanceFactory } from 'bootstrap/js/dist/base-component';
3
3
 
4
4
  /**
5
5
  * DEPRECATED
@@ -1,5 +1,5 @@
1
1
  import { default as BaseComponent } from 'bootstrap/js/dist/base-component'
2
- import { GetInstanceFactory, GetOrCreateInstanceFactory } from 'bootstrap/js/dist/base-component';
2
+ import { type GetInstanceFactory, type GetOrCreateInstanceFactory } from 'bootstrap/js/dist/base-component';
3
3
 
4
4
  declare class Forward extends BaseComponent {
5
5
  static get NAME(): string
@@ -1,4 +1,4 @@
1
- import { GetInstanceFactory, GetOrCreateInstanceFactory } from 'bootstrap/js/dist/base-component';
1
+ import { type GetInstanceFactory, type GetOrCreateInstanceFactory } from 'bootstrap/js/dist/base-component';
2
2
 
3
3
  declare class HeaderSticky {
4
4
  /**
@@ -1,5 +1,5 @@
1
1
  import { default as BaseComponent } from 'bootstrap/js/dist/base-component'
2
- import { GetInstanceFactory, GetOrCreateInstanceFactory } from 'bootstrap/js/dist/base-component';
2
+ import { type GetInstanceFactory, type GetOrCreateInstanceFactory } from 'bootstrap/js/dist/base-component';
3
3
 
4
4
  declare class HistoryBack extends BaseComponent {
5
5
  static get NAME(): string
@@ -1,6 +1,6 @@
1
1
  import { default as BaseComponent } from 'bootstrap/js/dist/base-component'
2
2
  import { InputLabel } from './input-label'
3
- import { GetInstanceFactory, GetOrCreateInstanceFactory } from 'bootstrap/js/dist/base-component';
3
+ import { type GetInstanceFactory, type GetOrCreateInstanceFactory } from 'bootstrap/js/dist/base-component';
4
4
 
5
5
 
6
6
  declare class InputNumber extends BaseComponent {
@@ -1,6 +1,6 @@
1
1
  import { default as BaseComponent } from 'bootstrap/js/dist/base-component'
2
2
  import { InputLabel } from './input-label'
3
- import { GetInstanceFactory, GetOrCreateInstanceFactory } from 'bootstrap/js/dist/base-component';
3
+ import { type GetInstanceFactory, type GetOrCreateInstanceFactory } from 'bootstrap/js/dist/base-component';
4
4
 
5
5
 
6
6
  declare class InputPassword extends BaseComponent {
@@ -1,6 +1,6 @@
1
1
  import { default as BaseComponent } from 'bootstrap/js/dist/base-component'
2
2
  import { InputLabel } from './input-label'
3
- import { GetInstanceFactory, GetOrCreateInstanceFactory } from 'bootstrap/js/dist/base-component';
3
+ import { type GetInstanceFactory, type GetOrCreateInstanceFactory } from 'bootstrap/js/dist/base-component';
4
4
 
5
5
 
6
6
  declare class InputSearch extends BaseComponent {
@@ -1,6 +1,6 @@
1
1
  import { default as BaseComponent } from 'bootstrap/js/dist/base-component'
2
2
  import { InputLabel } from './input-label'
3
- import { GetInstanceFactory, GetOrCreateInstanceFactory } from 'bootstrap/js/dist/base-component';
3
+ import { type GetInstanceFactory, type GetOrCreateInstanceFactory } from 'bootstrap/js/dist/base-component';
4
4
 
5
5
  declare class Input extends BaseComponent {
6
6
  static get NAME(): string