PageSourceSearch

https://www.is.fi/_next/static/chunks/5454.bf97e08c39023e67.js

js is.fi collected 2026-09-24 08:37:17 UTC 16,620 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5454],{20012:(e,t,n)=>{n.r(t),n.d(t,{default:()=>D});var r=n(37876),i=n(27964),o=n(35994),s=n(15039),a=n.n(s),l=n(17924),u=n(15199),c=n(95961),d=n(72848),p=n(23191),f=n(20952),v=n(63593),h=n(97575),m=n(57814),y=n(92739),g=n(51799),b=n(38679),w=n(99972),x=n(62498),_=n(33399),L=n(51144),I=n(65592),j=n(14232),k=n(59712),C=n(71152),S=n(71497),E=n(96078),M=n(41362),N=n(59587),R=n(81389),T=n(61591),O=n(86770),P=n(46034),A=n(99373);let F=e=>{let{playerState:t,play:n,unmute:i,mute:o,isMuted:s,remainingTime:a,lastEvent:l,autoplay:u,runtime:c,showPrecoverRuntime:d,externalControlsVisible:p,isWebview:f}=e,v="playing"===t.status,h="paused"===t.status,m=void 0!==c&&c>0,y="".concat("−").concat((0,A.a3)(Math.floor(a))),g="precover"===t.status,b=(0,A.a3)(c);return M.A.useMainVideoPreview?d?g&&m?(0,r.jsx)(B,{label:b}):null:u||v||h||l||!m?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"right-nof-8 top-nof-8 fixed",children:(f?!p:s&&!p)&&(0,r.jsx)(R.x,{"aria-keyshortcuts":"m",containerClassName:"full-video-button full-video-button--unmute",onClick:s?i:o,icon:s?(0,r.jsx)(O.A,{}):(0,r.jsx)(P.F,{}),iconOnly:!0,colorVariant:R.n9.Negative,label:s?"Poista mykistys":"Mykist\xe4",translucent:!0})}),!h&&a>0&&(0,r.jsx)(B,{label:y,isFixed:!0,hidden:p})]}):(0,r.jsx)("div",{className:"bottom-nof-16 left-nof-16 fixed",children:(0,r.jsx)(R.x,{onClick:()=>n("user"),icon:(0,r.jsx)(T.A,{}),label:b,small:!0,"aria-label":"Toista video, kesto ".concat((0,A.qe)(c))})}):null},B=e=>{let t,n=(0,i.c)(3),{label:o,isFixed:s,hidden:a}=e,l="nof-ui-body-small text-nof-foreground-negative bg-nof-background-content-negative/85 bottom-nof-8 right-nof-8 px-nof-4 py-nof-2 rounded-[var(--nof-core-border-radius-4)] tabular-nums ".concat(s?"fixed":"absolute"," ").concat(a?"invisible":"");return n[0]!==o||n[1]!==l?(t=(0,r.jsx)("div",{"aria-hidden":"true","data-testid":"video-length",className:l,children:o}),n[0]=o,n[1]=l,n[2]=t):t=n[2],t};var V=n(60697),W=n(5243);let U={video_clip:"clip",video_episode:"episode",video_live:"stream"},G=e=>{let t,n,o,s=(0,i.c)(6),{className:l,orientation:u}=e;return s[0]!==l||s[1]!==u?(t=a()("media-player-container media-player-wrapper media-player-wrapper--main bg-nof-neutral-contrast-low flex animate-pulse items-center justify-center",l,(0,N.DN)(u)),s[0]=l,s[1]=u,s[2]=t):t=s[2],s[3]===Symbol.for("react.memo_cache_sentinel")?(n=(0,r.jsx)("div",{className:"nof-ui-body-medium text-nof-foreground-primary w-full text-center",children:"Sis\xe4lt\xf6\xe4 ladataan"}),s[3]=n):n=s[3],s[4]!==t?(o=(0,r.jsx)("div",{className:t,children:n}),s[4]=t,s[5]=o):o=s[5],o},D=e=>{var t,n,i;let{mediaContent:s,template:R,renderContext:T,setVideoPlayer:O,showMediaContentInfo:P=!0,showRuntime:A=!0,showPlayerControls:B=!0,closeStickyVideo:D,className:J,videoEventHandler:$,autoplay:K,onIsLive:X,mediaData:q}=e,{userProfile:z,userIds:H}=(0,y.sb)(),{assetData:Q}=(0,c._)(),{"hosts.er.whitelabel":Y,"hosts.apps":Z}=(0,p.U)(),ee=(0,d.P)(),et=(0,f.p)(),{platform:en}=(0,v.g$)(),{useMainVideoPreview:er,useMiniplayerPageUrl:ei}=M.A,{isPersonalized:eo}
1=(0,h.Ih)(),es=(0,b.d)(),ea=(0,j.useRef)(!1),[el,eu]=(0,j.useState)(1),ec=(0,j.useRef)(0),ed=(0,j.useRef)(0),ep=(0,j.useRef)(0),ef=(0,j.useRef)(null),ev=(0,j.useRef)(!1),eh=(0,j.useRef)(!1),em=(0,j.useRef)(!1),ey=(0,j.useRef)(null),eg=(0,j.useRef)(!1),eb=(0,j.useRef)(I.pl);eb.current=(0,W.uG)(z);let{useInkBridge:ew}=(0,v.g$)(),[ex,e_]=(0,j.useState)(0),eL=(0,E.el)(et,eo),eI=(0,k.LJ)(Q),ej=(0,N.HB)(es),ek=null!=K?K:(0,N.$8)(s,T,R,!0,er),eC="muted"===ek||ek,[eS,eE]=(0,j.useState)("muted"===ek),{maxImageWidth:eM,maxImageBreakpointWidth:eN}=(0,m.j)(),eR="webview"===T&&ew,eT=(0,j.useCallback)(()=>{if(Q){var e,t,n,r,i,o,a,u,c,d,p,f,v;let h,m,y;e=eb.current,t=Q.id,n=ep.current,r=(0,k.MM)(Q),i=s,o=e,a=t,u=Z,c=ee,d=ei,p=n,f=r,h=u.replace("://apps","://apps-html").replace("{domain}",(0,V.JX)(c)),m=d?"".concat(h,"/miniplayer/").concat(a,"/").concat(i.sourceId?"?sourceId=".concat(encodeURIComponent(i.sourceId)):""):"".concat(h,"/player/").concat(a,"/"),y={type:x.oi.InitiateVideoMiniplayer,title:i.title,mediaId:i.sourceId,elapsedTime:p,thumbnailUrl:null==(v=i.picture)?void 0:v.url,freeWheelSite:i.freeWheelSite,userRole:o,gaId:f,playerUrl:m},(0,l.Wr)(y),null==D||D(!1)}},[s,Q,D,eb,Z,ee,ei]),eO=(0,j.useCallback)(async e=>{var t,n,r;$&&(0,C.Bd)()&&$(e);let i="playState"in e?e.playState.currentTime:0;
1i&&(ep.current=i);let o="playState"in e?e.playState.duration:0,a="playState"in e?e.playState.playbackRate:1,u=(0,S.mS)(e.type),c=null==(r=ey.current)||null==(n=r.getCurrentMedia())?void 0:n.mediaType,d=null!=(t=U[null!=c?c:"video_clip"])?t:"clip";"content-start"===u&&(ev.current=!0);let p=t=>(0,S.Sr)(t,ee,eL,et.nodeId,z,H,e.trigger,(()=>{switch(e.type){case"adBreakStarted":return e.adBreak.ads.reduce((e,t)=>e+t.duration,0);case"finished":case"destroyed":return ed.current;case"loaded":if("passthroughVariables"in e.asset&&e.asset.passthroughVariables&&"runtime"in e.asset.passthroughVariables){var t;return null!=(t=e.asset.passthroughVariables.runtime)?t:o}return o;default:return o}})(),(()=>{switch(e.type){case"finished":return ed.current;case"destroyed":return ep.current;default:return i}})(),"video embedding",(0,S.Tr)(e),a,null==Q?void 0:Q.id,s.sourceId,d,en,es),f="user"===e.trigger&&("adBreakStarted"===e.type||"contentStarted"===e.type),v=ek&&"loaded"===e.type;if((f||v)&&!(s.autoloop&&em.current)){let e;e={type:x.oi.MediaPlayerMetadata,mediaId:s.sourceId,mediaTitle:s.title,mediaType:(null==Q?void 0:Q.resourceType)==="Audio"?"podcast":"clip",gaId:(0,k.MM)(Q)},(0,l.Wr)(e),await (0,S.G3)(Y,p("start"),ee),em.current=!0}switch(e.type){case"loaded":null==X||X("video_live"===e.asset.mediaType);break;case"contentStarted":eR&&(0,l.Wr)({type:x.oi.PlayerStatusEvent,isPlaying:!0}),o>0&&(ed.current=o),s.autoloop&&eh.current||await (0,S.G3)(Y,p("play"),ee);break;case"miniplayerButtonClick":eT();break;case"destroyed":ev.current&&await (0,S.G3)(Y,p("stop"),ee);break;case"paused":eg.current="auto"===e.trigger;break;case"position":if(o>0&&i>0&&e_(Math.max(0,Math.floor(o-i))),"content"===e.contentType&&(e.seek||(ec.current+=e.to-e.from),ec.current>120)){let e=p("heartbeat");ec.current=0,await (0,S.G3)(Y,e,ee)}break;case"finished":ev.current=!1;break;case"mute":eE(e.muted)}if(u){if("content-start"===u&&s.autoloop&&eh.current)return;"content-start"===u&&(eh.current=!0),ef.current=e,await (0,S.G3)(Y,p(u),ee)}},[ee,Y,s,et.nodeId,eL,H,z,Q,ek,en,eR,eT,es,$,X]),eP=(0,k.MM)(Q),{sppd:eA}=(0,g.h)(),eF=!M.A.copEnabled[ee]||eA,eB=null!=(t=(0,k.yX)(Q))?t:"".concat(ee,"-fi"),eV=z.authenticationStatus===L.J.Authenticated?z:null,eW=eV?(0,W.t2)(eV):void 0,eU=null!=(n=null==eV?void 0:eV.adId)?n:"",eG=null!=(i=null==eV?void 0:eV.entitlements.map(e=>e.key).join(","))?i:"",eD=(0,j.useMemo)(()=>{var e,t;return{layout:{hideTitle:"teaser"===T||eR,disableUI:"teaser"===T||!B,precoverMedia:s.mainVideoPreview&&"mainVideo"===T?{type:"video",showButton:!0,loop:!1}:{type:"image",showTitle:!eR,showButton:!eR}},pictureInPicture:null!=(e=null==(t=window.inkAppFeatureFlags)?void 0:t.pictureInPictureEnabled)&&e,analytics:eF?{gaid:eP,service:ee,currentSite:eB,sessionId:null==es?void 0:es.sessionId,appInstanceId:null==es?void 0:es.appInstanceId}:void 0,user:void 0!==eW?{role:eW,adId:eU,products:""===eG?[]:eG.split(",")}:void 0,miniplayerButton:en===_.OD.Android,ads:eI&&!eR?{fwSite:eI,advertisementId:ej,inApp:ew}:void 0,tcData:eR?null:void 0,experimental:{enableSnowplowMediaEvents:eF},sizing:eR?{mode:"cover"}:void 0}},[eP,eB,eW,eU,eG,ee,eI,T,en,null==es?void 0:es.sessionId,null==es?void 0:es.appInstanceId,eR,ej,ew,s.mainVideoPreview,B,eF]),{playerRef:eJ,player:e$,playerState:eK}=(0,o.yd)(eD,{fontFamily:'"Source Sans 3", sans-serif',timelineProgressColor:"#505050",timelineBackgroundColor:"#9b9b9b",buttonColor:"#fff",adMarkerColor:"#fff",overlayBackgroundColor:"rgba(0, 11, 27, .9)",overlayTextColor:"#fff",highlightColor:"#fff"},eO);ey.current=e$;let{controlsVisible:eX}=(0,o._5)(e$),{isPlaying:eq}=(0,o.Ni)(e$),ez=.2*!eR,{ref:eH,inView:eQ}=(0,w.W)({threshold:ez,onEnter:()=>{ek&&"postcover"!==eK.status&&eg.current&&eY()},onExit:()=>{(ek||eR)&&eZ()}}),eY=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"auto";null==e$||e$.play(e)},eZ=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"auto";null==e$||e$.pause(e)},e0=!!eR||eQ,e1=()=>{var e,t,n;let r=ef.current?(0,S.Tr)(ef.current):"content",i=ef.current&&"playState"in ef.current?ef.current.playState.playbackRate:1,o=U[null!=(e=null==(n=ey.current)||null==(t=n.getCurrentMedia())?void 0:t.mediaType)?e:"video_clip"];ev.current&&(0,S.G3)(Y,(0,S.Sr)("stop",ee,eL,et.nodeId,z,H,"auto",ed.current,ep.current,"video embedding",r,i,null==Q?void 0:Q.id,s.sourceId,o,en,es),ee)};(0,j.useEffect)(()=>(window.addEventListener("beforeunload",e1),()=>{window.removeEventListener("beforeunload",e1)})),(0,j.useEffect)(()=>{eh.current=!1,em.current=!1},[s.sourceId]),(0,j.useEffect)(()=>{ea.current=!1},[e$]),(0,j.useEffect)(()=>{!ea.current&&e$&&"empty"===eK.status&&s.sourceId&&e0&&(ea.current=!0,e$.loadId(s.sourceId,{autoplay:ek,position:s.startFromSeconds,autoloop:s.autoloop,mediaData:q}).then(e=>{let{error:t}=e;(null==t?void 0:t.name)==="PlayerAssetNotFoundError"&&(el<6&&setTimeout(()=>{eu(e=>e+1),ea.current=!1},5e3*el),console.error("Failed to load video with sourceId ".concat(s.sourceId)
1))})),null==O||O({player:e$,playerState:eK,isPlaying:eq})},[s,e$,O,eK,eq,el,ek,e0,eR,q]);let e9=(z.authenticationStatus===L.J.AutoWelcomeBack||z.authenticationStatus===L.J.Unknown)&&!eR;return(0,r.jsxs)(r.Fragment,{children:[e9&&(0,r.jsx)(G,{orientation:s.orientation}),(0,r.jsxs)("div",{className:a()("media-player-container media-player-wrapper media-player-wrapper--main relative",J,(0,N.DN)(s.orientation),{hidden:e9}),"data-testid":"video-player",ref:eH,children:[(0,r.jsx)("div",{ref:eJ,className:a()({[(0,N.DN)(s.orientation)]:eR},"inject-player-placeholder")}),"empty"===eK.status&&!eR&&(0,r.jsx)("div",{className:a()("absolute inset-0 flex items-center justify-center"),children:"teaser"===T&&(0,r.jsx)(u.A,{picture:s.picture,maxImageWidth:eM,maxImageBreakpointWidth:eN,containerClassName:"max-w-full"})}),B&&(eR||"mainVideo"===T)&&"empty"!==eK.status&&(0,r.jsx)(F,{playerState:eK,runtime:A?s.runtime:void 0,play:eY,isMuted:eS,unmute:()=>null==e$?void 0:e$.unmute(),mute:()=>null==e$?void 0:e$.mute(),remainingTime:ex,lastEvent:ef.current,autoplay:eC,showPrecoverRuntime:"mainVideo"===T,externalControlsVisible:eX,isWebview:eR})]}),P&&(0,r.jsx)(W.U$,{caption:s.caption,credits:s.credits,photographer:s.photographer,renderContext:T})]})}},69319:e=>{var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise(function(n,r){var i,o,s;function a(n){e.removeListener(t,l),r(n)}function l(){"function"==typeof e.removeListener&&e.removeListener("error",a),n([].slice.call(arguments))}h(e,t,l,{once:!0}),"error"!==t&&(i=e,o=a,s={once:!0},"function"==typeof i.on&&h(i,"error",o,s))})},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function u(e,t,n,r){if(a(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),void 0===s)s=o[t]=n,++e._eventsCount;else if("function"==typeof s?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=l(e))>0&&s.length>i&&!s.warned){s.warned=!0;var i,o,s,u=Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=s.length,console&&console.warn&&console.warn(u)}return e}function c(){if(!this.fired)return(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0==arguments.length)?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=c.bind(r);return i.listener=n,r.wrapFn=i,i}function p(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):v(i,i.length)}function f(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function v(e,t){for(var n=Array(t),r=0;r<t;++r)n[r]=e[r];return n}function h(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else if("function"==typeof e.addEventListener)e.addEventListener(t,function i(o){r.once&&e.removeEventListener(t,i),n(o)});else throw TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||i(e))throw RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),o.init=function(){(void 0===this._events||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return l(this)},o.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var s,a=Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var l=o[e];if(void 0===l)return!1;if("function"==typeof l)r(l,this,t);else for(var u=l.length,c=v(l,u),n=0;n<u;++n)r(c[n],this,t);return!0},o.prototype.addListener=function(e,t){return u(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return u(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,d(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,d(this,e,t)),this},o.prototype.removeListener=function(e,t){var n,r,i,o,s;if(a(t),void 0===(r=this._events)||void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit
vendor: 1,394 bytes, line 1
1("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0==arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0==arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},o.prototype.listeners=function(e){return p(this,e,!0)},o.prototype.rawListeners=function(e){return p(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):f.call(e,t)},o.prototype.listenerCount=f,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}}}]);

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.