PageSourceSearch

https://pay-debt.ru/g/s3/lp/lpc.v4/plugins/lightgallery/v.2.7.2/plugins/lg-video.min.js

js pay-debt.ru collected 2026-09-30 10:57:06 UTC 9,501 bytes, 19 lines download raw bytes

1'use strict';var __assign=function(){__assign=Object.assign||function(d){for(var a,b=1,c=arguments.length;b<c;b++){a=arguments[b];for(var e in a)Object.prototype.hasOwnProperty.call(a,e)&&(d[e]=a[e])}return d};return __assign.apply(this,arguments)},videoSettings={autoplayFirstVideo:!0,youTubePlayerParams:!1,vimeoPlayerParams:!1,wistiaPlayerParams:!1,gotoNextSlideOnVideoEnd:!0,autoplayVideoOnSlide:!1,videojs:!1,videojsTheme:"",videojsOptions:{}},lGEvents={afterAppendSlide:"lgAfterAppendSlide",init:"lgInit",
2hasVideo:"lgHasVideo",containerResize:"lgContainerResize",updateSlides:"lgUpdateSlides",afterAppendSubHtml:"lgAfterAppendSubHtml",beforeOpen:"lgBeforeOpen",afterOpen:"lgAfterOpen",slideItemLoad:"lgSlideItemLoad",beforeSlide:"lgBeforeSlide",afterSlide:"lgAfterSlide",posterClick:"lgPosterClick",dragStart:"lgDragStart",dragMove:"lgDragMove",dragEnd:"lgDragEnd",beforeNextSlide:"lgBeforeNextSlide",beforePrevSlide:"lgBeforePrevSlide",beforeClose:"lgBeforeClose",afterClose:"lgAfterClose",rotateLeft:"lgRotateLeft",
3rotateRight:"lgRotateRight",flipHorizontal:"lgFlipHorizontal",flipVertical:"lgFlipVertical",autoplay:"lgAutoplay",autoplayStart:"lgAutoplayStart",autoplayStop:"lgAutoplayStop"},param=function(d){return Object.keys(d).map(function(a){return encodeURIComponent(a)+"="+encodeURIComponent(d[a])}).join("&")},paramsToObject=function(d){return d.slice(1).split("&").map(function(a){return a.split("=")}).reduce(function(a,b){b=b.map(decodeURIComponent);a[b[0]]=b[1];return a},{})},getYouTubeParams=function(d,
4a){if(!d.youtube)return"";d=d.youtube[2]?paramsToObject(d.youtube[2]):"";a=a||{};a=__assign(__assign(__assign({},{wmode:"opaque",autoplay:0,mute:1,enablejsapi:1}),a),d);return"?"+param(a)},isYouTubeNoCookie=function(d){return d.includes("youtube-nocookie.com")},getVimeoURLParams=function(d,a){if(!a||!a.vimeo)return"";var b=a.vimeo[2]||"";d=d&&0!==Object.keys(d).length?"&"+param(d):"";var c=((a.vimeo[0].split("/").pop()||"").split("?")[0]||"").split("#")[0];(a=a.vimeo[1]!==c)&&(b=b.replace("/"+c,""));
5b="?"==b[0]?"&"+b.slice(1):b||"";return"?autoplay=0&muted=1"+(a?"&h="+c:"")+d+b},Video=function(){function d(a){this.core=a;this.settings=__assign(__assign({},videoSettings),this.core.settings);return this}d.prototype.init=function(){var a=this;this.core.LGel.on(lGEvents.hasVideo+".video",this.onHasVideo.bind(this));this.core.LGel.on(lGEvents.posterClick+".video",function(){var b=a.core.getSlideItem(a.core.index);a.loadVideoOnPosterClick(b)});this.core.LGel.on(lGEvents.slideItemLoad+".video",this.onSlideItemLoad.bind(this));
6this.core.LGel.on(lGEvents.beforeSlide+".video",this.onBeforeSlide.bind(this));this.core.LGel.on(lGEvents.afterSlide+".video",this.onAfterSlide.bind(this))};d.prototype.onSlideItemLoad=function(a){var b=this;a=a.detail;var c=a.isFirstSlide,e=a.index;this.settings.autoplayFirstVideo&&c&&e===this.core.index&&setTimeout(function(){b.loadAndPlayVideo(e)},200);!c&&this.settings.autoplayVideoOnSlide&&e===this.core.index&&this.loadAndPlayVideo(e)};d.prototype.onHasVideo=function(a){a=a.detail;var b=a.index,
7c=a.src,e=a.html5Video;a.hasPoster||(this.appendVideos(this.core.getSlideItem(b),{src:c,addClass:"lpc-lg-object",index:b,html5Video:e}),this.gotoNextSlideOnVideoEnd(c,b))};d.prototype.onBeforeSlide=function(a){this.core.lGalleryOn&&this.pauseVideo(a.detail.prevIndex)};d.prototype.onAfterSlide=function(a){var b=this;a=a.detail;var c=a.index;a=a.prevIndex;var e=this.core.getSlideItem(c);this.settings.autoplayVideoOnSlide&&c!==a&&e.hasClass("lpc-lg-complete")&&setTimeout(function(){b.loadAndPlayVideo(c)},
8100)};d.prototype.loadAndPlayVideo=function(a){var b=this.core.getSlideItem(a);this.core.galleryItems[a].poster?this.loadVideoOnPosterClick(b,!0):this.playVideo(a)};d.prototype.playVideo=function(a){this.controlVideo(a,"play")};d.prototype.pauseVideo=function(a){this.controlVideo(a,"pause")};d.prototype.getVideoHtml=function(a,b,c,e){var f="",g=this.core.galleryItems[c].__slideVideoInfo||{},h=this.core.galleryItems[c];h=(h=h.title||h.alt)?'title="'+h+'"':"";if(g.youtube)c="lpc-lg-youtube"+c,f=getYouTubeParams(g,
9this.settings.youTubePlayerParams),a=isYouTubeNoCookie(a),f='<iframe allow="autoplay" id='+c+' class="lpc-lg-video-object lpc-lg-youtube '+b+'" '+h+' src="'+(a?"//www.youtube-nocookie.com/":"//www.youtube.com/")+"embed/"+(g.y
9outube[1]+f)+'" allowtransparency="true"\n            frameborder="0"\n            scrolling="no"\n            allowfullscreen\n            mozallowfullscreen\n            webkitallowfullscreen\n            oallowfullscreen\n            msallowfullscreen></iframe>';else if(g.vimeo)c=
10"lpc-lg-vimeo"+c,a=getVimeoURLParams(this.settings.vimeoPlayerParams,g),f='<iframe allow="autoplay" id='+c+' class="lpc-lg-video-object lpc-lg-vimeo '+b+'" '+h+' src="//player.vimeo.com/video/'+(g.vimeo[1]+a)+'" allowtransparency="true"\n            frameborder="0"\n            scrolling="no"\n            allowfullscreen\n            mozallowfullscreen\n            webkitallowfullscreen\n            oallowfullscreen\n            msallowfullscreen></iframe>';else if(g.wistia)c="lg-wistia"+c,a=param(this.settings.wistiaPlayerParams),
11f='<iframe allow="autoplay" id="'+c+'" src="//fast.wistia.net/embed/iframe/'+(g.wistia[4]+(a?"?"+a:""))+'" '+h+' class="wistia_embed lpc-lg-video-object lg-wistia '+b+'" name="wistia_embed" allowtransparency="true"\n            frameborder="0"\n            scrolling="no"\n            allowfullscreen\n            mozallowfullscreen\n            webkitallowfullscreen\n            oallowfullscreen\n            msallowfullscreen></iframe>';else if(g.html5){var l="";for(b=0;b<e.source.length;b++)l+='<source src="'+
12e.source[b].src+'" type="'+e.source[b].type+'">';if(e.tracks)for(g=function(k){var m="",n=e.tracks[k];Object.keys(n||{}).forEach(function(p){m+=p+'="'+n[p]+'" '});l+="<track "+m+">"},b=0;b<e.tracks.length;b++)g(b);var q="",r=e.attributes||{};Object.keys(r||{}).forEach(function(k){q+=k+'="'+r[k]+'" '});f='<video class="lpc-lg-video-object lpc-lg-html5 '+(this.settings.videojs&&this.settings.videojsTheme?this.settings.videojsTheme+" ":"")+" "+(this.settings.videojs?" video-js":"")+'" '+q+">\n                "+
13l+"\n                Your browser does not support HTML5 video.\n            </video>"}return f};d.prototype.appendVideos=function(a,b){var c,e=this.getVideoHtml(b.src,b.addClass,b.index,b.html5Video);a.find(".lpc-lg-video-cont").append(e);a=a.find(".lpc-lg-video-object").first();if(b.html5Video)a.on("mousedown.lg.video",function(f){f.stopPropagation()});if(this.settings.videojs&&(null===(c=this.core.galleryItems[b.index].__slideVideoInfo)||void 0===c?0:c.html5))try{return videojs(a.get(),this.settings.videojsOptions)}catch(f){console.error("lightGallery:- Make sure you have included videojs")}};
14d.prototype.gotoNextSlideOnVideoEnd=function(a,b){var c=this;a=this.core.getSlideItem(b).find(".lpc-lg-video-object").first();b=this.core.galleryItems[b].__slideVideoInfo||{};if(this.settings.gotoNextSlideOnVideoEnd)if(b.html5)a.on("ended",function(){c.core.goToNextSlide()});else if(b.vimeo)try{(new Vimeo.Player(a.get())).on("ended",function(){c.core.goToNextSlide()})}catch(e){console.error("lightGallery:- Make sure you have included //github.com/vimeo/player.js")}else if(b.wistia)try{window._wq=
15window._wq||[],window._wq.push({id:a.attr("id"),onReady:function(e){e.bind("end",function(){c.core.goToNextSlide()})}})}catch(e){console.error("lightGallery:- Make sure you have included //fast.wistia.com/assets/external/E-v1.js")}};d.prototype.controlVideo=function(a,b){var c=this.core.getSlideItem(a).find(".lpc-lg-video-object").first();a=this.core.galleryItems[a].__slideVideoInfo||{};if(c.get())if(a.youtube)try{c.get().contentWindow.postMessage('{"event":"command","func":"'+b+'Video","args":""}',
16"*")}catch(e){console.error("lightGallery:- "+e)}else if(a.vimeo)try{(new Vimeo.Player(c.get()))[b]()}catch(e){console.error("lightGallery:- Make sure you have included //github.com/vimeo/player.js")}else if(a.html5)if(this.settings.videojs)try{videojs(c.get())[b]()}catch(e){console.error("lightGallery:- Make sure you have included videojs")}else c.get()[b]();else if(a.wistia)try{window._wq=window._wq||[],window._wq.push({id:c.attr("id"),onReady:function(e){e[b]()}})}catch(e){console.error("lightGallery:- Make sure you have included //fast.wistia.com/assets/external/E-v1.js")}};
17d.prototype.loadVideoOnPosterClick=function(a,b){var c=this;if(a.hasClass("lpc-lg-video-loaded"))b&&this.playVideo(this.core.index);
17else if(a.hasClass("lpc-lg-has-video"))this.playVideo(this.core.index);else{a.addClass("lpc-lg-has-video");b=void 0;var e=this.core.galleryItems[this.core.index].src,f=this.core.galleryItems[this.core.index].video;f&&(b="string"===typeof f?JSON.parse(f):f);var g=this.appendVideos(a,{src:e,addClass:"",index:this.core.index,html5Video:b});this.gotoNextSlideOnVideoEnd(e,
18this.core.index);b=a.find(".lpc-lg-object").first().get();a.find(".lpc-lg-video-cont").first().append(b);a.addClass("lpc-lg-video-loading");g&&g.ready(function(){g.on("loadedmetadata",function(){c.onVideoLoadAfterPosterClick(a,c.core.index)})});a.find(".lpc-lg-video-object").first().on("load.lg error.lg loadedmetadata.lg",function(){setTimeout(function(){c.onVideoLoadAfterPosterClick(a,c.core.index)},50)})}};d.prototype.onVideoLoadAfterPosterClick=function(a,b){a.addClass("lpc-lg-video-loaded");this.playVideo(b)};
19d.prototype.destroy=function(){this.core.LGel.off(".lg.video");this.core.LGel.off(".video")};return d}();

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.