PageSourceSearch

http://www.iflfinanceltd.com/src/assets/js/imagesloaded.js

js iflfinanceltd.com collected 2026-10-09 22:40:21 UTC 8,125 bytes, 167 lines download raw bytes

vendor: 4,325 bytes, lines 1-110
1
2
3/*!
4 * imagesLoaded PACKAGED v4.1.1
5 * JavaScript is all like "You images are done yet or what?"
6 * MIT License
7 */
8
9! function (t, e) {
10    "function" == typeof define && define.amd ? define("ev-emitter/ev-emitter", e) : "object" == typeof module && module.exports ? module.exports = e() : t.EvEmitter = e()
11}("undefined" != typeof window ? window : this, function () {
12    function t() { }
13    var e = t.prototype;
14    return e.on = function (t, e) {
15        if (t && e) {
16            var i = this._events = this._events || {},
17                n = i[t] = i[t] || [];
18            return -1 == n.indexOf(e) && n.push(e), this
19        }
20    }, e.once = function (t, e) {
21        if (t && e) {
22            this.on(t, e);
23            var i = this._onceEvents = this._onceEvents || {},
24                n = i[t] = i[t] || {};
25            return n[e] = !0, this
26        }
27    }, e.off = function (t, e) {
28        var i = this._events && this._events[t];
29        if (i && i.length) {
30            var n = i.indexOf(e);
31            return -1 != n && i.splice(n, 1), this
32        }
33    }, e.emitEvent = function (t, e) {
34        var i = this._events && this._events[t];
35        if (i && i.length) {
36            var n = 0,
37                o = i[n];
38            e = e || [];
39            for (var r = this._onceEvents && this._onceEvents[t]; o;) {
40                var s = r && r[o];
41                s && (this.off(t, o), delete r[o]), o.apply(this, e), n += s ? 0 : 1, o = i[n]
42            }
43            return this
44        }
45    }, t
46}),
47    function (t, e) {
48        "use strict";
49        "function" == typeof define && define.amd ? define(["ev-emitter/ev-emitter"], function (i) {
50            return e(t, i)
51        }) : "object" == typeof module && module.exports ? module.exports = e(t, require("ev-emitter")) : t.imagesLoaded = e(t, t.EvEmitter)
52    }(window, function (t, e) {
53        function i(t, e) {
54            for (var i in e) t[i] = e[i];
55            return t
56        }
57
58        function n(t) {
59            var e = [];
60            if (Array.isArray(t)) e = t;
61            else if ("number" == typeof t.length)
62                for (var i = 0; i < t.length; i++) e.push(t[i]);
63            else e.push(t);
64            return e
65        }
66
67        function o(t, e, r) {
68            return this instanceof o ? ("string" == typeof t && (t = document.querySelectorAll(t)), this.elements = n(t), this.options = i({}, this.options), "function" == typeof e ? r = e : i(this.options, e), r && this.on("always", r), this.getImages(), h && (this.jqDeferred = new h.Deferred), void setTimeout(function () {
69                this.check()
70            }.bind(this))) : new o(t, e, r)
71        }
72
73        function r(t) {
74            this.img = t
75        }
76
77        function s(t, e) {
78            this.url = t, this.element = e, this.img = new Image
79        }
80        var h = t.jQuery,
81            a = t.console;
82        o.prototype = Object.create(e.prototype), o.prototype.options = {}, o.prototype.getImages = function () {
83            this.images = [], this.elements.forEach(this.addElementImages, this)
84        }, o.prototype.addElementImages = function (t) {
85            "IMG" == t.nodeName && this.addImage(t), this.options.background === !0 && this.addElementBackgroundImages(t);
86            var e = t.nodeType;
87            if (e && d[e]) {
88                for (var i = t.querySelectorAll("img"), n = 0; n < i.length; n++) {
89                    var o = i[n];
90                    this.addImage(o)
91                }
92                if ("string" == typeof this.options.background) {
93                    var r = t.querySelectorAll(this.options.background);
94                    for (n = 0; n < r.length; n++) {
95                        var s = r[n];
96                        this.addElementBackgroundImages(s)
97                    }
98                }
99            }
100        };
101        var d = {
102            1: !0,
103            9: !0,
104            11: !0
105        };
106        return o.prototype.addElementBackgroundImages = function (t) {
107            var e = getComputedStyle(t);
108            if (e)
109                for (var i = /url\((['"])?(.*?)\1\)/gi, n = i.exec(e.backgroundImage); null !== n;) {
110                    var o = n && n[2];
vendor: 3,800 bytes, lines 111-167
111                    o && this.addBackground(o, t), n = i.exec(e.backgroundImage)
112                }
113        }, o.prototype.addImage = function (t) {
114            var e = new r(t);
115            this.images.push(e)
116        }, o.prototype.addBackground = function (t, e) {
117            var i = new s(t, e);
118            this.images.push(i)
119        }, o.prototype.check = function () {
120            function t(t, i, n) {
121                setTimeout(function () {
122                    e.progress(t, i, n)
123                })
124            }
125            var e = this;
126            return this.progressedCount = 0, this.hasAnyBroken = !1, this.images.length ? void this.images.forEach(function (e) {
127                e.once("progress", t), e.check()
128            }) : void this.complete()
129        }, o.prototype.progress = function (t, e, i) {
130            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: " + i, t, e)
131        }, o.prototype.complete = function () {
132            var t = this.hasAnyBroken ? "fail" : "done";
133            if (this.isComplete = !0, this.emitEvent(t, [this]), this.emitEvent("always", [this]), this.jqDeferred) {
134                var e = this.hasAnyBroken ? "reject" : "resolve";
135                this.jqDeferred[e](this)
136            }
137        }, r.prototype = Object.create(e.prototype), r.prototype.check = function () {
138            var t = this.getIsImageComplete();
139            return t ? 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))
140        }, r.prototype.getIsImageComplete = function () {
141            return this.img.complete && void 0 !== this.img.naturalWidth
142        }, r.prototype.confirm = function (t, e) {
143            this.isLoaded = t, this.emitEvent("progress", [this, this.img, e])
144        }, r.prototype.handleEvent = function (t) {
145            var e = "on" + t.type;
146            this[e] && this[e](t)
147        }, r.prototype.onload = function () {
148            this.confirm(!0, "onload"), this.unbindEvents()
149        }, r.prototype.onerror = function () {
150            this.confirm(!1, "onerror"), this.unbindEvents()
151        }, r.prototype.unbindEvents = function () {
152            this.proxyImage.removeEventListener("load", this), this.proxyImage.removeEventListener("error", this), this.img.removeEventListener("load", this), this.img.removeEventListener("error", this)
153        }, s.prototype = Object.create(r.prototype), s.prototype.check = function () {
154            this.img.addEventListener("load", this), this.img.addEventListener("error", this), this.img.src = this.url;
155            var t = this.getIsImageComplete();
156            t && (this.confirm(0 !== this.img.naturalWidth, "naturalWidth"), this.unbindEvents())
157        }, s.prototype.unbindEvents = function () {
158            this.img.removeEventListener("load", this), this.img.removeEventListener("error", this)
159        }, s.prototype.confirm = function (t, e) {
160            this.isLoaded = t, this.emitEvent("progress", [this, this.element, e])
161        }, o.makeJQueryPlugin = function (e) {
162            e = e || t.jQuery, e && (h = e, h.fn.imagesLoaded = function (t, e) {
163                var i = new o(this, t, e);
164                return i.jqDeferred.promise(h(this))
165            })
166        }, o.makeJQueryPlugin(), o
167    });

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.