1(self.webpackChunk=self.webpackChunk||[]).push([[487],{68972(e,t,a){var n;n=e=>(()=>{var t={540:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},1113:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},1601:e=>{e.exports=function(e){return e[1]}},2633:(e,t,a)=>{a.d(t,{A:()=>l});var n=a(1601),o=a.n(n),r=a(6314),i=a.n(r)()(o());i.push([e.id,"@import url(https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;700&display=swap);"]),i.push([e.id,'.autotalli-box-embed{--autotalli-box-embed-bg-color: #fff;--autotalli-box-embed-text-color: #222;--autotalli-box-embed-border-color: #ddd;--autotalli-box-embed-link-color: #5db3b0;line-height:1;font-family:"Open Sans",sans-serif;background-color:var(--autotalli-box-embed-bg-color);overflow:hidden;max-width:700px}.autotalli-box-embed *{box-sizing:border-box;text-decoration:none}.autotalli-box-embed .autotalli-box-embed-header-container{background-color:var(--autotalli-box-embed-link-color);padding:7px 14px;display:flex;justify-content:space-between;flex-direction:row}.autotalli-box-embed .autotalli-box-embed-header-container img{color:#fff;align-self:center}.autotalli-box-embed .autotalli-box-embed-header-container .autotalli-embed-header{font-family:"Open Sans",sans-serif;font-size:16px;font-weight:600;line-height:22px;letter-spacing:0;color:#fff;text-decoration:none}.autotalli-box-embed article{margin:3px}.autotalli-box-embed article a{display:flex;flex-direction:column;width:100%;height:100%}.autotalli-box-embed article .autotalli-ad-image{flex:1 1 0%;display:flex;align-items:center;width:100%}.autotalli-box-embed article .autotalli-ad-image .autotalli-image-container{position:relative;height:100%;width:100%;padding-bottom:75%}.autotalli-box-embed article .autotalli-ad-image img{display:block;position:absolute;height:100%;width:100%}.autotalli-box-embed .item-container{display:grid;grid-template-columns:minmax(0, 1fr) minmax(0, 1fr);padding:5px}.autotalli-box-embed .bold{font-weight:700}.autotalli-box-embed .autotalli-box-vo-logo{padding:0;flex-basis:135px}.autotalli-box-embed .autotalli-box-vo-logo .autotalli-box-embed-header-containe img{margin-left:0}.autotalli-box-embed .announcement-description{font-size:13px;color:var(--autotalli-box-embed-text-color);text-align:center;width:100%;display:block;line-height:19px;margin-top:6px}.autotalli-box-embed .announcement-description .announcement-description-price{white-space:nowrap;font-size:15px}.autotalli-box-embed .announcement-description .announcement-make-
1and-model{font-weight:700;display:block;font-size:15px}@media(max-width: 420px){.autotalli-box-embed .item-container{grid-template-columns:minmax(0, 1fr)}.autotalli-box-embed .hide-first-mobile:last-child{display:flex}.autotalli-box-embed article a{flex-direction:row}.autotalli-box-embed article a .announcement-description{flex:2;display:flex;flex-direction:column;justify-content:center;text-align:left;padding-left:10px}}@media(max-width: 450px){.autotalli-box-embed .autotalli-box-embed-header-container{flex-direction:column;justify-content:center;padding:14px}.autotalli-box-embed .autotalli-box-embed-header-container .autotalli-embed-header{text-align:center;padding-top:7px}}@media(min-width: 640px){.autotalli-box-embed article{margin:6px}}html.theme-light .autotalli-box-embed{--autotalli-box-embed-bg-color: #fff;--autotalli-box-embed-text-color: #222;--autotalli-box-embed-border-color: #ddd;--autotalli-box-embed-link-color: #5db3b0}html.theme-dark .autotalli-box-embed{--autotalli-box-embed-bg-color: #2b2b2b;--autotalli-box-embed-text-color: #fff;--autotalli-box-embed-border-color: #666;--autotalli-box-embed-link-color: #5db3b0}@media(prefers-color-scheme: dark){.autotalli-box-embed{--autotalli-box-embed-bg-color: #2b2b2b;--autotalli-box-embed-text-color: #fff;--autotalli-box-embed-border-color: #666;--autotalli-box-embed-link-color: #5db3b0}}',""]);const l=i},5056:(e,t,a)=>{e.exports=function(e){var t=a.nc;t&&e.setAttribute("nonce",t)}},5072:e=>{var t=[];function a(e){for(var a=-1,n=0;n<t.length;n++)if(t[n].identifier===e){a=n;break}return a}function n(e,n){for(var r={},i=[],l=0;l<e.length;l++){var s=e[l],d=n.base?s[0]+n.base:s[0],c=r[d]||0,u="".concat(d," ").concat(c);r[d]=c+1;var m=a(u),b={css:s[1],media:s[2],sourceMap:s[3],supports:s[4],layer:s[5]};if(-1!==m)t[m].references++,t[m].updater(b);else{var p=o(b,n);n.byIndex=l,t.splice(l,0,{identifier:u,updater:p,references:1})}i.push(u)}return i}function o(e,t){var a=t.domAPI(t);return a.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;a.update(e=t)}else a.remove()}}e.exports=function(e,o){var r=n(e=e||[],o=o||{});return function(e){e=e||[];for(var i=0;i<r.length;i++){var l=a(r[i]);t[l].references--}for(var s=n(e,o),d=0;d<r.length;d++){var c=a(r[d]);0===t[c].references&&(t[c].updater(),t.splice(c,1))}r=s}}},6314:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var a="",n=void 0!==t[5];return t[4]&&(a+="@supports (".concat(t[4],") {")),t[2]&&(a+="@media ".concat(t[2]," {")),n&&(a+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),a+=e(t),n&&(a+="}"),t[2]&&(a+="}"),t[4]&&(a+="}"),a}).join("")},t.i=function(e,a,n,o,r){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(n)for(var l=0;l<this.length;l++){var s=this[l][0];null!=s&&(i[s]=!0)}for(var d=0;d<e.length;d++){var c=[].concat(e[d]);n&&i[c[0]]||(void 0!==r&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=r),a&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=a):c[2]=a),o&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=o):c[4]="".concat(o)),t.push(c))}},t}},7052:(e,t,a)=>{a.r(t),a.d(t,{default:()=>g});var n=a(5072),o=a.n(n),r=a(7825),i=a.n(r),l=a(7659),s=a.n(l),d=a(5056),c=a.n(d),u=a(540),m=a.n(u),b=a(1113),p=a.n(b),f=a(2633),v={};v.styleTagTransform=p(),v.setAttributes=c(),v.insert=s().bind(null,"head"),v.domAPI=i(),v.insertStyleElement=m(),o()(f.A,v);const g=f.A&&f.A.locals?f.A.locals:void 0},7659:e=>{var t={};e.exports=function(e,a){var n=function(e){if(void 0===t[e]){var a=document.querySelector(e);if(window.HTMLIFrameElement&&a instanceof window.HTMLIFrameElement)try{a=a.contentDocument.head}catch(e){a=null}t[e]=a}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(a)}},7825:e=>{e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(a){!function(e,t,a){var n="";a.supports&&(n+="@supports (".concat(a.supports,") {")),a.media&&(n+="@media ".concat(a.media," {"));var o=void 0!==a.layer;o&&(n+="@layer".concat(a.layer.length>0?" ".concat(a.layer):""," {")),n+=a.css,o&&(n+="}"),a.media&&(n+="}"),a.supports&&(n+="}");var r=a.sourceMap;r&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),t.styleTagTransform(n,e,t.options)}(t,e,a)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},9155:t=>{t.exports=e}},a={};function n(e){var o=a[e];if(void 0!==o)return o.exports;var r=a[e]={id:e,exports:{}};return t[e](r,r.exports,n),r.exports}n.n=e=>
1{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nc=void 0;var o={};n.r(o),n.d(o,{AutotalliBoxEmbed:()=>y});var r=n(9155),i=n.n(r);const l="@almamedia/consent",s=`${l}:request`;class d extends Error{client=l;version="0.0.0"}class c extends d{constructor(){super("Consent request aborted by user")}}class u extends d{issues;constructor(e){super("Consent response schema validation failed"),this.issues=e}}class m{debug(e){}info(e){}warn(e){}error(e){}}const b="alma_cmp_v3_consent_available_repetitive",p=["marketing_and_advertising","personalization","analytics","sharing_target_groups_for_campaign_use"],f=e=>!!e&&"object"==typeof e&&Array.isArray(e.purposes);let v=null;const g=()=>(v||(v=(async()=>{if("undefined"==typeof document)return null;const e=new AbortController,t=setTimeout(()=>e.abort(),2e3);try{return await(async e=>{try{const a=await(t={abortSignal:e},((e,t,a)=>{const{abortSignal:n,schema:o,logger:r=new m}=a??{};function i(e){r.debug(`CMP v3: ${e}`)}return new Promise((e,a)=>{document.addEventListener(t,async t=>{const n=t;if(i("Received consent data"),!o)return i("No schema provided, resolving with consent data as received"),void e(n.detail);i("Validating consent data against provided schema");let r=o["~standard"].validate(n.detail);if(r instanceof Promise&&(r=await r),r.issues)return i("Validation failed, rejecting with error"),void a(new u(r.issues));i("Validation successful, resolving with consent data"),e(r.value)},{once:!0,signal:n}),i("Requesting consent data from CMP..."),function(e){document.dispatchEvent(new CustomEvent(s,{detail:e}))}(t),i("Waiting for consent data..."),n&&n.addEventListener("abort",()=>{i("Aborting due to abort signal"),a(new c)})})})(0,b,t));return f(a)?a:(e=>new Promise(t=>{const a=()=>{document.removeEventListener(b,o),e.removeEventListener("abort",n)},n=()=>{a(),t(null)},o=e=>{const n=e.detail;f(n)&&(a(),t(n))};e.aborted?t(null):(e.addEventListener("abort",n),document.addEventListener(b,o))}))(e)}catch{return null}var t})(e.signal)||(console.warn("CMP v3 consent timed out or unavailable; falling back to anonymous Kisu id"),null)}finally{clearTimeout(t)}})().finally(()=>{v=null})),v),h=async()=>{try{const e=await(window?.ALMA?.gravitoV1?.getIdentifier("permutive"));return e?.value||null}catch(e){return console.error("Failed to read the permutive identifier:",e),null}},x="https://images.almaajo.fi/production/iltalehti_ad_Image_not_loaded.webp",w="TrafficManagement",y=(k=()=>{const{data:e,loadSettled:t}=(e=>{const[t,a]=(0,r.useState)(()=>(e=>({announcements:Array.from({length:e},()=>({adUrl:"",imageUrl:x,makeName:"",modelName:"",price:"",modelYear:0})),isKnownUser:!1}))(e)),[n,o]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{let t=!1;return(async()=>{try{const n=(({cmp:e,permutiveId:t})=>(e=>!!e&&p.every(t=>e.purposes.includes(t)))(e)&&t?t:"0")(await(window?.ILRAPWebview?(async()=>({cmp:(()=>{const e=window.ILRAPWebview?.cmpV3;return f(e)?e:(e&&console.warn("Ignoring in-app consent: not CMP v3 shaped ({ purposes: [...] })",e),null)})()??await g(),permutiveId:window.ILRAPWebview?.permutiveId||null}))():(async()=>{const[e,t]=await Promise.all([h(),g()]);return{cmp:t,permutiveId:e}})())),r=await(async({body:e,permutiveId:t})=>{const a=await fetch("https://kisu.mach1.fi",{method:"POST",headers:{"Content-Type":"application/json","x-api-key":"C6BhnYBtAD8VFBdyqvuUrHIRWq5AcTz8sNv9BFhi",user_id:t},body:JSON.stringify(e)});if(!a.ok)throw new Error(`Kisu API error: ${a.status}`);return a})({body:{user_id:{type:"permutive_id",value:n}},permutiveId:n}),{items:i,isKnownUser:l}=(e=>{if(Array.isArray(e))return{items:e,isKnownUser:!1};if(e&&"object"==typeof e){const t=e;if(Array.isArray(t.recommendations))return{items:t.recommendations,isKnownUser:!0===t.is_known_user}}throw new Error("Unexpected Kisu response shape: missing recommendations")})(await r.json()),s=i.map(e=>{return{imageUrl:e.imageUrl.replace("/1600x1200/autotalli","/335x250/autotalli"),price:(t=e.price,t.toLocaleStr
1ing("fi-FI")+" â¬"),makeName:e.makeName,modelName:e.modelName,modelYear:e.modelYear,adUrl:e.adUrl};var t});(e=>{for(let t=e.length-1;t>0;t--){const a=Math.floor(Math.random()*(t+1));[e[t],e[a]]=[e[a],e[t]]}})(s),t||(a({announcements:s.slice(0,e),isKnownUser:l}),o(!0))}catch(e){t||(console.error("Failed to fetch autotalli data:",e),o(!0))}})(),()=>{t=!0}},[e]),{data:t,loadSettled:n}})(4),{ref:a,trackClick:n}=(e=>{const t=(0,r.useRef)(null),a=(0,r.useRef)(),n=(0,r.useCallback)((t,a)=>{if("undefined"==typeof window)return;const n={eventAction:t,eventCategory:e.eventCategory,eventLabel:e.eventLabel,eventTarget:e.eventTarget,userType:e.userType,eventData1:a?.eventData1??void 0,eventData2:a?.eventData2??void 0,eventData3:a?.eventData3??void 0,eventData4:e.eventData4??a?.eventData4??void 0,targetPageId:a?.targetPageId??void 0};window.loadGAFromSite&&window.sendCustomGA4Event?window.sendCustomGA4Event({eventName:w,eventDimensions:n}):(n.event="sendGAEvent",n.eventName=w,window.dataLayer=window.dataLayer||[],window.dataLayer.push(n))},[e]);(0,r.useEffect)(()=>{if(!t.current)return;const o=t.current;if(!a.current)try{a.current=new IntersectionObserver(t=>{if(t.length&&t[0].isIntersecting){const t=e.getShowEventData?e.getShowEventData():void 0;n("Showed",t),a.current&&a.current.unobserve(o)}},{root:null,rootMargin:"0px",threshold:[.3]})}catch(e){console.error("Failed to create IntersectionObserver",e)}return a.current&&a.current.observe(o),()=>{a.current&&a.current.unobserve(o)}},[n,e]);const o=(0,r.useCallback)(e=>{n("Clicked",e)},[n]);return{ref:t,trackClick:o}})({eventTarget:"at",eventCategory:"Kisu",eventLabel:"autotalli",userType:e.isKnownUser?"Tunnettu":"Ei tietoja"});return i().createElement("section",{className:"autotalli-box-embed",ref:t?a:void 0},i().createElement("a",{className:"autotalli-box-vo-logo",href:"https://www.autotalli.com/?utm_source=iltalehti.fi&utm_medium=almainternal_fixed&utm_campaign=kiintea_autotalli_kisu&utm_content=kiintea_kisu_kohdenosto",rel:"noopener noreferrer",target:"_blank",onClick:()=>n({targetPageId:"https://www.autotalli.com/?utm_source=iltalehti.fi&utm_medium=almainternal_fixed&utm_campaign=kiintea_autotalli_kisu&utm_content=kiintea_kisu_kohdenosto"})},i().createElement("div",{className:"autotalli-box-embed-header-container"},i().createElement("img",{src:"https://assets.ilcdn.fi/17625bafbb8ddb5e005e1b5d5d2ab151f8c2c8a7bc1a72af11eae010eb5cf914.svg",alt:"Autotalli.com"}),i().createElement("div",{className:"autotalli-embed-header"},"Parhaat vaihtoautot"))),i().createElement("div",{className:"item-container"},e.announcements.map((e,t)=>i().createElement("article",{className:"hide-first-mobile",key:`${e.adUrl}${t}`},i().createElement("a",{target:"_blank",rel:"noopener noreferrer",href:e.adUrl?`${e.adUrl}?utm_source=iltalehti.fi&utm_medium=almainternal_fixed&utm_campaign=kiintea_autotalli_kisu&utm_content=kiintea_kisu_kohdenosto`:"#",onClick:t=>{e.adUrl?n({targetPageId:e.adUrl}):t.preventDefault()}},i().createElement("div",{className:"autotalli-ad-image"},i().createElement("div",{className:"autotalli-image-container"},i().createElement("img",{src:e.imageUrl,alt:`Autotalli.com vaihtoauto ${e.makeName} ${e.modelName}`,onError:e=>{e.currentTarget.src=x}}))),i().createElement("div",{className:"announcement-description"}
1,i().createElement("span",{className:"announcement-make-and-model"},e.makeName||e.modelName?`${e.makeName} ${e.modelName}`:"Â "),i().createElement("span",null," ",e.modelYear?`${e.modelYear}, `:"Â ",i().createElement("span",{className:"announcement-description-price bold"}," ",e.price))))))))},function(e){const[t,a]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{n(7052),a(!0)},[]),t?i().createElement(k,{...e}):null});var k;return o})(),e.exports=n(a(96540))}}]); 2//# sourceMappingURL=AutotalliBox.bd7e7f077.chunk.js.map
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.