mp-design-system 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/build/js/app.js +1 -1
- package/dist/build/js/app.js.map +1 -1
- package/dist/build/scss/main.css +1 -1
- package/dist/build/scss/main.css.map +1 -1
- package/package.json +1 -1
- package/src/_includes/components/input/input.config.js +1 -1
- package/src/_includes/components/input/input.njk +2 -0
- package/src/_includes/components/input/input.scss +5 -1
- package/src/assets/js/imports/off-canvas.js +6 -0
- package/src/assets/scss/objects/off-canvas.scss +1 -1
package/dist/build/js/app.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
(()=>{function e(e){e.addEventListener("click",(e=>{e.currentTarget.parentElement.classList.toggle("c-accordion__item--open")}))}var t=function(){Array.from(document.querySelectorAll(".c-accordion__title")).forEach(e)};var o=function(){let e=0;const t=document.querySelectorAll(".c-hero__image-bg"),o=document.querySelectorAll(".c-hero__image-fg");o.length>0&&setInterval((()=>{for(var c of t)c.style.opacity=0;for(var n of(e=e!=t.length-1?e+1:0,t[e].style.opacity=1,o))n.style.opacity=0;o[e].style.opacity=1}),5e3)};var c=function(){const e=document.getElementById("clearForm");e&&e.addEventListener("click",(function(){this.closest("form").elements.forEach((e=>{if(""!=e.value){if("text"==e.type.toLowerCase()||"email"==e.type.toLowerCase()||"tel"==e.type.toLowerCase()||"select-one"==e.type.toLowerCase()||"textarea"==e.type.toLowerCase())return void(e.value="");if("checkbox"==e.type.toLowerCase())return void(e.checked=!1)}}))}))};function n(e){const t=e.querySelector(".c-table tbody"),o=e.querySelector(".c-table thead"),c=e.querySelector(".c-comparison__mobile");if(!t||!o||!c)return;const n=Array.from(o.children[0].children).filter(((e,t)=>t)).map((e=>({info:e.innerHTML,table:[]})));Array.from(t.children).forEach((e=>{if(e.classList.contains("c-table__title"))n.forEach((t=>{t.table.push({type:"title",title:e.children[0].textContent})}));else{const t=Array.from(e.children),o=t.shift();t.forEach(((e,t)=>{n[t].table.push({type:"row",key:o.textContent,value:e.innerHTML})}))}})),n.forEach((e=>{const t=function(e){const t=document.createElement("article");return t.innerHTML=`<div class="c-comparison__content">\n ${e.info}\n </div>\n <table class="c-table">\n ${e.table.map((e=>"title"===e.type?`<tr class="c-table__title"><th colspan="2">${e.title}</th></tr>`:`<tr>\n <td>${e.key}</td>\n <td>${e.value}</td>\n </tr>`)).join("")}\n </table>`,t}(e);c.appendChild(t)}))}var r=function(){document.querySelectorAll(".c-comparison").forEach(n)};var a=function(){const e=document.querySelectorAll(".c-gallery__main .c-gallery__slide"),t=document.querySelectorAll(".c-gallery__thumbnails .c-gallery__slide");function o(){const e=document.querySelector(".c-gallery__main").cloneNode(!0);e.classList.remove("c-gallery__main"),e.classList.add("c-lightbox"),e.querySelectorAll(".c-gallery__slide").forEach((function(e){if(e.classList.contains("c-gallery__video")&&e.remove(),!e.classList.contains("c-gallery__video")){var t=e.querySelector("img");""!=t.srcset&&t.removeAttribute("srcset")}e.classList.add("c-lightbox__slide"),e.classList.remove("c-gallery__slide")})),document.body.appendChild(e),e.insertAdjacentHTML("beforeend",'<a class="c-lightbox__prev"></a><a class="c-lightbox__next"></a>'),e.querySelector(".c-lightbox__prev").addEventListener("click",(function(){const t=e.querySelector(".active"),o=e.querySelector('[data-slide="'+(parseInt(t.dataset.slide)-1)+'"]');null!=o&&(t.classList.remove("active"),o.classList.add("active"))})),e.querySelector(".c-lightbox__next").addEventListener("click",(function(){const t=e.querySelector(".active"),o=e.querySelector('[data-slide="'+(parseInt(t.dataset.slide)+1)+'"]');null!=o&&(t.classList.remove("active"),o.classList.add("active"))})),e.addEventListener("click",(function(t){t.target===t.currentTarget&&e.remove()}))}t.forEach((o=>o.addEventListener("click",(function(c){t.forEach((function(e){e!=c.target.parentNode&&e.classList.remove("active")})),c.target.parentNode.classList.add("active"),e.forEach((function(e){e.dataset.slide==o.dataset.slide?e.classList.add("active"):e.classList.remove("active")}))})))),e.forEach((function(e){e.classList.contains("c-gallery__video")||e.addEventListener("click",o)}))};const i=(e,t,o)=>((e,t=0,o=1)=>Math.min(o,Math.max(t,e)))((o-e)/(t-e));var l=function(){let e=0;const t=document.querySelector(".c-hero__canvas");if(!t)return;const o=t.getContext("2d"),c=!window.matchMedia("(prefers-reduced-motion: no-preference)").matches,n=147,r=.25;let a,l,s,d,u,f=[];function h(){a=t.scrollWidth,l=t.scrollHeight,o.canvas.width=a,o.canvas.height=l,s=Math.ceil(a/n),d=Math.ceil(l/n),u=(s+1)*(d+1);const e=function(e){const t=[...e];for(let e=t.length-1;e>0;e--){let o=Math.floor(Math.random()*(e+1));[t[e],t[o]]=[t[o],t[e]]}return t}(Array.from({length:u},((e,t)=>t)));f=[];for(let t=0;t<=s;t++)for(let o=0;o<=d;o++)f.push({counter:e.shift(),direction:Math.random()>.5?r:-.25,x:n*(t+1)-147,y:n*(o+1)-73.5})}window.addEventListener("resize",h),h(),function n(){e+=.005,o.clearRect(0,0,t.width,t.height),o.beginPath();for(let c=t.width;c>0;c--)o.lineTo(c,.5*t.height-Math.cos(e+c/5*.03)*(.3*l));o.lineWidth=.5,o.strokeStyle="rgb(19,170,19)",o.stroke(),f.forEach((e=>{var t,c,n,a,l,s,d,u;t=e.x,c=e.y,a=0,l=f.length,s=0,d=.5,u=e.counter,n=((e,t,o)=>e*(1-o)+t*o)(s,d,i(a,l,u)),o.beginPath(),o.moveTo(t-14,c),o.lineTo(t+14,c),o.strokeStyle=`rgba(255, 255, 255, ${n}`,o.moveTo(t,c-14),o.lineTo(t,c+14),o.stroke(),e.counter+=e.direction,e.counter>=f.length&&(e.direction=-.25),e.counter<0&&(e.direction=r)})),c||window.requestAnimationFrame(n)}()};var s=function(){document.addEventListener("DOMContentLoaded",(()=>{const e=document.getElementById("videoBackground");if(void 0!==e&&null!=e){const o=window.matchMedia("(prefers-reduced-motion: reduce)");o&&!o.matches||e.classList.add("u-hidden");const c=document.getElementById("playVideo"),n=document.getElementById("lightboxVideo"),r=n.querySelector(".c-lightbox__video");function t(){n.classList.contains("u-hidden")?(e.paused&&e.play(),r.paused||r.pause()):e.paused||e.pause()}c.addEventListener("click",(o=>{e.pause(),n.classList.remove("u-hidden"),t()})),n.addEventListener("click",(o=>{o.target.classList.contains("c-lightbox__video")||(e.setAttribute("autoplay",""),n.classList.add("u-hidden"),t())})),window.addEventListener("keydown",(function(o){"Escape"==o.key&&(e.setAttribute("autoplay",""),n.classList.add("u-hidden"),t())}))}}))};function d(){const e=this.getAttribute("data-target");!function(e){const t=document.querySelectorAll(".o-off-canvas");e.classList.contains("o-off-canvas--open")||t.forEach((t=>{t!==e&&h(t)}));e.classList.add("o-off-canvas--open"),e.setAttribute("aria-hidden","false");e.querySelector(".o-off-canvas__backdrop").addEventListener("click",u),document.addEventListener("keydown",f)}(document.getElementById(e))}function u(){h(this.closest(".o-off-canvas"))}function f(e){if("Escape"===e.key){const e=document.querySelector(".o-off-canvas--open");e&&h(e)}}function h(e){e.classList.remove("o-off-canvas--open"),e.setAttribute("aria-hidden","true");e.querySelector(".o-off-canvas__backdrop").removeEventListener("click",u),document.removeEventListener("keydown",f)}function y(){h(this.closest(".o-off-canvas"))}document.querySelectorAll(".o-off-canvas__update").forEach((e=>{e.addEventListener("click",y)}));function v(){h(this.closest(".o-off-canvas"))}document.querySelectorAll(".o-off-canvas__close").forEach((e=>{e.addEventListener("click",v)}));var m=function(){Array.from(document.querySelectorAll(".c-button--off-canvas-toggle")).forEach((e=>{e.addEventListener("click",d)}))};var p=()=>{Array.from(document.querySelectorAll(".c-table--responsive")).forEach((function(e){const t=e.querySelectorAll("thead > :first-child th"),o=Number(e.getAttribute("data-columns"))||2;if(t.length<o)return void e.classList.remove("c-table--responsive");Array.from(e.querySelectorAll("tbody tr")).forEach((e=>{Array.from(t).map((e=>e.textContent)).forEach(((t,o)=>{e.children[o]&&e.children[o].setAttribute("data-responsive-title",t)}))}))}))};function g(){document.documentElement.style.setProperty("--scrollbarWidth",window.innerWidth-document.body.clientWidth+"px")}var L=function(){g(),window.addEventListener("resize",((e,t)=>{let o=!1;return()=>{o||(e(),o=!0,setTimeout((()=>o=!1),t))}})(g,250))};function
|
1
|
+
(()=>{function e(e){e.addEventListener("click",(e=>{e.currentTarget.parentElement.classList.toggle("c-accordion__item--open")}))}var t=function(){Array.from(document.querySelectorAll(".c-accordion__title")).forEach(e)};var o=function(){let e=0;const t=document.querySelectorAll(".c-hero__image-bg"),o=document.querySelectorAll(".c-hero__image-fg");o.length>0&&setInterval((()=>{for(var c of t)c.style.opacity=0;for(var n of(e=e!=t.length-1?e+1:0,t[e].style.opacity=1,o))n.style.opacity=0;o[e].style.opacity=1}),5e3)};var c=function(){const e=document.getElementById("clearForm");e&&e.addEventListener("click",(function(){this.closest("form").elements.forEach((e=>{if(""!=e.value){if("text"==e.type.toLowerCase()||"email"==e.type.toLowerCase()||"tel"==e.type.toLowerCase()||"select-one"==e.type.toLowerCase()||"textarea"==e.type.toLowerCase())return void(e.value="");if("checkbox"==e.type.toLowerCase())return void(e.checked=!1)}}))}))};function n(e){const t=e.querySelector(".c-table tbody"),o=e.querySelector(".c-table thead"),c=e.querySelector(".c-comparison__mobile");if(!t||!o||!c)return;const n=Array.from(o.children[0].children).filter(((e,t)=>t)).map((e=>({info:e.innerHTML,table:[]})));Array.from(t.children).forEach((e=>{if(e.classList.contains("c-table__title"))n.forEach((t=>{t.table.push({type:"title",title:e.children[0].textContent})}));else{const t=Array.from(e.children),o=t.shift();t.forEach(((e,t)=>{n[t].table.push({type:"row",key:o.textContent,value:e.innerHTML})}))}})),n.forEach((e=>{const t=function(e){const t=document.createElement("article");return t.innerHTML=`<div class="c-comparison__content">\n ${e.info}\n </div>\n <table class="c-table">\n ${e.table.map((e=>"title"===e.type?`<tr class="c-table__title"><th colspan="2">${e.title}</th></tr>`:`<tr>\n <td>${e.key}</td>\n <td>${e.value}</td>\n </tr>`)).join("")}\n </table>`,t}(e);c.appendChild(t)}))}var r=function(){document.querySelectorAll(".c-comparison").forEach(n)};var a=function(){const e=document.querySelectorAll(".c-gallery__main .c-gallery__slide"),t=document.querySelectorAll(".c-gallery__thumbnails .c-gallery__slide");function o(){const e=document.querySelector(".c-gallery__main").cloneNode(!0);e.classList.remove("c-gallery__main"),e.classList.add("c-lightbox"),e.querySelectorAll(".c-gallery__slide").forEach((function(e){if(e.classList.contains("c-gallery__video")&&e.remove(),!e.classList.contains("c-gallery__video")){var t=e.querySelector("img");""!=t.srcset&&t.removeAttribute("srcset")}e.classList.add("c-lightbox__slide"),e.classList.remove("c-gallery__slide")})),document.body.appendChild(e),e.insertAdjacentHTML("beforeend",'<a class="c-lightbox__prev"></a><a class="c-lightbox__next"></a>'),e.querySelector(".c-lightbox__prev").addEventListener("click",(function(){const t=e.querySelector(".active"),o=e.querySelector('[data-slide="'+(parseInt(t.dataset.slide)-1)+'"]');null!=o&&(t.classList.remove("active"),o.classList.add("active"))})),e.querySelector(".c-lightbox__next").addEventListener("click",(function(){const t=e.querySelector(".active"),o=e.querySelector('[data-slide="'+(parseInt(t.dataset.slide)+1)+'"]');null!=o&&(t.classList.remove("active"),o.classList.add("active"))})),e.addEventListener("click",(function(t){t.target===t.currentTarget&&e.remove()}))}t.forEach((o=>o.addEventListener("click",(function(c){t.forEach((function(e){e!=c.target.parentNode&&e.classList.remove("active")})),c.target.parentNode.classList.add("active"),e.forEach((function(e){e.dataset.slide==o.dataset.slide?e.classList.add("active"):e.classList.remove("active")}))})))),e.forEach((function(e){e.classList.contains("c-gallery__video")||e.addEventListener("click",o)}))};const i=(e,t,o)=>((e,t=0,o=1)=>Math.min(o,Math.max(t,e)))((o-e)/(t-e));var l=function(){let e=0;const t=document.querySelector(".c-hero__canvas");if(!t)return;const o=t.getContext("2d"),c=!window.matchMedia("(prefers-reduced-motion: no-preference)").matches,n=147,r=.25;let a,l,s,d,u,f=[];function h(){a=t.scrollWidth,l=t.scrollHeight,o.canvas.width=a,o.canvas.height=l,s=Math.ceil(a/n),d=Math.ceil(l/n),u=(s+1)*(d+1);const e=function(e){const t=[...e];for(let e=t.length-1;e>0;e--){let o=Math.floor(Math.random()*(e+1));[t[e],t[o]]=[t[o],t[e]]}return t}(Array.from({length:u},((e,t)=>t)));f=[];for(let t=0;t<=s;t++)for(let o=0;o<=d;o++)f.push({counter:e.shift(),direction:Math.random()>.5?r:-.25,x:n*(t+1)-147,y:n*(o+1)-73.5})}window.addEventListener("resize",h),h(),function n(){e+=.005,o.clearRect(0,0,t.width,t.height),o.beginPath();for(let c=t.width;c>0;c--)o.lineTo(c,.5*t.height-Math.cos(e+c/5*.03)*(.3*l));o.lineWidth=.5,o.strokeStyle="rgb(19,170,19)",o.stroke(),f.forEach((e=>{var t,c,n,a,l,s,d,u;t=e.x,c=e.y,a=0,l=f.length,s=0,d=.5,u=e.counter,n=((e,t,o)=>e*(1-o)+t*o)(s,d,i(a,l,u)),o.beginPath(),o.moveTo(t-14,c),o.lineTo(t+14,c),o.strokeStyle=`rgba(255, 255, 255, ${n}`,o.moveTo(t,c-14),o.lineTo(t,c+14),o.stroke(),e.counter+=e.direction,e.counter>=f.length&&(e.direction=-.25),e.counter<0&&(e.direction=r)})),c||window.requestAnimationFrame(n)}()};var s=function(){document.addEventListener("DOMContentLoaded",(()=>{const e=document.getElementById("videoBackground");if(void 0!==e&&null!=e){const o=window.matchMedia("(prefers-reduced-motion: reduce)");o&&!o.matches||e.classList.add("u-hidden");const c=document.getElementById("playVideo"),n=document.getElementById("lightboxVideo"),r=n.querySelector(".c-lightbox__video");function t(){n.classList.contains("u-hidden")?(e.paused&&e.play(),r.paused||r.pause()):e.paused||e.pause()}c.addEventListener("click",(o=>{e.pause(),n.classList.remove("u-hidden"),t()})),n.addEventListener("click",(o=>{o.target.classList.contains("c-lightbox__video")||(e.setAttribute("autoplay",""),n.classList.add("u-hidden"),t())})),window.addEventListener("keydown",(function(o){"Escape"==o.key&&(e.setAttribute("autoplay",""),n.classList.add("u-hidden"),t())}))}}))};function d(){const e=this.getAttribute("data-target");!function(e){const t=document.querySelectorAll(".o-off-canvas");e.classList.contains("o-off-canvas--open")||t.forEach((t=>{t!==e&&h(t)}));e.classList.add("o-off-canvas--open"),e.setAttribute("aria-hidden","false");e.querySelector(".o-off-canvas__backdrop").addEventListener("click",u),document.addEventListener("keydown",f),document.body.style.overflowY="hidden"}(document.getElementById(e))}function u(){h(this.closest(".o-off-canvas"))}function f(e){if("Escape"===e.key){const e=document.querySelector(".o-off-canvas--open");e&&h(e)}}function h(e){e.classList.remove("o-off-canvas--open"),e.setAttribute("aria-hidden","true");e.querySelector(".o-off-canvas__backdrop").removeEventListener("click",u),document.removeEventListener("keydown",f),document.body.style.overflowY=""}function y(){h(this.closest(".o-off-canvas"))}document.querySelectorAll(".o-off-canvas__update").forEach((e=>{e.addEventListener("click",y)}));function v(){h(this.closest(".o-off-canvas"))}document.querySelectorAll(".o-off-canvas__close").forEach((e=>{e.addEventListener("click",v)}));var m=function(){Array.from(document.querySelectorAll(".c-button--off-canvas-toggle")).forEach((e=>{e.addEventListener("click",d)}))};var p=()=>{Array.from(document.querySelectorAll(".c-table--responsive")).forEach((function(e){const t=e.querySelectorAll("thead > :first-child th"),o=Number(e.getAttribute("data-columns"))||2;if(t.length<o)return void e.classList.remove("c-table--responsive");Array.from(e.querySelectorAll("tbody tr")).forEach((e=>{Array.from(t).map((e=>e.textContent)).forEach(((t,o)=>{e.children[o]&&e.children[o].setAttribute("data-responsive-title",t)}))}))}))};function g(){document.documentElement.style.setProperty("--scrollbarWidth",window.innerWidth-document.body.clientWidth+"px")}var L=function(){g(),window.addEventListener("resize",((e,t)=>{let o=!1;return()=>{o||(e(),o=!0,setTimeout((()=>o=!1),t))}})(g,250))};function b(e){const t=Array.from(e.querySelectorAll("a")),o=new IntersectionObserver(function(e){return t=>{const o=t.find((e=>e.isIntersecting));o&&e.forEach((e=>{e.classList.toggle("c-scroll-spy-active",e.getAttribute("href")==="#"+o.target.id)}))}}(t));t.forEach((e=>{const t=e.getAttribute("href").replace("#",""),c=document.getElementById(t);c&&o.observe(c)}))}var E=function(){Array.from(document.querySelectorAll(".c-scroll-spy")).forEach(b)};function _(e){const t=Array.from(e.querySelectorAll(".c-tabs__control")),o=Array.from(e.querySelectorAll(".c-tab")),c=e.classList.contains("c-tabs--persist");if(t.length&&o.length&&(t.forEach((e=>{e.addEventListener("click",function(e,t,o){return c=>{const n=c.currentTarget,r=t.find((e=>e.id===n.getAttribute("href").replace("#","")));if(!r)return!0;c.preventDefault(),o&&history.pushState(null,null,n.getAttribute("href")),e.forEach((e=>e.classList.toggle("c-tabs__control--active",e===n))),t.forEach((e=>{const t=e===r;if(e.classList.toggle("c-tab--active",t),!o)if(t){e.setAttribute("tabIndex",-1);const t=window.scrollY;e.focus(),window.scrollTo({behavior:"auto",top:t})}else e.removeAttribute("tabIndex")}))}}(t,o,c))})),c&&window.location.hash)){const t=e.querySelector('[href="'+window.location.hash+'"]');t&&t.dispatchEvent(new Event("click"))}}var A=function(){Array.from(document.querySelectorAll(".c-tabs--anchor")).forEach(_)};window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),window.HTMLCollection&&!HTMLCollection.prototype.forEach&&(HTMLCollection.prototype.forEach=Array.prototype.forEach),t(),o(),c(),r(),a(),l(),s(),m(),p(),L(),E(),A()})();
|
2
2
|
//# sourceMappingURL=app.js.map
|
package/dist/build/js/app.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"mappings":"MAKA,SAASA,EAAgBC,GACrBA,EAAMC,iBAAiB,SAIfC,IACOA,EAAMC,cAAcC,cAC1BC,UAAUC,OAAO,kCAI9BC,EAhBA,WACuBC,MAAMC,KAAKC,SAASC,iBAAiB,wBAC7CC,QAAQb,QCmBvBc,EArBA,WACE,IAAIC,EAAU,EACd,MAAMC,EAAWL,SAASC,iBAAiB,qBACrCK,EAAWN,SAASC,iBAAiB,qBAExCK,EAASC,OAAS,GACnBC,aAAY,KACV,IAAK,IAAIC,KAAWJ,EAClBI,EAAQC,MAAMC,QAAU,EAK1B,IAAK,IAAIC,KAHTR,EAAWA,GAAWC,EAASE,OAAS,EAAKH,EAAU,EAA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DmN,eAAeD,UAAUlN,QAAUJ,MAAMsN,UAAUlN,SAGrDL,IACAM,IACAU,IACA0C,IACAC,IACA+B,IACAiD,IACAwB,IACAsD,IACA5C,IACA6C,IACAL","sources":["src/assets/js/imports/accordion.js","src/assets/js/imports/carousel.js","src/assets/js/imports/clear-form.js","src/assets/js/imports/comparison.js","src/assets/js/imports/gallery.js","src/assets/js/imports/utilities.js","src/assets/js/imports/hero-pattern.js","src/assets/js/imports/hero-video.js","src/assets/js/imports/off-canvas.js","src/assets/js/imports/responsive-table.js","src/assets/js/imports/scrollbar-width.js","src/assets/js/imports/scroll-spy.js","src/assets/js/imports/tabs.js","src/assets/js/app.js"],"sourcesContent":["function Accordion() {\r\n const accordions = Array.from(document.querySelectorAll('.c-accordion__title'));\r\n accordions.forEach(setupAccordions);\r\n}\r\n\r\nfunction setupAccordions(title) {\r\n title.addEventListener('click', titleClick())\r\n}\r\n\r\nfunction titleClick() {\r\n return (event) => {\r\n var item = event.currentTarget.parentElement;\r\n item.classList.toggle('c-accordion__item--open');\r\n }\r\n}\r\n\r\nexport default Accordion;\r\n","function Carousel() {\r\n let current = 0;\r\n const bgSlides = document.querySelectorAll('.c-hero__image-bg');\r\n const fgSlides = document.querySelectorAll('.c-hero__image-fg');\r\n\r\n if(fgSlides.length > 0) {\r\n setInterval(() => {\r\n for (var bgSlide of bgSlides) {\r\n bgSlide.style.opacity = 0;\r\n }\r\n current = (current != bgSlides.length - 1) ? current + 1 : 0;\r\n bgSlides[current].style.opacity = 1;\r\n \r\n for (var fgSlide of fgSlides) {\r\n fgSlide.style.opacity = 0;\r\n }\r\n fgSlides[current].style.opacity = 1;\r\n }, 5000);\r\n }\r\n}\r\n\r\nexport default Carousel;","function ClearForm() {\r\n const formClear = document.getElementById('clearForm');\r\n if (formClear) {\r\n formClear.addEventListener('click', function () {\r\n const fields = this.closest('form').elements;\r\n fields.forEach(field => {\r\n if (field.value != '') {\r\n if (\r\n field.type.toLowerCase() == 'text' || \r\n field.type.toLowerCase() == 'email' || \r\n field.type.toLowerCase() == 'tel' || \r\n field.type.toLowerCase() == 'select-one' || \r\n field.type.toLowerCase() == 'textarea'\r\n ) {\r\n field.value = '';\r\n return;\r\n } else if (field.type.toLowerCase() == 'checkbox') {\r\n field.checked = false;\r\n return;\r\n }\r\n }\r\n });\r\n });\r\n };\r\n}\r\n\r\nexport default ClearForm;","function Comparison() {\r\n document.querySelectorAll('.c-comparison').forEach(extractMobileComparison)\r\n}\r\n\r\nfunction extractMobileComparison(container) {\r\n const body = container.querySelector('.c-table tbody');\r\n const head = container.querySelector('.c-table thead');\r\n const mobile = container.querySelector('.c-comparison__mobile');\r\n\r\n if (!body || !head || !mobile) return;\r\n\r\n // Remove empty corner piece\r\n const products = Array.from(head.children[0].children)\r\n .filter((x, i) => i)\r\n .map(x => ({ info: x.innerHTML, table: [] }));\r\n\r\n Array.from(body.children).forEach(row => {\r\n // For table row headers, push to all products\r\n if (row.classList.contains('c-table__title')) {\r\n products.forEach(x => {\r\n x.table.push({ type: 'title', title: row.children[0].textContent })\r\n })\r\n } else {\r\n // For all others, loop the cells and push to their appropriate parent\r\n const cells = Array.from(row.children);\r\n const firstCell = cells.shift();\r\n\r\n cells.forEach((el, index) => {\r\n products[index].table.push({\r\n type: 'row',\r\n key: firstCell.textContent,\r\n value: el.innerHTML\r\n })\r\n })\r\n }\r\n })\r\n\r\n products.forEach(product => {\r\n const el = createMobileProduct(product);\r\n mobile.appendChild(el)\r\n })\r\n}\r\n\r\nfunction createMobileProduct(product) {\r\n const parent = document.createElement('article');\r\n parent.innerHTML = `<div class=\"c-comparison__content\">\r\n ${product.info}\r\n </div>\r\n <table class=\"c-table\">\r\n ${product.table.map(x => {\r\n if (x.type === 'title') {\r\n return `<tr class=\"c-table__title\"><th colspan=\"2\">${x.title}</th></tr>`;\r\n } else {\r\n return `<tr>\r\n <td>${x.key}</td>\r\n <td>${x.value}</td>\r\n </tr>`;\r\n }\r\n }).join('')}\r\n </table>`;\r\n\r\n return parent;\r\n}\r\n\r\nexport default Comparison;\r\n","function Gallery() {\r\n const mainSlides = document.querySelectorAll('.c-gallery__main .c-gallery__slide');\r\n const thumbnailSlides = document.querySelectorAll('.c-gallery__thumbnails .c-gallery__slide');\r\n\r\n thumbnailSlides.forEach(thumbnailSlide => thumbnailSlide.addEventListener('click', function(e) {\r\n thumbnailSlides.forEach(function(thumbnail) {\r\n if(thumbnail != e.target.parentNode) {\r\n thumbnail.classList.remove('active');\r\n }\r\n });\r\n e.target.parentNode.classList.add('active');\r\n\r\n mainSlides.forEach(function(mainSlide) {\r\n if(mainSlide.dataset.slide == thumbnailSlide.dataset.slide) {\r\n mainSlide.classList.add('active');\r\n } else {\r\n mainSlide.classList.remove('active');\r\n }\r\n });\r\n }));\r\n\r\n mainSlides.forEach(function(mainSlide) {\r\n if(!mainSlide.classList.contains('c-gallery__video')) {\r\n mainSlide.addEventListener('click', lightboxTrigger);\r\n }\r\n });\r\n\r\n function lightboxTrigger() {\r\n const lightbox = document.querySelector('.c-gallery__main').cloneNode(true);\r\n lightbox.classList.remove('c-gallery__main');\r\n lightbox.classList.add('c-lightbox');\r\n lightbox.querySelectorAll('.c-gallery__slide').forEach(function(slide) {\r\n if(slide.classList.contains('c-gallery__video')) {\r\n slide.remove();\r\n }\r\n if(!slide.classList.contains('c-gallery__video')) {\r\n var slideImg = slide.querySelector('img');\r\n if(slideImg.srcset != '') {\r\n slideImg.removeAttribute('srcset');\r\n }\r\n }\r\n slide.classList.add('c-lightbox__slide');\r\n slide.classList.remove('c-gallery__slide');\r\n });\r\n document.body.appendChild(lightbox);\r\n lightbox.insertAdjacentHTML('beforeend', '<a class=\"c-lightbox__prev\"></a><a class=\"c-lightbox__next\"></a>');\r\n\r\n lightbox.querySelector('.c-lightbox__prev').addEventListener('click', function() {\r\n const lightboxActive = lightbox.querySelector('.active');\r\n const prevImage = lightbox.querySelector('[data-slide=\"' + (parseInt(lightboxActive.dataset.slide) - 1) + '\"]');\r\n if(prevImage != null) {\r\n lightboxActive.classList.remove('active');\r\n prevImage.classList.add('active');\r\n }\r\n });\r\n\r\n lightbox.querySelector('.c-lightbox__next').addEventListener('click', function() {\r\n const lightboxActive = lightbox.querySelector('.active');\r\n const nextImage = lightbox.querySelector('[data-slide=\"' + (parseInt(lightboxActive.dataset.slide) + 1) + '\"]');\r\n if(nextImage != null) {\r\n lightboxActive.classList.remove('active');\r\n nextImage.classList.add('active');\r\n }\r\n });\r\n\r\n lightbox.addEventListener('click', function(e) {\r\n if (e.target !== e.currentTarget) {\r\n return;\r\n } else {\r\n lightbox.remove();\r\n }\r\n });\r\n }\r\n}\r\n\r\nexport default Gallery;\r\n","export function shuffle(array) {\r\n const arr = [...array];\r\n for (let i = arr.length - 1; i > 0; i--) {\r\n let j = Math.floor(Math.random() * (i + 1));\r\n [arr[i], arr[j]] = [arr[j], arr[i]];\r\n }\r\n\r\n return arr;\r\n}\r\n\r\nexport function userPrefersReducedMotion() {\r\n const QUERY = '(prefers-reduced-motion: no-preference)';\r\n const mediaQueryList = window.matchMedia(QUERY);\r\n const prefersReducedMotion = !mediaQueryList.matches;\r\n return prefersReducedMotion;\r\n}\r\n\r\nexport const debounce = (func, limit) => {\r\n let wait = false; \r\n return () => {\r\n if (wait) return;\r\n func();\r\n wait = true;\r\n setTimeout(() => wait = false, limit);\r\n }\r\n}\r\n\r\nexport const lerp = (x, y, a) => x * (1 - a) + y * a;\r\nexport const clamp = (a, min = 0, max = 1) => Math.min(max, Math.max(min, a));\r\nexport const invlerp = (x, y, a) => clamp((a - x) / (y - x));\r\nexport const range = (x1, y1, x2, y2, a) => lerp(x2, y2, invlerp(x1, y1, a));\r\n","import { range, shuffle, userPrefersReducedMotion } from './utilities';\r\n\r\nfunction HeroPattern() {\r\n let time = 0;\r\n\r\n const c = document.querySelector('.c-hero__canvas');\r\n if (!c) return;\r\n const ctx = c.getContext(\"2d\");\r\n \r\n const sineColour = \"rgb(19,170,19)\";\r\n const reduceMotion = userPrefersReducedMotion();\r\n\r\n const crossGap = 147;\r\n const minimumOpacity = 0;\r\n const maximumOpacity = 0.5;\r\n const crossSpeed = 0.25;\r\n\r\n let width;\r\n let height;\r\n let across;\r\n let down;\r\n let crosses = [];\r\n let totalPoints;\r\n\r\n function draw() {\r\n // Sine wave\r\n time = time + 0.005;\r\n \r\n ctx.clearRect(0, 0, c.width, c.height);\r\n ctx.beginPath();\r\n \r\n for(let cnt = c.width; cnt > 0; cnt--) {\r\n ctx.lineTo(cnt, c.height * 0.5 - (Math.cos(time + cnt / 5 * 0.03) * (height * 0.3) ));\r\n }\r\n \r\n ctx.lineWidth = 0.5;\r\n ctx.strokeStyle = sineColour;\r\n ctx.stroke();\r\n \r\n // Crosses\r\n crosses.forEach(cross => {\r\n drawCross(cross.x, cross.y, range(0, crosses.length, minimumOpacity, maximumOpacity, cross.counter));\r\n \r\n cross.counter += cross.direction;\r\n if (cross.counter >= crosses.length) cross.direction = -1 * crossSpeed;\r\n if (cross.counter < 0) cross.direction = crossSpeed;\r\n })\r\n \r\n if (!reduceMotion) {\r\n window.requestAnimationFrame(draw);\r\n }\r\n }\r\n \r\n function onResize() {\r\n width = c.scrollWidth;\r\n height = c.scrollHeight;\r\n \r\n ctx.canvas.width = width;\r\n ctx.canvas.height = height;\r\n \r\n across = Math.ceil(width / crossGap);\r\n down = Math.ceil(height / crossGap);\r\n \r\n totalPoints = (across + 1) * (down + 1);\r\n const ids = shuffle(Array.from({ length: totalPoints }, (_, i) => (i)))\r\n crosses = [];\r\n for(let x = 0; x <= across; x++) {\r\n for(let y = 0; y <= down; y++) {\r\n crosses.push({\r\n counter: ids.shift(),\r\n direction: Math.random() > 0.5 ? crossSpeed : -1 * crossSpeed,\r\n x: crossGap * (x + 1) - crossGap / 1,\r\n y: crossGap * (y + 1) - crossGap / 2\r\n });\r\n }\r\n }\r\n }\r\n \r\n function drawCross(x, y, opacity) {\r\n ctx.beginPath();\r\n ctx.moveTo(x - 14, y);\r\n ctx.lineTo(x + 14, y);\r\n ctx.strokeStyle = `rgba(255, 255, 255, ${opacity}`;\r\n ctx.moveTo(x, y - 14);\r\n ctx.lineTo(x, y + 14);\r\n ctx.stroke();\r\n }\r\n\r\n window.addEventListener('resize', onResize);\r\n onResize();\r\n draw();\r\n}\r\n\r\nexport default HeroPattern;\r\n","function HeroVideo() {\r\n document.addEventListener(\"DOMContentLoaded\", () => {\r\n const videoBackground = document.getElementById('videoBackground');\r\n if(typeof(videoBackground) != 'undefined' && videoBackground != null) {\r\n const reducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)');\r\n if(!reducedMotion || reducedMotion.matches) {\r\n videoBackground.classList.add('u-hidden');\r\n }\r\n \r\n const lightboxTrigger = document.getElementById('playVideo');\r\n const lightboxContainer = document.getElementById('lightboxVideo');\r\n const lightboxVideo = lightboxContainer.querySelector('.c-lightbox__video');\r\n\r\n lightboxTrigger.addEventListener('click', e => {\r\n videoBackground.pause();\r\n lightboxContainer.classList.remove('u-hidden');\r\n checkVideos();\r\n });\r\n \r\n lightboxContainer.addEventListener('click', (e) => {\r\n if (!e.target.classList.contains('c-lightbox__video')) {\r\n videoBackground.setAttribute('autoplay','');\r\n lightboxContainer.classList.add('u-hidden');\r\n checkVideos();\r\n }\r\n });\r\n window.addEventListener('keydown', function(e) {\r\n if (e.key == \"Escape\") {\r\n videoBackground.setAttribute('autoplay','');\r\n lightboxContainer.classList.add('u-hidden');\r\n checkVideos();\r\n }\r\n });\r\n\r\n function checkVideos() {\r\n if(lightboxContainer.classList.contains('u-hidden')) {\r\n if (videoBackground.paused) {\r\n videoBackground.play();\r\n }\r\n if (!lightboxVideo.paused) {\r\n lightboxVideo.pause();\r\n }\r\n } else {\r\n if (!videoBackground.paused) {\r\n videoBackground.pause();\r\n }\r\n }\r\n }\r\n }\r\n });\r\n}\r\n\r\nexport default HeroVideo;","// Add click event listeners to each toggle button\r\nfunction OffCanvas() {\r\n const toggleButtons = Array.from(document.querySelectorAll('.c-button--off-canvas-toggle'));\r\n toggleButtons.forEach((button) => {\r\n button.addEventListener('click', handleToggleClick);\r\n });\r\n}\r\n\r\n// Function to handle the toggle button click\r\nfunction handleToggleClick() {\r\n const target = this.getAttribute('data-target');\r\n const offCanvas = document.getElementById(target);\r\n openOffCanvas(offCanvas);\r\n}\r\n\r\n// Function to open the off-canvas drawer\r\nfunction openOffCanvas(offCanvas) {\r\n const offCanvasList = document.querySelectorAll('.o-off-canvas');\r\n const isOpen = offCanvas.classList.contains('o-off-canvas--open');\r\n\r\n // Close other off-canvas drawers only if the target is not already open\r\n if (!isOpen) {\r\n offCanvasList.forEach((drawer) => {\r\n if (drawer !== offCanvas) {\r\n closeOffCanvas(drawer);\r\n }\r\n });\r\n }\r\n\r\n // Open the target off-canvas drawer\r\n offCanvas.classList.add('o-off-canvas--open');\r\n offCanvas.setAttribute('aria-hidden', 'false');\r\n\r\n // Add click event listener to the backdrop to close the off-canvas drawer\r\n const backdrop = offCanvas.querySelector('.o-off-canvas__backdrop');\r\n backdrop.addEventListener('click', handleBackdropClick);\r\n\r\n // Add keydown event listener to close the off-canvas drawer with the Esc key\r\n document.addEventListener('keydown', handleKeyDown);\r\n}\r\n\r\n// Function to handle the backdrop click\r\nfunction handleBackdropClick() {\r\n const offCanvas = this.closest('.o-off-canvas');\r\n closeOffCanvas(offCanvas);\r\n}\r\n\r\n// Function to handle the keydown event\r\nfunction handleKeyDown(event) {\r\n if (event.key === 'Escape') {\r\n const openDrawer = document.querySelector('.o-off-canvas--open');\r\n if (openDrawer) {\r\n closeOffCanvas(openDrawer);\r\n }\r\n }\r\n}\r\n\r\n// Function to close the off-canvas drawer\r\nfunction closeOffCanvas(offCanvas) {\r\n offCanvas.classList.remove('o-off-canvas--open');\r\n offCanvas.setAttribute('aria-hidden', 'true');\r\n\r\n // Remove backdrop click event listener when closing the off-canvas drawer\r\n const backdrop = offCanvas.querySelector('.o-off-canvas__backdrop');\r\n backdrop.removeEventListener('click', handleBackdropClick);\r\n\r\n // Remove keydown event listener when closing the off-canvas drawer\r\n document.removeEventListener('keydown', handleKeyDown);\r\n}\r\n\r\n// Update button functionality\r\nconst updateButton = document.querySelectorAll('.o-off-canvas__update');\r\nupdateButton.forEach((button) => {\r\n button.addEventListener('click', handleUpdateButtonClick);\r\n});\r\n\r\n// Handle the update button click\r\nfunction handleUpdateButtonClick() {\r\n // Save the options somewhere\r\n const offCanvas = this.closest('.o-off-canvas');\r\n closeOffCanvas(offCanvas);\r\n}\r\n\r\n// Close button functionality\r\nconst closeButton = document.querySelectorAll('.o-off-canvas__close');\r\ncloseButton.forEach((button) => {\r\n button.addEventListener('click', handleCloseButtonClick);\r\n});\r\n\r\n// Handle the close button click\r\nfunction handleCloseButtonClick() {\r\n const offCanvas = this.closest('.o-off-canvas');\r\n closeOffCanvas(offCanvas);\r\n};\r\n\r\n\r\nexport default OffCanvas;","const ResponsiveTable = () => {\r\n const tables = Array.from(document.querySelectorAll('.c-table--responsive'));\r\n tables.forEach(createResponsiveTable);\r\n\r\n /**\r\n * Create responsive table headers for large tables\r\n * @param {HTMLTableElement} table\r\n */\r\n function createResponsiveTable(table) {\r\n const headers = table.querySelectorAll('thead > :first-child th');\r\n const breakPoint = Number(table.getAttribute('data-columns')) || 2\r\n \r\n if (headers.length < breakPoint) {\r\n table.classList.remove('c-table--responsive');\r\n return;\r\n };\r\n\r\n Array.from(table.querySelectorAll('tbody tr')).forEach((row) => {\r\n Array.from(headers)\r\n .map((x) => x.textContent)\r\n .forEach((header, index) => {\r\n if (row.children[index]) {\r\n row.children[index].setAttribute('data-responsive-title', header);\r\n }\r\n });\r\n });\r\n }\r\n};\r\n\r\nexport default ResponsiveTable;\r\n","import { debounce } from './utilities';\r\n\r\nfunction ScrollbarWidth() {\r\n setScrollbarWidth();\r\n window.addEventListener('resize', debounce(setScrollbarWidth, 250));\r\n}\r\n\r\nfunction setScrollbarWidth() {\r\n document.documentElement.style.setProperty(\r\n '--scrollbarWidth', \r\n window.innerWidth - document.body.clientWidth + 'px'\r\n );\r\n}\r\n\r\nexport default ScrollbarWidth;","function ScrollSpy() {\r\n const spies = Array.from(document.querySelectorAll('.c-scroll-spy'));\r\n spies.forEach(setup);\r\n}\r\n\r\nfunction setup(element) {\r\n const anchors = Array.from(element.querySelectorAll('a'));\r\n const observer = new IntersectionObserver(observation(anchors));\r\n \r\n anchors.forEach(anchor => {\r\n const id = anchor.getAttribute('href').replace('#', '');\r\n const target = document.getElementById(id);\r\n if (!target) return;\r\n\r\n observer.observe(target);\r\n });\r\n}\r\n\r\n/**\r\n * @param {Array<HTMLAnchorElement>} results \r\n * @return {Array<IntersectionObserverEntry>}\r\n */\r\nfunction observation(anchors) {\r\n return (results) => {\r\n const firstObservation = results.find(x => x.isIntersecting);\r\n\r\n if (firstObservation) {\r\n anchors.forEach(x => {\r\n x.classList.toggle(\r\n 'c-scroll-spy-active',\r\n x.getAttribute('href') === '#' + firstObservation.target.id\r\n )\r\n })\r\n }\r\n }\r\n}\r\n\r\nexport default ScrollSpy;\r\n","function Tabs() {\r\n const tabs = Array.from(document.querySelectorAll('.c-tabs--anchor'));\r\n tabs.forEach(setupTabs);\r\n}\r\n\r\nfunction setupTabs(parent) {\r\n const controls = Array.from(parent.querySelectorAll('.c-tabs__control'));\r\n const content = Array.from(parent.querySelectorAll('.c-tab'));\r\n const persist = parent.classList.contains('c-tabs--persist');\r\n \r\n if (!controls.length || !content.length) return;\r\n\r\n controls.forEach(control => {\r\n control.addEventListener('click', controlClick(controls, content, persist))\r\n })\r\n\r\n if (persist && window.location.hash) {\r\n const control = parent.querySelector('[href=\"' + window.location.hash + '\"]');\r\n if (control) control.dispatchEvent(new Event('click'));\r\n }\r\n}\r\n\r\nfunction controlClick(controls, contents, persist) {\r\n return (event) => {\r\n const control = event.currentTarget;\r\n const content = contents.find(x => x.id === control.getAttribute('href').replace('#', ''));\r\n \r\n if (!content) {\r\n return true;\r\n };\r\n\r\n event.preventDefault();\r\n \r\n if (persist) {\r\n history.pushState(null, null, control.getAttribute('href'));\r\n }\r\n\r\n controls.forEach(c => c.classList.toggle('c-tabs__control--active', c === control));\r\n contents.forEach(c => {\r\n const isCurrent = c === content;\r\n c.classList.toggle('c-tab--active', isCurrent);\r\n \r\n if (persist) return;\r\n\r\n if (isCurrent) {\r\n c.setAttribute('tabIndex', -1);\r\n \r\n const y = window.scrollY;\r\n c.focus();\r\n window.scrollTo({ behavior: \"auto\", top: y })\r\n } else {\r\n c.removeAttribute('tabIndex');\r\n }\r\n });\r\n }\r\n}\r\n\r\nexport default Tabs;\r\n","import Accordion from './imports/accordion';\r\nimport Carousel from './imports/carousel';\r\nimport ClearForm from './imports/clear-form';\r\nimport Comparison from './imports/comparison';\r\nimport Gallery from './imports/gallery';\r\nimport HeroPattern from './imports/hero-pattern';\r\nimport HeroVideo from './imports/hero-video';\r\nimport OffCanvas from './imports/off-canvas';\r\nimport ResponsiveTable from './imports/responsive-table';\r\nimport ScrollbarWidth from './imports/scrollbar-width';\r\nimport ScrollSpy from './imports/scroll-spy';\r\nimport Tabs from './imports/tabs';\r\n\r\n(() => {\r\n if(window.NodeList && !NodeList.prototype.forEach) {\r\n NodeList.prototype.forEach = Array.prototype.forEach;\r\n }\r\n if(window.HTMLCollection && !HTMLCollection.prototype.forEach) {\r\n HTMLCollection.prototype.forEach = Array.prototype.forEach;\r\n }\r\n \r\n Accordion();\r\n Carousel();\r\n ClearForm();\r\n Comparison();\r\n Gallery();\r\n HeroPattern();\r\n HeroVideo();\r\n OffCanvas();\r\n ResponsiveTable();\r\n ScrollbarWidth();\r\n ScrollSpy();\r\n Tabs();\r\n})();"],"names":["$c274619fa9ae66ac$var$setupAccordions","title","addEventListener","event","currentTarget","parentElement","classList","toggle","$c274619fa9ae66ac$export$2e2bcd8739ae039","Array","from","document","querySelectorAll","forEach","$5bdce36a18199573$export$2e2bcd8739ae039","current","bgSlides","fgSlides","length","setInterval","bgSlide","style","opacity","fgSlide","$2b04c6f63ef290fb$export$2e2bcd8739ae039","formClear","getElementById","this","closest","elements","field","value","type","toLowerCase","checked","$7fbc59e2fab6d5d2$var$extractMobileComparison","container","body","querySelector","head","mobile","products","children","filter","x","i","map","info","innerHTML","table","row","contains","push","textContent","cells","firstCell","shift","el","index","key","product","parent","createElement","join","$7fbc59e2fab6d5d2$var$createMobileProduct","appendChild","$7fbc59e2fab6d5d2$export$2e2bcd8739ae039","$dfe0031b837edf6f$export$2e2bcd8739ae039","mainSlides","thumbnailSlides","lightboxTrigger","lightbox","cloneNode","remove","add","slide","slideImg","srcset","removeAttribute","insertAdjacentHTML","lightboxActive","prevImage","parseInt","dataset","nextImage","e","target","thumbnailSlide","thumbnail","parentNode","mainSlide","$41a3994d4318effb$export$b568019c0551f0a4","y","a","min","max","Math","$41a3994d4318effb$export$7d15b64cf5a3a4c4","$2e27ca8f14f20195$export$2e2bcd8739ae039","time","c","ctx","getContext","reduceMotion","window","matchMedia","matches","crossGap","crossSpeed","width","height","across","down","totalPoints","crosses","onResize","scrollWidth","scrollHeight","canvas","ceil","ids","array","arr","j","floor","random","$41a3994d4318effb$export$448332262467e042","_","counter","direction","draw","clearRect","beginPath","cnt","lineTo","cos","lineWidth","strokeStyle","stroke","cross","x1","y1","x2","y2","$41a3994d4318effb$export$3a89f8d6f6bf6c9f","moveTo","requestAnimationFrame","$63fd9338c6a56d33$export$2e2bcd8739ae039","videoBackground","reducedMotion","lightboxContainer","lightboxVideo","checkVideos","paused","play","pause","setAttribute","$34e92b90f028a0e5$var$handleToggleClick","getAttribute","offCanvas","offCanvasList","drawer","$34e92b90f028a0e5$var$closeOffCanvas","$34e92b90f028a0e5$var$handleBackdropClick","$34e92b90f028a0e5$var$handleKeyDown","$34e92b90f028a0e5$var$openOffCanvas","openDrawer","removeEventListener","$34e92b90f028a0e5$var$handleUpdateButtonClick","button","$34e92b90f028a0e5$var$handleCloseButtonClick","$34e92b90f028a0e5$export$2e2bcd8739ae039","headers","breakPoint","Number","header","$e3dc92a106d80d6c$var$setScrollbarWidth","documentElement","setProperty","innerWidth","clientWidth","$e3dc92a106d80d6c$export$2e2bcd8739ae039","func","limit","wait","setTimeout","$41a3994d4318effb$export$61fc7d43ac8f84b0","$9d1dec2ad218c628$var$setup","element","anchors","observer","IntersectionObserver","results","firstObservation","find","isIntersecting","id","$9d1dec2ad218c628$var$observation","anchor","replace","observe","$1d2dabc452d8efd6$var$setupTabs","controls","content","persist","control","contents","preventDefault","history","pushState","isCurrent","scrollY","focus","scrollTo","behavior","top","$1d2dabc452d8efd6$var$controlClick","location","hash","dispatchEvent","Event","$1d2dabc452d8efd6$export$2e2bcd8739ae039","NodeList","prototype","HTMLCollection","$384feef4bde84172$export$2e2bcd8739ae039","$9d1dec2ad218c628$export$2e2bcd8739ae039"],"version":3,"file":"app.js.map"}
|
1
|
+
{"mappings":"MAKA,SAASA,EAAgBC,GACrBA,EAAMC,iBAAiB,SAIfC,IACOA,EAAMC,cAAcC,cAC1BC,UAAUC,OAAO,kCAI9BC,EAhBA,WACuBC,MAAMC,KAAKC,SAASC,iBAAiB,wBAC7CC,QAAQb,QCmBvBc,EArBA,WACE,IAAIC,EAAU,EACd,MAAMC,EAAWL,SAASC,iBAAiB,qBACrCK,EAAWN,SAASC,iBAAiB,qBAExCK,EAASC,OAAS,GACnBC,aAAY,KACV,IAAK,IAAIC,KAAWJ,EAClBI,EAAQC,MAAMC,QAAU,EAK1B,IAAK,IAAIC,KAHTR,EAAWA,GAAWC,EAASE,OAAS,EAAKH,EAAU,EAAI,EAC3DC,EAASD,GAASM,MAAMC,QAAU,EAEdL,GAClBM,EAAQF,MAAMC,QAAU,EAE1BL,EAASF,GAASM,MAAMC,QAAU,IACjC,UCSPE,EA1BA,WACE,MAAMC,EAAYd,SAASe,eAAe,aACtCD,GACFA,EAAUvB,iBAAiB,SAAS,WACnByB,KAAKC,QAAQ,QAAQC,SAC7BhB,SAAQiB,IACb,GAAmB,IAAfA,EAAMC,MAAa,CACrB,GAC8B,QAA5BD,EAAME,KAAKC,eACiB,SAA5BH,EAAME,KAAKC,eACiB,OAA5BH,EAAME,KAAKC,eACiB,cAA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2M,EAAU3M,EAAMC,cAChBwM,EAAUG,EAASZ,MAAKvJ,GAAKA,EAAEyJ,KAAOS,EAAQhD,aAAa,QAAQ0C,QAAQ,IAAK,MAEtF,IAAKI,EACH,OAAO,EAGTzM,EAAM6M,iBAEFH,GACFI,QAAQC,UAAU,KAAM,KAAMJ,EAAQhD,aAAa,SAGrD6C,EAAS9L,SAAQuF,GAAKA,EAAE9F,UAAUC,OAAO,0BAA2B6F,IAAM0G,KAC1EC,EAASlM,SAAQuF,IACf,MAAM+G,EAAY/G,IAAMwG,EAGxB,GAFAxG,EAAE9F,UAAUC,OAAO,gBAAiB4M,IAEhCN,EAEJ,GAAIM,EAAW,CACb/G,EAAEwD,aAAa,YAAY,GAE3B,MAAMhE,EAAIY,OAAO4G,QACjBhH,EAAEiH,QACF7G,OAAO8G,SAAS,CAAEC,SAAU,OAAQC,IAAK5H,SAEzCQ,EAAEtB,gBAAgB,gBAtCY2I,CAAad,EAAUC,EAASC,OAGhEA,GAAWrG,OAAOkH,SAASC,MAAM,CACnC,MAAMb,EAAUjJ,EAAOvB,cAAc,UAAYkE,OAAOkH,SAASC,KAAO,MACpEb,GAASA,EAAQc,cAAc,IAAIC,MAAM,eAuCjDC,EAzDA,WACerN,MAAMC,KAAKC,SAASC,iBAAiB,oBAC7CC,QAAQ6L,ICYVlG,OAAOuH,WAAaA,SAASC,UAAUnN,UACxCkN,SAASC,UAAUnN,QAAUJ,MAAMuN,UAAUnN,SAE5C2F,OAAOyH,iBAAmBA,eAAeD,UAAUnN,UACpDoN,eAAeD,UAAUnN,QAAUJ,MAAMuN,UAAUnN,SAGrDL,IACAM,IACAU,IACA0C,IACAC,IACA+B,IACAiD,IACAyB,IACAsD,IACA5C,IACA6C,IACAL","sources":["src/assets/js/imports/accordion.js","src/assets/js/imports/carousel.js","src/assets/js/imports/clear-form.js","src/assets/js/imports/comparison.js","src/assets/js/imports/gallery.js","src/assets/js/imports/utilities.js","src/assets/js/imports/hero-pattern.js","src/assets/js/imports/hero-video.js","src/assets/js/imports/off-canvas.js","src/assets/js/imports/responsive-table.js","src/assets/js/imports/scrollbar-width.js","src/assets/js/imports/scroll-spy.js","src/assets/js/imports/tabs.js","src/assets/js/app.js"],"sourcesContent":["function Accordion() {\r\n const accordions = Array.from(document.querySelectorAll('.c-accordion__title'));\r\n accordions.forEach(setupAccordions);\r\n}\r\n\r\nfunction setupAccordions(title) {\r\n title.addEventListener('click', titleClick())\r\n}\r\n\r\nfunction titleClick() {\r\n return (event) => {\r\n var item = event.currentTarget.parentElement;\r\n item.classList.toggle('c-accordion__item--open');\r\n }\r\n}\r\n\r\nexport default Accordion;\r\n","function Carousel() {\r\n let current = 0;\r\n const bgSlides = document.querySelectorAll('.c-hero__image-bg');\r\n const fgSlides = document.querySelectorAll('.c-hero__image-fg');\r\n\r\n if(fgSlides.length > 0) {\r\n setInterval(() => {\r\n for (var bgSlide of bgSlides) {\r\n bgSlide.style.opacity = 0;\r\n }\r\n current = (current != bgSlides.length - 1) ? current + 1 : 0;\r\n bgSlides[current].style.opacity = 1;\r\n \r\n for (var fgSlide of fgSlides) {\r\n fgSlide.style.opacity = 0;\r\n }\r\n fgSlides[current].style.opacity = 1;\r\n }, 5000);\r\n }\r\n}\r\n\r\nexport default Carousel;","function ClearForm() {\r\n const formClear = document.getElementById('clearForm');\r\n if (formClear) {\r\n formClear.addEventListener('click', function () {\r\n const fields = this.closest('form').elements;\r\n fields.forEach(field => {\r\n if (field.value != '') {\r\n if (\r\n field.type.toLowerCase() == 'text' || \r\n field.type.toLowerCase() == 'email' || \r\n field.type.toLowerCase() == 'tel' || \r\n field.type.toLowerCase() == 'select-one' || \r\n field.type.toLowerCase() == 'textarea'\r\n ) {\r\n field.value = '';\r\n return;\r\n } else if (field.type.toLowerCase() == 'checkbox') {\r\n field.checked = false;\r\n return;\r\n }\r\n }\r\n });\r\n });\r\n };\r\n}\r\n\r\nexport default ClearForm;","function Comparison() {\r\n document.querySelectorAll('.c-comparison').forEach(extractMobileComparison)\r\n}\r\n\r\nfunction extractMobileComparison(container) {\r\n const body = container.querySelector('.c-table tbody');\r\n const head = container.querySelector('.c-table thead');\r\n const mobile = container.querySelector('.c-comparison__mobile');\r\n\r\n if (!body || !head || !mobile) return;\r\n\r\n // Remove empty corner piece\r\n const products = Array.from(head.children[0].children)\r\n .filter((x, i) => i)\r\n .map(x => ({ info: x.innerHTML, table: [] }));\r\n\r\n Array.from(body.children).forEach(row => {\r\n // For table row headers, push to all products\r\n if (row.classList.contains('c-table__title')) {\r\n products.forEach(x => {\r\n x.table.push({ type: 'title', title: row.children[0].textContent })\r\n })\r\n } else {\r\n // For all others, loop the cells and push to their appropriate parent\r\n const cells = Array.from(row.children);\r\n const firstCell = cells.shift();\r\n\r\n cells.forEach((el, index) => {\r\n products[index].table.push({\r\n type: 'row',\r\n key: firstCell.textContent,\r\n value: el.innerHTML\r\n })\r\n })\r\n }\r\n })\r\n\r\n products.forEach(product => {\r\n const el = createMobileProduct(product);\r\n mobile.appendChild(el)\r\n })\r\n}\r\n\r\nfunction createMobileProduct(product) {\r\n const parent = document.createElement('article');\r\n parent.innerHTML = `<div class=\"c-comparison__content\">\r\n ${product.info}\r\n </div>\r\n <table class=\"c-table\">\r\n ${product.table.map(x => {\r\n if (x.type === 'title') {\r\n return `<tr class=\"c-table__title\"><th colspan=\"2\">${x.title}</th></tr>`;\r\n } else {\r\n return `<tr>\r\n <td>${x.key}</td>\r\n <td>${x.value}</td>\r\n </tr>`;\r\n }\r\n }).join('')}\r\n </table>`;\r\n\r\n return parent;\r\n}\r\n\r\nexport default Comparison;\r\n","function Gallery() {\r\n const mainSlides = document.querySelectorAll('.c-gallery__main .c-gallery__slide');\r\n const thumbnailSlides = document.querySelectorAll('.c-gallery__thumbnails .c-gallery__slide');\r\n\r\n thumbnailSlides.forEach(thumbnailSlide => thumbnailSlide.addEventListener('click', function(e) {\r\n thumbnailSlides.forEach(function(thumbnail) {\r\n if(thumbnail != e.target.parentNode) {\r\n thumbnail.classList.remove('active');\r\n }\r\n });\r\n e.target.parentNode.classList.add('active');\r\n\r\n mainSlides.forEach(function(mainSlide) {\r\n if(mainSlide.dataset.slide == thumbnailSlide.dataset.slide) {\r\n mainSlide.classList.add('active');\r\n } else {\r\n mainSlide.classList.remove('active');\r\n }\r\n });\r\n }));\r\n\r\n mainSlides.forEach(function(mainSlide) {\r\n if(!mainSlide.classList.contains('c-gallery__video')) {\r\n mainSlide.addEventListener('click', lightboxTrigger);\r\n }\r\n });\r\n\r\n function lightboxTrigger() {\r\n const lightbox = document.querySelector('.c-gallery__main').cloneNode(true);\r\n lightbox.classList.remove('c-gallery__main');\r\n lightbox.classList.add('c-lightbox');\r\n lightbox.querySelectorAll('.c-gallery__slide').forEach(function(slide) {\r\n if(slide.classList.contains('c-gallery__video')) {\r\n slide.remove();\r\n }\r\n if(!slide.classList.contains('c-gallery__video')) {\r\n var slideImg = slide.querySelector('img');\r\n if(slideImg.srcset != '') {\r\n slideImg.removeAttribute('srcset');\r\n }\r\n }\r\n slide.classList.add('c-lightbox__slide');\r\n slide.classList.remove('c-gallery__slide');\r\n });\r\n document.body.appendChild(lightbox);\r\n lightbox.insertAdjacentHTML('beforeend', '<a class=\"c-lightbox__prev\"></a><a class=\"c-lightbox__next\"></a>');\r\n\r\n lightbox.querySelector('.c-lightbox__prev').addEventListener('click', function() {\r\n const lightboxActive = lightbox.querySelector('.active');\r\n const prevImage = lightbox.querySelector('[data-slide=\"' + (parseInt(lightboxActive.dataset.slide) - 1) + '\"]');\r\n if(prevImage != null) {\r\n lightboxActive.classList.remove('active');\r\n prevImage.classList.add('active');\r\n }\r\n });\r\n\r\n lightbox.querySelector('.c-lightbox__next').addEventListener('click', function() {\r\n const lightboxActive = lightbox.querySelector('.active');\r\n const nextImage = lightbox.querySelector('[data-slide=\"' + (parseInt(lightboxActive.dataset.slide) + 1) + '\"]');\r\n if(nextImage != null) {\r\n lightboxActive.classList.remove('active');\r\n nextImage.classList.add('active');\r\n }\r\n });\r\n\r\n lightbox.addEventListener('click', function(e) {\r\n if (e.target !== e.currentTarget) {\r\n return;\r\n } else {\r\n lightbox.remove();\r\n }\r\n });\r\n }\r\n}\r\n\r\nexport default Gallery;\r\n","export function shuffle(array) {\r\n const arr = [...array];\r\n for (let i = arr.length - 1; i > 0; i--) {\r\n let j = Math.floor(Math.random() * (i + 1));\r\n [arr[i], arr[j]] = [arr[j], arr[i]];\r\n }\r\n\r\n return arr;\r\n}\r\n\r\nexport function userPrefersReducedMotion() {\r\n const QUERY = '(prefers-reduced-motion: no-preference)';\r\n const mediaQueryList = window.matchMedia(QUERY);\r\n const prefersReducedMotion = !mediaQueryList.matches;\r\n return prefersReducedMotion;\r\n}\r\n\r\nexport const debounce = (func, limit) => {\r\n let wait = false; \r\n return () => {\r\n if (wait) return;\r\n func();\r\n wait = true;\r\n setTimeout(() => wait = false, limit);\r\n }\r\n}\r\n\r\nexport const lerp = (x, y, a) => x * (1 - a) + y * a;\r\nexport const clamp = (a, min = 0, max = 1) => Math.min(max, Math.max(min, a));\r\nexport const invlerp = (x, y, a) => clamp((a - x) / (y - x));\r\nexport const range = (x1, y1, x2, y2, a) => lerp(x2, y2, invlerp(x1, y1, a));\r\n","import { range, shuffle, userPrefersReducedMotion } from './utilities';\r\n\r\nfunction HeroPattern() {\r\n let time = 0;\r\n\r\n const c = document.querySelector('.c-hero__canvas');\r\n if (!c) return;\r\n const ctx = c.getContext(\"2d\");\r\n \r\n const sineColour = \"rgb(19,170,19)\";\r\n const reduceMotion = userPrefersReducedMotion();\r\n\r\n const crossGap = 147;\r\n const minimumOpacity = 0;\r\n const maximumOpacity = 0.5;\r\n const crossSpeed = 0.25;\r\n\r\n let width;\r\n let height;\r\n let across;\r\n let down;\r\n let crosses = [];\r\n let totalPoints;\r\n\r\n function draw() {\r\n // Sine wave\r\n time = time + 0.005;\r\n \r\n ctx.clearRect(0, 0, c.width, c.height);\r\n ctx.beginPath();\r\n \r\n for(let cnt = c.width; cnt > 0; cnt--) {\r\n ctx.lineTo(cnt, c.height * 0.5 - (Math.cos(time + cnt / 5 * 0.03) * (height * 0.3) ));\r\n }\r\n \r\n ctx.lineWidth = 0.5;\r\n ctx.strokeStyle = sineColour;\r\n ctx.stroke();\r\n \r\n // Crosses\r\n crosses.forEach(cross => {\r\n drawCross(cross.x, cross.y, range(0, crosses.length, minimumOpacity, maximumOpacity, cross.counter));\r\n \r\n cross.counter += cross.direction;\r\n if (cross.counter >= crosses.length) cross.direction = -1 * crossSpeed;\r\n if (cross.counter < 0) cross.direction = crossSpeed;\r\n })\r\n \r\n if (!reduceMotion) {\r\n window.requestAnimationFrame(draw);\r\n }\r\n }\r\n \r\n function onResize() {\r\n width = c.scrollWidth;\r\n height = c.scrollHeight;\r\n \r\n ctx.canvas.width = width;\r\n ctx.canvas.height = height;\r\n \r\n across = Math.ceil(width / crossGap);\r\n down = Math.ceil(height / crossGap);\r\n \r\n totalPoints = (across + 1) * (down + 1);\r\n const ids = shuffle(Array.from({ length: totalPoints }, (_, i) => (i)))\r\n crosses = [];\r\n for(let x = 0; x <= across; x++) {\r\n for(let y = 0; y <= down; y++) {\r\n crosses.push({\r\n counter: ids.shift(),\r\n direction: Math.random() > 0.5 ? crossSpeed : -1 * crossSpeed,\r\n x: crossGap * (x + 1) - crossGap / 1,\r\n y: crossGap * (y + 1) - crossGap / 2\r\n });\r\n }\r\n }\r\n }\r\n \r\n function drawCross(x, y, opacity) {\r\n ctx.beginPath();\r\n ctx.moveTo(x - 14, y);\r\n ctx.lineTo(x + 14, y);\r\n ctx.strokeStyle = `rgba(255, 255, 255, ${opacity}`;\r\n ctx.moveTo(x, y - 14);\r\n ctx.lineTo(x, y + 14);\r\n ctx.stroke();\r\n }\r\n\r\n window.addEventListener('resize', onResize);\r\n onResize();\r\n draw();\r\n}\r\n\r\nexport default HeroPattern;\r\n","function HeroVideo() {\r\n document.addEventListener(\"DOMContentLoaded\", () => {\r\n const videoBackground = document.getElementById('videoBackground');\r\n if(typeof(videoBackground) != 'undefined' && videoBackground != null) {\r\n const reducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)');\r\n if(!reducedMotion || reducedMotion.matches) {\r\n videoBackground.classList.add('u-hidden');\r\n }\r\n \r\n const lightboxTrigger = document.getElementById('playVideo');\r\n const lightboxContainer = document.getElementById('lightboxVideo');\r\n const lightboxVideo = lightboxContainer.querySelector('.c-lightbox__video');\r\n\r\n lightboxTrigger.addEventListener('click', e => {\r\n videoBackground.pause();\r\n lightboxContainer.classList.remove('u-hidden');\r\n checkVideos();\r\n });\r\n \r\n lightboxContainer.addEventListener('click', (e) => {\r\n if (!e.target.classList.contains('c-lightbox__video')) {\r\n videoBackground.setAttribute('autoplay','');\r\n lightboxContainer.classList.add('u-hidden');\r\n checkVideos();\r\n }\r\n });\r\n window.addEventListener('keydown', function(e) {\r\n if (e.key == \"Escape\") {\r\n videoBackground.setAttribute('autoplay','');\r\n lightboxContainer.classList.add('u-hidden');\r\n checkVideos();\r\n }\r\n });\r\n\r\n function checkVideos() {\r\n if(lightboxContainer.classList.contains('u-hidden')) {\r\n if (videoBackground.paused) {\r\n videoBackground.play();\r\n }\r\n if (!lightboxVideo.paused) {\r\n lightboxVideo.pause();\r\n }\r\n } else {\r\n if (!videoBackground.paused) {\r\n videoBackground.pause();\r\n }\r\n }\r\n }\r\n }\r\n });\r\n}\r\n\r\nexport default HeroVideo;","// Add click event listeners to each toggle button\r\nfunction OffCanvas() {\r\n const toggleButtons = Array.from(document.querySelectorAll('.c-button--off-canvas-toggle'));\r\n toggleButtons.forEach((button) => {\r\n button.addEventListener('click', handleToggleClick);\r\n });\r\n}\r\n\r\n// Function to handle the toggle button click\r\nfunction handleToggleClick() {\r\n const target = this.getAttribute('data-target');\r\n const offCanvas = document.getElementById(target);\r\n openOffCanvas(offCanvas);\r\n}\r\n\r\n// Function to open the off-canvas drawer\r\nfunction openOffCanvas(offCanvas) {\r\n const offCanvasList = document.querySelectorAll('.o-off-canvas');\r\n const isOpen = offCanvas.classList.contains('o-off-canvas--open');\r\n\r\n // Close other off-canvas drawers only if the target is not already open\r\n if (!isOpen) {\r\n offCanvasList.forEach((drawer) => {\r\n if (drawer !== offCanvas) {\r\n closeOffCanvas(drawer);\r\n }\r\n });\r\n }\r\n\r\n // Open the target off-canvas drawer\r\n offCanvas.classList.add('o-off-canvas--open');\r\n offCanvas.setAttribute('aria-hidden', 'false');\r\n\r\n // Add click event listener to the backdrop to close the off-canvas drawer\r\n const backdrop = offCanvas.querySelector('.o-off-canvas__backdrop');\r\n backdrop.addEventListener('click', handleBackdropClick);\r\n\r\n // Add keydown event listener to close the off-canvas drawer with the Esc key\r\n document.addEventListener('keydown', handleKeyDown);\r\n\r\n // Prevent background scroll\r\n document.body.style.overflowY = 'hidden';\r\n}\r\n\r\n// Function to handle the backdrop click\r\nfunction handleBackdropClick() {\r\n const offCanvas = this.closest('.o-off-canvas');\r\n closeOffCanvas(offCanvas);\r\n}\r\n\r\n// Function to handle the keydown event\r\nfunction handleKeyDown(event) {\r\n if (event.key === 'Escape') {\r\n const openDrawer = document.querySelector('.o-off-canvas--open');\r\n if (openDrawer) {\r\n closeOffCanvas(openDrawer);\r\n }\r\n }\r\n}\r\n\r\n// Function to close the off-canvas drawer\r\nfunction closeOffCanvas(offCanvas) {\r\n offCanvas.classList.remove('o-off-canvas--open');\r\n offCanvas.setAttribute('aria-hidden', 'true');\r\n\r\n // Remove backdrop click event listener when closing the off-canvas drawer\r\n const backdrop = offCanvas.querySelector('.o-off-canvas__backdrop');\r\n backdrop.removeEventListener('click', handleBackdropClick);\r\n\r\n // Remove keydown event listener when closing the off-canvas drawer\r\n document.removeEventListener('keydown', handleKeyDown);\r\n\r\n // Allow background scroll\r\n document.body.style.overflowY = '';\r\n}\r\n\r\n// Update button functionality\r\nconst updateButton = document.querySelectorAll('.o-off-canvas__update');\r\nupdateButton.forEach((button) => {\r\n button.addEventListener('click', handleUpdateButtonClick);\r\n});\r\n\r\n// Handle the update button click\r\nfunction handleUpdateButtonClick() {\r\n // Save the options somewhere\r\n const offCanvas = this.closest('.o-off-canvas');\r\n closeOffCanvas(offCanvas);\r\n}\r\n\r\n// Close button functionality\r\nconst closeButton = document.querySelectorAll('.o-off-canvas__close');\r\ncloseButton.forEach((button) => {\r\n button.addEventListener('click', handleCloseButtonClick);\r\n});\r\n\r\n// Handle the close button click\r\nfunction handleCloseButtonClick() {\r\n const offCanvas = this.closest('.o-off-canvas');\r\n closeOffCanvas(offCanvas);\r\n};\r\n\r\n\r\nexport default OffCanvas;","const ResponsiveTable = () => {\r\n const tables = Array.from(document.querySelectorAll('.c-table--responsive'));\r\n tables.forEach(createResponsiveTable);\r\n\r\n /**\r\n * Create responsive table headers for large tables\r\n * @param {HTMLTableElement} table\r\n */\r\n function createResponsiveTable(table) {\r\n const headers = table.querySelectorAll('thead > :first-child th');\r\n const breakPoint = Number(table.getAttribute('data-columns')) || 2\r\n \r\n if (headers.length < breakPoint) {\r\n table.classList.remove('c-table--responsive');\r\n return;\r\n };\r\n\r\n Array.from(table.querySelectorAll('tbody tr')).forEach((row) => {\r\n Array.from(headers)\r\n .map((x) => x.textContent)\r\n .forEach((header, index) => {\r\n if (row.children[index]) {\r\n row.children[index].setAttribute('data-responsive-title', header);\r\n }\r\n });\r\n });\r\n }\r\n};\r\n\r\nexport default ResponsiveTable;\r\n","import { debounce } from './utilities';\r\n\r\nfunction ScrollbarWidth() {\r\n setScrollbarWidth();\r\n window.addEventListener('resize', debounce(setScrollbarWidth, 250));\r\n}\r\n\r\nfunction setScrollbarWidth() {\r\n document.documentElement.style.setProperty(\r\n '--scrollbarWidth', \r\n window.innerWidth - document.body.clientWidth + 'px'\r\n );\r\n}\r\n\r\nexport default ScrollbarWidth;","function ScrollSpy() {\r\n const spies = Array.from(document.querySelectorAll('.c-scroll-spy'));\r\n spies.forEach(setup);\r\n}\r\n\r\nfunction setup(element) {\r\n const anchors = Array.from(element.querySelectorAll('a'));\r\n const observer = new IntersectionObserver(observation(anchors));\r\n \r\n anchors.forEach(anchor => {\r\n const id = anchor.getAttribute('href').replace('#', '');\r\n const target = document.getElementById(id);\r\n if (!target) return;\r\n\r\n observer.observe(target);\r\n });\r\n}\r\n\r\n/**\r\n * @param {Array<HTMLAnchorElement>} results \r\n * @return {Array<IntersectionObserverEntry>}\r\n */\r\nfunction observation(anchors) {\r\n return (results) => {\r\n const firstObservation = results.find(x => x.isIntersecting);\r\n\r\n if (firstObservation) {\r\n anchors.forEach(x => {\r\n x.classList.toggle(\r\n 'c-scroll-spy-active',\r\n x.getAttribute('href') === '#' + firstObservation.target.id\r\n )\r\n })\r\n }\r\n }\r\n}\r\n\r\nexport default ScrollSpy;\r\n","function Tabs() {\r\n const tabs = Array.from(document.querySelectorAll('.c-tabs--anchor'));\r\n tabs.forEach(setupTabs);\r\n}\r\n\r\nfunction setupTabs(parent) {\r\n const controls = Array.from(parent.querySelectorAll('.c-tabs__control'));\r\n const content = Array.from(parent.querySelectorAll('.c-tab'));\r\n const persist = parent.classList.contains('c-tabs--persist');\r\n \r\n if (!controls.length || !content.length) return;\r\n\r\n controls.forEach(control => {\r\n control.addEventListener('click', controlClick(controls, content, persist))\r\n })\r\n\r\n if (persist && window.location.hash) {\r\n const control = parent.querySelector('[href=\"' + window.location.hash + '\"]');\r\n if (control) control.dispatchEvent(new Event('click'));\r\n }\r\n}\r\n\r\nfunction controlClick(controls, contents, persist) {\r\n return (event) => {\r\n const control = event.currentTarget;\r\n const content = contents.find(x => x.id === control.getAttribute('href').replace('#', ''));\r\n \r\n if (!content) {\r\n return true;\r\n };\r\n\r\n event.preventDefault();\r\n \r\n if (persist) {\r\n history.pushState(null, null, control.getAttribute('href'));\r\n }\r\n\r\n controls.forEach(c => c.classList.toggle('c-tabs__control--active', c === control));\r\n contents.forEach(c => {\r\n const isCurrent = c === content;\r\n c.classList.toggle('c-tab--active', isCurrent);\r\n \r\n if (persist) return;\r\n\r\n if (isCurrent) {\r\n c.setAttribute('tabIndex', -1);\r\n \r\n const y = window.scrollY;\r\n c.focus();\r\n window.scrollTo({ behavior: \"auto\", top: y })\r\n } else {\r\n c.removeAttribute('tabIndex');\r\n }\r\n });\r\n }\r\n}\r\n\r\nexport default Tabs;\r\n","import Accordion from './imports/accordion';\r\nimport Carousel from './imports/carousel';\r\nimport ClearForm from './imports/clear-form';\r\nimport Comparison from './imports/comparison';\r\nimport Gallery from './imports/gallery';\r\nimport HeroPattern from './imports/hero-pattern';\r\nimport HeroVideo from './imports/hero-video';\r\nimport OffCanvas from './imports/off-canvas';\r\nimport ResponsiveTable from './imports/responsive-table';\r\nimport ScrollbarWidth from './imports/scrollbar-width';\r\nimport ScrollSpy from './imports/scroll-spy';\r\nimport Tabs from './imports/tabs';\r\n\r\n(() => {\r\n if(window.NodeList && !NodeList.prototype.forEach) {\r\n NodeList.prototype.forEach = Array.prototype.forEach;\r\n }\r\n if(window.HTMLCollection && !HTMLCollection.prototype.forEach) {\r\n HTMLCollection.prototype.forEach = Array.prototype.forEach;\r\n }\r\n \r\n Accordion();\r\n Carousel();\r\n ClearForm();\r\n Comparison();\r\n Gallery();\r\n HeroPattern();\r\n HeroVideo();\r\n OffCanvas();\r\n ResponsiveTable();\r\n ScrollbarWidth();\r\n ScrollSpy();\r\n Tabs();\r\n})();"],"names":["$c274619fa9ae66ac$var$setupAccordions","title","addEventListener","event","currentTarget","parentElement","classList","toggle","$c274619fa9ae66ac$export$2e2bcd8739ae039","Array","from","document","querySelectorAll","forEach","$5bdce36a18199573$export$2e2bcd8739ae039","current","bgSlides","fgSlides","length","setInterval","bgSlide","style","opacity","fgSlide","$2b04c6f63ef290fb$export$2e2bcd8739ae039","formClear","getElementById","this","closest","elements","field","value","type","toLowerCase","checked","$7fbc59e2fab6d5d2$var$extractMobileComparison","container","body","querySelector","head","mobile","products","children","filter","x","i","map","info","innerHTML","table","row","contains","push","textContent","cells","firstCell","shift","el","index","key","product","parent","createElement","join","$7fbc59e2fab6d5d2$var$createMobileProduct","appendChild","$7fbc59e2fab6d5d2$export$2e2bcd8739ae039","$dfe0031b837edf6f$export$2e2bcd8739ae039","mainSlides","thumbnailSlides","lightboxTrigger","lightbox","cloneNode","remove","add","slide","slideImg","srcset","removeAttribute","insertAdjacentHTML","lightboxActive","prevImage","parseInt","dataset","nextImage","e","target","thumbnailSlide","thumbnail","parentNode","mainSlide","$41a3994d4318effb$export$b568019c0551f0a4","y","a","min","max","Math","$41a3994d4318effb$export$7d15b64cf5a3a4c4","$2e27ca8f14f20195$export$2e2bcd8739ae039","time","c","ctx","getContext","reduceMotion","window","matchMedia","matches","crossGap","crossSpeed","width","height","across","down","totalPoints","crosses","onResize","scrollWidth","scrollHeight","canvas","ceil","ids","array","arr","j","floor","random","$41a3994d4318effb$export$448332262467e042","_","counter","direction","draw","clearRect","beginPath","cnt","lineTo","cos","lineWidth","strokeStyle","stroke","cross","x1","y1","x2","y2","$41a3994d4318effb$export$3a89f8d6f6bf6c9f","moveTo","requestAnimationFrame","$63fd9338c6a56d33$export$2e2bcd8739ae039","videoBackground","reducedMotion","lightboxContainer","lightboxVideo","checkVideos","paused","play","pause","setAttribute","$34e92b90f028a0e5$var$handleToggleClick","getAttribute","offCanvas","offCanvasList","drawer","$34e92b90f028a0e5$var$closeOffCanvas","$34e92b90f028a0e5$var$handleBackdropClick","$34e92b90f028a0e5$var$handleKeyDown","overflowY","$34e92b90f028a0e5$var$openOffCanvas","openDrawer","removeEventListener","$34e92b90f028a0e5$var$handleUpdateButtonClick","button","$34e92b90f028a0e5$var$handleCloseButtonClick","$34e92b90f028a0e5$export$2e2bcd8739ae039","headers","breakPoint","Number","header","$e3dc92a106d80d6c$var$setScrollbarWidth","documentElement","setProperty","innerWidth","clientWidth","$e3dc92a106d80d6c$export$2e2bcd8739ae039","func","limit","wait","setTimeout","$41a3994d4318effb$export$61fc7d43ac8f84b0","$9d1dec2ad218c628$var$setup","element","anchors","observer","IntersectionObserver","results","firstObservation","find","isIntersecting","id","$9d1dec2ad218c628$var$observation","anchor","replace","observe","$1d2dabc452d8efd6$var$setupTabs","controls","content","persist","control","contents","preventDefault","history","pushState","isCurrent","scrollY","focus","scrollTo","behavior","top","$1d2dabc452d8efd6$var$controlClick","location","hash","dispatchEvent","Event","$1d2dabc452d8efd6$export$2e2bcd8739ae039","NodeList","prototype","HTMLCollection","$384feef4bde84172$export$2e2bcd8739ae039","$9d1dec2ad218c628$export$2e2bcd8739ae039"],"version":3,"file":"app.js.map"}
|