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AS,MAIbgD,EAAc,CACZjD,GAAIiC,EAAMG,cAAc,0CACxBhC,OAAQ,WACN6B,EAAMtB,UAAUQ,OAAO,gCACvBa,EAAc,KAEVkB,OAAOC,aAAmD,mBAA7BD,OAAOC,YAAYC,OAClDF,OAAOC,YAAYC,OAPX,EAUZlD,OAAQ,WACN+B,EAAMtB,UAAUW,IAAI,gCACpBU,EAAcC,EAEViB,OAAOC,aAAkD,mBAA5BD,OAAOC,YAAYG,MAClDJ,OAAOC,YAAYG,MAfX,EAkBZrD,QAAS,KA/Bb,GADF,IAsCA,IAAMsD,EAAOtB,EAAMG,cAAc,yBAC7BmB,GACFA,EAAK/B,iBAAiB,SAAS,SAACV,GAAM,MACpCA,EAAEuC,iBACFN,EAAMS,QACNzB,QAAA,EAAAA,EAAOG,EAAI,GAAGE,cAAc,kDAA5BL,IAAAA,GAAAA,EAAwEyB,OAH1E,GAhFJ,GAHF,GAJJ,ECCA7B,SAASH,iBAAiB,oBAAoB,WAC5CG,SACGC,iBAAiB,0CACjBC,SAAQ,SAAC4B,GAAD,OAAUA,EAAKC,aAAa,qBAAsB,OAF7D,GADF,IAMA,IAAMC,EAAwB,WAC5BC,GADF,EAIAV,OAAOS,sBAAwBA,EAG/BhC,SAASkC,KACLF,IACAhC,SAASH,iBAAiB,mBAAoBmC,GAAuB","sources":["webpack:///./_src/js/helpers/collapseWidth.js","webpack:///./_src/js/components/teamSlideout.js","webpack:///./_src/js/index.js"],"sourcesContent":["const collapseWidth = ({ el, timeOut, onShow, onShown, onHide, onHidden }) => {\n if (!el) {\n return console.error(\"Missing \", { el: !!el });\n }\n /* easy class access */\n const [hidden, collapsing] = [\n \"fndry-collapseWidth--hidden\",\n \"fndry-collapseWidth--collapsing\",\n ];\n\n /* get our initial state */\n const isHidden = el.classList.contains(hidden);\n\n const cleanup = (e) => {\n /* abort if we're being used as an event and the transitionend event target doesn't match our el */\n if (e.target !== el) {\n return;\n }\n\n /* remove event listener if there is one i guess*/\n if (e) {\n el.removeEventListener(\"transitionend\", cleanup);\n }\n\n el.style.width = \"\";\n el.classList.remove(collapsing);\n\n if (!isHidden) {\n el.classList.add(hidden);\n if (onHidden && typeof onHidden === \"function\") {\n onHidden.call(this);\n }\n } else if (onShown && typeof onShown === \"function\") {\n onShown.call(this);\n }\n };\n\n if (isHidden) {\n if (onShow && typeof onShow === \"function\") {\n onShow.call(this);\n }\n el.classList.remove(hidden);\n el.classList.add(collapsing);\n if (timeOut) {\n setTimeout(() => {\n el.style.width = \"\";\n el.classList.remove(collapsing);\n if (onShown && typeof onShown === \"function\") {\n onShown.call(this);\n }\n }, timeOut);\n } else {\n el.addEventListener(\"transitionend\", cleanup);\n setTimeout(() => {\n el.style.width = `${el.scrollwidth}px!important`;\n }, 1);\n }\n } else if (!isHidden) {\n if (onHide && typeof onHide === \"function\") {\n onHide.call(this);\n }\n el.style.width = `${el.scrollwidth}px!important`;\n el.classList.add(collapsing);\n if (timeOut) {\n el.style.width = \"\";\n setTimeout(() => {\n el.classList.add(hidden);\n el.classList.remove(collapsing);\n if (onHidden && typeof onHidden === \"function\") {\n onHidden.call(this);\n }\n }, timeOut);\n } else {\n el.addEventListener(\"transitionend\", cleanup);\n setTimeout(() => {\n el.style.width = \"\";\n }, 1);\n }\n }\n};\n\nexport default collapseWidth;\n","import collapseWidth from \"../helpers/collapseWidth\";\n\nconst teamSlideout = () => {\n const slideoutBlocks = document.querySelectorAll(\".leadership-slideout\");\n\n if (slideoutBlocks) {\n slideoutBlocks.forEach((slideoutBlock) => {\n const blocks = slideoutBlock.querySelectorAll(\".fndry-slideout-block\");\n let activeBlock = null;\n blocks.forEach((block, i) => {\n const button = block.querySelector(\".fndry-slideout-block__slideout-content\");\n const hiddenContent = block.querySelector(\".fndry-slideout-block__slideout-hidden\");\n hiddenContent.classList.add(\"fndry-collapseWidth--hidden\");\n hiddenContent.classList.add(\"fndry-slideout-block__slideout-hidden--loaded\");\n\n const locoProps = {\n scroll: \"\",\n scrollDirection: \"vertical\",\n scrollSticky: \"\",\n scrollTarget: \".wp-site-blocks\",\n };\n\n Object.keys(locoProps).forEach((prop) => {\n hiddenContent.dataset[prop] = locoProps[prop];\n });\n\n const close = block.querySelector(\".fndry-slideout-block__close-btn\");\n\n hiddenContent.addEventListener(\"click\", (e) => {\n if (\n activeBlock &&\n e.target === activeBlock.querySelector(\".fndry-slideout-block__slideout-hidden\")\n ) {\n console.log(\"firing\", hiddenContent, e.target, activeBlock);\n collapseWidth({\n el: activeBlock.querySelector(\".fndry-slideout-block__slideout-hidden\"),\n onHide: () => {\n activeBlock.classList.remove(\"fndry-slideout-block--active\");\n activeBlock = null;\n // document.body.classList.remove(\"fndry-nav-is-open\");\n if (window.fndryScroll && typeof window.fndryScroll.start === \"function\") {\n window.fndryScroll.start();\n }\n },\n timeOut: 251,\n });\n }\n });\n\n [button, close].forEach((el) =>\n el.addEventListener(\"click\", (e) => {\n e.preventDefault();\n\n if (activeBlock && block !== activeBlock) {\n collapseWidth({\n el: activeBlock.querySelector(\".fndry-slideout-block__slideout-hidden\"),\n onHide: () => {\n activeBlock.classList.remove(\"fndry-slideout-block--active\");\n },\n timeOut: 251,\n });\n }\n\n collapseWidth({\n el: block.querySelector(\".fndry-slideout-block__slideout-hidden\"),\n onHide: () => {\n block.classList.remove(\"fndry-slideout-block--active\");\n activeBlock = null;\n // document.body.classList.remove(\"fndry-nav-is-open\");\n if (window.fndryScroll && typeof window.fndryScroll.start === \"function\") {\n window.fndryScroll.start();\n }\n },\n onShow: () => {\n block.classList.add(\"fndry-slideout-block--active\");\n activeBlock = block;\n // document.body.classList.add(\"fndry-nav-is-open\");\n if (window.fndryScroll && typeof window.fndryScroll.stop === \"function\") {\n window.fndryScroll.stop();\n }\n },\n timeOut: 251,\n });\n })\n );\n\n /* handle next*/\n const next = block.querySelector(\".fndry-slideout__next\");\n if (next) {\n next.addEventListener(\"click\", (e) => {\n e.preventDefault();\n close.click();\n blocks[i + 1].querySelector(\".fndry-slideout-block__slideout-content\")?.click();\n });\n }\n });\n });\n }\n};\n\nexport default teamSlideout;\n","// use lodash! https://lodash.com/docs/4.17.15\nimport teamSlideout from \"./components/teamSlideout\";\n\ndocument.addEventListener(\"DOMContentLoaded\", function () {\n document\n .querySelectorAll(\".fndry-slideout-block__slideout-hidden\")\n .forEach((cont) => cont.setAttribute(\"data-lenis-prevent\", \"true\"));\n});\n\nconst fndryThemeInitWrapper = () => {\n teamSlideout();\n};\n\nwindow.fndryThemeInitWrapper = fndryThemeInitWrapper;\n\n// eslint-disable-next-line no-unused-expressions\ndocument.body\n ? fndryThemeInitWrapper()\n : document.addEventListener(\"DOMContentLoaded\", fndryThemeInitWrapper, false);\n"],"names":["el","timeOut","onShow","onShown","onHide","onHidden","console","error","hidden","collapsing","isHidden","classList","contains","cleanup","e","target","removeEventListener","style","width","remove","call","_this","add","setTimeout","addEventListener","scrollwidth","slideoutBlocks","document","querySelectorAll","forEach","slideoutBlock","blocks","activeBlock","block","i","button","querySelector","hiddenContent","locoProps","scroll","scrollDirection","scrollSticky","scrollTarget","Object","keys","prop","dataset","close","log","collapseWidth","window","fndryScroll","start","preventDefault","stop","next","click","cont","setAttribute","fndryThemeInitWrapper","teamSlideout","body"],"sourceRoot":""}