/
home
/
suroeste
/
public_html
/
wp-content
/
themes
/
ewebot
/
dist
/
js
/
woocommerce
/
/home/suroeste/public_html/wp-content/themes/ewebot/dist/js/woocommerce
mkdir
upload
Name
Size
Mode
Actions
infinite-scroll.js
23907
0644
edit
dl
rm
theme-woo.js
14770
0644
edit
dl
rm
Edit:
/home/suroeste/public_html/wp-content/themes/ewebot/dist/js/woocommerce/infinite-scroll.js
(23907B)
!function(t){var e={};function n(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(i,o,function(e){return t[e]}.bind(null,o));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s=162)}({162:function(t,e,n){var i,o,r,s,a,l,h,c,u,d,p,f,g,m,v,y,S;function b(t){return(b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}S=window,v=[n(2)],void 0===(y=function(t){return function(t,e){"use strict";function n(n,r,a){function l(t,e,i){var o,r="$()."+n+'("'+e+'")';return t.each((function(t,l){var h=a.data(l,n);if(h){var c=h[e];if(c&&"_"!=e.charAt(0)){var u=c.apply(h,i);o=void 0===o?u:o}else s(r+" is not a valid method")}else s(n+" not initialized. Cannot call methods, i.e. "+r)})),void 0!==o?o:t}function h(t,e){t.each((function(t,i){var o=a.data(i,n);o?(o.option(e),o._init()):(o=new r(i,e),a.data(i,n,o))}))}(a=a||e||t.jQuery)&&(r.prototype.option||(r.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[n]=function(t){if("string"==typeof t){var e=o.call(arguments,1);return l(this,t,e)}return h(this,t),this},i(a))}function i(t){!t||t&&t.bridget||(t.bridget=n)}var o=Array.prototype.slice,r=t.console,s=void 0===r?function(){}:function(t){r.error(t)};return i(e||t.jQuery),n}(S,t)}.apply(e,v))||(t.exports=y),"undefined"!=typeof window&&window,r={id:"ev-emitter/ev-emitter",exports:{},loaded:!1},i="function"==typeof(o=function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var n=this._events=this._events||{},i=n[t]=n[t]||[];return-1==i.indexOf(e)&&i.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var n=this._onceEvents=this._onceEvents||{};return(n[t]=n[t]||{})[e]=!0,this}},e.off=function(t,e){var n=this._events&&this._events[t];if(n&&n.length){var i=n.indexOf(e);return-1!=i&&n.splice(i,1),this}},e.emitEvent=function(t,e){var n=this._events&&this._events[t];if(n&&n.length){n=n.slice(0),e=e||[];for(var i=this._onceEvents&&this._onceEvents[t],o=0;o<n.length;o++){var r=n[o];i&&i[r]&&(this.off(t,r),delete i[r]),r.apply(this,e)}return this}},e.allOff=function(){delete this._events,delete this._onceEvents},t})?o.call(r.exports,n,r.exports,r):o,r.loaded=!0,void 0!==i||(i=r.exports),function(t,e){"use strict";l={id:"desandro-matches-selector/matches-selector",exports:{},loaded:!1},s="function"==typeof(a=function(){var t=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],n=0;n<e.length;n++){var i=e[n]+"MatchesSelector";if(t[i])return i}}();return function(e,n){return e[t](n)}})?a.call(l.exports,n,l.exports,l):a,l.loaded=!0,void 0!==s||(s=l.exports)}(window),function(t,n){h=function(e){return function(t,e){var n={extend:function(t,e){for(var n in e)t[n]=e[n];return t},modulo:function(t,e){return(t%e+e)%e}},i=Array.prototype.slice;n.makeArray=function(t){return Array.isArray(t)?t:null==t?[]:"object"==b(t)&&"number"==typeof t.length?i.call(t):[t]},n.removeFrom=function(t,e){var n=t.indexOf(e);-1!=n&&t.splice(n,1)},n.getParent=function(t,n){for(;t.parentNode&&t!=document.body;)if(t=t.parentNode,e(t,n))return t},n.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},n.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},n.filterFindElements=function(t,i){t=n.makeArray(t);var o=[];return t.forEach((function(t){if(t instanceof HTMLElement){if(!i)return void o.push(t);e(t,i)&&o.push(t);for(var n=t.querySelectorAll(i),r=0;r<n.length;r++)o.push(n[r])}})),o},n.debounceMethod=function(t,e,n){n=n||100;var i=t.prototype[e],o=e+"Timeout";t.prototype[e]=function(){var t=this[o];clearTimeout(t);var e=arguments,r=this;this[o]=setTimeout((function(){i.apply(r,e),delete r[o]}),n)}},n.docReady=function(t){var e=document.readyState;"complete"==e||"interactive"==e?setTimeout(t):document.addEventListener("DOMContentLoaded",t)},n.toDashed=function(t){return t.replace(/(.)([A-Z])/g,(function(t,e,n){return e+"-"+n})).toLowerCase()};var o=t.console;return n.htmlInit=function(e,i){n.docReady((function(){var r=n.toDashed(i),s="data-"+r,a=document.querySelectorAll("["+s+"]"),l=document.querySelectorAll(".js-"+r),h=n.makeArray(a).concat(n.makeArray(l)),c=s+"-options",u=t.jQuery;h.forEach((function(t){var n,r=t.getAttribute(s)||t.getAttribute(c);try{n=r&&JSON.parse(r)}catch(e){return void(o&&o.error("Error parsing "+s+" on "+t.className+": "+e))}var a=new e(t,n);u&&u.data(t,i,a)}))}))},n}(t,e)}.apply(e,v=[s])}(window),function(t,n){c=function(e,n){return function(t,e,n){function i(t,e){var s=n.getQueryElement(t);if(s){if((t=s).infiniteScrollGUID){var a=r[t.infiniteScrollGUID];return a.option(e),a}this.element=t,this.options=n.extend({},i.defaults),this.option(e),o&&(this.$element=o(this.element)),this.create()}else console.error("Bad element for InfiniteScroll: "+(s||t))}var o=t.jQuery,r={};i.defaults={},i.create={},i.destroy={};var s=i.prototype;n.extend(s,e.prototype);var a=0;s.create=function(){var t=this.guid=++a;if(this.element.infiniteScrollGUID=t,r[t]=this,this.pageIndex=1,this.loadCount=0,this.updateGetPath(),this.getPath&&this.getPath())for(var e in this.updateGetAbsolutePath(),this.log("initialized",[this.element.className]),this.callOnInit(),i.create)i.create[e].call(this);else console.error("Disabling InfiniteScroll")},s.option=function(t){n.extend(this.options,t)},s.callOnInit=function(){var t=this.options.onInit;t&&t.call(this,this)},s.dispatchEvent=function(t,e,n){this.log(t,n);var i=e?[e].concat(n):n;if(this.emitEvent(t,i),o&&this.$element){var r=t+=".infiniteScroll";if(e){var s=o.Event(e);s.type=t,r=s}this.$element.trigger(r,n)}};var l={initialized:function(t){return"on "+t},request:function(t){return"URL: "+t},load:function(t,e){return(t.title||"")+". URL: "+e},error:function(t,e){return t+". URL: "+e},append:function(t,e,n){return n.length+" items. URL: "+e},last:function(t,e){return"URL: "+e},history:function(t,e){return"URL: "+e},pageIndex:function(t,e){return"current page determined to be: "+t+" from "+e}};s.log=function(t,e){if(this.options.debug){var n="[InfiniteScroll] "+t,i=l[t];i&&(n+=". "+i.apply(this,e)),console.log(n)}},s.updateMeasurements=function(){this.windowHeight=t.innerHeight;var e=this.element.getBoundingClientRect();this.top=e.top+t.pageYOffset},s.updateScroller=function(){var e=this.options.elementScroll;if(e){if(this.scroller=!0===e?this.element:n.getQueryElement(e),!this.scroller)throw"Unable to find elementScroll: "+e}else this.scroller=t},s.updateGetPath=function(){var t=this.options.path;if(t){var e=b(t);if("function"!=e)return"string"==e&&t.match("{{#}}")?void this.updateGetPathTemplate(t):void this.updateGetPathSelector(t);this.getPath=t}else console.error("InfiniteScroll path option required. Set as: "+t)},s.updateGetPathTemplate=function(t){this.getPath=function(){var e=this.pageIndex+1;return t.replace("{{#}}",e)}.bind(this);var e=t.replace("{{#}}","(\\d\\d?\\d?)"),n=new RegExp(e),i=location.href.match(n);i&&(this.pageIndex=parseInt(i[1],10),this.log("pageIndex",[this.pageIndex,"template string"]))};var h=[/^(.*?\/?page\/?)(\d\d?\d?)(.*?$)/,/^(.*?\/?\?page=)(\d\d?\d?)(.*?$)/,/(.*?)(\d\d?\d?)(?!.*\d)(.*?$)/];return s.updateGetPathSelector=function(t){var e=document.querySelector(t);if(e){for(var n,i,o=e.getAttribute("href"),r=0;o&&r<h.length;r++){i=h[r];var s=o.match(i);if(s){n=s.slice(1);break}}return n?(this.isPathSelector=!0,this.getPath=function(){var t=this.pageIndex+1;return n[0]+t+n[2]}.bind(this),this.pageIndex=parseInt(n[1],10)-1,void this.log("pageIndex",[this.pageIndex,"next link"])):void console.error("InfiniteScroll unable to parse next link href: "+o)}console.error("Bad InfiniteScroll path option. Next link not found: "+t)},s.updateGetAbsolutePath=function(){var t=this.getPath();if(t.match(/^http/)||t.match(/^\//))this.getAbsolutePath=this.getPath;else{var e=location.pathname,n=e.substring(0,e.lastIndexOf("/"));this.getAbsolutePath=function(){return n+"/"+this.getPath()}}},i.create.hideNav=function(){var t=n.getQueryElement(this.options.hideNav);t&&(t.style.display="none",this.nav=t)},i.destroy.hideNav=function(){this.nav&&(this.nav.style.display="")},s.destroy=function(){for(var t in this.allOff(),i.destroy)i.destroy[t].call(this);delete this.element.infiniteScrollGUID,delete r[this.guid],o&&this.$element&&o.removeData(this.element,"infiniteScroll")},i.throttle=function(t,e){var n,i;return e=e||200,function(){var o=+new Date,r=arguments,s=function(){n=o,t.apply(this,r)}.bind(this);n&&o<n+e?(clearTimeout(i),i=setTimeout(s,e)):s()}},i.data=function(t){var e=(t=n.getQueryElement(t))&&t.infiniteScrollGUID;return e&&r[e]},i.setJQuery=function(t){o=t},n.htmlInit(i,"infinite-scroll"),s._init=function(){},o&&o.bridget&&o.bridget("infiniteScroll",i),i}(t,e,n)}.apply(e,v=[i,h])}(window),function(t,n){u=function(e){return function(t,e){function n(t){for(var e=document.createDocumentFragment(),n=0;t&&n<t.length;n++)e.appendChild(t[n]);return e}function i(t,e){for(var n=t.attributes,i=0;i<n.length;i++){var o=n[i];e.setAttribute(o.name,o.value)}}var o=e.prototype;return e.defaults.loadOnScroll=!0,e.defaults.checkLastPage=!0,e.defaults.responseType="document",e.create.pageLoad=function(){this.canLoad=!0,this.on("scrollThreshold",this.onScrollThresholdLoad),this.on("load",this.checkLastPage),this.options.outlayer&&this.on("append",this.onAppendOutlayer)},o.onScrollThresholdLoad=function(){this.options.loadOnScroll&&this.loadNextPage()},o.loadNextPage=function(){if(!this.isLoading&&this.canLoad){var t=this.getAbsolutePath();this.isLoading=!0;var e=function(e){this.onPageLoad(e,t)}.bind(this),n=function(e){this.onPageError(e,t)}.bind(this);(function(t,e,n,i){var o=new XMLHttpRequest;o.open("GET",t,!0),o.responseType=e||"",o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.onload=function(){if(200==o.status)n(o.response);else{var t=new Error(o.statusText);i(t)}},o.onerror=function(){var e=new Error("Network error requesting "+t);i(e)},o.send()})(t,this.options.responseType,e,n),this.dispatchEvent("request",null,[t])}},o.onPageLoad=function(t,e){return this.options.append||(this.isLoading=!1),this.pageIndex++,this.loadCount++,this.dispatchEvent("load",null,[t,e]),this.appendNextPage(t,e),t},o.appendNextPage=function(t,e){var i=this.options.append;if("document"==this.options.responseType&&i){var o=t.querySelectorAll(i),r=n(o),s=function(){this.appendItems(o,r),this.isLoading=!1,this.dispatchEvent("append",null,[t,e,o])}.bind(this);this.options.outlayer?this.appendOutlayerItems(r,s):s()}},o.appendItems=function(t,e){t&&t.length&&(function(t){for(var e=t.querySelectorAll("script"),n=0;n<e.length;n++){var o=e[n],r=document.createElement("script");i(o,r),r.innerHTML=o.innerHTML,o.parentNode.replaceChild(r,o)}}(e=e||n(t)),this.element.appendChild(e))},o.appendOutlayerItems=function(n,i){var o=e.imagesLoaded||t.imagesLoaded;return o?void o(n,i):(console.error("[InfiniteScroll] imagesLoaded required for outlayer option"),void(this.isLoading=!1))},o.onAppendOutlayer=function(t,e,n){this.options.outlayer.appended(n)},o.checkLastPage=function(t,e){var n=this.options.checkLastPage;if(n){var i,o=this.options.path;if("function"==typeof o)if(!this.getPath())return void this.lastPageReached(t,e);if("string"==typeof n?i=n:this.isPathSelector&&(i=o),i&&t.querySelector)t.querySelector(i)||this.lastPageReached(t,e)}},o.lastPageReached=function(t,e){this.canLoad=!1,this.dispatchEvent("last",null,[t,e])},o.onPageError=function(t,e){return this.isLoading=!1,this.canLoad=!1,this.dispatchEvent("error",null,[t,e]),t},e.create.prefill=function(){if(this.options.prefill){var t=this.options.append;if(!t)return void console.error("append option required for prefill. Set as :"+t);this.updateMeasurements(),this.updateScroller(),this.isPrefilling=!0,this.on("append",this.prefill),this.once("error",this.stopPrefill),this.once("last",this.stopPrefill),this.prefill()}},o.prefill=function(){var t=this.getPrefillDistance();this.isPrefilling=t>=0,this.isPrefilling?(this.log("prefill"),this.loadNextPage()):this.stopPrefill()},o.getPrefillDistance=function(){return this.options.elementScroll?this.scroller.clientHeight-this.scroller.scrollHeight:this.windowHeight-this.element.clientHeight},o.stopPrefill=function(){this.log("stopPrefill"),this.off("append",this.prefill)},e}(t,e)}.apply(e,v=[c])}(window),function(t,n){d=function(e,n){return function(t,e,n){var i=e.prototype;return e.defaults.scrollThreshold=400,e.create.scrollWatch=function(){this.pageScrollHandler=this.onPageScroll.bind(this),this.resizeHandler=this.onResize.bind(this);var t=this.options.scrollThreshold;(t||0===t)&&this.enableScrollWatch()},e.destroy.scrollWatch=function(){this.disableScrollWatch()},i.enableScrollWatch=function(){this.isScrollWatching||(this.isScrollWatching=!0,this.updateMeasurements(),this.updateScroller(),this.on("last",this.disableScrollWatch),this.bindScrollWatchEvents(!0))},i.disableScrollWatch=function(){this.isScrollWatching&&(this.bindScrollWatchEvents(!1),delete this.isScrollWatching)},i.bindScrollWatchEvents=function(e){var n=e?"addEventListener":"removeEventListener";this.scroller[n]("scroll",this.pageScrollHandler),t[n]("resize",this.resizeHandler)},i.onPageScroll=e.throttle((function(){this.getBottomDistance()<=this.options.scrollThreshold&&this.dispatchEvent("scrollThreshold")})),i.getBottomDistance=function(){return this.options.elementScroll?this.getElementBottomDistance():this.getWindowBottomDistance()},i.getWindowBottomDistance=function(){return this.top+this.element.clientHeight-(t.pageYOffset+this.windowHeight)},i.getElementBottomDistance=function(){return this.scroller.scrollHeight-(this.scroller.scrollTop+this.scroller.clientHeight)},i.onResize=function(){this.updateMeasurements()},n.debounceMethod(e,"onResize",150),e}(t,e,n)}.apply(e,v=[c,h])}(window),function(t,n){p=function(e,n){return function(t,e,n){var i=e.prototype;e.defaults.history="replace";var o=document.createElement("a");return e.create.history=function(){if(this.options.history)return o.href=this.getAbsolutePath(),(o.origin||o.protocol+"//"+o.host)==location.origin?void(this.options.append?this.createHistoryAppend():this.createHistoryPageLoad()):void console.error("[InfiniteScroll] cannot set history with different origin: "+o.origin+" on "+location.origin+" . History behavior disabled.")},i.createHistoryAppend=function(){this.updateMeasurements(),this.updateScroller(),this.scrollPages=[{top:0,path:location.href,title:document.title}],this.scrollPageIndex=0,this.scrollHistoryHandler=this.onScrollHistory.bind(this),this.unloadHandler=this.onUnload.bind(this),this.scroller.addEventListener("scroll",this.scrollHistoryHandler),this.on("append",this.onAppendHistory),this.bindHistoryAppendEvents(!0)},i.bindHistoryAppendEvents=function(e){var n=e?"addEventListener":"removeEventListener";this.scroller[n]("scroll",this.scrollHistoryHandler),t[n]("unload",this.unloadHandler)},i.createHistoryPageLoad=function(){this.on("load",this.onPageLoadHistory)},e.destroy.history=i.destroyHistory=function(){this.options.history&&this.options.append&&this.bindHistoryAppendEvents(!1)},i.onAppendHistory=function(t,e,n){if(n&&n.length){var i=n[0],r=this.getElementScrollY(i);o.href=e,this.scrollPages.push({top:r,path:o.href,title:t.title})}},i.getElementScrollY=function(t){return this.options.elementScroll?this.getElementElementScrollY(t):this.getElementWindowScrollY(t)},i.getElementWindowScrollY=function(e){return e.getBoundingClientRect().top+t.pageYOffset},i.getElementElementScrollY=function(t){return t.offsetTop-this.top},i.onScrollHistory=function(){for(var t,e,n=this.getScrollViewY(),i=0;i<this.scrollPages.length;i++){var o=this.scrollPages[i];if(o.top>=n)break;t=i,e=o}t!=this.scrollPageIndex&&(this.scrollPageIndex=t,this.setHistory(e.title,e.path))},n.debounceMethod(e,"onScrollHistory",150),i.getScrollViewY=function(){return this.options.elementScroll?this.scroller.scrollTop+this.scroller.clientHeight/2:t.pageYOffset+this.windowHeight/2},i.setHistory=function(t,e){var n=this.options.history;n&&history[n+"State"]&&(history[n+"State"](null,t,e),this.options.historyTitle&&(document.title=t),this.dispatchEvent("history",null,[t,e]))},i.onUnload=function(){var e=this.scrollPageIndex;if(0!==e){var n=this.scrollPages[e],i=t.pageYOffset-n.top+this.top;this.destroyHistory(),scrollTo(0,i)}},i.onPageLoadHistory=function(t,e){this.setHistory(t.title,e)},e}(t,e,n)}.apply(e,v=[c,h])}(window),window,f=function(t,e){return function(t,e,n){function i(t,e){this.element=t,this.infScroll=e,this.clickHandler=this.onClick.bind(this),this.element.addEventListener("click",this.clickHandler),e.on("request",this.disable.bind(this)),e.on("load",this.enable.bind(this)),e.on("error",this.hide.bind(this)),e.on("last",this.hide.bind(this))}return e.create.button=function(){var t=n.getQueryElement(this.options.button);t&&(this.button=new i(t,this))},e.destroy.button=function(){this.button&&this.button.destroy()},i.prototype.onClick=function(t){t.preventDefault(),this.infScroll.loadNextPage()},i.prototype.enable=function(){this.element.removeAttribute("disabled")},i.prototype.disable=function(){this.element.disabled="disabled"},i.prototype.hide=function(){this.element.style.display="none"},i.prototype.destroy=function(){this.element.removeEventListener("click",this.clickHandler)},e.Button=i,e}(0,t,e)}.apply(e,v=[c,h]),window,g=function(t,e){return function(t,e,n){function i(t){r(t,"none")}function o(t){r(t,"block")}function r(t,e){t&&(t.style.display=e)}var s=e.prototype;return e.create.status=function(){var t=n.getQueryElement(this.options.status);t&&(this.statusElement=t,this.statusEventElements={request:t.querySelector(".infinite-scroll-request"),error:t.querySelector(".infinite-scroll-error"),last:t.querySelector(".infinite-scroll-last")},this.on("request",this.showRequestStatus),this.on("error",this.showErrorStatus),this.on("last",this.showLastStatus),this.bindHideStatus("on"))},s.bindHideStatus=function(t){var e=this.options.append?"append":"load";this[t](e,this.hideAllStatus)},s.showRequestStatus=function(){this.showStatus("request")},s.showErrorStatus=function(){this.showStatus("error")},s.showLastStatus=function(){this.showStatus("last"),this.bindHideStatus("off")},s.showStatus=function(t){o(this.statusElement),this.hideStatusEventElements(),o(this.statusEventElements[t])},s.hideAllStatus=function(){i(this.statusElement),this.hideStatusEventElements()},s.hideStatusEventElements=function(){for(var t in this.statusEventElements)i(this.statusEventElements[t])},e}(0,t,e)}.apply(e,v=[c,h]),window,v=[c,u,d,p,f,g],void 0===(y="function"==typeof(m=function(t){return t})?m.apply(e,v):m)||(t.exports=y),function(n,o){"use strict";void 0===(y=function(t){return function(t,e){function n(t,e){for(var n in e)t[n]=e[n];return t}function i(t,e,o){if(!(this instanceof i))return new i(t,e,o);var r=t;return"string"==typeof t&&(r=document.querySelectorAll(t)),r?(this.elements=function(t){return Array.isArray(t)?t:"object"==b(t)&&"number"==typeof t.length?l.call(t):[t]}(r),this.options=n({},this.options),"function"==typeof e?o=e:n(this.options,e),o&&this.on("always",o),this.getImages(),s&&(this.jqDeferred=new s.Deferred),void setTimeout(this.check.bind(this))):void a.error("Bad element for imagesLoaded "+(r||t))}function o(t){this.img=t}function r(t,e){this.url=t,this.element=e,this.img=new Image}var s=t.jQuery,a=t.console,l=Array.prototype.slice;i.prototype=Object.create(e.prototype),i.prototype.options={},i.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)},i.prototype.addElementImages=function(t){"IMG"==t.nodeName&&this.addImage(t),!0===this.options.background&&this.addElementBackgroundImages(t);var e=t.nodeType;if(e&&h[e]){for(var n=t.querySelectorAll("img"),i=0;i<n.length;i++){var o=n[i];this.addImage(o)}if("string"==typeof this.options.background){var r=t.querySelectorAll(this.options.background);for(i=0;i<r.length;i++){var s=r[i];this.addElementBackgroundImages(s)}}}};var h={1:!0,9:!0,11:!0};return i.prototype.addElementBackgroundImages=function(t){var e=getComputedStyle(t);if(e)for(var n=/url\((['"])?(.*?)\1\)/gi,i=n.exec(e.backgroundImage);null!==i;){var o=i&&i[2];o&&this.addBackground(o,t),i=n.exec(e.backgroundImage)}},i.prototype.addImage=function(t){var e=new o(t);this.images.push(e)},i.prototype.addBackground=function(t,e){var n=new r(t,e);this.images.push(n)},i.prototype.check=function(){function t(t,n,i){setTimeout((function(){e.progress(t,n,i)}))}var e=this;return this.progressedCount=0,this.hasAnyBroken=!1,this.images.length?void this.images.forEach((function(e){e.once("progress",t),e.check()})):void this.complete()},i.prototype.progress=function(t,e,n){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!t.isLoaded,this.emitEvent("progress",[this,t,e]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,t),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&a&&a.log("progress: "+n,t,e)},i.prototype.complete=function(){var t=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(t,[this]),this.emitEvent("always",[this]),this.jqDeferred){var e=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[e](this)}},o.prototype=Object.create(e.prototype),o.prototype.check=function(){return this.getIsImageComplete()?void this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),void(this.proxyImage.src=this.img.src))},o.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},o.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.img,e])},o.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},o.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},o.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},o.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},r.prototype=Object.create(o.prototype),r.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url,this.getIsImageComplete()&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},r.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},r.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.element,e])},i.makeJQueryPlugin=function(e){(e=e||t.jQuery)&&((s=e).fn.imagesLoaded=function(t,e){return new i(this,t,e).jqDeferred.promise(s(this))})},i.makeJQueryPlugin(),i}(n,t)}.apply(e,v=[i]))||(t.exports=y)}("undefined"!=typeof window?window:this)},2:function(t,e){t.exports=jQuery}});
Save
cmd:
run