PageSourceSearch

https://a.lansivayla.fi/styles/e5576057/js/blueconic/dialog.min.js

js lansivayla.fi collected 2026-09-24 19:39:17 UTC 11,982 bytes, 1 lines download raw bytes

1var BCinst="",BCshortcode="",BClinkParams={};function renderDialogue(e,I,L,t=!0){if((!0!==t||BCinst&&BCshortcode&&e&&I)&&(!1!==t||e)){var o=window.dataLayer||[];if(!0===t)fetch("https://a.diks.fi/"+BCinst+"/"+BCshortcode+"/"+I).then(e=>e.json()).then(r=>{if("note"==e){var o=document.getElementById("diks-bc-note");if(o&&0<o.children.length)return;r.Headline1&&o&&(c=document.createElement("p"),r.CTA1URL?((d=document.createElement("a")).href=r.CTA1URL,d.textContent=r.Headline1,c.append(d),R(d,L)):c.textContent=r.Headline1,o.append(c),o.setAttribute("data-campaign",I),o.removeAttribute("style"),h("note","","",r.Headline1,r.CTA1URL))}if("toaster"==e){let n=document.getElementById("diks-bc-toaster");var d=document.getElementById("bc-marketing-dialog-close-button"),c=document.getElementById("bc-marketing-dialog-title"),o=document.getElementById("bc-marketing-dialog-description"),m=document.getElementById("bc-marketing-dialog-cta-wrapper");let e=!1;var s=document.getElementById("bc-marketing-dialog-cta1"),u=document.getElementById("bc-marketing-dialog-cta2"),g=document.getElementById("bc-marketing-dialog-cta3"),t=document.getElementById("bc-marketing-dialog-list");if(r.Headline1&&c&&(c.textContent=r.Headline1,c.removeAttribute("style")),r.Text1&&o&&(o.textContent=r.Text1,o.removeAttribute("style")),r.CTA1text&&r.CTA1URL&&s&&(s.textContent=r.CTA1text,s.setAttribute("href",r.CTA1URL),s.removeAttribute("style"),e=!0,R(s,L)),r.CTA2text&&r.CTA2URL&&u&&(u.textContent=r.CTA2text,u.setAttribute("href",r.CTA2URL),u.removeAttribute("style"),e=!0,R(u,L)),e&&m.removeAttribute("style"),r.CTA3text&&g&&(r.CTA3URL?((c=document.createElement("a")).href=r.CTA3URL,c.textContent=r.CTA3text,g.append(c)):g.textContent=r.CTA3text,g.removeAttribute("style")),r.Text3&&t){var i=r.Text3.split("|");for(let e=0;e<i.length;e++){var a=document.createElement("li");a.classList.add("diks-marketing-dialog__list-item"),a.textContent=i[e],t.append(a)}t.removeAttribute("style")}function l(e,t){e.style.display="none",t&&t.focus()}if(n&&d){let t=document.activeElement;d.addEventListener("click",function(e){l(n,t)}),document.addEventListener("keydown",function(e){"Escape"!==e.key&&"Esc"!==e.key||"none"===n.style.display||l(n,t)}),n.setAttribute("data-campaign",I),n.removeAttribute("style"),h("sticky.bottom","toaster",r.Headline1,r.CTA1text,r.CTA1URL,r.CTA2text,r.CTA2URL),d.focus()}}if("slide-out"==e){let t=document.querySelector(".bcSlideOutTrigger");o=document.getElementsByClassName("bcSlideOut")[0],s=document.getElementById("diks-bc-slide-out");let n=document.getElementById("bc-marketing-dialog-toggle-button"),i=document.getElementById("bc-marketing-dialog-toggle-button-text"),a=document.getElementById("bc-marketing-dialog-icon-closed"),l=document.getElementById("bc-marketing-dialog-icon-opened");u=document.getElementById("bc-marketing-dialog-title"),m=document.getElementById("bc-marketing-dialog-description"),c=document.getElementById("bc-marketing-dialog-cta-wrapper");let e=!1;var g=document.getElementById("bc-marketing-dialog-cta1"),d=document.getElementById("bc-marketing-dialog-cta2"),b=document.getElementById("bc-marketing-dialog-cta3"),C=document.getElementById("bc-marketing-dialog-list");if(r.Headline1&&i&&(i.textContent=r.Headline1),r.Headline1&&u&&(u.textContent=r.Headline1,u.removeAttribute("style")),r.Text1&&m&&(m.textContent=r.Text1,m.removeAttribute("style")),r.CTA1text&&r.CTA1URL&&g&&(g.textContent=r.CTA1text,g.setAttribute("href",r.CTA1URL),g.removeAttribute("style"),e=!0,R(g,L)),r.CTA2text&&r.CTA2URL&&d&&(d.textContent=r.CTA2text,d.setAttribute("href",r.CTA2URL),d.removeAttribute("style"),e=!0,R(d,L)),e&&c.removeAttribute("style"),r.CTA3text&&b&&(r.CTA3URL?((u=document.createElement("a")).href=r.CTA3URL,u.textContent=r.CTA3text,b.append(u)):b.textContent=r.CTA3text,b.removeAttribute("style")),r.Text3&&C){var y=r.Text3.split("|");for(let e=0;e<y.length;e++){var A=document.createElement("li");A.classList.add("diks-marketing-dialog__list-item"),A.textContent=y[e],C.append(A)}C.removeAttribute("style")}s&&o&&n&&t&&(new MutationObserver(function(e){e.forEach(function(e){"class"==e.attributeName&&(e.target.classList.contains("bcSlideOutOpen")?(n.setAttribute("aria-expanded","true"),l.removeAttribute("style"),a.style.display="none",i.style.display="none"):(n.setAttribute("aria-expanded","fal
1se"),a.removeAttribute("style"),l.style.display="none",i.removeAttribute("style")))})}).observe(o,{attributes:!0}),n.addEventListener("keydown",function(e){32===e.keyCode?e.preventDefault():13===e.keyCode&&(e.preventDefault(),t.click())}),n.addEventListener("keyup",function(e){32===e.keyCode&&(e.preventDefault(),t.click())}),s.setAttribute("data-campaign",I),s.removeAttribute("style"),h("sticky.bottom","slide-out",r.Headline1,r.CTA1text,r.CTA1URL,r.CTA2text,r.CTA2URL))}if("slide-out-open"==e){let t=document.querySelector(".bcSlideOutTrigger");m=document.getElementsByClassName("bcSlideOut")[0],g=document.getElementById("diks-bc-slide-out-open");let n=document.getElementById("bc-marketing-dialog-toggle-button"),i=document.getElementById("bc-marketing-dialog-toggle-button-text"),a=document.getElementById("bc-marketing-dialog-icon-closed"),l=document.getElementById("bc-marketing-dialog-icon-opened");d=document.getElementById("bc-marketing-dialog-title"),c=document.getElementById("bc-marketing-dialog-description"),u=document.getElementById("bc-marketing-dialog-cta-wrapper");let e=!1;var b=document.getElementById("bc-marketing-dialog-cta1"),o=document.getElementById("bc-marketing-dialog-cta2"),s=document.getElementById("bc-marketing-dialog-cta3"),k=document.getElementById("bc-marketing-dialog-list");if(r.Headline1&&i&&(i.textContent=r.Headline1),r.Headline1&&d&&(d.textContent=r.Headline1,d.removeAttribute("style")),r.Text1&&c&&(c.textContent=r.Text1,c.removeAttribute("style")),r.CTA1text&&r.CTA1URL&&b&&(b.textContent=r.CTA1text,b.setAttribute("href",r.CTA1URL),b.removeAttribute("style"),e=!0,R(b,L)),r.CTA2text&&r.CTA2URL&&o&&(o.textContent=r.CTA2text,o.setAttribute("href",r.CTA2URL),o.removeAttribute("style"),e=!0,R(o,L)),e&&u.removeAttribute("style"),r.CTA3text&&s&&(r.CTA3URL?((d=document.createElement("a")).href=r.CTA3URL,d.textContent=r.CTA3text,s.append(d)):s.textContent=r.CTA3text,s.removeAttribute("style")),r.Text3&&k){var p=r.Text3.split("|");for(let e=0;e<p.length;e++){var x=document.createElement("li");x.classList.add("diks-marketing-dialog__list-item"),x.textContent=p[e],k.append(x)}k.removeAttribute("style")}g&&m&&n&&t&&(new MutationObserver(function(e){e.forEach(function(e){"class"==e.attributeName&&(e.target.classList.contains("bcSlideOutOpen")?(n.setAttribute("aria-expanded","true"),l.removeAttribute("style"),a.style.display="none",i.style.display="none"):(n.setAttribute("aria-expanded","false"),a.removeAttribute("style"),l.style.display="none",i.removeAttribute("style")))})}).observe(m,{attributes:!0}),n.addEventListener("keydown",function(e){32===e.keyCode?e.preventDefault():13===e.keyCode&&(e.preventDefault(),t.click())}),n.addEventListener("keyup",function(e){32===e.keyCode&&(e.preventDefault(),t.click())}),t.click(),g.setAttribute("data-campaign",I),g.removeAttribute("style"),h("sticky.bottom","slide-out-open",r.Headline1,r.CTA1text,r.CTA1URL,r.CTA2text,r.CTA2URL))}if("paywall"==e){c=document.getElementById("diks-bc-paywall"),b=document.getElementById("diks-bc-paywall-wrapper"),o=document.getElementById("diks-paywall-wrapper"),u=document.getElementById("bc-marketing-dialog-title"),d=document.getElementById("bc-marketing-dialog-description"),s=document.getElementById("bc-marketing-dialog-description2"),m=document.getElementById("bc-marketing-dialog-cta-wrapper");let e=!1;var g=document.getElementById("bc-marketing-dialog-footer-text-wrapper"),n=document.getElementById("bc-marketing-dialog-cta1"),T=document.getElementById("bc-marketing-dialog-cta2"),v=document.getElementById("bc-marketing-dialog-cta3"),f=document.getElementById("bc-marketing-dialog-list");if(r.Headline1&&u&&!u.textContent&&(u.textContent=r.Headline1,u.removeAttribute("style")),r.Text1&&d&&!d.textContent&&(d.textContent=r.Text1,d.removeAttribute("style")),r.Text2&&s&&!s.textContent&&(s.textContent=r.Text2,s.removeAttribute("style")),r.CTA1text&&r.CTA1URL&&n&&!n.textContent&&(n.textContent=r.CTA1text,n.setAttribute("href",w(r.CTA1URL)),n.removeAttribute("style"),e=!0,R(n,L)),r.CTA2text&&r.CTA2URL&&T&&!T.textContent&&(T.textContent=r.CTA2text,T.setAttribute("href",w(r.CTA2URL)),T.removeAttribute("style"),e=!0,R(T,L)),m&&e&&m.removeAttribute("style"),v&&g&&0===v.children.length&&((u=
1document.createElement("a")).href="/kirjaudu/?returnUrl="+encodeURIComponent(window.location.href.split("?")[0]),u.textContent="Oletko jo tilaaja? Kirjaudu sisään",u.id="diks-bc-paywall-login-link",v.append(u),g.removeAttribute("style")),r.Text3&&f&&0===f.children.length){var B=r.Text3.split("|");for(let e=0;e<B.length;e++){var E=document.createElement("li");E.classList.add("diks-marketing-dialog__list-item"),E.textContent=B[e],f.append(E)}f.removeAttribute("style")}c&&o&&(c.setAttribute("data-campaign",I),"block"===o.style.display?(c.remove(),b&&b.remove()):(window.BCpaywallRendered=!0,o.remove(),c.removeAttribute("style"),h("paywall","paywall.paywall",r.Headline1,r.CTA1text,r.CTA1URL,r.CTA2text,r.CTA2URL)))}"order-button"==e&&(d=document.getElementsByClassName("diks-bc-order-button"))&&d.length&&r.CTA1URL&&Array.from(d).forEach(function(e){"a"!==e.tagName.toLowerCase()||e.classList.contains("diks-bc-container")||(e.setAttribute("href",(e=>{let t=e.trim();return BClinkParams.aO&&(t=U(t,"accountOrigin="+BClinkParams.aO)),t=BClinkParams.aI?U(t,"articleid="+BClinkParams.aI):t})(r.CTA1URL)),e.classList.add("diks-bc-container"),R(e,L))})}).catch(()=>{});else{if("image-dialog"==e){t=document.getElementById("diks-bc-image-dialog");if(t&&t.hasAttribute("data-bc-rendered"))return;if(t){t.style.display="none";var n=t.children;let e=!1;if(!(e=1===n.length&&("IMG"===(n=n[0]).tagName||"A"===n.tagName&&1===n.children.length&&"IMG"===n.children[0].tagName)?!0:e))return;t.setAttribute("data-bc-rendered","true"),t.removeAttribute("style")}}if("text-dialog"==e){n=document.getElementById("diks-bc-text-dialog");if((!n||!n.hasAttribute("data-bc-rendered"))&&n){n.style.display="none";var t=n.children;let e=!1;(e=1===t.length&&"DIV"===(t=t[0]).tagName&&t.classList.contains("diks-marketing-dialog")?!0:e)&&(n.setAttribute("data-bc-rendered","true"),n.removeAttribute("style"))}}}}function h(e,t,n,i,a,l,r){o.push({event:"pageContent."+e,eventData:{elementSource:"blueconic",elementType:t||"",elementTitle:n||"",campaign:I,buttonText:i||"",buttonType:i&&a?"link.order":"",buttonLink:a||"","buttonText-2":l||"","buttonType-2":l&&r?"link.order":"","buttonLink-2":r||""}})}function U(e,t){return e+(e.split("?")[1]?"&":"?")+t}function w(e){let t=e.trim();return BClinkParams.aO&&(t=U(t,"accountOrigin="+BClinkParams.aO)),BClinkParams.rU&&(t=!0===BClinkParams.tA&&BClinkParams.sD?U(t,"returnUrl="+BClinkParams.rU):U(t,"returnUrl="+encodeURIComponent(BClinkParams.rU))),BClinkParams.aI&&(t=U(t,"articleid="+BClinkParams.aI)),BClinkParams.bU&&(t=!0===BClinkParams.tA&&BClinkParams.sD?U(t,"backUrl="+BClinkParams.bU):U(t,"backUrl="+encodeURIComponent(BClinkParams.bU))),t=U(t,"cd_source_button=article_paywall"),t=U(t,"source=maksumuuri_artikkeli"),t=!0===BClinkParams.tA&&BClinkParams.sD?BClinkParams.sD+"/ticket-out?redirectUrl="+encodeURIComponent(t):t}function R(e,n){function i(e){let t="";var n=window.blueConicClient.getInteractions();if(Array.isArray(n)&&0<n.length)for(var i=0;i<n.length;
1i++)if(n[i].name===e){t=n[i].id;break}t&&window.blueConicClient.createEvent("CLICK",t)}e&&n&&e.addEventListener("click",function(e){e.preventDefault();let t=this.href;t&&setTimeout(function(){window.location.href=t},200),void 0!==window.blueConicClient&&void 0!==window.blueConicClient.event&&void 0!==window.blueConicClient.event.subscribe?i(n):window.addEventListener("onBlueConicLoaded",function(){i(n)},!1)})}}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.