PageSourceSearch

https://donetsk-dr.ru/wp-content/plugins/wpstories/assets/public/js/scripts.min.js?ver=2.1.4

js donetsk-dr.ru collected 2026-10-02 11:35:16 UTC 18,448 bytes, 1 lines download raw bytes

1jQuery(function(h){function a(t){var s,e,i={play:function(t){},pause:function(t){},stop:function(t){},duration:function(t){return t}};return null!==(t=void 0===t?null:t)&&(s=t.find("video")).length?{duration:function(t){var e;return s.data("duration")?(e=1e3*s.data("duration"))<t?e*Math.ceil(t/e):e:t},play:(e=s.get(0)).play.bind(e),pause:e.pause.bind(e),stop:function(){e.pause(),e.currentTime=0}}:i}function s(t){this.activeFrameStatus=t=void 0===t?"active":t,this.isRunning=!1,this.isPausing=!1,this.slides=[],this.$_slide=null,this.slideIndex=-1,this.$_frame=null,this.frameIndex=0}function e(t,e){void 0===e&&(e={}),this.$el=t,this.$overlay=t.find(".js-wpstories-window-overlay"),this.$overlayBg=t.find(".js-wpstories-window-overlay-bg"),this.$container=t.find(".js-wpstories-window-container"),this.$preview=t.find(".js-wpstories-preview"),this.$window=t.find(".js-wpstories-window"),this.$debug=t.find(".js-wpstories-debug"),this.$closeButton=t.find(".js-wpstories-window-close"),this.slidesSelector=".js-wpstories-slides",this.slideItemSelector=".js-wpstories-slide",this.framesSelector=".js-wpstories-frames",this.frameItemSelector=".js-wpstories-frame",this.progressItemSelector=".js-wpstories-slide-progress-item",this.buttonSelector=".js-wpstories-button",this.group=this.$container.data("group"),t.find(this.frameItemSelector).each(function(t,e){var e=h(e);e.on(C,N(e)),e.on(P,H(e)),(e=e).on(j,H(e)),e.on("mouseleave",H(e))}),this.ratio=.5625,this.storyDuration=1e3*(Number(parseFloat(e.story_duration)).toFixed(3)||5),this.storyHashPrefix=e.story_hash_prefix||"wpstory",this.origHash=this._isStoriesUrlHash(window.location.hash)?"":window.location.hash,this.state=new s,this.debug=!1,this.finishProgressCallback=null}var i,r,p,n,o="tap",d="move_right",u="move_left",c="move_up",l="move_down",f="click.wpstories",m="start_"+o+".wpstories",g="end_"+o+".wpstories",w="start_"+d+".wpstories",v="end_"+d+".wpstories",_="start_"+u+".wpstories",y="end_"+u+".wpstories",x="start_"+c+".wpstories",b="end_"+c+".wpstories",$="start_"+l+".wpstories",I="end_"+l+".wpstories",S="swipe_left.wpstories",F="swipe_right.wpstories",U="swipe_up.wpstories",R="swipe_down.wpstories",C="touchstart",k="touchmove",P="touchend",j="touchcancel",D=(window.PointerEvent?(C="pointerdown",k="pointermove",P="pointerup",j="pointercancel"):window.MSPointerEvent&&(C="MSPointerDown",k="MSPointerMove",P="MSPointerUp",j="MSPointerCancel"),135),L=!1,T=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];L&&console.log.apply(console,t)},E=!1,W=!0,N=function(e){return function(t){t.preventDefault(),T("Event type:",t.type),void 0!==t.isPrimary&&!1===t.isPrimary||void 0!==t.touches&&1<t.touches.length||(B(t),r=new M(p.x,p.y),W=!1,(new Date).getTime(),document.addEventListener(k,z),E=!1,i=setTimeout(function(){switch(E=!0,n=r.detectIntent(p),T("Intent:",n),n){case o:T("Trigger:",m),e.trigger(m,[t]);break;case u:T("Trigger:",_),e.trigger(_,[t]);break;case d:T("Trigger:",w),e.trigger(w,[t]);break;case c:T("Trigger:",x),e.trigger(x,[t]);break;case l:T("Trigger:",$),e.trigger($,[t])}},D))}},H=function(s){return function(t){if(!W)if(t.preventDefault(),W=!0,document.removeEventListener(k,z),clearTimeout(i),E)switch(n){case o:T("Trigger:",g),s.trigger(g,[t]);break;case u:T("Trigger:",y),s.trigger(y,[t]);break;case d:T("Trigger:",v),s.trigger(v,[t]);break;case c:T("Trigger:",b),s.trigger(b,[t]);break;case l:T("Trigger:",I),s.trigger(I,[t])}else{var e=r.detectImmediateIntent(p);switch(T("Immediate intent:",e),e){case o:T("Trigger:",f),s.trigger(f,[t]);break;case u:T("Trigger:",S),s.trigger(S,[t]);break;case d:T("Trigger:",F),s.trigger(F,[t]);break;case c:T("Trigger:",U),s.trigger(U,[t]);break;case l:T("Trigger:",R),s.trigger(R,[t])}}}},z=function(t){T("Event type:",t.type),B(t)},B=function(t){p=new(Function.prototype.bind.apply(M,[null].concat(X(t))))},X=function(t){return void 0!==t.touches?[t.touches[0].pageX,t.touches[0].pageY]:void 0!==t.pageX?[t.pageX,t.pageY]:[]},M=function(t,e){this.x=t,this.y=e},t=(M.prototype.detectIntent=function(t){var e=t.x-this.x,t=t.y-this.y,s=Math.abs(e),i=Math.abs(t);return s<=12&&i<=12?o:i<=s?0<e?d:u:0<t?l:c},M.prototype.detectImmediateIntent=function(t){var e=t.x-this.x,t=t.y-this.y,s=Math.abs(e),i=Math.abs(t);return s<=64&&i<=64?o:i<=s?0<e?d:u:0<t?l:c},{$slide:{configurable:!0},$frame:{configurable:!0}}),O=(t.$slide.get=function(){return this.$_slide},t.$frame.get=function(){return this.$_frame},s.prototype.addSlide=function(t,e){return this.slides[t]={$el:e,frames:[],finished:!1},this},s.prototype.addFrame=function(t,e,s){return s.find("img").attr("draggable",!1),this.slides[t].frames[e]={$el:s,idx:e,finished:!1},this},s.prototype._getCurrentFrames=function(){var t;return!(this.slideIndex<0)&&(t=this.slides[this.slideIndex].frames).length?t:[]},s.prototype.setSlide=function(t){return void 0!==this.slides[t]&&(this.slideIndex=t,this.$_slide=this.slides[t].$el),this},s.prototype.hasNexSlide=function(){return void 0!==this.slides[this.slideIndex+1]},s.prototype.nextSlide=function(){var t=this.slideIndex+1;return void 0!==this.slides[t]&&(this.$_slide=this.slides[t].$el,this.slideIndex=t),this},s.prototype.hasPrevSlide=function(){return void 0!==this.slides[this.slideIndex-1]},s.prototype.prevSlide=function(){var t=this.slideIndex-1;return void 0!==this.slides[t]&&(this.$_slide=this.slides[t].$el,this.slideIndex=t),this},s.prototype.hasNexFrame=function(){return void 0!==this._getCurrentFrames()[this.frameIndex+1]},s.prototype.nextFrame=function(){var t=this._getCurrentFrames(),e=this.frameIndex+1;return void 0!==t[e]&&(this.$_frame=t[e].$el,this.frameIndex=e,this._resetFinishedState()),this},s.prototype.hasPrevFrame=function(){return void 0!==this._getCurrentFrames()[this.frameIndex-1]},s.prototype.prevFrame=function(){var t=this._getCurrentFrames(),e=this.frameIndex-1;return void 0!==t[e]&&(this.$_frame=t[e].$el,this.frameIndex=e,this._resetFinishedState()),this},s.prototype.walkCurrentFrames=function(t){return this._getCurrentFrames().forEac
1h(t),this},s.prototype.setFirstFrame=function(){},s.prototype.setNotFinishedFrame=function(){var t=this._getCurrentFrames(),e=t.find(function(t){return!t.finished});return void 0===e?(t=t[t.length-1],this.$_frame=t.$el,this.frameIndex=t.idx):(this.$_frame=e.$el,this.frameIndex=e.idx),this._resetFinishedState(),this},s.prototype.updateCurrentFramesStatuses=function(){for(var s=this,i=this._getCurrentFrames(),t=0;t<i.length;t++)(t=>{var e=i[t].$el;e.removeClass(s.activeFrameStatus),t===s.frameIndex&&(e.addClass(s.activeFrameStatus),setTimeout(function(){e.addClass("animate")},50))})(t);return this},s.prototype.resetCurrentFramesStatuses=function(){for(var t=this._getCurrentFrames(),e=0;e<t.length;e++)t[e].$el.removeClass(this.activeFrameStatus);return this},s.prototype.setFinishedCurrentFrame=function(t){t=void 0===t||!!t;var e=this._getCurrentFrames();return void 0!==e[this.frameIndex]&&(e[this.frameIndex].finished=t),this},s.prototype._resetFinishedState=function(){var e=this,t=this._getCurrentFrames();this.slides[this.slideIndex].frames=t.map(function(t){return t.idx>=e.frameIndex&&(t.finished=!1),t})},Object.defineProperties(s.prototype,t),e.prototype.log=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];this.debug&&console.log.apply(console,t)},e.prototype.init=function(){this.debug?this.$debug.show():this.$debug.remove(),this._initState(),this._setupFrameParams(),this.bindEvents();var t=window.location.hash;
1this._isStoriesUrlHash(t)&&(t=t.split("-")[2],this.$el.find('.js-wpstories-preview[data-story="'+t+'"]').trigger("click"))},e.prototype._initState=function(){var n=this,a=[],r=function(e){var s,i;e&&(s=e.data("image"),i=function(t){e.css("background-image","url('"+t+"')"),e.find(".js-img-loader").remove(),e.data("ready",!0),e.trigger("image_loaded.wpstories"),r(a.shift())},h("<img/>").attr("src",s).on("load",function(t){h(t.currentTarget).remove(),i(s)}))};this.$el.find(this.slideItemSelector).each(function(t,e){var e=h(e),r=parseInt(e.data("story"),10);n.state.addSlide(r,e),e.find(n.frameItemSelector).each(function(t,e){var s=h(e),i=s.find("video"),e=parseInt(s.data("frame"),10);s.data("image")?(s.data("ready",!1),a.push(s)):s.data("ready",!0),n.state.addFrame(r,e,s),i.length&&((e=i.get(0)).addEventListener("loadedmetadata",function(t){i.data("duration",t.target.duration)}),e.addEventListener("waiting",function(t){T("waiting",t),s.find(".js-vid-loader").remove(),s.find(".js-wpstories-frame-body").prepend('<div class="loader js-vid-loader"></div>'),n.pause()}),e.addEventListener("canplay",function(t){T("canplay",t),n.state.isPausing&&(s.find(".js-vid-loader").remove(),n.resume())}))})}),r(a.shift()),this.log(this.state)},e.prototype.bindEvents=function(){function r(){a.state.isRunning&&(a.state.setFinishedCurrentFrame(!0),a._finishProgress(),a._next(),a._loop())}function n(){a.state.isRunning&&(a._finishProgress(!0),a._prev(),a._loop())}function s(){a.state.isRunning&&(a._finishProgress(!0),a._nextSlide(),a._loop())}function i(){a.state.isRunning&&(a._finishProgress(!0),a._prevSlide(),a._loop())}var t,a=this,o=(this.$preview.on("click",function(t){t.preventDefault();t=h(t.currentTarget),t=parseInt(t.data("story"),10);a.state.resetCurrentFramesStatuses().setSlide(t).setNotFinishedFrame().updateCurrentFramesStatuses(),a._updateProgressItems(),a.log("[Wpstories]","click on preview",a.state),a.launch()}),this.$closeButton.length&&this.$closeButton.on("click",function(t){a.stop()}),this.$el.find(this.slidesSelector));this.$el.find(this.frameItemSelector).each(function(t,e){e=h(e);e.on(f,function(t,e){var s,i;e&&"a"!==e.target.tagName.toLowerCase()&&"button"!==e.target.tagName.toLowerCase()&&(s=(i=h(e.currentTarget)).offset().left,i.offset().top,i=e.pageX-s,(i>a.frameWidth/2?r:n)())}).on(S,function(){s()}).on(F,function(){i()}).on(m,function(t,e){a.pause()}).on(g,function(t,e){a.resume()}),a._bindMoveUpFollowLink(e),a._bindMoveDownClose(e),a._bindLeftRightMove(e,o,s,i)}),h(document).on("click",function(t){t=h(t.target);t.hasClass("js-wpstories-window-prev")?n():t.hasClass("js-wpstories-window-next")?r():t.closest(".js-wpstories-preview").length||t.closest(".wpstories-window-in").length||a.stop()}),h(window).resize(function(){clearTimeout(t),t=setTimeout(function(){a._setupFrameParams(),a._changeSlide(),a._changeFrame(),a._changeUrl()},100)}),h(document).on("keyup",function(t){switch(t.keyCode){case 27:a.stop();break;case 37:n();break;case 39:r()}}),this.$el.find(".js-wpstories-button").on("click",function(t){t=h(t.currentTarget).parents(a.frameItemSelector);document.dispatchEvent(new CustomEvent("wpstories_follow_link",{detail:{$frame:t}}))})},e.prototype._bindMoveDownClose=function(t){var e,s,i,r,n=this,a=t.parents(this.slideItemSelector);t.on($,function(){n.pause(),n.$window.css("background","none"),r=a.css("transition"),a.css("transition","none"),e=p,i=setInterval(function(){(s=(s=parseInt(p.y-e.y,10))<0?0:s)>.2*n.frameHeight&&(clearInterval(i),n.stop());var t=100*(1-s/(.2*n.frameHeight));a.css("transform","translate3d(0px, "+s+"px, 0px)").css("opacity",t+"%")},50)}).on(I,function(){n.resume(),clearInterval(i),n.$window.css("background","#ffffff"),a.css("transform","translate3d(0px, 0px, 0px)").css("transition",r).css("opacity","100%"),n.state.isRunning&&s>.1*n.frameHeight&&n.stop()})},e.prototype._bindMoveUpFollowLink=function(e){var s,i,r,n=this;e.data("link")&&e.on(x,function(){n.pause(),s=p,r=setInterval(function(){var t;i=parseInt(p.y-s.y,10),Math.abs(i)>.1*n.frameHeight&&(clearInterval(r),t=parseInt(e.data("link-open-new-tab"))?"_blank":"_self",document.dispatchEvent(new CustomEvent("wpstories_follow_link",{detail:{$frame:e}})),h('<a href="'+e.data("link")+'" target="'+t+'" rel="noopener"></a>')[0].click())},50)}).on(b,function(){n.resume(),clearInterval(r)})},e.prototype._bindLeftRightMove=function(e,s,i,r){var n,a,o,h,d=this;
1[_,w].forEach(function(t){e.on(t,function(){d.pause(),o=s.css("transition"),s.css("transition","none"),n=p,h=setInterval(function(){t=p.x-n.x,t=Math.abs(t);var t=((e=d.frameWidth+.2*d.frameWidth)-t)/e+.75,e=(T("acceleration:",t),(a=(p.x-n.x)*t)-d.frameWidth*d.state.slideIndex);s.css("transform","translate3d("+e+"px, 0px, 0px)")},16)})}),[y,v].forEach(function(t){e.on(t,function(){clearInterval(h);var t=d.frameWidth*d.state.slideIndex;s.css("transform","translate3d(-"+t+"px, 0px, 0px)").css("transition",o),Math.abs(a)>d.frameWidth/2-.05*d.frameWidth?0<a?d.state.hasPrevSlide()?r():d.stop():i():d.resume()})})},e.prototype.launch=function(){this.$overlay.show(),this.$container.css("display","flex"),h("body").addClass("wpstories-body-window-open"),this.state.isRunning=!0,a(this.state.$frame).play(),this._changeSlide(),this._changeFrame(),this._changeUrl(),this._loop()},e.prototype.stop=function(){this.$overlay.hide(),this.$container.hide(),h("body").removeClass("wpstories-body-window-open"),this.state.isRunning=!1,this.state.isPausing=!1,a(this.state.$frame).stop(),this._finishProgress(!0);var t=window.location.href.split("#")[0];this.origHash.length&&(t+=this.origHash),history.replaceState(null,"",t)},e.prototype.pause=function(){a(this.state.$frame).pause(),this.state.isPausing=!0;var t=this.state.frameIndex;this.state.$slide.find(this.progressItemSelector+'[data-frame="'+t+'"]').stop()},e.prototype.resume=function(){this.state.isPausing=!1,this._loop()},e.prototype._finishProgress=function(t){"function"==typeof this.finishProgressCallback&&(this.finishProgressCallback(t),this.finishProgressCallback=null)},e.prototype._loop=function(){var t,e,s,i,r,n=this;this.state.isRunning&&((t=this.state.$frame).data("ready")?(i=this.state.frameIndex,s=this.state.$slide.find(this.progressItemSelector+'[data-frame="'+i+'"]'),this.finishProgressCallback=function(t){n.state.setFinishedCurrentFrame(!t),a(n.state.$frame).stop(),s.stop(),s.removeData("progress")},r=(i=a(t)).duration(this.storyDuration),s.data("progress")&&(r=parseInt((1-s.data("progress")/100)*r,10)),i.play(),s.animate({width:"100%"},{duration:r,queue:!1,easing:"linear",complete:function(){a(n.state.$frame).stop(),s.removeData("progress"),n.state.setFinishedCurrentFrame(!0),n._next(),n._loop()},step:function(t){s.data("progress",t)}})):(e=function(){n.state.isPausing||n._loop(),t.off("image_loaded.wpstories",e)},t.off("image_loaded.wpstories",e).on("image_loaded.wpstories",e)))},e.prototype._updateProgressItems=function(){var e=this;this.state.walkCurrentFrames(function(t){e.state.$slide.find(e.progressItemSelector+'[data-frame="'+t.idx+'"]').css("width",t.finished?"100%":"0")})},e.prototype._next=function(){this.state.hasNexFrame()?(this.state.nextFrame().updateCurrentFramesStatuses(),this._changeFrame(),this._changeUrl(),this._updateProgressItems()):this._nextSlide()},e.prototype._prev=function(){this.state.hasPrevFrame()?(this.state.prevFrame().updateCurrentFramesStatuses(),this._changeFrame(),this._changeUrl(),this._updateProgressItems()):this._prevSlide()},e.prototype._nextSlide=function(){this.state.hasNexSlide()?(this.state.resetCurrentFramesStatuses().nextSlide().setNotFinishedFrame().updateCurrentFramesStatuses(),this._changeFrame(),this._changeUrl(),this._changeSlide(),this._updateProgressItems()):this.stop()},e.prototype._prevSlide=function(){this.state.hasPrevSlide()&&(this.state.resetCurrentFramesStatuses().prevSlide().setNotFinishedFrame().updateCurrentFramesStatuses(),this._changeFrame(),this._changeUrl(),this._changeSlide()),this._updateProgressItems()},e.prototype._changeFrame=function(){var t,e;null!==this.state.$frame&&(this.$el.find(this.frameItemSelector).removeClass("animate"),(t=this.state.$frame).data("image")?this.$overlayBg.css("background-image",'url("'+t.data("image")+'")'):this.$overlayBg.css("background-image",t.css("background-image")),e=this.frameWidth*this.state.frameIndex,this.state.$frame.parents(this.framesSelector).css("transform","translate3d(-"+e+"px, 0px, 0px)"),(e=t.find(this.buttonSelector)).length&&t.find(".js-wpstories-frame-body").css({"padding-bottom":parseInt(e.height()+50,10)}),document.dispatchEvent(new CustomEvent("wpstories_show_frame",{detail:{$frame:t}})))},e.prototype._changeSlide=function(){var t;null!==this.state.$slide&&(t=this.frameWidth*this.state.slideIndex,this.$el.find(this.slidesSelector).css("transform","translate3d(-"+t+"px, 0px, 0px)"))},e.prototype._changeUrl=function(){var t,e=this.state.$frame;null!==e&&(t=this.group,e=e.data("story"),t="#"+this.storyHashPrefix+"-"+t+"-"+e,history.replaceState(null,"",t))},e.prototype._isStoriesUrlHash=function(t){t=(t="#"===t.substr(0,1)?t.substr(1):t).split("-");return 3===t.length&&t[0]===this.storyHashPrefix&&t[1]===this.group}
1,e.prototype._setupFrameParams=function(){var e=this,t=h(window).width(),s=h(window).height(),s=(this.frameWidth=parseInt(s*this.ratio,10),t/(this.frameHeight=s)<this.ratio&&(this.frameWidth=t,this.frameHeight=parseInt(t/this.ratio,10)),this.debug&&(this.$debug.html(""),this.$debug.append("frame_width: "+this.frameWidth+"px<br>"),this.$debug.append("frame_height: "+this.frameHeight+"px<br>"),this.$debug.append("clientWidth: "+document.documentElement.clientWidth+"px<br>"),this.$debug.append("clientHeight: "+document.documentElement.clientHeight+"px<br>"),this.$debug.append("window.Width: "+h(window).width()+"px<br>"),this.$debug.append("window.Height: "+h(window).height()+"px<br>")),this.$window.css({width:this.frameWidth+"px",height:this.frameHeight+"px"}),this._setWindowSizeClass(),.01*window.innerHeight);document.documentElement.style.setProperty("--vh",s+"px"),this.state.slides.forEach(function(t){t.$el.css({width:e.frameWidth+"px","max-width":e.frameWidth+"px",height:e.frameHeight+"px"}),t.frames.forEach(function(t){t.$el.css({width:e.frameWidth+"px",height:e.frameHeight+"px"})})})},e.prototype._setWindowSizeClass=function(){for(var t=this.$window.attr("class"),e=t?t.split(" "):[],s=[],i=0;i<e.length;i++)e[i].indexOf("wpstories-window--size-")<0&&s.push(e[i]);t="wpstories-window--size-";this.frameWidth<=350?t+="s":this.frameWidth<=450?t+="m":t+="l",s.push(t),this.$window.attr("class",s.join(" "))},!0);h(".js-wpstories-serialized").each(function(t,e){try{var s=h(e),i=s.data("content"),r=decodeURIComponent(atob(i));s.after('<div class="js-wpstories-group-wrap">'+r+"</div>"),s.remove()}catch(t){console.error(t),O=!1}}).promise().done(function(){O&&h(document).find(".js-wpstories-group-wrap").each(function(){var t=h(this);new e(t,wpstories_globals).init()})})});

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.