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AsBF,IAQtDtL,OAAOO,SAAS,EAAGuK,EAAQI,GAGvB7G,GAAW4G,IAEb5G,EAAQtH,aAAa,WAAY,MAGjCsH,EAAQzJ,SAIc,mBAAbsH,GACTA,IAIFiJ,GAAY,EAvBd,CAsFA,OA1DA,SAAcpT,GACZ,IAAImJ,EAAU+F,UAAUzP,OAAS,QAAsByC,IAAjBgN,UAAU,GAAmBA,UAAU,GAAK,CAAC,EAanF,OAVAhF,EAAWf,EAAQe,UAAY,IAC/BR,EAASP,EAAQO,QAAU,EAC3BS,EAAWhB,EAAQgB,SACnB8I,EAAS9J,EAAQ8J,QAAUV,EAC3BW,EAAO/J,EAAQ+J,OAAQ,EAGvBH,EApEO9K,OAAOyL,SAAWzL,OAAO0L,iBAuEN,IAAX3T,EAAyB,YAAc2S,EAAQ3S,IAE5D,IAAK,SACHsM,OAAUpK,EACVgR,GAAO,EACPF,EAAOD,EAAQ/S,EACf,MAIF,IAAK,SAEHgT,EAAOtI,EADP4B,EAAUtM,GAEV,MAIF,IAAK,SACHsM,EAAUxJ,SAAS1C,cAAcJ,GACjCgT,EAAOtI,EAAI4B,GAQf,OAHA6G,EAAWH,EAAOD,EAAQrJ,EAGlBiJ,EAAQxJ,EAAQe,WAEtB,IAAK,SACHA,EAAWf,EAAQe,SACnB,MAGF,IAAK,WACHA,EAAWf,EAAQe,SAASiJ,GAKhClL,OAAOwL,sBAAsBF,EAC/B,CAIF,CAIgBK,E","sources":["webpack://silverstripe-base/./themes/app/src/scripts/common/validation.js","webpack://silverstripe-base/./themes/app/src/scripts/common/util.js","webpack://silverstripe-base/./themes/app/src/components/styled-form.js","webpack://silverstripe-base/./themes/app/src/scripts/common/ajax.js","webpack://silverstripe-base/./themes/app/src/scripts/common/scroll-to.js","webpack://silverstripe-base/./node_modules/selector-set/selector-set.next.js","webpack://silverstripe-base/./node_modules/delegated-events/dist/index.js","webpack://silverstripe-base/./node_modules/jump.js/dist/jump.module.js"],"sourcesContent":["import * as validator from \"validate.js\";\nimport { scrollToIfNeeded } from \"@common/scroll-to\";\n\nvalidator.validators.checkboxGroup = function (_, group) {\n if (group) {\n const checked = group.querySelectorAll(\"input[type=checkbox]:checked\");\n\n if (checked.length) {\n return null;\n }\n }\n\n return \"^Please select one\";\n};\n\nconst findFieldWrapper = (el) => {\n if (el) {\n if (el.closest(\".form-field-wrapper\")) {\n return el.closest(\".form-field-wrapper\");\n }\n\n if (el.closest(\".form-field\")) {\n return el.closest(\".form-field\");\n }\n\n if (el.closest(\".middleColumn\")) {\n return el.closest(\".middleColumn\");\n }\n\n if (el.closest(\".field\")) {\n return el.closest(\".field\");\n }\n }\n};\n\nexport const handleBlur = (e) => {\n const fieldWrapper = findFieldWrapper(e.target);\n\n if (fieldWrapper) {\n fieldWrapper.classList.remove(\"has-error\");\n\n const existingErrorMessage = fieldWrapper.querySelector(\".form-field-message\");\n\n if (existingErrorMessage) {\n existingErrorMessage.remove();\n }\n }\n\n if (e.target.classList.contains(\"has-error\")) {\n e.target.classList.remove(\"has-error\");\n }\n};\n\nexport const buildRules = (form) => {\n const rules = {};\n\n form\n .querySelectorAll(\"[required], input.required-if, .js-dropdown.required-if select, .optionset.required-if input\")\n .forEach((field) => {\n // Ignore hidden fields\n if ((findFieldWrapper(field) && findFieldWrapper(field).offsetHeight === 0) || field.getAttribute(\"readonly\")) {\n return;\n }\n\n const fieldName = field.dataset.name ? field.dataset.name : field.name;\n\n rules[fieldName] = {\n presence: {\n allowEmpty: false,\n message: \"^Required\",\n },\n };\n\n if (field.type === \"email\") {\n rules[field.name].email = true;\n }\n });\n\n form.querySelectorAll(\"[pattern]\").forEach((field) => {\n // Ignore hidden fields\n if (findFieldWrapper(field).offsetHeight === 0 || field.readonly) {\n return;\n }\n\n rules[field.name] = {\n format: {\n pattern: field.getAttribute(\"pattern\"),\n message: \"^Required\",\n },\n };\n });\n\n form.querySelectorAll(\"[min]\").forEach((field) => {\n // Ignore hidden fields\n if (findFieldWrapper(field).offsetHeight === 0 || field.readonly) {\n return;\n }\n\n rules[field.name] = {\n length: {\n minimum: parseInt(field.min),\n },\n };\n });\n\n form.querySelectorAll(\"[data-equals]\").forEach((field) => {\n // Ignore hidden fields\n if (findFieldWrapper(field).offsetHeight === 0 || field.readonly) {\n return;\n }\n\n rules[field.name] = {\n equality: field.dataset.equals,\n };\n });\n\n form.querySelectorAll(\"[aria-required], [data-required]\").forEach((field) => {\n // Ignore hidden fields\n if ((findFieldWrapper(field) && findFieldWrapper(field).offsetHeight === 0) || field.readonly) {\n return;\n }\n\n if (field.classList.contains(\"optionset\")) {\n const radio = field.querySelector(\"input[type=radio]\");\n const checkbox = field.querySelector(\"input[type=checkbox]\");\n\n if (radio) {\n rules[radio.name] = {\n presence: {\n message: \"^Required\",\n },\n };\n }\n\n if (checkbox) {\n rules[checkbox.name] = {\n checkboxGroup: checkbox.closest(\".optionset\"),\n };\n }\n }\n });\n\n form.querySelectorAll(\".requiredcheckboxset\").forEach((field) => {\n // Ignore hidden fields\n if ((findFieldWrapper(field) && findFieldWrapper(field).offsetHeight === 0) || field.readonly) {\n return;\n }\n\n const checkbox = field.querySelector(\"input[type=checkbox]\");\n\n if (checkbox) {\n rules[checkbox.name] = {\n checkboxGroup: checkbox.closest(\".requiredcheckboxset\"),\n };\n }\n });\n\n return rules;\n};\n\nexport const handleValidation = (form) => {\n const rules = buildRules(form);\n const result = validate(form, rules);\n\n if (result !== undefined) {\n for (const [name, messages] of Object.entries(result)) {\n const field = form.querySelector(`[name=\"${name}\"]`);\n const fieldWrapper = findFieldWrapper(field);\n\n // Place error message\n if (fieldWrapper) {\n const existingErrorMessage = fieldWrapper.querySelector(\".form-field-message\");\n\n if (existingErrorMessage) {\n existingErrorMessage.remove();\n }\n\n const message = `\n
\n ${messages[0]}\n
\n `;\n fieldWrapper.insertAdjacentHTML(\"beforeend\", message);\n fieldWrapper.classList.add(\"has-error\");\n }\n\n field.classList.add(\"has-error\");\n }\n\n const shouldScroll = form.dataset.formScroll !== undefined;\n\n const firstError = form.querySelector(\".has-error\");\n\n if (shouldScroll && firstError) {\n scrollToIfNeeded(firstError, 150, () => {\n setTimeout(() => {\n firstError.querySelector(\"input\") && firstError.querySelector(\"input\").focus();\n }, 0);\n });\n }\n\n return false;\n }\n\n return true;\n};\n\nexport const validate = validator;\n","export const isTouchDevice = \"ontouchstart\" in document.documentElement;\n\nexport const generateQueryString = (data = {}) => {\n let params = data;\n\n if (data instanceof FormData === true) {\n params = {};\n\n data.forEach((value, key) => (params[key] = value));\n }\n\n for (const key in params) {\n if (params[key] === \"\") {\n delete params[key];\n }\n }\n\n return new URLSearchParams(params);\n};\n\nexport const trackGoogleAnalytics = (event) => {\n if (window.dataLayer) {\n window.dataLayer.push(event);\n }\n};\n","import \"@components/styled-form.css\";\nimport { on, fire } from \"delegated-events\";\nimport { handleValidation, handleBlur } from \"@common/validation\";\nimport ajax from \"@common/ajax\";\nimport scrollTo from \"@common/scroll-to\";\nimport { trackGoogleAnalytics } from \"@common/util\";\n\nconst setupDropdowns = async (form) => {\n const dropdowns = form.querySelectorAll(\".js-dropdown, .userform .field.dropdown\");\n\n if (!dropdowns.length) {\n return;\n }\n\n const { default: easydropdown } = await import(\"easydropdown-a11y\");\n import(\"@styles/components/dropdown.css\");\n\n dropdowns.forEach((el) => {\n const select = el.querySelector(\"select\");\n\n if (!select) {\n return;\n }\n\n const placeholder = el.querySelector('option[value=\"\"]');\n\n if (placeholder && !placeholder.hasAttribute(\"data-placeholder\")) {\n placeholder.setAttribute(\"data-placeholder\", true);\n\n if (!placeholder.textContent) {\n placeholder.textContent = \"Select One\";\n }\n }\n\n const opts = {\n behavior: {\n openOnFocus: true,\n maxVisibleItems: 8,\n liveUpdates: true,\n useNativeUiOnMobile: false,\n },\n };\n\n easydropdown(select, opts);\n });\n};\n\nconst setupMasks = async (form) => {\n const fields = form.querySelectorAll('input[type=\"tel\"], input[data-currency]');\n\n if (!fields.length) {\n return;\n }\n\n const { default: IMask } = await import(\"imask/esm/imask\");\n await import(\"imask/esm/masked/number\");\n await import(\"imask/esm/masked/pattern\");\n\n fields.forEach((field) => {\n if (field.type === \"tel\") {\n IMask(field, {\n mask: \"(000) 000-0000\",\n });\n }\n\n if (field.dataset.currency !== undefined) {\n const mask = IMask(field, {\n mask: Number,\n scale: 0,\n thousandsSeparator: \",\",\n min: 1,\n });\n\n field.addEventListener(\"updateValue\", (e) => {\n field.value = e.detail;\n mask.updateValue();\n field.dispatchEvent(new Event(\"blur\"));\n });\n }\n });\n};\n\nconst setupSpecialFields = (form) => {\n // Setup file inputs\n form.querySelectorAll(\"input[type=file]\").forEach((input) => {\n const placeholder = document.createElement(\"div\");\n placeholder.classList.add(\"file-input-placeholder\");\n\n const additionalPlaceholder = input.dataset.additionalPlaceholder;\n\n if (input.value) {\n placeholder.textContent = input.files[0].name;\n } else {\n let fieldPlaceholder = input.placeholder;\n\n if (!fieldPlaceholder) {\n fieldPlaceholder = \"Select File\";\n }\n\n placeholder.innerHTML = `${fieldPlaceholder}`;\n\n if (additionalPlaceholder !== undefined) {\n placeholder.innerHTML += additionalPlaceholder;\n }\n }\n\n input.parentNode.insertBefore(placeholder, input);\n\n placeholder.addEventListener(\"click\", () => input.click());\n\n input.addEventListener(\"change\", (e) => {\n if (e.target.files[0]) {\n placeholder.textContent = e.target.files[0].name;\n }\n });\n });\n\n form.querySelectorAll(\".form-field-wrapper.has-length-limit\").forEach((field) => {\n const input = field.querySelector(\".has-length-limit\");\n\n if (input && input.maxLength) {\n const counter = document.createElement(\"div\");\n counter.classList.add(\"length-limit-counter\");\n\n const count = document.createElement(\"span\");\n count.textContent = `(${input.value.length}/${input.maxLength})`;\n\n counter.appendChild(count);\n\n field.querySelector(\".form-field\").appendChild(counter);\n }\n });\n};\n\nconst handleLengthLimit = (e) => {\n const $input = e.target.closest(\".has-length-limit\");\n const $field = $input.closest(\".field.has-length-limit\");\n\n if ($input && $field) {\n const $count = $field.querySelector(\".length-limit-counter span\");\n $count.textContent = `(${$input.value.length}/${$input.maxLength})`;\n }\n};\n\nconst handleToggle = (e) => {\n const form = e.target.closest(\"form\");\n const field = e.target;\n const name = e.target.name;\n const selectedValue = e.target.value;\n\n form.querySelectorAll(`[data-toggle-if^=\"${name}|\"]`).forEach((input) => {\n const toggleGroup = input.closest(\".toggle-group\");\n let shouldShow = false;\n\n if (!toggleGroup) {\n return;\n }\n\n if (field.type === \"radio\") {\n const targetValues = input.dataset.toggleIf.split(\"|\");\n targetValues.shift();\n shouldShow = targetValues.indexOf(selectedValue) !== -1;\n }\n\n if (field.type === \"checkbox\") {\n shouldShow = field.checked;\n }\n\n if (shouldShow) {\n toggleGroup.classList.remove(\"hidden\");\n } else {\n toggleGroup.classList.add(\"hidden\");\n\n toggleGroup.querySelectorAll(\"input:not([type=checkbox]):not([type=radio])\").forEach((x) => (x.value = null));\n\n toggleGroup.querySelectorAll(\"input:checked\").forEach((x) => {\n if (!toggleGroup.classList.contains(\"ignore-clear\")) {\n x.checked = false;\n }\n\n form.querySelectorAll(`[data-toggle-if^=\"${x.name}|\"]`).forEach((input) => {\n const toggleGroup = input.closest(\".toggle-group\");\n toggleGroup.classList.add(\"hidden\");\n\n toggleGroup.querySelectorAll(\"input:not([type=checkbox]):not([type=radio])\").forEach((x) => (x.value = null));\n });\n });\n }\n });\n};\n\nconst toggleSubmit = (submitButton) => {\n submitButton.disabled = !submitButton.disabled;\n submitButton.classList.toggle(\"btn-loading\");\n};\n\nconst showFormMessages = (holder, message, success, autoHide) => {\n holder.style.display = \"block\";\n holder.innerHTML = message;\n\n if (success) {\n holder.classList.remove(\"form-message-error\");\n } else {\n holder.classList.add(\"form-message-error\");\n }\n\n if (autoHide) {\n setTimeout(() => {\n holder.style.display = \"none\";\n }, 5000);\n }\n};\n\nconst handleAjaxSubmit = (e) => {\n e.preventDefault();\n\n const form = e.target;\n const isValid = handleValidation(form);\n\n if (isValid) {\n const formMessages = form.querySelector(\".form-messages\");\n const submitButton = form.querySelector(\"[type=submit]\");\n let autoHideMessage = form.dataset.autoHideMessage ? form.dataset.autoHideMessage === \"true\" : true;\n toggleSubmit(submitButton);\n\n const formData = new FormData(form);\n\n ajax\n .url(form.action)\n .body(formData)\n .post()\n .json((res) => {\n if (res.success) {\n if (res.ga) {\n res.ga.forEach((event) => trackGoogleAnalytics(event));\n }\n\n form.reset();\n form.querySelectorAll(\"select\").forEach((x) => (x.value = null));\n form.querySelectorAll(\".toggle-fields\").forEach((x) => x.classList.add(\"hidden\"));\n form.querySelectorAll(\".toggle-group\").forEach((x) => x.classList.add(\"hidden\"));\n\n fire(document.documentElement, \"styledform:submit\", {\n form,\n });\n\n if (form.dataset.formHideOnSubmit) {\n form.querySelectorAll(\".form-content\").forEach((x) => x.classList.add(\"hidden\"));\n document.querySelectorAll(\".hide-on-form-submit\").forEach((x) => x.classList.add(\"hidden\"));\n autoHideMessage = false;\n\n const shouldScroll = form.dataset.formScroll !== undefined;\n\n if (shouldScroll) {\n scrollTo(document.body, 32);\n }\n }\n\n // Allow other scripts to hook into this submit\n fire(document.documentElement, \"ajaxform:submit\", {\n form: form,\n type: \"post\",\n url: new URL(form.action),\n queryParameters: new URLSearchParams(formData).toString(),\n });\n }\n\n if (res.message) {\n showFormMessages(formMessages, res.message, res.success, autoHideMessage);\n }\n })\n .catch(() => {\n showFormMessages(formMessages, \"Sorry, there was a problem with your submission\");\n })\n .finally(() => {\n toggleSubmit(submitButton);\n });\n }\n};\n\nconst handleSubmit = (e) => {\n const form = e.target;\n const isValid = handleValidation(form);\n const submitButton = form.querySelector(\"[type=submit]\");\n toggleSubmit(submitButton);\n\n if (!isValid) {\n e.preventDefault();\n toggleSubmit(submitButton);\n }\n};\n\nconst setupForm = (form) => {\n if (form) {\n setupDropdowns(form);\n setupMasks(form);\n setupSpecialFields(form);\n }\n};\n\nconst init = () => {\n if (!document.documentElement.classList.contains(\"did-form-init\")) {\n document.querySelectorAll(\".styled-form\").forEach((form) => {\n setupForm(form);\n });\n\n on(\"blur\", \".has-error\", handleBlur, { capture: true });\n on(\"change\", \".has-error\", handleBlur, { capture: true });\n on(\"change\", \".has-error blur\", handleBlur, {\n capture: true,\n });\n on(\"submit\", \".styled-form[data-form-ajax]\", handleAjaxSubmit);\n on(\"submit\", \".styled-form:not([data-form-ajax]):not(.userform)\", handleSubmit);\n on(\"change\", \"input[type=radio]\", handleToggle);\n on(\"change\", \"input[type=checkbox]\", handleToggle);\n on(\"keyup\", \"textarea.has-length-limit\", handleLengthLimit, {\n capture: true,\n });\n\n document.documentElement.classList.add(\"did-form-init\");\n }\n};\n\ninit();\n\nexport { setupForm };\n","import wretch from 'wretch'\nimport QueryStringAddon from 'wretch/addons/queryString'\n\nwretch.options({\n headers: { 'X-Requested-With': 'XMLHttpRequest' },\n})\n\nexport default wretch().addon(QueryStringAddon)\n","import jump from \"jump.js\";\n\nconst getPageOffset = () => {\n let offset = 0;\n\n const siteHeader = document.querySelector(\".site-header\");\n\n if (siteHeader) {\n const siteHeaderHeight = getComputedStyle(document.documentElement).getPropertyValue(\"--site-header-height\");\n\n offset += parseInt(siteHeaderHeight);\n }\n\n return offset;\n};\n\nconst scrollTo = (target, additionalOffset = 0) => {\n const pageOffset = getPageOffset() * -1;\n\n if (target.dataset.scrollOffset) {\n additionalOffset = parseInt(target.dataset.scrollOffset);\n }\n\n let offset = pageOffset - additionalOffset;\n\n return new Promise((resolve) => {\n jump(target, {\n duration: 600,\n offset,\n callback: () => {\n resolve();\n },\n });\n });\n};\n\nexport const scrollToIfNeeded = (target, additionalOffset = 0) => {\n const rect = target.getBoundingClientRect();\n const viewportHeight = window.innerHeight || document.documentElement.clientHeight;\n const isInViewport = rect.top >= 0 && rect.bottom <= viewportHeight;\n const is50PercentFromTop = rect.top <= viewportHeight / 2;\n\n if (!isInViewport || !is50PercentFromTop) {\n return scrollTo(target, additionalOffset);\n }\n};\n\nexport default scrollTo;\n","// Public: Create a new SelectorSet.\nexport default function SelectorSet() {\n // Construct new SelectorSet if called as a function.\n if (!(this instanceof SelectorSet)) {\n return new SelectorSet();\n }\n\n // Public: Number of selectors added to the set\n this.size = 0;\n\n // Internal: Incrementing ID counter\n this.uid = 0;\n\n // Internal: Array of String selectors in the set\n this.selectors = [];\n\n // Internal: Map of selector ids to objects\n this.selectorObjects = {};\n\n // Internal: All Object index String names mapping to Index objects.\n this.indexes = Object.create(this.indexes);\n\n // Internal: Used Object index String names mapping to Index objects.\n this.activeIndexes = [];\n}\n\n// Detect prefixed Element#matches function.\nvar docElem = window.document.documentElement;\nvar matches =\n docElem.matches ||\n docElem.webkitMatchesSelector ||\n docElem.mozMatchesSelector ||\n docElem.oMatchesSelector ||\n docElem.msMatchesSelector;\n\n// Public: Check if element matches selector.\n//\n// Maybe overridden with custom Element.matches function.\n//\n// el - An Element\n// selector - String CSS selector\n//\n// Returns true or false.\nSelectorSet.prototype.matchesSelector = function(el, selector) {\n return matches.call(el, selector);\n};\n\n// Public: Find all elements in the context that match the selector.\n//\n// Maybe overridden with custom querySelectorAll function.\n//\n// selectors - String CSS selectors.\n// context - Element context\n//\n// Returns non-live list of Elements.\nSelectorSet.prototype.querySelectorAll = function(selectors, context) {\n return context.querySelectorAll(selectors);\n};\n\n// Public: Array of indexes.\n//\n// name - Unique String name\n// selector - Function that takes a String selector and returns a String key\n// or undefined if it can't be used by the index.\n// element - Function that takes an Element and returns an Array of String\n// keys that point to indexed values.\n//\nSelectorSet.prototype.indexes = [];\n\n// Index by element id\nvar idRe = /^#((?:[\\w\\u00c0-\\uFFFF\\-]|\\\\.)+)/g;\nSelectorSet.prototype.indexes.push({\n name: 'ID',\n selector: function matchIdSelector(sel) {\n var m;\n if ((m = sel.match(idRe))) {\n return m[0].slice(1);\n }\n },\n element: function getElementId(el) {\n if (el.id) {\n return [el.id];\n }\n }\n});\n\n// Index by all of its class names\nvar classRe = /^\\.((?:[\\w\\u00c0-\\uFFFF\\-]|\\\\.)+)/g;\nSelectorSet.prototype.indexes.push({\n name: 'CLASS',\n selector: function matchClassSelector(sel) {\n var m;\n if ((m = sel.match(classRe))) {\n return m[0].slice(1);\n }\n },\n element: function getElementClassNames(el) {\n var className = el.className;\n if (className) {\n if (typeof className === 'string') {\n return className.split(/\\s/);\n } else if (typeof className === 'object' && 'baseVal' in className) {\n // className is a SVGAnimatedString\n // global SVGAnimatedString is not an exposed global in Opera 12\n return className.baseVal.split(/\\s/);\n }\n }\n }\n});\n\n// Index by tag/node name: `DIV`, `FORM`, `A`\nvar tagRe = /^((?:[\\w\\u00c0-\\uFFFF\\-]|\\\\.)+)/g;\nSelectorSet.prototype.indexes.push({\n name: 'TAG',\n selector: function matchTagSelector(sel) {\n var m;\n if ((m = sel.match(tagRe))) {\n return m[0].toUpperCase();\n }\n },\n element: function getElementTagName(el) {\n return [el.nodeName.toUpperCase()];\n }\n});\n\n// Default index just contains a single array of elements.\nSelectorSet.prototype.indexes['default'] = {\n name: 'UNIVERSAL',\n selector: function() {\n return true;\n },\n element: function() {\n return [true];\n }\n};\n\n// Use ES Maps when supported\nvar Map;\nif (typeof window.Map === 'function') {\n Map = window.Map;\n} else {\n Map = (function() {\n function Map() {\n this.map = {};\n }\n Map.prototype.get = function(key) {\n return this.map[key + ' '];\n };\n Map.prototype.set = function(key, value) {\n this.map[key + ' '] = value;\n };\n return Map;\n })();\n}\n\n// Regexps adopted from Sizzle\n// https://github.com/jquery/sizzle/blob/1.7/sizzle.js\n//\nvar chunker = /((?:\\((?:\\([^()]+\\)|[^()]+)+\\)|\\[(?:\\[[^\\[\\]]*\\]|['\"][^'\"]*['\"]|[^\\[\\]'\"]+)+\\]|\\\\.|[^ >+~,(\\[\\\\]+)+|[>+~])(\\s*,\\s*)?((?:.|\\r|\\n)*)/g;\n\n// Internal: Get indexes for selector.\n//\n// selector - String CSS selector\n//\n// Returns Array of {index, key}.\nfunction parseSelectorIndexes(allIndexes, selector) {\n allIndexes = allIndexes.slice(0).concat(allIndexes['default']);\n\n var allIndexesLen = allIndexes.length,\n i,\n j,\n m,\n dup,\n rest = selector,\n key,\n index,\n indexes = [];\n\n do {\n chunker.exec('');\n if ((m = chunker.exec(rest))) {\n rest = m[3];\n if (m[2] || !rest) {\n for (i = 0; i < allIndexesLen; i++) {\n index = allIndexes[i];\n if ((key = index.selector(m[1]))) {\n j = indexes.length;\n dup = false;\n while (j--) {\n if (indexes[j].index === index && indexes[j].key === key) {\n dup = true;\n break;\n }\n }\n if (!dup) {\n indexes.push({ index: index, key: key });\n }\n break;\n }\n }\n }\n }\n } while (m);\n\n return indexes;\n}\n\n// Internal: Find first item in Array that is a prototype of `proto`.\n//\n// ary - Array of objects\n// proto - Prototype of expected item in `ary`\n//\n// Returns object from `ary` if found. Otherwise returns undefined.\nfunction findByPrototype(ary, proto) {\n var i, len, item;\n for (i = 0, len = ary.length; i < len; i++) {\n item = ary[i];\n if (proto.isPrototypeOf(item)) {\n return item;\n }\n }\n}\n\n// Public: Log when added selector falls under the default index.\n//\n// This API should not be considered stable. May change between\n// minor versions.\n//\n// obj - {selector, data} Object\n//\n// SelectorSet.prototype.logDefaultIndexUsed = function(obj) {\n// console.warn(obj.selector, \"could not be indexed\");\n// };\n//\n// Returns nothing.\nSelectorSet.prototype.logDefaultIndexUsed = function() {};\n\n// Public: Add selector to set.\n//\n// selector - String CSS selector\n// data - Optional data Object (default: undefined)\n//\n// Returns nothing.\nSelectorSet.prototype.add = function(selector, data) {\n var obj,\n i,\n indexProto,\n key,\n index,\n objs,\n selectorIndexes,\n selectorIndex,\n indexes = this.activeIndexes,\n selectors = this.selectors,\n selectorObjects = this.selectorObjects;\n\n if (typeof selector !== 'string') {\n return;\n }\n\n obj = {\n id: this.uid++,\n selector: selector,\n data: data\n };\n selectorObjects[obj.id] = obj;\n\n selectorIndexes = parseSelectorIndexes(this.indexes, selector);\n for (i = 0; i < selectorIndexes.length; i++) {\n selectorIndex = selectorIndexes[i];\n key = selectorIndex.key;\n indexProto = selectorIndex.index;\n\n index = findByPrototype(indexes, indexProto);\n if (!index) {\n index = Object.create(indexProto);\n index.map = new Map();\n indexes.push(index);\n }\n\n if (indexProto === this.indexes['default']) {\n this.logDefaultIndexUsed(obj);\n }\n objs = index.map.get(key);\n if (!objs) {\n objs = [];\n index.map.set(key, objs);\n }\n objs.push(obj);\n }\n\n this.size++;\n selectors.push(selector);\n};\n\n// Public: Remove selector from set.\n//\n// selector - String CSS selector\n// data - Optional data Object (default: undefined)\n//\n// Returns nothing.\nSelectorSet.prototype.remove = function(selector, data) {\n if (typeof selector !== 'string') {\n return;\n }\n\n var selectorIndexes,\n selectorIndex,\n i,\n j,\n k,\n selIndex,\n objs,\n obj,\n indexes = this.activeIndexes,\n selectors = (this.selectors = []),\n selectorObjects = this.selectorObjects,\n removedIds = {},\n removeAll = arguments.length === 1;\n\n selectorIndexes = parseSelectorIndexes(this.indexes, selector);\n for (i = 0; i < selectorIndexes.length; i++) {\n selectorIndex = selectorIndexes[i];\n\n j = indexes.length;\n while (j--) {\n selIndex = indexes[j];\n if (selectorIndex.index.isPrototypeOf(selIndex)) {\n objs = selIndex.map.get(selectorIndex.key);\n if (objs) {\n k = objs.length;\n while (k--) {\n obj = objs[k];\n if (obj.selector === selector && (removeAll || obj.data === data)) {\n objs.splice(k, 1);\n removedIds[obj.id] = true;\n }\n }\n }\n break;\n }\n }\n }\n\n for (i in removedIds) {\n delete selectorObjects[i];\n this.size--;\n }\n\n for (i in selectorObjects) {\n selectors.push(selectorObjects[i].selector);\n }\n};\n\n// Sort by id property handler.\n//\n// a - Selector obj.\n// b - Selector obj.\n//\n// Returns Number.\nfunction sortById(a, b) {\n return a.id - b.id;\n}\n\n// Public: Find all matching decendants of the context element.\n//\n// context - An Element\n//\n// Returns Array of {selector, data, elements} matches.\nSelectorSet.prototype.queryAll = function(context) {\n if (!this.selectors.length) {\n return [];\n }\n\n var matches = {},\n results = [];\n var els = this.querySelectorAll(this.selectors.join(', '), context);\n\n var i, j, len, len2, el, m, match, obj;\n for (i = 0, len = els.length; i < len; i++) {\n el = els[i];\n m = this.matches(el);\n for (j = 0, len2 = m.length; j < len2; j++) {\n obj = m[j];\n if (!matches[obj.id]) {\n match = {\n id: obj.id,\n selector: obj.selector,\n data: obj.data,\n elements: []\n };\n matches[obj.id] = match;\n results.push(match);\n } else {\n match = matches[obj.id];\n }\n match.elements.push(el);\n }\n }\n\n return results.sort(sortById);\n};\n\n// Public: Match element against all selectors in set.\n//\n// el - An Element\n//\n// Returns Array of {selector, data} matches.\nSelectorSet.prototype.matches = function(el) {\n if (!el) {\n return [];\n }\n\n var i, j, k, len, len2, len3, index, keys, objs, obj, id;\n var indexes = this.activeIndexes,\n matchedIds = {},\n matches = [];\n\n for (i = 0, len = indexes.length; i < len; i++) {\n index = indexes[i];\n keys = index.element(el);\n if (keys) {\n for (j = 0, len2 = keys.length; j < len2; j++) {\n if ((objs = index.map.get(keys[j]))) {\n for (k = 0, len3 = objs.length; k < len3; k++) {\n obj = objs[k];\n id = obj.id;\n if (!matchedIds[id] && this.matchesSelector(el, obj.selector)) {\n matchedIds[id] = true;\n matches.push(obj);\n }\n }\n }\n }\n }\n }\n\n return matches.sort(sortById);\n};\n","import SelectorSet from 'selector-set';\n\nvar bubbleEvents = {};\nvar captureEvents = {};\nvar propagationStopped = new WeakMap();\nvar immediatePropagationStopped = new WeakMap();\nvar currentTargets = new WeakMap();\nvar currentTargetDesc = Object.getOwnPropertyDescriptor(Event.prototype, 'currentTarget');\n\nfunction before(subject, verb, fn) {\n var source = subject[verb];\n\n subject[verb] = function () {\n fn.apply(subject, arguments);\n return source.apply(subject, arguments);\n };\n\n return subject;\n}\n\nfunction matches(selectors, target, reverse) {\n var queue = [];\n var node = target;\n\n do {\n if (node.nodeType !== 1) break;\n\n var _matches = selectors.matches(node);\n\n if (_matches.length) {\n var matched = {\n node: node,\n observers: _matches\n };\n\n if (reverse) {\n queue.unshift(matched);\n } else {\n queue.push(matched);\n }\n }\n } while (node = node.parentElement);\n\n return queue;\n}\n\nfunction trackPropagation() {\n propagationStopped.set(this, true);\n}\n\nfunction trackImmediate() {\n propagationStopped.set(this, true);\n immediatePropagationStopped.set(this, true);\n}\n\nfunction getCurrentTarget() {\n return currentTargets.get(this) || null;\n}\n\nfunction defineCurrentTarget(event, getter) {\n if (!currentTargetDesc) return;\n Object.defineProperty(event, 'currentTarget', {\n configurable: true,\n enumerable: true,\n get: getter || currentTargetDesc.get\n });\n}\n\nfunction canDispatch(event) {\n try {\n event.eventPhase;\n return true;\n } catch (_) {\n return false;\n }\n}\n\nfunction dispatch(event) {\n if (!canDispatch(event)) return;\n var events = event.eventPhase === 1 ? captureEvents : bubbleEvents;\n var selectors = events[event.type];\n if (!selectors) return;\n var queue = matches(selectors, event.target, event.eventPhase === 1);\n if (!queue.length) return;\n before(event, 'stopPropagation', trackPropagation);\n before(event, 'stopImmediatePropagation', trackImmediate);\n defineCurrentTarget(event, getCurrentTarget);\n\n for (var i = 0, len1 = queue.length; i < len1; i++) {\n if (propagationStopped.get(event)) break;\n var matched = queue[i];\n currentTargets.set(event, matched.node);\n\n for (var j = 0, len2 = matched.observers.length; j < len2; j++) {\n if (immediatePropagationStopped.get(event)) break;\n matched.observers[j].data.call(matched.node, event);\n }\n }\n\n currentTargets[\"delete\"](event);\n defineCurrentTarget(event);\n}\n\nfunction on(name, selector, fn) {\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n var capture = options.capture ? true : false;\n var events = capture ? captureEvents : bubbleEvents;\n var selectors = events[name];\n\n if (!selectors) {\n selectors = new SelectorSet();\n events[name] = selectors;\n document.addEventListener(name, dispatch, capture);\n }\n\n selectors.add(selector, fn);\n}\nfunction off(name, selector, fn) {\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n var capture = options.capture ? true : false;\n var events = capture ? captureEvents : bubbleEvents;\n var selectors = events[name];\n if (!selectors) return;\n selectors.remove(selector, fn);\n if (selectors.size) return;\n delete events[name];\n document.removeEventListener(name, dispatch, capture);\n}\nfunction fire(target, name, detail) {\n return target.dispatchEvent(new CustomEvent(name, {\n bubbles: true,\n cancelable: true,\n detail: detail\n }));\n}\n\nexport { fire, off, on };\n","// Robert Penner's easeInOutQuad\n\n// find the rest of his easing functions here: http://robertpenner.com/easing/\n// find them exported for ES6 consumption here: https://github.com/jaxgeller/ez.js\n\nvar easeInOutQuad = function easeInOutQuad(t, b, c, d) {\n t /= d / 2;\n if (t < 1) return c / 2 * t * t + b;\n t--;\n return -c / 2 * (t * (t - 2) - 1) + b;\n};\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n};\n\nvar jumper = function jumper() {\n // private variable cache\n // no variables are created during a jump, preventing memory leaks\n\n var element = void 0; // element to scroll to (node)\n\n var start = void 0; // where scroll starts (px)\n var stop = void 0; // where scroll stops (px)\n\n var offset = void 0; // adjustment from the stop position (px)\n var easing = void 0; // easing function (function)\n var a11y = void 0; // accessibility support flag (boolean)\n\n var distance = void 0; // distance of scroll (px)\n var duration = void 0; // scroll duration (ms)\n\n var timeStart = void 0; // time scroll started (ms)\n var timeElapsed = void 0; // time spent scrolling thus far (ms)\n\n var next = void 0; // next scroll position (px)\n\n var callback = void 0; // to call when done scrolling (function)\n\n // scroll position helper\n\n function location() {\n return window.scrollY || window.pageYOffset;\n }\n\n // element offset helper\n\n function top(element) {\n return element.getBoundingClientRect().top + start;\n }\n\n // rAF loop helper\n\n function loop(timeCurrent) {\n // store time scroll started, if not started already\n if (!timeStart) {\n timeStart = timeCurrent;\n }\n\n // determine time spent scrolling so far\n timeElapsed = timeCurrent - timeStart;\n\n // calculate next scroll position\n next = easing(timeElapsed, start, distance, duration);\n\n // scroll to it\n window.scrollTo(0, next);\n\n // check progress\n timeElapsed < duration ? window.requestAnimationFrame(loop) // continue scroll loop\n : done(); // scrolling is done\n }\n\n // scroll finished helper\n\n function done() {\n // account for rAF time rounding inaccuracies\n window.scrollTo(0, start + distance);\n\n // if scrolling to an element, and accessibility is enabled\n if (element && a11y) {\n // add tabindex indicating programmatic focus\n element.setAttribute('tabindex', '-1');\n\n // focus the element\n element.focus();\n }\n\n // if it exists, fire the callback\n if (typeof callback === 'function') {\n callback();\n }\n\n // reset time for next jump\n timeStart = false;\n }\n\n // API\n\n function jump(target) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n // resolve options, or use defaults\n duration = options.duration || 1000;\n offset = options.offset || 0;\n callback = options.callback; // \"undefined\" is a suitable default, and won't be called\n easing = options.easing || easeInOutQuad;\n a11y = options.a11y || false;\n\n // cache starting position\n start = location();\n\n // resolve target\n switch (typeof target === 'undefined' ? 'undefined' : _typeof(target)) {\n // scroll from current position\n case 'number':\n element = undefined; // no element to scroll to\n a11y = false; // make sure accessibility is off\n stop = start + target;\n break;\n\n // scroll to element (node)\n // bounding rect is relative to the viewport\n case 'object':\n element = target;\n stop = top(element);\n break;\n\n // scroll to element (selector)\n // bounding rect is relative to the viewport\n case 'string':\n element = document.querySelector(target);\n stop = top(element);\n break;\n }\n\n // resolve scroll distance, accounting for offset\n distance = stop - start + offset;\n\n // resolve duration\n switch (_typeof(options.duration)) {\n // number in ms\n case 'number':\n duration = options.duration;\n break;\n\n // function passed the distance of the scroll\n case 'function':\n duration = options.duration(distance);\n break;\n }\n\n // start the loop\n window.requestAnimationFrame(loop);\n }\n\n // expose only the jump method\n return jump;\n};\n\n// export singleton\n\nvar singleton = jumper();\n\nexport default singleton;\n"],"names":["validator","checkboxGroup","_","group","querySelectorAll","length","findFieldWrapper","el","closest","handleBlur","e","fieldWrapper","target","classList","remove","existingErrorMessage","querySelector","contains","handleValidation","form","rules","forEach","field","offsetHeight","getAttribute","fieldName","dataset","name","presence","allowEmpty","message","type","email","readonly","format","pattern","minimum","parseInt","min","equality","equals","radio","checkbox","buildRules","result","validate","undefined","messages","Object","entries","insertAdjacentHTML","add","shouldScroll","formScroll","firstError","scrollToIfNeeded","setTimeout","focus","document","documentElement","handleToggle","selectedValue","value","input","toggleGroup","shouldShow","targetValues","toggleIf","split","shift","indexOf","checked","x","toggleSubmit","submitButton","disabled","toggle","showFormMessages","holder","success","autoHide","style","display","innerHTML","setupForm","async","dropdowns","default","easydropdown","select","placeholder","hasAttribute","setAttribute","textContent","behavior","openOnFocus","maxVisibleItems","liveUpdates","useNativeUiOnMobile","setupDropdowns","fields","IMask","mask","currency","Number","scale","thousandsSeparator","addEventListener","detail","updateValue","dispatchEvent","Event","setupMasks","createElement","additionalPlaceholder","files","fieldPlaceholder","parentNode","insertBefore","click","maxLength","counter","count","appendChild","setupSpecialFields","on","capture","preventDefault","formMessages","autoHideMessage","formData","FormData","ajax","url","action","body","post","json","res","ga","event","window","dataLayer","push","trackGoogleAnalytics","reset","fire","formHideOnSubmit","scrollTo","URL","queryParameters","URLSearchParams","toString","catch","finally","isValid","$input","$field","wretch","options","headers","addon","QueryStringAddon","additionalOffset","pageOffset","getPageOffset","offset","siteHeaderHeight","getComputedStyle","getPropertyValue","scrollOffset","Promise","resolve","jump","duration","callback","rect","getBoundingClientRect","viewportHeight","innerHeight","clientHeight","isInViewport","top","bottom","is50PercentFromTop","SelectorSet","this","size","uid","selectors","selectorObjects","indexes","create","activeIndexes","docElem","matches","webkitMatchesSelector","mozMatchesSelector","oMatchesSelector","msMatchesSelector","prototype","matchesSelector","selector","call","context","idRe","sel","m","match","slice","element","id","classRe","className","baseVal","Map","tagRe","toUpperCase","nodeName","map","get","key","set","chunker","parseSelectorIndexes","allIndexes","i","j","dup","index","allIndexesLen","concat","rest","exec","findByPrototype","ary","proto","len","item","isPrototypeOf","sortById","a","b","logDefaultIndexUsed","data","obj","indexProto","objs","selectorIndexes","selectorIndex","k","selIndex","removedIds","removeAll","arguments","splice","queryAll","len2","results","els","join","elements","sort","len3","keys","matchedIds","bubbleEvents","captureEvents","propagationStopped","WeakMap","immediatePropagationStopped","currentTargets","currentTargetDesc","getOwnPropertyDescriptor","before","subject","verb","fn","source","apply","trackPropagation","trackImmediate","getCurrentTarget","defineCurrentTarget","getter","defineProperty","configurable","enumerable","dispatch","eventPhase","canDispatch","queue","reverse","node","nodeType","_matches","matched","observers","unshift","parentElement","len1","events","off","removeEventListener","CustomEvent","bubbles","cancelable","easeInOutQuad","t","c","d","_typeof","Symbol","iterator","constructor","start","stop","easing","a11y","distance","timeStart","timeElapsed","next","loop","timeCurrent","requestAnimationFrame","scrollY","pageYOffset","jumper"],"sourceRoot":""}