vendor: 4,347 bytes, lines 1-138
1/*! 2 * Bootstrap v3.3.7 (http://getbootstrap.com) 3 * Copyright 2011-2017 Twitter, Inc. 4 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 */ 6 7/*! 8 * Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=471758a4cefa27d799aac55174636b69) 9 * Config saved to config.json and https://gist.github.com/471758a4cefa27d799aac55174636b69 10 */ 11if (typeof jQuery === 'undefined') { 12 throw new Error('Bootstrap\'s JavaScript requires jQuery') 13} 14+function ($) { 15 'use strict'; 16 var version = $.fn.jquery.split(' ')[0].split('.') 17 if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 3)) { 18 throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4') 19 } 20}(jQuery); 21 22/* ======================================================================== 23 * Bootstrap: button.js v3.3.7 24 * http://getbootstrap.com/javascript/#buttons 25 * ======================================================================== 26 * Copyright 2011-2016 Twitter, Inc. 27 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 28 * ======================================================================== */ 29 30 31+function ($) { 32 'use strict'; 33 34 // BUTTON PUBLIC CLASS DEFINITION 35 // ============================== 36 37 var Button = function (element, options) { 38 this.$element = $(element) 39 this.options = $.extend({}, Button.DEFAULTS, options) 40 this.isLoading = false 41 } 42 43 Button.VERSION = '3.3.7' 44 45 Button.DEFAULTS = { 46 loadingText: 'loading...' 47 } 48 49 Button.prototype.setState = function (state) { 50 var d = 'disabled' 51 var $el = this.$element 52 var val = $el.is('input') ? 'val' : 'html' 53 var data = $el.data() 54 55 state += 'Text' 56 57 if (data.resetText == null) $el.data('resetText', $el[val]()) 58 59 // push to event loop to allow forms to submit 60 setTimeout($.proxy(function () { 61 $el[val](data[state] == null ? this.options[state] : data[state]) 62 63 if (state == 'loadingText') { 64 this.isLoading = true 65 $el.addClass(d).attr(d, d).prop(d, true) 66 } else if (this.isLoading) { 67 this.isLoading = false 68 $el.removeClass(d).removeAttr(d).prop(d, false) 69 } 70 }, this), 0) 71 } 72 73 Button.prototype.toggle = function () { 74 var changed = true 75 var $parent = this.$element.closest('[data-toggle="buttons"]') 76 77 if ($parent.length) { 78 var $input = this.$element.find('input') 79 if ($input.prop('type') == 'radio') { 80 if ($input.prop('checked')) changed = false 81 $parent.find('.active').removeClass('active') 82 this.$element.addClass('active') 83 } else if ($input.prop('type') == 'checkbox') { 84 if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false 85 this.$element.toggleClass('active') 86 } 87 $input.prop('checked', this.$element.hasClass('active')) 88 if (changed) $input.trigger('change') 89 } else { 90 this.$element.attr('aria-pressed', !this.$element.hasClass('active')) 91 this.$element.toggleClass('active') 92 } 93 } 94 95 96 // BUTTON PLUGIN DEFINITION 97 // ======================== 98 99 function Plugin(option) { 100 return this.each(function () { 101 var $this = $(this) 102 var data = $this.data('bs.button') 103 var options = typeof option == 'object' && option 104 105 if (!data) $this.data('bs.button', (data = new Button(this, options))) 106 107 if (option == 'toggle') data.toggle() 108 else if (option) data.setState(option) 109 }) 110 } 111 112 var old = $.fn.button 113 114 $.fn.button = Plugin 115 $.fn.button.Constructor = Button 116 117 118 // BUTTON NO CONFLICT 119 // ================== 120 121 $.fn.button.noConflict = function () { 122 $.fn.button = old 123 return this 124 } 125 126 127 // BUTTON DATA-API 128 // =============== 129 130 $(document) 131 .on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) { 132 var $btn = $(e.target).closest('.btn') 133 Plugin.call($btn, 'toggle') 134 if (!($(e.target).is('input[type="radio"], input[type="checkbox"]'))) { 135 // Prevent double click on radios, and the double selections (so cancellation) on checkboxes 136 e.preventDefault() 137 // The target component still receive the focus 138 if ($btn.is('input,button')) $btn.trigger('focus')
vendor: 4,833 bytes, lines 139-291
139 else $btn.find('input:visible,button:visible').first().trigger('focus') 140 } 141 }) 142 .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) { 143 $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type)) 144 }) 145 146}(jQuery); 147 148/* ======================================================================== 149 * Bootstrap: carousel.js v3.3.7 150 * http://getbootstrap.com/javascript/#carousel 151 * ======================================================================== 152 * Copyright 2011-2016 Twitter, Inc. 153 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 154 * ======================================================================== */ 155 156 157+function ($) { 158 'use strict'; 159 160 // CAROUSEL CLASS DEFINITION 161 // ========================= 162 163 var Carousel = function (element, options) { 164 this.$element = $(element) 165 this.$indicators = this.$element.find('.carousel-indicators') 166 this.options = options 167 this.paused = null 168 this.sliding = null 169 this.interval = null 170 this.$active = null 171 this.$items = null 172 173 this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this)) 174 175 this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element 176 .on('mouseenter.bs.carousel', $.proxy(this.pause, this)) 177 .on('mouseleave.bs.carousel', $.proxy(this.cycle, this)) 178 } 179 180 Carousel.VERSION = '3.3.7' 181 182 Carousel.TRANSITION_DURATION = 600 183 184 Carousel.DEFAULTS = { 185 interval: 5000, 186 pause: 'hover', 187 wrap: true, 188 keyboard: true 189 } 190 191 Carousel.prototype.keydown = function (e) { 192 if (/input|textarea/i.test(e.target.tagName)) return 193 switch (e.which) { 194 case 37: this.prev(); break 195 case 39: this.next(); break 196 default: return 197 } 198 199 e.preventDefault() 200 } 201 202 Carousel.prototype.cycle = function (e) { 203 e || (this.paused = false) 204 205 this.interval && clearInterval(this.interval) 206 207 this.options.interval 208 && !this.paused 209 && (this.interval = setInterval($.proxy(this.next, this), this.options.interval)) 210 211 return this 212 } 213 214 Carousel.prototype.getItemIndex = function (item) { 215 this.$items = item.parent().children('.item') 216 return this.$items.index(item || this.$active) 217 } 218 219 Carousel.prototype.getItemForDirection = function (direction, active) { 220 var activeIndex = this.getItemIndex(active) 221 var willWrap = (direction == 'prev' && activeIndex === 0) 222 || (direction == 'next' && activeIndex == (this.$items.length - 1)) 223 if (willWrap && !this.options.wrap) return active 224 var delta = direction == 'prev' ? -1 : 1 225 var itemIndex = (activeIndex + delta) % this.$items.length 226 return this.$items.eq(itemIndex) 227 } 228 229 Carousel.prototype.to = function (pos) { 230 var that = this 231 var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active')) 232 233 if (pos > (this.$items.length - 1) || pos < 0) return 234 235 if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid" 236 if (activeIndex == pos) return this.pause().cycle() 237 238 return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos)) 239 } 240 241 Carousel.prototype.pause = function (e) { 242 e || (this.paused = true) 243 244 if (this.$element.find('.next, .prev').length && $.support.transition) { 245 this.$element.trigger($.support.transition.end) 246 this.cycle(true) 247 } 248 249 this.interval = clearInterval(this.interval) 250 251 return this 252 } 253 254 Carousel.prototype.next = function () { 255 if (this.sliding) return 256 return this.slide('next') 257 } 258 259 Carousel.prototype.prev = function () { 260 if (this.sliding) return 261 return this.slide('prev') 262 } 263 264 Carousel.prototype.slide = function (type, next) { 265 var $active = this.$element.find('.item.active') 266 var $next = next || this.getItemForDirection(type, $active) 267 var isCycling = this.interval 268 var direction = type == 'next' ? 'left' : 'right' 269 var that = this 270 271 if ($next.hasClass('active')) return (this.sliding = false) 272 273 var relatedTarget = $next[0] 274 var slideEvent = $.Event('slide.bs.carousel', { 275 relatedTarget: relatedTarget, 276 direction: direction 277 }) 278 this.$element.trigger(slideEvent) 279 if (slideEvent.isDefaultPrevented()) return 280 281 this.sliding = true 282 283 isCycling && this.pause() 284 285 if (this.$indicators.length) { 286 this.$indicators.find('.active').removeClass('active') 287 var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)]) 288 $nextIndicator && $nextIndicator.addClass('active') 289 } 290 291 var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid"
vendor: 17,770 bytes, lines 292-899
292 if ($.support.transition && this.$element.hasClass('slide')) { 293 $next.addClass(type) 294 $next[0].offsetWidth // force reflow 295 $active.addClass(direction) 296 $next.addClass(direction) 297 $active 298 .one('bsTransitionEnd', function () { 299 $next.removeClass([type, direction].join(' ')).addClass('active') 300 $active.removeClass(['active', direction].join(' ')) 301 that.sliding = false 302 setTimeout(function () { 303 that.$element.trigger(slidEvent) 304 }, 0) 305 }) 306 .emulateTransitionEnd(Carousel.TRANSITION_DURATION) 307 } else { 308 $active.removeClass('active') 309 $next.addClass('active') 310 this.sliding = false 311 this.$element.trigger(slidEvent) 312 } 313 314 isCycling && this.cycle() 315 316 return this 317 } 318 319 320 // CAROUSEL PLUGIN DEFINITION 321 // ========================== 322 323 function Plugin(option) { 324 return this.each(function () { 325 var $this = $(this) 326 var data = $this.data('bs.carousel') 327 var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option) 328 var action = typeof option == 'string' ? option : options.slide 329 330 if (!data) $this.data('bs.carousel', (data = new Carousel(this, options))) 331 if (typeof option == 'number') data.to(option) 332 else if (action) data[action]() 333 else if (options.interval) data.pause().cycle() 334 }) 335 } 336 337 var old = $.fn.carousel 338 339 $.fn.carousel = Plugin 340 $.fn.carousel.Constructor = Carousel 341 342 343 // CAROUSEL NO CONFLICT 344 // ==================== 345 346 $.fn.carousel.noConflict = function () { 347 $.fn.carousel = old 348 return this 349 } 350 351 352 // CAROUSEL DATA-API 353 // ================= 354 355 var clickHandler = function (e) { 356 var href 357 var $this = $(this) 358 var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7 359 if (!$target.hasClass('carousel')) return 360 var options = $.extend({}, $target.data(), $this.data()) 361 var slideIndex = $this.attr('data-slide-to') 362 if (slideIndex) options.interval = false 363 364 Plugin.call($target, options) 365 366 if (slideIndex) { 367 $target.data('bs.carousel').to(slideIndex) 368 } 369 370 e.preventDefault() 371 } 372 373 $(document) 374 .on('click.bs.carousel.data-api', '[data-slide]', clickHandler) 375 .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler) 376 377 $(window).on('load', function () { 378 $('[data-ride="carousel"]').each(function () { 379 var $carousel = $(this) 380 Plugin.call($carousel, $carousel.data()) 381 }) 382 }) 383 384}(jQuery); 385 386/* ======================================================================== 387 * Bootstrap: dropdown.js v3.3.7 388 * http://getbootstrap.com/javascript/#dropdowns 389 * ======================================================================== 390 * Copyright 2011-2016 Twitter, Inc. 391 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 392 * ======================================================================== */ 393 394 395+function ($) { 396 'use strict'; 397 398 // DROPDOWN CLASS DEFINITION 399 // ========================= 400 401 var backdrop = '.dropdown-backdrop' 402 var toggle = '[data-toggle="dropdown"]' 403 var Dropdown = function (element) { 404 $(element).on('click.bs.dropdown', this.toggle) 405 } 406 407 Dropdown.VERSION = '3.3.7' 408 409 function getParent($this) { 410 var selector = $this.attr('data-target') 411 412 if (!selector) { 413 selector = $this.attr('href') 414 selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 415 } 416 417 var $parent = selector && $(selector) 418 419 return $parent && $parent.length ? $parent : $this.parent() 420 } 421 422 function clearMenus(e) { 423 if (e && e.which === 3) return 424 $(backdrop).remove() 425 $(toggle).each(function () { 426 var $this = $(this) 427 var $parent = getParent($this) 428 var relatedTarget = { relatedTarget: this } 429 430 if (!$parent.hasClass('open')) return 431 432 if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return 433 434 $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget)) 435 436 if (e.isDefaultPrevented()) return 437 438 $this.attr('aria-expanded', 'false') 439 $parent.removeClass('open').trigger($.Event('hidden.bs.dropdown', relatedTarget)) 440 }) 441 } 442 443 Dropdown.prototype.toggle = function (e) { 444 var $this = $(this) 445 446 if ($this.is('.disabled, :disabled')) return 447 448 var $parent = getParent($this) 449 var isActive = $parent.hasClass('open') 450 451 clearMenus() 452 453 if (!isActive) { 454 if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) { 455 // if mobile we use a backdrop because click events don't delegate 456 $(document.createElement('div')) 457 .addClass('dropdown-backdrop') 458 .insertAfter($(this)) 459 .on('click', clearMenus) 460 } 461 462 var relatedTarget = { relatedTarget: this } 463 $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget)) 464 465 if (e.isDefaultPrevented()) return 466 467 $this 468 .trigger('focus') 469 .attr('aria-expanded', 'true') 470 471 $parent 472 .toggleClass('open') 473 .trigger($.Event('shown.bs.dropdown', relatedTarget)) 474 } 475 476 return false 477 } 478 479 Dropdown.prototype.keydown = function (e) { 480 if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return 481 482 var $this = $(this) 483 484 e.preventDefault() 485 e.stopPropagation() 486 487 if ($this.is('.disabled, :disabled')) return 488 489 var $parent = getParent($this) 490 var isActive = $parent.hasClass('open') 491 492 if (!isActive && e.which != 27 || isActive && e.which == 27) { 493 if (e.which == 27) $parent.find(toggle).trigger('focus') 494 return $this.trigger('click') 495 } 496 497 var desc = ' li:not(.disabled):visible a' 498 var $items = $parent.find('.dropdown-menu' + desc) 499 500 if (!$items.length) return 501 502 var index = $items.index(e.target) 503 504 if (e.which == 38 && index > 0) index-- // up 505 if (e.which == 40 && index < $items.length - 1) index++ // down 506 if (!~index) index = 0 507 508 $items.eq(index).trigger('focus') 509 } 510 511 512 // DROPDOWN PLUGIN DEFINITION 513 // ========================== 514 515 function Plugin(option) { 516 return this.each(function () { 517 var $this = $(this) 518 var data = $this.data('bs.dropdown') 519 520 if (!data) $this.data('bs.dropdown', (data = new Dropdown(this))) 521 if (typeof option == 'string') data[option].call($this) 522 }) 523 } 524 525 var old = $.fn.dropdown 526 527 $.fn.dropdown = Plugin 528 $.fn.dropdown.Constructor = Dropdown 529 530 531 // DROPDOWN NO CONFLICT 532 // ==================== 533 534 $.fn.dropdown.noConflict = function () { 535 $.fn.dropdown = old 536 return this 537 } 538 539 540 // APPLY TO STANDARD DROPDOWN ELEMENTS 541 // =================================== 542 543 $(document) 544 .on('click.bs.dropdown.data-api', clearMenus) 545 .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() }) 546 .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle) 547 .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown) 548 .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown) 549 550}(jQuery); 551 552/* ======================================================================== 553 * Bootstrap: modal.js v3.3.7 554 * http://getbootstrap.com/javascript/#modals 555 * ======================================================================== 556 * Copyright 2011-2016 Twitter, Inc. 557 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 558 * ======================================================================== */ 559 560 561+function ($) { 562 'use strict'; 563 564 // MODAL CLASS DEFINITION 565 // ====================== 566 567 var Modal = function (element, options) { 568 this.options = options 569 this.$body = $(document.body) 570 this.$element = $(element) 571 this.$dialog = this.$element.find('.modal-dialog') 572 this.$backdrop = null 573 this.isShown = null 574 this.originalBodyPad = null 575 this.scrollbarWidth = 0 576 this.ignoreBackdropClick = false 577 578 if (this.options.remote) { 579 this.$element 580 .find('.modal-content') 581 .load(this.options.remote, $.proxy(function () { 582 this.$element.trigger('loaded.bs.modal') 583 }, this)) 584 } 585 } 586 587 Modal.VERSION = '3.3.7' 588 589 Modal.TRANSITION_DURATION = 300 590 Modal.BACKDROP_TRANSITION_DURATION = 150 591 592 Modal.DEFAULTS = { 593 backdrop: true, 594 keyboard: true, 595 show: true 596 } 597 598 Modal.prototype.toggle = function (_relatedTarget) { 599 return this.isShown ? this.hide() : this.show(_relatedTarget) 600 } 601 602 Modal.prototype.show = function (_relatedTarget) { 603 var that = this 604 var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget }) 605 606 this.$element.trigger(e) 607 608 if (this.isShown || e.isDefaultPrevented()) return 609 610 this.isShown = true 611 612 this.checkScrollbar() 613 this.setScrollbar() 614 this.$body.addClass('modal-open') 615 616 this.escape() 617 this.resize() 618 619 this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this)) 620 621 this.$dialog.on('mousedown.dismiss.bs.modal', function () { 622 that.$element.one('mouseup.dismiss.bs.modal', function (e) { 623 if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true 624 }) 625 }) 626 627 this.backdrop(function () { 628 var transition = $.support.transition && that.$element.hasClass('fade') 629 630 if (!that.$element.parent().length) { 631 that.$element.appendTo(that.$body) // don't move modals dom position 632 } 633 634 that.$element 635 .show() 636 .scrollTop(0) 637 638 that.adjustDialog() 639 640 if (transition) { 641 that.$element[0].offsetWidth // force reflow 642 } 643 644 that.$element.addClass('in') 645 646 that.enforceFocus() 647 648 var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget }) 649 650 transition ? 651 that.$dialog // wait for modal to slide in 652 .one('bsTransitionEnd', function () { 653 that.$element.trigger('focus').trigger(e) 654 }) 655 .emulateTransitionEnd(Modal.TRANSITION_DURATION) : 656 that.$element.trigger('focus').trigger(e) 657 }) 658 } 659 660 Modal.prototype.hide = function (e) { 661 if (e) e.preventDefault() 662 663 e = $.Event('hide.bs.modal') 664 665 this.$element.trigger(e) 666 667 if (!this.isShown || e.isDefaultPrevented()) return 668 669 this.isShown = false 670 671 this.escape() 672 this.resize() 673 674 $(document).off('focusin.bs.modal') 675 676 this.$element 677 .removeClass('in') 678 .off('click.dismiss.bs.modal') 679 .off('mouseup.dismiss.bs.modal') 680 681 this.$dialog.off('mousedown.dismiss.bs.modal') 682 683 $.support.transition && this.$element.hasClass('fade') ? 684 this.$element 685 .one('bsTransitionEnd', $.proxy(this.hideModal, this)) 686 .emulateTransitionEnd(Modal.TRANSITION_DURATION) : 687 this.hideModal() 688 } 689 690 Modal.prototype.enforceFocus = function () { 691 $(document) 692 .off('focusin.bs.modal') // guard against infinite focus loop 693 .on('focusin.bs.modal', $.proxy(function (e) { 694 if (document !== e.target && 695 this.$element[0] !== e.target && 696 !this.$element.has(e.target).length) { 697 this.$element.trigger('focus') 698 } 699 }, this)) 700 } 701 702 Modal.prototype.escape = function () { 703 if (this.isShown && this.options.keyboard) { 704 this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) { 705 e.which == 27 && this.hide() 706 }, this)) 707 } else if (!this.isShown) { 708 this.$element.off('keydown.dismiss.bs.modal') 709 } 710 } 711 712 Modal.prototype.resize = function () { 713 if (this.isShown) { 714 $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this)) 715 } else { 716 $(window).off('resize.bs.modal') 717 } 718 } 719 720 Modal.prototype.hideModal = function () { 721 var that = this 722 this.$element.hide() 723 this.backdrop(function () { 724 that.$body.removeClass('modal-open') 725 that.resetAdjustments() 726 that.resetScrollbar() 727 that.$element.trigger('hidden.bs.modal') 728 }) 729 } 730 731 Modal.prototype.removeBackdrop = function () { 732 this.$backdrop && this.$backdrop.remove() 733 this.$backdrop = null 734 } 735 736 Modal.prototype.backdrop = function (callback) { 737 var that = this 738 var animate = this.$element.hasClass('fade') ? 'fade' : '' 739 740 if (this.isShown && this.options.backdrop) { 741 var doAnimate = $.support.transition && animate 742 743 this.$backdrop = $(document.createElement('div')) 744 .addClass('modal-backdrop ' + animate) 745 .appendTo(this.$body) 746 747 this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) { 748 if (this.ignoreBackdropClick) { 749 this.ignoreBackdropClick = false 750 return 751 } 752 if (e.target !== e.currentTarget) return 753 this.options.backdrop == 'static' 754 ? this.$element[0].focus() 755 : this.hide() 756 }, this)) 757 758 if (doAnimate) this.$backdrop[0].offsetWidth // force reflow 759 760 this.$backdrop.addClass('in') 761 762 if (!callback) return 763 764 doAnimate ? 765 this.$backdrop 766 .one('bsTransitionEnd', callback) 767 .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) : 768 callback() 769 770 } else if (!this.isShown && this.$backdrop) { 771 this.$backdrop.removeClass('in') 772 773 var callbackRemove = function () { 774 that.removeBackdrop() 775 callback && callback() 776 } 777 $.support.transition && this.$element.hasClass('fade') ? 778 this.$backdrop 779 .one('bsTransitionEnd', callbackRemove) 780 .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) : 781 callbackRemove() 782 783 } else if (callback) { 784 callback() 785 } 786 } 787 788 // these following methods are used to handle overflowing modals 789 790 Modal.prototype.handleUpdate = function () { 791 this.adjustDialog() 792 } 793 794 Modal.prototype.adjustDialog = function () { 795 var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight 796 797 this.$element.css({ 798 paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '', 799 paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : '' 800 }) 801 } 802 803 Modal.prototype.resetAdjustments = function () { 804 this.$element.css({ 805 paddingLeft: '', 806 paddingRight: '' 807 }) 808 } 809 810 Modal.prototype.checkScrollbar = function () { 811 var fullWindowWidth = window.innerWidth 812 if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8 813 var documentElementRect = document.documentElement.getBoundingClientRect() 814 fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left) 815 } 816 this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth 817 this.scrollbarWidth = this.measureScrollbar() 818 } 819 820 Modal.prototype.setScrollbar = function () { 821 var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10) 822 this.originalBodyPad = document.body.style.paddingRight || '' 823 if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth) 824 } 825 826 Modal.prototype.resetScrollbar = function () { 827 this.$body.css('padding-right', this.originalBodyPad) 828 } 829 830 Modal.prototype.measureScrollbar = function () { // thx walsh 831 var scrollDiv = document.createElement('div') 832 scrollDiv.className = 'modal-scrollbar-measure' 833 this.$body.append(scrollDiv) 834 var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth 835 this.$body[0].removeChild(scrollDiv) 836 return scrollbarWidth 837 } 838 839 840 // MODAL PLUGIN DEFINITION 841 // ======================= 842 843 function Plugin(option, _relatedTarget) { 844 return this.each(function () { 845 var $this = $(this) 846 var data = $this.data('bs.modal') 847 var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option) 848 849 if (!data) $this.data('bs.modal', (data = new Modal(this, options))) 850 if (typeof option == 'string') data[option](_relatedTarget) 851 else if (options.show) data.show(_relatedTarget) 852 }) 853 } 854 855 var old = $.fn.modal 856 857 $.fn.modal = Plugin 858 $.fn.modal.Constructor = Modal 859 860 861 // MODAL NO CONFLICT 862 // ================= 863 864 $.fn.modal.noConflict = function () { 865 $.fn.modal = old 866 return this 867 } 868 869 870 // MODAL DATA-API 871 // ============== 872 873 $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) { 874 var $this = $(this) 875 var href = $this.attr('href') 876 var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7 877 var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data()) 878 879 if ($this.is('a')) e.preventDefault() 880 881 $target.one('show.bs.modal', function (showEvent) { 882 if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown 883 $target.one('hidden.bs.modal', function () { 884 $this.is(':visible') && $this.trigger('focus') 885 }) 886 }) 887 Plugin.call($target, option, this) 888 }) 889 890}(jQuery); 891 892/* ======================================================================== 893 * Bootstrap: collapse.js v3.3.7 894 * http://getbootstrap.com/javascript/#collapse 895 * ======================================================================== 896 * Copyright 2011-2016 Twitter, Inc. 897 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 898 * ======================================================================== */ 899
vendor: 6,031 bytes, lines 900-1116
900/* jshint latedef: false */ 901 902+function ($) { 903 'use strict'; 904 905 // COLLAPSE PUBLIC CLASS DEFINITION 906 // ================================ 907 908 var Collapse = function (element, options) { 909 this.$element = $(element) 910 this.options = $.extend({}, Collapse.DEFAULTS, options) 911 this.$trigger = $('[data-toggle="collapse"][href="#' + element.id + '"],' + 912 '[data-toggle="collapse"][data-target="#' + element.id + '"]') 913 this.transitioning = null 914 915 if (this.options.parent) { 916 this.$parent = this.getParent() 917 } else { 918 this.addAriaAndCollapsedClass(this.$element, this.$trigger) 919 } 920 921 if (this.options.toggle) this.toggle() 922 } 923 924 Collapse.VERSION = '3.3.7' 925 926 Collapse.TRANSITION_DURATION = 350 927 928 Collapse.DEFAULTS = { 929 toggle: true 930 } 931 932 Collapse.prototype.dimension = function () { 933 var hasWidth = this.$element.hasClass('width') 934 return hasWidth ? 'width' : 'height' 935 } 936 937 Collapse.prototype.show = function () { 938 if (this.transitioning || this.$element.hasClass('in')) return 939 940 var activesData 941 var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing') 942 943 if (actives && actives.length) { 944 activesData = actives.data('bs.collapse') 945 if (activesData && activesData.transitioning) return 946 } 947 948 var startEvent = $.Event('show.bs.collapse') 949 this.$element.trigger(startEvent) 950 if (startEvent.isDefaultPrevented()) return 951 952 if (actives && actives.length) { 953 Plugin.call(actives, 'hide') 954 activesData || actives.data('bs.collapse', null) 955 } 956 957 var dimension = this.dimension() 958 959 this.$element 960 .removeClass('collapse') 961 .addClass('collapsing')[dimension](0) 962 .attr('aria-expanded', true) 963 964 this.$trigger 965 .removeClass('collapsed') 966 .attr('aria-expanded', true) 967 968 this.transitioning = 1 969 970 var complete = function () { 971 this.$element 972 .removeClass('collapsing') 973 .addClass('collapse in')[dimension]('') 974 this.transitioning = 0 975 this.$element 976 .trigger('shown.bs.collapse') 977 } 978 979 if (!$.support.transition) return complete.call(this) 980 981 var scrollSize = $.camelCase(['scroll', dimension].join('-')) 982 983 this.$element 984 .one('bsTransitionEnd', $.proxy(complete, this)) 985 .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize]) 986 } 987 988 Collapse.prototype.hide = function () { 989 if (this.transitioning || !this.$element.hasClass('in')) return 990 991 var startEvent = $.Event('hide.bs.collapse') 992 this.$element.trigger(startEvent) 993 if (startEvent.isDefaultPrevented()) return 994 995 var dimension = this.dimension() 996 997 this.$element[dimension](this.$element[dimension]())[0].offsetHeight 998 999 this.$element 1000 .addClass('collapsing') 1001 .removeClass('collapse in') 1002 .attr('aria-expanded', false) 1003 1004 this.$trigger 1005 .addClass('collapsed') 1006 .attr('aria-expanded', false) 1007 1008 this.transitioning = 1 1009 1010 var complete = function () { 1011 this.transitioning = 0 1012 this.$element 1013 .removeClass('collapsing') 1014 .addClass('collapse') 1015 .trigger('hidden.bs.collapse') 1016 } 1017 1018 if (!$.support.transition) return complete.call(this) 1019 1020 this.$element 1021 [dimension](0) 1022 .one('bsTransitionEnd', $.proxy(complete, this)) 1023 .emulateTransitionEnd(Collapse.TRANSITION_DURATION) 1024 } 1025 1026 Collapse.prototype.toggle = function () { 1027 this[this.$element.hasClass('in') ? 'hide' : 'show']() 1028 } 1029 1030 Collapse.prototype.getParent = function () { 1031 return $(this.options.parent) 1032 .find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]') 1033 .each($.proxy(function (i, element) { 1034 var $element = $(element) 1035 this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element) 1036 }, this)) 1037 .end() 1038 } 1039 1040 Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) { 1041 var isOpen = $element.hasClass('in') 1042 1043 $element.attr('aria-expanded', isOpen) 1044 $trigger 1045 .toggleClass('collapsed', !isOpen) 1046 .attr('aria-expanded', isOpen) 1047 } 1048 1049 function getTargetFromTrigger($trigger) { 1050 var href 1051 var target = $trigger.attr('data-target') 1052 || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7 1053 1054 return $(target) 1055 } 1056 1057 1058 // COLLAPSE PLUGIN DEFINITION 1059 // ========================== 1060 1061 function Plugin(option) { 1062 return this.each(function () { 1063 var $this = $(this) 1064 var data = $this.data('bs.collapse') 1065 var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option) 1066 1067 if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false 1068 if (!data) $this.data('bs.collapse', (data = new Collapse(this, options))) 1069 if (typeof option == 'string') data[option]() 1070 }) 1071 } 1072 1073 var old = $.fn.collapse 1074 1075 $.fn.collapse = Plugin 1076 $.fn.collapse.Constructor = Collapse 1077 1078 1079 // COLLAPSE NO CONFLICT 1080 // ==================== 1081 1082 $.fn.collapse.noConflict = function () { 1083 $.fn.collapse = old 1084 return this 1085 } 1086 1087 1088 // COLLAPSE DATA-API 1089 // ================= 1090 1091 $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) { 1092 var $this = $(this) 1093 1094 if (!$this.attr('data-target')) e.preventDefault() 1095 1096 var $target = getTargetFromTrigger($this) 1097 var data = $target.data('bs.collapse') 1098 var option = data ? 'toggle' : $this.data() 1099 1100 Plugin.call($target, option) 1101 }) 1102 1103}(jQuery); 1104 1105/* ======================================================================== 1106 * Bootstrap: transition.js v3.3.7 1107 * http://getbootstrap.com/javascript/#transitions 1108 * ======================================================================== 1109 * Copyright 2011-2016 Twitter, Inc. 1110 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 1111 * ======================================================================== */ 1112 1113 1114+function ($) { 1115 'use strict'; 1116
vendor: 1,364 bytes, lines 1117-1163
1117 // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) 1118 // ============================================================ 1119 1120 function transitionEnd() { 1121 var el = document.createElement('bootstrap') 1122 1123 var transEndEventNames = { 1124 WebkitTransition : 'webkitTransitionEnd', 1125 MozTransition : 'transitionend', 1126 OTransition : 'oTransitionEnd otransitionend', 1127 transition : 'transitionend' 1128 } 1129 1130 for (var name in transEndEventNames) { 1131 if (el.style[name] !== undefined) { 1132 return { end: transEndEventNames[name] } 1133 } 1134 } 1135 1136 return false // explicit for ie8 ( ._.) 1137 } 1138 1139 // http://blog.alexmaccaw.com/css-transitions 1140 $.fn.emulateTransitionEnd = function (duration) { 1141 var called = false 1142 var $el = this 1143 $(this).one('bsTransitionEnd', function () { called = true }) 1144 var callback = function () { if (!called) $($el).trigger($.support.transition.end) } 1145 setTimeout(callback, duration) 1146 return this 1147 } 1148 1149 $(function () { 1150 $.support.transition = transitionEnd() 1151 1152 if (!$.support.transition) return 1153 1154 $.event.special.bsTransitionEnd = { 1155 bindType: $.support.transition.end, 1156 delegateType: $.support.transition.end, 1157 handle: function (e) { 1158 if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments) 1159 } 1160 } 1161 }) 1162 1163}(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.