!function e(t,o,n){function i(r,l){if(!o[r]){if(!t[r]){var s="function"==typeof require&&require;if(!l&&s)return s(r,!0);if(a)return a(r,!0);var c=new Error("Cannot find module '"+r+"'");throw c.code="MODULE_NOT_FOUND",c}var d=o[r]={exports:{}};t[r][0].call(d.exports,(function(e){var o=t[r][1][e];return i(o||e)}),d,d.exports,e,t,o,n)}return o[r].exports}for(var a="function"==typeof require&&require,r=0;r<n.length;r++)i(n[r]);return i}({1:[function(e,t,o){!function(e,n){"object"==typeof o&&void 0!==t?t.exports=n():"function"==typeof define&&define.amd?define(n):(e=e||self).dialogPolyfill=n()}(this,(function(){"use strict";var e=window.CustomEvent;function t(e,t){var o="on"+t.type.toLowerCase();return"function"==typeof e[o]&&e[o](t),e.dispatchEvent(t)}function o(e){for(;e;){if("dialog"===e.localName)return e;e=e.parentElement?e.parentElement:e.parentNode?e.parentNode.host:null}return null}function n(e){for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;e&&e.blur&&e!==document.body&&e.blur()}function i(e,t){for(var o=0;o<e.length;++o)if(e[o]===t)return!0;return!1}function a(e){return!(!e||!e.hasAttribute("method"))&&"dialog"===e.getAttribute("method").toLowerCase()}function r(e){var t=["button","input","keygen","select","textarea"].map((function(e){return e+":not([disabled])"}));t.push('[tabindex]:not([disabled]):not([tabindex=""])');var o=e.querySelector(t.join(", "));if(!o&&"attachShadow"in Element.prototype)for(var n=e.querySelectorAll("*"),i=0;i<n.length&&!(n[i].tagName&&n[i].shadowRoot&&(o=r(n[i].shadowRoot)));i++);return o}function l(e){return e.isConnected||document.body.contains(e)}function s(e){if(e.submitter)return e.submitter;var t=e.target;if(!(t instanceof HTMLFormElement))return null;var o=u.formSubmitter;if(!o){var n=e.target;o=("getRootNode"in n&&n.getRootNode()||document).activeElement}return o&&o.form===t?o:null}function c(e){if(!e.defaultPrevented){var t=e.target,n=u.imagemapUseValue,i=s(e);null===n&&i&&(n=i.value);var a=o(t);if(a)"dialog"===(i&&i.getAttribute("formmethod")||t.getAttribute("method"))&&(e.preventDefault(),null!=n?a.close(n):a.close())}}function d(e){if(this.dialog_=e,this.replacedStyleTop_=!1,this.openAsModal_=!1,e.hasAttribute("role")||e.setAttribute("role","dialog"),e.show=this.show.bind(this),e.showModal=this.showModal.bind(this),e.close=this.close.bind(this),e.addEventListener("submit",c,!1),"returnValue"in e||(e.returnValue=""),"MutationObserver"in window){new MutationObserver(this.maybeHideModal.bind(this)).observe(e,{attributes:!0,attributeFilter:["open"]})}else{var t,o=!1,n=function(){o?this.downgradeModal():this.maybeHideModal(),o=!1}.bind(this),i=function(i){if(i.target===e){var a="DOMNodeRemoved";o|=i.type.substr(0,a.length)===a,window.clearTimeout(t),t=window.setTimeout(n,0)}};["DOMAttrModified","DOMNodeRemoved","DOMNodeRemovedFromDocument"].forEach((function(t){e.addEventListener(t,i)}))}Object.defineProperty(e,"open",{set:this.setOpen.bind(this),get:e.hasAttribute.bind(e,"open")}),this.backdrop_=document.createElement("div"),this.backdrop_.className="backdrop",this.backdrop_.addEventListener("mouseup",this.backdropMouseEvent_.bind(this)),this.backdrop_.addEventListener("mousedown",this.backdropMouseEvent_.bind(this)),this.backdrop_.addEventListener("click",this.backdropMouseEvent_.bind(this))}e&&"object"!=typeof e||((e=function(e,t){t=t||{};var o=document.createEvent("CustomEvent");return o.initCustomEvent(e,!!t.bubbles,!!t.cancelable,t.detail||null),o}).prototype=window.Event.prototype),d.prototype={get dialog(){return this.dialog_},maybeHideModal:function(){this.dialog_.hasAttribute("open")&&l(this.dialog_)||this.downgradeModal()},downgradeModal:function(){this.openAsModal_&&(this.openAsModal_=!1,this.dialog_.style.zIndex="",this.replacedStyleTop_&&(this.dialog_.style.top="",this.replacedStyleTop_=!1),this.backdrop_.parentNode&&this.backdrop_.parentNode.removeChild(this.backdrop_),u.dm.removeDialog(this))},setOpen:function(e){e?this.dialog_.hasAttribute("open")||this.dialog_.setAttribute("open",""):(this.dialog_.removeAttribute("open"),this.maybeHideModal())},backdropMouseEvent_:function(e){if(this.dialog_.hasAttribute("tabindex"))this.dialog_.focus();else{var t=document.createElement("div");this.dialog_.insertBefore(t,this.dialog_.firstChild),t.tabIndex=-1,t.focus(),this.dialog_.removeChild(t)}var o=document.createEvent("MouseEvents");o.initMouseEvent(e.type,e.bubbles,e.cancelable,window,e.detail,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget),this.dialog_.dispatchEvent(o),e.stopPropagation()},focus_:function(){var e=this.dialog_.querySelector("[autofocus]:not([disabled])");!e&&this.dialog_.tabIndex>=0&&(e=this.dialog_),e||(e=r(this.dialog_)),n(document.activeElement),e&&e.focus()},updateZIndex:function(e,t){if(e<t)throw new Error("dialogZ should never be < backdropZ");this.dialog_.style.zIndex=e,this.backdrop_.style.zIndex=t},show:function(){this.dialog_.open||(this.setOpen(!0),this.focus_())},showModal:function(){if(this.dialog_.hasAttribute("open"))throw new Error("Failed to execute 'showModal' on dialog: The element is already open, and therefore cannot be opened modally.");if(!l(this.dialog_))throw new Error("Failed to execute 'showModal' on dialog: The element is not in a Document.");if(!u.dm.pushDialog(this))throw new Error("Failed to execute 'showModal' on dialog: There are too many open modal dialogs.");(function(e){for(;e&&e!==document.body;){var t=window.getComputedStyle(e),o=function(e,o){return!(void 0===t[e]||t[e]===o)};if(t.opacity<1||o("zIndex","auto")||o("transform","none")||o("mixBlendMode","normal")||o("filter","none")||o("perspective","none")||"isolate"===t.isolation||"fixed"===t.position||"touch"===t.webkitOverflowScrolling)return!0;e=e.parentElement}return!1})(this.dialog_.parentElement)&&console.warn("A dialog is being shown inside a stacking context. This may cause it to be unusable. For more information, see this link: https://github.com/GoogleChrome/dialog-polyfill/#stacking-context"),this.setOpen(!0),this.openAsModal_=!0,u.needsCentering(this.dialog_)?(u.reposition(this.dialog_),this.replacedStyleTop_=!0):this.replacedStyleTop_=!1,this.dialog_.parentNode.insertBefore(this.backdrop_,this.dialog_.nextSibling),this.focus_()},close:function(o){if(!this.dialog_.hasAttribute("open"))throw new Error("Failed to execute 'close' on dialog: The element does not have an 'open' attribute, and therefore cannot be closed.");this.setOpen(!1),void 0!==o&&(this.dialog_.returnValue=o);var n=new e("close",{bubbles:!1,cancelable:!1});t(this.dialog_,n)}};var u={reposition:function(e){var t=document.body.scrollTop||document.documentElement.scrollTop,o=t+(window.innerHeight-e.offsetHeight)/2;e.style.top=Math.max(t,o)+"px"},isInlinePositionSetByStylesheet:function(e){for(var t=0;t<document.styleSheets.length;++t){var o=document.styleSheets[t],n=null;try{n=o.cssRules}catch(e){}if(n)for(var a=0;a<n.length;++a){var r=n[a],l=null;try{l=document.querySelectorAll(r.selectorText)}catch(e){}if(l&&i(l,e)){var s=r.style.getPropertyValue("top"),c=r.style.getPropertyValue("bottom");if(s&&"auto"!==s||c&&"auto"!==c)return!0}}}return!1},needsCentering:function(e){return"absolute"===window.getComputedStyle(e).position&&(!("auto"!==e.style.top&&""!==e.style.top||"auto"!==e.style.bottom&&""!==e.style.bottom)&&!u.isInlinePositionSetByStylesheet(e))},forceRegisterDialog:function(e){if((window.HTMLDialogElement||e.showModal)&&console.warn("This browser already supports <dialog>, the polyfill may not work correctly",e),"dialog"!==e.localName)throw new Error("Failed to register dialog: The element is not a dialog.");new d(e)},registerDialog:function(e){e.showModal||u.forceRegisterDialog(e)},DialogManager:function(){this.pendingDialogStack=[];var e=this.checkDOM_.bind(this);this.overlay=document.createElement("div"),this.overlay.className="_dialog_overlay",this.overlay.addEventListener("click",function(t){this.forwardTab_=void 0,t.stopPropagation(),e([])}.bind(this)),this.handleKey_=this.handleKey_.bind(this),this.handleFocus_=this.handleFocus_.bind(this),this.zIndexLow_=1e5,this.zIndexHigh_=100150,this.forwardTab_=void 0,"MutationObserver"in window&&(this.mo_=new MutationObserver((function(t){var o=[];t.forEach((function(e){for(var t,n=0;t=e.removedNodes[n];++n)t instanceof Element&&("dialog"===t.localName&&o.push(t),o=o.concat(t.querySelectorAll("dialog")))})),o.length&&e(o)})))}};if(u.DialogManager.prototype.blockDocument=function(){document.documentElement.addEventListener("focus",this.handleFocus_,!0),document.addEventListener("keydown",this.handleKey_),this.mo_&&this.mo_.observe(document,{childList:!0,subtree:!0})},u.DialogManager.prototype.unblockDocument=function(){document.documentElement.removeEventListener("focus",this.handleFocus_,!0),document.removeEventListener("keydown",this.handleKey_),this.mo_&&this.mo_.disconnect()},u.DialogManager.prototype.updateStacking=function(){for(var e,t=this.zIndexHigh_,o=0;e=this.pendingDialogStack[o];++o)e.updateZIndex(--t,--t),0===o&&(this.overlay.style.zIndex=--t);var n=this.pendingDialogStack[0];n?(n.dialog.parentNode||document.body).appendChild(this.overlay):this.overlay.parentNode&&this.overlay.parentNode.removeChild(this.overlay)},u.DialogManager.prototype.containedByTopDialog_=function(e){for(;e=o(e);){for(var t,n=0;t=this.pendingDialogStack[n];++n)if(t.dialog===e)return 0===n;e=e.parentElement}return!1},u.DialogManager.prototype.handleFocus_=function(e){var t=e.composedPath?e.composedPath()[0]:e.target;if(!this.containedByTopDialog_(t)&&document.activeElement!==document.documentElement&&(e.preventDefault(),e.stopPropagation(),n(t),void 0!==this.forwardTab_)){var o=this.pendingDialogStack[0];return o.dialog.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING&&(this.forwardTab_?o.focus_():t!==document.documentElement&&document.documentElement.focus()),!1}},u.DialogManager.prototype.handleKey_=function(o){if(this.forwardTab_=void 0,27===o.keyCode){o.preventDefault(),o.stopPropagation();var n=new e("cancel",{bubbles:!1,cancelable:!0}),i=this.pendingDialogStack[0];i&&t(i.dialog,n)&&i.dialog.close()}else 9===o.keyCode&&(this.forwardTab_=!o.shiftKey)},u.DialogManager.prototype.checkDOM_=function(e){this.pendingDialogStack.slice().forEach((function(t){-1!==e.indexOf(t.dialog)?t.downgradeModal():t.maybeHideModal()}))},u.DialogManager.prototype.pushDialog=function(e){var t=(this.zIndexHigh_-this.zIndexLow_)/2-1;return!(this.pendingDialogStack.length>=t)&&(1===this.pendingDialogStack.unshift(e)&&this.blockDocument(),this.updateStacking(),!0)},u.DialogManager.prototype.removeDialog=function(e){var t=this.pendingDialogStack.indexOf(e);-1!==t&&(this.pendingDialogStack.splice(t,1),0===this.pendingDialogStack.length&&this.unblockDocument(),this.updateStacking())},u.dm=new u.DialogManager,u.formSubmitter=null,u.imagemapUseValue=null,void 0===window.HTMLDialogElement){var f=document.createElement("form");if(f.setAttribute("method","dialog"),"dialog"!==f.method){var h=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"method");if(h){var p=h.get;h.get=function(){return a(this)?"dialog":p.call(this)};var m=h.set;h.set=function(e){return"string"==typeof e&&"dialog"===e.toLowerCase()?this.setAttribute("method",e):m.call(this,e)},Object.defineProperty(HTMLFormElement.prototype,"method",h)}}document.addEventListener("click",(function(e){if(u.formSubmitter=null,u.imagemapUseValue=null,!e.defaultPrevented){var t=e.target;if("composedPath"in e)t=e.composedPath().shift()||t;if(t&&a(t.form)){if(!("submit"===t.type&&["button","input"].indexOf(t.localName)>-1)){if("input"!==t.localName||"image"!==t.type)return;u.imagemapUseValue=e.offsetX+","+e.offsetY}o(t)&&(u.formSubmitter=t)}}}),!1),document.addEventListener("submit",(function(e){var t=e.target;if(!o(t)){var n=s(e);"dialog"===(n&&n.getAttribute("formmethod")||t.getAttribute("method"))&&e.preventDefault()}}));var g=HTMLFormElement.prototype.submit;HTMLFormElement.prototype.submit=function(){if(!a(this))return g.call(this);var e=o(this);e&&e.close()}}return u}))},{}],2:[function(e,t,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.init=function(){document.querySelectorAll(".cookie-banner-modal-button, #cookie-preference-link").forEach((function(e){e.addEventListener("click",(function(e){e.preventDefault(),function(){var e=document.querySelector("#cookie-modal");if(e){var t=e.querySelector("form");!function(e){e.querySelector("input#cookie-modal-functional-cookies").checked=i.functional,e.querySelector("input#cookie-modal-advertising-cookies").checked=i.advertising,e.querySelector("input#cookie-modal-performance-cookies").checked=i.performance}(t),r(t),a(t),e.showModal()}else{var o=encodeURIComponent(window.location.pathname+window.location.search);fetch("/sitebuilder2/user/cookiepreference/modal.htm?returnTo=".concat(o)).then((function(t){t.text().then((function(t){document.querySelector(".cookie-preference-modal-container").innerHTML=t,e=document.querySelector("#cookie-modal"),new n.SiteBuilderDialog(e);var o=e.querySelector("form");r(o),e.querySelector(".cookie-preference-submit").addEventListener("click",(function(){o.submit()})),e.showModal()}))}))}}()}))}));var e=document.querySelector("#cookiePreferenceForm");if(e){var t=e.querySelector(".btn-accept-all");null==t||t.addEventListener("mouseover",(function(){!function(e){e.querySelectorAll(".checkbox:not(.disabled)").forEach((function(e){e.classList.add("ghostTick")}))}(e)})),null==t||t.addEventListener("mouseout",(function(){!function(e){e.querySelectorAll(".checkbox:not(.disabled)").forEach((function(e){e.classList.remove("ghostTick")}))}(e)})),r(e)}};var n=e("../../sitebuilder-dialog/SiteBuilderDialog"),i=null;function a(e){e.querySelectorAll(".checkbox").forEach((function(e){e.querySelector('input[type="checkbox"]').checked?e.classList.add("selected"):e.classList.remove("selected")}))}function r(e){"true"!==e.dataset.initialised&&(e.querySelectorAll('input[type="checkbox"]').forEach((function(t){var o=t.closest(".checkbox"),n=o.classList.contains("disabled")?"fas fa-fw fa-check fa-lg":"far fa-fw fa-check-square fa-2x";t.insertAdjacentHTML("afterend",'<i class="'.concat(n,'" aria-hidden="true"></i><i class="').concat("fal fa-fw fa-square fa-2x",'" aria-hidden="true"></i>')),t.addEventListener("change",(function(){a(e)})),t.addEventListener("focus",(function(){o.classList.add("focused")})),t.addEventListener("blur",(function(){o.classList.remove("focused")}))})),a(e),function(e){null===i&&(i={functional:e.querySelector("input#cookie-modal-functional-cookies").checked,advertising:e.querySelector("input#cookie-modal-advertising-cookies").checked,performance:e.querySelector("input#cookie-modal-performance-cookies").checked})}(e),e.dataset.initialised="true")}},{"../../sitebuilder-dialog/SiteBuilderDialog":5}],3:[function(e,t,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.init=function(){var e=i(),t=!1,o=n();null==o||o.addEventListener("click",(async function(o){o.preventDefault(),t||(await async function(e){var t=await async function(){var e=n().getAttribute("href"),t=await fetch(e);if(!t.ok)return Promise.reject("Could not get page contact email form");return t.text().then((function(e){return a.parseFromString(e,"text/html")})).catch((function(e){return Promise.reject("Could not parse page contact email form: ".concat(e))}))}();e.appendChild(t.body.querySelector("div"));var o=document.createElement("script");o.async=!0,o.src="https://www.google.com/recaptcha/api.js",document.querySelector("head").appendChild(o),l(e)}(e),t=!0),r()}))};var n=function(){return document.getElementById("email-owner-link")},i=function(){return document.getElementById("email-page-owner")},a=new DOMParser;function r(){var e=i();e.classList.contains("hidden")?(e.classList.remove("hidden"),e.scrollIntoView(!0)):e.classList.add("hidden")}function l(e){e.querySelector("#message-submit").addEventListener("click",(function(t){t.preventDefault(),async function(){var e=n().getAttribute("href"),t=fetch(e,{method:"post",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(new FormData(i().querySelector("form")))});i().innerHTML='<i class="fas fa-spinner-third fa-spin" aria-hidden="true"></i> Sending...';var o=await t;return o.ok?o.text().then((function(e){return a.parseFromString(e,"text/html")})).catch((function(e){return Promise.reject("Could not parse response after submitting email page contact form: ".concat(e))})):Promise.reject("Could not submit email page contact form")}().then((function(t){var o;if("Success"===(null===(o=t.body.querySelector("h1"))||void 0===o?void 0:o.innerText))e.innerHTML='<i class="fas fa-check" aria-hidden="true"></i> Sent';else{e.innerHTML="",e.appendChild(t.body.querySelector("div"));var n=e.querySelector("#emailPageOwnerAntiSpam");n&&window.grecaptcha.render(n,n.dataset.sitekey),l(e)}}))})),e.querySelector("#message-cancel").addEventListener("click",(function(e){e.preventDefault(),r()}))}},{}],4:[function(e,t,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.convertIcons=function(e,t){var o=Object.assign({},a,t);r("x","i.fa-twitter,em.fa-twitter",e,o),r("x-square","i.fa-twitter-square,em.fa-twitter-square",e,o)};var n={x:'\n    <svg class="fa-x" viewBox="0 0 1200 1227" aria-hidden="true">\n    <path id="p" d="M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z" fill="currentColor"/>\n    </svg>\n    '.trim(),"x-square":'\n    <svg class="fa-x-square" viewBox="0 0 512 512" aria-hidden="true">\n    <path id="p" fill="currentColor" d="M 64,0 A 64,64 0 0 0 0,64 v 384 a 64,64 0 0 0 64,64 h 384 a 64,64 0 0 0 64,-64 V 64 A 64,64 0 0 0 448,0 Z m 9.427734,77.443359 H 180.96875 L 274.20703,213.13867 390.94531,77.443359 h 31.85938 L 288.35938,233.72461 h -0.008 L 434.57422,446.52539 H 327.03516 L 228.56836,303.22461 105.28906,446.52539 H 73.427734 L 214.42383,282.64062 Z m 43.341796,23.984371 113.66602,162.58789 14.28515,20.43165 v 0.008 l 97.30274,139.17578 h 48.93554 L 271.7207,253.07422 257.43555,232.64062 165.70508,101.42773 Z"></path>\n    </svg>\n    '.trim()},i=["fa-stack-1x","fa-stack-2x","fa-inverse","fa-fw","fa-2x","fa-3x","fa-4x","fa-5x","fa-flip-vertical","fa-flip-horizontal","fa-rotate-90","fa-rotate-180","fa-rotate-270","fa"],a={keepOriginal:!1};function r(e,t,o,a){o.querySelectorAll(t).forEach((function(t){if(!a.keepOriginal||!t.dataset.xCloned){var o=function(e){var t=document.createElement("div");return t.innerHTML=n[e],t.querySelector("svg")}(e).cloneNode(!0);i.forEach((function(e){t.classList.contains(e)&&o.classList.add(e)})),a.keepOriginal?(t.dataset.xCloned="true",t.classList.add("hidden"),t.insertAdjacentElement("afterend",o)):t.replaceWith(o)}}))}},{}],5:[function(e,t,o){(function(t){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.SiteBuilderDialog=void 0;var n=a(e("dialog-polyfill")),i=a("undefined"!=typeof window?window.jQuery:void 0!==t?t.jQuery:null);function a(e){return e&&e.__esModule?e:{default:e}}function r(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function l(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}var s=function(){function e(t){var o,i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),l(this,"dialogElement",void 0),l(this,"mutationObserver",void 0),l(this,"focusableElements",void 0),this.dialogElement=t,e.isAlreadyRegistered(t)||("BODY"!==this.dialogElement.parentElement.tagName&&document.body.appendChild(this.dialogElement),n.default.registerDialog(t),this.updateFocusableElements(),this.mutationObserver=new MutationObserver((function(){i.updateFocusableElements()})),this.mutationObserver.observe(t,{subtree:!0,childList:!0,attributes:!0}),t.addEventListener("click",(function(e){void 0!==e.composedPath().find((function(e){var t;return e&&(null===(t=e.classList)||void 0===t?void 0:t.contains("dialog-close"))}))&&i.close()})),t.addEventListener("keydown",(function(e){if("Esc"!==e.key&&"Escape"!==e.key||i.close(),"Tab"===e.key){var t;e.preventDefault(),i.focusableElements&&0!==i.focusableElements.length||i.updateFocusableElements();var o=i.focusableElements,n=null!==(t=o.findIndex((function(e){return e===document.activeElement})))&&void 0!==t?t:0;e.shiftKey?0===n?o[o.length-1].focus():o[n-1].focus():n===o.length-1?o[0].focus():o[n+1].focus()}})),""!==(null===(o=this.dialogElement.id)||void 0===o?void 0:o.trim())&&document.querySelectorAll('button[aria-controls="'.concat(this.dialogElement.id,'"], a[aria-controls="').concat(this.dialogElement.id,'"]')).forEach((function(e){e.addEventListener("click",(function(e){e.preventDefault(),i.open()}))})),this.handleDatePickers(),this.dialogElement.dataset.registeredDialog="true")}var t,o,a;return t=e,a=[{key:"isAlreadyRegistered",value:function(e){var t;return"true"===(null==e||null===(t=e.dataset)||void 0===t?void 0:t.registeredDialog)}},{key:"registerAllDialogsInDOM",value:function(){document.querySelectorAll("dialog").forEach((function(t){e.isAlreadyRegistered(t)||new e(t)}))}},{key:"updateDialogTriggers",value:function(){document.querySelectorAll("button[aria-controls], a[aria-controls]").forEach((function(e){var t=e.getAttribute("aria-controls"),o=document.querySelector("dialog#".concat(t));o&&e.addEventListener("click",(function(){o.showModal()}))}))}},{key:"blankDialog",value:function(e){var t,o,n="\n      <dialog".concat(e.dialogId?' id="'.concat(e.dialogId,'"'):"").concat(e.dialogClasses?' class="'.concat(e.dialogClasses,'"'):"",'>\n        <div class="dialog-content">\n          <div class="dialog-header">\n            <h2 class="dialog-title">').concat(null!==(t=null==e?void 0:e.title)&&void 0!==t?t:"","</h2>\n            ").concat(null!=e&&e.hideCloseButtonInHeader?"":'\n    <div class="dialog-header-buttons">\n        <button type="button" class="dialog-close" title="Close"><i class="far fa-times fa-2x" aria-hidden="true"></i></button>\n    </div>','\n          </div>\n          <div class="dialog-body">\n            ').concat(null!==(o=null==e?void 0:e.content)&&void 0!==o?o:"",'\n          </div>\n          <div class="dialog-footer">\n            ').concat(null!=e&&e.hideCloseButtonInFooter?"":'<button type="button" class="btn btn-default dialog-close">Cancel</button>',"\n          </div>\n        </div>\n      </dialog>\n    ");return(new DOMParser).parseFromString(n,"text/html").querySelector("dialog")}}],(o=[{key:"updateFocusableElements",value:function(){this.focusableElements=Array.from(this.dialogElement.querySelectorAll('a:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), input[type="button"]:not([disabled]), select:not([disabled])')).filter((function(e){return null!==e.offsetParent&&(e.childNodes.length>0||"A"!==e.tagName)}))}},{key:"handleDatePickers",value:function(){var e=this;(0,i.default)(this.dialogElement).on("ab.datepicker.opened",(function(t){var o=t.target,n=e.dialogElement.querySelector("#".concat(o.getAttribute("aria-controls")));e.dialogElement.appendChild(o);var i=n.getBoundingClientRect(),a=e.dialogElement.getBoundingClientRect();if(o.style.left="".concat(i.left-a.left,"px"),o.classList.contains("above")){var r=i.top-a.top-o.clientHeight,l=Math.max(-a.top,r);o.style.top="".concat(l,"px")}else{var s=window.innerHeight-a.top-o.clientHeight,c=i.bottom-a.top,d=Math.min(s,c);o.style.top="".concat(d,"px")}}))}},{key:"open",value:function(){this.dialogElement.hasAttribute("open")||this.dialogElement.showModal()}},{key:"close",value:function(){this.dialogElement.close()}},{key:"delete",value:function(){this.mutationObserver.disconnect(),this.dialogElement.remove()}}])&&r(t.prototype,o),a&&r(t,a),Object.defineProperty(t,"prototype",{writable:!1}),e}();o.SiteBuilderDialog=s}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"dialog-polyfill":1}],6:[function(e,t,o){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=e("./sitebuilder-dialog/SiteBuilderDialog"),a=c(e("./render/scripts/emailPageOwner-id7")),r=c(e("./render/scripts/twitter-to-x")),l=c(e("./render/scripts/cookie-preference"));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(s=function(e){return e?o:t})(e)}function c(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var o=s(t);if(o&&o.has(e))return o.get(e);var i={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var l=a?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(i,r,l):i[r]=e[r]}return i.default=e,o&&o.set(e,i),i}window.SiteBuilderDialog=i.SiteBuilderDialog,window.addEventListener("DOMContentLoaded",(function(){i.SiteBuilderDialog.registerAllDialogsInDOM(),a.init(),r.convertIcons(document.body),l.init()}))},{"./render/scripts/cookie-preference":2,"./render/scripts/emailPageOwner-id7":3,"./render/scripts/twitter-to-x":4,"./sitebuilder-dialog/SiteBuilderDialog":5}]},{},[6]);
//# sourceMappingURL=sitebuilder.js.map
