vendor: 28,629 bytes, lines 1-1010
1/*! 2 * Bootstrap v3.3.5 (http://getbootstrap.com) 3 * Copyright 2011-2015 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=fa191a45fcecfc8f3052) 9 * Config saved to config.json and https://gist.github.com/fa191a45fcecfc8f3052 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)) { 18 throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher') 19 } 20}(jQuery); 21 22/* ======================================================================== 23 * Bootstrap: alert.js v3.3.5 24 * http://getbootstrap.com/javascript/#alerts 25 * ======================================================================== 26 * Copyright 2011-2015 Twitter, Inc. 27 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 28 * ======================================================================== */ 29 30 31+function ($) { 32 'use strict'; 33 34 // ALERT CLASS DEFINITION 35 // ====================== 36 37 var dismiss = '[data-dismiss="alert"]' 38 var Alert = function (el) { 39 $(el).on('click', dismiss, this.close) 40 } 41 42 Alert.VERSION = '3.3.5' 43 44 Alert.TRANSITION_DURATION = 150 45 46 Alert.prototype.close = function (e) { 47 var $this = $(this) 48 var selector = $this.attr('data-target') 49 50 if (!selector) { 51 selector = $this.attr('href') 52 selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 53 } 54 55 var $parent = $(selector) 56 57 if (e) e.preventDefault() 58 59 if (!$parent.length) { 60 $parent = $this.closest('.alert') 61 } 62 63 $parent.trigger(e = $.Event('close.bs.alert')) 64 65 if (e.isDefaultPrevented()) return 66 67 $parent.removeClass('in') 68 69 function removeElement() { 70 // detach from parent, fire event then clean up data 71 $parent.detach().trigger('closed.bs.alert').remove() 72 } 73 74 $.support.transition && $parent.hasClass('fade') ? 75 $parent 76 .one('bsTransitionEnd', removeElement) 77 .emulateTransitionEnd(Alert.TRANSITION_DURATION) : 78 removeElement() 79 } 80 81 82 // ALERT PLUGIN DEFINITION 83 // ======================= 84 85 function Plugin(option) { 86 return this.each(function () { 87 var $this = $(this) 88 var data = $this.data('bs.alert') 89 90 if (!data) $this.data('bs.alert', (data = new Alert(this))) 91 if (typeof option == 'string') data[option].call($this) 92 }) 93 } 94 95 var old = $.fn.alert 96 97 $.fn.alert = Plugin 98 $.fn.alert.Constructor = Alert 99 100 101 // ALERT NO CONFLICT 102 // ================= 103 104 $.fn.alert.noConflict = function () { 105 $.fn.alert = old 106 return this 107 } 108 109 110 // ALERT DATA-API 111 // ============== 112 113 $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close) 114 115}(jQuery); 116 117/* ======================================================================== 118 * Bootstrap: button.js v3.3.5 119 * http://getbootstrap.com/javascript/#buttons 120 * ======================================================================== 121 * Copyright 2011-2015 Twitter, Inc. 122 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 123 * ======================================================================== */ 124 125 126+function ($) { 127 'use strict'; 128 129 // BUTTON PUBLIC CLASS DEFINITION 130 // ============================== 131 132 var Button = function (element, options) { 133 this.$element = $(element) 134 this.options = $.extend({}, Button.DEFAULTS, options) 135 this.isLoading = false 136 } 137 138 Button.VERSION = '3.3.5' 139 140 Button.DEFAULTS = { 141 loadingText: 'loading...' 142 } 143 144 Button.prototype.setState = function (state) { 145 var d = 'disabled' 146 var $el = this.$element 147 var val = $el.is('input') ? 'val' : 'html' 148 var data = $el.data() 149 150 state += 'Text' 151 152 if (data.resetText == null) $el.data('resetText', $el[val]()) 153 154 // push to event loop to allow forms to submit 155 setTimeout($.proxy(function () { 156 $el[val](data[state] == null ? this.options[state] : data[state]) 157 158 if (state == 'loadingText') { 159 this.isLoading = true 160 $el.addClass(d).attr(d, d) 161 } else if (this.isLoading) { 162 this.isLoading = false 163 $el.removeClass(d).removeAttr(d) 164 } 165 }, this), 0) 166 } 167 168 Button.prototype.toggle = function () { 169 var changed = true 170 var $parent = this.$element.closest('[data-toggle="buttons"]') 171 172 if ($parent.length) { 173 var $input = this.$element.find('input') 174 if ($input.prop('type') == 'radio') { 175 if ($input.prop('checked')) changed = false 176 $parent.find('.active').removeClass('active') 177 this.$element.addClass('active') 178 } else if ($input.prop('type') == 'checkbox') { 179 if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false 180 this.$element.toggleClass('active') 181 } 182 $input.prop('checked', this.$element.hasClass('active')) 183 if (changed) $input.trigger('change') 184 } else { 185 this.$element.attr('aria-pressed', !this.$element.hasClass('active')) 186 this.$element.toggleClass('active') 187 } 188 } 189 190 191 // BUTTON PLUGIN DEFINITION 192 // ======================== 193 194 function Plugin(option) { 195 return this.each(function () { 196 var $this = $(this) 197 var data = $this.data('bs.button') 198 var options = typeof option == 'object' && option 199 200 if (!data) $this.data('bs.button', (data = new Button(this, options))) 201 202 if (option == 'toggle') data.toggle() 203 else if (option) data.setState(option) 204 }) 205 } 206 207 var old = $.fn.button 208 209 $.fn.button = Plugin 210 $.fn.button.Constructor = Button 211 212 213 // BUTTON NO CONFLICT 214 // ================== 215 216 $.fn.button.noConflict = function () { 217 $.fn.button = old 218 return this 219 } 220 221 222 // BUTTON DATA-API 223 // =============== 224 225 $(document) 226 .on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) { 227 var $btn = $(e.target) 228 if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') 229 Plugin.call($btn, 'toggle') 230 if (!($(e.target).is('input[type="radio"]') || $(e.target).is('input[type="checkbox"]'))) e.preventDefault() 231 }) 232 .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) { 233 $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type)) 234 }) 235 236}(jQuery); 237 238/* ======================================================================== 239 * Bootstrap: dropdown.js v3.3.5 240 * http://getbootstrap.com/javascript/#dropdowns 241 * ======================================================================== 242 * Copyright 2011-2015 Twitter, Inc. 243 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 244 * ======================================================================== */ 245 246 247+function ($) { 248 'use strict'; 249 250 // DROPDOWN CLASS DEFINITION 251 // ========================= 252 253 var backdrop = '.dropdown-backdrop' 254 var toggle = '[data-toggle="dropdown"]' 255 var Dropdown = function (element) { 256 $(element).on('click.bs.dropdown', this.toggle) 257 } 258 259 Dropdown.VERSION = '3.3.5' 260 261 function getParent($this) { 262 var selector = $this.attr('data-target') 263 264 if (!selector) { 265 selector = $this.attr('href') 266 selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 267 } 268 269 var $parent = selector && $(selector) 270 271 return $parent && $parent.length ? $parent : $this.parent() 272 } 273 274 function clearMenus(e) { 275 if (e && e.which === 3) return 276 $(backdrop).remove() 277 $(toggle).each(function () { 278 var $this = $(this) 279 var $parent = getParent($this) 280 var relatedTarget = { relatedTarget: this } 281 282 if (!$parent.hasClass('open')) return 283 284 if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return 285 286 $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget)) 287 288 if (e.isDefaultPrevented()) return 289 290 $this.attr('aria-expanded', 'false') 291 $parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget) 292 }) 293 } 294 295 Dropdown.prototype.toggle = function (e) { 296 var $this = $(this) 297 298 if ($this.is('.disabled, :disabled')) return 299 300 var $parent = getParent($this) 301 var isActive = $parent.hasClass('open') 302 303 clearMenus() 304 305 if (!isActive) { 306 if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) { 307 // if mobile we use a backdrop because click events don't delegate 308 $(document.createElement('div')) 309 .addClass('dropdown-backdrop') 310 .insertAfter($(this)) 311 .on('click', clearMenus) 312 } 313 314 var relatedTarget = { relatedTarget: this } 315 $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget)) 316 317 if (e.isDefaultPrevented()) return 318 319 $this 320 .trigger('focus') 321 .attr('aria-expanded', 'true') 322 323 $parent 324 .toggleClass('open') 325 .trigger('shown.bs.dropdown', relatedTarget) 326 } 327 328 return false 329 } 330 331 Dropdown.prototype.keydown = function (e) { 332 if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return 333 334 var $this = $(this) 335 336 e.preventDefault() 337 e.stopPropagation() 338 339 if ($this.is('.disabled, :disabled')) return 340 341 var $parent = getParent($this) 342 var isActive = $parent.hasClass('open') 343 344 if (!isActive && e.which != 27 || isActive && e.which == 27) { 345 if (e.which == 27) $parent.find(toggle).trigger('focus') 346 return $this.trigger('click') 347 } 348 349 var desc = ' li:not(.disabled):visible a' 350 var $items = $parent.find('.dropdown-menu' + desc) 351 352 if (!$items.length) return 353 354 var index = $items.index(e.target) 355 356 if (e.which == 38 && index > 0) index-- // up 357 if (e.which == 40 && index < $items.length - 1) index++ // down 358 if (!~index) index = 0 359 360 $items.eq(index).trigger('focus') 361 } 362 363 364 // DROPDOWN PLUGIN DEFINITION 365 // ========================== 366 367 function Plugin(option) { 368 return this.each(function () { 369 var $this = $(this) 370 var data = $this.data('bs.dropdown') 371 372 if (!data) $this.data('bs.dropdown', (data = new Dropdown(this))) 373 if (typeof option == 'string') data[option].call($this) 374 }) 375 } 376 377 var old = $.fn.dropdown 378 379 $.fn.dropdown = Plugin 380 $.fn.dropdown.Constructor = Dropdown 381 382 383 // DROPDOWN NO CONFLICT 384 // ==================== 385 386 $.fn.dropdown.noConflict = function () { 387 $.fn.dropdown = old 388 return this 389 } 390 391 392 // APPLY TO STANDARD DROPDOWN ELEMENTS 393 // =================================== 394 395 $(document) 396 .on('click.bs.dropdown.data-api', clearMenus) 397 .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() }) 398 .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle) 399 .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown) 400 .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown) 401 402}(jQuery); 403 404/* ======================================================================== 405 * Bootstrap: affix.js v3.3.5 406 * http://getbootstrap.com/javascript/#affix 407 * ======================================================================== 408 * Copyright 2011-2015 Twitter, Inc. 409 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 410 * ======================================================================== */ 411 412 413+function ($) { 414 'use strict'; 415 416 // AFFIX CLASS DEFINITION 417 // ====================== 418 419 var Affix = function (element, options) { 420 this.options = $.extend({}, Affix.DEFAULTS, options) 421 422 this.$target = $(this.options.target) 423 .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this)) 424 .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this)) 425 426 this.$element = $(element) 427 this.affixed = null 428 this.unpin = null 429 this.pinnedOffset = null 430 431 this.checkPosition() 432 } 433 434 Affix.VERSION = '3.3.5' 435 436 Affix.RESET = 'affix affix-top affix-bottom' 437 438 Affix.DEFAULTS = { 439 offset: 0, 440 target: window 441 } 442 443 Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) { 444 var scrollTop = this.$target.scrollTop() 445 var position = this.$element.offset() 446 var targetHeight = this.$target.height() 447 448 if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false 449 450 if (this.affixed == 'bottom') { 451 if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom' 452 return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom' 453 } 454 455 var initializing = this.affixed == null 456 var colliderTop = initializing ? scrollTop : position.top 457 var colliderHeight = initializing ? targetHeight : height 458 459 if (offsetTop != null && scrollTop <= offsetTop) return 'top' 460 if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom' 461 462 return false 463 } 464 465 Affix.prototype.getPinnedOffset = function () { 466 if (this.pinnedOffset) return this.pinnedOffset 467 this.$element.removeClass(Affix.RESET).addClass('affix') 468 var scrollTop = this.$target.scrollTop() 469 var position = this.$element.offset() 470 return (this.pinnedOffset = position.top - scrollTop) 471 } 472 473 Affix.prototype.checkPositionWithEventLoop = function () { 474 setTimeout($.proxy(this.checkPosition, this), 1) 475 } 476 477 Affix.prototype.checkPosition = function () { 478 if (!this.$element.is(':visible')) return 479 480 var height = this.$element.height() 481 var offset = this.options.offset 482 var offsetTop = offset.top 483 var offsetBottom = offset.bottom 484 var scrollHeight = Math.max($(document).height(), $(document.body).height()) 485 486 if (typeof offset != 'object') offsetBottom = offsetTop = offset 487 if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element) 488 if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element) 489 490 var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom) 491 492 if (this.affixed != affix) { 493 if (this.unpin != null) this.$element.css('top', '') 494 495 var affixType = 'affix' + (affix ? '-' + affix : '') 496 var e = $.Event(affixType + '.bs.affix') 497 498 this.$element.trigger(e) 499 500 if (e.isDefaultPrevented()) return 501 502 this.affixed = affix 503 this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null 504 505 this.$element 506 .removeClass(Affix.RESET) 507 .addClass(affixType) 508 .trigger(affixType.replace('affix', 'affixed') + '.bs.affix') 509 } 510 511 if (affix == 'bottom') { 512 this.$element.offset({ 513 top: scrollHeight - height - offsetBottom 514 }) 515 } 516 } 517 518 519 // AFFIX PLUGIN DEFINITION 520 // ======================= 521 522 function Plugin(option) { 523 return this.each(function () { 524 var $this = $(this) 525 var data = $this.data('bs.affix') 526 var options = typeof option == 'object' && option 527 528 if (!data) $this.data('bs.affix', (data = new Affix(this, options))) 529 if (typeof option == 'string') data[option]() 530 }) 531 } 532 533 var old = $.fn.affix 534 535 $.fn.affix = Plugin 536 $.fn.affix.Constructor = Affix 537 538 539 // AFFIX NO CONFLICT 540 // ================= 541 542 $.fn.affix.noConflict = function () { 543 $.fn.affix = old 544 return this 545 } 546 547 548 // AFFIX DATA-API 549 // ============== 550 551 $(window).on('load', function () { 552 $('[data-spy="affix"]').each(function () { 553 var $spy = $(this) 554 var data = $spy.data() 555 556 data.offset = data.offset || {} 557 558 if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom 559 if (data.offsetTop != null) data.offset.top = data.offsetTop 560 561 Plugin.call($spy, data) 562 }) 563 }) 564 565}(jQuery); 566 567/* ======================================================================== 568 * Bootstrap: collapse.js v3.3.5 569 * http://getbootstrap.com/javascript/#collapse 570 * ======================================================================== 571 * Copyright 2011-2015 Twitter, Inc. 572 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 573 * ======================================================================== */ 574 575 576+function ($) { 577 'use strict'; 578 579 // COLLAPSE PUBLIC CLASS DEFINITION 580 // ================================ 581 582 var Collapse = function (element, options) { 583 this.$element = $(element) 584 this.options = $.extend({}, Collapse.DEFAULTS, options) 585 this.$trigger = $('[data-toggle="collapse"][href="#' + element.id + '"],' + 586 '[data-toggle="collapse"][data-target="#' + element.id + '"]') 587 this.transitioning = null 588 589 if (this.options.parent) { 590 this.$parent = this.getParent() 591 } else { 592 this.addAriaAndCollapsedClass(this.$element, this.$trigger) 593 } 594 595 if (this.options.toggle) this.toggle() 596 } 597 598 Collapse.VERSION = '3.3.5' 599 600 Collapse.TRANSITION_DURATION = 350 601 602 Collapse.DEFAULTS = { 603 toggle: true 604 } 605 606 Collapse.prototype.dimension = function () { 607 var hasWidth = this.$element.hasClass('width') 608 return hasWidth ? 'width' : 'height' 609 } 610 611 Collapse.prototype.show = function () { 612 if (this.transitioning || this.$element.hasClass('in')) return 613 614 var activesData 615 var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing') 616 617 if (actives && actives.length) { 618 activesData = actives.data('bs.collapse') 619 if (activesData && activesData.transitioning) return 620 } 621 622 var startEvent = $.Event('show.bs.collapse') 623 this.$element.trigger(startEvent) 624 if (startEvent.isDefaultPrevented()) return 625 626 if (actives && actives.length) { 627 Plugin.call(actives, 'hide') 628 activesData || actives.data('bs.collapse', null) 629 } 630 631 var dimension = this.dimension() 632 633 this.$element 634 .removeClass('collapse') 635 .addClass('collapsing')[dimension](0) 636 .attr('aria-expanded', true) 637 638 this.$trigger 639 .removeClass('collapsed') 640 .attr('aria-expanded', true) 641 642 this.transitioning = 1 643 644 var complete = function () { 645 this.$element 646 .removeClass('collapsing') 647 .addClass('collapse in')[dimension]('') 648 this.transitioning = 0 649 this.$element 650 .trigger('shown.bs.collapse') 651 } 652 653 if (!$.support.transition) return complete.call(this) 654 655 var scrollSize = $.camelCase(['scroll', dimension].join('-')) 656 657 this.$element 658 .one('bsTransitionEnd', $.proxy(complete, this)) 659 .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize]) 660 } 661 662 Collapse.prototype.hide = function () { 663 if (this.transitioning || !this.$element.hasClass('in')) return 664 665 var startEvent = $.Event('hide.bs.collapse') 666 this.$element.trigger(startEvent) 667 if (startEvent.isDefaultPrevented()) return 668 669 var dimension = this.dimension() 670 671 this.$element[dimension](this.$element[dimension]())[0].offsetHeight 672 673 this.$element 674 .addClass('collapsing') 675 .removeClass('collapse in') 676 .attr('aria-expanded', false) 677 678 this.$trigger 679 .addClass('collapsed') 680 .attr('aria-expanded', false) 681 682 this.transitioning = 1 683 684 var complete = function () { 685 this.transitioning = 0 686 this.$element 687 .removeClass('collapsing') 688 .addClass('collapse') 689 .trigger('hidden.bs.collapse') 690 } 691 692 if (!$.support.transition) return complete.call(this) 693 694 this.$element 695 [dimension](0) 696 .one('bsTransitionEnd', $.proxy(complete, this)) 697 .emulateTransitionEnd(Collapse.TRANSITION_DURATION) 698 } 699 700 Collapse.prototype.toggle = function () { 701 this[this.$element.hasClass('in') ? 'hide' : 'show']() 702 } 703 704 Collapse.prototype.getParent = function () { 705 return $(this.options.parent) 706 .find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]') 707 .each($.proxy(function (i, element) { 708 var $element = $(element) 709 this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element) 710 }, this)) 711 .end() 712 } 713 714 Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) { 715 var isOpen = $element.hasClass('in') 716 717 $element.attr('aria-expanded', isOpen) 718 $trigger 719 .toggleClass('collapsed', !isOpen) 720 .attr('aria-expanded', isOpen) 721 } 722 723 function getTargetFromTrigger($trigger) { 724 var href 725 var target = $trigger.attr('data-target') 726 || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7 727 728 return $(target) 729 } 730 731 732 // COLLAPSE PLUGIN DEFINITION 733 // ========================== 734 735 function Plugin(option) { 736 return this.each(function () { 737 var $this = $(this) 738 var data = $this.data('bs.collapse') 739 var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option) 740 741 if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false 742 if (!data) $this.data('bs.collapse', (data = new Collapse(this, options))) 743 if (typeof option == 'string') data[option]() 744 }) 745 } 746 747 var old = $.fn.collapse 748 749 $.fn.collapse = Plugin 750 $.fn.collapse.Constructor = Collapse 751 752 753 // COLLAPSE NO CONFLICT 754 // ==================== 755 756 $.fn.collapse.noConflict = function () { 757 $.fn.collapse = old 758 return this 759 } 760 761 762 // COLLAPSE DATA-API 763 // ================= 764 765 $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) { 766 var $this = $(this) 767 768 if (!$this.attr('data-target')) e.preventDefault() 769 770 var $target = getTargetFromTrigger($this) 771 var data = $target.data('bs.collapse') 772 var option = data ? 'toggle' : $this.data() 773 774 Plugin.call($target, option) 775 }) 776 777}(jQuery); 778 779/* ======================================================================== 780 * Bootstrap: scrollspy.js v3.3.5 781 * http://getbootstrap.com/javascript/#scrollspy 782 * ======================================================================== 783 * Copyright 2011-2015 Twitter, Inc. 784 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 785 * ======================================================================== */ 786 787 788+function ($) { 789 'use strict'; 790 791 // SCROLLSPY CLASS DEFINITION 792 // ========================== 793 794 function ScrollSpy(element, options) { 795 this.$body = $(document.body) 796 this.$scrollElement = $(element).is(document.body) ? $(window) : $(element) 797 this.options = $.extend({}, ScrollSpy.DEFAULTS, options) 798 this.selector = (this.options.target || '') + ' .nav li > a' 799 this.offsets = [] 800 this.targets = [] 801 this.activeTarget = null 802 this.scrollHeight = 0 803 804 this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this)) 805 this.refresh() 806 this.process() 807 } 808 809 ScrollSpy.VERSION = '3.3.5' 810 811 ScrollSpy.DEFAULTS = { 812 offset: 10 813 } 814 815 ScrollSpy.prototype.getScrollHeight = function () { 816 return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight) 817 } 818 819 ScrollSpy.prototype.refresh = function () { 820 var that = this 821 var offsetMethod = 'offset' 822 var offsetBase = 0 823 824 this.offsets = [] 825 this.targets = [] 826 this.scrollHeight = this.getScrollHeight() 827 828 if (!$.isWindow(this.$scrollElement[0])) { 829 offsetMethod = 'position' 830 offsetBase = this.$scrollElement.scrollTop() 831 } 832 833 this.$body 834 .find(this.selector) 835 .map(function () { 836 var $el = $(this) 837 var href = $el.data('target') || $el.attr('href') 838 var $href = /^#./.test(href) && $(href) 839 840 return ($href 841 && $href.length 842 && $href.is(':visible') 843 && [[$href[offsetMethod]().top + offsetBase, href]]) || null 844 }) 845 .sort(function (a, b) { return a[0] - b[0] }) 846 .each(function () { 847 that.offsets.push(this[0]) 848 that.targets.push(this[1]) 849 }) 850 } 851 852 ScrollSpy.prototype.process = function () { 853 var scrollTop = this.$scrollElement.scrollTop() + this.options.offset 854 var scrollHeight = this.getScrollHeight() 855 var maxScroll = this.options.offset + scrollHeight - this.$scrollElement.height() 856 var offsets = this.offsets 857 var targets = this.targets 858 var activeTarget = this.activeTarget 859 var i 860 861 if (this.scrollHeight != scrollHeight) { 862 this.refresh() 863 } 864 865 if (scrollTop >= maxScroll) { 866 return activeTarget != (i = targets[targets.length - 1]) && this.activate(i) 867 } 868 869 if (activeTarget && scrollTop < offsets[0]) { 870 this.activeTarget = null 871 return this.clear() 872 } 873 874 for (i = offsets.length; i--;) { 875 activeTarget != targets[i] 876 && scrollTop >= offsets[i] 877 && (offsets[i + 1] === undefined || scrollTop < offsets[i + 1]) 878 && this.activate(targets[i]) 879 } 880 } 881 882 ScrollSpy.prototype.activate = function (target) { 883 this.activeTarget = target 884 885 this.clear() 886 887 var selector = this.selector + 888 '[data-target="' + target + '"],' + 889 this.selector + '[href="' + target + '"]' 890 891 var active = $(selector) 892 .parents('li') 893 .addClass('active') 894 895 if (active.parent('.dropdown-menu').length) { 896 active = active 897 .closest('li.dropdown') 898 .addClass('active') 899 } 900 901 active.trigger('activate.bs.scrollspy') 902 } 903 904 ScrollSpy.prototype.clear = function () { 905 $(this.selector) 906 .parentsUntil(this.options.target, '.active') 907 .removeClass('active') 908 } 909 910 911 // SCROLLSPY PLUGIN DEFINITION 912 // =========================== 913 914 function Plugin(option) { 915 return this.each(function () { 916 var $this = $(this) 917 var data = $this.data('bs.scrollspy') 918 var options = typeof option == 'object' && option 919 920 if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options))) 921 if (typeof option == 'string') data[option]() 922 }) 923 } 924 925 var old = $.fn.scrollspy 926 927 $.fn.scrollspy = Plugin 928 $.fn.scrollspy.Constructor = ScrollSpy 929 930 931 // SCROLLSPY NO CONFLICT 932 // ===================== 933 934 $.fn.scrollspy.noConflict = function () { 935 $.fn.scrollspy = old 936 return this 937 } 938 939 940 // SCROLLSPY DATA-API 941 // ================== 942 943 $(window).on('load.bs.scrollspy.data-api', function () { 944 $('[data-spy="scroll"]').each(function () { 945 var $spy = $(this) 946 Plugin.call($spy, $spy.data()) 947 }) 948 }) 949 950}(jQuery); 951 952/* ======================================================================== 953 * Bootstrap: transition.js v3.3.5 954 * http://getbootstrap.com/javascript/#transitions 955 * ======================================================================== 956 * Copyright 2011-2015 Twitter, Inc. 957 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 958 * ======================================================================== */ 959 960 961+function ($) { 962 'use strict'; 963 964 // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) 965 // ============================================================ 966 967 function transitionEnd() { 968 var el = document.createElement('bootstrap') 969 970 var transEndEventNames = { 971 WebkitTransition : 'webkitTransitionEnd', 972 MozTransition : 'transitionend', 973 OTransition : 'oTransitionEnd otransitionend', 974 transition : 'transitionend' 975 } 976 977 for (var name in transEndEventNames) { 978 if (el.style[name] !== undefined) { 979 return { end: transEndEventNames[name] } 980 } 981 } 982 983 return false // explicit for ie8 ( ._.) 984 } 985 986 // http://blog.alexmaccaw.com/css-transitions 987 $.fn.emulateTransitionEnd = function (duration) { 988 var called = false 989 var $el = this 990 $(this).one('bsTransitionEnd', function () { called = true }) 991 var callback = function () { if (!called) $($el).trigger($.support.transition.end) } 992 setTimeout(callback, duration) 993 return this 994 } 995 996 $(function () { 997 $.support.transition = transitionEnd() 998 999 if (!$.support.transition) return 1000 1001 $.event.special.bsTransitionEnd = { 1002 bindType: $.support.transition.end, 1003 delegateType: $.support.transition.end, 1004 handle: function (e) { 1005 if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments) 1006 } 1007 } 1008 }) 1009 1010}(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.