{"version":3,"file":"script.js","sources":["../../../dev/assets/js/utilities.js","../../../dev/components/enso/_script.js","../../../dev/components/hero/_video.js","../../../dev/components/modal/carbon/_script.js","../../../dev/components/modal/_script.js","../../../dev/components/modal/generic-dialog/_script.js","../../../dev/templates/light-carbon-detail/script.js"],"sourcesContent":["import { isWistiaVideoPlaying } from \"../../components/video-wistia/_script.js\";\n\nexport function isAdmin() {\n\tconst ensoElement = document.querySelector(\"[enso]\");\n\tconst ensoElementAttribute = ensoElement.getAttribute(\"enso\");\n\treturn Boolean(ensoElementAttribute);\n}\n\nexport function showForAdmin() {\n\tif (!isAdmin()) return;\n\n\tif (window.matchMedia(\"(max-width : 768px)\").matches) return;\n\n\tconst elements = document.querySelectorAll(\"[js-show-for-admin]\");\n\tfor (const element of elements) {\n\t\tconst getDisplayType = element.getAttribute(\"js-show-for-admin\");\n\t\telement.classList.remove(\"hide\");\n\t\telement.style.display = `${getDisplayType}`; // to pick up edge cases during migration\n\t}\n}\n\nexport function cleanupAnchorTags() {\n\t// Remove a tag if href is missing or undefined\n\t$(\"a\").each(function () {\n\t\tif ($(this).attr(\"href\") == \"\" || $(this).attr(\"href\") == \"undefined\") {\n\t\t\t$(this).remove();\n\t\t}\n\t});\n}\n\n// Check all a links to find target = _blank see above\nexport function cleanupAnchorTagsBlankTarget() {\n\tdocument.querySelectorAll(\"a\").forEach(function (link) {\n\t\tif (!link.hasAttribute(\"href\")) link.remove();\n\n\t\tconst linkHref = link.getAttribute(\"href\");\n\n\t\t// Add _blank to all links that go to Monster Campaigns so they open on top of our pages instead of being redirected to Monsty\n\t\tif (linkHref && linkHref.includes(\"https://app.monstercampaigns.com/\")) {\n\t\t\tlink.setAttribute(\"target\", \"_blank\");\n\t\t\treturn;\n\t\t}\n\n\t\t// Remove all _blank from a tags on mobile and tablet\n\t\tif (document.documentElement.clientWidth < 1025) {\n\t\t\tlink.setAttribute(\"target\", \"_self\");\n\t\t}\n\t});\n}\n\nexport function pushEvent(item, action, label) {\n\ttry {\n\t\tdataLayer.push({\n\t\t\tevent: item,\n\t\t\taction: action,\n\t\t\tlabel: label\n\t\t});\n\t\tconsole.log(\"Success: Pushed Event via data layer:\", item, action, label);\n\t} catch (error) {\n\t\tconsole.log(\"Failed: Pushed Event:\", item, action, label, \"-\", error);\n\t}\n}\n\nexport function pushEventFacebook() {\n\ttry {\n\t\tfbq(\"track\", \"Lead\");\n\t} catch (error) {\n\t\tconsole.log(\"Failed : pushEventFacebook\");\n\t}\n}\n\nexport function pushEventBing() {\n\ttry {\n\t\twindow.uetq = window.uetq || [];\n\t\twindow.uetq.push({\n\t\t\tec: \"Lead\",\n\t\t\tea: \"Catalog_Request\"\n\t\t});\n\t} catch (error) {\n\t\t// console.log(\"Failed : pushEventBing\");\n\t}\n}\n\n// Function: get user's device size. This function is intentionally duplicated here to be available for global use. Second instance lives in resize-img.js\nexport function getBrowserDevice() {\n\tif (window.matchMedia(\"(max-width : 767px)\").matches) return \"mobile\";\n\tif (window.matchMedia(\"(min-width : 768px) AND (max-width : 1023px)\").matches) return \"tablet\";\n\tif (window.matchMedia(\"(min-width : 1024px)\").matches) return \"desktop\";\n\treturn \"unsure\";\n}\n\n// EVENT - Check for country local storage, set if not already set\nexport async function saveUserCountryToLocalStorage() {\n\tlet userCountry = localStorage.getItem(\"country\");\n\tif (userCountry === null) {\n\t\tuserCountry = await setUserCountry();\n\t}\n}\n\n// set user country in local storage\nasync function setUserCountry() {\n\ttry {\n\t\tlet response = await fetch(\"https://ipinfo.io/json?token=5ddc6962f801d5\");\n\t\tlet data = await response.json();\n\t\tlet userCountry = data.country || \"unknown\";\n\t\tlocalStorage.setItem(\"country\", userCountry);\n\t\treturn userCountry;\n\t} catch (err) {\n\t\tconsole.error(\"Failed to fetch user country.\", err);\n\t\treturn \"unknown\"; // Return a default value in case of an error\n\t}\n}\n\n// Function: check if any modal is open\nexport function checkForOpenModals() {\n\tconst isOpen = sessionStorage.getItem(\"modalOpen\") === \"true\";\n\treturn isOpen;\n}\n\n// Function: check if a wistia video is playing\nexport function checkIfWistiaVideoPlaying() {\n\tconst wistiaVideo = document.querySelector(\".js-video\");\n\tif (wistiaVideo && isWistiaVideoPlaying() !== undefined) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}\n\n// vanilla wrapper to get cookie value\nexport function getCookie(name) {\n\tlet value = `; ${document.cookie}`;\n\tlet parts = value.split(`; ${name}=`);\n\tif (parts.length === 2) return parts.pop().split(\";\").shift();\n}\n\n// Utility to copy text to clipboard\nexport async function copyToClipboard(val) {\n\ttry {\n\t\tawait navigator.clipboard.writeText(val);\n\t} catch (err) {\n\t\tconsole.error(\"Failed to copy: \", err);\n\t}\n}\n\n// Utility to track browser size for Google Analytics -- are we using this?\nexport function browserSize() {\n\tlet width = window.innerWidth || document.body.clientWidth;\n\tlet height = window.innerHeight || document.body.clientHeight;\n\tlet size = width + \"x\" + height;\n\n\tlet browserSizeCookie = Cookies.get(\"browserSize\");\n\tif (browserSizeCookie === \"blocked\" || browserSizeCookie == null || browserSizeCookie != size) {\n\t\tbrowserSizeCookie = size;\n\t\tCookies.set(\"browserSize\", size, {\n\t\t\texpires: 365\n\t\t});\n\t\tpushEvent(\"Browser Size\", \"Range\", size);\n\t}\n}\n\n// Function: show hero photo credit if name has been entered in CMS\nexport function showHeroPhotoCredit() {\n\tconst photoCredit = document.querySelector(\"[js-hero-photo-credit]\");\n\tif (photoCredit) {\n\t\tconst creditText = photoCredit.textContent.trim();\n\t\tif (creditText.length > 2) {\n\t\t\tphotoCredit.classList.remove(\"hide\");\n\t\t} else {\n\t\t\tphotoCredit.classList.add(\"hide\");\n\t\t}\n\t}\n}\n\n// Need to run on page load but not a huge priority\nexport function setFavIcon() {\n\tconst favicon = document.querySelector(\"[js-set-favicon]\");\n\tconst mediaQuery = window.matchMedia(\"(prefers-color-scheme: dark)\");\n\tif (!favicon) return;\n\tfunction updateFavicon() {\n\t\tfavicon.setAttribute(\"href\", mediaQuery.matches ? \"/assets/images/icons/favicon-dark-mode.png\" : \"/assets/images/icons/favicon-light-mode.png\");\n\t}\n\tupdateFavicon();\n\tmediaQuery.addEventListener(\"change\", updateFavicon);\n}\n\n// Track social icon clicks for GA\nexport function trackSocialClicks(links, area) {\n\tlet socialLinks = document.querySelectorAll(`[${links}]`);\n\tsocialLinks.forEach(function (link) {\n\t\tlink.addEventListener(\"click\", function () {\n\t\t\tlet platform = link.getAttribute(`${links}`);\n\t\t\tpushEvent(\"Clicks\", `Social ${area}`, `${platform}`);\n\t\t});\n\t});\n}\n\n// Functions: check if elements exist\nconst ensureElementExists = (elementSelector, limit) =>\n\tnew Promise((resolve, reject) => {\n\t\tlet count = 0;\n\t\tfunction waitForElement() {\n\t\t\tconst element = document.querySelector(elementSelector);\n\t\t\tif (element) return resolve(element);\n\t\t\tif (limit && count > limit) return false;\n\t\t\tcount += 1;\n\t\t\tsetTimeout(waitForElement, 100);\n\t\t}\n\t\twaitForElement();\n\t});\n\nexport const waitUntilElementExists = async (elementSelector, limit) => {\n\tconst response = await ensureElementExists(elementSelector, limit);\n\treturn response;\n};\n\nexport function addEnsoExample(selector) {\n\tconst element = document.querySelector(selector);\n\tconst elementText = element.innerText;\n\n\tif (element && elementText === \"\") element.classList.add(\"js-enso-example\");\n}\n\nexport function removeMissingImage() {\n\tconst images = document.querySelectorAll(\"[js-remove-missing-image]\");\n\timages.forEach((img) => {\n\t\tif (img.naturalWidth === 0) {\n\t\t\timg.remove();\n\t\t}\n\t});\n}\n","//\n\n// Is there a better way to handle this like [enso].js-enso-on?\n\n// Function - Modernize Enso\nexport function enso() {\n\tconst ensoElements = [...document.querySelectorAll(\".enso-overlay-link\")];\n\n\tif (!ensoElements) return;\n\tfor (const element of ensoElements) {\n\t\tlet ensoOverlayContentElement = element.closest(\".enso-overlay-content\");\n\t\tlet ensoElement = ensoOverlayContentElement.closest(\"[enso]\");\n\t\tcopyEnsoLinkToParentAttribute(element);\n\t\telement.remove();\n\t\tunWrap(ensoOverlayContentElement);\n\t\tensoOverlayContentElement.remove();\n\t\taddTabKeyDownEvent(ensoElement);\n\t}\n}\n\n// FUNCTION - Move Enso Link to parent element with enso attribute\nfunction copyEnsoLinkToParentAttribute(element) {\n\tlet getLink = element.getAttribute(\"onclick\");\n\tgetLink = getLink.replace('self.location.href=\"', \"\").replace('\"', \"\");\n\tlet targetEnso = element.closest(\"[enso]\");\n\tif (targetEnso) {\n\t\ttargetEnso.setAttribute(\"enso\", getLink);\n\t}\n}\n\n// Function - Upwrap element\nfunction unWrap(element) {\n\tconst parent = element.parentNode;\n\twhile (element.firstChild) {\n\t\tparent.insertBefore(element.firstChild, element);\n\t}\n}\n\n// Function - Add in tab keydown event\nfunction addTabKeyDownEvent(element) {\n\tlet overlayVisible = false;\n\tdocument.addEventListener(\"keydown\", (event) => {\n\t\tif (event.key === \"Tab\" && element) {\n\t\t\tevent.preventDefault();\n\t\t\toverlayVisible = !overlayVisible;\n\t\t\tif (overlayVisible) {\n\t\t\t\telement.classList.add(\"js-enso-on\");\n\t\t\t\taddEnsoClickListener(element);\n\t\t\t} else {\n\t\t\t\telement.classList.remove(\"js-enso-on\");\n\t\t\t\tremoveEnsoClickListener(element);\n\t\t\t}\n\t\t}\n\t});\n}\n\n// Function - Setup link href\nfunction setupLink(e) {\n\te.preventDefault();\n\tlet goToUrl = this.getAttribute(\"enso\"); // this was the key\n\twindow.location.href = goToUrl;\n}\n\n// Function - Add click event listener\nfunction addEnsoClickListener(element) {\n\telement.addEventListener(\"click\", setupLink, false);\n}\n\n// Function - Remove click event listener\nfunction removeEnsoClickListener(element) {\n\telement.removeEventListener(\"click\", setupLink);\n}\n","import { checkForOpenModals } from \"../../assets/js/utilities.js\";\n\nexport function observeAmbientVideo() {\n\tsessionStorage.setItem(\"modalOpen\", false);\n\n\t// select it\n\tconst videos = document.querySelectorAll(\"[js-ambient-video]\");\n\n\t// check it\n\tif (videos.length === 0) return;\n\n\t// func call to assign active video, return active video element\n\tlet activeVideo = assignActiveAmbientVideo(videos);\n\n\t// resize event listener to call func to reassign active video\n\twindow.addEventListener(\"resize\", () => {\n\t\tactiveVideo = assignActiveAmbientVideo(videos);\n\t});\n\n\t// visibility event listener to call func to pause video when tab is not active\n\tdocument.addEventListener(\"visibilitychange\", () => {\n\t\thandleVisibilityChange(activeVideo);\n\t});\n\n\t// create an observer instance\n\tlet observer = new IntersectionObserver(playOrPauseAmbientVideo, {\n\t\tthreshold: 0.5 // Adjust as necessary\n\t});\n\n\t// observe active video\n\tif (activeVideo) observer.observe(activeVideo);\n}\n\n// play or pause based on tab visibility\nfunction handleVisibilityChange(activeVideo) {\n\tif (checkForOpenModals()) return;\n\n\ttoggleAmbientVideo(!document.hidden, activeVideo);\n}\n\n// find the active video\nfunction assignActiveAmbientVideo(videos) {\n\tconst isMobile = window.matchMedia(\"(orientation: portrait)\").matches;\n\n\tconst activeVideo = Array.from(videos).find((video) => {\n\t\tconst deviceType = isMobile ? \"mobile\" : \"desktop\";\n\t\tconst videoAttribute = video.getAttribute(\"js-ambient-video\");\n\n\t\tif (videoAttribute !== deviceType) {\n\t\t\ttoggleAmbientVideo(false, video); // Pause the video if it's not for the current device type\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t});\n\n\tif (activeVideo) activeVideo.classList.add(\"active\");\n\n\treturn activeVideo;\n}\n\n// play or pause based on intersection and tab visibility\nfunction playOrPauseAmbientVideo(entries) {\n\tentries.forEach((entry) => {\n\t\tlet isModalOpen = checkForOpenModals();\n\t\tif (entry.isIntersecting && !document.hidden && !isModalOpen) {\n\t\t\ttoggleAmbientVideo(true, entry.target);\n\t\t} else {\n\t\t\ttoggleAmbientVideo(false, entry.target);\n\t\t}\n\t});\n}\n\nfunction isAmbientVideoPlaying(videoElement) {\n\treturn !videoElement.paused;\n}\n\nexport function toggleAmbientVideo(shouldPlay, videoElement = null) {\n\t// If a specific video element is provided, use it\n\tif (videoElement) {\n\t\tshouldPlay ? videoElement.play() : videoElement.pause();\n\t\treturn;\n\t}\n\t// Otherwise, find the active video\n\tconst activeVideo = document.querySelector(\"[js-ambient-video].active\");\n\n\tif (activeVideo) shouldPlay ? activeVideo.play() : activeVideo.pause();\n}\n","import { isAdmin } from \"../../../assets/js/utilities.js\";\nimport { enso } from \"../../../components/enso/_script.js\";\nimport { toggleAmbientVideo } from \"../../../components/hero/_video.js\";\n\nexport function buildCarbonModal() {\n\tconst arrayOfHrefForLightboxes = document.querySelectorAll(\"[href*='/-lightboxes-carbon/']\");\n\tconst carbonSelector = document.querySelector(\".js-carbon-modal\");\n\n\tarrayOfHrefForLightboxes.forEach((selector) => {\n\t\tlet selectorHrefValue = selector.getAttribute(\"href\");\n\t\tif (selector.hasAttribute(\"carbon\")) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (selectorHrefValue.startsWith(\"https://www.nathab.com\")) {\n\t\t\tselectorHrefValue = selectorHrefValue.replace(\"https://www.nathab.com\", \"\");\n\t\t}\n\n\t\tif (selectorHrefValue.includes(\"#\")) {\n\t\t\tconst splitIt = selectorHrefValue.split(\"#\");\n\t\t\tselectorHrefValue = splitIt[0];\n\t\t}\n\n\t\tselector.addEventListener(\"click\", function (event) {\n\t\t\tevent.preventDefault();\n\n\t\t\tif (!this.hasAttribute(\"carbon\")) {\n\t\t\t\tbuildModal(selectorHrefValue);\n\t\t\t\tthis.setAttribute(\"carbon\", selectorHrefValue);\n\t\t\t} else {\n\t\t\t\tclickCarbonLabel(selectorHrefValue);\n\t\t\t}\n\n\t\t\tsessionStorage.setItem(\"modalOpen\", true);\n\n\t\t\t// pause ambient video when modal is opened\n\t\t\ttoggleAmbientVideo(false);\n\t\t});\n\t});\n\n\tfunction clickCarbonLabel(selectorHrefValue) {\n\t\tconst targetLabel = `[for=\"modal-carbon-${selectorHrefValue}\"]`;\n\t\tconst targetLabelSelector = document.querySelector(targetLabel);\n\t\tif (targetLabelSelector) {\n\t\t\ttargetLabelSelector.click();\n\t\t}\n\t}\n\n\tasync function buildModal(selectorHrefValue) {\n\t\tlet hrefValue = selectorHrefValue;\n\t\tawait fetch(selectorHrefValue)\n\t\t\t.then(function (response) {\n\t\t\t\treturn response.text();\n\t\t\t})\n\t\t\t.then(function (html) {\n\t\t\t\tlet parser = new DOMParser();\n\t\t\t\tlet doc = parser.parseFromString(html, \"text/html\");\n\t\t\t\tlet modal = doc.querySelector(\".js-payload-carbon\").innerHTML;\n\t\t\t\tcarbonSelector.insertAdjacentHTML(\"beforebegin\", modal);\n\t\t\t\tenso();\n\t\t\t\tclickCarbonLabel(hrefValue);\n\t\t\t})\n\t\t\t.catch(function (err) {\n\t\t\t\tconsole.error(\"Something went wrong.\", err);\n\t\t\t});\n\n\t\tcarbonModalCloseListener();\n\n\t\tif (isAdmin()) {\n\t\t\ttakeAdminToModalURL(hrefValue);\n\t\t}\n\t}\n\n\tfunction carbonModalCloseListener() {\n\t\tconst carbonModalClose = document.querySelector(\"[js-click-toggle='carbon']\");\n\n\t\tcarbonModalClose.addEventListener(\"click\", function () {\n\t\t\tsessionStorage.setItem(\"modalOpen\", false);\n\t\t\ttoggleAmbientVideo(true);\n\t\t});\n\t}\n\n\t// Function: for admin logged into CMS, go to lightbox url enso screen on tab\n\tfunction takeAdminToModalURL(modalURL) {\n\t\tdocument.addEventListener(\"keyup\", openCMS);\n\t\tfunction openCMS(event) {\n\t\t\tif (event.keyCode == 9) {\n\t\t\t\twindow.location.href = modalURL + \"?ensoAction=group&name=group-modal-carbon\";\n\t\t\t}\n\t\t}\n\t}\n}\n\n// Function: open lightbox if 'lightbox' in url\nexport function openCarbonModal() {\n\tconst urlPathname = window.location.pathname;\n\n\tlet hiddenLabel = document.querySelector(\".js-hidden-label\");\n\tif (urlPathname.includes(\"/-lightboxes-carbon/\")) {\n\t\thiddenLabel.click();\n\t}\n}\n","export function isDialogSupported() {\n\t// Directly check for the existence of HTMLDialogElement in the window\n\tif (!window.HTMLDialogElement) return false;\n\n\t// Check if 'show' and 'close' methods are part of the HTMLDialogElement's prototype\n\tconst dialogPrototype = window.HTMLDialogElement.prototype;\n\n\t// Return boolean\n\treturn typeof dialogPrototype.show === \"function\" && typeof dialogPrototype.close === \"function\";\n}\n","import { isDialogSupported } from \"../_script.js\";\nimport { pushEvent, isAdmin } from \"../../../assets/js/utilities.js\";\nimport { enso } from \"../../../components/enso/_script.js\";\nimport { copyToClipboard } from \"../../../assets/js/utilities.js\";\nimport { toggleAmbientVideo } from \"../../../components/hero/_video.js\";\n\nexport async function check_url_for_generic_modal() {\n\tlet querySearch = window.location.search;\n\tconst genericQueryPatterns = [/^\\?lightbox=\\/-lightboxes\\/.+/, /^\\?modal=\\/-lightboxes\\/.+/];\n\n\t// Check if the query string matches the generic patterns\n\tif (genericQueryPatterns.some((pattern) => pattern.test(querySearch))) {\n\t\tquerySearch = normalize_generic_modal_path(querySearch);\n\t\tconst targetModalSelector = `[js-modal-generic-url=\"${querySearch}\"]`;\n\t\tlet targetModal = document.querySelector(targetModalSelector);\n\t\tif (!targetModal) {\n\t\t\ttargetModal = await fetch_generic_modal_dialog(querySearch, targetModalSelector);\n\t\t}\n\t\tshowDialog(targetModal);\n\t\tadd_event_close_modal_via_backdrop(targetModal);\n\t\tadd_event_close_modal_via_button(targetModal);\n\t\tadd_event_close_modal_via_esc(targetModal);\n\t\tenso();\n\t}\n}\n\nexport function check_links_for_generic_modal() {\n\tconst genericLinks = document.querySelectorAll(\"a[href*='/-lightboxes/']\"); // find all generic links\n\tfor (const item of genericLinks) {\n\t\tif (item.hasAttribute(\"generic\")) continue; // skip if generic attribute exists, it means it's already been processed\n\t\titem.setAttribute(\"generic\", \"\");\n\t\titem.addEventListener(\"click\", async (event) => {\n\t\t\tevent.preventDefault();\n\t\t\tlet genericURL = item.getAttribute(\"href\");\n\t\t\tlet querySearch = normalize_generic_modal_path(genericURL);\n\t\t\tlet targetModalSelector = `[js-modal-generic-url=\"${querySearch}\"]`;\n\t\t\tlet targetModal = document.querySelector(targetModalSelector);\n\n\t\t\tif (event.shiftKey) {\n\t\t\t\tlet shiftClickUrl = `https://${window.location.hostname}${window.location.pathname}?modal=${querySearch}`;\n\t\t\t\tcopyToClipboard(shiftClickUrl);\n\t\t\t}\n\n\t\t\tif (!targetModal) {\n\t\t\t\ttargetModal = await fetch_generic_modal_dialog(querySearch, targetModalSelector);\n\t\t\t\ttargetModal = document.querySelector(targetModalSelector);\n\t\t\t}\n\t\t\tshowDialog(targetModal);\n\t\t\tadd_event_close_modal_via_backdrop(targetModal);\n\t\t\tadd_event_close_modal_via_button(targetModal);\n\t\t\tadd_event_close_modal_via_esc(targetModal);\n\t\t\tenso();\n\t\t});\n\t}\n}\n\nexport function show_modal_if_url_matches_modal_attribute() {\n\tconst currentPath = window.location.pathname;\n\tconst modal = document.querySelector(\"[js-modal-generic-url]\");\n\tif (modal && modal.getAttribute(\"js-modal-generic-url\") === currentPath) {\n\t\tenso();\n\t\tif (isAdmin()) {\n\t\t\tmodal.show(); // this method to open modal allows access to CMS navbar\n\t\t} else {\n\t\t\tshowDialog(modal);\n\t\t\tadd_event_close_modal_via_backdrop(modal);\n\t\t\tadd_event_close_modal_via_button(modal);\n\t\t\tadd_event_close_modal_via_esc(modal);\n\t\t}\n\t}\n}\n\n// Function to check the size of a single image in the browser and hide/show it if necessary\nfunction check_generic_modal_image_size(modal) {\n\tconst image = modal.querySelector(\"[js-util-check-img-size]\");\n\tconst imageURL = image.getAttribute(\"js-util-check-img-size\");\n\n\tfunction evaluateImageSize() {\n\t\timage.classList.remove(\"hide\");\n\t\timage.clientWidth < 400 ? image.classList.add(\"hide\") : image.classList.remove(\"hide\");\n\t}\n\n\tif (!imageURL.includes(\".\")) {\n\t\timage.remove();\n\t\treturn;\n\t}\n\n\timage.src = imageURL;\n\n\tif (image.complete) {\n\t\tevaluateImageSize();\n\t}\n\n\timage.addEventListener(\"load\", evaluateImageSize);\n\twindow.addEventListener(\"resize\", evaluateImageSize);\n\n\tevaluateImageSize();\n}\n\nfunction normalize_generic_modal_path(modalPath) {\n\tmodalPath = modalPath.replace(/.*\\?lightbox=/, \"\");\n\tmodalPath = modalPath.replace(/.*\\?modal=/, \"\");\n\tmodalPath = modalPath.replace(/.*:\\/\\/[^\\/]*\\/-lightboxes\\//, \"/-lightboxes/\");\n\tmodalPath = modalPath.replace(/#.*/, \"\");\n\tmodalPath = modalPath.replace(/[&?].*/, \"\");\n\treturn modalPath;\n}\n\nasync function fetch_generic_modal_dialog(querySearch, targetModalSelector) {\n\ttry {\n\t\tconst response = await fetch(querySearch);\n\t\tconst fetchedDialog = await response.text();\n\t\tdocument.body.insertAdjacentHTML(\"beforeend\", fetchedDialog);\n\t\tconst modal = document.querySelector(targetModalSelector);\n\t\tif (!modal) {\n\t\t\tthrow new Error(`Modal with selector \"${targetModalSelector}\" not found in the inserted HTML.`);\n\t\t}\n\t\tcdnifyImages();\n\t\treturn modal;\n\t} catch (err) {\n\t\tconsole.warn(\"Something went wrong.\", err);\n\t}\n}\n\nfunction showDialog(modal) {\n\tif (isDialogSupported()) {\n\t\tdocument.body.classList.add(\"modal-open\");\n\t\tmodal.showModal();\n\t} else {\n\t\tpushEvent(\"Dev\", \"Dialog\", \"Not Supported\");\n\t}\n\tsessionStorage.setItem(\"modalOpen\", true);\n\ttoggleAmbientVideo(false);\n\tcheck_generic_modal_image_size(modal);\n}\n\nfunction add_event_close_modal_via_backdrop(modal) {\n\tmodal.addEventListener(\"click\", (event) => {\n\t\tif (event.target === modal) {\n\t\t\tdocument.body.classList.remove(\"modal-open\");\n\t\t\tmodal.close();\n\t\t}\n\t});\n}\n\nfunction add_event_close_modal_via_button(modal) {\n\tconst genericModalClose = modal.querySelector(\"[js-modal-generic-close]\");\n\tgenericModalClose.addEventListener(\"click\", (event) => {\n\t\tevent.preventDefault();\n\t\tdocument.body.classList.remove(\"modal-open\");\n\t\tmodal.close();\n\t});\n}\n\n// Event : if escape key is pressed (but captures all close events)\nfunction add_event_close_modal_via_esc(modal) {\n\tmodal.addEventListener(\"close\", () => {\n\t\tdocument.body.classList.remove(\"modal-open\");\n\t\tmodal.close();\n\t\tsessionStorage.setItem(\"modalOpen\", false);\n\t\ttoggleAmbientVideo(true);\n\t});\n}\n\nexport function openModalsFromShortQuerystring() {\n\tconst urlParams = new URLSearchParams(window.location.search);\n\tconst modalParam = urlParams.get(\"modal\");\n\tconst modalTypes = [\"women\"];\n\n\tif (!modalParam || modalParam.includes(\"/accommodations/\")) return; // why do we need this?\n\n\t// open generic modals from short querystrings (ex. ?modal=women)\n\tif (modalTypes.includes(modalParam)) {\n\t\tlet modal = document.querySelector(`[href*='/-lightboxes/'][href*='${modalParam}']`); // this is looking for a link to lightbox and the param word in it\n\t\tif (modal) modal.click();\n\t\treturn;\n\t}\n}\n","// template components\nimport { buildCarbonModal, openCarbonModal } from \"../../components/modal/carbon/_script.js\";\n\n// global components\nimport { enso } from \"../../components/enso/_script.js\";\nimport { showForAdmin } from \"../../assets/js/utilities.js\";\nimport { check_url_for_generic_modal, check_links_for_generic_modal } from \"../../components/modal/generic-dialog/_script.js\";\n\n// global components try/catch to run first\ntry {\n\tenso();\n} catch (error) {\n\tconsole.error(error);\n}\n\ntry {\n\tshowForAdmin();\n} catch (error) {\n\tconsole.error(error);\n}\n\ntry {\n\tcheck_url_for_generic_modal();\n\tcheck_links_for_generic_modal();\n} catch (error) {\n\tconsole.error(error);\n}\n\n// template components try/catch\ntry {\n\tbuildCarbonModal();\n} catch (error) {\n\tconsole.error(error);\n}\n\ntry {\n\topenCarbonModal();\n} catch (error) {\n\tconsole.error(error);\n}\n\n// global components try/catch\ntry {\n\tenso();\n} catch (error) {\n\tconsole.error(error);\n}\n"],"names":[],"mappings":"AAEO,SAAS,OAAO,GAAG;AAC1B,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;AACtD,CAAC,MAAM,oBAAoB,GAAG,WAAW,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;AAC/D,CAAC,OAAO,OAAO,CAAC,oBAAoB,CAAC,CAAC;AACtC,CAAC;AACD;AACO,SAAS,YAAY,GAAG;AAC/B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