UNPKG

flyonui

Version:

The easiest, free and open-source Tailwind CSS component library with semantic classes.

65 lines 251 kB
var t={66:(t,e,i)=>{i.d(e,{A:()=>l});var s=i(392),n=i(709); /* * HSDataTable * @version: 3.2.2 * @author: Preline Labs Ltd. * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) * Copyright 2024 Preline Labs Ltd. */ class o extends n.A{constructor(t,e,i){var s,n,o,l,r,a,h,d,c,u,p,m,g,v,f,w,y,b,C,S,L;super(t,e,i),this.el="string"==typeof t?document.querySelector(t):t;const I=[];Array.from(this.el.querySelectorAll("thead th, thead td")).forEach((t,e)=>{t.classList.contains("--exclude-from-ordering")&&I.push({targets:e,orderable:!1})});const x=this.el.getAttribute("data-datatable"),E=x?JSON.parse(x):{};this.concatOptions=Object.assign(Object.assign({searching:!0,lengthChange:!1,order:[],columnDefs:[...I]},E),e),this.table=this.el.querySelector("table"),this.searches=null!==(s=Array.from(this.el.querySelectorAll("[data-datatable-search]")))&&void 0!==s?s:null,this.pageEntitiesList=null!==(n=Array.from(this.el.querySelectorAll("[data-datatable-page-entities]")))&&void 0!==n?n:null,this.pagingList=null!==(o=Array.from(this.el.querySelectorAll("[data-datatable-paging]")))&&void 0!==o?o:null,this.pagingPagesList=null!==(l=Array.from(this.el.querySelectorAll("[data-datatable-paging-pages]")))&&void 0!==l?l:null,this.pagingPrevList=null!==(r=Array.from(this.el.querySelectorAll("[data-datatable-paging-prev]")))&&void 0!==r?r:null,this.pagingNextList=null!==(a=Array.from(this.el.querySelectorAll("[data-datatable-paging-next]")))&&void 0!==a?a:null,this.infoList=null!==(h=Array.from(this.el.querySelectorAll("[data-datatable-info]")))&&void 0!==h?h:null,(null===(d=this.concatOptions)||void 0===d?void 0:d.rowSelectingOptions)&&(this.rowSelectingAll=null!==(g=(null===(u=null===(c=this.concatOptions)||void 0===c?void 0:c.rowSelectingOptions)||void 0===u?void 0:u.selectAllSelector)?document.querySelector(null===(m=null===(p=this.concatOptions)||void 0===p?void 0:p.rowSelectingOptions)||void 0===m?void 0:m.selectAllSelector):document.querySelector("[data-datatable-row-selecting-all]"))&&void 0!==g?g:null),(null===(v=this.concatOptions)||void 0===v?void 0:v.rowSelectingOptions)&&(this.rowSelectingIndividual=null!==(y=null===(w=null===(f=this.concatOptions)||void 0===f?void 0:f.rowSelectingOptions)||void 0===w?void 0:w.individualSelector)&&void 0!==y?y:"[data-datatable-row-selecting-individual]"),this.pageEntitiesList.length&&(this.concatOptions.pageLength=parseInt(this.pageEntitiesList[0].value)),this.maxPagesToShow=3,this.isRowSelecting=!!(null===(b=this.concatOptions)||void 0===b?void 0:b.rowSelectingOptions),this.pageBtnClasses=null!==(L=null===(S=null===(C=this.concatOptions)||void 0===C?void 0:C.pagingOptions)||void 0===S?void 0:S.pageBtnClasses)&&void 0!==L?L:null,this.onSearchInputListener=[],this.onPageEntitiesChangeListener=[],this.onSinglePagingClickListener=[],this.onPagingPrevClickListener=[],this.onPagingNextClickListener=[],this.init()}init(){this.createCollection(window.$hsDataTableCollection,this),this.initTable(),this.searches.length&&this.initSearch(),this.pageEntitiesList.length&&this.initPageEntities(),this.pagingList.length&&this.initPaging(),this.pagingPagesList.length&&this.buildPagingPages(),this.pagingPrevList.length&&this.initPagingPrev(),this.pagingNextList.length&&this.initPagingNext(),this.infoList.length&&this.initInfo(),this.isRowSelecting&&this.initRowSelecting()}initTable(){this.dataTable=new DataTable(this.table,this.concatOptions),this.isRowSelecting&&this.triggerChangeEventToRow(),this.dataTable.on("draw",()=>{this.isRowSelecting&&this.updateSelectAllCheckbox(),this.isRowSelecting&&this.triggerChangeEventToRow(),this.updateInfo(),this.pagingPagesList.forEach(t=>this.updatePaging(t))})}searchInput(t){this.onSearchInput(t.target.value)}pageEntitiesChange(t){this.onEntitiesChange(parseInt(t.target.value),t.target)}pagingPrevClick(){this.onPrevClick()}pagingNextClick(){this.onNextClick()}rowSelectingAllChange(){this.onSelectAllChange()}singlePagingClick(t){this.onPageClick(t)}initSearch(){this.searches.forEach(t=>{this.onSearchInputListener.push({el:t,fn:(0,s.sg)(t=>this.searchInput(t))}),t.addEventListener("input",this.onSearchInputListener.find(e=>e.el===t).fn)})}onSearchInput(t){this.dataTable.search(t).draw()}initPageEntities(){this.pageEntitiesList.forEach(t=>{this.onPageEntitiesChangeListener.push({el:t,fn:t=>this.pageEntitiesChange(t)}),t.addEventListener("change",this.onPageEntitiesChangeListener.find(e=>e.el===t).fn)})}onEntitiesChange(t,e){const i=this.pageEntitiesList.filter(t=>t!==e);i.length&&i.forEach(e=>{if(window.HSSelect){const i=window.HSSelect.getInstance(e,!0);i&&i.element.setValue(`${t}`)}else e.value=`${t}`}),this.dataTable.page.len(t).draw()}initInfo(){this.infoList.forEach(t=>{this.initInfoFrom(t),this.initInfoTo(t),this.initInfoLength(t)})}initInfoFrom(t){var e;const i=null!==(e=t.querySelector("[data-datatable-info-from]"))&&void 0!==e?e:null,{start:s}=this.dataTable.page.info();i&&(i.innerText=`${s+1}`)}initInfoTo(t){var e;const i=null!==(e=t.querySelector("[data-datatable-info-to]"))&&void 0!==e?e:null,{end:s}=this.dataTable.page.info();i&&(i.innerText=`${s}`)}initInfoLength(t){var e;const i=null!==(e=t.querySelector("[data-datatable-info-length]"))&&void 0!==e?e:null,{recordsTotal:s}=this.dataTable.page.info();i&&(i.innerText=`${s}`)}updateInfo(){this.initInfo()}initPaging(){this.pagingList.forEach(t=>this.hidePagingIfSinglePage(t))}hidePagingIfSinglePage(t){const{pages:e}=this.dataTable.page.info();e<2?(t.classList.add("hidden"),t.style.display="none"):(t.classList.remove("hidden"),t.style.display="")}initPagingPrev(){this.pagingPrevList.forEach(t=>{this.onPagingPrevClickListener.push({el:t,fn:()=>this.pagingPrevClick()}),t.addEventListener("click",this.onPagingPrevClickListener.find(e=>e.el===t).fn)})}onPrevClick(){this.dataTable.page("previous").draw("page")}disablePagingArrow(t,e){e?(t.classList.add("disabled"),t.setAttribute("disabled","disabled")):(t.classList.remove("disabled"),t.removeAttribute("disabled"))}initPagingNext(){this.pagingNextList.forEach(t=>{this.onPagingNextClickListener.push({el:t,fn:()=>this.pagingNextClick()}),t.addEventListener("click",this.onPagingNextClickListener.find(e=>e.el===t).fn)})}onNextClick(){this.dataTable.page("next").draw("page")}buildPagingPages(){this.pagingPagesList.forEach(t=>this.updatePaging(t))}updatePaging(t){const{page:e,pages:i,length:n}=this.dataTable.page.info(),o=this.dataTable.rows({search:"applied"}).count(),l=Math.ceil(o/n),r=e+1;let a=Math.max(1,r-Math.floor(this.maxPagesToShow/2)),h=Math.min(l,a+(this.maxPagesToShow-1));h-a+1<this.maxPagesToShow&&(a=Math.max(1,h-this.maxPagesToShow+1)),t.innerHTML="",a>1&&(this.buildPagingPage(1,t),a>2&&t.appendChild((0,s.fc)('<span class="ellipsis">...</span>')));for(let e=a;e<=h;e++)this.buildPagingPage(e,t);h<l&&(h<l-1&&t.appendChild((0,s.fc)('<span class="ellipsis">...</span>')),this.buildPagingPage(l,t)),this.pagingPrevList.forEach(t=>this.disablePagingArrow(t,0===e)),this.pagingNextList.forEach(t=>this.disablePagingArrow(t,e===i-1)),this.pagingList.forEach(t=>this.hidePagingIfSinglePage(t))}buildPagingPage(t,e){const{page:i}=this.dataTable.page.info(),n=(0,s.fc)('<button type="button"></button>');n.innerText=`${t}`,n.setAttribute("data-page",`${t}`),this.pageBtnClasses&&(0,s.en)(this.pageBtnClasses,n),i===t-1&&n.classList.add("active"),this.onSinglePagingClickListener.push({el:n,fn:()=>this.singlePagingClick(t)}),n.addEventListener("click",this.onSinglePagingClickListener.find(t=>t.el===n).fn),e.append(n)}onPageClick(t){this.dataTable.page(t-1).draw("page")}initRowSelecting(){this.onRowSelectingAllChangeListener=()=>this.rowSelectingAllChange(),this.rowSelectingAll.addEventListener("change",this.onRowSelectingAllChangeListener)}triggerChangeEventToRow(){this.table.querySelectorAll(`tbody ${this.rowSelectingIndividual}`).forEach(t=>{t.addEventListener("change",()=>{this.updateSelectAllCheckbox()})})}onSelectAllChange(){let t=this.rowSelectingAll.checked;Array.from(this.dataTable.rows({page:"current",search:"applied"}).nodes()).forEach(e=>{const i=e.querySelector(this.rowSelectingIndividual);i&&(i.checked=t)}),this.updateSelectAllCheckbox()}updateSelectAllCheckbox(){if(!this.dataTable.rows({search:"applied"}).count())return this.rowSelectingAll.checked=!1,!1;let t=!0;Array.from(this.dataTable.rows({page:"current",search:"applied"}).nodes()).forEach(e=>{const i=e.querySelector(this.rowSelectingIndividual);if(i&&!i.checked)return t=!1,!1}),this.rowSelectingAll.checked=t}destroy(){this.searches&&this.onSearchInputListener.forEach(({el:t,fn:e})=>t.removeEventListener("click",e)),this.pageEntitiesList&&this.onPageEntitiesChangeListener.forEach(({el:t,fn:e})=>t.removeEventListener("change",e)),this.pagingPagesList.length&&(this.onSinglePagingClickListener.forEach(({el:t,fn:e})=>t.removeEventListener("click",e)),this.pagingPagesList.forEach(t=>t.innerHTML="")),this.pagingPrevList.length&&this.onPagingPrevClickListener.forEach(({el:t,fn:e})=>t.removeEventListener("click",e)),this.pagingNextList.length&&this.onPagingNextClickListener.forEach(({el:t,fn:e})=>t.removeEventListener("click",e)),this.rowSelectingAll&&this.rowSelectingAll.removeEventListener("change",this.onRowSelectingAllChangeListener),this.dataTable.destroy(),this.rowSelectingAll=null,this.rowSelectingIndividual=null,window.$hsDataTableCollection=window.$hsDataTableCollection.filter(({element:t})=>t.el!==this.el)}static getInstance(t,e){const i=window.$hsDataTableCollection.find(e=>e.element.el===("string"==typeof t?document.querySelector(t):t));return i?e?i:i.element.el:null}static autoInit(){window.$hsDataTableCollection||(window.$hsDataTableCollection=[]),window.$hsDataTableCollection&&(window.$hsDataTableCollection=window.$hsDataTableCollection.filter(({element:t})=>document.contains(t.el))),document.querySelectorAll("[data-datatable]:not(.--prevent-on-load-init)").forEach(t=>{window.$hsDataTableCollection.find(e=>{var i;return(null===(i=null==e?void 0:e.element)||void 0===i?void 0:i.el)===t})||new o(t)})}}window.addEventListener("load",()=>{document.querySelectorAll("[data-datatable]:not(.--prevent-on-load-init)").length&&("undefined"==typeof jQuery&&console.error("HSDataTable: jQuery is not available, please add it to the page."),"undefined"==typeof DataTable&&console.error("HSDataTable: DataTable is not available, please add it to the page.")),"undefined"!=typeof DataTable&&"undefined"!=typeof jQuery&&o.autoInit()}),"undefined"!=typeof window&&(window.HSDataTable=o);const l=o},68:(t,e,i)=>{i.d(e,{A:()=>s});const s=class{constructor(){this.components=[],this.currentlyOpenedComponents=[],this.activeComponent=null,this.initGlobalListeners()}initGlobalListeners(){document.addEventListener("keydown",t=>this.handleGlobalKeydown(t)),document.addEventListener("focusin",t=>this.handleGlobalFocusin(t))}getActiveComponent(t){if(!t)return null;const e=this.components.filter(e=>e.wrapper.contains(t)||e.context&&e.context.contains(t));if(0===e.length)return null;if(1===e.length)return e[0];let i=null,s=Number.MAX_SAFE_INTEGER;for(const n of e){let e=0,o=t;for(;o&&o!==n.wrapper&&o!==n.context;)e++,o=o.parentElement;e<s&&(s=e,i=n)}return i}handleGlobalFocusin(t){const e=t.target;this.activeComponent=this.getActiveComponent(e)}handleGlobalKeydown(t){const e=t.target;if(this.activeComponent=this.getActiveComponent(e),this.activeComponent)switch(t.key){case"Escape":if(this.activeComponent.isOpened)this.activeComponent.handlers.onEsc&&(this.activeComponent.handlers.onEsc(),t.preventDefault(),t.stopPropagation());else{const i=this.findClosestOpenParent(e);(null==i?void 0:i.handlers.onEsc)&&(i.handlers.onEsc(),t.preventDefault(),t.stopPropagation())}break;case"Enter":this.activeComponent.handlers.onEnter&&(this.activeComponent.handlers.onEnter(),t.preventDefault(),t.stopPropagation());break;case" ":case"Space":if("INPUT"===e.tagName||"TEXTAREA"===e.tagName)return;this.activeComponent.handlers.onSpace&&(this.activeComponent.handlers.onSpace(),t.preventDefault(),t.stopPropagation());break;case"ArrowDown":case"ArrowUp":case"ArrowLeft":case"ArrowRight":if(this.activeComponent.handlers.onArrow){if(t.metaKey||t.ctrlKey||t.altKey||t.shiftKey)return;this.activeComponent.handlers.onArrow(t),t.preventDefault(),t.stopPropagation()}break;case"Tab":if(!this.activeComponent.handlers.onTab)break;const i=t.shiftKey?this.activeComponent.handlers.onShiftTab:this.activeComponent.handlers.onTab;i&&i();break;case"Home":this.activeComponent.handlers.onHome&&(this.activeComponent.handlers.onHome(),t.preventDefault(),t.stopPropagation());break;case"End":this.activeComponent.handlers.onEnd&&(this.activeComponent.handlers.onEnd(),t.preventDefault(),t.stopPropagation());break;default:this.activeComponent.handlers.onFirstLetter&&1===t.key.length&&/^[a-zA-Z]$/.test(t.key)&&(this.activeComponent.handlers.onFirstLetter(t.key),t.preventDefault(),t.stopPropagation())}}findClosestOpenParent(t){let e=t.parentElement;for(;e;){const t=this.currentlyOpenedComponents.find(t=>t.wrapper===e&&t!==this.activeComponent);if(t)return t;e=e.parentElement}return null}registerComponent(t,e,i=!0,s="",n="",o){const l={wrapper:t,handlers:e,isOpened:i,name:s,selector:n,context:o,isRegistered:!0};return this.components.push(l),l}updateComponentState(t,e){t.isOpened=e,e?this.currentlyOpenedComponents.includes(t)||this.currentlyOpenedComponents.push(t):this.currentlyOpenedComponents=this.currentlyOpenedComponents.filter(e=>e!==t)}unregisterComponent(t){this.components=this.components.filter(e=>e!==t),this.currentlyOpenedComponents=this.currentlyOpenedComponents.filter(e=>e!==t)}}},163:(t,e,i)=>{i.d(e,{A:()=>l});var s=i(392),n=i(709); /* * HSScrollspy * @version: 3.2.2 * @author: Preline Labs Ltd. * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) * Copyright 2024 Preline Labs Ltd. */ class o extends n.A{constructor(t,e={}){super(t,e),this.isScrollingDown=!1,this.lastScrollTop=0;const i=t.getAttribute("data-scrollspy-options"),s=i?JSON.parse(i):{},n=Object.assign(Object.assign({},s),e);this.ignoreScrollUp=void 0!==n.ignoreScrollUp&&n.ignoreScrollUp,this.links=this.el.querySelectorAll("[href]"),this.sections=[],this.scrollableId=this.el.getAttribute("data-scrollspy-scrollable-parent"),this.scrollable=this.scrollableId?document.querySelector(this.scrollableId):document,this.onLinkClickListener=[],this.init()}scrollableScroll(t){const e=this.scrollable instanceof HTMLElement?this.scrollable.scrollTop:window.scrollY;this.isScrollingDown=e>this.lastScrollTop,this.lastScrollTop=e<=0?0:e,Array.from(this.sections).forEach(e=>{if(!e.getAttribute("id"))return!1;this.update(t,e)})}init(){this.createCollection(window.$hsScrollspyCollection,this),this.links.forEach(t=>{this.sections.push(this.scrollable.querySelector(t.getAttribute("href")))}),this.onScrollableScrollListener=t=>this.scrollableScroll(t),this.scrollable.addEventListener("scroll",this.onScrollableScrollListener),this.links.forEach(t=>{this.onLinkClickListener.push({el:t,fn:e=>this.linkClick(e,t)}),t.addEventListener("click",this.onLinkClickListener.find(e=>e.el===t).fn)})}determineScrollDirection(t){const e=this.el.querySelector("a.active");if(!e)return!0;const i=Array.from(this.links).indexOf(e),s=Array.from(this.links).indexOf(t);return-1===s||s>i}linkClick(t,e){t.preventDefault();const i=e.getAttribute("href");if(!i||"javascript:;"===i)return;(i?document.querySelector(i):null)&&(this.isScrollingDown=this.determineScrollDirection(e),this.scrollTo(e))}update(t,e){const i=parseInt((0,s.gj)(this.el,"--scrollspy-offset","0")),n=parseInt((0,s.gj)(e,"--scrollspy-offset"))||i,o=t.target===document?0:parseInt(String(t.target.getBoundingClientRect().top)),l=parseInt(String(e.getBoundingClientRect().top))-n-o,r=e.offsetHeight;if(this.ignoreScrollUp||this.isScrollingDown?l<=0&&l+r>0:l<=0&&l<r){this.links.forEach(t=>t.classList.remove("active"));const t=this.el.querySelector(`[href="#${e.getAttribute("id")}"]`);if(t){t.classList.add("active");const e=t.closest("[data-scrollspy-group]");if(e){const t=e.querySelector("[href]");t&&t.classList.add("active")}}this.fireEvent("afterScroll",t),(0,s.JD)("afterScroll.scrollspy",t,this.el)}}scrollTo(t){const e=t.getAttribute("href"),i=document.querySelector(e),n=parseInt((0,s.gj)(this.el,"--scrollspy-offset","0")),o=parseInt((0,s.gj)(i,"--scrollspy-offset"))||n,l=this.scrollable===document?0:this.scrollable.offsetTop,r=i.offsetTop-o-l,a=this.scrollable===document?window:this.scrollable,h=()=>{window.history.replaceState(null,null,t.getAttribute("href")),"scrollTo"in a&&a.scrollTo({top:r,left:0,behavior:"smooth"})},d=this.fireEvent("beforeScroll",this.el);(0,s.JD)("beforeScroll.scrollspy",this.el,this.el),d instanceof Promise?d.then(()=>h()):h()}destroy(){this.el.querySelector("[href].active").classList.remove("active"),this.scrollable.removeEventListener("scroll",this.onScrollableScrollListener),this.onLinkClickListener.length&&this.onLinkClickListener.forEach(({el:t,fn:e})=>{t.removeEventListener("click",e)}),window.$hsScrollspyCollection=window.$hsScrollspyCollection.filter(({element:t})=>t.el!==this.el)}static getInstance(t,e=!1){const i=window.$hsScrollspyCollection.find(e=>e.element.el===("string"==typeof t?document.querySelector(t):t));return i?e?i:i.element.el:null}static autoInit(){window.$hsScrollspyCollection||(window.$hsScrollspyCollection=[]),window.$hsScrollspyCollection&&(window.$hsScrollspyCollection=window.$hsScrollspyCollection.filter(({element:t})=>document.contains(t.el))),document.querySelectorAll("[data-scrollspy]:not(.--prevent-on-load-init)").forEach(t=>{window.$hsScrollspyCollection.find(e=>{var i;return(null===(i=null==e?void 0:e.element)||void 0===i?void 0:i.el)===t})||new o(t)})}}window.addEventListener("load",()=>{o.autoInit()}),"undefined"!=typeof window&&(window.HSScrollspy=o);const l=o},179:(t,e,i)=>{i.d(e,{LO:()=>n,lP:()=>s});const s={auto:"auto","auto-start":"auto-start","auto-end":"auto-end",top:"top","top-start":"top-start","top-end":"top-end",bottom:"bottom","bottom-start":"bottom-start","bottom-end":"bottom-end",right:"right","right-start":"right-start","right-end":"right-end",left:"left","left-start":"left-start","left-end":"left-end"},n={xs:0,sm:640,md:768,lg:1024,xl:1280,"2xl":1536}},224:(t,e,i)=>{i.d(e,{A:()=>l});var s=i(392),n=i(709); /* * HSTogglePassword * @version: 3.2.2 * @author: Preline Labs Ltd. * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) * Copyright 2024 Preline Labs Ltd. */ class o extends n.A{constructor(t,e){super(t,e);const i=t.getAttribute("data-toggle-password"),n=i?JSON.parse(i):{},o=Object.assign(Object.assign({},n),e),l=[];if((null==o?void 0:o.target)&&"string"==typeof(null==o?void 0:o.target)){(null==o?void 0:o.target.split(",")).forEach(t=>{l.push(document.querySelector(t))})}else(null==o?void 0:o.target)&&"object"==typeof(null==o?void 0:o.target)?o.target.forEach(t=>l.push(document.querySelector(t))):o.target.forEach(t=>l.push(t));this.target=l,this.isShown=!!this.el.hasAttribute("type")&&this.el.checked,this.eventType=(0,s.V6)(this.el)?"change":"click",this.isMultiple=this.target.length>1&&!!this.el.closest("[data-toggle-password-group]"),this.target&&this.init()}elementAction(){this.isShown?this.hide():this.show(),this.fireEvent("toggle",this.target),(0,s.JD)("toggle.toggle-select",this.el,this.target)}init(){this.createCollection(window.$hsTogglePasswordCollection,this),this.isShown?this.show():this.hide(),this.onElementActionListener=()=>this.elementAction(),this.el.addEventListener(this.eventType,this.onElementActionListener)}getMultipleToggles(){const t=this.el.closest("[data-toggle-password-group]").querySelectorAll("[data-toggle-password]"),e=[];return t.forEach(t=>{e.push(o.getInstance(t))}),e}show(){if(this.isMultiple){this.getMultipleToggles().forEach(t=>!!t&&(t.isShown=!0)),this.el.closest("[data-toggle-password-group]").classList.add("active")}else this.isShown=!0,this.el.classList.add("active");this.target.forEach(t=>{t.type="text"})}hide(){if(this.isMultiple){this.getMultipleToggles().forEach(t=>!!t&&(t.isShown=!1)),this.el.closest("[data-toggle-password-group]").classList.remove("active")}else this.isShown=!1,this.el.classList.remove("active");this.target.forEach(t=>{t.type="password"})}destroy(){this.isMultiple?this.el.closest("[data-toggle-password-group]").classList.remove("active"):this.el.classList.remove("active"),this.target.forEach(t=>{t.type="password"}),this.el.removeEventListener(this.eventType,this.onElementActionListener),this.isShown=!1,window.$hsTogglePasswordCollection=window.$hsTogglePasswordCollection.filter(({element:t})=>t.el!==this.el)}static getInstance(t,e){const i=window.$hsTogglePasswordCollection.find(e=>e.element.el===("string"==typeof t?document.querySelector(t):t));return i?e?i:i.element:null}static autoInit(){window.$hsTogglePasswordCollection||(window.$hsTogglePasswordCollection=[]),window.$hsTogglePasswordCollection&&(window.$hsTogglePasswordCollection=window.$hsTogglePasswordCollection.filter(({element:t})=>document.contains(t.el))),document.querySelectorAll("[data-toggle-password]:not(.--prevent-on-load-init)").forEach(t=>{window.$hsTogglePasswordCollection.find(e=>{var i;return(null===(i=null==e?void 0:e.element)||void 0===i?void 0:i.el)===t})||new o(t)})}}window.addEventListener("load",()=>{o.autoInit()}),"undefined"!=typeof window&&(window.HSTogglePassword=o);const l=o},230:(t,e,i)=>{i.d(e,{A:()=>l});var s=i(392),n=i(709); /* * HSFileUpload * @version: 3.2.2 * @author: Preline Labs Ltd. * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) * Copyright 2024 Preline Labs Ltd. */ "undefined"!=typeof Dropzone&&(Dropzone.autoDiscover=!1);class o extends n.A{constructor(t,e,i){var s;super(t,e,i),this.extensions={},this.el="string"==typeof t?document.querySelector(t):t;const n=this.el.getAttribute("data-file-upload"),o=n?JSON.parse(n):{};this.previewTemplate=(null===(s=this.el.querySelector("[data-file-upload-preview]"))||void 0===s?void 0:s.innerHTML)||'<div class="rounded-box shadow-lg shadow-base-300/20 bg-base-100 p-3">\n <div class="mb-1 flex items-center justify-between">\n <div class="flex items-center gap-x-3">\n <span class="text-base-content/80 border-base-content/20 flex size-8 items-center justify-center rounded-lg border p-0.5" data-file-upload-file-icon="" >\n <img class="rounded-md hidden" data-dz-thumbnail="" />\n </span>\n <div>\n <p class="text-base-content text-sm font-medium">\n <span class="inline-block truncate align-bottom" data-file-upload-file-name=""></span>.<span data-file-upload-file-ext=""></span>\n </p>\n <p class="text-base-content/50 text-xs" data-file-upload-file-size=""></p>\n </div>\n </div>\n <div class="flex items-center gap-x-2">\n <button type="button" class="btn btn-sm btn-circle btn-text" data-file-upload-remove="">\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" class="size-4 shrink-0" viewBox="0 0 24 24"> <path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M18 6L6 18M6 6l12 12" /> </svg>\n </button>\n </div>\n </div>\n <div class="flex items-center gap-x-3 whitespace-nowrap">\n <div class="progress h-2" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" data-file-upload-progress-bar="" >\n <div class="progress-bar progress-primary file-upload-complete:progress-success transition-all duration-500" style="width: 0" data-file-upload-progress-bar-pane="" ></div>\n </div>\n <span class="text-base-content mb-0.5 text-sm">\n <span data-file-upload-progress-bar-value="">0</span>%\n </span>\n </div>\n </div>',this.extensions=_.merge({default:{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/><path d="M14 2v4a2 2 0 0 0 2 2h4"/></svg>',class:"shrink-0 size-5"},xls:{icon:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.0243 1.43996H7.08805C6.82501 1.43996 6.57277 1.54445 6.38677 1.73043C6.20077 1.91642 6.09631 2.16868 6.09631 2.43171V6.64796L15.0243 11.856L19.4883 13.7398L23.9523 11.856V6.64796L15.0243 1.43996Z" fill="#21A366"></path><path d="M6.09631 6.64796H15.0243V11.856H6.09631V6.64796Z" fill="#107C41"></path><path d="M22.9605 1.43996H15.0243V6.64796H23.9523V2.43171C23.9523 2.16868 23.8478 1.91642 23.6618 1.73043C23.4758 1.54445 23.2235 1.43996 22.9605 1.43996Z" fill="#33C481"></path><path d="M15.0243 11.856H6.09631V21.2802C6.09631 21.5433 6.20077 21.7955 6.38677 21.9815C6.57277 22.1675 6.82501 22.272 7.08805 22.272H22.9606C23.2236 22.272 23.4759 22.1675 23.6618 21.9815C23.8478 21.7955 23.9523 21.5433 23.9523 21.2802V17.064L15.0243 11.856Z" fill="#185C37"></path><path d="M15.0243 11.856H23.9523V17.064H15.0243V11.856Z" fill="#107C41"></path><path opacity="0.1" d="M12.5446 5.15996H6.09631V19.296H12.5446C12.8073 19.2952 13.0591 19.1904 13.245 19.0046C13.4308 18.8188 13.5355 18.567 13.5363 18.3042V6.1517C13.5355 5.88892 13.4308 5.63712 13.245 5.4513C13.0591 5.26548 12.8073 5.16074 12.5446 5.15996Z" fill="black"></path><path opacity="0.2" d="M11.8006 5.90396H6.09631V20.04H11.8006C12.0633 20.0392 12.3151 19.9344 12.501 19.7486C12.6868 19.5628 12.7915 19.311 12.7923 19.0482V6.8957C12.7915 6.6329 12.6868 6.38114 12.501 6.19532C12.3151 6.0095 12.0633 5.90475 11.8006 5.90396Z" fill="black"></path><path opacity="0.2" d="M11.8006 5.90396H6.09631V18.552H11.8006C12.0633 18.5512 12.3151 18.4464 12.501 18.2606C12.6868 18.0748 12.7915 17.823 12.7923 17.5602V6.8957C12.7915 6.6329 12.6868 6.38114 12.501 6.19532C12.3151 6.0095 12.0633 5.90475 11.8006 5.90396Z" fill="black"></path><path opacity="0.2" d="M11.0566 5.90396H6.09631V18.552H11.0566C11.3193 18.5512 11.5711 18.4464 11.757 18.2606C11.9428 18.0748 12.0475 17.823 12.0483 17.5602V6.8957C12.0475 6.6329 11.9428 6.38114 11.757 6.19532C11.5711 6.0095 11.3193 5.90475 11.0566 5.90396Z" fill="black"></path><path d="M1.13604 5.90396H11.0566C11.3195 5.90396 11.5718 6.00842 11.7578 6.19442C11.9438 6.38042 12.0483 6.63266 12.0483 6.8957V16.8162C12.0483 17.0793 11.9438 17.3315 11.7578 17.5175C11.5718 17.7035 11.3195 17.808 11.0566 17.808H1.13604C0.873012 17.808 0.620754 17.7035 0.434765 17.5175C0.248775 17.3315 0.144287 17.0793 0.144287 16.8162V6.8957C0.144287 6.63266 0.248775 6.38042 0.434765 6.19442C0.620754 6.00842 0.873012 5.90396 1.13604 5.90396Z" fill="#107C41"></path><path d="M2.77283 15.576L5.18041 11.8455L2.9752 8.13596H4.74964L5.95343 10.5071C6.06401 10.7318 6.14015 10.8994 6.18185 11.01H6.19745C6.27683 10.8305 6.35987 10.6559 6.44669 10.4863L7.73309 8.13596H9.36167L7.09991 11.8247L9.41897 15.576H7.68545L6.29489 12.972C6.22943 12.861 6.17387 12.7445 6.12899 12.6238H6.10817C6.06761 12.7419 6.01367 12.855 5.94748 12.9608L4.51676 15.576H2.77283Z" fill="white"></path></svg>',class:"shrink-0 size-5"},doc:{icon:'<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M30.6141 1.91994H9.45071C9.09999 1.91994 8.76367 2.05926 8.51567 2.30725C8.26767 2.55523 8.12839 2.89158 8.12839 3.24228V8.86395L20.0324 12.3359L31.9364 8.86395V3.24228C31.9364 2.89158 31.797 2.55523 31.549 2.30725C31.3011 2.05926 30.9647 1.91994 30.6141 1.91994Z" fill="#41A5EE"></path><path d="M31.9364 8.86395H8.12839V15.8079L20.0324 19.2799L31.9364 15.8079V8.86395Z" fill="#2B7CD3"></path><path d="M31.9364 15.8079H8.12839V22.7519L20.0324 26.2239L31.9364 22.7519V15.8079Z" fill="#185ABD"></path><path d="M31.9364 22.752H8.12839V28.3736C8.12839 28.7244 8.26767 29.0607 8.51567 29.3087C8.76367 29.5567 9.09999 29.696 9.45071 29.696H30.6141C30.9647 29.696 31.3011 29.5567 31.549 29.3087C31.797 29.0607 31.9364 28.7244 31.9364 28.3736V22.752Z" fill="#103F91"></path><path opacity="0.1" d="M16.7261 6.87994H8.12839V25.7279H16.7261C17.0764 25.7269 17.4121 25.5872 17.6599 25.3395C17.9077 25.0917 18.0473 24.756 18.0484 24.4056V8.20226C18.0473 7.8519 17.9077 7.51616 17.6599 7.2684C17.4121 7.02064 17.0764 6.88099 16.7261 6.87994Z" class="fill-black" fill="currentColor"></path><path opacity="0.2" d="M15.7341 7.87194H8.12839V26.7199H15.7341C16.0844 26.7189 16.4201 26.5792 16.6679 26.3315C16.9157 26.0837 17.0553 25.748 17.0564 25.3976V9.19426C17.0553 8.84386 16.9157 8.50818 16.6679 8.26042C16.4201 8.01266 16.0844 7.87299 15.7341 7.87194Z" class="fill-black" fill="currentColor"></path><path opacity="0.2" d="M15.7341 7.87194H8.12839V24.7359H15.7341C16.0844 24.7349 16.4201 24.5952 16.6679 24.3475C16.9157 24.0997 17.0553 23.764 17.0564 23.4136V9.19426C17.0553 8.84386 16.9157 8.50818 16.6679 8.26042C16.4201 8.01266 16.0844 7.87299 15.7341 7.87194Z" class="fill-black" fill="currentColor"></path><path opacity="0.2" d="M14.7421 7.87194H8.12839V24.7359H14.7421C15.0924 24.7349 15.4281 24.5952 15.6759 24.3475C15.9237 24.0997 16.0633 23.764 16.0644 23.4136V9.19426C16.0633 8.84386 15.9237 8.50818 15.6759 8.26042C15.4281 8.01266 15.0924 7.87299 14.7421 7.87194Z" class="fill-black" fill="currentColor"></path><path d="M1.51472 7.87194H14.7421C15.0927 7.87194 15.4291 8.01122 15.6771 8.25922C15.925 8.50722 16.0644 8.84354 16.0644 9.19426V22.4216C16.0644 22.7723 15.925 23.1087 15.6771 23.3567C15.4291 23.6047 15.0927 23.7439 14.7421 23.7439H1.51472C1.16401 23.7439 0.827669 23.6047 0.579687 23.3567C0.3317 23.1087 0.192383 22.7723 0.192383 22.4216V9.19426C0.192383 8.84354 0.3317 8.50722 0.579687 8.25922C0.827669 8.01122 1.16401 7.87194 1.51472 7.87194Z" fill="#185ABD"></path><path d="M12.0468 20.7679H10.2612L8.17801 13.9231L5.99558 20.7679H4.20998L2.22598 10.8479H4.01158L5.40038 17.7919L7.48358 11.0463H8.97161L10.9556 17.7919L12.3444 10.8479H14.0308L12.0468 20.7679Z" fill="white"></path></svg>',class:"shrink-0 size-5"},zip:{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M16 22h2a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v18"/><path d="M14 2v4a2 2 0 0 0 2 2h4"/><circle cx="10" cy="20" r="2"/><path d="M10 7V6"/><path d="M10 12v-1"/><path d="M10 18v-2"/></svg>',class:"shrink-0 size-5"}},o.extensions),this.singleton=o.singleton,this.concatOptions=Object.assign(Object.assign({clickable:this.el.querySelector("[data-file-upload-trigger]"),previewsContainer:this.el.querySelector("[data-file-upload-previews]"),addRemoveLinks:!1,previewTemplate:this.previewTemplate,autoHideTrigger:!1},o),e),this.onReloadButtonClickListener=[],this.onTempFileInputChangeListener=[],this.init()}tempFileInputChange(t,e){var i;const s=null===(i=t.target.files)||void 0===i?void 0:i[0];if(s){const t=s;t.status=Dropzone.ADDED,t.accepted=!0,t.previewElement=e.previewElement,t.previewTemplate=e.previewTemplate,t.previewsContainer=e.previewsContainer,this.dropzone.removeFile(e),this.dropzone.addFile(t)}}reloadButtonClick(t,e){t.preventDefault(),t.stopPropagation();const i=document.createElement("input");i.type="file",this.onTempFileInputChangeListener.push({el:i,fn:t=>this.tempFileInputChange(t,e)}),i.click(),i.addEventListener("change",this.onTempFileInputChangeListener.find(t=>t.el===i).fn)}init(){this.createCollection(window.$hsFileUploadCollection,this),this.initDropzone()}initDropzone(){const t=this.el.querySelector("[data-file-upload-clear]"),e=Array.from(this.el.querySelectorAll("[data-file-upload-pseudo-trigger]"));this.dropzone=new Dropzone(this.el,this.concatOptions),this.dropzone.on("addedfile",t=>this.onAddFile(t)),this.dropzone.on("removedfile",()=>this.onRemoveFile()),this.dropzone.on("uploadprogress",(t,e)=>this.onUploadProgress(t,e)),this.dropzone.on("complete",t=>this.onComplete(t)),t&&(t.onclick=()=>{this.dropzone.files.length&&this.dropzone.removeAllFiles(!0)}),e.length&&e.forEach(t=>{t.onclick=()=>{var t,e;(null===(t=this.concatOptions)||void 0===t?void 0:t.clickable)&&(null===(e=this.concatOptions)||void 0===e?void 0:e.clickable).click()}})}destroy(){this.onTempFileInputChangeListener.forEach(t=>{t.el.removeEventListener("change",t.fn)}),this.onTempFileInputChangeListener=null,this.onReloadButtonClickListener.forEach(t=>{t.el.removeEventListener("click",t.fn)}),this.onReloadButtonClickListener=null,this.dropzone.destroy(),window.$hsFileUploadCollection=window.$hsFileUploadCollection.filter(({element:t})=>t.el!==this.el)}onAddFile(t){const{previewElement:e}=t,i=t.previewElement.querySelector("[data-file-upload-reload]");if(!e)return!1;this.singleton&&this.dropzone.files.length>1&&this.dropzone.removeFile(this.dropzone.files[0]),i&&(this.onReloadButtonClickListener.push({el:i,fn:e=>this.reloadButtonClick(e,t)}),i.addEventListener("click",this.onReloadButtonClickListener.find(t=>t.el===i).fn)),this.previewAccepted(t)}previewAccepted(t){const{previewElement:e}=t,i=this.splitFileName(t.name),s=e.querySelector("[data-file-upload-file-name]"),n=e.querySelector("[data-file-upload-file-ext]"),o=e.querySelector("[data-file-upload-file-size]"),l=e.querySelector("[data-file-upload-file-icon]"),r=this.el.querySelector("[data-file-upload-trigger]"),a=e.querySelector("[data-dz-thumbnail]"),h=e.querySelector("[data-file-upload-remove]");s&&(s.textContent=i.name),n&&(n.textContent=i.extension),o&&(o.textContent=this.formatFileSize(t.size)),a&&(t.type.includes("image/")?a.classList.remove("hidden"):this.setIcon(i.extension,l)),this.dropzone.files.length>0&&this.concatOptions.autoHideTrigger&&(r.style.display="none"),h&&(h.onclick=()=>this.dropzone.removeFile(t))}onRemoveFile(){const t=this.el.querySelector("[data-file-upload-trigger]");0===this.dropzone.files.length&&this.concatOptions.autoHideTrigger&&(t.style.display="")}onUploadProgress(t,e){const{previewElement:i}=t;if(!i)return!1;const s=i.querySelector("[data-file-upload-progress-bar]"),n=i.querySelector("[data-file-upload-progress-bar-pane]"),o=i.querySelector("[data-file-upload-progress-bar-value]"),l=Math.floor(e);s&&s.setAttribute("aria-valuenow",`${l}`),n&&(n.style.width=`${l}%`),o&&(o.innerText=`${l}`)}onComplete(t){const{previewElement:e}=t;if(!e)return!1;e.classList.add("complete")}setIcon(t,e){const i=this.createIcon(t);e.append(i)}createIcon(t){var e,i;const n=(null===(e=this.extensions[t])||void 0===e?void 0:e.icon)?(0,s.fc)(this.extensions[t].icon):(0,s.fc)(this.extensions.default.icon);return(0,s.en)((null===(i=this.extensions[t])||void 0===i?void 0:i.class)?this.extensions[t].class:this.extensions.default.class,n),n}formatFileSize(t){return t<1024?t.toFixed(2)+" B":t<1048576?(t/1024).toFixed(2)+" KB":t<1073741824?(t/1048576).toFixed(2)+" MB":t<1099511627776?(t/1073741824).toFixed(2)+" GB":(t/1099511627776).toFixed(2)+" TB"}splitFileName(t){let e=t.lastIndexOf(".");return-1==e?{name:t,extension:""}:{name:t.substring(0,e),extension:t.substring(e+1)}}static getInstance(t,e){const i=window.$hsFileUploadCollection.find(e=>e.element.el===("string"==typeof t?document.querySelector(t):t));return i?e?i:i.element.el:null}static autoInit(){window.$hsFileUploadCollection||(window.$hsFileUploadCollection=[]),window.$hsFileUploadCollection&&(window.$hsFileUploadCollection=window.$hsFileUploadCollection.filter(({element:t})=>document.contains(t.el))),document.querySelectorAll("[data-file-upload]:not(.--prevent-on-load-init)").forEach(t=>{window.$hsFileUploadCollection.find(e=>{var i;return(null===(i=null==e?void 0:e.element)||void 0===i?void 0:i.el)===t})||new o(t)})}}window.addEventListener("load",()=>{document.querySelectorAll("[data-file-upload]:not(.--prevent-on-load-init)").length&&("undefined"==typeof _&&console.error("HSFileUpload: Lodash is not available, please add it to the page."),"undefined"==typeof Dropzone&&console.error("HSFileUpload: Dropzone is not available, please add it to the page.")),"undefined"!=typeof _&&"undefined"!=typeof Dropzone&&o.autoInit()}),"undefined"!=typeof window&&(window.HSFileUpload=o);const l=o},259:(t,e,i)=>{i.d(e,{A:()=>l});var s=i(392),n=i(709); /* * HSRemoveElement * @version: 3.2.2 * @author: Preline Labs Ltd. * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) * Copyright 2024 Preline Labs Ltd. */ class o extends n.A{constructor(t,e){super(t,e);const i=t.getAttribute("data-remove-element-options"),s=i?JSON.parse(i):{},n=Object.assign(Object.assign({},s),e);this.removeTargetId=this.el.getAttribute("data-remove-element"),this.removeTarget=document.querySelector(this.removeTargetId),this.removeTargetAnimationClass=(null==n?void 0:n.removeTargetAnimationClass)||"removing",this.removeTarget&&this.init()}elementClick(){this.remove()}init(){this.createCollection(window.$hsRemoveElementCollection,this),this.onElementClickListener=()=>this.elementClick(),this.el.addEventListener("click",this.onElementClickListener)}remove(){if(!this.removeTarget)return!1;this.removeTarget.classList.add(this.removeTargetAnimationClass),(0,s.yd)(this.removeTarget,()=>setTimeout(()=>this.removeTarget.remove()))}destroy(){this.removeTarget.classList.remove(this.removeTargetAnimationClass),this.el.removeEventListener("click",this.onElementClickListener),window.$hsRemoveElementCollection=window.$hsRemoveElementCollection.filter(({element:t})=>t.el!==this.el)}static getInstance(t,e){const i=window.$hsRemoveElementCollection.find(e=>e.element.el===("string"==typeof t?document.querySelector(t):t)||e.element.el===("string"==typeof t?document.querySelector(t):t));return i?e?i:i.element.el:null}static autoInit(){window.$hsRemoveElementCollection||(window.$hsRemoveElementCollection=[]),window.$hsRemoveElementCollection&&(window.$hsRemoveElementCollection=window.$hsRemoveElementCollection.filter(({element:t})=>document.contains(t.el))),document.querySelectorAll("[data-remove-element]:not(.--prevent-on-load-init)").forEach(t=>{window.$hsRemoveElementCollection.find(e=>{var i;return(null===(i=null==e?void 0:e.element)||void 0===i?void 0:i.el)===t})||new o(t)})}}window.addEventListener("load",()=>{o.autoInit()}),"undefined"!=typeof window&&(window.HSRemoveElement=o);const l=o},306:(t,e,i)=>{i.d(e,{A:()=>l});var s=i(392),n=i(709); /* * HSCopyMarkup * @version: 3.2.2 * @author: Preline Labs Ltd. * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) * Copyright 2024 Preline Labs Ltd. */ class o extends n.A{constructor(t,e){super(t,e),this.count=0;const i=t.getAttribute("data-copy-markup"),s=i?JSON.parse(i):{},n=Object.assign(Object.assign({},s),e);this.targetSelector=(null==n?void 0:n.targetSelector)||null,this.wrapperSelector=(null==n?void 0:n.wrapperSelector)||null,this.limit=(null==n?void 0:n.limit)||null,this.items=[],this.targetSelector&&this.init()}elementClick(){this.copy()}deleteItemButtonClick(t){this.delete(t)}init(){this.createCollection(window.$hsCopyMarkupCollection,this),this.onElementClickListener=()=>this.elementClick(),this.setTarget(),this.setWrapper(),this.addPredefinedItems(),this.el.addEventListener("click",this.onElementClickListener)}copy(){if(this.limit&&this.items.length>=this.limit)return!1;this.el.hasAttribute("disabled")&&this.el.setAttribute("disabled","");const t=this.target.cloneNode(!0),e=`${this.target.id}-${this.count++}`;t.setAttribute("id",e),this.addToItems(t),this.limit&&this.items.length>=this.limit&&this.el.setAttribute("disabled","disabled"),this.fireEvent("copy",t),(0,s.JD)("copy.copyMarkup",t,t)}addPredefinedItems(){Array.from(this.wrapper.children).filter(t=>!t.classList.contains("[--ignore-for-count]")).forEach(t=>{this.addToItems(t)}),this.limit&&this.items.length>=this.limit&&this.el.setAttribute("disabled","disabled")}setTarget(){const t="string"==typeof this.targetSelector?document.querySelector(this.targetSelector).cloneNode(!0):this.targetSelector.cloneNode(!0);this.target=t}setWrapper(){this.wrapper="string"==typeof this.wrapperSelector?document.querySelector(this.wrapperSelector):this.wrapperSelector}addToItems(t){const e=t.querySelector("[data-copy-markup-delete-item]");this.wrapper?this.wrapper.append(t):this.el.before(t),e&&(this.onDeleteItemButtonClickListener=()=>this.deleteItemButtonClick(t),e.addEventListener("click",this.onDeleteItemButtonClickListener)),this.items.push(t)}delete(t){if(t){const e=this.items.indexOf(t);-1!==e&&this.items.splice(e,1),t.remove(),this.fireEvent("delete",t),(0,s.JD)("delete.copyMarkup",t,t),this.limit&&this.items.length<this.limit&&this.el.removeAttribute("disabled")}}destroy(){const t=this.wrapper.querySelectorAll("[data-copy-markup-delete-item]");this.el.removeEventListener("click",this.onElementClickListener),t.length&&t.forEach(t=>t.removeEventListener("click",this.onDeleteItemButtonClickListener)),this.el.removeAttribute("disabled"),this.target=null,this.wrapper=null,this.items=null,window.$hsCopyMarkupCollection=window.$hsCopyMarkupCollection.filter(({element:t})=>t.el!==this.el)}static getInstance(t,e){const i=window.$hsCopyMarkupCollection.find(e=>e.element.el===("string"==typeof t?document.querySelector(t):t));return i?e?i:i.element:null}static autoInit(){window.$hsCopyMarkupCollection||(window.$hsCopyMarkupCollection=[]),window.$hsCopyMarkupCollection&&(window.$hsCopyMarkupCollection=window.$hsCopyMarkupCollection.filter(({element:t})=>document.contains(t.el))),document.querySelectorAll("[data-copy-markup]:not(.--prevent-on-load-init)").forEach(t=>{if(!window.$hsCopyMarkupCollection.find(e=>{var i;return(null===(i=null==e?void 0:e.element)||void 0===i?void 0:i.el)===t})){const e=t.getAttribute("data-copy-markup"),i=e?JSON.parse(e):{};new o(t,i)}})}}window.addEventListener("load",()=>{o.autoInit()}),"undefined"!=typeof window&&(window.HSCopyMarkup=o);const l=o},330:(t,e,i)=>{i.d(e,{A:()=>a});var s=i(392),n=i(709),o=i(68),l=i(179); /* * HSTabs * @version: 3.2.2 * @author: Preline Labs Ltd. * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) * Copyright 2024 Preline Labs Ltd. */ class r extends n.A{constructor(t,e,i){var s,n;super(t,e,i);const o=t.getAttribute("data-tabs"),r=o?JSON.parse(o):{},a=Object.assign(Object.assign({},r),e);this.eventType=null!==(s=a.eventType)&&void 0!==s?s:"click",this.preventNavigationResolution="number"==typeof a.preventNavigationResolution?a.preventNavigationResolution:l.LO[a.preventNavigationResolution]||null,this.toggles=this.el.querySelectorAll("[data-tab]"),this.extraToggleId=this.el.getAttribute("data-tab-select"),this.extraToggle=this.extraToggleId?document.querySelector(this.extraToggleId):null,this.current=Array.from(this.toggles).find(t=>t.classList.contains("active")),this.currentContentId=(null===(n=this.current)||void 0===n?void 0:n.getAttribute("data-tab"))||null,this.currentContent=this.currentContentId?document.querySelector(this.currentContentId):null,this.prev=null,this.prevContentId=null,this.prevContent=null,this.onToggleHandler=[],this.init()}toggle(t){this.open(t)}extraToggleChange(t){this.change(t)}init(){this.createCollection(window.$hsTabsCollection,this),this.toggles.forEach(t=>{const e=e=>{"click"===this.eventType&&this.preventNavigationResolution&&document.body.clientWidth<=+this.preventNavigationResolution&&e.preventDefault(),this.toggle(t)},i=t=>{this.preventNavigationResolution&&document.body.clientWidth<=+this.preventNavigationResolution&&t.preventDefault()};this.onToggleHandler.push({el:t,fn:e,preventClickFn:i}),"click"===this.eventType?t.addEventListener("click",e):(t.addEventListener("mouseenter",e),t.addEventListener("click",i))}),this.extraToggle&&(this.onExtraToggleChangeListener=t=>this.extraToggleChange(t),this.extraToggle.addEventListener("change",this.onExtraToggleChangeListener)),"undefined"!=typeof window&&(window.HSAccessibilityObserver||(window.HSAccessibilityObserver=new o.A),this.setupAccessibility())}open(t){var e,i,n,o,l;this.prev=this.current,this.prevContentId=this.currentContentId,this.prevContent=this.currentContent,this.current=t,this.currentContentId=t.getAttribute("data-tab"),this.currentContent=this.currentContentId?document.querySelector(this.currentContentId):null,(null===(e=null==this?void 0:this.prev)||void 0===e?void 0:e.ariaSelected)&&(this.prev.ariaSelected="false"),null===(i=this.prev)||void 0===i||i.classList.remove("active"),null===(n=this.prevContent)||void 0===n||n.classList.add("hidden"),(null===(o=null==this?void 0:this.current)||void 0===o?void 0:o.ariaSelected)&&(this.current.ariaSelected="true"),this.current.classList.add("active"),null===(l=this.currentContent)||void 0===l||l.classList.remove("hidden"),this.fireEvent("change",{el:t,prev:this.prevContentId,current:this.currentContentId,tabsId:this.el.id}),(0,s.JD)("change.tab",t,{el:t,prev:this.prevContentId,current:this.currentContentId,tabsId:this.el.id})}change(t){const e=document.querySelector(`[data-tab="${t.target.value}"]`);e&&("hover"===this.eventType?e.dispatchEvent(new Event("mouseenter")):e.click())}setupAccessibility(){this.accessibilityComponent=window.HSAccessibilityObserver.registerComponent(this.el,{onArrow:t=>{if(t.metaKey)return;const e="true"===this.el.getAttribute("data-tabs-vertical")||"vertical"===this.el.getAttribute("aria-orientation");switch(t.key){case e?"ArrowUp":"ArrowLeft":this.onArrow(!0);break;case e?"ArrowDown":"ArrowRight":this.onArrow(!1);break;case"Home":this.onStartEnd(!0);break;case"End":this.onStartEnd(!1)}}},!0,"Tabs",'[role="tablist"]')}onArrow(t=!0){const e=t?Array.from(this.toggles).reverse():Array.from(this.toggles),i=e.find(t=>document.activeElement===t);let s=e.findIndex(t=>t===i);s=s+1<e.length?s+1:0,e[s].focus(),e[s].click()}onStartEnd(t=!0){const e=t?Array.from(this.toggles):Array.from(this.toggles).reverse();e.length&&(e[0].focus(),e[0].click())}destroy(){this.toggles.forEach(t=>{var e;const i=null===(e=this.onToggleHandler)||void 0===e?void 0:e.find(({el:e})=>e===t);i&&("click"===this.eventType?t.removeEventListener("click",i.fn):(t.removeEventListener("mouseenter",i.fn),t.removeEventListener("click",i.preventClickFn)))}),this.onToggleHandler=[],this.extraToggle&&this.extraToggle.removeEventListener("change",this.onExtraToggleChangeListener),"undefined"!=typeof window&&window.HSAccessibilityObserver&&window.HSAccessibilityObserver.unregisterComponent(this.accessibilityComponent),window.$hsTabsCollection=window.$hsTabsCollection.filter(({element:t})=>t.el!==this.el)}static getInstance(t,e){const i=window.$hsTabsCollection.find(e=>e.element.el===("string"==typeof t?document.querySelector(t):t));return i?e?i:i.element:null}static autoInit(){window.$hsTabsCollection||(window.$hsTabsCollection=[]),window.$hsTabsCollection&&(window.$hsTabsCollection=window.$hsTabsCollection.filter(({element:t})=>document.contains(t.el))),document.querySelectorAll('[role="tablist"]:not(select):not(.--prevent-on-load-init)').forEach(t=>{window.$hsTabsCollection.find(e=>{var i;return(null===(i=null==e?void 0:e.element)||void 0===i?void 0:i.el)===t})||new r(t)})}static open(t){const e=window.$hsTabsCollection.find(e=>Array.from(e.element.toggles).includes("string"==typeof t?document.querySelector(t):t)),i=e?Array.from(e.element.toggles).find(e=>e===("string"==typeof t?document.querySelector(t):t)):null;i&&!i.classList.contains("active")&&e.element.open(i)}static on(t,e,i){const s=window.$hsTabsCollection.find(t=>Array.from(t.element.toggles).includes("string"==typeof e?document.querySelector(e):e));s&&(s.element.events[t]=i)}}window.addEventListener("load",()=>{r.autoInit()}),"undefined"!=typeof window&&(window.HSTabs=r);const a=r},376:(t,e,i)=>{i.d(e,{A:()=>r});var s=i(392),n=i(709),o=i(179); /* * HSCarousel * @version: 3.2.2 * @author: Preline Labs Ltd. * @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html) * Copyright 2024 Preline Labs Ltd. */ class l extends n.A{constructor(t,e){var i,s,n,o,l;super(t,e);const r=t.getAttribute("data-carousel"),a=r?JSON.parse(r):{},h=Object.assign(Object.assign({},a),e);this.currentIndex=h.currentIndex||0,this.loadingClasses=h.loadingClasses?`${h.loadingClasses}`.split(","):null,this.dotsItemClasses=h.dotsItemClasses?h.dotsItemClasses:null,this.isAutoHeight=void 0!==h.isAutoHeight&&h.isAutoHeight,this.isAutoPlay=void 0!==h.isAutoPlay&&h.isAutoPlay,this.isCentered=void 0!==h.isCentered&&h.isCentered,this.isDraggable=void 0!==h.isDraggable&&h.isDraggable,this.isInfiniteLoop=void 0!==h.isInfiniteLoop&&h.isInfiniteLoop,this.isRTL=void 0!==h.isRTL&&h.isRTL,this.isSnap=void 0!==h.isSnap&&h.isSnap,this.hasSnapSpacers=void 0===h.hasSnapSpacers||h.hasSnapSpacers,this.speed=h.speed||4e3,this.updateDelay=h.updateDelay||0,this.slidesQty=h.slidesQty||1,this.loadingClassesRemove=(null===(i=this.loadingClasses)||void 0===i?void 0:i[0])?this.loadingClasses[0].split(" "):"opacity-0",this.loadingClassesAdd=(null===(s=this.loadingClasses)||void 0===s?void 0:s[1])?this.loadingClasses[1].split(" "):"",this.afterLoadingClassesAdd=(null===(n=this.loadingClasses)||void 0===n?void 0:n[2])?this.loadingClasses[2].split(" "):"",this.container=this.el.querySelector(".carousel")||null,this.inner=this.el.querySelector(".carousel-body")||null,this.slides=this.el.querySelectorAll(".carousel-slide")||[],this.prev=this.el.querySelector(".carousel-prev")||null,this.next=this.el.querySelector(".carousel-next")||null,this.dots=this.el.querySelector(".carousel-pagination")||null,this.info=this.el.querySelector(".carousel-info")||null,this.infoTotal=(null===(o=null==this?void 0:this.info)||void 0===o?void 0:o.querySelector(".carousel-info-total"))||null,this.infoCurrent=(null===(l=null==this?void 0:this.info)||void 0===l?void 0:l.querySelector(".carousel-info-current"))||null,this.sliderWidth=this.el.ge