window.jsDataLayerErrors=[],window.addEventListener("error",(function(e){jsDataLayerErrors.push(e.message),"undefined"!=typeof digitalData&&digitalData.page&&(digitalData.page.javascriptErrors=jsDataLayerErrors)})),function(){var e,t,n,r,o={8527:function(e,t,n){"use strict";n.d(t,{Z:function(){return O}});var r=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],o={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:"object"==typeof window&&-1===window.navigator.userAgent.indexOf("MSIE"),ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(e){return"undefined"!=typeof console&&console.warn(e)},getWeek:function(e){var t=new Date(e.getTime());t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7);var n=new Date(t.getFullYear(),0,4);return 1+Math.round(((t.getTime()-n.getTime())/864e5-3+(n.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},a={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},i=a,s=function(e,t){return void 0===t&&(t=2),("000"+e).slice(-1*t)},c=function(e){return!0===e?1:0};function l(e,t){var n;return function(){var r=this,o=arguments;clearTimeout(n),n=setTimeout((function(){return e.apply(r,o)}),t)}}var u=function(e){return e instanceof Array?e:[e]};function d(e,t,n){if(!0===n)return e.classList.add(t);e.classList.remove(t)}function p(e,t,n){var r=window.document.createElement(e);return t=t||"",n=n||"",r.className=t,void 0!==n&&(r.textContent=n),r}function m(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function f(e,t){return t(e)?e:e.parentNode?f(e.parentNode,t):void 0}function h(e,t){var n=p("div","numInputWrapper"),r=p("input","numInput "+e),o=p("span","arrowUp"),a=p("span","arrowDown");if(-1===navigator.userAgent.indexOf("MSIE 9.0")?r.type="number":(r.type="text",r.pattern="\\d*"),void 0!==t)for(var i in t)r.setAttribute(i,t[i]);return n.appendChild(r),n.appendChild(o),n.appendChild(a),n}function g(e){try{return"function"==typeof e.composedPath?e.composedPath()[0]:e.target}catch(t){return e.target}}var y=function(){},v=function(e,t,n){return n.months[t?"shorthand":"longhand"][e]},b={D:y,F:function(e,t,n){e.setMonth(n.months.longhand.indexOf(t))},G:function(e,t){e.setHours((e.getHours()>=12?12:0)+parseFloat(t))},H:function(e,t){e.setHours(parseFloat(t))},J:function(e,t){e.setDate(parseFloat(t))},K:function(e,t,n){e.setHours(e.getHours()%12+12*c(new RegExp(n.amPM[1],"i").test(t)))},M:function(e,t,n){e.setMonth(n.months.shorthand.indexOf(t))},S:function(e,t){e.setSeconds(parseFloat(t))},U:function(e,t){return new Date(1e3*parseFloat(t))},W:function(e,t,n){var r=parseInt(t),o=new Date(e.getFullYear(),0,2+7*(r-1),0,0,0,0);return o.setDate(o.getDate()-o.getDay()+n.firstDayOfWeek),o},Y:function(e,t){e.setFullYear(parseFloat(t))},Z:function(e,t){return new Date(t)},d:function(e,t){e.setDate(parseFloat(t))},h:function(e,t){e.setHours((e.getHours()>=12?12:0)+parseFloat(t))},i:function(e,t){e.setMinutes(parseFloat(t))},j:function(e,t){e.setDate(parseFloat(t))},l:y,m:function(e,t){e.setMonth(parseFloat(t)-1)},n:function(e,t){e.setMonth(parseFloat(t)-1)},s:function(e,t){e.setSeconds(parseFloat(t))},u:function(e,t){return new Date(parseFloat(t))},w:y,y:function(e,t){e.setFullYear(2e3+parseFloat(t))}},_={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},S={Z:function(e){return e.toISOString()},D:function(e,t,n){return t.weekdays.shorthand[S.w(e,t,n)]},F:function(e,t,n){return v(S.n(e,t,n)-1,!1,t)},G:function(e,t,n){return s(S.h(e,t,n))},H:function(e){return s(e.getHours())},J:function(e,t){return void 0!==t.ordinal?e.getDate()+t.ordinal(e.getDate()):e.getDate()},K:function(e,t){return t.amPM[c(e.getHours()>11)]},M:function(e,t){return v(e.getMonth(),!0,t)},S:function(e){return s(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return s(e.getFullYear(),4)},d:function(e){return s(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return s(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(e){return s(e.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},u:function(e){return e.getTime()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},w=function(e){var t=e.config,n=void 0===t?o:t,r=e.l10n,i=void 0===r?a:r,s=e.isMobile,c=void 0!==s&&s;return function(e,t,r){var o=r||i;return void 0===n.formatDate||c?t.split("").map((function(t,r,a){return S[t]&&"\\"!==a[r-1]?S[t](e,o,n):"\\"!==t?t:""})).join(""):n.formatDate(e,t,o)}},E=function(e){var t=e.config,n=void 0===t?o:t,r=e.l10n,i=void 0===r?a:r;return function(e,t,r,a){if(0===e||e){var s,c=a||i,l=e;if(e instanceof Date)s=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)s=new Date(e);else if("string"==typeof e){var u=t||(n||o).dateFormat,d=String(e).trim();if("today"===d)s=new Date,r=!0;else if(n&&n.parseDate)s=n.parseDate(e,u);else if(/Z$/.test(d)||/GMT$/.test(d))s=new Date(e);else{for(var p=void 0,m=[],f=0,h=0,g="";fMath.min(t,n)&&e=0?new Date:new Date(n.config.minDate.getTime()),r=q(n.config);t.setHours(r.hours,r.minutes,r.seconds,t.getMilliseconds()),n.selectedDates=[t],n.latestSelectedDateObj=t}void 0!==e&&"blur"!==e.type&&function(e){e.preventDefault();var t="keydown"===e.type,r=g(e),o=r;void 0!==n.amPM&&r===n.amPM&&(n.amPM.textContent=n.l10n.amPM[c(n.amPM.textContent===n.l10n.amPM[0])]);var a=parseFloat(o.getAttribute("min")),i=parseFloat(o.getAttribute("max")),l=parseFloat(o.getAttribute("step")),u=parseInt(o.value,10),d=e.delta||(t?38===e.which?1:-1:0),p=u+l*d;if(void 0!==o.value&&2===o.value.length){var m=o===n.hourElement,f=o===n.minuteElement;pi&&(p=o===n.hourElement?p-i-c(!n.amPM):a,f&&R(void 0,1,n.hourElement)),n.amPM&&m&&(1===l?p+u===23:Math.abs(p-u)>l)&&(n.amPM.textContent=n.l10n.amPM[c(n.amPM.textContent===n.l10n.amPM[0])]),o.value=s(p)}}(e);var o=n._input.value;T(),Ae(),n._input.value!==o&&n._debouncedChange()}function T(){if(void 0!==n.hourElement&&void 0!==n.minuteElement){var e,t,r=(parseInt(n.hourElement.value.slice(-2),10)||0)%24,o=(parseInt(n.minuteElement.value,10)||0)%60,a=void 0!==n.secondElement?(parseInt(n.secondElement.value,10)||0)%60:0;void 0!==n.amPM&&(e=r,t=n.amPM.textContent,r=e%12+12*c(t===n.l10n.amPM[1]));var i=void 0!==n.config.minTime||n.config.minDate&&n.minDateHasTime&&n.latestSelectedDateObj&&0===x(n.latestSelectedDateObj,n.config.minDate,!0),s=void 0!==n.config.maxTime||n.config.maxDate&&n.maxDateHasTime&&n.latestSelectedDateObj&&0===x(n.latestSelectedDateObj,n.config.maxDate,!0);if(void 0!==n.config.maxTime&&void 0!==n.config.minTime&&n.config.minTime>n.config.maxTime){var l=A(n.config.minTime.getHours(),n.config.minTime.getMinutes(),n.config.minTime.getSeconds()),u=A(n.config.maxTime.getHours(),n.config.maxTime.getMinutes(),n.config.maxTime.getSeconds()),d=A(r,o,a);if(d>u&&d=12)]),void 0!==n.secondElement&&(n.secondElement.value=s(r)))}function B(e){var t=g(e),n=parseInt(t.value)+(e.delta||0);(n/1e3>1||"Enter"===e.key&&!/[^\d]/.test(n.toString()))&&re(n)}function H(e,t,r,o){return t instanceof Array?t.forEach((function(t){return H(e,t,r,o)})):e instanceof Array?e.forEach((function(e){return H(e,t,r,o)})):(e.addEventListener(t,r,o),void n._handlers.push({remove:function(){return e.removeEventListener(t,r,o)}}))}function F(){Se("onChange")}function j(e,t){var r=void 0!==e?n.parseDate(e):n.latestSelectedDateObj||(n.config.minDate&&n.config.minDate>n.now?n.config.minDate:n.config.maxDate&&n.config.maxDate=0&&x(e,n.selectedDates[1])<=0)}(t)&&!Ee(t)&&i.classList.add("inRange"),n.weekNumbers&&1===n.config.showMonths&&"prevMonthDay"!==e&&o%7==6&&n.weekNumbers.insertAdjacentHTML("beforeend",""+n.config.getWeek(t)+""),Se("onDayCreate",i),i}function W(e){e.focus(),"range"===n.config.mode&&ce(e)}function U(e){for(var t=e>0?0:n.config.showMonths-1,r=e>0?n.config.showMonths:-1,o=t;o!=r;o+=e)for(var a=n.daysContainer.children[o],i=e>0?0:a.children.length-1,s=e>0?a.children.length:-1,c=i;c!=s;c+=e){var l=a.children[c];if(-1===l.className.indexOf("hidden")&&oe(l.dateObj))return l}}function Y(e,t){var r=a(),o=ae(r||document.body),i=void 0!==e?e:o?r:void 0!==n.selectedDateElem&&ae(n.selectedDateElem)?n.selectedDateElem:void 0!==n.todayDateElem&&ae(n.todayDateElem)?n.todayDateElem:U(t>0?1:-1);void 0===i?n._input.focus():o?function(e,t){for(var r=-1===e.className.indexOf("Month")?e.dateObj.getMonth():n.currentMonth,o=t>0?n.config.showMonths:-1,a=t>0?1:-1,i=r-n.currentMonth;i!=o;i+=a)for(var s=n.daysContainer.children[i],c=r-n.currentMonth===i?e.$i+t:t<0?s.children.length-1:0,l=s.children.length,u=c;u>=0&&u0?l:-1);u+=a){var d=s.children[u];if(-1===d.className.indexOf("hidden")&&oe(d.dateObj)&&Math.abs(e.$i-u)>=Math.abs(t))return W(d)}n.changeMonth(a),Y(U(a),0)}(i,t):W(i)}function z(e,t){for(var r=(new Date(e,t,1).getDay()-n.l10n.firstDayOfWeek+7)%7,o=n.utils.getDaysInMonth((t-1+12)%12,e),a=n.utils.getDaysInMonth(t,e),i=window.document.createDocumentFragment(),s=n.config.showMonths>1,c=s?"prevMonthDay hidden":"prevMonthDay",l=s?"nextMonthDay hidden":"nextMonthDay",u=o+1-r,d=0;u<=o;u++,d++)i.appendChild(V("flatpickr-day "+c,new Date(e,t-1,u),0,d));for(u=1;u<=a;u++,d++)i.appendChild(V("flatpickr-day",new Date(e,t,u),0,d));for(var m=a+1;m<=42-r&&(1===n.config.showMonths||d%7!=0);m++,d++)i.appendChild(V("flatpickr-day "+l,new Date(e,t+1,m%a),0,d));var f=p("div","dayContainer");return f.appendChild(i),f}function G(){if(void 0!==n.daysContainer){m(n.daysContainer),n.weekNumbers&&m(n.weekNumbers);for(var e=document.createDocumentFragment(),t=0;t1||"dropdown"!==n.config.monthSelectorType)){var e=function(e){return!(void 0!==n.config.minDate&&n.currentYear===n.config.minDate.getFullYear()&&en.config.maxDate.getMonth())};n.monthsDropdownContainer.tabIndex=-1,n.monthsDropdownContainer.innerHTML="";for(var t=0;t<12;t++)if(e(t)){var r=p("option","flatpickr-monthDropdown-month");r.value=new Date(n.currentYear,t).getMonth().toString(),r.textContent=v(t,n.config.shorthandCurrentMonth,n.l10n),r.tabIndex=-1,n.currentMonth===t&&(r.selected=!0),n.monthsDropdownContainer.appendChild(r)}}}function K(){var e,t=p("div","flatpickr-month"),r=window.document.createDocumentFragment();n.config.showMonths>1||"static"===n.config.monthSelectorType?e=p("span","cur-month"):(n.monthsDropdownContainer=p("select","flatpickr-monthDropdown-months"),n.monthsDropdownContainer.setAttribute("aria-label",n.l10n.monthAriaLabel),H(n.monthsDropdownContainer,"change",(function(e){var t=g(e),r=parseInt(t.value,10);n.changeMonth(r-n.currentMonth),Se("onMonthChange")})),J(),e=n.monthsDropdownContainer);var o=h("cur-year",{tabindex:"-1"}),a=o.getElementsByTagName("input")[0];a.setAttribute("aria-label",n.l10n.yearAriaLabel),n.config.minDate&&a.setAttribute("min",n.config.minDate.getFullYear().toString()),n.config.maxDate&&(a.setAttribute("max",n.config.maxDate.getFullYear().toString()),a.disabled=!!n.config.minDate&&n.config.minDate.getFullYear()===n.config.maxDate.getFullYear());var i=p("div","flatpickr-current-month");return i.appendChild(e),i.appendChild(o),r.appendChild(i),t.appendChild(r),{container:t,yearElement:a,monthElement:e}}function Z(){m(n.monthNav),n.monthNav.appendChild(n.prevMonthNav),n.config.showMonths&&(n.yearElements=[],n.monthElements=[]);for(var e=n.config.showMonths;e--;){var t=K();n.yearElements.push(t.yearElement),n.monthElements.push(t.monthElement),n.monthNav.appendChild(t.container)}n.monthNav.appendChild(n.nextMonthNav)}function X(){n.weekdayContainer?m(n.weekdayContainer):n.weekdayContainer=p("div","flatpickr-weekdays");for(var e=n.config.showMonths;e--;){var t=p("div","flatpickr-weekdaycontainer");n.weekdayContainer.appendChild(t)}return Q(),n.weekdayContainer}function Q(){if(n.weekdayContainer){var e=n.l10n.firstDayOfWeek,t=M(n.l10n.weekdays.shorthand);e>0&&e\n "+t.join("")+"\n \n "}}function ee(e,t){void 0===t&&(t=!0);var r=t?e:e-n.currentMonth;r<0&&!0===n._hidePrevMonthArrow||r>0&&!0===n._hideNextMonthArrow||(n.currentMonth+=r,(n.currentMonth<0||n.currentMonth>11)&&(n.currentYear+=n.currentMonth>11?1:-1,n.currentMonth=(n.currentMonth+12)%12,Se("onYearChange"),J()),G(),Se("onMonthChange"),xe())}function te(e){return n.calendarContainer.contains(e)}function ne(e){if(n.isOpen&&!n.config.inline){var t=g(e),r=te(t),o=!(t===n.input||t===n.altInput||n.element.contains(t)||e.path&&e.path.indexOf&&(~e.path.indexOf(n.input)||~e.path.indexOf(n.altInput)))&&!r&&!te(e.relatedTarget),a=!n.config.ignoredFocusElements.some((function(e){return e.contains(t)}));o&&a&&(n.config.allowInput&&n.setDate(n._input.value,!1,n.config.altInput?n.config.altFormat:n.config.dateFormat),void 0!==n.timeContainer&&void 0!==n.minuteElement&&void 0!==n.hourElement&&""!==n.input.value&&void 0!==n.input.value&&S(),n.close(),n.config&&"range"===n.config.mode&&1===n.selectedDates.length&&n.clear(!1))}}function re(e){if(!(!e||n.config.minDate&&en.config.maxDate.getFullYear())){var t=e,r=n.currentYear!==t;n.currentYear=t||n.currentYear,n.config.maxDate&&n.currentYear===n.config.maxDate.getFullYear()?n.currentMonth=Math.min(n.config.maxDate.getMonth(),n.currentMonth):n.config.minDate&&n.currentYear===n.config.minDate.getFullYear()&&(n.currentMonth=Math.max(n.config.minDate.getMonth(),n.currentMonth)),r&&(n.redraw(),Se("onYearChange"),J())}}function oe(e,t){var r;void 0===t&&(t=!0);var o=n.parseDate(e,void 0,t);if(n.config.minDate&&o&&x(o,n.config.minDate,void 0!==t?t:!n.minDateHasTime)<0||n.config.maxDate&&o&&x(o,n.config.maxDate,void 0!==t?t:!n.maxDateHasTime)>0)return!1;if(!n.config.enable&&0===n.config.disable.length)return!0;if(void 0===o)return!1;for(var a=!!n.config.enable,i=null!==(r=n.config.enable)&&void 0!==r?r:n.config.disable,s=0,c=void 0;s=c.from.getTime()&&o.getTime()<=c.to.getTime())return a}return!a}function ae(e){return void 0!==n.daysContainer&&(-1===e.className.indexOf("hidden")&&-1===e.className.indexOf("flatpickr-disabled")&&n.daysContainer.contains(e))}function ie(e){var t=e.target===n._input,r=n._input.value.trimEnd()!==ke();!t||!r||e.relatedTarget&&te(e.relatedTarget)||n.setDate(n._input.value,!0,e.target===n.altInput?n.config.altFormat:n.config.dateFormat)}function se(t){var r=g(t),o=n.config.wrap?e.contains(r):r===n._input,i=n.config.allowInput,s=n.isOpen&&(!i||!o),c=n.config.inline&&o&&!i;if(13===t.keyCode&&o){if(i)return n.setDate(n._input.value,!0,r===n.altInput?n.config.altFormat:n.config.dateFormat),n.close(),r.blur();n.open()}else if(te(r)||s||c){var l=!!n.timeContainer&&n.timeContainer.contains(r);switch(t.keyCode){case 13:l?(t.preventDefault(),S(),he()):ge(t);break;case 27:t.preventDefault(),he();break;case 8:case 46:o&&!n.config.allowInput&&(t.preventDefault(),n.clear());break;case 37:case 39:if(l||o)n.hourElement&&n.hourElement.focus();else{t.preventDefault();var u=a();if(void 0!==n.daysContainer&&(!1===i||u&&ae(u))){var d=39===t.keyCode?1:-1;t.ctrlKey?(t.stopPropagation(),ee(d),Y(U(1),0)):Y(void 0,d)}}break;case 38:case 40:t.preventDefault();var p=40===t.keyCode?1:-1;n.daysContainer&&void 0!==r.$i||r===n.input||r===n.altInput?t.ctrlKey?(t.stopPropagation(),re(n.currentYear-p),Y(U(1),0)):l||Y(void 0,7*p):r===n.currentYearElement?re(n.currentYear-p):n.config.enableTime&&(!l&&n.hourElement&&n.hourElement.focus(),S(t),n._debouncedChange());break;case 9:if(l){var m=[n.hourElement,n.minuteElement,n.secondElement,n.amPM].concat(n.pluginElements).filter((function(e){return e})),f=m.indexOf(r);if(-1!==f){var h=m[f+(t.shiftKey?-1:1)];t.preventDefault(),(h||n._input).focus()}}else!n.config.noCalendar&&n.daysContainer&&n.daysContainer.contains(r)&&t.shiftKey&&(t.preventDefault(),n._input.focus())}}if(void 0!==n.amPM&&r===n.amPM)switch(t.key){case n.l10n.amPM[0].charAt(0):case n.l10n.amPM[0].charAt(0).toLowerCase():n.amPM.textContent=n.l10n.amPM[0],T(),Ae();break;case n.l10n.amPM[1].charAt(0):case n.l10n.amPM[1].charAt(0).toLowerCase():n.amPM.textContent=n.l10n.amPM[1],T(),Ae()}(o||te(r))&&Se("onKeyDown",t)}function ce(e,t){if(void 0===t&&(t="flatpickr-day"),1===n.selectedDates.length&&(!e||e.classList.contains(t)&&!e.classList.contains("flatpickr-disabled"))){for(var r=e?e.dateObj.getTime():n.days.firstElementChild.dateObj.getTime(),o=n.parseDate(n.selectedDates[0],void 0,!0).getTime(),a=Math.min(r,n.selectedDates[0].getTime()),i=Math.max(r,n.selectedDates[0].getTime()),s=!1,c=0,l=0,u=a;ua&&uc)?c=u:u>o&&(!l||u ."+t)).forEach((function(t){var a=t.dateObj.getTime(),i=c>0&&a0&&a>l;if(i)return t.classList.add("notAllowed"),void["inRange","startRange","endRange"].forEach((function(e){t.classList.remove(e)}));s&&!i||(["startRange","inRange","endRange","notAllowed"].forEach((function(e){t.classList.remove(e)})),void 0!==e&&(e.classList.add(r<=n.selectedDates[0].getTime()?"startRange":"endRange"),or&&a===o&&t.classList.add("endRange"),a>=c&&(0===l||a<=l)&&k(a,o,r)&&t.classList.add("inRange")))}))}}function le(){!n.isOpen||n.config.static||n.config.inline||me()}function ue(e){return function(t){var r=n.config["_"+e+"Date"]=n.parseDate(t,n.config.dateFormat),o=n.config["_"+("min"===e?"max":"min")+"Date"];void 0!==r&&(n["min"===e?"minDateHasTime":"maxDateHasTime"]=r.getHours()>0||r.getMinutes()>0||r.getSeconds()>0),n.selectedDates&&(n.selectedDates=n.selectedDates.filter((function(e){return oe(e)})),n.selectedDates.length||"min"!==e||P(r),Ae()),n.daysContainer&&(fe(),void 0!==r?n.currentYearElement[e]=r.getFullYear().toString():n.currentYearElement.removeAttribute(e),n.currentYearElement.disabled=!!o&&void 0!==r&&o.getFullYear()===r.getFullYear())}}function de(){return n.config.wrap?e.querySelector("[data-input]"):e}function pe(){"object"!=typeof n.config.locale&&void 0===N.l10ns[n.config.locale]&&n.config.errorHandler(new Error("flatpickr: invalid locale "+n.config.locale)),n.l10n=D(D({},N.l10ns.default),"object"==typeof n.config.locale?n.config.locale:"default"!==n.config.locale?N.l10ns[n.config.locale]:void 0),_.D="("+n.l10n.weekdays.shorthand.join("|")+")",_.l="("+n.l10n.weekdays.longhand.join("|")+")",_.M="("+n.l10n.months.shorthand.join("|")+")",_.F="("+n.l10n.months.longhand.join("|")+")",_.K="("+n.l10n.amPM[0]+"|"+n.l10n.amPM[1]+"|"+n.l10n.amPM[0].toLowerCase()+"|"+n.l10n.amPM[1].toLowerCase()+")",void 0===D(D({},t),JSON.parse(JSON.stringify(e.dataset||{}))).time_24hr&&void 0===N.defaultConfig.time_24hr&&(n.config.time_24hr=n.l10n.time_24hr),n.formatDate=w(n),n.parseDate=E({config:n.config,l10n:n.l10n})}function me(e){if("function"!=typeof n.config.position){if(void 0!==n.calendarContainer){Se("onPreCalendarPosition");var t=e||n._positionElement,r=Array.prototype.reduce.call(n.calendarContainer.children,(function(e,t){return e+t.offsetHeight}),0),o=n.calendarContainer.offsetWidth,a=n.config.position.split(" "),i=a[0],s=a.length>1?a[1]:null,c=t.getBoundingClientRect(),l=window.innerHeight-c.bottom,u="above"===i||"below"!==i&&lr,p=window.pageYOffset+c.top+(u?-r-2:t.offsetHeight+2);if(d(n.calendarContainer,"arrowTop",!u),d(n.calendarContainer,"arrowBottom",u),!n.config.inline){var m=window.pageXOffset+c.left,f=!1,h=!1;"center"===s?(m-=(o-c.width)/2,f=!0):"right"===s&&(m-=o-c.width,h=!0),d(n.calendarContainer,"arrowLeft",!f&&!h),d(n.calendarContainer,"arrowCenter",f),d(n.calendarContainer,"arrowRight",h);var g=window.document.body.offsetWidth-(window.pageXOffset+c.right),y=m+o>window.document.body.offsetWidth,v=g+o>window.document.body.offsetWidth;if(d(n.calendarContainer,"rightMost",y),!n.config.static)if(n.calendarContainer.style.top=p+"px",y)if(v){var b=function(){for(var e=null,t=0;tn.currentMonth+n.config.showMonths-1)&&"range"!==n.config.mode;if(n.selectedDateElem=r,"single"===n.config.mode)n.selectedDates=[o];else if("multiple"===n.config.mode){var i=Ee(o);i?n.selectedDates.splice(parseInt(i),1):n.selectedDates.push(o)}else"range"===n.config.mode&&(2===n.selectedDates.length&&n.clear(!1,!1),n.latestSelectedDateObj=o,n.selectedDates.push(o),0!==x(o,n.selectedDates[0],!0)&&n.selectedDates.sort((function(e,t){return e.getTime()-t.getTime()})));if(T(),a){var s=n.currentYear!==o.getFullYear();n.currentYear=o.getFullYear(),n.currentMonth=o.getMonth(),s&&(Se("onYearChange"),J()),Se("onMonthChange")}if(xe(),G(),Ae(),a||"range"===n.config.mode||1!==n.config.showMonths?void 0!==n.selectedDateElem&&void 0===n.hourElement&&n.selectedDateElem&&n.selectedDateElem.focus():W(r),void 0!==n.hourElement&&void 0!==n.hourElement&&n.hourElement.focus(),n.config.closeOnSelect){var c="single"===n.config.mode&&!n.config.enableTime,l="range"===n.config.mode&&2===n.selectedDates.length&&!n.config.enableTime;(c||l)&&he()}F()}}n.parseDate=E({config:n.config,l10n:n.l10n}),n._handlers=[],n.pluginElements=[],n.loadedPlugins=[],n._bind=H,n._setHoursFromDate=P,n._positionCalendar=me,n.changeMonth=ee,n.changeYear=re,n.clear=function(e,t){void 0===e&&(e=!0);void 0===t&&(t=!0);n.input.value="",void 0!==n.altInput&&(n.altInput.value="");void 0!==n.mobileInput&&(n.mobileInput.value="");n.selectedDates=[],n.latestSelectedDateObj=void 0,!0===t&&(n.currentYear=n._initialDate.getFullYear(),n.currentMonth=n._initialDate.getMonth());if(!0===n.config.enableTime){var r=q(n.config);O(r.hours,r.minutes,r.seconds)}n.redraw(),e&&Se("onChange")},n.close=function(){n.isOpen=!1,n.isMobile||(void 0!==n.calendarContainer&&n.calendarContainer.classList.remove("open"),void 0!==n._input&&n._input.classList.remove("active"));Se("onClose")},n.onMouseOver=ce,n._createElement=p,n.createDay=V,n.destroy=function(){void 0!==n.config&&Se("onDestroy");for(var e=n._handlers.length;e--;)n._handlers[e].remove();if(n._handlers=[],n.mobileInput)n.mobileInput.parentNode&&n.mobileInput.parentNode.removeChild(n.mobileInput),n.mobileInput=void 0;else if(n.calendarContainer&&n.calendarContainer.parentNode)if(n.config.static&&n.calendarContainer.parentNode){var t=n.calendarContainer.parentNode;if(t.lastChild&&t.removeChild(t.lastChild),t.parentNode){for(;t.firstChild;)t.parentNode.insertBefore(t.firstChild,t);t.parentNode.removeChild(t)}}else n.calendarContainer.parentNode.removeChild(n.calendarContainer);n.altInput&&(n.input.type="text",n.altInput.parentNode&&n.altInput.parentNode.removeChild(n.altInput),delete n.altInput);n.input&&(n.input.type=n.input._type,n.input.classList.remove("flatpickr-input"),n.input.removeAttribute("readonly"));["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach((function(e){try{delete n[e]}catch(e){}}))},n.isEnabled=oe,n.jumpToDate=j,n.updateValue=Ae,n.open=function(e,t){void 0===t&&(t=n._positionElement);if(!0===n.isMobile){if(e){e.preventDefault();var r=g(e);r&&r.blur()}return void 0!==n.mobileInput&&(n.mobileInput.focus(),n.mobileInput.click()),void Se("onOpen")}if(n._input.disabled||n.config.inline)return;var o=n.isOpen;n.isOpen=!0,o||(n.calendarContainer.classList.add("open"),n._input.classList.add("active"),Se("onOpen"),me(t));!0===n.config.enableTime&&!0===n.config.noCalendar&&(!1!==n.config.allowInput||void 0!==e&&n.timeContainer.contains(e.relatedTarget)||setTimeout((function(){return n.hourElement.select()}),50))},n.redraw=fe,n.set=function(e,t){if(null!==e&&"object"==typeof e)for(var o in Object.assign(n.config,e),e)void 0!==ye[o]&&ye[o].forEach((function(e){return e()}));else n.config[e]=t,void 0!==ye[e]?ye[e].forEach((function(e){return e()})):r.indexOf(e)>-1&&(n.config[e]=u(t));n.redraw(),Ae(!0)},n.setDate=function(e,t,r){void 0===t&&(t=!1);void 0===r&&(r=n.config.dateFormat);if(0!==e&&!e||e instanceof Array&&0===e.length)return n.clear(t);ve(e,r),n.latestSelectedDateObj=n.selectedDates[n.selectedDates.length-1],n.redraw(),j(void 0,t),P(),0===n.selectedDates.length&&n.clear(!1);Ae(t),t&&Se("onChange")},n.toggle=function(e){if(!0===n.isOpen)return n.close();n.open(e)};var ye={locale:[pe,Q],showMonths:[Z,b,X],minDate:[j],maxDate:[j],positionElement:[_e],clickOpens:[function(){!0===n.config.clickOpens?(H(n._input,"focus",n.open),H(n._input,"click",n.open)):(n._input.removeEventListener("focus",n.open),n._input.removeEventListener("click",n.open))}]};function ve(e,t){var r=[];if(e instanceof Array)r=e.map((function(e){return n.parseDate(e,t)}));else if(e instanceof Date||"number"==typeof e)r=[n.parseDate(e,t)];else if("string"==typeof e)switch(n.config.mode){case"single":case"time":r=[n.parseDate(e,t)];break;case"multiple":r=e.split(n.config.conjunction).map((function(e){return n.parseDate(e,t)}));break;case"range":r=e.split(n.l10n.rangeSeparator).map((function(e){return n.parseDate(e,t)}))}else n.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));n.selectedDates=n.config.allowInvalidPreload?r:r.filter((function(e){return e instanceof Date&&oe(e,!1)})),"range"===n.config.mode&&n.selectedDates.sort((function(e,t){return e.getTime()-t.getTime()}))}function be(e){return e.slice().map((function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?n.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:n.parseDate(e.from,void 0),to:n.parseDate(e.to,void 0)}:e})).filter((function(e){return e}))}function _e(){n._positionElement=n.config.positionElement||n._input}function Se(e,t){if(void 0!==n.config){var r=n.config[e];if(void 0!==r&&r.length>0)for(var o=0;r[o]&&o1||"static"===n.config.monthSelectorType?n.monthElements[t].textContent=v(r.getMonth(),n.config.shorthandCurrentMonth,n.l10n)+" ":n.monthsDropdownContainer.value=r.getMonth().toString(),e.value=r.getFullYear().toString()})),n._hidePrevMonthArrow=void 0!==n.config.minDate&&(n.currentYear===n.config.minDate.getFullYear()?n.currentMonth<=n.config.minDate.getMonth():n.currentYearn.config.maxDate.getMonth():n.currentYear>n.config.maxDate.getFullYear()))}function ke(e){var t=e||(n.config.altInput?n.config.altFormat:n.config.dateFormat);return n.selectedDates.map((function(e){return n.formatDate(e,t)})).filter((function(e,t,r){return"range"!==n.config.mode||n.config.enableTime||r.indexOf(e)===t})).join("range"!==n.config.mode?n.config.conjunction:n.l10n.rangeSeparator)}function Ae(e){void 0===e&&(e=!0),void 0!==n.mobileInput&&n.mobileFormatStr&&(n.mobileInput.value=void 0!==n.latestSelectedDateObj?n.formatDate(n.latestSelectedDateObj,n.mobileFormatStr):""),n.input.value=ke(n.config.dateFormat),void 0!==n.altInput&&(n.altInput.value=ke(n.config.altFormat)),!1!==e&&Se("onValueUpdate")}function Le(e){var t=g(e),r=n.prevMonthNav.contains(t),o=n.nextMonthNav.contains(t);r||o?ee(r?-1:1):n.yearElements.indexOf(t)>=0?t.select():t.classList.contains("arrowUp")?n.changeYear(n.currentYear+1):t.classList.contains("arrowDown")&&n.changeYear(n.currentYear-1)}return function(){n.element=n.input=e,n.isOpen=!1,function(){var a=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],i=D(D({},JSON.parse(JSON.stringify(e.dataset||{}))),t),s={};n.config.parseDate=i.parseDate,n.config.formatDate=i.formatDate,Object.defineProperty(n.config,"enable",{get:function(){return n.config._enable},set:function(e){n.config._enable=be(e)}}),Object.defineProperty(n.config,"disable",{get:function(){return n.config._disable},set:function(e){n.config._disable=be(e)}});var c="time"===i.mode;if(!i.dateFormat&&(i.enableTime||c)){var l=N.defaultConfig.dateFormat||o.dateFormat;s.dateFormat=i.noCalendar||c?"H:i"+(i.enableSeconds?":S":""):l+" H:i"+(i.enableSeconds?":S":"")}if(i.altInput&&(i.enableTime||c)&&!i.altFormat){var d=N.defaultConfig.altFormat||o.altFormat;s.altFormat=i.noCalendar||c?"h:i"+(i.enableSeconds?":S K":" K"):d+" h:i"+(i.enableSeconds?":S":"")+" K"}Object.defineProperty(n.config,"minDate",{get:function(){return n.config._minDate},set:ue("min")}),Object.defineProperty(n.config,"maxDate",{get:function(){return n.config._maxDate},set:ue("max")});var p=function(e){return function(t){n.config["min"===e?"_minTime":"_maxTime"]=n.parseDate(t,"H:i:S")}};Object.defineProperty(n.config,"minTime",{get:function(){return n.config._minTime},set:p("min")}),Object.defineProperty(n.config,"maxTime",{get:function(){return n.config._maxTime},set:p("max")}),"time"===i.mode&&(n.config.noCalendar=!0,n.config.enableTime=!0);Object.assign(n.config,s,i);for(var m=0;m-1?n.config[h]=u(f[h]).map(y).concat(n.config[h]):void 0===i[h]&&(n.config[h]=f[h])}i.altInputClass||(n.config.altInputClass=de().className+" "+n.config.altInputClass);Se("onParseConfig")}(),pe(),function(){if(n.input=de(),!n.input)return void n.config.errorHandler(new Error("Invalid input element specified"));n.input._type=n.input.type,n.input.type="text",n.input.classList.add("flatpickr-input"),n._input=n.input,n.config.altInput&&(n.altInput=p(n.input.nodeName,n.config.altInputClass),n._input=n.altInput,n.altInput.placeholder=n.input.placeholder,n.altInput.disabled=n.input.disabled,n.altInput.required=n.input.required,n.altInput.tabIndex=n.input.tabIndex,n.altInput.type="text",n.input.setAttribute("type","hidden"),!n.config.static&&n.input.parentNode&&n.input.parentNode.insertBefore(n.altInput,n.input.nextSibling));n.config.allowInput||n._input.setAttribute("readonly","readonly");_e()}(),function(){n.selectedDates=[],n.now=n.parseDate(n.config.now)||new Date;var e=n.config.defaultDate||("INPUT"!==n.input.nodeName&&"TEXTAREA"!==n.input.nodeName||!n.input.placeholder||n.input.value!==n.input.placeholder?n.input.value:null);e&&ve(e,n.config.dateFormat);n._initialDate=n.selectedDates.length>0?n.selectedDates[0]:n.config.minDate&&n.config.minDate.getTime()>n.now.getTime()?n.config.minDate:n.config.maxDate&&n.config.maxDate.getTime()0&&(n.latestSelectedDateObj=n.selectedDates[0]);void 0!==n.config.minTime&&(n.config.minTime=n.parseDate(n.config.minTime,"H:i"));void 0!==n.config.maxTime&&(n.config.maxTime=n.parseDate(n.config.maxTime,"H:i"));n.minDateHasTime=!!n.config.minDate&&(n.config.minDate.getHours()>0||n.config.minDate.getMinutes()>0||n.config.minDate.getSeconds()>0),n.maxDateHasTime=!!n.config.maxDate&&(n.config.maxDate.getHours()>0||n.config.maxDate.getMinutes()>0||n.config.maxDate.getSeconds()>0)}(),n.utils={getDaysInMonth:function(e,t){return void 0===e&&(e=n.currentMonth),void 0===t&&(t=n.currentYear),1===e&&(t%4==0&&t%100!=0||t%400==0)?29:n.l10n.daysInMonth[e]}},n.isMobile||function(){var e=window.document.createDocumentFragment();if(n.calendarContainer=p("div","flatpickr-calendar"),n.calendarContainer.tabIndex=-1,!n.config.noCalendar){if(e.appendChild((n.monthNav=p("div","flatpickr-months"),n.yearElements=[],n.monthElements=[],n.prevMonthNav=p("span","flatpickr-prev-month"),n.prevMonthNav.innerHTML=n.config.prevArrow,n.nextMonthNav=p("span","flatpickr-next-month"),n.nextMonthNav.innerHTML=n.config.nextArrow,Z(),Object.defineProperty(n,"_hidePrevMonthArrow",{get:function(){return n.__hidePrevMonthArrow},set:function(e){n.__hidePrevMonthArrow!==e&&(d(n.prevMonthNav,"flatpickr-disabled",e),n.__hidePrevMonthArrow=e)}}),Object.defineProperty(n,"_hideNextMonthArrow",{get:function(){return n.__hideNextMonthArrow},set:function(e){n.__hideNextMonthArrow!==e&&(d(n.nextMonthNav,"flatpickr-disabled",e),n.__hideNextMonthArrow=e)}}),n.currentYearElement=n.yearElements[0],xe(),n.monthNav)),n.innerContainer=p("div","flatpickr-innerContainer"),n.config.weekNumbers){var t=function(){n.calendarContainer.classList.add("hasWeeks");var e=p("div","flatpickr-weekwrapper");e.appendChild(p("span","flatpickr-weekday",n.l10n.weekAbbreviation));var t=p("div","flatpickr-weeks");return e.appendChild(t),{weekWrapper:e,weekNumbers:t}}(),r=t.weekWrapper,o=t.weekNumbers;n.innerContainer.appendChild(r),n.weekNumbers=o,n.weekWrapper=r}n.rContainer=p("div","flatpickr-rContainer"),n.rContainer.appendChild(X()),n.daysContainer||(n.daysContainer=p("div","flatpickr-days"),n.daysContainer.tabIndex=-1),G(),n.rContainer.appendChild(n.daysContainer),n.innerContainer.appendChild(n.rContainer),e.appendChild(n.innerContainer)}n.config.enableTime&&e.appendChild(function(){n.calendarContainer.classList.add("hasTime"),n.config.noCalendar&&n.calendarContainer.classList.add("noCalendar");var e=q(n.config);n.timeContainer=p("div","flatpickr-time"),n.timeContainer.tabIndex=-1;var t=p("span","flatpickr-time-separator",":"),r=h("flatpickr-hour",{"aria-label":n.l10n.hourAriaLabel});n.hourElement=r.getElementsByTagName("input")[0];var o=h("flatpickr-minute",{"aria-label":n.l10n.minuteAriaLabel});n.minuteElement=o.getElementsByTagName("input")[0],n.hourElement.tabIndex=n.minuteElement.tabIndex=-1,n.hourElement.value=s(n.latestSelectedDateObj?n.latestSelectedDateObj.getHours():n.config.time_24hr?e.hours:function(e){switch(e%24){case 0:case 12:return 12;default:return e%12}}(e.hours)),n.minuteElement.value=s(n.latestSelectedDateObj?n.latestSelectedDateObj.getMinutes():e.minutes),n.hourElement.setAttribute("step",n.config.hourIncrement.toString()),n.minuteElement.setAttribute("step",n.config.minuteIncrement.toString()),n.hourElement.setAttribute("min",n.config.time_24hr?"0":"1"),n.hourElement.setAttribute("max",n.config.time_24hr?"23":"12"),n.hourElement.setAttribute("maxlength","2"),n.minuteElement.setAttribute("min","0"),n.minuteElement.setAttribute("max","59"),n.minuteElement.setAttribute("maxlength","2"),n.timeContainer.appendChild(r),n.timeContainer.appendChild(t),n.timeContainer.appendChild(o),n.config.time_24hr&&n.timeContainer.classList.add("time24hr");if(n.config.enableSeconds){n.timeContainer.classList.add("hasSeconds");var a=h("flatpickr-second");n.secondElement=a.getElementsByTagName("input")[0],n.secondElement.value=s(n.latestSelectedDateObj?n.latestSelectedDateObj.getSeconds():e.seconds),n.secondElement.setAttribute("step",n.minuteElement.getAttribute("step")),n.secondElement.setAttribute("min","0"),n.secondElement.setAttribute("max","59"),n.secondElement.setAttribute("maxlength","2"),n.timeContainer.appendChild(p("span","flatpickr-time-separator",":")),n.timeContainer.appendChild(a)}n.config.time_24hr||(n.amPM=p("span","flatpickr-am-pm",n.l10n.amPM[c((n.latestSelectedDateObj?n.hourElement.value:n.config.defaultHour)>11)]),n.amPM.title=n.l10n.toggleTitle,n.amPM.tabIndex=-1,n.timeContainer.appendChild(n.amPM));return n.timeContainer}());d(n.calendarContainer,"rangeMode","range"===n.config.mode),d(n.calendarContainer,"animate",!0===n.config.animate),d(n.calendarContainer,"multiMonth",n.config.showMonths>1),n.calendarContainer.appendChild(e);var a=void 0!==n.config.appendTo&&void 0!==n.config.appendTo.nodeType;if((n.config.inline||n.config.static)&&(n.calendarContainer.classList.add(n.config.inline?"inline":"static"),n.config.inline&&(!a&&n.element.parentNode?n.element.parentNode.insertBefore(n.calendarContainer,n._input.nextSibling):void 0!==n.config.appendTo&&n.config.appendTo.appendChild(n.calendarContainer)),n.config.static)){var i=p("div","flatpickr-wrapper");n.element.parentNode&&n.element.parentNode.insertBefore(i,n.element),i.appendChild(n.element),n.altInput&&i.appendChild(n.altInput),i.appendChild(n.calendarContainer)}n.config.static||n.config.inline||(void 0!==n.config.appendTo?n.config.appendTo:window.document.body).appendChild(n.calendarContainer)}(),function(){n.config.wrap&&["open","close","toggle","clear"].forEach((function(e){Array.prototype.forEach.call(n.element.querySelectorAll("[data-"+e+"]"),(function(t){return H(t,"click",n[e])}))}));if(n.isMobile)return void function(){var e=n.config.enableTime?n.config.noCalendar?"time":"datetime-local":"date";n.mobileInput=p("input",n.input.className+" flatpickr-mobile"),n.mobileInput.tabIndex=1,n.mobileInput.type=e,n.mobileInput.disabled=n.input.disabled,n.mobileInput.required=n.input.required,n.mobileInput.placeholder=n.input.placeholder,n.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",n.selectedDates.length>0&&(n.mobileInput.defaultValue=n.mobileInput.value=n.formatDate(n.selectedDates[0],n.mobileFormatStr));n.config.minDate&&(n.mobileInput.min=n.formatDate(n.config.minDate,"Y-m-d"));n.config.maxDate&&(n.mobileInput.max=n.formatDate(n.config.maxDate,"Y-m-d"));n.input.getAttribute("step")&&(n.mobileInput.step=String(n.input.getAttribute("step")));n.input.type="hidden",void 0!==n.altInput&&(n.altInput.type="hidden");try{n.input.parentNode&&n.input.parentNode.insertBefore(n.mobileInput,n.input.nextSibling)}catch(e){}H(n.mobileInput,"change",(function(e){n.setDate(g(e).value,!1,n.mobileFormatStr),Se("onChange"),Se("onClose")}))}();var e=l(le,50);n._debouncedChange=l(F,I),n.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&H(n.daysContainer,"mouseover",(function(e){"range"===n.config.mode&&ce(g(e))}));H(n._input,"keydown",se),void 0!==n.calendarContainer&&H(n.calendarContainer,"keydown",se);n.config.inline||n.config.static||H(window,"resize",e);void 0!==window.ontouchstart?H(window.document,"touchstart",ne):H(window.document,"mousedown",ne);H(window.document,"focus",ne,{capture:!0}),!0===n.config.clickOpens&&(H(n._input,"focus",n.open),H(n._input,"click",n.open));void 0!==n.daysContainer&&(H(n.monthNav,"click",Le),H(n.monthNav,["keyup","increment"],B),H(n.daysContainer,"click",ge));if(void 0!==n.timeContainer&&void 0!==n.minuteElement&&void 0!==n.hourElement){var t=function(e){return g(e).select()};H(n.timeContainer,["increment"],S),H(n.timeContainer,"blur",S,{capture:!0}),H(n.timeContainer,"click",$),H([n.hourElement,n.minuteElement],["focus","click"],t),void 0!==n.secondElement&&H(n.secondElement,"focus",(function(){return n.secondElement&&n.secondElement.select()})),void 0!==n.amPM&&H(n.amPM,"click",(function(e){S(e)}))}n.config.allowInput&&H(n._input,"blur",ie)}(),(n.selectedDates.length||n.config.noCalendar)&&(n.config.enableTime&&P(n.config.noCalendar?n.latestSelectedDateObj:void 0),Ae(!1)),b();var a=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!n.isMobile&&a&&me(),Se("onReady")}(),n}function P(e,t){for(var n=Array.prototype.slice.call(e).filter((function(e){return e instanceof HTMLElement})),r=[],o=0;o= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};var u="[object Object]";function d(e,t,n){this.helpers=e||{},this.partials=t||{},this.decorators=n||{},i.registerDefaultHelpers(this),s.registerDefaultDecorators(this)}d.prototype={constructor:d,logger:c.default,log:c.default.log,registerHelper:function(e,t){if(o.toString.call(e)===u){if(t)throw new a.default("Arg not supported with multiple helpers");o.extend(this.helpers,e)}else this.helpers[e]=t},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,t){if(o.toString.call(e)===u)o.extend(this.partials,e);else{if(void 0===t)throw new a.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=t}},unregisterPartial:function(e){delete this.partials[e]},registerDecorator:function(e,t){if(o.toString.call(e)===u){if(t)throw new a.default("Arg not supported with multiple decorators");o.extend(this.decorators,e)}else this.decorators[e]=t},unregisterDecorator:function(e){delete this.decorators[e]},resetLoggedPropertyAccesses:function(){l.resetLoggedProperties()}};var p=c.default.log;t.log=p,t.createFrame=o.createFrame,t.logger=c.default},1838:function(e,t){"use strict";t.__esModule=!0;var n={helpers:{helperExpression:function(e){return"SubExpression"===e.type||("MustacheStatement"===e.type||"BlockStatement"===e.type)&&!!(e.params&&e.params.length||e.hash)},scopedId:function(e){return/^\.|this\b/.test(e.original)},simpleId:function(e){return 1===e.parts.length&&!n.helpers.scopedId(e)&&!e.depth}}};t.default=n,e.exports=t.default},7497:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.parseWithoutProcessing=l,t.parse=function(e,t){var n=l(e,t);return new a.default(t).accept(n)};var o=r(n(6284)),a=r(n(8133)),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(2143)),s=n(2392);t.parser=o.default;var c={};function l(e,t){return"Program"===e.type?e:(o.default.yy=c,c.locInfo=function(e){return new c.SourceLocation(t&&t.srcName,e)},o.default.parse(e))}s.extend(c,i)},8765:function(e,t,n){"use strict";t.__esModule=!0;var r=n(2392),o=void 0;try{}catch(e){}function a(e,t,n){if(r.isArray(e)){for(var o=[],a=0,i=e.length;a1)throw new o.default("Unsupported number of partial arguments: "+n.length,e);n.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):n.push({type:"PathExpression",parts:[],depth:0}));var r=e.name.original,a="SubExpression"===e.name.type;a&&this.accept(e.name),this.setupFullMustacheParams(e,t,void 0,!0);var i=e.indent||"";this.options.preventIndent&&i&&(this.opcode("appendContent",i),i=""),this.opcode("invokePartial",a,r,i),this.opcode("append")},PartialBlockStatement:function(e){this.PartialStatement(e)},MustacheStatement:function(e){this.SubExpression(e),e.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(e){this.DecoratorBlock(e)},ContentStatement:function(e){e.value&&this.opcode("appendContent",e.value)},CommentStatement:function(){},SubExpression:function(e){u(e);var t=this.classifySexpr(e);"simple"===t?this.simpleSexpr(e):"helper"===t?this.helperSexpr(e):this.ambiguousSexpr(e)},ambiguousSexpr:function(e,t,n){var r=e.path,o=r.parts[0],a=null!=t||null!=n;this.opcode("getContext",r.depth),this.opcode("pushProgram",t),this.opcode("pushProgram",n),r.strict=!0,this.accept(r),this.opcode("invokeAmbiguous",o,a)},simpleSexpr:function(e){var t=e.path;t.strict=!0,this.accept(t),this.opcode("resolvePossibleLambda")},helperSexpr:function(e,t,n){var r=this.setupFullMustacheParams(e,t,n),a=e.path,s=a.parts[0];if(this.options.knownHelpers[s])this.opcode("invokeKnownHelper",r.length,s);else{if(this.options.knownHelpersOnly)throw new o.default("You specified knownHelpersOnly, but used the unknown helper "+s,e);a.strict=!0,a.falsy=!0,this.accept(a),this.opcode("invokeHelper",r.length,a.original,i.default.helpers.simpleId(a))}},PathExpression:function(e){this.addDepth(e.depth),this.opcode("getContext",e.depth);var t=e.parts[0],n=i.default.helpers.scopedId(e),r=!e.depth&&!n&&this.blockParamIndex(t);r?this.opcode("lookupBlockParam",r,e.parts):t?e.data?(this.options.data=!0,this.opcode("lookupData",e.depth,e.parts,e.strict)):this.opcode("lookupOnContext",e.parts,e.falsy,e.strict,n):this.opcode("pushContext")},StringLiteral:function(e){this.opcode("pushString",e.value)},NumberLiteral:function(e){this.opcode("pushLiteral",e.value)},BooleanLiteral:function(e){this.opcode("pushLiteral",e.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(e){var t=e.pairs,n=0,r=t.length;for(this.opcode("pushHash");n=0)return[t,o]}}}},2143:function(e,t,n){"use strict";t.__esModule=!0,t.SourceLocation=function(e,t){this.source=e,this.start={line:t.first_line,column:t.first_column},this.end={line:t.last_line,column:t.last_column}},t.id=function(e){return/^\[.*\]$/.test(e)?e.substring(1,e.length-1):e},t.stripFlags=function(e,t){return{open:"~"===e.charAt(2),close:"~"===t.charAt(t.length-3)}},t.stripComment=function(e){return e.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")},t.preparePath=function(e,t,n){n=this.locInfo(n);for(var r=e?"@":"",o=[],i=0,s=0,c=t.length;s0)throw new a.default("Invalid path: "+r,{loc:n});".."===l&&i++}}return{type:"PathExpression",data:e,depth:i,parts:o,original:r,loc:n}},t.prepareMustache=function(e,t,n,r,o,a){var i=r.charAt(3)||r.charAt(2),s="{"!==i&&"&"!==i;return{type:/\*/.test(r)?"Decorator":"MustacheStatement",path:e,params:t,hash:n,escaped:s,strip:o,loc:this.locInfo(a)}},t.prepareRawBlock=function(e,t,n,r){i(e,n),r=this.locInfo(r);var o={type:"Program",body:t,strip:{},loc:r};return{type:"BlockStatement",path:e.path,params:e.params,hash:e.hash,program:o,openStrip:{},inverseStrip:{},closeStrip:{},loc:r}},t.prepareBlock=function(e,t,n,r,o,s){r&&r.path&&i(e,r);var c=/\*/.test(e.open);t.blockParams=e.blockParams;var l=void 0,u=void 0;if(n){if(c)throw new a.default("Unexpected inverse block on decorator",n);n.chain&&(n.program.body[0].closeStrip=r.strip),u=n.strip,l=n.program}o&&(o=l,l=t,t=o);return{type:c?"DecoratorBlock":"BlockStatement",path:e.path,params:e.params,hash:e.hash,program:t,inverse:l,openStrip:e.strip,inverseStrip:u,closeStrip:r&&r.strip,loc:this.locInfo(s)}},t.prepareProgram=function(e,t){if(!t&&e.length){var n=e[0].loc,r=e[e.length-1].loc;n&&r&&(t={source:n.source,start:{line:n.start.line,column:n.start.column},end:{line:r.end.line,column:r.end.column}})}return{type:"Program",body:e,strip:{},loc:t}},t.preparePartialBlock=function(e,t,n,r){return i(e,n),{type:"PartialBlockStatement",name:e.path,params:e.params,hash:e.hash,program:t,openStrip:e.strip,closeStrip:n&&n.strip,loc:this.locInfo(r)}};var r,o=n(8728),a=(r=o)&&r.__esModule?r:{default:r};function i(e,t){if(t=t.path?t.path.original:t,e.path.original!==t){var n={loc:e.path.loc};throw new a.default(e.path.original+" doesn't match "+t,n)}}},8084:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var o=n(2067),a=r(n(8728)),i=n(2392),s=r(n(8765));function c(e){this.value=e}function l(){}l.prototype={nameLookup:function(e,t){return this.internalNameLookup(e,t)},depthedLookup:function(e){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(e),")"]},compilerInfo:function(){var e=o.COMPILER_REVISION;return[e,o.REVISION_CHANGES[e]]},appendToBuffer:function(e,t,n){return i.isArray(e)||(e=[e]),e=this.source.wrap(e,t),this.environment.isSimple?["return ",e,";"]:n?["buffer += ",e,";"]:(e.appendToBuffer=!0,e)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(e,t){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",e,",",JSON.stringify(t),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(e,t,n,r){this.environment=e,this.options=t,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!r,this.name=this.environment.name,this.isChild=!!n,this.context=n||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(e,t),this.useDepths=this.useDepths||e.useDepths||e.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||e.useBlockParams;var o=e.opcodes,i=void 0,s=void 0,c=void 0,l=void 0;for(c=0,l=o.length;c0&&(n+=", "+r.join(", "));var o=0;Object.keys(this.aliases).forEach((function(e){var r=t.aliases[e];r.children&&r.referenceCount>1&&(n+=", alias"+ ++o+"="+e,r.children[0]="alias"+o)})),this.lookupPropertyFunctionIsUsed&&(n+=", "+this.lookupPropertyFunctionVarDeclaration());var a=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&a.push("blockParams"),this.useDepths&&a.push("depths");var i=this.mergeSource(n);return e?(a.push(i),Function.apply(this,a)):this.source.wrap(["function(",a.join(","),") {\n ",i,"}"])},mergeSource:function(e){var t=this.environment.isSimple,n=!this.forceBuffer,r=void 0,o=void 0,a=void 0,i=void 0;return this.source.each((function(e){e.appendToBuffer?(a?e.prepend(" + "):a=e,i=e):(a&&(o?a.prepend("buffer += "):r=!0,i.add(";"),a=i=void 0),o=!0,t||(n=!1))})),n?a?(a.prepend("return "),i.add(";")):o||this.source.push('return "";'):(e+=", buffer = "+(r?"":this.initializeBuffer()),a?(a.prepend("return buffer + "),i.add(";")):this.source.push("return buffer;")),e&&this.source.prepend("var "+e.substring(2)+(r?"":";\n")),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return"\n lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n }\n ".trim()},blockValue:function(e){var t=this.aliasable("container.hooks.blockHelperMissing"),n=[this.contextName(0)];this.setupHelperArgs(e,0,n);var r=this.popStack();n.splice(1,0,r),this.push(this.source.functionCall(t,"call",n))},ambiguousBlockValue:function(){var e=this.aliasable("container.hooks.blockHelperMissing"),t=[this.contextName(0)];this.setupHelperArgs("",0,t,!0),this.flushInline();var n=this.topStack();t.splice(1,0,n),this.pushSource(["if (!",this.lastHelper,") { ",n," = ",this.source.functionCall(e,"call",t),"}"])},appendContent:function(e){this.pendingContent?e=this.pendingContent+e:this.pendingLocation=this.source.currentLocation,this.pendingContent=e},append:function(){if(this.isInline())this.replaceStack((function(e){return[" != null ? ",e,' : ""']})),this.pushSource(this.appendToBuffer(this.popStack()));else{var e=this.popStack();this.pushSource(["if (",e," != null) { ",this.appendToBuffer(e,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(e){this.lastContext=e},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(e,t,n,r){var o=0;r||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(e[o++])),this.resolvePath("context",e,o,t,n)},lookupBlockParam:function(e,t){this.useBlockParams=!0,this.push(["blockParams[",e[0],"][",e[1],"]"]),this.resolvePath("context",t,1)},lookupData:function(e,t,n){e?this.pushStackLiteral("container.data(data, "+e+")"):this.pushStackLiteral("data"),this.resolvePath("data",t,0,!0,n)},resolvePath:function(e,t,n,r,o){var a=this;if(this.options.strict||this.options.assumeObjects)this.push(function(e,t,n,r,o){var a=t.popStack(),i=n.length;e&&i--;for(;rthis.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var e=this.inlineStack;this.inlineStack=[];for(var t=0,n=e.length;t2&&_.push("'"+this.terminals_[y]+"'");E=this.lexer.showPosition?"Parse error on line "+(s+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+_.join(", ")+", got '"+(this.terminals_[p]||p)+"'":"Parse error on line "+(s+1)+": Unexpected "+(1==p?"end of input":"'"+(this.terminals_[p]||p)+"'"),this.parseError(E,{text:this.lexer.match,token:this.terminals_[p]||p,line:this.lexer.yylineno,loc:u,expected:_})}}if(h[0]instanceof Array&&h.length>1)throw new Error("Parse Error: multiple actions possible at state: "+f+", token: "+p);switch(h[0]){case 1:n.push(p),r.push(this.lexer.yytext),o.push(this.lexer.yylloc),n.push(h[1]),p=null,m?(p=m,m=null):(c=this.lexer.yyleng,i=this.lexer.yytext,s=this.lexer.yylineno,u=this.lexer.yylloc,l>0&&l--);break;case 2:if(v=this.productions_[h[1]][1],w.$=r[r.length-v],w._$={first_line:o[o.length-(v||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(v||1)].first_column,last_column:o[o.length-1].last_column},d&&(w._$.range=[o[o.length-(v||1)].range[0],o[o.length-1].range[1]]),void 0!==(g=this.performAction.call(w,i,c,s,this.yy,h[1],r,o)))return g;v&&(n=n.slice(0,-1*v*2),r=r.slice(0,-1*v),o=o.slice(0,-1*v)),n.push(this.productions_[h[1]][0]),r.push(w.$),o.push(w._$),b=a[n[n.length-2]][n[n.length-1]],n.push(b);break;case 3:return!0}}return!0}},t=function(){var e={EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e){return this._input=e,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t-1),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var o=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[o[0],o[0]+this.yyleng-t]),this},more:function(){return this._more=!0,this},less:function(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},next:function(){if(this.done)return this.EOF;var e,t,n,r,o;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var a=this._currentRules(),i=0;it[0].length)||(t=n,r=i,this.options.flex));i++);return t?((o=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=o.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:o?o[o.length-1].length-o[o.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,a[r],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e||void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return void 0!==e?e:this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(e){this.begin(e)},options:{},performAction:function(e,t,n,r){function o(e,n){return t.yytext=t.yytext.substring(e,t.yyleng-n+e)}switch(n){case 0:if("\\\\"===t.yytext.slice(-2)?(o(0,1),this.begin("mu")):"\\"===t.yytext.slice(-1)?(o(0,1),this.begin("emu")):this.begin("mu"),t.yytext)return 15;break;case 1:case 5:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),"raw"===this.conditionStack[this.conditionStack.length-1]?15:(o(5,9),"END_RAW_BLOCK");case 6:case 22:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:case 23:return 48;case 21:this.unput(t.yytext),this.popState(),this.begin("com");break;case 24:return 73;case 25:case 26:case 41:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return t.yytext=o(1,2).replace(/\\"/g,'"'),80;case 32:return t.yytext=o(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 42:return t.yytext=t.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},rules:[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],conditions:{mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}}};return e}();function n(){this.yy={}}return e.lexer=t,n.prototype=e,e.Parser=n,new n}();t.default=n,e.exports=t.default},514:function(e,t,n){"use strict";t.__esModule=!0;var r,o=n(8728),a=(r=o)&&r.__esModule?r:{default:r};function i(){this.parents=[]}function s(e){this.acceptRequired(e,"path"),this.acceptArray(e.params),this.acceptKey(e,"hash")}function c(e){s.call(this,e),this.acceptKey(e,"program"),this.acceptKey(e,"inverse")}function l(e){this.acceptRequired(e,"name"),this.acceptArray(e.params),this.acceptKey(e,"hash")}i.prototype={constructor:i,mutating:!1,acceptKey:function(e,t){var n=this.accept(e[t]);if(this.mutating){if(n&&!i.prototype[n.type])throw new a.default('Unexpected node type "'+n.type+'" found when accepting '+t+" on "+e.type);e[t]=n}},acceptRequired:function(e,t){if(this.acceptKey(e,t),!e[t])throw new a.default(e.type+" requires "+t)},acceptArray:function(e){for(var t=0,n=e.length;t0?(n.ids&&(n.ids=[n.name]),e.helpers.each(t,n)):o(this);if(n.data&&n.ids){var i=r.createFrame(n.data);i.contextPath=r.appendContextPath(n.data.contextPath,n.name),n={data:i}}return a(t,n)}))},e.exports=t.default},6822:function(e,t,n){"use strict";t.__esModule=!0;var r,o=n(2392),a=n(8728),i=(r=a)&&r.__esModule?r:{default:r};t.default=function(e){e.registerHelper("each",(function(e,t){if(!t)throw new i.default("Must pass iterator to #each");var n,r=t.fn,a=t.inverse,s=0,c="",l=void 0,u=void 0;function d(t,n,a){l&&(l.key=t,l.index=n,l.first=0===n,l.last=!!a,u&&(l.contextPath=u+t)),c+=r(e[t],{data:l,blockParams:o.blockParams([e[t],t],[u+t,null])})}if(t.data&&t.ids&&(u=o.appendContextPath(t.data.contextPath,t.ids[0])+"."),o.isFunction(e)&&(e=e.call(this)),t.data&&(l=o.createFrame(t.data)),e&&"object"==typeof e)if(o.isArray(e))for(var p=e.length;s=0?t:parseInt(e,10)}return e},log:function(e){if(e=o.lookupLevel(e),"undefined"!=typeof console&&o.lookupLevel(o.level)<=e){var t=o.methodMap[e];console[t]||(t="log");for(var n=arguments.length,r=Array(n>1?n-1:0),a=1;a=s.LAST_COMPATIBLE_COMPILER_REVISION&&t<=s.COMPILER_REVISION)return;if(t":">",'"':""","'":"'","`":"`","=":"="},r=/[&<>"'`=]/g,o=/[&<>"'`=]/;function a(e){return n[e]}function i(e){for(var t=1;t0){var u=document.createElement("div");l.forEach((function(e){return u.appendChild(e)})),c.insertAdjacentElement("afterbegin",u)}}}))}))}function u(e,t,n){window.matchMedia("(max-width: ".concat(e,"px)")).matches?t.forEach((function(e,t){n[t]&&(n[t].style.order=e)})):Array.from(n).forEach((function(e){e.style.removeProperty("order")}))}function d(e){e.forEach((function(e){var t=e.getAttribute("data-breakpoint"),n=e.getAttribute("data-neworder"),r=null==n?void 0:n.split(",");if(t&&r){var o=e.children[0].children;u(t,r,o),window.addEventListener("resize",(function(){return u(t,r,o)}))}}))}if(i){document.querySelectorAll(".cmp-containersecondary2__container-inner").forEach((function(e){var t=e.getAttribute("data-custombackgroundcolor");t&&(e.style.background=t)})),s.forEach((function(e){var t=e.getAttribute("data-breakpoint"),n=e.getAttribute("data-neworder"),r=null==n?void 0:n.split(",");if(t&&r){var o=e.children[0].children;u(t,r,o),window.addEventListener("resize",(function(){return u(t,r,o)}))}})),c.forEach((function(e){var t=e.querySelector(".cmp-containersecondary2__container-inner"),n=e.clientHeight,r=t.getAttribute("data-videoUrlMobile"),o=t.getAttribute("data-videoUrlDesktop"),i=t.getAttribute("data-fallbackDesktopImageUrl"),s=t.getAttribute("data-fallbackMobileImageUrl"),c=t.getAttribute("data-fallbackDesktopImageUrl"),l=t.getAttribute("data-layout");if(o||r){var u=t.parentElement.classList.contains("cmp-containersecondary2--border-radius-top")||!1,d=t.parentElement.classList.contains("cmp-containersecondary2--border-radius-bottom")||!1,p=(0,a.S)(e,s,c,e,n);"borealisanimated"===l&&p.renderVideo(o,r,i||"",t,u,d)}}));var p=document.querySelectorAll(".cmp-containersecondary2--layout-two-columns"),m=document.querySelectorAll(".cmp-containersecondary2--layout-three-columns"),f=Array.from(document.querySelectorAll(".cmp-containersecondary2--layout-four-columns")).filter((function(e){return 4===e.childElementCount})),h=function(){var e=function(e,t,n){e.forEach((function(e){var o,a,i,s=null===(i=null===(a=null===(o=e.querySelectorAll(".container")[n-1])||void 0===o?void 0:o.firstElementChild)||void 0===a?void 0:a.firstElementChild)||void 0===i?void 0:i.childElementCount;(0,r.ZP)()=t&&e.children.length===n-1&&e.insertAdjacentHTML("beforeend",'
\n
\n
\n
\n
\n
\n
')}))};e(p,596,2),e(m,1024,3),e(f,1320,4)};h(),window.addEventListener("resize",h),l(document.querySelectorAll(".cmp-containersecondary2[data-alignbuttons='true']"))}},142:function(e,t,n){"use strict";var r=n(9904),o=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o[").concat(n,"]"))}})),!s){var u=[],d=[],p=0,m=function(e){var t,n,r=e.getAttribute("data-ordersiblings"),a=e.parentElement;if("true"===r&&-1==u.indexOf(a)){u.push(a),d[p]||(d[p]=[]),d[p]=o(o([],d[p],!0),[a],!1);var i=a.nextElementSibling;(null===(t=null==i?void 0:i.classList)||void 0===t?void 0:t.contains("offerstrip"))&&"true"===(null===(n=null==i?void 0:i.firstElementChild)||void 0===n?void 0:n.getAttribute("data-ordersiblings"))?m(i.firstElementChild):p++}};a.forEach((function(e){m(e)}));var f=function(e){var t;return parseInt(null===(t=e.querySelector("a"))||void 0===t?void 0:t.textContent.match(/\d+/)[0],10)||0};d.forEach((function(e){var t=e.sort((function(e,t){return f(e)-f(t)}));t.forEach((function(e,n){n!==t.length-1&&e.insertAdjacentElement("afterend",t[n+1])}))}))}i.forEach((function(e){var t=e.clientHeight,n=e.querySelector(".cmp-containersecondary2__container-inner"),o=e.getAttribute("data-videoUrlMobile"),a=e.getAttribute("data-videoUrlDesktop"),i=e.getAttribute("data-altTextFallback"),s=e.getAttribute("data-fallbackMobileImageUrl"),c=e.getAttribute("data-fallbackDesktopImageUrl"),l=e.getAttribute("data-imageUrlMobile"),u=e.getAttribute("data-imageUrlDesktop"),d=e.getAttribute("data-layout"),p=e.getAttribute("data-altText"),m=(0,r.S)(e,s,c,e,t);"borealisstatic"===d?m.renderImage(u,l,p||""):"borealisanimated"===d&&m.renderVideo(a,o,i||"",n)}))}},2871:function(e,t,n){"use strict";var r=n(3199);document.querySelectorAll(".cmp-stripbanner").forEach((function(e){var t=e.getAttribute("data-custombackgroundcolor"),n=e.getAttribute("data-backgroundimagelarge"),o=e.getAttribute("data-backgroundimagesmall"),a=e.getAttribute("data-monday"),i=e.getAttribute("data-tuesday"),s=e.getAttribute("data-wednesday"),c=e.getAttribute("data-thursday"),l=e.getAttribute("data-friday"),u=e.getAttribute("data-saturday"),d=e.getAttribute("data-sunday"),p=document.querySelector("#businessphone"),m=document.querySelector(".cmp-stripbanner--business"),f=e.querySelectorAll("[data-holidaydate]"),h=[];if(f.forEach((function(e){var t={date:e.getAttribute("data-holidaydate"),startHour:e.getAttribute("data-openhours").split("-")[0],endHour:e.getAttribute("data-openhours").split("-")[1]};h.push(t)})),t&&(e.style.background=t),n||o){var g=function(){!n||o?(n||!o)&&(0,r.ZP)()>899?e.style.backgroundImage="url(".concat(n,")"):e.style.backgroundImage="url(".concat(o,")"):e.style.backgroundImage="url(".concat(n,")")};g(),window.addEventListener("resize",g)}function y(e,t){document.querySelector(e).style.display="none",document.querySelector(".cmp-stripbanner__inner").classList.add(t)}function v(e,t){document.querySelector(e).style.display="block",document.querySelector(".cmp-stripbanner__inner").classList.remove(t)}if(m){var b=document.querySelectorAll(".cmp-stripbanner__section"),_=b[3],S=b[2];_&&""===_.textContent.trim()?(y(".item3","cmp-stripbanner__item3-hide"),S&&""===S.textContent.trim()?y(".item1","cmp-stripbanner__item2-hide"):v(".item1","cmp-stripbanner__item2-hide")):v(".item3","cmp-stripbanner__item3-hide")}function w(e){if(!e)return{start:0,end:24};var t=e.split("-").map(Number);return{start:t[0],end:t[1]}}function E(){p.style.display="none",document.querySelector(".item2").style.display="none",document.querySelector(".cmp-stripbanner__inner").classList.add("cmp-stripbanner__phone-hide")}if(p){var x={Monday:w(a),Tuesday:w(i),Wednesday:w(s),Thursday:w(c),Friday:w(l),Saturday:w(u),Sunday:w(d)},k=(new Date).toLocaleString("en-GB",{timeZone:"Europe/London",hour12:!1,weekday:"long",month:"long",day:"numeric",hour:"numeric"}),A=parseInt(k.split(" ")[4]),L=k.split(",")[0],C=k.split(" ")[1],q=k.split(" ")[2],D="".concat(C," ").concat(q),M=x[L],I=null;h.some((function(e){return e.date===D&&(I=e,!0)}))?I.startHour<=A&&A<=I.endHour?p.style.display="initial":E():M&&M.start<=A&&A<=M.end?p.style.display="initial":E()}}))},2834:function(e,t,n){"use strict";n.a(e,(async function(e,t){try{n(3853),n(5062),n(2161),n(6307),n(7368),n(3286),n(9827),n(2019),n(2981),n(1072),n(7639),n(4571),n(2385),n(5969),n(3204),n(1298),n(3660),n(6972),n(3729),n(3296),n(8992),n(6680),n(5842),n(7588),n(294),n(5834),n(1806),n(4809),n(7268),n(3232),n(5039),n(3261),n(7884),n(3504),n(6267),n(8104),n(7662),n(5374),n(280),n(1626),n(5451),n(3085),n(7064),n(9983),n(1560),n(1502),n(3158),n(5176),n(1498),n(55),n(491),n(3117);var r=n(5410),o=(n(3753),n(8333),n(769),n(2835),n(3745),n(8982),n(7431),n(4632),n(506),n(2903),n(5917),n(142),n(2871),e([r]));r=(o.then?(await o)():o)[0],t()}catch(e){t(e)}}))},3853:function(e,t,n){"use strict";var r=n(9880);document.querySelectorAll(".cmp-accordion").forEach((e=>{e.querySelectorAll(".cmp-accordion__item").forEach((e=>{let t=e.querySelector(".cmp-accordion__panel");for(;;){const e=t.querySelector(".lists.container, .linkgroup.container, .table.container, .text");if(!e)break;{const n=e.parentElement,r=n.children[n.children.length-1],o=r.className.startsWith("container responsivegrid");if(r.children.length>0&&!o&&(r.children[0].classList.contains("no-bottom-margins")||r.children[0].classList.add("no-bottom-margins")),!o)break;t=r}}}))})),document.querySelectorAll(".cmp-accordion").forEach((e=>{e.hasChildNodes()&&(0,r.lg)(e,"accordion","no_heading"),document.querySelectorAll(".cmp-accordion__item").forEach((e=>{const t=e.querySelector(".cmp-accordion__title"),n=e.querySelector(".cmp-accordion__button");if(t){const o=t.textContent;e.setAttribute("data-analytics-section-title",o.toLowerCase().trim()),(0,r.s0)(n,"button",o)}}))}))},9880:function(e,t,n){"use strict";n.d(t,{fS:function(){return r},lg:function(){return i},s0:function(){return a},u3:function(){return o}});const r="no_heading",o="no_label";function a(e,t,n){e&&t&&n&&(e.setAttribute("data-analytics-action-label",n?.toLowerCase().trim()),e.setAttribute("data-analytics-action-type",t))}function i(e,t,n){e&&t&&n&&(e.setAttribute("data-analytics-component-type",t),e.setAttribute("data-analytics-component-title",n))}},5062:function(e,t,n){"use strict";var r=n(3199),o=n(9880);const a=()=>{document.querySelectorAll(".cmp-bannergroup.cmp-bannergroup--thirdwidth").forEach((e=>{let t=0;Array.from(e.children).forEach(((e,n)=>{0===n?t=getComputedStyle(e).width:e.style.maxWidth=t}))}))};window.addEventListener("resize",a),a();const i=()=>{const e=(0,r.ZP)(),t=document.querySelectorAll(".cmp-bannergroup--halfwidth, .cmp-bannergroup--thirdwidth, .cmp-bannergroup--fourchildren, .cmp-bannergroup--fivechildren");Array.from(t).filter((e=>e.querySelector(".cmp-banner--promo"))).forEach((t=>{const n=t.querySelectorAll(".cmp-banner .cmp-banner__content > :nth-child(2)"),r=e=>{const t=Array.from(e).map((e=>{const t=getComputedStyle(e).height;return t.substring(0,t.length-2)})),n=Math.max(...t);e.forEach(((e,r)=>{e.style.marginBottom=n-t[r]+"px"}))};if(e<596)return void n.forEach((e=>{e.style.marginBottom=""}));const o=n.length;if(3===o&&(e>596&&e<871||e>899&&e<1025))return r([n[0],n[1]]),void(n[2].style.marginBottom="");if(4===o&&e>596&&e<1320)return r([n[0],n[1]]),void r([n[2],n[3]]);if(5===o){if(e<596)return;return e>595&&e<871||e>899&&e<1025?(r([n[0],n[1]]),r([n[2],n[3]]),void(n[4].style.marginBottom="")):(r([n[0],n[1],n[2]]),void r([n[3],n[4]]))}r(n)}))};window.addEventListener("resize",i),i();var s=[];document.querySelectorAll(".threedigital-amdocs .bannergroup").forEach((e=>{let t=e.querySelector(".cmp-banner__action-container .cmp-button__label");t&&s.push(t.getAttribute("href"))})),document.querySelectorAll(".threedigital-amdocs a").forEach((e=>{let t=document.createElement("div"),n=e.getAttribute("class");t.classList.add(n),t.innerHTML=e.innerHTML,e.parentNode.replaceChild(t,e)})),function(){let e=document.querySelectorAll(".threedigital-amdocs .bannergroup"),t=document.querySelector(".newpar");e.forEach(((e,n)=>{if(e.querySelector(".cmp-banner--text-only")){let t=e.querySelector('[class*="cmp-banner--bg"]'),n=(t&&t.getAttribute("class")).split(" ");var r=n&&n.find((e=>e.startsWith("cmp-banner--bg")));r&&t.classList.remove(r)}let o=e.previousElementSibling,a=document.createElement("a");if(s.forEach(((e,t)=>{n==t&&a.setAttribute("href",e)})),a.style.textDecoration="none",r&&a.setAttribute("class",r),o&&o.classList.contains("standaloneicon")&&a.appendChild(o),e.parentNode.appendChild(a),a.appendChild(e),t){t.parentElement.appendChild(t)}}))}(),document.querySelectorAll(".bannergroup").forEach((e=>{const t=e.querySelectorAll(".cmp-banner--hero"),n=e.querySelectorAll(".cmp-image img"),r=e.querySelector(".cmp-button"),a=e.querySelector(".cmp-banner__text p"),i=e.querySelectorAll(".cmp-banner__content"),s=e.querySelectorAll(".cmp-banner--promo");let c=e.querySelector(".cmp-bannergroup--superherobanner")?"superhero_banner":e.querySelector(".cmp-banner--hero")?"hero_banner":e.querySelector(".cmp-banner--promo")?"promo_banner":"bannergroup";(0,o.lg)(e,c,o.fS),e.querySelectorAll(".cmp-superherobanner__item").forEach((t=>{var n=t.querySelector(".cmp-title__text"),r=n?n.textContent.toLowerCase().trim():o.fS;t.setAttribute("data-analytics-section-title",r),e.querySelectorAll(".cmp-button").forEach((e=>{var t=e.querySelector(".cmp-button__label").textContent,n=""===t.trim()?o.fS:t.trim();(0,o.s0)(e,"button",n)}))})),document.querySelectorAll(".cmp-superherobanner__text").forEach((e=>{if(e.querySelector("a")){const t=e.querySelector("a").textContent;(0,o.s0)(e,"textlink",t)}})),document.querySelectorAll(".cmp-superherobanner__dots").forEach((e=>{(0,o.s0)(e,"dot","no-label")})),t.forEach((e=>{var t=e.querySelector(".cmp-banner__title").textContent;if(e.setAttribute("data-analytics-section-title",t.toLowerCase().trim()),r){var i=r.querySelector(".cmp-button__label").textContent;(0,o.s0)(r,"button",i)}if(n&&n.forEach((e=>{var t=e.getAttribute("alt");(0,o.s0)(e,"image",t)})),a&&a.querySelector("a")){var s=a.querySelector("a").textContent;(0,o.s0)(a,"textlink",s)}})),s.forEach((e=>{var t=e.querySelector(".cmp-banner__title")?e.querySelector(".cmp-banner__title").textContent:e.querySelector(".cmp-banner__text").textContent;if(e.setAttribute("data-analytics-section-title",t.toLowerCase().trim()),r){var a=r.querySelector(".cmp-button__label").textContent;(0,o.s0)(r,"button",a)}n&&n.forEach((e=>{var t=e.getAttribute("alt");(0,o.s0)(e,"image",t)})),i&&i.forEach((e=>{const t=e.querySelector("a");if(t){var n=e.querySelector("a").textContent;(0,o.s0)(t,"textlink",n)}}))}))}))},2161:function(){const e=document.querySelectorAll(".cmp-breadcrumb"),t=document.querySelector('meta[name="navigationTitle"]'),n=document.location.pathname.startsWith("/editor.html");let r=sessionStorage.getItem("threeCurrentPageNavigationTitle");(()=>{let e="";t&&(e=t.getAttribute("content")),document.URL==sessionStorage.getItem("threeCurrentPageUrl")&&(r=sessionStorage.getItem("threePreviousPageNavigationTitle")),r&&sessionStorage.setItem("threePreviousPageNavigationTitle",r),sessionStorage.setItem("threeCurrentPageNavigationTitle",e),sessionStorage.setItem("threeCurrentPageUrl",document.URL)})(),e.forEach((e=>{if("previousPage"===e.getAttribute("data-custom-variation")&&!n){const t=document.referrer,n=e.querySelector(".cmp-breadcrumb__item:last-child .cmp-breadcrumb__item-link"),o=e.getAttribute("data-base-url");t&&function(e,t){const n=new URL(e).hostname,r=new URL(e).pathname,o=document.location.hostname,a=r.startsWith("/business")||r.startsWith("/content/threedigital/uk/business");return"three"==t?o===n:"onlyb2c"==t?!a&&o===n:"onlyb2b"==t?a&&o===n:void 0}(t,o)&&n&&(n.setAttribute("href",t),n.querySelector("span").textContent=r?"Back to "+r:"Back")}}))},6307:function(e,t,n){"use strict";const r=(0,n(3047).p)();document.querySelectorAll(".cmp-buttongroup").forEach((e=>{e.setAttribute(r.componentType,"buttongroup"),e.setAttribute(r.componentTitle,r.fallback_heading_value);e.querySelectorAll(".cmp-buttongroup__item").forEach((e=>{const t=e.querySelector(".cmp-button__label, .cmp-link__link"),n=e.closest(".aem-Grid")?.querySelector('h1[class*="title"], h2[class*="title"], h3[class*="title"], h4[class*="title"], h5[class*="title"], h6[class*="title"]'),o=n&&n.textContent.trim()?n.textContent.trim().replace(/\u00A0/g," ").toLowerCase():r.fallback_heading_value,a=t&&t.textContent.trim()?t.textContent.trim().toLowerCase():r.fallback_label_value;e.setAttribute(r.sectionTitle,o),t&&(t.setAttribute(r.actionType,r.actionTypeValue),t.setAttribute(r.actionLabel,a))}))}))},7368:function(e,t,n){"use strict";n.d(t,{u:function(){return p}});var r=n(8279),o=n(3199),a=n(2903),i=n(5917);const s=document.querySelectorAll(".cmp-carousel"),c=!!document.querySelector('[data-wcmmode="EDIT"]'),l=Array.from(s).map((e=>({self:e,id:e.getAttribute("id"),layout:e.getAttribute("data-layout"),hideArrows:"true"===e.getAttribute("data-hide-arrows"),disableOnMobile:e.classList.contains("cmp-carousel--disable-mobile"),alignButtons:"true"===e.getAttribute("data-alignbuttons"),viewport:e.querySelector(".cmp-carousel__viewport"),list:e.querySelector(".cmp-carousel__list"),slides:e.querySelectorAll(".cmp-carousel__slide"),slider:e.querySelector(".cmp-carousel__slider"),sliderHandle:e.querySelector(".cmp-carousel__slider-handle"),heading:e.querySelector(".cmp-carousel__heading"),next:e.querySelector(".cmp-carousel__right"),prev:e.querySelector(".cmp-carousel__left"),taskQueue:Promise.resolve(),isReOrdered:"true"===e.getAttribute("data-isReOrder")})));function u(e){return new Promise((t=>{e.then((()=>{t()})).catch((e=>{console.log(e),t()}))}))}let d=new Set;const p=()=>{l.forEach((e=>{if(function(e){let t=e;for(;t;){if("none"===window.getComputedStyle(t).display)return!0;t=t.parentElement}return!1}(e.self))return;if(d.has(e.id))return;d.add(e.id);let t,n,r,s,p,m,f=!0,h=!1,g=!1,y=!1;function v(t){e.taskQueue=e.taskQueue.then((()=>u(e.flicking.moveTo(t))))}function b(){const t=e.viewport.getBoundingClientRect(),n=[],r=[],a=(0,o.tq)()?27:75;return e.slides.forEach(((e,o)=>{const i=e.getBoundingClientRect();i.leftMath.ceil(t.right)-a?r.push(o):n.push(o)})),{visibleSlides:n,slidesNotVisible:r}}function _(){const{slidesNotVisible:t}=b();e.slides.forEach(((e,n)=>{t.includes(n)?(e.setAttribute("aria-hidden","true"),e.setAttribute("inert",""),e.setAttribute("tabindex","-1")):(e.removeAttribute("aria-hidden"),e.removeAttribute("inert"),e.setAttribute("tabindex","0"))}))}function S(){let t=-window.getComputedStyle(e.list).transform.split(",")[4]/(e.list.clientWidth-(0,o.Em)(e.viewport));return t>.99?1:t<0?0:t}function w(t){const n=(t-r)/100*e.slider.clientWidth;e.sliderHandle.style.transform=`translateX(${n}px)`}function E(){const t=e.viewport.clientWidth,n=(0,o.tq)()?"mobile":"desktop",r=a.B[n].pageMargin,i=a.B[n].horizontalGap;e.slides.forEach((n=>{let a,s;e.disableOnMobile&&(0,o.tq)()?n.style.width="100%":((0,o.tq)()?s=1:"half-width"===e.layout?s=2:"third-width"===e.layout?s=3:"quarter-width"===e.layout&&(s=4),a=(t-2*r-i*(s-1))/s,n.style.width=`${a}px`)}))}E(),window.addEventListener("resize",(()=>{E()}));const x=new Flicking(`#flick__${e.id}`,{bound:!0,align:c?"prev":"center"});function k(){e.flicking.on(Flicking.EVENTS.WILL_CHANGE,(t=>{e.prev.classList.remove("cmp-carousel__arrows--disabled"),f=!1,0===t.index&&(e.prev.classList.add("cmp-carousel__arrows--disabled"),f=!0)})),e.flicking.on(Flicking.EVENTS.MOVE_END,(()=>{e.next.classList.remove("cmp-carousel__arrows--disabled"),h=!1,1===S()&&(e.next.classList.add("cmp-carousel__arrows--disabled"),h=!0)})),e.flicking.on(Flicking.EVENTS.REACH_EDGE,(t=>{var n;n=t.direction,e.next.classList.remove("cmp-carousel__arrows--disabled"),e.prev.classList.remove("cmp-carousel__arrows--disabled"),f=!1,h=!1,"PREV"===n?(e.prev.classList.add("cmp-carousel__arrows--disabled"),f=!0):"NEXT"===n&&(e.next.classList.add("cmp-carousel__arrows--disabled"),h=!0)})),e.flicking.on(Flicking.EVENTS.CHANGED,(()=>{_()})),e.flicking.on(Flicking.EVENTS.MOVE_END,(()=>{if(!y){const n=(100-t)*S()/100*e.slider.clientWidth;e.sliderHandle.style.transform=`translateX(${n}px)`}y=!1}))}e.flicking=x,window.swapCarouselSlides=function(){l.forEach((e=>{if(!e.isReOrdered)return;if(!e.flicking)return;const t=e.list;if(!t||!t.children||0===t.children.length)return;const n=Array.from(t.children),r=n[0];t.appendChild(r),_();const o=Array.from(t.children),a={prevList:n,added:[],removed:[],ordered:[[0,o.length-1]]};try{window.Flicking.sync(e.flicking,a,o)}catch(e){console.error("Error syncing Flicking instance:",e)}}))},_(),k();function A(t,n){const r=b().visibleSlides,o="next"===t?1:-1,a="next"===t?3:r.at(0),i="next"===t?-1:0;let s;return(n=n??("next"===t?f:h))&&g?(s=r.at(i)+o,4===r.length&&(s=a)):s=e.flicking.index+o,s}function L(t){y=!0,e.taskQueue=e.taskQueue.then((()=>new Promise((e=>{let r="next"===t?f:h;setTimeout((()=>{w(n[A(t,r)])}),50),e()})))).then((()=>u((f||h)&&g?e.flicking.moveTo(A(t)):"next"===t?e.flicking.next():e.flicking.prev())))}if(e.self.querySelectorAll("img").forEach((e=>{e.addEventListener("dragstart",(e=>e.preventDefault()))})),g=b().visibleSlides.length%2==0,e.next.addEventListener("click",(()=>L("next"))),e.prev.addEventListener("click",(()=>L("prev"))),e.heading){/\(\d+\)$/.test(e.heading.innerText)||(e.heading.innerText=e.heading.innerText+` (${e.flicking.panelCount})`)}if(e.slider){function D(){s=e.list.clientWidth,p=e.viewport.clientWidth,t=Math.min(100,Math.floor(p/s*100)),r=t/2,m=(100-t)/(e.flicking.panelCount-1),n=[],e.sliderHandle.style.width=`calc(${t}% + 1px)`,n.push(r);for(let t=1;tMath.abs(e-r))),a=o.indexOf(Math.min(...o));return{percentage:n[a],index:a}}D(),window.addEventListener("resize",D),e.slider.addEventListener("click",(e=>{e.preventDefault();const t=M(e.offsetX);w(t.percentage),y=!0,v(t.index)}));let I,T,P,N=!1;function O(t){t.stopPropagation(),N=!0,e.sliderHandle.style.transition="none",I="mousedown"===t.type?t.clientX:t.touches[0].clientX,T=parseInt(getComputedStyle(e.sliderHandle).transform.split(",")[4])||0}function B(t){if(!N)return;let n;n="mousemove"===t.type?t.clientX:t.touches[0].clientX;const r=e.slider.clientWidth-e.sliderHandle.clientWidth;P=n-I+T,P<0?P=0:P>r&&(P=r),e.sliderHandle.style.transform=`translateX(${P}px)`}function H(){if(!N)return;N=!1,y=!0,e.sliderHandle.style.transition="transform 0.6s cubic-bezier(0.4, 0, 0.2, 1)";const t=M(P+e.sliderHandle.clientWidth/2);w(t.percentage),v(t.index)}e.sliderHandle.addEventListener("click",(e=>e.stopPropagation())),e.sliderHandle.addEventListener("mousedown",O),e.sliderHandle.addEventListener("touchstart",O,{passive:!1}),document.addEventListener("mousemove",B),document.addEventListener("touchmove",B,{passive:!1}),document.addEventListener("mouseup",H),document.addEventListener("touchend",H)}function C(){!1!==e.flicking._initialized&&((0,o.Em)(e.viewport)>=e.list.clientWidth?(e.self.classList.add("cmp-carousel--hide-arrows-without-overflow"),e.flicking.bounce=0,e.flicking.align="prev",e.heading&&(e.heading.style.display="none")):(e.self.classList.remove("cmp-carousel--hide-arrows-without-overflow"),e.flicking.bounce="20%",e.align="center",e.heading&&(e.heading.style.display="block")))}function q(){(0,o.tq)()?(v(0),e.taskQueue=e.taskQueue.then((()=>e.flicking.destroy()))):(e.flicking.init(),k())}if(e.hideArrows&&(C(),window.addEventListener("resize",(()=>{C()}))),e.disableOnMobile&&(q(),window.addEventListener("resize",(()=>{q()}))),e.alignButtons){const F=e.self.querySelectorAll(".cmp-containersecondary2");(0,i.B6)(F)}c&&(v(0),e.taskQueue=e.taskQueue.then((()=>e.flicking.destroy())))}))};s.length>0&&(0,r.R4)(p),function(){for(var e=document.getElementsByClassName("cmp-carousel__heading"),t=0;t60&&(e[t].innerText=e[t].innerText.substring(0,60))}()},3286:function(e,t,n){"use strict";var r=n(3729);document.addEventListener("DOMContentLoaded",(function(){const e=sessionStorage.getItem("form_tracking_success_data");if(e){const t=JSON.parse(e);(0,r.W9)(t.formName,t.data.status,t.data.code)}}))},9827:function(e,t,n){"use strict";var r=n(5917),o=n(9880);const a=document.querySelectorAll(".cmp-containerbattenberg"),i=document.querySelectorAll(".cmp-containerbattenberg__container");i.forEach((e=>{0!==e.getElementsByClassName("cmp-image").length&&e.classList.add("cmp-containerbattenberg__container-nopadding");0!==e.getElementsByClassName("cmp-embed").length&&(e.classList.add("cmp-containerbattenberg__container-nopadding"),e.querySelectorAll(".embed").forEach((e=>{e.classList.add("cmp-embed--full-width")})))})),(0,r.s6)(a),a.forEach((e=>{const t=e.querySelector("h1, h2, h3, h4, h5, h6"),n=t?t.textContent.trim().toLowerCase():o.fS;(0,o.lg)(e,"battenberg_container",n)})),i.forEach((e=>{e.querySelectorAll("img").forEach((e=>{const t=e.alt.trim().toLowerCase()||o.fS;(0,o.s0)(e,"image",t)}));const t=e.querySelector(".cmp-title__text");if(t){const e=t.textContent.trim().toLowerCase()||o.fS;t.setAttribute("data-analytics-section-title",e)}e.querySelectorAll("a").forEach((e=>{const t=e.textContent.trim().toLowerCase()||o.u3;(0,o.s0)(e,"textlink",t)}));e.querySelectorAll("button").forEach((e=>{const t=e.textContent.trim().toLowerCase()||o.u3;(0,o.s0)(e,"button",t)}))}))},2019:function(e,t,n){"use strict";var r=n(3883),o=n(3199);var a=(e,t,n)=>{const a=document.querySelectorAll("."+t);if(a.length>0){const i=!!document.querySelector('[data-wcmmode="EDIT"]');if(!window.matchMedia("(prefers-reduced-motion: reduce)").matches&&!i){let s=120;const c=.6,l=()=>{(0,o.ZP)()>899&&(s=120,s*=c)};l(),window.addEventListener("resize",l);const u=-s/2;if(document.querySelector("."+n)){const d=(t,n)=>{const r=t.querySelector(n);if(!r)return;const o=r&&r.querySelector("."+e+"__parallax"),a=r&&r.getAttribute("data-direction")?r.getAttribute("data-direction"):"top";return{measureElement:r,moving:o,direction:a}},p=Array.prototype.map.call(a,(t=>{const n=[],r=d(t,"."+e+"__top-left-angle");r&&n.push(r);const o=d(t,"."+e+"__bottom-right-angle");return o&&n.push(o),n}));function m(e=!1){Array.prototype.forEach.call(p,(t=>{t.forEach((t=>{const{measureElement:n,moving:r}=t,o=n.getBoundingClientRect().top,a=Number((1-o/window.innerHeight).toFixed(2));if(e||a>-.3&&a<1.3){const e=r.getAttribute("d").split(" ");let t=Math.round(s*a),n=u+t;e[2]=n,r.setAttribute("d",e.join(" "))}}))}))}m("moveAll");document.querySelectorAll("."+e+"__parallax").forEach((t=>{t.classList.contains(e+"--transition")||t.classList.add(e+"--transition")}));const f=50,h=(0,r.Z)(m,f);let g=!1;const y=()=>{0==g?(g=!0,setTimeout((()=>{g=!1}),f),m()):h()};window.addEventListener("scroll",y,{passive:!0})}}}},i=n(9904),s=n(506);const c=document.querySelectorAll(".cmp-containerprimary"),l=document.querySelectorAll(".cmp-containerprimary:not(.cmp-containerprimary--page-width)[data-bespokecolor], .cmp-containerprimary:not(.cmp-containerprimary--page-width)[data-videoUrlMobile], .cmp-containerprimary:not(.cmp-containerprimary--page-width)[data-videoUrlDesktop], .cmp-containerprimary:not(.cmp-containerprimary--page-width)[data-imageUrlMobile], .cmp-containerprimary:not(.cmp-containerprimary--page-width)[data-imageUrlDesktop], .cmp-containerprimary:not(.cmp-containerprimary--page-width)[data-fallbackMobileImageUrl], .cmp-containerprimary:not(.cmp-containerprimary--page-width)[data-fallbackDesktopImageUrl], .cmp-containerprimary:not(.cmp-containerprimary--page-width)[data-layout]"),u=(0,s.tC)('meta[name="resourcePath"]'),d=(0,s.tC)('meta[name="twitter:title"]'),p=(0,s.tC)('meta[property="og:title"]'),m="EDIT"===(0,s.tC)('meta[name="wcmMode"]'),f=window.location.pathname,h=document.title,g=f.startsWith("/business")||f.includes("/business/"),{is404Page:y}=(()=>{const e=document.querySelector('meta[name="navigationTitle"]'),t=e?.getAttribute("content")||"",n=u.includes("404"),r=n&&!m,o=h.includes("404")||t.includes("404")||n;return{is404Page:r||o}})();c.length>0&&(a("cmp-containerprimary","cmp-containerprimary","cmp-containerprimary__parallax"),l.forEach((e=>{const t=e.clientHeight,n=e.getAttribute("data-videoUrlMobile"),r=e.getAttribute("data-videoUrlDesktop"),o=e.getAttribute("data-altTextFallback"),a=e.getAttribute("data-fallbackMobileImageUrl"),c=e.getAttribute("data-fallbackDesktopImageUrl"),l=e.getAttribute("data-imageUrlMobile"),u=e.getAttribute("data-imageUrlDesktop"),f=e.querySelector(".cmp-containerprimary__content"),h=e.getAttribute("data-layout"),v=e.getAttribute("data-bespokecolor"),b=e.getAttribute("data-bespokecolorprimary"),_=e.getAttribute("data-altText"),S=e.getAttribute("data-errorpage-view-type"),w=(0,i.S)(e,a,c,e,t);if("gradient"===h?w.renderGradient(v):"bespokecolor"===h?f.style.backgroundColor=b:"borealisstatic"===h?w.renderImage(u,l,_||""):"borealisanimated"===h&&w.renderVideo(r,n,o,f),y&&!m){const t="b2b"===S,n=!S||"b2c"===S;if(g){const e=" Business";document.title.endsWith(e)||(document.title+=e),d&&!d.endsWith(e)&&(0,s.Uo)('meta[name="twitter:title"]',d+e),p&&!p.endsWith(e)&&(0,s.Uo)('meta[property="og:title"]',p+e)}window.digitalData?.site&&(window.digitalData.site.siteFlag=g?"B2B":"B2C"),(0,s.Xr)(g),(0,s.YG)(g),t?e.style.display=g?"":"none":n&&(e.style.display=g?"none":"")}})))},2981:function(e,t,n){"use strict";var r=(e,t)=>e.currentStyle?e.currentStyle[t]:window.getComputedStyle?window.getComputedStyle(e,null).getPropertyValue(t):null,o=n(3883);const a=()=>window.matchMedia("(max-width: 900px)").matches;const i=document.querySelectorAll(".cmp-contentscheduler"),s=!!document.querySelector('[data-wcmmode="EDIT"]');i.forEach((async e=>{if(!s){const t=e.querySelectorAll("[data-cmp-start]"),n=e.querySelector("[data-cmp-holidays]"),i=e.querySelectorAll('[data-cmp-type="show"]'),c=e.querySelectorAll('[data-cmp-type="move"]'),l=e.querySelectorAll('[data-cmp-type="swap"]'),u=e.querySelectorAll("[data-cmp-exception]");let d=!1;n&&await async function(){try{const e=await fetch("https://www.gov.uk/bank-holidays.json"),t=(await e.json())["england-and-wales"].events,n=(new Date).toISOString().split("T")[0];for(const e of t){if(n===new Date(e.date).toISOString().split("T")[0])return!0}return!1}catch(e){return console.error("Error fetching UK holidays:",e),!1}}()&&(d=!0);let p=!1;function m(e){const t=document.getElementById(e);if(!t)return null;let n=t,r=/cmp-[A-Za-z0-9]+(?!\-\-|__|[A-Za-z0-9])/;for(;n&&!r.test(n.className);)n=n.parentElement;const o=n.className.match(r)[0];return n.parentElement.className.includes(o)||"cmp-containersecondary2container"===o?n=n.parentElement:"cmp-text"===o&&(n=t),n}const f=[],h=[],g=[];function y(){const e={monday:[],tuesday:[],wednesday:[],thursday:[],friday:[],saturday:[],sunday:[]};if(t.forEach((t=>{const n=t.getAttribute("data-cmp-start"),r=t.getAttribute("data-cmp-end");["data-cmp-monday","data-cmp-tuesday","data-cmp-wednesday","data-cmp-thursday","data-cmp-friday","data-cmp-saturday","data-cmp-sunday"].forEach((o=>{if(t.hasAttribute(o)){const t=o.replace("data-cmp-","");e[t].push({start:n,end:r})}}))})),n){const t=n.getAttribute("data-cmp-holidays");if("active"===t)e.holidays=[{start:"00:00",end:"23:59"}];else if("inactive"===t)e.holidays=[{start:"00:00",end:"00:00"}];else if("custom"===t){const t=n.getAttribute("data-cmp-holiday-start"),r=n.getAttribute("data-cmp-holiday-end");e.holidays=[{start:t,end:r}]}}return u.forEach((t=>{const n=t.getAttribute("data-cmp-exception"),r=t.getAttribute("data-cmp-exceptionaction");if(e[n]||(e[n]=[]),"active"===r)e[n].push({start:"00:00",end:"23:59"});else if("inactive"===r)e[n].push({start:"00:00",end:"00:00"});else if("custom"===r){const r=t.getAttribute("data-cmp-exception-start"),o=t.getAttribute("data-cmp-exception-end");e[n].push({start:r,end:o})}})),e}function v(e){const t=e.toLocaleString("en-GB",{timeZone:"Europe/London",year:"numeric",month:"2-digit",day:"2-digit"}),[n,r,o]=t.split("/");return`${o}-${r}-${n}`}function b(e){const t=new Date,n=t.toLocaleString("en-GB",{timeZone:"Europe/London",hour:"2-digit",minute:"2-digit"}),r=Number(n.split(":").join("")),o=t.toLocaleString("en-GB",{weekday:"long"}).toLowerCase(),a=v(t);let i=e[o];return d&&(i=e.holidays),e[a]&&(i=e[a]),i.some((({start:e,end:t})=>{const n=Number(e.split(":").join("")),o=Number(t.split(":").join("")),a=[n,o];return n>o&&(a[1]=2400,a[2]=0,a[3]=o),a[0]<=r&&r<=a[1]||a.length>2&&a[2]<=r&&r<=a[3]}))}function _(e){const t=e.hasAttribute("data-cmp-active");return!(!p&&t)&&!(p&&!t)}function S(e){const t=e.getAttribute("data-cmp-device");return("desktop"!==t||!a())&&!("mobile"===t&&!a())}function w(e,t){const n=t.parent;n.insertBefore(e,n.children[t.index])}function E(e,t){const n=m(e.getAttribute("data-cmp-id"));n&&(S(e)&&!_(e)&&n.style?n.style.display="none":n.style.display=f[t])}function x(e,t){const n=m(e.getAttribute("data-cmp-id")),r=m(e.getAttribute("data-cmp-movetoid")),o=e.getAttribute("data-cmp-where");n&&r&&o&&(S(e)&&_(e)?r.insertAdjacentElement(o,n):w(n,h[t]))}function k(e,t){const n=m(e.getAttribute("data-cmp-id")),r=m(e.getAttribute("data-cmp-swapwithid")),o=g[t];if(n&&r)if(S(e)&&_(e)){if(!o.isSwapped){const e=r.nextElementSibling,t=r.parentNode;n.replaceWith(r),t.insertBefore(n,e),o.isSwapped=!0}}else w(n,o.element1),w(r,o.element2),o.isSwapped=!1}function A(){i.forEach(((e,t)=>{E(e,t)})),c.forEach(((e,t)=>{x(e,t)})),l.forEach(((e,t)=>{k(e,t)}))}i.forEach((e=>{const t=m(e.getAttribute("data-cmp-id"));t&&f.push(r(t,"display"))})),c.forEach((e=>{const t=m(e.getAttribute("data-cmp-id"));t&&h.push({parent:t.parentNode,index:Array.from(t.parentNode.children).indexOf(t)})})),l.forEach((e=>{const t=m(e.getAttribute("data-cmp-id")),n=m(e.getAttribute("data-cmp-swapwithid"));t&&n&&g.push({element1:{parent:t.parentNode,index:Array.from(t.parentNode.children).indexOf(t)},element2:{parent:n.parentNode,index:Array.from(n.parentNode.children).indexOf(n)},isSwapped:!1})}));const L=y();p=b(L),A(),setInterval((()=>{p=b(L),A()}),6e4);const C=(0,o.Z)(A,200);window.addEventListener("resize",C)}}))},1072:function(){const e=document.querySelectorAll(".cmp-countdown");function t(e,t){const n=setInterval((function(){const r=t.children[0],o=t.children[1],a=t.children[2],i=t.getAttribute("data-wcmmode"),s="DISABLED"===i||"PREVIEW"===i,c="true"===t.getAttribute("data-hide-Timer-slot"),l="true"===t.getAttribute("data-show-timer"),u="true"===t.getAttribute("data-show-slot"),d=(new Date).getTime(),p=e-d,m=Math.floor(p/864e5),f=Math.floor(p%864e5/36e5),h=Math.floor(p%36e5/6e4),g=m<10?"0"+m:m,y=f<10?"0"+f:f,v=h<10?"0"+h:h;t.querySelector(".cmp-countdown__days-num").innerHTML=g,t.querySelector(".cmp-countdown__hours-num").innerHTML=y,t.querySelector(".cmp-countdown__minutes-num").innerHTML=v;const b=t.querySelector(".cmp-countdown__days-num"),_=t.querySelector(".cmp-countdown__hours-num"),S=t.querySelector(".cmp-countdown__minutes-num");p<0&&(clearInterval(n),l?(b.innerHTML="00",_.innerHTML="00",S.innerHTML="00"):o&&(o.style.display="none"));const w="true"===t.getAttribute("data-swap-desc-activate");if("EDIT"===i&&r&&w&&r.classList.add("cmp-countdown-description-visible"),o&&(null===b||""===b&&null===_||""===_&&null===S||""===S)&&(o.style.display="none"),function(e,t){e&&t&&(t.style.display="none")}(s,a),function(e,t,n,r){if(r&&e&&t&&n)return e.style.display="none",t.style.display="none",n.style.display="none",!0;return!1}(o,r,a,c))return;s&&(function(e,t,n,r,o,a,i,s,c){o&&t&&e&&r&&"00"===a&&"00"===i&&"00"===s&&(clearInterval(c),t.style.display=n?"block":"none",e.style.display="none",r.style.display="block")}(o,r,w,a,u,g,y,v,n),function(e,t,n,r){t&&n&&e&&"none"===t.style.display&&(n.style.display=r?"block":"none",e.style.display="block")}(a,o,r,w));"EDIT"===i&&u&&"00"===g&&"00"===y&&"00"===v&&(clearInterval(n),setTimeout((()=>{o&&r&&(o.style.display="none",r.style.display="block")}),1e3))}),1e3)}e.forEach((e=>{t(Number(e.getAttribute("data-attribute-timer"))+6e4,e)}))},7639:function(){!function(){const e={searchLocationForm:".cmp-coveragechecker--store-finder-footer .cmp-locationsearch__form",searchLocationBtn:".cmp-coveragechecker--store-finder-footer .cmp-locationsearch__searchicon",searchLocationInput:".cmp-coveragechecker--store-finder-footer .cmp-locationsearch__input"},t="https://locator.three.co.uk/search/?q=";function n(t){const n=document.querySelector(e.searchLocationInput).value;window.location=t+n}function r(){const r=document.querySelector(e.searchLocationForm);if(null!=r){const o=r.querySelector(e.searchLocationBtn),a=r.querySelector(e.searchLocationInput);o.addEventListener("click",(function(){n(t)})),a.addEventListener("keypress",(function(e){"Enter"==e.key&&(e.preventDefault(),n(t))}))}}"complete"===document.readyState||"loaded"===document.readyState?r():document.addEventListener("DOMContentLoaded",r)}()},4571:function(e,t,n){"use strict";var r=n(1626);const o=document.querySelectorAll(".coveragechecker"),a={0:"0",1:"3",2:"3",3:"2",4:"1"};Array.from(o).filter((e=>!e.classList.contains("networkstatuschecker"))).forEach((e=>{const t=e.querySelector(".cmp-networkcoveragechecker")?.getAttribute("data-google-apikey"),n=e.querySelectorAll(".cmp-coverageresults__button-item"),o=e.querySelector(".coverageresults-showhide-content"),i=e.querySelector(".cmp-form-text--networkcoveragechecker_input"),s=e.querySelector(".cmp-coverageresults__results-input"),c=e.querySelectorAll(".cmp-coverageresults__results-section"),l=e.querySelector(".cmp-coverageresults__broadband-section"),u=e.querySelector(".cmp-coverageresults__sunset-planned"),d=u.innerHTML,p=e.querySelector(".cmp-maps__legend--outdoor"),m=e.querySelector(".cmp-maps__legend--indoor"),f=e.querySelector(".cmp-maps__legend");let h=null;const g=e.querySelector("#default-network-button"),y=(()=>{if(0!==c.length&&g)return c[g.getAttribute("data-id")]})(),v=(e,t,n)=>{e.overlayMapTypes.clear();const r=new google.maps.ImageMapType({getTileUrl:function(e,r){return[n,t,"/",e.x,"/",e.y,"/",r].join("")},tileSize:new google.maps.Size(256,256),maxZooom:14});r.setOpacity(.5),e.overlayMapTypes.push(r)};function b(e,t){const n=t.getAttribute("data-id");c.forEach((t=>{if(n===t.getAttribute("data-id")){t.querySelectorAll(".cmp-coverageresults__icon").forEach((n=>{const r=e.coverage[t.getAttribute("data-coverage-id")],o=a[r];n.style.display="none",o===n.getAttribute("data-status")&&(n.style.display="block")}));t.querySelectorAll(".cmp-coverageresults__results-signal").forEach((n=>{const r=e.coverage[t.getAttribute("data-coverage-id")],o=a[r];n.style.display="none",o===n.getAttribute("data-status")&&(n.style.display="block")}))}})),v(window.threeGoogleMap,t.getAttribute("data-metricell"),t.getAttribute("data-metricell-url"))}function _(e,t,n){const r=t.getAttribute("data-hbb-availability");let o=e.hbb.availability[r];const a=e?.coverage?.extraCvgDetails;n&&"threeG"===n&&a&&"SUNSET_PLANNED"===a[0]?.name&&u?(u.innerHTML=d,u.querySelectorAll(".cmp-indication__message p").forEach((e=>{const t=a[0].value,n=new Date(t.split("/").reverse().join("-")).toLocaleDateString("en-GB",{day:"numeric",month:"long",year:"numeric"});e.innerHTML=e.innerHTML.replace("[dateplaceholder]",n),u.style.display="block"})),l&&(l.style.display="none")):(u&&(u.style.display="none"),l&&(l.style.display="Available"!==o&&r?"none":"block"))}(0,r.Z)(e,"COVERAGECHECKER",((t,r,a)=>{var l;l=t,0!==n.length&&(p&&(e.querySelector("#cmp-maps__legend-icon--outdoor").style.backgroundColor=p.getAttribute("data-outdoor-colour")),m&&(e.querySelector("#cmp-maps__legend-icon--indoor").style.backgroundColor=m.getAttribute("data-indoor-colour")),g&&(b(l,g),_(l,g)),n.forEach(((e,t)=>{e.addEventListener("click",(()=>{n.forEach((e=>{e.classList.contains("active")&&e.classList.remove("active")})),0!==c.length&&(c.forEach((e=>{e.style.display="none"})),c[t].style.display="flex",e.classList.add("active")),b(l,e),_(l,e,c[t]?.getAttribute("data-coverage-id"))}))}))),0!==c.length&&c.forEach((e=>{e.style.display="none"})),g&&y&&(0!==n.length&&n.forEach((e=>{e.classList.remove("active")})),g.classList.add("active"),y.style.display="flex"),o&&(s&&(s.textContent=i.value),window.threeGoogleMap.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(f),o.style.display="block",o.scrollIntoView({behavior:"smooth"})),window.threeGoogleMap.setCenter({lat:r,lng:a}),h&&h.setMap&&h.setMap(null),h=new google.maps.Marker({position:{lat:r,lng:a},map:window.threeGoogleMap,title:i.value})}),t)}))},2385:function(){"use strict";var e=function(e,t){for(;null!==e;){if(e.classList.contains(t))return!0;e=e.parentElement}return!1};let t,n,r=document.querySelector(".cmp-form-text--text-entry-dropdown"),o=r&&r.querySelector(".cmp-form-text--dropdown-input"),a=r&&r.querySelector(".cmp-form-text--dropdown-list"),i=a&&a.querySelectorAll(".cmp-form-text--dropdown-list__item"),s=document.querySelectorAll(".cmp-form-text--dropdown"),c=Array.from(s).filter((t=>!e(t,"cmp-form-dynamicdropdown")));if(0!==c.length){function l(e){let t=document.querySelectorAll(".cmp-form-text--dropdown-list");t&&t.forEach((e=>{e.classList.remove("cmp-form-text--dropdown-list__active"),e.parentElement.classList.remove("cmp-form-text--dropdown-active")})),e.classList.add("cmp-form-text--dropdown-list__active"),e.parentElement.classList.add("cmp-form-text--dropdown-active"),e.style.height="auto"}function u(e){e.style.height="0px",e.classList.remove("cmp-form-text--dropdown-list__active"),e.parentElement.classList.remove("cmp-form-text--dropdown-active")}function d(e,t){const n="cmp-form-text--dropdown-list__item--selected";e.querySelectorAll("li.cmp-form-text--dropdown-list__item").forEach((e=>{e.textContent.toLowerCase()===t.toLowerCase()?e.classList.contains(n)||e.classList.add(n):e.classList.remove(n)}))}function p(e){e.stopPropagation();const t=e.target.parentElement.parentElement.querySelector(".cmp-form-text--dropdown-list");if(t&&(t.classList.contains("cmp-form-text--dropdown-list__active")?u(t):l(t)),o&&0==o.value.length)for(let e=0;e0?(h=Array.from(t),c=h.findIndex((e=>e.classList.contains("hover"))),p=h.find((e=>e.classList.contains("hover")))):(h=Array.from(f),c=h.findIndex((e=>e.classList.contains("hover"))),p=h.find((e=>e.classList.contains("hover"))))):(h=Array.from(f),c=h.findIndex((e=>e.classList.contains("hover"))),p=h.find((e=>e.classList.contains("hover")))),40===e.keyCode&&(e.preventDefault(),i.classList.contains("cmp-form-text--text-entry-dropdown")&&0===n.value.length?(l(s),h.forEach((e=>e.style.display="block"))):l(s),-1!==c?(h[c].classList.remove("hover"),c+1===h.length?h[0].classList.add("hover"):h[c+1].classList.add("hover")):h.length>0&&h[0].classList.add("hover")),38===e.keyCode&&(-1!==c?(h[c].classList.remove("hover"),0===c?h[h.length-1].classList.add("hover"):h[c-1].classList.add("hover")):h.length>0&&h[0].classList.add("hover")),13===e.keyCode)if(e.preventDefault(),document.activeElement!=n||p)if(p){let e=p.innerText,t=p.getAttribute("value"),r=i.querySelector(".cmp-form-text--dropdown-input-hidden");n.value=e,n.setAttribute("value",e),r.setAttribute("value",t),r.value=t,p.classList.remove("hover"),d(i,e),u(s),m(i,s)}else{let e=o.value.toLowerCase();t=a.querySelectorAll('.cmp-form-text--dropdown-list__item:not([style*="display:none"]):not([style*="display: none"])'),t.forEach((t=>{t.textContent.toLowerCase()===e&&d(r,e)})),m(i,s)}else n.parentElement.classList.contains("cmp-form-text--dropdown-active")?u(s):l(s);27===e.keyCode&&u(s)}if(document.addEventListener("click",(function(){const e=document.querySelector(".cmp-form-text--dropdown .cmp-form-text--dropdown-list__active"),t=document.querySelectorAll(".cmp-form-text--dropdown label.cmp-form-text__label-active");e&&u(e),t.forEach((e=>{const t=e.parentElement.querySelector("input");""==t.value&&(e.classList.remove("cmp-form-text__label-active"),t.placeholder=e.innerText)}))})),c.forEach((e=>{const t=e.querySelector(".cmp-form-text__text");if(t){t.addEventListener("keydown",(n=>{f(n,t,e)})),e.classList.contains("cmp-form-text--text-entry-dropdown")||(t.addEventListener("click",(e=>p(e))),t.addEventListener("keydown",(e=>(9!==e.keyCode&&e.preventDefault(),!1)))),t.addEventListener("focus",(function(e){e.target.getAttribute("value")||(e.target.parentElement.parentElement.firstElementChild.classList.add("cmp-form-text__label-active"),e.target.setAttribute("placeholder",""))})),e.querySelector(".cmp-form-text--dropdown-box__arrow-icon").addEventListener("click",(e=>p(e)));const n=e.querySelector(".cmp-form-text--dropdown-list");if(n){let r=n.querySelectorAll(".cmp-form-text--dropdown-list__item"),o=e.querySelector(".cmp-form-text--dropdown-input-hidden");r&&r.forEach((e=>{e.addEventListener("click",(()=>{t.value=e.textContent,t.setAttribute("value",e.textContent),o.value=e.textContent,o.setAttribute("value",e.getAttribute("value"))}))})),n.addEventListener("click",(function(){n.classList.contains("cmp-form-text--dropdown-list__active")&&u(n)}))}e.querySelectorAll("li.cmp-form-text--dropdown-list__item").forEach((r=>{let o=e.querySelector(".cmp-form-text--dropdown-input-hidden");o&&(r.classList.contains("cmp-form-text--dropdown-list__item--selected")&&(t.setAttribute("value",r.innerHTML),t.value.length>0&&t.parentElement.parentElement.firstElementChild.classList.add("cmp-form-text__label-active"),o.setAttribute("value",r.getAttribute("value"))),r.addEventListener("mousedown",(r=>{d(e,r.target.innerText),t.setAttribute("value",r.target.innerHTML),n.parentElement.parentElement.firstElementChild.classList.contains("cmp-form-text__label-active")||n.parentElement.parentElement.firstElementChild.classList.add("cmp-form-text__label-active"),o.setAttribute("value",r.target.getAttribute("value"))})))}))}})),o){function h(e){let t=o.value.toLowerCase();const n=e.target.parentElement.parentElement.querySelector(".cmp-form-text--dropdown-list");e.target.setAttribute("placeholder","");for(let e=0;e-1&&t.length>2?(i[e].style.display="block",n&&l(n),i[e].addEventListener("mousedown",(()=>{o.value=r,o.setAttribute("value",r),o.blur(),a.classList.remove("cmp-form-text--dropdown-list__active"),a.parentElement.classList.remove("cmp-form-text--dropdown-active")}))):i[e].style.display="none"}}a=r.querySelector(".cmp-form-text--dropdown-list"),t=r.querySelectorAll('.cmp-form-text--dropdown-list__item:not([style*="display:none"]):not([style*="display: none"])'),n=Array.from(t),o.addEventListener("keyup",(e=>{o.value.length>0&&9!==e.keyCode?h(e):8===e.keyCode&&(l(a),i.forEach((e=>e.style.display="block")))})),o.addEventListener("input",(()=>{const e=n.find((e=>e.classList.contains("cmp-form-text--dropdown-list__item--selected")));e&&e.classList.remove("cmp-form-text--dropdown-list__item--selected")}))}}},5969:function(){const e=document.querySelectorAll(".cmp-form-dynamicdropdown"),t=0!==e.length;if(t){let c={},l="",u="",d=0;const p=(e,t,n,r=!1,...o)=>{t in c||(c[t]=[]);const a=(...e)=>n(...o,...e);c[t].push({node:e,handler:a,capture:r}),e.addEventListener(t,a,r)},m=(e,t)=>{c[t]&&(c[t].filter((({node:t})=>t===e)).forEach((({node:e,handler:n,capture:r})=>e.removeEventListener(t,n,r))),c[t]=c[t].filter((({node:t})=>t!==e)))};function n(e){let t=document.querySelectorAll(".cmp-form-text--dropdown-list");t&&t.forEach((e=>{e.classList.remove("cmp-form-text--dropdown-list__active"),e.parentElement.classList.remove("cmp-form-text--dropdown-active")})),e.classList.add("cmp-form-text--dropdown-list__active"),e.parentElement.classList.add("cmp-form-text--dropdown-active"),e.style.height="auto"}function r(e){e.style.height="0px",e.classList.remove("cmp-form-text--dropdown-list__active"),e.parentElement.classList.remove("cmp-form-text--dropdown-active"),""!==e.parentElement.querySelector(".cmp-form-text--dropdown-input").value&&e.parentElement.parentElement.querySelector(".cmp-form-text__error").classList.remove("active")}function o(e,t){const n="cmp-form-text--dropdown-list__item--selected";e.querySelectorAll("li.cmp-form-text--dropdown-list__item").forEach((e=>{e.textContent.toLowerCase().trim()===t.toLowerCase().trim()?e.classList.contains(n)||e.classList.add(n):e.classList.remove(n)}))}function a(e,t){t.stopPropagation();const o=e.querySelector(".cmp-form-text--dropdown-list");o&&(o.classList.contains("cmp-form-text--dropdown-list__active")?r(o):n(o))}function i(e,a,i,s,c,l){const p=c.querySelector(".cmp-form-text--dropdown-list");if(p){let m,f,h=p.querySelectorAll(".cmp-form-text--dropdown-list__item"),y=[];if(y=Array.from(h),m=y.findIndex((e=>e.classList.contains("hover"))),f=y.find((e=>e.classList.contains("hover"))),40===l.keyCode&&(n(p),-1!==m?(y[m].classList.remove("hover"),m+1===y.length?y[0].classList.add("hover"):y[m+1].classList.add("hover")):y.length>0&&y[0].classList.add("hover")),38===l.keyCode&&(-1!==m?(y[m].classList.remove("hover"),0===m?y[y.length-1].classList.add("hover"):y[m-1].classList.add("hover")):y.length>0&&y[0].classList.add("hover")),13===l.keyCode&&(l.preventDefault(),document.activeElement==s&&(s.parentElement.classList.contains("cmp-form-text--dropdown-active")?r(p):n(p)),f&&d>=Array.from(a).indexOf(l.target))){let n=f.innerText,d=c.querySelector(".cmp-form-text--dropdown-input-hidden");u=d.value,s.value=n,s.setAttribute("value",n),d.setAttribute("value",n),d.value=n,f.classList.remove("hover"),o(c,n),r(p),t&&g(e,a,i,l)}27===l.keyCode&&r(p)}}const f=e=>{e.target.getAttribute("value")||(e.target.parentElement.parentElement.firstElementChild.classList.add("cmp-form-text__label-active"),e.target.setAttribute("placeholder",""))};function s(e,n,s,c,l=!0){const d=c.querySelector(".cmp-form-text__text"),h=c.querySelector(".cmp-form-text--dropdown-box__arrow-icon");if(m(d,"click"),m(d,"keydown"),m(d,"focus"),m(h,"click"),d&&(p(d,"paste",(e=>e.preventDefault())),p(d,"click",a,!1,c),p(h,"click",a,!1,c),p(d,"keydown",i,!1,e,n,s,d,c),p(d,"focus",f),l)){const a=c.querySelector(".cmp-form-text--dropdown-list");if(a){let i=a.querySelectorAll(".cmp-form-text--dropdown-list__item"),l=c.querySelector(".cmp-form-text--dropdown-input-hidden");i&&i.forEach((e=>{e.addEventListener("click",(function(){u=l.value,d.value=e.textContent,d.setAttribute("value",e.textContent),l.value=e.textContent,l.setAttribute("value",e.textContent),""!==d.value?d.setAttribute("aria-invalid","false"):d.setAttribute("aria-invalid","true")}))})),a.addEventListener("click",(function(){a.classList.contains("cmp-form-text--dropdown-list__active")&&r(a)})),c.querySelectorAll("li.cmp-form-text--dropdown-list__item").forEach((r=>{let i=c.querySelector(".cmp-form-text--dropdown-input-hidden");i&&(c.parentElement.classList.contains("cmp-form-text--hide")&&1==c.querySelectorAll("li.cmp-form-text--dropdown-list__item").length&&i.setAttribute("value",r.getAttribute("value")),r.classList.contains("cmp-form-text--dropdown-list__item--selected")&&!c.parentElement.classList.contains("cmp-form-text--hide")&&(d.setAttribute("value",r.innerHTML),d.value.length>0&&d.parentElement.parentElement.firstElementChild.classList.add("cmp-form-text__label-active"),i.setAttribute("value",r.value),i.value=r.value),r.addEventListener("mousedown",(r=>{o(c,r.target.innerText),d.setAttribute("value",r.target.innerHTML),a.parentElement?.parentElement.firstElementChild.classList.contains("cmp-form-text__label-active")||a.parentElement?.parentElement.firstElementChild.classList.add("cmp-form-text__label-active"),i.setAttribute("value",r.target.value),t&&g(e,n,s,r)})))}))}}}const h=e=>{const t={},n=e.children;return n&&Array.from(n).forEach((e=>{const n=e.firstChild.textContent.replace(/\n/g,"").replace(/\s+/g," ").trim();let r={};0!==e.children.length&&(r={...h(e.children[0])}),t[n]={...r}})),{...t}};document.addEventListener("click",(function(){const e=document.querySelector(".cmp-form-text--dropdown-list__active"),t=document.querySelectorAll(".cmp-form-dynamicdropdown label.cmp-form-text__label-active");e&&r(e),t.forEach((e=>{const t=e.parentElement.querySelector("input");""==t.value&&(e.classList.remove("cmp-form-text__label-active"),t.placeholder=e.innerText)}))}));const g=(e,t,n,r)=>{const o=r.target.parentElement.parentElement.querySelector("input"),a=Array.from(t).indexOf(o);d=a+1;const i=e.length-1,s=[];if(t[a].getAttribute("value")!==u&&a{const o=e.length-1;l=e[r+1].parentElement.querySelector("label").innerText;for(let a=1;r+a<=o;a++){dropdown=e[r+a],input=t[r+a],inputHidden=dropdown.querySelector(".cmp-form-text--dropdown-input-hidden"),label=dropdown.parentElement.querySelector("label"),dropdown.querySelector("ul")?.remove(),label.classList.remove("cmp-form-text__label-active"),input.placeholder=label.innerText;let o=document.createElement("ul");o.classList.add("cmp-form-text--dropdown-list");const i=document.createElement("li");i.classList.add("cmp-form-text--dropdown-list__item"),i.setAttribute("value",`First choose from ${l}`),i.innerHTML=`First choose from ${l}`,o.appendChild(i),dropdown.appendChild(o),s(e,t,n,dropdown,!1),input.value="",inputHidden.value=""}},v=(e,t,n,r=0,o=[])=>{const a=e[r];a.querySelector("ul")?.remove();let i=document.createElement("ul");i.classList.add("cmp-form-text--dropdown-list");const c=o.reduce(((e,t)=>e?e[t]:null),n);Object.keys(c).forEach((e=>{const t=document.createElement("li");t.classList.add("cmp-form-text--dropdown-list__item"),t.setAttribute("value",e),t.innerHTML=e,i.appendChild(t),a.appendChild(i),1==Object.keys(c).length&&a.parentElement.classList.contains("cmp-form-text--hide")&&(t.parentElement.parentElement.querySelector(".cmp-form-text--dropdown-input").classList.add("cmp-form-text__label-active"),t.classList.add("cmp-form-text--dropdown-list__item--selected"),t.parentElement.style.height="0px")})),s(e,t,n,a)};e.forEach((e=>{const t=e.querySelectorAll('.cmp-form-text__text.cmp-form-text--dropdown-input[type="text"]'),n=e.querySelector(".cmp-form-dynamicdropdown__text ul"),r=e.querySelectorAll(".cmp-form-dynamicdropdown .cmp-form-text--dropdown-box");if(n){const e=h(n);y(r,t,e,-1),v(r,t,e)}}))}},3204:function(){document.addEventListener("click",(function(e){if(e.target.closest(".cmp-embed__play-button")){const t=e.target.closest(".cmp-embed__youtube-cover");if(t){t.style.display="none";const e=t.nextElementSibling;e&&"IFRAME"===e.tagName&&(e.src+="&autoplay=1")}}}))},1298:function(){document.querySelectorAll(".cmp-list--number-list").forEach((e=>{let t=1.6;const n=e.querySelectorAll(".cmp-list--number-list > ol > .cmp-list__item");if(n.length>0){const e=n.length.toString().length;n.forEach(((n,r)=>{const o=(r+1).toString().length,a=e-o;a>0&&(n.style.marginLeft=`calc(${a} * 1ch)`),r+1!==10&&r+1!==100&&r+1!==1e3||(t+=1),n.style.paddingLeft=`calc(${t}ch + 10px)`}))}}))},3660:function(){document.addEventListener("DOMContentLoaded",(()=>{document.querySelectorAll(".cmp-fileupload").forEach((e=>{const t=e?.querySelector(".cmp-fileupload__input"),n=e.querySelector(".cmp-fileupload__link"),r=e.querySelector(".cmp-fileupload__file-uploadsContainer"),o=e?.querySelector(".cmp-fileupload__file-list-title"),a=e?.querySelector(".cmp-fileupload__errorMsg"),i=e?.querySelector(".cmp-fileupload__errorMsgText"),s=["jpeg","jpg","png","doc","docx","pdf"],c=e?.getAttribute("data-required-checkbox"),l=e?.getAttribute("data-required-message");c&&e.addEventListener("focusout",(()=>{clearErrorMessages(),0===t.files.length?m(l||""):f()}));let u=0;n.addEventListener("click",(e=>{e.preventDefault(),t.click()}));const d=e?.querySelector(".cmp-fileupload__mainFileupload");d.addEventListener("click",(()=>t.click())),d.addEventListener("dragover",(e=>{e.preventDefault(),d.classList.add("dragover")})),d.addEventListener("dragleave",(()=>{d.classList.remove("dragover")})),d.addEventListener("drop",(e=>{e.preventDefault(),d.classList.remove("dragover"),d.classList.add("dropped");const t=e.dataTransfer.files;p(t)})),t.addEventListener("change",(e=>{const t=e.target.files;p(t)}));const p=e=>{if(document.querySelectorAll(".cmp-fileupload__file-info").length+e.length>20)return m("Maximum number of files added."),void(t.value="");f(),Array.from(e).forEach((e=>{if(u+=e.size,u>41943040)return m("40MB file size limit reached. Reduce file sizes to upload more."),t.value="",void(u-=e.size);f();const n=e.name.split(".").pop().toLowerCase();if(!s.includes(n))return void m("File type not supported. Try a jpeg, jpg, png, doc, docx, or PDF instead.");f();const o=h(e);r.appendChild(o),g(o)})),0!==document.querySelectorAll(".cmp-fileupload__file-info").length&&o.classList.add("cmp-fileupload--show")},m=e=>{i.textContent=e,a.classList.add("cmp-fileupload--visible")},f=()=>{a.classList.remove("cmp-fileupload--visible")},h=t=>{const n=e?.querySelector(".file-info-template").content.cloneNode(!0),r=n?.querySelector(".cmp-fileupload__file-info"),o=t.name.split(".").pop().toUpperCase(),a=(t.size/1024).toFixed(2)+" KB",i=t.name.substring(0,t.name.lastIndexOf("."));n.querySelector(".cmp-fileupload__file-name").textContent=i,n.querySelector(".cmp-fileupload__file-size").textContent=a,n.querySelector(".cmp-fileupload__file-extension").textContent=o;const s=n?.querySelector(".cmp-fileupload__cross-icon");return s.addEventListener("click",(e=>{e.target.closest(".cmp-fileupload__cross-icon")&&(r.classList.add("cmp-fileupload__deleteProgressBar"),setTimeout((()=>{r.classList.add("show-delete-options")}),200))})),r.addEventListener("click",(t=>{if(t.target.classList.contains("cmp-fileupload__delete-file")){const t=r.querySelector(".cmp-fileupload__trash");t.classList.add("open");const n=r?.querySelector(".cmp-fileupload__file-representation");n.classList.add("animate"),setTimeout((()=>{t.classList.remove("open");r.querySelector(".cmp-fileupload__delete-options").classList.add("cmp-fileupload__faded"),r.classList.remove("cmp-fileupload__deleteProgressBar")}),900),setTimeout((()=>{r.classList.add("cmp-fileupload--FileInfoDeleteTrans")}),1300),setTimeout((()=>{r.remove(),0===e?.querySelectorAll(".cmp-fileupload__file-info").length&&e?.querySelector(".cmp-fileupload__file-list-title").classList.remove("cmp-fileupload--show")}),1500)}t.target.classList.contains("cmp-fileupload__cancel-delete")&&(r.classList.remove("cmp-fileupload__deleteProgressBar"),r.classList.remove("show-delete-options"),setTimeout((()=>{r.classList.add("cmp-fileupload--cancel-animation")}),300),setTimeout((()=>{r.classList.add("cmp-fileupload__file-details"),r.classList.remove("cmp-fileupload--cancel-animation")}),500))})),r},g=e=>{const t=e?.querySelector(".cmp-fileupload__progress-bar"),n=e?.querySelector(".cmp-fileupload__progress-bar div"),r=e?.querySelector(".cmp-fileupload__progress-percentage"),o=e?.querySelector(".cmp-fileupload__cross-icon");let a=0;const i=setInterval((()=>{a+=5,n.style.width=`${a}%`,r.textContent=`${a}%`,a>=100&&(clearInterval(i),n.classList.add("cmp-fileupload__faded"),t.classList.add("cmp-fileupload__hidden"),r.classList.add("cmp-fileupload__hidden"),setTimeout((()=>{o.style.display="block",e.classList.add("file-info--padded")}),200))}),100)}}))}))},6972:function(e,t,n){"use strict";var r=n(9904),o=n(9880);const a=document.querySelectorAll(".footer");!function(){let e=0;const t=t=>{const n=document.querySelector(".top_sider");if(n&&!n.getAttribute("footerInitialized")){e++;const o=document.getElementsByClassName("bottom_width");if(0!==o.length){n.setAttribute("footerInitialized","true");for(var r=0;re.addEventListener("click",(function(e){e.stopPropagation()}))));const a=(e,t)=>{const n=Math.ceil(e.children.length/t);e.style.gridTemplateRows=`repeat(${n}, auto)`},i=document.querySelector(".footer_policies > .policies_container");if(i){const e=()=>{const e=window.innerWidth>0?window.innerWidth:screen.width;e<=413&&a(i,1),e>413&&e<=598&&a(i,2),e>598&&e<=783&&a(i,3),e>783&&a(i,4)};e(),window.addEventListener("resize",e)}const s=document.querySelectorAll(".footer-social-media a"),c=document.querySelectorAll(".footer-social-media cq");0===s.length&&0===c.length&&document.querySelector(".footer-social-media")&&document.querySelector(".footer-social-media").remove(),clearInterval(t)}else console.log("Footer not ready in HTML - elements required: accordionItems =\n document.getElementsByClassName('bottom_width');",o),e>30&&(console.log("Aborting attempts to initialize footer"),clearInterval(t))}};t();const n=setInterval((()=>t(n)),150)}(),a.forEach((e=>{const t=e.clientHeight,n=e.getAttribute("data-videoUrlMobile"),o=e.getAttribute("data-videoUrlDesktop"),a=e.getAttribute("data-altTextFallback"),i=(e.getAttribute("data-alttext"),e.getAttribute("data-fallbackMobileImageUrl")),s=e.getAttribute("data-fallbackDesktopImageUrl"),c=(e.getAttribute("data-imageUrlMobile"),e.getAttribute("data-imageUrlDesktop"),e.getAttribute("data-layout")),l=(0,r.S)(e,i,s,e,t);var u;"auroralight"===c?e.classList.remove("cmp-footer--dark"):"animated"===c?l.renderVideo(o,n,a||""):"liquorice"===c&&(u=e.parentElement)&&u.classList.contains("footer")&&u.classList.add("cmp-footer--dark")})),a.forEach((e=>{null!==e&&"footer"===e.className&&(0,o.lg)(e,"footer",o.fS);const t=[];e.querySelectorAll(".bottom_width").forEach((e=>{const n=e.querySelector(".style-intro-copy"),r=n?n.textContent.toLowerCase().trim():o.fS;e.setAttribute("data-analytics-section-title",r),t.push(r)}));let n=0;e.querySelectorAll(".bottom_width").forEach((e=>{e.querySelectorAll(".bottom_footer_link").forEach((e=>{const r=e.textContent.toLowerCase().trim()||o.fS;(0,o.s0)(e,"textlink",t[n]+":"+r)})),n++})),e.querySelectorAll(".cmp-link__link").forEach((e=>{const t=e.getAttribute("title")||o.u3;(0,o.s0)(e,e.querySelector("svg")?"image":"textlink",t)}));const r=e.querySelector(".footer_policies"),a=r.querySelector(".style-intro-copy"),i=a?a.textContent.toLowerCase().trim():o.fS;r.setAttribute("data-analytics-section-title",i),e.querySelectorAll(".policies_link").forEach((e=>{const t=e.textContent.toLowerCase().trim()||o.fS;(0,o.s0)(e,"textlink",i+":"+t)})),e.querySelectorAll(".cmp-link").forEach((e=>{const t=e.querySelector(".cmp-link__link"),n=t?t.textContent.toLowerCase().trim():o.fS;e.setAttribute("data-analytics-section-title",n)})),e.querySelectorAll(".cmp-locationsearch__searchicon").forEach((e=>{(0,o.s0)(e,"button",o.u3)}))}))},3729:function(e,t,n){"use strict";n.d(t,{E0:function(){return s},W9:function(){return i},_G:function(){return o}});const r=document.body.hasAttribute("data-cmp-data-layer-enabled"),o=r?window.adobeDataLayer=window.adobeDataLayer||[]:void 0,a=e=>{for(const[t,n]of Object.entries(e))n&&(e[t]=n.toString().trim().substring(0,100).toLowerCase().replace(/(<([^>]+)>)/gi,""));return e},i=(e,t,n,i)=>{if(r){const r={event_trigger:"form_submission",form_name:e,form_submission_status:t,form_submission_message:n,...i};o.push({event:"form_submission",data:a(r)})}},s=e=>{let t=Object.assign({},e);r&&o.push({event:"form_field_validation",data:a(t)})}},3296:function(){const e=document.querySelectorAll(".cmp-form-options__field--checkbox");if(0!==e.length){function t(){this.hasAttribute("checked")?this.removeAttribute("checked"):this.setAttribute("checked","")}e.forEach((e=>{e.addEventListener("change",t)}))}},8992:function(){const e=document.querySelectorAll("[data-hidefieldids]");!!document.querySelector('[data-wcmmode="EDIT"]')||e.forEach((e=>{const t=e.getAttribute("data-hidefieldids").split(","),n=e.getAttribute("data-starthidden"),r=e.getAttribute("data-clearonhide"),o=t.map((e=>document.getElementById(e))),a=o.map((e=>e.required));"true"===n&&o.forEach((e=>{e.parentElement.classList.add("threedigital-hide"),e.required=!1})),e.addEventListener("change",(()=>{o.forEach(((e,t)=>{const n=window.getComputedStyle(e.parentElement).display,o=e.parentElement.classList;"none"!==n?(o.add("threedigital-hide"),e.required=!1,"true"===r&&(e.value="")):(o.remove("threedigital-hide"),!0===a[t]&&(e.required=!0))}))}))}))},6680:function(e,t,n){"use strict";n.d(t,{HB:function(){return s},V9:function(){return i},ex:function(){return l},ho:function(){return a}});var r=n(7588),o=n(5842);const a="form-text-port-in-datepicker",i="data-cmp-formatted-date",s=e=>{e===a?(0,r.C)():(0,o.b)(e)},c=e=>1===e.toString().length?`0${e}`:e,l=(e,t)=>{if(e.length>0){let r=e[0];if(document.querySelector("#pac-form"))var n=`${r.getFullYear()}-${c(r.getMonth()+1)}-${c(r.getDate())}`;else n=`${r.getDate()}/${c(r.getMonth()+1)}/${r.getFullYear()}`;t.element.setAttribute(i,n)}}},5842:function(e,t,n){"use strict";n.d(t,{b:function(){return a}});var r=n(8527),o=n(6680);const a=e=>{const t=(0,r.Z)(`#${e}`,{mode:"single",showMonths:1,defaultDate:(new Date).setHours(0,0,0,0),disableMobile:!0,clickOpens:!1,dateFormat:"j F Y",monthSelectorType:"static",allowInput:!0,static:!0,locale:{weekdays:{shorthand:["S","M","T","W","T","F","S"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},onOpen:function(e,t,n){const r=n.element.closest(".flatpickr-wrapper").querySelector(".cmp-form-text_icon-arrow");r&&r.classList.remove("cmp-form-text_icon-arrow-down"),r&&r.classList.add("cmp-form-text_icon-arrow-up")},onClose:function(e,t,n){const r=n.element.closest(".flatpickr-wrapper").querySelector(".cmp-form-text_icon-arrow");r&&r.classList.remove("cmp-form-text_icon-arrow-up"),r&&r.classList.add("cmp-form-text_icon-arrow-down")},onReady:function(e,n,r){const a=r.currentYearElement,i=a.parentElement.children;for(let e in i)i.hasOwnProperty(e)&&(i[e].style.display="none");const s=document.createElement("select");for(let e=0;e<1e4;e++){const t=document.createElement("option");t.value=""+e,t.text=""+e,s.appendChild(t)}s.addEventListener("change",(function(e){a.value=e.target.value,r.currentYear=parseInt(e.target.value),r.redraw()})),s.className="flatpickr-monthDropdown-months",s.style.width="100%",s.id="flatpickr-custom-year-select",s.value=r.currentYearElement.value,s.setAttribute("onmousedown","return false;"),s.setAttribute("onclick","return false;"),a.parentElement.appendChild(s);r.element.closest(".flatpickr-wrapper").querySelector(".flatpickr-input").setAttribute("readonly",""),r.element.addEventListener("click",(function(){t.toggle()})),(0,o.ex)(e,r)},onMonthChange:function(e,t,n){n.element.closest(".flatpickr-wrapper").querySelector(".flatpickr-monthDropdown-months").value=""+n.currentYear},onChange:function(e,t,n){(0,o.ex)(e,n)}})}},7588:function(e,t,n){"use strict";n.d(t,{C:function(){return a}});var r=n(8527),o=n(6680);const a=()=>{const e=[new Date(2026,0,1),new Date(2025,3,18),new Date(2025,3,21),new Date(2025,4,5),new Date(2025,4,26),new Date(2025,7,25),new Date(2025,11,23),new Date(2025,11,24),new Date(2025,11,25),new Date(2025,11,26),new Date(2025,11,31)],t=t=>!!e.find((e=>{return r=t,(n=e).getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()&&n.getDate()===r.getDate();var n,r})),n=(e=>{const n=[],r=[];let o=(new Date).getHours()<17?0:1;const a=e,i=(e=0)=>new Date(Date.now()+24*e*60*60*1e3);for(;;){const e=i(++o);if(t(e)||0===e.getDay()||6===e.getDay()||(n.push(e),r.push(e.getMonth())),a===o)break}return{workingDays:n,enabledMonths:[...new Set(r)]}})(30).workingDays;const a=(0,r.Z)(`#${o.ho}`,{mode:"single",enable:n,showMonths:1,defaultDate:new Date(n[0]).setHours(0,0,0,0),disableMobile:!0,clickOpens:!1,dateFormat:"j F Y",monthSelectorType:"static",allowInput:!0,static:!0,locale:{weekdays:{shorthand:["S","M","T","W","T","F","S"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},minDate:(i=1,(s=new Date(n[0])).setDate(s.getDate()-i),s),maxDate:n[n.length-1],onOpen:function(e,t,n){const r=n.element.closest(".flatpickr-wrapper").querySelector(".cmp-form-text_icon-arrow");r&&r.classList.remove("cmp-form-text_icon-arrow-down"),r&&r.classList.add("cmp-form-text_icon-arrow-up")},onClose:function(e,t,n){const r=n.element.closest(".flatpickr-wrapper").querySelector(".cmp-form-text_icon-arrow");r&&r.classList.remove("cmp-form-text_icon-arrow-up"),r&&r.classList.add("cmp-form-text_icon-arrow-down")},onReady:function(e,t,n){const r=n.currentYearElement,i=r.parentElement.children;for(let e in i)i.hasOwnProperty(e)&&(i[e].style.display="none");const s=document.createElement("select");for(let e=0;e<1e4;e++){const t=document.createElement("option");t.value=""+e,t.text=""+e,s.appendChild(t)}s.addEventListener("change",(function(e){r.value=e.target.value,n.currentYear=parseInt(e.target.value),n.redraw()})),s.className="flatpickr-monthDropdown-months",s.style.width="100%",s.id="flatpickr-custom-year-select",s.value=n.currentYearElement.value,s.setAttribute("onmousedown","return false;"),s.setAttribute("onclick","return false;"),r.parentElement.appendChild(s);n.element.closest(".flatpickr-wrapper").querySelector(".flatpickr-input").setAttribute("readonly",""),n.element.addEventListener("click",(function(){a.toggle()})),(0,o.ex)(e,n)},onMonthChange:function(e,t,n){n.element.closest(".flatpickr-wrapper").querySelector(".flatpickr-monthDropdown-months").value=""+n.currentYear},onChange:function(e,t,n){(0,o.ex)(e,n)}});var i,s}},294:function(){document.querySelectorAll(".cmp-form-text-input-hidden--dropdown").forEach((e=>{let t=e.hasAttribute("data-showvalue")?e.getAttribute("data-showvalue"):"",n=e.hasAttribute("data-showfields")?e.getAttribute("data-showfields"):"";document.querySelector(`.cmp-form-text--dropdown-list li[value="${t}"]`)?.setAttribute("data-showfields",n),e.remove()}));const e=document.querySelectorAll(".cmp-form-text--dropdown");let t=[],n=[];e.forEach((e=>{e.querySelector(".cmp-form-text--dropdown-list").addEventListener("click",(e=>{for(e.currentTarget.querySelectorAll("li").forEach((e=>{e.classList.contains("cmp-form-text--dropdown-list__item--selected")?e.hasAttribute("data-showfields")&&e.getAttribute("data-showfields").split(",").forEach((e=>{n.push(e)})):e.hasAttribute("data-showfields")&&e.getAttribute("data-showfields").split(",").forEach((e=>{t.push(e)}))})),t=t.filter((e=>!n.includes(e)));n.length;){let e=n.shift();document.querySelector("#"+e).value="",document.querySelector("#"+e).parentElement.classList.remove("cmp-form-input-text--hide")}for(;t.length;){let e=t.shift();document.querySelector("#"+e).value="",document.querySelector("#"+e).parentElement.classList.add("cmp-form-input-text--hide")}}))}))},5834:function(e,t,n){"use strict";n.d(t,{B:function(){return N}});var r=n(6680),o=n(3729);var a=(e,t)=>{if("createEvent"in document){let n=new Event(t,{bubbles:!1,cancelable:!0});e.dispatchEvent(n)}else{let n=document.createEventObject();n.eventType=t,e.fireEvent("on"+n.eventType,n)}},i=n(7368),s=n(3117);const c="form-text-port-in-datepicker",l="cmp-form-text--number",u="button-minus",d="button-plus",p=document.querySelector(".primarycontainer.showhide-content .cmp-containerprimary__inner .carousel"),m=document.querySelector(".primarycontainer.showhide-content .cmp-containerprimary__inner .shortcuts2-component ");window.fieldValidationDataLayer=window.fieldValidationDataLayer||{};let f=document.querySelector(".cmp-form-dateinput__day input"),h=document.querySelector(".cmp-form-dateinput__month input"),g=document.querySelector(".cmp-form-dateinput__year input"),y=document.querySelectorAll(".cmp-form-dateinput input"),v=document.querySelectorAll(".cmp-form-dateinput .text"),b=document.querySelectorAll(".cmp-form-range .text"),_=document.querySelectorAll(".cmp-form-autocomplete"),S=document.querySelector(".cmp-form-range__min input"),w=document.querySelector(".cmp-form-range__max input"),E=document.querySelector(".h-captcha-container"),x=document.querySelector(".cmp-form__h-captcha-error"),k=!1,A=document.querySelectorAll(".cmp-form-options--checkbox"),L=document.querySelectorAll(".cmp-form-options--radio"),C=document.querySelectorAll(".cmp-fileupload");const q=e=>{const t=document.getElementById("port-in-form-submit"),n=document.querySelector("form#pac-form")?.parentElement?.classList?.contains("disabled-submit")||!1;t&&n&&(t.disabled=e)},D=()=>{if(v)for(var e=0;e{let t=e.querySelectorAll(".cmp-form-options__field--radio"),n=Array.from(t).filter((e=>e.hasAttribute("required")));if(0!==t.length){const e=Array.from(t).some((e=>e.checked));0!==n.length&&n.forEach(((t,r)=>{P(n,e,t,r)}))}}))}function O(e,t,n){e&&e.includes("/bin/threedigital/changepassword")&&function(e,t){if(!e||!t)return;const n=e.message||e.status;if("string"!=typeof n||""===n.trim())return;let r=document.getElementById("responseMessageDiv");r?r.textContent=n:(r=document.createElement("div"),r.id="responseMessageDiv",r.className="change-password-success",r.textContent=n,t.appendChild(r))}(t,n)}let B=document.querySelector(".cmp-form");if(document.getElementById("form-sim-calculator")&&(B=document.getElementById("form-sim-calculator")),B){fieldValidationDataLayer.form_name=B.getAttribute("name");const F=B.getAttribute("method"),j=B.getAttribute("action"),$=()=>Array.from(B.elements).filter((e=>"BUTTON"!==e.nodeName&&(e.classList.contains("cmp-form-text__text")||e.classList.contains("cmp-form-text--textarea__text")||e.classList.contains("cmp-form-options__field--checkbox")||e.classList.contains("cmp-form-options__field--radio")||e.classList.contains("active")||e.id===c))),R=()=>Array.from(B.elements).filter((e=>"BUTTON"!==e.nodeName&&(e.classList.contains("cmp-form-text__text")||e.classList.contains("cmp-form-text--textarea__text")||e.hasAttribute("checked")||e.id===c)||"hidden"===e.type&&e.parentElement.classList.contains("hidden")));B.noValidate=!0;const V=e=>{const t=e.target?.parentElement?.firstElementChild;if(t&&!t.classList.contains("cmp-form-text__label-active")&&setTimeout((()=>{t.classList.add("cmp-form-text__label-active")}),20),v)for(var n=0;n{t.classList.add("cmp-form-text__label-active")}),20)}},W=()=>{document.querySelectorAll(".cmp-form-input-text--hide").forEach((e=>{e.querySelector("input").required=!1}))},U=()=>{document.querySelectorAll(".cmp-form-input-text--identifier").forEach((e=>{const t=e.querySelector("input");if(!t)return;const n="true"===e.getAttribute("data-cmp-required");e.classList.contains("cmp-form-input-text--hide")||(t.required=n)}))};document.querySelectorAll(".cmp-form-text__text").forEach((e=>{"cmp-form-verification__text"!==e.getAttribute("id")&&e.addEventListener("focus",V)}));const Y=setInterval((()=>{const e=e=>document.querySelectorAll(e).forEach((e=>{if("cmp-form-verification__text"!==e.getAttribute("id")&&e.value.length>0){const t=e.parentElement?.firstElementChild;t&&!t.classList.contains("cmp-form-text__label-active")&&t.classList.add("cmp-form-text__label-active")}}));e(".cmp-form-text__text"),e(".cmp-form-text--textarea__text")}),300);setTimeout((()=>{clearInterval(Y)}),1e3),document.querySelectorAll(".cmp-form-text--textarea__text").forEach((e=>e.addEventListener("focus",V)));const z=[];function G(e){z.includes(e)||z.push(e)}const J=[];function K(e){const t=J.find((t=>t.confirmationId===e.id));if(t){const e=document.querySelector(`#${t.id}`);e&&z.includes(e)&&a(e,"blur")}}document.querySelectorAll("[data-confirmation-id]").forEach((e=>{J.push({id:e.getAttribute("id"),confirmationId:e.getAttribute("data-confirmation-id")})}));for(const De of $())De.addEventListener("invalid",(function(e){fieldValidationDataLayer.event_trigger="invalid",fieldValidationDataLayer.form_field_name=De.getAttribute("name"),"checkbox"!==De.getAttribute("type")&&"radio"!==De.getAttribute("type")&&Z(De),e.preventDefault()})),De.addEventListener("blur",(function(){fieldValidationDataLayer.event_trigger="blur",fieldValidationDataLayer.form_field_name=De.getAttribute("name"),De.classList.contains("cmp-form-text--dropdown-input")&&(fieldValidationDataLayer.form_field_name=De.nextElementSibling.getAttribute("name")),"checkbox"!==De.getAttribute("type")&&"radio"!==De.getAttribute("type")&&Z(De),K(De),G(De)})),De.addEventListener("input",(function(){fieldValidationDataLayer.event_trigger="input",fieldValidationDataLayer.form_field_name=De.getAttribute("name"),z.includes(De)&&Z(De)}));function Z(e){e.setCustomValidity(""),"minValue"===e.getAttribute("name")||"maxValue"===e.getAttribute("name")?le(e):(e!=f&&e!=h&&e!=g||(ce(e),se()),te(e)),e.validity.valid||e.classList.contains("cmp-form-text--dropdown-input")&&0!==e.value.length?ee(e):Q(e)}function X(e,t){e.classList.contains(`${l}__text`)&&document.getElementById(e.id).parentElement.setAttribute("aria-invalid",t.toString())}function Q(e){I(e),ue(e,!0),e.setAttribute("aria-invalid","true"),e.parentElement.classList.add("afterelement-error"),X(e,!0),fieldValidationDataLayer.form_field_validation_status="failed",(0,o.E0)(fieldValidationDataLayer)}function ee(e){const t=de(e);if(t){t.textContent="",ue(e,!1),e.removeAttribute("aria-invalid","false"),e.parentElement.classList.remove("afterelement-error"),X(e,!1);const n=document.getElementById(e.id).parentElement.parentElement.querySelector(".cmp-form-text__error");n&&n.classList.remove("active"),fieldValidationDataLayer.form_field_validation_status="success",(0,o.E0)(fieldValidationDataLayer)}}function te(e){const t=e.getAttribute("data-confirmation-id");if(t){const n=document.getElementById(e.id),r=document.querySelector(`#${t}`);if(r){r.value!==document.querySelector(`#${e.id}`).value?n.setCustomValidity(M(e,"data-cmp-constraint-message")):n.setCustomValidity("")}}}function ne(){if(f&&h&&g)return f.value.length>1&&h.value.length>1&&g.value.length>3}if(0!==A.length&&A.forEach((e=>{let t=e.querySelectorAll(".cmp-form-options__field--checkbox"),n=Array.from(t).filter((e=>e.hasAttribute("required")));0!==t.length&&t.forEach((e=>{e.addEventListener("change",(function(){if(0!==t.length){const e=Array.from(t).some((e=>e.checked));0!==n.length&&n.forEach(((t,r)=>{T(n,e,t,r)}))}}))}))})),0!==L.length&&L.forEach((e=>{let t=e.querySelectorAll(".cmp-form-options__field--radio");0!==t.length&&t.forEach((e=>{e.addEventListener("change",(function(){let e=Array.from(t).filter((e=>e.hasAttribute("required")));if(0!==t.length){const n=Array.from(t).some((e=>e.checked));0!==e.length&&e.forEach(((t,r)=>{P(e,n,t,r)}))}}))}))})),y)for(var H=0;H2&&(this.value=this.value.slice(0,2)):this.value&&this.value.length>4&&(this.value=this.value.slice(0,4))}));function re(){if(f&&h&&g)return f.value+"/"+h.value+"/"+g.value}function oe(e){var t=e.split("/"),n=new Date,r=new Date(+t[2],t[1]-1,+t[0]),o=n.getFullYear()-r.getFullYear(),a=n.getMonth()-r.getMonth();return(a<0||0===a&&n.getDate()2&&"0"===e.value.charAt(0))?t.setCustomValidity(M(e,"data-cmp-constraint-message")):t.setCustomValidity(""))}function le(e){const t=document.getElementById(e.id);S&&w&&S.value.length>0&&w.value.length>0&&(parseInt(S.value)>parseInt(w.value)?t.setCustomValidity(M(e,"data-cmp-constraint-message")):t.setCustomValidity(""))}function ue(e,t){t&&de(e)&&!de(e).parentElement.classList.contains("active")&&de(e).parentElement.classList.add("active")}function de(e){const t=e.getAttribute("aria-describedby");if(!t)return null;const n=t.split(" ").find((e=>e.endsWith("-error")));return document.getElementById(n)}let pe=document.querySelector(".cmp-form-text--text-entry-dropdown"),me=pe&&pe.querySelector(".cmp-form-text--dropdown-input"),fe=pe&&pe.querySelector(".cmp-form-text--dropdown-input-hidden");me&&me.addEventListener("blur",(e=>{we(e.target)})),me&&me.addEventListener("input",(e=>{Se(e.target)}));let he,ge,ye,ve=pe&&pe.querySelectorAll(".cmp-form-text--dropdown-list__item"),be=document.querySelectorAll(".cmp-form-text--dropdown");function _e(e){if(e){let t=e.querySelectorAll(".cmp-form-text--dropdown-list__item"),n=e.querySelector(".cmp-form-text__error__text");for(let r=0;r{n.parentElement.classList.remove("active"),ee(e.querySelector(".cmp-form-text--dropdown-input"))}));if(ve)for(let e=0;e{ee(me)}))}}function Se(e){let t=pe.querySelector(`#${e.id}-error`);e.validity.valid&&t&&ee(e)}function we(e){let t=pe.querySelector(".cmp-form-text--dropdown-list").querySelectorAll(".cmp-form-text--dropdown-list__item"),n=!1,r=pe.querySelector(`#${e.id}-error`),o=me&&me.value;if(r){for(let r=0;r0)}n||(r.textContent=M(e,"data-cmp-constraint-message"),Q(e)),e.validity.valid&&0!=o.length||(fe.setAttribute("value",""),fe.previousElementSibling.setAttribute("value",""))}}function Ee(e,t){const n=t>0?t:1;e.style.width=`${n}ch`}function xe(e){e.click(),e.blur()}function ke(e){e.preventDefault(),e.stopPropagation();let t=e.target.parentNode.querySelector(`.${l}__text`);e.target.className.endsWith(u)?t.value=Number(t.value)-1:e.target.className.endsWith(d)&&(t.value=Number(t.value)+1),a(t,"change"),z.includes(t)&&xe(t)}function Ae(e){e.preventDefault(),e.stopPropagation();let t=e.target.parentNode.querySelector(`.${l}__text`);t.value=e.target.attributes.quantity.value,a(t,"change"),z.includes(t)&&xe(t)}function Le(){let e=document.querySelector(".cmp-form-error-notification-box"),t=document.querySelectorAll(".cmp-form-text__error"),n=document.querySelector(".cmp-form-error-notification-box-list"),r=document.querySelector(".cmp-form-dateinput__day .cmp-form-text__error.active"),o=document.querySelector(".cmp-form-dateinput__month .cmp-form-text__error.active"),a=document.querySelector(".cmp-form-dateinput__year .cmp-form-text__error.active"),i=document.createElement("li"),s=document.querySelector(".postcodelookup");n&&(n.innerHTML="",t&&t.forEach((t=>{if(me=t.parentElement.querySelector(".cmp-form-text--dropdown-input"),me&&(""!==me?.value||1!=me?.required||t.parentElement.classList.contains("cmp-form-text--hide")?(t.classList.remove("active"),me?.setAttribute("aria-invalid",!1)):(t.classList.add("active"),me?.setAttribute("aria-invalid",!0))),s&&""===t.parentElement.parentElement.querySelector("[name=location]")?.value&&t.classList.add("active"),t.classList.contains("active")){var c,l=document.createElement("li"),u=t.parentElement.querySelector("label"),d=t.parentElement.querySelector("input"),p=t.parentElement.parentElement.querySelector("legend");u&&d&&""===d.value?c=document.createTextNode("'"+u.textContent+"' field is required"):u?c=document.createTextNode("'"+u.textContent+"' field is incorrect"):d.checked||(c=document.createTextNode("'"+p?.textContent+"' field is required")),t.classList.contains("cmp-form-dateinput__error")?r||o||a||(l&&l.appendChild(c),n&&n.appendChild(l)):(l&&l.appendChild(c),n&&n.appendChild(l),e&&e.scrollIntoView({behavior:"smooth",block:"center"}))}!e||n.hasChildNodes(l)||n.hasChildNodes(i)?e.style.display="block":e.style.display="none"})),E&&!k&&(i.textContent="'hCaptcha' field must be selected",e&&e.querySelector("ul").appendChild(i),e.style.display="block",e&&e.scrollIntoView({behavior:"smooth",block:"center"})))}function Ce(){if(E){const e=document.querySelector(".h-captcha-response");!(e?e.value:"")&&x&&(x.style.display=k?"none":"flex")}}function qe(){let e=document.querySelector(".cmp-form-text__error"),t=document.querySelector(".verification-form-text"),n=document.querySelector(".verification-form-text-success"),r=document.querySelector(".cmp-form-text__text"),o=document.querySelector(".cmp-form-text"),a=document.querySelector(".cmp-button"),c=document.querySelector(".showhide-content");e&&t&&n&&r&&o&&a&&c&&(0!=r.value.length&&e&&!e.classList.contains("active")&&(E&&k||!E)?(t.style.display="none",n.style.display="block",o.style.display="none",a.style.display="none",c.style.display="block",p&&(0,i.u)(),m&&(0,s.u)()):(t.style.display="block",n.style.display="none",o.style.display="flex",a.style.display="block",c.style.display="none"))}be&&be.forEach((e=>{e.classList.contains("cmp-form-text--text-entry-dropdown")||(he=e)})),_e(he),_e(pe),document.addEventListener("DOMContentLoaded",(()=>{(0,r.HB)(r.ho),(0,r.HB)("default-datepicker"),document.querySelectorAll("form").forEach((e=>{const t=e.getAttribute("action");if(t&&t.includes("/bin/threedigital/changepassword")){let t=!1,n="";try{const r=sessionStorage.getItem("persist:customerProfilePersistor"),o=r?JSON.parse(r):{},a=o?.customer,i=a?JSON.parse(a):{},s=i?.owningIndividual||{};n=s?.emailNotification||"",t="true"===sessionStorage.getItem("isCustomerLoggedIn");const c=e.querySelector("input[name='email']");t&&n&&c&&(c.value=n,c.setAttribute("readonly",!0))}catch(e){console.error("Error fetching session data:",e)}}}))})),document.querySelectorAll(`.${l}`).forEach((e=>{let t=e;if(t){const e=t.querySelector(`.${l}__text`);t.addEventListener("click",(function(t){(t.clientX>e.getBoundingClientRect().x+e.getBoundingClientRect().width||t.clientX{xe(e)}));const r=t.querySelector(`[class$=${d}]`);r.addEventListener("click",ke),r.addEventListener("blur",(()=>{xe(e)}));const o=t.querySelector("[class$=cmp-form-text__link]");o&&o.addEventListener("click",Ae),Ee(e,e.value.length),e.oninput=function(t){let n=t.target.value.toString();n.startsWith("0")&&n.length>1&&(n=n.substring(1)),e.value=n,Ee(e,n.length)},e.addEventListener("change",(function(t){Ee(e,t.target.value.length)}))}})),document.getElementById("verification-form-submit")?ge=document.getElementById("verification-form-submit"):document.getElementById("port-in-form-submit")?(ge=document.getElementById("port-in-form-submit"),ye=document.querySelector(".cmp-form-text--networkcoveragechecker_input")):document.getElementById("contact-us-forms-submit")&&(ge=document.getElementById("contact-us-forms-submit")),ge&&ge.addEventListener("click",(function(e){!function(){const e=document.getElementById("responseMessageDiv");e&&e.parentNode&&e.parentNode.removeChild(e)}(),q(!0),W(),U(),"verification-form-submit"===ge.getAttribute("id")&&(e.preventDefault(),qe());let t=B.reportValidity();function n(){if(document.querySelectorAll('.cmp-form-text--dropdown-input:not([id$="-hidden"])').forEach((e=>{e.required&&""==e.value&&(t=!1)})),t){function e(e,t){let n,r;const a=t?e:JSON.parse(e.response);if(q(!1),a&&a.code&&B.querySelector("#"+a.code))n=B.querySelector("#"+a.code),r=n.querySelector(".cmp-form-error__text").innerText;else if(a&&a.message){n=B.querySelector(".cmp-form-error:first-of-type");const e=a.message;if(e){n.querySelector(".cmp-form-error__text").innerHTML=e,r=e}}if(!e||t||n||(n=B.querySelector(".cmp-form-error:first-of-type")),n){B.querySelectorAll(".cmp-form-error").forEach((e=>{e.classList.remove("active"),e.removeAttribute("aria-invalid")})),n.classList.contains("active")||n.classList.add("active"),n.setAttribute("aria-invalid","true")}var i=n.querySelector("p");i&&i.scrollIntoView({behavior:"smooth",block:"center"}),(0,o.W9)(B.getAttribute("name"),"failed",r)}function n(t){if(q(!1),t.response&&"null"!=t.response){const n=JSON.parse(t.response);if("success"===n.status||"SUCCESS"===n.Header?.ActivityStatusEnum_T||n.SOATransactionID){O(j,n,B);const e=B.getAttribute("name"),t=JSON.stringify({formName:e,data:n});sessionStorage.setItem("form_tracking_success_data",t);const r=B.querySelector("#"+n.code);r&&(r.classList.remove("active"),r.removeAttribute("aria-invalid","false"));const o=B.querySelector("input[name=':redirect']");o&&window.location.replace(o.value)}else e(t)}else e(t)}function a(){let t=B.querySelector(`[name='${c}']`)?.value;t&&"0"==t[0]&&(t=t.replace("0","44")),fetch("/bin/threedigital/numbercheck?MSISDN="+t).then((e=>{if(!e.ok)throw new Error("Number check failed");return e.json()})).then((t=>{if(t)if("fail"===t.status)e(t,!0);else if("success"===t.status){const e=B.getAttribute("data-msisdn-org-name");if(e){const n=B.querySelector(`[name='${e}']`);n&&(n.value=t.Organization)}s()}})).catch((e=>{console.error("Error:",e),(0,o.W9)(B.getAttribute("name"),"failed",e)}))}const i=(t,r,o)=>{const a=new XMLHttpRequest;a.addEventListener("load",(()=>n(a))),a.addEventListener("error",(()=>e(a))),a.open(r,o),a.setRequestHeader("Content-Type","application/json;charset=UTF-8"),a.send(JSON.stringify(t))},s=()=>{let e={};for(const t of R()){const n=t.name.toString();t.getAttribute(r.V9)?e[n]=t.getAttribute(r.V9):""!==n&&(e.hasOwnProperty(n)?Array.isArray(e[n])?e[n].push(t.value.toString()):e[n]=[e[n],t.value.toString()]:e[n]=t.value.toString())}const t=document?.querySelector(".cmp-fileupload__input");if(t&&t?.files.length>0){const n=t.files;e.files=[];const r=(e,t)=>{const n=new FileReader;n.onload=()=>{const e=n.result&&n.result.includes(",")?{content:n.result.split(",")[1]}:null;e&&t(e)},n.readAsDataURL(e)};let o=0;for(const t of n)r(t,(t=>{e.files.push(t),o++,o===n.length&&j&&i(e,F,j)}))}else j&&i(e,F,j)},c=B.getAttribute("data-msisdn-number-name");c?a():s()}else q(!1)}if(D(),Ce(),function(e){0!==e.length&&e.forEach((e=>{let t=e.querySelectorAll(".cmp-form-options__field--checkbox"),n=Array.from(t).filter((e=>e.hasAttribute("required")));if(0!==t.length){const e=Array.from(t).some((e=>e.checked));0!==n.length&&n.forEach(((t,r)=>{T(n,e,t,r)}))}}))}(A),N(L),function(e){e.forEach((e=>{const t=e.querySelector(".cmp-fileupload__input"),n=e.querySelector(".cmp-fileupload__errorMsg"),r=e.querySelector(".cmp-fileupload__errorMsgText"),o=e.dataset.requiredCheckbox,a=e.dataset.requiredMessage;var i;t&&n&&r&&(o&&0===t.files.length?(i=a,r.innerHTML=i,r.classList.add("cmp-fileupload__error-message"),n.classList.add("cmp-fileupload--visible")):(r.textContent="",n.classList.remove("cmp-fileupload--visible")))}))}(C),t&&E&&k)n();else if(t&&!E)n();else{for(const e of $())G(e);(0,o.W9)(B.getAttribute("name"),"failed","form fields are invalid"),q(!1)}"port-in-form-submit"===ge.getAttribute("id")&&Le(),e.preventDefault()})),ye&&ye.addEventListener("keydown",(function(e){"Enter"===e.key&&(e.preventDefault(),ye.blur())}),!0),window.onHCaptchaVerify=function(e){k=!0,x&&(x.style.display="none")},window.onHCaptchaExpired=function(){k=!1}}},1806:function(){const e=document.querySelectorAll(".cmp-stepcontainer");let t,n=document.querySelector(".cmp-form-error-notification-box-list");e.forEach((e=>{const r=e.querySelector('[data-stepId="step-2"]'),o=e.querySelector('[data-stepId="step-3"]'),a=e.querySelector('[data-stepId="step-1"]'),i=e.querySelectorAll(".cmp-formstep__section"),s=e.querySelectorAll(".cmp-formstep__summaryDetails"),c=s[0]?.querySelector(".cmp-link__link"),l=s[1]?.querySelector(".cmp-link__link"),u=e.querySelectorAll(".cmp-formstep__section"),d=e.getElementsByClassName("cmp-form-options__field--radio"),p=e.getElementsByClassName("cmp-form-options__field--checkbox"),m=':is(input,textarea):not([name=":formstart"]):not([name="_charset_"]):not(.cur-year)',f=u[0].querySelectorAll(m),h=u[1].querySelectorAll(m);e.querySelectorAll(".cmp-form-text--dropdown-input").forEach((e=>{["focusout","input","invalid"].forEach((t=>{e.addEventListener(t,(function(){!function(e){const t=e.parentElement.parentElement.querySelector(".active");""!==e.value?(t?.classList.remove("active"),t?.parentElement.querySelector(".cmp-form-text--dropdown-input").setAttribute("aria-invalid",!1)):(t?.classList.add("active"),t?.parentElement.querySelector(".cmp-form-text--dropdown-input").setAttribute("aria-invalid",!0))}(e)}))}))}));const g=(e,t)=>{const n=t.querySelector(".cmp-linkgroup");t.querySelectorAll(".cmp-formstep__summaryDetails-label, .cmp-formstep__summaryDetails-value").forEach((e=>{e.remove()}));let r=!0,o=!0,a=!0,i=!0;e.forEach((e=>{if(e.classList.contains("cmp-form-text--dropdown-input-hidden"))return;const s=document.createElement("div"),c=document.createElement("div");if(s.classList.add("cmp-formstep__summaryDetails-label"),c.classList.add("cmp-formstep__summaryDetails-value"),e.classList.contains("cmp-form-text--dropdown-input"))s.textContent=e.parentElement.parentElement.querySelector("label")?.innerText,c.textContent=e.value;else if(e.classList.contains("cmp-form-text--date__text"))s.textContent=e.parentElement.parentElement.querySelector("label")?.innerText,c.textContent=v(e.value);else if(e.parentElement.parentElement.classList.contains("cmp-form-range__max")||e.parentElement.parentElement.classList.contains("cmp-form-range__min")){if(o){s.textContent=e.parentElement.parentElement.parentElement.parentElement.querySelector("label")?.innerText;var l=b();c.appendChild(l),o=!1}}else if(e.parentElement.parentElement.classList.contains("cmp-form-dateinput__day")||e.parentElement.parentElement.classList.contains("cmp-form-dateinput__month")||e.parentElement.parentElement.classList.contains("cmp-form-dateinput__year"))r&&""!==e.value&&(s.textContent=e.parentElement.parentElement.parentElement.parentElement.querySelector("label")?.innerText,c.textContent=y(),r=!1);else if(e.classList.contains("cmp-form-dateinput"))s.textContent=e.parentElement.parentElement.parentElement.querySelector("label")?.innerText;else if(e.classList.contains("cmp-form-text--password__text"))s.textContent=e.parentElement.querySelector("label")?.innerText,c.textContent=e.value.replace(/./gi,"•");else if(e.classList.contains("cmp-form-options__field--radio")){if(i){s.textContent=e.parentElement.parentElement.querySelector("legend")?.innerHTML;for(let e=0;e[document.querySelector('[name="dobday"]').value,document.querySelector('[name="dobmonth"]').value,document.querySelector('[name="dobyear"]').value].join("/"),v=e=>{let t=new Date(e),n=""+(t.getMonth()+1),r=""+t.getDate(),o=t.getFullYear();return n.length<2&&(n="0"+n),r.length<2&&(r="0"+r),[r,n,o].join("/")},b=()=>{var e=document.createElement("div"),t=document.createElement("span"),n=document.createElement("span");e.classList.add("rangeDiv"),n.classList.add("cmp-formstep__max_range");const r=document.querySelector(".cmp-form-range__min").querySelector("label").textContent,o=document.querySelector(".cmp-form-range__max").querySelector("label").textContent,a=document.querySelector('[name="minValue"]').value,i=document.querySelector('[name="maxValue"]').value;return t.textContent=r+": "+a,n.textContent=o+": "+i,e.appendChild(t),e.appendChild(n),e},_=e=>{let r=document.querySelector(".cmp-form-error-notification-box"),o=e.querySelectorAll(".cmp-form-text__error"),a=document.querySelector(".cmp-form-dateinput__day .cmp-form-text__error.active"),i=document.querySelector(".cmp-form-dateinput__month .cmp-form-text__error.active"),s=document.querySelector(".cmp-form-dateinput__year .cmp-form-text__error.active"),c=document.querySelector(".postcodelookup");n&&(n.innerHTML="",o&&o.forEach((e=>{if(dropdownInput=e.parentElement.querySelector(".cmp-form-text--dropdown-input"),""!==dropdownInput?.value||e.parentElement.classList.contains("cmp-form-text--hide")?(e.classList.remove("active"),dropdownInput?.setAttribute("aria-invalid",!1)):(e.classList.add("active"),dropdownInput?.setAttribute("aria-invalid",!0)),c&&""===e.parentElement.parentElement.querySelector("[name=location]")?.value&&e.classList.add("active"),e.classList.contains("active")){r&&(r.style.display="block");var o=document.createElement("li"),l=e.parentElement.querySelector("label"),u=e.parentElement.parentElement.querySelector("legend"),d=e.parentElement.querySelector("input");l&&d&&""===d.value?t=document.createTextNode("'"+l.textContent+"' field is required"):l?t=document.createTextNode("'"+l.textContent+"' field is incorrect"):d.checked||(t=document.createTextNode("'"+u.textContent+"' field is required")),e.classList.contains("cmp-form-dateinput__error")?a||i||s||(o&&o.appendChild(t),n&&n.appendChild(o)):(o&&o.appendChild(t),n&&n.appendChild(o),r&&r.scrollIntoView({behavior:"smooth",block:"center"}))}n.hasChildNodes(o)||r&&(r.style.display="none")})))};function S(){document.body.scrollTop=0,document.documentElement.scrollTop=0}r&&r.addEventListener("click",(e=>{e.preventDefault(),f.forEach((e=>{e.reportValidity()})),Array.from(f).some((e=>!0===e.checkValidity()))&&_(u[0]),n.querySelector("li")||(i[0].classList.remove("cmp-formstep__section-active"),i[1].classList.add("cmp-formstep__section-active")),S()})),o&&o.addEventListener("click",(e=>{e.preventDefault(),h.forEach((e=>{e.reportValidity()})),Array.from(h).some((e=>!0===e.checkValidity()))&&_(u[1]),n.querySelector("li")||(i[1].classList.remove("cmp-formstep__section-active"),i[2].classList.add("cmp-formstep__section-active"),g(f,s[0]),g(h,s[1])),S()})),a&&a.addEventListener("click",(e=>{e.preventDefault(),i[1].classList.remove("cmp-formstep__section-active"),i[0].classList.add("cmp-formstep__section-active"),S()})),c&&c.addEventListener("click",(e=>{e.preventDefault(),i[0].classList.add("cmp-formstep__section-active"),i[2].classList.remove("cmp-formstep__section-active"),S()})),l&&l.addEventListener("click",(e=>{e.preventDefault(),i[1].classList.add("cmp-formstep__section-active"),i[2].classList.remove("cmp-formstep__section-active"),S()}))}))},4809:function(){const e=document.querySelectorAll(".cmp-stepform");let t=document.querySelector(".cmp-form-error-notification-box-list");e.forEach((e=>{const n=e.querySelectorAll(".cmp-stepform__section");n.forEach(((e,o)=>{const a=e.querySelectorAll(".cmp-stepform__buttonwrapper .cmp-button"),i=e.querySelectorAll(':is(input,textarea):not([name=":formstart"]):not([name="_charset_"]):not(.cur-year)');2===a.length&&(0!==o&&a[0].addEventListener("click",(e=>{e.preventDefault(),n[o].classList.remove("cmp-stepform__section-active"),n[o-1].classList.add("cmp-stepform__section-active"),r()})),o!==n.length-1&&a[1].addEventListener("click",(e=>{e.preventDefault(),i.forEach((e=>{e.reportValidity()})),Array.from(i).some((e=>!1===e.checkValidity()))||t.querySelector("li")||(n[o].classList.remove("cmp-stepform__section-active"),n[o+1].classList.add("cmp-stepform__section-active")),r()})))}));function r(){document.body.scrollTop=0,document.documentElement.scrollTop=0}e.querySelectorAll(".cmp-form-text--dropdown-input").forEach((e=>{["focusout","input","invalid"].forEach((t=>{e.addEventListener(t,(function(){!function(e){const t=e.parentElement.parentElement.querySelector(".active");""!==e.value?(t?.classList.remove("active"),t?.parentElement.querySelector(".cmp-form-text--dropdown-input").setAttribute("aria-invalid",!1)):(t?.classList.add("active"),t?.parentElement.querySelector(".cmp-form-text--dropdown-input").setAttribute("aria-invalid",!0))}(e)}))}))}))}))},7268:function(){document.querySelectorAll(".cmp-form-text--textarea").forEach((e=>{e.addEventListener("input",(function(){const t=e.querySelector(".cmp-form-text--textarea_count"),n=e.querySelector(".cmp-form-text--textarea__text"),r=e.querySelector(".cmp-form-text--textarea_count"),o=n.value,a=n.maxLength;a>1&&(t.textContent=o.length+" of max "+a+" characters",r.innerHTML=t.textContent)}))}))},3232:function(e,t,n){"use strict";var r=n(8279),o=n(9904),a=n(9880),i=n(506);!function(){window.switchLoginRegisterMyAccountField=()=>{const e=document.getElementsByClassName("cmp-myaccount")[0],t=document.querySelector(".cmp-top-header--login-register"),n=document.querySelector(".cmp-loginregister > .cmp-link"),r=document.getElementsByClassName("cmp-myaccount__dropdown")[0];if(e&&t&&n&&r){const t=window.isCustomerLoggedIn,r=JSON.parse(window.sessionStorage.getItem("isCustomerLoggedIn"));t||r?(n.style.display="none",e.style.display="block"):(e.style.display="none",n.style.display="block")}else console.log("Error: switchLoginRegisterMyAccountField function\n - required components are not in the DOM")};let e=0;const t=t=>{const n=document.querySelector(".header-menu-list-container");if(e++,n&&!n.getAttribute("headerInitialized")){const u=document.querySelector(".cmp-header .hidden-navigation"),d=document.getElementById("menu-toggler"),p=document.querySelector(".menu-mobile"),m=document.querySelector(".header"),f=document.querySelector(".header-container"),h=document.querySelector(".locator_button_header"),g=document.querySelector(".js-yext-submit"),y=document.querySelector(".header-menu-list-container"),v=document.getElementsByClassName("submenu-footer"),b=document.querySelector(".menu-mobile-close"),_=document.getElementsByClassName("accordion"),S=document.querySelector(".cmp-menu-mobile__links"),w=document.querySelectorAll(".cmp-container--top-header .text"),E=document.querySelector(".cmp-myaccount"),x=document.querySelector(".cmp-top-header--login-register"),k=document.querySelector(".cmp-loginregister > .cmp-link"),A=document.querySelector(".cmp-myaccount__dropdown"),L=document.querySelector(".search-form"),C=document.querySelector(".cmp-myaccount .cmp-link__link"),q="true"===document.querySelector("[data-isbusiness]")?.getAttribute("data-isbusiness"),D="true"===document.querySelector("[data-disable-division-toggle]")?.getAttribute("data-disable-division-toggle"),M=document.querySelector(".cmp-link--basket-count");if(u&&d&&p&&m&&h&&y&&v&&b&&S&&w&&x&&k&&E&&A&&L){n.setAttribute("headerInitialized",!0),window.switchLoginRegisterMyAccountField();try{const pe=document.createElement("button");pe.classList.add("cmp-link__link"),pe.innerHTML=C.innerHTML,C.parentNode.replaceChild(pe,C),pe.addEventListener("click",(()=>{A.classList.toggle("cmp-myaccount__dropdown--open")})),document.addEventListener("click",(function(e){e.target.closest(".cmp-myaccount")||A.classList.remove("cmp-myaccount__dropdown--open")}))}catch(me){console.error(me),console.error("Above warning is caused by My account link being invalidated. This invalidation is disabled on SITA, stage and prod environments so it's safe to ignore.")}[...w].forEach((e=>S.innerHTML+=e.innerHTML));const I=document.querySelector(".cmp-menu-mobile__links").children[1];I.children[0].before(I.children[1]);let T=document.querySelectorAll(".cmp-menu-mobile__links .style-selected")[0];T&&(T.parentElement.style.display="none");try{let fe=Array.from(document.querySelectorAll(".cmp-menu-mobile__links li")).slice(0,2).find((e=>!e.firstElementChild.classList.contains("style-selected"))).firstElementChild;if(D){const he=fe.innerHTML.toLowerCase();fe.innerHTML="Switch to "+he,fe.title="Switch to "+he}else fe.style.display="none"}catch(ge){console.error(ge),console.error("Above warning is caused by one of the personal or business links being invalidated. This invalidation is disabled on SITA, stage and prod environments so it's safe to ignore.")}const P=e=>{const t=window.sessionStorage.getItem("basketHeaderCount"),n=t?Number(t):0;n?(e.style.opacity="1",e.previousElementSibling.style.marginLeft="40px"):(e.style.opacity="0",e.previousElementSibling.style.marginLeft="25px"),e.innerHTML=n};function N(){setInterval((function(){P(M)}),1e3)}N();const O=f.getAttribute("data-videoUrlMobile"),B=f.getAttribute("data-imageUrlMobile"),H=f.getAttribute("data-videoUrlDesktop"),F=f.getAttribute("data-imageUrlDesktop"),j=f.getAttribute("data-fallbackMobileImageUrl"),$=f.getAttribute("data-fallbackDesktopImageUrl"),R=f.getAttribute("data-layout"),V="linear-gradient(#FF8474, #FFABA9)",W=f.getAttribute("data-alttext"),U=f.getAttribute("data-alttextfallback"),Y=(0,o.S)(f,j,$,d);"gradient"===R?Y.renderGradient(V):"borealisstatic"===R?Y.renderImage(F,B,W):"borealisanimated"===R&&Y.renderVideo(H,O,U);const z=u.querySelector(".hidden-navigation-container");z.addEventListener("click",(function(){u.style.display="none"})),document.addEventListener("keydown",(function(e){"Tab"===e.key&&e.shiftKey&&(u.style.display="flex")})),z.addEventListener("focus",(function(){u.classList.add("hidden-navigation--focus")})),z.addEventListener("focusout",(function(){u.classList.remove("hidden-navigation--focus")}));let G=0;document.addEventListener("keydown",(function(e){"Tab"===e.key&&document.activeElement===z&&(e.shiftKey||2===G||(e.preventDefault(),z.children[G].classList.add("hidden-nav__link--hidden"),G++,z.children[G].classList.remove("hidden-nav__link--hidden")),e.shiftKey&&0!==G&&(e.preventDefault(),z.children[G].classList.add("hidden-nav__link--hidden"),G--,z.children[G].classList.remove("hidden-nav__link--hidden")))})),z.addEventListener("click",(function(){z.children[G].click()})),z.addEventListener("keydown",(function(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),z.children[G].click())})),document.getElementById("hidden-nav-skip-to-search").addEventListener("click",(function(e){e.preventDefault(),document.querySelector("#yxt-SearchBar-input--search-bar").focus()})),document.getElementById("hidden-nav-skip-to-content").addEventListener("click",(function(e){e.preventDefault(),document.querySelector("main").scrollIntoView({behavior:"smooth"})})),document.getElementById("hidden-nav-skip-to-footer").addEventListener("click",(function(e){e.preventDefault(),document.querySelector("footer").scrollIntoView({behavior:"smooth"})}));const J=()=>{[...document.getElementsByClassName("accordion-header")].forEach((e=>{e.classList.remove("active")})),document.querySelectorAll(".menu-mobile > .panel").forEach((e=>{e.style.display="none"}))},K=()=>{d.classList.remove("open"),p.classList.remove("menu-mobile-active"),J()},Z=()=>{d.classList.contains("open")?K():(d.classList.add("open"),p.classList.add("menu-mobile-active"),oe())},X=e=>{if(window.innerWidth<900){let t=e.currentTarget.parentNode.firstChild;for(;t;){if(t!==e.currentTarget&&t.nodeType===Node.ELEMENT_NODE){t.classList.remove("active");let e=t.nextElementSibling||t.nextSibling;e.classList&&e.classList.contains("panel")&&(e.style.display="none")}t=t.nextElementSibling||t.nextSibling}}else{let t=document.getElementsByClassName("header-menu-list-container")[0].getBoundingClientRect(),n=e.currentTarget.getElementsByClassName("submenu-container");if(n.length>0){let r=n[0].style.left;if(!r&&r!==t.left){let e=t.left;n[0].style.left="-"+e+"px"}n[0].classList.add("submenu-container-visible"),n[0].addEventListener("mouseenter",(function(){y.classList.add("disable-hover")})),n[0].addEventListener("mouseleave",(function(){y.classList.remove("disable-hover")})),e.currentTarget.classList.add("border-selected");let o=e.currentTarget.parentNode.firstChild;for(;o;)o!==e.currentTarget&&o.nodeType===Node.ELEMENT_NODE&&(o.getElementsByClassName("submenu-container")[0].classList.remove("submenu-container-visible"),o.classList.remove("border-selected")),o=o.nextElementSibling||o.nextSibling}}e.stopPropagation()},Q=(e,t)=>{const n=t||e.target;n.closest(".submenu-container").classList.remove("submenu-container-visible"),n.closest("li.border-selected").classList.remove("border-selected"),e.stopPropagation()},ee=e=>e.match(/\d+/),te=e=>{const t=[];let n=0;e&&Array.from(e.children).forEach((r=>{const o=getComputedStyle(r).height,a=getComputedStyle(r).marginBottom,i=getComputedStyle(e).gap;if(o.endsWith("px")){const e=Number(ee(o))+Number(ee(a))+Number(ee(i));t.push(e),n+=e}}));let r=0;for(const e of t)if(r+=e,r>n/2)break;return r},ne=()=>{document.querySelectorAll(".panel").forEach((e=>{if("none"!==getComputedStyle(e).display&&getComputedStyle(e).display){const t=e.querySelector(".menu-mobile-navlist-container"),n=te(t);t.style.maxHeight=`${n}px`}}))},re=e=>{document.querySelectorAll(".panel").forEach((t=>{if("none"!==getComputedStyle(t).display&&getComputedStyle(t).display){const n=t.querySelector(".menu-mobile-navlist-container");getComputedStyle(n).maxHeight&&(n.style.maxHeight=e)}}))},oe=()=>{window.innerWidth<=899&&window.innerWidth>640?re(""):window.innerWidth<=640&&window.innerWidth>460?ne():window.innerWidth<=460&&re("none")};window.addEventListener("resize",(function(){if(window.innerWidth>899){[...y.children].forEach((e=>e.classList.remove("expanded-accordion"))),m.classList.remove("openedHeader"),d.classList.remove("open"),p.classList.remove("menu-mobile-active");let e=document.getElementsByClassName("header-menu-list-container")[0].getBoundingClientRect();if((document.getElementsByClassName("submenu-container-visible")[0]?document.getElementsByClassName("submenu-container-visible")[0].style.left:"")!==e.left+"px"){let t=e.left;document.getElementsByClassName("submenu-container-visible")[0]&&(document.getElementsByClassName("submenu-container-visible")[0].style.left="-"+t+"px")}}else oe()}),!0),[...y.children].forEach((e=>{e.addEventListener("click",(n=>{n.stopPropagation();const r="A"===n.target.tagName,o="LI"===n.target.tagName&&n.target.parentNode.classList.contains("header-menu-list-container"),a="DIV"===n.target.tagName&&n.target.parentNode.parentNode.classList.contains("header-menu-list-container");if(r||o||a){e.classList.contains("border-selected")&&!n.ctrlKey?(e.classList.remove("border-selected"),e.querySelector(".submenu-container-visible").classList.remove("submenu-container-visible")):X(n)}t()}));const t=()=>{let e=[[0,0,1,2,2,3,3],[0,1,2],[0,1,2,3],[0,1,2,3]];q&&(e=[[0,1,2,3],[0,1,2],[0,1,2,3],[0,1,2,3]]);var t=window.location.pathname;"/content/threedigital/uk/en/support/roaming-and-calling-abroad/roaming-abroad.html"!==t&&"/support/roaming-and-calling-abroad/roaming-abroad"!==t||(e=[[0,0,1,2,2,3,3],[0,1,2],[0,1,2,3],[0,1,2,3]]),Array.from(document.getElementsByClassName("submenu-container")).forEach(((t,o)=>{if(t.classList.contains("submenu-container-visible")){const a=t.querySelector(".submenu-navlist");if(!a)return;if(!Array.from(a.children)[0].classList.contains("submenu-navlist-column-0")){const t=n(a,4),i=Array.from(a.getElementsByClassName("submenu-navlist-item"));"object"==typeof e[o]?r(i,t,e[o]):r(i,t,[0,1,2,3])}}}))},n=(e,t)=>{const n=[];for(let r=0;r{e.forEach(((e,r)=>{"number"==typeof n[r]?t[n[r]].appendChild(e):t[3].appendChild(e)}))};e.addEventListener("keydown",(t=>{if("Enter"===t.key||"Space"===t.code)if(t.stopPropagation(),t.preventDefault(),e.classList.contains("border-selected")){const n=e.querySelector(".submenu-footer-close");Q(t,n)}else X(t);else if("Escape"===t.key&&e.classList.contains("border-selected")){const n=e.querySelector(".submenu-footer-close");Q(t,n)}}))})),document.addEventListener("click",(function(e){if(window.innerWidth>899){const t=document.querySelector(".submenu-container-visible");if(t){if(!e.target.closest(".submenu-container-visible")){t.closest(".border-selected").classList.remove("border-selected"),t.classList.remove("submenu-container-visible")}}}})),document.addEventListener("click",(function(e){if(window.innerWidth<900){if(document.querySelector(".menu-mobile-active")){e.target.closest(".menu-mobile-active")||e.target.closest(".menu-toggler")||(K(),e.stopPropagation())}}})),[..._].forEach((e=>e.addEventListener("click",(e=>{X(e)})))),[...v].forEach((e=>e.addEventListener("click",(e=>{Q(e)})))),h&&g&&h.addEventListener("click",(()=>g.click())),d.addEventListener("click",(()=>Z())),b.addEventListener("click",(()=>Z()));var a,s=document.getElementsByClassName("accordion-header");for(a=0;ae.addEventListener("click",(function(){localStorage.setItem("megaMenuClicked",!0),localStorage.setItem("megaMenuItem",e.childNodes[0].data)})))),[...l].forEach((e=>e.addEventListener("click",(function(){localStorage.setItem("megaMenuClicked",!0),localStorage.setItem("megaMenuItem",e.childNodes[0].data)}))));let ae=document.querySelector("header .search-form").getAttribute("data-personalredirecturl"),ie=document.querySelector("header .search-form").getAttribute("data-businessredirecturl");function se(){const e=document.querySelector(".locator_button_header");e&&e.addEventListener("click",(function(){const e=document.querySelector(".js-yext-submit.yxt-SearchBar-button");e&&e.click()}))}const ce=()=>{(0,r.fs)("https://assets.sitescdn.net/answers-search-bar/v1.2/answers.min.js",!0,(()=>{const e=document.querySelector(".menu-container .yxt-SearchBar");e&&e.remove(),q?ANSWERS.init({apiKey:"46281e259fc6522cc15ea1a0011c21a9",experienceKey:"threeconfigbusiness",experienceVersion:"PRODUCTION",locale:"en_GB",businessId:"1970093",templateBundle:TemplateBundle.default,onReady:function(){ANSWERS.addComponent("SearchBar",{container:".search-form",name:"search-bar",redirectUrl:ie,placeholderText:"Search Three Business"})}}):ANSWERS.init({apiKey:"46281e259fc6522cc15ea1a0011c21a9",experienceKey:"threeconfig",experienceVersion:"PRODUCTION",locale:"en_GB",businessId:"1970093",templateBundle:TemplateBundle.default,onReady:function(){ANSWERS.addComponent("SearchBar",{container:".search-form",name:"search-bar",redirectUrl:ae,placeholderText:"Search three.co.uk"})}}),se()}))};(0,r.fs)("https://assets.sitescdn.net/answers-search-bar/v1.2/answerstemplates.compiled.min.js",!0,ce);const le=document.querySelector(".yxt-SearchBar-container"),ue=document.querySelector(".yxt-SearchBar-input"),de=e=>{e&&!le.classList.contains("yxt-SearchBar-container--highlighted")?le.classList.add("yxt-SearchBar-container--highlighted"):e||le.classList.remove("yxt-SearchBar-container--highlighted")};ue&&(ue.addEventListener("focus",(function(){de(!0)})),ue.addEventListener("blur",(function(){de(!1)})));if(window.location.href==="https://devicesupport.three.co.uk/"){const ye=document.getElementsByClassName("locator_search_icon_background");if(ye&&ye.length>0){const be=document.createElement("div");be.className="device_support_search_icon",ye[0].appendChild(be)}const ve=document.querySelector(".cmp-top-header--logo .cmp-image__image");ve&&ve.classList.add("device-logo")}!function(){const e=()=>{!function(){const e=document.querySelector(".banner-phone-number-container");if(!e)return;let t={},n={};try{const r=e.dataset.internalPages,o=e.dataset.externalPages,a=JSON.parse(r||"[]"),i=JSON.parse(o||"[]");t=Object.assign({},...a),n=Object.assign({},...i)}catch(e){return void console.error("Error parsing phone number data attributes:",e)}const r=(0,i.tC)('meta[name="wcmMode"]'),o=null!=r&&""!==r,a=o&&("EDIT"===r||"PREVIEW"===r||"DISABLED"===r);let s=window.location.pathname.replace(/\.html$/,"").split("?")[0].split("#")[0];const c=o?a?s:s.replace("/content/threedigital/uk/en",""):s;let l=null;if(t.hasOwnProperty(c))l=t[c];else for(const[e,t]of Object.entries(n))if(c.startsWith(e)){l=t;break}if(l){const t=e.querySelector(".banner-phone-number-container--link"),n=e.querySelector(".banner-phone-number-container--number");t&&n&&(t.href=`tel:${l}`,t.setAttribute("aria-label",`Call us at ${l}`),n.textContent=l,e.classList.remove("threedigital-hide"))}else e.classList.add("threedigital-hide")}()},t=t=>{const n=history[t];history[t]=function(...t){const r=n.apply(this,t);return e(),r}};t("pushState"),t("replaceState"),window.addEventListener("popstate",e),e()}(),clearInterval(t)}}e>30&&clearInterval(t)};t();const n=setInterval((()=>t(n)),150)}(),document.querySelectorAll(".header").forEach((e=>{e.hasChildNodes()&&(0,a.lg)(e,"header",a.fS);const t=(e,t,n)=>{e.forEach((e=>{(0,a.s0)(e,t,n(e))}))};document.querySelectorAll(".menu-list-container, .accordion-header").forEach((e=>{(0,a.s0)(e,e.classList.contains("menu-list-container")?"textlink":"button",e.querySelector("button")?.textContent||e.querySelector("a")?.textContent||a.u3)})),document.querySelectorAll(".menu-container").forEach((e=>{(0,a.lg)(e,e.querySelector(".menu-toogler-text")?.textContent.toLowerCase(),""),(0,a.s0)(e,"textlink","")})),t(document.querySelectorAll(".cmp-top-header--logo img"),"logo",(e=>e?.getAttribute("alt")||"")),t(document.querySelectorAll(".cmp-text li"),"textlink",(e=>e.querySelector("a")?.getAttribute("title")||"")),t(document.querySelectorAll(".basketLink a"),"textlink",(e=>e.querySelector(".cmp-link__wrapper span")?.innerText||"")),t(document.querySelectorAll(".locator_button_header"),"button",(e=>e.querySelector("a")?.getAttribute("title")||"")),document.querySelectorAll(".locator_button_header").forEach((e=>{(0,a.s0)(e,"button",a.u3)})),document.querySelectorAll(".cmp-loginregister").forEach((e=>{var t=e.querySelector(".cmp-link__text-wrap span"),n=e.querySelector(".cmp-link__link");(0,a.s0)(n,"textlink",t?.textContent||"")})),document.querySelectorAll(".menu-list-container, .menu-container").forEach((e=>{var t=e.querySelector(".menu-list-main-link")?.textContent.trim().toLowerCase(),n=e.querySelector(".submenu-footer-close, .menu-mobile-close")?.textContent.trim().toLowerCase(),r=e.querySelectorAll(".submenu-container-toplink, .menu-mobile-top-link"),o=e.querySelectorAll(".menu-list-main-link ,.accordion-header__button"),i=Array.from(o).map((e=>e?.textContent.trim().toLowerCase()));r.forEach(((e,t)=>{var n=e.querySelector("div, a");(0,a.s0)(e,"textlink",i[t]+":"+n?.textContent||"")})),(0,a.s0)(e.querySelector(".submenu-footer-close"),"button",t+":"+n);let s=document.querySelector(".menu-mobile-close");s&&(0,a.s0)(s,"button",n),e.querySelectorAll(".submenu-container , .menu-mobile-navlist-container").forEach(((e,t)=>{var n=i[t];e.querySelectorAll(".submenu-navlist-item,.menu-mobile-navlist").forEach((e=>{var t=e.querySelector(".header-menu-section-header, .menu-sublist-mainlink")?.textContent;e.querySelectorAll(".menu-sublist a").forEach((e=>{var r=n+":"+t+":"+e?.textContent.trim();(0,a.s0)(e,"textlink",r)}))}))}))}))})),function(){try{let e=window.location.href.replace(/\?(?=[^?]*\?)/g,"&"),t=new URL(e);const n=new URLSearchParams(t.search);if(n.has("awc")){let e=n.get("awc");if(e){let t=window.location.hostname,n=t.startsWith("www.")?t.substring(4):t,r=`/bin/threedigital/awc?${`awc=${encodeURIComponent(e)}&domain=${encodeURIComponent(n)}`}`;fetch(r,{method:"GET",headers:{Accept:"application/json"}}).then((e=>{if(!e.ok)throw new Error(`HTTP error! Status: ${e.status}`);return e.json()})).then((e=>console.log(""))).catch((e=>console.error("Error fetching API:",e)))}}}catch(e){console.error("Error processing AWIN cookie:",e)}}()},5039:function(){document.querySelectorAll(".cmp-indication").forEach((e=>{const t=e.getAttribute("data-wcmmode");"EDIT"===t||"PREVIEW"===t||function(e){const t=e.querySelector(".cmp-indication-modal_dialogue-container-main");t&&t.classList.add("disabled-blur-editmode")}(e),e.querySelectorAll(".cmp-indication__button[action-dismiss]").forEach((t=>{t.addEventListener("click",(()=>{["information","success","error"].forEach((e=>{const n=t.closest(`.cmp-indication--${e}`);n&&(n.style.display="none")}))}));const n=e=>e.match(/\d+/),r=()=>{e.querySelectorAll(".cmp-indication__main-message").forEach((e=>{const t=e.querySelector(".cmp-indication__icon"),r=e.querySelector(".cmp-indication__headline");if(t&&r){let e=getComputedStyle(r).lineHeight,o=getComputedStyle(t).height;if(e.endsWith("px")&&o.endsWith("px")&&o{r.style.display="none"}),3e3)})),a&&a.addEventListener("click",(function(e){e.preventDefault(),n.style.display="none",r.style.display="none",i&&(i.style.display="block")}))}))}))},3504:function(e,t,n){"use strict";var r,o=n(3729),a=document.querySelectorAll(".cmp-containersecondary2"),i='a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, details, *[contenteditable], [tabindex]:not([tabindex="-1"])';const s=document.querySelectorAll(".cmp-lightbox"),c=document.querySelector("body");function l(e){return[...e.querySelectorAll(i)].filter((e=>!e.hasAttribute("disabled")&&!e.getAttribute("aria-hidden")))}function u(e,t){const n=document.querySelector("#genesys-messenger");n&&(n.style.display="block"),0!==a.length&&a.forEach((e=>{e.style.containerType="inline-size"})),e.style.display="none",e.setAttribute("aria-hidden","true"),c.style.overflow="",e.removeEventListener("scroll",p),t&&t.focus(),o._G&&o._G.push({event:"modal_dismiss",component:{title:d(e)}})}function d(e){const t=["h1","h2","h3","h4","p"];for(let n=0;n]+)>)/gi,"")}return"no_heading"}function p(e){const t=e.querySelector(".cmp-lightbox__close-button");modal.scrollTop>0?t.classList.add("cmp-lightbox__shadow"):t.classList.remove("cmp-lightbox__shadow")}function m(e,t,n){(n||0===t.screenX&&0===t.screenY)&&function(e){const t=l(e);t[0].focus()}(e)}s.forEach((e=>{const t=e.querySelector(".cmp-lightbox__overlay"),n=!!document.querySelector('[data-wcmmode="EDIT"]'),i=e.querySelector("[data-lightbox-start]"),s=e.querySelector(".cmp-lightbox"),f=e.getAttribute("data-open-type"),h=e.getAttribute("data-elements-id"),g=e.getAttribute("data-delay-seconds"),y=e.getAttribute("data-automatic-variant"),v=e.getAttribute("data-repetition"),b=e.getAttribute("data-repetition-days"),_=e.getAttribute("data-logged-in-user"),S=e.getAttribute("id"),w="lightboxFirstVisitTimestamp",E=`${S}-${w}`,x="lightboxOpened",k=`${S}-${x}`;const A=()=>{const e=window.isCustomerLoggedIn,t=JSON.parse(window.sessionStorage.getItem("isCustomerLoggedIn")),n=e||t;return!("loggedIn"===_&&!n)&&(("nonLoggedIn"!==_||!n)&&void 0)},L=()=>{if("none"===t.parentElement.style.display)return!1},C=()=>{if("once"===v)return!localStorage.getItem(k);if("xdays"===v){const e=parseInt(localStorage.getItem(k),10);if(!e)return!0;const t=Date.now();return Math.floor((t-e)/864e5)>=b}};function q(e,t,n=!1){const i=document.querySelector("#genesys-messenger");i&&(i.style.display="none"),0!==a.length&&a.forEach((e=>{e.style.containerType="normal"})),c.style.overflow="hidden",e.style.display="grid",e.setAttribute("aria-hidden","false"),r=document.activeElement,"once"!==v&&"xdays"!==v||localStorage.setItem(k,Date.now()),m(e,t,n),o._G&&o._G.push({event:"modal_launch",component:{title:d(e)}})}t&&!n&&(function(e,t,n){"selfbutton"===e&&t.addEventListener("click",(function(e){q(n,e)}))}(f,i,t),function(e,t,n){if("idbutton"===e&&t&&!1!==A()&&!1!==L()){const e=t?.split(",").map((e=>"#"+e));document.querySelectorAll(e).forEach((e=>{e.addEventListener("click",(function(e){q(n,e,!0)})),e.addEventListener("keydown",(function(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),q(n,e,!0))}))}))}}(f,h,t),function(e,t,n,r){if("automatic"===e&&t&&!1!==A()&&!1!==L()&&!1!==C()&&("page"===n&&setTimeout((()=>{q(r,{screenX:0,screenY:0})}),1e3*t),"site"===n)){!function(e){const t=Object.keys(localStorage).map((e=>({key:e,value:localStorage.getItem(e)}))).filter((t=>e.some((e=>t.key.includes(e)))));t.length>200&&t.forEach((e=>{localStorage.removeItem(e.key)}))}([w,x]),localStorage.getItem(E)||localStorage.setItem(E,Date.now());const e=parseInt(localStorage.getItem(E),10),n=Date.now(),o=Math.floor((n-e)/1e3);setTimeout((()=>{"visible"===document.visibilityState&&localStorage.getItem(E)?(q(r,{screenX:0,screenY:0}),localStorage.removeItem(E)):window.addEventListener("visibilitychange",(function(){"visible"===document.visibilityState&&localStorage.getItem(E)&&(q(r,{screenX:0,screenY:0}),localStorage.removeItem(E))}))}),1e3*(t-o))}}(f,g,y,t),function(e){window.addEventListener("click",(t=>{t.target===e&&u(e,r)}))}(t),function(){let n=[];if(s){const t=Array.from(s.querySelectorAll("[data-lightbox-close]"));n=Array.from(e.querySelectorAll("[data-lightbox-close]")).filter((e=>!t.includes(e)))}else n=e.querySelectorAll("[data-lightbox-close]");n.forEach((e=>e.addEventListener("click",(function(){u(t,r)}))))}(),t.addEventListener("keydown",(function(e){!function(e,t){if(9==t.which){const n=l(e),r=document.activeElement,o=n.length,a=n.indexOf(r);t.shiftKey?0==a&&(n[o-1].focus(),t.preventDefault()):a==o-1&&(n[0].focus(),t.preventDefault())}}(this,e),function(e,t){27==t.which&&(e.querySelector("[data-lightbox-close]").click(),t.preventDefault())}(this,e)})),t.addEventListener("scroll",(function(){p(e)})),function(e){const t=e.querySelector("h1,h2,h3,h4,h5,h6");t&&(t.id=t.id||"cmp-lightbox__first-heading",e.setAttribute("aria-labelledby",t.id))}(t),function(){if(t.closest(".cmp-tabs2")){const e=document.querySelector("body"),n=document.createElement("div");n.classList.add("cmp-lightbox"),e.appendChild(n),n.insertBefore(t,n.firstChild)}}())}))},6267:function(){document.addEventListener("DOMContentLoaded",(function(){const e=document.querySelectorAll(".cmp-linkgroup");document.querySelectorAll(".cmp-linkgroup__item").forEach((e=>{const t=e.querySelector(".cmp-experiencefragment");if(t){const n=t.querySelector(".cmp-container").querySelector(".aem-Grid").querySelector(".cmp-link.cmp-link--footnotelink");n&&e.appendChild(n),t.remove()}})),e.forEach((e=>{const t="footnotelink"===e.getAttribute("data-linkgrouptype");e.querySelectorAll(".cmp-link.cmp-link--footnotelink").forEach(((e,n)=>{!function(e,t,n){const r=e.querySelector(".cmp-link__wrapper");if(!r)return;const o=r.firstElementChild;if(!o||"SPAN"!==o.tagName){const e=document.createElement("span");e.classList.add("cmp-link__links-count"),e.textContent=n?t+1+". ":"0",o?r.insertBefore(e,o):r.appendChild(e)}}(e,n,t)}))}))}))},8104:function(e,t,n){"use strict";var r=n(3729);const o=document.querySelector("#business_broadband_coverage_checker");if(o){const a=document.querySelector(".cmp-form-text--location-input"),i=document.querySelector(".cmp-form-location__search-button"),s=document.querySelectorAll(".cmp-containersecondary--hidden"),c=document.querySelector(".cmp-containersecondary-post-code"),l=o.getAttribute("data-api-error-Msg"),u=document.querySelector(".cmp-locationbusiness__overlay"),d=a.hasAttribute("required"),p=o.getAttribute("data-input-required-message"),m=o.getAttribute("data-input-errorMessageEmptySubmission"),f=document.getElementById("form-text-17513001801-error"),h=o.querySelector(".cmp-form-text__error"),g="business_broadband_coverage_checker";function y(){a&&a.value.length>0?(i.classList.add("active"),h&&h.classList.contains("active")&&h.classList.remove("active"),a.hasAttribute("aria-invalid")&&a.removeAttribute("aria-invalid")):i.classList.remove("active")}function v(e){e.preventDefault();const t=document.getElementById("udprn"),n=t?t.value:"";if(!a||""===a.value.trim()){return b(m||""),void(0,r.W9)(g,"failed","Form submission attempted with empty input")}const o="/libs/granite/csrf/token.json",i="/bin/threedigital/broadband/hbbcoveragechecker";_(),fetch(o).then((e=>{if(!e.ok)throw new Error("Failed to fetch CSRF token");return e.json()})).then((e=>fetch(i,{method:"POST",headers:{"Content-type":"application/json; charset=UTF-8","Access-Control-Allow-Methods":"POST","Access-Control-Allow-Headers":"Content-Type","CSRF-Token":e.token},body:JSON.stringify({udprn:n})}))).then((e=>{if(!e.ok)throw new Error("Network response for geolocation API errored");return e.json()})).then((e=>{if(a.value="",s.forEach((e=>{e.classList.add("cmp-containersecondary--hidden")})),e?.Payload){const t=e?.Payload?.Coveragestatus?.[0];if(t){const e={is4gAvailable:t.fourgavailability??!1,is5gIndoorAvailable:t.fivegindooravailability??!1,is5gOutdoorAvailable:t.fivegoutdooravailability??!1};c.style.display="none",function(e,t,n,o,a){let i="",s=-1;n?(i="5G Indoor broadband available",s=1):t?(i="4G broadband available",s=2):o?(i="5G Outdoor broadband available",s=0):(i="No coverage available",s=3);e[s].classList.remove("cmp-containersecondary--hidden"),(0,r.W9)(a,"success",i)}(s,e.is4gAvailable,e.is5gIndoorAvailable,e.is5gOutdoorAvailable,g)}}})).catch((e=>{b(l),document.querySelector(".cmp-form-text--location-input").setAttribute("api-failed",e?.message),(0,r.W9)(g,"failed",e?.message)}))}function b(e){f.textContent=e,o.querySelector(".cmp-form-text__error").classList.add("active")}function _(){f.textContent="",f.classList.remove("active")}function S(){a.addEventListener("focusout",(()=>{if(_(),""===a.value.trim()){const e=p||"";b(e);const t={form_field_validation_status:"failed",form_field_validation_message:e,form_name:g,event_trigger:"blur"};(0,r.E0)(t)}}))}d&&S(),a&&a.addEventListener("input",y),i&&i.addEventListener("click",v);const w=new MutationObserver((e=>{e.forEach((e=>{"attributes"===e.type&&"role"===e.attributeName&&"combobox"===e.target.getAttribute("role")&&(u&&(u.style.display="none",u.parentElement.inert=!1),w.disconnect())}))})),E=document.getElementById("form-text-17513001801");E&&w.observe(E,{attributes:!0,attributeFilter:["role"]})}},7662:function(){let e=document.querySelector(".cmp-form-text--location-input"),t=document.querySelector(".cmp-form-location__search-button");e&&e.addEventListener("input",(function(){e&&e.value.length>0?t.classList.add("active"):t.classList.remove("active")}))},5374:function(e,t,n){"use strict";var r=n(8279);const o=document.querySelector(".cmp-maps"),a=document.querySelectorAll(".cmp-maps__container"),i=document.getElementById("cmp-maps__mapId")?.getAttribute("data-google-apikey");o&&(window.initMap=function(){a.forEach((e=>{const t=Number(e.getAttribute("data-zoom")),n=e.getAttribute("data-mapId"),r=Number(e.getAttribute("data-lat")),o=Number(e.getAttribute("data-initial-radius")),a=Number(e.getAttribute("data-long")),i=JSON.parse(e.getAttribute("data-map-type-control")),s=e.getAttribute("data-map-type-control-position"),c=JSON.parse(e.getAttribute("data-zoom-control")),l=e.getAttribute("data-zoom-control-position"),u=Number(e.getAttribute("data-zoom-max")),d=JSON.parse(e.getAttribute("data-street-view-control")),p=e.getAttribute("data-street-view-control-position"),m=JSON.parse(e.getAttribute("data-full-screen-control")),f=JSON.parse(e.getAttribute("data-scale-control"));window.threeGoogleMap=new google.maps.Map(e,{center:{lat:r,lng:a},zoom:t,mapId:n,scaleControl:f,initialRadius:o,streetViewControl:d,fullscreenControl:m,zoomControl:c,maxZoom:u,mapTypeControl:i,mapTypeControlOptions:{position:google.maps.ControlPosition[s]},streetViewControlOptions:{position:google.maps.ControlPosition[p]},zoomControlOptions:{position:google.maps.ControlPosition[l]}})}))},(0,r.fs)(`https://maps.googleapis.com/maps/api/js?key=${i}&callback=initMap&v=weekly`,!0))},280:function(e,t,n){"use strict";var r=n(1626),o=n(3729);window.fieldValidationDataLayer=window.fieldValidationDataLayer||{};document.querySelectorAll(".networkstatuschecker").forEach((e=>{const t=e.querySelectorAll(".cmp-networkcoveragechecker__response"),n=e.querySelector(".cmp-networkcoveragechecker")?.getAttribute("data-google-apikey");(0,r.Z)(e,"STATUSCHECKER",(e=>{t.forEach((e=>{e.classList.contains("threedigital-hide")||e.classList.add("threedigital-hide")}));const n=Array.from(t).find((t=>t.getAttribute("data-result-category")===e.nsc.issue.category));n?.classList.remove("threedigital-hide")}),n)})),document.addEventListener("DOMContentLoaded",(function(){const e=document.getElementById("network_status_checker");if(e){fieldValidationDataLayer.form_name=e.getAttribute("name");const t=e.getAttribute("method"),n=e.getAttribute("action"),r=()=>Array.from(e.elements).filter((e=>"BUTTON"!==e.nodeName&&(e.classList.contains("cmp-form-text__text")||e.classList.contains("cmp-form-text--textarea__text")||e.classList.contains("cmp-form-options__field--checkbox")||e.classList.contains("cmp-form-options__field--radio")||e.classList.contains("active")||e.id===DATE_PICKER_ID))),a=[];function i(e){a.includes(e)||a.push(e)}for(const b of r())b.addEventListener("invalid",(function(e){fieldValidationDataLayer.event_trigger="invalid",fieldValidationDataLayer.form_field_name=b.getAttribute("name"),"checkbox"!==b.getAttribute("type")&&"radio"!==b.getAttribute("type")&&s(b),e.preventDefault()})),b.addEventListener("blur",(function(){fieldValidationDataLayer.event_trigger="blur",fieldValidationDataLayer.form_field_name=b.getAttribute("name"),b.classList.contains("cmp-form-text--dropdown-input")&&(fieldValidationDataLayer.form_field_name=b.nextElementSibling.getAttribute("name")),"checkbox"!==b.getAttribute("type")&&"radio"!==b.getAttribute("type")&&s(b),i(b)})),b.addEventListener("input",(function(){fieldValidationDataLayer.event_trigger="input",fieldValidationDataLayer.form_field_name=b.getAttribute("name"),a.includes(b)&&s(b)}));function s(e){e.setCustomValidity(""),e.validity.valid||e.classList.contains("cmp-form-text--dropdown-input")&&0!==e.value.length?l(e):c(e)}function c(e){p(e),u(e,!0),e.setAttribute("aria-invalid","true"),e.parentElement.classList.add("afterelement-error"),fieldValidationDataLayer.form_field_validation_status="failed",(0,o.E0)(fieldValidationDataLayer)}function l(e){const t=d(e);if(t){t.textContent="",u(e,!1),e.removeAttribute("aria-invalid","false"),e.parentElement.classList.remove("afterelement-error");const n=document.getElementById(e.id).parentElement.parentElement.querySelector(".cmp-form-text__error");n&&n.classList.remove("active"),fieldValidationDataLayer.form_field_validation_status="success",(0,o.E0)(fieldValidationDataLayer)}}function u(e,t){t&&d(e)&&!d(e).parentElement.classList.contains("active")&&d(e).parentElement.classList.add("active")}function d(e){const t=e.getAttribute("aria-describedby");if(!t)return null;const n=t.split(" ").find((e=>e.endsWith("-error")));return document.getElementById(n)}function p(e){let t;e.parentElement.querySelector(".cmp-form-text__error");t=document.querySelector(`#${e.id}-error`),t.parentElement.classList.add("active"),t&&(e.validity.valueMissing?t.textContent=m(e,"data-cmp-required-message"):e.validity.patternMismatch||e.validity.rangeUnderflow||e.validity.rangeOverflow?t.textContent=m(e,"data-cmp-constraint-message"):e.validity.valid||(t=document.querySelector(`#${e.id}-error`),t.textContent=e.validationMessage)),fieldValidationDataLayer.form_field_validation_message=t.textContent}function m(e,t){return document.getElementById(e.id).parentElement.getAttribute(t)}let f,h;document.getElementById("verification-form-submit")?f=document.getElementById("verification-form-submit"):document.querySelector("#network_status_checker #port-in-form-submit")?(f=document.querySelector("#network_status_checker #port-in-form-submit"),h=document.querySelector("#network_status_checker .cmp-form-text--networkcoveragechecker_input")):document.getElementById("contact-us-forms-submit")&&(f=document.getElementById("contact-us-forms-submit")),f&&f.addEventListener("click",(function(a){g();let s=e.reportValidity();if(s)!function(){if(s){function r(t,n){let r,a;const i=n?t:JSON.parse(t.response);if(disablePortInSubmit(!1),i&&i.code&&e.querySelector("#"+i.code))r=e.querySelector("#"+i.code),a=r.querySelector(".cmp-form-error__text").innerText;else if(i&&i.message){r=e.querySelector(".cmp-form-error:first-of-type");const t=i.message;t&&(r.querySelector(".cmp-form-error__text").innerHTML=t,a=t)}!t||n||r||(r=e.querySelector(".cmp-form-error:first-of-type")),r&&(e.querySelectorAll(".cmp-form-error").forEach((e=>{e.classList.remove("active"),e.removeAttribute("aria-invalid")})),r.classList.contains("active")||r.classList.add("active"),r.setAttribute("aria-invalid","true"));var s=r.querySelector("p");s&&s.scrollIntoView({behavior:"smooth",block:"center"}),(0,o.W9)(e.getAttribute("name"),"failed",a)}function a(t){if(t.response&&"null"!=t.response){const n=JSON.parse(t.response);if("success"===n.status||"SUCCESS"===n.Header?.ActivityStatusEnum_T||n.SOATransactionID){const t=e.getAttribute("name"),r=JSON.stringify({formName:t,data:n});sessionStorage.setItem("form_tracking_success_data",r);const o=e.querySelector("#"+n.code);o&&(o.classList.remove("active"),o.removeAttribute("aria-invalid","false"));const a=e.querySelector("input[name=':redirect']");a&&window.location.replace(a.value)}else r(t)}else r(t)}(()=>{let e={};for(const t of y()){const n=t.name.toString();""!==n&&(e.hasOwnProperty(n)?Array.isArray(e[n])?e[n].push(t.value.toString()):e[n]=[e[n],t.value.toString()]:e[n]=t.value.toString())}if(n){const o=new XMLHttpRequest;o.addEventListener("load",(()=>a(o))),o.addEventListener("error",(()=>r(o))),o.open(t,n),o.setRequestHeader("Content-Type","application/json;charset=UTF-8"),o.send(JSON.stringify(e))}})()}}();else{for(const e of r())i(e);(0,o.W9)(e.getAttribute("name"),"failed","form fields are invalid")}"port-in-form-submit"===f.getAttribute("id")&&v(),a.preventDefault()})),h&&h.addEventListener("keydown",(function(e){"Enter"===e.key&&(e.preventDefault(),h.blur())}),!0);const g=()=>{document.querySelectorAll(".cmp-form-input-text--hide").forEach((e=>{e.querySelector("input").required=!1}))},y=()=>Array.from(e.elements).filter((e=>"BUTTON"!==e.nodeName&&(e.classList.contains("cmp-form-text__text")||e.classList.contains("cmp-form-text--textarea__text")||e.hasAttribute("checked")||e.id===DATE_PICKER_ID)||"hidden"===e.type&&e.parentElement.classList.contains("hidden")));function v(){let e=document.querySelector(".cmp-form-error-notification-box"),t=document.querySelectorAll(".cmp-form-text__error"),n=document.querySelector(".cmp-form-error-notification-box-list"),r=document.querySelector(".cmp-form-dateinput__day .cmp-form-text__error.active"),o=document.querySelector(".cmp-form-dateinput__month .cmp-form-text__error.active"),a=document.querySelector(".cmp-form-dateinput__year .cmp-form-text__error.active"),i=document.createElement("li"),s=document.querySelector(".postcodelookup");n&&(n.innerHTML="",t&&t.forEach((t=>{if(dropdownInput=t.parentElement.querySelector(".cmp-form-text--dropdown-input"),dropdownInput&&(""!==dropdownInput?.value||1!=dropdownInput?.required||t.parentElement.classList.contains("cmp-form-text--hide")?(t.classList.remove("active"),dropdownInput?.setAttribute("aria-invalid",!1)):(t.classList.add("active"),dropdownInput?.setAttribute("aria-invalid",!0))),s&&""===t.parentElement.parentElement.querySelector("[name=location]")?.value&&t.classList.add("active"),t.classList.contains("active")){var c,l=document.createElement("li"),u=t.parentElement.querySelector("label"),d=t.parentElement.querySelector("input"),p=t.parentElement.parentElement.querySelector("legend");u&&d&&""===d.value?c=document.createTextNode("'"+u.textContent+"' field is required"):u?c=document.createTextNode("'"+u.textContent+"' field is incorrect"):d.checked||(c=document.createTextNode("'"+p?.textContent+"' field is required")),t.classList.contains("cmp-form-dateinput__error")?r||o||a||(l&&l.appendChild(c),n&&n.appendChild(l)):(l&&l.appendChild(c),n&&n.appendChild(l),e&&e.scrollIntoView({behavior:"smooth",block:"center"}))}!e||n.hasChildNodes(l)||n.hasChildNodes(i)?e.style.display="block":e.style.display="none"})),hCaptchaContainer&&!hCaptchaCompleted&&(i.textContent="'hCaptcha' field must be selected",e&&e.querySelector("ul").appendChild(i),e.style.display="block",e&&e.scrollIntoView({behavior:"smooth",block:"center"})))}}}))},1626:function(e,t,n){"use strict";var r=n(3729);let o=0,a=0,i=0;t.Z=(e,t,n,s)=>{const c=e.querySelector(".cmp-form-networkcoveragechecker .cmp-button__label"),l=e.querySelector(".cmp-form-text--networkcoveragechecker_input"),u=e.querySelector(".cmp-networkcoveragechecker__invalid-postcode"),d=e?.querySelector(".coverageresults-showhide-content"),p=e.querySelector(".cmp-form-text"),m=e.querySelector(".cmp-form-text__error"),f=e.querySelector(".cmp-form-text__error__text"),h=p.getAttribute("data-first-api-fail-message"),g=p.getAttribute("data-second-api-fail-message"),y=e.classList.contains("networkstatuschecker")?"network_status_checker":"coverage_checker";let v=!1;l&&(c.addEventListener("click",(function(){if(l&&"true"!==l.getAttribute("aria-invalid")&&0!==l.value.length){const e=encodeURIComponent(l.value);fetch(`https://maps.googleapis.com/maps/api/geocode/json?address=${e}&key=${s}`).then((e=>e.json())).then((e=>{if(!("OK"===e.status&&e.results.length>0))throw v=!0,u.classList.add("active"),l.ariaInvalid=!0,new Error(u.innerHTML);{b(c);const o=e.results[0].geometry.location,a=e.results[0].geometry.location_type??"",i=e.results[0]?.address_components?.find((e=>e.types.includes("postal_code")))?.short_name??"";let s,l=o.lat,d=o.lng,p={tokenApi:"/libs/granite/csrf/token.json",rigViewApi:"/bin/threedigital/rigview"};s&&(p={rigViewApi:"https://4da681b2-5792-4e14-926f-7d95a3ac5ea2.mock.pstmn.io/post",tokenApi:"https://b409415a-4d44-4363-9571-171743ba71a3.mock.pstmn.io/get?token"}),fetch(p.tokenApi).then((e=>e.json())).then((e=>{fetch(p.rigViewApi,{method:"POST",body:JSON.stringify({location:{postcode:i,latitude:l,longitude:d,precisionLocation:a},ClientID:t}),headers:{"Content-type":"application/json; charset=UTF-8","Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"POST","Access-Control-Allow-Headers":"Content - Type","CSRF-Token":e.token}}).then((e=>{if(_(c),e.ok){const e=c.querySelector(".cmp-button__span");e.dataset.originalText&&(e.textContent=e.dataset.originalText,delete e.dataset.originalText)}else S(c);return e.json()})).then((e=>{if("400"==e.code)throw u.classList.add("active"),new Error(document.querySelector("#invalidPostcodeMessage").textContent);u.classList.remove("active"),(0,r.W9)(y,"success","RigView API response successful"),n(e,l,d)}))})).catch((()=>{_(c),S(c)}))}})).catch((e=>{console.error("Error:",e),(0,r.W9)(y,"failed",e)}))}else d&&(d.style.display="none"),e.classList.value.indexOf("networkstatuschecker")>-1&&e.querySelectorAll(".cmp-networkcoveragechecker__response").forEach((e=>{e.classList.add("threedigital-hide")}))})),l.addEventListener("keydown",(function(e){"Enter"===e.key&&(e.preventDefault(),c.click())})));const b=e=>{m.classList.remove("active");const t=e.querySelector(".cmp-button__span");t.dataset.originalText=t.textContent,t.textContent="Checking...";const n=e.closest(".cmp-button").querySelector(".cmp-networkcoveragechecker__spinnerContainer");e.appendChild(n),n.classList.add("cmp-networkcoveragechecker--show"),n.classList.remove("cmp-networkcoveragechecker--hide"),e.disabled=!0},_=e=>{const t=e.closest(".cmp-button").querySelector(".cmp-networkcoveragechecker__spinnerContainer");t?(e.disabled=!1,t.classList.remove("cmp-networkcoveragechecker--show")):console.error("Button not found.")},S=e=>{const t=e.querySelector(".cmp-button__span");"network_status_checker"===y?(a+=1,o=a):"coverage_checker"===y&&(i+=1,o=i),1===o?(t.textContent="Try again",f.textContent=h,m.classList.add("active"),e.disabled=!1):o>=2&&(t.textContent="Try again",e.disabled=!0,f.textContent=g,m.classList.add("active"))}}},3047:function(e,t,n){"use strict";function r(e){return e<10?"0"+e:e}function o(){if(window.digitalData={},null!=digitalData){var e=document.referrer,t=e.split("?")[1]||"",n=new Date,o=n.getFullYear(),a=n.getMonth(),i=n.getDate(),s=n.getHours(),c=n.getMinutes(),l=n.getSeconds();a+=1;var u="["+window.location.pathname.replace("/content/","").split(".")[0].replaceAll("/",":")+"]",d=o+":"+r(a)+":"+r(i)+":"+r(s)+":"+r(c)+":"+r(l),p=JSON.parse(sessionStorage.getItem("user")),m=JSON.parse(sessionStorage.getItem("basket")),f=new URLSearchParams(window.location.search),h=!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),g=f.has("id")?f.get("id"):"",y=f.has("icid")?f.get("icid"):"",v=window.location.pathname.split("/").filter((e=>e)),b=v.join(":");const M=e=>("business"===e[0]&&e.shift(),e);var _=M(v)[0],S="blog"===_?.toLowerCase()?document.getElementsByName("pageType")[0]?.content:M(v)[1],w=localStorage.getItem("previousPageName")?localStorage.getItem("previousPageName"):"",E=!!localStorage.getItem("megaMenuClicked")&&localStorage.getItem("megaMenuClicked"),x=localStorage.getItem("megaMenuItem")?localStorage.getItem("megaMenuItem"):"",k=!!localStorage.getItem("footerMenuClicked")&&localStorage.getItem("footerMenuClicked"),A=localStorage.getItem("footerMenuItem")?localStorage.getItem("footerMenuItem"):"",L=document.querySelector(".cmp-header"),C=L&&L.getAttribute("data-isbusiness")?"B2B":"B2C";digitalData={site:{language:document.documentElement.lang,country:"UK",platform:"Web",siteFlag:C,timestamp:d},page:{url:document.location.href,path:document.location.pathname,pageName:b,pageBreadcrumb:u,pageSection:_,pageType:S,previousURL:e,previousPageName:w,javascriptErrors:window.jsDataLayerErrors,pageCategory:"",domain:document.domain,hash:document.location.hash,queryString:document.location.search,previousQueryString:t,pageError:""},journey:{footerMenuClicked:k,footerMenuItem:A,megaMenuClicked:E,megaMenuItem:x,isMobile:h,currencyCode:"GBP",accountSubNavigationItem:!1,accountSubNavigationClick:"",internalCampaign:y,campaignCode:g,loginSuccess:!1,logoutSuccess:!1,registrationSuccess:!1,journeyType:""}};var q=window.location.href,D=new XMLHttpRequest;D.open("HEAD",q,!0),D.send(),D.onload=function(){const e=D.status.toString();"4"!=e[0]&&"5"!=e[0]||(digitalData.page.pageError=e)},digitalData.user=p,digitalData.basket=m,localStorage.setItem("previousPageName",b)}}function a(){return{componentTitle:"data-analytics-component-title",componentType:"data-analytics-component-type",sectionTitle:"data-analytics-section-title",actionType:"data-analytics-action-type",actionTypeValue:"textlink",actionLabel:"data-analytics-action-label",fallback_heading_value:"no_heading",fallback_label_value:"no_label"}}n.d(t,{f:function(){return o},p:function(){return a}})},5451:function(e,t,n){"use strict";var r=n(8279);var o=()=>{document.querySelectorAll(".cmp-superherobanner__lottie-player").forEach((e=>{const t=e.shadowRoot.querySelector(".main"),n=e.shadowRoot.querySelector(".animation"),r=document.querySelector(".cmp-superherobanner__lottie");t.style.display="flex",t.style.justifyContent="center";const o=()=>{r.classList.contains("wrapped")?n.style.aspectRatio="1":n.style.aspectRatio="unset"};o(),window.addEventListener("resize",(()=>{o()}))}))},a=n(3047);!document.querySelector("lottie-player")||window.threeLottieElementInitialized||customElements.get("lottie-player")||(window.threeLottieElementInitialized=!0,(0,r.fs)("https://unpkg.com/@lottiefiles/lottie-player@0.4.0/dist/lottie-player.js",!0,o)),window.location.hostname.includes("auth.three.co.uk")||window.location.hostname.includes("auth0.devr1-techm-3uk.co.uk")||window.location.hostname.includes("testing-auth0.three.co.uk")||("complete"===document.readyState||"loaded"===document.readyState?(0,a.f)():document.addEventListener("DOMContentLoaded",(0,a.f)())),document.onreadystatechange=()=>{if("complete"===document.readyState){const{hash:e}=location;0!==e.length&&setTimeout((function(){document.querySelector(e).scrollIntoView()}),5)}}},3085:function(){const e=document.querySelector(".cmp-form-button");e&&e.addEventListener("click",(e=>{console.log(e),console.log(e.target)}))},7064:function(){if(document.querySelector(".postcodelookup")){const e=["Address-Line1","Address-Line2","Address-Town","Address-County"],t=document.querySelector("[name=location]");let n=!1;["focusout","input"].forEach((r=>{t.addEventListener(r,(function(){!function(){const r=document.querySelector("[name=location]"),o=r.parentElement.querySelector(".cmp-form-text__error");n||(n=!0,e.forEach((e=>{const t=document.querySelector(`[name=${e}]`),n=t?.parentElement.firstElementChild;n&&n.classList.add("cmp-form-text__label-active")})));""===t.value?o.classList.add("active"):(o.classList.remove("active"),r.setAttribute("aria-invalid",!1))}()}))}));let r=!1;t.addEventListener("focusin",(()=>{var e;r&&((e=t).setAttribute("readonly","readonly"),setTimeout((function(){e.blur(),e.removeAttribute("readonly")}),100),r=!1)})),pca.on("load",(function(e,t,n){t="pl-post-code-input";var o=document.getElementById(t);o&&o.setAttribute("aria-describedby",t+"-error"),n.listen("populate",(function(){r=!0}))}))}},9983:function(){document.querySelectorAll(".cmp-price-increase-calculator").forEach((e=>{const t=e.querySelector(".cmp-form-text__text"),n=e.querySelectorAll(".cmp-form-text__text"),r=e.querySelector(".cmp-form"),o=r.getAttribute("data-interest-rate"),a=o&&parseFloat(o),i=r.getAttribute("data-method"),s=r.getAttribute("data-increaseone"),c=r.getAttribute("data-increasetwo"),l=r.getAttribute("data-increasethree"),u=r.getAttribute("data-starttwo"),d=r.getAttribute("data-startthree"),p=e.querySelector(".cmp-button__label"),m=e.querySelector(".cmp-price-increase-calculator__cost-result"),f=e.querySelector(".cmp-form-text__error"),h=e.querySelectorAll(".cmp-price-increase-calculator__currency");let g="";function y(){t&&f&&(0!=t.value.length?(f.classList.remove("active"),f.style.display="none",t.removeAttribute("aria-invalid","true")):(f.classList.add("active"),f.style.display="flex",t.setAttribute("aria-invalid","true")))}function v(){const e=t&&parseFloat(t.value);let r;if(y(),e){if("flat"===i)r=e<=u?e+parseFloat(s):e<=d?e+parseFloat(c):e+parseFloat(l);else if(a){r=e+e*a/100}t&&0!==t.value.length&&m?m.textContent="£"+r.toFixed(2):m.textContent=""}n.forEach((e=>{e.value.endsWith(".")&&(e.value=e.value.slice(0,-1))}))}p&&p.addEventListener("click",(function(){v()})),t&&t.addEventListener("blur",(function(){y()})),n.forEach(((e,t)=>{e.addEventListener("focus",(function(){h[t].style.display="block"})),e.addEventListener("keydown",(e=>{"Enter"===e.key&&(e.preventDefault(),v())})),e.addEventListener("input",(function(){if(function(e){e.value.match(/^\d*\.?\d*$/)?g=e.value:e.value=g,parseFloat(this.value)<1&&(this.value="")}(e),0==t&&y(),this.value.includes(".")){const e=this.value.split(".");e[1].length>2&&(this.value=`${e[0]}.${e[1].slice(0,2)}`)}}))}))}))},1560:function(e,t,n){"use strict";n.d(t,{wG:function(){return o},So:function(){return a},jz:function(){return i}});var r=n(8705);function o(e,t){const n=e.threshold,r=e.increase;for(let e=0;e=3&&e.getUTCMonth()<=11?e.getUTCFullYear()+1:e.getUTCFullYear()}function i(e){const t=new Date(e.bufferDate),n=new Date(e.priceRiseDate),r=new Date,o=r.getUTCMonth(),a=t.getUTCMonth(),i=n.getUTCMonth(),s=r.getUTCDate(),c=t.getUTCDate(),l=n.getUTCDate();return o>a&&o=c||o==i&&se.getAttribute(t)));return n.filter(((e,t)=>n.indexOf(e)===t&&null!==e))}function c(e,t,n,r,s){const c=a(),l=o(e,t);let u=t,d=c,p=i(e);for(let e=0;e0&&(n=await async function(e,t,n){let o="";const a=t?"OR":"AND";e.forEach((e=>{o=(0,r.WD)("Sku",e,"keyValue",o)})),o&&(o+=`&filterType=${a}`);try{n||(n=await(0,r.RJ)());const e=await fetch("/bin/threedigital/retrieveJsonData",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","CSRF-Token":n},body:JSON.stringify({queryParam:o})});if(!e.ok)throw new Error(`Failed to fetch data: ${e.status} ${e.statusText}`);const t=await e.json();if(t&&Array.isArray(t))return t}catch(e){return console.error("Error fetching basket data:",e.message),Promise.reject(e)}}(a,"OR",i)),o.forEach((r=>{fetch(t,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","CSRF-Token":i},body:JSON.stringify({fragmentPath:r})}).then((e=>{if(!e.ok)throw new Error("Content fragment API errored");return e.json()})).then((t=>{const o=t?.data?.priceRiseModelList?.items[0];o&&e.forEach((e=>{const t=e.getAttribute("data-cmp-length"),a=e.getAttribute("data-cmp-fragment-path"),i=e.getAttribute("data-cmp-skucode"),s=e.querySelector(".cmp-pricing__breakdown"),l={36:3,24:2,12:1};function u(){s.style.display="none"}function d(e,t){!function(e,t,n){const r=document.createElement("div");r.innerHTML=`£${e.toFixed(2)} from Apr ${t}`,n.append(r)}(e,t,s),s.classList.remove("threedigital-hide")}if(a===r)if(i){const t=e.querySelectorAll(".cmp-pricing__pound"),r=e.querySelectorAll(".cmp-pricing__penny"),a=e.querySelectorAll(".cmp-pricing__label"),s=e.querySelectorAll(".cmp-pricing__small-print"),p=e.querySelectorAll(".cmp-pricing__footnote"),m=e.querySelector(".cmp-pricing__double-divider"),f=n.find((e=>e.Sku===i)),h=f.Tenure.replace(" Months","").replace(" Month",""),g=[],y={price:f.UFC,label:f["UFC label"]??"upfront"},v={price:f.MRC,label:f["MRC label"]??"a month",wasPrice:f["MRC was"],needsFootnote:!0};y.price&&g.push(y),v.price&&g.push(v),g.forEach(((e,n)=>{const o=Number(e.price).toFixed(2).split(".");t[n].textContent="£"+o[0],r[n].textContent="."+o[1],a[n].textContent=e.label,console.log("data.wasPrice",e.wasPrice),console.log("data.price",e.price),e.wasPrice>e.price&&(s[n].textContent=e.wasPrice?`Was £${Number(e.wasPrice).toFixed(2)}`:""),e.needsFootnote&&p[n].classList.remove("threedigital-hide"),1===n&&m.classList.remove("threedigital-hide")}));const b=l[h],_=Number(f.MRC);h>0&&c(o,_,b,u,d)}else if(t&&a){const n=e.querySelectorAll(".cmp-pricing__pound"),r=e.querySelectorAll(".cmp-pricing__penny"),a=Number(e.getAttribute("data-cmp-column")),i=l[t],s=Number(n[a].textContent.slice(1)+r[a].textContent);c(o,s,i,u,d)}}))})).catch((e=>{console.error("Error:",e)}))}))}}(document.querySelectorAll(".cmp-pricing"))},1502:function(e,t,n){"use strict";var r=n(9904);const o=document.querySelectorAll(".cmp-promocard__text-container"),a=document.querySelectorAll(".cmp-promocard__promo-text");o.forEach((e=>{let t=e.getAttribute("data-custombackgroundcolor");t&&("#"!==t[0]&&(t=`#${t}`),e.style.background=t)})),a.forEach((e=>{const t=e.clientHeight,n=e.querySelector(".cmp-containersecondary2__container-inner"),o=e.getAttribute("data-videoUrlMobile"),a=e.getAttribute("data-videoUrlDesktop"),i=e.getAttribute("data-altTextFallback"),s=e.getAttribute("data-fallbackMobileImageUrl"),c=e.getAttribute("data-fallbackDesktopImageUrl"),l=e.getAttribute("data-imageUrlMobile"),u=e.getAttribute("data-imageUrlDesktop"),d=e.getAttribute("data-layout"),p=e.getAttribute("data-altText"),m=e.parentElement.parentElement,f=(0,r.S)(e,s,c,e,t);var h;"borealisstatic"===d?f.renderImage(u,l,p||""):"borealisanimated"===d&&(f.renderVideo(a,o,i||"",n),h=m,["cmp-promocard--6amgradient","cmp-promocard--5amgradient"].forEach((e=>{h.classList.contains(e)&&h.classList.remove(e)})))}));const i="no_label";document.querySelectorAll(".cmp-promocardgroup").forEach((e=>{e.hasChildNodes()&&(e.setAttribute("data-analytics-component-title","no_heading"),e.setAttribute("data-analytics-component-type","promocardgroup")),document.querySelectorAll(".cmp-promocard").forEach((e=>{const t=e.querySelector(".cmp-promocard__headline"),n=e.querySelector(".cmp-promocard__image-container img"),r=e.querySelector(".cmp-promocard__image");t&&(e.setAttribute("data-analytics-action-label",t.textContent.toLowerCase().trim()),document.querySelectorAll(".cmp-promocardgroup").forEach((e=>{const t=e.children;Array.from(t).forEach((e=>{const t=e.querySelector(".cmp-promocard__headline"),n=t?t.textContent.toLowerCase().trim():i;e.setAttribute("data-analytics-section-title",n)}))})));const o=e.getAttribute("href")?"textlink":"div";if(e.setAttribute("data-analytics-action-type",o),n&&r){const e=n.getAttribute("alt");r.setAttribute("data-analytics-action-label",e?e.toLowerCase().trim():i),r.setAttribute("data-analytics-action-type","image")}}))}))},3158:function(){const e=document.querySelectorAll(".cmp-form-options__field--radio");if(0!==e.length){function t(){e.forEach((e=>{if(e===this){const t=e.closest("fieldset").querySelectorAll(".cmp-form-options__field--radio");t.length>0&&t.forEach((e=>{e.removeAttribute("checked")})),this.checked?this.setAttribute("checked",""):this.removeAttribute("checked")}}))}e.forEach((e=>{e.addEventListener("change",t)}))}},5176:function(e,t,n){"use strict";var r=n(5834);function o(e,t){e.classList.contains("cmp-form-text--number__text")&&document.getElementById(e.id).parentElement.setAttribute("aria-invalid",t.toString())}function a(e){const t=e.getAttribute("aria-describedby");if(!t)return null;const n=t.split(" ").find((e=>e.endsWith("-error")));return document.getElementById(n)}function i(e,t){t&&a(e)&&!a(e).parentElement.classList.contains("active")&&a(e).parentElement.classList.add("active")}function s(e,t){return document.getElementById(e.id).parentElement.getAttribute(t)}function c(e){const t=a(e);if(t){t.textContent="",i(e,!1),e.removeAttribute("aria-invalid","false"),e.parentElement.classList.remove("afterelement-error"),o(e,!1);const n=document.getElementById(e.id).parentElement.parentElement.querySelector(".cmp-form-text__error");n&&n.classList.remove("active")}}var l=n(3729);const u=document.querySelector(".cmp-roamingcostfinder");if(window.fieldValidationDataLayer=window.fieldValidationDataLayer||{},u){let d=!0;const p=u.getAttribute("data-flagpath"),m="true"===u.getAttribute("data-isbusiness"),f="true"===u.getAttribute("data-isinternationalcalling"),h=u.getAttribute("data-api-url"),g=document.querySelector(".cmp-autocomplete__container"),y=document.querySelector(".cmp-autocomplete__results"),v=document.querySelector(".cmp-autocomplete__input"),b=u.querySelectorAll(".options"),_=u.querySelector("[type=SUBMIT]"),S=u.querySelector("form"),w=document.querySelectorAll(".cmp-form-options--radio");let E=document.querySelectorAll(".cmp-roamingcostfinder__result-fragment"),x=!1,k=-1;function A(){if(v.value.length>1){x=!0;const e=y?.children?.length;g.setAttribute("aria-expanded","true"),v.setAttribute("aria-label",`Destination list opened. ${e||0} destinations displayed. You can use arrow buttons and enter to pick a destination.`),y?.classList.toggle("visible",e<=200)}}function L(){x=!1,y?.classList.remove("visible"),g.setAttribute("aria-expanded","false"),v.setAttribute("aria-activedescendant",""),I(v)?v.setAttribute("aria-label",`${v.value} selected`):v.setAttribute("aria-label","Enter destination name")}const C=[];function q(e){const t=e.id;v.setAttribute("aria-activedescendant",t),e.focus()}function D(e){const t=e.querySelector("span").innerText;v.value=t,e.setAttribute("aria-selected","true"),v.removeAttribute("aria-activedescendant"),v.focus(),L(),M();const n=new URLSearchParams(window.location.search);t&&"string"==typeof t&&n.set("country",t.trim());const r=R(n),o=`${window.location.pathname}?${r}`;o&&window.history.replaceState(null,"",o)}function M(){m||(b[0].classList.remove("threedigital-hide"),b[0].querySelectorAll("input").forEach((e=>{e.required=!0})))}function I(e){const t=e.value?.trim()?.toLowerCase();return!!C.some((e=>e?.label?.trim()?.toLowerCase()===t))||(u?.querySelector(".cmp-roamingcostfinder__results")?.classList.add("threedigital-hide"),!1)}function T(e){const t=document.querySelector(`#${e.id}-error`);t&&(e.validity.valueMissing?t.textContent=s(e,"data-cmp-required-message"):I(e)||(t.textContent=s(e,"data-cmp-constraint-message"))),fieldValidationDataLayer.form_field_validation_message=t.textContent}function P(e){T(e),i(e,!0),e.setAttribute("aria-invalid","true"),fieldValidationDataLayer.form_field_validation_status="failed",(0,l.E0)(fieldValidationDataLayer)}function N(e){if(Array.isArray(e)&&e.length>0){e.sort(((e,t)=>e.label.localeCompare(t.label)));const t=e.map(((e,t)=>`
  • \n
  • `)).join("");y.innerHTML=t,k=-1}else y.innerHTML="",P(v)}function O(e){const t=y.childNodes;let n=null;switch(e.key){case"ArrowDown":if(e.preventDefault(),k0&&(k-=1,n=t.item(k),q(n));break;case"Home":k>0&&(k=0,n=t.item(k),q(n));break;case"End":ko.test(e?.label?.trim())));let a=null;n=[...t],t.forEach((e=>{e.main&&(a=e.main),e.alt===a&&n.splice(n.indexOf(e),1)}))}N(n)}function H(e){Array.from(e).slice(1).forEach((e=>{const t=e.querySelectorAll("input");e.classList.add("threedigital-hide");const n=e.getAttribute("data-radioid");t.forEach((e=>{j.includes(n)||(e.checked=!1),e.required=!1}))}))}Array.from(y.children).forEach(((e,t)=>{const n=e.getAttribute("data-flag"),r=e.getAttribute("data-label"),o=e.getAttribute("data-alternative"),a=o&&o.split(",");C.push({iso:n,flag:n?.toLowerCase(),label:r,main:t}),a&&a.forEach((e=>{C.push({iso:n,flag:n?.toLowerCase(),label:`${r} (including ${e})`,alt:t})}))})),v.addEventListener("click",A),document.addEventListener("click",(e=>{[v,...y.childNodes].includes(e.target)||L()})),y?.addEventListener("click",(e=>{[...y.childNodes].includes(e.target)&&D(e.target)})),y?.addEventListener("mousedown",(e=>{[...y.childNodes].includes(e.target)&&(d=!1)})),v.addEventListener("keydown",O),y?.addEventListener("keydown",O),v.addEventListener("input",(e=>{const t=e.target.value;t.length>1?(B(t),x||A(),I(v)&&(c(v),M())):L()})),v.addEventListener("blur",(()=>{fieldValidationDataLayer.event_trigger="blur",fieldValidationDataLayer.form_field_name=v.getAttribute("name"),x=!1,!d||!v.validity.valueMissing&&I(v)||x?(c(v),fieldValidationDataLayer.form_field_validation_status="success",fieldValidationDataLayer.form_field_validation_message="",(0,l.E0)(fieldValidationDataLayer)):P(v),d=!0}));const F=Array.from(b);let j=[],$=new Set;F.forEach((e=>{e.querySelectorAll('fieldset input[type="radio"]').forEach((e=>{e.addEventListener("change",(()=>{if(e.checked){let t=Number(e.id.split("-")[0].charAt(e.id.split("-")[0].length-1)),n=e.value+"/";function r(){n=1==t&&"Mobile Broadband"!==e.value?(j[j.length-1]||"")+e.value+"//":(j[j.length-1]||"")+e.value+"/"}0!==j.length&&$.has(t)?(j.pop(),r()):r(),$.add(t);for(let o of $)o>t&&($.delete(o),j.pop(),n=1==t&&"Mobile Broadband"!==e.value?(j[j.length-1]||"")+e.value+"//":(j[j.length-1]||"")+e.value+"/");j.push(n),H(b),j.forEach((e=>{const t=u.querySelector(`[data-radioid="${e}"]`);if(t){const e=t.querySelectorAll("input");t.classList.remove("threedigital-hide"),e.forEach((e=>{e.required=!0}))}}))}}))}))}));function R(e){return e.toString().replace(/%20/g,"+").replace(/%28/g,"(").replace(/%29/g,")").replace(/%2C/g,",")}(()=>{const e=u.querySelector(".cmp-roamingcostfinder__results");_.addEventListener("click",(()=>{const t=new MutationObserver((n=>{n.forEach((n=>{n.addedNodes.length&&e&&(e.scrollIntoView({behavior:"smooth"}),t.disconnect())}))}));t.observe(document.body,{childList:!0,subtree:!0}),setTimeout((()=>{e&&e.scrollIntoView({behavior:"smooth"})}),1500)}))})(),_.addEventListener("click",(e=>{e.preventDefault();const t='input[type="radio"]:not(.threedigital-hide):checked',n=Array.from(u.querySelectorAll(t)).length>0,o=S.reportValidity()&&I(v)&&(!!m||n);(0,r.B)(w);const a=h;if(v.validity.valueMissing&&v.blur(),o){const e=u.querySelector(".cmp-autocomplete__input")?.value||"",n=C.find((t=>t?.label?.trim()===e?.trim()))?.iso||"",r=C.find((t=>t?.label?.trim()===e?.trim()))?.label||"",o=Array.from(u.querySelectorAll(t)).reduce(((e,t)=>({...e,[t.name]:t.value})),{planname:"",plantype:"",start:"",plansubtype:"",term:""});fetch("/libs/granite/csrf/token.json").then((e=>e.json())).then((e=>{let t;t="Pay As You Go"===o.planname?{plantypepayload:[{planname:"Pay As You Go",plans:[{plantypes:[{plansubtypes:[{plansubtype:"Three Your Way"}]}]}]}],Countries:[{isocode:n,country:r}],isInternationalCalling:f}:{plantypepayload:[{planname:m?"Business - Pay Monthly":o.planname,plans:[{plantype:o.plantype,plantypes:[{start:o.start,plansubtypes:[{plansubtype:o.plansubtype,terms:[{term:o.term}]}]}]}]}],Countries:[{isocode:n,country:r}],isInternationalCalling:f},fetch(a,{method:"POST",headers:{"Content-type":"application/json; charset=UTF-8","Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"POST","Access-Control-Allow-Headers":"Content-Type","CSRF-Token":e.token},body:JSON.stringify(t)}).then((e=>{const t="international_roaming"==S.getAttribute("name");if(!e.ok)throw new Error("Network response for roaming cost API errored");return(0,l.W9)(S.getAttribute("name"),"success",t?"International Roaming Cost Finder Form Submitted Successfully":"International Calling Cost Finder Form Submitted Successfully"),e.json()})).then((e=>{document.querySelector(".cmp-roamingcostfinder__results")?.classList.remove("threedigital-hide"),E.forEach((e=>{e.classList.contains("threedigital-hide")||e.classList.add("threedigital-hide")})),document.querySelector("#"+e.experienceFragmentId)?.classList.remove("threedigital-hide");const t=document.querySelector("#datapassport-"+e.experienceFragmentId);e.showDataPassport?t?.classList.remove("threedigital-hide"):t?.classList.add("threedigital-hide");var n=document.querySelectorAll("#callabroad-payg-addons"),r=document.querySelectorAll("#callabroad-paym-addons");if(!0===e.showCallAbroad&&"Pay As You Go"===o.planname)for(var a=0;a{console.error("Error:",e),(0,l.W9)(S.getAttribute("name"),"failed",e)}))}))}else n?(0,l.W9)(S.getAttribute("name"),"failed","No matching country found"):(0,l.W9)(S.getAttribute("name"),"failed","Please choose your plan")})),document.addEventListener("DOMContentLoaded",(()=>{let e=new URLSearchParams(window.location.search);const t=document.querySelector(".cmp-roamingcostfinder"),n=t.querySelector(".cmp-autocomplete__input");let r="country",o="plan";const a=t.querySelector("[type=SUBMIT]"),i=(t,n)=>{n?e.set(t,n):e.delete(t);const r=R(e),o=`${window.location.pathname}?${r.toString()}`;return window.history.replaceState(null,"",o),o},s=e.get(r)?decodeURIComponent(e.get(r)):null,c=e.get(o),l=(u=s)?u.split(/(\s|,)/).map(((e,t)=>0===t?e.charAt(0).toUpperCase()+e.slice(1):e)).join(""):u;var u;l&&I({value:l})?(n&&(n.value=l,n.focus()),(e=>{const n={paym:"Pay Monthly",payg:"Pay As You Go",mbbpaym:"Mobile Broadband Pay Monthly",mbbpayg:"Mobile Broadband Pay As You Go"};t.querySelectorAll('input[name="planname"]').forEach((t=>{t.checked=t.value===n[e]}))})(c),M()):(t.querySelectorAll('input[name="planname"]').forEach((e=>e.checked=!1)),s&&P(n)),a&&n&&a.addEventListener("click",(()=>{const e=n.value.trim(),a=t.querySelector('input[name="planname"]:checked')?.value,s=Object.entries({"Pay Monthly":"paym","Pay As You Go":"payg","Mobile Broadband Pay Monthly":"mbbpaym","Mobile Broadband Pay As You Go":"mbbpayg"}).find((([e])=>e===a))?.[1];e&&s&&(i(r,e),i(o,s))}));const d=()=>{i(r,n.value.trim())};n&&(n.addEventListener("input",d),n.addEventListener("blur",(()=>{n.value.trim()||i(r,null)})))}))}},1498:function(e,t,n){"use strict";var r=n(8279);const o=document.querySelector(".cmp-searchbar"),a=document.querySelector(".cmp-searchbar__search");if(o){const i=document.querySelector(".threedigital .header"),s=document.querySelector(".search-form");if(i&&s&&(s.style.display="none",i.style.height="auto"),a){function c(){const e=document.querySelector(".cmp-searchbar__button");e&&e.addEventListener("click",(function(){const e=document.querySelector(".cmp-searchbar .js-yext-submit.yxt-SearchBar-button");e&&e.click()}))}a.closest(".cmp-containerprimary").classList.add("cmp-searchbar--primary");const l=()=>{(0,r.fs)("https://assets.sitescdn.net/answers-search-bar/v1.2/answers.min.js",!0,(()=>{ANSWERS.init({apiKey:"46281e259fc6522cc15ea1a0011c21a9",experienceKey:"threeconfigbusiness",experienceVersion:"PRODUCTION",locale:"en_GB",businessId:"1970093",templateBundle:TemplateBundle.default,onReady:function(){ANSWERS.addComponent("SearchBar",{container:".cmp-searchbar__search-form",name:"search-bar-help",redirectUrl:"https://www.three.co.uk/business/search",placeholderText:"Search"})}}),c()}))};(0,r.fs)("https://assets.sitescdn.net/answers-search-bar/v1.2/answerstemplates.compiled.min.js",!0,l)}}},55:function(){let e=document.scrollingElement;e.style.setProperty("overflow","scroll"),requestAnimationFrame((()=>{e.style.setProperty("--scrollbar-width",(()=>{const t=window.innerWidth-e.clientWidth;return t>16?"16px":t+"px"})()),e.style.setProperty("overflow","")}))},491:function(){var e=document.querySelector(".cmp-containershortcuts"),t=document.querySelectorAll(".cmp-containershortcuts .cmp-linkgroup__item");t&&1==t.length&&e&&e.classList.add("cmp-containershortcuts--single-item")},3117:function(e,t,n){"use strict";n.d(t,{u:function(){return u}});var r=n(8279),o=n(3199);const a=document.querySelectorAll(".cmp-shortcuts2"),i=!!document.querySelector('[data-wcmmode="EDIT"]'),s=Array.from(a).map((e=>({self:e,id:e.getAttribute("id"),layout:e.getAttribute("data-layout"),hideArrows:"true"===e.getAttribute("data-hide-arrows"),carousel:"true"===e.getAttribute("data-carousel"),disableOnMobile:e.classList.contains("cmp-shortcuts2--disable-mobile"),viewport:e.querySelector(".cmp-shortcuts2__viewport"),list:e.querySelector(".cmp-shortcuts2__list"),slides:e.querySelectorAll(".cmp-shortcuts2__link-wrapper"),links:e.querySelectorAll(".cmp-shortcuts2__link"),heading:e.querySelector(".cmp-shortcuts2__heading"),next:e.querySelector(".cmp-shortcuts2__right"),prev:e.querySelector(".cmp-shortcuts2__left"),taskQueue:Promise.resolve()})));function c(e){return new Promise((t=>{e.then((()=>{t()})).catch((e=>{console.log(e),t()}))}))}let l=new Set;const u=()=>{m.forEach((e=>{if(function(e){let t=e;for(;t;){if("none"===window.getComputedStyle(t).display)return!0;t=t.parentElement}return!1}(e.self))return;if(l.has(e.id))return;l.add(e.id);let t=!0,n=!1,r=!1;function a(t){e.taskQueue=e.taskQueue.then((()=>c(e.flicking.moveTo(t))))}function s(){const t=e.viewport.getBoundingClientRect(),n=[],r=[],a=[],i=(0,o.tq)()?27:75;return e.slides.forEach(((e,o)=>{const s=e.getBoundingClientRect();s.leftMath.ceil(t.right)-i?(a.push(o),s.rightMath.ceil(t.right)-i||r.push(o)):n.push(o)})),{visibleSlides:n,notVisibleSlides:a,partiallyVisibleSlides:r}}function u(){const{notVisibleSlides:t,partiallyVisibleSlides:n}=s();e.slides.forEach(((r,o)=>{n.includes(o)?(r.setAttribute("aria-hidden","true"),r.removeAttribute("inert"),r.setAttribute("tabindex","-1"),e.links[o].setAttribute("tabindex","-1")):t.includes(o)?(r.setAttribute("aria-hidden","true"),r.setAttribute("inert",""),r.setAttribute("tabindex","-1")):(r.removeAttribute("aria-hidden"),r.removeAttribute("inert"),r.setAttribute("tabindex","0"))}))}const d=new Flicking(`#flick__${e.id}`,{bound:!0,align:i?"prev":"center"});function p(){e.flicking.on(Flicking.EVENTS.WILL_CHANGE,(n=>{e.prev.classList.remove("cmp-shortcuts2__arrows--disabled"),t=!1,0===n.index&&(e.prev.classList.add("cmp-shortcuts2__arrows--disabled"),t=!0)})),e.flicking.on(Flicking.EVENTS.MOVE_END,(()=>{e.next.classList.remove("cmp-shortcuts2__arrows--disabled"),n=!1,1===function(){let t=-window.getComputedStyle(e.list).transform.split(",")[4]/(e.list.clientWidth-(0,o.Em)(e.viewport));return t>.99?1:t<0?0:t}()&&(e.next.classList.add("cmp-shortcuts2__arrows--disabled"),n=!0)})),e.flicking.on(Flicking.EVENTS.REACH_EDGE,(r=>{var o;o=r.direction,e.next.classList.remove("cmp-shortcuts2__arrows--disabled"),e.prev.classList.remove("cmp-shortcuts2__arrows--disabled"),t=!1,n=!1,"PREV"===o?(e.prev.classList.add("cmp-shortcuts2__arrows--disabled"),t=!0):"NEXT"===o&&(e.next.classList.add("cmp-shortcuts2__arrows--disabled"),n=!0)})),e.flicking.on(Flicking.EVENTS.CHANGED,(()=>{u()}))}e.flicking=d,u(),p();function m(o){e.taskQueue=e.taskQueue.then((()=>new Promise((e=>{e()})))).then((()=>c((t||n)&&r?e.flicking.moveTo(function(o,a){const i=s().visibleSlides,c="next"===o?1:-1,l="next"===o?3:i.at(0),u="next"===o?-1:0;let d;return(a=a??("next"===o?t:n))&&r?(d=i.at(u)+c,4===i.length&&(d=l)):d=e.flicking.index+c,d}(o)):"next"===o?e.flicking.next():e.flicking.prev())))}function f(){!1!==e.flicking._initialized&&((0,o.Em)(e.viewport)>=e.list.clientWidth?(e.self.classList.add("cmp-shortcuts2--hide-arrows-without-overflow"),e.flicking.bounce=0,e.flicking.align="prev",e.heading&&(e.heading.style.display="none")):(e.self.classList.remove("cmp-shortcuts2--hide-arrows-without-overflow"),e.flicking.bounce="20%",e.align="center",e.heading&&(e.heading.style.display="block")))}function h(){(0,o.tq)()?(a(0),e.taskQueue=e.taskQueue.then((()=>e.flicking.destroy()))):(e.flicking.init(),p())}function g(){e.list.clientWidth>e.viewport.clientWidth?e.list.style.width="max-content":e.list.style.width="100%"}e.self.querySelectorAll("img").forEach((e=>{e.addEventListener("dragstart",(e=>e.preventDefault()))})),r=s().visibleSlides.length%2==0,e.next.addEventListener("click",(()=>m("next"))),e.prev.addEventListener("click",(()=>m("prev"))),e.heading&&(e.heading.innerText=e.heading.innerText+` (${e.flicking.panelCount})`),e.hideArrows&&(f(),window.addEventListener("resize",(()=>{f()}))),e.disableOnMobile&&(h(),window.addEventListener("resize",(()=>{h()}))),g(),window.addEventListener("resize",(()=>{g()})),i&&(a(0),e.taskQueue=e.taskQueue.then((()=>e.flicking.destroy())))}))},d=()=>{let e=1440,t=900;return(0,o.tq)()&&(e=899,t=320),1-(e-window.innerWidth)/(e-t)},p=e=>{e.self.querySelectorAll(".cmp-shortcuts2__image").forEach((e=>{e.style.width=(()=>{let e=160,t=125;return(0,o.tq)()&&(e=144,t=108),`${Math.floor(d()*(e-t))+t}px`})()}))},m=s.filter((e=>e.carousel));m.length>0&&(0,r.R4)(u),s.forEach((e=>{p(e),window.addEventListener("resize",(()=>{p(e)}))}))},5410:function(e,t,n){"use strict";n.a(e,(async function(e,t){try{var r=n(8705),o=n(3729),a=n(1560);const i=document.querySelectorAll(".cmp-simcalculator");let s;if(0!==i.length){const l="/bin/threedigital/content-fragments",u=i[0].getAttribute("data-cmp-fragment-path"),d=await(0,r.RJ)();s=await fetch(l,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","CSRF-Token":d},body:JSON.stringify({fragmentPath:u})}).then((e=>{if(!e.ok)throw new Error("Content fragment API errored");return e.json()})).then((e=>e?.data?.priceRiseModelList?.items[0])).catch((e=>{throw console.error("Error fetching content fragment:",e.message),e}))}function c(e){e.value=e.value.replace(/[^0-9]/g,"")}i.forEach((e=>{const t=e.querySelector('[name="total"]'),n=e.querySelector('[name="roameu"]'),r=e.querySelector('[name="roamworld"]'),i=e.querySelector(".cmp-simcalculator__price"),l=e.querySelector(".cmp-simcalculator__price-rise"),u=e.getAttribute("data-cmp-error-total-exceeded"),d=e.getAttribute("data-cmp-error-roaming-exceeded"),p=l.innerHTML,m=Number(e.getAttribute("data-cmp-basepriceone")),f=Number(e.getAttribute("data-cmp-basepricetwo")),h=Number(e.getAttribute("data-cmp-basepricethree")),g=Number(e.getAttribute("data-cmp-basepriceten")),y=Number(e.getAttribute("data-cmp-basepricetwenty")),v=Number(e.getAttribute("data-cmp-euextraone")),b=Number(e.getAttribute("data-cmp-euextratwo")),_=Number(e.getAttribute("data-cmp-euextrathree")),S=Number(e.getAttribute("data-cmp-euextraten")),w=Number(e.getAttribute("data-cmp-euextratwenty")),E=Number(e.getAttribute("data-cmp-rowextraone")),x=Number(e.getAttribute("data-cmp-rowextratwo")),k=Number(e.getAttribute("data-cmp-rowextrathree")),A=Number(e.getAttribute("data-cmp-rowextraten")),L=Number(e.getAttribute("data-cmp-rowextratwenty"));function C(){c(t),c(n),c(r);const e=parseInt(t.value,10)||0,C=parseInt(n.value,10)||0,q=parseInt(r.value,10)||0;if(C+q>e)return i.innerHTML=`${d}`,l.style.visibility="hidden",void(0,o.E0)({form_name:"simcalculator",event_trigger:"input",form_field_name:this.getAttribute("name"),form_field_validation_message:d,form_field_validation_status:"failed"});let D=0,M=0,I=0;1===e?(D=m,M=v,I=E):2===e?(D=f,M=b,I=x):e>=3&&e<=9?(D=h,M=_,I=k):e>=10&&e<=19?(D=g,M=S,I=A):e>=20&&e<=50&&(D=y,M=w,I=L);const T=e-(C+q),P=T*D+C*(D+M)+q*(D+I),N=T*(0,a.wG)(s,D)+C*(0,a.wG)(s,D+M)+q*(0,a.wG)(s,D+I);if(e>50)return i.innerHTML=`${u}`,l.style.visibility="hidden",void(0,o.E0)({form_name:"simcalculator",event_trigger:"input",form_field_name:this.getAttribute("name"),form_field_validation_message:u,form_field_validation_status:"failed"});if(0===P)i.innerHTML="£XX.xx",l.style.visibility="hidden",(0,o.E0)({form_name:"simcalculator",event_trigger:"input",form_field_name:this.getAttribute("name"),form_field_validation_status:"success"});else{i.innerHTML=`£${Math.floor(P)}.${(P%1).toFixed(2).slice(2)}`,l.innerHTML=p;const e=(0,a.So)(),t=2;let n=P,r=e,c=(0,a.jz)(s),u=!1;for(let o=0;o£${n.toFixed(2)} from Apr ${r}`,l.appendChild(e),l.style.visibility="visible"}(0,o.E0)({form_name:"simcalculator",event_trigger:"input",form_field_name:this.getAttribute("name"),form_field_validation_status:"success"})}}[t,n,r].forEach((e=>{e.addEventListener("input",C)}))})),t()}catch(p){t(p)}}),1)},3753:function(){document.querySelectorAll("[aria-labelledby=custom-svg-title]").forEach((e=>{const t="id"+Math.random().toString(16).slice(2);e.setAttribute("aria-labelledby",t),e.children[0].id=t}))},8333:function(){!function(){if(!window.aemIsSpriteInjectInitialized){if(!document.getElementById("svg-all-wrapper")){const t=document.getElementById("svg-path")?.href;var e=new XMLHttpRequest;e.open("GET",t,!0),e.send(),e.onload=function(){var t=document.createElement("div");t.style.display="none",t.id="svg-all-wrapper",t.innerHTML=e.responseText,document.body.insertBefore(t,document.body.childNodes[0])}}window.aemIsSpriteInjectInitialized=!0}}()},769:function(){"use strict";document.querySelectorAll("div.cmp-tabs:not(.cmp-tabs2)").forEach((e=>{const t="tabs2-dynamic-link"===e.getAttribute("data-action"),n="true"===e.getAttribute("data-noindex"),r=e.querySelectorAll(".cmp-tabs__tab");if(n){let e="";const t=document.createElement("meta"),n=()=>{e=document.querySelector(".cmp-tabs__tab--active")};window.addEventListener("load",n),t.setAttribute("name","robots"),t.setAttribute("content","index, follow"),document.head.appendChild(t),r.forEach((n=>{n.addEventListener("click",(()=>{n?.textContent.trim()!==e?.textContent.trim()?t.setAttribute("content","noindex, nofollow"):t.setAttribute("content","index, follow")}))}))}if(t){const e=new URL(window.location.href),t=new URLSearchParams(e.search).get("tab");r.forEach(((e,t)=>{e.addEventListener("click",(()=>{!function(e,t){const n=new URLSearchParams(window.location.search);n.set(e,t);const r=`${window.location.pathname}?${n.toString()}${window.location.hash}`;history.replaceState(null,"",r)}("tab",t+1)}))})),"2"==t?(r[0].classList.remove("cmp-tabs__tab--active"),r[1].classList.add("cmp-tabs__tab--active")):"3"==t&&(r[0].classList.remove("cmp-tabs__tab--active"),r[2].classList.add("cmp-tabs__tab--active"))}}))},2835:function(e,t,n){"use strict";var r=n(9880);document.querySelectorAll(".cmp-tabs2").forEach((e=>{const t="true"===e.getAttribute("data-noindex");e.querySelectorAll(".cmp-tabs2__tab").forEach((e=>{const t=e.querySelector(".cmp-tabs2__tab-label");if(t){const n=Math.floor(t.getBoundingClientRect().width);e.style.width=`${n+20}px`}}));const n=e.querySelector(".cmp-tabs2__viewport"),o=Array.from(e.querySelectorAll(".cmp-tabs2__tab")).reduce(((e,t)=>e+Math.ceil(t.getBoundingClientRect().width)),0);o{i=!1}),200)}if(a.addEventListener("mousedown",s),a.addEventListener("mouseup",s),a.addEventListener("focusin",(function(){i||a.classList.add("cmp-tabs2--focus-within")})),a.addEventListener("focusout",(function(e){a.contains(e.relatedTarget)||a.classList.remove("cmp-tabs2--focus-within")})),t){let t="";const n=document.createElement("meta"),r=e.querySelectorAll(".cmp-tabs__tab"),o=()=>{t=document.querySelector(".cmp-tabs__tab--active")};window.addEventListener("load",o),n.setAttribute("name","robots"),n.setAttribute("content","index, follow"),document.head.appendChild(n),r.forEach((e=>{e.addEventListener("click",(()=>{e?.textContent.trim()!==t?.textContent.trim()?n.setAttribute("content","noindex, nofollow"):n.setAttribute("content","index, follow")}))}))}if(e){(0,r.lg)(e,"tabs2",r.fS);const t=e.querySelectorAll(".cmp-tabs2__tab");t&&t.forEach((e=>{const t=e.querySelector(".cmp-tabs2__tab-label");if(t){const n=t.textContent.trim()?t.textContent.toLowerCase().trim():r.fS,o=t.textContent.trim()?t.textContent.toLowerCase().trim():r.u3;e.setAttribute("data-analytics-section-title",n),(0,r.s0)(e,"button",o)}}))}})),document.addEventListener("DOMContentLoaded",(function(){const e=document.querySelector(".cmp-tabs2"),t=e?.querySelectorAll(".cmp-tabs2__tab");if(0===(t?.length??0))return;const n=e?.querySelectorAll(".cmp-tabs2__tabpanel"),r=e?.querySelector(".cmp-tabs2__tabpanel-camera");function o(){if(window.innerWidth<=900){const t=e?.querySelector(".cmp-tabs2__tabpanel--active");if(t){const e=t.querySelector(".container").scrollHeight+10;r.style.height=`${e}px`}}else r.style.height="auto"}t.forEach((e=>{e.addEventListener("click",(function(){n.forEach((e=>{e.classList.remove("cmp-tabs2__tabpanel--active")}));const t=e.getAttribute("aria-controls"),r=document.getElementById(t);r&&r.classList.add("cmp-tabs2__tabpanel--active"),setTimeout((()=>{o()}),300)}))})),window.addEventListener("resize",o),o()}))},3745:function(){document.querySelectorAll(".cmp-tags.cmp-tags--dismissible").forEach((e=>{const t=e.querySelectorAll(".cmp-tags__item"),n=e.querySelector(".cmp-tags__link");t.forEach((e=>{e.addEventListener("click",(()=>function(e){e.style.display="none",Array.from(t).reduce(((e,t)=>"flex"===window.getComputedStyle(t).display?e+1:e),0)<2&&n.setAttribute("style","display: none;")}(e)))})),n.addEventListener("click",(function(){t.forEach((e=>{e.setAttribute("style","display: none;")}))})),t.length>=2&&(n.style.display="block")}))},8982:function(){document.addEventListener("DOMContentLoaded",(()=>{document.querySelectorAll(".cmp-text").forEach((e=>{const t=e.querySelector("ol");t&&t.querySelectorAll("li").forEach((e=>{const t=window.getComputedStyle(e,"::marker").getPropertyValue("content");t&&"none"!==t&&e.classList.add("cmp-text__marker-bold")}));const n=e.getElementsByTagName("p"),r=document.querySelectorAll(".stripbanner");Array.from(n).forEach((e=>{const t=Array.from(e.childNodes),n=t.filter((e=>!(e=>{const t="#text"===e.nodeName,n=!e.nodeValue||null===e.nodeValue||0===e.nodeValue.search(/\n/);return t&&n})(e)));if(1===n.length&&"A"===n[0].nodeName&&(o=e,!Array.from(r).some((e=>e.contains(o))))){const e=n[0];e.classList.contains("cmp-text--standalone-a")||e.classList.add("cmp-text--standalone-a")}var o;if(1===t.length&&"SPAN"===t[0].nodeName){const n=()=>{t[0].classList.contains("style-intro-copy")&&e.classList.add("cmp-text--heading-width"),e.style.marginBottom=window.getComputedStyle(t[0]).marginBottom};window.addEventListener("resize",n),n()}})),e.querySelectorAll("a").forEach((e=>{"_blank"!==e.target||e.nextElementSibling?.classList.contains("new-window-icon")?"newItem"!==e.target||e.nextElementSibling?.classList.contains("download-icon-svg")||(e.innerText+=" ",e.insertAdjacentHTML("beforeend",'')):(e.innerText+=" ",e.insertAdjacentHTML("beforeend",''))}))}))}))},7431:function(e,t,n){"use strict";var r=n(3729),o=n(8279),a=[];let i;const s=document.querySelectorAll(".cmp-thirdparty-plugins");function c(e){return e.parentElement.querySelector("label.mktoLabel.mktoHasWidth")}function l(e,t){if(t||(t=e.parentElement.querySelector(".cmp-marketo-error__msg")),t){t.classList.remove("cmp-marketo-error__msg--visible");const e=t.querySelector(".cmp-marketo-span-error__msg");e&&(e.textContent="")}}function u(e){let t,n,r=!0;const o=e.parentElement.querySelector(".cmp-marketo-error__msg");if("FirstName"!==e.id&&"LastName"!==e.id||(t=/^(?![\-])[a-zA-Z \-']{2,100}$/,n=`Please enter a valid ${e.id.replace(/([A-Z])/g," $1").trim()}.`),"Phone"===e.id&&(t=/^((\+?4{2})|0)\s?[0-9]{10,11}$/,n="Please enter a valid phone number."),"Email"===e.id&&(t=/^[A-Za-z0-9._%+\-]+@[A-Za-z0-9\.-]+(\.[A-Za-z0-9\-]{2,4})$/,n="Please enter a valid email address."),t&&n){const a=e.value.trim();""===a?(l(e,o),e.setAttribute("data-validate",""),h(e,!0,"Field is required"),r=!1):t.test(a)?(l(e,o),e.setAttribute("data-validate","Valid input"),h(e,!1,n)):(!function(e,t,n){if(!n){const t=document.createElement("div"),r=document.createElement("span");t.classList.add("cmp-marketo-error__msg"),r.classList.add("cmp-marketo-span-error__msg"),t.appendChild(r),e.parentElement.appendChild(t),n=t}n.querySelector(".cmp-marketo-span-error__msg").textContent=t,n.classList.add("cmp-marketo-error__msg--visible")}(e,n,o),e.setAttribute("data-validate","Invalid input"),h(e,!1,n),r=!1)}return r}function d(e,t,n,r){e.style.display="block",e.classList.add("accessible-dropdown--active"),e.querySelector("li").focus(),n.forEach((e=>e.classList.remove("accessible-hovered"))),n[r].classList.add("accessible-hovered"),n[r].focus()}function p(e,t){e.style.display="none",e.classList.remove("accessible-dropdown--active")}function m(e,t,n,r,o,a){t.querySelectorAll("li").forEach((e=>e.classList.remove("cmp-marketo-text--dropdown-list__item--selected"))),e.classList.add("cmp-marketo-text--dropdown-list__item--selected"),n.value=e.textContent,n.setAttribute("value",e.getAttribute("value")),"Company_Type__c_account"===e.getAttribute("id")&&"Sole Trader"===e.getAttribute("value")?(r.value="",n.value=""):r.value=e.getAttribute("value"),p(t),""!==n.value.trim()&&(o.classList.add("cmp-thirdparty-text-label--active__not-empty"),f())}function f(){const e=document.querySelectorAll(".mktoFormRow");e.length>0&&e.forEach((e=>{const t=e.querySelector(".cmp-thirdparty-text-label--active"),n=e.querySelector("ul.cmp-marketo-text--dropdown-list");t||n?e.classList.add("cmp-thirdparty-row--active"):e.classList.remove("cmp-thirdparty-row--active")}))}function h(e,t,n){const o={fieldName:e.name,isValid:t,errorMessage:n};(0,r.E0)(o)}s.forEach((e=>{if("marketoForm"===e.getAttribute("data-plugin-type")){const t=e.querySelector(".cmp-thirdparty-plugins__marketoForm"),n=t?t.querySelector("form"):null;if(n){const e=n.getAttribute("data-formId"),t=n.getAttribute("data-munchkinId");if(e&&t&&MktoForms2.loadForm("//pages.business.three.co.uk",t,e,(function(e){if(n){n.removeAttribute("style"),n.querySelectorAll("*").forEach((e=>{e.removeAttribute("style")}));const t=n.querySelectorAll(".mktoFormRow input"),o=n.querySelectorAll(".mktoFormRow select");t.forEach((e=>{!function(e,t){t&&e&&e.addEventListener("focus",(function(){t.classList.add("cmp-thirdparty-text-label--active"),f()}))}(e,c(e))})),o.forEach((e=>{const t=c(e);!function(e,t){e.forEach((e=>{const n=e.querySelector("option");n&&"Select..."===n.textContent.trim()&&(n.textContent=t.value,n.style.display="none")}))}(o,t),function(e,t){let n=!1;t&&(t.style.cursor="pointer");const r=document.createElement("input");r.setAttribute("class",e.getAttribute("class")),r.classList.add("cmp-marketo-text--dropdown-box"),r.setAttribute("autocomplete","off"),r.setAttribute("type","text"),r.setAttribute("id",e.getAttribute("id")),r.setAttribute("name",e.getAttribute("name")),r.setAttribute("aria-labelledby",e.getAttribute("aria-labelledby")),r.setAttribute("aria-required",e.getAttribute("aria-required")),r.setAttribute("aria-describedby",e.getAttribute("aria-describedby")),r.setAttribute("aria-invalid",e.getAttribute("aria-invalid")),r.setAttribute("readonly",!0),r.setAttribute("tabindex","0"),r.addEventListener("focus",(function(){t.classList.add("cmp-thirdparty-text-label--active")})),r.addEventListener("focusout",(function(){t.classList.remove("cmp-thirdparty-text-label--active")})),e.insertAdjacentElement("beforebegin",r);const o=document.createElement("ul");o.classList.add("cmp-marketo-text--dropdown-list"),o.style.display="none";const i=e.querySelectorAll("option");function s(e,t){e.forEach((e=>e.classList.remove("accessible-hovered"))),e[t]&&(e[t].classList.add("accessible-hovered"),e[t].scrollIntoView({block:"nearest"}))}i.forEach((a=>{const i=document.createElement("li");i.classList.add("cmp-marketo-text--dropdown-list__item"),i.textContent=a.textContent,i.setAttribute("value",a.value),i.setAttribute("tabindex","-1"),i.addEventListener("click",(function(){m(i,o,r,e,t,n)})),o.appendChild(i)})),r.insertAdjacentElement("afterend",o),r.addEventListener("click",(function(){!function(e){const t="none"===e.style.display;e.style.display=t?"block":"none",e.classList.toggle("accessible-dropdown--active",t)}(o)})),document.addEventListener("click",(function(e){r.contains(e.target)||o.contains(e.target)||p(o,n)})),r.addEventListener("keydown",(function(a){const i=Array.from(o.querySelectorAll("li"));let c=i.findIndex((e=>e.classList.contains("accessible-hovered")));switch(a.key){case"ArrowDown":a.preventDefault(),n?-1===c||c>=i.length-1?s(i,0):s(i,c+1):(d(o,n,i,0),s(i,0),n=!0);break;case"ArrowUp":a.preventDefault(),n&&s(i,c<=0||-1===c?i.length-1:c-1);break;case"Enter":a.preventDefault(),n&&-1!==c&&m(i[c],o,r,e,t);break;case"Tab":n&&(p(o,n),n=!1);break;case a.shiftKey:n||(a.preventDefault(),d(o,n,i,0),s(i,0),n=!0);break;case"Escape":a.preventDefault(),n&&(p(o,n),n=!1)}})),e.style.display="none",a.push(r)}(e,t)})),function(e){e.forEach((e=>{e.addEventListener("input",(()=>{u(e)})),e.addEventListener("blur",(()=>{u(e)})),"Email"===e.id&&e.addEventListener("focus",(()=>{e.parentElement.querySelector(".mktoError")?.remove()}))}))}(t),function(e,t,n,r){e.onValidate((function(){const o={};if(!function(e){let t=!0;return e.forEach((e=>{u(e)||(t=!1)})),t}(n))return void e.submitable(!1);e.submitable(!0),n&&n.forEach((e=>{e.name&&(o[e.name]=e.value)})),r&&r.forEach((e=>{e.name&&("Sole Trader"===e.value?o[e.name]="":o[e.name]=e.value)}));const a={formName:t.name,data:{status:"success",code:"Marketo Form has been submitted successfully",fields:o}};localStorage.setItem("marketo-form-tracking_success_data",JSON.stringify(a))})),e.onSuccess((()=>function(e,t,n,r){t.forEach((e=>{e.value="",e.removeAttribute("data-validate");const t=c(e);t&&t.classList.remove("marketo-form-text__label-active")})),n.forEach((e=>{e.value="";const t=c(e);t&&t.classList.remove("marketo-form-text__label-active")})),r.forEach((e=>{e.value="";const t=e.nextElementSibling;t&&t.querySelectorAll(".cmp-marketo-text--dropdown-list__item").forEach((e=>{e.classList.remove("cmp-marketo-text--dropdown-list__item--selected")}));const n=c(e);n&&n.classList.remove("marketo-form-text__label-active")}));const o=e.querySelectorAll(".cmp-marketo-error__msg");o.forEach((e=>{e.classList.remove("cmp-marketo-error__msg--visible");const t=e.querySelector(".cmp-marketo-span-error__msg");t&&(t.textContent="")}));const a=e.querySelector('button.mktoButton[type="submit"], input.mktoButton[type="submit"]');a&&(a.textContent="Submit",a.removeAttribute("disabled"))}(t,n,r,a)))}(e,n,t,o);const s=localStorage.getItem("marketo-form-tracking_success_data");s&&(i=JSON.parse(s),(0,r.W9)(n.name,i.data.status,i.data.code,i.data.fields),localStorage.removeItem("marketo-form-tracking_success_data"))}})),s.length>0){const e=(0,o.oj)();if(e&&e.marketoScriptUrl){const t=e.marketoScriptUrl;(0,o.fs)(t,!0,i)}}}}}))},4632:function(e,t,n){"use strict";var r=n(6750),o=n.n(r),a=n(3729);window.fieldValidationDataLayer=window.fieldValidationDataLayer||{},o().registerHelper("isHide",(function(e,t){return"Hide"===e?t.inverse(this):t.fn(this)})),o().registerHelper("split",(function(e,t){return e.split(t)})),o().registerHelper("or",(function(){return Array.prototype.slice.call(arguments,0,-1).some(Boolean)}));const i=document.querySelector(".cmp-threepayshortcodes"),s=i?.querySelector("#merchant-data-output"),c=i?.querySelector(".threepay-search-field"),l="/content/dam/threedigital/threepay-shortcode-records",u="/jcr:content/renditions/original",d=`${l}/shortcode.json${u}`,p=`${l}/paymentintermediary.json${u}`,m=`${l}/merchant.json${u}`;let f=[],h=[],g=[],y=!1;function v(e){e.forEach((e=>{i?.querySelectorAll(e).forEach((e=>{e.style.display="none"}))}))}function b(){C(),i?.querySelectorAll(".error-text, .icon-records").forEach((e=>{e.style.display="block"})),c.style.borderBottom="2px solid red"}function _(e,t,n){return Array.isArray(e)&&e.length&&Array.isArray(t)&&t.length&&Array.isArray(n)&&n.length}function S(e,t,n){return Array.isArray(e)&&e.some((e=>e[t]?.toString().toLowerCase().startsWith(n.toLowerCase())))}function w(e,t,n){return Array.isArray(e)?e.filter((e=>e[t]?.toString().toLowerCase().startsWith(n.toLowerCase()))).map((e=>e[t]?.toString().length)).reduce(((e,t)=>Math.max(e,t)),0):0}function E(e,t,n,r){const o=S(t,"Short Code",e),a=Math.max(w(t,"Short Code",e)),i=S(r,"Merchant",e),s=w(r,"Merchant",e),c=S(n,"Payment Intermediary",e),l=Math.max(w(n,"Payment Intermediary",e));return e.length<=1||o&&e.length<=a||i&&e.length<=s||c&&e.length<=l}document.addEventListener("DOMContentLoaded",(()=>{if(!i)return;k();const e=i?.querySelector("#form-submit-threepay-search"),t=i?.querySelectorAll(".intermidiary-contact-info");let n=i?.querySelector(".cmp-form-text__label_threepay_shortcode");const r="cmp-threepayshortcodes",l=i?.querySelector(".error-text").textContent,u=c.getAttribute("placeholder");t&&v([".icon-records",".error-text",".intermidiary-contact-info"]),c&&(c.addEventListener("focus",(()=>{n?.classList.remove("cmp-form-text__label_threepay_shortcode-hidden"),n?.classList.add("cmp-form-text__label_threepay_shortcode-visible"),c.removeAttribute("placeholder")})),c.addEventListener("click",(e=>{c.contains(e.target)||(n?.classList.remove("cmp-form-text__label_threepay_shortcode-visible"),n?.classList.add("cmp-form-text__label_threepay_shortcode-hidden"),c.setAttribute("placeholder",u))})),c.addEventListener("blur",(function(e){e.preventDefault();const t=c?.value?.trim()||"";if(!_(f,h,g))return;const n=E(t,f,h,g);t&&n?(y=!1,fieldValidationDataLayer.event_trigger="blur",fieldValidationDataLayer.form_name=r,fieldValidationDataLayer.form_field_name=c.getAttribute("name"),fieldValidationDataLayer.form_field_validation_message="",fieldValidationDataLayer.form_field_validation_status="success",(0,a.E0)(fieldValidationDataLayer)):(y=!0,b(),fieldValidationDataLayer.event_trigger="blur",fieldValidationDataLayer.form_field_name=c.getAttribute("name"),fieldValidationDataLayer.form_field_validation_message=l,fieldValidationDataLayer.form_field_validation_status="failed",fieldValidationDataLayer.form_name=r,(0,a.E0)(fieldValidationDataLayer))})),c.addEventListener("input",(function(e){e.preventDefault();const t=c?.value?.trim()||"";if(!_(f,h,g))return;const n=(e,n)=>Array.isArray(e)&&e.some((e=>e[n]?.toString().toLowerCase()===t.toLowerCase())),r=n(f,"Short Code"),o=n(g,"Merchant"),a=n(h,"Payment Intermediary")||n(h,"Payment Intermediary");r&&o&&a||C();E(t,f,h,g)?(y=!1,v([".icon-records",".error-text"]),c.style.borderBottom="2px solid #000"):(y=!0,b(),C())})),e&&e.addEventListener("click",(function(e){e.preventDefault();const t=c.value.trim();if(!t)return L(),void(0,a.W9)(r,"failed",y?"":l);var n;(n=t,fetch(A.csrfTokenAPI).then((e=>{if(!e.ok)throw new Error("Failed to fetch CSRF token");return e.json()})).then((e=>fetch(A.threepayShortcodeApi,{method:"POST",headers:{"Content-Type":"application/json","CSRF-Token":e.token},body:JSON.stringify({search:n})}))).then((e=>{if(!e.ok)throw new Error(`Request failed with status ${e.status}`);return e.json()})).then((e=>{if(!e||e.error){const t=e?.error||"No data returned";throw L(),t}s.style.border="1px solid #ffbfc5",c&&(c.style.borderBottom="2px solid #000"),v([".icon-records",".error-text"]);const t=function(e){let t={shortCode:(r=e)["Short Code"],outgoingMessageCost:q(r["Outgoing Message Cost"]),incomingMessageCost:q(r["Incoming Message Cost"]),serviceType:r["Service Category/Type of Service"],merchant:r.Merchant,mNumber:r["Merchant Number"],mContact:r["Merchant Contact"],mWebsite:r["Merchant Website"],paymentIntermidiary:r["Payment Intermediary"],pWebsite:r["Payment Intermediary Website"],pContact:r["Payment Intermediary Contact"],pNumber:r["Payment Intermediary Number"]},n={};var r;return t.shortCode&&"Hide"!=t.shortCode&&void 0!==t.shortCode?(n=t,n.type="Shortcode",n.shortCodes=t.shortCode,n.isShortCodeDataAvailable=!0,n.isMerchantDataAvailable=!!t.merchant,n.showContent=!0):void 0!==t.merchant&&"Hide"!==t.merchant||!t.paymentIntermidiary?void 0!==t.shortCode&&"Hide"!==t.shortCode||!t.merchant&&!t.paymentIntermidiary||(n=t,n.isMerchantDataAvailable=!!t.merchant,n.type="Threepay",n.showContent=!0,t.paymentIntermidiary&&(n.payment=t.paymentIntermidiary)):(n=t,n.isMerchantDataAvailable=!1,n.type="Intermediary",n.showContent=!1),n}(e[0]||{});return function(e){let t=i.querySelector("#merchant-template");if(e&&Object.keys(e).length>0){const n=t.innerHTML,r=o().compile(n);s.innerHTML=r(e),e.type&&"Intermediary"===e.type?(i.querySelectorAll(".intermidiary-contact-info").forEach((e=>{e.style.removeProperty("display")})),v([".toggle-button"])):v([".intermidiary-contact-info"])}else b()}(t),e})).catch((e=>{throw L(),e}))).then((e=>{(0,a.W9)(r,"success","")})).catch((e=>{(0,a.W9)(r,"failed",y?"":l)}))})))}));const x=async e=>{try{const t=await fetch(e);if(!t.ok)throw new Error(`Failed to fetch JSON. HTTP status: ${t.status}`);return await t.json()}catch(e){return[]}},k=async()=>{f=await x(d),h=await x(p),g=await x(m)},A={csrfTokenAPI:"/libs/granite/csrf/token.json",threepayShortcodeApi:"/bin/threedigital/threepayandshortcode"};function L(){b(),C(),i.querySelectorAll(".error-text, .icon-records").forEach((e=>{e.style.display="block"}))}function C(){s.innerHTML="",s.style.border="none"}function q(e){return e?.startsWith("£")?e:`£${e}`}document.addEventListener("click",(e=>{const t=e.target.closest(".toggle-button");if(t){const e=t.querySelector(".show-content"),n=t.querySelector(".toggle-icon svg"),r=i.querySelector(".intermidiary-contact-info");if(r){const t="none"===r.style.display||!r.style.display;r.style.display=t?"flex":"none",n.style.transform=t?"rotate(180deg)":"rotate(0deg)",e.textContent=t?"Hide content":"Show content"}}}))},506:function(e,t,n){"use strict";n.d(t,{Uo:function(){return c},Xr:function(){return o},YG:function(){return a},tC:function(){return s}});const r=document.querySelector("main");function o(e){const t=r?.parentNode?.firstElementChild,n=document.querySelector('.cmp-header[data-isbusiness="true"]')?.closest(".cmp-experiencefragment--header");if(!r||!t)return void console.warn("Main or header tag is missing.");if(!n)return void console.warn("Mapped business header is not available.");t.contains(n)||t.appendChild(n),n.classList.add("business-header__404page");const o=[...t.children].find((e=>!e.classList.contains("business-header__404page"))),a=n;e?(o&&t.removeChild(o),i(a,!0,"header")):(t.contains(a)&&t.removeChild(a),!o&&r?.contains(n)&&t.insertBefore(n,t.firstChild),i(o,!0,"header")),r.contains(n)&&r.removeChild(n)}function a(e){const t=r?.nextElementSibling,n=r?.querySelector(".cmp-experiencefragment--footer");if(!r||!t)return void console.warn("Main or footer tag is missing.");if(!n)return void console.warn("Mapped business footer is not available.");t.contains(n)||t.appendChild(n),n.classList.add("inner-footer");const o=[...t.children].find((e=>!e.classList.contains("inner-footer")));o&&o.classList.add("outside-footer"),e?(o&&t.removeChild(o),i(n,!0,"footer")):(t.contains(n)&&t.removeChild(n),o&&i(o,!0,"footer")),r.contains(n)&&r.removeChild(n)}function i(e,t,n="header"){if(!e)return;const r=`${n}-visible`,o=`${n}-hidden`;e.classList.toggle(r,t),e.classList.toggle(o,!t)}const s=e=>document.querySelector(e)?.getAttribute("content")||"",c=(e,t)=>{const n=document.querySelector(e);n&&n.setAttribute("content",t)}},8705:function(e,t,n){"use strict";n.d(t,{RJ:function(){return r},WD:function(){return o}});const r=async()=>{try{const e=await fetch("/libs/granite/csrf/token.json");if(!e.ok)throw new Error(`Failed to fetch CSRF token: ${e.status} ${e.statusText}`);const t=await e.json();if(!t)throw new Error("CSRF token not found in response");return t.token}catch(e){throw console.error("Error fetching CSRF token:",e.message),e}};function o(e,t,n,r){let o;return"keyValue"===n&&e&&null!=t?o=`${e}=${t}`:"keyOnly"===n&&e&&(o=`${e}`),o&&(r.length>0&&(r+="&"),r+=o),r}},3883:function(e,t){"use strict";t.Z=function(e,t=50){let n;return(...r)=>{clearTimeout(n),n=setTimeout((()=>{e.apply(this,r)}),t)}}},3199:function(e,t,n){"use strict";n.d(t,{Em:function(){return r},tq:function(){return o}});const r=e=>{const t=window.getComputedStyle(e),n=parseFloat(t.paddingLeft),r=parseFloat(t.paddingRight);return e.offsetWidth-n-r},o=()=>window.matchMedia("(max-width: 900px)").matches;t.ZP=()=>window.innerWidth>0?window.innerWidth:screen.width},8279:function(e,t,n){"use strict";function r(e,t=!0,n){let r=document.createElement("script");r.setAttribute("src",e),r.setAttribute("type","text/javascript"),r.setAttribute("async",t),document.body.appendChild(r),r.addEventListener("load",(()=>{n&&n()})),r.addEventListener("error",(e=>{console.log("Error on loading file",e)}))}function o(){const e="/content/dam/threedigital/static-files/script-loader/";return{marketoScriptUrl:`${e}396-QDS-172_marketo-form-tracking.js`,flickingLibraryScriptUrl:`${e}flicking.pkgd.min.js`,flickingLibraryCssUrl:`${e}flicking.css`}||{}}n.d(t,{R4:function(){return a},fs:function(){return r},oj:function(){return o}});const a=e=>{const t=o();if(t){const n=t.flickingLibraryScriptUrl,o=t.flickingLibraryCssUrl;n&&o&&(!function(e,t){let n=document.createElement("link");n.setAttribute("href",e),n.setAttribute("rel","stylesheet"),document.head.appendChild(n),n.addEventListener("load",(()=>{t&&t()})),n.addEventListener("error",(e=>{console.log("Error on loading file",e)}))}(o),r(n,!0,e))}}},2903:function(e,t,n){"use strict";n.d(t,{B:function(){return r}});const r={desktop:{pageWidth:1440,pageMargin:75,horizontalGap:30},mobile:{pageMargin:27,horizontalGap:10}}},9904:function(e,t,n){"use strict";function r(e,t="",n="",r,o){const a=e,i=document.createElement("img"),s=document.createElement("video"),c=document.createElement("div");function l(e,t){window.innerWidth<900?(e.style.height="40px",e.style.zIndex=-1):(e.style.height="70px",e.style.zIndex=0),t&&(e.style.height="100%",e.style.zIndex=-1)}function u(t){const n=t.parentElement.classList.contains("cmp-offerstrip__text"),r=t.parentElement.classList.contains("cmp-promocard__promo-text");e.style.position="relative",t.style.objectFit="cover",t.style.objectPosition="0 0",t.style.position="absolute",t.style.left=n||r?0:"",e.style.zIndex=n?0:""}function d(d,p="",m="",f,h="image",g="",y,v){function b(e){y&&(e.style.borderTopRightRadius="10px",e.style.borderTopLeftRadius="10px"),v&&(e.style.borderBottomLeftRadius="10px",e.style.borderBottomRightRadius="10px")}if(d.style.width="100%",d.style.position="absolute",d.style.top=0,r.style.backgroundColor="transparent",e.style.backgroundColor="transparent",l(d),window.onresize=function(){l(d),u(d)},"video"===h){const e=document.createElement("source");e.alt=f||"",e.type="video/mp4",e.src=window.innerWidth<900?m:p,s.autoplay=!0,s.playsinline=!0,s.loop=!0,s.muted=!0,s.style.objectFit="cover",s.playsInline=!0,s.controls=!1,l(s,o),s.appendChild(e),a.appendChild(s),s.onloadeddata=function(){a.removeChild(i),u(s)},b(s),window.onresize=function(){l(s,o)}}"image"===h&&(i.src=window.innerWidth<900?m:p,i.alt=f||"",a.appendChild(i),l(i,o),u(i),window.onresize=function(){l(i,o)}),"gradient"===h&&(c.style.background=g,a.appendChild(c),u(c),l(c,o),window.onresize=function(){l(c,o)}),"fallbackImage"===h&&null!=i&&(t&&n&&(i.src=window.innerWidth<900?t:n),i.alt=f||"",i.style.position="absolute",i.style.top=0,i.style.width="100%",l(i,o),a.appendChild(i),b(i),u(i),window.onresize=function(){l(i,o)})}return{renderVideo:function(e,r,o,a,c,l){!function(e,t,n,r,o){d(i,e,t,n,"fallbackImage","",r,o)}(t,n,o,c,l),(e||r)&&(a&&(a.style.background="transparent"),d(s,e,r,o,"video","",c,l))},renderImage:function(e,t,n){d(i,e,t,n,"image")},renderGradient:function(e){d(c,"","","","gradient",e)},setHeight:l}}n.d(t,{S:function(){return r}})}},a={};function i(e){var t=a[e];if(void 0!==t)return t.exports;var n=a[e]={exports:{}};return o[e](n,n.exports,i),n.exports}e="function"==typeof Symbol?Symbol("webpack queues"):"__webpack_queues__",t="function"==typeof Symbol?Symbol("webpack exports"):"__webpack_exports__",n="function"==typeof Symbol?Symbol("webpack error"):"__webpack_error__",r=function(e){e&&!e.d&&(e.d=1,e.forEach((function(e){e.r--})),e.forEach((function(e){e.r--?e.r++:e()})))},i.a=function(o,a,i){var s;i&&((s=[]).d=1);var c,l,u,d=new Set,p=o.exports,m=new Promise((function(e,t){u=t,l=e}));m[t]=p,m[e]=function(e){s&&e(s),d.forEach(e),m.catch((function(){}))},o.exports=m,a((function(o){var a;c=function(o){return o.map((function(o){if(null!==o&&"object"==typeof o){if(o[e])return o;if(o.then){var a=[];a.d=0,o.then((function(e){i[t]=e,r(a)}),(function(e){i[n]=e,r(a)}));var i={};return i[e]=function(e){e(a)},i}}var s={};return s[e]=function(){},s[t]=o,s}))}(o);var i=function(){return c.map((function(e){if(e[n])throw e[n];return e[t]}))},l=new Promise((function(t){(a=function(){t(i)}).r=0;var n=function(e){e!==s&&!d.has(e)&&(d.add(e),e&&!e.d&&(a.r++,e.push(a)))};c.map((function(t){t[e](n)}))}));return a.r?l:i()}),(function(e){e?u(m[n]=e):l(p),r(s)})),s&&(s.d=0)},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,{a:t}),t},i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};i(2834)}();