"use strict";(this.__LOADABLE_LOADED_CHUNKS__=this.__LOADABLE_LOADED_CHUNKS__||[]).push([[627],{732:(e,t,a)=>{a.d(t,{Z:()=>K});var n=a(7486),r=a(232),i=a(3924),o=a(5774),s=a(647),c=a(4015),d=a(2958),l=a(9173),u=a(6386),p=a(4079),Z=a(1620),h=a(513),m=a(6111),y=a(8976),f=a(4975),g=a(5905),b=a(6995),k=a(947),w=a(1325),v=a(6546),z=a(2302),T=a(4935),x=a(8458);function P(){return(0,x.BX)("svg",{fill:"none",height:"21",viewBox:"0 0 16 21",width:"16",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.tZ)("path",{d:"M7.99 4V1.21c0-.45-.54-.67-.85-.35L3.35 4.65c-.2.2-.2.51 0 .71l3.79 3.79a.5.5 0 0 0 .85-.35V6c3.73 0 6.68 3.42 5.86 7.29-.47 2.27-2.31 4.1-4.57 4.57-3.57.75-6.75-1.7-7.23-5.01a.984.984 0 0 0-.98-.85c-.6 0-1.08.53-1 1.13.62 4.39 4.8 7.64 9.53 6.72 3.12-.61 5.63-3.12 6.24-6.24C16.83 8.48 12.94 4 7.99 4z"}),(0,x.tZ)("path",{d:"M6.89 15h-.85v-3.26l-1.01.31v-.69l1.77-.63h.09V15zM8.65 10.74l-.25 2.17.67.16c.03-.03.06-.07.1-.09.02-.01.04-.023.06-.035a.664.664 0 0 1 .21-.085c.05-.01.12-.02.2-.02.11 0 .22.02.3.05.08.03.15.08.21.15.06.07.1.14.13.24.03.1.04.2.04.31 0 .11 0 .21-.03.31s-.07.18-.11.25a.487.487 0 0 1-.45.23.65.65 0 0 1-.42-.15c-.11-.09-.17-.23-.19-.41h-.84c0 .2.05.38.13.53.08.15.18.29.32.39.14.1.29.19.46.24.17.05.35.08.53.08.25 0 .46-.05.64-.12.18-.07.33-.18.45-.31s.21-.28.27-.45c.06-.17.09-.35.09-.54 0-.22-.04-.42-.09-.6-.05-.18-.14-.33-.25-.45-.11-.12-.25-.21-.41-.28a1.349 1.349 0 0 0-.75-.08c-.06.01-.12.03-.18.04-.06.01-.11.03-.15.05a.586.586 0 0 1-.049.021c-.022.01-.043.017-.06.029l.11-.92h1.7v-.71H8.65z"})]})}var S=a(2476),C=a(5710),H=a(7201);const I=(0,S.Z)(C.Z,{target:"e1as1ua70"})((({sizeToHide:e})=>({[(0,H.Z)(`${e}`)]:{display:"none"},[(0,H.Z)([p.Z.max.height[99],p.Z.max.width[420]])]:{display:"none"}})),"");function B({onClick:e,sizeToHide:t}){return(0,x.tZ)(I,{"aria-label":"Skip back 30 seconds","data-test":"skip-back-button",onClick:e,sizeToHide:t,type:"button",children:(0,x.tZ)(P,{})})}function M(){return(0,x.BX)("svg",{fill:"none",height:"20",viewBox:"0 0 16 20",width:"16",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.tZ)("path",{d:"M14.92 12c-.5 0-.91.37-.98.86a6.006 6.006 0 0 1-7.42 4.96c-2.25-.54-3.91-2.27-4.39-4.53A6.014 6.014 0 0 1 8 6v2.79c0 .45.54.67.85.35l3.79-3.79c.2-.2.2-.51 0-.71L8.85.85a.5.5 0 0 0-.85.36V4C3.06 4-.84 8.48.16 13.6c.6 3.11 2.9 5.5 5.99 6.19 4.83 1.08 9.15-2.2 9.77-6.67.09-.59-.4-1.12-1-1.12z"}),(0,x.tZ)("path",{d:"M6.432 14.297a.621.621 0 0 1-.312.082l-.05.001a.69.69 0 0 1-.506-.204.548.548 0 0 1-.124-.336h-.85c0 .21.04.39.12.55.08.16.19.28.33.38.14.1.29.18.46.23.17.05.35.07.53.07.21 0 .41-.03.6-.08s.34-.14.48-.24c.14-.1.24-.24.32-.39.08-.15.12-.33.12-.53 0-.23-.06-.44-.18-.61-.12-.17-.3-.3-.54-.39a2.91 2.91 0 0 0 .14-.073.857.857 0 0 0 .14-.097c.034-.03.066-.06.096-.09a.78.78 0 0 0 .104-.13l.027-.043.023-.038a1.14 1.14 0 0 0 .08-.169c.03-.09.04-.18.04-.27 0-.2-.04-.37-.11-.53a.942.942 0 0 0-.3-.38c-.13-.1-.28-.18-.46-.23-.18-.05-.37-.08-.59-.08-.19 0-.38.03-.54.08-.16.05-.32.13-.44.23s-.23.22-.3.37c-.07.15-.11.3-.11.48h.85a.455.455 0 0 1 .17-.35c.05-.04.11-.07.18-.1a.342.342 0 0 1 .087-.024c.043-.006.086-.006.133-.006.03 0 .057 0 .083.003a.518.518 0 0 1 .167.037c.07.03.13.06.18.11.05.05.08.11.11.17.03.06.04.14.04.22 0 .18-.05.32-.16.43-.11.11-.26.16-.48.16h-.43v.66h.45c.11 0 .2.01.29.04.09.03.16.06.22.11s.11.12.14.2c.03.08.05.18.05.29 0 .09-.01.17-.04.24a.427.427 0 0 1-.088.123l-.042.047a.766.766 0 0 1-.108.077z"}),(0,x.tZ)("path",{clipRule:"evenodd",d:"M9.85 10.68c.22 0 .41.03.59.1s.33.18.46.33c.13.15.23.35.3.57.07.22.11.5.11.82v.74c0 .32-.03.59-.1.82-.07.23-.17.42-.29.57-.12.15-.27.26-.45.33s-.37.1-.59.1c-.22 0-.41-.03-.59-.1s-.33-.18-.46-.33c-.13-.15-.23-.35-.3-.57-.07-.22-.11-.5-.11-.82v-.74c0-.32.04-.59.1-.82.06-.23.17-.42.29-.57.12-.15.27-.26.45-.33s.37-.1.59-.1zm.56 3.15c.03-.13.04-.29.04-.48h.01v-.97c0-.135-.005-.256-.019-.36a1.28 1.28 0 0 0-.02-.12 1 1 0 0 0-.121-.31.435.435 0 0 0-.19-.17.654.654 0 0 0-.5 0c-.08.03-.13.09-.19.17-.06.08-.09.18-.12.31s-.04.29-.04.48v.97c0 .19.01.35.04.48s.07.24.12.32c.05.08.12.14.19.17a.656.656 0 0 0 .5 0c.08-.03.14-.09.19-.17.05-.08.08-.19.11-.32z",fillRule:"evenodd"})]})}const E=(0,S.Z)(C.Z,{target:"ed65rzx0"})((({sizeToHide:e})=>({[(0,H.Z)(`${e}`)]:{display:"none"},[(0,H.Z)([p.Z.max.height[99],p.Z.max.width[420]])]:{display:"none"}})),"");function N({onClick:e,sizeToHide:t}){return(0,x.tZ)(E,{"aria-label":"Skip forward 30 seconds","data-test":"skip-forward-button",onClick:e,sizeToHide:t,type:"button",children:(0,x.tZ)(M,{})})}const $=(0,S.Z)(C.Z,{target:"e325f0t0"})((({sizeToHide:e})=>({[(0,H.Z)(`${e}`)]:{display:"none"},[(0,H.Z)([p.Z.max.height[99],p.Z.max.width[420]])]:{display:"none"}})),"");var U=a(6832);const _=[1,1.25,1.5,2],L=function({onClick:e,sizeToHide:t}){const[a,n]=(0,U.useState)(0);return(0,x.tZ)($,{"aria-label":"Playback speed","data-test":"speed-button",onClick:()=>{const t=((a+1)%(r=_.length)+r)%r;var r;n(t),e(_[t])},sizeToHide:t,type:"button",children:`${_[a]}x`})};var O=a(3775),V=a(8914),R=a.n(V),D=a(2314),A=a(1730),F=a(6975),X=a(7089),j=a(6040),q=a(6260),Q=a(3533);function W(){return W=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var r;n!==ye.current&&(ye.current=n,me.current=(0,j.xv)(W({},a,{episodeId:H,playedFrom:n,podcastId:X}))),ge?(ie.track(o.Z.Pause),null==t||t.track(o.Z.Pause,me.current),null==t||t.track(o.Z.StreamEnd,(0,j.qz)(me.current,{endReason:i.Z.PAUSE,listenTime:Math.round(null!=(r=null==fe?void 0:fe.position)?r:0)}))):(null==t||t.track(o.Z.Play,me.current),pe(Date.now()),ie.track(o.Z.Play,we)),le(!0),oe(X,{streamUrlQuery:V,trackId:H})};G&&(G.methodTypes.current=W({},G.methodTypes.current,{isUnrestricted:!0}),G.mute.current=()=>{f.Z.mute(),ie.track(o.Z.Mute)},G.pause.current=Pe,G.play.current=Pe,G.setCurrentTime.current=(e,t)=>{fe.duration&&f.Z.seek(t)},G.setLoop.current=(e,t)=>{"boolean"!=typeof t&&"true"!==t&&"false"!==t||f.Z.setLoop(t&&"false"!==t)},G.setVolume.current=(e,t)=>{f.Z.setVolume(parseInt(t,10))},G.unmute.current=()=>{f.Z.unmute(),ie.track(o.Z.Unmute,{isPlaying:ge})}),(0,A.Z)((()=>{P&&Pe()}));const Se=(0,U.useRef)(!1);(0,U.useEffect)((()=>{if(V){const{position:e=0}=V;!Se.current&&Number(e)>0&&fe.duration&&(f.Z.seek(Number(e)),Se.current=!0)}}),[fe,V]);const Ce=(0,Q.H)((()=>ce(X,V)),(()=>he(!0)));return(0,U.useEffect)((()=>{se===b.ZP.Complete&&Ce()}),[se]),(0,U.useEffect)((()=>{se===b.ZP.Playing&&ue&&(null==t||t.track(o.Z.StreamStart,(0,j.qz)(me.current,{playbackStartTime:Date.now(),streamInitTime:ue})),pe(0),ie.track(o.Z.StreamStart,we))}),[se,ue]),(0,U.useEffect)((()=>{if(_){const e=[b.rO.AccessDenied,b.rO.NetworkError].includes(se);null==t||t.track(o.Z.PlaybackError,(0,j.qz)(me.current,{errorMessage:M(se),errorType:e?"network_error":"playback_failure"}))}}),[_]),_&&Ze?(0,x.tZ)(Z.Z,{error:se}):(0,x.BX)("div",{children:[(0,x.BX)(g.Z,{positionBottom:Y,children:[(0,x.tZ)(k.Z,{notYetInteractedWith:!ge&&!be&&!ke,supportMobileView:ae}),(0,x.BX)(O.Z,{children:[(0,x.BX)(l.Z,{children:[(0,x.tZ)(m.Z,{"data-test":"play-button-wrapper",notYetInteractedWith:!ge&&!be&&!ke,supportMobileView:ae,children:(0,x.tZ)(h.Z,{isLoading:be||ke,isPlaying:ge||be||ke,onClick:Pe})}),(0,x.tZ)(T.Z,{shouldShow:E||de,children:(0,x.BX)(u.Z,{children:[(0,x.tZ)(B,{onClick:()=>{fe.duration&&(f.Z.seek(Math.max(fe.position-15,0)),t&&t.track(o.Z.Back15,me.current))},sizeToHide:p.Z.max.width[149]}),(0,x.tZ)(N,{onClick:()=>{fe.duration&&(f.Z.seek(Math.min(fe.duration,fe.position+30)),t&&t.track(o.Z.Forward30,me.current))},sizeToHide:p.Z.max.width[149]}),(0,x.tZ)(L,{onClick:async e=>{const a=await f.Z.getPlaybackRate();f.Z.setPlaybackRate(e),t&&t.track(o.Z.SpeedChange,W({},me.current,{speedChange:{newPlaybackSpeed:e,oldPlaybackSpeed:a}}))},sizeToHide:p.Z.max.width[199]})]})})]}),(0,x.BX)(w.Z,{children:[(0,x.tZ)(c.Z,{onClick:ze,sizeToHide:p.Z.max.width[400]}),(0,x.tZ)(v.Z,{onClick:()=>{t&&t.trackPageView((0,j.BS)({name:a.name,pageName:"share",podcastId:X})),xe()},sizeToHide:p.Z.max.width[299]}),$&&(0,x.tZ)(s.Z,{"data-test":"thumbnail-link",href:K,children:(0,x.tZ)(r.Z,{alt:ne,src:(0,n.Z)($),supportMobileView:ae})})]})]})]}),Te,ve]})}))},6040:(e,t,a)=>{function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;tr,jv:()=>s,qz:()=>o,xv:()=>i})},4265:(e,t,a)=>{a.d(t,{c:()=>o});var n=a(8684),r=a(2940),i=a(7770);async function o({ampUrl:e="",logger:t=n.Z,podcastId:a,transport:o}){if(!a){const e=new i.Z(400,"Failed to fetch podcast info, podcast id missing.");throw t.error(n.K.SERVER,e.message,{},e),e}const[s,c]=r.Z`${{ampUrl:e}}/api/v3/podcast/podcasts/${{podcastId:String(a)}}`,{data:d}=await o.get(s,{params:{requestName:c}});return d}},4015:(e,t,a)=>{a.d(t,{Z:()=>l});var n=a(8458);function r(){return(0,n.tZ)("svg",{fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:(0,n.tZ)("path",{d:"M10 0C4.48 0 0 4.48 0 10s4.48 10 10 10 10-4.48 10-10S15.52 0 10 0zm0 15c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1s1 .45 1 1v4c0 .55-.45 1-1 1zm1-8H9V5h2v2z"})})}var i=a(2476),o=a(5710),s=a(4079),c=a(7201);const d=(0,i.Z)(o.Z,{target:"e1at04el0"})((({sizeToHide:e})=>({paddingTop:"0.3rem",[(0,c.Z)(`${e}`)]:{display:"none"},[(0,c.Z)(s.Z.max.height[99],s.Z.max.width[420])]:{display:"none"}})),"");function l({onClick:e,sizeToHide:t}){return(0,n.tZ)(d,{"aria-label":"Information","data-test":"info-button",onClick:e,sizeToHide:t,type:"button",children:(0,n.tZ)(r,{})})}}}]); //# sourceMappingURL=627.widget.js.map