ok

Mini Shell

Direktori : /home/importfo/public_html/chamundafurnitechindustry.in/assets/js/
Upload File :
Current File : //home/importfo/public_html/chamundafurnitechindustry.in/assets/js/imagesloaded.js

!function(t){"use strict";var e=t.jQuery,i=t.console,o=void 0!==i;function n(t,e){for(var i in e)t[i]=e[i];return t}var r=Object.prototype.toString;function s(t){var e,i=[];if(e=t,"[object Array]"===r.call(e))i=t;else if("number"==typeof t.length)for(var o=0,n=t.length;o<n;o++)i.push(t[o]);else i.push(t);return i}function h(t,r){function h(t,i,o){if(!(this instanceof h))return new h(t,i);"string"==typeof t&&(t=document.querySelectorAll(t)),this.elements=s(t),this.options=n({},this.options),"function"==typeof i?o=i:n(this.options,i),o&&this.on("always",o),this.getImages(),e&&(this.jqDeferred=new e.Deferred);var r=this;setTimeout(function(){r.check()})}h.prototype=new t,h.prototype.options={},h.prototype.getImages=function(){this.images=[];for(var t=0,e=this.elements.length;t<e;t++){var i=this.elements[t];"IMG"===i.nodeName&&this.addImage(i);for(var o=i.querySelectorAll("img"),n=0,r=o.length;n<r;n++){var s=o[n];this.addImage(s)}}},h.prototype.addImage=function(t){var e=new f(t);this.images.push(e)},h.prototype.check=function(){var t=this,e=0,n=this.images.length;if(this.hasAnyBroken=!1,n)for(var r=0;r<n;r++){var s=this.images[r];s.on("confirm",h),s.check()}else this.complete();function h(r,s){return t.options.debug&&o&&i.log("confirm",r,s),t.progress(r),++e===n&&t.complete(),!0}},h.prototype.progress=function(t){this.hasAnyBroken=this.hasAnyBroken||!t.isLoaded,this.emit("progress",this,t),this.jqDeferred&&this.jqDeferred.notify(this,t)},h.prototype.complete=function(){var t=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emit(t,this),this.emit("always",this),this.jqDeferred){var e=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[e](this)}},e&&(e.fn.imagesLoaded=function(t,i){return new h(this,t,i).jqDeferred.promise(e(this))});var a={};function f(t){this.img=t}return f.prototype=new t,f.prototype.check=function(){var t=a[this.img.src];if(t)this.useCached(t);else if(a[this.img.src]=this,this.img.complete&&void 0!==this.img.naturalWidth)this.confirm(0!==this.img.naturalWidth,"naturalWidth");else{var e=this.proxyImage=new Image;r.bind(e,"load",this),r.bind(e,"error",this),e.src=this.img.src}},f.prototype.useCached=function(t){if(t.isConfirmed)this.confirm(t.isLoaded,"cached was confirmed");else{var e=this;t.on("confirm",function(t){return e.confirm(t.isLoaded,"cache emitted confirmed"),!0})}},f.prototype.confirm=function(t,e){this.isConfirmed=!0,this.isLoaded=t,this.emit("confirm",this,e)},f.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},f.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindProxyEvents()},f.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindProxyEvents()},f.prototype.unbindProxyEvents=function(){r.unbind(this.proxyImage,"load",this),r.unbind(this.proxyImage,"error",this)},h}"function"==typeof define&&define.amd?define(["eventEmitter","eventie"],h):t.imagesLoaded=h(t.EventEmitter,t.eventie)}(window);

Zerion Mini Shell 1.0