2377 lines · 74.1 KB · JavaScript
RawDownload
/*! * Bootstrap v3.3.7 (http://getbootstrap.com) * Copyright 2011-2016 Twitter, Inc. * Licensed under the MIT license */ if (typeof jQuery === 'undefined') {    throw new Error('Bootstrap\'s JavaScript requires jQuery')} +function ($) {    'use strict';    var version = $.fn.jquery.split(' ')[0].split('.')    if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 3)) {        throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4')    }}(jQuery); /* ======================================================================== * Bootstrap: transition.js v3.3.7 * http://getbootstrap.com/javascript/#transitions * ======================================================================== * Copyright 2011-2016 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * ======================================================================== */  +function ($) {    'use strict';     // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)    // ============================================================     function transitionEnd() {        var el = document.createElement('bootstrap')         var transEndEventNames = {            WebkitTransition: 'webkitTransitionEnd',            MozTransition: 'transitionend',            OTransition: 'oTransitionEnd otransitionend',            transition: 'transitionend'        }         for (var name in transEndEventNames) {            if (el.style[name] !== undefined) {                return { end: transEndEventNames[name] }            }        }         return false // explicit for ie8 (  ._.)    }     // http://blog.alexmaccaw.com/css-transitions    $.fn.emulateTransitionEnd = function (duration) {        var called = false        var $el = this        $(this).one('bsTransitionEnd', function () { called = true })        var callback = function () { if (!called) $($el).trigger($.support.transition.end) }        setTimeout(callback, duration)        return this    }     $(function () {        $.support.transition = transitionEnd()         if (!$.support.transition) return         $.event.special.bsTransitionEnd = {            bindType: $.support.transition.end,            delegateType: $.support.transition.end,            handle: function (e) {                if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)            }        }    }) }(jQuery); /* ======================================================================== * Bootstrap: alert.js v3.3.7 * http://getbootstrap.com/javascript/#alerts * ======================================================================== * Copyright 2011-2016 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * ======================================================================== */  +function ($) {    'use strict';     // ALERT CLASS DEFINITION    // ======================     var dismiss = '[data-dismiss="alert"]'    var Alert = function (el) {        $(el).on('click', dismiss, this.close)    }     Alert.VERSION = '3.3.7'     Alert.TRANSITION_DURATION = 150     Alert.prototype.close = function (e) {        var $this = $(this)        var selector = $this.attr('data-target')         if (!selector) {            selector = $this.attr('href')            selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7        }         var $parent = $(selector === '#' ? [] : selector)         if (e) e.preventDefault()         if (!$parent.length) {            $parent = $this.closest('.alert')        }         $parent.trigger(e = $.Event('close.bs.alert'))         if (e.isDefaultPrevented()) return         $parent.removeClass('in')         function removeElement() {            // detach from parent, fire event then clean up data            $parent.detach().trigger('closed.bs.alert').remove()        }         $.support.transition && $parent.hasClass('fade') ?          $parent            .one('bsTransitionEnd', removeElement)            .emulateTransitionEnd(Alert.TRANSITION_DURATION) :          removeElement()    }      // ALERT PLUGIN DEFINITION    // =======================     function Plugin(option) {        return this.each(function () {            var $this = $(this)            var data = $this.data('bs.alert')             if (!data) $this.data('bs.alert', (data = new Alert(this)))            if (typeof option == 'string') data[option].call($this)        })    }     var old = $.fn.alert     $.fn.alert = Plugin    $.fn.alert.Constructor = Alert      // ALERT NO CONFLICT    // =================     $.fn.alert.noConflict = function () {        $.fn.alert = old        return this    }      // ALERT DATA-API    // ==============     $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close) }(jQuery); /* ======================================================================== * Bootstrap: button.js v3.3.7 * http://getbootstrap.com/javascript/#buttons * ======================================================================== * Copyright 2011-2016 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * ======================================================================== */  +function ($) {    'use strict';     // BUTTON PUBLIC CLASS DEFINITION    // ==============================     var Button = function (element, options) {        this.$element = $(element)        this.options = $.extend({}, Button.DEFAULTS, options)        this.isLoading = false    }     Button.VERSION = '3.3.7'     Button.DEFAULTS = {        loadingText: 'loading...'    }     Button.prototype.setState = function (state) {        var d = 'disabled'        var $el = this.$element        var val = $el.is('input') ? 'val' : 'html'        var data = $el.data()         state += 'Text'         if (data.resetText == null) $el.data('resetText', $el[val]())         // push to event loop to allow forms to submit        setTimeout($.proxy(function () {            $el[val](data[state] == null ? this.options[state] : data[state])             if (state == 'loadingText') {                this.isLoading = true                $el.addClass(d).attr(d, d).prop(d, true)            } else if (this.isLoading) {                this.isLoading = false                $el.removeClass(d).removeAttr(d).prop(d, false)            }        }, this), 0)    }     Button.prototype.toggle = function () {        var changed = true        var $parent = this.$element.closest('[data-toggle="buttons"]')         if ($parent.length) {            var $input = this.$element.find('input')            if ($input.prop('type') == 'radio') {                if ($input.prop('checked')) changed = false                $parent.find('.active').removeClass('active')                this.$element.addClass('active')            } else if ($input.prop('type') == 'checkbox') {                if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false                this.$element.toggleClass('active')            }            $input.prop('checked', this.$element.hasClass('active'))            if (changed) $input.trigger('change')        } else {            this.$element.attr('aria-pressed', !this.$element.hasClass('active'))            this.$element.toggleClass('active')        }    }      // BUTTON PLUGIN DEFINITION    // ========================     function Plugin(option) {        return this.each(function () {            var $this = $(this)            var data = $this.data('bs.button')            var options = typeof option == 'object' && option             if (!data) $this.data('bs.button', (data = new Button(this, options)))             if (option == 'toggle') data.toggle()            else if (option) data.setState(option)        })    }     var old = $.fn.button     $.fn.button = Plugin    $.fn.button.Constructor = Button      // BUTTON NO CONFLICT    // ==================     $.fn.button.noConflict = function () {        $.fn.button = old        return this    }      // BUTTON DATA-API    // ===============     $(document)      .on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) {          var $btn = $(e.target).closest('.btn')          Plugin.call($btn, 'toggle')          if (!($(e.target).is('input[type="radio"], input[type="checkbox"]'))) {              // Prevent double click on radios, and the double selections (so cancellation) on checkboxes              e.preventDefault()              // The target component still receive the focus              if ($btn.is('input,button')) $btn.trigger('focus')              else $btn.find('input:visible,button:visible').first().trigger('focus')          }      })      .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {          $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))      }) }(jQuery); /* ======================================================================== * Bootstrap: carousel.js v3.3.7 * http://getbootstrap.com/javascript/#carousel * ======================================================================== * Copyright 2011-2016 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * ======================================================================== */  +function ($) {    'use strict';     // CAROUSEL CLASS DEFINITION    // =========================     var Carousel = function (element, options) {        this.$element = $(element)        this.$indicators = this.$element.find('.carousel-indicators')        this.options = options        this.paused = null        this.sliding = null        this.interval = null        this.$active = null        this.$items = null         this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))         this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element          .on('mouseenter.bs.carousel', $.proxy(this.pause, this))          .on('mouseleave.bs.carousel', $.proxy(this.cycle, this))    }     Carousel.VERSION = '3.3.7'     Carousel.TRANSITION_DURATION = 600     Carousel.DEFAULTS = {        interval: 5000,        pause: 'hover',        wrap: true,        keyboard: true    }     Carousel.prototype.keydown = function (e) {        if (/input|textarea/i.test(e.target.tagName)) return        switch (e.which) {            case 37: this.prev(); break            case 39: this.next(); break            default: return        }         e.preventDefault()    }     Carousel.prototype.cycle = function (e) {        e || (this.paused = false)         this.interval && clearInterval(this.interval)         this.options.interval          && !this.paused          && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))         return this    }     Carousel.prototype.getItemIndex = function (item) {        this.$items = item.parent().children('.item')        return this.$items.index(item || this.$active)    }     Carousel.prototype.getItemForDirection = function (direction, active) {        var activeIndex = this.getItemIndex(active)        var willWrap = (direction == 'prev' && activeIndex === 0)                    || (direction == 'next' && activeIndex == (this.$items.length - 1))        if (willWrap && !this.options.wrap) return active        var delta = direction == 'prev' ? -1 : 1        var itemIndex = (activeIndex + delta) % this.$items.length        return this.$items.eq(itemIndex)    }     Carousel.prototype.to = function (pos) {        var that = this        var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active'))         if (pos > (this.$items.length - 1) || pos < 0) return         if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid"        if (activeIndex == pos) return this.pause().cycle()         return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos))    }     Carousel.prototype.pause = function (e) {        e || (this.paused = true)         if (this.$element.find('.next, .prev').length && $.support.transition) {            this.$element.trigger($.support.transition.end)            this.cycle(true)        }         this.interval = clearInterval(this.interval)         return this    }     Carousel.prototype.next = function () {        if (this.sliding) return        return this.slide('next')    }     Carousel.prototype.prev = function () {        if (this.sliding) return        return this.slide('prev')    }     Carousel.prototype.slide = function (type, next) {        var $active = this.$element.find('.item.active')        var $next = next || this.getItemForDirection(type, $active)        var isCycling = this.interval        var direction = type == 'next' ? 'left' : 'right'        var that = this         if ($next.hasClass('active')) return (this.sliding = false)         var relatedTarget = $next[0]        var slideEvent = $.Event('slide.bs.carousel', {            relatedTarget: relatedTarget,            direction: direction        })        this.$element.trigger(slideEvent)        if (slideEvent.isDefaultPrevented()) return         this.sliding = true         isCycling && this.pause()         if (this.$indicators.length) {            this.$indicators.find('.active').removeClass('active')            var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)])            $nextIndicator && $nextIndicator.addClass('active')        }         var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid"        if ($.support.transition && this.$element.hasClass('slide')) {            $next.addClass(type)            $next[0].offsetWidth // force reflow            $active.addClass(direction)            $next.addClass(direction)            $active              .one('bsTransitionEnd', function () {                  $next.removeClass([type, direction].join(' ')).addClass('active')                  $active.removeClass(['active', direction].join(' '))                  that.sliding = false                  setTimeout(function () {                      that.$element.trigger(slidEvent)                  }, 0)              })              .emulateTransitionEnd(Carousel.TRANSITION_DURATION)        } else {            $active.removeClass('active')            $next.addClass('active')            this.sliding = false            this.$element.trigger(slidEvent)        }         isCycling && this.cycle()         return this    }      // CAROUSEL PLUGIN DEFINITION    // ==========================     function Plugin(option) {        return this.each(function () {            var $this = $(this)            var data = $this.data('bs.carousel')            var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)            var action = typeof option == 'string' ? option : options.slide             if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))            if (typeof option == 'number') data.to(option)            else if (action) data[action]()            else if (options.interval) data.pause().cycle()        })    }     var old = $.fn.carousel     $.fn.carousel = Plugin    $.fn.carousel.Constructor = Carousel      // CAROUSEL NO CONFLICT    // ====================     $.fn.carousel.noConflict = function () {        $.fn.carousel = old        return this

Lines 1–500 of 2377.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t