1"use strict"; 2! function() { 3 var t = document.querySelectorAll(".js-page-control"); 4 if (t.length) 5 for (var n = function(t) { 6 t.currentTarget.classList.remove("crawl-control--initial") 7 }, e = function(t) { 8 var n = t.currentTarget, 9 e = function() { 10 n.classList.add("crawl-control--initial") 11 }; 12 window.setTimeout(e, 150) 13 }, r = 0; r < t.length; r++) t[r].addEventListener("touchstart", n, !1), t[r].addEventListener("touchend", e, !1) 14}(); 15"use strict"; 16! function() { 17 function t(t, e) { 18 e = e || { 19 bubbles: !1, 20 cancelable: !1, 21 detail: void 0 22 }; 23 var n = document.createEvent("CustomEvent"); 24 return n.initCustomEvent(t, e.bubbles, e.cancelable, e.detail), n 25 } 26 if ("function" == typeof window.CustomEvent) return !1; 27 t.prototype = window.Event.prototype, window.CustomEvent = t 28}(); 29"use strict"; 30 31function debounce(t) { 32 var n = this, 33 i = arguments, 34 e = arguments.length <= 1 || void 0 === arguments[1] ? 0 : arguments[1], 35 o = !(arguments.length <= 2 || void 0 === arguments[2]) && arguments[2], 36 u = void 0; 37 if ("function" == typeof t) return function() { 38 clearTimeout(u), u = setTimeout(function() { 39 u = null, o || t.apply(n, i) 40 }, e), o && !u && t.apply(n, i) 41 } 42} 43"use strict"; 44 45function findClosestInArray(r, t) { 46 if (!r || 0 == r.length) return null; 47 if (1 == r.length) return i[0]; 48 for (var n = 1; n < r.length; n++) 49 if (parseInt(r[n]) > t) { 50 var e = parseInt(r[n - 1]), 51 a = parseInt(r[n]); 52 return Math.abs(e - t) < Math.abs(a - t) ? e : a 53 } 54 return r[r.length - 1] 55} 56"use strict"; 57! function(e, n, t) { 58 function r(e, n) { 59 return typeof e === n 60 } 61 62 function o(e) { 63 return e.replace(/([a-z])-([a-z])/g, function(e, n, t) { 64 return n + t.toUpperCase() 65 }).replace(/^-/, "") 66 } 67 68 function i(e, n) { 69 return !!~("" + e).indexOf(n) 70 } 71 72 function s(e, n) { 73 return function() { 74 return e.apply(n, arguments) 75 } 76 } 77 78 function f(e, n, t) { 79 var o; 80 for (var i in e) 81 if (e[i] in n) return !1 === t ? e[i] : (o = n[e[i]], r(o, "function") ? s(o, t || n) : o); 82 return !1 83 } 84 85 function l(e) { 86 return e.replace(/([A-Z])/g, function(e, n) { 87 return "-" + n.toLowerCase() 88 }).replace(/^ms-/, "-ms-") 89 } 90 91 function u() { 92 return "function" != typeof n.createElement ? n.createElement(arguments[0]) : E ? n.createElementNS.call(n, "http://www.w3.org/2000/svg", arguments[0]) : n.createElement.apply(n, arguments) 93 } 94 95 function a() { 96 var e = n.body; 97 return e || (e = u(E ? "svg" : "body"), e.fake = !0), e 98 } 99 100 function p(e, t, r, o) { 101 var i, s, f, l, p = "modernizr", 102 d = u("div"), 103 c = a(); 104 if (parseInt(r, 10)) 105 for (; r--;) f = u("div"), f.id = o ? o[r] : p + (r + 1), d.appendChild(f); 106 return i = u("style"), i.type = "text/css", i.id = "s" + p, (c.fake ? c : d).appendChild(i), c.appendChild(d), i.styleSheet ? i.styleSheet.cssText = e : i.appendChild(n.createTextNode(e)), d.id = p, c.fake && (c.style.background = "", c.style.overflow = "hidden", l = _.style.overflow, _.style.overflow = "hidden", _.appendChild(c)), s = t(d, e), c.fake ? (c.parentNode.removeChild(c), _.style.overflow = l, _.offsetHeight) : d.parentNode.removeChild(d), !!s 107 } 108 109 function d(n, r) { 110 var o = n.length; 111 if ("CSS" in e && "supports" in e.CSS) { 112 for (; o--;) 113 if (e.CSS.supports(l(n[o]), r)) return !0; 114 return !1 115 } 116 if ("CSSSupportsRule" in e) { 117 for (var i = []; o--;) i.push("(" + l(n[o]) + ":" + r + ")"); 118 return i = i.join(" or "), p("@supports (" + i + ") { #modernizr { position: absolute; } }", function(e) { 119 return "absolute" == getComputedStyle(e, null).position 120 }) 121 } 122 return t 123 } 124 125 function c(e, n, s, f) { 126 function l() { 127 p && (delete z.style, delete z.modElem) 128 } 129 if (f = !r(f, "undefined") && f, !r(s, "undefined")) { 130 var a = d(e, s); 131 if (!r(a, "undefined")) return a 132 } 133 for (var p, c, v, m, h, y = ["modernizr", "tspan"]; !z.style;) p = !0, z.modElem = u(y.shift()), z.style = z.modElem.style; 134 for (v = e.length, c = 0; v > c; c++) 135 if (m = e[c], h = z.style[m], i(m, "-") && (m = o(m)), z.style[m] !== t) { 136 if (f || r(s, "undefined")) return l(), "pfx" != n || m; 137 try { 138 z.style[m] = s 139 } catch (e) {} 140 if (z.style[m] != h) return l(), "pfx" != n || m 141 } 142 return l(), !1 143 } 144 145 function v(e, n, t, o, i) { 146 var s = e.charAt(0).toUpperCase() + e.slice(1), 147 l = (e + " " + w.join(s + " ") + s).split(" "); 148 return r(n, "string") || r(n, "undefined") ? c(l, n, o, i) : (l = (e + " " + S.join(s + " ") + s).split(" "), f(l, n, t)) 149 } 150 var m = [], 151 h = { 152 _version: "3.1.0", 153 _config: { 154 classPrefix: "", 155 enableClasses: !0, 156 enableJSClass: !0, 157 usePrefixes: !0 158 }, 159 _q: [], 160 on: function(e, n) { 161 var t = this; 162 setTimeout(function() { 163 n(t[e]) 164 }, 0) 165 }, 166 addTest: function(e, n, t) { 167 m.push({ 168 name: e, 169 fn: n, 170 options: t 171 }) 172 }, 173 addAsyncTest: function(e) { 174 m.push({ 175 name: null, 176 fn: e 177 }) 178 } 179 }, 180 y = function() {}; 181 y.prototype = h, y = new y; 182 var C = [], 183 g = "Moz O ms Webkit", 184 w = h._config.usePrefixes ? g.split(" ") : []; 185 h._cssomPrefixes = w; 186 var x = function(n) { 187 var r, o = prefixes.length, 188 i = e.CSSRule; 189 if (void 0 === i) return t; 190 if (!n) return !1; 191 if (n = n.replace(/^@/, ""), (r = n.replace(/-/g, "_").toUpperCase() + "_RULE") in i) return "@" + n; 192 for (var s = 0; o > s; s++) { 193 var f = prefixes[s]; 194 if (f.toUpperCase() + "_" + r in i) return "@-" + f.toLowerCase() + "-" + n 195 } 196 return !1 197 }; 198 h.atRule = x; 199 var S = h._config.usePrefixes ? g.toLowerCase().split(" ") : []; 200 h._domPrefixes = S; 201 var _ = n.documentElement, 202 E = "svg" === _.nodeName.toLowerCase(), 203 b = { 204 elem: u("modernizr") 205 }; 206 y._q.push(function() { 207 delete b.elem 208 }); 209 var z = { 210 style: b.elem.style 211 }; 212 y._q.unshift(function() { 213 delete z.style 214 }), h.testAllProps = v, h.prefixed = function(e, n, t) { 215 return 0 === e.indexOf("@") ? x(e) : (-1 != e.indexOf("-") && (e = o(e)), n ? v(e, n, t) : v(e, "pfx")) 216 }, 217 function() { 218 var e, n, t, o, i, s, f; 219 for (var l in m) { 220 if (e = [], n = m[l], n.name && (e.push(n.name.toLowerCase()), n.options && n.options.aliases && n.options.aliases.length)) 221 for (t = 0; t < n.options.aliases.length; t++) e.push(n.options.aliases[t].toLowerCase()); 222 for (o = r(n.fn, "function") ? n.fn() : n.fn, i = 0; i < e.length; i++) s = e[i], f = s.split("."), 1 === f.length ? y[f[0]] = o : (!y[f[0]] || y[f[0]] instanceof Boolean || (y[f[0]] = new Boolean(y[f[0]])), y[f[0]][f[1]] = o), C.push((o ? "" : "no-") + f.join("-")) 223 } 224 }(), delete h.addTest, delete h.addAsyncTest; 225 for (var L = 0; L < y._q.length; L++) y._q[L](); 226 e.Modernizr = y 227}(window, document); 228"use strict"; 229(function() { 230 function t(t) { 231 return "function" == typeof t || "object" == typeof t && null !== t 232 } 233 234 function n(t) { 235 return "function" == typeof t 236 } 237 238 function e(t) { 239 return "object" == typeof t && null !== t 240 } 241 242 function r(t) { 243 D = t 244 } 245 246 function o(t) { 247 U = t 248 } 249 250 function i() { 251 return function() { 252 I(s) 253 } 254 } 255 256 function u() { 257 return function() { 258 setTimeout(s, 1) 259 } 260 } 261 262 function s() { 263 for (var t = 0; t < N; t += 2) { 264 (0, J[t])(J[t + 1]), J[t] = void 0, J[t + 1] = void 0 265 } 266 N = 0 267 } 268 269 function c() {} 270 271 function a() { 272 return new TypeError("You cannot resolve a promise with itself") 273 } 274 275 function f() { 276 return new TypeError("A promises callback cannot return that same promise.") 277 } 278 279 function l(t) { 280 try { 281 return t.then 282 } catch (t) { 283 return X.error = t, X 284 } 285 } 286 287 function p(t, n, e, r) { 288 try { 289 t.call(n, e, r) 290 } catch (t) { 291 return t 292 } 293 } 294 295 function _(t, n, e) { 296 U(function(t) { 297 var r = !1, 298 o = p(e, n, function(e) { 299 r || (r = !0, n !== e ? d(t, e) : m(t, e)) 300 }, function(n) { 301 r || (r = !0, b(t, n)) 302 }, "Settle: " + (t._label || " unknown promise")); 303 !r && o && (r = !0, b(t, o)) 304 }, t) 305 } 306 307 function h(t, n) { 308 n._state === R ? m(t, n._result) : n._state === V ? b(t, n._result) : w(n, void 0, function(n) { 309 d(t, n) 310 }, function(n) { 311 b(t, n) 312 }) 313 } 314 315 function v(t, e) { 316 if (e.constructor === t.constructor) h(t, e); 317 else { 318 var r = l(e); 319 r === X ? b(t, X.error) : void 0 === r ? m(t, e) : n(r) ? _(t, e, r) : m(t, e) 320 } 321 } 322 323 function d(n, e) { 324 n === e ? b(n, a()) : t(e) ? v(n, e) : m(n, e) 325 } 326 327 function y(t) {
328 t._onerror && t._onerror(t._result), g(t) 329 } 330 331 function m(t, n) { 332 t._state === Q && (t._result = n, t._state = R, 0 !== t._subscribers.length && U(g, t)) 333 } 334 335 function b(t, n) { 336 t._state === Q && (t._state = V, t._result = n, U(y, t)) 337 } 338 339 function w(t, n, e, r) { 340 var o = t._subscribers, 341 i = o.length; 342 t._onerror = null, o[i] = n, o[i + R] = e, o[i + V] = r, 0 === i && t._state && U(g, t) 343 } 344 345 function g(t) { 346 var n = t._subscribers, 347 e = t._state; 348 if (0 !== n.length) { 349 for (var r, o, i = t._result, u = 0; u < n.length; u += 3) r = n[u], o = n[u + e], r ? j(e, r, o, i) : o(i); 350 t._subscribers.length = 0 351 } 352 } 353 354 function A() { 355 this.error = null 356 } 357 358 function E(t, n) { 359 try { 360 return t(n) 361 } catch (t) { 362 return Z.error = t, Z 363 } 364 } 365 366 function j(t, e, r, o) { 367 var i, u, s, c, a = n(r); 368 if (a) { 369 if (i = E(r, o), i === Z ? (c = !0, u = i.error, i = null) : s = !0, e === i) return void b(e, f()) 370 } else i = o, s = !0; 371 e._state !== Q || (a && s ? d(e, i) : c ? b(e, u) : t === R ? m(e, i) : t === V && b(e, i)) 372 } 373 374 function S(t, n) { 375 try { 376 n(function(n) { 377 d(t, n) 378 }, function(n) { 379 b(t, n) 380 }) 381 } catch (n) { 382 b(t, n) 383 } 384 } 385 386 function T(t, n) { 387 var e = this; 388 e._instanceConstructor = t, e.promise = new t(c), e._validateInput(n) ? (e._input = n, e.length = n.length, e._remaining = n.length, e._init(), 0 === e.length ? m(e.promise, e._result) : (e.length = e.length || 0, e._enumerate(), 0 === e._remaining && m(e.promise, e._result))) : b(e.promise, e._validationError()) 389 } 390 391 function P(t) { 392 return new $(this, t).promise 393 } 394 395 function x(t) { 396 function n(t) { 397 d(o, t) 398 } 399 400 function e(t) { 401 b(o, t) 402 } 403 var r = this, 404 o = new r(c); 405 if (!L(t)) return b(o, new TypeError("You must pass an array to race.")), o; 406 for (var i = t.length, u = 0; o._state === Q && u < i; u++) w(r.resolve(t[u]), void 0, n, e); 407 return o 408 } 409 410 function C(t) { 411 var n = this; 412 if (t && "object" == typeof t && t.constructor === n) return t; 413 var e = new n(c); 414 return d(e, t), e 415 } 416 417 function M(t) { 418 var n = this, 419 e = new n(c); 420 return b(e, t), e 421 } 422 423 function O() { 424 throw new TypeError("You must pass a resolver function as the first argument to the promise constructor") 425 } 426 427 function k() { 428 throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object c
428onstructor cannot be called as a function.") 429 } 430 431 function Y(t) { 432 this._id = ot++, this._state = void 0, this._result = void 0, this._subscribers = [], c !== t && (n(t) || O(), this instanceof Y || k(), S(this, t)) 433 } 434 435 function q() { 436 var t; 437 if ("undefined" != typeof global) t = global; 438 else if ("undefined" != typeof self) t = self; 439 else try { 440 t = Function("return this")() 441 } catch (t) { 442 throw new Error("polyfill failed because global object is unavailable in this environment") 443 } 444 var n = t.Promise; 445 n && "[object Promise]" === Object.prototype.toString.call(n.resolve()) && !n.cast || (t.Promise = it) 446 } 447 var F; 448 F = Array.isArray ? Array.isArray : function(t) { 449 return "[object Array]" === Object.prototype.toString.call(t) 450 }; 451 var I, D, K, L = F, 452 N = 0, 453 U = function(t, n) { 454 J[N] = t, J[N + 1] = n, 2 === (N += 2) && (D ? D(s) : K()) 455 }, 456 W = "undefined" != typeof window ? window : void 0, 457 z = W || {}, 458 B = z.MutationObserver || z.WebKitMutationObserver, 459 G = "undefined" != typeof process && "[object process]" === {}.toString.call(process), 460 H = "undefined" != typeof Uint8ClampedArray && "undefined" != typeof importScripts && "undefined" != typeof MessageChannel, 461 J = new Array(1e3); 462 K = G ? function() { 463 return function() { 464 process.nextTick(s) 465 } 466 }() : B ? function() { 467 var t = 0, 468 n = new B(s), 469 e = document.createTextNode(""); 470 return n.observe(e, { 471 characterData: !0 472 }), 473 function() { 474 e.data = t = ++t % 2 475 } 476 }() : H ? function() { 477 var t = new MessageChannel; 478 return t.port1.onmessage = s, 479 function() { 480 t.port2.postMessage(0) 481 } 482 }() : void 0 === W && "function" == typeof require ? function() { 483 try { 484 var t = require, 485 n = t("vertx"); 486 return I = n.runOnLoop || n.runOnContext, i() 487 } catch (t) { 488 return u() 489 } 490 }() : u(); 491 var Q = void 0, 492 R = 1, 493 V = 2, 494 X = new A, 495 Z = new A; 496 T.prototype._validateInput = function(t) { 497 return L(t) 498 }, T.prototype._validationError = function() { 499 return new Error("Array Methods must be provided an Array") 500 }, T.prototype._init = function() { 501 this._result = new Array(this.length) 502 }; 503 var $ = T; 504 T.prototype._enumerate = function() { 505 for (var t = this, n = t.length, e = t.promise, r = t._input, o = 0; e._state === Q && o < n; o++) t._eachEntry(r[o], o) 506 }, T.prototype._eachEntry = function(t, n) { 507 var r = this, 508 o = r._instanceConstructor; 509 e(t) ? t.constructor === o && t._state !== Q ? (t._onerror = null, r._settledAt(t._state, n, t._result)) : r._willSettleAt(o.resolve(t), n) : (r._remaining--, r._result[n] = t) 510 }, T.prototype._settledAt = function(t, n, e) { 511 var r = this, 512 o = r.promise; 513 o._state === Q && (r._remaining--, t === V ? b(o, e) : r._result[n] = e), 0 === r._remaining && m(o, r._result) 514 }, T.prototype._willSettleAt = function(t, n) { 515 var e = this; 516 w(t, void 0, function(t) { 517 e._settledAt(R, n, t) 518 }, function(t) { 519 e._settledAt(V, n, t) 520 }) 521 }; 522 var tt = P, 523 nt = x, 524 et = C, 525 rt = M, 526 ot = 0, 527 it = Y; 528 Y.all = tt, Y.race = nt, Y.resolve = et, Y.reject = rt, Y._setScheduler = r, Y._setAsap = o, Y._asap = U, Y.prototype = { 529 constructor: Y, 530 then: function(t, n) { 531 var e = this, 532 r = e._state; 533 if (r === R && !t || r === V && !n) return this; 534 var o = new this.constructor(c), 535 i = e._result; 536 if (r) { 537 var u = arguments[r - 1]; 538 U(function() { 539 j(r, o, u, i) 540 }) 541 } else w(e, o, t, n); 542 return o 543 }, 544 catch: function(t) { 545 return this.then(null, t) 546 } 547 }; 548 var ut = q, 549 st = { 550 Promise: it, 551 polyfill: ut 552 }; 553 "function" == typeof define && define.amd ? define(function() { 554 return st 555 }) : "undefined" != typeof module && module.exports ? module.exports = st : void 0 !== this && (this.ES6Promise = st), ut() 556}).call(void 0); 557"use strict"; 558var toggleQueryParams = function(e, r) { 559 var a = new URI; 560 a.hasQuery(e, r) ? a.removeQuery(e) : a.hasQuery(e) ? a.setQuery(e, r) : a.addQuery(e, r), window.history.replaceState("", "", a.href()) 561}; 562"use strict"; 563! function(t, e) { 564 "object" == typeof exports ? module.exports = e(require("./punycode"), require("./IPv6"), require("./SecondLevelDomains")) : "function" == typeof define && define.amd ? define(["./punycode", "./IPv6", "./SecondLevelDomains"], e) : t.URI = e(t.punycode, t.IPv6, t.SecondLevelDomains, t) 565}(window, function(t, e, r, s) { 566 function n(t, e) { 567 var r = 1 <= arguments.length, 568 s = 2 <= arguments.length; 569 if (!(this instanceof n)) return r ? s ? new n(t, e) : new n(t) : new n; 570 if (void 0 === t) { 571 if (r) throw new TypeError("undefined is not a valid argument for URI"); 572 t = "undefined" != typeof location ? location.href + "" : "" 573 } 574 return this.href(t), void 0 !== e ? this.absoluteTo(e) : this 575 } 576 577 function i(t) { 578 return t.replace(/([.*+?^=!:${}()|[\]\/\\])/g, "\\$1") 579 } 580 581 function a(t) { 582 return void 0 === t ? "Undefined" : String(Object.prototype.toString.call(t)).slice(8, -1) 583 } 584 585 function o(t) { 586 return "Array" === a(t) 587 } 588 589 function h(t, e) { 590 var r, s, n = {}; 591 if ("RegExp" === a(e)) n = null; 592 else if (o(e)) 593 for (r = 0, s = e.length; r < s; r++) n[e[r]] = !0; 594 else n[e] = !0; 595 for (r = 0, s = t.length; r < s; r++)(n && void 0 !== n[t[r]] || !n && e.test(t[r])) && (t.splice(r, 1), s--, r--); 596 return t 597 } 598 599 function u(t, e) { 600 var r, s; 601 if (o(e)) { 602 for (r = 0, s = e.length; r < s; r++) 603 if (!u(t, e[r])) return !1; 604 return !0 605 } 606 var n = a(e); 607 for (r = 0, s = t.length; r < s; r++) 608 if ("RegExp" === n) { 609 if ("string" == typeof t[r] && t[r].match(e)) return !0 610 } else if (t[r] === e) return !0; 611 return !1 612 } 613 614 function p(t, e) { 615 if (!o(t) || !o(e) || t.length !== e.length) return !1; 616 t.sort(), e.sort(); 617 for (var r = 0, s = t.length; r < s; r++) 618 if (t[r] !== e[r]) return !1; 619 return !0 620 } 621 622 function c(t) { 623 return escape(t) 624 } 625 626 function l(t) { 627 return encodeURIComponent(t).replace(/[!'()*]/g, c).replace(/\*/g, "%2A") 628 } 629 630 function d(t) { 631 return function(e, r) { 632 return void 0 === e ? this._parts[t] || "" : (this._parts[t] = e || null, this.build(!r), this) 633 } 634 } 635 636 function f(t, e) { 637 return function(r, s) { 638 return void 0 === r ? this._parts[t] || "" : (null !== r && (r += "", r.charAt(0) === e && (r = r.substring(1))), this._parts[t] = r, this.build(!s), this) 639 } 640 } 641 var m = s && s.URI; 642 n.version = "1.16.1"; 643 var g = n.prototype, 644 y = Object.prototype.hasOwnProperty; 645 n._parts = function() { 646 return { 647 protocol: null, 648 username: null, 649 password: null, 650 hostname: null, 651 urn: null, 652 port: null, 653 path: null, 654 query: null, 655 fragment: null, 656 duplicateQueryParameters: n.duplicateQueryParameters, 657 escapeQuerySpace: n.escapeQuerySpace 658 } 659 }, n.duplicateQueryParameters = !1, n.escapeQuerySpace = !0, n.protocol_expression = /^[a-z][a-z0-9.+-]*$/i, n.idn_expression = /[^a-z0-9\.-]/i, n.punycode_expression = /(xn--)/i, n.ip4_expression = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/, n.ip6_expression = /^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/, n.find_uri_expression = /\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u2018\u2019]))/gi, n.findUri = { 660 start: /\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi, 661 end: /[\s\r\n]|$/, 662 trim: /[`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u201e\u2018\u2019]+$/ 663 }, n.defaultPorts = { 664 http: "80", 665 https: "443", 666 ftp: "21", 667 gopher: "70", 668 ws: "80", 669 wss: "443" 670 }, n.invalid_hostname_characters = /[^a-zA-Z0-9\.-]/, n.domAttributes = { 671 a: "href", 672 blockquote: "cite", 673 link: "href", 674 base: "href", 675 script: "src", 676 form: "action", 677 img: "src", 678 area: "href", 679 iframe: "src", 680 embed: "src", 681 source: "src", 682 track: "src", 683 input: "src", 684 audio: "src", 685 video: "src" 686 }, n.getDomAttribute = function(t) { 687 if (t && t.nodeName) { 688 var e = t.nodeName.toLowerCase(); 689 return "input" === e && "image" !== t.type ? void 0 : n.domAttributes[e] 690 } 691 }, n.encode = l, n.decode = decodeURIComponent, n.iso8859 = function() { 692 n.encode = escape, n.decode = unescape 693 }, n.unicode = function() { 694 n.encode = l, n.decode = decodeURIComponent 695 }, n.characters = { 696 pathname: { 697 encode: { 698 expression: /%(24|26|2B|2C|3B|3D|3A|40)/gi, 699 map: { 700 "%24": "$",
701 "%26": "&", 702 "%2B": "+", 703 "%2C": ",", 704 "%3B": ";", 705 "%3D": "=", 706 "%3A": ":", 707 "%40": "@" 708 } 709 }, 710 decode: { 711 expression: /[\/\?#]/g, 712 map: { 713 "/": "%2F", 714 "?": "%3F", 715 "#": "%23" 716 } 717 } 718 }, 719 reserved: { 720 encode: { 721 expression: /%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi, 722 map: { 723 "%3A": ":", 724 "%2F": "/", 725 "%3F": "?", 726 "%23": "#", 727 "%5B": "[", 728 "%5D": "]", 729 "%40": "@", 730 "%21": "!", 731 "%24": "$", 732 "%26": "&", 733 "%27": "'", 734 "%28": "(", 735 "%29": ")", 736 "%2A": "*", 737 "%2B": "+", 738 "%2C": ",", 739 "%3B": ";", 740 "%3D": "=" 741 } 742 } 743 }, 744 urnpath: { 745 encode: { 746 expression: /%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi, 747 map: { 748 "%21": "!", 749 "%24": "$", 750 "%27": "'", 751 "%28": "(", 752 "%29": ")", 753 "%2A": "*", 754 "%2B": "+", 755 "%2C": ",", 756 "%3B": ";", 757 "%3D": "=", 758 "%40": "@" 759 } 760 }, 761 decode: { 762 expression: /[\/\?#:]/g, 763 map: { 764 "/": "%2F", 765 "?": "%3F", 766 "#": "%23", 767 ":": "%3A" 768 } 769 } 770 } 771 }, n.encodeQuery = function(t, e) { 772 var r = n.encode(t + ""); 773 return void 0 === e && (e = n.escapeQuerySpace), e ? r.replace(/%20/g, "+") : r 774 }, n.decodeQuery = function(t, e) { 775 t += "", void 0 === e && (e = n.escapeQuerySpace); 776 try { 777 return n.decode(e ? t.replace(/\+/g, "%20") : t) 778 } catch (e) { 779 return t 780 } 781 }; 782 var _, v = { 783 encode: "encode", 784 decode: "decode" 785 }, 786 b = function(t, e) { 787 return function(r) { 788 try { 789 return n[e](r + "").replace(n.characters[t][e].expression, function(r) { 790 return n.characters[t][e].map[r] 791 }) 792 } catch (t) { 793 return r 794 } 795 } 796 }; 797 for (_ in v) n[_ + "PathSegment"] = b("pathname", v[_]), n[_ + "UrnPathSegment"] = b("urnpath", v[_]); 798 v = function(t, e, r) { 799 return function(s) { 800 var i; 801 i = r ? function(t) { 802 return n[e](n[r](t)) 803 } : n[e], s = (s + "").split(t); 804 for (var a = 0, o = s.length; a < o; a++) s[a] = i(s[a]); 805 return s.join(t) 806 } 807 }, n.decodePath = v("/", "decodePathSegment"), n.decodeUrnPath = v(":", "decodeUrnPathSegment"), n.recodePath = v("/", "encodePathSegment", "decode"), n.recodeUrnPath = v(":", "encodeUrnPathSegment", "decode"), n.encodeReserved = b("reserved", "encode"), n.parse = function(t, e) { 808 var r; 809 return e || (e = {}), r = t.indexOf("#"), -1 < r && (e.fragment = t.substring(r + 1) || null, t = t.substring(0, r)), r = t.indexOf("?"), -1 < r && (e.query = t.substring(r + 1) || null, t = t.substring(0, r)), "//" === t.substring(0, 2) ? (e.protocol = null, t = t.substring(2), t = n.parseAuthority(t, e)) : -1 < (r = t.indexOf(":")) && (e.protocol = t.substring(0, r) || null, e.protocol && !e.protocol.match(n.protocol_expression) ? e.protocol = void 0 : "//" === t.substring(r + 1, r + 3) ? (t = t.substring(r + 3), t = n.parseAuthority(t, e)) : (t = t.substring(r + 1), e.urn = !0)), e.path = t, e 810 }, n.parseHost = function(t, e) { 811 t = t.replace(/\\/g, "/"); 812 var r, s = t.indexOf("/"); 813 if (-1 === s && (s = t.length), "[" === t.charAt(0)) r = t.indexOf("]"), e.hostname = t.substring(1, r) || null, e.port = t.substring(r + 2, s) || null, "/" === e.port && (e.port = null); 814 else { 815 var n = t.indexOf(":"); 816 r = t.indexOf("/"), n = t.indexOf(":", n + 1), -1 !== n && (-1 === r || n < r) ? (e.hostname = t.substring(0, s) || null, e.port = null) : (r = t.substring(0, s).split(":"), e.hostname = r[0] || null, e.port = r[1] || null) 817 } 818 return e.hostname && "/" !== t.substring(s).charAt(0) && (s++, t = "/" + t), t.substring(s) || "/" 819 }, n.parseAuthority = function(t, e) { 820 return t = n.parseUserinfo(t, e), n.parseHost(t, e) 821 }, n.parseUserinfo = function(t, e) { 822 var r = t.indexOf("/"), 823 s = t.lastIndexOf("@", -1 < r ? r : t.length - 1); 824 return -1 < s && (-1 === r || s < r) ? (r = t.substring(0, s).split(":"), e.username = r[0] ? n.decode(r[0]) : null, r.shift(), e.password = r[0] ? n.decode(r.join(":")) : null, t = t.substring(s + 1)) : (e.username = null, e.password = null), t 825 }, n.parseQuery = function(t, e) { 826 if (!t) return {}; 827 if (!(t = t.replace(/&+/g, "&").replace(/^\?*&*|&+$/g, ""))) return {}; 828 for (var r, s, i = {}
828, a = t.split("&"), o = a.length, h = 0; h < o; h++) r = a[h].split("="), s = n.decodeQuery(r.shift(), e), r = r.length ? n.decodeQuery(r.join("="), e) : null, y.call(i, s) ? ("string" != typeof i[s] && null !== i[s] || (i[s] = [i[s]]), i[s].push(r)) : i[s] = r; 829 return i 830 }, n.build = function(t) { 831 var e = ""; 832 return t.protocol && (e += t.protocol + ":"), t.urn || !e && !t.hostname || (e += "//"), e += n.buildAuthority(t) || "", "string" == typeof t.path && ("/" !== t.path.charAt(0) && "string" == typeof t.hostname && (e += "/"), e += t.path), "string" == typeof t.query && t.query && (e += "?" + t.query), "string" == typeof t.fragment && t.fragment && (e += "#" + t.fragment), e 833 }, n.buildHost = function(t) { 834 var e = ""; 835 return t.hostname ? (e = n.ip6_expression.test(t.hostname) ? e + "[" + t.hostname + "]" : e + t.hostname, t.port && (e += ":" + t.port), e) : "" 836 }, n.buildAuthority = function(t) { 837 return n.buildUserinfo(t) + n.buildHost(t) 838 }, n.buildUserinfo = function(t) { 839 var e = ""; 840 return t.username && (e += n.encode(t.username), t.password && (e += ":" + n.encode(t.password)), e += "@"), e 841 }, n.buildQuery = function(t, e, r) { 842 var s, i, a, h, u = ""; 843 for (i in t) 844 if (y.call(t, i) && i) 845 if (o(t[i])) 846 for (s = {}, a = 0, h = t[i].length; a < h; a++) void 0 !== t[i][a] && void 0 === s[t[i][a] + ""] && (u += "&" + n.buildQueryParameter(i, t[i][a], r), !0 !== e && (s[t[i][a] + ""] = !0)); 847 else void 0 !== t[i] && (u += "&" + n.buildQueryParameter(i, t[i], r)); 848 return u.substring(1) 849 }, n.buildQueryParameter = function(t, e, r) { 850 return n.encodeQuery(t, r) + (null !== e ? "=" + n.encodeQuery(e, r) : "") 851 }, n.addQuery = function(t, e, r) { 852 if ("object" == typeof e) 853 for (var s in e) y.call(e, s) && n.addQuery(t, s, e[s]); 854 else { 855 if ("string" != typeof e) throw new TypeError("URI.addQuery() accepts an object, string as the name parameter"); 856 void 0 === t[e] ? t[e] = r : ("string" == typeof t[e] && (t[e] = [t[e]]), o(r) || (r = [r]), t[e] = (t[e] || []).concat(r)) 857 } 858 }, n.removeQuery = function(t, e, r) { 859 var s; 860 if (o(e)) 861 for (r = 0, s = e.length; r < s; r++) t[e[r]] = void 0; 862 else if ("RegExp" === a(e)) 863 for (s in t) e.test(s) && (t[s] = void 0); 864 else if ("object" == typeof e) 865 for (s in e) y.call(e, s) && n.removeQuery(t, s, e[s]); 866 else { 867 if ("string" != typeof e) throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter"); 868 void 0 !== r ? "RegExp" === a(r) ? !o(t[e]) && r.test(t[e]) ? t[e] = void 0 : t[e] = h(t[e], r) : t[e] === r ? t[e] = void 0 : o(t[e]) && (t[e] = h(t[e], r)) : t[e] = void 0 869 } 870 }, n.hasQuery = function(t, e, r, s) { 871 if ("object" == typeof e) { 872 for (var i in e) 873 if (y.call(e, i) && !n.hasQuery(t, i, e[i])) return !1; 874 return !0 875 } 876 if ("string" != typeof e) throw new TypeError("URI.hasQuery() accepts an object, string as the name parameter"); 877 switch (a(r)) { 878 case "Undefined": 879 return e in t; 880 case "Boolean": 881 return t = Boolean(o(t[e]) ? t[e].length : t[e]), r === t; 882 case "Function": 883 return !!r(t[e], e, t); 884 case "Array": 885 return !!o(t[e]) && (s ? u : p)(t[e], r); 886 case "RegExp": 887 return o(t[e]) ? !!s && u(t[e], r) : Boolean(t[e] && t[e].match(r)); 888 case "Number": 889 r = String(r); 890 case "String": 891 return o(t[e]) ? !!s && u(t[e], r) : t[e] === r; 892 default: 893 throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter") 894 } 895 }, n.commonPath = function(t, e) { 896 var r, s = Math.min(t.length, e.length); 897 for (r = 0; r < s; r++) 898 if (t.charAt(r) !== e.charAt(r)) { 899 r--; 900 break 901 } 902 return 1 > r ? t.charAt(0) === e.charAt(0) && "/" === t.charAt(0) ? "/" : "" : ("/" === t.charAt(r) && "/" === e.charAt(r) || (r = t.substring(0, r).lastIndexOf("/")), t.substring(0, r + 1)) 903 }, n.withinString = function(t, e, r) { 904 r || (r = {}); 905 var s = r.start || n.findUri.start, 906 i = r.end || n.findUri.end, 907 a = r.trim || n.findUri.trim, 908 o = /[a-z0-9-]=["']?$/i; 909 for (s.lastIndex = 0;;) { 910 var h = s.exec(t); 911 if (!h) break; 912 if (h = h.index, r.ignoreHtml) { 913 var u = t.slice(Math.max(h - 3, 0), h); 914 if (u && o.test(u)) continue 915 } 916 var u = h + t.slice(h).search(i), 917 p = t.slice(h, u).replace(a, ""); 918 r.ignore && r.ignore.test(p) || (u = h + p.length, p = e(p, h, u, t), t = t.slice(0, h) + p + t.slice(u), s.lastIndex = h + p.length) 919 } 920 return s.lastIndex = 0, t 921 }, n.ensureValidHostname = function(e) { 922 if (e.match(n.invalid_hostname_characters)) { 923 if (!t) throw new TypeError('Hostname "' + e + '" contains characters other than [A-Z0-9.-] and Punycode.js is not available'); 924 if (t.toASCII(e).match(n.invalid_hostname_characters)) throw new TypeError('Hostname "' + e + '" contains characters other than [A-Z0-9.-]') 925 } 926 }, n.noConflict = function(t) { 927 return t ? (t = { 928 URI: this.noConflict() 929 }, s.URITemplate && "function" == typeof s.URITemplate.noConflict && (t.URITemplate = s.URITemplate.noConflict()), s.IPv6 && "function" == typeof s.IPv6.noConflict && (t.IPv6 = s.IPv6.noConflict()), s.SecondLevelDomains && "function" == typeof s.SecondLevelDomains.noConflict && (t.SecondLevelDomains = s.SecondLevelDomains.noConflict()), t) : (s.URI === this && (s.URI = m), this) 930 }, g.build = function(t) { 931 return !0 === t ? this._deferred_build = !0 : (void 0 === t || this._deferred_build) && (this._string = n.build(this._parts), this._deferred_build = !1), this 932 }, g.clone = function() { 933 return new n(this) 934 }, g.valueOf = g.toString = function() { 935 return this.build(!1)._string 936 }, g.protocol = d("protocol"), g.username = d("username"), g.password = d("password"), g.hostname = d("hostname"), g.port = d("port"), g.query = f("query", "?"), g.fragment = f("fragment", "#"), g.search = function(t, e) { 937 var r = this.query(t, e); 938 return "string" == typeof r && r.length ? "?" + r : r 939 }, g.hash = function(t, e) { 940 var r = this.fragment(t, e); 941 return "string" == typeof r && r.length ? "#" + r : r 942 }, g.pathname = function(t, e) { 943 if (void 0 === t || !0 === t) { 944 var r = this._parts.path || (this._parts.hostname ? "/" : ""); 945 return t ? (this._parts.urn ? n.decodeUrnPath : n.decodePath)(r) : r 946 } 947 return this._parts.path = this._parts.urn ? t ? n.recodeUrnPath(t) : "" : t ? n.recodePath(t) : "/", this.build(!e), this 948 }, g.path = g.pathname, g.href = function(t, e) { 949 var r; 950 if (void 0 === t) return this.toString(); 951 this._string = "", this._parts = n._parts(); 952 var s = t instanceof n, 953 i = "object" == typeof t && (t.hostname || t.path || t.pathname); 954 if (t.nodeName && (i = n.getDomAttribute(t), t = t[i] || "", i = !1), !s && i && void 0 !== t.pathname && (t = t.toString()), "string" == typeof t || t instanceof String) this._parts = n.parse(String(t), this._parts); 955 else { 956 if (!s && !i) throw new TypeError("invalid input"); 957 for (r in s = s ? t._parts : t) y.call(this._parts, r) && (this._parts[r] = s[r]) 958 } 959 return this.build(!e), this 960 }, g.is = function(t) { 961 var e = !1, 962 s = !1, 963 i = !1, 964 a = !1, 965 o = !1, 966 h = !1, 967 u = !1, 968 p = !this._parts.urn; 969 switch (this._parts.hostname && (p = !1, s = n.ip4_expression.test(this._parts.hostname), i = n.ip6_expression.test(this._parts.hostname), e = s || i, o = (a = !e) && r && r.has(this._parts.hostname), h = a && n.idn_expression.test(this._parts.hostname), u = a && n.punycode_expression.test(this._parts.hostname)), t.toLowerCase()) { 970 case "relative": 971 return p; 972 case "absolute": 973 return !p; 974 case "domain": 975 case "name": 976 return a; 977 case "sld": 978 return o; 979 case "ip": 980 return e; 981 case "ip4": 982 case "ipv4": 983 case "inet4": 984 return s; 985 case "ip6": 986 case "ipv6": 987 case "inet6": 988 return i; 989 case "idn": 990 return h; 991 case "url": 992 return !this._parts.urn; 993 case "urn": 994 return !!this._parts.urn; 995 case "punycode": 996 return u 997 } 998 return null 999 }; 1000 var w = g.protocol, 1001 Q = g.port, 1002 A = g.hostname; 1003 g.protocol = function(t, e) { 1004 if (void 0 !== t && t && (t = t.replace(/:(\/\/)?$/, ""), !t.match(n.protocol_expression))) throw new TypeError('Protocol "' + t + "\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]"); 1005 return w.call(this, t, e) 1006 }, g.scheme = g.protocol, g.port = function(t, e) { 1007 if (this._parts.urn) return void 0 === t ? "" : this; 1008 if (void 0 !== t && (0 === t && (t = null), t && (t += "", ":" === t.charAt(0) && (t = t.substring(1)), t.match(/[^0-9]/)))) throw new TypeError('Port "' + t + '" contains characters other than [0-9]'); 1009 return Q.call(this, t, e) 1010 }, g.hostname = function(t, e) { 1011 if (this._parts.urn) return void 0 === t ? "" : this; 1012 if (void 0 !== t) { 1013 var r = {}; 1014 if ("/" !== n.parseHost(t, r)) throw new TypeError('Hostname "' + t + '" contains characters other than [A-Z0-9.-]'); 1015 t = r.hostname 1016 } 1017 return A.call(this, t, e) 1018 }, g.host = function(t, e) { 1019 if (this._parts.urn) return void 0 === t ? "" : this; 1020 if (void 0 === t) return this._parts.hostname ? n.buildHost(this._parts) : ""; 1021 if ("/" !== n.parseHost(t, this._parts)) throw new TypeError('Hostname "' + t + '" contains characters other than [A-Z0-9.-]'); 1022 return this.build(!e), this 1023 }, g.authority = function(t, e) { 1024 if (this._parts.urn) return void 0 === t ? "" : this; 1025 if (void 0 === t) return this._parts.hostname ? n.buildAuthority(this._parts) : ""; 1026 if ("/" !== n.parseAuthority(t, this._parts)) throw new TypeError('Hostname "' + t + '" contains characters other than [A-Z0-9.-]'); 1027 return this.build(!e), this 1028 }, g.userinfo = function(t, e) { 1029 if (this._parts.urn) return void 0 === t ? "" : this; 1030 if (void 0 === t) { 1031 if (!this._parts.username) return ""; 1032 var r = n.buildUserinfo(this._parts); 1033 return r.substring(0, r.length - 1) 1034 } 1035 return "@" !== t[t.length - 1] && (t += "@"), n.parseUserinfo(t, this._parts), this.build(!e), this 1036 }, g.resource = function(t, e) { 1037 var r; 1038 return void 0 === t ? this.path() + this.search() + this.hash() : (r = n.parse(t), this._parts.path = r.path, this._parts.query = r.query, this._parts.fragment = r.fragment, this.build(!e), this) 1039 }, g.subdomain = function(t, e) { 1040 if (this._parts.urn) return void 0 === t ? "" : this; 1041 if (void 0 === t) { 1042 if (!this._parts.hostname || this.is("IP")) return ""; 1043 var r = this._parts.hostname.length - this.domain().length - 1; 1044 return this._parts.hostname.substring(0, r) || "" 1045 } 1046 return r = this._parts.hostname.length - this.domain().length, r = this._parts.hostname.substring(0, r), r = new RegExp("^" + i(r)), t && "." !== t.charAt(t.length - 1) && (t += "."), t && n.ensureValidHostname(t), this._parts.hostname = this._parts.hostname.replace(r, t), this.build(!e), this 1047 }, g.domain = function(t, e) { 1048 if (this._parts.urn) return void 0 === t ? "" : this; 1049 if ("boolean" == typeof t && (e = t, t = void 0), void 0 === t) { 1050 if (!this._parts.hostname || this.is("IP")) return ""; 1051 var r = this._parts.hostname.match(/\./g); 1052 return r && 2 > r.length ? this._parts.hostname : (r = this._parts.hostname.length - this.tld(e).length - 1, r = this._parts.hostname.lastIndexOf(".", r - 1) + 1, this._parts.hostname.substring(r) || "") 1053 } 1054 if (!t) throw new TypeError("cannot set domain empty"); 1055 return n.ensureValidHostname(t), !this._parts.hostname || this.is("IP") ? this._parts.hostname = t : (r = new RegExp(i(this.domain()) + "$"), this._parts.hostname = this._parts.hostname.replace(r, t)), this.build(!e), this 1056 }, g.tld = function(t, e) { 1057 if (this._parts.urn) return void 0 === t ? "" : this; 1058 if ("boolean" == typeof t && (e = t, t = void 0), void 0 === t) { 1059 if (!this._parts.hostname || this.is("IP")) return ""; 1060 var s = this._parts.hostname.lastIndexOf("."), 1061 s = this._parts.hostname.substring(s + 1); 1062 return !0 !== e && r && r.list[s.toLowerCase()] ? r.get(this._parts.hostname) || s : s 1063 } 1064 if (!t) throw new TypeError("cannot set TLD empty"); 1065 if (t.match(/[^a-zA-Z0-9-]/)) { 1066 if (!r || !r.is(t)) throw new TypeError('TLD "' + t + '" contains characters other than [A-Z0-9]'); 1067 s = new RegExp(i(this.tld()) + "$"), this._parts.hostname = this._parts.hostname.replace(s, t) 1068 } else { 1069 if (!this._parts.hostname || this.is("IP")) throw new ReferenceError("cannot set TLD on non-domain host"); 1070 s = new RegExp(i(this.tld()) + "$"), this._parts.hostname = this._parts.hostname.replace(s, t) 1071 } 1072 return this.build(!e), this 1073 }, g.directory = function(t, e) { 1074 if (this._parts.urn) return void 0 === t ? "" : this; 1075 if (void 0 === t || !0 === t) { 1076 if (!this._parts.path && !this._parts.hostname) return ""; 1077 if ("/" === this._parts.path) return "/"; 1078 var r = this._parts.path.length - this.filename().length - 1, 1079 r = this._parts.path.substring(0, r) || (this._parts.hostname ? "/" : ""); 1080 return t ? n.decodePath(r) : r 1081 } 1082 return r = this._parts.path.length - this.filename().length, r = this._parts.path.substring(0, r), r = new RegExp("^" + i(r)), this.is("relative") || (t || (t = "/"), "/" !== t.charAt(0) && (t = "/" + t)), t && "/" !== t.charAt(t.length - 1) && (t += "/"), t = n.recodePath(t), this._parts.path = this._parts.path.replace(r, t), this.build(!e), this 1083 }, g.filename = function(t, e) { 1084 if (this._parts.urn) return void 0 === t ? "" : this; 1085 if (void 0 === t || !0 === t) { 1086 if (!this._parts.path || "/" === this._parts.path) return ""; 1087 var r = this._parts.path.lastIndexOf("/"), 1088 r = this._parts.path.substring(r + 1); 1089 return t ? n.decodePathSegment(r) : r 1090 } 1091 r = !1, "/" === t.charAt(0) && (t = t.substring(1)), t.match(/\.?\//) && (r = !0); 1092 var s = new RegExp(i(this.filename()) + "$"); 1093 return t = n.recodePath(t), this._parts.path = this._parts.path.replace(s, t), r ? this.normalizePath(e) : this.build(!e), this 1094 }, g.suffix = function(t, e) { 1095 if (this._parts.urn) return void 0 === t ? "" : this; 1096 if (void 0 === t || !0 === t) { 1097 if (!this._parts.path || "/" === this._parts.path) return ""; 1098 var r = this.filename(), 1099 s = r.lastIndexOf("."); 1100 return -1 === s ? "" : (r = r.substring(s + 1), r = /^[a-z0-9%]+$/i.test(r) ? r : "", t ? n.decodePathSegment(r) : r) 1101 } 1102 if ("." === t.charAt(0) && (t = t.substring(1)), r = this.suffix()) s = t ? new RegExp(i(r) + "$") : new RegExp(i("." + r) + "$"); 1103 else { 1104 i
1104f (!t) return this; 1105 this._parts.path += "." + n.recodePath(t) 1106 } 1107 return s && (t = n.recodePath(t), this._parts.path = this._parts.path.replace(s, t)), this.build(!e), this 1108 }, g.segment = function(t, e, r) { 1109 var s = this._parts.urn ? ":" : "/", 1110 n = this.path(), 1111 i = "/" === n.substring(0, 1), 1112 n = n.split(s); 1113 if (void 0 !== t && "number" != typeof t && (r = e, e = t, t = void 0), void 0 !== t && "number" != typeof t) throw Error('Bad segment "' + t + '", must be 0-based integer'); 1114 if (i && n.shift(), 0 > t && (t = Math.max(n.length + t, 0)), void 0 === e) return void 0 === t ? n : n[t]; 1115 if (null === t || void 0 === n[t]) 1116 if (o(e)) { 1117 n = [], t = 0; 1118 for (var a = e.length; t < a; t++)(e[t].length || n.length && n[n.length - 1].length) && (n.length && !n[n.length - 1].length && n.pop(), n.push(e[t])) 1119 } else(e || "string" == typeof e) && ("" === n[n.length - 1] ? n[n.length - 1] = e : n.push(e)); 1120 else e ? n[t] = e : n.splice(t, 1); 1121 return i && n.unshift(""), this.path(n.join(s), r) 1122 }, g.segmentCoded = function(t, e, r) { 1123 var s, i; 1124 if ("number" != typeof t && (r = e, e = t, t = void 0), void 0 === e) { 1125 if (t = this.segment(t, e, r), o(t)) 1126 for (s = 0, i = t.length; s < i; s++) t[s] = n.decode(t[s]); 1127 else t = void 0 !== t ? n.decode(t) : void 0; 1128 return t 1129 } 1130 if (o(e)) 1131 for (s = 0, i = e.length; s < i; s++) e[s] = n.encode(e[s]); 1132 else e = "string" == typeof e || e instanceof String ? n.encode(e) : e; 1133 return this.segment(t, e, r) 1134 }; 1135 var P = g.query; 1136 return g.query = function(t, e) { 1137 if (!0 === t) return n.parseQuery(this._parts.query, this._parts.escapeQuerySpace); 1138 if ("function" == typeof t) { 1139 var r = n.parseQuery(this._parts.query, this._parts.escapeQuerySpace), 1140 s = t.call(this, r); 1141 return this._parts.query = n.buildQuery(s || r, this._parts.duplicateQueryParameters, this._parts.escapeQuerySpace), this.build(!e), this 1142 } 1143 return void 0 !== t && "string" != typeof t ? (this._parts.query = n.buildQuery(t, this._parts.duplicateQueryParameters, this._parts.escapeQuerySpace), this.build(!e), this) : P.call(this, t, e) 1144 }, g.setQuery = function(t, e, r) { 1145 var s = n.parseQuery(this._parts.query, this._parts.escapeQuerySpace); 1146 if ("string" == typeof t || t instanceof String) s[t] = void 0 !== e ? e : null; 1147 else { 1148 if ("object" != typeof t) throw new TypeError("URI.addQuery() accepts an object, string as the name parameter"); 1149 for (var i in t) y.call(t, i) && (s[i] = t[i]) 1150 } 1151 return this._parts.query = n.buildQuery(s, this._parts.duplicateQueryParameters, this._parts.escapeQuerySpace), "string" != typeof t && (r = e), this.build(!r), this 1152 }, g.addQuery = function(t, e, r) { 1153 var s = n.parseQuery(this._parts.query, this._parts.escapeQuerySpace); 1154 return n.addQuery(s, t, void 0 === e ? null : e), this._parts.query = n.buildQuery(s, this._parts.duplicateQueryParameters, this._parts.escapeQuerySpace), "string" != typeof t && (r = e), this.build(!r), this 1155 }, g.removeQuery = function(t, e, r) { 1156 var s = n.parseQuery(this._parts.query, this._parts.escapeQuerySpace); 1157 return n.removeQuery(s, t, e), this._parts.query = n.buildQuery(s, this._parts.duplicateQueryParameters, this._parts.escapeQuerySpace), "string" != typeof t && (r = e), this.build(!r), this 1158 }, g.hasQuery = function(t, e, r) { 1159 var s = n.parseQuery(this._parts.query, this._parts.escapeQuerySpace); 1160 return n.hasQuery(s, t, e, r) 1161 }, g.setSearch = g.setQuery, g.addSearch = g.addQuery, g.removeSearch = g.removeQuery, g.hasSearch = g.hasQuery, g.normalize = function() { 1162 return this._parts.urn ? this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build() : this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build() 1163 }, g.normalizeProtocol = function(t) { 1164 return "string" == typeof this._parts.protocol && (this._parts.protocol = this._parts.protocol.toLowerCase(), this.build(!t)), this 1165 }, g.normalizeHostname = function(r) { 1166 return this._parts.hostname && (this.is("IDN") && t ? this._parts.hostname = t.toASCII(this._parts.hostname) : this.is("IPv6") && e && (this._parts.hostname = e.best(this._parts.hostname)), this._parts.hostname = this._parts.hostname.toLowerCase(), this.build(!r)), this 1167 }, g.normalizePort = function(t) { 1168 return "string" == typeof this._parts.protocol && this._parts.port === n.defaultPorts[this._parts.protocol] && (this._parts.port = null, this.build(!t)), this 1169 }
1169, g.normalizePath = function(t) { 1170 var e = this._parts.path; 1171 if (!e) return this; 1172 if (this._parts.urn) return this._parts.path = n.recodeUrnPath(this._parts.path), this.build(!t), this; 1173 if ("/" === this._parts.path) return this; 1174 var r, s, i, a = ""; 1175 for ("/" !== e.charAt(0) && (r = !0, e = "/" + e), "/.." !== e.slice(-3) && "/." !== e.slice(-2) || (e += "/"), e = e.replace(/(\/(\.\/)+)|(\/\.$)/g, "/").replace(/\/{2,}/g, "/"), r && (a = e.substring(1).match(/^(\.\.\/)+/) || "") && (a = a[0]); - 1 !== (s = e.indexOf("/.."));) 0 !== s ? (i = e.substring(0, s).lastIndexOf("/"), -1 === i && (i = s), e = e.substring(0, i) + e.substring(s + 3)) : e = e.substring(3); 1176 return r && this.is("relative") && (e = a + e.substring(1)), e = n.recodePath(e), this._parts.path = e, this.build(!t), this 1177 }, g.normalizePathname = g.normalizePath, g.normalizeQuery = function(t) { 1178 return "string" == typeof this._parts.query && (this._parts.query.length ? this.query(n.parseQuery(this._parts.query, this._parts.escapeQuerySpace)) : this._parts.query = null, this.build(!t)), this 1179 }, g.normalizeFragment = function(t) { 1180 return this._parts.fragment || (this._parts.fragment = null, this.build(!t)), this 1181 }, g.normalizeSearch = g.normalizeQuery, g.normalizeHash = g.normalizeFragment, g.iso8859 = function() { 1182 var t = n.encode, 1183 e = n.decode; 1184 n.encode = escape, n.decode = decodeURIComponent; 1185 try { 1186 this.normalize() 1187 } finally { 1188 n.encode = t, n.decode = e 1189 } 1190 return this 1191 }, g.unicode = function() { 1192 var t = n.encode, 1193 e = n.decode; 1194 n.encode = l, n.decode = unescape; 1195 try { 1196 this.normalize() 1197 } finally { 1198 n.encode = t, n.decode = e 1199 } 1200 return this 1201 }, g.readable = function() { 1202 var e = this.clone(); 1203 e.username("").password("").normalize(); 1204 var r = ""; 1205 if (e._parts.protocol && (r += e._parts.protocol + "://"), e._parts.hostname && (e.is("punycode") && t ? (r += t.toUnicode(e._parts.hostname), e._parts.port && (r += ":" + e._parts.port)) : r += e.host()), e._parts.hostname && e._parts.path && "/" !== e._parts.path.charAt(0) && (r += "/"), r += e.path(!0), e._parts.query) { 1206 for (var s = "", i = 0, a = e._parts.query.split("&"), o = a.length; i < o; i++) { 1207 var h = (a[i] || "").split("="), 1208 s = s + "&" + n.decodeQuery(h[0], this._parts.escapeQuerySpace).replace(/&/g, "%26"); 1209 void 0 !== h[1] && (s += "=" + n.decodeQuery(h[1], this._parts.escapeQuerySpace).replace(/&/g, "%26")) 1210 } 1211 r += "?" + s.substring(1) 1212 } 1213 return r += n.decodeQuery(e.hash(), !0) 1214 }, g.absoluteTo = function(t) { 1215 var e, r, s = this.clone(), 1216 i = ["protocol", "username", "password", "hostname", "port"]; 1217 if (this._parts.urn) throw Error("URNs do not have any generally defined hierarchical components"); 1218 if (t instanceof n || (t = new n(t)), s._parts.protocol || (s._parts.protocol = t._parts.protocol), this._parts.hostname) return s; 1219 for (e = 0; r = i[e]; e++) s._parts[r] = t._parts[r]; 1220 return s._parts.path ? ".." === s._parts.path.substring(-2) && (s._parts.path += "/") : (s._parts.path = t._parts.path, s._parts.query || (s._parts.query = t._parts.query)), "/" !== s.path().charAt(0) && (i = (i = t.directory()) ? i : 0 === t.path().indexOf("/") ? "/" : "", s._parts.path = (i ? i + "/" : "") + s._parts.path, s.normalizePath()), s.build(), s 1221 }, g.relativeTo = function(t) { 1222 var e, r, s, i = this.clone().normalize(); 1223 if (i._parts.urn) throw Error("URNs do not have any generally defined hierarchical components"); 1224 if (t = new n(t).normalize(), e = i._parts, r = t._parts, s = i.path(), t = t.path(), "/" !== s.charAt(0)) throw Error("URI is already relative"); 1225 if ("/" !== t.charAt(0)) throw Error("Cannot calculate a URI relative to another relative URI"); 1226 return e.protocol === r.protocol && (e.protocol = null), e.username !== r.username || e.password !== r.password || null !== e.protocol || null !== e.username || null !== e.password || e.hostname !== r.hostname || e.port !== r.port ? i.build() : (e.hostname = null, e.port = null, s === t ? (e.path = "", i.build()) : (s = n.commonPath(s, t)) ? (r = r.path.substring(s.length).replace(/[^\/]*$/, "").replace(/.*?\//g, "../"), e.path = r + e.path.substring(s.length) || "./", i.build()) : i.build()) 1227 }, g.equals = function(t) { 1228 var e = this.clone(); 1229 t = new n(t); 1230 var r, s = {}, 1231 i = {}, 1232 a = {}; 1233 if (e.normalize(), t.normalize(), e.toString() === t.toString()) return !0; 1234 if (s = e.query(), i = t.query(), e.query(""), t.query(""), e.toString() !== t.toString() || s.length !== i.length) return !1; 1235 s = n.parseQuery(s, this._parts.escapeQuerySpace), i = n.parseQuery(i, this._parts.escapeQuerySpace); 1236 for (r in s) 1237 if (y.call(s, r)) { 1238 if (o(s[r])) { 1239 if (!p(s[r], i[r])) return !1 1240 } else if (s[r] !== i[r]) return !1; 1241 a[r] = !0 1242 } 1243 for (r in i) 1244 if (y.call(i, r) && !a[r]) return !1; 1245 return !0 1246 }, g.duplicateQueryParameters = function(t) { 1247 return this._parts.duplicateQueryParameters = !!t, this 1248 }, g.escapeQuerySpace = function(t) { 1249 return this._parts.escapeQuerySpace = !!t, this 1250 }, n 1251}); 1252 1253"use strict"; 1254! function() { 1255 var e = document.getElementById("js-collection"); 1256 if (e) {
1257 var n = document.getElementById("js-collection-prev"), 1258 t = document.getElementById("js-collection-next"), 1259 i = !1, 1260 o = function(e) { 1261 return e < .5 ? 2 * e * e : e * (4 - 2 * e) - 1 1262 }, 1263 r = function(n, t) { 1264 var i = arguments.length <= 2 || void 0 === arguments[2] ? 600 : arguments[2], 1265 r = arguments.length <= 3 || void 0 === arguments[3] ? o : arguments[3], 1266 l = t - n, 1267 c = window.performance.now(), 1268 s = c + i; 1269 ! function o(c) { 1270 if (c >= s) e.scrollLeft = t; 1271 else { 1272 window.requestAnimationFrame(o); 1273 var d = (i - (s - c)) / i; 1274 e.scrollLeft = n + l * r(d) 1275 } 1276 }(c) 1277 }, 1278 l = function(n) { 1279 return function() { 1280 var t, i = e.scrollLeft, 1281 o = e.scrollWidth, 1282 l = .9 * window.innerWidth; 1283 n ? (t = i - l) < 0 && (t = 0) : (t = i + l) > o - window.innerWidth && (t = o - window.innerWidth), r(i, t) 1284 } 1285 }, 1286 c = function() { 1287 var o = e.scrollLeft, 1288 r = e.scrollWidth - window.innerWidth - 40; 1289 r < 0 && (r = 0), o <= 0 ? n.classList.remove("crawl-control--visible") : n.classList.add("crawl-control--visible"), o >= r ? t.classList.remove("crawl-control--visible") : t.classList.add("crawl-control--visible"), i = !1 1290 }, 1291 s = function() { 1292 i || (i = !0, window.requestAnimationFrame(c)) 1293 }; 1294 n.addEventListener("click", l(!0)), t.addEventListener("click", l(!1)), e.addEventListener("scroll", s), e.addEventListener("resize", s), document.addEventListener("introComplete", s) 1295 } 1296}(); 1297"use strict"; 1298! function() { 1299 if (document.querySelector(".collection_main")) { 1300 var e = function() { 1301 var e = new CustomEvent("introComplete"); 1302 document.dispatchEvent(e) 1303 }; 1304 document.body.classList.contains("page--overlay") ? window.setTimeout(function() { 1305 e(), document.body.classList.remove("page--overlay") 1306 }, 8e3) : e() 1307 } 1308}(); 1309"use strict"; 1310 1311function _classCallCheck(e, t) { 1312 if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") 1313} 1314var _createClass = function() { 1315 function e(e, t) { 1316 for (var n = 0; n < t.length; n++) { 1317 var i = t[n]; 1318 i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i) 1319 } 1320 } 1321 return function(t, n, i) { 1322 return n && e(t.prototype, n), i && e(t, i), t 1323 } 1324}(); 1325! function() { 1326 var e = (Math.max, Math.floor), 1327 t = function() { 1328 function t() { 1329 var e = arguments.length <= 0 || void 0 === arguments[0] ? {} : arguments[0]; 1330 _classCallCheck(this, t), this.element = e.element 1331 } 1332 return _createClass(t, [{ 1333 key: "prepare", 1334 value: function() { 1335 var t = this.imgElement, 1336 n = this.cardElement, 1337 i = t.offsetHeight, 1338 r = n.offsetWidth, 1339 a = n.offsetHeight, 1340 s = (t.offsetLeft, -(r + 10)), 1341 l = e(i / 2 - a / 2); 1342 this.positionCard(s, l), n.classList.add("card--left") 1343 } 1344 }, { 1345 key: "addEvents", 1346 value: function() { 1347 1348 var e = this.element, 1349 t = document.querySelector(".main"); 1350 e.addEventListener("touchend", function(n) { 1351 var i = t.querySelector(".js-is-tapped"); 1352 i && i !== e && i.classList.remove("js-is-tapped"), !e.classList.contains("js-is-tapped") && window.innerWidth > 767 && window.innerHeight > 479 && (e.classList.add("js-is-tapped"), n.preventDefault()) 1353 }, !1) 1354 } 1355 }, { 1356 key: "positionCard", 1357 value: function(e, t) { 1358 var n = this.cardElement; 1359 n.style.marginTop = t + "px", n.style.marginLeft = e + "px" 1360 } 1361 }, { 1362 key: "element", 1363 get: function() { 1364 return this._element 1365 }, 1366 set: function(e) { 1367 this._element = e, this.addEvents(), this.prepare.bind(this)() 1368 } 1369 }, { 1370 key: "imgElement", 1371 get: function() { 1372 return this.element.querySelector("img") 1373 } 1374 }, { 1375 key: "cardElement", 1376 get: function() { 1377 return this.element.querySelector(".card") 1378 } 1379 }], [{ 1380 key: "create", 1381 value: function(e) { 1382 return new t(e) 1383 } 1384 }]), t 1385 }(), 1386 n = [].slice.call(document.querySelectorAll(".main > div")), 1387 i = void 0, 1388 r = void 0, 1389 a = void 0; 1390 for (i = 0, r = n.length; i < r; i++) a = n[i], t.create({ 1391 element: a 1392 }) 1393}(); 1394"use strict"; 1395 1396function _inherits(e, t) { 1397 if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t); 1398 e.prototype = Object.create(t && t.prototype, { 1399 constructor: { 1400 value: e, 1401 enumerable: !1, 1402 writable: !0, 1403 configurable: !0 1404 } 1405 }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) 1406} 1407 1408function _classCallCheck(e, t) { 1409 if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") 1410}
1410 1411var _get = function(e, t, i) { 1412 for (var n = !0; n;) { 1413 var s = e, 1414 o = t, 1415 r = i; 1416 n = !1, null === s && (s = Function.prototype); 1417 var l = Object.getOwnPropertyDescriptor(s, o); 1418 if (void 0 !== l) { 1419 if ("value" in l) return l.value; 1420 var a = l.get; 1421 if (void 0 === a) return; 1422 return a.call(r) 1423 } 1424 var h = Object.getPrototypeOf(s); 1425 if (null === h) return; 1426 e = h, t = o, i = r, n = !0, l = h = void 0 1427 } 1428 }, 1429 _createClass = function() { 1430 function e(e, t) { 1431 for (var i = 0; i < t.length; i++) { 1432 var n = t[i]; 1433 n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) 1434 } 1435 } 1436 return function(t, i, n) { 1437 return i && e(t.prototype, i), n && e(t, n), t 1438 } 1439 }(); 1440! function() { 1441 var e = function(e, t, i, n) {
1442 var s = i - t, 1443 o = window.performance.now(), 1444 r = o + n; 1445 ! function o(l) { 1446 if (l >= r) e.scrollLeft = i; 1447 else { 1448 window.requestAnimationFrame(o); 1449 var a = (n - (r - l)) / n; 1450 e.scrollLeft = t + s * (a < .5 ? 2 * a * a : a * (4 - 2 * a) - 1) 1451 } 1452 }(o) 1453 }, 1454 t = { 1455 container: { 1456 sizes: ["large", "small"], 1457 selector: "js-timeline-container" 1458 }, 1459 photos: { 1460 sizes: ["large", "small"], 1461 selector: "js-timeline-photos" 1462 }, 1463 sliderContainer: { 1464 sizes: ["large", "small"], 1465 selector: "js-timeline-slider-container", 1466 events: { 1467 click: "onSliderClick" 1468 } 1469 }, 1470 slider: { 1471 sizes: ["large", "small"], 1472 selector: "js-timeline-slider", 1473 events: { 1474 input: "onSliderMove", 1475 change: "onSliderMove" 1476 } 1477 }, 1478 scale: { 1479 sizes: ["large", "small"], 1480 selector: "js-timeline-scale" 1481 }, 1482 prevButton: { 1483 sizes: ["large"], 1484 selector: "js-timeline-prev", 1485 events: { 1486 click: "onPrevButtonClick" 1487 } 1488 }, 1489 nextButton: { 1490 sizes: ["large"], 1491 selector: "js-timeline-next", 1492 events: { 1493 click: "onNextButtonClick" 1494 } 1495 } 1496 }; 1497 ! function(t) { 1498 new(function() { 1499 function e() { 1500 _classCallCheck(this, e), this.lastTrackedWindowWidth = window.innerWidth, this.lastTrackedWindowHeight = window.innerHeight, this.lastTrackedOrientation = window.orientation, this.setupQueryParams(), document.addEventListener("DOMContentLoaded", this.initialize.bind(this)) 1501 } 1502 return _createClass(e, [{ 1503 key: "initialize", 1504 value: function() { 1505 this.timelineEl = document.getElementById("js-timeline"), this.timelineEl && (window.onresize = debounce(this.onWindowResize.bind(this), 250), document.getElementById("js-timeline-toggle").addEventListener("click", this.onToggleClick.bind(this)), this.timelineEl && (window.innerWidth < 480 || window.innerHeight < 480 && 90 === Math.abs(window.orientation)) ? this.currentTimeline = new s(this.timelineEl) : (this.timelineEl && window.innerWidth >= 480 && void 0 !== window.orientation || window.innerHeight >= 480 || window.innerHeight < 480 && void 0 === window.orientation) && (this.currentTimeline = new n(this.timelineEl))) 1506 } 1507 }, { 1508 key: "setupQueryParams", 1509 value: function() { 1510 var e = new URI; 1511 e.hasQuery("position") && !e.hasQuery("view") && (e.removeQuery("position"), window.history.replaceState("", "", e.href())) 1512 } 1513 }, { 1514 key: "onToggleClick", 1515 value: function() { 1516 this.timelineEl.classList.toggle("timeline--is-visible"), document.getElementById("js-timeline-toggle").classList.toggle("timeline--is-visible"), document.getElementsByTagName("main")[0].classList.toggle("main--timeline-is-visible"), document.body.classList.toggle("body--timeline-is-visible"), toggleQueryParams("view", "timeline"), toggleQueryParams("position", this.currentTimeline.sliderState), document.body.classList.remove("page--overlay"), this.timelineEl.className.match(/timeline--is-visible/) && this.currentTimeline.rebuildTimelineValues() 1517 } 1518 }, { 1519 key: "transitionSmallToLarge", 1520 value: function(e, t) { 1521 var i = this.lastTrackedWindowWidth < 480 && e >= 480 && 90 !== Math.abs(window.orientation), 1522 n = this.lastTrackedWindowHeight < 480 && t >= 480 && 90 === Math.abs(window.orientation); 1523 return i || n 1524 } 1525 }, { 1526 key: "transitionLargeToSmall", 1527 value: function(e, t) { 1528 var i = this.lastTrackedWindowWidth >= 480 && e < 480 && 90 !== Math.abs(this.lastTrackedOrientation), 1529 n = this.lastTrackedWindowHeight >= 480 && t < 480 && 90 === Math.abs(window.orientation); 1530 return i || n 1531 } 1532 }, { 1533 key: "onWindowResize", 1534 value: function() { 1535 var e = window.innerWidth, 1536 t = window.innerHeight; 1537 this.transitionSmallToLarge(e, t) ? (this.currentTimeline.teardown(), this.currentTimeline = null, this.currentTimeline = new n(this.timelineEl)) : this.transitionLargeToSmall(e, t) ? (this.currentTimeline.teardown(), this.currentTimeline = null, this.currentTimeline = new s(this.timelineEl)) : this.currentTimeline.onWindowResize(), this.lastTrackedWindowHeight = t, this.lastTrackedWindowWidth = e, this.lastTrackedOrientation = window.orientation 1538 } 1539 }]), e 1540 }()); 1541 var i = function() { 1542 function e(t) { 1543 _classCallCheck(this, e), this.timelineEl = t, this.transformProperty = Modernizr.prefixed("transform"), this.maxValue = 200, this.minValue = 0 1544 } 1545 return _createClass(e, [{ 1546 key: "initialize", 1547 value: function() { 1548 this.setupElements(), this.calculateSliderPositions(), this.setInitialState() 1549 } 1550 }, { 1551 key: "setupElements", 1552 value: function() { 1553 var e = this; 1554 Object.keys(t).forEach(function(i) { 1555 t[i].sizes.indexOf(e.size) >= 0 && (e.cacheElements(i), e.createEvents(i)) 1556 }), this.setSliderWidth() 1557 } 1558 }, { 1559 key: "cacheElements", 1560 value: function(e) { 1561 var i = t[e]; 1562 this[e + "El"] = document.getElementById(i.selector) 1563 } 1564 }, { 1565 key: "createEvents", 1566 value: function(e) { 1567 var i = this, 1568 n = t[e].events || {}, 1569 s = Object.keys(n);
1570 s.length && s.forEach(function(t) { 1571 var s = t.charAt(0).toUpperCase() + t.slice(1); 1572 i[e + "El"] && (i["boundOn" + s] = i[n[t]].bind(i), i[e + "El"]["on" + t] = i["boundOn" + s]) 1573 }) 1574 } 1575 }, { 1576 key: "setInitialState", 1577 value: function() { 1578 var e = this; 1579 (new URI).query(function(t) { 1580 var i = e.minValue; 1581 t.position >= e.minValue && t.position <= e.maxValue && (i = t.position), e.setState(parseInt(i)) 1582 }) 1583 } 1584 }, { 1585 key: "setState", 1586 value: function(e) { 1587 var t = arguments.length <= 1 || void 0 === arguments[1] || arguments[1]; 1588 this.sliderState = e, t && (this.sliderEl.value = this.sliderState, this.updateTimelinePosition()) 1589 } 1590 }, { 1591 key: "rebuildTimelineValues", 1592 value: function() { 1593 this.calculateSliderPositions(), this.setSliderWidth(), this.updateTimelinePosition(), this.positionThumb() 1594 } 1595 }, { 1596 key: "calculateSliderPositions", 1597 value: function() { 1598 var e = this; 1599 this.sliderPositions = this.sliderPositions || {}; 1600 for (var t = this.minValue; t <= this.maxValue; t++) { 1601 var i = 2020 - t, 1602 n = document.querySelector("[data-year='" + i + "']"); 1603 this.sliderPositions[t] = n ? n[this.offsetProp] : void 0 1604 } 1605 var s = document.querySelector(".timeline__photos").lastChild; 1606 this.sliderPositions[this.maxValue] = s[this.offsetProp], Object.keys(this.sliderPositions).forEach(function(t) { 1607 if (t = parseInt(t), void 0 === e.sliderPositions[t]) { 1608 for (var i = void 0, n = void 0, s = 1; s <= e.maxValue - t; s++) 1609 if (e.sliderPositions[t + s]) { 1610 i = t + s, n = e.sliderPositions[i]; 1611 break 1612 } 1613 if (n) { 1614 var o = t - 1, 1615 r = (n - e.sliderPositions[o]) / (i - o); 1616 e.sliderPositions[t] = r + e.sliderPositions[o] 1617 } 1618 } 1619 }), this.sliderPositionsReverse = {}, Object.keys(this.sliderPositions).forEach(function(t) { 1620 e.sliderPositionsReverse[e.sliderPositions[t]] = t 1621 }) 1622 } 1623 }, { 1624 key: "updatePositionQueryParam", 1625 value: function(e) { 1626 clearTimeout(this.updateUrlAfterChanges), this.updateUrlAfterChanges = setTimeout(function() { 1627 var t = new URI; 1628 t.hasQuery("view") && (t.setQuery("position", e), window.history.replaceState("", "", t.href())) 1629 }, 500) 1630 } 1631 }, { 1632 key: "onSliderMove", 1633 value: function(e) { 1634 this.setState(parseInt(e.target.value)) 1635 } 1636 }, { 1637 key: "onSliderClick", 1638 value: function(e) { 1639 var t = this, 1640 i = this.containerEl; 1641 i.style.overflowX = "hidden", setTimeout(function() { 1642 i.style.overflowX = "scroll"; 1643 var n = t.sliderContainerEl, 1644 s = n.getBoundingClientRect(), 1645 o = parseInt(t.sliderEl.max, 10), 1646 r = window.getComputedStyle(n), 1647 l = parseInt(r.width, 10), 1648 a = parseInt(r.paddingLeft, 10), 1649 h = parseInt(r.paddingRight, 10), 1650 d = l - a - h, 1651 c = 0, 1652 u = void 0, 1653 v = void 0; 1654 s.height >= s.width ? (v = e.pageY, u = s.top + a) : (v = e.pageX, u = s.left + a), v > u && (c = Math.round(o * ((v - u) / d))), c > o && (c = o), t.setState(c) 1655 }, 10) 1656 } 1657 }, { 1658 key: "positionThumb", 1659 value: function() { 1660 var e = this.sliderEl, 1661 t = e.parentElement, 1662 i = t.getElementsByClassName("timeline__slider__thumb")[0]; 1663 if (i) { 1664 var n = i.getBoundingClientRect(), 1665 s = e.getBoundingClientRect(), 1666 o = parseInt(e.value, 10) / (parseInt(e.max, 10) - parseInt(e.min, 10)), 1667 r = s.height >= s.width, 1668 l = window.getComputedStyle(e), 1669 a = window.getComputedStyle(t), 1670 h = parseInt(l.marginLeft, 10), 1671 d = Math.max(s.width, s.height) - 60, 1672 c = parseInt(a.paddingLeft, 10) + h, 1673 u = Math.round(c + o * d), 1674 v = Math.floor((60 - n.width) / 2); 1675 i.style.top = 0, i.style.left = u + v + "px", r && (i.style.top = Math.floor(this.scaleEl.getBoundingClientRect().width / 2) - Math.floor(n.width / 2) + "px") 1676 } 1677 } 1678 }, { 1679 key: "onWindowResize", 1680 value: function() { 1681 this.rebuildTimelineValues() 1682 } 1683 }, { 1684 key: "teardown", 1685 value: function() { 1686 var e = this; 1687 Object.keys(t).forEach(function(i) { 1688 t[i].sizes.indexOf(e.size) >= 0 && e.removeEvents(i) 1689 }) 1690 } 1691 }, { 1692 key: "removeEvents", 1693 value: function(e) { 1694 var i = this, 1695 n = t[e].events || {}, 1696 s = Object.keys(n);
1697 s.length && s.forEach(function(t) { 1698 var n = t.charAt(0).toUpperCase() + t.slice(1); 1699 i[e + "El"].removeEventListener(t, i["boundOn" + n]) 1700 }) 1701 } 1702 }]), e 1703 }(), 1704 n = function(t) { 1705 function i(e) { 1706 _classCallCheck(this, i), _get(Object.getPrototypeOf(i.prototype), "constructor", this).call(this, e), this.size = "large", this.offsetProp = "offsetLeft", this.initialize() 1707 } 1708 return _inherits(i, t), _createClass(i, [{ 1709 key: "updateTimelinePosition", 1710 value: function(t) { 1711 var i = this, 1712 n = !!t, 1713 s = t || this.sliderPositions[this.sliderState]; 1714 this.movementValue = s, requestAnimationFrame(function() { 1715 i.photosEl.style[i.transformProperty] = "", n ? e(i.containerEl, i.containerEl.scrollLeft, s, 600) : i.containerEl.scrollLeft = s 1716 }), this.updatePositionQueryParam(this.sliderState) 1717 } 1718 }, { 1719 key: "onContainerScroll", 1720 value: function(e) { 1721 this.movementValue = this.containerEl.scrollLeft; 1722 var t = Object.keys(this.sliderPositionsReverse), 1723 i = findClosestInArray(t, this.containerEl.scrollLeft), 1724 n = this.sliderPositionsReverse[i]; 1725 n && (this.sliderEl.value = n, this.setState(n, !1), this.updatePositionQueryParam(this.sliderEl.value)), this.positionThumb() 1726 } 1727 }, { 1728 key: "setupElements", 1729 value: function() { 1730 _get(Object.getPrototypeOf(i.prototype), "setupElements", this).call(this); 1731 var e = document.querySelectorAll(".timeline__item"); 1732 this.boundPositionCard = this.positionCard.bind(this), this.boundIgnoreFirstTap = this.ignoreFirstTap.bind(this); 1733 for (var t = 0; t < e.length; t++) { 1734 var n = (e[t], e[t].querySelector(".timeline__link")); 1735 n.addEventListener("mouseenter", this.boundPositionCard), n.addEventListener("touchend", this.boundIgnoreFirstTap); 1736 e[t].querySelector(".card").addEventListener("touchstart", function(e) { 1737 window.location = e.currentTarget.href, e.preventDefault() 1738 }) 1739 } 1740 this.boundOnContainerScroll = this.onContainerScroll.bind(this), this.containerEl.addEventListener("scroll", this.boundOnContainerScroll) 1741 } 1742 }, { 1743 key: "clearTapClass", 1744 value: function(e) { 1745 var t = e.parentNode, 1746 i = t.querySelector(".js-is-tapped"); 1747 i && i !== e && i.classList.remove("js-is-tapped") 1748 } 1749 }, { 1750 key: "positionCard", 1751 value: function(e) { 1752 var t = e.currentTarget.parentNode; 1753 this.clearTapClass(e.currentTarget.parentNode); 1754 var i = t.offsetLeft, 1755 n = i - this.movementValue, 1756 s = window.innerWidth - n - t.offsetWidth, 1757 o = Math.max(n, s), 1758 r = this.findChildElement(t, "card"); 1759 o === n && r.classList.add("card--left") 1760 } 1761 }, { 1762 key: "ignoreFirstTap", 1763 value: function(e) { 1764 var t = e.currentTarget.parentNode; 1765 this.boundPositionCard(e), this.clearTapClass(t), t.classList.contains("js-is-tapped") || (t.classList.add("js-is-tapped"), e.preventDefault()) 1766 } 1767 }, { 1768 key: "findChildElement", 1769 value: function(e, t) { 1770 for (var i = e.children, n = void 0, s = 0; s < i.length; s++) { 1771 var o = i[s], 1772 r = new RegExp(t); 1773 o.className.match(r) && (n = o) 1774 } 1775 return n 1776 } 1777 }, { 1778 key: "setSliderWidth", 1779 value: function() { 1780 this.sliderEl.parentElement.style.width = "", this.sliderEl.style.width = "" 1781 } 1782 }, { 1783 key: "toggleArrowControls", 1784 value: function() { 1785 this.sliderState === this.minValue ? (this.prevButtonEl.classList.remove("crawl-control--v
1785isible"), this.nextButtonEl.classList.add("crawl-control--visible")) : this.sliderState > this.minValue && this.sliderState < this.maxValue ? (this.prevButtonEl.classList.add("crawl-control--visible"), this.nextButtonEl.classList.add("crawl-control--visible")) : this.sliderState === this.maxValue && (this.prevButtonEl.classList.add("crawl-control--visible"), this.nextButtonEl.classList.remove("crawl-control--visible")) 1786 } 1787 }, { 1788 key: "setState", 1789 value: function(e) { 1790 var t = arguments.length <= 1 || void 0 === arguments[1] || arguments[1]; 1791 _get(Object.getPrototypeOf(i.prototype), "setState", this).call(this, e, t), this.toggleArrowControls() 1792 } 1793 }, { 1794 key: "teardown", 1795 value: function() { 1796 _get(Object.getPrototypeOf(i.prototype), "teardown", this).call(this); 1797 for (var e = document.querySelectorAll(".timeline__item"), t = 0; t < e.length; t++) { 1798 this.findChildElement(e[t], "timeline__link").removeEventListener("mouseenter", this.boundPositionCard) 1799 } 1800 this.containerEl.removeEventListener("scroll", this.boundOnContainerScroll) 1801 } 1802 }, { 1803 key: "updateSliderManually", 1804 value: function(e, t) { 1805 this.updateTimelinePosition(t), this.setState(e, !1), this.sliderEl.value = e, this.updatePositionQueryParam(e) 1806 } 1807 }, { 1808 key: "onNextButtonClick", 1809 value: function() { 1810 1811 var e = Object.keys(this.sliderPositionsReverse), 1812 t = this.movementValue + .8 * window.innerWidth; 1813 if (t < e[e.length - 2]) { 1814 var i = findClosestInArray(e, t), 1815 n = this.sliderPositionsReverse[i]; 1816 n ? this.updateSliderManually(parseInt(n), t) : this.updateSliderManually(parseInt(this.sliderState) + 1, t) 1817 } else this.setState(this.maxValue) 1818 } 1819 }, { 1820 key: "onPrevButtonClick", 1821 value: function() { 1822 var e = Object.keys(this.sliderPositionsReverse), 1823 t = this.movementValue - .8 * window.innerWidth; 1824 if (t > e[0]) { 1825 var i = findClosestInArray(e, t), 1826 n = this.sliderPositionsReverse[i]; 1827 n ? this.updateSliderManually(parseInt(n), t) : this.updateSliderManually(parseInt(this.sliderState) - 1, t) 1828 } else this.setState(this.minValue) 1829 } 1830 }]), i 1831 }(i), 1832 s = function(e) { 1833 function t(e) { 1834 _classCallCheck(this, t), _get(Object.getPrototypeOf(t.prototype), "constructor", this).call(this, e), this.size = "small", this.setProps(), this.initialize() 1835 } 1836 return _inherits(t, e), _createClass(t, [{ 1837 key: "initialize", 1838 value: function() { 1839 _get(Object.getPrototypeOf(t.prototype), "initialize", this).call(this), this.boundOnContainerScroll = this.onContainerScroll.bind(this), this.containerEl.onscroll = this.boundOnContainerScroll, this.boundOnDeviceOrientation = this.onDeviceOrientation.bind(this), window.ondeviceorientation = this.boundOnDeviceOrientation 1840 } 1841 }, { 1842 key: "setProps", 1843 value: function() { 1844 this.offsetProp = "offsetTop", this.scrollProp = "scrollTop", window.innerHeight < 480 && 90 === Math.abs(window.orientation) && (this.offsetProp = "offsetLeft", this.scrollProp = "scrollLeft") 1845 } 1846 }, { 1847 key: "updateTimelinePosition", 1848 value: function() { 1849 var e = this, 1850 t = this.sliderPositions[this.sliderState]; 1851 requestAnimationFrame(function() { 1852 e.photosEl.style[e.transformProperty] = "", e.containerEl[e.scrollProp] = t 1853 }), this.updatePositionQueryParam(this.sliderState) 1854 } 1855 }, { 1856 key: "setSliderWidth", 1857 value: function() { 1858 window.innerWidth >= 480 ? (this.sliderEl.parentElement.style.width = "", this.sliderEl.style.width = "") : (this.sliderEl.parentElement.style.width = this.scaleEl.offsetHeight + "px", this.sliderEl.style.width = this.scaleEl.offsetHeight + "px") 1859 } 1860 }, { 1861 key: "teardown", 1862 value: function() { 1863 _get(Object.getPrototypeOf(t.prototype), "teardown", this).call(this), this.containerEl.removeEventListener("scroll", this.boundOnContainerScroll), window.removeEventListener("deviceorientation", this.boundOnDeviceOrientation) 1864 } 1865 }, { 1866 key: "onDeviceOrientation", 1867 value: function() { 1868 window.orientation !== this.lastTrackedOrientation && (this.setProps(), this.rebuildTimelineValues()), this.lastTrackedOrientation = window.orientation 1869 } 1870 }, { 1871 key: "onContainerScroll", 1872 value: function(e) { 1873 if (window.innerWidth < 480 || window.innerHeight < 480 && 90 === Math.abs(window.orientation)) { 1874 var t = Object.keys(this.sliderPositionsReverse), 1875 i = findClosestInArray(t, this.containerEl[this.scrollProp]), 1876 n = this.sliderPositionsReverse[i]; 1877 n && (this.setState(n, !1), this.sliderEl.value = n, this.updatePositionQueryParam(this.sliderEl.value)) 1878 } 1879 this.positionThumb() 1880 } 1881 }]), t 1882 }(i) 1883 }(t) 1884}();
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.