PageSourceSearch

https://stella-farma.ru/wp-content/plugins/wpstories/assets/public/js/scripts.min.js

js stella-farma.ru collected 2026-10-05 20:15:04 UTC 18,569 bytes, 1 lines download raw bytes

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