s=__("Playing:","jetpack"));consti=o[a];returni?(0,n.jsxs)("span",{className:`${r}${r}--${a}`,children:[(0,n.jsx)("span",{className:"jetpack-podcast-player--visually-hidden",children:`${s}`}),i]}):(0,n.jsx)("span",{className:r})})},27391:(e,t,r)=>{"use strict";vars=r(47143),a=r(15330),o=r(10186);if(void0!==s.createReduxStore){conste=(0,s.createReduxStore)(a.ax,o.A);(0,s.register)(e)}else(0,s.registerStore)(a.ax,o.A)},27723:e=>{"use strict";e.exports=window.wp.i18n},29491:e=>{"use strict";e.exports=window.wp.compose},35211:(e,t,r)=>{"use strict";r.d(t,{A:()=>g});vars=r(20195),a=r(29491),o=r(47143),n=r(86087),i=r(27723),c=r(13022),l=r(14140),d=r(15330),u=r(3769),p=r(16544),h=r(19691),m=r(90209),y=r(10790);const__=i.__;classfextendsn.Component{state={currentTrack:0,hasUserInteraction:!1};recordUserInteraction=()=>{this.state.hasUserInteraction||this.setState({hasUserInteraction:!0})};selectTrack=e=>{const{currentTrack:t}=this.state;if(t===e)returnthis.recordUserInteraction(),voidthis.props.toggleMediaSource(this.props.playerId);-1!==t&&this.props.pauseMediaSource(this.props.playerId),this.loadAndPlay(e)};loadTrack=e=>{constt=this.getTrack(e);if(!t)return!1;this.state.currentTrack!==e&&this.setState({currentTrack:e});const{title:r,link:a,description:o}=t;returnthis.props.updateMediaSourceData(this.props.playerId,{title:r,link:a}),(0,s.speak)(/* translators: %s is the track title. It describes the current state of the track as "Loading: [track title]". */
`${(0,i.sprintf)(__("Loading: %s","jetpack"),r)}${o}`,"assertive"),!0};loadAndPlay=e=>{this.recordUserInteraction(),this.loadTrack(e)&&this.props.playMediaSource(this.props.playerId)};getTrack=e=>this.props.tracks[e];handleError=e=>{if(!this.state.hasUserInteraction){constt=window.navigator.userAgent.match(/Trident\/7\./)?"IE11: Playing sounds in webpages setting is not checked":e;this.setState(()=>{thrownewError(t)})}this.props.errorMediaSource(this.props.playerId),(0,s.speak)(`${__("Error: Episode unavailable - Open in a new tab","jetpack")}`,"assertive")};handlePlay=()=>{this.props.playMediaSource(this.props.playerId),this.setState({hasUserInteraction:!0})};handlePause=()=>{this.props.pauseMediaSource(this.props.playerId),this.props.playerState!==d.pF&&this.props.pauseMediaSource(this.props.playerId)};handleTimeChange=e=>{this.props.setMediaSourceCurrentTime(this.props.playerId,e)};handleJump=()=>{this.props.setMediaSourceCurrentTime(this.props.playerId,this.props.currentTime-5)};handleSkip=()=>{this.props.setMediaSourceCurrentTime(this.props.playerId,this.props.currentTime+30)};updateMediaData=e=>{this.props.updateMediaSourceData(this.props.playerId,{duration:e.target?.duration,domId:e.target?.id})};registerPlayer(){conste=this.getTrack(this.state.currentTrack)||{},{playerId:t}=this.props;this.props.registerMediaSource(t,{title:e.title,link:e.link,state:d.vh}),this.props.setDefaultMediaSource(t)}componentDidMount(){this.props.playerId&&this.registerPlayer()}componentWillUnmount(){this.props.playerId&&this.props.unregisterMediaSource(this.props.playerId)}componentDidUpdate(e){constt=e=>e?.length?e.map(e=>e.guid):[],r=t(this.props.tracks),s=newSet(t(e.tracks));r.length===s.size&&r.every(e=>s.has(e))||this.loadTrack(0)}staticgetDerivedStateFromProps(e,t){returne.tracks.length<=t.currentTrack?{...t,currentTrack:0}:null}render(){const{playerId:e,title:t,link:r,cover:s,tracks:a,attributes:o,currentTime:n,playerState:d}=this.props,{itemsToShow:m,primaryColor:f,customPrimaryColor:g,hexPrimaryColor:k,secondaryColor:C,customSecondaryColor:v,hexSecondaryColor:E,backgroundColor:w,customBackgroundColor:S,hexBackgroundColor:j,showCoverArt:_,showEpisodeTitle:b,showEpisodeDescription:M}=o,{currentTrack:T}=this.state,A=a.slice(0,m),x=this.getTrack(T),F=(0,u.GU)({primaryColor:f,customPrimaryColor:g,secondaryColor:C,customSecondaryColor:v,backgroundColor:w,customBackgroundColor:S}),I={color:v,backgroundColor:S,"--jetpack-podcast-player-primary":k,"--jetpack-podcast-player-secondary":E,"--jetpack-podcast-player-background":j},P=(0,c.A)("jetpack-podcast-player",d,F.secondary.classes,F.background.classes);return(0,y.jsxs)("section",{className:P,style:I,"aria-labelledby":t||x&&x.title?`${e}__title`:void0,"aria-describedby":x&&x.description?`${e}__track-description`:void0,"data-jetpack-iframe-ignore":!0,children:[(0,y.jsx)(p.A,{playerId:e,title:t,link:r,cover:s,track:this.getTrack(T),showCoverArt:_,showEpisodeTitle:b,showEpisodeDescription:M,colors:F,children:(0,y.jsx)(l.A,{onJumpBack:this.handleJump,onSkipForward:this.handleSkip,trackSource:this.getTrack(T).src,onPlay:this.handlePlay,onPause:this.handlePause,onError:this.handleError,playStatus:d,currentTime:n,onTimeChange:this.handleTimeChange,onMetadataLoaded:this.updateMediaData})}),A.length>1&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)("h4",{id:`jetpack-podcast-player__tracklist-title--${e}`,className:"jetpack-podcast-player--visually-hidden",children:(0,i.sprintf)(
// translators: %s is the track title.
__("Playlist: %s","jetpack"),t)}),(0,y.jsx)("p",{id:`jetpack-podcast-player__tracklist-description--${e}`,className:"jetpack-podcast-player--visually-hidden",children:__("Select an episode to play it in the audio player.","jetpack")}),(0,y.jsx)(h.A,{playerId:e,playerState:d,currentTrack:T,tracks:A,selectTrack:this.selectTrack,colors:F})]})]})}}f.defaultProps={title:"",cover:"",link:"",attributes:{url:null,itemsToShow:5,showCoverArt:!0,showEpisodeTitle:!0,showEpisodeDescription:!0},tracks:[]};constg=(0,a.compose)([m.A,(0,o.withSelect)((e,t)=>{const{playerId:r}=t,{getMediaSourceCurrentTime:s,getMediaPlayerState:a}=e(d.ax);return{currentTime:s(r),playerState:a(r)}}),(0,o.withDispatch)(e=>{const{registerMediaSource:t,updateMediaSourceData:r,unregisterMediaSource:s,setDefaultMediaSource:a,playMediaSource:o,pauseMediaSource:n,toggleMediaSource:i,errorMediaSource:c,setMediaSourceCurrentTime:l}=e(d.ax);return{registerMediaSource:t,updateMediaSourceData:r,unregisterMediaSource:s,setDefaultMediaSource:a,playMediaSource:o,pauseMediaSource:n,toggleMediaSource:i,errorMediaSource:c,setMediaSourceCurrentTime:l}})])(f)},44997:e=>{vart=1e3,r=60*t,s=60*r,a=24*s,o=7*a,n=365.25*a;functioni(e,t,r,s){vara=t>=1.5*r;returnMath.round(e/r)+" "+s+(a?"s":"")}e.exports=function(e,c){c=c||{};varl=typeofe;if("string"===l&&e.length>0)returnfunction(e){if((e=String(e)).length>100)return;vari=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!i)return;varc=parseFloat(i[1]);switch((i[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":returnc*n;case"weeks":case"week":case"w":returnc*o;case"days":case"day":case"d":returnc*a;case"hours":case"hour":case"hrs":case"hr":case"h":returnc*s;case"minutes":case"minute":case"mins":case"min":case"m":returnc*r;case"seconds":case"second":case"secs":case"sec":case"s":returnc*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":returnc;default:return}}(e);if("number"===l&&isFinite(e))returnc.long?function(e){varo=Math.abs(e);if(o>=a)returni(e,o,a,"day");if(o>=s)returni(e,o,s,"hour");if(o>=r)returni(e,o,r,"minute");if(o>=t)returni(e,o,t,"second");returne+" ms"}(e):function(e){varo=Math.abs(e);if(o>=a)returnMath.round(e/a)+"d";if(o>=s)returnMath.round(e/s)+"h";if(o>=r)returnMath.round(e/r)+"m";if(o>=t)returnMath.round(e/t)+"s";returne+"ms"}(e);thrownewError("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},47143:e=>{"use strict";e.exports=window.wp.data},50933:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});vars=r(5573),a=r(10790);consto=(0,a.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(s.Path,{d:"M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"})})},56697:(e,t,r)=>{e.exports=function(e){functiont(e){letr,a,o,n=null;functioni(...e){if(!i.enabled)return;consts=i,a=Number(newDate),o=a-(r||a);s.diff=o,s.prev=r,s.curr=a,r=a,e[0]=t.coerce(e[0]),"string"!=typeofe[0]&&e.unshift("%O");letn=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(r,a)=>{if("%%"===r)return"%";n++;consto=t.formatters[a];if("function"==typeofo){constt=e[n];r=o.call(s,t),e.splice(n,1),n--}returnr}),t.formatArgs.call(s,e);(s.log||t.log).apply(s,e)}returni.namespace=e,i.useColors=t.useColors(),i.color=t.selectColor(e),i.extend=s,i.destroy=t.destroy,Object.defineProperty(i,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==n?n:(a!==t.namespaces&&(a=t.namespaces,o=t.enabled(e)),o),set:e=>{n=e}}),"function"==typeoft.init&&t.init(i),i}functions(e,r){consts=t(this.namespace+(void0===r?":":r)+e);returns.log=this.log,s}functiona(e,t){letr=0,s=0,a=-1,o=0;for(;r<e.length;)if(s<t.length&&(t[s]===e[r]||"*"===t[s]))"*"===t[s]?(a=s,o=r,s++):(r++,s++);else{if(-1===a)return!1;s=a+1,o++,r=o}for(;s<t.length&&"*"===t[s];)s++;returns===t.le
__("%s:","jetpack"),t)}`}),__("Open in a new tab","jetpack")]})})]}))},74993:(e,t,r)=>{"object"==typeof window&&window.Jetpack_Block_Assets_Base_Url&&(r.p=window.Jetpack_Block_Assets_Base_Url)},86087:e=>{"use strict";e.exports=window.wp.element},86954:e=>{function t(e,t=100,r={}){if("function"!=typeof e)throw new TypeError(`Expectedthefirstparametertobeafunction,got\`${typeofe}\`.`);if(t<0)thrownewRangeError("`wait` must not be negative.");const{immediate:s}="boolean"==typeofr?{immediate:r}:r;leta,o,n,i,c;functionl(){constt=a,r=o;returna=void0,o=void0,c=e.apply(t,r),c}functiond(){conste=Date.now()-i;e<t&&e>=0?n=setTimeout(d,t-e):(n=void0,s||(c=l()))}constu=function(...e){if(a&&this!==a&&Object.getPrototypeOf(this)===Object.getPrototypeOf(a))thrownewError("Debounced method called with different contexts of the same prototype.");a=this,o=e,i=Date.now();constr=s&&!n;returnn||(n=setTimeout(d,t)),r&&(c=l()),c};returnObject.defineProperty(u,"isPending",{get:()=>void0!==n}),u.clear=()=>{n&&(clearTimeout(n),n=void0)},u.flush=()=>{n&&u.trigger()},u.trigger=()=>{c=l(),u.clear()},u}e.exports.debounce=t,e.exports=t},90209:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});vars=r(86087),a=r(27723),o=r(10790);const__=a.__;functionn(e){classtextendss.Component{state={didError:!1,isIE11AudioIssue:!1};componentDidCatch=(e,t)=>{this.props.onError(e,t)};staticgetDerivedStateFromError=e=>({didError:!0,isIE11AudioIssue:!!e.message.match(/IE11/)});render(){const{didError:t,isIE11AudioIssue:r}=this.state;returnt?(0,o.jsx)("section",{className:"jetpack-podcast-player",children:(0,o.jsx)("p",{className:"jetpack-podcast-player__error",children:r?__('The podcast player cannot be displayed as your browser settings do not allow for sounds to be played in webpages. This can be changed in your browser’s "Internet options" settings. In the "Advanced" tab you will have to check the box next to "Play sounds in webpages" in the "Multimedia" section. Once you have confirmed that the box is checked, please press "Apply" and then reload this page.',"jetpack"):__("An unexpected error occurred within the Podcast Player. Reloading this page might fix the problem.","jetpack",0)})}):(0,o.jsx)(e,{...this.props})}}returnt.defaultProps={onError:()=>{}},t}}},t={};functionr(s){vara=t[s];if(void0!==a)returna.exports;varo=t[s]={exports:{}};returne[s](o,o.exports,r),o.exports}r.n=e=>{vart=e&&e.__esModule?()=>e.default:()=>e;returnr.d(t,{a:t}),t},r.d=(e,t)=>{for(varsint)r.o(t,s)&&!r.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},r.g=function(){if("object"==typeofglobalThis)returnglobalThis;try{returnthis||newFunction("return this")()}catch(e){if("object"==typeofwindow)returnwindow}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeofSymbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{vare;r.g.importScripts&&(e=r.g.location+"");vart=r.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){vars=t.getElementsByTagName("script");if(s.length)for(vara=s.length-1;a>-1&&(!e||!/^http(s?):/.test(e));)e=s[a--].src}if(!e)thrownewError("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e+"../"})(),(()=>{"use strict";r(74993)})(),(()=>{"use strict";vare=r(86087),t=r(68902),s=r.n(t),a=(r(27391),r(35211));consto=s()("jetpack:podcast-player"),n={},i=function(e){e.classList.add("is-default"),e.setAttribute("data-jetpack-block-initialized","true")};document.addEventListener("DOMContentLoaded",()=>{document.querySelectorAll(".wp-block-jetpack-podcast-player:not([data-jetpack-block-initialized])").forEach(t=>{t.classList.remove("is-default"),function(t){constr=document.getElementById(t);if(o("initializing",t,r),!r)return;if("true"===r.getAttribute("data-jetpack-block-initialized"))return;consts=r.querySelector('script[type="application/jso