blazy-8.x-2.x-dev/js/base/io/bio.min.js

js/base/io/bio.min.js
!function(i,e){"use strict";var s="Bio",t=i.dBlazy;t.isAmd?define([s,t,i],e):"object"==typeof exports?module.exports=e(s,t,i):i[s]=e(s,t,i)}(this||module||{},function(s,h,f){"use strict";h.isAmd&&(f=window);var t,o,n=f.document,r=n,v="bio",p={},a=0,e=0,l=0,d="b-bg",b="is-b-visible",u=v+".intersecting "+v+":intersecting",g=".media",y="addClass",m="removeClass",c=!1,z=25,C=0,w=h.observer,L=h.viewport;function i(i){var e=h.extend({},o,this);return e.name=s,e.options=t=h.extend({},h._defaults,i||{}),d=t.bgClass||d,z=t.validateDelay||z,g=t.parent||g,r=t.root||r,setTimeout(function(){e.reinit()}),e}function x(i,e){var s=this,t=s.options,o=t.selector,n=s.count,r=s.ioObserver,d=t.visibleClass||e||!1;a===n-1&&(h.trigger(f,v+":done",{options:t}),d||s.destroyQuietly()),r&&((o=w.hiddenChild(i,o))&&(i=o),s.isLoaded(i)&&!e&&(t.isMedia&&!d&&r.unobserve(i),a++)),i.bhit&&!e||(s.lazyLoad(i,p),h.isFun(t.intersecting)&&t.intersecting(i,t),h.trigger(i,u,{options:t}),l++,i.bhit=!0)}function A(i){var n=this,r=n.options,d=L.vp||{},a=L.ww||0,e=i[0],l=h.isBlur(e),e=L.isResized(n,e),u=r.visibleClass,c=h.isBool(u)&&u;if(e)p=L.update(r),L.onresizing(n,p),0<C&&(e={winData:p,entries:n.elms,currentWidth:a,oldWidth:C,enlarged:C<a},C!==a?h.trigger(f,v+":resizing",e):h.trigger(f,v+":resized",e),n.resizeTick++);else if(n.destroyed&&!u)return;h.each(i,function(i){var e=i.target||i,s=L.isResized(n,i),t=L.isVisible(i,d),o=h.closest(e,g)||e;l=l&&!h.hasClass(o,"is-b-animated"),t?(n.isLoaded(e)||h[y](o,b),x.call(n,e),n.isLoaded(e)&&((l||c)&&h[y](o,b),c||setTimeout(function(){h[m](o,b)},601))):h[m](o,b),u&&h.isStr(u)&&h[t?y:m](o,u),s&&0<C&&!l&&C!==a&&n.resizing(e,p),h.isFun(r.observing)&&r.observing(i,t,r)}),C=a}return(o=i.prototype).constructor=i,o.count=0,o.erCount=0,o.resizeTick=0,o.destroyed=!1,o.options={},o.lazyLoad=function(i,e){},o.loadImage=function(i,e,s){},o.resizing=function(i,e){},o.prepare=function(){},o.windowData=function(){return h.isUnd(p.vp)?L.windowData(this.options,!0):p},o.load=function(i,e,s){var t=this;i=i&&h.toArray(i),h.isUnd(s)||(t.options=h.extend({},t.options,s||{})),e=e||t.options.loadInvisible,h.each(i,function(i){(t.isValid(i)||h.isElm(i)&&e)&&x.call(t,i,e)})},o.isLoaded=function(i){return h.hasClass(i,this.options.successClass)},o.isValid=function(i){return h.isElm(i)&&!this.isLoaded(i)},o.revalidate=function(i){(!0===i||this.count!==l)&&e<l&&(this.elms=h.findAll(r,h.selector(this.options))).length&&(this.observe(!0),e++)},o.destroyQuietly=function(i){var e=this.options;this.destroyed||!i&&!h.isUnd(Drupal.io)||(e=h.find(n,h.selector(e,":not(."+e.successClass+")")),h.isElm(e)||this.destroy(i))},o.destroy=function(i){var e=this,s=e.options,t=e.ioObserver,s=a===e.count-1&&s.disconnect;e.destroyed||0<e.erCounted&&!i||(s||i)&&(t&&t.disconnect(),w.unload(),e.count=0,e.elms=[],e.ioObserver=null,e.destroyed=!0)},o.observe=function(i){var e=this.elms;i=i||this.destroyed,c&&!i||(p=w.init(this,A,e,!0),this.destroyed=!1,w.observe(),c=!0)},o.reinit=function(){this.destroyed=!0,a=0,function(i){i.prepare();var e=h.findAll(r,h.selector(i.options));i.elms=e,i.count=e.length,i._raf=[],i._queue=[],i.withIo=!0,i.observe(!0)}(this)},i});

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc