PageSourceSearch

https://www.visitjackson.com/dist/scripts/HeroVideoPlayer.f3dfd0586531fdf8d4db.min.js

js visitjackson.com collected 2026-10-02 06:44:54 UTC 11,954 bytes, 2 lines download raw bytes

1/*! For license information please see HeroVideoPlayer.f3dfd0586531fdf8d4db.min.js.LICENSE.txt */
2(self.webpackChunk=self.webpackChunk||[]).push([[9620],{9945:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return d}});var i=s(4575),n=s.n(i),r=s(3913),a=s.n(r),o=s(9713),l=s.n(o),h=s(2573),u=s.n(h),d=function(){function e(t){var s=this,i=t.el,r=t.videoId,a=t.loop,o=void 0===a||a,h=t.videoHolderSelector,d=void 0===h?"[data-video]":h,p=t.playPauseBtnSelector,y=void 0===p?"[data-vp-play-pause]":p,c=t.muteBtnSelector,_=void 0===c?"[data-vp-mute]":c,v=t.fullscreenBtnSelector,m=void 0===v?"[data-vp-fullscreen]":v,f=t.ytOptions,g=void 0===f?{autoplay:!0,controls:!1,modestBranding:!0,related:!1}:f;n()(this,e),l()(this,"player",null),l()(this,"clickedPause",!1),l()(this,"isScrolling",!1),l()(this,"scrollTimeout",null);var b=i.querySelector(y),w=i.querySelector(_),I=i.querySelector(m),k=i.querySelector(d);this.player=new(u())(k,g),this.player.load(r),this.player.on("cued",(function(){var e=window.innerWidth,t=i.clientHeight+320,n=16/9;if(e/n<t){var r=Math.ceil(t*n);s.player.setSize(r,t)}else{var a=Math.ceil(e/n);s.player.setSize(e,a)}i.classList.add("is-loaded"),s.player.play(),s.player.mute()})),o&&this.player.on("ended",(function(){s.player.play()})),window.addEventListener("optimizedScroll",(function(){s.isScrolling||(s.isScrolling=!0,s.player.pause(),s.scrollTimeout=setTimeout(s.resumePlay,500))})),null!=b&&b.addEventListener("click",(function(){"paused"==s.player.getState()?(s.clickedPause=!1,s.player.play(),s.updateIcon(b,"pause")):"playing"==s.player.getState()&&(s.clickedPause=!0,s.player.pause(),s.updateIcon(b,"play"))})),null!=w&&w.addEventListener("click",(function(){s.player.isMuted()?(s.player.unMute(),s.updateIcon(w,"volume-on")):(s.player.mute(),s.updateIcon(w,"volume-off"))})),null!=I&&I.addEventListener("click",(function(){i.classList.toggle("fullscreen-video"),s.updateIcon(I,"enlarge"),i.classList.contains("fullscreen-video")&&s.updateIcon(I,"shrink")}))}return a()(e,[{key:"resumePlay",value:function(){this.isScrolling&&!this.clickedPause&&(this.player.play(),this.isScrolling=!1,clearTimeout(this.scrollTimeout))}},{key:"updateIcon",value:function(e,t){e.querySelector(".icon use").setAttribute("href","#"+t)}}]),e}()},7187:function(e){function t(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function s(e){return"function"==typeof e}function i(e){return"object"==typeof e&&null!==e}function n(e){return void 0===e}e.exports=t,t.EventEmitter=t,t.prototype._events=void 0,t.prototype._maxListeners=void 0,t.defaultMaxListeners=10,t.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},t.prototype.emit=function(e){var t,r,a,o,l,h;if(this._events||(this._events={}),"error"===e&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var u=new Error('Uncaught, unspecified "error" event. ('+t+")");throw u.context=t,u}if(n(r=this._events[e]))return!1;if(s(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:o=Array.prototype.slice.call(arguments,1),r.apply(this,o)}else if(i(r))for(o=Array.prototype.slice.call(arguments,1),a=(h=r.slice()).length,l=0;l<a;l++)h[l].apply(this,o);return!0},t.prototype.addListener=function(e,r){var a;if(!s(r))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,s(r.listener)?r.listener:r),this._events[e]?i(this._events[e])?this._events[e].push(r):this._events[e]=[this._events[e],r]:this._events[e]=r,i(this._events[e])&&!this._events[e].warned&&(a=n(this._maxListeners)?t.defaultMaxListeners:this._maxListeners)&&a>0&&this._events[e].length>a&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},t.prototype.on=t.prototype.addListener,t.prototype.once=function(e,t){if(!s(t))throw TypeError("listener must be a function");var i=!1;function n(){this.removeListener(e,n),i||(i=!0,t.apply(this,arguments))}return n.listener=t,this.on(e,n),this},t.prototype.removeListener=function(e,t){var n,r,a,o;if(!s(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(a=(n=this._events[e]).length,r=-1,n===t||s(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit
2("removeListener",e,t);else if(i(n)){for(o=a;o-- >0;)if(n[o]===t||n[o].listener&&n[o].listener===t){r=o;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},t.prototype.removeAllListeners=function(e){var t,i;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(s(i=this._events[e]))this.removeListener(e,i);else if(i)for(;i.length;)this.removeListener(e,i[i.length-1]);return delete this._events[e],this},t.prototype.listeners=function(e){return this._events&&this._events[e]?s(this._events[e])?[this._events[e]]:this._events[e].slice():[]},t.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(s(t))return 1;if(t)return t.length}return 0},t.listenerCount=function(e,t){return e.listenerCount(t)}},7298:function(e){e.exports=function(e,t,s){return new Promise(((i,n)=>{const r=document.createElement("script");r.async=!0,r.src=e;for(const[e,s]of Object.entries(t||{}))r.setAttribute(e,s);r.onload=()=>{r.onerror=r.onload=null,i(r)},r.onerror=()=>{r.onerror=r.onload=null,n(new Error(`Failed to load ${e}`))};(s||document.head||document.getElementsByTagName("head")[0]).appendChild(r)}))}},2573:function(e,t,s){const i=s(7187).EventEmitter,n=s(7298),r="https://www.youtube.com/iframe_api",a={"-1":"unstarted",0:"ended",1:"playing",2:"paused",3:"buffering",5:"cued"},o=2,l=5,h=100,u=101,d=150,p=[];e.exports=class extends i{constructor(e,t){super();const s="string"==typeof e?document.querySelector(e):e;s.id?this._id=s.id:this._id=s.id="ytplayer-"+Math.random().toString(16).slice(2,8),this._opts=Object.assign({width:640,height:360,autoplay:!1,captions:void 0,controls:!0,keyboard:!0,fullscreen:!0,annotations:!0,modestBranding:!1,related:!0,timeupdateFrequency:1e3,playsInline:!0,start:0},t),this.videoId=null,this.destroyed=!1,this._api=null,this._autoplay=!1,this._player=null,this._ready=!1,this._queue=[],this._interval=null,this._startInterval=this._startInterval.bind(this),this._stopInterval=this._stopInterval.bind(this),this.on("playing",this._startInterval),this.on("unstarted",this._stopInterval),this.on("ended",this._stopInterval),this.on("paused",this._stopInterval),this.on("buffering",this._stopInterval),this._loadIframeAPI(((e,t)=>{if(e)return this._destroy(new Error("YouTube Iframe API failed to load"));this._api=t,this.videoId&&this.load(this.videoId,this._autoplay,this._start)}))}load(e,t=!1,s=0){this.destroyed||(this.videoId=e,this._autoplay=t,this._start=s,this._api&&(this._player?this._ready&&(t?this._player.loadVideoById(e,s):this._player.cueVideoById(e,s)):this._createPlayer(e)))}play(){this._ready?this._player.playVideo():this._queueCommand("play")}pause(){this._ready?this._player.pauseVideo():this._queueCommand("pause")}stop(){this._ready?this._player.stopVideo():this._queueCommand("stop")}seek(e){this._ready?this._player.seekTo(e,!0):this._queueCommand("seek",e)}setVolume(e){this._ready?this._player.setVolume(e):this._queueCommand("setVolume",e)}getVolume(){return this._ready&&this._player.getVolume()||0}mute(){this._ready?this._player.mute():this._queueCommand("mute")}unMute(){this._ready?this._player.unMute():this._queueCommand("un
2Mute")}isMuted(){return this._ready&&this._player.isMuted()||!1}setSize(e,t){this._ready?this._player.setSize(e,t):this._queueCommand("setSize",e,t)}setPlaybackRate(e){this._ready?this._player.setPlaybackRate(e):this._queueCommand("setPlaybackRate",e)}setPlaybackQuality(e){this._ready?this._player.setPlaybackQuality(e):this._queueCommand("setPlaybackQuality",e)}getPlaybackRate(){return this._ready&&this._player.getPlaybackRate()||1}getAvailablePlaybackRates(){return this._ready&&this._player.getAvailablePlaybackRates()||[1]}getDuration(){return this._ready&&this._player.getDuration()||0}getProgress(){return this._ready&&this._player.getVideoLoadedFraction()||0}getState(){return this._ready&&a[this._player.getPlayerState()]||"unstarted"}getCurrentTime(){return this._ready&&this._player.getCurrentTime()||0}destroy(){this._destroy()}_destroy(e){this.destroyed||(this.destroyed=!0,this._player&&(this._player.stopVideo&&this._player.stopVideo(),this._player.destroy()),this.videoId=null,this._id=null,this._opts=null,this._api=null,this._player=null,this._ready=!1,this._queue=null,this._stopInterval(),this.removeListener("playing",this._startInterval),this.removeListener("paused",this._stopInterval),this.removeListener("buffering",this._stopInterval),this.removeListener("unstarted",this._stopInterval),this.removeListener("ended",this._stopInterval),e&&this.emit("error",e))}_queueCommand(e,...t){this.destroyed||this._queue.push([e,t])}_flushQueue(){for(;this._queue.length;){const e=this._queue.shift();this[e[0]].apply(this,e[1])}}_loadIframeAPI(e){if(window.YT&&"function"==typeof window.YT.Player)return e(null,window.YT);p.push(e);Array.from(document.getElementsByTagName("script")).some((e=>e.src===r))||n(r).catch((e=>{for(;p.length;){p.shift()(e)}}));const t=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=()=>{for("function"==typeof t&&t();p.length;){p.shift()(null,window.YT)}}}_createPlayer(e){if(this.destroyed)return;const t=this._opts;this._player=new this._api.Player(this._id,{width:t.width,height:t.height,videoId:e,host:t.host,playerVars:{autoplay:t.autoplay?1:0,cc_load_policy:null!=t.captions?!1!==t.captions?1:0:void 0,hl:null!=t.captions&&!1!==t.captions?t.captions:void 0,cc_lang_pref:null!=t.captions&&!1!==t.captions?t.captions:void 0,controls:t.controls?2:0,disablekb:t.keyboard?0:1,enablejsapi:1,fs:t.fullscreen?1:0,iv_load_policy:t.annotations?1:3,modestbranding:t.modestBranding?1:0,origin:window.location.origin,playsinline:t.playsInline?1:0,rel:t.related?1:0,wmode:"opaque",start:t.start},events:{onReady:()=>this._onReady(e),onStateChange:e=>this._onStateChange(e),onPlaybackQualityChange:e=>this._onPlaybackQualityChange(e),onPlaybackRateChange:e=>this._onPlaybackRateChange(e),onError:e=>this._onError(e)}})}_onReady(e){this.destroyed||(this._ready=!0,this.load(this.videoId,this._autoplay,this._start),this._flushQueue())}_onStateChange(e){if(this.destroyed)return;const t=a[e.data];if(!t)throw new Error("Unrecognized state change: "+e);["paused","buffering","ended"].includes(t)&&this._onTimeupdate(),this.emit(t),["unstarted","playing","cued"].includes(t)&&this._onTimeupdate()}_onPlaybackQualityChange(e){this.destroyed||this.emit("playbackQualityChange",e.data)}_onPlaybackRateChange(e){this.destroyed||this.emit("playbackRateChange",e.data)}_onError(e){if(this.destroyed)return;const t=e.data;return t!==l?t===u||t===d||t===h||t===o?this.emit("unplayable",this.videoId):void this._destroy(new Error("YouTube Player Error. Unknown error code: "+t)):void 0}_onTimeupdate(){this.emit("timeupdate",this.getCurrentTime())}_startInterval(){this._interval=setInterval((()=>this._onTimeupdate()),this._opts.timeupdateFrequency)}_stopInterval(){clearInterval(this._interval),this._interval=null}}}}]);

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.