`;\r\n if (placemark.imageFilename)\r\n {\r\n infoContent += `

`;\r\n }\r\n infoContent += urlTemplate && placemark.url\r\n ? `
`\r\n : `
${placemark.name}
`;\r\n\r\n infoContent += `
${placemark.address.lineOne}`;\r\n if (placemark.address.lineTwo)\r\n {\r\n infoContent += `
${placemark.address.lineTwo}`;\r\n }\r\n if (placemark.address.town)\r\n {\r\n infoContent += `
${placemark.address.town}`;\r\n }\r\n if (placemark.address.county)\r\n {\r\n infoContent += `
${placemark.address.county}`;\r\n }\r\n if (placemark.address.postalCode)\r\n {\r\n infoContent += `
${placemark.address.postalCode}`;\r\n }\r\n infoContent += `
`;\r\n infoWindow = new google.maps.InfoWindow({\r\n content: infoContent\r\n });\r\n\r\n infoWindow.open(map, marker);\r\n}\r\n\r\nfunction loadTheme(data: JQueryXHR): void\r\n{\r\n mapStyle = data.responseJSON;\r\n\r\n if (mapElement == null)\r\n {\r\n return;\r\n }\r\n\r\n let apiPath = mapElement.dataset.apiPath;\r\n if (apiPath != null)\r\n {\r\n $.ajax({\r\n url: apiPath,\r\n complete: loadXmlDocument\r\n });\r\n }\r\n}\r\n\r\nfunction loadXmlDocument(data: JQueryXHR): void\r\n{\r\n if (mapElement == null)\r\n {\r\n return;\r\n }\r\n\r\n const placemarks = JSON.parse(data.responseText) as IOfficeMapPin[];\r\n\r\n map = new google.maps.Map(mapElement,\r\n {\r\n zoom: 16,\r\n center: new google.maps.LatLng(0, 0),\r\n mapTypeId: google.maps.MapTypeId.ROADMAP,\r\n styles: mapStyle\r\n });\r\n\r\n for (let i = 0; i < placemarks.length; i++)\r\n {\r\n const placemark = placemarks[i];\r\n const point = new google.maps.LatLng(placemark.latitude, placemark.longitude);\r\n\r\n const marker = new google.maps.Marker({\r\n map: map,\r\n position: point,\r\n title: placemark.name,\r\n icon: \"/site/img/map-pin.svg\"\r\n });\r\n\r\n google.maps.event.addListener(marker,\r\n \"click\",\r\n function (this: google.maps.Marker)\r\n {\r\n toggleMarker(placemark, this);\r\n });\r\n\r\n if (placemarks.length === 1 && mapElement.dataset.nopopup !== \"true\")\r\n {\r\n toggleMarker(placemark, marker);\r\n }\r\n\r\n placeMarkers.push(marker);\r\n }\r\n\r\n new MarkerClusterer({ markers: placeMarkers, map });\r\n\r\n findMapCenterAndZoom();\r\n setupDirections();\r\n}\r\n\r\nfunction findMapCenterAndZoom(): void\r\n{\r\n if (map == null)\r\n {\r\n return;\r\n }\r\n\r\n const bounds = new google.maps.LatLngBounds();\r\n placeMarkers.forEach((value: google.maps.Marker) =>\r\n {\r\n let point = value.getPosition();\r\n if (point != null)\r\n {\r\n bounds.extend(point);\r\n }\r\n });\r\n\r\n google.maps.event.addListener(map,\r\n \"zoom_changed\",\r\n () =>\r\n {\r\n const zoomChangeBoundsListener = google.maps.event.addListener(map,\r\n \"bounds_changed\",\r\n function (this: google.maps.Map)\r\n {\r\n const currentZoom = this.getZoom();\r\n if (currentZoom && currentZoom > 15 && initialZoom)\r\n {\r\n // Change max/min zoom here\r\n this.setZoom(15);\r\n initialZoom = false;\r\n }\r\n google.maps.event.removeListener(zoomChangeBoundsListener);\r\n });\r\n });\r\n\r\n initialZoom = true;\r\n map.fitBounds(bounds);\r\n}\r\n\r\nfunction findDirectionsKeyDown(ev: KeyboardEvent)\r\n{\r\n if (ev.key === \"Enter\")\r\n {\r\n ev.preventDefault();\r\n findDirections(ev);\r\n }\r\n}\r\n\r\nfunction findDirections(ev: Event)\r\n{\r\n if (ev.currentTarget == null)\r\n {\r\n return;\r\n }\r\n\r\n let rootElement = ev.currentTarget as HTMLElement;\r\n while (rootElement.attributes.getNamedItem(\"map-search\") == null)\r\n {\r\n if (rootElement.parentElement == null)\r\n {\r\n return;\r\n }\r\n\r\n rootElement = rootElement.parentElement;\r\n }\r\n\r\n const inputElem = rootElement.querySelector(\"input\");\r\n if (inputElem == null)\r\n {\r\n return;\r\n }\r\n\r\n const fromAddress = inputElem.value;\r\n\r\n if (directionsElement == null)\r\n {\r\n return;\r\n }\r\n\r\n directionsDisplay.setMap(map);\r\n directionsDisplay.setPanel(directionsElement);\r\n\r\n // get first placemark position\r\n let destination: google.maps.LatLng | null | undefined = null;\r\n\r\n if (placeMarkers.length > 1)\r\n {\r\n const locationSelect = searchElement?.querySelector(\"select\");\r\n if (locationSelect != null)\r\n {\r\n destination = placeMarkers[parseInt(locationSelect.value)].getPosition();\r\n }\r\n }\r\n else\r\n {\r\n destination = placeMarkers[0].getPosition();\r\n }\r\n\r\n if (destination == null)\r\n {\r\n return;\r\n }\r\n\r\n directionsService.route({\r\n origin: fromAddress,\r\n destination: destination,\r\n travelMode: google.maps.TravelMode.DRIVING,\r\n unitSystem: google.maps.UnitSystem.IMPERIAL,\r\n provideRouteAlternatives: true\r\n }, displayDirections);\r\n}\r\n\r\nfunction displayDirections(result: google.maps.DirectionsResult | null, status: google.maps.DirectionsStatus)\r\n{\r\n if (directionsElement == null || errorElement == null || result == null)\r\n {\r\n return;\r\n }\r\n\r\n if (status === google.maps.DirectionsStatus.OK)\r\n {\r\n directionsElement.style.display = \"block\";\r\n errorElement.style.display = \"none\";\r\n directionsDisplay.setDirections(result);\r\n }\r\n else\r\n {\r\n directionsElement.style.display = \"none\";\r\n errorElement.style.display = \"block\";\r\n }\r\n}\r\n\r\nfunction setupDirections()\r\n{\r\n if (searchElement == null)\r\n {\r\n return;\r\n }\r\n\r\n const group = document.createElement(\"div\");\r\n group.className = \"input-group\";\r\n\r\n const destination = document.createElement(\"input\");\r\n destination.type = \"text\";\r\n destination.autocomplete = \"postal-code\";\r\n destination.placeholder = \"Enter your postcode...\";\r\n destination.className = \"form-control\";\r\n destination.addEventListener(\"keydown\", findDirectionsKeyDown);\r\n group.appendChild(destination);\r\n\r\n const button = document.createElement(\"button\");\r\n button.type = \"button\";\r\n button.className = \"btn btn-dark\";\r\n button.addEventListener(\"click\", (ev) => findDirections(ev));\r\n\r\n const icon = document.createElement(\"i\");\r\n icon.className = \"la la-angle-right\";\r\n\r\n button.appendChild(icon);\r\n group.appendChild(button);\r\n searchElement.appendChild(group);\r\n\r\n if (placeMarkers.length > 1)\r\n {\r\n const select = document.createElement(\"select\");\r\n select.className = \"form-control mb-3\";\r\n\r\n for (let i = 0; i < placeMarkers.length; i++)\r\n {\r\n const label = placeMarkers[i].getTitle();\r\n if (label == null)\r\n {\r\n continue;\r\n }\r\n\r\n const option = document.createElement(\"option\");\r\n option.value = i.toFixed(0);\r\n option.text = label;\r\n\r\n select.appendChild(option);\r\n }\r\n\r\n select.addEventListener(\"change\", (ev) => { if (destination.value != \"\") findDirections(ev); });\r\n\r\n searchElement.prepend(select);\r\n }\r\n\r\n errorElement = document.createElement(\"div\");\r\n errorElement.className = \"alert alert-danger mt-3\";\r\n errorElement.style.display = \"none\";\r\n errorElement.innerText = \"There was an error searching for the specified location.\";\r\n searchElement.appendChild(errorElement);\r\n\r\n directionsService = new google.maps.DirectionsService();\r\n directionsDisplay = new google.maps.DirectionsRenderer();\r\n}\r\n\r\nfunction Initialize()\r\n{\r\n let elem = document.querySelector(\"div[map-element]\");\r\n if (elem != null && (elem instanceof HTMLElement))\r\n {\r\n mapElement = elem;\r\n\r\n urlTemplate = mapElement.dataset.urlTemplate;\r\n const themePath = mapElement.dataset.theme ?? \"/site/map/theme.json\";\r\n $.ajax({\r\n url: themePath,\r\n complete: loadTheme\r\n });\r\n }\r\n\r\n elem = document.querySelector(\"div[map-search]\");\r\n if (elem != null && (elem instanceof HTMLElement))\r\n {\r\n searchElement = elem;\r\n }\r\n\r\n elem = document.querySelector(\"div[map-directions]\");\r\n if (elem != null && (elem instanceof HTMLElement))\r\n {\r\n directionsElement = elem;\r\n }\r\n}\r\n\r\nwindow.InitializeMapView = Initialize;","var PartialQueue: Function[] | null;\r\n\r\nexport interface IRequestOptions\r\n{\r\n url: string;\r\n callback?: (state: UpdateState) => void;\r\n content?: FormData;\r\n}\r\n\r\nexport class UpdateState\r\n{\r\n private readonly url: string;\r\n private readonly callback: ((state: UpdateState) => void) | undefined;\r\n private readonly content: FormData | undefined;\r\n private readonly xhr: XMLHttpRequest;\r\n\r\n public constructor(params: IRequestOptions)\r\n {\r\n this.url = params.url;\r\n this.callback = params.callback;\r\n this.content = params.content;\r\n this.xhr = new XMLHttpRequest();\r\n this.xhr.onreadystatechange = () => this.stateChange();\r\n }\r\n\r\n public abort()\r\n {\r\n if (this.xhr.readyState !== XMLHttpRequest.DONE)\r\n {\r\n this.xhr.abort();\r\n }\r\n }\r\n\r\n public update()\r\n {\r\n const method = this.content != null ? \"POST\" : \"GET\";\r\n this.xhr.open(method, this.url, true);\r\n this.xhr.send(this.content);\r\n }\r\n\r\n public stateChange()\r\n {\r\n if (this.xhr.readyState === XMLHttpRequest.DONE && this.xhr.status === 200)\r\n {\r\n if (typeof (this.callback) !== \"undefined\")\r\n {\r\n this.callback(this);\r\n }\r\n }\r\n }\r\n\r\n public getResponse()\r\n {\r\n return this.xhr.responseText;\r\n }\r\n}\r\n\r\nexport function RequestView(params: IRequestOptions)\r\n{\r\n const state = new UpdateState(params);\r\n state.update();\r\n}\r\n\r\nfunction updateViewContent(state: UpdateState, targetElement: HTMLElement)\r\n{\r\n targetElement.innerHTML = state.getResponse();\r\n const scripts = targetElement.querySelectorAll(\"script\");\r\n for (let i = 0; i < scripts.length; i++)\r\n {\r\n const scriptElem = scripts[i];\r\n const scriptInsert = document.createElement(\"script\");\r\n if (scriptElem.src !== \"\")\r\n {\r\n scriptInsert.src = scripts[i].src;\r\n }\r\n else\r\n {\r\n scriptInsert.appendChild(document.createTextNode(scripts[i].innerText.trim()));\r\n }\r\n scripts[i].remove();\r\n targetElement.appendChild(scriptInsert);\r\n }\r\n\r\n const forms = targetElement.querySelectorAll(\"form\");\r\n for (let i = 0; i < forms.length; i++)\r\n {\r\n const form = forms[i];\r\n $.validator.unobtrusive.parse(form);\r\n $(form).validate().settings.submitHandler = () =>\r\n {\r\n const state = new UpdateState({\r\n url: form.action,\r\n content: new FormData(form),\r\n callback: (stateObj: UpdateState) => updateViewContent(stateObj, form.parentElement as HTMLElement)\r\n });\r\n state.update();\r\n };\r\n }\r\n\r\n RunQueue();\r\n}\r\n\r\nexport function RunQueue()\r\n{\r\n PartialQueue = PartialQueue || [];\r\n while (PartialQueue.length !== 0)\r\n {\r\n const item = PartialQueue.pop();\r\n if (item != null)\r\n {\r\n item();\r\n }\r\n }\r\n}\r\n\r\nexport function InitialiseForElement(form: HTMLFormElement)\r\n{\r\n $(form).validate().destroy();\r\n $.validator.unobtrusive.parse(form);\r\n\r\n\r\n $(form).validate().settings.submitHandler = () =>\r\n {\r\n const state = new UpdateState({\r\n url: form.action,\r\n content: new FormData(form),\r\n callback: (stateObj: UpdateState) => updateViewContent(stateObj, form.parentElement as HTMLElement)\r\n });\r\n state.update();\r\n };\r\n}\r\n\r\nexport function SubmitElement(form: HTMLFormElement)\r\n{\r\n const state = new UpdateState({\r\n url: form.action,\r\n content: new FormData(form),\r\n callback: (stateObj: UpdateState) => updateViewContent(stateObj, form.parentElement as HTMLElement)\r\n });\r\n state.update();\r\n}\r\n\r\nwindow.addEventListener(\"load\", RunQueue);","const documentSliders: PromoSlider[] = [];\r\n\r\nclass PromoSlider\r\n{\r\n private container: HTMLElement;\r\n\r\n constructor(container: HTMLElement)\r\n {\r\n this.container = container;\r\n\r\n const newNodes: Node[] = [];\r\n for (let i = 0; i < this.container.childNodes.length; i++)\r\n {\r\n const child = this.container.childNodes[i];\r\n\r\n if (child.nodeType == Node.ELEMENT_NODE)\r\n {\r\n newNodes.push(child.cloneNode(true));\r\n }\r\n else\r\n {\r\n child.remove();\r\n }\r\n }\r\n\r\n setInterval(() => this.advanceSlider(), 6000);\r\n }\r\n\r\n private advanceSlider()\r\n {\r\n this.container.classList.add(\"tick\");\r\n\r\n setTimeout(() => this.cleanSlider(), 500);\r\n }\r\n\r\n private cleanSlider()\r\n {\r\n const first = this.container.childNodes.item(0);\r\n this.container.appendChild(first);\r\n\r\n this.container.classList.remove(\"tick\");\r\n }\r\n}\r\n\r\nexport function Initialize()\r\n{\r\n const sliders = document.querySelectorAll(\"div.promo-block-slider\");\r\n\r\n for (let i = 0; i < sliders.length; i++)\r\n {\r\n documentSliders.push(new PromoSlider(sliders[i] as HTMLElement));\r\n }\r\n}","\r\nimport { SubmitElement } from './PartialHost';\r\n\r\nclass RecaptchaForm\r\n{\r\n private readonly rootElement: HTMLFormElement | null = null;\r\n\r\n private recaptchaCallback(token: string)\r\n {\r\n if (!this.rootElement || !token)\r\n {\r\n return;\r\n }\r\n\r\n const tokenElem = document.createElement(\"input\");\r\n tokenElem.type = \"hidden\";\r\n tokenElem.name = \"recaptcha_token\";\r\n tokenElem.value = token;\r\n this.rootElement.append(tokenElem);\r\n\r\n SubmitElement(this.rootElement);\r\n }\r\n\r\n public constructor(rootElem: HTMLFormElement)\r\n {\r\n this.rootElement = rootElem;\r\n if (!this.rootElement)\r\n {\r\n return;\r\n }\r\n\r\n const siteKey = this.rootElement.dataset.recaptcha;\r\n if (!siteKey)\r\n {\r\n return;\r\n }\r\n\r\n const action = this.rootElement.dataset.recaptchaAction ?? \"form_submit\";\r\n\r\n $(this.rootElement).validate().destroy();\r\n $.validator.unobtrusive.parse($(this.rootElement as HTMLElement));\r\n\r\n $(this.rootElement).validate().settings.submitHandler = () =>\r\n {\r\n grecaptcha.ready(() =>\r\n {\r\n grecaptcha.execute(siteKey, { action: action }).then((token) => this.recaptchaCallback(token));\r\n });\r\n };\r\n }\r\n}\r\n\r\nexport function Initialise(rootElem: HTMLFormElement)\r\n{\r\n return new RecaptchaForm(rootElem);\r\n}","declare global\r\n{\r\n interface Window\r\n {\r\n SetActiveStyleSheet: (title: string | null) => void;\r\n }\r\n}\r\n\r\nfunction readCookie(name: string): string | null\r\n{\r\n const nameEq = name + \"=\";\r\n const ca = document.cookie.split(\";\");\r\n for (let i = 0; i < ca.length; i++)\r\n {\r\n let c = ca[i];\r\n while (c.charAt(0) === \" \")\r\n {\r\n c = c.substring(1, c.length);\r\n }\r\n if (c.indexOf(nameEq) === 0)\r\n {\r\n return c.substring(nameEq.length, c.length);\r\n }\r\n }\r\n return null;\r\n}\r\n\r\nfunction createCookie(name: string, value: string, days: number)\r\n{\r\n let expires: string;\r\n\r\n if (days)\r\n {\r\n const date = new Date();\r\n date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));\r\n expires = `; expires=${date.toUTCString()}`;\r\n }\r\n else\r\n {\r\n expires = \"\";\r\n }\r\n\r\n document.cookie = name + \"=\" + value + expires + \"; path=/\";\r\n}\r\n\r\nfunction getPreferredStyleSheet(): string | null\r\n{\r\n let i: number;\r\n let a: HTMLLinkElement;\r\n for (i = 0; (a = document.getElementsByTagName(\"link\")[i]); i++)\r\n {\r\n const relAttr = a.getAttribute(\"rel\");\r\n if (relAttr != null &&\r\n relAttr.indexOf(\"style\") !== -1 &&\r\n relAttr.indexOf(\"alt\") === -1 &&\r\n a.getAttribute(\"title\"))\r\n {\r\n return a.getAttribute(\"title\");\r\n }\r\n }\r\n return null;\r\n}\r\n\r\nfunction getActiveStyleSheet(): string | null\r\n{\r\n let i: number;\r\n let a: HTMLLinkElement;\r\n for (i = 0; (a = document.getElementsByTagName(\"link\")[i]); i++)\r\n {\r\n const relAttr = a.getAttribute(\"rel\");\r\n if (relAttr != null && relAttr === \"alternate stylesheet\" && a.getAttribute(\"href\") && a.getAttribute(\"title\") && !a.disabled)\r\n {\r\n return a.getAttribute(\"title\");\r\n }\r\n }\r\n return null;\r\n}\r\n\r\nfunction onLoad(): void\r\n{\r\n const cookie = readCookie(\"style\");\r\n const title = cookie\r\n ? cookie\r\n : getPreferredStyleSheet();\r\n SetActiveStyleSheet(title);\r\n}\r\n\r\nfunction onUnload(): void\r\n{\r\n const sheet = getActiveStyleSheet();\r\n const sheetName = sheet != null ? sheet : \"\";\r\n createCookie(\"style\", sheetName, 365);\r\n}\r\n\r\nexport function SetActiveStyleSheet(title: string | null): void\r\n{\r\n let i: number;\r\n let a: HTMLLinkElement;\r\n for (i = 0; (a = document.getElementsByTagName(\"link\")[i]); i++)\r\n {\r\n const relAttr = a.getAttribute(\"rel\");\r\n if (relAttr != null && relAttr === \"alternate stylesheet\" && a.getAttribute(\"title\"))\r\n {\r\n a.disabled = true;\r\n if (a.getAttribute(\"title\") === title)\r\n {\r\n a.disabled = false;\r\n }\r\n }\r\n }\r\n}\r\n\r\nwindow.addEventListener(\"load\", onLoad);\r\nwindow.addEventListener(\"beforeunload\", onUnload);\r\nwindow.SetActiveStyleSheet = SetActiveStyleSheet;","export function SetValidationValues(options: any, ruleName: string, value: any)\r\n{\r\n options.rules[ruleName] = value;\r\n\r\n if (options.message)\r\n {\r\n options.messages[ruleName] = options.message;\r\n }\r\n}","import { SetValidationValues } from './_helpers';\r\n\r\n$.validator.setDefaults({\r\n ignore: \"\"\r\n});\r\n\r\n$.validator.addMethod(\"mustbetrue\",\r\n function (_value, element, _params)\r\n {\r\n return (element as HTMLInputElement).checked;\r\n });\r\n\r\n$.validator.unobtrusive.adapters.add(\"mustbetrue\",\r\n (options: any) =>\r\n {\r\n SetValidationValues(options, \"mustbetrue\", true);\r\n });","import '../css/main.scss';\r\n\r\nimport 'jquery-validation';\r\n$.validator.unobtrusive = require('jquery-validation-unobtrusive');\r\nimport 'jssocials';\r\n\r\n/* Bootstrap modules - comment out as required */\r\nimport 'bootstrap/js/dist/alert';\r\nimport 'bootstrap/js/dist/button';\r\nimport 'bootstrap/js/dist/carousel';\r\nimport 'bootstrap/js/dist/collapse';\r\nimport 'bootstrap/js/dist/dropdown';\r\nimport 'bootstrap/js/dist/modal';\r\nimport 'bootstrap/js/dist/tab';\r\nimport 'bootstrap/js/dist/popover';\r\n// import 'bootstrap/js/dist/scrollspy';\r\n// import 'bootstrap/js/dist/toast';\r\n// import 'bootstrap/js/dist/tooltip';\r\n\r\nimport 'lazysizes';\r\n\r\nimport '../../../Components/Base/BaseComponent/Content/validation/mustbetrue';\r\n\r\nimport '../../../Components/Base/BaseComponent/Content/components/CKReadMore';\r\nimport '../../../Components/Base/BaseComponent/Content/components/MapOffices';\r\nimport '../../../Components/Base/BaseComponent/Content/components/GenericAutocomplete';\r\n\r\nimport '../../../Components/Base/BaseComponent/Content/components/AjaxPage';\r\nimport '../../../Components/Base/BaseComponent/Content/components/BotForm';\r\nimport { InitialiseForElement as AjaxFormInitialise } from '../../../Components/Base/BaseComponent/Content/components/PartialHost';\r\nimport { Initialise as RecaptchaFormInitialise } from '../../../Components/Base/BaseComponent/Content/components/RecaptchaForm';\r\nimport '../../../Components/Base/BaseComponent/Content/components/StyleSwitcher';\r\n\r\nimport { Initialize as InitializePromoSliders } from '../../../Components/Base/BaseComponent/Content/components/PromoSlider';\r\n\r\ndocument.body.classList.remove(\"no-js\");\r\ndocument.body.classList.add(\"js\");\r\n\r\n$(function ()\r\n{\r\n $(\"ul.dropdown-menu [data-toggle='dropdown']\").on(\"click\", function (event)\r\n {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n\r\n const parent = $(this).parent(\".dropdown\");\r\n const prevStatus = parent.hasClass(\"show\");\r\n\r\n parent.toggleClass(\"show\");\r\n $(this).siblings(\".dropdown-menu\").toggleClass(\"show\");\r\n\r\n if (!prevStatus)\r\n {\r\n const root = $(this).parentsUntil(\"nav\", \".navbar-nav\");\r\n if (root.length !== 1)\r\n {\r\n return;\r\n }\r\n\r\n const rootElem = root[0];\r\n const other = $(rootElem).find(\".dropdown.show\");\r\n\r\n other.each((_idx, elem) =>\r\n {\r\n const isParentOrElement = $(elem).has(parent[0]).length !== 0 || parent[0] === elem;\r\n if (!isParentOrElement)\r\n {\r\n $(elem).removeClass(\"show\");\r\n $(elem).find(\".dropdown-menu\").removeClass(\"show\");\r\n }\r\n });\r\n }\r\n });\r\n\r\n $(\"[data-toggle=\\\"popover\\\"]\").popover();\r\n\r\n const forms = document.querySelectorAll(\"form[data-ajax]\");\r\n for (let i = 0; i < forms.length; i++)\r\n {\r\n if ((forms[i] as HTMLFormElement).dataset.recaptcha)\r\n {\r\n RecaptchaFormInitialise(forms[i] as HTMLFormElement);\r\n }\r\n else\r\n {\r\n AjaxFormInitialise(forms[i] as HTMLFormElement);\r\n }\r\n }\r\n\r\n $(\"[data-socials]\").jsSocials({\r\n showLabel: false,\r\n showCount: false,\r\n shares: [\"email\", \"facebook\", \"twitter\", \"linkedin\"]\r\n });\r\n\r\n $(\"#bsm-redirect-modal\").modal();\r\n\r\n $(\".safety-exit\").on(\"click\", function ()\r\n {\r\n const urlSky = \"https://news.sky.com/uk\";\r\n const urlBBC = \"https://www.bbc.co.uk/news\";\r\n\r\n const newWindow = window.open(urlBBC, \"_blank\");\r\n newWindow?.focus();\r\n window.location.replace(urlSky);\r\n });\r\n\r\n InitializePromoSliders();\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 = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (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 = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (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\t792: 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 = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\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((id) => (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[\"webpackChunksills_legal\"] = self[\"webpackChunksills_legal\"] || [];\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, [26,324], () => (__webpack_require__(5870)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","parentElem","ajaxTarget","pageCount","currentPage","loadingMore","scrollWait","this","parent","totalPages","xhr","XMLHttpRequest","onreadystatechange","stateChange","ajaxUrl","ajaxPageInput","formData","form","FormData","loading","document","createElement","className","innerHTML","appendChild","window","addEventListener","testScroll","passive","autoResponse","pageElem","dataset","page","toFixed","responseText","insertBefore","firstElementChild","readyState","DONE","classList","remove","status","hasMorePages","fetchNextPageUrl","add","url","replace","open","setRequestHeader","send","fetchNextPageForm","set","name","urlParams","URLSearchParams","action","toString","testScrollEnd","parentPosition","getBoundingClientRect","bottom","y","height","scrollY","clearTimeout","setTimeout","create","pagesUrl","pagesForm","pagesCount","getElementById","tagName","AjaxPage","parseInt","autoElements","querySelectorAll","i","length","submitBtn","querySelector","targetUrl","href","UpdateState","content","callback","update","checks","setupBotForm","ToggleReadMore","ev","preventDefault","currentTarget","HTMLButtonElement","parentElement","toggle","elems","fieldElement","autoUrl","list","currentTimeout","decodeURIComponent","input","contentChanged","dataObj","parseJSON","item","link","textContent","parentNode","nextSibling","append","fetchData","value","term","encodeURIComponent","termUrl","undefined","autocompleteUrl","AutocompleteField","fields","field","push","map","infoWindow","initialZoom","directionsService","directionsDisplay","mapStyle","urlTemplate","mapElement","searchElement","directionsElement","errorElement","placeMarkers","Array","toggleMarker","placemark","marker","close","infoContent","imageFilename","address","lineOne","lineTwo","town","county","postalCode","google","maps","InfoWindow","loadTheme","data","responseJSON","apiPath","$","ajax","complete","loadXmlDocument","placemarks","JSON","parse","Map","zoom","center","LatLng","mapTypeId","MapTypeId","ROADMAP","styles","point","latitude","longitude","Marker","position","title","icon","event","addListener","nopopup","MarkerClusterer","markers","bounds","LatLngBounds","forEach","getPosition","extend","zoomChangeBoundsListener","currentZoom","getZoom","setZoom","removeListener","fitBounds","findMapCenterAndZoom","group","destination","type","autocomplete","placeholder","findDirectionsKeyDown","button","findDirections","select","label","getTitle","option","text","prepend","style","display","innerText","DirectionsService","DirectionsRenderer","setupDirections","key","rootElement","attributes","getNamedItem","inputElem","fromAddress","setMap","setPanel","locationSelect","route","origin","travelMode","TravelMode","DRIVING","unitSystem","UnitSystem","IMPERIAL","provideRouteAlternatives","displayDirections","result","DirectionsStatus","OK","setDirections","InitializeMapView","elem","HTMLElement","themePath","theme","PartialQueue","params","abort","method","getResponse","updateViewContent","state","targetElement","scripts","scriptElem","scriptInsert","src","createTextNode","trim","forms","validator","unobtrusive","validate","settings","submitHandler","stateObj","RunQueue","pop","destroy","documentSliders","container","newNodes","childNodes","child","nodeType","Node","ELEMENT_NODE","cloneNode","setInterval","advanceSlider","cleanSlider","first","sliders","PromoSlider","rootElem","siteKey","recaptcha","recaptchaAction","grecaptcha","ready","execute","then","token","recaptchaCallback","tokenElem","SubmitElement","RecaptchaForm","SetActiveStyleSheet","a","getElementsByTagName","relAttr","getAttribute","disabled","cookie","nameEq","ca","split","c","charAt","substring","indexOf","readCookie","getPreferredStyleSheet","sheet","getActiveStyleSheet","days","expires","date","Date","setTime","getTime","toUTCString","createCookie","options","ruleName","rules","message","messages","setDefaults","ignore","addMethod","_value","element","_params","checked","adapters","SetValidationValues","body","on","stopPropagation","prevStatus","hasClass","toggleClass","siblings","root","parentsUntil","find","each","_idx","has","removeClass","popover","jsSocials","showLabel","showCount","shares","modal","newWindow","focus","location","Initialize","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","module","__webpack_modules__","call","m","O","chunkIds","fn","priority","notFulfilled","Infinity","fulfilled","j","Object","keys","every","splice","r","n","getter","__esModule","d","definition","o","defineProperty","enumerable","get","g","globalThis","Function","e","obj","prop","prototype","hasOwnProperty","Symbol","toStringTag","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","id","chunkLoadingGlobal","self","bind","__webpack_exports__"],"sourceRoot":""}