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,IAC/J0D,EAAsB1D,EAAoBS,EAAEiD","sources":["webpack://dsposal.web/webpack/runtime/chunk loaded","webpack://dsposal.web/./assets-es6/dsposal/js/claim.js","webpack://dsposal.web/webpack/bootstrap","webpack://dsposal.web/webpack/runtime/compat get default export","webpack://dsposal.web/webpack/runtime/define property getters","webpack://dsposal.web/webpack/runtime/global","webpack://dsposal.web/webpack/runtime/hasOwnProperty shorthand","webpack://dsposal.web/webpack/runtime/make namespace object","webpack://dsposal.web/webpack/runtime/jsonp chunk loading","webpack://dsposal.web/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = function(result, chunkIds, fn, priority) {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __webpack_require__.O[key](chunkIds[j]); })) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","import { postForm } from \"../../common/js/utils/form-validation\";\r\nimport { onLoad } from \"../../common/js/utils/util\";\r\nimport { initCore } from \"./core\";\r\nimport { ajaxErrorPopUp, successToast } from \"../../common/js/utils/popups\";\r\nimport { toggleSubmitButtonState } from \"../../common/js/utils/util\";\r\n\r\nexport function claimFormValidation() {\r\n $.validator.addMethod(\"postcodeUK\", function (postCode, element) {\r\n postCode = postCode.replace(/\\(|\\)|\\s+|-/g, \"\");\r\n\r\n return this.optional(element) || (/^([Gg][Ii][Rr] 0[Aa]{2})|((([A-Za-z][0-9]{1,2})|(([A-Za-z][A-Ha-hJ-Yj-y][0-9]{1,2})|(([A-Za-z][0-9][A-Za-z])|([A-Za-z][A-Ha-hJ-Yj-y][0-9][A-Za-z]?))))\\s?[0-9][A-Za-z]{2})$/).test(postCode);\r\n }, \"Please specify a valid (UK) postcode\");\r\n\r\n\r\n $.validator.addMethod(\"phoneUK\", function (phoneNumber, element) {\r\n phoneNumber = phoneNumber.replace(/\\(|\\)|\\s+|-/g, \"\");\r\n\r\n return this.optional(element) || phoneNumber.length > 9 && (/^(?:(?:(?:00\\s?|\\+)44\\s?)|(?:\\(?0))(?:\\d{2}\\)?\\s?\\d{4}\\s?\\d{4}|\\d{3}\\)?\\s?\\d{3}\\s?\\d{3,4}|\\d{4}\\)?\\s?(?:\\d{5}|\\d{3}\\s?\\d{3})|\\d{5}\\)?\\s?\\d{4,5})$/).test(phoneNumber);\r\n }, \"Please specify a valid (UK) phone number\");\r\n\r\n $(\"#claim-form\").validate({\r\n rules: {\r\n Postcode: {\r\n postcodeUK: true\r\n },\r\n Phone: {\r\n phoneUK: true\r\n }\r\n },\r\n messages: {\r\n BusinessName: {\r\n required: \"Please specify your business name\",\r\n },\r\n Email: {\r\n required: \"Please specify your email address\",\r\n email: \"Your email address must be in the format of name@domain.com\"\r\n },\r\n AddressLine1: {\r\n required: \"Please specify the first line of your address\",\r\n },\r\n Town: {\r\n required: \"Please specify your town / city\",\r\n },\r\n Postcode: {\r\n required: \"Please specify your postcode\"\r\n }\r\n },\r\n errorClass: \"is-invalid\",\r\n validClass: \"is-valid\",\r\n errorPlacement: function (error, element) {\r\n $(error).addClass(\"invalid-feedback\");\r\n if ((element).parent(\".input-group\").length) {\r\n error.insertAfter($(element).parent(\".input-group\"));\r\n } else {\r\n error.insertAfter(element);\r\n }\r\n },\r\n submitHandler: async function (form, event) {\r\n event.preventDefault();\r\n var btn = document.querySelector(\"form#claim-form button[type='submit']\");\r\n toggleSubmitButtonState(btn, \"running\");\r\n\r\n // Get the Turnstile token\r\n var token = turnstile.getResponse();\r\n\r\n if (!token) {\r\n toggleSubmitButtonState(btn, \"complete\");\r\n document.querySelector(\"#turnstileError\").classList.add(\"d-block\");\r\n return false;\r\n } else {\r\n document.querySelector(\"#turnstileError\").classList.remove(\"d-block\");\r\n }\r\n \r\n await postForm({\r\n form: form,\r\n url: form.getAttribute(\"action\"),\r\n token: { name: 'Token', value: token },\r\n successCallback: function (e) {\r\n successToast(\"Thank you for submitting this claim. We will be in touch shortly.\", \"Claim Submitted\", \"top\");\r\n toggleSubmitButtonState(btn, \"complete\");\r\n form.reset();\r\n turnstile.reset();\r\n //Remove is-valid is-invalid invalid-feedback class from all inputs\r\n $(\".is-valid, .is-invalid\").removeClass(\"is-valid is-invalid\");\r\n },\r\n errorCallback: function (e) {\r\n ajaxErrorPopUp(e.status, e.statusText);\r\n toggleSubmitButtonState(btn, \"complete\");\r\n }\r\n });\r\n\r\n return false;\r\n }\r\n });\r\n}\r\n\r\nonLoad(() => {\r\n initCore();\r\n claimFormValidation();\r\n});","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t8259: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = function(chunkId) { return installedChunks[chunkId] === 0; };\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkdsposal_web\"] = self[\"webpackChunkdsposal_web\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [754,7599,6737,1661,6443,9704,8446,4198,9758,7695], function() { return __webpack_require__(30439); })\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","i","claimFormValidation","$","validator","addMethod","postCode","element","replace","this","optional","test","phoneNumber","length","validate","rules","Postcode","postcodeUK","Phone","phoneUK","messages","BusinessName","required","Email","email","AddressLine1","Town","errorClass","validClass","errorPlacement","error","addClass","parent","insertAfter","submitHandler","form","event","preventDefault","btn","document","querySelector","toggleSubmitButtonState","token","turnstile","getResponse","classList","add","remove","postForm","url","getAttribute","name","value","successCallback","e","successToast","reset","removeClass","errorCallback","ajaxErrorPopUp","status","statusText","onLoad","initCore","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","__webpack_modules__","call","m","O","result","chunkIds","fn","priority","notFulfilled","Infinity","fulfilled","j","Object","keys","every","key","splice","r","n","getter","__esModule","d","a","definition","o","defineProperty","enumerable","get","g","globalThis","Function","window","obj","prop","prototype","hasOwnProperty","Symbol","toStringTag","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","data","moreModules","runtime","some","id","chunkLoadingGlobal","self","forEach","bind","push","__webpack_exports__"],"sourceRoot":""}