1/*! 2 * Masonry PACKAGED v3.0.0 3 * Cascading grid layout library 4 * http://masonry.desandro.com 5 * MIT License 6 * by David DeSandro 7 */ 8 9(function(t) { 10 "use strict"; 11 12 function e(t) { 13 if (t) { 14 if ("string" == typeof n[t]) return t; 15 t = t.charAt(0).toUpperCase() + t.slice(1); 16 for (var e, o = 0, r = i.length; r > o; o++) 17 if (e = i[o] + t, "string" == typeof n[e]) return e 18 } 19 } 20 var i = "Webkit Moz ms Ms O".split(" "), 21 n = document.documentElement.style; 22 "function" == typeof define && define.amd ? define(function() { 23 return e 24 }) : t.getStyleProperty = e 25})(window), 26function(t) { 27 "use strict"; 28 29 function e(t) { 30 var e = parseFloat(t), 31 i = -1 === t.indexOf("%") && !isNaN(e); 32 return i && e 33 } 34 35 function i() { 36 for (var t = { 37 width: 0, 38 height: 0, 39 innerWidth: 0, 40 innerHeight: 0, 41 outerWidth: 0, 42 outerHeight: 0 43 }, e = 0, i = s.length; i > e; e++) { 44 var n = s[e]; 45 t[n] = 0 46 } 47 return t 48 } 49 50 function n(t) { 51 function n(t) { 52 if ("string" == typeof t && (t = document.querySelector(t)), t && "object" == typeof t && t.nodeType) { 53 var n = r(t); 54 if ("none" === n.display) return i(); 55 var h = {}; 56 h.width = t.offsetWidth, h.height = t.offsetHeight; 57 for (var p = h.isBorderBox = !(!a || !n[a] || "border-box" !== n[a]), u = 0, f = s.length; f > u; u++) { 58 var d = s[u], 59 c = n[d], 60 l = parseFloat(c); 61 h[d] = isNaN(l) ? 0 : l 62 } 63 var m = h.paddingLeft + h.paddingRight, 64 y = h.paddingTop + h.paddingBottom, 65 g = h.marginLeft + h.marginRight, 66 v = h.marginTop + h.marginBottom, 67 _ = h.borderLeftWidth + h.borderRightWidth, 68 b = h.borderTopWidth + h.borderBottomWidth, 69 L = p && o, 70 E = e(n.width); 71 E !== !1 && (h.width = E + (L ? 0 : m + _)); 72 var I = e(n.height); 73 return I !== !1 && (h.height = I + (L ? 0 : y + b)), h.innerWidth = h.width - (m + _), h.innerHeight = h.height - (y + b), h.outerWidth = h.width + g, h.outerHeight = h.height + v, h 74 } 75 } 76 var o, a = t("boxSizing"); 77 return function() { 78 if (a) { 79 var t = document.createElement("div"); 80 t.style.width = "200px", t.style.padding = "1px 2px 3px 4px", t.style.borderStyle = "solid", t.style.borderWidth = "1px 2px 3px 4px", t.style[a] = "border-box"; 81 var i = document.body || document.documentElement; 82 i.appendChild(t); 83 var n = r(t); 84 o = 200 === e(n.width), i.removeChild(t) 85 } 86 }(), n 87 } 88 var o = document.defaultView, 89 r = o && o.getComputedStyle ? function(t) { 90 return o.getComputedStyle(t, null) 91 } : function(t) { 92 return t.currentStyle 93 }, 94 s = ["paddingLeft", "paddingRight", "paddingTop", "paddingBottom", "marginLeft", "marginRight", "marginTop", "marginBottom", "borderLeftWidth", "borderRightWidth", "borderTopWidth", "borderBottomWidth"]; 95 "function" == typeof define && define.amd ? define(["get-style-property"], n) : t.getSize = n(t.getStyleProperty) 96}(window), 97function(t) { 98 "use strict"; 99 var e = document.documentElement, 100 i = function() {}; 101 e.addEventListener ? i = function(t, e, i) { 102 t.addEventListener(e, i, !1) 103 } : e.attachEvent && (i = function(e, i, n) { 104 e[i + n] = n.handleEvent ? function() { 105 var e = t.event; 106 e.target = e.target || e.srcElement, n.handleEvent.call(n, e) 107 } : function() { 108 var i = t.event; 109 i.target = i.target || i.srcElement, n.call(e, i) 110 }, e.attachEvent("on" + i, e[i + n]) 111 }); 112 var n = function() {}; 113 e.removeEventListener ? n = function(t, e, i) { 114 t.removeEventListener(e, i, !1) 115 } : e.detachEvent && (n = function(t, e, i) { 116 t.detachEvent("on" + e, t[e + i]); 117 try { 118 delete t[e + i] 119 } catch (n) { 120 t[e + i] = void 0 121 } 122 }); 123 var o = {
124 bind: i, 125 unbind: n 126 }; 127 "function" == typeof define && define.amd ? define(o) : t.eventie = o 128}(this), 129function(t) { 130 "use strict"; 131 132 function e(t) { 133 "function" == typeof t && (e.isReady ? t() : r.push(t)) 134 } 135 136 function i(t) { 137 var i = "readystatechange" === t.type && "complete" !== o.readyState; 138 if (!e.isReady && !i) { 139 e.isReady = !0; 140 for (var n = 0, s = r.length; s > n; n++) { 141 var a = r[n]; 142 a() 143 } 144 } 145 } 146 147 function n(n) { 148 return n.bind(o, "DOMContentLoaded", i), n.bind(o, "readystatechange", i), n.bind(t, "load", i), e 149 } 150 var o = t.document, 151 r = []; 152 e.isReady = !1, "function" == typeof define && define.amd ? define(["eventie"], n) : t.docReady = n(t.eventie) 153}(this), 154function(t) { 155 "use strict"; 156 157 function e() {} 158 159 function i(t, e) { 160 if (o) return e.indexOf(t); 161 for (var i = e.length; i--;) 162 if (e[i] === t) return i; 163 return -1 164 } 165 var n = e.prototype, 166 o = Array.prototype.indexOf ? !0 : !1; 167 n._getEvents = function() { 168 return this._events || (this._events = {}) 169 }, n.getListeners = function(t) { 170 var e, i, n = this._getEvents(); 171 if ("object" == typeof t) { 172 e = {}; 173 for (i in n) n.hasOwnProperty(i) && t.test(i) && (e[i] = n[i]) 174 } else e = n[t] || (n[t] = []); 175 return e 176 }, n.getListenersAsObject = function(t) { 177 var e, i = this.getListeners(t); 178 return i instanceof Array && (e = {}, e[t] = i), e || i 179 }, n.addListener = function(t, e) { 180 var n, o = this.getListenersAsObject(t); 181 for (n in o) o.hasOwnProperty(n) && -1 === i(e, o[n]) && o[n].push(e); 182 return this 183 }, n.on = n.addListener, n.defineEvent = function(t) { 184 return this.getListeners(t), this 185 }, n.defineEvents = function(t) { 186 for (var e = 0; t.length > e; e += 1) this.defineEvent(t[e]); 187 return this 188 }, n.removeListener = function(t, e) { 189 var n, o, r = this.getListenersAsObject(t); 190 for (o in r) r.hasOwnProperty(o) && (n = i(e, r[o]), -1 !== n && r[o].splice(n, 1)); 191 return this 192 }, n.off = n.removeListener, n.addListeners = function(t, e) { 193 return this.manipulateListeners(!1, t, e) 194 }, n.removeListeners = function(t, e) { 195 return this.manipulateListeners(!0, t, e) 196 }, n.manipulateListeners = function(t, e, i) { 197 var n, o, r = t ? this.removeListener : this.addListener, 198 s = t ? this.removeListeners : this.addListeners; 199 if ("object" != typeof e || e instanceof RegExp) 200 for (n = i.length; n--;) r.call(this, e, i[n]); 201 else 202 for (n in e) e.hasOwnProperty(n) && (o = e[n]) && ("function" == typeof o ? r.call(this, n, o) : s.call(this, n, o)); 203 return this 204 }, n.removeEvent = function(t) { 205 var e, i = typeof t, 206 n = this._getEvents(); 207 if ("string" === i) delete n[t]; 208 else if ("object" === i) 209 for (e in n) n.hasOwnProperty(e) && t.test(e) && delete n[e]; 210 else delete this._events; 211 return this 212 }, n.emitEvent = function(t, e) { 213 var i, n, o, r = this.getListenersAsObject(t); 214 for (n in r) 215 if (r.hasOwnProperty(n)) 216 for (i = r[n].length; i--;) o = e ? r[n][i].apply(null, e) : r[n][i](), o === !0 && this.removeListener(t, r[n][i]); 217 return this 218 }, n.trigger = n.emitEvent, n.emit = function(t) { 219 var e = Array.prototype.slice.call(arguments, 1); 220 return this.emitEvent(t, e) 221 }, "function" == typeof define && define.amd ? define(function() { 222 return e 223 }) : t.EventEmitter = e 224}(this), 225function(t) { 226 "use strict"; 227 228 function e() {} 229 230 function i(t) { 231 function i(e) { 232 e.prototype.option || (e.prototype.option = function(e) { 233 t.isPlainObject(e) && (this.options = t.extend(!0, this.options, e)) 234 }) 235 } 236 237 function o(e, i) { 238 t.fn[e] = function(o) { 239 if ("string" == typeof o) { 240 for (var s = n.call(arguments, 1), a = 0, h = this.length; h > a; a++) { 241 var p = this[a], 242 u = t.data(p, e); 243 if (u) 244 if (t.isFunction(u[o]) && "_" !== o.charAt(0)) { 245 var f = u[o].apply(u, s); 246 if (void 0 !== f) return f 247 } else r("no such method '" + o + "' for " + e + " instance"); 248 else r("cannot call methods on " + e + " prior to initialization; " + "attempted to call '" + o + "'") 249 } 250 return this 251 } 252 return this.each(function() { 253 var n = t.data(this, e); 254 n ? (n.option(o), n._init()) : (n = new i(this, o), t.data(this, e, n)) 255 }) 256 } 257 } 258 if (t) { 259 var r = "undefined" == typeof console ? e : function(t) { 260 console.error(t) 261 }; 262 t.bridget = function(t, e) { 263 i(e), o(t, e) 264 } 265 } 266 } 267 var n = Array.prototype.slice; 268 "function" == typeof define && define.amd ? define(["jquery"], i) : i(t.jQuery) 269}(window), 270function(t, e) { 271 "use strict"; 272 273 function i(t, e) { 274 return t[a](e) 275 } 276 277 function n(t) { 278 if (!t.parentNode) { 279 var e = document.createDocumentFragment(); 280 e.appendChild(t) 281 } 282 } 283 284 function o(t, e) { 285 n(t); 286 for (var i = t.parentNode.querySelectorAll(e), o = 0, r = i.length; r > o; o++) 287 if (i[o] === t) return !0; 288 return !1 289 } 290 291 function r(t, e) { 292 return n(t), i(t, e) 293 } 294 var s, a = function() { 295 if (e.matchesSelector) return "matchesSelector"; 296 for (var t = ["webkit", "moz", "ms", "o"], i = 0, n = t.length; n > i; i++) { 297 var o = t[i], 298 r = o + "MatchesSelector"; 299 if (e[r]) return r 300 } 301 }(); 302 if (a) { 303 var h = document.createElement("div"), 304 p = i(h, "div"); 305 s = p ? i : r 306 } else s = o; 307 "function" == typeof define && define.amd ? define(function() { 308 return s 309 }) : window.matchesSelector = s 310}(this, Element.prototype), 311function(t) { 312 "use strict"; 313 314 function e(t, e) { 315 for (var i in e) t[i] = e[i]; 316 return t 317 } 318 319 function i(t, e) { 320 t && (this.element = t, this.layout = e, this.position = { 321 x: 0, 322 y: 0 323 }, this._create()) 324 } 325 var n = t.getSize, 326 o = t.getStyleProperty, 327 r = t.EventEmitter, 328 s = document.defaultView, 329 a = s && s.getComputedStyle ? function(t) { 330 return s.getComputedStyle(t, null) 331 } : function(t) { 332 return t.currentStyle 333 }, 334 h = o("transition"), 335 p = o("transform"), 336 u = h && p, 337 f = !!o("perspective"), 338 d = { 339 WebkitTransition: "webkitTransitionEnd", 340 MozTransition: "transitionend", 341 OTransition: "otransitionend", 342 transition: "transitionend" 343 }[h], 344 c = ["transform", "transition", "transitionDuration", "transitionProperty"], 345 l = function() { 346 for (var t = {}, e = 0, i = c.length; i > e; e++) { 347 var n = c[e], 348 r = o(n); 349 r && r !== n && (t[n] = r) 350 } 351 return t 352 }(); 353 e(i.prototype, r.prototype), i.prototype._create = function() { 354 this.css({ 355 position: "absolute" 356 }) 357 }, i.prototype.handleEvent = function(t) { 358 var e = "on" + t.type; 359 this[e] && this[e](t) 360 }, i.prototype.getSize = function() { 361 this.size = n(this.element) 362 }, i.prototype.css = function(t) { 363 var e = this.element.style; 364 for (var i in t) { 365 var n = l[i] || i; 366 e[n] = t[i] 367 } 368 }, i.prototype.getPosition = function() { 369 var t = a(this.element), 370 e = this.layout.options, 371 i = e.isOriginLeft, 372 n = e.isOriginTop, 373 o = parseInt(t[i ? "left" : "right"], 10), 374 r = parseInt(t[n ? "top" : "bottom"], 10); 375 o = isNaN(o) ? 0 : o, r = isNaN(r) ? 0 : r; 376 var s = this.layout.size; 377 o -= i ? s.paddingLeft : s.paddingRight, r -= n ? s.paddingTop : s.paddingBottom, this.position.x = o, this.position.y = r 378 }, i.prototype.layoutPosition = function() { 379 var t = this.layout.size, 380 e = this.layout.options, 381 i = {}; 382 e.isOriginLeft ? (i.left = this.position.x + t.paddingLeft + "px", i.right = "") : (i.right = this.position.x + t.paddingRight + "px", i.left = ""), e.
382isOriginTop ? (i.top = this.position.y + t.paddingTop + "px", i.bottom = "") : (i.bottom = this.position.y + t.paddingBottom + "px", i.top = ""), this.css(i), this.emitEvent("layout", [this]) 383 }; 384 var m = f ? function(t, e) { 385 return "translate3d(" + t + "px, " + e + "px, 0)" 386 } : function(t, e) { 387 return "translate(" + t + "px, " + e + "px)" 388 }; 389 i.prototype._transitionTo = function(t, e) { 390 this.getPosition(); 391 var i = this.position.x, 392 n = this.position.y, 393 o = parseInt(t, 10), 394 r = parseInt(e, 10), 395 s = o === this.position.x && r === this.position.y; 396 if (this.setPosition(t, e), s && !this.isTransitioning) return this.layoutPosition(), void 0; 397 var a = t - i, 398 h = e - n, 399 p = {}, 400 u = this.layout.options; 401 a = u.isOriginLeft ? a : -a, h = u.isOriginTop ? h : -h, p.transform = m(a, h), this.transition({ 402 to: p, 403 onTransitionEnd: this.layoutPosition, 404 isCleaning: !0 405 }) 406 }, i.prototype.goTo = function(t, e) { 407 this.setPosition(t, e), this.layoutPosition() 408 }, i.prototype.moveTo = u ? i.prototype._transitionTo : i.prototype.goTo, i.prototype.setPosition = function(t, e) { 409 this.position.x = parseInt(t, 10), this.position.y = parseInt(e, 10) 410 }, i.prototype._nonTransition = function(t) { 411 this.css(t.to), t.isCleaning && this._removeStyles(t.to), t.onTransitionEnd && t.onTransitionEnd.call(this) 412 }, i.prototype._transition = function(t) { 413 var e = this.layout.options.transitionDuration; 414 if (!parseFloat(e)) return this._nonTransition(t), void 0; 415 var i = t.to, 416 n = []; 417 for (var o in i) n.push(o); 418 var r = {}; 419 if (r.transitionProperty = n.join(","), r.transitionDuration = e, this.element.addEventListener(d, this, !1), (t.isCleaning || t.onTransitionEnd) && this.on("transitionEnd", function(e) { 420 return t.isCleaning && e._removeStyles(i), t.onTransitionEnd && t.onTransitionEnd.call(e), !0 421 }), t.from) { 422 this.css(t.from); 423 var s = this.element.offsetHeight; 424 s = null 425 } 426 this.css(r), this.css(i), this.isTransitioning = !0 427 }, i.prototype.transition = i.prototype[h ? "_transition" : "_nonTransition"], i.prototype.onwebkitTransitionEnd = function(t) { 428 this.ontransitionend(t) 429 }, i.prototype.onotransitionend = function(t) { 430 this.ontransitionend(t) 431 }, i.prototype.ontransitionend = function(t) { 432 t.target === this.element && (this.removeTransitionStyles(), this.element.removeEventListener(d, this, !1), this.isTransitioning = !1, this.emitEvent("transitionEnd", [this])) 433 }, i.prototype._removeStyles = function(t) { 434 var e = {}; 435 for (var i in t) e[i] = ""; 436 this.css(e) 437 }; 438 var y = { 439 transitionProperty: "", 440 transitionDuration: "" 441 }; 442 i.prototype.removeTransitionStyles = function() { 443 this.css(y) 444 }, i.prototype.removeElem = function() { 445 this.element.parentNode.removeChild(this.element), this.emitEvent("remove", [this]) 446 }, i.prototype.remove = h ? function() { 447 var t = this; 448 this.on("transitionEnd", function() { 449 return t.removeElem(), !0 450 }), this.hide() 451 } : i.prototype.removeElem, i.prototype.reveal = function() { 452 this.css({ 453 display: "" 454 }); 455 var t = this.layout.options; 456 this.transition({ 457 from: t.hiddenStyle, 458 to: t.visibleStyle, 459 isCleaning: !0 460 }) 461 }, i.prototype.hide = function() { 462 this.css({ 463 display: "" 464 }); 465 var t = this.layout.options; 466 this.transition({ 467 from: t.visibleStyle, 468 to: t.hiddenStyle, 469 isCleaning: !0, 470 onTransitionEnd: function() { 471 this.css({ 472 display: "none" 473 }) 474 } 475 }) 476 }, i.prototype.destroy = function() { 477 this.css({ 478 position: "", 479 left: "", 480 right: "", 481 top: "", 482 bottom: "", 483 transition: "", 484 transform: "" 485 }) 486 }, t.Outlayer = { 487 Item: i 488 } 489}(window), 490function(t) { 491 "use strict"; 492 493 function e(t, e) { 494 for (var i in e) t[i] = e[i]; 495 return t 496 } 497 498 function i(t) { 499 return "[object Array]" === v.call(t) 500 } 501 502 function n(t) { 503 var e = []; 504 if (i(t)) e = t; 505 else if ("number" == typeof t.length) 506 for (var n = 0, o = t.length; o > n; n++) e.push(t[n]); 507 else e.push(t); 508 return e 509 } 510 511 function o(t) { 512 return t.replace(/(.)([A-Z])/g, function(t, e, i) { 513 return e + "-" + i 514 }).toLowerCase() 515 } 516 517 function r(t, i) { 518 if ("string" == typeof t && (t = l.querySelector(t)), !t || !_(t)) return m && m.error("Bad " + this.settings.namespace + " element: " + t), void 0; 519 this.element = t, this.options = e({}, this.options), e(this.options, i); 520 var n = ++L; 521 this.element.outlayerGUID = n, E[n] = this, this._create(), this.options.isInitLayout && this.layout() 522 } 523 524 function s(t, i) { 525 t.prototype[i] = e({}, r.prototype[i]) 526 } 527 var a = t.Outlayer, 528 h = a.Item, 529 p = t.docReady, 530 u = t.EventEmitter, 531 f = t.eventie, 532 d = t.getSize, 533 c = t.matchesSelector, 534 l = t.document, 535 m = t.console, 536 y = t.jQuery, 537 g = function() {}, 538 v = Object.prototype.toString, 539 _ = "object" == typeof HTMLElement ? function(t) { 540 return t instanceof HTMLElement 541 } : function(t) { 542 return t && "object" == typeof t && 1 === t.nodeType && "string" == typeof t.nodeName 543 }, 544 b = Array.prototype.indexOf ? function(t, e) { 545 return t.indexOf(e) 546 } : function(t, e) { 547 for (var i = 0, n = t.length; n > i; i++) 548 if (t[i] === e) return i; 549 return -1 550 }, 551 L = 0, 552 E = {}; 553 r.prototype.settings = { 554 namespace: "outlayer", 555 item: a.Item 556 }, r.prototype.options = { 557 containerStyle: { 558 position: "relative" 559 }, 560 isInitLayout: !0, 561 isOriginLeft: !0, 562 isOriginTop: !0, 563 isResizeBound: !0, 564 transitionDuration: "0.4s", 565 hiddenStyle: { 566 opacity: 0, 567 transform: "scale(0.001)" 568 }, 569 visibleStyle: { 570 opacity: 1, 571 transform: "scale(1)" 572 } 573 }, e(r.prototype, u.prototype), r.prototype._create = function() { 574 this.reloadItems(), this.stamps = [], this.stamp(this.options.stamp), e(this.element.style, this.options.containerStyle), this.options.isResizeBound && this.bindResize() 575 }, r.prototype.reloadItems = function() { 576 this.items = this._getItems(this.element.children) 577 }, r.prototype._getItems = function(t) { 578 for (var e = this._filterFindItemElements(t), i = this.settings.item, n = [], o = 0, r = e.length; r > o; o++) { 579 var s = e[o], 580 a = new i(s, this, this.options.itemOptions); 581 n.push(a) 582 } 583 return n 584 }, r.prototype._filterFindItemElements = function(t) { 585 t = n(t); 586 var e = this.options.itemSelector; 587 if (!e) return t; 588 for (var i = [], o = 0, r = t.length; r > o; o++) { 589 var s = t[o]; 590 c(s, e) && i.push(s); 591 for (var a = s.querySelectorAll(e), h = 0, p = a.length; p > h; h++) i.push(a[h]) 592 } 593 return i 594 }, r.prototype.getItemElements = function() { 595 for (var t = [], e = 0, i = this.items.length; i > e; e++) t.push(this.items[e].element); 596 return t 597 }, r.prototype.layout = function() { 598 this._resetLayout(), this._manageStamps(); 599 var t = void 0 !== this.options.isLayoutInstant ? this.options.isLayoutInstant : !this._isLayoutInited; 600 this.layoutItems(this.items, t), this._isLayoutInited = !0 601 }, r.prototype._init = r.prototype.layout, r.prototype._resetLayout = function() {
602 this.getSize() 603 }, r.prototype.getSize = function() { 604 this.size = d(this.element) 605 }, r.prototype._getMeasurement = function(t, e) { 606 var i, n = this.options[t]; 607 n ? ("string" == typeof n ? i = this.element.querySelector(n) : _(n) && (i = n), this[t] = i ? d(i)[e] : n) : this[t] = 0 608 }, r.prototype.layoutItems = function(t, e) { 609 t = this._getItemsForLayout(t), this._layoutItems(t, e), this._postLayout() 610 }, r.prototype._getItemsForLayout = function(t) { 611 for (var e = [], i = 0, n = t.length; n > i; i++) { 612 var o = t[i]; 613 o.isIgnored || e.push(o) 614 } 615 return e 616 }, r.prototype._layoutItems = function(t, e) { 617 if (!t || !t.length) return this.emitEvent("layoutComplete", [this, t]), void 0; 618 this._itemsOn(t, "layout", function() { 619 this.emitEvent("layoutComplete", [this, t]) 620 }); 621 for (var i = [], n = 0, o = t.length; o > n; n++) { 622 var r = t[n], 623 s = this._getItemLayoutPosition(r); 624 s.item = r, s.isInstant = e, i.push(s) 625 } 626 this._processLayoutQueue(i) 627 }, r.prototype._getItemLayoutPosition = function() { 628 return { 629 x: 0, 630 y: 0 631 } 632 }, r.prototype._processLayoutQueue = function(t) { 633 for (var e = 0, i = t.length; i > e; e++) { 634 var n = t[e]; 635 this._positionItem(n.item, n.x, n.y, n.isInstant) 636 } 637 }, r.prototype._positionItem = function(t, e, i, n) { 638 n ? t.goTo(e, i) : t.moveTo(e, i) 639 }, r.prototype._postLayout = function() { 640 var t = this._getContainerSize(); 641 t && (this._setContainerMeasure(t.width, !0), this._setContainerMeasure(t.height, !1)) 642 }, r.prototype._getContainerSize = g, r.prototype._setContainerMeasure = function(t, e) { 643 if (void 0 !== t) { 644 var i = this.size; 645 i.isBorderBox && (t += e ? i.paddingLeft + i.paddingRight + i.borderLeftWidth + i.borderRightWidth : i.paddingBottom + i.paddingTop + i.borderTopWidth + i.borderBottomWidth), t = Math.max(t, 0), this.element.style[e ? "width" : "height"] = t + "px" 646 } 647 }, r.prototype._itemsOn = function(t, e, i) { 648 function n() { 649 return o++, o === r && i.call(s), !0 650 } 651 for (var o = 0, r = t.length, s = this, a = 0, h = t.length; h > a; a++) { 652 var p = t[a]; 653 p.on(e, n) 654 } 655 }, r.prototype.ignore = function(t) { 656 var e = this.getItem(t); 657 e && (e.isIgnored = !0) 658 }, r.prototype.unignore = function(t) { 659 var e = this.getItem(t); 660 e && delete e.isIgnored 661 }, r.prototype.stamp = function(t) { 662 if (t = this._find(t)) { 663 this.stamps = this.stamps.concat(t); 664 for (var e = 0, i = t.length; i > e; e++) { 665 var n = t[e]; 666 this.ignore(n) 667 } 668 } 669 }, r.prototype.unstamp = function(t) { 670 if (t = this._find(t)) 671 for (var e = 0, i = t.length; i > e; e++) { 672 var n = t[e], 673 o = b(this.stamps, n); - 1 !== o && this.stamps.splice(o, 1), this.unignore(n) 674 } 675 }, r.prototype._find = function(t) { 676 return t ? ("string" == typeof t && (t = this.element.querySelectorAll(t)), t = n(t)) : void 0 677 }, r.prototype._manageStamps = function() { 678 if (this.stamps && this.stamps.length) { 679 this._getBoundingRect(); 680 for (var t = 0, e = this.stamps.length; e > t; t++) { 681 var i = this.stamps[t]; 682 this._manageStamp(i) 683 } 684 } 685 }, r.prototype._getBoundingRect = function() { 686 var t = this.element.getBoundingClientRect(), 687 e = this.size; 688 this._boundingRect = { 689 left: t.left + e.paddingLeft + e.borderLeftWidth, 690 top: t.top + e.paddingTop + e.borderTopWidth, 691 right: t.right - (e.paddingRight + e.borderRightWidth), 692 bottom: t.bottom - (e.paddingBottom + e.borderBottomWidth) 693 } 694 }, r.prototype._manageStamp = g, r.prototype._getElementOffset = function(t) { 695 var e = t.getBoundingClientRect(), 696 i = this._boundingRect, 697 n = d(t), 698 o = { 699 left: e.left - i.left - n.marginLeft, 700 top: e.top - i.top - n.marginTop, 701 right: i.right - e.right - n.marginRight, 702 bottom: i.bottom - e.bottom - n.marginBottom 703 }; 704 return o 705 }, r.prototype.handleEvent = function(t) { 706 var e = "on" + t.type; 707 this[e] && this[e](t) 708 }, r.prototype.bindResize = function() { 709 this.isResizeBound || (f.bind(t, "resize", this), this.isResizeBound = !0) 710 }, r.prototype.unbindResize = function() { 711 f.unbind(t, "resize", this), this.isResizeBound = !1 712 }, r.prototype.onresize = function() { 713 function t() { 714 e.resize() 715 } 716 this.resizeTimeout && clearTimeout(this.resizeTimeout); 717 var e = this; 718 this.resizeTimeout = setTimeout(t, 100) 719 }, r.prototype.resize = function() { 720 var t = d(this.element), 721 e = this.size && t; 722 e && t.innerWidth === this.size.innerWidth || (this.layout(), delete this.resizeTimeout) 723 }, r.prototype.addItems = function(t) { 724 var e = this._getItems(t); 725 if (e.length) return this.items = this.items.concat(e), e 726 }, r.prototype.appended = function(t) { 727 var e = this.addItems(t); 728 e.length && (this.layoutItems(e, !0), this.reveal(e)) 729 }, r.prototype.prepended = function(t) { 730 var e = this._getItems(t); 731 if (e.length) { 732 var i = this.items.slice(0); 733 this.items = e.concat(i), this._resetLayout(), this.layoutItems(e, !0), this.reveal(e), this.layoutItems(i) 734 } 735 }, r.prototype.reveal = function(t) { 736 if (t && t.length) 737 for (var e = 0, i = t.length; i > e; e++) { 738 var n = t[e]; 739 n.reveal() 740 } 741 }, r.prototype.hide = function(t) { 742 if (t && t.length) 743 for (var e = 0, i = t.length; i > e; e++) { 744 var n = t[e]; 745 n.hide() 746 } 747 }, r.prototype.getItem = function(t) { 748 for (var e = 0, i = this.items.length; i > e; e++) { 749 var n = this.items[e]; 750 if (n.element === t) return n 751 } 752 }, r.prototype.getItems = function(t) { 753 if (t && t.length) { 754 for (var e = [], i = 0, n = t.length; n > i; i++) { 755 var o = t[i], 756 r = this.getItem(o); 757 r && e.push(r) 758 } 759 return e 760 } 761 }, r.prototype.remove = function(t) { 762 t = n(t); 763 var e = this.getItems(t); 764 this._itemsOn(e, "remove", function() { 765 this.emitEvent("removeComplete", [this, e]) 766 }); 767 for (var i = 0, o = e.length; o > i; i++) { 768 var r = e[i]; 769 r.remove(); 770 var s = b(this.items, r); 771 this.items.splice(s, 1) 772 } 773 }, r.prototype.destroy = function() { 774 var t = this.element.style; 775 t.height = "", t.position = "", t.width = ""; 776 for (var e = 0, i = this.items.length; i > e; e++) { 777 var n = this.items[e]; 778 n.destroy() 779 } 780 this.unbindResize(), delete this.element.outlayerGUID 781 }, r.data = function(t) { 782 var e = t && t.outlayerGUID; 783 return e && E[e] 784 }, r.create = function(t, i) { 785 function n() { 786 r.apply(this, arguments) 787 } 788 return e(n.prototype, r.prototype), s(n, "options"), s(n, "settings"), e(n.prototype.options, i), n.prototype.settings.namespace = t, n.data = r.data, n.Item = function() { 789 h.apply(this, arguments) 790 }, n.Item.prototype = new r.Item, n.prototype.settings.item = n.Item, p(function() { 791 for (var e = o(t), i = l.querySelectorAll(".js-" + e), r = "data-" + e + "-options", s = 0, a = i.length; a > s; s++) { 792 var h, p = i[s], 793 u = p.getAttribute(r); 794 try { 795 h = u && JSON.parse(u) 796 } catch (f) { 797 m && m.error("Error parsing " + r + " on " + p.nodeName.toLowerCase() + (p.id ? "#" + p.id : "") + ": " + f); 798 continue 799 } 800 var d = new n(p, h); 801 y && y.data(p, t, d) 802 } 803 }), y && y.bridget && y.bridget(t, n), n 804 }, r.Item = h, t.Outlayer = r 805}(window), 806function(t) { 807 "use strict"; 808 809 function e(t, e) { 810 var n = t.create("masonry"); 811 return n.prototype._resetLayout = function() {
812 this.getSize(), this._getMeasurement("columnWidth", "outerWidth"), this._getMeasurement("gutter", "outerWidth"), this.measureColumns(); 813 var t = this.cols; 814 for (this.colYs = []; t--;) this.colYs.push(0); 815 this.maxY = 0 816 }, n.prototype.measureColumns = function() { 817 var t = this.items[0].element; 818 this.columnWidth = this.columnWidth || e(t).outerWidth, this.columnWidth += this.gutter, this.cols = Math.floor((this.size.innerWidth + this.gutter) / this.columnWidth), this.cols = Math.max(this.cols, 1) 819 }, n.prototype._getItemLayoutPosition = function(t) { 820 t.getSize(); 821 var e = Math.ceil(t.size.outerWidth / this.columnWidth); 822 e = Math.min(e, this.cols); 823 for (var n = this._getColGroup(e), o = Math.min.apply(Math, n), r = i(n, o), s = { 824 x: this.columnWidth * r, 825 y: o 826 }, a = o + t.size.outerHeight, h = this.cols + 1 - n.length, p = 0; h > p; p++) this.colYs[r + p] = a; 827 return s 828 }, n.prototype._getColGroup = function(t) { 829 if (1 === t) return this.colYs; 830 for (var e = [], i = this.cols + 1 - t, n = 0; i > n; n++) { 831 var o = this.colYs.slice(n, n + t); 832 e[n] = Math.max.apply(Math, o) 833 } 834 return e 835 }, n.prototype._manageStamp = function(t) { 836 var i = e(t), 837 n = this._getElementOffset(t), 838 o = this.options.isOriginLeft ? n.left : n.right, 839 r = o + i.outerWidth, 840 s = Math.floor(o / this.columnWidth); 841 s = Math.max(0, s); 842 var a = Math.floor(r / this.columnWidth); 843 a = Math.min(this.cols - 1, a); 844 for (var h = (this.options.isOriginTop ? n.top : n.bottom) + i.outerHeight, p = s; a >= p; p++) this.colYs[p] = Math.max(h, this.colYs[p]) 845 }, n.prototype._getContainerSize = function() { 846 return this.maxY = Math.max.apply(Math, this.colYs), { 847 height: this.maxY 848 } 849 }, n 850 } 851 var i = Array.prototype.indexOf ? function(t, e) { 852 return t.indexOf(e) 853 } : function(t, e) { 854 for (var i = 0, n = t.length; n > i; i++) { 855 var o = t[i]; 856 if (o === e) return i 857 } 858 return -1 859 }; 860 "function" == typeof define && define.amd ? define(["outlayer", "get-size"], e) : t.Masonry = e(t.Outlayer, t.getSize) 861}(window);
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.