{"version":3,"file":"brochure.99d9afca.js","sources":["../../../assets/javascripts/common/components/note.js","../../../node_modules/fetch-jsonp/build/fetch-jsonp.js","../../../assets/javascripts/brochure/components/newsletter.js","../../../assets/javascripts/brochure/components/faq.js","../../../node_modules/ssr-window/ssr-window.esm.js","../../../node_modules/dom7/dom7.esm.js","../../../node_modules/swiper/shared/dom.js","../../../node_modules/swiper/shared/utils.js","../../../node_modules/swiper/shared/get-support.js","../../../node_modules/swiper/shared/get-device.js","../../../node_modules/swiper/shared/get-browser.js","../../../node_modules/swiper/core/modules/resize/resize.js","../../../node_modules/swiper/core/modules/observer/observer.js","../../../node_modules/swiper/core/events-emitter.js","../../../node_modules/swiper/core/update/updateSize.js","../../../node_modules/swiper/core/update/updateSlides.js","../../../node_modules/swiper/core/update/updateAutoHeight.js","../../../node_modules/swiper/core/update/updateSlidesOffset.js","../../../node_modules/swiper/core/update/updateSlidesProgress.js","../../../node_modules/swiper/core/update/updateProgress.js","../../../node_modules/swiper/core/update/updateSlidesClasses.js","../../../node_modules/swiper/core/update/updateActiveIndex.js","../../../node_modules/swiper/core/update/updateClickedSlide.js","../../../node_modules/swiper/core/update/index.js","../../../node_modules/swiper/core/translate/getTranslate.js","../../../node_modules/swiper/core/translate/setTranslate.js","../../../node_modules/swiper/core/translate/minTranslate.js","../../../node_modules/swiper/core/translate/maxTranslate.js","../../../node_modules/swiper/core/translate/translateTo.js","../../../node_modules/swiper/core/translate/index.js","../../../node_modules/swiper/core/transition/setTransition.js","../../../node_modules/swiper/core/transition/transitionEmit.js","../../../node_modules/swiper/core/transition/transitionStart.js","../../../node_modules/swiper/core/transition/transitionEnd.js","../../../node_modules/swiper/core/transition/index.js","../../../node_modules/swiper/core/slide/slideTo.js","../../../node_modules/swiper/core/slide/slideToLoop.js","../../../node_modules/swiper/core/slide/slideNext.js","../../../node_modules/swiper/core/slide/slidePrev.js","../../../node_modules/swiper/core/slide/slideReset.js","../../../node_modules/swiper/core/slide/slideToClosest.js","../../../node_modules/swiper/core/slide/slideToClickedSlide.js","../../../node_modules/swiper/core/slide/index.js","../../../node_modules/swiper/core/loop/loopCreate.js","../../../node_modules/swiper/core/loop/loopFix.js","../../../node_modules/swiper/core/loop/loopDestroy.js","../../../node_modules/swiper/core/loop/index.js","../../../node_modules/swiper/core/grab-cursor/setGrabCursor.js","../../../node_modules/swiper/core/grab-cursor/unsetGrabCursor.js","../../../node_modules/swiper/core/grab-cursor/index.js","../../../node_modules/swiper/core/events/onTouchStart.js","../../../node_modules/swiper/core/events/onTouchMove.js","../../../node_modules/swiper/core/events/onTouchEnd.js","../../../node_modules/swiper/core/events/onResize.js","../../../node_modules/swiper/core/events/onClick.js","../../../node_modules/swiper/core/events/onScroll.js","../../../node_modules/swiper/core/events/index.js","../../../node_modules/swiper/core/breakpoints/setBreakpoint.js","../../../node_modules/swiper/core/breakpoints/getBreakpoint.js","../../../node_modules/swiper/core/breakpoints/index.js","../../../node_modules/swiper/core/classes/addClasses.js","../../../node_modules/swiper/core/classes/removeClasses.js","../../../node_modules/swiper/core/classes/index.js","../../../node_modules/swiper/core/images/loadImage.js","../../../node_modules/swiper/core/images/preloadImages.js","../../../node_modules/swiper/core/images/index.js","../../../node_modules/swiper/core/check-overflow/index.js","../../../node_modules/swiper/core/defaults.js","../../../node_modules/swiper/core/moduleExtendParams.js","../../../node_modules/swiper/core/core.js","../../../node_modules/swiper/modules/keyboard/keyboard.js","../../../node_modules/swiper/shared/create-element-if-not-defined.js","../../../node_modules/swiper/modules/navigation/navigation.js","../../../node_modules/swiper/shared/classes-to-selector.js","../../../node_modules/swiper/modules/pagination/pagination.js","../../../node_modules/swiper/modules/a11y/a11y.js","../../../assets/javascripts/brochure/components/slidecards.js","../../../assets/javascripts/brochure/components/hero.js","../../../assets/javascripts/brochure/components/onboarding.js","../../../assets/javascripts/brochure/pages/onboarding-page.js"],"sourcesContent":["import { Controller } from \"@hotwired/stimulus\"\n\nimport Stimulus from \"../utils/stimulus\"\n\nclass Note extends Controller {\n static targets = [`content`]\n\n setContent(content) {\n this.contentTarget.innerHTML = content\n }\n}\n\nStimulus.register(`note`, Note)\n","(function (global, factory) {\n if (typeof define === 'function' && define.amd) {\n define(['exports', 'module'], factory);\n } else if (typeof exports !== 'undefined' && typeof module !== 'undefined') {\n factory(exports, module);\n } else {\n var mod = {\n exports: {}\n };\n factory(mod.exports, mod);\n global.fetchJsonp = mod.exports;\n }\n})(this, function (exports, module) {\n 'use strict';\n\n var defaultOptions = {\n timeout: 5000,\n jsonpCallback: 'callback',\n jsonpCallbackFunction: null\n };\n\n function generateCallbackFunction() {\n return 'jsonp_' + Date.now() + '_' + Math.ceil(Math.random() * 100000);\n }\n\n function clearFunction(functionName) {\n // IE8 throws an exception when you try to delete a property on window\n // http://stackoverflow.com/a/1824228/751089\n try {\n delete window[functionName];\n } catch (e) {\n window[functionName] = undefined;\n }\n }\n\n function removeScript(scriptId) {\n var script = document.getElementById(scriptId);\n if (script) {\n document.getElementsByTagName('head')[0].removeChild(script);\n }\n }\n\n function fetchJsonp(_url) {\n var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];\n\n // to avoid param reassign\n var url = _url;\n var timeout = options.timeout || defaultOptions.timeout;\n var jsonpCallback = options.jsonpCallback || defaultOptions.jsonpCallback;\n\n var timeoutId = undefined;\n\n return new Promise(function (resolve, reject) {\n var callbackFunction = options.jsonpCallbackFunction || generateCallbackFunction();\n var scriptId = jsonpCallback + '_' + callbackFunction;\n\n window[callbackFunction] = function (response) {\n resolve({\n ok: true,\n // keep consistent with fetch API\n json: function json() {\n return Promise.resolve(response);\n }\n });\n\n if (timeoutId) clearTimeout(timeoutId);\n\n removeScript(scriptId);\n\n clearFunction(callbackFunction);\n };\n\n // Check if the user set their own params, and if not add a ? to start a list of params\n url += url.indexOf('?') === -1 ? '?' : '&';\n\n var jsonpScript = document.createElement('script');\n jsonpScript.setAttribute('src', '' + url + jsonpCallback + '=' + callbackFunction);\n if (options.charset) {\n jsonpScript.setAttribute('charset', options.charset);\n }\n if (options.nonce) {\n jsonpScript.setAttribute('nonce', options.nonce);\n }\n if (options.referrerPolicy) {\n jsonpScript.setAttribute('referrerPolicy', options.referrerPolicy);\n }\n jsonpScript.id = scriptId;\n document.getElementsByTagName('head')[0].appendChild(jsonpScript);\n\n timeoutId = setTimeout(function () {\n reject(new Error('JSONP request to ' + _url + ' timed out'));\n\n clearFunction(callbackFunction);\n removeScript(scriptId);\n window[callbackFunction] = function () {\n clearFunction(callbackFunction);\n };\n }, timeout);\n\n // Caught if got 404/500\n jsonpScript.onerror = function () {\n reject(new Error('JSONP request to ' + _url + ' failed'));\n\n clearFunction(callbackFunction);\n removeScript(scriptId);\n if (timeoutId) clearTimeout(timeoutId);\n };\n });\n }\n\n // export as global function\n /*\n let local;\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n local.fetchJsonp = fetchJsonp;\n */\n\n module.exports = fetchJsonp;\n});","import { Controller } from \"@hotwired/stimulus\"\nimport fetchJsonp from \"fetch-jsonp\"\nimport { analyticizeEvent } from \"@oddcamp/analytics\"\n\nimport Stimulus from \"../../common/utils/stimulus\"\n\nclass Newsletter extends Controller {\n static values = { response: String, error: String }\n\n static targets = [`successNote`, `errorNote`, `button`]\n\n #loading = false\n\n submit(e) {\n e.preventDefault()\n\n if (this.#loading) return\n\n this.#loading = true\n this.respondedValue = ``\n\n const params = new URLSearchParams(new FormData(this.element)).toString()\n const url = `${this.element.action.replace(`post`, `post-json`)}&${params}`\n\n fetchJsonp(url, {\n jsonpCallback: `c`,\n })\n .then((r) => r.json())\n .then((data) => {\n if (data.result == `success`) {\n this.responseValue = `success`\n this.successNoteController.setContent(data.msg)\n\n analyticizeEvent({\n data: {\n name: `newsletter_signup_success`,\n },\n })\n } else {\n this.responseValue = `error`\n this.errorNoteController.setContent(data.msg.substring(4))\n\n analyticizeEvent({\n data: {\n name: `newsletter_signup_error`,\n },\n })\n }\n\n this.buttonController.setDisabled(false)\n this.#loading = false\n })\n .catch(() => {\n this.responseValue = `error`\n this.#loading = false\n this.errorNoteController.setContent(this.errorValue)\n this.buttonController.setDisabled(false)\n\n analyticizeEvent({\n data: {\n name: `newsletter_signup_error`,\n },\n })\n })\n }\n\n get successNoteController() {\n return this.application.getControllerForElementAndIdentifier(\n this.successNoteTarget,\n `note`\n )\n }\n\n get errorNoteController() {\n return this.application.getControllerForElementAndIdentifier(\n this.errorNoteTarget,\n `note`\n )\n }\n\n get buttonController() {\n return this.application.getControllerForElementAndIdentifier(\n this.buttonTarget,\n `button`\n )\n }\n}\n\nStimulus.register(`newsletter`, Newsletter)\n","import { Controller } from \"@hotwired/stimulus\"\n\nimport Stimulus from \"../../common/utils/stimulus\"\n\n// item\n\nclass FaqItem extends Controller {\n static values = { expanded: Boolean }\n\n toggle(e) {\n this.expandedValue = !this.expandedValue\n e.currentTarget.ariaExpanded = this.expandedValue\n }\n}\n\nStimulus.register(`faq-item`, FaqItem)\n","/**\n * SSR Window 4.0.2\n * Better handling for window object in SSR environment\n * https://github.com/nolimits4web/ssr-window\n *\n * Copyright 2021, Vladimir Kharlampidi\n *\n * Licensed under MIT\n *\n * Released on: December 13, 2021\n */\n/* eslint-disable no-param-reassign */\nfunction isObject(obj) {\n return (obj !== null &&\n typeof obj === 'object' &&\n 'constructor' in obj &&\n obj.constructor === Object);\n}\nfunction extend(target = {}, src = {}) {\n Object.keys(src).forEach((key) => {\n if (typeof target[key] === 'undefined')\n target[key] = src[key];\n else if (isObject(src[key]) &&\n isObject(target[key]) &&\n Object.keys(src[key]).length > 0) {\n extend(target[key], src[key]);\n }\n });\n}\n\nconst ssrDocument = {\n body: {},\n addEventListener() { },\n removeEventListener() { },\n activeElement: {\n blur() { },\n nodeName: '',\n },\n querySelector() {\n return null;\n },\n querySelectorAll() {\n return [];\n },\n getElementById() {\n return null;\n },\n createEvent() {\n return {\n initEvent() { },\n };\n },\n createElement() {\n return {\n children: [],\n childNodes: [],\n style: {},\n setAttribute() { },\n getElementsByTagName() {\n return [];\n },\n };\n },\n createElementNS() {\n return {};\n },\n importNode() {\n return null;\n },\n location: {\n hash: '',\n host: '',\n hostname: '',\n href: '',\n origin: '',\n pathname: '',\n protocol: '',\n search: '',\n },\n};\nfunction getDocument() {\n const doc = typeof document !== 'undefined' ? document : {};\n extend(doc, ssrDocument);\n return doc;\n}\n\nconst ssrWindow = {\n document: ssrDocument,\n navigator: {\n userAgent: '',\n },\n location: {\n hash: '',\n host: '',\n hostname: '',\n href: '',\n origin: '',\n pathname: '',\n protocol: '',\n search: '',\n },\n history: {\n replaceState() { },\n pushState() { },\n go() { },\n back() { },\n },\n CustomEvent: function CustomEvent() {\n return this;\n },\n addEventListener() { },\n removeEventListener() { },\n getComputedStyle() {\n return {\n getPropertyValue() {\n return '';\n },\n };\n },\n Image() { },\n Date() { },\n screen: {},\n setTimeout() { },\n clearTimeout() { },\n matchMedia() {\n return {};\n },\n requestAnimationFrame(callback) {\n if (typeof setTimeout === 'undefined') {\n callback();\n return null;\n }\n return setTimeout(callback, 0);\n },\n cancelAnimationFrame(id) {\n if (typeof setTimeout === 'undefined') {\n return;\n }\n clearTimeout(id);\n },\n};\nfunction getWindow() {\n const win = typeof window !== 'undefined' ? window : {};\n extend(win, ssrWindow);\n return win;\n}\n\nexport { extend, getDocument, getWindow, ssrDocument, ssrWindow };\n","/**\n * Dom7 4.0.4\n * Minimalistic JavaScript library for DOM manipulation, with a jQuery-compatible API\n * https://framework7.io/docs/dom7.html\n *\n * Copyright 2022, Vladimir Kharlampidi\n *\n * Licensed under MIT\n *\n * Released on: January 11, 2022\n */\nimport { getWindow, getDocument } from 'ssr-window';\n\n/* eslint-disable no-proto */\nfunction makeReactive(obj) {\n const proto = obj.__proto__;\n Object.defineProperty(obj, '__proto__', {\n get() {\n return proto;\n },\n\n set(value) {\n proto.__proto__ = value;\n }\n\n });\n}\n\nclass Dom7 extends Array {\n constructor(items) {\n if (typeof items === 'number') {\n super(items);\n } else {\n super(...(items || []));\n makeReactive(this);\n }\n }\n\n}\n\nfunction arrayFlat(arr = []) {\n const res = [];\n arr.forEach(el => {\n if (Array.isArray(el)) {\n res.push(...arrayFlat(el));\n } else {\n res.push(el);\n }\n });\n return res;\n}\nfunction arrayFilter(arr, callback) {\n return Array.prototype.filter.call(arr, callback);\n}\nfunction arrayUnique(arr) {\n const uniqueArray = [];\n\n for (let i = 0; i < arr.length; i += 1) {\n if (uniqueArray.indexOf(arr[i]) === -1) uniqueArray.push(arr[i]);\n }\n\n return uniqueArray;\n}\nfunction toCamelCase(string) {\n return string.toLowerCase().replace(/-(.)/g, (match, group) => group.toUpperCase());\n}\n\n// eslint-disable-next-line\n\nfunction qsa(selector, context) {\n if (typeof selector !== 'string') {\n return [selector];\n }\n\n const a = [];\n const res = context.querySelectorAll(selector);\n\n for (let i = 0; i < res.length; i += 1) {\n a.push(res[i]);\n }\n\n return a;\n}\n\nfunction $(selector, context) {\n const window = getWindow();\n const document = getDocument();\n let arr = [];\n\n if (!context && selector instanceof Dom7) {\n return selector;\n }\n\n if (!selector) {\n return new Dom7(arr);\n }\n\n if (typeof selector === 'string') {\n const html = selector.trim();\n\n if (html.indexOf('<') >= 0 && html.indexOf('>') >= 0) {\n let toCreate = 'div';\n if (html.indexOf('