Server IP : 162.214.80.37 / Your IP : 216.73.216.83 Web Server : Apache System : Linux sh013.webhostingservices.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : imyrqtmy ( 2189) PHP Version : 8.2.18 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home2/imyrqtmy/public_html/rroptinet/assets/js/plugins/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
/* * vidim v1.0.1 * 2018-08-24T13:55:53.385Z * https://github.com/OriginalEXE/vidim * * Made by Ante Sepic */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.vidim=e()}(this,function(){"use strict";function t(t,e){Object.keys(e).forEach(function(i){t.hasOwnProperty(i)||(t[i]=e[i])})}function e(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return"string"==typeof t?e.querySelector(t):t}function i(t,e){var i,s,o,n,r=0,a=function(){r=Date.now(),i=null,n=t.apply(s,o),i||(s=o=null)},l=function(){var l=Date.now();r||(r=l);var h=e-(l-r);return s=this,o=arguments,h<=0||h>e?(i&&(clearTimeout(i),i=null),r=l,n=t.apply(s,o),i||(s=o=null)):i||(i=setTimeout(a,h)),n};return l.cancel=function(){clearTimeout(i),r=0,i=s=o=null},l}function s(t){"loading"!=document.readyState?t():document.addEventListener("DOMContentLoaded",t)}var o=function(t,e){return e={exports:{}},t(e,e.exports),e.exports}(function(t){function e(t){if(t)return i(t)}function i(t){for(var i in e.prototype)t[i]=e.prototype[i];return t}t.exports=e,e.prototype.on=e.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},e.prototype.once=function(t,e){function i(){this.off(t,i),e.apply(this,arguments)}return i.fn=e,this.on(t,i),this},e.prototype.off=e.prototype.removeListener=e.prototype.removeAllListeners=e.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var i=this._callbacks["$"+t];if(!i)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var s,o=0;o<i.length;o++)if((s=i[o])===e||s.fn===e){i.splice(o,1);break}return this},e.prototype.emit=function(t){this._callbacks=this._callbacks||{};var e=[].slice.call(arguments,1),i=this._callbacks["$"+t];if(i){i=i.slice(0);for(var s=0,o=i.length;s<o;++s)i[s].apply(this,e)}return this},e.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},e.prototype.hasListeners=function(t){return!!this.listeners(t).length}}),n=Object.freeze({setDefaults:t,getElement:e,throttle:i,ready:s}),r=function(e){var i={preload:"auto"},s={_initializeProvider:function(){t(this._options,i),this._constructPlayer(),this._dispatch(),this._listen()},_constructPlayer:function(){this.el=document.createElement("video"),this.el.setAttribute("playsinline",""),this._options.loop&&this.el.setAttribute("loop",""),this._options.autoplay&&this.el.setAttribute("autoplay",""),this._options.preload&&this.el.setAttribute("preload",this._options.preload),this._options.muted&&(this.el.muted=!0),this.el.style.position="absolute",this.el.style.left="50%",this.el.style.top="50%",this.el.style.transform="translate(-50%, -50%)",this.el.style.webkitTransform="translate(-50%, -50%)",this.el.style.msTransform="translate(-50%, -50%)",this.el.style.oTransform="translate(-50%, -50%)",this.el.style.mozTransform="translate(-50%, -50%)",this.el.style.minWidth="calc( 100% + 2px )",this.el.style.minHeight="calc( 100% + 2px )",this.el.style.opacity="0";var t=this._options.src;if(t.length&&"string"!=typeof t)for(var e=0;e<t.length;e++){var i=document.createElement("source");i.setAttribute("type",t[e].type),i.setAttribute("src",t[e].src),this.el.appendChild(i)}this.wrapper.appendChild(this.el),this._options.startAt&&(this.el.currentTime=this._options.startAt),"function"==typeof this._options.onReady&&this._options.onReady(this),this.emit("ready"),this._constructOverlay(),this.resize()},_dispatch:function(){var t=this;this.el.addEventListener("play",function(){t.emit("play",t)},!1),this.el.addEventListener("pause",function(){t.emit("pause",t)},!1),this.el.addEventListener("ended",function(){t.emit("end",t)},!1),this.el.addEventListener("canplay",function(){t.emit("canplay",t)},!1),this.el.addEventListener("canplaythrough",function(){t.emit("canplaythrough",t)},!1)},_listen:function(){var t=this;this.on("play",function(){t.el.style.opacity="1"}),this._options.showPosterBeforePlay||this.once("play",function(){t.wrapper.style.backgroundImage="url('"+t._options.poster+"')"}),this._options.showPosterOnEnd&&this.on("end",function(){t.el.style.opacity="0"}),this._options.showPosterOnPause&&this.on("pause",function(){t.el.style.opacity="0"})},play:function(){return this.el.play(),this},pause:function(){return this.el.pause(),this},setVolume:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;return this.el.volume=parseFloat(t/100),this},getVolume:function(){return 100*this.el.volume},mute:function(){return this.el.muted=!0,this},unMute:function(){return this.el.muted=!1,this},setTime:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.el.currentTime=t,this},getTime:function(){return this.el.currentTime},getDuration:function(){return this.el.duration},showPoster:function(){this.pause().el.style.opacity="0"},changeSource:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.el.innerHTML="",t.length&&"string"!=typeof t)for(var i=0;i<t.length;i++){var s=document.createElement("source");s.setAttribute("type",t[i].type),s.setAttribute("src",t[i].src),this.el.appendChild(s)}if(this.el.load&&this.el.load(),this._options.startAt&&(this.el.currentTime=this._options.startAt),e){var o=this._options.poster;-1!==this.wrapper.style.backgroundImage.indexOf(o)&&(this.wrapper.style.backgroundImage="url('"+e+"')"),this._options.poster=e}},destroy:function(){this.emit("destroy"),this.el.pause&&this.el.pause(),this.el.src="",this.el.load&&this.el.load();try{this.wrapper.parentNode.removeChild(this.wrapper)}catch(t){}e.deleteInstance(this.vidimID),delete this.container.vidimID,this.off()},resize:function(){if(this.el){var t=this.container.offsetHeight,e=this.container.offsetWidth;"BODY"===this.container.nodeName&&(e=window.innerWidth,t=window.innerHeight),1<this._options.ratio&&e/t<this._options.ratio||1>this._options.ratio&&t/e<this._options.ratio?(this.el.style.maxHeight="calc( 100% + 2px )",this.el.style.maxWidth=""):(this.el.style.maxHeight="",this.el.style.maxWidth="calc( 100% + 2px )"),this.emit("resize")}}};e.registerProvider("HTML5",s)},a=!1,l=function(e){var i={quality:"hd1080"},s={_initializeProvider:function(){var e=this;a?(t(this._options,i),this._constructPlayer(),this._listen()):window.addEventListener("vidimYouTubeAPIReady",function(){t(e._options,i),e._constructPlayer(),e._listen()},!1)},_constructPlayer:function(){var t=this;if(11===this._options.src.length)this.videoID=this._options.src;else{var e=/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=|\?v=)([^#\&\?]*).*/,i=this._options.src.match(e);if(!i||11!==i[2].length)return new Error("Provided source is not a valid YouTube url");this.videoID=i[2]}var s=document.createElement("div");this.wrapper.appendChild(s);var o={videoId:this.videoID,playerVars:{allowfullscreen:!1,controls:0,enablejsapi:1,disablekb:1,fs:0,iv_load_policy:3,modestbranding:1,origin:void 0!==window.location.origin?window.location.origin:window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:""),playsinline:1,rel:0,showinfo:0,start:this._options.startAt,autoplay:+this._options.autoplay},events:{onReady:function(){if(t._options.muted&&t.mute(),t.player.setPlaybackQuality(t._options.quality),"function"==typeof t._options.onReady&&t._options.onReady(t),t.emit("ready"),t._options.loop){var e=void 0;t.on("play",function(){e=setInterval(function(){(0===t.getTime()||t.getTime()+.15>t.getDuration())&&(t.setTime(0),t.play())},100)}),t.on("pause",function(){clearInterval(e)}),t.on("destroy",function(){clearInterval(e)})}},onStateChange:function(e){switch(e.data){case 0:t.emit("end",t);break;case 1:t.emit("play",t);break;case 2:t.emit("pause",t);break;case 3:t.emit("buffering",t)}}}};this._options.loop&&(o.playerVars.playlist=this.videoID,o.playerVars.loop=1),this.player=new YT.Player(s,o),this.el=this.player.getIframe(),this.el.style.position="absolute",this.el.style.left="50%",this.el.style.top="50%",this.el.style.transform="translate(-50%, -50%)",this.el.style.webkitTransform="translate(-50%, -50%)",this.el.style.msTransform="translate(-50%, -50%)",this.el.style.oTransform="translate(-50%, -50%)",this.el.style.mozTransform="translate(-50%, -50%)",this.el.style.minWidth="calc( 100% + 2px )",this.el.style.minHeight="calc( 100% + 2px )",this.el.style.opacity="0",this._constructOverlay(),this.resize()},_listen:function(){var t=this;this.on("play",function(){t.el.style.opacity="1"}),this._options.showPosterBeforePlay||this.once("play",function(){t.wrapper.style.backgroundImage="url('"+t._options.poster+"')"}),this._options.showPosterOnEnd?this.on("end",function(){t.el.style.opacity="0"}):this.on("end",function(){t.player.seekTo(t.player.getDuration()),t.player.playVideo(),t.player.pauseVideo()}),this._options.showPosterOnPause&&this.on("pause",function(){t.el.style.opacity="0"})},play:function(){return this.player.playVideo(),this},pause:function(){return this.player.pauseVideo(),this},setVolume:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;return this.player.setVolume(t),this},getVolume:function(){return this.getVolume()},mute:function(){return this.player.mute(),this},unMute:function(){return this.player.unMute(),this},setTime:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.player.seekTo(t,!0),this},getTime:function(){return this.player.getCurrentTime()},getDuration:function(){return this.player.getDuration()},showPoster:function(){this.pause().el.style.opacity="0"},changeSource:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(11===t.length)this.videoID=t;else{var i=/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=|\?v=)([^#\&\?]*).*/,s=t.match(i);if(!s||11!==s[2].length)return new Error("Provided source is not a valid YouTube url");this.videoID=s[2]}if(this.player.loadPlaylist(this.videoID,0,this._options.startAt,this._options.quality),this.player.setLoop(this._options.loop),e){var o=this._options.poster;-1!==this.wrapper.style.backgroundImage.indexOf(o)&&(this.wrapper.style.backgroundImage="url('"+e+"')"),this._options.poster=e}},destroy:function(){this.emit("destroy"),this.player.destroy();try{this.wrapper.parentNode.removeChild(this.wrapper)}catch(t){}e.deleteInstance(this.vidimID),delete this.container.vidimID,this.off()},resize:function(){if(this.el){var t=this.container.offsetHeight,e=this.container.offsetWidth;"BODY"===this.container.nodeName&&(e=window.innerWidth,t=window.innerHeight),1<this._options.ratio&&e/t<this._options.ratio||1>this._options.ratio&&t/e<this._options.ratio?(this.el.style.maxHeight="calc( 100% + 2px )",this.el.style.maxWidth="",this.el.style.height="",this.el.style.width=this.el.offsetHeight*this._options.ratio+200+"px"):(this.el.style.maxHeight="",this.el.style.maxWidth="calc( 100% + 2px )",this.el.style.height=this.el.offsetWidth/this._options.ratio+"px",this.el.style.width="",this.el.offsetHeight<this.wrapper.offsetHeight+140&&(this.el.style.height=this.el.offsetWidth/this._options.ratio+140+"px")),this.emit("resize")}}};e.registerProvider("YouTube",s)},h=document.createElement("script");h.src="https://www.youtube.com/iframe_api",document.querySelector("body").appendChild(h);var p=document.createEvent("Event");if(p.initEvent("vidimYouTubeAPIReady",!0,!0),void 0===window.onYouTubeIframeAPIReady)window.onYouTubeIframeAPIReady=function(){window.vidimYouTubeAPIReady=!0,a=!0,window.dispatchEvent(p)};else{var c=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=function(){c(),window.vidimYouTubeAPIReady=!0,a=!0,window.dispatchEvent(p)}}return function(a){function h(t,e){g[t]="function"==typeof e?e.call(a,w):e}function p(t){return m[t]?m[t]:null}function c(t){return t=e(t),void 0!==t.vidimID&&m[t.vidimID]?m[t.vidimID]:null}function u(){for(var t in m)m[t].hasOwnProperty("destroy")&&m[t].destroy();m={}}function d(t){delete m[t]}function y(){var t=document.querySelectorAll("[data-vidim]");if(t.length)for(var e=0;e<t.length;e++){var i=t[e],s=i.getAttribute("data-vidim");if(void 0===i.vidimID)try{var o=/({|,)(?:\s*)(?:')?([A-Za-z_$\.][A-Za-z0-9_ \-\.$]*)(?:')?(?:\s*):/g,n=s.replace(o,'$1"$2":').replace(/:\s?'/g,':"').replace(/'\s?}/g,'"}').replace(/',"/g,'","'),r=JSON.parse(n);new f(i,r)}catch(t){}}}function f(i){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(s).forEach(function(t){_.push(t)}),t(s,w),s.src&&!g[s.type]?new Error("No provider can handle type: '"+s.type+"'"):("string"==typeof s.ratio&&("4/3"===s.ratio?s.ratio=4/3:s.ratio=16/9),this._options=s,this.container=e(i),this.container?(-1===_.indexOf("zIndex")&&"BODY"===this.container.nodeName&&(this._options.zIndex=-1),void this._initialize()):new Error("Could not find the container: "+i))}if(void 0!==a.document){var v=0,m={},w={wrapperClass:"",overlayClass:"",src:!1,type:"HTML5",ratio:1.7778,autoplay:!0,loop:!0,poster:"",showPosterBeforePlay:!0,showPosterOnEnd:!1,showPosterOnPause:!1,zIndex:0,autoResize:!0,muted:!0,startAt:0,onReady:!1},_=[],g={},b=f.prototype;return b._initialize=function(){if(this.vidimID=v++,this.container.vidimID=this.vidimID,m[this.vidimID]=this,o(this),!this._options.src&&this._options.poster)return this._constructWrapper(),void(this.destroy=function(){this.emit("destroy");try{this.wrapper.parentNode.removeChild(this.wrapper)}catch(t){}f.deleteInstance(this.vidimID),delete this.container.vidimID,this.off()});var t=g[this._options.type];for(var e in t)this[e]=t[e];if("function"!=typeof this._initializeProvider)return new Error("Provider is missing method: _initializeProvider");this._constructWrapper(),this._initializeProvider(),this._options.autoResize&&window.addEventListener("resize",i(this.resize,200).bind(this),!1),this.resize()},b._constructWrapper=function(){"static"===getComputedStyle(this.container,null).getPropertyValue("position")&&(this.container.style.position="relative"),this.wrapper=document.createElement("div"),"BODY"===this.container.nodeName?this.wrapper.style.position="fixed":this.wrapper.style.position="absolute",this._options.wrapperClass&&("function"==typeof this._options.wrapperClass?this.wrapper.classList.add(this._options.wrapperClass.call(this)):this.wrapper.classList.add(this._options.wrapperClass)),this.wrapper.style.left=0,this.wrapper.style.top=0,this.wrapper.style.height="100%",this.wrapper.style.width="100%",this.wrapper.style.overflow="hidden",this.wrapper.style.zIndex=parseInt(this._options.zIndex,10),this._options.poster&&(this.wrapper.style.backgroundSize="cover",this.wrapper.style.backgroundPosition="center center",this.wrapper.style.backgroundRepear="no-repeat",this._options.showPosterBeforePlay&&(this.wrapper.style.backgroundImage="url('"+this._options.poster+"')")),this.container.insertBefore(this.wrapper,this.container.firstChild)},b._constructOverlay=function(){this.overlay=document.createElement("div"),this.overlay.style.position="absolute",this._options.overlayClass&&("function"==typeof this._options.overlayClass?this.overlay.classList.add(this._options.overlayClass.call(this)):this.overlay.classList.add(this._options.overlayClass)),this.overlay.style.left=0,this.overlay.style.top=0,this.overlay.style.height="100%",this.overlay.style.width="100%",this.wrapper.appendChild(this.overlay)},f.getInstanceFromID=p,f.getInstanceFromElement=c,f.registerProvider=h,f.destroyAllInstances=u,f.deleteInstance=d,f.utility=n,f.scanDOM=y,r(f),l(f),s(y),f}}("undefined"!=typeof window?window:void 0)});