vendor: 5,286 bytes, lines 1-190
1/*! 2 * Bootstrap v3.4.1 (https://getbootstrap.com/) 3 * Copyright 2011-2019 Twitter, Inc. 4 * Licensed under the MIT license 5 */ 6 7if (typeof jQuery === 'undefined') { 8 throw new Error('Bootstrap\'s JavaScript requires jQuery') 9} 10 11+function ($) { 12 'use strict'; 13 var version = $.fn.jquery.split(' ')[0].split('.') 14 if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 3)) { 15 throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4') 16 } 17}(jQuery); 18 19/* ======================================================================== 20 * Bootstrap: transition.js v3.4.1 21 * https://getbootstrap.com/docs/3.4/javascript/#transitions 22 * ======================================================================== 23 * Copyright 2011-2019 Twitter, Inc. 24 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 25 * ======================================================================== */ 26 27 28+function ($) { 29 'use strict'; 30 31 // CSS TRANSITION SUPPORT (Shoutout: https://modernizr.com/) 32 // ============================================================ 33 34 function transitionEnd() { 35 var el = document.createElement('bootstrap') 36 37 var transEndEventNames = { 38 WebkitTransition : 'webkitTransitionEnd', 39 MozTransition : 'transitionend', 40 OTransition : 'oTransitionEnd otransitionend', 41 transition : 'transitionend' 42 } 43 44 for (var name in transEndEventNames) { 45 if (el.style[name] !== undefined) { 46 return { end: transEndEventNames[name] } 47 } 48 } 49 50 return false // explicit for ie8 ( ._.) 51 } 52 53 // https://blog.alexmaccaw.com/css-transitions 54 $.fn.emulateTransitionEnd = function (duration) { 55 var called = false 56 var $el = this 57 $(this).one('bsTransitionEnd', function () { called = true }) 58 var callback = function () { if (!called) $($el).trigger($.support.transition.end) } 59 setTimeout(callback, duration) 60 return this 61 } 62 63 $(function () { 64 $.support.transition = transitionEnd() 65 66 if (!$.support.transition) return 67 68 $.event.special.bsTransitionEnd = { 69 bindType: $.support.transition.end, 70 delegateType: $.support.transition.end, 71 handle: function (e) { 72 if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments) 73 } 74 } 75 }) 76 77}(jQuery); 78 79/* ======================================================================== 80 * Bootstrap: alert.js v3.4.1 81 * https://getbootstrap.com/docs/3.4/javascript/#alerts 82 * ======================================================================== 83 * Copyright 2011-2019 Twitter, Inc. 84 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 85 * ======================================================================== */ 86 87 88+function ($) { 89 'use strict'; 90 91 // ALERT CLASS DEFINITION 92 // ====================== 93 94 var dismiss = '[data-dismiss="alert"]' 95 var Alert = function (el) { 96 $(el).on('click', dismiss, this.close) 97 } 98 99 Alert.VERSION = '3.4.1' 100 101 Alert.TRANSITION_DURATION = 150 102 103 Alert.prototype.close = function (e) { 104 var $this = $(this) 105 var selector = $this.attr('data-target') 106 107 if (!selector) { 108 selector = $this.attr('href') 109 selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 110 } 111 112 selector = selector === '#' ? [] : selector 113 var $parent = $(document).find(selector) 114 115 if (e) e.preventDefault() 116 117 if (!$parent.length) { 118 $parent = $this.closest('.alert') 119 } 120 121 $parent.trigger(e = $.Event('close.bs.alert')) 122 123 if (e.isDefaultPrevented()) return 124 125 $parent.removeClass('in') 126 127 function removeElement() { 128 // detach from parent, fire event then clean up data 129 $parent.detach().trigger('closed.bs.alert').remove() 130 } 131 132 $.support.transition && $parent.hasClass('fade') ? 133 $parent 134 .one('bsTransitionEnd', removeElement) 135 .emulateTransitionEnd(Alert.TRANSITION_DURATION) : 136 removeElement() 137 } 138 139 140 // ALERT PLUGIN DEFINITION 141 // ======================= 142 143 function Plugin(option) { 144 return this.each(function () { 145 var $this = $(this) 146 var data = $this.data('bs.alert') 147 148 if (!data) $this.data('bs.alert', (data = new Alert(this))) 149 if (typeof option == 'string') data[option].call($this) 150 }) 151 } 152 153 var old = $.fn.alert 154 155 $.fn.alert = Plugin 156 $.fn.alert.Constructor = Alert 157 158 159 // ALERT NO CONFLICT 160 // ================= 161 162 $.fn.alert.noConflict = function () { 163 $.fn.alert = old 164 return this 165 } 166 167 168 // ALERT DATA-API 169 // ============== 170 171 $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close) 172 173}(jQuery); 174 175/* ======================================================================== 176 * Bootstrap: button.js v3.4.1 177 * https://getbootstrap.com/docs/3.4/javascript/#buttons 178 * ======================================================================== 179 * Copyright 2011-2019 Twitter, Inc. 180 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 181 * ======================================================================== */ 182 183 184+function ($) { 185 'use strict'; 186 187 // BUTTON PUBLIC CLASS DEFINITION 188 // ============================== 189 190
vendor: 4,440 bytes, lines 190-347
190// IIC hardening: sanitize HTML button states using the upstream tooltip allowlist. 191 var uriAttrs = [ 192 'background', 193 'cite', 194 'href', 195 'itemtype', 196 'longdesc', 197 'poster', 198 'src', 199 'xlink:href' 200 ] 201 202 var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i 203 204 var DefaultWhitelist = { 205 // Global attributes allowed on any supplied element below. 206 '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN], 207 a: ['target', 'href', 'title', 'rel'], 208 area: [], 209 b: [], 210 br: [], 211 col: [], 212 code: [], 213 div: [], 214 em: [], 215 hr: [], 216 h1: [], 217 h2: [], 218 h3: [], 219 h4: [], 220 h5: [], 221 h6: [], 222 i: [], 223 img: ['src', 'alt', 'title', 'width', 'height'], 224 li: [], 225 ol: [], 226 p: [], 227 pre: [], 228 s: [], 229 small: [], 230 span: [], 231 sub: [], 232 sup: [], 233 strong: [], 234 u: [], 235 ul: [] 236 } 237 238 /** 239 * A pattern that recognizes a commonly useful subset of URLs that are safe. 240 * 241 * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts 242 */ 243 var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi 244 245 /** 246 * A pattern that matches safe data URLs. Only matches image, video and audio types. 247 * 248 * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts 249 */ 250 var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i 251 252 function allowedAttribute(attr, allowedAttributeList) { 253 var attrName = attr.nodeName.toLowerCase() 254 255 if ($.inArray(attrName, allowedAttributeList) !== -1) { 256 if ($.inArray(attrName, uriAttrs) !== -1) { 257 return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN)) 258 } 259 260 return true 261 } 262 263 var regExp = $(allowedAttributeList).filter(function (index, value) { 264 return value instanceof RegExp 265 }) 266 267 // Check if a regular expression validates the attribute. 268 for (var i = 0, l = regExp.length; i < l; i++) { 269 if (attrName.match(regExp[i])) { 270 return true 271 } 272 } 273 274 return false 275 } 276 277 function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) { 278 if (unsafeHtml.length === 0) { 279 return unsafeHtml 280 } 281 282 if (sanitizeFn && typeof sanitizeFn === 'function') { 283 return sanitizeFn(unsafeHtml) 284 } 285 286 // IE 8 and below don't support createHTMLDocument 287 if (!document.implementation || !document.implementation.createHTMLDocument) { 288 return $('<div>').text(unsafeHtml).html() 289 } 290 291 var createdDocument = document.implementation.createHTMLDocument('sanitization') 292 createdDocument.body.innerHTML = unsafeHtml 293 294 var whitelistKeys = $.map(whiteList, function (el, i) { return i }) 295 var elements = $(createdDocument.body).find('*') 296 297 for (var i = 0, len = elements.length; i < len; i++) { 298 var el = elements[i] 299 var elName = el.nodeName.toLowerCase() 300 301 if ($.inArray(elName, whitelistKeys) === -1) { 302 el.parentNode.removeChild(el) 303 304 continue 305 } 306 307 var attributeList = $.map(el.attributes, function (el) { return el }) 308 var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || []) 309 310 for (var j = 0, len2 = attributeList.length; j < len2; j++) { 311 if (!allowedAttribute(attributeList[j], whitelistedAttributes)) { 312 el.removeAttribute(attributeList[j].nodeName) 313 } 314 } 315 } 316 317 return createdDocument.body.innerHTML 318 } 319 320 321 var Button = function (element, options) { 322 this.$element = $(element) 323 this.options = $.extend({}, Button.DEFAULTS, options) 324 this.isLoading = false 325 } 326 327 Button.VERSION = '3.4.1' 328 329 Button.DEFAULTS = { 330 loadingText: 'loading...' 331 } 332 333 Button.prototype.setState = function (state) { 334 var d = 'disabled' 335 var $el = this.$element 336 var val = $el.is('input') ? 'val' : 'html' 337 var data = $el.data() 338 339 state += 'Text' 340 341 if (data.resetText == null) $el.data('resetText', $el[val]()) 342 343 // push to event loop to allow forms to submit 344 setTimeout($.proxy(function () { 345 var stateText = data[state] == null ? this.options[state] : data[state] 346 if (stateText != null && val === 'html') stateText = sanitizeHtml(String(stateText), DefaultWhitelist) 347 $el[val](stateText
vendor: 67,739 bytes, lines 347-2637
347) 348 349 if (state == 'loadingText') { 350 this.isLoading = true 351 $el.addClass(d).attr(d, d).prop(d, true) 352 } else if (this.isLoading) { 353 this.isLoading = false 354 $el.removeClass(d).removeAttr(d).prop(d, false) 355 } 356 }, this), 0) 357 } 358 359 Button.prototype.toggle = function () { 360 var changed = true 361 var $parent = this.$element.closest('[data-toggle="buttons"]') 362 363 if ($parent.length) { 364 var $input = this.$element.find('input') 365 if ($input.prop('type') == 'radio') { 366 if ($input.prop('checked')) changed = false 367 $parent.find('.active').removeClass('active') 368 this.$element.addClass('active') 369 } else if ($input.prop('type') == 'checkbox') { 370 if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false 371 this.$element.toggleClass('active') 372 } 373 $input.prop('checked', this.$element.hasClass('active')) 374 if (changed) $input.trigger('change') 375 } else { 376 this.$element.attr('aria-pressed', !this.$element.hasClass('active')) 377 this.$element.toggleClass('active') 378 } 379 } 380 381 382 // BUTTON PLUGIN DEFINITION 383 // ======================== 384 385 function Plugin(option) { 386 return this.each(function () { 387 var $this = $(this) 388 var data = $this.data('bs.button') 389 var options = typeof option == 'object' && option 390 391 if (!data) $this.data('bs.button', (data = new Button(this, options))) 392 393 if (option == 'toggle') data.toggle() 394 else if (option) data.setState(option) 395 }) 396 } 397 398 var old = $.fn.button 399 400 $.fn.button = Plugin 401 $.fn.button.Constructor = Button 402 403 404 // BUTTON NO CONFLICT 405 // ================== 406 407 $.fn.button.noConflict = function () { 408 $.fn.button = old 409 return this 410 } 411 412 413 // BUTTON DATA-API 414 // =============== 415 416 $(document) 417 .on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) { 418 var $btn = $(e.target).closest('.btn') 419 Plugin.call($btn, 'toggle') 420 if (!($(e.target).is('input[type="radio"], input[type="checkbox"]'))) { 421 // Prevent double click on radios, and the double selections (so cancellation) on checkboxes 422 e.preventDefault() 423 // The target component still receive the focus 424 if ($btn.is('input,button')) $btn.trigger('focus') 425 else $btn.find('input:visible,button:visible').first().trigger('focus') 426 } 427 }) 428 .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) { 429 $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type)) 430 }) 431 432}(jQuery); 433 434/* ======================================================================== 435 * Bootstrap: carousel.js v3.4.1 436 * https://getbootstrap.com/docs/3.4/javascript/#carousel 437 * ======================================================================== 438 * Copyright 2011-2019 Twitter, Inc. 439 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 440 * ======================================================================== */ 441 442 443+function ($) { 444 'use strict'; 445 446 // CAROUSEL CLASS DEFINITION 447 // ========================= 448 449 var Carousel = function (element, options) { 450 this.$element = $(element) 451 this.$indicators = this.$element.find('.carousel-indicators') 452 this.options = options 453 this.paused = null 454 this.sliding = null 455 this.interval = null 456 this.$active = null 457 this.$items = null 458 459 this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this)) 460 461 this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element 462 .on('mouseenter.bs.carousel', $.proxy(this.pause, this)) 463 .on('mouseleave.bs.carousel', $.proxy(this.cycle, this)) 464 } 465 466 Carousel.VERSION = '3.4.1' 467 468 Carousel.TRANSITION_DURATION = 600 469 470 Carousel.DEFAULTS = { 471 interval: 5000, 472 pause: 'hover', 473 wrap: true, 474 keyboard: true 475 } 476 477 Carousel.prototype.keydown = function (e) { 478 if (/input|textarea/i.test(e.target.tagName)) return 479 switch (e.which) { 480 case 37: this.prev(); break 481 case 39: this.next(); break 482 default: return 483 } 484 485 e.preventDefault() 486 } 487 488 Carousel.prototype.cycle = function (e) { 489 e || (this.paused = false) 490 491 this.interval && clearInterval(this.interval) 492 493 this.options.interval 494 && !this.paused 495 && (this.interval = setInterval($.proxy(this.next, this), this.options.interval)) 496 497 return this 498 } 499 500 Carousel.prototype.getItemIndex = function (item) { 501 this.$items = item.parent().children('.item') 502 return this.$items.index(item || this.$active) 503 } 504 505 Carousel.prototype.getItemForDirection = function (direction, active) { 506 var activeIndex = this.getItemIndex(active) 507 var willWrap = (direction == 'prev' && activeIndex === 0) 508 || (direction == 'next' && activeIndex == (this.$items.length - 1)) 509 if (willWrap && !this.options.wrap) return active 510 var delta = direction == 'prev' ? -1 : 1 511 var itemIndex = (activeIndex + delta) % this.$items.length 512 return this.$items.eq(itemIndex) 513 } 514 515 Carousel.prototype.to = function (pos) { 516 var that = this 517 var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active')) 518 519 if (pos > (this.$items.length - 1) || pos < 0) return 520 521 if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid" 522 if (activeIndex == pos) return this.pause().cycle() 523 524 return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos)) 525 } 526 527 Carousel.prototype.pause = function (e) { 528 e || (this.paused = true) 529 530 if (this.$element.find('.next, .prev').length && $.support.transition) { 531 this.$element.trigger($.support.transition.end) 532 this.cycle(true) 533 } 534 535 this.interval = clearInterval(this.interval) 536 537 return this 538 } 539 540 Carousel.prototype.next = function () { 541 if (this.sliding) return 542 return this.slide('next') 543 } 544 545 Carousel.prototype.prev = function () { 546 if (this.sliding) return 547 return this.slide('prev') 548 } 549 550 Carousel.prototype.slide = function (type, next) { 551 var $active = this.$element.find('.item.active') 552 var $next = next || this.getItemForDirection(type, $active) 553 var isCycling = this.interval 554 var direction = type == 'next' ? 'left' : 'right' 555 var that = this 556 557 if ($next.hasClass('active')) return (this.sliding = false) 558 559 var relatedTarget = $next[0] 560 var slideEvent = $.Event('slide.bs.carousel', { 561 relatedTarget: relatedTarget, 562 direction: direction 563 }) 564 this.$element.trigger(slideEvent) 565 if (slideEvent.isDefaultPrevented()) return 566 567 this.sliding = true 568 569 isCycling && this.pause() 570 571 if (this.$indicators.length) { 572 this.$indicators.find('.active').removeClass('active') 573 var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)]) 574 $nextIndicator && $nextIndicator.addClass('active') 575 } 576 577 var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid" 578 if ($.support.transition && this.$element.hasClass('slide')) { 579 $next.addClass(type) 580 if (typeof $next === 'object' && $next.length) { 581 $next[0].offsetWidth // force reflow 582 } 583 $active.addClass(direction) 584 $next.addClass(direction) 585 $active 586 .one('bsTransitionEnd', function () { 587 $next.removeClass([type, direction].join(' ')).addClass('active') 588 $active.removeClass(['active', direction].join(' ')) 589 that.sliding = false 590 setTimeout(function () { 591 that.$element.trigger(slidEvent) 592 }, 0) 593 }) 594 .emulateTransitionEnd(Carousel.TRANSITION_DURATION) 595 } else { 596 $active.removeClass('active') 597 $next.addClass('active') 598 this.sliding = false 599 this.$element.trigger(slidEvent) 600 } 601 602 isCycling && this.cycle() 603 604 return this 605 } 606 607 608 // CAROUSEL PLUGIN DEFINITION 609 // ========================== 610 611 function Plugin(option) { 612 return this.each(function () { 613 var $this = $(this) 614 var data = $this.data('bs.carousel') 615 var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option) 616 var action = typeof option == 'string' ? option : options.slide 617 618 if (!data) $this.data('bs.carousel', (data = new Carousel(this, options))) 619 if (typeof option == 'number') data.to(option) 620 else if (action) data[action]() 621 else if (options.interval) data.pause().cycle() 622 }) 623 } 624 625 var old = $.fn.carousel 626 627 $.fn.carousel = Plugin 628 $.fn.carousel.Constructor = Carousel 629 630 631 // CAROUSEL NO CONFLICT 632 // ==================== 633 634 $.fn.carousel.noConflict = function () { 635 $.fn.carousel = old 636 return this 637 } 638 639 640 // CAROUSEL DATA-API 641 // ================= 642 643 var clickHandler = function (e) { 644 var $this = $(this) 645 var href = $this.attr('href') 646 if (href) { 647 href = href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7 648 } 649 650 var target = $this.attr('data-target') || href 651 var $target = $(document).find(target) 652 653 if (!$target.hasClass('carousel')) return 654 655 var options = $.extend({}, $target.data(), $this.data()) 656 var slideIndex = $this.attr('data-slide-to') 657 if (slideIndex) options.interval = false 658 659 Plugin.call($target, options) 660 661 if (slideIndex) { 662 $target.data('bs.carousel').to(slideIndex) 663 } 664 665 e.preventDefault() 666 } 667 668 $(document) 669 .on('click.bs.carousel.data-api', '[data-slide]', clickHandler) 670 .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler) 671 672 $(window).on('load', function () { 673 $('[data-ride="carousel"]').each(function () { 674 var $carousel = $(this) 675 Plugin.call($carousel, $carousel.data()) 676 }) 677 }) 678 679}(jQuery); 680 681/* ======================================================================== 682 * Bootstrap: collapse.js v3.4.1 683 * https://getbootstrap.com/docs/3.4/javascript/#collapse 684 * ======================================================================== 685 * Copyright 2011-2019 Twitter, Inc. 686 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 687 * ======================================================================== */ 688 689/* jshint latedef: false */ 690 691+function ($) { 692 'use strict'; 693 694 // COLLAPSE PUBLIC CLASS DEFINITION 695 // ================================ 696 697 var Collapse = function (element, options) { 698 this.$element = $(element) 699 this.options = $.extend({}, Collapse.DEFAULTS, options) 700 this.$trigger = $('[data-toggle="collapse"][href="#' + element.id + '"],' + 701 '[data-toggle="collapse"][data-target="#' + element.id + '"]') 702 this.transitioning = null 703 704 if (this.options.parent) { 705 this.$parent = this.getParent() 706 } else { 707 this.addAriaAndCollapsedClass(this.$element, this.$trigger) 708 } 709 710 if (this.options.toggle) this.toggle() 711 } 712 713 Collapse.VERSION = '3.4.1' 714 715 Collapse.TRANSITION_DURATION = 350 716 717 Collapse.DEFAULTS = { 718 toggle: true 719 } 720 721 Collapse.prototype.dimension = function () { 722 var hasWidth = this.$element.hasClass('width') 723 return hasWidth ? 'width' : 'height' 724 } 725 726 Collapse.prototype.show = function () { 727 if (this.transitioning || this.$element.hasClass('in')) return 728 729 var activesData 730 var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing') 731 732 if (actives && actives.length) { 733 activesData = actives.data('bs.collapse') 734 if (activesData && activesData.transitioning) return 735 } 736 737 var startEvent = $.Event('show.bs.collapse') 738 this.$element.trigger(startEvent) 739 if (startEvent.isDefaultPrevented()) return 740 741 if (actives && actives.length) { 742 Plugin.call(actives, 'hide') 743 activesData || actives.data('bs.collapse', null) 744 } 745 746 var dimension = this.dimension() 747 748 this.$element 749 .removeClass('collapse') 750 .addClass('collapsing')[dimension](0) 751 .attr('aria-expanded', true) 752 753 this.$trigger 754 .removeClass('collapsed') 755 .attr('aria-expanded', true) 756 757 this.transitioning = 1 758 759 var complete = function () { 760 this.$element 761 .removeClass('collapsing') 762 .addClass('collapse in')[dimension]('') 763 this.transitioning = 0 764 this.$element 765 .trigger('shown.bs.collapse') 766 } 767 768 if (!$.support.transition) return complete.call(this) 769 770 var scrollSize = $.camelCase(['scroll', dimension].join('-')) 771 772 this.$element 773 .one('bsTransitionEnd', $.proxy(complete, this)) 774 .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize]) 775 } 776 777 Collapse.prototype.hide = function () { 778 if (this.transitioning || !this.$element.hasClass('in')) return 779 780 var startEvent = $.Event('hide.bs.collapse') 781 this.$element.trigger(startEvent) 782 if (startEvent.isDefaultPrevented()) return 783 784 var dimension = this.dimension() 785 786 this.$element[dimension](this.$element[dimension]())[0].offsetHeight 787 788 this.$element 789 .addClass('collapsing') 790 .removeClass('collapse in') 791 .attr('aria-expanded', false) 792 793 this.$trigger 794 .addClass('collapsed') 795 .attr('aria-expanded', false) 796 797 this.transitioning = 1 798 799 var complete = function () { 800 this.transitioning = 0 801 this.$element 802 .removeClass('collapsing') 803 .addClass('collapse') 804 .trigger('hidden.bs.collapse') 805 } 806 807 if (!$.support.transition) return complete.call(this) 808 809 this.$element 810 [dimension](0) 811 .one('bsTransitionEnd', $.proxy(complete, this)) 812 .emulateTransitionEnd(Collapse.TRANSITION_DURATION) 813 } 814 815 Collapse.prototype.toggle = function () { 816 this[this.$element.hasClass('in') ? 'hide' : 'show']() 817 } 818 819 Collapse.prototype.getParent = function () { 820 return $(document).find(this.options.parent) 821 .find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]') 822 .each($.proxy(function (i, element) { 823 var $element = $(element) 824 this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element) 825 }, this)) 826 .end() 827 } 828 829 Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) { 830 var isOpen = $element.hasClass('in') 831 832 $element.attr('aria-expanded', isOpen) 833 $trigger 834 .toggleClass('collapsed', !isOpen) 835 .attr('aria-expanded', isOpen) 836 } 837 838 function getTargetFromTrigger($trigger) { 839 var href 840 var target = $trigger.attr('data-target') 841 || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7 842 843 return $(document).find(target) 844 } 845 846 847 // COLLAPSE PLUGIN DEFINITION 848 // ========================== 849 850 function Plugin(option) { 851 return this.each(function () { 852 var $this = $(this) 853 var data = $this.data('bs.collapse') 854 var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option) 855 856 if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false 857 if (!data) $this.data('bs.collapse', (data = new Collapse(this, options))) 858 if (typeof option == 'string') data[option]() 859 }) 860 } 861 862 var old = $.fn.collapse 863 864 $.fn.collapse = Plugin 865 $.fn.collapse.Constructor = Collapse 866 867 868 // COLLAPSE NO CONFLICT 869 // ==================== 870 871 $.fn.collapse.noConflict = function () { 872 $.fn.collapse = old 873 return this 874 } 875 876 877 // COLLAPSE DATA-API 878 // ================= 879 880 $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) { 881 var $this = $(this) 882 883 if (!$this.attr('data-target')) e.preventDefault() 884 885 var $target = getTargetFromTrigger($this) 886 var data = $target.data('bs.collapse') 887 var option = data ? 'toggle' : $this.data() 888 889 Plugin.call($target, option) 890 }) 891 892}(jQuery); 893 894/* ======================================================================== 895 * Bootstrap: dropdown.js v3.4.1 896 * https://getbootstrap.com/docs/3.4/javascript/#dropdowns 897 * ======================================================================== 898 * Copyright 2011-2019 Twitter, Inc. 899 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 900 * ======================================================================== */ 901 902 903+function ($) { 904 'use strict'; 905 906 // DROPDOWN CLASS DEFINITION 907 // ========================= 908 909 var backdrop = '.dropdown-backdrop' 910 var toggle = '[data-toggle="dropdown"]' 911 var Dropdown = function (element) { 912 $(element).on('click.bs.dropdown', this.toggle) 913 } 914 915 Dropdown.VERSION = '3.4.1' 916 917 function getParent($this) { 918 var selector = $this.attr('data-target') 919 920 if (!selector) { 921 selector = $this.attr('href') 922 selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 923 } 924 925 var $parent = selector !== '#' ? $(document).find(selector) : null 926 927 return $parent && $parent.length ? $parent : $this.parent() 928 } 929 930 function clearMenus(e) { 931 if (e && e.which === 3) return 932 $(backdrop).remove() 933 $(toggle).each(function () { 934 var $this = $(this) 935 var $parent = getParent($this) 936 var relatedTarget = { relatedTarget: this } 937 938 if (!$parent.hasClass('open')) return 939 940 if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return 941 942 $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget)) 943 944 if (e.isDefaultPrevented()) return 945 946 $this.attr('aria-expanded', 'false') 947 $parent.removeClass('open').trigger($.Event('hidden.bs.dropdown', relatedTarget)) 948 }) 949 } 950 951 Dropdown.prototype.toggle = function (e) { 952 var $this = $(this) 953 954 if ($this.is('.disabled, :disabled')) return 955 956 var $parent = getParent($this) 957 var isActive = $parent.hasClass('open') 958 959 clearMenus() 960 961 if (!isActive) { 962 if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) { 963 // if mobile we use a backdrop because click events don't delegate 964 $(document.createElement('div')) 965 .addClass('dropdown-backdrop') 966 .insertAfter($(this)) 967 .on('click', clearMenus) 968 } 969 970 var relatedTarget = { relatedTarget: this } 971 $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget)) 972 973 if (e.isDefaultPrevented()) return 974 975 $this 976 .trigger('focus') 977 .attr('aria-expanded', 'true') 978 979 $parent 980 .toggleClass('open') 981 .trigger($.Event('shown.bs.dropdown', relatedTarget)) 982 } 983 984 return false 985 } 986 987 Dropdown.prototype.keydown = function (e) { 988 if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return 989 990 var $this = $(this) 991 992 e.preventDefault() 993 e.stopPropagation() 994 995 if ($this.is('.disabled, :disabled')) return 996 997 var $parent = getParent($this) 998 var isActive = $parent.hasClass('open') 999 1000 if (!isActive && e.which != 27 || isActive && e.which == 27) { 1001 if (e.which == 27) $parent.find(toggle).trigger('focus') 1002 return $this.trigger('click') 1003 } 1004 1005 var desc = ' li:not(.disabled):visible a' 1006 var $items = $parent.find('.dropdown-menu' + desc) 1007 1008 if (!$items.length) return 1009 1010 var index = $items.index(e.target) 1011 1012 if (e.which == 38 && index > 0) index-- // up 1013 if (e.which == 40 && index < $items.length - 1) index++ // down 1014 if (!~index) index = 0 1015 1016 $items.eq(index).trigger('focus') 1017 } 1018 1019 1020 // DROPDOWN PLUGIN DEFINITION 1021 // ========================== 1022 1023 function Plugin(option) { 1024 return this.each(function () { 1025 var $this = $(this) 1026 var data = $this.data('bs.dropdown') 1027 1028 if (!data) $this.data('bs.dropdown', (data = new Dropdown(this))) 1029 if (typeof option == 'string') data[option].call($this) 1030 }) 1031 } 1032 1033 var old = $.fn.dropdown 1034 1035 $.fn.dropdown = Plugin 1036 $.fn.dropdown.Constructor = Dropdown 1037 1038 1039 // DROPDOWN NO CONFLICT 1040 // ==================== 1041 1042 $.fn.dropdown.noConflict = function () { 1043 $.fn.dropdown = old 1044 return this 1045 } 1046 1047 1048 // APPLY TO STANDARD DROPDOWN ELEMENTS 1049 // =================================== 1050 1051 $(document) 1052 .on('click.bs.dropdown.data-api', clearMenus) 1053 .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() }) 1054 .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle) 1055 .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown) 1056 .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown) 1057 1058}(jQuery); 1059 1060/* ======================================================================== 1061 * Bootstrap: modal.js v3.4.1 1062 * https://getbootstrap.com/docs/3.4/javascript/#modals 1063 * ======================================================================== 1064 * Copyright 2011-2019 Twitter, Inc. 1065 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 1066 * ======================================================================== */ 1067 1068 1069+function ($) { 1070 'use strict'; 1071 1072 // MODAL CLASS DEFINITION 1073 // ====================== 1074 1075 var Modal = function (element, options) { 1076 this.options = options 1077 this.$body = $(document.body) 1078 this.$element = $(element) 1079 this.$dialog = this.$element.find('.modal-dialog') 1080 this.$backdrop = null 1081 this.isShown = null 1082 this.originalBodyPad = null 1083 this.scrollbarWidth = 0 1084 this.ignoreBackdropClick = false 1085 this.fixedContent = '.navbar-fixed-top, .navbar-fixed-bottom' 1086 1087 if (this.options.remote) { 1088 this.$element 1089 .find('.modal-content') 1090 .load(this.options.remote, $.proxy(function () { 1091 this.$element.trigger('loaded.bs.modal') 1092 }, this)) 1093 } 1094 } 1095 1096 Modal.VERSION = '3.4.1' 1097 1098 Modal.TRANSITION_DURATION = 300 1099 Modal.BACKDROP_TRANSITION_DURATION = 150 1100 1101 Modal.DEFAULTS = { 1102 backdrop: true, 1103 keyboard: true, 1104 show: true 1105 } 1106 1107 Modal.prototype.toggle = function (_relatedTarget) { 1108 return this.isShown ? this.hide() : this.show(_relatedTarget) 1109 } 1110 1111 Modal.prototype.show = function (_relatedTarget) { 1112 var that = this 1113 var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget }) 1114 1115 this.$element.trigger(e) 1116 1117 if (this.isShown || e.isDefaultPrevented()) return 1118 1119 this.isShown = true 1120 1121 this.checkScrollbar() 1122 this.setScrollbar() 1123 this.$body.addClass('modal-open') 1124 1125 this.escape() 1126 this.resize() 1127 1128 this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this)) 1129 1130 this.$dialog.on('mousedown.dismiss.bs.modal', function () { 1131 that.$element.one('mouseup.dismiss.bs.modal', function (e) { 1132 if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true 1133 }) 1134 }) 1135 1136 this.backdrop(function () { 1137 var transition = $.support.transition && that.$element.hasClass('fade') 1138 1139 if (!that.$element.parent().length) { 1140 that.$element.appendTo(that.$body) // don't move modals dom position 1141 } 1142 1143 that.$element 1144 .show() 1145 .scrollTop(0) 1146 1147 that.adjustDialog() 1148 1149 if (transition) { 1150 that.$element[0].offsetWidth // force reflow 1151 } 1152 1153 that.$element.addClass('in') 1154 1155 that.enforceFocus() 1156 1157 var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget }) 1158 1159 transition ? 1160 that.$dialog // wait for modal to slide in 1161 .one('bsTransitionEnd', function () { 1162 that.$element.trigger('focus').trigger(e) 1163 }) 1164 .emulateTransitionEnd(Modal.TRANSITION_DURATION) : 1165 that.$element.trigger('focus').trigger(e) 1166 }) 1167 } 1168 1169 Modal.prototype.hide = function (e) { 1170 if (e) e.preventDefault() 1171 1172 e = $.Event('hide.bs.modal') 1173 1174 this.$element.trigger(e) 1175 1176 if (!this.isShown || e.isDefaultPrevented()) return 1177 1178 this.isShown = false 1179 1180 this.escape() 1181 this.resize() 1182 1183 $(document).off('focusin.bs.modal') 1184 1185 this.$element 1186 .removeClass('in') 1187 .off('click.dismiss.bs.modal') 1188 .off('mouseup.dismiss.bs.modal') 1189 1190 this.$dialog.off('mousedown.dismiss.bs.modal') 1191 1192 $.support.transition && this.$element.hasClass('fade') ? 1193 this.$element 1194 .one('bsTransitionEnd', $.proxy(this.hideModal, this)) 1195 .emulateTransitionEnd(Modal.TRANSITION_DURATION) : 1196 this.hideModal() 1197 } 1198 1199 Modal.prototype.enforceFocus = function () { 1200 $(document) 1201 .off('focusin.bs.modal') // guard against infinite focus loop 1202 .on('focusin.bs.modal', $.proxy(function (e) { 1203 if (document !== e.target && 1204 this.$element[0] !== e.target && 1205 !this.$element.has(e.target).length) { 1206 this.$element.trigger('focus') 1207 } 1208 }, this)) 1209 } 1210 1211 Modal.prototype.escape = function () { 1212 if (this.isShown && this.options.keyboard) { 1213 this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) { 1214 e.which == 27 && this.hide() 1215 }, this)) 1216 } else if (!this.isShown) { 1217 this.$element.off('keydown.dismiss.bs.modal') 1218 } 1219 } 1220 1221 Modal.prototype.resize = function () { 1222 if (this.isShown) { 1223 $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this)) 1224 } else { 1225 $(window).off('resize.bs.modal') 1226 } 1227 } 1228 1229 Modal.prototype.hideModal = function () { 1230 var that = this 1231 this.$element.hide() 1232 this.backdrop(function () { 1233 that.$body.removeClass('modal-open') 1234 that.resetAdjustments() 1235 that.resetScrollbar() 1236 that.$element.trigger('hidden.bs.modal') 1237 }) 1238 } 1239 1240 Modal.prototype.removeBackdrop = function () { 1241 this.$backdrop && this.$backdrop.remove() 1242 this.$backdrop = null 1243 } 1244 1245 Modal.prototype.backdrop = function (callback) { 1246 var that = this 1247 var animate = this.$element.hasClass('fade') ? 'fade' : '' 1248 1249 if (this.isShown && this.options.backdrop) { 1250 var doAnimate = $.support.transition && animate 1251 1252 this.$backdrop = $(document.createElement('div')) 1253 .addClass('modal-backdrop ' + animate) 1254 .appendTo(this.$body) 1255 1256 this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) { 1257 if (this.ignoreBackdropClick) { 1258 this.ignoreBackdropClick = false 1259 return 1260 } 1261 if (e.target !== e.currentTarget) return 1262 this.options.backdrop == 'static' 1263 ? this.$element[0].focus() 1264 : this.hide() 1265 }, this)) 1266 1267 if (doAnimate) this.$backdrop[0].offsetWidth // force reflow 1268 1269 this.$backdrop.addClass('in') 1270 1271 if (!callback) return 1272 1273 doAnimate ? 1274 this.$backdrop 1275 .one('bsTransitionEnd', callback) 1276 .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) : 1277 callback() 1278 1279 } else if (!this.isShown && this.$backdrop) { 1280 this.$backdrop.removeClass('in') 1281 1282 var callbackRemove = function () { 1283 that.removeBackdrop() 1284 callback && callback() 1285 } 1286 $.support.transition && this.$element.hasClass('fade') ? 1287 this.$backdrop 1288 .one('bsTransitionEnd', callbackRemove) 1289 .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) : 1290 callbackRemove() 1291 1292 } else if (callback) { 1293 callback() 1294 } 1295 } 1296 1297 // these following methods are used to handle overflowing modals 1298 1299 Modal.prototype.handleUpdate = function () { 1300 this.adjustDialog() 1301 } 1302 1303 Modal.prototype.adjustDialog = function () { 1304 var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight 1305 1306 this.$element.css({ 1307 paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '', 1308 paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : '' 1309 }) 1310 } 1311 1312 Modal.prototype.resetAdjustments = function () { 1313 this.$element.css({ 1314 paddingLeft: '', 1315 paddingRight: '' 1316 }) 1317 } 1318 1319 Modal.prototype.checkScrollbar = function () { 1320 var fullWindowWidth = window.innerWidth 1321 if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8 1322 var documentElementRect = document.documentElement.getBoundingClientRect() 1323 fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left) 1324 } 1325 this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth 1326 this.scrollbarWidth = this.measureScrollbar() 1327 } 1328 1329 Modal.prototype.setScrollbar = function () { 1330 var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10) 1331 this.originalBodyPad = document.body.style.paddingRight || '' 1332 var scrollbarWidth = this.scrollbarWidth 1333 if (this.bodyIsOverflowing) { 1334 this.$body.css('padding-right', bodyPad + scrollbarWidth) 1335 $(this.fixedContent).each(function (index, element) { 1336 var actualPadding = element.style.paddingRight 1337 var calculatedPadding = $(element).css('padding-right') 1338 $(element) 1339 .data('padding-right', actualPadding) 1340 .css('padding-right', parseFloat(calculatedPadding) + scrollbarWidth + 'px') 1341 }) 1342 } 1343 } 1344 1345 Modal.prototype.resetScrollbar = function () { 1346 this.$body.css('padding-right', this.originalBodyPad) 1347 $(this.fixedContent).each(function (index, element) { 1348 var padding = $(element).data('padding-right') 1349 $(element).removeData('padding-right') 1350 element.style.paddingRight = padding ? padding : '' 1351 }) 1352 } 1353 1354 Modal.prototype.measureScrollbar = function () { // thx walsh 1355 var scrollDiv = document.createElement('div') 1356 scrollDiv.className = 'modal-scrollbar-measure' 1357 this.$body.append(scrollDiv) 1358 var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth 1359 this.$body[0].removeChild(scrollDiv) 1360 return scrollbarWidth 1361 } 1362 1363 1364 // MODAL PLUGIN DEFINITION 1365 // ======================= 1366 1367 function Plugin(option, _relatedTarget) { 1368 return this.each(function () { 1369 var $this = $(this) 1370 var data = $this.data('bs.modal') 1371 var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option) 1372 1373 if (!data) $this.data('bs.modal', (data = new Modal(this, options))) 1374 if (typeof option == 'string') data[option](_relatedTarget) 1375 else if (options.show) data.show(_relatedTarget) 1376 }) 1377 } 1378 1379 var old = $.fn.modal 1380 1381 $.fn.modal = Plugin 1382 $.fn.modal.Constructor = Modal 1383 1384 1385 // MODAL NO CONFLICT 1386 // ================= 1387 1388 $.fn.modal.noConflict = function () { 1389 $.fn.modal = old 1390 return this 1391 } 1392 1393 1394 // MODAL DATA-API 1395 // ============== 1396 1397 $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) { 1398 var $this = $(this) 1399 var href = $this.attr('href') 1400 var target = $this.attr('data-target') || 1401 (href && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7 1402 1403 var $target = $(document).find(target) 1404 var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data()) 1405 1406 if ($this.is('a')) e.preventDefault() 1407 1408 $target.one('show.bs.modal', function (showEvent) { 1409 if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown 1410 $target.one('hidden.bs.modal', function () { 1411 $this.is(':visible') && $this.trigger('focus') 1412 }) 1413 }) 1414 Plugin.call($target, option, this) 1415 }) 1416 1417}(jQuery); 1418 1419/* ======================================================================== 1420 * Bootstrap: tooltip.js v3.4.1 1421 * https://getbootstrap.com/docs/3.4/javascript/#tooltip 1422 * Inspired by the original jQuery.tipsy by Jason Frame 1423 * ======================================================================== 1424 * Copyright 2011-2019 Twitter, Inc. 1425 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 1426 * ======================================================================== */ 1427 1428+function ($) { 1429 'use strict'; 1430 1431 var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn'] 1432 1433 var uriAttrs = [ 1434 'background', 1435 'cite', 1436 'href', 1437 'itemtype', 1438 'longdesc', 1439 'poster', 1440 'src', 1441 'xlink:href' 1442 ] 1443 1444 var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i 1445 1446 var DefaultWhitelist = { 1447 // Global attributes allowed on any supplied element below. 1448 '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN], 1449 a: ['target', 'href', 'title', 'rel'], 1450 area: [], 1451 b: [], 1452 br: [], 1453 col: [], 1454 code: [], 1455 div: [], 1456 em: [], 1457 hr: [], 1458 h1: [], 1459 h2: [], 1460 h3: [], 1461 h4: [], 1462 h5: [], 1463 h6: [], 1464 i: [], 1465 img: ['src', 'alt', 'title', 'width', 'height'], 1466 li: [], 1467 ol: [], 1468 p: [], 1469 pre: [], 1470 s: [], 1471 small: [], 1472 span: [], 1473 sub: [], 1474 sup: [], 1475 strong: [], 1476 u: [], 1477 ul: [] 1478 } 1479 1480 /** 1481 * A pattern that recognizes a commonly useful subset of URLs that are safe. 1482 * 1483 * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts 1484 */ 1485 var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi 1486 1487 /** 1488 * A pattern that matches safe data URLs. Only matches image, video and audio types. 1489 * 1490 * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts 1491 */ 1492 var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i 1493 1494 function allowedAttribute(attr, allowedAttributeList) { 1495 var attrName = attr.nodeName.toLowerCase() 1496 1497 if ($.inArray(attrName, allowedAttributeList) !== -1) { 1498 if ($.inArray(attrName, uriAttrs) !== -1) { 1499 return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN)) 1500 } 1501 1502 return true 1503 } 1504 1505 var regExp = $(allowedAttributeList).filter(function (index, value) { 1506 return value instanceof RegExp 1507 }) 1508 1509 // Check if a regular expression validates the attribute. 1510 for (var i = 0, l = regExp.length; i < l; i++) { 1511 if (attrName.match(regExp[i])) { 1512 return true 1513 } 1514 } 1515 1516 return false 1517 } 1518 1519 function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) { 1520 if (unsafeHtml.length === 0) { 1521 return unsafeHtml 1522 } 1523 1524 if (sanitizeFn && typeof sanitizeFn === 'function') { 1525 return sanitizeFn(unsafeHtml) 1526 } 1527 1528 // IE 8 and below don't support createHTMLDocument 1529 if (!document.implementation || !document.implementation.createHTMLDocument) { 1530 return unsafeHtml 1531 } 1532 1533 var createdDocument = document.implementation.createHTMLDocument('sanitization') 1534 createdDocument.body.innerHTML = unsafeHtml 1535 1536 var whitelistKeys = $.map(whiteList, function (el, i) { return i }) 1537 var elements = $(createdDocument.body).find('*') 1538 1539 for (var i = 0, len = elements.length; i < len; i++) { 1540 var el = elements[i] 1541 var elName = el.nodeName.toLowerCase() 1542 1543 if ($.inArray(elName, whitelistKeys) === -1) { 1544 el.parentNode.removeChild(el) 1545 1546 continue 1547 } 1548 1549 var attributeList = $.map(el.attributes, function (el) { return el }) 1550 var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || []) 1551 1552 for (var j = 0, len2 = attributeList.length; j < len2; j++) { 1553 if (!allowedAttribute(attributeList[j], whitelistedAttributes)) { 1554 el.removeAttribute(attributeList[j].nodeName) 1555 } 1556 } 1557 } 1558 1559 return createdDocument.body.innerHTML 1560 } 1561 1562 // TOOLTIP PUBLIC CLASS DEFINITION 1563 // =============================== 1564 1565 var Tooltip = function (element, options) { 1566 this.type = null 1567 this.options = null 1568 this.enabled = null 1569 this.timeout = null 1570 this.hoverState = null 1571 this.$element = null 1572 this.inState = null 1573 1574 this.init('tooltip', element, options) 1575 } 1576 1577 Tooltip.VERSION = '3.4.1' 1578 1579 Tooltip.TRANSITION_DURATION = 150 1580 1581 Tooltip.DEFAULTS = { 1582 animation: true, 1583 placement: 'top', 1584 selector: false, 1585 template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>', 1586 trigger: 'hover focus', 1587 title: '', 1588 delay: 0, 1589 html: false, 1590 container: false, 1591 viewport: { 1592 selector: 'body', 1593 padding: 0 1594 }, 1595 sanitize : true, 1596 sanitizeFn : null, 1597 whiteList : DefaultWhitelist 1598 } 1599 1600 Tooltip.prototype.init = function (type, element, options) { 1601 this.enabled = true 1602 this.type = type 1603 this.$element = $(element) 1604 this.options = this.getOptions(options) 1605 this.$viewport = this.options.viewport && $(document).find($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport)) 1606 this.inState = { click: false, hover: false, focus: false } 1607 1608 if (this.$element[0] instanceof document.constructor && !this.options.selector) { 1609 throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!') 1610 } 1611 1612 var triggers = this.options.trigger.split(' ') 1613 1614 for (var i = triggers.length; i--;) { 1615 var trigger = triggers[i] 1616 1617 if (trigger == 'click') { 1618 this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this)) 1619 } else if (trigger != 'manual') { 1620 var eventIn = trigger == 'hover' ? 'mouseenter' : 'focusin' 1621 var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout' 1622 1623 this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this)) 1624 this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this)) 1625 } 1626 } 1627 1628 this.options.selector ? 1629 (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) : 1630 this.fixTitle() 1631 } 1632 1633 Tooltip.prototype.getDefaults = function () { 1634 return Tooltip.DEFAULTS 1635 } 1636 1637 Tooltip.prototype.getOptions = function (options) { 1638 var dataAttributes = this.$element.data() 1639 1640 for (var dataAttr in dataAttributes) { 1641 if (dataAttributes.hasOwnProperty(dataAttr) && $.inArray(dataAttr, DISALLOWED_ATTRIBUTES) !== -1) { 1642 delete dataAttributes[dataAttr] 1643 } 1644 } 1645 1646 options = $.extend({}, this.getDefaults(), dataAttributes, options) 1647 1648 if (options.delay && typeof options.delay == 'number') { 1649 options.delay = { 1650 show: options.delay, 1651 hide: options.delay 1652 } 1653 } 1654 1655 if (options.sanitize) { 1656 options.template = sanitizeHtml(options.template, options.whiteList, options.sanitizeFn) 1657 } 1658 1659 return options 1660 } 1661 1662 Tooltip.prototype.getDelegateOptions = function () { 1663 var options = {} 1664 var defaults = this.getDefaults() 1665 1666 this._options && $.each(this._options, function (key, value) { 1667 if (defaults[key] != value) options[key] = value 1668 }) 1669 1670 return options 1671 } 1672 1673 Tooltip.prototype.enter = function (obj) { 1674 var self = obj instanceof this.constructor ? 1675 obj : $(obj.currentTarget).data('bs.' + this.type) 1676 1677 if (!self) { 1678 self = new this.constructor(obj.currentTarget, this.getDelegateOptions()) 1679 $(obj.currentTarget).data('bs.' + this.type, self) 1680 } 1681 1682 if (obj instanceof $.Event) { 1683 self.inState[obj.type == 'focusin' ? 'focus' : 'hover'] = true 1684 } 1685 1686 if (self.tip().hasClass('in') || self.hoverState == 'in') { 1687 self.hoverState = 'in' 1688 return 1689 } 1690 1691 clearTimeout(self.timeout) 1692 1693 self.hoverState = 'in' 1694 1695 if (!self.options.delay || !self.options.delay.show) return self.show() 1696 1697 self.timeout = setTimeout(function () { 1698 if (self.hoverState == 'in') self.show() 1699 }, self.options.delay.show) 1700 } 1701 1702 Tooltip.prototype.isInStateTrue = function () { 1703 for (var key in this.inState) { 1704 if (this.inState[key]) return true 1705 } 1706 1707 return false 1708 } 1709 1710 Tooltip.prototype.leave = function (obj) { 1711 var self = obj instanceof this.constructor ? 1712 obj : $(obj.currentTarget).data('bs.' + this.type) 1713 1714 if (!self) { 1715 self = new this.constructor(obj.currentTarget, this.getDelegateOptions()) 1716 $(obj.currentTarget).data('bs.' + this.type, self) 1717 } 1718 1719 if (obj instanceof $.Event) { 1720 self.inState[obj.type == 'focusout' ? 'focus' : 'hover'] = false 1721 } 1722 1723 if (self.isInStateTrue()) return 1724 1725 clearTimeout(self.timeout) 1726 1727 self.hoverState = 'out' 1728 1729 if (!self.options.delay || !self.options.delay.hide) return self.hide() 1730 1731 self.timeout = setTimeout(function () { 1732 if (self.hoverState == 'out') self.hide() 1733 }, self.options.delay.hide) 1734 } 1735 1736 Tooltip.prototype.show = function () { 1737 var e = $.Event('show.bs.' + this.type) 1738 1739 if (this.hasContent() && this.enabled) { 1740 this.$element.trigger(e) 1741 1742 var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0]) 1743 if (e.isDefaultPrevented() || !inDom) return 1744 var that = this 1745 1746 var $tip = this.tip() 1747 1748 var tipId = this.getUID(this.type) 1749 1750 this.setContent() 1751 $tip.attr('id', tipId) 1752 this.$element.attr('aria-describedby', tipId) 1753 1754 if (this.options.animation) $tip.addClass('fade') 1755 1756 var placement = typeof this.options.placement == 'function' ? 1757 this.options.placement.call(this, $tip[0], this.$element[0]) : 1758 this.options.placement 1759 1760 var autoToken = /\s?auto?\s?/i 1761 var autoPlace = autoToken.test(placement) 1762 if (autoPlace) placement = placement.replace(autoToken, '') || 'top' 1763 1764 $tip 1765 .detach() 1766 .css({ top: 0, left: 0, display: 'block' }) 1767 .addClass(placement) 1768 .data('bs.' + this.type, this) 1769 1770 this.options.container ? $tip.appendTo($(document).find(this.options.container)) : $tip.insertAfter(this.$element) 1771 this.$element.trigger('inserted.bs.' + this.type) 1772 1773 var pos = this.getPosition() 1774 var actualWidth = $tip[0].offsetWidth 1775 var actualHeight = $tip[0].offsetHeight 1776 1777 if (autoPlace) { 1778 var orgPlacement = placement 1779 var viewportDim = this.getPosition(this.$viewport) 1780 1781 placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top' : 1782 placement == 'top' && pos.top - actualHeight < viewportDim.top ? 'bottom' : 1783 placement == 'right' && pos.right + actualWidth > viewportDim.width ? 'left' : 1784 placement == 'left' && pos.left - actualWidth < viewportDim.left ? 'right' : 1785 placement 1786 1787 $tip 1788 .removeClass(orgPlacement) 1789 .addClass(placement) 1790 } 1791 1792 var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight) 1793 1794 this.applyPlacement(calculatedOffset, placement) 1795 1796 var complete = function () { 1797 var prevHoverState = that.hoverState 1798 that.$element.trigger('shown.bs.' + that.type) 1799 that.hoverState = null 1800 1801 if (prevHoverState == 'out') that.leave(that) 1802 } 1803 1804 $.support.transition && this.$tip.hasClass('fade') ? 1805 $tip 1806 .one('bsTransitionEnd', complete) 1807 .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) : 1808 complete() 1809 } 1810 } 1811 1812 Tooltip.prototype.applyPlacement = function (offset, placement) { 1813 var $tip = this.tip() 1814 var width = $tip[0].offsetWidth 1815 var height = $tip[0].offsetHeight 1816 1817 // manually read margins because getBoundingClientRect includes difference 1818 var marginTop = parseInt($tip.css('margin-top'), 10) 1819 var marginLeft = parseInt($tip.css('margin-left'), 10) 1820 1821 // we must check for NaN for ie 8/9 1822 if (isNaN(marginTop)) marginTop = 0 1823 if (isNaN(marginLeft)) marginLeft = 0 1824 1825 offset.top += marginTop 1826 offset.left += marginLeft 1827 1828 // $.fn.offset doesn't round pixel values 1829 // so we use setOffset directly with our own function B-0 1830 $.offset.setOffset($tip[0], $.extend({ 1831 using: function (props) { 1832 $tip.css({ 1833 top: Math.round(props.top), 1834 left: Math.round(props.left) 1835 }) 1836 } 1837 }, offset), 0) 1838 1839 $tip.addClass('in') 1840 1841 // check to see if placing tip in new offset caused the tip to resize itself 1842 var actualWidth = $tip[0].offsetWidth 1843 var actualHeight = $tip[0].offsetHeight 1844 1845 if (placement == 'top' && actualHeight != height) { 1846 offset.top = offset.top + height - actualHeight 1847 } 1848 1849 var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight) 1850 1851 if (delta.left) offset.left += delta.left 1852 else offset.top += delta.top 1853 1854 var isVertical = /top|bottom/.test(placement) 1855 var arrowDelta = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight 1856 var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight' 1857 1858 $tip.offset(offset) 1859 this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical) 1860 } 1861 1862 Tooltip.prototype.replaceArrow = function (delta, dimension, isVertical) { 1863 this.arrow() 1864 .css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%') 1865 .css(isVertical ? 'top' : 'left', '') 1866 } 1867 1868 Tooltip.prototype.setContent = function () { 1869 var $tip = this.tip() 1870 var title = this.getTitle() 1871 1872 if (this.options.html) { 1873 if (this.options.sanitize) { 1874 title = sanitizeHtml(title, this.options.whiteList, this.options.sanitizeFn) 1875 } 1876 1877 $tip.find('.tooltip-inner').html(title) 1878 } else { 1879 $tip.find('.tooltip-inner').text(title) 1880 } 1881 1882 $tip.removeClass('fade in top bottom left right') 1883 } 1884 1885 Tooltip.prototype.hide = function (callback) { 1886 var that = this 1887 var $tip = $(this.$tip) 1888 var e = $.Event('hide.bs.' + this.type) 1889 1890 function complete() { 1891 if (that.hoverState != 'in') $tip.detach() 1892 if (that.$element) { // TODO: Check whether guarding this code with this `if` is really necessary. 1893 that.$element 1894 .removeAttr('aria-describedby') 1895 .trigger('hidden.bs.' + that.type) 1896 } 1897 callback && callback() 1898 } 1899 1900 this.$element.trigger(e) 1901 1902 if (e.isDefaultPrevented()) return 1903 1904 $tip.removeClass('in') 1905 1906 $.support.transition && $tip.hasClass('fade') ? 1907 $tip 1908 .one('bsTransitionEnd', complete) 1909 .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) : 1910 complete() 1911 1912 this.hoverState = null 1913 1914 return this 1915 } 1916 1917 Tooltip.prototype.fixTitle = function () { 1918 var $e = this.$element 1919 if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') { 1920 $e.attr('data-original-title', $e.attr('title') || '').attr('title', '') 1921 } 1922 } 1923 1924 Tooltip.prototype.hasContent = function () { 1925 return this.getTitle() 1926 } 1927 1928 Tooltip.prototype.getPosition = function ($element) { 1929 $element = $element || this.$element 1930 1931 var el = $element[0] 1932 var isBody = el.tagName == 'BODY' 1933 1934 var elRect = el.getBoundingClientRect() 1935 if (elRect.width == null) { 1936 // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093 1937 elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top }) 1938 } 1939 var isSvg = window.SVGElement && el instanceof window.SVGElement 1940 // Avoid using $.offset() on SVGs since it gives incorrect results in jQuery 3. 1941 // See https://github.com/twbs/bootstrap/issues/20280 1942 var elOffset = isBody ? { top: 0, left: 0 } : (isSvg ? null : $element.offset()) 1943 var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() } 1944 var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null 1945 1946 return $.extend({}, elRect, scroll, outerDims, elOffset) 1947 } 1948 1949 Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) { 1950 return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } : 1951 placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } : 1952 placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } : 1953 /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width } 1954 1955 } 1956 1957 Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) { 1958 var delta = { top: 0, left: 0 } 1959 if (!this.$viewport) return delta 1960 1961 var viewportPadding = this.options.viewport && this.options.viewport.padding || 0 1962 var viewportDimensions = this.getPosition(this.$viewport) 1963 1964 if (/right|left/.test(placement)) { 1965 var topEdgeOffset = pos.top - viewportPadding - viewportDimensions.scroll 1966 var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight 1967 if (topEdgeOffset < viewportDimensions.top) { // top overflow 1968 delta.top = viewportDimensions.top - topEdgeOffset 1969 } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow 1970 delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset 1971 } 1972 } else { 1973 var leftEdgeOffset = pos.left - viewportPadding 1974 var rightEdgeOffset = pos.left + viewportPadding + actualWidth 1975 if (leftEdgeOffset < viewportDimensions.left) { // left overflow 1976 delta.left = viewportDimensions.left - leftEdgeOffset 1977 } else if (rightEdgeOffset > viewportDimensions.right) { // right overflow 1978 delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset 1979 } 1980 } 1981 1982 return delta 1983 } 1984 1985 Tooltip.prototype.getTitle = function () { 1986 var title 1987 var $e = this.$element 1988 var o = this.options 1989 1990 title = $e.attr('data-original-title') 1991 || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title) 1992 1993 return title 1994 } 1995 1996 Tooltip.prototype.getUID = function (prefix) { 1997 do prefix += ~~(Math.random() * 1000000) 1998 while (document.getElementById(prefix)) 1999 return prefix 2000 } 2001 2002 Tooltip.prototype.tip = function () { 2003 if (!this.$tip) { 2004 this.$tip = $(this.options.template) 2005 if (this.$tip.length != 1) { 2006 throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!') 2007 } 2008 } 2009 return this.$tip 2010 } 2011 2012 Tooltip.prototype.arrow = function () { 2013 return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow')) 2014 } 2015 2016 Tooltip.prototype.enable = function () { 2017 this.enabled = true 2018 } 2019 2020 Tooltip.prototype.disable = function () { 2021 this.enabled = false 2022 } 2023 2024 Tooltip.prototype.toggleEnabled = function () { 2025 this.enabled = !this.enabled 2026 } 2027 2028 Tooltip.prototype.toggle = function (e) { 2029 var self = this 2030 if (e) { 2031 self = $(e.currentTarget).data('bs.' + this.type) 2032 if (!self) { 2033 self = new this.constructor(e.currentTarget, this.getDelegateOptions()) 2034 $(e.currentTarget).data('bs.' + this.type, self) 2035 } 2036 } 2037 2038 if (e) { 2039 self.inState.click = !self.inState.click 2040 if (self.isInStateTrue()) self.enter(self) 2041 else self.leave(self) 2042 } else { 2043 self.tip().hasClass('in') ? self.leave(self) : self.enter(self) 2044 } 2045 } 2046 2047 Tooltip.prototype.destroy = function () { 2048 var that = this 2049 clearTimeout(this.timeout) 2050 this.hide(function () { 2051 that.$element.off('.' + that.type).removeData('bs.' + that.type) 2052 if (that.$tip) { 2053 that.$tip.detach() 2054 } 2055 that.$tip = null 2056 that.$arrow = null 2057 that.$viewport = null 2058 that.$element = null 2059 }) 2060 } 2061 2062 Tooltip.prototype.sanitizeHtml = function (unsafeHtml) { 2063 return sanitizeHtml(unsafeHtml, this.options.whiteList, this.options.sanitizeFn) 2064 } 2065 2066 // TOOLTIP PLUGIN DEFINITION 2067 // ========================= 2068 2069 function Plugin(option) { 2070 return this.each(function () { 2071 var $this = $(this) 2072 var data = $this.data('bs.tooltip') 2073 var options = typeof option == 'object' && option 2074 2075 if (!data && /destroy|hide/.test(option)) return 2076 if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options))) 2077 if (typeof option == 'string') data[option]() 2078 }) 2079 } 2080 2081 var old = $.fn.tooltip 2082 2083 $.fn.tooltip = Plugin 2084 $.fn.tooltip.Constructor = Tooltip 2085 2086 2087 // TOOLTIP NO CONFLICT 2088 // =================== 2089 2090 $.fn.tooltip.noConflict = function () { 2091 $.fn.tooltip = old 2092 return this 2093 } 2094 2095}(jQuery); 2096 2097/* ======================================================================== 2098 * Bootstrap: popover.js v3.4.1 2099 * https://getbootstrap.com/docs/3.4/javascript/#popovers 2100 * ======================================================================== 2101 * Copyright 2011-2019 Twitter, Inc. 2102 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 2103 * ======================================================================== */ 2104 2105 2106+function ($) { 2107 'use strict'; 2108 2109 // POPOVER PUBLIC CLASS DEFINITION 2110 // =============================== 2111 2112 var Popover = function (element, options) { 2113 this.init('popover', element, options) 2114 } 2115 2116 if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js') 2117 2118 Popover.VERSION = '3.4.1' 2119 2120 Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, { 2121 placement: 'right', 2122 trigger: 'click', 2123 content: '', 2124 template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>' 2125 }) 2126 2127 2128 // NOTE: POPOVER EXTENDS tooltip.js 2129 // ================================ 2130 2131 Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype) 2132 2133 Popover.prototype.constructor = Popover 2134 2135 Popover.prototype.getDefaults = function () { 2136 return Popover.DEFAULTS 2137 } 2138 2139 Popover.prototype.setContent = function () { 2140 var $tip = this.tip() 2141 var title = this.getTitle() 2142 var content = this.getContent() 2143 2144 if (this.options.html) { 2145 var typeContent = typeof content 2146 2147 if (this.options.sanitize) { 2148 title = this.sanitizeHtml(title) 2149 2150 if (typeContent === 'string') { 2151 content = this.sanitizeHtml(content) 2152 } 2153 } 2154 2155 $tip.find('.popover-title').html(title) 2156 $tip.find('.popover-content').children().detach().end()[ 2157 typeContent === 'string' ? 'html' : 'append' 2158 ](content) 2159 } else { 2160 $tip.find('.popover-title').text(title) 2161 $tip.find('.popover-content').children().detach().end().text(content) 2162 } 2163 2164 $tip.removeClass('fade top bottom left right in') 2165 2166 // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do 2167 // this manually by checking the contents. 2168 if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide() 2169 } 2170 2171 Popover.prototype.hasContent = function () { 2172 return this.getTitle() || this.getContent() 2173 } 2174 2175 Popover.prototype.getContent = function () { 2176 var $e = this.$element 2177 var o = this.options 2178 2179 return $e.attr('data-content') 2180 || (typeof o.content == 'function' ? 2181 o.content.call($e[0]) : 2182 o.content) 2183 } 2184 2185 Popover.prototype.arrow = function () { 2186 return (this.$arrow = this.$arrow || this.tip().find('.arrow')) 2187 } 2188 2189 2190 // POPOVER PLUGIN DEFINITION 2191 // ========================= 2192 2193 function Plugin(option) { 2194 return this.each(function () { 2195 var $this = $(this) 2196 var data = $this.data('bs.popover') 2197 var options = typeof option == 'object' && option 2198 2199 if (!data && /destroy|hide/.test(option)) return 2200 if (!data) $this.data('bs.popover', (data = new Popover(this, options))) 2201 if (typeof option == 'string') data[option]() 2202 }) 2203 } 2204 2205 var old = $.fn.popover 2206 2207 $.fn.popover = Plugin 2208 $.fn.popover.Constructor = Popover 2209 2210 2211 // POPOVER NO CONFLICT 2212 // =================== 2213 2214 $.fn.popover.noConflict = function () { 2215 $.fn.popover = old 2216 return this 2217 } 2218 2219}(jQuery); 2220 2221/* ======================================================================== 2222 * Bootstrap: scrollspy.js v3.4.1 2223 * https://getbootstrap.com/docs/3.4/javascript/#scrollspy 2224 * ======================================================================== 2225 * Copyright 2011-2019 Twitter, Inc. 2226 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 2227 * ======================================================================== */ 2228 2229 2230+function ($) { 2231 'use strict'; 2232 2233 // SCROLLSPY CLASS DEFINITION 2234 // ========================== 2235 2236 function ScrollSpy(element, options) { 2237 this.$body = $(document.body) 2238 this.$scrollElement = $(element).is(document.body) ? $(window) : $(element) 2239 this.options = $.extend({}, ScrollSpy.DEFAULTS, options) 2240 this.selector = (this.options.target || '') + ' .nav li > a' 2241 this.offsets = [] 2242 this.targets = [] 2243 this.activeTarget = null 2244 this.scrollHeight = 0 2245 2246 this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this)) 2247 this.refresh() 2248 this.process() 2249 } 2250 2251 ScrollSpy.VERSION = '3.4.1' 2252 2253 ScrollSpy.DEFAULTS = { 2254 offset: 10 2255 } 2256 2257 ScrollSpy.prototype.getScrollHeight = function () { 2258 return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight) 2259 } 2260 2261 ScrollSpy.prototype.refresh = function () { 2262 var that = this 2263 var offsetMethod = 'offset' 2264 var offsetBase = 0 2265 2266 this.offsets = [] 2267 this.targets = [] 2268 this.scrollHeight = this.getScrollHeight() 2269 2270 if (!$.isWindow(this.$scrollElement[0])) { 2271 offsetMethod = 'position' 2272 offsetBase = this.$scrollElement.scrollTop() 2273 } 2274 2275 this.$body 2276 .find(this.selector) 2277 .map(function () { 2278 var $el = $(this) 2279 var href = $el.data('target') || $el.attr('href') 2280 var $href = /^#./.test(href) && $(href) 2281 2282 return ($href 2283 && $href.length 2284 && $href.is(':visible') 2285 && [[$href[offsetMethod]().top + offsetBase, href]]) || null 2286 }) 2287 .sort(function (a, b) { return a[0] - b[0] }) 2288 .each(function () { 2289 that.offsets.push(this[0]) 2290 that.targets.push(this[1]) 2291 }) 2292 } 2293 2294 ScrollSpy.prototype.process = function () { 2295 var scrollTop = this.$scrollElement.scrollTop() + this.options.offset 2296 var scrollHeight = this.getScrollHeight() 2297 var maxScroll = this.options.offset + scrollHeight - this.$scrollElement.height() 2298 var offsets = this.offsets 2299 var targets = this.targets 2300 var activeTarget = this.activeTarget 2301 var i 2302 2303 if (this.scrollHeight != scrollHeight) { 2304 this.refresh() 2305 } 2306 2307 if (scrollTop >= maxScroll) { 2308 return activeTarget != (i = targets[targets.length - 1]) && this.activate(i) 2309 } 2310 2311 if (activeTarget && scrollTop < offsets[0]) { 2312 this.activeTarget = null 2313 return this.clear() 2314 } 2315 2316 for (i = offsets.length; i--;) { 2317 activeTarget != targets[i] 2318 && scrollTop >= offsets[i] 2319 && (offsets[i + 1] === undefined || scrollTop < offsets[i + 1]) 2320 && this.activate(targets[i]) 2321 } 2322 } 2323 2324 ScrollSpy.prototype.activate = function (target) { 2325 this.activeTarget = target 2326 2327 this.clear() 2328 2329 var selector = this.selector + 2330 '[data-target="' + target + '"],' + 2331 this.selector + '[href="' + target + '"]' 2332 2333 var active = $(selector) 2334 .parents('li') 2335 .addClass('active') 2336 2337 if (active.parent('.dropdown-menu').length) { 2338 active = active 2339 .closest('li.dropdown') 2340 .addClass('active') 2341 } 2342 2343 active.trigger('activate.bs.scrollspy') 2344 } 2345 2346 ScrollSpy.prototype.clear = function () { 2347 $(this.selector) 2348 .parentsUntil(this.options.target, '.active') 2349 .removeClass('active') 2350 } 2351 2352 2353 // SCROLLSPY PLUGIN DEFINITION 2354 // =========================== 2355 2356 function Plugin(option) { 2357 return this.each(function () { 2358 var $this = $(this) 2359 var data = $this.data('bs.scrollspy') 2360 var options = typeof option == 'object' && option 2361 2362 if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options))) 2363 if (typeof option == 'string') data[option]() 2364 }) 2365 } 2366 2367 var old = $.fn.scrollspy 2368 2369 $.fn.scrollspy = Plugin 2370 $.fn.scrollspy.Constructor = ScrollSpy 2371 2372 2373 // SCROLLSPY NO CONFLICT 2374 // ===================== 2375 2376 $.fn.scrollspy.noConflict = function () { 2377 $.fn.scrollspy = old 2378 return this 2379 } 2380 2381 2382 // SCROLLSPY DATA-API 2383 // ================== 2384 2385 $(window).on('load.bs.scrollspy.data-api', function () { 2386 $('[data-spy="scroll"]').each(function () { 2387 var $spy = $(this) 2388 Plugin.call($spy, $spy.data()) 2389 }) 2390 }) 2391 2392}(jQuery); 2393 2394/* ======================================================================== 2395 * Bootstrap: tab.js v3.4.1 2396 * https://getbootstrap.com/docs/3.4/javascript/#tabs 2397 * ======================================================================== 2398 * Copyright 2011-2019 Twitter, Inc. 2399 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 2400 * ======================================================================== */ 2401 2402 2403+function ($) { 2404 'use strict'; 2405 2406 // TAB CLASS DEFINITION 2407 // ==================== 2408 2409 var Tab = function (element) { 2410 // jscs:disable requireDollarBeforejQueryAssignment 2411 this.element = $(element) 2412 // jscs:enable requireDollarBeforejQueryAssignment 2413 } 2414 2415 Tab.VERSION = '3.4.1' 2416 2417 Tab.TRANSITION_DURATION = 150 2418 2419 Tab.prototype.show = function () { 2420 var $this = this.element 2421 var $ul = $this.closest('ul:not(.dropdown-menu)') 2422 var selector = $this.data('target') 2423 2424 if (!selector) { 2425 selector = $this.attr('href') 2426 selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 2427 } 2428 2429 if ($this.parent('li').hasClass('active')) return 2430 2431 var $previous = $ul.find('.active:last a') 2432 var hideEvent = $.Event('hide.bs.tab', { 2433 relatedTarget: $this[0] 2434 }) 2435 var showEvent = $.Event('show.bs.tab', { 2436 relatedTarget: $previous[0] 2437 }) 2438 2439 $previous.trigger(hideEvent) 2440 $this.trigger(showEvent) 2441 2442 if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return 2443 2444 var $target = $(document).find(selector) 2445 2446 this.activate($this.closest('li'), $ul) 2447 this.activate($target, $target.parent(), function () { 2448 $previous.trigger({ 2449 type: 'hidden.bs.tab', 2450 relatedTarget: $this[0] 2451 }) 2452 $this.trigger({ 2453 type: 'shown.bs.tab', 2454 relatedTarget: $previous[0] 2455 }) 2456 }) 2457 } 2458 2459 Tab.prototype.activate = function (element, container, callback) { 2460 var $active = container.find('> .active') 2461 var transition = callback 2462 && $.support.transition 2463 && ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length) 2464 2465 function next() { 2466 $active 2467 .removeClass('active') 2468 .find('> .dropdown-menu > .active') 2469 .removeClass('active') 2470 .end() 2471 .find('[data-toggle="tab"]') 2472 .attr('aria-expanded', false) 2473 2474 element 2475 .addClass('active') 2476 .find('[data-toggle="tab"]') 2477 .attr('aria-expanded', true) 2478 2479 if (transition) { 2480 element[0].offsetWidth // reflow for transition 2481 element.addClass('in') 2482 } else { 2483 element.removeClass('fade') 2484 } 2485 2486 if (element.parent('.dropdown-menu').length) { 2487 element 2488 .closest('li.dropdown') 2489 .addClass('active') 2490 .end() 2491 .find('[data-toggle="tab"]') 2492 .attr('aria-expanded', true) 2493 } 2494 2495 callback && callback() 2496 } 2497 2498 $active.length && transition ? 2499 $active 2500 .one('bsTransitionEnd', next) 2501 .emulateTransitionEnd(Tab.TRANSITION_DURATION) : 2502 next() 2503 2504 $active.removeClass('in') 2505 } 2506 2507 2508 // TAB PLUGIN DEFINITION 2509 // ===================== 2510 2511 function Plugin(option) { 2512 return this.each(function () { 2513 var $this = $(this) 2514 var data = $this.data('bs.tab') 2515 2516 if (!data) $this.data('bs.tab', (data = new Tab(this))) 2517 if (typeof option == 'string') data[option]() 2518 }) 2519 } 2520 2521 var old = $.fn.tab 2522 2523 $.fn.tab = Plugin 2524 $.fn.tab.Constructor = Tab 2525 2526 2527 // TAB NO CONFLICT 2528 // =============== 2529 2530 $.fn.tab.noConflict = function () { 2531 $.fn.tab = old 2532 return this 2533 } 2534 2535 2536 // TAB DATA-API 2537 // ============ 2538 2539 var clickHandler = function (e) { 2540 e.preventDefault() 2541 Plugin.call($(this), 'show') 2542 } 2543 2544 $(document) 2545 .on('click.bs.tab.data-api', '[data-toggle="tab"]', clickHandler) 2546 .on('click.bs.tab.data-api', '[data-toggle="pill"]', clickHandler) 2547 2548}(jQuery); 2549 2550/* ======================================================================== 2551 * Bootstrap: affix.js v3.4.1 2552 * https://getbootstrap.com/docs/3.4/javascript/#affix 2553 * ======================================================================== 2554 * Copyright 2011-2019 Twitter, Inc. 2555 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 2556 * ======================================================================== */ 2557 2558 2559+function ($) { 2560 'use strict'; 2561 2562 // AFFIX CLASS DEFINITION 2563 // ====================== 2564 2565 var Affix = function (element, options) { 2566 this.options = $.extend({}, Affix.DEFAULTS, options) 2567 2568 var target = this.options.target === Affix.DEFAULTS.target ? $(this.options.target) : $(document).find(this.options.target) 2569 2570 this.$target = target 2571 .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this)) 2572 .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this)) 2573 2574 this.$element = $(element) 2575 this.affixed = null 2576 this.unpin = null 2577 this.pinnedOffset = null 2578 2579 this.checkPosition() 2580 } 2581 2582 Affix.VERSION = '3.4.1' 2583 2584 Affix.RESET = 'affix affix-top affix-bottom' 2585 2586 Affix.DEFAULTS = { 2587 offset: 0, 2588 target: window 2589 } 2590 2591 Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) { 2592 var scrollTop = this.$target.scrollTop() 2593 var position = this.$element.offset() 2594 var targetHeight = this.$target.height() 2595 2596 if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false 2597 2598 if (this.affixed == 'bottom') { 2599 if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom' 2600 return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom' 2601 } 2602 2603 var initializing = this.affixed == null 2604 var colliderTop = initializing ? scrollTop : position.top 2605 var colliderHeight = initializing ? targetHeight : height 2606 2607 if (offsetTop != null && scrollTop <= offsetTop) return 'top' 2608 if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom' 2609 2610 return false 2611 } 2612 2613 Affix.prototype.getPinnedOffset = function () { 2614 if (this.pinnedOffset) return this.pinnedOffset 2615 this.$element.removeClass(Affix.RESET).addClass('affix') 2616 var scrollTop = this.$target.scrollTop() 2617 var position = this.$element.offset() 2618 return (this.pinnedOffset = position.top - scrollTop) 2619 } 2620 2621 Affix.prototype.checkPositionWithEventLoop = function () { 2622 setTimeout($.proxy(this.checkPosition, this), 1) 2623 } 2624 2625 Affix.prototype.checkPosition = function () { 2626 if (!this.$element.is(':visible')) return 2627 2628 var height = this.$element.height() 2629 var offset = this.options.offset 2630 var offsetTop = offset.top 2631 var offsetBottom = offset.bottom 2632 var scrollHeight = Math.max($(document).height(), $(document.body).height()) 2633 2634 if (typeof offset != 'object') offsetBottom = offsetTop = offset 2635 if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element) 2636 if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element) 2637
vendor: 1,781 bytes, lines 2638-2713
2638 var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom) 2639 2640 if (this.affixed != affix) { 2641 if (this.unpin != null) this.$element.css('top', '') 2642 2643 var affixType = 'affix' + (affix ? '-' + affix : '') 2644 var e = $.Event(affixType + '.bs.affix') 2645 2646 this.$element.trigger(e) 2647 2648 if (e.isDefaultPrevented()) return 2649 2650 this.affixed = affix 2651 this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null 2652 2653 this.$element 2654 .removeClass(Affix.RESET) 2655 .addClass(affixType) 2656 .trigger(affixType.replace('affix', 'affixed') + '.bs.affix') 2657 } 2658 2659 if (affix == 'bottom') { 2660 this.$element.offset({ 2661 top: scrollHeight - height - offsetBottom 2662 }) 2663 } 2664 } 2665 2666 2667 // AFFIX PLUGIN DEFINITION 2668 // ======================= 2669 2670 function Plugin(option) { 2671 return this.each(function () { 2672 var $this = $(this) 2673 var data = $this.data('bs.affix') 2674 var options = typeof option == 'object' && option 2675 2676 if (!data) $this.data('bs.affix', (data = new Affix(this, options))) 2677 if (typeof option == 'string') data[option]() 2678 }) 2679 } 2680 2681 var old = $.fn.affix 2682 2683 $.fn.affix = Plugin 2684 $.fn.affix.Constructor = Affix 2685 2686 2687 // AFFIX NO CONFLICT 2688 // ================= 2689 2690 $.fn.affix.noConflict = function () { 2691 $.fn.affix = old 2692 return this 2693 } 2694 2695 2696 // AFFIX DATA-API 2697 // ============== 2698 2699 $(window).on('load', function () { 2700 $('[data-spy="affix"]').each(function () { 2701 var $spy = $(this) 2702 var data = $spy.data() 2703 2704 data.offset = data.offset || {} 2705 2706 if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom 2707 if (data.offsetTop != null) data.offset.top = data.offsetTop 2708 2709 Plugin.call($spy, data) 2710 }) 2711 }) 2712 2713}(jQuery);
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.