webpackJsonpjwplayer([4],{132:function(t,e,i){var s,n;s=[i(137),i(55),i(115),i(308),i(309),i(307),i(59),i(2),i(6),i(1)],n=function(t,e,i,s,n,a,o,r,l,d){var c=r.noop,h={},u=function(u,p){function g(){return!d.isUndefined(u._instreamAdapter)}function m(t,e){o.log("send command",t,e);var i={command:t};void 0!==e&&(i.args=e),L.sendMessage(o.NS,i,c,function(t){o.log("error message",t),"Invalid namespace"===t.description&&x.stopCasting()})}function f(t){var e=o.available(t.availability);S(e)}function v(t,e){var i=JSON.parse(e);if(!i)throw"Message not proper JSON";if(i.reconcile){k.removeMessageListener(o.NS,this.listenForHandshakeHandler);var s=i.diff,n=k;s.id&&i.appid&&i.pageUrl||(s.id=window.jwplayer().id,i.appid=A.appid,i.pageUrl=P,k=L=null),s.id===p.get("id")&&i.appid===A.appid&&i.pageUrl===P&&(L||(g()&&u.instreamDestroy(),this.sessionStarted(n),this.castModel.set("state",l.IDLE)),this.handleMessage(i)),k=null}}function S(t){var e=!!t;N.available!==e&&(N.available=e,p.set("castAvailable",e))}function y(){return L&&L.receiver?L.receiver.friendlyName:""}function C(t){o.log("Cast Session Error:",t,L);var e=window.chrome;t.code!==e.cast.ErrorCode.CANCEL&&(o.log("Cast Session Error:",t,L),t.code===e.cast.ErrorCode.SESSION_ERROR&&this.stopCasting())}function E(t){var e=window.chrome;t.code!==e.cast.ErrorCode.CANCEL&&(o.log("Cast Session Error:",t,L),t.code===e.cast.ErrorCode.SESSION_ERROR&&this.stopCasting())}function M(t){t/=100,t=Math.max(0,Math.min(t,1)),L.setReceiverVolumeLevel(t,x.mirrorVolume.bind(x),function(t){o.error("set volume error",t)})}function w(t){L.setReceiverMuted(t,x.mirrorVolume.bind(x),function(t){o.error("set muted error",t)})}function b(t,e){function i(t){return function(){e.sendCommand(t)}}return{getContainer:function(){return document.createElement("div")},on:c,onAdPlay:c,onAdSkipped:c,onAdComplete:c,onAdError:c,onCaptionsList:c,onCaptionsChange:c,onPlaylistItem:c,onPlaylistComplete:c,onError:c,onResize:c,onReady:c,onFullscreen:c,getState:c,castToggle:c,setFullscreen:c,setVolume:M,setMute:function(){w(!t.get("mute"))},play:e.play.bind(e),pause:e.pause.bind(e),seek:e.seek.bind(e),playlistNext:i("next"),playlistPrev:i("prev"),load:e.load.bind(e)}}var A,L=null,N={available:!1,active:!1,deviceName:""},P=r.getAbsolutePath(window.location.href),R=null,k=null,I=null;A=d.extend({},h,p.get("cast"));var x=this;this.onExistingSession=function(t){o.log("existing session",t),L||k||(k=t.session,k.addMessageListener(o.NS,this.listenForHandshakeHandler))},this.setActive=function(t){N.active=!!t,N.deviceName=y(),this.castModel.set("castActive",!!t),this.castModel.set("deviceName",y()),this.castModel.set("castState",N)},this.startCasting=function(){if(!L&&!g()){var t=window.chrome;t.cast.requestSession(this.sessionStarted.bind(this),C)}},this.openExtension=function(){if(!g()){var t=window.chrome;t.cast.requestSession(this.sessionStarted.bind(this),E)}},this.stopCasting=function(){return L?(this.removeSessionListeners(),void L.stop(this.sessionStopped.bind(this),this.sessionStopError.bind(this))):void this.sessionStopped()},this.resumePlayback=function(){u.showView(u._view.element()),u.getProvider().name.indexOf("flash")>=0&&p.resetProvider(),u.load(this.castModel.get("item")),u.play()},this.sessionStopError=function(t){o.error("Cast Session Stop error:",t,L),this.sessionStopped()},this.sessionStarted=function(t){if(o.log("Session started:",t),L)this.stopCasting(),I=t;else if(L=t,L.addMessageListener(o.NS,this.onMessageHandler),L.addUpdateListener(this.sessionStatusHandler),this.setupControllerForCasting(),t!==k){var e=a.setupCastConfig(this.castModel,A);R.setup(e),s.sendDummyMedia(t)}},this.sessionStatus=function(t){o.log("Cast Session status",t),t?this.mirrorVolume():(this.castModel.set("state",l.BUFFERING),this.sessionStopped())},this.sessionStopped=function(){o.log("_sessionStopped"),L&&(this.removeSessionListeners(),L=null),R&&(R.destroy(),R=null),this.setActive(!1),null!==I&&(this.sessionStarted(I),I=null),this.resumePlayback()},this.removeSessionListeners=function(){L.removeUpdateListener(this.sessionStatusHandler),L.removeMessageListener(o.NS,this.onMessageHandler)},this.onMessage=function(t,e){var i=JSON.parse(e);if(!i)throw"Message not proper JSON";this.handleMessage(i)},this.handleMessage=function(t){switch(t.type){case"state":this.handleMessageState(t);break;case"ad":this.handleMessageAd(t);break;case"connection":this.handleMessageConnection(t);break;default:o.error("received unhandled message",t.type,t)}},this.handleMessageState=function(t){this.castModel.get("castAdPlaying")&&(t.diff.newstate||t.diff.position)&&this.castModel.set("castAdPlaying",!1),R.updateState(t.diff)},this.handleMessageAd=function(t){this.castModel.set("castAdPlaying",!0),R.updateState(t.diff)},this.handleMessageConnection=function(t){t.closed===!0&&this.stopCasting()},this.mirrorVolume=function(){if(L&&L.receiver){var t=L.receiver.volume;if(t){var e=100*t.level|0,i=!!t.muted;this.castModel.set("mute",i),this.castModel.set("volume",e)}}},this.castToggle=function(){N.active?this.openExtension():this.startCasting()},this.setupControllerForCasting=function(){u.pause(),u.setFullscreen(!1);var s=d.extend(d.pick(p.getConfiguration(),["id","key","edition","playlist","playlistItem","containerWidth","containerHeight","width","height","aspectratio","stretching","compactUI","skin"]),{castAvailable:!0,item:0,state:"playing"}),a=new i(s);a.playlist=d.filter(d.map(a.playlist,function(t){return r=d.extend({},t),r.sources=d.filter(t.allSources,function(t){return"dash"!==t.type}),r}),function(t){return 0!==t.sources.length});var o=new e;this.castModel=o,o.setup(a);var r=o.get("playlist")[0];o.set("playlistItem",r),o.trigger("itemReady",r),o.changeVideoProvider(n),R=o.getVideo(),R.init(m,this.castModel);var l=b(o,R);l.castToggle=function(){this.openExtension()}.bind(this);var c=new t(l,o);c.setup(),u.showView(c.element()),this.mirrorVolume(),this.setActive(!0)},this.onExistingSessionHandler=this.onExistingSession.bind(this),this.sessionStatusHandler=this.sessionStatus.bind(this),this.onMessageHandler=this.onMessage.bind(this),this.listenForHandshakeHandler=v.bind(this),!A.appid||window.cast&&window.cast.receiver||(s.on("availability",f),s.on("session",this.onExistingSessionHandler),s.initialize(A.appid))};return u}.apply(e,s),!(void 0!==n&&(t.exports=n))},237:function(t,e,i){var s=i(15);t.exports=(s["default"]||s).template({compiler:[7,">= 4.0.0"],main:function(t,e,i,s,n){var a=t.lambda,o=t.escapeExpression;return'