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IAAIF,EAAKR,SAASE,SAAW,KAAOF,SAASW,MAAME,WAC3CA,WAExB,GAAIlC,EAAkB2C,IAAIV,GACxB,OAGFjC,EAAkB7E,IAAI8G,GAEtBjB,EAAYrG,iBAAiB,WAAYgG,EAAkB,CAACP,SAAS,IAErEL,EAAiBF,YAAW,WAC1B8B,EAAQX,GACRjB,OAAiB1C,IA/DF,MAcuC6C,I","sources":["webpack:////opt/render/project/src/app/packs/controllers|sync|/_controller\\.js$/","webpack:////opt/render/project/src/app/packs/images|sync|/^\\.\\/.*$/","webpack:///./controllers/alert_controller.js","webpack:///./controllers/form_controller.js","webpack:///./controllers/index.js","webpack:///./controllers/page_animation_controller.js","webpack:///./controllers/typewriter_controller.js","webpack:///./entrypoints/joewoodward.js","webpack:///./lib/prefetch.js"],"sourcesContent":["var map = {\n\t\"./alert_controller.js\": 1882,\n\t\"./form_controller.js\": 4957,\n\t\"./page_animation_controller.js\": 3456,\n\t\"./typewriter_controller.js\": 9402,\n\t\"controllers/alert_controller.js\": 1882,\n\t\"controllers/form_controller.js\": 4957,\n\t\"controllers/page_animation_controller.js\": 3456,\n\t\"controllers/typewriter_controller.js\": 9402\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 6479;","var map = {\n\t\"./avatar.png\": 1421,\n\t\"./checkbox.svg\": 4400\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 9424;","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = ['close']\n\n connect() {\n if (this.hasCloseTarget) {\n this.closeTarget.addEventListener('keydown', this.closeKeyboardListener.bind(this));\n this.closeTarget.addEventListener('click', this.close.bind(this));\n }\n }\n\n disconnect() {\n if (this.hasCloseTarget) {\n this.closeTarget.removeEventListener('keydown', this.closeKeyboardListener.bind(this));\n this.closeTarget.removeEventListener('click', this.close.bind(this));\n }\n }\n\n close() {\n this.element.classList.add('opacity-0');\n }\n\n closeKeyboardListener(event) {\n const key = event.key || event.keyCode || event.which;\n const enterPressed = key == 'Enter' || key == 13\n\n if (enterPressed) this.close();\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n initialize() {\n this.wrapperClass = 'form-input';\n this.wrapperErrorClass = 'highlighted';\n this.inputClass = 'input';\n this.errorClass = 'error';\n this.errorNotificationClass = 'error-notification';\n this.errorNotificationPlaceholderClass = 'error-notification-placeholder';\n }\n\n connect() {\n this.errorNotification = this.element.querySelector(`.${this.errorNotificationClass}`);\n this.errorNotificationPlaceholder = document.querySelector(`.${this.errorNotificationPlaceholderClass}`);\n this.element\n .querySelectorAll(`.${this.wrapperClass}.${this.wrapperErrorClass} .${this.inputClass}`)\n .forEach(function(input) {\n input.setAttribute('data-error-value', input.value);\n if (this.radioOrCheckbox(input)) {\n input.addEventListener('change', this.toggleHighlight.bind(this));\n } else {\n input.addEventListener('input', this.toggleHighlight.bind(this));\n }\n }.bind(this));\n }\n\n radioOrCheckbox(input) {\n return (input.type == 'radio' || input.type == 'checkbox');\n }\n\n toggleHighlight(e) {\n const input = e.currentTarget;\n const wrapper = input.closest(`.${this.wrapperClass}`);\n const error = wrapper.querySelector(`.${this.errorClass}`);\n // Fairly safe to assume all radios and checkboxes are valid options and\n // errors on occur if no option is checked so we use null\n const errorValue =\n this.radioOrCheckbox(input) ? null : input.dataset.errorValue;\n\n if (this.currentValue(e) == errorValue) {\n wrapper.classList.add(this.wrapperErrorClass);\n } else {\n wrapper.classList.remove(this.wrapperErrorClass);\n }\n this.toggleErrorNotification();\n }\n\n toggleErrorNotification() {\n if (this.errorNotification == undefined) return;\n\n const inputWithError = this.element.querySelector(\n `.${this.wrapperClass}.${this.wrapperErrorClass} .${this.inputClass}`\n )\n\n if (inputWithError != undefined) {\n this.errorNotificationPlaceholder.classList.add('hidden');\n this.errorNotification.classList.remove('hidden');\n } else {\n this.errorNotificationPlaceholder.classList.remove('hidden');\n this.errorNotification.classList.add('hidden');\n }\n }\n\n currentValue(e) {\n const input = e.currentTarget;\n\n if (this.radioOrCheckbox(input)) {\n const siblings = input\n .closest(`.${this.wrapperClass}`)\n .querySelectorAll('input[type=checkbox], input[type=radio]')\n\n return Array.apply(null, siblings).find(option => option.checked).value;\n } else {\n return input.value;\n }\n }\n}\n","// Load all the controllers within this directory and all subdirectories.\n// Controller files must be named *_controller.js.\n\nimport { Application } from \"stimulus\"\nimport { definitionsFromContext } from \"stimulus/webpack-helpers\"\n\nconst application = Application.start()\nconst context = require.context(\"controllers\", true, /_controller\\.js$/)\napplication.load(definitionsFromContext(context))\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n connect() {\n document.body.classList.add('animated');\n }\n\n disconnect() {\n document.body.classList.remove('animated');\n }\n}\n","import { Controller } from \"stimulus\"\nimport Typewriter from 'typewriter-effect/dist/core';\n\nexport default class extends Controller {\n static values = {\n text: Array,\n string: String,\n loop: Boolean,\n cursor: String,\n }\n\n connect() {\n const loop = this.hasLoopValue ? this.loopValue : true\n loop ? this.loopText() : this.typeString()\n }\n\n loopText() {\n this.typewriter = new Typewriter(this.element, {\n strings: this.textValue,\n autoStart: true,\n loop: true,\n cursor: this.cursorValue || ''\n });\n }\n\n typeString() {\n const cursor = this.cursorValue || '';\n this.typewriter = new Typewriter(this.element, {\n cursor: cursor\n });\n this.typewriter\n .typeString(this.stringValue)\n .pauseFor(4300)\n .callFunction(function(state) {\n state.elements.cursor.style.animation = 'none';\n this.typewriter.stop();\n }.bind(this))\n .start()\n }\n}\n","// This file is automatically compiled by Webpack, along with any other files\n// present in this directory. You're encouraged to place your actual application logic in\n// a relevant structure within app/packs and only use these pack files to reference\n// that code so it'll be compiled.\n//\n// To reference this file, add <%= javascript_pack_tag 'application' %> to the appropriate\n// layout file, like app/views/layouts/application.html.erb\n\n// Uncomment to copy all static images under ../images to the output folder and reference\n// them with the image_pack_tag helper in views (e.g <%= image_pack_tag 'rails.png' %>)\n// or the `imagePath` JavaScript helper below.\n//\nconst images = require.context('../images', true)\n// const imagePath = (name) => images(name, true)\n\nimport \"@hotwired/turbo-rails\"\nimport \"controllers\"\nimport \"lib/prefetch\"\n\ndocument.addEventListener('turbo:load', () => {\n setTimeout(() => document.body.classList.add('animated'), 0);\n})\n\ndocument.addEventListener('turbo:before-fetch-request', () => {\n document.body.classList.remove('animated');\n})\n","// https://gist.github.com/vitobotta/8ac3c6f65633b5edb2949aeff0dec69b\n//\n// This code is to be used with https://turbo.hotwire.dev. By default Turbo keeps visited pages in its cache\n// so that when you visit one of those pages again, Turbo will fetch the copy from cache first and present that to the user, then\n// it will fetch the updated page from the server and replace the preview. This makes for a much more responsive navigation\n// between pages. We can improve this further with the code in this file. It enables automatic prefetching of a page when you\n// hover with the mouse on a link or touch it on a mobile device. There is a delay between the mouseover event and the click\n// event, so with this trick the page is already being fetched before the click happens, speeding up also the first\n// view of a page not yet in cache. When the page has been prefetched it is then added to Turbo's cache so it's available for\n// the next visit during the same session. Turbo's default behavior plus this trick make for much more responsive UIs (non SPA).\n\n\nlet lastTouchTimestamp\nlet delayOnHover = 65\nlet mouseoverTimer\n\nconst pendingPrefetches = new Set()\n\nconst eventListenersOptions = {\n capture: true,\n passive: true,\n}\n\nclass Snapshot extends Turbo.navigator.view.snapshot.constructor {\n}\n\ndocument.addEventListener('touchstart', touchstartListener, eventListenersOptions)\ndocument.addEventListener('mouseover', mouseoverListener, eventListenersOptions)\n\nfunction touchstartListener(event) {\n if (window.disablePrefetch) {\n return\n }\n\n /* Chrome on Android calls mouseover before touchcancel so `lastTouchTimestamp`\n * must be assigned on touchstart to be measured on mouseover. */\n lastTouchTimestamp = performance.now()\n\n const linkElement = event.target.closest('a')\n\n if (!isPreloadable(linkElement)) {\n return\n }\n\n preload(linkElement)\n}\n\nfunction mouseoverListener(event) {\n if (window.disablePrefetch) {\n return\n }\n\n if (performance.now() - lastTouchTimestamp < 1111) {\n return\n }\n\n const linkElement = event.target.closest('a')\n\n if (!isPreloadable(linkElement)) {\n return\n }\n\n const url = linkElement.getAttribute(\"href\")\n const loc = new URL(url, location.protocol + \"//\" + location.host).toString()\n const absoluteUrl = loc.toString()\n\n if (pendingPrefetches.has(absoluteUrl)) {\n return\n }\n\n pendingPrefetches.add(absoluteUrl)\n\n linkElement.addEventListener('mouseout', mouseoutListener, {passive: true})\n\n mouseoverTimer = setTimeout(() => {\n preload(linkElement)\n mouseoverTimer = undefined\n }, delayOnHover)\n}\n\nfunction mouseoutListener(event) {\n if (event.relatedTarget && event.target.closest('a') == event.relatedTarget.closest('a')) {\n return\n }\n\n if (mouseoverTimer) {\n clearTimeout(mouseoverTimer)\n mouseoverTimer = undefined\n }\n}\n\nfunction isPreloadable(linkElement) {\n if (!linkElement || !linkElement.getAttribute(\"href\") || linkElement.dataset.turbo == \"false\" || linkElement.dataset.prefetch == \"false\") {\n return\n }\n\n if (linkElement.origin != location.origin) {\n return\n }\n\n if (!['http:', 'https:'].includes(linkElement.protocol)) {\n return\n }\n\n if (linkElement.protocol == 'http:' && location.protocol == 'https:') {\n return\n }\n\n if (linkElement.search && !('prefetch' in linkElement.dataset)) {\n return\n }\n\n if (linkElement.hash && linkElement.pathname + linkElement.search == location.pathname + location.search) {\n return\n }\n\n return true\n}\n\nfunction fetchPage (url, success) {\n const xhr = new XMLHttpRequest()\n xhr.open('GET', url)\n xhr.setRequestHeader('VND.PREFETCH', 'true')\n xhr.setRequestHeader('Accept', 'text/html')\n xhr.onreadystatechange = () => {\n if (xhr.readyState !== XMLHttpRequest.DONE) return\n if (xhr.status !== 200) return\n success(xhr.responseText)\n }\n xhr.send()\n}\n\nfunction preload(link) {\n const url = link.getAttribute(\"href\")\n const loc = new URL(url, location.protocol + \"//\" + location.host)\n const absoluteUrl = loc.toString()\n\n if (link.dataset.prefetchWithLink == \"true\") {\n const prefetcher = document.createElement('link')\n prefetcher.rel = 'prefetch'\n prefetcher.href = url\n document.head.appendChild(prefetcher)\n pendingPrefetches.delete(absoluteUrl)\n } else if (!Turbo.navigator.view.snapshotCache.has(loc)) {\n fetchPage(url, responseText => {\n const snapshot = Snapshot.fromHTMLString(responseText)\n Turbo.navigator.view.snapshotCache.put(loc, snapshot)\n pendingPrefetches.delete(absoluteUrl)\n })\n }\n}\n"],"names":["map","webpackContext","req","id","webpackContextResolve","__webpack_require__","o","e","Error","code","keys","Object","resolve","module","exports","connect","this","hasCloseTarget","closeTarget","addEventListener","closeKeyboardListener","bind","close","disconnect","removeEventListener","element","classList","add","event","key","keyCode","which","Controller","targets","initialize","wrapperClass","wrapperErrorClass","inputClass","errorClass","errorNotificationClass","errorNotificationPlaceholderClass","errorNotification","querySelector","errorNotificationPlaceholder","document","querySelectorAll","forEach","input","setAttribute","value","radioOrCheckbox","toggleHighlight","type","currentTarget","wrapper","closest","errorValue","dataset","currentValue","remove","toggleErrorNotification","undefined","siblings","Array","apply","find","option","checked","application","Application","context","require","load","definitionsFromContext","body","hasLoopValue","loopValue","loopText","typeString","typewriter","Typewriter","strings","textValue","autoStart","loop","cursor","cursorValue","stringValue","pauseFor","callFunction","state","elements","style","animation","stop","start","values","text","string","String","Boolean","setTimeout","lastTouchTimestamp","mouseoverTimer","pendingPrefetches","Set","eventListenersOptions","capture","passive","Snapshot","Turbo","navigator","view","snapshot","constructor","mouseoutListener","relatedTarget","target","clearTimeout","isPreloadable","linkElement","getAttribute","turbo","prefetch","origin","location","includes","protocol","search","hash","pathname","preload","link","url","loc","URL","host","absoluteUrl","toString","prefetchWithLink","prefetcher","createElement","rel","href","head","appendChild","snapshotCache","has","success","xhr","XMLHttpRequest","open","setRequestHeader","onreadystatechange","readyState","DONE","status","responseText","send","fetchPage","fromHTMLString","put","window","disablePrefetch","performance","now"],"sourceRoot":""}