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controller.js","webpack://app/./app/javascript/controllers/control_bar_controller.js","webpack://app/./app/javascript/controllers/dg_modal_controller.js","webpack://app/./app/javascript/controllers/header_controller.js","webpack://app/./app/javascript/controllers/play_form_controller.js","webpack://app/./app/javascript/controllers/playground_controller.js","webpack://app/./app/javascript/controllers/playground_tour_controller.js","webpack://app/./app/javascript/controllers/styles_controller.js","webpack://app/./app/javascript/utils/helpers.js"],"sourcesContent":["import { Popover } from \"tailwindcss-stimulus-components\"\nexport default class AppearancePopover extends Popover {\n\n connect() {\n super.connect();\n }\n show() {\n return super.show();\n }\n hide(e) {\n console.log(\"curr tar\");\n // console.log(e.currentTarget);\n let elm = document.elementFromPoint(e.x, e.y)\n console.log(elm);\n if(this.checkParent(elm)) {\n // e.stopPropagation();\n e.preventDefault();\n return;\n }\n console.log(e);\n return super.hide(e);\n }\n checkParent(child) {\n let node = child.parentNode;\n\n // keep iterating unless null\n while (node != null) {\n if (node == this.element) {\n return true;\n }\n node = node.parentNode;\n }\n return false;\n }\n}","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n static targets = [\"bar\", \"handle\", \"bottomBar\"]\n static values = {\n isOpen: Boolean\n }\n\n connect() {\n // if (window.innerWidth < 640) {\n // this.handleTarget.classList.remove(\"hidden\")\n // this.barTarget.classList.add(\"translate-y-full\")\n // if (this.hasBottomBarTarget) {\n // this.bottomBarTarget.classList.add(\"translate-y-full\")\n // }\n // }\n window.addEventListener(\"resize\", this.handleResize.bind(this))\n }\n\n disconnect() {\n window.removeEventListener(\"resize\", this.handleResize.bind(this))\n }\n\n handleResize() {\n if (window.innerWidth >= 640) {\n this.handleTarget.classList.add(\"hidden\")\n this.barTarget.classList.remove(\"translate-y-full\")\n if (this.hasBottomBarTarget) {\n this.bottomBarTarget.classList.remove(\"translate-y-full\")\n }\n } else {\n this.handleTarget.classList.remove(\"hidden\")\n if (!this.isOpenValue) {\n this.barTarget.classList.add(\"translate-y-full\")\n if (this.hasBottomBarTarget) {\n this.bottomBarTarget.classList.add(\"translate-y-full\")\n }\n }\n }\n }\n\n toggle() {\n this.isOpenValue = !this.isOpenValue\n if (this.isOpenValue) {\n this.barTarget.classList.remove(\"translate-y-full\")\n if (this.hasBottomBarTarget) {\n this.bottomBarTarget.classList.remove(\"translate-y-full\")\n }\n this.updateFooterVisibility(true)\n } else {\n this.barTarget.classList.add(\"translate-y-full\")\n if (this.hasBottomBarTarget) {\n this.bottomBarTarget.classList.add(\"translate-y-full\")\n }\n this.updateFooterVisibility(false)\n }\n }\n\n updateFooterVisibility(visible) {\n const form = document.querySelector('form')\n if (!form) return\n\n const formData = new FormData(form)\n formData.append('play_session[layout_settings][footer_visible]', visible)\n \n fetch(form.action, {\n method: 'PATCH',\n body: formData,\n headers: {\n 'X-CSRF-Token': document.querySelector('meta[name=\"csrf-token\"]').content\n }\n })\n }\n} ","import { Controller } from \"@hotwired/stimulus\"\nimport {enter, leave} from 'el-transition';\n\nexport default class extends Controller {\n static targets = [\"modal\", \"modalBackground\", \"modalBody\"]\n static values = { open: Boolean }\n\n connect(){\n setTimeout(() => {\n if(this.element.dataset[\"show\"]) this.openValue = true;\n }, 200);\n }\n\n toggle(e){\n console.log(\"toggle!\");\n e?.preventDefault();\n this.openValue = !this.openValue\n }\n\n openValueChanged() {\n console.log(`open changed ${this.openValue}`);\n this.openValue ? this._open() : this._close()\n }\n \n _open(){\n this.modalTarget.classList.remove(\"hidden\")\n enter(this.modalBackgroundTarget)\n enter(this.modalBodyTarget)\n }\n \n _close(){\n this.modalTarget?.classList?.add(\"hidden\")\n leave(this.modalBackgroundTarget)\n leave(this.modalBodyTarget)\n this._emptyInputs()\n }\n\n _emptyInputs(){\n // const inputs = this.modalBodyTarget?.querySelectorAll(\"input[type=text], input[type=number], input[type=email]\")\n // inputs.forEach(input => {\n // if (!input.disabled) {\n // input.value = null\n // }\n // })\n }\n\n escapeKeyPressed(event) {\n if (event.keyCode == 27) {\n if (!this.modalTarget.classList.contains(\"hidden\")) {\n this.toggle(null)\n }\n }\n }\n}","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n static targets = [\"header\", \"handle\"]\n static values = {\n isOpen: Boolean\n }\n\n connect() {\n console.log(\"LOADED! HEADER\");\n // Only show handle on mobile\n if (window.innerWidth < 768) {\n // this.handleTarget.classList.remove(\"hidden\")\n // this.headerTarget.classList.add(\"-translate-y-full\")\n // this.headerTarget.classList.remove(\"translate-y-0\")\n \n // Add scroll event listener\n window.addEventListener(\"scroll\", this.handleScroll.bind(this))\n }\n }\n\n disconnect() {\n window.removeEventListener(\"scroll\", this.handleScroll.bind(this))\n }\n\n handleScroll() {\n if (window.scrollY === 0) {\n this.handleTarget.classList.remove(\"hidden\")\n } else {\n this.handleTarget.classList.add(\"hidden\")\n }\n }\n\n toggle() {\n this.isOpenValue = !this.isOpenValue\n if (this.isOpenValue) {\n this.headerTarget.classList.remove(\"-translate-y-full\")\n this.headerTarget.classList.add(\"translate-y-0\")\n this.updateHeaderVisibility(true)\n } else {\n this.headerTarget.classList.remove(\"translate-y-0\")\n this.headerTarget.classList.add(\"-translate-y-full\")\n this.updateHeaderVisibility(false)\n }\n }\n\n updateHeaderVisibility(visible) {\n const form = document.querySelector('form')\n if (!form) return\n\n const formData = new FormData(form)\n formData.append('play_session[layout_settings][header_visible]', visible)\n \n fetch(form.action, {\n method: 'PATCH',\n body: formData,\n headers: {\n 'X-CSRF-Token': document.querySelector('meta[name=\"csrf-token\"]').content\n }\n })\n }\n} ","import { Controller } from \"@hotwired/stimulus\"\nimport Rails from \"@rails/ujs\";\nimport { getMetaValue, isMobile } from \"../utils/helpers\";\nexport default class extends Controller {\n static targets = [\"button\", \"localeInput\", \"disable\", \"modal\", \"pageInput\", \"iframe\", \"pageSwitcher\", \n \"matchBanner\", \"deviceInput\", \"progressBar\", \"progressUpdate\", \"loadingSpinner\", \"successIcon\"]\n\n initialize() {\n }\n\n connect() {\n window.addEventListener(\"message\", this.messageHandler.bind(this));\n if([\"pending\", \"processing\"].includes(this.element.dataset.status)) this.pollPage(null);\n if(this.hasLocaleInputTarget) this.localeInputTarget.value = this.getLang();\n }\n\n getLang() {\n if (navigator.languages != undefined) \n return navigator.languages[0]; \n return navigator.language;\n }\n\n updateCurrentPageUrl(e) {\n let params = new URLSearchParams(this.iframeTarget.contentWindow.location.search);\n params.get('url');\n // const data = new URLSearchParams();\n // for (const pair of new FormData(this.element)) {\n // data.append(pair[0], pair[1]);\n // }\n // fetch(this.element[\"action\"], {\n // method: 'post',\n // headers: {\n // 'Content-Type': 'application/x-www-form-urlencoded',\n // 'X-CSRF-Token': getMetaValue(\"csrf-token\")\n // },\n // credentials: 'same-origin',\n // body: data,\n // })\n }\n selfNavigate(e) {\n this.displayButtonLoading(e);\n const fr = this.iframeTarget;\n const mod = this.modalTarget;\n fetch(this.element.dataset.selfNavigateAction, {\n method: 'GET',\n headers: {\n 'X-CSRF-Token': getMetaValue(\"csrf-token\"),\n 'Content-Type': 'application/json'\n },\n credentials: 'same-origin'\n })\n .then(response => response.json())\n .then((json) => {\n // Turbo.renderStreamMessage(html);\n if(!fr.src?.length) sr.src = json.url;\n mod.remove();\n });\n }\n fallbackPage(e) {\n console.log(\"fallback page\");\n this.displayButtonLoading(e);\n const poll = this.pollPage.bind(this);\n fetch(this.element.dataset.fallbackPageAction, {\n method: 'GET',\n headers: {\n 'X-CSRF-Token': getMetaValue(\"csrf-token\"),\n 'Content-Type': 'application/json'\n },\n credentials: 'same-origin'\n }).then (response => response.text())\n .then(html => {\n poll(e);\n Turbo.renderStreamMessage(html);\n });\n }\n\n fallbackSession(e) {\n console.log(\"fallback session\");\n this.displayButtonLoading(e);\n const poll = this.pollPage.bind(this);\n fetch(this.element.dataset.fallbackSessionAction, {\n method: 'GET',\n headers: {\n 'X-CSRF-Token': getMetaValue(\"csrf-token\"),\n 'Content-Type': 'application/json'\n },\n credentials: 'same-origin'\n }).then (response => response.text())\n .then(html => {\n poll(e);\n Turbo.renderStreamMessage(html);\n });\n }\n\n switchPage(e) {\n e.preventDefault();\n // e.stopPropogation();\n console.log(\"switch page\")\n console.log(this.element[\"action\"]);\n this.pageInputTarget.value = e.currentTarget.dataset.page;\n const data = new URLSearchParams();\n for (const pair of new FormData(this.element)) {\n data.append(pair[0], pair[1]);\n }\n fetch(this.element[\"action\"], {\n method: 'post',\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded',\n 'X-CSRF-Token': getMetaValue(\"csrf-token\")\n },\n credentials: 'same-origin',\n body: data,\n })\n .then(response => response.text())\n .then(html => {\n console.log(\"render\");\n Turbo.renderStreamMessage(html);\n this.iframeTarget?.contentWindow?.location?.reload();\n let forms = document.querySelectorAll(\"form.simple_form.edit_play_session\");\n if(forms.length > 1) forms[forms.length - 1].remove();\n });\n }\n\n submit(e) {\n if(this.hasDisableTarget) {\n this.disableTargets.forEach((t) => {\n t.disabled = true;\n });\n }\n // \n if(this.hasModalTarget && !this.modalTarget.dataset[\"noRedirect\"]) {\n this.deviceInputTarget.value = isMobile() ? \"mobile\" : \"desktop\";\n this.element.submit();\n this.pollPage(e);\n } else {\n Rails.fire(this.element, 'submit');\n }\n }\n\n pollPage(e) {\n //TODO Poll the current page\n let pollCount = 0;\n let pollAction = this.element.dataset.pollPageAction;\n let playCtrl = this.playgroundController;\n let modalTgts = this.modalTargets;\n let progressUpdate = this.progressUpdateTarget;\n let successIcon = this.successIconTarget;\n let loadingSpinner = this.loadingSpinnerTarget;\n console.log(\"***** PROGRESS *****\");\n console.log(progressUpdate);\n let progressBar = this.progressBarTarget;\n function doPoll() {\n if(pollCount >= 1000) {\n clearInterval(myInterval);\n // Timeout the scraper\n }\n pollCount ++;\n fetch(pollAction, {\n method: 'GET',\n headers: {\n 'X-CSRF-Token': getMetaValue(\"csrf-token\")\n },\n credentials: 'same-origin'\n }).then(response => response.json())\n .then((json) => {\n if(json.status == \"success\") {\n clearInterval(myInterval);\n // TODO Update the browser\n playCtrl.goTo(json.url);\n console.log(document.querySelectorAll(\"[data-target='play-form.modal']\"));\n document.querySelectorAll(\"[data-target='play-form.modal']\").forEach((tgt) => {\n tgt.remove();\n });\n const url = new URL(window.location.href);\n if (url.searchParams.has('rebuild')) {\n url.searchParams.delete('rebuild');\n window.history.pushState({}, '', url.toString());\n }\n } else if(json.status == \"error\") {\n const url = new URL(window.location.href);\n if (url.searchParams.has('rebuild')) {\n url.searchParams.delete('rebuild');\n window.location.href = url.toString();\n } else {\n window.location.reload();\n }\n } else {\n if(json.progress == 100.0) {\n loadingSpinner.classList?.add(\"hidden\");\n loadingSpinner.classList?.remove(\"flex\");\n successIcon.classList?.remove(\"hidden\");\n successIcon.classList?.add(\"flex\");\n }\n if(progressBar) progressBar.style.width = `${json.progress}%`;\n if(progressUpdate) progressUpdate.innerHTML = `${json.progress_update}`;\n }\n });\n pollCount ++;\n }\n var myInterval = setInterval(doPoll, 2000);\n\n // var myInterval = setInterval(everyTime, 1000);\n // while(pollCount < 10) {\n // setTimeout(() => {\n \n // }, 1000);\n // }\n }\n\n messageHandler(e) {\n if(e.origin != window.location.origin) return;\n try{\n let data = JSON.parse(e.data);\n if(data.action == \"saveXpath\") {\n let formData = new FormData();\n formData.append('session_page[widget_xpath]', data.xpath)\n fetch(this.element.dataset.savePageAction, {\n method: 'PUT',\n body: formData,\n headers: {\n 'X-CSRF-Token': getMetaValue(\"csrf-token\")\n },\n credentials: 'same-origin'\n }).then(response => {\n console.log(response);\n });\n } else if(data.action == \"saveHtml\") {\n //Save the html to the session page\n let formData = new FormData();\n formData.append('session_page[page_html]', data.html)\n fetch(this.element.dataset.savePageAction, {\n method: 'PUT',\n body: formData,\n headers: {\n 'X-CSRF-Token': getMetaValue(\"csrf-token\")\n },\n credentials: 'same-origin'\n }).then(response => {\n console.log(response);\n });\n } else if(data.action == \"showCurrentPage\") {\n if(data.matchedPaths) this.matchBannerTarget.remove();\n const url = new URL(window.location.href);\n url.searchParams.set('page', data.value );\n window.history.pushState(null, '', url.toString());\n\n this.pageSwitcherTarget.outerHTML = unescape(data.html);\n } else if (data.action == \"toggle_feature\") {\n if(this.element.dataset.toggleFeatureAction == undefined) return;\n let formData = new FormData();\n formData.append('featureset_id', data.featureset_id)\n formData.append('feature_id', data.feature_id)\n fetch(this.element.dataset.toggleFeatureAction, {\n method: 'PUT',\n body: formData,\n headers: {\n 'X-CSRF-Token': getMetaValue(\"csrf-token\")\n },\n credentials: 'same-origin'\n }).then (response => response.text())\n .then(html => {\n Turbo.renderStreamMessage(html);\n });\n }\n } catch(e) {\n }\n }\n\n displayLoading(e) {\n if(this.hasButtonTarget) {\n this.buttonTarget.innerHTML = '';\n }\n }\n\n displayButtonLoading(e) {\n e.currentTarget.innerHTML = '';\n }\n\n get playgroundController() {\n return this.application.getControllerForElementAndIdentifier(document.querySelector(\"main\"), \"playground\");\n }\n}","import { Controller } from \"@hotwired/stimulus\"\nimport Rails from \"@rails/ujs\";\n\nexport default class extends Controller {\n static targets = [\"urlInput\", \"addressBar\", \"browser\", \"iframe\", \"toggle\", \"deviceInput\", \"loadModal\", \"dots\"];\n\n initialize() {\n }\n\n connect() {\n window.addEventListener(\"message\", this.messageHandler.bind(this));\n this.bindIframeUnLoad();\n this.wasNavigated = false;\n this.wasToggled = false;\n // this.loadModalTarget.style.height = `${this.iframeTarget.offsetHeight}px !important`;\n this.loadModalTarget.style.height = `${this.browserTarget.offsetHeight}px`;\n this.embedded = this.element.dataset[\"embed\"] == \"1\";\n }\n\n messageHandler(e) {\n if(e.origin != window.location.origin) return;\n try{\n let data = JSON.parse(e.data);\n if(data.action == \"closeModal\") {\n this.modalController._close();\n }\n } catch(e) {\n }\n }\n\n bindIframeUnLoad() {\n this.iframeTarget.contentWindow.addEventListener('beforeunload', (e) => {\n this.openModal(e);\n });\n }\n\n handleToggle(e) {\n if(this.wasToggled == true) {\n this.wasToggled = false;\n this.iframeTarget.contentWindow.location.reload();\n this.wasNavigated = true;\n }\n }\n\n openModal(e) {\n this.modalController._open();\n }\n\n handleLoad(e) {\n this.wasNavigated = false;\n this.bindIframeUnLoad();\n // Potentially check for the asset use case here if it interferes with other cases.\n this.modalController._close();\n }\n\n toggleModal(e) {\n this.modalController.toggle();\n }\n\n toggle(e) {\n e.stopPropagation();\n this.deviceInputTarget.value = this.deviceInputTarget.value == \"desktop\" ? \"mobile\" : \"desktop\";\n this.browserTarget.classList.toggle(\"md:max-w-sm\");\n this.browserTarget.classList.toggle(\"max-w-[3072px]\")\n this.modalController.modalTarget.classList.toggle(\"md:max-w-sm\");\n this.modalController.modalTarget.classList.toggle(\"max-w-[3072px]\");\n this.toggleTarget.classList.toggle(\"translate-x-0\")\n this.toggleTarget.classList.toggle(\"translate-x-[28px]\")\n if(this.embedded == true && this.deviceInputTarget.value == \"mobile\") {\n this.dotsTarget?.classList?.remove(\"flex\");\n this.dotsTarget?.classList?.add(\"hidden\");\n this.urlInputTarget?.classList?.remove(\"mr-5\");\n } else {\n this.dotsTarget?.classList?.add(\"flex\");\n this.dotsTarget?.classList?.remove(\"hidden\");\n this.urlInputTarget?.classList?.add(\"mr-5\");\n }\n // Submit the playform\n if(this.element.dataset.url.length > 0 && this.wasNavigated != true) {\n this.wasToggled = true;\n Rails.fire(document.querySelector(\"form\"), 'submit')\n }\n }\n\n switchPage(e) {\n e.preventDefault();\n e.currentTarget.dataset.page\n }\n\n\n go(e) {\n if(e.keyCode == 13) {\n e.stopPropagation();\n let inputValue = e.currentTarget.value.trim();\n \n // Prepend https:// if no protocol is present\n if (!inputValue.match(/^https?:\\/\\//)) {\n inputValue = `https://${inputValue}`;\n }\n \n if(new URL(this.element.dataset.url).origin != new URL(inputValue).origin) {\n var searchParams = new URLSearchParams(window.location.search);\n searchParams.set(\"url\", inputValue);\n window.location.search = searchParams.toString();\n } else {\n this.goTo(`${this.element.dataset.host}/proxy?url=${inputValue}`);\n }\n } \n }\n\n goTo(url) {\n this.iframeTarget.src = url;\n }\n\n get playFormController() {\n return this.application.getControllerForElementAndIdentifier(document.querySelector(\"form\"), \"playForm\");\n }\n\n get modalController() {\n return this.application.getControllerForElementAndIdentifier(this.element, \"dg-modal\");\n }\n}","// Style\n// JS\nimport {TourGuideClient} from \"@sjmc11/tourguidejs/src/Tour\"\nimport { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n\n initialize() {\n this.name = this.element.dataset[\"name\"];\n }\n\n connect() {\n const steps = [\n {\n title: `${this.name} Interactive Demo`,\n content: `This is a quick tour of the ${this.name} interactive demo.\n This interactive demo enables you to visualize the ${this.name} app directly on your store.`\n },\n {\n title: \"Your Store\",\n content: `Your store will be displayed here with the ${this.name} app embedded`,\n target: \"#play-modal, iframe\"\n },\n {\n title: \"Toggle each Use case and Feature.\",\n content: `View the demo of use cases and features of ${this.name} directly in your store.`,\n target: \"#use-case-controls\"\n },\n {\n title: \"Navigate Pages\",\n content: `Navigate the supported pages of your store to view the demo of supported features on each page.`,\n target: \"[data-target='play-form.pageSwitcher']\"\n },\n {\n title: \"Toggle Devices\",\n content: `Switch between mobile and desktop previews of your store with the demo of ${this.name}.`,\n target: \"#deviceSwitcher\"\n }\n ]\n\n this.tg = new TourGuideClient({steps: steps})\n // this.tg.backdrop = false\n this.startTour();\n }\n startTour() {\n this.tg.start()\n }\n}","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n static targets = [\"styleInput\"];\n\n connect() {\n this.frame = document.getElementById('play_browser');\n console.log('styles load!!!')\n this.styleInputTargets.forEach((input) => {\n input.value = input.defaultValue;\n });\n }\n\n handleChanged(e) {\n console.log(\"change!\");\n\n if(e.currentTarget.type == \"text\") {\n this.textChange(e);\n } else {\n this.cssChange(e);\n }\n }\n\n textChange(e) {\n this.frame?.contentWindow?.postMessage(JSON.stringify({ action: \"updateText\", key: e.currentTarget.dataset.csskey, value: e.currentTarget.value }));\n }\n\n cssChange(e) {\n let prefix = '';\n if(e.currentTarget.dataset.cssprefix) prefix = e.currentTarget.dataset.cssprefix;\n let suffix = '';\n if(e.currentTarget.dataset.csssuffix) suffix = e.currentTarget.dataset.csssuffix;\n let val = e.currentTarget.value;\n if(val == \"true\") val = 1;\n else if (val == \"false\") val = 0;\n // if (document.getElementById(`${e.currentTarget.dataset.csskey}-preview`)) {\n // document.getElementById(`${e.currentTarget.dataset.csskey}-preview`).style.backgroundColor = `${prefix}${val}${suffix}`\n // }\n this.messageStyle(`--demoground-${e.currentTarget.dataset.csskey}`, `${prefix}${val}${suffix}`);\n }\n\n messageStyle(key, value) {\n this.frame?.contentWindow?.postMessage(JSON.stringify({ action: \"updateStyle\", key: key, value: value }));\n\n }\n}","export function titleize(sentence) {\n if(!sentence.split) return sentence;\n var _titleizeWord = function(string) {\n return string.charAt(0).toUpperCase() + string.slice(1).toLowerCase();\n },\n result = [];\n sentence.split(\" \").forEach(function(w) {\n result.push(_titleizeWord(w));\n });\n return result.join(\" \");\n}\n\nexport function isMobile() {\n //console.log(\"Navigator: \" + navigator.userAgent);\n return /(iphone|ipod|ipad|android|blackberry|windows ce|palm|symbian)/i.test(navigator.userAgent);\n};\nexport function hexToRgbaBg(hex) {\nvar result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\nreturn \"rgba(\" + parseInt(result[1], 16) + \", \" + parseInt(result[2], 16) + \", \" + parseInt(result[3], 16) + \", 0.1)\";\n}\n\nexport function isDark(hexcolor){\nvar r = parseInt(hexcolor.substr(1,2),16);\nvar g = parseInt(hexcolor.substr(3,2),16);\nvar b = parseInt(hexcolor.substr(4,2),16);\nvar yiq = ((r*299)+(g*587)+(b*114))/1000;\n// Return new color if to dark, else return the original\nreturn yiq < 128;\n}\nexport function insertUrlParam(key, value) {\nif (history.pushState) {\n let searchParams = new URLSearchParams(window.location.search);\n searchParams.set(key, value);\n let newurl = window.location.protocol + \"//\" + window.location.host + window.location.pathname + '?' + searchParams.toString();\n window.history.pushState({path: newurl}, '', newurl);\n}\n}\nexport function serialize (form) {\nif (!form || form.nodeName !== \"FORM\") {\n return;\n}\nvar i, j, q = [];\nfor (i = form.elements.length - 1; i >= 0; i = i - 1) {\n if (form.elements[i].name === \"\") {\n continue;\n }\n switch (form.elements[i].nodeName) {\n case 'INPUT':\n switch (form.elements[i].type) {\n case 'text':\n case 'tel':\n case 'email':\n case 'hidden':\n case 'password':\n case 'button':\n case 'reset':\n case 'submit':\n q.push(form.elements[i].name + \"=\" + encodeURIComponent(form.elements[i].value));\n break;\n case 'checkbox':\n case 'radio':\n if (form.elements[i].checked) {\n q.push(form.elements[i].name + \"=\" + encodeURIComponent(form.elements[i].value));\n } \n break;\n }\n break;\n case 'file':\n break; \n case 'TEXTAREA':\n q.push(form.elements[i].name + \"=\" + encodeURIComponent(form.elements[i].value));\n break;\n case 'SELECT':\n switch (form.elements[i].type) {\n case 'select-one':\n q.push(form.elements[i].name + \"=\" + encodeURIComponent(form.elements[i].value));\n break;\n case 'select-multiple':\n for (j = form.elements[i].options.length - 1; j >= 0; j = j - 1) {\n if (form.elements[i].options[j].selected) {\n q.push(form.elements[i].name + \"=\" + encodeURIComponent(form.elements[i].options[j].value));\n }\n }\n break;\n }\n break;\n case 'BUTTON':\n switch (form.elements[i].type) {\n case 'reset':\n case 'submit':\n case 'button':\n q.push(form.elements[i].name + \"=\" + encodeURIComponent(form.elements[i].value));\n break;\n }\n break;\n }\n }\nreturn q.join(\"&\");\n}\n\n\nexport function getMetaValue(name) {\nconst element = findElement(document.head, `meta[name=\"${name}\"]`)\nif (element) {\n return element.getAttribute(\"content\")\n}\n}\n\nexport function findElement(root, selector) {\nif (typeof root == \"string\") {\n selector = root\n root = document\n}\nreturn root.querySelector(selector)\n}\n\nexport function removeElement(el) {\nif (el && el.parentNode) {\n el.parentNode.removeChild(el);\n}\n}\n\nexport function insertAfter(el, referenceNode) {\n return referenceNode.parentNode.insertBefore(el, referenceNode.nextSibling);\n}\nexport function replaceUrlParam(url, paramName, paramValue)\n{\n if (paramValue == null) {\n paramValue = '';\n }\n var pattern = new RegExp('\\\\b('+paramName+'=).*?(&|#|$)');\n if (url.search(pattern)>=0) {\n return url.replace(pattern,'$1' + paramValue + '$2');\n }\n url = url.replace(/[?#]$/,'');\n return url + (url.indexOf('?')>0 ? '&' : '?') + paramName + '=' + paramValue;\n}\n\nexport const fetchSessionFromMantle = async (targetOrigin) => {\n return new Promise((resolve, reject) => {\n window.parent.postMessage(\n {\n type: \"mantle:bridge:sessionRequest\",\n },\n targetOrigin\n );\n\n const receiveSessionMessage = (event) => {\n if (event.origin !== targetOrigin) {\n reject(new Error(\"Invalid origin\"));\n return;\n }\n\n try {\n if (event.data?.type === \"mantle:bridge:sessionResponse\") {\n if (event.data?.error) {\n reject(new Error(\"Failed to load session\"));\n } else {\n resolve(event.data);\n }\n window.removeEventListener(\"message\", receiveSessionMessage);\n }\n } catch (e) {\n console.error(\"Invalid data received:\", event.data);\n reject(new Error(\"Failed to load session\"));\n }\n };\n\n window.addEventListener(\"message\", receiveSessionMessage);\n });\n};\n\nexport function preventBackScroll() {\n if (!navigator.userAgent.match(/Macintosh/)) {\n return;\n }\n\n // Detect browsers\n var is_chrome = navigator.userAgent.indexOf('Chrome') > -1;\n var is_safari = navigator.userAgent.indexOf(\"Safari\") > -1;\n var is_firefox = navigator.userAgent.indexOf('Firefox') > -1;\n\n // Handle scroll events in Chrome, Safari, and Firefox\n if (is_chrome || is_safari || is_firefox) {\n\n // TODO: This only prevents scroll when reaching the topmost or leftmost\n // positions of a container. It doesn't handle rightmost or bottom,\n // and Lion scroll can be triggered by scrolling right (or bottom) and then\n // scrolling left without raising your fingers from the scroll position.\n window.addEventListener('mousewheel', (e) => {\n let prevent_left, prevent_up;\n\n // If none of the parents can be scrolled left when we try to scroll left\n prevent_left = e.deltaX < 0 && !hasScrollableParent(e.target, 'horizontal');\n\n // If none of the parents can be scrolled up when we try to scroll up\n prevent_up = e.deltaY > 0 && hasScrollableParent(e.target, 'vertical');\n\n // Prevent futile scroll, which would trigger the Back/Next page event\n if (prevent_left || prevent_up) {\n e.preventDefault();\n }\n });\n\n function hasScrollableParent(element, direction) {\n while (element.parentElement) {\n const parent = element.parentElement;\n if (direction === 'horizontal' && parent.scrollLeft > 0) {\n return true;\n }\n if (direction === 'vertical' && parent.scrollTop > 0) {\n return true;\n }\n element = parent;\n }\n return false;\n }\n }\n}"],"names":["AppearancePopover","Popover","connect","super","show","hide","e","console","log","elm","document","elementFromPoint","x","y","this","checkParent","preventDefault","child","node","parentNode","element","control_bar_controller_default","Controller","window","addEventListener","handleResize","bind","disconnect","removeEventListener","innerWidth","handleTarget","classList","add","barTarget","remove","hasBottomBarTarget","bottomBarTarget","isOpenValue","toggle","updateFooterVisibility","visible","form","querySelector","formData","FormData","append","fetch","action","method","body","headers","content","__publicField","isOpen","Boolean","dg_modal_controller_default","setTimeout","dataset","openValue","openValueChanged","_open","_close","modalTarget","enter","modalBackgroundTarget","modalBodyTarget","leave","_emptyInputs","escapeKeyPressed","event","keyCode","contains","open","header_controller_default","handleScroll","scrollY","headerTarget","updateHeaderVisibility","play_form_controller_default","initialize","messageHandler","includes","status","pollPage","hasLocaleInputTarget","localeInputTarget","value","getLang","navigator","languages","language","updateCurrentPageUrl","URLSearchParams","iframeTarget","contentWindow","location","search","get","selfNavigate","displayButtonLoading","fr","mod","selfNavigateAction","getMetaValue","credentials","then","response","json","_a","src","length","sr","url","fallbackPage","poll","fallbackPageAction","text","html","Turbo","renderStreamMessage","fallbackSession","fallbackSessionAction","switchPage","pageInputTarget","currentTarget","page","data","pair","reload","forms","querySelectorAll","submit","hasDisableTarget","disableTargets","forEach","t","disabled","hasModalTarget","deviceInputTarget","isMobile","Rails","pollCount","pollAction","pollPageAction","playCtrl","playgroundController","progressUpdate","modalTargets","progressUpdateTarget","successIcon","successIconTarget","loadingSpinner","loadingSpinnerTarget","progressBar","progressBarTarget","myInterval","setInterval","clearInterval","goTo","tgt","URL","href","searchParams","has","delete","history","pushState","toString","progress","style","width","innerHTML","progress_update","origin","JSON","parse","xpath","savePageAction","matchedPaths","matchBannerTarget","set","pageSwitcherTarget","outerHTML","unescape","toggleFeatureAction","featureset_id","feature_id","displayLoading","hasButtonTarget","buttonTarget","application","getControllerForElementAndIdentifier","playground_controller_default","bindIframeUnLoad","wasNavigated","wasToggled","loadModalTarget","height","browserTarget","offsetHeight","embedded","modalController","openModal","handleToggle","handleLoad","toggleModal","stopPropagation","toggleTarget","dotsTarget","urlInputTarget","go","inputValue","trim","match","host","playFormController","name","steps","title","target","tg","TourGuideClient","startTour","start","styles_controller_default","frame","getElementById","styleInputTargets","input","defaultValue","handleChanged","type","textChange","cssChange","postMessage","stringify","key","csskey","prefix","cssprefix","suffix","csssuffix","val","messageStyle","test","userAgent","findElement","head","getAttribute","root","selector","removeElement","el","removeChild","insertAfter","referenceNode","insertBefore","nextSibling","replaceUrlParam","paramName","paramValue","pattern","RegExp","replace","indexOf","fetchSessionFromMantle","targetOrigin","__async","Promise","resolve","reject","parent","receiveSessionMessage","_b","error","Error"],"sourceRoot":""}