1/*! 2 * Magnific Popup v1.0.1 by Dmitry Semenov 3 * The MIT License (MIT) 4 * Copyright (c) 2014-2015 Dmitry Semenov, http://dimsemenov.com 5 * http://bit.ly/magnific-popup#build=inline+image+ajax+iframe+gallery+retina+imagezoom+fastclick 6 * 7 * Modified to adapt the latest jQuery version (v3 above) included on WordPress 5.6: 8 * - (2020-12-15) - jQuery isFunction method is deprecated. 9 * - (2021-02-01) - Number type value passed to css method is deprecated. 10 * - (2021-02-04) - jQuery focus event shorthand is deprecated. 11 * - (2020-02-27) - jQuery isArray method is deprecated. 12 */ 13 14/* 15Permission is hereby granted, free of charge, to any person obtaining a copy of 16this software and associated documentation files (the "Software"), to deal in 17the Software without restriction, including without limitation the rights to 18use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 19the Software, and to permit persons to whom the Software is furnished to do so, 20subject to the following conditions: 21 22The above copyright notice and this permission notice shall be included in all 23copies or substantial portions of the Software. 24 25THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 26IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 27FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 28COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 29IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 30CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 31*/ 32 33!(function(a) { 34 "function" == typeof define && define.amd 35 ? define(["jquery"], a) 36 : a( 37 "object" == typeof exports 38 ? require("jquery") 39 : window.jQuery || window.Zepto 40 ); 41})(function(a) { 42 var b, 43 c, 44 d, 45 e, 46 f, 47 g, 48 h = "Close", 49 i = "BeforeClose", 50 j = "AfterClose", 51 k = "BeforeAppend", 52 l = "MarkupParse", 53 m = "Open", 54 n = "Change", 55 o = "mfp", 56 p = "." + o, 57 q = "mfp-ready", 58 r = "mfp-removing", 59 s = "mfp-prevent-close", 60 t = function() {}, 61 u = !!window.jQuery, 62 v = a(window), 63 w = function(a, c) { 64 b.ev.on(o + a + p, c); 65 }, 66 x = function(b, c, d, e) { 67 var f = document.createElement("div"); 68 return ( 69 (f.className = "mfp-" + b), 70 d && (f.innerHTML = d), 71 e ? c && c.appendChild(f) : ((f = a(f)), c && f.appendTo(c)), 72 f 73 ); 74 }, 75 y = function(c, d) { 76 b.ev.triggerHandler(o + c, d), 77 b.st.callbacks && 78 ((c = c.charAt(0).toLowerCase() + c.slice(1)), 79 b.st.callbacks[c] && 80 b.st.callbacks[c].apply(b, Array.isArray(d) ? d : [d])); 81 }, 82 z = function(c) { 83 return ( 84 (c === g && b.currTemplate.closeBtn) || 85 ((b.currTemplate.closeBtn = a( 86 b.st.closeMarkup.replace("%title%", b.st.tClose) 87 )), 88 (g = c)), 89 b.currTemplate.closeBtn 90 ); 91 }, 92 A = function() { 93 a.magnificPopup.instance || 94 ((b = new t()), b.init(), (a.magnificPopup.instance = b)); 95 }, 96 B = function() { 97 var a = document.createElement("p").style, 98 b = ["ms", "O", "Moz", "Webkit"]; 99 if (void 0 !== a.transition) return !0; 100 for (; b.length; ) if (b.pop() + "Transition" in a) return !0; 101 return !1; 102 }; 103 (t.prototype = { 104 constructor: t, 105 init: function() { 106 var c = navigator.appVersion; 107 (b.isIE7 = -1 !== c.indexOf("MSIE 7.")), 108 (b.isIE8 = -1 !== c.indexOf("MSIE 8.")), 109 (b.isLowIE = b.isIE7 || b.isIE8), 110 (b.isAndroid = /android/gi.test(c)), 111 (b.isIOS = /iphone|ipad|ipod/gi.test(c)), 112 (b.supportsTransition = B()), 113 (b.probablyMobile = 114 b.isAndroid || 115 b.isIOS || 116 /(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test( 117 navigator.userAgent 118 )), 119 (d = a(document)), 120 (b.popupsCache = {}); 121 }, 122 open: function(c) { 123 var e; 124 if (c.isObj === !1) { 125 (b.items = c.items.toArray()), (b.index = 0); 126 var g, 127 h = c.items; 128 for (e = 0; e < h.length; e++) 129 if ( 130 ((g = h[e]), g.parsed && (g = g.el[0]), g === c.el[0]) 131 ) { 132 b.index = e; 133 break; 134 } 135 } else 136 (b.items = Array.isArray(c.items) ? c.items : [c.items]), 137 (b.index = c.index || 0); 138 if (b.isOpen) return void b.updateItemHTML(); 139 (b.types = []), 140 (f = ""), 141 c.mainEl && c.mainEl.length 142 ? (b.ev = c.mainEl.eq(0)) 143 : (b.ev = d), 144 c.key 145 ? (b.popupsCache[c.key] || (b.popupsCache[c.key] = {}), 146 (b.currTemplate = b.popupsCache[c.key])) 147 : (b.currTemplate = {}), 148 (b.st = a.extend(!0, {}, a.magnificPopup.defaults, c)), 149 (b.fixedContentPos = 150 "auto" === b.st.fixedContentPos 151 ? !b.probablyMobile 152 : b.st.fixedContentPos), 153 b.st.modal && 154 ((b.st.closeOnContentClick = !1), 155 (b.st.closeOnBgClick = !1), 156 (b.st.showCloseBtn = !1), 157 (b.st.enableEscapeKey = !1)), 158 b.bgOverlay || 159 ((b.bgOverlay = x("bg").on("click" + p, function() { 160 b.close(); 161 })), 162 (b.wrap = x("wrap") 163 .attr("tabindex", -1) 164 .on("click" + p, function(a) { 165 b._checkIfClose(a.target) && b.close(); 166 })), 167 (b.container = x("container", b.wrap))), 168 (b.contentContainer = x("content")), 169 b.st.preloader && 170 (b.preloader = x("preloader", b.container, b.st.tLoading)); 171 var i = a.magnificPopup.modules; 172 for (e = 0; e < i.length; e++) { 173 var j = i[e]; 174 (j = j.charAt(0).toUpperCase() + j.slice(1)), 175 b["init" + j].call(b); 176 } 177 y("BeforeOpen"), 178 b.st.showCloseBtn && 179 (b.st.closeBtnInside 180 ? (w(l, function(a, b, c, d) { 181 c.close_replaceWith = z(d.type); 182 }), 183 (f += " mfp-close-btn-in")) 184 : b.wrap.append(z())), 185 b.st.alignTop && (f += " mfp-align-top"), 186 b.fixedContentPos 187 ? b.wrap.css({ 188 overflow: b.st.overflowY, 189 overflowX: "hidden", 190 overflowY: b.st.overflowY 191 }) 192 : b.wrap.css({ 193 top: v.scrollTop() + "px", 194 position: "absolute" 195 }), 196 (b.st.fixedBgPos === !1 || 197 ("auto" === b.st.fixedBgPos && !b.fixedContentPos)) && 198 b.bgOverlay.css({ 199 height: d.height() + "px", 200 position: "absolute" 201 }), 202 b.st.enableEscapeKey && 203 d.on("keyup" + p, function(a) { 204 27 === a.keyCode && b.close(); 205 }), 206 v.on("resize" + p, function() { 207 b.updateSize(); 208 }), 209 b.st.closeOnContentClick || (f += " mfp-auto-cursor"), 210 f && b.wrap.addClass(f); 211 var k = (b.wH = v.height()), 212 n = {}; 213 if (b.fixedContentPos && b._hasScrollBar(k)) { 214 var o = b._getScrollbarSize(); 215 o && (n.marginRight = o); 216 } 217 b.fixedContentPos && 218 (b.isIE7 219 ? a("body, html").css("overflow", "hidden") 220 : (n.overflow = "hidden")); 221 var r = b.st.mainClass; 222 return ( 223 b.isIE7 && (r += " mfp-ie7"), 224 r && b._addClassToMFP(r), 225 b.updateItemHTML(), 226 y("BuildControls"), 227 a("html").css(n), 228 b.bgOverlay 229 .add(b.wrap)
230 .prependTo(b.st.prependTo || a(document.body)), 231 (b._lastFocusedEl = document.activeElement), 232 setTimeout(function() { 233 b.content 234 ? (b._addClassToMFP(q), b._setFocus()) 235 : b.bgOverlay.addClass(q), 236 d.on("focusin" + p, b._onFocusIn); 237 }, 16), 238 (b.isOpen = !0), 239 b.updateSize(k), 240 y(m), 241 c 242 ); 243 }, 244 close: function() { 245 b.isOpen && 246 (y(i), 247 (b.isOpen = !1), 248 b.st.removalDelay && !b.isLowIE && b.supportsTransition 249 ? (b._addClassToMFP(r), 250 setTimeout(function() { 251 b._close(); 252 }, b.st.removalDelay)) 253 : b._close()); 254 }, 255 _close: function() { 256 y(h); 257 var c = r + " " + q + " "; 258 if ( 259 (b.bgOverlay.detach(), 260 b.wrap.detach(), 261 b.container.empty(), 262 b.st.mainClass && (c += b.st.mainClass + " "), 263 b._removeClassFromMFP(c), 264 b.fixedContentPos) 265 ) { 266 var e = { marginRight: "" }; 267 b.isIE7 268 ? a("body, html").css("overflow", "") 269 : (e.overflow = ""), 270 a("html").css(e); 271 } 272 d.off("keyup" + p + " focusin" + p), 273 b.ev.off(p), 274 b.wrap.attr("class", "mfp-wrap").removeAttr("style"), 275 b.bgOverlay.attr("class", "mfp-bg"), 276 b.container.attr("class", "mfp-container"), 277 !b.st.showCloseBtn || 278 (b.st.closeBtnInside && 279 b.currTemplate[b.currItem.type] !== !0) || 280 (b.currTemplate.closeBtn && 281 b.currTemplate.closeBtn.detach()), 282 b.st.autoFocusLast && 283 b._lastFocusedEl && 284 a(b._lastFocusedEl).trigger("focus"), 285 (b.currItem = null), 286 (b.content = null), 287 (b.currTemplate = null), 288 (b.prevHeight = 0), 289 y(j); 290 }, 291 updateSize: function(a) { 292 if (b.isIOS) { 293 var c = 294 document.documentElement.clientWidth / 295 window.innerWidth, 296 d = window.innerHeight * c; 297 b.wrap.css("height", d + "px"), (b.wH = d); 298 } else b.wH = a || v.height(); 299 b.fixedContentPos || b.wrap.css("height", b.wH + "px"), y("Resize"); 300 }, 301 updateItemHTML: function() { 302 var c = b.items[b.index]; 303 b.contentContainer.detach(), 304 b.content && b.content.detach(), 305 c.parsed || (c = b.parseEl(b.index)); 306 var d = c.type; 307 if ( 308 (y("BeforeChange", [b.currItem ? b.currItem.type : "", d]), 309 (b.currItem = c), 310 !b.currTemplate[d]) 311 ) { 312 var f = b.st[d] ? b.st[d].markup : !1; 313 y("FirstMarkupParse", f), 314 f ? (b.currTemplate[d] = a(f)) : (b.currTemplate[d] = !0); 315 } 316 e && 317 e !== c.type && 318 b.container.removeClass("mfp-" + e + "-holder"); 319 var g = b["get" + d.charAt(0).toUpperCase() + d.slice(1)]( 320 c, 321 b.currTemplate[d] 322 ); 323 b.appendContent(g, d), 324 (c.preloaded = !0), 325 y(n, c), 326 (e = c.type), 327 b.container.prepend(b.contentContainer), 328 y("AfterChange"); 329 }, 330 appendContent: function(a, c) { 331 (b.content = a), 332 a 333 ? b.st.showCloseBtn && 334 b.st.closeBtnInside && 335 b.currTemplate[c] === !0 336 ? b.content.find(".mfp-close").length || 337 b.content.append(z()) 338 : (b.content = a) 339 : (b.content = ""), 340 y(k), 341 b.container.addClass("mfp-" + c + "-holder"), 342 b.contentContainer.append(b.content); 343 }, 344 parseEl: function(c) { 345 var d, 346 e = b.items[c]; 347 if ( 348 (e.tagName 349 ? (e = { el: a(e) }) 350 : ((d = e.type), (e = { data: e, src: e.src })), 351 e.el) 352 ) { 353 for (var f = b.types, g = 0; g < f.length; g++) 354 if (e.el.hasClass("mfp-" + f[g])) { 355 d = f[g]; 356 break; 357 } 358 (e.src = e.el.attr("data-mfp-src")), 359 e.src || (e.src = e.el.attr("href")); 360 } 361 return ( 362 (e.type = d || b.st.type || "inline"), 363 (e.index = c), 364 (e.parsed = !0), 365 (b.items[c] = e), 366 y("ElementParse", e),
367 b.items[c] 368 ); 369 }, 370 addGroup: function(a, c) { 371 var d = function(d) { 372 (d.mfpEl = this), b._openClick(d, a, c); 373 }; 374 c || (c = {}); 375 var e = "click.magnificPopup"; 376 (c.mainEl = a), 377 c.items 378 ? ((c.isObj = !0), a.off(e).on(e, d)) 379 : ((c.isObj = !1), 380 c.delegate 381 ? a.off(e).on(e, c.delegate, d) 382 : ((c.items = a), a.off(e).on(e, d))); 383 }, 384 _openClick: function(c, d, e) { 385 var f = 386 void 0 !== e.midClick 387 ? e.midClick 388 : a.magnificPopup.defaults.midClick; 389 if ( 390 f || 391 !( 392 2 === c.which || 393 c.ctrlKey || 394 c.metaKey || 395 c.altKey || 396 c.shiftKey 397 ) 398 ) { 399 var g = 400 void 0 !== e.disableOn 401 ? e.disableOn 402 : a.magnificPopup.defaults.disableOn; 403 if (g) 404 if ("function" == typeof g) { 405 if (!g.call(b)) return !0; 406 } else if (v.width() < g) return !0; 407 c.type && (c.preventDefault(), b.isOpen && c.stopPropagation()), 408 (e.el = a(c.mfpEl)), 409 e.delegate && (e.items = d.find(e.delegate)), 410 b.open(e); 411 } 412 }, 413 updateStatus: function(a, d) { 414 if (b.preloader) { 415 c !== a && b.container.removeClass("mfp-s-" + c), 416 d || "loading" !== a || (d = b.st.tLoading); 417 var e = { status: a, text: d }; 418 y("UpdateStatus", e), 419 (a = e.status), 420 (d = e.text), 421 b.preloader.html(d), 422 b.preloader.find("a").on("click", function(a) { 423 a.stopImmediatePropagation(); 424 }), 425 b.container.addClass("mfp-s-" + a), 426 (c = a); 427 } 428 }, 429 _checkIfClose: function(c) { 430 if (!a(c).hasClass(s)) { 431 var d = b.st.closeOnContentClick, 432 e = b.st.closeOnBgClick; 433 if (d && e) return !0; 434 if ( 435 !b.content || 436 a(c).hasClass("mfp-close") || 437 (b.preloader && c === b.preloader[0]) 438 ) 439 return !0; 440 if (c === b.content[0] || a.contains(b.content[0], c)) { 441 if (d) return !0; 442 } else if (e && a.contains(document, c)) return !0; 443 return !1; 444 } 445 }, 446 _addClassToMFP: function(a) { 447 b.bgOverlay.addClass(a), b.wrap.addClass(a); 448 }, 449 _removeClassFromMFP: function(a) { 450 this.bgOverlay.removeClass(a), b.wrap.removeClass(a); 451 }, 452 _hasScrollBar: function(a) { 453 return ( 454 (b.isIE7 ? d.height() : document.body.scrollHeight) > 455 (a || v.height()) 456 ); 457 }, 458 _setFocus: function() { 459 (b.st.focus ? b.content.find(b.st.focus).eq(0) : b.wrap).trigger( 460 "focus" 461 ); 462 }, 463 _onFocusIn: function(c) { 464 return c.target === b.wrap[0] || a.contains(b.wrap[0], c.target) 465 ? void 0 466 : (b._setFocus(), !1); 467 }, 468 _parseMarkup: function(b, c, d) { 469 var e; 470 d.data && (c = a.extend(d.data, c)), 471 y(l, [b, c, d]), 472 a.each(c, function(a, c) { 473 if (void 0 === c || c === !1) return !0; 474 if (((e = a.split("_")), e.length > 1)) { 475 var d = b.find(p + "-" + e[0]); 476 if (d.length > 0) { 477 var f = e[1]; 478 "replaceWith" === f 479 ? d[0] !== c[0] && d.replaceWith(c) 480 : "img" === f 481 ? d.is("img") 482 ? d.attr("src", c) 483 : d.replaceWith( 484 '<img src="' + 485 c + 486 '" class="' + 487 d.attr("class") + 488 '" />' 489 ) 490 : d.attr(e[1], c); 491 } 492 } else b.find(p + "-" + a).html(c); 493 }); 494 }, 495 _getScrollbarSize: function() { 496 if (void 0 === b.scrollbarSize) { 497 var a = document.createElement("div"); 498 (a.style.cssText = 499 "width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;"), 500 document.body.appendChild(a), 501 (b.scrollbarSize = a.offsetWidth - a.clientWidth), 502 document.body.removeChild(a); 503 } 504 return b.scrollbarSize; 505 } 506 }), 507 (a.magnificPopup = { 508 instance: null, 509 proto: t.prototype, 510 modules: [], 511 open: function(b, c) { 512 return ( 513 A(), 514 (b = b ? a.extend(!0, {}, b) : {}), 515 (b.isObj = !0), 516 (b.index = c || 0), 517 this.instance.open(b) 518 ); 519 }, 520 close: function() { 521 return ( 522 a.magnificPopup.instance && a.magnificPopup.instance.close() 523 ); 524 }, 525 registerModule: function(b, c) { 526 c.options && (a.magnificPopup.defaults[b] = c.options), 527 a.extend(this.proto, c.proto), 528 this.modules.push(b); 529 }, 530 defaults: { 531 disableOn: 0, 532 key: null, 533 midClick: !1, 534 mainClass: "", 535 preloader: !0, 536 focus: "", 537 closeOnContentClick: !1, 538 closeOnBgClick: !0, 539 closeBtnInside: !0, 540 showCloseBtn: !0, 541 enableEscapeKey: !0, 542 modal: !1, 543 alignTop: !1, 544 removalDelay: 0, 545 prependTo: null, 546 fixedContentPos: "auto", 547 fixedBgPos: "auto", 548 overflowY: "auto", 549 closeMarkup: 550 '<button title="%title%" type="button" class="mfp-close">×</button>', 551 tClose: "Close (Esc)", 552 tLoading: "Loading...", 553 autoFocusLast: !0 554 } 555 }), 556 (a.fn.magnificPopup = function(c) { 557 A(); 558 var d = a(this); 559 if ("string" == typeof c) 560 if ("open" === c) { 561 var e, 562 f = u ? d.data("magnificPopup") : d[0].magnificPopup, 563 g = parseInt(arguments[1], 10) || 0; 564 f.items 565 ? (e = f.items[g]) 566 : ((e = d), 567 f.delegate && (e = e.find(f.delegate)),
568 (e = e.eq(g))), 569 b._openClick({ mfpEl: e }, d, f); 570 } else 571 b.isOpen && 572 b[c].apply(b, Array.prototype.slice.call(arguments, 1)); 573 else 574 (c = a.extend(!0, {}, c)), 575 u ? d.data("magnificPopup", c) : (d[0].magnificPopup = c), 576 b.addGroup(d, c); 577 return d; 578 }); 579 var C, 580 D, 581 E, 582 F = "inline", 583 G = function() { 584 E && (D.after(E.addClass(C)).detach(), (E = null)); 585 }; 586 a.magnificPopup.registerModule(F, { 587 options: { 588 hiddenClass: "hide", 589 markup: "", 590 tNotFound: "Content not found" 591 }, 592 proto: { 593 initInline: function() { 594 b.types.push(F), 595 w(h + "." + F, function() { 596 G(); 597 }); 598 }, 599 getInline: function(c, d) { 600 if ((G(), c.src)) { 601 var e = b.st.inline, 602 f = a(c.src); 603 if (f.length) { 604 var g = f[0].parentNode; 605 g && 606 g.tagName && 607 (D || 608 ((C = e.hiddenClass), 609 (D = x(C)), 610 (C = "mfp-" + C)), 611 (E = f 612 .after(D) 613 .detach() 614 .removeClass(C))), 615 b.updateStatus("ready"); 616 } else 617 b.updateStatus("error", e.tNotFound), (f = a("<div>")); 618 return (c.inlineElement = f), f; 619 } 620 return b.updateStatus("ready"), b._parseMarkup(d, {}, c), d; 621 } 622 } 623 }); 624 var H, 625 I = "ajax", 626 J = function() { 627 H && a(document.body).removeClass(H); 628 }, 629 K = function() { 630 J(), b.req && b.req.abort(); 631 }; 632 a.magnificPopup.registerModule(I, { 633 options: { 634 settings: null, 635 cursor: "mfp-ajax-cur", 636 tError: '<a href="%url%">The content</a> could not be loaded.' 637 }, 638 proto: { 639 initAjax: function() { 640 b.types.push(I), 641 (H = b.st.ajax.cursor), 642 w(h + "." + I, K), 643 w("BeforeChange." + I, K); 644 }, 645 getAjax: function(c) { 646 H && a(document.body).addClass(H), b.updateStatus("loading"); 647 var d = a.extend( 648 { 649 url: c.src, 650 success: function(d, e, f) { 651 var g = { data: d, xhr: f }; 652 y("ParseAjax", g), 653 b.appendContent(a(g.data), I), 654 (c.finished = !0), 655 J(), 656 b._setFocus(), 657 setTimeout(function() { 658 b.wrap.addClass(q); 659 }, 16), 660 b.updateStatus("ready"), 661 y("AjaxContentAdded"); 662 }, 663 error: function() { 664 J(), 665 (c.finished = c.loadError = !0), 666 b.updateStatus( 667 "error", 668 b.st.ajax.tError.replace("%url%", c.src) 669 ); 670 } 671 }, 672 b.st.ajax.settings 673 ); 674 return (b.req = a.ajax(d)), ""; 675 } 676 } 677 }); 678 var L, 679 M = function(c) { 680 if (c.data && void 0 !== c.data.title) return c.data.title;
681 var d = b.st.image.titleSrc; 682 if (d) { 683 if ("function" == typeof d) return d.call(b, c); 684 if (c.el) return c.el.attr(d) || ""; 685 } 686 return ""; 687 }; 688 a.magnificPopup.registerModule("image", { 689 options: { 690 markup: 691 '<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>', 692 cursor: "mfp-zoom-out-cur", 693 titleSrc: "title", 694 verticalFit: !0, 695 tError: '<a href="%url%">The image</a> could not be loaded.' 696 }, 697 proto: { 698 initImage: function() { 699 var c = b.st.image, 700 d = ".image"; 701 b.types.push("image"), 702 w(m + d, function() { 703 "image" === b.currItem.type && 704 c.cursor && 705 a(document.body).addClass(c.cursor); 706 }), 707 w(h + d, function() { 708 c.cursor && a(document.body).removeClass(c.cursor), 709 v.off("resize" + p); 710 }), 711 w("Resize" + d, b.resizeImage), 712 b.isLowIE && w("AfterChange", b.resizeImage); 713 }, 714 resizeImage: function() { 715 var a = b.currItem; 716 if (a && a.img && b.st.image.verticalFit) { 717 var c = 0; 718 b.isLowIE && 719 (c = 720 parseInt(a.img.css("padding-top"), 10) + 721 parseInt(a.img.css("padding-bottom"), 10)), 722 a.img.css("max-height", b.wH - c + "px"); 723 } 724 }, 725 _onImageHasSize: function(a) { 726 a.img && 727 ((a.hasSize = !0), 728 L && clearInterval(L), 729 (a.isCheckingImgSize = !1), 730 y("ImageHasSize", a), 731 a.imgHidden && 732 (b.content && b.content.removeClass("mfp-loading"), 733 (a.imgHidden = !1))); 734 }, 735 findImageSize: function(a) { 736 var c = 0, 737 d = a.img[0], 738 e = function(f) { 739 L && clearInterval(L), 740 (L = setInterval(function() { 741 return d.naturalWidth > 0 742 ? void b._onImageHasSize(a) 743 : (c > 200 && clearInterval(L), 744 c++, 745 void (3 === c 746 ? e(10) 747 : 40 === c 748 ? e(50) 749 : 100 === c && e(500))); 750 }, f)); 751 }; 752 e(1); 753 }, 754 getImage: function(c, d) { 755 var e = 0, 756 f = function() { 757 c && 758 (c.img[0].complete 759 ? (c.img.off(".mfploader"), 760 c === b.currItem && 761 (b._onImageHasSize(c), 762 b.updateStatus("ready")), 763 (c.hasSize = !0), 764 (c.loaded = !0), 765 y("ImageLoadComplete")) 766 : (e++, 200 > e ? setTimeout(f, 100) : g())); 767 }, 768 g = function() { 769 c && 770 (c.img.off(".mfploader"), 771 c === b.currItem && 772 (b._onImageHasSize(c), 773 b.updateStatus( 774 "error", 775 h.tError.replace("%url%", c.src) 776 )), 777 (c.hasSize = !0), 778 (c.loaded = !0), 779 (c.loadError = !0)); 780 }, 781 h = b.st.image, 782 i = d.find(".mfp-img"); 783 if (i.length) { 784 var j = document.createElement("img"); 785 (j.className = "mfp-img"), 786 c.el && 787 c.el.find("img").length && 788 (j.alt = c.el.find("img").attr("alt")), 789 (c.img = a(j) 790 .on("load.mfploader", f) 791 .on("error.mfploader", g)), 792 (j.src = c.src), 793 i.is("img") && (c.img = c.img.clone()), 794 (j = c.img[0]),
795 j.naturalWidth > 0 796 ? (c.hasSize = !0) 797 : j.width || (c.hasSize = !1); 798 } 799 return ( 800 b._parseMarkup( 801 d, 802 { title: M(c), img_replaceWith: c.img }, 803 c 804 ), 805 b.resizeImage(), 806 c.hasSize 807 ? (L && clearInterval(L), 808 c.loadError 809 ? (d.addClass("mfp-loading"), 810 b.updateStatus( 811 "error", 812 h.tError.replace("%url%", c.src) 813 )) 814 : (d.removeClass("mfp-loading"), 815 b.updateStatus("ready")), 816 d) 817 : (b.updateStatus("loading"), 818 (c.loading = !0), 819 c.hasSize || 820 ((c.imgHidden = !0), 821 d.addClass("mfp-loading"), 822 b.findImageSize(c)), 823 d) 824 ); 825 } 826 } 827 }); 828 var N, 829 O = function() { 830 return ( 831 void 0 === N && 832 (N = 833 void 0 !== 834 document.createElement("p").style.MozTransform), 835 N 836 ); 837 }; 838 a.magnificPopup.registerModule("zoom", { 839 options: { 840 enabled: !1, 841 easing: "ease-in-out", 842 duration: 300, 843 opener: function(a) { 844 return a.is("img") ? a : a.find("img"); 845 } 846 }, 847 proto: { 848 initZoom: function() { 849 var a, 850 c = b.st.zoom, 851 d = ".zoom"; 852 if (c.enabled && b.supportsTransition) { 853 var e, 854 f, 855 g = c.duration, 856 j = function(a) { 857 var b = a 858 .clone() 859 .removeAttr("style") 860 .removeAttr("class") 861 .addClass("mfp-animated-image"), 862 d = "all " + c.duration / 1e3 + "s " + c.easing, 863 e = { 864 position: "fixed", 865 zIndex: 9999, 866 left: 0, 867 top: 0, 868 "-webkit-backface-visibility": "hidden" 869 }, 870 f = "transition"; 871 return ( 872 (e["-webkit-" + f] = e["-moz-" + f] = e[ 873 "-o-" + f 874 ] = e[f] = d), 875 b.css(e), 876 b 877 ); 878 }, 879 k = function() { 880 b.content.css("visibility", "visible"); 881 }; 882 w("BuildControls" + d, function() { 883 if (b._allowZoom()) { 884 if ( 885 (clearTimeout(e), 886 b.content.css("visibility", "hidden"), 887 (a = b._getItemToZoom()), 888 !a) 889 ) 890 return void k(); 891 (f = j(a)), 892 f.css(b._getOffset()), 893 b.wrap.append(f), 894 (e = setTimeout(function() { 895 f.css(b._getOffset(!0)), 896 (e = setTimeout(function() { 897 k(), 898 setTimeout(function() { 899 f.remove(), 900 (a = f = null),
901 y("ZoomAnimationEnded"); 902 }, 16); 903 }, g)); 904 }, 16)); 905 } 906 }), 907 w(i + d, function() { 908 if (b._allowZoom()) { 909 if ( 910 (clearTimeout(e), 911 (b.st.removalDelay = g), 912 !a) 913 ) { 914 if (((a = b._getItemToZoom()), !a)) return; 915 f = j(a); 916 } 917 f.css(b._getOffset(!0)), 918 b.wrap.append(f), 919 b.content.css("visibility", "hidden"), 920 setTimeout(function() { 921 f.css(b._getOffset()); 922 }, 16); 923 } 924 }), 925 w(h + d, function() { 926 b._allowZoom() && 927 (k(), f && f.remove(), (a = null)); 928 }); 929 } 930 }, 931 _allowZoom: function() { 932 return "image" === b.currItem.type; 933 }, 934 _getItemToZoom: function() { 935 return b.currItem.hasSize ? b.currItem.img : !1; 936 }, 937 _getOffset: function(c) { 938 var d; 939 d = c 940 ? b.currItem.img 941 : b.st.zoom.opener(b.currItem.el || b.currItem); 942 var e = d.offset(), 943 f = parseInt(d.css("padding-top"), 10), 944 g = parseInt(d.css("padding-bottom"), 10); 945 e.top -= a(window).scrollTop() - f; 946 var h = { 947 width: d.width() + "px", 948 height: 949 (u ? d.innerHeight() : d[0].offsetHeight) - g - f + "px" 950 }; 951 return ( 952 O() 953 ? (h["-moz-transform"] = h.transform = 954 "translate(" + e.left + "px," + e.top + "px)") 955 : ((h.left = e.left), (h.top = e.top)), 956 h 957 ); 958 } 959 } 960 }); 961 var P = "iframe", 962 Q = "//about:blank", 963 R = function(a) { 964 if (b.currTemplate[P]) { 965 var c = b.currTemplate[P].find("iframe"); 966 c.length && 967 (a || (c[0].src = Q), 968 b.isIE8 && c.css("display", a ? "block" : "none")); 969 } 970 }; 971 a.magnificPopup.registerModule(P, { 972 options: { 973 markup: 974 '<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>', 975 srcAction: "iframe_src", 976 patterns: { 977 youtube: { 978 index: "youtube.com", 979 id: "v=", 980 src: "//www.youtube.com/embed/%id%?autoplay=1" 981 }, 982 vimeo: { 983 index: "vimeo.com/", 984 id: "/", 985 src: "//player.vimeo.com/video/%id%?autoplay=1" 986 }, 987 gmaps: { index: "//maps.google.", src: "%id%&output=embed" } 988 } 989 }, 990 proto: { 991 initIframe: function() { 992 b.types.push(P), 993 w("BeforeChange", function(a, b, c) { 994 b !== c && (b === P ? R() : c === P && R(!0)); 995 }), 996 w(h + "." + P, function() { 997 R(); 998 }); 999 }, 1000 getIframe: function(c, d) { 1001 var e = c.src, 1002 f = b.st.iframe; 1003 a.each(f.patterns, function() { 1004 return e.indexOf(this.index) > -1 1005 ? (this.id && 1006 (e = 1007 "string" == typeof this.id 1008 ? e.substr( 1009 e.lastIndexOf(this.id
1009) + 1010 this.id.length, 1011 e.length 1012 ) 1013 : this.id.call(this, e)), 1014 (e = this.src.replace("%id%", e)), 1015 !1) 1016 : void 0; 1017 }); 1018 var g = {}; 1019 return ( 1020 f.srcAction && (g[f.srcAction] = e), 1021 b._parseMarkup(d, g, c), 1022 b.updateStatus("ready"), 1023 d 1024 ); 1025 } 1026 } 1027 }); 1028 var S = function(a) { 1029 var c = b.items.length; 1030 return a > c - 1 ? a - c : 0 > a ? c + a : a; 1031 }, 1032 T = function(a, b, c) { 1033 return a.replace(/%curr%/gi, b + 1).replace(/%total%/gi, c); 1034 }; 1035 a.magnificPopup.registerModule("gallery", { 1036 options: { 1037 enabled: !1, 1038 arrowMarkup: 1039 '<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>', 1040 preload: [0, 2], 1041 navigateByImgClick: !0, 1042 arrows: !0, 1043 tPrev: "Previous (Left arrow key)", 1044 tNext: "Next (Right arrow key)", 1045 tCounter: "%curr% of %total%" 1046 }, 1047 proto: { 1048 initGallery: function() { 1049 var c = b.st.gallery, 1050 e = ".mfp-gallery", 1051 g = Boolean(a.fn.mfpFastClick); 1052 return ( 1053 (b.direction = !0), 1054 c && c.enabled 1055 ? ((f += " mfp-gallery"), 1056 w(m + e, function() { 1057 c.navigateByImgClick && 1058 b.wrap.on( 1059 "click" + e, 1060 ".mfp-img", 1061 function() { 1062 return b.items.length > 1 1063 ? (b.next(), !1) 1064 : void 0; 1065 } 1066 ), 1067 d.on("keydown" + e, function(a) { 1068 37 === a.keyCode 1069 ? b.prev() 1070 : 39 === a.keyCode && b.next(); 1071 }); 1072 }), 1073 w("UpdateStatus" + e, function(a, c) { 1074 c.text && 1075 (c.text = T( 1076 c.text, 1077 b.currItem.index, 1078 b.items.length 1079 )); 1080 }), 1081 w(l + e, function(a, d, e, f) { 1082 var g = b.items.length; 1083 e.counter = 1084 g > 1 ? T(c.tCounter, f.index, g) : ""; 1085 }), 1086 w("BuildControls" + e, function() { 1087 if ( 1088 b.items.length > 1 && 1089 c.arrows && 1090 !b.arrowLeft 1091 ) { 1092 var d = c.arrowMarkup, 1093 e = (b.arrowLeft = a( 1094 d 1095 .replace(/%title%/gi, c.tPrev) 1096 .replace(/%dir%/gi, "left") 1097 ).addClass(s)), 1098 f = (b.arrowRight = a( 1099 d 1100 .replace(/%title%/gi, c.tNext) 1101 .replace(/%dir%/gi, "right") 1102 ).addClass(s)), 1103 h = g ? "mfpFastClick" : "click"; 1104 e[h](function() { 1105 b.prev(); 1106 }), 1107 f[h](function() { 1108 b.next(); 1109 }), 1110 b.isIE7 && 1111 (x("b", e[0], !1, !0), 1112 x("a", e[0], !1, !0), 1113 x("b", f[0], !1, !0), 1114 x("a", f[0], !1, !0)), 1115 b.container.append(e.add(f)); 1116 } 1117 }), 1118 w(n + e, function() { 1119 b._preloadTimeout && 1120 clearTimeout(b._preloadTimeout), 1121 (b._preloadTimeout = setTimeout(function() { 1122 b.preloadNearbyImages(), 1123 (b._preloadTimeout = null); 1124 }, 16)); 1125 }), 1126 void w(h + e, function() { 1127 d.off(e), 1128 b.wrap.off("click" + e), 1129 b.arrowLeft && 1130 g && 1131 b.arrowLeft 1132 .add(b.arrowRight) 1133 .destroyMfpFastClick(), 1134 (b.arrowRight = b.arrowLeft = null); 1135 })) 1136 : !1 1137 ); 1138 }, 1139 next: function() { 1140 (b.direction = !0), 1141 (b.index = S(b.index + 1)), 1142 b.updateItemHTML(); 1143 }, 1144 prev: function() { 1145 (b.direction = !1), 1146 (b.index = S(b.index - 1)), 1147 b.updateItemHTML(); 1148 }, 1149 goTo: function(a) { 1150 (b.direction = a >= b.index), (b.index = a), b.updateItemHTML(); 1151 }, 1152 preloadNearbyImages: function() { 1153 var a, 1154 c = b.st.gallery.preload, 1155 d = Math.min(c[0], b.items.length), 1156 e = Math.min(c[1], b.items.length); 1157 for (a = 1; a <= (b.direction ? e : d); a++) 1158 b._preloadItem(b.index + a); 1159 for (a = 1; a <= (b.direction ? d : e); a++) 1160 b._preloadItem(b.index - a); 1161 }, 1162 _preloadItem: function(c) { 1163 if (((c = S(c)), !b.items[c].preloaded)) { 1164 var d = b.items[c]; 1165 d.parsed || (d = b.parseEl(c)), 1166 y("LazyLoad", d),
1167 "image" === d.type && 1168 (d.img = a('<img class="mfp-img" />') 1169 .on("load.mfploader", function() { 1170 d.hasSize = !0; 1171 }) 1172 .on("error.mfploader", function() { 1173 (d.hasSize = !0), 1174 (d.loadError = !0), 1175 y("LazyLoadError", d); 1176 }) 1177 .attr("src", d.src)), 1178 (d.preloaded = !0); 1179 } 1180 } 1181 } 1182 }); 1183 var U = "retina"; 1184 a.magnificPopup.registerModule(U, { 1185 options: { 1186 replaceSrc: function(a) { 1187 return a.src.replace(/\.\w+$/, function(a) { 1188 return "@2x" + a; 1189 }); 1190 }, 1191 ratio: 1 1192 }, 1193 proto: { 1194 initRetina: function() { 1195 if (window.devicePixelRatio > 1) { 1196 var a = b.st.retina, 1197 c = a.ratio; 1198 (c = isNaN(c) ? c() : c), 1199 c > 1 && 1200 (w("ImageHasSize." + U, function(a, b) { 1201 b.img.css({ 1202 "max-width": 1203 b.img[0].naturalWidth / c + "px", 1204 width: "100%" 1205 }); 1206 }), 1207 w("ElementParse." + U, function(b, d) { 1208 d.src = a.replaceSrc(d, c); 1209 })); 1210 } 1211 } 1212 } 1213 }), 1214 (function() { 1215 var b = 1e3, 1216 c = "ontouchstart" in window, 1217 d = function() { 1218 v.off("touchmove" + f + " touchend" + f); 1219 }, 1220 e = "mfpFastClick", 1221 f = "." + e; 1222 (a.fn.mfpFastClick = function(e) { 1223 return a(this).each(function() { 1224 var g, 1225 h = a(this); 1226 if (c) { 1227 var i, j, k, l, m, n; 1228 h.on("touchstart" + f, function(a) { 1229 (l = !1), 1230 (n = 1), 1231 (m = a.originalEvent 1232 ? a.originalEvent.touches[0] 1233 : a.touches[0]), 1234 (j = m.clientX), 1235 (k = m.clientY), 1236 v 1237 .on("touchmove" + f, function(a) { 1238 (m = a.originalEvent 1239 ? a.originalEvent.touches 1240 : a.touches), 1241 (n = m.length), 1242 (m = m[0]), 1243 (Math.abs(m.clientX - j) > 10 || 1244 Math.abs(m.clientY - k) > 10) && 1245 ((l = !0), d()); 1246 }) 1247 .on("touchend" + f, function(a) { 1248 d(), 1249 l || 1250 n > 1 || 1251 ((g = !0), 1252 a.preventDefault(), 1253 clearTimeout(i), 1254 (i = setTimeout(function() { 1255 g = !1; 1256 }, b)), 1257 e()); 1258 }); 1259 }); 1260 } 1261 h.on("click" + f, function() { 1262 g || e(); 1263 }); 1264 }); 1265 }), 1266 (a.fn.destroyMfpFastClick = function() { 1267 a(this).off("touchstart" + f + " click" + f), 1268 c && v.off("touchmove" + f + " touchend" + f); 1269 }); 1270 })(), 1271 A(); 1272});
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.