@hsfx/attr 2.0.10 → 2.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/assets/{hsfxanimationsBRfmYjgP.js → hsfxanimationsBGqbwIJd.js} +2 -2
  2. package/dist/assets/hsfxanimationsBGqbwIJd.js.br +0 -0
  3. package/dist/assets/hsfxanimationsBGqbwIJd.js.gz +0 -0
  4. package/dist/assets/{hsfxcounterDwFxRdgj.js → hsfxcounterDc0dhKjv.js} +1 -1
  5. package/dist/assets/hsfxcounterDc0dhKjv.js.br +0 -0
  6. package/dist/assets/hsfxcounterDc0dhKjv.js.gz +0 -0
  7. package/dist/assets/{hsfxdefaultCUvFNkfy.js → hsfxdefaultDHOokRk4.js} +1 -1
  8. package/dist/assets/hsfxdefaultDHOokRk4.js.br +0 -0
  9. package/dist/assets/hsfxdefaultDHOokRk4.js.gz +0 -0
  10. package/dist/assets/{hsfxmarqueeC2RkGRcT.js → hsfxmarqueedDEsqJac.js} +1 -1
  11. package/dist/assets/hsfxmarqueedDEsqJac.js.br +0 -0
  12. package/dist/assets/hsfxmarqueedDEsqJac.js.gz +0 -0
  13. package/dist/assets/hsfxnormalizeVKiJWGQE.js +1 -0
  14. package/dist/assets/hsfxnormalizeVKiJWGQE.js.br +0 -0
  15. package/dist/assets/hsfxnormalizeVKiJWGQE.js.gz +0 -0
  16. package/dist/assets/{hsfxutilsBP6i-jwS.js → hsfxutilsMPToI1FZ.js} +1 -1
  17. package/dist/assets/hsfxutilsMPToI1FZ.js.br +0 -0
  18. package/dist/assets/hsfxutilsMPToI1FZ.js.gz +0 -0
  19. package/dist/main.js +2 -2
  20. package/dist/main.js.br +0 -0
  21. package/dist/main.js.gz +0 -0
  22. package/package.json +1 -1
  23. package/dist/assets/hsfxanimationsBRfmYjgP.js.br +0 -0
  24. package/dist/assets/hsfxanimationsBRfmYjgP.js.gz +0 -0
  25. package/dist/assets/hsfxcounterDwFxRdgj.js.br +0 -0
  26. package/dist/assets/hsfxcounterDwFxRdgj.js.gz +0 -0
  27. package/dist/assets/hsfxdefaultCUvFNkfy.js.br +0 -0
  28. package/dist/assets/hsfxdefaultCUvFNkfy.js.gz +0 -0
  29. package/dist/assets/hsfxmarqueeC2RkGRcT.js.br +0 -0
  30. package/dist/assets/hsfxmarqueeC2RkGRcT.js.gz +0 -0
  31. package/dist/assets/hsfxnormalizeBr1nlr-y.js +0 -1
  32. package/dist/assets/hsfxnormalizeBr1nlr-y.js.br +0 -0
  33. package/dist/assets/hsfxnormalizeBr1nlr-y.js.gz +0 -0
  34. package/dist/assets/hsfxutilsBP6i-jwS.js.br +0 -0
  35. package/dist/assets/hsfxutilsBP6i-jwS.js.gz +0 -0
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/hsfxcounterDwFxRdgj.js","assets/hsfxutilsBP6i-jwS.js","assets/hsfxmarqueeC2RkGRcT.js"])))=>i.map(i=>d[i]);
2
- import{_ as e}from"../main.js";import{k as t}from"./hsfxutilsBP6i-jwS.js";const r=[{name:"counter",selector:'[data-hs-anim="counter"]',import:()=>e(()=>import("./hsfxcounterDwFxRdgj.js"),__vite__mapDeps([0,1]))},{name:"marquee",selector:'[data-hs-marquee="wrapper"]',import:()=>e(()=>import("./hsfxmarqueeC2RkGRcT.js"),__vite__mapDeps([2,1]))}],a=(()=>{const e=r.filter(e=>document.querySelector(e.selector)).map(e=>e.import().catch(t=>(console.error(`[animations] Failed to preload ${e.name}:`,t),null)));return Promise.allSettled(e)})();async function o(){await a;const e=t(r),{loaded:o}=await e.scan();return{result:`animations initialized (${o.length} active)`,rescan:e.scan,destroy:e.destroy}}export{o as init};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/hsfxcounterDc0dhKjv.js","assets/hsfxutilsMPToI1FZ.js","assets/hsfxmarqueedDEsqJac.js"])))=>i.map(i=>d[i]);
2
+ import{_ as e}from"../main.js";import{k as t}from"./hsfxutilsMPToI1FZ.js";const r=[{name:"counter",selector:'[data-hs-anim="counter"]',import:()=>e(()=>import("./hsfxcounterDc0dhKjv.js"),__vite__mapDeps([0,1]))},{name:"marquee",selector:'[data-hs-marquee="wrapper"]',import:()=>e(()=>import("./hsfxmarqueedDEsqJac.js"),__vite__mapDeps([2,1]))}],a=(()=>{const e=r.filter(e=>document.querySelector(e.selector)).map(e=>e.import().catch(t=>(console.error(`[animations] Failed to preload ${e.name}:`,t),null)));return Promise.allSettled(e)})();async function o(){await a;const e=t(r),{loaded:o}=await e.scan();return{result:`animations initialized (${o.length} active)`,rescan:e.scan,destroy:e.destroy}}export{o as init};
@@ -1 +1 @@
1
- import{p as e,d as t,j as r}from"./hsfxutilsBP6i-jwS.js";const n='[data-hs-anim="counter"]';async function o(){if(e())return{result:"counter skipped - prefers-reduced-motion enabled"};const o=t("counter");if(!o)return{result:"counter skipped - GSAP not loaded"};const{gsap:i,ScrollTrigger:s}=o;if(!s)return r("counter",["ScrollTrigger"],"error"),{result:"counter skipped - ScrollTrigger not loaded"};i.registerPlugin(s);const l=Array.from(document.querySelectorAll(n)),u={timelines:[],scrollTriggers:[]};return l.forEach(e=>{const t=e,r=t.textContent?.trim()||"",n=function(e){const t=e.replace(/,/g,"").match(/([^\d.]*)(\d*\.?\d+)(.*)/);return t?{prefix:t[1]||"",number:parseFloat(t[2]),suffix:t[3]||""}:{prefix:"",number:0,suffix:""}}(r),o=(n.number.toString().split(".")[1]||"").length,l=r.includes(",");t.setAttribute("aria-live","polite"),t.setAttribute("aria-atomic","true");const c={value:0},a=i.timeline({paused:!0});a.to(c,{value:n.number,duration:3,ease:"power4.out",onUpdate:function(){const e=c.value;let r=o>0?e.toFixed(o):Math.round(e).toString();l&&(r=r.replace(/\B(?=(\d{3})+(?!\d))/g,",")),t.textContent=`${n.prefix}${r}${n.suffix}`},onComplete:function(){t.textContent=r}}),u.timelines.push(a);const g=s.create({trigger:e,start:"top bottom",once:!0,onEnter:()=>{a.play()}});u.scrollTriggers.push(g)}),{result:`counter initialized (${l.length} instances)`,destroy:()=>{u.timelines.forEach(e=>{e&&e.kill()}),u.scrollTriggers.forEach(e=>{e&&e.kill()}),u.timelines.length=0,u.scrollTriggers.length=0}}}export{o as init};
1
+ import{p as e,d as t,j as r}from"./hsfxutilsMPToI1FZ.js";const n='[data-hs-anim="counter"]';async function o(){if(e())return{result:"counter skipped - prefers-reduced-motion enabled"};const o=t("counter");if(!o)return{result:"counter skipped - GSAP not loaded"};const{gsap:i,ScrollTrigger:s}=o;if(!s)return r("counter",["ScrollTrigger"],"error"),{result:"counter skipped - ScrollTrigger not loaded"};i.registerPlugin(s);const l=Array.from(document.querySelectorAll(n)),u={timelines:[],scrollTriggers:[]};return l.forEach(e=>{const t=e,r=t.textContent?.trim()||"",n=function(e){const t=e.replace(/,/g,"").match(/([^\d.]*)(\d*\.?\d+)(.*)/);return t?{prefix:t[1]||"",number:parseFloat(t[2]),suffix:t[3]||""}:{prefix:"",number:0,suffix:""}}(r),o=(n.number.toString().split(".")[1]||"").length,l=r.includes(",");t.setAttribute("aria-live","polite"),t.setAttribute("aria-atomic","true");const c={value:0},a=i.timeline({paused:!0});a.to(c,{value:n.number,duration:3,ease:"power4.out",onUpdate:function(){const e=c.value;let r=o>0?e.toFixed(o):Math.round(e).toString();l&&(r=r.replace(/\B(?=(\d{3})+(?!\d))/g,",")),t.textContent=`${n.prefix}${r}${n.suffix}`},onComplete:function(){t.textContent=r}}),u.timelines.push(a);const g=s.create({trigger:e,start:"top bottom",once:!0,onEnter:()=>{a.play()}});u.scrollTriggers.push(g)}),{result:`counter initialized (${l.length} instances)`,destroy:()=>{u.timelines.forEach(e=>{e&&e.kill()}),u.scrollTriggers.forEach(e=>{e&&e.kill()}),u.timelines.length=0,u.scrollTriggers.length=0}}}export{o as init};
@@ -1 +1 @@
1
- import{a as e,c as t,i as n,w as r,d as o,p as s,q as a,b as i,g as l,s as c,e as u,o as d,f as p,h as f,j as m}from"./hsfxutilsBP6i-jwS.js";const h=t._global,v=t.default.transition,g=h.apiName;async function y(){const t=e(v,"wrapper");if(!t)return{result:"transition skipped - no wrapper found",destroy:()=>{}};const o="data-hs-transition-initialized";if(t.hasAttribute(o))return{result:"transition already initialized",destroy:()=>{}};t.setAttribute(o,"true");const s=window[g]?.settings?.isSPA||!1,a=new Map;let i=null,l=null;const c=(e,n=null,r=t)=>{const o=v.attributes.elements.trigger.primary.match(/data-[^=]+/)?.[0],s=v.attributes.elements.namespace.primary.match(/data-[^=]+/)?.[0];if(!o||!s)return null;const a=r.querySelectorAll(`[${o}="${e}"]`);if(a.length>0){if(n){const t=r.querySelector(`[${s}="${n}"]`);if(t){const n=t.querySelector(`[${o}="${e}"]`);if(n)return n}}const t=Array.from(a).find(e=>{let t=e.parentElement;for(;t&&t!==r;){if(t.hasAttribute(s))return!1;t=t.parentElement}return!0});if(t)return t}const i="exit"===e?v.attributes.elements.exitTrigger.primary.match(/data-[^=]+/)?.[0]:v.attributes.elements.enterTrigger.primary.match(/data-[^=]+/)?.[0];if(!i)return null;const l=r.querySelectorAll(`[${i}]`);if(l.length>0){if(n){const e=r.querySelector(`[${s}="${n}"]`);if(e){const t=e.querySelector(`[${i}]`);if(t)return t}}const e=Array.from(l).find(e=>{let t=e.parentElement;for(;t&&t!==r;){if(t.hasAttribute(s))return!1;t=t.parentElement}return!0});if(e)return e}return null},u=(e=null)=>new Promise(n=>{const r=c("exit",e);if(!r)return void n();const o=(()=>{const e=v.attributes.elements.exitTime.primary.match(/data-[^=]+/)?.[0];if(!e)return 0;const n=t.getAttribute(e);return n?1e3*parseFloat(n):0})();r.click(),setTimeout(()=>n(),o)}),d=(e=null)=>new Promise(n=>{const r=c("enter",e);if(!r)return void n();const o=!sessionStorage.getItem("transition-loaded"),s=(()=>{const e=v.attributes.elements.firstDelay.primary.match(/data-[^=]+/)?.[0];if(!e)return 0;const n=t.getAttribute(e);return n?1e3*parseFloat(n):0})(),a=()=>{r.click(),o&&sessionStorage.setItem("transition-loaded","true"),n()};o&&s>0?i=setTimeout(a,s):a()}),p=e=>{u(e?.detail?.namespace||null)},f=e=>{d(e?.detail?.namespace||null)};if(a.set(`${g}:transition-exit`,p),a.set(`${g}:transition-enter`,f),window.addEventListener(`${g}:transition-exit`,p),window.addEventListener(`${g}:transition-enter`,f),!s){const e=e=>{const t=e.target.closest("a[href]");if(t&&t.hostname===window.location.hostname&&t.getAttribute("href")&&-1===t.getAttribute("href").indexOf("#")&&"_blank"!==t.getAttribute("target")){e.preventDefault();const n=t.href;u().then(()=>{window.location.href=n})}};a.set("click",e),document.addEventListener("click",e);const t=e=>{e.persisted&&window.location.reload()};a.set("pageshow",t),window.addEventListener("pageshow",t)}const m=()=>{t&&(t.style.display="none")};if(a.set("resize",m),window.addEventListener("resize",m),!s){const e=async()=>{n()&&(l=setTimeout(()=>{t.classList.add(h.classes.loading)},2e3),await r(),l&&(clearTimeout(l),l=null),t.classList.remove(h.classes.loading),t.classList.add(h.classes.loaded)),d()};a.set(`${g}:dom-ready`,e),window.addEventListener(`${g}:dom-ready`,e,{once:!0})}return{result:"transition initialized",destroy:()=>{i&&clearTimeout(i),l&&clearTimeout(l),a.forEach((e,t)=>{if("click"===t||"pageshow"===t||"resize"===t){("click"===t?document:window).removeEventListener(t,e)}else window.removeEventListener(t,e)}),a.clear(),t.removeAttribute(o)}}}async function b(t){let n=null,r=null;function a(n){const r=n.target.closest('a[href^="#"]');if(!r)return;const a=r.getAttribute("href");if(!a||"#"===a)return;const i=a.substring(1),l=document.getElementById(i);if(l){n.preventDefault(),history.replaceState&&history.replaceState(null,null,`#${l.id}`);!function(e,t=0){if(!e)return;const n=o("smooth-scroll",!1);if(s()||!n){const n=e.getBoundingClientRect().top+window.scrollY-t;return window.scrollTo(0,n),e.setAttribute("tabindex","-1"),void e.focus({preventScroll:!0})}n.gsap.to(window,{duration:1,scrollTo:{y:e,offsetY:t},ease:"power2.out",onComplete:function(){e.setAttribute("tabindex","-1"),e.focus({preventScroll:!0})}})}(l,function(){const n=e(t,"offset-proxy");if(console.log("[smooth-scroll] Proxy element:",n),n&&n instanceof HTMLElement){const e=getComputedStyle(n).top,t=parseFloat(e)||0;return console.log("[smooth-scroll] Computed top:",e,"-> offset:",t),t}return console.log("[smooth-scroll] No proxy element found, using offset: 0"),0}())}}return"undefined"!=typeof $&&$(document).off("click.wf-scroll"),document.documentElement.style.scrollBehavior="auto",document.body.style.scrollBehavior="auto",n=a,r=e=>{"Enter"!==e.key&&" "!==e.key||a(e)},document.addEventListener("click",n),document.addEventListener("keydown",r),{result:"autoInit-smooth-scroll initialized",destroy:()=>{n&&(document.removeEventListener("click",n),n=null),r&&(document.removeEventListener("keydown",r),r=null),document.documentElement.style.scrollBehavior="",document.body.style.scrollBehavior=""}}}let w=null;function A(t){w=t;const n={observers:[],handlers:[]};return function(t,n){const r=a(w,"wrapper"),o=[];r.forEach(r=>{const s=i(l.clickable,"button"),a=r.querySelector(s),d=e(w,"list",r);if(!a||!d)return void console.warn("[dropdown] Dropdown wrapper missing required elements:",r);const p=r.getAttribute("data-hs-nav-dropdown-type")||"hover",f=r.querySelector('[data-hs-height="element"]'),m=f?f.parentElement:null,h=a.textContent?.trim()||"dropdown",v=h.toLowerCase().replace(/[^a-z0-9\s]/g,"").replace(/\s+/g,"-").replace(/^-+|-+$/g,"").substring(0,50);const g=`navbar-dropdown-${v}-toggle`,y=`navbar-dropdown-${v}-list`;a.id=g,a.setAttribute("aria-haspopup","menu"),a.setAttribute("aria-expanded","false"),a.setAttribute("aria-controls",y),d.id=y,d.setAttribute("role","menu"),d.inert=!0;const b=Array.from(d.querySelectorAll(s));b.forEach((e,t)=>{if(e.setAttribute("role","menuitem"),e.setAttribute("tabindex","-1"),0===t){const t=a.textContent?.trim()||"menu";e.getAttribute("aria-label")||e.setAttribute("aria-label",`${e.textContent?.trim()}, ${t} submenu`)}});let A=-1;function E(){return r.classList.contains(l.classes.active)}function L(){const e=E();"true"===a.getAttribute("aria-expanded")&&!e&&d.contains(document.activeElement)&&a.focus(),a.setAttribute("aria-expanded",e?"true":"false"),d.inert=!e,b.forEach(t=>{t.setAttribute("tabindex",e?"0":"-1")}),e||(A=-1),u(m,e,{duration:"hover"===p?200:300,ease:"power2.inOut"})}c(m,E()),L();const k=new MutationObserver(()=>{L()});if(k.observe(r,{attributes:!0,attributeFilter:["class"]}),t(k),"hover"===p){o.push(r);const e=()=>{r.classList.add("is-active")},t=()=>{r.classList.remove("is-active")};n(r,"mouseenter",e),n(r,"mouseleave",t);n(a,"keydown",e=>{"ArrowDown"===e.key?(e.preventDefault(),E()||(r.classList.add(l.classes.active),b.length>0&&setTimeout(()=>{A=0,b[0].focus()},100))):" "===e.key||"Enter"===e.key?(e.preventDefault(),E()?r.classList.remove(l.classes.active):(r.classList.add(l.classes.active),b.length>0&&setTimeout(()=>{A=0,b[0].focus()},100))):"ArrowUp"===e.key?(e.preventDefault(),E()||(r.classList.add(l.classes.active),b.length>0&&setTimeout(()=>{A=b.length-1,b[A].focus()},100))):"Escape"===e.key&&(e.preventDefault(),E()&&r.classList.remove(l.classes.active))});const s=e=>{E()&&r.contains(document.activeElement)&&("ArrowDown"===e.key?(e.preventDefault(),A<b.length-1&&(A++,b[A].focus())):"ArrowUp"===e.key?(e.preventDefault(),0===A?(r.classList.remove(l.classes.active),a.focus(),A=-1):A>0?(A--,b[A].focus()):(a.focus(),A=-1)):"Escape"===e.key&&(e.preventDefault(),r.classList.remove("is-active")))};n(r,"keydown",s)}else if("click"===p){n(a,"click",e=>{e.preventDefault(),r.classList.toggle(l.classes.active)});n(a,"keydown",e=>{" "===e.key||"Enter"===e.key?(e.preventDefault(),r.classList.toggle(l.classes.active)):"Escape"===e.key&&(e.preventDefault(),E()&&r.classList.remove(l.classes.active))})}});const s=e=>{o.forEach(t=>{t.classList.contains("is-active")&&!t.contains(e.target)&&t.classList.remove("is-active")})};o.length>0&&n(document.body,"focusin",s)}(e=>{n.observers.push(e)},(e,t,r,o)=>{e.addEventListener(t,r,o),n.handlers.push({element:e,event:t,handler:r,options:o})}),{result:"dropdown initialized",destroy:()=>{n.observers.forEach(e=>e.disconnect()),n.observers.length=0,n.handlers.forEach(({element:e,event:t,handler:n,options:r})=>{e.removeEventListener(t,n,r)}),n.handlers.length=0,w=null}}}function E(t,n){const r={observers:[],handlers:[],state:{focusTrapHandler:null}},o=e=>{r.observers.push(e)};return function(o,s){const f=a(t,"button"),m=e(t,"wrapper");if(!f.length||!m)return;const h=n?e(n,"wrapper"):null,v=`menu-${Date.now()}`;m.id=v,m.setAttribute("role","dialog"),m.setAttribute("aria-modal","true"),m.inert=!0;const g=m.querySelector('[data-hs-height="element"]'),y=g?g.parentElement:null;f.forEach(t=>{t.setAttribute("aria-expanded","false"),t.setAttribute("aria-controls",v),t.setAttribute("aria-label","Open navigation menu");let a=null,g=!1;function b(){return t.classList.contains(l.classes.active)}function w(){const r=b(),o="true"===t.getAttribute("aria-expanded");r&&!o?(d(),m.classList.add(l.classes.active),m.inert=!1,h&&h.classList.add("hs-menu-open"),f.forEach(e=>{e.setAttribute("aria-expanded","true"),e.setAttribute("aria-label","Close navigation menu")}),y&&u(y,!0,{duration:300,ease:"power2.inOut"}),a=function(){const t=n?e(n,"wrapper"):document.querySelector('[data-hs-nav="wrapper"]');if(!t)return;const r=e=>{if("Tab"===e.key){const n=i(l.clickable,"button"),r=Array.from(t.querySelectorAll(n)),o=t.querySelectorAll('input, select, textarea, [tabindex]:not([tabindex="-1"])'),s=[...r,...Array.from(o)],a=s[0],c=s[s.length-1];e.shiftKey?document.activeElement===a&&(e.preventDefault(),c.focus()):document.activeElement===c&&(e.preventDefault(),a.focus())}};return document.addEventListener("keydown",r),r}(),g&&(setTimeout(()=>{const e=i(l.clickable,"button"),t=Array.from(m.querySelectorAll(e));if("last"===g){const e=t[t.length-1];e&&e.focus()}else{const e=t[0];e&&e.focus()}},100),g=!1)):!r&&o&&(m.contains(document.activeElement)&&t.focus(),p(),m.classList.remove(l.classes.active),m.inert=!0,h&&h.classList.remove("hs-menu-open"),f.forEach(e=>{e.setAttribute("aria-expanded","false"),e.setAttribute("aria-label","Open navigation menu")}),y&&u(y,!1,{duration:300,ease:"power2.inOut"}),function(e){e&&document.removeEventListener("keydown",e)}(a),a=null)}y&&c(y,b()),w();const A=new MutationObserver(()=>{w()});A.observe(t,{attributes:!0,attributeFilter:["class"]}),o(A);s(t,"click",function(e){e.preventDefault(),t.classList.toggle("is-active")});s(t,"keydown",function(e){" "===e.key||"Enter"===e.key?(e.preventDefault(),g=!0,t.classList.toggle(l.classes.active)):"ArrowDown"===e.key?(e.preventDefault(),b()||(g=!0,t.classList.add(l.classes.active))):"ArrowUp"===e.key?(e.preventDefault(),b()||(g="last",t.classList.add(l.classes.active))):"Escape"===e.key&&(e.preventDefault(),b()&&t.classList.remove(l.classes.active))}),r.state.focusTrapHandler=a})}(o,(e,t,n,o)=>{e.addEventListener(t,n,o),r.handlers.push({element:e,event:t,handler:n,options:o})}),function(n){const r=e(t,"wrapper");if(!r)return;let o=null;function s(){const e=window.getComputedStyle(r).getPropertyValue(f.state).trim();if(o===l.cssVars.state.values.active&&e===l.cssVars.state.values.inactive){const e=document.querySelector('[data-hs-nav-menu="button"]');e&&"true"===e.getAttribute("aria-expanded")&&e&&e.classList.remove("is-active")}o=e}const a=new ResizeObserver(s);a.observe(r),n(a),s()}(o),{result:"menu initialized",destroy:()=>{r.state.focusTrapHandler&&(document.removeEventListener("keydown",r.state.focusTrapHandler),r.state.focusTrapHandler=null),r.observers.forEach(e=>e.disconnect()),r.observers.length=0,r.handlers.forEach(({element:e,event:t,handler:n,options:r})=>{e.removeEventListener(t,n,r)}),r.handlers.length=0,document.body.classList.remove("u-overflow-hidden")}}}function L(t,n){const r={handlers:[]},o=(e,t,n,o)=>{e.addEventListener(t,n,o),r.handlers.push({element:e,event:t,handler:n,options:o})};return o(document,"keydown",t=>{if("ArrowLeft"!==t.key&&"ArrowRight"!==t.key)return;const r=n?e(n.menu,"wrapper"):document.querySelector('[data-hs-nav-menu="wrapper"]');if(r&&r.contains(document.activeElement))return;const o=n?e(n,"wrapper"):document.querySelector('[data-hs-nav="wrapper"]');if(!o||!o.contains(document.activeElement))return;const s=o.querySelector(`.${l.classes.active}[data-hs-nav-dropdown]`);if(s&&s.contains(document.activeElement))return;t.preventDefault();const a=i(l.clickable,"button"),c=Array.from(o.querySelectorAll(a)),u=Array.from(c).filter(e=>{if("-1"===e.getAttribute("tabindex"))return!1;if(e.closest('[role="menu"]'))return!1;const t=n?n.menu.attributes.elements.wrapper.primary.split("=")[0]:"data-hs-nav-menu";if(e.closest(`[${t}="wrapper"]`))return!1;const r=n?n.attributes.elements["skip-link"].primary.split("=")[0]:"data-hs-nav";if(e.closest(`[${r}="skip-link"]`))return!1;const s=window.getComputedStyle(e),a=e;if("none"===s.display||"hidden"===s.visibility||"0"===s.opacity||0===a.offsetWidth||0===a.offsetHeight)return!1;let i=e.parentElement;for(;i&&i!==o;){const e=window.getComputedStyle(i),t=i;if("none"===e.display||"hidden"===e.visibility||0===t.offsetWidth||0===t.offsetHeight)return!1;i=i.parentElement}return!0}),d=u.indexOf(document.activeElement);-1!==d&&("ArrowRight"===t.key?d<u.length-1&&u[d+1].focus():d>0&&u[d-1].focus())}),function(t){const r=n?e(n.menu,"wrapper"):document.querySelector('[data-hs-nav-menu="wrapper"]');if(!r)return;let o=-1;t(r,"keydown",t=>{const s=function(){const e=i(l.clickable,"button"),t=Array.from(r.querySelectorAll(e));return Array.from(t).filter(e=>{let t=e;for(;t&&t!==r;){if(t.inert)return!1;t=t.parentElement}return!0})}();if(0===s.length)return;const a=document.activeElement;if(o=s.indexOf(a),"ArrowDown"===t.key)t.preventDefault(),o<s.length-1&&(o+=1,s[o].focus());else if("ArrowUp"===t.key)t.preventDefault(),o>0&&(o-=1,s[o].focus());else if("ArrowRight"===t.key){if(t.preventDefault(),a&&"BUTTON"===a.tagName&&a.hasAttribute("aria-controls")){return void("true"===a.getAttribute("aria-expanded")||a.click())}}else if("ArrowLeft"===t.key){if(t.preventDefault(),a&&"BUTTON"===a.tagName&&a.hasAttribute("aria-controls")){return void("true"===a.getAttribute("aria-expanded")&&a.click())}}else if("Home"===t.key)t.preventDefault(),o=0,s[0].focus();else if("End"===t.key)t.preventDefault(),o=s.length-1,s[s.length-1].focus();else if(" "===t.key&&a&&"A"===a.tagName)t.preventDefault();else if("Escape"===t.key){const t=n?e(n.menu,"button"):document.querySelector('[data-hs-nav-menu="button"]');t&&(t.click(),t.focus())}})}(o),{result:"arrow-navigation initialized",destroy:()=>{r.handlers.forEach(({element:e,event:t,handler:n,options:r})=>{e.removeEventListener(t,n,r)}),r.handlers.length=0}}}async function k(e){const t={destroyFunctions:[]},n=await Promise.allSettled([A(e.dropdown),E(e.menu,e),L(e["arrow-navigation"],e)]);n.forEach(e=>{"fulfilled"===e.status&&e.value?.destroy&&t.destroyFunctions.push(e.value.destroy)});const r=n.filter(e=>"fulfilled"===e.status).length,o=n.length-r;return o>0&&console.warn(`[navbar] ${r}/${n.length} functions loaded successfully. ${o} failed but won't affect other functions.`),{result:"navbar initialized",destroy:()=>{t.destroyFunctions.forEach(e=>{try{e()}catch(t){console.error("[navbar] Error during cleanup:",t)}}),t.destroyFunctions.length=0}}}function x(t){const n={observers:[],handlers:[]};return function(n,r){const o=a(t,"wrapper");if(0===o.length)return 0;let s=0;o.forEach((o,a)=>{const d=e(t,"toggle",o),p=e(t,"content",o);if(!d||!p)return;s++;const f=`[${l.attributes.height}="${l.attributes.heightValue}"]`,m=o.querySelector(f),h=m?m.parentElement:p,v=`hs-accordion-btn-${a}`,g=`hs-accordion-content-${a}`,y=o.getAttribute(t.attributes.properties.open),b=o.getAttribute(t.attributes.properties.closed),w=y&&b;let A=[];if(w){const e=i(t,"state");A=Array.from(d.querySelectorAll(e))}function E(){return o.classList.contains(l.classes.active)}function L(){const e=E();if("true"===d.getAttribute("aria-expanded")&&!e&&p.contains(document.activeElement)){d.focus()}d.setAttribute("aria-expanded",e?"true":"false");var t;p.inert=!e,w&&A.length>0&&(t=e?y:b,w&&A.forEach(e=>{e.textContent=t})),u(h,e,{duration:300,ease:"power2.inOut"})}d.setAttribute("id",v),p.setAttribute("id",g),p.setAttribute("role","region"),p.setAttribute("aria-labelledby",v),d.setAttribute("aria-controls",g);const k=o.getAttribute(t.attributes.properties.default);k&&"open"===k.toLowerCase()&&o.classList.add(l.classes.active),c(h,E()),L();r(d,"click",e=>{e.preventDefault(),o.classList.toggle(l.classes.active)});const x=new MutationObserver(()=>{L()});x.observe(o,{attributes:!0,attributeFilter:["class"]}),n(x)})}(e=>n.observers.push(e),(e,t,r,o)=>{e.addEventListener(t,r,o),n.handlers.push({element:e,event:t,handler:r,options:o})}),{result:"accordion initialized",destroy:()=>{n.observers.forEach(e=>e.disconnect()),n.observers.length=0,n.handlers.forEach(({element:e,event:t,handler:n,options:r})=>{e.removeEventListener(t,n,r)}),n.handlers.length=0}}}function S(e){const n=t._global.classes.active,r={observers:[],handlers:[],scrollTimeout:null,headings:[]},o=a(e,"content"),s=a(e,"list");return o.forEach(e=>{const t=s[0];if(!t||0===t.children.length)return;const o=t.children[0].cloneNode(!0),a=o.querySelector("a");a&&a.classList.remove(n),t.innerHTML="";const i=e.querySelectorAll("h2");i.forEach(e=>{const t=e.textContent.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"");e.id=t,r.headings.push(e)}),i.forEach((e,n)=>{const r=o.cloneNode(!0),s=r.querySelector("a"),a=e.id;s.href=`#${a}`;const i=document.createElement("strong");i.textContent=`${n+1}. `,s.innerHTML="",s.appendChild(i),s.appendChild(document.createTextNode(e.textContent)),t.appendChild(r)});const l=t.querySelectorAll("a");let c=null;const u=()=>{const e=.75*window.innerHeight;let t=null;for(let n=i.length-1;n>=0;n--){if(i[n].getBoundingClientRect().top<=e){t=i[n].id;break}}if(t!==c&&(c=t,l.forEach(e=>e.classList.remove(n)),c)){const e=Array.from(l).find(e=>e.getAttribute("href")===`#${c}`);e&&e.classList.add(n)}},d=new IntersectionObserver(()=>{u()},{rootMargin:"-75% 0px -25% 0px",threshold:0});i.forEach(e=>d.observe(e)),(e=>{r.observers.push(e)})(d);var p,f,m;p=window,f="scroll",m=()=>{r.scrollTimeout&&clearTimeout(r.scrollTimeout),r.scrollTimeout=setTimeout(u,50)},p.addEventListener(f,m),r.handlers.push({element:p,event:f,handler:m})}),{result:"toc initialized",destroy:()=>{r.headings.forEach(e=>{e.removeAttribute("id")}),r.headings.length=0,r.observers.forEach(e=>e.disconnect()),r.observers.length=0,r.handlers.forEach(({element:e,event:t,handler:n})=>{e.removeEventListener(t,n)}),r.handlers.length=0,r.scrollTimeout&&(clearTimeout(r.scrollTimeout),r.scrollTimeout=null)}}}async function C(){const n=t.default.toc,r={destroyFunctions:[]},l=i(n,"list");if(document.querySelector(l))try{const e=await S(n);e?.destroy&&r.destroyFunctions.push(e.destroy)}catch(u){console.error("[toc] Error initializing heading-links:",u)}const c=i(n["progress-bar"],"wrapper");if(document.querySelector(c))try{const t=await async function(t){const{progressConfig:n,tocConfig:r}=t;if(s())return{result:"progress-bar skipped - prefers-reduced-motion enabled"};const i=o("progress-bar");if(!i)return{result:"progress-bar skipped - GSAP not loaded"};const{gsap:l,ScrollTrigger:c}=i;if(!c)return console.warn("[progress-bar] GSAP ScrollTrigger plugin not loaded"),{result:"progress-bar skipped - ScrollTrigger not loaded"};l.registerPlugin(c);const u={scrollTriggers:[]},d=e(r,"content");if(!d)return{result:"progress-bar skipped - no content element found"};const p=a(n,"wrapper");return 0===p.length?{result:"progress-bar skipped - no wrapper elements found"}:(p.forEach(e=>{l.set(e,{display:"block"}),Array.from(e.querySelectorAll("*")).filter(e=>{const t=n.attributes.elements.element.primary,[r,o]=t.split("="),s=o?.replace(/['"]/g,"");return e.getAttribute(r)===s}).forEach(e=>{l.set(e,{width:"0%"}),l.to(e,{width:"100%",ease:"none",scrollTrigger:{trigger:d,start:"top bottom",end:"bottom 75%",scrub:!0,invalidateOnRefresh:!0,onUpdate:e=>{u.scrollTriggers.includes(e)||u.scrollTriggers.push(e)}}})})}),{result:`progress-bar initialized (${p.length} instances)`,destroy:()=>{u.scrollTriggers.forEach(e=>{e&&"object"==typeof e&&"kill"in e&&"function"==typeof e.kill&&e.kill()}),u.scrollTriggers.length=0}})}({progressConfig:n["progress-bar"],tocConfig:n});t?.destroy&&r.destroyFunctions.push(t.destroy)}catch(u){console.error("[toc] Error initializing progress-bar:",u)}return{result:`toc initialized (${r.destroyFunctions.length} modules active)`,destroy:()=>{r.destroyFunctions.forEach(e=>{try{e()}catch(u){console.error("[toc] Error during cleanup:",u)}}),r.destroyFunctions.length=0}}}function T(t){const n={observers:[],handlers:[],liveRegions:[]};try{a(t,"wrapper").forEach(r=>{try{const o=function(t,n,r){const o=e(r,"list",t);if(!o)return console.warn("[pagination] Missing required element: list"),null;const s=o.parentElement;if(!s)return null;const a={controls:e(r,"controls",t),counter:e(r,"counter",t),dotsWrap:e(r,"dots",t),nextButton:null,prevButton:null};if(!a.controls)return{initialized:!1};const c=e(r,"next",t),u=e(r,"previous",t),d=i(l.clickable,"button"),p=c?.querySelector(d)||c,m=u?.querySelector(d)||u;if(!p||!m)return console.warn("[pagination] Missing required navigation buttons"),null;a.nextButton=p,a.prevButton=m,a.nextButton.setAttribute("aria-label","Go to next page"),a.prevButton.setAttribute("aria-label","Go to previous page"),a.counter&&(a.counter.setAttribute("aria-live","polite"),a.counter.setAttribute("aria-label","Current page"));const h=parseInt(a.controls?.getAttribute(r.attributes.properties.show)||"6")||6,v=parseInt(a.controls?.getAttribute(r.attributes.properties.showMobile)||String(h))||h,g=()=>getComputedStyle(o).getPropertyValue(f.state).trim()===l.cssVars.state.values.active,y=Array.from(o.children),b=y.length;if(!b)return null;const w={totalPages:1,currentIndex:1,currentPage:1,isAnimating:!1,itemsPerPage:h,dotTemplates:{active:null,inactive:null}};let A=[];const E=document.createElement("div");E.className="sr-only",E.setAttribute("aria-live","assertive"),E.setAttribute("aria-atomic","true"),E.style.cssText="position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden;",t.appendChild(E),n.liveRegions.push(E);const L=()=>{a.counter&&(a.counter.textContent=`${w.currentPage} / ${w.totalPages}`)},k=()=>{E.textContent=`Page ${w.currentPage} of ${w.totalPages}`,setTimeout(()=>E.textContent="",1e3)},x=()=>{A.forEach((e,t)=>{const n=e;t===w.currentIndex?n.removeAttribute("inert"):n.setAttribute("inert","")})},S=()=>{const e=A[w.currentIndex];e&&void 0!==e.offsetHeight&&(s.style.height=e.offsetHeight+"px")},C=()=>{if(!a.dotsWrap)return;const e=Array.from(a.dotsWrap.children);if(!e.length)return;const t=e.find(e=>e.classList.contains("is-active")),r=e.find(e=>!e.classList.contains("is-active"));w.dotTemplates.active=t?t.cloneNode(!0):e[0].cloneNode(!0),w.dotTemplates.inactive=r?r.cloneNode(!0):e[0].cloneNode(!0),a.dotsWrap.innerHTML="",a.dotsWrap.setAttribute("role","group"),a.dotsWrap.setAttribute("aria-label","Page navigation");for(let o=1;o<=w.totalPages;o++){const e=(1===o?w.dotTemplates.active:w.dotTemplates.inactive).cloneNode(!0);e.setAttribute("role","button"),e.setAttribute("tabindex","0"),e.setAttribute("aria-label",`Go to page ${o}`),e.setAttribute("aria-current",1===o?"page":"false"),e.setAttribute("data-page",String(o)),1===o?e.classList.add("is-active"):e.classList.remove("is-active");const t=()=>$(o);e.addEventListener("click",t),n.handlers.push({element:e,event:"click",handler:t});const r=e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),$(o))};e.addEventListener("keydown",r),n.handlers.push({element:e,event:"keydown",handler:r}),a.dotsWrap.appendChild(e)}},T=()=>{if(!a.dotsWrap)return;Array.from(a.dotsWrap.children).forEach((e,t)=>{t+1===w.currentPage?(e.classList.add("is-active"),e.setAttribute("aria-current","page")):(e.classList.remove("is-active"),e.setAttribute("aria-current","false"))})},q=(e=null)=>{const t=g();if(w.itemsPerPage=e||(t?v:h),w.totalPages=Math.ceil(b/w.itemsPerPage),a.dotsWrap&&(n.handlers=n.handlers.filter(({element:e})=>!a.dotsWrap.contains(e))),Array.from(s.children).forEach(e=>{e!==o&&s.removeChild(e)}),o.innerHTML="",y.forEach(e=>o.appendChild(e)),w.totalPages<=1)return a.controls&&(a.controls.contains(document.activeElement)&&document.activeElement&&document.activeElement.blur(),a.controls.style.display="none",a.controls.setAttribute("aria-hidden","true")),a.dotsWrap&&(a.dotsWrap.style.display="none",a.dotsWrap.setAttribute("aria-hidden","true")),Object.assign(w,{totalPages:1,currentIndex:1,currentPage:1,isAnimating:!1}),s.style.cssText=`transform: translateX(0%); height: ${o.offsetHeight}px;`,A=[o],1;a.controls&&(a.controls.style.display="",a.controls.removeAttribute("aria-hidden")),a.dotsWrap&&(a.dotsWrap.style.display="",a.dotsWrap.removeAttribute("aria-hidden"));const r=Array.from({length:w.totalPages},(e,t)=>{const n=o.cloneNode(!1),r=t*w.itemsPerPage,s=Math.min(r+w.itemsPerPage,b);return y.slice(r,s).forEach(e=>n.appendChild(e.cloneNode(!0))),n});return s.insertBefore(r[r.length-1].cloneNode(!0),o),r.slice(1).forEach(e=>s.appendChild(e)),s.appendChild(r[0].cloneNode(!0)),o.innerHTML="",Array.from(r[0].children).forEach(e=>o.appendChild(e)),Object.assign(w,{currentIndex:1,currentPage:1,isAnimating:!1}),A=Array.from(s.children),s.style.transition="none",s.style.transform="translateX(-100%)",s.offsetHeight,s.style.transition="",L(),S(),x(),C(),w.totalPages};let P=g();const D=new ResizeObserver(()=>{if(w.isAnimating)return;const e=g();e!==P?(P=e,q()):S()});D.observe(s),n.observers.push(D),q();const $=e=>{if(w.isAnimating||w.totalPages<=1||e===w.currentPage)return;w.isAnimating=!0,w.currentIndex=e,w.currentPage=e,L(),k(),S(),T(),g()&&a.controls&&setTimeout(()=>{const e=80,t=a.controls.getBoundingClientRect().bottom+window.pageYOffset-window.innerHeight+e;window.scrollTo({top:t,behavior:"smooth"})},50),s.style.transform=`translateX(${100*-w.currentIndex}%)`;let t=null;const n=()=>{clearTimeout(t),s.removeEventListener("transitionend",n),L(),k(),S(),x(),T(),w.isAnimating=!1};t=setTimeout(n,1e3),s.addEventListener("transitionend",n)},I=e=>{if(w.isAnimating||w.totalPages<=1)return;w.isAnimating=!0,w.currentIndex+=e,w.currentPage=w.currentIndex>w.totalPages?1:w.currentIndex<1?w.totalPages:w.currentIndex,L(),k(),S(),T(),g()&&a.controls&&setTimeout(()=>{const e=80,t=a.controls.getBoundingClientRect().bottom+window.pageYOffset-window.innerHeight+e;window.scrollTo({top:t,behavior:"smooth"})},50),s.style.transform=`translateX(${100*-w.currentIndex}%)`;let t=null;const n=()=>{clearTimeout(t),s.removeEventListener("transitionend",n),w.currentIndex>w.totalPages?(w.currentIndex=1,w.currentPage=1,s.style.transition="none",s.style.transform="translateX(-100%)",s.offsetHeight,s.style.transition=""):w.currentIndex<1&&(w.currentIndex=w.totalPages,w.currentPage=w.totalPages,s.style.transition="none",s.style.transform=`translateX(${100*-w.totalPages}%)`,s.offsetHeight,s.style.transition=""),L(),k(),S(),x(),T(),w.isAnimating=!1};t=setTimeout(n,1e3),s.addEventListener("transitionend",n)},F=()=>I(1),M=()=>I(-1);return a.nextButton.addEventListener("click",F),a.prevButton.addEventListener("click",M),n.handlers.push({element:a.nextButton,event:"click",handler:F},{element:a.prevButton,event:"click",handler:M}),{initialized:!0}}(r,n,t);o||console.warn("[pagination] Failed to initialize container",r)}catch(o){console.error("[pagination] Error initializing container:",o,r)}})}catch(r){console.error("[pagination] Critical error during initialization:",r)}return{result:"pagination initialized",destroy:()=>{try{n.liveRegions.forEach(e=>{try{e.parentNode&&e.parentNode.removeChild(e)}catch(r){console.error("[pagination] Error removing live region:",r)}}),n.liveRegions.length=0,n.observers.forEach(e=>{try{e.disconnect()}catch(r){console.error("[pagination] Error disconnecting observer:",r)}}),n.observers.length=0,n.handlers.forEach(({element:e,event:t,handler:n})=>{try{e.removeEventListener(t,n)}catch(r){console.error("[pagination] Error removing event listener:",r)}}),n.handlers.length=0}catch(r){console.error("[pagination] Critical error during cleanup:",r)}}}}async function q(t){const n=o("comparison");if(!n)return{result:"comparison skipped - GSAP not loaded"};const{gsap:r,Draggable:s}=n;m("comparison",["Draggable"],"error");const c=a(t,"wrapper"),u={draggables:[],handlers:[],observers:[]},d=i(t,"template-name"),p=i(t,"template-description"),h=i(t,"template-before-image"),v=i(t,"template-after-image");function g(e,t){e.style.setProperty(f.clip,`${t}%`)}function y(n,r){const o=n.templateItems[r];if(!o)return;const s=o.querySelector(d);n.nameElement&&s&&(n.nameElement.textContent=s.textContent);const a=o.querySelector(p);n.descElement&&a&&(n.descElement.textContent=a.textContent);const i=o.querySelector(h);n.beforeImage&&i&&(n.beforeImage.src=i.src,n.beforeImage.alt=i.alt||"");const c=o.querySelector(v);n.afterImage&&c&&(n.afterImage.src=c.src,n.afterImage.alt=c.alt||"",b(n)),n.currentIndex=r,function(n,r){const o=e(t,"pagination",n);if(!o)return;const s=l.classes.active;Array.from(o.children).forEach((e,t)=>{t===r?e.classList.add(s):e.classList.remove(s)})}(n.wrapper,r)}function b(e){const t=e.slider,n=e.wrapper;switch(e.mode){case"before":n.style.setProperty(f.clip,"100%"),t.style.display="none";break;case"after":n.style.setProperty(f.clip,"0%"),t.style.display="none";break;case"split":g(n,e.sliderPosition),t.style.display="flex"}}function w(e,t){const n=e.currentIndex+t,r=e.templateItems.length-1;let o;o=n>r?0:n<0?r:n,y(e,o)}return c.forEach(n=>{const o=e(t,"template-list",n);if(!o)return void console.warn("[comparison] No template list found in wrapper");const a=i(t,"template-item"),c=Array.from(o.querySelectorAll(a));if(0===c.length)return void console.warn("[comparison] No template items found");n.setAttribute("aria-live","polite"),n.setAttribute("aria-label","Before and after image comparison");const d=e(t,"image-wrapper",n),p=e(t,"slider",n),f=e(t,"before-image",n),m=e(t,"after-image",n),h=e(t,"name",n),v=e(t,"description",n);if(!d||!p||!m){const e=[];return d||e.push('image-wrapper (data-hs-comparison="image-wrapper")'),p||e.push('slider (data-hs-comparison="slider")'),m||e.push('after-image (data-hs-comparison-image="after")'),void console.warn(`[comparison] Missing required elements: ${e.join(", ")}`)}const A={wrapper:n,templateItems:c,currentIndex:0,mode:"split",sliderPosition:50,slider:p,beforeImage:f?.querySelector("img"),afterImage:m?.querySelector("img"),nameElement:h,descElement:v,draggable:null};if(y(A,0),g(n,50),s){const e=s.create(p,{type:"x",bounds:d,onDrag:function(){const e=d.getBoundingClientRect(),t=p.getBoundingClientRect().left-e.left,r=Math.max(0,Math.min(100,t/e.width*100));g(n,r),A.sliderPosition=r}});u.draggables.push(e),A.draggable=e[0];const t=new ResizeObserver(()=>{A.draggable&&A.draggable.update()});t.observe(d),u.observers=u.observers||[],u.observers.push(t);[A.beforeImage,A.afterImage].filter(Boolean).forEach(e=>{e instanceof HTMLImageElement&&!e.complete&&e.addEventListener("load",()=>{A.draggable&&A.draggable.update()},{once:!0})});const o=e=>{if("split"!==A.mode)return;const t=d.getBoundingClientRect(),o=e.clientX-t.left,s=Math.max(0,Math.min(100,o/t.width*100)),a=o-t.width/2;A.draggable&&(r.set(p,{x:a}),A.draggable.update()),g(n,s),A.sliderPosition=s};d.addEventListener("click",o),u.handlers.push({element:d,event:"click",handler:o})}n.querySelectorAll(`[${t.attributes.properties.modeType}]`).forEach(e=>{const n=e.getAttribute(t.attributes.properties.modeType),r=i(l.clickable,"button"),o=e.querySelector(r)||e;n===A.mode&&e.classList.add(l.classes.active);const s=e=>{e.preventDefault(),function(e,n){const r=e.wrapper.querySelectorAll(`[${t.attributes.properties.modeType}]`),o=l.classes.active;r.forEach(e=>{e.getAttribute(t.attributes.properties.modeType)===n?e.classList.add(o):e.classList.remove(o)}),e.mode=n,b(e)}(A,n)};o.addEventListener("click",s),u.handlers.push({element:o,event:"click",handler:s})}),function(e,n){const r=n.querySelector(`[${t.attributes.properties.navType}="previous"]`),o=n.querySelector(`[${t.attributes.properties.navType}="next"]`);if(r){const t=i(l.clickable,"button"),n=r.querySelector(t)||r;n.setAttribute("aria-label","Previous image");const o=t=>{t.preventDefault(),w(e,-1)};n.addEventListener("click",o),u.handlers.push({element:n,event:"click",handler:o})}if(o){const t=i(l.clickable,"button"),n=o.querySelector(t)||o;n.setAttribute("aria-label","Next image");const r=t=>{t.preventDefault(),w(e,1)};n.addEventListener("click",r),u.handlers.push({element:n,event:"click",handler:r})}}(A,n);const E=e(t,"pagination",n);E&&c.length>1&&function(e,t){const n=t.children[0];if(!n)return;const r=l.classes.active;t.innerHTML="",e.templateItems.forEach((o,s)=>{const a=n.cloneNode(!0);a.classList.remove(r),0===s&&a.classList.add(r);const i=()=>{y(e,s)};a.addEventListener("click",i),u.handlers.push({element:a,event:"click",handler:i}),t.appendChild(a)})}(A,E),function(e){const t=t=>{"ArrowLeft"===t.key||"ArrowUp"===t.key?(t.preventDefault(),w(e,-1)):"ArrowRight"!==t.key&&"ArrowDown"!==t.key||(t.preventDefault(),w(e,1))};e.wrapper.addEventListener("keydown",t),e.wrapper.setAttribute("tabindex","0"),u.handlers.push({element:e.wrapper,event:"keydown",handler:t})}(A)}),{result:`comparison initialized (${c.length} instances)`,destroy:()=>{u.draggables.forEach(e=>{e&&e[0]&&e[0].kill&&e[0].kill()}),u.handlers.forEach(({element:e,event:t,handler:n})=>{e.removeEventListener(t,n)}),u.observers.forEach(e=>e.disconnect()),u.draggables.length=0,u.handlers.length=0,u.observers.length=0}}}function P(t){const n={handlers:[],timers:[],animationFrames:[],observers:[]},r=(e,t,r,o)=>{e.addEventListener(t,r,o),n.handlers.push({element:e,event:t,handler:r,options:o})},c=e=>n.animationFrames.push(e),u=()=>`${l.cssVars.prefix}${t.cssVars?.progress||"progress"}`,d=(e,t)=>e.style.setProperty(u(),String(t));function p(a){const p=e(t,"links",a),f=e(t,"list",a);if(!p||!f)return;const m=Array.from(p.children),h=Array.from(f.children),v=i(l.clickable,"button"),g=m.map(e=>e.querySelector(v)).filter(e=>null!==e);if(0===g.length)return;const y=a.getAttribute(t.attributes.properties?.autoplay||"data-hs-tab-autoplay"),b=a.getAttribute(t.attributes.properties?.duration||"data-hs-tab-duration"),w=a.getAttribute(t.attributes.properties?.hover||"data-hs-tab-hover"),A=a.getAttribute(t.attributes.properties?.animation||"data-hs-tab-animation"),E=a.getAttribute(t.attributes.properties?.animationDuration||"data-hs-tab-animation-duration"),L="true"===y,k=b?parseFloat(b):6,x="pause"===w,S=A,C=E?parseFloat(E):.3,T=`${"hs-tab"}-${Math.random().toString(36).substring(2,9)}`;h.forEach((e,t)=>{const n=e.id||`${T}-panel-${t}`,r=`${T}-tab-${t}`;e.id=n,g[t]&&(g[t].id=r,g[t].setAttribute("aria-controls",n))});let q=0,P=null,D=null,$=null,I=!1,F=!1,M=!1;async function N(e,t=!1){if(F)return;if(e<0||e>=h.length)return;if(e===q&&!t)return;F=!0;const n=q;if(q=e,g.forEach((t,n)=>{t.setAttribute("aria-selected",n===e?"true":"false"),t.setAttribute("tabindex",n===e?"0":"-1")}),m.forEach((t,n)=>{t.classList.toggle(l.classes.active,n===e)}),L)if(I){const t=m[n]?parseFloat(getComputedStyle(m[n]).getPropertyValue(u())||"0"):0;m.forEach((n,r)=>d(n,r===e?t:0))}else O();const r=h[n],a=h[e];"fade"!==S||t?"clip"!==S||t?h.forEach((t,n)=>{n===e?("fade"===S||"clip"===S?(t.style.position="",t.style.display="block","fade"===S?t.style.opacity="1":t.style.clipPath=""):t.style.display="block",t.inert=!1,t.style.pointerEvents="",t.classList.add(l.classes.active)):("fade"===S||"clip"===S?(t.style.display="none","fade"===S?t.style.opacity="0":t.style.clipPath=""):t.style.display="none",t.inert=!0,t.style.pointerEvents="none",t.classList.remove(l.classes.active))}):await async function(e,t,n){s()&&(n=0);const r=o("tabs",!1);if(!r)return e.style.display="none",e.style.position="",e.style.clipPath="",e.inert=!0,e.style.pointerEvents="none",t.style.display="block",t.style.position="",t.style.clipPath="",t.inert=!1,void(t.style.pointerEvents="");const{gsap:a}=r;return new Promise(r=>{const o=a.timeline({onComplete:()=>{e.style.display="none",e.style.position="",e.style.clipPath="",e.inert=!0,e.style.pointerEvents="none",t.style.position="",t.style.clipPath="",t.inert=!1,t.style.pointerEvents="",r()},defaults:{duration:n,ease:"power1.inOut"}});o.set(e,{position:"absolute",top:0,left:0,width:"100%",clipPath:"inset(0% 0% 0% 0%)"}),o.set(t,{display:"block",position:"relative",clipPath:"inset(0% 0% 100% 0%)"}),o.to(e,{clipPath:"inset(100% 0% 0% 0%)"}),o.to(t,{clipPath:"inset(0% 0% 0% 0%)"},"<40%")})}(r,a,C):await async function(e,t,n){s()&&(n=0);const r=o("tabs",!1);if(!r)return e.style.display="none",e.style.position="",e.inert=!0,e.style.pointerEvents="none",t.style.display="block",t.style.position="",t.inert=!1,void(t.style.pointerEvents="");const{gsap:a}=r;return new Promise(r=>{const o=a.timeline({onComplete:()=>{e.style.display="none",e.style.position="",e.style.opacity="",e.inert=!0,e.style.pointerEvents="none",t.style.position="",t.style.opacity="",t.inert=!1,t.style.pointerEvents="",r()},defaults:{duration:n,ease:"power1.out"}});o.set(e,{position:"absolute",top:0,left:0,width:"100%"}),o.set(t,{display:"block",position:"relative",opacity:0}),o.to(e,{opacity:0}),o.to(t,{opacity:1},"<50%")})}(r,a,C),F=!1}function H(e){if(L){$||($=e);const t=Math.min((e-$)/(1e3*k),1);m.forEach((e,n)=>d(e,n===q?t:0)),t<1&&!I&&(D=requestAnimationFrame(H),D&&c(D))}else m.forEach((e,t)=>d(e,t===q?1:0))}function O(){if(z(),!L)return H(0);if(I||!M)return;const e=m[q]?parseFloat(getComputedStyle(m[q]).getPropertyValue(u())||"0"):0,t=e*k*1e3,r=Math.max(0,1e3*k-t);$=null;const o=e,s=performance.now(),a=e=>{const t=Math.min(o+(e-s)/(1e3*k),1);m.forEach((e,n)=>d(e,n===q?t:0)),t<1&&!I&&(D=requestAnimationFrame(a),D&&c(D))};var i;D=requestAnimationFrame(a),D&&c(D),P=window.setTimeout(()=>N((q+1)%h.length),r),i=P,n.timers.push(i)}function z(){null!==P&&(clearTimeout(P),P=null),null!==D&&(cancelAnimationFrame(D),D=null),$=null}const B=()=>{I=!0,z()},R=()=>{I=!1,O()};g.forEach((e,t)=>{r(e,"click",e=>{e.preventDefault(),N(t)})});const W=e=>{const t=g.indexOf(e.target);if(-1===t)return;let n=t;switch(e.key){case"ArrowLeft":case"ArrowUp":e.preventDefault(),n=0===t?g.length-1:t-1;break;case"ArrowRight":case"ArrowDown":e.preventDefault(),n=t===g.length-1?0:t+1;break;case"Home":e.preventDefault(),n=0;break;case"End":e.preventDefault(),n=g.length-1;break;default:return}F||(N(n),g[n].focus())};g.forEach(e=>r(e,"keydown",W)),x&&L&&(r(a,"mouseenter",B),r(a,"mouseleave",R));let V=!1;r(document,"keydown",()=>V=!0),r(document,"mousedown",()=>V=!1),L&&(r(a,"focusin",()=>{V&&(B(),X())}),r(a,"focusout",()=>{V&&I&&(R(),X())}));const U=`[${t.attributes.properties?.controls||"data-hs-tab-controls"}]`,j=a.querySelectorAll(U);let Y=null,G=null;j.forEach(e=>{const n=e.getAttribute(t.attributes.properties?.controls||"data-hs-tab-controls"),o=e.querySelector(v);if(o)if("previous"===n)o.setAttribute("aria-label","Previous tab"),r(o,"click",e=>{e.preventDefault(),N(0===q?h.length-1:q-1)});else if("next"===n)o.setAttribute("aria-label","Next tab"),r(o,"click",e=>{e.preventDefault(),N((q+1)%h.length)});else if("toggle"===n){if(!L)return void(e.style.display="none");Y=e,G=o,G.setAttribute("aria-label",I?"Play":"Pause"),Y.classList.toggle(l.classes.active,!I),r(o,"click",e=>{e.preventDefault(),I?R():B(),X()})}});const X=()=>{Y&&G&&(Y.classList.toggle(l.classes.active,!I),G.setAttribute("aria-label",I?"Play":"Pause"))};if(N(0,!0),L){const e=new IntersectionObserver(e=>{e.forEach(e=>{M=e.isIntersecting,e.isIntersecting&&!I?O():z()})},{threshold:.1});e.observe(a),K=e,n.observers.push(K)}var K}const f=a(t,"wrapper");return f.forEach(e=>{p(e)}),{result:`tabs initialized (${f.length} systems)`,destroy:()=>{n.timers.forEach(e=>clearTimeout(e)),n.timers.length=0,n.animationFrames.forEach(e=>cancelAnimationFrame(e)),n.animationFrames.length=0,n.observers.forEach(e=>e.disconnect()),n.observers.length=0,n.handlers.forEach(({element:e,event:t,handler:n,options:r})=>{e.removeEventListener(t,n,r)}),n.handlers.length=0}}}async function D(e){const t=l.classes.active,n={handlers:[],modals:[]},r=(e,t,r,o)=>{e.addEventListener(t,r,o),n.handlers.push({element:e,event:t,handler:r,options:o})},o=a(e,"wrapper");if(0===o.length)return{result:"modal: no modals found",destroy:()=>{}};o.forEach(e=>{const t=e.getAttribute("data-hs-modal-id");if(!t)return void console.warn("[modal] Wrapper missing data-hs-modal-id:",e);e.setAttribute("role","dialog"),e.setAttribute("aria-modal","true"),e.setAttribute("aria-hidden","true");const r=e.querySelector("h1, h2, h3, h4, h5, h6");r&&(r.id||(r.id=`modal-${t}-title`),e.setAttribute("aria-labelledby",r.id));const o=Array.from(e.querySelectorAll('[data-hs-modal="close"]'));o.forEach(e=>{e.setAttribute("aria-label","Close modal")});const s={wrapper:e,modalId:t,closeButtons:o,triggerButton:null,focusableElements:[]};n.modals.push(s)});const s=(e,r)=>{const o=n.modals.find(t=>t.modalId===e);if(!o)return void console.warn(`[modal] Modal with id "${e}" not found`);const{wrapper:s}=o;r&&(o.triggerButton=r),s.classList.add(t),s.setAttribute("aria-hidden","false"),d(),o.focusableElements=(e=>{const t=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(", ");return Array.from(e.querySelectorAll(t))})(s),o.closeButtons.length>0?o.closeButtons[0].focus():o.focusableElements.length>0&&o.focusableElements[0].focus()},i=e=>{const{wrapper:n,triggerButton:r}=e;c(n),n.classList.remove(t),n.setAttribute("aria-hidden","true"),p(),r&&(r.focus(),e.triggerButton=null),e.focusableElements=[]},c=e=>{e.querySelectorAll("video").forEach(e=>{e.pause(),e.currentTime=0});e.querySelectorAll("audio").forEach(e=>{e.pause(),e.currentTime=0});e.querySelectorAll("iframe").forEach(e=>{const t=e.src;e.src="",e.src=t})};document.querySelectorAll("[data-hs-modal-open]").forEach(e=>{const t=e.getAttribute("data-hs-modal-open");if(!t)return;e.setAttribute("aria-haspopup","dialog"),e.setAttribute("aria-controls",`modal-${t}`);r(e,"click",n=>{n.preventDefault(),s(t,e)})}),n.modals.forEach(e=>{e.closeButtons.forEach(t=>{r(t,"click",()=>{i(e)})});r(e.wrapper,"click",t=>{t.target===e.wrapper&&i(e)})});r(document,"keydown",e=>{if("Escape"===e.key){const e=n.modals.slice().reverse().find(e=>e.wrapper.classList.contains(t));e&&i(e)}});return r(document,"keydown",e=>{const r=n.modals.find(e=>e.wrapper.classList.contains(t));r&&((e,t)=>{if("Tab"!==e.key)return;const{focusableElements:n}=t;if(0===n.length)return;const r=n[0],o=n[n.length-1];e.shiftKey?document.activeElement===r&&(e.preventDefault(),o.focus()):document.activeElement===o&&(e.preventDefault(),r.focus())})(e,r)}),{result:`modal initialized (${n.modals.length} modals)`,destroy:()=>{n.handlers.forEach(({element:e,event:t,handler:n,options:r})=>{e.removeEventListener(t,n,r)}),n.handlers.length=0,n.modals.forEach(e=>{e.wrapper.classList.contains(t)&&(e.wrapper.classList.remove(t),e.wrapper.setAttribute("aria-hidden","true"),p())}),n.modals.length=0}}}function I(n){const r={handlers:[],domContentLoadedHandler:null},o=(e,t,n)=>{e.addEventListener(t,n),r.handlers.push({element:e,event:t,handler:n})};function s(){a(n,"wrapper").forEach(r=>{const s=r;s.dataset.hsFormRangeInit||(s.dataset.hsFormRangeInit="true",function(r,o){const s=r.querySelector("input[type='range']");if(!s)return void console.warn('[range] Missing <input type="range"> element in wrapper',r);const a=e(n,"output",r),i=()=>{const e=s.min?+s.min:0,o=s.max?+s.max:100,i=+s.value||e,l=(i-e)/(o-e);r.style.setProperty(`${t._global.cssVars.prefix}${n.cssVars?.progress||"progress"}`,String(l)),a&&(a.textContent=String(i))};o(s,"input",i),i()}(s,o))})}return"loading"===document.readyState?(r.domContentLoadedHandler=s,document.addEventListener("DOMContentLoaded",r.domContentLoadedHandler)):s(),{result:"range initialized",destroy:()=>{r.domContentLoadedHandler&&(document.removeEventListener("DOMContentLoaded",r.domContentLoadedHandler),r.domContentLoadedHandler=null),r.handlers.forEach(({element:e,event:t,handler:n})=>{e.removeEventListener(t,n)}),r.handlers.length=0;a(n,"wrapper").forEach(e=>{delete e.dataset.hsFormRangeInit})}}}const F=[{name:"Alabama",value:"AL"},{name:"Alaska",value:"AK"},{name:"Arizona",value:"AZ"},{name:"Arkansas",value:"AR"},{name:"California",value:"CA"},{name:"Colorado",value:"CO"},{name:"Connecticut",value:"CT"},{name:"Delaware",value:"DE"},{name:"Florida",value:"FL"},{name:"Georgia",value:"GA"},{name:"Hawaii",value:"HI"},{name:"Idaho",value:"ID"},{name:"Illinois",value:"IL"},{name:"Indiana",value:"IN"},{name:"Iowa",value:"IA"},{name:"Kansas",value:"KS"},{name:"Kentucky",value:"KY"},{name:"Louisiana",value:"LA"},{name:"Maine",value:"ME"},{name:"Maryland",value:"MD"},{name:"Massachusetts",value:"MA"},{name:"Michigan",value:"MI"},{name:"Minnesota",value:"MN"},{name:"Mississippi",value:"MS"},{name:"Missouri",value:"MO"},{name:"Montana",value:"MT"},{name:"Nebraska",value:"NE"},{name:"Nevada",value:"NV"},{name:"New Hampshire",value:"NH"},{name:"New Jersey",value:"NJ"},{name:"New Mexico",value:"NM"},{name:"New York",value:"NY"},{name:"North Carolina",value:"NC"},{name:"North Dakota",value:"ND"},{name:"Ohio",value:"OH"},{name:"Oklahoma",value:"OK"},{name:"Oregon",value:"OR"},{name:"Pennsylvania",value:"PA"},{name:"Rhode Island",value:"RI"},{name:"South Carolina",value:"SC"},{name:"South Dakota",value:"SD"},{name:"Tennessee",value:"TN"},{name:"Texas",value:"TX"},{name:"Utah",value:"UT"},{name:"Vermont",value:"VT"},{name:"Virginia",value:"VA"},{name:"Washington",value:"WA"},{name:"West Virginia",value:"WV"},{name:"Wisconsin",value:"WI"},{name:"Wyoming",value:"WY"}];function M(t){const n={observers:[],handlers:[],timeouts:[],domContentLoadedHandler:null},r=e=>n.observers.push(e),o=(e,t,r,o)=>{e.addEventListener(t,r,o),n.handlers.push({element:e,event:t,handler:r,options:o})},s=e=>n.timeouts.push(e);function i(){document.querySelectorAll("select > div").forEach(e=>{const t=e.parentElement;for(;e.firstChild;)t.appendChild(e.firstChild);e.remove()});a(t,"wrapper").forEach(a=>{!function(r,o,s,a){const i=r.querySelector("select");if(!i)return void console.warn("[select] Missing <select> element in custom select wrapper",r);i.setAttribute("aria-hidden","true"),i.setAttribute("tabindex","-1");const l=i.getAttribute("name")||"custom-select",f=e(t,"list",r),m=e(t,"button",r);if(!f||!m)return void console.warn("[select] Missing required elements (list or button) in custom select wrapper",r);function h(){i.disabled?(m.disabled=!0,m.setAttribute("aria-disabled","true")):(m.disabled=!1,m.removeAttribute("aria-disabled"))}h();const v=f.firstElementChild;if(!v)return void console.warn("[select] Missing option template in custom select list",r);const g=v.cloneNode(!0);v.remove();i.querySelectorAll("option").forEach((e,t)=>{const n=g.cloneNode(!0),r=n.querySelector("span");if(r&&(r.textContent=e.textContent),n.setAttribute("data-value",e.value),n.setAttribute("role","option"),n.setAttribute("id",`${l}-option-${t}`),n.setAttribute("tabindex","-1"),e.selected){n.setAttribute("aria-selected","true");const t=m.querySelector("span")||m;"SPAN"===t.tagName&&(t.textContent=e.textContent),e.value?m.classList.add("is-filled"):m.classList.remove("is-filled")}else n.setAttribute("aria-selected","false");f.appendChild(n)}),f.setAttribute("role","listbox"),f.setAttribute("id",`${l}-listbox`),f.setAttribute("tabindex","-1"),f.setAttribute("aria-hidden","true"),f.inert=!0,m.setAttribute("role","combobox"),m.setAttribute("aria-haspopup","listbox"),m.setAttribute("aria-controls",`${l}-listbox`),m.setAttribute("aria-expanded","false"),m.setAttribute("id",`${l}-button`);const y=r.querySelector("label")||document.querySelector(`label[for="${i.id}"]`);if(y){const e=y.id||`${l}-label`;y.id=e,i.id||(i.id=`${l}-select`),y.setAttribute("for",i.id),m.setAttribute("aria-labelledby",e)}const b=r.querySelector('[data-hs-height="element"]'),w=b||null;let A="",E=null;function L(){return r.classList.contains("is-active")}function k(){const e=L(),t="true"===m.getAttribute("aria-expanded");if(t&&!e&&f.contains(document.activeElement)&&m.focus(),m.setAttribute("aria-expanded",e?"true":"false"),f.setAttribute("aria-hidden",e?"false":"true"),f.inert=!e,e){f.querySelectorAll('[role="option"]').forEach(e=>{e.setAttribute("tabindex","0")}),t||d()}else{m.removeAttribute("aria-activedescendant");f.querySelectorAll('[role="option"]').forEach(e=>{e.setAttribute("tabindex","-1")}),t&&p()}w&&u(w,e,{duration:300,ease:"power2.inOut"})}w&&c(w,L());function x(e){const t=f.querySelectorAll('[role="option"]');e<0||e>=t.length||(t.forEach(e=>{e.classList.remove("focused"),e.setAttribute("tabindex","-1")}),t[e].classList.add("focused"),t[e].setAttribute("tabindex","0"),t[e].focus(),m.setAttribute("aria-activedescendant",t[e].id))}function S(e){if(1!==e.length)return!1;if(null!==E){clearTimeout(E);const e=n.timeouts.indexOf(E);e>-1&&n.timeouts.splice(e,1)}const t=Array.from(f.querySelectorAll('[role="option"]'));if(0===t.length)return!1;A+=e.toLowerCase();const o=t.findIndex(e=>e.classList.contains("focused"));if(1===A.length||A.split("").every(e=>e===A[0])){const e=A[0];let n=o+1;for(let o=0;o<t.length;o++){const s=(n+o)%t.length;if((t[s].querySelector("span")?.textContent||t[s].textContent).toLowerCase().startsWith(e))return x(s),L()||r.classList.add("is-active"),E=setTimeout(C,500),a(E),!0}}else{const e=t.findIndex(e=>(e.querySelector("span")?.textContent||e.textContent).toLowerCase().startsWith(A));if(-1!==e)return x(e),L()||r.classList.add("is-active"),E=setTimeout(C,500),a(E),!0}return E=setTimeout(C,500),a(E),!1}function C(){A="",E=null}function T(e){const t=e.getAttribute("data-value")||"",n=e.querySelector("span")?.textContent||e.textContent;i.value=t,i.dispatchEvent(new Event("change",{bubbles:!0}));const o=m.querySelector("span")||m;"SPAN"===o.tagName&&(o.textContent=n),t?m.classList.add("is-filled"):m.classList.remove("is-filled"),f.querySelectorAll('[role="option"]').forEach(e=>{e.setAttribute("aria-selected","false")}),e.setAttribute("aria-selected","true"),r.classList.remove("is-active")}k();const q=e=>{e.preventDefault(),r.classList.toggle("is-active")};o(m,"click",q);const P=e=>{switch(e.key){case"Enter":e.preventDefault();const t=m.closest("form");if(t){const e=t.querySelector('button[type="submit"], input[type="submit"]')||t.querySelector("button:not([type])");e&&e.click()}break;case" ":e.preventDefault(),r.classList.toggle("is-active");break;case"ArrowDown":e.preventDefault(),L()?x(0):(r.classList.add("is-active"),requestAnimationFrame(()=>{x(0)}));break;case"ArrowUp":if(e.preventDefault(),L()){x(f.querySelectorAll('[role="option"]').length-1)}else r.classList.add("is-active"),requestAnimationFrame(()=>{x(0)});break;case"Escape":L()&&(e.preventDefault(),r.classList.remove("is-active"));break;case"Home":e.preventDefault(),L()||r.classList.add("is-active"),x(0);break;case"End":e.preventDefault(),L()||r.classList.add("is-active");x(f.querySelectorAll('[role="option"]').length-1);break;default:S(e.key)&&e.preventDefault()}};o(m,"keydown",P);const D=e=>{const t=e.target.closest('[role="option"]');if(!t)return;const n=Array.from(f.querySelectorAll('[role="option"]')),o=n.indexOf(t);switch(e.key){case"ArrowDown":e.preventDefault(),o<n.length-1&&x(o+1);break;case"ArrowUp":e.preventDefault(),o>0&&x(o-1);break;case"Enter":e.preventDefault(),T(t);break;case"Escape":e.preventDefault(),r.classList.remove("is-active"),m.focus();break;case"Home":e.preventDefault(),x(0);break;case"End":e.preventDefault(),x(n.length-1);break;default:S(e.key)&&e.preventDefault()}};o(f,"keydown",D);o(f,"click",e=>{const t=e.target.closest('[role="option"]');t&&T(t)});const $=e=>{e.relatedTarget&&r.contains(e.relatedTarget)||!r.classList.contains("is-active")||r.classList.remove("is-active")};o(f,"focusout",$);const I=e=>{r.classList.contains("is-active")&&!r.contains(e.target)&&r.classList.remove("is-active")};o(document,"click",I);const F=new MutationObserver(()=>{k()});F.observe(r,{attributes:!0,attributeFilter:["class"]}),s(F);const M=new MutationObserver(()=>{h()});M.observe(i,{attributes:!0,attributeFilter:["disabled"]}),s(M);const N=()=>{const e=i.options[i.selectedIndex];if(e){const t=f.querySelectorAll('[role="option"]'),n=Array.from(t).find(t=>t.getAttribute("data-value")===e.value);if(n){const r=n.querySelector("span")?.textContent||n.textContent,o=m.querySelector("span")||m;"SPAN"===o.tagName&&(o.textContent=r),e.value?m.classList.add("is-filled"):m.classList.remove("is-filled"),t.forEach(e=>{e.setAttribute("aria-selected","false")}),n.setAttribute("aria-selected","true")}}};o(i,"change",N),o(i,"input",N);const H=i.closest("form");if(H){o(H,"reset",()=>{setTimeout(()=>{N()},0)})}}(a,o,r,s)})}return"loading"===document.readyState?(n.domContentLoadedHandler=i,document.addEventListener("DOMContentLoaded",n.domContentLoadedHandler)):i(),window.initCustomSelects=i,{result:"select initialized",destroy:()=>{n.domContentLoadedHandler&&(document.removeEventListener("DOMContentLoaded",n.domContentLoadedHandler),n.domContentLoadedHandler=null),n.observers.forEach(e=>e.disconnect()),n.observers.length=0,n.timeouts.forEach(e=>clearTimeout(e)),n.timeouts.length=0,n.handlers.forEach(({element:e,event:t,handler:n,options:r})=>{e.removeEventListener(t,n,r)}),n.handlers.length=0,window.initCustomSelects&&delete window.initCustomSelects}}}async function N(e){const t={destroyFunctions:[]};try{const n=function(e){const t=a(e,"states");return t.forEach(e=>{const t=e;if("SELECT"!==t.tagName)return void console.warn('[select-states] data-hs-form-select="states" must be on a <select> element',t);const n=t.querySelectorAll("option");if(1!==n.length)return void console.warn("[select-states] Select must have exactly 1 default template option (placeholder). Found:",n.length,t);const r=n[0];if(""!==r.value)return void console.warn("[select-states] Template option must have empty value for placeholder. Found value:",r.value,t);const o=r.textContent;t.innerHTML="";const s=document.createElement("option");s.value="",s.textContent=o,t.appendChild(s),F.forEach(e=>{const n=document.createElement("option");n.value=e.value,n.textContent=e.name,t.appendChild(n)})}),{result:`states initialized on ${t.length} select${1!==t.length?"s":""}`,destroy:()=>{}}}(e.states);n?.destroy&&t.destroyFunctions.push(n.destroy);const r=M(e["custom-select"]);return r?.destroy&&t.destroyFunctions.push(r.destroy),{result:"select initialized",destroy:()=>{t.destroyFunctions.forEach(e=>{try{e()}catch(t){console.error("[select] Error during cleanup:",t)}}),t.destroyFunctions.length=0}}}catch(n){throw console.error("[select] Initialization failed:",n),t.destroyFunctions.forEach(e=>{try{e()}catch(t){console.error("[select] Error during error cleanup:",t)}}),n}}async function H(){const n=t.default.form,r={destroyFunctions:[]},o=i(n.honeypot,"form-handler");if(document.querySelector(o))try{const t=function(t){const n={honeypotHandler:null},r=n=>{const r=n.target;if("FORM"!==r.tagName)return;const o=e(t,"form-handler",r);return o&&o.value?(n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),!1):void 0};return n.honeypotHandler=r,document.addEventListener("submit",r,!0),{result:"honeypot initialized",destroy:()=>{n.honeypotHandler&&(document.removeEventListener("submit",n.honeypotHandler,!0),n.honeypotHandler=null)}}}(n.honeypot);t?.destroy&&r.destroyFunctions.push(t.destroy)}catch(u){console.error("[form] Error initializing honeypot:",u)}const s=i(n.range,"wrapper");if(document.querySelector(s))try{const e=I(n.range);e?.destroy&&r.destroyFunctions.push(e.destroy)}catch(u){console.error("[form] Error initializing range:",u)}const l=i(n.test,"wrapper");if(document.querySelector(l))try{const t=function(t){const n={handlers:[]},r=(e,t,r,o)=>{e.addEventListener(t,r,o),n.handlers.push({element:e,event:t,handler:r,options:o})},o=a(t,"wrapper");return o.forEach(n=>{const o=n.querySelector("form");if(!o)return void console.warn('[form-test] No <form> element found within data-hs-form-test="wrapper"',n);const s=e(t,"info",n),a=()=>{const e=new FormData(o),t={};for(const[n,r]of e.entries())t[n]=r;if(s){const e=document.createElement("pre");e.textContent=JSON.stringify(t,null,2),s.innerHTML="",s.appendChild(document.createTextNode("Test mode active - Live form data:")),s.appendChild(e)}};s&&(s.textContent="Test mode active, preventing native submissions",a()),r(o,"input",a),r(o,"change",a);const i=o.querySelector('button[type="submit"], input[type="submit"]')||o.querySelector("button:not([type])");i&&r(i,"click",()=>{console.log("[form-test] Submit button clicked"),requestAnimationFrame(()=>{o.checkValidity()||console.log("[form-test] Browser blocked submission - validation failed")})}),r(o,"submit",e=>{e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),console.log("[form-test] Submission prevented - displaying test results");const t=new FormData(o),n={};for(const[o,s]of t.entries())n[o]=s;const r=`✅ Form would submit successfully at ${(new Date).toLocaleTimeString()}`;if(s){const e=document.createElement("pre");e.textContent=JSON.stringify(n,null,2),s.innerHTML="",s.appendChild(document.createTextNode(r)),s.appendChild(e)}else console.log(r),console.log("Form data:",n);return!1},!0)}),{result:`test initialized on ${o.length} form${1!==o.length?"s":""}`,destroy:()=>{n.handlers.forEach(({element:e,event:t,handler:n,options:r})=>{e.removeEventListener(t,n,r)}),n.handlers.length=0}}}(n.test);t?.destroy&&r.destroyFunctions.push(t.destroy)}catch(u){console.error("[form] Error initializing test:",u)}const c=i(n.select,"wrapper");if(document.querySelector(c))try{const e=await N(n.select);e?.destroy&&r.destroyFunctions.push(e.destroy)}catch(u){console.error("[form] Error initializing select:",u)}return{result:`form initialized (${r.destroyFunctions.length} modules active)`,destroy:()=>{r.destroyFunctions.forEach(e=>{try{e()}catch(u){console.error("[form] Error during cleanup:",u)}}),r.destroyFunctions.length=0}}}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function z(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return O(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?O(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function B(e,t,n,r){var o,s,a={headers:{accept:"*/*"}};return t||(a.mode="no-cors"),n&&(a.credentials="include"),a.priority=r?"high":"low",window.fetch?fetch(e,a):(o=e,s=n,new Promise(function(e,t,n){(n=new XMLHttpRequest).open("GET",o,n.withCredentials=s),n.setRequestHeader("Accept","*/*"),n.onload=function(){200===n.status?e():t()},n.send()}))}var R,W=(R=document.createElement("link")).relList&&R.relList.supports&&R.relList.supports("prefetch")?function(e,t){return new Promise(function(n,r,o){(o=document.createElement("link")).rel="prefetch",o.href=e,t&&o.setAttribute("crossorigin","anonymous"),o.onload=n,o.onerror=r,document.head.appendChild(o)})}:B,V=window.requestIdleCallback||function(e){var t=Date.now();return setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},U=new Set,j=new Set,Y=!1;function G(e,t){return Array.isArray(t)?t.some(function(t){return G(e,t)}):(t.test||t).call(t,e.href,e)}function X(e){if(e){if(e.saveData)return new Error("Save-Data is enabled");if(/2g/.test(e.effectiveType))return new Error("network conditions are poor")}return!0}function K(e){if(void 0===e&&(e={}),window.IntersectionObserver&&"isIntersecting"in IntersectionObserverEntry.prototype){var t=function(e){e=e||1;var t=[],n=0;function r(){n<e&&t.length>0&&(t.shift()(),n++)}return[function(e){t.push(e)>1||r()},function(){n--,r()}]}(e.throttle||1/0),n=t[0],r=t[1],o=e.limit||1/0,s=e.origins||[location.hostname],a=e.ignores||[],i=e.delay||0,l=[],c=e.timeoutFn||V,u="function"==typeof e.hrefFn&&e.hrefFn,d=e.prerender||!1;Y=e.prerenderAndPrefetch||!1;var p=new IntersectionObserver(function(t){t.forEach(function(t){if(t.isIntersecting)l.push((t=t.target).href),a=function(){l.includes(t.href)&&(p.unobserve(t),(Y||d)&&j.size<o?function(e,t){void 0===t&&(t="immediate");var n=X(navigator.connection);if(n instanceof Error)return Promise.reject(new Error("Cannot prerender, "+n.message));if(!HTMLScriptElement.supports("speculationrules"))return _(e,!0,!1,!1,"moderate"===t||"conservative"===t),Promise.reject(new Error("This browser does not support the speculation rules API. Falling back to prefetch."));for(var r,o=z([].concat(e));!(r=o()).done;)j.add(r.value);U.size>0&&!Y&&console.warn("[Warning] You are using both prefetching and prerendering on the same document");var s=function(e,t){var n=document.createElement("script");n.type="speculationrules",n.text='{"prerender":[{"source": "list",\n "urls": ["'+Array.from(e).join('","')+'"],\n "eagerness": "'+t+'"}]}';try{document.head.appendChild(n)}catch(r){return r}return!0}(j,t);return!0===s?Promise.resolve():Promise.reject(s)}(u?u(t):t.href,e.eagerness).catch(function(t){if(!e.onError)throw t;e.onError(t)}):U.size<o&&!d&&n(function(){_(u?u(t):t.href,e.priority,e.checkAccessControlAllowOrigin,e.checkAccessControlAllowCredentials,e.onlyOnMouseover).then(r).catch(function(t){r(),e.onError&&e.onError(t)})}))},(c=i)?setTimeout(a,c):a();else{var s=l.indexOf((t=t.target).href);s>-1&&l.splice(s)}var a,c})},{threshold:e.threshold||0});return c(function(){(e.el&&e.el.length&&e.el.length>0&&"A"===e.el[0].nodeName?e.el:(e.el||document).querySelectorAll("a")).forEach(function(e){s.length&&!s.includes(e.hostname)||G(e,a)||p.observe(e)})},{timeout:e.timeout||2e3}),function(){U.clear(),p.disconnect()}}}function _(e,t,n,r,o){var s=X(navigator.connection);return s instanceof Error?Promise.reject(new Error("Cannot prefetch, "+s.message)):(j.size>0&&!Y&&console.warn("[Warning] You are using both prefetching and prerendering on the same document"),Promise.all([].concat(e).map(function(e){return U.has(e)?[]:(U.add(e),function(e,t,n){var r=[].slice.call(arguments,3);if(!n)return e.apply(void 0,[t].concat(r));for(var o,s=Array.from(document.querySelectorAll("a")).filter(function(e){return e.href===t}),a=new Map,i=function(){var n=o.value,s=function(o){var l=setTimeout(function(){return n.removeEventListener("mouseenter",s),n.removeEventListener("mouseleave",i),e.apply(void 0,[t].concat(r))},200);a.set(n,l)},i=function(e){var t=a.get(n);t&&(clearTimeout(t),a.delete(n))};n.addEventListener("mouseenter",s),n.addEventListener("mouseleave",i)},l=z(s);!(o=l()).done;)i()}(t?B:W,new URL(e,location.href).toString(),o,n,r,t))})))}async function J(){const e=new Set,t=K({el:document.body,limit:5,throttle:1e3,timeout:1e4,ignoreSlowConnection:!0,origins:[window.location.hostname],delay:0,priority:"low"}),n=new IntersectionObserver(t=>{t.forEach(t=>{if(t.isIntersecting){const n=t.target.href;if(n.includes("#")||e.has(n))return;_([n],{priority:"low"}).then(()=>{e.add(n)}).catch(()=>{})}})},{rootMargin:"200px"});return document.querySelectorAll("a[href]").forEach(e=>{e instanceof HTMLAnchorElement&&e.hostname===window.location.hostname&&n.observe(e)}),document.body.addEventListener("mouseover",t=>{const n=t.target.closest("a[href]");if(n&&n instanceof HTMLAnchorElement){const t=n.href;n.hostname===window.location.hostname&&!e.has(t)&&_([t],{priority:"low"}).then(()=>{e.add(t)}).catch(()=>{})}}),{result:"link-prefetch initialized",destroy:()=>{t&&"function"==typeof t&&t(),n.disconnect()}}}async function Z(){const e=t._global.classes.active,n=t.default["active-link"],r={observers:[],handlers:[],scrollTimeout:null},o=i(n,"wrapper"),s=i(n,"trigger"),a=document.querySelectorAll('a[href^="#"], button[data-target^="#"]'),l=[];a.forEach(e=>{let t=e;const n=e.closest(o);if(n)t=n;else{const n=e.closest(s);n&&(t=n)}l.push({link:e,target:t})});const c=[];if(a.forEach(e=>{const t=e.getAttribute("href")||e.getAttribute("data-target");if(t&&"#"!==t){const e=document.querySelector(t);e&&c.push({element:e,hash:t})}}),0===c.length)return{result:"active-link: no sections found",destroy:()=>{}};let u=null;const d=()=>{const t=.75*window.innerHeight;let n=null;for(let e=c.length-1;e>=0;e--){if(c[e].element.getBoundingClientRect().top<=t){n=c[e].hash;break}}if(n!==u&&(u=n,l.forEach(({target:t})=>t.classList.remove(e)),u)){const t=l.find(({link:e})=>e.getAttribute("href")===u||e.getAttribute("data-target")===u);t&&t.target.classList.add(e)}},p=new IntersectionObserver(()=>{d()},{rootMargin:"-75% 0px -25% 0px",threshold:0});c.forEach(({element:e})=>p.observe(e)),r.observers.push(p);const f=()=>{r.scrollTimeout&&clearTimeout(r.scrollTimeout),r.scrollTimeout=setTimeout(d,50)};return window.addEventListener("scroll",f),r.handlers.push({element:window,event:"scroll",handler:f}),d(),{result:`active-link initialized (${c.length} sections tracked)`,destroy:()=>{r.observers.forEach(e=>e.disconnect()),r.observers.length=0,r.handlers.forEach(({element:e,event:t,handler:n})=>{e.removeEventListener(t,n)}),r.handlers.length=0,r.scrollTimeout&&(clearTimeout(r.scrollTimeout),r.scrollTimeout=null),l.forEach(({target:t})=>t.classList.remove(e))}}}async function Q(){const e={destroyFunctions:[]},n=t.default;try{const t=await y();t?.destroy&&e.destroyFunctions.push(t.destroy)}catch(i){console.error("[default] Error initializing transition:",i)}const r=[b(n["smooth-scroll"]),k(n.navbar),x(n.accordion),C(),T(n.pagination),q(n.comparison),P(n.tabs),D(n.modal),H(),J(),Z()],o=await Promise.allSettled(r);o.forEach(t=>{"fulfilled"===t.status&&t.value?.destroy&&e.destroyFunctions.push(t.value.destroy)});const s=o.filter(e=>"fulfilled"===e.status).length,a=o.length-s;return a>0&&console.warn(`[default] ${s+1}/${o.length+1} modules loaded successfully. ${a} failed but won't affect other modules.`),{result:"default initialized",destroy:()=>{e.destroyFunctions.forEach(e=>{try{e()}catch(i){console.error("[default] Error during cleanup:",i)}}),e.destroyFunctions.length=0}}}export{Q as init};
1
+ import{a as e,c as t,i as n,w as r,d as o,p as s,q as a,b as i,g as l,s as c,e as u,o as d,f as p,h as m,j as f}from"./hsfxutilsMPToI1FZ.js";const h=t._global,v=t.default.transition,g=h.apiName;async function y(){const t=e(v,"wrapper");if(!t)return{result:"transition skipped - no wrapper found",destroy:()=>{}};const o="data-hs-transition-initialized";if(t.hasAttribute(o))return{result:"transition already initialized",destroy:()=>{}};t.setAttribute(o,"true");const s=window[g]?.settings?.isSPA||!1,a=new Map;let i=null,l=null;const c=(e,n=null,r=t)=>{const o=v.attributes.elements.trigger.primary.match(/data-[^=]+/)?.[0],s=v.attributes.elements.namespace.primary.match(/data-[^=]+/)?.[0];if(!o||!s)return null;const a=r.querySelectorAll(`[${o}="${e}"]`);if(a.length>0){if(n){const t=r.querySelector(`[${s}="${n}"]`);if(t){const n=t.querySelector(`[${o}="${e}"]`);if(n)return n}}const t=Array.from(a).find(e=>{let t=e.parentElement;for(;t&&t!==r;){if(t.hasAttribute(s))return!1;t=t.parentElement}return!0});if(t)return t}const i="exit"===e?v.attributes.elements.exitTrigger.primary.match(/data-[^=]+/)?.[0]:v.attributes.elements.enterTrigger.primary.match(/data-[^=]+/)?.[0];if(!i)return null;const l=r.querySelectorAll(`[${i}]`);if(l.length>0){if(n){const e=r.querySelector(`[${s}="${n}"]`);if(e){const t=e.querySelector(`[${i}]`);if(t)return t}}const e=Array.from(l).find(e=>{let t=e.parentElement;for(;t&&t!==r;){if(t.hasAttribute(s))return!1;t=t.parentElement}return!0});if(e)return e}return null},u=(e=null)=>new Promise(n=>{const r=c("exit",e);if(!r)return void n();const o=(()=>{const e=v.attributes.elements.exitTime.primary.match(/data-[^=]+/)?.[0];if(!e)return 0;const n=t.getAttribute(e);return n?1e3*parseFloat(n):0})();r.click(),setTimeout(()=>n(),o)}),d=(e=null)=>new Promise(n=>{const r=c("enter",e);if(!r)return void n();const o=!sessionStorage.getItem("transition-loaded"),s=(()=>{const e=v.attributes.elements.firstDelay.primary.match(/data-[^=]+/)?.[0];if(!e)return 0;const n=t.getAttribute(e);return n?1e3*parseFloat(n):0})(),a=()=>{r.click(),o&&sessionStorage.setItem("transition-loaded","true"),n()};o&&s>0?i=setTimeout(a,s):a()}),p=e=>{u(e?.detail?.namespace||null)},m=e=>{d(e?.detail?.namespace||null)};if(a.set(`${g}:transition-exit`,p),a.set(`${g}:transition-enter`,m),window.addEventListener(`${g}:transition-exit`,p),window.addEventListener(`${g}:transition-enter`,m),!s){const e=e=>{const t=e.target.closest("a[href]");if(t&&t.hostname===window.location.hostname&&t.getAttribute("href")&&-1===t.getAttribute("href").indexOf("#")&&"_blank"!==t.getAttribute("target")){e.preventDefault();const n=t.href;u().then(()=>{window.location.href=n})}};a.set("click",e),document.addEventListener("click",e);const t=e=>{e.persisted&&window.location.reload()};a.set("pageshow",t),window.addEventListener("pageshow",t)}const f=()=>{t&&(t.style.display="none")};if(a.set("resize",f),window.addEventListener("resize",f),!s){const e=async()=>{n()&&(l=setTimeout(()=>{t.classList.add(h.classes.loading)},2e3),await r(),l&&(clearTimeout(l),l=null),t.classList.remove(h.classes.loading),t.classList.add(h.classes.loaded)),d()};a.set(`${g}:dom-ready`,e),window.addEventListener(`${g}:dom-ready`,e,{once:!0})}return{result:"transition initialized",destroy:()=>{i&&clearTimeout(i),l&&clearTimeout(l),a.forEach((e,t)=>{if("click"===t||"pageshow"===t||"resize"===t){("click"===t?document:window).removeEventListener(t,e)}else window.removeEventListener(t,e)}),a.clear(),t.removeAttribute(o)}}}async function b(t){let n=null,r=null;function a(n){const r=n.target.closest('a[href^="#"]');if(!r)return;const a=r.getAttribute("href");if(!a||"#"===a)return;const i=a.substring(1),l=document.getElementById(i);if(l){n.preventDefault(),history.replaceState&&history.replaceState(null,null,`#${l.id}`);!function(e,t=0){if(!e)return;const n=o("smooth-scroll",!1);if(s()||!n){const n=e.getBoundingClientRect().top+window.scrollY-t;return window.scrollTo(0,n),e.setAttribute("tabindex","-1"),void e.focus({preventScroll:!0})}n.gsap.to(window,{duration:1,scrollTo:{y:e,offsetY:t},ease:"power2.out",onComplete:function(){e.setAttribute("tabindex","-1"),e.focus({preventScroll:!0})}})}(l,function(){const n=e(t,"offset-proxy");if(console.log("[smooth-scroll] Proxy element:",n),n&&n instanceof HTMLElement){const e=getComputedStyle(n).top,t=parseFloat(e)||0;return console.log("[smooth-scroll] Computed top:",e,"-> offset:",t),t}return console.log("[smooth-scroll] No proxy element found, using offset: 0"),0}())}}return"undefined"!=typeof $&&$(document).off("click.wf-scroll"),document.documentElement.style.scrollBehavior="auto",document.body.style.scrollBehavior="auto",n=a,r=e=>{"Enter"!==e.key&&" "!==e.key||a(e)},document.addEventListener("click",n),document.addEventListener("keydown",r),{result:"autoInit-smooth-scroll initialized",destroy:()=>{n&&(document.removeEventListener("click",n),n=null),r&&(document.removeEventListener("keydown",r),r=null),document.documentElement.style.scrollBehavior="",document.body.style.scrollBehavior=""}}}let w=null;function E(t){w=t;const n={observers:[],handlers:[]};return function(t,n){const r=a(w,"wrapper"),o=[];r.forEach(r=>{const s=i(l.clickable,"button"),a=r.querySelector(s),d=e(w,"list",r);if(!a||!d)return void console.warn("[dropdown] Dropdown wrapper missing required elements:",r);const p=r.getAttribute("data-hs-nav-dropdown-type")||"hover",m=r.querySelector('[data-hs-height="element"]'),f=m?m.parentElement:null,h=a.textContent?.trim()||"dropdown",v=h.toLowerCase().replace(/[^a-z0-9\s]/g,"").replace(/\s+/g,"-").replace(/^-+|-+$/g,"").substring(0,50);const g=`navbar-dropdown-${v}-toggle`,y=`navbar-dropdown-${v}-list`;a.id=g,a.setAttribute("aria-haspopup","menu"),a.setAttribute("aria-expanded","false"),a.setAttribute("aria-controls",y),d.id=y,d.setAttribute("role","menu"),d.inert=!0;const b=Array.from(d.querySelectorAll(s));b.forEach((e,t)=>{if(e.setAttribute("role","menuitem"),e.setAttribute("tabindex","-1"),0===t){const t=a.textContent?.trim()||"menu";e.getAttribute("aria-label")||e.setAttribute("aria-label",`${e.textContent?.trim()}, ${t} submenu`)}});let E=-1;function A(){return r.classList.contains(l.classes.active)}function L(){const e=A();"true"===a.getAttribute("aria-expanded")&&!e&&d.contains(document.activeElement)&&a.focus(),a.setAttribute("aria-expanded",e?"true":"false"),d.inert=!e,b.forEach(t=>{t.setAttribute("tabindex",e?"0":"-1")}),e||(E=-1),u(f,e,{duration:"hover"===p?200:300,ease:"power2.inOut"})}c(f,A()),L();const k=new MutationObserver(()=>{L()});if(k.observe(r,{attributes:!0,attributeFilter:["class"]}),t(k),"hover"===p){o.push(r);const e=()=>{r.classList.add("is-active")},t=()=>{r.classList.remove("is-active")};n(r,"mouseenter",e),n(r,"mouseleave",t);n(a,"keydown",e=>{"ArrowDown"===e.key?(e.preventDefault(),A()||(r.classList.add(l.classes.active),b.length>0&&setTimeout(()=>{E=0,b[0].focus()},100))):" "===e.key||"Enter"===e.key?(e.preventDefault(),A()?r.classList.remove(l.classes.active):(r.classList.add(l.classes.active),b.length>0&&setTimeout(()=>{E=0,b[0].focus()},100))):"ArrowUp"===e.key?(e.preventDefault(),A()||(r.classList.add(l.classes.active),b.length>0&&setTimeout(()=>{E=b.length-1,b[E].focus()},100))):"Escape"===e.key&&(e.preventDefault(),A()&&r.classList.remove(l.classes.active))});const s=e=>{A()&&r.contains(document.activeElement)&&("ArrowDown"===e.key?(e.preventDefault(),E<b.length-1&&(E++,b[E].focus())):"ArrowUp"===e.key?(e.preventDefault(),0===E?(r.classList.remove(l.classes.active),a.focus(),E=-1):E>0?(E--,b[E].focus()):(a.focus(),E=-1)):"Escape"===e.key&&(e.preventDefault(),r.classList.remove("is-active")))};n(r,"keydown",s)}else if("click"===p){n(a,"click",e=>{e.preventDefault(),r.classList.toggle(l.classes.active)});n(a,"keydown",e=>{" "===e.key||"Enter"===e.key?(e.preventDefault(),r.classList.toggle(l.classes.active)):"Escape"===e.key&&(e.preventDefault(),A()&&r.classList.remove(l.classes.active))})}});const s=e=>{o.forEach(t=>{t.classList.contains("is-active")&&!t.contains(e.target)&&t.classList.remove("is-active")})};o.length>0&&n(document.body,"focusin",s)}(e=>{n.observers.push(e)},(e,t,r,o)=>{e.addEventListener(t,r,o),n.handlers.push({element:e,event:t,handler:r,options:o})}),{result:"dropdown initialized",destroy:()=>{n.observers.forEach(e=>e.disconnect()),n.observers.length=0,n.handlers.forEach(({element:e,event:t,handler:n,options:r})=>{e.removeEventListener(t,n,r)}),n.handlers.length=0,w=null}}}function A(t,n){const r={observers:[],handlers:[],state:{focusTrapHandler:null}},o=e=>{r.observers.push(e)};return function(o,s){const m=a(t,"button"),f=e(t,"wrapper");if(!m.length||!f)return;const h=n?e(n,"wrapper"):null,v=`menu-${Date.now()}`;f.id=v,f.setAttribute("role","dialog"),f.setAttribute("aria-modal","true"),f.inert=!0;const g=f.querySelector('[data-hs-height="element"]'),y=g?g.parentElement:null;m.forEach(t=>{t.setAttribute("aria-expanded","false"),t.setAttribute("aria-controls",v),t.setAttribute("aria-label","Open navigation menu");let a=null,g=!1;function b(){return t.classList.contains(l.classes.active)}function w(){const r=b(),o="true"===t.getAttribute("aria-expanded");r&&!o?(d(),f.classList.add(l.classes.active),f.inert=!1,h&&h.classList.add("hs-menu-open"),m.forEach(e=>{e.setAttribute("aria-expanded","true"),e.setAttribute("aria-label","Close navigation menu")}),y&&u(y,!0,{duration:300,ease:"power2.inOut"}),a=function(){const t=n?e(n,"wrapper"):document.querySelector('[data-hs-nav="wrapper"]');if(!t)return;const r=e=>{if("Tab"===e.key){const n=i(l.clickable,"button"),r=Array.from(t.querySelectorAll(n)),o=t.querySelectorAll('input, select, textarea, [tabindex]:not([tabindex="-1"])'),s=[...r,...Array.from(o)],a=s[0],c=s[s.length-1];e.shiftKey?document.activeElement===a&&(e.preventDefault(),c.focus()):document.activeElement===c&&(e.preventDefault(),a.focus())}};return document.addEventListener("keydown",r),r}(),g&&(setTimeout(()=>{const e=i(l.clickable,"button"),t=Array.from(f.querySelectorAll(e));if("last"===g){const e=t[t.length-1];e&&e.focus()}else{const e=t[0];e&&e.focus()}},100),g=!1)):!r&&o&&(f.contains(document.activeElement)&&t.focus(),p(),f.classList.remove(l.classes.active),f.inert=!0,h&&h.classList.remove("hs-menu-open"),m.forEach(e=>{e.setAttribute("aria-expanded","false"),e.setAttribute("aria-label","Open navigation menu")}),y&&u(y,!1,{duration:300,ease:"power2.inOut"}),function(e){e&&document.removeEventListener("keydown",e)}(a),a=null)}y&&c(y,b()),w();const E=new MutationObserver(()=>{w()});E.observe(t,{attributes:!0,attributeFilter:["class"]}),o(E);s(t,"click",function(e){e.preventDefault(),t.classList.toggle("is-active")});s(t,"keydown",function(e){" "===e.key||"Enter"===e.key?(e.preventDefault(),g=!0,t.classList.toggle(l.classes.active)):"ArrowDown"===e.key?(e.preventDefault(),b()||(g=!0,t.classList.add(l.classes.active))):"ArrowUp"===e.key?(e.preventDefault(),b()||(g="last",t.classList.add(l.classes.active))):"Escape"===e.key&&(e.preventDefault(),b()&&t.classList.remove(l.classes.active))}),r.state.focusTrapHandler=a})}(o,(e,t,n,o)=>{e.addEventListener(t,n,o),r.handlers.push({element:e,event:t,handler:n,options:o})}),function(n){const r=e(t,"wrapper");if(!r)return;let o=null;function s(){const e=window.getComputedStyle(r).getPropertyValue(m.state).trim();if(o===l.cssVars.state.values.active&&e===l.cssVars.state.values.inactive){const e=document.querySelector('[data-hs-nav-menu="button"]');e&&"true"===e.getAttribute("aria-expanded")&&e&&e.classList.remove("is-active")}o=e}const a=new ResizeObserver(s);a.observe(r),n(a),s()}(o),{result:"menu initialized",destroy:()=>{r.state.focusTrapHandler&&(document.removeEventListener("keydown",r.state.focusTrapHandler),r.state.focusTrapHandler=null),r.observers.forEach(e=>e.disconnect()),r.observers.length=0,r.handlers.forEach(({element:e,event:t,handler:n,options:r})=>{e.removeEventListener(t,n,r)}),r.handlers.length=0,document.body.classList.remove("u-overflow-hidden")}}}function L(t,n){const r={handlers:[]},o=(e,t,n,o)=>{e.addEventListener(t,n,o),r.handlers.push({element:e,event:t,handler:n,options:o})};return o(document,"keydown",t=>{if("ArrowLeft"!==t.key&&"ArrowRight"!==t.key)return;const r=n?e(n.menu,"wrapper"):document.querySelector('[data-hs-nav-menu="wrapper"]');if(r&&r.contains(document.activeElement))return;const o=n?e(n,"wrapper"):document.querySelector('[data-hs-nav="wrapper"]');if(!o||!o.contains(document.activeElement))return;const s=o.querySelector(`.${l.classes.active}[data-hs-nav-dropdown]`);if(s&&s.contains(document.activeElement))return;t.preventDefault();const a=i(l.clickable,"button"),c=Array.from(o.querySelectorAll(a)),u=Array.from(c).filter(e=>{if("-1"===e.getAttribute("tabindex"))return!1;if(e.closest('[role="menu"]'))return!1;const t=n?n.menu.attributes.elements.wrapper.primary.split("=")[0]:"data-hs-nav-menu";if(e.closest(`[${t}="wrapper"]`))return!1;const r=n?n.attributes.elements["skip-link"].primary.split("=")[0]:"data-hs-nav";if(e.closest(`[${r}="skip-link"]`))return!1;const s=window.getComputedStyle(e),a=e;if("none"===s.display||"hidden"===s.visibility||"0"===s.opacity||0===a.offsetWidth||0===a.offsetHeight)return!1;let i=e.parentElement;for(;i&&i!==o;){const e=window.getComputedStyle(i),t=i;if("none"===e.display||"hidden"===e.visibility||0===t.offsetWidth||0===t.offsetHeight)return!1;i=i.parentElement}return!0}),d=u.indexOf(document.activeElement);-1!==d&&("ArrowRight"===t.key?d<u.length-1&&u[d+1].focus():d>0&&u[d-1].focus())}),function(t){const r=n?e(n.menu,"wrapper"):document.querySelector('[data-hs-nav-menu="wrapper"]');if(!r)return;let o=-1;t(r,"keydown",t=>{const s=function(){const e=i(l.clickable,"button"),t=Array.from(r.querySelectorAll(e));return Array.from(t).filter(e=>{let t=e;for(;t&&t!==r;){if(t.inert)return!1;t=t.parentElement}return!0})}();if(0===s.length)return;const a=document.activeElement;if(o=s.indexOf(a),"ArrowDown"===t.key)t.preventDefault(),o<s.length-1&&(o+=1,s[o].focus());else if("ArrowUp"===t.key)t.preventDefault(),o>0&&(o-=1,s[o].focus());else if("ArrowRight"===t.key){if(t.preventDefault(),a&&"BUTTON"===a.tagName&&a.hasAttribute("aria-controls")){return void("true"===a.getAttribute("aria-expanded")||a.click())}}else if("ArrowLeft"===t.key){if(t.preventDefault(),a&&"BUTTON"===a.tagName&&a.hasAttribute("aria-controls")){return void("true"===a.getAttribute("aria-expanded")&&a.click())}}else if("Home"===t.key)t.preventDefault(),o=0,s[0].focus();else if("End"===t.key)t.preventDefault(),o=s.length-1,s[s.length-1].focus();else if(" "===t.key&&a&&"A"===a.tagName)t.preventDefault();else if("Escape"===t.key){const t=n?e(n.menu,"button"):document.querySelector('[data-hs-nav-menu="button"]');t&&(t.click(),t.focus())}})}(o),{result:"arrow-navigation initialized",destroy:()=>{r.handlers.forEach(({element:e,event:t,handler:n,options:r})=>{e.removeEventListener(t,n,r)}),r.handlers.length=0}}}async function k(e){const t={destroyFunctions:[]},n=await Promise.allSettled([E(e.dropdown),A(e.menu,e),L(e["arrow-navigation"],e)]);n.forEach(e=>{"fulfilled"===e.status&&e.value?.destroy&&t.destroyFunctions.push(e.value.destroy)});const r=n.filter(e=>"fulfilled"===e.status).length,o=n.length-r;return o>0&&console.warn(`[navbar] ${r}/${n.length} functions loaded successfully. ${o} failed but won't affect other functions.`),{result:"navbar initialized",destroy:()=>{t.destroyFunctions.forEach(e=>{try{e()}catch(t){console.error("[navbar] Error during cleanup:",t)}}),t.destroyFunctions.length=0}}}function S(t){const n={observers:[],handlers:[]};return function(n,r){const o=a(t,"wrapper");if(0===o.length)return 0;let s=0;o.forEach((o,a)=>{const d=e(t,"toggle",o),p=e(t,"content",o);if(!d||!p)return;s++;const m=`[${l.attributes.height}="${l.attributes.heightValue}"]`,f=o.querySelector(m),h=f?f.parentElement:p,v=`hs-accordion-btn-${a}`,g=`hs-accordion-content-${a}`,y=o.getAttribute(t.attributes.properties.open),b=o.getAttribute(t.attributes.properties.closed),w=y&&b;let E=[];if(w){const e=i(t,"state");E=Array.from(d.querySelectorAll(e))}function A(){return o.classList.contains(l.classes.active)}function L(){const e=A();if("true"===d.getAttribute("aria-expanded")&&!e&&p.contains(document.activeElement)){d.focus()}d.setAttribute("aria-expanded",e?"true":"false");var t;p.inert=!e,w&&E.length>0&&(t=e?y:b,w&&E.forEach(e=>{e.textContent=t})),u(h,e,{duration:300,ease:"power2.inOut"})}d.setAttribute("id",v),p.setAttribute("id",g),p.setAttribute("role","region"),p.setAttribute("aria-labelledby",v),d.setAttribute("aria-controls",g);const k=o.getAttribute(t.attributes.properties.default);k&&"open"===k.toLowerCase()&&o.classList.add(l.classes.active),c(h,A()),L();r(d,"click",e=>{e.preventDefault(),o.classList.toggle(l.classes.active)});const S=new MutationObserver(()=>{L()});S.observe(o,{attributes:!0,attributeFilter:["class"]}),n(S)})}(e=>n.observers.push(e),(e,t,r,o)=>{e.addEventListener(t,r,o),n.handlers.push({element:e,event:t,handler:r,options:o})}),{result:"accordion initialized",destroy:()=>{n.observers.forEach(e=>e.disconnect()),n.observers.length=0,n.handlers.forEach(({element:e,event:t,handler:n,options:r})=>{e.removeEventListener(t,n,r)}),n.handlers.length=0}}}function x(e){const n=t._global.classes.active,r={observers:[],handlers:[],scrollTimeout:null,headings:[]},o=a(e,"content"),s=a(e,"list");return o.forEach(e=>{const t=s[0];if(!t||0===t.children.length)return;const o=t.children[0].cloneNode(!0),a=o.querySelector("a");a&&a.classList.remove(n),t.innerHTML="";const i=e.querySelectorAll("h2");i.forEach(e=>{const t=e.textContent.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"");e.id=t,r.headings.push(e)}),i.forEach((e,n)=>{const r=o.cloneNode(!0),s=r.querySelector("a"),a=e.id;s.href=`#${a}`;const i=document.createElement("strong");i.textContent=`${n+1}. `,s.innerHTML="",s.appendChild(i),s.appendChild(document.createTextNode(e.textContent)),t.appendChild(r)});const l=t.querySelectorAll("a");let c=null;const u=()=>{const e=.75*window.innerHeight;let t=null;for(let n=i.length-1;n>=0;n--){if(i[n].getBoundingClientRect().top<=e){t=i[n].id;break}}if(t!==c&&(c=t,l.forEach(e=>e.classList.remove(n)),c)){const e=Array.from(l).find(e=>e.getAttribute("href")===`#${c}`);e&&e.classList.add(n)}},d=new IntersectionObserver(()=>{u()},{rootMargin:"-75% 0px -25% 0px",threshold:0});i.forEach(e=>d.observe(e)),(e=>{r.observers.push(e)})(d);var p,m,f;p=window,m="scroll",f=()=>{r.scrollTimeout&&clearTimeout(r.scrollTimeout),r.scrollTimeout=setTimeout(u,50)},p.addEventListener(m,f),r.handlers.push({element:p,event:m,handler:f})}),{result:"toc initialized",destroy:()=>{r.headings.forEach(e=>{e.removeAttribute("id")}),r.headings.length=0,r.observers.forEach(e=>e.disconnect()),r.observers.length=0,r.handlers.forEach(({element:e,event:t,handler:n})=>{e.removeEventListener(t,n)}),r.handlers.length=0,r.scrollTimeout&&(clearTimeout(r.scrollTimeout),r.scrollTimeout=null)}}}async function T(){const n=t.default.toc,r={destroyFunctions:[]},l=i(n,"list");if(document.querySelector(l))try{const e=await x(n);e?.destroy&&r.destroyFunctions.push(e.destroy)}catch(u){console.error("[toc] Error initializing heading-links:",u)}const c=i(n["progress-bar"],"wrapper");if(document.querySelector(c))try{const t=await async function(t){const{progressConfig:n,tocConfig:r}=t;if(s())return{result:"progress-bar skipped - prefers-reduced-motion enabled"};const i=o("progress-bar");if(!i)return{result:"progress-bar skipped - GSAP not loaded"};const{gsap:l,ScrollTrigger:c}=i;if(!c)return console.warn("[progress-bar] GSAP ScrollTrigger plugin not loaded"),{result:"progress-bar skipped - ScrollTrigger not loaded"};l.registerPlugin(c);const u={scrollTriggers:[]},d=e(r,"content");if(!d)return{result:"progress-bar skipped - no content element found"};const p=a(n,"wrapper");return 0===p.length?{result:"progress-bar skipped - no wrapper elements found"}:(p.forEach(e=>{l.set(e,{display:"block"}),Array.from(e.querySelectorAll("*")).filter(e=>{const t=n.attributes.elements.element.primary,[r,o]=t.split("="),s=o?.replace(/['"]/g,"");return e.getAttribute(r)===s}).forEach(e=>{l.set(e,{width:"0%"}),l.to(e,{width:"100%",ease:"none",scrollTrigger:{trigger:d,start:"top bottom",end:"bottom 75%",scrub:!0,invalidateOnRefresh:!0,onUpdate:e=>{u.scrollTriggers.includes(e)||u.scrollTriggers.push(e)}}})})}),{result:`progress-bar initialized (${p.length} instances)`,destroy:()=>{u.scrollTriggers.forEach(e=>{e&&"object"==typeof e&&"kill"in e&&"function"==typeof e.kill&&e.kill()}),u.scrollTriggers.length=0}})}({progressConfig:n["progress-bar"],tocConfig:n});t?.destroy&&r.destroyFunctions.push(t.destroy)}catch(u){console.error("[toc] Error initializing progress-bar:",u)}return{result:`toc initialized (${r.destroyFunctions.length} modules active)`,destroy:()=>{r.destroyFunctions.forEach(e=>{try{e()}catch(u){console.error("[toc] Error during cleanup:",u)}}),r.destroyFunctions.length=0}}}function C(t){const n={observers:[],handlers:[],liveRegions:[]};try{a(t,"wrapper").forEach(r=>{try{const o=function(t,n,r){const o=e(r,"list",t);if(!o)return console.warn("[pagination] Missing required element: list"),null;const s=o.parentElement;if(!s)return null;const a={controls:e(r,"controls",t),counter:e(r,"counter",t),dotsWrap:e(r,"dots",t),nextButton:null,prevButton:null};if(!a.controls)return{initialized:!1};const c=e(r,"next",t),u=e(r,"previous",t),d=i(l.clickable,"button"),p=c?.querySelector(d)||c,f=u?.querySelector(d)||u;if(!p||!f)return console.warn("[pagination] Missing required navigation buttons"),null;a.nextButton=p,a.prevButton=f,a.nextButton.setAttribute("aria-label","Go to next page"),a.prevButton.setAttribute("aria-label","Go to previous page"),a.counter&&(a.counter.setAttribute("aria-live","polite"),a.counter.setAttribute("aria-label","Current page"));const h=parseInt(a.controls?.getAttribute(r.attributes.properties.show)||"6")||6,v=parseInt(a.controls?.getAttribute(r.attributes.properties.showMobile)||String(h))||h,g=()=>getComputedStyle(o).getPropertyValue(m.state).trim()===l.cssVars.state.values.active,y=Array.from(o.children),b=y.length;if(!b)return null;const w={totalPages:1,currentIndex:1,currentPage:1,isAnimating:!1,itemsPerPage:h,dotTemplates:{active:null,inactive:null}};let E=[];const A=document.createElement("div");A.className="sr-only",A.setAttribute("aria-live","assertive"),A.setAttribute("aria-atomic","true"),A.style.cssText="position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden;",t.appendChild(A),n.liveRegions.push(A);const L=()=>{a.counter&&(a.counter.textContent=`${w.currentPage} / ${w.totalPages}`)},k=()=>{A.textContent=`Page ${w.currentPage} of ${w.totalPages}`,setTimeout(()=>A.textContent="",1e3)},S=()=>{E.forEach((e,t)=>{const n=e;t===w.currentIndex?n.removeAttribute("inert"):n.setAttribute("inert","")})},x=()=>{const e=E[w.currentIndex];e&&void 0!==e.offsetHeight&&(s.style.height=e.offsetHeight+"px")},T=()=>{if(!a.dotsWrap)return;const e=Array.from(a.dotsWrap.children);if(!e.length)return;const t=e.find(e=>e.classList.contains("is-active")),r=e.find(e=>!e.classList.contains("is-active"));w.dotTemplates.active=t?t.cloneNode(!0):e[0].cloneNode(!0),w.dotTemplates.inactive=r?r.cloneNode(!0):e[0].cloneNode(!0),a.dotsWrap.innerHTML="",a.dotsWrap.setAttribute("role","group"),a.dotsWrap.setAttribute("aria-label","Page navigation");for(let o=1;o<=w.totalPages;o++){const e=(1===o?w.dotTemplates.active:w.dotTemplates.inactive).cloneNode(!0);e.setAttribute("role","button"),e.setAttribute("tabindex","0"),e.setAttribute("aria-label",`Go to page ${o}`),e.setAttribute("aria-current",1===o?"page":"false"),e.setAttribute("data-page",String(o)),1===o?e.classList.add("is-active"):e.classList.remove("is-active");const t=()=>$(o);e.addEventListener("click",t),n.handlers.push({element:e,event:"click",handler:t});const r=e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),$(o))};e.addEventListener("keydown",r),n.handlers.push({element:e,event:"keydown",handler:r}),a.dotsWrap.appendChild(e)}},C=()=>{if(!a.dotsWrap)return;Array.from(a.dotsWrap.children).forEach((e,t)=>{t+1===w.currentPage?(e.classList.add("is-active"),e.setAttribute("aria-current","page")):(e.classList.remove("is-active"),e.setAttribute("aria-current","false"))})},q=(e=null)=>{const t=g();if(w.itemsPerPage=e||(t?v:h),w.totalPages=Math.ceil(b/w.itemsPerPage),a.dotsWrap&&(n.handlers=n.handlers.filter(({element:e})=>!a.dotsWrap.contains(e))),Array.from(s.children).forEach(e=>{e!==o&&s.removeChild(e)}),o.innerHTML="",y.forEach(e=>o.appendChild(e)),w.totalPages<=1)return a.controls&&(a.controls.contains(document.activeElement)&&document.activeElement&&document.activeElement.blur(),a.controls.style.display="none",a.controls.setAttribute("aria-hidden","true")),a.dotsWrap&&(a.dotsWrap.style.display="none",a.dotsWrap.setAttribute("aria-hidden","true")),Object.assign(w,{totalPages:1,currentIndex:1,currentPage:1,isAnimating:!1}),s.style.cssText=`transform: translateX(0%); height: ${o.offsetHeight}px;`,E=[o],1;a.controls&&(a.controls.style.display="",a.controls.removeAttribute("aria-hidden")),a.dotsWrap&&(a.dotsWrap.style.display="",a.dotsWrap.removeAttribute("aria-hidden"));const r=Array.from({length:w.totalPages},(e,t)=>{const n=o.cloneNode(!1),r=t*w.itemsPerPage,s=Math.min(r+w.itemsPerPage,b);return y.slice(r,s).forEach(e=>n.appendChild(e.cloneNode(!0))),n});return s.insertBefore(r[r.length-1].cloneNode(!0),o),r.slice(1).forEach(e=>s.appendChild(e)),s.appendChild(r[0].cloneNode(!0)),o.innerHTML="",Array.from(r[0].children).forEach(e=>o.appendChild(e)),Object.assign(w,{currentIndex:1,currentPage:1,isAnimating:!1}),E=Array.from(s.children),s.style.transition="none",s.style.transform="translateX(-100%)",s.offsetHeight,s.style.transition="",L(),x(),S(),T(),w.totalPages};let P=g();const D=new ResizeObserver(()=>{if(w.isAnimating)return;const e=g();e!==P?(P=e,q()):x()});D.observe(s),n.observers.push(D),q();const $=e=>{if(w.isAnimating||w.totalPages<=1||e===w.currentPage)return;w.isAnimating=!0,w.currentIndex=e,w.currentPage=e,L(),k(),x(),C(),g()&&a.controls&&setTimeout(()=>{const e=80,t=a.controls.getBoundingClientRect().bottom+window.pageYOffset-window.innerHeight+e;window.scrollTo({top:t,behavior:"smooth"})},50),s.style.transform=`translateX(${100*-w.currentIndex}%)`;let t=null;const n=()=>{clearTimeout(t),s.removeEventListener("transitionend",n),L(),k(),x(),S(),C(),w.isAnimating=!1};t=setTimeout(n,1e3),s.addEventListener("transitionend",n)},I=e=>{if(w.isAnimating||w.totalPages<=1)return;w.isAnimating=!0,w.currentIndex+=e,w.currentPage=w.currentIndex>w.totalPages?1:w.currentIndex<1?w.totalPages:w.currentIndex,L(),k(),x(),C(),g()&&a.controls&&setTimeout(()=>{const e=80,t=a.controls.getBoundingClientRect().bottom+window.pageYOffset-window.innerHeight+e;window.scrollTo({top:t,behavior:"smooth"})},50),s.style.transform=`translateX(${100*-w.currentIndex}%)`;let t=null;const n=()=>{clearTimeout(t),s.removeEventListener("transitionend",n),w.currentIndex>w.totalPages?(w.currentIndex=1,w.currentPage=1,s.style.transition="none",s.style.transform="translateX(-100%)",s.offsetHeight,s.style.transition=""):w.currentIndex<1&&(w.currentIndex=w.totalPages,w.currentPage=w.totalPages,s.style.transition="none",s.style.transform=`translateX(${100*-w.totalPages}%)`,s.offsetHeight,s.style.transition=""),L(),k(),x(),S(),C(),w.isAnimating=!1};t=setTimeout(n,1e3),s.addEventListener("transitionend",n)},M=()=>I(1),F=()=>I(-1);return a.nextButton.addEventListener("click",M),a.prevButton.addEventListener("click",F),n.handlers.push({element:a.nextButton,event:"click",handler:M},{element:a.prevButton,event:"click",handler:F}),{initialized:!0}}(r,n,t);o||console.warn("[pagination] Failed to initialize container",r)}catch(o){console.error("[pagination] Error initializing container:",o,r)}})}catch(r){console.error("[pagination] Critical error during initialization:",r)}return{result:"pagination initialized",destroy:()=>{try{n.liveRegions.forEach(e=>{try{e.parentNode&&e.parentNode.removeChild(e)}catch(r){console.error("[pagination] Error removing live region:",r)}}),n.liveRegions.length=0,n.observers.forEach(e=>{try{e.disconnect()}catch(r){console.error("[pagination] Error disconnecting observer:",r)}}),n.observers.length=0,n.handlers.forEach(({element:e,event:t,handler:n})=>{try{e.removeEventListener(t,n)}catch(r){console.error("[pagination] Error removing event listener:",r)}}),n.handlers.length=0}catch(r){console.error("[pagination] Critical error during cleanup:",r)}}}}async function q(t){const n=o("comparison");if(!n)return{result:"comparison skipped - GSAP not loaded"};const{gsap:r,Draggable:s}=n;f("comparison",["Draggable"],"error");const c=a(t,"wrapper"),u={draggables:[],handlers:[],observers:[]},d=i(t,"template-name"),p=i(t,"template-description"),h=i(t,"template-before-image"),v=i(t,"template-after-image");function g(e,t){e.style.setProperty(m.clip,`${t}%`)}function y(n,r){const o=n.templateItems[r];if(!o)return;const s=o.querySelector(d);n.nameElement&&s&&(n.nameElement.textContent=s.textContent);const a=o.querySelector(p);n.descElement&&a&&(n.descElement.textContent=a.textContent);const i=o.querySelector(h);n.beforeImage&&i&&(n.beforeImage.src=i.src,n.beforeImage.alt=i.alt||"");const c=o.querySelector(v);n.afterImage&&c&&(n.afterImage.src=c.src,n.afterImage.alt=c.alt||"",b(n)),n.currentIndex=r,function(n,r){const o=e(t,"pagination",n);if(!o)return;const s=l.classes.active;Array.from(o.children).forEach((e,t)=>{t===r?e.classList.add(s):e.classList.remove(s)})}(n.wrapper,r)}function b(e){const t=e.slider,n=e.wrapper;switch(e.mode){case"before":n.style.setProperty(m.clip,"100%"),t.style.display="none";break;case"after":n.style.setProperty(m.clip,"0%"),t.style.display="none";break;case"split":g(n,e.sliderPosition),t.style.display="flex"}}function w(e,t){const n=e.currentIndex+t,r=e.templateItems.length-1;let o;o=n>r?0:n<0?r:n,y(e,o)}return c.forEach(n=>{const o=e(t,"template-list",n);if(!o)return void console.warn("[comparison] No template list found in wrapper");const a=i(t,"template-item"),c=Array.from(o.querySelectorAll(a));if(0===c.length)return void console.warn("[comparison] No template items found");n.setAttribute("aria-live","polite"),n.setAttribute("aria-label","Before and after image comparison");const d=e(t,"image-wrapper",n),p=e(t,"slider",n),m=e(t,"before-image",n),f=e(t,"after-image",n),h=e(t,"name",n),v=e(t,"description",n);if(!d||!p||!f){const e=[];return d||e.push('image-wrapper (data-hs-comparison="image-wrapper")'),p||e.push('slider (data-hs-comparison="slider")'),f||e.push('after-image (data-hs-comparison-image="after")'),void console.warn(`[comparison] Missing required elements: ${e.join(", ")}`)}const E={wrapper:n,templateItems:c,currentIndex:0,mode:"split",sliderPosition:50,slider:p,beforeImage:m?.querySelector("img"),afterImage:f?.querySelector("img"),nameElement:h,descElement:v,draggable:null};if(y(E,0),g(n,50),s){const e=s.create(p,{type:"x",bounds:d,onDrag:function(){const e=d.getBoundingClientRect(),t=p.getBoundingClientRect().left-e.left,r=Math.max(0,Math.min(100,t/e.width*100));g(n,r),E.sliderPosition=r}});u.draggables.push(e),E.draggable=e[0];const t=new ResizeObserver(()=>{E.draggable&&E.draggable.update()});t.observe(d),u.observers=u.observers||[],u.observers.push(t);[E.beforeImage,E.afterImage].filter(Boolean).forEach(e=>{e instanceof HTMLImageElement&&!e.complete&&e.addEventListener("load",()=>{E.draggable&&E.draggable.update()},{once:!0})});const o=e=>{if("split"!==E.mode)return;const t=d.getBoundingClientRect(),o=e.clientX-t.left,s=Math.max(0,Math.min(100,o/t.width*100)),a=o-t.width/2;E.draggable&&(r.set(p,{x:a}),E.draggable.update()),g(n,s),E.sliderPosition=s};d.addEventListener("click",o),u.handlers.push({element:d,event:"click",handler:o})}n.querySelectorAll(`[${t.attributes.properties.modeType}]`).forEach(e=>{const n=e.getAttribute(t.attributes.properties.modeType),r=i(l.clickable,"button"),o=e.querySelector(r)||e;n===E.mode&&e.classList.add(l.classes.active);const s=e=>{e.preventDefault(),function(e,n){const r=e.wrapper.querySelectorAll(`[${t.attributes.properties.modeType}]`),o=l.classes.active;r.forEach(e=>{e.getAttribute(t.attributes.properties.modeType)===n?e.classList.add(o):e.classList.remove(o)}),e.mode=n,b(e)}(E,n)};o.addEventListener("click",s),u.handlers.push({element:o,event:"click",handler:s})}),function(e,n){const r=n.querySelector(`[${t.attributes.properties.navType}="previous"]`),o=n.querySelector(`[${t.attributes.properties.navType}="next"]`);if(r){const t=i(l.clickable,"button"),n=r.querySelector(t)||r;n.setAttribute("aria-label","Previous image");const o=t=>{t.preventDefault(),w(e,-1)};n.addEventListener("click",o),u.handlers.push({element:n,event:"click",handler:o})}if(o){const t=i(l.clickable,"button"),n=o.querySelector(t)||o;n.setAttribute("aria-label","Next image");const r=t=>{t.preventDefault(),w(e,1)};n.addEventListener("click",r),u.handlers.push({element:n,event:"click",handler:r})}}(E,n);const A=e(t,"pagination",n);A&&c.length>1&&function(e,t){const n=t.children[0];if(!n)return;const r=l.classes.active;t.innerHTML="",e.templateItems.forEach((o,s)=>{const a=n.cloneNode(!0);a.classList.remove(r),0===s&&a.classList.add(r);const i=()=>{y(e,s)};a.addEventListener("click",i),u.handlers.push({element:a,event:"click",handler:i}),t.appendChild(a)})}(E,A),function(e){const t=t=>{"ArrowLeft"===t.key||"ArrowUp"===t.key?(t.preventDefault(),w(e,-1)):"ArrowRight"!==t.key&&"ArrowDown"!==t.key||(t.preventDefault(),w(e,1))};e.wrapper.addEventListener("keydown",t),e.wrapper.setAttribute("tabindex","0"),u.handlers.push({element:e.wrapper,event:"keydown",handler:t})}(E)}),{result:`comparison initialized (${c.length} instances)`,destroy:()=>{u.draggables.forEach(e=>{e&&e[0]&&e[0].kill&&e[0].kill()}),u.handlers.forEach(({element:e,event:t,handler:n})=>{e.removeEventListener(t,n)}),u.observers.forEach(e=>e.disconnect()),u.draggables.length=0,u.handlers.length=0,u.observers.length=0}}}function P(t){const n={handlers:[],timers:[],animationFrames:[],observers:[]},r=(e,t,r,o)=>{e.addEventListener(t,r,o),n.handlers.push({element:e,event:t,handler:r,options:o})},c=e=>n.animationFrames.push(e),u=()=>`${l.cssVars.prefix}${t.cssVars?.progress||"progress"}`,d=(e,t)=>e.style.setProperty(u(),String(t));function p(a){const p=e(t,"links",a),m=e(t,"list",a);if(!p||!m)return;const f=Array.from(p.children),h=Array.from(m.children),v=i(l.clickable,"button"),g=f.map(e=>e.querySelector(v)).filter(e=>null!==e);if(0===g.length)return;const y=a.getAttribute(t.attributes.properties?.autoplay||"data-hs-tab-autoplay"),b=a.getAttribute(t.attributes.properties?.duration||"data-hs-tab-duration"),w=a.getAttribute(t.attributes.properties?.hover||"data-hs-tab-hover"),E=a.getAttribute(t.attributes.properties?.animation||"data-hs-tab-animation"),A=a.getAttribute(t.attributes.properties?.animationDuration||"data-hs-tab-animation-duration"),L="true"===y,k=b?parseFloat(b):6,S="pause"===w,x=E,T=A?parseFloat(A):.3,C=`${"hs-tab"}-${Math.random().toString(36).substring(2,9)}`;h.forEach((e,t)=>{const n=e.id||`${C}-panel-${t}`,r=`${C}-tab-${t}`;e.id=n,g[t]&&(g[t].id=r,g[t].setAttribute("aria-controls",n))});let q=0,P=null,D=null,$=null,I=!1,M=!1,F=!1;async function N(e,t=!1){if(M)return;if(e<0||e>=h.length)return;if(e===q&&!t)return;M=!0;const n=q;if(q=e,g.forEach((t,n)=>{t.setAttribute("aria-selected",n===e?"true":"false"),t.setAttribute("tabindex",n===e?"0":"-1")}),f.forEach((t,n)=>{t.classList.toggle(l.classes.active,n===e)}),L)if(I){const t=f[n]?parseFloat(getComputedStyle(f[n]).getPropertyValue(u())||"0"):0;f.forEach((n,r)=>d(n,r===e?t:0))}else O();const r=h[n],a=h[e];"fade"!==x||t?"clip"!==x||t?h.forEach((t,n)=>{n===e?("fade"===x||"clip"===x?(t.style.position="",t.style.display="block","fade"===x?t.style.opacity="1":t.style.clipPath=""):t.style.display="block",t.inert=!1,t.style.pointerEvents="",t.classList.add(l.classes.active)):("fade"===x||"clip"===x?(t.style.display="none","fade"===x?t.style.opacity="0":t.style.clipPath=""):t.style.display="none",t.inert=!0,t.style.pointerEvents="none",t.classList.remove(l.classes.active))}):await async function(e,t,n){s()&&(n=0);const r=o("tabs",!1);if(!r)return e.style.display="none",e.style.position="",e.style.clipPath="",e.inert=!0,e.style.pointerEvents="none",t.style.display="block",t.style.position="",t.style.clipPath="",t.inert=!1,void(t.style.pointerEvents="");const{gsap:a}=r;return new Promise(r=>{const o=a.timeline({onComplete:()=>{e.style.display="none",e.style.position="",e.style.clipPath="",e.inert=!0,e.style.pointerEvents="none",t.style.position="",t.style.clipPath="",t.inert=!1,t.style.pointerEvents="",r()},defaults:{duration:n,ease:"power1.inOut"}});o.set(e,{position:"absolute",top:0,left:0,width:"100%",clipPath:"inset(0% 0% 0% 0%)"}),o.set(t,{display:"block",position:"relative",clipPath:"inset(0% 0% 100% 0%)"}),o.to(e,{clipPath:"inset(100% 0% 0% 0%)"}),o.to(t,{clipPath:"inset(0% 0% 0% 0%)"},"<40%")})}(r,a,T):await async function(e,t,n){s()&&(n=0);const r=o("tabs",!1);if(!r)return e.style.display="none",e.style.position="",e.inert=!0,e.style.pointerEvents="none",t.style.display="block",t.style.position="",t.inert=!1,void(t.style.pointerEvents="");const{gsap:a}=r;return new Promise(r=>{const o=a.timeline({onComplete:()=>{e.style.display="none",e.style.position="",e.style.opacity="",e.inert=!0,e.style.pointerEvents="none",t.style.position="",t.style.opacity="",t.inert=!1,t.style.pointerEvents="",r()},defaults:{duration:n,ease:"power1.out"}});o.set(e,{position:"absolute",top:0,left:0,width:"100%"}),o.set(t,{display:"block",position:"relative",opacity:0}),o.to(e,{opacity:0}),o.to(t,{opacity:1},"<50%")})}(r,a,T),M=!1}function H(e){if(L){$||($=e);const t=Math.min((e-$)/(1e3*k),1);f.forEach((e,n)=>d(e,n===q?t:0)),t<1&&!I&&(D=requestAnimationFrame(H),D&&c(D))}else f.forEach((e,t)=>d(e,t===q?1:0))}function O(){if(z(),!L)return H(0);if(I||!F)return;const e=f[q]?parseFloat(getComputedStyle(f[q]).getPropertyValue(u())||"0"):0,t=e*k*1e3,r=Math.max(0,1e3*k-t);$=null;const o=e,s=performance.now(),a=e=>{const t=Math.min(o+(e-s)/(1e3*k),1);f.forEach((e,n)=>d(e,n===q?t:0)),t<1&&!I&&(D=requestAnimationFrame(a),D&&c(D))};var i;D=requestAnimationFrame(a),D&&c(D),P=window.setTimeout(()=>N((q+1)%h.length),r),i=P,n.timers.push(i)}function z(){null!==P&&(clearTimeout(P),P=null),null!==D&&(cancelAnimationFrame(D),D=null),$=null}const B=()=>{I=!0,z()},R=()=>{I=!1,O()};g.forEach((e,t)=>{r(e,"click",e=>{e.preventDefault(),N(t)})});const W=e=>{const t=g.indexOf(e.target);if(-1===t)return;let n=t;switch(e.key){case"ArrowLeft":case"ArrowUp":e.preventDefault(),n=0===t?g.length-1:t-1;break;case"ArrowRight":case"ArrowDown":e.preventDefault(),n=t===g.length-1?0:t+1;break;case"Home":e.preventDefault(),n=0;break;case"End":e.preventDefault(),n=g.length-1;break;default:return}M||(N(n),g[n].focus())};g.forEach(e=>r(e,"keydown",W)),S&&L&&(r(a,"mouseenter",B),r(a,"mouseleave",R));let V=!1;r(document,"keydown",()=>V=!0),r(document,"mousedown",()=>V=!1),L&&(r(a,"focusin",()=>{V&&(B(),X())}),r(a,"focusout",()=>{V&&I&&(R(),X())}));const U=`[${t.attributes.properties?.controls||"data-hs-tab-controls"}]`,j=a.querySelectorAll(U);let Y=null,G=null;j.forEach(e=>{const n=e.getAttribute(t.attributes.properties?.controls||"data-hs-tab-controls"),o=e.querySelector(v);if(o)if("previous"===n)o.setAttribute("aria-label","Previous tab"),r(o,"click",e=>{e.preventDefault(),N(0===q?h.length-1:q-1)});else if("next"===n)o.setAttribute("aria-label","Next tab"),r(o,"click",e=>{e.preventDefault(),N((q+1)%h.length)});else if("toggle"===n){if(!L)return void(e.style.display="none");Y=e,G=o,G.setAttribute("aria-label",I?"Play":"Pause"),Y.classList.toggle(l.classes.active,!I),r(o,"click",e=>{e.preventDefault(),I?R():B(),X()})}});const X=()=>{Y&&G&&(Y.classList.toggle(l.classes.active,!I),G.setAttribute("aria-label",I?"Play":"Pause"))};if(N(0,!0),L){const e=new IntersectionObserver(e=>{e.forEach(e=>{F=e.isIntersecting,e.isIntersecting&&!I?O():z()})},{threshold:.1});e.observe(a),K=e,n.observers.push(K)}var K}const m=a(t,"wrapper");return m.forEach(e=>{p(e)}),{result:`tabs initialized (${m.length} systems)`,destroy:()=>{n.timers.forEach(e=>clearTimeout(e)),n.timers.length=0,n.animationFrames.forEach(e=>cancelAnimationFrame(e)),n.animationFrames.length=0,n.observers.forEach(e=>e.disconnect()),n.observers.length=0,n.handlers.forEach(({element:e,event:t,handler:n,options:r})=>{e.removeEventListener(t,n,r)}),n.handlers.length=0}}}async function D(e){const t=l.classes.active,n={handlers:[],modals:[]},r=(e,t,r,o)=>{e.addEventListener(t,r,o),n.handlers.push({element:e,event:t,handler:r,options:o})},o=a(e,"wrapper");if(0===o.length)return{result:"modal: no modals found",destroy:()=>{}};o.forEach(e=>{const t=e.getAttribute("data-hs-modal-id");if(!t)return void console.warn("[modal] Wrapper missing data-hs-modal-id:",e);e.setAttribute("role","dialog"),e.setAttribute("aria-modal","true"),e.setAttribute("aria-hidden","true");const r=e.querySelector("h1, h2, h3, h4, h5, h6");r&&(r.id||(r.id=`modal-${t}-title`),e.setAttribute("aria-labelledby",r.id));const o=Array.from(e.querySelectorAll('[data-hs-modal="close"]'));o.forEach(e=>{e.setAttribute("aria-label","Close modal")});const s={wrapper:e,modalId:t,closeButtons:o,triggerButton:null,focusableElements:[]};n.modals.push(s)});const s=(e,r)=>{const o=n.modals.find(t=>t.modalId===e);if(!o)return void console.warn(`[modal] Modal with id "${e}" not found`);const{wrapper:s}=o;r&&(o.triggerButton=r),s.classList.add(t),s.setAttribute("aria-hidden","false"),d(),o.focusableElements=(e=>{const t=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(", ");return Array.from(e.querySelectorAll(t))})(s),o.closeButtons.length>0?o.closeButtons[0].focus():o.focusableElements.length>0&&o.focusableElements[0].focus()},i=e=>{const{wrapper:n,triggerButton:r}=e;c(n),n.classList.remove(t),n.setAttribute("aria-hidden","true"),p(),r&&(r.focus(),e.triggerButton=null),e.focusableElements=[]},c=e=>{e.querySelectorAll("video").forEach(e=>{e.pause(),e.currentTime=0});e.querySelectorAll("audio").forEach(e=>{e.pause(),e.currentTime=0});e.querySelectorAll("iframe").forEach(e=>{const t=e.src;e.src="",e.src=t})};document.querySelectorAll("[data-hs-modal-open]").forEach(e=>{const t=e.getAttribute("data-hs-modal-open");if(!t)return;e.setAttribute("aria-haspopup","dialog"),e.setAttribute("aria-controls",`modal-${t}`);r(e,"click",n=>{n.preventDefault(),s(t,e)})}),n.modals.forEach(e=>{e.closeButtons.forEach(t=>{r(t,"click",()=>{i(e)})});r(e.wrapper,"click",t=>{t.target===e.wrapper&&i(e)})});r(document,"keydown",e=>{if("Escape"===e.key){const e=n.modals.slice().reverse().find(e=>e.wrapper.classList.contains(t));e&&i(e)}});return r(document,"keydown",e=>{const r=n.modals.find(e=>e.wrapper.classList.contains(t));r&&((e,t)=>{if("Tab"!==e.key)return;const{focusableElements:n}=t;if(0===n.length)return;const r=n[0],o=n[n.length-1];e.shiftKey?document.activeElement===r&&(e.preventDefault(),o.focus()):document.activeElement===o&&(e.preventDefault(),r.focus())})(e,r)}),{result:`modal initialized (${n.modals.length} modals)`,destroy:()=>{n.handlers.forEach(({element:e,event:t,handler:n,options:r})=>{e.removeEventListener(t,n,r)}),n.handlers.length=0,n.modals.forEach(e=>{e.wrapper.classList.contains(t)&&(e.wrapper.classList.remove(t),e.wrapper.setAttribute("aria-hidden","true"),p())}),n.modals.length=0}}}function I(n){const r={handlers:[],domContentLoadedHandler:null},o=(e,t,n)=>{e.addEventListener(t,n),r.handlers.push({element:e,event:t,handler:n})};function s(){a(n,"wrapper").forEach(r=>{const s=r;s.dataset.hsFormRangeInit||(s.dataset.hsFormRangeInit="true",function(r,o){const s=r.querySelector("input[type='range']");if(!s)return void console.warn('[range] Missing <input type="range"> element in wrapper',r);const a=e(n,"output",r),i=()=>{const e=s.min?+s.min:0,o=s.max?+s.max:100,i=+s.value||e,l=(i-e)/(o-e);r.style.setProperty(`${t._global.cssVars.prefix}${n.cssVars?.progress||"progress"}`,String(l)),a&&(a.textContent=String(i))};o(s,"input",i),i()}(s,o))})}return"loading"===document.readyState?(r.domContentLoadedHandler=s,document.addEventListener("DOMContentLoaded",r.domContentLoadedHandler)):s(),{result:"range initialized",destroy:()=>{r.domContentLoadedHandler&&(document.removeEventListener("DOMContentLoaded",r.domContentLoadedHandler),r.domContentLoadedHandler=null),r.handlers.forEach(({element:e,event:t,handler:n})=>{e.removeEventListener(t,n)}),r.handlers.length=0;a(n,"wrapper").forEach(e=>{delete e.dataset.hsFormRangeInit})}}}const M=[{name:"Alabama",value:"AL"},{name:"Alaska",value:"AK"},{name:"Arizona",value:"AZ"},{name:"Arkansas",value:"AR"},{name:"California",value:"CA"},{name:"Colorado",value:"CO"},{name:"Connecticut",value:"CT"},{name:"Delaware",value:"DE"},{name:"Florida",value:"FL"},{name:"Georgia",value:"GA"},{name:"Hawaii",value:"HI"},{name:"Idaho",value:"ID"},{name:"Illinois",value:"IL"},{name:"Indiana",value:"IN"},{name:"Iowa",value:"IA"},{name:"Kansas",value:"KS"},{name:"Kentucky",value:"KY"},{name:"Louisiana",value:"LA"},{name:"Maine",value:"ME"},{name:"Maryland",value:"MD"},{name:"Massachusetts",value:"MA"},{name:"Michigan",value:"MI"},{name:"Minnesota",value:"MN"},{name:"Mississippi",value:"MS"},{name:"Missouri",value:"MO"},{name:"Montana",value:"MT"},{name:"Nebraska",value:"NE"},{name:"Nevada",value:"NV"},{name:"New Hampshire",value:"NH"},{name:"New Jersey",value:"NJ"},{name:"New Mexico",value:"NM"},{name:"New York",value:"NY"},{name:"North Carolina",value:"NC"},{name:"North Dakota",value:"ND"},{name:"Ohio",value:"OH"},{name:"Oklahoma",value:"OK"},{name:"Oregon",value:"OR"},{name:"Pennsylvania",value:"PA"},{name:"Rhode Island",value:"RI"},{name:"South Carolina",value:"SC"},{name:"South Dakota",value:"SD"},{name:"Tennessee",value:"TN"},{name:"Texas",value:"TX"},{name:"Utah",value:"UT"},{name:"Vermont",value:"VT"},{name:"Virginia",value:"VA"},{name:"Washington",value:"WA"},{name:"West Virginia",value:"WV"},{name:"Wisconsin",value:"WI"},{name:"Wyoming",value:"WY"}];function F(t){const n={observers:[],handlers:[],timeouts:[],domContentLoadedHandler:null},r=e=>n.observers.push(e),o=(e,t,r,o)=>{e.addEventListener(t,r,o),n.handlers.push({element:e,event:t,handler:r,options:o})},s=e=>n.timeouts.push(e);function i(){document.querySelectorAll("select > div").forEach(e=>{const t=e.parentElement;for(;e.firstChild;)t.appendChild(e.firstChild);e.remove()});a(t,"wrapper").forEach(a=>{!function(r,o,s,a){const i=r.querySelector("select");if(!i)return void console.warn("[select] Missing <select> element in custom select wrapper",r);i.setAttribute("aria-hidden","true"),i.setAttribute("tabindex","-1");const l=i.getAttribute("name")||"custom-select",m=e(t,"list",r),f=e(t,"button",r);if(!m||!f)return void console.warn("[select] Missing required elements (list or button) in custom select wrapper",r);function h(){i.disabled?(f.disabled=!0,f.setAttribute("aria-disabled","true")):(f.disabled=!1,f.removeAttribute("aria-disabled"))}h();const v=m.firstElementChild;if(!v)return void console.warn("[select] Missing option template in custom select list",r);const g=v.cloneNode(!0);v.remove();i.querySelectorAll("option").forEach((e,t)=>{const n=g.cloneNode(!0),r=n.querySelector("span");if(r&&(r.textContent=e.textContent),n.setAttribute("data-value",e.value),n.setAttribute("role","option"),n.setAttribute("id",`${l}-option-${t}`),n.setAttribute("tabindex","-1"),e.selected){n.setAttribute("aria-selected","true");const t=f.querySelector("span")||f;"SPAN"===t.tagName&&(t.textContent=e.textContent),e.value?f.classList.add("is-filled"):f.classList.remove("is-filled")}else n.setAttribute("aria-selected","false");m.appendChild(n)}),m.setAttribute("role","listbox"),m.setAttribute("id",`${l}-listbox`),m.setAttribute("tabindex","-1"),m.setAttribute("aria-hidden","true"),m.inert=!0,f.setAttribute("role","combobox"),f.setAttribute("aria-haspopup","listbox"),f.setAttribute("aria-controls",`${l}-listbox`),f.setAttribute("aria-expanded","false"),f.setAttribute("id",`${l}-button`);const y=r.querySelector("label")||document.querySelector(`label[for="${i.id}"]`);if(y){const e=y.id||`${l}-label`;y.id=e,i.id||(i.id=`${l}-select`),y.setAttribute("for",i.id),f.setAttribute("aria-labelledby",e)}const b=r.querySelector('[data-hs-height="element"]'),w=b||null;let E="",A=null;function L(){return r.classList.contains("is-active")}function k(){const e=L(),t="true"===f.getAttribute("aria-expanded");if(t&&!e&&m.contains(document.activeElement)&&f.focus(),f.setAttribute("aria-expanded",e?"true":"false"),m.setAttribute("aria-hidden",e?"false":"true"),m.inert=!e,e){m.querySelectorAll('[role="option"]').forEach(e=>{e.setAttribute("tabindex","0")}),t||d()}else{f.removeAttribute("aria-activedescendant");m.querySelectorAll('[role="option"]').forEach(e=>{e.setAttribute("tabindex","-1")}),t&&p()}w&&u(w,e,{duration:300,ease:"power2.inOut"})}w&&c(w,L());function S(e){const t=m.querySelectorAll('[role="option"]');e<0||e>=t.length||(t.forEach(e=>{e.classList.remove("focused"),e.setAttribute("tabindex","-1")}),t[e].classList.add("focused"),t[e].setAttribute("tabindex","0"),t[e].focus(),f.setAttribute("aria-activedescendant",t[e].id))}function x(e){if(1!==e.length)return!1;if(null!==A){clearTimeout(A);const e=n.timeouts.indexOf(A);e>-1&&n.timeouts.splice(e,1)}const t=Array.from(m.querySelectorAll('[role="option"]'));if(0===t.length)return!1;E+=e.toLowerCase();const o=t.findIndex(e=>e.classList.contains("focused"));if(1===E.length||E.split("").every(e=>e===E[0])){const e=E[0];let n=o+1;for(let o=0;o<t.length;o++){const s=(n+o)%t.length;if((t[s].querySelector("span")?.textContent||t[s].textContent).toLowerCase().startsWith(e))return S(s),L()||r.classList.add("is-active"),A=setTimeout(T,500),a(A),!0}}else{const e=t.findIndex(e=>(e.querySelector("span")?.textContent||e.textContent).toLowerCase().startsWith(E));if(-1!==e)return S(e),L()||r.classList.add("is-active"),A=setTimeout(T,500),a(A),!0}return A=setTimeout(T,500),a(A),!1}function T(){E="",A=null}function C(e){const t=e.getAttribute("data-value")||"",n=e.querySelector("span")?.textContent||e.textContent;i.value=t,i.dispatchEvent(new Event("change",{bubbles:!0}));const o=f.querySelector("span")||f;"SPAN"===o.tagName&&(o.textContent=n),t?f.classList.add("is-filled"):f.classList.remove("is-filled"),m.querySelectorAll('[role="option"]').forEach(e=>{e.setAttribute("aria-selected","false")}),e.setAttribute("aria-selected","true"),r.classList.remove("is-active")}k();const q=e=>{e.preventDefault(),r.classList.toggle("is-active")};o(f,"click",q);const P=e=>{switch(e.key){case"Enter":e.preventDefault();const t=f.closest("form");if(t){const e=t.querySelector('button[type="submit"], input[type="submit"]')||t.querySelector("button:not([type])");e&&e.click()}break;case" ":e.preventDefault(),r.classList.toggle("is-active");break;case"ArrowDown":e.preventDefault(),L()?S(0):(r.classList.add("is-active"),requestAnimationFrame(()=>{S(0)}));break;case"ArrowUp":if(e.preventDefault(),L()){S(m.querySelectorAll('[role="option"]').length-1)}else r.classList.add("is-active"),requestAnimationFrame(()=>{S(0)});break;case"Escape":L()&&(e.preventDefault(),r.classList.remove("is-active"));break;case"Home":e.preventDefault(),L()||r.classList.add("is-active"),S(0);break;case"End":e.preventDefault(),L()||r.classList.add("is-active");S(m.querySelectorAll('[role="option"]').length-1);break;default:x(e.key)&&e.preventDefault()}};o(f,"keydown",P);const D=e=>{const t=e.target.closest('[role="option"]');if(!t)return;const n=Array.from(m.querySelectorAll('[role="option"]')),o=n.indexOf(t);switch(e.key){case"ArrowDown":e.preventDefault(),o<n.length-1&&S(o+1);break;case"ArrowUp":e.preventDefault(),o>0&&S(o-1);break;case"Enter":e.preventDefault(),C(t);break;case"Escape":e.preventDefault(),r.classList.remove("is-active"),f.focus();break;case"Home":e.preventDefault(),S(0);break;case"End":e.preventDefault(),S(n.length-1);break;default:x(e.key)&&e.preventDefault()}};o(m,"keydown",D);o(m,"click",e=>{const t=e.target.closest('[role="option"]');t&&C(t)});const $=e=>{e.relatedTarget&&r.contains(e.relatedTarget)||!r.classList.contains("is-active")||r.classList.remove("is-active")};o(m,"focusout",$);const I=e=>{r.classList.contains("is-active")&&!r.contains(e.target)&&r.classList.remove("is-active")};o(document,"click",I);const M=new MutationObserver(()=>{k()});M.observe(r,{attributes:!0,attributeFilter:["class"]}),s(M);const F=new MutationObserver(()=>{h()});F.observe(i,{attributes:!0,attributeFilter:["disabled"]}),s(F);const N=()=>{const e=i.options[i.selectedIndex];if(e){const t=m.querySelectorAll('[role="option"]'),n=Array.from(t).find(t=>t.getAttribute("data-value")===e.value);if(n){const r=n.querySelector("span")?.textContent||n.textContent,o=f.querySelector("span")||f;"SPAN"===o.tagName&&(o.textContent=r),e.value?f.classList.add("is-filled"):f.classList.remove("is-filled"),t.forEach(e=>{e.setAttribute("aria-selected","false")}),n.setAttribute("aria-selected","true")}}};o(i,"change",N),o(i,"input",N);const H=i.closest("form");if(H){o(H,"reset",()=>{setTimeout(()=>{N()},0)})}}(a,o,r,s)})}return"loading"===document.readyState?(n.domContentLoadedHandler=i,document.addEventListener("DOMContentLoaded",n.domContentLoadedHandler)):i(),window.initCustomSelects=i,{result:"select initialized",destroy:()=>{n.domContentLoadedHandler&&(document.removeEventListener("DOMContentLoaded",n.domContentLoadedHandler),n.domContentLoadedHandler=null),n.observers.forEach(e=>e.disconnect()),n.observers.length=0,n.timeouts.forEach(e=>clearTimeout(e)),n.timeouts.length=0,n.handlers.forEach(({element:e,event:t,handler:n,options:r})=>{e.removeEventListener(t,n,r)}),n.handlers.length=0,window.initCustomSelects&&delete window.initCustomSelects}}}async function N(e){const t={destroyFunctions:[]};try{const n=function(e){const t=a(e,"states");return t.forEach(e=>{const t=e;if("SELECT"!==t.tagName)return void console.warn('[select-states] data-hs-form-select="states" must be on a <select> element',t);const n=t.querySelectorAll("option");if(1!==n.length)return void console.warn("[select-states] Select must have exactly 1 default template option (placeholder). Found:",n.length,t);const r=n[0];if(""!==r.value)return void console.warn("[select-states] Template option must have empty value for placeholder. Found value:",r.value,t);const o=r.textContent;t.innerHTML="";const s=document.createElement("option");s.value="",s.textContent=o,t.appendChild(s),M.forEach(e=>{const n=document.createElement("option");n.value=e.value,n.textContent=e.name,t.appendChild(n)})}),{result:`states initialized on ${t.length} select${1!==t.length?"s":""}`,destroy:()=>{}}}(e.states);n?.destroy&&t.destroyFunctions.push(n.destroy);const r=F(e["custom-select"]);return r?.destroy&&t.destroyFunctions.push(r.destroy),{result:"select initialized",destroy:()=>{t.destroyFunctions.forEach(e=>{try{e()}catch(t){console.error("[select] Error during cleanup:",t)}}),t.destroyFunctions.length=0}}}catch(n){throw console.error("[select] Initialization failed:",n),t.destroyFunctions.forEach(e=>{try{e()}catch(t){console.error("[select] Error during error cleanup:",t)}}),n}}const H="hsfx-form-persist";function O(e){const t={handlers:[],debounceTimers:new Map},n=i(e,"field"),r=document.querySelectorAll(n);if(0===r.length)return{result:"persist skipped - no fields found",destroy:()=>{}};const o=()=>{try{const e=localStorage.getItem(H);if(e){return JSON.parse(e)}}catch{}return{timestamp:Date.now().toString()}},s=e=>{e.timestamp=Date.now().toString(),localStorage.setItem(H,JSON.stringify(e))},a=e=>{if(e instanceof HTMLInputElement){if("checkbox"===e.type)return e.checked?"true":"false";if("radio"===e.type){const t=e.name;if(t){const e=document.querySelector(`input[type="radio"][name="${t}"]:checked`);return e?.value||""}return e.checked?e.value:""}return e.value}return e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement?e.value:""},l=e.attributes.elements.field.primary.match(/data-[^=]+/)?.[0];return l?(r.forEach(e=>{const n=e.getAttribute(l);if(!n)return;const r=()=>((e,n)=>{const r=t.debounceTimers.get(e);r&&clearTimeout(r);const i=setTimeout(()=>{const r=o(),i=a(e);r[n]=i,s(r),t.debounceTimers.delete(e)},300);t.debounceTimers.set(e,i)})(e,n),i=e instanceof HTMLSelectElement?"change":"input";e.addEventListener(i,r),t.handlers.push({element:e,event:i,handler:r}),"change"!==i&&(e.addEventListener("change",r),t.handlers.push({element:e,event:"change",handler:r}));const c=a(e);if(c){const e=o();e[n]=c,s(e)}}),{result:`persist initialized (${r.length} fields)`,destroy:()=>{t.debounceTimers.forEach(e=>clearTimeout(e)),t.debounceTimers.clear(),t.handlers.forEach(({element:e,event:t,handler:n})=>{e.removeEventListener(t,n)}),t.handlers.length=0}}):{result:"persist skipped - invalid config",destroy:()=>{}}}async function z(){const n=t.default.form,r={destroyFunctions:[]},o=i(n.persist,"field");if(document.querySelector(o))try{const e=O(n.persist);e?.destroy&&r.destroyFunctions.push(e.destroy)}catch(d){console.error("[form] Error initializing persist:",d)}const s=i(n.honeypot,"form-handler");if(document.querySelector(s))try{const t=function(t){const n={honeypotHandler:null},r=n=>{const r=n.target;if("FORM"!==r.tagName)return;const o=e(t,"form-handler",r);return o&&o.value?(n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),!1):void 0};return n.honeypotHandler=r,document.addEventListener("submit",r,!0),{result:"honeypot initialized",destroy:()=>{n.honeypotHandler&&(document.removeEventListener("submit",n.honeypotHandler,!0),n.honeypotHandler=null)}}}(n.honeypot);t?.destroy&&r.destroyFunctions.push(t.destroy)}catch(d){console.error("[form] Error initializing honeypot:",d)}const l=i(n.range,"wrapper");if(document.querySelector(l))try{const e=I(n.range);e?.destroy&&r.destroyFunctions.push(e.destroy)}catch(d){console.error("[form] Error initializing range:",d)}const c=i(n.test,"wrapper");if(document.querySelector(c))try{const t=function(t){const n={handlers:[]},r=(e,t,r,o)=>{e.addEventListener(t,r,o),n.handlers.push({element:e,event:t,handler:r,options:o})},o=a(t,"wrapper");return o.forEach(n=>{const o=n.querySelector("form");if(!o)return void console.warn('[form-test] No <form> element found within data-hs-form-test="wrapper"',n);const s=e(t,"info",n),a=()=>{const e=new FormData(o),t={};for(const[n,r]of e.entries())t[n]=r;if(s){const e=document.createElement("pre");e.textContent=JSON.stringify(t,null,2),s.innerHTML="",s.appendChild(document.createTextNode("Test mode active - Live form data:")),s.appendChild(e)}};s&&(s.textContent="Test mode active, preventing native submissions",a()),r(o,"input",a),r(o,"change",a);const i=o.querySelector('button[type="submit"], input[type="submit"]')||o.querySelector("button:not([type])");i&&r(i,"click",()=>{console.log("[form-test] Submit button clicked"),requestAnimationFrame(()=>{o.checkValidity()||console.log("[form-test] Browser blocked submission - validation failed")})}),r(o,"submit",e=>{e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),console.log("[form-test] Submission prevented - displaying test results");const t=new FormData(o),n={};for(const[o,s]of t.entries())n[o]=s;const r=`✅ Form would submit successfully at ${(new Date).toLocaleTimeString()}`;if(s){const e=document.createElement("pre");e.textContent=JSON.stringify(n,null,2),s.innerHTML="",s.appendChild(document.createTextNode(r)),s.appendChild(e)}else console.log(r),console.log("Form data:",n);return!1},!0)}),{result:`test initialized on ${o.length} form${1!==o.length?"s":""}`,destroy:()=>{n.handlers.forEach(({element:e,event:t,handler:n,options:r})=>{e.removeEventListener(t,n,r)}),n.handlers.length=0}}}(n.test);t?.destroy&&r.destroyFunctions.push(t.destroy)}catch(d){console.error("[form] Error initializing test:",d)}const u=i(n.select,"wrapper");if(document.querySelector(u))try{const e=await N(n.select);e?.destroy&&r.destroyFunctions.push(e.destroy)}catch(d){console.error("[form] Error initializing select:",d)}return{result:`form initialized (${r.destroyFunctions.length} modules active)`,destroy:()=>{r.destroyFunctions.forEach(e=>{try{e()}catch(d){console.error("[form] Error during cleanup:",d)}}),r.destroyFunctions.length=0}}}function B(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function R(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return B(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?B(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function W(e,t,n,r){var o,s,a={headers:{accept:"*/*"}};return t||(a.mode="no-cors"),n&&(a.credentials="include"),a.priority=r?"high":"low",window.fetch?fetch(e,a):(o=e,s=n,new Promise(function(e,t,n){(n=new XMLHttpRequest).open("GET",o,n.withCredentials=s),n.setRequestHeader("Accept","*/*"),n.onload=function(){200===n.status?e():t()},n.send()}))}var V,U=(V=document.createElement("link")).relList&&V.relList.supports&&V.relList.supports("prefetch")?function(e,t){return new Promise(function(n,r,o){(o=document.createElement("link")).rel="prefetch",o.href=e,t&&o.setAttribute("crossorigin","anonymous"),o.onload=n,o.onerror=r,document.head.appendChild(o)})}:W,j=window.requestIdleCallback||function(e){var t=Date.now();return setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},Y=new Set,G=new Set,X=!1;function K(e,t){return Array.isArray(t)?t.some(function(t){return K(e,t)}):(t.test||t).call(t,e.href,e)}function J(e){if(e){if(e.saveData)return new Error("Save-Data is enabled");if(/2g/.test(e.effectiveType))return new Error("network conditions are poor")}return!0}function _(e){if(void 0===e&&(e={}),window.IntersectionObserver&&"isIntersecting"in IntersectionObserverEntry.prototype){var t=function(e){e=e||1;var t=[],n=0;function r(){n<e&&t.length>0&&(t.shift()(),n++)}return[function(e){t.push(e)>1||r()},function(){n--,r()}]}(e.throttle||1/0),n=t[0],r=t[1],o=e.limit||1/0,s=e.origins||[location.hostname],a=e.ignores||[],i=e.delay||0,l=[],c=e.timeoutFn||j,u="function"==typeof e.hrefFn&&e.hrefFn,d=e.prerender||!1;X=e.prerenderAndPrefetch||!1;var p=new IntersectionObserver(function(t){t.forEach(function(t){if(t.isIntersecting)l.push((t=t.target).href),a=function(){l.includes(t.href)&&(p.unobserve(t),(X||d)&&G.size<o?function(e,t){void 0===t&&(t="immediate");var n=J(navigator.connection);if(n instanceof Error)return Promise.reject(new Error("Cannot prerender, "+n.message));if(!HTMLScriptElement.supports("speculationrules"))return Z(e,!0,!1,!1,"moderate"===t||"conservative"===t),Promise.reject(new Error("This browser does not support the speculation rules API. Falling back to prefetch."));for(var r,o=R([].concat(e));!(r=o()).done;)G.add(r.value);Y.size>0&&!X&&console.warn("[Warning] You are using both prefetching and prerendering on the same document");var s=function(e,t){var n=document.createElement("script");n.type="speculationrules",n.text='{"prerender":[{"source": "list",\n "urls": ["'+Array.from(e).join('","')+'"],\n "eagerness": "'+t+'"}]}';try{document.head.appendChild(n)}catch(r){return r}return!0}(G,t);return!0===s?Promise.resolve():Promise.reject(s)}(u?u(t):t.href,e.eagerness).catch(function(t){if(!e.onError)throw t;e.onError(t)}):Y.size<o&&!d&&n(function(){Z(u?u(t):t.href,e.priority,e.checkAccessControlAllowOrigin,e.checkAccessControlAllowCredentials,e.onlyOnMouseover).then(r).catch(function(t){r(),e.onError&&e.onError(t)})}))},(c=i)?setTimeout(a,c):a();else{var s=l.indexOf((t=t.target).href);s>-1&&l.splice(s)}var a,c})},{threshold:e.threshold||0});return c(function(){(e.el&&e.el.length&&e.el.length>0&&"A"===e.el[0].nodeName?e.el:(e.el||document).querySelectorAll("a")).forEach(function(e){s.length&&!s.includes(e.hostname)||K(e,a)||p.observe(e)})},{timeout:e.timeout||2e3}),function(){Y.clear(),p.disconnect()}}}function Z(e,t,n,r,o){var s=J(navigator.connection);return s instanceof Error?Promise.reject(new Error("Cannot prefetch, "+s.message)):(G.size>0&&!X&&console.warn("[Warning] You are using both prefetching and prerendering on the same document"),Promise.all([].concat(e).map(function(e){return Y.has(e)?[]:(Y.add(e),function(e,t,n){var r=[].slice.call(arguments,3);if(!n)return e.apply(void 0,[t].concat(r));for(var o,s=Array.from(document.querySelectorAll("a")).filter(function(e){return e.href===t}),a=new Map,i=function(){var n=o.value,s=function(o){var l=setTimeout(function(){return n.removeEventListener("mouseenter",s),n.removeEventListener("mouseleave",i),e.apply(void 0,[t].concat(r))},200);a.set(n,l)},i=function(e){var t=a.get(n);t&&(clearTimeout(t),a.delete(n))};n.addEventListener("mouseenter",s),n.addEventListener("mouseleave",i)},l=R(s);!(o=l()).done;)i()}(t?W:U,new URL(e,location.href).toString(),o,n,r,t))})))}async function Q(){const e=new Set,t=_({el:document.body,limit:5,throttle:1e3,timeout:1e4,ignoreSlowConnection:!0,origins:[window.location.hostname],delay:0,priority:"low"}),n=new IntersectionObserver(t=>{t.forEach(t=>{if(t.isIntersecting){const n=t.target.href;if(n.includes("#")||e.has(n))return;Z([n],{priority:"low"}).then(()=>{e.add(n)}).catch(()=>{})}})},{rootMargin:"200px"});return document.querySelectorAll("a[href]").forEach(e=>{e instanceof HTMLAnchorElement&&e.hostname===window.location.hostname&&n.observe(e)}),document.body.addEventListener("mouseover",t=>{const n=t.target.closest("a[href]");if(n&&n instanceof HTMLAnchorElement){const t=n.href;n.hostname===window.location.hostname&&!e.has(t)&&Z([t],{priority:"low"}).then(()=>{e.add(t)}).catch(()=>{})}}),{result:"link-prefetch initialized",destroy:()=>{t&&"function"==typeof t&&t(),n.disconnect()}}}async function ee(){const e=t._global.classes.active,n=t.default["active-link"],r={observers:[],handlers:[],scrollTimeout:null},o=i(n,"wrapper"),s=i(n,"trigger"),a=document.querySelectorAll('a[href^="#"], button[data-target^="#"]'),l=[];a.forEach(e=>{let t=e;const n=e.closest(o);if(n)t=n;else{const n=e.closest(s);n&&(t=n)}l.push({link:e,target:t})});const c=[];if(a.forEach(e=>{const t=e.getAttribute("href")||e.getAttribute("data-target");if(t&&"#"!==t){const e=document.querySelector(t);e&&c.push({element:e,hash:t})}}),0===c.length)return{result:"active-link: no sections found",destroy:()=>{}};let u=null;const d=()=>{const t=.75*window.innerHeight;let n=null;for(let e=c.length-1;e>=0;e--){if(c[e].element.getBoundingClientRect().top<=t){n=c[e].hash;break}}if(n!==u&&(u=n,l.forEach(({target:t})=>t.classList.remove(e)),u)){const t=l.find(({link:e})=>e.getAttribute("href")===u||e.getAttribute("data-target")===u);t&&t.target.classList.add(e)}},p=new IntersectionObserver(()=>{d()},{rootMargin:"-75% 0px -25% 0px",threshold:0});c.forEach(({element:e})=>p.observe(e)),r.observers.push(p);const m=()=>{r.scrollTimeout&&clearTimeout(r.scrollTimeout),r.scrollTimeout=setTimeout(d,50)};return window.addEventListener("scroll",m),r.handlers.push({element:window,event:"scroll",handler:m}),d(),{result:`active-link initialized (${c.length} sections tracked)`,destroy:()=>{r.observers.forEach(e=>e.disconnect()),r.observers.length=0,r.handlers.forEach(({element:e,event:t,handler:n})=>{e.removeEventListener(t,n)}),r.handlers.length=0,r.scrollTimeout&&(clearTimeout(r.scrollTimeout),r.scrollTimeout=null),l.forEach(({target:t})=>t.classList.remove(e))}}}async function te(){const e={destroyFunctions:[]},n=t.default;try{const t=await y();t?.destroy&&e.destroyFunctions.push(t.destroy)}catch(i){console.error("[default] Error initializing transition:",i)}const r=[b(n["smooth-scroll"]),k(n.navbar),S(n.accordion),T(),C(n.pagination),q(n.comparison),P(n.tabs),D(n.modal),z(),Q(),ee()],o=await Promise.allSettled(r);o.forEach(t=>{"fulfilled"===t.status&&t.value?.destroy&&e.destroyFunctions.push(t.value.destroy)});const s=o.filter(e=>"fulfilled"===e.status).length,a=o.length-s;return a>0&&console.warn(`[default] ${s+1}/${o.length+1} modules loaded successfully. ${a} failed but won't affect other modules.`),{result:"default initialized",destroy:()=>{e.destroyFunctions.forEach(e=>{try{e()}catch(i){console.error("[default] Error during cleanup:",i)}}),e.destroyFunctions.length=0}}}export{te as init};
@@ -1 +1 @@
1
- import{p as e,d as r,j as t,l as s,g as a,m as i,n}from"./hsfxutilsBP6i-jwS.js";const o='[data-hs-marquee="wrapper"]',l="data-hs-marquee-direction",c="data-hs-marquee-duration",u="data-hs-marquee-scroll",g="data-hs-marquee-type",d=25,m=0;async function p(){if(e())return{result:"marquee skipped - prefers-reduced-motion enabled"};const p=r("marquee");if(!p)return{result:"marquee skipped - GSAP not loaded"};const{gsap:h,ScrollTrigger:f}=p;t("marquee",["ScrollTrigger"],"error"),f&&h.registerPlugin(f),s();const q=Array.from(document.querySelectorAll(o)),k={timelines:[],scrollTriggers:[],tickers:[]};return q.forEach(e=>{const r=e.getAttribute(l),t=Array.from(e.children);if(0===t.length)return void console.warn("[marquee] No children found in marquee wrapper:",e);const s=e.getAttribute(c),o=s?parseFloat(s):d,p=e.getAttribute(u),f=p?parseFloat(p):m,q=e.getAttribute(g);s||e.setAttribute(c,String(d)),p||e.setAttribute(u,String(m)),e.classList.add(a.classes.gsap);const A=h.timeline({repeat:-1});if(t.forEach(e=>{"left"===r?A.to(e,{xPercent:-100,duration:o,ease:"none"},0):"right"===r&&(h.set(e,{xPercent:-100}),A.to(e,{xPercent:0,duration:o,ease:"none"},0))}),k.timelines.push(A),f>0){const e=h.quickTo(A,"timeScale",{duration:.1,ease:"power1.out"});let r=!1;const t=()=>{r||(r=!0,requestAnimationFrame(()=>{const t=n(),s=i();let a=1;if("reverse"===q)if(1===s)a=1+t*f;else if(-1===s){const e=t*f;a=e>.5?-e:1}else a=1;else{a=1+t*f}e(a),r=!1}))};h.ticker.add(t),k.tickers.push({tickerFunc:t,gsap:h})}}),{result:`marquee initialized (${q.length} instances)`,destroy:()=>{k.timelines.forEach(e=>{e&&e.kill()}),k.scrollTriggers.forEach(e=>{e&&e.kill()}),k.tickers.forEach(({tickerFunc:e,gsap:r})=>{r.ticker.remove(e)}),q.forEach(e=>{e.classList.remove(a.classes.gsap)}),k.timelines.length=0,k.scrollTriggers.length=0,k.tickers.length=0}}}export{p as init};
1
+ import{p as e,d as r,j as t,l as s,g as a,m as i,n}from"./hsfxutilsMPToI1FZ.js";const o='[data-hs-marquee="wrapper"]',l="data-hs-marquee-direction",c="data-hs-marquee-duration",u="data-hs-marquee-scroll",g="data-hs-marquee-type",d=25,m=0;async function p(){if(e())return{result:"marquee skipped - prefers-reduced-motion enabled"};const p=r("marquee");if(!p)return{result:"marquee skipped - GSAP not loaded"};const{gsap:h,ScrollTrigger:f}=p;t("marquee",["ScrollTrigger"],"error"),f&&h.registerPlugin(f),s();const q=Array.from(document.querySelectorAll(o)),k={timelines:[],scrollTriggers:[],tickers:[]};return q.forEach(e=>{const r=e.getAttribute(l),t=Array.from(e.children);if(0===t.length)return void console.warn("[marquee] No children found in marquee wrapper:",e);const s=e.getAttribute(c),o=s?parseFloat(s):d,p=e.getAttribute(u),f=p?parseFloat(p):m,q=e.getAttribute(g);s||e.setAttribute(c,String(d)),p||e.setAttribute(u,String(m)),e.classList.add(a.classes.gsap);const A=h.timeline({repeat:-1});if(t.forEach(e=>{"left"===r?A.to(e,{xPercent:-100,duration:o,ease:"none"},0):"right"===r&&(h.set(e,{xPercent:-100}),A.to(e,{xPercent:0,duration:o,ease:"none"},0))}),k.timelines.push(A),f>0){const e=h.quickTo(A,"timeScale",{duration:.1,ease:"power1.out"});let r=!1;const t=()=>{r||(r=!0,requestAnimationFrame(()=>{const t=n(),s=i();let a=1;if("reverse"===q)if(1===s)a=1+t*f;else if(-1===s){const e=t*f;a=e>.5?-e:1}else a=1;else{a=1+t*f}e(a),r=!1}))};h.ticker.add(t),k.tickers.push({tickerFunc:t,gsap:h})}}),{result:`marquee initialized (${q.length} instances)`,destroy:()=>{k.timelines.forEach(e=>{e&&e.kill()}),k.scrollTriggers.forEach(e=>{e&&e.kill()}),k.tickers.forEach(({tickerFunc:e,gsap:r})=>{r.ticker.remove(e)}),q.forEach(e=>{e.classList.remove(a.classes.gsap)}),k.timelines.length=0,k.scrollTriggers.length=0,k.tickers.length=0}}}export{p as init};
@@ -0,0 +1 @@
1
+ import{q as e,a as t,g as r,b as n,c as o}from"./hsfxutilsMPToI1FZ.js";function s(){return function(){const e=window.location.origin,t=e=>{const t=document.querySelector(`[data-hs-replace="${e}"]`);return t?.textContent?.trim()||""},r=t("company"),n=t("phone"),o=t("email"),s=t("city"),i=t("state"),a=t("zipcode"),c={"@context":"https://schema.org","@type":"LocalBusiness",name:r,url:e,telephone:n,email:o},l=document.querySelector('[data-hs-replace="business-logo"] img');l&&l.src&&(c.image=l.src);const d={"@type":"PostalAddress",addressLocality:s,addressRegion:i,postalCode:a,addressCountry:"US"},u=t("street-address");u&&(d.streetAddress=u),c.address=d;const m=t("business-latitude"),p=t("business-longitude");m&&p&&(c.geo={"@type":"GeoCoordinates",latitude:m,longitude:p});const h=["facebook","instagram","linkedin","pinterest","tiktok","x","youtube"].map(e=>(e=>{const t=document.querySelector(`[data-hs-replace="${e}"]`);return t?.href||""})(e)).filter(e=>e&&""!==e.trim()&&!e.includes("placeholder"));h.length>0&&(c.sameAs=h);const f=document.querySelector('[data-hs-schema="services"]');if(f){const e=f.querySelectorAll('[data-hs-schema-list="item"]'),t=Array.from(e).map(e=>e.textContent?.trim()).filter(e=>e&&""!==e);t.length>0&&(c.serviceType=t)}const y=document.querySelector('[data-hs-schema="areas"]');if(y){const e=y.querySelectorAll('[data-hs-schema-list="item"]'),t=Array.from(e).map(e=>({"@type":"City",name:e.textContent?.trim()||""})).filter(e=>e.name&&""!==e.name);t.length>0&&(c.areaServed=t)}const g=document.createElement("script");g.type="application/ld+json",g.text=JSON.stringify(c),document.head.appendChild(g);const b=document.querySelector('[data-hs-schema="breadcrumb"]')?.textContent?.trim()||"",A=window.location.pathname.split("/").filter(e=>""!==e);if(A.length>0){const t={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Home",item:e}]},r=A[0],n=r.split("-").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");t.itemListElement.push({"@type":"ListItem",position:2,name:n,item:e+"/"+r}),b&&t.itemListElement.push({"@type":"ListItem",position:3,name:b,item:window.location.href});const o=document.createElement("script");o.type="application/ld+json",o.text=JSON.stringify(t),document.head.appendChild(o)}if(document.querySelector('[data-hs-accordion-type="faq"]')){const e=[];if(document.querySelectorAll('[data-hs-accordion="list"]').forEach(t=>{t.querySelectorAll('[data-hs-accordion-type="faq"]').forEach(t=>{const r=t.querySelector('[data-hs-accordion="toggle"]'),n=t.querySelector('[data-hs-accordion="content"]');if(r&&n){const t=r.textContent?.trim(),o=n.innerHTML.trim();e.push({"@type":"Question",name:t,acceptedAnswer:{"@type":"Answer",text:o}})}})}),e.length>0){const t={"@context":"https://schema.org","@type":"FAQPage",mainEntity:e},r=document.createElement("script");r.type="application/ld+json",r.text=JSON.stringify(t),document.head.appendChild(r)}}const x=document.querySelector('[data-hs-schema-service="name"]'),S=document.querySelector('[data-hs-schema-service="description"]');if(x&&S){const e=x.textContent?.trim()||"",t=S.textContent?.trim()||"";if(e&&t){const r={"@context":"https://schema.org","@type":"Service",name:e,description:t},n=document.createElement("script");n.type="application/ld+json",n.text=JSON.stringify(r),document.head.appendChild(n)}}else(x||S)&&console.warn('[schema] Service page schema requires both "name" and "description" elements');const q=document.querySelector('[data-hs-schema-faq="question"]'),C=document.querySelector('[data-hs-schema-faq="answer"]'),E=document.querySelector('[data-hs-schema-faq="published"]'),w=document.querySelector('[data-hs-schema-faq="modified"]');if(q&&C&&E&&w){const e=q.textContent?.trim()||"",t=C.innerHTML.trim(),r=E.textContent?.trim()||"",n=w.textContent?.trim()||"";if(e&&t&&r&&n){const o={"@context":"https://schema.org","@type":"QAPage",mainEntity:{"@type":"Question",name:e,text:e,answerCount:1,datePublished:r,dateModified:n,acceptedAnswer:{"@type":"Answer",text:t}}},s=document.createElement("script");s.type="application/ld+json",s.text=JSON.stringify(o),document.head.appendChild(s)}}else if(q||C||E||w){const e=[];q||e.push("question"),C||e.push("answer"),E||e.push("published"),w||e.push("modified"),console.warn(`[schema] FAQ page schema missing required fields: ${e.join(", ")}`)}const v=document.querySelector('[data-hs-schema-blog="name"]'),N=document.querySelector('[data-hs-schema-blog="published"]'),$=document.querySelector('[data-hs-schema-blog="modified"]'),F=document.querySelector('[data-hs-schema-blog="summary"]'),L=document.querySelector('[data-hs-schema-blog="author-name"]'),k=document.querySelector('[data-hs-schema-blog="author-type"]');if(v&&N&&$&&F&&L&&k){const e=v.textContent?.trim()||"",r=N.textContent?.trim()||"",n=$.textContent?.trim()||"",o=F.textContent?.trim()||"",s=L.textContent?.trim()||"",i=k.textContent?.trim()||"Organization",a=document.querySelector('[data-hs-schema-blog="author-role"]'),c=document.querySelector('[data-hs-schema-blog="author-image"]'),l=a?.textContent?.trim()||"",d=c?.src||"",u=t("company"),m=document.querySelector('[data-hs-replace="business-logo"] img'),p=m?m.src:"";let h;"Person"===i?(h={"@type":"Person",name:s},l&&(h.jobTitle=l),d&&(h.image=d)):(h={"@type":"Organization",name:s},p&&(h.logo=p));const f={"@context":"https://schema.org","@type":"BlogPosting",headline:e,description:o,datePublished:r,dateModified:n,author:h,publisher:{"@type":"Organization",name:u||s,logo:{"@type":"ImageObject",url:p}},mainEntityOfPage:{"@type":"WebPage","@id":window.location.href}},y=document.createElement("script");y.type="application/ld+json",y.text=JSON.stringify(f),document.head.appendChild(y)}else if(v||N||$||F||L||k){const e=[];v||e.push("name"),N||e.push("published"),$||e.push("modified"),F||e.push("summary"),L||e.push("author-name"),k||e.push("author-type"),console.warn(`[schema] Blog page schema missing required fields: ${e.join(", ")}`)}}(),{result:"schema initialized",destroy:()=>{}}}function i(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null);let n;for(;n=r.nextNode();)n.nodeValue?.trim()&&t.push(n);return t}function a(e){const t=[];return e.hasAttribute("href")&&t.push(e),t.push(...Array.from(e.querySelectorAll("[href]"))),t}function c(e){if(e.hasAttribute("src")){if(e.getAttribute("src"))return e}const t=e.querySelector("[src]");if(t){if(t.getAttribute("src"))return t}return null}function l(e,t,r){if(function(e,t){const r=t.attributes.properties.syncField;return null!==e.querySelector(`[${r}]`)}(t,r))return void function(e,t,r){const n=r.attributes.properties.syncField;e.querySelectorAll(`[${n}]`).forEach(e=>{const r=e.getAttribute(n),o=t.querySelector(`[${n}="${r}"]`);if(!o)return;const s=c(e),a=c(o);if(s&&a){const e=s.getAttribute("src");e&&a.setAttribute("src",e)}else if(e.hasAttribute("href")&&o.hasAttribute("href")){const t=e.getAttribute("href");t&&o.setAttribute("href",t)}else{const t=i(e),r=t.length>0?t[0].nodeValue:e.textContent.trim();if(r){const e=i(o);e.length>0?e[0].nodeValue=r:o.textContent=r}}})}(e,t,r);const n=i(e),o=n.length>0?n[0].nodeValue:"",s=a(e),l=s.length>0?s[0].getAttribute("href"):"";if(o){i(t).forEach(e=>{e.nodeValue=o})}if(l){a(t).forEach(e=>{e.setAttribute("href",l)})}}const d="hs-dupe-no-transition";let u=!1;async function m(t){!function(){if(u)return;const e=document.createElement("style");e.textContent=`\n .${d},\n .${d} * {\n transition: none !important;\n animation: none !important;\n }\n `,document.head.appendChild(e),u=!0}();const r={processedElements:[]};return e(t,"wrapper").forEach(e=>{const t=e.getAttribute("data-hs-dupe");if(!t||"child"!==t&&"self"!==t)return void console.warn('[dupe] Invalid mode. Use "child" or "self":',e);const n=e.getAttribute("data-hs-dupe-count");let o=n?parseInt(n,10):1;(isNaN(o)||o<1)&&(console.warn("[dupe] Invalid count, using default of 1:",e),o=1),o>20&&(console.warn(`[dupe] Count of ${o} exceeds maximum of 20. Capping at 20.`),o=20);const s={hidden:e.hasAttribute("data-hs-dupe-hidden"),noSelect:e.hasAttribute("data-hs-dupe-no-select")};"child"===t?function(e,t,r,n){const o=e.children[0];if(!o)return;const s=[];for(let i=0;i<t;i++){const t=o.cloneNode(!0);t.classList.add(d),p(t,r),e.appendChild(t),s.push(t),t.offsetHeight,requestAnimationFrame(()=>{t.classList.remove(d)})}n.processedElements.push({element:e,mode:"child",clones:s})}(e,o,s,r):"self"===t&&function(e,t,r,n){const o=e.parentNode;if(!o)return void console.warn("[dupe] Element has no parent, cannot duplicate self:",e);const s=[];let i=e;for(let a=0;a<t;a++){const t=e.cloneNode(!0);t.classList.add(d),t.removeAttribute("data-hs-dupe"),t.removeAttribute("data-hs-dupe-count"),t.removeAttribute("data-hs-dupe-hidden"),t.removeAttribute("data-hs-dupe-no-select"),p(t,r),i.nextSibling?o.insertBefore(t,i.nextSibling):o.appendChild(t),s.push(t),i=t,t.offsetHeight,requestAnimationFrame(()=>{t.classList.remove(d)})}n.processedElements.push({element:e,mode:"self",clones:s})}(e,o,s,r)}),{result:`dupe processed ${r.processedElements.length} elements`,destroy:()=>{}}}function p(e,t){if(t.hidden&&e.setAttribute("aria-hidden","true"),t.noSelect){const t=e;t.style.userSelect="none",t.style.webkitUserSelect="none",t.style.msUserSelect="none"}}async function h(){const i={destroyFunctions:[]},a=o.normalize;try{const d=s();d&&"destroy"in d&&"function"==typeof d.destroy&&i.destroyFunctions.push(d.destroy);const u=(c=o.normalize?.replace,function(){const e=new Map,t=n(c,"element");document.querySelectorAll(t).forEach(t=>{const r=t.cloneNode(!0),o=n(c,"hide");r.querySelectorAll(o).forEach(e=>{const t=c.attributes.elements.hide.primary.match(/data-hs-replace-hide/)[0],r=e.getAttribute(t);r&&r.split(" ").filter(e=>e.trim()).some(t=>e.classList.contains(t))&&e.remove()});const s=c.attributes.elements.element.primary.match(/data-hs-replace/)[0],i=t.getAttribute(s),a=r.textContent?.trim()||null,l=t.getAttribute("href");if(i&&(a||l)){const t={text:a,href:l};if(e.has(i)){const r=e.get(i);Array.isArray(r)?r.push(t):e.set(i,[r,t])}else e.set(i,t)}});const r="hsfx-form-persist";try{const t=localStorage.getItem(r);if(t){const n=JSON.parse(t),o=parseInt(n.timestamp,10);Date.now()-o>864e5?localStorage.removeItem(r):Object.entries(n).forEach(([t,r])=>{"timestamp"!==t&&"string"==typeof r&&e.set(`form.${t}`,{text:r,href:null})})}}catch{}const o=(new Date).getFullYear().toString(),s=["January","February","March","April","May","June","July","August","September","October","November","December"][(new Date).getMonth()];e.set("year",{text:o,href:null}),e.set("month",{text:s,href:null});const i=/\{\{[^}]+\}\}/,a=document.createTreeWalker(document.body,NodeFilter.SHOW_TEXT,{acceptNode:e=>{const t=e.textContent||"";return i.test(t)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}}),l=[];let d;for(;d=a.nextNode();)l.push(d);l.forEach(t=>{let r=t.textContent||"",n=!1;for(const[s,i]of e.entries()){const e=`{{${s}}}`;if(r.includes(e)){let t=null;t=Array.isArray(i)?i.map(e=>e.text||e.href).filter(Boolean).join(", "):i.text||i.href,t&&(r=r.replace(new RegExp(e,"g"),t),n=!0)}}const o=/\{\{[^}]+\}\}/g;o.test(r)&&(r=r.replace(o,""),n=!0),n&&(t.textContent=r)}),document.querySelectorAll("a[href]").forEach(t=>{let r=t.getAttribute("href")||"",n=!1;for(const[s,i]of e.entries()){const e=`{{${s}}}`;if(r.includes(e)){let t=null;if(Array.isArray(i)){const e=i[0];t=e.href||e.text}else{if(i.href){t=i.href,r=i.href,n=!0;break}i.text&&(t=i.text)}t&&!n&&(r=r.replace(new RegExp(e,"g"),t),n=!0)}}const o=/\{\{[^}]+\}\}/g;o.test(r)&&(r=r.replace(o,""),n=!0),n&&t.setAttribute("href",r)});const u=document.querySelector("[data-hs-replace-test]");if(u){const t={};for(const[n,o]of e.entries()){const e=`{{${n}}}`;if(Array.isArray(o)){const r=o.map(e=>e.text||e.href).filter(Boolean).join(", ");t[n]={placeholder:e,value:r,type:`Array (${o.length} items)`,items:o.map(e=>e.text||e.href||"(empty)")}}else{const r=o.text||o.href||"(empty)";t[n]={placeholder:e,value:r,...o.text&&{text:o.text},...o.href&&{href:o.href}}}}const r=document.createElement("pre");r.textContent=JSON.stringify(t,null,2),u.innerHTML="",u.appendChild(document.createTextNode(`Replace Module Debug (${e.size} replacements):`)),u.appendChild(r)}document.querySelector("[data-hs-form-persist-clear]")&&localStorage.removeItem(r)}(),{result:"replace initialized",destroy:()=>{}});u&&"destroy"in u&&"function"==typeof u.destroy&&i.destroyFunctions.push(u.destroy);const p=await async function(r){const n=e(r,"source"),o=new Map,s=new Map;n.forEach(e=>{const t=e.getAttribute(r.attributes.properties.syncId),n=e.getAttribute(r.attributes.properties.syncField);t&&o.set(t,e),n&&s.set(n,e)});const i=e(r,"target");let a=0,c=0;return i.forEach(n=>{const i=n.getAttribute(r.attributes.properties.syncId),d=n.getAttribute(r.attributes.properties.syncField),u=n.getAttribute(r.attributes.properties.syncValue);let m;if(d&&u){if(m=s.get(d),!m)return void c++}else{if(!i)return void c++;if(m=o.get(i),!m)return void c++}const p=t(r,"item",n);if(!p){const e=d||i||"unknown";return void console.warn(`[sync] Target list "${e}" missing item template`)}const h="child"===p.getAttribute(r.attributes.properties.syncMode),f=t(r,"ignore",n);let y,g;if(u){const t=e(r,"item",m),n=Array.from(t).find(e=>e.getAttribute(r.attributes.properties.syncValue)===u);if(!n)return void console.warn(`[sync] No source item found with value "${u}" in field "${d}"`);y=[n]}else if(y=Array.from(e(r,"item",m)),0===y.length)return void console.warn(`[sync] Source list "${i}" has no items`);if(h){const e=p.firstElementChild;if(!e)return void console.warn(`[sync] Target list "${i}" has sync-mode="child" but item wrapper has no children`);g=e.cloneNode(!0)}else g=p.cloneNode(!0),g.removeAttribute(r.attributes.elements.item.primary.split("=")[0]);let b=!1;if(f){let e=f.nextElementSibling;for(;e;){if(e===p){b=!0;break}e=e.nextElementSibling}}if(h){for(;p.firstChild;)p.removeChild(p.firstChild);y.forEach(e=>{const t=g.cloneNode(!0);l(e,t,r),p.appendChild(t)}),p.removeAttribute(r.attributes.elements.item.primary.split("=")[0])}else{Array.from(n.children).forEach(e=>{e!==f&&e.remove()});const e=Array.from(y).map(e=>{const t=g.cloneNode(!0);return l(e,t,r),t});f?b?e.forEach(e=>{n.appendChild(e)}):e.forEach(e=>{n.insertBefore(e,f)}):e.forEach(e=>{n.appendChild(e)})}a++}),{result:`sync initialized (${a} synced, ${c} skipped)`,destroy:()=>{}}}(a.sync);p&&"destroy"in p&&"function"==typeof p.destroy&&i.destroyFunctions.push(p.destroy);const h=await m(a.dupe);h&&"destroy"in h&&"function"==typeof h.destroy&&i.destroyFunctions.push(h.destroy);const f=await async function(){const t={processedWrappers:[]};return e(r.clickable,"wrapper").forEach(e=>{const r=e.querySelector(":scope > button"),n=e.querySelector(":scope > a");if(!r||!n)return;const o=n.getAttribute("href");let s,i;o&&""!==o&&"#"!==o?(s=n,i=r):(s=r,i=n);const a="button"===s.getAttribute("data-hs-clickable");a||s.setAttribute("data-hs-clickable","button"),i.remove(),t.processedWrappers.push({wrapper:e,keptElement:s,wasLink:s===n,addedAttribute:!a})}),{result:`clickable processed ${t.processedWrappers.length} wrappers`,destroy:()=>{}}}();return f&&"destroy"in f&&"function"==typeof f.destroy&&i.destroyFunctions.push(f.destroy),{result:"normalize initialized",destroy:()=>{i.destroyFunctions.reverse().forEach(e=>{try{e()}catch(t){console.error("[normalize] Error during cleanup:",t)}}),i.destroyFunctions.length=0}}}catch(d){throw console.error("[normalize] Initialization failed:",d),i.destroyFunctions.reverse().forEach(e=>{try{e()}catch(t){console.error("[normalize] Error during error cleanup:",t)}}),d}var c}export{h as init};
@@ -1 +1 @@
1
- const a={_global:{apiName:"hsfx",attributes:{height:"data-hs-height",heightValue:"element",heightDuration:"data-hs-height-duration",heightEase:"data-hs-height-ease",moduleType:"data-hs-module-type",module:"data-hs-module"},classes:{modalOpen:"hs-modal-open",overflowHidden:"u-overflow-hidden",displayContents:"u-display-contents",active:"is-active",gsap:"hs-gsap",loading:"hs-loading",loaded:"hs-loaded",ready:"hs-ready"},cssVars:{prefix:"--_hs---",state:{name:"state",values:{active:"1",inactive:"0"}},clip:{name:"clip"},scrollOffset:{name:"scroll-offset"}},clickable:{module:"global-clickable",attributes:{elements:{wrapper:{primary:"data-hs-clickable='wrapper'",aliases:[]},button:{primary:"data-hs-clickable='button'",aliases:[]}}}}},normalize:{sync:{module:"sync",attributes:{elements:{source:{primary:"data-hs-sync='source'",aliases:[]},target:{primary:"data-hs-sync='target'",aliases:[]},item:{primary:"data-hs-sync='item'",aliases:[]},ignore:{primary:"data-hs-sync='ignore'",aliases:[]}},properties:{syncId:"data-hs-sync-id",syncField:"data-hs-sync-field",syncMode:"data-hs-sync-mode",syncValue:"data-hs-sync-value"}}},clickable:{module:"clickable",attributes:{elements:{wrapper:{primary:"data-hs-clickable='wrapper'",aliases:[]}}},normalize:{module:"normalize",attributes:{elements:{wrapper:{primary:"data-hs-clickable='wrapper'",aliases:[]},button:{primary:"data-hs-clickable='button'",aliases:[]}}}}},dupe:{module:"dupe",attributes:{elements:{wrapper:{primary:"data-hs-dupe",aliases:[]}},properties:{count:"data-hs-dupe-count",hidden:"data-hs-dupe-hidden",noSelect:"data-hs-dupe-no-select"}},modes:{child:"Duplicates the first direct child element",self:"Duplicates the element itself as a sibling"},modifiers:{hidden:"Adds aria-hidden='true' to clones for accessibility",noSelect:"Adds user-select: none to clones to prevent text selection"},limits:{maxCount:20}},schema:{module:"schema",attributes:{elements:{breadcrumb:{primary:"data-hs-schema='breadcrumb'",aliases:[]},services:{primary:"data-hs-schema='services'",aliases:[]},areas:{primary:"data-hs-schema='areas'",aliases:[]},"list-item":{primary:"data-hs-schema-list='item'",aliases:[]},service:{primary:"data-hs-schema='service'",aliases:[]},"service-name":{primary:"data-hs-schema-service='name'",aliases:[]},"service-description":{primary:"data-hs-schema-service='description'",aliases:[]},"faq-page":{primary:"data-hs-schema='faq-page'",aliases:[]},"faq-question":{primary:"data-hs-schema-faq='question'",aliases:[]},"faq-answer":{primary:"data-hs-schema-faq='answer'",aliases:[]},"faq-published":{primary:"data-hs-schema-faq='published'",aliases:[]},"faq-modified":{primary:"data-hs-schema-faq='modified'",aliases:[]},blog:{primary:"data-hs-schema='blog'",aliases:[]},"blog-name":{primary:"data-hs-schema-blog='name'",aliases:[]},"blog-published":{primary:"data-hs-schema-blog='published'",aliases:[]},"blog-modified":{primary:"data-hs-schema-blog='modified'",aliases:[]},"blog-summary":{primary:"data-hs-schema-blog='summary'",aliases:[]},"blog-author-name":{primary:"data-hs-schema-blog='author-name'",aliases:[]},"blog-author-type":{primary:"data-hs-schema-blog='author-type'",aliases:[]},"blog-author-role":{primary:"data-hs-schema-blog='author-role'",aliases:[]},"blog-author-image":{primary:"data-hs-schema-blog='author-image'",aliases:[]}}}},replace:{module:"replace",attributes:{elements:{element:{primary:"data-hs-replace",aliases:[]},hide:{primary:"data-hs-replace-hide",aliases:[]}}}}},default:{transition:{module:"transition",attributes:{elements:{wrapper:{primary:"data-hs-transition='wrapper'",aliases:["data-hs-transition='element'"]},exitTrigger:{primary:"data-hs-transition-exit-trigger",aliases:[]},enterTrigger:{primary:"data-hs-transition-enter-trigger",aliases:[]},trigger:{primary:"data-hs-transition-trigger",aliases:[]},namespace:{primary:"data-hs-transition-namespace",aliases:[]},exitTime:{primary:"data-hs-transition-exit-time",aliases:["data-hs-exit-time"]},firstDelay:{primary:"data-hs-transition-first-delay",aliases:["data-hs-delay"]}}}},"smooth-scroll":{module:"smooth-scroll",attributes:{elements:{"offset-proxy":{primary:"data-hs-scroll-offset='proxy'",aliases:[]}}}},"active-link":{module:"active-link",attributes:{elements:{wrapper:{primary:"data-hs-active='wrapper'",aliases:[]},trigger:{primary:"data-trigger",aliases:[]}}}},accordion:{module:"accordion",attributes:{elements:{wrapper:{primary:"data-hs-accordion='wrapper'",aliases:[]},toggle:{primary:"data-hs-accordion='toggle'",aliases:[]},content:{primary:"data-hs-accordion='content'",aliases:[]},state:{primary:"data-hs-accordion-text='state'",aliases:[]}},properties:{default:"data-hs-accordion-default",open:"data-hs-accordion-open",closed:"data-hs-accordion-closed"}}},navbar:{module:"navbar",attributes:{elements:{wrapper:{primary:"data-hs-nav='wrapper'",aliases:[]},"skip-link":{primary:"data-hs-nav='skip-link'",aliases:[]}}},dropdown:{module:"dropdown",attributes:{elements:{wrapper:{primary:"data-hs-nav-dropdown='wrapper'",aliases:[]},list:{primary:"data-hs-nav-dropdown='list'",aliases:[]}},properties:{type:"data-hs-nav-dropdown-type"}},types:{hover:"Desktop behavior: hover + full keyboard navigation (ArrowDown/Up, Space, Enter, Escape)",click:"Mobile/accordion behavior: click only + simple keyboard (Space, Enter, Escape)"}},menu:{module:"menu",attributes:{elements:{wrapper:{primary:"data-hs-nav-menu='wrapper'",aliases:[]},button:{primary:"data-hs-nav-menu='button'",aliases:[]}}}},"arrow-navigation":{module:"arrow-navigation"}},toc:{module:"toc",attributes:{elements:{content:{primary:"data-hs-toc='content'",aliases:[]},list:{primary:"data-hs-toc='list'",aliases:[]}}},"progress-bar":{module:"progress-bar",attributes:{elements:{wrapper:{primary:"data-hs-toc-progress='wrapper'",aliases:[]},element:{primary:"data-hs-toc-progress='element'",aliases:[]}}}}},pagination:{module:"pagination",attributes:{elements:{wrapper:{primary:"data-hs-pagination='wrapper'",aliases:[]},list:{primary:"data-hs-pagination='list'",aliases:[]},controls:{primary:"data-hs-pagination='controls'",aliases:[]},previous:{primary:"data-hs-pagination='previous'",aliases:[]},next:{primary:"data-hs-pagination='next'",aliases:[]},counter:{primary:"data-hs-pagination='counter'",aliases:[]},dots:{primary:"data-hs-pagination='dots'",aliases:[]}},properties:{show:"data-hs-pagination-show",showMobile:"data-hs-pagination-show-mobile"}}},comparison:{module:"comparison",attributes:{elements:{wrapper:{primary:"data-hs-comparison='wrapper'",aliases:[]},"template-list":{primary:"data-hs-comparison-template='list'",aliases:[]},"template-item":{primary:"data-hs-comparison-template='item'",aliases:[]},"template-name":{primary:"data-hs-comparison-template='name'",aliases:[]},"template-description":{primary:"data-hs-comparison-template='description'",aliases:[]},"template-before-image":{primary:"data-hs-comparison-template='before-image'",aliases:[]},"template-after-image":{primary:"data-hs-comparison-template='after-image'",aliases:[]},name:{primary:"data-hs-comparison='name'",aliases:[]},description:{primary:"data-hs-comparison='description'",aliases:[]},"image-wrapper":{primary:"data-hs-comparison='image-wrapper'",aliases:[]},"before-image":{primary:"data-hs-comparison-image='before'",aliases:[]},"after-image":{primary:"data-hs-comparison-image='after'",aliases:[]},slider:{primary:"data-hs-comparison='slider'",aliases:[]},pagination:{primary:"data-hs-comparison='pagination'",aliases:[]}},properties:{modeType:"data-hs-comparison-mode",navType:"data-hs-comparison-nav"}}},tabs:{module:"tabs",attributes:{elements:{wrapper:{primary:"data-hs-tab='wrapper'",aliases:[]},links:{primary:"data-hs-tab='links'",aliases:[]},list:{primary:"data-hs-tab='list'",aliases:[]}},properties:{autoplay:"data-hs-tab-autoplay",duration:"data-hs-tab-duration",hover:"data-hs-tab-hover",animation:"data-hs-tab-animation",animationDuration:"data-hs-tab-animation-duration",controls:"data-hs-tab-controls"}},cssVars:{progress:"progress"}},modal:{module:"modal",attributes:{elements:{wrapper:{primary:"data-hs-modal='wrapper'",aliases:[]},close:{primary:"data-hs-modal='close'",aliases:[]}},properties:{id:"data-hs-modal-id",open:"data-hs-modal-open"}}},form:{honeypot:{module:"honeypot",attributes:{elements:{"form-handler":{primary:"data-hs-form='form-handler'",aliases:[]}}}},range:{module:"range",attributes:{elements:{wrapper:{primary:"data-hs-form-range='wrapper'",aliases:[]},output:{primary:"data-hs-form-range='output'",aliases:[]}}},cssVars:{progress:"progress"}},test:{module:"form-test",attributes:{elements:{wrapper:{primary:"data-hs-form-test='wrapper'",aliases:[]},info:{primary:"data-hs-form-test='info'",aliases:[]}}}},select:{module:"select",attributes:{elements:{wrapper:{primary:"data-hs-form-select='wrapper'",aliases:[]},list:{primary:"data-hs-form-select='list'",aliases:[]},button:{primary:"data-hs-form-select='button'",aliases:[]}}},states:{module:"select-states",attributes:{elements:{states:{primary:"data-hs-form-select='states'",aliases:[]}}}},"custom-select":{module:"select-custom",attributes:{elements:{wrapper:{primary:"data-hs-form-select='wrapper'",aliases:[]},list:{primary:"data-hs-form-select='list'",aliases:[]},button:{primary:"data-hs-form-select='button'",aliases:[]}}}}}}},animations:{}};function e(a,e){const t=a.attributes?.elements?.[e];if(!t)return console.warn(`[attributeSelector] No config for element: ${e}`),"";return[`[${t.primary}]`,...(t.aliases||[]).map(a=>`[${a}]`)].join(", ")}function t(a,t,s=document){const r=e(a,t);return s.querySelectorAll(r)}function s(a,t,s=document){const r=e(a,t);return s.querySelector(r)}function r(){return document.documentElement.getAttributeNames().some(a=>a.startsWith("data-wf-"))}async function i(){return new Promise(a=>{const e=()=>{const t=document.documentElement,s=t.classList.contains("w-mod-ix3"),r=t.hasAttribute("data-wf-ix-ready");s||r?a():setTimeout(e,50)};e()})}let o=!1,n=0,l=0,c=!1;function d(){if(c||!h())return;const a=window.gsap;let e=window.scrollY,t=performance.now(),s=0,r=0;window.ScrollTrigger.create({onUpdate:()=>{const a=window.scrollY,r=performance.now(),i=a-e,o=r-t;i>0?l=1:i<0&&(l=-1),o>0&&(s=Math.abs(i)/o*1e3),e=a,t=r}}),a.ticker.add(()=>{r+=.08*(s-r),s*=.95,Math.abs(r)<.1&&(r=0),Math.abs(s)<.1&&(s=0),n=r}),c=!0}function m(){return n}function p(){return l}function u(){return void 0!==window.gsap}function h(){return void 0!==window.ScrollTrigger}function g(){return void 0!==window.Draggable}function y(a,e=!0){return u()?{gsap:window.gsap,ScrollTrigger:window.ScrollTrigger,Draggable:window.Draggable}:(e&&!o?(console.warn("[gsap] GSAP library not detected. Some animations will be skipped. Add GSAP to your project: https://greensock.com/docs/v3/Installation"),o=!0):a&&!o&&(console.warn(`[${a}] GSAP not available, module will use fallback behavior`),o=!0),null)}function f(a,e,t="warn"){const s=[];if(e.forEach(a=>{"ScrollTrigger"!==a||h()?"Draggable"!==a||g()||s.push("Draggable"):s.push("ScrollTrigger")}),0===s.length)return;const r=s.join(", "),i="error"===t?`[${a}] Missing required GSAP plugin(s): ${r}. Module will not work correctly. Add to your project: https://greensock.com/docs/v3/Installation`:`[${a}] Missing optional GSAP plugin(s): ${r}. Some features will be disabled. Add for full functionality: https://greensock.com/docs/v3/Installation`;"error"===t?console.error(i):console.warn(i)}function b(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}const w=Object.freeze(Object.defineProperty({__proto__:null,getGsap:y,getScrollDirection:p,getScrollVelocity:m,hasDraggable:g,hasGsap:u,hasScrollTrigger:h,initScrollAnimations:async function(){if(await i(),u()&&document.body.scrollHeight>window.innerHeight){const a=window.gsap,e=window.scrollY;a.set(window,{scrollTo:e+1}),a.set(window,{scrollTo:e})}},initScrollVelocityTracking:d,prefersReducedMotion:b,warnMissingDependencies:f},Symbol.toStringTag,{value:"Module"}));const v=new class{#a=new Map;async animate(e,t,s={}){const r=y("heightAnimator");if(!r)return;const{gsap:i}=r,o=a._global.attributes.height,n=a._global.attributes.heightValue,l=a._global.attributes.heightDuration,c=a._global.attributes.heightEase,d=e.hasAttribute?.(o)&&e.getAttribute(o)===n?e:e.querySelector?.(`[${o}="${n}"]`)||e,m=this.#a.get(d);m&&(m.kill(),this.#a.delete(d));let p=d.getAttribute(l),u=d.getAttribute(c);!p&&d.parentElement&&(p=d.parentElement.getAttribute(l)),!u&&d.parentElement&&(u=d.parentElement.getAttribute(c));let h=p?parseInt(p,10)/1e3:(s.duration||300)/1e3;b()&&(h=0);const g=u||s.ease||"power2.inOut",f=i.to(d,{height:t?"auto":0,duration:h,ease:g});this.#a.set(d,f);try{await f.then()}finally{this.#a.delete(d)}}setHeight(e,t){const s=y("heightAnimator");if(!s)return;const{gsap:r}=s,i=a._global.attributes.height,o=a._global.attributes.heightValue,n=e.hasAttribute?.(i)&&e.getAttribute(i)===o?e:e.querySelector?.(`[${i}="${o}"]`)||e;r.set(n,{height:t?"auto":0})}cancelAll(){this.#a.forEach(a=>a.kill()),this.#a.clear()}},k=v.animate.bind(v),A=v.setHeight.bind(v),S=a._global.apiName;let E=0;const M=[],x=[];let q=!0,_=null;function T(){if(!q)return null;if(_)return _;const a=window;return a.lenis&&"function"==typeof a.lenis.stop&&"function"==typeof a.lenis.start?(_=a.lenis,a.lenis):null}function D(){if(E++,1===E){const t=a._global.classes.modalOpen,s=a._global.classes.overflowHidden;document.body.classList.add(s,t);const r=T();if(r)try{r.stop()}catch(e){console.error("[modalManager] Error stopping Lenis:",e)}M.forEach(a=>{try{a()}catch(e){console.error("[modalManager] Error in open callback:",e)}})}}function $(){if(E--,0===E){const t=a._global.classes.modalOpen,s=a._global.classes.overflowHidden;document.body.classList.remove(s,t);const r=T();if(r)try{r.start()}catch(e){console.error("[modalManager] Error starting Lenis:",e)}x.forEach(a=>{try{a()}catch(e){console.error("[modalManager] Error in close callback:",e)}})}E<0&&(console.warn("[modalManager] Modal count went negative, resetting to 0"),E=0)}if("undefined"!=typeof window){const a=window;a[S]=a[S]||{},a[S].modal={open:D,close:$,getCount:function(){return E},isOpen:function(){return E>0},onOpen:function(a){return"function"!=typeof a?(console.warn("[modalManager] onModalOpen requires a function"),()=>{}):(M.push(a),()=>{const e=M.indexOf(a);e>-1&&M.splice(e,1)})},onClose:function(a){return"function"!=typeof a?(console.warn("[modalManager] onModalClose requires a function"),()=>{}):(x.push(a),()=>{const e=x.indexOf(a);e>-1&&x.splice(e,1)})},setLenisEnabled:function(a){q=a,a||(_=null)}}}const O=a._global.cssVars,V={state:O.prefix+O.state.name,clip:O.prefix+O.clip?.name};function j(a){const e=new Map;return{scan:async function(){const t=[],s=a.filter(a=>{const s=document.querySelector(a.selector);return s&&e.has(a.name)?(t.push({name:a.name,status:"already-loaded"}),!1):s}).map(a=>a.import().then(e=>({module:a,moduleExports:e,success:!0})).catch(e=>({module:a,error:e,success:!1}))),r=await Promise.allSettled(s);for(const a of r)if("fulfilled"===a.status&&a.value.success){const{module:s,moduleExports:r}=a.value;try{const{init:a}=r,i=void 0!==s.config?await a(s.config):await a();e.set(s.name,i),t.push({name:s.name,status:"loaded"})}catch(n){const a=n instanceof Error?n.message:String(n);console.error(`[orchestrator] Failed to initialize ${s.name}:`,n),t.push({name:s.name,status:"failed",error:a})}}else if("fulfilled"!==a.status||a.value.success)"rejected"===a.status&&console.error("[orchestrator] Unexpected error:",a.reason);else{const e=a.value,{module:s,error:r}=e,i=r instanceof Error?r.message:String(r);console.error(`[orchestrator] Failed to load ${s.name}:`,r),t.push({name:s.name,status:"failed",error:i})}const i=t.filter(a=>"loaded"===a.status),o=t.filter(a=>"failed"===a.status);return{results:t,loaded:i,failed:o}},destroy:function(){e.forEach((a,e)=>{try{a?.destroy&&a.destroy()}catch(t){console.error(`[orchestrator] Error destroying ${e}:`,t)}}),e.clear()}}}const P=a._global;export{s as a,e as b,a as c,y as d,k as e,$ as f,P as g,V as h,r as i,f as j,j as k,d as l,p as m,m as n,D as o,b as p,t as q,w as r,A as s,i as w};
1
+ const a={_global:{apiName:"hsfx",attributes:{height:"data-hs-height",heightValue:"element",heightDuration:"data-hs-height-duration",heightEase:"data-hs-height-ease",moduleType:"data-hs-module-type",module:"data-hs-module"},classes:{modalOpen:"hs-modal-open",overflowHidden:"u-overflow-hidden",displayContents:"u-display-contents",active:"is-active",gsap:"hs-gsap",loading:"hs-loading",loaded:"hs-loaded",ready:"hs-ready"},cssVars:{prefix:"--_hs---",state:{name:"state",values:{active:"1",inactive:"0"}},clip:{name:"clip"},scrollOffset:{name:"scroll-offset"}},clickable:{module:"global-clickable",attributes:{elements:{wrapper:{primary:"data-hs-clickable='wrapper'",aliases:[]},button:{primary:"data-hs-clickable='button'",aliases:[]}}}}},normalize:{sync:{module:"sync",attributes:{elements:{source:{primary:"data-hs-sync='source'",aliases:[]},target:{primary:"data-hs-sync='target'",aliases:[]},item:{primary:"data-hs-sync='item'",aliases:[]},ignore:{primary:"data-hs-sync='ignore'",aliases:[]}},properties:{syncId:"data-hs-sync-id",syncField:"data-hs-sync-field",syncMode:"data-hs-sync-mode",syncValue:"data-hs-sync-value"}}},clickable:{module:"clickable",attributes:{elements:{wrapper:{primary:"data-hs-clickable='wrapper'",aliases:[]}}},normalize:{module:"normalize",attributes:{elements:{wrapper:{primary:"data-hs-clickable='wrapper'",aliases:[]},button:{primary:"data-hs-clickable='button'",aliases:[]}}}}},dupe:{module:"dupe",attributes:{elements:{wrapper:{primary:"data-hs-dupe",aliases:[]}},properties:{count:"data-hs-dupe-count",hidden:"data-hs-dupe-hidden",noSelect:"data-hs-dupe-no-select"}},modes:{child:"Duplicates the first direct child element",self:"Duplicates the element itself as a sibling"},modifiers:{hidden:"Adds aria-hidden='true' to clones for accessibility",noSelect:"Adds user-select: none to clones to prevent text selection"},limits:{maxCount:20}},schema:{module:"schema",attributes:{elements:{breadcrumb:{primary:"data-hs-schema='breadcrumb'",aliases:[]},services:{primary:"data-hs-schema='services'",aliases:[]},areas:{primary:"data-hs-schema='areas'",aliases:[]},"list-item":{primary:"data-hs-schema-list='item'",aliases:[]},service:{primary:"data-hs-schema='service'",aliases:[]},"service-name":{primary:"data-hs-schema-service='name'",aliases:[]},"service-description":{primary:"data-hs-schema-service='description'",aliases:[]},"faq-page":{primary:"data-hs-schema='faq-page'",aliases:[]},"faq-question":{primary:"data-hs-schema-faq='question'",aliases:[]},"faq-answer":{primary:"data-hs-schema-faq='answer'",aliases:[]},"faq-published":{primary:"data-hs-schema-faq='published'",aliases:[]},"faq-modified":{primary:"data-hs-schema-faq='modified'",aliases:[]},blog:{primary:"data-hs-schema='blog'",aliases:[]},"blog-name":{primary:"data-hs-schema-blog='name'",aliases:[]},"blog-published":{primary:"data-hs-schema-blog='published'",aliases:[]},"blog-modified":{primary:"data-hs-schema-blog='modified'",aliases:[]},"blog-summary":{primary:"data-hs-schema-blog='summary'",aliases:[]},"blog-author-name":{primary:"data-hs-schema-blog='author-name'",aliases:[]},"blog-author-type":{primary:"data-hs-schema-blog='author-type'",aliases:[]},"blog-author-role":{primary:"data-hs-schema-blog='author-role'",aliases:[]},"blog-author-image":{primary:"data-hs-schema-blog='author-image'",aliases:[]}}}},replace:{module:"replace",attributes:{elements:{element:{primary:"data-hs-replace",aliases:[]},hide:{primary:"data-hs-replace-hide",aliases:[]}}}}},default:{transition:{module:"transition",attributes:{elements:{wrapper:{primary:"data-hs-transition='wrapper'",aliases:["data-hs-transition='element'"]},exitTrigger:{primary:"data-hs-transition-exit-trigger",aliases:[]},enterTrigger:{primary:"data-hs-transition-enter-trigger",aliases:[]},trigger:{primary:"data-hs-transition-trigger",aliases:[]},namespace:{primary:"data-hs-transition-namespace",aliases:[]},exitTime:{primary:"data-hs-transition-exit-time",aliases:["data-hs-exit-time"]},firstDelay:{primary:"data-hs-transition-first-delay",aliases:["data-hs-delay"]}}}},"smooth-scroll":{module:"smooth-scroll",attributes:{elements:{"offset-proxy":{primary:"data-hs-scroll-offset='proxy'",aliases:[]}}}},"active-link":{module:"active-link",attributes:{elements:{wrapper:{primary:"data-hs-active='wrapper'",aliases:[]},trigger:{primary:"data-trigger",aliases:[]}}}},accordion:{module:"accordion",attributes:{elements:{wrapper:{primary:"data-hs-accordion='wrapper'",aliases:[]},toggle:{primary:"data-hs-accordion='toggle'",aliases:[]},content:{primary:"data-hs-accordion='content'",aliases:[]},state:{primary:"data-hs-accordion-text='state'",aliases:[]}},properties:{default:"data-hs-accordion-default",open:"data-hs-accordion-open",closed:"data-hs-accordion-closed"}}},navbar:{module:"navbar",attributes:{elements:{wrapper:{primary:"data-hs-nav='wrapper'",aliases:[]},"skip-link":{primary:"data-hs-nav='skip-link'",aliases:[]}}},dropdown:{module:"dropdown",attributes:{elements:{wrapper:{primary:"data-hs-nav-dropdown='wrapper'",aliases:[]},list:{primary:"data-hs-nav-dropdown='list'",aliases:[]}},properties:{type:"data-hs-nav-dropdown-type"}},types:{hover:"Desktop behavior: hover + full keyboard navigation (ArrowDown/Up, Space, Enter, Escape)",click:"Mobile/accordion behavior: click only + simple keyboard (Space, Enter, Escape)"}},menu:{module:"menu",attributes:{elements:{wrapper:{primary:"data-hs-nav-menu='wrapper'",aliases:[]},button:{primary:"data-hs-nav-menu='button'",aliases:[]}}}},"arrow-navigation":{module:"arrow-navigation"}},toc:{module:"toc",attributes:{elements:{content:{primary:"data-hs-toc='content'",aliases:[]},list:{primary:"data-hs-toc='list'",aliases:[]}}},"progress-bar":{module:"progress-bar",attributes:{elements:{wrapper:{primary:"data-hs-toc-progress='wrapper'",aliases:[]},element:{primary:"data-hs-toc-progress='element'",aliases:[]}}}}},pagination:{module:"pagination",attributes:{elements:{wrapper:{primary:"data-hs-pagination='wrapper'",aliases:[]},list:{primary:"data-hs-pagination='list'",aliases:[]},controls:{primary:"data-hs-pagination='controls'",aliases:[]},previous:{primary:"data-hs-pagination='previous'",aliases:[]},next:{primary:"data-hs-pagination='next'",aliases:[]},counter:{primary:"data-hs-pagination='counter'",aliases:[]},dots:{primary:"data-hs-pagination='dots'",aliases:[]}},properties:{show:"data-hs-pagination-show",showMobile:"data-hs-pagination-show-mobile"}}},comparison:{module:"comparison",attributes:{elements:{wrapper:{primary:"data-hs-comparison='wrapper'",aliases:[]},"template-list":{primary:"data-hs-comparison-template='list'",aliases:[]},"template-item":{primary:"data-hs-comparison-template='item'",aliases:[]},"template-name":{primary:"data-hs-comparison-template='name'",aliases:[]},"template-description":{primary:"data-hs-comparison-template='description'",aliases:[]},"template-before-image":{primary:"data-hs-comparison-template='before-image'",aliases:[]},"template-after-image":{primary:"data-hs-comparison-template='after-image'",aliases:[]},name:{primary:"data-hs-comparison='name'",aliases:[]},description:{primary:"data-hs-comparison='description'",aliases:[]},"image-wrapper":{primary:"data-hs-comparison='image-wrapper'",aliases:[]},"before-image":{primary:"data-hs-comparison-image='before'",aliases:[]},"after-image":{primary:"data-hs-comparison-image='after'",aliases:[]},slider:{primary:"data-hs-comparison='slider'",aliases:[]},pagination:{primary:"data-hs-comparison='pagination'",aliases:[]}},properties:{modeType:"data-hs-comparison-mode",navType:"data-hs-comparison-nav"}}},tabs:{module:"tabs",attributes:{elements:{wrapper:{primary:"data-hs-tab='wrapper'",aliases:[]},links:{primary:"data-hs-tab='links'",aliases:[]},list:{primary:"data-hs-tab='list'",aliases:[]}},properties:{autoplay:"data-hs-tab-autoplay",duration:"data-hs-tab-duration",hover:"data-hs-tab-hover",animation:"data-hs-tab-animation",animationDuration:"data-hs-tab-animation-duration",controls:"data-hs-tab-controls"}},cssVars:{progress:"progress"}},modal:{module:"modal",attributes:{elements:{wrapper:{primary:"data-hs-modal='wrapper'",aliases:[]},close:{primary:"data-hs-modal='close'",aliases:[]}},properties:{id:"data-hs-modal-id",open:"data-hs-modal-open"}}},form:{persist:{module:"persist",attributes:{elements:{field:{primary:"data-hs-form-persist",aliases:[]}}}},honeypot:{module:"honeypot",attributes:{elements:{"form-handler":{primary:"data-hs-form='form-handler'",aliases:[]}}}},range:{module:"range",attributes:{elements:{wrapper:{primary:"data-hs-form-range='wrapper'",aliases:[]},output:{primary:"data-hs-form-range='output'",aliases:[]}}},cssVars:{progress:"progress"}},test:{module:"form-test",attributes:{elements:{wrapper:{primary:"data-hs-form-test='wrapper'",aliases:[]},info:{primary:"data-hs-form-test='info'",aliases:[]}}}},select:{module:"select",attributes:{elements:{wrapper:{primary:"data-hs-form-select='wrapper'",aliases:[]},list:{primary:"data-hs-form-select='list'",aliases:[]},button:{primary:"data-hs-form-select='button'",aliases:[]}}},states:{module:"select-states",attributes:{elements:{states:{primary:"data-hs-form-select='states'",aliases:[]}}}},"custom-select":{module:"select-custom",attributes:{elements:{wrapper:{primary:"data-hs-form-select='wrapper'",aliases:[]},list:{primary:"data-hs-form-select='list'",aliases:[]},button:{primary:"data-hs-form-select='button'",aliases:[]}}}}}}},animations:{}};function e(a,e){const t=a.attributes?.elements?.[e];if(!t)return console.warn(`[attributeSelector] No config for element: ${e}`),"";return[`[${t.primary}]`,...(t.aliases||[]).map(a=>`[${a}]`)].join(", ")}function t(a,t,s=document){const r=e(a,t);return s.querySelectorAll(r)}function s(a,t,s=document){const r=e(a,t);return s.querySelector(r)}function r(){return document.documentElement.getAttributeNames().some(a=>a.startsWith("data-wf-"))}async function i(){return new Promise(a=>{const e=()=>{const t=document.documentElement,s=t.classList.contains("w-mod-ix3"),r=t.hasAttribute("data-wf-ix-ready");s||r?a():setTimeout(e,50)};e()})}let o=!1,n=0,l=0,c=!1;function d(){if(c||!h())return;const a=window.gsap;let e=window.scrollY,t=performance.now(),s=0,r=0;window.ScrollTrigger.create({onUpdate:()=>{const a=window.scrollY,r=performance.now(),i=a-e,o=r-t;i>0?l=1:i<0&&(l=-1),o>0&&(s=Math.abs(i)/o*1e3),e=a,t=r}}),a.ticker.add(()=>{r+=.08*(s-r),s*=.95,Math.abs(r)<.1&&(r=0),Math.abs(s)<.1&&(s=0),n=r}),c=!0}function m(){return n}function p(){return l}function u(){return void 0!==window.gsap}function h(){return void 0!==window.ScrollTrigger}function g(){return void 0!==window.Draggable}function y(a,e=!0){return u()?{gsap:window.gsap,ScrollTrigger:window.ScrollTrigger,Draggable:window.Draggable}:(e&&!o?(console.warn("[gsap] GSAP library not detected. Some animations will be skipped. Add GSAP to your project: https://greensock.com/docs/v3/Installation"),o=!0):a&&!o&&(console.warn(`[${a}] GSAP not available, module will use fallback behavior`),o=!0),null)}function f(a,e,t="warn"){const s=[];if(e.forEach(a=>{"ScrollTrigger"!==a||h()?"Draggable"!==a||g()||s.push("Draggable"):s.push("ScrollTrigger")}),0===s.length)return;const r=s.join(", "),i="error"===t?`[${a}] Missing required GSAP plugin(s): ${r}. Module will not work correctly. Add to your project: https://greensock.com/docs/v3/Installation`:`[${a}] Missing optional GSAP plugin(s): ${r}. Some features will be disabled. Add for full functionality: https://greensock.com/docs/v3/Installation`;"error"===t?console.error(i):console.warn(i)}function b(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}const w=Object.freeze(Object.defineProperty({__proto__:null,getGsap:y,getScrollDirection:p,getScrollVelocity:m,hasDraggable:g,hasGsap:u,hasScrollTrigger:h,initScrollAnimations:async function(){if(await i(),u()&&document.body.scrollHeight>window.innerHeight){const a=window.gsap,e=window.scrollY;a.set(window,{scrollTo:e+1}),a.set(window,{scrollTo:e})}},initScrollVelocityTracking:d,prefersReducedMotion:b,warnMissingDependencies:f},Symbol.toStringTag,{value:"Module"}));const v=new class{#a=new Map;async animate(e,t,s={}){const r=y("heightAnimator");if(!r)return;const{gsap:i}=r,o=a._global.attributes.height,n=a._global.attributes.heightValue,l=a._global.attributes.heightDuration,c=a._global.attributes.heightEase,d=e.hasAttribute?.(o)&&e.getAttribute(o)===n?e:e.querySelector?.(`[${o}="${n}"]`)||e,m=this.#a.get(d);m&&(m.kill(),this.#a.delete(d));let p=d.getAttribute(l),u=d.getAttribute(c);!p&&d.parentElement&&(p=d.parentElement.getAttribute(l)),!u&&d.parentElement&&(u=d.parentElement.getAttribute(c));let h=p?parseInt(p,10)/1e3:(s.duration||300)/1e3;b()&&(h=0);const g=u||s.ease||"power2.inOut",f=i.to(d,{height:t?"auto":0,duration:h,ease:g});this.#a.set(d,f);try{await f.then()}finally{this.#a.delete(d)}}setHeight(e,t){const s=y("heightAnimator");if(!s)return;const{gsap:r}=s,i=a._global.attributes.height,o=a._global.attributes.heightValue,n=e.hasAttribute?.(i)&&e.getAttribute(i)===o?e:e.querySelector?.(`[${i}="${o}"]`)||e;r.set(n,{height:t?"auto":0})}cancelAll(){this.#a.forEach(a=>a.kill()),this.#a.clear()}},k=v.animate.bind(v),A=v.setHeight.bind(v),S=a._global.apiName;let E=0;const M=[],x=[];let q=!0,_=null;function T(){if(!q)return null;if(_)return _;const a=window;return a.lenis&&"function"==typeof a.lenis.stop&&"function"==typeof a.lenis.start?(_=a.lenis,a.lenis):null}function D(){if(E++,1===E){const t=a._global.classes.modalOpen,s=a._global.classes.overflowHidden;document.body.classList.add(s,t);const r=T();if(r)try{r.stop()}catch(e){console.error("[modalManager] Error stopping Lenis:",e)}M.forEach(a=>{try{a()}catch(e){console.error("[modalManager] Error in open callback:",e)}})}}function $(){if(E--,0===E){const t=a._global.classes.modalOpen,s=a._global.classes.overflowHidden;document.body.classList.remove(s,t);const r=T();if(r)try{r.start()}catch(e){console.error("[modalManager] Error starting Lenis:",e)}x.forEach(a=>{try{a()}catch(e){console.error("[modalManager] Error in close callback:",e)}})}E<0&&(console.warn("[modalManager] Modal count went negative, resetting to 0"),E=0)}if("undefined"!=typeof window){const a=window;a[S]=a[S]||{},a[S].modal={open:D,close:$,getCount:function(){return E},isOpen:function(){return E>0},onOpen:function(a){return"function"!=typeof a?(console.warn("[modalManager] onModalOpen requires a function"),()=>{}):(M.push(a),()=>{const e=M.indexOf(a);e>-1&&M.splice(e,1)})},onClose:function(a){return"function"!=typeof a?(console.warn("[modalManager] onModalClose requires a function"),()=>{}):(x.push(a),()=>{const e=x.indexOf(a);e>-1&&x.splice(e,1)})},setLenisEnabled:function(a){q=a,a||(_=null)}}}const O=a._global.cssVars,V={state:O.prefix+O.state.name,clip:O.prefix+O.clip?.name};function j(a){const e=new Map;return{scan:async function(){const t=[],s=a.filter(a=>{const s=document.querySelector(a.selector);return s&&e.has(a.name)?(t.push({name:a.name,status:"already-loaded"}),!1):s}).map(a=>a.import().then(e=>({module:a,moduleExports:e,success:!0})).catch(e=>({module:a,error:e,success:!1}))),r=await Promise.allSettled(s);for(const a of r)if("fulfilled"===a.status&&a.value.success){const{module:s,moduleExports:r}=a.value;try{const{init:a}=r,i=void 0!==s.config?await a(s.config):await a();e.set(s.name,i),t.push({name:s.name,status:"loaded"})}catch(n){const a=n instanceof Error?n.message:String(n);console.error(`[orchestrator] Failed to initialize ${s.name}:`,n),t.push({name:s.name,status:"failed",error:a})}}else if("fulfilled"!==a.status||a.value.success)"rejected"===a.status&&console.error("[orchestrator] Unexpected error:",a.reason);else{const e=a.value,{module:s,error:r}=e,i=r instanceof Error?r.message:String(r);console.error(`[orchestrator] Failed to load ${s.name}:`,r),t.push({name:s.name,status:"failed",error:i})}const i=t.filter(a=>"loaded"===a.status),o=t.filter(a=>"failed"===a.status);return{results:t,loaded:i,failed:o}},destroy:function(){e.forEach((a,e)=>{try{a?.destroy&&a.destroy()}catch(t){console.error(`[orchestrator] Error destroying ${e}:`,t)}}),e.clear()}}}const P=a._global;export{s as a,e as b,a as c,y as d,k as e,$ as f,P as g,V as h,r as i,f as j,j as k,d as l,p as m,m as n,D as o,b as p,t as q,w as r,A as s,i as w};
package/dist/main.js CHANGED
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/hsfxnormalizeBr1nlr-y.js","assets/hsfxutilsBP6i-jwS.js","assets/hsfxdefaultCUvFNkfy.js","assets/hsfxanimationsBRfmYjgP.js"])))=>i.map(i=>d[i]);
2
- import{c as e}from"./assets/hsfxutilsBP6i-jwS.js";const t={},s=function(e,s,o){let r=Promise.resolve();if(s&&s.length>0){let e=function(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:"fulfilled",value:e}),e=>({status:"rejected",reason:e}))))};document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=o?.nonce||o?.getAttribute("nonce");r=e(s.map(e=>{if((e=function(e){return"https://cdn.jsdelivr.net/npm/@hsfx/attr@2.0.9/dist/"+e}(e))in t)return;t[e]=!0;const s=e.endsWith(".css"),o=s?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${e}"]${o}`))return;const r=document.createElement("link");return r.rel=s?"stylesheet":"modulepreload",s||(r.as="script"),r.crossOrigin="",r.href=e,a&&r.setAttribute("nonce",a),document.head.appendChild(r),s?new Promise((t,s)=>{r.addEventListener("load",t),r.addEventListener("error",()=>s(new Error(`Unable to preload CSS for ${e}`)))}):void 0}))}function a(e){const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(const e of t||[])"rejected"===e.status&&a(e.reason);return e().catch(a)})},o=e._global.apiName;(async()=>{if(window[o]&&!Array.isArray(window[o])&&window[o].loaded)return;const t=Array.isArray(window[o])?window[o]:[],r={normalize:()=>s(()=>import("./assets/hsfxnormalizeBr1nlr-y.js"),__vite__mapDeps([0,1])),default:()=>s(()=>import("./assets/hsfxdefaultCUvFNkfy.js"),__vite__mapDeps([2,1])),animations:()=>s(()=>import("./assets/hsfxanimationsBRfmYjgP.js"),__vite__mapDeps([3,1]))};let a=[...document.querySelectorAll(`script[type="module"][src="${import.meta.url}"]`)];0===a.length&&(a=[...document.querySelectorAll('script[type="module"][src*="@hsfx/attr"]')].filter(e=>{const t=e.src,s=import.meta.url,o=t.match(/@hsfx\/attr(@[\d.]+)?/)?.[0],r=s.match(/@hsfx\/attr(@[\d.]+)?/)?.[0];return o&&r&&o.split("@")[0]===r.split("@")[0]}));const n={isSPA:a.some(e=>"true"===e.getAttribute("data-hs-spa"))},l={normalize:{modules:["normalize"],parallel:!1},default:{modules:["default"],parallel:!0}},i=async e=>{const t=window[o];if(t.process.has(e))return t.modules[e]?.loading;t.process.add(e);const s=t.modules[e]||{};let a;t.modules[e]=s,s.loading=new Promise((e,t)=>{s.resolve=e,s.reject=t});try{const{init:o}=await r[e](),n=await o()||{};a=n.destroy;const l=n.result;return s.destroy=()=>{a?.(),t.process.delete(e)},s.restart=()=>{s.destroy?.(),t.load(e)},s.resolve?.(l),delete s.resolve,delete s.reject,l}catch(n){throw a?.(),s.reject?.(n),t.process.delete(e),n}},d=async e=>{const t=l[e];if(t.parallel){const e=t.modules.map(e=>i(e));await Promise.allSettled(e)}else for(const s of t.modules)await i(s)},c=async()=>{await Promise.allSettled([r.normalize(),r.default(),r.animations()]),await d("normalize");const e=d("default"),t=i("animations");await e,(()=>{const e=new CustomEvent(`${o}:dom-ready`);window.dispatchEvent(e)})();const{initScrollAnimations:a}=await s(async()=>{const{initScrollAnimations:e}=await import("./assets/hsfxutilsBP6i-jwS.js").then(e=>e.r);return{initScrollAnimations:e}},[]);Promise.all([t,a()]).catch(e=>{console.error(`[${o}] Phase 3 (animations + scroll trigger) failed:`,e)})},u=[];window[o]={scripts:a,settings:n,modules:{},process:new Set,load:i,loaded:!1,push(...e){for(const[t,s]of e)"function"==typeof s?this.modules[t]?.loading?.then(s):this.load(t)},destroy(){for(const e in this.modules)this.modules[e]?.destroy?.()},async reinitialize(){this.loaded=!1,this.destroy(),this.modules={},this.process=new Set,await this.scanForEmbedModules(),await c(),this.loaded=!0},async scanForEmbedModules(){document.querySelectorAll(".w-embed").forEach(e=>{e.querySelectorAll("script[data-hs-module]").forEach(e=>{const t=e.getAttribute("data-hs-module-type"),s=e.getAttribute("data-hs-module");if(t&&s){const e=`data-hs-${t}-${s}`;r[e]&&this.load(e)}})})},ready(e){"function"==typeof e&&(this.loaded?e():u.push(e))},status(e){return e?{loaded:!!this.modules[e],loading:this.process.has(e)}:{loaded:Object.keys(this.modules),loading:[...this.process],phases:l}}};(async()=>{window[o].push(...t),document.querySelectorAll("iframe").forEach(e=>{const t=e.src;t&&(e.src="",e.src=t)}),await c(),window[o].loaded=!0,document.documentElement.classList.add(e._global.classes.ready),u.forEach(e=>{try{e()}catch{}}),u.length=0})().catch(()=>{})})();export{s as _};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/hsfxnormalizeVKiJWGQE.js","assets/hsfxutilsMPToI1FZ.js","assets/hsfxdefaultDHOokRk4.js","assets/hsfxanimationsBGqbwIJd.js"])))=>i.map(i=>d[i]);
2
+ import{c as e}from"./assets/hsfxutilsMPToI1FZ.js";const t={},s=function(e,s,o){let r=Promise.resolve();if(s&&s.length>0){let e=function(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:"fulfilled",value:e}),e=>({status:"rejected",reason:e}))))};document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=o?.nonce||o?.getAttribute("nonce");r=e(s.map(e=>{if((e=function(e){return"https://cdn.jsdelivr.net/npm/@hsfx/attr@2.0.11/dist/"+e}(e))in t)return;t[e]=!0;const s=e.endsWith(".css"),o=s?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${e}"]${o}`))return;const r=document.createElement("link");return r.rel=s?"stylesheet":"modulepreload",s||(r.as="script"),r.crossOrigin="",r.href=e,a&&r.setAttribute("nonce",a),document.head.appendChild(r),s?new Promise((t,s)=>{r.addEventListener("load",t),r.addEventListener("error",()=>s(new Error(`Unable to preload CSS for ${e}`)))}):void 0}))}function a(e){const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(const e of t||[])"rejected"===e.status&&a(e.reason);return e().catch(a)})},o=e._global.apiName;(async()=>{if(window[o]&&!Array.isArray(window[o])&&window[o].loaded)return;const t=Array.isArray(window[o])?window[o]:[],r={normalize:()=>s(()=>import("./assets/hsfxnormalizeVKiJWGQE.js"),__vite__mapDeps([0,1])),default:()=>s(()=>import("./assets/hsfxdefaultDHOokRk4.js"),__vite__mapDeps([2,1])),animations:()=>s(()=>import("./assets/hsfxanimationsBGqbwIJd.js"),__vite__mapDeps([3,1]))};let a=[...document.querySelectorAll(`script[type="module"][src="${import.meta.url}"]`)];0===a.length&&(a=[...document.querySelectorAll('script[type="module"][src*="@hsfx/attr"]')].filter(e=>{const t=e.src,s=import.meta.url,o=t.match(/@hsfx\/attr(@[\d.]+)?/)?.[0],r=s.match(/@hsfx\/attr(@[\d.]+)?/)?.[0];return o&&r&&o.split("@")[0]===r.split("@")[0]}));const n={isSPA:a.some(e=>"true"===e.getAttribute("data-hs-spa"))},l={normalize:{modules:["normalize"],parallel:!1},default:{modules:["default"],parallel:!0}},i=async e=>{const t=window[o];if(t.process.has(e))return t.modules[e]?.loading;t.process.add(e);const s=t.modules[e]||{};let a;t.modules[e]=s,s.loading=new Promise((e,t)=>{s.resolve=e,s.reject=t});try{const{init:o}=await r[e](),n=await o()||{};a=n.destroy;const l=n.result;return s.destroy=()=>{a?.(),t.process.delete(e)},s.restart=()=>{s.destroy?.(),t.load(e)},s.resolve?.(l),delete s.resolve,delete s.reject,l}catch(n){throw a?.(),s.reject?.(n),t.process.delete(e),n}},d=async e=>{const t=l[e];if(t.parallel){const e=t.modules.map(e=>i(e));await Promise.allSettled(e)}else for(const s of t.modules)await i(s)},c=async()=>{await Promise.allSettled([r.normalize(),r.default(),r.animations()]),await d("normalize");const e=d("default"),t=i("animations");await e,(()=>{const e=new CustomEvent(`${o}:dom-ready`);window.dispatchEvent(e)})();const{initScrollAnimations:a}=await s(async()=>{const{initScrollAnimations:e}=await import("./assets/hsfxutilsMPToI1FZ.js").then(e=>e.r);return{initScrollAnimations:e}},[]);Promise.all([t,a()]).catch(e=>{console.error(`[${o}] Phase 3 (animations + scroll trigger) failed:`,e)})},u=[];window[o]={scripts:a,settings:n,modules:{},process:new Set,load:i,loaded:!1,push(...e){for(const[t,s]of e)"function"==typeof s?this.modules[t]?.loading?.then(s):this.load(t)},destroy(){for(const e in this.modules)this.modules[e]?.destroy?.()},async reinitialize(){this.loaded=!1,this.destroy(),this.modules={},this.process=new Set,await this.scanForEmbedModules(),await c(),this.loaded=!0},async scanForEmbedModules(){document.querySelectorAll(".w-embed").forEach(e=>{e.querySelectorAll("script[data-hs-module]").forEach(e=>{const t=e.getAttribute("data-hs-module-type"),s=e.getAttribute("data-hs-module");if(t&&s){const e=`data-hs-${t}-${s}`;r[e]&&this.load(e)}})})},ready(e){"function"==typeof e&&(this.loaded?e():u.push(e))},status(e){return e?{loaded:!!this.modules[e],loading:this.process.has(e)}:{loaded:Object.keys(this.modules),loading:[...this.process],phases:l}}};(async()=>{window[o].push(...t),document.querySelectorAll("iframe").forEach(e=>{const t=e.src;t&&(e.src="",e.src=t)}),await c(),window[o].loaded=!0,document.documentElement.classList.add(e._global.classes.ready),u.forEach(e=>{try{e()}catch{}}),u.length=0})().catch(()=>{})})();export{s as _};
package/dist/main.js.br CHANGED
Binary file
package/dist/main.js.gz CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hsfx/attr",
3
- "version": "2.0.10",
3
+ "version": "2.0.12",
4
4
  "type": "module",
5
5
  "main": "dist/main.js",
6
6
  "license": "UNLICENSED",
@@ -1 +0,0 @@
1
- import{q as e,a as t,g as n,b as r,c as o}from"./hsfxutilsBP6i-jwS.js";function s(){return function(){const e=window.location.origin,t=e=>{const t=document.querySelector(`[data-hs-replace="${e}"]`);return t?.textContent?.trim()||""},n=t("company"),r=t("phone"),o=t("email"),s=t("city"),i=t("state"),a=t("zipcode"),c={"@context":"https://schema.org","@type":"LocalBusiness",name:n,url:e,telephone:r,email:o},l=document.querySelector('[data-hs-replace="business-logo"] img');l&&l.src&&(c.image=l.src);const d={"@type":"PostalAddress",addressLocality:s,addressRegion:i,postalCode:a,addressCountry:"US"},u=t("street-address");u&&(d.streetAddress=u),c.address=d;const m=t("business-latitude"),p=t("business-longitude");m&&p&&(c.geo={"@type":"GeoCoordinates",latitude:m,longitude:p});const h=["facebook","instagram","linkedin","pinterest","tiktok","x","youtube"].map(e=>(e=>{const t=document.querySelector(`[data-hs-replace="${e}"]`);return t?.href||""})(e)).filter(e=>e&&""!==e.trim()&&!e.includes("placeholder"));h.length>0&&(c.sameAs=h);const f=document.querySelector('[data-hs-schema="services"]');if(f){const e=f.querySelectorAll('[data-hs-schema-list="item"]'),t=Array.from(e).map(e=>e.textContent?.trim()).filter(e=>e&&""!==e);t.length>0&&(c.serviceType=t)}const y=document.querySelector('[data-hs-schema="areas"]');if(y){const e=y.querySelectorAll('[data-hs-schema-list="item"]'),t=Array.from(e).map(e=>({"@type":"City",name:e.textContent?.trim()||""})).filter(e=>e.name&&""!==e.name);t.length>0&&(c.areaServed=t)}const g=document.createElement("script");g.type="application/ld+json",g.text=JSON.stringify(c),document.head.appendChild(g);const b=document.querySelector('[data-hs-schema="breadcrumb"]')?.textContent?.trim()||"",A=window.location.pathname.split("/").filter(e=>""!==e);if(A.length>0){const t={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Home",item:e}]},n=A[0],r=n.split("-").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");t.itemListElement.push({"@type":"ListItem",position:2,name:r,item:e+"/"+n}),b&&t.itemListElement.push({"@type":"ListItem",position:3,name:b,item:window.location.href});const o=document.createElement("script");o.type="application/ld+json",o.text=JSON.stringify(t),document.head.appendChild(o)}if(document.querySelector('[data-hs-accordion-type="faq"]')){const e=[];if(document.querySelectorAll('[data-hs-accordion="list"]').forEach(t=>{t.querySelectorAll('[data-hs-accordion-type="faq"]').forEach(t=>{const n=t.querySelector('[data-hs-accordion="toggle"]'),r=t.querySelector('[data-hs-accordion="content"]');if(n&&r){const t=n.textContent?.trim(),o=r.innerHTML.trim();e.push({"@type":"Question",name:t,acceptedAnswer:{"@type":"Answer",text:o}})}})}),e.length>0){const t={"@context":"https://schema.org","@type":"FAQPage",mainEntity:e},n=document.createElement("script");n.type="application/ld+json",n.text=JSON.stringify(t),document.head.appendChild(n)}}const x=document.querySelector('[data-hs-schema-service="name"]'),S=document.querySelector('[data-hs-schema-service="description"]');if(x&&S){const e=x.textContent?.trim()||"",t=S.textContent?.trim()||"";if(e&&t){const n={"@context":"https://schema.org","@type":"Service",name:e,description:t},r=document.createElement("script");r.type="application/ld+json",r.text=JSON.stringify(n),document.head.appendChild(r)}}else(x||S)&&console.warn('[schema] Service page schema requires both "name" and "description" elements');const q=document.querySelector('[data-hs-schema-faq="question"]'),C=document.querySelector('[data-hs-schema-faq="answer"]'),E=document.querySelector('[data-hs-schema-faq="published"]'),w=document.querySelector('[data-hs-schema-faq="modified"]');if(q&&C&&E&&w){const e=q.textContent?.trim()||"",t=C.innerHTML.trim(),n=E.textContent?.trim()||"",r=w.textContent?.trim()||"";if(e&&t&&n&&r){const o={"@context":"https://schema.org","@type":"QAPage",mainEntity:{"@type":"Question",name:e,text:e,answerCount:1,datePublished:n,dateModified:r,acceptedAnswer:{"@type":"Answer",text:t}}},s=document.createElement("script");s.type="application/ld+json",s.text=JSON.stringify(o),document.head.appendChild(s)}}else if(q||C||E||w){const e=[];q||e.push("question"),C||e.push("answer"),E||e.push("published"),w||e.push("modified"),console.warn(`[schema] FAQ page schema missing required fields: ${e.join(", ")}`)}const v=document.querySelector('[data-hs-schema-blog="name"]'),N=document.querySelector('[data-hs-schema-blog="published"]'),$=document.querySelector('[data-hs-schema-blog="modified"]'),F=document.querySelector('[data-hs-schema-blog="summary"]'),L=document.querySelector('[data-hs-schema-blog="author-name"]'),k=document.querySelector('[data-hs-schema-blog="author-type"]');if(v&&N&&$&&F&&L&&k){const e=v.textContent?.trim()||"",n=N.textContent?.trim()||"",r=$.textContent?.trim()||"",o=F.textContent?.trim()||"",s=L.textContent?.trim()||"",i=k.textContent?.trim()||"Organization",a=document.querySelector('[data-hs-schema-blog="author-role"]'),c=document.querySelector('[data-hs-schema-blog="author-image"]'),l=a?.textContent?.trim()||"",d=c?.src||"",u=t("company"),m=document.querySelector('[data-hs-replace="business-logo"] img'),p=m?m.src:"";let h;"Person"===i?(h={"@type":"Person",name:s},l&&(h.jobTitle=l),d&&(h.image=d)):(h={"@type":"Organization",name:s},p&&(h.logo=p));const f={"@context":"https://schema.org","@type":"BlogPosting",headline:e,description:o,datePublished:n,dateModified:r,author:h,publisher:{"@type":"Organization",name:u||s,logo:{"@type":"ImageObject",url:p}},mainEntityOfPage:{"@type":"WebPage","@id":window.location.href}},y=document.createElement("script");y.type="application/ld+json",y.text=JSON.stringify(f),document.head.appendChild(y)}else if(v||N||$||F||L||k){const e=[];v||e.push("name"),N||e.push("published"),$||e.push("modified"),F||e.push("summary"),L||e.push("author-name"),k||e.push("author-type"),console.warn(`[schema] Blog page schema missing required fields: ${e.join(", ")}`)}}(),{result:"schema initialized",destroy:()=>{}}}function i(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null);let r;for(;r=n.nextNode();)r.nodeValue?.trim()&&t.push(r);return t}function a(e){const t=[];return e.hasAttribute("href")&&t.push(e),t.push(...Array.from(e.querySelectorAll("[href]"))),t}function c(e){if(e.hasAttribute("src")){if(e.getAttribute("src"))return e}const t=e.querySelector("[src]");if(t){if(t.getAttribute("src"))return t}return null}function l(e,t,n){if(function(e,t){const n=t.attributes.properties.syncField;return null!==e.querySelector(`[${n}]`)}(t,n))return void function(e,t,n){const r=n.attributes.properties.syncField;e.querySelectorAll(`[${r}]`).forEach(e=>{const n=e.getAttribute(r),o=t.querySelector(`[${r}="${n}"]`);if(!o)return;const s=c(e),a=c(o);if(s&&a){const e=s.getAttribute("src");e&&a.setAttribute("src",e)}else if(e.hasAttribute("href")&&o.hasAttribute("href")){const t=e.getAttribute("href");t&&o.setAttribute("href",t)}else{const t=i(e),n=t.length>0?t[0].nodeValue:e.textContent.trim();if(n){const e=i(o);e.length>0?e[0].nodeValue=n:o.textContent=n}}})}(e,t,n);const r=i(e),o=r.length>0?r[0].nodeValue:"",s=a(e),l=s.length>0?s[0].getAttribute("href"):"";if(o){i(t).forEach(e=>{e.nodeValue=o})}if(l){a(t).forEach(e=>{e.setAttribute("href",l)})}}const d="hs-dupe-no-transition";let u=!1;async function m(t){!function(){if(u)return;const e=document.createElement("style");e.textContent=`\n .${d},\n .${d} * {\n transition: none !important;\n animation: none !important;\n }\n `,document.head.appendChild(e),u=!0}();const n={processedElements:[]};return e(t,"wrapper").forEach(e=>{const t=e.getAttribute("data-hs-dupe");if(!t||"child"!==t&&"self"!==t)return void console.warn('[dupe] Invalid mode. Use "child" or "self":',e);const r=e.getAttribute("data-hs-dupe-count");let o=r?parseInt(r,10):1;(isNaN(o)||o<1)&&(console.warn("[dupe] Invalid count, using default of 1:",e),o=1),o>20&&(console.warn(`[dupe] Count of ${o} exceeds maximum of 20. Capping at 20.`),o=20);const s={hidden:e.hasAttribute("data-hs-dupe-hidden"),noSelect:e.hasAttribute("data-hs-dupe-no-select")};"child"===t?function(e,t,n,r){const o=e.children[0];if(!o)return;const s=[];for(let i=0;i<t;i++){const t=o.cloneNode(!0);t.classList.add(d),p(t,n),e.appendChild(t),s.push(t),t.offsetHeight,requestAnimationFrame(()=>{t.classList.remove(d)})}r.processedElements.push({element:e,mode:"child",clones:s})}(e,o,s,n):"self"===t&&function(e,t,n,r){const o=e.parentNode;if(!o)return void console.warn("[dupe] Element has no parent, cannot duplicate self:",e);const s=[];let i=e;for(let a=0;a<t;a++){const t=e.cloneNode(!0);t.classList.add(d),t.removeAttribute("data-hs-dupe"),t.removeAttribute("data-hs-dupe-count"),t.removeAttribute("data-hs-dupe-hidden"),t.removeAttribute("data-hs-dupe-no-select"),p(t,n),i.nextSibling?o.insertBefore(t,i.nextSibling):o.appendChild(t),s.push(t),i=t,t.offsetHeight,requestAnimationFrame(()=>{t.classList.remove(d)})}r.processedElements.push({element:e,mode:"self",clones:s})}(e,o,s,n)}),{result:`dupe processed ${n.processedElements.length} elements`,destroy:()=>{}}}function p(e,t){if(t.hidden&&e.setAttribute("aria-hidden","true"),t.noSelect){const t=e;t.style.userSelect="none",t.style.webkitUserSelect="none",t.style.msUserSelect="none"}}async function h(){const i={destroyFunctions:[]},a=o.normalize;try{const d=s();d&&"destroy"in d&&"function"==typeof d.destroy&&i.destroyFunctions.push(d.destroy);const u=(c=o.normalize?.replace,function(){const e=new Map,t=r(c,"element");document.querySelectorAll(t).forEach(t=>{const n=t.cloneNode(!0),o=r(c,"hide");n.querySelectorAll(o).forEach(e=>{const t=c.attributes.elements.hide.primary.match(/data-hs-replace-hide/)[0],n=e.getAttribute(t);n&&n.split(" ").filter(e=>e.trim()).some(t=>e.classList.contains(t))&&e.remove()});const s=c.attributes.elements.element.primary.match(/data-hs-replace/)[0],i=t.getAttribute(s),a=n.textContent?.trim()||null,l=t.getAttribute("href");if(i&&(a||l)){const t={text:a,href:l};if(e.has(i)){const n=e.get(i);Array.isArray(n)?n.push(t):e.set(i,[n,t])}else e.set(i,t)}});const n=(new Date).getFullYear().toString(),o=["January","February","March","April","May","June","July","August","September","October","November","December"][(new Date).getMonth()];if(e.set("year",{text:n,href:null}),e.set("month",{text:o,href:null}),0===e.size)return;const s=document.createTreeWalker(document.body,NodeFilter.SHOW_TEXT,{acceptNode:t=>{const n=t.textContent||"";for(const r of e.keys())if(n.includes(`{{${r}}}`))return NodeFilter.FILTER_ACCEPT;return NodeFilter.FILTER_SKIP}}),i=[];let a;for(;a=s.nextNode();)i.push(a);i.forEach(t=>{let n=t.textContent||"",r=!1;for(const[o,s]of e.entries()){const e=`{{${o}}}`;if(n.includes(e)){let t=null;t=Array.isArray(s)?s.map(e=>e.text||e.href).filter(Boolean).join(", "):s.text||s.href,t&&(n=n.replace(new RegExp(e,"g"),t),r=!0)}}r&&(t.textContent=n)}),document.querySelectorAll("a[href]").forEach(t=>{let n=t.getAttribute("href")||"",r=!1;for(const[o,s]of e.entries()){const e=`{{${o}}}`;if(n.includes(e)){let t=null;if(Array.isArray(s)){const e=s[0];t=e.href||e.text}else{if(s.href){t=s.href,n=s.href,r=!0;break}s.text&&(t=s.text)}t&&!r&&(n=n.replace(new RegExp(e,"g"),t),r=!0)}}r&&t.setAttribute("href",n)});const l=document.querySelector("[data-hs-replace-test]");if(l){const t={};for(const[r,o]of e.entries()){const e=`{{${r}}}`;if(Array.isArray(o)){const n=o.map(e=>e.text||e.href).filter(Boolean).join(", ");t[r]={placeholder:e,value:n,type:`Array (${o.length} items)`,items:o.map(e=>e.text||e.href||"(empty)")}}else{const n=o.text||o.href||"(empty)";t[r]={placeholder:e,value:n,...o.text&&{text:o.text},...o.href&&{href:o.href}}}}const n=document.createElement("pre");n.textContent=JSON.stringify(t,null,2),l.innerHTML="",l.appendChild(document.createTextNode(`Replace Module Debug (${e.size} replacements):`)),l.appendChild(n)}}(),{result:"replace initialized",destroy:()=>{}});u&&"destroy"in u&&"function"==typeof u.destroy&&i.destroyFunctions.push(u.destroy);const p=await async function(n){const r=e(n,"source"),o=new Map,s=new Map;r.forEach(e=>{const t=e.getAttribute(n.attributes.properties.syncId),r=e.getAttribute(n.attributes.properties.syncField);t&&o.set(t,e),r&&s.set(r,e)});const i=e(n,"target");let a=0,c=0;return i.forEach(r=>{const i=r.getAttribute(n.attributes.properties.syncId),d=r.getAttribute(n.attributes.properties.syncField),u=r.getAttribute(n.attributes.properties.syncValue);let m;if(d&&u){if(m=s.get(d),!m)return void c++}else{if(!i)return void c++;if(m=o.get(i),!m)return void c++}const p=t(n,"item",r);if(!p){const e=d||i||"unknown";return void console.warn(`[sync] Target list "${e}" missing item template`)}const h="child"===p.getAttribute(n.attributes.properties.syncMode),f=t(n,"ignore",r);let y,g;if(u){const t=e(n,"item",m),r=Array.from(t).find(e=>e.getAttribute(n.attributes.properties.syncValue)===u);if(!r)return void console.warn(`[sync] No source item found with value "${u}" in field "${d}"`);y=[r]}else if(y=Array.from(e(n,"item",m)),0===y.length)return void console.warn(`[sync] Source list "${i}" has no items`);if(h){const e=p.firstElementChild;if(!e)return void console.warn(`[sync] Target list "${i}" has sync-mode="child" but item wrapper has no children`);g=e.cloneNode(!0)}else g=p.cloneNode(!0),g.removeAttribute(n.attributes.elements.item.primary.split("=")[0]);let b=!1;if(f){let e=f.nextElementSibling;for(;e;){if(e===p){b=!0;break}e=e.nextElementSibling}}if(h){for(;p.firstChild;)p.removeChild(p.firstChild);y.forEach(e=>{const t=g.cloneNode(!0);l(e,t,n),p.appendChild(t)}),p.removeAttribute(n.attributes.elements.item.primary.split("=")[0])}else{Array.from(r.children).forEach(e=>{e!==f&&e.remove()});const e=Array.from(y).map(e=>{const t=g.cloneNode(!0);return l(e,t,n),t});f?b?e.forEach(e=>{r.appendChild(e)}):e.forEach(e=>{r.insertBefore(e,f)}):e.forEach(e=>{r.appendChild(e)})}a++}),{result:`sync initialized (${a} synced, ${c} skipped)`,destroy:()=>{}}}(a.sync);p&&"destroy"in p&&"function"==typeof p.destroy&&i.destroyFunctions.push(p.destroy);const h=await m(a.dupe);h&&"destroy"in h&&"function"==typeof h.destroy&&i.destroyFunctions.push(h.destroy);const f=await async function(){const t={processedWrappers:[]};return e(n.clickable,"wrapper").forEach(e=>{const n=e.querySelector(":scope > button"),r=e.querySelector(":scope > a");if(!n||!r)return;const o=r.getAttribute("href");let s,i;o&&""!==o&&"#"!==o?(s=r,i=n):(s=n,i=r);const a="button"===s.getAttribute("data-hs-clickable");a||s.setAttribute("data-hs-clickable","button"),i.remove(),t.processedWrappers.push({wrapper:e,keptElement:s,wasLink:s===r,addedAttribute:!a})}),{result:`clickable processed ${t.processedWrappers.length} wrappers`,destroy:()=>{}}}();return f&&"destroy"in f&&"function"==typeof f.destroy&&i.destroyFunctions.push(f.destroy),{result:"normalize initialized",destroy:()=>{i.destroyFunctions.reverse().forEach(e=>{try{e()}catch(t){console.error("[normalize] Error during cleanup:",t)}}),i.destroyFunctions.length=0}}}catch(d){throw console.error("[normalize] Initialization failed:",d),i.destroyFunctions.reverse().forEach(e=>{try{e()}catch(t){console.error("[normalize] Error during error cleanup:",t)}}),d}var c}export{h as init};
Binary file
Binary file