/*! For license information please see public-advice-56f59fda6e26737ecaf3.chunk.js.LICENSE.txt */ (window.webpackJsonp=window.webpackJsonp||[]).push([[11],{2:function(e,n,t){"use strict";var o={en:{emailThisPage:"Email this page",toEmailThisPage:"To email address",yourName:"Your name",sendEmail:"Send email",cancel:"Cancel",close:"Close",sendFromYourOwnAccount:"Send from your own account",enterYourName:"Enter your name",enterYourEmailAddress:"Enter your email address",enterYourEmailAddressInTheCorrectFormat:"Enter your email address in the correct format, like name@example.com",iThoughtYouMightBeInterestedInThisLink:"I thought you might be interested in this link from Citizens Advice:",yourEmailHasBeenSent:"Your email has been sent.",weCannotSendYourEmail:"We cannot send your email at the moment. Please try again later.",errorSummary:{thereIsAProblem:"There is a problem"},shared:{optional:"optional"},adviceFeedback:{didThisHelp:"Did this advice help?",didThisHelpYesLabel:"Yes",didThisHelpYesAria:"Yes, the advice was helpful",didThisHelpNoLabel:"No",didThisHelpNoAria:"No, the advice was not helpful",reasonLabel:"Why wasn\u2019t this advice helpful?",notRelevant:"It isn\u2019t relevant to my situation",notEnoughDetail:"It doesn\u2019t have enough detail",cantWorkOutNextSteps:"I can\u2019t work out what I should do next",dontUnderstand:"I don\u2019t understand",selectAnOption:"Select an option",anythingElseLabel:"Is there anything else you'd like to tell us?",closeAriaLabel:"Close advice feedback form",submitLabel:"Submit feedback",successMessage:"Thank you for your feedback",errorMessage:"There was a problem submitting your feedback"},cookieBanner:{prose:"We use cookies to improve your experience of our website.",linkText:"You can find out more or opt-out from some cookies.",linkHref:"/about-us/citizens-advice-privacy-policy/how-we-use-cookies/",linkCommentry:"",buttonLabel:"I'm fine with cookies",ariaLabel:"Cookie banner"},targetedContent:{collapseAll:"Collapse all",expandAll:"Expand all"},navigation:{close:"Close",more:"More"}},cy:{emailThisPage:"E-bostiwch y dudalen",toEmailThisPage:"At gyfeiriad e-bost",yourName:"Eich enw",sendEmail:"Anfonwch yr e-bost",cancel:"Canslo",close:"Cau",sendFromYourOwnAccount:"Anfon o\u2019ch cyfrif chi",enterYourName:"Rhowch eich enw",enterYourEmailAddress:"Rhowch gyfeiriad e-bost",enterYourEmailAddressInTheCorrectFormat:"Rhowch eich cyfeiriad e-bost yn y fformat cywir, fel enw@enghraifft.com",iThoughtYouMightBeInterestedInThisLink:"Roeddwn i\u2019n meddwl y byddai gennych ddiddordeb yn y ddolen hon gan Cyngor ar Bopeth:",yourEmailHasBeenSent:"Anfonwyd eich neges.",weCannotSendYourEmail:"Ni allwn anfon eich e-bost ar hyn o bryd. Rhowch gynnig arall arni yn nes ymlaen.",errorSummary:{thereIsAProblem:"Mae yna problem"},shared:{optional:"dewisol"},adviceFeedback:{didThisHelp:"A oedd y cyngor hwn yn fuddiol?",didThisHelpYesLabel:"Oedd",didThisHelpYesAria:"Oedd, roedd y cyngor yn ddefnyddiol",didThisHelpNoLabel:"Na",didThisHelpNoAria:"Na, nid oedd y cyngor yn ddefnyddiol",reasonLabel:"Pam nad oedd y cyngor yn fuddiol?",notRelevant:"Nid yw\u2019n berthnasol i fy sefyllfa",notEnoughDetail:"Nid yw\u2019n rhoi digon o fanylion",cantWorkOutNextSteps:"Ni allaf weithio allan beth ddylwn wneud nesaf",dontUnderstand:"Dwi ddim yn deall",selectAnOption:"Dewiswch opsiwn",anythingElseLabel:"Oes unrhyw beth arall yr hoffech ei ddweud wrthym?",closeAriaLabel:"Cau ffurflen adborth cyngor",submitLabel:"Cyflwyno adborth",successMessage:"Diolch am eich adborth",errorMessage:"Roedd problem chyflwyno\u2019ch adborth"},cookieBanner:{prose:"Rydym yn defnyddio cwcis i wella eich profiad o'n gwefan.",linkText:"Gallwch ddarganfod mwy neu ddileu allan o rai cwcis",linkHref:"/wales/about-us/citizens-advice-privacy-policy/how-we-use-cookies/",linkCommentry:" - mae'r polis\xefau hyn ar gael yn Saesneg.",buttonLabel:"Rwy'n iawn gyda cwcis",ariaLabel:"Baner cwcis"},targetedContent:{collapseAll:"Cau popeth",expandAll:"Ehangu popeth"},navigation:{close:"Cau",more:"Mwy"}}};var r=document.documentElement.lang;n.a=function(e){return e?o[e]:o.en}(r)},25:function(e,n,t){"use strict";function o(){var e=document.querySelector(".js-cads-footer-feedback");if(e){var n=e.getAttribute("href");if(n){var t=new URL(n);t.searchParams.set("u",navigator.userAgent),e.setAttribute("href",t.toString())}}}n.a=function(){document.addEventListener("DOMContentLoaded",o),document.addEventListener("page:load",o)}},26:function(e,n,t){"use strict";t.d(n,"a",(function(){return a}));var o=t(46),r=t.n(o),i=t(2);function a(){r.a.init({mainNavWrapper:".cads-navigation",navDropdownLabel:i.a.navigation.more,navDropdownLabelActive:i.a.navigation.close,initClass:"cads-greedy-nav-init"})}},317:function(e,n,t){t(336),e.exports=t(318)},318:function(e,n,t){},336:function(e,n,t){"use strict";t.r(n);var o=t(43),r=t.n(o),i=t(45),a=t.n(i),l=t(44),c=t.n(l),d=t(81),s=t.n(d),u=t(25),f=t(26),m=t(82),h=t(83),y=t(41),v=function(){var e=document.querySelector(".gtm-decision-tree-form"),n=null===e||void 0===e?void 0:e.querySelector("button");n&&e&&n.addEventListener("click",(function(){var n,t=e.querySelector("legend"),o=null===t||void 0===t?void 0:t.innerText,r=null===(n=e.querySelector("input:checked"))||void 0===n?void 0:n.nextElementSibling,i="Invalid input";r instanceof HTMLElement&&(i=r.innerText),window.dataLayer.push({event:"decisionTreeFormSubmit",questionText:o,answerText:i})}))},p=function(){var e=document.querySelectorAll(".js-cads-targeted-content__title");null===e||void 0===e||e.forEach((function(e){var n=e.querySelector("button");null===n||void 0===n||n.addEventListener("click",(function(){window.dataLayer.push({event:"targetedContentClick",targetedContentTitle:e.innerText})}))}))};try{r()(),Object(f.a)(),a()(),c()(),s()(),Object(u.a)(),Object(m.a)(),Object(h.a)(),Object(y.a)(),v(),p()}catch(b){throw document.querySelector("html").classList.add("no-js"),b}},41:function(e,n,t){"use strict";var o=".js-preview-control",r="button[aria-controls]",i=".js-preview-control-menu",a="preview-control--open";n.a=function(){var e=document.querySelector(o);if(e){var n=e.querySelector(r),t=e.querySelector(i);if(!n||!t)return;var l=function(){n.setAttribute("aria-expanded","false"),e.classList.remove(a)},c=function(e){"Escape"===e.key&&l()};n.addEventListener("click",(function(){"true"===n.getAttribute("aria-expanded")?l():(n.setAttribute("aria-expanded","true"),e.classList.add(a))})),n.addEventListener("keydown",c),t.addEventListener("keydown",c),e.addEventListener("focusout",(function(n){e.contains(n.relatedTarget)||l()}))}}},81:function(e,n,t){"use strict";function o(e){if(e instanceof HTMLAnchorElement&&e.href){var n=-1!==(r=e.href).indexOf("#")&&r.split("#").pop(),t=document.getElementById(n);if(!t)return!1;var o=function(e){var n=e.closest("fieldset");if(n){var t=n.getElementsByTagName("legend");if(t.length)return t[0]}return document.querySelector("label[for='".concat(e.getAttribute("id"),"']"))||e.closest("label")}(t);return!!o&&(o.scrollIntoView(),t.focus({preventScroll:!0}),!0)}var r;return!1}Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(){document.querySelectorAll(".js-error-summary-link").forEach((function(e){e.addEventListener("click",(function(n){o(e)&&n.preventDefault()}))}))}},82:function(e,n,t){"use strict";t.d(n,"b",(function(){return r})),t.d(n,"a",(function(){return i}));var o=function(){var e=document.querySelector(".js-webchat");e&&e.remove()};function r(){var e=document.querySelector(".js-close-webchat");null===e||void 0===e||e.classList.remove("liveperson__close--hidden")}function i(){var e=document.querySelector(".js-close-webchat");null===e||void 0===e||e.addEventListener("click",o)}},83:function(e,n,t){"use strict";function o(e,n,t,o){return new(t||(t=Promise))((function(r,i){function a(e){try{c(o.next(e))}catch(e){i(e)}}function l(e){try{c(o.throw(e))}catch(e){i(e)}}function c(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,l)}c((o=o.apply(e,n||[])).next())}))}function r(e,n){var t,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(t)throw new TypeError("Generator is already executing.");for(;a;)try{if(t=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]-1?(a('UA "Edge" => assuming success'),[2,!0]):g(document.body,e)?(a("copyUsingTempSelection worked"),[2,!0]):function(e){var n=document.createElement("div");n.setAttribute("style","-webkit-user-select: text !important"),n.textContent="temporary element",document.body.appendChild(n);var t=g(n,e);return document.body.removeChild(n),t}(e)?(a("copyUsingTempElem worked"),[2,!0]):function(e){a("copyTextUsingDOM");var n=document.createElement("div");n.setAttribute("style","-webkit-user-select: text !important");var t=n;n.attachShadow&&(a("Using shadow DOM."),t=n.attachShadow({mode:"open"}));var o=document.createElement("span");o.innerText=e,t.appendChild(o),document.body.appendChild(n),E(o);var r=document.execCommand("copy");return k(),document.body.removeChild(n),r}(e["text/plain"])?(a("copyTextUsingDOM worked"),[2,!0]):[2,!1]}))}))}var x=".js-template-letter-copy",L=".template-letter",S=".js-copy-message";function A(e){var n;null===(n=document.querySelector(S))||void 0===n||n.classList.add("template-letter__message--".concat(e)),setTimeout((function(){!function(e){var n;null===(n=document.querySelector(S))||void 0===n||n.classList.remove("template-letter__message--".concat(e))}(e)}),5e3)}n.a=function(){var e=document.querySelector(x);e&&e.addEventListener("click",(function(){var e=document.querySelector(L);e&&function(e){return o(this,void 0,void 0,(function(){return r(this,(function(n){if(m)return a("Using `navigator.clipboard.writeText()`."),[2,m(e)];if(!T(function(e){var n={};return n["text/plain"]=e,n}(e)))throw new Error("writeText() failed");return[2]}))}))}(e.innerText).then((function(){A("success")}),(function(){A("failure")}))}))}}},[[317,21,0]]]);