This repository has been archived by the owner on Jun 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjs.b8ff3957.js
3 lines (3 loc) · 4.58 KB
/
js.b8ff3957.js
1
2
3
parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"rIon":[function(require,module,exports) {
function e(e,o){return c(e)||r(e,o)||n(e,o)||t()}function t(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function n(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.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}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function r(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],o=!0,r=!1,c=void 0;try{for(var i,s=e[Symbol.iterator]();!(o=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);o=!0);}catch(a){r=!0,c=a}finally{try{o||null==s.return||s.return()}finally{if(r)throw c}}return n}}function c(e){if(Array.isArray(e))return e}!function(){function t(e){return Array.prototype.slice.call(e)}window.SD={},SD.makeSelectors=function(e,t){return Object.assign({},Object.keys(e).reduce(function(t,n){return t[n]="."+e[n],t},{}),t||{})},SD.classesAndSelectors=function(e,t){return[e,SD.makeSelectors(e,t)]};var n=e(SD.classesAndSelectors({burger:"js--burger",burgeractive:"p--active",mobileMenu:"js--mobile-menu",mobileMenuOpen:"p--open",noScroll:"p--no-scroll",siteHeader:"UpArrow",isScrolled:"p--is-scrolled",showcase:"js--showcase",button:"js--show-btn",image:"js--show-img",active:"js--active",detailsButton:"js--expandable-toggle",detailsContent:"js--expandable"}),2),o=n[0],r=n[1];document.querySelector(r.burger).addEventListener("click",function(){document.querySelector(r.burger).classList.toggle(o.burgeractive),document.querySelector(r.mobileMenu).classList.toggle(o.mobileMenuOpen),document.querySelector("body").classList.toggle(o.noScroll)});var c=document.querySelector(r.siteHeader),i=document.body.clientHeight;function s(){var e=document.body.scrollTop,t=window.innerHeight+window.scrollY>=document.body.offsetHeight;e>=i||t?c.classList.add(o.isScrolled):c.classList.remove(o.isScrolled)}document.addEventListener("scroll",s),s(),document.body.addEventListener("mousedown",function(){document.body.classList.add("js--using-mouse")}),document.body.addEventListener("keydown",function(){document.body.classList.remove("js--using-mouse")}),t(document.querySelectorAll(r.showcase)).forEach(function(e){var n=t(e.querySelectorAll(r.button)),c=t(e.querySelectorAll(r.image));function i(r){c.forEach(function(e){return e.classList.remove(o.active)}),c[r].classList.add(o.active),n.forEach(function(e){return e.classList.remove(o.active)}),n[r].classList.add(o.active),t(e.querySelectorAll("[data-index]")).forEach(function(e){return e.style.display="none"}),t(e.querySelectorAll("[data-index='".concat(r,"']"))).forEach(function(e){return e.style.display="unset"})}n.forEach(function(e,t){e.addEventListener("click",function(){return i(t)},!1)}),c.forEach(function(e){e.addEventListener("click",function(){i((c.findIndex(function(e){return e.classList.contains(o.active)})+1)%c.length)})}),n[0].classList.add(o.active),c[0].classList.add(o.active)}),t(document.querySelectorAll(r.detailsButton)).forEach(function(e){e.addEventListener("mousedown",function(e){e.preventDefault(),e.stopPropagation();var t=this.getAttribute("data-toggle"),n=document.querySelector("[data-expandable=".concat(t,"]"));[void 0,""].includes(n.getAttribute("open"))?(n.removeAttribute("open"),this.textContent="Details"):(n.setAttribute("open",""),this.textContent="Close")})})}();
},{}]},{},["rIon"], null)