1/*! 2 * Bootstrap v4.0.0-beta.2 (https://getbootstrap.com) 3 * Copyright 2011-2017 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) 4 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 */ 6var bootstrap = (function (exports,$,Popper) { 7'use strict'; 8 9$ = $ && $.hasOwnProperty('default') ? $['default'] : $; 10Popper = Popper && Popper.hasOwnProperty('default') ? Popper['default'] : Popper; 11 12/** 13 * -------------------------------------------------------------------------- 14 * Bootstrap (v4.0.0-beta.2): util.js 15 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 16 * -------------------------------------------------------------------------- 17 */ 18 19var Util = function () { 20 /** 21 * ------------------------------------------------------------------------ 22 * Private TransitionEnd Helpers 23 * ------------------------------------------------------------------------ 24 */ 25 var transition = false; 26 var MAX_UID = 1000000; 27 var TransitionEndEvent = { 28 WebkitTransition: 'webkitTransitionEnd', 29 MozTransition: 'transitionend', 30 OTransition: 'oTransitionEnd otransitionend', 31 transition: 'transitionend' // shoutout AngusCroll (https://goo.gl/pxwQGp) 32 33 }; 34 35 function toType(obj) { 36 return {}.toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase(); 37 } 38 39 function getSpecialTransitionEndEvent() { 40 return { 41 bindType: transition.end, 42 delegateType: transition.end, 43 handle: function handle(event) { 44 if ($(event.target).is(this)) { 45 return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params 46 } 47 48 return undefined; // eslint-disable-line no-undefined 49 } 50 }; 51 } 52 53 function transitionEndTest() { 54 if (window.QUnit) { 55 return false; 56 } 57 58 var el = document.createElement('bootstrap'); 59 60 for (var name in TransitionEndEvent) { 61 if (typeof el.style[name] !== 'undefined') { 62 return { 63 end: TransitionEndEvent[name] 64 }; 65 } 66 } 67 68 return false; 69 } 70 71 function transitionEndEmulator(duration) { 72 var _this = this; 73 74 var called = false; 75 $(this).one(Util.TRANSITION_END, function () { 76 called = true; 77 }); 78 setTimeout(function () { 79 if (!called) { 80 Util.triggerTransitionEnd(_this); 81 } 82 }, duration); 83 return this; 84 } 85 86 function setTransitionEndSupport() { 87 transition = transitionEndTest(); 88 $.fn.emulateTransitionEnd = transitionEndEmulator; 89 90 if (Util.supportsTransitionEnd()) { 91 $.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent(); 92 } 93 } 94 /** 95 * -------------------------------------------------------------------------- 96 * Public Util Api 97 * -------------------------------------------------------------------------- 98 */ 99 100 101 var Util = { 102 TRANSITION_END: 'bsTransitionEnd', 103 getUID: function getUID(prefix) { 104 do { 105 // eslint-disable-next-line no-bitwise 106 prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here 107 } while (document.getElementById(prefix)); 108 109 return prefix; 110 }, 111 getSelectorFromElement: function getSelectorFromElement(element) { 112 var selector = element.getAttribute('data-target'); 113 114 if (!selector || selector === '#') { 115 selector = element.getAttribute('href') || ''; 116 } 117 118 try { 119 var $selector = $(document).find(selector); 120 return $selector.length > 0 ? selector : null; 121 } catch (error) { 122 return null; 123 } 124 }, 125 reflow: function reflow(element) { 126 return element.offsetHeight; 127 }, 128 triggerTransitionEnd: function triggerTransitionEnd(element) { 129 $(element).trigger(transition.end); 130 }, 131 supportsTransitionEnd: function supportsTransitionEnd() { 132 return Boolean(transition); 133 }, 134 isElement: function isElement(obj) { 135 return (obj[0] || obj).nodeType; 136 }, 137 typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) { 138 for (var property in configTypes) { 139 if (Object.prototype.hasOwnProperty.call(configTypes, property)) { 140 var expectedTypes = configTypes[property]; 141 var value = config[property]; 142 var valueType = value && Util.isElement(value) ? 'element' : toType(value); 143 144 if (!new RegExp(expectedTypes).test(valueType)) { 145 throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\".")); 146 } 147 } 148 } 149 } 150 }; 151 setTransitionEndSupport(); 152 return Util; 153}($); 154 155function _defineProperties(target, props) { 156 for (var i = 0; i < props.length; i++) { 157 var descriptor = props[i]; 158 descriptor.enumerable = descriptor.enumerable || false; 159 descriptor.configurable = true; 160 if ("value" in descriptor) descriptor.writable = true; 161 Object.defineProperty(target, descriptor.key, descriptor); 162 } 163} 164 165function _createClass(Constructor, protoProps, staticProps) { 166 if (protoProps) _defineProperties(Constructor.prototype, protoProps); 167 if (staticProps) _defineProperties(Constructor, staticProps); 168 return Constructor; 169} 170 171var createClass = _createClass; 172 173function _inheritsLoose(subClass, superClass) { 174 subClass.prototype = Object.create(superClass.prototype); 175 subClass.prototype.constructor = subClass; 176 subClass.__proto__ = superClass; 177} 178 179var inheritsLoose = _inheritsLoose; 180 181/** 182 * -------------------------------------------------------------------------- 183 * Bootstrap (v4.0.0-beta.2): alert.js 184 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 185 * -------------------------------------------------------------------------- 186 */ 187 188var Alert = function () { 189 /** 190 * ------------------------------------------------------------------------ 191 * Constants 192 * ------------------------------------------------------------------------ 193 */ 194 var NAME = 'alert'; 195 var VERSION = '4.0.0-beta.2'; 196 var DATA_KEY = 'bs.alert'; 197 var EVENT_KEY = "." + DATA_KEY; 198 var DATA_API_KEY = '.data-api'; 199 var JQUERY_NO_CONFLICT = $.fn[NAME]; 200 var TRANSITION_DURATION = 150; 201 var Selector = { 202 DISMISS: '[data-dismiss="alert"]' 203 }; 204 var Event = { 205 CLOSE: "close" + EVENT_KEY, 206 CLOSED: "closed" + EVENT_KEY, 207 CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY 208 }; 209 var ClassName = { 210 ALERT: 'alert', 211 FADE: 'fade', 212 SHOW: 'show' 213 /** 214 * ------------------------------------------------------------------------ 215 * Class Definition 216 * ------------------------------------------------------------------------ 217 */ 218 219 }; 220 221 var Alert = 222 /*#__PURE__*/ 223 function () { 224 function Alert(element) { 225 this._element = element; 226 } // getters 227 228 229 var _proto = Alert.prototype; 230 231 // public 232 _proto.close = function close(element) { 233 element = element || this._element; 234 235 var rootElement = this._getRootElement(element); 236 237 var customEvent = this._triggerCloseEvent(rootElement); 238 239 if (customEvent.isDefaultPrevented()) { 240 return; 241 } 242 243 this._removeElement(rootElement); 244 }; 245 246 _proto.dispose = function dispose() { 247 $.removeData(this._element, DATA_KEY); 248 this._element = null; 249 }; // private 250 251 252 _proto._getRootElement = function _getRootElement(element) { 253 var selector = Util.getSelectorFromElement(element); 254 var parent = false; 255 256 if (selector) { 257 parent = $(selector)[0]; 258 } 259 260 if (!parent) { 261 parent = $(element).closest("." + ClassName.ALERT)[0]; 262 } 263 264 return parent; 265 }; 266 267 _proto._triggerCloseEvent = function _triggerCloseEvent(element) { 268 var closeEvent = $.Event(Event.CLOSE); 269 $(element).trigger(closeEvent); 270 return closeEvent; 271 }; 272 273 _proto._removeElement = function _removeElement(element) { 274 var _this = this; 275 276 $(element).removeClass(ClassName.SHOW); 277 278 if (!Util.supportsTransitionEnd() || !$(element).hasClass(ClassName.FADE)) { 279 this._destroyElement(element); 280 281 return; 282 } 283 284 $(element).one(Util.TRANSITION_END, function (event) { 285 return _this._destroyElement(element, event); 286 }).emulateTransitionEnd(TRANSITION_DURATION); 287 }; 288 289 _proto._destroyElement = function _destroyElement(element) { 290 $(element).detach().trigger(Event.CLOSED).remove(); 291 }; // static 292 293 294 Alert._jQueryInterface = function _jQueryInterface(config) { 295 return this.each(function () { 296 var $element = $(this); 297 var data = $element.data(DATA_KEY); 298 299 if (!data) { 300 data = new Alert(this); 301 $element.data(DATA_KEY, data); 302 } 303 304 if (config === 'close') { 305 data[config](this); 306 } 307 }); 308 }; 309 310 Alert._handleDismiss = function _handleDismiss(alertInstance) { 311 return function (event) { 312 if (event) { 313 event.preventDefault(); 314 } 315 316 alertInstance.close(this); 317 }; 318 }; 319 320 createClass(Alert, null, [{ 321 key: "VERSION", 322 get: function get() { 323 return VERSION; 324 } 325 }]); 326 return Alert; 327 }(); 328 /** 329 * ------------------------------------------------------------------------ 330 * Data Api implementation 331 * ------------------------------------------------------------------------ 332 */ 333 334 335 $(document).on(Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert())); 336 /** 337 * ------------------------------------------------------------------------ 338 * jQuery 339 * ------------------------------------------------------------------------ 340 */ 341 342 $.fn[NAME] = Alert._jQueryInterface; 343 $.fn[NAME].Constructor = Alert; 344 345 $.fn[NAME].noConflict = function () { 346 $.fn[NAME] = JQUERY_NO_CONFLICT; 347 return Alert._jQueryInterface; 348 }; 349 350 return Alert; 351}($); 352 353/** 354 * -------------------------------------------------------------------------- 355 * Bootstrap (v4.0.0-beta.2): button.js 356 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 357 * -------------------------------------------------------------------------- 358 */ 359 360var Button = function () { 361 /** 362 * ------------------------------------------------------------------------ 363 * Constants 364 * ------------------------------------------------------------------------ 365 */ 366 var NAME = 'button'; 367 var VERSION = '4.0.0-beta.2'; 368 var DATA_KEY = 'bs.button'; 369 var EVENT_KEY = "." + DATA_KEY; 370 var DATA_API_KEY = '.data-api'; 371 var JQUERY_NO_CONFLICT = $.fn[NAME]; 372 var ClassName = { 373 ACTIVE: 'active', 374 BUTTON: 'btn', 375 FOCUS: 'focus' 376 }; 377 var Selector = { 378 DATA_TOGGLE_CARROT: '[data-toggle^="button"]', 379 DATA_TOGGLE: '[data-toggle="buttons"]', 380 INPUT: 'input', 381 ACTIVE: '.active', 382 BUTTON: '.btn' 383 }; 384 var Event = { 385 CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY, 386 FOCUS_BLUR_DATA_API: "focus" + EVENT_KEY + DATA_API_KEY + " " + ("blur" + EVENT_KEY + DATA_API_KEY) 387 /** 388 * ------------------------------------------------------------------------ 389 * Class Definition 390 * ------------------------------------------------------------------------ 391 */ 392 393 }; 394 395 var Button = 396 /*#__PURE__*/ 397 function () { 398 function Button(element) { 399 this._element = element; 400 } // getters 401 402 403 var _proto = Button.prototype; 404 405 // public
vendor: 5,503 bytes, lines 406-587
406 _proto.toggle = function toggle() { 407 var triggerChangeEvent = true; 408 var addAriaPressed = true; 409 var rootElement = $(this._element).closest(Selector.DATA_TOGGLE)[0]; 410 411 if (rootElement) { 412 var input = $(this._element).find(Selector.INPUT)[0]; 413 414 if (input) { 415 if (input.type === 'radio') { 416 if (input.checked && $(this._element).hasClass(ClassName.ACTIVE)) { 417 triggerChangeEvent = false; 418 } else { 419 var activeElement = $(rootElement).find(Selector.ACTIVE)[0]; 420 421 if (activeElement) { 422 $(activeElement).removeClass(ClassName.ACTIVE); 423 } 424 } 425 } 426 427 if (triggerChangeEvent) { 428 if (input.hasAttribute('disabled') || rootElement.hasAttribute('disabled') || input.classList.contains('disabled') || rootElement.classList.contains('disabled')) { 429 return; 430 } 431 432 input.checked = !$(this._element).hasClass(ClassName.ACTIVE); 433 $(input).trigger('change'); 434 } 435 436 input.focus(); 437 addAriaPressed = false; 438 } 439 } 440 441 if (addAriaPressed) { 442 this._element.setAttribute('aria-pressed', !$(this._element).hasClass(ClassName.ACTIVE)); 443 } 444 445 if (triggerChangeEvent) { 446 $(this._element).toggleClass(ClassName.ACTIVE); 447 } 448 }; 449 450 _proto.dispose = function dispose() { 451 $.removeData(this._element, DATA_KEY); 452 this._element = null; 453 }; // static 454 455 456 Button._jQueryInterface = function _jQueryInterface(config) { 457 return this.each(function () { 458 var data = $(this).data(DATA_KEY); 459 460 if (!data) { 461 data = new Button(this); 462 $(this).data(DATA_KEY, data); 463 } 464 465 if (config === 'toggle') { 466 data[config](); 467 } 468 }); 469 }; 470 471 createClass(Button, null, [{ 472 key: "VERSION", 473 get: function get() { 474 return VERSION; 475 } 476 }]); 477 return Button; 478 }(); 479 /** 480 * ------------------------------------------------------------------------ 481 * Data Api implementation 482 * ------------------------------------------------------------------------ 483 */ 484 485 486 $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) { 487 event.preventDefault(); 488 var button = event.target; 489 490 if (!$(button).hasClass(ClassName.BUTTON)) { 491 button = $(button).closest(Selector.BUTTON); 492 } 493 494 Button._jQueryInterface.call($(button), 'toggle'); 495 }).on(Event.FOCUS_BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) { 496 var button = $(event.target).closest(Selector.BUTTON)[0]; 497 $(button).toggleClass(ClassName.FOCUS, /^focus(in)?$/.test(event.type)); 498 }); 499 /** 500 * ------------------------------------------------------------------------ 501 * jQuery 502 * ------------------------------------------------------------------------ 503 */ 504 505 $.fn[NAME] = Button._jQueryInterface; 506 $.fn[NAME].Constructor = Button; 507 508 $.fn[NAME].noConflict = function () { 509 $.fn[NAME] = JQUERY_NO_CONFLICT; 510 return Button._jQueryInterface; 511 }; 512 513 return Button; 514}($); 515 516/** 517 * -------------------------------------------------------------------------- 518 * Bootstrap (v4.0.0-beta.2): carousel.js 519 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 520 * -------------------------------------------------------------------------- 521 */ 522 523var Carousel = function () { 524 /** 525 * ------------------------------------------------------------------------ 526 * Constants 527 * ------------------------------------------------------------------------ 528 */ 529 var NAME = 'carousel'; 530 var VERSION = '4.0.0-beta.2'; 531 var DATA_KEY = 'bs.carousel'; 532 var EVENT_KEY = "." + DATA_KEY; 533 var DATA_API_KEY = '.data-api'; 534 var JQUERY_NO_CONFLICT = $.fn[NAME]; 535 var TRANSITION_DURATION = 600; 536 var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key 537 538 var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key 539 540 var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch 541 542 var Default = { 543 interval: 5000, 544 keyboard: true, 545 slide: false, 546 pause: 'hover', 547 wrap: true 548 }; 549 var DefaultType = { 550 interval: '(number|boolean)', 551 keyboard: 'boolean', 552 slide: '(boolean|string)', 553 pause: '(string|boolean)', 554 wrap: 'boolean' 555 }; 556 var Direction = { 557 NEXT: 'next', 558 PREV: 'prev', 559 LEFT: 'left', 560 RIGHT: 'right' 561 }; 562 var Event = { 563 SLIDE: "slide" + EVENT_KEY, 564 SLID: "slid" + EVENT_KEY, 565 KEYDOWN: "keydown" + EVENT_KEY, 566 MOUSEENTER: "mouseenter" + EVENT_KEY, 567 MOUSELEAVE: "mouseleave" + EVENT_KEY, 568 TOUCHEND: "touchend" + EVENT_KEY, 569 LOAD_DATA_API: "load" + EVENT_KEY + DATA_API_KEY, 570 CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY 571 }; 572 var ClassName = { 573 CAROUSEL: 'carousel', 574 ACTIVE: 'active', 575 SLIDE: 'slide', 576 RIGHT: 'carousel-item-right', 577 LEFT: 'carousel-item-left', 578 NEXT: 'carousel-item-next', 579 PREV: 'carousel-item-prev', 580 ITEM: 'carousel-item' 581 }; 582 var Selector = { 583 ACTIVE: '.active', 584 ACTIVE_ITEM: '.active.carousel-item', 585 ITEM: '.carousel-item', 586 NEXT_PREV: '.carousel-item-next, .carousel-item-prev', 587 INDICATORS: '.carousel-indicators',
588 DATA_SLIDE: '[data-slide], [data-slide-to]', 589 DATA_RIDE: '[data-ride="carousel"]' 590 /** 591 * ------------------------------------------------------------------------ 592 * Class Definition 593 * ------------------------------------------------------------------------ 594 */ 595 596 }; 597 598 var Carousel = 599 /*#__PURE__*/ 600 function () { 601 function Carousel(element, config) { 602 this._items = null; 603 this._interval = null; 604 this._activeElement = null; 605 this._isPaused = false; 606 this._isSliding = false; 607 this.touchTimeout = null; 608 this._config = this._getConfig(config); 609 this._element = $(element)[0]; 610 this._indicatorsElement = $(this._element).find(Selector.INDICATORS)[0]; 611 612 this._addEventListeners(); 613 } // getters 614 615 616 var _proto = Carousel.prototype; 617 618 // public 619 _proto.next = function next() { 620 if (!this._isSliding) { 621 this._slide(Direction.NEXT); 622 } 623 }; 624 625 _proto.nextWhenVisible = function nextWhenVisible() { 626 // Don't call next when the page isn't visible 627 // or the carousel or its parent isn't visible 628 if (!document.hidden && $(this._element).is(':visible') && $(this._element).css('visibility') !== 'hidden') { 629 this.next(); 630 } 631 }; 632 633 _proto.prev = function prev() { 634 if (!this._isSliding) { 635 this._slide(Direction.PREV); 636 } 637 }; 638 639 _proto.pause = function pause(event) { 640 if (!event) { 641 this._isPaused = true; 642 } 643 644 if ($(this._element).find(Selector.NEXT_PREV)[0] && Util.supportsTransitionEnd()) { 645 Util.triggerTransitionEnd(this._element); 646 this.cycle(true); 647 } 648 649 clearInterval(this._interval); 650 this._interval = null; 651 }; 652 653 _proto.cycle = function cycle(event) { 654 if (!event) { 655 this._isPaused = false; 656 } 657 658 if (this._interval) { 659 clearInterval(this._interval); 660 this._interval = null; 661 } 662 663 if (this._config.interval && !this._isPaused) { 664 this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval); 665 } 666 }; 667 668 _proto.to = function to(index) { 669 var _this = this; 670 671 this._activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0]; 672 673 var activeIndex = this._getItemIndex(this._activeElement); 674 675 if (index > this._items.length - 1 || index < 0) { 676 return; 677 } 678 679 if (this._isSliding) { 680 $(this._element).one(Event.SLID, function () { 681 return _this.to(index); 682 }); 683 return; 684 } 685 686 if (activeIndex === index) { 687 this.pause(); 688 this.cycle(); 689 return; 690 } 691 692 var direction = index > activeIndex ? Direction.NEXT : Direction.PREV; 693 694 this._slide(direction, this._items[index]); 695 }; 696 697 _proto.dispose = function dispose() { 698 $(this._element).off(EVENT_KEY); 699 $.removeData(this._element, DATA_KEY); 700 this._items = null; 701 this._config = null; 702 this._element = null; 703 this._interval = null; 704 this._isPaused = null; 705 this._isSliding = null; 706 this._activeElement = null; 707 this._indicatorsElement = null; 708 }; // private 709 710 711 _proto._getConfig = function _getConfig(config) { 712 config = $.extend({}, Default, config); 713 Util.typeCheckConfig(NAME, config, DefaultType); 714 return config; 715 }; 716 717 _proto._addEventListeners = function _addEventListeners() { 718 var _this2 = this; 719 720 if (this._config.keyboard) { 721 $(this._element).on(Event.KEYDOWN, function (event) { 722 return _this2._keydown(event); 723 }); 724 } 725 726 if (this._config.pause === 'hover') { 727 $(this._element).on(Event.MOUSEENTER, function (event) { 728 return _this2.pause(event); 729 }).on(Event.MOUSELEAVE, function (event) { 730 return _this2.cycle(event); 731 }); 732 733 if ('ontouchstart' in document.documentElement) {
734 // if it's a touch-enabled device, mouseenter/leave are fired as 735 // part of the mouse compatibility events on first tap - the carousel 736 // would stop cycling until user tapped out of it; 737 // here, we listen for touchend, explicitly pause the carousel 738 // (as if it's the second time we tap on it, mouseenter compat event 739 // is NOT fired) and after a timeout (to allow for mouse compatibility 740 // events to fire) we explicitly restart cycling 741 $(this._element).on(Event.TOUCHEND, function () { 742 _this2.pause(); 743 744 if (_this2.touchTimeout) { 745 clearTimeout(_this2.touchTimeout); 746 } 747 748 _this2.touchTimeout = setTimeout(function (event) { 749 return _this2.cycle(event); 750 }, TOUCHEVENT_COMPAT_WAIT + _this2._config.interval); 751 }); 752 } 753 } 754 }; 755 756 _proto._keydown = function _keydown(event) { 757 if (/input|textarea/i.test(event.target.tagName)) { 758 return; 759 } 760 761 switch (event.which) { 762 case ARROW_LEFT_KEYCODE: 763 event.preventDefault(); 764 this.prev(); 765 break; 766 767 case ARROW_RIGHT_KEYCODE: 768 event.preventDefault(); 769 this.next(); 770 break; 771 772 default: 773 return; 774 } 775 }; 776 777 _proto._getItemIndex = function _getItemIndex(element) { 778 this._items = $.makeArray($(element).parent().find(Selector.ITEM)); 779 return this._items.indexOf(element); 780 }; 781 782 _proto._getItemByDirection = function _getItemByDirection(direction, activeElement) { 783 var isNextDirection = direction === Direction.NEXT; 784 var isPrevDirection = direction === Direction.PREV; 785 786 var activeIndex = this._getItemIndex(activeElement); 787 788 var lastItemIndex = this._items.length - 1; 789 var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex; 790 791 if (isGoingToWrap && !this._config.wrap) { 792 return activeElement; 793 } 794 795 var delta = direction === Direction.PREV ? -1 : 1; 796 var itemIndex = (activeIndex + delta) % this._items.length; 797 return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex]; 798 }; 799 800 _proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) { 801 var targetIndex = this._getItemIndex(relatedTarget); 802 803 var fromIndex = this._getItemIndex($(this._element).find(Selector.ACTIVE_ITEM)[0]); 804 805 var slideEvent = $.Event(Event.SLIDE, { 806 relatedTarget: relatedTarget, 807 direction: eventDirectionName, 808 from: fromIndex, 809 to: targetIndex 810 }); 811 $(this._element).trigger(slideEvent); 812 return slideEvent; 813 }; 814 815 _proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) { 816 if (this._indicatorsElement) { 817 $(this._indicatorsElement).find(Selector.ACTIVE).removeClass(ClassName.ACTIVE); 818 819 var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)]; 820 821 if (nextIndicator) { 822 $(nextIndicator).addClass(ClassName.ACTIVE); 823 } 824 } 825 }; 826 827 _proto._slide = function _slide(direction, element) { 828 var _this3 = this; 829 830 var activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0]; 831 832 var activeElementIndex = this._getItemIndex(activeElement); 833 834 var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement); 835 836 var nextElementIndex = this._getItemIndex(nextElement); 837 838 var isCycling = Boolean(this._interval); 839 var directionalClassName; 840 var orderClassName; 841 var eventDirectionName; 842 843 if (direction === Direction.NEXT) { 844 directionalClassName = ClassName.LEFT; 845 orderClassName = ClassName.NEXT; 846 eventDirectionName = Direction.LEFT; 847 } else { 848 directionalClassName = ClassName.RIGHT; 849 orderClassName = ClassName.PREV; 850 eventDirectionName = Direction.RIGHT; 851 } 852 853 if (nextElement && $(nextElement).hasClass(ClassName.ACTIVE)) { 854 this._isSliding = false; 855 return; 856 } 857 858 var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName); 859 860 if (slideEvent.isDefaultPrevented()) { 861 return; 862 } 863 864 if (!activeElement || !nextElement) { 865 // some weirdness is happening, so we bail 866 return; 867 } 868 869 this._isSliding = true; 870 871 if (isCycling) { 872 this.pause(); 873 } 874 875 this._setActiveIndicatorElement(nextElement); 876 877 var slidEvent = $.Event(Event.SLID, { 878 relatedTarget: nextElement, 879 direction: eventDirectionName, 880 from: activeElementIndex, 881 to: nextElementIndex 882 }); 883 884 if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.SLIDE)) { 885 $(nextElement).addClass(orderClassName); 886 Util.reflow(nextElement); 887 $(activeElement).addClass(directionalClassName); 888 $(nextElement).addClass(directionalClassName); 889 $(activeElement).one(Util.TRANSITION_END, function () { 890 $(nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(ClassName.ACTIVE); 891 $(activeElement).removeClass(ClassName.ACTIVE + " " + orderClassName + " " + directionalClassName); 892 _this3._isSliding = false; 893 setTimeout(function () { 894 return $(_this3._element).trigger(slidEvent); 895 }, 0); 896 }).emulateTransitionEnd(TRANSITION_DURATION); 897 } else { 898 $(activeElement).removeClass(ClassName.ACTIVE); 899 $(nextElement).addClass(ClassName.ACTIVE); 900 this._isSliding = false; 901 $(this._element).trigger(slidEvent); 902 } 903 904 if (isCycling) { 905 this.cycle(); 906 } 907 }; // static 908 909 910 Carousel._jQueryInterface = function _jQueryInterface(config) { 911 return this.each(function () { 912 var data = $(this).data(DATA_KEY); 913 914 var _config = $.extend({}, Default, $(this).data()); 915 916 if (typeof config === 'object') { 917 $.extend(_config, config); 918 } 919 920 var action = typeof config === 'string' ? config : _config.slide; 921 922 if (!data) { 923 data = new Carousel(this, _config); 924 $(this).data(DATA_KEY, data); 925 } 926 927 if (typeof config === 'number') { 928 data.to(config); 929 } else if (typeof action === 'string') { 930 if (typeof data[action] === 'undefined') {
931 throw new Error("No method named \"" + action + "\""); 932 } 933 934 data[action](); 935 } else if (_config.interval) { 936 data.pause(); 937 data.cycle(); 938 } 939 }); 940 }; 941 942 Carousel._dataApiClickHandler = function _dataApiClickHandler(event) { 943 var selector = Util.getSelectorFromElement(this); 944 945 if (!selector) { 946 return; 947 } 948 949 var target = $(selector)[0]; 950 951 if (!target || !$(target).hasClass(ClassName.CAROUSEL)) { 952 return; 953 } 954 955 var config = $.extend({}, $(target).data(), $(this).data()); 956 var slideIndex = this.getAttribute('data-slide-to'); 957 958 if (slideIndex) { 959 config.interval = false; 960 } 961 962 Carousel._jQueryInterface.call($(target), config); 963 964 if (slideIndex) { 965 $(target).data(DATA_KEY).to(slideIndex); 966 } 967 968 event.preventDefault(); 969 }; 970 971 createClass(Carousel, null, [{ 972 key: "VERSION", 973 get: function get() { 974 return VERSION; 975 } 976 }, { 977 key: "Default", 978 get: function get() { 979 return Default; 980 } 981 }]); 982 return Carousel; 983 }(); 984 /** 985 * ------------------------------------------------------------------------ 986 * Data Api implementation 987 * ------------------------------------------------------------------------ 988 */ 989 990 991 $(document).on(Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler); 992 $(window).on(Event.LOAD_DATA_API, function () { 993 $(Selector.DATA_RIDE).each(function () { 994 var $carousel = $(this); 995 996 Carousel._jQueryInterface.call($carousel, $carousel.data()); 997 }); 998 }); 999 /** 1000 * ------------------------------------------------------------------------ 1001 * jQuery 1002 * ------------------------------------------------------------------------ 1003 */ 1004 1005 $.fn[NAME] = Carousel._jQueryInterface; 1006 $.fn[NAME].Constructor = Carousel; 1007 1008 $.fn[NAME].noConflict = function () { 1009 $.fn[NAME] = JQUERY_NO_CONFLICT; 1010 return Carousel._jQueryInterface; 1011 }; 1012 1013 return Carousel; 1014}($); 1015 1016/** 1017 * -------------------------------------------------------------------------- 1018 * Bootstrap (v4.0.0-beta.2): collapse.js 1019 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 1020 * -------------------------------------------------------------------------- 1021 */ 1022 1023var Collapse = function () { 1024 /** 1025 * ------------------------------------------------------------------------ 1026 * Constants 1027 * ------------------------------------------------------------------------ 1028 */ 1029 var NAME = 'collapse'; 1030 var VERSION = '4.0.0-beta.2'; 1031 var DATA_KEY = 'bs.collapse'; 1032 var EVENT_KEY = "." + DATA_KEY; 1033 var DATA_API_KEY = '.data-api'; 1034 var JQUERY_NO_CONFLICT = $.fn[NAME]; 1035 var TRANSITION_DURATION = 600; 1036 var Default = { 1037 toggle: true, 1038 parent: '' 1039 }; 1040 var DefaultType = { 1041 toggle: 'boolean', 1042 parent: '(string|element)' 1043 }; 1044 var Event = { 1045 SHOW: "show" + EVENT_KEY, 1046 SHOWN: "shown" + EVENT_KEY, 1047 HIDE: "hide" + EVENT_KEY, 1048 HIDDEN: "hidden" + EVENT_KEY, 1049 CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY 1050 }; 1051 var ClassName = { 1052 SHOW: 'show', 1053 COLLAPSE: 'collapse', 1054 COLLAPSING: 'collapsing', 1055 COLLAPSED: 'collapsed' 1056 }; 1057 var Dimension = { 1058 WIDTH: 'width', 1059 HEIGHT: 'height' 1060 }; 1061 var Selector = { 1062 ACTIVES: '.show, .collapsing', 1063 DATA_TOGGLE: '[data-toggle="collapse"]' 1064 /** 1065 * ------------------------------------------------------------------------ 1066 * Class Definition 1067 * ------------------------------------------------------------------------ 1068 */ 1069 1070 }; 1071 1072 var Collapse = 1073 /*#__PURE__*/ 1074 function () { 1075 function Collapse(element, config) { 1076 this._isTransitioning = false; 1077 this._element = element; 1078 this._config = this._getConfig(config); 1079 this._triggerArray = $.makeArray($("[data-toggle=\"collapse\"][href=\"#" + element.id + "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element.i
1079d + "\"]"))); 1080 var tabToggles = $(Selector.DATA_TOGGLE); 1081 1082 for (var i = 0; i < tabToggles.length; i++) { 1083 var elem = tabToggles[i]; 1084 var selector = Util.getSelectorFromElement(elem); 1085 1086 if (selector !== null && $(selector).filter(element).length > 0) { 1087 this._triggerArray.push(elem); 1088 } 1089 } 1090 1091 this._parent = this._config.parent ? this._getParent() : null; 1092 1093 if (!this._config.parent) { 1094 this._addAriaAndCollapsedClass(this._element, this._triggerArray); 1095 } 1096 1097 if (this._config.toggle) { 1098 this.toggle(); 1099 } 1100 } // getters 1101 1102 1103 var _proto = Collapse.prototype; 1104 1105 // public 1106 _proto.toggle = function toggle() { 1107 if ($(this._element).hasClass(ClassName.SHOW)) { 1108 this.hide(); 1109 } else { 1110 this.show(); 1111 } 1112 }; 1113 1114 _proto.show = function show() { 1115 var _this = this; 1116 1117 if (this._isTransitioning || $(this._element).hasClass(ClassName.SHOW)) { 1118 return; 1119 } 1120 1121 var actives; 1122 var activesData; 1123 1124 if (this._parent) { 1125 actives = $.makeArray($(this._parent).children().children(Selector.ACTIVES)); 1126 1127 if (!actives.length) { 1128 actives = null; 1129 } 1130 } 1131 1132 if (actives) { 1133 activesData = $(actives).data(DATA_KEY); 1134 1135 if (activesData && activesData._isTransitioning) { 1136 return; 1137 } 1138 } 1139 1140 var startEvent = $.Event(Event.SHOW); 1141 $(this._element).trigger(startEvent); 1142 1143 if (startEvent.isDefaultPrevented()) { 1144 return; 1145 } 1146 1147 if (actives) { 1148 Collapse._jQueryInterface.call($(actives), 'hide'); 1149 1150 if (!activesData) { 1151 $(actives).data(DATA_KEY, null); 1152 } 1153 } 1154 1155 var dimension = this._getDimension(); 1156 1157 $(this._element).removeClass(ClassName.COLLAPSE).addClass(ClassName.COLLAPSING); 1158 this._element.style[dimension] = 0; 1159 1160 if (this._triggerArray.length) { 1161 $(this._triggerArray).removeClass(ClassName.COLLAPSED).attr('aria-expanded', true); 1162 } 1163 1164 this.setTransitioning(true); 1165 1166 var complete = function complete() { 1167 $(_this._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.SHOW); 1168 _this._element.style[dimension] = ''; 1169 1170 _this.setTransitioning(false); 1171 1172 $(_this._element).trigger(Event.SHOWN); 1173 }; 1174 1175 if (!Util.supportsTransitionEnd()) { 1176 complete(); 1177 return; 1178 } 1179 1180 var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1); 1181 var scrollSize = "scroll" + capitalizedDimension; 1182 $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION); 1183 this._element.style[dimension] = this._element[scrollSize] + "px"; 1184 }; 1185 1186 _proto.hide = function hide() { 1187 var _this2 = this; 1188 1189 if (this._isTransitioning || !$(this._element).hasClass(ClassName.SHOW)) { 1190 return; 1191 } 1192 1193 var startEvent = $.Event(Event.HIDE); 1194 $(this._element).trigger(startEvent); 1195 1196 if (startEvent.isDefaultPrevented()) { 1197 return; 1198 } 1199 1200 var dimension = this._getDimension(); 1201 1202 this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px"; 1203 Util.reflow(this._element); 1204 $(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.SHOW); 1205 1206 if (this._triggerArray.length) { 1207 for (var i = 0; i < this._triggerArray.length; i++) { 1208 var trigger = this._triggerArray[i]; 1209 var selector = Util.getSelectorFromElement(trigger); 1210 1211 if (selector !== null) { 1212 var $elem = $(selector); 1213 1214 if (!$elem.hasClass(ClassName.SHOW)) { 1215 $(trigger).addClass(ClassName.COLLAPSED).attr('aria-expanded', false); 1216 } 1217 } 1218 } 1219 } 1220 1221 this.setTransitioning(true); 1222 1223 var complete = function complete() { 1224 _this2.setTransitioning(false); 1225 1226 $(_this2._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).trigger(Event.HIDDEN); 1227 }; 1228 1229 this._element.style[dimension] = ''; 1230 1231 if (!Util.supportsTransitionEnd()) { 1232 complete(); 1233 return; 1234 } 1235 1236 $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION); 1237 }; 1238 1239 _proto.setTransitioning = function setTransitioning(isTransitioning) { 1240 this._isTransitioning = isTransitioning; 1241 }; 1242 1243 _proto.dispose = function dispose() { 1244 $.removeData(this._element, DATA_KEY); 1245 this._config = null; 1246 this._parent = null; 1247 this._element = null; 1248 this._triggerArray = null; 1249 this._isTransitioning = null; 1250 }; // private 1251 1252 1253 _proto._getConfig = function _getConfig(config) { 1254 config = $.extend({}, Default, config); 1255 config.toggle = Boolean(config.toggle); // coerce string values 1256 1257 Util.typeCheckConfig(NAME, config, DefaultType); 1258 return config; 1259 }; 1260 1261 _proto._getDimension = function _getDimension() { 1262 var hasWidth = $(this._element).hasClass(Dimension.WIDTH); 1263 return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT; 1264 }; 1265 1266 _proto._getParent = function _getParent() { 1267 var _this3 = this; 1268 1269 var parent = null; 1270 1271 if (Util.isElement(this._config.parent)) { 1272 parent = this._config.parent; // it's a jQuery object 1273 1274 if (typeof this._config.parent.jquery !== 'undefined') { 1275 parent = this._config.parent[0]; 1276 } 1277 } else { 1278 parent = $(this._config.parent)[0]; 1279 } 1280 1281 var selector = "[data-toggle=\"collapse\"][data-parent=\"" + this._config.parent + "\"]"; 1282 $(parent).find(selector).each(function (i, element) { 1283 _this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]);
vendor: 17,628 bytes, lines 1284-1870
1284 }); 1285 return parent; 1286 }; 1287 1288 _proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) { 1289 if (element) { 1290 var isOpen = $(element).hasClass(ClassName.SHOW); 1291 1292 if (triggerArray.length) { 1293 $(triggerArray).toggleClass(ClassName.COLLAPSED, !isOpen).attr('aria-expanded', isOpen); 1294 } 1295 } 1296 }; // static 1297 1298 1299 Collapse._getTargetFromElement = function _getTargetFromElement(element) { 1300 var selector = Util.getSelectorFromElement(element); 1301 return selector ? $(selector)[0] : null; 1302 }; 1303 1304 Collapse._jQueryInterface = function _jQueryInterface(config) { 1305 return this.each(function () { 1306 var $this = $(this); 1307 var data = $this.data(DATA_KEY); 1308 1309 var _config = $.extend({}, Default, $this.data(), typeof config === 'object' && config); 1310 1311 if (!data && _config.toggle && /show|hide/.test(config)) { 1312 _config.toggle = false; 1313 } 1314 1315 if (!data) { 1316 data = new Collapse(this, _config); 1317 $this.data(DATA_KEY, data); 1318 } 1319 1320 if (typeof config === 'string') { 1321 if (typeof data[config] === 'undefined') { 1322 throw new Error("No method named \"" + config + "\""); 1323 } 1324 1325 data[config](); 1326 } 1327 }); 1328 }; 1329 1330 createClass(Collapse, null, [{ 1331 key: "VERSION", 1332 get: function get() { 1333 return VERSION; 1334 } 1335 }, { 1336 key: "Default", 1337 get: function get() { 1338 return Default; 1339 } 1340 }]); 1341 return Collapse; 1342 }(); 1343 /** 1344 * ------------------------------------------------------------------------ 1345 * Data Api implementation 1346 * ------------------------------------------------------------------------ 1347 */ 1348 1349 1350 $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { 1351 // preventDefault only for <a> elements (which change the URL) not inside the collapsible element 1352 if (event.currentTarget.tagName === 'A') { 1353 event.preventDefault(); 1354 } 1355 1356 var $trigger = $(this); 1357 var selector = Util.getSelectorFromElement(this); 1358 $(selector).each(function () { 1359 var $target = $(this); 1360 var data = $target.data(DATA_KEY); 1361 var config = data ? 'toggle' : $trigger.data(); 1362 1363 Collapse._jQueryInterface.call($target, config); 1364 }); 1365 }); 1366 /** 1367 * ------------------------------------------------------------------------ 1368 * jQuery 1369 * ------------------------------------------------------------------------ 1370 */ 1371 1372 $.fn[NAME] = Collapse._jQueryInterface; 1373 $.fn[NAME].Constructor = Collapse; 1374 1375 $.fn[NAME].noConflict = function () { 1376 $.fn[NAME] = JQUERY_NO_CONFLICT; 1377 return Collapse._jQueryInterface; 1378 }; 1379 1380 return Collapse; 1381}($); 1382 1383/** 1384 * -------------------------------------------------------------------------- 1385 * Bootstrap (v4.0.0-beta.2): dropdown.js 1386 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 1387 * -------------------------------------------------------------------------- 1388 */ 1389 1390var Dropdown = function () { 1391 /** 1392 * Check for Popper dependency 1393 * Popper - https://popper.js.org 1394 */ 1395 if (typeof Popper === 'undefined') { 1396 throw new Error('Bootstrap dropdown require Popper.js (https://popper.js.org)'); 1397 } 1398 /** 1399 * ------------------------------------------------------------------------ 1400 * Constants 1401 * ------------------------------------------------------------------------ 1402 */ 1403 1404 1405 var NAME = 'dropdown'; 1406 var VERSION = '4.0.0-beta.2'; 1407 var DATA_KEY = 'bs.dropdown'; 1408 var EVENT_KEY = "." + DATA_KEY; 1409 var DATA_API_KEY = '.data-api'; 1410 var JQUERY_NO_CONFLICT = $.fn[NAME]; 1411 var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key 1412 1413 var SPACE_KEYCODE = 32; // KeyboardEvent.which value for space key 1414 1415 var TAB_KEYCODE = 9; // KeyboardEvent.which value for tab key 1416 1417 var ARROW_UP_KEYCODE = 38; // KeyboardEvent.which value for up arrow key 1418 1419 var ARROW_DOWN_KEYCODE = 40; // KeyboardEvent.which value for down arrow key 1420 1421 var RIGHT_MOUSE_BUTTON_WHICH = 3; // MouseEvent.which value for the right button (assuming a right-handed mouse) 1422 1423 var REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEYCODE + "|" + ARROW_DOWN_KEYCODE + "|" + ESCAPE_KEYCODE); 1424 var Event = { 1425 HIDE: "hide" + EVENT_KEY, 1426 HIDDEN: "hidden" + EVENT_KEY, 1427 SHOW: "show" + EVENT_KEY, 1428 SHOWN: "shown" + EVENT_KEY, 1429 CLICK: "click" + EVENT_KEY, 1430 CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY, 1431 KEYDOWN_DATA_API: "keydown" + EVENT_KEY + DATA_API_KEY, 1432 KEYUP_DATA_API: "keyup" + EVENT_KEY + DATA_API_KEY 1433 }; 1434 var ClassName = { 1435 DISABLED: 'disabled', 1436 SHOW: 'show', 1437 DROPUP: 'dropup', 1438 MENURIGHT: 'dropdown-menu-right', 1439 MENULEFT: 'dropdown-menu-left' 1440 }; 1441 var Selector = { 1442 DATA_TOGGLE: '[data-toggle="dropdown"]', 1443 FORM_CHILD: '.dropdown form', 1444 MENU: '.dropdown-menu', 1445 NAVBAR_NAV: '.navbar-nav', 1446 VISIBLE_ITEMS: '.dropdown-menu .dropdown-item:not(.disabled)' 1447 }; 1448 var AttachmentMap = { 1449 TOP: 'top-start', 1450 TOPEND: 'top-end', 1451 BOTTOM: 'bottom-start', 1452 BOTTOMEND: 'bottom-end' 1453 }; 1454 var Default = { 1455 offset: 0, 1456 flip: true 1457 }; 1458 var DefaultType = { 1459 offset: '(number|string|function)', 1460 flip: 'boolean' 1461 /** 1462 * ------------------------------------------------------------------------ 1463 * Class Definition 1464 * ------------------------------------------------------------------------ 1465 */ 1466 1467 }; 1468 1469 var Dropdown = 1470 /*#__PURE__*/ 1471 function () { 1472 function Dropdown(element, config) { 1473 this._element = element; 1474 this._popper = null; 1475 this._config = this._getConfig(config); 1476 this._menu = this._getMenuElement(); 1477 this._inNavbar = this._detectNavbar(); 1478 1479 this._addEventListeners(); 1480 } // getters 1481 1482 1483 var _proto = Dropdown.prototype; 1484 1485 // public 1486 _proto.toggle = function toggle() { 1487 if (this._element.disabled || $(this._element).hasClass(ClassName.DISABLED)) { 1488 return; 1489 } 1490 1491 var parent = Dropdown._getParentFromElement(this._element); 1492 1493 var isActive = $(this._menu).hasClass(ClassName.SHOW); 1494 1495 Dropdown._clearMenus(); 1496 1497 if (isActive) { 1498 return; 1499 } 1500 1501 var relatedTarget = { 1502 relatedTarget: this._element 1503 }; 1504 var showEvent = $.Event(Event.SHOW, relatedTarget); 1505 $(parent).trigger(showEvent); 1506 1507 if (showEvent.isDefaultPrevented()) { 1508 return; 1509 } 1510 1511 var element = this._element; // for dropup with alignment we use the parent as popper container 1512 1513 if ($(parent).hasClass(ClassName.DROPUP)) { 1514 if ($(this._menu).hasClass(ClassName.MENULEFT) || $(this._menu).hasClass(ClassName.MENURIGHT)) { 1515 element = parent; 1516 } 1517 } 1518 1519 this._popper = new Popper(element, this._menu, this._getPopperConfig()); // if this is a touch-enabled device we add extra 1520 // empty mouseover listeners to the body's immediate children; 1521 // only needed because of broken event delegation on iOS 1522 // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html 1523 1524 if ('ontouchstart' in document.documentElement && !$(parent).closest(Selector.NAVBAR_NAV).length) { 1525 $('body').children().on('mouseover', null, $.noop); 1526 } 1527 1528 this._element.focus(); 1529 1530 this._element.setAttribute('aria-expanded', true); 1531 1532 $(this._menu).toggleClass(ClassName.SHOW); 1533 $(parent).toggleClass(ClassName.SHOW).trigger($.Event(Event.SHOWN, relatedTarget)); 1534 }; 1535 1536 _proto.dispose = function dispose() { 1537 $.removeData(this._element, DATA_KEY); 1538 $(this._element).off(EVENT_KEY); 1539 this._element = null; 1540 this._menu = null; 1541 1542 if (this._popper !== null) { 1543 this._popper.destroy(); 1544 } 1545 1546 this._popper = null; 1547 }; 1548 1549 _proto.update = function update() { 1550 this._inNavbar = this._detectNavbar(); 1551 1552 if (this._popper !== null) { 1553 this._popper.scheduleUpdate(); 1554 } 1555 }; // private 1556 1557 1558 _proto._addEventListeners = function _addEventListeners() { 1559 var _this = this; 1560 1561 $(this._element).on(Event.CLICK, function (event) { 1562 event.preventDefault(); 1563 event.stopPropagation(); 1564 1565 _this.toggle(); 1566 }); 1567 }; 1568 1569 _proto._getConfig = function _getConfig(config) { 1570 config = $.extend({}, this.constructor.Default, $(this._element).data(), config); 1571 Util.typeCheckConfig(NAME, config, this.constructor.DefaultType); 1572 return config; 1573 }; 1574 1575 _proto._getMenuElement = function _getMenuElement() { 1576 if (!this._menu) { 1577 var parent = Dropdown._getParentFromElement(this._element); 1578 1579 this._menu = $(parent).find(Selector.MENU)[0]; 1580 } 1581 1582 return this._menu; 1583 }; 1584 1585 _proto._getPlacement = function _getPlacement() { 1586 var $parentDropdown = $(this._element).parent(); 1587 var placement = AttachmentMap.BOTTOM; // Handle dropup 1588 1589 if ($parentDropdown.hasClass(ClassName.DROPUP)) { 1590 placement = AttachmentMap.TOP; 1591 1592 if ($(this._menu).hasClass(ClassName.MENURIGHT)) { 1593 placement = AttachmentMap.TOPEND; 1594 } 1595 } else if ($(this._menu).hasClass(ClassName.MENURIGHT)) { 1596 placement = AttachmentMap.BOTTOMEND; 1597 } 1598 1599 return placement; 1600 }; 1601 1602 _proto._detectNavbar = function _detectNavbar() { 1603 return $(this._element).closest('.navbar').length > 0; 1604 }; 1605 1606 _proto._getPopperConfig = function _getPopperConfig() { 1607 var _this2 = this; 1608 1609 var offsetConf = {}; 1610 1611 if (typeof this._config.offset === 'function') { 1612 offsetConf.fn = function (data) { 1613 data.offsets = $.extend({}, data.offsets, _this2._config.offset(data.offsets) || {}); 1614 return data; 1615 }; 1616 } else { 1617 offsetConf.offset = this._config.offset; 1618 } 1619 1620 var popperConfig = { 1621 placement: this._getPlacement(), 1622 modifiers: { 1623 offset: offsetConf, 1624 flip: { 1625 enabled: this._config.flip 1626 } 1627 } // Disable Popper.js for Dropdown in Navbar 1628 1629 }; 1630 1631 if (this._inNavbar) { 1632 popperConfig.modifiers.applyStyle = { 1633 enabled: !this._inNavbar 1634 }; 1635 } 1636 1637 return popperConfig; 1638 }; // static 1639 1640 1641 Dropdown._jQueryInterface = function _jQueryInterface(config) { 1642 return this.each(function () { 1643 var data = $(this).data(DATA_KEY); 1644 1645 var _config = typeof config === 'object' ? config : null; 1646 1647 if (!data) { 1648 data = new Dropdown(this, _config); 1649 $(this).data(DATA_KEY, data); 1650 } 1651 1652 if (typeof config === 'string') { 1653 if (typeof data[config] === 'undefined') { 1654 throw new Error("No method named \"" + config + "\""); 1655 } 1656 1657 data[config](); 1658 } 1659 }); 1660 }; 1661 1662 Dropdown._clearMenus = function _clearMenus(event) { 1663 if (event && (event.which === RIGHT_MOUSE_BUTTON_WHICH || event.type === 'keyup' && event.which !== TAB_KEYCODE)) { 1664 return; 1665 } 1666 1667 var toggles = $.makeArray($(Selector.DATA_TOGGLE)); 1668 1669 for (var i = 0; i < toggles.length; i++) { 1670 var parent = Dropdown._getParentFromElement(toggles[i]); 1671 1672 var context = $(toggles[i]).data(DATA_KEY); 1673 var relatedTarget = { 1674 relatedTarget: toggles[i] 1675 }; 1676 1677 if (!context) { 1678 continue; 1679 } 1680 1681 var dropdownMenu = context._menu; 1682 1683 if (!$(parent).hasClass(ClassName.SHOW)) { 1684 continue; 1685 } 1686 1687 if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && $.contains(parent, event.target)) { 1688 continue; 1689 } 1690 1691 var hideEvent = $.Event(Event.HIDE, relatedTarget); 1692 $(parent).trigger(hideEvent); 1693 1694 if (hideEvent.isDefaultPrevented()) { 1695 continue; 1696 } // if this is a touch-enabled device we remove the extra 1697 // empty mouseover listeners we added for iOS support 1698 1699 1700 if ('ontouchstart' in document.documentElement) { 1701 $('body').children().off('mouseover', null, $.noop); 1702 } 1703 1704 toggles[i].setAttribute('aria-expanded', 'false'); 1705 $(dropdownMenu).removeClass(ClassName.SHOW); 1706 $(parent).removeClass(ClassName.SHOW).trigger($.Event(Event.HIDDEN, relatedTarget)); 1707 } 1708 }; 1709 1710 Dropdown._getParentFromElement = function _getParentFromElement(element) { 1711 var parent; 1712 var selector = Util.getSelectorFromElement(element); 1713 1714 if (selector) { 1715 parent = $(selector)[0]; 1716 } 1717 1718 return parent || element.parentNode; 1719 }; 1720 1721 Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) { 1722 if (!REGEXP_KEYDOWN.test(event.which) || /button/i.test(event.target.tagName) && event.which === SPACE_KEYCODE || /input|textarea/i.test(event.target.tagName)) { 1723 return; 1724 } 1725 1726 event.preventDefault(); 1727 event.stopPropagation(); 1728 1729 if (this.disabled || $(this).hasClass(ClassName.DISABLED)) { 1730 return; 1731 } 1732 1733 var parent = Dropdown._getParentFromElement(this); 1734 1735 var isActive = $(parent).hasClass(ClassName.SHOW); 1736 1737 if (!isActive && (event.which !== ESCAPE_KEYCODE || event.which !== SPACE_KEYCODE) || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) { 1738 if (event.which === ESCAPE_KEYCODE) { 1739 var toggle = $(parent).find(Selector.DATA_TOGGLE)[0]; 1740 $(toggle).trigger('focus'); 1741 } 1742 1743 $(this).trigger('click'); 1744 return; 1745 } 1746 1747 var items = $(parent).find(Selector.VISIBLE_ITEMS).get(); 1748 1749 if (!items.length) { 1750 return; 1751 } 1752 1753 var index = items.indexOf(event.target); 1754 1755 if (event.which === ARROW_UP_KEYCODE && index > 0) { 1756 // up 1757 index--; 1758 } 1759 1760 if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) { 1761 // down 1762 index++; 1763 } 1764 1765 if (index < 0) { 1766 index = 0; 1767 } 1768 1769 items[index].focus(); 1770 }; 1771 1772 createClass(Dropdown, null, [{ 1773 key: "VERSION", 1774 get: function get() { 1775 return VERSION; 1776 } 1777 }, { 1778 key: "Default", 1779 get: function get() { 1780 return Default; 1781 } 1782 }, { 1783 key: "DefaultType", 1784 get: function get() { 1785 return DefaultType; 1786 } 1787 }]); 1788 return Dropdown; 1789 }(); 1790 /** 1791 * ------------------------------------------------------------------------ 1792 * Data Api implementation 1793 * ------------------------------------------------------------------------ 1794 */ 1795 1796 1797 $(document).on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.MENU, Dropdown._dataApiKeydownHandler).on(Event.CLICK_DATA_API + " " + Event.KEYUP_DATA_API, Dropdown._clearMenus).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { 1798 event.preventDefault(); 1799 event.stopPropagation(); 1800 1801 Dropdown._jQueryInterface.call($(this), 'toggle'); 1802 }).on(Event.CLICK_DATA_API, Selector.FORM_CHILD, function (e) { 1803 e.stopPropagation(); 1804 }); 1805 /** 1806 * ------------------------------------------------------------------------ 1807 * jQuery 1808 * ------------------------------------------------------------------------ 1809 */ 1810 1811 $.fn[NAME] = Dropdown._jQueryInterface; 1812 $.fn[NAME].Constructor = Dropdown; 1813 1814 $.fn[NAME].noConflict = function () { 1815 $.fn[NAME] = JQUERY_NO_CONFLICT; 1816 return Dropdown._jQueryInterface; 1817 }; 1818 1819 return Dropdown; 1820}($, Popper); 1821 1822/** 1823 * -------------------------------------------------------------------------- 1824 * Bootstrap (v4.0.0-beta.2): modal.js 1825 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 1826 * -------------------------------------------------------------------------- 1827 */ 1828 1829var Modal = function () { 1830 /** 1831 * ------------------------------------------------------------------------ 1832 * Constants 1833 * ------------------------------------------------------------------------ 1834 */ 1835 var NAME = 'modal'; 1836 var VERSION = '4.0.0-beta.2'; 1837 var DATA_KEY = 'bs.modal'; 1838 var EVENT_KEY = "." + DATA_KEY; 1839 var DATA_API_KEY = '.data-api'; 1840 var JQUERY_NO_CONFLICT = $.fn[NAME]; 1841 var TRANSITION_DURATION = 300; 1842 var BACKDROP_TRANSITION_DURATION = 150; 1843 var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key 1844 1845 var Default = { 1846 backdrop: true, 1847 keyboard: true, 1848 focus: true, 1849 show: true 1850 }; 1851 var DefaultType = { 1852 backdrop: '(boolean|string)', 1853 keyboard: 'boolean', 1854 focus: 'boolean', 1855 show: 'boolean' 1856 }; 1857 var Event = { 1858 HIDE: "hide" + EVENT_KEY, 1859 HIDDEN: "hidden" + EVENT_KEY, 1860 SHOW: "show" + EVENT_KEY, 1861 SHOWN: "shown" + EVENT_KEY, 1862 FOCUSIN: "focusin" + EVENT_KEY, 1863 RESIZE: "resize" + EVENT_KEY, 1864 CLICK_DISMISS: "click.dismiss" + EVENT_KEY, 1865 KEYDOWN_DISMISS: "keydown.dismiss" + EVENT_KEY, 1866 MOUSEUP_DISMISS: "mouseup.dismiss" + EVENT_KEY, 1867 MOUSEDOWN_DISMISS: "mousedown.dismiss" + EVENT_KEY, 1868 CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY 1869 }; 1870 var ClassName = {
1871 SCROLLBAR_MEASURER: 'modal-scrollbar-measure', 1872 BACKDROP: 'modal-backdrop', 1873 OPEN: 'modal-open', 1874 FADE: 'fade', 1875 SHOW: 'show' 1876 }; 1877 var Selector = { 1878 DIALOG: '.modal-dialog', 1879 DATA_TOGGLE: '[data-toggle="modal"]', 1880 DATA_DISMISS: '[data-dismiss="modal"]', 1881 FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top', 1882 STICKY_CONTENT: '.sticky-top', 1883 NAVBAR_TOGGLER: '.navbar-toggler' 1884 /** 1885 * ------------------------------------------------------------------------ 1886 * Class Definition 1887 * ------------------------------------------------------------------------ 1888 */ 1889 1890 }; 1891 1892 var Modal = 1893 /*#__PURE__*/ 1894 function () { 1895 function Modal(element, config) { 1896 this._config = this._getConfig(config); 1897 this._element = element; 1898 this._dialog = $(element).find(Selector.DIALOG)[0]; 1899 this._backdrop = null; 1900 this._isShown = false; 1901 this._isBodyOverflowing = false; 1902 this._ignoreBackdropClick = false; 1903 this._originalBodyPadding = 0; 1904 this._scrollbarWidth = 0; 1905 } // getters 1906 1907 1908 var _proto = Modal.prototype; 1909 1910 // public 1911 _proto.toggle = function toggle(relatedTarget) { 1912 return this._isShown ? this.hide() : this.show(relatedTarget); 1913 }; 1914 1915 _proto.show = function show(relatedTarget) { 1916 var _this = this; 1917 1918 if (this._isTransitioning || this._isShown) { 1919 return; 1920 } 1921 1922 if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) { 1923 this._isTransitioning = true; 1924 } 1925 1926 var showEvent = $.Event(Event.SHOW, { 1927 relatedTarget: relatedTarget 1928 }); 1929 $(this._element).trigger(showEvent); 1930 1931 if (this._isShown || showEvent.isDefaultPrevented()) { 1932 return; 1933 } 1934 1935 this._isShown = true; 1936 1937 this._checkScrollbar(); 1938 1939 this._setScrollbar(); 1940 1941 this._adjustDialog(); 1942 1943 $(document.body).addClass(ClassName.OPEN); 1944 1945 this._setEscapeEvent(); 1946 1947 this._setResizeEvent(); 1948 1949 $(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, function (event) { 1950 return _this.hide(event); 1951 }); 1952 $(this._dialog).on(Event.MOUSEDOWN_DISMISS, function () { 1953 $(_this._element).one(Event.MOUSEUP_DISMISS, function (event) { 1954 if ($(event.target).is(_this._element)) { 1955 _this._ignoreBackdropClick = true; 1956 } 1957 }); 1958 }); 1959 1960 this._showBackdrop(function () { 1961 return _this._showElement(relatedTarget); 1962 }); 1963 }; 1964 1965 _proto.hide = function hide(event) { 1966 var _this2 = this; 1967 1968 if (event) { 1969 event.preventDefault(); 1970 } 1971 1972 if (this._isTransitioning || !this._isShown) { 1973 return; 1974 } 1975 1976 var hideEvent = $.Event(Event.HIDE); 1977 $(this._element).trigger(hideEvent); 1978 1979 if (!this._isShown || hideEvent.isDefaultPrevented()) { 1980 return; 1981 } 1982 1983 this._isShown = false; 1984 var transition = Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE); 1985 1986 if (transition) { 1987 this._isTransitioning = true; 1988 } 1989 1990 this._setEscapeEvent(); 1991 1992 this._setResizeEvent(); 1993 1994 $(document).off(Event.FOCUSIN); 1995 $(this._element).removeClass(ClassName.SHOW); 1996 $(this._element).off(Event.CLICK_DISMISS); 1997 $(this._dialog).off(Event.MOUSEDOWN_DISMISS); 1998 1999 if (transition) { 2000 $(this._element).one(Util.TRANSITION_END, function (event) { 2001 return _this2._hideModal(event); 2002 }).emulateTransitionEnd(TRANSITION_DURATION); 2003 } else { 2004 this._hideModal(); 2005 } 2006 }; 2007 2008 _proto.dispose = function dispose() { 2009 $.removeData(this._element, DATA_KEY); 2010 $(window, document, this._element, this._backdrop).off(EVENT_KEY); 2011 this._config = null; 2012 this._element = null; 2013 this._dialog = null; 2014 this._backdrop = null; 2015 this._isShown = null; 2016 this._isBodyOverflowing = null; 2017 this._ignoreBackdropClick = null; 2018 this._scrollbarWidth = null; 2019 }; 2020 2021 _proto.handleUpdate = function handleUpdate() { 2022 this._adjustDialog(); 2023 }; // private 2024 2025 2026 _proto._getConfig = function _getConfig(config) { 2027 config = $.extend({}, Default, config); 2028 Util.typeCheckConfig(NAME, config, DefaultType); 2029 return config; 2030 }; 2031 2032 _proto._showElement = function _showElement(relatedTarget) { 2033 var _this3 = this; 2034 2035 var transition = Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE); 2036 2037 if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) { 2038 // don't move modals dom position 2039 document.body.appendChild(this._element); 2040 } 2041 2042 this._element.style.display = 'block'; 2043 2044 this._element.removeAttribute('aria-hidden'); 2045 2046 this._element.scrollTop = 0; 2047 2048 if (transition) { 2049 Util.reflow(this._element); 2050 } 2051 2052 $(this._element).addClass(ClassName.SHOW); 2053 2054 if (this._config.focus) { 2055 this._enforceFocus(); 2056 } 2057 2058 var shownEvent = $.Event(Event.SHOWN, { 2059 relatedTarget: relatedTarget 2060 }); 2061 2062 var transitionComplete = function transitionComplete() { 2063 if (_this3._config.focus) { 2064 _this3._element.focus(); 2065 } 2066 2067 _this3._isTransitioning = false; 2068 $(_this3._element).trigger(shownEvent); 2069 }; 2070 2071 if (transition) { 2072 $(this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(TRANSITION_DURATION); 2073 } else { 2074 transitionComplete(); 2075 } 2076 }; 2077 2078 _proto._enforceFocus = function _enforceFocus() { 2079 var _this4 = this; 2080 2081 $(document).off(Event.FOCUSIN) // guard against infinite focus loop 2082 .on(Event.FOCUSIN, function (event) { 2083 if (document !== event.target && _this4._element !== event.target && !$(_this4._element).has(event.target).length) { 2084 _this4._element.focus(); 2085 } 2086 }); 2087 }; 2088 2089 _proto._setEscapeEvent = function _setEscapeEvent() { 2090 var _this5 = this; 2091 2092 if (this._isShown && this._config.keyboard) { 2093 $(this._element).on(Event.KEYDOWN_DISMISS, function (event) { 2094 if (event.which === ESCAPE_KEYCODE) { 2095 event.preventDefault(); 2096 2097 _this5.hide(); 2098 } 2099 }); 2100 } else if (!this._isShown) { 2101 $(this._element).off(Event.KEYDOWN_DISMISS); 2102 } 2103 }; 2104 2105 _proto._setResizeEvent = function _setResizeEvent() { 2106 var _this6 = this; 2107 2108 if (this._isShown) { 2109 $(window).on(Event.RESIZE, function (event) { 2110 return _this6.handleUpdate(event); 2111 }); 2112 } else { 2113 $(window).off(Event.RESIZE); 2114 } 2115 }; 2116 2117 _proto._hideModal = function _hideModal() { 2118 var _this7 = this; 2119 2120 this._element.style.display = 'none'; 2121 2122 this._element.setAttribute('aria-hidden', true); 2123 2124 this._isTransitioning = false; 2125 2126 this._showBackdrop(function () { 2127 $(document.body).removeClass(ClassName.OPEN); 2128 2129 _this7._resetAdjustments(); 2130 2131 _this7._resetScrollbar(); 2132 2133 $(_this7._element).trigger(Event.HIDDEN); 2134 }); 2135 }; 2136 2137 _proto._removeBackdrop = function _removeBackdrop() { 2138 if (this._backdrop) { 2139 $(this._backdrop).remove(); 2140 this._backdrop = null; 2141 } 2142 }; 2143 2144 _proto._showBackdrop = function _showBackdrop(callback) { 2145 var _this8 = this; 2146 2147 var animate = $(this._element).hasClass(ClassName.FADE) ? ClassName.FADE : ''; 2148 2149 if (this._isShown && this._config.backdrop) { 2150 var doAnimate = Util.supportsTransitionEnd() && animate; 2151 this._backdrop = document.createElement('div'); 2152 this._backdrop.className = ClassName.BACKDROP; 2153 2154 if (animate) { 2155 $(this._backdrop).addClass(animate); 2156 } 2157 2158 $(this._backdrop).appendTo(document.body); 2159 $(this._element).on(Event.CLICK_DISMISS, function (event) { 2160 if (_this8._ignoreBackdropClick) { 2161 _this8._ignoreBackdropClick = false; 2162 return; 2163 } 2164 2165 if (event.target !== event.currentTarget) { 2166 return; 2167 } 2168 2169 if (_this8._config.backdrop === 'static') { 2170 _this8._element.focus(); 2171 } else { 2172 _this8.hide(); 2173 } 2174 }); 2175 2176 if (doAnimate) { 2177 Util.reflow(this._backdrop); 2178 } 2179 2180 $(this._backdrop).addClass(ClassName.SHOW); 2181 2182 if (!callback) { 2183 return; 2184 } 2185 2186 if (!doAnimate) { 2187 callback(); 2188 return; 2189 } 2190 2191 $(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION); 2192 } else if (!this._isShown && this._backdrop) { 2193 $(this._backdrop).removeClass(ClassName.SHOW); 2194 2195 var callbackRemove = function callbackRemove() { 2196 _this8._removeBackdrop(); 2197 2198 if (callback) { 2199 callback(); 2200 } 2201 }; 2202 2203 if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) { 2204 $(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION); 2205 } else { 2206 callbackRemove(); 2207 } 2208 } else if (callback) { 2209 callback(); 2210 } 2211 }; // ---------------------------------------------------------------------- 2212 // the following methods are used to handle overflowing modals 2213 // todo (fat): these should probably be refactored out of modal.js 2214 // ---------------------------------------------------------------------- 2215 2216
2217 _proto._adjustDialog = function _adjustDialog() { 2218 var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight; 2219 2220 if (!this._isBodyOverflowing && isModalOverflowing) { 2221 this._element.style.paddingLeft = this._scrollbarWidth + "px"; 2222 } 2223 2224 if (this._isBodyOverflowing && !isModalOverflowing) { 2225 this._element.style.paddingRight = this._scrollbarWidth + "px"; 2226 } 2227 }; 2228 2229 _proto._resetAdjustments = function _resetAdjustments() { 2230 this._element.style.paddingLeft = ''; 2231 this._element.style.paddingRight = ''; 2232 }; 2233 2234 _proto._checkScrollbar = function _checkScrollbar() { 2235 var rect = document.body.getBoundingClientRect(); 2236 this._isBodyOverflowing = rect.left + rect.right < window.innerWidth; 2237 this._scrollbarWidth = this._getScrollbarWidth(); 2238 }; 2239 2240 _proto._setScrollbar = function _setScrollbar() { 2241 var _this9 = this; 2242 2243 if (this._isBodyOverflowing) { 2244 // Note: DOMNode.style.paddingRight returns the actual value or '' if not set 2245 // while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set 2246 // Adjust fixed content padding 2247 $(Selector.FIXED_CONTENT).each(function (index, element) { 2248 var actualPadding = $(element)[0].style.paddingRight; 2249 var calculatedPadding = $(element).css('padding-right'); 2250 $(element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this9._scrollbarWidth + "px"); 2251 }); // Adjust sticky content margin 2252 2253 $(Selector.STICKY_CONTENT).each(function (index, element) { 2254 var actualMargin = $(element)[0].style.marginRight; 2255 var calculatedMargin = $(element).css('margin-right'); 2256 $(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this9._scrollbarWidth + "px"); 2257 }); // Adjust navbar-toggler margin 2258 2259 $(Selector.NAVBAR_TOGGLER).each(function (index, element) { 2260 var actualMargin = $(element)[0].style.marginRight; 2261 var calculatedMargin = $(element).css('margin-right'); 2262 $(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) + _this9._scrollbarWidth + "px"); 2263 }); // Adjust body padding 2264 2265 var actualPadding = document.body.style.paddingRight; 2266 var calculatedPadding = $('body').css('padding-right'); 2267 $('body').data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + "px"); 2268 } 2269 }; 2270 2271 _proto._resetScrollbar = function _resetScrollbar() { 2272 // Restore fixed content padding 2273 $(Selector.FIXED_CONTENT).each(function (index, element) { 2274 var padding = $(element).data('padding-right'); 2275 2276 if (typeof padding !== 'undefined') { 2277 $(element).css('padding-right', padding).removeData('padding-right'); 2278 } 2279 }); // Restore sticky content and navbar-toggler margin 2280 2281 $(Selector.STICKY_CONTENT + ", " + Selector.NAVBAR_TOGGLER).each(function (index, element) { 2282 var margin = $(element).data('margin-right'); 2283 2284 if (typeof margin !== 'undefined') { 2285 $(element).css('margin-right', margin).removeData('margin-right'); 2286 } 2287 }); // Restore body padding 2288 2289 var padding = $('body').data('padding-right'); 2290 2291 if (typeof padding !== 'undefined') { 2292 $('body').css('padding-right', padding).removeData('padding-right'); 2293 } 2294 }; 2295 2296 _proto._getScrollbarWidth = function _getScrollbarWidth() { 2297 // thx d.walsh 2298 var scrollDiv = document.createElement('div'); 2299 scrollDiv.className = ClassName.SCROLLBAR_MEASURER; 2300 document.body.appendChild(scrollDiv); 2301 var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth; 2302 document.body.removeChild(scrollDiv); 2303 return scrollbarWidth; 2304 }; // static 2305 2306 2307 Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) { 2308 return this.each(function () { 2309 var data = $(this).data(DATA_KEY); 2310 2311 var _config = $.extend({}, Modal.Default, $(this).data(), typeof config === 'object' && config); 2312 2313 if (!data) { 2314 data = new Modal(this, _config); 2315 $(this).data(DATA_KEY, data); 2316 } 2317 2318 if (typeof config === 'string') { 2319 if (typeof data[config] === 'undefined') {
2320 throw new Error("No method named \"" + config + "\""); 2321 } 2322 2323 data[config](relatedTarget); 2324 } else if (_config.show) { 2325 data.show(relatedTarget); 2326 } 2327 }); 2328 }; 2329 2330 createClass(Modal, null, [{ 2331 key: "VERSION", 2332 get: function get() { 2333 return VERSION; 2334 } 2335 }, { 2336 key: "Default", 2337 get: function get() { 2338 return Default; 2339 } 2340 }]); 2341 return Modal; 2342 }(); 2343 /** 2344 * ------------------------------------------------------------------------ 2345 * Data Api implementation 2346 * ------------------------------------------------------------------------ 2347 */ 2348 2349 2350 $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { 2351 var _this10 = this; 2352 2353 var target; 2354 var selector = Util.getSelectorFromElement(this); 2355 2356 if (selector) { 2357 target = $(selector)[0]; 2358 } 2359 2360 var config = $(target).data(DATA_KEY) ? 'toggle' : $.extend({}, $(target).data(), $(this).data()); 2361 2362 if (this.tagName === 'A' || this.tagName === 'AREA') { 2363 event.preventDefault(); 2364 } 2365 2366 var $target = $(target).one(Event.SHOW, function (showEvent) { 2367 if (showEvent.isDefaultPrevented()) { 2368 // only register focus restorer if modal will actually get shown 2369 return; 2370 } 2371 2372 $target.one(Event.HIDDEN, function () { 2373 if ($(_this10).is(':visible')) { 2374 _this10.focus(); 2375 } 2376 }); 2377 }); 2378 2379 Modal._jQueryInterface.call($(target), config, this); 2380 }); 2381 /** 2382 * ------------------------------------------------------------------------ 2383 * jQuery 2384 * ------------------------------------------------------------------------ 2385 */ 2386 2387 $.fn[NAME] = Modal._jQueryInterface; 2388 $.fn[NAME].Constructor = Modal; 2389 2390 $.fn[NAME].noConflict = function () { 2391 $.fn[NAME] = JQUERY_NO_CONFLICT; 2392 return Modal._jQueryInterface; 2393 }; 2394 2395 return Modal; 2396}($); 2397 2398/** 2399 * -------------------------------------------------------------------------- 2400 * Bootstrap (v4.0.0-beta.2): tooltip.js 2401 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 2402 * -------------------------------------------------------------------------- 2403 */ 2404 2405var Tooltip = function () { 2406 /** 2407 * Check for Popper dependency 2408 * Popper - https://popper.js.org 2409 */ 2410 if (typeof Popper === 'undefined') { 2411 throw new Error('Bootstrap tooltips require Popper.js (https://popper.js.org)'); 2412 } 2413 /** 2414 * ------------------------------------------------------------------------ 2415 * Constants 2416 * ------------------------------------------------------------------------ 2417 */ 2418 2419 2420 var NAME = 'tooltip'; 2421 var VERSION = '4.0.0-beta.2'; 2422 var DATA_KEY = 'bs.tooltip'; 2423 var EVENT_KEY = "." + DATA_KEY; 2424 var JQUERY_NO_CONFLICT = $.fn[NAME]; 2425 var TRANSITION_DURATION = 150; 2426 var CLASS_PREFIX = 'bs-tooltip'; 2427 var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g'); 2428 var DefaultType = { 2429 animation: 'boolean', 2430 template: 'string', 2431 title: '(string|element|function)', 2432 trigger: 'string', 2433 delay: '(number|object)', 2434 html: 'boolean', 2435 selector: '(string|boolean)', 2436 placement: '(string|function)', 2437 offset: '(number|string)', 2438 container: '(string|element|boolean)', 2439 fallbackPlacement: '(string|array)' 2440 }; 2441 var AttachmentMap = { 2442 AUTO: 'auto', 2443 TOP: 'top', 2444 RIGHT: 'right', 2445 BOTTOM: 'bottom', 2446 LEFT: 'left' 2447 }; 2448 var Default = { 2449 animation: true, 2450 template: '<div class="tooltip" role="tooltip">' + '<div class="arrow"></div>' + '<div class="tooltip-inner"></div></div>', 2451 trigger: 'hover focus', 2452 title: '', 2453 delay: 0, 2454 html: false, 2455 selector: false, 2456 placement: 'top', 2457 offset: 0, 2458 container: false, 2459 fallbackPlacement: 'flip' 2460 }; 2461 var HoverState = { 2462 SHOW: 'show', 2463 OUT: 'out' 2464 }; 2465 var Event = { 2466 HIDE: "hide" + EVENT_KEY, 2467 HIDDEN: "hidden" + EVENT_KEY, 2468 SHOW: "show" + EVENT_KEY, 2469 SHOWN: "shown" + EVENT_KEY, 2470 INSERTED: "inserted" + EVENT_KEY, 2471 CLICK: "click" + EVENT_KEY, 2472 FOCUSIN: "focusin" + EVENT_KEY, 2473 FOCUSOUT: "focusout" + EVENT_KEY, 2474 MOUSEENTER: "mouseenter" + EVENT_KEY, 2475 MOUSELEAVE: "mouseleave" + EVENT_KEY 2476 }; 2477 var ClassName = { 2478 FADE: 'fade', 2479 SHOW: 'show' 2480 }; 2481 var Selector = { 2482 TOOLTIP: '.tooltip', 2483 TOOLTIP_INNER: '.tooltip-inner', 2484 ARROW: '.arrow' 2485 }; 2486 var Trigger = { 2487 HOVER: 'hover', 2488 FOCUS: 'focus', 2489 CLICK: 'click', 2490 MANUAL: 'manual' 2491 /** 2492 * ------------------------------------------------------------------------ 2493 * Class Definition 2494 * ------------------------------------------------------------------------ 2495 */ 2496 2497 }; 2498 2499 var Tooltip = 2500 /*#__PURE__*/ 2501 function () { 2502 function Tooltip(element, config) { 2503 // private 2504 this._isEnabled = true; 2505 this._timeout = 0; 2506 this._hoverState = ''; 2507 this._activeTrigger = {}; 2508 this._popper = null; // protected 2509 2510 this.element = element; 2511 this.config = this._getConfig(config); 2512 this.tip = null; 2513 2514 this._setListeners(); 2515 } // getters 2516 2517 2518 var _proto = Tooltip.prototype; 2519 2520 // public 2521 _proto.enable = function enable() { 2522 this._isEnabled = true; 2523 }; 2524 2525 _proto.disable = function disable() { 2526 this._isEnabled = false; 2527 }; 2528 2529 _proto.toggleEnabled = function toggleEnabled() { 2530 this._isEnabled = !this._isEnabled; 2531 }; 2532 2533 _proto.toggle = function toggle(event) { 2534 if (!this._isEnabled) { 2535 return; 2536 } 2537 2538 if (event) { 2539 var dataKey = this.constructor.DATA_KEY; 2540 var context = $(event.currentTarget).data(dataKey); 2541 2542 if (!context) { 2543 context = new this.constructor(event.currentTarget, this._getDelegateConfig()); 2544 $(event.currentTarget).data(dataKey, context); 2545 } 2546 2547 context._activeTrigger.click = !context._activeTrigger.click; 2548 2549 if (context._isWithActiveTrigger()) { 2550 context._enter(null, context); 2551 } else { 2552 context._leave(null, context); 2553 } 2554 } else { 2555 if ($(this.getTipElement()).hasClass(ClassName.SHOW)) { 2556 this._leave(null, this); 2557 2558 return; 2559 } 2560 2561 this._enter(null, this); 2562 } 2563 }; 2564 2565 _proto.dispose = function dispose() { 2566 clearTimeout(this._timeout); 2567 $.removeData(this.element, this.constructor.DATA_KEY); 2568 $(this.element).off(this.constructor.EVENT_KEY); 2569 $(this.element).closest('.modal').off('hide.bs.modal'); 2570 2571 if (this.tip) { 2572 $(this.tip).remove(); 2573 } 2574 2575 this._isEnabled = null; 2576 this._timeout = null; 2577 this._hoverState = null; 2578 this._activeTrigger = null; 2579 2580 if (this._popper !== null) { 2581 this._popper.destroy(); 2582 } 2583 2584 this._popper = null; 2585 this.element = null; 2586 this.config = null; 2587 this.tip = null; 2588 }; 2589 2590 _proto.show = function show() { 2591 var _this = this; 2592 2593 if ($(this.element).css('display') === 'none') { 2594 throw new Error('Please use show on visible elements'); 2595 } 2596 2597 var showEvent = $.Event(this.constructor.Event.SHOW); 2598 2599 if (this.isWithContent() && this._isEnabled) { 2600 $(this.element).trigger(showEvent); 2601 var isInTheDom = $.contains(this.element.ownerDocument.documentElement, this.element); 2602 2603 if (showEvent.isDefaultPrevented() || !isInTheDom) { 2604 return; 2605 } 2606 2607 var tip = this.getTipElement(); 2608 var tipId = Util.getUID(this.constructor.NAME);
2609 tip.setAttribute('id', tipId); 2610 this.element.setAttribute('aria-describedby', tipId); 2611 this.setContent(); 2612 2613 if (this.config.animation) { 2614 $(tip).addClass(ClassName.FADE); 2615 } 2616 2617 var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement; 2618 2619 var attachment = this._getAttachment(placement); 2620 2621 this.addAttachmentClass(attachment); 2622 var container = this.config.container === false ? document.body : $(this.config.container); 2623 $(tip).data(this.constructor.DATA_KEY, this); 2624 2625 if (!$.contains(this.element.ownerDocument.documentElement, this.tip)) { 2626 $(tip).appendTo(container); 2627 } 2628 2629 $(this.element).trigger(this.constructor.Event.INSERTED); 2630 this._popper = new Popper(this.element, tip, { 2631 placement: attachment, 2632 modifiers: { 2633 offset: { 2634 offset: this.config.offset 2635 }, 2636 flip: { 2637 behavior: this.config.fallbackPlacement 2638 }, 2639 arrow: { 2640 element: Selector.ARROW 2641 } 2642 }, 2643 onCreate: function onCreate(data) { 2644 if (data.originalPlacement !== data.placement) { 2645 _this._handlePopperPlacementChange(data); 2646 } 2647 }, 2648 onUpdate: function onUpdate(data) { 2649 _this._handlePopperPlacementChange(data); 2650 } 2651 }); 2652 $(tip).addClass(ClassName.SHOW); // if this is a touch-enabled device we add extra 2653 // empty mouseover listeners to the body's immediate children; 2654 // only needed because of broken event delegation on iOS 2655 // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html 2656 2657 if ('ontouchstart' in document.documentElement) { 2658 $('body').children().on('mouseover', null, $.noop); 2659 } 2660 2661 var complete = function complete() { 2662 if (_this.config.animation) { 2663 _this._fixTransition(); 2664 } 2665 2666 var prevHoverState = _this._hoverState; 2667 _this._hoverState = null; 2668 $(_this.element).trigger(_this.constructor.Event.SHOWN); 2669 2670 if (prevHoverState === HoverState.OUT) { 2671 _this._leave(null, _this); 2672 } 2673 }; 2674 2675 if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) { 2676 $(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(Tooltip._TRANSITION_DURATION); 2677 } else { 2678 complete(); 2679 } 2680 } 2681 }; 2682 2683 _proto.hide = function hide(callback) { 2684 var _this2 = this; 2685 2686 var tip = this.getTipElement(); 2687 var hideEvent = $.Event(this.constructor.Event.HIDE); 2688 2689 var complete = function complete() { 2690 if (_this2._hoverState !== HoverState.SHOW && tip.parentNode) { 2691 tip.parentNode.removeChild(tip); 2692 } 2693 2694 _this2._cleanTipClass(); 2695 2696 _this2.element.removeAttribute('aria-describedby'); 2697 2698 $(_this2.element).trigger(_this2.constructor.Event.HIDDEN); 2699 2700 if (_this2._popper !== null) { 2701 _this2._popper.destroy(); 2702 } 2703 2704 if (callback) { 2705 callback(); 2706 } 2707 }; 2708 2709 $(this.element).trigger(hideEvent); 2710 2711 if (hideEvent.isDefaultPrevented()) { 2712 return; 2713 } 2714 2715 $(tip).removeClass(ClassName.SHOW); // if this is a touch-enabled device we remove the extra 2716 // empty mouseover listeners we added for iOS support 2717 2718 if ('ontouchstart' in document.documentElement) { 2719 $('body').children().off('mouseover', null, $.noop); 2720 } 2721 2722 this._activeTrigger[Trigger.CLICK] = false; 2723 this._activeTrigger[Trigger.FOCUS] = false; 2724 this._activeTrigger[Trigger.HOVER] = false; 2725 2726 if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) { 2727 $(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION); 2728 } else { 2729 complete(); 2730 } 2731 2732 this._hoverState = ''; 2733 }; 2734
2735 _proto.update = function update() { 2736 if (this._popper !== null) { 2737 this._popper.scheduleUpdate(); 2738 } 2739 }; // protected 2740 2741 2742 _proto.isWithContent = function isWithContent() { 2743 return Boolean(this.getTitle()); 2744 }; 2745 2746 _proto.addAttachmentClass = function addAttachmentClass(attachment) { 2747 $(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment); 2748 }; 2749 2750 _proto.getTipElement = function getTipElement() { 2751 this.tip = this.tip || $(this.config.template)[0]; 2752 return this.tip; 2753 }; 2754 2755 _proto.setContent = function setContent() { 2756 var $tip = $(this.getTipElement()); 2757 this.setElementContent($tip.find(Selector.TOOLTIP_INNER), this.getTitle()); 2758 $tip.removeClass(ClassName.FADE + " " + ClassName.SHOW); 2759 }; 2760 2761 _proto.setElementContent = function setElementContent($element, content) { 2762 var html = this.config.html; 2763 2764 if (typeof content === 'object' && (content.nodeType || content.jquery)) { 2765 // content is a DOM node or a jQuery 2766 if (html) { 2767 if (!$(content).parent().is($element)) { 2768 $element.empty().append(content); 2769 } 2770 } else { 2771 $element.text($(content).text()); 2772 } 2773 } else { 2774 $element[html ? 'html' : 'text'](content); 2775 } 2776 }; 2777 2778 _proto.getTitle = function getTitle() { 2779 var title = this.element.getAttribute('data-original-title'); 2780 2781 if (!title) { 2782 title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title; 2783 } 2784 2785 return title; 2786 }; // private 2787 2788 2789 _proto._getAttachment = function _getAttachment(placement) { 2790 return AttachmentMap[placement.toUpperCase()]; 2791 }; 2792 2793 _proto._setListeners = function _setListeners() { 2794 var _this3 = this; 2795 2796 var triggers = this.config.trigger.split(' '); 2797 triggers.forEach(function (trigger) { 2798 if (trigger === 'click') { 2799 $(_this3.element).on(_this3.constructor.Event.CLICK, _this3.config.selector, function (event) { 2800 return _this3.toggle(event); 2801 }); 2802 } else if (trigger !== Trigger.MANUAL) { 2803 var eventIn = trigger === Trigger.HOVER ? _this3.constructor.Event.MOUSEENTER : _this3.constructor.Event.FOCUSIN; 2804 var eventOut = trigger === Trigger.HOVER ? _this3.constructor.Event.MOUSELEAVE : _this3.constructor.Event.FOCUSOUT; 2805 $(_this3.element).on(eventIn, _this3.config.selector, function (event) { 2806 return _this3._enter(event); 2807 }).on(eventOut, _this3.config.selector, function (event) { 2808 return _this3._leave(event); 2809 }); 2810 } 2811 2812 $(_this3.element).closest('.modal').on('hide.bs.modal', function () { 2813 return _this3.hide(); 2814 }); 2815 }); 2816 2817 if (this.config.selector) { 2818 this.config = $.extend({}, this.config, { 2819 trigger: 'manual', 2820 selector: '' 2821 }); 2822 } else { 2823 this._fixTitle(); 2824 } 2825 }; 2826 2827 _proto._fixTitle = function _fixTitle() { 2828 var titleType = typeof this.element.getAttribute('data-original-title'); 2829 2830 if (this.element.getAttribute('title') || titleType !== 'string') { 2831 this.element.setAttribute('data-original-title', this.element.getAttribute('title') || ''); 2832 this.element.setAttribute('title', ''); 2833 } 2834 }; 2835 2836 _proto._enter = function _enter(event, context) { 2837 var dataKey = this.constructor.DATA_KEY; 2838 context = context || $(event.currentTarget).data(dataKey); 2839 2840 if (!context) { 2841 context = new this.constructor(event.currentTarget, this._getDelegateConfig()); 2842 $(event.currentTarget).data(dataKey, context); 2843 } 2844 2845 if (event) { 2846 context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true; 2847 } 2848 2849 if ($(context.getTipElement()).hasClass(ClassName.SHOW) || context._hoverState === HoverState.SHOW) { 2850 context._hoverState = HoverState.SHOW; 2851 return; 2852 } 2853 2854 clearTimeout(context._timeout); 2855 context._hoverState = HoverState.SHOW; 2856 2857 if (!context.config.delay || !context.config.delay.show) { 2858 context.show(); 2859 return; 2860 } 2861 2862 context._timeout = setTimeout(function () { 2863 if (context._hoverState === HoverState.SHOW) { 2864 context.show(); 2865 } 2866 }, context.config.delay.show); 2867 }; 2868 2869 _proto._leave = function _leave(event, context) { 2870 var dataKey = this.constructor.DATA_KEY; 2871 context = context || $(event.currentTarget).data(dataKey); 2872 2873 if (!context) { 2874 context = new this.constructor(event.currentTarget, this._getDelegateConfig()); 2875 $(event.currentTarget).data(dataKey, context); 2876 } 2877 2878 if (event) { 2879 context._activeTrigger[event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER] = false; 2880 } 2881 2882 if (context._isWithActiveTrigger()) { 2883 return; 2884 } 2885 2886 clearTimeout(context._timeout); 2887 context._hoverState = HoverState.OUT; 2888 2889 if (!context.config.delay || !context.config.delay.hide) { 2890 context.hide(); 2891 return; 2892 } 2893 2894 context._timeout = setTimeout(function () { 2895 if (context._hoverState === HoverState.OUT) { 2896 context.hide(); 2897 } 2898 }, context.config.delay.hide); 2899 }; 2900 2901 _proto._isWithActiveTrigger = function _isWithActiveTrigger() { 2902 for (var trigger in this._activeTrigger) { 2903 if (this._activeTrigger[trigger]) { 2904 return true; 2905 } 2906 } 2907 2908 return false; 2909 }; 2910 2911 _proto._getConfig = function _getConfig(config) { 2912 config = $.extend({}, this.constructor.Default, $(this.element).data(), config); 2913 2914 if (typeof config.delay === 'number') { 2915 config.delay = { 2916 show: config.delay, 2917 hide: config.delay 2918 }; 2919 } 2920 2921 if (typeof config.title === 'number') { 2922 config.title = config.title.toString(); 2923 } 2924 2925 if (typeof config.content === 'number') { 2926 config.content = config.content.toString(); 2927 } 2928 2929 Util.typeCheckConfig(NAME, config, this.constructor.DefaultType); 2930 return config; 2931 }; 2932 2933 _proto._getDelegateConfig = function _getDelegateConfig() { 2934 var config = {}; 2935 2936 if (this.config) { 2937 for (var key in this.config) { 2938 if (this.constructor.Default[key] !== this.config[key]) { 2939 config[key] = this.config[key]; 2940 } 2941 } 2942 } 2943 2944 return config; 2945 }; 2946 2947 _proto._cleanTipClass = function _cleanTipClass() { 2948 var $tip = $(this.getTipElement()); 2949 var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX); 2950 2951 if (tabClass !== null && tabClass.length > 0) { 2952 $tip.removeClass(tabClass.join(''));
vendor: 5,972 bytes, lines 2953-3158
2953 } 2954 }; 2955 2956 _proto._handlePopperPlacementChange = function _handlePopperPlacementChange(data) { 2957 this._cleanTipClass(); 2958 2959 this.addAttachmentClass(this._getAttachment(data.placement)); 2960 }; 2961 2962 _proto._fixTransition = function _fixTransition() { 2963 var tip = this.getTipElement(); 2964 var initConfigAnimation = this.config.animation; 2965 2966 if (tip.getAttribute('x-placement') !== null) { 2967 return; 2968 } 2969 2970 $(tip).removeClass(ClassName.FADE); 2971 this.config.animation = false; 2972 this.hide(); 2973 this.show(); 2974 this.config.animation = initConfigAnimation; 2975 }; // static 2976 2977 2978 Tooltip._jQueryInterface = function _jQueryInterface(config) { 2979 return this.each(function () { 2980 var data = $(this).data(DATA_KEY); 2981 2982 var _config = typeof config === 'object' && config; 2983 2984 if (!data && /dispose|hide/.test(config)) { 2985 return; 2986 } 2987 2988 if (!data) { 2989 data = new Tooltip(this, _config); 2990 $(this).data(DATA_KEY, data); 2991 } 2992 2993 if (typeof config === 'string') { 2994 if (typeof data[config] === 'undefined') { 2995 throw new Error("No method named \"" + config + "\""); 2996 } 2997 2998 data[config](); 2999 } 3000 }); 3001 }; 3002 3003 createClass(Tooltip, null, [{ 3004 key: "VERSION", 3005 get: function get() { 3006 return VERSION; 3007 } 3008 }, { 3009 key: "Default", 3010 get: function get() { 3011 return Default; 3012 } 3013 }, { 3014 key: "NAME", 3015 get: function get() { 3016 return NAME; 3017 } 3018 }, { 3019 key: "DATA_KEY", 3020 get: function get() { 3021 return DATA_KEY; 3022 } 3023 }, { 3024 key: "Event", 3025 get: function get() { 3026 return Event; 3027 } 3028 }, { 3029 key: "EVENT_KEY", 3030 get: function get() { 3031 return EVENT_KEY; 3032 } 3033 }, { 3034 key: "DefaultType", 3035 get: function get() { 3036 return DefaultType; 3037 } 3038 }]); 3039 return Tooltip; 3040 }(); 3041 /** 3042 * ------------------------------------------------------------------------ 3043 * jQuery 3044 * ------------------------------------------------------------------------ 3045 */ 3046 3047 3048 $.fn[NAME] = Tooltip._jQueryInterface; 3049 $.fn[NAME].Constructor = Tooltip; 3050 3051 $.fn[NAME].noConflict = function () { 3052 $.fn[NAME] = JQUERY_NO_CONFLICT; 3053 return Tooltip._jQueryInterface; 3054 }; 3055 3056 return Tooltip; 3057}($, Popper); 3058 3059/** 3060 * -------------------------------------------------------------------------- 3061 * Bootstrap (v4.0.0-beta.2): popover.js 3062 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 3063 * -------------------------------------------------------------------------- 3064 */ 3065 3066var Popover = function () { 3067 /** 3068 * ------------------------------------------------------------------------ 3069 * Constants 3070 * ------------------------------------------------------------------------ 3071 */ 3072 var NAME = 'popover'; 3073 var VERSION = '4.0.0-beta.2'; 3074 var DATA_KEY = 'bs.popover'; 3075 var EVENT_KEY = "." + DATA_KEY; 3076 var JQUERY_NO_CONFLICT = $.fn[NAME]; 3077 var CLASS_PREFIX = 'bs-popover'; 3078 var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g'); 3079 var Default = $.extend({}, Tooltip.Default, { 3080 placement: 'right', 3081 trigger: 'click', 3082 content: '', 3083 template: '<div class="popover" role="tooltip">' + '<div class="arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>' 3084 }); 3085 var DefaultType = $.extend({}, Tooltip.DefaultType, { 3086 content: '(string|element|function)' 3087 }); 3088 var ClassName = { 3089 FADE: 'fade', 3090 SHOW: 'show' 3091 }; 3092 var Selector = { 3093 TITLE: '.popover-header', 3094 CONTENT: '.popover-body' 3095 }; 3096 var Event = { 3097 HIDE: "hide" + EVENT_KEY, 3098 HIDDEN: "hidden" + EVENT_KEY, 3099 SHOW: "show" + EVENT_KEY, 3100 SHOWN: "shown" + EVENT_KEY, 3101 INSERTED: "inserted" + EVENT_KEY, 3102 CLICK: "click" + EVENT_KEY, 3103 FOCUSIN: "focusin" + EVENT_KEY, 3104 FOCUSOUT: "focusout" + EVENT_KEY, 3105 MOUSEENTER: "mouseenter" + EVENT_KEY, 3106 MOUSELEAVE: "mouseleave" + EVENT_KEY 3107 /** 3108 * ------------------------------------------------------------------------ 3109 * Class Definition 3110 * ------------------------------------------------------------------------ 3111 */ 3112 3113 }; 3114 3115 var Popover = 3116 /*#__PURE__*/ 3117 function (_Tooltip) { 3118 inheritsLoose(Popover, _Tooltip); 3119 3120 function Popover() { 3121 return _Tooltip.apply(this, arguments) || this; 3122 } 3123 3124 var _proto = Popover.prototype; 3125 3126 // overrides 3127 _proto.isWithContent = function isWithContent() { 3128 return this.getTitle() || this._getContent(); 3129 }; 3130 3131 _proto.addAttachmentClass = function addAttachmentClass(attachment) { 3132 $(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment); 3133 }; 3134 3135 _proto.getTipElement = function getTipElement() { 3136 this.tip = this.tip || $(this.config.template)[0]; 3137 return this.tip; 3138 }; 3139 3140 _proto.setContent = function setContent() { 3141 var $tip = $(this.getTipElement()); // we use append for html objects to maintain js events 3142 3143 this.setElementContent($tip.find(Selector.TITLE), this.getTitle()); 3144 this.setElementContent($tip.find(Selector.CONTENT), this._getContent()); 3145 $tip.removeClass(ClassName.FADE + " " + ClassName.SHOW); 3146 }; // private 3147 3148 3149 _proto._getContent = function _getContent() { 3150 return this.element.getAttribute('data-content') || (typeof this.config.content === 'function' ? this.config.content.call(this.element) : this.config.content); 3151 }; 3152 3153 _proto._cleanTipClass = function _cleanTipClass() { 3154 var $tip = $(this.getTipElement()); 3155 var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX); 3156 3157 if (tabClass !== null && tabClass.length > 0) { 3158 $tip.removeClass(tabClass.join(''));
vendor: 4,146 bytes, lines 3159-3315
3159 } 3160 }; // static 3161 3162 3163 Popover._jQueryInterface = function _jQueryInterface(config) { 3164 return this.each(function () { 3165 var data = $(this).data(DATA_KEY); 3166 3167 var _config = typeof config === 'object' ? config : null; 3168 3169 if (!data && /destroy|hide/.test(config)) { 3170 return; 3171 } 3172 3173 if (!data) { 3174 data = new Popover(this, _config); 3175 $(this).data(DATA_KEY, data); 3176 } 3177 3178 if (typeof config === 'string') { 3179 if (typeof data[config] === 'undefined') { 3180 throw new Error("No method named \"" + config + "\""); 3181 } 3182 3183 data[config](); 3184 } 3185 }); 3186 }; 3187 3188 createClass(Popover, null, [{ 3189 key: "VERSION", 3190 // getters 3191 get: function get() { 3192 return VERSION; 3193 } 3194 }, { 3195 key: "Default", 3196 get: function get() { 3197 return Default; 3198 } 3199 }, { 3200 key: "NAME", 3201 get: function get() { 3202 return NAME; 3203 } 3204 }, { 3205 key: "DATA_KEY", 3206 get: function get() { 3207 return DATA_KEY; 3208 } 3209 }, { 3210 key: "Event", 3211 get: function get() { 3212 return Event; 3213 } 3214 }, { 3215 key: "EVENT_KEY", 3216 get: function get() { 3217 return EVENT_KEY; 3218 } 3219 }, { 3220 key: "DefaultType", 3221 get: function get() { 3222 return DefaultType; 3223 } 3224 }]); 3225 return Popover; 3226 }(Tooltip); 3227 /** 3228 * ------------------------------------------------------------------------ 3229 * jQuery 3230 * ------------------------------------------------------------------------ 3231 */ 3232 3233 3234 $.fn[NAME] = Popover._jQueryInterface; 3235 $.fn[NAME].Constructor = Popover; 3236 3237 $.fn[NAME].noConflict = function () { 3238 $.fn[NAME] = JQUERY_NO_CONFLICT; 3239 return Popover._jQueryInterface; 3240 }; 3241 3242 return Popover; 3243}($); 3244 3245/** 3246 * -------------------------------------------------------------------------- 3247 * Bootstrap (v4.0.0-beta.2): scrollspy.js 3248 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 3249 * -------------------------------------------------------------------------- 3250 */ 3251 3252var ScrollSpy = function () { 3253 /** 3254 * ------------------------------------------------------------------------ 3255 * Constants 3256 * ------------------------------------------------------------------------ 3257 */ 3258 var NAME = 'scrollspy'; 3259 var VERSION = '4.0.0-beta.2'; 3260 var DATA_KEY = 'bs.scrollspy'; 3261 var EVENT_KEY = "." + DATA_KEY; 3262 var DATA_API_KEY = '.data-api'; 3263 var JQUERY_NO_CONFLICT = $.fn[NAME]; 3264 var Default = { 3265 offset: 10, 3266 method: 'auto', 3267 target: '' 3268 }; 3269 var DefaultType = { 3270 offset: 'number', 3271 method: 'string', 3272 target: '(string|element)' 3273 }; 3274 var Event = { 3275 ACTIVATE: "activate" + EVENT_KEY, 3276 SCROLL: "scroll" + EVENT_KEY, 3277 LOAD_DATA_API: "load" + EVENT_KEY + DATA_API_KEY 3278 }; 3279 var ClassName = { 3280 DROPDOWN_ITEM: 'dropdown-item', 3281 DROPDOWN_MENU: 'dropdown-menu', 3282 ACTIVE: 'active' 3283 }; 3284 var Selector = { 3285 DATA_SPY: '[data-spy="scroll"]', 3286 ACTIVE: '.active', 3287 NAV_LIST_GROUP: '.nav, .list-group', 3288 NAV_LINKS: '.nav-link', 3289 NAV_ITEMS: '.nav-item', 3290 LIST_ITEMS: '.list-group-item', 3291 DROPDOWN: '.dropdown', 3292 DROPDOWN_ITEMS: '.dropdown-item', 3293 DROPDOWN_TOGGLE: '.dropdown-toggle' 3294 }; 3295 var OffsetMethod = { 3296 OFFSET: 'offset', 3297 POSITION: 'position' 3298 /** 3299 * ------------------------------------------------------------------------ 3300 * Class Definition 3301 * ------------------------------------------------------------------------ 3302 */ 3303 3304 }; 3305 3306 var ScrollSpy = 3307 /*#__PURE__*/ 3308 function () { 3309 function ScrollSpy(element, config) { 3310 var _this = this; 3311 3312 this._element = element; 3313 this._scrollElement = element.tagName === 'BODY' ? window : element; 3314 this._config = this._getConfig(config); 3315 this._selector = this._config.target + " " + Selector.NAV_LINKS + "," + (this._config.target + " " + Selector.LIST_ITEMS + ",") + (this._config.target + " " + Selector.DROPDOWN_IT
3315EMS); 3316 this._offsets = []; 3317 this._targets = []; 3318 this._activeTarget = null; 3319 this._scrollHeight = 0; 3320 $(this._scrollElement).on(Event.SCROLL, function (event) { 3321 return _this._process(event); 3322 }); 3323 this.refresh(); 3324 3325 this._process(); 3326 } // getters 3327 3328 3329 var _proto = ScrollSpy.prototype; 3330 3331 // public 3332 _proto.refresh = function refresh() { 3333 var _this2 = this; 3334 3335 var autoMethod = this._scrollElement !== this._scrollElement.window ? OffsetMethod.POSITION : OffsetMethod.OFFSET; 3336 var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method; 3337 var offsetBase = offsetMethod === OffsetMethod.POSITION ? this._getScrollTop() : 0; 3338 this._offsets = []; 3339 this._targets = []; 3340 this._scrollHeight = this._getScrollHeight(); 3341 var targets = $.makeArray($(this._selector)); 3342 targets.map(function (element) { 3343 var target; 3344 var targetSelector = Util.getSelectorFromElement(element); 3345 3346 if (targetSelector) { 3347 target = $(targetSelector)[0]; 3348 } 3349 3350 if (target) { 3351 var targetBCR = target.getBoundingClientRect(); 3352 3353 if (targetBCR.width || targetBCR.height) { 3354 // todo (fat): remove sketch reliance on jQuery position/offset 3355 return [$(target)[offsetMethod]().top + offsetBase, targetSelector]; 3356 } 3357 } 3358 3359 return null; 3360 }).filter(function (item) { 3361 return item; 3362 }).sort(function (a, b) { 3363 return a[0] - b[0]; 3364 }
vendor: 4,525 bytes, lines 3364-3501
3364).forEach(function (item) { 3365 _this2._offsets.push(item[0]); 3366 3367 _this2._targets.push(item[1]); 3368 }); 3369 }; 3370 3371 _proto.dispose = function dispose() { 3372 $.removeData(this._element, DATA_KEY); 3373 $(this._scrollElement).off(EVENT_KEY); 3374 this._element = null; 3375 this._scrollElement = null; 3376 this._config = null; 3377 this._selector = null; 3378 this._offsets = null; 3379 this._targets = null; 3380 this._activeTarget = null; 3381 this._scrollHeight = null; 3382 }; // private 3383 3384 3385 _proto._getConfig = function _getConfig(config) { 3386 config = $.extend({}, Default, config); 3387 3388 if (typeof config.target !== 'string') { 3389 var id = $(config.target).attr('id'); 3390 3391 if (!id) { 3392 id = Util.getUID(NAME); 3393 $(config.target).attr('id', id); 3394 } 3395 3396 config.target = "#" + id; 3397 } 3398 3399 Util.typeCheckConfig(NAME, config, DefaultType); 3400 return config; 3401 }; 3402 3403 _proto._getScrollTop = function _getScrollTop() { 3404 return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop; 3405 }; 3406 3407 _proto._getScrollHeight = function _getScrollHeight() { 3408 return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight); 3409 }; 3410 3411 _proto._getOffsetHeight = function _getOffsetHeight() { 3412 return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height; 3413 }; 3414 3415 _proto._process = function _process() { 3416 var scrollTop = this._getScrollTop() + this._config.offset; 3417 3418 var scrollHeight = this._getScrollHeight(); 3419 3420 var maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight(); 3421 3422 if (this._scrollHeight !== scrollHeight) { 3423 this.refresh(); 3424 } 3425 3426 if (scrollTop >= maxScroll) { 3427 var target = this._targets[this._targets.length - 1]; 3428 3429 if (this._activeTarget !== target) { 3430 this._activate(target); 3431 } 3432 3433 return; 3434 } 3435 3436 if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) { 3437 this._activeTarget = null; 3438 3439 this._clear(); 3440 3441 return; 3442 } 3443 3444 for (var i = this._offsets.length; i--;) { 3445 var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1]); 3446 3447 if (isActiveTarget) { 3448 this._activate(this._targets[i]); 3449 } 3450 } 3451 }; 3452 3453 _proto._activate = function _activate(target) { 3454 this._activeTarget = target; 3455 3456 this._clear(); 3457 3458 var queries = this._selector.split(','); // eslint-disable-next-line arrow-body-style 3459 3460 3461 queries = queries.map(function (selector) { 3462 return selector + "[data-target=\"" + target + "\"]," + (selector + "[href=\"" + target + "\"]"); 3463 }); 3464 var $link = $(queries.join(',')); 3465 3466 if ($link.hasClass(ClassName.DROPDOWN_ITEM)) { 3467 $link.closest(Selector.DROPDOWN).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE); 3468 $link.addClass(ClassName.ACTIVE); 3469 } else { 3470 // Set triggered link as active 3471 $link.addClass(ClassName.ACTIVE); // Set triggered links parents as active 3472 // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor 3473 3474 $link.parents(Selector.NAV_LIST_GROUP).prev(Selector.NAV_LINKS + ", " + Selector.LIST_ITEMS).addClass(ClassName.ACTIVE); // Handle special case when .nav-link is inside .nav-item 3475 3476 $link.parents(Selector.NAV_LIST_GROUP).prev(Selector.NAV_ITEMS).children(Selector.NAV_LINKS).addClass(ClassName.ACTIVE); 3477 } 3478 3479 $(this._scrollElement).trigger(Event.ACTIVATE, { 3480 relatedTarget: target 3481 }); 3482 }; 3483 3484 _proto._clear = function _clear() { 3485 $(this._selector).filter(Selector.ACTIVE).removeClass(ClassName.ACTIVE); 3486 }; // static 3487 3488 3489 ScrollSpy._jQueryInterface = function _jQueryInterface(config) { 3490 return this.each(function () { 3491 var data = $(this).data(DATA_KEY); 3492 3493 var _config = typeof config === 'object' && config; 3494 3495 if (!data) { 3496 data = new ScrollSpy(this, _config); 3497 $(this).data(DATA_KEY, data); 3498 } 3499 3500 if (typeof config === 'string') { 3501 if (typeof data[config] === 'undefined') {
3502 throw new Error("No method named \"" + config + "\""); 3503 } 3504 3505 data[config](); 3506 } 3507 }); 3508 }; 3509 3510 createClass(ScrollSpy, null, [{ 3511 key: "VERSION", 3512 get: function get() { 3513 return VERSION; 3514 } 3515 }, { 3516 key: "Default", 3517 get: function get() { 3518 return Default; 3519 } 3520 }]); 3521 return ScrollSpy; 3522 }(); 3523 /** 3524 * ------------------------------------------------------------------------ 3525 * Data Api implementation 3526 * ------------------------------------------------------------------------ 3527 */ 3528 3529 3530 $(window).on(Event.LOAD_DATA_API, function () { 3531 var scrollSpys = $.makeArray($(Selector.DATA_SPY)); 3532 3533 for (var i = scrollSpys.length; i--;) { 3534 var $spy = $(scrollSpys[i]); 3535 3536 ScrollSpy._jQueryInterface.call($spy, $spy.data()); 3537 } 3538 }); 3539 /** 3540 * ------------------------------------------------------------------------ 3541 * jQuery 3542 * ------------------------------------------------------------------------ 3543 */ 3544 3545 $.fn[NAME] = ScrollSpy._jQueryInterface; 3546 $.fn[NAME].Constructor = ScrollSpy; 3547 3548 $.fn[NAME].noConflict = function () { 3549 $.fn[NAME] = JQUERY_NO_CONFLICT; 3550 return ScrollSpy._jQueryInterface; 3551 }; 3552 3553 return ScrollSpy; 3554}($); 3555 3556/** 3557 * -------------------------------------------------------------------------- 3558 * Bootstrap (v4.0.0-beta.2): tab.js 3559 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 3560 * -------------------------------------------------------------------------- 3561 */ 3562 3563var Tab = function () { 3564 /** 3565 * ------------------------------------------------------------------------ 3566 * Constants 3567 * ------------------------------------------------------------------------ 3568 */ 3569 var NAME = 'tab'; 3570 var VERSION = '4.0.0-beta.2'; 3571 var DATA_KEY = 'bs.tab'; 3572 var EVENT_KEY = "." + DATA_KEY; 3573 var DATA_API_KEY = '.data-api'; 3574 var JQUERY_NO_CONFLICT = $.fn[NAME]; 3575 var TRANSITION_DURATION = 150; 3576 var Event = { 3577 HIDE: "hide" + EVENT_KEY, 3578 HIDDEN: "hidden" + EVENT_KEY, 3579 SHOW: "show" + EVENT_KEY, 3580 SHOWN: "shown" + EVENT_KEY, 3581 CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY 3582 }; 3583 var ClassName = { 3584 DROPDOWN_MENU: 'dropdown-menu', 3585 ACTIVE: 'active', 3586 DISABLED: 'disabled', 3587 FADE: 'fade', 3588 SHOW: 'show' 3589 }; 3590 var Selector = { 3591 DROPDOWN: '.dropdown', 3592 NAV_LIST_GROUP: '.nav, .list-group', 3593 ACTIVE: '.active', 3594 ACTIVE_UL: '> li > .active', 3595 DATA_TOGGLE: '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]', 3596 DROPDOWN_TOGGLE: '.dropdown-toggle', 3597 DROPDOWN_ACTIVE_CHILD: '> .dropdown-menu .active' 3598 /** 3599 * ------------------------------------------------------------------------ 3600 * Class Definition 3601 * ------------------------------------------------------------------------ 3602 */ 3603 3604 }; 3605 3606 var Tab = 3607 /*#__PURE__*/ 3608 function () { 3609 function Tab(element) { 3610 this._element = element; 3611 } // getters 3612 3613 3614 var _proto = Tab.prototype; 3615 3616 // public 3617 _proto.show = function show() { 3618 var _this = this; 3619 3620 if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $(this._element).hasClass(ClassName.ACTIVE) || $(this._element).hasClass(ClassName.DISABLED)) { 3621 return; 3622 } 3623 3624 var target; 3625 var previous; 3626 var listElement = $(this._element).closest(Selector.NAV_LIST_GROUP)[0]; 3627 var selector = Util.getSelectorFromElement(this._element); 3628 3629 if (listElement) { 3630 var itemSelector = listElement.nodeName === 'UL' ? Selector.ACTIVE_UL : Selector.ACTIVE; 3631 previous = $.makeArray($(listElement).find(itemSelector)); 3632 previous = previous[previous.length - 1]; 3633 } 3634 3635 var hideEvent = $.Event(Event.HIDE, { 3636 relatedTarget: this._element 3637 }); 3638 var showEvent = $.Event(Event.SHOW, { 3639 relatedTarget: previous 3640 }); 3641 3642 if (previous) { 3643 $(previous).trigger(hideEvent); 3644 } 3645 3646 $(this._element).trigger(showEvent); 3647 3648 if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) { 3649 return; 3650 } 3651 3652 if (selector) { 3653 target = $(selector)[0]; 3654 } 3655 3656 this._activate(this._element, listElement); 3657 3658 var complete = function complete() { 3659 var hiddenEvent = $.Event(Event.HIDDEN, { 3660 relatedTarget: _this._element 3661 }); 3662 var shownEvent = $.Event(Event.SHOWN, { 3663 relatedTarget: previous 3664 }); 3665 $(previous).trigger(hiddenEvent); 3666 $(_this._element).trigger(shownEvent); 3667 }; 3668 3669 if (target) { 3670 this._activate(target, target.parentNode, complete); 3671 } else { 3672 complete(); 3673 } 3674 }; 3675 3676 _proto.dispose = function dispose() { 3677 $.removeData(this._element, DATA_KEY); 3678 this._element = null; 3679 }; // private 3680 3681 3682 _proto._activate = function _activate(element, container, callback) { 3683 var _this2 = this; 3684 3685 var activeElements; 3686 3687 if (container.nodeName === 'UL') { 3688 activeElements = $(container).find(Selector.ACTIVE_UL); 3689 } else { 3690 activeElements = $(container).children(Selector.ACTIVE); 3691 } 3692 3693 var active = activeElements[0]; 3694 var isTransitioning = callback && Util.supportsTransitionEnd() && active && $(active).hasClass(ClassName.FADE); 3695 3696 var complete = function complete() { 3697 return _this2._transitionComplete(element, active, isTransitioning, callback); 3698 }; 3699 3700 if (active && isTransitioning) { 3701 $(active).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION); 3702 } else { 3703 complete(); 3704 } 3705 3706 if (active) { 3707 $(active).removeClass(ClassName.SHOW); 3708 } 3709 }; 3710 3711 _proto._transitionComplete = function _transitionComplete(element, active, isTransitioning, callback) { 3712 if (active) { 3713 $(active).removeClass(ClassName.ACTIVE);
vendor: 3,851 bytes, lines 3714-3850
3714 var dropdownChild = $(active.parentNode).find(Selector.DROPDOWN_ACTIVE_CHILD)[0]; 3715 3716 if (dropdownChild) { 3717 $(dropdownChild).removeClass(ClassName.ACTIVE); 3718 } 3719 3720 if (active.getAttribute('role') === 'tab') { 3721 active.setAttribute('aria-selected', false); 3722 } 3723 } 3724 3725 $(element).addClass(ClassName.ACTIVE); 3726 3727 if (element.getAttribute('role') === 'tab') { 3728 element.setAttribute('aria-selected', true); 3729 } 3730 3731 if (isTransitioning) { 3732 Util.reflow(element); 3733 $(element).addClass(ClassName.SHOW); 3734 } else { 3735 $(element).removeClass(ClassName.FADE); 3736 } 3737 3738 if (element.parentNode && $(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) { 3739 var dropdownElement = $(element).closest(Selector.DROPDOWN)[0]; 3740 3741 if (dropdownElement) { 3742 $(dropdownElement).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE); 3743 } 3744 3745 element.setAttribute('aria-expanded', true); 3746 } 3747 3748 if (callback) { 3749 callback(); 3750 } 3751 }; // static 3752 3753 3754 Tab._jQueryInterface = function _jQueryInterface(config) { 3755 return this.each(function () { 3756 var $this = $(this); 3757 var data = $this.data(DATA_KEY); 3758 3759 if (!data) { 3760 data = new Tab(this); 3761 $this.data(DATA_KEY, data); 3762 } 3763 3764 if (typeof config === 'string') { 3765 if (typeof data[config] === 'undefined') { 3766 throw new Error("No method named \"" + config + "\""); 3767 } 3768 3769 data[config](); 3770 } 3771 }); 3772 }; 3773 3774 createClass(Tab, null, [{ 3775 key: "VERSION", 3776 get: function get() { 3777 return VERSION; 3778 } 3779 }]); 3780 return Tab; 3781 }(); 3782 /** 3783 * ------------------------------------------------------------------------ 3784 * Data Api implementation 3785 * ------------------------------------------------------------------------ 3786 */ 3787 3788 3789 $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { 3790 event.preventDefault(); 3791 3792 Tab._jQueryInterface.call($(this), 'show'); 3793 }); 3794 /** 3795 * ------------------------------------------------------------------------ 3796 * jQuery 3797 * ------------------------------------------------------------------------ 3798 */ 3799 3800 $.fn[NAME] = Tab._jQueryInterface; 3801 $.fn[NAME].Constructor = Tab; 3802 3803 $.fn[NAME].noConflict = function () { 3804 $.fn[NAME] = JQUERY_NO_CONFLICT; 3805 return Tab._jQueryInterface; 3806 }; 3807 3808 return Tab; 3809}($); 3810 3811/** 3812 * -------------------------------------------------------------------------- 3813 * Bootstrap (v4.0.0-alpha.6): index.js 3814 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 3815 * -------------------------------------------------------------------------- 3816 */ 3817 3818(function () { 3819 if (typeof $ === 'undefined') { 3820 throw new Error('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.'); 3821 } 3822 3823 var version = $.fn.jquery.split(' ')[0].split('.'); 3824 var minMajor = 1; 3825 var ltMajor = 2; 3826 var minMinor = 9; 3827 var minPatch = 1; 3828 var maxMajor = 4; 3829 3830 if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >= maxMajor) { 3831 throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0'); 3832 } 3833})($); 3834 3835exports.Util = Util; 3836exports.Alert = Alert; 3837exports.Button = Button; 3838exports.Carousel = Carousel; 3839exports.Collapse = Collapse; 3840exports.Dropdown = Dropdown; 3841exports.Modal = Modal; 3842exports.Popover = Popover; 3843exports.Scrollspy = ScrollSpy; 3844exports.Tab = Tab; 3845exports.Tooltip = Tooltip; 3846 3847return exports; 3848 3849}({},$,Popper)); 3850//# sourceMappingURL=bootstrap.js.map
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.