(function(){"use strict";var videojs=null;if(typeof window.videojs==="undefined"&&typeof require==="function"){videojs=require("video.js")}else{videojs=window.videojs}(function(window,videojs){var defaults={},videoJsResolutionSwitcher,currentResolution={},menuItemsHolder={};function setSourcesSanitized(player,sources,label,customSourcePicker){currentResolution={label:label,sources:sources};if(typeof customSourcePicker==="function"){return customSourcePicker(player,sources,label)}return player.src(sources.map(function(src){return{src:src.src,type:src.type,res:src.res}}))}var MenuItem=videojs.getComponent("MenuItem");var ResolutionMenuItem=videojs.extend(MenuItem,{constructor:function(player,options,onClickListener,label){this.onClickListener=onClickListener;this.label=label;MenuItem.call(this,player,options);this.src=options.src;this.on("click",this.onClick);this.on("touchstart",this.onClick);if(options.initialySelected){this.showAsLabel();this.selected(true);this.addClass("vjs-selected")}},showAsLabel:function(){if(this.label){this.label.innerHTML=this.options_.label}},onClick:function(customSourcePicker){this.onClickListener(this);var currentTime=this.player_.currentTime();var isPaused=this.player_.paused();this.showAsLabel();this.addClass("vjs-selected");if(!isPaused){this.player_.bigPlayButton.hide()}if(typeof customSourcePicker!=="function"&&typeof this.options_.customSourcePicker==="function"){customSourcePicker=this.options_.customSourcePicker}var handleSeekEvent="loadeddata";if(this.player_.techName_!=="Youtube"&&this.player_.preload()==="none"&&this.player_.techName_!=="Flash"){handleSeekEvent="timeupdate"}setSourcesSanitized(this.player_,this.src,this.options_.label,customSourcePicker).one(handleSeekEvent,function(){this.player_.currentTime(currentTime);this.player_.handleTechSeeked_();if(!isPaused){this.player_.play().handleTechSeeked_()}this.player_.trigger("resolutionchange")})}});var MenuButton=videojs.getComponent("MenuButton");var ResolutionMenuButton=videojs.extend(MenuButton,{constructor:function(player,options,settings,label){this.sources=options.sources;this.label=label;this.label.innerHTML=options.initialySelectedLabel;MenuButton.call(this,player,options,settings);this.controlText("Quality");if(settings.dynamicLabel){this.el().appendChild(label)}else{var staticLabel=document.createElement("span");videojs.addClass(staticLabel,"vjs-resolution-button-staticlabel");this.el().appendChild(staticLabel)}},createItems:function(){var menuItems=[];var labels=this.sources&&this.sources.label||{};var onClickUnselectOthers=function(clickedItem){menuItems.map(function(item){item.selected(item===clickedItem);item.removeClass("vjs-selected")})};for(var key in labels){if(labels.hasOwnProperty(key)){menuItems.push(new ResolutionMenuItem(this.player_,{label:key,src:labels[key],initialySelected:key===this.options_.initialySelectedLabel,customSourcePicker:this.options_.customSourcePicker},onClickUnselectOthers,this.label));menuItemsHolder[key]=menuItems[menuItems.length-1]}}return menuItems}});videoJsResolutionSwitcher=function(options){var settings=videojs.mergeOptions(defaults,options),player=this,label=document.createElement("span"),groupedSrc={};videojs.addClass(label,"vjs-resolution-button-label");player.updateSrc=function(src){if(!src){return player.src()}if(player.controlBar.resolutionSwitcher){player.controlBar.resolutionSwitcher.dispose();delete player.controlBar.resolutionSwitcher}src=src.sort(compareResolutions);groupedSrc=bucketSources(src);var choosen=chooseSrc(groupedSrc,src);var menuButton=new ResolutionMenuButton(player,{sources:groupedSrc,initialySelectedLabel:choosen.label,initialySelectedRes:choosen.res,customSourcePicker:settings.customSourcePicker},settings,label);videojs.addClass(menuButton.el(),"vjs-resolution-button");player.controlBar.resolutionSwitcher=player.controlBar.el_.insertBefore(menuButton.el_,player.controlBar.getChild("fullscreenToggle").el_);player.controlBar.resolutionSwitcher.dispose=function(){this.parentNode.removeChild(this)};return setSourcesSanitized(player,choosen.sources,choosen.label)};player.currentResolution=function(label,customSourcePicker){if(label==null){return currentResolution}if(menuItemsHolder[label]!=null){menuItemsHolder[label].onClick(customSourcePicker)}return player};player.getGroupedSrc=function(){return groupedSrc};function compareResolutions(a,b){if(!a.res||!b.res){return 0}return+b.res-+a.res}function bucketSources(src){var resolutions={label:{},res:{},type:{}};src.map(function(source){initResolutionKey(resolutions,"label",source);initResolutionKey(resolutions,"res",source);initResolutionKey(resolutions,"type",source);appendSourceToKey(resolutions,"label",source);appendSourceToKey(resolutions,"res",source);appendSourceToKey(resolutions,"type",source)});return resolutions}function initResolutionKey(resolutions,key,source){if(resolutions[key][source[key]]==null){resolutions[key][source[key]]=[]}}function appendSourceToKey(resolutions,key,source){resolutions[key][source[key]].push(source)}function chooseSrc(groupedSrc,src){var selectedRes=settings["default"];var selectedLabel="";if(selectedRes==="high"){selectedRes=src[0].res;selectedLabel=src[0].label}else if(selectedRes==="low"||selectedRes==null||!groupedSrc.res[selectedRes]){selectedRes=src[src.length-1].res;selectedLabel=src[src.length-1].label}else if(groupedSrc.res[selectedRes]){selectedLabel=groupedSrc.res[selectedRes][0].label}return{res:selectedRes,label:selectedLabel,sources:groupedSrc.res[selectedRes]}}function initResolutionForYt(player){player.tech_.ytPlayer.setPlaybackQuality("default");player.tech_.ytPlayer.addEventListener("onPlaybackQualityChange",function(){player.trigger("resolutionchange")});player.one("play",function(){var qualities=player.tech_.ytPlayer.getAvailableQualityLevels();var _yts={highres:{res:1080,label:"1080",yt:"highres"},hd1080:{res:1080,label:"1080",yt:"hd1080"},hd720:{res:720,label:"720",yt:"hd720"},large:{res:480,label:"480",yt:"large"},medium:{res:360,label:"360",yt:"medium"},small:{res:240,label:"240",yt:"small"},tiny:{res:144,label:"144",yt:"tiny"},auto:{res:0,label:"auto",yt:"default"}};var _sources=[];qualities.map(function(q){_sources.push({src:player.src().src,type:player.src().type,label:_yts[q].label,res:_yts[q].res,_yt:_yts[q].yt})});groupedSrc=bucketSources(_sources);var _customSourcePicker=function(_player,_sources,_label){player.tech_.ytPlayer.setPlaybackQuality(_sources[0]._yt);return player};var choosen={label:"auto",res:0,sources:groupedSrc.label.auto};var menuButton=new ResolutionMenuButton(player,{sources:groupedSrc,initialySelectedLabel:choosen.label,initialySelectedRes:choosen.res,customSourcePicker:_customSourcePicker},settings,label);menuButton.el().classList.add("vjs-resolution-button");player.controlBar.resolutionSwitcher=player.controlBar.addChild(menuButton);$(".vjs-resolution-button").insertBefore(".vjs-fullscreen-control")})}player.ready(function(){if(player.options_.sources.length>1){player.updateSrc(player.options_.sources)}if(player.techName_==="Youtube"){initResolutionForYt(player)}})};videojs.plugin("videoJsResolutionSwitcher",videoJsResolutionSwitcher)})(window,videojs)})();(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.videojsWatermark=f()}})(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o=n&&i(this,e),this.contextmenu.current=null}}function r(e){var t=this.contextmenu.current;if(t){var n=e.touches[0],o=this.contextmenu.options.sensitivity;(n.screenX-t.screenX>o||n.screenY-t.screenY>o)&&(this.contextmenu.current=null)}}function c(e){if(!this.contextmenu.current){var t=e.touches[0];this.contextmenu.current={screenX:t.screenX,screenY:t.screenY,time:Number(new Date)}}}function s(e){this.contextmenu.options.cancel&&!this.contextmenu.options.disabled&&e.preventDefault(),i(this,e),this.off(["touchcancel","touchend"],u),this.off("touchmove",r),this.off("touchstart",c)}function f(e){var t=this;this.contextmenu.options=a.default.mergeOptions(h,e),this.contextmenu.VERSION="1.2.2",this.on("contextmenu",s),this.on(["touchcancel","touchend"],u),this.on("touchmove",r),this.on("touchstart",c),this.ready(function(){return t.addClass(p)})}Object.defineProperty(n,"__esModule",{value:!0});var d="undefined"!=typeof window?window.videojs:"undefined"!=typeof e?e.videojs:null,a=o(d),l=a.default.registerPlugin||a.default.plugin,h={cancel:!0,sensitivity:10,wait:500,disabled:!1},p="vjs-contextmenu";l("contextmenu",f),f.VERSION="1.2.2",n.default=f,t.exports=n.default}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)});!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.videojsContextmenuUi=e()}}(function(){return function e(t,n,o){function i(r,f){if(!n[r]){if(!t[r]){var l="function"==typeof require&&require;if(!f&&l)return l(r,!0);if(u)return u(r,!0);var d=new Error("Cannot find module '"+r+"'");throw d.code="MODULE_NOT_FOUND",d}var a=n[r]={exports:{}};t[r][0].call(a.exports,function(e){var n=t[r][1][e];return i(n?n:e)},a,a.exports,e,t,n,o)}return n[r].exports}for(var u="function"==typeof require&&require,r=0;r7?7:sugs.length-1;var _a;var _img;_aside.className="vjs-suggested-video-endcap";_div.className="vjs-suggested-video-endcap-container";_header.innerHTML=opts.header;_header.className="vjs-suggested-video-endcap-header";_aside.appendChild(_header);for(;i>=0;--i){_a=document.createElement("a");_a.className="vjs-suggested-video-endcap-link";_a.href=sugs[i].url;_a.target=sugs[i].target||"_self";_a.title=sugs[i].title;_img=document.createElement("img");_img.className="vjs-suggested-video-endcap-img";_img.src=sugs[i].image;_img.alt=sugs[i].alt||sugs[i].title;_a.appendChild(_img);_a.innerHTML+=sugs[i].title;_div.appendChild(_a)}_aside.appendChild(_div);_sve=_aside;_frag.appendChild(_aside);player.el().appendChild(_frag)}player.on("ended",function(){_sve.classList.add("is-active")}).on("play",function(){_sve.classList.remove("is-active")});player.ready(function(){constructSuggestedVideoEndcapContent()})})})(window.videojs);(function(root,factory){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=factory(require("video.js"))}else if(typeof define==="function"&&define.amd){define(["videojs"],function(videojs){return root.Youtube=factory(videojs)})}else{root.Youtube=factory(root.videojs)}})(this,function(videojs){"use strict";var _isOnMobile=videojs.browser.IS_IOS||videojs.browser.IS_ANDROID;var Tech=videojs.getTech("Tech");var Youtube=videojs.extend(Tech,{constructor:function(options,ready){Tech.call(this,options,ready);this.setPoster(options.poster);this.setSrc(this.options_.source,true);setTimeout(function(){this.el_.parentNode.className+=" vjs-youtube";if(_isOnMobile){this.el_.parentNode.className+=" vjs-youtube-mobile"}if(Youtube.isApiReady){this.initYTPlayer()}else{Youtube.apiReadyQueue.push(this)}}.bind(this))},dispose:function(){if(this.ytPlayer){this.ytPlayer.stopVideo();this.ytPlayer.destroy()}else{var index=Youtube.apiReadyQueue.indexOf(this);if(index!==-1){Youtube.apiReadyQueue.splice(index,1)}}this.ytPlayer=null;this.el_.parentNode.className=this.el_.parentNode.className.replace(" vjs-youtube","").replace(" vjs-youtube-mobile","");this.el_.parentNode.removeChild(this.el_);Tech.prototype.dispose.call(this)},createEl:function(){var div=document.createElement("div");div.setAttribute("id",this.options_.techId);div.setAttribute("style","width:100%;height:100%;top:0;left:0;position:absolute");div.setAttribute("class","vjs-tech");var divWrapper=document.createElement("div");divWrapper.appendChild(div);if(!_isOnMobile&&!this.options_.ytControls){var divBlocker=document.createElement("div");divBlocker.setAttribute("class","vjs-iframe-blocker");divBlocker.setAttribute("style","position:absolute;top:0;left:0;width:100%;height:100%");divBlocker.onclick=function(){this.pause()}.bind(this);divWrapper.appendChild(divBlocker)}return divWrapper},initYTPlayer:function(){var playerVars={controls:0,modestbranding:1,rel:0,showinfo:0,loop:this.options_.loop?1:0};if(typeof this.options_.autohide!=="undefined"){playerVars.autohide=this.options_.autohide}if(typeof this.options_["cc_load_policy"]!=="undefined"){playerVars["cc_load_policy"]=this.options_["cc_load_policy"]}if(typeof this.options_.ytControls!=="undefined"){playerVars.controls=this.options_.ytControls}if(typeof this.options_.disablekb!=="undefined"){playerVars.disablekb=this.options_.disablekb}if(typeof this.options_.end!=="undefined"){playerVars.end=this.options_.end}if(typeof this.options_.color!=="undefined"){playerVars.color=this.options_.color}if(!playerVars.controls){playerVars.fs=0}else if(typeof this.options_.fs!=="undefined"){playerVars.fs=this.options_.fs}if(typeof this.options_.end!=="undefined"){playerVars.end=this.options_.end}if(typeof this.options_.hl!=="undefined"){playerVars.hl=this.options_.hl}else if(typeof this.options_.language!=="undefined"){playerVars.hl=this.options_.language.substr(0,2)}if(typeof this.options_["iv_load_policy"]!=="undefined"){playerVars["iv_load_policy"]=this.options_["iv_load_policy"]}if(typeof this.options_.list!=="undefined"){playerVars.list=this.options_.list}else if(this.url&&typeof this.url.listId!=="undefined"){playerVars.list=this.url.listId}if(typeof this.options_.listType!=="undefined"){playerVars.listType=this.options_.listType}if(typeof this.options_.modestbranding!=="undefined"){playerVars.modestbranding=this.options_.modestbranding}if(typeof this.options_.playlist!=="undefined"){playerVars.playlist=this.options_.playlist}if(typeof this.options_.playsinline!=="undefined"){playerVars.playsinline=this.options_.playsinline}if(typeof this.options_.rel!=="undefined"){playerVars.rel=this.options_.rel}if(typeof this.options_.showinfo!=="undefined"){playerVars.showinfo=this.options_.showinfo}if(typeof this.options_.start!=="undefined"){playerVars.start=this.options_.start}if(typeof this.options_.theme!=="undefined"){playerVars.theme=this.options_.theme}if(typeof this.options_.customVars!=="undefined"){var customVars=this.options_.customVars;Object.keys(customVars).forEach(function(key){playerVars[key]=customVars[key]})}this.activeVideoId=this.url?this.url.videoId:null;this.activeList=playerVars.list;this.ytPlayer=new YT.Player(this.options_.techId,{videoId:this.activeVideoId,playerVars:playerVars,events:{onReady:this.onPlayerReady.bind(this),onPlaybackQualityChange:this.onPlayerPlaybackQualityChange.bind(this),onPlaybackRateChange:this.onPlayerPlaybackRateChange.bind(this),onStateChange:this.onPlayerStateChange.bind(this),onError:this.onPlayerError.bind(this)}})},onPlayerReady:function(){if(this.options_.muted){this.ytPlayer.mute()}var playbackRates=this.ytPlayer.getAvailablePlaybackRates();if(playbackRates.length>1){this.featuresPlaybackRate=true}this.playerReady_=true;this.triggerReady();if(this.playOnReady){this.play()}else if(this.cueOnReady){this.cueVideoById_(this.url.videoId);this.activeVideoId=this.url.videoId}},onPlayerPlaybackQualityChange:function(){},onPlayerPlaybackRateChange:function(){this.trigger("ratechange")},onPlayerStateChange:function(e){var state=e.data;if(state===this.lastState||this.errorNumber){return}this.lastState=state;switch(state){case-1:this.trigger("loadstart");this.trigger("loadedmetadata");this.trigger("durationchange");this.trigger("ratechange");break;case YT.PlayerState.ENDED:this.trigger("ended");break;case YT.PlayerState.PLAYING:this.trigger("timeupdate");this.trigger("durationchange");this.trigger("playing");this.trigger("play");if(this.isSeeking){this.onSeeked()}break;case YT.PlayerState.PAUSED:this.trigger("canplay");if(this.isSeeking){this.onSeeked()}else{this.trigger("pause")}break;case YT.PlayerState.BUFFERING:this.player_.trigger("timeupdate");this.player_.trigger("waiting");break}},onPlayerError:function(e){this.errorNumber=e.data;this.trigger("pause");this.trigger("error")},error:function(){var code=1e3+this.errorNumber;switch(this.errorNumber){case 5:return{code:code,message:"Error while trying to play the video"};case 2:case 100:return{code:code,message:"Unable to find the video"};case 101:case 150:return{code:code,message:"Playback on other Websites has been disabled by the video owner."}}return{code:code,message:"YouTube unknown error ("+this.errorNumber+")"}},loadVideoById_:function(id){var options={videoId:id};if(this.options_.start){options.startSeconds=this.options_.start}if(this.options_.end){options.endEnd=this.options_.end}this.ytPlayer.loadVideoById(options)},cueVideoById_:function(id){var options={videoId:id};if(this.options_.start){options.startSeconds=this.options_.start}if(this.options_.end){options.endEnd=this.options_.end}this.ytPlayer.cueVideoById(options)},src:function(src){if(src){this.setSrc({src:src})}return this.source},poster:function(){if(_isOnMobile){return null}return this.poster_},setPoster:function(poster){this.poster_=poster},setSrc:function(source){if(!source||!source.src){return}delete this.errorNumber;this.source=source;this.url=Youtube.parseUrl(source.src);if(!this.options_.poster){if(this.url.videoId){this.poster_="https://img.youtube.com/vi/"+this.url.videoId+"/0.jpg";this.trigger("posterchange");this.checkHighResPoster()}}if(this.options_.autoplay&&!_isOnMobile){if(this.isReady_){this.play()}else{this.playOnReady=true}}else if(this.activeVideoId!==this.url.videoId){if(this.isReady_){this.cueVideoById_(this.url.videoId);this.activeVideoId=this.url.videoId}else{this.cueOnReady=true}}},autoplay:function(){return this.options_.autoplay},setAutoplay:function(val){this.options_.autoplay=val},loop:function(){return this.options_.loop},setLoop:function(val){this.options_.loop=val},play:function(){if(!this.url||!this.url.videoId){return}this.wasPausedBeforeSeek=false;if(this.isReady_){if(this.url.listId){if(this.activeList===this.url.listId){this.ytPlayer.playVideo()}else{this.ytPlayer.loadPlaylist(this.url.listId);this.activeList=this.url.listId}}if(this.activeVideoId===this.url.videoId){this.ytPlayer.playVideo()}else{this.loadVideoById_(this.url.videoId);this.activeVideoId=this.url.videoId}}else{this.trigger("waiting");this.playOnReady=true}},pause:function(){if(this.ytPlayer){this.ytPlayer.pauseVideo()}},paused:function(){return this.ytPlayer?this.lastState!==YT.PlayerState.PLAYING&&this.lastState!==YT.PlayerState.BUFFERING:true},currentTime:function(){return this.ytPlayer?this.ytPlayer.getCurrentTime():0},setCurrentTime:function(seconds){if(this.lastState===YT.PlayerState.PAUSED){this.timeBeforeSeek=this.currentTime()}if(!this.isSeeking){this.wasPausedBeforeSeek=this.paused()}this.ytPlayer.seekTo(seconds,true);this.trigger("timeupdate");this.trigger("seeking");this.isSeeking=true;if(this.lastState===YT.PlayerState.PAUSED&&this.timeBeforeSeek!==seconds){clearInterval(this.checkSeekedInPauseInterval);this.checkSeekedInPauseInterval=setInterval(function(){if(this.lastState!==YT.PlayerState.PAUSED||!this.isSeeking){clearInterval(this.checkSeekedInPauseInterval)}else if(this.currentTime()!==this.timeBeforeSeek){this.trigger("timeupdate");this.onSeeked()}}.bind(this),250)}},seeking:function(){return this.isSeeking},seekable:function(){if(!this.ytPlayer){return videojs.createTimeRange()}return videojs.createTimeRange(0,this.ytPlayer.getDuration())},onSeeked:function(){clearInterval(this.checkSeekedInPauseInterval);this.isSeeking=false;if(this.wasPausedBeforeSeek){this.pause()}this.trigger("seeked")},playbackRate:function(){return this.ytPlayer?this.ytPlayer.getPlaybackRate():1},setPlaybackRate:function(suggestedRate){if(!this.ytPlayer){return}this.ytPlayer.setPlaybackRate(suggestedRate)},duration:function(){return this.ytPlayer?this.ytPlayer.getDuration():0},currentSrc:function(){return this.source&&this.source.src},ended:function(){return this.ytPlayer?this.lastState===YT.PlayerState.ENDED:false},volume:function(){return this.ytPlayer?this.ytPlayer.getVolume()/100:1},setVolume:function(percentAsDecimal){if(!this.ytPlayer){return}this.ytPlayer.setVolume(percentAsDecimal*100);this.setTimeout(function(){this.trigger("volumechange")},50)},muted:function(){return this.ytPlayer?this.ytPlayer.isMuted():false},setMuted:function(mute){if(!this.ytPlayer){return}else{this.muted(true)}if(mute){this.ytPlayer.mute()}else{this.ytPlayer.unMute()}this.setTimeout(function(){this.trigger("volumechange")},50)},buffered:function(){if(!this.ytPlayer||!this.ytPlayer.getVideoLoadedFraction){return videojs.createTimeRange()}var bufferedEnd=this.ytPlayer.getVideoLoadedFraction()*this.ytPlayer.getDuration();return videojs.createTimeRange(0,bufferedEnd)},preload:function(){},load:function(){},reset:function(){},supportsFullScreen:function(){return true},checkHighResPoster:function(){var uri="https://img.youtube.com/vi/"+this.url.videoId+"/maxresdefault.jpg";try{var image=new Image;image.onload=function(){if("naturalHeight"in image){if(image.naturalHeight<=90||image.naturalWidth<=120){return}}else if(image.height<=90||image.width<=120){return}this.poster_=uri;this.trigger("posterchange")}.bind(this);image.onerror=function(){};image.src=uri}catch(e){}}});Youtube.isSupported=function(){return true};Youtube.canPlaySource=function(e){return Youtube.canPlayType(e.type)};Youtube.canPlayType=function(e){return e==="video/youtube"};Youtube.parseUrl=function(url){var result={videoId:null};var regex=/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/;var match=url.match(regex);if(match&&match[2].length===11){result.videoId=match[2]}var regPlaylist=/[?&]list=([^#\&\?]+)/;match=url.match(regPlaylist);if(match&&match[1]){result.listId=match[1]}return result};function apiLoaded(){YT.ready(function(){Youtube.isApiReady=true;for(var i=0;i=0){eleForTime=childNode;break}}moveListener=function(event){var mouseTime,time,active,left,setting,pageX,right,width,halfWidth,pageXOffset,clientRect;active=0;pageXOffset=getScrollOffset().x;clientRect=offsetParent(progressControl.el()).getBoundingClientRect();right=(clientRect.width||clientRect.right)+pageXOffset;pageX=event.pageX;if(event.changedTouches){pageX=event.changedTouches[0].pageX}left=pageX||event.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;left-=eleForTime.getBoundingClientRect().left+pageXOffset;mouseTime=left/eleForTime.getBoundingClientRect().width*duration;dur.innerHTML=$(".vjs-mouse-display").attr("data-current-time");var cnum=thumbTrack&&thumbTrack.cues.length;i=0;while(i=mouseTime){setting=parseImageLink(ccue.text);break}i++}if(typeof setting==="undefined"){return}if(setting.src&&img.src!=setting.src){img.src=setting.src}if(setting.w===0){setting.w=settings.width}if(setting.h===0){setting.h=settings.height}if(div.style.width!=setting.w||div.style.height!=setting.h){div.style.width=setting.w+"px";div.style.height=setting.h+"px"}img.style.left=-setting.x+"px";img.style.top=-setting.y+"px";img.style.clip="rect("+setting.y+"px,"+(setting.w+setting.x)+"px,"+(setting.y+setting.h)+"px,"+setting.x+"px)";width=setting.w;halfWidth=width/2;if(left+halfWidth>right){left=right-width}else if(left