vendor: 3,682 bytes, lines 1-88
1/******/ (function(modules) { // webpackBootstrap 2/******/ // The module cache 3/******/ var installedModules = {}; 4/******/ 5/******/ // The require function 6/******/ function __webpack_require__(moduleId) { 7/******/ 8/******/ // Check if module is in cache 9/******/ if(installedModules[moduleId]) { 10/******/ return installedModules[moduleId].exports; 11/******/ } 12/******/ // Create a new module (and put it into the cache) 13/******/ var module = installedModules[moduleId] = { 14/******/ i: moduleId, 15/******/ l: false, 16/******/ exports: {} 17/******/ }; 18/******/ 19/******/ // Execute the module function 20/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 21/******/ 22/******/ // Flag the module as loaded 23/******/ module.l = true; 24/******/ 25/******/ // Return the exports of the module 26/******/ return module.exports; 27/******/ } 28/******/ 29/******/ 30/******/ // expose the modules object (__webpack_modules__) 31/******/ __webpack_require__.m = modules; 32/******/ 33/******/ // expose the module cache 34/******/ __webpack_require__.c = installedModules; 35/******/ 36/******/ // define getter function for harmony exports 37/******/ __webpack_require__.d = function(exports, name, getter) { 38/******/ if(!__webpack_require__.o(exports, name)) { 39/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); 40/******/ } 41/******/ }; 42/******/ 43/******/ // define __esModule on exports 44/******/ __webpack_require__.r = function(exports) { 45/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 46/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 47/******/ } 48/******/ Object.defineProperty(exports, '__esModule', { value: true }); 49/******/ }; 50/******/ 51/******/ // create a fake namespace object 52/******/ // mode & 1: value is a module id, require it 53/******/ // mode & 2: merge all properties of value into the ns 54/******/ // mode & 4: return value when already ns object 55/******/ // mode & 8|1: behave like require 56/******/ __webpack_require__.t = function(value, mode) { 57/******/ if(mode & 1) value = __webpack_require__(value); 58/******/ if(mode & 8) return value; 59/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; 60/******/ var ns = Object.create(null); 61/******/ __webpack_require__.r(ns); 62/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); 63/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); 64/******/ return ns; 65/******/ }; 66/******/ 67/******/ // getDefaultExport function for compatibility with non-harmony modules 68/******/ __webpack_require__.n = function(module) { 69/******/ var getter = module && module.__esModule ? 70/******/ function getDefault() { return module['default']; } : 71/******/ function getModuleExports() { return module; }; 72/******/ __webpack_require__.d(getter, 'a', getter); 73/******/ return getter; 74/******/ }; 75/******/ 76/******/ // Object.prototype.hasOwnProperty.call 77/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; 78/******/ 79/******/ // __webpack_public_path__ 80/******/ __webpack_require__.p = ""; 81/******/ 82/******/ 83/******/ // Load entry module and return exports 84/******/ return __webpack_require__(__webpack_require__.s = 0); 85/******/ }) 86/************************************************************************/ 87/******/ ({ 88
vendor: 22,463 bytes, lines 89-712
89/***/ "./node_modules/aos/dist/aos.js": 90/*!**************************************!*\ 91 !*** ./node_modules/aos/dist/aos.js ***! 92 \**************************************/ 93/*! no static exports found */ 94/***/ (function(module, exports, __webpack_require__) { 95 96/* WEBPACK VAR INJECTION */(function(module) {var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 97 98!function (e, t) { 99 "object" == ( false ? undefined : _typeof(exports)) && "object" == ( false ? undefined : _typeof(module)) ? module.exports = t() : true ? !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (t), 100 __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? 101 (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), 102 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : undefined; 103}(this, function () { 104 return function (e) { 105 function t(o) { 106 if (n[o]) return n[o].exports; 107 var i = n[o] = { 108 exports: {}, 109 id: o, 110 loaded: !1 111 }; 112 return e[o].call(i.exports, i, i.exports, t), i.loaded = !0, i.exports; 113 } 114 115 var n = {}; 116 return t.m = e, t.c = n, t.p = "dist/", t(0); 117 }([function (e, t, n) { 118 "use strict"; 119 120 function o(e) { 121 return e && e.__esModule ? e : { 122 default: e 123 }; 124 } 125 126 var i = Object.assign || function (e) { 127 for (var t = 1; t < arguments.length; t++) { 128 var n = arguments[t]; 129 130 for (var o in n) { 131 Object.prototype.hasOwnProperty.call(n, o) && (e[o] = n[o]); 132 } 133 } 134 135 return e; 136 }, 137 r = n(1), 138 a = (o(r), n(6)), 139 u = o(a), 140 c = n(7), 141 f = o(c), 142 s = n(8), 143 d = o(s), 144 l = n(9), 145 p = o(l), 146 m = n(10), 147 b = o(m), 148 v = n(11), 149 y = o(v), 150 g = n(14), 151 h = o(g), 152 w = [], 153 k = !1, 154 x = { 155 offset: 120, 156 delay: 0, 157 easing: "ease", 158 duration: 400, 159 disable: !1, 160 once: !1, 161 startEvent: "DOMContentLoaded", 162 throttleDelay: 99, 163 debounceDelay: 50, 164 disableMutationObserver: !1 165 }, 166 j = function j() { 167 var e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0]; 168 if (e && (k = !0), k) return w = (0, y.default)(w, x), (0, b.default)(w, x.once), w; 169 }, 170 O = function O() { 171 w = (0, h.default)(), j(); 172 }, 173 _ = function _() { 174 w.forEach(function (e, t) { 175 e.node.removeAttribute("data-aos"), e.node.removeAttribute("data-aos-easing"), e.node.removeAttribute("data-aos-duration"), e.node.removeAttribute("data-aos-delay"); 176 }); 177 }, 178 S = function S(e) { 179 return e === !0 || "mobile" === e && p.default.mobile() || "phone" === e && p.default.phone() || "tablet" === e && p.default.tablet() || "function" == typeof e && e() === !0; 180 }, 181 z = function z(e) { 182 x = i(x, e), w = (0, h.default)(); 183 var t = document.all && !window.atob; 184 return S(x.disable) || t ? _() : (document.querySelector("body").setAttribute("data-aos-easing", x.easing), document.querySelector("body").setAttribute("data-aos-duration", x.duration), document.querySelector("body").setAttribute("data-aos-delay", x.delay), "DOMContentLoaded" === x.startEvent && ["complete", "interactive"].indexOf(document.readyState) > -1 ? j(!0) : "load" === x.startEvent ? window.addEventListener(x.startEvent, function () { 185 j(!0); 186 }) : document.addEventListener(x.startEvent, function () { 187 j(!0); 188 }), window.addEventListener("resize", (0, f.default)(j, x.debounceDelay, !0)), window.addEventListener("orientationchange", (0, f.default)(j, x.debounceDelay, !0)), window.addEventListener("scroll", (0, u.default)(function () { 189 (0, b.default)(w, x.once); 190 }, x.throttleDelay)), x.disableMutationObserver || (0, d.default)("[data-aos]", O), w); 191 }; 192 193 e.exports = { 194 init: z, 195 refresh: j, 196 refreshHard: O 197 }; 198 }, function (e, t) {},,,,, function (e, t) { 199 (function (t) { 200 "use strict"; 201 202 function n(e, t, n) { 203 function o(t) { 204 var n = b, 205 o = v; 206 return b = v = void 0, k = t, g = e.apply(o, n); 207 } 208 209 function r(e) { 210 return k = e, h = setTimeout(s, t), _ ? o(e) : g; 211 } 212 213 function a(e) { 214 var n = e - w, 215 o = e - k, 216 i = t - n; 217 return S ? j(i, y - o) : i; 218 } 219 220 function c(e) { 221 var n = e - w, 222 o = e - k; 223 return void 0 === w || n >= t || n < 0 || S && o >= y; 224 } 225 226 function s() { 227 var e = O(); 228 return c(e) ? d(e) : void (h = setTimeout(s, a(e))); 229 } 230 231 function d(e) { 232 return h = void 0, z && b ? o(e) : (b = v = void 0, g); 233 } 234 235 function l() { 236 void 0 !== h && clearTimeout(h), k = 0, b = w = v = h = void 0; 237 } 238 239 function p() { 240 return void 0 === h ? g : d(O()); 241 } 242 243 function m() { 244 var e = O(), 245 n = c(e); 246 247 if (b = arguments, v = this, w = e, n) { 248 if (void 0 === h) return r(w); 249 if (S) return h = setTimeout(s, t), o(w); 250 } 251 252 return void 0 === h && (h = setTimeout(s, t)), g; 253 } 254 255 var b, 256 v, 257 y, 258 g, 259 h, 260 w, 261 k = 0, 262 _ = !1, 263 S = !1, 264 z = !0; 265 266 if ("function" != typeof e) throw new TypeError(f); 267 return t = u(t) || 0, i(n) && (_ = !!n.leading, S = "maxWait" in n, y = S ? x(u(n.maxWait) || 0, t) : y, z = "trailing" in n ? !!n.trailing : z), m.cancel = l, m.flush = p, m; 268 } 269 270 function o(e, t, o) { 271 var r = !0, 272 a = !0; 273 if ("function" != typeof e) throw new TypeError(f); 274 return i(o) && (r = "leading" in o ? !!o.leading : r, a = "trailing" in o ? !!o.trailing : a), n(e, t, { 275 leading: r, 276 maxWait: t, 277 trailing: a 278 }); 279 } 280 281 function i(e) { 282 var t = "undefined" == typeof e ? "undefined" : c(e); 283 return !!e && ("object" == t || "function" == t); 284 } 285 286 function r(e) { 287 return !!e && "object" == ("undefined" == typeof e ? "undefined" : c(e)); 288 } 289 290 function a(e) { 291 return "symbol" == ("undefined" == typeof e ? "undefined" : c(e)) || r(e) && k.call(e) == d; 292 } 293 294 function u(e) { 295 if ("number" == typeof e) return e; 296 if (a(e)) return s; 297 298 if (i(e)) { 299 var t = "function" == typeof e.valueOf ? e.valueOf() : e; 300 e = i(t) ? t + "" : t; 301 } 302 303 if ("string" != typeof e) return 0 === e ? e : +e; 304 e = e.replace(l, ""); 305 var n = m.test(e); 306 return n || b.test(e) ? v(e.slice(2), n ? 2 : 8) : p.test(e) ? s : +e; 307 } 308 309 var c = "function" == typeof Symbol && "symbol" == _typeof(Symbol.iterator) ? function (e) { 310 return _typeof(e); 311 } : function (e) { 312 return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof(e); 313 }, 314 f = "Expected a function", 315 s = NaN, 316 d = "[object Symbol]", 317 l = /^\s+|\s+$/g, 318 p = /^[-+]0x[0-9a-f]+$/i, 319 m = /^0b[01]+$/i, 320 b = /^0o[0-7]+$/i, 321 v = parseInt, 322 y = "object" == ("undefined" == typeof t ? "undefined" : c(t)) && t && t.Object === Object && t, 323 g = "object" == ("undefined" == typeof self ? "undefined" : c(self)) && self && self.Object === Object && self, 324 h = y || g || Function("return this")(), 325 w = Object.prototype, 326 k = w.toString, 327 x = Math.max, 328 j = Math.min, 329 O = function O() { 330 return h.Date.now(); 331 }; 332 333 e.exports = o; 334 }).call(t, function () { 335 return this; 336 }()); 337 }, function (e, t) { 338 (function (t) { 339 "use strict"; 340 341 function n(e, t, n) { 342 function i(t) { 343 var n = b, 344 o = v; 345 return b = v = void 0, O = t, g = e.apply(o, n); 346 } 347 348 function r(e) { 349 return O = e, h = setTimeout(s, t), _ ? i(e) : g; 350 } 351 352 function u(e) { 353 var n = e - w, 354 o = e - O, 355 i = t - n; 356 return S ? x(i, y - o) : i; 357 } 358 359 function f(e) { 360 var n = e - w, 361 o = e - O; 362 return void 0 === w || n >= t || n < 0 || S && o >= y; 363 } 364 365 function s() { 366 var e = j(); 367 return f(e) ? d(e) : void (h = setTimeout(s, u(e))); 368 } 369 370 function d(e) { 371 return h = void 0, z && b ? i(e) : (b = v = void 0, g); 372 } 373 374 function l() { 375 void 0 !== h && clearTimeout(h), O = 0, b = w = v = h = void 0; 376 } 377 378 function p() { 379 return void 0 === h ? g : d(j()); 380 } 381 382 function m() { 383 var e = j(), 384 n = f(e); 385 386 if (b = arguments, v = this, w = e, n) { 387 if (void 0 === h) return r(w); 388 if (S) return h = setTimeout(s, t), i(w); 389 } 390 391 return void 0 === h && (h = setTimeout(s, t)), g; 392 } 393 394 var b, 395 v, 396 y, 397 g, 398 h, 399 w, 400 O = 0, 401 _ = !1, 402 S = !1, 403 z = !0; 404 405 if ("function" != typeof e) throw new TypeError(c); 406 return t = a(t) || 0, o(n) && (_ = !!n.leading, S = "maxWait" in n, y = S ? k(a(n.maxWait) || 0, t) : y, z = "trailing" in n ? !!n.trailing : z), m.cancel = l, m.flush = p, m; 407 } 408 409 function o(e) { 410 var t = "undefined" == typeof e ? "undefined" : u(e); 411 return !!e && ("object" == t || "function" == t); 412 } 413 414 function i(e) { 415 return !!e && "object" == ("undefined" == typeof e ? "undefined" : u(e)); 416 } 417 418 function r(e) { 419 return "symbol" == ("undefined" == typeof e ? "undefined" : u(e)) || i(e) && w.call(e) == s; 420 } 421 422 function a(e) { 423 if ("number" == typeof e) return e; 424 if (r(e)) return f; 425 426 if (o(e)) { 427 var t = "function" == typeof e.valueOf ? e.valueOf() : e; 428 e = o(t) ? t + "" : t; 429 } 430 431 if ("string" != typeof e) return 0 === e ? e : +e; 432 e = e.replace(d, ""); 433 var n = p.test(e); 434 return n || m.test(e) ? b(e.slice(2), n ? 2 : 8) : l.test(e) ? f : +e; 435 } 436 437 var u = "function" == typeof Symbol && "symbol" == _typeof(Symbol.iterator) ? function (e) { 438 return _typeof(e); 439 } : function (e) { 440 return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof(e); 441 }, 442 c = "Expected a function", 443 f = NaN, 444 s = "[object Symbol]", 445 d = /^\s+|\s+$/g, 446 l = /^[-+]0x[0-9a-f]+$/i, 447 p = /^0b[01]+$/i, 448 m = /^0o[0-7]+$/i, 449 b = parseInt, 450 v = "object" == ("undefined" == typeof t ? "undefined" : u(t)) && t && t.Object === Object && t, 451 y = "object" == ("undefined" == typeof self ? "undefined" : u(self)) && self && self.Object === Object && self, 452 g = v || y || Function("return this")(), 453 h = Object.prototype, 454 w = h.toString, 455 k = Math.max, 456 x = Math.min, 457 j = function j() { 458 return g.Date.now(); 459 }; 460 461 e.exports = n; 462 }).call(t, function () { 463 return this; 464 }()); 465 }, function (e, t) { 466 "use strict"; 467 468 function n(e) { 469 var t = void 0, 470 o = void 0, 471 i = void 0; 472 473 for (t = 0; t < e.length; t += 1) { 474 if (o = e[t], o.dataset && o.dataset.aos) return !0; 475 if (i = o.children && n(o.children)) return !0; 476 } 477 478 return !1; 479 } 480 481 function o(e, t) { 482 var n = window.document, 483 o = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver, 484 a = new o(i); 485 r = t, a.observe(n.documentElement, { 486 childList: !0, 487 subtree: !0, 488 removedNodes: !0 489 }); 490 } 491 492 function i(e) { 493 e && e.forEach(function (e) { 494 var t = Array.prototype.slice.call(e.addedNodes), 495 o = Array.prototype.slice.call(e.removedNodes), 496 i = t.concat(o); 497 if (n(i)) return r(); 498 }); 499 } 500 501 Object.defineProperty(t, "__esModule", { 502 value: !0 503 }); 504 505 var r = function r() {}; 506 507 t.default = o; 508 }, function (e, t) { 509 "use strict"; 510 511 function n(e, t) { 512 if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function"); 513 } 514 515 function o() { 516 return navigator.userAgent || navigator.vendor || window.opera || ""; 517 } 518 519 Object.defineProperty(t, "__esModule", { 520 value: !0 521 }); 522 523 var i = function () { 524 function e(e, t) { 525 for (var n = 0; n < t.length; n++) { 526 var o = t[n]; 527 o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o); 528 } 529 } 530 531 return function (t, n, o) { 532 return n && e(t.prototype, n), o && e(t, o), t; 533 }; 534 }(), 535 r = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i, 536 a = /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i, 537 u = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i, 538 c = /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i, 539 f = function () { 540 function e() { 541 n(this, e); 542 } 543 544 return i(e, [{ 545 key: "phone", 546 value: function value() { 547 var e = o(); 548 return !(!r.test(e) && !a.test(e.substr(0, 4))); 549 } 550 }, { 551 key: "mobile", 552 value: function value() { 553 var e = o(); 554 return !(!u.test(e) && !c.test(e.substr(0, 4))); 555 } 556 }, { 557 key: "tablet", 558 value: function value() { 559 return this.mobile() && !this.phone(); 560 } 561 }]), e; 562 }(); 563 564 t.default = new f(); 565 }, function (e, t) { 566 "use strict"; 567 568 Object.defineProperty(t, "__esModule", { 569 value: !0 570 }); 571 572 var n = function n(e, t, _n) { 573 var o = e.node.getAttribute("data-aos-once"); 574 t > e.position ? e.node.classList.add("aos-animate") : "undefined" != typeof o && ("false" === o || !_n && "true" !== o) && e.node.classList.remove("aos-animate"); 575 }, 576 o = function o(e, t) { 577 var o = window.pageYOffset, 578 i = window.innerHeight; 579 e.forEach(function (e, r) { 580 n(e, i + o, t); 581 }); 582 }; 583 584 t.default = o; 585 }, function (e, t, n) { 586 "use strict"; 587 588 function o(e) { 589 return e && e.__esModule ? e : { 590 default: e 591 }; 592 } 593 594 Object.defineProperty(t, "__esModule", { 595 value: !0 596 }); 597 598 var i = n(12), 599 r = o(i), 600 a = function a(e, t) { 601 return e.forEach(function (e, n) { 602 e.node.classList.add("aos-init"), e.position = (0, r.default)(e.node, t.offset); 603 }), e; 604 }; 605 606 t.default = a; 607 }, function (e, t, n) { 608 "use strict"; 609 610 function o(e) { 611 return e && e.__esModule ? e : { 612 default: e 613 }; 614 } 615 616 Object.defineProperty(t, "__esModule", { 617 value: !0 618 }); 619 620 var i = n(13), 621 r = o(i), 622 a = function a(e, t) { 623 var n = 0, 624 o = 0, 625 i = window.innerHeight, 626 a = { 627 offset: e.getAttribute("data-aos-offset"), 628 anchor: e.getAttribute("data-aos-anchor"), 629 anchorPlacement: e.getAttribute("data-aos-anchor-placement") 630 }; 631 632 switch (a.offset && !isNaN(a.offset) && (o = parseInt(a.offset)), a.anchor && document.querySelectorAll(a.anchor) && (e = document.querySelectorAll(a.anchor)[0]), n = (0, r.default)(e).top, a.anchorPlacement) { 633 case "top-bottom": 634 break; 635 636 case "center-bottom": 637 n += e.offsetHeight / 2; 638 break; 639 640 case "bottom-bottom": 641 n += e.offsetHeight; 642 break; 643 644 case "top-center": 645 n += i / 2; 646 break; 647 648 case "bottom-center": 649 n += i / 2 + e.offsetHeight; 650 break; 651 652 case "center-center": 653 n += i / 2 + e.offsetHeight / 2; 654 break; 655 656 case "top-top": 657 n += i; 658 break; 659 660 case "bottom-top": 661 n += e.offsetHeight + i; 662 break; 663 664 case "center-top": 665 n += e.offsetHeight / 2 + i; 666 } 667 668 return a.anchorPlacement || a.offset || isNaN(t) || (o = t), n + o; 669 }; 670 671 t.default = a; 672 }, function (e, t) { 673 "use strict"; 674 675 Object.defineProperty(t, "__esModule", { 676 value: !0 677 }); 678 679 var n = function n(e) { 680 for (var t = 0, n = 0; e && !isNaN(e.offsetLeft) && !isNaN(e.offsetTop);) { 681 t += e.offsetLeft - ("BODY" != e.tagName ? e.scrollLeft : 0), n += e.offsetTop - ("BODY" != e.tagName ? e.scrollTop : 0), e = e.offsetParent; 682 } 683 684 return { 685 top: n, 686 left: t 687 }; 688 }; 689 690 t.default = n; 691 }, function (e, t) { 692 "use strict"; 693 694 Object.defineProperty(t, "__esModule", { 695 value: !0 696 }); 697 698 var n = function n(e) { 699 return e = e || document.querySelectorAll("[data-aos]"), Array.prototype.map.call(e, function (e) { 700 return { 701 node: e 702 }; 703 }); 704 }; 705 706 t.default = n; 707 }]); 708}); 709/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module))) 710 711/***/ }), 712
vendor: 12,966 bytes, lines 713-831
713/***/ "./node_modules/foundation-sites/dist/js/npm.js": 714/*!******************************************************!*\ 715 !*** ./node_modules/foundation-sites/dist/js/npm.js ***! 716 \******************************************************/ 717/*! exports provided: default */ 718/***/ (function(module, __webpack_exports__, __webpack_require__) { 719 720"use strict"; 721__webpack_require__.r(__webpack_exports__); 722/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"); 723/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 724/* harmony import */ var _js_foundation_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../js/foundation.core */ "./node_modules/foundation-sites/js/foundation.core.js"); 725/* harmony import */ var _js_foundation_util_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../js/foundation.util.core */ "./node_modules/foundation-sites/js/foundation.util.core.js"); 726/* harmony import */ var _js_foundation_util_box__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../js/foundation.util.box */ "./node_modules/foundation-sites/js/foundation.util.box.js"); 727/* harmony import */ var _js_foundation_util_imageLoader__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../js/foundation.util.imageLoader */ "./node_modules/foundation-sites/js/foundation.util.imageLoader.js"); 728/* harmony import */ var _js_foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../js/foundation.util.keyboard */ "./node_modules/foundation-sites/js/foundation.util.keyboard.js"); 729/* harmony import */ var _js_foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../js/foundation.util.mediaQuery */ "./node_modules/foundation-sites/js/foundation.util.mediaQuery.js"); 730/* harmony import */ var _js_foundation_util_motion__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../js/foundation.util.motion */ "./node_modules/foundation-sites/js/foundation.util.motion.js"); 731/* harmony import */ var _js_foundation_util_nest__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../js/foundation.util.nest */ "./node_modules/foundation-sites/js/foundation.util.nest.js"); 732/* harmony import */ var _js_foundation_util_timer__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../js/foundation.util.timer */ "./node_modules/foundation-sites/js/foundation.util.timer.js"); 733/* harmony import */ var _js_foundation_util_touch__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../js/foundation.util.touch */ "./node_modules/foundation-sites/js/foundation.util.touch.js"); 734/* harmony import */ var _js_foundation_util_triggers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../js/foundation.util.triggers */ "./node_modules/foundation-sites/js/foundation.util.triggers.js"); 735/* harmony import */ var _js_foundation_abide__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../js/foundation.abide */ "./node_modules/foundation-sites/js/foundation.abide.js"); 736/* harmony import */ var _js_foundation_accordion__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../js/foundation.accordion */ "./node_modules/foundation-sites/js/foundation.accordion.js"); 737/* harmony import */ var _js_foundation_accordionMenu__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../js/foundation.accordionMenu */ "./node_modules/foundation-sites/js/foundation.accordionMenu.js"); 738/* harmony import */ var _js_foundation_drilldown__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../js/foundation.drilldown */ "./node_modules/foundation-sites/js/foundation.drilldown.js"); 739/* harmony import */ var _js_foundation_dropdown__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../js/foundation.dropdown */ "./node_modules/foundation-sites/js/foundation.dropdown.js"); 740/* harmony import */ var _js_foundation_dropdownMenu__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../js/foundation.dropdownMenu */ "./node_modules/foundation-sites/js/foundation.dropdownMenu.js"); 741/* harmony import */ var _js_foundation_equalizer__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../js/foundation.equalizer */ "./node_modules/foundation-sites/js/foundation.equalizer.js"); 742/* harmony import */ var _js_foundation_interchange__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../js/foundation.interchange */ "./node_modules/foundation-sites/js/foundation.interchange.js"); 743/* harmony import */ var _js_foundation_magellan__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../js/foundation.magellan */ "./node_modules/foundation-sites/js/foundation.magellan.js"); 744/* harmony import */ var _js_foundation_offcanvas__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../js/foundation.offcanvas */ "./node_modules/foundation-sites/js/foundation.offcanvas.js"); 745/* harmony import */ var _js_foundation_orbit__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../js/foundation.orbit */ "./node_modules/foundation-sites/js/foundation.orbit.js"); 746/* harmony import */ var _js_foundation_responsiveMenu__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../js/foundation.responsiveMenu */ "./node_modules/foundation-sites/js/foundation.responsiveMenu.js"); 747/* harmony import */ var _js_foundation_responsiveToggle__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../js/foundation.responsiveToggle */ "./node_modules/foundation-sites/js/foundation.responsiveToggle.js"); 748/* harmony import */ var _js_foundation_reveal__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../../js/foundation.reveal */ "./node_modules/foundation-sites/js/foundation.reveal.js"); 749/* harmony import */ var _js_foundation_slider__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../../js/foundation.slider */ "./node_modules/foundation-sites/js/foundation.slider.js"); 750/* harmony import */ var _js_foundation_smoothScroll__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../../js/foundation.smoothScroll */ "./node_modules/foundation-sites/js/foundation.smoothScroll.js"); 751/* harmony import */ var _js_foundation_sticky__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../../js/foundation.sticky */ "./node_modules/foundation-sites/js/foundation.sticky.js"); 752/* harmony import */ var _js_foundation_tabs__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../../js/foundation.tabs */ "./node_modules/foundation-sites/js/foundation.tabs.js"); 753/* harmony import */ var _js_foundation_toggler__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../../js/foundation.toggler */ "./node_modules/foundation-sites/js/foundation.toggler.js"); 754/* harmony import */ var _js_foundation_tooltip__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../../js/foundation.tooltip */ "./node_modules/foundation-sites/js/foundation.tooltip.js"); 755/* harmony import */ var _js_foundation_responsiveAccordionTabs__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../../js/foundation.responsiveAccordionTabs */ "./node_modules/foundation-sites/js/foundation.responsiveAccordionTabs.js"); 756 757 758_js_foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].addToJquery(jquery__WEBPACK_IMPORTED_MODULE_0___default.a); // Add Foundation Utils to Foundation global namespace for backwards 759// compatibility. 760 761 762_js_foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].rtl = _js_foundation_util_core__WEBPACK_IMPORTED_MODULE_2__["rtl"]; 763_js_foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].GetYoDigits = _js_foundation_util_core__WEBPACK_IMPORTED_MODULE_2__["GetYoDigits"]; 764_js_foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].transitionend = _js_foundation_util_core__WEBPACK_IMPORTED_MODULE_2__["transitionend"]; 765 766 767 768 769 770 771 772_js_foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].Box = _js_foundation_util_box__WEBPACK_IMPORTED_MODULE_3__["Box"]; 773_js_foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].onImagesLoaded = _js_foundation_util_imageLoader__WEBPACK_IMPORTED_MODULE_4__["onImagesLoaded"]; 774_js_foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].Keyboard = _js_foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_5__["Keyboard"]; 775_js_foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].MediaQuery = _js_foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_6__["MediaQuery"]; 776_js_foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].Motion = _js_foundation_util_motion__WEBPACK_IMPORTED_MODULE_7__["Motion"]; 777_js_foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].Move = _js_foundation_util_motion__WEBPACK_IMPORTED_MODULE_7__["Move"]; 778_js_foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].Nest = _js_foundation_util_nest__WEBPACK_IMPORTED_MODULE_8__["Nest"]; 779_js_foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].Timer = _js_foundation_util_timer__WEBPACK_IMPORTED_MODULE_9__["Timer"]; // Touch and Triggers previously were almost purely sede effect driven, 780// so n../../js// need to add it to Foundation, just init them. 781 782 783_js_foundation_util_touch__WEBPACK_IMPORTED_MODULE_10__["Touch"].init(jquery__WEBPACK_IMPORTED_MODULE_0___default.a); 784 785_js_foundation_util_triggers__WEBPACK_IMPORTED_MODULE_11__["Triggers"].init(jquery__WEBPACK_IMPORTED_MODULE_0___default.a, _js_foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"]); 786 787_js_foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].plugin(_js_foundation_abide__WEBPACK_IMPORTED_MODULE_12__["Abide"], 'Abide'); 788 789_js_foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].plugin(_js_foundation_accordion__WEBPACK_IMPORTED_MODULE_13__["Accordion"], 'Accordion'); 790 791_js_foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].plugin(_js_foundation_accordionMenu__WEBPACK_IMPORTED_MODULE_14__["AccordionMenu"], 'AccordionMenu'); 792 793_js_foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].plugin(_js_foundation_drilldown__WEBPACK_IMPORTED_MODULE_15__["Drilldown"], 'Drilldown'); 794 795_js_foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].plugin(_js_foundation_dropdown__WEBPACK_IMPORTED_MODULE_16__["Dropdown"], 'Dropdown'); 796 797_js_foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].plugin(_js_foundation_dropdownMenu__WEBPACK_IMPORTED_MODULE_17__["DropdownMenu"], 'DropdownMenu'); 798 799_js_foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].plugin(_js_foundation_equalizer__WEBPACK_IMPORTED_MODULE_18__["Equalizer"], 'Equalizer'); 800 801_js_foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].plugin(_js_foundation_interchange__WEBPACK_IMPORTED_MODULE_19__["Interchange"], 'Interchange'); 802 803_js_foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].plugin(_js_foundation_magellan__WEBPACK_IMPORTED_MODULE_20__["Magellan"], 'Magellan'); 804 805_js_foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].plugin(_js_foundation_offcanvas__WEBPACK_IMPORTED_MODULE_21__["OffCanvas"], 'OffCanvas'); 806 807_js_foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].plugin(_js_foundation_orbit__WEBPACK_IMPORTED_MODULE_22__["Orbit"], 'Orbit'); 808 809_js_foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].plugin(_js_foundation_responsiveMenu__WEBPACK_IMPORTED_MODULE_23__["ResponsiveMenu"], 'ResponsiveMenu'); 810 811_js_foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].plugin(_js_foundation_responsiveToggle__WEBPACK_IMPORTED_MODULE_24__["ResponsiveToggle"], 'ResponsiveToggle'); 812 813_js_foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].plugin(_js_foundation_reveal__WEBPACK_IMPORTED_MODULE_25__["Reveal"], 'Reveal'); 814 815_js_foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].plugin(_js_foundation_slider__WEBPACK_IMPORTED_MODULE_26__["Slider"], 'Slider'); 816 817_js_foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].plugin(_js_foundation_smoothScroll__WEBPACK_IMPORTED_MODULE_27__["SmoothScroll"], 'SmoothScroll'); 818 819_js_foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].plugin(_js_foundation_sticky__WEBPACK_IMPORTED_MODULE_28__["Sticky"], 'Sticky'); 820 821_js_foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].plugin(_js_foundation_tabs__WEBPACK_IMPORTED_MODULE_29__["Tabs"], 'Tabs'); 822 823_js_foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].plugin(_js_foundation_toggler__WEBPACK_IMPORTED_MODULE_30__["Toggler"], 'Toggler'); 824 825_js_foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].plugin(_js_foundation_tooltip__WEBPACK_IMPORTED_MODULE_31__["Tooltip"], 'Tooltip'); 826 827_js_foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].plugin(_js_foundation_responsiveAccordionTabs__WEBPACK_IMPORTED_MODULE_32__["ResponsiveAccordionTabs"], 'ResponsiveAccordionTabs'); 828/* harmony default export */ __webpack_exports__["default"] = (_js_foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"]); 829 830/***/ }), 831
vendor: 25,967 bytes, lines 832-1479
832/***/ "./node_modules/foundation-sites/js/foundation.abide.js": 833/*!**************************************************************!*\ 834 !*** ./node_modules/foundation-sites/js/foundation.abide.js ***! 835 \**************************************************************/ 836/*! exports provided: Abide */ 837/***/ (function(module, __webpack_exports__, __webpack_require__) { 838 839"use strict"; 840__webpack_require__.r(__webpack_exports__); 841/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Abide", function() { return Abide; }); 842/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"); 843/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 844/* harmony import */ var _foundation_plugin__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.plugin */ "./node_modules/foundation-sites/js/foundation.plugin.js"); 845 846 847function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 848 849function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 850 851function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 852 853function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } 854 855function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } 856 857function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } 858 859function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } 860 861function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } 862 863function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } 864 865 866 867/** 868 * Abide module. 869 * @module foundation.abide 870 */ 871 872var Abide = 873/*#__PURE__*/ 874function (_Plugin) { 875 _inherits(Abide, _Plugin); 876 877 function Abide() { 878 _classCallCheck(this, Abide); 879 880 return _possibleConstructorReturn(this, _getPrototypeOf(Abide).apply(this, arguments)); 881 } 882 883 _createClass(Abide, [{ 884 key: "_setup", 885 886 /** 887 * Creates a new instance of Abide. 888 * @class 889 * @name Abide 890 * @fires Abide#init 891 * @param {Object} element - jQuery object to add the trigger to. 892 * @param {Object} options - Overrides to the default plugin settings. 893 */ 894 value: function _setup(element) { 895 var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; 896 this.$element = element; 897 this.options = jquery__WEBPACK_IMPORTED_MODULE_0___default.a.extend(true, {}, Abide.defaults, this.$element.data(), options); 898 this.className = 'Abide'; // ie9 back compat 899 900 this._init(); 901 } 902 /** 903 * Initializes the Abide plugin and calls functions to get Abide functioning on load. 904 * @private 905 */ 906 907 }, { 908 key: "_init", 909 value: function _init() { 910 this.$inputs = this.$element.find('input, textarea, select'); 911 912 this._events(); 913 } 914 /** 915 * Initializes events for Abide. 916 * @private 917 */ 918 919 }, { 920 key: "_events", 921 value: function _events() { 922 var _this2 = this; 923 924 this.$element.off('.abide').on('reset.zf.abide', function () { 925 _this2.resetForm(); 926 }).on('submit.zf.abide', function () { 927 return _this2.validateForm(); 928 }); 929 930 if (this.options.validateOn === 'fieldChange') { 931 this.$inputs.off('change.zf.abide').on('change.zf.abide', function (e) { 932 _this2.validateInput(jquery__WEBPACK_IMPORTED_MODULE_0___default()(e.target)); 933 }); 934 } 935 936 if (this.options.liveValidate) { 937 this.$inputs.off('input.zf.abide').on('input.zf.abide', function (e) { 938 _this2.validateInput(jquery__WEBPACK_IMPORTED_MODULE_0___default()(e.target)); 939 }); 940 } 941 942 if (this.options.validateOnBlur) { 943 this.$inputs.off('blur.zf.abide').on('blur.zf.abide', function (e) { 944 _this2.validateInput(jquery__WEBPACK_IMPORTED_MODULE_0___default()(e.target)); 945 }); 946 } 947 } 948 /** 949 * Calls necessary functions to update Abide upon DOM change 950 * @private 951 */ 952 953 }, { 954 key: "_reflow", 955 value: function _reflow() { 956 this._init(); 957 } 958 /** 959 * Checks whether or not a form element has the required attribute and if it's checked or not 960 * @param {Object} element - jQuery object to check for required attribute 961 * @returns {Boolean} Boolean value depends on whether or not attribute is checked or empty 962 */ 963 964 }, { 965 key: "requiredCheck", 966 value: function requiredCheck($el) { 967 if (!$el.attr('required')) return true; 968 var isGood = true; 969 970 switch ($el[0].type) { 971 case 'checkbox': 972 isGood = $el[0].checked; 973 break; 974 975 case 'select': 976 case 'select-one': 977 case 'select-multiple': 978 var opt = $el.find('option:selected'); 979 if (!opt.length || !opt.val()) isGood = false; 980 break; 981 982 default: 983 if (!$el.val() || !$el.val().length) isGood = false; 984 } 985 986 return isGood; 987 } 988 /** 989 * Get: 990 * - Based on $el, the first element(s) corresponding to `formErrorSelector` in this order: 991 * 1. The element's direct sibling('s). 992 * 2. The element's parent's children. 993 * - Element(s) with the attribute `[data-form-error-for]` set with the element's id. 994 * 995 * This allows for multiple form errors per input, though if none are found, no form errors will be shown. 996 * 997 * @param {Object} $el - jQuery object to use as reference to find the form error selector. 998 * @returns {Object} jQuery object with the selector. 999 */ 1000 1001 }, { 1002 key: "findFormError", 1003 value: function findFormError($el) { 1004 var id = $el[0].id; 1005 var $error = $el.siblings(this.options.formErrorSelector); 1006 1007 if (!$error.length) { 1008 $error = $el.parent().find(this.options.formErrorSelector); 1009 } 1010 1011 $error = $error.add(this.$element.find("[data-form-error-for=\"".concat(id, "\"]"))); 1012 return $error; 1013 } 1014 /** 1015 * Get the first element in this order: 1016 * 2. The <label> with the attribute `[for="someInputId"]` 1017 * 3. The `.closest()` <label> 1018 * 1019 * @param {Object} $el - jQuery object to check for required attribute 1020 * @returns {Boolean} Boolean value depends on whether or not attribute is checked or empty 1021 */ 1022 1023 }, { 1024 key: "findLabel", 1025 value: function findLabel($el) { 1026 var id = $el[0].id; 1027 var $label = this.$element.find("label[for=\"".concat(id, "\"]")); 1028 1029 if (!$label.length) { 1030 return $el.closest('label'); 1031 } 1032 1033 return $label; 1034 } 1035 /** 1036 * Get the set of labels associated with a set of radio els in this order 1037 * 2. The <label> with the attribute `[for="someInputId"]` 1038 * 3. The `.closest()` <label> 1039 * 1040 * @param {Object} $el - jQuery object to check for required attribute 1041 * @returns {Boolean} Boolean value depends on whether or not attribute is checked or empty 1042 */ 1043 1044 }, { 1045 key: "findRadioLabels", 1046 value: function findRadioLabels($els) { 1047 var _this3 = this; 1048 1049 var labels = $els.map(function (i, el) { 1050 var id = el.id; 1051 1052 var $label = _this3.$element.find("label[for=\"".concat(id, "\"]")); 1053 1054 if (!$label.length) { 1055 $label = jquery__WEBPACK_IMPORTED_MODULE_0___default()(el).closest('label'); 1056 } 1057 1058 return $label[0]; 1059 }); 1060 return jquery__WEBPACK_IMPORTED_MODULE_0___default()(labels); 1061 } 1062 /** 1063 * Adds the CSS error class as specified by the Abide settings to the label, input, and the form 1064 * @param {Object} $el - jQuery object to add the class to 1065 */ 1066 1067 }, { 1068 key: "addErrorClasses", 1069 value: function addErrorClasses($el) { 1070 var $label = this.findLabel($el); 1071 var $formError = this.findFormError($el); 1072 1073 if ($label.length) { 1074 $label.addClass(this.options.labelErrorClass); 1075 } 1076 1077 if ($formError.length) { 1078 $formError.addClass(this.options.formErrorClass); 1079 } 1080 1081 $el.addClass(this.options.inputErrorClass).attr('data-invalid', ''); 1082 } 1083 /** 1084 * Remove CSS error classes etc from an entire radio button group 1085 * @param {String} groupName - A string that specifies the name of a radio button group 1086 * 1087 */ 1088 1089 }, { 1090 key: "removeRadioErrorClasses", 1091 value: function removeRadioErrorClasses(groupName) { 1092 var $els = this.$element.find(":radio[name=\"".concat(groupName, "\"]")); 1093 var $labels = this.findRadioLabels($els); 1094 var $formErrors = this.findFormError($els); 1095 1096 if ($labels.length) { 1097 $labels.removeClass(this.options.labelErrorClass); 1098 } 1099 1100 if ($formErrors.length) { 1101 $formErrors.removeClass(this.options.formErrorClass); 1102 } 1103 1104 $els.removeClass(this.options.inputErrorClass).removeAttr('data-invalid'); 1105 } 1106 /** 1107 * Removes CSS error class as specified by the Abide settings from the label, input, and the form 1108 * @param {Object} $el - jQuery object to remove the class from 1109 */ 1110 1111 }, { 1112 key: "removeErrorClasses", 1113 value: function removeErrorClasses($el) { 1114 // radios need to clear all of the els 1115 if ($el[0].type == 'radio') { 1116 return this.removeRadioErrorClasses($el.attr('name')); 1117 } 1118 1119 var $label = this.findLabel($el); 1120 var $formError = this.findFormError($el); 1121 1122 if ($label.length) { 1123 $label.removeClass(this.options.labelErrorClass); 1124 } 1125 1126 if ($formError.length) { 1127 $formError.removeClass(this.options.formErrorClass); 1128 } 1129 1130 $el.removeClass(this.options.inputErrorClass).removeAttr('data-invalid'); 1131 } 1132 /** 1133 * Goes through a form to find inputs and proceeds to validate them in ways specific to their type. 1134 * Ignores inputs with data-abide-ignore, type="hidden" or disabled attributes set 1135 * @fires Abide#invalid 1136 * @fires Abide#valid 1137 * @param {Object} element - jQuery object to validate, should be an HTML input 1138 * @returns {Boolean} goodToGo - If the input is valid or not. 1139 */ 1140 1141 }, { 1142 key: "validateInput", 1143 value: function validateInput($el) { 1144 var clearRequire = this.requiredCheck($el), 1145 validated = false, 1146 customValidator = true, 1147 validator = $el.attr('data-validator'), 1148 equalTo = true; // don't validate ignored inputs or hidden inputs or disabled inputs 1149 1150 if ($el.is('[data-abide-ignore]') || $el.is('[type="hidden"]') || $el.is('[disabled]')) { 1151 return true; 1152 } 1153 1154 switch ($el[0].type) { 1155 case 'radio': 1156 validated = this.validateRadio($el.attr('name')); 1157 break; 1158 1159 case 'checkbox': 1160 validated = clearRequire; 1161 break; 1162 1163 case 'select': 1164 case 'select-one': 1165 case 'select-multiple': 1166 validated = clearRequire; 1167 break; 1168 1169 default: 1170 validated = this.validateText($el); 1171 } 1172 1173 if (validator) { 1174 customValidator = this.matchValidation($el, validator, $el.attr('required')); 1175 } 1176 1177 if ($el.attr('data-equalto')) { 1178 equalTo = this.options.validators.equalTo($el); 1179 } 1180 1181 var goodToGo = [clearRequire, validated, customValidator, equalTo].indexOf(false) === -1; 1182 var message = (goodToGo ? 'valid' : 'invalid') + '.zf.abide'; 1183 1184 if (goodToGo) { 1185 // Re-validate inputs that depend on this one with equalto 1186 var dependentElements = this.$element.find("[data-equalto=\"".concat($el.attr('id'), "\"]")); 1187 1188 if (dependentElements.length) { 1189 var _this = this; 1190 1191 dependentElements.each(function () { 1192 if (jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).val()) { 1193 _this.validateInput(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this)); 1194 } 1195 }); 1196 } 1197 } 1198 1199 this[goodToGo ? 'removeErrorClasses' : 'addErrorClasses']($el); 1200 /** 1201 * Fires when the input is done checking for validation. Event trigger is either `valid.zf.abide` or `invalid.zf.abide` 1202 * Trigger includes the DOM element of the input. 1203 * @event Abide#valid 1204 * @event Abide#invalid 1205 */ 1206 1207 $el.trigger(message, [$el]); 1208 return goodToGo; 1209 } 1210 /** 1211 * Goes through a form and if there are any invalid inputs, it will display the form error element 1212 * @returns {Boolean} noError - true if no errors were detected... 1213 * @fires Abide#formvalid 1214 * @fires Abide#forminvalid 1215 */ 1216 1217 }, { 1218 key: "validateForm", 1219 value: function validateForm() { 1220 var acc = []; 1221 1222 var _this = this; 1223 1224 this.$inputs.each(function () { 1225 acc.push(_this.validateInput(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this))); 1226 }); 1227 var noError = acc.indexOf(false) === -1; 1228 this.$element.find('[data-abide-error]').css('display', noError ? 'none' : 'block'); 1229 /** 1230 * Fires when the form is finished validating. Event trigger is either `formvalid.zf.abide` or `forminvalid.zf.abide`. 1231 * Trigger includes the element of the form. 1232 * @event Abide#formvalid 1233 * @event Abide#forminvalid 1234 */ 1235 1236 this.$element.trigger((noError ? 'formvalid' : 'forminvalid') + '.zf.abide', [this.$element]); 1237 return noError; 1238 } 1239 /** 1240 * Determines whether or a not a text input is valid based on the pattern specified in the attribute. If no matching pattern is found, returns true. 1241 * @param {Object} $el - jQuery object to validate, should be a text input HTML element 1242 * @param {String} pattern - string value of one of the RegEx patterns in Abide.options.patterns 1243 * @returns {Boolean} Boolean value depends on whether or not the input value matches the pattern specified 1244 */ 1245 1246 }, { 1247 key: "validateText", 1248 value: function validateText($el, pattern) { 1249 // A pattern can be passed to this function, or it will be infered from the input's "pattern" attribute, or it's "type" attribute 1250 pattern = pattern || $el.attr('pattern') || $el.attr('type'); 1251 var inputText = $el.val(); 1252 var valid = false; 1253 1254 if (inputText.length) { 1255 // If the pattern attribute on the element is in Abide's list of patterns, then test that regexp 1256 if (this.options.patterns.hasOwnProperty(pattern)) { 1257 valid = this.options.patterns[pattern].test(inputText); 1258 } // If the pattern name isn't also the type attribute of the field, then test it as a regexp 1259 else if (pattern !== $el.attr('type')) { 1260 valid = new RegExp(pattern).test(inputText); 1261 } else { 1262 valid = true; 1263 } 1264 } // An empty field is valid if it's not required 1265 else if (!$el.prop('required')) { 1266 valid = true; 1267 } 1268 1269 return valid; 1270 } 1271 /** 1272 * Determines whether or a not a radio input is valid based on whether or not it is required and selected. Although the function targets a single `<input>`, it validates by checking the `required` and `checked` properties of all radio buttons in its group. 1273 * @param {String} groupName - A string that specifies the name of a radio button group 1274 * @returns {Boolean} Boolean value depends on whether or not at least one radio input has been selected (if it's required) 1275 */ 1276 1277 }, { 1278 key: "validateRadio", 1279 value: function validateRadio(groupName) { 1280 // If at least one radio in the group has the `required` attribute, the group is considered required 1281 // Per W3C spec, all radio buttons in a group should have `required`, but we're being nice 1282 var $group = this.$element.find(":radio[name=\"".concat(groupName, "\"]")); 1283 var valid = false, 1284 required = false; // For the group to be required, at least one radio needs to be required 1285 1286 $group.each(function (i, e) { 1287 if (jquery__WEBPACK_IMPORTED_MODULE_0___default()(e).attr('required')) { 1288 required = true; 1289 } 1290 }); 1291 if (!required) valid = true; 1292 1293 if (!valid) { 1294 // For the group to be valid, at least one radio needs to be checked 1295 $group.each(function (i, e) { 1296 if (jquery__WEBPACK_IMPORTED_MODULE_0___default()(e).prop('checked')) { 1297 valid = true; 1298 } 1299 }); 1300 } 1301 1302 ; 1303 return valid; 1304 } 1305 /** 1306 * Determines if a selected input passes a custom validation function. Multiple validations can be used, if passed to the element with `data-validator="foo bar baz"` in a space separated listed. 1307 * @param {Object} $el - jQuery input element. 1308 * @param {String} validators - a string of function names matching functions in the Abide.options.validators object. 1309 * @param {Boolean} required - self explanatory? 1310 * @returns {Boolean} - true if validations passed. 1311 */ 1312 1313 }, { 1314 key: "matchValidation", 1315 value: function matchValidation($el, validators, required) { 1316 var _this4 = this; 1317 1318 required = required ? true : false; 1319 var clear = validators.split(' ').map(function (v) { 1320 return _this4.options.validators[v]($el, required, $el.parent()); 1321 }); 1322 return clear.indexOf(false) === -1; 1323 } 1324 /** 1325 * Resets form inputs and styles 1326 * @fires Abide#formreset 1327 */ 1328 1329 }, { 1330 key: "resetForm", 1331 value: function resetForm() { 1332 var $form = this.$element, 1333 opts = this.options; 1334 jquery__WEBPACK_IMPORTED_MODULE_0___default()(".".concat(opts.labelErrorClass), $form).not('small').removeClass(opts.labelErrorClass); 1335 jquery__WEBPACK_IMPORTED_MODULE_0___default()(".".concat(opts.inputErrorClass), $form).not('small').removeClass(opts.inputErrorClass); 1336 jquery__WEBPACK_IMPORTED_MODULE_0___default()("".concat(opts.formErrorSelector, ".").concat(opts.formErrorClass)).removeClass(opts.formErrorClass); 1337 $form.find('[data-abide-error]').css('display', 'none'); 1338 jquery__WEBPACK_IMPORTED_MODULE_0___default()(':input', $form).not(':button, :submit, :reset, :hidden, :radio, :checkbox, [data-abide-ignore]').val('').removeAttr('data-invalid'); 1339 jquery__WEBPACK_IMPORTED_MODULE_0___default()(':input:radio', $form).not('[data-abide-ignore]').prop('checked', false).removeAttr('data-invalid'); 1340 jquery__WEBPACK_IMPORTED_MODULE_0___default()(':input:checkbox', $form).not('[data-abide-ignore]').prop('checked', false).removeAttr('data-invalid'); 1341 /** 1342 * Fires when the form has been reset. 1343 * @event Abide#formreset 1344 */ 1345 1346 $form.trigger('formreset.zf.abide', [$form]); 1347 } 1348 /** 1349 * Destroys an instance of Abide. 1350 * Removes error styles and classes from elements, without resetting their values. 1351 */ 1352 1353 }, { 1354 key: "_destroy", 1355 value: function _destroy() { 1356 var _this = this; 1357 1358 this.$element.off('.abide').find('[data-abide-error]').css('display', 'none'); 1359 this.$inputs.off('.abide').each(function () { 1360 _this.removeErrorClasses(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this)); 1361 }); 1362 } 1363 }]); 1364 1365 return Abide; 1366}(_foundation_plugin__WEBPACK_IMPORTED_MODULE_1__["Plugin"]); 1367/** 1368 * Default settings for plugin 1369 */ 1370 1371 1372Abide.defaults = { 1373 /** 1374 * The default event to validate inputs. Checkboxes and radios validate immediately. 1375 * Remove or change this value for manual validation. 1376 * @option 1377 * @type {?string} 1378 * @default 'fieldChange' 1379 */ 1380 validateOn: 'fieldChange', 1381 1382 /** 1383 * Class to be applied to input labels on failed validation. 1384 * @option 1385 * @type {string} 1386 * @default 'is-invalid-label' 1387 */ 1388 labelErrorClass: 'is-invalid-label', 1389 1390 /** 1391 * Class to be applied to inputs on failed validation. 1392 * @option 1393 * @type {string} 1394 * @default 'is-invalid-input' 1395 */ 1396 inputErrorClass: 'is-invalid-input', 1397 1398 /** 1399 * Class selector to use to target Form Errors for show/hide. 1400 * @option 1401 * @type {string} 1402 * @default '.form-error' 1403 */ 1404 formErrorSelector: '.form-error', 1405 1406 /** 1407 * Class added to Form Errors on failed validation. 1408 * @option 1409 * @type {string} 1410 * @default 'is-visible' 1411 */ 1412 formErrorClass: 'is-visible', 1413 1414 /** 1415 * Set to true to validate text inputs on any value change. 1416 * @option 1417 * @type {boolean} 1418 * @default false 1419 */ 1420 liveValidate: false, 1421 1422 /** 1423 * Set to true to validate inputs on blur. 1424 * @option 1425 * @type {boolean} 1426 * @default false 1427 */ 1428 validateOnBlur: false, 1429 patterns: { 1430 alpha: /^[a-zA-Z]+$/, 1431 alpha_numeric: /^[a-zA-Z0-9]+$/, 1432 integer: /^[-+]?\d+$/, 1433 number: /^[-+]?\d*(?:[\.\,]\d+)?$/, 1434 // amex, visa, diners 1435 card: /^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|(?:222[1-9]|2[3-6][0-9]{2}|27[0-1][0-9]|2720)[0-9]{12}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$/, 1436 cvv: /^([0-9]){3,4}$/, 1437 // http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#valid-e-mail-address 1438 email: /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$/, 1439 url: /^(https?|ftp|file|ssh):\/\/(((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/, 1440 // abc.de 1441 domain: /^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,8}$/, 1442 datetime: /^([0-2][0-9]{3})\-([0-1][0-9])\-([0-3][0-9])T([0-5][0-9])\:([0-5][0-9])\:([0-5][0-9])(Z|([\-\+]([0-1][0-9])\:00))$/, 1443 // YYYY-MM-DD 1444 date: /(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))$/, 1445 // HH:MM:SS 1446 time: /^(0[0-9]|1[0-9]|2[0-3])(:[0-5][0-9]){2}$/, 1447 dateISO: /^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/, 1448 // MM/DD/YYYY 1449 month_day_year: /^(0[1-9]|1[012])[- \/.](0[1-9]|[12][0-9]|3[01])[- \/.]\d{4}$/, 1450 // DD/MM/YYYY 1451 day_month_year: /^(0[1-9]|[12][0-9]|3[01])[- \/.](0[1-9]|1[012])[- \/.]\d{4}$/, 1452 // #FFF or #FFFFFF 1453 color: /^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/, 1454 // Domain || URL 1455 website: { 1456 test: function test(text) { 1457 return Abide.defaults.patterns['domain'].test(text) || Abide.defaults.patterns['url'].test(text); 1458 } 1459 } 1460 }, 1461 1462 /** 1463 * Optional validation functions to be used. `equalTo` being the only default included function. 1464 * Functions should return only a boolean if the input is valid or not. Functions are given the following arguments: 1465 * el : The jQuery element to validate. 1466 * required : Boolean value of the required attribute be present or not. 1467 * parent : The direct parent of the input. 1468 * @option 1469 */ 1470 validators: { 1471 equalTo: function equalTo(el, required, parent) { 1472 return jquery__WEBPACK_IMPORTED_MODULE_0___default()("#".concat(el.attr('data-equalto'))).val() === el.val(); 1473 } 1474 } 1475}; 1476 1477 1478/***/ }), 1479
vendor: 14,683 bytes, lines 1480-1886
1480/***/ "./node_modules/foundation-sites/js/foundation.accordion.js": 1481/*!******************************************************************!*\ 1482 !*** ./node_modules/foundation-sites/js/foundation.accordion.js ***! 1483 \******************************************************************/ 1484/*! exports provided: Accordion */ 1485/***/ (function(module, __webpack_exports__, __webpack_require__) { 1486 1487"use strict"; 1488__webpack_require__.r(__webpack_exports__); 1489/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Accordion", function() { return Accordion; }); 1490/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"); 1491/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 1492/* harmony import */ var _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.util.keyboard */ "./node_modules/foundation-sites/js/foundation.util.keyboard.js"); 1493/* harmony import */ var _foundation_util_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation.util.core */ "./node_modules/foundation-sites/js/foundation.util.core.js"); 1494/* harmony import */ var _foundation_plugin__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./foundation.plugin */ "./node_modules/foundation-sites/js/foundation.plugin.js"); 1495 1496 1497function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 1498 1499function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 1500 1501function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 1502 1503function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } 1504 1505function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } 1506 1507function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } 1508 1509function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } 1510 1511function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } 1512 1513function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } 1514 1515 1516 1517 1518 1519/** 1520 * Accordion module. 1521 * @module foundation.accordion 1522 * @requires foundation.util.keyboard 1523 */ 1524 1525var Accordion = 1526/*#__PURE__*/ 1527function (_Plugin) { 1528 _inherits(Accordion, _Plugin); 1529 1530 function Accordion() { 1531 _classCallCheck(this, Accordion); 1532 1533 return _possibleConstructorReturn(this, _getPrototypeOf(Accordion).apply(this, arguments)); 1534 } 1535 1536 _createClass(Accordion, [{ 1537 key: "_setup", 1538 1539 /** 1540 * Creates a new instance of an accordion. 1541 * @class 1542 * @name Accordion 1543 * @fires Accordion#init 1544 * @param {jQuery} element - jQuery object to make into an accordion. 1545 * @param {Object} options - a plain object with settings to override the default options. 1546 */ 1547 value: function _setup(element, options) { 1548 this.$element = element; 1549 this.options = jquery__WEBPACK_IMPORTED_MODULE_0___default.a.extend({}, Accordion.defaults, this.$element.data(), options); 1550 this.className = 'Accordion'; // ie9 back compat 1551 1552 this._init(); 1553 1554 _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__["Keyboard"].register('Accordion', { 1555 'ENTER': 'toggle', 1556 'SPACE': 'toggle', 1557 'ARROW_DOWN': 'next', 1558 'ARROW_UP': 'previous' 1559 }); 1560 } 1561 /** 1562 * Initializes the accordion by animating the preset active pane(s). 1563 * @private 1564 */ 1565 1566 }, { 1567 key: "_init", 1568 value: function _init() { 1569 var _this2 = this; 1570 1571 this.$element.attr('role', 'tablist'); 1572 this.$tabs = this.$element.children('[data-accordion-item]'); 1573 this.$tabs.each(function (idx, el) { 1574 var $el = jquery__WEBPACK_IMPORTED_MODULE_0___default()(el), 1575 $content = $el.children('[data-tab-content]'), 1576 id = $content[0].id || Object(_foundation_util_core__WEBPACK_IMPORTED_MODULE_2__["GetYoDigits"])(6, 'accordion'), 1577 linkId = el.id || "".concat(id, "-label"); 1578 $el.find('a:first').attr({ 1579 'aria-controls': id, 1580 'role': 'tab', 1581 'id': linkId, 1582 'aria-expanded': false, 1583 'aria-selected': false 1584 }); 1585 $content.attr({ 1586 'role': 'tabpanel', 1587 'aria-labelledby': linkId, 1588 'aria-hidden': true, 1589 'id': id 1590 }); 1591 }); 1592 var $initActive = this.$element.find('.is-active').children('[data-tab-content]'); 1593 this.firstTimeInit = true; 1594 1595 if ($initActive.length) { 1596 this.down($initActive, this.firstTimeInit); 1597 this.firstTimeInit = false; 1598 } 1599 1600 this._checkDeepLink = function () { 1601 var anchor = window.location.hash; //need a hash and a relevant anchor in this tabset 1602 1603 if (anchor.length) { 1604 var $link = _this2.$element.find('[href$="' + anchor + '"]'), 1605 $anchor = jquery__WEBPACK_IMPORTED_MODULE_0___default()(anchor); 1606 1607 if ($link.length && $anchor) { 1608 if (!$link.parent('[data-accordion-item]').hasClass('is-active')) { 1609 _this2.down($anchor, _this2.firstTimeInit); 1610 1611 _this2.firstTimeInit = false; 1612 } 1613 1614 ; //roll up a little to show the titles 1615 1616 if (_this2.options.deepLinkSmudge) { 1617 var _this = _this2; 1618 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).load(function () { 1619 var offset = _this.$element.offset(); 1620 1621 jquery__WEBPACK_IMPORTED_MODULE_0___default()('html, body').animate({ 1622 scrollTop: offset.top 1623 }, _this.options.deepLinkSmudgeDelay); 1624 }); 1625 } 1626 /** 1627 * Fires when the zplugin has deeplinked at pageload 1628 * @event Accordion#deeplink 1629 */ 1630 1631 1632 _this2.$element.trigger('deeplink.zf.accordion', [$link, $anchor]); 1633 } 1634 } 1635 }; //use browser to open a tab, if it exists in this tabset 1636 1637 1638 if (this.options.deepLink) { 1639 this._checkDeepLink(); 1640 } 1641 1642 this._events(); 1643 } 1644 /** 1645 * Adds event handlers for items within the accordion. 1646 * @private 1647 */ 1648 1649 }, { 1650 key: "_events", 1651 value: function _events() { 1652 var _this = this; 1653 1654 this.$tabs.each(function () { 1655 var $elem = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this); 1656 var $tabContent = $elem.children('[data-tab-content]'); 1657 1658 if ($tabContent.length) { 1659 $elem.children('a').off('click.zf.accordion keydown.zf.accordion').on('click.zf.accordion', function (e) { 1660 e.preventDefault(); 1661 1662 _this.toggle($tabContent); 1663 }).on('keydown.zf.accordion', function (e) { 1664 _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__["Keyboard"].handleKey(e, 'Accordion', { 1665 toggle: function toggle() { 1666 _this.toggle($tabContent); 1667 }, 1668 next: function next() { 1669 var $a = $elem.next().find('a').focus(); 1670 1671 if (!_this.options.multiExpand) { 1672 $a.trigger('click.zf.accordion'); 1673 } 1674 }, 1675 previous: function previous() { 1676 var $a = $elem.prev().find('a').focus(); 1677 1678 if (!_this.options.multiExpand) { 1679 $a.trigger('click.zf.accordion'); 1680 } 1681 }, 1682 handled: function handled() { 1683 e.preventDefault(); 1684 e.stopPropagation(); 1685 } 1686 }); 1687 }); 1688 } 1689 }); 1690 1691 if (this.options.deepLink) { 1692 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).on('popstate', this._checkDeepLink); 1693 } 1694 } 1695 /** 1696 * Toggles the selected content pane's open/close state. 1697 * @param {jQuery} $target - jQuery object of the pane to toggle (`.accordion-content`). 1698 * @function 1699 */ 1700 1701 }, { 1702 key: "toggle", 1703 value: function toggle($target) { 1704 if ($target.closest('[data-accordion]').is('[disabled]')) { 1705 console.info('Cannot toggle an accordion that is disabled.'); 1706 return; 1707 } 1708 1709 if ($target.parent().hasClass('is-active')) { 1710 this.up($target); 1711 } else { 1712 this.down($target); 1713 } //either replace or update browser history 1714 1715 1716 if (this.options.deepLink) { 1717 var anchor = $target.prev('a').attr('href'); 1718 1719 if (this.options.updateHistory) { 1720 history.pushState({}, '', anchor); 1721 } else { 1722 history.replaceState({}, '', anchor); 1723 } 1724 } 1725 } 1726 /** 1727 * Opens the accordion tab defined by `$target`. 1728 * @param {jQuery} $target - Accordion pane to open (`.accordion-content`). 1729 * @param {Boolean} firstTime - flag to determine if reflow should happen. 1730 * @fires Accordion#down 1731 * @function 1732 */ 1733 1734 }, { 1735 key: "down", 1736 value: function down($target, firstTime) { 1737 var _this3 = this; 1738 1739 /** 1740 * checking firstTime allows for initial render of the accordion 1741 * to render preset is-active panes. 1742 */ 1743 if ($target.closest('[data-accordion]').is('[disabled]') && !firstTime) { 1744 console.info('Cannot call down on an accordion that is disabled.'); 1745 return; 1746 } 1747 1748 $target.attr('aria-hidden', false).parent('[data-tab-content]').addBack().parent().addClass('is-active'); 1749 1750 if (!this.options.multiExpand && !firstTime) { 1751 var $currentActive = this.$element.children('.is-active').children('[data-tab-content]'); 1752 1753 if ($currentActive.length) { 1754 this.up($currentActive.not($target)); 1755 } 1756 } 1757 1758 $target.slideDown(this.options.slideSpeed, function () { 1759 /** 1760 * Fires when the tab is done opening. 1761 * @event Accordion#down 1762 */ 1763 _this3.$element.trigger('down.zf.accordion', [$target]); 1764 }); 1765 jquery__WEBPACK_IMPORTED_MODULE_0___default()("#".concat($target.attr('aria-labelledby'))).attr({ 1766 'aria-expanded': true, 1767 'aria-selected': true 1768 }); 1769 } 1770 /** 1771 * Closes the tab defined by `$target`. 1772 * @param {jQuery} $target - Accordion tab to close (`.accordion-content`). 1773 * @fires Accordion#up 1774 * @function 1775 */ 1776 1777 }, { 1778 key: "up", 1779 value: function up($target) { 1780 if ($target.closest('[data-accordion]').is('[disabled]')) { 1781 console.info('Cannot call up on an accordion that is disabled.'); 1782 return; 1783 } 1784 1785 var $aunts = $target.parent().siblings(), 1786 _this = this; 1787 1788 if (!this.options.allowAllClosed && !$aunts.hasClass('is-active') || !$target.parent().hasClass('is-active')) { 1789 return; 1790 } 1791 1792 $target.slideUp(_this.options.slideSpeed, function () { 1793 /** 1794 * Fires when the tab is done collapsing up. 1795 * @event Accordion#up 1796 */ 1797 _this.$element.trigger('up.zf.accordion', [$target]); 1798 }); 1799 $target.attr('aria-hidden', true).parent().removeClass('is-active'); 1800 jquery__WEBPACK_IMPORTED_MODULE_0___default()("#".concat($target.attr('aria-labelledby'))).attr({ 1801 'aria-expanded': false, 1802 'aria-selected': false 1803 }); 1804 } 1805 /** 1806 * Destroys an instance of an accordion. 1807 * @fires Accordion#destroyed 1808 * @function 1809 */ 1810 1811 }, { 1812 key: "_destroy", 1813 value: function _destroy() { 1814 this.$element.find('[data-tab-content]').stop(true).slideUp(0).css('display', ''); 1815 this.$element.find('a').off('.zf.accordion'); 1816 1817 if (this.options.deepLink) { 1818 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).off('popstate', this._checkDeepLink); 1819 } 1820 } 1821 }]); 1822 1823 return Accordion; 1824}(_foundation_plugin__WEBPACK_IMPORTED_MODULE_3__["Plugin"]); 1825 1826Accordion.defaults = { 1827 /** 1828 * Amount of time to animate the opening of an accordion pane. 1829 * @option 1830 * @type {number} 1831 * @default 250 1832 */ 1833 slideSpeed: 250, 1834 1835 /** 1836 * Allow the accordion to have multiple open panes. 1837 * @option 1838 * @type {boolean} 1839 * @default false 1840 */ 1841 multiExpand: false, 1842 1843 /** 1844 * Allow the accordion to close all panes. 1845 * @option 1846 * @type {boolean} 1847 * @default false 1848 */ 1849 allowAllClosed: false, 1850 1851 /** 1852 * Allows the window to scroll to content of pane specified by hash anchor 1853 * @option 1854 * @type {boolean} 1855 * @default false 1856 */ 1857 deepLink: false, 1858 1859 /** 1860 * Adjust the deep link scroll to make sure the top of the accordion panel is visible 1861 * @option 1862 * @type {boolean} 1863 * @default false 1864 */ 1865 deepLinkSmudge: false, 1866 1867 /** 1868 * Animation time (ms) for the deep link adjustment 1869 * @option 1870 * @type {number} 1871 * @default 300 1872 */ 1873 deepLinkSmudgeDelay: 300, 1874 1875 /** 1876 * Update the browser history with the open accordion 1877 * @option 1878 * @type {boolean} 1879 * @default false 1880 */ 1881 updateHistory: false 1882}; 1883 1884 1885/***/ }), 1886
vendor: 15,776 bytes, lines 1887-2299
1887/***/ "./node_modules/foundation-sites/js/foundation.accordionMenu.js": 1888/*!**********************************************************************!*\ 1889 !*** ./node_modules/foundation-sites/js/foundation.accordionMenu.js ***! 1890 \**********************************************************************/ 1891/*! exports provided: AccordionMenu */ 1892/***/ (function(module, __webpack_exports__, __webpack_require__) { 1893 1894"use strict"; 1895__webpack_require__.r(__webpack_exports__); 1896/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AccordionMenu", function() { return AccordionMenu; }); 1897/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"); 1898/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 1899/* harmony import */ var _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.util.keyboard */ "./node_modules/foundation-sites/js/foundation.util.keyboard.js"); 1900/* harmony import */ var _foundation_util_nest__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation.util.nest */ "./node_modules/foundation-sites/js/foundation.util.nest.js"); 1901/* harmony import */ var _foundation_util_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./foundation.util.core */ "./node_modules/foundation-sites/js/foundation.util.core.js"); 1902/* harmony import */ var _foundation_plugin__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./foundation.plugin */ "./node_modules/foundation-sites/js/foundation.plugin.js"); 1903 1904 1905function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 1906 1907function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 1908 1909function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 1910 1911function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } 1912 1913function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } 1914 1915function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } 1916 1917function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } 1918 1919function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } 1920 1921function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } 1922 1923 1924 1925 1926 1927 1928/** 1929 * AccordionMenu module. 1930 * @module foundation.accordionMenu 1931 * @requires foundation.util.keyboard 1932 * @requires foundation.util.nest 1933 */ 1934 1935var AccordionMenu = 1936/*#__PURE__*/ 1937function (_Plugin) { 1938 _inherits(AccordionMenu, _Plugin); 1939 1940 function AccordionMenu() { 1941 _classCallCheck(this, AccordionMenu); 1942 1943 return _possibleConstructorReturn(this, _getPrototypeOf(AccordionMenu).apply(this, arguments)); 1944 } 1945 1946 _createClass(AccordionMenu, [{ 1947 key: "_setup", 1948 1949 /** 1950 * Creates a new instance of an accordion menu. 1951 * @class 1952 * @name AccordionMenu 1953 * @fires AccordionMenu#init 1954 * @param {jQuery} element - jQuery object to make into an accordion menu. 1955 * @param {Object} options - Overrides to the default plugin settings. 1956 */ 1957 value: function _setup(element, options) { 1958 this.$element = element; 1959 this.options = jquery__WEBPACK_IMPORTED_MODULE_0___default.a.extend({}, AccordionMenu.defaults, this.$element.data(), options); 1960 this.className = 'AccordionMenu'; // ie9 back compat 1961 1962 this._init(); 1963 1964 _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__["Keyboard"].register('AccordionMenu', { 1965 'ENTER': 'toggle', 1966 'SPACE': 'toggle', 1967 'ARROW_RIGHT': 'open', 1968 'ARROW_UP': 'up', 1969 'ARROW_DOWN': 'down', 1970 'ARROW_LEFT': 'close', 1971 'ESCAPE': 'closeAll' 1972 }); 1973 } 1974 /** 1975 * Initializes the accordion menu by hiding all nested menus. 1976 * @private 1977 */ 1978 1979 }, { 1980 key: "_init", 1981 value: function _init() { 1982 _foundation_util_nest__WEBPACK_IMPORTED_MODULE_2__["Nest"].Feather(this.$element, 'accordion'); 1983 1984 var _this = this; 1985 1986 this.$element.find('[data-submenu]').not('.is-active').slideUp(0); //.find('a').css('padding-left', '1rem'); 1987 1988 this.$element.attr({ 1989 'role': 'tree', 1990 'aria-multiselectable': this.options.multiOpen 1991 }); 1992 this.$menuLinks = this.$element.find('.is-accordion-submenu-parent'); 1993 this.$menuLinks.each(function () { 1994 var linkId = this.id || Object(_foundation_util_core__WEBPACK_IMPORTED_MODULE_3__["GetYoDigits"])(6, 'acc-menu-link'), 1995 $elem = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), 1996 $sub = $elem.children('[data-submenu]'), 1997 subId = $sub[0].id || Object(_foundation_util_core__WEBPACK_IMPORTED_MODULE_3__["GetYoDigits"])(6, 'acc-menu'), 1998 isActive = $sub.hasClass('is-active'); 1999 2000 if (_this.options.submenuToggle) { 2001 $elem.addClass('has-submenu-toggle'); 2002 $elem.children('a').after('<button id="' + linkId + '" class="submenu-toggle" aria-controls="' + subId + '" aria-expanded="' + isActive + '" title="' + _this.options.submenuToggleText + '"><span class="submenu-toggle-text">' + _this.options.submenuToggleText + '</span></button>'); 2003 } else { 2004 $elem.attr({ 2005 'aria-controls': subId, 2006 'aria-expanded': isActive, 2007 'id': linkId 2008 }); 2009 } 2010 2011 $sub.attr({ 2012 'aria-labelledby': linkId, 2013 'aria-hidden': !isActive, 2014 'role': 'group', 2015 'id': subId 2016 }); 2017 }); 2018 this.$element.find('li').attr({ 2019 'role': 'treeitem' 2020 }); 2021 var initPanes = this.$element.find('.is-active'); 2022 2023 if (initPanes.length) { 2024 var _this = this; 2025 2026 initPanes.each(function () { 2027 _this.down(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this)); 2028 }); 2029 } 2030 2031 this._events(); 2032 } 2033 /** 2034 * Adds event handlers for items within the menu. 2035 * @private 2036 */ 2037 2038 }, { 2039 key: "_events", 2040 value: function _events() { 2041 var _this = this; 2042 2043 this.$element.find('li').each(function () { 2044 var $submenu = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).children('[data-submenu]'); 2045 2046 if ($submenu.length) { 2047 if (_this.options.submenuToggle) { 2048 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).children('.submenu-toggle').off('click.zf.accordionMenu').on('click.zf.accordionMenu', function (e) { 2049 _this.toggle($submenu); 2050 }); 2051 } else { 2052 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).children('a').off('click.zf.accordionMenu').on('click.zf.accordionMenu', function (e) { 2053 e.preventDefault(); 2054 2055 _this.toggle($submenu); 2056 }); 2057 } 2058 } 2059 }).on('keydown.zf.accordionmenu', function (e) { 2060 var $element = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), 2061 $elements = $element.parent('ul').children('li'), 2062 $prevElement, 2063 $nextElement, 2064 $target = $element.children('[data-submenu]'); 2065 $elements.each(function (i) { 2066 if (jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).is($element)) { 2067 $prevElement = $elements.eq(Math.max(0, i - 1)).find('a').first(); 2068 $nextElement = $elements.eq(Math.min(i + 1, $elements.length - 1)).find('a').first(); 2069 2070 if (jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).children('[data-submenu]:visible').length) { 2071 // has open sub menu 2072 $nextElement = $element.find('li:first-child').find('a').first(); 2073 } 2074 2075 if (jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).is(':first-child')) { 2076 // is first element of sub menu 2077 $prevElement = $element.parents('li').first().find('a').first(); 2078 } else if ($prevElement.parents('li').first().children('[data-submenu]:visible').length) { 2079 // if previous element has open sub menu 2080 $prevElement = $prevElement.parents('li').find('li:last-child').find('a').first(); 2081 } 2082 2083 if (jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).is(':last-child')) { 2084 // is last element of sub menu 2085 $nextElement = $element.parents('li').first().next('li').find('a').first(); 2086 } 2087 2088 return; 2089 } 2090 }); 2091 _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__["Keyboard"].handleKey(e, 'AccordionMenu', { 2092 open: function open() { 2093 if ($target.is(':hidden')) { 2094 _this.down($target); 2095 2096 $target.find('li').first().find('a').first().focus(); 2097 } 2098 }, 2099 close: function close() { 2100 if ($target.length && !$target.is(':hidden')) { 2101 // close active sub of this item 2102 _this.up($target); 2103 } else if ($element.parent('[data-submenu]').length) { 2104 // close currently open sub 2105 _this.up($element.parent('[data-submenu]')); 2106 2107 $element.parents('li').first().find('a').first().focus(); 2108 } 2109 }, 2110 up: function up() { 2111 $prevElement.focus(); 2112 return true; 2113 }, 2114 down: function down() { 2115 $nextElement.focus(); 2116 return true; 2117 }, 2118 toggle: function toggle() { 2119 if (_this.options.submenuToggle) { 2120 return false; 2121 } 2122 2123 if ($element.children('[data-submenu]').length) { 2124 _this.toggle($element.children('[data-submenu]')); 2125 2126 return true; 2127 } 2128 }, 2129 closeAll: function closeAll() { 2130 _this.hideAll(); 2131 }, 2132 handled: function handled(preventDefault) { 2133 if (preventDefault) { 2134 e.preventDefault(); 2135 } 2136 2137 e.stopImmediatePropagation(); 2138 } 2139 }); 2140 }); //.attr('tabindex', 0); 2141 } 2142 /** 2143 * Closes all panes of the menu. 2144 * @function 2145 */ 2146 2147 }, { 2148 key: "hideAll", 2149 value: function hideAll() { 2150 this.up(this.$element.find('[data-submenu]')); 2151 } 2152 /** 2153 * Opens all panes of the menu. 2154 * @function 2155 */ 2156 2157 }, { 2158 key: "showAll", 2159 value: function showAll() { 2160 this.down(this.$element.find('[data-submenu]')); 2161 } 2162 /** 2163 * Toggles the open/close state of a submenu. 2164 * @function 2165 * @param {jQuery} $target - the submenu to toggle 2166 */ 2167 2168 }, { 2169 key: "toggle", 2170 value: function toggle($target) { 2171 if (!$target.is(':animated')) { 2172 if (!$target.is(':hidden')) { 2173 this.up($target); 2174 } else { 2175 this.down($target); 2176 } 2177 } 2178 } 2179 /** 2180 * Opens the sub-menu defined by `$target`. 2181 * @param {jQuery} $target - Sub-menu to open. 2182 * @fires AccordionMenu#down 2183 */ 2184 2185 }, { 2186 key: "down", 2187 value: function down($target) { 2188 var _this = this; 2189 2190 if (!this.options.multiOpen) { 2191 this.up(this.$element.find('.is-active').not($target.parentsUntil(this.$element).add($target))); 2192 } 2193 2194 $target.addClass('is-active').attr({ 2195 'aria-hidden': false 2196 }); 2197 2198 if (this.options.submenuToggle) { 2199 $target.prev('.submenu-toggle').attr({ 2200 'aria-expanded': true 2201 }); 2202 } else { 2203 $target.parent('.is-accordion-submenu-parent').attr({ 2204 'aria-expanded': true 2205 }); 2206 } 2207 2208 $target.slideDown(_this.options.slideSpeed, function () { 2209 /** 2210 * Fires when the menu is done opening. 2211 * @event AccordionMenu#down 2212 */ 2213 _this.$element.trigger('down.zf.accordionMenu', [$target]); 2214 }); 2215 } 2216 /** 2217 * Closes the sub-menu defined by `$target`. All sub-menus inside the target will be closed as well. 2218 * @param {jQuery} $target - Sub-menu to close. 2219 * @fires AccordionMenu#up 2220 */ 2221 2222 }, { 2223 key: "up", 2224 value: function up($target) { 2225 var _this = this; 2226 2227 $target.slideUp(_this.options.slideSpeed, function () { 2228 /** 2229 * Fires when the menu is done collapsing up. 2230 * @event AccordionMenu#up 2231 */ 2232 _this.$element.trigger('up.zf.accordionMenu', [$target]); 2233 }); 2234 var $menus = $target.find('[data-submenu]').slideUp(0).addBack().attr('aria-hidden', true); 2235 2236 if (this.options.submenuToggle) { 2237 $menus.prev('.submenu-toggle').attr('aria-expanded', false); 2238 } else { 2239 $menus.parent('.is-accordion-submenu-parent').attr('aria-expanded', false); 2240 } 2241 } 2242 /** 2243 * Destroys an instance of accordion menu. 2244 * @fires AccordionMenu#destroyed 2245 */ 2246 2247 }, { 2248 key: "_destroy", 2249 value: function _destroy() { 2250 this.$element.find('[data-submenu]').slideDown(0).css('display', ''); 2251 this.$element.find('a').off('click.zf.accordionMenu'); 2252 2253 if (this.options.submenuToggle) { 2254 this.$element.find('.has-submenu-toggle').removeClass('has-submenu-toggle'); 2255 this.$element.find('.submenu-toggle').remove(); 2256 } 2257 2258 _foundation_util_nest__WEBPACK_IMPORTED_MODULE_2__["Nest"].Burn(this.$element, 'accordion'); 2259 } 2260 }]); 2261 2262 return AccordionMenu; 2263}(_foundation_plugin__WEBPACK_IMPORTED_MODULE_4__["Plugin"]); 2264 2265AccordionMenu.defaults = { 2266 /** 2267 * Amount of time to animate the opening of a submenu in ms. 2268 * @option 2269 * @type {number} 2270 * @default 250 2271 */ 2272 slideSpeed: 250, 2273 2274 /** 2275 * Adds a separate submenu toggle button. This allows the parent item to have a link. 2276 * @option 2277 * @example true 2278 */ 2279 submenuToggle: false, 2280 2281 /** 2282 * The text used for the submenu toggle if enabled. This is used for screen readers only. 2283 * @option 2284 * @example true 2285 */ 2286 submenuToggleText: 'Toggle menu', 2287 2288 /** 2289 * Allow the menu to have multiple open panes. 2290 * @option 2291 * @type {boolean} 2292 * @default true 2293 */ 2294 multiOpen: true 2295}; 2296 2297 2298/***/ }), 2299
vendor: 14,267 bytes, lines 2300-2677
2300/***/ "./node_modules/foundation-sites/js/foundation.core.js": 2301/*!*************************************************************!*\ 2302 !*** ./node_modules/foundation-sites/js/foundation.core.js ***! 2303 \*************************************************************/ 2304/*! exports provided: Foundation */ 2305/***/ (function(module, __webpack_exports__, __webpack_require__) { 2306 2307"use strict"; 2308__webpack_require__.r(__webpack_exports__); 2309/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Foundation", function() { return Foundation; }); 2310/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"); 2311/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 2312/* harmony import */ var _foundation_util_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.util.core */ "./node_modules/foundation-sites/js/foundation.util.core.js"); 2313/* harmony import */ var _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation.util.mediaQuery */ "./node_modules/foundation-sites/js/foundation.util.mediaQuery.js"); 2314 2315 2316function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 2317 2318 2319 2320 2321var FOUNDATION_VERSION = '6.4.3'; // Global Foundation object 2322// This is attached to the window, or used as a module for AMD/Browserify 2323 2324var Foundation = { 2325 version: FOUNDATION_VERSION, 2326 2327 /** 2328 * Stores initialized plugins. 2329 */ 2330 _plugins: {}, 2331 2332 /** 2333 * Stores generated unique ids for plugin instances 2334 */ 2335 _uuids: [], 2336 2337 /** 2338 * Defines a Foundation plugin, adding it to the `Foundation` namespace and the list of plugins to initialize when reflowing. 2339 * @param {Object} plugin - The constructor of the plugin. 2340 */ 2341 plugin: function plugin(_plugin, name) { 2342 // Object key to use when adding to global Foundation object 2343 // Examples: Foundation.Reveal, Foundation.OffCanvas 2344 var className = name || functionName(_plugin); // Object key to use when storing the plugin, also used to create the identifying data attribute for the plugin 2345 // Examples: data-reveal, data-off-canvas 2346 2347 var attrName = hyphenate(className); // Add to the Foundation object and the plugins list (for reflowing) 2348 2349 this._plugins[attrName] = this[className] = _plugin; 2350 }, 2351 2352 /** 2353 * @function 2354 * Populates the _uuids array with pointers to each individual plugin instance. 2355 * Adds the `zfPlugin` data-attribute to programmatically created plugins to allow use of $(selector).foundation(method) calls. 2356 * Also fires the initialization event for each plugin, consolidating repetitive code. 2357 * @param {Object} plugin - an instance of a plugin, usually `this` in context. 2358 * @param {String} name - the name of the plugin, passed as a camelCased string. 2359 * @fires Plugin#init 2360 */ 2361 registerPlugin: function registerPlugin(plugin, name) { 2362 var pluginName = name ? hyphenate(name) : functionName(plugin.constructor).toLowerCase(); 2363 plugin.uuid = Object(_foundation_util_core__WEBPACK_IMPORTED_MODULE_1__["GetYoDigits"])(6, pluginName); 2364 2365 if (!plugin.$element.attr("data-".concat(pluginName))) { 2366 plugin.$element.attr("data-".concat(pluginName), plugin.uuid); 2367 } 2368 2369 if (!plugin.$element.data('zfPlugin')) { 2370 plugin.$element.data('zfPlugin', plugin); 2371 } 2372 /** 2373 * Fires when the plugin has initialized. 2374 * @event Plugin#init 2375 */ 2376 2377 2378 plugin.$element.trigger("init.zf.".concat(pluginName)); 2379 2380 this._uuids.push(plugin.uuid); 2381 2382 return; 2383 }, 2384 2385 /** 2386 * @function 2387 * Removes the plugins uuid from the _uuids array. 2388 * Removes the zfPlugin data attribute, as well as the data-plugin-name attribute. 2389 * Also fires the destroyed event for the plugin, consolidating repetitive code. 2390 * @param {Object} plugin - an instance of a plugin, usually `this` in context. 2391 * @fires Plugin#destroyed 2392 */ 2393 unregisterPlugin: function unregisterPlugin(plugin) { 2394 var pluginName = hyphenate(functionName(plugin.$element.data('zfPlugin').constructor)); 2395 2396 this._uuids.splice(this._uuids.indexOf(plugin.uuid), 1); 2397 2398 plugin.$element.removeAttr("data-".concat(pluginName)).removeData('zfPlugin') 2399 /** 2400 * Fires when the plugin has been destroyed. 2401 * @event Plugin#destroyed 2402 */ 2403 .trigger("destroyed.zf.".concat(pluginName)); 2404 2405 for (var prop in plugin) { 2406 plugin[prop] = null; //clean up script to prep for garbage collection. 2407 } 2408 2409 return; 2410 }, 2411 2412 /** 2413 * @function 2414 * Causes one or more active plugins to re-initialize, resetting event listeners, recalculating positions, etc. 2415 * @param {String} plugins - optional string of an individual plugin key, attained by calling `$(element).data('pluginName')`, or string of a plugin class i.e. `'dropdown'` 2416 * @default If no argument is passed, reflow all currently active plugins. 2417 */ 2418 reInit: function reInit(plugins) { 2419 var isJQ = plugins instanceof jquery__WEBPACK_IMPORTED_MODULE_0___default.a; 2420 2421 try { 2422 if (isJQ) { 2423 plugins.each(function () { 2424 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('zfPlugin')._init(); 2425 }); 2426 } else { 2427 var type = _typeof(plugins), 2428 _this = this, 2429 fns = { 2430 'object': function object(plgs) { 2431 plgs.forEach(function (p) { 2432 p = hyphenate(p); 2433 jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-' + p + ']').foundation('_init'); 2434 }); 2435 }, 2436 'string': function string() { 2437 plugins = hyphenate(plugins); 2438 jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-' + plugins + ']').foundation('_init'); 2439 }, 2440 'undefined': function undefined() { 2441 this['object'](Object.keys(_this._plugins)); 2442 } 2443 }; 2444 2445 fns[type](plugins); 2446 } 2447 } catch (err) { 2448 console.error(err); 2449 } finally { 2450 return plugins; 2451 } 2452 }, 2453 2454 /** 2455 * Initialize plugins on any elements within `elem` (and `elem` itself) that aren't already initialized. 2456 * @param {Object} elem - jQuery object containing the element to check inside. Also checks the element itself, unless it's the `document` object. 2457 * @param {String|Array} plugins - A list of plugins to initialize. Leave this out to initialize everything. 2458 */ 2459 reflow: function reflow(elem, plugins) { 2460 // If plugins is undefined, just grab everything 2461 if (typeof plugins === 'undefined') { 2462 plugins = Object.keys(this._plugins); 2463 } // If plugins is a string, convert it to an array with one item 2464 else if (typeof plugins === 'string') { 2465 plugins = [plugins]; 2466 } 2467 2468 var _this = this; // Iterate through each plugin 2469 2470 2471 jquery__WEBPACK_IMPORTED_MODULE_0___default.a.each(plugins, function (i, name) { 2472 // Get the current plugin 2473 var plugin = _this._plugins[name]; // Localize the search to all elements inside elem, as well as elem itself, unless elem === document 2474 2475 var $elem = jquery__WEBPACK_IMPORTED_MODULE_0___default()(elem).find('[data-' + name + ']').addBack('[data-' + name + ']'); // For each plugin found, initialize it 2476 2477 $elem.each(function () { 2478 var $el = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), 2479 opts = {}; // Don't double-dip on plugins 2480 2481 if ($el.data('zfPlugin')) { 2482 console.warn("Tried to initialize " + name + " on an element that already has a Foundation plugin."); 2483 return; 2484 } 2485 2486 if ($el.attr('data-options')) { 2487 var thing = $el.attr('data-options').split(';').forEach(function (e, i) { 2488 var opt = e.split(':').map(function (el) { 2489 return el.trim(); 2490 }); 2491 if (opt[0]) opts[opt[0]] = parseValue(opt[1]); 2492 }); 2493 } 2494 2495 try { 2496 $el.data('zfPlugin', new plugin(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), opts)); 2497 } catch (er) { 2498 console.error(er); 2499 } finally { 2500 return; 2501 } 2502 }); 2503 }); 2504 }, 2505 getFnName: functionName, 2506 addToJquery: function addToJquery($) { 2507 // TODO: consider not making this a jQuery function 2508 // TODO: need way to reflow vs. re-initialize 2509 2510 /** 2511 * The Foundation jQuery method. 2512 * @param {String|Array} method - An action to perform on the current jQuery object. 2513 */ 2514 var foundation = function foundation(method) { 2515 var type = _typeof(method), 2516 $noJS = $('.no-js'); 2517 2518 if ($noJS.length) { 2519 $noJS.removeClass('no-js'); 2520 } 2521 2522 if (type === 'undefined') { 2523 //needs to initialize the Foundation object, or an individual plugin. 2524 _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_2__["MediaQuery"]._init(); 2525 2526 Foundation.reflow(this); 2527 } else if (type === 'string') { 2528 //an individual method to invoke on a plugin or group of plugins 2529 var args = Array.prototype.slice.call(arguments, 1); //collect all the arguments, if necessary 2530 2531 var plugClass = this.data('zfPlugin'); //determine the class of plugin 2532 2533 if (plugClass !== undefined && plugClass[method] !== undefined) { 2534 //make sure both the class and method exist 2535 if (this.length === 1) { 2536 //if there's only one, call it directly. 2537 plugClass[method].apply(plugClass, args); 2538 } else { 2539 this.each(function (i, el) { 2540 //otherwise loop through the jQuery collection and invoke the method on each 2541 plugClass[method].apply($(el).data('zfPlugin'), args); 2542 }); 2543 } 2544 } else { 2545 //error for no class or no method 2546 throw new ReferenceError("We're sorry, '" + method + "' is not an available method for " + (plugClass ? functionName(plugClass) : 'this element') + '.'); 2547 } 2548 } else { 2549 //error for invalid argument type 2550 throw new TypeError("We're sorry, ".concat(type, " is not a valid parameter. You must use a string representing the method you wish to invoke.")); 2551 } 2552 2553 return this; 2554 }; 2555 2556 $.fn.foundation = foundation; 2557 return $; 2558 } 2559}; 2560Foundation.util = { 2561 /** 2562 * Function for applying a debounce effect to a function call. 2563 * @function 2564 * @param {Function} func - Function to be called at end of timeout. 2565 * @param {Number} delay - Time in ms to delay the call of `func`. 2566 * @returns function 2567 */ 2568 throttle: function throttle(func, delay) { 2569 var timer = null; 2570 return function () { 2571 var context = this, 2572 args = arguments; 2573 2574 if (timer === null) { 2575 timer = setTimeout(function () { 2576 func.apply(context, args); 2577 timer = null; 2578 }, delay); 2579 } 2580 }; 2581 } 2582}; 2583window.Foundation = Foundation; // Polyfill for requestAnimationFrame 2584 2585(function () { 2586 if (!Date.now || !window.Date.now) window.Date.now = Date.now = function () { 2587 return new Date().getTime(); 2588 }; 2589 var vendors = ['webkit', 'moz']; 2590 2591 for (var i = 0; i < vendors.length && !window.requestAnimationFrame; ++i) { 2592 var vp = vendors[i]; 2593 window.requestAnimationFrame = window[vp + 'RequestAnimationFrame']; 2594 window.cancelAnimationFrame = window[vp + 'CancelAnimationFrame'] || window[vp + 'CancelRequestAnimationFrame']; 2595 } 2596 2597 if (/iP(ad|hone|od).*OS 6/.test(window.navigator.userAgent) || !window.requestAnimationFrame || !window.cancelAnimationFrame) { 2598 var lastTime = 0; 2599 2600 window.requestAnimationFrame = function (callback) { 2601 var now = Date.now(); 2602 var nextTime = Math.max(lastTime + 16, now); 2603 return setTimeout(function () { 2604 callback(lastTime = nextTime); 2605 }, nextTime - now); 2606 }; 2607 2608 window.cancelAnimationFrame = clearTimeout; 2609 } 2610 /** 2611 * Polyfill for performance.now, required by rAF 2612 */ 2613 2614 2615 if (!window.performance || !window.performance.now) { 2616 window.performance = { 2617 start: Date.now(), 2618 now: function now() { 2619 return Date.now() - this.start; 2620 } 2621 }; 2622 } 2623})(); 2624 2625if (!Function.prototype.bind) { 2626 Function.prototype.bind = function (oThis) { 2627 if (typeof this !== 'function') { 2628 // closest thing possible to the ECMAScript 5 2629 // internal IsCallable function 2630 throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable'); 2631 } 2632 2633 var aArgs = Array.prototype.slice.call(arguments, 1), 2634 fToBind = this, 2635 fNOP = function fNOP() {}, 2636 fBound = function fBound() { 2637 return fToBind.apply(this instanceof fNOP ? this : oThis, aArgs.concat(Array.prototype.slice.call(arguments))); 2638 }; 2639 2640 if (this.prototype) { 2641 // native functions don't have a prototype 2642 fNOP.prototype = this.prototype; 2643 } 2644 2645 fBound.prototype = new fNOP(); 2646 return fBound; 2647 }; 2648} // Polyfill to get the name of a function in IE9 2649 2650 2651function functionName(fn) { 2652 if (Function.prototype.name === undefined) { 2653 var funcNameRegex = /function\s([^(]{1,})\(/; 2654 var results = funcNameRegex.exec(fn.toString()); 2655 return results && results.length > 1 ? results[1].trim() : ""; 2656 } else if (fn.prototype === undefined) { 2657 return fn.constructor.name; 2658 } else { 2659 return fn.prototype.constructor.name; 2660 } 2661} 2662 2663function parseValue(str) { 2664 if ('true' === str) return true;else if ('false' === str) return false;else if (!isNaN(str * 1)) return parseFloat(str); 2665 return str; 2666} // Convert PascalCase to kebab-case 2667// Thank you: http://stackoverflow.com/a/8955580 2668 2669 2670function hyphenate(str) { 2671 return str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase(); 2672} 2673 2674 2675 2676/***/ }), 2677
vendor: 24,789 bytes, lines 2678-3340
2678/***/ "./node_modules/foundation-sites/js/foundation.drilldown.js": 2679/*!******************************************************************!*\ 2680 !*** ./node_modules/foundation-sites/js/foundation.drilldown.js ***! 2681 \******************************************************************/ 2682/*! exports provided: Drilldown */ 2683/***/ (function(module, __webpack_exports__, __webpack_require__) { 2684 2685"use strict"; 2686__webpack_require__.r(__webpack_exports__); 2687/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Drilldown", function() { return Drilldown; }); 2688/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"); 2689/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 2690/* harmony import */ var _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.util.keyboard */ "./node_modules/foundation-sites/js/foundation.util.keyboard.js"); 2691/* harmony import */ var _foundation_util_nest__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation.util.nest */ "./node_modules/foundation-sites/js/foundation.util.nest.js"); 2692/* harmony import */ var _foundation_util_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./foundation.util.core */ "./node_modules/foundation-sites/js/foundation.util.core.js"); 2693/* harmony import */ var _foundation_util_box__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./foundation.util.box */ "./node_modules/foundation-sites/js/foundation.util.box.js"); 2694/* harmony import */ var _foundation_plugin__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./foundation.plugin */ "./node_modules/foundation-sites/js/foundation.plugin.js"); 2695 2696 2697function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 2698 2699function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 2700 2701function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 2702 2703function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } 2704 2705function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } 2706 2707function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } 2708 2709function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } 2710 2711function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } 2712 2713function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } 2714 2715 2716 2717 2718 2719 2720 2721/** 2722 * Drilldown module. 2723 * @module foundation.drilldown 2724 * @requires foundation.util.keyboard 2725 * @requires foundation.util.nest 2726 * @requires foundation.util.box 2727 */ 2728 2729var Drilldown = 2730/*#__PURE__*/ 2731function (_Plugin) { 2732 _inherits(Drilldown, _Plugin); 2733 2734 function Drilldown() { 2735 _classCallCheck(this, Drilldown); 2736 2737 return _possibleConstructorReturn(this, _getPrototypeOf(Drilldown).apply(this, arguments)); 2738 } 2739 2740 _createClass(Drilldown, [{ 2741 key: "_setup", 2742 2743 /** 2744 * Creates a new instance of a drilldown menu. 2745 * @class 2746 * @name Drilldown 2747 * @param {jQuery} element - jQuery object to make into an accordion menu. 2748 * @param {Object} options - Overrides to the default plugin settings. 2749 */ 2750 value: function _setup(element, options) { 2751 this.$element = element; 2752 this.options = jquery__WEBPACK_IMPORTED_MODULE_0___default.a.extend({}, Drilldown.defaults, this.$element.data(), options); 2753 this.className = 'Drilldown'; // ie9 back compat 2754 2755 this._init(); 2756 2757 _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__["Keyboard"].register('Drilldown', { 2758 'ENTER': 'open', 2759 'SPACE': 'open', 2760 'ARROW_RIGHT': 'next', 2761 'ARROW_UP': 'up', 2762 'ARROW_DOWN': 'down', 2763 'ARROW_LEFT': 'previous', 2764 'ESCAPE': 'close', 2765 'TAB': 'down', 2766 'SHIFT_TAB': 'up' 2767 }); 2768 } 2769 /** 2770 * Initializes the drilldown by creating jQuery collections of elements 2771 * @private 2772 */ 2773 2774 }, { 2775 key: "_init", 2776 value: function _init() { 2777 _foundation_util_nest__WEBPACK_IMPORTED_MODULE_2__["Nest"].Feather(this.$element, 'drilldown'); 2778 2779 if (this.options.autoApplyClass) { 2780 this.$element.addClass('drilldown'); 2781 } 2782 2783 this.$element.attr({ 2784 'role': 'tree', 2785 'aria-multiselectable': false 2786 }); 2787 this.$submenuAnchors = this.$element.find('li.is-drilldown-submenu-parent').children('a'); 2788 this.$submenus = this.$submenuAnchors.parent('li').children('[data-submenu]').attr('role', 'group'); 2789 this.$menuItems = this.$element.find('li').not('.js-drilldown-back').attr('role', 'treeitem').find('a'); 2790 this.$element.attr('data-mutate', this.$element.attr('data-drilldown') || Object(_foundation_util_core__WEBPACK_IMPORTED_MODULE_3__["GetYoDigits"])(6, 'drilldown')); 2791 2792 this._prepareMenu(); 2793 2794 this._registerEvents(); 2795 2796 this._keyboardEvents(); 2797 } 2798 /** 2799 * prepares drilldown menu by setting attributes to links and elements 2800 * sets a min height to prevent content jumping 2801 * wraps the element if not already wrapped 2802 * @private 2803 * @function 2804 */ 2805 2806 }, { 2807 key: "_prepareMenu", 2808 value: function _prepareMenu() { 2809 var _this = this; // if(!this.options.holdOpen){ 2810 // this._menuLinkEvents(); 2811 // } 2812 2813 2814 this.$submenuAnchors.each(function () { 2815 var $link = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this); 2816 var $sub = $link.parent(); 2817 2818 if (_this.options.parentLink) { 2819 $link.clone().prependTo($sub.children('[data-submenu]')).wrap('<li class="is-submenu-parent-item is-submenu-item is-drilldown-submenu-item" role="menuitem"></li>'); 2820 } 2821 2822 $link.data('savedHref', $link.attr('href')).removeAttr('href').attr('tabindex', 0); 2823 $link.children('[data-submenu]').attr({ 2824 'aria-hidden': true, 2825 'tabindex': 0, 2826 'role': 'group' 2827 }); 2828 2829 _this._events($link); 2830 }); 2831 this.$submenus.each(function () { 2832 var $menu = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), 2833 $back = $menu.find('.js-drilldown-back'); 2834 2835 if (!$back.length) { 2836 switch (_this.options.backButtonPosition) { 2837 case "bottom": 2838 $menu.append(_this.options.backButton); 2839 break; 2840 2841 case "top": 2842 $menu.prepend(_this.options.backButton); 2843 break; 2844 2845 default: 2846 console.error("Unsupported backButtonPosition value '" + _this.options.backButtonPosition + "'"); 2847 } 2848 } 2849 2850 _this._back($menu); 2851 }); 2852 this.$submenus.addClass('invisible'); 2853 2854 if (!this.options.autoHeight) { 2855 this.$submenus.addClass('drilldown-submenu-cover-previous'); 2856 } // create a wrapper on element if it doesn't exist. 2857 2858 2859 if (!this.$element.parent().hasClass('is-drilldown')) { 2860 this.$wrapper = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this.options.wrapper).addClass('is-drilldown'); 2861 if (this.options.animateHeight) this.$wrapper.addClass('animate-height'); 2862 this.$element.wrap(this.$wrapper); 2863 } // set wrapper 2864 2865 2866 this.$wrapper = this.$element.parent(); 2867 this.$wrapper.css(this._getMaxDims()); 2868 } 2869 }, { 2870 key: "_resize", 2871 value: function _resize() { 2872 this.$wrapper.css({ 2873 'max-width': 'none', 2874 'min-height': 'none' 2875 }); // _getMaxDims has side effects (boo) but calling it should update all other necessary heights & widths 2876 2877 this.$wrapper.css(this._getMaxDims()); 2878 } 2879 /** 2880 * Adds event handlers to elements in the menu. 2881 * @function 2882 * @private 2883 * @param {jQuery} $elem - the current menu item to add handlers to. 2884 */ 2885 2886 }, { 2887 key: "_events", 2888 value: function _events($elem) { 2889 var _this = this; 2890 2891 $elem.off('click.zf.drilldown').on('click.zf.drilldown', function (e) { 2892 if (jquery__WEBPACK_IMPORTED_MODULE_0___default()(e.target).parentsUntil('ul', 'li').hasClass('is-drilldown-submenu-parent')) { 2893 e.stopImmediatePropagation(); 2894 e.preventDefault(); 2895 } // if(e.target !== e.currentTarget.firstElementChild){ 2896 // return false; 2897 // } 2898 2899 2900 _this._show($elem.parent('li')); 2901 2902 if (_this.options.closeOnClick) { 2903 var $body = jquery__WEBPACK_IMPORTED_MODULE_0___default()('body'); 2904 $body.off('.zf.drilldown').on('click.zf.drilldown', function (e) { 2905 if (e.target === _this.$element[0] || jquery__WEBPACK_IMPORTED_MODULE_0___default.a.contains(_this.$element[0], e.target)) { 2906 return; 2907 } 2908 2909 e.preventDefault(); 2910 2911 _this._hideAll(); 2912 2913 $body.off('.zf.drilldown'); 2914 }); 2915 } 2916 }); 2917 } 2918 /** 2919 * Adds event handlers to the menu element. 2920 * @function 2921 * @private 2922 */ 2923 2924 }, { 2925 key: "_registerEvents", 2926 value: function _registerEvents() { 2927 if (this.options.scrollTop) { 2928 this._bindHandler = this._scrollTop.bind(this); 2929 this.$element.on('open.zf.drilldown hide.zf.drilldown closed.zf.drilldown', this._bindHandler); 2930 } 2931 2932 this.$element.on('mutateme.zf.trigger', this._resize.bind(this)); 2933 } 2934 /** 2935 * Scroll to Top of Element or data-scroll-top-element 2936 * @function 2937 * @fires Drilldown#scrollme 2938 */ 2939 2940 }, { 2941 key: "_scrollTop", 2942 value: function _scrollTop() { 2943 var _this = this; 2944 2945 var $scrollTopElement = _this.options.scrollTopElement != '' ? jquery__WEBPACK_IMPORTED_MODULE_0___default()(_this.options.scrollTopElement) : _this.$element, 2946 scrollPos = parseInt($scrollTopElement.offset().top + _this.options.scrollTopOffset, 10); 2947 jquery__WEBPACK_IMPORTED_MODULE_0___default()('html, body').stop(true).animate({ 2948 scrollTop: scrollPos 2949 }, _this.options.animationDuration, _this.options.animationEasing, function () { 2950 /** 2951 * Fires after the menu has scrolled 2952 * @event Drilldown#scrollme 2953 */ 2954 if (this === jquery__WEBPACK_IMPORTED_MODULE_0___default()('html')[0]) _this.$element.trigger('scrollme.zf.drilldown'); 2955 }); 2956 } 2957 /** 2958 * Adds keydown event listener to `li`'s in the menu. 2959 * @private 2960 */ 2961 2962 }, { 2963 key: "_keyboardEvents", 2964 value: function _keyboardEvents() { 2965 var _this = this; 2966 2967 this.$menuItems.add(this.$element.find('.js-drilldown-back > a, .is-submenu-parent-item > a')).on('keydown.zf.drilldown', function (e) { 2968 var $element = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), 2969 $elements = $element.parent('li').parent('ul').children('li').children('a'), 2970 $prevElement, 2971 $nextElement; 2972 $elements.each(function (i) { 2973 if (jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).is($element)) { 2974 $prevElement = $elements.eq(Math.max(0, i - 1)); 2975 $nextElement = $elements.eq(Math.min(i + 1, $elements.length - 1)); 2976 return; 2977 } 2978 }); 2979 _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__["Keyboard"].handleKey(e, 'Drilldown', { 2980 next: function next() { 2981 if ($element.is(_this.$submenuAnchors)) { 2982 _this._show($element.parent('li')); 2983 2984 $element.parent('li').one(Object(_foundation_util_core__WEBPACK_IMPORTED_MODULE_3__["transitionend"])($element), function () { 2985 $element.parent('li').find('ul li a').filter(_this.$menuItems).first().focus(); 2986 }); 2987 return true; 2988 } 2989 }, 2990 previous: function previous() { 2991 _this._hide($element.parent('li').parent('ul')); 2992 2993 $element.parent('li').parent('ul').one(Object(_foundation_util_core__WEBPACK_IMPORTED_MODULE_3__["transitionend"])($element), function () { 2994 setTimeout(function () { 2995 $element.parent('li').parent('ul').parent('li').children('a').first().focus(); 2996 }, 1); 2997 }); 2998 return true; 2999 }, 3000 up: function up() { 3001 $prevElement.focus(); // Don't tap focus on first element in root ul 3002 3003 return !$element.is(_this.$element.find('> li:first-child > a')); 3004 }, 3005 down: function down() { 3006 $nextElement.focus(); // Don't tap focus on last element in root ul 3007 3008 return !$element.is(_this.$element.find('> li:last-child > a')); 3009 }, 3010 close: function close() { 3011 // Don't close on element in root ul 3012 if (!$element.is(_this.$element.find('> li > a'))) { 3013 _this._hide($element.parent().parent()); 3014 3015 $element.parent().parent().siblings('a').focus(); 3016 } 3017 }, 3018 open: function open() { 3019 if (!$element.is(_this.$menuItems)) { 3020 // not menu item means back button 3021 _this._hide($element.parent('li').parent('ul')); 3022 3023 $element.parent('li').parent('ul').one(Object(_foundation_util_core__WEBPACK_IMPORTED_MODULE_3__["transitionend"])($element), function () { 3024 setTimeout(function () { 3025 $element.parent('li').parent('ul').parent('li').children('a').first().focus(); 3026 }, 1); 3027 }); 3028 return true; 3029 } else if ($element.is(_this.$submenuAnchors)) { 3030 _this._show($element.parent('li')); 3031 3032 $element.parent('li').one(Object(_foundation_util_core__WEBPACK_IMPORTED_MODULE_3__["transitionend"])($element), function () { 3033 $element.parent('li').find('ul li a').filter(_this.$menuItems).first().focus(); 3034 }); 3035 return true; 3036 } 3037 }, 3038 handled: function handled(preventDefault) { 3039 if (preventDefault) { 3040 e.preventDefault(); 3041 } 3042 3043 e.stopImmediatePropagation(); 3044 } 3045 }); 3046 }); // end keyboardAccess 3047 } 3048 /** 3049 * Closes all open elements, and returns to root menu. 3050 * @function 3051 * @fires Drilldown#closed 3052 */ 3053 3054 }, { 3055 key: "_hideAll", 3056 value: function _hideAll() { 3057 var $elem = this.$element.find('.is-drilldown-submenu.is-active').addClass('is-closing'); 3058 if (this.options.autoHeight) this.$wrapper.css({ 3059 height: $elem.parent().closest('ul').data('calcHeight') 3060 }); 3061 $elem.one(Object(_foundation_util_core__WEBPACK_IMPORTED_MODULE_3__["transitionend"])($elem), function (e) { 3062 $elem.removeClass('is-active is-closing'); 3063 }); 3064 /** 3065 * Fires when the menu is fully closed. 3066 * @event Drilldown#closed 3067 */ 3068 3069 this.$element.trigger('closed.zf.drilldown'); 3070 } 3071 /** 3072 * Adds event listener for each `back` button, and closes open menus. 3073 * @function 3074 * @fires Drilldown#back 3075 * @param {jQuery} $elem - the current sub-menu to add `back` event. 3076 */ 3077 3078 }, { 3079 key: "_back", 3080 value: function _back($elem) { 3081 var _this = this; 3082 3083 $elem.off('click.zf.drilldown'); 3084 $elem.children('.js-drilldown-back').on('click.zf.drilldown', function (e) { 3085 e.stopImmediatePropagation(); // console.log('mouseup on back'); 3086 3087 _this._hide($elem); // If there is a parent submenu, call show 3088 3089 3090 var parentSubMenu = $elem.parent('li').parent('ul').parent('li'); 3091 3092 if (parentSubMenu.length) { 3093 _this._show(parentSubMenu); 3094 } 3095 }); 3096 } 3097 /** 3098 * Adds event listener to menu items w/o submenus to close open menus on click. 3099 * @function 3100 * @private 3101 */ 3102 3103 }, { 3104 key: "_menuLinkEvents", 3105 value: function _menuLinkEvents() { 3106 var _this = this; 3107 3108 this.$menuItems.not('.is-drilldown-submenu-parent').off('click.zf.drilldown').on('click.zf.drilldown', function (e) { 3109 // e.stopImmediatePropagation(); 3110 setTimeout(function () { 3111 _this._hideAll(); 3112 }, 0); 3113 }); 3114 } 3115 /** 3116 * Opens a submenu. 3117 * @function 3118 * @fires Drilldown#open 3119 * @param {jQuery} $elem - the current element with a submenu to open, i.e. the `li` tag. 3120 */ 3121 3122 }, { 3123 key: "_show", 3124 value: function _show($elem) { 3125 if (this.options.autoHeight) this.$wrapper.css({ 3126 height: $elem.children('[data-submenu]').data('calcHeight') 3127 }); 3128 $elem.attr('aria-expanded', true); 3129 $elem.children('[data-submenu]').addClass('is-active').removeClass('invisible').attr('aria-hidden', false); 3130 /** 3131 * Fires when the submenu has opened. 3132 * @event Drilldown#open 3133 */ 3134 3135 this.$element.trigger('open.zf.drilldown', [$elem]); 3136 } 3137 }, { 3138 key: "_hide", 3139 3140 /** 3141 * Hides a submenu 3142 * @function 3143 * @fires Drilldown#hide 3144 * @param {jQuery} $elem - the current sub-menu to hide, i.e. the `ul` tag. 3145 */ 3146 value: function _hide($elem) { 3147 if (this.options.autoHeight) this.$wrapper.css({ 3148 height: $elem.parent().closest('ul').data('calcHeight') 3149 }); 3150 3151 var _this = this; 3152 3153 $elem.parent('li').attr('aria-expanded', false); 3154 $elem.attr('aria-hidden', true).addClass('is-closing'); 3155 $elem.addClass('is-closing').one(Object(_foundation_util_core__WEBPACK_IMPORTED_MODULE_3__["transitionend"])($elem), function () { 3156 $elem.removeClass('is-active is-closing'); 3157 $elem.blur().addClass('invisible'); 3158 }); 3159 /** 3160 * Fires when the submenu has closed. 3161 * @event Drilldown#hide 3162 */ 3163 3164 $elem.trigger('hide.zf.drilldown', [$elem]); 3165 } 3166 /** 3167 * Iterates through the nested menus to calculate the min-height, and max-width for the menu. 3168 * Prevents content jumping. 3169 * @function 3170 * @private 3171 */ 3172 3173 }, { 3174 key: "_getMaxDims", 3175 value: function _getMaxDims() { 3176 var maxHeight = 0, 3177 result = {}, 3178 _this = this; 3179 3180 this.$submenus.add(this.$element).each(function () { 3181 var numOfElems = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).children('li').length; 3182 var height = _foundation_util_box__WEBPACK_IMPORTED_MODULE_4__["Box"].GetDimensions(this).height; 3183 maxHeight = height > maxHeight ? height : maxHeight; 3184 3185 if (_this.options.autoHeight) { 3186 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('calcHeight', height); 3187 if (!jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).hasClass('is-drilldown-submenu')) result['height'] = height; 3188 } 3189 }); 3190 if (!this.options.autoHeight) result['min-height'] = "".concat(maxHeight, "px"); 3191 result['max-width'] = "".concat(this.$element[0].getBoundingClientRect().width, "px"); 3192 return result; 3193 } 3194 /** 3195 * Destroys the Drilldown Menu 3196 * @function 3197 */ 3198 3199 }, { 3200 key: "_destroy", 3201 value: function _destroy() { 3202 if (this.options.scrollTop) this.$element.off('.zf.drilldown', this._bindHandler); 3203 3204 this._hideAll(); 3205 3206 this.$element.off('mutateme.zf.trigger'); 3207 _foundation_util_nest__WEBPACK_IMPORTED_MODULE_2__["Nest"].Burn(this.$element, 'drilldown'); 3208 this.$element.unwrap().find('.js-drilldown-back, .is-submenu-parent-item').remove().end().find('.is-active, .is-closing, .is-drilldown-submenu').removeClass('is-active is-closing is-drilldown-submenu').end().find('[data-submenu]').removeAttr('aria-hidden tabindex role'); 3209 this.$submenuAnchors.each(function () { 3210 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).off('.zf.drilldown'); 3211 }); 3212 this.$submenus.removeClass('drilldown-submenu-cover-previous invisible'); 3213 this.$element.find('a').each(function () { 3214 var $link = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this); 3215 $link.removeAttr('tabindex'); 3216 3217 if ($link.data('savedHref')) { 3218 $link.attr('href', $link.data('savedHref')).removeData('savedHref'); 3219 } else { 3220 return; 3221 } 3222 }); 3223 } 3224 }]); 3225 3226 return Drilldown; 3227}(_foundation_plugin__WEBPACK_IMPORTED_MODULE_5__["Plugin"]); 3228 3229Drilldown.defaults = { 3230 /** 3231 * Drilldowns depend on styles in order to function properly; in the default build of Foundation these are 3232 * on the `drilldown` class. This option auto-applies this class to the drilldown upon initialization. 3233 * @option 3234 * @type {boolian} 3235 * @default true 3236 */ 3237 autoApplyClass: true, 3238 3239 /** 3240 * Markup used for JS generated back button. Prepended or appended (see backButtonPosition) to submenu lists and deleted on `destroy` method, 'js-drilldown-back' class required. Remove the backslash (`\`) if copy and pasting. 3241 * @option 3242 * @type {string} 3243 * @default '<li class="js-drilldown-back"><a tabindex="0">Back</a></li>' 3244 */ 3245 backButton: '<li class="js-drilldown-back"><a tabindex="0">Back</a></li>', 3246 3247 /** 3248 * Position the back button either at the top or bottom of drilldown submenus. Can be `'left'` or `'bottom'`. 3249 * @option 3250 * @type {string} 3251 * @default top 3252 */ 3253 backButtonPosition: 'top', 3254 3255 /** 3256 * Markup used to wrap drilldown menu. Use a class name for independent styling; the JS applied class: `is-drilldown` is required. Remove the backslash (`\`) if copy and pasting. 3257 * @option 3258 * @type {string} 3259 * @default '<div></div>' 3260 */ 3261 wrapper: '<div></div>', 3262 3263 /** 3264 * Adds the parent link to the submenu. 3265 * @option 3266 * @type {boolean} 3267 * @default false 3268 */ 3269 parentLink: false, 3270 3271 /** 3272 * Allow the menu to return to root list on body click. 3273 * @option 3274 * @type {boolean} 3275 * @default false 3276 */ 3277 closeOnClick: false, 3278 3279 /** 3280 * Allow the menu to auto adjust height. 3281 * @option 3282 * @type {boolean} 3283 * @default false 3284 */ 3285 autoHeight: false, 3286 3287 /** 3288 * Animate the auto adjust height. 3289 * @option 3290 * @type {boolean} 3291 * @default false 3292 */ 3293 animateHeight: false, 3294 3295 /** 3296 * Scroll to the top of the menu after opening a submenu or navigating back using the menu back button 3297 * @option 3298 * @type {boolean} 3299 * @default false 3300 */ 3301 scrollTop: false, 3302 3303 /** 3304 * String jquery selector (for example 'body') of element to take offset().top from, if empty string the drilldown menu offset().top is taken 3305 * @option 3306 * @type {string} 3307 * @default '' 3308 */ 3309 scrollTopElement: '', 3310 3311 /** 3312 * ScrollTop offset 3313 * @option 3314 * @type {number} 3315 * @default 0 3316 */ 3317 scrollTopOffset: 0, 3318 3319 /** 3320 * Scroll animation duration 3321 * @option 3322 * @type {number} 3323 * @default 500 3324 */ 3325 animationDuration: 500, 3326 3327 /** 3328 * Scroll animation easing. Can be `'swing'` or `'linear'`. 3329 * @option 3330 * @type {string} 3331 * @see {@link https://api.jquery.com/animate|JQuery animate} 3332 * @default 'swing' 3333 */ 3334 animationEasing: 'swing' // holdOpen: false 3335 3336}; 3337 3338 3339/***/ }), 3340
vendor: 18,087 bytes, lines 3341-3854
3341/***/ "./node_modules/foundation-sites/js/foundation.dropdown.js": 3342/*!*****************************************************************!*\ 3343 !*** ./node_modules/foundation-sites/js/foundation.dropdown.js ***! 3344 \*****************************************************************/ 3345/*! exports provided: Dropdown */ 3346/***/ (function(module, __webpack_exports__, __webpack_require__) { 3347 3348"use strict"; 3349__webpack_require__.r(__webpack_exports__); 3350/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Dropdown", function() { return Dropdown; }); 3351/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"); 3352/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 3353/* harmony import */ var _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.util.keyboard */ "./node_modules/foundation-sites/js/foundation.util.keyboard.js"); 3354/* harmony import */ var _foundation_util_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation.util.core */ "./node_modules/foundation-sites/js/foundation.util.core.js"); 3355/* harmony import */ var _foundation_positionable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./foundation.positionable */ "./node_modules/foundation-sites/js/foundation.positionable.js"); 3356/* harmony import */ var _foundation_util_triggers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./foundation.util.triggers */ "./node_modules/foundation-sites/js/foundation.util.triggers.js"); 3357 3358 3359function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 3360 3361function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 3362 3363function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 3364 3365function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } 3366 3367function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } 3368 3369function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } 3370 3371function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); } 3372 3373function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; } 3374 3375function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } 3376 3377function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } 3378 3379function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } 3380 3381 3382 3383 3384 3385 3386/** 3387 * Dropdown module. 3388 * @module foundation.dropdown 3389 * @requires foundation.util.keyboard 3390 * @requires foundation.util.box 3391 * @requires foundation.util.triggers 3392 */ 3393 3394var Dropdown = 3395/*#__PURE__*/ 3396function (_Positionable) { 3397 _inherits(Dropdown, _Positionable); 3398 3399 function Dropdown() { 3400 _classCallCheck(this, Dropdown); 3401 3402 return _possibleConstructorReturn(this, _getPrototypeOf(Dropdown).apply(this, arguments)); 3403 } 3404 3405 _createClass(Dropdown, [{ 3406 key: "_setup", 3407 3408 /** 3409 * Creates a new instance of a dropdown. 3410 * @class 3411 * @name Dropdown 3412 * @param {jQuery} element - jQuery object to make into a dropdown. 3413 * Object should be of the dropdown panel, rather than its anchor. 3414 * @param {Object} options - Overrides to the default plugin settings. 3415 */ 3416 value: function _setup(element, options) { 3417 this.$element = element; 3418 this.options = jquery__WEBPACK_IMPORTED_MODULE_0___default.a.extend({}, Dropdown.defaults, this.$element.data(), options); 3419 this.className = 'Dropdown'; // ie9 back compat 3420 // Triggers init is idempotent, just need to make sure it is initialized 3421 3422 _foundation_util_triggers__WEBPACK_IMPORTED_MODULE_4__["Triggers"].init(jquery__WEBPACK_IMPORTED_MODULE_0___default.a); 3423 3424 this._init(); 3425 3426 _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__["Keyboard"].register('Dropdown', { 3427 'ENTER': 'open', 3428 'SPACE': 'open', 3429 'ESCAPE': 'close' 3430 }); 3431 } 3432 /** 3433 * Initializes the plugin by setting/checking options and attributes, adding helper variables, and saving the anchor. 3434 * @function 3435 * @private 3436 */ 3437 3438 }, { 3439 key: "_init", 3440 value: function _init() { 3441 var $id = this.$element.attr('id'); 3442 this.$anchors = jquery__WEBPACK_IMPORTED_MODULE_0___default()("[data-toggle=\"".concat($id, "\"]")).length ? jquery__WEBPACK_IMPORTED_MODULE_0___default()("[data-toggle=\"".concat($id, "\"]")) : jquery__WEBPACK_IMPORTED_MODULE_0___default()("[data-open=\"".concat($id, "\"]")); 3443 this.$anchors.attr({ 3444 'aria-controls': $id, 3445 'data-is-focus': false, 3446 'data-yeti-box': $id, 3447 'aria-haspopup': true, 3448 'aria-expanded': false 3449 }); 3450 3451 this._setCurrentAnchor(this.$anchors.first()); 3452 3453 if (this.options.parentClass) { 3454 this.$parent = this.$element.parents('.' + this.options.parentClass); 3455 } else { 3456 this.$parent = null; 3457 } 3458 3459 this.$element.attr({ 3460 'aria-hidden': 'true', 3461 'data-yeti-box': $id, 3462 'data-resize': $id, 3463 'aria-labelledby': this.$currentAnchor.id || Object(_foundation_util_core__WEBPACK_IMPORTED_MODULE_2__["GetYoDigits"])(6, 'dd-anchor') 3464 }); 3465 3466 _get(_getPrototypeOf(Dropdown.prototype), "_init", this).call(this); 3467 3468 this._events(); 3469 } 3470 }, { 3471 key: "_getDefaultPosition", 3472 value: function _getDefaultPosition() { 3473 // handle legacy classnames 3474 var position = this.$element[0].className.match(/(top|left|right|bottom)/g); 3475 3476 if (position) { 3477 return position[0]; 3478 } else { 3479 return 'bottom'; 3480 } 3481 } 3482 }, { 3483 key: "_getDefaultAlignment", 3484 value: function _getDefaultAlignment() { 3485 // handle legacy float approach 3486 var horizontalPosition = /float-(\S+)/.exec(this.$currentAnchor.className); 3487 3488 if (horizontalPosition) { 3489 return horizontalPosition[1]; 3490 } 3491 3492 return _get(_getPrototypeOf(Dropdown.prototype), "_getDefaultAlignment", this).call(this); 3493 } 3494 /** 3495 * Sets the position and orientation of the dropdown pane, checks for collisions if allow-overlap is not true. 3496 * Recursively calls itself if a collision is detected, with a new position class. 3497 * @function 3498 * @private 3499 */ 3500 3501 }, { 3502 key: "_setPosition", 3503 value: function _setPosition() { 3504 _get(_getPrototypeOf(Dropdown.prototype), "_setPosition", this).call(this, this.$currentAnchor, this.$element, this.$parent); 3505 } 3506 /** 3507 * Make it a current anchor. 3508 * Current anchor as the reference for the position of Dropdown panes. 3509 * @param {HTML} el - DOM element of the anchor. 3510 * @function 3511 * @private 3512 */ 3513 3514 }, { 3515 key: "_setCurrentAnchor", 3516 value: function _setCurrentAnchor(el) { 3517 this.$currentAnchor = jquery__WEBPACK_IMPORTED_MODULE_0___default()(el); 3518 } 3519 /** 3520 * Adds event listeners to the element utilizing the triggers utility library. 3521 * @function 3522 * @private 3523 */ 3524 3525 }, { 3526 key: "_events", 3527 value: function _events() { 3528 var _this = this; 3529 3530 this.$element.on({ 3531 'open.zf.trigger': this.open.bind(this), 3532 'close.zf.trigger': this.close.bind(this), 3533 'toggle.zf.trigger': this.toggle.bind(this), 3534 'resizeme.zf.trigger': this._setPosition.bind(this) 3535 }); 3536 this.$anchors.off('click.zf.trigger').on('click.zf.trigger', function () { 3537 _this._setCurrentAnchor(this); 3538 }); 3539 3540 if (this.options.hover) { 3541 this.$anchors.off('mouseenter.zf.dropdown mouseleave.zf.dropdown').on('mouseenter.zf.dropdown', function () { 3542 _this._setCurrentAnchor(this); 3543 3544 var bodyData = jquery__WEBPACK_IMPORTED_MODULE_0___default()('body').data(); 3545 3546 if (typeof bodyData.whatinput === 'undefined' || bodyData.whatinput === 'mouse') { 3547 clearTimeout(_this.timeout); 3548 _this.timeout = setTimeout(function () { 3549 _this.open(); 3550 3551 _this.$anchors.data('hover', true); 3552 }, _this.options.hoverDelay); 3553 } 3554 }).on('mouseleave.zf.dropdown', function () { 3555 clearTimeout(_this.timeout); 3556 _this.timeout = setTimeout(function () { 3557 _this.close(); 3558 3559 _this.$anchors.data('hover', false); 3560 }, _this.options.hoverDelay); 3561 }); 3562 3563 if (this.options.hoverPane) { 3564 this.$element.off('mouseenter.zf.dropdown mouseleave.zf.dropdown').on('mouseenter.zf.dropdown', function () { 3565 clearTimeout(_this.timeout); 3566 }).on('mouseleave.zf.dropdown', function () { 3567 clearTimeout(_this.timeout); 3568 _this.timeout = setTimeout(function () { 3569 _this.close(); 3570 3571 _this.$anchors.data('hover', false); 3572 }, _this.options.hoverDelay); 3573 }); 3574 } 3575 } 3576 3577 this.$anchors.add(this.$element).on('keydown.zf.dropdown', function (e) { 3578 var $target = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), 3579 visibleFocusableElements = _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__["Keyboard"].findFocusable(_this.$element); 3580 _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__["Keyboard"].handleKey(e, 'Dropdown', { 3581 open: function open() { 3582 if ($target.is(_this.$anchors)) { 3583 _this.open(); 3584 3585 _this.$element.attr('tabindex', -1).focus(); 3586 3587 e.preventDefault(); 3588 } 3589 }, 3590 close: function close() { 3591 _this.close(); 3592 3593 _this.$anchors.focus(); 3594 } 3595 }); 3596 }); 3597 } 3598 /** 3599 * Adds an event handler to the body to close any dropdowns on a click. 3600 * @function 3601 * @private 3602 */ 3603 3604 }, { 3605 key: "_addBodyHandler", 3606 value: function _addBodyHandler() { 3607 var $body = jquery__WEBPACK_IMPORTED_MODULE_0___default()(document.body).not(this.$element), 3608 _this = this; 3609 3610 $body.off('click.zf.dropdown').on('click.zf.dropdown', function (e) { 3611 if (_this.$anchors.is(e.target) || _this.$anchors.find(e.target).length) { 3612 return; 3613 } 3614 3615 if (_this.$element.find(e.target).length) { 3616 return; 3617 } 3618 3619 _this.close(); 3620 3621 $body.off('click.zf.dropdown'); 3622 }); 3623 } 3624 /** 3625 * Opens the dropdown pane, and fires a bubbling event to close other dropdowns. 3626 * @function 3627 * @fires Dropdown#closeme 3628 * @fires Dropdown#show 3629 */ 3630 3631 }, { 3632 key: "open", 3633 value: function open() { 3634 // var _this = this; 3635 3636 /** 3637 * Fires to close other open dropdowns, typically when dropdown is opening 3638 * @event Dropdown#closeme 3639 */ 3640 this.$element.trigger('closeme.zf.dropdown', this.$element.attr('id')); 3641 this.$anchors.addClass('hover').attr({ 3642 'aria-expanded': true 3643 }); // this.$element/*.show()*/; 3644 3645 this.$element.addClass('is-opening'); 3646 3647 this._setPosition(); 3648 3649 this.$element.removeClass('is-opening').addClass('is-open').attr({ 3650 'aria-hidden': false 3651 }); 3652 3653 if (this.options.autoFocus) { 3654 var $focusable = _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__["Keyboard"].findFocusable(this.$element); 3655 3656 if ($focusable.length) { 3657 $focusable.eq(0).focus(); 3658 } 3659 } 3660 3661 if (this.options.closeOnClick) { 3662 this._addBodyHandler(); 3663 } 3664 3665 if (this.options.trapFocus) { 3666 _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__["Keyboard"].trapFocus(this.$element); 3667 } 3668 /** 3669 * Fires once the dropdown is visible. 3670 * @event Dropdown#show 3671 */ 3672 3673 3674 this.$element.trigger('show.zf.dropdown', [this.$element]); 3675 } 3676 /** 3677 * Closes the open dropdown pane. 3678 * @function 3679 * @fires Dropdown#hide 3680 */ 3681 3682 }, { 3683 key: "close", 3684 value: function close() { 3685 if (!this.$element.hasClass('is-open')) { 3686 return false; 3687 } 3688 3689 this.$element.removeClass('is-open').attr({ 3690 'aria-hidden': true 3691 }); 3692 this.$anchors.removeClass('hover').attr('aria-expanded', false); 3693 /** 3694 * Fires once the dropdown is no longer visible. 3695 * @event Dropdown#hide 3696 */ 3697 3698 this.$element.trigger('hide.zf.dropdown', [this.$element]); 3699 3700 if (this.options.trapFocus) { 3701 _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__["Keyboard"].releaseFocus(this.$element); 3702 } 3703 } 3704 /** 3705 * Toggles the dropdown pane's visibility. 3706 * @function 3707 */ 3708 3709 }, { 3710 key: "toggle", 3711 value: function toggle() { 3712 if (this.$element.hasClass('is-open')) { 3713 if (this.$anchors.data('hover')) return; 3714 this.close(); 3715 } else { 3716 this.open(); 3717 } 3718 } 3719 /** 3720 * Destroys the dropdown. 3721 * @function 3722 */ 3723 3724 }, { 3725 key: "_destroy", 3726 value: function _destroy() { 3727 this.$element.off('.zf.trigger').hide(); 3728 this.$anchors.off('.zf.dropdown'); 3729 jquery__WEBPACK_IMPORTED_MODULE_0___default()(document.body).off('click.zf.dropdown'); 3730 } 3731 }]); 3732 3733 return Dropdown; 3734}(_foundation_positionable__WEBPACK_IMPORTED_MODULE_3__["Positionable"]); 3735 3736Dropdown.defaults = { 3737 /** 3738 * Class that designates bounding container of Dropdown (default: window) 3739 * @option 3740 * @type {?string} 3741 * @default null 3742 */ 3743 parentClass: null, 3744 3745 /** 3746 * Amount of time to delay opening a submenu on hover event. 3747 * @option 3748 * @type {number} 3749 * @default 250 3750 */ 3751 hoverDelay: 250, 3752 3753 /** 3754 * Allow submenus to open on hover events 3755 * @option 3756 * @type {boolean} 3757 * @default false 3758 */ 3759 hover: false, 3760 3761 /** 3762 * Don't close dropdown when hovering over dropdown pane 3763 * @option 3764 * @type {boolean} 3765 * @default false 3766 */ 3767 hoverPane: false, 3768 3769 /** 3770 * Number of pixels between the dropdown pane and the triggering element on open. 3771 * @option 3772 * @type {number} 3773 * @default 0 3774 */ 3775 vOffset: 0, 3776 3777 /** 3778 * Number of pixels between the dropdown pane and the triggering element on open. 3779 * @option 3780 * @type {number} 3781 * @default 0 3782 */ 3783 hOffset: 0, 3784 3785 /** 3786 * DEPRECATED: Class applied to adjust open position. 3787 * @option 3788 * @type {string} 3789 * @default '' 3790 */ 3791 positionClass: '', 3792 3793 /** 3794 * Position of dropdown. Can be left, right, bottom, top, or auto. 3795 * @option 3796 * @type {string} 3797 * @default 'auto' 3798 */ 3799 position: 'auto', 3800 3801 /** 3802 * Alignment of dropdown relative to anchor. Can be left, right, bottom, top, center, or auto. 3803 * @option 3804 * @type {string} 3805 * @default 'auto' 3806 */ 3807 alignment: 'auto', 3808 3809 /** 3810 * Allow overlap of container/window. If false, dropdown will first try to position as defined by data-position and data-alignment, but reposition if it would cause an overflow. 3811 * @option 3812 * @type {boolean} 3813 * @default false 3814 */ 3815 allowOverlap: false, 3816 3817 /** 3818 * Allow overlap of only the bottom of the container. This is the most common 3819 * behavior for dropdowns, allowing the dropdown to extend the bottom of the 3820 * screen but not otherwise influence or break out of the container. 3821 * @option 3822 * @type {boolean} 3823 * @default true 3824 */ 3825 allowBottomOverlap: true, 3826 3827 /** 3828 * Allow the plugin to trap focus to the dropdown pane if opened with keyboard commands. 3829 * @option 3830 * @type {boolean} 3831 * @default false 3832 */ 3833 trapFocus: false, 3834 3835 /** 3836 * Allow the plugin to set focus to the first focusable element within the pane, regardless of method of opening. 3837 * @option 3838 * @type {boolean} 3839 * @default false 3840 */ 3841 autoFocus: false, 3842 3843 /** 3844 * Allows a click on the body to close the dropdown. 3845 * @option 3846 * @type {boolean} 3847 * @default false 3848 */ 3849 closeOnClick: false 3850}; 3851 3852 3853/***/ }), 3854
vendor: 21,049 bytes, lines 3855-4428
3855/***/ "./node_modules/foundation-sites/js/foundation.dropdownMenu.js": 3856/*!*********************************************************************!*\ 3857 !*** ./node_modules/foundation-sites/js/foundation.dropdownMenu.js ***! 3858 \*********************************************************************/ 3859/*! exports provided: DropdownMenu */ 3860/***/ (function(module, __webpack_exports__, __webpack_require__) { 3861 3862"use strict"; 3863__webpack_require__.r(__webpack_exports__); 3864/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DropdownMenu", function() { return DropdownMenu; }); 3865/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"); 3866/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 3867/* harmony import */ var _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.util.keyboard */ "./node_modules/foundation-sites/js/foundation.util.keyboard.js"); 3868/* harmony import */ var _foundation_util_nest__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation.util.nest */ "./node_modules/foundation-sites/js/foundation.util.nest.js"); 3869/* harmony import */ var _foundation_util_box__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./foundation.util.box */ "./node_modules/foundation-sites/js/foundation.util.box.js"); 3870/* harmony import */ var _foundation_util_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./foundation.util.core */ "./node_modules/foundation-sites/js/foundation.util.core.js"); 3871/* harmony import */ var _foundation_plugin__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./foundation.plugin */ "./node_modules/foundation-sites/js/foundation.plugin.js"); 3872 3873 3874function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 3875 3876function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 3877 3878function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 3879 3880function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } 3881 3882function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } 3883 3884function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } 3885 3886function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } 3887 3888function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } 3889 3890function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } 3891 3892 3893 3894 3895 3896 3897 3898/** 3899 * DropdownMenu module. 3900 * @module foundation.dropdown-menu 3901 * @requires foundation.util.keyboard 3902 * @requires foundation.util.box 3903 * @requires foundation.util.nest 3904 */ 3905 3906var DropdownMenu = 3907/*#__PURE__*/ 3908function (_Plugin) { 3909 _inherits(DropdownMenu, _Plugin); 3910 3911 function DropdownMenu() { 3912 _classCallCheck(this, DropdownMenu); 3913 3914 return _possibleConstructorReturn(this, _getPrototypeOf(DropdownMenu).apply(this, arguments)); 3915 } 3916 3917 _createClass(DropdownMenu, [{ 3918 key: "_setup", 3919 3920 /** 3921 * Creates a new instance of DropdownMenu. 3922 * @class 3923 * @name DropdownMenu 3924 * @fires DropdownMenu#init 3925 * @param {jQuery} element - jQuery object to make into a dropdown menu. 3926 * @param {Object} options - Overrides to the default plugin settings. 3927 */ 3928 value: function _setup(element, options) { 3929 this.$element = element; 3930 this.options = jquery__WEBPACK_IMPORTED_MODULE_0___default.a.extend({}, DropdownMenu.defaults, this.$element.data(), options); 3931 this.className = 'DropdownMenu'; // ie9 back compat 3932 3933 this._init(); 3934 3935 _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__["Keyboard"].register('DropdownMenu', { 3936 'ENTER': 'open', 3937 'SPACE': 'open', 3938 'ARROW_RIGHT': 'next', 3939 'ARROW_UP': 'up', 3940 'ARROW_DOWN': 'down', 3941 'ARROW_LEFT': 'previous', 3942 'ESCAPE': 'close' 3943 }); 3944 } 3945 /** 3946 * Initializes the plugin, and calls _prepareMenu 3947 * @private 3948 * @function 3949 */ 3950 3951 }, { 3952 key: "_init", 3953 value: function _init() { 3954 _foundation_util_nest__WEBPACK_IMPORTED_MODULE_2__["Nest"].Feather(this.$element, 'dropdown'); 3955 var subs = this.$element.find('li.is-dropdown-submenu-parent'); 3956 this.$element.children('.is-dropdown-submenu-parent').children('.is-dropdown-submenu').addClass('first-sub'); 3957 this.$menuItems = this.$element.find('[role="menuitem"]'); 3958 this.$tabs = this.$element.children('[role="menuitem"]'); 3959 this.$tabs.find('ul.is-dropdown-submenu').addClass(this.options.verticalClass); 3960 3961 if (this.options.alignment === 'auto') { 3962 if (this.$element.hasClass(this.options.rightClass) || Object(_foundation_util_core__WEBPACK_IMPORTED_MODULE_4__["rtl"])() || this.$element.parents('.top-bar-right').is('*')) { 3963 this.options.alignment = 'right'; 3964 subs.addClass('opens-left'); 3965 } else { 3966 this.options.alignment = 'left'; 3967 subs.addClass('opens-right'); 3968 } 3969 } else { 3970 if (this.options.alignment === 'right') { 3971 subs.addClass('opens-left'); 3972 } else { 3973 subs.addClass('opens-right'); 3974 } 3975 } 3976 3977 this.changed = false; 3978 3979 this._events(); 3980 } 3981 }, { 3982 key: "_isVertical", 3983 value: function _isVertical() { 3984 return this.$tabs.css('display') === 'block' || this.$element.css('flex-direction') === 'column'; 3985 } 3986 }, { 3987 key: "_isRtl", 3988 value: function _isRtl() { 3989 return this.$element.hasClass('align-right') || Object(_foundation_util_core__WEBPACK_IMPORTED_MODULE_4__["rtl"])() && !this.$element.hasClass('align-left'); 3990 } 3991 /** 3992 * Adds event listeners to elements within the menu 3993 * @private 3994 * @function 3995 */ 3996 3997 }, { 3998 key: "_events", 3999 value: function _events() { 4000 var _this = this, 4001 hasTouch = 'ontouchstart' in window || typeof window.ontouchstart !== 'undefined', 4002 parClass = 'is-dropdown-submenu-parent'; // used for onClick and in the keyboard handlers 4003 4004 4005 var handleClickFn = function handleClickFn(e) { 4006 var $elem = jquery__WEBPACK_IMPORTED_MODULE_0___default()(e.target).parentsUntil('ul', ".".concat(parClass)), 4007 hasSub = $elem.hasClass(parClass), 4008 hasClicked = $elem.attr('data-is-click') === 'true', 4009 $sub = $elem.children('.is-dropdown-submenu'); 4010 4011 if (hasSub) { 4012 if (hasClicked) { 4013 if (!_this.options.closeOnClick || !_this.options.clickOpen && !hasTouch || _this.options.forceFollow && hasTouch) { 4014 return; 4015 } else { 4016 e.stopImmediatePropagation(); 4017 e.preventDefault(); 4018 4019 _this._hide($elem); 4020 } 4021 } else { 4022 e.preventDefault(); 4023 e.stopImmediatePropagation(); 4024 4025 _this._show($sub); 4026 4027 $elem.add($elem.parentsUntil(_this.$element, ".".concat(parClass))).attr('data-is-click', true); 4028 } 4029 } 4030 }; 4031 4032 if (this.options.clickOpen || hasTouch) { 4033 this.$menuItems.on('click.zf.dropdownmenu touchstart.zf.dropdownmenu', handleClickFn); 4034 } // Handle Leaf element Clicks 4035 4036 4037 if (_this.options.closeOnClickInside) { 4038 this.$menuItems.on('click.zf.dropdownmenu', function (e) { 4039 var $elem = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), 4040 hasSub = $elem.hasClass(parClass); 4041 4042 if (!hasSub) { 4043 _this._hide(); 4044 } 4045 }); 4046 } 4047 4048 if (!this.options.disableHover) { 4049 this.$menuItems.on('mouseenter.zf.dropdownmenu', function (e) { 4050 var $elem = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), 4051 hasSub = $elem.hasClass(parClass); 4052 4053 if (hasSub) { 4054 clearTimeout($elem.data('_delay')); 4055 $elem.data('_delay', setTimeout(function () { 4056 _this._show($elem.children('.is-dropdown-submenu')); 4057 }, _this.options.hoverDelay)); 4058 } 4059 }).on('mouseleave.zf.dropdownmenu', function (e) { 4060 var $elem = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), 4061 hasSub = $elem.hasClass(parClass); 4062 4063 if (hasSub && _this.options.autoclose) { 4064 if ($elem.attr('data-is-click') === 'true' && _this.options.clickOpen) { 4065 return false; 4066 } 4067 4068 clearTimeout($elem.data('_delay')); 4069 $elem.data('_delay', setTimeout(function () { 4070 _this._hide($elem); 4071 }, _this.options.closingTime)); 4072 } 4073 }); 4074 } 4075 4076 this.$menuItems.on('keydown.zf.dropdownmenu', function (e) { 4077 var $element = jquery__WEBPACK_IMPORTED_MODULE_0___default()(e.target).parentsUntil('ul', '[role="menuitem"]'), 4078 isTab = _this.$tabs.index($element) > -1, 4079 $elements = isTab ? _this.$tabs : $element.siblings('li').add($element), 4080 $prevElement, 4081 $nextElement; 4082 $elements.each(function (i) { 4083 if (jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).is($element)) { 4084 $prevElement = $elements.eq(i - 1); 4085 $nextElement = $elements.eq(i + 1); 4086 return; 4087 } 4088 }); 4089 4090 var nextSibling = function nextSibling() { 4091 $nextElement.children('a:first').focus(); 4092 e.preventDefault(); 4093 }, 4094 prevSibling = function prevSibling() { 4095 $prevElement.children('a:first').focus(); 4096 e.preventDefault(); 4097 }, 4098 openSub = function openSub() { 4099 var $sub = $element.children('ul.is-dropdown-submenu'); 4100 4101 if ($sub.length) { 4102 _this._show($sub); 4103 4104 $element.find('li > a:first').focus(); 4105 e.preventDefault(); 4106 } else { 4107 return; 4108 } 4109 }, 4110 closeSub = function closeSub() { 4111 //if ($element.is(':first-child')) { 4112 var close = $element.parent('ul').parent('li'); 4113 close.children('a:first').focus(); 4114 4115 _this._hide(close); 4116 4117 e.preventDefault(); //} 4118 }; 4119 4120 var functions = { 4121 open: openSub, 4122 close: function close() { 4123 _this._hide(_this.$element); 4124 4125 _this.$menuItems.eq(0).children('a').focus(); // focus to first element 4126 4127 4128 e.preventDefault(); 4129 }, 4130 handled: function handled() { 4131 e.stopImmediatePropagation(); 4132 } 4133 }; 4134 4135 if (isTab) { 4136 if (_this._isVertical()) { 4137 // vertical menu 4138 if (_this._isRtl()) { 4139 // right aligned 4140 jquery__WEBPACK_IMPORTED_MODULE_0___default.a.extend(functions, { 4141 down: nextSibling, 4142 up: prevSibling, 4143 next: closeSub, 4144 previous: openSub 4145 }); 4146 } else { 4147 // left aligned 4148 jquery__WEBPACK_IMPORTED_MODULE_0___default.a.extend(functions, { 4149 down: nextSibling, 4150 up: prevSibling, 4151 next: openSub, 4152 previous: closeSub 4153 }); 4154 } 4155 } else { 4156 // horizontal menu 4157 if (_this._isRtl()) { 4158 // right aligned 4159 jquery__WEBPACK_IMPORTED_MODULE_0___default.a.extend(functions, { 4160 next: prevSibling, 4161 previous: nextSibling, 4162 down: openSub, 4163 up: closeSub 4164 }); 4165 } else { 4166 // left aligned 4167 jquery__WEBPACK_IMPORTED_MODULE_0___default.a.extend(functions, { 4168 next: nextSibling, 4169 previous: prevSibling, 4170 down: openSub, 4171 up: closeSub 4172 }); 4173 } 4174 } 4175 } else { 4176 // not tabs -> one sub 4177 if (_this._isRtl()) { 4178 // right aligned 4179 jquery__WEBPACK_IMPORTED_MODULE_0___default.a.extend(functions, { 4180 next: closeSub, 4181 previous: openSub, 4182 down: nextSibling, 4183 up: prevSibling 4184 }); 4185 } else { 4186 // left aligned 4187 jquery__WEBPACK_IMPORTED_MODULE_0___default.a.extend(functions, { 4188 next: openSub, 4189 previous: closeSub, 4190 down: nextSibling, 4191 up: prevSibling 4192 }); 4193 } 4194 } 4195 4196 _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__["Keyboard"].handleKey(e, 'DropdownMenu', functions); 4197 }); 4198 } 4199 /** 4200 * Adds an event handler to the body to close any dropdowns on a click. 4201 * @function 4202 * @private 4203 */ 4204 4205 }, { 4206 key: "_addBodyHandler", 4207 value: function _addBodyHandler() { 4208 var $body = jquery__WEBPACK_IMPORTED_MODULE_0___default()(document.body), 4209 _this = this; 4210 4211 $body.off('mouseup.zf.dropdownmenu touchend.zf.dropdownmenu').on('mouseup.zf.dropdownmenu touchend.zf.dropdownmenu', function (e) { 4212 var $link = _this.$element.find(e.target); 4213 4214 if ($link.length) { 4215 return; 4216 } 4217 4218 _this._hide(); 4219 4220 $body.off('mouseup.zf.dropdownmenu touchend.zf.dropdownmenu'); 4221 }); 4222 } 4223 /** 4224 * Opens a dropdown pane, and checks for collisions first. 4225 * @param {jQuery} $sub - ul element that is a submenu to show 4226 * @function 4227 * @private 4228 * @fires DropdownMenu#show 4229 */ 4230 4231 }, { 4232 key: "_show", 4233 value: function _show($sub) { 4234 var idx = this.$tabs.index(this.$tabs.filter(function (i, el) { 4235 return jquery__WEBPACK_IMPORTED_MODULE_0___default()(el).find($sub).length > 0; 4236 })); 4237 var $sibs = $sub.parent('li.is-dropdown-submenu-parent').siblings('li.is-dropdown-submenu-parent'); 4238 4239 this._hide($sibs, idx); 4240 4241 $sub.css('visibility', 'hidden').addClass('js-dropdown-active').parent('li.is-dropdown-submenu-parent').addClass('is-active'); 4242 var clear = _foundation_util_box__WEBPACK_IMPORTED_MODULE_3__["Box"].ImNotTouchingYou($sub, null, true); 4243 4244 if (!clear) { 4245 var oldClass = this.options.alignment === 'left' ? '-right' : '-left', 4246 $parentLi = $sub.parent('.is-dropdown-submenu-parent'); 4247 $parentLi.removeClass("opens".concat(oldClass)).addClass("opens-".concat(this.options.alignment)); 4248 clear = _foundation_util_box__WEBPACK_IMPORTED_MODULE_3__["Box"].ImNotTouchingYou($sub, null, true); 4249 4250 if (!clear) { 4251 $parentLi.removeClass("opens-".concat(this.options.alignment)).addClass('opens-inner'); 4252 } 4253 4254 this.changed = true; 4255 } 4256 4257 $sub.css('visibility', ''); 4258 4259 if (this.options.closeOnClick) { 4260 this._addBodyHandler(); 4261 } 4262 /** 4263 * Fires when the new dropdown pane is visible. 4264 * @event DropdownMenu#show 4265 */ 4266 4267 4268 this.$element.trigger('show.zf.dropdownmenu', [$sub]); 4269 } 4270 /** 4271 * Hides a single, currently open dropdown pane, if passed a parameter, otherwise, hides everything. 4272 * @function 4273 * @param {jQuery} $elem - element with a submenu to hide 4274 * @param {Number} idx - index of the $tabs collection to hide 4275 * @private 4276 */ 4277 4278 }, { 4279 key: "_hide", 4280 value: function _hide($elem, idx) { 4281 var $toClose; 4282 4283 if ($elem && $elem.length) { 4284 $toClose = $elem; 4285 } else if (idx !== undefined) { 4286 $toClose = this.$tabs.not(function (i, el) { 4287 return i === idx; 4288 }); 4289 } else { 4290 $toClose = this.$element; 4291 } 4292 4293 var somethingToClose = $toClose.hasClass('is-active') || $toClose.find('.is-active').length > 0; 4294 4295 if (somethingToClose) { 4296 $toClose.find('li.is-active').add($toClose).attr({ 4297 'data-is-click': false 4298 }).removeClass('is-active'); 4299 $toClose.find('ul.js-dropdown-active').removeClass('js-dropdown-active'); 4300 4301 if (this.changed || $toClose.find('opens-inner').length) { 4302 var oldClass = this.options.alignment === 'left' ? 'right' : 'left'; 4303 $toClose.find('li.is-dropdown-submenu-parent').add($toClose).removeClass("opens-inner opens-".concat(this.options.alignment)).addClass("opens-".concat(oldClass)); 4304 this.changed = false; 4305 } 4306 /** 4307 * Fires when the open menus are closed. 4308 * @event DropdownMenu#hide 4309 */ 4310 4311 4312 this.$element.trigger('hide.zf.dropdownmenu', [$toClose]); 4313 } 4314 } 4315 /** 4316 * Destroys the plugin. 4317 * @function 4318 */ 4319 4320 }, { 4321 key: "_destroy", 4322 value: function _destroy() { 4323 this.$menuItems.off('.zf.dropdownmenu').removeAttr('data-is-click').removeClass('is-right-arrow is-left-arrow is-down-arrow opens-right opens-left opens-inner'); 4324 jquery__WEBPACK_IMPORTED_MODULE_0___default()(document.body).off('.zf.dropdownmenu'); 4325 _foundation_util_nest__WEBPACK_IMPORTED_MODULE_2__["Nest"].Burn(this.$element, 'dropdown'); 4326 } 4327 }]); 4328 4329 return DropdownMenu; 4330}(_foundation_plugin__WEBPACK_IMPORTED_MODULE_5__["Plugin"]); 4331/** 4332 * Default settings for plugin 4333 */ 4334 4335 4336DropdownMenu.defaults = { 4337 /** 4338 * Disallows hover events from opening submenus 4339 * @option 4340 * @type {boolean} 4341 * @default false 4342 */ 4343 disableHover: false, 4344 4345 /** 4346 * Allow a submenu to automatically close on a mouseleave event, if not clicked open. 4347 * @option 4348 * @type {boolean} 4349 * @default true 4350 */ 4351 autoclose: true, 4352 4353 /** 4354 * Amount of time to delay opening a submenu on hover event. 4355 * @option 4356 * @type {number} 4357 * @default 50 4358 */ 4359 hoverDelay: 50, 4360 4361 /** 4362 * Allow a submenu to open/remain open on parent click event. Allows cursor to move away from menu. 4363 * @option 4364 * @type {boolean} 4365 * @default false 4366 */ 4367 clickOpen: false, 4368 4369 /** 4370 * Amount of time to delay closing a submenu on a mouseleave event. 4371 * @option 4372 * @type {number} 4373 * @default 500 4374 */ 4375 closingTime: 500, 4376 4377 /** 4378 * Position of the menu relative to what direction the submenus should open. Handled by JS. Can be `'auto'`, `'left'` or `'right'`. 4379 * @option 4380 * @type {string} 4381 * @default 'auto' 4382 */ 4383 alignment: 'auto', 4384 4385 /** 4386 * Allow clicks on the body to close any open submenus. 4387 * @option 4388 * @type {boolean} 4389 * @default true 4390 */ 4391 closeOnClick: true, 4392 4393 /** 4394 * Allow clicks on leaf anchor links to close any open submenus. 4395 * @option 4396 * @type {boolean} 4397 * @default true 4398 */ 4399 closeOnClickInside: true, 4400 4401 /** 4402 * Class applied to vertical oriented menus, Foundation default is `vertical`. Update this if using your own class. 4403 * @option 4404 * @type {string} 4405 * @default 'vertical' 4406 */ 4407 verticalClass: 'vertical', 4408 4409 /** 4410 * Class applied to right-side oriented menus, Foundation default is `align-right`. Update this if using your own class. 4411 * @option 4412 * @type {string} 4413 * @default 'align-right' 4414 */ 4415 rightClass: 'align-right', 4416 4417 /** 4418 * Boolean to force overide the clicking of links to perform default action, on second touch event for mobile. 4419 * @option 4420 * @type {boolean} 4421 * @default true 4422 */ 4423 forceFollow: true 4424}; 4425 4426 4427/***/ }), 4428
vendor: 15,443 bytes, lines 4429-4860
4429/***/ "./node_modules/foundation-sites/js/foundation.equalizer.js": 4430/*!******************************************************************!*\ 4431 !*** ./node_modules/foundation-sites/js/foundation.equalizer.js ***! 4432 \******************************************************************/ 4433/*! exports provided: Equalizer */ 4434/***/ (function(module, __webpack_exports__, __webpack_require__) { 4435 4436"use strict"; 4437__webpack_require__.r(__webpack_exports__); 4438/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Equalizer", function() { return Equalizer; }); 4439/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"); 4440/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 4441/* harmony import */ var _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.util.mediaQuery */ "./node_modules/foundation-sites/js/foundation.util.mediaQuery.js"); 4442/* harmony import */ var _foundation_util_imageLoader__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation.util.imageLoader */ "./node_modules/foundation-sites/js/foundation.util.imageLoader.js"); 4443/* harmony import */ var _foundation_util_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./foundation.util.core */ "./node_modules/foundation-sites/js/foundation.util.core.js"); 4444/* harmony import */ var _foundation_plugin__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./foundation.plugin */ "./node_modules/foundation-sites/js/foundation.plugin.js"); 4445 4446 4447function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 4448 4449function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 4450 4451function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 4452 4453function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } 4454 4455function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } 4456 4457function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } 4458 4459function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } 4460 4461function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } 4462 4463function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } 4464 4465 4466 4467 4468 4469 4470/** 4471 * Equalizer module. 4472 * @module foundation.equalizer 4473 * @requires foundation.util.mediaQuery 4474 * @requires foundation.util.imageLoader if equalizer contains images 4475 */ 4476 4477var Equalizer = 4478/*#__PURE__*/ 4479function (_Plugin) { 4480 _inherits(Equalizer, _Plugin); 4481 4482 function Equalizer() { 4483 _classCallCheck(this, Equalizer); 4484 4485 return _possibleConstructorReturn(this, _getPrototypeOf(Equalizer).apply(this, arguments)); 4486 } 4487 4488 _createClass(Equalizer, [{ 4489 key: "_setup", 4490 4491 /** 4492 * Creates a new instance of Equalizer. 4493 * @class 4494 * @name Equalizer 4495 * @fires Equalizer#init 4496 * @param {Object} element - jQuery object to add the trigger to. 4497 * @param {Object} options - Overrides to the default plugin settings. 4498 */ 4499 value: function _setup(element, options) { 4500 this.$element = element; 4501 this.options = jquery__WEBPACK_IMPORTED_MODULE_0___default.a.extend({}, Equalizer.defaults, this.$element.data(), options); 4502 this.className = 'Equalizer'; // ie9 back compat 4503 4504 this._init(); 4505 } 4506 /** 4507 * Initializes the Equalizer plugin and calls functions to get equalizer functioning on load. 4508 * @private 4509 */ 4510 4511 }, { 4512 key: "_init", 4513 value: function _init() { 4514 var eqId = this.$element.attr('data-equalizer') || ''; 4515 var $watched = this.$element.find("[data-equalizer-watch=\"".concat(eqId, "\"]")); 4516 4517 _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_1__["MediaQuery"]._init(); 4518 4519 this.$watched = $watched.length ? $watched : this.$element.find('[data-equalizer-watch]'); 4520 this.$element.attr('data-resize', eqId || Object(_foundation_util_core__WEBPACK_IMPORTED_MODULE_3__["GetYoDigits"])(6, 'eq')); 4521 this.$element.attr('data-mutate', eqId || Object(_foundation_util_core__WEBPACK_IMPORTED_MODULE_3__["GetYoDigits"])(6, 'eq')); 4522 this.hasNested = this.$element.find('[data-equalizer]').length > 0; 4523 this.isNested = this.$element.parentsUntil(document.body, '[data-equalizer]').length > 0; 4524 this.isOn = false; 4525 this._bindHandler = { 4526 onResizeMeBound: this._onResizeMe.bind(this), 4527 onPostEqualizedBound: this._onPostEqualized.bind(this) 4528 }; 4529 var imgs = this.$element.find('img'); 4530 var tooSmall; 4531 4532 if (this.options.equalizeOn) { 4533 tooSmall = this._checkMQ(); 4534 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).on('changed.zf.mediaquery', this._checkMQ.bind(this)); 4535 } else { 4536 this._events(); 4537 } 4538 4539 if (tooSmall !== undefined && tooSmall === false || tooSmall === undefined) { 4540 if (imgs.length) { 4541 Object(_foundation_util_imageLoader__WEBPACK_IMPORTED_MODULE_2__["onImagesLoaded"])(imgs, this._reflow.bind(this)); 4542 } else { 4543 this._reflow(); 4544 } 4545 } 4546 } 4547 /** 4548 * Removes event listeners if the breakpoint is too small. 4549 * @private 4550 */ 4551 4552 }, { 4553 key: "_pauseEvents", 4554 value: function _pauseEvents() { 4555 this.isOn = false; 4556 this.$element.off({ 4557 '.zf.equalizer': this._bindHandler.onPostEqualizedBound, 4558 'resizeme.zf.trigger': this._bindHandler.onResizeMeBound, 4559 'mutateme.zf.trigger': this._bindHandler.onResizeMeBound 4560 }); 4561 } 4562 /** 4563 * function to handle $elements resizeme.zf.trigger, with bound this on _bindHandler.onResizeMeBound 4564 * @private 4565 */ 4566 4567 }, { 4568 key: "_onResizeMe", 4569 value: function _onResizeMe(e) { 4570 this._reflow(); 4571 } 4572 /** 4573 * function to handle $elements postequalized.zf.equalizer, with bound this on _bindHandler.onPostEqualizedBound 4574 * @private 4575 */ 4576 4577 }, { 4578 key: "_onPostEqualized", 4579 value: function _onPostEqualized(e) { 4580 if (e.target !== this.$element[0]) { 4581 this._reflow(); 4582 } 4583 } 4584 /** 4585 * Initializes events for Equalizer. 4586 * @private 4587 */ 4588 4589 }, { 4590 key: "_events", 4591 value: function _events() { 4592 var _this = this; 4593 4594 this._pauseEvents(); 4595 4596 if (this.hasNested) { 4597 this.$element.on('postequalized.zf.equalizer', this._bindHandler.onPostEqualizedBound); 4598 } else { 4599 this.$element.on('resizeme.zf.trigger', this._bindHandler.onResizeMeBound); 4600 this.$element.on('mutateme.zf.trigger', this._bindHandler.onResizeMeBound); 4601 } 4602 4603 this.isOn = true; 4604 } 4605 /** 4606 * Checks the current breakpoint to the minimum required size. 4607 * @private 4608 */ 4609 4610 }, { 4611 key: "_checkMQ", 4612 value: function _checkMQ() { 4613 var tooSmall = !_foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_1__["MediaQuery"].is(this.options.equalizeOn); 4614 4615 if (tooSmall) { 4616 if (this.isOn) { 4617 this._pauseEvents(); 4618 4619 this.$watched.css('height', 'auto'); 4620 } 4621 } else { 4622 if (!this.isOn) { 4623 this._events(); 4624 } 4625 } 4626 4627 return tooSmall; 4628 } 4629 /** 4630 * A noop version for the plugin 4631 * @private 4632 */ 4633 4634 }, { 4635 key: "_killswitch", 4636 value: function _killswitch() { 4637 return; 4638 } 4639 /** 4640 * Calls necessary functions to update Equalizer upon DOM change 4641 * @private 4642 */ 4643 4644 }, { 4645 key: "_reflow", 4646 value: function _reflow() { 4647 if (!this.options.equalizeOnStack) { 4648 if (this._isStacked()) { 4649 this.$watched.css('height', 'auto'); 4650 return false; 4651 } 4652 } 4653 4654 if (this.options.equalizeByRow) { 4655 this.getHeightsByRow(this.applyHeightByRow.bind(this)); 4656 } else { 4657 this.getHeights(this.applyHeight.bind(this)); 4658 } 4659 } 4660 /** 4661 * Manually determines if the first 2 elements are *NOT* stacked. 4662 * @private 4663 */ 4664 4665 }, { 4666 key: "_isStacked", 4667 value: function _isStacked() { 4668 if (!this.$watched[0] || !this.$watched[1]) { 4669 return true; 4670 } 4671 4672 return this.$watched[0].getBoundingClientRect().top !== this.$watched[1].getBoundingClientRect().top; 4673 } 4674 /** 4675 * Finds the outer heights of children contained within an Equalizer parent and returns them in an array 4676 * @param {Function} cb - A non-optional callback to return the heights array to. 4677 * @returns {Array} heights - An array of heights of children within Equalizer container 4678 */ 4679 4680 }, { 4681 key: "getHeights", 4682 value: function getHeights(cb) { 4683 var heights = []; 4684 4685 for (var i = 0, len = this.$watched.length; i < len; i++) { 4686 this.$watched[i].style.height = 'auto'; 4687 heights.push(this.$watched[i].offsetHeight); 4688 } 4689 4690 cb(heights); 4691 } 4692 /** 4693 * Finds the outer heights of children contained within an Equalizer parent and returns them in an array 4694 * @param {Function} cb - A non-optional callback to return the heights array to. 4695 * @returns {Array} groups - An array of heights of children within Equalizer container grouped by row with element,height and max as last child 4696 */ 4697 4698 }, { 4699 key: "getHeightsByRow", 4700 value: function getHeightsByRow(cb) { 4701 var lastElTopOffset = this.$watched.length ? this.$watched.first().offset().top : 0, 4702 groups = [], 4703 group = 0; //group by Row 4704 4705 groups[group] = []; 4706 4707 for (var i = 0, len = this.$watched.length; i < len; i++) { 4708 this.$watched[i].style.height = 'auto'; //maybe could use this.$watched[i].offsetTop 4709 4710 var elOffsetTop = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this.$watched[i]).offset().top; 4711 4712 if (elOffsetTop != lastElTopOffset) { 4713 group++; 4714 groups[group] = []; 4715 lastElTopOffset = elOffsetTop; 4716 } 4717 4718 groups[group].push([this.$watched[i], this.$watched[i].offsetHeight]); 4719 } 4720 4721 for (var j = 0, ln = groups.length; j < ln; j++) { 4722 var heights = jquery__WEBPACK_IMPORTED_MODULE_0___default()(groups[j]).map(function () { 4723 return this[1]; 4724 }).get(); 4725 var max = Math.max.apply(null, heights); 4726 groups[j].push(max); 4727 } 4728 4729 cb(groups); 4730 } 4731 /** 4732 * Changes the CSS height property of each child in an Equalizer parent to match the tallest 4733 * @param {array} heights - An array of heights of children within Equalizer container 4734 * @fires Equalizer#preequalized 4735 * @fires Equalizer#postequalized 4736 */ 4737 4738 }, { 4739 key: "applyHeight", 4740 value: function applyHeight(heights) { 4741 var max = Math.max.apply(null, heights); 4742 /** 4743 * Fires before the heights are applied 4744 * @event Equalizer#preequalized 4745 */ 4746 4747 this.$element.trigger('preequalized.zf.equalizer'); 4748 this.$watched.css('height', max); 4749 /** 4750 * Fires when the heights have been applied 4751 * @event Equalizer#postequalized 4752 */ 4753 4754 this.$element.trigger('postequalized.zf.equalizer'); 4755 } 4756 /** 4757 * Changes the CSS height property of each child in an Equalizer parent to match the tallest by row 4758 * @param {array} groups - An array of heights of children within Equalizer container grouped by row with element,height and max as last child 4759 * @fires Equalizer#preequalized 4760 * @fires Equalizer#preequalizedrow 4761 * @fires Equalizer#postequalizedrow 4762 * @fires Equalizer#postequalized 4763 */ 4764 4765 }, { 4766 key: "applyHeightByRow", 4767 value: function applyHeightByRow(groups) { 4768 /** 4769 * Fires before the heights are applied 4770 */ 4771 this.$element.trigger('preequalized.zf.equalizer'); 4772 4773 for (var i = 0, len = groups.length; i < len; i++) { 4774 var groupsILength = groups[i].length, 4775 max = groups[i][groupsILength - 1]; 4776 4777 if (groupsILength <= 2) { 4778 jquery__WEBPACK_IMPORTED_MODULE_0___default()(groups[i][0][0]).css({ 4779 'height': 'auto' 4780 }); 4781 continue; 4782 } 4783 /** 4784 * Fires before the heights per row are applied 4785 * @event Equalizer#preequalizedrow 4786 */ 4787 4788 4789 this.$element.trigger('preequalizedrow.zf.equalizer'); 4790 4791 for (var j = 0, lenJ = groupsILength - 1; j < lenJ; j++) { 4792 jquery__WEBPACK_IMPORTED_MODULE_0___default()(groups[i][j][0]).css({ 4793 'height': max 4794 }); 4795 } 4796 /** 4797 * Fires when the heights per row have been applied 4798 * @event Equalizer#postequalizedrow 4799 */ 4800 4801 4802 this.$element.trigger('postequalizedrow.zf.equalizer'); 4803 } 4804 /** 4805 * Fires when the heights have been applied 4806 */ 4807 4808 4809 this.$element.trigger('postequalized.zf.equalizer'); 4810 } 4811 /** 4812 * Destroys an instance of Equalizer. 4813 * @function 4814 */ 4815 4816 }, { 4817 key: "_destroy", 4818 value: function _destroy() { 4819 this._pauseEvents(); 4820 4821 this.$watched.css('height', 'auto'); 4822 } 4823 }]); 4824 4825 return Equalizer; 4826}(_foundation_plugin__WEBPACK_IMPORTED_MODULE_4__["Plugin"]); 4827/** 4828 * Default settings for plugin 4829 */ 4830 4831 4832Equalizer.defaults = { 4833 /** 4834 * Enable height equalization when stacked on smaller screens. 4835 * @option 4836 * @type {boolean} 4837 * @default false 4838 */ 4839 equalizeOnStack: false, 4840 4841 /** 4842 * Enable height equalization row by row. 4843 * @option 4844 * @type {boolean} 4845 * @default false 4846 */ 4847 equalizeByRow: false, 4848 4849 /** 4850 * String representing the minimum breakpoint size the plugin should equalize heights on. 4851 * @option 4852 * @type {string} 4853 * @default '' 4854 */ 4855 equalizeOn: '' 4856}; 4857 4858 4859/***/ }), 4860
vendor: 10,602 bytes, lines 4861-5137
4861/***/ "./node_modules/foundation-sites/js/foundation.interchange.js": 4862/*!********************************************************************!*\ 4863 !*** ./node_modules/foundation-sites/js/foundation.interchange.js ***! 4864 \********************************************************************/ 4865/*! exports provided: Interchange */ 4866/***/ (function(module, __webpack_exports__, __webpack_require__) { 4867 4868"use strict"; 4869__webpack_require__.r(__webpack_exports__); 4870/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Interchange", function() { return Interchange; }); 4871/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"); 4872/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 4873/* harmony import */ var _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.util.mediaQuery */ "./node_modules/foundation-sites/js/foundation.util.mediaQuery.js"); 4874/* harmony import */ var _foundation_plugin__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation.plugin */ "./node_modules/foundation-sites/js/foundation.plugin.js"); 4875/* harmony import */ var _foundation_util_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./foundation.util.core */ "./node_modules/foundation-sites/js/foundation.util.core.js"); 4876 4877 4878function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 4879 4880function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 4881 4882function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 4883 4884function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } 4885 4886function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } 4887 4888function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } 4889 4890function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } 4891 4892function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } 4893 4894function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } 4895 4896 4897 4898 4899 4900/** 4901 * Interchange module. 4902 * @module foundation.interchange 4903 * @requires foundation.util.mediaQuery 4904 */ 4905 4906var Interchange = 4907/*#__PURE__*/ 4908function (_Plugin) { 4909 _inherits(Interchange, _Plugin); 4910 4911 function Interchange() { 4912 _classCallCheck(this, Interchange); 4913 4914 return _possibleConstructorReturn(this, _getPrototypeOf(Interchange).apply(this, arguments)); 4915 } 4916 4917 _createClass(Interchange, [{ 4918 key: "_setup", 4919 4920 /** 4921 * Creates a new instance of Interchange. 4922 * @class 4923 * @name Interchange 4924 * @fires Interchange#init 4925 * @param {Object} element - jQuery object to add the trigger to. 4926 * @param {Object} options - Overrides to the default plugin settings. 4927 */ 4928 value: function _setup(element, options) { 4929 this.$element = element; 4930 this.options = jquery__WEBPACK_IMPORTED_MODULE_0___default.a.extend({}, Interchange.defaults, options); 4931 this.rules = []; 4932 this.currentPath = ''; 4933 this.className = 'Interchange'; // ie9 back compat 4934 4935 this._init(); 4936 4937 this._events(); 4938 } 4939 /** 4940 * Initializes the Interchange plugin and calls functions to get interchange functioning on load. 4941 * @function 4942 * @private 4943 */ 4944 4945 }, { 4946 key: "_init", 4947 value: function _init() { 4948 _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_1__["MediaQuery"]._init(); 4949 4950 var id = this.$element[0].id || Object(_foundation_util_core__WEBPACK_IMPORTED_MODULE_3__["GetYoDigits"])(6, 'interchange'); 4951 this.$element.attr({ 4952 'data-resize': id, 4953 'id': id 4954 }); 4955 4956 this._addBreakpoints(); 4957 4958 this._generateRules(); 4959 4960 this._reflow(); 4961 } 4962 /** 4963 * Initializes events for Interchange. 4964 * @function 4965 * @private 4966 */ 4967 4968 }, { 4969 key: "_events", 4970 value: function _events() { 4971 var _this2 = this; 4972 4973 this.$element.off('resizeme.zf.trigger').on('resizeme.zf.trigger', function () { 4974 return _this2._reflow(); 4975 }); 4976 } 4977 /** 4978 * Calls necessary functions to update Interchange upon DOM change 4979 * @function 4980 * @private 4981 */ 4982 4983 }, { 4984 key: "_reflow", 4985 value: function _reflow() { 4986 var match; // Iterate through each rule, but only save the last match 4987 4988 for (var i in this.rules) { 4989 if (this.rules.hasOwnProperty(i)) { 4990 var rule = this.rules[i]; 4991 4992 if (window.matchMedia(rule.query).matches) { 4993 match = rule; 4994 } 4995 } 4996 } 4997 4998 if (match) { 4999 this.replace(match.path); 5000 } 5001 } 5002 /** 5003 * Gets the Foundation breakpoints and adds them to the Interchange.SPECIAL_QUERIES object. 5004 * @function 5005 * @private 5006 */ 5007 5008 }, { 5009 key: "_addBreakpoints", 5010 value: function _addBreakpoints() { 5011 for (var i in _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_1__["MediaQuery"].queries) { 5012 if (_foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_1__["MediaQuery"].queries.hasOwnProperty(i)) { 5013 var query = _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_1__["MediaQuery"].queries[i]; 5014 Interchange.SPECIAL_QUERIES[query.name] = query.value; 5015 } 5016 } 5017 } 5018 /** 5019 * Checks the Interchange element for the provided media query + content pairings 5020 * @function 5021 * @private 5022 * @param {Object} element - jQuery object that is an Interchange instance 5023 * @returns {Array} scenarios - Array of objects that have 'mq' and 'path' keys with corresponding keys 5024 */ 5025 5026 }, { 5027 key: "_generateRules", 5028 value: function _generateRules(element) { 5029 var rulesList = []; 5030 var rules; 5031 5032 if (this.options.rules) { 5033 rules = this.options.rules; 5034 } else { 5035 rules = this.$element.data('interchange'); 5036 } 5037 5038 rules = typeof rules === 'string' ? rules.match(/\[.*?\]/g) : rules; 5039 5040 for (var i in rules) { 5041 if (rules.hasOwnProperty(i)) { 5042 var rule = rules[i].slice(1, -1).split(', '); 5043 var path = rule.slice(0, -1).join(''); 5044 var query = rule[rule.length - 1]; 5045 5046 if (Interchange.SPECIAL_QUERIES[query]) { 5047 query = Interchange.SPECIAL_QUERIES[query]; 5048 } 5049 5050 rulesList.push({ 5051 path: path, 5052 query: query 5053 }); 5054 } 5055 } 5056 5057 this.rules = rulesList; 5058 } 5059 /** 5060 * Update the `src` property of an image, or change the HTML of a container, to the specified path. 5061 * @function 5062 * @param {String} path - Path to the image or HTML partial. 5063 * @fires Interchange#replaced 5064 */ 5065 5066 }, { 5067 key: "replace", 5068 value: function replace(path) { 5069 if (this.currentPath === path) return; 5070 5071 var _this = this, 5072 trigger = 'replaced.zf.interchange'; // Replacing images 5073 5074 5075 if (this.$element[0].nodeName === 'IMG') { 5076 this.$element.attr('src', path).on('load', function () { 5077 _this.currentPath = path; 5078 }).trigger(trigger); 5079 } // Replacing background images 5080 else if (path.match(/\.(gif|jpg|jpeg|png|svg|tiff)([?#].*)?/i)) { 5081 path = path.replace(/\(/g, '%28').replace(/\)/g, '%29'); 5082 this.$element.css({ 5083 'background-image': 'url(' + path + ')' 5084 }).trigger(trigger); 5085 } // Replacing HTML 5086 else { 5087 jquery__WEBPACK_IMPORTED_MODULE_0___default.a.get(path, function (response) { 5088 _this.$element.html(response).trigger(trigger); 5089 5090 jquery__WEBPACK_IMPORTED_MODULE_0___default()(response).foundation(); 5091 _this.currentPath = path; 5092 }); 5093 } 5094 /** 5095 * Fires when content in an Interchange element is done being loaded. 5096 * @event Interchange#replaced 5097 */ 5098 // this.$element.trigger('replaced.zf.interchange'); 5099 5100 } 5101 /** 5102 * Destroys an instance of interchange. 5103 * @function 5104 */ 5105 5106 }, { 5107 key: "_destroy", 5108 value: function _destroy() { 5109 this.$element.off('resizeme.zf.trigger'); 5110 } 5111 }]); 5112 5113 return Interchange; 5114}(_foundation_plugin__WEBPACK_IMPORTED_MODULE_2__["Plugin"]); 5115/** 5116 * Default settings for plugin 5117 */ 5118 5119 5120Interchange.defaults = { 5121 /** 5122 * Rules to be applied to Interchange elements. Set with the `data-interchange` array notation. 5123 * @option 5124 * @type {?array} 5125 * @default null 5126 */ 5127 rules: null 5128}; 5129Interchange.SPECIAL_QUERIES = { 5130 'landscape': 'screen and (orientation: landscape)', 5131 'portrait': 'screen and (orientation: portrait)', 5132 'retina': 'only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx)' 5133}; 5134 5135 5136/***/ }), 5137
vendor: 12,403 bytes, lines 5138-5484
5138/***/ "./node_modules/foundation-sites/js/foundation.magellan.js": 5139/*!*****************************************************************!*\ 5140 !*** ./node_modules/foundation-sites/js/foundation.magellan.js ***! 5141 \*****************************************************************/ 5142/*! exports provided: Magellan */ 5143/***/ (function(module, __webpack_exports__, __webpack_require__) { 5144 5145"use strict"; 5146__webpack_require__.r(__webpack_exports__); 5147/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Magellan", function() { return Magellan; }); 5148/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"); 5149/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 5150/* harmony import */ var _foundation_util_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.util.core */ "./node_modules/foundation-sites/js/foundation.util.core.js"); 5151/* harmony import */ var _foundation_plugin__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation.plugin */ "./node_modules/foundation-sites/js/foundation.plugin.js"); 5152/* harmony import */ var _foundation_smoothScroll__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./foundation.smoothScroll */ "./node_modules/foundation-sites/js/foundation.smoothScroll.js"); 5153 5154 5155function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 5156 5157function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 5158 5159function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 5160 5161function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } 5162 5163function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } 5164 5165function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } 5166 5167function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } 5168 5169function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } 5170 5171function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } 5172 5173 5174 5175 5176 5177/** 5178 * Magellan module. 5179 * @module foundation.magellan 5180 * @requires foundation.smoothScroll 5181 */ 5182 5183var Magellan = 5184/*#__PURE__*/ 5185function (_Plugin) { 5186 _inherits(Magellan, _Plugin); 5187 5188 function Magellan() { 5189 _classCallCheck(this, Magellan); 5190 5191 return _possibleConstructorReturn(this, _getPrototypeOf(Magellan).apply(this, arguments)); 5192 } 5193 5194 _createClass(Magellan, [{ 5195 key: "_setup", 5196 5197 /** 5198 * Creates a new instance of Magellan. 5199 * @class 5200 * @name Magellan 5201 * @fires Magellan#init 5202 * @param {Object} element - jQuery object to add the trigger to. 5203 * @param {Object} options - Overrides to the default plugin settings. 5204 */ 5205 value: function _setup(element, options) { 5206 this.$element = element; 5207 this.options = jquery__WEBPACK_IMPORTED_MODULE_0___default.a.extend({}, Magellan.defaults, this.$element.data(), options); 5208 this.className = 'Magellan'; // ie9 back compat 5209 5210 this._init(); 5211 5212 this.calcPoints(); 5213 } 5214 /** 5215 * Initializes the Magellan plugin and calls functions to get equalizer functioning on load. 5216 * @private 5217 */ 5218 5219 }, { 5220 key: "_init", 5221 value: function _init() { 5222 var id = this.$element[0].id || Object(_foundation_util_core__WEBPACK_IMPORTED_MODULE_1__["GetYoDigits"])(6, 'magellan'); 5223 5224 var _this = this; 5225 5226 this.$targets = jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-magellan-target]'); 5227 this.$links = this.$element.find('a'); 5228 this.$element.attr({ 5229 'data-resize': id, 5230 'data-scroll': id, 5231 'id': id 5232 }); 5233 this.$active = jquery__WEBPACK_IMPORTED_MODULE_0___default()(); 5234 this.scrollPos = parseInt(window.pageYOffset, 10); 5235 5236 this._events(); 5237 } 5238 /** 5239 * Calculates an array of pixel values that are the demarcation lines between locations on the page. 5240 * Can be invoked if new elements are added or the size of a location changes. 5241 * @function 5242 */ 5243 5244 }, { 5245 key: "calcPoints", 5246 value: function calcPoints() { 5247 var _this = this, 5248 body = document.body, 5249 html = document.documentElement; 5250 5251 this.points = []; 5252 this.winHeight = Math.round(Math.max(window.innerHeight, html.clientHeight)); 5253 this.docHeight = Math.round(Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight)); 5254 this.$targets.each(function () { 5255 var $tar = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), 5256 pt = Math.round($tar.offset().top - _this.options.threshold); 5257 $tar.targetPoint = pt; 5258 5259 _this.points.push(pt); 5260 }); 5261 } 5262 /** 5263 * Initializes events for Magellan. 5264 * @private 5265 */ 5266 5267 }, { 5268 key: "_events", 5269 value: function _events() { 5270 var _this = this, 5271 $body = jquery__WEBPACK_IMPORTED_MODULE_0___default()('html, body'), 5272 opts = { 5273 duration: _this.options.animationDuration, 5274 easing: _this.options.animationEasing 5275 }; 5276 5277 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).one('load', function () { 5278 if (_this.options.deepLinking) { 5279 if (location.hash) { 5280 _this.scrollToLoc(location.hash); 5281 } 5282 } 5283 5284 _this.calcPoints(); 5285 5286 _this._updateActive(); 5287 }); 5288 this.$element.on({ 5289 'resizeme.zf.trigger': this.reflow.bind(this), 5290 'scrollme.zf.trigger': this._updateActive.bind(this) 5291 }).on('click.zf.magellan', 'a[href^="#"]', function (e) { 5292 e.preventDefault(); 5293 var arrival = this.getAttribute('href'); 5294 5295 _this.scrollToLoc(arrival); 5296 }); 5297 5298 this._deepLinkScroll = function (e) { 5299 if (_this.options.deepLinking) { 5300 _this.scrollToLoc(window.location.hash); 5301 } 5302 }; 5303 5304 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).on('popstate', this._deepLinkScroll); 5305 } 5306 /** 5307 * Function to scroll to a given location on the page. 5308 * @param {String} loc - a properly formatted jQuery id selector. Example: '#foo' 5309 * @function 5310 */ 5311 5312 }, { 5313 key: "scrollToLoc", 5314 value: function scrollToLoc(loc) { 5315 this._inTransition = true; 5316 5317 var _this = this; 5318 5319 var options = { 5320 animationEasing: this.options.animationEasing, 5321 animationDuration: this.options.animationDuration, 5322 threshold: this.options.threshold, 5323 offset: this.options.offset 5324 }; 5325 _foundation_smoothScroll__WEBPACK_IMPORTED_MODULE_3__["SmoothScroll"].scrollToLoc(loc, options, function () { 5326 _this._inTransition = false; 5327 5328 _this._updateActive(); 5329 }); 5330 } 5331 /** 5332 * Calls necessary functions to update Magellan upon DOM change 5333 * @function 5334 */ 5335 5336 }, { 5337 key: "reflow", 5338 value: function reflow() { 5339 this.calcPoints(); 5340 5341 this._updateActive(); 5342 } 5343 /** 5344 * Updates the visibility of an active location link, and updates the url hash for the page, if deepLinking enabled. 5345 * @private 5346 * @function 5347 * @fires Magellan#update 5348 */ 5349 5350 }, { 5351 key: "_updateActive", 5352 value: function _updateActive() 5353 /*evt, elem, scrollPos*/ 5354 { 5355 if (this._inTransition) { 5356 return; 5357 } 5358 5359 var winPos = 5360 /*scrollPos ||*/ 5361 parseInt(window.pageYOffset, 10), 5362 curIdx; 5363 5364 if (winPos + this.winHeight === this.docHeight) { 5365 curIdx = this.points.length - 1; 5366 } else if (winPos < this.points[0]) { 5367 curIdx = undefined; 5368 } else { 5369 var isDown = this.scrollPos < winPos, 5370 _this = this, 5371 curVisible = this.points.filter(function (p, i) { 5372 return isDown ? p - _this.options.offset <= winPos : p - _this.options.offset - _this.options.threshold <= winPos; 5373 }); 5374 5375 curIdx = curVisible.length ? curVisible.length - 1 : 0; 5376 } 5377 5378 this.$active.removeClass(this.options.activeClass); 5379 this.$active = this.$links.filter('[href="#' + this.$targets.eq(curIdx).data('magellan-target') + '"]').addClass(this.options.activeClass); 5380 5381 if (this.options.deepLinking) { 5382 var hash = ""; 5383 5384 if (curIdx != undefined) { 5385 hash = this.$active[0].getAttribute('href'); 5386 } 5387 5388 if (hash !== window.location.hash) { 5389 if (window.history.pushState) { 5390 window.history.pushState(null, null, hash); 5391 } else { 5392 window.location.hash = hash; 5393 } 5394 } 5395 } 5396 5397 this.scrollPos = winPos; 5398 /** 5399 * Fires when magellan is finished updating to the new active element. 5400 * @event Magellan#update 5401 */ 5402 5403 this.$element.trigger('update.zf.magellan', [this.$active]); 5404 } 5405 /** 5406 * Destroys an instance of Magellan and resets the url of the window. 5407 * @function 5408 */ 5409 5410 }, { 5411 key: "_destroy", 5412 value: function _destroy() { 5413 this.$element.off('.zf.trigger .zf.magellan').find(".".concat(this.options.activeClass)).removeClass(this.options.activeClass); 5414 5415 if (this.options.deepLinking) { 5416 var hash = this.$active[0].getAttribute('href'); 5417 window.location.hash.replace(hash, ''); 5418 } 5419 5420 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).off('popstate', this._deepLinkScroll); 5421 } 5422 }]); 5423 5424 return Magellan; 5425}(_foundation_plugin__WEBPACK_IMPORTED_MODULE_2__["Plugin"]); 5426/** 5427 * Default settings for plugin 5428 */ 5429 5430 5431Magellan.defaults = { 5432 /** 5433 * Amount of time, in ms, the animated scrolling should take between locations. 5434 * @option 5435 * @type {number} 5436 * @default 500 5437 */ 5438 animationDuration: 500, 5439 5440 /** 5441 * Animation style to use when scrolling between locations. Can be `'swing'` or `'linear'`. 5442 * @option 5443 * @type {string} 5444 * @default 'linear' 5445 * @see {@link https://api.jquery.com/animate|Jquery animate} 5446 */ 5447 animationEasing: 'linear', 5448 5449 /** 5450 * Number of pixels to use as a marker for location changes. 5451 * @option 5452 * @type {number} 5453 * @default 50 5454 */ 5455 threshold: 50, 5456 5457 /** 5458 * Class applied to the active locations link on the magellan container. 5459 * @option 5460 * @type {string} 5461 * @default 'is-active' 5462 */ 5463 activeClass: 'is-active', 5464 5465 /** 5466 * Allows the script to manipulate the url of the current page, and if supported, alter the history. 5467 * @option 5468 * @type {boolean} 5469 * @default false 5470 */ 5471 deepLinking: false, 5472 5473 /** 5474 * Number of pixels to offset the scroll of the page on item click if using a sticky nav bar. 5475 * @option 5476 * @type {number} 5477 * @default 0 5478 */ 5479 offset: 0 5480}; 5481 5482 5483/***/ }), 5484
vendor: 24,742 bytes, lines 5485-6121
5485/***/ "./node_modules/foundation-sites/js/foundation.offcanvas.js": 5486/*!******************************************************************!*\ 5487 !*** ./node_modules/foundation-sites/js/foundation.offcanvas.js ***! 5488 \******************************************************************/ 5489/*! exports provided: OffCanvas */ 5490/***/ (function(module, __webpack_exports__, __webpack_require__) { 5491 5492"use strict"; 5493__webpack_require__.r(__webpack_exports__); 5494/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OffCanvas", function() { return OffCanvas; }); 5495/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"); 5496/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 5497/* harmony import */ var _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.util.keyboard */ "./node_modules/foundation-sites/js/foundation.util.keyboard.js"); 5498/* harmony import */ var _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation.util.mediaQuery */ "./node_modules/foundation-sites/js/foundation.util.mediaQuery.js"); 5499/* harmony import */ var _foundation_util_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./foundation.util.core */ "./node_modules/foundation-sites/js/foundation.util.core.js"); 5500/* harmony import */ var _foundation_plugin__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./foundation.plugin */ "./node_modules/foundation-sites/js/foundation.plugin.js"); 5501/* harmony import */ var _foundation_util_triggers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./foundation.util.triggers */ "./node_modules/foundation-sites/js/foundation.util.triggers.js"); 5502 5503 5504function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 5505 5506function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 5507 5508function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 5509 5510function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } 5511 5512function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } 5513 5514function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } 5515 5516function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } 5517 5518function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } 5519 5520function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } 5521 5522 5523 5524 5525 5526 5527 5528/** 5529 * OffCanvas module. 5530 * @module foundation.offcanvas 5531 * @requires foundation.util.keyboard 5532 * @requires foundation.util.mediaQuery 5533 * @requires foundation.util.triggers 5534 */ 5535 5536var OffCanvas = 5537/*#__PURE__*/ 5538function (_Plugin) { 5539 _inherits(OffCanvas, _Plugin); 5540 5541 function OffCanvas() { 5542 _classCallCheck(this, OffCanvas); 5543 5544 return _possibleConstructorReturn(this, _getPrototypeOf(OffCanvas).apply(this, arguments)); 5545 } 5546 5547 _createClass(OffCanvas, [{ 5548 key: "_setup", 5549 5550 /** 5551 * Creates a new instance of an off-canvas wrapper. 5552 * @class 5553 * @name OffCanvas 5554 * @fires OffCanvas#init 5555 * @param {Object} element - jQuery object to initialize. 5556 * @param {Object} options - Overrides to the default plugin settings. 5557 */ 5558 value: function _setup(element, options) { 5559 var _this2 = this; 5560 5561 this.className = 'OffCanvas'; // ie9 back compat 5562 5563 this.$element = element; 5564 this.options = jquery__WEBPACK_IMPORTED_MODULE_0___default.a.extend({}, OffCanvas.defaults, this.$element.data(), options); 5565 this.contentClasses = { 5566 base: [], 5567 reveal: [] 5568 }; 5569 this.$lastTrigger = jquery__WEBPACK_IMPORTED_MODULE_0___default()(); 5570 this.$triggers = jquery__WEBPACK_IMPORTED_MODULE_0___default()(); 5571 this.position = 'left'; 5572 this.$content = jquery__WEBPACK_IMPORTED_MODULE_0___default()(); 5573 this.nested = !!this.options.nested; // Defines the CSS transition/position classes of the off-canvas content container. 5574 5575 jquery__WEBPACK_IMPORTED_MODULE_0___default()(['push', 'overlap']).each(function (index, val) { 5576 _this2.contentClasses.base.push('has-transition-' + val); 5577 }); 5578 jquery__WEBPACK_IMPORTED_MODULE_0___default()(['left', 'right', 'top', 'bottom']).each(function (index, val) { 5579 _this2.contentClasses.base.push('has-position-' + val); 5580 5581 _this2.contentClasses.reveal.push('has-reveal-' + val); 5582 }); // Triggers init is idempotent, just need to make sure it is initialized 5583 5584 _foundation_util_triggers__WEBPACK_IMPORTED_MODULE_5__["Triggers"].init(jquery__WEBPACK_IMPORTED_MODULE_0___default.a); 5585 5586 _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_2__["MediaQuery"]._init(); 5587 5588 this._init(); 5589 5590 this._events(); 5591 5592 _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__["Keyboard"].register('OffCanvas', { 5593 'ESCAPE': 'close' 5594 }); 5595 } 5596 /** 5597 * Initializes the off-canvas wrapper by adding the exit overlay (if needed). 5598 * @function 5599 * @private 5600 */ 5601 5602 }, { 5603 key: "_init", 5604 value: function _init() { 5605 var id = this.$element.attr('id'); 5606 this.$element.attr('aria-hidden', 'true'); // Find off-canvas content, either by ID (if specified), by siblings or by closest selector (fallback) 5607 5608 if (this.options.contentId) { 5609 this.$content = jquery__WEBPACK_IMPORTED_MODULE_0___default()('#' + this.options.contentId); 5610 } else if (this.$element.siblings('[data-off-canvas-content]').length) { 5611 this.$content = this.$element.siblings('[data-off-canvas-content]').first(); 5612 } else { 5613 this.$content = this.$element.closest('[data-off-canvas-content]').first(); 5614 } 5615 5616 if (!this.options.contentId) { 5617 // Assume that the off-canvas element is nested if it isn't a sibling of the content 5618 this.nested = this.$element.siblings('[data-off-canvas-content]').length === 0; 5619 } else if (this.options.contentId && this.options.nested === null) { 5620 // Warning if using content ID without setting the nested option 5621 // Once the element is nested it is required to work properly in this case 5622 console.warn('Remember to use the nested option if using the content ID option!'); 5623 } 5624 5625 if (this.nested === true) { 5626 // Force transition overlap if nested 5627 this.options.transition = 'overlap'; // Remove appropriate classes if already assigned in markup 5628 5629 this.$element.removeClass('is-transition-push'); 5630 } 5631 5632 this.$element.addClass("is-transition-".concat(this.options.transition, " is-closed")); // Find triggers that affect this element and add aria-expanded to them 5633 5634 this.$triggers = jquery__WEBPACK_IMPORTED_MODULE_0___default()(document).find('[data-open="' + id + '"], [data-close="' + id + '"], [data-toggle="' + id + '"]').attr('aria-expanded', 'false').attr('aria-controls', id); // Get position by checking for related CSS class 5635 5636 this.position = this.$element.is('.position-left, .position-top, .position-right, .position-bottom') ? this.$element.attr('class').match(/position\-(left|top|right|bottom)/)[1] : this.position; // Add an overlay over the content if necessary 5637 5638 if (this.options.contentOverlay === true) { 5639 var overlay = document.createElement('div'); 5640 var overlayPosition = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this.$element).css("position") === 'fixed' ? 'is-overlay-fixed' : 'is-overlay-absolute'; 5641 overlay.setAttribute('class', 'js-off-canvas-overlay ' + overlayPosition); 5642 this.$overlay = jquery__WEBPACK_IMPORTED_MODULE_0___default()(overlay); 5643 5644 if (overlayPosition === 'is-overlay-fixed') { 5645 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this.$overlay).insertAfter(this.$element); 5646 } else { 5647 this.$content.append(this.$overlay); 5648 } 5649 } 5650 5651 this.options.isRevealed = this.options.isRevealed || new RegExp(this.options.revealClass, 'g').test(this.$element[0].className); 5652 5653 if (this.options.isRevealed === true) { 5654 this.options.revealOn = this.options.revealOn || this.$element[0].className.match(/(reveal-for-medium|reveal-for-large)/g)[0].split('-')[2]; 5655 5656 this._setMQChecker(); 5657 } 5658 5659 if (this.options.transitionTime) { 5660 this.$element.css('transition-duration', this.options.transitionTime); 5661 } // Initally remove all transition/position CSS classes from off-canvas content container. 5662 5663 5664 this._removeContentClasses(); 5665 } 5666 /** 5667 * Adds event handlers to the off-canvas wrapper and the exit overlay. 5668 * @function 5669 * @private 5670 */ 5671 5672 }, { 5673 key: "_events", 5674 value: function _events() { 5675 this.$element.off('.zf.trigger .zf.offcanvas').on({ 5676 'open.zf.trigger': this.open.bind(this), 5677 'close.zf.trigger': this.close.bind(this), 5678 'toggle.zf.trigger': this.toggle.bind(this), 5679 'keydown.zf.offcanvas': this._handleKeyboard.bind(this) 5680 }); 5681 5682 if (this.options.closeOnClick === true) { 5683 var $target = this.options.contentOverlay ? this.$overlay : this.$content; 5684 $target.on({ 5685 'click.zf.offcanvas': this.close.bind(this) 5686 }); 5687 } 5688 } 5689 /** 5690 * Applies event listener for elements that will reveal at certain breakpoints. 5691 * @private 5692 */ 5693 5694 }, { 5695 key: "_setMQChecker", 5696 value: function _setMQChecker() { 5697 var _this = this; 5698 5699 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).on('changed.zf.mediaquery', function () { 5700 if (_foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_2__["MediaQuery"].atLeast(_this.options.revealOn)) { 5701 _this.reveal(true); 5702 } else { 5703 _this.reveal(false); 5704 } 5705 }).one('load.zf.offcanvas', function () { 5706 if (_foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_2__["MediaQuery"].atLeast(_this.options.revealOn)) { 5707 _this.reveal(true); 5708 } 5709 }); 5710 } 5711 /** 5712 * Removes the CSS transition/position classes of the off-canvas content container. 5713 * Removing the classes is important when another off-canvas gets opened that uses the same content container. 5714 * @param {Boolean} hasReveal - true if related off-canvas element is revealed. 5715 * @private 5716 */ 5717 5718 }, { 5719 key: "_removeContentClasses", 5720 value: function _removeContentClasses(hasReveal) { 5721 if (typeof hasReveal !== 'boolean') { 5722 this.$content.removeClass(this.contentClasses.base.join(' ')); 5723 } else if (hasReveal === false) { 5724 this.$content.removeClass("has-reveal-".concat(this.position)); 5725 } 5726 } 5727 /** 5728 * Adds the CSS transition/position classes of the off-canvas content container, based on the opening off-canvas element. 5729 * Beforehand any transition/position class gets removed. 5730 * @param {Boolean} hasReveal - true if related off-canvas element is revealed. 5731 * @private 5732 */ 5733 5734 }, { 5735 key: "_addContentClasses", 5736 value: function _addContentClasses(hasReveal) { 5737 this._removeContentClasses(hasReveal); 5738 5739 if (typeof hasReveal !== 'boolean') { 5740 this.$content.addClass("has-transition-".concat(this.options.transition, " has-position-").concat(this.position)); 5741 } else if (hasReveal === true) { 5742 this.$content.addClass("has-reveal-".concat(this.position)); 5743 } 5744 } 5745 /** 5746 * Handles the revealing/hiding the off-canvas at breakpoints, not the same as open. 5747 * @param {Boolean} isRevealed - true if element should be revealed. 5748 * @function 5749 */ 5750 5751 }, { 5752 key: "reveal", 5753 value: function reveal(isRevealed) { 5754 if (isRevealed) { 5755 this.close(); 5756 this.isRevealed = true; 5757 this.$element.attr('aria-hidden', 'false'); 5758 this.$element.off('open.zf.trigger toggle.zf.trigger'); 5759 this.$element.removeClass('is-closed'); 5760 } else { 5761 this.isRevealed = false; 5762 this.$element.attr('aria-hidden', 'true'); 5763 this.$element.off('open.zf.trigger toggle.zf.trigger').on({ 5764 'open.zf.trigger': this.open.bind(this), 5765 'toggle.zf.trigger': this.toggle.bind(this) 5766 }); 5767 this.$element.addClass('is-closed'); 5768 } 5769 5770 this._addContentClasses(isRevealed); 5771 } 5772 /** 5773 * Stops scrolling of the body when offcanvas is open on mobile Safari and other troublesome browsers. 5774 * @private 5775 */ 5776 5777 }, { 5778 key: "_stopScrolling", 5779 value: function _stopScrolling(event) { 5780 return false; 5781 } // Taken and adapted from http://stackoverflow.com/questions/16889447/prevent-full-page-scrolling-ios 5782 // Only really works for y, not sure how to extend to x or if we need to. 5783 5784 }, { 5785 key: "_recordScrollable", 5786 value: function _recordScrollable(event) { 5787 var elem = this; // called from event handler context with this as elem 5788 // If the element is scrollable (content overflows), then... 5789 5790 if (elem.scrollHeight !== elem.clientHeight) { 5791 // If we're at the top, scroll down one pixel to allow scrolling up 5792 if (elem.scrollTop === 0) { 5793 elem.scrollTop = 1; 5794 } // If we're at the bottom, scroll up one pixel to allow scrolling down 5795 5796 5797 if (elem.scrollTop === elem.scrollHeight - elem.clientHeight) { 5798 elem.scrollTop = elem.scrollHeight - elem.clientHeight - 1; 5799 } 5800 } 5801 5802 elem.allowUp = elem.scrollTop > 0; 5803 elem.allowDown = elem.scrollTop < elem.scrollHeight - elem.clientHeight; 5804 elem.lastY = event.originalEvent.pageY; 5805 } 5806 }, { 5807 key: "_stopScrollPropagation", 5808 value: function _stopScrollPropagation(event) { 5809 var elem = this; // called from event handler context with this as elem 5810 5811 var up = event.pageY < elem.lastY; 5812 var down = !up; 5813 elem.lastY = event.pageY; 5814 5815 if (up && elem.allowUp || down && elem.allowDown) { 5816 event.stopPropagation(); 5817 } else { 5818 event.preventDefault(); 5819 } 5820 } 5821 /** 5822 * Opens the off-canvas menu. 5823 * @function 5824 * @param {Object} event - Event object passed from listener. 5825 * @param {jQuery} trigger - element that triggered the off-canvas to open. 5826 * @fires OffCanvas#opened 5827 */ 5828 5829 }, { 5830 key: "open", 5831 value: function open(event, trigger) { 5832 if (this.$element.hasClass('is-open') || this.isRevealed) { 5833 return; 5834 } 5835 5836 var _this = this; 5837 5838 if (trigger) { 5839 this.$lastTrigger = trigger; 5840 } 5841 5842 if (this.options.forceTo === 'top') { 5843 window.scrollTo(0, 0); 5844 } else if (this.options.forceTo === 'bottom') { 5845 window.scrollTo(0, document.body.scrollHeight); 5846 } 5847 5848 if (this.options.transitionTime && this.options.transition !== 'overlap') { 5849 this.$element.siblings('[data-off-canvas-content]').css('transition-duration', this.options.transitionTime); 5850 } else { 5851 this.$element.siblings('[data-off-canvas-content]').css('transition-duration', ''); 5852 } 5853 /** 5854 * Fires when the off-canvas menu opens. 5855 * @event OffCanvas#opened 5856 */ 5857 5858 5859 this.$element.addClass('is-open').removeClass('is-closed'); 5860 this.$triggers.attr('aria-expanded', 'true'); 5861 this.$element.attr('aria-hidden', 'false').trigger('opened.zf.offcanvas'); 5862 this.$content.addClass('is-open-' + this.position); // If `contentScroll` is set to false, add class and disable scrolling on touch devices. 5863 5864 if (this.options.contentScroll === false) { 5865 jquery__WEBPACK_IMPORTED_MODULE_0___default()('body').addClass('is-off-canvas-open').on('touchmove', this._stopScrolling); 5866 this.$element.on('touchstart', this._recordScrollable); 5867 this.$element.on('touchmove', this._stopScrollPropagation); 5868 } 5869 5870 if (this.options.contentOverlay === true) { 5871 this.$overlay.addClass('is-visible'); 5872 } 5873 5874 if (this.options.closeOnClick === true && this.options.contentOverlay === true) { 5875 this.$overlay.addClass('is-closable'); 5876 } 5877 5878 if (this.options.autoFocus === true) { 5879 this.$element.one(Object(_foundation_util_core__WEBPACK_IMPORTED_MODULE_3__["transitionend"])(this.$element), function () { 5880 if (!_this.$element.hasClass('is-open')) { 5881 return; // exit if prematurely closed 5882 } 5883 5884 var canvasFocus = _this.$element.find('[data-autofocus]'); 5885 5886 if (canvasFocus.length) { 5887 canvasFocus.eq(0).focus(); 5888 } else { 5889 _this.$element.find('a, button').eq(0).focus(); 5890 } 5891 }); 5892 } 5893 5894 if (this.options.trapFocus === true) { 5895 this.$content.attr('tabindex', '-1'); 5896 _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__["Keyboard"].trapFocus(this.$element); 5897 } 5898 5899 this._addContentClasses(); 5900 } 5901 /** 5902 * Closes the off-canvas menu. 5903 * @function 5904 * @param {Function} cb - optional cb to fire after closure. 5905 * @fires OffCanvas#closed 5906 */ 5907 5908 }, { 5909 key: "close", 5910 value: function close(cb) { 5911 if (!this.$element.hasClass('is-open') || this.isRevealed) { 5912 return; 5913 } 5914 5915 var _this = this; 5916 5917 this.$element.removeClass('is-open'); 5918 this.$element.attr('aria-hidden', 'true') 5919 /** 5920 * Fires when the off-canvas menu opens. 5921 * @event OffCanvas#closed 5922 */ 5923 .trigger('closed.zf.offcanvas'); 5924 this.$content.removeClass('is-open-left is-open-top is-open-right is-open-bottom'); // If `contentScroll` is set to false, remove class and re-enable scrolling on touch devices. 5925 5926 if (this.options.contentScroll === false) { 5927 jquery__WEBPACK_IMPORTED_MODULE_0___default()('body').removeClass('is-off-canvas-open').off('touchmove', this._stopScrolling); 5928 this.$element.off('touchstart', this._recordScrollable); 5929 this.$element.off('touchmove', this._stopScrollPropagation); 5930 } 5931 5932 if (this.options.contentOverlay === true) { 5933 this.$overlay.removeClass('is-visible'); 5934 } 5935 5936 if (this.options.closeOnClick === true && this.options.contentOverlay === true) { 5937 this.$overlay.removeClass('is-closable'); 5938 } 5939 5940 this.$triggers.attr('aria-expanded', 'false'); 5941 5942 if (this.options.trapFocus === true) { 5943 this.$content.removeAttr('tabindex'); 5944 _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__["Keyboard"].releaseFocus(this.$element); 5945 } // Listen to transitionEnd and add class when done. 5946 5947 5948 this.$element.one(Object(_foundation_util_core__WEBPACK_IMPORTED_MODULE_3__["transitionend"])(this.$element), function (e) { 5949 _this.$element.addClass('is-closed'); 5950 5951 _this._removeContentClasses(); 5952 }); 5953 } 5954 /** 5955 * Toggles the off-canvas menu open or closed. 5956 * @function 5957 * @param {Object} event - Event object passed from listener. 5958 * @param {jQuery} trigger - element that triggered the off-canvas to open. 5959 */ 5960 5961 }, { 5962 key: "toggle", 5963 value: function toggle(event, trigger) { 5964 if (this.$element.hasClass('is-open')) { 5965 this.close(event, trigger); 5966 } else { 5967 this.open(event, trigger); 5968 } 5969 } 5970 /** 5971 * Handles keyboard input when detected. When the escape key is pressed, the off-canvas menu closes, and focus is restored to the element that opened the menu. 5972 * @function 5973 * @private 5974 */ 5975 5976 }, { 5977 key: "_handleKeyboard", 5978 value: function _handleKeyboard(e) { 5979 var _this3 = this; 5980 5981 _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__["Keyboard"].handleKey(e, 'OffCanvas', { 5982 close: function close() { 5983 _this3.close(); 5984 5985 _this3.$lastTrigger.focus(); 5986 5987 return true; 5988 }, 5989 handled: function handled() { 5990 e.stopPropagation(); 5991 e.preventDefault(); 5992 } 5993 }); 5994 } 5995 /** 5996 * Destroys the offcanvas plugin. 5997 * @function 5998 */ 5999 6000 }, { 6001 key: "_destroy", 6002 value: function _destroy() { 6003 this.close(); 6004 this.$element.off('.zf.trigger .zf.offcanvas'); 6005 this.$overlay.off('.zf.offcanvas'); 6006 } 6007 }]); 6008 6009 return OffCanvas; 6010}(_foundation_plugin__WEBPACK_IMPORTED_MODULE_4__["Plugin"]); 6011 6012OffCanvas.defaults = { 6013 /** 6014 * Allow the user to click outside of the menu to close it. 6015 * @option 6016 * @type {boolean} 6017 * @default true 6018 */ 6019 closeOnClick: true, 6020 6021 /** 6022 * Adds an overlay on top of `[data-off-canvas-content]`. 6023 * @option 6024 * @type {boolean} 6025 * @default true 6026 */ 6027 contentOverlay: true, 6028 6029 /** 6030 * Target an off-canvas content container by ID that may be placed anywhere. If null the closest content container will be taken. 6031 * @option 6032 * @type {?string} 6033 * @default null 6034 */ 6035 contentId: null, 6036 6037 /** 6038 * Define the off-canvas element is nested in an off-canvas content. This is required when using the contentId option for a nested element. 6039 * @option 6040 * @type {boolean} 6041 * @default null 6042 */ 6043 nested: null, 6044 6045 /** 6046 * Enable/disable scrolling of the main content when an off canvas panel is open. 6047 * @option 6048 * @type {boolean} 6049 * @default true 6050 */ 6051 contentScroll: true, 6052 6053 /** 6054 * Amount of time in ms the open and close transition requires. If none selected, pulls from body style. 6055 * @option 6056 * @type {number} 6057 * @default null 6058 */ 6059 transitionTime: null, 6060 6061 /** 6062 * Type of transition for the offcanvas menu. Options are 'push', 'detached' or 'slide'. 6063 * @option 6064 * @type {string} 6065 * @default push 6066 */ 6067 transition: 'push', 6068 6069 /** 6070 * Force the page to scroll to top or bottom on open. 6071 * @option 6072 * @type {?string} 6073 * @default null 6074 */ 6075 forceTo: null, 6076 6077 /** 6078 * Allow the offcanvas to remain open for certain breakpoints. 6079 * @option 6080 * @type {boolean} 6081 * @default false 6082 */ 6083 isRevealed: false, 6084 6085 /** 6086 * Breakpoint at which to reveal. JS will use a RegExp to target standard classes, if changing classnames, pass your class with the `revealClass` option. 6087 * @option 6088 * @type {?string} 6089 * @default null 6090 */ 6091 revealOn: null, 6092 6093 /** 6094 * Force focus to the offcanvas on open. If true, will focus the opening trigger on close. 6095 * @option 6096 * @type {boolean} 6097 * @default true 6098 */ 6099 autoFocus: true, 6100 6101 /** 6102 * Class used to force an offcanvas to remain open. Foundation defaults for this are `reveal-for-large` & `reveal-for-medium`. 6103 * @option 6104 * @type {string} 6105 * @default reveal-for- 6106 * @todo improve the regex testing for this. 6107 */ 6108 revealClass: 'reveal-for-', 6109 6110 /** 6111 * Triggers optional focus trapping when opening an offcanvas. Sets tabindex of [data-off-canvas-content] to -1 for accessibility purposes. 6112 * @option 6113 * @type {boolean} 6114 * @default false 6115 */ 6116 trapFocus: false 6117}; 6118 6119 6120/***/ }), 6121
vendor: 22,690 bytes, lines 6122-6768
6122/***/ "./node_modules/foundation-sites/js/foundation.orbit.js": 6123/*!**************************************************************!*\ 6124 !*** ./node_modules/foundation-sites/js/foundation.orbit.js ***! 6125 \**************************************************************/ 6126/*! exports provided: Orbit */ 6127/***/ (function(module, __webpack_exports__, __webpack_require__) { 6128 6129"use strict"; 6130__webpack_require__.r(__webpack_exports__); 6131/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Orbit", function() { return Orbit; }); 6132/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"); 6133/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 6134/* harmony import */ var _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.util.keyboard */ "./node_modules/foundation-sites/js/foundation.util.keyboard.js"); 6135/* harmony import */ var _foundation_util_motion__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation.util.motion */ "./node_modules/foundation-sites/js/foundation.util.motion.js"); 6136/* harmony import */ var _foundation_util_timer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./foundation.util.timer */ "./node_modules/foundation-sites/js/foundation.util.timer.js"); 6137/* harmony import */ var _foundation_util_imageLoader__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./foundation.util.imageLoader */ "./node_modules/foundation-sites/js/foundation.util.imageLoader.js"); 6138/* harmony import */ var _foundation_util_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./foundation.util.core */ "./node_modules/foundation-sites/js/foundation.util.core.js"); 6139/* harmony import */ var _foundation_plugin__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./foundation.plugin */ "./node_modules/foundation-sites/js/foundation.plugin.js"); 6140/* harmony import */ var _foundation_util_touch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./foundation.util.touch */ "./node_modules/foundation-sites/js/foundation.util.touch.js"); 6141 6142 6143function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 6144 6145function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 6146 6147function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 6148 6149function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } 6150 6151function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } 6152 6153function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } 6154 6155function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } 6156 6157function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } 6158 6159function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169/** 6170 * Orbit module. 6171 * @module foundation.orbit 6172 * @requires foundation.util.keyboard 6173 * @requires foundation.util.motion 6174 * @requires foundation.util.timer 6175 * @requires foundation.util.imageLoader 6176 * @requires foundation.util.touch 6177 */ 6178 6179var Orbit = 6180/*#__PURE__*/ 6181function (_Plugin) { 6182 _inherits(Orbit, _Plugin); 6183 6184 function Orbit() { 6185 _classCallCheck(this, Orbit); 6186 6187 return _possibleConstructorReturn(this, _getPrototypeOf(Orbit).apply(this, arguments)); 6188 } 6189 6190 _createClass(Orbit, [{ 6191 key: "_setup", 6192 6193 /** 6194 * Creates a new instance of an orbit carousel. 6195 * @class 6196 * @name Orbit 6197 * @param {jQuery} element - jQuery object to make into an Orbit Carousel. 6198 * @param {Object} options - Overrides to the default plugin settings. 6199 */ 6200 value: function _setup(element, options) { 6201 this.$element = element; 6202 this.options = jquery__WEBPACK_IMPORTED_MODULE_0___default.a.extend({}, Orbit.defaults, this.$element.data(), options); 6203 this.className = 'Orbit'; // ie9 back compat 6204 6205 _foundation_util_touch__WEBPACK_IMPORTED_MODULE_7__["Touch"].init(jquery__WEBPACK_IMPORTED_MODULE_0___default.a); // Touch init is idempotent, we just need to make sure it's initialied. 6206 6207 this._init(); 6208 6209 _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__["Keyboard"].register('Orbit', { 6210 'ltr': { 6211 'ARROW_RIGHT': 'next', 6212 'ARROW_LEFT': 'previous' 6213 }, 6214 'rtl': { 6215 'ARROW_LEFT': 'next', 6216 'ARROW_RIGHT': 'previous' 6217 } 6218 }); 6219 } 6220 /** 6221 * Initializes the plugin by creating jQuery collections, setting attributes, and starting the animation. 6222 * @function 6223 * @private 6224 */ 6225 6226 }, { 6227 key: "_init", 6228 value: function _init() { 6229 // @TODO: consider discussion on PR #9278 about DOM pollution by changeSlide 6230 this._reset(); 6231 6232 this.$wrapper = this.$element.find(".".concat(this.options.containerClass)); 6233 this.$slides = this.$element.find(".".concat(this.options.slideClass)); 6234 var $images = this.$element.find('img'), 6235 initActive = this.$slides.filter('.is-active'), 6236 id = this.$element[0].id || Object(_foundation_util_core__WEBPACK_IMPORTED_MODULE_5__["GetYoDigits"])(6, 'orbit'); 6237 this.$element.attr({ 6238 'data-resize': id, 6239 'id': id 6240 }); 6241 6242 if (!initActive.length) { 6243 this.$slides.eq(0).addClass('is-active'); 6244 } 6245 6246 if (!this.options.useMUI) { 6247 this.$slides.addClass('no-motionui'); 6248 } 6249 6250 if ($images.length) { 6251 Object(_foundation_util_imageLoader__WEBPACK_IMPORTED_MODULE_4__["onImagesLoaded"])($images, this._prepareForOrbit.bind(this)); 6252 } else { 6253 this._prepareForOrbit(); //hehe 6254 6255 } 6256 6257 if (this.options.bullets) { 6258 this._loadBullets(); 6259 } 6260 6261 this._events(); 6262 6263 if (this.options.autoPlay && this.$slides.length > 1) { 6264 this.geoSync(); 6265 } 6266 6267 if (this.options.accessible) { 6268 // allow wrapper to be focusable to enable arrow navigation 6269 this.$wrapper.attr('tabindex', 0); 6270 } 6271 } 6272 /** 6273 * Creates a jQuery collection of bullets, if they are being used. 6274 * @function 6275 * @private 6276 */ 6277 6278 }, { 6279 key: "_loadBullets", 6280 value: function _loadBullets() { 6281 this.$bullets = this.$element.find(".".concat(this.options.boxOfBullets)).find('button'); 6282 } 6283 /** 6284 * Sets a `timer` object on the orbit, and starts the counter for the next slide. 6285 * @function 6286 */ 6287 6288 }, { 6289 key: "geoSync", 6290 value: function geoSync() { 6291 var _this = this; 6292 6293 this.timer = new _foundation_util_timer__WEBPACK_IMPORTED_MODULE_3__["Timer"](this.$element, { 6294 duration: this.options.timerDelay, 6295 infinite: false 6296 }, function () { 6297 _this.changeSlide(true); 6298 }); 6299 this.timer.start(); 6300 } 6301 /** 6302 * Sets wrapper and slide heights for the orbit. 6303 * @function 6304 * @private 6305 */ 6306 6307 }, { 6308 key: "_prepareForOrbit", 6309 value: function _prepareForOrbit() { 6310 var _this = this; 6311 6312 this._setWrapperHeight(); 6313 } 6314 /** 6315 * Calulates the height of each slide in the collection, and uses the tallest one for the wrapper height. 6316 * @function 6317 * @private 6318 * @param {Function} cb - a callback function to fire when complete. 6319 */ 6320 6321 }, { 6322 key: "_setWrapperHeight", 6323 value: function _setWrapperHeight(cb) { 6324 //rewrite this to `for` loop 6325 var max = 0, 6326 temp, 6327 counter = 0, 6328 _this = this; 6329 6330 this.$slides.each(function () { 6331 temp = this.getBoundingClientRect().height; 6332 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).attr('data-slide', counter); 6333 6334 if (!/mui/g.test(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this)[0].className) && _this.$slides.filter('.is-active')[0] !== _this.$slides.eq(counter)[0]) { 6335 //if not the active slide, set css position and display property 6336 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).css({ 6337 'position': 'relative', 6338 'display': 'none' 6339 }); 6340 } 6341 6342 max = temp > max ? temp : max; 6343 counter++; 6344 }); 6345 6346 if (counter === this.$slides.length) { 6347 this.$wrapper.css({ 6348 'height': max 6349 }); //only change the wrapper height property once. 6350 6351 if (cb) { 6352 cb(max); 6353 } //fire callback with max height dimension. 6354 6355 } 6356 } 6357 /** 6358 * Sets the max-height of each slide. 6359 * @function 6360 * @private 6361 */ 6362 6363 }, { 6364 key: "_setSlideHeight", 6365 value: function _setSlideHeight(height) { 6366 this.$slides.each(function () { 6367 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).css('max-height', height); 6368 }); 6369 } 6370 /** 6371 * Adds event listeners to basically everything within the element. 6372 * @function 6373 * @private 6374 */ 6375 6376 }, { 6377 key: "_events", 6378 value: function _events() { 6379 var _this = this; //*************************************** 6380 //**Now using custom event - thanks to:** 6381 //** Yohai Ararat of Toronto ** 6382 //*************************************** 6383 // 6384 6385 6386 this.$element.off('.resizeme.zf.trigger').on({ 6387 'resizeme.zf.trigger': this._prepareForOrbit.bind(this) 6388 }); 6389 6390 if (this.$slides.length > 1) { 6391 if (this.options.swipe) { 6392 this.$slides.off('swipeleft.zf.orbit swiperight.zf.orbit').on('swipeleft.zf.orbit', function (e) { 6393 e.preventDefault(); 6394 6395 _this.changeSlide(true); 6396 }).on('swiperight.zf.orbit', function (e) { 6397 e.preventDefault(); 6398 6399 _this.changeSlide(false); 6400 }); 6401 } //*************************************** 6402 6403 6404 if (this.options.autoPlay) { 6405 this.$slides.on('click.zf.orbit', function () { 6406 _this.$element.data('clickedOn', _this.$element.data('clickedOn') ? false : true); 6407 6408 _this.timer[_this.$element.data('clickedOn') ? 'pause' : 'start'](); 6409 }); 6410 6411 if (this.options.pauseOnHover) { 6412 this.$element.on('mouseenter.zf.orbit', function () { 6413 _this.timer.pause(); 6414 }).on('mouseleave.zf.orbit', function () { 6415 if (!_this.$element.data('clickedOn')) { 6416 _this.timer.start(); 6417 } 6418 }); 6419 } 6420 } 6421 6422 if (this.options.navButtons) { 6423 var $controls = this.$element.find(".".concat(this.options.nextClass, ", .").concat(this.options.prevClass)); 6424 $controls.attr('tabindex', 0) //also need to handle enter/return and spacebar key presses 6425 .on('click.zf.orbit touchend.zf.orbit', function (e) { 6426 e.preventDefault(); 6427 6428 _this.changeSlide(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).hasClass(_this.options.nextClass)); 6429 }); 6430 } 6431 6432 if (this.options.bullets) { 6433 this.$bullets.on('click.zf.orbit touchend.zf.orbit', function () { 6434 if (/is-active/g.test(this.className)) { 6435 return false; 6436 } //if this is active, kick out of function. 6437 6438 6439 var idx = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('slide'), 6440 ltr = idx > _this.$slides.filter('.is-active').data('slide'), 6441 $slide = _this.$slides.eq(idx); 6442 6443 _this.changeSlide(ltr, $slide, idx); 6444 }); 6445 } 6446 6447 if (this.options.accessible) { 6448 this.$wrapper.add(this.$bullets).on('keydown.zf.orbit', function (e) { 6449 // handle keyboard event with keyboard util 6450 _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__["Keyboard"].handleKey(e, 'Orbit', { 6451 next: function next() { 6452 _this.changeSlide(true); 6453 }, 6454 previous: function previous() { 6455 _this.changeSlide(false); 6456 }, 6457 handled: function handled() { 6458 // if bullet is focused, make sure focus moves 6459 if (jquery__WEBPACK_IMPORTED_MODULE_0___default()(e.target).is(_this.$bullets)) { 6460 _this.$bullets.filter('.is-active').focus(); 6461 } 6462 } 6463 }); 6464 }); 6465 } 6466 } 6467 } 6468 /** 6469 * Resets Orbit so it can be reinitialized 6470 */ 6471 6472 }, { 6473 key: "_reset", 6474 value: function _reset() { 6475 // Don't do anything if there are no slides (first run) 6476 if (typeof this.$slides == 'undefined') { 6477 return; 6478 } 6479 6480 if (this.$slides.length > 1) { 6481 // Remove old events 6482 this.$element.off('.zf.orbit').find('*').off('.zf.orbit'); // Restart timer if autoPlay is enabled 6483 6484 if (this.options.autoPlay) { 6485 this.timer.restart(); 6486 } // Reset all sliddes 6487 6488 6489 this.$slides.each(function (el) { 6490 jquery__WEBPACK_IMPORTED_MODULE_0___default()(el).removeClass('is-active is-active is-in').removeAttr('aria-live').hide(); 6491 }); // Show the first slide 6492 6493 this.$slides.first().addClass('is-active').show(); // Triggers when the slide has finished animating 6494 6495 this.$element.trigger('slidechange.zf.orbit', [this.$slides.first()]); // Select first bullet if bullets are present 6496 6497 if (this.options.bullets) { 6498 this._updateBullets(0); 6499 } 6500 } 6501 } 6502 /** 6503 * Changes the current slide to a new one. 6504 * @function 6505 * @param {Boolean} isLTR - flag if the slide should move left to right. 6506 * @param {jQuery} chosenSlide - the jQuery element of the slide to show next, if one is selected. 6507 * @param {Number} idx - the index of the new slide in its collection, if one chosen. 6508 * @fires Orbit#slidechange 6509 */ 6510 6511 }, { 6512 key: "changeSlide", 6513 value: function changeSlide(isLTR, chosenSlide, idx) { 6514 if (!this.$slides) { 6515 return; 6516 } // Don't freak out if we're in the middle of cleanup 6517 6518 6519 var $curSlide = this.$slides.filter('.is-active').eq(0); 6520 6521 if (/mui/g.test($curSlide[0].className)) { 6522 return false; 6523 } //if the slide is currently animating, kick out of the function 6524 6525 6526 var $firstSlide = this.$slides.first(), 6527 $lastSlide = this.$slides.last(), 6528 dirIn = isLTR ? 'Right' : 'Left', 6529 dirOut = isLTR ? 'Left' : 'Right', 6530 _this = this, 6531 $newSlide; 6532 6533 if (!chosenSlide) { 6534 //most of the time, this will be auto played or clicked from the navButtons. 6535 $newSlide = isLTR ? //if wrapping enabled, check to see if there is a `next` or `prev` sibling, if not, select the first or last slide to fill in. if wrapping not enabled, attempt to select `next` or `prev`, if there's nothing there, the function will kick out on next step. CRAZY NESTED TERNARIES!!!!! 6536 this.options.infiniteWrap ? $curSlide.next(".".concat(this.options.slideClass)).length ? $curSlide.next(".".concat(this.options.slideClass)) : $firstSlide : $curSlide.next(".".concat(this.options.slideClass)) : //pick next slide if moving left to right 6537 this.options.infiniteWrap ? $curSlide.prev(".".concat(this.options.slideClass)).length ? $curSlide.prev(".".concat(this.options.slideClass)) : $lastSlide : $curSlide.prev(".".concat(this.options.slideClass)); //pick prev slide if moving right to left 6538 } else { 6539 $newSlide = chosenSlide; 6540 } 6541 6542 if ($newSlide.length) { 6543 /** 6544 * Triggers before the next slide starts animating in and only if a next slide has been found. 6545 * @event Orbit#beforeslidechange 6546 */ 6547 this.$element.trigger('beforeslidechange.zf.orbit', [$curSlide, $newSlide]); 6548 6549 if (this.options.bullets) { 6550 idx = idx || this.$slides.index($newSlide); //grab index to update bullets 6551 6552 this._updateBullets(idx); 6553 } 6554 6555 if (this.options.useMUI && !this.$element.is(':hidden')) { 6556 _foundation_util_motion__WEBPACK_IMPORTED_MODULE_2__["Motion"].animateIn($newSlide.addClass('is-active').css({ 6557 'position': 'absolute', 6558 'top': 0 6559 }), this.options["animInFrom".concat(dirIn)], function () { 6560 $newSlide.css({ 6561 'position': 'relative', 6562 'display': 'block' 6563 }).attr('aria-live', 'polite'); 6564 }); 6565 _foundation_util_motion__WEBPACK_IMPORTED_MODULE_2__["Motion"].animateOut($curSlide.removeClass('is-active'), this.options["animOutTo".concat(dirOut)], function () { 6566 $curSlide.removeAttr('aria-live'); 6567 6568 if (_this.options.autoPlay && !_this.timer.isPaused) { 6569 _this.timer.restart(); 6570 } //do stuff? 6571 6572 }); 6573 } else { 6574 $curSlide.removeClass('is-active is-in').removeAttr('aria-live').hide(); 6575 $newSlide.addClass('is-active is-in').attr('aria-live', 'polite').show(); 6576 6577 if (this.options.autoPlay && !this.timer.isPaused) { 6578 this.timer.restart(); 6579 } 6580 } 6581 /** 6582 * Triggers when the slide has finished animating in. 6583 * @event Orbit#slidechange 6584 */ 6585 6586 6587 this.$element.trigger('slidechange.zf.orbit', [$newSlide]); 6588 } 6589 } 6590 /** 6591 * Updates the active state of the bullets, if displayed. 6592 * @function 6593 * @private 6594 * @param {Number} idx - the index of the current slide. 6595 */ 6596 6597 }, { 6598 key: "_updateBullets", 6599 value: function _updateBullets(idx) { 6600 var $oldBullet = this.$element.find(".".concat(this.options.boxOfBullets)).find('.is-active').removeClass('is-active').blur(), 6601 span = $oldBullet.find('span:last').detach(), 6602 $newBullet = this.$bullets.eq(idx).addClass('is-active').append(span); 6603 } 6604 /** 6605 * Destroys the carousel and hides the element. 6606 * @function 6607 */ 6608 6609 }, { 6610 key: "_destroy", 6611 value: function _destroy() { 6612 this.$element.off('.zf.orbit').find('*').off('.zf.orbit').end().hide(); 6613 } 6614 }]); 6615 6616 return Orbit; 6617}(_foundation_plugin__WEBPACK_IMPORTED_MODULE_6__["Plugin"]); 6618 6619Orbit.defaults = { 6620 /** 6621 * Tells the JS to look for and loadBullets. 6622 * @option 6623 * @type {boolean} 6624 * @default true 6625 */ 6626 bullets: true, 6627 6628 /** 6629 * Tells the JS to apply event listeners to nav buttons 6630 * @option 6631 * @type {boolean} 6632 * @default true 6633 */ 6634 navButtons: true, 6635 6636 /** 6637 * motion-ui animation class to apply 6638 * @option 6639 * @type {string} 6640 * @default 'slide-in-right' 6641 */ 6642 animInFromRight: 'slide-in-right', 6643 6644 /** 6645 * motion-ui animation class to apply 6646 * @option 6647 * @type {string} 6648 * @default 'slide-out-right' 6649 */ 6650 animOutToRight: 'slide-out-right', 6651 6652 /** 6653 * motion-ui animation class to apply 6654 * @option 6655 * @type {string} 6656 * @default 'slide-in-left' 6657 * 6658 */ 6659 animInFromLeft: 'slide-in-left', 6660 6661 /** 6662 * motion-ui animation class to apply 6663 * @option 6664 * @type {string} 6665 * @default 'slide-out-left' 6666 */ 6667 animOutToLeft: 'slide-out-left', 6668 6669 /** 6670 * Allows Orbit to automatically animate on page load. 6671 * @option 6672 * @type {boolean} 6673 * @default true 6674 */ 6675 autoPlay: true, 6676 6677 /** 6678 * Amount of time, in ms, between slide transitions 6679 * @option 6680 * @type {number} 6681 * @default 5000 6682 */ 6683 timerDelay: 5000, 6684 6685 /** 6686 * Allows Orbit to infinitely loop through the slides 6687 * @option 6688 * @type {boolean} 6689 * @default true 6690 */ 6691 infiniteWrap: true, 6692 6693 /** 6694 * Allows the Orbit slides to bind to swipe events for mobile, requires an additional util library 6695 * @option 6696 * @type {boolean} 6697 * @default true 6698 */ 6699 swipe: true, 6700 6701 /** 6702 * Allows the timing function to pause animation on hover. 6703 * @option 6704 * @type {boolean} 6705 * @default true 6706 */ 6707 pauseOnHover: true, 6708 6709 /** 6710 * Allows Orbit to bind keyboard events to the slider, to animate frames with arrow keys 6711 * @option 6712 * @type {boolean} 6713 * @default true 6714 */ 6715 accessible: true, 6716 6717 /** 6718 * Class applied to the container of Orbit 6719 * @option 6720 * @type {string} 6721 * @default 'orbit-container' 6722 */ 6723 containerClass: 'orbit-container', 6724 6725 /** 6726 * Class applied to individual slides. 6727 * @option 6728 * @type {string} 6729 * @default 'orbit-slide' 6730 */ 6731 slideClass: 'orbit-slide', 6732 6733 /** 6734 * Class applied to the bullet container. You're welcome. 6735 * @option 6736 * @type {string} 6737 * @default 'orbit-bullets' 6738 */ 6739 boxOfBullets: 'orbit-bullets', 6740 6741 /** 6742 * Class applied to the `next` navigation button. 6743 * @option 6744 * @type {string} 6745 * @default 'orbit-next' 6746 */ 6747 nextClass: 'orbit-next', 6748 6749 /** 6750 * Class applied to the `previous` navigation button. 6751 * @option 6752 * @type {string} 6753 * @default 'orbit-previous' 6754 */ 6755 prevClass: 'orbit-previous', 6756 6757 /** 6758 * Boolean to flag the js to use motion ui classes or not. Default to true for backwards compatability. 6759 * @option 6760 * @type {boolean} 6761 * @default true 6762 */ 6763 useMUI: true 6764}; 6765 6766 6767/***/ }), 6768
vendor: 3,585 bytes, lines 6769-6861
6769/***/ "./node_modules/foundation-sites/js/foundation.plugin.js": 6770/*!***************************************************************!*\ 6771 !*** ./node_modules/foundation-sites/js/foundation.plugin.js ***! 6772 \***************************************************************/ 6773/*! exports provided: Plugin */ 6774/***/ (function(module, __webpack_exports__, __webpack_require__) { 6775 6776"use strict"; 6777__webpack_require__.r(__webpack_exports__); 6778/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Plugin", function() { return Plugin; }); 6779/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"); 6780/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 6781/* harmony import */ var _foundation_util_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.util.core */ "./node_modules/foundation-sites/js/foundation.util.core.js"); 6782 6783 6784function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 6785 6786function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 6787 6788function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } 6789 6790 6791 // Abstract class for providing lifecycle hooks. Expect plugins to define AT LEAST 6792// {function} _setup (replaces previous constructor), 6793// {function} _destroy (replaces previous destroy) 6794 6795var Plugin = 6796/*#__PURE__*/ 6797function () { 6798 function Plugin(element, options) { 6799 _classCallCheck(this, Plugin); 6800 6801 this._setup(element, options); 6802 6803 var pluginName = getPluginName(this); 6804 this.uuid = Object(_foundation_util_core__WEBPACK_IMPORTED_MODULE_1__["GetYoDigits"])(6, pluginName); 6805 6806 if (!this.$element.attr("data-".concat(pluginName))) { 6807 this.$element.attr("data-".concat(pluginName), this.uuid); 6808 } 6809 6810 if (!this.$element.data('zfPlugin')) { 6811 this.$element.data('zfPlugin', this); 6812 } 6813 /** 6814 * Fires when the plugin has initialized. 6815 * @event Plugin#init 6816 */ 6817 6818 6819 this.$element.trigger("init.zf.".concat(pluginName)); 6820 } 6821 6822 _createClass(Plugin, [{ 6823 key: "destroy", 6824 value: function destroy() { 6825 this._destroy(); 6826 6827 var pluginName = getPluginName(this); 6828 this.$element.removeAttr("data-".concat(pluginName)).removeData('zfPlugin') 6829 /** 6830 * Fires when the plugin has been destroyed. 6831 * @event Plugin#destroyed 6832 */ 6833 .trigger("destroyed.zf.".concat(pluginName)); 6834 6835 for (var prop in this) { 6836 this[prop] = null; //clean up script to prep for garbage collection. 6837 } 6838 } 6839 }]); 6840 6841 return Plugin; 6842}(); // Convert PascalCase to kebab-case 6843// Thank you: http://stackoverflow.com/a/8955580 6844 6845 6846function hyphenate(str) { 6847 return str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase(); 6848} 6849 6850function getPluginName(obj) { 6851 if (typeof obj.constructor.name !== 'undefined') { 6852 return hyphenate(obj.constructor.name); 6853 } else { 6854 return hyphenate(obj.className); 6855 } 6856} 6857 6858 6859 6860/***/ }), 6861
vendor: 11,244 bytes, lines 6862-7141
6862/***/ "./node_modules/foundation-sites/js/foundation.positionable.js": 6863/*!*********************************************************************!*\ 6864 !*** ./node_modules/foundation-sites/js/foundation.positionable.js ***! 6865 \*********************************************************************/ 6866/*! exports provided: Positionable */ 6867/***/ (function(module, __webpack_exports__, __webpack_require__) { 6868 6869"use strict"; 6870__webpack_require__.r(__webpack_exports__); 6871/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Positionable", function() { return Positionable; }); 6872/* harmony import */ var _foundation_util_box__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./foundation.util.box */ "./node_modules/foundation-sites/js/foundation.util.box.js"); 6873/* harmony import */ var _foundation_plugin__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.plugin */ "./node_modules/foundation-sites/js/foundation.plugin.js"); 6874/* harmony import */ var _foundation_util_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation.util.core */ "./node_modules/foundation-sites/js/foundation.util.core.js"); 6875 6876 6877function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 6878 6879function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 6880 6881function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 6882 6883function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } 6884 6885function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } 6886 6887function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } 6888 6889function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } 6890 6891function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } 6892 6893function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } 6894 6895 6896 6897 6898var POSITIONS = ['left', 'right', 'top', 'bottom']; 6899var VERTICAL_ALIGNMENTS = ['top', 'bottom', 'center']; 6900var HORIZONTAL_ALIGNMENTS = ['left', 'right', 'center']; 6901var ALIGNMENTS = { 6902 'left': VERTICAL_ALIGNMENTS, 6903 'right': VERTICAL_ALIGNMENTS, 6904 'top': HORIZONTAL_ALIGNMENTS, 6905 'bottom': HORIZONTAL_ALIGNMENTS 6906}; 6907 6908function nextItem(item, array) { 6909 var currentIdx = array.indexOf(item); 6910 6911 if (currentIdx === array.length - 1) { 6912 return array[0]; 6913 } else { 6914 return array[currentIdx + 1]; 6915 } 6916} 6917 6918var Positionable = 6919/*#__PURE__*/ 6920function (_Plugin) { 6921 _inherits(Positionable, _Plugin); 6922 6923 function Positionable() { 6924 _classCallCheck(this, Positionable); 6925 6926 return _possibleConstructorReturn(this, _getPrototypeOf(Positionable).apply(this, arguments)); 6927 } 6928 6929 _createClass(Positionable, [{ 6930 key: "_init", 6931 6932 /** 6933 * Abstract class encapsulating the tether-like explicit positioning logic 6934 * including repositioning based on overlap. 6935 * Expects classes to define defaults for vOffset, hOffset, position, 6936 * alignment, allowOverlap, and allowBottomOverlap. They can do this by 6937 * extending the defaults, or (for now recommended due to the way docs are 6938 * generated) by explicitly declaring them. 6939 * 6940 **/ 6941 value: function _init() { 6942 this.triedPositions = {}; 6943 this.position = this.options.position === 'auto' ? this._getDefaultPosition() : this.options.position; 6944 this.alignment = this.options.alignment === 'auto' ? this._getDefaultAlignment() : this.options.alignment; 6945 } 6946 }, { 6947 key: "_getDefaultPosition", 6948 value: function _getDefaultPosition() { 6949 return 'bottom'; 6950 } 6951 }, { 6952 key: "_getDefaultAlignment", 6953 value: function _getDefaultAlignment() { 6954 switch (this.position) { 6955 case 'bottom': 6956 case 'top': 6957 return Object(_foundation_util_core__WEBPACK_IMPORTED_MODULE_2__["rtl"])() ? 'right' : 'left'; 6958 6959 case 'left': 6960 case 'right': 6961 return 'bottom'; 6962 } 6963 } 6964 /** 6965 * Adjusts the positionable possible positions by iterating through alignments 6966 * and positions. 6967 * @function 6968 * @private 6969 */ 6970 6971 }, { 6972 key: "_reposition", 6973 value: function _reposition() { 6974 if (this._alignmentsExhausted(this.position)) { 6975 this.position = nextItem(this.position, POSITIONS); 6976 this.alignment = ALIGNMENTS[this.position][0]; 6977 } else { 6978 this._realign(); 6979 } 6980 } 6981 /** 6982 * Adjusts the dropdown pane possible positions by iterating through alignments 6983 * on the current position. 6984 * @function 6985 * @private 6986 */ 6987 6988 }, { 6989 key: "_realign", 6990 value: function _realign() { 6991 this._addTriedPosition(this.position, this.alignment); 6992 6993 this.alignment = nextItem(this.alignment, ALIGNMENTS[this.position]); 6994 } 6995 }, { 6996 key: "_addTriedPosition", 6997 value: function _addTriedPosition(position, alignment) { 6998 this.triedPositions[position] = this.triedPositions[position] || []; 6999 this.triedPositions[position].push(alignment); 7000 } 7001 }, { 7002 key: "_positionsExhausted", 7003 value: function _positionsExhausted() { 7004 var isExhausted = true; 7005 7006 for (var i = 0; i < POSITIONS.length; i++) { 7007 isExhausted = isExhausted && this._alignmentsExhausted(POSITIONS[i]); 7008 } 7009 7010 return isExhausted; 7011 } 7012 }, { 7013 key: "_alignmentsExhausted", 7014 value: function _alignmentsExhausted(position) { 7015 return this.triedPositions[position] && this.triedPositions[position].length == ALIGNMENTS[position].length; 7016 } // When we're trying to center, we don't want to apply offset that's going to 7017 // take us just off center, so wrap around to return 0 for the appropriate 7018 // offset in those alignments. TODO: Figure out if we want to make this 7019 // configurable behavior... it feels more intuitive, especially for tooltips, but 7020 // it's possible someone might actually want to start from center and then nudge 7021 // slightly off. 7022 7023 }, { 7024 key: "_getVOffset", 7025 value: function _getVOffset() { 7026 return this.options.vOffset; 7027 } 7028 }, { 7029 key: "_getHOffset", 7030 value: function _getHOffset() { 7031 return this.options.hOffset; 7032 } 7033 }, { 7034 key: "_setPosition", 7035 value: function _setPosition($anchor, $element, $parent) { 7036 if ($anchor.attr('aria-expanded') === 'false') { 7037 return false; 7038 } 7039 7040 var $eleDims = _foundation_util_box__WEBPACK_IMPORTED_MODULE_0__["Box"].GetDimensions($element), 7041 $anchorDims = _foundation_util_box__WEBPACK_IMPORTED_MODULE_0__["Box"].GetDimensions($anchor); 7042 $element.offset(_foundation_util_box__WEBPACK_IMPORTED_MODULE_0__["Box"].GetExplicitOffsets($element, $anchor, this.position, this.alignment, this._getVOffset(), this._getHOffset())); 7043 7044 if (!this.options.allowOverlap) { 7045 var overlaps = {}; 7046 var minOverlap = 100000000; // default coordinates to how we start, in case we can't figure out better 7047 7048 var minCoordinates = { 7049 position: this.position, 7050 alignment: this.alignment 7051 }; 7052 7053 while (!this._positionsExhausted()) { 7054 var overlap = _foundation_util_box__WEBPACK_IMPORTED_MODULE_0__["Box"].OverlapArea($element, $parent, false, false, this.options.allowBottomOverlap); 7055 7056 if (overlap === 0) { 7057 return; 7058 } 7059 7060 if (overlap < minOverlap) { 7061 minOverlap = overlap; 7062 minCoordinates = { 7063 position: this.position, 7064 alignment: this.alignment 7065 }; 7066 } 7067 7068 this._reposition(); 7069 7070 $element.offset(_foundation_util_box__WEBPACK_IMPORTED_MODULE_0__["Box"].GetExplicitOffsets($element, $anchor, this.position, this.alignment, this._getVOffset(), this._getHOffset())); 7071 } // If we get through the entire loop, there was no non-overlapping 7072 // position available. Pick the version with least overlap. 7073 7074 7075 this.position = minCoordinates.position; 7076 this.alignment = minCoordinates.alignment; 7077 $element.offset(_foundation_util_box__WEBPACK_IMPORTED_MODULE_0__["Box"].GetExplicitOffsets($element, $anchor, this.position, this.alignment, this._getVOffset(), this._getHOffset())); 7078 } 7079 } 7080 }]); 7081 7082 return Positionable; 7083}(_foundation_plugin__WEBPACK_IMPORTED_MODULE_1__["Plugin"]); 7084 7085Positionable.defaults = { 7086 /** 7087 * Position of positionable relative to anchor. Can be left, right, bottom, top, or auto. 7088 * @option 7089 * @type {string} 7090 * @default 'auto' 7091 */ 7092 position: 'auto', 7093 7094 /** 7095 * Alignment of positionable relative to anchor. Can be left, right, bottom, top, center, or auto. 7096 * @option 7097 * @type {string} 7098 * @default 'auto' 7099 */ 7100 alignment: 'auto', 7101 7102 /** 7103 * Allow overlap of container/window. If false, dropdown positionable first 7104 * try to position as defined by data-position and data-alignment, but 7105 * reposition if it would cause an overflow. 7106 * @option 7107 * @type {boolean} 7108 * @default false 7109 */ 7110 allowOverlap: false, 7111 7112 /** 7113 * Allow overlap of only the bottom of the container. This is the most common 7114 * behavior for dropdowns, allowing the dropdown to extend the bottom of the 7115 * screen but not otherwise influence or break out of the container. 7116 * @option 7117 * @type {boolean} 7118 * @default true 7119 */ 7120 allowBottomOverlap: true, 7121 7122 /** 7123 * Number of pixels the positionable should be separated vertically from anchor 7124 * @option 7125 * @type {number} 7126 * @default 0 7127 */ 7128 vOffset: 0, 7129 7130 /** 7131 * Number of pixels the positionable should be separated horizontally from anchor 7132 * @option 7133 * @type {number} 7134 * @default 0 7135 */ 7136 hOffset: 0 7137}; 7138 7139 7140/***/ }), 7141
vendor: 14,930 bytes, lines 7142-7472
7142/***/ "./node_modules/foundation-sites/js/foundation.responsiveAccordionTabs.js": 7143/*!********************************************************************************!*\ 7144 !*** ./node_modules/foundation-sites/js/foundation.responsiveAccordionTabs.js ***! 7145 \********************************************************************************/ 7146/*! exports provided: ResponsiveAccordionTabs */ 7147/***/ (function(module, __webpack_exports__, __webpack_require__) { 7148 7149"use strict"; 7150__webpack_require__.r(__webpack_exports__); 7151/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ResponsiveAccordionTabs", function() { return ResponsiveAccordionTabs; }); 7152/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"); 7153/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 7154/* harmony import */ var _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.util.mediaQuery */ "./node_modules/foundation-sites/js/foundation.util.mediaQuery.js"); 7155/* harmony import */ var _foundation_util_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation.util.core */ "./node_modules/foundation-sites/js/foundation.util.core.js"); 7156/* harmony import */ var _foundation_plugin__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./foundation.plugin */ "./node_modules/foundation-sites/js/foundation.plugin.js"); 7157/* harmony import */ var _foundation_accordion__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./foundation.accordion */ "./node_modules/foundation-sites/js/foundation.accordion.js"); 7158/* harmony import */ var _foundation_tabs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./foundation.tabs */ "./node_modules/foundation-sites/js/foundation.tabs.js"); 7159 7160 7161function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 7162 7163function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 7164 7165function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 7166 7167function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } 7168 7169function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } 7170 7171function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } 7172 7173function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } 7174 7175function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } 7176 7177function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } 7178 7179 7180 7181 7182 7183 7184 // The plugin matches the plugin classes with these plugin instances. 7185 7186var MenuPlugins = { 7187 tabs: { 7188 cssClass: 'tabs', 7189 plugin: _foundation_tabs__WEBPACK_IMPORTED_MODULE_5__["Tabs"] 7190 }, 7191 accordion: { 7192 cssClass: 'accordion', 7193 plugin: _foundation_accordion__WEBPACK_IMPORTED_MODULE_4__["Accordion"] 7194 } 7195}; 7196/** 7197 * ResponsiveAccordionTabs module. 7198 * @module foundation.responsiveAccordionTabs 7199 * @requires foundation.util.motion 7200 * @requires foundation.accordion 7201 * @requires foundation.tabs 7202 */ 7203 7204var ResponsiveAccordionTabs = 7205/*#__PURE__*/ 7206function (_Plugin) { 7207 _inherits(ResponsiveAccordionTabs, _Plugin); 7208 7209 function ResponsiveAccordionTabs() { 7210 _classCallCheck(this, ResponsiveAccordionTabs); 7211 7212 return _possibleConstructorReturn(this, _getPrototypeOf(ResponsiveAccordionTabs).apply(this, arguments)); 7213 } 7214 7215 _createClass(ResponsiveAccordionTabs, [{ 7216 key: "_setup", 7217 7218 /** 7219 * Creates a new instance of a responsive accordion tabs. 7220 * @class 7221 * @name ResponsiveAccordionTabs 7222 * @fires ResponsiveAccordionTabs#init 7223 * @param {jQuery} element - jQuery object to make into Responsive Accordion Tabs. 7224 * @param {Object} options - Overrides to the default plugin settings. 7225 */ 7226 value: function _setup(element, options) { 7227 this.$element = jquery__WEBPACK_IMPORTED_MODULE_0___default()(element); 7228 this.options = jquery__WEBPACK_IMPORTED_MODULE_0___default.a.extend({}, this.$element.data(), options); 7229 this.rules = this.$element.data('responsive-accordion-tabs'); 7230 this.currentMq = null; 7231 this.currentPlugin = null; 7232 this.className = 'ResponsiveAccordionTabs'; // ie9 back compat 7233 7234 if (!this.$element.attr('id')) { 7235 this.$element.attr('id', Object(_foundation_util_core__WEBPACK_IMPORTED_MODULE_2__["GetYoDigits"])(6, 'responsiveaccordiontabs')); 7236 } 7237 7238 ; 7239 7240 this._init(); 7241 7242 this._events(); 7243 } 7244 /** 7245 * Initializes the Menu by parsing the classes from the 'data-responsive-accordion-tabs' attribute on the element. 7246 * @function 7247 * @private 7248 */ 7249 7250 }, { 7251 key: "_init", 7252 value: function _init() { 7253 _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_1__["MediaQuery"]._init(); // The first time an Interchange plugin is initialized, this.rules is converted from a string of "classes" to an object of rules 7254 7255 7256 if (typeof this.rules === 'string') { 7257 var rulesTree = {}; // Parse rules from "classes" pulled from data attribute 7258 7259 var rules = this.rules.split(' '); // Iterate through every rule found 7260 7261 for (var i = 0; i < rules.length; i++) { 7262 var rule = rules[i].split('-'); 7263 var ruleSize = rule.length > 1 ? rule[0] : 'small'; 7264 var rulePlugin = rule.length > 1 ? rule[1] : rule[0]; 7265 7266 if (MenuPlugins[rulePlugin] !== null) { 7267 rulesTree[ruleSize] = MenuPlugins[rulePlugin]; 7268 } 7269 } 7270 7271 this.rules = rulesTree; 7272 } 7273 7274 this._getAllOptions(); 7275 7276 if (!jquery__WEBPACK_IMPORTED_MODULE_0___default.a.isEmptyObject(this.rules)) { 7277 this._checkMediaQueries(); 7278 } 7279 } 7280 }, { 7281 key: "_getAllOptions", 7282 value: function _getAllOptions() { 7283 //get all defaults and options 7284 var _this = this; 7285 7286 _this.allOptions = {}; 7287 7288 for (var key in MenuPlugins) { 7289 if (MenuPlugins.hasOwnProperty(key)) { 7290 var obj = MenuPlugins[key]; 7291 7292 try { 7293 var dummyPlugin = jquery__WEBPACK_IMPORTED_MODULE_0___default()('<ul></ul>'); 7294 var tmpPlugin = new obj.plugin(dummyPlugin, _this.options); 7295 7296 for (var keyKey in tmpPlugin.options) { 7297 if (tmpPlugin.options.hasOwnProperty(keyKey) && keyKey !== 'zfPlugin') { 7298 var objObj = tmpPlugin.options[keyKey]; 7299 _this.allOptions[keyKey] = objObj; 7300 } 7301 } 7302 7303 tmpPlugin.destroy(); 7304 } catch (e) {} 7305 } 7306 } 7307 } 7308 /** 7309 * Initializes events for the Menu. 7310 * @function 7311 * @private 7312 */ 7313 7314 }, { 7315 key: "_events", 7316 value: function _events() { 7317 var _this = this; 7318 7319 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).on('changed.zf.mediaquery', function () { 7320 _this._checkMediaQueries(); 7321 }); 7322 } 7323 /** 7324 * Checks the current screen width against available media queries. If the media query has changed, and the plugin needed has changed, the plugins will swap out. 7325 * @function 7326 * @private 7327 */ 7328 7329 }, { 7330 key: "_checkMediaQueries", 7331 value: function _checkMediaQueries() { 7332 var matchedMq, 7333 _this = this; // Iterate through each rule and find the last matching rule 7334 7335 7336 jquery__WEBPACK_IMPORTED_MODULE_0___default.a.each(this.rules, function (key) { 7337 if (_foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_1__["MediaQuery"].atLeast(key)) { 7338 matchedMq = key; 7339 } 7340 }); // No match? No dice 7341 7342 if (!matchedMq) return; // Plugin already initialized? We good 7343 7344 if (this.currentPlugin instanceof this.rules[matchedMq].plugin) return; // Remove existing plugin-specific CSS classes 7345 7346 jquery__WEBPACK_IMPORTED_MODULE_0___default.a.each(MenuPlugins, function (key, value) { 7347 _this.$element.removeClass(value.cssClass); 7348 }); // Add the CSS class for the new plugin 7349 7350 this.$element.addClass(this.rules[matchedMq].cssClass); // Create an instance of the new plugin 7351 7352 if (this.currentPlugin) { 7353 //don't know why but on nested elements data zfPlugin get's lost 7354 if (!this.currentPlugin.$element.data('zfPlugin') && this.storezfData) this.currentPlugin.$element.data('zfPlugin', this.storezfData); 7355 this.currentPlugin.destroy(); 7356 } 7357 7358 this._handleMarkup(this.rules[matchedMq].cssClass); 7359 7360 this.currentPlugin = new this.rules[matchedMq].plugin(this.$element, {}); 7361 this.storezfData = this.currentPlugin.$element.data('zfPlugin'); 7362 } 7363 }, { 7364 key: "_handleMarkup", 7365 value: function _handleMarkup(toSet) { 7366 var _this = this, 7367 fromString = 'accordion'; 7368 7369 var $panels = jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-tabs-content=' + this.$element.attr('id') + ']'); 7370 if ($panels.length) fromString = 'tabs'; 7371 7372 if (fromString === toSet) { 7373 return; 7374 } 7375 7376 ; 7377 var tabsTitle = _this.allOptions.linkClass ? _this.allOptions.linkClass : 'tabs-title'; 7378 var tabsPanel = _this.allOptions.panelClass ? _this.allOptions.panelClass : 'tabs-panel'; 7379 this.$element.removeAttr('role'); 7380 var $liHeads = this.$element.children('.' + tabsTitle + ',[data-accordion-item]').removeClass(tabsTitle).removeClass('accordion-item').removeAttr('data-accordion-item'); 7381 var $liHeadsA = $liHeads.children('a').removeClass('accordion-title'); 7382 7383 if (fromString === 'tabs') { 7384 $panels = $panels.children('.' + tabsPanel).removeClass(tabsPanel).removeAttr('role').removeAttr('aria-hidden').removeAttr('aria-labelledby'); 7385 $panels.children('a').removeAttr('role').removeAttr('aria-controls').removeAttr('aria-selected'); 7386 } else { 7387 $panels = $liHeads.children('[data-tab-content]').removeClass('accordion-content'); 7388 } 7389 7390 ; 7391 $panels.css({ 7392 display: '', 7393 visibility: '' 7394 }); 7395 $liHeads.css({ 7396 display: '', 7397 visibility: '' 7398 }); 7399 7400 if (toSet === 'accordion') { 7401 $panels.each(function (key, value) { 7402 jquery__WEBPACK_IMPORTED_MODULE_0___default()(value).appendTo($liHeads.get(key)).addClass('accordion-content').attr('data-tab-content', '').removeClass('is-active').css({ 7403 height: '' 7404 }); 7405 jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-tabs-content=' + _this.$element.attr('id') + ']').after('<div id="tabs-placeholder-' + _this.$element.attr('id') + '"></div>').detach(); 7406 $liHeads.addClass('accordion-item').attr('data-accordion-item', ''); 7407 $liHeadsA.addClass('accordion-title'); 7408 }); 7409 } else if (toSet === 'tabs') { 7410 var $tabsContent = jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-tabs-content=' + _this.$element.attr('id') + ']'); 7411 var $placeholder = jquery__WEBPACK_IMPORTED_MODULE_0___default()('#tabs-placeholder-' + _this.$element.attr('id')); 7412 7413 if ($placeholder.length) { 7414 $tabsContent = jquery__WEBPACK_IMPORTED_MODULE_0___default()('<div class="tabs-content"></div>').insertAfter($placeholder).attr('data-tabs-content', _this.$element.attr('id')); 7415 $placeholder.remove(); 7416 } else { 7417 $tabsContent = jquery__WEBPACK_IMPORTED_MODULE_0___default()('<div class="tabs-content"></div>').insertAfter(_this.$element).attr('data-tabs-content', _this.$element.attr('id')); 7418 } 7419 7420 ; 7421 $panels.each(function (key, value) { 7422 var tempValue = jquery__WEBPACK_IMPORTED_MODULE_0___default()(value).appendTo($tabsContent).addClass(tabsPanel); 7423 var hash = $liHeadsA.get(key).hash.slice(1); 7424 var id = jquery__WEBPACK_IMPORTED_MODULE_0___default()(value).attr('id') || Object(_foundation_util_core__WEBPACK_IMPORTED_MODULE_2__["GetYoDigits"])(6, 'accordion'); 7425 7426 if (hash !== id) { 7427 if (hash !== '') { 7428 jquery__WEBPACK_IMPORTED_MODULE_0___default()(value).attr('id', hash); 7429 } else { 7430 hash = id; 7431 jquery__WEBPACK_IMPORTED_MODULE_0___default()(value).attr('id', hash); 7432 jquery__WEBPACK_IMPORTED_MODULE_0___default()($liHeadsA.get(key)).attr('href', jquery__WEBPACK_IMPORTED_MODULE_0___default()($liHeadsA.get(key)).attr('href').replace('#', '') + '#' + hash); 7433 } 7434 7435 ; 7436 } 7437 7438 ; 7439 var isActive = jquery__WEBPACK_IMPORTED_MODULE_0___default()($liHeads.get(key)).hasClass('is-active'); 7440 7441 if (isActive) { 7442 tempValue.addClass('is-active'); 7443 } 7444 7445 ; 7446 }); 7447 $liHeads.addClass(tabsTitle); 7448 } 7449 7450 ; 7451 } 7452 /** 7453 * Destroys the instance of the current plugin on this element, as well as the window resize handler that switches the plugins out. 7454 * @function 7455 */ 7456 7457 }, { 7458 key: "_destroy", 7459 value: function _destroy() { 7460 if (this.currentPlugin) this.currentPlugin.destroy(); 7461 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).off('.zf.ResponsiveAccordionTabs'); 7462 } 7463 }]); 7464 7465 return ResponsiveAccordionTabs; 7466}(_foundation_plugin__WEBPACK_IMPORTED_MODULE_3__["Plugin"]); 7467 7468ResponsiveAccordionTabs.defaults = {}; 7469 7470 7471/***/ }), 7472
vendor: 9,640 bytes, lines 7473-7679
7473/***/ "./node_modules/foundation-sites/js/foundation.responsiveMenu.js": 7474/*!***********************************************************************!*\ 7475 !*** ./node_modules/foundation-sites/js/foundation.responsiveMenu.js ***! 7476 \***********************************************************************/ 7477/*! exports provided: ResponsiveMenu */ 7478/***/ (function(module, __webpack_exports__, __webpack_require__) { 7479 7480"use strict"; 7481__webpack_require__.r(__webpack_exports__); 7482/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ResponsiveMenu", function() { return ResponsiveMenu; }); 7483/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"); 7484/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 7485/* harmony import */ var _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.util.mediaQuery */ "./node_modules/foundation-sites/js/foundation.util.mediaQuery.js"); 7486/* harmony import */ var _foundation_util_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation.util.core */ "./node_modules/foundation-sites/js/foundation.util.core.js"); 7487/* harmony import */ var _foundation_plugin__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./foundation.plugin */ "./node_modules/foundation-sites/js/foundation.plugin.js"); 7488/* harmony import */ var _foundation_dropdownMenu__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./foundation.dropdownMenu */ "./node_modules/foundation-sites/js/foundation.dropdownMenu.js"); 7489/* harmony import */ var _foundation_drilldown__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./foundation.drilldown */ "./node_modules/foundation-sites/js/foundation.drilldown.js"); 7490/* harmony import */ var _foundation_accordionMenu__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./foundation.accordionMenu */ "./node_modules/foundation-sites/js/foundation.accordionMenu.js"); 7491 7492 7493function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 7494 7495function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 7496 7497function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 7498 7499function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } 7500 7501function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } 7502 7503function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } 7504 7505function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } 7506 7507function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } 7508 7509function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } 7510 7511 7512 7513 7514 7515 7516 7517 7518var MenuPlugins = { 7519 dropdown: { 7520 cssClass: 'dropdown', 7521 plugin: _foundation_dropdownMenu__WEBPACK_IMPORTED_MODULE_4__["DropdownMenu"] 7522 }, 7523 drilldown: { 7524 cssClass: 'drilldown', 7525 plugin: _foundation_drilldown__WEBPACK_IMPORTED_MODULE_5__["Drilldown"] 7526 }, 7527 accordion: { 7528 cssClass: 'accordion-menu', 7529 plugin: _foundation_accordionMenu__WEBPACK_IMPORTED_MODULE_6__["AccordionMenu"] 7530 } 7531}; // import "foundation.util.triggers.js"; 7532 7533/** 7534 * ResponsiveMenu module. 7535 * @module foundation.responsiveMenu 7536 * @requires foundation.util.triggers 7537 * @requires foundation.util.mediaQuery 7538 */ 7539 7540var ResponsiveMenu = 7541/*#__PURE__*/ 7542function (_Plugin) { 7543 _inherits(ResponsiveMenu, _Plugin); 7544 7545 function ResponsiveMenu() { 7546 _classCallCheck(this, ResponsiveMenu); 7547 7548 return _possibleConstructorReturn(this, _getPrototypeOf(ResponsiveMenu).apply(this, arguments)); 7549 } 7550 7551 _createClass(ResponsiveMenu, [{ 7552 key: "_setup", 7553 7554 /** 7555 * Creates a new instance of a responsive menu. 7556 * @class 7557 * @name ResponsiveMenu 7558 * @fires ResponsiveMenu#init 7559 * @param {jQuery} element - jQuery object to make into a dropdown menu. 7560 * @param {Object} options - Overrides to the default plugin settings. 7561 */ 7562 value: function _setup(element, options) { 7563 this.$element = jquery__WEBPACK_IMPORTED_MODULE_0___default()(element); 7564 this.rules = this.$element.data('responsive-menu'); 7565 this.currentMq = null; 7566 this.currentPlugin = null; 7567 this.className = 'ResponsiveMenu'; // ie9 back compat 7568 7569 this._init(); 7570 7571 this._events(); 7572 } 7573 /** 7574 * Initializes the Menu by parsing the classes from the 'data-ResponsiveMenu' attribute on the element. 7575 * @function 7576 * @private 7577 */ 7578 7579 }, { 7580 key: "_init", 7581 value: function _init() { 7582 _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_1__["MediaQuery"]._init(); // The first time an Interchange plugin is initialized, this.rules is converted from a string of "classes" to an object of rules 7583 7584 7585 if (typeof this.rules === 'string') { 7586 var rulesTree = {}; // Parse rules from "classes" pulled from data attribute 7587 7588 var rules = this.rules.split(' '); // Iterate through every rule found 7589 7590 for (var i = 0; i < rules.length; i++) { 7591 var rule = rules[i].split('-'); 7592 var ruleSize = rule.length > 1 ? rule[0] : 'small'; 7593 var rulePlugin = rule.length > 1 ? rule[1] : rule[0]; 7594 7595 if (MenuPlugins[rulePlugin] !== null) { 7596 rulesTree[ruleSize] = MenuPlugins[rulePlugin]; 7597 } 7598 } 7599 7600 this.rules = rulesTree; 7601 } 7602 7603 if (!jquery__WEBPACK_IMPORTED_MODULE_0___default.a.isEmptyObject(this.rules)) { 7604 this._checkMediaQueries(); 7605 } // Add data-mutate since children may need it. 7606 7607 7608 this.$element.attr('data-mutate', this.$element.attr('data-mutate') || Object(_foundation_util_core__WEBPACK_IMPORTED_MODULE_2__["GetYoDigits"])(6, 'responsive-menu')); 7609 } 7610 /** 7611 * Initializes events for the Menu. 7612 * @function 7613 * @private 7614 */ 7615 7616 }, { 7617 key: "_events", 7618 value: function _events() { 7619 var _this = this; 7620 7621 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).on('changed.zf.mediaquery', function () { 7622 _this._checkMediaQueries(); 7623 }); // $(window).on('resize.zf.ResponsiveMenu', function() { 7624 // _this._checkMediaQueries(); 7625 // }); 7626 } 7627 /** 7628 * Checks the current screen width against available media queries. If the media query has changed, and the plugin needed has changed, the plugins will swap out. 7629 * @function 7630 * @private 7631 */ 7632 7633 }, { 7634 key: "_checkMediaQueries", 7635 value: function _checkMediaQueries() { 7636 var matchedMq, 7637 _this = this; // Iterate through each rule and find the last matching rule 7638 7639 7640 jquery__WEBPACK_IMPORTED_MODULE_0___default.a.each(this.rules, function (key) { 7641 if (_foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_1__["MediaQuery"].atLeast(key)) { 7642 matchedMq = key; 7643 } 7644 }); // No match? No dice 7645 7646 if (!matchedMq) return; // Plugin already initialized? We good 7647 7648 if (this.currentPlugin instanceof this.rules[matchedMq].plugin) return; // Remove existing plugin-specific CSS classes 7649 7650 jquery__WEBPACK_IMPORTED_MODULE_0___default.a.each(MenuPlugins, function (key, value) { 7651 _this.$element.removeClass(value.cssClass); 7652 }); // Add the CSS class for the new plugin 7653 7654 this.$element.addClass(this.rules[matchedMq].cssClass); // Create an instance of the new plugin 7655 7656 if (this.currentPlugin) this.currentPlugin.destroy(); 7657 this.currentPlugin = new this.rules[matchedMq].plugin(this.$element, {}); 7658 } 7659 /** 7660 * Destroys the instance of the current plugin on this element, as well as the window resize handler that switches the plugins out. 7661 * @function 7662 */ 7663 7664 }, { 7665 key: "_destroy", 7666 value: function _destroy() { 7667 this.currentPlugin.destroy(); 7668 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).off('.zf.ResponsiveMenu'); 7669 } 7670 }]); 7671 7672 return ResponsiveMenu; 7673}(_foundation_plugin__WEBPACK_IMPORTED_MODULE_3__["Plugin"]); 7674 7675ResponsiveMenu.defaults = {}; 7676 7677 7678/***/ }), 7679
vendor: 9,312 bytes, lines 7680-7890
7680/***/ "./node_modules/foundation-sites/js/foundation.responsiveToggle.js": 7681/*!*************************************************************************!*\ 7682 !*** ./node_modules/foundation-sites/js/foundation.responsiveToggle.js ***! 7683 \*************************************************************************/ 7684/*! exports provided: ResponsiveToggle */ 7685/***/ (function(module, __webpack_exports__, __webpack_require__) { 7686 7687"use strict"; 7688__webpack_require__.r(__webpack_exports__); 7689/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ResponsiveToggle", function() { return ResponsiveToggle; }); 7690/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"); 7691/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 7692/* harmony import */ var _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.util.mediaQuery */ "./node_modules/foundation-sites/js/foundation.util.mediaQuery.js"); 7693/* harmony import */ var _foundation_util_motion__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation.util.motion */ "./node_modules/foundation-sites/js/foundation.util.motion.js"); 7694/* harmony import */ var _foundation_plugin__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./foundation.plugin */ "./node_modules/foundation-sites/js/foundation.plugin.js"); 7695 7696 7697function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 7698 7699function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 7700 7701function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 7702 7703function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } 7704 7705function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } 7706 7707function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } 7708 7709function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } 7710 7711function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } 7712 7713function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } 7714 7715 7716 7717 7718 7719/** 7720 * ResponsiveToggle module. 7721 * @module foundation.responsiveToggle 7722 * @requires foundation.util.mediaQuery 7723 * @requires foundation.util.motion 7724 */ 7725 7726var ResponsiveToggle = 7727/*#__PURE__*/ 7728function (_Plugin) { 7729 _inherits(ResponsiveToggle, _Plugin); 7730 7731 function ResponsiveToggle() { 7732 _classCallCheck(this, ResponsiveToggle); 7733 7734 return _possibleConstructorReturn(this, _getPrototypeOf(ResponsiveToggle).apply(this, arguments)); 7735 } 7736 7737 _createClass(ResponsiveToggle, [{ 7738 key: "_setup", 7739 7740 /** 7741 * Creates a new instance of Tab Bar. 7742 * @class 7743 * @name ResponsiveToggle 7744 * @fires ResponsiveToggle#init 7745 * @param {jQuery} element - jQuery object to attach tab bar functionality to. 7746 * @param {Object} options - Overrides to the default plugin settings. 7747 */ 7748 value: function _setup(element, options) { 7749 this.$element = jquery__WEBPACK_IMPORTED_MODULE_0___default()(element); 7750 this.options = jquery__WEBPACK_IMPORTED_MODULE_0___default.a.extend({}, ResponsiveToggle.defaults, this.$element.data(), options); 7751 this.className = 'ResponsiveToggle'; // ie9 back compat 7752 7753 this._init(); 7754 7755 this._events(); 7756 } 7757 /** 7758 * Initializes the tab bar by finding the target element, toggling element, and running update(). 7759 * @function 7760 * @private 7761 */ 7762 7763 }, { 7764 key: "_init", 7765 value: function _init() { 7766 _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_1__["MediaQuery"]._init(); 7767 7768 var targetID = this.$element.data('responsive-toggle'); 7769 7770 if (!targetID) { 7771 console.error('Your tab bar needs an ID of a Menu as the value of data-tab-bar.'); 7772 } 7773 7774 this.$targetMenu = jquery__WEBPACK_IMPORTED_MODULE_0___default()("#".concat(targetID)); 7775 this.$toggler = this.$element.find('[data-toggle]').filter(function () { 7776 var target = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('toggle'); 7777 return target === targetID || target === ""; 7778 }); 7779 this.options = jquery__WEBPACK_IMPORTED_MODULE_0___default.a.extend({}, this.options, this.$targetMenu.data()); // If they were set, parse the animation classes 7780 7781 if (this.options.animate) { 7782 var input = this.options.animate.split(' '); 7783 this.animationIn = input[0]; 7784 this.animationOut = input[1] || null; 7785 } 7786 7787 this._update(); 7788 } 7789 /** 7790 * Adds necessary event handlers for the tab bar to work. 7791 * @function 7792 * @private 7793 */ 7794 7795 }, { 7796 key: "_events", 7797 value: function _events() { 7798 var _this = this; 7799 7800 this._updateMqHandler = this._update.bind(this); 7801 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).on('changed.zf.mediaquery', this._updateMqHandler); 7802 this.$toggler.on('click.zf.responsiveToggle', this.toggleMenu.bind(this)); 7803 } 7804 /** 7805 * Checks the current media query to determine if the tab bar should be visible or hidden. 7806 * @function 7807 * @private 7808 */ 7809 7810 }, { 7811 key: "_update", 7812 value: function _update() { 7813 // Mobile 7814 if (!_foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_1__["MediaQuery"].atLeast(this.options.hideFor)) { 7815 this.$element.show(); 7816 this.$targetMenu.hide(); 7817 } // Desktop 7818 else { 7819 this.$element.hide(); 7820 this.$targetMenu.show(); 7821 } 7822 } 7823 /** 7824 * Toggles the element attached to the tab bar. The toggle only happens if the screen is small enough to allow it. 7825 * @function 7826 * @fires ResponsiveToggle#toggled 7827 */ 7828 7829 }, { 7830 key: "toggleMenu", 7831 value: function toggleMenu() { 7832 var _this2 = this; 7833 7834 if (!_foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_1__["MediaQuery"].atLeast(this.options.hideFor)) { 7835 /** 7836 * Fires when the element attached to the tab bar toggles. 7837 * @event ResponsiveToggle#toggled 7838 */ 7839 if (this.options.animate) { 7840 if (this.$targetMenu.is(':hidden')) { 7841 _foundation_util_motion__WEBPACK_IMPORTED_MODULE_2__["Motion"].animateIn(this.$targetMenu, this.animationIn, function () { 7842 _this2.$element.trigger('toggled.zf.responsiveToggle'); 7843 7844 _this2.$targetMenu.find('[data-mutate]').triggerHandler('mutateme.zf.trigger'); 7845 }); 7846 } else { 7847 _foundation_util_motion__WEBPACK_IMPORTED_MODULE_2__["Motion"].animateOut(this.$targetMenu, this.animationOut, function () { 7848 _this2.$element.trigger('toggled.zf.responsiveToggle'); 7849 }); 7850 } 7851 } else { 7852 this.$targetMenu.toggle(0); 7853 this.$targetMenu.find('[data-mutate]').trigger('mutateme.zf.trigger'); 7854 this.$element.trigger('toggled.zf.responsiveToggle'); 7855 } 7856 } 7857 } 7858 }, { 7859 key: "_destroy", 7860 value: function _destroy() { 7861 this.$element.off('.zf.responsiveToggle'); 7862 this.$toggler.off('.zf.responsiveToggle'); 7863 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).off('changed.zf.mediaquery', this._updateMqHandler); 7864 } 7865 }]); 7866 7867 return ResponsiveToggle; 7868}(_foundation_plugin__WEBPACK_IMPORTED_MODULE_3__["Plugin"]); 7869 7870ResponsiveToggle.defaults = { 7871 /** 7872 * The breakpoint after which the menu is always shown, and the tab bar is hidden. 7873 * @option 7874 * @type {string} 7875 * @default 'medium' 7876 */ 7877 hideFor: 'medium', 7878 7879 /** 7880 * To decide if the toggle should be animated or not. 7881 * @option 7882 * @type {boolean} 7883 * @default false 7884 */ 7885 animate: false 7886}; 7887 7888 7889/***/ }), 7890
vendor: 23,646 bytes, lines 7891-8594
7891/***/ "./node_modules/foundation-sites/js/foundation.reveal.js": 7892/*!***************************************************************!*\ 7893 !*** ./node_modules/foundation-sites/js/foundation.reveal.js ***! 7894 \***************************************************************/ 7895/*! exports provided: Reveal */ 7896/***/ (function(module, __webpack_exports__, __webpack_require__) { 7897 7898"use strict"; 7899__webpack_require__.r(__webpack_exports__); 7900/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Reveal", function() { return Reveal; }); 7901/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"); 7902/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 7903/* harmony import */ var _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.util.keyboard */ "./node_modules/foundation-sites/js/foundation.util.keyboard.js"); 7904/* harmony import */ var _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation.util.mediaQuery */ "./node_modules/foundation-sites/js/foundation.util.mediaQuery.js"); 7905/* harmony import */ var _foundation_util_motion__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./foundation.util.motion */ "./node_modules/foundation-sites/js/foundation.util.motion.js"); 7906/* harmony import */ var _foundation_plugin__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./foundation.plugin */ "./node_modules/foundation-sites/js/foundation.plugin.js"); 7907/* harmony import */ var _foundation_util_triggers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./foundation.util.triggers */ "./node_modules/foundation-sites/js/foundation.util.triggers.js"); 7908 7909 7910function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 7911 7912function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 7913 7914function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 7915 7916function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } 7917 7918function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } 7919 7920function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } 7921 7922function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } 7923 7924function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } 7925 7926function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } 7927 7928 7929 7930 7931 7932 7933 7934/** 7935 * Reveal module. 7936 * @module foundation.reveal 7937 * @requires foundation.util.keyboard 7938 * @requires foundation.util.triggers 7939 * @requires foundation.util.mediaQuery 7940 * @requires foundation.util.motion if using animations 7941 */ 7942 7943var Reveal = 7944/*#__PURE__*/ 7945function (_Plugin) { 7946 _inherits(Reveal, _Plugin); 7947 7948 function Reveal() { 7949 _classCallCheck(this, Reveal); 7950 7951 return _possibleConstructorReturn(this, _getPrototypeOf(Reveal).apply(this, arguments)); 7952 } 7953 7954 _createClass(Reveal, [{ 7955 key: "_setup", 7956 7957 /** 7958 * Creates a new instance of Reveal. 7959 * @class 7960 * @name Reveal 7961 * @param {jQuery} element - jQuery object to use for the modal. 7962 * @param {Object} options - optional parameters. 7963 */ 7964 value: function _setup(element, options) { 7965 this.$element = element; 7966 this.options = jquery__WEBPACK_IMPORTED_MODULE_0___default.a.extend({}, Reveal.defaults, this.$element.data(), options); 7967 this.className = 'Reveal'; // ie9 back compat 7968 7969 this._init(); // Triggers init is idempotent, just need to make sure it is initialized 7970 7971 7972 _foundation_util_triggers__WEBPACK_IMPORTED_MODULE_5__["Triggers"].init(jquery__WEBPACK_IMPORTED_MODULE_0___default.a); 7973 _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__["Keyboard"].register('Reveal', { 7974 'ESCAPE': 'close' 7975 }); 7976 } 7977 /** 7978 * Initializes the modal by adding the overlay and close buttons, (if selected). 7979 * @private 7980 */ 7981 7982 }, { 7983 key: "_init", 7984 value: function _init() { 7985 _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_2__["MediaQuery"]._init(); 7986 7987 this.id = this.$element.attr('id'); 7988 this.isActive = false; 7989 this.cached = { 7990 mq: _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_2__["MediaQuery"].current 7991 }; 7992 this.isMobile = mobileSniff(); 7993 this.$anchor = jquery__WEBPACK_IMPORTED_MODULE_0___default()("[data-open=\"".concat(this.id, "\"]")).length ? jquery__WEBPACK_IMPORTED_MODULE_0___default()("[data-open=\"".concat(this.id, "\"]")) : jquery__WEBPACK_IMPORTED_MODULE_0___default()("[data-toggle=\"".concat(this.id, "\"]")); 7994 this.$anchor.attr({ 7995 'aria-controls': this.id, 7996 'aria-haspopup': true, 7997 'tabindex': 0 7998 }); 7999 8000 if (this.options.fullScreen || this.$element.hasClass('full')) { 8001 this.options.fullScreen = true; 8002 this.options.overlay = false; 8003 } 8004 8005 if (this.options.overlay && !this.$overlay) { 8006 this.$overlay = this._makeOverlay(this.id); 8007 } 8008 8009 this.$element.attr({ 8010 'role': 'dialog', 8011 'aria-hidden': true, 8012 'data-yeti-box': this.id, 8013 'data-resize': this.id 8014 }); 8015 8016 if (this.$overlay) { 8017 this.$element.detach().appendTo(this.$overlay); 8018 } else { 8019 this.$element.detach().appendTo(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this.options.appendTo)); 8020 this.$element.addClass('without-overlay'); 8021 } 8022 8023 this._events(); 8024 8025 if (this.options.deepLink && window.location.hash === "#".concat(this.id)) { 8026 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).one('load.zf.reveal', this.open.bind(this)); 8027 } 8028 } 8029 /** 8030 * Creates an overlay div to display behind the modal. 8031 * @private 8032 */ 8033 8034 }, { 8035 key: "_makeOverlay", 8036 value: function _makeOverlay() { 8037 var additionalOverlayClasses = ''; 8038 8039 if (this.options.additionalOverlayClasses) { 8040 additionalOverlayClasses = ' ' + this.options.additionalOverlayClasses; 8041 } 8042 8043 return jquery__WEBPACK_IMPORTED_MODULE_0___default()('<div></div>').addClass('reveal-overlay' + additionalOverlayClasses).appendTo(this.options.appendTo); 8044 } 8045 /** 8046 * Updates position of modal 8047 * TODO: Figure out if we actually need to cache these values or if it doesn't matter 8048 * @private 8049 */ 8050 8051 }, { 8052 key: "_updatePosition", 8053 value: function _updatePosition() { 8054 var width = this.$element.outerWidth(); 8055 var outerWidth = jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).width(); 8056 var height = this.$element.outerHeight(); 8057 var outerHeight = jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).height(); 8058 var left, top; 8059 8060 if (this.options.hOffset === 'auto') { 8061 left = parseInt((outerWidth - width) / 2, 10); 8062 } else { 8063 left = parseInt(this.options.hOffset, 10); 8064 } 8065 8066 if (this.options.vOffset === 'auto') { 8067 if (height > outerHeight) { 8068 top = parseInt(Math.min(100, outerHeight / 10), 10); 8069 } else { 8070 top = parseInt((outerHeight - height) / 4, 10); 8071 } 8072 } else { 8073 top = parseInt(this.options.vOffset, 10); 8074 } 8075 8076 this.$element.css({ 8077 top: top + 'px' 8078 }); // only worry about left if we don't have an overlay or we havea horizontal offset, 8079 // otherwise we're perfectly in the middle 8080 8081 if (!this.$overlay || this.options.hOffset !== 'auto') { 8082 this.$element.css({ 8083 left: left + 'px' 8084 }); 8085 this.$element.css({ 8086 margin: '0px' 8087 }); 8088 } 8089 } 8090 /** 8091 * Adds event handlers for the modal. 8092 * @private 8093 */ 8094 8095 }, { 8096 key: "_events", 8097 value: function _events() { 8098 var _this2 = this; 8099 8100 var _this = this; 8101 8102 this.$element.on({ 8103 'open.zf.trigger': this.open.bind(this), 8104 'close.zf.trigger': function closeZfTrigger(event, $element) { 8105 if (event.target === _this.$element[0] || jquery__WEBPACK_IMPORTED_MODULE_0___default()(event.target).parents('[data-closable]')[0] === $element) { 8106 // only close reveal when it's explicitly called 8107 return _this2.close.apply(_this2); 8108 } 8109 }, 8110 'toggle.zf.trigger': this.toggle.bind(this), 8111 'resizeme.zf.trigger': function resizemeZfTrigger() { 8112 _this._updatePosition(); 8113 } 8114 }); 8115 8116 if (this.options.closeOnClick && this.options.overlay) { 8117 this.$overlay.off('.zf.reveal').on('click.zf.reveal', function (e) { 8118 if (e.target === _this.$element[0] || jquery__WEBPACK_IMPORTED_MODULE_0___default.a.contains(_this.$element[0], e.target) || !jquery__WEBPACK_IMPORTED_MODULE_0___default.a.contains(document, e.target)) { 8119 return; 8120 } 8121 8122 _this.close(); 8123 }); 8124 } 8125 8126 if (this.options.deepLink) { 8127 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).on("popstate.zf.reveal:".concat(this.id), this._handleState.bind(this)); 8128 } 8129 } 8130 /** 8131 * Handles modal methods on back/forward button clicks or any other event that triggers popstate. 8132 * @private 8133 */ 8134 8135 }, { 8136 key: "_handleState", 8137 value: function _handleState(e) { 8138 if (window.location.hash === '#' + this.id && !this.isActive) { 8139 this.open(); 8140 } else { 8141 this.close(); 8142 } 8143 } 8144 /** 8145 * Opens the modal controlled by `this.$anchor`, and closes all others by default. 8146 * @function 8147 * @fires Reveal#closeme 8148 * @fires Reveal#open 8149 */ 8150 8151 }, { 8152 key: "open", 8153 value: function open() { 8154 var _this3 = this; 8155 8156 // either update or replace browser history 8157 if (this.options.deepLink) { 8158 var hash = "#".concat(this.id); 8159 8160 if (window.history.pushState) { 8161 if (this.options.updateHistory) { 8162 window.history.pushState({}, '', hash); 8163 } else { 8164 window.history.replaceState({}, '', hash); 8165 } 8166 } else { 8167 window.location.hash = hash; 8168 } 8169 } 8170 8171 this.isActive = true; // Make elements invisible, but remove display: none so we can get size and positioning 8172 8173 this.$element.css({ 8174 'visibility': 'hidden' 8175 }).show().scrollTop(0); 8176 8177 if (this.options.overlay) { 8178 this.$overlay.css({ 8179 'visibility': 'hidden' 8180 }).show(); 8181 } 8182 8183 this._updatePosition(); 8184 8185 this.$element.hide().css({ 8186 'visibility': '' 8187 }); 8188 8189 if (this.$overlay) { 8190 this.$overlay.css({ 8191 'visibility': '' 8192 }).hide(); 8193 8194 if (this.$element.hasClass('fast')) { 8195 this.$overlay.addClass('fast'); 8196 } else if (this.$element.hasClass('slow')) { 8197 this.$overlay.addClass('slow'); 8198 } 8199 } 8200 8201 if (!this.options.multipleOpened) { 8202 /** 8203 * Fires immediately before the modal opens. 8204 * Closes any other modals that are currently open 8205 * @event Reveal#closeme 8206 */ 8207 this.$element.trigger('closeme.zf.reveal', this.id); 8208 } 8209 8210 var _this = this; 8211 8212 function addRevealOpenClasses() { 8213 if (_this.isMobile) { 8214 if (!_this.originalScrollPos) { 8215 _this.originalScrollPos = window.pageYOffset; 8216 } 8217 8218 jquery__WEBPACK_IMPORTED_MODULE_0___default()('html, body').addClass('is-reveal-open'); 8219 } else { 8220 jquery__WEBPACK_IMPORTED_MODULE_0___default()('body').addClass('is-reveal-open'); 8221 } 8222 } // Motion UI method of reveal 8223 8224 8225 if (this.options.animationIn) { 8226 var afterAnimation = function afterAnimation() { 8227 _this.$element.attr({ 8228 'aria-hidden': false, 8229 'tabindex': -1 8230 }).focus(); 8231 8232 addRevealOpenClasses(); 8233 _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__["Keyboard"].trapFocus(_this.$element); 8234 }; 8235 8236 if (this.options.overlay) { 8237 _foundation_util_motion__WEBPACK_IMPORTED_MODULE_3__["Motion"].animateIn(this.$overlay, 'fade-in'); 8238 } 8239 8240 _foundation_util_motion__WEBPACK_IMPORTED_MODULE_3__["Motion"].animateIn(this.$element, this.options.animationIn, function () { 8241 if (_this3.$element) { 8242 // protect against object having been removed 8243 _this3.focusableElements = _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__["Keyboard"].findFocusable(_this3.$element); 8244 afterAnimation(); 8245 } 8246 }); 8247 } // jQuery method of reveal 8248 else { 8249 if (this.options.overlay) { 8250 this.$overlay.show(0); 8251 } 8252 8253 this.$element.show(this.options.showDelay); 8254 } // handle accessibility 8255 8256 8257 this.$element.attr({ 8258 'aria-hidden': false, 8259 'tabindex': -1 8260 }).focus(); 8261 _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__["Keyboard"].trapFocus(this.$element); 8262 addRevealOpenClasses(); 8263 8264 this._extraHandlers(); 8265 /** 8266 * Fires when the modal has successfully opened. 8267 * @event Reveal#open 8268 */ 8269 8270 8271 this.$element.trigger('open.zf.reveal'); 8272 } 8273 /** 8274 * Adds extra event handlers for the body and window if necessary. 8275 * @private 8276 */ 8277 8278 }, { 8279 key: "_extraHandlers", 8280 value: function _extraHandlers() { 8281 var _this = this; 8282 8283 if (!this.$element) { 8284 return; 8285 } // If we're in the middle of cleanup, don't freak out 8286 8287 8288 this.focusableElements = _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__["Keyboard"].findFocusable(this.$element); 8289 8290 if (!this.options.overlay && this.options.closeOnClick && !this.options.fullScreen) { 8291 jquery__WEBPACK_IMPORTED_MODULE_0___default()('body').on('click.zf.reveal', function (e) { 8292 if (e.target === _this.$element[0] || jquery__WEBPACK_IMPORTED_MODULE_0___default.a.contains(_this.$element[0], e.target) || !jquery__WEBPACK_IMPORTED_MODULE_0___default.a.contains(document, e.target)) { 8293 return; 8294 } 8295 8296 _this.close(); 8297 }); 8298 } 8299 8300 if (this.options.closeOnEsc) { 8301 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).on('keydown.zf.reveal', function (e) { 8302 _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__["Keyboard"].handleKey(e, 'Reveal', { 8303 close: function close() { 8304 if (_this.options.closeOnEsc) { 8305 _this.close(); 8306 } 8307 } 8308 }); 8309 }); 8310 } 8311 } 8312 /** 8313 * Closes the modal. 8314 * @function 8315 * @fires Reveal#closed 8316 */ 8317 8318 }, { 8319 key: "close", 8320 value: function close() { 8321 if (!this.isActive || !this.$element.is(':visible')) { 8322 return false; 8323 } 8324 8325 var _this = this; // Motion UI method of hiding 8326 8327 8328 if (this.options.animationOut) { 8329 if (this.options.overlay) { 8330 _foundation_util_motion__WEBPACK_IMPORTED_MODULE_3__["Motion"].animateOut(this.$overlay, 'fade-out'); 8331 } 8332 8333 _foundation_util_motion__WEBPACK_IMPORTED_MODULE_3__["Motion"].animateOut(this.$element, this.options.animationOut, finishUp); 8334 } // jQuery method of hiding 8335 else { 8336 this.$element.hide(this.options.hideDelay); 8337 8338 if (this.options.overlay) { 8339 this.$overlay.hide(0, finishUp); 8340 } else { 8341 finishUp(); 8342 } 8343 } // Conditionals to remove extra event listeners added on open 8344 8345 8346 if (this.options.closeOnEsc) { 8347 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).off('keydown.zf.reveal'); 8348 } 8349 8350 if (!this.options.overlay && this.options.closeOnClick) { 8351 jquery__WEBPACK_IMPORTED_MODULE_0___default()('body').off('click.zf.reveal'); 8352 } 8353 8354 this.$element.off('keydown.zf.reveal'); 8355 8356 function finishUp() { 8357 if (_this.isMobile) { 8358 if (jquery__WEBPACK_IMPORTED_MODULE_0___default()('.reveal:visible').length === 0) { 8359 jquery__WEBPACK_IMPORTED_MODULE_0___default()('html, body').removeClass('is-reveal-open'); 8360 } 8361 8362 if (_this.originalScrollPos) { 8363 jquery__WEBPACK_IMPORTED_MODULE_0___default()('body').scrollTop(_this.originalScrollPos); 8364 _this.originalScrollPos = null; 8365 } 8366 } else { 8367 if (jquery__WEBPACK_IMPORTED_MODULE_0___default()('.reveal:visible').length === 0) { 8368 jquery__WEBPACK_IMPORTED_MODULE_0___default()('body').removeClass('is-reveal-open'); 8369 } 8370 } 8371 8372 _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__["Keyboard"].releaseFocus(_this.$element); 8373 8374 _this.$element.attr('aria-hidden', true); 8375 /** 8376 * Fires when the modal is done closing. 8377 * @event Reveal#closed 8378 */ 8379 8380 8381 _this.$element.trigger('closed.zf.reveal'); 8382 } 8383 /** 8384 * Resets the modal content 8385 * This prevents a running video to keep going in the background 8386 */ 8387 8388 8389 if (this.options.resetOnClose) { 8390 this.$element.html(this.$element.html()); 8391 } 8392 8393 this.isActive = false; 8394 8395 if (_this.options.deepLink) { 8396 if (window.history.replaceState) { 8397 window.history.replaceState('', document.title, window.location.href.replace("#".concat(this.id), '')); 8398 } else { 8399 window.location.hash = ''; 8400 } 8401 } 8402 8403 this.$anchor.focus(); 8404 } 8405 /** 8406 * Toggles the open/closed state of a modal. 8407 * @function 8408 */ 8409 8410 }, { 8411 key: "toggle", 8412 value: function toggle() { 8413 if (this.isActive) { 8414 this.close(); 8415 } else { 8416 this.open(); 8417 } 8418 } 8419 }, { 8420 key: "_destroy", 8421 8422 /** 8423 * Destroys an instance of a modal. 8424 * @function 8425 */ 8426 value: function _destroy() { 8427 if (this.options.overlay) { 8428 this.$element.appendTo(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this.options.appendTo)); // move $element outside of $overlay to prevent error unregisterPlugin() 8429 8430 this.$overlay.hide().off().remove(); 8431 } 8432 8433 this.$element.hide().off(); 8434 this.$anchor.off('.zf'); 8435 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).off(".zf.reveal:".concat(this.id)); 8436 } 8437 }]); 8438 8439 return Reveal; 8440}(_foundation_plugin__WEBPACK_IMPORTED_MODULE_4__["Plugin"]); 8441 8442Reveal.defaults = { 8443 /** 8444 * Motion-UI class to use for animated elements. If none used, defaults to simple show/hide. 8445 * @option 8446 * @type {string} 8447 * @default '' 8448 */ 8449 animationIn: '', 8450 8451 /** 8452 * Motion-UI class to use for animated elements. If none used, defaults to simple show/hide. 8453 * @option 8454 * @type {string} 8455 * @default '' 8456 */ 8457 animationOut: '', 8458 8459 /** 8460 * Time, in ms, to delay the opening of a modal after a click if no animation used. 8461 * @option 8462 * @type {number} 8463 * @default 0 8464 */ 8465 showDelay: 0, 8466 8467 /** 8468 * Time, in ms, to delay the closing of a modal after a click if no animation used. 8469 * @option 8470 * @type {number} 8471 * @default 0 8472 */ 8473 hideDelay: 0, 8474 8475 /** 8476 * Allows a click on the body/overlay to close the modal. 8477 * @option 8478 * @type {boolean} 8479 * @default true 8480 */ 8481 closeOnClick: true, 8482 8483 /** 8484 * Allows the modal to close if the user presses the `ESCAPE` key. 8485 * @option 8486 * @type {boolean} 8487 * @default true 8488 */ 8489 closeOnEsc: true, 8490 8491 /** 8492 * If true, allows multiple modals to be displayed at once. 8493 * @option 8494 * @type {boolean} 8495 * @default false 8496 */ 8497 multipleOpened: false, 8498 8499 /** 8500 * Distance, in pixels, the modal should push down from the top of the screen. 8501 * @option 8502 * @type {number|string} 8503 * @default auto 8504 */ 8505 vOffset: 'auto', 8506 8507 /** 8508 * Distance, in pixels, the modal should push in from the side of the screen. 8509 * @option 8510 * @type {number|string} 8511 * @default auto 8512 */ 8513 hOffset: 'auto', 8514 8515 /** 8516 * Allows the modal to be fullscreen, completely blocking out the rest of the view. JS checks for this as well. 8517 * @option 8518 * @type {boolean} 8519 * @default false 8520 */ 8521 fullScreen: false, 8522 8523 /** 8524 * Percentage of screen height the modal should push up from the bottom of the view. 8525 * @option 8526 * @type {number} 8527 * @default 10 8528 */ 8529 btmOffsetPct: 10, 8530 8531 /** 8532 * Allows the modal to generate an overlay div, which will cover the view when modal opens. 8533 * @option 8534 * @type {boolean} 8535 * @default true 8536 */ 8537 overlay: true, 8538 8539 /** 8540 * Allows the modal to remove and reinject markup on close. Should be true if using video elements w/o using provider's api, otherwise, videos will continue to play in the background. 8541 * @option 8542 * @type {boolean} 8543 * @default false 8544 */ 8545 resetOnClose: false, 8546 8547 /** 8548 * Allows the modal to alter the url on open/close, and allows the use of the `back` button to close modals. ALSO, allows a modal to auto-maniacally open on page load IF the hash === the modal's user-set id. 8549 * @option 8550 * @type {boolean} 8551 * @default false 8552 */ 8553 deepLink: false, 8554 8555 /** 8556 * Update the browser history with the open modal 8557 * @option 8558 * @default false 8559 */ 8560 updateHistory: false, 8561 8562 /** 8563 * Allows the modal to append to custom div. 8564 * @option 8565 * @type {string} 8566 * @default "body" 8567 */ 8568 appendTo: "body", 8569 8570 /** 8571 * Allows adding additional class names to the reveal overlay. 8572 * @option 8573 * @type {string} 8574 * @default '' 8575 */ 8576 additionalOverlayClasses: '' 8577}; 8578 8579function iPhoneSniff() { 8580 return /iP(ad|hone|od).*OS/.test(window.navigator.userAgent); 8581} 8582 8583function androidSniff() { 8584 return /Android/.test(window.navigator.userAgent); 8585} 8586 8587function mobileSniff() { 8588 return iPhoneSniff() || androidSniff(); 8589} 8590 8591 8592 8593/***/ }), 8594
vendor: 30,746 bytes, lines 8595-9435
8595/***/ "./node_modules/foundation-sites/js/foundation.slider.js": 8596/*!***************************************************************!*\ 8597 !*** ./node_modules/foundation-sites/js/foundation.slider.js ***! 8598 \***************************************************************/ 8599/*! exports provided: Slider */ 8600/***/ (function(module, __webpack_exports__, __webpack_require__) { 8601 8602"use strict"; 8603__webpack_require__.r(__webpack_exports__); 8604/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Slider", function() { return Slider; }); 8605/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"); 8606/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 8607/* harmony import */ var _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.util.keyboard */ "./node_modules/foundation-sites/js/foundation.util.keyboard.js"); 8608/* harmony import */ var _foundation_util_motion__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation.util.motion */ "./node_modules/foundation-sites/js/foundation.util.motion.js"); 8609/* harmony import */ var _foundation_util_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./foundation.util.core */ "./node_modules/foundation-sites/js/foundation.util.core.js"); 8610/* harmony import */ var _foundation_plugin__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./foundation.plugin */ "./node_modules/foundation-sites/js/foundation.plugin.js"); 8611/* harmony import */ var _foundation_util_touch__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./foundation.util.touch */ "./node_modules/foundation-sites/js/foundation.util.touch.js"); 8612/* harmony import */ var _foundation_util_triggers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./foundation.util.triggers */ "./node_modules/foundation-sites/js/foundation.util.triggers.js"); 8613 8614 8615function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 8616 8617function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 8618 8619function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 8620 8621function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } 8622 8623function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } 8624 8625function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } 8626 8627function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } 8628 8629function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } 8630 8631function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } 8632 8633 8634 8635 8636 8637 8638 8639 8640/** 8641 * Slider module. 8642 * @module foundation.slider 8643 * @requires foundation.util.motion 8644 * @requires foundation.util.triggers 8645 * @requires foundation.util.keyboard 8646 * @requires foundation.util.touch 8647 */ 8648 8649var Slider = 8650/*#__PURE__*/ 8651function (_Plugin) { 8652 _inherits(Slider, _Plugin); 8653 8654 function Slider() { 8655 _classCallCheck(this, Slider); 8656 8657 return _possibleConstructorReturn(this, _getPrototypeOf(Slider).apply(this, arguments)); 8658 } 8659 8660 _createClass(Slider, [{ 8661 key: "_setup", 8662 8663 /** 8664 * Creates a new instance of a slider control. 8665 * @class 8666 * @name Slider 8667 * @param {jQuery} element - jQuery object to make into a slider control. 8668 * @param {Object} options - Overrides to the default plugin settings. 8669 */ 8670 value: function _setup(element, options) { 8671 this.$element = element; 8672 this.options = jquery__WEBPACK_IMPORTED_MODULE_0___default.a.extend({}, Slider.defaults, this.$element.data(), options); 8673 this.className = 'Slider'; // ie9 back compat 8674 // Touch and Triggers inits are idempotent, we just need to make sure it's initialied. 8675 8676 _foundation_util_touch__WEBPACK_IMPORTED_MODULE_5__["Touch"].init(jquery__WEBPACK_IMPORTED_MODULE_0___default.a); 8677 _foundation_util_triggers__WEBPACK_IMPORTED_MODULE_6__["Triggers"].init(jquery__WEBPACK_IMPORTED_MODULE_0___default.a); 8678 8679 this._init(); 8680 8681 _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__["Keyboard"].register('Slider', { 8682 'ltr': { 8683 'ARROW_RIGHT': 'increase', 8684 'ARROW_UP': 'increase', 8685 'ARROW_DOWN': 'decrease', 8686 'ARROW_LEFT': 'decrease', 8687 'SHIFT_ARROW_RIGHT': 'increase_fast', 8688 'SHIFT_ARROW_UP': 'increase_fast', 8689 'SHIFT_ARROW_DOWN': 'decrease_fast', 8690 'SHIFT_ARROW_LEFT': 'decrease_fast', 8691 'HOME': 'min', 8692 'END': 'max' 8693 }, 8694 'rtl': { 8695 'ARROW_LEFT': 'increase', 8696 'ARROW_RIGHT': 'decrease', 8697 'SHIFT_ARROW_LEFT': 'increase_fast', 8698 'SHIFT_ARROW_RIGHT': 'decrease_fast' 8699 } 8700 }); 8701 } 8702 /** 8703 * Initilizes the plugin by reading/setting attributes, creating collections and setting the initial position of the handle(s). 8704 * @function 8705 * @private 8706 */ 8707 8708 }, { 8709 key: "_init", 8710 value: function _init() { 8711 this.inputs = this.$element.find('input'); 8712 this.handles = this.$element.find('[data-slider-handle]'); 8713 this.$handle = this.handles.eq(0); 8714 this.$input = this.inputs.length ? this.inputs.eq(0) : jquery__WEBPACK_IMPORTED_MODULE_0___default()("#".concat(this.$handle.attr('aria-controls'))); 8715 this.$fill = this.$element.find('[data-slider-fill]').css(this.options.vertical ? 'height' : 'width', 0); 8716 8717 var isDbl = false, 8718 _this = this; 8719 8720 if (this.options.disabled || this.$element.hasClass(this.options.disabledClass)) { 8721 this.options.disabled = true; 8722 this.$element.addClass(this.options.disabledClass); 8723 } 8724 8725 if (!this.inputs.length) { 8726 this.inputs = jquery__WEBPACK_IMPORTED_MODULE_0___default()().add(this.$input); 8727 this.options.binding = true; 8728 } 8729 8730 this._setInitAttr(0); 8731 8732 if (this.handles[1]) { 8733 this.options.doubleSided = true; 8734 this.$handle2 = this.handles.eq(1); 8735 this.$input2 = this.inputs.length > 1 ? this.inputs.eq(1) : jquery__WEBPACK_IMPORTED_MODULE_0___default()("#".concat(this.$handle2.attr('aria-controls'))); 8736 8737 if (!this.inputs[1]) { 8738 this.inputs = this.inputs.add(this.$input2); 8739 } 8740 8741 isDbl = true; // this.$handle.triggerHandler('click.zf.slider'); 8742 8743 this._setInitAttr(1); 8744 } // Set handle positions 8745 8746 8747 this.setHandles(); 8748 8749 this._events(); 8750 } 8751 }, { 8752 key: "setHandles", 8753 value: function setHandles() { 8754 var _this2 = this; 8755 8756 if (this.handles[1]) { 8757 this._setHandlePos(this.$handle, this.inputs.eq(0).val(), true, function () { 8758 _this2._setHandlePos(_this2.$handle2, _this2.inputs.eq(1).val(), true); 8759 }); 8760 } else { 8761 this._setHandlePos(this.$handle, this.inputs.eq(0).val(), true); 8762 } 8763 } 8764 }, { 8765 key: "_reflow", 8766 value: function _reflow() { 8767 this.setHandles(); 8768 } 8769 /** 8770 * @function 8771 * @private 8772 * @param {Number} value - floating point (the value) to be transformed using to a relative position on the slider (the inverse of _value) 8773 */ 8774 8775 }, { 8776 key: "_pctOfBar", 8777 value: function _pctOfBar(value) { 8778 var pctOfBar = percent(value - this.options.start, this.options.end - this.options.start); 8779 8780 switch (this.options.positionValueFunction) { 8781 case "pow": 8782 pctOfBar = this._logTransform(pctOfBar); 8783 break; 8784 8785 case "log": 8786 pctOfBar = this._powTransform(pctOfBar); 8787 break; 8788 } 8789 8790 return pctOfBar.toFixed(2); 8791 } 8792 /** 8793 * @function 8794 * @private 8795 * @param {Number} pctOfBar - floating point, the relative position of the slider (typically between 0-1) to be transformed to a value 8796 */ 8797 8798 }, { 8799 key: "_value", 8800 value: function _value(pctOfBar) { 8801 switch (this.options.positionValueFunction) { 8802 case "pow": 8803 pctOfBar = this._powTransform(pctOfBar); 8804 break; 8805 8806 case "log": 8807 pctOfBar = this._logTransform(pctOfBar); 8808 break; 8809 } 8810 8811 var value = (this.options.end - this.options.start) * pctOfBar + this.options.start; 8812 return value; 8813 } 8814 /** 8815 * @function 8816 * @private 8817 * @param {Number} value - floating point (typically between 0-1) to be transformed using the log function 8818 */ 8819 8820 }, { 8821 key: "_logTransform", 8822 value: function _logTransform(value) { 8823 return baseLog(this.options.nonLinearBase, value * (this.options.nonLinearBase - 1) + 1); 8824 } 8825 /** 8826 * @function 8827 * @private 8828 * @param {Number} value - floating point (typically between 0-1) to be transformed using the power function 8829 */ 8830 8831 }, { 8832 key: "_powTransform", 8833 value: function _powTransform(value) { 8834 return (Math.pow(this.options.nonLinearBase, value) - 1) / (this.options.nonLinearBase - 1); 8835 } 8836 /** 8837 * Sets the position of the selected handle and fill bar. 8838 * @function 8839 * @private 8840 * @param {jQuery} $hndl - the selected handle to move. 8841 * @param {Number} location - floating point between the start and end values of the slider bar. 8842 * @param {Function} cb - callback function to fire on completion. 8843 * @fires Slider#moved 8844 * @fires Slider#changed 8845 */ 8846 8847 }, { 8848 key: "_setHandlePos", 8849 value: function _setHandlePos($hndl, location, noInvert, cb) { 8850 // don't move if the slider has been disabled since its initialization 8851 if (this.$element.hasClass(this.options.disabledClass)) { 8852 return; 8853 } //might need to alter that slightly for bars that will have odd number selections. 8854 8855 8856 location = parseFloat(location); //on input change events, convert string to number...grumble. 8857 // prevent slider from running out of bounds, if value exceeds the limits set through options, override the value to min/max 8858 8859 if (location < this.options.start) { 8860 location = this.options.start; 8861 } else if (location > this.options.end) { 8862 location = this.options.end; 8863 } 8864 8865 var isDbl = this.options.doubleSided; //this is for single-handled vertical sliders, it adjusts the value to account for the slider being "upside-down" 8866 //for click and drag events, it's weird due to the scale(-1, 1) css property 8867 8868 if (this.options.vertical && !noInvert) { 8869 location = this.options.end - location; 8870 } 8871 8872 if (isDbl) { 8873 //this block is to prevent 2 handles from crossing eachother. Could/should be improved. 8874 if (this.handles.index($hndl) === 0) { 8875 var h2Val = parseFloat(this.$handle2.attr('aria-valuenow')); 8876 location = location >= h2Val ? h2Val - this.options.step : location; 8877 } else { 8878 var h1Val = parseFloat(this.$handle.attr('aria-valuenow')); 8879 location = location <= h1Val ? h1Val + this.options.step : location; 8880 } 8881 } 8882 8883 var _this = this, 8884 vert = this.options.vertical, 8885 hOrW = vert ? 'height' : 'width', 8886 lOrT = vert ? 'top' : 'left', 8887 handleDim = $hndl[0].getBoundingClientRect()[hOrW], 8888 elemDim = this.$element[0].getBoundingClientRect()[hOrW], 8889 //percentage of bar min/max value based on click or drag point 8890 pctOfBar = this._pctOfBar(location), 8891 //number of actual pixels to shift the handle, based on the percentage obtained above 8892 pxToMove = (elemDim - handleDim) * pctOfBar, 8893 //percentage of bar to shift the handle 8894 movement = (percent(pxToMove, elemDim) * 100).toFixed(this.options.decimal); //fixing the decimal value for the location number, is passed to other methods as a fixed floating-point value 8895 8896 8897 location = parseFloat(location.toFixed(this.options.decimal)); // declare empty object for css adjustments, only used with 2 handled-sliders 8898 8899 var css = {}; 8900 8901 this._setValues($hndl, location); // TODO update to calculate based on values set to respective inputs?? 8902 8903 8904 if (isDbl) { 8905 var isLeftHndl = this.handles.index($hndl) === 0, 8906 //empty variable, will be used for min-height/width for fill bar 8907 dim, 8908 //percentage w/h of the handle compared to the slider bar 8909 handlePct = ~~(percent(handleDim, elemDim) * 100); //if left handle, the math is slightly different than if it's the right handle, and the left/top property needs to be changed for the fill bar 8910 8911 if (isLeftHndl) { 8912 //left or top percentage value to apply to the fill bar. 8913 css[lOrT] = "".concat(movement, "%"); //calculate the new min-height/width for the fill bar. 8914 8915 dim = parseFloat(this.$handle2[0].style[lOrT]) - movement + handlePct; //this callback is necessary to prevent errors and allow the proper placement and initialization of a 2-handled slider 8916 //plus, it means we don't care if 'dim' isNaN on init, it won't be in the future. 8917 8918 if (cb && typeof cb === 'function') { 8919 cb(); 8920 } //this is only needed for the initialization of 2 handled sliders 8921 8922 } else { 8923 //just caching the value of the left/bottom handle's left/top property 8924 var handlePos = parseFloat(this.$handle[0].style[lOrT]); //calculate the new min-height/width for the fill bar. Use isNaN to prevent false positives for numbers <= 0 8925 //based on the percentage of movement of the handle being manipulated, less the opposing handle's left/top position, plus the percentage w/h of the handle itself 8926 8927 dim = movement - (isNaN(handlePos) ? (this.options.initialStart - this.options.start) / ((this.options.end - this.options.start) / 100) : handlePos) + handlePct; 8928 } // assign the min-height/width to our css object 8929 8930 8931 css["min-".concat(hOrW)] = "".concat(dim, "%"); 8932 } 8933 8934 this.$element.one('finished.zf.animate', function () { 8935 /** 8936 * Fires when the handle is done moving. 8937 * @event Slider#moved 8938 */ 8939 _this.$element.trigger('moved.zf.slider', [$hndl]); 8940 }); //because we don't know exactly how the handle will be moved, check the amount of time it should take to move. 8941 8942 var moveTime = this.$element.data('dragging') ? 1000 / 60 : this.options.moveTime; 8943 Object(_foundation_util_motion__WEBPACK_IMPORTED_MODULE_2__["Move"])(moveTime, $hndl, function () { 8944 // adjusting the left/top property of the handle, based on the percentage calculated above 8945 // if movement isNaN, that is because the slider is hidden and we cannot determine handle width, 8946 // fall back to next best guess. 8947 if (isNaN(movement)) { 8948 $hndl.css(lOrT, "".concat(pctOfBar * 100, "%")); 8949 } else { 8950 $hndl.css(lOrT, "".concat(movement, "%")); 8951 } 8952 8953 if (!_this.options.doubleSided) { 8954 //if single-handled, a simple method to expand the fill bar 8955 _this.$fill.css(hOrW, "".concat(pctOfBar * 100, "%")); 8956 } else { 8957 //otherwise, use the css object we created above 8958 _this.$fill.css(css); 8959 } 8960 }); 8961 /** 8962 * Fires when the value has not been change for a given time. 8963 * @event Slider#changed 8964 */ 8965 8966 clearTimeout(_this.timeout); 8967 _this.timeout = setTimeout(function () { 8968 _this.$element.trigger('changed.zf.slider', [$hndl]); 8969 }, _this.options.changedDelay); 8970 } 8971 /** 8972 * Sets the initial attribute for the slider element. 8973 * @function 8974 * @private 8975 * @param {Number} idx - index of the current handle/input to use. 8976 */ 8977 8978 }, { 8979 key: "_setInitAttr", 8980 value: function _setInitAttr(idx) { 8981 var initVal = idx === 0 ? this.options.initialStart : this.options.initialEnd; 8982 var id = this.inputs.eq(idx).attr('id') || Object(_foundation_util_core__WEBPACK_IMPORTED_MODULE_3__["GetYoDigits"])(6, 'slider'); 8983 this.inputs.eq(idx).attr({ 8984 'id': id, 8985 'max': this.options.end, 8986 'min': this.options.start, 8987 'step': this.options.step 8988 }); 8989 this.inputs.eq(idx).val(initVal); 8990 this.handles.eq(idx).attr({ 8991 'role': 'slider', 8992 'aria-controls': id, 8993 'aria-valuemax': this.options.end, 8994 'aria-valuemin': this.options.start, 8995 'aria-valuenow': initVal, 8996 'aria-orientation': this.options.vertical ? 'vertical' : 'horizontal', 8997 'tabindex': 0 8998 }); 8999 } 9000 /** 9001 * Sets the input and `aria-valuenow` values for the slider element. 9002 * @function 9003 * @private 9004 * @param {jQuery} $handle - the currently selected handle. 9005 * @param {Number} val - floating point of the new value. 9006 */ 9007 9008 }, { 9009 key: "_setValues", 9010 value: function _setValues($handle, val) { 9011 var idx = this.options.doubleSided ? this.handles.index($handle) : 0; 9012 this.inputs.eq(idx).val(val); 9013 $handle.attr('aria-valuenow', val); 9014 } 9015 /** 9016 * Handles events on the slider element. 9017 * Calculates the new location of the current handle. 9018 * If there are two handles and the bar was clicked, it determines which handle to move. 9019 * @function 9020 * @private 9021 * @param {Object} e - the `event` object passed from the listener. 9022 * @param {jQuery} $handle - the current handle to calculate for, if selected. 9023 * @param {Number} val - floating point number for the new value of the slider. 9024 * TODO clean this up, there's a lot of repeated code between this and the _setHandlePos fn. 9025 */ 9026 9027 }, { 9028 key: "_handleEvent", 9029 value: function _handleEvent(e, $handle, val) { 9030 var value, hasVal; 9031 9032 if (!val) { 9033 //click or drag events 9034 e.preventDefault(); 9035 9036 var _this = this, 9037 vertical = this.options.vertical, 9038 param = vertical ? 'height' : 'width', 9039 direction = vertical ? 'top' : 'left', 9040 eventOffset = vertical ? e.pageY : e.pageX, 9041 halfOfHandle = this.$handle[0].getBoundingClientRect()[param] / 2, 9042 barDim = this.$element[0].getBoundingClientRect()[param], 9043 windowScroll = vertical ? jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).scrollTop() : jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).scrollLeft(); 9044 9045 var elemOffset = this.$element.offset()[direction]; // touch events emulated by the touch util give position relative to screen, add window.scroll to event coordinates... 9046 // best way to guess this is simulated is if clientY == pageY 9047 9048 if (e.clientY === e.pageY) { 9049 eventOffset = eventOffset + windowScroll; 9050 } 9051 9052 var eventFromBar = eventOffset - elemOffset; 9053 var barXY; 9054 9055 if (eventFromBar < 0) { 9056 barXY = 0; 9057 } else if (eventFromBar > barDim) { 9058 barXY = barDim; 9059 } else { 9060 barXY = eventFromBar; 9061 } 9062 9063 var offsetPct = percent(barXY, barDim); 9064 value = this._value(offsetPct); // turn everything around for RTL, yay math! 9065 9066 if (Object(_foundation_util_core__WEBPACK_IMPORTED_MODULE_3__["rtl"])() && !this.options.vertical) { 9067 value = this.options.end - value; 9068 } 9069 9070 value = _this._adjustValue(null, value); //boolean flag for the setHandlePos fn, specifically for vertical sliders 9071 9072 hasVal = false; 9073 9074 if (!$handle) { 9075 //figure out which handle it is, pass it to the next function. 9076 var firstHndlPos = absPosition(this.$handle, direction, barXY, param), 9077 secndHndlPos = absPosition(this.$handle2, direction, barXY, param); 9078 $handle = firstHndlPos <= secndHndlPos ? this.$handle : this.$handle2; 9079 } 9080 } else { 9081 //change event on input 9082 value = this._adjustValue(null, val); 9083 hasVal = true; 9084 } 9085 9086 this._setHandlePos($handle, value, hasVal); 9087 } 9088 /** 9089 * Adjustes value for handle in regard to step value. returns adjusted value 9090 * @function 9091 * @private 9092 * @param {jQuery} $handle - the selected handle. 9093 * @param {Number} value - value to adjust. used if $handle is falsy 9094 */ 9095 9096 }, { 9097 key: "_adjustValue", 9098 value: function _adjustValue($handle, value) { 9099 var val, 9100 step = this.options.step, 9101 div = parseFloat(step / 2), 9102 left, 9103 prev_val, 9104 next_val; 9105 9106 if (!!$handle) { 9107 val = parseFloat($handle.attr('aria-valuenow')); 9108 } else { 9109 val = value; 9110 } 9111 9112 left = val % step; 9113 prev_val = val - left; 9114 next_val = prev_val + step; 9115 9116 if (left === 0) { 9117 return val; 9118 } 9119 9120 val = val >= prev_val + div ? next_val : prev_val; 9121 return val; 9122 } 9123 /** 9124 * Adds event listeners to the slider elements. 9125 * @function 9126 * @private 9127 */ 9128 9129 }, { 9130 key: "_events", 9131 value: function _events() { 9132 this._eventsForHandle(this.$handle); 9133 9134 if (this.handles[1]) { 9135 this._eventsForHandle(this.$handle2); 9136 } 9137 } 9138 /** 9139 * Adds event listeners a particular handle 9140 * @function 9141 * @private 9142 * @param {jQuery} $handle - the current handle to apply listeners to. 9143 */ 9144 9145 }, { 9146 key: "_eventsForHandle", 9147 value: function _eventsForHandle($handle) { 9148 var _this = this, 9149 curHandle, 9150 timer; 9151 9152 this.inputs.off('change.zf.slider').on('change.zf.slider', function (e) { 9153 var idx = _this.inputs.index(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this)); 9154 9155 _this._handleEvent(e, _this.handles.eq(idx), jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).val()); 9156 }); 9157 9158 if (this.options.clickSelect) { 9159 this.$element.off('click.zf.slider').on('click.zf.slider', function (e) { 9160 if (_this.$element.data('dragging')) { 9161 return false; 9162 } 9163 9164 if (!jquery__WEBPACK_IMPORTED_MODULE_0___default()(e.target).is('[data-slider-handle]')) { 9165 if (_this.options.doubleSided) { 9166 _this._handleEvent(e); 9167 } else { 9168 _this._handleEvent(e, _this.$handle); 9169 } 9170 } 9171 }); 9172 } 9173 9174 if (this.options.draggable) { 9175 this.handles.addTouch(); 9176 var $body = jquery__WEBPACK_IMPORTED_MODULE_0___default()('body'); 9177 $handle.off('mousedown.zf.slider').on('mousedown.zf.slider', function (e) { 9178 $handle.addClass('is-dragging'); 9179 9180 _this.$fill.addClass('is-dragging'); // 9181 9182 9183 _this.$element.data('dragging', true); 9184 9185 curHandle = jquery__WEBPACK_IMPORTED_MODULE_0___default()(e.currentTarget); 9186 $body.on('mousemove.zf.slider', function (e) { 9187 e.preventDefault(); 9188 9189 _this._handleEvent(e, curHandle); 9190 }).on('mouseup.zf.slider', function (e) { 9191 _this._handleEvent(e, curHandle); 9192 9193 $handle.removeClass('is-dragging'); 9194 9195 _this.$fill.removeClass('is-dragging'); 9196 9197 _this.$element.data('dragging', false); 9198 9199 $body.off('mousemove.zf.slider mouseup.zf.slider'); 9200 }); 9201 }) // prevent events triggered by touch 9202 .on('selectstart.zf.slider touchmove.zf.slider', function (e) { 9203 e.preventDefault(); 9204 }); 9205 } 9206 9207 $handle.off('keydown.zf.slider').on('keydown.zf.slider', function (e) { 9208 var _$handle = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), 9209 idx = _this.options.doubleSided ? _this.handles.index(_$handle) : 0, 9210 oldValue = parseFloat(_this.inputs.eq(idx).val()), 9211 newValue; // handle keyboard event with keyboard util 9212 9213 9214 _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__["Keyboard"].handleKey(e, 'Slider', { 9215 decrease: function decrease() { 9216 newValue = oldValue - _this.options.step; 9217 }, 9218 increase: function increase() { 9219 newValue = oldValue + _this.options.step; 9220 }, 9221 decrease_fast: function decrease_fast() { 9222 newValue = oldValue - _this.options.step * 10; 9223 }, 9224 increase_fast: function increase_fast() { 9225 newValue = oldValue + _this.options.step * 10; 9226 }, 9227 min: function min() { 9228 newValue = _this.options.start; 9229 }, 9230 max: function max() { 9231 newValue = _this.options.end; 9232 }, 9233 handled: function handled() { 9234 // only set handle pos when event was handled specially 9235 e.preventDefault(); 9236 9237 _this._setHandlePos(_$handle, newValue, true); 9238 } 9239 }); 9240 /*if (newValue) { // if pressed key has special function, update value 9241 e.preventDefault(); 9242 _this._setHandlePos(_$handle, newValue); 9243 }*/ 9244 }); 9245 } 9246 /** 9247 * Destroys the slider plugin. 9248 */ 9249 9250 }, { 9251 key: "_destroy", 9252 value: function _destroy() { 9253 this.handles.off('.zf.slider'); 9254 this.inputs.off('.zf.slider'); 9255 this.$element.off('.zf.slider'); 9256 clearTimeout(this.timeout); 9257 } 9258 }]); 9259 9260 return Slider; 9261}(_foundation_plugin__WEBPACK_IMPORTED_MODULE_4__["Plugin"]); 9262 9263Slider.defaults = { 9264 /** 9265 * Minimum value for the slider scale. 9266 * @option 9267 * @type {number} 9268 * @default 0 9269 */ 9270 start: 0, 9271 9272 /** 9273 * Maximum value for the slider scale. 9274 * @option 9275 * @type {number} 9276 * @default 100 9277 */ 9278 end: 100, 9279 9280 /** 9281 * Minimum value change per change event. 9282 * @option 9283 * @type {number} 9284 * @default 1 9285 */ 9286 step: 1, 9287 9288 /** 9289 * Value at which the handle/input *(left handle/first input)* should be set to on initialization. 9290 * @option 9291 * @type {number} 9292 * @default 0 9293 */ 9294 initialStart: 0, 9295 9296 /** 9297 * Value at which the right handle/second input should be set to on initialization. 9298 * @option 9299 * @type {number} 9300 * @default 100 9301 */ 9302 initialEnd: 100, 9303 9304 /** 9305 * Allows the input to be located outside the container and visible. Set to by the JS 9306 * @option 9307 * @type {boolean} 9308 * @default false 9309 */ 9310 binding: false, 9311 9312 /** 9313 * Allows the user to click/tap on the slider bar to select a value. 9314 * @option 9315 * @type {boolean} 9316 * @default true 9317 */ 9318 clickSelect: true, 9319 9320 /** 9321 * Set to true and use the `vertical` class to change alignment to vertical. 9322 * @option 9323 * @type {boolean} 9324 * @default false 9325 */ 9326 vertical: false, 9327 9328 /** 9329 * Allows the user to drag the slider handle(s) to select a value. 9330 * @option 9331 * @type {boolean} 9332 * @default true 9333 */ 9334 draggable: true, 9335 9336 /** 9337 * Disables the slider and prevents event listeners from being applied. Double checked by JS with `disabledClass`. 9338 * @option 9339 * @type {boolean} 9340 * @default false 9341 */ 9342 disabled: false, 9343 9344 /** 9345 * Allows the use of two handles. Double checked by the JS. Changes some logic handling. 9346 * @option 9347 * @type {boolean} 9348 * @default false 9349 */ 9350 doubleSided: false, 9351 9352 /** 9353 * Potential future feature. 9354 */ 9355 // steps: 100, 9356 9357 /** 9358 * Number of decimal places the plugin should go to for floating point precision. 9359 * @option 9360 * @type {number} 9361 * @default 2 9362 */ 9363 decimal: 2, 9364 9365 /** 9366 * Time delay for dragged elements. 9367 */ 9368 // dragDelay: 0, 9369 9370 /** 9371 * Time, in ms, to animate the movement of a slider handle if user clicks/taps on the bar. Needs to be manually set if updating the transition time in the Sass settings. 9372 * @option 9373 * @type {number} 9374 * @default 200 9375 */ 9376 moveTime: 200, 9377 //update this if changing the transition time in the sass 9378 9379 /** 9380 * Class applied to disabled sliders. 9381 * @option 9382 * @type {string} 9383 * @default 'disabled' 9384 */ 9385 disabledClass: 'disabled', 9386 9387 /** 9388 * Will invert the default layout for a vertical<span data-tooltip title="who would do this???"> </span>slider. 9389 * @option 9390 * @type {boolean} 9391 * @default false 9392 */ 9393 invertVertical: false, 9394 9395 /** 9396 * Milliseconds before the `changed.zf-slider` event is triggered after value change. 9397 * @option 9398 * @type {number} 9399 * @default 500 9400 */ 9401 changedDelay: 500, 9402 9403 /** 9404 * Basevalue for non-linear sliders 9405 * @option 9406 * @type {number} 9407 * @default 5 9408 */ 9409 nonLinearBase: 5, 9410 9411 /** 9412 * Basevalue for non-linear sliders, possible values are: `'linear'`, `'pow'` & `'log'`. Pow and Log use the nonLinearBase setting. 9413 * @option 9414 * @type {string} 9415 * @default 'linear' 9416 */ 9417 positionValueFunction: 'linear' 9418}; 9419 9420function percent(frac, num) { 9421 return frac / num; 9422} 9423 9424function absPosition($handle, dir, clickPos, param) { 9425 return Math.abs($handle.position()[dir] + $handle[param]() / 2 - clickPos); 9426} 9427 9428function baseLog(base, value) { 9429 return Math.log(value) / Math.log(base); 9430} 9431 9432 9433 9434/***/ }), 9435
vendor: 7,888 bytes, lines 9436-9628
9436/***/ "./node_modules/foundation-sites/js/foundation.smoothScroll.js": 9437/*!*********************************************************************!*\ 9438 !*** ./node_modules/foundation-sites/js/foundation.smoothScroll.js ***! 9439 \*********************************************************************/ 9440/*! exports provided: SmoothScroll */ 9441/***/ (function(module, __webpack_exports__, __webpack_require__) { 9442 9443"use strict"; 9444__webpack_require__.r(__webpack_exports__); 9445/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SmoothScroll", function() { return SmoothScroll; }); 9446/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"); 9447/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 9448/* harmony import */ var _foundation_util_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.util.core */ "./node_modules/foundation-sites/js/foundation.util.core.js"); 9449/* harmony import */ var _foundation_plugin__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation.plugin */ "./node_modules/foundation-sites/js/foundation.plugin.js"); 9450 9451 9452function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 9453 9454function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 9455 9456function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 9457 9458function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } 9459 9460function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } 9461 9462function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } 9463 9464function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } 9465 9466function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } 9467 9468function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } 9469 9470 9471 9472 9473/** 9474 * SmoothScroll module. 9475 * @module foundation.smooth-scroll 9476 */ 9477 9478var SmoothScroll = 9479/*#__PURE__*/ 9480function (_Plugin) { 9481 _inherits(SmoothScroll, _Plugin); 9482 9483 function SmoothScroll() { 9484 _classCallCheck(this, SmoothScroll); 9485 9486 return _possibleConstructorReturn(this, _getPrototypeOf(SmoothScroll).apply(this, arguments)); 9487 } 9488 9489 _createClass(SmoothScroll, [{ 9490 key: "_setup", 9491 9492 /** 9493 * Creates a new instance of SmoothScroll. 9494 * @class 9495 * @name SmoothScroll 9496 * @fires SmoothScroll#init 9497 * @param {Object} element - jQuery object to add the trigger to. 9498 * @param {Object} options - Overrides to the default plugin settings. 9499 */ 9500 value: function _setup(element, options) { 9501 this.$element = element; 9502 this.options = jquery__WEBPACK_IMPORTED_MODULE_0___default.a.extend({}, SmoothScroll.defaults, this.$element.data(), options); 9503 this.className = 'SmoothScroll'; // ie9 back compat 9504 9505 this._init(); 9506 } 9507 /** 9508 * Initialize the SmoothScroll plugin 9509 * @private 9510 */ 9511 9512 }, { 9513 key: "_init", 9514 value: function _init() { 9515 var id = this.$element[0].id || Object(_foundation_util_core__WEBPACK_IMPORTED_MODULE_1__["GetYoDigits"])(6, 'smooth-scroll'); 9516 9517 var _this = this; 9518 9519 this.$element.attr({ 9520 'id': id 9521 }); 9522 9523 this._events(); 9524 } 9525 /** 9526 * Initializes events for SmoothScroll. 9527 * @private 9528 */ 9529 9530 }, { 9531 key: "_events", 9532 value: function _events() { 9533 var _this = this; // click handler function. 9534 9535 9536 var handleLinkClick = function handleLinkClick(e) { 9537 // exit function if the event source isn't coming from an anchor with href attribute starts with '#' 9538 if (!jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).is('a[href^="#"]')) { 9539 return false; 9540 } 9541 9542 var arrival = this.getAttribute('href'); 9543 _this._inTransition = true; 9544 SmoothScroll.scrollToLoc(arrival, _this.options, function () { 9545 _this._inTransition = false; 9546 }); 9547 e.preventDefault(); 9548 }; 9549 9550 this.$element.on('click.zf.smoothScroll', handleLinkClick); 9551 this.$element.on('click.zf.smoothScroll', 'a[href^="#"]', handleLinkClick); 9552 } 9553 /** 9554 * Function to scroll to a given location on the page. 9555 * @param {String} loc - A properly formatted jQuery id selector. Example: '#foo' 9556 * @param {Object} options - The options to use. 9557 * @param {Function} callback - The callback function. 9558 * @static 9559 * @function 9560 */ 9561 9562 }], [{ 9563 key: "scrollToLoc", 9564 value: function scrollToLoc(loc) { 9565 var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : SmoothScroll.defaults; 9566 var callback = arguments.length > 2 ? arguments[2] : undefined; 9567 9568 // Do nothing if target does not exist to prevent errors 9569 if (!jquery__WEBPACK_IMPORTED_MODULE_0___default()(loc).length) { 9570 return false; 9571 } 9572 9573 var scrollPos = Math.round(jquery__WEBPACK_IMPORTED_MODULE_0___default()(loc).offset().top - options.threshold / 2 - options.offset); 9574 jquery__WEBPACK_IMPORTED_MODULE_0___default()('html, body').stop(true).animate({ 9575 scrollTop: scrollPos 9576 }, options.animationDuration, options.animationEasing, function () { 9577 if (callback && typeof callback == "function") { 9578 callback(); 9579 } 9580 }); 9581 } 9582 }]); 9583 9584 return SmoothScroll; 9585}(_foundation_plugin__WEBPACK_IMPORTED_MODULE_2__["Plugin"]); 9586/** 9587 * Default settings for plugin. 9588 */ 9589 9590 9591SmoothScroll.defaults = { 9592 /** 9593 * Amount of time, in ms, the animated scrolling should take between locations. 9594 * @option 9595 * @type {number} 9596 * @default 500 9597 */ 9598 animationDuration: 500, 9599 9600 /** 9601 * Animation style to use when scrolling between locations. Can be `'swing'` or `'linear'`. 9602 * @option 9603 * @type {string} 9604 * @default 'linear' 9605 * @see {@link https://api.jquery.com/animate|Jquery animate} 9606 */ 9607 animationEasing: 'linear', 9608 9609 /** 9610 * Number of pixels to use as a marker for location changes. 9611 * @option 9612 * @type {number} 9613 * @default 50 9614 */ 9615 threshold: 50, 9616 9617 /** 9618 * Number of pixels to offset the scroll of the page on item click if using a sticky nav bar. 9619 * @option 9620 * @type {number} 9621 * @default 0 9622 */ 9623 offset: 0 9624}; 9625 9626 9627/***/ }), 9628
vendor: 21,543 bytes, lines 9629-10247
9629/***/ "./node_modules/foundation-sites/js/foundation.sticky.js": 9630/*!***************************************************************!*\ 9631 !*** ./node_modules/foundation-sites/js/foundation.sticky.js ***! 9632 \***************************************************************/ 9633/*! exports provided: Sticky */ 9634/***/ (function(module, __webpack_exports__, __webpack_require__) { 9635 9636"use strict"; 9637__webpack_require__.r(__webpack_exports__); 9638/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Sticky", function() { return Sticky; }); 9639/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"); 9640/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 9641/* harmony import */ var _foundation_util_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.util.core */ "./node_modules/foundation-sites/js/foundation.util.core.js"); 9642/* harmony import */ var _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation.util.mediaQuery */ "./node_modules/foundation-sites/js/foundation.util.mediaQuery.js"); 9643/* harmony import */ var _foundation_plugin__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./foundation.plugin */ "./node_modules/foundation-sites/js/foundation.plugin.js"); 9644/* harmony import */ var _foundation_util_triggers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./foundation.util.triggers */ "./node_modules/foundation-sites/js/foundation.util.triggers.js"); 9645 9646 9647function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 9648 9649function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 9650 9651function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 9652 9653function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } 9654 9655function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } 9656 9657function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } 9658 9659function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } 9660 9661function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } 9662 9663function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } 9664 9665 9666 9667 9668 9669 9670/** 9671 * Sticky module. 9672 * @module foundation.sticky 9673 * @requires foundation.util.triggers 9674 * @requires foundation.util.mediaQuery 9675 */ 9676 9677var Sticky = 9678/*#__PURE__*/ 9679function (_Plugin) { 9680 _inherits(Sticky, _Plugin); 9681 9682 function Sticky() { 9683 _classCallCheck(this, Sticky); 9684 9685 return _possibleConstructorReturn(this, _getPrototypeOf(Sticky).apply(this, arguments)); 9686 } 9687 9688 _createClass(Sticky, [{ 9689 key: "_setup", 9690 9691 /** 9692 * Creates a new instance of a sticky thing. 9693 * @class 9694 * @name Sticky 9695 * @param {jQuery} element - jQuery object to make sticky. 9696 * @param {Object} options - options object passed when creating the element programmatically. 9697 */ 9698 value: function _setup(element, options) { 9699 this.$element = element; 9700 this.options = jquery__WEBPACK_IMPORTED_MODULE_0___default.a.extend({}, Sticky.defaults, this.$element.data(), options); 9701 this.className = 'Sticky'; // ie9 back compat 9702 // Triggers init is idempotent, just need to make sure it is initialized 9703 9704 _foundation_util_triggers__WEBPACK_IMPORTED_MODULE_4__["Triggers"].init(jquery__WEBPACK_IMPORTED_MODULE_0___default.a); 9705 9706 this._init(); 9707 } 9708 /** 9709 * Initializes the sticky element by adding classes, getting/setting dimensions, breakpoints and attributes 9710 * @function 9711 * @private 9712 */ 9713 9714 }, { 9715 key: "_init", 9716 value: function _init() { 9717 _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_2__["MediaQuery"]._init(); 9718 9719 var $parent = this.$element.parent('[data-sticky-container]'), 9720 id = this.$element[0].id || Object(_foundation_util_core__WEBPACK_IMPORTED_MODULE_1__["GetYoDigits"])(6, 'sticky'), 9721 _this = this; 9722 9723 if ($parent.length) { 9724 this.$container = $parent; 9725 } else { 9726 this.wasWrapped = true; 9727 this.$element.wrap(this.options.container); 9728 this.$container = this.$element.parent(); 9729 } 9730 9731 this.$container.addClass(this.options.containerClass); 9732 this.$element.addClass(this.options.stickyClass).attr({ 9733 'data-resize': id, 9734 'data-mutate': id 9735 }); 9736 9737 if (this.options.anchor !== '') { 9738 jquery__WEBPACK_IMPORTED_MODULE_0___default()('#' + _this.options.anchor).attr({ 9739 'data-mutate': id 9740 }); 9741 } 9742 9743 this.scrollCount = this.options.checkEvery; 9744 this.isStuck = false; 9745 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).one('load.zf.sticky', function () { 9746 //We calculate the container height to have correct values for anchor points offset calculation. 9747 _this.containerHeight = _this.$element.css("display") == "none" ? 0 : _this.$element[0].getBoundingClientRect().height; 9748 9749 _this.$container.css('height', _this.containerHeight); 9750 9751 _this.elemHeight = _this.containerHeight; 9752 9753 if (_this.options.anchor !== '') { 9754 _this.$anchor = jquery__WEBPACK_IMPORTED_MODULE_0___default()('#' + _this.options.anchor); 9755 } else { 9756 _this._parsePoints(); 9757 } 9758 9759 _this._setSizes(function () { 9760 var scroll = window.pageYOffset; 9761 9762 _this._calc(false, scroll); //Unstick the element will ensure that proper classes are set. 9763 9764 9765 if (!_this.isStuck) { 9766 _this._removeSticky(scroll >= _this.topPoint ? false : true); 9767 } 9768 }); 9769 9770 _this._events(id.split('-').reverse().join('-')); 9771 }); 9772 } 9773 /** 9774 * If using multiple elements as anchors, calculates the top and bottom pixel values the sticky thing should stick and unstick on. 9775 * @function 9776 * @private 9777 */ 9778 9779 }, { 9780 key: "_parsePoints", 9781 value: function _parsePoints() { 9782 var top = this.options.topAnchor == "" ? 1 : this.options.topAnchor, 9783 btm = this.options.btmAnchor == "" ? document.documentElement.scrollHeight : this.options.btmAnchor, 9784 pts = [top, btm], 9785 breaks = {}; 9786 9787 for (var i = 0, len = pts.length; i < len && pts[i]; i++) { 9788 var pt; 9789 9790 if (typeof pts[i] === 'number') { 9791 pt = pts[i]; 9792 } else { 9793 var place = pts[i].split(':'), 9794 anchor = jquery__WEBPACK_IMPORTED_MODULE_0___default()("#".concat(place[0])); 9795 pt = anchor.offset().top; 9796 9797 if (place[1] && place[1].toLowerCase() === 'bottom') { 9798 pt += anchor[0].getBoundingClientRect().height; 9799 } 9800 } 9801 9802 breaks[i] = pt; 9803 } 9804 9805 this.points = breaks; 9806 return; 9807 } 9808 /** 9809 * Adds event handlers for the scrolling element. 9810 * @private 9811 * @param {String} id - pseudo-random id for unique scroll event listener. 9812 */ 9813 9814 }, { 9815 key: "_events", 9816 value: function _events(id) { 9817 var _this = this, 9818 scrollListener = this.scrollListener = "scroll.zf.".concat(id); 9819 9820 if (this.isOn) { 9821 return; 9822 } 9823 9824 if (this.canStick) { 9825 this.isOn = true; 9826 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).off(scrollListener).on(scrollListener, function (e) { 9827 if (_this.scrollCount === 0) { 9828 _this.scrollCount = _this.options.checkEvery; 9829 9830 _this._setSizes(function () { 9831 _this._calc(false, window.pageYOffset); 9832 }); 9833 } else { 9834 _this.scrollCount--; 9835 9836 _this._calc(false, window.pageYOffset); 9837 } 9838 }); 9839 } 9840 9841 this.$element.off('resizeme.zf.trigger').on('resizeme.zf.trigger', function (e, el) { 9842 _this._eventsHandler(id); 9843 }); 9844 this.$element.on('mutateme.zf.trigger', function (e, el) { 9845 _this._eventsHandler(id); 9846 }); 9847 9848 if (this.$anchor) { 9849 this.$anchor.on('mutateme.zf.trigger', function (e, el) { 9850 _this._eventsHandler(id); 9851 }); 9852 } 9853 } 9854 /** 9855 * Handler for events. 9856 * @private 9857 * @param {String} id - pseudo-random id for unique scroll event listener. 9858 */ 9859 9860 }, { 9861 key: "_eventsHandler", 9862 value: function _eventsHandler(id) { 9863 var _this = this, 9864 scrollListener = this.scrollListener = "scroll.zf.".concat(id); 9865 9866 _this._setSizes(function () { 9867 _this._calc(false); 9868 9869 if (_this.canStick) { 9870 if (!_this.isOn) { 9871 _this._events(id); 9872 } 9873 } else if (_this.isOn) { 9874 _this._pauseListeners(scrollListener); 9875 } 9876 }); 9877 } 9878 /** 9879 * Removes event handlers for scroll and change events on anchor. 9880 * @fires Sticky#pause 9881 * @param {String} scrollListener - unique, namespaced scroll listener attached to `window` 9882 */ 9883 9884 }, { 9885 key: "_pauseListeners", 9886 value: function _pauseListeners(scrollListener) { 9887 this.isOn = false; 9888 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).off(scrollListener); 9889 /** 9890 * Fires when the plugin is paused due to resize event shrinking the view. 9891 * @event Sticky#pause 9892 * @private 9893 */ 9894 9895 this.$element.trigger('pause.zf.sticky'); 9896 } 9897 /** 9898 * Called on every `scroll` event and on `_init` 9899 * fires functions based on booleans and cached values 9900 * @param {Boolean} checkSizes - true if plugin should recalculate sizes and breakpoints. 9901 * @param {Number} scroll - current scroll position passed from scroll event cb function. If not passed, defaults to `window.pageYOffset`. 9902 */ 9903 9904 }, { 9905 key: "_calc", 9906 value: function _calc(checkSizes, scroll) { 9907 if (checkSizes) { 9908 this._setSizes(); 9909 } 9910 9911 if (!this.canStick) { 9912 if (this.isStuck) { 9913 this._removeSticky(true); 9914 } 9915 9916 return false; 9917 } 9918 9919 if (!scroll) { 9920 scroll = window.pageYOffset; 9921 } 9922 9923 if (scroll >= this.topPoint) { 9924 if (scroll <= this.bottomPoint) { 9925 if (!this.isStuck) { 9926 this._setSticky(); 9927 } 9928 } else { 9929 if (this.isStuck) { 9930 this._removeSticky(false); 9931 } 9932 } 9933 } else { 9934 if (this.isStuck) { 9935 this._removeSticky(true); 9936 } 9937 } 9938 } 9939 /** 9940 * Causes the $element to become stuck. 9941 * Adds `position: fixed;`, and helper classes. 9942 * @fires Sticky#stuckto 9943 * @function 9944 * @private 9945 */ 9946 9947 }, { 9948 key: "_setSticky", 9949 value: function _setSticky() { 9950 var _this = this, 9951 stickTo = this.options.stickTo, 9952 mrgn = stickTo === 'top' ? 'marginTop' : 'marginBottom', 9953 notStuckTo = stickTo === 'top' ? 'bottom' : 'top', 9954 css = {}; 9955 9956 css[mrgn] = "".concat(this.options[mrgn], "em"); 9957 css[stickTo] = 0; 9958 css[notStuckTo] = 'auto'; 9959 this.isStuck = true; 9960 this.$element.removeClass("is-anchored is-at-".concat(notStuckTo)).addClass("is-stuck is-at-".concat(stickTo)).css(css) 9961 /** 9962 * Fires when the $element has become `position: fixed;` 9963 * Namespaced to `top` or `bottom`, e.g. `sticky.zf.stuckto:top` 9964 * @event Sticky#stuckto 9965 */ 9966 .trigger("sticky.zf.stuckto:".concat(stickTo)); 9967 this.$element.on("transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd", function () { 9968 _this._setSizes(); 9969 }); 9970 } 9971 /** 9972 * Causes the $element to become unstuck. 9973 * Removes `position: fixed;`, and helper classes. 9974 * Adds other helper classes. 9975 * @param {Boolean} isTop - tells the function if the $element should anchor to the top or bottom of its $anchor element. 9976 * @fires Sticky#unstuckfrom 9977 * @private 9978 */ 9979 9980 }, { 9981 key: "_removeSticky", 9982 value: function _removeSticky(isTop) { 9983 var stickTo = this.options.stickTo, 9984 stickToTop = stickTo === 'top', 9985 css = {}, 9986 anchorPt = (this.points ? this.points[1] - this.points[0] : this.anchorHeight) - this.elemHeight, 9987 mrgn = stickToTop ? 'marginTop' : 'marginBottom', 9988 notStuckTo = stickToTop ? 'bottom' : 'top', 9989 topOrBottom = isTop ? 'top' : 'bottom'; 9990 css[mrgn] = 0; 9991 css['bottom'] = 'auto'; 9992 9993 if (isTop) { 9994 css['top'] = 0; 9995 } else { 9996 css['top'] = anchorPt; 9997 } 9998 9999 this.isStuck = false; 10000 this.$element.removeClass("is-stuck is-at-".concat(stickTo)).addClass("is-anchored is-at-".concat(topOrBottom)).css(css) 10001 /** 10002 * Fires when the $element has become anchored. 10003 * Namespaced to `top` or `bottom`, e.g. `sticky.zf.unstuckfrom:bottom` 10004 * @event Sticky#unstuckfrom 10005 */ 10006 .trigger("sticky.zf.unstuckfrom:".concat(topOrBottom)); 10007 } 10008 /** 10009 * Sets the $element and $container sizes for plugin. 10010 * Calls `_setBreakPoints`. 10011 * @param {Function} cb - optional callback function to fire on completion of `_setBreakPoints`. 10012 * @private 10013 */ 10014 10015 }, { 10016 key: "_setSizes", 10017 value: function _setSizes(cb) { 10018 this.canStick = _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_2__["MediaQuery"].is(this.options.stickyOn); 10019 10020 if (!this.canStick) { 10021 if (cb && typeof cb === 'function') { 10022 cb(); 10023 } 10024 } 10025 10026 var _this = this, 10027 newElemWidth = this.$container[0].getBoundingClientRect().width, 10028 comp = window.getComputedStyle(this.$container[0]), 10029 pdngl = parseInt(comp['padding-left'], 10), 10030 pdngr = parseInt(comp['padding-right'], 10); 10031 10032 if (this.$anchor && this.$anchor.length) { 10033 this.anchorHeight = this.$anchor[0].getBoundingClientRect().height; 10034 } else { 10035 this._parsePoints(); 10036 } 10037 10038 this.$element.css({ 10039 'max-width': "".concat(newElemWidth - pdngl - pdngr, "px") 10040 }); 10041 var newContainerHeight = this.$element[0].getBoundingClientRect().height || this.containerHeight; 10042 10043 if (this.$element.css("display") == "none") { 10044 newContainerHeight = 0; 10045 } 10046 10047 this.containerHeight = newContainerHeight; 10048 this.$container.css({ 10049 height: newContainerHeight 10050 }); 10051 this.elemHeight = newContainerHeight; 10052 10053 if (!this.isStuck) { 10054 if (this.$element.hasClass('is-at-bottom')) { 10055 var anchorPt = (this.points ? this.points[1] - this.$container.offset().top : this.anchorHeight) - this.elemHeight; 10056 this.$element.css('top', anchorPt); 10057 } 10058 } 10059 10060 this._setBreakPoints(newContainerHeight, function () { 10061 if (cb && typeof cb === 'function') { 10062 cb(); 10063 } 10064 }); 10065 } 10066 /** 10067 * Sets the upper and lower breakpoints for the element to become sticky/unsticky. 10068 * @param {Number} elemHeight - px value for sticky.$element height, calculated by `_setSizes`. 10069 * @param {Function} cb - optional callback function to be called on completion. 10070 * @private 10071 */ 10072 10073 }, { 10074 key: "_setBreakPoints", 10075 value: function _setBreakPoints(elemHeight, cb) { 10076 if (!this.canStick) { 10077 if (cb && typeof cb === 'function') { 10078 cb(); 10079 } else { 10080 return false; 10081 } 10082 } 10083 10084 var mTop = emCalc(this.options.marginTop), 10085 mBtm = emCalc(this.options.marginBottom), 10086 topPoint = this.points ? this.points[0] : this.$anchor.offset().top, 10087 bottomPoint = this.points ? this.points[1] : topPoint + this.anchorHeight, 10088 // topPoint = this.$anchor.offset().top || this.points[0], 10089 // bottomPoint = topPoint + this.anchorHeight || this.points[1], 10090 winHeight = window.innerHeight; 10091 10092 if (this.options.stickTo === 'top') { 10093 topPoint -= mTop; 10094 bottomPoint -= elemHeight + mTop; 10095 } else if (this.options.stickTo === 'bottom') { 10096 topPoint -= winHeight - (elemHeight + mBtm); 10097 bottomPoint -= winHeight - mBtm; 10098 } else {//this would be the stickTo: both option... tricky 10099 } 10100 10101 this.topPoint = topPoint; 10102 this.bottomPoint = bottomPoint; 10103 10104 if (cb && typeof cb === 'function') { 10105 cb(); 10106 } 10107 } 10108 /** 10109 * Destroys the current sticky element. 10110 * Resets the element to the top position first. 10111 * Removes event listeners, JS-added css properties and classes, and unwraps the $element if the JS added the $container. 10112 * @function 10113 */ 10114 10115 }, { 10116 key: "_destroy", 10117 value: function _destroy() { 10118 this._removeSticky(true); 10119 10120 this.$element.removeClass("".concat(this.options.stickyClass, " is-anchored is-at-top")).css({ 10121 height: '', 10122 top: '', 10123 bottom: '', 10124 'max-width': '' 10125 }).off('resizeme.zf.trigger').off('mutateme.zf.trigger'); 10126 10127 if (this.$anchor && this.$anchor.length) { 10128 this.$anchor.off('change.zf.sticky'); 10129 } 10130 10131 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).off(this.scrollListener); 10132 10133 if (this.wasWrapped) { 10134 this.$element.unwrap(); 10135 } else { 10136 this.$container.removeClass(this.options.containerClass).css({ 10137 height: '' 10138 }); 10139 } 10140 } 10141 }]); 10142 10143 return Sticky; 10144}(_foundation_plugin__WEBPACK_IMPORTED_MODULE_3__["Plugin"]); 10145 10146Sticky.defaults = { 10147 /** 10148 * Customizable container template. Add your own classes for styling and sizing. 10149 * @option 10150 * @type {string} 10151 * @default '<div data-sticky-container></div>' 10152 */ 10153 container: '<div data-sticky-container></div>', 10154 10155 /** 10156 * Location in the view the element sticks to. Can be `'top'` or `'bottom'`. 10157 * @option 10158 * @type {string} 10159 * @default 'top' 10160 */ 10161 stickTo: 'top', 10162 10163 /** 10164 * If anchored to a single element, the id of that element. 10165 * @option 10166 * @type {string} 10167 * @default '' 10168 */ 10169 anchor: '', 10170 10171 /** 10172 * If using more than one element as anchor points, the id of the top anchor. 10173 * @option 10174 * @type {string} 10175 * @default '' 10176 */ 10177 topAnchor: '', 10178 10179 /** 10180 * If using more than one element as anchor points, the id of the bottom anchor. 10181 * @option 10182 * @type {string} 10183 * @default '' 10184 */ 10185 btmAnchor: '', 10186 10187 /** 10188 * Margin, in `em`'s to apply to the top of the element when it becomes sticky. 10189 * @option 10190 * @type {number} 10191 * @default 1 10192 */ 10193 marginTop: 1, 10194 10195 /** 10196 * Margin, in `em`'s to apply to the bottom of the element when it becomes sticky. 10197 * @option 10198 * @type {number} 10199 * @default 1 10200 */ 10201 marginBottom: 1, 10202 10203 /** 10204 * Breakpoint string that is the minimum screen size an element should become sticky. 10205 * @option 10206 * @type {string} 10207 * @default 'medium' 10208 */ 10209 stickyOn: 'medium', 10210 10211 /** 10212 * Class applied to sticky element, and removed on destruction. Foundation defaults to `sticky`. 10213 * @option 10214 * @type {string} 10215 * @default 'sticky' 10216 */ 10217 stickyClass: 'sticky', 10218 10219 /** 10220 * Class applied to sticky container. Foundation defaults to `sticky-container`. 10221 * @option 10222 * @type {string} 10223 * @default 'sticky-container' 10224 */ 10225 containerClass: 'sticky-container', 10226 10227 /** 10228 * Number of scroll events between the plugin's recalculating sticky points. Setting it to `0` will cause it to recalc every scroll event, setting it to `-1` will prevent recalc on scroll. 10229 * @option 10230 * @type {number} 10231 * @default -1 10232 */ 10233 checkEvery: -1 10234}; 10235/** 10236 * Helper function to calculate em values 10237 * @param Number {em} - number of em's to calculate into pixels 10238 */ 10239 10240function emCalc(em) { 10241 return parseInt(window.getComputedStyle(document.body, null).fontSize, 10) * em; 10242} 10243 10244 10245 10246/***/ }), 10247
vendor: 19,579 bytes, lines 10248-10813
10248/***/ "./node_modules/foundation-sites/js/foundation.tabs.js": 10249/*!*************************************************************!*\ 10250 !*** ./node_modules/foundation-sites/js/foundation.tabs.js ***! 10251 \*************************************************************/ 10252/*! exports provided: Tabs */ 10253/***/ (function(module, __webpack_exports__, __webpack_require__) { 10254 10255"use strict"; 10256__webpack_require__.r(__webpack_exports__); 10257/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Tabs", function() { return Tabs; }); 10258/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"); 10259/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 10260/* harmony import */ var _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.util.keyboard */ "./node_modules/foundation-sites/js/foundation.util.keyboard.js"); 10261/* harmony import */ var _foundation_util_imageLoader__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation.util.imageLoader */ "./node_modules/foundation-sites/js/foundation.util.imageLoader.js"); 10262/* harmony import */ var _foundation_plugin__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./foundation.plugin */ "./node_modules/foundation-sites/js/foundation.plugin.js"); 10263 10264 10265function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 10266 10267function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 10268 10269function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 10270 10271function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } 10272 10273function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } 10274 10275function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } 10276 10277function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } 10278 10279function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } 10280 10281function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } 10282 10283 10284 10285 10286 10287/** 10288 * Tabs module. 10289 * @module foundation.tabs 10290 * @requires foundation.util.keyboard 10291 * @requires foundation.util.imageLoader if tabs contain images 10292 */ 10293 10294var Tabs = 10295/*#__PURE__*/ 10296function (_Plugin) { 10297 _inherits(Tabs, _Plugin); 10298 10299 function Tabs() { 10300 _classCallCheck(this, Tabs); 10301 10302 return _possibleConstructorReturn(this, _getPrototypeOf(Tabs).apply(this, arguments)); 10303 } 10304 10305 _createClass(Tabs, [{ 10306 key: "_setup", 10307 10308 /** 10309 * Creates a new instance of tabs. 10310 * @class 10311 * @name Tabs 10312 * @fires Tabs#init 10313 * @param {jQuery} element - jQuery object to make into tabs. 10314 * @param {Object} options - Overrides to the default plugin settings. 10315 */ 10316 value: function _setup(element, options) { 10317 this.$element = element; 10318 this.options = jquery__WEBPACK_IMPORTED_MODULE_0___default.a.extend({}, Tabs.defaults, this.$element.data(), options); 10319 this.className = 'Tabs'; // ie9 back compat 10320 10321 this._init(); 10322 10323 _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__["Keyboard"].register('Tabs', { 10324 'ENTER': 'open', 10325 'SPACE': 'open', 10326 'ARROW_RIGHT': 'next', 10327 'ARROW_UP': 'previous', 10328 'ARROW_DOWN': 'next', 10329 'ARROW_LEFT': 'previous' // 'TAB': 'next', 10330 // 'SHIFT_TAB': 'previous' 10331 10332 }); 10333 } 10334 /** 10335 * Initializes the tabs by showing and focusing (if autoFocus=true) the preset active tab. 10336 * @private 10337 */ 10338 10339 }, { 10340 key: "_init", 10341 value: function _init() { 10342 var _this2 = this; 10343 10344 var _this = this; 10345 10346 this.$element.attr({ 10347 'role': 'tablist' 10348 }); 10349 this.$tabTitles = this.$element.find(".".concat(this.options.linkClass)); 10350 this.$tabContent = jquery__WEBPACK_IMPORTED_MODULE_0___default()("[data-tabs-content=\"".concat(this.$element[0].id, "\"]")); 10351 this.$tabTitles.each(function () { 10352 var $elem = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), 10353 $link = $elem.find('a'), 10354 isActive = $elem.hasClass("".concat(_this.options.linkActiveClass)), 10355 hash = $link.attr('data-tabs-target') || $link[0].hash.slice(1), 10356 linkId = $link[0].id ? $link[0].id : "".concat(hash, "-label"), 10357 $tabContent = jquery__WEBPACK_IMPORTED_MODULE_0___default()("#".concat(hash)); 10358 $elem.attr({ 10359 'role': 'presentation' 10360 }); 10361 $link.attr({ 10362 'role': 'tab', 10363 'aria-controls': hash, 10364 'aria-selected': isActive, 10365 'id': linkId, 10366 'tabindex': isActive ? '0' : '-1' 10367 }); 10368 $tabContent.attr({ 10369 'role': 'tabpanel', 10370 'aria-labelledby': linkId 10371 }); 10372 10373 if (!isActive) { 10374 $tabContent.attr('aria-hidden', 'true'); 10375 } 10376 10377 if (isActive && _this.options.autoFocus) { 10378 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).load(function () { 10379 jquery__WEBPACK_IMPORTED_MODULE_0___default()('html, body').animate({ 10380 scrollTop: $elem.offset().top 10381 }, _this.options.deepLinkSmudgeDelay, function () { 10382 $link.focus(); 10383 }); 10384 }); 10385 } 10386 }); 10387 10388 if (this.options.matchHeight) { 10389 var $images = this.$tabContent.find('img'); 10390 10391 if ($images.length) { 10392 Object(_foundation_util_imageLoader__WEBPACK_IMPORTED_MODULE_2__["onImagesLoaded"])($images, this._setHeight.bind(this)); 10393 } else { 10394 this._setHeight(); 10395 } 10396 } //current context-bound function to open tabs on page load or history popstate 10397 10398 10399 this._checkDeepLink = function () { 10400 var anchor = window.location.hash; //need a hash and a relevant anchor in this tabset 10401 10402 if (anchor.length) { 10403 var $link = _this2.$element.find('[href$="' + anchor + '"]'); 10404 10405 if ($link.length) { 10406 _this2.selectTab(jquery__WEBPACK_IMPORTED_MODULE_0___default()(anchor), true); //roll up a little to show the titles 10407 10408 10409 if (_this2.options.deepLinkSmudge) { 10410 var offset = _this2.$element.offset(); 10411 10412 jquery__WEBPACK_IMPORTED_MODULE_0___default()('html, body').animate({ 10413 scrollTop: offset.top 10414 }, _this2.options.deepLinkSmudgeDelay); 10415 } 10416 /** 10417 * Fires when the zplugin has deeplinked at pageload 10418 * @event Tabs#deeplink 10419 */ 10420 10421 10422 _this2.$element.trigger('deeplink.zf.tabs', [$link, jquery__WEBPACK_IMPORTED_MODULE_0___default()(anchor)]); 10423 } 10424 } 10425 }; //use browser to open a tab, if it exists in this tabset 10426 10427 10428 if (this.options.deepLink) { 10429 this._checkDeepLink(); 10430 } 10431 10432 this._events(); 10433 } 10434 /** 10435 * Adds event handlers for items within the tabs. 10436 * @private 10437 */ 10438 10439 }, { 10440 key: "_events", 10441 value: function _events() { 10442 this._addKeyHandler(); 10443 10444 this._addClickHandler(); 10445 10446 this._setHeightMqHandler = null; 10447 10448 if (this.options.matchHeight) { 10449 this._setHeightMqHandler = this._setHeight.bind(this); 10450 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).on('changed.zf.mediaquery', this._setHeightMqHandler); 10451 } 10452 10453 if (this.options.deepLink) { 10454 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).on('popstate', this._checkDeepLink); 10455 } 10456 } 10457 /** 10458 * Adds click handlers for items within the tabs. 10459 * @private 10460 */ 10461 10462 }, { 10463 key: "_addClickHandler", 10464 value: function _addClickHandler() { 10465 var _this = this; 10466 10467 this.$element.off('click.zf.tabs').on('click.zf.tabs', ".".concat(this.options.linkClass), function (e) { 10468 e.preventDefault(); 10469 e.stopPropagation(); 10470 10471 _this._handleTabChange(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this)); 10472 }); 10473 } 10474 /** 10475 * Adds keyboard event handlers for items within the tabs. 10476 * @private 10477 */ 10478 10479 }, { 10480 key: "_addKeyHandler", 10481 value: function _addKeyHandler() { 10482 var _this = this; 10483 10484 this.$tabTitles.off('keydown.zf.tabs').on('keydown.zf.tabs', function (e) { 10485 if (e.which === 9) return; 10486 var $element = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), 10487 $elements = $element.parent('ul').children('li'), 10488 $prevElement, 10489 $nextElement; 10490 $elements.each(function (i) { 10491 if (jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).is($element)) { 10492 if (_this.options.wrapOnKeys) { 10493 $prevElement = i === 0 ? $elements.last() : $elements.eq(i - 1); 10494 $nextElement = i === $elements.length - 1 ? $elements.first() : $elements.eq(i + 1); 10495 } else { 10496 $prevElement = $elements.eq(Math.max(0, i - 1)); 10497 $nextElement = $elements.eq(Math.min(i + 1, $elements.length - 1)); 10498 } 10499 10500 return; 10501 } 10502 }); // handle keyboard event with keyboard util 10503 10504 _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__["Keyboard"].handleKey(e, 'Tabs', { 10505 open: function open() { 10506 $element.find('[role="tab"]').focus(); 10507 10508 _this._handleTabChange($element); 10509 }, 10510 previous: function previous() { 10511 $prevElement.find('[role="tab"]').focus(); 10512 10513 _this._handleTabChange($prevElement); 10514 }, 10515 next: function next() { 10516 $nextElement.find('[role="tab"]').focus(); 10517 10518 _this._handleTabChange($nextElement); 10519 }, 10520 handled: function handled() { 10521 e.stopPropagation(); 10522 e.preventDefault(); 10523 } 10524 }); 10525 }); 10526 } 10527 /** 10528 * Opens the tab `$targetContent` defined by `$target`. Collapses active tab. 10529 * @param {jQuery} $target - Tab to open. 10530 * @param {boolean} historyHandled - browser has already handled a history update 10531 * @fires Tabs#change 10532 * @function 10533 */ 10534 10535 }, { 10536 key: "_handleTabChange", 10537 value: function _handleTabChange($target, historyHandled) { 10538 /** 10539 * Check for active class on target. Collapse if exists. 10540 */ 10541 if ($target.hasClass("".concat(this.options.linkActiveClass))) { 10542 if (this.options.activeCollapse) { 10543 this._collapseTab($target); 10544 /** 10545 * Fires when the zplugin has successfully collapsed tabs. 10546 * @event Tabs#collapse 10547 */ 10548 10549 10550 this.$element.trigger('collapse.zf.tabs', [$target]); 10551 } 10552 10553 return; 10554 } 10555 10556 var $oldTab = this.$element.find(".".concat(this.options.linkClass, ".").concat(this.options.linkActiveClass)), 10557 $tabLink = $target.find('[role="tab"]'), 10558 hash = $tabLink.attr('data-tabs-target') || $tabLink[0].hash.slice(1), 10559 $targetContent = this.$tabContent.find("#".concat(hash)); //close old tab 10560 10561 this._collapseTab($oldTab); //open new tab 10562 10563 10564 this._openTab($target); //either replace or update browser history 10565 10566 10567 if (this.options.deepLink && !historyHandled) { 10568 var anchor = $target.find('a').attr('href'); 10569 10570 if (this.options.updateHistory) { 10571 history.pushState({}, '', anchor); 10572 } else { 10573 history.replaceState({}, '', anchor); 10574 } 10575 } 10576 /** 10577 * Fires when the plugin has successfully changed tabs. 10578 * @event Tabs#change 10579 */ 10580 10581 10582 this.$element.trigger('change.zf.tabs', [$target, $targetContent]); //fire to children a mutation event 10583 10584 $targetContent.find("[data-mutate]").trigger("mutateme.zf.trigger"); 10585 } 10586 /** 10587 * Opens the tab `$targetContent` defined by `$target`. 10588 * @param {jQuery} $target - Tab to Open. 10589 * @function 10590 */ 10591 10592 }, { 10593 key: "_openTab", 10594 value: function _openTab($target) { 10595 var $tabLink = $target.find('[role="tab"]'), 10596 hash = $tabLink.attr('data-tabs-target') || $tabLink[0].hash.slice(1), 10597 $targetContent = this.$tabContent.find("#".concat(hash)); 10598 $target.addClass("".concat(this.options.linkActiveClass)); 10599 $tabLink.attr({ 10600 'aria-selected': 'true', 10601 'tabindex': '0' 10602 }); 10603 $targetContent.addClass("".concat(this.options.panelActiveClass)).removeAttr('aria-hidden'); 10604 } 10605 /** 10606 * Collapses `$targetContent` defined by `$target`. 10607 * @param {jQuery} $target - Tab to Open. 10608 * @function 10609 */ 10610 10611 }, { 10612 key: "_collapseTab", 10613 value: function _collapseTab($target) { 10614 var $target_anchor = $target.removeClass("".concat(this.options.linkActiveClass)).find('[role="tab"]').attr({ 10615 'aria-selected': 'false', 10616 'tabindex': -1 10617 }); 10618 jquery__WEBPACK_IMPORTED_MODULE_0___default()("#".concat($target_anchor.attr('aria-controls'))).removeClass("".concat(this.options.panelActiveClass)).attr({ 10619 'aria-hidden': 'true' 10620 }); 10621 } 10622 /** 10623 * Public method for selecting a content pane to display. 10624 * @param {jQuery | String} elem - jQuery object or string of the id of the pane to display. 10625 * @param {boolean} historyHandled - browser has already handled a history update 10626 * @function 10627 */ 10628 10629 }, { 10630 key: "selectTab", 10631 value: function selectTab(elem, historyHandled) { 10632 var idStr; 10633 10634 if (_typeof(elem) === 'object') { 10635 idStr = elem[0].id; 10636 } else { 10637 idStr = elem; 10638 } 10639 10640 if (idStr.indexOf('#') < 0) { 10641 idStr = "#".concat(idStr); 10642 } 10643 10644 var $target = this.$tabTitles.find("[href$=\"".concat(idStr, "\"]")).parent(".".concat(this.options.linkClass)); 10645 10646 this._handleTabChange($target, historyHandled); 10647 } 10648 }, { 10649 key: "_setHeight", 10650 10651 /** 10652 * Sets the height of each panel to the height of the tallest panel. 10653 * If enabled in options, gets called on media query change. 10654 * If loading content via external source, can be called directly or with _reflow. 10655 * If enabled with `data-match-height="true"`, tabs sets to equal height 10656 * @function 10657 * @private 10658 */ 10659 value: function _setHeight() { 10660 var max = 0, 10661 _this = this; // Lock down the `this` value for the root tabs object 10662 10663 10664 this.$tabContent.find(".".concat(this.options.panelClass)).css('height', '').each(function () { 10665 var panel = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), 10666 isActive = panel.hasClass("".concat(_this.options.panelActiveClass)); // get the options from the parent instead of trying to get them from the child 10667 10668 if (!isActive) { 10669 panel.css({ 10670 'visibility': 'hidden', 10671 'display': 'block' 10672 }); 10673 } 10674 10675 var temp = this.getBoundingClientRect().height; 10676 10677 if (!isActive) { 10678 panel.css({ 10679 'visibility': '', 10680 'display': '' 10681 }); 10682 } 10683 10684 max = temp > max ? temp : max; 10685 }).css('height', "".concat(max, "px")); 10686 } 10687 /** 10688 * Destroys an instance of an tabs. 10689 * @fires Tabs#destroyed 10690 */ 10691 10692 }, { 10693 key: "_destroy", 10694 value: function _destroy() { 10695 this.$element.find(".".concat(this.options.linkClass)).off('.zf.tabs').hide().end().find(".".concat(this.options.panelClass)).hide(); 10696 10697 if (this.options.matchHeight) { 10698 if (this._setHeightMqHandler != null) { 10699 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).off('changed.zf.mediaquery', this._setHeightMqHandler); 10700 } 10701 } 10702 10703 if (this.options.deepLink) { 10704 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).off('popstate', this._checkDeepLink); 10705 } 10706 } 10707 }]); 10708 10709 return Tabs; 10710}(_foundation_plugin__WEBPACK_IMPORTED_MODULE_3__["Plugin"]); 10711 10712Tabs.defaults = { 10713 /** 10714 * Allows the window to scroll to content of pane specified by hash anchor 10715 * @option 10716 * @type {boolean} 10717 * @default false 10718 */ 10719 deepLink: false, 10720 10721 /** 10722 * Adjust the deep link scroll to make sure the top of the tab panel is visible 10723 * @option 10724 * @type {boolean} 10725 * @default false 10726 */ 10727 deepLinkSmudge: false, 10728 10729 /** 10730 * Animation time (ms) for the deep link adjustment 10731 * @option 10732 * @type {number} 10733 * @default 300 10734 */ 10735 deepLinkSmudgeDelay: 300, 10736 10737 /** 10738 * Update the browser history with the open tab 10739 * @option 10740 * @type {boolean} 10741 * @default false 10742 */ 10743 updateHistory: false, 10744 10745 /** 10746 * Allows the window to scroll to content of active pane on load if set to true. 10747 * Not recommended if more than one tab panel per page. 10748 * @option 10749 * @type {boolean} 10750 * @default false 10751 */ 10752 autoFocus: false, 10753 10754 /** 10755 * Allows keyboard input to 'wrap' around the tab links. 10756 * @option 10757 * @type {boolean} 10758 * @default true 10759 */ 10760 wrapOnKeys: true, 10761 10762 /** 10763 * Allows the tab content panes to match heights if set to true. 10764 * @option 10765 * @type {boolean} 10766 * @default false 10767 */ 10768 matchHeight: false, 10769 10770 /** 10771 * Allows active tabs to collapse when clicked. 10772 * @option 10773 * @type {boolean} 10774 * @default false 10775 */ 10776 activeCollapse: false, 10777 10778 /** 10779 * Class applied to `li`'s in tab link list. 10780 * @option 10781 * @type {string} 10782 * @default 'tabs-title' 10783 */ 10784 linkClass: 'tabs-title', 10785 10786 /** 10787 * Class applied to the active `li` in tab link list. 10788 * @option 10789 * @type {string} 10790 * @default 'is-active' 10791 */ 10792 linkActiveClass: 'is-active', 10793 10794 /** 10795 * Class applied to the content containers. 10796 * @option 10797 * @type {string} 10798 * @default 'tabs-panel' 10799 */ 10800 panelClass: 'tabs-panel', 10801 10802 /** 10803 * Class applied to the active content container. 10804 * @option 10805 * @type {string} 10806 * @default 'is-active' 10807 */ 10808 panelActiveClass: 'is-active' 10809}; 10810 10811 10812/***/ }), 10813
vendor: 8,766 bytes, lines 10814-11023
10814/***/ "./node_modules/foundation-sites/js/foundation.toggler.js": 10815/*!****************************************************************!*\ 10816 !*** ./node_modules/foundation-sites/js/foundation.toggler.js ***! 10817 \****************************************************************/ 10818/*! exports provided: Toggler */ 10819/***/ (function(module, __webpack_exports__, __webpack_require__) { 10820 10821"use strict"; 10822__webpack_require__.r(__webpack_exports__); 10823/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Toggler", function() { return Toggler; }); 10824/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"); 10825/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 10826/* harmony import */ var _foundation_util_motion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.util.motion */ "./node_modules/foundation-sites/js/foundation.util.motion.js"); 10827/* harmony import */ var _foundation_plugin__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation.plugin */ "./node_modules/foundation-sites/js/foundation.plugin.js"); 10828/* harmony import */ var _foundation_util_triggers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./foundation.util.triggers */ "./node_modules/foundation-sites/js/foundation.util.triggers.js"); 10829 10830 10831function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 10832 10833function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 10834 10835function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 10836 10837function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } 10838 10839function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } 10840 10841function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } 10842 10843function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } 10844 10845function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } 10846 10847function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } 10848 10849 10850 10851 10852 10853/** 10854 * Toggler module. 10855 * @module foundation.toggler 10856 * @requires foundation.util.motion 10857 * @requires foundation.util.triggers 10858 */ 10859 10860var Toggler = 10861/*#__PURE__*/ 10862function (_Plugin) { 10863 _inherits(Toggler, _Plugin); 10864 10865 function Toggler() { 10866 _classCallCheck(this, Toggler); 10867 10868 return _possibleConstructorReturn(this, _getPrototypeOf(Toggler).apply(this, arguments)); 10869 } 10870 10871 _createClass(Toggler, [{ 10872 key: "_setup", 10873 10874 /** 10875 * Creates a new instance of Toggler. 10876 * @class 10877 * @name Toggler 10878 * @fires Toggler#init 10879 * @param {Object} element - jQuery object to add the trigger to. 10880 * @param {Object} options - Overrides to the default plugin settings. 10881 */ 10882 value: function _setup(element, options) { 10883 this.$element = element; 10884 this.options = jquery__WEBPACK_IMPORTED_MODULE_0___default.a.extend({}, Toggler.defaults, element.data(), options); 10885 this.className = ''; 10886 this.className = 'Toggler'; // ie9 back compat 10887 // Triggers init is idempotent, just need to make sure it is initialized 10888 10889 _foundation_util_triggers__WEBPACK_IMPORTED_MODULE_3__["Triggers"].init(jquery__WEBPACK_IMPORTED_MODULE_0___default.a); 10890 10891 this._init(); 10892 10893 this._events(); 10894 } 10895 /** 10896 * Initializes the Toggler plugin by parsing the toggle class from data-toggler, or animation classes from data-animate. 10897 * @function 10898 * @private 10899 */ 10900 10901 }, { 10902 key: "_init", 10903 value: function _init() { 10904 var input; // Parse animation classes if they were set 10905 10906 if (this.options.animate) { 10907 input = this.options.animate.split(' '); 10908 this.animationIn = input[0]; 10909 this.animationOut = input[1] || null; 10910 } // Otherwise, parse toggle class 10911 else { 10912 input = this.$element.data('toggler'); // Allow for a . at the beginning of the string 10913 10914 this.className = input[0] === '.' ? input.slice(1) : input; 10915 } // Add ARIA attributes to triggers 10916 10917 10918 var id = this.$element[0].id; 10919 jquery__WEBPACK_IMPORTED_MODULE_0___default()("[data-open=\"".concat(id, "\"], [data-close=\"").concat(id, "\"], [data-toggle=\"").concat(id, "\"]")).attr('aria-controls', id); // If the target is hidden, add aria-hidden 10920 10921 this.$element.attr('aria-expanded', this.$element.is(':hidden') ? false : true); 10922 } 10923 /** 10924 * Initializes events for the toggle trigger. 10925 * @function 10926 * @private 10927 */ 10928 10929 }, { 10930 key: "_events", 10931 value: function _events() { 10932 this.$element.off('toggle.zf.trigger').on('toggle.zf.trigger', this.toggle.bind(this)); 10933 } 10934 /** 10935 * Toggles the target class on the target element. An event is fired from the original trigger depending on if the resultant state was "on" or "off". 10936 * @function 10937 * @fires Toggler#on 10938 * @fires Toggler#off 10939 */ 10940 10941 }, { 10942 key: "toggle", 10943 value: function toggle() { 10944 this[this.options.animate ? '_toggleAnimate' : '_toggleClass'](); 10945 } 10946 }, { 10947 key: "_toggleClass", 10948 value: function _toggleClass() { 10949 this.$element.toggleClass(this.className); 10950 var isOn = this.$element.hasClass(this.className); 10951 10952 if (isOn) { 10953 /** 10954 * Fires if the target element has the class after a toggle. 10955 * @event Toggler#on 10956 */ 10957 this.$element.trigger('on.zf.toggler'); 10958 } else { 10959 /** 10960 * Fires if the target element does not have the class after a toggle. 10961 * @event Toggler#off 10962 */ 10963 this.$element.trigger('off.zf.toggler'); 10964 } 10965 10966 this._updateARIA(isOn); 10967 10968 this.$element.find('[data-mutate]').trigger('mutateme.zf.trigger'); 10969 } 10970 }, { 10971 key: "_toggleAnimate", 10972 value: function _toggleAnimate() { 10973 var _this = this; 10974 10975 if (this.$element.is(':hidden')) { 10976 _foundation_util_motion__WEBPACK_IMPORTED_MODULE_1__["Motion"].animateIn(this.$element, this.animationIn, function () { 10977 _this._updateARIA(true); 10978 10979 this.trigger('on.zf.toggler'); 10980 this.find('[data-mutate]').trigger('mutateme.zf.trigger'); 10981 }); 10982 } else { 10983 _foundation_util_motion__WEBPACK_IMPORTED_MODULE_1__["Motion"].animateOut(this.$element, this.animationOut, function () { 10984 _this._updateARIA(false); 10985 10986 this.trigger('off.zf.toggler'); 10987 this.find('[data-mutate]').trigger('mutateme.zf.trigger'); 10988 }); 10989 } 10990 } 10991 }, { 10992 key: "_updateARIA", 10993 value: function _updateARIA(isOn) { 10994 this.$element.attr('aria-expanded', isOn ? true : false); 10995 } 10996 /** 10997 * Destroys the instance of Toggler on the element. 10998 * @function 10999 */ 11000 11001 }, { 11002 key: "_destroy", 11003 value: function _destroy() { 11004 this.$element.off('.zf.toggler'); 11005 } 11006 }]); 11007 11008 return Toggler; 11009}(_foundation_plugin__WEBPACK_IMPORTED_MODULE_2__["Plugin"]); 11010 11011Toggler.defaults = { 11012 /** 11013 * Tells the plugin if the element should animated when toggled. 11014 * @option 11015 * @type {boolean} 11016 * @default false 11017 */ 11018 animate: false 11019}; 11020 11021 11022/***/ }), 11023
vendor: 18,839 bytes, lines 11024-11573
11024/***/ "./node_modules/foundation-sites/js/foundation.tooltip.js": 11025/*!****************************************************************!*\ 11026 !*** ./node_modules/foundation-sites/js/foundation.tooltip.js ***! 11027 \****************************************************************/ 11028/*! exports provided: Tooltip */ 11029/***/ (function(module, __webpack_exports__, __webpack_require__) { 11030 11031"use strict"; 11032__webpack_require__.r(__webpack_exports__); 11033/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Tooltip", function() { return Tooltip; }); 11034/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"); 11035/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 11036/* harmony import */ var _foundation_util_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.util.core */ "./node_modules/foundation-sites/js/foundation.util.core.js"); 11037/* harmony import */ var _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation.util.mediaQuery */ "./node_modules/foundation-sites/js/foundation.util.mediaQuery.js"); 11038/* harmony import */ var _foundation_util_triggers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./foundation.util.triggers */ "./node_modules/foundation-sites/js/foundation.util.triggers.js"); 11039/* harmony import */ var _foundation_positionable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./foundation.positionable */ "./node_modules/foundation-sites/js/foundation.positionable.js"); 11040 11041 11042function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 11043 11044function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 11045 11046function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 11047 11048function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } 11049 11050function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } 11051 11052function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } 11053 11054function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); } 11055 11056function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; } 11057 11058function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } 11059 11060function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } 11061 11062function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } 11063 11064 11065 11066 11067 11068 11069/** 11070 * Tooltip module. 11071 * @module foundation.tooltip 11072 * @requires foundation.util.box 11073 * @requires foundation.util.mediaQuery 11074 * @requires foundation.util.triggers 11075 */ 11076 11077var Tooltip = 11078/*#__PURE__*/ 11079function (_Positionable) { 11080 _inherits(Tooltip, _Positionable); 11081 11082 function Tooltip() { 11083 _classCallCheck(this, Tooltip); 11084 11085 return _possibleConstructorReturn(this, _getPrototypeOf(Tooltip).apply(this, arguments)); 11086 } 11087 11088 _createClass(Tooltip, [{ 11089 key: "_setup", 11090 11091 /** 11092 * Creates a new instance of a Tooltip. 11093 * @class 11094 * @name Tooltip 11095 * @fires Tooltip#init 11096 * @param {jQuery} element - jQuery object to attach a tooltip to. 11097 * @param {Object} options - object to extend the default configuration. 11098 */ 11099 value: function _setup(element, options) { 11100 this.$element = element; 11101 this.options = jquery__WEBPACK_IMPORTED_MODULE_0___default.a.extend({}, Tooltip.defaults, this.$element.data(), options); 11102 this.className = 'Tooltip'; // ie9 back compat 11103 11104 this.isActive = false; 11105 this.isClick = false; // Triggers init is idempotent, just need to make sure it is initialized 11106 11107 _foundation_util_triggers__WEBPACK_IMPORTED_MODULE_3__["Triggers"].init(jquery__WEBPACK_IMPORTED_MODULE_0___default.a); 11108 11109 this._init(); 11110 } 11111 /** 11112 * Initializes the tooltip by setting the creating the tip element, adding it's text, setting private variables and setting attributes on the anchor. 11113 * @private 11114 */ 11115 11116 }, { 11117 key: "_init", 11118 value: function _init() { 11119 _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_2__["MediaQuery"]._init(); 11120 11121 var elemId = this.$element.attr('aria-describedby') || Object(_foundation_util_core__WEBPACK_IMPORTED_MODULE_1__["GetYoDigits"])(6, 'tooltip'); 11122 this.options.tipText = this.options.tipText || this.$element.attr('title'); 11123 this.template = this.options.template ? jquery__WEBPACK_IMPORTED_MODULE_0___default()(this.options.template) : this._buildTemplate(elemId); 11124 11125 if (this.options.allowHtml) { 11126 this.template.appendTo(document.body).html(this.options.tipText).hide(); 11127 } else { 11128 this.template.appendTo(document.body).text(this.options.tipText).hide(); 11129 } 11130 11131 this.$element.attr({ 11132 'title': '', 11133 'aria-describedby': elemId, 11134 'data-yeti-box': elemId, 11135 'data-toggle': elemId, 11136 'data-resize': elemId 11137 }).addClass(this.options.triggerClass); 11138 11139 _get(_getPrototypeOf(Tooltip.prototype), "_init", this).call(this); 11140 11141 this._events(); 11142 } 11143 }, { 11144 key: "_getDefaultPosition", 11145 value: function _getDefaultPosition() { 11146 // handle legacy classnames 11147 var position = this.$element[0].className.match(/\b(top|left|right|bottom)\b/g); 11148 return position ? position[0] : 'top'; 11149 } 11150 }, { 11151 key: "_getDefaultAlignment", 11152 value: function _getDefaultAlignment() { 11153 return 'center'; 11154 } 11155 }, { 11156 key: "_getHOffset", 11157 value: function _getHOffset() { 11158 if (this.position === 'left' || this.position === 'right') { 11159 return this.options.hOffset + this.options.tooltipWidth; 11160 } else { 11161 return this.options.hOffset; 11162 } 11163 } 11164 }, { 11165 key: "_getVOffset", 11166 value: function _getVOffset() { 11167 if (this.position === 'top' || this.position === 'bottom') { 11168 return this.options.vOffset + this.options.tooltipHeight; 11169 } else { 11170 return this.options.vOffset; 11171 } 11172 } 11173 /** 11174 * builds the tooltip element, adds attributes, and returns the template. 11175 * @private 11176 */ 11177 11178 }, { 11179 key: "_buildTemplate", 11180 value: function _buildTemplate(id) { 11181 var templateClasses = "".concat(this.options.tooltipClass, " ").concat(this.options.positionClass, " ").concat(this.options.templateClasses).trim(); 11182 var $template = jquery__WEBPACK_IMPORTED_MODULE_0___default()('<div></div>').addClass(templateClasses).attr({ 11183 'role': 'tooltip', 11184 'aria-hidden': true, 11185 'data-is-active': false, 11186 'data-is-focus': false, 11187 'id': id 11188 }); 11189 return $template; 11190 } 11191 /** 11192 * sets the position class of an element and recursively calls itself until there are no more possible positions to attempt, or the tooltip element is no longer colliding. 11193 * if the tooltip is larger than the screen width, default to full width - any user selected margin 11194 * @private 11195 */ 11196 11197 }, { 11198 key: "_setPosition", 11199 value: function _setPosition() { 11200 _get(_getPrototypeOf(Tooltip.prototype), "_setPosition", this).call(this, this.$element, this.template); 11201 } 11202 /** 11203 * reveals the tooltip, and fires an event to close any other open tooltips on the page 11204 * @fires Tooltip#closeme 11205 * @fires Tooltip#show 11206 * @function 11207 */ 11208 11209 }, { 11210 key: "show", 11211 value: function show() { 11212 if (this.options.showOn !== 'all' && !_foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_2__["MediaQuery"].is(this.options.showOn)) { 11213 // console.error('The screen is too small to display this tooltip'); 11214 return false; 11215 } 11216 11217 var _this = this; 11218 11219 this.template.css('visibility', 'hidden').show(); 11220 11221 this._setPosition(); 11222 11223 this.template.removeClass('top bottom left right').addClass(this.position); 11224 this.template.removeClass('align-top align-bottom align-left align-right align-center').addClass('align-' + this.alignment); 11225 /** 11226 * Fires to close all other open tooltips on the page 11227 * @event Closeme#tooltip 11228 */ 11229 11230 this.$element.trigger('closeme.zf.tooltip', this.template.attr('id')); 11231 this.template.attr({ 11232 'data-is-active': true, 11233 'aria-hidden': false 11234 }); 11235 _this.isActive = true; // console.log(this.template); 11236 11237 this.template.stop().hide().css('visibility', '').fadeIn(this.options.fadeInDuration, function () {//maybe do stuff? 11238 }); 11239 /** 11240 * Fires when the tooltip is shown 11241 * @event Tooltip#show 11242 */ 11243 11244 this.$element.trigger('show.zf.tooltip'); 11245 } 11246 /** 11247 * Hides the current tooltip, and resets the positioning class if it was changed due to collision 11248 * @fires Tooltip#hide 11249 * @function 11250 */ 11251 11252 }, { 11253 key: "hide", 11254 value: function hide() { 11255 // console.log('hiding', this.$element.data('yeti-box')); 11256 var _this = this; 11257 11258 this.template.stop().attr({ 11259 'aria-hidden': true, 11260 'data-is-active': false 11261 }).fadeOut(this.options.fadeOutDuration, function () { 11262 _this.isActive = false; 11263 _this.isClick = false; 11264 }); 11265 /** 11266 * fires when the tooltip is hidden 11267 * @event Tooltip#hide 11268 */ 11269 11270 this.$element.trigger('hide.zf.tooltip'); 11271 } 11272 /** 11273 * adds event listeners for the tooltip and its anchor 11274 * TODO combine some of the listeners like focus and mouseenter, etc. 11275 * @private 11276 */ 11277 11278 }, { 11279 key: "_events", 11280 value: function _events() { 11281 var _this = this; 11282 11283 var $template = this.template; 11284 var isFocus = false; 11285 11286 if (!this.options.disableHover) { 11287 this.$element.on('mouseenter.zf.tooltip', function (e) { 11288 if (!_this.isActive) { 11289 _this.timeout = setTimeout(function () { 11290 _this.show(); 11291 }, _this.options.hoverDelay); 11292 } 11293 }).on('mouseleave.zf.tooltip', function (e) { 11294 clearTimeout(_this.timeout); 11295 11296 if (!isFocus || _this.isClick && !_this.options.clickOpen) { 11297 _this.hide(); 11298 } 11299 }); 11300 } 11301 11302 if (this.options.clickOpen) { 11303 this.$element.on('mousedown.zf.tooltip', function (e) { 11304 e.stopImmediatePropagation(); 11305 11306 if (_this.isClick) {//_this.hide(); 11307 // _this.isClick = false; 11308 } else { 11309 _this.isClick = true; 11310 11311 if ((_this.options.disableHover || !_this.$element.attr('tabindex')) && !_this.isActive) { 11312 _this.show(); 11313 } 11314 } 11315 }); 11316 } else { 11317 this.$element.on('mousedown.zf.tooltip', function (e) { 11318 e.stopImmediatePropagation(); 11319 _this.isClick = true; 11320 }); 11321 } 11322 11323 if (!this.options.disableForTouch) { 11324 this.$element.on('tap.zf.tooltip touchend.zf.tooltip', function (e) { 11325 _this.isActive ? _this.hide() : _this.show(); 11326 }); 11327 } 11328 11329 this.$element.on({ 11330 // 'toggle.zf.trigger': this.toggle.bind(this), 11331 // 'close.zf.trigger': this.hide.bind(this) 11332 'close.zf.trigger': this.hide.bind(this) 11333 }); 11334 this.$element.on('focus.zf.tooltip', function (e) { 11335 isFocus = true; 11336 11337 if (_this.isClick) { 11338 // If we're not showing open on clicks, we need to pretend a click-launched focus isn't 11339 // a real focus, otherwise on hover and come back we get bad behavior 11340 if (!_this.options.clickOpen) { 11341 isFocus = false; 11342 } 11343 11344 return false; 11345 } else { 11346 _this.show(); 11347 } 11348 }).on('focusout.zf.tooltip', function (e) { 11349 isFocus = false; 11350 _this.isClick = false; 11351 11352 _this.hide(); 11353 }).on('resizeme.zf.trigger', function () { 11354 if (_this.isActive) { 11355 _this._setPosition(); 11356 } 11357 }); 11358 } 11359 /** 11360 * adds a toggle method, in addition to the static show() & hide() functions 11361 * @function 11362 */ 11363 11364 }, { 11365 key: "toggle", 11366 value: function toggle() { 11367 if (this.isActive) { 11368 this.hide(); 11369 } else { 11370 this.show(); 11371 } 11372 } 11373 /** 11374 * Destroys an instance of tooltip, removes template element from the view. 11375 * @function 11376 */ 11377 11378 }, { 11379 key: "_destroy", 11380 value: function _destroy() { 11381 this.$element.attr('title', this.template.text()).off('.zf.trigger .zf.tooltip').removeClass('has-tip top right left').removeAttr('aria-describedby aria-haspopup data-disable-hover data-resize data-toggle data-tooltip data-yeti-box'); 11382 this.template.remove(); 11383 } 11384 }]); 11385 11386 return Tooltip; 11387}(_foundation_positionable__WEBPACK_IMPORTED_MODULE_4__["Positionable"]); 11388 11389Tooltip.defaults = { 11390 disableForTouch: false, 11391 11392 /** 11393 * Time, in ms, before a tooltip should open on hover. 11394 * @option 11395 * @type {number} 11396 * @default 200 11397 */ 11398 hoverDelay: 200, 11399 11400 /** 11401 * Time, in ms, a tooltip should take to fade into view. 11402 * @option 11403 * @type {number} 11404 * @default 150 11405 */ 11406 fadeInDuration: 150, 11407 11408 /** 11409 * Time, in ms, a tooltip should take to fade out of view. 11410 * @option 11411 * @type {number} 11412 * @default 150 11413 */ 11414 fadeOutDuration: 150, 11415 11416 /** 11417 * Disables hover events from opening the tooltip if set to true 11418 * @option 11419 * @type {boolean} 11420 * @default false 11421 */ 11422 disableHover: false, 11423 11424 /** 11425 * Optional addtional classes to apply to the tooltip template on init. 11426 * @option 11427 * @type {string} 11428 * @default '' 11429 */ 11430 templateClasses: '', 11431 11432 /** 11433 * Non-optional class added to tooltip templates. Foundation default is 'tooltip'. 11434 * @option 11435 * @type {string} 11436 * @default 'tooltip' 11437 */ 11438 tooltipClass: 'tooltip', 11439 11440 /** 11441 * Class applied to the tooltip anchor element. 11442 * @option 11443 * @type {string} 11444 * @default 'has-tip' 11445 */ 11446 triggerClass: 'has-tip', 11447 11448 /** 11449 * Minimum breakpoint size at which to open the tooltip. 11450 * @option 11451 * @type {string} 11452 * @default 'small' 11453 */ 11454 showOn: 'small', 11455 11456 /** 11457 * Custom template to be used to generate markup for tooltip. 11458 * @option 11459 * @type {string} 11460 * @default '' 11461 */ 11462 template: '', 11463 11464 /** 11465 * Text displayed in the tooltip template on open. 11466 * @option 11467 * @type {string} 11468 * @default '' 11469 */ 11470 tipText: '', 11471 touchCloseText: 'Tap to close.', 11472 11473 /** 11474 * Allows the tooltip to remain open if triggered with a click or touch event. 11475 * @option 11476 * @type {boolean} 11477 * @default true 11478 */ 11479 clickOpen: true, 11480 11481 /** 11482 * DEPRECATED Additional positioning classes, set by the JS 11483 * @option 11484 * @type {string} 11485 * @default '' 11486 */ 11487 positionClass: '', 11488 11489 /** 11490 * Position of tooltip. Can be left, right, bottom, top, or auto. 11491 * @option 11492 * @type {string} 11493 * @default 'auto' 11494 */ 11495 position: 'auto', 11496 11497 /** 11498 * Alignment of tooltip relative to anchor. Can be left, right, bottom, top, center, or auto. 11499 * @option 11500 * @type {string} 11501 * @default 'auto' 11502 */ 11503 alignment: 'auto', 11504 11505 /** 11506 * Allow overlap of container/window. If false, tooltip will first try to 11507 * position as defined by data-position and data-alignment, but reposition if 11508 * it would cause an overflow. @option 11509 * @type {boolean} 11510 * @default false 11511 */ 11512 allowOverlap: false, 11513 11514 /** 11515 * Allow overlap of only the bottom of the container. This is the most common 11516 * behavior for dropdowns, allowing the dropdown to extend the bottom of the 11517 * screen but not otherwise influence or break out of the container. 11518 * Less common for tooltips. 11519 * @option 11520 * @type {boolean} 11521 * @default false 11522 */ 11523 allowBottomOverlap: false, 11524 11525 /** 11526 * Distance, in pixels, the template should push away from the anchor on the Y axis. 11527 * @option 11528 * @type {number} 11529 * @default 0 11530 */ 11531 vOffset: 0, 11532 11533 /** 11534 * Distance, in pixels, the template should push away from the anchor on the X axis 11535 * @option 11536 * @type {number} 11537 * @default 0 11538 */ 11539 hOffset: 0, 11540 11541 /** 11542 * Distance, in pixels, the template spacing auto-adjust for a vertical tooltip 11543 * @option 11544 * @type {number} 11545 * @default 14 11546 */ 11547 tooltipHeight: 14, 11548 11549 /** 11550 * Distance, in pixels, the template spacing auto-adjust for a horizontal tooltip 11551 * @option 11552 * @type {number} 11553 * @default 12 11554 */ 11555 tooltipWidth: 12, 11556 11557 /** 11558 * Allow HTML in tooltip. Warning: If you are loading user-generated content into tooltips, 11559 * allowing HTML may open yourself up to XSS attacks. 11560 * @option 11561 * @type {boolean} 11562 * @default false 11563 */ 11564 allowHtml: false 11565}; 11566/** 11567 * TODO utilize resize event trigger 11568 */ 11569 11570 11571 11572/***/ }), 11573
vendor: 9,814 bytes, lines 11574-11839
11574/***/ "./node_modules/foundation-sites/js/foundation.util.box.js": 11575/*!*****************************************************************!*\ 11576 !*** ./node_modules/foundation-sites/js/foundation.util.box.js ***! 11577 \*****************************************************************/ 11578/*! exports provided: Box */ 11579/***/ (function(module, __webpack_exports__, __webpack_require__) { 11580 11581"use strict"; 11582__webpack_require__.r(__webpack_exports__); 11583/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Box", function() { return Box; }); 11584/* harmony import */ var _foundation_util_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./foundation.util.core */ "./node_modules/foundation-sites/js/foundation.util.core.js"); 11585 11586 11587 11588var Box = { 11589 ImNotTouchingYou: ImNotTouchingYou, 11590 OverlapArea: OverlapArea, 11591 GetDimensions: GetDimensions, 11592 GetOffsets: GetOffsets, 11593 GetExplicitOffsets: GetExplicitOffsets 11594 /** 11595 * Compares the dimensions of an element to a container and determines collision events with container. 11596 * @function 11597 * @param {jQuery} element - jQuery object to test for collisions. 11598 * @param {jQuery} parent - jQuery object to use as bounding container. 11599 * @param {Boolean} lrOnly - set to true to check left and right values only. 11600 * @param {Boolean} tbOnly - set to true to check top and bottom values only. 11601 * @default if no parent object passed, detects collisions with `window`. 11602 * @returns {Boolean} - true if collision free, false if a collision in any direction. 11603 */ 11604 11605}; 11606 11607function ImNotTouchingYou(element, parent, lrOnly, tbOnly, ignoreBottom) { 11608 return OverlapArea(element, parent, lrOnly, tbOnly, ignoreBottom) === 0; 11609} 11610 11611; 11612 11613function OverlapArea(element, parent, lrOnly, tbOnly, ignoreBottom) { 11614 var eleDims = GetDimensions(element), 11615 topOver, 11616 bottomOver, 11617 leftOver, 11618 rightOver; 11619 11620 if (parent) { 11621 var parDims = GetDimensions(parent); 11622 bottomOver = parDims.height + parDims.offset.top - (eleDims.offset.top + eleDims.height); 11623 topOver = eleDims.offset.top - parDims.offset.top; 11624 leftOver = eleDims.offset.left - parDims.offset.left; 11625 rightOver = parDims.width + parDims.offset.left - (eleDims.offset.left + eleDims.width); 11626 } else { 11627 bottomOver = eleDims.windowDims.height + eleDims.windowDims.offset.top - (eleDims.offset.top + eleDims.height); 11628 topOver = eleDims.offset.top - eleDims.windowDims.offset.top; 11629 leftOver = eleDims.offset.left - eleDims.windowDims.offset.left; 11630 rightOver = eleDims.windowDims.width - (eleDims.offset.left + eleDims.width); 11631 } 11632 11633 bottomOver = ignoreBottom ? 0 : Math.min(bottomOver, 0); 11634 topOver = Math.min(topOver, 0); 11635 leftOver = Math.min(leftOver, 0); 11636 rightOver = Math.min(rightOver, 0); 11637 11638 if (lrOnly) { 11639 return leftOver + rightOver; 11640 } 11641 11642 if (tbOnly) { 11643 return topOver + bottomOver; 11644 } // use sum of squares b/c we care about overlap area. 11645 11646 11647 return Math.sqrt(topOver * topOver + bottomOver * bottomOver + leftOver * leftOver + rightOver * rightOver); 11648} 11649/** 11650 * Uses native methods to return an object of dimension values. 11651 * @function 11652 * @param {jQuery || HTML} element - jQuery object or DOM element for which to get the dimensions. Can be any element other that document or window. 11653 * @returns {Object} - nested object of integer pixel values 11654 * TODO - if element is window, return only those values. 11655 */ 11656 11657 11658function GetDimensions(elem) { 11659 elem = elem.length ? elem[0] : elem; 11660 11661 if (elem === window || elem === document) { 11662 throw new Error("I'm sorry, Dave. I'm afraid I can't do that."); 11663 } 11664 11665 var rect = elem.getBoundingClientRect(), 11666 parRect = elem.parentNode.getBoundingClientRect(), 11667 winRect = document.body.getBoundingClientRect(), 11668 winY = window.pageYOffset, 11669 winX = window.pageXOffset; 11670 return { 11671 width: rect.width, 11672 height: rect.height, 11673 offset: { 11674 top: rect.top + winY, 11675 left: rect.left + winX 11676 }, 11677 parentDims: { 11678 width: parRect.width, 11679 height: parRect.height, 11680 offset: { 11681 top: parRect.top + winY, 11682 left: parRect.left + winX 11683 } 11684 }, 11685 windowDims: { 11686 width: winRect.width, 11687 height: winRect.height, 11688 offset: { 11689 top: winY, 11690 left: winX 11691 } 11692 } 11693 }; 11694} 11695/** 11696 * Returns an object of top and left integer pixel values for dynamically rendered elements, 11697 * such as: Tooltip, Reveal, and Dropdown. Maintained for backwards compatibility, and where 11698 * you don't know alignment, but generally from 11699 * 6.4 forward you should use GetExplicitOffsets, as GetOffsets conflates position and alignment. 11700 * @function 11701 * @param {jQuery} element - jQuery object for the element being positioned. 11702 * @param {jQuery} anchor - jQuery object for the element's anchor point. 11703 * @param {String} position - a string relating to the desired position of the element, relative to it's anchor 11704 * @param {Number} vOffset - integer pixel value of desired vertical separation between anchor and element. 11705 * @param {Number} hOffset - integer pixel value of desired horizontal separation between anchor and element. 11706 * @param {Boolean} isOverflow - if a collision event is detected, sets to true to default the element to full width - any desired offset. 11707 * TODO alter/rewrite to work with `em` values as well/instead of pixels 11708 */ 11709 11710 11711function GetOffsets(element, anchor, position, vOffset, hOffset, isOverflow) { 11712 console.log("NOTE: GetOffsets is deprecated in favor of GetExplicitOffsets and will be removed in 6.5"); 11713 11714 switch (position) { 11715 case 'top': 11716 return Object(_foundation_util_core__WEBPACK_IMPORTED_MODULE_0__["rtl"])() ? GetExplicitOffsets(element, anchor, 'top', 'left', vOffset, hOffset, isOverflow) : GetExplicitOffsets(element, anchor, 'top', 'right', vOffset, hOffset, isOverflow); 11717 11718 case 'bottom': 11719 return Object(_foundation_util_core__WEBPACK_IMPORTED_MODULE_0__["rtl"])() ? GetExplicitOffsets(element, anchor, 'bottom', 'left', vOffset, hOffset, isOverflow) : GetExplicitOffsets(element, anchor, 'bottom', 'right', vOffset, hOffset, isOverflow); 11720 11721 case 'center top': 11722 return GetExplicitOffsets(element, anchor, 'top', 'center', vOffset, hOffset, isOverflow); 11723 11724 case 'center bottom': 11725 return GetExplicitOffsets(element, anchor, 'bottom', 'center', vOffset, hOffset, isOverflow); 11726 11727 case 'center left': 11728 return GetExplicitOffsets(element, anchor, 'left', 'center', vOffset, hOffset, isOverflow); 11729 11730 case 'center right': 11731 return GetExplicitOffsets(element, anchor, 'right', 'center', vOffset, hOffset, isOverflow); 11732 11733 case 'left bottom': 11734 return GetExplicitOffsets(element, anchor, 'bottom', 'left', vOffset, hOffset, isOverflow); 11735 11736 case 'right bottom': 11737 return GetExplicitOffsets(element, anchor, 'bottom', 'right', vOffset, hOffset, isOverflow); 11738 // Backwards compatibility... this along with the reveal and reveal full 11739 // classes are the only ones that didn't reference anchor 11740 11741 case 'center': 11742 return { 11743 left: $eleDims.windowDims.offset.left + $eleDims.windowDims.width / 2 - $eleDims.width / 2 + hOffset, 11744 top: $eleDims.windowDims.offset.top + $eleDims.windowDims.height / 2 - ($eleDims.height / 2 + vOffset) 11745 }; 11746 11747 case 'reveal': 11748 return { 11749 left: ($eleDims.windowDims.width - $eleDims.width) / 2 + hOffset, 11750 top: $eleDims.windowDims.offset.top + vOffset 11751 }; 11752 11753 case 'reveal full': 11754 return { 11755 left: $eleDims.windowDims.offset.left, 11756 top: $eleDims.windowDims.offset.top 11757 }; 11758 break; 11759 11760 default: 11761 return { 11762 left: Object(_foundation_util_core__WEBPACK_IMPORTED_MODULE_0__["rtl"])() ? $anchorDims.offset.left - $eleDims.width + $anchorDims.width - hOffset : $anchorDims.offset.left + hOffset, 11763 top: $anchorDims.offset.top + $anchorDims.height + vOffset 11764 }; 11765 } 11766} 11767 11768function GetExplicitOffsets(element, anchor, position, alignment, vOffset, hOffset, isOverflow) { 11769 var $eleDims = GetDimensions(element), 11770 $anchorDims = anchor ? GetDimensions(anchor) : null; 11771 var topVal, leftVal; // set position related attribute 11772 11773 switch (position) { 11774 case 'top': 11775 topVal = $anchorDims.offset.top - ($eleDims.height + vOffset); 11776 break; 11777 11778 case 'bottom': 11779 topVal = $anchorDims.offset.top + $anchorDims.height + vOffset; 11780 break; 11781 11782 case 'left': 11783 leftVal = $anchorDims.offset.left - ($eleDims.width + hOffset); 11784 break; 11785 11786 case 'right': 11787 leftVal = $anchorDims.offset.left + $anchorDims.width + hOffset; 11788 break; 11789 } // set alignment related attribute 11790 11791 11792 switch (position) { 11793 case 'top': 11794 case 'bottom': 11795 switch (alignment) { 11796 case 'left': 11797 leftVal = $anchorDims.offset.left + hOffset; 11798 break; 11799 11800 case 'right': 11801 leftVal = $anchorDims.offset.left - $eleDims.width + $anchorDims.width - hOffset; 11802 break; 11803 11804 case 'center': 11805 leftVal = isOverflow ? hOffset : $anchorDims.offset.left + $anchorDims.width / 2 - $eleDims.width / 2 + hOffset; 11806 break; 11807 } 11808 11809 break; 11810 11811 case 'right': 11812 case 'left': 11813 switch (alignment) { 11814 case 'bottom': 11815 topVal = $anchorDims.offset.top - vOffset + $anchorDims.height - $eleDims.height; 11816 break; 11817 11818 case 'top': 11819 topVal = $anchorDims.offset.top + vOffset; 11820 break; 11821 11822 case 'center': 11823 topVal = $anchorDims.offset.top + vOffset + $anchorDims.height / 2 - $eleDims.height / 2; 11824 break; 11825 } 11826 11827 break; 11828 } 11829 11830 return { 11831 top: topVal, 11832 left: leftVal 11833 }; 11834} 11835 11836 11837 11838/***/ }), 11839
vendor: 2,579 bytes, lines 11840-11909
11840/***/ "./node_modules/foundation-sites/js/foundation.util.core.js": 11841/*!******************************************************************!*\ 11842 !*** ./node_modules/foundation-sites/js/foundation.util.core.js ***! 11843 \******************************************************************/ 11844/*! exports provided: rtl, GetYoDigits, transitionend */ 11845/***/ (function(module, __webpack_exports__, __webpack_require__) { 11846 11847"use strict"; 11848__webpack_require__.r(__webpack_exports__); 11849/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rtl", function() { return rtl; }); 11850/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GetYoDigits", function() { return GetYoDigits; }); 11851/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "transitionend", function() { return transitionend; }); 11852/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"); 11853/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 11854 11855 11856 // Core Foundation Utilities, utilized in a number of places. 11857 11858/** 11859 * Returns a boolean for RTL support 11860 */ 11861 11862function rtl() { 11863 return jquery__WEBPACK_IMPORTED_MODULE_0___default()('html').attr('dir') === 'rtl'; 11864} 11865/** 11866 * returns a random base-36 uid with namespacing 11867 * @function 11868 * @param {Number} length - number of random base-36 digits desired. Increase for more random strings. 11869 * @param {String} namespace - name of plugin to be incorporated in uid, optional. 11870 * @default {String} '' - if no plugin name is provided, nothing is appended to the uid. 11871 * @returns {String} - unique id 11872 */ 11873 11874 11875function GetYoDigits(length, namespace) { 11876 length = length || 6; 11877 return Math.round(Math.pow(36, length + 1) - Math.random() * Math.pow(36, length)).toString(36).slice(1) + (namespace ? "-".concat(namespace) : ''); 11878} 11879 11880function transitionend($elem) { 11881 var transitions = { 11882 'transition': 'transitionend', 11883 'WebkitTransition': 'webkitTransitionEnd', 11884 'MozTransition': 'transitionend', 11885 'OTransition': 'otransitionend' 11886 }; 11887 var elem = document.createElement('div'), 11888 end; 11889 11890 for (var t in transitions) { 11891 if (typeof elem.style[t] !== 'undefined') { 11892 end = transitions[t]; 11893 } 11894 } 11895 11896 if (end) { 11897 return end; 11898 } else { 11899 end = setTimeout(function () { 11900 $elem.triggerHandler('transitionend', [$elem]); 11901 }, 1); 11902 return 'transitionend'; 11903 } 11904} 11905 11906 11907 11908/***/ }), 11909
vendor: 2,206 bytes, lines 11910-11969
11910/***/ "./node_modules/foundation-sites/js/foundation.util.imageLoader.js": 11911/*!*************************************************************************!*\ 11912 !*** ./node_modules/foundation-sites/js/foundation.util.imageLoader.js ***! 11913 \*************************************************************************/ 11914/*! exports provided: onImagesLoaded */ 11915/***/ (function(module, __webpack_exports__, __webpack_require__) { 11916 11917"use strict"; 11918__webpack_require__.r(__webpack_exports__); 11919/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onImagesLoaded", function() { return onImagesLoaded; }); 11920/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"); 11921/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 11922 11923 11924 11925/** 11926 * Runs a callback function when images are fully loaded. 11927 * @param {Object} images - Image(s) to check if loaded. 11928 * @param {Func} callback - Function to execute when image is fully loaded. 11929 */ 11930 11931function onImagesLoaded(images, callback) { 11932 var self = this, 11933 unloaded = images.length; 11934 11935 if (unloaded === 0) { 11936 callback(); 11937 } 11938 11939 images.each(function () { 11940 // Check if image is loaded 11941 if (this.complete && this.naturalWidth !== undefined) { 11942 singleImageLoaded(); 11943 } else { 11944 // If the above check failed, simulate loading on detached element. 11945 var image = new Image(); // Still count image as loaded if it finalizes with an error. 11946 11947 var events = "load.zf.images error.zf.images"; 11948 jquery__WEBPACK_IMPORTED_MODULE_0___default()(image).one(events, function me(event) { 11949 // Unbind the event listeners. We're using 'one' but only one of the two events will have fired. 11950 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).off(events, me); 11951 singleImageLoaded(); 11952 }); 11953 image.src = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).attr('src'); 11954 } 11955 }); 11956 11957 function singleImageLoaded() { 11958 unloaded--; 11959 11960 if (unloaded === 0) { 11961 callback(); 11962 } 11963 } 11964} 11965 11966 11967 11968/***/ }), 11969
vendor: 6,708 bytes, lines 11970-12150
11970/***/ "./node_modules/foundation-sites/js/foundation.util.keyboard.js": 11971/*!**********************************************************************!*\ 11972 !*** ./node_modules/foundation-sites/js/foundation.util.keyboard.js ***! 11973 \**********************************************************************/ 11974/*! exports provided: Keyboard */ 11975/***/ (function(module, __webpack_exports__, __webpack_require__) { 11976 11977"use strict"; 11978__webpack_require__.r(__webpack_exports__); 11979/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Keyboard", function() { return Keyboard; }); 11980/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"); 11981/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 11982/* harmony import */ var _foundation_util_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.util.core */ "./node_modules/foundation-sites/js/foundation.util.core.js"); 11983/******************************************* 11984 * * 11985 * This util was created by Marius Olbertz * 11986 * Please thank Marius on GitHub /owlbertz * 11987 * or the web http://www.mariusolbertz.de/ * 11988 * * 11989 ******************************************/ 11990 11991 11992 11993 11994var keyCodes = { 11995 9: 'TAB', 11996 13: 'ENTER', 11997 27: 'ESCAPE', 11998 32: 'SPACE', 11999 35: 'END', 12000 36: 'HOME', 12001 37: 'ARROW_LEFT', 12002 38: 'ARROW_UP', 12003 39: 'ARROW_RIGHT', 12004 40: 'ARROW_DOWN' 12005}; 12006var commands = {}; // Functions pulled out to be referenceable from internals 12007 12008function findFocusable($element) { 12009 if (!$element) { 12010 return false; 12011 } 12012 12013 return $element.find('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]').filter(function () { 12014 if (!jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).is(':visible') || jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).attr('tabindex') < 0) { 12015 return false; 12016 } //only have visible elements and those that have a tabindex greater or equal 0 12017 12018 12019 return true; 12020 }); 12021} 12022 12023function parseKey(event) { 12024 var key = keyCodes[event.which || event.keyCode] || String.fromCharCode(event.which).toUpperCase(); // Remove un-printable characters, e.g. for `fromCharCode` calls for CTRL only events 12025 12026 key = key.replace(/\W+/, ''); 12027 if (event.shiftKey) key = "SHIFT_".concat(key); 12028 if (event.ctrlKey) key = "CTRL_".concat(key); 12029 if (event.altKey) key = "ALT_".concat(key); // Remove trailing underscore, in case only modifiers were used (e.g. only `CTRL_ALT`) 12030 12031 key = key.replace(/_$/, ''); 12032 return key; 12033} 12034 12035var Keyboard = { 12036 keys: getKeyCodes(keyCodes), 12037 12038 /** 12039 * Parses the (keyboard) event and returns a String that represents its key 12040 * Can be used like Foundation.parseKey(event) === Foundation.keys.SPACE 12041 * @param {Event} event - the event generated by the event handler 12042 * @return String key - String that represents the key pressed 12043 */ 12044 parseKey: parseKey, 12045 12046 /** 12047 * Handles the given (keyboard) event 12048 * @param {Event} event - the event generated by the event handler 12049 * @param {String} component - Foundation component's name, e.g. Slider or Reveal 12050 * @param {Objects} functions - collection of functions that are to be executed 12051 */ 12052 handleKey: function handleKey(event, component, functions) { 12053 var commandList = commands[component], 12054 keyCode = this.parseKey(event), 12055 cmds, 12056 command, 12057 fn; 12058 if (!commandList) return console.warn('Component not defined!'); 12059 12060 if (typeof commandList.ltr === 'undefined') { 12061 // this component does not differentiate between ltr and rtl 12062 cmds = commandList; // use plain list 12063 } else { 12064 // merge ltr and rtl: if document is rtl, rtl overwrites ltr and vice versa 12065 if (Object(_foundation_util_core__WEBPACK_IMPORTED_MODULE_1__["rtl"])()) cmds = jquery__WEBPACK_IMPORTED_MODULE_0___default.a.extend({}, commandList.ltr, commandList.rtl);else cmds = jquery__WEBPACK_IMPORTED_MODULE_0___default.a.extend({}, commandList.rtl, commandList.ltr); 12066 } 12067 12068 command = cmds[keyCode]; 12069 fn = functions[command]; 12070 12071 if (fn && typeof fn === 'function') { 12072 // execute function if exists 12073 var returnValue = fn.apply(); 12074 12075 if (functions.handled || typeof functions.handled === 'function') { 12076 // execute function when event was handled 12077 functions.handled(returnValue); 12078 } 12079 } else { 12080 if (functions.unhandled || typeof functions.unhandled === 'function') { 12081 // execute function when event was not handled 12082 functions.unhandled(); 12083 } 12084 } 12085 }, 12086 12087 /** 12088 * Finds all focusable elements within the given `$element` 12089 * @param {jQuery} $element - jQuery object to search within 12090 * @return {jQuery} $focusable - all focusable elements within `$element` 12091 */ 12092 findFocusable: findFocusable, 12093 12094 /** 12095 * Returns the component name name 12096 * @param {Object} component - Foundation component, e.g. Slider or Reveal 12097 * @return String componentName 12098 */ 12099 register: function register(componentName, cmds) { 12100 commands[componentName] = cmds; 12101 }, 12102 // TODO9438: These references to Keyboard need to not require global. Will 'this' work in this context? 12103 // 12104 12105 /** 12106 * Traps the focus in the given element. 12107 * @param {jQuery} $element jQuery object to trap the foucs into. 12108 */ 12109 trapFocus: function trapFocus($element) { 12110 var $focusable = findFocusable($element), 12111 $firstFocusable = $focusable.eq(0), 12112 $lastFocusable = $focusable.eq(-1); 12113 $element.on('keydown.zf.trapfocus', function (event) { 12114 if (event.target === $lastFocusable[0] && parseKey(event) === 'TAB') { 12115 event.preventDefault(); 12116 $firstFocusable.focus(); 12117 } else if (event.target === $firstFocusable[0] && parseKey(event) === 'SHIFT_TAB') { 12118 event.preventDefault(); 12119 $lastFocusable.focus(); 12120 } 12121 }); 12122 }, 12123 12124 /** 12125 * Releases the trapped focus from the given element. 12126 * @param {jQuery} $element jQuery object to release the focus for. 12127 */ 12128 releaseFocus: function releaseFocus($element) { 12129 $element.off('keydown.zf.trapfocus'); 12130 } 12131}; 12132/* 12133 * Constants for easier comparing. 12134 * Can be used like Foundation.parseKey(event) === Foundation.keys.SPACE 12135 */ 12136 12137function getKeyCodes(kcs) { 12138 var k = {}; 12139 12140 for (var kc in kcs) { 12141 k[kcs[kc]] = kcs[kc]; 12142 } 12143 12144 return k; 12145} 12146 12147 12148 12149/***/ }), 12150
vendor: 8,120 bytes, lines 12151-12385
12151/***/ "./node_modules/foundation-sites/js/foundation.util.mediaQuery.js": 12152/*!************************************************************************!*\ 12153 !*** ./node_modules/foundation-sites/js/foundation.util.mediaQuery.js ***! 12154 \************************************************************************/ 12155/*! exports provided: MediaQuery */ 12156/***/ (function(module, __webpack_exports__, __webpack_require__) { 12157 12158"use strict"; 12159__webpack_require__.r(__webpack_exports__); 12160/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MediaQuery", function() { return MediaQuery; }); 12161/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"); 12162/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 12163 12164 12165function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 12166 12167 // Default set of media queries 12168 12169var defaultQueries = { 12170 'default': 'only screen', 12171 landscape: 'only screen and (orientation: landscape)', 12172 portrait: 'only screen and (orientation: portrait)', 12173 retina: 'only screen and (-webkit-min-device-pixel-ratio: 2),' + 'only screen and (min--moz-device-pixel-ratio: 2),' + 'only screen and (-o-min-device-pixel-ratio: 2/1),' + 'only screen and (min-device-pixel-ratio: 2),' + 'only screen and (min-resolution: 192dpi),' + 'only screen and (min-resolution: 2dppx)' 12174}; // matchMedia() polyfill - Test a CSS media type/query in JS. 12175// Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas, David Knight. Dual MIT/BSD license 12176 12177var matchMedia = window.matchMedia || function () { 12178 'use strict'; // For browsers that support matchMedium api such as IE 9 and webkit 12179 12180 var styleMedia = window.styleMedia || window.media; // For those that don't support matchMedium 12181 12182 if (!styleMedia) { 12183 var style = document.createElement('style'), 12184 script = document.getElementsByTagName('script')[0], 12185 info = null; 12186 style.type = 'text/css'; 12187 style.id = 'matchmediajs-test'; 12188 script && script.parentNode && script.parentNode.insertBefore(style, script); // 'style.currentStyle' is used by IE <= 8 and 'window.getComputedStyle' for all other browsers 12189 12190 info = 'getComputedStyle' in window && window.getComputedStyle(style, null) || style.currentStyle; 12191 styleMedia = { 12192 matchMedium: function matchMedium(media) { 12193 var text = "@media ".concat(media, "{ #matchmediajs-test { width: 1px; } }"); // 'style.styleSheet' is used by IE <= 8 and 'style.textContent' for all other browsers 12194 12195 if (style.styleSheet) { 12196 style.styleSheet.cssText = text; 12197 } else { 12198 style.textContent = text; 12199 } // Test if media query is true or false 12200 12201 12202 return info.width === '1px'; 12203 } 12204 }; 12205 } 12206 12207 return function (media) { 12208 return { 12209 matches: styleMedia.matchMedium(media || 'all'), 12210 media: media || 'all' 12211 }; 12212 }; 12213}(); 12214 12215var MediaQuery = { 12216 queries: [], 12217 current: '', 12218 12219 /** 12220 * Initializes the media query helper, by extracting the breakpoint list from the CSS and activating the breakpoint watcher. 12221 * @function 12222 * @private 12223 */ 12224 _init: function _init() { 12225 var self = this; 12226 var $meta = jquery__WEBPACK_IMPORTED_MODULE_0___default()('meta.foundation-mq'); 12227 12228 if (!$meta.length) { 12229 jquery__WEBPACK_IMPORTED_MODULE_0___default()('<meta class="foundation-mq">').appendTo(document.head); 12230 } 12231 12232 var extractedStyles = jquery__WEBPACK_IMPORTED_MODULE_0___default()('.foundation-mq').css('font-family'); 12233 var namedQueries; 12234 namedQueries = parseStyleToObject(extractedStyles); 12235 12236 for (var key in namedQueries) { 12237 if (namedQueries.hasOwnProperty(key)) { 12238 self.queries.push({ 12239 name: key, 12240 value: "only screen and (min-width: ".concat(namedQueries[key], ")") 12241 }); 12242 } 12243 } 12244 12245 this.current = this._getCurrentSize(); 12246 12247 this._watcher(); 12248 }, 12249 12250 /** 12251 * Checks if the screen is at least as wide as a breakpoint. 12252 * @function 12253 * @param {String} size - Name of the breakpoint to check. 12254 * @returns {Boolean} `true` if the breakpoint matches, `false` if it's smaller. 12255 */ 12256 atLeast: function atLeast(size) { 12257 var query = this.get(size); 12258 12259 if (query) { 12260 return matchMedia(query).matches; 12261 } 12262 12263 return false; 12264 }, 12265 12266 /** 12267 * Checks if the screen matches to a breakpoint. 12268 * @function 12269 * @param {String} size - Name of the breakpoint to check, either 'small only' or 'small'. Omitting 'only' falls back to using atLeast() method. 12270 * @returns {Boolean} `true` if the breakpoint matches, `false` if it does not. 12271 */ 12272 is: function is(size) { 12273 size = size.trim().split(' '); 12274 12275 if (size.length > 1 && size[1] === 'only') { 12276 if (size[0] === this._getCurrentSize()) return true; 12277 } else { 12278 return this.atLeast(size[0]); 12279 } 12280 12281 return false; 12282 }, 12283 12284 /** 12285 * Gets the media query of a breakpoint. 12286 * @function 12287 * @param {String} size - Name of the breakpoint to get. 12288 * @returns {String|null} - The media query of the breakpoint, or `null` if the breakpoint doesn't exist. 12289 */ 12290 get: function get(size) { 12291 for (var i in this.queries) { 12292 if (this.queries.hasOwnProperty(i)) { 12293 var query = this.queries[i]; 12294 if (size === query.name) return query.value; 12295 } 12296 } 12297 12298 return null; 12299 }, 12300 12301 /** 12302 * Gets the current breakpoint name by testing every breakpoint and returning the last one to match (the biggest one). 12303 * @function 12304 * @private 12305 * @returns {String} Name of the current breakpoint. 12306 */ 12307 _getCurrentSize: function _getCurrentSize() { 12308 var matched; 12309 12310 for (var i = 0; i < this.queries.length; i++) { 12311 var query = this.queries[i]; 12312 12313 if (matchMedia(query.value).matches) { 12314 matched = query; 12315 } 12316 } 12317 12318 if (_typeof(matched) === 'object') { 12319 return matched.name; 12320 } else { 12321 return matched; 12322 } 12323 }, 12324 12325 /** 12326 * Activates the breakpoint watcher, which fires an event on the window whenever the breakpoint changes. 12327 * @function 12328 * @private 12329 */ 12330 _watcher: function _watcher() { 12331 var _this = this; 12332 12333 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).off('resize.zf.mediaquery').on('resize.zf.mediaquery', function () { 12334 var newSize = _this._getCurrentSize(), 12335 currentSize = _this.current; 12336 12337 if (newSize !== currentSize) { 12338 // Change the current media query 12339 _this.current = newSize; // Broadcast the media query change on the window 12340 12341 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).trigger('changed.zf.mediaquery', [newSize, currentSize]); 12342 } 12343 }); 12344 } 12345}; // Thank you: https://github.com/sindresorhus/query-string 12346 12347function parseStyleToObject(str) { 12348 var styleObject = {}; 12349 12350 if (typeof str !== 'string') { 12351 return styleObject; 12352 } 12353 12354 str = str.trim().slice(1, -1); // browsers re-quote string style values 12355 12356 if (!str) { 12357 return styleObject; 12358 } 12359 12360 styleObject = str.split('&').reduce(function (ret, param) { 12361 var parts = param.replace(/\+/g, ' ').split('='); 12362 var key = parts[0]; 12363 var val = parts[1]; 12364 key = decodeURIComponent(key); // missing `=` should be `null`: 12365 // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters 12366 12367 val = val === undefined ? null : decodeURIComponent(val); 12368 12369 if (!ret.hasOwnProperty(key)) { 12370 ret[key] = val; 12371 } else if (Array.isArray(ret[key])) { 12372 ret[key].push(val); 12373 } else { 12374 ret[key] = [ret[key], val]; 12375 } 12376 12377 return ret; 12378 }, {}); 12379 return styleObject; 12380} 12381 12382 12383 12384/***/ }), 12385
vendor: 3,897 bytes, lines 12386-12494
12386/***/ "./node_modules/foundation-sites/js/foundation.util.motion.js": 12387/*!********************************************************************!*\ 12388 !*** ./node_modules/foundation-sites/js/foundation.util.motion.js ***! 12389 \********************************************************************/ 12390/*! exports provided: Move, Motion */ 12391/***/ (function(module, __webpack_exports__, __webpack_require__) { 12392 12393"use strict"; 12394__webpack_require__.r(__webpack_exports__); 12395/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Move", function() { return Move; }); 12396/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Motion", function() { return Motion; }); 12397/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"); 12398/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 12399/* harmony import */ var _foundation_util_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.util.core */ "./node_modules/foundation-sites/js/foundation.util.core.js"); 12400 12401 12402 12403 12404/** 12405 * Motion module. 12406 * @module foundation.motion 12407 */ 12408 12409var initClasses = ['mui-enter', 'mui-leave']; 12410var activeClasses = ['mui-enter-active', 'mui-leave-active']; 12411var Motion = { 12412 animateIn: function animateIn(element, animation, cb) { 12413 animate(true, element, animation, cb); 12414 }, 12415 animateOut: function animateOut(element, animation, cb) { 12416 animate(false, element, animation, cb); 12417 } 12418}; 12419 12420function Move(duration, elem, fn) { 12421 var anim, 12422 prog, 12423 start = null; // console.log('called'); 12424 12425 if (duration === 0) { 12426 fn.apply(elem); 12427 elem.trigger('finished.zf.animate', [elem]).triggerHandler('finished.zf.animate', [elem]); 12428 return; 12429 } 12430 12431 function move(ts) { 12432 if (!start) start = ts; // console.log(start, ts); 12433 12434 prog = ts - start; 12435 fn.apply(elem); 12436 12437 if (prog < duration) { 12438 anim = window.requestAnimationFrame(move, elem); 12439 } else { 12440 window.cancelAnimationFrame(anim); 12441 elem.trigger('finished.zf.animate', [elem]).triggerHandler('finished.zf.animate', [elem]); 12442 } 12443 } 12444 12445 anim = window.requestAnimationFrame(move); 12446} 12447/** 12448 * Animates an element in or out using a CSS transition class. 12449 * @function 12450 * @private 12451 * @param {Boolean} isIn - Defines if the animation is in or out. 12452 * @param {Object} element - jQuery or HTML object to animate. 12453 * @param {String} animation - CSS class to use. 12454 * @param {Function} cb - Callback to run when animation is finished. 12455 */ 12456 12457 12458function animate(isIn, element, animation, cb) { 12459 element = jquery__WEBPACK_IMPORTED_MODULE_0___default()(element).eq(0); 12460 if (!element.length) return; 12461 var initClass = isIn ? initClasses[0] : initClasses[1]; 12462 var activeClass = isIn ? activeClasses[0] : activeClasses[1]; // Set up the animation 12463 12464 reset(); 12465 element.addClass(animation).css('transition', 'none'); 12466 requestAnimationFrame(function () { 12467 element.addClass(initClass); 12468 if (isIn) element.show(); 12469 }); // Start the animation 12470 12471 requestAnimationFrame(function () { 12472 element[0].offsetWidth; 12473 element.css('transition', '').addClass(activeClass); 12474 }); // Clean up the animation when it finishes 12475 12476 element.one(Object(_foundation_util_core__WEBPACK_IMPORTED_MODULE_1__["transitionend"])(element), finish); // Hides the element (for out animations), resets the element, and runs a callback 12477 12478 function finish() { 12479 if (!isIn) element.hide(); 12480 reset(); 12481 if (cb) cb.apply(element); 12482 } // Resets transitions and removes motion-specific classes 12483 12484 12485 function reset() { 12486 element[0].style.transitionDuration = 0; 12487 element.removeClass("".concat(initClass, " ").concat(activeClass, " ").concat(animation)); 12488 } 12489} 12490 12491 12492 12493/***/ }), 12494
vendor: 3,130 bytes, lines 12495-12576
12495/***/ "./node_modules/foundation-sites/js/foundation.util.nest.js": 12496/*!******************************************************************!*\ 12497 !*** ./node_modules/foundation-sites/js/foundation.util.nest.js ***! 12498 \******************************************************************/ 12499/*! exports provided: Nest */ 12500/***/ (function(module, __webpack_exports__, __webpack_require__) { 12501 12502"use strict"; 12503__webpack_require__.r(__webpack_exports__); 12504/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Nest", function() { return Nest; }); 12505/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"); 12506/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 12507 12508 12509 12510var Nest = { 12511 Feather: function Feather(menu) { 12512 var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'zf'; 12513 menu.attr('role', 'menubar'); 12514 var items = menu.find('li').attr({ 12515 'role': 'menuitem' 12516 }), 12517 subMenuClass = "is-".concat(type, "-submenu"), 12518 subItemClass = "".concat(subMenuClass, "-item"), 12519 hasSubClass = "is-".concat(type, "-submenu-parent"), 12520 applyAria = type !== 'accordion'; // Accordions handle their own ARIA attriutes. 12521 12522 items.each(function () { 12523 var $item = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), 12524 $sub = $item.children('ul'); 12525 12526 if ($sub.length) { 12527 $item.addClass(hasSubClass); 12528 $sub.addClass("submenu ".concat(subMenuClass)).attr({ 12529 'data-submenu': '' 12530 }); 12531 12532 if (applyAria) { 12533 $item.attr({ 12534 'aria-haspopup': true, 12535 'aria-label': $item.children('a:first').text() 12536 }); // Note: Drilldowns behave differently in how they hide, and so need 12537 // additional attributes. We should look if this possibly over-generalized 12538 // utility (Nest) is appropriate when we rework menus in 6.4 12539 12540 if (type === 'drilldown') { 12541 $item.attr({ 12542 'aria-expanded': false 12543 }); 12544 } 12545 } 12546 12547 $sub.addClass("submenu ".concat(subMenuClass)).attr({ 12548 'data-submenu': '', 12549 'role': 'menu' 12550 }); 12551 12552 if (type === 'drilldown') { 12553 $sub.attr({ 12554 'aria-hidden': true 12555 }); 12556 } 12557 } 12558 12559 if ($item.parent('[data-submenu]').length) { 12560 $item.addClass("is-submenu-item ".concat(subItemClass)); 12561 } 12562 }); 12563 return; 12564 }, 12565 Burn: function Burn(menu, type) { 12566 var //items = menu.find('li'), 12567 subMenuClass = "is-".concat(type, "-submenu"), 12568 subItemClass = "".concat(subMenuClass, "-item"), 12569 hasSubClass = "is-".concat(type, "-submenu-parent"); 12570 menu.find('>li, .menu, .menu > li').removeClass("".concat(subMenuClass, " ").concat(subItemClass, " ").concat(hasSubClass, " is-submenu-item submenu is-active")).removeAttr('data-submenu').css('display', ''); 12571 } 12572}; 12573 12574 12575/***/ }), 12576
vendor: 2,198 bytes, lines 12577-12644
12577/***/ "./node_modules/foundation-sites/js/foundation.util.timer.js": 12578/*!*******************************************************************!*\ 12579 !*** ./node_modules/foundation-sites/js/foundation.util.timer.js ***! 12580 \*******************************************************************/ 12581/*! exports provided: Timer */ 12582/***/ (function(module, __webpack_exports__, __webpack_require__) { 12583 12584"use strict"; 12585__webpack_require__.r(__webpack_exports__); 12586/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Timer", function() { return Timer; }); 12587/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"); 12588/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 12589 12590 12591 12592 12593function Timer(elem, options, cb) { 12594 var _this = this, 12595 duration = options.duration, 12596 //options is an object for easily adding features later. 12597 nameSpace = Object.keys(elem.data())[0] || 'timer', 12598 remain = -1, 12599 start, 12600 timer; 12601 12602 this.isPaused = false; 12603 12604 this.restart = function () { 12605 remain = -1; 12606 clearTimeout(timer); 12607 this.start(); 12608 }; 12609 12610 this.start = function () { 12611 this.isPaused = false; // if(!elem.data('paused')){ return false; }//maybe implement this sanity check if used for other things. 12612 12613 clearTimeout(timer); 12614 remain = remain <= 0 ? duration : remain; 12615 elem.data('paused', false); 12616 start = Date.now(); 12617 timer = setTimeout(function () { 12618 if (options.infinite) { 12619 _this.restart(); //rerun the timer. 12620 12621 } 12622 12623 if (cb && typeof cb === 'function') { 12624 cb(); 12625 } 12626 }, remain); 12627 elem.trigger("timerstart.zf.".concat(nameSpace)); 12628 }; 12629 12630 this.pause = function () { 12631 this.isPaused = true; //if(elem.data('paused')){ return false; }//maybe implement this sanity check if used for other things. 12632 12633 clearTimeout(timer); 12634 elem.data('paused', true); 12635 var end = Date.now(); 12636 remain = remain - (end - start); 12637 elem.trigger("timerpaused.zf.".concat(nameSpace)); 12638 }; 12639} 12640 12641 12642 12643/***/ }), 12644
vendor: 6,474 bytes, lines 12645-12832
12645/***/ "./node_modules/foundation-sites/js/foundation.util.touch.js": 12646/*!*******************************************************************!*\ 12647 !*** ./node_modules/foundation-sites/js/foundation.util.touch.js ***! 12648 \*******************************************************************/ 12649/*! exports provided: Touch */ 12650/***/ (function(module, __webpack_exports__, __webpack_require__) { 12651 12652"use strict"; 12653__webpack_require__.r(__webpack_exports__); 12654/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Touch", function() { return Touch; }); 12655/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"); 12656/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 12657function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 12658 12659function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 12660 12661function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } 12662 12663//************************************************** 12664//**Work inspired by multiple jquery swipe plugins** 12665//**Done by Yohai Ararat *************************** 12666//************************************************** 12667 12668var Touch = {}; 12669var startPosX, 12670 startPosY, 12671 startTime, 12672 elapsedTime, 12673 isMoving = false; 12674 12675function onTouchEnd() { 12676 // alert(this); 12677 this.removeEventListener('touchmove', onTouchMove); 12678 this.removeEventListener('touchend', onTouchEnd); 12679 isMoving = false; 12680} 12681 12682function onTouchMove(e) { 12683 if (jquery__WEBPACK_IMPORTED_MODULE_0___default.a.spotSwipe.preventDefault) { 12684 e.preventDefault(); 12685 } 12686 12687 if (isMoving) { 12688 var x = e.touches[0].pageX; 12689 var y = e.touches[0].pageY; 12690 var dx = startPosX - x; 12691 var dy = startPosY - y; 12692 var dir; 12693 elapsedTime = new Date().getTime() - startTime; 12694 12695 if (Math.abs(dx) >= jquery__WEBPACK_IMPORTED_MODULE_0___default.a.spotSwipe.moveThreshold && elapsedTime <= jquery__WEBPACK_IMPORTED_MODULE_0___default.a.spotSwipe.timeThreshold) { 12696 dir = dx > 0 ? 'left' : 'right'; 12697 } // else if(Math.abs(dy) >= $.spotSwipe.moveThreshold && elapsedTime <= $.spotSwipe.timeThreshold) { 12698 // dir = dy > 0 ? 'down' : 'up'; 12699 // } 12700 12701 12702 if (dir) { 12703 e.preventDefault(); 12704 onTouchEnd.call(this); 12705 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).trigger('swipe', dir).trigger("swipe".concat(dir)); 12706 } 12707 } 12708} 12709 12710function onTouchStart(e) { 12711 if (e.touches.length == 1) { 12712 startPosX = e.touches[0].pageX; 12713 startPosY = e.touches[0].pageY; 12714 isMoving = true; 12715 startTime = new Date().getTime(); 12716 this.addEventListener('touchmove', onTouchMove, false); 12717 this.addEventListener('touchend', onTouchEnd, false); 12718 } 12719} 12720 12721function init() { 12722 this.addEventListener && this.addEventListener('touchstart', onTouchStart, false); 12723} 12724 12725function teardown() { 12726 this.removeEventListener('touchstart', onTouchStart); 12727} 12728 12729var SpotSwipe = 12730/*#__PURE__*/ 12731function () { 12732 function SpotSwipe($) { 12733 _classCallCheck(this, SpotSwipe); 12734 12735 this.version = '1.0.0'; 12736 this.enabled = 'ontouchstart' in document.documentElement; 12737 this.preventDefault = false; 12738 this.moveThreshold = 75; 12739 this.timeThreshold = 200; 12740 this.$ = $; 12741 12742 this._init(); 12743 } 12744 12745 _createClass(SpotSwipe, [{ 12746 key: "_init", 12747 value: function _init() { 12748 var $ = this.$; 12749 $.event.special.swipe = { 12750 setup: init 12751 }; 12752 $.each(['left', 'up', 'down', 'right'], function () { 12753 $.event.special["swipe".concat(this)] = { 12754 setup: function setup() { 12755 $(this).on('swipe', $.noop); 12756 } 12757 }; 12758 }); 12759 } 12760 }]); 12761 12762 return SpotSwipe; 12763}(); 12764/**************************************************** 12765 * As far as I can tell, both setupSpotSwipe and * 12766 * setupTouchHandler should be idempotent, * 12767 * because they directly replace functions & * 12768 * values, and do not add event handlers directly. * 12769 ****************************************************/ 12770 12771 12772Touch.setupSpotSwipe = function ($) { 12773 $.spotSwipe = new SpotSwipe($); 12774}; 12775/**************************************************** 12776 * Method for adding pseudo drag events to elements * 12777 ***************************************************/ 12778 12779 12780Touch.setupTouchHandler = function ($) { 12781 $.fn.addTouch = function () { 12782 this.each(function (i, el) { 12783 $(el).bind('touchstart touchmove touchend touchcancel', function () { 12784 //we pass the original event object because the jQuery event 12785 //object is normalized to w3c specs and does not provide the TouchList 12786 handleTouch(event); 12787 }); 12788 }); 12789 12790 var handleTouch = function handleTouch(event) { 12791 var touches = event.changedTouches, 12792 first = touches[0], 12793 eventTypes = { 12794 touchstart: 'mousedown', 12795 touchmove: 'mousemove', 12796 touchend: 'mouseup' 12797 }, 12798 type = eventTypes[event.type], 12799 simulatedEvent; 12800 12801 if ('MouseEvent' in window && typeof window.MouseEvent === 'function') { 12802 simulatedEvent = new window.MouseEvent(type, { 12803 'bubbles': true, 12804 'cancelable': true, 12805 'screenX': first.screenX, 12806 'screenY': first.screenY, 12807 'clientX': first.clientX, 12808 'clientY': first.clientY 12809 }); 12810 } else { 12811 simulatedEvent = document.createEvent('MouseEvent'); 12812 simulatedEvent.initMouseEvent(type, true, true, window, 1, first.screenX, first.screenY, first.clientX, first.clientY, false, false, false, false, 0 12813 /*left*/ 12814 , null); 12815 } 12816 12817 first.target.dispatchEvent(simulatedEvent); 12818 }; 12819 }; 12820}; 12821 12822Touch.init = function ($) { 12823 if (typeof $.spotSwipe === 'undefined') { 12824 Touch.setupSpotSwipe($); 12825 Touch.setupTouchHandler($); 12826 } 12827}; 12828 12829 12830 12831/***/ }), 12832
vendor: 12,221 bytes, lines 12833-13133
12833/***/ "./node_modules/foundation-sites/js/foundation.util.triggers.js": 12834/*!**********************************************************************!*\ 12835 !*** ./node_modules/foundation-sites/js/foundation.util.triggers.js ***! 12836 \**********************************************************************/ 12837/*! exports provided: Triggers */ 12838/***/ (function(module, __webpack_exports__, __webpack_require__) { 12839 12840"use strict"; 12841__webpack_require__.r(__webpack_exports__); 12842/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Triggers", function() { return Triggers; }); 12843/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"); 12844/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 12845/* harmony import */ var _foundation_util_motion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.util.motion */ "./node_modules/foundation-sites/js/foundation.util.motion.js"); 12846 12847 12848function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 12849 12850 12851 12852 12853var MutationObserver = function () { 12854 var prefixes = ['WebKit', 'Moz', 'O', 'Ms', '']; 12855 12856 for (var i = 0; i < prefixes.length; i++) { 12857 if ("".concat(prefixes[i], "MutationObserver") in window) { 12858 return window["".concat(prefixes[i], "MutationObserver")]; 12859 } 12860 } 12861 12862 return false; 12863}(); 12864 12865var triggers = function triggers(el, type) { 12866 el.data(type).split(' ').forEach(function (id) { 12867 jquery__WEBPACK_IMPORTED_MODULE_0___default()("#".concat(id))[type === 'close' ? 'trigger' : 'triggerHandler']("".concat(type, ".zf.trigger"), [el]); 12868 }); 12869}; 12870 12871var Triggers = { 12872 Listeners: { 12873 Basic: {}, 12874 Global: {} 12875 }, 12876 Initializers: {} 12877}; 12878Triggers.Listeners.Basic = { 12879 openListener: function openListener() { 12880 triggers(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), 'open'); 12881 }, 12882 closeListener: function closeListener() { 12883 var id = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('close'); 12884 12885 if (id) { 12886 triggers(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), 'close'); 12887 } else { 12888 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).trigger('close.zf.trigger'); 12889 } 12890 }, 12891 toggleListener: function toggleListener() { 12892 var id = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('toggle'); 12893 12894 if (id) { 12895 triggers(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), 'toggle'); 12896 } else { 12897 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).trigger('toggle.zf.trigger'); 12898 } 12899 }, 12900 closeableListener: function closeableListener(e) { 12901 e.stopPropagation(); 12902 var animation = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('closable'); 12903 12904 if (animation !== '') { 12905 _foundation_util_motion__WEBPACK_IMPORTED_MODULE_1__["Motion"].animateOut(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), animation, function () { 12906 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).trigger('closed.zf'); 12907 }); 12908 } else { 12909 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).fadeOut().trigger('closed.zf'); 12910 } 12911 }, 12912 toggleFocusListener: function toggleFocusListener() { 12913 var id = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('toggle-focus'); 12914 jquery__WEBPACK_IMPORTED_MODULE_0___default()("#".concat(id)).triggerHandler('toggle.zf.trigger', [jquery__WEBPACK_IMPORTED_MODULE_0___default()(this)]); 12915 } 12916}; // Elements with [data-open] will reveal a plugin that supports it when clicked. 12917 12918Triggers.Initializers.addOpenListener = function ($elem) { 12919 $elem.off('click.zf.trigger', Triggers.Listeners.Basic.openListener); 12920 $elem.on('click.zf.trigger', '[data-open]', Triggers.Listeners.Basic.openListener); 12921}; // Elements with [data-close] will close a plugin that supports it when clicked. 12922// If used without a value on [data-close], the event will bubble, allowing it to close a parent component. 12923 12924 12925Triggers.Initializers.addCloseListener = function ($elem) { 12926 $elem.off('click.zf.trigger', Triggers.Listeners.Basic.closeListener); 12927 $elem.on('click.zf.trigger', '[data-close]', Triggers.Listeners.Basic.closeListener); 12928}; // Elements with [data-toggle] will toggle a plugin that supports it when clicked. 12929 12930 12931Triggers.Initializers.addToggleListener = function ($elem) { 12932 $elem.off('click.zf.trigger', Triggers.Listeners.Basic.toggleListener); 12933 $elem.on('click.zf.trigger', '[data-toggle]', Triggers.Listeners.Basic.toggleListener); 12934}; // Elements with [data-closable] will respond to close.zf.trigger events. 12935 12936 12937Triggers.Initializers.addCloseableListener = function ($elem) { 12938 $elem.off('close.zf.trigger', Triggers.Listeners.Basic.closeableListener); 12939 $elem.on('close.zf.trigger', '[data-closeable], [data-closable]', Triggers.Listeners.Basic.closeableListener); 12940}; // Elements with [data-toggle-focus] will respond to coming in and out of focus 12941 12942 12943Triggers.Initializers.addToggleFocusListener = function ($elem) { 12944 $elem.off('focus.zf.trigger blur.zf.trigger', Triggers.Listeners.Basic.toggleFocusListener); 12945 $elem.on('focus.zf.trigger blur.zf.trigger', '[data-toggle-focus]', Triggers.Listeners.Basic.toggleFocusListener); 12946}; // More Global/complex listeners and triggers 12947 12948 12949Triggers.Listeners.Global = { 12950 resizeListener: function resizeListener($nodes) { 12951 if (!MutationObserver) { 12952 //fallback for IE 9 12953 $nodes.each(function () { 12954 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).triggerHandler('resizeme.zf.trigger'); 12955 }); 12956 } //trigger all listening elements and signal a resize event 12957 12958 12959 $nodes.attr('data-events', "resize"); 12960 }, 12961 scrollListener: function scrollListener($nodes) { 12962 if (!MutationObserver) { 12963 //fallback for IE 9 12964 $nodes.each(function () { 12965 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).triggerHandler('scrollme.zf.trigger'); 12966 }); 12967 } //trigger all listening elements and signal a scroll event 12968 12969 12970 $nodes.attr('data-events', "scroll"); 12971 }, 12972 closeMeListener: function closeMeListener(e, pluginId) { 12973 var plugin = e.namespace.split('.')[0]; 12974 var plugins = jquery__WEBPACK_IMPORTED_MODULE_0___default()("[data-".concat(plugin, "]")).not("[data-yeti-box=\"".concat(pluginId, "\"]")); 12975 plugins.each(function () { 12976 var _this = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this); 12977 12978 _this.triggerHandler('close.zf.trigger', [_this]); 12979 }); 12980 } // Global, parses whole document. 12981 12982}; 12983 12984Triggers.Initializers.addClosemeListener = function (pluginName) { 12985 var yetiBoxes = jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-yeti-box]'), 12986 plugNames = ['dropdown', 'tooltip', 'reveal']; 12987 12988 if (pluginName) { 12989 if (typeof pluginName === 'string') { 12990 plugNames.push(pluginName); 12991 } else if (_typeof(pluginName) === 'object' && typeof pluginName[0] === 'string') { 12992 plugNames.concat(pluginName); 12993 } else { 12994 console.error('Plugin names must be strings'); 12995 } 12996 } 12997 12998 if (yetiBoxes.length) { 12999 var listeners = plugNames.map(function (name) { 13000 return "closeme.zf.".concat(name); 13001 }).join(' '); 13002 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).off(listeners).on(listeners, Triggers.Listeners.Global.closeMeListener); 13003 } 13004}; 13005 13006function debounceGlobalListener(debounce, trigger, listener) { 13007 var timer, 13008 args = Array.prototype.slice.call(arguments, 3); 13009 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).off(trigger).on(trigger, function (e) { 13010 if (timer) { 13011 clearTimeout(timer); 13012 } 13013 13014 timer = setTimeout(function () { 13015 listener.apply(null, args); 13016 }, debounce || 10); //default time to emit scroll event 13017 }); 13018} 13019 13020Triggers.Initializers.addResizeListener = function (debounce) { 13021 var $nodes = jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-resize]'); 13022 13023 if ($nodes.length) { 13024 debounceGlobalListener(debounce, 'resize.zf.trigger', Triggers.Listeners.Global.resizeListener, $nodes); 13025 } 13026}; 13027 13028Triggers.Initializers.addScrollListener = function (debounce) { 13029 var $nodes = jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-scroll]'); 13030 13031 if ($nodes.length) { 13032 debounceGlobalListener(debounce, 'scroll.zf.trigger', Triggers.Listeners.Global.scrollListener, $nodes); 13033 } 13034}; 13035 13036Triggers.Initializers.addMutationEventsListener = function ($elem) { 13037 if (!MutationObserver) { 13038 return false; 13039 } 13040 13041 var $nodes = $elem.find('[data-resize], [data-scroll], [data-mutate]'); //element callback 13042 13043 var listeningElementsMutation = function listeningElementsMutation(mutationRecordsList) { 13044 var $target = jquery__WEBPACK_IMPORTED_MODULE_0___default()(mutationRecordsList[0].target); //trigger the event handler for the element depending on type 13045 13046 switch (mutationRecordsList[0].type) { 13047 case "attributes": 13048 if ($target.attr("data-events") === "scroll" && mutationRecordsList[0].attributeName === "data-events") { 13049 $target.triggerHandler('scrollme.zf.trigger', [$target, window.pageYOffset]); 13050 } 13051 13052 if ($target.attr("data-events") === "resize" && mutationRecordsList[0].attributeName === "data-events") { 13053 $target.triggerHandler('resizeme.zf.trigger', [$target]); 13054 } 13055 13056 if (mutationRecordsList[0].attributeName === "style") { 13057 $target.closest("[data-mutate]").attr("data-events", "mutate"); 13058 $target.closest("[data-mutate]").triggerHandler('mutateme.zf.trigger', [$target.closest("[data-mutate]")]); 13059 } 13060 13061 break; 13062 13063 case "childList": 13064 $target.closest("[data-mutate]").attr("data-events", "mutate"); 13065 $target.closest("[data-mutate]").triggerHandler('mutateme.zf.trigger', [$target.closest("[data-mutate]")]); 13066 break; 13067 13068 default: 13069 return false; 13070 //nothing 13071 } 13072 }; 13073 13074 if ($nodes.length) { 13075 //for each element that needs to listen for resizing, scrolling, or mutation add a single observer 13076 for (var i = 0; i <= $nodes.length - 1; i++) { 13077 var elementObserver = new MutationObserver(listeningElementsMutation); 13078 elementObserver.observe($nodes[i], { 13079 attributes: true, 13080 childList: true, 13081 characterData: false, 13082 subtree: true, 13083 attributeFilter: ["data-events", "style"] 13084 }); 13085 } 13086 } 13087}; 13088 13089Triggers.Initializers.addSimpleListeners = function () { 13090 var $document = jquery__WEBPACK_IMPORTED_MODULE_0___default()(document); 13091 Triggers.Initializers.addOpenListener($document); 13092 Triggers.Initializers.addCloseListener($document); 13093 Triggers.Initializers.addToggleListener($document); 13094 Triggers.Initializers.addCloseableListener($document); 13095 Triggers.Initializers.addToggleFocusListener($document); 13096}; 13097 13098Triggers.Initializers.addGlobalListeners = function () { 13099 var $document = jquery__WEBPACK_IMPORTED_MODULE_0___default()(document); 13100 Triggers.Initializers.addMutationEventsListener($document); 13101 Triggers.Initializers.addResizeListener(); 13102 Triggers.Initializers.addScrollListener(); 13103 Triggers.Initializers.addClosemeListener(); 13104}; 13105 13106Triggers.init = function ($, Foundation) { 13107 if (typeof $.triggersInitialized === 'undefined') { 13108 var $document = $(document); 13109 13110 if (document.readyState === "complete") { 13111 Triggers.Initializers.addSimpleListeners(); 13112 Triggers.Initializers.addGlobalListeners(); 13113 } else { 13114 $(window).on('load', function () { 13115 Triggers.Initializers.addSimpleListeners(); 13116 Triggers.Initializers.addGlobalListeners(); 13117 }); 13118 } 13119 13120 $.triggersInitialized = true; 13121 } 13122 13123 if (Foundation) { 13124 Foundation.Triggers = Triggers; // Legacy included to be backwards compatible for now. 13125 13126 Foundation.IHearYou = Triggers.Initializers.addGlobalListeners; 13127 } 13128}; 13129 13130 13131 13132/***/ }), 13133
vendor: 318,631 bytes, lines 13134-22464
13134/***/ "./node_modules/jquery/dist/jquery.js": 13135/*!********************************************!*\ 13136 !*** ./node_modules/jquery/dist/jquery.js ***! 13137 \********************************************/ 13138/*! no static exports found */ 13139/***/ (function(module, exports, __webpack_require__) { 13140 13141/* WEBPACK VAR INJECTION */(function(module) {var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 13142 13143/*! 13144 * jQuery JavaScript Library v3.4.1 13145 * https://jquery.com/ 13146 * 13147 * Includes Sizzle.js 13148 * https://sizzlejs.com/ 13149 * 13150 * Copyright JS Foundation and other contributors 13151 * Released under the MIT license 13152 * https://jquery.org/license 13153 * 13154 * Date: 2019-05-01T21:04Z 13155 */ 13156(function (global, factory) { 13157 "use strict"; 13158 13159 if (( false ? undefined : _typeof(module)) === "object" && _typeof(module.exports) === "object") { 13160 // For CommonJS and CommonJS-like environments where a proper `window` 13161 // is present, execute the factory and get jQuery. 13162 // For environments that do not have a `window` with a `document` 13163 // (such as Node.js), expose a factory as module.exports. 13164 // This accentuates the need for the creation of a real `window`. 13165 // e.g. var jQuery = require("jquery")(window); 13166 // See ticket #14549 for more info. 13167 module.exports = global.document ? factory(global, true) : function (w) { 13168 if (!w.document) { 13169 throw new Error("jQuery requires a window with a document"); 13170 } 13171 13172 return factory(w); 13173 }; 13174 } else { 13175 factory(global); 13176 } // Pass this if window is not defined yet 13177 13178})(typeof window !== "undefined" ? window : this, function (window, noGlobal) { 13179 // Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1 13180 // throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode 13181 // arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common 13182 // enough that all such attempts are guarded in a try block. 13183 "use strict"; 13184 13185 var arr = []; 13186 var document = window.document; 13187 var getProto = Object.getPrototypeOf; 13188 var _slice = arr.slice; 13189 var concat = arr.concat; 13190 var push = arr.push; 13191 var indexOf = arr.indexOf; 13192 var class2type = {}; 13193 var toString = class2type.toString; 13194 var hasOwn = class2type.hasOwnProperty; 13195 var fnToString = hasOwn.toString; 13196 var ObjectFunctionString = fnToString.call(Object); 13197 var support = {}; 13198 13199 var isFunction = function isFunction(obj) { 13200 // Support: Chrome <=57, Firefox <=52 13201 // In some browsers, typeof returns "function" for HTML <object> elements 13202 // (i.e., `typeof document.createElement( "object" ) === "function"`). 13203 // We don't want to classify *any* DOM node as a function. 13204 return typeof obj === "function" && typeof obj.nodeType !== "number"; 13205 }; 13206 13207 var isWindow = function isWindow(obj) { 13208 return obj != null && obj === obj.window; 13209 }; 13210 13211 var preservedScriptAttributes = { 13212 type: true, 13213 src: true, 13214 nonce: true, 13215 noModule: true 13216 }; 13217 13218 function DOMEval(code, node, doc) { 13219 doc = doc || document; 13220 var i, 13221 val, 13222 script = doc.createElement("script"); 13223 script.text = code; 13224 13225 if (node) { 13226 for (i in preservedScriptAttributes) { 13227 // Support: Firefox 64+, Edge 18+ 13228 // Some browsers don't support the "nonce" property on scripts. 13229 // On the other hand, just using `getAttribute` is not enough as 13230 // the `nonce` attribute is reset to an empty string whenever it 13231 // becomes browsing-context connected. 13232 // See https://github.com/whatwg/html/issues/2369 13233 // See https://html.spec.whatwg.org/#nonce-attributes 13234 // The `node.getAttribute` check was added for the sake of 13235 // `jQuery.globalEval` so that it can fake a nonce-containing node 13236 // via an object. 13237 val = node[i] || node.getAttribute && node.getAttribute(i); 13238 13239 if (val) { 13240 script.setAttribute(i, val); 13241 } 13242 } 13243 } 13244 13245 doc.head.appendChild(script).parentNode.removeChild(script); 13246 } 13247 13248 function toType(obj) { 13249 if (obj == null) { 13250 return obj + ""; 13251 } // Support: Android <=2.3 only (functionish RegExp) 13252 13253 13254 return _typeof(obj) === "object" || typeof obj === "function" ? class2type[toString.call(obj)] || "object" : _typeof(obj); 13255 } 13256 /* global Symbol */ 13257 // Defining this global in .eslintrc.json would create a danger of using the global 13258 // unguarded in another place, it seems safer to define global only for this module 13259 13260 13261 var version = "3.4.1", 13262 // Define a local copy of jQuery 13263 jQuery = function jQuery(selector, context) { 13264 // The jQuery object is actually just the init constructor 'enhanced' 13265 // Need init if jQuery is called (just allow error to be thrown if not included) 13266 return new jQuery.fn.init(selector, context); 13267 }, 13268 // Support: Android <=4.0 only 13269 // Make sure we trim BOM and NBSP 13270 rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g; 13271 13272 jQuery.fn = jQuery.prototype = { 13273 // The current version of jQuery being used 13274 jquery: version, 13275 constructor: jQuery, 13276 // The default length of a jQuery object is 0 13277 length: 0, 13278 toArray: function toArray() { 13279 return _slice.call(this); 13280 }, 13281 // Get the Nth element in the matched element set OR 13282 // Get the whole matched element set as a clean array 13283 get: function get(num) { 13284 // Return all the elements in a clean array 13285 if (num == null) { 13286 return _slice.call(this); 13287 } // Return just the one element from the set 13288 13289 13290 return num < 0 ? this[num + this.length] : this[num]; 13291 }, 13292 // Take an array of elements and push it onto the stack 13293 // (returning the new matched element set) 13294 pushStack: function pushStack(elems) { 13295 // Build a new jQuery matched element set 13296 var ret = jQuery.merge(this.constructor(), elems); // Add the old object onto the stack (as a reference) 13297 13298 ret.prevObject = this; // Return the newly-formed element set 13299 13300 return ret; 13301 }, 13302 // Execute a callback for every element in the matched set. 13303 each: function each(callback) { 13304 return jQuery.each(this, callback); 13305 }, 13306 map: function map(callback) { 13307 return this.pushStack(jQuery.map(this, function (elem, i) { 13308 return callback.call(elem, i, elem); 13309 })); 13310 }, 13311 slice: function slice() { 13312 return this.pushStack(_slice.apply(this, arguments)); 13313 }, 13314 first: function first() { 13315 return this.eq(0); 13316 }, 13317 last: function last() { 13318 return this.eq(-1); 13319 }, 13320 eq: function eq(i) { 13321 var len = this.length, 13322 j = +i + (i < 0 ? len : 0); 13323 return this.pushStack(j >= 0 && j < len ? [this[j]] : []); 13324 }, 13325 end: function end() { 13326 return this.prevObject || this.constructor(); 13327 }, 13328 // For internal use only. 13329 // Behaves like an Array's method, not like a jQuery method. 13330 push: push, 13331 sort: arr.sort, 13332 splice: arr.splice 13333 }; 13334 13335 jQuery.extend = jQuery.fn.extend = function () { 13336 var options, 13337 name, 13338 src, 13339 copy, 13340 copyIsArray, 13341 clone, 13342 target = arguments[0] || {}, 13343 i = 1, 13344 length = arguments.length, 13345 deep = false; // Handle a deep copy situation 13346 13347 if (typeof target === "boolean") { 13348 deep = target; // Skip the boolean and the target 13349 13350 target = arguments[i] || {}; 13351 i++; 13352 } // Handle case when target is a string or something (possible in deep copy) 13353 13354 13355 if (_typeof(target) !== "object" && !isFunction(target)) { 13356 target = {}; 13357 } // Extend jQuery itself if only one argument is passed 13358 13359 13360 if (i === length) { 13361 target = this; 13362 i--; 13363 } 13364 13365 for (; i < length; i++) { 13366 // Only deal with non-null/undefined values 13367 if ((options = arguments[i]) != null) { 13368 // Extend the base object 13369 for (name in options) { 13370 copy = options[name]; // Prevent Object.prototype pollution 13371 // Prevent never-ending loop 13372 13373 if (name === "__proto__" || target === copy) { 13374 continue; 13375 } // Recurse if we're merging plain objects or arrays 13376 13377 13378 if (deep && copy && (jQuery.isPlainObject(copy) || (copyIsArray = Array.isArray(copy)))) { 13379 src = target[name]; // Ensure proper type for the source value 13380 13381 if (copyIsArray && !Array.isArray(src)) { 13382 clone = []; 13383 } else if (!copyIsArray && !jQuery.isPlainObject(src)) { 13384 clone = {}; 13385 } else { 13386 clone = src; 13387 } 13388 13389 copyIsArray = false; // Never move original objects, clone them 13390 13391 target[name] = jQuery.extend(deep, clone, copy); // Don't bring in undefined values 13392 } else if (copy !== undefined) { 13393 target[name] = copy; 13394 } 13395 } 13396 } 13397 } // Return the modified object 13398 13399 13400 return target; 13401 }; 13402 13403 jQuery.extend({ 13404 // Unique for each copy of jQuery on the page 13405 expando: "jQuery" + (version + Math.random()).replace(/\D/g, ""), 13406 // Assume jQuery is ready without the ready module 13407 isReady: true, 13408 error: function error(msg) { 13409 throw new Error(msg); 13410 }, 13411 noop: function noop() {}, 13412 isPlainObject: function isPlainObject(obj) { 13413 var proto, Ctor; // Detect obvious negatives 13414 // Use toString instead of jQuery.type to catch host objects 13415 13416 if (!obj || toString.call(obj) !== "[object Object]") { 13417 return false; 13418 } 13419 13420 proto = getProto(obj); // Objects with no prototype (e.g., `Object.create( null )`) are plain 13421 13422 if (!proto) { 13423 return true; 13424 } // Objects with prototype are plain iff they were constructed by a global Object function 13425 13426 13427 Ctor = hasOwn.call(proto, "constructor") && proto.constructor; 13428 return typeof Ctor === "function" && fnToString.call(Ctor) === ObjectFunctionString; 13429 }, 13430 isEmptyObject: function isEmptyObject(obj) { 13431 var name; 13432 13433 for (name in obj) { 13434 return false; 13435 } 13436 13437 return true; 13438 }, 13439 // Evaluates a script in a global context 13440 globalEval: function globalEval(code, options) { 13441 DOMEval(code, { 13442 nonce: options && options.nonce 13443 }); 13444 }, 13445 each: function each(obj, callback) { 13446 var length, 13447 i = 0; 13448 13449 if (isArrayLike(obj)) { 13450 length = obj.length; 13451 13452 for (; i < length; i++) { 13453 if (callback.call(obj[i], i, obj[i]) === false) { 13454 break; 13455 } 13456 } 13457 } else { 13458 for (i in obj) { 13459 if (callback.call(obj[i], i, obj[i]) === false) { 13460 break; 13461 } 13462 } 13463 } 13464 13465 return obj; 13466 }, 13467 // Support: Android <=4.0 only 13468 trim: function trim(text) { 13469 return text == null ? "" : (text + "").replace(rtrim, ""); 13470 }, 13471 // results is for internal usage only 13472 makeArray: function makeArray(arr, results) { 13473 var ret = results || []; 13474 13475 if (arr != null) { 13476 if (isArrayLike(Object(arr))) { 13477 jQuery.merge(ret, typeof arr === "string" ? [arr] : arr); 13478 } else { 13479 push.call(ret, arr); 13480 } 13481 } 13482 13483 return ret; 13484 }, 13485 inArray: function inArray(elem, arr, i) { 13486 return arr == null ? -1 : indexOf.call(arr, elem, i); 13487 }, 13488 // Support: Android <=4.0 only, PhantomJS 1 only 13489 // push.apply(_, arraylike) throws on ancient WebKit 13490 merge: function merge(first, second) { 13491 var len = +second.length, 13492 j = 0, 13493 i = first.length; 13494 13495 for (; j < len; j++) { 13496 first[i++] = second[j]; 13497 } 13498 13499 first.length = i; 13500 return first; 13501 }, 13502 grep: function grep(elems, callback, invert) { 13503 var callbackInverse, 13504 matches = [], 13505 i = 0, 13506 length = elems.length, 13507 callbackExpect = !invert; // Go through the array, only saving the items 13508 // that pass the validator function 13509 13510 for (; i < length; i++) { 13511 callbackInverse = !callback(elems[i], i); 13512 13513 if (callbackInverse !== callbackExpect) { 13514 matches.push(elems[i]); 13515 } 13516 } 13517 13518 return matches; 13519 }, 13520 // arg is for internal usage only 13521 map: function map(elems, callback, arg) { 13522 var length, 13523 value, 13524 i = 0, 13525 ret = []; // Go through the array, translating each of the items to their new values 13526 13527 if (isArrayLike(elems)) { 13528 length = elems.length; 13529 13530 for (; i < length; i++) { 13531 value = callback(elems[i], i, arg); 13532 13533 if (value != null) { 13534 ret.push(value); 13535 } 13536 } // Go through every key on the object, 13537 13538 } else { 13539 for (i in elems) { 13540 value = callback(elems[i], i, arg); 13541 13542 if (value != null) { 13543 ret.push(value); 13544 } 13545 } 13546 } // Flatten any nested arrays 13547 13548 13549 return concat.apply([], ret); 13550 }, 13551 // A global GUID counter for objects 13552 guid: 1, 13553 // jQuery.support is not used in Core but other projects attach their 13554 // properties to it so it needs to exist. 13555 support: support 13556 }); 13557 13558 if (typeof Symbol === "function") { 13559 jQuery.fn[Symbol.iterator] = arr[Symbol.iterator]; 13560 } // Populate the class2type map 13561 13562 13563 jQuery.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "), function (i, name) { 13564 class2type["[object " + name + "]"] = name.toLowerCase(); 13565 }); 13566 13567 function isArrayLike(obj) { 13568 // Support: real iOS 8.2 only (not reproducible in simulator) 13569 // `in` check used to prevent JIT error (gh-2145) 13570 // hasOwn isn't used here due to false negatives 13571 // regarding Nodelist length in IE 13572 var length = !!obj && "length" in obj && obj.length, 13573 type = toType(obj); 13574 13575 if (isFunction(obj) || isWindow(obj)) { 13576 return false; 13577 } 13578 13579 return type === "array" || length === 0 || typeof length === "number" && length > 0 && length - 1 in obj; 13580 } 13581 13582 var Sizzle = 13583 /*! 13584 * Sizzle CSS Selector Engine v2.3.4 13585 * https://sizzlejs.com/ 13586 * 13587 * Copyright JS Foundation and other contributors 13588 * Released under the MIT license 13589 * https://js.foundation/ 13590 * 13591 * Date: 2019-04-08 13592 */ 13593 function (window) { 13594 var i, 13595 support, 13596 Expr, 13597 getText, 13598 isXML, 13599 tokenize, 13600 compile, 13601 select, 13602 outermostContext, 13603 sortInput, 13604 hasDuplicate, 13605 // Local document vars 13606 setDocument, 13607 document, 13608 docElem, 13609 documentIsHTML, 13610 rbuggyQSA, 13611 rbuggyMatches, 13612 matches, 13613 contains, 13614 // Instance-specific data 13615 expando = "sizzle" + 1 * new Date(), 13616 preferredDoc = window.document, 13617 dirruns = 0, 13618 done = 0, 13619 classCache = createCache(), 13620 tokenCache = createCache(), 13621 compilerCache = createCache(), 13622 nonnativeSelectorCache = createCache(), 13623 sortOrder = function sortOrder(a, b) { 13624 if (a === b) { 13625 hasDuplicate = true; 13626 } 13627 13628 return 0; 13629 }, 13630 // Instance methods 13631 hasOwn = {}.hasOwnProperty, 13632 arr = [], 13633 pop = arr.pop, 13634 push_native = arr.push, 13635 push = arr.push, 13636 slice = arr.slice, 13637 // Use a stripped-down indexOf as it's faster than native 13638 // https://jsperf.com/thor-indexof-vs-for/5 13639 indexOf = function indexOf(list, elem) { 13640 var i = 0, 13641 len = list.length; 13642 13643 for (; i < len; i++) { 13644 if (list[i] === elem) { 13645 return i; 13646 } 13647 } 13648 13649 return -1; 13650 }, 13651 booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", 13652 // Regular expressions 13653 // http://www.w3.org/TR/css3-selectors/#whitespace 13654 whitespace = "[\\x20\\t\\r\\n\\f]", 13655 // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier 13656 identifier = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+", 13657 // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors 13658 attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + // Operator (capture 2) 13659 "*([*^$|!~]?=)" + whitespace + // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" 13660 "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + "*\\]", 13661 pseudos = ":(" + identifier + ")(?:\\((" + // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: 13662 // 1. quoted (capture 3; capture 4 or capture 5) 13663 "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + // 2. simple (capture 6) 13664 "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + // 3. anything else (capture 2) 13665 ".*" + ")\\)|)", 13666 // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter 13667 rwhitespace = new RegExp(whitespace + "+", "g"), 13668 rtrim = new RegExp("^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g"), 13669 rcomma = new RegExp("^" + whitespace + "*," + whitespace + "*"), 13670 rcombinators = new RegExp("^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*"), 13671 rdescend = new RegExp(whitespace + "|>"), 13672 rpseudo = new RegExp(pseudos), 13673 ridentifier = new RegExp("^" + identifier + "$"), 13674 matchExpr = { 13675 "ID": new RegExp("^#(" + identifier + ")"), 13676 "CLASS": new RegExp("^\\.(" + identifier + ")"), 13677 "TAG": new RegExp("^(" + identifier + "|[*])"), 13678 "ATTR": new RegExp("^" + attributes), 13679 "PSEUDO": new RegExp("^" + pseudos), 13680 "CHILD": new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i"), 13681 "bool": new RegExp("^(?:" + booleans + ")$", "i"), 13682 // For use in libraries implementing .is() 13683 // We use this for POS matching in `select` 13684 "needsContext": new RegExp("^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i") 13685 }, 13686 rhtml = /HTML$/i, 13687 rinputs = /^(?:input|select|textarea|button)$/i, 13688 rheader = /^h\d$/i, 13689 rnative = /^[^{]+\{\s*\[native \w/, 13690 // Easily-parseable/retrievable ID or TAG or CLASS selectors 13691 rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, 13692 rsibling = /[+~]/, 13693 // CSS escapes 13694 // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters 13695 runescape = new RegExp("\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig"), 13696 funescape = function funescape(_, escaped, escapedWhitespace) { 13697 var high = "0x" + escaped - 0x10000; // NaN means non-codepoint 13698 // Support: Firefox<24 13699 // Workaround erroneous numeric interpretation of +"0x" 13700 13701 return high !== high || escapedWhitespace ? escaped : high < 0 ? // BMP codepoint 13702 String.fromCharCode(high + 0x10000) : // Supplemental Plane codepoint (surrogate pair) 13703 String.fromCharCode(high >> 10 | 0xD800, high & 0x3FF | 0xDC00); 13704 }, 13705 // CSS string/identifier serialization 13706 // https://drafts.csswg.org/cssom/#common-serializing-idioms 13707 rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, 13708 fcssescape = function fcssescape(ch, asCodePoint) { 13709 if (asCodePoint) { 13710 // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER 13711 if (ch === "\0") { 13712 return "\uFFFD"; 13713 } // Control characters and (dependent upon position) numbers get escaped as code points 13714 13715 13716 return ch.slice(0, -1) + "\\" + ch.charCodeAt(ch.length - 1).toString(16) + " "; 13717 } // Other potentially-special ASCII characters get backslash-escaped 13718 13719 13720 return "\\" + ch; 13721 }, 13722 // Used for iframes 13723 // See setDocument() 13724 // Removing the function wrapper causes a "Permission Denied" 13725 // error in IE 13726 unloadHandler = function unloadHandler() { 13727 setDocument(); 13728 }, 13729 inDisabledFieldset = addCombinator(function (elem) { 13730 return elem.disabled === true && elem.nodeName.toLowerCase() === "fieldset"; 13731 }, { 13732 dir: "parentNode", 13733 next: "legend" 13734 }); // Optimize for push.apply( _, NodeList ) 13735 13736 13737 try { 13738 push.apply(arr = slice.call(preferredDoc.childNodes), preferredDoc.childNodes); // Support: Android<4.0 13739 // Detect silently failing push.apply 13740 13741 arr[preferredDoc.childNodes.length].nodeType; 13742 } catch (e) { 13743 push = { 13744 apply: arr.length ? // Leverage slice if possible 13745 function (target, els) { 13746 push_native.apply(target, slice.call(els)); 13747 } : // Support: IE<9 13748 // Otherwise append directly 13749 function (target, els) { 13750 var j = target.length, 13751 i = 0; // Can't trust NodeList.length 13752 13753 while (target[j++] = els[i++]) {} 13754 13755 target.length = j - 1; 13756 } 13757 }; 13758 } 13759 13760 function Sizzle(selector, context, results, seed) { 13761 var m, 13762 i, 13763 elem, 13764 nid, 13765 match, 13766 groups, 13767 newSelector, 13768 newContext = context && context.ownerDocument, 13769 // nodeType defaults to 9, since context defaults to document 13770 nodeType = context ? context.nodeType : 9; 13771 results = results || []; // Return early from calls with invalid selector or context 13772 13773 if (typeof selector !== "string" || !selector || nodeType !== 1 && nodeType !== 9 && nodeType !== 11) { 13774 return results; 13775 } // Try to shortcut find operations (as opposed to filters) in HTML documents 13776 13777 13778 if (!seed) { 13779 if ((context ? context.ownerDocument || context : preferredDoc) !== document) { 13780 setDocument(context); 13781 } 13782 13783 context = context || document; 13784 13785 if (documentIsHTML) { 13786 // If the selector is sufficiently simple, try using a "get*By*" DOM method 13787 // (excepting DocumentFragment context, where the methods don't exist) 13788 if (nodeType !== 11 && (match = rquickExpr.exec(selector))) { 13789 // ID selector 13790 if (m = match[1]) { 13791 // Document context 13792 if (nodeType === 9) { 13793 if (elem = context.getElementById(m)) { 13794 // Support: IE, Opera, Webkit 13795 // TODO: identify versions 13796 // getElementById can match elements by name instead of ID 13797 if (elem.id === m) { 13798 results.push(elem); 13799 return results; 13800 } 13801 } else { 13802 return results; 13803 } // Element context 13804 13805 } else { 13806 // Support: IE, Opera, Webkit 13807 // TODO: identify versions 13808 // getElementById can match elements by name instead of ID 13809 if (newContext && (elem = newContext.getElementById(m)) && contains(context, elem) && elem.id === m) { 13810 results.push(elem); 13811 return results; 13812 } 13813 } // Type selector 13814 13815 } else if (match[2]) { 13816 push.apply(results, context.getElementsByTagName(selector)); 13817 return results; // Class selector 13818 } else if ((m = match[3]) && support.getElementsByClassName && context.getElementsByClassName) { 13819 push.apply(results, context.getElementsByClassName(m)); 13820 return results; 13821 } 13822 } // Take advantage of querySelectorAll 13823 13824 13825 if (support.qsa && !nonnativeSelectorCache[selector + " "] && (!rbuggyQSA || !rbuggyQSA.test(selector)) && ( // Support: IE 8 only 13826 // Exclude object elements 13827 nodeType !== 1 || context.nodeName.toLowerCase() !== "object")) { 13828 newSelector = selector; 13829 newContext = context; // qSA considers elements outside a scoping root when evaluating child or 13830 // descendant combinators, which is not what we want. 13831 // In such cases, we work around the behavior by prefixing every selector in the 13832 // list with an ID selector referencing the scope context. 13833 // Thanks to Andrew Dupont for this technique. 13834 13835 if (nodeType === 1 && rdescend.test(selector)) { 13836 // Capture the context ID, setting it first if necessary 13837 if (nid = context.getAttribute("id")) { 13838 nid = nid.replace(rcssescape, fcssescape); 13839 } else { 13840 context.setAttribute("id", nid = expando); 13841 } // Prefix every selector in the list 13842 13843 13844 groups = tokenize(selector); 13845 i = groups.length; 13846 13847 while (i--) { 13848 groups[i] = "#" + nid + " " + toSelector(groups[i]); 13849 } 13850 13851 newSelector = groups.join(","); // Expand context for sibling selectors 13852 13853 newContext = rsibling.test(selector) && testContext(context.parentNode) || context; 13854 } 13855 13856 try { 13857 push.apply(results, newContext.querySelectorAll(newSelector)); 13858 return results; 13859 } catch (qsaError) { 13860 nonnativeSelectorCache(selector, true); 13861 } finally { 13862 if (nid === expando) { 13863 context.removeAttribute("id"); 13864 } 13865 } 13866 } 13867 } 13868 } // All others 13869 13870 13871 return select(selector.replace(rtrim, "$1"), context, results, seed); 13872 } 13873 /** 13874 * Create key-value caches of limited size 13875 * @returns {function(string, object)} Returns the Object data after storing it on itself with 13876 * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) 13877 * deleting the oldest entry 13878 */ 13879 13880 13881 function createCache() { 13882 var keys = []; 13883 13884 function cache(key, value) { 13885 // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) 13886 if (keys.push(key + " ") > Expr.cacheLength) { 13887 // Only keep the most recent entries 13888 delete cache[keys.shift()]; 13889 } 13890 13891 return cache[key + " "] = value; 13892 } 13893 13894 return cache; 13895 } 13896 /** 13897 * Mark a function for special use by Sizzle 13898 * @param {Function} fn The function to mark 13899 */ 13900 13901 13902 function markFunction(fn) { 13903 fn[expando] = true; 13904 return fn; 13905 } 13906 /** 13907 * Support testing using an element 13908 * @param {Function} fn Passed the created element and returns a boolean result 13909 */ 13910 13911 13912 function assert(fn) { 13913 var el = document.createElement("fieldset"); 13914 13915 try { 13916 return !!fn(el); 13917 } catch (e) { 13918 return false; 13919 } finally { 13920 // Remove from its parent by default 13921 if (el.parentNode) { 13922 el.parentNode.removeChild(el); 13923 } // release memory in IE 13924 13925 13926 el = null; 13927 } 13928 } 13929 /** 13930 * Adds the same handler for all of the specified attrs 13931 * @param {String} attrs Pipe-separated list of attributes 13932 * @param {Function} handler The method that will be applied 13933 */ 13934 13935 13936 function addHandle(attrs, handler) { 13937 var arr = attrs.split("|"), 13938 i = arr.length; 13939 13940 while (i--) { 13941 Expr.attrHandle[arr[i]] = handler; 13942 } 13943 } 13944 /** 13945 * Checks document order of two siblings 13946 * @param {Element} a 13947 * @param {Element} b 13948 * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b 13949 */ 13950 13951 13952 function siblingCheck(a, b) { 13953 var cur = b && a, 13954 diff = cur && a.nodeType === 1 && b.nodeType === 1 && a.sourceIndex - b.sourceIndex; // Use IE sourceIndex if available on both nodes 13955 13956 if (diff) { 13957 return diff; 13958 } // Check if b follows a 13959 13960 13961 if (cur) { 13962 while (cur = cur.nextSibling) { 13963 if (cur === b) { 13964 return -1; 13965 } 13966 } 13967 } 13968 13969 return a ? 1 : -1; 13970 } 13971 /** 13972 * Returns a function to use in pseudos for input types 13973 * @param {String} type 13974 */ 13975 13976 13977 function createInputPseudo(type) { 13978 return function (elem) { 13979 var name = elem.nodeName.toLowerCase(); 13980 return name === "input" && elem.type === type; 13981 }; 13982 } 13983 /** 13984 * Returns a function to use in pseudos for buttons 13985 * @param {String} type 13986 */ 13987 13988 13989 function createButtonPseudo(type) { 13990 return function (elem) { 13991 var name = elem.nodeName.toLowerCase(); 13992 return (name === "input" || name === "button") && elem.type === type; 13993 }; 13994 } 13995 /** 13996 * Returns a function to use in pseudos for :enabled/:disabled 13997 * @param {Boolean} disabled true for :disabled; false for :enabled 13998 */ 13999 14000 14001 function createDisabledPseudo(disabled) { 14002 // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable 14003 return function (elem) { 14004 // Only certain elements can match :enabled or :disabled 14005 // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled 14006 // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled 14007 if ("form" in elem) { 14008 // Check for inherited disabledness on relevant non-disabled elements: 14009 // * listed form-associated elements in a disabled fieldset 14010 // https://html.spec.whatwg.org/multipage/forms.html#category-listed 14011 // https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled 14012 // * option elements in a disabled optgroup 14013 // https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled 14014 // All such elements have a "form" property. 14015 if (elem.parentNode && elem.disabled === false) { 14016 // Option elements defer to a parent optgroup if present 14017 if ("label" in elem) { 14018 if ("label" in elem.parentNode) { 14019 return elem.parentNode.disabled === disabled; 14020 } else { 14021 return elem.disabled === disabled; 14022 } 14023 } // Support: IE 6 - 11 14024 // Use the isDisabled shortcut property to check for disabled fieldset ancestors 14025 14026 14027 return elem.isDisabled === disabled || // Where there is no isDisabled, check manually 14028 14029 /* jshint -W018 */ 14030 elem.isDisabled !== !disabled && inDisabledFieldset(elem) === disabled; 14031 } 14032 14033 return elem.disabled === disabled; // Try to winnow out elements that can't be disabled before trusting the disabled property. 14034 // Some victims get caught in our net (label, legend, menu, track), but it shouldn't 14035 // even exist on them, let alone have a boolean value. 14036 } else if ("label" in elem) { 14037 return elem.disabled === disabled; 14038 } // Remaining elements are neither :enabled nor :disabled 14039 14040 14041 return false; 14042 }; 14043 } 14044 /** 14045 * Returns a function to use in pseudos for positionals 14046 * @param {Function} fn 14047 */ 14048 14049 14050 function createPositionalPseudo(fn) { 14051 return markFunction(function (argument) { 14052 argument = +argument; 14053 return markFunction(function (seed, matches) { 14054 var j, 14055 matchIndexes = fn([], seed.length, argument), 14056 i = matchIndexes.length; // Match elements found at the specified indexes 14057 14058 while (i--) { 14059 if (seed[j = matchIndexes[i]]) { 14060 seed[j] = !(matches[j] = seed[j]); 14061 } 14062 } 14063 }); 14064 }); 14065 } 14066 /** 14067 * Checks a node for validity as a Sizzle context 14068 * @param {Element|Object=} context 14069 * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value 14070 */ 14071 14072 14073 function testContext(context) { 14074 return context && typeof context.getElementsByTagName !== "undefined" && context; 14075 } // Expose support vars for convenience 14076 14077 14078 support = Sizzle.support = {}; 14079 /** 14080 * Detects XML nodes 14081 * @param {Element|Object} elem An element or a document 14082 * @returns {Boolean} True iff elem is a non-HTML XML node 14083 */ 14084 14085 isXML = Sizzle.isXML = function (elem) { 14086 var namespace = elem.namespaceURI, 14087 docElem = (elem.ownerDocument || elem).documentElement; // Support: IE <=8 14088 // Assume HTML when documentElement doesn't yet exist, such as inside loading iframes 14089 // https://bugs.jquery.com/ticket/4833 14090 14091 return !rhtml.test(namespace || docElem && docElem.nodeName || "HTML"); 14092 }; 14093 /** 14094 * Sets document-related variables once based on the current document 14095 * @param {Element|Object} [doc] An element or document object to use to set the document 14096 * @returns {Object} Returns the current document 14097 */ 14098 14099 14100 setDocument = Sizzle.setDocument = function (node) { 14101 var hasCompare, 14102 subWindow, 14103 doc = node ? node.ownerDocument || node : preferredDoc; // Return early if doc is invalid or already selected 14104 14105 if (doc === document || doc.nodeType !== 9 || !doc.documentElement) { 14106 return document; 14107 } // Update global variables 14108 14109 14110 document = doc; 14111 docElem = document.documentElement; 14112 documentIsHTML = !isXML(document); // Support: IE 9-11, Edge 14113 // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) 14114 14115 if (preferredDoc !== document && (subWindow = document.defaultView) && subWindow.top !== subWindow) { 14116 // Support: IE 11, Edge 14117 if (subWindow.addEventListener) { 14118 subWindow.addEventListener("unload", unloadHandler, false); // Support: IE 9 - 10 only 14119 } else if (subWindow.attachEvent) { 14120 subWindow.attachEvent("onunload", unloadHandler); 14121 } 14122 } 14123 /* Attributes 14124 ---------------------------------------------------------------------- */ 14125 // Support: IE<8 14126 // Verify that getAttribute really returns attributes and not properties 14127 // (excepting IE8 booleans) 14128 14129 14130 support.attributes = assert(function (el) { 14131 el.className = "i"; 14132 return !el.getAttribute("className"); 14133 }); 14134 /* getElement(s)By* 14135 ---------------------------------------------------------------------- */ 14136 // Check if getElementsByTagName("*") returns only elements 14137 14138 support.getElementsByTagName = assert(function (el) { 14139 el.appendChild(document.createComment("")); 14140 return !el.getElementsByTagName("*").length; 14141 }); // Support: IE<9 14142 14143 support.getElementsByClassName = rnative.test(document.getElementsByClassName); // Support: IE<10 14144 // Check if getElementById returns elements by name 14145 // The broken getElementById methods don't pick up programmatically-set names, 14146 // so use a roundabout getElementsByName test 14147 14148 support.getById = assert(function (el) { 14149 docElem.appendChild(el).id = expando; 14150 return !document.getElementsByName || !document.getElementsByName(expando).length; 14151 }); // ID filter and find 14152 14153 if (support.getById) { 14154 Expr.filter["ID"] = function (id) { 14155 var attrId = id.replace(runescape, funescape); 14156 return function (elem) { 14157 return elem.getAttribute("id") === attrId; 14158 }; 14159 }; 14160 14161 Expr.find["ID"] = function (id, context) { 14162 if (typeof context.getElementById !== "undefined" && documentIsHTML) { 14163 var elem = context.getElementById(id); 14164 return elem ? [elem] : []; 14165 } 14166 }; 14167 } else { 14168 Expr.filter["ID"] = function (id) { 14169 var attrId = id.replace(runescape, funescape); 14170 return function (elem) { 14171 var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); 14172 return node && node.value === attrId; 14173 }; 14174 }; // Support: IE 6 - 7 only 14175 // getElementById is not reliable as a find shortcut 14176 14177 14178 Expr.find["ID"] = function (id, context) { 14179 if (typeof context.getElementById !== "undefined" && documentIsHTML) { 14180 var node, 14181 i, 14182 elems, 14183 elem = context.getElementById(id); 14184 14185 if (elem) { 14186 // Verify the id attribute 14187 node = elem.getAttributeNode("id"); 14188 14189 if (node && node.value === id) { 14190 return [elem]; 14191 } // Fall back on getElementsByName 14192 14193 14194 elems = context.getElementsByName(id); 14195 i = 0; 14196 14197 while (elem = elems[i++]) { 14198 node = elem.getAttributeNode("id"); 14199 14200 if (node && node.value === id) { 14201 return [elem]; 14202 } 14203 } 14204 } 14205 14206 return []; 14207 } 14208 }; 14209 } // Tag 14210 14211 14212 Expr.find["TAG"] = support.getElementsByTagName ? function (tag, context) { 14213 if (typeof context.getElementsByTagName !== "undefined") { 14214 return context.getElementsByTagName(tag); // DocumentFragment nodes don't have gEBTN 14215 } else if (support.qsa) { 14216 return context.querySelectorAll(tag); 14217 } 14218 } : function (tag, context) { 14219 var elem, 14220 tmp = [], 14221 i = 0, 14222 // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too 14223 results = context.getElementsByTagName(tag); // Filter out possible comments 14224 14225 if (tag === "*") { 14226 while (elem = results[i++]) { 14227 if (elem.nodeType === 1) { 14228 tmp.push(elem); 14229 } 14230 } 14231 14232 return tmp; 14233 } 14234 14235 return results; 14236 }; // Class 14237 14238 Expr.find["CLASS"] = support.getElementsByClassName && function (className, context) { 14239 if (typeof context.getElementsByClassName !== "undefined" && documentIsHTML) { 14240 return context.getElementsByClassName(className); 14241 } 14242 }; 14243 /* QSA/matchesSelector 14244 ---------------------------------------------------------------------- */ 14245 // QSA and matchesSelector support 14246 // matchesSelector(:active) reports false when true (IE9/Opera 11.5) 14247 14248 14249 rbuggyMatches = []; // qSa(:focus) reports false when true (Chrome 21) 14250 // We allow this because of a bug in IE8/9 that throws an error 14251 // whenever `document.activeElement` is accessed on an iframe 14252 // So, we allow :focus to pass through QSA all the time to avoid the IE error 14253 // See https://bugs.jquery.com/ticket/13378 14254 14255 rbuggyQSA = []; 14256 14257 if (support.qsa = rnative.test(document.querySelectorAll)) { 14258 // Build QSA regex 14259 // Regex strategy adopted from Diego Perini 14260 assert(function (el) { 14261 // Select is set to empty string on purpose 14262 // This is to test IE's treatment of not explicitly 14263 // setting a boolean content attribute, 14264 // since its presence should be enough 14265 // https://bugs.jquery.com/ticket/12359 14266 docElem.appendChild(el).innerHTML = "<a id='" + expando + "'></a>" + "<select id='" + expando + "-\r\\' msallowcapture=''>" + "<option selected=''></option></select>"; // Support: IE8, Opera 11-12.16 14267 // Nothing should be selected when empty strings follow ^= or $= or *= 14268 // The test attribute must be unknown in Opera but "safe" for WinRT 14269 // https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section 14270 14271 if (el.querySelectorAll("[msallowcapture^='']").length) { 14272 rbuggyQSA.push("[*^$]=" + whitespace + "*(?:''|\"\")"); 14273 } // Support: IE8 14274 // Boolean attributes and "value" are not treated correctly 14275 14276 14277 if (!el.querySelectorAll("[selected]").length) { 14278 rbuggyQSA.push("\\[" + whitespace + "*(?:value|" + booleans + ")"); 14279 } // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ 14280 14281 14282 if (!el.querySelectorAll("[id~=" + expando + "-]").length) { 14283 rbuggyQSA.push("~="); 14284 } // Webkit/Opera - :checked should return selected option elements 14285 // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked 14286 // IE8 throws error here and will not see later tests 14287 14288 14289 if (!el.querySelectorAll(":checked").length) { 14290 rbuggyQSA.push(":checked"); 14291 } // Support: Safari 8+, iOS 8+ 14292 // https://bugs.webkit.org/show_bug.cgi?id=136851 14293 // In-page `selector#id sibling-combinator selector` fails 14294 14295 14296 if (!el.querySelectorAll("a#" + expando + "+*").length) { 14297 rbuggyQSA.push(".#.+[+~]"); 14298 } 14299 }); 14300 assert(function (el) { 14301 el.innerHTML = "<a href='' disabled='disabled'></a>" + "<select disabled='disabled'><option/></select>"; // Support: Windows 8 Native Apps 14302 // The type and name attributes are restricted during .innerHTML assignment 14303 14304 var input = document.createElement("input"); 14305 input.setAttribute("type", "hidden"); 14306 el.appendChild(input).setAttribute("name", "D"); // Support: IE8 14307 // Enforce case-sensitivity of name attribute 14308 14309 if (el.querySelectorAll("[name=d]").length) { 14310 rbuggyQSA.push("name" + whitespace + "*[*^$|!~]?="); 14311 } // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) 14312 // IE8 throws error here and will not see later tests 14313 14314 14315 if (el.querySelectorAll(":enabled").length !== 2) { 14316 rbuggyQSA.push(":enabled", ":disabled"); 14317 } // Support: IE9-11+ 14318 // IE's :disabled selector does not pick up the children of disabled fieldsets 14319 14320 14321 docElem.appendChild(el).disabled = true; 14322 14323 if (el.querySelectorAll(":disabled").length !== 2) { 14324 rbuggyQSA.push(":enabled", ":disabled"); 14325 } // Opera 10-11 does not throw on post-comma invalid pseudos 14326 14327 14328 el.querySelectorAll("*,:x"); 14329 rbuggyQSA.push(",.*:"); 14330 }); 14331 } 14332 14333 if (support.matchesSelector = rnative.test(matches = docElem.matches || docElem.webkitMatchesSelector || docElem.mozMatchesSelector || docElem.oMatchesSelector || docElem.msMatchesSelector)) { 14334 assert(function (el) { 14335 // Check to see if it's possible to do matchesSelector 14336 // on a disconnected node (IE 9) 14337 support.disconnectedMatch = matches.call(el, "*"); // This should fail with an exception 14338 // Gecko does not error, returns false instead 14339 14340 matches.call(el, "[s!='']:x"); 14341 rbuggyMatches.push("!=", pseudos); 14342 }); 14343 } 14344 14345 rbuggyQSA = rbuggyQSA.length && new RegExp(rbuggyQSA.join("|")); 14346 rbuggyMatches = rbuggyMatches.length && new RegExp(rbuggyMatches.join("|")); 14347 /* Contains 14348 ---------------------------------------------------------------------- */ 14349 14350 hasCompare = rnative.test(docElem.compareDocumentPosition); // Element contains another 14351 // Purposefully self-exclusive 14352 // As in, an element does not contain itself 14353 14354 contains = hasCompare || rnative.test(docElem.contains) ? function (a, b) { 14355 var adown = a.nodeType === 9 ? a.documentElement : a, 14356 bup = b && b.parentNode; 14357 return a === bup || !!(bup && bup.nodeType === 1 && (adown.contains ? adown.contains(bup) : a.compareDocumentPosition && a.compareDocumentPosition(bup) & 16)); 14358 } : function (a, b) { 14359 if (b) { 14360 while (b = b.parentNode) { 14361 if (b === a) { 14362 return true; 14363 } 14364 } 14365 } 14366 14367 return false; 14368 }; 14369 /* Sorting 14370 ---------------------------------------------------------------------- */ 14371 // Document order sorting 14372 14373 sortOrder = hasCompare ? function (a, b) { 14374 // Flag for duplicate removal 14375 if (a === b) { 14376 hasDuplicate = true; 14377 return 0; 14378 } // Sort on method existence if only one input has compareDocumentPosition 14379 14380 14381 var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; 14382 14383 if (compare) { 14384 return compare; 14385 } // Calculate position if both inputs belong to the same document 14386 14387 14388 compare = (a.ownerDocument || a) === (b.ownerDocument || b) ? a.compareDocumentPosition(b) : // Otherwise we know they are disconnected 14389 1; // Disconnected nodes 14390 14391 if (compare & 1 || !support.sortDetached && b.compareDocumentPosition(a) === compare) { 14392 // Choose the first element that is related to our preferred document 14393 if (a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a)) { 14394 return -1; 14395 } 14396 14397 if (b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b)) { 14398 return 1; 14399 } // Maintain original order 14400 14401 14402 return sortInput ? indexOf(sortInput, a) - indexOf(sortInput, b) : 0; 14403 } 14404 14405 return compare & 4 ? -1 : 1; 14406 } : function (a, b) { 14407 // Exit early if the nodes are identical 14408 if (a === b) { 14409 hasDuplicate = true; 14410 return 0; 14411 } 14412 14413 var cur, 14414 i = 0, 14415 aup = a.parentNode, 14416 bup = b.parentNode, 14417 ap = [a], 14418 bp = [b]; // Parentless nodes are either documents or disconnected 14419 14420 if (!aup || !bup) { 14421 return a === document ? -1 : b === document ? 1 : aup ? -1 : bup ? 1 : sortInput ? indexOf(sortInput, a) - indexOf(sortInput, b) : 0; // If the nodes are siblings, we can do a quick check 14422 } else if (aup === bup) { 14423 return siblingCheck(a, b); 14424 } // Otherwise we need full lists of their ancestors for comparison 14425 14426 14427 cur = a; 14428 14429 while (cur = cur.parentNode) { 14430 ap.unshift(cur); 14431 } 14432 14433 cur = b; 14434 14435 while (cur = cur.parentNode) { 14436 bp.unshift(cur); 14437 } // Walk down the tree looking for a discrepancy 14438 14439 14440 while (ap[i] === bp[i]) { 14441 i++; 14442 } 14443 14444 return i ? // Do a sibling check if the nodes have a common ancestor 14445 siblingCheck(ap[i], bp[i]) : // Otherwise nodes in our document sort first 14446 ap[i] === preferredDoc ? -1 : bp[i] === preferredDoc ? 1 : 0; 14447 }; 14448 return document; 14449 }; 14450 14451 Sizzle.matches = function (expr, elements) { 14452 return Sizzle(expr, null, null, elements); 14453 }; 14454 14455 Sizzle.matchesSelector = function (elem, expr) { 14456 // Set document vars if needed 14457 if ((elem.ownerDocument || elem) !== document) { 14458 setDocument(elem); 14459 } 14460 14461 if (support.matchesSelector && documentIsHTML && !nonnativeSelectorCache[expr + " "] && (!rbuggyMatches || !rbuggyMatches.test(expr)) && (!rbuggyQSA || !rbuggyQSA.test(expr))) { 14462 try { 14463 var ret = matches.call(elem, expr); // IE 9's matchesSelector returns false on disconnected nodes 14464 14465 if (ret || support.disconnectedMatch || // As well, disconnected nodes are said to be in a document 14466 // fragment in IE 9 14467 elem.document && elem.document.nodeType !== 11) { 14468 return ret; 14469 } 14470 } catch (e) { 14471 nonnativeSelectorCache(expr, true); 14472 } 14473 } 14474 14475 return Sizzle(expr, document, null, [elem]).length > 0; 14476 }; 14477 14478 Sizzle.contains = function (context, elem) { 14479 // Set document vars if needed 14480 if ((context.ownerDocument || context) !== document) { 14481 setDocument(context); 14482 } 14483 14484 return contains(context, elem); 14485 }; 14486 14487 Sizzle.attr = function (elem, name) { 14488 // Set document vars if needed 14489 if ((elem.ownerDocument || elem) !== document) { 14490 setDocument(elem); 14491 } 14492 14493 var fn = Expr.attrHandle[name.toLowerCase()], 14494 // Don't get fooled by Object.prototype properties (jQuery #13807) 14495 val = fn && hasOwn.call(Expr.attrHandle, name.toLowerCase()) ? fn(elem, name, !documentIsHTML) : undefined; 14496 return val !== undefined ? val : support.attributes || !documentIsHTML ? elem.getAttribute(name) : (val = elem.getAttributeNode(name)) && val.specified ? val.value : null; 14497 }; 14498 14499 Sizzle.escape = function (sel) { 14500 return (sel + "").replace(rcssescape, fcssescape); 14501 }; 14502 14503 Sizzle.error = function (msg) { 14504 throw new Error("Syntax error, unrecognized expression: " + msg); 14505 }; 14506 /** 14507 * Document sorting and removing duplicates 14508 * @param {ArrayLike} results 14509 */ 14510 14511 14512 Sizzle.uniqueSort = function (results) { 14513 var elem, 14514 duplicates = [], 14515 j = 0, 14516 i = 0; // Unless we *know* we can detect duplicates, assume their presence 14517 14518 hasDuplicate = !support.detectDuplicates; 14519 sortInput = !support.sortStable && results.slice(0); 14520 results.sort(sortOrder); 14521 14522 if (hasDuplicate) { 14523 while (elem = results[i++]) { 14524 if (elem === results[i]) { 14525 j = duplicates.push(i); 14526 } 14527 } 14528 14529 while (j--) { 14530 results.splice(duplicates[j], 1); 14531 } 14532 } // Clear input after sorting to release objects 14533 // See https://github.com/jquery/sizzle/pull/225 14534 14535 14536 sortInput = null; 14537 return results; 14538 }; 14539 /** 14540 * Utility function for retrieving the text value of an array of DOM nodes 14541 * @param {Array|Element} elem 14542 */ 14543 14544 14545 getText = Sizzle.getText = function (elem) { 14546 var node, 14547 ret = "", 14548 i = 0, 14549 nodeType = elem.nodeType; 14550 14551 if (!nodeType) { 14552 // If no nodeType, this is expected to be an array 14553 while (node = elem[i++]) { 14554 // Do not traverse comment nodes 14555 ret += getText(node); 14556 } 14557 } else if (nodeType === 1 || nodeType === 9 || nodeType === 11) { 14558 // Use textContent for elements 14559 // innerText usage removed for consistency of new lines (jQuery #11153) 14560 if (typeof elem.textContent === "string") { 14561 return elem.textContent; 14562 } else { 14563 // Traverse its children 14564 for (elem = elem.firstChild; elem; elem = elem.nextSibling) { 14565 ret += getText(elem); 14566 } 14567 } 14568 } else if (nodeType === 3 || nodeType === 4) { 14569 return elem.nodeValue; 14570 } // Do not include comment or processing instruction nodes 14571 14572 14573 return ret; 14574 }; 14575 14576 Expr = Sizzle.selectors = { 14577 // Can be adjusted by the user 14578 cacheLength: 50, 14579 createPseudo: markFunction, 14580 match: matchExpr, 14581 attrHandle: {}, 14582 find: {}, 14583 relative: { 14584 ">": { 14585 dir: "parentNode", 14586 first: true 14587 }, 14588 " ": { 14589 dir: "parentNode" 14590 }, 14591 "+": { 14592 dir: "previousSibling", 14593 first: true 14594 }, 14595 "~": { 14596 dir: "previousSibling" 14597 } 14598 }, 14599 preFilter: { 14600 "ATTR": function ATTR(match) { 14601 match[1] = match[1].replace(runescape, funescape); // Move the given value to match[3] whether quoted or unquoted 14602 14603 match[3] = (match[3] || match[4] || match[5] || "").replace(runescape, funescape); 14604 14605 if (match[2] === "~=") { 14606 match[3] = " " + match[3] + " "; 14607 } 14608 14609 return match.slice(0, 4); 14610 }, 14611 "CHILD": function CHILD(match) { 14612 /* matches from matchExpr["CHILD"] 14613 1 type (only|nth|...) 14614 2 what (child|of-type) 14615 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) 14616 4 xn-component of xn+y argument ([+-]?\d*n|) 14617 5 sign of xn-component 14618 6 x of xn-component 14619 7 sign of y-component 14620 8 y of y-component 14621 */ 14622 match[1] = match[1].toLowerCase(); 14623 14624 if (match[1].slice(0, 3) === "nth") { 14625 // nth-* requires argument 14626 if (!match[3]) { 14627 Sizzle.error(match[0]); 14628 } // numeric x and y parameters for Expr.filter.CHILD 14629 // remember that false/true cast respectively to 0/1 14630 14631 14632 match[4] = +(match[4] ? match[5] + (match[6] || 1) : 2 * (match[3] === "even" || match[3] === "odd")); 14633 match[5] = +(match[7] + match[8] || match[3] === "odd"); // other types prohibit arguments 14634 } else if (match[3]) { 14635 Sizzle.error(match[0]); 14636 } 14637 14638 return match; 14639 }, 14640 "PSEUDO": function PSEUDO(match) { 14641 var excess, 14642 unquoted = !match[6] && match[2]; 14643 14644 if (matchExpr["CHILD"].test(match[0])) { 14645 return null; 14646 } // Accept quoted arguments as-is 14647 14648 14649 if (match[3]) { 14650 match[2] = match[4] || match[5] || ""; // Strip excess characters from unquoted arguments 14651 } else if (unquoted && rpseudo.test(unquoted) && ( // Get excess from tokenize (recursively) 14652 excess = tokenize(unquoted, true)) && ( // advance to the next closing parenthesis 14653 excess = unquoted.indexOf(")", unquoted.length - excess) - unquoted.length)) { 14654 // excess is a negative index 14655 match[0] = match[0].slice(0, excess); 14656 match[2] = unquoted.slice(0, excess); 14657 } // Return only captures needed by the pseudo filter method (type and argument) 14658 14659 14660 return match.slice(0, 3); 14661 } 14662 }, 14663 filter: { 14664 "TAG": function TAG(nodeNameSelector) { 14665 var nodeName = nodeNameSelector.replace(runescape, funescape).toLowerCase(); 14666 return nodeNameSelector === "*" ? function () { 14667 return true; 14668 } : function (elem) { 14669 return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; 14670 }; 14671 }, 14672 "CLASS": function CLASS(className) { 14673 var pattern = classCache[className + " "]; 14674 return pattern || (pattern = new RegExp("(^|" + whitespace + ")" + className + "(" + whitespace + "|$)")) && classCache(className, function (elem) { 14675 return pattern.test(typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || ""); 14676 }); 14677 }, 14678 "ATTR": function ATTR(name, operator, check) { 14679 return function (elem) { 14680 var result = Sizzle.attr(elem, name); 14681 14682 if (result == null) { 14683 return operator === "!="; 14684 } 14685 14686 if (!operator) { 14687 return true; 14688 } 14689 14690 result += ""; 14691 return operator === "=" ? result === check : operator === "!=" ? result !== check : operator === "^=" ? check && result.indexOf(check) === 0 : operator === "*=" ? check && result.indexOf(check) > -1 : operator === "$=" ? check && result.slice(-check.length) === check : operator === "~=" ? (" " + result.replace(rwhitespace, " ") + " ").indexOf(check) > -1 : operator === "|=" ? result === check || result.slice(0, check.length + 1) === check + "-" : false; 14692 }; 14693 }, 14694 "CHILD": function CHILD(type, what, argument, first, last) { 14695 var simple = type.slice(0, 3) !== "nth", 14696 forward = type.slice(-4) !== "last", 14697 ofType = what === "of-type"; 14698 return first === 1 && last === 0 ? // Shortcut for :nth-*(n) 14699 function (elem) { 14700 return !!elem.parentNode; 14701 } : function (elem, context, xml) { 14702 var cache, 14703 uniqueCache, 14704 outerCache, 14705 node, 14706 nodeIndex, 14707 start, 14708 dir = simple !== forward ? "nextSibling" : "previousSibling", 14709 parent = elem.parentNode, 14710 name = ofType && elem.nodeName.toLowerCase(), 14711 useCache = !xml && !ofType, 14712 diff = false; 14713 14714 if (parent) { 14715 // :(first|last|only)-(child|of-type) 14716 if (simple) { 14717 while (dir) { 14718 node = elem; 14719 14720 while (node = node[dir]) { 14721 if (ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1) { 14722 return false; 14723 } 14724 } // Reverse direction for :only-* (if we haven't yet done so) 14725 14726 14727 start = dir = type === "only" && !start && "nextSibling"; 14728 } 14729 14730 return true; 14731 } 14732 14733 start = [forward ? parent.firstChild : parent.lastChild]; // non-xml :nth-child(...) stores cache data on `parent` 14734 14735 if (forward && useCache) { 14736 // Seek `elem` from a previously-cached index 14737 // ...in a gzip-friendly way 14738 node = parent; 14739 outerCache = node[expando] || (node[expando] = {}); // Support: IE <9 only 14740 // Defend against cloned attroperties (jQuery gh-1709) 14741 14742 uniqueCache = outerCache[node.uniqueID] || (outerCache[node.uniqueID] = {}); 14743 cache = uniqueCache[type] || []; 14744 nodeIndex = cache[0] === dirruns && cache[1]; 14745 diff = nodeIndex && cache[2]; 14746 node = nodeIndex && parent.childNodes[nodeIndex]; 14747 14748 while (node = ++nodeIndex && node && node[dir] || ( // Fallback to seeking `elem` from the start 14749 diff = nodeIndex = 0) || start.pop()) { 14750 // When found, cache indexes on `parent` and break 14751 if (node.nodeType === 1 && ++diff && node === elem) { 14752 uniqueCache[type] = [dirruns, nodeIndex, diff]; 14753 break; 14754 } 14755 } 14756 } else { 14757 // Use previously-cached element index if available 14758 if (useCache) { 14759 // ...in a gzip-friendly way 14760 node = elem; 14761 outerCache = node[expando] || (node[expando] = {}); // Support: IE <9 only 14762 // Defend against cloned attroperties (jQuery gh-1709) 14763 14764 uniqueCache = outerCache[node.uniqueID] || (outerCache[node.uniqueID] = {}); 14765 cache = uniqueCache[type] || []; 14766 nodeIndex = cache[0] === dirruns && cache[1]; 14767 diff = nodeIndex; 14768 } // xml :nth-child(...) 14769 // or :nth-last-child(...) or :nth(-last)?-of-type(...) 14770 14771 14772 if (diff === false) { 14773 // Use the same loop as above to seek `elem` from the start 14774 while (node = ++nodeIndex && node && node[dir] || (diff = nodeIndex = 0) || start.pop()) { 14775 if ((ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1) && ++diff) { 14776 // Cache the index of each encountered element 14777 if (useCache) { 14778 outerCache = node[expando] || (node[expando] = {}); // Support: IE <9 only 14779 // Defend against cloned attroperties (jQuery gh-1709) 14780 14781 uniqueCache = outerCache[node.uniqueID] || (outerCache[node.uniqueID] = {}); 14782 uniqueCache[type] = [dirruns, diff]; 14783 } 14784 14785 if (node === elem) { 14786 break; 14787 } 14788 } 14789 } 14790 } 14791 } // Incorporate the offset, then check against cycle size 14792 14793 14794 diff -= last; 14795 return diff === first || diff % first === 0 && diff / first >= 0; 14796 } 14797 }; 14798 }, 14799 "PSEUDO": function PSEUDO(pseudo, argument) { 14800 // pseudo-class names are case-insensitive 14801 // http://www.w3.org/TR/selectors/#pseudo-classes 14802 // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters 14803 // Remember that setFilters inherits from pseudos 14804 var args, 14805 fn = Expr.pseudos[pseudo] || Expr.setFilters[pseudo.toLowerCase()] || Sizzle.error("unsupported pseudo: " + pseudo); // The user may use createPseudo to indicate that 14806 // arguments are needed to create the filter function 14807 // just as Sizzle does 14808 14809 if (fn[expando]) { 14810 return fn(argument); 14811 } // But maintain support for old signatures 14812 14813 14814 if (fn.length > 1) { 14815 args = [pseudo, pseudo, "", argument]; 14816 return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase()) ? markFunction(function (seed, matches) { 14817 var idx, 14818 matched = fn(seed, argument), 14819 i = matched.length; 14820 14821 while (i--) { 14822 idx = indexOf(seed, matched[i]); 14823 seed[idx] = !(matches[idx] = matched[i]); 14824 } 14825 }) : function (elem) { 14826 return fn(elem, 0, args); 14827 }; 14828 } 14829 14830 return fn; 14831 } 14832 }, 14833 pseudos: { 14834 // Potentially complex pseudos 14835 "not": markFunction(function (selector) { 14836 // Trim the selector passed to compile 14837 // to avoid treating leading and trailing 14838 // spaces as combinators 14839 var input = [], 14840 results = [], 14841 matcher = compile(selector.replace(rtrim, "$1")); 14842 return matcher[expando] ? markFunction(function (seed, matches, context, xml) { 14843 var elem, 14844 unmatched = matcher(seed, null, xml, []), 14845 i = seed.length; // Match elements unmatched by `matcher` 14846 14847 while (i--) { 14848 if (elem = unmatched[i]) { 14849 seed[i] = !(matches[i] = elem); 14850 } 14851 } 14852 }) : function (elem, context, xml) { 14853 input[0] = elem; 14854 matcher(input, null, xml, results); // Don't keep the element (issue #299) 14855 14856 input[0] = null; 14857 return !results.pop(); 14858 }; 14859 }), 14860 "has": markFunction(function (selector) { 14861 return function (elem) { 14862 return Sizzle(selector, elem).length > 0; 14863 }; 14864 }), 14865 "contains": markFunction(function (text) { 14866 text = text.replace(runescape, funescape); 14867 return function (elem) { 14868 return (elem.textContent || getText(elem)).indexOf(text) > -1; 14869 }; 14870 }), 14871 // "Whether an element is represented by a :lang() selector 14872 // is based solely on the element's language value 14873 // being equal to the identifier C, 14874 // or beginning with the identifier C immediately followed by "-". 14875 // The matching of C against the element's language value is performed case-insensitively. 14876 // The identifier C does not have to be a valid language name." 14877 // http://www.w3.org/TR/selectors/#lang-pseudo 14878 "lang": markFunction(function (lang) { 14879 // lang value must be a valid identifier 14880 if (!ridentifier.test(lang || "")) { 14881 Sizzle.error("unsupported lang: " + lang); 14882 } 14883 14884 lang = lang.replace(runescape, funescape).toLowerCase(); 14885 return function (elem) { 14886 var elemLang; 14887 14888 do { 14889 if (elemLang = documentIsHTML ? elem.lang : elem.getAttribute("xml:lang") || elem.getAttribute("lang")) { 14890 elemLang = elemLang.toLowerCase(); 14891 return elemLang === lang || elemLang.indexOf(lang + "-") === 0; 14892 } 14893 } while ((elem = elem.parentNode) && elem.nodeType === 1); 14894 14895 return false; 14896 }; 14897 }), 14898 // Miscellaneous 14899 "target": function target(elem) { 14900 var hash = window.location && window.location.hash; 14901 return hash && hash.slice(1) === elem.id; 14902 }, 14903 "root": function root(elem) { 14904 return elem === docElem; 14905 }, 14906 "focus": function focus(elem) { 14907 return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); 14908 }, 14909 // Boolean properties 14910 "enabled": createDisabledPseudo(false), 14911 "disabled": createDisabledPseudo(true), 14912 "checked": function checked(elem) { 14913 // In CSS3, :checked should return both checked and selected elements 14914 // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked 14915 var nodeName = elem.nodeName.toLowerCase(); 14916 return nodeName === "input" && !!elem.checked || nodeName === "option" && !!elem.selected; 14917 }, 14918 "selected": function selected(elem) { 14919 // Accessing this property makes selected-by-default 14920 // options in Safari work properly 14921 if (elem.parentNode) { 14922 elem.parentNode.selectedIndex; 14923 } 14924 14925 return elem.selected === true; 14926 }, 14927 // Contents 14928 "empty": function empty(elem) { 14929 // http://www.w3.org/TR/selectors/#empty-pseudo 14930 // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), 14931 // but not by others (comment: 8; processing instruction: 7; etc.) 14932 // nodeType < 6 works because attributes (2) do not appear as children 14933 for (elem = elem.firstChild; elem; elem = elem.nextSibling) { 14934 if (elem.nodeType < 6) { 14935 return false; 14936 } 14937 } 14938 14939 return true; 14940 }, 14941 "parent": function parent(elem) { 14942 return !Expr.pseudos["empty"](elem); 14943 }, 14944 // Element/input types 14945 "header": function header(elem) { 14946 return rheader.test(elem.nodeName); 14947 }, 14948 "input": function input(elem) { 14949 return rinputs.test(elem.nodeName); 14950 }, 14951 "button": function button(elem) { 14952 var name = elem.nodeName.toLowerCase(); 14953 return name === "input" && elem.type === "button" || name === "button"; 14954 }, 14955 "text": function text(elem) { 14956 var attr; 14957 return elem.nodeName.toLowerCase() === "input" && elem.type === "text" && ( // Support: IE<8 14958 // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" 14959 (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text"); 14960 }, 14961 // Position-in-collection 14962 "first": createPositionalPseudo(function () { 14963 return [0]; 14964 }), 14965 "last": createPositionalPseudo(function (matchIndexes, length) { 14966 return [length - 1]; 14967 }), 14968 "eq": createPositionalPseudo(function (matchIndexes, length, argument) { 14969 return [argument < 0 ? argument + length : argument]; 14970 }), 14971 "even": createPositionalPseudo(function (matchIndexes, length) { 14972 var i = 0; 14973 14974 for (; i < length; i += 2) { 14975 matchIndexes.push(i); 14976 } 14977 14978 return matchIndexes; 14979 }), 14980 "odd": createPositionalPseudo(function (matchIndexes, length) { 14981 var i = 1; 14982 14983 for (; i < length; i += 2) { 14984 matchIndexes.push(i); 14985 } 14986 14987 return matchIndexes; 14988 }), 14989 "lt": createPositionalPseudo(function (matchIndexes, length, argument) { 14990 var i = argument < 0 ? argument + length : argument > length ? length : argument; 14991 14992 for (; --i >= 0;) { 14993 matchIndexes.push(i); 14994 } 14995 14996 return matchIndexes; 14997 }), 14998 "gt": createPositionalPseudo(function (matchIndexes, length, argument) { 14999 var i = argument < 0 ? argument + length : argument; 15000 15001 for (; ++i < length;) { 15002 matchIndexes.push(i); 15003 } 15004 15005 return matchIndexes; 15006 }) 15007 } 15008 }; 15009 Expr.pseudos["nth"] = Expr.pseudos["eq"]; // Add button/input type pseudos 15010 15011 for (i in { 15012 radio: true, 15013 checkbox: true, 15014 file: true, 15015 password: true, 15016 image: true 15017 }) { 15018 Expr.pseudos[i] = createInputPseudo(i); 15019 } 15020 15021 for (i in { 15022 submit: true, 15023 reset: true 15024 }) { 15025 Expr.pseudos[i] = createButtonPseudo(i); 15026 } // Easy API for creating new setFilters 15027 15028 15029 function setFilters() {} 15030 15031 setFilters.prototype = Expr.filters = Expr.pseudos; 15032 Expr.setFilters = new setFilters(); 15033 15034 tokenize = Sizzle.tokenize = function (selector, parseOnly) { 15035 var matched, 15036 match, 15037 tokens, 15038 type, 15039 soFar, 15040 groups, 15041 preFilters, 15042 cached = tokenCache[selector + " "]; 15043 15044 if (cached) { 15045 return parseOnly ? 0 : cached.slice(0); 15046 } 15047 15048 soFar = selector; 15049 groups = []; 15050 preFilters = Expr.preFilter; 15051 15052 while (soFar) { 15053 // Comma and first run 15054 if (!matched || (match = rcomma.exec(soFar))) { 15055 if (match) { 15056 // Don't consume trailing commas as valid 15057 soFar = soFar.slice(match[0].length) || soFar; 15058 } 15059 15060 groups.push(tokens = []); 15061 } 15062 15063 matched = false; // Combinators 15064 15065 if (match = rcombinators.exec(soFar)) { 15066 matched = match.shift(); 15067 tokens.push({ 15068 value: matched, 15069 // Cast descendant combinators to space 15070 type: match[0].replace(rtrim, " ") 15071 }); 15072 soFar = soFar.slice(matched.length); 15073 } // Filters 15074 15075 15076 for (type in Expr.filter) { 15077 if ((match = matchExpr[type].exec(soFar)) && (!preFilters[type] || (match = preFilters[type](match)))) { 15078 matched = match.shift(); 15079 tokens.push({ 15080 value: matched, 15081 type: type, 15082 matches: match 15083 }); 15084 soFar = soFar.slice(matched.length); 15085 } 15086 } 15087 15088 if (!matched) { 15089 break; 15090 } 15091 } // Return the length of the invalid excess 15092 // if we're just parsing 15093 // Otherwise, throw an error or return tokens 15094 15095 15096 return parseOnly ? soFar.length : soFar ? Sizzle.error(selector) : // Cache the tokens 15097 tokenCache(selector, groups).slice(0); 15098 }; 15099 15100 function toSelector(tokens) { 15101 var i = 0, 15102 len = tokens.length, 15103 selector = ""; 15104 15105 for (; i < len; i++) { 15106 selector += tokens[i].value; 15107 } 15108 15109 return selector; 15110 } 15111 15112 function addCombinator(matcher, combinator, base) { 15113 var dir = combinator.dir, 15114 skip = combinator.next, 15115 key = skip || dir, 15116 checkNonElements = base && key === "parentNode", 15117 doneName = done++; 15118 return combinator.first ? // Check against closest ancestor/preceding element 15119 function (elem, context, xml) { 15120 while (elem = elem[dir]) { 15121 if (elem.nodeType === 1 || checkNonElements) { 15122 return matcher(elem, context, xml); 15123 } 15124 } 15125 15126 return false; 15127 } : // Check against all ancestor/preceding elements 15128 function (elem, context, xml) { 15129 var oldCache, 15130 uniqueCache, 15131 outerCache, 15132 newCache = [dirruns, doneName]; // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching 15133 15134 if (xml) { 15135 while (elem = elem[dir]) { 15136 if (elem.nodeType === 1 || checkNonElements) { 15137 if (matcher(elem, context, xml)) { 15138 return true; 15139 } 15140 } 15141 } 15142 } else { 15143 while (elem = elem[dir]) { 15144 if (elem.nodeType === 1 || checkNonElements) { 15145 outerCache = elem[expando] || (elem[expando] = {}); // Support: IE <9 only 15146 // Defend against cloned attroperties (jQuery gh-1709) 15147 15148 uniqueCache = outerCache[elem.uniqueID] || (outerCache[elem.uniqueID] = {}); 15149 15150 if (skip && skip === elem.nodeName.toLowerCase()) { 15151 elem = elem[dir] || elem; 15152 } else if ((oldCache = uniqueCache[key]) && oldCache[0] === dirruns && oldCache[1] === doneName) { 15153 // Assign to newCache so results back-propagate to previous elements 15154 return newCache[2] = oldCache[2]; 15155 } else { 15156 // Reuse newcache so results back-propagate to previous elements 15157 uniqueCache[key] = newCache; // A match means we're done; a fail means we have to keep checking 15158 15159 if (newCache[2] = matcher(elem, context, xml)) { 15160 return true; 15161 } 15162 } 15163 } 15164 } 15165 } 15166 15167 return false; 15168 }; 15169 } 15170 15171 function elementMatcher(matchers) { 15172 return matchers.length > 1 ? function (elem, context, xml) { 15173 var i = matchers.length; 15174 15175 while (i--) { 15176 if (!matchers[i](elem, context, xml)) { 15177 return false; 15178 } 15179 } 15180 15181 return true; 15182 } : matchers[0]; 15183 } 15184 15185 function multipleContexts(selector, contexts, results) { 15186 var i = 0, 15187 len = contexts.length; 15188 15189 for (; i < len; i++) { 15190 Sizzle(selector, contexts[i], results); 15191 } 15192 15193 return results; 15194 } 15195 15196 function condense(unmatched, map, filter, context, xml) { 15197 var elem, 15198 newUnmatched = [], 15199 i = 0, 15200 len = unmatched.length, 15201 mapped = map != null; 15202 15203 for (; i < len; i++) { 15204 if (elem = unmatched[i]) { 15205 if (!filter || filter(elem, context, xml)) { 15206 newUnmatched.push(elem); 15207 15208 if (mapped) { 15209 map.push(i); 15210 } 15211 } 15212 } 15213 } 15214 15215 return newUnmatched; 15216 } 15217 15218 function setMatcher(preFilter, selector, matcher, postFilter, postFinder, postSelector) { 15219 if (postFilter && !postFilter[expando]) { 15220 postFilter = setMatcher(postFilter); 15221 } 15222 15223 if (postFinder && !postFinder[expando]) { 15224 postFinder = setMatcher(postFinder, postSelector); 15225 } 15226 15227 return markFunction(function (seed, results, context, xml) { 15228 var temp, 15229 i, 15230 elem, 15231 preMap = [], 15232 postMap = [], 15233 preexisting = results.length, 15234 // Get initial elements from seed or context 15235 elems = seed || multipleContexts(selector || "*", context.nodeType ? [context] : context, []), 15236 // Prefilter to get matcher input, preserving a map for seed-results synchronization 15237 matcherIn = preFilter && (seed || !selector) ? condense(elems, preMap, preFilter, context, xml) : elems, 15238 matcherOut = matcher ? // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, 15239 postFinder || (seed ? preFilter : preexisting || postFilter) ? // ...intermediate processing is necessary 15240 [] : // ...otherwise use results directly 15241 results : matcherIn; // Find primary matches 15242 15243 if (matcher) { 15244 matcher(matcherIn, matcherOut, context, xml); 15245 } // Apply postFilter 15246 15247 15248 if (postFilter) { 15249 temp = condense(matcherOut, postMap); 15250 postFilter(temp, [], context, xml); // Un-match failing elements by moving them back to matcherIn 15251 15252 i = temp.length; 15253 15254 while (i--) { 15255 if (elem = temp[i]) { 15256 matcherOut[postMap[i]] = !(matcherIn[postMap[i]] = elem); 15257 } 15258 } 15259 } 15260 15261 if (seed) { 15262 if (postFinder || preFilter) { 15263 if (postFinder) { 15264 // Get the final matcherOut by condensing this intermediate into postFinder contexts 15265 temp = []; 15266 i = matcherOut.length; 15267 15268 while (i--) { 15269 if (elem = matcherOut[i]) { 15270 // Restore matcherIn since elem is not yet a final match 15271 temp.push(matcherIn[i] = elem); 15272 } 15273 } 15274 15275 postFinder(null, matcherOut = [], temp, xml); 15276 } // Move matched elements from seed to results to keep them synchronized 15277 15278 15279 i = matcherOut.length; 15280 15281 while (i--) { 15282 if ((elem = matcherOut[i]) && (temp = postFinder ? indexOf(seed, elem) : preMap[i]) > -1) { 15283 seed[temp] = !(results[temp] = elem); 15284 } 15285 } 15286 } // Add elements to results, through postFinder if defined 15287 15288 } else { 15289 matcherOut = condense(matcherOut === results ? matcherOut.splice(preexisting, matcherOut.length) : matcherOut); 15290 15291 if (postFinder) { 15292 postFinder(null, results, matcherOut, xml); 15293 } else { 15294 push.apply(results, matcherOut); 15295 } 15296 } 15297 }); 15298 } 15299 15300 function matcherFromTokens(tokens) { 15301 var checkContext, 15302 matcher, 15303 j, 15304 len = tokens.length, 15305 leadingRelative = Expr.relative[tokens[0].type], 15306 implicitRelative = leadingRelative || Expr.relative[" "], 15307 i = leadingRelative ? 1 : 0, 15308 // The foundational matcher ensures that elements are reachable from top-level context(s) 15309 matchContext = addCombinator(function (elem) { 15310 return elem === checkContext; 15311 }, implicitRelative, true), 15312 matchAnyContext = addCombinator(function (elem) { 15313 return indexOf(checkContext, elem) > -1; 15314 }, implicitRelative, true), 15315 matchers = [function (elem, context, xml) { 15316 var ret = !leadingRelative && (xml || context !== outermostContext) || ((checkContext = context).nodeType ? matchContext(elem, context, xml) : matchAnyContext(elem, context, xml)); // Avoid hanging onto element (issue #299) 15317 15318 checkContext = null; 15319 return ret; 15320 }]; 15321 15322 for (; i < len; i++) { 15323 if (matcher = Expr.relative[tokens[i].type]) { 15324 matchers = [addCombinator(elementMatcher(matchers), matcher)]; 15325 } else { 15326 matcher = Expr.filter[tokens[i].type].apply(null, tokens[i].matches); // Return special upon seeing a positional matcher 15327 15328 if (matcher[expando]) { 15329 // Find the next relative operator (if any) for proper handling 15330 j = ++i; 15331 15332 for (; j < len; j++) { 15333 if (Expr.relative[tokens[j].type]) { 15334 break; 15335 } 15336 } 15337 15338 return setMatcher(i > 1 && elementMatcher(matchers), i > 1 && toSelector( // If the preceding token was a descendant combinator, insert an implicit any-element `*` 15339 tokens.slice(0, i - 1).concat({ 15340 value: tokens[i - 2].type === " " ? "*" : "" 15341 })).replace(rtrim, "$1"), matcher, i < j && matcherFromTokens(tokens.slice(i, j)), j < len && matcherFromTokens(tokens = tokens.slice(j)), j < len && toSelector(tokens)); 15342 } 15343 15344 matchers.push(matcher); 15345 } 15346 } 15347 15348 return elementMatcher(matchers); 15349 } 15350 15351 function matcherFromGroupMatchers(elementMatchers, setMatchers) { 15352 var bySet = setMatchers.length > 0, 15353 byElement = elementMatchers.length > 0, 15354 superMatcher = function superMatcher(seed, context, xml, results, outermost) { 15355 var elem, 15356 j, 15357 matcher, 15358 matchedCount = 0, 15359 i = "0", 15360 unmatched = seed && [], 15361 setMatched = [], 15362 contextBackup = outermostContext, 15363 // We must always have either seed elements or outermost context 15364 elems = seed || byElement && Expr.find["TAG"]("*", outermost), 15365 // Use integer dirruns iff this is the outermost matcher 15366 dirrunsUnique = dirruns += contextBackup == null ? 1 : Math.random() || 0.1, 15367 len = elems.length; 15368 15369 if (outermost) { 15370 outermostContext = context === document || context || outermost; 15371 } // Add elements passing elementMatchers directly to results 15372 // Support: IE<9, Safari 15373 // Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id 15374 15375 15376 for (; i !== len && (elem = elems[i]) != null; i++) { 15377 if (byElement && elem) { 15378 j = 0; 15379 15380 if (!context && elem.ownerDocument !== document) { 15381 setDocument(elem); 15382 xml = !documentIsHTML; 15383 } 15384 15385 while (matcher = elementMatchers[j++]) { 15386 if (matcher(elem, context || document, xml)) { 15387 results.push(elem); 15388 break; 15389 } 15390 } 15391 15392 if (outermost) { 15393 dirruns = dirrunsUnique; 15394 } 15395 } // Track unmatched elements for set filters 15396 15397 15398 if (bySet) { 15399 // They will have gone through all possible matchers 15400 if (elem = !matcher && elem) { 15401 matchedCount--; 15402 } // Lengthen the array for every element, matched or not 15403 15404 15405 if (seed) { 15406 unmatched.push(elem); 15407 } 15408 } 15409 } // `i` is now the count of elements visited above, and adding it to `matchedCount` 15410 // makes the latter nonnegative. 15411 15412 15413 matchedCount += i; // Apply set filters to unmatched elements 15414 // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` 15415 // equals `i`), unless we didn't visit _any_ elements in the above loop because we have 15416 // no element matchers and no seed. 15417 // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that 15418 // case, which will result in a "00" `matchedCount` that differs from `i` but is also 15419 // numerically zero. 15420 15421 if (bySet && i !== matchedCount) { 15422 j = 0; 15423 15424 while (matcher = setMatchers[j++]) { 15425 matcher(unmatched, setMatched, context, xml); 15426 } 15427 15428 if (seed) { 15429 // Reintegrate element matches to eliminate the need for sorting 15430 if (matchedCount > 0) { 15431 while (i--) { 15432 if (!(unmatched[i] || setMatched[i])) { 15433 setMatched[i] = pop.call(results); 15434 } 15435 } 15436 } // Discard index placeholder values to get only actual matches 15437 15438 15439 setMatched = condense(setMatched); 15440 } // Add matches to results 15441 15442 15443 push.apply(results, setMatched); // Seedless set matches succeeding multiple successful matchers stipulate sorting 15444 15445 if (outermost && !seed && setMatched.length > 0 && matchedCount + setMatchers.length > 1) { 15446 Sizzle.uniqueSort(results); 15447 } 15448 } // Override manipulation of globals by nested matchers 15449 15450 15451 if (outermost) { 15452 dirruns = dirrunsUnique; 15453 outermostContext = contextBackup; 15454 } 15455 15456 return unmatched; 15457 }; 15458 15459 return bySet ? markFunction(superMatcher) : superMatcher; 15460 } 15461 15462 compile = Sizzle.compile = function (selector, match 15463 /* Internal Use Only */ 15464 ) { 15465 var i, 15466 setMatchers = [], 15467 elementMatchers = [], 15468 cached = compilerCache[selector + " "]; 15469 15470 if (!cached) { 15471 // Generate a function of recursive functions that can be used to check each element 15472 if (!match) { 15473 match = tokenize(selector); 15474 } 15475 15476 i = match.length; 15477 15478 while (i--) { 15479 cached = matcherFromTokens(match[i]); 15480 15481 if (cached[expando]) { 15482 setMatchers.push(cached); 15483 } else { 15484 elementMatchers.push(cached); 15485 } 15486 } // Cache the compiled function 15487 15488 15489 cached = compilerCache(selector, matcherFromGroupMatchers(elementMatchers, setMatchers)); // Save selector and tokenization 15490 15491 cached.selector = selector; 15492 } 15493 15494 return cached; 15495 }; 15496 /** 15497 * A low-level selection function that works with Sizzle's compiled 15498 * selector functions 15499 * @param {String|Function} selector A selector or a pre-compiled 15500 * selector function built with Sizzle.compile 15501 * @param {Element} context 15502 * @param {Array} [results] 15503 * @param {Array} [seed] A set of elements to match against 15504 */ 15505 15506 15507 select = Sizzle.select = function (selector, context, results, seed) { 15508 var i, 15509 tokens, 15510 token, 15511 type, 15512 find, 15513 compiled = typeof selector === "function" && selector, 15514 match = !seed && tokenize(selector = compiled.selector || selector); 15515 results = results || []; // Try to minimize operations if there is only one selector in the list and no seed 15516 // (the latter of which guarantees us context) 15517 15518 if (match.length === 1) { 15519 // Reduce context if the leading compound selector is an ID 15520 tokens = match[0] = match[0].slice(0); 15521 15522 if (tokens.length > 2 && (token = tokens[0]).type === "ID" && context.nodeType === 9 && documentIsHTML && Expr.relative[tokens[1].type]) { 15523 context = (Expr.find["ID"](token.matches[0].replace(runescape, funescape), context) || [])[0]; 15524 15525 if (!context) { 15526 return results; // Precompiled matchers will still verify ancestry, so step up a level 15527 } else if (compiled) { 15528 context = context.parentNode; 15529 } 15530 15531 selector = selector.slice(tokens.shift().value.length); 15532 } // Fetch a seed set for right-to-left matching 15533 15534 15535 i = matchExpr["needsContext"].test(selector) ? 0 : tokens.length; 15536 15537 while (i--) { 15538 token = tokens[i]; // Abort if we hit a combinator 15539 15540 if (Expr.relative[type = token.type]) { 15541 break; 15542 } 15543 15544 if (find = Expr.find[type]) { 15545 // Search, expanding context for leading sibling combinators 15546 if (seed = find(token.matches[0].replace(runescape, funescape), rsibling.test(tokens[0].type) && testContext(context.parentNode) || context)) { 15547 // If seed is empty or no tokens remain, we can return early 15548 tokens.splice(i, 1); 15549 selector = seed.length && toSelector(tokens); 15550 15551 if (!selector) { 15552 push.apply(results, seed); 15553 return results; 15554 } 15555 15556 break; 15557 } 15558 } 15559 } 15560 } // Compile and execute a filtering function if one is not provided 15561 // Provide `match` to avoid retokenization if we modified the selector above 15562 15563 15564 (compiled || compile(selector, match))(seed, context, !documentIsHTML, results, !context || rsibling.test(selector) && testContext(context.parentNode) || context); 15565 return results; 15566 }; // One-time assignments 15567 // Sort stability 15568 15569 15570 support.sortStable = expando.split("").sort(sortOrder).join("") === expando; // Support: Chrome 14-35+ 15571 // Always assume duplicates if they aren't passed to the comparison function 15572 15573 support.detectDuplicates = !!hasDuplicate; // Initialize against the default document 15574 15575 setDocument(); // Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) 15576 // Detached nodes confoundingly follow *each other* 15577 15578 support.sortDetached = assert(function (el) { 15579 // Should return 1, but returns 4 (following) 15580 return el.compareDocumentPosition(document.createElement("fieldset")) & 1; 15581 }); // Support: IE<8 15582 // Prevent attribute/property "interpolation" 15583 // https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx 15584 15585 if (!assert(function (el) { 15586 el.innerHTML = "<a href='#'></a>"; 15587 return el.firstChild.getAttribute("href") === "#"; 15588 })) { 15589 addHandle("type|href|height|width", function (elem, name, isXML) { 15590 if (!isXML) { 15591 return elem.getAttribute(name, name.toLowerCase() === "type" ? 1 : 2); 15592 } 15593 }); 15594 } // Support: IE<9 15595 // Use defaultValue in place of getAttribute("value") 15596 15597 15598 if (!support.attributes || !assert(function (el) { 15599 el.innerHTML = "<input/>"; 15600 el.firstChild.setAttribute("value", ""); 15601 return el.firstChild.getAttribute("value") === ""; 15602 })) { 15603 addHandle("value", function (elem, name, isXML) { 15604 if (!isXML && elem.nodeName.toLowerCase() === "input") { 15605 return elem.defaultValue; 15606 } 15607 }); 15608 } // Support: IE<9 15609 // Use getAttributeNode to fetch booleans when getAttribute lies 15610 15611 15612 if (!assert(function (el) { 15613 return el.getAttribute("disabled") == null; 15614 })) { 15615 addHandle(booleans, function (elem, name, isXML) { 15616 var val; 15617 15618 if (!isXML) { 15619 return elem[name] === true ? name.toLowerCase() : (val = elem.getAttributeNode(name)) && val.specified ? val.value : null; 15620 } 15621 }); 15622 } 15623 15624 return Sizzle; 15625 }(window); 15626 15627 jQuery.find = Sizzle; 15628 jQuery.expr = Sizzle.selectors; // Deprecated 15629 15630 jQuery.expr[":"] = jQuery.expr.pseudos; 15631 jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; 15632 jQuery.text = Sizzle.getText; 15633 jQuery.isXMLDoc = Sizzle.isXML; 15634 jQuery.contains = Sizzle.contains; 15635 jQuery.escapeSelector = Sizzle.escape; 15636 15637 var dir = function dir(elem, _dir, until) { 15638 var matched = [], 15639 truncate = until !== undefined; 15640 15641 while ((elem = elem[_dir]) && elem.nodeType !== 9) { 15642 if (elem.nodeType === 1) { 15643 if (truncate && jQuery(elem).is(until)) { 15644 break; 15645 } 15646 15647 matched.push(elem); 15648 } 15649 } 15650 15651 return matched; 15652 }; 15653 15654 var _siblings = function siblings(n, elem) { 15655 var matched = []; 15656 15657 for (; n; n = n.nextSibling) { 15658 if (n.nodeType === 1 && n !== elem) { 15659 matched.push(n); 15660 } 15661 } 15662 15663 return matched; 15664 }; 15665 15666 var rneedsContext = jQuery.expr.match.needsContext; 15667 15668 function nodeName(elem, name) { 15669 return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); 15670 } 15671 15672 ; 15673 var rsingleTag = /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i; // Implement the identical functionality for filter and not 15674 15675 function winnow(elements, qualifier, not) { 15676 if (isFunction(qualifier)) { 15677 return jQuery.grep(elements, function (elem, i) { 15678 return !!qualifier.call(elem, i, elem) !== not; 15679 }); 15680 } // Single element 15681 15682 15683 if (qualifier.nodeType) { 15684 return jQuery.grep(elements, function (elem) { 15685 return elem === qualifier !== not; 15686 }); 15687 } // Arraylike of elements (jQuery, arguments, Array) 15688 15689 15690 if (typeof qualifier !== "string") { 15691 return jQuery.grep(elements, function (elem) { 15692 return indexOf.call(qualifier, elem) > -1 !== not; 15693 }); 15694 } // Filtered directly for both simple and complex selectors 15695 15696 15697 return jQuery.filter(qualifier, elements, not); 15698 } 15699 15700 jQuery.filter = function (expr, elems, not) { 15701 var elem = elems[0]; 15702 15703 if (not) { 15704 expr = ":not(" + expr + ")"; 15705 } 15706 15707 if (elems.length === 1 && elem.nodeType === 1) { 15708 return jQuery.find.matchesSelector(elem, expr) ? [elem] : []; 15709 } 15710 15711 return jQuery.find.matches(expr, jQuery.grep(elems, function (elem) { 15712 return elem.nodeType === 1; 15713 })); 15714 }; 15715 15716 jQuery.fn.extend({ 15717 find: function find(selector) { 15718 var i, 15719 ret, 15720 len = this.length, 15721 self = this; 15722 15723 if (typeof selector !== "string") { 15724 return this.pushStack(jQuery(selector).filter(function () { 15725 for (i = 0; i < len; i++) { 15726 if (jQuery.contains(self[i], this)) { 15727 return true; 15728 } 15729 } 15730 })); 15731 } 15732 15733 ret = this.pushStack([]); 15734 15735 for (i = 0; i < len; i++) { 15736 jQuery.find(selector, self[i], ret); 15737 } 15738 15739 return len > 1 ? jQuery.uniqueSort(ret) : ret; 15740 }, 15741 filter: function filter(selector) { 15742 return this.pushStack(winnow(this, selector || [], false)); 15743 }, 15744 not: function not(selector) { 15745 return this.pushStack(winnow(this, selector || [], true)); 15746 }, 15747 is: function is(selector) { 15748 return !!winnow(this, // If this is a positional/relative selector, check membership in the returned set 15749 // so $("p:first").is("p:last") won't return true for a doc with two "p". 15750 typeof selector === "string" && rneedsContext.test(selector) ? jQuery(selector) : selector || [], false).length; 15751 } 15752 }); // Initialize a jQuery object 15753 // A central reference to the root jQuery(document) 15754 15755 var rootjQuery, 15756 // A simple way to check for HTML strings 15757 // Prioritize #id over <tag> to avoid XSS via location.hash (#9521) 15758 // Strict HTML recognition (#11290: must start with <) 15759 // Shortcut simple #id case for speed 15760 rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, 15761 init = jQuery.fn.init = function (selector, context, root) { 15762 var match, elem; // HANDLE: $(""), $(null), $(undefined), $(false) 15763 15764 if (!selector) { 15765 return this; 15766 } // Method init() accepts an alternate rootjQuery 15767 // so migrate can support jQuery.sub (gh-2101) 15768 15769 15770 root = root || rootjQuery; // Handle HTML strings 15771 15772 if (typeof selector === "string") { 15773 if (selector[0] === "<" && selector[selector.length - 1] === ">" && selector.length >= 3) { 15774 // Assume that strings that start and end with <> are HTML and skip the regex check 15775 match = [null, selector, null]; 15776 } else { 15777 match = rquickExpr.exec(selector); 15778 } // Match html or make sure no context is specified for #id 15779 15780 15781 if (match && (match[1] || !context)) { 15782 // HANDLE: $(html) -> $(array) 15783 if (match[1]) { 15784 context = context instanceof jQuery ? context[0] : context; // Option to run scripts is true for back-compat 15785 // Intentionally let the error be thrown if parseHTML is not present 15786 15787 jQuery.merge(this, jQuery.parseHTML(match[1], context && context.nodeType ? context.ownerDocument || context : document, true)); // HANDLE: $(html, props) 15788 15789 if (rsingleTag.test(match[1]) && jQuery.isPlainObject(context)) { 15790 for (match in context) { 15791 // Properties of context are called as methods if possible 15792 if (isFunction(this[match])) { 15793 this[match](context[match]); // ...and otherwise set as attributes 15794 } else { 15795 this.attr(match, context[match]); 15796 } 15797 } 15798 } 15799 15800 return this; // HANDLE: $(#id) 15801 } else { 15802 elem = document.getElementById(match[2]); 15803 15804 if (elem) { 15805 // Inject the element directly into the jQuery object 15806 this[0] = elem; 15807 this.length = 1; 15808 } 15809 15810 return this; 15811 } // HANDLE: $(expr, $(...)) 15812 15813 } else if (!context || context.jquery) { 15814 return (context || root).find(selector); // HANDLE: $(expr, context) 15815 // (which is just equivalent to: $(context).find(expr) 15816 } else { 15817 return this.constructor(context).find(selector); 15818 } // HANDLE: $(DOMElement) 15819 15820 } else if (selector.nodeType) { 15821 this[0] = selector; 15822 this.length = 1; 15823 return this; // HANDLE: $(function) 15824 // Shortcut for document ready 15825 } else if (isFunction(selector)) { 15826 return root.ready !== undefined ? root.ready(selector) : // Execute immediately if ready is not present 15827 selector(jQuery); 15828 } 15829 15830 return jQuery.makeArray(selector, this); 15831 }; // Give the init function the jQuery prototype for later instantiation 15832 15833 15834 init.prototype = jQuery.fn; // Initialize central reference 15835 15836 rootjQuery = jQuery(document); 15837 var rparentsprev = /^(?:parents|prev(?:Until|All))/, 15838 // Methods guaranteed to produce a unique set when starting from a unique set 15839 guaranteedUnique = { 15840 children: true, 15841 contents: true, 15842 next: true, 15843 prev: true 15844 }; 15845 jQuery.fn.extend({ 15846 has: function has(target) { 15847 var targets = jQuery(target, this), 15848 l = targets.length; 15849 return this.filter(function () { 15850 var i = 0; 15851 15852 for (; i < l; i++) { 15853 if (jQuery.contains(this, targets[i])) { 15854 return true; 15855 } 15856 } 15857 }); 15858 }, 15859 closest: function closest(selectors, context) { 15860 var cur, 15861 i = 0, 15862 l = this.length, 15863 matched = [], 15864 targets = typeof selectors !== "string" && jQuery(selectors); // Positional selectors never match, since there's no _selection_ context 15865 15866 if (!rneedsContext.test(selectors)) { 15867 for (; i < l; i++) { 15868 for (cur = this[i]; cur && cur !== context; cur = cur.parentNode) { 15869 // Always skip document fragments 15870 if (cur.nodeType < 11 && (targets ? targets.index(cur) > -1 : // Don't pass non-elements to Sizzle 15871 cur.nodeType === 1 && jQuery.find.matchesSelector(cur, selectors))) { 15872 matched.push(cur); 15873 break; 15874 } 15875 } 15876 } 15877 } 15878 15879 return this.pushStack(matched.length > 1 ? jQuery.uniqueSort(matched) : matched); 15880 }, 15881 // Determine the position of an element within the set 15882 index: function index(elem) { 15883 // No argument, return index in parent 15884 if (!elem) { 15885 return this[0] && this[0].parentNode ? this.first().prevAll().length : -1; 15886 } // Index in selector 15887 15888 15889 if (typeof elem === "string") { 15890 return indexOf.call(jQuery(elem), this[0]); 15891 } // Locate the position of the desired element 15892 15893 15894 return indexOf.call(this, // If it receives a jQuery object, the first element is used 15895 elem.jquery ? elem[0] : elem); 15896 }, 15897 add: function add(selector, context) { 15898 return this.pushStack(jQuery.uniqueSort(jQuery.merge(this.get(), jQuery(selector, context)))); 15899 }, 15900 addBack: function addBack(selector) { 15901 return this.add(selector == null ? this.prevObject : this.prevObject.filter(selector)); 15902 } 15903 }); 15904 15905 function sibling(cur, dir) { 15906 while ((cur = cur[dir]) && cur.nodeType !== 1) {} 15907 15908 return cur; 15909 } 15910 15911 jQuery.each({ 15912 parent: function parent(elem) { 15913 var parent = elem.parentNode; 15914 return parent && parent.nodeType !== 11 ? parent : null; 15915 }, 15916 parents: function parents(elem) { 15917 return dir(elem, "parentNode"); 15918 }, 15919 parentsUntil: function parentsUntil(elem, i, until) { 15920 return dir(elem, "parentNode", until); 15921 }, 15922 next: function next(elem) { 15923 return sibling(elem, "nextSibling"); 15924 }, 15925 prev: function prev(elem) { 15926 return sibling(elem, "previousSibling"); 15927 }, 15928 nextAll: function nextAll(elem) { 15929 return dir(elem, "nextSibling"); 15930 }, 15931 prevAll: function prevAll(elem) { 15932 return dir(elem, "previousSibling"); 15933 }, 15934 nextUntil: function nextUntil(elem, i, until) { 15935 return dir(elem, "nextSibling", until); 15936 }, 15937 prevUntil: function prevUntil(elem, i, until) { 15938 return dir(elem, "previousSibling", until); 15939 }, 15940 siblings: function siblings(elem) { 15941 return _siblings((elem.parentNode || {}).firstChild, elem); 15942 }, 15943 children: function children(elem) { 15944 return _siblings(elem.firstChild); 15945 }, 15946 contents: function contents(elem) { 15947 if (typeof elem.contentDocument !== "undefined") { 15948 return elem.contentDocument; 15949 } // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only 15950 // Treat the template element as a regular one in browsers that 15951 // don't support it. 15952 15953 15954 if (nodeName(elem, "template")) { 15955 elem = elem.content || elem; 15956 } 15957 15958 return jQuery.merge([], elem.childNodes); 15959 } 15960 }, function (name, fn) { 15961 jQuery.fn[name] = function (until, selector) { 15962 var matched = jQuery.map(this, fn, until); 15963 15964 if (name.slice(-5) !== "Until") { 15965 selector = until; 15966 } 15967 15968 if (selector && typeof selector === "string") { 15969 matched = jQuery.filter(selector, matched); 15970 } 15971 15972 if (this.length > 1) { 15973 // Remove duplicates 15974 if (!guaranteedUnique[name]) { 15975 jQuery.uniqueSort(matched); 15976 } // Reverse order for parents* and prev-derivatives 15977 15978 15979 if (rparentsprev.test(name)) { 15980 matched.reverse(); 15981 } 15982 } 15983 15984 return this.pushStack(matched); 15985 }; 15986 }); 15987 var rnothtmlwhite = /[^\x20\t\r\n\f]+/g; // Convert String-formatted options into Object-formatted ones 15988 15989 function createOptions(options) { 15990 var object = {}; 15991 jQuery.each(options.match(rnothtmlwhite) || [], function (_, flag) { 15992 object[flag] = true; 15993 }); 15994 return object; 15995 } 15996 /* 15997 * Create a callback list using the following parameters: 15998 * 15999 * options: an optional list of space-separated options that will change how 16000 * the callback list behaves or a more traditional option object 16001 * 16002 * By default a callback list will act like an event callback list and can be 16003 * "fired" multiple times. 16004 * 16005 * Possible options: 16006 * 16007 * once: will ensure the callback list can only be fired once (like a Deferred) 16008 * 16009 * memory: will keep track of previous values and will call any callback added 16010 * after the list has been fired right away with the latest "memorized" 16011 * values (like a Deferred) 16012 * 16013 * unique: will ensure a callback can only be added once (no duplicate in the list) 16014 * 16015 * stopOnFalse: interrupt callings when a callback returns false 16016 * 16017 */ 16018 16019 16020 jQuery.Callbacks = function (options) { 16021 // Convert options from String-formatted to Object-formatted if needed 16022 // (we check in cache first) 16023 options = typeof options === "string" ? createOptions(options) : jQuery.extend({}, options); 16024 16025 var // Flag to know if list is currently firing 16026 firing, 16027 // Last fire value for non-forgettable lists 16028 memory, 16029 // Flag to know if list was already fired 16030 _fired, 16031 // Flag to prevent firing 16032 _locked, 16033 // Actual callback list 16034 list = [], 16035 // Queue of execution data for repeatable lists 16036 queue = [], 16037 // Index of currently firing callback (modified by add/remove as needed) 16038 firingIndex = -1, 16039 // Fire callbacks 16040 fire = function fire() { 16041 // Enforce single-firing 16042 _locked = _locked || options.once; // Execute callbacks for all pending executions, 16043 // respecting firingIndex overrides and runtime changes 16044 16045 _fired = firing = true; 16046 16047 for (; queue.length; firingIndex = -1) { 16048 memory = queue.shift(); 16049 16050 while (++firingIndex < list.length) { 16051 // Run callback and check for early termination 16052 if (list[firingIndex].apply(memory[0], memory[1]) === false && options.stopOnFalse) { 16053 // Jump to end and forget the data so .add doesn't re-fire 16054 firingIndex = list.length; 16055 memory = false; 16056 } 16057 } 16058 } // Forget the data if we're done with it 16059 16060 16061 if (!options.memory) { 16062 memory = false; 16063 } 16064 16065 firing = false; // Clean up if we're done firing for good 16066 16067 if (_locked) { 16068 // Keep an empty list if we have data for future add calls 16069 if (memory) { 16070 list = []; // Otherwise, this object is spent 16071 } else { 16072 list = ""; 16073 } 16074 } 16075 }, 16076 // Actual Callbacks object 16077 self = { 16078 // Add a callback or a collection of callbacks to the list 16079 add: function add() { 16080 if (list) { 16081 // If we have memory from a past run, we should fire after adding 16082 if (memory && !firing) { 16083 firingIndex = list.length - 1; 16084 queue.push(memory); 16085 } 16086 16087 (function add(args) { 16088 jQuery.each(args, function (_, arg) { 16089 if (isFunction(arg)) { 16090 if (!options.unique || !self.has(arg)) { 16091 list.push(arg); 16092 } 16093 } else if (arg && arg.length && toType(arg) !== "string") { 16094 // Inspect recursively 16095 add(arg); 16096 } 16097 }); 16098 })(arguments); 16099 16100 if (memory && !firing) { 16101 fire(); 16102 } 16103 } 16104 16105 return this; 16106 }, 16107 // Remove a callback from the list 16108 remove: function remove() { 16109 jQuery.each(arguments, function (_, arg) { 16110 var index; 16111 16112 while ((index = jQuery.inArray(arg, list, index)) > -1) { 16113 list.splice(index, 1); // Handle firing indexes 16114 16115 if (index <= firingIndex) { 16116 firingIndex--; 16117 } 16118 } 16119 }); 16120 return this; 16121 }, 16122 // Check if a given callback is in the list. 16123 // If no argument is given, return whether or not list has callbacks attached. 16124 has: function has(fn) { 16125 return fn ? jQuery.inArray(fn, list) > -1 : list.length > 0; 16126 }, 16127 // Remove all callbacks from the list 16128 empty: function empty() { 16129 if (list) { 16130 list = []; 16131 } 16132 16133 return this; 16134 }, 16135 // Disable .fire and .add 16136 // Abort any current/pending executions 16137 // Clear all callbacks and values 16138 disable: function disable() { 16139 _locked = queue = []; 16140 list = memory = ""; 16141 return this; 16142 }, 16143 disabled: function disabled() { 16144 return !list; 16145 }, 16146 // Disable .fire 16147 // Also disable .add unless we have memory (since it would have no effect) 16148 // Abort any pending executions 16149 lock: function lock() { 16150 _locked = queue = []; 16151 16152 if (!memory && !firing) { 16153 list = memory = ""; 16154 } 16155 16156 return this; 16157 }, 16158 locked: function locked() { 16159 return !!_locked; 16160 }, 16161 // Call all callbacks with the given context and arguments 16162 fireWith: function fireWith(context, args) { 16163 if (!_locked) { 16164 args = args || []; 16165 args = [context, args.slice ? args.slice() : args]; 16166 queue.push(args); 16167 16168 if (!firing) { 16169 fire(); 16170 } 16171 } 16172 16173 return this; 16174 }, 16175 // Call all the callbacks with the given arguments 16176 fire: function fire() { 16177 self.fireWith(this, arguments); 16178 return this; 16179 }, 16180 // To know if the callbacks have already been called at least once 16181 fired: function fired() { 16182 return !!_fired; 16183 } 16184 }; 16185 16186 return self; 16187 }; 16188 16189 function Identity(v) { 16190 return v; 16191 } 16192 16193 function Thrower(ex) { 16194 throw ex; 16195 } 16196 16197 function adoptValue(value, resolve, reject, noValue) { 16198 var method; 16199 16200 try { 16201 // Check for promise aspect first to privilege synchronous behavior 16202 if (value && isFunction(method = value.promise)) { 16203 method.call(value).done(resolve).fail(reject); // Other thenables 16204 } else if (value && isFunction(method = value.then)) { 16205 method.call(value, resolve, reject); // Other non-thenables 16206 } else { 16207 // Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer: 16208 // * false: [ value ].slice( 0 ) => resolve( value ) 16209 // * true: [ value ].slice( 1 ) => resolve() 16210 resolve.apply(undefined, [value].slice(noValue)); 16211 } // For Promises/A+, convert exceptions into rejections 16212 // Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in 16213 // Deferred#then to conditionally suppress rejection. 16214 16215 } catch (value) { 16216 // Support: Android 4.0 only 16217 // Strict mode functions invoked without .call/.apply get global-object context 16218 reject.apply(undefined, [value]); 16219 } 16220 } 16221 16222 jQuery.extend({ 16223 Deferred: function Deferred(func) { 16224 var tuples = [// action, add listener, callbacks, 16225 // ... .then handlers, argument index, [final state] 16226 ["notify", "progress", jQuery.Callbacks("memory"), jQuery.Callbacks("memory"), 2], ["resolve", "done", jQuery.Callbacks("once memory"), jQuery.Callbacks("once memory"), 0, "resolved"], ["reject", "fail", jQuery.Callbacks("once memory"), jQuery.Callbacks("once memory"), 1, "rejected"]], 16227 _state = "pending", 16228 _promise = { 16229 state: function state() { 16230 return _state; 16231 }, 16232 always: function always() { 16233 deferred.done(arguments).fail(arguments); 16234 return this; 16235 }, 16236 "catch": function _catch(fn) { 16237 return _promise.then(null, fn); 16238 }, 16239 // Keep pipe for back-compat 16240 pipe: function pipe() 16241 /* fnDone, fnFail, fnProgress */ 16242 { 16243 var fns = arguments; 16244 return jQuery.Deferred(function (newDefer) { 16245 jQuery.each(tuples, function (i, tuple) { 16246 // Map tuples (progress, done, fail) to arguments (done, fail, progress) 16247 var fn = isFunction(fns[tuple[4]]) && fns[tuple[4]]; // deferred.progress(function() { bind to newDefer or newDefer.notify }) 16248 // deferred.done(function() { bind to newDefer or newDefer.resolve }) 16249 // deferred.fail(function() { bind to newDefer or newDefer.reject }) 16250 16251 deferred[tuple[1]](function () { 16252 var returned = fn && fn.apply(this, arguments); 16253 16254 if (returned && isFunction(returned.promise)) { 16255 returned.promise().progress(newDefer.notify).done(newDefer.resolve).fail(newDefer.reject); 16256 } else { 16257 newDefer[tuple[0] + "With"](this, fn ? [returned] : arguments); 16258 } 16259 }); 16260 }); 16261 fns = null; 16262 }).promise(); 16263 }, 16264 then: function then(onFulfilled, onRejected, onProgress) { 16265 var maxDepth = 0; 16266 16267 function resolve(depth, deferred, handler, special) { 16268 return function () { 16269 var that = this, 16270 args = arguments, 16271 mightThrow = function mightThrow() { 16272 var returned, then; // Support: Promises/A+ section 2.3.3.3.3 16273 // https://promisesaplus.com/#point-59 16274 // Ignore double-resolution attempts 16275 16276 if (depth < maxDepth) { 16277 return; 16278 } 16279 16280 returned = handler.apply(that, args); // Support: Promises/A+ section 2.3.1 16281 // https://promisesaplus.com/#point-48 16282 16283 if (returned === deferred.promise()) { 16284 throw new TypeError("Thenable self-resolution"); 16285 } // Support: Promises/A+ sections 2.3.3.1, 3.5 16286 // https://promisesaplus.com/#point-54 16287 // https://promisesaplus.com/#point-75 16288 // Retrieve `then` only once 16289 16290 16291 then = returned && ( // Support: Promises/A+ section 2.3.4 16292 // https://promisesaplus.com/#point-64 16293 // Only check objects and functions for thenability 16294 _typeof(returned) === "object" || typeof returned === "function") && returned.then; // Handle a returned thenable 16295 16296 if (isFunction(then)) { 16297 // Special processors (notify) just wait for resolution 16298 if (special) { 16299 then.call(returned, resolve(maxDepth, deferred, Identity, special), resolve(maxDepth, deferred, Thrower, special)); // Normal processors (resolve) also hook into progress 16300 } else { 16301 // ...and disregard older resolution values 16302 maxDepth++; 16303 then.call(returned, resolve(maxDepth, deferred, Identity, special), resolve(maxDepth, deferred, Thrower, special), resolve(maxDepth, deferred, Identity, deferred.notifyWith)); 16304 } // Handle all other returned values 16305 16306 } else { 16307 // Only substitute handlers pass on context 16308 // and multiple values (non-spec behavior) 16309 if (handler !== Identity) { 16310 that = undefined; 16311 args = [returned]; 16312 } // Process the value(s) 16313 // Default process is resolve 16314 16315 16316 (special || deferred.resolveWith)(that, args); 16317 } 16318 }, 16319 // Only normal processors (resolve) catch and reject exceptions 16320 process = special ? mightThrow : function () { 16321 try { 16322 mightThrow(); 16323 } catch (e) { 16324 if (jQuery.Deferred.exceptionHook) { 16325 jQuery.Deferred.exceptionHook(e, process.stackTrace); 16326 } // Support: Promises/A+ section 2.3.3.3.4.1 16327 // https://promisesaplus.com/#point-61 16328 // Ignore post-resolution exceptions 16329 16330 16331 if (depth + 1 >= maxDepth) { 16332 // Only substitute handlers pass on context 16333 // and multiple values (non-spec behavior) 16334 if (handler !== Thrower) { 16335 that = undefined; 16336 args = [e]; 16337 } 16338 16339 deferred.rejectWith(that, args); 16340 } 16341 } 16342 }; // Support: Promises/A+ section 2.3.3.3.1 16343 // https://promisesaplus.com/#point-57 16344 // Re-resolve promises immediately to dodge false rejection from 16345 // subsequent errors 16346 16347 16348 if (depth) { 16349 process(); 16350 } else { 16351 // Call an optional hook to record the stack, in case of exception 16352 // since it's otherwise lost when execution goes async 16353 if (jQuery.Deferred.getStackHook) { 16354 process.stackTrace = jQuery.Deferred.getStackHook(); 16355 } 16356 16357 window.setTimeout(process); 16358 } 16359 }; 16360 } 16361 16362 return jQuery.Deferred(function (newDefer) { 16363 // progress_handlers.add( ... ) 16364 tuples[0][3].add(resolve(0, newDefer, isFunction(onProgress) ? onProgress : Identity, newDefer.notifyWith)); // fulfilled_handlers.add( ... ) 16365 16366 tuples[1][3].add(resolve(0, newDefer, isFunction(onFulfilled) ? onFulfilled : Identity)); // rejected_handlers.add( ... ) 16367 16368 tuples[2][3].add(resolve(0, newDefer, isFunction(onRejected) ? onRejected : Thrower)); 16369 }).promise(); 16370 }, 16371 // Get a promise for this deferred 16372 // If obj is provided, the promise aspect is added to the object 16373 promise: function promise(obj) { 16374 return obj != null ? jQuery.extend(obj, _promise) : _promise; 16375 } 16376 }, 16377 deferred = {}; // Add list-specific methods 16378 16379 jQuery.each(tuples, function (i, tuple) { 16380 var list = tuple[2], 16381 stateString = tuple[5]; // promise.progress = list.add 16382 // promise.done = list.add 16383 // promise.fail = list.add 16384 16385 _promise[tuple[1]] = list.add; // Handle state 16386 16387 if (stateString) { 16388 list.add(function () { 16389 // state = "resolved" (i.e., fulfilled) 16390 // state = "rejected" 16391 _state = stateString; 16392 }, // rejected_callbacks.disable 16393 // fulfilled_callbacks.disable 16394 tuples[3 - i][2].disable, // rejected_handlers.disable 16395 // fulfilled_handlers.disable 16396 tuples[3 - i][3].disable, // progress_callbacks.lock 16397 tuples[0][2].lock, // progress_handlers.lock 16398 tuples[0][3].lock); 16399 } // progress_handlers.fire 16400 // fulfilled_handlers.fire 16401 // rejected_handlers.fire 16402 16403 16404 list.add(tuple[3].fire); // deferred.notify = function() { deferred.notifyWith(...) } 16405 // deferred.resolve = function() { deferred.resolveWith(...) } 16406 // deferred.reject = function() { deferred.rejectWith(...) } 16407 16408 deferred[tuple[0]] = function () { 16409 deferred[tuple[0] + "With"](this === deferred ? undefined : this, arguments); 16410 return this; 16411 }; // deferred.notifyWith = list.fireWith 16412 // deferred.resolveWith = list.fireWith 16413 // deferred.rejectWith = list.fireWith 16414 16415 16416 deferred[tuple[0] + "With"] = list.fireWith; 16417 }); // Make the deferred a promise 16418 16419 _promise.promise(deferred); // Call given func if any 16420 16421 16422 if (func) { 16423 func.call(deferred, deferred); 16424 } // All done! 16425 16426 16427 return deferred; 16428 }, 16429 // Deferred helper 16430 when: function when(singleValue) { 16431 var // count of uncompleted subordinates 16432 remaining = arguments.length, 16433 // count of unprocessed arguments 16434 i = remaining, 16435 // subordinate fulfillment data 16436 resolveContexts = Array(i), 16437 resolveValues = _slice.call(arguments), 16438 // the master Deferred 16439 master = jQuery.Deferred(), 16440 // subordinate callback factory 16441 updateFunc = function updateFunc(i) { 16442 return function (value) { 16443 resolveContexts[i] = this; 16444 resolveValues[i] = arguments.length > 1 ? _slice.call(arguments) : value; 16445 16446 if (! --remaining) { 16447 master.resolveWith(resolveContexts, resolveValues); 16448 } 16449 }; 16450 }; // Single- and empty arguments are adopted like Promise.resolve 16451 16452 16453 if (remaining <= 1) { 16454 adoptValue(singleValue, master.done(updateFunc(i)).resolve, master.reject, !remaining); // Use .then() to unwrap secondary thenables (cf. gh-3000) 16455 16456 if (master.state() === "pending" || isFunction(resolveValues[i] && resolveValues[i].then)) { 16457 return master.then(); 16458 } 16459 } // Multiple arguments are aggregated like Promise.all array elements 16460 16461 16462 while (i--) { 16463 adoptValue(resolveValues[i], updateFunc(i), master.reject); 16464 } 16465 16466 return master.promise(); 16467 } 16468 }); // These usually indicate a programmer mistake during development, 16469 // warn about them ASAP rather than swallowing them by default. 16470 16471 var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; 16472 16473 jQuery.Deferred.exceptionHook = function (error, stack) { 16474 // Support: IE 8 - 9 only 16475 // Console exists when dev tools are open, which can happen at any time 16476 if (window.console && window.console.warn && error && rerrorNames.test(error.name)) { 16477 window.console.warn("jQuery.Deferred exception: " + error.message, error.stack, stack); 16478 } 16479 }; 16480 16481 jQuery.readyException = function (error) { 16482 window.setTimeout(function () { 16483 throw error; 16484 }); 16485 }; // The deferred used on DOM ready 16486 16487 16488 var readyList = jQuery.Deferred(); 16489 16490 jQuery.fn.ready = function (fn) { 16491 readyList.then(fn) // Wrap jQuery.readyException in a function so that the lookup 16492 // happens at the time of error handling instead of callback 16493 // registration. 16494 .catch(function (error) { 16495 jQuery.readyException(error); 16496 }); 16497 return this; 16498 }; 16499 16500 jQuery.extend({ 16501 // Is the DOM ready to be used? Set to true once it occurs. 16502 isReady: false, 16503 // A counter to track how many items to wait for before 16504 // the ready event fires. See #6781 16505 readyWait: 1, 16506 // Handle when the DOM is ready 16507 ready: function ready(wait) { 16508 // Abort if there are pending holds or we're already ready 16509 if (wait === true ? --jQuery.readyWait : jQuery.isReady) { 16510 return; 16511 } // Remember that the DOM is ready 16512 16513 16514 jQuery.isReady = true; // If a normal DOM Ready event fired, decrement, and wait if need be 16515 16516 if (wait !== true && --jQuery.readyWait > 0) { 16517 return; 16518 } // If there are functions bound, to execute 16519 16520 16521 readyList.resolveWith(document, [jQuery]); 16522 } 16523 }); 16524 jQuery.ready.then = readyList.then; // The ready event handler and self cleanup method 16525 16526 function completed() { 16527 document.removeEventListener("DOMContentLoaded", completed); 16528 window.removeEventListener("load", completed); 16529 jQuery.ready(); 16530 } // Catch cases where $(document).ready() is called 16531 // after the browser event has already occurred. 16532 // Support: IE <=9 - 10 only 16533 // Older IE sometimes signals "interactive" too soon 16534 16535 16536 if (document.readyState === "complete" || document.readyState !== "loading" && !document.documentElement.doScroll) { 16537 // Handle it asynchronously to allow scripts the opportunity to delay ready 16538 window.setTimeout(jQuery.ready); 16539 } else { 16540 // Use the handy event callback 16541 document.addEventListener("DOMContentLoaded", completed); // A fallback to window.onload, that will always work 16542 16543 window.addEventListener("load", completed); 16544 } // Multifunctional method to get and set values of a collection 16545 // The value/s can optionally be executed if it's a function 16546 16547 16548 var access = function access(elems, fn, key, value, chainable, emptyGet, raw) { 16549 var i = 0, 16550 len = elems.length, 16551 bulk = key == null; // Sets many values 16552 16553 if (toType(key) === "object") { 16554 chainable = true; 16555 16556 for (i in key) { 16557 access(elems, fn, i, key[i], true, emptyGet, raw); 16558 } // Sets one value 16559 16560 } else if (value !== undefined) { 16561 chainable = true; 16562 16563 if (!isFunction(value)) { 16564 raw = true; 16565 } 16566 16567 if (bulk) { 16568 // Bulk operations run against the entire set 16569 if (raw) { 16570 fn.call(elems, value); 16571 fn = null; // ...except when executing function values 16572 } else { 16573 bulk = fn; 16574 16575 fn = function fn(elem, key, value) { 16576 return bulk.call(jQuery(elem), value); 16577 }; 16578 } 16579 } 16580 16581 if (fn) { 16582 for (; i < len; i++) { 16583 fn(elems[i], key, raw ? value : value.call(elems[i], i, fn(elems[i], key))); 16584 } 16585 } 16586 } 16587 16588 if (chainable) { 16589 return elems; 16590 } // Gets 16591 16592 16593 if (bulk) { 16594 return fn.call(elems); 16595 } 16596 16597 return len ? fn(elems[0], key) : emptyGet; 16598 }; // Matches dashed string for camelizing 16599 16600 16601 var rmsPrefix = /^-ms-/, 16602 rdashAlpha = /-([a-z])/g; // Used by camelCase as callback to replace() 16603 16604 function fcamelCase(all, letter) { 16605 return letter.toUpperCase(); 16606 } // Convert dashed to camelCase; used by the css and data modules 16607 // Support: IE <=9 - 11, Edge 12 - 15 16608 // Microsoft forgot to hump their vendor prefix (#9572) 16609 16610 16611 function camelCase(string) { 16612 return string.replace(rmsPrefix, "ms-").replace(rdashAlpha, fcamelCase); 16613 } 16614 16615 var acceptData = function acceptData(owner) { 16616 // Accepts only: 16617 // - Node 16618 // - Node.ELEMENT_NODE 16619 // - Node.DOCUMENT_NODE 16620 // - Object 16621 // - Any 16622 return owner.nodeType === 1 || owner.nodeType === 9 || !+owner.nodeType; 16623 }; 16624 16625 function Data() { 16626 this.expando = jQuery.expando + Data.uid++; 16627 } 16628 16629 Data.uid = 1; 16630 Data.prototype = { 16631 cache: function cache(owner) { 16632 // Check if the owner object already has a cache 16633 var value = owner[this.expando]; // If not, create one 16634 16635 if (!value) { 16636 value = {}; // We can accept data for non-element nodes in modern browsers, 16637 // but we should not, see #8335. 16638 // Always return an empty object. 16639 16640 if (acceptData(owner)) { 16641 // If it is a node unlikely to be stringify-ed or looped over 16642 // use plain assignment 16643 if (owner.nodeType) { 16644 owner[this.expando] = value; // Otherwise secure it in a non-enumerable property 16645 // configurable must be true to allow the property to be 16646 // deleted when data is removed 16647 } else { 16648 Object.defineProperty(owner, this.expando, { 16649 value: value, 16650 configurable: true 16651 }); 16652 } 16653 } 16654 } 16655 16656 return value; 16657 }, 16658 set: function set(owner, data, value) { 16659 var prop, 16660 cache = this.cache(owner); // Handle: [ owner, key, value ] args 16661 // Always use camelCase key (gh-2257) 16662 16663 if (typeof data === "string") { 16664 cache[camelCase(data)] = value; // Handle: [ owner, { properties } ] args 16665 } else { 16666 // Copy the properties one-by-one to the cache object 16667 for (prop in data) { 16668 cache[camelCase(prop)] = data[prop]; 16669 } 16670 } 16671 16672 return cache; 16673 }, 16674 get: function get(owner, key) { 16675 return key === undefined ? this.cache(owner) : // Always use camelCase key (gh-2257) 16676 owner[this.expando] && owner[this.expando][camelCase(key)]; 16677 }, 16678 access: function access(owner, key, value) { 16679 // In cases where either: 16680 // 16681 // 1. No key was specified 16682 // 2. A string key was specified, but no value provided 16683 // 16684 // Take the "read" path and allow the get method to determine 16685 // which value to return, respectively either: 16686 // 16687 // 1. The entire cache object 16688 // 2. The data stored at the key 16689 // 16690 if (key === undefined || key && typeof key === "string" && value === undefined) { 16691 return this.get(owner, key); 16692 } // When the key is not a string, or both a key and value 16693 // are specified, set or extend (existing objects) with either: 16694 // 16695 // 1. An object of properties 16696 // 2. A key and value 16697 // 16698 16699 16700 this.set(owner, key, value); // Since the "set" path can have two possible entry points 16701 // return the expected data based on which path was taken[*] 16702 16703 return value !== undefined ? value : key; 16704 }, 16705 remove: function remove(owner, key) { 16706 var i, 16707 cache = owner[this.expando]; 16708 16709 if (cache === undefined) { 16710 return; 16711 } 16712 16713 if (key !== undefined) { 16714 // Support array or space separated string of keys 16715 if (Array.isArray(key)) { 16716 // If key is an array of keys... 16717 // We always set camelCase keys, so remove that. 16718 key = key.map(camelCase); 16719 } else { 16720 key = camelCase(key); // If a key with the spaces exists, use it. 16721 // Otherwise, create an array by matching non-whitespace 16722 16723 key = key in cache ? [key] : key.match(rnothtmlwhite) || []; 16724 } 16725 16726 i = key.length; 16727 16728 while (i--) { 16729 delete cache[key[i]]; 16730 } 16731 } // Remove the expando if there's no more data 16732 16733 16734 if (key === undefined || jQuery.isEmptyObject(cache)) { 16735 // Support: Chrome <=35 - 45 16736 // Webkit & Blink performance suffers when deleting properties 16737 // from DOM nodes, so set to undefined instead 16738 // https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted) 16739 if (owner.nodeType) { 16740 owner[this.expando] = undefined; 16741 } else { 16742 delete owner[this.expando]; 16743 } 16744 } 16745 }, 16746 hasData: function hasData(owner) { 16747 var cache = owner[this.expando]; 16748 return cache !== undefined && !jQuery.isEmptyObject(cache); 16749 } 16750 }; 16751 var dataPriv = new Data(); 16752 var dataUser = new Data(); // Implementation Summary 16753 // 16754 // 1. Enforce API surface and semantic compatibility with 1.9.x branch 16755 // 2. Improve the module's maintainability by reducing the storage 16756 // paths to a single mechanism. 16757 // 3. Use the same single mechanism to support "private" and "user" data. 16758 // 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) 16759 // 5. Avoid exposing implementation details on user objects (eg. expando properties) 16760 // 6. Provide a clear path for implementation upgrade to WeakMap in 2014 16761 16762 var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, 16763 rmultiDash = /[A-Z]/g; 16764 16765 function getData(data) { 16766 if (data === "true") { 16767 return true; 16768 } 16769 16770 if (data === "false") { 16771 return false; 16772 } 16773 16774 if (data === "null") { 16775 return null; 16776 } // Only convert to a number if it doesn't change the string 16777 16778 16779 if (data === +data + "") { 16780 return +data; 16781 } 16782 16783 if (rbrace.test(data)) { 16784 return JSON.parse(data); 16785 } 16786 16787 return data; 16788 } 16789 16790 function dataAttr(elem, key, data) { 16791 var name; // If nothing was found internally, try to fetch any 16792 // data from the HTML5 data-* attribute 16793 16794 if (data === undefined && elem.nodeType === 1) { 16795 name = "data-" + key.replace(rmultiDash, "-$&").toLowerCase(); 16796 data = elem.getAttribute(name); 16797 16798 if (typeof data === "string") { 16799 try { 16800 data = getData(data); 16801 } catch (e) {} // Make sure we set the data so it isn't changed later 16802 16803 16804 dataUser.set(elem, key, data); 16805 } else { 16806 data = undefined; 16807 } 16808 } 16809 16810 return data; 16811 } 16812 16813 jQuery.extend({ 16814 hasData: function hasData(elem) { 16815 return dataUser.hasData(elem) || dataPriv.hasData(elem); 16816 }, 16817 data: function data(elem, name, _data) { 16818 return dataUser.access(elem, name, _data); 16819 }, 16820 removeData: function removeData(elem, name) { 16821 dataUser.remove(elem, name); 16822 }, 16823 // TODO: Now that all calls to _data and _removeData have been replaced 16824 // with direct calls to dataPriv methods, these can be deprecated. 16825 _data: function _data(elem, name, data) { 16826 return dataPriv.access(elem, name, data); 16827 }, 16828 _removeData: function _removeData(elem, name) { 16829 dataPriv.remove(elem, name); 16830 } 16831 }); 16832 jQuery.fn.extend({ 16833 data: function data(key, value) { 16834 var i, 16835 name, 16836 data, 16837 elem = this[0], 16838 attrs = elem && elem.attributes; // Gets all values 16839 16840 if (key === undefined) { 16841 if (this.length) { 16842 data = dataUser.get(elem); 16843 16844 if (elem.nodeType === 1 && !dataPriv.get(elem, "hasDataAttrs")) { 16845 i = attrs.length; 16846 16847 while (i--) { 16848 // Support: IE 11 only 16849 // The attrs elements can be null (#14894) 16850 if (attrs[i]) { 16851 name = attrs[i].name; 16852 16853 if (name.indexOf("data-") === 0) { 16854 name = camelCase(name.slice(5)); 16855 dataAttr(elem, name, data[name]); 16856 } 16857 } 16858 } 16859 16860 dataPriv.set(elem, "hasDataAttrs", true); 16861 } 16862 } 16863 16864 return data; 16865 } // Sets multiple values 16866 16867 16868 if (_typeof(key) === "object") { 16869 return this.each(function () { 16870 dataUser.set(this, key); 16871 }); 16872 } 16873 16874 return access(this, function (value) { 16875 var data; // The calling jQuery object (element matches) is not empty 16876 // (and therefore has an element appears at this[ 0 ]) and the 16877 // `value` parameter was not undefined. An empty jQuery object 16878 // will result in `undefined` for elem = this[ 0 ] which will 16879 // throw an exception if an attempt to read a data cache is made. 16880 16881 if (elem && value === undefined) { 16882 // Attempt to get data from the cache 16883 // The key will always be camelCased in Data 16884 data = dataUser.get(elem, key); 16885 16886 if (data !== undefined) { 16887 return data; 16888 } // Attempt to "discover" the data in 16889 // HTML5 custom data-* attrs 16890 16891 16892 data = dataAttr(elem, key); 16893 16894 if (data !== undefined) { 16895 return data; 16896 } // We tried really hard, but the data doesn't exist. 16897 16898 16899 return; 16900 } // Set the data... 16901 16902 16903 this.each(function () { 16904 // We always store the camelCased key 16905 dataUser.set(this, key, value); 16906 }); 16907 }, null, value, arguments.length > 1, null, true); 16908 }, 16909 removeData: function removeData(key) { 16910 return this.each(function () { 16911 dataUser.remove(this, key); 16912 }); 16913 } 16914 }); 16915 jQuery.extend({ 16916 queue: function queue(elem, type, data) { 16917 var queue; 16918 16919 if (elem) { 16920 type = (type || "fx") + "queue"; 16921 queue = dataPriv.get(elem, type); // Speed up dequeue by getting out quickly if this is just a lookup 16922 16923 if (data) { 16924 if (!queue || Array.isArray(data)) { 16925 queue = dataPriv.access(elem, type, jQuery.makeArray(data)); 16926 } else { 16927 queue.push(data); 16928 } 16929 } 16930 16931 return queue || []; 16932 } 16933 }, 16934 dequeue: function dequeue(elem, type) { 16935 type = type || "fx"; 16936 16937 var queue = jQuery.queue(elem, type), 16938 startLength = queue.length, 16939 fn = queue.shift(), 16940 hooks = jQuery._queueHooks(elem, type), 16941 next = function next() { 16942 jQuery.dequeue(elem, type); 16943 }; // If the fx queue is dequeued, always remove the progress sentinel 16944 16945 16946 if (fn === "inprogress") { 16947 fn = queue.shift(); 16948 startLength--; 16949 } 16950 16951 if (fn) { 16952 // Add a progress sentinel to prevent the fx queue from being 16953 // automatically dequeued 16954 if (type === "fx") { 16955 queue.unshift("inprogress"); 16956 } // Clear up the last queue stop function 16957 16958 16959 delete hooks.stop; 16960 fn.call(elem, next, hooks); 16961 } 16962 16963 if (!startLength && hooks) { 16964 hooks.empty.fire(); 16965 } 16966 }, 16967 // Not public - generate a queueHooks object, or return the current one 16968 _queueHooks: function _queueHooks(elem, type) { 16969 var key = type + "queueHooks"; 16970 return dataPriv.get(elem, key) || dataPriv.access(elem, key, { 16971 empty: jQuery.Callbacks("once memory").add(function () { 16972 dataPriv.remove(elem, [type + "queue", key]); 16973 }) 16974 }); 16975 } 16976 }); 16977 jQuery.fn.extend({ 16978 queue: function queue(type, data) { 16979 var setter = 2; 16980 16981 if (typeof type !== "string") { 16982 data = type; 16983 type = "fx"; 16984 setter--; 16985 } 16986 16987 if (arguments.length < setter) { 16988 return jQuery.queue(this[0], type); 16989 } 16990 16991 return data === undefined ? this : this.each(function () { 16992 var queue = jQuery.queue(this, type, data); // Ensure a hooks for this queue 16993 16994 jQuery._queueHooks(this, type); 16995 16996 if (type === "fx" && queue[0] !== "inprogress") { 16997 jQuery.dequeue(this, type); 16998 } 16999 }); 17000 }, 17001 dequeue: function dequeue(type) { 17002 return this.each(function () { 17003 jQuery.dequeue(this, type); 17004 }); 17005 }, 17006 clearQueue: function clearQueue(type) { 17007 return this.queue(type || "fx", []); 17008 }, 17009 // Get a promise resolved when queues of a certain type 17010 // are emptied (fx is the type by default) 17011 promise: function promise(type, obj) { 17012 var tmp, 17013 count = 1, 17014 defer = jQuery.Deferred(), 17015 elements = this, 17016 i = this.length, 17017 resolve = function resolve() { 17018 if (! --count) { 17019 defer.resolveWith(elements, [elements]); 17020 } 17021 }; 17022 17023 if (typeof type !== "string") { 17024 obj = type; 17025 type = undefined; 17026 } 17027 17028 type = type || "fx"; 17029 17030 while (i--) { 17031 tmp = dataPriv.get(elements[i], type + "queueHooks"); 17032 17033 if (tmp && tmp.empty) { 17034 count++; 17035 tmp.empty.add(resolve); 17036 } 17037 } 17038 17039 resolve(); 17040 return defer.promise(obj); 17041 } 17042 }); 17043 var pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source; 17044 var rcssNum = new RegExp("^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i"); 17045 var cssExpand = ["Top", "Right", "Bottom", "Left"]; 17046 var documentElement = document.documentElement; 17047 17048 var isAttached = function isAttached(elem) { 17049 return jQuery.contains(elem.ownerDocument, elem); 17050 }, 17051 composed = { 17052 composed: true 17053 }; // Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only 17054 // Check attachment across shadow DOM boundaries when possible (gh-3504) 17055 // Support: iOS 10.0-10.2 only 17056 // Early iOS 10 versions support `attachShadow` but not `getRootNode`, 17057 // leading to errors. We need to check for `getRootNode`. 17058 17059 17060 if (documentElement.getRootNode) { 17061 isAttached = function isAttached(elem) { 17062 return jQuery.contains(elem.ownerDocument, elem) || elem.getRootNode(composed) === elem.ownerDocument; 17063 }; 17064 } 17065 17066 var isHiddenWithinTree = function isHiddenWithinTree(elem, el) { 17067 // isHiddenWithinTree might be called from jQuery#filter function; 17068 // in that case, element will be second argument 17069 elem = el || elem; // Inline style trumps all 17070 17071 return elem.style.display === "none" || elem.style.display === "" && // Otherwise, check computed style 17072 // Support: Firefox <=43 - 45 17073 // Disconnected elements can have computed display: none, so first confirm that elem is 17074 // in the document. 17075 isAttached(elem) && jQuery.css(elem, "display") === "none"; 17076 }; 17077 17078 var swap = function swap(elem, options, callback, args) { 17079 var ret, 17080 name, 17081 old = {}; // Remember the old values, and insert the new ones 17082 17083 for (name in options) { 17084 old[name] = elem.style[name]; 17085 elem.style[name] = options[name]; 17086 } 17087 17088 ret = callback.apply(elem, args || []); // Revert the old values 17089 17090 for (name in options) { 17091 elem.style[name] = old[name]; 17092 } 17093 17094 return ret; 17095 }; 17096 17097 function adjustCSS(elem, prop, valueParts, tween) { 17098 var adjusted, 17099 scale, 17100 maxIterations = 20, 17101 currentValue = tween ? function () { 17102 return tween.cur(); 17103 } : function () { 17104 return jQuery.css(elem, prop, ""); 17105 }, 17106 initial = currentValue(), 17107 unit = valueParts && valueParts[3] || (jQuery.cssNumber[prop] ? "" : "px"), 17108 // Starting value computation is required for potential unit mismatches 17109 initialInUnit = elem.nodeType && (jQuery.cssNumber[prop] || unit !== "px" && +initial) && rcssNum.exec(jQuery.css(elem, prop)); 17110 17111 if (initialInUnit && initialInUnit[3] !== unit) { 17112 // Support: Firefox <=54 17113 // Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144) 17114 initial = initial / 2; // Trust units reported by jQuery.css 17115 17116 unit = unit || initialInUnit[3]; // Iteratively approximate from a nonzero starting point 17117 17118 initialInUnit = +initial || 1; 17119 17120 while (maxIterations--) { 17121 // Evaluate and update our best guess (doubling guesses that zero out). 17122 // Finish if the scale equals or crosses 1 (making the old*new product non-positive). 17123 jQuery.style(elem, prop, initialInUnit + unit); 17124 17125 if ((1 - scale) * (1 - (scale = currentValue() / initial || 0.5)) <= 0) { 17126 maxIterations = 0; 17127 } 17128 17129 initialInUnit = initialInUnit / scale; 17130 } 17131 17132 initialInUnit = initialInUnit * 2; 17133 jQuery.style(elem, prop, initialInUnit + unit); // Make sure we update the tween properties later on 17134 17135 valueParts = valueParts || []; 17136 } 17137 17138 if (valueParts) { 17139 initialInUnit = +initialInUnit || +initial || 0; // Apply relative offset (+=/-=) if specified 17140 17141 adjusted = valueParts[1] ? initialInUnit + (valueParts[1] + 1) * valueParts[2] : +valueParts[2]; 17142 17143 if (tween) { 17144 tween.unit = unit; 17145 tween.start = initialInUnit; 17146 tween.end = adjusted; 17147 } 17148 } 17149 17150 return adjusted; 17151 } 17152 17153 var defaultDisplayMap = {}; 17154 17155 function getDefaultDisplay(elem) { 17156 var temp, 17157 doc = elem.ownerDocument, 17158 nodeName = elem.nodeName, 17159 display = defaultDisplayMap[nodeName]; 17160 17161 if (display) { 17162 return display; 17163 } 17164 17165 temp = doc.body.appendChild(doc.createElement(nodeName)); 17166 display = jQuery.css(temp, "display"); 17167 temp.parentNode.removeChild(temp); 17168 17169 if (display === "none") { 17170 display = "block"; 17171 } 17172 17173 defaultDisplayMap[nodeName] = display; 17174 return display; 17175 } 17176 17177 function showHide(elements, show) { 17178 var display, 17179 elem, 17180 values = [], 17181 index = 0, 17182 length = elements.length; // Determine new display value for elements that need to change 17183 17184 for (; index < length; index++) { 17185 elem = elements[index]; 17186 17187 if (!elem.style) { 17188 continue; 17189 } 17190 17191 display = elem.style.display; 17192 17193 if (show) { 17194 // Since we force visibility upon cascade-hidden elements, an immediate (and slow) 17195 // check is required in this first loop unless we have a nonempty display value (either 17196 // inline or about-to-be-restored) 17197 if (display === "none") { 17198 values[index] = dataPriv.get(elem, "display") || null; 17199 17200 if (!values[index]) { 17201 elem.style.display = ""; 17202 } 17203 } 17204 17205 if (elem.style.display === "" && isHiddenWithinTree(elem)) { 17206 values[index] = getDefaultDisplay(elem); 17207 } 17208 } else { 17209 if (display !== "none") { 17210 values[index] = "none"; // Remember what we're overwriting 17211 17212 dataPriv.set(elem, "display", display); 17213 } 17214 } 17215 } // Set the display of the elements in a second loop to avoid constant reflow 17216 17217 17218 for (index = 0; index < length; index++) { 17219 if (values[index] != null) { 17220 elements[index].style.display = values[index]; 17221 } 17222 } 17223 17224 return elements; 17225 } 17226 17227 jQuery.fn.extend({ 17228 show: function show() { 17229 return showHide(this, true); 17230 }, 17231 hide: function hide() { 17232 return showHide(this); 17233 }, 17234 toggle: function toggle(state) { 17235 if (typeof state === "boolean") { 17236 return state ? this.show() : this.hide(); 17237 } 17238 17239 return this.each(function () { 17240 if (isHiddenWithinTree(this)) { 17241 jQuery(this).show(); 17242 } else { 17243 jQuery(this).hide(); 17244 } 17245 }); 17246 } 17247 }); 17248 var rcheckableType = /^(?:checkbox|radio)$/i; 17249 var rtagName = /<([a-z][^\/\0>\x20\t\r\n\f]*)/i; 17250 var rscriptType = /^$|^module$|\/(?:java|ecma)script/i; // We have to close these tags to support XHTML (#13200) 17251 17252 var wrapMap = { 17253 // Support: IE <=9 only 17254 option: [1, "<select multiple='multiple'>", "</select>"], 17255 // XHTML parsers do not magically insert elements in the 17256 // same way that tag soup parsers do. So we cannot shorten 17257 // this by omitting <tbody> or other required elements. 17258 thead: [1, "<table>", "</table>"], 17259 col: [2, "<table><colgroup>", "</colgroup></table>"], 17260 tr: [2, "<table><tbody>", "</tbody></table>"], 17261 td: [3, "<table><tbody><tr>", "</tr></tbody></table>"], 17262 _default: [0, "", ""] 17263 }; // Support: IE <=9 only 17264 17265 wrapMap.optgroup = wrapMap.option; 17266 wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; 17267 wrapMap.th = wrapMap.td; 17268 17269 function getAll(context, tag) { 17270 // Support: IE <=9 - 11 only 17271 // Use typeof to avoid zero-argument method invocation on host objects (#15151) 17272 var ret; 17273 17274 if (typeof context.getElementsByTagName !== "undefined") { 17275 ret = context.getElementsByTagName(tag || "*"); 17276 } else if (typeof context.querySelectorAll !== "undefined") { 17277 ret = context.querySelectorAll(tag || "*"); 17278 } else { 17279 ret = []; 17280 } 17281 17282 if (tag === undefined || tag && nodeName(context, tag)) { 17283 return jQuery.merge([context], ret); 17284 } 17285 17286 return ret; 17287 } // Mark scripts as having already been evaluated 17288 17289 17290 function setGlobalEval(elems, refElements) { 17291 var i = 0, 17292 l = elems.length; 17293 17294 for (; i < l; i++) { 17295 dataPriv.set(elems[i], "globalEval", !refElements || dataPriv.get(refElements[i], "globalEval")); 17296 } 17297 } 17298 17299 var rhtml = /<|&#?\w+;/; 17300 17301 function buildFragment(elems, context, scripts, selection, ignored) { 17302 var elem, 17303 tmp, 17304 tag, 17305 wrap, 17306 attached, 17307 j, 17308 fragment = context.createDocumentFragment(), 17309 nodes = [], 17310 i = 0, 17311 l = elems.length; 17312 17313 for (; i < l; i++) { 17314 elem = elems[i]; 17315 17316 if (elem || elem === 0) { 17317 // Add nodes directly 17318 if (toType(elem) === "object") { 17319 // Support: Android <=4.0 only, PhantomJS 1 only 17320 // push.apply(_, arraylike) throws on ancient WebKit 17321 jQuery.merge(nodes, elem.nodeType ? [elem] : elem); // Convert non-html into a text node 17322 } else if (!rhtml.test(elem)) { 17323 nodes.push(context.createTextNode(elem)); // Convert html into DOM nodes 17324 } else { 17325 tmp = tmp || fragment.appendChild(context.createElement("div")); // Deserialize a standard representation 17326 17327 tag = (rtagName.exec(elem) || ["", ""])[1].toLowerCase(); 17328 wrap = wrapMap[tag] || wrapMap._default; 17329 tmp.innerHTML = wrap[1] + jQuery.htmlPrefilter(elem) + wrap[2]; // Descend through wrappers to the right content 17330 17331 j = wrap[0]; 17332 17333 while (j--) { 17334 tmp = tmp.lastChild; 17335 } // Support: Android <=4.0 only, PhantomJS 1 only 17336 // push.apply(_, arraylike) throws on ancient WebKit 17337 17338 17339 jQuery.merge(nodes, tmp.childNodes); // Remember the top-level container 17340 17341 tmp = fragment.firstChild; // Ensure the created nodes are orphaned (#12392) 17342 17343 tmp.textContent = ""; 17344 } 17345 } 17346 } // Remove wrapper from fragment 17347 17348 17349 fragment.textContent = ""; 17350 i = 0; 17351 17352 while (elem = nodes[i++]) { 17353 // Skip elements already in the context collection (trac-4087) 17354 if (selection && jQuery.inArray(elem, selection) > -1) { 17355 if (ignored) { 17356 ignored.push(elem); 17357 } 17358 17359 continue; 17360 } 17361 17362 attached = isAttached(elem); // Append to fragment 17363 17364 tmp = getAll(fragment.appendChild(elem), "script"); // Preserve script evaluation history 17365 17366 if (attached) { 17367 setGlobalEval(tmp); 17368 } // Capture executables 17369 17370 17371 if (scripts) { 17372 j = 0; 17373 17374 while (elem = tmp[j++]) { 17375 if (rscriptType.test(elem.type || "")) { 17376 scripts.push(elem); 17377 } 17378 } 17379 } 17380 } 17381 17382 return fragment; 17383 } 17384 17385 (function () { 17386 var fragment = document.createDocumentFragment(), 17387 div = fragment.appendChild(document.createElement("div")), 17388 input = document.createElement("input"); // Support: Android 4.0 - 4.3 only 17389 // Check state lost if the name is set (#11217) 17390 // Support: Windows Web Apps (WWA) 17391 // `name` and `type` must use .setAttribute for WWA (#14901) 17392 17393 input.setAttribute("type", "radio"); 17394 input.setAttribute("checked", "checked"); 17395 input.setAttribute("name", "t"); 17396 div.appendChild(input); // Support: Android <=4.1 only 17397 // Older WebKit doesn't clone checked state correctly in fragments 17398 17399 support.checkClone = div.cloneNode(true).cloneNode(true).lastChild.checked; // Support: IE <=11 only 17400 // Make sure textarea (and checkbox) defaultValue is properly cloned 17401 17402 div.innerHTML = "<textarea>x</textarea>"; 17403 support.noCloneChecked = !!div.cloneNode(true).lastChild.defaultValue; 17404 })(); 17405 17406 var rkeyEvent = /^key/, 17407 rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, 17408 rtypenamespace = /^([^.]*)(?:\.(.+)|)/; 17409 17410 function returnTrue() { 17411 return true; 17412 } 17413 17414 function returnFalse() { 17415 return false; 17416 } // Support: IE <=9 - 11+ 17417 // focus() and blur() are asynchronous, except when they are no-op. 17418 // So expect focus to be synchronous when the element is already active, 17419 // and blur to be synchronous when the element is not already active. 17420 // (focus and blur are always synchronous in other supported browsers, 17421 // this just defines when we can count on it). 17422 17423 17424 function expectSync(elem, type) { 17425 return elem === safeActiveElement() === (type === "focus"); 17426 } // Support: IE <=9 only 17427 // Accessing document.activeElement can throw unexpectedly 17428 // https://bugs.jquery.com/ticket/13393 17429 17430 17431 function safeActiveElement() { 17432 try { 17433 return document.activeElement; 17434 } catch (err) {} 17435 } 17436 17437 function _on(elem, types, selector, data, fn, one) { 17438 var origFn, type; // Types can be a map of types/handlers 17439 17440 if (_typeof(types) === "object") { 17441 // ( types-Object, selector, data ) 17442 if (typeof selector !== "string") { 17443 // ( types-Object, data ) 17444 data = data || selector; 17445 selector = undefined; 17446 } 17447 17448 for (type in types) { 17449 _on(elem, type, selector, data, types[type], one); 17450 } 17451 17452 return elem; 17453 } 17454 17455 if (data == null && fn == null) { 17456 // ( types, fn ) 17457 fn = selector; 17458 data = selector = undefined; 17459 } else if (fn == null) { 17460 if (typeof selector === "string") { 17461 // ( types, selector, fn ) 17462 fn = data; 17463 data = undefined; 17464 } else { 17465 // ( types, data, fn ) 17466 fn = data; 17467 data = selector; 17468 selector = undefined; 17469 } 17470 } 17471 17472 if (fn === false) { 17473 fn = returnFalse; 17474 } else if (!fn) { 17475 return elem; 17476 } 17477 17478 if (one === 1) { 17479 origFn = fn; 17480 17481 fn = function fn(event) { 17482 // Can use an empty set, since event contains the info 17483 jQuery().off(event); 17484 return origFn.apply(this, arguments); 17485 }; // Use same guid so caller can remove using origFn 17486 17487 17488 fn.guid = origFn.guid || (origFn.guid = jQuery.guid++); 17489 } 17490 17491 return elem.each(function () { 17492 jQuery.event.add(this, types, fn, data, selector); 17493 }); 17494 } 17495 /* 17496 * Helper functions for managing events -- not part of the public interface. 17497 * Props to Dean Edwards' addEvent library for many of the ideas. 17498 */ 17499 17500 17501 jQuery.event = { 17502 global: {}, 17503 add: function add(elem, types, handler, data, selector) { 17504 var handleObjIn, 17505 eventHandle, 17506 tmp, 17507 events, 17508 t, 17509 handleObj, 17510 special, 17511 handlers, 17512 type, 17513 namespaces, 17514 origType, 17515 elemData = dataPriv.get(elem); // Don't attach events to noData or text/comment nodes (but allow plain objects) 17516 17517 if (!elemData) { 17518 return; 17519 } // Caller can pass in an object of custom data in lieu of the handler 17520 17521 17522 if (handler.handler) { 17523 handleObjIn = handler; 17524 handler = handleObjIn.handler; 17525 selector = handleObjIn.selector; 17526 } // Ensure that invalid selectors throw exceptions at attach time 17527 // Evaluate against documentElement in case elem is a non-element node (e.g., document) 17528 17529 17530 if (selector) { 17531 jQuery.find.matchesSelector(documentElement, selector); 17532 } // Make sure that the handler has a unique ID, used to find/remove it later 17533 17534 17535 if (!handler.guid) { 17536 handler.guid = jQuery.guid++; 17537 } // Init the element's event structure and main handler, if this is the first 17538 17539 17540 if (!(events = elemData.events)) { 17541 events = elemData.events = {}; 17542 } 17543 17544 if (!(eventHandle = elemData.handle)) { 17545 eventHandle = elemData.handle = function (e) { 17546 // Discard the second event of a jQuery.event.trigger() and 17547 // when an event is called after a page has unloaded 17548 return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? jQuery.event.dispatch.apply(elem, arguments) : undefined; 17549 }; 17550 } // Handle multiple events separated by a space 17551 17552 17553 types = (types || "").match(rnothtmlwhite) || [""]; 17554 t = types.length; 17555 17556 while (t--) { 17557 tmp = rtypenamespace.exec(types[t]) || []; 17558 type = origType = tmp[1]; 17559 namespaces = (tmp[2] || "").split(".").sort(); // There *must* be a type, no attaching namespace-only handlers 17560 17561 if (!type) { 17562 continue; 17563 } // If event changes its type, use the special event handlers for the changed type 17564 17565 17566 special = jQuery.event.special[type] || {}; // If selector defined, determine special event api type, otherwise given type 17567 17568 type = (selector ? special.delegateType : special.bindType) || type; // Update special based on newly reset type 17569 17570 special = jQuery.event.special[type] || {}; // handleObj is passed to all event handlers 17571 17572 handleObj = jQuery.extend({ 17573 type: type, 17574 origType: origType, 17575 data: data, 17576 handler: handler, 17577 guid: handler.guid, 17578 selector: selector, 17579 needsContext: selector && jQuery.expr.match.needsContext.test(selector), 17580 namespace: namespaces.join(".") 17581 }, handleObjIn); // Init the event handler queue if we're the first 17582 17583 if (!(handlers = events[type])) { 17584 handlers = events[type] = []; 17585 handlers.delegateCount = 0; // Only use addEventListener if the special events handler returns false 17586 17587 if (!special.setup || special.setup.call(elem, data, namespaces, eventHandle) === false) { 17588 if (elem.addEventListener) { 17589 elem.addEventListener(type, eventHandle); 17590 } 17591 } 17592 } 17593 17594 if (special.add) { 17595 special.add.call(elem, handleObj); 17596 17597 if (!handleObj.handler.guid) { 17598 handleObj.handler.guid = handler.guid; 17599 } 17600 } // Add to the element's handler list, delegates in front 17601 17602 17603 if (selector) { 17604 handlers.splice(handlers.delegateCount++, 0, handleObj); 17605 } else { 17606 handlers.push(handleObj); 17607 } // Keep track of which events have ever been used, for event optimization 17608 17609 17610 jQuery.event.global[type] = true; 17611 } 17612 }, 17613 // Detach an event or set of events from an element 17614 remove: function remove(elem, types, handler, selector, mappedTypes) { 17615 var j, 17616 origCount, 17617 tmp, 17618 events, 17619 t, 17620 handleObj, 17621 special, 17622 handlers, 17623 type, 17624 namespaces, 17625 origType, 17626 elemData = dataPriv.hasData(elem) && dataPriv.get(elem); 17627 17628 if (!elemData || !(events = elemData.events)) { 17629 return; 17630 } // Once for each type.namespace in types; type may be omitted 17631 17632 17633 types = (types || "").match(rnothtmlwhite) || [""]; 17634 t = types.length; 17635 17636 while (t--) { 17637 tmp = rtypenamespace.exec(types[t]) || []; 17638 type = origType = tmp[1]; 17639 namespaces = (tmp[2] || "").split(".").sort(); // Unbind all events (on this namespace, if provided) for the element 17640 17641 if (!type) { 17642 for (type in events) { 17643 jQuery.event.remove(elem, type + types[t], handler, selector, true); 17644 } 17645 17646 continue; 17647 } 17648 17649 special = jQuery.event.special[type] || {}; 17650 type = (selector ? special.delegateType : special.bindType) || type; 17651 handlers = events[type] || []; 17652 tmp = tmp[2] && new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)"); // Remove matching events 17653 17654 origCount = j = handlers.length; 17655 17656 while (j--) { 17657 handleObj = handlers[j]; 17658 17659 if ((mappedTypes || origType === handleObj.origType) && (!handler || handler.guid === handleObj.guid) && (!tmp || tmp.test(handleObj.namespace)) && (!selector || selector === handleObj.selector || selector === "**" && handleObj.selector)) { 17660 handlers.splice(j, 1); 17661 17662 if (handleObj.selector) { 17663 handlers.delegateCount--; 17664 } 17665 17666 if (special.remove) { 17667 special.remove.call(elem, handleObj); 17668 } 17669 } 17670 } // Remove generic event handler if we removed something and no more handlers exist 17671 // (avoids potential for endless recursion during removal of special event handlers) 17672 17673 17674 if (origCount && !handlers.length) { 17675 if (!special.teardown || special.teardown.call(elem, namespaces, elemData.handle) === false) { 17676 jQuery.removeEvent(elem, type, elemData.handle); 17677 } 17678 17679 delete events[type]; 17680 } 17681 } // Remove data and the expando if it's no longer used 17682 17683 17684 if (jQuery.isEmptyObject(events)) { 17685 dataPriv.remove(elem, "handle events"); 17686 } 17687 }, 17688 dispatch: function dispatch(nativeEvent) { 17689 // Make a writable jQuery.Event from the native event object 17690 var event = jQuery.event.fix(nativeEvent); 17691 var i, 17692 j, 17693 ret, 17694 matched, 17695 handleObj, 17696 handlerQueue, 17697 args = new Array(arguments.length), 17698 handlers = (dataPriv.get(this, "events") || {})[event.type] || [], 17699 special = jQuery.event.special[event.type] || {}; // Use the fix-ed jQuery.Event rather than the (read-only) native event 17700 17701 args[0] = event; 17702 17703 for (i = 1; i < arguments.length; i++) { 17704 args[i] = arguments[i]; 17705 } 17706 17707 event.delegateTarget = this; // Call the preDispatch hook for the mapped type, and let it bail if desired 17708 17709 if (special.preDispatch && special.preDispatch.call(this, event) === false) { 17710 return; 17711 } // Determine handlers 17712 17713 17714 handlerQueue = jQuery.event.handlers.call(this, event, handlers); // Run delegates first; they may want to stop propagation beneath us 17715 17716 i = 0; 17717 17718 while ((matched = handlerQueue[i++]) && !event.isPropagationStopped()) { 17719 event.currentTarget = matched.elem; 17720 j = 0; 17721 17722 while ((handleObj = matched.handlers[j++]) && !event.isImmediatePropagationStopped()) { 17723 // If the event is namespaced, then each handler is only invoked if it is 17724 // specially universal or its namespaces are a superset of the event's. 17725 if (!event.rnamespace || handleObj.namespace === false || event.rnamespace.test(handleObj.namespace)) { 17726 event.handleObj = handleObj; 17727 event.data = handleObj.data; 17728 ret = ((jQuery.event.special[handleObj.origType] || {}).handle || handleObj.handler).apply(matched.elem, args); 17729 17730 if (ret !== undefined) { 17731 if ((event.result = ret) === false) { 17732 event.preventDefault(); 17733 event.stopPropagation(); 17734 } 17735 } 17736 } 17737 } 17738 } // Call the postDispatch hook for the mapped type 17739 17740 17741 if (special.postDispatch) { 17742 special.postDispatch.call(this, event); 17743 } 17744 17745 return event.result; 17746 }, 17747 handlers: function handlers(event, _handlers) { 17748 var i, 17749 handleObj, 17750 sel, 17751 matchedHandlers, 17752 matchedSelectors, 17753 handlerQueue = [], 17754 delegateCount = _handlers.delegateCount, 17755 cur = event.target; // Find delegate handlers 17756 17757 if (delegateCount && // Support: IE <=9 17758 // Black-hole SVG <use> instance trees (trac-13180) 17759 cur.nodeType && // Support: Firefox <=42 17760 // Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861) 17761 // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click 17762 // Support: IE 11 only 17763 // ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343) 17764 !(event.type === "click" && event.button >= 1)) { 17765 for (; cur !== this; cur = cur.parentNode || this) { 17766 // Don't check non-elements (#13208) 17767 // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) 17768 if (cur.nodeType === 1 && !(event.type === "click" && cur.disabled === true)) { 17769 matchedHandlers = []; 17770 matchedSelectors = {}; 17771 17772 for (i = 0; i < delegateCount; i++) { 17773 handleObj = _handlers[i]; // Don't conflict with Object.prototype properties (#13203) 17774 17775 sel = handleObj.selector + " "; 17776 17777 if (matchedSelectors[sel] === undefined) { 17778 matchedSelectors[sel] = handleObj.needsContext ? jQuery(sel, this).index(cur) > -1 : jQuery.find(sel, this, null, [cur]).length; 17779 } 17780 17781 if (matchedSelectors[sel]) { 17782 matchedHandlers.push(handleObj); 17783 } 17784 } 17785 17786 if (matchedHandlers.length) { 17787 handlerQueue.push({ 17788 elem: cur, 17789 handlers: matchedHandlers 17790 }); 17791 } 17792 } 17793 } 17794 } // Add the remaining (directly-bound) handlers 17795 17796 17797 cur = this; 17798 17799 if (delegateCount < _handlers.length) { 17800 handlerQueue.push({ 17801 elem: cur, 17802 handlers: _handlers.slice(delegateCount) 17803 }); 17804 } 17805 17806 return handlerQueue; 17807 }, 17808 addProp: function addProp(name, hook) { 17809 Object.defineProperty(jQuery.Event.prototype, name, { 17810 enumerable: true, 17811 configurable: true, 17812 get: isFunction(hook) ? function () { 17813 if (this.originalEvent) { 17814 return hook(this.originalEvent); 17815 } 17816 } : function () { 17817 if (this.originalEvent) { 17818 return this.originalEvent[name]; 17819 } 17820 }, 17821 set: function set(value) { 17822 Object.defineProperty(this, name, { 17823 enumerable: true, 17824 configurable: true, 17825 writable: true, 17826 value: value 17827 }); 17828 } 17829 }); 17830 }, 17831 fix: function fix(originalEvent) { 17832 return originalEvent[jQuery.expando] ? originalEvent : new jQuery.Event(originalEvent); 17833 }, 17834 special: { 17835 load: { 17836 // Prevent triggered image.load events from bubbling to window.load 17837 noBubble: true 17838 }, 17839 click: { 17840 // Utilize native event to ensure correct state for checkable inputs 17841 setup: function setup(data) { 17842 // For mutual compressibility with _default, replace `this` access with a local var. 17843 // `|| data` is dead code meant only to preserve the variable through minification. 17844 var el = this || data; // Claim the first handler 17845 17846 if (rcheckableType.test(el.type) && el.click && nodeName(el, "input")) { 17847 // dataPriv.set( el, "click", ... ) 17848 leverageNative(el, "click", returnTrue); 17849 } // Return false to allow normal processing in the caller 17850 17851 17852 return false; 17853 }, 17854 trigger: function trigger(data) { 17855 // For mutual compressibility with _default, replace `this` access with a local var. 17856 // `|| data` is dead code meant only to preserve the variable through minification. 17857 var el = this || data; // Force setup before triggering a click 17858 17859 if (rcheckableType.test(el.type) && el.click && nodeName(el, "input")) { 17860 leverageNative(el, "click"); 17861 } // Return non-false to allow normal event-path propagation 17862 17863 17864 return true; 17865 }, 17866 // For cross-browser consistency, suppress native .click() on links 17867 // Also prevent it if we're currently inside a leveraged native-event stack 17868 _default: function _default(event) { 17869 var target = event.target; 17870 return rcheckableType.test(target.type) && target.click && nodeName(target, "input") && dataPriv.get(target, "click") || nodeName(target, "a"); 17871 } 17872 }, 17873 beforeunload: { 17874 postDispatch: function postDispatch(event) { 17875 // Support: Firefox 20+ 17876 // Firefox doesn't alert if the returnValue field is not set. 17877 if (event.result !== undefined && event.originalEvent) { 17878 event.originalEvent.returnValue = event.result; 17879 } 17880 } 17881 } 17882 } 17883 }; // Ensure the presence of an event listener that handles manually-triggered 17884 // synthetic events by interrupting progress until reinvoked in response to 17885 // *native* events that it fires directly, ensuring that state changes have 17886 // already occurred before other listeners are invoked. 17887 17888 function leverageNative(el, type, expectSync) { 17889 // Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add 17890 if (!expectSync) { 17891 if (dataPriv.get(el, type) === undefined) { 17892 jQuery.event.add(el, type, returnTrue); 17893 } 17894 17895 return; 17896 } // Register the controller as a special universal handler for all event namespaces 17897 17898 17899 dataPriv.set(el, type, false); 17900 jQuery.event.add(el, type, { 17901 namespace: false, 17902 handler: function handler(event) { 17903 var notAsync, 17904 result, 17905 saved = dataPriv.get(this, type); 17906 17907 if (event.isTrigger & 1 && this[type]) { 17908 // Interrupt processing of the outer synthetic .trigger()ed event 17909 // Saved data should be false in such cases, but might be a leftover capture object 17910 // from an async native handler (gh-4350) 17911 if (!saved.length) { 17912 // Store arguments for use when handling the inner native event 17913 // There will always be at least one argument (an event object), so this array 17914 // will not be confused with a leftover capture object. 17915 saved = _slice.call(arguments); 17916 dataPriv.set(this, type, saved); // Trigger the native event and capture its result 17917 // Support: IE <=9 - 11+ 17918 // focus() and blur() are asynchronous 17919 17920 notAsync = expectSync(this, type); 17921 this[type](); 17922 result = dataPriv.get(this, type); 17923 17924 if (saved !== result || notAsync) { 17925 dataPriv.set(this, type, false); 17926 } else { 17927 result = {}; 17928 } 17929 17930 if (saved !== result) { 17931 // Cancel the outer synthetic event 17932 event.stopImmediatePropagation(); 17933 event.preventDefault(); 17934 return result.value; 17935 } // If this is an inner synthetic event for an event with a bubbling surrogate 17936 // (focus or blur), assume that the surrogate already propagated from triggering the 17937 // native event and prevent that from happening again here. 17938 // This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the 17939 // bubbling surrogate propagates *after* the non-bubbling base), but that seems 17940 // less bad than duplication. 17941 17942 } else if ((jQuery.event.special[type] || {}).delegateType) { 17943 event.stopPropagation(); 17944 } // If this is a native event triggered above, everything is now in order 17945 // Fire an inner synthetic event with the original arguments 17946 17947 } else if (saved.length) { 17948 // ...and capture the result 17949 dataPriv.set(this, type, { 17950 value: jQuery.event.trigger( // Support: IE <=9 - 11+ 17951 // Extend with the prototype to reset the above stopImmediatePropagation() 17952 jQuery.extend(saved[0], jQuery.Event.prototype), saved.slice(1), this) 17953 }); // Abort handling of the native event 17954 17955 event.stopImmediatePropagation(); 17956 } 17957 } 17958 }); 17959 } 17960 17961 jQuery.removeEvent = function (elem, type, handle) { 17962 // This "if" is needed for plain objects 17963 if (elem.removeEventListener) { 17964 elem.removeEventListener(type, handle); 17965 } 17966 }; 17967 17968 jQuery.Event = function (src, props) { 17969 // Allow instantiation without the 'new' keyword 17970 if (!(this instanceof jQuery.Event)) { 17971 return new jQuery.Event(src, props); 17972 } // Event object 17973 17974 17975 if (src && src.type) { 17976 this.originalEvent = src; 17977 this.type = src.type; // Events bubbling up the document may have been marked as prevented 17978 // by a handler lower down the tree; reflect the correct value. 17979 17980 this.isDefaultPrevented = src.defaultPrevented || src.defaultPrevented === undefined && // Support: Android <=2.3 only 17981 src.returnValue === false ? returnTrue : returnFalse; // Create target properties 17982 // Support: Safari <=6 - 7 only 17983 // Target should not be a text node (#504, #13143) 17984 17985 this.target = src.target && src.target.nodeType === 3 ? src.target.parentNode : src.target; 17986 this.currentTarget = src.currentTarget; 17987 this.relatedTarget = src.relatedTarget; // Event type 17988 } else { 17989 this.type = src; 17990 } // Put explicitly provided properties onto the event object 17991 17992 17993 if (props) { 17994 jQuery.extend(this, props); 17995 } // Create a timestamp if incoming event doesn't have one 17996 17997 17998 this.timeStamp = src && src.timeStamp || Date.now(); // Mark it as fixed 17999 18000 this[jQuery.expando] = true; 18001 }; // jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding 18002 // https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html 18003 18004 18005 jQuery.Event.prototype = { 18006 constructor: jQuery.Event, 18007 isDefaultPrevented: returnFalse, 18008 isPropagationStopped: returnFalse, 18009 isImmediatePropagationStopped: returnFalse, 18010 isSimulated: false, 18011 preventDefault: function preventDefault() { 18012 var e = this.originalEvent; 18013 this.isDefaultPrevented = returnTrue; 18014 18015 if (e && !this.isSimulated) { 18016 e.preventDefault(); 18017 } 18018 }, 18019 stopPropagation: function stopPropagation() { 18020 var e = this.originalEvent; 18021 this.isPropagationStopped = returnTrue; 18022 18023 if (e && !this.isSimulated) { 18024 e.stopPropagation(); 18025 } 18026 }, 18027 stopImmediatePropagation: function stopImmediatePropagation() { 18028 var e = this.originalEvent; 18029 this.isImmediatePropagationStopped = returnTrue; 18030 18031 if (e && !this.isSimulated) { 18032 e.stopImmediatePropagation(); 18033 } 18034 18035 this.stopPropagation(); 18036 } 18037 }; // Includes all common event props including KeyEvent and MouseEvent specific props 18038 18039 jQuery.each({ 18040 altKey: true, 18041 bubbles: true, 18042 cancelable: true, 18043 changedTouches: true, 18044 ctrlKey: true, 18045 detail: true, 18046 eventPhase: true, 18047 metaKey: true, 18048 pageX: true, 18049 pageY: true, 18050 shiftKey: true, 18051 view: true, 18052 "char": true, 18053 code: true, 18054 charCode: true, 18055 key: true, 18056 keyCode: true, 18057 button: true, 18058 buttons: true, 18059 clientX: true, 18060 clientY: true, 18061 offsetX: true, 18062 offsetY: true, 18063 pointerId: true, 18064 pointerType: true, 18065 screenX: true, 18066 screenY: true, 18067 targetTouches: true, 18068 toElement: true, 18069 touches: true, 18070 which: function which(event) { 18071 var button = event.button; // Add which for key events 18072 18073 if (event.which == null && rkeyEvent.test(event.type)) { 18074 return event.charCode != null ? event.charCode : event.keyCode; 18075 } // Add which for click: 1 === left; 2 === middle; 3 === right 18076 18077 18078 if (!event.which && button !== undefined && rmouseEvent.test(event.type)) { 18079 if (button & 1) { 18080 return 1; 18081 } 18082 18083 if (button & 2) { 18084 return 3; 18085 } 18086 18087 if (button & 4) { 18088 return 2; 18089 } 18090 18091 return 0; 18092 } 18093 18094 return event.which; 18095 } 18096 }, jQuery.event.addProp); 18097 jQuery.each({ 18098 focus: "focusin", 18099 blur: "focusout" 18100 }, function (type, delegateType) { 18101 jQuery.event.special[type] = { 18102 // Utilize native event if possible so blur/focus sequence is correct 18103 setup: function setup() { 18104 // Claim the first handler 18105 // dataPriv.set( this, "focus", ... ) 18106 // dataPriv.set( this, "blur", ... ) 18107 leverageNative(this, type, expectSync); // Return false to allow normal processing in the caller 18108 18109 return false; 18110 }, 18111 trigger: function trigger() { 18112 // Force setup before trigger 18113 leverageNative(this, type); // Return non-false to allow normal event-path propagation 18114 18115 return true; 18116 }, 18117 delegateType: delegateType 18118 }; 18119 }); // Create mouseenter/leave events using mouseover/out and event-time checks 18120 // so that event delegation works in jQuery. 18121 // Do the same for pointerenter/pointerleave and pointerover/pointerout 18122 // 18123 // Support: Safari 7 only 18124 // Safari sends mouseenter too often; see: 18125 // https://bugs.chromium.org/p/chromium/issues/detail?id=470258 18126 // for the description of the bug (it existed in older Chrome versions as well). 18127 18128 jQuery.each({ 18129 mouseenter: "mouseover", 18130 mouseleave: "mouseout", 18131 pointerenter: "pointerover", 18132 pointerleave: "pointerout" 18133 }, function (orig, fix) { 18134 jQuery.event.special[orig] = { 18135 delegateType: fix, 18136 bindType: fix, 18137 handle: function handle(event) { 18138 var ret, 18139 target = this, 18140 related = event.relatedTarget, 18141 handleObj = event.handleObj; // For mouseenter/leave call the handler if related is outside the target. 18142 // NB: No relatedTarget if the mouse left/entered the browser window 18143 18144 if (!related || related !== target && !jQuery.contains(target, related)) { 18145 event.type = handleObj.origType; 18146 ret = handleObj.handler.apply(this, arguments); 18147 event.type = fix; 18148 } 18149 18150 return ret; 18151 } 18152 }; 18153 }); 18154 jQuery.fn.extend({ 18155 on: function on(types, selector, data, fn) { 18156 return _on(this, types, selector, data, fn); 18157 }, 18158 one: function one(types, selector, data, fn) { 18159 return _on(this, types, selector, data, fn, 1); 18160 }, 18161 off: function off(types, selector, fn) { 18162 var handleObj, type; 18163 18164 if (types && types.preventDefault && types.handleObj) { 18165 // ( event ) dispatched jQuery.Event 18166 handleObj = types.handleObj; 18167 jQuery(types.delegateTarget).off(handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, handleObj.selector, handleObj.handler); 18168 return this; 18169 } 18170 18171 if (_typeof(types) === "object") { 18172 // ( types-object [, selector] ) 18173 for (type in types) { 18174 this.off(type, selector, types[type]); 18175 } 18176 18177 return this; 18178 } 18179 18180 if (selector === false || typeof selector === "function") { 18181 // ( types [, fn] ) 18182 fn = selector; 18183 selector = undefined; 18184 } 18185 18186 if (fn === false) { 18187 fn = returnFalse; 18188 } 18189 18190 return this.each(function () { 18191 jQuery.event.remove(this, types, fn, selector); 18192 }); 18193 } 18194 }); 18195 var 18196 /* eslint-disable max-len */ 18197 // See https://github.com/eslint/eslint/issues/3229 18198 rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi, 18199 18200 /* eslint-enable */ 18201 // Support: IE <=10 - 11, Edge 12 - 13 only 18202 // In IE/Edge using regex groups here causes severe slowdowns. 18203 // See https://connect.microsoft.com/IE/feedback/details/1736512/ 18204 rnoInnerhtml = /<script|<style|<link/i, 18205 // checked="checked" or checked 18206 rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, 18207 rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g; // Prefer a tbody over its parent table for containing new rows 18208 18209 function manipulationTarget(elem, content) { 18210 if (nodeName(elem, "table") && nodeName(content.nodeType !== 11 ? content : content.firstChild, "tr")) { 18211 return jQuery(elem).children("tbody")[0] || elem; 18212 } 18213 18214 return elem; 18215 } // Replace/restore the type attribute of script elements for safe DOM manipulation 18216 18217 18218 function disableScript(elem) { 18219 elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type; 18220 return elem; 18221 } 18222 18223 function restoreScript(elem) { 18224 if ((elem.type || "").slice(0, 5) === "true/") { 18225 elem.type = elem.type.slice(5); 18226 } else { 18227 elem.removeAttribute("type"); 18228 } 18229 18230 return elem; 18231 } 18232 18233 function cloneCopyEvent(src, dest) { 18234 var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events; 18235 18236 if (dest.nodeType !== 1) { 18237 return; 18238 } // 1. Copy private data: events, handlers, etc. 18239 18240 18241 if (dataPriv.hasData(src)) { 18242 pdataOld = dataPriv.access(src); 18243 pdataCur = dataPriv.set(dest, pdataOld); 18244 events = pdataOld.events; 18245 18246 if (events) { 18247 delete pdataCur.handle; 18248 pdataCur.events = {}; 18249 18250 for (type in events) { 18251 for (i = 0, l = events[type].length; i < l; i++) { 18252 jQuery.event.add(dest, type, events[type][i]); 18253 } 18254 } 18255 } 18256 } // 2. Copy user data 18257 18258 18259 if (dataUser.hasData(src)) { 18260 udataOld = dataUser.access(src); 18261 udataCur = jQuery.extend({}, udataOld); 18262 dataUser.set(dest, udataCur); 18263 } 18264 } // Fix IE bugs, see support tests 18265 18266 18267 function fixInput(src, dest) { 18268 var nodeName = dest.nodeName.toLowerCase(); // Fails to persist the checked state of a cloned checkbox or radio button. 18269 18270 if (nodeName === "input" && rcheckableType.test(src.type)) { 18271 dest.checked = src.checked; // Fails to return the selected option to the default selected state when cloning options 18272 } else if (nodeName === "input" || nodeName === "textarea") { 18273 dest.defaultValue = src.defaultValue; 18274 } 18275 } 18276 18277 function domManip(collection, args, callback, ignored) { 18278 // Flatten any nested arrays 18279 args = concat.apply([], args); 18280 var fragment, 18281 first, 18282 scripts, 18283 hasScripts, 18284 node, 18285 doc, 18286 i = 0, 18287 l = collection.length, 18288 iNoClone = l - 1, 18289 value = args[0], 18290 valueIsFunction = isFunction(value); // We can't cloneNode fragments that contain checked, in WebKit 18291 18292 if (valueIsFunction || l > 1 && typeof value === "string" && !support.checkClone && rchecked.test(value)) { 18293 return collection.each(function (index) { 18294 var self = collection.eq(index); 18295 18296 if (valueIsFunction) { 18297 args[0] = value.call(this, index, self.html()); 18298 } 18299 18300 domManip(self, args, callback, ignored); 18301 }); 18302 } 18303 18304 if (l) { 18305 fragment = buildFragment(args, collection[0].ownerDocument, false, collection, ignored); 18306 first = fragment.firstChild; 18307 18308 if (fragment.childNodes.length === 1) { 18309 fragment = first; 18310 } // Require either new content or an interest in ignored elements to invoke the callback 18311 18312 18313 if (first || ignored) { 18314 scripts = jQuery.map(getAll(fragment, "script"), disableScript); 18315 hasScripts = scripts.length; // Use the original fragment for the last item 18316 // instead of the first because it can end up 18317 // being emptied incorrectly in certain situations (#8070). 18318 18319 for (; i < l; i++) { 18320 node = fragment; 18321 18322 if (i !== iNoClone) { 18323 node = jQuery.clone(node, true, true); // Keep references to cloned scripts for later restoration 18324 18325 if (hasScripts) { 18326 // Support: Android <=4.0 only, PhantomJS 1 only 18327 // push.apply(_, arraylike) throws on ancient WebKit 18328 jQuery.merge(scripts, getAll(node, "script")); 18329 } 18330 } 18331 18332 callback.call(collection[i], node, i); 18333 } 18334 18335 if (hasScripts) { 18336 doc = scripts[scripts.length - 1].ownerDocument; // Reenable scripts 18337 18338 jQuery.map(scripts, restoreScript); // Evaluate executable scripts on first document insertion 18339 18340 for (i = 0; i < hasScripts; i++) { 18341 node = scripts[i]; 18342 18343 if (rscriptType.test(node.type || "") && !dataPriv.access(node, "globalEval") && jQuery.contains(doc, node)) { 18344 if (node.src && (node.type || "").toLowerCase() !== "module") { 18345 // Optional AJAX dependency, but won't run scripts if not present 18346 if (jQuery._evalUrl && !node.noModule) { 18347 jQuery._evalUrl(node.src, { 18348 nonce: node.nonce || node.getAttribute("nonce") 18349 }); 18350 } 18351 } else { 18352 DOMEval(node.textContent.replace(rcleanScript, ""), node, doc); 18353 } 18354 } 18355 } 18356 } 18357 } 18358 } 18359 18360 return collection; 18361 } 18362 18363 function _remove(elem, selector, keepData) { 18364 var node, 18365 nodes = selector ? jQuery.filter(selector, elem) : elem, 18366 i = 0; 18367 18368 for (; (node = nodes[i]) != null; i++) { 18369 if (!keepData && node.nodeType === 1) { 18370 jQuery.cleanData(getAll(node)); 18371 } 18372 18373 if (node.parentNode) { 18374 if (keepData && isAttached(node)) { 18375 setGlobalEval(getAll(node, "script")); 18376 } 18377 18378 node.parentNode.removeChild(node); 18379 } 18380 } 18381 18382 return elem; 18383 } 18384 18385 jQuery.extend({ 18386 htmlPrefilter: function htmlPrefilter(html) { 18387 return html.replace(rxhtmlTag, "<$1></$2>"); 18388 }, 18389 clone: function clone(elem, dataAndEvents, deepDataAndEvents) { 18390 var i, 18391 l, 18392 srcElements, 18393 destElements, 18394 clone = elem.cloneNode(true), 18395 inPage = isAttached(elem); // Fix IE cloning issues 18396 18397 if (!support.noCloneChecked && (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem)) { 18398 // We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2 18399 destElements = getAll(clone); 18400 srcElements = getAll(elem); 18401 18402 for (i = 0, l = srcElements.length; i < l; i++) { 18403 fixInput(srcElements[i], destElements[i]); 18404 } 18405 } // Copy the events from the original to the clone 18406 18407 18408 if (dataAndEvents) { 18409 if (deepDataAndEvents) { 18410 srcElements = srcElements || getAll(elem); 18411 destElements = destElements || getAll(clone); 18412 18413 for (i = 0, l = srcElements.length; i < l; i++) { 18414 cloneCopyEvent(srcElements[i], destElements[i]); 18415 } 18416 } else { 18417 cloneCopyEvent(elem, clone); 18418 } 18419 } // Preserve script evaluation history 18420 18421 18422 destElements = getAll(clone, "script"); 18423 18424 if (destElements.length > 0) { 18425 setGlobalEval(destElements, !inPage && getAll(elem, "script")); 18426 } // Return the cloned set 18427 18428 18429 return clone; 18430 }, 18431 cleanData: function cleanData(elems) { 18432 var data, 18433 elem, 18434 type, 18435 special = jQuery.event.special, 18436 i = 0; 18437 18438 for (; (elem = elems[i]) !== undefined; i++) { 18439 if (acceptData(elem)) { 18440 if (data = elem[dataPriv.expando]) { 18441 if (data.events) { 18442 for (type in data.events) { 18443 if (special[type]) { 18444 jQuery.event.remove(elem, type); // This is a shortcut to avoid jQuery.event.remove's overhead 18445 } else { 18446 jQuery.removeEvent(elem, type, data.handle); 18447 } 18448 } 18449 } // Support: Chrome <=35 - 45+ 18450 // Assign undefined instead of using delete, see Data#remove 18451 18452 18453 elem[dataPriv.expando] = undefined; 18454 } 18455 18456 if (elem[dataUser.expando]) { 18457 // Support: Chrome <=35 - 45+ 18458 // Assign undefined instead of using delete, see Data#remove 18459 elem[dataUser.expando] = undefined; 18460 } 18461 } 18462 } 18463 } 18464 }); 18465 jQuery.fn.extend({ 18466 detach: function detach(selector) { 18467 return _remove(this, selector, true); 18468 }, 18469 remove: function remove(selector) { 18470 return _remove(this, selector); 18471 }, 18472 text: function text(value) { 18473 return access(this, function (value) { 18474 return value === undefined ? jQuery.text(this) : this.empty().each(function () { 18475 if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) { 18476 this.textContent = value; 18477 } 18478 }); 18479 }, null, value, arguments.length); 18480 }, 18481 append: function append() { 18482 return domManip(this, arguments, function (elem) { 18483 if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) { 18484 var target = manipulationTarget(this, elem); 18485 target.appendChild(elem); 18486 } 18487 }); 18488 }, 18489 prepend: function prepend() { 18490 return domManip(this, arguments, function (elem) { 18491 if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) { 18492 var target = manipulationTarget(this, elem); 18493 target.insertBefore(elem, target.firstChild); 18494 } 18495 }); 18496 }, 18497 before: function before() { 18498 return domManip(this, arguments, function (elem) { 18499 if (this.parentNode) { 18500 this.parentNode.insertBefore(elem, this); 18501 } 18502 }); 18503 }, 18504 after: function after() { 18505 return domManip(this, arguments, function (elem) { 18506 if (this.parentNode) { 18507 this.parentNode.insertBefore(elem, this.nextSibling); 18508 } 18509 }); 18510 }, 18511 empty: function empty() { 18512 var elem, 18513 i = 0; 18514 18515 for (; (elem = this[i]) != null; i++) { 18516 if (elem.nodeType === 1) { 18517 // Prevent memory leaks 18518 jQuery.cleanData(getAll(elem, false)); // Remove any remaining nodes 18519 18520 elem.textContent = ""; 18521 } 18522 } 18523 18524 return this; 18525 }, 18526 clone: function clone(dataAndEvents, deepDataAndEvents) { 18527 dataAndEvents = dataAndEvents == null ? false : dataAndEvents; 18528 deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; 18529 return this.map(function () { 18530 return jQuery.clone(this, dataAndEvents, deepDataAndEvents); 18531 }); 18532 }, 18533 html: function html(value) { 18534 return access(this, function (value) { 18535 var elem = this[0] || {}, 18536 i = 0, 18537 l = this.length; 18538 18539 if (value === undefined && elem.nodeType === 1) { 18540 return elem.innerHTML; 18541 } // See if we can take a shortcut and just use innerHTML 18542 18543 18544 if (typeof value === "string" && !rnoInnerhtml.test(value) && !wrapMap[(rtagName.exec(value) || ["", ""])[1].toLowerCase()]) { 18545 value = jQuery.htmlPrefilter(value); 18546 18547 try { 18548 for (; i < l; i++) { 18549 elem = this[i] || {}; // Remove element nodes and prevent memory leaks 18550 18551 if (elem.nodeType === 1) { 18552 jQuery.cleanData(getAll(elem, false)); 18553 elem.innerHTML = value; 18554 } 18555 } 18556 18557 elem = 0; // If using innerHTML throws an exception, use the fallback method 18558 } catch (e) {} 18559 } 18560 18561 if (elem) { 18562 this.empty().append(value); 18563 } 18564 }, null, value, arguments.length); 18565 }, 18566 replaceWith: function replaceWith() { 18567 var ignored = []; // Make the changes, replacing each non-ignored context element with the new content 18568 18569 return domManip(this, arguments, function (elem) { 18570 var parent = this.parentNode; 18571 18572 if (jQuery.inArray(this, ignored) < 0) { 18573 jQuery.cleanData(getAll(this)); 18574 18575 if (parent) { 18576 parent.replaceChild(elem, this); 18577 } 18578 } // Force callback invocation 18579 18580 }, ignored); 18581 } 18582 }); 18583 jQuery.each({ 18584 appendTo: "append", 18585 prependTo: "prepend", 18586 insertBefore: "before", 18587 insertAfter: "after", 18588 replaceAll: "replaceWith" 18589 }, function (name, original) { 18590 jQuery.fn[name] = function (selector) { 18591 var elems, 18592 ret = [], 18593 insert = jQuery(selector), 18594 last = insert.length - 1, 18595 i = 0; 18596 18597 for (; i <= last; i++) { 18598 elems = i === last ? this : this.clone(true); 18599 jQuery(insert[i])[original](elems); // Support: Android <=4.0 only, PhantomJS 1 only 18600 // .get() because push.apply(_, arraylike) throws on ancient WebKit 18601 18602 push.apply(ret, elems.get()); 18603 } 18604 18605 return this.pushStack(ret); 18606 }; 18607 }); 18608 var rnumnonpx = new RegExp("^(" + pnum + ")(?!px)[a-z%]+$", "i"); 18609 18610 var getStyles = function getStyles(elem) { 18611 // Support: IE <=11 only, Firefox <=30 (#15098, #14150) 18612 // IE throws on elements created in popups 18613 // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" 18614 var view = elem.ownerDocument.defaultView; 18615 18616 if (!view || !view.opener) { 18617 view = window; 18618 } 18619 18620 return view.getComputedStyle(elem); 18621 }; 18622 18623 var rboxStyle = new RegExp(cssExpand.join("|"), "i"); 18624 18625 (function () { 18626 // Executing both pixelPosition & boxSizingReliable tests require only one layout 18627 // so they're executed at the same time to save the second computation. 18628 function computeStyleTests() { 18629 // This is a singleton, we need to execute it only once 18630 if (!div) { 18631 return; 18632 } 18633 18634 container.style.cssText = "position:absolute;left:-11111px;width:60px;" + "margin-top:1px;padding:0;border:0"; 18635 div.style.cssText = "position:relative;display:block;box-sizing:border-box;overflow:scroll;" + "margin:auto;border:1px;padding:1px;" + "width:60%;top:1%"; 18636 documentElement.appendChild(container).appendChild(div); 18637 var divStyle = window.getComputedStyle(div); 18638 pixelPositionVal = divStyle.top !== "1%"; // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44 18639 18640 reliableMarginLeftVal = roundPixelMeasures(divStyle.marginLeft) === 12; // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3 18641 // Some styles come back with percentage values, even though they shouldn't 18642 18643 div.style.right = "60%"; 18644 pixelBoxStylesVal = roundPixelMeasures(divStyle.right) === 36; // Support: IE 9 - 11 only 18645 // Detect misreporting of content dimensions for box-sizing:border-box elements 18646 18647 boxSizingReliableVal = roundPixelMeasures(divStyle.width) === 36; // Support: IE 9 only 18648 // Detect overflow:scroll screwiness (gh-3699) 18649 // Support: Chrome <=64 18650 // Don't get tricked when zoom affects offsetWidth (gh-4029) 18651 18652 div.style.position = "absolute"; 18653 scrollboxSizeVal = roundPixelMeasures(div.offsetWidth / 3) === 12; 18654 documentElement.removeChild(container); // Nullify the div so it wouldn't be stored in the memory and 18655 // it will also be a sign that checks already performed 18656 18657 div = null; 18658 } 18659 18660 function roundPixelMeasures(measure) { 18661 return Math.round(parseFloat(measure)); 18662 } 18663 18664 var pixelPositionVal, 18665 boxSizingReliableVal, 18666 scrollboxSizeVal, 18667 pixelBoxStylesVal, 18668 reliableMarginLeftVal, 18669 container = document.createElement("div"), 18670 div = document.createElement("div"); // Finish early in limited (non-browser) environments 18671 18672 if (!div.style) { 18673 return; 18674 } // Support: IE <=9 - 11 only 18675 // Style of cloned element affects source element cloned (#8908) 18676 18677 18678 div.style.backgroundClip = "content-box"; 18679 div.cloneNode(true).style.backgroundClip = ""; 18680 support.clearCloneStyle = div.style.backgroundClip === "content-box"; 18681 jQuery.extend(support, { 18682 boxSizingReliable: function boxSizingReliable() { 18683 computeStyleTests(); 18684 return boxSizingReliableVal; 18685 }, 18686 pixelBoxStyles: function pixelBoxStyles() { 18687 computeStyleTests(); 18688 return pixelBoxStylesVal; 18689 }, 18690 pixelPosition: function pixelPosition() { 18691 computeStyleTests(); 18692 return pixelPositionVal; 18693 }, 18694 reliableMarginLeft: function reliableMarginLeft() { 18695 computeStyleTests(); 18696 return reliableMarginLeftVal; 18697 }, 18698 scrollboxSize: function scrollboxSize() { 18699 computeStyleTests(); 18700 return scrollboxSizeVal; 18701 } 18702 }); 18703 })(); 18704 18705 function curCSS(elem, name, computed) { 18706 var width, 18707 minWidth, 18708 maxWidth, 18709 ret, 18710 // Support: Firefox 51+ 18711 // Retrieving style before computed somehow 18712 // fixes an issue with getting wrong values 18713 // on detached elements 18714 style = elem.style; 18715 computed = computed || getStyles(elem); // getPropertyValue is needed for: 18716 // .css('filter') (IE 9 only, #12537) 18717 // .css('--customProperty) (#3144) 18718 18719 if (computed) { 18720 ret = computed.getPropertyValue(name) || computed[name]; 18721 18722 if (ret === "" && !isAttached(elem)) { 18723 ret = jQuery.style(elem, name); 18724 } // A tribute to the "awesome hack by Dean Edwards" 18725 // Android Browser returns percentage for some values, 18726 // but width seems to be reliably pixels. 18727 // This is against the CSSOM draft spec: 18728 // https://drafts.csswg.org/cssom/#resolved-values 18729 18730 18731 if (!support.pixelBoxStyles() && rnumnonpx.test(ret) && rboxStyle.test(name)) { 18732 // Remember the original values 18733 width = style.width; 18734 minWidth = style.minWidth; 18735 maxWidth = style.maxWidth; // Put in the new values to get a computed value out 18736 18737 style.minWidth = style.maxWidth = style.width = ret; 18738 ret = computed.width; // Revert the changed values 18739 18740 style.width = width; 18741 style.minWidth = minWidth; 18742 style.maxWidth = maxWidth; 18743 } 18744 } 18745 18746 return ret !== undefined ? // Support: IE <=9 - 11 only 18747 // IE returns zIndex value as an integer. 18748 ret + "" : ret; 18749 } 18750 18751 function addGetHookIf(conditionFn, hookFn) { 18752 // Define the hook, we'll check on the first run if it's really needed. 18753 return { 18754 get: function get() { 18755 if (conditionFn()) { 18756 // Hook not needed (or it's not possible to use it due 18757 // to missing dependency), remove it. 18758 delete this.get; 18759 return; 18760 } // Hook needed; redefine it so that the support test is not executed again. 18761 18762 18763 return (this.get = hookFn).apply(this, arguments); 18764 } 18765 }; 18766 } 18767 18768 var cssPrefixes = ["Webkit", "Moz", "ms"], 18769 emptyStyle = document.createElement("div").style, 18770 vendorProps = {}; // Return a vendor-prefixed property or undefined 18771 18772 function vendorPropName(name) { 18773 // Check for vendor prefixed names 18774 var capName = name[0].toUpperCase() + name.slice(1), 18775 i = cssPrefixes.length; 18776 18777 while (i--) { 18778 name = cssPrefixes[i] + capName; 18779 18780 if (name in emptyStyle) { 18781 return name; 18782 } 18783 } 18784 } // Return a potentially-mapped jQuery.cssProps or vendor prefixed property 18785 18786 18787 function finalPropName(name) { 18788 var final = jQuery.cssProps[name] || vendorProps[name]; 18789 18790 if (final) { 18791 return final; 18792 } 18793 18794 if (name in emptyStyle) { 18795 return name; 18796 } 18797 18798 return vendorProps[name] = vendorPropName(name) || name; 18799 } 18800 18801 var // Swappable if display is none or starts with table 18802 // except "table", "table-cell", or "table-caption" 18803 // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display 18804 rdisplayswap = /^(none|table(?!-c[ea]).+)/, 18805 rcustomProp = /^--/, 18806 cssShow = { 18807 position: "absolute", 18808 visibility: "hidden", 18809 display: "block" 18810 }, 18811 cssNormalTransform = { 18812 letterSpacing: "0", 18813 fontWeight: "400" 18814 }; 18815 18816 function setPositiveNumber(elem, value, subtract) { 18817 // Any relative (+/-) values have already been 18818 // normalized at this point 18819 var matches = rcssNum.exec(value); 18820 return matches ? // Guard against undefined "subtract", e.g., when used as in cssHooks 18821 Math.max(0, matches[2] - (subtract || 0)) + (matches[3] || "px") : value; 18822 } 18823 18824 function boxModelAdjustment(elem, dimension, box, isBorderBox, styles, computedVal) { 18825 var i = dimension === "width" ? 1 : 0, 18826 extra = 0, 18827 delta = 0; // Adjustment may not be necessary 18828 18829 if (box === (isBorderBox ? "border" : "content")) { 18830 return 0; 18831 } 18832 18833 for (; i < 4; i += 2) { 18834 // Both box models exclude margin 18835 if (box === "margin") { 18836 delta += jQuery.css(elem, box + cssExpand[i], true, styles); 18837 } // If we get here with a content-box, we're seeking "padding" or "border" or "margin" 18838 18839 18840 if (!isBorderBox) { 18841 // Add padding 18842 delta += jQuery.css(elem, "padding" + cssExpand[i], true, styles); // For "border" or "margin", add border 18843 18844 if (box !== "padding") { 18845 delta += jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles); // But still keep track of it otherwise 18846 } else { 18847 extra += jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles); 18848 } // If we get here with a border-box (content + padding + border), we're seeking "content" or 18849 // "padding" or "margin" 18850 18851 } else { 18852 // For "content", subtract padding 18853 if (box === "content") { 18854 delta -= jQuery.css(elem, "padding" + cssExpand[i], true, styles); 18855 } // For "content" or "padding", subtract border 18856 18857 18858 if (box !== "margin") { 18859 delta -= jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles); 18860 } 18861 } 18862 } // Account for positive content-box scroll gutter when requested by providing computedVal 18863 18864 18865 if (!isBorderBox && computedVal >= 0) { 18866 // offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border 18867 // Assuming integer scroll gutter, subtract the rest and round down 18868 delta += Math.max(0, Math.ceil(elem["offset" + dimension[0].toUpperCase() + dimension.slice(1)] - computedVal - delta - extra - 0.5 // If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter 18869 // Use an explicit zero to avoid NaN (gh-3964) 18870 )) || 0; 18871 } 18872 18873 return delta; 18874 } 18875 18876 function getWidthOrHeight(elem, dimension, extra) { 18877 // Start with computed style 18878 var styles = getStyles(elem), 18879 // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322). 18880 // Fake content-box until we know it's needed to know the true value. 18881 boxSizingNeeded = !support.boxSizingReliable() || extra, 18882 isBorderBox = boxSizingNeeded && jQuery.css(elem, "boxSizing", false, styles) === "border-box", 18883 valueIsBorderBox = isBorderBox, 18884 val = curCSS(elem, dimension, styles), 18885 offsetProp = "offset" + dimension[0].toUpperCase() + dimension.slice(1); // Support: Firefox <=54 18886 // Return a confounding non-pixel value or feign ignorance, as appropriate. 18887 18888 if (rnumnonpx.test(val)) { 18889 if (!extra) { 18890 return val; 18891 } 18892 18893 val = "auto"; 18894 } // Fall back to offsetWidth/offsetHeight when value is "auto" 18895 // This happens for inline elements with no explicit setting (gh-3571) 18896 // Support: Android <=4.1 - 4.3 only 18897 // Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602) 18898 // Support: IE 9-11 only 18899 // Also use offsetWidth/offsetHeight for when box sizing is unreliable 18900 // We use getClientRects() to check for hidden/disconnected. 18901 // In those cases, the computed value can be trusted to be border-box 18902 18903 18904 if ((!support.boxSizingReliable() && isBorderBox || val === "auto" || !parseFloat(val) && jQuery.css(elem, "display", false, styles) === "inline") && elem.getClientRects().length) { 18905 isBorderBox = jQuery.css(elem, "boxSizing", false, styles) === "border-box"; // Where available, offsetWidth/offsetHeight approximate border box dimensions. 18906 // Where not available (e.g., SVG), assume unreliable box-sizing and interpret the 18907 // retrieved value as a content box dimension. 18908 18909 valueIsBorderBox = offsetProp in elem; 18910 18911 if (valueIsBorderBox) { 18912 val = elem[offsetProp]; 18913 } 18914 } // Normalize "" and auto 18915 18916 18917 val = parseFloat(val) || 0; // Adjust for the element's box model 18918 18919 return val + boxModelAdjustment(elem, dimension, extra || (isBorderBox ? "border" : "content"), valueIsBorderBox, styles, // Provide the current computed size to request scroll gutter calculation (gh-3589) 18920 val) + "px"; 18921 } 18922 18923 jQuery.extend({ 18924 // Add in style property hooks for overriding the default 18925 // behavior of getting and setting a style property 18926 cssHooks: { 18927 opacity: { 18928 get: function get(elem, computed) { 18929 if (computed) { 18930 // We should always get a number back from opacity 18931 var ret = curCSS(elem, "opacity"); 18932 return ret === "" ? "1" : ret; 18933 } 18934 } 18935 } 18936 }, 18937 // Don't automatically add "px" to these possibly-unitless properties 18938 cssNumber: { 18939 "animationIterationCount": true, 18940 "columnCount": true, 18941 "fillOpacity": true, 18942 "flexGrow": true, 18943 "flexShrink": true, 18944 "fontWeight": true, 18945 "gridArea": true, 18946 "gridColumn": true, 18947 "gridColumnEnd": true, 18948 "gridColumnStart": true, 18949 "gridRow": true, 18950 "gridRowEnd": true, 18951 "gridRowStart": true, 18952 "lineHeight": true, 18953 "opacity": true, 18954 "order": true, 18955 "orphans": true, 18956 "widows": true, 18957 "zIndex": true, 18958 "zoom": true 18959 }, 18960 // Add in properties whose names you wish to fix before 18961 // setting or getting the value 18962 cssProps: {}, 18963 // Get and set the style property on a DOM Node 18964 style: function style(elem, name, value, extra) { 18965 // Don't set styles on text and comment nodes 18966 if (!elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style) { 18967 return; 18968 } // Make sure that we're working with the right name 18969 18970 18971 var ret, 18972 type, 18973 hooks, 18974 origName = camelCase(name), 18975 isCustomProp = rcustomProp.test(name), 18976 style = elem.style; // Make sure that we're working with the right name. We don't 18977 // want to query the value if it is a CSS custom property 18978 // since they are user-defined. 18979 18980 if (!isCustomProp) { 18981 name = finalPropName(origName); 18982 } // Gets hook for the prefixed version, then unprefixed version 18983 18984 18985 hooks = jQuery.cssHooks[name] || jQuery.cssHooks[origName]; // Check if we're setting a value 18986 18987 if (value !== undefined) { 18988 type = _typeof(value); // Convert "+=" or "-=" to relative numbers (#7345) 18989 18990 if (type === "string" && (ret = rcssNum.exec(value)) && ret[1]) { 18991 value = adjustCSS(elem, name, ret); // Fixes bug #9237 18992 18993 type = "number"; 18994 } // Make sure that null and NaN values aren't set (#7116) 18995 18996 18997 if (value == null || value !== value) { 18998 return; 18999 } // If a number was passed in, add the unit (except for certain CSS properties) 19000 // The isCustomProp check can be removed in jQuery 4.0 when we only auto-append 19001 // "px" to a few hardcoded values. 19002 19003 19004 if (type === "number" && !isCustomProp) { 19005 value += ret && ret[3] || (jQuery.cssNumber[origName] ? "" : "px"); 19006 } // background-* props affect original clone's values 19007 19008 19009 if (!support.clearCloneStyle && value === "" && name.indexOf("background") === 0) { 19010 style[name] = "inherit"; 19011 } // If a hook was provided, use that value, otherwise just set the specified value 19012 19013 19014 if (!hooks || !("set" in hooks) || (value = hooks.set(elem, value, extra)) !== undefined) { 19015 if (isCustomProp) { 19016 style.setProperty(name, value); 19017 } else { 19018 style[name] = value; 19019 } 19020 } 19021 } else { 19022 // If a hook was provided get the non-computed value from there 19023 if (hooks && "get" in hooks && (ret = hooks.get(elem, false, extra)) !== undefined) { 19024 return ret; 19025 } // Otherwise just get the value from the style object 19026 19027 19028 return style[name]; 19029 } 19030 }, 19031 css: function css(elem, name, extra, styles) { 19032 var val, 19033 num, 19034 hooks, 19035 origName = camelCase(name), 19036 isCustomProp = rcustomProp.test(name); // Make sure that we're working with the right name. We don't 19037 // want to modify the value if it is a CSS custom property 19038 // since they are user-defined. 19039 19040 if (!isCustomProp) { 19041 name = finalPropName(origName); 19042 } // Try prefixed name followed by the unprefixed name 19043 19044 19045 hooks = jQuery.cssHooks[name] || jQuery.cssHooks[origName]; // If a hook was provided get the computed value from there 19046 19047 if (hooks && "get" in hooks) { 19048 val = hooks.get(elem, true, extra); 19049 } // Otherwise, if a way to get the computed value exists, use that 19050 19051 19052 if (val === undefined) { 19053 val = curCSS(elem, name, styles); 19054 } // Convert "normal" to computed value 19055 19056 19057 if (val === "normal" && name in cssNormalTransform) { 19058 val = cssNormalTransform[name]; 19059 } // Make numeric if forced or a qualifier was provided and val looks numeric 19060 19061 19062 if (extra === "" || extra) { 19063 num = parseFloat(val); 19064 return extra === true || isFinite(num) ? num || 0 : val; 19065 } 19066 19067 return val; 19068 } 19069 }); 19070 jQuery.each(["height", "width"], function (i, dimension) { 19071 jQuery.cssHooks[dimension] = { 19072 get: function get(elem, computed, extra) { 19073 if (computed) { 19074 // Certain elements can have dimension info if we invisibly show them 19075 // but it must have a current display style that would benefit 19076 return rdisplayswap.test(jQuery.css(elem, "display")) && ( // Support: Safari 8+ 19077 // Table columns in Safari have non-zero offsetWidth & zero 19078 // getBoundingClientRect().width unless display is changed. 19079 // Support: IE <=11 only 19080 // Running getBoundingClientRect on a disconnected node 19081 // in IE throws an error. 19082 !elem.getClientRects().length || !elem.getBoundingClientRect().width) ? swap(elem, cssShow, function () { 19083 return getWidthOrHeight(elem, dimension, extra); 19084 }) : getWidthOrHeight(elem, dimension, extra); 19085 } 19086 }, 19087 set: function set(elem, value, extra) { 19088 var matches, 19089 styles = getStyles(elem), 19090 // Only read styles.position if the test has a chance to fail 19091 // to avoid forcing a reflow. 19092 scrollboxSizeBuggy = !support.scrollboxSize() && styles.position === "absolute", 19093 // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991) 19094 boxSizingNeeded = scrollboxSizeBuggy || extra, 19095 isBorderBox = boxSizingNeeded && jQuery.css(elem, "boxSizing", false, styles) === "border-box", 19096 subtract = extra ? boxModelAdjustment(elem, dimension, extra, isBorderBox, styles) : 0; // Account for unreliable border-box dimensions by comparing offset* to computed and 19097 // faking a content-box to get border and padding (gh-3699) 19098 19099 if (isBorderBox && scrollboxSizeBuggy) { 19100 subtract -= Math.ceil(elem["offset" + dimension[0].toUpperCase() + dimension.slice(1)] - parseFloat(styles[dimension]) - boxModelAdjustment(elem, dimension, "border", false, styles) - 0.5); 19101 } // Convert to pixels if value adjustment is needed 19102 19103 19104 if (subtract && (matches = rcssNum.exec(value)) && (matches[3] || "px") !== "px") { 19105 elem.style[dimension] = value; 19106 value = jQuery.css(elem, dimension); 19107 } 19108 19109 return setPositiveNumber(elem, value, subtract); 19110 } 19111 }; 19112 }); 19113 jQuery.cssHooks.marginLeft = addGetHookIf(support.reliableMarginLeft, function (elem, computed) { 19114 if (computed) { 19115 return (parseFloat(curCSS(elem, "marginLeft")) || elem.getBoundingClientRect().left - swap(elem, { 19116 marginLeft: 0 19117 }, function () { 19118 return elem.getBoundingClientRect().left; 19119 })) + "px"; 19120 } 19121 }); // These hooks are used by animate to expand properties 19122 19123 jQuery.each({ 19124 margin: "", 19125 padding: "", 19126 border: "Width" 19127 }, function (prefix, suffix) { 19128 jQuery.cssHooks[prefix + suffix] = { 19129 expand: function expand(value) { 19130 var i = 0, 19131 expanded = {}, 19132 // Assumes a single number if not a string 19133 parts = typeof value === "string" ? value.split(" ") : [value]; 19134 19135 for (; i < 4; i++) { 19136 expanded[prefix + cssExpand[i] + suffix] = parts[i] || parts[i - 2] || parts[0]; 19137 } 19138 19139 return expanded; 19140 } 19141 }; 19142 19143 if (prefix !== "margin") { 19144 jQuery.cssHooks[prefix + suffix].set = setPositiveNumber; 19145 } 19146 }); 19147 jQuery.fn.extend({ 19148 css: function css(name, value) { 19149 return access(this, function (elem, name, value) { 19150 var styles, 19151 len, 19152 map = {}, 19153 i = 0; 19154 19155 if (Array.isArray(name)) { 19156 styles = getStyles(elem); 19157 len = name.length; 19158 19159 for (; i < len; i++) { 19160 map[name[i]] = jQuery.css(elem, name[i], false, styles); 19161 } 19162 19163 return map; 19164 } 19165 19166 return value !== undefined ? jQuery.style(elem, name, value) : jQuery.css(elem, name); 19167 }, name, value, arguments.length > 1); 19168 } 19169 }); 19170 19171 function Tween(elem, options, prop, end, easing) { 19172 return new Tween.prototype.init(elem, options, prop, end, easing); 19173 } 19174 19175 jQuery.Tween = Tween; 19176 Tween.prototype = { 19177 constructor: Tween, 19178 init: function init(elem, options, prop, end, easing, unit) { 19179 this.elem = elem; 19180 this.prop = prop; 19181 this.easing = easing || jQuery.easing._default; 19182 this.options = options; 19183 this.start = this.now = this.cur(); 19184 this.end = end; 19185 this.unit = unit || (jQuery.cssNumber[prop] ? "" : "px"); 19186 }, 19187 cur: function cur() { 19188 var hooks = Tween.propHooks[this.prop]; 19189 return hooks && hooks.get ? hooks.get(this) : Tween.propHooks._default.get(this); 19190 }, 19191 run: function run(percent) { 19192 var eased, 19193 hooks = Tween.propHooks[this.prop]; 19194 19195 if (this.options.duration) { 19196 this.pos = eased = jQuery.easing[this.easing](percent, this.options.duration * percent, 0, 1, this.options.duration); 19197 } else { 19198 this.pos = eased = percent; 19199 } 19200 19201 this.now = (this.end - this.start) * eased + this.start; 19202 19203 if (this.options.step) { 19204 this.options.step.call(this.elem, this.now, this); 19205 } 19206 19207 if (hooks && hooks.set) { 19208 hooks.set(this); 19209 } else { 19210 Tween.propHooks._default.set(this); 19211 } 19212 19213 return this; 19214 } 19215 }; 19216 Tween.prototype.init.prototype = Tween.prototype; 19217 Tween.propHooks = { 19218 _default: { 19219 get: function get(tween) { 19220 var result; // Use a property on the element directly when it is not a DOM element, 19221 // or when there is no matching style property that exists. 19222 19223 if (tween.elem.nodeType !== 1 || tween.elem[tween.prop] != null && tween.elem.style[tween.prop] == null) { 19224 return tween.elem[tween.prop]; 19225 } // Passing an empty string as a 3rd parameter to .css will automatically 19226 // attempt a parseFloat and fallback to a string if the parse fails. 19227 // Simple values such as "10px" are parsed to Float; 19228 // complex values such as "rotate(1rad)" are returned as-is. 19229 19230 19231 result = jQuery.css(tween.elem, tween.prop, ""); // Empty strings, null, undefined and "auto" are converted to 0. 19232 19233 return !result || result === "auto" ? 0 : result; 19234 }, 19235 set: function set(tween) { 19236 // Use step hook for back compat. 19237 // Use cssHook if its there. 19238 // Use .style if available and use plain properties where available. 19239 if (jQuery.fx.step[tween.prop]) { 19240 jQuery.fx.step[tween.prop](tween); 19241 } else if (tween.elem.nodeType === 1 && (jQuery.cssHooks[tween.prop] || tween.elem.style[finalPropName(tween.prop)] != null)) { 19242 jQuery.style(tween.elem, tween.prop, tween.now + tween.unit); 19243 } else { 19244 tween.elem[tween.prop] = tween.now; 19245 } 19246 } 19247 } 19248 }; // Support: IE <=9 only 19249 // Panic based approach to setting things on disconnected nodes 19250 19251 Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { 19252 set: function set(tween) { 19253 if (tween.elem.nodeType && tween.elem.parentNode) { 19254 tween.elem[tween.prop] = tween.now; 19255 } 19256 } 19257 }; 19258 jQuery.easing = { 19259 linear: function linear(p) { 19260 return p; 19261 }, 19262 swing: function swing(p) { 19263 return 0.5 - Math.cos(p * Math.PI) / 2; 19264 }, 19265 _default: "swing" 19266 }; 19267 jQuery.fx = Tween.prototype.init; // Back compat <1.8 extension point 19268 19269 jQuery.fx.step = {}; 19270 var fxNow, 19271 inProgress, 19272 rfxtypes = /^(?:toggle|show|hide)$/, 19273 rrun = /queueHooks$/; 19274 19275 function schedule() { 19276 if (inProgress) { 19277 if (document.hidden === false && window.requestAnimationFrame) { 19278 window.requestAnimationFrame(schedule); 19279 } else { 19280 window.setTimeout(schedule, jQuery.fx.interval); 19281 } 19282 19283 jQuery.fx.tick(); 19284 } 19285 } // Animations created synchronously will run synchronously 19286 19287 19288 function createFxNow() { 19289 window.setTimeout(function () { 19290 fxNow = undefined; 19291 }); 19292 return fxNow = Date.now(); 19293 } // Generate parameters to create a standard animation 19294 19295 19296 function genFx(type, includeWidth) { 19297 var which, 19298 i = 0, 19299 attrs = { 19300 height: type 19301 }; // If we include width, step value is 1 to do all cssExpand values, 19302 // otherwise step value is 2 to skip over Left and Right 19303 19304 includeWidth = includeWidth ? 1 : 0; 19305 19306 for (; i < 4; i += 2 - includeWidth) { 19307 which = cssExpand[i]; 19308 attrs["margin" + which] = attrs["padding" + which] = type; 19309 } 19310 19311 if (includeWidth) { 19312 attrs.opacity = attrs.width = type; 19313 } 19314 19315 return attrs; 19316 } 19317 19318 function createTween(value, prop, animation) { 19319 var tween, 19320 collection = (Animation.tweeners[prop] || []).concat(Animation.tweeners["*"]), 19321 index = 0, 19322 length = collection.length; 19323 19324 for (; index < length; index++) { 19325 if (tween = collection[index].call(animation, prop, value)) { 19326 // We're done with this property 19327 return tween; 19328 } 19329 } 19330 } 19331 19332 function defaultPrefilter(elem, props, opts) { 19333 var prop, 19334 value, 19335 toggle, 19336 hooks, 19337 oldfire, 19338 propTween, 19339 restoreDisplay, 19340 display, 19341 isBox = "width" in props || "height" in props, 19342 anim = this, 19343 orig = {}, 19344 style = elem.style, 19345 hidden = elem.nodeType && isHiddenWithinTree(elem), 19346 dataShow = dataPriv.get(elem, "fxshow"); // Queue-skipping animations hijack the fx hooks 19347 19348 if (!opts.queue) { 19349 hooks = jQuery._queueHooks(elem, "fx"); 19350 19351 if (hooks.unqueued == null) { 19352 hooks.unqueued = 0; 19353 oldfire = hooks.empty.fire; 19354 19355 hooks.empty.fire = function () { 19356 if (!hooks.unqueued) { 19357 oldfire(); 19358 } 19359 }; 19360 } 19361 19362 hooks.unqueued++; 19363 anim.always(function () { 19364 // Ensure the complete handler is called before this completes 19365 anim.always(function () { 19366 hooks.unqueued--; 19367 19368 if (!jQuery.queue(elem, "fx").length) { 19369 hooks.empty.fire(); 19370 } 19371 }); 19372 }); 19373 } // Detect show/hide animations 19374 19375 19376 for (prop in props) { 19377 value = props[prop]; 19378 19379 if (rfxtypes.test(value)) { 19380 delete props[prop]; 19381 toggle = toggle || value === "toggle"; 19382 19383 if (value === (hidden ? "hide" : "show")) { 19384 // Pretend to be hidden if this is a "show" and 19385 // there is still data from a stopped show/hide 19386 if (value === "show" && dataShow && dataShow[prop] !== undefined) { 19387 hidden = true; // Ignore all other no-op show/hide data 19388 } else { 19389 continue; 19390 } 19391 } 19392 19393 orig[prop] = dataShow && dataShow[prop] || jQuery.style(elem, prop); 19394 } 19395 } // Bail out if this is a no-op like .hide().hide() 19396 19397 19398 propTween = !jQuery.isEmptyObject(props); 19399 19400 if (!propTween && jQuery.isEmptyObject(orig)) { 19401 return; 19402 } // Restrict "overflow" and "display" styles during box animations 19403 19404 19405 if (isBox && elem.nodeType === 1) { 19406 // Support: IE <=9 - 11, Edge 12 - 15 19407 // Record all 3 overflow attributes because IE does not infer the shorthand 19408 // from identically-valued overflowX and overflowY and Edge just mirrors 19409 // the overflowX value there. 19410 opts.overflow = [style.overflow, style.overflowX, style.overflowY]; // Identify a display type, preferring old show/hide data over the CSS cascade 19411 19412 restoreDisplay = dataShow && dataShow.display; 19413 19414 if (restoreDisplay == null) { 19415 restoreDisplay = dataPriv.get(elem, "display"); 19416 } 19417 19418 display = jQuery.css(elem, "display"); 19419 19420 if (display === "none") { 19421 if (restoreDisplay) { 19422 display = restoreDisplay; 19423 } else { 19424 // Get nonempty value(s) by temporarily forcing visibility 19425 showHide([elem], true); 19426 restoreDisplay = elem.style.display || restoreDisplay; 19427 display = jQuery.css(elem, "display"); 19428 showHide([elem]); 19429 } 19430 } // Animate inline elements as inline-block 19431 19432 19433 if (display === "inline" || display === "inline-block" && restoreDisplay != null) { 19434 if (jQuery.css(elem, "float") === "none") { 19435 // Restore the original display value at the end of pure show/hide animations 19436 if (!propTween) { 19437 anim.done(function () { 19438 style.display = restoreDisplay; 19439 }); 19440 19441 if (restoreDisplay == null) { 19442 display = style.display; 19443 restoreDisplay = display === "none" ? "" : display; 19444 } 19445 } 19446 19447 style.display = "inline-block"; 19448 } 19449 } 19450 } 19451 19452 if (opts.overflow) { 19453 style.overflow = "hidden"; 19454 anim.always(function () { 19455 style.overflow = opts.overflow[0]; 19456 style.overflowX = opts.overflow[1]; 19457 style.overflowY = opts.overflow[2]; 19458 }); 19459 } // Implement show/hide animations 19460 19461 19462 propTween = false; 19463 19464 for (prop in orig) { 19465 // General show/hide setup for this element animation 19466 if (!propTween) { 19467 if (dataShow) { 19468 if ("hidden" in dataShow) { 19469 hidden = dataShow.hidden; 19470 } 19471 } else { 19472 dataShow = dataPriv.access(elem, "fxshow", { 19473 display: restoreDisplay 19474 }); 19475 } // Store hidden/visible for toggle so `.stop().toggle()` "reverses" 19476 19477 19478 if (toggle) { 19479 dataShow.hidden = !hidden; 19480 } // Show elements before animating them 19481 19482 19483 if (hidden) { 19484 showHide([elem], true); 19485 } 19486 /* eslint-disable no-loop-func */ 19487 19488 19489 anim.done(function () { 19490 /* eslint-enable no-loop-func */ 19491 // The final step of a "hide" animation is actually hiding the element 19492 if (!hidden) { 19493 showHide([elem]); 19494 } 19495 19496 dataPriv.remove(elem, "fxshow"); 19497 19498 for (prop in orig) { 19499 jQuery.style(elem, prop, orig[prop]); 19500 } 19501 }); 19502 } // Per-property setup 19503 19504 19505 propTween = createTween(hidden ? dataShow[prop] : 0, prop, anim); 19506 19507 if (!(prop in dataShow)) { 19508 dataShow[prop] = propTween.start; 19509 19510 if (hidden) { 19511 propTween.end = propTween.start; 19512 propTween.start = 0; 19513 } 19514 } 19515 } 19516 } 19517 19518 function propFilter(props, specialEasing) { 19519 var index, name, easing, value, hooks; // camelCase, specialEasing and expand cssHook pass 19520 19521 for (index in props) { 19522 name = camelCase(index); 19523 easing = specialEasing[name]; 19524 value = props[index]; 19525 19526 if (Array.isArray(value)) { 19527 easing = value[1]; 19528 value = props[index] = value[0]; 19529 } 19530 19531 if (index !== name) { 19532 props[name] = value; 19533 delete props[index]; 19534 } 19535 19536 hooks = jQuery.cssHooks[name]; 19537 19538 if (hooks && "expand" in hooks) { 19539 value = hooks.expand(value); 19540 delete props[name]; // Not quite $.extend, this won't overwrite existing keys. 19541 // Reusing 'index' because we have the correct "name" 19542 19543 for (index in value) { 19544 if (!(index in props)) { 19545 props[index] = value[index]; 19546 specialEasing[index] = easing; 19547 } 19548 } 19549 } else { 19550 specialEasing[name] = easing; 19551 } 19552 } 19553 } 19554 19555 function Animation(elem, properties, options) { 19556 var result, 19557 stopped, 19558 index = 0, 19559 length = Animation.prefilters.length, 19560 deferred = jQuery.Deferred().always(function () { 19561 // Don't match elem in the :animated selector 19562 delete tick.elem; 19563 }), 19564 tick = function tick() { 19565 if (stopped) { 19566 return false; 19567 } 19568 19569 var currentTime = fxNow || createFxNow(), 19570 remaining = Math.max(0, animation.startTime + animation.duration - currentTime), 19571 // Support: Android 2.3 only 19572 // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497) 19573 temp = remaining / animation.duration || 0, 19574 percent = 1 - temp, 19575 index = 0, 19576 length = animation.tweens.length; 19577 19578 for (; index < length; index++) { 19579 animation.tweens[index].run(percent); 19580 } 19581 19582 deferred.notifyWith(elem, [animation, percent, remaining]); // If there's more to do, yield 19583 19584 if (percent < 1 && length) { 19585 return remaining; 19586 } // If this was an empty animation, synthesize a final progress notification 19587 19588 19589 if (!length) { 19590 deferred.notifyWith(elem, [animation, 1, 0]); 19591 } // Resolve the animation and report its conclusion 19592 19593 19594 deferred.resolveWith(elem, [animation]); 19595 return false; 19596 }, 19597 animation = deferred.promise({ 19598 elem: elem, 19599 props: jQuery.extend({}, properties), 19600 opts: jQuery.extend(true, { 19601 specialEasing: {}, 19602 easing: jQuery.easing._default 19603 }, options), 19604 originalProperties: properties, 19605 originalOptions: options, 19606 startTime: fxNow || createFxNow(), 19607 duration: options.duration, 19608 tweens: [], 19609 createTween: function createTween(prop, end) { 19610 var tween = jQuery.Tween(elem, animation.opts, prop, end, animation.opts.specialEasing[prop] || animation.opts.easing); 19611 animation.tweens.push(tween); 19612 return tween; 19613 }, 19614 stop: function stop(gotoEnd) { 19615 var index = 0, 19616 // If we are going to the end, we want to run all the tweens 19617 // otherwise we skip this part 19618 length = gotoEnd ? animation.tweens.length : 0; 19619 19620 if (stopped) { 19621 return this; 19622 } 19623 19624 stopped = true; 19625 19626 for (; index < length; index++) { 19627 animation.tweens[index].run(1); 19628 } // Resolve when we played the last frame; otherwise, reject 19629 19630 19631 if (gotoEnd) { 19632 deferred.notifyWith(elem, [animation, 1, 0]); 19633 deferred.resolveWith(elem, [animation, gotoEnd]); 19634 } else { 19635 deferred.rejectWith(elem, [animation, gotoEnd]); 19636 } 19637 19638 return this; 19639 } 19640 }), 19641 props = animation.props; 19642 19643 propFilter(props, animation.opts.specialEasing); 19644 19645 for (; index < length; index++) { 19646 result = Animation.prefilters[index].call(animation, elem, props, animation.opts); 19647 19648 if (result) { 19649 if (isFunction(result.stop)) { 19650 jQuery._queueHooks(animation.elem, animation.opts.queue).stop = result.stop.bind(result); 19651 } 19652 19653 return result; 19654 } 19655 } 19656 19657 jQuery.map(props, createTween, animation); 19658 19659 if (isFunction(animation.opts.start)) { 19660 animation.opts.start.call(elem, animation); 19661 } // Attach callbacks from options 19662 19663 19664 animation.progress(animation.opts.progress).done(animation.opts.done, animation.opts.complete).fail(animation.opts.fail).always(animation.opts.always); 19665 jQuery.fx.timer(jQuery.extend(tick, { 19666 elem: elem, 19667 anim: animation, 19668 queue: animation.opts.queue 19669 })); 19670 return animation; 19671 } 19672 19673 jQuery.Animation = jQuery.extend(Animation, { 19674 tweeners: { 19675 "*": [function (prop, value) { 19676 var tween = this.createTween(prop, value); 19677 adjustCSS(tween.elem, prop, rcssNum.exec(value), tween); 19678 return tween; 19679 }] 19680 }, 19681 tweener: function tweener(props, callback) { 19682 if (isFunction(props)) { 19683 callback = props; 19684 props = ["*"]; 19685 } else { 19686 props = props.match(rnothtmlwhite); 19687 } 19688 19689 var prop, 19690 index = 0, 19691 length = props.length; 19692 19693 for (; index < length; index++) { 19694 prop = props[index]; 19695 Animation.tweeners[prop] = Animation.tweeners[prop] || []; 19696 Animation.tweeners[prop].unshift(callback); 19697 } 19698 }, 19699 prefilters: [defaultPrefilter], 19700 prefilter: function prefilter(callback, prepend) { 19701 if (prepend) { 19702 Animation.prefilters.unshift(callback); 19703 } else { 19704 Animation.prefilters.push(callback); 19705 } 19706 } 19707 }); 19708 19709 jQuery.speed = function (speed, easing, fn) { 19710 var opt = speed && _typeof(speed) === "object" ? jQuery.extend({}, speed) : { 19711 complete: fn || !fn && easing || isFunction(speed) && speed, 19712 duration: speed, 19713 easing: fn && easing || easing && !isFunction(easing) && easing 19714 }; // Go to the end state if fx are off 19715 19716 if (jQuery.fx.off) { 19717 opt.duration = 0; 19718 } else { 19719 if (typeof opt.duration !== "number") { 19720 if (opt.duration in jQuery.fx.speeds) { 19721 opt.duration = jQuery.fx.speeds[opt.duration]; 19722 } else { 19723 opt.duration = jQuery.fx.speeds._default; 19724 } 19725 } 19726 } // Normalize opt.queue - true/undefined/null -> "fx" 19727 19728 19729 if (opt.queue == null || opt.queue === true) { 19730 opt.queue = "fx"; 19731 } // Queueing 19732 19733 19734 opt.old = opt.complete; 19735 19736 opt.complete = function () { 19737 if (isFunction(opt.old)) { 19738 opt.old.call(this); 19739 } 19740 19741 if (opt.queue) { 19742 jQuery.dequeue(this, opt.queue); 19743 } 19744 }; 19745 19746 return opt; 19747 }; 19748 19749 jQuery.fn.extend({ 19750 fadeTo: function fadeTo(speed, to, easing, callback) { 19751 // Show any hidden elements after setting opacity to 0 19752 return this.filter(isHiddenWithinTree).css("opacity", 0).show() // Animate to the value specified 19753 .end().animate({ 19754 opacity: to 19755 }, speed, easing, callback); 19756 }, 19757 animate: function animate(prop, speed, easing, callback) { 19758 var empty = jQuery.isEmptyObject(prop), 19759 optall = jQuery.speed(speed, easing, callback), 19760 doAnimation = function doAnimation() { 19761 // Operate on a copy of prop so per-property easing won't be lost 19762 var anim = Animation(this, jQuery.extend({}, prop), optall); // Empty animations, or finishing resolves immediately 19763 19764 if (empty || dataPriv.get(this, "finish")) { 19765 anim.stop(true); 19766 } 19767 }; 19768 19769 doAnimation.finish = doAnimation; 19770 return empty || optall.queue === false ? this.each(doAnimation) : this.queue(optall.queue, doAnimation); 19771 }, 19772 stop: function stop(type, clearQueue, gotoEnd) { 19773 var stopQueue = function stopQueue(hooks) { 19774 var stop = hooks.stop; 19775 delete hooks.stop; 19776 stop(gotoEnd); 19777 }; 19778 19779 if (typeof type !== "string") { 19780 gotoEnd = clearQueue; 19781 clearQueue = type; 19782 type = undefined; 19783 } 19784 19785 if (clearQueue && type !== false) { 19786 this.queue(type || "fx", []); 19787 } 19788 19789 return this.each(function () { 19790 var dequeue = true, 19791 index = type != null && type + "queueHooks", 19792 timers = jQuery.timers, 19793 data = dataPriv.get(this); 19794 19795 if (index) { 19796 if (data[index] && data[index].stop) { 19797 stopQueue(data[index]); 19798 } 19799 } else { 19800 for (index in data) { 19801 if (data[index] && data[index].stop && rrun.test(index)) { 19802 stopQueue(data[index]); 19803 } 19804 } 19805 } 19806 19807 for (index = timers.length; index--;) { 19808 if (timers[index].elem === this && (type == null || timers[index].queue === type)) { 19809 timers[index].anim.stop(gotoEnd); 19810 dequeue = false; 19811 timers.splice(index, 1); 19812 } 19813 } // Start the next in the queue if the last step wasn't forced. 19814 // Timers currently will call their complete callbacks, which 19815 // will dequeue but only if they were gotoEnd. 19816 19817 19818 if (dequeue || !gotoEnd) { 19819 jQuery.dequeue(this, type); 19820 } 19821 }); 19822 }, 19823 finish: function finish(type) { 19824 if (type !== false) { 19825 type = type || "fx"; 19826 } 19827 19828 return this.each(function () { 19829 var index, 19830 data = dataPriv.get(this), 19831 queue = data[type + "queue"], 19832 hooks = data[type + "queueHooks"], 19833 timers = jQuery.timers, 19834 length = queue ? queue.length : 0; // Enable finishing flag on private data 19835 19836 data.finish = true; // Empty the queue first 19837 19838 jQuery.queue(this, type, []); 19839 19840 if (hooks && hooks.stop) { 19841 hooks.stop.call(this, true); 19842 } // Look for any active animations, and finish them 19843 19844 19845 for (index = timers.length; index--;) { 19846 if (timers[index].elem === this && timers[index].queue === type) { 19847 timers[index].anim.stop(true); 19848 timers.splice(index, 1); 19849 } 19850 } // Look for any animations in the old queue and finish them 19851 19852 19853 for (index = 0; index < length; index++) { 19854 if (queue[index] && queue[index].finish) { 19855 queue[index].finish.call(this); 19856 } 19857 } // Turn off finishing flag 19858 19859 19860 delete data.finish; 19861 }); 19862 } 19863 }); 19864 jQuery.each(["toggle", "show", "hide"], function (i, name) { 19865 var cssFn = jQuery.fn[name]; 19866 19867 jQuery.fn[name] = function (speed, easing, callback) { 19868 return speed == null || typeof speed === "boolean" ? cssFn.apply(this, arguments) : this.animate(genFx(name, true), speed, easing, callback); 19869 }; 19870 }); // Generate shortcuts for custom animations 19871 19872 jQuery.each({ 19873 slideDown: genFx("show"), 19874 slideUp: genFx("hide"), 19875 slideToggle: genFx("toggle"), 19876 fadeIn: { 19877 opacity: "show" 19878 }, 19879 fadeOut: { 19880 opacity: "hide" 19881 }, 19882 fadeToggle: { 19883 opacity: "toggle" 19884 } 19885 }, function (name, props) { 19886 jQuery.fn[name] = function (speed, easing, callback) { 19887 return this.animate(props, speed, easing, callback); 19888 }; 19889 }); 19890 jQuery.timers = []; 19891 19892 jQuery.fx.tick = function () { 19893 var timer, 19894 i = 0, 19895 timers = jQuery.timers; 19896 fxNow = Date.now(); 19897 19898 for (; i < timers.length; i++) { 19899 timer = timers[i]; // Run the timer and safely remove it when done (allowing for external removal) 19900 19901 if (!timer() && timers[i] === timer) { 19902 timers.splice(i--, 1); 19903 } 19904 } 19905 19906 if (!timers.length) { 19907 jQuery.fx.stop(); 19908 } 19909 19910 fxNow = undefined; 19911 }; 19912 19913 jQuery.fx.timer = function (timer) { 19914 jQuery.timers.push(timer); 19915 jQuery.fx.start(); 19916 }; 19917 19918 jQuery.fx.interval = 13; 19919 19920 jQuery.fx.start = function () { 19921 if (inProgress) { 19922 return; 19923 } 19924 19925 inProgress = true; 19926 schedule(); 19927 }; 19928 19929 jQuery.fx.stop = function () { 19930 inProgress = null; 19931 }; 19932 19933 jQuery.fx.speeds = { 19934 slow: 600, 19935 fast: 200, 19936 // Default speed 19937 _default: 400 19938 }; // Based off of the plugin by Clint Helfers, with permission. 19939 // https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/ 19940 19941 jQuery.fn.delay = function (time, type) { 19942 time = jQuery.fx ? jQuery.fx.speeds[time] || time : time; 19943 type = type || "fx"; 19944 return this.queue(type, function (next, hooks) { 19945 var timeout = window.setTimeout(next, time); 19946 19947 hooks.stop = function () { 19948 window.clearTimeout(timeout); 19949 }; 19950 }); 19951 }; 19952 19953 (function () { 19954 var input = document.createElement("input"), 19955 select = document.createElement("select"), 19956 opt = select.appendChild(document.createElement("option")); 19957 input.type = "checkbox"; // Support: Android <=4.3 only 19958 // Default value for a checkbox should be "on" 19959 19960 support.checkOn = input.value !== ""; // Support: IE <=11 only 19961 // Must access selectedIndex to make default options select 19962 19963 support.optSelected = opt.selected; // Support: IE <=11 only 19964 // An input loses its value after becoming a radio 19965 19966 input = document.createElement("input"); 19967 input.value = "t"; 19968 input.type = "radio"; 19969 support.radioValue = input.value === "t"; 19970 })(); 19971 19972 var boolHook, 19973 attrHandle = jQuery.expr.attrHandle; 19974 jQuery.fn.extend({ 19975 attr: function attr(name, value) { 19976 return access(this, jQuery.attr, name, value, arguments.length > 1); 19977 }, 19978 removeAttr: function removeAttr(name) { 19979 return this.each(function () { 19980 jQuery.removeAttr(this, name); 19981 }); 19982 } 19983 }); 19984 jQuery.extend({ 19985 attr: function attr(elem, name, value) { 19986 var ret, 19987 hooks, 19988 nType = elem.nodeType; // Don't get/set attributes on text, comment and attribute nodes 19989 19990 if (nType === 3 || nType === 8 || nType === 2) { 19991 return; 19992 } // Fallback to prop when attributes are not supported 19993 19994 19995 if (typeof elem.getAttribute === "undefined") { 19996 return jQuery.prop(elem, name, value); 19997 } // Attribute hooks are determined by the lowercase version 19998 // Grab necessary hook if one is defined 19999 20000 20001 if (nType !== 1 || !jQuery.isXMLDoc(elem)) { 20002 hooks = jQuery.attrHooks[name.toLowerCase()] || (jQuery.expr.match.bool.test(name) ? boolHook : undefined); 20003 } 20004 20005 if (value !== undefined) { 20006 if (value === null) { 20007 jQuery.removeAttr(elem, name); 20008 return; 20009 } 20010 20011 if (hooks && "set" in hooks && (ret = hooks.set(elem, value, name)) !== undefined) { 20012 return ret; 20013 } 20014 20015 elem.setAttribute(name, value + ""); 20016 return value; 20017 } 20018 20019 if (hooks && "get" in hooks && (ret = hooks.get(elem, name)) !== null) { 20020 return ret; 20021 } 20022 20023 ret = jQuery.find.attr(elem, name); // Non-existent attributes return null, we normalize to undefined 20024 20025 return ret == null ? undefined : ret; 20026 }, 20027 attrHooks: { 20028 type: { 20029 set: function set(elem, value) { 20030 if (!support.radioValue && value === "radio" && nodeName(elem, "input")) { 20031 var val = elem.value; 20032 elem.setAttribute("type", value); 20033 20034 if (val) { 20035 elem.value = val; 20036 } 20037 20038 return value; 20039 } 20040 } 20041 } 20042 }, 20043 removeAttr: function removeAttr(elem, value) { 20044 var name, 20045 i = 0, 20046 // Attribute names can contain non-HTML whitespace characters 20047 // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 20048 attrNames = value && value.match(rnothtmlwhite); 20049 20050 if (attrNames && elem.nodeType === 1) { 20051 while (name = attrNames[i++]) { 20052 elem.removeAttribute(name); 20053 } 20054 } 20055 } 20056 }); // Hooks for boolean attributes 20057 20058 boolHook = { 20059 set: function set(elem, value, name) { 20060 if (value === false) { 20061 // Remove boolean attributes when set to false 20062 jQuery.removeAttr(elem, name); 20063 } else { 20064 elem.setAttribute(name, name); 20065 } 20066 20067 return name; 20068 } 20069 }; 20070 jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g), function (i, name) { 20071 var getter = attrHandle[name] || jQuery.find.attr; 20072 20073 attrHandle[name] = function (elem, name, isXML) { 20074 var ret, 20075 handle, 20076 lowercaseName = name.toLowerCase(); 20077 20078 if (!isXML) { 20079 // Avoid an infinite loop by temporarily removing this function from the getter 20080 handle = attrHandle[lowercaseName]; 20081 attrHandle[lowercaseName] = ret; 20082 ret = getter(elem, name, isXML) != null ? lowercaseName : null; 20083 attrHandle[lowercaseName] = handle; 20084 } 20085 20086 return ret; 20087 }; 20088 }); 20089 var rfocusable = /^(?:input|select|textarea|button)$/i, 20090 rclickable = /^(?:a|area)$/i; 20091 jQuery.fn.extend({ 20092 prop: function prop(name, value) { 20093 return access(this, jQuery.prop, name, value, arguments.length > 1); 20094 }, 20095 removeProp: function removeProp(name) { 20096 return this.each(function () { 20097 delete this[jQuery.propFix[name] || name]; 20098 }); 20099 } 20100 }); 20101 jQuery.extend({ 20102 prop: function prop(elem, name, value) { 20103 var ret, 20104 hooks, 20105 nType = elem.nodeType; // Don't get/set properties on text, comment and attribute nodes 20106 20107 if (nType === 3 || nType === 8 || nType === 2) { 20108 return; 20109 } 20110 20111 if (nType !== 1 || !jQuery.isXMLDoc(elem)) { 20112 // Fix name and attach hooks 20113 name = jQuery.propFix[name] || name; 20114 hooks = jQuery.propHooks[name]; 20115 } 20116 20117 if (value !== undefined) { 20118 if (hooks && "set" in hooks && (ret = hooks.set(elem, value, name)) !== undefined) { 20119 return ret; 20120 } 20121 20122 return elem[name] = value; 20123 } 20124 20125 if (hooks && "get" in hooks && (ret = hooks.get(elem, name)) !== null) { 20126 return ret; 20127 } 20128 20129 return elem[name]; 20130 }, 20131 propHooks: { 20132 tabIndex: { 20133 get: function get(elem) { 20134 // Support: IE <=9 - 11 only 20135 // elem.tabIndex doesn't always return the 20136 // correct value when it hasn't been explicitly set 20137 // https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ 20138 // Use proper attribute retrieval(#12072) 20139 var tabindex = jQuery.find.attr(elem, "tabindex"); 20140 20141 if (tabindex) { 20142 return parseInt(tabindex, 10); 20143 } 20144 20145 if (rfocusable.test(elem.nodeName) || rclickable.test(elem.nodeName) && elem.href) { 20146 return 0; 20147 } 20148 20149 return -1; 20150 } 20151 } 20152 }, 20153 propFix: { 20154 "for": "htmlFor", 20155 "class": "className" 20156 } 20157 }); // Support: IE <=11 only 20158 // Accessing the selectedIndex property 20159 // forces the browser to respect setting selected 20160 // on the option 20161 // The getter ensures a default option is selected 20162 // when in an optgroup 20163 // eslint rule "no-unused-expressions" is disabled for this code 20164 // since it considers such accessions noop 20165 20166 if (!support.optSelected) { 20167 jQuery.propHooks.selected = { 20168 get: function get(elem) { 20169 /* eslint no-unused-expressions: "off" */ 20170 var parent = elem.parentNode; 20171 20172 if (parent && parent.parentNode) { 20173 parent.parentNode.selectedIndex; 20174 } 20175 20176 return null; 20177 }, 20178 set: function set(elem) { 20179 /* eslint no-unused-expressions: "off" */ 20180 var parent = elem.parentNode; 20181 20182 if (parent) { 20183 parent.selectedIndex; 20184 20185 if (parent.parentNode) { 20186 parent.parentNode.selectedIndex; 20187 } 20188 } 20189 } 20190 }; 20191 } 20192 20193 jQuery.each(["tabIndex", "readOnly", "maxLength", "cellSpacing", "cellPadding", "rowSpan", "colSpan", "useMap", "frameBorder", "contentEditable"], function () { 20194 jQuery.propFix[this.toLowerCase()] = this; 20195 }); // Strip and collapse whitespace according to HTML spec 20196 // https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace 20197 20198 function stripAndCollapse(value) { 20199 var tokens = value.match(rnothtmlwhite) || []; 20200 return tokens.join(" "); 20201 } 20202 20203 function getClass(elem) { 20204 return elem.getAttribute && elem.getAttribute("class") || ""; 20205 } 20206 20207 function classesToArray(value) { 20208 if (Array.isArray(value)) { 20209 return value; 20210 } 20211 20212 if (typeof value === "string") { 20213 return value.match(rnothtmlwhite) || []; 20214 } 20215 20216 return []; 20217 } 20218 20219 jQuery.fn.extend({ 20220 addClass: function addClass(value) { 20221 var classes, 20222 elem, 20223 cur, 20224 curValue, 20225 clazz, 20226 j, 20227 finalValue, 20228 i = 0; 20229 20230 if (isFunction(value)) { 20231 return this.each(function (j) { 20232 jQuery(this).addClass(value.call(this, j, getClass(this))); 20233 }); 20234 } 20235 20236 classes = classesToArray(value); 20237 20238 if (classes.length) { 20239 while (elem = this[i++]) { 20240 curValue = getClass(elem); 20241 cur = elem.nodeType === 1 && " " + stripAndCollapse(curValue) + " "; 20242 20243 if (cur) { 20244 j = 0; 20245 20246 while (clazz = classes[j++]) { 20247 if (cur.indexOf(" " + clazz + " ") < 0) { 20248 cur += clazz + " "; 20249 } 20250 } // Only assign if different to avoid unneeded rendering. 20251 20252 20253 finalValue = stripAndCollapse(cur); 20254 20255 if (curValue !== finalValue) { 20256 elem.setAttribute("class", finalValue); 20257 } 20258 } 20259 } 20260 } 20261 20262 return this; 20263 }, 20264 removeClass: function removeClass(value) { 20265 var classes, 20266 elem, 20267 cur, 20268 curValue, 20269 clazz, 20270 j, 20271 finalValue, 20272 i = 0; 20273 20274 if (isFunction(value)) { 20275 return this.each(function (j) { 20276 jQuery(this).removeClass(value.call(this, j, getClass(this))); 20277 }); 20278 } 20279 20280 if (!arguments.length) { 20281 return this.attr("class", ""); 20282 } 20283 20284 classes = classesToArray(value); 20285 20286 if (classes.length) { 20287 while (elem = this[i++]) { 20288 curValue = getClass(elem); // This expression is here for better compressibility (see addClass) 20289 20290 cur = elem.nodeType === 1 && " " + stripAndCollapse(curValue) + " "; 20291 20292 if (cur) { 20293 j = 0; 20294 20295 while (clazz = classes[j++]) { 20296 // Remove *all* instances 20297 while (cur.indexOf(" " + clazz + " ") > -1) { 20298 cur = cur.replace(" " + clazz + " ", " "); 20299 } 20300 } // Only assign if different to avoid unneeded rendering. 20301 20302 20303 finalValue = stripAndCollapse(cur); 20304 20305 if (curValue !== finalValue) { 20306 elem.setAttribute("class", finalValue); 20307 } 20308 } 20309 } 20310 } 20311 20312 return this; 20313 }, 20314 toggleClass: function toggleClass(value, stateVal) { 20315 var type = _typeof(value), 20316 isValidValue = type === "string" || Array.isArray(value); 20317 20318 if (typeof stateVal === "boolean" && isValidValue) { 20319 return stateVal ? this.addClass(value) : this.removeClass(value); 20320 } 20321 20322 if (isFunction(value)) { 20323 return this.each(function (i) { 20324 jQuery(this).toggleClass(value.call(this, i, getClass(this), stateVal), stateVal); 20325 }); 20326 } 20327 20328 return this.each(function () { 20329 var className, i, self, classNames; 20330 20331 if (isValidValue) { 20332 // Toggle individual class names 20333 i = 0; 20334 self = jQuery(this); 20335 classNames = classesToArray(value); 20336 20337 while (className = classNames[i++]) { 20338 // Check each className given, space separated list 20339 if (self.hasClass(className)) { 20340 self.removeClass(className); 20341 } else { 20342 self.addClass(className); 20343 } 20344 } // Toggle whole class name 20345 20346 } else if (value === undefined || type === "boolean") { 20347 className = getClass(this); 20348 20349 if (className) { 20350 // Store className if set 20351 dataPriv.set(this, "__className__", className); 20352 } // If the element has a class name or if we're passed `false`, 20353 // then remove the whole classname (if there was one, the above saved it). 20354 // Otherwise bring back whatever was previously saved (if anything), 20355 // falling back to the empty string if nothing was stored. 20356 20357 20358 if (this.setAttribute) { 20359 this.setAttribute("class", className || value === false ? "" : dataPriv.get(this, "__className__") || ""); 20360 } 20361 } 20362 }); 20363 }, 20364 hasClass: function hasClass(selector) { 20365 var className, 20366 elem, 20367 i = 0; 20368 className = " " + selector + " "; 20369 20370 while (elem = this[i++]) { 20371 if (elem.nodeType === 1 && (" " + stripAndCollapse(getClass(elem)) + " ").indexOf(className) > -1) { 20372 return true; 20373 } 20374 } 20375 20376 return false; 20377 } 20378 }); 20379 var rreturn = /\r/g; 20380 jQuery.fn.extend({ 20381 val: function val(value) { 20382 var hooks, 20383 ret, 20384 valueIsFunction, 20385 elem = this[0]; 20386 20387 if (!arguments.length) { 20388 if (elem) { 20389 hooks = jQuery.valHooks[elem.type] || jQuery.valHooks[elem.nodeName.toLowerCase()]; 20390 20391 if (hooks && "get" in hooks && (ret = hooks.get(elem, "value")) !== undefined) { 20392 return ret; 20393 } 20394 20395 ret = elem.value; // Handle most common string cases 20396 20397 if (typeof ret === "string") { 20398 return ret.replace(rreturn, ""); 20399 } // Handle cases where value is null/undef or number 20400 20401 20402 return ret == null ? "" : ret; 20403 } 20404 20405 return; 20406 } 20407 20408 valueIsFunction = isFunction(value); 20409 return this.each(function (i) { 20410 var val; 20411 20412 if (this.nodeType !== 1) { 20413 return; 20414 } 20415 20416 if (valueIsFunction) { 20417 val = value.call(this, i, jQuery(this).val()); 20418 } else { 20419 val = value; 20420 } // Treat null/undefined as ""; convert numbers to string 20421 20422 20423 if (val == null) { 20424 val = ""; 20425 } else if (typeof val === "number") { 20426 val += ""; 20427 } else if (Array.isArray(val)) { 20428 val = jQuery.map(val, function (value) { 20429 return value == null ? "" : value + ""; 20430 }); 20431 } 20432 20433 hooks = jQuery.valHooks[this.type] || jQuery.valHooks[this.nodeName.toLowerCase()]; // If set returns undefined, fall back to normal setting 20434 20435 if (!hooks || !("set" in hooks) || hooks.set(this, val, "value") === undefined) { 20436 this.value = val; 20437 } 20438 }); 20439 } 20440 }); 20441 jQuery.extend({ 20442 valHooks: { 20443 option: { 20444 get: function get(elem) { 20445 var val = jQuery.find.attr(elem, "value"); 20446 return val != null ? val : // Support: IE <=10 - 11 only 20447 // option.text throws exceptions (#14686, #14858) 20448 // Strip and collapse whitespace 20449 // https://html.spec.whatwg.org/#strip-and-collapse-whitespace 20450 stripAndCollapse(jQuery.text(elem)); 20451 } 20452 }, 20453 select: { 20454 get: function get(elem) { 20455 var value, 20456 option, 20457 i, 20458 options = elem.options, 20459 index = elem.selectedIndex, 20460 one = elem.type === "select-one", 20461 values = one ? null : [], 20462 max = one ? index + 1 : options.length; 20463 20464 if (index < 0) { 20465 i = max; 20466 } else { 20467 i = one ? index : 0; 20468 } // Loop through all the selected options 20469 20470 20471 for (; i < max; i++) { 20472 option = options[i]; // Support: IE <=9 only 20473 // IE8-9 doesn't update selected after form reset (#2551) 20474 20475 if ((option.selected || i === index) && // Don't return options that are disabled or in a disabled optgroup 20476 !option.disabled && (!option.parentNode.disabled || !nodeName(option.parentNode, "optgroup"))) { 20477 // Get the specific value for the option 20478 value = jQuery(option).val(); // We don't need an array for one selects 20479 20480 if (one) { 20481 return value; 20482 } // Multi-Selects return an array 20483 20484 20485 values.push(value); 20486 } 20487 } 20488 20489 return values; 20490 }, 20491 set: function set(elem, value) { 20492 var optionSet, 20493 option, 20494 options = elem.options, 20495 values = jQuery.makeArray(value), 20496 i = options.length; 20497 20498 while (i--) { 20499 option = options[i]; 20500 /* eslint-disable no-cond-assign */ 20501 20502 if (option.selected = jQuery.inArray(jQuery.valHooks.option.get(option), values) > -1) { 20503 optionSet = true; 20504 } 20505 /* eslint-enable no-cond-assign */ 20506 20507 } // Force browsers to behave consistently when non-matching value is set 20508 20509 20510 if (!optionSet) { 20511 elem.selectedIndex = -1; 20512 } 20513 20514 return values; 20515 } 20516 } 20517 } 20518 }); // Radios and checkboxes getter/setter 20519 20520 jQuery.each(["radio", "checkbox"], function () { 20521 jQuery.valHooks[this] = { 20522 set: function set(elem, value) { 20523 if (Array.isArray(value)) { 20524 return elem.checked = jQuery.inArray(jQuery(elem).val(), value) > -1; 20525 } 20526 } 20527 }; 20528 20529 if (!support.checkOn) { 20530 jQuery.valHooks[this].get = function (elem) { 20531 return elem.getAttribute("value") === null ? "on" : elem.value; 20532 }; 20533 } 20534 }); // Return jQuery for attributes-only inclusion 20535 20536 support.focusin = "onfocusin" in window; 20537 20538 var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, 20539 stopPropagationCallback = function stopPropagationCallback(e) { 20540 e.stopPropagation(); 20541 }; 20542 20543 jQuery.extend(jQuery.event, { 20544 trigger: function trigger(event, data, elem, onlyHandlers) { 20545 var i, 20546 cur, 20547 tmp, 20548 bubbleType, 20549 ontype, 20550 handle, 20551 special, 20552 lastElement, 20553 eventPath = [elem || document], 20554 type = hasOwn.call(event, "type") ? event.type : event, 20555 namespaces = hasOwn.call(event, "namespace") ? event.namespace.split(".") : []; 20556 cur = lastElement = tmp = elem = elem || document; // Don't do events on text and comment nodes 20557 20558 if (elem.nodeType === 3 || elem.nodeType === 8) { 20559 return; 20560 } // focus/blur morphs to focusin/out; ensure we're not firing them right now 20561 20562 20563 if (rfocusMorph.test(type + jQuery.event.triggered)) { 20564 return; 20565 } 20566 20567 if (type.indexOf(".") > -1) { 20568 // Namespaced trigger; create a regexp to match event type in handle() 20569 namespaces = type.split("."); 20570 type = namespaces.shift(); 20571 namespaces.sort(); 20572 } 20573 20574 ontype = type.indexOf(":") < 0 && "on" + type; // Caller can pass in a jQuery.Event object, Object, or just an event type string 20575 20576 event = event[jQuery.expando] ? event : new jQuery.Event(type, _typeof(event) === "object" && event); // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) 20577 20578 event.isTrigger = onlyHandlers ? 2 : 3; 20579 event.namespace = namespaces.join("."); 20580 event.rnamespace = event.namespace ? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)") : null; // Clean up the event in case it is being reused 20581 20582 event.result = undefined; 20583 20584 if (!event.target) { 20585 event.target = elem; 20586 } // Clone any incoming data and prepend the event, creating the handler arg list 20587 20588 20589 data = data == null ? [event] : jQuery.makeArray(data, [event]); // Allow special events to draw outside the lines 20590 20591 special = jQuery.event.special[type] || {}; 20592 20593 if (!onlyHandlers && special.trigger && special.trigger.apply(elem, data) === false) { 20594 return; 20595 } // Determine event propagation path in advance, per W3C events spec (#9951) 20596 // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) 20597 20598 20599 if (!onlyHandlers && !special.noBubble && !isWindow(elem)) { 20600 bubbleType = special.delegateType || type; 20601 20602 if (!rfocusMorph.test(bubbleType + type)) { 20603 cur = cur.parentNode; 20604 } 20605 20606 for (; cur; cur = cur.parentNode) { 20607 eventPath.push(cur); 20608 tmp = cur; 20609 } // Only add window if we got to document (e.g., not plain obj or detached DOM) 20610 20611 20612 if (tmp === (elem.ownerDocument || document)) { 20613 eventPath.push(tmp.defaultView || tmp.parentWindow || window); 20614 } 20615 } // Fire handlers on the event path 20616 20617 20618 i = 0; 20619 20620 while ((cur = eventPath[i++]) && !event.isPropagationStopped()) { 20621 lastElement = cur; 20622 event.type = i > 1 ? bubbleType : special.bindType || type; // jQuery handler 20623 20624 handle = (dataPriv.get(cur, "events") || {})[event.type] && dataPriv.get(cur, "handle"); 20625 20626 if (handle) { 20627 handle.apply(cur, data); 20628 } // Native handler 20629 20630 20631 handle = ontype && cur[ontype]; 20632 20633 if (handle && handle.apply && acceptData(cur)) { 20634 event.result = handle.apply(cur, data); 20635 20636 if (event.result === false) { 20637 event.preventDefault(); 20638 } 20639 } 20640 } 20641 20642 event.type = type; // If nobody prevented the default action, do it now 20643 20644 if (!onlyHandlers && !event.isDefaultPrevented()) { 20645 if ((!special._default || special._default.apply(eventPath.pop(), data) === false) && acceptData(elem)) { 20646 // Call a native DOM method on the target with the same name as the event. 20647 // Don't do default actions on window, that's where global variables be (#6170) 20648 if (ontype && isFunction(elem[type]) && !isWindow(elem)) { 20649 // Don't re-trigger an onFOO event when we call its FOO() method 20650 tmp = elem[ontype]; 20651 20652 if (tmp) { 20653 elem[ontype] = null; 20654 } // Prevent re-triggering of the same event, since we already bubbled it above 20655 20656 20657 jQuery.event.triggered = type; 20658 20659 if (event.isPropagationStopped()) { 20660 lastElement.addEventListener(type, stopPropagationCallback); 20661 } 20662 20663 elem[type](); 20664 20665 if (event.isPropagationStopped()) { 20666 lastElement.removeEventListener(type, stopPropagationCallback); 20667 } 20668 20669 jQuery.event.triggered = undefined; 20670 20671 if (tmp) { 20672 elem[ontype] = tmp; 20673 } 20674 } 20675 } 20676 } 20677 20678 return event.result; 20679 }, 20680 // Piggyback on a donor event to simulate a different one 20681 // Used only for `focus(in | out)` events 20682 simulate: function simulate(type, elem, event) { 20683 var e = jQuery.extend(new jQuery.Event(), event, { 20684 type: type, 20685 isSimulated: true 20686 }); 20687 jQuery.event.trigger(e, null, elem); 20688 } 20689 }); 20690 jQuery.fn.extend({ 20691 trigger: function trigger(type, data) { 20692 return this.each(function () { 20693 jQuery.event.trigger(type, data, this); 20694 }); 20695 }, 20696 triggerHandler: function triggerHandler(type, data) { 20697 var elem = this[0]; 20698 20699 if (elem) { 20700 return jQuery.event.trigger(type, data, elem, true); 20701 } 20702 } 20703 }); // Support: Firefox <=44 20704 // Firefox doesn't have focus(in | out) events 20705 // Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 20706 // 20707 // Support: Chrome <=48 - 49, Safari <=9.0 - 9.1 20708 // focus(in | out) events fire after focus & blur events, 20709 // which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order 20710 // Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857 20711 20712 if (!support.focusin) { 20713 jQuery.each({ 20714 focus: "focusin", 20715 blur: "focusout" 20716 }, function (orig, fix) { 20717 // Attach a single capturing handler on the document while someone wants focusin/focusout 20718 var handler = function handler(event) { 20719 jQuery.event.simulate(fix, event.target, jQuery.event.fix(event)); 20720 }; 20721 20722 jQuery.event.special[fix] = { 20723 setup: function setup() { 20724 var doc = this.ownerDocument || this, 20725 attaches = dataPriv.access(doc, fix); 20726 20727 if (!attaches) { 20728 doc.addEventListener(orig, handler, true); 20729 } 20730 20731 dataPriv.access(doc, fix, (attaches || 0) + 1); 20732 }, 20733 teardown: function teardown() { 20734 var doc = this.ownerDocument || this, 20735 attaches = dataPriv.access(doc, fix) - 1; 20736 20737 if (!attaches) { 20738 doc.removeEventListener(orig, handler, true); 20739 dataPriv.remove(doc, fix); 20740 } else { 20741 dataPriv.access(doc, fix, attaches); 20742 } 20743 } 20744 }; 20745 }); 20746 } 20747 20748 var location = window.location; 20749 var nonce = Date.now(); 20750 var rquery = /\?/; // Cross-browser xml parsing 20751 20752 jQuery.parseXML = function (data) { 20753 var xml; 20754 20755 if (!data || typeof data !== "string") { 20756 return null; 20757 } // Support: IE 9 - 11 only 20758 // IE throws on parseFromString with invalid input. 20759 20760 20761 try { 20762 xml = new window.DOMParser().parseFromString(data, "text/xml"); 20763 } catch (e) { 20764 xml = undefined; 20765 } 20766 20767 if (!xml || xml.getElementsByTagName("parsererror").length) { 20768 jQuery.error("Invalid XML: " + data); 20769 } 20770 20771 return xml; 20772 }; 20773 20774 var rbracket = /\[\]$/, 20775 rCRLF = /\r?\n/g, 20776 rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, 20777 rsubmittable = /^(?:input|select|textarea|keygen)/i; 20778 20779 function buildParams(prefix, obj, traditional, add) { 20780 var name; 20781 20782 if (Array.isArray(obj)) { 20783 // Serialize array item. 20784 jQuery.each(obj, function (i, v) { 20785 if (traditional || rbracket.test(prefix)) { 20786 // Treat each array item as a scalar. 20787 add(prefix, v); 20788 } else { 20789 // Item is non-scalar (array or object), encode its numeric index. 20790 buildParams(prefix + "[" + (_typeof(v) === "object" && v != null ? i : "") + "]", v, traditional, add); 20791 } 20792 }); 20793 } else if (!traditional && toType(obj) === "object") { 20794 // Serialize object item. 20795 for (name in obj) { 20796 buildParams(prefix + "[" + name + "]", obj[name], traditional, add); 20797 } 20798 } else { 20799 // Serialize scalar item. 20800 add(prefix, obj); 20801 } 20802 } // Serialize an array of form elements or a set of 20803 // key/values into a query string 20804 20805 20806 jQuery.param = function (a, traditional) { 20807 var prefix, 20808 s = [], 20809 add = function add(key, valueOrFunction) { 20810 // If value is a function, invoke it and use its return value 20811 var value = isFunction(valueOrFunction) ? valueOrFunction() : valueOrFunction; 20812 s[s.length] = encodeURIComponent(key) + "=" + encodeURIComponent(value == null ? "" : value); 20813 }; 20814 20815 if (a == null) { 20816 return ""; 20817 } // If an array was passed in, assume that it is an array of form elements. 20818 20819 20820 if (Array.isArray(a) || a.jquery && !jQuery.isPlainObject(a)) { 20821 // Serialize the form elements 20822 jQuery.each(a, function () { 20823 add(this.name, this.value); 20824 }); 20825 } else { 20826 // If traditional, encode the "old" way (the way 1.3.2 or older 20827 // did it), otherwise encode params recursively. 20828 for (prefix in a) { 20829 buildParams(prefix, a[prefix], traditional, add); 20830 } 20831 } // Return the resulting serialization 20832 20833 20834 return s.join("&"); 20835 }; 20836 20837 jQuery.fn.extend({ 20838 serialize: function serialize() { 20839 return jQuery.param(this.serializeArray()); 20840 }, 20841 serializeArray: function serializeArray() { 20842 return this.map(function () { 20843 // Can add propHook for "elements" to filter or add form elements 20844 var elements = jQuery.prop(this, "elements"); 20845 return elements ? jQuery.makeArray(elements) : this; 20846 }).filter(function () { 20847 var type = this.type; // Use .is( ":disabled" ) so that fieldset[disabled] works 20848 20849 return this.name && !jQuery(this).is(":disabled") && rsubmittable.test(this.nodeName) && !rsubmitterTypes.test(type) && (this.checked || !rcheckableType.test(type)); 20850 }).map(function (i, elem) { 20851 var val = jQuery(this).val(); 20852 20853 if (val == null) { 20854 return null; 20855 } 20856 20857 if (Array.isArray(val)) { 20858 return jQuery.map(val, function (val) { 20859 return { 20860 name: elem.name, 20861 value: val.replace(rCRLF, "\r\n") 20862 }; 20863 }); 20864 } 20865 20866 return { 20867 name: elem.name, 20868 value: val.replace(rCRLF, "\r\n") 20869 }; 20870 }).get(); 20871 } 20872 }); 20873 var r20 = /%20/g, 20874 rhash = /#.*$/, 20875 rantiCache = /([?&])_=[^&]*/, 20876 rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, 20877 // #7653, #8125, #8152: local protocol detection 20878 rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, 20879 rnoContent = /^(?:GET|HEAD)$/, 20880 rprotocol = /^\/\//, 20881 20882 /* Prefilters 20883 * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) 20884 * 2) These are called: 20885 * - BEFORE asking for a transport 20886 * - AFTER param serialization (s.data is a string if s.processData is true) 20887 * 3) key is the dataType 20888 * 4) the catchall symbol "*" can be used 20889 * 5) execution will start with transport dataType and THEN continue down to "*" if needed 20890 */ 20891 prefilters = {}, 20892 20893 /* Transports bindings 20894 * 1) key is the dataType 20895 * 2) the catchall symbol "*" can be used 20896 * 3) selection will start with transport dataType and THEN go to "*" if needed 20897 */ 20898 transports = {}, 20899 // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression 20900 allTypes = "*/".concat("*"), 20901 // Anchor tag for parsing the document origin 20902 originAnchor = document.createElement("a"); 20903 originAnchor.href = location.href; // Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport 20904 20905 function addToPrefiltersOrTransports(structure) { 20906 // dataTypeExpression is optional and defaults to "*" 20907 return function (dataTypeExpression, func) { 20908 if (typeof dataTypeExpression !== "string") { 20909 func = dataTypeExpression; 20910 dataTypeExpression = "*"; 20911 } 20912 20913 var dataType, 20914 i = 0, 20915 dataTypes = dataTypeExpression.toLowerCase().match(rnothtmlwhite) || []; 20916 20917 if (isFunction(func)) { 20918 // For each dataType in the dataTypeExpression 20919 while (dataType = dataTypes[i++]) { 20920 // Prepend if requested 20921 if (dataType[0] === "+") { 20922 dataType = dataType.slice(1) || "*"; 20923 (structure[dataType] = structure[dataType] || []).unshift(func); // Otherwise append 20924 } else { 20925 (structure[dataType] = structure[dataType] || []).push(func); 20926 } 20927 } 20928 } 20929 }; 20930 } // Base inspection function for prefilters and transports 20931 20932 20933 function inspectPrefiltersOrTransports(structure, options, originalOptions, jqXHR) { 20934 var inspected = {}, 20935 seekingTransport = structure === transports; 20936 20937 function inspect(dataType) { 20938 var selected; 20939 inspected[dataType] = true; 20940 jQuery.each(structure[dataType] || [], function (_, prefilterOrFactory) { 20941 var dataTypeOrTransport = prefilterOrFactory(options, originalOptions, jqXHR); 20942 20943 if (typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[dataTypeOrTransport]) { 20944 options.dataTypes.unshift(dataTypeOrTransport); 20945 inspect(dataTypeOrTransport); 20946 return false; 20947 } else if (seekingTransport) { 20948 return !(selected = dataTypeOrTransport); 20949 } 20950 }); 20951 return selected; 20952 } 20953 20954 return inspect(options.dataTypes[0]) || !inspected["*"] && inspect("*"); 20955 } // A special extend for ajax options 20956 // that takes "flat" options (not to be deep extended) 20957 // Fixes #9887 20958 20959 20960 function ajaxExtend(target, src) { 20961 var key, 20962 deep, 20963 flatOptions = jQuery.ajaxSettings.flatOptions || {}; 20964 20965 for (key in src) { 20966 if (src[key] !== undefined) { 20967 (flatOptions[key] ? target : deep || (deep = {}))[key] = src[key]; 20968 } 20969 } 20970 20971 if (deep) { 20972 jQuery.extend(true, target, deep); 20973 } 20974 20975 return target; 20976 } 20977 /* Handles responses to an ajax request: 20978 * - finds the right dataType (mediates between content-type and expected dataType) 20979 * - returns the corresponding response 20980 */ 20981 20982 20983 function ajaxHandleResponses(s, jqXHR, responses) { 20984 var ct, 20985 type, 20986 finalDataType, 20987 firstDataType, 20988 contents = s.contents, 20989 dataTypes = s.dataTypes; // Remove auto dataType and get content-type in the process 20990 20991 while (dataTypes[0] === "*") { 20992 dataTypes.shift(); 20993 20994 if (ct === undefined) { 20995 ct = s.mimeType || jqXHR.getResponseHeader("Content-Type"); 20996 } 20997 } // Check if we're dealing with a known content-type 20998 20999 21000 if (ct) { 21001 for (type in contents) { 21002 if (contents[type] && contents[type].test(ct)) { 21003 dataTypes.unshift(type); 21004 break; 21005 } 21006 } 21007 } // Check to see if we have a response for the expected dataType 21008 21009 21010 if (dataTypes[0] in responses) { 21011 finalDataType = dataTypes[0]; 21012 } else { 21013 // Try convertible dataTypes 21014 for (type in responses) { 21015 if (!dataTypes[0] || s.converters[type + " " + dataTypes[0]]) { 21016 finalDataType = type; 21017 break; 21018 } 21019 21020 if (!firstDataType) { 21021 firstDataType = type; 21022 } 21023 } // Or just use first one 21024 21025 21026 finalDataType = finalDataType || firstDataType; 21027 } // If we found a dataType 21028 // We add the dataType to the list if needed 21029 // and return the corresponding response 21030 21031 21032 if (finalDataType) { 21033 if (finalDataType !== dataTypes[0]) { 21034 dataTypes.unshift(finalDataType); 21035 } 21036 21037 return responses[finalDataType]; 21038 } 21039 } 21040 /* Chain conversions given the request and the original response 21041 * Also sets the responseXXX fields on the jqXHR instance 21042 */ 21043 21044 21045 function ajaxConvert(s, response, jqXHR, isSuccess) { 21046 var conv2, 21047 current, 21048 conv, 21049 tmp, 21050 prev, 21051 converters = {}, 21052 // Work with a copy of dataTypes in case we need to modify it for conversion 21053 dataTypes = s.dataTypes.slice(); // Create converters map with lowercased keys 21054 21055 if (dataTypes[1]) { 21056 for (conv in s.converters) { 21057 converters[conv.toLowerCase()] = s.converters[conv]; 21058 } 21059 } 21060 21061 current = dataTypes.shift(); // Convert to each sequential dataType 21062 21063 while (current) { 21064 if (s.responseFields[current]) { 21065 jqXHR[s.responseFields[current]] = response; 21066 } // Apply the dataFilter if provided 21067 21068 21069 if (!prev && isSuccess && s.dataFilter) { 21070 response = s.dataFilter(response, s.dataType); 21071 } 21072 21073 prev = current; 21074 current = dataTypes.shift(); 21075 21076 if (current) { 21077 // There's only work to do if current dataType is non-auto 21078 if (current === "*") { 21079 current = prev; // Convert response if prev dataType is non-auto and differs from current 21080 } else if (prev !== "*" && prev !== current) { 21081 // Seek a direct converter 21082 conv = converters[prev + " " + current] || converters["* " + current]; // If none found, seek a pair 21083 21084 if (!conv) { 21085 for (conv2 in converters) { 21086 // If conv2 outputs current 21087 tmp = conv2.split(" "); 21088 21089 if (tmp[1] === current) { 21090 // If prev can be converted to accepted input 21091 conv = converters[prev + " " + tmp[0]] || converters["* " + tmp[0]]; 21092 21093 if (conv) { 21094 // Condense equivalence converters 21095 if (conv === true) { 21096 conv = converters[conv2]; // Otherwise, insert the intermediate dataType 21097 } else if (converters[conv2] !== true) { 21098 current = tmp[0]; 21099 dataTypes.unshift(tmp[1]); 21100 } 21101 21102 break; 21103 } 21104 } 21105 } 21106 } // Apply converter (if not an equivalence) 21107 21108 21109 if (conv !== true) { 21110 // Unless errors are allowed to bubble, catch and return them 21111 if (conv && s.throws) { 21112 response = conv(response); 21113 } else { 21114 try { 21115 response = conv(response); 21116 } catch (e) { 21117 return { 21118 state: "parsererror", 21119 error: conv ? e : "No conversion from " + prev + " to " + current 21120 }; 21121 } 21122 } 21123 } 21124 } 21125 } 21126 } 21127 21128 return { 21129 state: "success", 21130 data: response 21131 }; 21132 } 21133 21134 jQuery.extend({ 21135 // Counter for holding the number of active queries 21136 active: 0, 21137 // Last-Modified header cache for next request 21138 lastModified: {}, 21139 etag: {}, 21140 ajaxSettings: { 21141 url: location.href, 21142 type: "GET", 21143 isLocal: rlocalProtocol.test(location.protocol), 21144 global: true, 21145 processData: true, 21146 async: true, 21147 contentType: "application/x-www-form-urlencoded; charset=UTF-8", 21148 21149 /* 21150 timeout: 0, 21151 data: null, 21152 dataType: null, 21153 username: null, 21154 password: null, 21155 cache: null, 21156 throws: false, 21157 traditional: false, 21158 headers: {}, 21159 */ 21160 accepts: { 21161 "*": allTypes, 21162 text: "text/plain", 21163 html: "text/html", 21164 xml: "application/xml, text/xml", 21165 json: "application/json, text/javascript" 21166 }, 21167 contents: { 21168 xml: /\bxml\b/, 21169 html: /\bhtml/, 21170 json: /\bjson\b/ 21171 }, 21172 responseFields: { 21173 xml: "responseXML", 21174 text: "responseText", 21175 json: "responseJSON" 21176 }, 21177 // Data converters 21178 // Keys separate source (or catchall "*") and destination types with a single space 21179 converters: { 21180 // Convert anything to text 21181 "* text": String, 21182 // Text to html (true = no transformation) 21183 "text html": true, 21184 // Evaluate text as a json expression 21185 "text json": JSON.parse, 21186 // Parse text as xml 21187 "text xml": jQuery.parseXML 21188 }, 21189 // For options that shouldn't be deep extended: 21190 // you can add your own custom options here if 21191 // and when you create one that shouldn't be 21192 // deep extended (see ajaxExtend) 21193 flatOptions: { 21194 url: true, 21195 context: true 21196 } 21197 }, 21198 // Creates a full fledged settings object into target 21199 // with both ajaxSettings and settings fields. 21200 // If target is omitted, writes into ajaxSettings. 21201 ajaxSetup: function ajaxSetup(target, settings) { 21202 return settings ? // Building a settings object 21203 ajaxExtend(ajaxExtend(target, jQuery.ajaxSettings), settings) : // Extending ajaxSettings 21204 ajaxExtend(jQuery.ajaxSettings, target); 21205 }, 21206 ajaxPrefilter: addToPrefiltersOrTransports(prefilters), 21207 ajaxTransport: addToPrefiltersOrTransports(transports), 21208 // Main method 21209 ajax: function ajax(url, options) { 21210 // If url is an object, simulate pre-1.5 signature 21211 if (_typeof(url) === "object") { 21212 options = url; 21213 url = undefined; 21214 } // Force options to be an object 21215 21216 21217 options = options || {}; 21218 21219 var transport, 21220 // URL without anti-cache param 21221 cacheURL, 21222 // Response headers 21223 responseHeadersString, 21224 responseHeaders, 21225 // timeout handle 21226 timeoutTimer, 21227 // Url cleanup var 21228 urlAnchor, 21229 // Request state (becomes false upon send and true upon completion) 21230 completed, 21231 // To know if global events are to be dispatched 21232 fireGlobals, 21233 // Loop variable 21234 i, 21235 // uncached part of the url 21236 uncached, 21237 // Create the final options object 21238 s = jQuery.ajaxSetup({}, options), 21239 // Callbacks context 21240 callbackContext = s.context || s, 21241 // Context for global events is callbackContext if it is a DOM node or jQuery collection 21242 globalEventContext = s.context && (callbackContext.nodeType || callbackContext.jquery) ? jQuery(callbackContext) : jQuery.event, 21243 // Deferreds 21244 deferred = jQuery.Deferred(), 21245 completeDeferred = jQuery.Callbacks("once memory"), 21246 // Status-dependent callbacks 21247 _statusCode = s.statusCode || {}, 21248 // Headers (they are sent all at once) 21249 requestHeaders = {}, 21250 requestHeadersNames = {}, 21251 // Default abort message 21252 strAbort = "canceled", 21253 // Fake xhr 21254 jqXHR = { 21255 readyState: 0, 21256 // Builds headers hashtable if needed 21257 getResponseHeader: function getResponseHeader(key) { 21258 var match; 21259 21260 if (completed) { 21261 if (!responseHeaders) { 21262 responseHeaders = {}; 21263 21264 while (match = rheaders.exec(responseHeadersString)) { 21265 responseHeaders[match[1].toLowerCase() + " "] = (responseHeaders[match[1].toLowerCase() + " "] || []).concat(match[2]); 21266 } 21267 } 21268 21269 match = responseHeaders[key.toLowerCase() + " "]; 21270 } 21271 21272 return match == null ? null : match.join(", "); 21273 }, 21274 // Raw string 21275 getAllResponseHeaders: function getAllResponseHeaders() { 21276 return completed ? responseHeadersString : null; 21277 }, 21278 // Caches the header 21279 setRequestHeader: function setRequestHeader(name, value) { 21280 if (completed == null) { 21281 name = requestHeadersNames[name.toLowerCase()] = requestHeadersNames[name.toLowerCase()] || name; 21282 requestHeaders[name] = value; 21283 } 21284 21285 return this; 21286 }, 21287 // Overrides response content-type header 21288 overrideMimeType: function overrideMimeType(type) { 21289 if (completed == null) { 21290 s.mimeType = type; 21291 } 21292 21293 return this; 21294 }, 21295 // Status-dependent callbacks 21296 statusCode: function statusCode(map) { 21297 var code; 21298 21299 if (map) { 21300 if (completed) { 21301 // Execute the appropriate callbacks 21302 jqXHR.always(map[jqXHR.status]); 21303 } else { 21304 // Lazy-add the new callbacks in a way that preserves old ones 21305 for (code in map) { 21306 _statusCode[code] = [_statusCode[code], map[code]]; 21307 } 21308 } 21309 } 21310 21311 return this; 21312 }, 21313 // Cancel the request 21314 abort: function abort(statusText) { 21315 var finalText = statusText || strAbort; 21316 21317 if (transport) { 21318 transport.abort(finalText); 21319 } 21320 21321 done(0, finalText); 21322 return this; 21323 } 21324 }; // Attach deferreds 21325 21326 21327 deferred.promise(jqXHR); // Add protocol if not provided (prefilters might expect it) 21328 // Handle falsy url in the settings object (#10093: consistency with old signature) 21329 // We also use the url parameter if available 21330 21331 s.url = ((url || s.url || location.href) + "").replace(rprotocol, location.protocol + "//"); // Alias method option to type as per ticket #12004 21332 21333 s.type = options.method || options.type || s.method || s.type; // Extract dataTypes list 21334 21335 s.dataTypes = (s.dataType || "*").toLowerCase().match(rnothtmlwhite) || [""]; // A cross-domain request is in order when the origin doesn't match the current origin. 21336 21337 if (s.crossDomain == null) { 21338 urlAnchor = document.createElement("a"); // Support: IE <=8 - 11, Edge 12 - 15 21339 // IE throws exception on accessing the href property if url is malformed, 21340 // e.g. http://example.com:80x/ 21341 21342 try { 21343 urlAnchor.href = s.url; // Support: IE <=8 - 11 only 21344 // Anchor's host property isn't correctly set when s.url is relative 21345 21346 urlAnchor.href = urlAnchor.href; 21347 s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !== urlAnchor.protocol + "//" + urlAnchor.host; 21348 } catch (e) { 21349 // If there is an error parsing the URL, assume it is crossDomain, 21350 // it can be rejected by the transport if it is invalid 21351 s.crossDomain = true; 21352 } 21353 } // Convert data if not already a string 21354 21355 21356 if (s.data && s.processData && typeof s.data !== "string") { 21357 s.data = jQuery.param(s.data, s.traditional); 21358 } // Apply prefilters 21359 21360 21361 inspectPrefiltersOrTransports(prefilters, s, options, jqXHR); // If request was aborted inside a prefilter, stop there 21362 21363 if (completed) { 21364 return jqXHR; 21365 } // We can fire global events as of now if asked to 21366 // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118) 21367 21368 21369 fireGlobals = jQuery.event && s.global; // Watch for a new set of requests 21370 21371 if (fireGlobals && jQuery.active++ === 0) { 21372 jQuery.event.trigger("ajaxStart"); 21373 } // Uppercase the type 21374 21375 21376 s.type = s.type.toUpperCase(); // Determine if request has content 21377 21378 s.hasContent = !rnoContent.test(s.type); // Save the URL in case we're toying with the If-Modified-Since 21379 // and/or If-None-Match header later on 21380 // Remove hash to simplify url manipulation 21381 21382 cacheURL = s.url.replace(rhash, ""); // More options handling for requests with no content 21383 21384 if (!s.hasContent) { 21385 // Remember the hash so we can put it back 21386 uncached = s.url.slice(cacheURL.length); // If data is available and should be processed, append data to url 21387 21388 if (s.data && (s.processData || typeof s.data === "string")) { 21389 cacheURL += (rquery.test(cacheURL) ? "&" : "?") + s.data; // #9682: remove data so that it's not used in an eventual retry 21390 21391 delete s.data; 21392 } // Add or update anti-cache param if needed 21393 21394 21395 if (s.cache === false) { 21396 cacheURL = cacheURL.replace(rantiCache, "$1"); 21397 uncached = (rquery.test(cacheURL) ? "&" : "?") + "_=" + nonce++ + uncached; 21398 } // Put hash and anti-cache on the URL that will be requested (gh-1732) 21399 21400 21401 s.url = cacheURL + uncached; // Change '%20' to '+' if this is encoded form body content (gh-2658) 21402 } else if (s.data && s.processData && (s.contentType || "").indexOf("application/x-www-form-urlencoded") === 0) { 21403 s.data = s.data.replace(r20, "+"); 21404 } // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. 21405 21406 21407 if (s.ifModified) { 21408 if (jQuery.lastModified[cacheURL]) { 21409 jqXHR.setRequestHeader("If-Modified-Since", jQuery.lastModified[cacheURL]); 21410 } 21411 21412 if (jQuery.etag[cacheURL]) { 21413 jqXHR.setRequestHeader("If-None-Match", jQuery.etag[cacheURL]); 21414 } 21415 } // Set the correct header, if data is being sent 21416 21417 21418 if (s.data && s.hasContent && s.contentType !== false || options.contentType) { 21419 jqXHR.setRequestHeader("Content-Type", s.contentType); 21420 } // Set the Accepts header for the server, depending on the dataType 21421 21422 21423 jqXHR.setRequestHeader("Accept", s.dataTypes[0] && s.accepts[s.dataTypes[0]] ? s.accepts[s.dataTypes[0]] + (s.dataTypes[0] !== "*" ? ", " + allTypes + "; q=0.01" : "") : s.accepts["*"]); // Check for headers option 21424 21425 for (i in s.headers) { 21426 jqXHR.setRequestHeader(i, s.headers[i]); 21427 } // Allow custom headers/mimetypes and early abort 21428 21429 21430 if (s.beforeSend && (s.beforeSend.call(callbackContext, jqXHR, s) === false || completed)) { 21431 // Abort if not done already and return 21432 return jqXHR.abort(); 21433 } // Aborting is no longer a cancellation 21434 21435 21436 strAbort = "abort"; // Install callbacks on deferreds 21437 21438 completeDeferred.add(s.complete); 21439 jqXHR.done(s.success); 21440 jqXHR.fail(s.error); // Get transport 21441 21442 transport = inspectPrefiltersOrTransports(transports, s, options, jqXHR); // If no transport, we auto-abort 21443 21444 if (!transport) { 21445 done(-1, "No Transport"); 21446 } else { 21447 jqXHR.readyState = 1; // Send global event 21448 21449 if (fireGlobals) { 21450 globalEventContext.trigger("ajaxSend", [jqXHR, s]); 21451 } // If request was aborted inside ajaxSend, stop there 21452 21453 21454 if (completed) { 21455 return jqXHR; 21456 } // Timeout 21457 21458 21459 if (s.async && s.timeout > 0) { 21460 timeoutTimer = window.setTimeout(function () { 21461 jqXHR.abort("timeout"); 21462 }, s.timeout); 21463 } 21464 21465 try { 21466 completed = false; 21467 transport.send(requestHeaders, done); 21468 } catch (e) { 21469 // Rethrow post-completion exceptions 21470 if (completed) { 21471 throw e; 21472 } // Propagate others as results 21473 21474 21475 done(-1, e); 21476 } 21477 } // Callback for when everything is done 21478 21479 21480 function done(status, nativeStatusText, responses, headers) { 21481 var isSuccess, 21482 success, 21483 error, 21484 response, 21485 modified, 21486 statusText = nativeStatusText; // Ignore repeat invocations 21487 21488 if (completed) { 21489 return; 21490 } 21491 21492 completed = true; // Clear timeout if it exists 21493 21494 if (timeoutTimer) { 21495 window.clearTimeout(timeoutTimer); 21496 } // Dereference transport for early garbage collection 21497 // (no matter how long the jqXHR object will be used) 21498 21499 21500 transport = undefined; // Cache response headers 21501 21502 responseHeadersString = headers || ""; // Set readyState 21503 21504 jqXHR.readyState = status > 0 ? 4 : 0; // Determine if successful 21505 21506 isSuccess = status >= 200 && status < 300 || status === 304; // Get response data 21507 21508 if (responses) { 21509 response = ajaxHandleResponses(s, jqXHR, responses); 21510 } // Convert no matter what (that way responseXXX fields are always set) 21511 21512 21513 response = ajaxConvert(s, response, jqXHR, isSuccess); // If successful, handle type chaining 21514 21515 if (isSuccess) { 21516 // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. 21517 if (s.ifModified) { 21518 modified = jqXHR.getResponseHeader("Last-Modified"); 21519 21520 if (modified) { 21521 jQuery.lastModified[cacheURL] = modified; 21522 } 21523 21524 modified = jqXHR.getResponseHeader("etag"); 21525 21526 if (modified) { 21527 jQuery.etag[cacheURL] = modified; 21528 } 21529 } // if no content 21530 21531 21532 if (status === 204 || s.type === "HEAD") { 21533 statusText = "nocontent"; // if not modified 21534 } else if (status === 304) { 21535 statusText = "notmodified"; // If we have data, let's convert it 21536 } else { 21537 statusText = response.state; 21538 success = response.data; 21539 error = response.error; 21540 isSuccess = !error; 21541 } 21542 } else { 21543 // Extract error from statusText and normalize for non-aborts 21544 error = statusText; 21545 21546 if (status || !statusText) { 21547 statusText = "error"; 21548 21549 if (status < 0) { 21550 status = 0; 21551 } 21552 } 21553 } // Set data for the fake xhr object 21554 21555 21556 jqXHR.status = status; 21557 jqXHR.statusText = (nativeStatusText || statusText) + ""; // Success/Error 21558 21559 if (isSuccess) { 21560 deferred.resolveWith(callbackContext, [success, statusText, jqXHR]); 21561 } else { 21562 deferred.rejectWith(callbackContext, [jqXHR, statusText, error]); 21563 } // Status-dependent callbacks 21564 21565 21566 jqXHR.statusCode(_statusCode); 21567 _statusCode = undefined; 21568 21569 if (fireGlobals) { 21570 globalEventContext.trigger(isSuccess ? "ajaxSuccess" : "ajaxError", [jqXHR, s, isSuccess ? success : error]); 21571 } // Complete 21572 21573 21574 completeDeferred.fireWith(callbackContext, [jqXHR, statusText]); 21575 21576 if (fireGlobals) { 21577 globalEventContext.trigger("ajaxComplete", [jqXHR, s]); // Handle the global AJAX counter 21578 21579 if (! --jQuery.active) { 21580 jQuery.event.trigger("ajaxStop"); 21581 } 21582 } 21583 } 21584 21585 return jqXHR; 21586 }, 21587 getJSON: function getJSON(url, data, callback) { 21588 return jQuery.get(url, data, callback, "json"); 21589 }, 21590 getScript: function getScript(url, callback) { 21591 return jQuery.get(url, undefined, callback, "script"); 21592 } 21593 }); 21594 jQuery.each(["get", "post"], function (i, method) { 21595 jQuery[method] = function (url, data, callback, type) { 21596 // Shift arguments if data argument was omitted 21597 if (isFunction(data)) { 21598 type = type || callback; 21599 callback = data; 21600 data = undefined; 21601 } // The url can be an options object (which then must have .url) 21602 21603 21604 return jQuery.ajax(jQuery.extend({ 21605 url: url, 21606 type: method, 21607 dataType: type, 21608 data: data, 21609 success: callback 21610 }, jQuery.isPlainObject(url) && url)); 21611 }; 21612 }); 21613 21614 jQuery._evalUrl = function (url, options) { 21615 return jQuery.ajax({ 21616 url: url, 21617 // Make this explicit, since user can override this through ajaxSetup (#11264) 21618 type: "GET", 21619 dataType: "script", 21620 cache: true, 21621 async: false, 21622 global: false, 21623 // Only evaluate the response if it is successful (gh-4126) 21624 // dataFilter is not invoked for failure responses, so using it instead 21625 // of the default converter is kludgy but it works. 21626 converters: { 21627 "text script": function textScript() {} 21628 }, 21629 dataFilter: function dataFilter(response) { 21630 jQuery.globalEval(response, options); 21631 } 21632 }); 21633 }; 21634 21635 jQuery.fn.extend({ 21636 wrapAll: function wrapAll(html) { 21637 var wrap; 21638 21639 if (this[0]) { 21640 if (isFunction(html)) { 21641 html = html.call(this[0]); 21642 } // The elements to wrap the target around 21643 21644 21645 wrap = jQuery(html, this[0].ownerDocument).eq(0).clone(true); 21646 21647 if (this[0].parentNode) { 21648 wrap.insertBefore(this[0]); 21649 } 21650 21651 wrap.map(function () { 21652 var elem = this; 21653 21654 while (elem.firstElementChild) { 21655 elem = elem.firstElementChild; 21656 } 21657 21658 return elem; 21659 }).append(this); 21660 } 21661 21662 return this; 21663 }, 21664 wrapInner: function wrapInner(html) { 21665 if (isFunction(html)) { 21666 return this.each(function (i) { 21667 jQuery(this).wrapInner(html.call(this, i)); 21668 }); 21669 } 21670 21671 return this.each(function () { 21672 var self = jQuery(this), 21673 contents = self.contents(); 21674 21675 if (contents.length) { 21676 contents.wrapAll(html); 21677 } else { 21678 self.append(html); 21679 } 21680 }); 21681 }, 21682 wrap: function wrap(html) { 21683 var htmlIsFunction = isFunction(html); 21684 return this.each(function (i) { 21685 jQuery(this).wrapAll(htmlIsFunction ? html.call(this, i) : html); 21686 }); 21687 }, 21688 unwrap: function unwrap(selector) { 21689 this.parent(selector).not("body").each(function () { 21690 jQuery(this).replaceWith(this.childNodes); 21691 }); 21692 return this; 21693 } 21694 }); 21695 21696 jQuery.expr.pseudos.hidden = function (elem) { 21697 return !jQuery.expr.pseudos.visible(elem); 21698 }; 21699 21700 jQuery.expr.pseudos.visible = function (elem) { 21701 return !!(elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length); 21702 }; 21703 21704 jQuery.ajaxSettings.xhr = function () { 21705 try { 21706 return new window.XMLHttpRequest(); 21707 } catch (e) {} 21708 }; 21709 21710 var xhrSuccessStatus = { 21711 // File protocol always yields status code 0, assume 200 21712 0: 200, 21713 // Support: IE <=9 only 21714 // #1450: sometimes IE returns 1223 when it should be 204 21715 1223: 204 21716 }, 21717 xhrSupported = jQuery.ajaxSettings.xhr(); 21718 support.cors = !!xhrSupported && "withCredentials" in xhrSupported; 21719 support.ajax = xhrSupported = !!xhrSupported; 21720 jQuery.ajaxTransport(function (options) { 21721 var _callback, errorCallback; // Cross domain only allowed if supported through XMLHttpRequest 21722 21723 21724 if (support.cors || xhrSupported && !options.crossDomain) { 21725 return { 21726 send: function send(headers, complete) { 21727 var i, 21728 xhr = options.xhr(); 21729 xhr.open(options.type, options.url, options.async, options.username, options.password); // Apply custom fields if provided 21730 21731 if (options.xhrFields) { 21732 for (i in options.xhrFields) { 21733 xhr[i] = options.xhrFields[i]; 21734 } 21735 } // Override mime type if needed 21736 21737 21738 if (options.mimeType && xhr.overrideMimeType) { 21739 xhr.overrideMimeType(options.mimeType); 21740 } // X-Requested-With header 21741 // For cross-domain requests, seeing as conditions for a preflight are 21742 // akin to a jigsaw puzzle, we simply never set it to be sure. 21743 // (it can always be set on a per-request basis or even using ajaxSetup) 21744 // For same-domain requests, won't change header if already provided. 21745 21746 21747 if (!options.crossDomain && !headers["X-Requested-With"]) { 21748 headers["X-Requested-With"] = "XMLHttpRequest"; 21749 } // Set headers 21750 21751 21752 for (i in headers) { 21753 xhr.setRequestHeader(i, headers[i]); 21754 } // Callback 21755 21756 21757 _callback = function callback(type) { 21758 return function () { 21759 if (_callback) { 21760 _callback = errorCallback = xhr.onload = xhr.onerror = xhr.onabort = xhr.ontimeout = xhr.onreadystatechange = null; 21761 21762 if (type === "abort") { 21763 xhr.abort(); 21764 } else if (type === "error") { 21765 // Support: IE <=9 only 21766 // On a manual native abort, IE9 throws 21767 // errors on any property access that is not readyState 21768 if (typeof xhr.status !== "number") { 21769 complete(0, "error"); 21770 } else { 21771 complete( // File: protocol always yields status 0; see #8605, #14207 21772 xhr.status, xhr.statusText); 21773 } 21774 } else { 21775 complete(xhrSuccessStatus[xhr.status] || xhr.status, xhr.statusText, // Support: IE <=9 only 21776 // IE9 has no XHR2 but throws on binary (trac-11426) 21777 // For XHR2 non-text, let the caller handle it (gh-2498) 21778 (xhr.responseType || "text") !== "text" || typeof xhr.responseText !== "string" ? { 21779 binary: xhr.response 21780 } : { 21781 text: xhr.responseText 21782 }, xhr.getAllResponseHeaders()); 21783 } 21784 } 21785 }; 21786 }; // Listen to events 21787 21788 21789 xhr.onload = _callback(); 21790 errorCallback = xhr.onerror = xhr.ontimeout = _callback("error"); // Support: IE 9 only 21791 // Use onreadystatechange to replace onabort 21792 // to handle uncaught aborts 21793 21794 if (xhr.onabort !== undefined) { 21795 xhr.onabort = errorCallback; 21796 } else { 21797 xhr.onreadystatechange = function () { 21798 // Check readyState before timeout as it changes 21799 if (xhr.readyState === 4) { 21800 // Allow onerror to be called first, 21801 // but that will not handle a native abort 21802 // Also, save errorCallback to a variable 21803 // as xhr.onerror cannot be accessed 21804 window.setTimeout(function () { 21805 if (_callback) { 21806 errorCallback(); 21807 } 21808 }); 21809 } 21810 }; 21811 } // Create the abort callback 21812 21813 21814 _callback = _callback("abort"); 21815 21816 try { 21817 // Do send the request (this may raise an exception) 21818 xhr.send(options.hasContent && options.data || null); 21819 } catch (e) { 21820 // #14683: Only rethrow if this hasn't been notified as an error yet 21821 if (_callback) { 21822 throw e; 21823 } 21824 } 21825 }, 21826 abort: function abort() { 21827 if (_callback) { 21828 _callback(); 21829 } 21830 } 21831 }; 21832 } 21833 }); // Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432) 21834 21835 jQuery.ajaxPrefilter(function (s) { 21836 if (s.crossDomain) { 21837 s.contents.script = false; 21838 } 21839 }); // Install script dataType 21840 21841 jQuery.ajaxSetup({ 21842 accepts: { 21843 script: "text/javascript, application/javascript, " + "application/ecmascript, application/x-ecmascript" 21844 }, 21845 contents: { 21846 script: /\b(?:java|ecma)script\b/ 21847 }, 21848 converters: { 21849 "text script": function textScript(text) { 21850 jQuery.globalEval(text); 21851 return text; 21852 } 21853 } 21854 }); // Handle cache's special case and crossDomain 21855 21856 jQuery.ajaxPrefilter("script", function (s) { 21857 if (s.cache === undefined) { 21858 s.cache = false; 21859 } 21860 21861 if (s.crossDomain) { 21862 s.type = "GET"; 21863 } 21864 }); // Bind script tag hack transport 21865 21866 jQuery.ajaxTransport("script", function (s) { 21867 // This transport only deals with cross domain or forced-by-attrs requests 21868 if (s.crossDomain || s.scriptAttrs) { 21869 var script, _callback2; 21870 21871 return { 21872 send: function send(_, complete) { 21873 script = jQuery("<script>").attr(s.scriptAttrs || {}).prop({ 21874 charset: s.scriptCharset, 21875 src: s.url 21876 }).on("load error", _callback2 = function callback(evt) { 21877 script.remove(); 21878 _callback2 = null; 21879 21880 if (evt) { 21881 complete(evt.type === "error" ? 404 : 200, evt.type); 21882 } 21883 }); // Use native DOM manipulation to avoid our domManip AJAX trickery 21884 21885 document.head.appendChild(script[0]); 21886 }, 21887 abort: function abort() { 21888 if (_callback2) { 21889 _callback2(); 21890 } 21891 } 21892 }; 21893 } 21894 }); 21895 var oldCallbacks = [], 21896 rjsonp = /(=)\?(?=&|$)|\?\?/; // Default jsonp settings 21897 21898 jQuery.ajaxSetup({ 21899 jsonp: "callback", 21900 jsonpCallback: function jsonpCallback() { 21901 var callback = oldCallbacks.pop() || jQuery.expando + "_" + nonce++; 21902 this[callback] = true; 21903 return callback; 21904 } 21905 }); // Detect, normalize options and install callbacks for jsonp requests 21906 21907 jQuery.ajaxPrefilter("json jsonp", function (s, originalSettings, jqXHR) { 21908 var callbackName, 21909 overwritten, 21910 responseContainer, 21911 jsonProp = s.jsonp !== false && (rjsonp.test(s.url) ? "url" : typeof s.data === "string" && (s.contentType || "").indexOf("application/x-www-form-urlencoded") === 0 && rjsonp.test(s.data) && "data"); // Handle iff the expected data type is "jsonp" or we have a parameter to set 21912 21913 if (jsonProp || s.dataTypes[0] === "jsonp") { 21914 // Get callback name, remembering preexisting value associated with it 21915 callbackName = s.jsonpCallback = isFunction(s.jsonpCallback) ? s.jsonpCallback() : s.jsonpCallback; // Insert callback into url or form data 21916 21917 if (jsonProp) { 21918 s[jsonProp] = s[jsonProp].replace(rjsonp, "$1" + callbackName); 21919 } else if (s.jsonp !== false) { 21920 s.url += (rquery.test(s.url) ? "&" : "?") + s.jsonp + "=" + callbackName; 21921 } // Use data converter to retrieve json after script execution 21922 21923 21924 s.converters["script json"] = function () { 21925 if (!responseContainer) { 21926 jQuery.error(callbackName + " was not called"); 21927 } 21928 21929 return responseContainer[0]; 21930 }; // Force json dataType 21931 21932 21933 s.dataTypes[0] = "json"; // Install callback 21934 21935 overwritten = window[callbackName]; 21936 21937 window[callbackName] = function () { 21938 responseContainer = arguments; 21939 }; // Clean-up function (fires after converters) 21940 21941 21942 jqXHR.always(function () { 21943 // If previous value didn't exist - remove it 21944 if (overwritten === undefined) { 21945 jQuery(window).removeProp(callbackName); // Otherwise restore preexisting value 21946 } else { 21947 window[callbackName] = overwritten; 21948 } // Save back as free 21949 21950 21951 if (s[callbackName]) { 21952 // Make sure that re-using the options doesn't screw things around 21953 s.jsonpCallback = originalSettings.jsonpCallback; // Save the callback name for future use 21954 21955 oldCallbacks.push(callbackName); 21956 } // Call if it was a function and we have a response 21957 21958 21959 if (responseContainer && isFunction(overwritten)) { 21960 overwritten(responseContainer[0]); 21961 } 21962 21963 responseContainer = overwritten = undefined; 21964 }); // Delegate to script 21965 21966 return "script"; 21967 } 21968 }); // Support: Safari 8 only 21969 // In Safari 8 documents created via document.implementation.createHTMLDocument 21970 // collapse sibling forms: the second one becomes a child of the first one. 21971 // Because of that, this security measure has to be disabled in Safari 8. 21972 // https://bugs.webkit.org/show_bug.cgi?id=137337 21973 21974 support.createHTMLDocument = function () { 21975 var body = document.implementation.createHTMLDocument("").body; 21976 body.innerHTML = "<form></form><form></form>"; 21977 return body.childNodes.length === 2; 21978 }(); // Argument "data" should be string of html 21979 // context (optional): If specified, the fragment will be created in this context, 21980 // defaults to document 21981 // keepScripts (optional): If true, will include scripts passed in the html string 21982 21983 21984 jQuery.parseHTML = function (data, context, keepScripts) { 21985 if (typeof data !== "string") { 21986 return []; 21987 } 21988 21989 if (typeof context === "boolean") { 21990 keepScripts = context; 21991 context = false; 21992 } 21993 21994 var base, parsed, scripts; 21995 21996 if (!context) { 21997 // Stop scripts or inline event handlers from being executed immediately 21998 // by using document.implementation 21999 if (support.createHTMLDocument) { 22000 context = document.implementation.createHTMLDocument(""); // Set the base href for the created document 22001 // so any parsed elements with URLs 22002 // are based on the document's URL (gh-2965) 22003 22004 base = context.createElement("base"); 22005 base.href = document.location.href; 22006 context.head.appendChild(base); 22007 } else { 22008 context = document; 22009 } 22010 } 22011 22012 parsed = rsingleTag.exec(data); 22013 scripts = !keepScripts && []; // Single tag 22014 22015 if (parsed) { 22016 return [context.createElement(parsed[1])]; 22017 } 22018 22019 parsed = buildFragment([data], context, scripts); 22020 22021 if (scripts && scripts.length) { 22022 jQuery(scripts).remove(); 22023 } 22024 22025 return jQuery.merge([], parsed.childNodes); 22026 }; 22027 /** 22028 * Load a url into a page 22029 */ 22030 22031 22032 jQuery.fn.load = function (url, params, callback) { 22033 var selector, 22034 type, 22035 response, 22036 self = this, 22037 off = url.indexOf(" "); 22038 22039 if (off > -1) { 22040 selector = stripAndCollapse(url.slice(off)); 22041 url = url.slice(0, off); 22042 } // If it's a function 22043 22044 22045 if (isFunction(params)) { 22046 // We assume that it's the callback 22047 callback = params; 22048 params = undefined; // Otherwise, build a param string 22049 } else if (params && _typeof(params) === "object") { 22050 type = "POST"; 22051 } // If we have elements to modify, make the request 22052 22053 22054 if (self.length > 0) { 22055 jQuery.ajax({ 22056 url: url, 22057 // If "type" variable is undefined, then "GET" method will be used. 22058 // Make value of this field explicit since 22059 // user can override it through ajaxSetup method 22060 type: type || "GET", 22061 dataType: "html", 22062 data: params 22063 }).done(function (responseText) { 22064 // Save response for use in complete callback 22065 response = arguments; 22066 self.html(selector ? // If a selector was specified, locate the right elements in a dummy div 22067 // Exclude scripts to avoid IE 'Permission Denied' errors 22068 jQuery("<div>").append(jQuery.parseHTML(responseText)).find(selector) : // Otherwise use the full result 22069 responseText); // If the request succeeds, this function gets "data", "status", "jqXHR" 22070 // but they are ignored because response was set above. 22071 // If it fails, this function gets "jqXHR", "status", "error" 22072 }).always(callback && function (jqXHR, status) { 22073 self.each(function () { 22074 callback.apply(this, response || [jqXHR.responseText, status, jqXHR]); 22075 }); 22076 }); 22077 } 22078 22079 return this; 22080 }; // Attach a bunch of functions for handling common AJAX events 22081 22082 22083 jQuery.each(["ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend"], function (i, type) { 22084 jQuery.fn[type] = function (fn) { 22085 return this.on(type, fn); 22086 }; 22087 }); 22088 22089 jQuery.expr.pseudos.animated = function (elem) { 22090 return jQuery.grep(jQuery.timers, function (fn) { 22091 return elem === fn.elem; 22092 }).length; 22093 }; 22094 22095 jQuery.offset = { 22096 setOffset: function setOffset(elem, options, i) { 22097 var curPosition, 22098 curLeft, 22099 curCSSTop, 22100 curTop, 22101 curOffset, 22102 curCSSLeft, 22103 calculatePosition, 22104 position = jQuery.css(elem, "position"), 22105 curElem = jQuery(elem), 22106 props = {}; // Set position first, in-case top/left are set even on static elem 22107 22108 if (position === "static") { 22109 elem.style.position = "relative"; 22110 } 22111 22112 curOffset = curElem.offset(); 22113 curCSSTop = jQuery.css(elem, "top"); 22114 curCSSLeft = jQuery.css(elem, "left"); 22115 calculatePosition = (position === "absolute" || position === "fixed") && (curCSSTop + curCSSLeft).indexOf("auto") > -1; // Need to be able to calculate position if either 22116 // top or left is auto and position is either absolute or fixed 22117 22118 if (calculatePosition) { 22119 curPosition = curElem.position(); 22120 curTop = curPosition.top; 22121 curLeft = curPosition.left; 22122 } else { 22123 curTop = parseFloat(curCSSTop) || 0; 22124 curLeft = parseFloat(curCSSLeft) || 0; 22125 } 22126 22127 if (isFunction(options)) { 22128 // Use jQuery.extend here to allow modification of coordinates argument (gh-1848) 22129 options = options.call(elem, i, jQuery.extend({}, curOffset)); 22130 } 22131 22132 if (options.top != null) { 22133 props.top = options.top - curOffset.top + curTop; 22134 } 22135 22136 if (options.left != null) { 22137 props.left = options.left - curOffset.left + curLeft; 22138 } 22139 22140 if ("using" in options) { 22141 options.using.call(elem, props); 22142 } else { 22143 curElem.css(props); 22144 } 22145 } 22146 }; 22147 jQuery.fn.extend({ 22148 // offset() relates an element's border box to the document origin 22149 offset: function offset(options) { 22150 // Preserve chaining for setter 22151 if (arguments.length) { 22152 return options === undefined ? this : this.each(function (i) { 22153 jQuery.offset.setOffset(this, options, i); 22154 }); 22155 } 22156 22157 var rect, 22158 win, 22159 elem = this[0]; 22160 22161 if (!elem) { 22162 return; 22163 } // Return zeros for disconnected and hidden (display: none) elements (gh-2310) 22164 // Support: IE <=11 only 22165 // Running getBoundingClientRect on a 22166 // disconnected node in IE throws an error 22167 22168 22169 if (!elem.getClientRects().length) { 22170 return { 22171 top: 0, 22172 left: 0 22173 }; 22174 } // Get document-relative position by adding viewport scroll to viewport-relative gBCR 22175 22176 22177 rect = elem.getBoundingClientRect(); 22178 win = elem.ownerDocument.defaultView; 22179 return { 22180 top: rect.top + win.pageYOffset, 22181 left: rect.left + win.pageXOffset 22182 }; 22183 }, 22184 // position() relates an element's margin box to its offset parent's padding box 22185 // This corresponds to the behavior of CSS absolute positioning 22186 position: function position() { 22187 if (!this[0]) { 22188 return; 22189 } 22190 22191 var offsetParent, 22192 offset, 22193 doc, 22194 elem = this[0], 22195 parentOffset = { 22196 top: 0, 22197 left: 0 22198 }; // position:fixed elements are offset from the viewport, which itself always has zero offset 22199 22200 if (jQuery.css(elem, "position") === "fixed") { 22201 // Assume position:fixed implies availability of getBoundingClientRect 22202 offset = elem.getBoundingClientRect(); 22203 } else { 22204 offset = this.offset(); // Account for the *real* offset parent, which can be the document or its root element 22205 // when a statically positioned element is identified 22206 22207 doc = elem.ownerDocument; 22208 offsetParent = elem.offsetParent || doc.documentElement; 22209 22210 while (offsetParent && (offsetParent === doc.body || offsetParent === doc.documentElement) && jQuery.css(offsetParent, "position") === "static") { 22211 offsetParent = offsetParent.parentNode; 22212 } 22213 22214 if (offsetParent && offsetParent !== elem && offsetParent.nodeType === 1) { 22215 // Incorporate borders into its offset, since they are outside its content origin 22216 parentOffset = jQuery(offsetParent).offset(); 22217 parentOffset.top += jQuery.css(offsetParent, "borderTopWidth", true); 22218 parentOffset.left += jQuery.css(offsetParent, "borderLeftWidth", true); 22219 } 22220 } // Subtract parent offsets and element margins 22221 22222 22223 return { 22224 top: offset.top - parentOffset.top - jQuery.css(elem, "marginTop", true), 22225 left: offset.left - parentOffset.left - jQuery.css(elem, "marginLeft", true) 22226 }; 22227 }, 22228 // This method will return documentElement in the following cases: 22229 // 1) For the element inside the iframe without offsetParent, this method will return 22230 // documentElement of the parent window 22231 // 2) For the hidden or detached element 22232 // 3) For body or html element, i.e. in case of the html node - it will return itself 22233 // 22234 // but those exceptions were never presented as a real life use-cases 22235 // and might be considered as more preferable results. 22236 // 22237 // This logic, however, is not guaranteed and can change at any point in the future 22238 offsetParent: function offsetParent() { 22239 return this.map(function () { 22240 var offsetParent = this.offsetParent; 22241 22242 while (offsetParent && jQuery.css(offsetParent, "position") === "static") { 22243 offsetParent = offsetParent.offsetParent; 22244 } 22245 22246 return offsetParent || documentElement; 22247 }); 22248 } 22249 }); // Create scrollLeft and scrollTop methods 22250 22251 jQuery.each({ 22252 scrollLeft: "pageXOffset", 22253 scrollTop: "pageYOffset" 22254 }, function (method, prop) { 22255 var top = "pageYOffset" === prop; 22256 22257 jQuery.fn[method] = function (val) { 22258 return access(this, function (elem, method, val) { 22259 // Coalesce documents and windows 22260 var win; 22261 22262 if (isWindow(elem)) { 22263 win = elem; 22264 } else if (elem.nodeType === 9) { 22265 win = elem.defaultView; 22266 } 22267 22268 if (val === undefined) { 22269 return win ? win[prop] : elem[method]; 22270 } 22271 22272 if (win) { 22273 win.scrollTo(!top ? val : win.pageXOffset, top ? val : win.pageYOffset); 22274 } else { 22275 elem[method] = val; 22276 } 22277 }, method, val, arguments.length); 22278 }; 22279 }); // Support: Safari <=7 - 9.1, Chrome <=37 - 49 22280 // Add the top/left cssHooks using jQuery.fn.position 22281 // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084 22282 // Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347 22283 // getComputedStyle returns percent when specified for top/left/bottom/right; 22284 // rather than make the css module depend on the offset module, just check for it here 22285 22286 jQuery.each(["top", "left"], function (i, prop) { 22287 jQuery.cssHooks[prop] = addGetHookIf(support.pixelPosition, function (elem, computed) { 22288 if (computed) { 22289 computed = curCSS(elem, prop); // If curCSS returns percentage, fallback to offset 22290 22291 return rnumnonpx.test(computed) ? jQuery(elem).position()[prop] + "px" : computed; 22292 } 22293 }); 22294 }); // Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods 22295 22296 jQuery.each({ 22297 Height: "height", 22298 Width: "width" 22299 }, function (name, type) { 22300 jQuery.each({ 22301 padding: "inner" + name, 22302 content: type, 22303 "": "outer" + name 22304 }, function (defaultExtra, funcName) { 22305 // Margin is only for outerHeight, outerWidth 22306 jQuery.fn[funcName] = function (margin, value) { 22307 var chainable = arguments.length && (defaultExtra || typeof margin !== "boolean"), 22308 extra = defaultExtra || (margin === true || value === true ? "margin" : "border"); 22309 return access(this, function (elem, type, value) { 22310 var doc; 22311 22312 if (isWindow(elem)) { 22313 // $( window ).outerWidth/Height return w/h including scrollbars (gh-1729) 22314 return funcName.indexOf("outer") === 0 ? elem["inner" + name] : elem.document.documentElement["client" + name]; 22315 } // Get document width or height 22316 22317 22318 if (elem.nodeType === 9) { 22319 doc = elem.documentElement; // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], 22320 // whichever is greatest 22321 22322 return Math.max(elem.body["scroll" + name], doc["scroll" + name], elem.body["offset" + name], doc["offset" + name], doc["client" + name]); 22323 } 22324 22325 return value === undefined ? // Get width or height on the element, requesting but not forcing parseFloat 22326 jQuery.css(elem, type, extra) : // Set width or height on the element 22327 jQuery.style(elem, type, value, extra); 22328 }, type, chainable ? margin : undefined, chainable); 22329 }; 22330 }); 22331 }); 22332 jQuery.each(("blur focus focusin focusout resize scroll click dblclick " + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + "change select submit keydown keypress keyup contextmenu").split(" "), function (i, name) { 22333 // Handle event binding 22334 jQuery.fn[name] = function (data, fn) { 22335 return arguments.length > 0 ? this.on(name, null, data, fn) : this.trigger(name); 22336 }; 22337 }); 22338 jQuery.fn.extend({ 22339 hover: function hover(fnOver, fnOut) { 22340 return this.mouseenter(fnOver).mouseleave(fnOut || fnOver); 22341 } 22342 }); 22343 jQuery.fn.extend({ 22344 bind: function bind(types, data, fn) { 22345 return this.on(types, null, data, fn); 22346 }, 22347 unbind: function unbind(types, fn) { 22348 return this.off(types, null, fn); 22349 }, 22350 delegate: function delegate(selector, types, data, fn) { 22351 return this.on(types, selector, data, fn); 22352 }, 22353 undelegate: function undelegate(selector, types, fn) { 22354 // ( namespace ) or ( selector, types [, fn] ) 22355 return arguments.length === 1 ? this.off(selector, "**") : this.off(types, selector || "**", fn); 22356 } 22357 }); // Bind a function to a context, optionally partially applying any 22358 // arguments. 22359 // jQuery.proxy is deprecated to promote standards (specifically Function#bind) 22360 // However, it is not slated for removal any time soon 22361 22362 jQuery.proxy = function (fn, context) { 22363 var tmp, args, proxy; 22364 22365 if (typeof context === "string") { 22366 tmp = fn[context]; 22367 context = fn; 22368 fn = tmp; 22369 } // Quick check to determine if target is callable, in the spec 22370 // this throws a TypeError, but we will just return undefined. 22371 22372 22373 if (!isFunction(fn)) { 22374 return undefined; 22375 } // Simulated bind 22376 22377 22378 args = _slice.call(arguments, 2); 22379 22380 proxy = function proxy() { 22381 return fn.apply(context || this, args.concat(_slice.call(arguments))); 22382 }; // Set the guid of unique handler to the same of original handler, so it can be removed 22383 22384 22385 proxy.guid = fn.guid = fn.guid || jQuery.guid++; 22386 return proxy; 22387 }; 22388 22389 jQuery.holdReady = function (hold) { 22390 if (hold) { 22391 jQuery.readyWait++; 22392 } else { 22393 jQuery.ready(true); 22394 } 22395 }; 22396 22397 jQuery.isArray = Array.isArray; 22398 jQuery.parseJSON = JSON.parse; 22399 jQuery.nodeName = nodeName; 22400 jQuery.isFunction = isFunction; 22401 jQuery.isWindow = isWindow; 22402 jQuery.camelCase = camelCase; 22403 jQuery.type = toType; 22404 jQuery.now = Date.now; 22405 22406 jQuery.isNumeric = function (obj) { 22407 // As of jQuery 3.0, isNumeric is limited to 22408 // strings and numbers (primitives or objects) 22409 // that can be coerced to finite numbers (gh-2662) 22410 var type = jQuery.type(obj); 22411 return (type === "number" || type === "string") && // parseFloat NaNs numeric-cast false positives ("") 22412 // ...but misinterprets leading-number strings, particularly hex literals ("0x...") 22413 // subtraction forces infinities to NaN 22414 !isNaN(obj - parseFloat(obj)); 22415 }; // Register as a named AMD module, since jQuery can be concatenated with other 22416 // files that may use define, but not via a proper concatenation script that 22417 // understands anonymous AMD modules. A named AMD is safest and most robust 22418 // way to register. Lowercase jquery is used because AMD module names are 22419 // derived from file names, and jQuery is normally delivered in a lowercase 22420 // file name. Do this after creating the global so that if an AMD module wants 22421 // to call noConflict to hide this version of jQuery, it will work. 22422 // Note that for maximum portability, libraries that are not jQuery should 22423 // declare themselves as anonymous modules, and avoid setting a global if an 22424 // AMD loader is present. jQuery is a special case. For more information, see 22425 // https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon 22426 22427 22428 if (true) { 22429 !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { 22430 return jQuery; 22431 }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), 22432 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); 22433 } 22434 22435 var // Map over jQuery in case of overwrite 22436 _jQuery = window.jQuery, 22437 // Map over the $ in case of overwrite 22438 _$ = window.$; 22439 22440 jQuery.noConflict = function (deep) { 22441 if (window.$ === jQuery) { 22442 window.$ = _$; 22443 } 22444 22445 if (deep && window.jQuery === jQuery) { 22446 window.jQuery = _jQuery; 22447 } 22448 22449 return jQuery; 22450 }; // Expose jQuery and $ identifiers, even in AMD 22451 // (#7102#comment:10, https://github.com/jquery/jquery/pull/557) 22452 // and CommonJS for browser emulators (#13566) 22453 22454 22455 if (!noGlobal) { 22456 window.jQuery = window.$ = jQuery; 22457 } 22458 22459 return jQuery; 22460}); 22461/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module))) 22462 22463/***/ }), 22464
vendor: 78,123 bytes, lines 22465-25156
22465/***/ "./node_modules/slick-carousel/slick/slick.js": 22466/*!****************************************************!*\ 22467 !*** ./node_modules/slick-carousel/slick/slick.js ***! 22468 \****************************************************/ 22469/*! no static exports found */ 22470/***/ (function(module, exports, __webpack_require__) { 22471 22472var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 22473 22474/* 22475 _ _ _ _ 22476 ___| (_) ___| | __ (_)___ 22477/ __| | |/ __| |/ / | / __| 22478\__ \ | | (__| < _ | \__ \ 22479|___/_|_|\___|_|\_(_)/ |___/ 22480 |__/ 22481 22482 Version: 1.8.1 22483 Author: Ken Wheeler 22484 Website: http://kenwheeler.github.io 22485 Docs: http://kenwheeler.github.io/slick 22486 Repo: http://github.com/kenwheeler/slick 22487 Issues: http://github.com/kenwheeler/slick/issues 22488 22489 */ 22490 22491/* global window, document, define, jQuery, setInterval, clearInterval */ 22492; 22493 22494(function (factory) { 22495 'use strict'; 22496 22497 if (true) { 22498 !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), 22499 __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? 22500 (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), 22501 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); 22502 } else {} 22503})(function ($) { 22504 'use strict'; 22505 22506 var Slick = window.Slick || {}; 22507 22508 Slick = function () { 22509 var instanceUid = 0; 22510 22511 function Slick(element, settings) { 22512 var _ = this, 22513 dataSettings; 22514 22515 _.defaults = { 22516 accessibility: true, 22517 adaptiveHeight: false, 22518 appendArrows: $(element), 22519 appendDots: $(element), 22520 arrows: true, 22521 asNavFor: null, 22522 prevArrow: '<button class="slick-prev" aria-label="Previous" type="button">Previous</button>', 22523 nextArrow: '<button class="slick-next" aria-label="Next" type="button">Next</button>', 22524 autoplay: false, 22525 autoplaySpeed: 3000, 22526 centerMode: false, 22527 centerPadding: '50px', 22528 cssEase: 'ease', 22529 customPaging: function customPaging(slider, i) { 22530 return $('<button type="button" />').text(i + 1); 22531 }, 22532 dots: false, 22533 dotsClass: 'slick-dots', 22534 draggable: true, 22535 easing: 'linear', 22536 edgeFriction: 0.35, 22537 fade: false, 22538 focusOnSelect: false, 22539 focusOnChange: false, 22540 infinite: true, 22541 initialSlide: 0, 22542 lazyLoad: 'ondemand', 22543 mobileFirst: false, 22544 pauseOnHover: true, 22545 pauseOnFocus: true, 22546 pauseOnDotsHover: false, 22547 respondTo: 'window', 22548 responsive: null, 22549 rows: 1, 22550 rtl: false, 22551 slide: '', 22552 slidesPerRow: 1, 22553 slidesToShow: 1, 22554 slidesToScroll: 1, 22555 speed: 500, 22556 swipe: true, 22557 swipeToSlide: false, 22558 touchMove: true, 22559 touchThreshold: 5, 22560 useCSS: true, 22561 useTransform: true, 22562 variableWidth: false, 22563 vertical: false, 22564 verticalSwiping: false, 22565 waitForAnimate: true, 22566 zIndex: 1000 22567 }; 22568 _.initials = { 22569 animating: false, 22570 dragging: false, 22571 autoPlayTimer: null, 22572 currentDirection: 0, 22573 currentLeft: null, 22574 currentSlide: 0, 22575 direction: 1, 22576 $dots: null, 22577 listWidth: null, 22578 listHeight: null, 22579 loadIndex: 0, 22580 $nextArrow: null, 22581 $prevArrow: null, 22582 scrolling: false, 22583 slideCount: null, 22584 slideWidth: null, 22585 $slideTrack: null, 22586 $slides: null, 22587 sliding: false, 22588 slideOffset: 0, 22589 swipeLeft: null, 22590 swiping: false, 22591 $list: null, 22592 touchObject: {}, 22593 transformsEnabled: false, 22594 unslicked: false 22595 }; 22596 $.extend(_, _.initials); 22597 _.activeBreakpoint = null; 22598 _.animType = null; 22599 _.animProp = null; 22600 _.breakpoints = []; 22601 _.breakpointSettings = []; 22602 _.cssTransitions = false; 22603 _.focussed = false; 22604 _.interrupted = false; 22605 _.hidden = 'hidden'; 22606 _.paused = true; 22607 _.positionProp = null; 22608 _.respondTo = null; 22609 _.rowCount = 1; 22610 _.shouldClick = true; 22611 _.$slider = $(element); 22612 _.$slidesCache = null; 22613 _.transformType = null; 22614 _.transitionType = null; 22615 _.visibilityChange = 'visibilitychange'; 22616 _.windowWidth = 0; 22617 _.windowTimer = null; 22618 dataSettings = $(element).data('slick') || {}; 22619 _.options = $.extend({}, _.defaults, settings, dataSettings); 22620 _.currentSlide = _.options.initialSlide; 22621 _.originalSettings = _.options; 22622 22623 if (typeof document.mozHidden !== 'undefined') { 22624 _.hidden = 'mozHidden'; 22625 _.visibilityChange = 'mozvisibilitychange'; 22626 } else if (typeof document.webkitHidden !== 'undefined') { 22627 _.hidden = 'webkitHidden'; 22628 _.visibilityChange = 'webkitvisibilitychange'; 22629 } 22630 22631 _.autoPlay = $.proxy(_.autoPlay, _); 22632 _.autoPlayClear = $.proxy(_.autoPlayClear, _); 22633 _.autoPlayIterator = $.proxy(_.autoPlayIterator, _); 22634 _.changeSlide = $.proxy(_.changeSlide, _); 22635 _.clickHandler = $.proxy(_.clickHandler, _); 22636 _.selectHandler = $.proxy(_.selectHandler, _); 22637 _.setPosition = $.proxy(_.setPosition, _); 22638 _.swipeHandler = $.proxy(_.swipeHandler, _); 22639 _.dragHandler = $.proxy(_.dragHandler, _); 22640 _.keyHandler = $.proxy(_.keyHandler, _); 22641 _.instanceUid = instanceUid++; // A simple way to check for HTML strings 22642 // Strict HTML recognition (must start with <) 22643 // Extracted from jQuery v1.11 source 22644 22645 _.htmlExpr = /^(?:\s*(<[\w\W]+>)[^>]*)$/; 22646 22647 _.registerBreakpoints(); 22648 22649 _.init(true); 22650 } 22651 22652 return Slick; 22653 }(); 22654 22655 Slick.prototype.activateADA = function () { 22656 var _ = this; 22657 22658 _.$slideTrack.find('.slick-active').attr({ 22659 'aria-hidden': 'false' 22660 }).find('a, input, button, select').attr({ 22661 'tabindex': '0' 22662 }); 22663 }; 22664 22665 Slick.prototype.addSlide = Slick.prototype.slickAdd = function (markup, index, addBefore) { 22666 var _ = this; 22667 22668 if (typeof index === 'boolean') { 22669 addBefore = index; 22670 index = null; 22671 } else if (index < 0 || index >= _.slideCount) { 22672 return false; 22673 } 22674 22675 _.unload(); 22676 22677 if (typeof index === 'number') { 22678 if (index === 0 && _.$slides.length === 0) { 22679 $(markup).appendTo(_.$slideTrack); 22680 } else if (addBefore) { 22681 $(markup).insertBefore(_.$slides.eq(index)); 22682 } else { 22683 $(markup).insertAfter(_.$slides.eq(index)); 22684 } 22685 } else { 22686 if (addBefore === true) { 22687 $(markup).prependTo(_.$slideTrack); 22688 } else { 22689 $(markup).appendTo(_.$slideTrack); 22690 } 22691 } 22692 22693 _.$slides = _.$slideTrack.children(this.options.slide); 22694 22695 _.$slideTrack.children(this.options.slide).detach(); 22696 22697 _.$slideTrack.append(_.$slides); 22698 22699 _.$slides.each(function (index, element) { 22700 $(element).attr('data-slick-index', index); 22701 }); 22702 22703 _.$slidesCache = _.$slides; 22704 22705 _.reinit(); 22706 }; 22707 22708 Slick.prototype.animateHeight = function () { 22709 var _ = this; 22710 22711 if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) { 22712 var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true); 22713 22714 _.$list.animate({ 22715 height: targetHeight 22716 }, _.options.speed); 22717 } 22718 }; 22719 22720 Slick.prototype.animateSlide = function (targetLeft, callback) { 22721 var animProps = {}, 22722 _ = this; 22723 22724 _.animateHeight(); 22725 22726 if (_.options.rtl === true && _.options.vertical === false) { 22727 targetLeft = -targetLeft; 22728 } 22729 22730 if (_.transformsEnabled === false) { 22731 if (_.options.vertical === false) { 22732 _.$slideTrack.animate({ 22733 left: targetLeft 22734 }, _.options.speed, _.options.easing, callback); 22735 } else { 22736 _.$slideTrack.animate({ 22737 top: targetLeft 22738 }, _.options.speed, _.options.easing, callback); 22739 } 22740 } else { 22741 if (_.cssTransitions === false) { 22742 if (_.options.rtl === true) { 22743 _.currentLeft = -_.currentLeft; 22744 } 22745 22746 $({ 22747 animStart: _.currentLeft 22748 }).animate({ 22749 animStart: targetLeft 22750 }, { 22751 duration: _.options.speed, 22752 easing: _.options.easing, 22753 step: function step(now) { 22754 now = Math.ceil(now); 22755 22756 if (_.options.vertical === false) { 22757 animProps[_.animType] = 'translate(' + now + 'px, 0px)'; 22758 22759 _.$slideTrack.css(animProps); 22760 } else { 22761 animProps[_.animType] = 'translate(0px,' + now + 'px)'; 22762 22763 _.$slideTrack.css(animProps); 22764 } 22765 }, 22766 complete: function complete() { 22767 if (callback) { 22768 callback.call(); 22769 } 22770 } 22771 }); 22772 } else { 22773 _.applyTransition(); 22774 22775 targetLeft = Math.ceil(targetLeft); 22776 22777 if (_.options.vertical === false) { 22778 animProps[_.animType] = 'translate3d(' + targetLeft + 'px, 0px, 0px)'; 22779 } else { 22780 animProps[_.animType] = 'translate3d(0px,' + targetLeft + 'px, 0px)'; 22781 } 22782 22783 _.$slideTrack.css(animProps); 22784 22785 if (callback) { 22786 setTimeout(function () { 22787 _.disableTransition(); 22788 22789 callback.call(); 22790 }, _.options.speed); 22791 } 22792 } 22793 } 22794 }; 22795 22796 Slick.prototype.getNavTarget = function () { 22797 var _ = this, 22798 asNavFor = _.options.asNavFor; 22799 22800 if (asNavFor && asNavFor !== null) { 22801 asNavFor = $(asNavFor).not(_.$slider); 22802 } 22803 22804 return asNavFor; 22805 }; 22806 22807 Slick.prototype.asNavFor = function (index) { 22808 var _ = this, 22809 asNavFor = _.getNavTarget(); 22810 22811 if (asNavFor !== null && _typeof(asNavFor) === 'object') { 22812 asNavFor.each(function () { 22813 var target = $(this).slick('getSlick'); 22814 22815 if (!target.unslicked) { 22816 target.slideHandler(index, true); 22817 } 22818 }); 22819 } 22820 }; 22821 22822 Slick.prototype.applyTransition = function (slide) { 22823 var _ = this, 22824 transition = {}; 22825 22826 if (_.options.fade === false) { 22827 transition[_.transitionType] = _.transformType + ' ' + _.options.speed + 'ms ' + _.options.cssEase; 22828 } else { 22829 transition[_.transitionType] = 'opacity ' + _.options.speed + 'ms ' + _.options.cssEase; 22830 } 22831 22832 if (_.options.fade === false) { 22833 _.$slideTrack.css(transition); 22834 } else { 22835 _.$slides.eq(slide).css(transition); 22836 } 22837 }; 22838 22839 Slick.prototype.autoPlay = function () { 22840 var _ = this; 22841 22842 _.autoPlayClear(); 22843 22844 if (_.slideCount > _.options.slidesToShow) { 22845 _.autoPlayTimer = setInterval(_.autoPlayIterator, _.options.autoplaySpeed); 22846 } 22847 }; 22848 22849 Slick.prototype.autoPlayClear = function () { 22850 var _ = this; 22851 22852 if (_.autoPlayTimer) { 22853 clearInterval(_.autoPlayTimer); 22854 } 22855 }; 22856 22857 Slick.prototype.autoPlayIterator = function () { 22858 var _ = this, 22859 slideTo = _.currentSlide + _.options.slidesToScroll; 22860 22861 if (!_.paused && !_.interrupted && !_.focussed) { 22862 if (_.options.infinite === false) { 22863 if (_.direction === 1 && _.currentSlide + 1 === _.slideCount - 1) { 22864 _.direction = 0; 22865 } else if (_.direction === 0) { 22866 slideTo = _.currentSlide - _.options.slidesToScroll; 22867 22868 if (_.currentSlide - 1 === 0) { 22869 _.direction = 1; 22870 } 22871 } 22872 } 22873 22874 _.slideHandler(slideTo); 22875 } 22876 }; 22877 22878 Slick.prototype.buildArrows = function () { 22879 var _ = this; 22880 22881 if (_.options.arrows === true) { 22882 _.$prevArrow = $(_.options.prevArrow).addClass('slick-arrow'); 22883 _.$nextArrow = $(_.options.nextArrow).addClass('slick-arrow'); 22884 22885 if (_.slideCount > _.options.slidesToShow) { 22886 _.$prevArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex'); 22887 22888 _.$nextArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex'); 22889 22890 if (_.htmlExpr.test(_.options.prevArrow)) { 22891 _.$prevArrow.prependTo(_.options.appendArrows); 22892 } 22893 22894 if (_.htmlExpr.test(_.options.nextArrow)) { 22895 _.$nextArrow.appendTo(_.options.appendArrows); 22896 } 22897 22898 if (_.options.infinite !== true) { 22899 _.$prevArrow.addClass('slick-disabled').attr('aria-disabled', 'true'); 22900 } 22901 } else { 22902 _.$prevArrow.add(_.$nextArrow).addClass('slick-hidden').attr({ 22903 'aria-disabled': 'true', 22904 'tabindex': '-1' 22905 }); 22906 } 22907 } 22908 }; 22909 22910 Slick.prototype.buildDots = function () { 22911 var _ = this, 22912 i, 22913 dot; 22914 22915 if (_.options.dots === true && _.slideCount > _.options.slidesToShow) { 22916 _.$slider.addClass('slick-dotted'); 22917 22918 dot = $('<ul />').addClass(_.options.dotsClass); 22919 22920 for (i = 0; i <= _.getDotCount(); i += 1) { 22921 dot.append($('<li />').append(_.options.customPaging.call(this, _, i))); 22922 } 22923 22924 _.$dots = dot.appendTo(_.options.appendDots); 22925 22926 _.$dots.find('li').first().addClass('slick-active'); 22927 } 22928 }; 22929 22930 Slick.prototype.buildOut = function () { 22931 var _ = this; 22932 22933 _.$slides = _.$slider.children(_.options.slide + ':not(.slick-cloned)').addClass('slick-slide'); 22934 _.slideCount = _.$slides.length; 22935 22936 _.$slides.each(function (index, element) { 22937 $(element).attr('data-slick-index', index).data('originalStyling', $(element).attr('style') || ''); 22938 }); 22939 22940 _.$slider.addClass('slick-slider'); 22941 22942 _.$slideTrack = _.slideCount === 0 ? $('<div class="slick-track"/>').appendTo(_.$slider) : _.$slides.wrapAll('<div class="slick-track"/>').parent(); 22943 _.$list = _.$slideTrack.wrap('<div class="slick-list"/>').parent(); 22944 22945 _.$slideTrack.css('opacity', 0); 22946 22947 if (_.options.centerMode === true || _.options.swipeToSlide === true) { 22948 _.options.slidesToScroll = 1; 22949 } 22950 22951 $('img[data-lazy]', _.$slider).not('[src]').addClass('slick-loading'); 22952 22953 _.setupInfinite(); 22954 22955 _.buildArrows(); 22956 22957 _.buildDots(); 22958 22959 _.updateDots(); 22960 22961 _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0); 22962 22963 if (_.options.draggable === true) { 22964 _.$list.addClass('draggable'); 22965 } 22966 }; 22967 22968 Slick.prototype.buildRows = function () { 22969 var _ = this, 22970 a, 22971 b, 22972 c, 22973 newSlides, 22974 numOfSlides, 22975 originalSlides, 22976 slidesPerSection; 22977 22978 newSlides = document.createDocumentFragment(); 22979 originalSlides = _.$slider.children(); 22980 22981 if (_.options.rows > 0) { 22982 slidesPerSection = _.options.slidesPerRow * _.options.rows; 22983 numOfSlides = Math.ceil(originalSlides.length / slidesPerSection); 22984 22985 for (a = 0; a < numOfSlides; a++) { 22986 var slide = document.createElement('div'); 22987 22988 for (b = 0; b < _.options.rows; b++) { 22989 var row = document.createElement('div'); 22990 22991 for (c = 0; c < _.options.slidesPerRow; c++) { 22992 var target = a * slidesPerSection + (b * _.options.slidesPerRow + c); 22993 22994 if (originalSlides.get(target)) { 22995 row.appendChild(originalSlides.get(target)); 22996 } 22997 } 22998 22999 slide.appendChild(row); 23000 } 23001 23002 newSlides.appendChild(slide); 23003 } 23004 23005 _.$slider.empty().append(newSlides); 23006 23007 _.$slider.children().children().children().css({ 23008 'width': 100 / _.options.slidesPerRow + '%', 23009 'display': 'inline-block' 23010 }); 23011 } 23012 }; 23013 23014 Slick.prototype.checkResponsive = function (initial, forceUpdate) { 23015 var _ = this, 23016 breakpoint, 23017 targetBreakpoint, 23018 respondToWidth, 23019 triggerBreakpoint = false; 23020 23021 var sliderWidth = _.$slider.width(); 23022 23023 var windowWidth = window.innerWidth || $(window).width(); 23024 23025 if (_.respondTo === 'window') { 23026 respondToWidth = windowWidth; 23027 } else if (_.respondTo === 'slider') { 23028 respondToWidth = sliderWidth; 23029 } else if (_.respondTo === 'min') { 23030 respondToWidth = Math.min(windowWidth, sliderWidth); 23031 } 23032 23033 if (_.options.responsive && _.options.responsive.length && _.options.responsive !== null) { 23034 targetBreakpoint = null; 23035 23036 for (breakpoint in _.breakpoints) { 23037 if (_.breakpoints.hasOwnProperty(breakpoint)) { 23038 if (_.originalSettings.mobileFirst === false) { 23039 if (respondToWidth < _.breakpoints[breakpoint]) { 23040 targetBreakpoint = _.breakpoints[breakpoint]; 23041 } 23042 } else { 23043 if (respondToWidth > _.breakpoints[breakpoint]) { 23044 targetBreakpoint = _.breakpoints[breakpoint]; 23045 } 23046 } 23047 } 23048 } 23049 23050 if (targetBreakpoint !== null) { 23051 if (_.activeBreakpoint !== null) { 23052 if (targetBreakpoint !== _.activeBreakpoint || forceUpdate) { 23053 _.activeBreakpoint = targetBreakpoint; 23054 23055 if (_.breakpointSettings[targetBreakpoint] === 'unslick') { 23056 _.unslick(targetBreakpoint); 23057 } else { 23058 _.options = $.extend({}, _.originalSettings, _.breakpointSettings[targetBreakpoint]); 23059 23060 if (initial === true) { 23061 _.currentSlide = _.options.initialSlide; 23062 } 23063 23064 _.refresh(initial); 23065 } 23066 23067 triggerBreakpoint = targetBreakpoint; 23068 } 23069 } else { 23070 _.activeBreakpoint = targetBreakpoint; 23071 23072 if (_.breakpointSettings[targetBreakpoint] === 'unslick') { 23073 _.unslick(targetBreakpoint); 23074 } else { 23075 _.options = $.extend({}, _.originalSettings, _.breakpointSettings[targetBreakpoint]); 23076 23077 if (initial === true) { 23078 _.currentSlide = _.options.initialSlide; 23079 } 23080 23081 _.refresh(initial); 23082 } 23083 23084 triggerBreakpoint = targetBreakpoint; 23085 } 23086 } else { 23087 if (_.activeBreakpoint !== null) { 23088 _.activeBreakpoint = null; 23089 _.options = _.originalSettings; 23090 23091 if (initial === true) { 23092 _.currentSlide = _.options.initialSlide; 23093 } 23094 23095 _.refresh(initial); 23096 23097 triggerBreakpoint = targetBreakpoint; 23098 } 23099 } // only trigger breakpoints during an actual break. not on initialize. 23100 23101 23102 if (!initial && triggerBreakpoint !== false) { 23103 _.$slider.trigger('breakpoint', [_, triggerBreakpoint]); 23104 } 23105 } 23106 }; 23107 23108 Slick.prototype.changeSlide = function (event, dontAnimate) { 23109 var _ = this, 23110 $target = $(event.currentTarget), 23111 indexOffset, 23112 slideOffset, 23113 unevenOffset; // If target is a link, prevent default action. 23114 23115 23116 if ($target.is('a')) { 23117 event.preventDefault(); 23118 } // If target is not the <li> element (ie: a child), find the <li>. 23119 23120 23121 if (!$target.is('li')) { 23122 $target = $target.closest('li'); 23123 } 23124 23125 unevenOffset = _.slideCount % _.options.slidesToScroll !== 0; 23126 indexOffset = unevenOffset ? 0 : (_.slideCount - _.currentSlide) % _.options.slidesToScroll; 23127 23128 switch (event.data.message) { 23129 case 'previous': 23130 slideOffset = indexOffset === 0 ? _.options.slidesToScroll : _.options.slidesToShow - indexOffset; 23131 23132 if (_.slideCount > _.options.slidesToShow) { 23133 _.slideHandler(_.currentSlide - slideOffset, false, dontAnimate); 23134 } 23135 23136 break; 23137 23138 case 'next': 23139 slideOffset = indexOffset === 0 ? _.options.slidesToScroll : indexOffset; 23140 23141 if (_.slideCount > _.options.slidesToShow) { 23142 _.slideHandler(_.currentSlide + slideOffset, false, dontAnimate); 23143 } 23144 23145 break; 23146 23147 case 'index': 23148 var index = event.data.index === 0 ? 0 : event.data.index || $target.index() * _.options.slidesToScroll; 23149 23150 _.slideHandler(_.checkNavigable(index), false, dontAnimate); 23151 23152 $target.children().trigger('focus'); 23153 break; 23154 23155 default: 23156 return; 23157 } 23158 }; 23159 23160 Slick.prototype.checkNavigable = function (index) { 23161 var _ = this, 23162 navigables, 23163 prevNavigable; 23164 23165 navigables = _.getNavigableIndexes(); 23166 prevNavigable = 0; 23167 23168 if (index > navigables[navigables.length - 1]) { 23169 index = navigables[navigables.length - 1]; 23170 } else { 23171 for (var n in navigables) { 23172 if (index < navigables[n]) { 23173 index = prevNavigable; 23174 break; 23175 } 23176 23177 prevNavigable = navigables[n]; 23178 } 23179 } 23180 23181 return index; 23182 }; 23183 23184 Slick.prototype.cleanUpEvents = function () { 23185 var _ = this; 23186 23187 if (_.options.dots && _.$dots !== null) { 23188 $('li', _.$dots).off('click.slick', _.changeSlide).off('mouseenter.slick', $.proxy(_.interrupt, _, true)).off('mouseleave.slick', $.proxy(_.interrupt, _, false)); 23189 23190 if (_.options.accessibility === true) { 23191 _.$dots.off('keydown.slick', _.keyHandler); 23192 } 23193 } 23194 23195 _.$slider.off('focus.slick blur.slick'); 23196 23197 if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) { 23198 _.$prevArrow && _.$prevArrow.off('click.slick', _.changeSlide); 23199 _.$nextArrow && _.$nextArrow.off('click.slick', _.changeSlide); 23200 23201 if (_.options.accessibility === true) { 23202 _.$prevArrow && _.$prevArrow.off('keydown.slick', _.keyHandler); 23203 _.$nextArrow && _.$nextArrow.off('keydown.slick', _.keyHandler); 23204 } 23205 } 23206 23207 _.$list.off('touchstart.slick mousedown.slick', _.swipeHandler); 23208 23209 _.$list.off('touchmove.slick mousemove.slick', _.swipeHandler); 23210 23211 _.$list.off('touchend.slick mouseup.slick', _.swipeHandler); 23212 23213 _.$list.off('touchcancel.slick mouseleave.slick', _.swipeHandler); 23214 23215 _.$list.off('click.slick', _.clickHandler); 23216 23217 $(document).off(_.visibilityChange, _.visibility); 23218 23219 _.cleanUpSlideEvents(); 23220 23221 if (_.options.accessibility === true) { 23222 _.$list.off('keydown.slick', _.keyHandler); 23223 } 23224 23225 if (_.options.focusOnSelect === true) { 23226 $(_.$slideTrack).children().off('click.slick', _.selectHandler); 23227 } 23228 23229 $(window).off('orientationchange.slick.slick-' + _.instanceUid, _.orientationChange); 23230 $(window).off('resize.slick.slick-' + _.instanceUid, _.resize); 23231 $('[draggable!=true]', _.$slideTrack).off('dragstart', _.preventDefault); 23232 $(window).off('load.slick.slick-' + _.instanceUid, _.setPosition); 23233 }; 23234 23235 Slick.prototype.cleanUpSlideEvents = function () { 23236 var _ = this; 23237 23238 _.$list.off('mouseenter.slick', $.proxy(_.interrupt, _, true)); 23239 23240 _.$list.off('mouseleave.slick', $.proxy(_.interrupt, _, false)); 23241 }; 23242 23243 Slick.prototype.cleanUpRows = function () { 23244 var _ = this, 23245 originalSlides; 23246 23247 if (_.options.rows > 0) { 23248 originalSlides = _.$slides.children().children(); 23249 originalSlides.removeAttr('style'); 23250 23251 _.$slider.empty().append(originalSlides); 23252 } 23253 }; 23254 23255 Slick.prototype.clickHandler = function (event) { 23256 var _ = this; 23257 23258 if (_.shouldClick === false) { 23259 event.stopImmediatePropagation(); 23260 event.stopPropagation(); 23261 event.preventDefault(); 23262 } 23263 }; 23264 23265 Slick.prototype.destroy = function (refresh) { 23266 var _ = this; 23267 23268 _.autoPlayClear(); 23269 23270 _.touchObject = {}; 23271 23272 _.cleanUpEvents(); 23273 23274 $('.slick-cloned', _.$slider).detach(); 23275 23276 if (_.$dots) { 23277 _.$dots.remove(); 23278 } 23279 23280 if (_.$prevArrow && _.$prevArrow.length) { 23281 _.$prevArrow.removeClass('slick-disabled slick-arrow slick-hidden').removeAttr('aria-hidden aria-disabled tabindex').css('display', ''); 23282 23283 if (_.htmlExpr.test(_.options.prevArrow)) { 23284 _.$prevArrow.remove(); 23285 } 23286 } 23287 23288 if (_.$nextArrow && _.$nextArrow.length) { 23289 _.$nextArrow.removeClass('slick-disabled slick-arrow slick-hidden').removeAttr('aria-hidden aria-disabled tabindex').css('display', ''); 23290 23291 if (_.htmlExpr.test(_.options.nextArrow)) { 23292 _.$nextArrow.remove(); 23293 } 23294 } 23295 23296 if (_.$slides) { 23297 _.$slides.removeClass('slick-slide slick-active slick-center slick-visible slick-current').removeAttr('aria-hidden').removeAttr('data-slick-index').each(function () { 23298 $(this).attr('style', $(this).data('originalStyling')); 23299 }); 23300 23301 _.$slideTrack.children(this.options.slide).detach(); 23302 23303 _.$slideTrack.detach(); 23304 23305 _.$list.detach(); 23306 23307 _.$slider.append(_.$slides); 23308 } 23309 23310 _.cleanUpRows(); 23311 23312 _.$slider.removeClass('slick-slider'); 23313 23314 _.$slider.removeClass('slick-initialized'); 23315 23316 _.$slider.removeClass('slick-dotted'); 23317 23318 _.unslicked = true; 23319 23320 if (!refresh) { 23321 _.$slider.trigger('destroy', [_]); 23322 } 23323 }; 23324 23325 Slick.prototype.disableTransition = function (slide) { 23326 var _ = this, 23327 transition = {}; 23328 23329 transition[_.transitionType] = ''; 23330 23331 if (_.options.fade === false) { 23332 _.$slideTrack.css(transition); 23333 } else { 23334 _.$slides.eq(slide).css(transition); 23335 } 23336 }; 23337 23338 Slick.prototype.fadeSlide = function (slideIndex, callback) { 23339 var _ = this; 23340 23341 if (_.cssTransitions === false) { 23342 _.$slides.eq(slideIndex).css({ 23343 zIndex: _.options.zIndex 23344 }); 23345 23346 _.$slides.eq(slideIndex).animate({ 23347 opacity: 1 23348 }, _.options.speed, _.options.easing, callback); 23349 } else { 23350 _.applyTransition(slideIndex); 23351 23352 _.$slides.eq(slideIndex).css({ 23353 opacity: 1, 23354 zIndex: _.options.zIndex 23355 }); 23356 23357 if (callback) { 23358 setTimeout(function () { 23359 _.disableTransition(slideIndex); 23360 23361 callback.call(); 23362 }, _.options.speed); 23363 } 23364 } 23365 }; 23366 23367 Slick.prototype.fadeSlideOut = function (slideIndex) { 23368 var _ = this; 23369 23370 if (_.cssTransitions === false) { 23371 _.$slides.eq(slideIndex).animate({ 23372 opacity: 0, 23373 zIndex: _.options.zIndex - 2 23374 }, _.options.speed, _.options.easing); 23375 } else { 23376 _.applyTransition(slideIndex); 23377 23378 _.$slides.eq(slideIndex).css({ 23379 opacity: 0, 23380 zIndex: _.options.zIndex - 2 23381 }); 23382 } 23383 }; 23384 23385 Slick.prototype.filterSlides = Slick.prototype.slickFilter = function (filter) { 23386 var _ = this; 23387 23388 if (filter !== null) { 23389 _.$slidesCache = _.$slides; 23390 23391 _.unload(); 23392 23393 _.$slideTrack.children(this.options.slide).detach(); 23394 23395 _.$slidesCache.filter(filter).appendTo(_.$slideTrack); 23396 23397 _.reinit(); 23398 } 23399 }; 23400 23401 Slick.prototype.focusHandler = function () { 23402 var _ = this; 23403 23404 _.$slider.off('focus.slick blur.slick').on('focus.slick blur.slick', '*', function (event) { 23405 event.stopImmediatePropagation(); 23406 var $sf = $(this); 23407 setTimeout(function () { 23408 if (_.options.pauseOnFocus) { 23409 _.focussed = $sf.is(':focus'); 23410 23411 _.autoPlay(); 23412 } 23413 }, 0); 23414 }); 23415 }; 23416 23417 Slick.prototype.getCurrent = Slick.prototype.slickCurrentSlide = function () { 23418 var _ = this; 23419 23420 return _.currentSlide; 23421 }; 23422 23423 Slick.prototype.getDotCount = function () { 23424 var _ = this; 23425 23426 var breakPoint = 0; 23427 var counter = 0; 23428 var pagerQty = 0; 23429 23430 if (_.options.infinite === true) { 23431 if (_.slideCount <= _.options.slidesToShow) { 23432 ++pagerQty; 23433 } else { 23434 while (breakPoint < _.slideCount) { 23435 ++pagerQty; 23436 breakPoint = counter + _.options.slidesToScroll; 23437 counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow; 23438 } 23439 } 23440 } else if (_.options.centerMode === true) { 23441 pagerQty = _.slideCount; 23442 } else if (!_.options.asNavFor) { 23443 pagerQty = 1 + Math.ceil((_.slideCount - _.options.slidesToShow) / _.options.slidesToScroll); 23444 } else { 23445 while (breakPoint < _.slideCount) { 23446 ++pagerQty; 23447 breakPoint = counter + _.options.slidesToScroll; 23448 counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow; 23449 } 23450 } 23451 23452 return pagerQty - 1; 23453 }; 23454 23455 Slick.prototype.getLeft = function (slideIndex) { 23456 var _ = this, 23457 targetLeft, 23458 verticalHeight, 23459 verticalOffset = 0, 23460 targetSlide, 23461 coef; 23462 23463 _.slideOffset = 0; 23464 verticalHeight = _.$slides.first().outerHeight(true); 23465 23466 if (_.options.infinite === true) { 23467 if (_.slideCount > _.options.slidesToShow) { 23468 _.slideOffset = _.slideWidth * _.options.slidesToShow * -1; 23469 coef = -1; 23470 23471 if (_.options.vertical === true && _.options.centerMode === true) { 23472 if (_.options.slidesToShow === 2) { 23473 coef = -1.5; 23474 } else if (_.options.slidesToShow === 1) { 23475 coef = -2; 23476 } 23477 } 23478 23479 verticalOffset = verticalHeight * _.options.slidesToShow * coef; 23480 } 23481 23482 if (_.slideCount % _.options.slidesToScroll !== 0) { 23483 if (slideIndex + _.options.slidesToScroll > _.slideCount && _.slideCount > _.options.slidesToShow) { 23484 if (slideIndex > _.slideCount) { 23485 _.slideOffset = (_.options.slidesToShow - (slideIndex - _.slideCount)) * _.slideWidth * -1; 23486 verticalOffset = (_.options.slidesToShow - (slideIndex - _.slideCount)) * verticalHeight * -1; 23487 } else { 23488 _.slideOffset = _.slideCount % _.options.slidesToScroll * _.slideWidth * -1; 23489 verticalOffset = _.slideCount % _.options.slidesToScroll * verticalHeight * -1; 23490 } 23491 } 23492 } 23493 } else { 23494 if (slideIndex + _.options.slidesToShow > _.slideCount) { 23495 _.slideOffset = (slideIndex + _.options.slidesToShow - _.slideCount) * _.slideWidth; 23496 verticalOffset = (slideIndex + _.options.slidesToShow - _.slideCount) * verticalHeight; 23497 } 23498 } 23499 23500 if (_.slideCount <= _.options.slidesToShow) { 23501 _.slideOffset = 0; 23502 verticalOffset = 0; 23503 } 23504 23505 if (_.options.centerMode === true && _.slideCount <= _.options.slidesToShow) { 23506 _.slideOffset = _.slideWidth * Math.floor(_.options.slidesToShow) / 2 - _.slideWidth * _.slideCount / 2; 23507 } else if (_.options.centerMode === true && _.options.infinite === true) { 23508 _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2) - _.slideWidth; 23509 } else if (_.options.centerMode === true) { 23510 _.slideOffset = 0; 23511 _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2); 23512 } 23513 23514 if (_.options.vertical === false) { 23515 targetLeft = slideIndex * _.slideWidth * -1 + _.slideOffset; 23516 } else { 23517 targetLeft = slideIndex * verticalHeight * -1 + verticalOffset; 23518 } 23519 23520 if (_.options.variableWidth === true) { 23521 if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) { 23522 targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex); 23523 } else { 23524 targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow); 23525 } 23526 23527 if (_.options.rtl === true) { 23528 if (targetSlide[0]) { 23529 targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1; 23530 } else { 23531 targetLeft = 0; 23532 } 23533 } else { 23534 targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0; 23535 } 23536 23537 if (_.options.centerMode === true) { 23538 if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) { 23539 targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex); 23540 } else { 23541 targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow + 1); 23542 } 23543 23544 if (_.options.rtl === true) { 23545 if (targetSlide[0]) { 23546 targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1; 23547 } else { 23548 targetLeft = 0; 23549 } 23550 } else { 23551 targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0; 23552 } 23553 23554 targetLeft += (_.$list.width() - targetSlide.outerWidth()) / 2; 23555 } 23556 } 23557 23558 return targetLeft; 23559 }; 23560 23561 Slick.prototype.getOption = Slick.prototype.slickGetOption = function (option) { 23562 var _ = this; 23563 23564 return _.options[option]; 23565 }; 23566 23567 Slick.prototype.getNavigableIndexes = function () { 23568 var _ = this, 23569 breakPoint = 0, 23570 counter = 0, 23571 indexes = [], 23572 max; 23573 23574 if (_.options.infinite === false) { 23575 max = _.slideCount; 23576 } else { 23577 breakPoint = _.options.slidesToScroll * -1; 23578 counter = _.options.slidesToScroll * -1; 23579 max = _.slideCount * 2; 23580 } 23581 23582 while (breakPoint < max) { 23583 indexes.push(breakPoint); 23584 breakPoint = counter + _.options.slidesToScroll; 23585 counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow; 23586 } 23587 23588 return indexes; 23589 }; 23590 23591 Slick.prototype.getSlick = function () { 23592 return this; 23593 }; 23594 23595 Slick.prototype.getSlideCount = function () { 23596 var _ = this, 23597 slidesTraversed, 23598 swipedSlide, 23599 centerOffset; 23600 23601 centerOffset = _.options.centerMode === true ? _.slideWidth * Math.floor(_.options.slidesToShow / 2) : 0; 23602 23603 if (_.options.swipeToSlide === true) { 23604 _.$slideTrack.find('.slick-slide').each(function (index, slide) { 23605 if (slide.offsetLeft - centerOffset + $(slide).outerWidth() / 2 > _.swipeLeft * -1) { 23606 swipedSlide = slide; 23607 return false; 23608 } 23609 }); 23610 23611 slidesTraversed = Math.abs($(swipedSlide).attr('data-slick-index') - _.currentSlide) || 1; 23612 return slidesTraversed; 23613 } else { 23614 return _.options.slidesToScroll; 23615 } 23616 }; 23617 23618 Slick.prototype.goTo = Slick.prototype.slickGoTo = function (slide, dontAnimate) { 23619 var _ = this; 23620 23621 _.changeSlide({ 23622 data: { 23623 message: 'index', 23624 index: parseInt(slide) 23625 } 23626 }, dontAnimate); 23627 }; 23628 23629 Slick.prototype.init = function (creation) { 23630 var _ = this; 23631 23632 if (!$(_.$slider).hasClass('slick-initialized')) { 23633 $(_.$slider).addClass('slick-initialized'); 23634 23635 _.buildRows(); 23636 23637 _.buildOut(); 23638 23639 _.setProps(); 23640 23641 _.startLoad(); 23642 23643 _.loadSlider(); 23644 23645 _.initializeEvents(); 23646 23647 _.updateArrows(); 23648 23649 _.updateDots(); 23650 23651 _.checkResponsive(true); 23652 23653 _.focusHandler(); 23654 } 23655 23656 if (creation) { 23657 _.$slider.trigger('init', [_]); 23658 } 23659 23660 if (_.options.accessibility === true) { 23661 _.initADA(); 23662 } 23663 23664 if (_.options.autoplay) { 23665 _.paused = false; 23666 23667 _.autoPlay(); 23668 } 23669 }; 23670 23671 Slick.prototype.initADA = function () { 23672 var _ = this, 23673 numDotGroups = Math.ceil(_.slideCount / _.options.slidesToShow), 23674 tabControlIndexes = _.getNavigableIndexes().filter(function (val) { 23675 return val >= 0 && val < _.slideCount; 23676 }); 23677 23678 _.$slides.add(_.$slideTrack.find('.slick-cloned')).attr({ 23679 'aria-hidden': 'true', 23680 'tabindex': '-1' 23681 }).find('a, input, button, select').attr({ 23682 'tabindex': '-1' 23683 }); 23684 23685 if (_.$dots !== null) { 23686 _.$slides.not(_.$slideTrack.find('.slick-cloned')).each(function (i) { 23687 var slideControlIndex = tabControlIndexes.indexOf(i); 23688 $(this).attr({ 23689 'role': 'tabpanel', 23690 'id': 'slick-slide' + _.instanceUid + i, 23691 'tabindex': -1 23692 }); 23693 23694 if (slideControlIndex !== -1) { 23695 var ariaButtonControl = 'slick-slide-control' + _.instanceUid + slideControlIndex; 23696 23697 if ($('#' + ariaButtonControl).length) { 23698 $(this).attr({ 23699 'aria-describedby': ariaButtonControl 23700 }); 23701 } 23702 } 23703 }); 23704 23705 _.$dots.attr('role', 'tablist').find('li').each(function (i) { 23706 var mappedSlideIndex = tabControlIndexes[i]; 23707 $(this).attr({ 23708 'role': 'presentation' 23709 }); 23710 $(this).find('button').first().attr({ 23711 'role': 'tab', 23712 'id': 'slick-slide-control' + _.instanceUid + i, 23713 'aria-controls': 'slick-slide' + _.instanceUid + mappedSlideIndex, 23714 'aria-label': i + 1 + ' of ' + numDotGroups, 23715 'aria-selected': null, 23716 'tabindex': '-1' 23717 }); 23718 }).eq(_.currentSlide).find('button').attr({ 23719 'aria-selected': 'true', 23720 'tabindex': '0' 23721 }).end(); 23722 } 23723 23724 for (var i = _.currentSlide, max = i + _.options.slidesToShow; i < max; i++) { 23725 if (_.options.focusOnChange) { 23726 _.$slides.eq(i).attr({ 23727 'tabindex': '0' 23728 }); 23729 } else { 23730 _.$slides.eq(i).removeAttr('tabindex'); 23731 } 23732 } 23733 23734 _.activateADA(); 23735 }; 23736 23737 Slick.prototype.initArrowEvents = function () { 23738 var _ = this; 23739 23740 if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) { 23741 _.$prevArrow.off('click.slick').on('click.slick', { 23742 message: 'previous' 23743 }, _.changeSlide); 23744 23745 _.$nextArrow.off('click.slick').on('click.slick', { 23746 message: 'next' 23747 }, _.changeSlide); 23748 23749 if (_.options.accessibility === true) { 23750 _.$prevArrow.on('keydown.slick', _.keyHandler); 23751 23752 _.$nextArrow.on('keydown.slick', _.keyHandler); 23753 } 23754 } 23755 }; 23756 23757 Slick.prototype.initDotEvents = function () { 23758 var _ = this; 23759 23760 if (_.options.dots === true && _.slideCount > _.options.slidesToShow) { 23761 $('li', _.$dots).on('click.slick', { 23762 message: 'index' 23763 }, _.changeSlide); 23764 23765 if (_.options.accessibility === true) { 23766 _.$dots.on('keydown.slick', _.keyHandler); 23767 } 23768 } 23769 23770 if (_.options.dots === true && _.options.pauseOnDotsHover === true && _.slideCount > _.options.slidesToShow) { 23771 $('li', _.$dots).on('mouseenter.slick', $.proxy(_.interrupt, _, true)).on('mouseleave.slick', $.proxy(_.interrupt, _, false)); 23772 } 23773 }; 23774 23775 Slick.prototype.initSlideEvents = function () { 23776 var _ = this; 23777 23778 if (_.options.pauseOnHover) { 23779 _.$list.on('mouseenter.slick', $.proxy(_.interrupt, _, true)); 23780 23781 _.$list.on('mouseleave.slick', $.proxy(_.interrupt, _, false)); 23782 } 23783 }; 23784 23785 Slick.prototype.initializeEvents = function () { 23786 var _ = this; 23787 23788 _.initArrowEvents(); 23789 23790 _.initDotEvents(); 23791 23792 _.initSlideEvents(); 23793 23794 _.$list.on('touchstart.slick mousedown.slick', { 23795 action: 'start' 23796 }, _.swipeHandler); 23797 23798 _.$list.on('touchmove.slick mousemove.slick', { 23799 action: 'move' 23800 }, _.swipeHandler); 23801 23802 _.$list.on('touchend.slick mouseup.slick', { 23803 action: 'end' 23804 }, _.swipeHandler); 23805 23806 _.$list.on('touchcancel.slick mouseleave.slick', { 23807 action: 'end' 23808 }, _.swipeHandler); 23809 23810 _.$list.on('click.slick', _.clickHandler); 23811 23812 $(document).on(_.visibilityChange, $.proxy(_.visibility, _)); 23813 23814 if (_.options.accessibility === true) { 23815 _.$list.on('keydown.slick', _.keyHandler); 23816 } 23817 23818 if (_.options.focusOnSelect === true) { 23819 $(_.$slideTrack).children().on('click.slick', _.selectHandler); 23820 } 23821 23822 $(window).on('orientationchange.slick.slick-' + _.instanceUid, $.proxy(_.orientationChange, _)); 23823 $(window).on('resize.slick.slick-' + _.instanceUid, $.proxy(_.resize, _)); 23824 $('[draggable!=true]', _.$slideTrack).on('dragstart', _.preventDefault); 23825 $(window).on('load.slick.slick-' + _.instanceUid, _.setPosition); 23826 $(_.setPosition); 23827 }; 23828 23829 Slick.prototype.initUI = function () { 23830 var _ = this; 23831 23832 if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) { 23833 _.$prevArrow.show(); 23834 23835 _.$nextArrow.show(); 23836 } 23837 23838 if (_.options.dots === true && _.slideCount > _.options.slidesToShow) { 23839 _.$dots.show(); 23840 } 23841 }; 23842 23843 Slick.prototype.keyHandler = function (event) { 23844 var _ = this; //Dont slide if the cursor is inside the form fields and arrow keys are pressed 23845 23846 23847 if (!event.target.tagName.match('TEXTAREA|INPUT|SELECT')) { 23848 if (event.keyCode === 37 && _.options.accessibility === true) { 23849 _.changeSlide({ 23850 data: { 23851 message: _.options.rtl === true ? 'next' : 'previous' 23852 } 23853 }); 23854 } else if (event.keyCode === 39 && _.options.accessibility === true) { 23855 _.changeSlide({ 23856 data: { 23857 message: _.options.rtl === true ? 'previous' : 'next' 23858 } 23859 }); 23860 } 23861 } 23862 }; 23863 23864 Slick.prototype.lazyLoad = function () { 23865 var _ = this, 23866 loadRange, 23867 cloneRange, 23868 rangeStart, 23869 rangeEnd; 23870 23871 function loadImages(imagesScope) { 23872 $('img[data-lazy]', imagesScope).each(function () { 23873 var image = $(this), 23874 imageSource = $(this).attr('data-lazy'), 23875 imageSrcSet = $(this).attr('data-srcset'), 23876 imageSizes = $(this).attr('data-sizes') || _.$slider.attr('data-sizes'), 23877 imageToLoad = document.createElement('img'); 23878 23879 imageToLoad.onload = function () { 23880 image.animate({ 23881 opacity: 0 23882 }, 100, function () { 23883 if (imageSrcSet) { 23884 image.attr('srcset', imageSrcSet); 23885 23886 if (imageSizes) { 23887 image.attr('sizes', imageSizes); 23888 } 23889 } 23890 23891 image.attr('src', imageSource).animate({ 23892 opacity: 1 23893 }, 200, function () { 23894 image.removeAttr('data-lazy data-srcset data-sizes').removeClass('slick-loading'); 23895 }); 23896 23897 _.$slider.trigger('lazyLoaded', [_, image, imageSource]); 23898 }); 23899 }; 23900 23901 imageToLoad.onerror = function () { 23902 image.removeAttr('data-lazy').removeClass('slick-loading').addClass('slick-lazyload-error'); 23903 23904 _.$slider.trigger('lazyLoadError', [_, image, imageSource]); 23905 }; 23906 23907 imageToLoad.src = imageSource; 23908 }); 23909 } 23910 23911 if (_.options.centerMode === true) { 23912 if (_.options.infinite === true) { 23913 rangeStart = _.currentSlide + (_.options.slidesToShow / 2 + 1); 23914 rangeEnd = rangeStart + _.options.slidesToShow + 2; 23915 } else { 23916 rangeStart = Math.max(0, _.currentSlide - (_.options.slidesToShow / 2 + 1)); 23917 rangeEnd = 2 + (_.options.slidesToShow / 2 + 1) + _.currentSlide; 23918 } 23919 } else { 23920 rangeStart = _.options.infinite ? _.options.slidesToShow + _.currentSlide : _.currentSlide; 23921 rangeEnd = Math.ceil(rangeStart + _.options.slidesToShow); 23922 23923 if (_.options.fade === true) { 23924 if (rangeStart > 0) rangeStart--; 23925 if (rangeEnd <= _.slideCount) rangeEnd++; 23926 } 23927 } 23928 23929 loadRange = _.$slider.find('.slick-slide').slice(rangeStart, rangeEnd); 23930 23931 if (_.options.lazyLoad === 'anticipated') { 23932 var prevSlide = rangeStart - 1, 23933 nextSlide = rangeEnd, 23934 $slides = _.$slider.find('.slick-slide'); 23935 23936 for (var i = 0; i < _.options.slidesToScroll; i++) { 23937 if (prevSlide < 0) prevSlide = _.slideCount - 1; 23938 loadRange = loadRange.add($slides.eq(prevSlide)); 23939 loadRange = loadRange.add($slides.eq(nextSlide)); 23940 prevSlide--; 23941 nextSlide++; 23942 } 23943 } 23944 23945 loadImages(loadRange); 23946 23947 if (_.slideCount <= _.options.slidesToShow) { 23948 cloneRange = _.$slider.find('.slick-slide'); 23949 loadImages(cloneRange); 23950 } else if (_.currentSlide >= _.slideCount - _.options.slidesToShow) { 23951 cloneRange = _.$slider.find('.slick-cloned').slice(0, _.options.slidesToShow); 23952 loadImages(cloneRange); 23953 } else if (_.currentSlide === 0) { 23954 cloneRange = _.$slider.find('.slick-cloned').slice(_.options.slidesToShow * -1); 23955 loadImages(cloneRange); 23956 } 23957 }; 23958 23959 Slick.prototype.loadSlider = function () { 23960 var _ = this; 23961 23962 _.setPosition(); 23963 23964 _.$slideTrack.css({ 23965 opacity: 1 23966 }); 23967 23968 _.$slider.removeClass('slick-loading'); 23969 23970 _.initUI(); 23971 23972 if (_.options.lazyLoad === 'progressive') { 23973 _.progressiveLazyLoad(); 23974 } 23975 }; 23976 23977 Slick.prototype.next = Slick.prototype.slickNext = function () { 23978 var _ = this; 23979 23980 _.changeSlide({ 23981 data: { 23982 message: 'next' 23983 } 23984 }); 23985 }; 23986 23987 Slick.prototype.orientationChange = function () { 23988 var _ = this; 23989 23990 _.checkResponsive(); 23991 23992 _.setPosition(); 23993 }; 23994 23995 Slick.prototype.pause = Slick.prototype.slickPause = function () { 23996 var _ = this; 23997 23998 _.autoPlayClear(); 23999 24000 _.paused = true; 24001 }; 24002 24003 Slick.prototype.play = Slick.prototype.slickPlay = function () { 24004 var _ = this; 24005 24006 _.autoPlay(); 24007 24008 _.options.autoplay = true; 24009 _.paused = false; 24010 _.focussed = false; 24011 _.interrupted = false; 24012 }; 24013 24014 Slick.prototype.postSlide = function (index) { 24015 var _ = this; 24016 24017 if (!_.unslicked) { 24018 _.$slider.trigger('afterChange', [_, index]); 24019 24020 _.animating = false; 24021 24022 if (_.slideCount > _.options.slidesToShow) { 24023 _.setPosition(); 24024 } 24025 24026 _.swipeLeft = null; 24027 24028 if (_.options.autoplay) { 24029 _.autoPlay(); 24030 } 24031 24032 if (_.options.accessibility === true) { 24033 _.initADA(); 24034 24035 if (_.options.focusOnChange) { 24036 var $currentSlide = $(_.$slides.get(_.currentSlide)); 24037 $currentSlide.attr('tabindex', 0).focus(); 24038 } 24039 } 24040 } 24041 }; 24042 24043 Slick.prototype.prev = Slick.prototype.slickPrev = function () { 24044 var _ = this; 24045 24046 _.changeSlide({ 24047 data: { 24048 message: 'previous' 24049 } 24050 }); 24051 }; 24052 24053 Slick.prototype.preventDefault = function (event) { 24054 event.preventDefault(); 24055 }; 24056 24057 Slick.prototype.progressiveLazyLoad = function (tryCount) { 24058 tryCount = tryCount || 1; 24059 24060 var _ = this, 24061 $imgsToLoad = $('img[data-lazy]', _.$slider), 24062 image, 24063 imageSource, 24064 imageSrcSet, 24065 imageSizes, 24066 imageToLoad; 24067 24068 if ($imgsToLoad.length) { 24069 image = $imgsToLoad.first(); 24070 imageSource = image.attr('data-lazy'); 24071 imageSrcSet = image.attr('data-srcset'); 24072 imageSizes = image.attr('data-sizes') || _.$slider.attr('data-sizes'); 24073 imageToLoad = document.createElement('img'); 24074 24075 imageToLoad.onload = function () { 24076 if (imageSrcSet) { 24077 image.attr('srcset', imageSrcSet); 24078 24079 if (imageSizes) { 24080 image.attr('sizes', imageSizes); 24081 } 24082 } 24083 24084 image.attr('src', imageSource).removeAttr('data-lazy data-srcset data-sizes').removeClass('slick-loading'); 24085 24086 if (_.options.adaptiveHeight === true) { 24087 _.setPosition(); 24088 } 24089 24090 _.$slider.trigger('lazyLoaded', [_, image, imageSource]); 24091 24092 _.progressiveLazyLoad(); 24093 }; 24094 24095 imageToLoad.onerror = function () { 24096 if (tryCount < 3) { 24097 /** 24098 * try to load the image 3 times, 24099 * leave a slight delay so we don't get 24100 * servers blocking the request. 24101 */ 24102 setTimeout(function () { 24103 _.progressiveLazyLoad(tryCount + 1); 24104 }, 500); 24105 } else { 24106 image.removeAttr('data-lazy').removeClass('slick-loading').addClass('slick-lazyload-error'); 24107 24108 _.$slider.trigger('lazyLoadError', [_, image, imageSource]); 24109 24110 _.progressiveLazyLoad(); 24111 } 24112 }; 24113 24114 imageToLoad.src = imageSource; 24115 } else { 24116 _.$slider.trigger('allImagesLoaded', [_]); 24117 } 24118 }; 24119 24120 Slick.prototype.refresh = function (initializing) { 24121 var _ = this, 24122 currentSlide, 24123 lastVisibleIndex; 24124 24125 lastVisibleIndex = _.slideCount - _.options.slidesToShow; // in non-infinite sliders, we don't want to go past the 24126 // last visible index. 24127 24128 if (!_.options.infinite && _.currentSlide > lastVisibleIndex) { 24129 _.currentSlide = lastVisibleIndex; 24130 } // if less slides than to show, go to start. 24131 24132 24133 if (_.slideCount <= _.options.slidesToShow) { 24134 _.currentSlide = 0; 24135 } 24136 24137 currentSlide = _.currentSlide; 24138 24139 _.destroy(true); 24140 24141 $.extend(_, _.initials, { 24142 currentSlide: currentSlide 24143 }); 24144 24145 _.init(); 24146 24147 if (!initializing) { 24148 _.changeSlide({ 24149 data: { 24150 message: 'index', 24151 index: currentSlide 24152 } 24153 }, false); 24154 } 24155 }; 24156 24157 Slick.prototype.registerBreakpoints = function () { 24158 var _ = this, 24159 breakpoint, 24160 currentBreakpoint, 24161 l, 24162 responsiveSettings = _.options.responsive || null; 24163 24164 if ($.type(responsiveSettings) === 'array' && responsiveSettings.length) { 24165 _.respondTo = _.options.respondTo || 'window'; 24166 24167 for (breakpoint in responsiveSettings) { 24168 l = _.breakpoints.length - 1; 24169 24170 if (responsiveSettings.hasOwnProperty(breakpoint)) { 24171 currentBreakpoint = responsiveSettings[breakpoint].breakpoint; // loop through the breakpoints and cut out any existing 24172 // ones with the same breakpoint number, we don't want dupes. 24173 24174 while (l >= 0) { 24175 if (_.breakpoints[l] && _.breakpoints[l] === currentBreakpoint) { 24176 _.breakpoints.splice(l, 1); 24177 } 24178 24179 l--; 24180 } 24181 24182 _.breakpoints.push(currentBreakpoint); 24183 24184 _.breakpointSettings[currentBreakpoint] = responsiveSettings[breakpoint].settings; 24185 } 24186 } 24187 24188 _.breakpoints.sort(function (a, b) { 24189 return _.options.mobileFirst ? a - b : b - a; 24190 }); 24191 } 24192 }; 24193 24194 Slick.prototype.reinit = function () { 24195 var _ = this; 24196 24197 _.$slides = _.$slideTrack.children(_.options.slide).addClass('slick-slide'); 24198 _.slideCount = _.$slides.length; 24199 24200 if (_.currentSlide >= _.slideCount && _.currentSlide !== 0) { 24201 _.currentSlide = _.currentSlide - _.options.slidesToScroll; 24202 } 24203 24204 if (_.slideCount <= _.options.slidesToShow) { 24205 _.currentSlide = 0; 24206 } 24207 24208 _.registerBreakpoints(); 24209 24210 _.setProps(); 24211 24212 _.setupInfinite(); 24213 24214 _.buildArrows(); 24215 24216 _.updateArrows(); 24217 24218 _.initArrowEvents(); 24219 24220 _.buildDots(); 24221 24222 _.updateDots(); 24223 24224 _.initDotEvents(); 24225 24226 _.cleanUpSlideEvents(); 24227 24228 _.initSlideEvents(); 24229 24230 _.checkResponsive(false, true); 24231 24232 if (_.options.focusOnSelect === true) { 24233 $(_.$slideTrack).children().on('click.slick', _.selectHandler); 24234 } 24235 24236 _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0); 24237 24238 _.setPosition(); 24239 24240 _.focusHandler(); 24241 24242 _.paused = !_.options.autoplay; 24243 24244 _.autoPlay(); 24245 24246 _.$slider.trigger('reInit', [_]); 24247 }; 24248 24249 Slick.prototype.resize = function () { 24250 var _ = this; 24251 24252 if ($(window).width() !== _.windowWidth) { 24253 clearTimeout(_.windowDelay); 24254 _.windowDelay = window.setTimeout(function () { 24255 _.windowWidth = $(window).width(); 24256 24257 _.checkResponsive(); 24258 24259 if (!_.unslicked) { 24260 _.setPosition(); 24261 } 24262 }, 50); 24263 } 24264 }; 24265 24266 Slick.prototype.removeSlide = Slick.prototype.slickRemove = function (index, removeBefore, removeAll) { 24267 var _ = this; 24268 24269 if (typeof index === 'boolean') { 24270 removeBefore = index; 24271 index = removeBefore === true ? 0 : _.slideCount - 1; 24272 } else { 24273 index = removeBefore === true ? --index : index; 24274 } 24275 24276 if (_.slideCount < 1 || index < 0 || index > _.slideCount - 1) { 24277 return false; 24278 } 24279 24280 _.unload(); 24281 24282 if (removeAll === true) { 24283 _.$slideTrack.children().remove(); 24284 } else { 24285 _.$slideTrack.children(this.options.slide).eq(index).remove(); 24286 } 24287 24288 _.$slides = _.$slideTrack.children(this.options.slide); 24289 24290 _.$slideTrack.children(this.options.slide).detach(); 24291 24292 _.$slideTrack.append(_.$slides); 24293 24294 _.$slidesCache = _.$slides; 24295 24296 _.reinit(); 24297 }; 24298 24299 Slick.prototype.setCSS = function (position) { 24300 var _ = this, 24301 positionProps = {}, 24302 x, 24303 y; 24304 24305 if (_.options.rtl === true) { 24306 position = -position; 24307 } 24308 24309 x = _.positionProp == 'left' ? Math.ceil(position) + 'px' : '0px'; 24310 y = _.positionProp == 'top' ? Math.ceil(position) + 'px' : '0px'; 24311 positionProps[_.positionProp] = position; 24312 24313 if (_.transformsEnabled === false) { 24314 _.$slideTrack.css(positionProps); 24315 } else { 24316 positionProps = {}; 24317 24318 if (_.cssTransitions === false) { 24319 positionProps[_.animType] = 'translate(' + x + ', ' + y + ')'; 24320 24321 _.$slideTrack.css(positionProps); 24322 } else { 24323 positionProps[_.animType] = 'translate3d(' + x + ', ' + y + ', 0px)'; 24324 24325 _.$slideTrack.css(positionProps); 24326 } 24327 } 24328 }; 24329 24330 Slick.prototype.setDimensions = function () { 24331 var _ = this; 24332 24333 if (_.options.vertical === false) { 24334 if (_.options.centerMode === true) { 24335 _.$list.css({ 24336 padding: '0px ' + _.options.centerPadding 24337 }); 24338 } 24339 } else { 24340 _.$list.height(_.$slides.first().outerHeight(true) * _.options.slidesToShow); 24341 24342 if (_.options.centerMode === true) { 24343 _.$list.css({ 24344 padding: _.options.centerPadding + ' 0px' 24345 }); 24346 } 24347 } 24348 24349 _.listWidth = _.$list.width(); 24350 _.listHeight = _.$list.height(); 24351 24352 if (_.options.vertical === false && _.options.variableWidth === false) { 24353 _.slideWidth = Math.ceil(_.listWidth / _.options.slidesToShow); 24354 24355 _.$slideTrack.width(Math.ceil(_.slideWidth * _.$slideTrack.children('.slick-slide').length)); 24356 } else if (_.options.variableWidth === true) { 24357 _.$slideTrack.width(5000 * _.slideCount); 24358 } else { 24359 _.slideWidth = Math.ceil(_.listWidth); 24360 24361 _.$slideTrack.height(Math.ceil(_.$slides.first().outerHeight(true) * _.$slideTrack.children('.slick-slide').length)); 24362 } 24363 24364 var offset = _.$slides.first().outerWidth(true) - _.$slides.first().width(); 24365 24366 if (_.options.variableWidth === false) _.$slideTrack.children('.slick-slide').width(_.slideWidth - offset); 24367 }; 24368 24369 Slick.prototype.setFade = function () { 24370 var _ = this, 24371 targetLeft; 24372 24373 _.$slides.each(function (index, element) { 24374 targetLeft = _.slideWidth * index * -1; 24375 24376 if (_.options.rtl === true) { 24377 $(element).css({ 24378 position: 'relative', 24379 right: targetLeft, 24380 top: 0, 24381 zIndex: _.options.zIndex - 2, 24382 opacity: 0 24383 }); 24384 } else { 24385 $(element).css({ 24386 position: 'relative', 24387 left: targetLeft, 24388 top: 0, 24389 zIndex: _.options.zIndex - 2, 24390 opacity: 0 24391 }); 24392 } 24393 }); 24394 24395 _.$slides.eq(_.currentSlide).css({ 24396 zIndex: _.options.zIndex - 1, 24397 opacity: 1 24398 }); 24399 }; 24400 24401 Slick.prototype.setHeight = function () { 24402 var _ = this; 24403 24404 if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) { 24405 var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true); 24406 24407 _.$list.css('height', targetHeight); 24408 } 24409 }; 24410 24411 Slick.prototype.setOption = Slick.prototype.slickSetOption = function () { 24412 /** 24413 * accepts arguments in format of: 24414 * 24415 * - for changing a single option's value: 24416 * .slick("setOption", option, value, refresh ) 24417 * 24418 * - for changing a set of responsive options: 24419 * .slick("setOption", 'responsive', [{}, ...], refresh ) 24420 * 24421 * - for updating multiple values at once (not responsive) 24422 * .slick("setOption", { 'option': value, ... }, refresh ) 24423 */ 24424 var _ = this, 24425 l, 24426 item, 24427 option, 24428 value, 24429 refresh = false, 24430 type; 24431 24432 if ($.type(arguments[0]) === 'object') { 24433 option = arguments[0]; 24434 refresh = arguments[1]; 24435 type = 'multiple'; 24436 } else if ($.type(arguments[0]) === 'string') { 24437 option = arguments[0]; 24438 value = arguments[1]; 24439 refresh = arguments[2]; 24440 24441 if (arguments[0] === 'responsive' && $.type(arguments[1]) === 'array') { 24442 type = 'responsive'; 24443 } else if (typeof arguments[1] !== 'undefined') { 24444 type = 'single'; 24445 } 24446 } 24447 24448 if (type === 'single') { 24449 _.options[option] = value; 24450 } else if (type === 'multiple') { 24451 $.each(option, function (opt, val) { 24452 _.options[opt] = val; 24453 }); 24454 } else if (type === 'responsive') { 24455 for (item in value) { 24456 if ($.type(_.options.responsive) !== 'array') { 24457 _.options.responsive = [value[item]]; 24458 } else { 24459 l = _.options.responsive.length - 1; // loop through the responsive object and splice out duplicates. 24460 24461 while (l >= 0) { 24462 if (_.options.responsive[l].breakpoint === value[item].breakpoint) { 24463 _.options.responsive.splice(l, 1); 24464 } 24465 24466 l--; 24467 } 24468 24469 _.options.responsive.push(value[item]); 24470 } 24471 } 24472 } 24473 24474 if (refresh) { 24475 _.unload(); 24476 24477 _.reinit(); 24478 } 24479 }; 24480 24481 Slick.prototype.setPosition = function () { 24482 var _ = this; 24483 24484 _.setDimensions(); 24485 24486 _.setHeight(); 24487 24488 if (_.options.fade === false) { 24489 _.setCSS(_.getLeft(_.currentSlide)); 24490 } else { 24491 _.setFade(); 24492 } 24493 24494 _.$slider.trigger('setPosition', [_]); 24495 }; 24496 24497 Slick.prototype.setProps = function () { 24498 var _ = this, 24499 bodyStyle = document.body.style; 24500 24501 _.positionProp = _.options.vertical === true ? 'top' : 'left'; 24502 24503 if (_.positionProp === 'top') { 24504 _.$slider.addClass('slick-vertical'); 24505 } else { 24506 _.$slider.removeClass('slick-vertical'); 24507 } 24508 24509 if (bodyStyle.WebkitTransition !== undefined || bodyStyle.MozTransition !== undefined || bodyStyle.msTransition !== undefined) { 24510 if (_.options.useCSS === true) { 24511 _.cssTransitions = true; 24512 } 24513 } 24514 24515 if (_.options.fade) { 24516 if (typeof _.options.zIndex === 'number') { 24517 if (_.options.zIndex < 3) { 24518 _.options.zIndex = 3; 24519 } 24520 } else { 24521 _.options.zIndex = _.defaults.zIndex; 24522 } 24523 } 24524 24525 if (bodyStyle.OTransform !== undefined) { 24526 _.animType = 'OTransform'; 24527 _.transformType = '-o-transform'; 24528 _.transitionType = 'OTransition'; 24529 if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false; 24530 } 24531 24532 if (bodyStyle.MozTransform !== undefined) { 24533 _.animType = 'MozTransform'; 24534 _.transformType = '-moz-transform'; 24535 _.transitionType = 'MozTransition'; 24536 if (bodyStyle.perspectiveProperty === undefined && bodyStyle.MozPerspective === undefined) _.animType = false; 24537 } 24538 24539 if (bodyStyle.webkitTransform !== undefined) { 24540 _.animType = 'webkitTransform'; 24541 _.transformType = '-webkit-transform'; 24542 _.transitionType = 'webkitTransition'; 24543 if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false; 24544 } 24545 24546 if (bodyStyle.msTransform !== undefined) { 24547 _.animType = 'msTransform'; 24548 _.transformType = '-ms-transform'; 24549 _.transitionType = 'msTransition'; 24550 if (bodyStyle.msTransform === undefined) _.animType = false; 24551 } 24552 24553 if (bodyStyle.transform !== undefined && _.animType !== false) { 24554 _.animType = 'transform'; 24555 _.transformType = 'transform'; 24556 _.transitionType = 'transition'; 24557 } 24558 24559 _.transformsEnabled = _.options.useTransform && _.animType !== null && _.animType !== false; 24560 }; 24561 24562 Slick.prototype.setSlideClasses = function (index) { 24563 var _ = this, 24564 centerOffset, 24565 allSlides, 24566 indexOffset, 24567 remainder; 24568 24569 allSlides = _.$slider.find('.slick-slide').removeClass('slick-active slick-center slick-current').attr('aria-hidden', 'true'); 24570 24571 _.$slides.eq(index).addClass('slick-current'); 24572 24573 if (_.options.centerMode === true) { 24574 var evenCoef = _.options.slidesToShow % 2 === 0 ? 1 : 0; 24575 centerOffset = Math.floor(_.options.slidesToShow / 2); 24576 24577 if (_.options.infinite === true) { 24578 if (index >= centerOffset && index <= _.slideCount - 1 - centerOffset) { 24579 _.$slides.slice(index - centerOffset + evenCoef, index + centerOffset + 1).addClass('slick-active').attr('aria-hidden', 'false'); 24580 } else { 24581 indexOffset = _.options.slidesToShow + index; 24582 allSlides.slice(indexOffset - centerOffset + 1 + evenCoef, indexOffset + centerOffset + 2).addClass('slick-active').attr('aria-hidden', 'false'); 24583 } 24584 24585 if (index === 0) { 24586 allSlides.eq(allSlides.length - 1 - _.options.slidesToShow).addClass('slick-center'); 24587 } else if (index === _.slideCount - 1) { 24588 allSlides.eq(_.options.slidesToShow).addClass('slick-center'); 24589 } 24590 } 24591 24592 _.$slides.eq(index).addClass('slick-center'); 24593 } else { 24594 if (index >= 0 && index <= _.slideCount - _.options.slidesToShow) { 24595 _.$slides.slice(index, index + _.options.slidesToShow).addClass('slick-active').attr('aria-hidden', 'false'); 24596 } else if (allSlides.length <= _.options.slidesToShow) { 24597 allSlides.addClass('slick-active').attr('aria-hidden', 'false'); 24598 } else { 24599 remainder = _.slideCount % _.options.slidesToShow; 24600 indexOffset = _.options.infinite === true ? _.options.slidesToShow + index : index; 24601 24602 if (_.options.slidesToShow == _.options.slidesToScroll && _.slideCount - index < _.options.slidesToShow) { 24603 allSlides.slice(indexOffset - (_.options.slidesToShow - remainder), indexOffset + remainder).addClass('slick-active').attr('aria-hidden', 'false'); 24604 } else { 24605 allSlides.slice(indexOffset, indexOffset + _.options.slidesToShow).addClass('slick-active').attr('aria-hidden', 'false'); 24606 } 24607 } 24608 } 24609 24610 if (_.options.lazyLoad === 'ondemand' || _.options.lazyLoad === 'anticipated') { 24611 _.lazyLoad(); 24612 } 24613 }; 24614 24615 Slick.prototype.setupInfinite = function () { 24616 var _ = this, 24617 i, 24618 slideIndex, 24619 infiniteCount; 24620 24621 if (_.options.fade === true) { 24622 _.options.centerMode = false; 24623 } 24624 24625 if (_.options.infinite === true && _.options.fade === false) { 24626 slideIndex = null; 24627 24628 if (_.slideCount > _.options.slidesToShow) { 24629 if (_.options.centerMode === true) { 24630 infiniteCount = _.options.slidesToShow + 1; 24631 } else { 24632 infiniteCount = _.options.slidesToShow; 24633 } 24634 24635 for (i = _.slideCount; i > _.slideCount - infiniteCount; i -= 1) { 24636 slideIndex = i - 1; 24637 $(_.$slides[slideIndex]).clone(true).attr('id', '').attr('data-slick-index', slideIndex - _.slideCount).prependTo(_.$slideTrack).addClass('slick-cloned'); 24638 } 24639 24640 for (i = 0; i < infiniteCount + _.slideCount; i += 1) { 24641 slideIndex = i; 24642 $(_.$slides[slideIndex]).clone(true).attr('id', '').attr('data-slick-index', slideIndex + _.slideCount).appendTo(_.$slideTrack).addClass('slick-cloned'); 24643 } 24644 24645 _.$slideTrack.find('.slick-cloned').find('[id]').each(function () { 24646 $(this).attr('id', ''); 24647 }); 24648 } 24649 } 24650 }; 24651 24652 Slick.prototype.interrupt = function (toggle) { 24653 var _ = this; 24654 24655 if (!toggle) { 24656 _.autoPlay(); 24657 } 24658 24659 _.interrupted = toggle; 24660 }; 24661 24662 Slick.prototype.selectHandler = function (event) { 24663 var _ = this; 24664 24665 var targetElement = $(event.target).is('.slick-slide') ? $(event.target) : $(event.target).parents('.slick-slide'); 24666 var index = parseInt(targetElement.attr('data-slick-index')); 24667 if (!index) index = 0; 24668 24669 if (_.slideCount <= _.options.slidesToShow) { 24670 _.slideHandler(index, false, true); 24671 24672 return; 24673 } 24674 24675 _.slideHandler(index); 24676 }; 24677 24678 Slick.prototype.slideHandler = function (index, sync, dontAnimate) { 24679 var targetSlide, 24680 animSlide, 24681 oldSlide, 24682 slideLeft, 24683 targetLeft = null, 24684 _ = this, 24685 navTarget; 24686 24687 sync = sync || false; 24688 24689 if (_.animating === true && _.options.waitForAnimate === true) { 24690 return; 24691 } 24692 24693 if (_.options.fade === true && _.currentSlide === index) { 24694 return; 24695 } 24696 24697 if (sync === false) { 24698 _.asNavFor(index); 24699 } 24700 24701 targetSlide = index; 24702 targetLeft = _.getLeft(targetSlide); 24703 slideLeft = _.getLeft(_.currentSlide); 24704 _.currentLeft = _.swipeLeft === null ? slideLeft : _.swipeLeft; 24705 24706 if (_.options.infinite === false && _.options.centerMode === false && (index < 0 || index > _.getDotCount() * _.options.slidesToScroll)) { 24707 if (_.options.fade === false) { 24708 targetSlide = _.currentSlide; 24709 24710 if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) { 24711 _.animateSlide(slideLeft, function () { 24712 _.postSlide(targetSlide); 24713 }); 24714 } else { 24715 _.postSlide(targetSlide); 24716 } 24717 } 24718 24719 return; 24720 } else if (_.options.infinite === false && _.options.centerMode === true && (index < 0 || index > _.slideCount - _.options.slidesToScroll)) { 24721 if (_.options.fade === false) { 24722 targetSlide = _.currentSlide; 24723 24724 if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) { 24725 _.animateSlide(slideLeft, function () { 24726 _.postSlide(targetSlide); 24727 }); 24728 } else { 24729 _.postSlide(targetSlide); 24730 } 24731 } 24732 24733 return; 24734 } 24735 24736 if (_.options.autoplay) { 24737 clearInterval(_.autoPlayTimer); 24738 } 24739 24740 if (targetSlide < 0) { 24741 if (_.slideCount % _.options.slidesToScroll !== 0) { 24742 animSlide = _.slideCount - _.slideCount % _.options.slidesToScroll; 24743 } else { 24744 animSlide = _.slideCount + targetSlide; 24745 } 24746 } else if (targetSlide >= _.slideCount) { 24747 if (_.slideCount % _.options.slidesToScroll !== 0) { 24748 animSlide = 0; 24749 } else { 24750 animSlide = targetSlide - _.slideCount; 24751 } 24752 } else { 24753 animSlide = targetSlide; 24754 } 24755 24756 _.animating = true; 24757 24758 _.$slider.trigger('beforeChange', [_, _.currentSlide, animSlide]); 24759 24760 oldSlide = _.currentSlide; 24761 _.currentSlide = animSlide; 24762 24763 _.setSlideClasses(_.currentSlide); 24764 24765 if (_.options.asNavFor) { 24766 navTarget = _.getNavTarget(); 24767 navTarget = navTarget.slick('getSlick'); 24768 24769 if (navTarget.slideCount <= navTarget.options.slidesToShow) { 24770 navTarget.setSlideClasses(_.currentSlide); 24771 } 24772 } 24773 24774 _.updateDots(); 24775 24776 _.updateArrows(); 24777 24778 if (_.options.fade === true) { 24779 if (dontAnimate !== true) { 24780 _.fadeSlideOut(oldSlide); 24781 24782 _.fadeSlide(animSlide, function () { 24783 _.postSlide(animSlide); 24784 }); 24785 } else { 24786 _.postSlide(animSlide); 24787 } 24788 24789 _.animateHeight(); 24790 24791 return; 24792 } 24793 24794 if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) { 24795 _.animateSlide(targetLeft, function () { 24796 _.postSlide(animSlide); 24797 }); 24798 } else { 24799 _.postSlide(animSlide); 24800 } 24801 }; 24802 24803 Slick.prototype.startLoad = function () { 24804 var _ = this; 24805 24806 if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) { 24807 _.$prevArrow.hide(); 24808 24809 _.$nextArrow.hide(); 24810 } 24811 24812 if (_.options.dots === true && _.slideCount > _.options.slidesToShow) { 24813 _.$dots.hide(); 24814 } 24815 24816 _.$slider.addClass('slick-loading'); 24817 }; 24818 24819 Slick.prototype.swipeDirection = function () { 24820 var xDist, 24821 yDist, 24822 r, 24823 swipeAngle, 24824 _ = this; 24825 24826 xDist = _.touchObject.startX - _.touchObject.curX; 24827 yDist = _.touchObject.startY - _.touchObject.curY; 24828 r = Math.atan2(yDist, xDist); 24829 swipeAngle = Math.round(r * 180 / Math.PI); 24830 24831 if (swipeAngle < 0) { 24832 swipeAngle = 360 - Math.abs(swipeAngle); 24833 } 24834 24835 if (swipeAngle <= 45 && swipeAngle >= 0) { 24836 return _.options.rtl === false ? 'left' : 'right'; 24837 } 24838 24839 if (swipeAngle <= 360 && swipeAngle >= 315) { 24840 return _.options.rtl === false ? 'left' : 'right'; 24841 } 24842 24843 if (swipeAngle >= 135 && swipeAngle <= 225) { 24844 return _.options.rtl === false ? 'right' : 'left'; 24845 } 24846 24847 if (_.options.verticalSwiping === true) { 24848 if (swipeAngle >= 35 && swipeAngle <= 135) { 24849 return 'down'; 24850 } else { 24851 return 'up'; 24852 } 24853 } 24854 24855 return 'vertical'; 24856 }; 24857 24858 Slick.prototype.swipeEnd = function (event) { 24859 var _ = this, 24860 slideCount, 24861 direction; 24862 24863 _.dragging = false; 24864 _.swiping = false; 24865 24866 if (_.scrolling) { 24867 _.scrolling = false; 24868 return false; 24869 } 24870 24871 _.interrupted = false; 24872 _.shouldClick = _.touchObject.swipeLength > 10 ? false : true; 24873 24874 if (_.touchObject.curX === undefined) { 24875 return false; 24876 } 24877 24878 if (_.touchObject.edgeHit === true) { 24879 _.$slider.trigger('edge', [_, _.swipeDirection()]); 24880 } 24881 24882 if (_.touchObject.swipeLength >= _.touchObject.minSwipe) { 24883 direction = _.swipeDirection(); 24884 24885 switch (direction) { 24886 case 'left': 24887 case 'down': 24888 slideCount = _.options.swipeToSlide ? _.checkNavigable(_.currentSlide + _.getSlideCount()) : _.currentSlide + _.getSlideCount(); 24889 _.currentDirection = 0; 24890 break; 24891 24892 case 'right': 24893 case 'up': 24894 slideCount = _.options.swipeToSlide ? _.checkNavigable(_.currentSlide - _.getSlideCount()) : _.currentSlide - _.getSlideCount(); 24895 _.currentDirection = 1; 24896 break; 24897 24898 default: 24899 } 24900 24901 if (direction != 'vertical') { 24902 _.slideHandler(slideCount); 24903 24904 _.touchObject = {}; 24905 24906 _.$slider.trigger('swipe', [_, direction]); 24907 } 24908 } else { 24909 if (_.touchObject.startX !== _.touchObject.curX) { 24910 _.slideHandler(_.currentSlide); 24911 24912 _.touchObject = {}; 24913 } 24914 } 24915 }; 24916 24917 Slick.prototype.swipeHandler = function (event) { 24918 var _ = this; 24919 24920 if (_.options.swipe === false || 'ontouchend' in document && _.options.swipe === false) { 24921 return; 24922 } else if (_.options.draggable === false && event.type.indexOf('mouse') !== -1) { 24923 return; 24924 } 24925 24926 _.touchObject.fingerCount = event.originalEvent && event.originalEvent.touches !== undefined ? event.originalEvent.touches.length : 1; 24927 _.touchObject.minSwipe = _.listWidth / _.options.touchThreshold; 24928 24929 if (_.options.verticalSwiping === true) { 24930 _.touchObject.minSwipe = _.listHeight / _.options.touchThreshold; 24931 } 24932 24933 switch (event.data.action) { 24934 case 'start': 24935 _.swipeStart(event); 24936 24937 break; 24938 24939 case 'move': 24940 _.swipeMove(event); 24941 24942 break; 24943 24944 case 'end': 24945 _.swipeEnd(event); 24946 24947 break; 24948 } 24949 }; 24950 24951 Slick.prototype.swipeMove = function (event) { 24952 var _ = this, 24953 edgeWasHit = false, 24954 curLeft, 24955 swipeDirection, 24956 swipeLength, 24957 positionOffset, 24958 touches, 24959 verticalSwipeLength; 24960 24961 touches = event.originalEvent !== undefined ? event.originalEvent.touches : null; 24962 24963 if (!_.dragging || _.scrolling || touches && touches.length !== 1) { 24964 return false; 24965 } 24966 24967 curLeft = _.getLeft(_.currentSlide); 24968 _.touchObject.curX = touches !== undefined ? touches[0].pageX : event.clientX; 24969 _.touchObject.curY = touches !== undefined ? touches[0].pageY : event.clientY; 24970 _.touchObject.swipeLength = Math.round(Math.sqrt(Math.pow(_.touchObject.curX - _.touchObject.startX, 2))); 24971 verticalSwipeLength = Math.round(Math.sqrt(Math.pow(_.touchObject.curY - _.touchObject.startY, 2))); 24972 24973 if (!_.options.verticalSwiping && !_.swiping && verticalSwipeLength > 4) { 24974 _.scrolling = true; 24975 return false; 24976 } 24977 24978 if (_.options.verticalSwiping === true) { 24979 _.touchObject.swipeLength = verticalSwipeLength; 24980 } 24981 24982 swipeDirection = _.swipeDirection(); 24983 24984 if (event.originalEvent !== undefined && _.touchObject.swipeLength > 4) { 24985 _.swiping = true; 24986 event.preventDefault(); 24987 } 24988 24989 positionOffset = (_.options.rtl === false ? 1 : -1) * (_.touchObject.curX > _.touchObject.startX ? 1 : -1); 24990 24991 if (_.options.verticalSwiping === true) { 24992 positionOffset = _.touchObject.curY > _.touchObject.startY ? 1 : -1; 24993 } 24994 24995 swipeLength = _.touchObject.swipeLength; 24996 _.touchObject.edgeHit = false; 24997 24998 if (_.options.infinite === false) { 24999 if (_.currentSlide === 0 && swipeDirection === 'right' || _.currentSlide >= _.getDotCount() && swipeDirection === 'left') { 25000 swipeLength = _.touchObject.swipeLength * _.options.edgeFriction; 25001 _.touchObject.edgeHit = true; 25002 } 25003 } 25004 25005 if (_.options.vertical === false) { 25006 _.swipeLeft = curLeft + swipeLength * positionOffset; 25007 } else { 25008 _.swipeLeft = curLeft + swipeLength * (_.$list.height() / _.listWidth) * positionOffset; 25009 } 25010 25011 if (_.options.verticalSwiping === true) { 25012 _.swipeLeft = curLeft + swipeLength * positionOffset; 25013 } 25014 25015 if (_.options.fade === true || _.options.touchMove === false) { 25016 return false; 25017 } 25018 25019 if (_.animating === true) { 25020 _.swipeLeft = null; 25021 return false; 25022 } 25023 25024 _.setCSS(_.swipeLeft); 25025 }; 25026 25027 Slick.prototype.swipeStart = function (event) { 25028 var _ = this, 25029 touches; 25030 25031 _.interrupted = true; 25032 25033 if (_.touchObject.fingerCount !== 1 || _.slideCount <= _.options.slidesToShow) { 25034 _.touchObject = {}; 25035 return false; 25036 } 25037 25038 if (event.originalEvent !== undefined && event.originalEvent.touches !== undefined) { 25039 touches = event.originalEvent.touches[0]; 25040 } 25041 25042 _.touchObject.startX = _.touchObject.curX = touches !== undefined ? touches.pageX : event.clientX; 25043 _.touchObject.startY = _.touchObject.curY = touches !== undefined ? touches.pageY : event.clientY; 25044 _.dragging = true; 25045 }; 25046 25047 Slick.prototype.unfilterSlides = Slick.prototype.slickUnfilter = function () { 25048 var _ = this; 25049 25050 if (_.$slidesCache !== null) { 25051 _.unload(); 25052 25053 _.$slideTrack.children(this.options.slide).detach(); 25054 25055 _.$slidesCache.appendTo(_.$slideTrack); 25056 25057 _.reinit(); 25058 } 25059 }; 25060 25061 Slick.prototype.unload = function () { 25062 var _ = this; 25063 25064 $('.slick-cloned', _.$slider).remove(); 25065 25066 if (_.$dots) { 25067 _.$dots.remove(); 25068 } 25069 25070 if (_.$prevArrow && _.htmlExpr.test(_.options.prevArrow)) { 25071 _.$prevArrow.remove(); 25072 } 25073 25074 if (_.$nextArrow && _.htmlExpr.test(_.options.nextArrow)) { 25075 _.$nextArrow.remove(); 25076 } 25077 25078 _.$slides.removeClass('slick-slide slick-active slick-visible slick-current').attr('aria-hidden', 'true').css('width', ''); 25079 }; 25080 25081 Slick.prototype.unslick = function (fromBreakpoint) { 25082 var _ = this; 25083 25084 _.$slider.trigger('unslick', [_, fromBreakpoint]); 25085 25086 _.destroy(); 25087 }; 25088 25089 Slick.prototype.updateArrows = function () { 25090 var _ = this, 25091 centerOffset; 25092 25093 centerOffset = Math.floor(_.options.slidesToShow / 2); 25094 25095 if (_.options.arrows === true && _.slideCount > _.options.slidesToShow && !_.options.infinite) { 25096 _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false'); 25097 25098 _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false'); 25099 25100 if (_.currentSlide === 0) { 25101 _.$prevArrow.addClass('slick-disabled').attr('aria-disabled', 'true'); 25102 25103 _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false'); 25104 } else if (_.currentSlide >= _.slideCount - _.options.slidesToShow && _.options.centerMode === false) { 25105 _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true'); 25106 25107 _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false'); 25108 } else if (_.currentSlide >= _.slideCount - 1 && _.options.centerMode === true) { 25109 _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true'); 25110 25111 _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false'); 25112 } 25113 } 25114 }; 25115 25116 Slick.prototype.updateDots = function () { 25117 var _ = this; 25118 25119 if (_.$dots !== null) { 25120 _.$dots.find('li').removeClass('slick-active').end(); 25121 25122 _.$dots.find('li').eq(Math.floor(_.currentSlide / _.options.slidesToScroll)).addClass('slick-active'); 25123 } 25124 }; 25125 25126 Slick.prototype.visibility = function () { 25127 var _ = this; 25128 25129 if (_.options.autoplay) { 25130 if (document[_.hidden]) { 25131 _.interrupted = true; 25132 } else { 25133 _.interrupted = false; 25134 } 25135 } 25136 }; 25137 25138 $.fn.slick = function () { 25139 var _ = this, 25140 opt = arguments[0], 25141 args = Array.prototype.slice.call(arguments, 1), 25142 l = _.length, 25143 i, 25144 ret; 25145 25146 for (i = 0; i < l; i++) { 25147 if (_typeof(opt) == 'object' || typeof opt == 'undefined') _[i].slick = new Slick(_[i], opt);else ret = _[i].slick[opt].apply(_[i].slick, args); 25148 if (typeof ret != 'undefined') return ret; 25149 } 25150 25151 return _; 25152 }; 25153}); 25154 25155/***/ }), 25156
vendor: 18,160 bytes, lines 25157-25562
25157/***/ "./node_modules/svg-injector-2/dist/svg-injector.min.js": 25158/*!**************************************************************!*\ 25159 !*** ./node_modules/svg-injector-2/dist/svg-injector.min.js ***! 25160 \**************************************************************/ 25161/*! no static exports found */ 25162/***/ (function(module, exports, __webpack_require__) { 25163 25164/* WEBPACK VAR INJECTION */(function(module) {var __WEBPACK_AMD_DEFINE_RESULT__;function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 25165 25166/*! 25167 * SVGInjector v2.1.3 - Fast, caching, dynamic inline SVG DOM injection library 25168 * https://github.com/flobacher/SVGInjector2 25169 * forked from: 25170 * https://github.com/iconic/SVGInjector 25171 * 25172 * Copyright (c) 2015 flobacher <[email protected]> 25173 * @license MIT 25174 * 25175 * original Copyright (c) 2014 Waybury <[email protected]> 25176 * @license MIT 25177 */ 25178!function (e, t) { 25179 "use strict"; 25180 25181 var r = function () { 25182 function r(e) { 25183 r.instanceCounter++, this.init(e); 25184 } 25185 25186 var n, 25187 i, 25188 s, 25189 l, 25190 a, 25191 o, 25192 c, 25193 u, 25194 f, 25195 p, 25196 d, 25197 v, 25198 g, 25199 m, 25200 h, 25201 b, 25202 y, 25203 S, 25204 A, 25205 C, 25206 x, 25207 k, 25208 N, 25209 w, 25210 j, 25211 E, 25212 I, 25213 F, 25214 T, 25215 G, 25216 V = "http://www.w3.org/2000/svg", 25217 O = "http://www.w3.org/1999/xlink", 25218 q = ["sprite"]; 25219 return s = [], r.instanceCounter = 0, r.prototype.init = function (r) { 25220 r = r || {}, n = {}, o = {}, o.isLocal = "file:" === e.location.protocol, o.hasSvgSupport = t.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"), i = { 25221 count: 0, 25222 elements: [] 25223 }, l = {}, a = {}, a.evalScripts = r.evalScripts || "always", a.pngFallback = r.pngFallback || !1, a.svgFallbackDir = r.svgFallbackDir || !1, a.onlyInjectVisiblePart = r.onlyInjectVisiblePart || !0, a.keepStylesClass = void 0 === r.keepStylesClass ? "" : r.keepStylesClass, a.spriteClassName = void 0 === r.spriteClassName ? "sprite" : r.spriteClassName, a.spriteClassIdName = void 0 === r.spriteClassIdName ? "sprite--" : r.spriteClassIdName, a.removeStylesClass = void 0 === r.removeStylesClass ? "icon" : r.removeStylesClass, a.removeAllStyles = void 0 !== r.removeAllStyles && r.removeAllStyles, a.fallbackClassName = void 0 === r.fallbackClassName ? q : r.fallbackClassName, a.prefixStyleTags = void 0 === r.prefixStyleTags || r.prefixStyleTags, a.spritesheetURL = void 0 !== r.spritesheetURL && "" !== r.spritesheetURL && r.spritesheetURL, a.prefixFragIdClass = a.spriteClassIdName, a.forceFallbacks = void 0 !== r.forceFallbacks && r.forceFallbacks, a.forceFallbacks && (o.hasSvgSupport = !1), x(t.querySelector("html"), "no-svg", o.hasSvgSupport), o.hasSvgSupport && void 0 === r.removeStylesClass && C(a.removeStylesClass); 25224 }, r.prototype.inject = function (e, t, r) { 25225 if (void 0 !== e.length) { 25226 var n = 0, 25227 i = this; 25228 I.call(e, function (s) { 25229 i.injectElement(s, function (i) { 25230 r && "function" == typeof r && r(i), t && e.length === ++n && t(n); 25231 }); 25232 }); 25233 } else e ? this.injectElement(e, function (n) { 25234 r && "function" == typeof r && r(n), t && t(1), e = null; 25235 }) : t && t(0); 25236 }, G = r.prototype.injectElement = function (e, t) { 25237 var r, 25238 n = e.getAttribute("data-src") || e.getAttribute("src"); 25239 25240 if (!n) { 25241 if (!a.spritesheetURL) return; 25242 if ("" === (r = h(e))) return; 25243 n = a.spritesheetURL + "#" + r; 25244 } 25245 25246 e.setAttribute("data-src", n); 25247 var s = n.split("#"); 25248 1 === s.length && s.push(""); 25249 var l; 25250 if (!/\.svg/i.test(n)) return void t("Attempted to inject a file with a non-svg extension: " + n); 25251 25252 if (!o.hasSvgSupport) { 25253 var f = e.getAttribute("data-fallback") || e.getAttribute("data-png"); 25254 return void (f ? (e.setAttribute("src", f), t(null)) : a.pngFallback ? (s.length > 1 && s[1] ? (l = s[1] + ".png", j(a.fallbackClassName) ? c(e, s[1], a.fallbackClassName) : w(a.fallbackClassName) ? a.fallbackClassName(e, s[1]) : "string" == typeof a.fallbackClassName ? E(e, a.fallbackClassName) : e.setAttribute("src", a.pngFallback + "/" + l)) : (l = n.split("/").pop().replace(".svg", ".png"), e.setAttribute("src", a.pngFallback + "/" + l)), t(null)) : t("This browser does not support SVG and no PNG fallback was defined.")); 25255 } 25256 25257 j(a.fallbackClassName) && u(e, s[1], a.fallbackClassName), -1 === i.elements.indexOf(e) && (i.elements.push(e), A(t, n, e)); 25258 }, r.prototype.getEnv = function () { 25259 return o; 25260 }, r.prototype.getConfig = function () { 25261 return a; 25262 }, c = function c(e, t, r) { 25263 var n = void 0 === r ? q : r.slice(0); 25264 I.call(n, function (e, r) { 25265 n[r] = e.replace("%s", t); 25266 }), E(e, n); 25267 }, u = function u(e, t, r) { 25268 r = void 0 === r ? q.slice(0) : r.slice(0); 25269 var n, 25270 i, 25271 s = e.getAttribute("class"); 25272 void 0 !== s && null !== s && (i = s.split(" ")) && (I.call(r, function (e) { 25273 e = e.replace("%s", t), (n = i.indexOf(e)) >= 0 && (i[n] = ""); 25274 }), e.setAttribute("class", N(i.join(" ")))); 25275 }, p = function p(e, t, r, n) { 25276 var i = 0; 25277 return e.textContent = e.textContent.replace(/url\(('|")*#.+('|")*(?=\))/g, function (e) { 25278 return i++, e + "-" + t; 25279 }), i; 25280 }, f = function f(e, t) { 25281 var r, 25282 n, 25283 i, 25284 s, 25285 l, 25286 a, 25287 o, 25288 c, 25289 u, 25290 f, 25291 p, 25292 d, 25293 v, 25294 g, 25295 m, 25296 h, 25297 b = [{ 25298 def: "linearGradient", 25299 attrs: ["fill", "stroke"] 25300 }, { 25301 def: "radialGradient", 25302 attrs: ["fill", "stroke"] 25303 }, { 25304 def: "clipPath", 25305 attrs: ["clip-path"] 25306 }, { 25307 def: "mask", 25308 attrs: ["mask"] 25309 }, { 25310 def: "filter", 25311 attrs: ["filter"] 25312 }, { 25313 def: "color-profile", 25314 attrs: ["color-profile"] 25315 }, { 25316 def: "cursor", 25317 attrs: ["cursor"] 25318 }, { 25319 def: "marker", 25320 attrs: ["marker", "marker-start", "marker-mid", "marker-end"] 25321 }]; 25322 I.call(b, function (b) { 25323 for (n = e.querySelectorAll(b.def + "[id]"), s = 0, i = n.length; s < i; s++) { 25324 for (r = n[s].id + "-" + t, c = b.attrs, f = 0, u = c.length; f < u; f++) { 25325 for (l = e.querySelectorAll("[" + c[f] + '="url(#' + n[s].id + ')"]'), o = 0, a = l.length; o < a; o++) { 25326 l[o].setAttribute(c[f], "url(#" + r + ")"); 25327 } 25328 } 25329 25330 for (p = e.querySelectorAll("[*|href]"), g = [], v = 0, d = p.length; v < d; v++) { 25331 p[v].getAttributeNS(O, "href").toString() === "#" + n[s].id && g.push(p[v]); 25332 } 25333 25334 for (h = 0, m = g.length; h < m; h++) { 25335 g[h].setAttributeNS(O, "href", "#" + r); 25336 } 25337 25338 n[s].id = r; 25339 } 25340 }); 25341 }, d = function d(e, t, r) { 25342 var n; 25343 void 0 === r && (r = ["id", "viewBox"]); 25344 25345 for (var i = 0; i < e.attributes.length; i++) { 25346 n = e.attributes.item(i), r.indexOf(n.name) < 0 && t.setAttribute(n.name, n.value); 25347 } 25348 }, v = function v(e) { 25349 var r = t.createElementNS(V, "svg"); 25350 return I.call(e.childNodes, function (e) { 25351 r.appendChild(e.cloneNode(!0)); 25352 }), d(e, r), r; 25353 }, g = function g(e, t, r) { 25354 var n, 25355 i, 25356 s, 25357 l, 25358 a, 25359 o, 25360 c = r.getAttribute("data-src").split("#"), 25361 u = e.textContent, 25362 f = "", 25363 p = function p(e, t, r) { 25364 r[t] = "." + s + " " + e; 25365 }; 25366 25367 if (c.length > 1) i = c[1], s = i + "-" + t, n = new RegExp("\\." + i + " ", "g"), e.textContent = u.replace(n, "." + s + " ");else { 25368 for (l = c[0].split("/"), s = l[l.length - 1].replace(".svg", "") + "-" + t, n = new RegExp("([\\s\\S]*?){([\\s\\S]*?)}", "g"); null !== (a = n.exec(u));) { 25369 o = a[1].trim().split(", "), o.forEach(p); 25370 f += o.join(", ") + "{" + a[2] + "}\n"; 25371 } 25372 25373 e.textContent = f; 25374 } 25375 r.setAttribute("class", r.getAttribute("class") + " " + s); 25376 }, m = function m(e) { 25377 var t = e.getAttribute("class"); 25378 return t ? t.trim().split(" ") : []; 25379 }, h = function h(e) { 25380 var t = m(e), 25381 r = ""; 25382 return I.call(t, function (e) { 25383 e.indexOf(a.spriteClassIdName) >= 0 && (r = e.replace(a.spriteClassIdName, "")); 25384 }), r; 25385 }, b = function b(e, t, r) { 25386 var n, 25387 i, 25388 s, 25389 l, 25390 a, 25391 o, 25392 c = null, 25393 u = !1, 25394 f = !1, 25395 p = null; 25396 if (void 0 === r) n = c = t.cloneNode(!0), c.getAttribute("width") || t.getAttribute("width") || (f = !0);else if (!(n = t.getElementById(r))) return; 25397 25398 if (s = n.getAttribute("viewBox"), i = s.split(" "), !c) { 25399 if (n instanceof SVGSymbolElement) c = v(n), f = u = !0;else if (n instanceof SVGViewElement) { 25400 if (p = null, e.onlyInjectVisiblePart) { 25401 var d = '*[width="' + i[2] + '"][height="' + i[3] + '"]'; 25402 l = {}, 0 === Math.abs(parseInt(i[0])) ? d += ":not([x])" : (l.x = i[0], d += '[x="' + i[0] + '"]'), 0 === Math.abs(parseInt(i[1])) ? d += ":not([y])" : (l.y = i[1], d += '[y="' + i[1] + '"]'), o = t.querySelectorAll(d), o.length, p = o[0]; 25403 } 25404 25405 if (p && p instanceof SVGSVGElement) { 25406 c = p.cloneNode(!0); 25407 25408 for (var g in l) { 25409 "width" !== g && "height" !== g && c.removeAttribute(g); 25410 } 25411 } else if (p && p instanceof SVGUseElement) { 25412 var h = t.getElementById(p.getAttributeNS(O, "href").substr(1)); 25413 c = v(h), s = h.getAttribute("viewBox"), i = s.split(" "), f = u = !0; 25414 } else f = u = !0, c = t.cloneNode(!0); 25415 } 25416 a = m(c); 25417 var b = e.prefixFragIdClass + r; 25418 a.indexOf(b) < 0 && (a.push(b), c.setAttribute("class", a.join(" "))); 25419 } 25420 25421 return u && c.setAttribute("viewBox", i.join(" ")), f && (c.setAttribute("width", i[2] + "px"), c.setAttribute("height", i[3] + "px")), c.setAttribute("xmlns", V), c.setAttribute("xmlns:xlink", O), c; 25422 }, y = function y(e, t, r, n) { 25423 s[e] = s[e] || [], s[e].push({ 25424 callback: r, 25425 fragmentId: t, 25426 element: n, 25427 name: name 25428 }); 25429 }, S = function S(e) { 25430 for (var t, r = 0, n = s[e].length; r < n; r++) { 25431 !function (r) { 25432 setTimeout(function () { 25433 t = s[e][r], k(e, t.fragmentId, t.callback, t.element, t.name); 25434 }, 0); 25435 }(r); 25436 } 25437 }, A = function A(t, r, i) { 25438 var s, l, a, c, u; 25439 if (s = r.split("#"), l = s[0], a = 2 === s.length ? s[1] : void 0, void 0 !== a && (u = l.split("/"), c = u[u.length - 1].replace(".svg", "")), void 0 !== n[l]) n[l] instanceof SVGSVGElement ? k(l, a, t, i, c) : y(l, a, t, i, c);else { 25440 if (!e.XMLHttpRequest) return t("Browser does not support XMLHttpRequest"), !1; 25441 n[l] = {}, y(l, a, t, i, c); 25442 var f = new XMLHttpRequest(); 25443 f.onreadystatechange = function () { 25444 if (4 === f.readyState) { 25445 if (404 === f.status || null === f.responseXML) return t("Unable to load SVG file: " + l), !1; 25446 if (!(200 === f.status || o.isLocal && 0 === f.status)) return t("There was a problem injecting the SVG: " + f.status + " " + f.statusText), !1; 25447 if (f.responseXML instanceof Document) n[l] = f.responseXML.documentElement;else if (DOMParser && DOMParser instanceof Function) { 25448 var e; 25449 25450 try { 25451 var i = new DOMParser(); 25452 e = i.parseFromString(f.responseText, "text/xml"); 25453 } catch (t) { 25454 e = void 0; 25455 } 25456 25457 if (!e || e.getElementsByTagName("parsererror").length) return t("Unable to parse SVG file: " + r), !1; 25458 n[l] = e.documentElement; 25459 } 25460 S(l); 25461 } 25462 }, f.open("GET", l), f.overrideMimeType && f.overrideMimeType("text/xml"), f.send(); 25463 } 25464 }, C = function C(e) { 25465 var r = "svg." + e + " {fill: currentColor;}", 25466 n = t.head || t.getElementsByTagName("head")[0], 25467 i = t.createElement("style"); 25468 i.type = "text/css", i.styleSheet ? i.styleSheet.cssText = r : i.appendChild(t.createTextNode(r)), n.appendChild(i); 25469 }, x = function x(e, t, r) { 25470 r ? e.className.replace(t, "") : e.className += " " + t; 25471 }, k = function k(t, r, s, o, c) { 25472 var u, v, h, y, S, A, C, x; 25473 if (void 0 === (u = b(a, n[t], r)) || "string" == typeof u) return S = o.getAttribute("data-fallback-svg"), S = !(!S && !a.svgFallbackDir) && a.svgFallbackDir + "/" + r + ".svg", S ? (o.setAttribute("data-src", S), i.elements.splice(i.elements.indexOf(o), 1), G(o, s)) : s(u), !1; 25474 u.setAttribute("role", "img"), I.call(u.children || [], function (e) { 25475 e instanceof SVGDefsElement || e instanceof SVGTitleElement || e instanceof SVGDescElement || e.setAttribute("role", "presentation"); 25476 }), y = o.getAttribute("aria-hidden") || u.getAttribute("aria-hidden"), y ? (u.setAttribute("aria-hidden", "true"), C = u.querySelector("title"), x = u.querySelector("desc"), C && u.removeChild(C), x && u.removeChild(x)) : (h = F("desc", u, o, r, !1), v = F("title", u, o, r, !1), (h.length > 0 || v.length > 0) && (A = v + " " + h, u.setAttribute("aria-labelledby", A.trim()))), d(o, u, ["class"]); 25477 var k = [].concat(u.getAttribute("class") || [], "injected-svg", o.getAttribute("class") || []).join(" "); 25478 u.setAttribute("class", N(k)), f(u, i.count, c), u.removeAttribute("xmlns:a"); 25479 25480 for (var w, j, E = u.querySelectorAll("script"), T = [], V = 0, O = E.length; V < O; V++) { 25481 (j = E[V].getAttribute("type")) && "application/ecmascript" !== j && "application/javascript" !== j || (w = E[V].innerText || E[V].textContent, T.push(w), u.removeChild(E[V])); 25482 } 25483 25484 if (T.length > 0 && ("always" === a.evalScripts || "once" === a.evalScripts && !l[t])) { 25485 for (var q = 0, L = T.length; q < L; q++) { 25486 new Function(T[q])(e); 25487 } 25488 25489 l[t] = !0; 25490 } 25491 25492 var M = u.querySelectorAll("style"); 25493 I.call(M, function (e) { 25494 var t = m(u), 25495 r = !0; 25496 (t.indexOf(a.removeStylesClass) >= 0 || a.removeAllStyles) && t.indexOf(a.keepStylesClass) < 0 ? e.parentNode.removeChild(e) : (p(e, i.count, u, c) > 0 && (r = !1), a.prefixStyleTags && (g(e, i.count, u, c), r = !1), r && (e.textContent += "")); 25497 }), o.parentNode.replaceChild(u, o), delete i.elements[i.elements.indexOf(o)], i.count++, s(u); 25498 }, N = function N(e) { 25499 e = e.split(" "); 25500 25501 for (var t = {}, r = e.length, n = []; r--;) { 25502 t.hasOwnProperty(e[r]) || (t[e[r]] = 1, n.unshift(e[r])); 25503 } 25504 25505 return n.join(" "); 25506 }, w = function w(e) { 25507 return !!(e && e.constructor && e.call && e.apply); 25508 }, j = function j(e) { 25509 return "[object Array]" === Object.prototype.toString.call(e); 25510 }, E = function E(e, t) { 25511 var r = e.getAttribute("class"); 25512 r = r || "", j(t) && (t = t.join(" ")), t = r + " " + t, e.setAttribute("class", N(t)); 25513 }, I = Array.prototype.forEach || function (e, t) { 25514 if (void 0 === this || null === this || "function" != typeof e) throw new TypeError(); 25515 var r, 25516 n = this.length >>> 0; 25517 25518 for (r = 0; r < n; ++r) { 25519 r in this && e.call(t, this[r], r, this); 25520 } 25521 }, F = function F(e, t, r, n, s) { 25522 var l, 25523 a = n ? n + "-" : ""; 25524 return a += e + "-" + i.count, l = r.querySelector(e), l ? T(e, t, l.textContent, a, t.firstChild) : (l = t.querySelector(e), l ? l.setAttribute("id", a) : s ? T(e, t, n, a, t.firstChild) : a = ""), a; 25525 }, T = function T(e, r, n, i, s) { 25526 var l, 25527 a = r.querySelector(e); 25528 return l = t.createElementNS(V, e), l.appendChild(t.createTextNode(n)), l.setAttribute("id", i), r.insertBefore(l, s), a && a.parentNode.removeChild(a), l; 25529 }, r; 25530 }(); 25531 25532 "object" == (typeof angular === "undefined" ? "undefined" : _typeof(angular)) ? angular.module("svginjector", []).provider("svgInjectorOptions", function () { 25533 var e = {}; 25534 return { 25535 set: function set(t) { 25536 e = t; 25537 }, 25538 $get: function $get() { 25539 return e; 25540 } 25541 }; 25542 }).factory("svgInjectorFactory", ["svgInjectorOptions", function (e) { 25543 return new r(e); 25544 }]).directive("svg", ["svgInjectorFactory", function (e) { 25545 var t = e.getConfig(); 25546 return { 25547 restrict: "E", 25548 link: function link(r, n, i) { 25549 i.class && i.class.indexOf(t.spriteClassIdName) >= 0 ? i.$observe("class", function () { 25550 e.inject(n[0]); 25551 }) : (i.dataSrc || i.src) && e.inject(n[0]); 25552 } 25553 }; 25554 }]) : "object" == ( false ? undefined : _typeof(module)) && "object" == _typeof(module.exports) ? module.exports = r : true ? !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () { 25555 return r; 25556 }).call(exports, __webpack_require__, exports, module), 25557 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : undefined; 25558}(window, document); 25559/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module))) 25560 25561/***/ }), 25562
vendor: 61,702 bytes, lines 25563-27365
25563/***/ "./node_modules/tablesaw/dist/tablesaw.jquery.js": 25564/*!*******************************************************!*\ 25565 !*** ./node_modules/tablesaw/dist/tablesaw.jquery.js ***! 25566 \*******************************************************/ 25567/*! no static exports found */ 25568/***/ (function(module, exports, __webpack_require__) { 25569 25570var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 25571 25572/*! Tablesaw - v3.0.9 - 2018-02-14 25573* https://github.com/filamentgroup/tablesaw 25574* Copyright (c) 2018 Filament Group; Licensed MIT */ 25575(function (root, factory) { 25576 if (true) { 25577 !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js")], __WEBPACK_AMD_DEFINE_RESULT__ = (function (jQuery) { 25578 return root.Tablesaw = factory(jQuery, root); 25579 }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), 25580 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); 25581 } else {} 25582})(typeof window !== "undefined" ? window : this, function ($, window) { 25583 "use strict"; 25584 25585 var document = window.document; 25586 var domContentLoadedTriggered = false; 25587 document.addEventListener("DOMContentLoaded", function () { 25588 domContentLoadedTriggered = true; 25589 }); 25590 var Tablesaw = { 25591 i18n: { 25592 modeStack: "Stack", 25593 modeSwipe: "Swipe", 25594 modeToggle: "Toggle", 25595 modeSwitchColumnsAbbreviated: "Cols", 25596 modeSwitchColumns: "Columns", 25597 columnToggleButton: "Columns", 25598 columnToggleError: "No eligible columns.", 25599 sort: "Sort", 25600 swipePreviousColumn: "Previous column", 25601 swipeNextColumn: "Next column" 25602 }, 25603 // cut the mustard 25604 mustard: "head" in document && ( // IE9+, Firefox 4+, Safari 5.1+, Mobile Safari 4.1+, Opera 11.5+, Android 2.3+ 25605 !window.blackberry || window.WebKitPoint) && // only WebKit Blackberry (OS 6+) 25606 !window.operamini, 25607 $: $, 25608 _init: function _init(element) { 25609 Tablesaw.$(element || document).trigger("enhance.tablesaw"); 25610 }, 25611 init: function init(element) { 25612 if (!domContentLoadedTriggered) { 25613 if ("addEventListener" in document) { 25614 // Use raw DOMContentLoaded instead of shoestring (may have issues in Android 2.3, exhibited by stack table) 25615 document.addEventListener("DOMContentLoaded", function () { 25616 Tablesaw._init(element); 25617 }); 25618 } 25619 } else { 25620 Tablesaw._init(element); 25621 } 25622 } 25623 }; 25624 $(document).on("enhance.tablesaw", function () { 25625 // Extend i18n config, if one exists. 25626 if (typeof TablesawConfig !== "undefined" && TablesawConfig.i18n) { 25627 Tablesaw.i18n = $.extend(Tablesaw.i18n, TablesawConfig.i18n || {}); 25628 } 25629 25630 Tablesaw.i18n.modes = [Tablesaw.i18n.modeStack, Tablesaw.i18n.modeSwipe, Tablesaw.i18n.modeToggle]; 25631 }); 25632 25633 if (Tablesaw.mustard) { 25634 $(document.documentElement).addClass("tablesaw-enhanced"); 25635 } 25636 25637 (function () { 25638 var pluginName = "tablesaw"; 25639 var classes = { 25640 toolbar: "tablesaw-bar" 25641 }; 25642 var events = { 25643 create: "tablesawcreate", 25644 destroy: "tablesawdestroy", 25645 refresh: "tablesawrefresh", 25646 resize: "tablesawresize" 25647 }; 25648 var defaultMode = "stack"; 25649 var initSelector = "table"; 25650 var initFilterSelector = "[data-tablesaw],[data-tablesaw-mode],[data-tablesaw-sortable]"; 25651 var defaultConfig = {}; 25652 Tablesaw.events = events; 25653 25654 var Table = function Table(element) { 25655 if (!element) { 25656 throw new Error("Tablesaw requires an element."); 25657 } 25658 25659 this.table = element; 25660 this.$table = $(element); // only one <thead> and <tfoot> are allowed, per the specification 25661 25662 this.$thead = this.$table.children().filter("thead").eq(0); // multiple <tbody> are allowed, per the specification 25663 25664 this.$tbody = this.$table.children().filter("tbody"); 25665 this.mode = this.$table.attr("data-tablesaw-mode") || defaultMode; 25666 this.$toolbar = null; 25667 this.attributes = { 25668 subrow: "data-tablesaw-subrow", 25669 ignorerow: "data-tablesaw-ignorerow" 25670 }; 25671 this.init(); 25672 }; 25673 25674 Table.prototype.init = function () { 25675 if (!this.$thead.length) { 25676 throw new Error("tablesaw: a <thead> is required, but none was found."); 25677 } 25678 25679 if (!this.$thead.find("th").length) { 25680 throw new Error("tablesaw: no header cells found. Are you using <th> inside of <thead>?"); 25681 } // assign an id if there is none 25682 25683 25684 if (!this.$table.attr("id")) { 25685 this.$table.attr("id", pluginName + "-" + Math.round(Math.random() * 10000)); 25686 } 25687 25688 this.createToolbar(); 25689 25690 this._initCells(); 25691 25692 this.$table.data(pluginName, this); 25693 this.$table.trigger(events.create, [this]); 25694 }; 25695 25696 Table.prototype.getConfig = function (pluginSpecificConfig) { 25697 // shoestring extend doesn’t support arbitrary args 25698 var configs = $.extend(defaultConfig, pluginSpecificConfig || {}); 25699 return $.extend(configs, typeof TablesawConfig !== "undefined" ? TablesawConfig : {}); 25700 }; 25701 25702 Table.prototype._getPrimaryHeaderRow = function () { 25703 return this._getHeaderRows().eq(0); 25704 }; 25705 25706 Table.prototype._getHeaderRows = function () { 25707 return this.$thead.children().filter("tr").filter(function () { 25708 return !$(this).is("[data-tablesaw-ignorerow]"); 25709 }); 25710 }; 25711 25712 Table.prototype._getRowIndex = function ($row) { 25713 return $row.prevAll().length; 25714 }; 25715 25716 Table.prototype._getHeaderRowIndeces = function () { 25717 var self = this; 25718 var indeces = []; 25719 25720 this._getHeaderRows().each(function () { 25721 indeces.push(self._getRowIndex($(this))); 25722 }); 25723 25724 return indeces; 25725 }; 25726 25727 Table.prototype._getPrimaryHeaderCells = function ($row) { 25728 return ($row || this._getPrimaryHeaderRow()).find("th"); 25729 }; 25730 25731 Table.prototype._$getCells = function (th) { 25732 var self = this; 25733 return $(th).add(th.cells).filter(function () { 25734 var $t = $(this); 25735 var $row = $t.parent(); 25736 var hasColspan = $t.is("[colspan]"); // no subrows or ignored rows (keep cells in ignored rows that do not have a colspan) 25737 25738 return !$row.is("[" + self.attributes.subrow + "]") && (!$row.is("[" + self.attributes.ignorerow + "]") || !hasColspan); 25739 }); 25740 }; 25741 25742 Table.prototype._getVisibleColspan = function () { 25743 var colspan = 0; 25744 25745 this._getPrimaryHeaderCells().each(function () { 25746 var $t = $(this); 25747 25748 if ($t.css("display") !== "none") { 25749 colspan += parseInt($t.attr("colspan"), 10) || 1; 25750 } 25751 }); 25752 25753 return colspan; 25754 }; 25755 25756 Table.prototype.getColspanForCell = function ($cell) { 25757 var visibleColspan = this._getVisibleColspan(); 25758 25759 var visibleSiblingColumns = 0; 25760 25761 if ($cell.closest("tr").data("tablesaw-rowspanned")) { 25762 visibleSiblingColumns++; 25763 } 25764 25765 $cell.siblings().each(function () { 25766 var $t = $(this); 25767 var colColspan = parseInt($t.attr("colspan"), 10) || 1; 25768 25769 if ($t.css("display") !== "none") { 25770 visibleSiblingColumns += colColspan; 25771 } 25772 }); // console.log( $cell[ 0 ], visibleColspan, visibleSiblingColumns ); 25773 25774 return visibleColspan - visibleSiblingColumns; 25775 }; 25776 25777 Table.prototype.isCellInColumn = function (header, cell) { 25778 return $(header).add(header.cells).filter(function () { 25779 return this === cell; 25780 }).length; 25781 }; 25782 25783 Table.prototype.updateColspanCells = function (cls, header, userAction) { 25784 var self = this; 25785 25786 var primaryHeaderRow = self._getPrimaryHeaderRow(); // find persistent column rowspans 25787 25788 25789 this.$table.find("[rowspan][data-tablesaw-priority]").each(function () { 25790 var $t = $(this); 25791 25792 if ($t.attr("data-tablesaw-priority") !== "persist") { 25793 return; 25794 } 25795 25796 var $row = $t.closest("tr"); 25797 var rowspan = parseInt($t.attr("rowspan"), 10); 25798 25799 if (rowspan > 1) { 25800 $row = $row.next(); 25801 $row.data("tablesaw-rowspanned", true); 25802 rowspan--; 25803 } 25804 }); 25805 this.$table.find("[colspan],[data-tablesaw-maxcolspan]").filter(function () { 25806 // is not in primary header row 25807 return $(this).closest("tr")[0] !== primaryHeaderRow[0]; 25808 }).each(function () { 25809 var $cell = $(this); 25810 25811 if (userAction === undefined || self.isCellInColumn(header, this)) {} else { 25812 // if is not a user action AND the cell is not in the updating column, kill it 25813 return; 25814 } 25815 25816 var colspan = self.getColspanForCell($cell); 25817 25818 if (cls && userAction !== undefined) { 25819 // console.log( colspan === 0 ? "addClass" : "removeClass", $cell ); 25820 $cell[colspan === 0 ? "addClass" : "removeClass"](cls); 25821 } // cache original colspan 25822 25823 25824 var maxColspan = parseInt($cell.attr("data-tablesaw-maxcolspan"), 10); 25825 25826 if (!maxColspan) { 25827 $cell.attr("data-tablesaw-maxcolspan", $cell.attr("colspan")); 25828 } else if (colspan > maxColspan) { 25829 colspan = maxColspan; 25830 } // console.log( this, "setting colspan to ", colspan ); 25831 25832 25833 $cell.attr("colspan", colspan); 25834 }); 25835 }; 25836 25837 Table.prototype._findPrimaryHeadersForCell = function (cell) { 25838 var $headerRow = this._getPrimaryHeaderRow(); 25839 25840 var $headers = this._getPrimaryHeaderCells($headerRow); 25841 25842 var headerRowIndex = this._getRowIndex($headerRow); 25843 25844 var results = []; 25845 25846 for (var rowNumber = 0; rowNumber < this.headerMapping.length; rowNumber++) { 25847 if (rowNumber === headerRowIndex) { 25848 continue; 25849 } 25850 25851 for (var colNumber = 0; colNumber < this.headerMapping[rowNumber].length; colNumber++) { 25852 if (this.headerMapping[rowNumber][colNumber] === cell) { 25853 results.push($headers[colNumber]); 25854 } 25855 } 25856 } 25857 25858 return results; 25859 }; // used by init cells 25860 25861 25862 Table.prototype.getRows = function () { 25863 var self = this; 25864 return this.$table.find("tr").filter(function () { 25865 return $(this).closest("table").is(self.$table); 25866 }); 25867 }; // used by sortable 25868 25869 25870 Table.prototype.getBodyRows = function (tbody) { 25871 return (tbody ? $(tbody) : this.$tbody).children().filter("tr"); 25872 }; 25873 25874 Table.prototype.getHeaderCellIndex = function (cell) { 25875 var lookup = this.headerMapping[0]; 25876 25877 for (var colIndex = 0; colIndex < lookup.length; colIndex++) { 25878 if (lookup[colIndex] === cell) { 25879 return colIndex; 25880 } 25881 } 25882 25883 return -1; 25884 }; 25885 25886 Table.prototype._initCells = function () { 25887 // re-establish original colspans 25888 this.$table.find("[data-tablesaw-maxcolspan]").each(function () { 25889 var $t = $(this); 25890 $t.attr("colspan", $t.attr("data-tablesaw-maxcolspan")); 25891 }); 25892 var $rows = this.getRows(); 25893 var columnLookup = []; 25894 $rows.each(function (rowNumber) { 25895 columnLookup[rowNumber] = []; 25896 }); 25897 $rows.each(function (rowNumber) { 25898 var coltally = 0; 25899 var $t = $(this); 25900 var children = $t.children(); 25901 children.each(function () { 25902 var colspan = parseInt(this.getAttribute("data-tablesaw-maxcolspan") || this.getAttribute("colspan"), 10); 25903 var rowspan = parseInt(this.getAttribute("rowspan"), 10); // set in a previous rowspan 25904 25905 while (columnLookup[rowNumber][coltally]) { 25906 coltally++; 25907 } 25908 25909 columnLookup[rowNumber][coltally] = this; // TODO? both colspan and rowspan 25910 25911 if (colspan) { 25912 for (var k = 0; k < colspan - 1; k++) { 25913 coltally++; 25914 columnLookup[rowNumber][coltally] = this; 25915 } 25916 } 25917 25918 if (rowspan) { 25919 for (var j = 1; j < rowspan; j++) { 25920 columnLookup[rowNumber + j][coltally] = this; 25921 } 25922 } 25923 25924 coltally++; 25925 }); 25926 }); 25927 25928 var headerRowIndeces = this._getHeaderRowIndeces(); 25929 25930 for (var colNumber = 0; colNumber < columnLookup[0].length; colNumber++) { 25931 for (var headerIndex = 0, k = headerRowIndeces.length; headerIndex < k; headerIndex++) { 25932 var headerCol = columnLookup[headerRowIndeces[headerIndex]][colNumber]; 25933 var rowNumber = headerRowIndeces[headerIndex]; 25934 var rowCell; 25935 25936 if (!headerCol.cells) { 25937 headerCol.cells = []; 25938 } 25939 25940 while (rowNumber < columnLookup.length) { 25941 rowCell = columnLookup[rowNumber][colNumber]; 25942 25943 if (headerCol !== rowCell) { 25944 headerCol.cells.push(rowCell); 25945 } 25946 25947 rowNumber++; 25948 } 25949 } 25950 } 25951 25952 this.headerMapping = columnLookup; 25953 }; 25954 25955 Table.prototype.refresh = function () { 25956 this._initCells(); 25957 25958 this.$table.trigger(events.refresh, [this]); 25959 }; 25960 25961 Table.prototype._getToolbarAnchor = function () { 25962 var $parent = this.$table.parent(); 25963 25964 if ($parent.is(".tablesaw-overflow")) { 25965 return $parent; 25966 } 25967 25968 return this.$table; 25969 }; 25970 25971 Table.prototype._getToolbar = function ($anchor) { 25972 if (!$anchor) { 25973 $anchor = this._getToolbarAnchor(); 25974 } 25975 25976 return $anchor.prev().filter("." + classes.toolbar); 25977 }; 25978 25979 Table.prototype.createToolbar = function () { 25980 // Insert the toolbar 25981 // TODO move this into a separate component 25982 var $anchor = this._getToolbarAnchor(); 25983 25984 var $toolbar = this._getToolbar($anchor); 25985 25986 if (!$toolbar.length) { 25987 $toolbar = $("<div>").addClass(classes.toolbar).insertBefore($anchor); 25988 } 25989 25990 this.$toolbar = $toolbar; 25991 25992 if (this.mode) { 25993 this.$toolbar.addClass("tablesaw-mode-" + this.mode); 25994 } 25995 }; 25996 25997 Table.prototype.destroy = function () { 25998 // Don’t remove the toolbar, just erase the classes on it. 25999 // Some of the table features are not yet destroy-friendly. 26000 this._getToolbar().each(function () { 26001 this.className = this.className.replace(/\btablesaw-mode\-\w*\b/gi, ""); 26002 }); 26003 26004 var tableId = this.$table.attr("id"); 26005 $(document).off("." + tableId); 26006 $(window).off("." + tableId); // other plugins 26007 26008 this.$table.trigger(events.destroy, [this]); 26009 this.$table.removeData(pluginName); 26010 }; // Collection method. 26011 26012 26013 $.fn[pluginName] = function () { 26014 return this.each(function () { 26015 var $t = $(this); 26016 26017 if ($t.data(pluginName)) { 26018 return; 26019 } 26020 26021 new Table(this); 26022 }); 26023 }; 26024 26025 var $doc = $(document); 26026 $doc.on("enhance.tablesaw", function (e) { 26027 // Cut the mustard 26028 if (Tablesaw.mustard) { 26029 $(e.target).find(initSelector).filter(initFilterSelector)[pluginName](); 26030 } 26031 }); // Avoid a resize during scroll: 26032 // Some Mobile devices trigger a resize during scroll (sometimes when 26033 // doing elastic stretch at the end of the document or from the 26034 // location bar hide) 26035 26036 var isScrolling = false; 26037 var scrollTimeout; 26038 $doc.on("scroll.tablesaw", function () { 26039 isScrolling = true; 26040 window.clearTimeout(scrollTimeout); 26041 scrollTimeout = window.setTimeout(function () { 26042 isScrolling = false; 26043 }, 300); // must be greater than the resize timeout below 26044 }); 26045 var resizeTimeout; 26046 $(window).on("resize", function () { 26047 if (!isScrolling) { 26048 window.clearTimeout(resizeTimeout); 26049 resizeTimeout = window.setTimeout(function () { 26050 $doc.trigger(events.resize); 26051 }, 150); // must be less than the scrolling timeout above. 26052 } 26053 }); 26054 Tablesaw.Table = Table; 26055 })(); 26056 26057 (function () { 26058 var classes = { 26059 stackTable: "tablesaw-stack", 26060 cellLabels: "tablesaw-cell-label", 26061 cellContentLabels: "tablesaw-cell-content" 26062 }; 26063 var data = { 26064 key: "tablesaw-stack" 26065 }; 26066 var attrs = { 26067 labelless: "data-tablesaw-no-labels", 26068 hideempty: "data-tablesaw-hide-empty" 26069 }; 26070 26071 var Stack = function Stack(element, tablesaw) { 26072 this.tablesaw = tablesaw; 26073 this.$table = $(element); 26074 this.labelless = this.$table.is("[" + attrs.labelless + "]"); 26075 this.hideempty = this.$table.is("[" + attrs.hideempty + "]"); 26076 this.$table.data(data.key, this); 26077 }; 26078 26079 Stack.prototype.init = function () { 26080 this.$table.addClass(classes.stackTable); 26081 26082 if (this.labelless) { 26083 return; 26084 } 26085 26086 var self = this; 26087 this.$table.find("th, td").filter(function () { 26088 return !$(this).closest("thead").length; 26089 }).filter(function () { 26090 return !$(this).closest("tr").is("[" + attrs.labelless + "]") && (!self.hideempty || !!$(this).html()); 26091 }).each(function () { 26092 var $newHeader = $(document.createElement("b")).addClass(classes.cellLabels); 26093 var $cell = $(this); 26094 $(self.tablesaw._findPrimaryHeadersForCell(this)).each(function (index) { 26095 var $header = $(this.cloneNode(true)); // TODO decouple from sortable better 26096 // Changed from .text() in https://github.com/filamentgroup/tablesaw/commit/b9c12a8f893ec192830ec3ba2d75f062642f935b 26097 // to preserve structural html in headers, like <a> 26098 26099 var $sortableButton = $header.find(".tablesaw-sortable-btn"); 26100 $header.find(".tablesaw-sortable-arrow").remove(); // TODO decouple from checkall better 26101 26102 var $checkall = $header.find("[data-tablesaw-checkall]"); 26103 $checkall.closest("label").remove(); 26104 26105 if ($checkall.length) { 26106 $newHeader = $([]); 26107 return; 26108 } 26109 26110 if (index > 0) { 26111 $newHeader.append(document.createTextNode(", ")); 26112 } 26113 26114 var parentNode = $sortableButton.length ? $sortableButton[0] : $header[0]; 26115 var el; 26116 26117 while (el = parentNode.firstChild) { 26118 $newHeader[0].appendChild(el); 26119 } 26120 }); 26121 26122 if ($newHeader.length && !$cell.find("." + classes.cellContentLabels).length) { 26123 $cell.wrapInner("<span class='" + classes.cellContentLabels + "'></span>"); 26124 } // Update if already exists. 26125 26126 26127 var $label = $cell.find("." + classes.cellLabels); 26128 26129 if (!$label.length) { 26130 $cell.prepend($newHeader); 26131 } else { 26132 // only if changed 26133 $label.replaceWith($newHeader); 26134 } 26135 }); 26136 }; 26137 26138 Stack.prototype.destroy = function () { 26139 this.$table.removeClass(classes.stackTable); 26140 this.$table.find("." + classes.cellLabels).remove(); 26141 this.$table.find("." + classes.cellContentLabels).each(function () { 26142 $(this).replaceWith(this.childNodes); 26143 }); 26144 }; // on tablecreate, init 26145 26146 26147 $(document).on(Tablesaw.events.create, function (e, tablesaw) { 26148 if (tablesaw.mode === "stack") { 26149 var table = new Stack(tablesaw.table, tablesaw); 26150 table.init(); 26151 } 26152 }).on(Tablesaw.events.refresh, function (e, tablesaw) { 26153 if (tablesaw.mode === "stack") { 26154 $(tablesaw.table).data(data.key).init(); 26155 } 26156 }).on(Tablesaw.events.destroy, function (e, tablesaw) { 26157 if (tablesaw.mode === "stack") { 26158 $(tablesaw.table).data(data.key).destroy(); 26159 } 26160 }); 26161 Tablesaw.Stack = Stack; 26162 })(); 26163 26164 (function () { 26165 var pluginName = "tablesawbtn", 26166 methods = { 26167 _create: function _create() { 26168 return $(this).each(function () { 26169 $(this).trigger("beforecreate." + pluginName)[pluginName]("_init").trigger("create." + pluginName); 26170 }); 26171 }, 26172 _init: function _init() { 26173 var oEl = $(this), 26174 sel = this.getElementsByTagName("select")[0]; 26175 26176 if (sel) { 26177 // TODO next major version: remove .btn-select 26178 $(this).addClass("btn-select tablesaw-btn-select")[pluginName]("_select", sel); 26179 } 26180 26181 return oEl; 26182 }, 26183 _select: function _select(sel) { 26184 var update = function update(oEl, sel) { 26185 var opts = $(sel).find("option"); 26186 var label = document.createElement("span"); 26187 var el; 26188 var children; 26189 var found = false; 26190 label.setAttribute("aria-hidden", "true"); 26191 label.innerHTML = " "; 26192 opts.each(function () { 26193 var opt = this; 26194 26195 if (opt.selected) { 26196 label.innerHTML = opt.text; 26197 } 26198 }); 26199 children = oEl.childNodes; 26200 26201 if (opts.length > 0) { 26202 for (var i = 0, l = children.length; i < l; i++) { 26203 el = children[i]; 26204 26205 if (el && el.nodeName.toUpperCase() === "SPAN") { 26206 oEl.replaceChild(label, el); 26207 found = true; 26208 } 26209 } 26210 26211 if (!found) { 26212 oEl.insertBefore(label, oEl.firstChild); 26213 } 26214 } 26215 }; 26216 26217 update(this, sel); // todo should this be tablesawrefresh? 26218 26219 $(this).on("change refresh", function () { 26220 update(this, sel); 26221 }); 26222 } 26223 }; // Collection method. 26224 26225 $.fn[pluginName] = function (arrg, a, b, c) { 26226 return this.each(function () { 26227 // if it's a method 26228 if (arrg && typeof arrg === "string") { 26229 return $.fn[pluginName].prototype[arrg].call(this, a, b, c); 26230 } // don't re-init 26231 26232 26233 if ($(this).data(pluginName + "active")) { 26234 return $(this); 26235 } 26236 26237 $(this).data(pluginName + "active", true); 26238 26239 $.fn[pluginName].prototype._create.call(this); 26240 }); 26241 }; // add methods 26242 26243 26244 $.extend($.fn[pluginName].prototype, methods); // TODO OOP this and add to Tablesaw object 26245 })(); 26246 26247 (function () { 26248 var data = { 26249 key: "tablesaw-coltoggle" 26250 }; 26251 26252 var ColumnToggle = function ColumnToggle(element) { 26253 this.$table = $(element); 26254 26255 if (!this.$table.length) { 26256 return; 26257 } 26258 26259 this.tablesaw = this.$table.data("tablesaw"); 26260 this.attributes = { 26261 btnTarget: "data-tablesaw-columntoggle-btn-target", 26262 set: "data-tablesaw-columntoggle-set" 26263 }; 26264 this.classes = { 26265 columnToggleTable: "tablesaw-columntoggle", 26266 columnBtnContain: "tablesaw-columntoggle-btnwrap tablesaw-advance", 26267 columnBtn: "tablesaw-columntoggle-btn tablesaw-nav-btn down", 26268 popup: "tablesaw-columntoggle-popup", 26269 priorityPrefix: "tablesaw-priority-" 26270 }; 26271 this.set = []; 26272 this.$headers = this.tablesaw._getPrimaryHeaderCells(); 26273 this.$table.data(data.key, this); 26274 }; // Column Toggle Sets (one column chooser can control multiple tables) 26275 26276 26277 ColumnToggle.prototype.initSet = function () { 26278 var set = this.$table.attr(this.attributes.set); 26279 26280 if (set) { 26281 // Should not include the current table 26282 var table = this.$table[0]; 26283 this.set = $("table[" + this.attributes.set + "='" + set + "']").filter(function () { 26284 return this !== table; 26285 }).get(); 26286 } 26287 }; 26288 26289 ColumnToggle.prototype.init = function () { 26290 if (!this.$table.length) { 26291 return; 26292 } 26293 26294 var tableId, 26295 id, 26296 $menuButton, 26297 $popup, 26298 $menu, 26299 $btnContain, 26300 self = this; 26301 var cfg = this.tablesaw.getConfig({ 26302 getColumnToggleLabelTemplate: function getColumnToggleLabelTemplate(text) { 26303 return "<label><input type='checkbox' checked>" + text + "</label>"; 26304 } 26305 }); 26306 this.$table.addClass(this.classes.columnToggleTable); 26307 tableId = this.$table.attr("id"); 26308 id = tableId + "-popup"; 26309 $btnContain = $("<div class='" + this.classes.columnBtnContain + "'></div>"); // TODO next major version: remove .btn 26310 26311 $menuButton = $("<a href='#" + id + "' class='btn tablesaw-btn btn-micro " + this.classes.columnBtn + "' data-popup-link>" + "<span>" + Tablesaw.i18n.columnToggleButton + "</span></a>"); 26312 $popup = $("<div class='" + this.classes.popup + "' id='" + id + "'></div>"); 26313 $menu = $("<div class='btn-group'></div>"); 26314 this.$popup = $popup; 26315 var hasNonPersistentHeaders = false; 26316 this.$headers.each(function () { 26317 var $this = $(this), 26318 priority = $this.attr("data-tablesaw-priority"), 26319 $cells = self.tablesaw._$getCells(this); 26320 26321 if (priority && priority !== "persist") { 26322 $cells.addClass(self.classes.priorityPrefix + priority); 26323 $(cfg.getColumnToggleLabelTemplate($this.text())).appendTo($menu).find('input[type="checkbox"]').data("tablesaw-header", this); 26324 hasNonPersistentHeaders = true; 26325 } 26326 }); 26327 26328 if (!hasNonPersistentHeaders) { 26329 $menu.append("<label>" + Tablesaw.i18n.columnToggleError + "</label>"); 26330 } 26331 26332 $menu.appendTo($popup); 26333 26334 function onToggleCheckboxChange(checkbox) { 26335 var checked = checkbox.checked; 26336 var header = self.getHeaderFromCheckbox(checkbox); 26337 26338 var $cells = self.tablesaw._$getCells(header); 26339 26340 $cells[!checked ? "addClass" : "removeClass"]("tablesaw-toggle-cellhidden"); 26341 $cells[checked ? "addClass" : "removeClass"]("tablesaw-toggle-cellvisible"); 26342 self.updateColspanCells(header, checked); 26343 self.$table.trigger("tablesawcolumns"); 26344 } // bind change event listeners to inputs - TODO: move to a private method? 26345 26346 26347 $menu.find('input[type="checkbox"]').on("change", function (e) { 26348 onToggleCheckboxChange(e.target); 26349 26350 if (self.set.length) { 26351 var index; 26352 $(self.$popup).find("input[type='checkbox']").each(function (j) { 26353 if (this === e.target) { 26354 index = j; 26355 return false; 26356 } 26357 }); 26358 $(self.set).each(function () { 26359 var checkbox = $(this).data(data.key).$popup.find("input[type='checkbox']").get(index); 26360 26361 if (checkbox) { 26362 checkbox.checked = e.target.checked; 26363 onToggleCheckboxChange(checkbox); 26364 } 26365 }); 26366 } 26367 }); 26368 $menuButton.appendTo($btnContain); // Use a different target than the toolbar 26369 26370 var $btnTarget = $(this.$table.attr(this.attributes.btnTarget)); 26371 $btnContain.appendTo($btnTarget.length ? $btnTarget : this.tablesaw.$toolbar); 26372 26373 function closePopup(event) { 26374 // Click came from inside the popup, ignore. 26375 if (event && $(event.target).closest("." + self.classes.popup).length) { 26376 return; 26377 } 26378 26379 $(document).off("click." + tableId); 26380 $menuButton.removeClass("up").addClass("down"); 26381 $btnContain.removeClass("visible"); 26382 } 26383 26384 var closeTimeout; 26385 26386 function openPopup() { 26387 $btnContain.addClass("visible"); 26388 $menuButton.removeClass("down").addClass("up"); 26389 $(document).off("click." + tableId, closePopup); 26390 window.clearTimeout(closeTimeout); 26391 closeTimeout = window.setTimeout(function () { 26392 $(document).on("click." + tableId, closePopup); 26393 }, 15); 26394 } 26395 26396 $menuButton.on("click.tablesaw", function (event) { 26397 event.preventDefault(); 26398 26399 if (!$btnContain.is(".visible")) { 26400 openPopup(); 26401 } else { 26402 closePopup(); 26403 } 26404 }); 26405 $popup.appendTo($btnContain); 26406 this.$menu = $menu; // Fix for iOS not rendering shadows correctly when using `-webkit-overflow-scrolling` 26407 26408 var $overflow = this.$table.closest(".tablesaw-overflow"); 26409 26410 if ($overflow.css("-webkit-overflow-scrolling")) { 26411 var timeout; 26412 $overflow.on("scroll", function () { 26413 var $div = $(this); 26414 window.clearTimeout(timeout); 26415 timeout = window.setTimeout(function () { 26416 $div.css("-webkit-overflow-scrolling", "auto"); 26417 window.setTimeout(function () { 26418 $div.css("-webkit-overflow-scrolling", "touch"); 26419 }, 0); 26420 }, 100); 26421 }); 26422 } 26423 26424 $(window).on(Tablesaw.events.resize + "." + tableId, function () { 26425 self.refreshToggle(); 26426 }); 26427 this.initSet(); 26428 this.refreshToggle(); 26429 }; 26430 26431 ColumnToggle.prototype.getHeaderFromCheckbox = function (checkbox) { 26432 return $(checkbox).data("tablesaw-header"); 26433 }; 26434 26435 ColumnToggle.prototype.refreshToggle = function () { 26436 var self = this; 26437 var invisibleColumns = 0; 26438 this.$menu.find("input").each(function () { 26439 var header = self.getHeaderFromCheckbox(this); 26440 this.checked = self.tablesaw._$getCells(header).eq(0).css("display") === "table-cell"; 26441 }); 26442 this.updateColspanCells(); 26443 }; 26444 26445 ColumnToggle.prototype.updateColspanCells = function (header, userAction) { 26446 this.tablesaw.updateColspanCells("tablesaw-toggle-cellhidden", header, userAction); 26447 }; 26448 26449 ColumnToggle.prototype.destroy = function () { 26450 this.$table.removeClass(this.classes.columnToggleTable); 26451 this.$table.find("th, td").each(function () { 26452 var $cell = $(this); 26453 $cell.removeClass("tablesaw-toggle-cellhidden").removeClass("tablesaw-toggle-cellvisible"); 26454 this.className = this.className.replace(/\bui\-table\-priority\-\d\b/g, ""); 26455 }); 26456 }; // on tablecreate, init 26457 26458 26459 $(document).on(Tablesaw.events.create, function (e, tablesaw) { 26460 if (tablesaw.mode === "columntoggle") { 26461 var table = new ColumnToggle(tablesaw.table); 26462 table.init(); 26463 } 26464 }); 26465 $(document).on(Tablesaw.events.destroy, function (e, tablesaw) { 26466 if (tablesaw.mode === "columntoggle") { 26467 $(tablesaw.table).data(data.key).destroy(); 26468 } 26469 }); 26470 $(document).on(Tablesaw.events.refresh, function (e, tablesaw) { 26471 if (tablesaw.mode === "columntoggle") { 26472 $(tablesaw.table).data(data.key).refreshPriority(); 26473 } 26474 }); 26475 Tablesaw.ColumnToggle = ColumnToggle; 26476 })(); 26477 26478 (function () { 26479 function getSortValue(cell) { 26480 var text = []; 26481 $(cell.childNodes).each(function () { 26482 var $el = $(this); 26483 26484 if ($el.is("input, select")) { 26485 text.push($el.val()); 26486 } else if ($el.is(".tablesaw-cell-label")) {} else { 26487 text.push(($el.text() || "").replace(/^\s+|\s+$/g, "")); 26488 } 26489 }); 26490 return text.join(""); 26491 } 26492 26493 var pluginName = "tablesaw-sortable", 26494 initSelector = "table[data-" + pluginName + "]", 26495 sortableSwitchSelector = "[data-" + pluginName + "-switch]", 26496 attrs = { 26497 sortCol: "data-tablesaw-sortable-col", 26498 defaultCol: "data-tablesaw-sortable-default-col", 26499 numericCol: "data-tablesaw-sortable-numeric", 26500 subRow: "data-tablesaw-subrow", 26501 ignoreRow: "data-tablesaw-ignorerow" 26502 }, 26503 classes = { 26504 head: pluginName + "-head", 26505 ascend: pluginName + "-ascending", 26506 descend: pluginName + "-descending", 26507 switcher: pluginName + "-switch", 26508 tableToolbar: "tablesaw-bar-section", 26509 sortButton: pluginName + "-btn" 26510 }, 26511 methods = { 26512 _create: function _create(o) { 26513 return $(this).each(function () { 26514 var init = $(this).data(pluginName + "-init"); 26515 26516 if (init) { 26517 return false; 26518 } 26519 26520 $(this).data(pluginName + "-init", true).trigger("beforecreate." + pluginName)[pluginName]("_init", o).trigger("create." + pluginName); 26521 }); 26522 }, 26523 _init: function _init() { 26524 var el = $(this); 26525 var tblsaw = el.data("tablesaw"); 26526 var heads; 26527 var $switcher; 26528 26529 function addClassToHeads(h) { 26530 $.each(h, function (i, v) { 26531 $(v).addClass(classes.head); 26532 }); 26533 } 26534 26535 function makeHeadsActionable(h, fn) { 26536 $.each(h, function (i, col) { 26537 var b = $("<button class='" + classes.sortButton + "'/>"); 26538 b.on("click", { 26539 col: col 26540 }, fn); 26541 $(col).wrapInner(b).find("button").append("<span class='tablesaw-sortable-arrow'>"); 26542 }); 26543 } 26544 26545 function clearOthers(headcells) { 26546 $.each(headcells, function (i, v) { 26547 var col = $(v); 26548 col.removeAttr(attrs.defaultCol); 26549 col.removeClass(classes.ascend); 26550 col.removeClass(classes.descend); 26551 }); 26552 } 26553 26554 function headsOnAction(e) { 26555 if ($(e.target).is("a[href]")) { 26556 return; 26557 } 26558 26559 e.stopPropagation(); 26560 var headCell = $(e.target).closest("[" + attrs.sortCol + "]"), 26561 v = e.data.col, 26562 newSortValue = heads.index(headCell[0]); 26563 clearOthers(headCell.closest("thead").find("th").filter(function () { 26564 return this !== headCell[0]; 26565 })); 26566 26567 if (headCell.is("." + classes.descend) || !headCell.is("." + classes.ascend)) { 26568 el[pluginName]("sortBy", v, true); 26569 newSortValue += "_asc"; 26570 } else { 26571 el[pluginName]("sortBy", v); 26572 newSortValue += "_desc"; 26573 } 26574 26575 if ($switcher) { 26576 $switcher.find("select").val(newSortValue).trigger("refresh"); 26577 } 26578 26579 e.preventDefault(); 26580 } 26581 26582 function handleDefault(heads) { 26583 $.each(heads, function (idx, el) { 26584 var $el = $(el); 26585 26586 if ($el.is("[" + attrs.defaultCol + "]")) { 26587 if (!$el.is("." + classes.descend)) { 26588 $el.addClass(classes.ascend); 26589 } 26590 } 26591 }); 26592 } 26593 26594 function addSwitcher(heads) { 26595 $switcher = $("<div>").addClass(classes.switcher).addClass(classes.tableToolbar); 26596 var html = ["<label>" + Tablesaw.i18n.sort + ":"]; // TODO next major version: remove .btn 26597 26598 html.push('<span class="btn tablesaw-btn"><select>'); 26599 heads.each(function (j) { 26600 var $t = $(this); 26601 var isDefaultCol = $t.is("[" + attrs.defaultCol + "]"); 26602 var isDescending = $t.is("." + classes.descend); 26603 var hasNumericAttribute = $t.is("[" + attrs.numericCol + "]"); 26604 var numericCount = 0; // Check only the first four rows to see if the column is numbers. 26605 26606 var numericCountMax = 5; 26607 $(this.cells.slice(0, numericCountMax)).each(function () { 26608 if (!isNaN(parseInt(getSortValue(this), 10))) { 26609 numericCount++; 26610 } 26611 }); 26612 var isNumeric = numericCount === numericCountMax; 26613 26614 if (!hasNumericAttribute) { 26615 $t.attr(attrs.numericCol, isNumeric ? "" : "false"); 26616 } 26617 26618 html.push("<option" + (isDefaultCol && !isDescending ? " selected" : "") + ' value="' + j + '_asc">' + $t.text() + " " + (isNumeric ? "↑" : "(A-Z)") + "</option>"); 26619 html.push("<option" + (isDefaultCol && isDescending ? " selected" : "") + ' value="' + j + '_desc">' + $t.text() + " " + (isNumeric ? "↓" : "(Z-A)") + "</option>"); 26620 }); 26621 html.push("</select></span></label>"); 26622 $switcher.html(html.join("")); 26623 var $firstChild = tblsaw.$toolbar.children().eq(0); 26624 26625 if ($firstChild.length) { 26626 $switcher.insertBefore($firstChild); 26627 } else { 26628 $switcher.appendTo(tblsaw.$toolbar); 26629 } 26630 26631 $switcher.find(".tablesaw-btn").tablesawbtn(); 26632 $switcher.find("select").on("change", function () { 26633 var val = $(this).val().split("_"), 26634 head = heads.eq(val[0]); 26635 clearOthers(head.siblings()); 26636 el[pluginName]("sortBy", head.get(0), val[1] === "asc"); 26637 }); 26638 } 26639 26640 el.addClass(pluginName); 26641 heads = el.children().filter("thead").find("th[" + attrs.sortCol + "]"); 26642 addClassToHeads(heads); 26643 makeHeadsActionable(heads, headsOnAction); 26644 handleDefault(heads); 26645 26646 if (el.is(sortableSwitchSelector)) { 26647 addSwitcher(heads); 26648 } 26649 }, 26650 sortRows: function sortRows(rows, colNum, ascending, col, tbody) { 26651 function convertCells(cellArr, belongingToTbody) { 26652 var cells = []; 26653 $.each(cellArr, function (i, cell) { 26654 var row = cell.parentNode; 26655 var $row = $(row); // next row is a subrow 26656 26657 var subrows = []; 26658 var $next = $row.next(); 26659 26660 while ($next.is("[" + attrs.subRow + "]")) { 26661 subrows.push($next[0]); 26662 $next = $next.next(); 26663 } 26664 26665 var tbody = row.parentNode; // current row is a subrow 26666 26667 if ($row.is("[" + attrs.subRow + "]")) {} else if (tbody === belongingToTbody) { 26668 cells.push({ 26669 element: cell, 26670 cell: getSortValue(cell), 26671 row: row, 26672 subrows: subrows.length ? subrows : null, 26673 ignored: $row.is("[" + attrs.ignoreRow + "]") 26674 }); 26675 } 26676 }); 26677 return cells; 26678 } 26679 26680 function getSortFxn(ascending, forceNumeric) { 26681 var fn, 26682 regex = /[^\-\+\d\.]/g; 26683 26684 if (ascending) { 26685 fn = function fn(a, b) { 26686 if (a.ignored || b.ignored) { 26687 return 0; 26688 } 26689 26690 if (forceNumeric) { 26691 return parseFloat(a.cell.replace(regex, "")) - parseFloat(b.cell.replace(regex, "")); 26692 } else { 26693 return a.cell.toLowerCase() > b.cell.toLowerCase() ? 1 : -1; 26694 } 26695 }; 26696 } else { 26697 fn = function fn(a, b) { 26698 if (a.ignored || b.ignored) { 26699 return 0; 26700 } 26701 26702 if (forceNumeric) { 26703 return parseFloat(b.cell.replace(regex, "")) - parseFloat(a.cell.replace(regex, "")); 26704 } else { 26705 return a.cell.toLowerCase() < b.cell.toLowerCase() ? 1 : -1; 26706 } 26707 }; 26708 } 26709 26710 return fn; 26711 } 26712 26713 function convertToRows(sorted) { 26714 var newRows = [], 26715 i, 26716 l; 26717 26718 for (i = 0, l = sorted.length; i < l; i++) { 26719 newRows.push(sorted[i].row); 26720 26721 if (sorted[i].subrows) { 26722 newRows.push(sorted[i].subrows); 26723 } 26724 } 26725 26726 return newRows; 26727 } 26728 26729 var fn; 26730 var sorted; 26731 var cells = convertCells(col.cells, tbody); 26732 var customFn = $(col).data("tablesaw-sort"); 26733 fn = (customFn && typeof customFn === "function" ? customFn(ascending) : false) || getSortFxn(ascending, $(col).is("[" + attrs.numericCol + "]") && !$(col).is("[" + attrs.numericCol + '="false"]')); 26734 sorted = cells.sort(fn); 26735 rows = convertToRows(sorted); 26736 return rows; 26737 }, 26738 makeColDefault: function makeColDefault(col, a) { 26739 var c = $(col); 26740 c.attr(attrs.defaultCol, "true"); 26741 26742 if (a) { 26743 c.removeClass(classes.descend); 26744 c.addClass(classes.ascend); 26745 } else { 26746 c.removeClass(classes.ascend); 26747 c.addClass(classes.descend); 26748 } 26749 }, 26750 sortBy: function sortBy(col, ascending) { 26751 var el = $(this); 26752 var colNum; 26753 var tbl = el.data("tablesaw"); 26754 tbl.$tbody.each(function () { 26755 var tbody = this; 26756 var $tbody = $(this); 26757 var rows = tbl.getBodyRows(tbody); 26758 var sortedRows; 26759 var map = tbl.headerMapping[0]; 26760 var j, k; // find the column number that we’re sorting 26761 26762 for (j = 0, k = map.length; j < k; j++) { 26763 if (map[j] === col) { 26764 colNum = j; 26765 break; 26766 } 26767 } 26768 26769 sortedRows = el[pluginName]("sortRows", rows, colNum, ascending, col, tbody); // replace Table rows 26770 26771 for (j = 0, k = sortedRows.length; j < k; j++) { 26772 $tbody.append(sortedRows[j]); 26773 } 26774 }); 26775 el[pluginName]("makeColDefault", col, ascending); 26776 el.trigger("tablesaw-sorted"); 26777 } 26778 }; // Collection method. 26779 26780 $.fn[pluginName] = function (arrg) { 26781 var args = Array.prototype.slice.call(arguments, 1), 26782 returnVal; // if it's a method 26783 26784 if (arrg && typeof arrg === "string") { 26785 returnVal = $.fn[pluginName].prototype[arrg].apply(this[0], args); 26786 return typeof returnVal !== "undefined" ? returnVal : $(this); 26787 } // check init 26788 26789 26790 if (!$(this).data(pluginName + "-active")) { 26791 $(this).data(pluginName + "-active", true); 26792 26793 $.fn[pluginName].prototype._create.call(this, arrg); 26794 } 26795 26796 return $(this); 26797 }; // add methods 26798 26799 26800 $.extend($.fn[pluginName].prototype, methods); 26801 $(document).on(Tablesaw.events.create, function (e, Tablesaw) { 26802 if (Tablesaw.$table.is(initSelector)) { 26803 Tablesaw.$table[pluginName](); 26804 } 26805 }); // TODO OOP this and add to Tablesaw object 26806 })(); 26807 26808 (function () { 26809 var classes = { 26810 hideBtn: "disabled", 26811 persistWidths: "tablesaw-fix-persist", 26812 hiddenCol: "tablesaw-swipe-cellhidden", 26813 persistCol: "tablesaw-swipe-cellpersist", 26814 allColumnsVisible: "tablesaw-all-cols-visible" 26815 }; 26816 var attrs = { 26817 disableTouchEvents: "data-tablesaw-no-touch", 26818 ignorerow: "data-tablesaw-ignorerow", 26819 subrow: "data-tablesaw-subrow" 26820 }; 26821 26822 function createSwipeTable(tbl, $table) { 26823 var tblsaw = $table.data("tablesaw"); 26824 var $btns = $("<div class='tablesaw-advance'></div>"); // TODO next major version: remove .btn 26825 26826 var $prevBtn = $("<a href='#' class='btn tablesaw-nav-btn tablesaw-btn btn-micro left'>" + Tablesaw.i18n.swipePreviousColumn + "</a>").appendTo($btns); // TODO next major version: remove .btn 26827 26828 var $nextBtn = $("<a href='#' class='btn tablesaw-nav-btn tablesaw-btn btn-micro right'>" + Tablesaw.i18n.swipeNextColumn + "</a>").appendTo($btns); 26829 26830 var $headerCells = tbl._getPrimaryHeaderCells(); 26831 26832 var $headerCellsNoPersist = $headerCells.not('[data-tablesaw-priority="persist"]'); 26833 var headerWidths = []; 26834 var $head = $(document.head || "head"); 26835 var tableId = $table.attr("id"); 26836 26837 if (!$headerCells.length) { 26838 throw new Error("tablesaw swipe: no header cells found."); 26839 } 26840 26841 $table.addClass("tablesaw-swipe"); 26842 26843 function initMinHeaderWidths() { 26844 $table.css({ 26845 width: "1px" 26846 }); // remove any hidden columns 26847 26848 $table.find("." + classes.hiddenCol).removeClass(classes.hiddenCol); 26849 headerWidths = []; // Calculate initial widths 26850 26851 $headerCells.each(function () { 26852 headerWidths.push(this.offsetWidth); 26853 }); // reset props 26854 26855 $table.css({ 26856 width: "" 26857 }); 26858 } 26859 26860 initMinHeaderWidths(); 26861 $btns.appendTo(tblsaw.$toolbar); 26862 26863 if (!tableId) { 26864 tableId = "tableswipe-" + Math.round(Math.random() * 10000); 26865 $table.attr("id", tableId); 26866 } 26867 26868 function showColumn(headerCell) { 26869 tblsaw._$getCells(headerCell).removeClass(classes.hiddenCol); 26870 } 26871 26872 function hideColumn(headerCell) { 26873 tblsaw._$getCells(headerCell).addClass(classes.hiddenCol); 26874 } 26875 26876 function persistColumn(headerCell) { 26877 tblsaw._$getCells(headerCell).addClass(classes.persistCol); 26878 } 26879 26880 function isPersistent(headerCell) { 26881 return $(headerCell).is('[data-tablesaw-priority="persist"]'); 26882 } 26883 26884 function unmaintainWidths() { 26885 $table.removeClass(classes.persistWidths); 26886 $("#" + tableId + "-persist").remove(); 26887 } 26888 26889 function maintainWidths() { 26890 var prefix = "#" + tableId + ".tablesaw-swipe ", 26891 styles = [], 26892 tableWidth = $table.width(), 26893 hash = [], 26894 newHash; // save persistent column widths (as long as they take up less than 75% of table width) 26895 26896 $headerCells.each(function (index) { 26897 var width; 26898 26899 if (isPersistent(this)) { 26900 width = this.offsetWidth; 26901 26902 if (width < tableWidth * 0.75) { 26903 hash.push(index + "-" + width); 26904 styles.push(prefix + " ." + classes.persistCol + ":nth-child(" + (index + 1) + ") { width: " + width + "px; }"); 26905 } 26906 } 26907 }); 26908 newHash = hash.join("_"); 26909 26910 if (styles.length) { 26911 $table.addClass(classes.persistWidths); 26912 var $style = $("#" + tableId + "-persist"); // If style element not yet added OR if the widths have changed 26913 26914 if (!$style.length || $style.data("tablesaw-hash") !== newHash) { 26915 // Remove existing 26916 $style.remove(); 26917 $("<style>" + styles.join("\n") + "</style>").attr("id", tableId + "-persist").data("tablesaw-hash", newHash).appendTo($head); 26918 } 26919 } 26920 } 26921 26922 function getNext() { 26923 var next = [], 26924 checkFound; 26925 $headerCellsNoPersist.each(function (i) { 26926 var $t = $(this), 26927 isHidden = $t.css("display") === "none" || $t.is("." + classes.hiddenCol); 26928 26929 if (!isHidden && !checkFound) { 26930 checkFound = true; 26931 next[0] = i; 26932 } else if (isHidden && checkFound) { 26933 next[1] = i; 26934 return false; 26935 } 26936 }); 26937 return next; 26938 } 26939 26940 function getPrev() { 26941 var next = getNext(); 26942 return [next[1] - 1, next[0] - 1]; 26943 } 26944 26945 function nextpair(fwd) { 26946 return fwd ? getNext() : getPrev(); 26947 } 26948 26949 function canAdvance(pair) { 26950 return pair[1] > -1 && pair[1] < $headerCellsNoPersist.length; 26951 } 26952 26953 function matchesMedia() { 26954 var matchMedia = $table.attr("data-tablesaw-swipe-media"); 26955 return !matchMedia || "matchMedia" in window && window.matchMedia(matchMedia).matches; 26956 } 26957 26958 function fakeBreakpoints() { 26959 if (!matchesMedia()) { 26960 return; 26961 } 26962 26963 var containerWidth = $table.parent().width(), 26964 persist = [], 26965 sum = 0, 26966 sums = [], 26967 visibleNonPersistantCount = $headerCells.length; 26968 $headerCells.each(function (index) { 26969 var $t = $(this), 26970 isPersist = $t.is('[data-tablesaw-priority="persist"]'); 26971 persist.push(isPersist); 26972 sum += headerWidths[index]; 26973 sums.push(sum); // is persistent or is hidden 26974 26975 if (isPersist || sum > containerWidth) { 26976 visibleNonPersistantCount--; 26977 } 26978 }); // We need at least one column to swipe. 26979 26980 var needsNonPersistentColumn = visibleNonPersistantCount === 0; 26981 $headerCells.each(function (index) { 26982 if (sums[index] > containerWidth) { 26983 hideColumn(this); 26984 } 26985 }); 26986 $headerCells.each(function (index) { 26987 if (persist[index]) { 26988 // for visual box-shadow 26989 persistColumn(this); 26990 return; 26991 } 26992 26993 if (sums[index] <= containerWidth || needsNonPersistentColumn) { 26994 needsNonPersistentColumn = false; 26995 showColumn(this); 26996 tblsaw.updateColspanCells(classes.hiddenCol, this, true); 26997 } 26998 }); 26999 unmaintainWidths(); 27000 $table.trigger("tablesawcolumns"); 27001 } 27002 27003 function advance(fwd) { 27004 var pair = nextpair(fwd); 27005 27006 if (canAdvance(pair)) { 27007 if (isNaN(pair[0])) { 27008 if (fwd) { 27009 pair[0] = 0; 27010 } else { 27011 pair[0] = $headerCellsNoPersist.length - 1; 27012 } 27013 } // TODO just blindly hiding the previous column and showing the next column can result in 27014 // column content overflow 27015 27016 27017 maintainWidths(); 27018 hideColumn($headerCellsNoPersist.get(pair[0])); 27019 tblsaw.updateColspanCells(classes.hiddenCol, $headerCellsNoPersist.get(pair[0]), false); 27020 showColumn($headerCellsNoPersist.get(pair[1])); 27021 tblsaw.updateColspanCells(classes.hiddenCol, $headerCellsNoPersist.get(pair[1]), true); 27022 $table.trigger("tablesawcolumns"); 27023 } 27024 } 27025 27026 $prevBtn.add($nextBtn).on("click", function (e) { 27027 advance(!!$(e.target).closest($nextBtn).length); 27028 e.preventDefault(); 27029 }); 27030 27031 function getCoord(event, key) { 27032 return (event.touches || event.originalEvent.touches)[0][key]; 27033 } 27034 27035 if (!$table.is("[" + attrs.disableTouchEvents + "]")) { 27036 $table.on("touchstart.swipetoggle", function (e) { 27037 var originX = getCoord(e, "pageX"); 27038 var originY = getCoord(e, "pageY"); 27039 var x; 27040 var y; 27041 var scrollTop = window.pageYOffset; 27042 $(window).off(Tablesaw.events.resize, fakeBreakpoints); 27043 $(this).on("touchmove.swipetoggle", function (e) { 27044 x = getCoord(e, "pageX"); 27045 y = getCoord(e, "pageY"); 27046 }).on("touchend.swipetoggle", function () { 27047 var cfg = tbl.getConfig({ 27048 swipeHorizontalThreshold: 30, 27049 swipeVerticalThreshold: 30 27050 }); // This config code is a little awkward because shoestring doesn’t support deep $.extend 27051 // Trying to work around when devs only override one of (not both) horizontalThreshold or 27052 // verticalThreshold in their TablesawConfig. 27053 // @TODO major version bump: remove cfg.swipe, move to just use the swipePrefix keys 27054 27055 var verticalThreshold = cfg.swipe ? cfg.swipe.verticalThreshold : cfg.swipeVerticalThreshold; 27056 var horizontalThreshold = cfg.swipe ? cfg.swipe.horizontalThreshold : cfg.swipeHorizontalThreshold; 27057 var isPageScrolled = Math.abs(window.pageYOffset - scrollTop) >= verticalThreshold; 27058 var isVerticalSwipe = Math.abs(y - originY) >= verticalThreshold; 27059 27060 if (!isVerticalSwipe && !isPageScrolled) { 27061 if (x - originX < -1 * horizontalThreshold) { 27062 advance(true); 27063 } 27064 27065 if (x - originX > horizontalThreshold) { 27066 advance(false); 27067 } 27068 } 27069 27070 window.setTimeout(function () { 27071 $(window).on(Tablesaw.events.resize, fakeBreakpoints); 27072 }, 300); 27073 $(this).off("touchmove.swipetoggle touchend.swipetoggle"); 27074 }); 27075 }); 27076 } 27077 27078 $table.on("tablesawcolumns.swipetoggle", function () { 27079 var canGoPrev = canAdvance(getPrev()); 27080 var canGoNext = canAdvance(getNext()); 27081 $prevBtn[canGoPrev ? "removeClass" : "addClass"](classes.hideBtn); 27082 $nextBtn[canGoNext ? "removeClass" : "addClass"](classes.hideBtn); 27083 tblsaw.$toolbar[!canGoPrev && !canGoNext ? "addClass" : "removeClass"](classes.allColumnsVisible); 27084 }).on("tablesawnext.swipetoggle", function () { 27085 advance(true); 27086 }).on("tablesawprev.swipetoggle", function () { 27087 advance(false); 27088 }).on(Tablesaw.events.destroy + ".swipetoggle", function () { 27089 var $t = $(this); 27090 $t.removeClass("tablesaw-swipe"); 27091 tblsaw.$toolbar.find(".tablesaw-advance").remove(); 27092 $(window).off(Tablesaw.events.resize, fakeBreakpoints); 27093 $t.off(".swipetoggle"); 27094 }).on(Tablesaw.events.refresh, function () { 27095 unmaintainWidths(); 27096 initMinHeaderWidths(); 27097 fakeBreakpoints(); 27098 }); 27099 fakeBreakpoints(); 27100 $(window).on(Tablesaw.events.resize, fakeBreakpoints); 27101 } // on tablecreate, init 27102 27103 27104 $(document).on(Tablesaw.events.create, function (e, tablesaw) { 27105 if (tablesaw.mode === "swipe") { 27106 createSwipeTable(tablesaw, tablesaw.$table); 27107 } 27108 }); // TODO OOP this and add to Tablesaw object 27109 })(); 27110 27111 (function () { 27112 var MiniMap = { 27113 attr: { 27114 init: "data-tablesaw-minimap" 27115 }, 27116 show: function show(table) { 27117 var mq = table.getAttribute(MiniMap.attr.init); 27118 27119 if (mq === "") { 27120 // value-less but exists 27121 return true; 27122 } else if (mq && "matchMedia" in window) { 27123 // has a mq value 27124 return window.matchMedia(mq).matches; 27125 } 27126 27127 return false; 27128 } 27129 }; 27130 27131 function createMiniMap($table) { 27132 var tblsaw = $table.data("tablesaw"); 27133 var $btns = $('<div class="tablesaw-advance minimap">'); 27134 var $dotNav = $('<ul class="tablesaw-advance-dots">').appendTo($btns); 27135 var hideDot = "tablesaw-advance-dots-hide"; 27136 27137 var $headerCells = $table.data("tablesaw")._getPrimaryHeaderCells(); // populate dots 27138 27139 27140 $headerCells.each(function () { 27141 $dotNav.append("<li><i></i></li>"); 27142 }); 27143 $btns.appendTo(tblsaw.$toolbar); 27144 27145 function showHideNav() { 27146 if (!MiniMap.show($table[0])) { 27147 $btns.css("display", "none"); 27148 return; 27149 } 27150 27151 $btns.css("display", "block"); // show/hide dots 27152 27153 var dots = $dotNav.find("li").removeClass(hideDot); 27154 $table.find("thead th").each(function (i) { 27155 if ($(this).css("display") === "none") { 27156 dots.eq(i).addClass(hideDot); 27157 } 27158 }); 27159 } // run on init and resize 27160 27161 27162 showHideNav(); 27163 $(window).on(Tablesaw.events.resize, showHideNav); 27164 $table.on("tablesawcolumns.minimap", function () { 27165 showHideNav(); 27166 }).on(Tablesaw.events.destroy + ".minimap", function () { 27167 var $t = $(this); 27168 tblsaw.$toolbar.find(".tablesaw-advance").remove(); 27169 $(window).off(Tablesaw.events.resize, showHideNav); 27170 $t.off(".minimap"); 27171 }); 27172 } // on tablecreate, init 27173 27174 27175 $(document).on(Tablesaw.events.create, function (e, tablesaw) { 27176 if ((tablesaw.mode === "swipe" || tablesaw.mode === "columntoggle") && tablesaw.$table.is("[ " + MiniMap.attr.init + "]")) { 27177 createMiniMap(tablesaw.$table); 27178 } 27179 }); // TODO OOP this better 27180 27181 Tablesaw.MiniMap = MiniMap; 27182 })(); 27183 27184 (function () { 27185 var S = { 27186 selectors: { 27187 init: "table[data-tablesaw-mode-switch]" 27188 }, 27189 attributes: { 27190 excludeMode: "data-tablesaw-mode-exclude" 27191 }, 27192 classes: { 27193 main: "tablesaw-modeswitch", 27194 toolbar: "tablesaw-bar-section" 27195 }, 27196 modes: ["stack", "swipe", "columntoggle"], 27197 init: function init(table) { 27198 var $table = $(table); 27199 var tblsaw = $table.data("tablesaw"); 27200 var ignoreMode = $table.attr(S.attributes.excludeMode); 27201 var $toolbar = tblsaw.$toolbar; 27202 var $switcher = $("<div>").addClass(S.classes.main + " " + S.classes.toolbar); 27203 var html = ['<label><span class="abbreviated">' + Tablesaw.i18n.modeSwitchColumnsAbbreviated + '</span><span class="longform">' + Tablesaw.i18n.modeSwitchColumns + "</span>:"], 27204 dataMode = $table.attr("data-tablesaw-mode"), 27205 isSelected; // TODO next major version: remove .btn 27206 27207 html.push('<span class="btn tablesaw-btn"><select>'); 27208 27209 for (var j = 0, k = S.modes.length; j < k; j++) { 27210 if (ignoreMode && ignoreMode.toLowerCase() === S.modes[j]) { 27211 continue; 27212 } 27213 27214 isSelected = dataMode === S.modes[j]; 27215 html.push("<option" + (isSelected ? " selected" : "") + ' value="' + S.modes[j] + '">' + Tablesaw.i18n.modes[j] + "</option>"); 27216 } 27217 27218 html.push("</select></span></label>"); 27219 $switcher.html(html.join("")); 27220 var $otherToolbarItems = $toolbar.find(".tablesaw-advance").eq(0); 27221 27222 if ($otherToolbarItems.length) { 27223 $switcher.insertBefore($otherToolbarItems); 27224 } else { 27225 $switcher.appendTo($toolbar); 27226 } 27227 27228 $switcher.find(".tablesaw-btn").tablesawbtn(); 27229 $switcher.find("select").on("change", function (event) { 27230 return S.onModeChange.call(table, event, $(this).val()); 27231 }); 27232 }, 27233 onModeChange: function onModeChange(event, val) { 27234 var $table = $(this); 27235 var tblsaw = $table.data("tablesaw"); 27236 var $switcher = tblsaw.$toolbar.find("." + S.classes.main); 27237 $switcher.remove(); 27238 tblsaw.destroy(); 27239 $table.attr("data-tablesaw-mode", val); 27240 $table.tablesaw(); 27241 } 27242 }; 27243 $(document).on(Tablesaw.events.create, function (e, Tablesaw) { 27244 if (Tablesaw.$table.is(S.selectors.init)) { 27245 S.init(Tablesaw.table); 27246 } 27247 }); // TODO OOP this and add to Tablesaw object 27248 })(); 27249 27250 (function () { 27251 var pluginName = "tablesawCheckAll"; 27252 27253 function CheckAll(tablesaw) { 27254 this.tablesaw = tablesaw; 27255 this.$table = tablesaw.$table; 27256 this.attr = "data-tablesaw-checkall"; 27257 this.checkAllSelector = "[" + this.attr + "]"; 27258 this.forceCheckedSelector = "[" + this.attr + "-checked]"; 27259 this.forceUncheckedSelector = "[" + this.attr + "-unchecked]"; 27260 this.checkboxSelector = 'input[type="checkbox"]'; 27261 this.$triggers = null; 27262 this.$checkboxes = null; 27263 27264 if (this.$table.data(pluginName)) { 27265 return; 27266 } 27267 27268 this.$table.data(pluginName, this); 27269 this.init(); 27270 } 27271 27272 CheckAll.prototype._filterCells = function ($checkboxes) { 27273 return $checkboxes.filter(function () { 27274 return !$(this).closest("tr").is("[data-tablesaw-subrow],[data-tablesaw-ignorerow]"); 27275 }).find(this.checkboxSelector).not(this.checkAllSelector); 27276 }; // With buttons you can use a scoping selector like: data-tablesaw-checkall="#my-scoped-id input[type='checkbox']" 27277 27278 27279 CheckAll.prototype.getCheckboxesForButton = function (button) { 27280 return this._filterCells($($(button).attr(this.attr))); 27281 }; 27282 27283 CheckAll.prototype.getCheckboxesForCheckbox = function (checkbox) { 27284 return this._filterCells($($(checkbox).closest("th")[0].cells)); 27285 }; 27286 27287 CheckAll.prototype.init = function () { 27288 var self = this; 27289 this.$table.find(this.checkAllSelector).each(function () { 27290 var $trigger = $(this); 27291 27292 if ($trigger.is(self.checkboxSelector)) { 27293 self.addCheckboxEvents(this); 27294 } else { 27295 self.addButtonEvents(this); 27296 } 27297 }); 27298 }; 27299 27300 CheckAll.prototype.addButtonEvents = function (trigger) { 27301 var self = this; // Update body checkboxes when header checkbox is changed 27302 27303 $(trigger).on("click", function (event) { 27304 event.preventDefault(); 27305 var $checkboxes = self.getCheckboxesForButton(this); 27306 var allChecked = true; 27307 $checkboxes.each(function () { 27308 if (!this.checked) { 27309 allChecked = false; 27310 } 27311 }); 27312 var setChecked; 27313 27314 if ($(this).is(self.forceCheckedSelector)) { 27315 setChecked = true; 27316 } else if ($(this).is(self.forceUncheckedSelector)) { 27317 setChecked = false; 27318 } else { 27319 setChecked = allChecked ? false : true; 27320 } 27321 27322 $checkboxes.each(function () { 27323 this.checked = setChecked; 27324 $(this).trigger("change." + pluginName); 27325 }); 27326 }); 27327 }; 27328 27329 CheckAll.prototype.addCheckboxEvents = function (trigger) { 27330 var self = this; // Update body checkboxes when header checkbox is changed 27331 27332 $(trigger).on("change", function () { 27333 var setChecked = this.checked; 27334 self.getCheckboxesForCheckbox(this).each(function () { 27335 this.checked = setChecked; 27336 }); 27337 }); 27338 var $checkboxes = self.getCheckboxesForCheckbox(trigger); // Update header checkbox when body checkboxes are changed 27339 27340 $checkboxes.on("change." + pluginName, function () { 27341 var checkedCount = 0; 27342 $checkboxes.each(function () { 27343 if (this.checked) { 27344 checkedCount++; 27345 } 27346 }); 27347 var allSelected = checkedCount === $checkboxes.length; 27348 trigger.checked = allSelected; // only indeterminate if some are selected (not all and not none) 27349 27350 trigger.indeterminate = checkedCount !== 0 && !allSelected; 27351 }); 27352 }; // on tablecreate, init 27353 27354 27355 $(document).on(Tablesaw.events.create, function (e, tablesaw) { 27356 new CheckAll(tablesaw); 27357 }); 27358 Tablesaw.CheckAll = CheckAll; 27359 })(); 27360 27361 return Tablesaw; 27362}); 27363 27364/***/ }), 27365
vendor: 838 bytes, lines 27366-27399
27366/***/ "./node_modules/webpack/buildin/module.js": 27367/*!***********************************!*\ 27368 !*** (webpack)/buildin/module.js ***! 27369 \***********************************/ 27370/*! no static exports found */ 27371/***/ (function(module, exports) { 27372 27373module.exports = function (module) { 27374 if (!module.webpackPolyfill) { 27375 module.deprecate = function () {}; 27376 27377 module.paths = []; // module.parent = undefined by default 27378 27379 if (!module.children) module.children = []; 27380 Object.defineProperty(module, "loaded", { 27381 enumerable: true, 27382 get: function get() { 27383 return module.l; 27384 } 27385 }); 27386 Object.defineProperty(module, "id", { 27387 enumerable: true, 27388 get: function get() { 27389 return module.i; 27390 } 27391 }); 27392 module.webpackPolyfill = 1; 27393 } 27394 27395 return module; 27396}; 27397 27398/***/ }), 27399
vendor: 17,071 bytes, lines 27400-27906
27400/***/ "./node_modules/what-input/dist/what-input.js": 27401/*!****************************************************!*\ 27402 !*** ./node_modules/what-input/dist/what-input.js ***! 27403 \****************************************************/ 27404/*! no static exports found */ 27405/***/ (function(module, exports, __webpack_require__) { 27406 27407/* WEBPACK VAR INJECTION */(function(module) {var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 27408 27409/** 27410 * what-input - A global utility for tracking the current input method (mouse, keyboard or touch). 27411 * @version v5.1.2 27412 * @link https://github.com/ten1seven/what-input 27413 * @license MIT 27414 */ 27415(function webpackUniversalModuleDefinition(root, factory) { 27416 if (( false ? undefined : _typeof(exports)) === 'object' && ( false ? undefined : _typeof(module)) === 'object') module.exports = factory();else if (true) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), 27417 __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? 27418 (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), 27419 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {} 27420})(this, function () { 27421 return ( 27422 /******/ 27423 function (modules) { 27424 // webpackBootstrap 27425 27426 /******/ 27427 // The module cache 27428 27429 /******/ 27430 var installedModules = {}; 27431 /******/ 27432 // The require function 27433 27434 /******/ 27435 27436 function __webpack_require__(moduleId) { 27437 /******/ 27438 // Check if module is in cache 27439 27440 /******/ 27441 if (installedModules[moduleId]) 27442 /******/ 27443 return installedModules[moduleId].exports; 27444 /******/ 27445 // Create a new module (and put it into the cache) 27446 27447 /******/ 27448 27449 var module = installedModules[moduleId] = { 27450 /******/ 27451 exports: {}, 27452 27453 /******/ 27454 id: moduleId, 27455 27456 /******/ 27457 loaded: false 27458 /******/ 27459 27460 }; 27461 /******/ 27462 // Execute the module function 27463 27464 /******/ 27465 27466 modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 27467 /******/ 27468 // Flag the module as loaded 27469 27470 /******/ 27471 27472 module.loaded = true; 27473 /******/ 27474 // Return the exports of the module 27475 27476 /******/ 27477 27478 return module.exports; 27479 /******/ 27480 } 27481 /******/ 27482 // expose the modules object (__webpack_modules__) 27483 27484 /******/ 27485 27486 27487 __webpack_require__.m = modules; 27488 /******/ 27489 // expose the module cache 27490 27491 /******/ 27492 27493 __webpack_require__.c = installedModules; 27494 /******/ 27495 // __webpack_public_path__ 27496 27497 /******/ 27498 27499 __webpack_require__.p = ""; 27500 /******/ 27501 // Load entry module and return exports 27502 27503 /******/ 27504 27505 return __webpack_require__(0); 27506 /******/ 27507 }( 27508 /************************************************************************/ 27509 27510 /******/ 27511 [ 27512 /* 0 */ 27513 27514 /***/ 27515 function (module, exports) { 27516 'use strict'; 27517 27518 module.exports = function () { 27519 /* 27520 * bail out if there is no document or window 27521 * (i.e. in a node/non-DOM environment) 27522 * 27523 * Return a stubbed API instead 27524 */ 27525 if (typeof document === 'undefined' || typeof window === 'undefined') { 27526 return { 27527 // always return "initial" because no interaction will ever be detected 27528 ask: function ask() { 27529 return 'initial'; 27530 }, 27531 // always return null 27532 element: function element() { 27533 return null; 27534 }, 27535 // no-op 27536 ignoreKeys: function ignoreKeys() {}, 27537 // no-op 27538 specificKeys: function specificKeys() {}, 27539 // no-op 27540 registerOnChange: function registerOnChange() {}, 27541 // no-op 27542 unRegisterOnChange: function unRegisterOnChange() {} 27543 }; 27544 } 27545 /* 27546 * variables 27547 */ 27548 // cache document.documentElement 27549 27550 27551 var docElem = document.documentElement; // currently focused dom element 27552 27553 var currentElement = null; // last used input type 27554 27555 var currentInput = 'initial'; // last used input intent 27556 27557 var currentIntent = currentInput; // check for sessionStorage support 27558 // then check for session variables and use if available 27559 27560 try { 27561 if (window.sessionStorage.getItem('what-input')) { 27562 currentInput = window.sessionStorage.getItem('what-input'); 27563 } 27564 27565 if (window.sessionStorage.getItem('what-intent')) { 27566 currentIntent = window.sessionStorage.getItem('what-intent'); 27567 } 27568 } catch (e) {} // event buffer timer 27569 27570 27571 var eventTimer = null; // form input types 27572 27573 var formInputs = ['input', 'select', 'textarea']; // empty array for holding callback functions 27574 27575 var functionList = []; // list of modifier keys commonly used with the mouse and 27576 // can be safely ignored to prevent false keyboard detection 27577 27578 var ignoreMap = [16, // shift 27579 17, // control 27580 18, // alt 27581 91, // Windows key / left Apple cmd 27582 93 // Windows menu / right Apple cmd 27583 ]; 27584 var specificMap = []; // mapping of events to input types 27585 27586 var inputMap = { 27587 keydown: 'keyboard', 27588 keyup: 'keyboard', 27589 mousedown: 'mouse', 27590 mousemove: 'mouse', 27591 MSPointerDown: 'pointer', 27592 MSPointerMove: 'pointer', 27593 pointerdown: 'pointer', 27594 pointermove: 'pointer', 27595 touchstart: 'touch' // boolean: true if touch buffer is active 27596 27597 }; 27598 var isBuffering = false; // boolean: true if the page is being scrolled 27599 27600 var isScrolling = false; // store current mouse position 27601 27602 var mousePos = { 27603 x: null, 27604 y: null // map of IE 10 pointer events 27605 27606 }; 27607 var pointerMap = { 27608 2: 'touch', 27609 3: 'touch', 27610 // treat pen like touch 27611 4: 'mouse' // check support for passive event listeners 27612 27613 }; 27614 var supportsPassive = false; 27615 27616 try { 27617 var opts = Object.defineProperty({}, 'passive', { 27618 get: function get() { 27619 supportsPassive = true; 27620 } 27621 }); 27622 window.addEventListener('test', null, opts); 27623 } catch (e) {} 27624 /* 27625 * set up 27626 */ 27627 27628 27629 var setUp = function setUp() { 27630 // add correct mouse wheel event mapping to `inputMap` 27631 inputMap[detectWheel()] = 'mouse'; 27632 addListeners(); 27633 doUpdate('input'); 27634 doUpdate('intent'); 27635 }; 27636 /* 27637 * events 27638 */ 27639 27640 27641 var addListeners = function addListeners() { 27642 // `pointermove`, `MSPointerMove`, `mousemove` and mouse wheel event binding 27643 // can only demonstrate potential, but not actual, interaction 27644 // and are treated separately 27645 var options = supportsPassive ? { 27646 passive: true 27647 } : false; // pointer events (mouse, pen, touch) 27648 27649 if (window.PointerEvent) { 27650 window.addEventListener('pointerdown', setInput); 27651 window.addEventListener('pointermove', setIntent); 27652 } else if (window.MSPointerEvent) { 27653 window.addEventListener('MSPointerDown', setInput); 27654 window.addEventListener('MSPointerMove', setIntent); 27655 } else { 27656 // mouse events 27657 window.addEventListener('mousedown', setInput); 27658 window.addEventListener('mousemove', setIntent); // touch events 27659 27660 if ('ontouchstart' in window) { 27661 window.addEventListener('touchstart', eventBuffer, options); 27662 window.addEventListener('touchend', setInput); 27663 } 27664 } // mouse wheel 27665 27666 27667 window.addEventListener(detectWheel(), setIntent, options); // keyboard events 27668 27669 window.addEventListener('keydown', eventBuffer); 27670 window.addEventListener('keyup', eventBuffer); // focus events 27671 27672 window.addEventListener('focusin', setElement); 27673 window.addEventListener('focusout', clearElement); 27674 }; // checks conditions before updating new input 27675 27676 27677 var setInput = function setInput(event) { 27678 // only execute if the event buffer timer isn't running 27679 if (!isBuffering) { 27680 var eventKey = event.which; 27681 var value = inputMap[event.type]; 27682 27683 if (value === 'pointer') { 27684 value = pointerType(event); 27685 } 27686 27687 var ignoreMatch = !specificMap.length && ignoreMap.indexOf(eventKey) === -1; 27688 var specificMatch = specificMap.length && specificMap.indexOf(eventKey) !== -1; 27689 var shouldUpdate = value === 'keyboard' && eventKey && (ignoreMatch || specificMatch) || value === 'mouse' || value === 'touch'; 27690 27691 if (currentInput !== value && shouldUpdate) { 27692 currentInput = value; 27693 27694 try { 27695 window.sessionStorage.setItem('what-input', currentInput); 27696 } catch (e) {} 27697 27698 doUpdate('input'); 27699 } 27700 27701 if (currentIntent !== value && shouldUpdate) { 27702 // preserve intent for keyboard typing in form fields 27703 var activeElem = document.activeElement; 27704 var notFormInput = activeElem && activeElem.nodeName && formInputs.indexOf(activeElem.nodeName.toLowerCase()) === -1; 27705 27706 if (notFormInput) { 27707 currentIntent = value; 27708 27709 try { 27710 window.sessionStorage.setItem('what-intent', currentIntent); 27711 } catch (e) {} 27712 27713 doUpdate('intent'); 27714 } 27715 } 27716 } 27717 }; // updates the doc and `inputTypes` array with new input 27718 27719 27720 var doUpdate = function doUpdate(which) { 27721 docElem.setAttribute('data-what' + which, which === 'input' ? currentInput : currentIntent); 27722 fireFunctions(which); 27723 }; // updates input intent for `mousemove` and `pointermove` 27724 27725 27726 var setIntent = function setIntent(event) { 27727 // test to see if `mousemove` happened relative to the screen to detect scrolling versus mousemove 27728 detectScrolling(event); // only execute if the event buffer timer isn't running 27729 // or scrolling isn't happening 27730 27731 if (!isBuffering && !isScrolling) { 27732 var value = inputMap[event.type]; 27733 27734 if (value === 'pointer') { 27735 value = pointerType(event); 27736 } 27737 27738 if (currentIntent !== value) { 27739 currentIntent = value; 27740 27741 try { 27742 window.sessionStorage.setItem('what-intent', currentIntent); 27743 } catch (e) {} 27744 27745 doUpdate('intent'); 27746 } 27747 } 27748 }; 27749 27750 var setElement = function setElement(event) { 27751 if (!event.target.nodeName) { 27752 // If nodeName is undefined, clear the element 27753 // This can happen if click inside an <svg> element. 27754 clearElement(); 27755 return; 27756 } 27757 27758 currentElement = event.target.nodeName.toLowerCase(); 27759 docElem.setAttribute('data-whatelement', currentElement); 27760 27761 if (event.target.classList && event.target.classList.length) { 27762 docElem.setAttribute('data-whatclasses', event.target.classList.toString().replace(' ', ',')); 27763 } 27764 }; 27765 27766 var clearElement = function clearElement() { 27767 currentElement = null; 27768 docElem.removeAttribute('data-whatelement'); 27769 docElem.removeAttribute('data-whatclasses'); 27770 }; // buffers events that frequently also fire mouse events 27771 27772 27773 var eventBuffer = function eventBuffer(event) { 27774 // set the current input 27775 setInput(event); // clear the timer if it happens to be running 27776 27777 window.clearTimeout(eventTimer); // set the isBuffering to `true` 27778 27779 isBuffering = true; // run the timer 27780 27781 eventTimer = window.setTimeout(function () { 27782 // if the timer runs out, set isBuffering back to `false` 27783 isBuffering = false; 27784 }, 100); 27785 }; 27786 /* 27787 * utilities 27788 */ 27789 27790 27791 var pointerType = function pointerType(event) { 27792 if (typeof event.pointerType === 'number') { 27793 return pointerMap[event.pointerType]; 27794 } else { 27795 // treat pen like touch 27796 return event.pointerType === 'pen' ? 'touch' : event.pointerType; 27797 } 27798 }; // detect version of mouse wheel event to use 27799 // via https://developer.mozilla.org/en-US/docs/Web/Events/wheel 27800 27801 27802 var detectWheel = function detectWheel() { 27803 var wheelType = void 0; // Modern browsers support "wheel" 27804 27805 if ('onwheel' in document.createElement('div')) { 27806 wheelType = 'wheel'; 27807 } else { 27808 // Webkit and IE support at least "mousewheel" 27809 // or assume that remaining browsers are older Firefox 27810 wheelType = document.onmousewheel !== undefined ? 'mousewheel' : 'DOMMouseScroll'; 27811 } 27812 27813 return wheelType; 27814 }; // runs callback functions 27815 27816 27817 var fireFunctions = function fireFunctions(type) { 27818 for (var i = 0, len = functionList.length; i < len; i++) { 27819 if (functionList[i].type === type) { 27820 functionList[i].fn.call(undefined, type === 'input' ? currentInput : currentIntent); 27821 } 27822 } 27823 }; // finds matching element in an object 27824 27825 27826 var objPos = function objPos(match) { 27827 for (var i = 0, len = functionList.length; i < len; i++) { 27828 if (functionList[i].fn === match) { 27829 return i; 27830 } 27831 } 27832 }; 27833 27834 var detectScrolling = function detectScrolling(event) { 27835 if (mousePos['x'] !== event.screenX || mousePos['y'] !== event.screenY) { 27836 isScrolling = false; 27837 mousePos['x'] = event.screenX; 27838 mousePos['y'] = event.screenY; 27839 } else { 27840 isScrolling = true; 27841 } 27842 }; 27843 /* 27844 * init 27845 */ 27846 // don't start script unless browser cuts the mustard 27847 // (also passes if polyfills are used) 27848 27849 27850 if ('addEventListener' in window && Array.prototype.indexOf) { 27851 setUp(); 27852 } 27853 /* 27854 * api 27855 */ 27856 27857 27858 return { 27859 // returns string: the current input type 27860 // opt: 'intent'|'input' 27861 // 'input' (default): returns the same value as the `data-whatinput` attribute 27862 // 'intent': includes `data-whatintent` value if it's different than `data-whatinput` 27863 ask: function ask(opt) { 27864 return opt === 'intent' ? currentIntent : currentInput; 27865 }, 27866 // returns string: the currently focused element or null 27867 element: function element() { 27868 return currentElement; 27869 }, 27870 // overwrites ignored keys with provided array 27871 ignoreKeys: function ignoreKeys(arr) { 27872 ignoreMap = arr; 27873 }, 27874 // overwrites specific char keys to update on 27875 specificKeys: function specificKeys(arr) { 27876 specificMap = arr; 27877 }, 27878 // attach functions to input and intent "events" 27879 // funct: function to fire on change 27880 // eventType: 'input'|'intent' 27881 registerOnChange: function registerOnChange(fn, eventType) { 27882 functionList.push({ 27883 fn: fn, 27884 type: eventType || 'input' 27885 }); 27886 }, 27887 unRegisterOnChange: function unRegisterOnChange(fn) { 27888 var position = objPos(fn); 27889 27890 if (position || position === 0) { 27891 functionList.splice(position, 1); 27892 } 27893 } 27894 }; 27895 }(); 27896 /***/ 27897 27898 }]) 27899 ); 27900}); 27901 27902; 27903/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module))) 27904 27905/***/ }), 27906
27907/***/ "./src/assets/js/app.js": 27908/*!******************************!*\ 27909 !*** ./src/assets/js/app.js ***! 27910 \******************************/ 27911/*! no exports provided */ 27912/***/ (function(module, __webpack_exports__, __webpack_require__) { 27913 27914"use strict"; 27915__webpack_require__.r(__webpack_exports__); 27916/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"); 27917/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 27918/* harmony import */ var what_input__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! what-input */ "./node_modules/what-input/dist/what-input.js"); 27919/* harmony import */ var what_input__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(what_input__WEBPACK_IMPORTED_MODULE_1__); 27920/* harmony import */ var _vendor_awesomplete_awesomplete__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../vendor/awesomplete/awesomplete */ "./src/assets/vendor/awesomplete/awesomplete.js"); 27921/* harmony import */ var _vendor_awesomplete_awesomplete__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_vendor_awesomplete_awesomplete__WEBPACK_IMPORTED_MODULE_2__); 27922/* harmony import */ var _vendor_jquery_ui_jquery_ui__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../vendor/jquery-ui/jquery-ui */ "./src/assets/vendor/jquery-ui/jquery-ui.js"); 27923/* harmony import */ var _vendor_jquery_ui_jquery_ui__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_vendor_jquery_ui_jquery_ui__WEBPACK_IMPORTED_MODULE_3__); 27924/* harmony import */ var foundation_sites__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! foundation-sites */ "./node_modules/foundation-sites/dist/js/npm.js"); 27925/* harmony import */ var tablesaw_dist_tablesaw_jquery__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! tablesaw/dist/tablesaw.jquery */ "./node_modules/tablesaw/dist/tablesaw.jquery.js"); 27926/* harmony import */ var tablesaw_dist_tablesaw_jquery__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(tablesaw_dist_tablesaw_jquery__WEBPACK_IMPORTED_MODULE_5__); 27927/* harmony import */ var _lib_dependencies__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./lib/dependencies */ "./src/assets/js/lib/dependencies.js"); 27928function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 27929 27930function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 27931 27932function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } 27933 27934 27935 27936 27937 27938window.$ = jquery__WEBPACK_IMPORTED_MODULE_0___default.a; 27939 // If you want to pick and choose which modules to include, comment out the above and uncomment 27940// the line below 27941//import './lib/foundation-explicit-pieces'; 27942 27943 27944 // Import pagination.js 27945 27946window.libs = _lib_dependencies__WEBPACK_IMPORTED_MODULE_6__["default"]; 27947_lib_dependencies__WEBPACK_IMPORTED_MODULE_6__["default"].AOS.init(); // SVG Injector 27948// Elements to inject 27949 27950var mySVGsToInject = document.querySelectorAll('img.inject-me'); // Options 27951 27952var injectorOptions = { 27953 evalScripts: 'once', 27954 pngFallback: 'assets/png' 27955}; 27956 27957var afterAllInjectionsFinishedCallback = function afterAllInjectionsFinishedCallback(totalSVGsInjected) { 27958 // Callback after all SVGs are injected 27959 console.log('We injected ' + totalSVGsInjected + ' SVG(s)!'); 27960}; 27961 27962var perInjectionCallback = function perInjectionCallback(svg) { 27963 // Callback after each SVG is injected 27964 console.log('SVG injected: ' + svg); 27965}; // create injector configured by options 27966 27967 27968var injector = new _lib_dependencies__WEBPACK_IMPORTED_MODULE_6__["default"].svgInjector(injectorOptions);
27968 // Trigger the injection 27969 27970injector.inject(mySVGsToInject, afterAllInjectionsFinishedCallback, perInjectionCallback); // tablesaw table plugin 27971 27972jquery__WEBPACK_IMPORTED_MODULE_0___default()(function () { 27973 jquery__WEBPACK_IMPORTED_MODULE_0___default()(document).foundation().trigger('enhance.tablesaw'); 27974}); 27975var TablesawConfig = { 27976 swipeHorizontalThreshold: 15 27977}; // app dashboard toggle 27978 27979jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-app-dashboard-toggle-shrink]').on('click', function (e) { 27980 e.preventDefault(); 27981 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).parents('.app-dashboard').toggleClass('shrink-medium').toggleClass('shrink-large'); 27982}); 27983 27984function megamenuPositioning() { 27985 if (foundation_sites__WEBPACK_IMPORTED_MODULE_4__["default"].MediaQuery.atLeast('large') && !jquery__WEBPACK_IMPORTED_MODULE_0___default()('body').hasClass('js-dropdown-positioned')) { 27986 jquery__WEBPACK_IMPORTED_MODULE_0___default()('.is-dropdown-submenu').each(function () { 27987 var parentPosition = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).parent('.is-dropdown-submenu-parent').position(); 27988 var position = -parentPosition.left; 27989 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).css('left', position); 27990 jquery__WEBPACK_IMPORTED_MODULE_0___default()('body').addClass('js-dropdown-positioned'); 27991 }); 27992 } 27993} 27994 27995function homeButtonCalc() { 27996 var slideImage = jquery__WEBPACK_IMPORTED_MODULE_0___default()('.slideshow.home-main .orbit-slide.is-active img'); 27997 jquery__WEBPACK_IMPORTED_MODULE_0___default()('.slideshow.home-main .orbit-bullets button').css({ 27998 'width': slideImage.css("width"), 27999 'height': slideImage.css("height") 28000 }); 28001} 28002 28003megamenuPositioning(); //homeButtonCalc(); 28004 28005function slideshowRecalc() {} 28006 28007jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).on('changed.zf.mediaquery', function (event, newSize, oldSize) { 28008 megamenuPositioning(); // homeButtonCalc(); 28009}); 28010 28011var Filter = 28012/*#__PURE__*/ 28013function () { 28014 function Filter(group, types) { 28015 _classCallCheck(this, Filter); 28016 28017 this.group = group; 28018 this.types = types; 28019 this.form = jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-filter-form]'); 28020 } 28021 28022 _createClass(Filter, [{ 28023 key: "submitHandler", 28024 value: function submitHandler() { 28025 var self = this; 28026 this.form.on('submit', function (e) { 28027 e.preventDefault(); 28028 jquery__WEBPACK_IMPORTED_MODULE_0___default()('html, body').animate({ 28029 scrollTop: jquery__WEBPACK_IMPORTED_MODULE_0___default()("[data-filter-item]:visible,[data-filter-noResults]").first().offset().top - 20 28030 }, 300); 28031 }); 28032 } 28033 }, { 28034 key: "searchHandler", 28035 value: function searchHandler() { 28036 var self = this; 28037 jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-filter-search]').each(function () { 28038 var $searchThis = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this); 28039 var searchField = $searchThis.attr("data-filter-search"); 28040 var searchArray = []; 28041 jquery__WEBPACK_IMPORTED_MODULE_0___default()("[data-" + searchField + "]").each(function () { 28042 var fieldValue = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).attr("data-" + searchField); 28043 searchArray.push(fieldValue); 28044 }); 28045 $searchThis.attr("data-list", searchArray.join()); 28046 var awesomplete = new Awesomplete($searchThis[0]); 28047 $searchThis.on("awesomplete-selectcomplete", function (event) { 28048 self.filter(); 28049 self.form.submit(); 28050 }); 28051 }); 28052 jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-filter-search]').keyup(function () { 28053 self.filter(); 28054 }); 28055 } 28056 }, { 28057 key: "init", 28058 value: function init() { 28059 this.clickHandler(); 28060 this.submitHandler(); 28061 this.searchHandler(); 28062 } 28063 }, { 28064 key: "clickHandler", 28065 value: function clickHandler() { 28066 var self = this; 28067 jquery__WEBPACK_IMPORTED_MODULE_0___default()("[data-filter-group='" + this.group + "'][data-filter]").on("click", function (e) { 28068 if (jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).is("button")) { 28069 e.preventDefault(); 28070 } 28071 28072 jquery__WEBPACK_IMPORTED_MODULE_0___default()('html, body').animate({ 28073 scrollTop: self.form.offset().top - 20 28074 }, 300); 28075 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).toggleClass("active").parent().siblings().find('[data-filter]').removeClass("active"); 28076 self.filter(); 28077 }); 28078 } 28079 }, { 28080 key: "filter", 28081 value: function filter() { 28082 jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-filter-search]').each(function () { 28083 var self = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this); 28084 var filterValue = self.attr("data-filter-search"); 28085 var x, i, inputValue, filteredValue, userTypedValue, titleSearchValue; 28086 filteredValue = jquery__WEBPACK_IMPORTED_MODULE_0___default()(self).val().toUpperCase(); 28087 x = document.getElementsByClassName('filterElement'); 28088 28089 for (i = 0; i < x.length; i++) { 28090 titleSearchValue = x[i].getAttribute('data-' + filterValue); 28091 28092 if (titleSearchValue.toUpperCase().indexOf(filteredValue) > -1) { 28093 x[i].style.display = ""; 28094 } else { 28095 x[i].style.display = "none"; 28096 } 28097 } 28098 }); 28099 jquery__WEBPACK_IMPORTED_MODULE_0___default()("[data-filter-group='" + this.group + "'][data-filter-item]").removeClass("hide"); 28100 28101 for (var i = 0; i < this.types.length; i++) { 28102 var active = jquery__WEBPACK_IMPORTED_MODULE_0___default()("[data-filter-group='" + this.group + "'][data-filter-type='" + this.types[i] + "'].active"); 28103 28104 if (active.length) { 28105 for (var j = 0; j < active.length; j++) { 28106 var activeValue = jquery__WEBPACK_IMPORTED_MODULE_0___default()(active[j]).attr("data-filter"); 28107 28108 if (activeValue != "") { 28109 jquery__WEBPACK_IMPORTED_MODULE_0___default()("[data-filter-group='" + this.group + "'][data-filter-item]:not([data-" + this.types[i] + "~='" + activeValue + "'])").addClass('hide'); 28110 } 28111 } 28112 } 28113 } 28114 28115 var filteredCount = jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-filter-item]:visible').length; 28116 28117 if (filteredCount === 0) { 28118 jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-filter-noResults]').removeClass('hide'); 28119 } else { 28120 jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-filter-noResults]').addClass('hide'); 28121 } 28122 } 28123 }]); 28124 28125 return Filter; 28126}();
28127 28128jquery__WEBPACK_IMPORTED_MODULE_0___default()(".title-bar > *").click(function () { 28129 var titleBar = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).parent(); 28130 titleBar.toggleClass("active"); 28131 28132 if (titleBar.hasClass("active")) { 28133 jquery__WEBPACK_IMPORTED_MODULE_0___default()(".title-bar-title").text("Close"); 28134 } else { 28135 jquery__WEBPACK_IMPORTED_MODULE_0___default()(".title-bar-title").text("Menu"); 28136 } 28137}); 28138jquery__WEBPACK_IMPORTED_MODULE_0___default()(".dropdown-link").click(function () { 28139 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).toggleClass("active"); 28140}); 28141jquery__WEBPACK_IMPORTED_MODULE_0___default()('.select-url').on('selectmenuchange', function () { 28142 window.location = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).val(); 28143}); 28144jquery__WEBPACK_IMPORTED_MODULE_0___default()('select').selectmenu(); 28145jquery__WEBPACK_IMPORTED_MODULE_0___default.a.extend(jquery__WEBPACK_IMPORTED_MODULE_0___default.a.expr[':'], { 28146 focusable: function focusable(el, index, selector) { 28147 var $element = jquery__WEBPACK_IMPORTED_MODULE_0___default()(el); 28148 return $element.is(':input:enabled, a[href], area[href], object, [tabindex]') && !$element.is(':hidden'); 28149 } 28150}); 28151 28152function focusOnElement($element) { 28153 if (!$element.length) { 28154 return; 28155 } 28156 28157 if (!$element.is(':focusable')) { 28158 // add tabindex to make focusable and remove again 28159 $element.attr('tabindex', -1).on('blur focusout', function () { 28160 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).removeAttr('tabindex'); 28161 }); 28162 } 28163 28164 $element.focus(); 28165} 28166 28167jquery__WEBPACK_IMPORTED_MODULE_0___default()('.content-module--slideshow .orbit-container').each(function () { 28168 var listLength = jquery__WEBPACK_IMPORTED_MODULE_0___default()("li", this).length; 28169 var parentUl = this; 28170 var slideNum = 0; 28171 jquery__WEBPACK_IMPORTED_MODULE_0___default()("li", parentUl).each(function (index) { 28172 slideNum = index + 1; 28173 jquery__WEBPACK_IMPORTED_MODULE_0___default()('.orbit-caption--content-counter', this).text(slideNum + ' of ' + listLength); 28174 }); 28175}); //MOVE NEWS CATEGORIES ON NEWS LISTING AND NEWS CATEGORIES LISTING ABOVE THE LIST ON MEDIUM DOWN 28176 28177function pullMobile() { 28178 jquery__WEBPACK_IMPORTED_MODULE_0___default()("[data-pull-mobile]").each(function () { 28179 var pullSetting = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).attr("data-pull-mobile"); 28180 var pushElemStart = jquery__WEBPACK_IMPORTED_MODULE_0___default()("#" + pullSetting); 28181 var pullElem = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this); 28182 var pushElem = pushElemStart; 28183 28184 if (foundation_sites__WEBPACK_IMPORTED_MODULE_4__["default"].MediaQuery.atLeast('large')) { 28185 pullElem = pushElemStart; 28186 pushElem = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this); 28187 } 28188 28189 var pushed = pushElem.find("> *"); 28190 28191 if (pushed.length) { 28192 pushed.detach().appendTo(pullElem); 28193 } 28194 }); 28195} 28196 28197jquery__WEBPACK_IMPORTED_MODULE_0___default()(document).ready(function () { 28198 megamenuPositioning(); 28199 pullMobile(); 28200 jquery__WEBPACK_IMPORTED_MODULE_0___default()(".home_tabs .tabs-title > a").attr("tabindex", 0); 28201 jquery__WEBPACK_IMPORTED_MODULE_0___default()(".home_tabs").on("change.zf.tabs", function (e, active, panel) { 28202 jquery__WEBPACK_IMPORTED_MODULE_0___default()('.home_tabs .tabs-content').addClass('is-active'); 28203 jquery__WEBPACK_IMPORTED_MODULE_0___default()(panel).find("[tabindex]").attr("tabindex", 0).first().focus(); // $(panel).find("button").first().focus(); 28204 // var tabElems = $(panel[0]).find("[tabindex]"); 28205 // tabElems.attr("tabindex",0); 28206 // tabElems.first().focus(); 28207 }); 28208 jquery__WEBPACK_IMPORTED_MODULE_0___default()("[aria-hidden='true']").find("[tabindex]").attr("tabindex", "-1"); 28209 jquery__WEBPACK_IMPORTED_MODULE_0___default()("li[role='menuitem']").each(function () { 28210 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).find("> a").attr("role", "menuitem"); 28211 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).removeAttr("role"); 28212 }); 28213 jquery__WEBPACK_IMPORTED_MODULE_0___default()("[data-orbit]").on('beforeslidechange.zf.orbit', function () { 28214 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).addClass('is-transitioning'); 28215 }); 28216 jquery__WEBPACK_IMPORTED_MODULE_0___default()("[data-orbit]").on('slidechange.zf.orbit', function () { 28217 var orbit = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this); 28218 setTimeout(function () { 28219 orbit.removeClass('is-transitioning'); 28220 }, 100); 28221 }); 28222}); 28223jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).on('changed.zf.mediaquery', function (event, newSize, oldSize) { 28224 pullMobile(); 28225}); //ONLY SHOW BACK TO TOP AFTER SCROLLING THROUGH MAIN SCREEN 28226 28227var back2TopBody = document.body; 28228var back2Top = document.getElementById("back-to-top"); //Update DOM on scroll 28229 28230document.addEventListener("scroll", function () { 28231 var scrollAmt = window.pageYOffset || document.documentElement.scrollTop; 28232 if (window.innerHeight / 6 >= scrollAmt) back2Top.style.display = "none";else back2Top.style.display = "block"; 28233}); 28234/*PAGINATION STILL TO DO 282352. disable prev/next when not necessary 28236 28237 28238*/ 28239 28240var paginationGroupLength = parseInt(jquery__WEBPACK_IMPORTED_MODULE_0___default()('.pagination-filter-group-container').children().length); 28241 28242if (paginationGroupLength > 0) { 28243 filterPaginationResults(1); 28244 createPaginationNumbers(paginationGroupLength); 28245} 28246 28247if (paginationGroupLength > 1) { 28248 jquery__WEBPACK_IMPORTED_MODULE_0___default()('.content-module--pagination').removeClass("hide"); 28249} 28250 28251if (jquery__WEBPACK_IMPORTED_MODULE_0___default()("#pager").length > 0) { 28252 var pager = jquery__WEBPACK_IMPORTED_MODULE_0___default()("#pager"); 28253} 28254 28255function createPaginationNumbers(groupLength) { 28256 if (groupLength > 1) { 28257 var output = ''; 28258 var i; 28259 output = '<ul class="pagination">'; 28260 28261 for (i = 1; i <= groupLength; i++) { 28262 output = output + '<li class="pager-item'; 28263 28264 if (i == 1) { 28265 output = output + ' active'; 28266 } 28267 28268 output = output + '" data-num="' + i + '"><a data-num="' + i + '">' + i + '</a></li>'; 28269 } 28270 28271 output = output + '</ul>'; 28272 jquery__WEBPACK_IMPORTED_MODULE_0___default()('#pager').append(output); 28273 } 28274} 28275 28276function filterPaginationResults() { 28277 var paginationBlockNum = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1; 28278 jquery__WEBPACK_IMPORTED_MODULE_0___default()(".pagination-filter-group[data-pagination-group=" + paginationBlockNum + "]").removeClass("hide"); 28279 jquery__WEBPACK_IMPORTED_MODULE_0___default()(".pagination-filter-group").not("[data-pagination-group=" + paginationBlockNum + "]").addClass("hide"); 28280 jquery__WEBPACK_IMPORTED_MODULE_0___default()(".pager-item").removeClass("active"); 28281 jquery__WEBPACK_IMPORTED_MODULE_0___default()(".pager-item[data-num=" + paginationBlockNum + "]").addClass("active"); 28282 jquery__WEBPACK_IMPORTED_MODULE_0___default()('.pager-control').removeClass('disabled'); 28283 jquery__WEBPACK_IMPORTED_MODULE_0___default()('.pager-prev[data-pagination-current="1"]').addClass('disabled'); 28284 jquery__WEBPACK_IMPORTED_MODULE_0___default()('.pager-next[data-pagination-current="' + paginationGroupLength + '"]').addClass('disabled'); 28285} 28286 28287function updatePrevNext(newVal) { 28288 jquery__WEBPACK_IMPORTED_MODULE_0___default()('.pagination-filter-group-container').attr("data-pagination-current", newVal); 28289 jquery__WEBPACK_IMPORTED_MODULE_0___default()('.pager-control').attr("data-pagination-current", newVal); 28290 filterPaginationResults(newVal); 28291 window.scroll(0, jquery__WEBPACK_IMPORTED_MODULE_0___default()(".pagination-filter-group-container").offset().top - 20); 28292} //PAGINATE WHEN CLICKING ON THE NUMERICAL PAGINATION 28293 28294 28295jquery__WEBPACK_IMPORTED_MODULE_0___default()('.pager-item a').on('click', function (e) { 28296 e.preventDefault(); 28297 updatePrevNext(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).attr("data-num"));
28298}); 28299jquery__WEBPACK_IMPORTED_MODULE_0___default()(document).ready(function () { 28300 //CHECK COUNT OF PAGINATION ITEMS AND SET PREV/NEXT FUNCTIONALITY 28301 if (paginationGroupLength > 0) { 28302 jquery__WEBPACK_IMPORTED_MODULE_0___default()('.pager-control').on('click', function (e) { 28303 e.preventDefault(); 28304 var currValue = parseInt(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).attr("data-pagination-current")); 28305 var newVal = 0; 28306 var element = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this); 28307 var direction = element.attr("data-pagination-direction"); 28308 28309 if (direction == 'prev' && currValue > 1) { 28310 newVal = currValue - 1; 28311 updatePrevNext(newVal); 28312 } else if (direction == 'next' && currValue < paginationGroupLength) { 28313 newVal = currValue + 1; 28314 updatePrevNext(newVal); 28315 } 28316 }); 28317 } // if there is a '#' in the URL (someone linking directly to a page with an anchor) 28318 28319 28320 if (document.location.hash) { 28321 focusOnElement(jquery__WEBPACK_IMPORTED_MODULE_0___default()(document.location.hash)); 28322 } // if the hash has been changed (activation of an in-page link) 28323 28324 28325 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).bind('hashchange', function () { 28326 var hash = "#" + window.location.hash.replace(/^#/, ''); 28327 focusOnElement(jquery__WEBPACK_IMPORTED_MODULE_0___default()(hash)); 28328 }); 28329 28330 if (foundation_sites__WEBPACK_IMPORTED_MODULE_4__["default"].MediaQuery.atLeast('medium')) { 28331 jquery__WEBPACK_IMPORTED_MODULE_0___default()(".home_tabs .tabs-title:first-child > a").click(); 28332 } 28333 28334 jquery__WEBPACK_IMPORTED_MODULE_0___default()(document).on('click', '.js-tabs-exit', function (e) { 28335 e.preventDefault(); 28336 var currPanel = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).parent(); 28337 currPanel.removeClass('is-active'); 28338 var currPanelId = currPanel.attr("id"); 28339 jquery__WEBPACK_IMPORTED_MODULE_0___default()(".home_tabs .tabs-content [tabindex]").attr("tabindex", "-1"); 28340 jquery__WEBPACK_IMPORTED_MODULE_0___default()('.home_tabs .tabs-content').removeClass('is-active'); 28341 var tabsAnchor = jquery__WEBPACK_IMPORTED_MODULE_0___default()(".tabs-title a[href='#" + currPanelId + "']"); 28342 tabsAnchor.parent().removeClass('is-active'); 28343 tabsAnchor.focus(); 28344 }); 28345 var filter = new Filter("listing", ["category", "letter"]); 28346 filter.init(); 28347 panelResponsive(); 28348}); // 28349 28350function panelResponsive() { 28351 if (foundation_sites__WEBPACK_IMPORTED_MODULE_4__["default"].MediaQuery.is('small only')) { 28352 var panel = jquery__WEBPACK_IMPORTED_MODULE_0___default()(".panel-wrapper"); 28353 var panelWrapper = panel.find(".grid-x"); 28354 28355 if (panel.length) { 28356 panelWrapper.addClass('orbit-wrapper'); 28357 panel.find(".panel--title").detach().prependTo(".panel-wrapper"); 28358 panelWrapper.append("<div class='orbit-container'></div>"); 28359 panel.append('<div class="panel-images"></div>'); 28360 panel.find(".panel--image").each(function (index) { 28361 if (jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).hasClass('mobile')) { 28362 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).detach().appendTo(panel.find(".panel-images")); 28363 } else { 28364 jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).remove(); 28365 } 28366 }); 28367 panel.find(".panel--content").detach().appendTo(panel.find(".orbit-container")); 28368 var panelSlideshow = new foundation_sites__WEBPACK_IMPORTED_MODULE_4__["default"].Orbit(panelWrapper, { 28369 slideClass: "panel--content" 28370 }); 28371 } 28372 } 28373} 28374 28375/***/ }), 28376
28377/***/ "./src/assets/js/lib/dependencies.js": 28378/*!*******************************************!*\ 28379 !*** ./src/assets/js/lib/dependencies.js ***! 28380 \*******************************************/ 28381/*! exports provided: default */ 28382/***/ (function(module, __webpack_exports__, __webpack_require__) { 28383 28384"use strict"; 28385__webpack_require__.r(__webpack_exports__); 28386/* harmony import */ var aos__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! aos */ "./node_modules/aos/dist/aos.js"); 28387/* harmony import */ var aos__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(aos__WEBPACK_IMPORTED_MODULE_0__); 28388/* harmony import */ var svg_injector_2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! svg-injector-2 */ "./node_modules/svg-injector-2/dist/svg-injector.min.js"); 28389/* harmony import */ var svg_injector_2__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(svg_injector_2__WEBPACK_IMPORTED_MODULE_1__); 28390/* harmony import */ var slick_carousel__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! slick-carousel */ "./node_modules/slick-carousel/slick/slick.js"); 28391/* harmony import */ var slick_carousel__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(slick_carousel__WEBPACK_IMPORTED_MODULE_2__); 28392// custom dependencies 28393 28394 28395 28396var deps = { 28397 AOS: aos__WEBPACK_IMPORTED_MODULE_0___default.a, 28398 svgInjector: svg_injector_2__WEBPACK_IMPORTED_MODULE_1___default.a, 28399 slickCarousel: slick_carousel__WEBPACK_IMPORTED_MODULE_2___default.a 28400}; 28401/* harmony default export */ __webpack_exports__["default"] = (deps); 28402 28403/***/ }), 28404
28405/***/ "./src/assets/vendor/awesomplete/awesomplete.js": 28406/*!******************************************************!*\ 28407 !*** ./src/assets/vendor/awesomplete/awesomplete.js ***! 28408 \******************************************************/ 28409/*! no static exports found */ 28410/***/ (function(module, exports, __webpack_require__) { 28411 28412/* WEBPACK VAR INJECTION */(function(module) {function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 28413 28414/** 28415 * Simple, lightweight, usable local autocomplete library for modern browsers 28416 * Because there weren’t enough autocomplete scripts in the world? Because I’m completely insane and have NIH syndrome? Probably both. :P 28417 * @author Lea Verou http://leaverou.github.io/awesomplete 28418 * MIT license 28419 */ 28420(function () { 28421 var _ = function _(input, o) { 28422 var me = this; // Keep track of number of instances for unique IDs 28423 28424 _.count = (_.count || 0) + 1; 28425 this.count = _.count; // Setup 28426 28427 this.isOpened = false; 28428 this.input = $(input); 28429 this.input.setAttribute("autocomplete", "off"); 28430 this.input.setAttribute("aria-owns", "awesomplete_list_" + this.count); 28431 this.input.setAttribute("role", "combobox"); // store constructor options in case we need to distinguish 28432 // between default and customized behavior later on 28433 28434 this.options = o = o || {}; 28435 configure(this, { 28436 minChars: 2, 28437 maxItems: 10, 28438 autoFirst: false, 28439 data: _.DATA, 28440 filter: _.FILTER_CONTAINS, 28441 sort: o.sort === false ? false : _.SORT_BYLENGTH, 28442 container: _.CONTAINER, 28443 item: _.ITEM, 28444 replace: _.REPLACE, 28445 tabSelect: false 28446 }, o); 28447 this.index = -1; // Create necessary elements 28448 28449 this.container = this.container(input); 28450 this.ul = $.create("ul", { 28451 hidden: "hidden", 28452 role: "listbox", 28453 id: "awesomplete_list_" + this.count, 28454 inside: this.container 28455 }); 28456 this.status = $.create("span", { 28457 className: "visually-hidden", 28458 role: "status", 28459 "aria-live": "assertive", 28460 "aria-atomic": true, 28461 inside: this.container, 28462 textContent: this.minChars != 0 ? "Type " + this.minChars + " or more characters for results." : "Begin typing for results." 28463 }); // Bind events 28464 28465 this._events = { 28466 input: { 28467 "input": this.evaluate.bind(this), 28468 "blur": this.close.bind(this, { 28469 reason: "blur" 28470 }), 28471 "keydown": function keydown(evt) { 28472 var c = evt.keyCode; // If the dropdown `ul` is in view, then act on keydown for the following keys: 28473 // Enter / Esc / Up / Down 28474 28475 if (me.opened) { 28476 if (c === 13 && me.selected) { 28477 // Enter 28478 evt.preventDefault(); 28479 me.select(); 28480 } else if (c === 9 && me.selected && me.tabSelect) { 28481 me.select(); 28482 } else if (c === 27) { 28483 // Esc 28484 me.close({ 28485 reason: "esc" 28486 }); 28487 } else if (c === 38 || c === 40) { 28488 // Down/Up arrow 28489 evt.preventDefault(); 28490 me[c === 38 ? "previous" : "next"](); 28491 } 28492 } 28493 } 28494 }, 28495 form: { 28496 "submit": this.close.bind(this, { 28497 reason: "submit" 28498 }) 28499 }, 28500 ul: { 28501 // Prevent the default mousedowm, which ensures the input is not blurred. 28502 // The actual selection will happen on click. This also ensures dragging the 28503 // cursor away from the list item will cancel the selection 28504 "mousedown": function mousedown(evt) { 28505 evt.preventDefault(); 28506 }, 28507 // The click event is fired even if the corresponding mousedown event has called preventDefault 28508 "click": function click(evt) { 28509 var li = evt.target; 28510 28511 if (li !== this) { 28512 while (li && !/li/i.test(li.nodeName)) { 28513 li = li.parentNode; 28514 } 28515 28516 if (li && evt.button === 0) { 28517 // Only select on left click 28518 evt.preventDefault(); 28519 me.select(li, evt.target); 28520 } 28521 } 28522 } 28523 } 28524 }; 28525 $.bind(this.input, this._events.input); 28526 $.bind(this.input.form, this._events.form); 28527 $.bind(this.ul, this._events.ul); 28528 28529 if (this.input.hasAttribute("list")) { 28530 this.list = "#" + this.input.getAttribute("list"); 28531 this.input.removeAttribute("list"); 28532 } else { 28533 this.list = this.input.getAttribute("data-list") || o.list || []; 28534 } 28535 28536 _.all.push(this); 28537 }; 28538 28539 _.prototype = { 28540 set list(list) { 28541 if (Array.isArray(list)) { 28542 this._list = list; 28543 } else if (typeof list === "string" && list.indexOf(",") > -1) { 28544 this._list = list.split(/\s*,\s*/); 28545 } else { 28546 // Element or CSS selector 28547 list = $(list); 28548 28549 if (list && list.children) { 28550 var items = [];
28551 slice.apply(list.children).forEach(function (el) { 28552 if (!el.disabled) { 28553 var text = el.textContent.trim(); 28554 var value = el.value || text; 28555 var label = el.label || text; 28556 28557 if (value !== "") { 28558 items.push({ 28559 label: label, 28560 value: value 28561 }); 28562 } 28563 } 28564 }); 28565 this._list = items; 28566 } 28567 } 28568 28569 if (document.activeElement === this.input) { 28570 this.evaluate(); 28571 } 28572 }, 28573 28574 get selected() { 28575 return this.index > -1; 28576 }, 28577 28578 get opened() { 28579 return this.isOpened; 28580 }, 28581 28582 close: function close(o) { 28583 if (!this.opened) { 28584 return; 28585 } 28586 28587 this.ul.setAttribute("hidden", ""); 28588 this.isOpened = false; 28589 this.index = -1; 28590 this.status.setAttribute("hidden", ""); 28591 $.fire(this.input, "awesomplete-close", o || {}); 28592 }, 28593 open: function open() { 28594 this.ul.removeAttribute("hidden"); 28595 this.isOpened = true; 28596 this.status.removeAttribute("hidden"); 28597 28598 if (this.autoFirst && this.index === -1) { 28599 this.goto(0); 28600 } 28601 28602 $.fire(this.input, "awesomplete-open"); 28603 }, 28604 destroy: function destroy() { 28605 //remove events from the input and its form 28606 $.unbind(this.input, this._events.input); 28607 $.unbind(this.input.form, this._events.form); // cleanup container if it was created by Awesomplete but leave it alone otherwise 28608 28609 if (!this.options.container) { 28610 //move the input out of the awesomplete container and remove the container and its children 28611 var parentNode = this.container.parentNode; 28612 parentNode.insertBefore(this.input, this.container); 28613 parentNode.removeChild(this.container); 28614 } //remove autocomplete and aria-autocomplete attributes 28615 28616 28617 this.input.removeAttribute("autocomplete"); 28618 this.input.removeAttribute("aria-autocomplete"); //remove this awesomeplete instance from the global array of instances 28619 28620 var indexOfAwesomplete = _.all.indexOf(this); 28621 28622 if (indexOfAwesomplete !== -1) { 28623 _.all.splice(indexOfAwesomplete, 1); 28624 } 28625 }, 28626 next: function next() { 28627 var count = this.ul.children.length; 28628 this.goto(this.index < count - 1 ? this.index + 1 : count ? 0 : -1); 28629 }, 28630 previous: function previous() { 28631 var count = this.ul.children.length; 28632 var pos = this.index - 1; 28633 this.goto(this.selected && pos !== -1 ? pos : count - 1); 28634 }, 28635 // Should not be used, highlights specific item without any checks! 28636 goto: function goto(i) { 28637 var lis = this.ul.children; 28638 28639 if (this.selected) { 28640 lis[this.index].setAttribute("aria-selected", "false"); 28641 } 28642 28643 this.index = i; 28644 28645 if (i > -1 && lis.length > 0) { 28646 lis[i].setAttribute("aria-selected", "true"); 28647 this.status.textContent = lis[i].textContent + ", list item " + (i + 1) + " of " + lis.length; 28648 this.input.setAttribute("aria-activedescendant", this.ul.id + "_item_" + this.index); // scroll to highlighted element in case parent's height is fixed 28649 28650 this.ul.scrollTop = lis[i].offsetTop - this.ul.clientHeight + lis[i].clientHeight; 28651 $.fire(this.input, "awesomplete-highlight", { 28652 text: this.suggestions[this.index] 28653 }); 28654 } 28655 }, 28656 select: function select(selected, origin) { 28657 if (selected) { 28658 this.index = $.siblingIndex(selected); 28659 } else { 28660 selected = this.ul.children[this.index]; 28661 } 28662 28663 if (selected) { 28664 var suggestion = this.suggestions[this.index]; 28665 var allowed = $.fire(this.input, "awesomplete-select", { 28666 text: suggestion, 28667 origin: origin || selected 28668 }); 28669 28670 if (allowed) { 28671 this.replace(suggestion); 28672 this.close({ 28673 reason: "select" 28674 }); 28675 $.fire(this.input, "awesomplete-selectcomplete", { 28676 text: suggestion 28677 }); 28678 } 28679 } 28680 }, 28681 evaluate: function evaluate() { 28682 var me = this; 28683 var value = this.input.value; 28684 28685 if (value.length >= this.minChars && this._list && this._list.length > 0) { 28686 this.index = -1; // Populate list with options that match 28687 28688 this.ul.innerHTML = ""; 28689 this.suggestions = this._list.map(function (item) { 28690 return new Suggestion(me.data(item, value)); 28691 }).filter(function (item) { 28692 return me.filter(item, value); 28693 }); 28694 28695 if (this.sort !== false) { 28696 this.suggestions = this.suggestions.sort(this.sort); 28697 } 28698 28699 this.suggestions = this.suggestions.slice(0, this.maxItems); 28700 this.suggestions.forEach(function (text, index) { 28701 me.ul.appendChild(me.item(text, value, index)); 28702 }); 28703 28704 if (this.ul.children.length === 0) { 28705 this.status.textContent = "No results found"; 28706 this.close({ 28707 reason: "nomatches" 28708 }); 28709 } else { 28710 this.open(); 28711 this.status.textContent = this.ul.children.length + " results found"; 28712 } 28713 } else { 28714 this.close({ 28715 reason: "nomatches" 28716 }); 28717 this.status.textContent = "No results found"; 28718 } 28719 } 28720 }; // Static methods/properties 28721 28722 _.all = []; 28723 28724 _.FILTER_CONTAINS = function (text, input) { 28725 return RegExp($.regExpEscape(input.trim()), "i").test(text); 28726 }; 28727 28728 _.FILTER_STARTSWITH = function (text, input) { 28729 return RegExp("^" + $.regExpEscape(input.trim()), "i").test(text); 28730 }; 28731 28732 _.SORT_BYLENGTH = function (a, b) { 28733 if (a.length !== b.length) { 28734 return a.length - b.length; 28735 } 28736 28737 return a < b ? -1 : 1; 28738 }; 28739 28740 _.CONTAINER = function (input) { 28741 return $.create("div", { 28742 className: "awesomplete",
vendor: 4,753 bytes, lines 28743-28929
28743 around: input 28744 }); 28745 }; 28746 28747 _.ITEM = function (text, input, item_id) { 28748 var html = input.trim() === "" ? text : text.replace(RegExp($.regExpEscape(input.trim()), "gi"), "<mark>$&</mark>"); 28749 return $.create("li", { 28750 innerHTML: html, 28751 "aria-selected": "false", 28752 "id": "awesomplete_list_" + this.count + "_item_" + item_id 28753 }); 28754 }; 28755 28756 _.REPLACE = function (text) { 28757 this.input.value = text.value; 28758 }; 28759 28760 _.DATA = function (item 28761 /*, input*/ 28762 ) { 28763 return item; 28764 }; // Private functions 28765 28766 28767 function Suggestion(data) { 28768 var o = Array.isArray(data) ? { 28769 label: data[0], 28770 value: data[1] 28771 } : _typeof(data) === "object" && "label" in data && "value" in data ? data : { 28772 label: data, 28773 value: data 28774 }; 28775 this.label = o.label || o.value; 28776 this.value = o.value; 28777 } 28778 28779 Object.defineProperty(Suggestion.prototype = Object.create(String.prototype), "length", { 28780 get: function get() { 28781 return this.label.length; 28782 } 28783 }); 28784 28785 Suggestion.prototype.toString = Suggestion.prototype.valueOf = function () { 28786 return "" + this.label; 28787 }; 28788 28789 function configure(instance, properties, o) { 28790 for (var i in properties) { 28791 var initial = properties[i], 28792 attrValue = instance.input.getAttribute("data-" + i.toLowerCase()); 28793 28794 if (typeof initial === "number") { 28795 instance[i] = parseInt(attrValue); 28796 } else if (initial === false) { 28797 // Boolean options must be false by default anyway 28798 instance[i] = attrValue !== null; 28799 } else if (initial instanceof Function) { 28800 instance[i] = null; 28801 } else { 28802 instance[i] = attrValue; 28803 } 28804 28805 if (!instance[i] && instance[i] !== 0) { 28806 instance[i] = i in o ? o[i] : initial; 28807 } 28808 } 28809 } // Helpers 28810 28811 28812 var slice = Array.prototype.slice; 28813 28814 function $(expr, con) { 28815 return typeof expr === "string" ? (con || document).querySelector(expr) : expr || null; 28816 } 28817 28818 function $$(expr, con) { 28819 return slice.call((con || document).querySelectorAll(expr)); 28820 } 28821 28822 $.create = function (tag, o) { 28823 var element = document.createElement(tag); 28824 28825 for (var i in o) { 28826 var val = o[i]; 28827 28828 if (i === "inside") { 28829 $(val).appendChild(element); 28830 } else if (i === "around") { 28831 var ref = $(val); 28832 ref.parentNode.insertBefore(element, ref); 28833 element.appendChild(ref); 28834 28835 if (ref.getAttribute("autofocus") != null) { 28836 ref.focus(); 28837 } 28838 } else if (i in element) { 28839 element[i] = val; 28840 } else { 28841 element.setAttribute(i, val); 28842 } 28843 } 28844 28845 return element; 28846 }; 28847 28848 $.bind = function (element, o) { 28849 if (element) { 28850 for (var event in o) { 28851 var callback = o[event]; 28852 event.split(/\s+/).forEach(function (event) { 28853 element.addEventListener(event, callback); 28854 }); 28855 } 28856 } 28857 }; 28858 28859 $.unbind = function (element, o) { 28860 if (element) { 28861 for (var event in o) { 28862 var callback = o[event]; 28863 event.split(/\s+/).forEach(function (event) { 28864 element.removeEventListener(event, callback); 28865 }); 28866 } 28867 } 28868 }; 28869 28870 $.fire = function (target, type, properties) { 28871 var evt = document.createEvent("HTMLEvents"); 28872 evt.initEvent(type, true, true); 28873 28874 for (var j in properties) { 28875 evt[j] = properties[j]; 28876 } 28877 28878 return target.dispatchEvent(evt); 28879 }; 28880 28881 $.regExpEscape = function (s) { 28882 return s.replace(/[-\\^$*+?.()|[\]{}]/g, "\\$&"); 28883 }; 28884 28885 $.siblingIndex = function (el) { 28886 /* eslint-disable no-cond-assign */ 28887 for (var i = 0; el = el.previousElementSibling; i++) { 28888 ; 28889 } 28890 28891 return i; 28892 }; // Initialization 28893 28894 28895 function init() { 28896 $$("input.awesomplete").forEach(function (input) { 28897 new _(input); 28898 }); 28899 } // Make sure to export Awesomplete on self when in a browser 28900 28901 28902 if (typeof self !== "undefined") { 28903 self.Awesomplete = _; 28904 } // Are we in a browser? Check for Document constructor 28905 28906 28907 if (typeof Document !== "undefined") { 28908 // DOM already loaded? 28909 if (document.readyState !== "loading") { 28910 init(); 28911 } else { 28912 // Wait for it 28913 document.addEventListener("DOMContentLoaded", init); 28914 } 28915 } 28916 28917 _.$ = $; 28918 _.$$ = $$; // Expose Awesomplete as a CJS module 28919 28920 if (( false ? undefined : _typeof(module)) === "object" && module.exports) { 28921 module.exports = _; 28922 } 28923 28924 return _; 28925})(); 28926/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module))) 28927 28928/***/ }), 28929
28930/***/ "./src/assets/vendor/jquery-ui/jquery-ui.js": 28931/*!**************************************************!*\ 28932 !*** ./src/assets/vendor/jquery-ui/jquery-ui.js ***! 28933 \**************************************************/ 28934/*! no static exports found */ 28935/***/ (function(module, exports, __webpack_require__) { 28936 28937var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! jQuery UI - v1.12.1 - 2019-01-18 28938* http://jqueryui.com 28939* Includes: widget.js, position.js, form-reset-mixin.js, keycode.js, labels.js, unique-id.js, widgets/menu.js, widgets/selectmenu.js 28940* Copyright jQuery Foundation and other contributors; Licensed MIT */ 28941(function (factory) { 28942 if (true) { 28943 // AMD. Register as an anonymous module. 28944 !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), 28945 __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? 28946 (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), 28947 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); 28948 } else {} 28949})(function ($) { 28950 $.ui = $.ui || {}; 28951 var version = $.ui.version = "1.12.1"; 28952 /*! 28953 * jQuery UI Widget 1.12.1 28954 * http://jqueryui.com 28955 * 28956 * Copyright jQuery Foundation and other contributors 28957 * Released under the MIT license. 28958 * http://jquery.org/license 28959 */ 28960 //>>label: Widget 28961 //>>group: Core 28962 //>>description: Provides a factory for creating stateful widgets with a common API. 28963 //>>docs: http://api.jqueryui.com/jQuery.widget/ 28964 //>>demos: http://jqueryui.com/widget/ 28965 28966 var widgetUuid = 0; 28967 var widgetSlice = Array.prototype.slice; 28968 28969 $.cleanData = function (orig) { 28970 return function (elems) { 28971 var events, elem, i; 28972 28973 for (i = 0; (elem = elems[i]) != null; i++) { 28974 try { 28975 // Only trigger remove when necessary to save time 28976 events = $._data(elem, "events"); 28977 28978 if (events && events.remove) { 28979 $(elem).triggerHandler("remove"); 28980 } // Http://bugs.jquery.com/ticket/8235 28981 28982 } catch (e) {} 28983 } 28984 28985 orig(elems); 28986 }; 28987 }($.cleanData); 28988 28989 $.widget = function (name, base, prototype) { 28990 var existingConstructor, constructor, basePrototype; // ProxiedPrototype allows the provided prototype to remain unmodified 28991 // so that it can be used as a mixin for multiple widgets (#8876) 28992 28993 var proxiedPrototype = {}; 28994 var namespace = name.split(".")[0]; 28995 name = name.split(".")[1]; 28996 var fullName = namespace + "-" + name; 28997 28998 if (!prototype) { 28999 prototype = base; 29000 base = $.Widget; 29001 } 29002 29003 if ($.isArray(prototype)) { 29004 prototype = $.extend.apply(null, [{}].concat(prototype)); 29005 } // Create selector for plugin 29006 29007 29008 $.expr[":"][fullName.toLowerCase()] = function (elem) { 29009 return !!$.data(elem, fullName); 29010 }; 29011 29012 $[namespace] = $[namespace] || {}; 29013 existingConstructor = $[namespace][name]; 29014 29015 constructor = $[namespace][name] = function (options, element) { 29016 // Allow instantiation without "new" keyword 29017 if (!this._createWidget) { 29018 return new constructor(options, element); 29019 } // Allow instantiation without initializing for simple inheritance 29020 // must use "new" keyword (the code above always passes args) 29021 29022 29023 if (arguments.length) { 29024 this._createWidget(options, element); 29025 } 29026 }; // Extend with the existing constructor to carry over any static properties 29027 29028 29029 $.extend(constructor, existingConstructor, { 29030 version: prototype.version, 29031 // Copy the object used to create the prototype in case we need to 29032 // redefine the widget later 29033 _proto: $.extend({}, prototype), 29034 // Track widgets that inherit from this widget in case this widget is 29035 // redefined after a widget inherits from it 29036 _childConstructors: [] 29037 }); 29038 basePrototype = new base(); // We need to make the options hash a property directly on the new instance 29039 // otherwise we'll modify the options hash on the prototype that we're 29040 // inheriting from 29041 29042 basePrototype.options = $.widget.extend({}, basePrototype.options); 29043 $.each(prototype, function (prop, value) { 29044 if (!$.isFunction(value)) { 29045 proxiedPrototype[prop] = value; 29046 return; 29047 } 29048 29049 proxiedPrototype[prop] = function () { 29050 function _super() { 29051 return base.prototype[prop].apply(this, arguments); 29052 } 29053 29054 function _superApply(args) { 29055 return base.prototype[prop].apply(this, args); 29056 } 29057 29058 return function () { 29059 var __super = this._super; 29060 var __superApply = this._superApply; 29061 var returnValue; 29062 this._super = _super; 29063 this._superApply = _superApply;
vendor: 18,431 bytes, lines 29064-29619
29064 returnValue = value.apply(this, arguments); 29065 this._super = __super; 29066 this._superApply = __superApply; 29067 return returnValue; 29068 }; 29069 }(); 29070 }); 29071 constructor.prototype = $.widget.extend(basePrototype, { 29072 // TODO: remove support for widgetEventPrefix 29073 // always use the name + a colon as the prefix, e.g., draggable:start 29074 // don't prefix for widgets that aren't DOM-based 29075 widgetEventPrefix: existingConstructor ? basePrototype.widgetEventPrefix || name : name 29076 }, proxiedPrototype, { 29077 constructor: constructor, 29078 namespace: namespace, 29079 widgetName: name, 29080 widgetFullName: fullName 29081 }); // If this widget is being redefined then we need to find all widgets that 29082 // are inheriting from it and redefine all of them so that they inherit from 29083 // the new version of this widget. We're essentially trying to replace one 29084 // level in the prototype chain. 29085 29086 if (existingConstructor) { 29087 $.each(existingConstructor._childConstructors, function (i, child) { 29088 var childPrototype = child.prototype; // Redefine the child widget using the same prototype that was 29089 // originally used, but inherit from the new version of the base 29090 29091 $.widget(childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto); 29092 }); // Remove the list of existing child constructors from the old constructor 29093 // so the old child constructors can be garbage collected 29094 29095 delete existingConstructor._childConstructors; 29096 } else { 29097 base._childConstructors.push(constructor); 29098 } 29099 29100 $.widget.bridge(name, constructor); 29101 return constructor; 29102 }; 29103 29104 $.widget.extend = function (target) { 29105 var input = widgetSlice.call(arguments, 1); 29106 var inputIndex = 0; 29107 var inputLength = input.length; 29108 var key; 29109 var value; 29110 29111 for (; inputIndex < inputLength; inputIndex++) { 29112 for (key in input[inputIndex]) { 29113 value = input[inputIndex][key]; 29114 29115 if (input[inputIndex].hasOwnProperty(key) && value !== undefined) { 29116 // Clone objects 29117 if ($.isPlainObject(value)) { 29118 target[key] = $.isPlainObject(target[key]) ? $.widget.extend({}, target[key], value) : // Don't extend strings, arrays, etc. with objects 29119 $.widget.extend({}, value); // Copy everything else by reference 29120 } else { 29121 target[key] = value; 29122 } 29123 } 29124 } 29125 } 29126 29127 return target; 29128 }; 29129 29130 $.widget.bridge = function (name, object) { 29131 var fullName = object.prototype.widgetFullName || name; 29132 29133 $.fn[name] = function (options) { 29134 var isMethodCall = typeof options === "string"; 29135 var args = widgetSlice.call(arguments, 1); 29136 var returnValue = this; 29137 29138 if (isMethodCall) { 29139 // If this is an empty collection, we need to have the instance method 29140 // return undefined instead of the jQuery instance 29141 if (!this.length && options === "instance") { 29142 returnValue = undefined; 29143 } else { 29144 this.each(function () { 29145 var methodValue; 29146 var instance = $.data(this, fullName); 29147 29148 if (options === "instance") { 29149 returnValue = instance; 29150 return false; 29151 } 29152 29153 if (!instance) { 29154 return $.error("cannot call methods on " + name + " prior to initialization; " + "attempted to call method '" + options + "'"); 29155 } 29156 29157 if (!$.isFunction(instance[options]) || options.charAt(0) === "_") { 29158 return $.error("no such method '" + options + "' for " + name + " widget instance"); 29159 } 29160 29161 methodValue = instance[options].apply(instance, args); 29162 29163 if (methodValue !== instance && methodValue !== undefined) { 29164 returnValue = methodValue && methodValue.jquery ? returnValue.pushStack(methodValue.get()) : methodValue; 29165 return false; 29166 } 29167 }); 29168 } 29169 } else { 29170 // Allow multiple hashes to be passed on init 29171 if (args.length) { 29172 options = $.widget.extend.apply(null, [options].concat(args)); 29173 } 29174 29175 this.each(function () { 29176 var instance = $.data(this, fullName); 29177 29178 if (instance) { 29179 instance.option(options || {}); 29180 29181 if (instance._init) { 29182 instance._init(); 29183 } 29184 } else { 29185 $.data(this, fullName, new object(options, this)); 29186 } 29187 }); 29188 } 29189 29190 return returnValue; 29191 }; 29192 }; 29193 29194 $.Widget = function () 29195 /* options, element */ 29196 {}; 29197 29198 $.Widget._childConstructors = []; 29199 $.Widget.prototype = { 29200 widgetName: "widget", 29201 widgetEventPrefix: "", 29202 defaultElement: "<div>", 29203 options: { 29204 classes: {}, 29205 disabled: false, 29206 // Callbacks 29207 create: null 29208 }, 29209 _createWidget: function _createWidget(options, element) { 29210 element = $(element || this.defaultElement || this)[0]; 29211 this.element = $(element); 29212 this.uuid = widgetUuid++; 29213 this.eventNamespace = "." + this.widgetName + this.uuid; 29214 this.bindings = $(); 29215 this.hoverable = $(); 29216 this.focusable = $(); 29217 this.classesElementLookup = {}; 29218 29219 if (element !== this) { 29220 $.data(element, this.widgetFullName, this); 29221 29222 this._on(true, this.element, { 29223 remove: function remove(event) { 29224 if (event.target === element) { 29225 this.destroy(); 29226 } 29227 } 29228 }); 29229 29230 this.document = $(element.style ? // Element within the document 29231 element.ownerDocument : // Element is window or document 29232 element.document || element); 29233 this.window = $(this.document[0].defaultView || this.document[0].parentWindow); 29234 } 29235 29236 this.options = $.widget.extend({}, this.options, this._getCreateOptions(), options); 29237 29238 this._create(); 29239 29240 if (this.options.disabled) { 29241 this._setOptionDisabled(this.options.disabled); 29242 } 29243 29244 this._trigger("create", null, this._getCreateEventData()); 29245 29246 this._init(); 29247 }, 29248 _getCreateOptions: function _getCreateOptions() { 29249 return {}; 29250 }, 29251 _getCreateEventData: $.noop, 29252 _create: $.noop, 29253 _init: $.noop, 29254 destroy: function destroy() { 29255 var that = this; 29256 29257 this._destroy(); 29258 29259 $.each(this.classesElementLookup, function (key, value) { 29260 that._removeClass(value, key); 29261 }); // We can probably remove the unbind calls in 2.0 29262 // all event bindings should go through this._on() 29263 29264 this.element.off(this.eventNamespace).removeData(this.widgetFullName); 29265 this.widget().off(this.eventNamespace).removeAttr("aria-disabled"); // Clean up events and states 29266 29267 this.bindings.off(this.eventNamespace); 29268 }, 29269 _destroy: $.noop, 29270 widget: function widget() { 29271 return this.element; 29272 }, 29273 option: function option(key, value) { 29274 var options = key; 29275 var parts; 29276 var curOption; 29277 var i; 29278 29279 if (arguments.length === 0) { 29280 // Don't return a reference to the internal hash 29281 return $.widget.extend({}, this.options); 29282 } 29283 29284 if (typeof key === "string") { 29285 // Handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } } 29286 options = {}; 29287 parts = key.split("."); 29288 key = parts.shift(); 29289 29290 if (parts.length) { 29291 curOption = options[key] = $.widget.extend({}, this.options[key]); 29292 29293 for (i = 0; i < parts.length - 1; i++) { 29294 curOption[parts[i]] = curOption[parts[i]] || {}; 29295 curOption = curOption[parts[i]]; 29296 } 29297 29298 key = parts.pop(); 29299 29300 if (arguments.length === 1) { 29301 return curOption[key] === undefined ? null : curOption[key]; 29302 } 29303 29304 curOption[key] = value; 29305 } else { 29306 if (arguments.length === 1) { 29307 return this.options[key] === undefined ? null : this.options[key]; 29308 } 29309 29310 options[key] = value; 29311 } 29312 } 29313 29314 this._setOptions(options); 29315 29316 return this; 29317 }, 29318 _setOptions: function _setOptions(options) { 29319 var key; 29320 29321 for (key in options) { 29322 this._setOption(key, options[key]); 29323 } 29324 29325 return this; 29326 }, 29327 _setOption: function _setOption(key, value) { 29328 if (key === "classes") { 29329 this._setOptionClasses(value); 29330 } 29331 29332 this.options[key] = value; 29333 29334 if (key === "disabled") { 29335 this._setOptionDisabled(value); 29336 } 29337 29338 return this; 29339 }, 29340 _setOptionClasses: function _setOptionClasses(value) { 29341 var classKey, elements, currentElements; 29342 29343 for (classKey in value) { 29344 currentElements = this.classesElementLookup[classKey]; 29345 29346 if (value[classKey] === this.options.classes[classKey] || !currentElements || !currentElements.length) { 29347 continue; 29348 } // We are doing this to create a new jQuery object because the _removeClass() call 29349 // on the next line is going to destroy the reference to the current elements being 29350 // tracked. We need to save a copy of this collection so that we can add the new classes 29351 // below. 29352 29353 29354 elements = $(currentElements.get()); 29355 29356 this._removeClass(currentElements, classKey); // We don't use _addClass() here, because that uses this.options.classes 29357 // for generating the string of classes. We want to use the value passed in from 29358 // _setOption(), this is the new value of the classes option which was passed to 29359 // _setOption(). We pass this value directly to _classes(). 29360 29361 29362 elements.addClass(this._classes({ 29363 element: elements, 29364 keys: classKey, 29365 classes: value, 29366 add: true 29367 })); 29368 } 29369 }, 29370 _setOptionDisabled: function _setOptionDisabled(value) { 29371 this._toggleClass(this.widget(), this.widgetFullName + "-disabled", null, !!value); // If the widget is becoming disabled, then nothing is interactive 29372 29373 29374 if (value) { 29375 this._removeClass(this.hoverable, null, "ui-state-hover"); 29376 29377 this._removeClass(this.focusable, null, "ui-state-focus"); 29378 } 29379 }, 29380 enable: function enable() { 29381 return this._setOptions({ 29382 disabled: false 29383 }); 29384 }, 29385 disable: function disable() { 29386 return this._setOptions({ 29387 disabled: true 29388 }); 29389 }, 29390 _classes: function _classes(options) { 29391 var full = []; 29392 var that = this; 29393 options = $.extend({ 29394 element: this.element, 29395 classes: this.options.classes || {} 29396 }, options); 29397 29398 function processClassString(classes, checkOption) { 29399 var current, i; 29400 29401 for (i = 0; i < classes.length; i++) { 29402 current = that.classesElementLookup[classes[i]] || $(); 29403 29404 if (options.add) { 29405 current = $($.unique(current.get().concat(options.element.get()))); 29406 } else { 29407 current = $(current.not(options.element).get()); 29408 } 29409 29410 that.classesElementLookup[classes[i]] = current; 29411 full.push(classes[i]); 29412 29413 if (checkOption && options.classes[classes[i]]) { 29414 full.push(options.classes[classes[i]]); 29415 } 29416 } 29417 } 29418 29419 this._on(options.element, { 29420 "remove": "_untrackClassesElement" 29421 }); 29422 29423 if (options.keys) { 29424 processClassString(options.keys.match(/\S+/g) || [], true); 29425 } 29426 29427 if (options.extra) { 29428 processClassString(options.extra.match(/\S+/g) || []); 29429 } 29430 29431 return full.join(" "); 29432 }, 29433 _untrackClassesElement: function _untrackClassesElement(event) { 29434 var that = this; 29435 $.each(that.classesElementLookup, function (key, value) { 29436 if ($.inArray(event.target, value) !== -1) { 29437 that.classesElementLookup[key] = $(value.not(event.target).get()); 29438 } 29439 }); 29440 }, 29441 _removeClass: function _removeClass(element, keys, extra) { 29442 return this._toggleClass(element, keys, extra, false); 29443 }, 29444 _addClass: function _addClass(element, keys, extra) { 29445 return this._toggleClass(element, keys, extra, true); 29446 }, 29447 _toggleClass: function _toggleClass(element, keys, extra, add) { 29448 add = typeof add === "boolean" ? add : extra; 29449 var shift = typeof element === "string" || element === null, 29450 options = { 29451 extra: shift ? keys : extra, 29452 keys: shift ? element : keys, 29453 element: shift ? this.element : element, 29454 add: add 29455 }; 29456 options.element.toggleClass(this._classes(options), add); 29457 return this; 29458 }, 29459 _on: function _on(suppressDisabledCheck, element, handlers) { 29460 var delegateElement; 29461 var instance = this; // No suppressDisabledCheck flag, shuffle arguments 29462 29463 if (typeof suppressDisabledCheck !== "boolean") { 29464 handlers = element; 29465 element = suppressDisabledCheck; 29466 suppressDisabledCheck = false; 29467 } // No element argument, shuffle and use this.element 29468 29469 29470 if (!handlers) { 29471 handlers = element; 29472 element = this.element; 29473 delegateElement = this.widget(); 29474 } else { 29475 element = delegateElement = $(element); 29476 this.bindings = this.bindings.add(element); 29477 } 29478 29479 $.each(handlers, function (event, handler) { 29480 function handlerProxy() { 29481 // Allow widgets to customize the disabled handling 29482 // - disabled as an array instead of boolean 29483 // - disabled class as method for disabling individual parts 29484 if (!suppressDisabledCheck && (instance.options.disabled === true || $(this).hasClass("ui-state-disabled"))) { 29485 return; 29486 } 29487 29488 return (typeof handler === "string" ? instance[handler] : handler).apply(instance, arguments); 29489 } // Copy the guid so direct unbinding works 29490 29491 29492 if (typeof handler !== "string") { 29493 handlerProxy.guid = handler.guid = handler.guid || handlerProxy.guid || $.guid++; 29494 } 29495 29496 var match = event.match(/^([\w:-]*)\s*(.*)$/); 29497 var eventName = match[1] + instance.eventNamespace; 29498 var selector = match[2]; 29499 29500 if (selector) { 29501 delegateElement.on(eventName, selector, handlerProxy); 29502 } else { 29503 element.on(eventName, handlerProxy); 29504 } 29505 }); 29506 }, 29507 _off: function _off(element, eventName) { 29508 eventName = (eventName || "").split(" ").join(this.eventNamespace + " ") + this.eventNamespace; 29509 element.off(eventName).off(eventName); // Clear the stack to avoid memory leaks (#10056) 29510 29511 this.bindings = $(this.bindings.not(element).get()); 29512 this.focusable = $(this.focusable.not(element).get()); 29513 this.hoverable = $(this.hoverable.not(element).get()); 29514 }, 29515 _delay: function _delay(handler, delay) { 29516 function handlerProxy() { 29517 return (typeof handler === "string" ? instance[handler] : handler).apply(instance, arguments); 29518 } 29519 29520 var instance = this; 29521 return setTimeout(handlerProxy, delay || 0); 29522 }, 29523 _hoverable: function _hoverable(element) { 29524 this.hoverable = this.hoverable.add(element); 29525 29526 this._on(element, { 29527 mouseenter: function mouseenter(event) { 29528 this._addClass($(event.currentTarget), null, "ui-state-hover"); 29529 }, 29530 mouseleave: function mouseleave(event) { 29531 this._removeClass($(event.currentTarget), null, "ui-state-hover"); 29532 } 29533 }); 29534 }, 29535 _focusable: function _focusable(element) { 29536 this.focusable = this.focusable.add(element); 29537 29538 this._on(element, { 29539 focusin: function focusin(event) { 29540 this._addClass($(event.currentTarget), null, "ui-state-focus"); 29541 }, 29542 focusout: function focusout(event) { 29543 this._removeClass($(event.currentTarget), null, "ui-state-focus"); 29544 } 29545 }); 29546 }, 29547 _trigger: function _trigger(type, event, data) { 29548 var prop, orig; 29549 var callback = this.options[type]; 29550 data = data || {}; 29551 event = $.Event(event); 29552 event.type = (type === this.widgetEventPrefix ? type : this.widgetEventPrefix + type).toLowerCase(); // The original event may come from any element 29553 // so we need to reset the target on the new event 29554 29555 event.target = this.element[0]; // Copy original event properties over to the new event 29556 29557 orig = event.originalEvent; 29558 29559 if (orig) { 29560 for (prop in orig) { 29561 if (!(prop in event)) { 29562 event[prop] = orig[prop]; 29563 } 29564 } 29565 } 29566 29567 this.element.trigger(event, data); 29568 return !($.isFunction(callback) && callback.apply(this.element[0], [event].concat(data)) === false || event.isDefaultPrevented()); 29569 } 29570 }; 29571 $.each({ 29572 show: "fadeIn", 29573 hide: "fadeOut" 29574 }, function (method, defaultEffect) { 29575 $.Widget.prototype["_" + method] = function (element, options, callback) { 29576 if (typeof options === "string") { 29577 options = { 29578 effect: options 29579 }; 29580 } 29581 29582 var hasOptions; 29583 var effectName = !options ? method : options === true || typeof options === "number" ? defaultEffect : options.effect || defaultEffect; 29584 options = options || {}; 29585 29586 if (typeof options === "number") { 29587 options = { 29588 duration: options 29589 }; 29590 } 29591 29592 hasOptions = !$.isEmptyObject(options); 29593 options.complete = callback; 29594 29595 if (options.delay) { 29596 element.delay(options.delay); 29597 } 29598 29599 if (hasOptions && $.effects && $.effects.effect[effectName]) { 29600 element[method](options); 29601 } else if (effectName !== method && element[effectName]) { 29602 element[effectName](options.duration, options.easing, callback); 29603 } else { 29604 element.queue(function (next) { 29605 $(this)[method](); 29606 29607 if (callback) { 29608 callback.call(element[0]); 29609 } 29610 29611 next(); 29612 }); 29613 } 29614 }; 29615 }); 29616 var widget = $.widget; 29617 /*! 29618 * jQuery UI Position 1.12.1 29619 * http://jqueryui.com
vendor: 6,073 bytes, lines 29620-29797
29620 * 29621 * Copyright jQuery Foundation and other contributors 29622 * Released under the MIT license. 29623 * http://jquery.org/license 29624 * 29625 * http://api.jqueryui.com/position/ 29626 */ 29627 //>>label: Position 29628 //>>group: Core 29629 //>>description: Positions elements relative to other elements. 29630 //>>docs: http://api.jqueryui.com/position/ 29631 //>>demos: http://jqueryui.com/position/ 29632 29633 (function () { 29634 var cachedScrollbarWidth, 29635 max = Math.max, 29636 abs = Math.abs, 29637 rhorizontal = /left|center|right/, 29638 rvertical = /top|center|bottom/, 29639 roffset = /[\+\-]\d+(\.[\d]+)?%?/, 29640 rposition = /^\w+/, 29641 rpercent = /%$/, 29642 _position = $.fn.position; 29643 29644 function getOffsets(offsets, width, height) { 29645 return [parseFloat(offsets[0]) * (rpercent.test(offsets[0]) ? width / 100 : 1), parseFloat(offsets[1]) * (rpercent.test(offsets[1]) ? height / 100 : 1)]; 29646 } 29647 29648 function parseCss(element, property) { 29649 return parseInt($.css(element, property), 10) || 0; 29650 } 29651 29652 function getDimensions(elem) { 29653 var raw = elem[0]; 29654 29655 if (raw.nodeType === 9) { 29656 return { 29657 width: elem.width(), 29658 height: elem.height(), 29659 offset: { 29660 top: 0, 29661 left: 0 29662 } 29663 }; 29664 } 29665 29666 if ($.isWindow(raw)) { 29667 return { 29668 width: elem.width(), 29669 height: elem.height(), 29670 offset: { 29671 top: elem.scrollTop(), 29672 left: elem.scrollLeft() 29673 } 29674 }; 29675 } 29676 29677 if (raw.preventDefault) { 29678 return { 29679 width: 0, 29680 height: 0, 29681 offset: { 29682 top: raw.pageY, 29683 left: raw.pageX 29684 } 29685 }; 29686 } 29687 29688 return { 29689 width: elem.outerWidth(), 29690 height: elem.outerHeight(), 29691 offset: elem.offset() 29692 }; 29693 } 29694 29695 $.position = { 29696 scrollbarWidth: function scrollbarWidth() { 29697 if (cachedScrollbarWidth !== undefined) { 29698 return cachedScrollbarWidth; 29699 } 29700 29701 var w1, 29702 w2, 29703 div = $("<div " + "style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'>" + "<div style='height:100px;width:auto;'></div></div>"), 29704 innerDiv = div.children()[0]; 29705 $("body").append(div); 29706 w1 = innerDiv.offsetWidth; 29707 div.css("overflow", "scroll"); 29708 w2 = innerDiv.offsetWidth; 29709 29710 if (w1 === w2) { 29711 w2 = div[0].clientWidth; 29712 } 29713 29714 div.remove(); 29715 return cachedScrollbarWidth = w1 - w2; 29716 }, 29717 getScrollInfo: function getScrollInfo(within) { 29718 var overflowX = within.isWindow || within.isDocument ? "" : within.element.css("overflow-x"), 29719 overflowY = within.isWindow || within.isDocument ? "" : within.element.css("overflow-y"), 29720 hasOverflowX = overflowX === "scroll" || overflowX === "auto" && within.width < within.element[0].scrollWidth, 29721 hasOverflowY = overflowY === "scroll" || overflowY === "auto" && within.height < within.element[0].scrollHeight; 29722 return { 29723 width: hasOverflowY ? $.position.scrollbarWidth() : 0, 29724 height: hasOverflowX ? $.position.scrollbarWidth() : 0 29725 }; 29726 }, 29727 getWithinInfo: function getWithinInfo(element) { 29728 var withinElement = $(element || window), 29729 isWindow = $.isWindow(withinElement[0]), 29730 isDocument = !!withinElement[0] && withinElement[0].nodeType === 9, 29731 hasOffset = !isWindow && !isDocument; 29732 return { 29733 element: withinElement, 29734 isWindow: isWindow, 29735 isDocument: isDocument, 29736 offset: hasOffset ? $(element).offset() : { 29737 left: 0, 29738 top: 0 29739 }, 29740 scrollLeft: withinElement.scrollLeft(), 29741 scrollTop: withinElement.scrollTop(), 29742 width: withinElement.outerWidth(), 29743 height: withinElement.outerHeight() 29744 }; 29745 } 29746 }; 29747 29748 $.fn.position = function (options) { 29749 if (!options || !options.of) { 29750 return _position.apply(this, arguments); 29751 } // Make a copy, we don't want to modify arguments 29752 29753 29754 options = $.extend({}, options); 29755 var atOffset, 29756 targetWidth, 29757 targetHeight, 29758 targetOffset, 29759 basePosition, 29760 dimensions, 29761 target = $(options.of), 29762 within = $.position.getWithinInfo(options.within), 29763 scrollInfo = $.position.getScrollInfo(within), 29764 collision = (options.collision || "flip").split(" "), 29765 offsets = {}; 29766 dimensions = getDimensions(target); 29767 29768 if (target[0].preventDefault) { 29769 // Force left top to allow flipping 29770 options.at = "left top"; 29771 } 29772 29773 targetWidth = dimensions.width; 29774 targetHeight = dimensions.height; 29775 targetOffset = dimensions.offset; // Clone to reuse original targetOffset later 29776 29777 basePosition = $.extend({}, targetOffset); // Force my and at to have valid horizontal and vertical positions 29778 // if a value is missing or invalid, it will be converted to center 29779 29780 $.each(["my", "at"], function () { 29781 var pos = (options[this] || "").split(" "), 29782 horizontalOffset, 29783 verticalOffset; 29784 29785 if (pos.length === 1) { 29786 pos = rhorizontal.test(pos[0]) ? pos.concat(["center"]) : rvertical.test(pos[0]) ? ["center"].concat(pos) : ["center", "center"]; 29787 } 29788 29789 pos[0] = rhorizontal.test(pos[0]) ? pos[0] : "center"; 29790 pos[1] = rvertical.test(pos[1]) ? pos[1] : "center"; // Calculate offsets 29791 29792 horizontalOffset = roffset.exec(pos[0]); 29793 verticalOffset = roffset.exec(pos[1]); 29794 offsets[this] = [horizontalOffset ? horizontalOffset[0] : 0, verticalOffset ? verticalOffset[0] : 0]; // Reduce to just the positions without the offsets 29795 29796 options[this] = [rposition.exec(pos[0])[0], rposition.exec(pos[1])[0]]; 29797 });
vendor: 10,977 bytes, lines 29797-30048
29797 // Normalize collision option 29798 29799 if (collision.length === 1) { 29800 collision[1] = collision[0]; 29801 } 29802 29803 if (options.at[0] === "right") { 29804 basePosition.left += targetWidth; 29805 } else if (options.at[0] === "center") { 29806 basePosition.left += targetWidth / 2; 29807 } 29808 29809 if (options.at[1] === "bottom") { 29810 basePosition.top += targetHeight; 29811 } else if (options.at[1] === "center") { 29812 basePosition.top += targetHeight / 2; 29813 } 29814 29815 atOffset = getOffsets(offsets.at, targetWidth, targetHeight); 29816 basePosition.left += atOffset[0]; 29817 basePosition.top += atOffset[1]; 29818 return this.each(function () { 29819 var collisionPosition, 29820 using, 29821 elem = $(this), 29822 elemWidth = elem.outerWidth(), 29823 elemHeight = elem.outerHeight(), 29824 marginLeft = parseCss(this, "marginLeft"), 29825 marginTop = parseCss(this, "marginTop"), 29826 collisionWidth = elemWidth + marginLeft + parseCss(this, "marginRight") + scrollInfo.width, 29827 collisionHeight = elemHeight + marginTop + parseCss(this, "marginBottom") + scrollInfo.height, 29828 position = $.extend({}, basePosition), 29829 myOffset = getOffsets(offsets.my, elem.outerWidth(), elem.outerHeight()); 29830 29831 if (options.my[0] === "right") { 29832 position.left -= elemWidth; 29833 } else if (options.my[0] === "center") { 29834 position.left -= elemWidth / 2; 29835 } 29836 29837 if (options.my[1] === "bottom") { 29838 position.top -= elemHeight; 29839 } else if (options.my[1] === "center") { 29840 position.top -= elemHeight / 2; 29841 } 29842 29843 position.left += myOffset[0]; 29844 position.top += myOffset[1]; 29845 collisionPosition = { 29846 marginLeft: marginLeft, 29847 marginTop: marginTop 29848 }; 29849 $.each(["left", "top"], function (i, dir) { 29850 if ($.ui.position[collision[i]]) { 29851 $.ui.position[collision[i]][dir](position, { 29852 targetWidth: targetWidth, 29853 targetHeight: targetHeight, 29854 elemWidth: elemWidth, 29855 elemHeight: elemHeight, 29856 collisionPosition: collisionPosition, 29857 collisionWidth: collisionWidth, 29858 collisionHeight: collisionHeight, 29859 offset: [atOffset[0] + myOffset[0], atOffset[1] + myOffset[1]], 29860 my: options.my, 29861 at: options.at, 29862 within: within, 29863 elem: elem 29864 }); 29865 } 29866 }); 29867 29868 if (options.using) { 29869 // Adds feedback as second argument to using callback, if present 29870 using = function using(props) { 29871 var left = targetOffset.left - position.left, 29872 right = left + targetWidth - elemWidth, 29873 top = targetOffset.top - position.top, 29874 bottom = top + targetHeight - elemHeight, 29875 feedback = { 29876 target: { 29877 element: target, 29878 left: targetOffset.left, 29879 top: targetOffset.top, 29880 width: targetWidth, 29881 height: targetHeight 29882 }, 29883 element: { 29884 element: elem, 29885 left: position.left, 29886 top: position.top, 29887 width: elemWidth, 29888 height: elemHeight 29889 }, 29890 horizontal: right < 0 ? "left" : left > 0 ? "right" : "center", 29891 vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle" 29892 }; 29893 29894 if (targetWidth < elemWidth && abs(left + right) < targetWidth) { 29895 feedback.horizontal = "center"; 29896 } 29897 29898 if (targetHeight < elemHeight && abs(top + bottom) < targetHeight) { 29899 feedback.vertical = "middle"; 29900 } 29901 29902 if (max(abs(left), abs(right)) > max(abs(top), abs(bottom))) { 29903 feedback.important = "horizontal"; 29904 } else { 29905 feedback.important = "vertical"; 29906 } 29907 29908 options.using.call(this, props, feedback); 29909 }; 29910 } 29911 29912 elem.offset($.extend(position, { 29913 using: using 29914 })); 29915 }); 29916 }; 29917 29918 $.ui.position = { 29919 fit: { 29920 left: function left(position, data) { 29921 var within = data.within, 29922 withinOffset = within.isWindow ? within.scrollLeft : within.offset.left, 29923 outerWidth = within.width, 29924 collisionPosLeft = position.left - data.collisionPosition.marginLeft, 29925 overLeft = withinOffset - collisionPosLeft, 29926 overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset, 29927 newOverRight; // Element is wider than within 29928 29929 if (data.collisionWidth > outerWidth) { 29930 // Element is initially over the left side of within 29931 if (overLeft > 0 && overRight <= 0) { 29932 newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - withinOffset; 29933 position.left += overLeft - newOverRight; // Element is initially over right side of within 29934 } else if (overRight > 0 && overLeft <= 0) { 29935 position.left = withinOffset; // Element is initially over both left and right sides of within 29936 } else { 29937 if (overLeft > overRight) { 29938 position.left = withinOffset + outerWidth - data.collisionWidth; 29939 } else { 29940 position.left = withinOffset; 29941 } 29942 } // Too far left -> align with left edge 29943 29944 } else if (overLeft > 0) { 29945 position.left += overLeft; // Too far right -> align with right edge 29946 } else if (overRight > 0) { 29947 position.left -= overRight; // Adjust based on position and margin 29948 } else { 29949 position.left = max(position.left - collisionPosLeft, position.left); 29950 } 29951 }, 29952 top: function top(position, data) { 29953 var within = data.within, 29954 withinOffset = within.isWindow ? within.scrollTop : within.offset.top, 29955 outerHeight = data.within.height, 29956 collisionPosTop = position.top - data.collisionPosition.marginTop, 29957 overTop = withinOffset - collisionPosTop, 29958 overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset, 29959 newOverBottom; // Element is taller than within 29960 29961 if (data.collisionHeight > outerHeight) { 29962 // Element is initially over the top of within 29963 if (overTop > 0 && overBottom <= 0) { 29964 newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - withinOffset; 29965 position.top += overTop - newOverBottom; // Element is initially over bottom of within 29966 } else if (overBottom > 0 && overTop <= 0) { 29967 position.top = withinOffset; // Element is initially over both top and bottom of within 29968 } else { 29969 if (overTop > overBottom) { 29970 position.top = withinOffset + outerHeight - data.collisionHeight; 29971 } else { 29972 position.top = withinOffset; 29973 } 29974 } // Too far up -> align with top 29975 29976 } else if (overTop > 0) { 29977 position.top += overTop; // Too far down -> align with bottom edge 29978 } else if (overBottom > 0) { 29979 position.top -= overBottom; // Adjust based on position and margin 29980 } else { 29981 position.top = max(position.top - collisionPosTop, position.top); 29982 } 29983 } 29984 }, 29985 flip: { 29986 left: function left(position, data) { 29987 var within = data.within, 29988 withinOffset = within.offset.left + within.scrollLeft, 29989 outerWidth = within.width, 29990 offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left, 29991 collisionPosLeft = position.left - data.collisionPosition.marginLeft, 29992 overLeft = collisionPosLeft - offsetLeft, 29993 overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft, 29994 myOffset = data.my[0] === "left" ? -data.elemWidth : data.my[0] === "right" ? data.elemWidth : 0, 29995 atOffset = data.at[0] === "left" ? data.targetWidth : data.at[0] === "right" ? -data.targetWidth : 0, 29996 offset = -2 * data.offset[0], 29997 newOverRight, 29998 newOverLeft; 29999 30000 if (overLeft < 0) { 30001 newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - outerWidth - withinOffset; 30002 30003 if (newOverRight < 0 || newOverRight < abs(overLeft)) { 30004 position.left += myOffset + atOffset + offset; 30005 } 30006 } else if (overRight > 0) { 30007 newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + atOffset + offset - offsetLeft; 30008 30009 if (newOverLeft > 0 || abs(newOverLeft) < overRight) { 30010 position.left += myOffset + atOffset + offset; 30011 } 30012 } 30013 }, 30014 top: function top(position, data) { 30015 var within = data.within, 30016 withinOffset = within.offset.top + within.scrollTop, 30017 outerHeight = within.height, 30018 offsetTop = within.isWindow ? within.scrollTop : within.offset.top, 30019 collisionPosTop = position.top - data.collisionPosition.marginTop, 30020 overTop = collisionPosTop - offsetTop, 30021 overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop, 30022 top = data.my[1] === "top", 30023 myOffset = top ? -data.elemHeight : data.my[1] === "bottom" ? data.elemHeight : 0, 30024 atOffset = data.at[1] === "top" ? data.targetHeight : data.at[1] === "bottom" ? -data.targetHeight : 0, 30025 offset = -2 * data.offset[1], 30026 newOverTop, 30027 newOverBottom; 30028 30029 if (overTop < 0) { 30030 newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset; 30031 30032 if (newOverBottom < 0 || newOverBottom < abs(overTop)) { 30033 position.top += myOffset + atOffset + offset; 30034 } 30035 } else if (overBottom > 0) { 30036 newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop; 30037 30038 if (newOverTop > 0 || abs(newOverTop) < overBottom) { 30039 position.top += myOffset + atOffset + offset; 30040 } 30041 } 30042 } 30043 }, 30044 flipfit: { 30045 left: function left() { 30046 $.ui.position.flip.left.apply(this, arguments); 30047 $.ui.position.fit.left.apply(this, arguments); 30048 },
30049 top: function top() { 30050 $.ui.position.flip.top.apply(this, arguments); 30051 $.ui.position.fit.top.apply(this, arguments); 30052 } 30053 } 30054 }; 30055 })(); 30056 30057 var position = $.ui.position; // Support: IE8 Only 30058 // IE8 does not support the form attribute and when it is supplied. It overwrites the form prop 30059 // with a string, so we need to find the proper form. 30060 30061 var form = $.fn.form = function () { 30062 return typeof this[0].form === "string" ? this.closest("form") : $(this[0].form); 30063 }; 30064 /*! 30065 * jQuery UI Form Reset Mixin 1.12.1 30066 * http://jqueryui.com 30067 * 30068 * Copyright jQuery Foundation and other contributors 30069 * Released under the MIT license. 30070 * http://jquery.org/license 30071 */ 30072 //>>label: Form Reset Mixin 30073 //>>group: Core 30074 //>>description: Refresh input widgets when their form is reset 30075 //>>docs: http://api.jqueryui.com/form-reset-mixin/ 30076 30077 30078 var formResetMixin = $.ui.formResetMixin = { 30079 _formResetHandler: function _formResetHandler() { 30080 var form = $(this); // Wait for the form reset to actually happen before refreshing 30081 30082 setTimeout(function () { 30083 var instances = form.data("ui-form-reset-instances"); 30084 $.each(instances, function () { 30085 this.refresh(); 30086 }); 30087 }); 30088 }, 30089 _bindFormResetHandler: function _bindFormResetHandler() { 30090 this.form = this.element.form(); 30091 30092 if (!this.form.length) { 30093 return; 30094 } 30095 30096 var instances = this.form.data("ui-form-reset-instances") || []; 30097 30098 if (!instances.length) { 30099 // We don't use _on() here because we use a single event handler per form 30100 this.form.on("reset.ui-form-reset", this._formResetHandler); 30101 } 30102 30103 instances.push(this); 30104 this.form.data("ui-form-reset-instances", instances); 30105 }, 30106 _unbindFormResetHandler: function _unbindFormResetHandler() { 30107 if (!this.form.length) { 30108 return; 30109 } 30110 30111 var instances = this.form.data("ui-form-reset-instances"); 30112 instances.splice($.inArray(this, instances), 1); 30113 30114 if (instances.length) { 30115 this.form.data("ui-form-reset-instances", instances); 30116 } else { 30117 this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset"); 30118 } 30119 } 30120 }; 30121 /*! 30122 * jQuery UI Keycode 1.12.1 30123 * http://jqueryui.com 30124 * 30125 * Copyright jQuery Foundation and other contributors 30126 * Released under the MIT license. 30127 * http://jquery.org/license 30128 */ 30129 //>>label: Keycode 30130 //>>group: Core 30131 //>>description: Provide keycodes as keynames 30132 //>>docs: http://api.jqueryui.com/jQuery.ui.keyCode/ 30133 30134 var keycode = $.ui.keyCode = { 30135 BACKSPACE: 8, 30136 COMMA: 188, 30137 DELETE: 46, 30138 DOWN: 40, 30139 END: 35, 30140 ENTER: 13, 30141 ESCAPE: 27, 30142 HOME: 36, 30143 LEFT: 37, 30144 PAGE_DOWN: 34, 30145 PAGE_UP: 33, 30146 PERIOD: 190, 30147 RIGHT: 39, 30148 SPACE: 32, 30149 TAB: 9, 30150 UP: 38 30151 }; // Internal use only 30152 30153 var escapeSelector = $.ui.escapeSelector = function () { 30154 var selectorEscape = /([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g; 30155 return function (selector) { 30156 return selector.replace(selectorEscape, "\\$1"); 30157 }; 30158 }(); 30159 /*! 30160 * jQuery UI Labels 1.12.1 30161 * http://jqueryui.com 30162 * 30163 * Copyright jQuery Foundation and other contributors 30164 * Released under the MIT license. 30165 * http://jquery.org/license 30166 */ 30167 //>>label: labels 30168 //>>group: Core 30169 //>>description: Find all the labels associated with a given input 30170 //>>docs: http://api.jqueryui.com/labels/ 30171 30172 30173 var labels = $.fn.labels = function () { 30174 var ancestor, selector, id, labels, ancestors; // Check control.labels first 30175 30176 if (this[0].labels && this[0].labels.length) { 30177 return this.pushStack(this[0].labels); 30178 } // Support: IE <= 11, FF <= 37, Android <= 2.3 only 30179 // Above browsers do not support control.labels. Everything below is to support them 30180 // as well as document fragments. control.labels does not work on document fragments 30181 30182 30183 labels = this.eq(0).parents("label"); // Look for the label based on the id 30184 30185 id = this.attr("id"); 30186 30187 if (id) { 30188 // We don't search against the document in case the element 30189 // is disconnected from the DOM
vendor: 6,577 bytes, lines 30190-30386
30190 ancestor = this.eq(0).parents().last(); // Get a full set of top level ancestors 30191 30192 ancestors = ancestor.add(ancestor.length ? ancestor.siblings() : this.siblings()); // Create a selector for the label based on the id 30193 30194 selector = "label[for='" + $.ui.escapeSelector(id) + "']"; 30195 labels = labels.add(ancestors.find(selector).addBack(selector)); 30196 } // Return whatever we have found for labels 30197 30198 30199 return this.pushStack(labels); 30200 }; 30201 /*! 30202 * jQuery UI Unique ID 1.12.1 30203 * http://jqueryui.com 30204 * 30205 * Copyright jQuery Foundation and other contributors 30206 * Released under the MIT license. 30207 * http://jquery.org/license 30208 */ 30209 //>>label: uniqueId 30210 //>>group: Core 30211 //>>description: Functions to generate and remove uniqueId's 30212 //>>docs: http://api.jqueryui.com/uniqueId/ 30213 30214 30215 var uniqueId = $.fn.extend({ 30216 uniqueId: function () { 30217 var uuid = 0; 30218 return function () { 30219 return this.each(function () { 30220 if (!this.id) { 30221 this.id = "ui-id-" + ++uuid; 30222 } 30223 }); 30224 }; 30225 }(), 30226 removeUniqueId: function removeUniqueId() { 30227 return this.each(function () { 30228 if (/^ui-id-\d+$/.test(this.id)) { 30229 $(this).removeAttr("id"); 30230 } 30231 }); 30232 } 30233 }); 30234 30235 var safeActiveElement = $.ui.safeActiveElement = function (document) { 30236 var activeElement; // Support: IE 9 only 30237 // IE9 throws an "Unspecified error" accessing document.activeElement from an <iframe> 30238 30239 try { 30240 activeElement = document.activeElement; 30241 } catch (error) { 30242 activeElement = document.body; 30243 } // Support: IE 9 - 11 only 30244 // IE may return null instead of an element 30245 // Interestingly, this only seems to occur when NOT in an iframe 30246 30247 30248 if (!activeElement) { 30249 activeElement = document.body; 30250 } // Support: IE 11 only 30251 // IE11 returns a seemingly empty object in some cases when accessing 30252 // document.activeElement from an <iframe> 30253 30254 30255 if (!activeElement.nodeName) { 30256 activeElement = document.body; 30257 } 30258 30259 return activeElement; 30260 }; 30261 /*! 30262 * jQuery UI Menu 1.12.1 30263 * http://jqueryui.com 30264 * 30265 * Copyright jQuery Foundation and other contributors 30266 * Released under the MIT license. 30267 * http://jquery.org/license 30268 */ 30269 //>>label: Menu 30270 //>>group: Widgets 30271 //>>description: Creates nestable menus. 30272 //>>docs: http://api.jqueryui.com/menu/ 30273 //>>demos: http://jqueryui.com/menu/ 30274 //>>css.structure: ../../themes/base/core.css 30275 //>>css.structure: ../../themes/base/menu.css 30276 //>>css.theme: ../../themes/base/theme.css 30277 30278 30279 var widgetsMenu = $.widget("ui.menu", { 30280 version: "1.12.1", 30281 defaultElement: "<ul>", 30282 delay: 300, 30283 options: { 30284 icons: { 30285 submenu: "ui-icon-caret-1-e" 30286 }, 30287 items: "> *", 30288 menus: "ul", 30289 position: { 30290 my: "left top", 30291 at: "right top" 30292 }, 30293 role: "menu", 30294 // Callbacks 30295 blur: null, 30296 focus: null, 30297 select: null 30298 }, 30299 _create: function _create() { 30300 this.activeMenu = this.element; // Flag used to prevent firing of the click handler 30301 // as the event bubbles up through nested menus 30302 30303 this.mouseHandled = false; 30304 this.element.uniqueId().attr({ 30305 role: this.options.role, 30306 tabIndex: 0 30307 }); 30308 30309 this._addClass("ui-menu", "ui-widget ui-widget-content"); 30310 30311 this._on({ 30312 // Prevent focus from sticking to links inside menu after clicking 30313 // them (focus should always stay on UL during navigation). 30314 "mousedown .ui-menu-item": function mousedownUiMenuItem(event) { 30315 event.preventDefault(); 30316 }, 30317 "click .ui-menu-item": function clickUiMenuItem(event) { 30318 var target = $(event.target); 30319 var active = $($.ui.safeActiveElement(this.document[0])); 30320 30321 if (!this.mouseHandled && target.not(".ui-state-disabled").length) { 30322 this.select(event); // Only set the mouseHandled flag if the event will bubble, see #9469. 30323 30324 if (!event.isPropagationStopped()) { 30325 this.mouseHandled = true; 30326 } // Open submenu on click 30327 30328 30329 if (target.has(".ui-menu").length) { 30330 this.expand(event); 30331 } else if (!this.element.is(":focus") && active.closest(".ui-menu").length) { 30332 // Redirect focus to the menu 30333 this.element.trigger("focus", [true]); // If the active item is on the top level, let it stay active. 30334 // Otherwise, blur the active item since it is no longer visible. 30335 30336 if (this.active && this.active.parents(".ui-menu").length === 1) { 30337 clearTimeout(this.timer); 30338 } 30339 } 30340 } 30341 }, 30342 "mouseenter .ui-menu-item": function mouseenterUiMenuItem(event) { 30343 // Ignore mouse events while typeahead is active, see #10458. 30344 // Prevents focusing the wrong item when typeahead causes a scroll while the mouse 30345 // is over an item in the menu 30346 if (this.previousFilter) { 30347 return; 30348 } 30349 30350 var actualTarget = $(event.target).closest(".ui-menu-item"), 30351 target = $(event.currentTarget); // Ignore bubbled events on parent items, see #11641 30352 30353 if (actualTarget[0] !== target[0]) { 30354 return; 30355 } // Remove ui-state-active class from siblings of the newly focused menu item 30356 // to avoid a jump caused by adjacent elements both having a class with a border 30357 30358 30359 this._removeClass(target.siblings().children(".ui-state-active"), null, "ui-state-active"); 30360 30361 this.focus(event, target); 30362 }, 30363 mouseleave: "collapseAll", 30364 "mouseleave .ui-menu": "collapseAll", 30365 focus: function focus(event, keepActiveItem) { 30366 // If there's already an active item, keep it active 30367 // If not, activate the first item 30368 var item = this.active || this.element.find(this.options.items).eq(0); 30369 30370 if (!keepActiveItem) { 30371 this.focus(event, item); 30372 } 30373 }, 30374 blur: function blur(event) { 30375 this._delay(function () { 30376 var notContained = !$.contains(this.element[0], $.ui.safeActiveElement(this.document[0])); 30377 30378 if (notContained) { 30379 this.collapseAll(event); 30380 } 30381 }); 30382 }, 30383 keydown: "_keydown" 30384 }); 30385 30386 this.refresh();
vendor: 4,984 bytes, lines 30386-30546
30386 // Clicks outside of a menu collapse any open menus 30387 30388 this._on(this.document, { 30389 click: function click(event) { 30390 if (this._closeOnDocumentClick(event)) { 30391 this.collapseAll(event); 30392 } // Reset the mouseHandled flag 30393 30394 30395 this.mouseHandled = false; 30396 } 30397 }); 30398 }, 30399 _destroy: function _destroy() { 30400 var items = this.element.find(".ui-menu-item").removeAttr("role aria-disabled"), 30401 submenus = items.children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup"); // Destroy (sub)menus 30402 30403 this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled " + "tabIndex").removeUniqueId().show(); 30404 submenus.children().each(function () { 30405 var elem = $(this); 30406 30407 if (elem.data("ui-menu-submenu-caret")) { 30408 elem.remove(); 30409 } 30410 }); 30411 }, 30412 _keydown: function _keydown(event) { 30413 var match, 30414 prev, 30415 character, 30416 skip, 30417 preventDefault = true; 30418 30419 switch (event.keyCode) { 30420 case $.ui.keyCode.PAGE_UP: 30421 this.previousPage(event); 30422 break; 30423 30424 case $.ui.keyCode.PAGE_DOWN: 30425 this.nextPage(event); 30426 break; 30427 30428 case $.ui.keyCode.HOME: 30429 this._move("first", "first", event); 30430 30431 break; 30432 30433 case $.ui.keyCode.END: 30434 this._move("last", "last", event); 30435 30436 break; 30437 30438 case $.ui.keyCode.UP: 30439 this.previous(event); 30440 break; 30441 30442 case $.ui.keyCode.DOWN: 30443 this.next(event); 30444 break; 30445 30446 case $.ui.keyCode.LEFT: 30447 this.collapse(event); 30448 break; 30449 30450 case $.ui.keyCode.RIGHT: 30451 if (this.active && !this.active.is(".ui-state-disabled")) { 30452 this.expand(event); 30453 } 30454 30455 break; 30456 30457 case $.ui.keyCode.ENTER: 30458 case $.ui.keyCode.SPACE: 30459 this._activate(event); 30460 30461 break; 30462 30463 case $.ui.keyCode.ESCAPE: 30464 this.collapse(event); 30465 break; 30466 30467 default: 30468 preventDefault = false; 30469 prev = this.previousFilter || ""; 30470 skip = false; // Support number pad values 30471 30472 character = event.keyCode >= 96 && event.keyCode <= 105 ? (event.keyCode - 96).toString() : String.fromCharCode(event.keyCode); 30473 clearTimeout(this.filterTimer); 30474 30475 if (character === prev) { 30476 skip = true; 30477 } else { 30478 character = prev + character; 30479 } 30480 30481 match = this._filterMenuItems(character); 30482 match = skip && match.index(this.active.next()) !== -1 ? this.active.nextAll(".ui-menu-item") : match; // If no matches on the current filter, reset to the last character pressed 30483 // to move down the menu to the first item that starts with that character 30484 30485 if (!match.length) { 30486 character = String.fromCharCode(event.keyCode); 30487 match = this._filterMenuItems(character); 30488 } 30489 30490 if (match.length) { 30491 this.focus(event, match); 30492 this.previousFilter = character; 30493 this.filterTimer = this._delay(function () { 30494 delete this.previousFilter; 30495 }, 1000); 30496 } else { 30497 delete this.previousFilter; 30498 } 30499 30500 } 30501 30502 if (preventDefault) { 30503 event.preventDefault(); 30504 } 30505 }, 30506 _activate: function _activate(event) { 30507 if (this.active && !this.active.is(".ui-state-disabled")) { 30508 if (this.active.children("[aria-haspopup='true']").length) { 30509 this.expand(event); 30510 } else { 30511 this.select(event); 30512 } 30513 } 30514 }, 30515 refresh: function refresh() { 30516 var menus, 30517 items, 30518 newSubmenus, 30519 newItems, 30520 newWrappers, 30521 that = this, 30522 icon = this.options.icons.submenu, 30523 submenus = this.element.find(this.options.menus); 30524 30525 this._toggleClass("ui-menu-icons", null, !!this.element.find(".ui-icon").length); // Initialize nested menus 30526 30527 30528 newSubmenus = submenus.filter(":not(.ui-menu)").hide().attr({ 30529 role: this.options.role, 30530 "aria-hidden": "true", 30531 "aria-expanded": "false" 30532 }).each(function () { 30533 var menu = $(this), 30534 item = menu.prev(), 30535 submenuCaret = $("<span>").data("ui-menu-submenu-caret", true); 30536 30537 that._addClass(submenuCaret, "ui-menu-icon", "ui-icon " + icon); 30538 30539 item.attr("aria-haspopup", "true").prepend(submenuCaret); 30540 menu.attr("aria-labelledby", item.attr("id")); 30541 }); 30542 30543 this._addClass(newSubmenus, "ui-menu", "ui-widget ui-widget-content ui-front"); 30544 30545 menus = submenus.add(this.element); 30546 items = menus.find(this.options.items);
vendor: 5,108 bytes, lines 30546-30695
30546 // Initialize menu-items containing spaces and/or dashes only as dividers 30547 30548 items.not(".ui-menu-item").each(function () { 30549 var item = $(this); 30550 30551 if (that._isDivider(item)) { 30552 that._addClass(item, "ui-menu-divider", "ui-widget-content"); 30553 } 30554 }); // Don't refresh list items that are already adapted 30555 30556 newItems = items.not(".ui-menu-item, .ui-menu-divider"); 30557 newWrappers = newItems.children().not(".ui-menu").uniqueId().attr({ 30558 tabIndex: -1, 30559 role: this._itemRole() 30560 }); 30561 30562 this._addClass(newItems, "ui-menu-item")._addClass(newWrappers, "ui-menu-item-wrapper"); // Add aria-disabled attribute to any disabled menu item 30563 30564 30565 items.filter(".ui-state-disabled").attr("aria-disabled", "true"); // If the active item has been removed, blur the menu 30566 30567 if (this.active && !$.contains(this.element[0], this.active[0])) { 30568 this.blur(); 30569 } 30570 }, 30571 _itemRole: function _itemRole() { 30572 return { 30573 menu: "menuitem", 30574 listbox: "option" 30575 }[this.options.role]; 30576 }, 30577 _setOption: function _setOption(key, value) { 30578 if (key === "icons") { 30579 var icons = this.element.find(".ui-menu-icon"); 30580 30581 this._removeClass(icons, null, this.options.icons.submenu)._addClass(icons, null, value.submenu); 30582 } 30583 30584 this._super(key, value); 30585 }, 30586 _setOptionDisabled: function _setOptionDisabled(value) { 30587 this._super(value); 30588 30589 this.element.attr("aria-disabled", String(value)); 30590 30591 this._toggleClass(null, "ui-state-disabled", !!value); 30592 }, 30593 focus: function focus(event, item) { 30594 var nested, focused, activeParent; 30595 this.blur(event, event && event.type === "focus"); 30596 30597 this._scrollIntoView(item); 30598 30599 this.active = item.first(); 30600 focused = this.active.children(".ui-menu-item-wrapper"); 30601 30602 this._addClass(focused, null, "ui-state-active"); // Only update aria-activedescendant if there's a role 30603 // otherwise we assume focus is managed elsewhere 30604 30605 30606 if (this.options.role) { 30607 this.element.attr("aria-activedescendant", focused.attr("id")); 30608 } // Highlight active parent menu item, if any 30609 30610 30611 activeParent = this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"); 30612 30613 this._addClass(activeParent, null, "ui-state-active"); 30614 30615 if (event && event.type === "keydown") { 30616 this._close(); 30617 } else { 30618 this.timer = this._delay(function () { 30619 this._close(); 30620 }, this.delay); 30621 } 30622 30623 nested = item.children(".ui-menu"); 30624 30625 if (nested.length && event && /^mouse/.test(event.type)) { 30626 this._startOpening(nested); 30627 } 30628 30629 this.activeMenu = item.parent(); 30630 30631 this._trigger("focus", event, { 30632 item: item 30633 }); 30634 }, 30635 _scrollIntoView: function _scrollIntoView(item) { 30636 var borderTop, paddingTop, offset, scroll, elementHeight, itemHeight; 30637 30638 if (this._hasScroll()) { 30639 borderTop = parseFloat($.css(this.activeMenu[0], "borderTopWidth")) || 0; 30640 paddingTop = parseFloat($.css(this.activeMenu[0], "paddingTop")) || 0; 30641 offset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop; 30642 scroll = this.activeMenu.scrollTop(); 30643 elementHeight = this.activeMenu.height(); 30644 itemHeight = item.outerHeight(); 30645 30646 if (offset < 0) { 30647 this.activeMenu.scrollTop(scroll + offset); 30648 } else if (offset + itemHeight > elementHeight) { 30649 this.activeMenu.scrollTop(scroll + offset - elementHeight + itemHeight); 30650 } 30651 } 30652 }, 30653 blur: function blur(event, fromFocus) { 30654 if (!fromFocus) { 30655 clearTimeout(this.timer); 30656 } 30657 30658 if (!this.active) { 30659 return; 30660 } 30661 30662 this._removeClass(this.active.children(".ui-menu-item-wrapper"), null, "ui-state-active"); 30663 30664 this._trigger("blur", event, { 30665 item: this.active 30666 }); 30667 30668 this.active = null; 30669 }, 30670 _startOpening: function _startOpening(submenu) { 30671 clearTimeout(this.timer); // Don't open if already open fixes a Firefox bug that caused a .5 pixel 30672 // shift in the submenu position when mousing over the caret icon 30673 30674 if (submenu.attr("aria-hidden") !== "true") { 30675 return; 30676 } 30677 30678 this.timer = this._delay(function () { 30679 this._close(); 30680 30681 this._open(submenu); 30682 }, this.delay); 30683 }, 30684 _open: function _open(submenu) { 30685 var position = $.extend({ 30686 of: this.active 30687 }, this.options.position); 30688 clearTimeout(this.timer); 30689 this.element.find(".ui-menu").not(submenu.parents(".ui-menu")).hide().attr("aria-hidden", "true"); 30690 submenu.show().removeAttr("aria-hidden").attr("aria-expanded", "true").position(position); 30691 }, 30692 collapseAll: function collapseAll(event, all) { 30693 clearTimeout(this.timer); 30694 this.timer = this._delay(function () { 30695 // If we were passed an event, look for the submenu that c
vendor: 5,457 bytes, lines 30695-30854
30695ontains the event 30696 var currentMenu = all ? this.element : $(event && event.target).closest(this.element.find(".ui-menu")); // If we found no valid submenu ancestor, use the main menu to close all 30697 // sub menus anyway 30698 30699 if (!currentMenu.length) { 30700 currentMenu = this.element; 30701 } 30702 30703 this._close(currentMenu); 30704 30705 this.blur(event); // Work around active item staying active after menu is blurred 30706 30707 this._removeClass(currentMenu.find(".ui-state-active"), null, "ui-state-active"); 30708 30709 this.activeMenu = currentMenu; 30710 }, this.delay); 30711 }, 30712 // With no arguments, closes the currently active menu - if nothing is active 30713 // it closes all menus. If passed an argument, it will search for menus BELOW 30714 _close: function _close(startMenu) { 30715 if (!startMenu) { 30716 startMenu = this.active ? this.active.parent() : this.element; 30717 } 30718 30719 startMenu.find(".ui-menu").hide().attr("aria-hidden", "true").attr("aria-expanded", "false"); 30720 }, 30721 _closeOnDocumentClick: function _closeOnDocumentClick(event) { 30722 return !$(event.target).closest(".ui-menu").length; 30723 }, 30724 _isDivider: function _isDivider(item) { 30725 // Match hyphen, em dash, en dash 30726 return !/[^\-\u2014\u2013\s]/.test(item.text()); 30727 }, 30728 collapse: function collapse(event) { 30729 var newItem = this.active && this.active.parent().closest(".ui-menu-item", this.element); 30730 30731 if (newItem && newItem.length) { 30732 this._close(); 30733 30734 this.focus(event, newItem); 30735 } 30736 }, 30737 expand: function expand(event) { 30738 var newItem = this.active && this.active.children(".ui-menu ").find(this.options.items).first(); 30739 30740 if (newItem && newItem.length) { 30741 this._open(newItem.parent()); // Delay so Firefox will not hide activedescendant change in expanding submenu from AT 30742 30743 30744 this._delay(function () { 30745 this.focus(event, newItem); 30746 }); 30747 } 30748 }, 30749 next: function next(event) { 30750 this._move("next", "first", event); 30751 }, 30752 previous: function previous(event) { 30753 this._move("prev", "last", event); 30754 }, 30755 isFirstItem: function isFirstItem() { 30756 return this.active && !this.active.prevAll(".ui-menu-item").length; 30757 }, 30758 isLastItem: function isLastItem() { 30759 return this.active && !this.active.nextAll(".ui-menu-item").length; 30760 }, 30761 _move: function _move(direction, filter, event) { 30762 var next; 30763 30764 if (this.active) { 30765 if (direction === "first" || direction === "last") { 30766 next = this.active[direction === "first" ? "prevAll" : "nextAll"](".ui-menu-item").eq(-1); 30767 } else { 30768 next = this.active[direction + "All"](".ui-menu-item").eq(0); 30769 } 30770 } 30771 30772 if (!next || !next.length || !this.active) { 30773 next = this.activeMenu.find(this.options.items)[filter](); 30774 } 30775 30776 this.focus(event, next); 30777 }, 30778 nextPage: function nextPage(event) { 30779 var item, base, height; 30780 30781 if (!this.active) { 30782 this.next(event); 30783 return; 30784 } 30785 30786 if (this.isLastItem()) { 30787 return; 30788 } 30789 30790 if (this._hasScroll()) { 30791 base = this.active.offset().top; 30792 height = this.element.height(); 30793 this.active.nextAll(".ui-menu-item").each(function () { 30794 item = $(this); 30795 return item.offset().top - base - height < 0; 30796 }); 30797 this.focus(event, item); 30798 } else { 30799 this.focus(event, this.activeMenu.find(this.options.items)[!this.active ? "first" : "last"]()); 30800 } 30801 }, 30802 previousPage: function previousPage(event) { 30803 var item, base, height; 30804 30805 if (!this.active) { 30806 this.next(event); 30807 return; 30808 } 30809 30810 if (this.isFirstItem()) { 30811 return; 30812 } 30813 30814 if (this._hasScroll()) { 30815 base = this.active.offset().top; 30816 height = this.element.height(); 30817 this.active.prevAll(".ui-menu-item").each(function () { 30818 item = $(this); 30819 return item.offset().top - base + height > 0; 30820 }); 30821 this.focus(event, item); 30822 } else { 30823 this.focus(event, this.activeMenu.find(this.options.items).first()); 30824 } 30825 }, 30826 _hasScroll: function _hasScroll() { 30827 return this.element.outerHeight() < this.element.prop("scrollHeight"); 30828 }, 30829 select: function select(event) { 30830 // TODO: It should never be possible to not have an active item at this 30831 // point, but the tests don't trigger mouseenter before click. 30832 this.active = this.active || $(event.target).closest(".ui-menu-item"); 30833 var ui = { 30834 item: this.active 30835 }; 30836 30837 if (!this.active.has(".ui-menu").length) { 30838 this.collapseAll(event, true); 30839 } 30840 30841 this._trigger("select", event, ui); 30842 }, 30843 _filterMenuItems: function _filterMenuItems(character) { 30844 var escapedCharacter = character.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&"), 30845 regex = new RegExp("^" + escapedCharacter, "i"); 30846 return this.activeMenu.find(this.options.items) // Only match on items, not dividers or other content (#10571) 30847 .filter(".ui-menu-item").filter(function () { 30848 return regex.test($.trim($(this).children(".ui-menu-item-wrapper").text())); 30849 }); 30850 } 30851 }); 30852 /*! 30853 * jQuery UI Selectmenu 1.12.1 30854 * http://jqueryui.com
vendor: 4,166 bytes, lines 30855-30986
30855 * 30856 * Copyright jQuery Foundation and other contributors 30857 * Released under the MIT license. 30858 * http://jquery.org/license 30859 */ 30860 //>>label: Selectmenu 30861 //>>group: Widgets 30862 // jscs:disable maximumLineLength 30863 //>>description: Duplicates and extends the functionality of a native HTML select element, allowing it to be customizable in behavior and appearance far beyond the limitations of a native select. 30864 // jscs:enable maximumLineLength 30865 //>>docs: http://api.jqueryui.com/selectmenu/ 30866 //>>demos: http://jqueryui.com/selectmenu/ 30867 //>>css.structure: ../../themes/base/core.css 30868 //>>css.structure: ../../themes/base/selectmenu.css, ../../themes/base/button.css 30869 //>>css.theme: ../../themes/base/theme.css 30870 30871 var widgetsSelectmenu = $.widget("ui.selectmenu", [$.ui.formResetMixin, { 30872 version: "1.12.1", 30873 defaultElement: "<select>", 30874 options: { 30875 appendTo: null, 30876 classes: { 30877 "ui-selectmenu-button-open": "ui-corner-top", 30878 "ui-selectmenu-button-closed": "ui-corner-all" 30879 }, 30880 disabled: null, 30881 icons: { 30882 button: "ui-icon-triangle-1-s" 30883 }, 30884 position: { 30885 my: "left top", 30886 at: "left bottom", 30887 collision: "none" 30888 }, 30889 width: false, 30890 // Callbacks 30891 change: null, 30892 close: null, 30893 focus: null, 30894 open: null, 30895 select: null 30896 }, 30897 _create: function _create() { 30898 var selectmenuId = this.element.uniqueId().attr("id"); 30899 this.ids = { 30900 element: selectmenuId, 30901 button: selectmenuId + "-button", 30902 menu: selectmenuId + "-menu" 30903 }; 30904 30905 this._drawButton(); 30906 30907 this._drawMenu(); 30908 30909 this._bindFormResetHandler(); 30910 30911 this._rendered = false; 30912 this.menuItems = $(); 30913 }, 30914 _drawButton: function _drawButton() { 30915 var icon, 30916 that = this, 30917 item = this._parseOption(this.element.find("option:selected"), this.element[0].selectedIndex); // Associate existing label with the new button 30918 30919 30920 this.labels = this.element.labels().attr("for", this.ids.button); 30921 30922 this._on(this.labels, { 30923 click: function click(event) { 30924 this.button.focus(); 30925 event.preventDefault(); 30926 } 30927 }); // Hide original select element 30928 30929 30930 this.element.hide(); // Create button 30931 30932 this.button = $("<span>", { 30933 tabindex: this.options.disabled ? -1 : 0, 30934 id: this.ids.button, 30935 role: "combobox", 30936 "aria-expanded": "false", 30937 "aria-autocomplete": "list", 30938 "aria-owns": this.ids.menu, 30939 "aria-haspopup": "true", 30940 title: this.element.attr("title") 30941 }).insertAfter(this.element); 30942 30943 this._addClass(this.button, "ui-selectmenu-button ui-selectmenu-button-closed", "ui-button ui-widget"); 30944 30945 icon = $("<span>").appendTo(this.button); 30946 30947 this._addClass(icon, "ui-selectmenu-icon", "ui-icon " + this.options.icons.button); 30948 30949 this.buttonItem = this._renderButtonItem(item).appendTo(this.button); 30950 30951 if (this.options.width !== false) { 30952 this._resizeButton(); 30953 } 30954 30955 this._on(this.button, this._buttonEvents); 30956 30957 this.button.one("focusin", function () { 30958 // Delay rendering the menu items until the button receives focus. 30959 // The menu may have already been rendered via a programmatic open. 30960 if (!that._rendered) { 30961 that._refreshMenu(); 30962 } 30963 }); 30964 }, 30965 _drawMenu: function _drawMenu() { 30966 var that = this; // Create menu 30967 30968 this.menu = $("<ul>", { 30969 "aria-hidden": "true", 30970 "aria-labelledby": this.ids.button, 30971 id: this.ids.menu 30972 }); // Wrap menu 30973 30974 this.menuWrap = $("<div>").append(this.menu); 30975 30976 this._addClass(this.menuWrap, "ui-selectmenu-menu", "ui-front"); 30977 30978 this.menuWrap.appendTo(this._appendTo()); // Initialize menu widget 30979 30980 this.menuInstance = this.menu.menu({ 30981 classes: { 30982 "ui-menu": "ui-corner-bottom" 30983 }, 30984 role: "listbox", 30985 select: function select(event, ui) { 30986 event.preventDefault();
vendor: 13,039 bytes, lines 30986-31439
30986 // Support: IE8 30987 // If the item was selected via a click, the text selection 30988 // will be destroyed in IE 30989 30990 that._setSelection(); 30991 30992 that._select(ui.item.data("ui-selectmenu-item"), event); 30993 }, 30994 focus: function focus(event, ui) { 30995 var item = ui.item.data("ui-selectmenu-item"); // Prevent inital focus from firing and check if its a newly focused item 30996 30997 if (that.focusIndex != null && item.index !== that.focusIndex) { 30998 that._trigger("focus", event, { 30999 item: item 31000 }); 31001 31002 if (!that.isOpen) { 31003 that._select(item, event); 31004 } 31005 } 31006 31007 that.focusIndex = item.index; 31008 that.button.attr("aria-activedescendant", that.menuItems.eq(item.index).attr("id")); 31009 } 31010 }).menu("instance"); // Don't close the menu on mouseleave 31011 31012 this.menuInstance._off(this.menu, "mouseleave"); // Cancel the menu's collapseAll on document click 31013 31014 31015 this.menuInstance._closeOnDocumentClick = function () { 31016 return false; 31017 }; // Selects often contain empty items, but never contain dividers 31018 31019 31020 this.menuInstance._isDivider = function () { 31021 return false; 31022 }; 31023 }, 31024 refresh: function refresh() { 31025 this._refreshMenu(); 31026 31027 this.buttonItem.replaceWith(this.buttonItem = this._renderButtonItem( // Fall back to an empty object in case there are no options 31028 this._getSelectedItem().data("ui-selectmenu-item") || {})); 31029 31030 if (this.options.width === null) { 31031 this._resizeButton(); 31032 } 31033 }, 31034 _refreshMenu: function _refreshMenu() { 31035 var item, 31036 options = this.element.find("option"); 31037 this.menu.empty(); 31038 31039 this._parseOptions(options); 31040 31041 this._renderMenu(this.menu, this.items); 31042 31043 this.menuInstance.refresh(); 31044 this.menuItems = this.menu.find("li").not(".ui-selectmenu-optgroup").find(".ui-menu-item-wrapper"); 31045 this._rendered = true; 31046 31047 if (!options.length) { 31048 return; 31049 } 31050 31051 item = this._getSelectedItem(); // Update the menu to have the correct item focused 31052 31053 this.menuInstance.focus(null, item); 31054 31055 this._setAria(item.data("ui-selectmenu-item")); // Set disabled state 31056 31057 31058 this._setOption("disabled", this.element.prop("disabled")); 31059 }, 31060 open: function open(event) { 31061 if (this.options.disabled) { 31062 return; 31063 } // If this is the first time the menu is being opened, render the items 31064 31065 31066 if (!this._rendered) { 31067 this._refreshMenu(); 31068 } else { 31069 // Menu clears focus on close, reset focus to selected item 31070 this._removeClass(this.menu.find(".ui-state-active"), null, "ui-state-active"); 31071 31072 this.menuInstance.focus(null, this._getSelectedItem()); 31073 } // If there are no options, don't open the menu 31074 31075 31076 if (!this.menuItems.length) { 31077 return; 31078 } 31079 31080 this.isOpen = true; 31081 31082 this._toggleAttr(); 31083 31084 this._resizeMenu(); 31085 31086 this._position(); 31087 31088 this._on(this.document, this._documentClick); 31089 31090 this._trigger("open", event); 31091 }, 31092 _position: function _position() { 31093 this.menuWrap.position($.extend({ 31094 of: this.button 31095 }, this.options.position)); 31096 }, 31097 close: function close(event) { 31098 if (!this.isOpen) { 31099 return; 31100 } 31101 31102 this.isOpen = false; 31103 31104 this._toggleAttr(); 31105 31106 this.range = null; 31107 31108 this._off(this.document); 31109 31110 this._trigger("close", event); 31111 }, 31112 widget: function widget() { 31113 return this.button; 31114 }, 31115 menuWidget: function menuWidget() { 31116 return this.menu; 31117 }, 31118 _renderButtonItem: function _renderButtonItem(item) { 31119 var buttonItem = $("<span>"); 31120 31121 this._setText(buttonItem, item.label); 31122 31123 this._addClass(buttonItem, "ui-selectmenu-text"); 31124 31125 return buttonItem; 31126 }, 31127 _renderMenu: function _renderMenu(ul, items) { 31128 var that = this, 31129 currentOptgroup = ""; 31130 $.each(items, function (index, item) { 31131 var li; 31132 31133 if (item.optgroup !== currentOptgroup) { 31134 li = $("<li>", { 31135 text: item.optgroup 31136 }); 31137 31138 that._addClass(li, "ui-selectmenu-optgroup", "ui-menu-divider" + (item.element.parent("optgroup").prop("disabled") ? " ui-state-disabled" : "")); 31139 31140 li.appendTo(ul); 31141 currentOptgroup = item.optgroup; 31142 } 31143 31144 that._renderItemData(ul, item); 31145 }); 31146 }, 31147 _renderItemData: function _renderItemData(ul, item) { 31148 return this._renderItem(ul, item).data("ui-selectmenu-item", item); 31149 }, 31150 _renderItem: function _renderItem(ul, item) { 31151 var li = $("<li>"), 31152 wrapper = $("<div>", { 31153 title: item.element.attr("title") 31154 }); 31155 31156 if (item.disabled) { 31157 this._addClass(li, null, "ui-state-disabled"); 31158 } 31159 31160 this._setText(wrapper, item.label); 31161 31162 return li.append(wrapper).appendTo(ul); 31163 }, 31164 _setText: function _setText(element, value) { 31165 if (value) { 31166 element.text(value); 31167 } else { 31168 element.html(" "); 31169 } 31170 }, 31171 _move: function _move(direction, event) { 31172 var item, 31173 next, 31174 filter = ".ui-menu-item"; 31175 31176 if (this.isOpen) { 31177 item = this.menuItems.eq(this.focusIndex).parent("li"); 31178 } else { 31179 item = this.menuItems.eq(this.element[0].selectedIndex).parent("li"); 31180 filter += ":not(.ui-state-disabled)"; 31181 } 31182 31183 if (direction === "first" || direction === "last") { 31184 next = item[direction === "first" ? "prevAll" : "nextAll"](filter).eq(-1); 31185 } else { 31186 next = item[direction + "All"](filter).eq(0); 31187 } 31188 31189 if (next.length) { 31190 this.menuInstance.focus(event, next); 31191 } 31192 }, 31193 _getSelectedItem: function _getSelectedItem() { 31194 return this.menuItems.eq(this.element[0].selectedIndex).parent("li"); 31195 }, 31196 _toggle: function _toggle(event) { 31197 this[this.isOpen ? "close" : "open"](event); 31198 }, 31199 _setSelection: function _setSelection() { 31200 var selection; 31201 31202 if (!this.range) { 31203 return; 31204 } 31205 31206 if (window.getSelection) { 31207 selection = window.getSelection(); 31208 selection.removeAllRanges(); 31209 selection.addRange(this.range); // Support: IE8 31210 } else { 31211 this.range.select(); 31212 } // Support: IE 31213 // Setting the text selection kills the button focus in IE, but 31214 // restoring the focus doesn't kill the selection. 31215 31216 31217 this.button.focus(); 31218 }, 31219 _documentClick: { 31220 mousedown: function mousedown(event) { 31221 if (!this.isOpen) { 31222 return; 31223 } 31224 31225 if (!$(event.target).closest(".ui-selectmenu-menu, #" + $.ui.escapeSelector(this.ids.button)).length) { 31226 this.close(event); 31227 } 31228 } 31229 }, 31230 _buttonEvents: { 31231 // Prevent text selection from being reset when interacting with the selectmenu (#10144) 31232 mousedown: function mousedown() { 31233 var selection; 31234 31235 if (window.getSelection) { 31236 selection = window.getSelection(); 31237 31238 if (selection.rangeCount) { 31239 this.range = selection.getRangeAt(0); 31240 } // Support: IE8 31241 31242 } else { 31243 this.range = document.selection.createRange(); 31244 } 31245 }, 31246 click: function click(event) { 31247 this._setSelection(); 31248 31249 this._toggle(event); 31250 }, 31251 keydown: function keydown(event) { 31252 var preventDefault = true; 31253 31254 switch (event.keyCode) { 31255 case $.ui.keyCode.TAB: 31256 case $.ui.keyCode.ESCAPE: 31257 this.close(event); 31258 preventDefault = false; 31259 break; 31260 31261 case $.ui.keyCode.ENTER: 31262 if (this.isOpen) { 31263 this._selectFocusedItem(event); 31264 } 31265 31266 break; 31267 31268 case $.ui.keyCode.UP: 31269 if (event.altKey) { 31270 this._toggle(event); 31271 } else { 31272 this._move("prev", event); 31273 } 31274 31275 break; 31276 31277 case $.ui.keyCode.DOWN: 31278 if (event.altKey) { 31279 this._toggle(event); 31280 } else { 31281 this._move("next", event); 31282 } 31283 31284 break; 31285 31286 case $.ui.keyCode.SPACE: 31287 if (this.isOpen) { 31288 this._selectFocusedItem(event); 31289 } else { 31290 this._toggle(event); 31291 } 31292 31293 break; 31294 31295 case $.ui.keyCode.LEFT: 31296 this._move("prev", event); 31297 31298 break; 31299 31300 case $.ui.keyCode.RIGHT: 31301 this._move("next", event); 31302 31303 break; 31304 31305 case $.ui.keyCode.HOME: 31306 case $.ui.keyCode.PAGE_UP: 31307 this._move("first", event); 31308 31309 break; 31310 31311 case $.ui.keyCode.END: 31312 case $.ui.keyCode.PAGE_DOWN: 31313 this._move("last", event); 31314 31315 break; 31316 31317 default: 31318 this.menu.trigger(event); 31319 preventDefault = false; 31320 } 31321 31322 if (preventDefault) { 31323 event.preventDefault(); 31324 } 31325 } 31326 }, 31327 _selectFocusedItem: function _selectFocusedItem(event) { 31328 var item = this.menuItems.eq(this.focusIndex).parent("li"); 31329 31330 if (!item.hasClass("ui-state-disabled")) { 31331 this._select(item.data("ui-selectmenu-item"), event); 31332 } 31333 }, 31334 _select: function _select(item, event) { 31335 var oldIndex = this.element[0].selectedIndex; // Change native select element 31336 31337 this.element[0].selectedIndex = item.index; 31338 this.buttonItem.replaceWith(this.buttonItem = this._renderButtonItem(item)); 31339 31340 this._setAria(item); 31341 31342 this._trigger("select", event, { 31343 item: item 31344 }); 31345 31346 if (item.index !== oldIndex) { 31347 this._trigger("change", event, { 31348 item: item 31349 }); 31350 } 31351 31352 this.close(event); 31353 }, 31354 _setAria: function _setAria(item) { 31355 var id = this.menuItems.eq(item.index).attr("id"); 31356 this.button.attr({ 31357 "aria-labelledby": id, 31358 "aria-activedescendant": id 31359 }); 31360 this.menu.attr("aria-activedescendant", id); 31361 }, 31362 _setOption: function _setOption(key, value) { 31363 if (key === "icons") { 31364 var icon = this.button.find("span.ui-icon"); 31365 31366 this._removeClass(icon, null, this.options.icons.button)._addClass(icon, null, value.button); 31367 } 31368 31369 this._super(key, value); 31370 31371 if (key === "appendTo") { 31372 this.menuWrap.appendTo(this._appendTo()); 31373 } 31374 31375 if (key === "width") { 31376 this._resizeButton(); 31377 } 31378 }, 31379 _setOptionDisabled: function _setOptionDisabled(value) { 31380 this._super(value); 31381 31382 this.menuInstance.option("disabled", value); 31383 this.button.attr("aria-disabled", value); 31384 31385 this._toggleClass(this.button, null, "ui-state-disabled", value); 31386 31387 this.element.prop("disabled", value); 31388 31389 if (value) { 31390 this.button.attr("tabindex", -1); 31391 this.close(); 31392 } else { 31393 this.button.attr("tabindex", 0); 31394 } 31395 }, 31396 _appendTo: function _appendTo() { 31397 var element = this.options.appendTo; 31398 31399 if (element) { 31400 element = element.jquery || element.nodeType ? $(element) : this.document.find(element).eq(0); 31401 } 31402 31403 if (!element || !element[0]) { 31404 element = this.element.closest(".ui-front, dialog"); 31405 } 31406 31407 if (!element.length) { 31408 element = this.document[0].body; 31409 } 31410 31411 return element; 31412 }, 31413 _toggleAttr: function _toggleAttr() { 31414 this.button.attr("aria-expanded", this.isOpen); // We can't use two _toggleClass() calls here, because we need to make sure 31415 // we always remove classes first and add them second, otherwise if both classes have the 31416 // same theme class, it will be removed after we add it. 31417 31418 this._removeClass(this.button, "ui-selectmenu-button-" + (this.isOpen ? "closed" : "open"))._addClass(this.button, "ui-selectmenu-button-" + (this.isOpen ? "open" : "closed"))._toggleClass(this.menuWrap, "ui-selectmenu-open", null, this.isOpen); 31419 31420 this.menu.attr("aria-hidden", !this.isOpen); 31421 }, 31422 _resizeButton: function _resizeButton() { 31423 var width = this.options.width; // For `width: false`, just remove inline style and stop 31424 31425 if (width === false) { 31426 this.button.css("width", ""); 31427 return; 31428 } // For `width: null`, match the width of the original element 31429 31430 31431 if (width === null) { 31432 width = this.element.show().outerWidth(); 31433 this.element.hide(); 31434 } 31435 31436 this.button.outerWidth(width); 31437 }, 31438 _resizeMenu: function _resizeMenu() { 31439 this.menu.outerWidth(Math.max(this.button.outerWidth(), // Supp
31439ort: IE10 31440 // IE10 wraps long text (possibly a rounding bug) 31441 // so we add 1px to avoid the wrapping 31442 this.menu.width("").outerWidth() + 1)); 31443 }, 31444 _getCreateOptions: function _getCreateOptions() { 31445 var options = this._super(); 31446 31447 options.disabled = this.element.prop("disabled"); 31448 return options; 31449 }, 31450 _parseOptions: function _parseOptions(options) { 31451 var that = this, 31452 data = []; 31453 options.each(function (index, item) { 31454 data.push(that._parseOption($(item), index)); 31455 }); 31456 this.items = data; 31457 }, 31458 _parseOption: function _parseOption(option, index) { 31459 var optgroup = option.parent("optgroup"); 31460 return { 31461 element: option, 31462 index: index, 31463 value: option.val(), 31464 label: option.text(), 31465 optgroup: optgroup.attr("label") || "", 31466 disabled: optgroup.prop("disabled") || option.prop("disabled") 31467 }; 31468 }, 31469 _destroy: function _destroy() { 31470 this._unbindFormResetHandler(); 31471 31472 this.menuWrap.remove(); 31473 this.button.remove(); 31474 this.element.show(); 31475 this.element.removeUniqueId(); 31476 this.labels.attr("for", this.ids.element); 31477 } 31478 }]); 31479}); 31480 31481/***/ })
31481, 31482 31483/***/ 0: 31484/*!************************************!*\ 31485 !*** multi ./src/assets/js/app.js ***! 31486 \************************************/ 31487/*! no static exports found */ 31488/***/ (function(module, exports, __webpack_require__) { 31489 31490module.exports = __webpack_require__(/*! /Users/jay/code/utpb-frontend/src/assets/js/app.js */"./src/assets/js/app.js"); 31491 31492 31493/***/ }) 31494 31495/******/ }); 31496//# sourceMappingURL=app.js.map 31497 31498$(document).ready(function() { 31499 $(".sticky-nav>.sticky-nav-button>button").on("click", function() { 31500 $(".sticky-nav").toggleClass("opened") 31501 }); 31502 if($(".content-module--slideshow").length){ 31503 $(".content-module--slideshow .orbit-controls").css("top",$(".content-module--slideshow .orbit-image").height()); 31504 $(".content-module--slideshow.darkcaption .orbit-controls").css("top",$(".content-module--slideshow .orbit-image").height()-75); 31505 } 31506 $(window).on('resize', function(){ 31507 if($(".content-module--slideshow").length){ 31508 $(".content-module--slideshow .orbit-controls").css("top",$(".content-module--slideshow .orbit-image").height()); 31509 $(".content-module--slideshow.darkcaption .orbit-controls").css("top",$(".content-module--slideshow .orbit-image").height()-75); 31510 } 31511 }); 31512 31513 if($(".video-carousel").length) { 31514 $(".video-carousel .orbit-container").each(function() { 31515 $(this).removeAttr("tabindex"); 31516 }) 31517 $(".video-carousel .orbit-controls button").click(function() { 31518 let wrapper = $(this).closest(".orbit-wrapper"); 31519 let activeSlide = wrapper.find(".orbit-slide.is-active"); 31520 let slideCount = wrapper.find(".slide-count"); 31521 slideCount.text(`Showing ${activeSlide.attr("aria-label")}`); 31522 }); 31523 $(".video-carousel .video-play").click(function() { 31524 let videoModal = document.getElementById("video-modal"); 31525 videoModal.showModal(); 31526 let videoId = $(this).data("id"); 31527 let aspectRatio = $(this).data("ratio"); 31528 let title = $(this).attr("aria-label").replace("Play", "YouTube Video:"); 31529 let iframe = $(`<iframe/>`) 31530 .addClass(aspectRatio) 31531 .attr("src", `https://www.youtube-nocookie.com/embed/${videoId}`) 31532 .attr("title", title) 31533 .attr("allow", "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share") 31534 .attr("referrerpolicy", "strict-origin-when-cross-origin") 31535 .attr("allowfullscreen", "allowfullscreen"); 31536 $(videoModal).append(iframe); 31537 videoModal.addEventListener("close", () => { 31538 videoModal.querySelector("iframe").remove(); 31539 }) 31540 $(iframe).on("keypress", function(e) { 31541 if(e.key === "Escape" && videoModal.open) { 31542 e.preventDefault(); 31543 videoModal.close(); 31544 } 31545 }); 31546 }); 31547 } 31548}); 31549 31550$(document).ready(function() { 31551 const popup = document.getElementById("page-popup"); 31552 if (popup) { 31553 popup.showModal(); 31554 } 31555});
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.