var t={7615(t,e,i){i.d(e,{A:()=>n});
/*
 * HSBasePlugin
 * @version: 4.2.0
 * @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 n{constructor(t,e,i){this.el=t,this.options=e,this.events=i,this.el=t,this.options=e,this.events={}}createCollection(t,e){var i,n;let l=t;if(!Array.isArray(l)&&"undefined"!=typeof window){const t=null===(i=this.constructor)||void 0===i?void 0:i.name,e="string"==typeof t&&t.startsWith("HS")?`$hs${t.slice(2)}Collection`:null;e&&(Array.isArray(window[e])||(window[e]=[]),l=window[e])}Array.isArray(l)&&l.push({id:(null===(n=null==e?void 0:e.el)||void 0===n?void 0:n.id)||l.length+1,element:e})}fireEvent(t,e=null){if(this.events.hasOwnProperty(t))return this.events[t](e)}on(t,e){this.events[t]=e}}},2579(t,e,i){i.d(e,{A:()=>o});var n=i(1926),l=i(7615);
/*
 * HSLayoutSplitter
 * @version: 4.2.0
 * @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 l.A{constructor(t,e){var i;super(t,e);const n=t.getAttribute("data-hs-layout-splitter"),l=n?JSON.parse(n):{},r=Object.assign(Object.assign({},l),e);this.horizontalSplitterClasses=(null==r?void 0:r.horizontalSplitterClasses)||null,this.horizontalSplitterTemplate=(null==r?void 0:r.horizontalSplitterTemplate)||"<div></div>",this.verticalSplitterClasses=(null==r?void 0:r.verticalSplitterClasses)||null,this.verticalSplitterTemplate=(null==r?void 0:r.verticalSplitterTemplate)||"<div></div>",this.isSplittersAddedManually=null!==(i=null==r?void 0:r.isSplittersAddedManually)&&void 0!==i&&i,this.horizontalSplitters=[],this.horizontalControls=[],this.verticalSplitters=[],this.verticalControls=[],this.isDragging=!1,this.activeSplitter=null,this.onControlPointerDownListener=[],this.init()}controlPointerDown(t){this.isDragging=!0,this.activeSplitter=t,this.onPointerDownHandler(t)}controlPointerUp(){this.isDragging=!1,this.activeSplitter=null,this.onPointerUpHandler()}init(){r.ensureGlobalHandlers(),this.createCollection(window.$hsLayoutSplitterCollection,this),this.buildSplitters(),r.isListenersInitialized||(document.addEventListener("pointermove",r.onDocumentPointerMove),document.addEventListener("pointerup",r.onDocumentPointerUp),r.isListenersInitialized=!0)}buildSplitters(){this.buildHorizontalSplitters(),this.buildVerticalSplitters()}buildHorizontalSplitters(){const t=this.el.querySelectorAll("[data-hs-layout-splitter-horizontal-group]");t.length&&(t.forEach(t=>{this.horizontalSplitters.push({el:t,items:Array.from(t.querySelectorAll(":scope > [data-hs-layout-splitter-item]"))})}),this.updateHorizontalSplitter())}buildVerticalSplitters(){const t=this.el.querySelectorAll("[data-hs-layout-splitter-vertical-group]");t.length&&(t.forEach(t=>{this.verticalSplitters.push({el:t,items:Array.from(t.querySelectorAll(":scope > [data-hs-layout-splitter-item]"))})}),this.updateVerticalSplitter())}buildControl(t,e,i="horizontal"){let l;if(this.isSplittersAddedManually){if(l=null==e?void 0:e.previousElementSibling,!l)return!1;l.style.display=""}else l=(0,n.fc)("horizontal"===i?this.horizontalSplitterTemplate:this.verticalSplitterTemplate),(0,n.en)("horizontal"===i?this.horizontalSplitterClasses:this.verticalSplitterClasses,l),l.classList.add("hs-layout-splitter-control");const r={el:l,direction:i,prev:t,next:e};"horizontal"===i?this.horizontalControls.push(r):this.verticalControls.push(r),this.bindListeners(r),e&&!this.isSplittersAddedManually&&t.insertAdjacentElement("afterend",l)}getSplitterItemParsedParam(t){const e=t.getAttribute("data-hs-layout-splitter-item");return(0,n.Fh)(e)?JSON.parse(e):e}getContainerSize(t,e){return e?t.getBoundingClientRect().width:t.getBoundingClientRect().height}getMaxFlexSize(t,e,i){const n=this.getSplitterItemSingleParam(t,e);return"number"==typeof n?n/100*i:0}updateHorizontalSplitter(){this.horizontalSplitters.forEach(({items:t})=>{t.forEach(t=>{this.updateSingleSplitter(t)}),t.forEach((e,i)=>{i>=t.length-1?this.buildControl(e,null):this.buildControl(e,t[i+1])})})}updateSingleSplitter(t){const e=t.getAttribute("data-hs-layout-splitter-item"),i=(0,n.Fh)(e)?JSON.parse(e):e,l=(0,n.Fh)(e)?i.dynamicSize:e;t.style.flex=`${l} 1 0`}updateVerticalSplitter(){this.verticalSplitters.forEach(({items:t})=>{t.forEach(t=>{this.updateSingleSplitter(t)}),t.forEach((e,i)=>{i>=t.length-1?this.buildControl(e,null,"vertical"):this.buildControl(e,t[i+1],"vertical")})})}updateSplitterItemParam(t,e){const i=this.getSplitterItemParsedParam(t),n=e.toFixed(1),l="object"==typeof i?JSON.stringify(Object.assign(Object.assign({},i),{dynamicSize:+n})):n;t.setAttribute("data-hs-layout-splitter-item",l)}onPointerDownHandler(t){const{el:e,prev:i,next:n}=t;e.classList.add("dragging"),i.classList.add("dragging"),n.classList.add("dragging"),document.body.style.userSelect="none"}onPointerUpHandler(){document.body.style.userSelect=""}onPointerMoveHandler(t,e,i){const{prev:n,next:l}=e,r=e.el.closest("horizontal"===i?"[data-hs-layout-splitter-horizontal-group]":"[data-hs-layout-splitter-vertical-group]"),o="horizontal"===i,s=this.getContainerSize(r,o),a=this.calculateAvailableSize(r,n,l,o,s),d=this.calculateResizedSizes(t,n,a,o),c=this.enforceLimits(d,n,l,s,a);this.applySizes(n,l,c,s)}bindListeners(t){const{el:e}=t;this.onControlPointerDownListener.push({el:e,fn:()=>this.controlPointerDown(t)}),e.addEventListener("pointerdown",this.onControlPointerDownListener.find(t=>t.el===e).fn)}calculateAvailableSize(t,e,i,n,l){const r=t.querySelectorAll(":scope > [data-hs-layout-splitter-item]");return l-Array.from(r).reduce((t,l)=>{if(l===e||l===i)return t;const r=l.getBoundingClientRect();return t+("fixed"===window.getComputedStyle(l).position?0:n?r.width:r.height)},0)}calculateResizedSizes(t,e,i,n){const l=n?e.getBoundingClientRect().left:e.getBoundingClientRect().top;let r=Math.max(0,Math.min((n?t.clientX:t.clientY)-l,i));return{previousSize:r,nextSize:i-r}}enforceLimits(t,e,i,l,r){const o=this.getMaxFlexSize(e,"minSize",l),s=this.getMaxFlexSize(i,"minSize",l),a=this.getMaxFlexSize(e,"preLimitSize",l),d=this.getMaxFlexSize(i,"preLimitSize",l);let{previousSize:c,nextSize:h}=t;h<s?(h=s,c=r-h):c<o&&(c=o,h=r-c);const p={prev:e,next:i,previousSize:c.toFixed(),previousFlexSize:c/l*100,previousPreLimitSize:a,previousPreLimitFlexSize:a/l*100,previousMinSize:o,previousMinFlexSize:o/l*100,nextSize:h.toFixed(),nextFlexSize:h/l*100,nextPreLimitSize:d,nextPreLimitFlexSize:d/l*100,nextMinSize:s,nextMinFlexSize:s/l*100,static:{prev:{minSize:this.getSplitterItemSingleParam(e,"minSize"),preLimitSize:this.getSplitterItemSingleParam(e,"preLimitSize")},next:{minSize:this.getSplitterItemSingleParam(i,"minSize"),preLimitSize:this.getSplitterItemSingleParam(i,"preLimitSize")}}};return h<s?(this.fireEvent("onNextLimit",p),(0,n.JD)("onNextLimit.hs.layoutSplitter",this.el,p)):c<o&&(this.fireEvent("onPrevLimit",p),(0,n.JD)("onPrevLimit.hs.layoutSplitter",this.el,p)),c<=a&&(this.fireEvent("onPrevPreLimit",p),(0,n.JD)("onPrevPreLimit.hs.layoutSplitter",this.el,p)),h<=d&&(this.fireEvent("onNextPreLimit",p),(0,n.JD)("onNextPreLimit.hs.layoutSplitter",this.el,p)),this.fireEvent("drag",p),(0,n.JD)("drag.hs.layoutSplitter",this.el,p),{previousSize:c,nextSize:h}}applySizes(t,e,i,n){const{previousSize:l,nextSize:r}=i,o=l/n*100;this.updateSplitterItemParam(t,o),t.style.flex=`${o.toFixed(1)} 1 0`;const s=r/n*100;this.updateSplitterItemParam(e,s),e.style.flex=`${s.toFixed(1)} 1 0`}getSplitterItemSingleParam(t,e){try{return this.getSplitterItemParsedParam(t)[e]}catch(t){return console.log("There is no parameter with this name in the object."),!1}}getData(t){var e,i;const n=t.closest("[data-hs-layout-splitter-horizontal-group], [data-hs-layout-splitter-vertical-group]");if(!n)throw new Error("Element is not inside a valid layout splitter container.");const l=n.matches("[data-hs-layout-splitter-horizontal-group]"),r=this.getContainerSize(n,l),o=this.getSplitterItemSingleParam(t,"dynamicSize")||0,s=this.getMaxFlexSize(t,"minSize",r),a=this.getMaxFlexSize(t,"preLimitSize",r),d=s/r*100,c=a/r*100;return{el:t,dynamicSize:+(o/100*r).toFixed(),dynamicFlexSize:o,minSize:+s.toFixed(),minFlexSize:d,preLimitSize:+a.toFixed(),preLimitFlexSize:c,static:{minSize:null!==(e=this.getSplitterItemSingleParam(t,"minSize"))&&void 0!==e?e:null,preLimitSize:null!==(i=this.getSplitterItemSingleParam(t,"preLimitSize"))&&void 0!==i?i:null}}}setSplitterItemSize(t,e){this.updateSplitterItemParam(t,e),t.style.flex=`${e.toFixed(1)} 1 0`}updateFlexValues(t){let e=0;const i=window.innerWidth;if(t.forEach(({id:t,breakpoints:n})=>{const l=document.getElementById(t);if(l){const t=(t=>{const e=Object.keys(t).map(Number).sort((t,e)=>t-e);for(let n=e.length-1;n>=0;n--)if(i>=e[n])return t[e[n]];return 0})(n);this.updateSplitterItemParam(l,t),l.style.flex=`${t.toFixed(1)} 1 0`,e+=t}}),100!==e){const i=100/e;t.forEach(({id:t})=>{const e=document.getElementById(t);if(e){const t=parseFloat(e.style.flex.split(" ")[0])*i;this.updateSplitterItemParam(e,t),e.style.flex=`${t.toFixed(1)} 1 0`}})}}destroy(){this.onControlPointerDownListener&&(this.onControlPointerDownListener.forEach(({el:t,fn:e})=>{t.removeEventListener("pointerdown",e)}),this.onControlPointerDownListener=null),this.horizontalSplitters.forEach(({items:t})=>{t.forEach(t=>{t.style.flex=""})}),this.verticalSplitters.forEach(({items:t})=>{t.forEach(t=>{t.style.flex=""})}),this.horizontalControls.forEach(({el:t})=>{this.isSplittersAddedManually?t.style.display="none":t.remove()}),this.verticalControls.forEach(({el:t})=>{this.isSplittersAddedManually?t.style.display="none":t.remove()}),this.horizontalControls=[],this.verticalControls=[],window.$hsLayoutSplitterCollection=window.$hsLayoutSplitterCollection.filter(({element:t})=>t.el!==this.el),0===window.$hsLayoutSplitterCollection.length&&r.isListenersInitialized&&(document.removeEventListener("pointermove",r.onDocumentPointerMove),document.removeEventListener("pointerup",r.onDocumentPointerUp),r.isListenersInitialized=!1)}static findInCollection(t){return window.$hsLayoutSplitterCollection.find(e=>t instanceof r?e.element.el===t.el:"string"==typeof t?e.element.el===document.querySelector(t):e.element.el===t)||null}static autoInit(){r.ensureGlobalHandlers(),window.$hsLayoutSplitterCollection&&(window.$hsLayoutSplitterCollection=window.$hsLayoutSplitterCollection.filter(({element:t})=>document.contains(t.el))),document.querySelectorAll("[data-hs-layout-splitter]:not(.--prevent-on-load-init)").forEach(t=>{window.$hsLayoutSplitterCollection.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 ensureGlobalHandlers(){"undefined"!=typeof window&&(window.$hsLayoutSplitterCollection||(window.$hsLayoutSplitterCollection=[]),r.isWindowListenersInitialized||(r.isWindowListenersInitialized=!0,window.addEventListener("pointerup",()=>{if(!window.$hsLayoutSplitterCollection)return!1;const t=document.querySelector(".hs-layout-splitter-control.dragging"),e=document.querySelectorAll("[data-hs-layout-splitter-item].dragging");if(!t)return!1;const i=r.getInstance(t.closest("[data-hs-layout-splitter]"),!0);t.classList.remove("dragging"),e.forEach(t=>t.classList.remove("dragging")),i.element.isDragging=!1})))}static getInstance(t,e){const i=window.$hsLayoutSplitterCollection.find(e=>e.element.el===("string"==typeof t?document.querySelector(t):t));return i?e?i:i.element.el:null}static on(t,e,i){const n=r.findInCollection(e);n&&(n.element.events[t]=i)}}r.isListenersInitialized=!1,r.isWindowListenersInitialized=!1,r.onDocumentPointerMove=t=>{const e=document.querySelector(".hs-layout-splitter-control.dragging");if(!e)return;const i=r.getInstance(e.closest("[data-hs-layout-splitter]"),!0);if(!i||!i.element.isDragging)return;const n=i.element.activeSplitter;n&&("vertical"===n.direction?i.element.onPointerMoveHandler(t,n,"vertical"):i.element.onPointerMoveHandler(t,n,"horizontal"))},r.onDocumentPointerUp=()=>{const t=document.querySelector(".hs-layout-splitter-control.dragging");if(!t)return;const e=r.getInstance(t.closest("[data-hs-layout-splitter]"),!0);e&&e.element.controlPointerUp()};const o=r},1926(t,e,i){i.d(e,{Fh:()=>n,JD:()=>l,en:()=>o,fc:()=>r});
/*
 * @version: 4.2.0
 * @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.
 */
const n=t=>{if("string"!=typeof t)return!1;const e=t.trim()[0],i=t.trim().slice(-1);if("{"===e&&"}"===i||"["===e&&"]"===i)try{return JSON.parse(t),!0}catch(t){return!1}return!1},l=(t,e,i=null)=>{const n=new CustomEvent(t,{detail:{payload:i},bubbles:!0,cancelable:!0,composed:!1});e.dispatchEvent(n)},r=t=>{const e=document.createElement("template");return t=t.trim(),e.innerHTML=t,e.content.firstChild},o=(t,e,i=" ",n="add")=>{t.split(i).forEach(t=>{t.trim()&&("add"===n?e.classList.add(t):e.classList.remove(t))})}}},e={};function i(n){var l=e[n];if(void 0!==l)return l.exports;var r=e[n]={exports:{}};return t[n](r,r.exports,i),r.exports}i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var n=i(2579);window.addEventListener("load",()=>{n.A.autoInit()}),"undefined"!=typeof window&&(window.HSLayoutSplitter=n.A);