UNPKG

axentix

Version:

Axentix is a framework mixing fully customizable components & utility-first classes, leaving the design choice to the developer.

2 lines 66.4 kB
(function(c,y){typeof exports=="object"&&typeof module!="undefined"?y(exports):typeof define=="function"&&define.amd?define(["exports"],y):(c=typeof globalThis!="undefined"?globalThis:c||self,y(c.Axentix={}))})(this,function(c){"use strict";var Yn=Object.defineProperty;var ws=c=>{throw TypeError(c)},yi=Math.pow,Fn=(c,y,u)=>y in c?Yn(c,y,{enumerable:!0,configurable:!0,writable:!0,value:u}):c[y]=u;var v=(c,y,u)=>Fn(c,typeof y!="symbol"?y+"":y,u),qi=(c,y,u)=>y.has(c)||ws("Cannot "+u);var e=(c,y,u)=>(qi(c,y,"read from private field"),u?u.call(c):y.get(c)),a=(c,y,u)=>y.has(c)?ws("Cannot add the same private member more than once"):y instanceof WeakSet?y.add(c):y.set(c,u),o=(c,y,u,I)=>(qi(c,y,"write to private field"),I?I.call(c,u):y.set(c,u),u),l=(c,y,u)=>(qi(c,y,"access private method"),u);var zi=(c,y,u,I)=>({set _(q){o(c,y,q,u)},get _(){return e(c,y,I)}});var Ht,Ct,E,Bt,Ae,Nt,Se,Wt,_,ke,Vt,It,At,Xt,Yt,Ft,Ut,ft,Qe,ti,W,ei,A,m,xs,Es,Hi,Ce,gi,Ds,Ts,Cs,Is,As,Bi,bi,Ni,jt,Re,Gt,V,mt,Oe,Zt,_t,K,D,Ss,ks,Rs,Wi,Os,Vi,Ms,Me,Q,tt,Kt,$e,et,Pe,vt,Jt,qe,$,$s,Xi,Ps,Yi,qs,it,Qt,st,J,te,ee,ie,B,zs,Hs,Bs,Ns,Fi,yt,ot,ze,St,se,oe,ne,re,X,Ws,Vs,Xs,Ys,Fs,ae,le,he,ce,de,R,He,Be,S,kt,Rt,nt,ii,rt,Ot,at,x,Us,js,Gs,Zs,_s,Ks,Js,Qs,to,eo,mi,io,so,Ne,lt,gt,bt,Lt,Ui,oo,no,Y,C,F,O,We,Ve,pe,ue,fe,Mt,me,ht,ve,Xe,ye,U,w,ro,ao,lo,ho,co,ji,Gi,po,uo,fo,mo,vo,$t,wt,ge,ct,M,yo,go,bo,Lo,wo,Zi,Ye,dt,pt,si,oi,Fe,be,Le,g,xo,Eo,Do,To,Co,Io,Ao,So,ko,Ro,Oo,Mo,ni,b,Ue,we,xe,Ee,De,P,xt,N,_i,$o,Po,qo,zo,j,Pt,k,je,Et,T,Ho,Bo,Ki,No,Wo,Ji,Vo,ut,Xo,Qi,ts,Ls;const y="2.4.1",u=[],I={components:[],plugins:[],prefix:"ax",mode:""},q=n=>`--${I.prefix}-${n}`,Tt=n=>I.components.find(s=>s.name===n).class,Li=()=>{const n=I.components.filter(t=>t.dataDetection),s=I.plugins.filter(t=>t.dataDetection);return[...n,...s].map(t=>t.name)},es=()=>{const n=I.components.filter(t=>t.autoInit&&t.autoInit.enabled),s=I.plugins.filter(t=>t.autoInit&&t.autoInit.enabled);return[...n,...s].reduce((t,i)=>(t[i.name]=document.querySelectorAll(i.autoInit.selector),t),{})},is=(n,s)=>{if(!n.name||!n.class){console.error(`[Axentix] Error registering ${s} : Missing required parameters.`);return}if(I[s].some(t=>t.name===n.name)){console.error(`[Axentix] Error registering ${s} : Already exist.`);return}n.autoInit&&(n.autoInit.selector=n.autoInit.selector+=":not(.no-axentix-init)"),I[s].push(n)},z=n=>{is(n,"components")},Yo=n=>{is(n,"plugins")},Fo=()=>{window&&(window.Axentix||(window.Axentix={}),[...I.components,...I.plugins].forEach(n=>{window.Axentix[n.name]=n.class}))},Uo=n=>n.replace(/[\w]([A-Z])/g,s=>s[0]+"-"+s[1]).toLowerCase(),jo=(n,s="")=>{const t=Uo(n);return s?s+"-"+t:t},Go=(n,s,t,i,r="")=>{const h=s[0].toUpperCase()+s.slice(1).toLowerCase();Li().includes(h)&&t!=="Collapsible"&&h!=="Sidenav"&&(n[s]=Tt(h).getDefaultOptions());const d=r?r+"-"+s:s,f=ss(n[s],t,i,d);if(!(Object.keys(f).length===0&&n.constructor===Object))return f},ss=(n,s,t,i="")=>Object.keys(n).reduce((r,h)=>{if(typeof n[h]=="object"&&n[h]!==null){const d=Go(n,h,s,t,i);d&&(r[h]=d)}else if(n[h]!==null){const d="data-"+s.toLowerCase()+"-"+jo(h,i);if(t.hasAttribute(d)){const f=t.getAttribute(d);r[h]=typeof n[h]=="number"?Number(f):f,typeof n[h]=="boolean"&&(r[h]=f==="true")}}return r},{}),Zo=(n,s)=>{const t=Object.assign({},Tt(n).getDefaultOptions());return ss(t,n,s)},_o=()=>{document.querySelectorAll("[data-ax]").forEach(s=>{let t=s.dataset.ax;if(t=t[0].toUpperCase()+t.slice(1).toLowerCase(),!Li().includes(t)){console.error(`[Axentix] Error: ${t} component doesn't exist. Did you forget to register him ?`,s);return}try{const i=Tt(t);new i(`#${s.id}`)}catch(i){console.error("[Axentix] Data: Unable to load "+t,i)}})},Ko=()=>{try{new Axentix.Axentix("all")}catch(n){console.error("[Axentix] Unable to auto init.",n)}};document.addEventListener("DOMContentLoaded",()=>{document.documentElement.dataset.axentix&&Ko(),_o()});const Ge=(...n)=>n.reduce((s,t)=>{for(let i in t)s[i]=typeof t[i]=="object"&&t[i]!==null?Ge(s[i],t[i]):t[i];return s},{}),H=(n,s,t)=>Ge(Tt(n).getDefaultOptions(),Zo(n,t),s),ri=(n,s=document.createElement("div"))=>(n[0].parentElement.insertBefore(s,n[0]),n.forEach(i=>s.appendChild(i)),s),os=n=>n.replaceWith(...n.childNodes),p=(n,s,t)=>{const i=new CustomEvent("ax."+s,{detail:t||{},bubbles:!0});n.dispatchEvent(i)},ns=()=>"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0,rs=()=>!!window.PointerEvent&&"maxTouchPoints"in window.navigator&&window.navigator.maxTouchPoints>=0,ai=()=>ns()?"touch":rs()?"pointer":"mouse",Ze=n=>u.filter(s=>s.type===n).map(s=>s.instance),_e=n=>{const s=u.find(t=>t.type!=="Toast"&&"#"+t.instance.el.id===n);return s?s.instance:!1},li=()=>Math.random().toString().split(".")[1],Jo=()=>u,Qo=n=>_e(n).sync(),tn=()=>u.map(n=>n.instance.sync()),en=n=>_e(n).reset(),sn=()=>u.map(n=>n.instance.reset()),on=n=>_e(n).destroy(),nn=()=>u.map(n=>n.instance.destroy()),wi=(n,s,t,i)=>{const r=n&&s?document.querySelector(`.ax-overlay[data-target="${t}"]`):document.createElement("div");return r.classList.add("ax-overlay"),r.style.transitionDuration=i+"ms",r.dataset.target=t,r},Ke=(n,s,t,i,r)=>{n&&(i?(s.addEventListener("click",t),document.body.appendChild(s),setTimeout(()=>{s.classList.add("active")},50)):(s.classList.remove("active"),setTimeout(()=>{s.removeEventListener("click",t),document.body.removeChild(s)},r)))},Ie=(n,s='[data-target="{ID}"]')=>Array.from(document.querySelectorAll(s.replace("{ID}",n))),xi=n=>n.targetTouches&&n.targetTouches.length>=1?n.targetTouches[0].clientY:n.changedTouches&&n.changedTouches.length>=1?n.changedTouches[0].pageY:n.clientY,qt=n=>n.targetTouches&&n.targetTouches.length>=1?n.targetTouches[0].clientX:n.changedTouches&&n.changedTouches.length>=1?n.changedTouches[0].pageX:n.clientX,as=()=>window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches;class Z{constructor(){v(this,"el")}removeListeners(){}setupListeners(){}setup(){}preventDbInstance(s){if(s&&_e(s))throw new Error(`Instance already exist on ${s}`)}sync(){p(this.el,"component.sync"),this.removeListeners(),this.setupListeners()}reset(){p(this.el,"component.reset"),this.removeListeners(),this.setup()}destroy(){p(this.el,"component.destroy"),this.removeListeners();const s=u.findIndex(t=>t.instance.el.id===this.el.id);u.splice(s,1)}}const rn={animationDuration:500,height:"",backToOpposite:!0,enableTouch:!0,indicators:{enabled:!1,isFlat:!1,customClasses:""},autoplay:{enabled:!0,interval:5e3,side:"right"}};class Ei extends Z{constructor(t,i){super();a(this,m);v(this,"options");v(this,"activeIndex");a(this,Ht,0);a(this,Ct,!1);a(this,E);a(this,Bt,0);a(this,Ae,0);a(this,Nt,!1);a(this,Se,!1);a(this,Wt,!1);a(this,_,0);a(this,ke,0);a(this,Vt);a(this,It);a(this,At);a(this,Xt);a(this,Yt);a(this,Ft);a(this,Ut);a(this,ft);a(this,Qe,0);a(this,ti,0);a(this,W);a(this,ei);a(this,A);try{this.preventDbInstance(t),u.push({type:"Caroulix",instance:this}),this.el=document.querySelector(t),this.options=H("Caroulix",i,this.el),this.setup()}catch(r){console.error("[Axentix] Caroulix init error",r)}}setup(){p(this.el,"caroulix.setup"),this.options.autoplay.side=this.options.autoplay.side.toLowerCase(),["right","left"].includes(this.options.autoplay.side)||(this.options.autoplay.side="right"),this.activeIndex=0,o(this,Ht,0),o(this,Ct,!1),o(this,A,ai()),o(this,E,l(this,m,xs).call(this)),this.options.indicators.enabled&&l(this,m,Is).call(this);const i=this.el.querySelector(".active");i?this.activeIndex=e(this,E).indexOf(i):e(this,E)[0].classList.add("active"),l(this,m,Es).call(this),e(this,Bt)===0&&l(this,m,gi).call(this),this.setupListeners(),this.options.autoplay.enabled&&this.play()}setupListeners(){o(this,Vt,l(this,m,gi).bind(this)),window.addEventListener("resize",e(this,Vt)),e(this,At)&&(o(this,Xt,this.next.bind(this,1)),e(this,At).addEventListener("click",e(this,Xt))),e(this,It)&&(o(this,Yt,this.prev.bind(this,1)),e(this,It).addEventListener("click",e(this,Yt))),this.options.enableTouch&&(o(this,Ft,l(this,m,Ds).bind(this)),o(this,Ut,l(this,m,Ts).bind(this)),o(this,ft,l(this,m,Cs).bind(this)),this.el.addEventListener(`${e(this,A)}${e(this,A)==="touch"?"start":"down"}`,e(this,Ft)),this.el.addEventListener(`${e(this,A)}move`,e(this,Ut)),this.el.addEventListener(`${e(this,A)}${e(this,A)==="touch"?"end":"up"}`,e(this,ft)),this.el.addEventListener(e(this,A)==="pointer"?"pointerleave":"mouseleave",e(this,ft)))}removeListeners(){window.removeEventListener("resize",e(this,Vt)),o(this,Vt,void 0),e(this,At)&&(e(this,At).removeEventListener("click",e(this,Xt)),o(this,Xt,void 0)),e(this,It)&&(e(this,It).removeEventListener("click",e(this,Yt)),o(this,Yt,void 0)),this.options.enableTouch&&(this.el.removeEventListener(`${e(this,A)}${e(this,A)==="pointer"?"down":"start"}`,e(this,Ft)),this.el.removeEventListener(`${e(this,A)}move`,e(this,Ut)),this.el.removeEventListener(`${e(this,A)}${e(this,A)==="touch"?"end":"up"}`,e(this,ft)),this.el.removeEventListener(e(this,A)==="pointer"?"pointerleave":"mouseleave",e(this,ft)),o(this,Ft,void 0),o(this,Ut,void 0),o(this,ft,void 0))}goTo(t){if(t===this.activeIndex)return;(t>this.activeIndex?"right":"left")==="left"?this.prev(Math.abs(this.activeIndex-t)):this.next(Math.abs(this.activeIndex-t)),this.options.indicators.enabled&&l(this,m,Bi).call(this)}play(){this.options.autoplay.enabled&&(this.stop(),o(this,ei,setInterval(()=>{this.options.autoplay.side==="right"?this.next(1,!1):this.prev(1,!1)},this.options.autoplay.interval)))}stop(){this.options.autoplay.enabled&&clearInterval(e(this,ei))}next(t=1,i=!0){e(this,Nt)||this.activeIndex===e(this,E).length-1&&!this.options.backToOpposite||(p(this.el,"caroulix.next",{step:t}),o(this,Ct,!0),i&&this.options.autoplay.enabled&&this.stop(),this.activeIndex<e(this,E).length-1?this.activeIndex+=t:this.options.backToOpposite&&(this.activeIndex=0),l(this,m,Ni).call(this),l(this,m,Ce).call(this),i&&this.options.autoplay.enabled&&this.play())}prev(t=1,i=!0){e(this,Nt)||this.activeIndex===0&&!this.options.backToOpposite||(p(this.el,"caroulix.prev",{step:t}),o(this,Ct,!0),i&&this.options.autoplay.enabled&&this.stop(),this.activeIndex>0?this.activeIndex-=t:this.options.backToOpposite&&(this.activeIndex=e(this,E).length-1),l(this,m,Ni).call(this),l(this,m,Ce).call(this),i&&this.options.autoplay.enabled&&this.play())}}Ht=new WeakMap,Ct=new WeakMap,E=new WeakMap,Bt=new WeakMap,Ae=new WeakMap,Nt=new WeakMap,Se=new WeakMap,Wt=new WeakMap,_=new WeakMap,ke=new WeakMap,Vt=new WeakMap,It=new WeakMap,At=new WeakMap,Xt=new WeakMap,Yt=new WeakMap,Ft=new WeakMap,Ut=new WeakMap,ft=new WeakMap,Qe=new WeakMap,ti=new WeakMap,W=new WeakMap,ei=new WeakMap,A=new WeakMap,m=new WeakSet,xs=function(){return Array.from(this.el.children).reduce((t,i)=>(i.classList.contains("caroulix-item")&&t.push(i),i.classList.contains("caroulix-prev")&&o(this,It,i),i.classList.contains("caroulix-next")&&o(this,At,i),t),[])},Es=function(){o(this,Bt,0),o(this,Ae,0),e(this,E).forEach(t=>{const i=t.querySelector("img, video");i&&(zi(this,Bt)._++,i.complete?l(this,m,Hi).call(this,i,!0):(i.loadRef=l(this,m,Hi).bind(this,i),i.addEventListener("load",i.loadRef)))})},Hi=function(t,i){zi(this,Ae)._++,i||(t.removeEventListener("load",t.loadRef),t.loadRef=void 0),e(this,Bt)==e(this,Ae)&&(l(this,m,gi).call(this),l(this,m,Ce).call(this,!0))},Ce=function(t=!1){const i=this.el.getBoundingClientRect().width;e(this,E).forEach((h,d)=>{h.style.transform=`translateX(${i*d-i*this.activeIndex-e(this,Ht)}px)`}),this.options.indicators.enabled&&l(this,m,Bi).call(this),e(this,E).find(h=>h.classList.contains("active")).classList.remove("active"),e(this,E)[this.activeIndex].classList.add("active"),setTimeout(()=>{o(this,Ct,!1)},this.options.animationDuration),t&&setTimeout(()=>l(this,m,bi).call(this,this.options.animationDuration),50)},gi=function(){if(o(this,Nt,!0),this.el.style.transitionDuration="",this.options.autoplay.enabled&&this.play(),this.options.height)this.el.style.height=this.options.height;else{const t=e(this,E).map(r=>r.offsetHeight),i=Math.max(...t);this.el.style.height=i+"px"}l(this,m,Ce).call(this),setTimeout(()=>{this.el.style.transitionDuration=this.options.animationDuration+"ms",o(this,Nt,!1)},50)},Ds=function(t){t.target.closest(".caroulix-arrow")||t.target.closest(".caroulix-indicators")||e(this,Ct)||(t.type!=="touchstart"&&t.preventDefault(),this.options.autoplay.enabled&&this.stop(),l(this,m,bi).call(this,0),o(this,Wt,!0),o(this,Se,!1),o(this,_,0),o(this,ke,0),o(this,Qe,qt(t)),o(this,ti,xi(t)))},Ts=function(t){if(!e(this,Wt)||e(this,Se))return;let i=qt(t),r=xi(t);if(o(this,_,e(this,Qe)-i),o(this,ke,Math.abs(e(this,ti)-r)),t.type==="touchmove"&&e(this,ke)>Math.abs(e(this,_)))return o(this,Se,!0),o(this,_,0),!1;t.cancelable&&t.preventDefault(),o(this,Ht,e(this,_)),l(this,m,Ce).call(this)},Cs=function(t){if(!(t.target.closest(".caroulix-arrow")||t.target.closest(".caroulix-indicators"))&&(t.cancelable&&t.preventDefault(),e(this,Wt))){l(this,m,bi).call(this,this.options.animationDuration);let i=this.el.getBoundingClientRect().width;o(this,Wt,!1);const r=i*15/100;this.activeIndex!==e(this,E).length-1&&e(this,_)>r?this.next():this.activeIndex!==0&&e(this,_)<-r&&this.prev(),o(this,_,0),o(this,Ht,0),l(this,m,Ce).call(this),this.options.autoplay.enabled&&this.play()}},Is=function(){o(this,W,document.createElement("ul")),e(this,W).classList.add("caroulix-indicators"),this.options.indicators.isFlat&&e(this,W).classList.add("caroulix-flat"),this.options.indicators.customClasses&&(e(this,W).className=`${e(this,W).className} ${this.options.indicators.customClasses}`);for(let t=0;t<e(this,E).length;t++){const i=document.createElement("li");i.triggerRef=l(this,m,As).bind(this,t),i.addEventListener("click",i.triggerRef),e(this,W).appendChild(i)}this.el.appendChild(e(this,W))},As=function(t,i){i.preventDefault(),t!==this.activeIndex&&this.goTo(t)},Bi=function(){Array.from(e(this,W).children).forEach(t=>t.removeAttribute("class")),e(this,W).children[this.activeIndex].classList.add("active")},bi=function(t){this.el.style.transitionDuration=t+"ms"},Ni=function(){p(this.el,"caroulix.slide",{nextElement:e(this,E)[this.activeIndex],currentElement:e(this,E)[e(this,E).findIndex(t=>t.classList.contains("active"))]})},v(Ei,"getDefaultOptions",()=>rn),z({class:Ei,name:"Caroulix",dataDetection:!0,autoInit:{enabled:!0,selector:".caroulix"}});const an={animationDuration:300,sidenav:{activeClass:!0,activeWhenOpen:!0,autoClose:!0}};class Di extends Z{constructor(t,i){super();a(this,D);v(this,"options");a(this,jt);a(this,Re);a(this,Gt,!0);a(this,V,!1);a(this,mt,!1);a(this,Oe,!1);a(this,Zt);a(this,_t);a(this,K);try{this.preventDbInstance(t),u.push({type:"Collapsible",instance:this}),this.el=document.querySelector(t),this.options=H("Collapsible",i,this.el),this.setup()}catch(r){console.error("[Axentix] Collapsible init error",r)}}setup(){p(this.el,"collapsible.setup"),o(this,jt,Ie(this.el.id)),o(this,Gt,!0),o(this,V,!!this.el.classList.contains("active")),o(this,mt,!1),o(this,K,""),o(this,Oe,!1),this.setupListeners(),this.el.style.transitionDuration=this.options.animationDuration+"ms",l(this,D,ks).call(this),o(this,Oe,!!this.el.querySelector(".active")),this.options.sidenav.activeClass&&l(this,D,Rs).call(this),e(this,V)&&this.open(),o(this,Gt,!1)}setupListeners(){o(this,Zt,l(this,D,Ms).bind(this)),e(this,jt).forEach(t=>t.addEventListener("click",e(this,Zt))),o(this,_t,l(this,D,Ss).bind(this)),window.addEventListener("resize",e(this,_t))}removeListeners(){e(this,jt).forEach(t=>t.removeEventListener("click",e(this,Zt))),o(this,Zt,void 0),window.removeEventListener("resize",e(this,_t)),o(this,_t,void 0)}open(){e(this,V)&&!e(this,Gt)||(p(this.el,"collapsible.open"),o(this,V,!0),o(this,mt,!0),this.el.style.display="block",l(this,D,Vi).call(this),this.el.style.maxHeight=this.el.scrollHeight+"px",this.options.sidenav.activeWhenOpen&&l(this,D,Wi).call(this,!0),this.options.sidenav.autoClose&&l(this,D,Os).call(this),setTimeout(()=>{o(this,mt,!1)},this.options.animationDuration))}close(){e(this,V)&&(p(this.el,"collapsible.close"),o(this,mt,!0),this.el.style.maxHeight="",l(this,D,Vi).call(this),this.options.sidenav.activeWhenOpen&&l(this,D,Wi).call(this,!1),setTimeout(()=>{this.el.style.display="",o(this,mt,!1),o(this,V,!1)},this.options.animationDuration))}}jt=new WeakMap,Re=new WeakMap,Gt=new WeakMap,V=new WeakMap,mt=new WeakMap,Oe=new WeakMap,Zt=new WeakMap,_t=new WeakMap,K=new WeakMap,D=new WeakSet,Ss=function(){e(this,V)&&!e(this,K)&&(this.el.style.maxHeight=this.el.scrollHeight+"px")},ks=function(){const t=this.el.closest(".sidenav");t&&(o(this,K,t.id),o(this,Re,e(this,jt).filter(i=>{var r;return((r=i.closest(".sidenav"))==null?void 0:r.id)===t.id})))},Rs=function(){!e(this,Oe)||!e(this,K)||(e(this,Re).forEach(t=>t.classList.add("active")),this.el.classList.add("active"),this.open(),o(this,V,!0))},Wi=function(t){e(this,K)&&e(this,Re).forEach(i=>{t?i.classList.add("active"):i.classList.remove("active")})},Os=function(){!e(this,Gt)&&e(this,K)&&Ze("Collapsible").forEach(t=>{e(t,K)===e(this,K)&&t.el.id!==this.el.id&&t.close()})},Vi=function(){this.el.style.overflow="hidden",setTimeout(()=>{this.el.style.overflow=""},this.options.animationDuration)},Ms=function(t){t.preventDefault(),!e(this,mt)&&(e(this,V)?this.close():this.open())},v(Di,"getDefaultOptions",()=>an),z({class:Di,name:"Collapsible",dataDetection:!0,autoInit:{enabled:!0,selector:".collapsible"}});const ln={overlay:!0,bodyScrolling:!1,animationDuration:300};class Ti extends Z{constructor(t,i){super();a(this,$);v(this,"options");a(this,Me);a(this,Q,!1);a(this,tt,!1);a(this,Kt,!1);a(this,$e,!1);a(this,et);a(this,Pe);a(this,vt);a(this,Jt);a(this,qe);try{this.preventDbInstance(t),u.push({type:"Sidenav",instance:this}),this.el=document.querySelector(t),this.options=H("Sidenav",i,this.el),this.setup()}catch(r){console.error("[Axentix] Sidenav init error",r)}}setup(){p(this.el,"sidenav.setup"),o(this,Me,Ie(this.el.id)),o(this,Q,!1),o(this,tt,!1),o(this,qe,window.innerWidth),o(this,Kt,this.el.classList.contains("sidenav-fixed"));const t=Ze("Sidenav").find(i=>e(i,Kt));o(this,$e,t&&t.el===this.el),o(this,et,document.querySelector('.layout, [class*="layout-"]')),e(this,et)&&e(this,$e)&&l(this,$,Xi).call(this),this.setupListeners(),this.options.overlay&&o(this,Pe,wi(e(this,Q),this.options.overlay,this.el.id,this.options.animationDuration)),e(this,et)&&e(this,Kt)&&l(this,$,Ps).call(this),this.el.style.transitionDuration=this.options.animationDuration+"ms"}setupListeners(){o(this,vt,l(this,$,qs).bind(this)),e(this,Me).forEach(t=>t.addEventListener("click",e(this,vt))),o(this,Jt,l(this,$,$s).bind(this)),window.addEventListener("resize",e(this,Jt))}removeListeners(){e(this,Me).forEach(t=>t.removeEventListener("click",e(this,vt))),o(this,vt,void 0),window.removeEventListener("resize",e(this,Jt)),o(this,Jt,void 0)}destroy(){p(this.el,"component.destroy"),this.removeListeners(),e(this,et)&&l(this,$,Xi).call(this);const t=u.findIndex(i=>i.instance.el.id===this.el.id);u.splice(t,1)}open(){e(this,Q)||e(this,tt)||(p(this.el,"sidenav.open"),o(this,Q,!0),o(this,tt,!0),this.el.classList.add("active"),Ke(this.options.overlay,e(this,Pe),e(this,vt),!0,this.options.animationDuration),l(this,$,Yi).call(this,!1),setTimeout(()=>{o(this,tt,!1),p(this.el,"sidenav.opened")},this.options.animationDuration))}close(){!e(this,Q)||e(this,tt)||(o(this,tt,!0),p(this.el,"sidenav.close"),this.el.classList.remove("active"),Ke(this.options.overlay,e(this,Pe),e(this,vt),!1,this.options.animationDuration),setTimeout(()=>{l(this,$,Yi).call(this,!0),o(this,Q,!1),o(this,tt,!1),p(this.el,"sidenav.closed")},this.options.animationDuration))}}Me=new WeakMap,Q=new WeakMap,tt=new WeakMap,Kt=new WeakMap,$e=new WeakMap,et=new WeakMap,Pe=new WeakMap,vt=new WeakMap,Jt=new WeakMap,qe=new WeakMap,$=new WeakSet,$s=function(t){const r=t.target.innerWidth;e(this,qe)!==r&&this.close(),o(this,qe,r)},Xi=function(){["layout-sidenav-right","layout-sidenav-both"].forEach(t=>e(this,et).classList.remove(t))},Ps=function(){if(!e(this,$e))return;const t=Array.from(document.querySelectorAll(".sidenav")).filter(d=>d.classList.contains("sidenav-fixed")),{sidenavsRight:i,sidenavsLeft:r}=t.reduce((d,f)=>(f.classList.contains("sidenav-right")?d.sidenavsRight.push(f):d.sidenavsLeft.push(f),d),{sidenavsRight:[],sidenavsLeft:[]}),h=r.length>0&&i.length>0;i.length>0&&!h?e(this,et).classList.add("layout-sidenav-right"):h&&e(this,et).classList.add("layout-sidenav-both")},Yi=function(t){this.options.bodyScrolling||(document.body.style.overflow=t?"":"hidden")},qs=function(t){t.preventDefault(),!(e(this,Kt)&&window.innerWidth>=960)&&(e(this,Q)?this.close():this.open())},v(Ti,"getDefaultOptions",()=>ln),z({class:Ti,name:"Sidenav",dataDetection:!0,autoInit:{enabled:!0,selector:".sidenav"}});const hn={animationDuration:300,animationType:"none",hover:!1,autoClose:!0,preventViewport:!1,closeOnClick:!0};class Ci extends Z{constructor(t,i){super();a(this,B);v(this,"options");a(this,it);a(this,Qt);a(this,st,!1);a(this,J,!1);a(this,te);a(this,ee);a(this,ie);try{this.preventDbInstance(t),u.push({type:"Dropdown",instance:this}),this.el=document.querySelector(t),this.options=H("Dropdown",i,this.el),this.setup()}catch(r){console.error("[Axentix] Dropdown init error",r)}}setup(){p(this.el,"dropdown.setup"),o(this,it,this.el.querySelector(".dropdown-content")),o(this,Qt,Ie(this.el.id)[0]),o(this,st,!1),o(this,J,!!this.el.classList.contains("active")),this.options.hover?this.el.classList.add("active-hover"):this.setupListeners(),this.options.preventViewport&&this.el.classList.add("dropdown-vp"),l(this,B,zs).call(this)}setupListeners(){this.options.hover||(o(this,ee,l(this,B,Bs).bind(this)),e(this,Qt).addEventListener("click",e(this,ee)),o(this,te,l(this,B,Hs).bind(this)),document.addEventListener("click",e(this,te),!0),o(this,ie,l(this,B,Fi).bind(this)),this.options.preventViewport&&window.addEventListener("scroll",e(this,ie)))}removeListeners(){this.options.hover||(e(this,Qt).removeEventListener("click",e(this,ee)),o(this,ee,void 0),document.removeEventListener("click",e(this,te),!0),o(this,te,void 0),this.options.preventViewport&&window.removeEventListener("scroll",e(this,ie)),o(this,ie,void 0))}open(){e(this,J)||(p(this.el,"dropdown.open"),e(this,it).style.display="flex",this.options.preventViewport&&l(this,B,Fi).call(this),setTimeout(()=>{this.el.classList.add("active"),o(this,J,!0)},10),this.options.autoClose&&l(this,B,Ns).call(this),this.options.animationType!=="none"?(o(this,st,!0),setTimeout(()=>{o(this,st,!1),p(this.el,"dropdown.opened")},this.options.animationDuration)):p(this.el,"dropdown.opened"))}close(){e(this,J)&&(p(this.el,"dropdown.close"),this.el.classList.remove("active"),this.options.animationType!=="none"?(o(this,st,!0),setTimeout(()=>{e(this,it).style.display="",o(this,st,!1),o(this,J,!1),p(this.el,"dropdown.closed")},this.options.animationDuration)):(e(this,it).style.display="",o(this,J,!1),p(this.el,"dropdown.closed")))}}it=new WeakMap,Qt=new WeakMap,st=new WeakMap,J=new WeakMap,te=new WeakMap,ee=new WeakMap,ie=new WeakMap,B=new WeakSet,zs=function(){const t=["none","fade"];this.options.animationType=this.options.animationType.toLowerCase(),t.includes(this.options.animationType)||(this.options.animationType="none"),this.options.animationType==="fade"&&!this.options.hover&&(e(this,it).style.transitionDuration=this.options.animationDuration+"ms",this.el.classList.add("dropdown-anim-fade"))},Hs=function(t){t.target===e(this,Qt)||e(this,st)||!e(this,J)||!this.options.closeOnClick&&t.target.closest(".dropdown-content")||this.close()},Bs=function(t){t.preventDefault(),!e(this,st)&&(e(this,J)?this.close():this.open())},Ns=function(){Ze("Dropdown").forEach(t=>{t.el.id!==this.el.id&&t.close()})},Fi=function(){const t=e(this,it).getBoundingClientRect(),i=t.height-(t.bottom-(window.innerHeight||document.documentElement.clientHeight))-10;e(this,it).style.maxHeight=i+"px"},v(Ci,"getDefaultOptions",()=>hn),z({class:Ci,name:"Dropdown",dataDetection:!0,autoInit:{enabled:!0,selector:".dropdown"}});const cn={animationDuration:300,hover:!0,direction:"top",position:"bottom-right",offsetX:"1rem",offsetY:"1.5rem"};class Ii extends Z{constructor(t,i){super();a(this,X);v(this,"options");a(this,yt,!1);a(this,ot,!1);a(this,ze);a(this,St);a(this,se);a(this,oe);a(this,ne);a(this,re);try{this.preventDbInstance(t),u.push({type:"Fab",instance:this}),this.el=document.querySelector(t),this.options=H("Fab",i,this.el),this.setup()}catch(r){console.error("[Axentix] Fab init error",r)}}setup(){p(this.el,"fab.setup"),o(this,yt,!1),o(this,ot,!1),o(this,ze,Ie(this.el.id)[0]),o(this,St,this.el.querySelector(".fab-menu")),l(this,X,Ws).call(this),this.setupListeners(),this.el.style.transitionDuration=this.options.animationDuration+"ms",l(this,X,Vs).call(this)}setupListeners(){this.options.hover?(o(this,se,this.open.bind(this)),o(this,oe,this.close.bind(this)),this.el.addEventListener("mouseenter",e(this,se)),this.el.addEventListener("mouseleave",e(this,oe))):(o(this,re,l(this,X,Fs).bind(this)),this.el.addEventListener("click",e(this,re))),o(this,ne,l(this,X,Ys).bind(this)),document.addEventListener("click",e(this,ne),!0)}removeListeners(){this.options.hover?(this.el.removeEventListener("mouseenter",e(this,se)),this.el.removeEventListener("mouseleave",e(this,oe)),o(this,se,void 0),o(this,oe,void 0)):(this.el.removeEventListener("click",e(this,re)),o(this,re,void 0)),document.removeEventListener("click",e(this,ne),!0),o(this,ne,void 0)}open(){e(this,ot)||(p(this.el,"fab.open"),o(this,yt,!0),o(this,ot,!0),this.el.classList.add("active"),setTimeout(()=>{o(this,yt,!1)},this.options.animationDuration))}close(){e(this,ot)&&(p(this.el,"fab.close"),o(this,yt,!0),o(this,ot,!1),this.el.classList.remove("active"),setTimeout(()=>{o(this,yt,!1)},this.options.animationDuration))}}yt=new WeakMap,ot=new WeakMap,ze=new WeakMap,St=new WeakMap,se=new WeakMap,oe=new WeakMap,ne=new WeakMap,re=new WeakMap,X=new WeakSet,Ws=function(){["right","left","top","bottom"].includes(this.options.direction)||(this.options.direction="top"),["top-right","top-left","bottom-right","bottom-left"].includes(this.options.position)||(this.options.position="bottom-right")},Vs=function(){this.options.position.split("-")[0]==="top"?this.el.style.top=this.options.offsetY:this.el.style.bottom=this.options.offsetY,this.options.position.split("-")[1]==="right"?this.el.style.right=this.options.offsetX:this.el.style.left=this.options.offsetX,(this.options.direction==="right"||this.options.direction==="left")&&this.el.classList.add("fab-dir-x"),l(this,X,Xs).call(this)},Xs=function(){if(this.options.direction==="top"||this.options.direction==="bottom"){const t=e(this,ze).clientHeight;this.options.direction==="top"?e(this,St).style.bottom=t+"px":e(this,St).style.top=t+"px"}else{const t=e(this,ze).clientWidth;this.options.direction==="right"?e(this,St).style.left=t+"px":e(this,St).style.right=t+"px"}},Ys=function(t){!this.el.contains(t.target)&&e(this,ot)&&this.close()},Fs=function(t){t.preventDefault(),!e(this,yt)&&(e(this,ot)?this.close():this.open())},v(Ii,"getDefaultOptions",()=>cn),z({class:Ii,name:"Fab",dataDetection:!0,autoInit:{enabled:!0,selector:".fab:not(i)"}});const dn={animationDuration:400,overlayClass:"grey dark-4",offset:150,mobileOffset:80,caption:""};class Ai extends Z{constructor(t,i){super();a(this,x);v(this,"options");a(this,ae);a(this,le);a(this,he);a(this,ce);a(this,de);a(this,R);a(this,He);a(this,Be);a(this,S);a(this,kt,0);a(this,Rt,0);a(this,nt,!1);a(this,ii,!1);a(this,rt);a(this,Ot,!1);a(this,at,!1);a(this,mi,()=>{e(this,nt)&&this.close()});try{this.preventDbInstance(t),u.push({type:"Lightbox",instance:this}),this.el=document.querySelector(t),this.options=H("Lightbox",i,this.el),this.setup()}catch(r){console.error("[Axentix] Lightbox init error",r)}}setup(){p(this.el,"lightbox.setup"),this.el.style.transitionDuration=this.options.animationDuration+"ms",o(this,rt,ri([this.el])),this.setupListeners()}setupListeners(){o(this,ae,l(this,x,so).bind(this)),this.el.addEventListener("click",e(this,ae)),o(this,he,l(this,x,to).bind(this)),o(this,ce,l(this,x,eo).bind(this)),o(this,de,e(this,mi).bind(this)),o(this,le,l(this,x,Qs).bind(this)),window.addEventListener("keyup",e(this,he)),window.addEventListener("scroll",e(this,ce)),window.addEventListener("resize",e(this,de)),this.el.addEventListener("transitionend",e(this,le))}removeListeners(){this.el.removeEventListener("click",e(this,ae)),this.el.removeEventListener("transitionend",e(this,le)),window.removeEventListener("keyup",e(this,he)),window.removeEventListener("scroll",e(this,ce)),window.removeEventListener("resize",e(this,de)),o(this,ae,void 0),o(this,he,void 0),o(this,ce,void 0),o(this,de,void 0),o(this,le,void 0)}open(){o(this,at,!0);let t,i;e(this,Ot)?t=i=e(this,rt).getBoundingClientRect():t=i=this.el.getBoundingClientRect(),o(this,Ot,!1),l(this,x,Us).call(this),l(this,x,js).call(this);const r=window.innerHeight/2,h=window.innerWidth/2;o(this,S,t),this.el.style.width=e(this,S).width+"px",this.el.style.height=e(this,S).height+"px",this.el.style.top="0",this.el.style.left="0";const d=r+window.scrollY-(i.top+window.scrollY),f=h+window.scrollX-(i.left+window.scrollX);l(this,x,_s).call(this),e(this,rt).style.position="relative",setTimeout(()=>{p(this.el,"lightbox.open"),o(this,nt,!0),this.el.classList.contains("responsive-media")&&(o(this,ii,!0),this.el.classList.remove("responsive-media")),this.el.classList.add("active"),e(this,rt).style.width=e(this,S).width+"px",e(this,rt).style.height=e(this,S).height+"px",this.el.style.width=e(this,Rt)+"px",this.el.style.height=e(this,kt)+"px",this.el.style.top=d-e(this,kt)/2+"px",this.el.style.left=f-e(this,Rt)/2+"px"},50)}close(t){t!=null&&t.key&&t.key!=="Escape"||(o(this,nt,!1),o(this,Ot,!0),o(this,at,!1),p(this.el,"lightbox.close"),l(this,x,Gs).call(this),this.el.style.position="absolute",this.el.style.top="0px",this.el.style.left="0px",this.el.style.width=e(this,S).width+"px",this.el.style.height=e(this,S).height+"px")}}ae=new WeakMap,le=new WeakMap,he=new WeakMap,ce=new WeakMap,de=new WeakMap,R=new WeakMap,He=new WeakMap,Be=new WeakMap,S=new WeakMap,kt=new WeakMap,Rt=new WeakMap,nt=new WeakMap,ii=new WeakMap,rt=new WeakMap,Ot=new WeakMap,at=new WeakMap,x=new WeakSet,Us=function(){if(!e(this,R)){if(l(this,x,Ks).call(this),o(this,R,document.createElement("div")),e(this,R).style.transitionDuration=this.options.animationDuration+"ms",e(this,R).className="lightbox-overlay "+this.options.overlayClass,e(this,rt).appendChild(e(this,R)),this.options.caption){const t=document.createElement("p");t.className="lightbox-caption",t.innerHTML=this.options.caption,e(this,R).appendChild(t)}o(this,He,this.close.bind(this)),e(this,R).addEventListener("click",e(this,He))}},js=function(){setTimeout(()=>{e(this,R).style.opacity="1"},50)},Gs=function(){e(this,R).style.opacity="0"},Zs=function(){e(this,R).removeEventListener("click",e(this,He)),e(this,R).remove(),o(this,R,null)},_s=function(){const t=window.innerWidth>=960?this.options.offset:this.options.mobileOffset;window.innerWidth/window.innerHeight>=e(this,S).width/e(this,S).height?(o(this,kt,window.innerHeight-t),o(this,Rt,e(this,kt)*e(this,S).width/e(this,S).height)):(o(this,Rt,window.innerWidth-t),o(this,kt,e(this,Rt)*e(this,S).height/e(this,S).width))},Ks=function(){o(this,Be,[]);for(let t=this.el;t&&t!==document;t=t.parentNode){const i=window.getComputedStyle(t);(i.overflow==="hidden"||i.overflowX==="hidden"||i.overflowY==="hidden")&&(e(this,Be).push(t),t!==document.body&&t.style.setProperty("overflow","visible","important"),document.body.style.overflowX="hidden")}},Js=function(){e(this,Be).forEach(t=>t.style.overflow=""),document.body.style.overflowX=""},Qs=function(t){!t.propertyName.includes("width")&&!t.propertyName.includes("height")||(e(this,Ot)?(l(this,x,io).call(this),o(this,Ot,!1),o(this,nt,!1),p(this.el,"lightbox.closed")):e(this,at)&&(o(this,at,!1),p(this.el,"lightbox.opened")))},to=function(t){t.key==="Escape"&&(e(this,at)||e(this,nt))&&this.close()},eo=function(){(e(this,nt)||e(this,at))&&this.close()},mi=new WeakMap,io=function(){this.el.classList.remove("active"),l(this,x,Zs).call(this),l(this,x,Js).call(this),e(this,ii)&&this.el.classList.add("responsive-media"),e(this,rt).removeAttribute("style"),this.el.style.position="",this.el.style.left="",this.el.style.top="",this.el.style.width="",this.el.style.height="",this.el.style.transform=""},so=function(){if(e(this,at)||e(this,nt)){this.close();return}this.open()},v(Ai,"getDefaultOptions",()=>dn),z({class:Ai,name:"Lightbox",dataDetection:!0,autoInit:{enabled:!0,selector:".lightbox"}});const pn={overlay:!0,bodyScrolling:!1,animationDuration:400};class Si extends Z{constructor(t,i){super();a(this,Lt);v(this,"options");v(this,"overlayElement");a(this,Ne);a(this,lt,!1);a(this,gt,!1);a(this,bt);try{this.preventDbInstance(t),u.push({type:"Modal",instance:this}),this.el=document.querySelector(t),this.options=H("Modal",i,this.el),this.setup()}catch(r){console.error("[Axentix] Modal init error",r)}}setup(){p(this.el,"modal.setup"),o(this,Ne,Ie(this.el.id)),o(this,lt,!!this.el.classList.contains("active")),o(this,gt,!1),this.setupListeners(),this.options.overlay&&(this.overlayElement=wi(e(this,lt),this.options.overlay,this.el.id,this.options.animationDuration)),this.el.style.transitionDuration=this.options.animationDuration+"ms",this.el.style.animationDuration=this.options.animationDuration+"ms"}setupListeners(){o(this,bt,l(this,Lt,no).bind(this)),e(this,Ne).forEach(t=>t.addEventListener("click",e(this,bt)))}removeListeners(){e(this,Ne).forEach(t=>t.removeEventListener("click",e(this,bt))),o(this,bt,void 0)}open(){e(this,lt)||(p(this.el,"modal.open"),o(this,lt,!0),o(this,gt,!0),l(this,Lt,oo).call(this),this.el.style.display="block",Ke(this.options.overlay,this.overlayElement,e(this,bt),!0,this.options.animationDuration),l(this,Lt,Ui).call(this,!1),setTimeout(()=>{this.el.classList.add("active")},50),setTimeout(()=>{o(this,gt,!1),p(this.el,"modal.opened")},this.options.animationDuration))}close(){e(this,lt)&&(p(this.el,"modal.close"),o(this,gt,!0),this.el.classList.remove("active"),Ke(this.options.overlay,this.overlayElement,e(this,bt),!1,this.options.animationDuration),setTimeout(()=>{this.el.style.display="",o(this,gt,!1),o(this,lt,!1),l(this,Lt,Ui).call(this,!0),p(this.el,"modal.closed")},this.options.animationDuration))}}Ne=new WeakMap,lt=new WeakMap,gt=new WeakMap,bt=new WeakMap,Lt=new WeakSet,Ui=function(t){this.options.bodyScrolling||(document.body.style.overflow=t?"":"hidden")},oo=function(){const t=document.querySelectorAll(".modal.active").length+1;this.options.overlay&&(this.overlayElement.style.zIndex=String(800+t*10-2)),this.el.style.zIndex=String(800+t*10)},no=function(t){t.preventDefault(),!e(this,gt)&&(e(this,lt)?this.close():this.open())},v(Si,"getDefaultOptions",()=>pn),z({class:Si,name:"Modal",dataDetection:!0,autoInit:{enabled:!0,selector:".modal"}});const un={animationDuration:300,animationType:"none",disableActiveBar:!1,caroulix:{animationDuration:300,backToOpposite:!1,enableTouch:!1,autoplay:{enabled:!1}}};class ki extends Z{constructor(t,i){super();a(this,w);v(this,"options");a(this,Y);a(this,C);a(this,F);a(this,O,0);a(this,We);a(this,Ve);a(this,pe);a(this,ue);a(this,fe);a(this,Mt);a(this,me);a(this,ht);a(this,ve);a(this,Xe,!1);a(this,ye);a(this,U,!1);try{this.preventDbInstance(t),u.push({type:"Tab",instance:this}),this.el=document.querySelector(t),this.options=H("Tab",i,this.el),this.setup()}catch(r){console.error("[Axentix] Tab init error",r)}}setup(){p(this.el,"tab.setup"),["none","slide"].includes(this.options.animationType)||(this.options.animationType="none"),o(this,U,!1),o(this,Y,this.el.querySelector(".tab-arrow")),o(this,C,this.el.querySelectorAll(".tab-menu .tab-link")),o(this,F,this.el.querySelector(".tab-menu")),o(this,O,0),o(this,ht,l(this,w,lo).call(this)),e(this,Y)&&(l(this,w,Gi).call(this),o(this,We,this.el.querySelector(".tab-arrow .tab-prev")),o(this,Ve,this.el.querySelector(".tab-arrow .tab-next"))),this.setupListeners(),e(this,F).style.transitionDuration=this.options.animationDuration+"ms",this.options.animationType==="slide"?l(this,w,co).call(this):this.updateActiveElement()}setupListeners(){e(this,C).forEach(t=>{t.listenerRef=l(this,w,fo).bind(this,t),t.addEventListener("click",t.listenerRef)}),o(this,me,l(this,w,ro).bind(this)),window.addEventListener("resize",e(this,me)),e(this,Y)&&(o(this,fe,l(this,w,Gi).bind(this)),window.addEventListener("resize",e(this,fe)),o(this,pe,l(this,w,po).bind(this)),o(this,ue,l(this,w,uo).bind(this)),e(this,We).addEventListener("click",e(this,pe)),e(this,Ve).addEventListener("click",e(this,ue)))}removeListeners(){e(this,C).forEach(t=>{t.removeEventListener("click",t.listenerRef),t.listenerRef=void 0}),window.removeEventListener("resize",e(this,me)),o(this,me,void 0),e(this,Y)&&(window.removeEventListener("resize",e(this,fe)),o(this,fe,void 0),e(this,We).removeEventListener("click",e(this,pe)),e(this,Ve).removeEventListener("click",e(this,ue)),o(this,pe,void 0),o(this,ue,void 0)),e(this,Mt)&&(this.el.removeEventListener("ax.caroulix.slide",e(this,Mt)),o(this,Mt,void 0))}select(t){if(e(this,U))return;o(this,U,!0);const i=this.el.querySelector('.tab-menu a[href="#'+t+'"]');if(o(this,O,Array.from(e(this,C)).findIndex(r=>r.children[0]===i)),p(i,"tab.select",{currentIndex:e(this,O)}),l(this,w,ji).call(this,i.parentElement),e(this,Xe)){e(this,ht).forEach(h=>h.id===t?h.classList.add("active"):"");const r=Tt("Caroulix");o(this,ye,new r("#"+e(this,ve).id,this.options.caroulix,this.el,!0)),o(this,Mt,l(this,w,ao).bind(this)),this.el.addEventListener("ax.caroulix.slide",e(this,Mt)),o(this,Xe,!1),o(this,U,!1);return}if(this.options.animationType==="slide"){const r=e(this,ht).findIndex(h=>h.id===t);e(this,ye).goTo(r),setTimeout(()=>{o(this,U,!1)},this.options.animationDuration)}else l(this,w,ho).call(this),e(this,ht).forEach(r=>{r.id===t&&(r.style.display="block")}),o(this,U,!1)}updateActiveElement(){let t;e(this,C).forEach((r,h)=>{r.classList.contains("active")&&(t=r,o(this,O,h))}),t||(t=e(this,C).item(0),o(this,O,0));const i=t.children[0].getAttribute("href");this.select(i.split("#")[1])}prev(t=1){if(e(this,U))return;const i=l(this,w,mo).call(this,t);o(this,O,i),p(this.el,"tab.prev",{step:t});const r=e(this,C)[i].children[0].getAttribute("href");this.select(r.split("#")[1])}next(t=1){if(e(this,U))return;const i=l(this,w,vo).call(this,t);o(this,O,i),p(this.el,"tab.next",{step:t});const r=e(this,C)[i].children[0].getAttribute("href");this.select(r.split("#")[1])}}Y=new WeakMap,C=new WeakMap,F=new WeakMap,O=new WeakMap,We=new WeakMap,Ve=new WeakMap,pe=new WeakMap,ue=new WeakMap,fe=new WeakMap,Mt=new WeakMap,me=new WeakMap,ht=new WeakMap,ve=new WeakMap,Xe=new WeakMap,ye=new WeakMap,U=new WeakMap,w=new WeakSet,ro=function(){this.updateActiveElement();for(let t=100;t<500;t+=100)setTimeout(()=>{this.updateActiveElement()},t)},ao=function(){e(this,O)!==e(this,ye).activeIndex&&(o(this,O,e(this,ye).activeIndex),l(this,w,ji).call(this,e(this,C)[e(this,O)]))},lo=function(){return Array.from(e(this,C)).map(t=>{const i=t.children[0].getAttribute("href");return this.el.querySelector(i)})},ho=function(){e(this,ht).forEach(t=>t.style.display="none")},co=function(){e(this,ht).forEach(i=>i.classList.add("caroulix-item")),o(this,ve,ri(e(this,ht))),e(this,ve).classList.add("caroulix");const t=Math.random().toString().split(".")[1];e(this,ve).id="tab-caroulix-"+t,o(this,Xe,!0),this.options.animationDuration!==300&&(this.options.caroulix.animationDuration=this.options.animationDuration),this.updateActiveElement()},ji=function(t){if(e(this,C).forEach(i=>i.classList.remove("active")),!this.options.disableActiveBar){const i=t.getBoundingClientRect(),r=i.left,h=e(this,F).getBoundingClientRect().left,d=r-h+e(this,F).scrollLeft,f=i.width,L=e(this,F).clientWidth-d-f;e(this,F).style.setProperty(q("tab-bar-left-offset"),Math.floor(d)+"px"),e(this,F).style.setProperty(q("tab-bar-right-offset"),Math.ceil(L)+"px")}t.classList.add("active")},Gi=function(){const t=Array.from(e(this,C)).reduce((r,h)=>(r+=h.clientWidth,r),0),i=e(this,Y).clientWidth;t>i?e(this,Y).classList.contains("tab-arrow-show")||e(this,Y).classList.add("tab-arrow-show"):e(this,Y).classList.contains("tab-arrow-show")&&e(this,Y).classList.remove("tab-arrow-show")},po=function(t){t.preventDefault(),e(this,F).scrollLeft-=40},uo=function(t){t.preventDefault(),e(this,F).scrollLeft+=40},fo=function(t,i){if(i.preventDefault(),e(this,U)||t.classList.contains("active"))return;const r=t.children[0].getAttribute("href");this.select(r.split("#")[1])},mo=function(t){let i=0,r=e(this,O);for(let h=0;h<t;h++)r>0?(i=r-1,r--):(r=e(this,C).length-1,i=r);return i},vo=function(t){let i=0,r=e(this,O);for(let h=0;h<t;h++)r<e(this,C).length-1?(i=r+1,r++):(r=0,i=r);return i},v(ki,"getDefaultOptions",()=>un),z({class:ki,name:"Tab",dataDetection:!0,autoInit:{enabled:!0,selector:".tab"}});const fn={offset:200,linkSelector:"a",classes:"active",auto:{enabled:!1,classes:"",selector:""}};class Ri extends Z{constructor(t,i){super();a(this,M);v(this,"options");a(this,$t);a(this,wt);a(this,ge);a(this,ct);try{this.preventDbInstance(t),u.push({type:"ScrollSpy",instance:this}),this.el=document.querySelector(t),this.options=H("ScrollSpy",i,this.el),this.setup()}catch(r){console.error("[Axentix] ScrollSpy init error",r)}}setup(){p(this.el,"scrollspy.setup"),this.options.auto.enabled?l(this,M,go).call(this):l(this,M,yo).call(this),typeof this.options.classes=="string"&&(this.options.classes=this.options.classes.split(" ")),o(this,$t,""),this.setupListeners(),l(this,M,Zi).call(this)}setupListeners(){o(this,wt,l(this,M,Zi).bind(this)),window.addEventListener("scroll",e(this,wt)),window.addEventListener("resize",e(this,wt))}removeListeners(){window.removeEventListener("scroll",e(this,wt)),window.removeEventListener("resize",e(this,wt)),o(this,wt,void 0)}}$t=new WeakMap,wt=new WeakMap,ge=new WeakMap,ct=new WeakMap,M=new WeakSet,yo=function(){o(this,ge,Array.from(this.el.querySelectorAll(this.options.linkSelector))),o(this,ct,e(this,ge).map(t=>document.querySelector(t.getAttribute("href"))))},go=function(){o(this,ct,Array.from(document.querySelectorAll(this.options.auto.selector))),o(this,ge,e(this,ct).map(t=>{const i=document.createElement("a");return i.className=this.options.auto.classes,i.setAttribute("href","#"+t.id),i.innerHTML=t.innerHTML,this.el.appendChild(i),i}))},bo=function(){const t=window.scrollY,i=window.scrollX,r=window.innerWidth,h=window.innerHeight,d=t+this.options.offset;return h+t>=document.body.offsetHeight-2?e(this,ct)[e(this,ct).length-1]:e(this,ct).find(f=>{const L=f.getBoundingClientRect();return L.top+t>=t&&L.left+i>=i&&L.right<=r&&L.bottom<=h&&L.top+t<=d})},Lo=function(){e(this,$t)&&this.options.classes.forEach(t=>e(this,$t).classList.remove(t))},wo=function(){const t=window.scrollY;return e(this,ct).reduce((i,r)=>{const h=r.getBoundingClientRect().top+t,d=i.getBoundingClientRect().top+t;return h>t+this.options.offset?i:Math.abs(h-t)<Math.abs(d-t)?r:i})},Zi=function(){let t=l(this,M,bo).call(this);t||(t=l(this,M,wo).call(this));const i=e(this,ge).find(r=>r.getAttribute("href").split("#")[1]===t.id);i!==e(this,$t)&&(p(this.el,"scrollspy.update"),l(this,M,Lo).call(this),this.options.classes.forEach(r=>i.classList.add(r)),o(this,$t,i))},v(Ri,"getDefaultOptions",()=>fn),z({class:Ri,name:"ScrollSpy",dataDetection:!0,autoInit:{enabled:!0,selector:".scrollspy"}});const mn={animationDuration:400,duration:4e3,classes:"",position:"right",direction:"top",mobileDirection:"bottom",offset:{x:"5%",y:"0%",mobileX:"10%",mobileY:"0%"},isClosable:!1,isSwipeable:!0,closableContent:"x",loading:{enabled:!0,border:"2px solid #E2E2E2"}},vi=class vi{constructor(s,t){a(this,g);v(this,"options");v(this,"id");a(this,Ye);a(this,dt);a(this,pt);a(this,si);a(this,oi);a(this,Fe);a(this,be);a(this,Le);if(Ze("Toast").length>0){console.error("[Axentix] Toast: Don't try to create multiple toast instances");return}u.push({type:"Toast",instance:this}),this.id=Math.random().toString().split(".")[1],o(this,Ye,s),this.options=Ge(vi.getDefaultOptions(),t),o(this,pt,ai()),this.options.position=this.options.position.toLowerCase(),this.options.direction=this.options.direction.toLowerCase(),this.options.mobileDirection=this.options.mobileDirection.toLowerCase(),o(this,dt,{})}destroy(){const s=u.findIndex(t=>t.instance.id===this.id);u.splice(s,1)}show(){try{Object.keys(e(this,dt)).includes(this.options.position)||l(this,g,xo).call(this),l(this,g,Mo).call(this)}catch(s){console.error("[Axentix] Toast error",s)}}change(s,t){o(this,Ye,s),this.options=Ge(this.options,t)}};Ye=new WeakMap,dt=new WeakMap,pt=new WeakMap,si=new WeakMap,oi=new WeakMap,Fe=new WeakMap,be=new WeakMap,Le=new WeakMap,g=new WeakSet,xo=function(){let s=document.createElement("div");["right","left"].includes(this.options.position)||(this.options.position="right"),this.options.position==="right"?s.style.right=this.options.offset.x:s.style.left=this.options.offset.x;const i=["bottom","top"];i.includes(this.options.direction)||(this.options.direction="top"),this.options.direction==="top"?s.style.top=this.options.offset.y:s.style.bottom=this.options.offset.y,i.includes(this.options.mobileDirection)||(this.options.mobileDirection="bottom"),s.style.setProperty(q("toaster-m-width"),100-this.options.offset.mobileX.slice(0,-1)+"%"),s.style.setProperty(q("toaster-m-offset"),this.options.offset.mobileY),this.options.loading.enabled&&s.style.setProperty(q("toast-loading-border"),this.options.loading.border),s.className=`toaster toaster-${this.options.position} toast-${this.options.direction} toaster-m-${this.options.mobileDirection}`,e(this,dt)[this.options.position]=s,document.body.appendChild(s)},Eo=function(){for(const s in e(this,dt)){let t=e(this,dt)[s];t.childElementCount<=0&&(t.remove(),delete e(this,dt)[s])}},Do=function(s){setTimeout(()=>{p(s,"toast.show"),this.options.loading.enabled&&(s.classList.add("toast-loading"),s.style.setProperty(q("toast-loading-duration"),this.options.duration+"ms")),s.classList.add("toast-animated"),setTimeout(()=>{p(s,"toast.shown"),this.options.loading.enabled&&s.classList.add("toast-load")},this.options.animationDuration)},50)},To=function(s){setTimeout(()=>{p(s,"toast.hide"),l(this,g,ni).call(this,s)},this.options.duration+this.options.animationDuration)},Co=function(s){s.style.transitionTimingFunction="cubic-bezier(0.445, 0.05, 0.55, 0.95)",s.style.paddingTop="0",s.style.paddingBottom="0",s.style.margin="0",s.style.height="0"},Io=function(s){o(this,si,l(this,g,So).bind(this)),o(this,oi,l(this,g,ko).bind(this)),o(this,Fe,l(this,g,Ro).bind(this)),s.addEventListener(`${e(this,pt)}${e(this,pt)==="touch"?"start":"down"}`,e(this,si)),s.addEventListener(`${e(this,pt)}move`,e(this,oi)),s.addEventListener(`${e(this,pt)}${e(this,pt)==="touch"?"end":"up"}`,e(this,Fe)),s.addEventListener(e(this,pt)==="pointer"?"pointerleave":"mouseleave",e(this,Fe))},Ao=function(s){s.querySelectorAll("[data-toast-close]").forEach(t=>{t.addEventListener("click",()=>{l(this,g,ni).call(this,s)})})},So=function(s){if(s.target.closest(".toast-trigger"))return;const t=s.target.closest(".toast");t.dataset.closing||(o(this,Le,qt(s)),o(this,be,!0),t.style.transitionProperty="height, margin, padding, transform, box-shadow")},ko=function(s){if(!e(this,be))return;const t=s.target.closest(".toast"),i=t.getBoundingClientRect(),r=Math.abs(qt(s)-e(this,Le));t.style.left=qt(s)-e(this,Le)+"px",t.style.opacity=r<i.width?(.99-r/i.width).toString():"0.01"},Ro=function(s){if(!e(this,be))return;s.cancelable&&s.preventDefault(),o(this,be,!1);const t=s.target.closest(".toast");t.style.transitionProperty="height, margin, opacity, padding, transform, box-shadow, left",Math.abs(qt(s)-e(this,Le))>t.getBoundingClientRect().width/2?(l(this,g,ni).call(this,t),t.dataset.closing="true"):(t.style.left="0px",t.style.opacity=1)},Oo=function(s){l(this,g,Io).call(this,s)},Mo=function(){let s=document.createElement("div");if(s.className="toast shadow-1 "+this.options.classes,s.innerHTML=e(this,Ye),s.style.transitionDuration=this.options.animationDuration+"ms",this.options.isClosable){let i=document.createElement("div");i.className="toast-trigger",i.innerHTML=this.options.closableContent,i.listenerRef=l(this,g,ni).bind(this,s,i),i.addEventListener("click",i.listenerRef),s.appendChild(i)}this.options.isSwipeable&&l(this,g,Oo).call(this,s),l(this,g,Do).call(this,s),l(this,g,Ao).call(this,s),e(this,dt)[this.options.position].appendChild(s),l(this,g,To).call(this,s);const t=s.clientHeight;s.style.height=t+"px"},ni=function(s,t,i){if(s.isAnimated)return;let r=1;i&&(i.preventDefault(),r=0,this.options.isClosable&&t.removeEventListener("click",t.listenerRef)),s.style.opacity="0",s.isAnimated=!0;const h=r*this.options.animationDuration+this.options.animationDuration;setTimeout(()=>{l(this,g,Co).call(this,s)},h/2),setTimeout(()=>{s.remove(),p(s,"toast.remove"),l(this,g,Eo).call(this)},h*1.45)},v(vi,"getDefaultOptions",()=>mn);let hi=vi;z({class:hi,name:"Toast"});const vn={content:"",animationDelay:0,offset:"10px",animationDuration:200,classes:"grey dark-4 light-shadow-2 p-2",position:"top"};class Oi extends Z{constructor(t,i){super();a(this,N);v(this,"options");a(this,b);a(this,Ue);a(this,we);a(this,xe);a(this,Ee);a(this,De);a(this,P);a(this,xt);try{this.preventDbInstance(t),u.push({type:"Tooltip",instance:this}),this.el=document.querySelector(t),this.options=H("Tooltip",i,this.el),this.setup()}catch(r){console.error("[Axentix] Tooltip init error",r)}}setup(){if(!this.options.content)return console.error(`Tooltip #${this.el.id} : empty content.`);p(this.el,"tooltip.setup"),this.options.position=this.options.position.toLowerCase(),document.querySelectorAll(".tooltip").forEach(i=>{i.dataset.tooltipId&&i.dataset.tooltipId===this.el.id&&o(this,b,i)}),e(this,b)||o(this,b,document.createElement("div")),e(this,b).dataset.tooltipId!==this.el.id&&(e(this,b).dataset.tooltipId=this.el.id),l(this,N,_i).call(this),document.body.appendChi