PageSourceSearch

https://hexlabmakerspace.com/wp-content/themes/h-code/assets/js/bootstrap.js?ver=1.9.2

js hexlabmakerspace.com collected 2026-10-05 07:11:17 UTC 68,529 bytes, 2,128 lines download raw bytes

vendor: 64,181 bytes, lines 1-1989
1/*!
2 * Bootstrap v3.2.0 (http://getbootstrap.com)
3 * Copyright 2011-2014 Twitter, Inc.
4 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5 */
6
7if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript requires jQuery') }
8
9/* ========================================================================
10 * Bootstrap: transition.js v3.2.0
11 * http://getbootstrap.com/javascript/#transitions
12 * ========================================================================
13 * Copyright 2011-2014 Twitter, Inc.
14 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
15 * ======================================================================== */
16
17
18+function ($) {
19    'use strict';
20
21    // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
22    // ============================================================
23
24    function transitionEnd() {
25        var el = document.createElement('bootstrap')
26
27        var transEndEventNames = {
28            WebkitTransition: 'webkitTransitionEnd',
29            MozTransition: 'transitionend',
30            OTransition: 'oTransitionEnd otransitionend',
31            transition: 'transitionend'
32        }
33
34        for (var name in transEndEventNames) {
35            if (el.style[name] !== undefined) {
36                return { end: transEndEventNames[name] }
37            }
38        }
39
40        return false // explicit for ie8 (  ._.)
41    }
42
43    // http://blog.alexmaccaw.com/css-transitions
44    $.fn.emulateTransitionEnd = function (duration) {
45        var called = false
46        var $el = this
47        $(this).one('bsTransitionEnd', function () { called = true })
48        var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
49        setTimeout(callback, duration)
50        return this
51    }
52
53    $(function () {
54        $.support.transition = transitionEnd()
55
56        if (!$.support.transition) return
57
58        $.event.special.bsTransitionEnd = {
59            bindType: $.support.transition.end,
60            delegateType: $.support.transition.end,
61            handle: function (e) {
62                if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
63            }
64        }
65    })
66
67}(jQuery);
68
69/* ========================================================================
70 * Bootstrap: alert.js v3.2.0
71 * http://getbootstrap.com/javascript/#alerts
72 * ========================================================================
73 * Copyright 2011-2014 Twitter, Inc.
74 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
75 * ======================================================================== */
76
77
78+function ($) {
79    'use strict';
80
81    // ALERT CLASS DEFINITION
82    // ======================
83
84    var dismiss = '[data-dismiss="alert"]'
85    var Alert = function (el) {
86        $(el).on('click', dismiss, this.close)
87    }
88
89    Alert.VERSION = '3.2.0'
90
91    Alert.prototype.close = function (e) {
92        var $this = $(this)
93        var selector = $this.attr('data-target')
94
95        if (!selector) {
96            selector = $this.attr('href')
97            selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
98        }
99
100        var $parent = $(selector)
101
102        if (e) e.preventDefault()
103
104        if (!$parent.length) {
105            $parent = $this.hasClass('alert') ? $this : $this.parent()
106        }
107
108        $parent.trigger(e = $.Event('close.bs.alert'))
109
110        if (e.isDefaultPrevented()) return
111
112        $parent.removeClass('in')
113
114        function removeElement() {
115            // detach from parent, fire event then clean up data
116            $parent.detach().trigger('closed.bs.alert').remove()
117        }
118
119        $.support.transition && $parent.hasClass('fade') ?
120          $parent
121            .one('bsTransitionEnd', removeElement)
122            .emulateTransitionEnd(150) :
123          removeElement()
124    }
125
126
127    // ALERT PLUGIN DEFINITION
128    // =======================
129
130    function Plugin(option) {
131        return this.each(function () {
132            var $this = $(this)
133            var data = $this.data('bs.alert')
134
135            if (!data) $this.data('bs.alert', (data = new Alert(this)))
136            if (typeof option == 'string') data[option].call($this)
137        })
138    }
139
140    var old = $.fn.alert
141
142    $.fn.alert = Plugin
143    $.fn.alert.Constructor = Alert
144
145
146    // ALERT NO CONFLICT
147    // =================
148
149    $.fn.alert.noConflict = function () {
150        $.fn.alert = old
151        return this
152    }
153
154
155    // ALERT DATA-API
156    // ==============
157
158    $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
159
160}(jQuery);
161
162/* ========================================================================
163 * Bootstrap: button.js v3.2.0
164 * http://getbootstrap.com/javascript/#buttons
165 * ========================================================================
166 * Copyright 2011-2014 Twitter, Inc.
167 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
168 * ======================================================================== */
169
170
171+function ($) {
172    'use strict';
173
174    // BUTTON PUBLIC CLASS DEFINITION
175    // ==============================
176
177    var Button = function (element, options) {
178        this.$element = $(element)
179        this.options = $.extend({}, Button.DEFAULTS, options)
180        this.isLoading = false
181    }
182
183    Button.VERSION = '3.2.0'
184
185    Button.DEFAULTS = {
186        loadingText: 'loading...'
187    }
188
189    Button.prototype.setState = function (state) {
190        var d = 'disabled'
191        var $el = this.$element
192        var val = $el.is('input') ? 'val' : 'html'
193        var data = $el.data()
194
195        state = state + 'Text'
196
197        if (data.resetText == null) $el.data('resetText', $el[val]())
198
199        $el[val](data[state] == null ? this.options[state] : data[state])
200
201        // push to event loop to allow forms to submit
202        setTimeout($.proxy(function () {
203            if (state == 'loadingText') {
204                this.isLoading = true
205                $el.addClass(d).attr(d, d)
206            } else if (this.isLoading) {
207                this.isLoading = false
208                $el.removeClass(d).removeAttr(d)
209            }
210        }, this), 0)
211    }
212
213    Button.prototype.toggle = function () {
214        var changed = true
215        var $parent = this.$element.closest('[data-toggle="buttons"]')
216
217        if ($parent.length) {
218            var $input = this.$element.find('input')
219            if ($input.prop('type') == 'radio') {
220                if ($input.prop('checked') && this.$element.hasClass('active')) changed = false
221                else $parent.find('.active').removeClass('active')
222            }
223            if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change')
224        }
225
226        if (changed) this.$element.toggleClass('active')
227    }
228
229
230    // BUTTON PLUGIN DEFINITION
231    // ========================
232
233    function Plugin(option) {
234        return this.each(function () {
235            var $this = $(this)
236            var data = $this.data('bs.button')
237            var options = typeof option == 'object' && option
238
239            if (!data) $this.data('bs.button', (data = new Button(this, options)))
240
241            if (option == 'toggle') data.toggle()
242            else if (option) data.setState(option)
243        })
244    }
245
246    var old = $.fn.button
247
248    $.fn.button = Plugin
249    $.fn.button.Constructor = Button
250
251
252    // BUTTON NO CONFLICT
253    // ==================
254
255    $.fn.button.noConflict = function () {
256        $.fn.button = old
257        return this
258    }
259
260
261    // BUTTON DATA-API
262    // ===============
263
264    $(document).on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) {
265        var $btn = $(e.target)
266        if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
267        Plugin.call($btn, 'toggle')
268        e.preventDefault()
269    })
270
271}(jQuery);
272
273/* ========================================================================
274 * Bootstrap: carousel.js v3.2.0
275 * http://getbootstrap.com/javascript/#carousel
276 * ========================================================================
277 * Copyright 2011-2014 Twitter, Inc.
278 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
279 * ======================================================================== */
280
281
282+function ($) {
283    'use strict';
284
285    // CAROUSEL CLASS DEFINITION
286    // =========================
287
288    var Carousel = function (element, options) {
289        this.$element = $(element).on('keydown.bs.carousel', $.proxy(this.keydown, this))
290        this.$indicators = this.$element.find('.carousel-indicators')
291        this.options = options
292        this.paused =
293        this.sliding =
294        this.interval =
295        this.$active =
296        this.$items = null
297
298        this.options.pause == 'hover' && this.$element
299          .on('mouseenter.bs.carousel', $.proxy(this.pause, this))
300          .on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
301    }
302
303    Carousel.VERSION = '3.2.0'
304
305    Carousel.DEFAULTS = {
306        interval: 15000,
307        pause: 'hover',
308        wrap: true
309    }
310
311    Carousel.prototype.keydown = function (e) {
312        switch (e.which) {
313            case 37: this.prev(); break
314            case 39: this.next(); break
315            default: return
316        }
317
318        e.preventDefault()
319    }
320
321    Carousel.prototype.cycle = function (e) {
322        e || (this.paused = false)
323
324        this.interval && clearInterval(this.interval)
325
326        this.options.interval
327          && !this.paused
328          && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
329
330        return this
331    }
332
333    Carousel.prototype.getItemIndex = function (item) {
334        this.$items = item.parent().children('.item')
335        return this.$items.index(item || this.$active)
336    }
337
338    Carousel.prototype.to = function (pos) {
339        var that = this
340        var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active'))
341
342        if (pos > (this.$items.length - 1) || pos < 0) return
343
344        if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid"
345        if (activeIndex == pos) return this.pause().cycle()
346
347        return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]))
348    }
349
350    Carousel.prototype.pause = function (e) {
351        e || (this.paused = true)
352
353        if (this.$element.find('.next, .prev').length && $.support.transition) {
354            this.$element.trigger($.support.transition.end)
355            this.cycle(true)
356        }
357
358        this.interval = clearInterval(this.interval)
359
360        return this
361    }
362
363    Carousel.prototype.next = function () {
364        if (this.sliding) return
365        return this.slide('next')
366    }
367
368    Carousel.prototype.prev = function () {
369        if (this.sliding) return
370        return this.slide('prev')
371    }
372
373    Carousel.prototype.slide = function (type, next) {
374        var $active = this.$element.find('.item.active')
375        var $next = next || $active[type]()
376        var isCycling = this.interval
377        var direction = type == 'next' ? 'left' : 'right'
378        var fallback = type == 'next' ? 'first' : 'last'
379        var that = this
380
381        if (!$next.length) {
382            if (!this.options.wrap) return
383            $next = this.$element.find('.item')[fallback]()
384        }
385
386        if ($next.hasClass('active')) return (this.sliding = false)
387
388        var relatedTarget = $next[0]
389        var slideEvent = $.Event('slide.bs.carousel', {
390            relatedTarget: relatedTarget,
391            direction: direction
392        })
393        this.$element.trigger(slideEvent)
394        if (slideEvent.isDefaultPrevented()) return
395
396        this.sliding = true
397
398        isCycling && this.pause()
399
400        if (this.$indicators.length) {
401            this.$indicators.find('.active').removeClass('active')
402            var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)])
403            $nextIndicator && $nextIndicator.addClass('active')
404        }
405
406        var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid"
407        if ($.support.transition && this.$element.hasClass('slide')) {
408            $next.addClass(type)
409            $next[0].offsetWidth // force reflow
410            $active.addClass(direction)
411            $next.addClass(direction)
412            $active
413              .one('bsTransitionEnd', function () {
414                  $next.removeClass([type, direction].join(' ')).addClass('active')
415                  $active.removeClass(['active', direction].join(' '))
416                  that.sliding = false
417                  setTimeout(function () {
418                      that.$element.trigger(slidEvent)
419                  }, 0)
420              })
421              .emulateTransitionEnd($active.css('transition-duration').slice(0, -1) * 1000)
422        } else {
423            $active.removeClass('active')
424            $next.addClass('active')
425            this.sliding = false
426            this.$element.trigger(slidEvent)
427        }
428
429        isCycling && this.cycle()
430
431        return this
432    }
433
434
435    // CAROUSEL PLUGIN DEFINITION
436    // ==========================
437
438    function Plugin(option) {
439        return this.each(function () {
440            var $this = $(this)
441            var data = $this.data('bs.carousel')
442            var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)
443            var action = typeof option == 'string' ? option : options.slide
444
445            if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))
446            if (typeof option == 'number') data.to(option)
447            else if (action) data[action]()
448            else if (options.interval) data.pause().cycle()
449        })
450    }
451
452    var old = $.fn.carousel
453
454    $.fn.carousel = Plugin
455    $.fn.carousel.Constructor = Carousel
456
457
458    // CAROUSEL NO CONFLICT
459    // ====================
460
461    $.fn.carousel.noConflict = function () {
462        $.fn.carousel = old
463        return this
464    }
465
466
467    // CAROUSEL DATA-API
468    // =================
469
470    $(document).on('click.bs.carousel.data-api', '[data-slide], [data-slide-to]', function (e) {
471        var href
472        var $this = $(this)
473        var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
474        if (!$target.hasClass('carousel')) return
475        var options = $.extend({}, $target.data(), $this.data())
476        var slideIndex = $this.attr('data-slide-to')
477        if (slideIndex) options.interval = false
478
479        Plugin.call($target, options)
480
481        if (slideIndex) {
482            $target.data('bs.carousel').to(slideIndex)
483        }
484
485        e.preventDefault()
486    })
487
488    $(window).on('load', function () {
489        $('[data-ride="carousel"]').each(function () {
490            var $carousel = $(this)
491            Plugin.call($carousel, $carousel.data())
492        })
493    })
494
495}(jQuery);
496
497/* ========================================================================
498 * Bootstrap: collapse.js v3.2.0
499 * http://getbootstrap.com/javascript/#collapse
500 * ========================================================================
501 * Copyright 2011-2014 Twitter, Inc.
502 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
503 * ======================================================================== */
504
505
506+function ($) {
507    'use strict';
508
509    // COLLAPSE PUBLIC CLASS DEFINITION
510    // ================================
511
512    var Collapse = function (element, options) {
513        this.$element = $(element)
514        this.options = $.extend({}, Collapse.DEFAULTS, options)
515        this.transitioning = null
516
517        if (this.options.parent) this.$parent = $(this.options.parent)
518        if (this.options.toggle) this.toggle()
519    }
520
521    Collapse.VERSION = '3.2.0'
522
523    Collapse.DEFAULTS = {
524        toggle: true
525    }
526
527    Collapse.prototype.dimension = function () {
528        var hasWidth = this.$element.hasClass('width')
529        return hasWidth ? 'width' : 'height'
530    }
531
532    Collapse.prototype.show = function () {
533        if (this.transitioning || this.$element.hasClass('in')) return
534
535        var startEvent = $.Event('show.bs.collapse')
536        this.$element.trigger(startEvent)
537        if (startEvent.isDefaultPrevented()) return
538
539        var actives = this.$parent && this.$parent.find('> .panel > .in')
540
541        if (actives && actives.length) {
542            var hasData = actives.data('bs.collapse')
543            if (hasData && hasData.transitioning) return
544            Plugin.call(actives, 'hide')
545            hasData || actives.data('bs.collapse', null)
546        }
547
548        var dimension = this.dimension()
549
550        this.$element
551          .removeClass('collapse')
552          .addClass('collapsing')[dimension](0)
553
554        this.transitioning = 1
555
556        var complete = function () {
557            this.$element
558              .removeClass('collapsing')
559              .addClass('collapse in')[dimension]('')
560            this.transitioning = 0
561            this.$element
562              .trigger('shown.bs.collapse')
563        }
564
565        if (!$.support.transition) return complete.call(this)
566
567        var scrollSize = $.camelCase(['scroll', dimension].join('-'))
568
569        this.$element
570          .one('bsTransitionEnd', $.proxy(complete, this))
571          .emulateTransitionEnd(350)[dimension](this.$element[0][scrollSize])
572    }
573
574    Collapse.prototype.hide = function () {
575        if (this.transitioning || !this.$element.hasClass('in')) return
576
577        var startEvent = $.Event('hide.bs.collapse')
578        this.$element.trigger(startEvent)
579        if (startEvent.isDefaultPrevented()) return
580
581        var dimension = this.dimension()
582
583        this.$element[dimension](this.$element[dimension]())[0].offsetHeight
584
585        this.$element
586          .addClass('collapsing')
587          .removeClass('collapse')
588          .removeClass('in')
589
590        this.transitioning = 1
591
592        var complete = function () {
593            this.transitioning = 0
594            this.$element
595              .trigger('hidden.bs.collapse')
596              .removeClass('collapsing')
597              .addClass('collapse')
598        }
599
600        if (!$.support.transition) return complete.call(this)
601
602        this.$element
603          [dimension](0)
604          .one('bsTransitionEnd', $.proxy(complete, this))
605          .emulateTransitionEnd(350)
606    }
607
608    Collapse.prototype.toggle = function () {
609        //Changed Below line to stop click of main menu in desktop version
610        var isTouchDevice = "ontouchstart" in window || navigator.msMaxTouchPoints;
611        if (isTouchDevice)
612            this[this.$element.hasClass('in') ? 'hide' : 'show']()
613        else {
614            if (this.$element.parent().parent().hasClass("navbar-nav")) {
615                if ($('.navbar-toggle').is(":visible")) {
616
617                    this[this.$element.hasClass('in') ? 'hide' : 'show']()
618                }
619            }
620            else {
621                this[this.$element.hasClass('in') ? 'hide' : 'show']()
622            }
623        }
624    }
625
626
627    // COLLAPSE PLUGIN DEFINITION
628    // ==========================
629
630    function Plugin(option) {
631        return this.each(function () {
632            var $this = $(this)
633            var data = $this.data('bs.collapse')
634            var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
635
636            if (!data && options.toggle && option == 'show') option = !option
637            if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
638            if (typeof option == 'string') data[option]()
639        })
640    }
641
642    var old = $.fn.collapse
643
644    $.fn.collapse = Plugin
645    $.fn.collapse.Constructor = Collapse
646
647
648    // COLLAPSE NO CONFLICT
649    // ====================
650
651    $.fn.collapse.noConflict = function () {
652        $.fn.collapse = old
653        return this
654    }
655
656
657    // COLLAPSE DATA-API
658    // =================
659
660    $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) {
661        var href
662        var $this = $(this)
663        var target = $this.attr('data-target')
664            || e.preventDefault()
665            || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
666        var $target = $(target)
667        var data = $target.data('bs.collapse')
668        var option = data ? 'toggle' : $this.data()
669        var parent = $this.attr('data-parent')
670        var $parent = parent && $(parent)
671
672        if (!data || !data.transitioning) {
673            if ($parent) $parent.find('[data-toggle="collapse"][data-parent="' + parent + '"]').not($this).addClass('collapsed')
674            $this[$target.hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
675        }
676
677        Plugin.call($target, option)
678    })
679
680}(jQuery);
681
682/* ========================================================================
683 * Bootstrap: dropdown.js v3.2.0
684 * http://getbootstrap.com/javascript/#dropdowns
685 * ========================================================================
686 * Copyright 2011-2014 Twitter, Inc.
687 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
688 * ======================================================================== */
689
690
691+function ($) {
692    'use strict';
693
694    // DROPDOWN CLASS DEFINITION
695    // =========================
696
697    var backdrop = '.dropdown-backdrop'
698    var toggle = '[data-toggle="dropdown"]'
699    var Dropdown = function (element) {
700        $(element).on('click.bs.dropdown', this.toggle)
701    }
702
703    Dropdown.VERSION = '3.2.0'
704
705    Dropdown.prototype.toggle = function (e) {
706        var $this = $(this)
707
708        if ($this.is('.disabled, :disabled')) return
709
710        var $parent = getParent($this)
711        var isActive = $parent.hasClass('open')
712
713        clearMenus()
714
715        if (!isActive) {
716            if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
717                // if mobile we use a backdrop because click events don't delegate
718                $('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click', clearMenus)
719            }
720
721            var relatedTarget = { relatedTarget: this }
722            $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))
723
724            if (e.isDefaultPrevented()) return
725
726            $this.trigger('focus')
727
728            $parent
729              .toggleClass('open')
730              .trigger('shown.bs.dropdown', relatedTarget)
731        }
732
733        return false
734    }
735
736    Dropdown.prototype.keydown = function (e) {
737        if (!/(38|40|27)/.test(e.keyCode)) return
738
739        var $this = $(this)
740
741        e.preventDefault()
742        e.stopPropagation()
743
744        if ($this.is('.disabled, :disabled')) return
745
746        var $parent = getParent($this)
747        var isActive = $parent.hasClass('open')
748
749        if (!isActive || (isActive && e.keyCode == 27)) {
750            if (e.which == 27) $parent.find(toggle).trigger('focus')
751            return $this.trigger('click')
752        }
753
754        var desc = ' li:not(.divider):visible a'
755        var $items = $parent.find('[role="menu"]' + desc + ', [role="listbox"]' + desc)
756
757        if (!$items.length) return
758
759        var index = $items.index($items.filter(':focus'))
760
761        if (e.keyCode == 38 && index > 0) index--                        // up
762        if (e.keyCode == 40 && index < $items.length - 1) index++                        // down
763        if (!~index) index = 0
764
765        $items.eq(index).trigger('focus')
766    }
767
768    function clearMenus(e) {
769        if (e && e.which === 3) return
770        $(backdrop).remove()
771        $(toggle).each(function () {
772            var $parent = getParent($(this))
773            var relatedTarget = { relatedTarget: this }
774            if (!$parent.hasClass('open')) return
775            $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
776            if (e.isDefaultPrevented()) return
777            $parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget)
778        })
779    }
780
781    function getParent($this) {
782        var selector = $this.attr('data-target')
783
784        if (!selector) {
785            selector = $this.attr('href')
786            selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
787        }
788
789        var $parent = selector && $(selector)
790
791        return $parent && $parent.length ? $parent : $this.parent()
792    }
793
794
795    // DROPDOWN PLUGIN DEFINITION
796    // ==========================
797
798    function Plugin(option) {
799        return this.each(function () {
800            var $this = $(this)
801            var data = $this.data('bs.dropdown')
802
803            if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))
804            if (typeof option == 'string') data[option].call($this)
805        })
806    }
807
808    var old = $.fn.dropdown
809
810    $.fn.dropdown = Plugin
811    $.fn.dropdown.Constructor = Dropdown
812
813
814    // DROPDOWN NO CONFLICT
815    // ====================
816
817    $.fn.dropdown.noConflict = function () {
818        $.fn.dropdown = old
819        return this
820    }
821
822
823    // APPLY TO STANDARD DROPDOWN ELEMENTS
824    // ===================================
825
826    $(document)
827      .on('click.bs.dropdown.data-api', clearMenus)
828      .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
829      .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
830      .on('keydown.bs.dropdown.data-api', toggle + ', [role="menu"], [role="listbox"]', Dropdown.prototype.keydown)
831
832}(jQuery);
833
834/* ========================================================================
835 * Bootstrap: modal.js v3.2.0
836 * http://getbootstrap.com/javascript/#modals
837 * ========================================================================
838 * Copyright 2011-2014 Twitter, Inc.
839 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
840 * ======================================================================== */
841
842
843+function ($) {
844    'use strict';
845
846    // MODAL CLASS DEFINITION
847    // ======================
848
849    var Modal = function (element, options) {
850        this.options = options
851        this.$body = $(document.body)
852        this.$element = $(element)
853        this.$backdrop =
854        this.isShown = null
855        this.scrollbarWidth = 0
856
857        if (this.options.remote) {
858            this.$element
859              .find('.modal-content')
860              .load(this.options.remote, $.proxy(function () {
861                  this.$element.trigger('loaded.bs.modal')
862              }, this))
863        }
864    }
865
866    Modal.VERSION = '3.2.0'
867
868    Modal.DEFAULTS = {
869        backdrop: true,
870        keyboard: true,
871        show: true
872    }
873
874    Modal.prototype.toggle = function (_relatedTarget) {
875        return this.isShown ? this.hide() : this.show(_relatedTarget)
876    }
877
878    Modal.prototype.show = function (_relatedTarget) {
879        var that = this
880        var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
881
882        this.$element.trigger(e)
883
884        if (this.isShown || e.isDefaultPrevented()) return
885
886        this.isShown = true
887
888        this.checkScrollbar()
889        this.$body.addClass('modal-open')
890
891        this.setScrollbar()
892        this.escape()
893
894        this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
895
896        this.backdrop(function () {
897            var transition = $.support.transition && that.$element.hasClass('fade')
898
899            if (!that.$element.parent().length) {
900                that.$element.appendTo(that.$body) // don't move modals dom position
901            }
902
903            that.$element
904              .show()
905              .scrollTop(0)
906
907            if (transition) {
908                that.$element[0].offsetWidth // force reflow
909            }
910
911            that.$element
912              .addClass('in')
913              .attr('aria-hidden', false)
914
915            that.enforceFocus()
916
917            var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
918
919            transition ?
920              that.$element.find('.modal-dialog') // wait for modal to slide in
921                .one('bsTransitionEnd', function () {
922                    that.$element.trigger('focus').trigger(e)
923                })
924                .emulateTransitionEnd(300) :
925              that.$element.trigger('focus').trigger(e)
926        })
927    }
928
929    Modal.prototype.hide = function (e) {
930        if (e) e.preventDefault()
931
932        e = $.Event('hide.bs.modal')
933
934        this.$element.trigger(e)
935
936        if (!this.isShown || e.isDefaultPrevented()) return
937
938        this.isShown = false
939
940        this.$body.removeClass('modal-open')
941
942        this.resetScrollbar()
943        this.escape()
944
945        $(document).off('focusin.bs.modal')
946
947        this.$element
948          .removeClass('in')
949          .attr('aria-hidden', true)
950          .off('click.dismiss.bs.modal')
951
952        $.support.transition && this.$element.hasClass('fade') ?
953          this.$element
954            .one('bsTransitionEnd', $.proxy(this.hiDemosdal, this))
955            .emulateTransitionEnd(300) :
956          this.hiDemosdal()
957    }
958
959    Modal.prototype.enforceFocus = function () {
960        $(document)
961          .off('focusin.bs.modal') // guard against infinite focus loop
962          .on('focusin.bs.modal', $.proxy(function (e) {
963              if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
964                  this.$element.trigger('focus')
965              }
966          }, this))
967    }
968
969    Modal.prototype.escape = function () {
970        if (this.isShown && this.options.keyboard) {
971            this.$element.on('keyup.dismiss.bs.modal', $.proxy(function (e) {
972                e.which == 27 && this.hide()
973            }, this))
974        } else if (!this.isShown) {
975            this.$element.off('keyup.dismiss.bs.modal')
976        }
977    }
978
979    Modal.prototype.hiDemosdal = function () {
980        var that = this
981        this.$element.hide()
982        this.backdrop(function () {
983            that.$element.trigger('hidden.bs.modal')
984        })
985    }
986
987    Modal.prototype.removeBackdrop = function () {
988        this.$backdrop && this.$backdrop.remove()
989        this.$backdrop = null
990    }
991
992    Modal.prototype.backdrop = function (callback) {
993        var that = this
994        var animate = this.$element.hasClass('fade') ? 'fade' : ''
995
996        if (this.isShown && this.options.backdrop) {
997            var doAnimate = $.support.transition && animate
998
999            this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
1000              .appendTo(this.$body)
1001
1002            this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
1003                if (e.target !== e.currentTarget) return
1004                this.options.backdrop == 'static'
1005                  ? this.$element[0].focus.call(this.$element[0])
1006                  : this.hide.call(this)
1007            }, this))
1008
1009            if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
1010
1011            this.$backdrop.addClass('in')
1012
1013            if (!callback) return
1014
1015            doAnimate ?
1016              this.$backdrop
1017                .one('bsTransitionEnd', callback)
1018                .emulateTransitionEnd(150) :
1019              callback()
1020
1021        } else if (!this.isShown && this.$backdrop) {
1022            this.$backdrop.removeClass('in')
1023
1024            var callbackRemove = function () {
1025                that.removeBackdrop()
1026                callback && callback()
1027            }
1028            $.support.transition && this.$element.hasClass('fade') ?
1029              this.$backdrop
1030                .one('bsTransitionEnd', callbackRemove)
1031                .emulateTransitionEnd(150) :
1032              callbackRemove()
1033
1034        } else if (callback) {
1035            callback()
1036        }
1037    }
1038
1039    Modal.prototype.checkScrollbar = function () {
1040        if (document.body.clientWidth >= window.innerWidth) return
1041        this.scrollbarWidth = this.scrollbarWidth || this.measureScrollbar()
1042    }
1043
1044    Modal.prototype.setScrollbar = function () {
1045        var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
1046        if (this.scrollbarWidth) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
1047    }
1048
1049    Modal.prototype.resetScrollbar = function () {
1050        this.$body.css('padding-right', '')
1051    }
1052
1053    Modal.prototype.measureScrollbar = function () { // thx walsh
1054        var scrollDiv = document.createElement('div')
1055        scrollDiv.className = 'modal-scrollbar-measure'
1056        this.$body.append(scrollDiv)
1057        var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth
1058        this.$body[0].removeChild(scrollDiv)
1059        return scrollbarWidth
1060    }
1061
1062
1063    // MODAL PLUGIN DEFINITION
1064    // =======================
1065
1066    function Plugin(option, _relatedTarget) {
1067        return this.each(function () {
1068            var $this = $(this)
1069            var data = $this.data('bs.modal')
1070            var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
1071
1072            if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
1073            if (typeof option == 'string') data[option](_relatedTarget)
1074            else if (options.show) data.show(_relatedTarget)
1075        })
1076    }
1077
1078    var old = $.fn.modal
1079
1080    $.fn.modal = Plugin
1081    $.fn.modal.Constructor = Modal
1082
1083
1084    // MODAL NO CONFLICT
1085    // =================
1086
1087    $.fn.modal.noConflict = function () {
1088        $.fn.modal = old
1089        return this
1090    }
1091
1092
1093    // MODAL DATA-API
1094    // ==============
1095
1096    $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
1097        var $this = $(this)
1098        var href = $this.attr('href')
1099        var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7
1100        var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
1101
1102        if ($this.is('a')) e.preventDefault()
1103
1104        $target.one('show.bs.modal', function (showEvent) {
1105            if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown
1106            $target.one('hidden.bs.modal', function () {
1107                $this.is(':visible') && $this.trigger('focus')
1108            })
1109        })
1110        Plugin.call($target, option, this)
1111    })
1112
1113}(jQuery);
1114
1115/* ========================================================================
1116 * Bootstrap: tooltip.js v3.2.0
1117 * http://getbootstrap.com/javascript/#tooltip
1118 * Inspired by the original jQuery.tipsy by Jason Frame
1119 * ========================================================================
1120 * Copyright 2011-2014 Twitter, Inc.
1121 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1122 * ======================================================================== */
1123
1124
1125+function ($) {
1126    'use strict';
1127
1128    // TOOLTIP PUBLIC CLASS DEFINITION
1129    // ===============================
1130
1131    var Tooltip = function (element, options) {
1132        this.type =
1133        this.options =
1134        this.enabled =
1135        this.timeout =
1136        this.hoverState =
1137        this.$element = null
1138
1139        this.init('tooltip', element, options)
1140    }
1141
1142    Tooltip.VERSION = '3.2.0'
1143
1144    Tooltip.DEFAULTS = {
1145        animation: true,
1146        placement: 'top',
1147        selector: false,
1148        template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
1149        trigger: 'hover focus',
1150        title: '',
1151        delay: 0,
1152        html: false,
1153        container: false,
1154        viewport: {
1155            selector: 'body',
1156            padding: 0
1157        }
1158    }
1159
1160    Tooltip.prototype.init = function (type, element, options) {
1161        this.enabled = true
1162        this.type = type
1163        this.$element = $(element)
1164        this.options = this.getOptions(options)
1165        this.$viewport = this.options.viewport && $(this.options.viewport.selector || this.options.viewport)
1166
1167        var triggers = this.options.trigger.split(' ')
1168
1169        for (var i = triggers.length; i--;) {
1170            var trigger = triggers[i]
1171
1172            if (trigger == 'click') {
1173                this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
1174            } else if (trigger != 'manual') {
1175                var eventIn = trigger == 'hover' ? 'mouseenter' : 'focusin'
1176                var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'
1177
1178                this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
1179                this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
1180            }
1181        }
1182
1183        this.options.selector ?
1184          (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
1185          this.fixTitle()
1186    }
1187
1188    Tooltip.prototype.getDefaults = function () {
1189        return Tooltip.DEFAULTS
1190    }
1191
1192    Tooltip.prototype.getOptions = function (options) {
1193        options = $.extend({}, this.getDefaults(), this.$element.data(), options)
1194
1195        if (options.delay && typeof options.delay == 'number') {
1196            options.delay = {
1197                show: options.delay,
1198                hide: options.delay
1199            }
1200        }
1201
1202        return options
1203    }
1204
1205    Tooltip.prototype.getDelegateOptions = function () {
1206        var options = {}
1207        var defaults = this.getDefaults()
1208
1209        this._options && $.each(this._options, function (key, value) {
1210            if (defaults[key] != value) options[key] = value
1211        })
1212
1213        return options
1214    }
1215
1216    Tooltip.prototype.enter = function (obj) {
1217        var self = obj instanceof this.constructor ?
1218            obj : $(obj.currentTarget).data('bs.' + this.type)
1219
1220        if (!self) {
1221            self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
1222            $(obj.currentTarget).data('bs.' + this.type, self)
1223        }
1224
1225        clearTimeout(self.timeout)
1226
1227        self.hoverState = 'in'
1228
1229        if (!self.options.delay || !self.options.delay.show) return self.show()
1230
1231        self.timeout = setTimeout(function () {
1232            if (self.hoverState == 'in') self.show()
1233        }, self.options.delay.show)
1234    }
1235
1236    Tooltip.prototype.leave = function (obj) {
1237        var self = obj instanceof this.constructor ?
1238            obj : $(obj.currentTarget).data('bs.' + this.type)
1239
1240        if (!self) {
1241            self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
1242            $(obj.currentTarget).data('bs.' + this.type, self)
1243        }
1244
1245        clearTimeout(self.timeout)
1246
1247        self.hoverState = 'out'
1248
1249        if (!self.options.delay || !self.options.delay.hide) return self.hide()
1250
1251        self.timeout = setTimeout(function () {
1252            if (self.hoverState == 'out') self.hide()
1253        }, self.options.delay.hide)
1254    }
1255
1256    Tooltip.prototype.show = function () {
1257        var e = $.Event('show.bs.' + this.type)
1258
1259        if (this.hasContent() && this.enabled) {
1260            this.$element.trigger(e)
1261
1262            var inDom = $.contains(document.documentElement, this.$element[0])
1263            if (e.isDefaultPrevented() || !inDom) return
1264            var that = this
1265
1266            var $tip = this.tip()
1267
1268            var tipId = this.getUID(this.type)
1269
1270            this.setContent()
1271            $tip.attr('id', tipId)
1272            this.$element.attr('aria-describedby', tipId)
1273
1274            if (this.options.animation) $tip.addClass('fade')
1275
1276            var placement = typeof this.options.placement == 'function' ?
1277              this.options.placement.call(this, $tip[0], this.$element[0]) :
1278              this.options.placement
1279
1280            var autoToken = /\s?auto?\s?/i
1281            var autoPlace = autoToken.test(placement)
1282            if (autoPlace) placement = placement.replace(autoToken, '') || 'top'
1283
1284            $tip
1285              .detach()
1286              .css({ top: 0, left: 0, display: 'block' })
1287              .addClass(placement)
1288              .data('bs.' + this.type, this)
1289
1290            this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
1291
1292            var pos = this.getPosition()
1293            var actualWidth = $tip[0].offsetWidth
1294            var actualHeight = $tip[0].offsetHeight
1295
1296            if (autoPlace) {
1297                var orgPlacement = placement
1298                var $parent = this.$element.parent()
1299                var parentDim = this.getPosition($parent)
1300
1301                placement = placement == 'bottom' && pos.top + pos.height + actualHeight - parentDim.scroll > parentDim.height ? 'top' :
1302                            placement == 'top' && pos.top - parentDim.scroll - actualHeight < 0 ? 'bottom' :
1303                            placement == 'right' && pos.right + actualWidth > parentDim.width ? 'left' :
1304                            placement == 'left' && pos.left - actualWidth < parentDim.left ? 'right' :
1305                            placement
1306
1307                $tip
1308                  .removeClass(orgPlacement)
1309                  .addClass(placement)
1310            }
1311
1312            var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
1313
1314            this.applyPlacement(calculatedOffset, placement)
1315
1316            var complete = function () {
1317                that.$element.trigger('shown.bs.' + that.type)
1318                that.hoverState = null
1319            }
1320
1321            $.support.transition && this.$tip.hasClass('fade') ?
1322              $tip
1323                .one('bsTransitionEnd', complete)
1324                .emulateTransitionEnd(150) :
1325              complete()
1326        }
1327    }
1328
1329    Tooltip.prototype.applyPlacement = function (offset, placement) {
1330        var $tip = this.tip()
1331        var width = $tip[0].offsetWidth
1332        var height = $tip[0].offsetHeight
1333
1334        // manually read margins because getBoundingClientRect includes difference
1335        var marginTop = parseInt($tip.css('margin-top'), 10)
1336        var marginLeft = parseInt($tip.css('margin-left'), 10)
1337
1338        // we must check for NaN for ie 8/9
1339        if (isNaN(marginTop)) marginTop = 0
1340        if (isNaN(marginLeft)) marginLeft = 0
1341
1342        offset.top = offset.top + marginTop
1343        offset.left = offset.left + marginLeft
1344
1345        // $.fn.offset doesn't round pixel values
1346        // so we use setOffset directly with our own function B-0
1347        $.offset.setOffset($tip[0], $.extend({
1348            using: function (props) {
1349                $tip.css({
1350                    top: Math.round(props.top),
1351                    left: Math.round(props.left)
1352                })
1353            }
1354        }, offset), 0)
1355
1356        $tip.addClass('in')
1357
1358        // check to see if placing tip in new offset caused the tip to resize itself
1359        var actualWidth = $tip[0].offsetWidth
1360        var actualHeight = $tip[0].offsetHeight
1361
1362        if (placement == 'top' && actualHeight != height) {
1363            offset.top = offset.top + height - actualHeight
1364        }
1365
1366        var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight)
1367
1368        if (delta.left) offset.left += delta.left
1369        else offset.top += delta.top
1370
1371        var arrowDelta = delta.left ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight
1372        var arrowPosition = delta.left ? 'left' : 'top'
1373        var arrowOffsetPosition = delta.left ? 'offsetWidth' : 'offsetHeight'
1374
1375        $tip.offset(offset)
1376        this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], arrowPosition)
1377    }
1378
1379    Tooltip.prototype.replaceArrow = function (delta, dimension, position) {
1380        this.arrow().css(position, delta ? (50 * (1 - delta / dimension) + '%') : '')
1381    }
1382
1383    Tooltip.prototype.setContent = function () {
1384        var $tip = this.tip()
1385        var title = this.getTitle()
1386
1387        $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
1388        $tip.removeClass('fade in top bottom left right')
1389    }
1390
1391    Tooltip.prototype.hide = function () {
1392        var that = this
1393        var $tip = this.tip()
1394        var e = $.Event('hide.bs.' + this.type)
1395
1396        this.$element.removeAttr('aria-describedby')
1397
1398        function complete() {
1399            if (that.hoverState != 'in') $tip.detach()
1400            that.$element.trigger('hidden.bs.' + that.type)
1401        }
1402
1403        this.$element.trigger(e)
1404
1405        if (e.isDefaultPrevented()) return
1406
1407        $tip.removeClass('in')
1408
1409        $.support.transition && this.$tip.hasClass('fade') ?
1410          $tip
1411            .one('bsTransitionEnd', complete)
1412            .emulateTransitionEnd(150) :
1413          complete()
1414
1415        this.hoverState = null
1416
1417        return this
1418    }
1419
1420    Tooltip.prototype.fixTitle = function () {
1421        var $e = this.$element
1422        if ($e.attr('title') || typeof ($e.attr('data-original-title')) != 'string') {
1423            $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
1424        }
1425    }
1426
1427    Tooltip.prototype.hasContent = function () {
1428        return this.getTitle()
1429    }
1430
1431    Tooltip.prototype.getPosition = function ($element) {
1432        $element = $element || this.$element
1433        var el = $element[0]
1434        var isBody = el.tagName == 'BODY'
1435        return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : null, {
1436            scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop(),
1437            width: isBody ? $(window).width() : $element.outerWidth(),
1438            height: isBody ? $(window).height() : $element.outerHeight()
1439        }, isBody ? { top: 0, left: 0 } : $element.offset())
1440    }
1441
1442    Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
1443        return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } :
1444               placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
1445               placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
1446            /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
1447
1448    }
1449
1450    Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) {
1451        var delta = { top: 0, left: 0 }
1452        if (!this.$viewport) return delta
1453
1454        var viewportPadding = this.options.viewport && this.options.viewport.padding || 0
1455        var viewportDimensions = this.getPosition(this.$viewport)
1456
1457        if (/right|left/.test(placement)) {
1458            var topEdgeOffset = pos.top - viewportPadding - viewportDimensions.scroll
1459            var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight
1460            if (topEdgeOffset < viewportDimensions.top) { // top overflow
1461                delta.top = viewportDimensions.top - topEdgeOffset
1462            } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow
1463                delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset
1464            }
1465        } else {
1466            var leftEdgeOffset = pos.left - viewportPadding
1467            var rightEdgeOffset = pos.left + viewportPadding + actualWidth
1468            if (leftEdgeOffset < viewportDimensions.left) { // left overflow
1469                delta.left = viewportDimensions.left - leftEdgeOffset
1470            } else if (rightEdgeOffset > viewportDimensions.width) { // right overflow
1471                delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
1472            }
1473        }
1474
1475        return delta
1476    }
1477
1478    Tooltip.prototype.getTitle = function () {
1479        var title
1480        var $e = this.$element
1481        var o = this.options
1482
1483        title = $e.attr('data-original-title')
1484          || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
1485
1486        return title
1487    }
1488
1489    Tooltip.prototype.getUID = function (prefix) {
1490        do prefix += ~~(Math.random() * 1000000)
1491        while (document.getElementById(prefix))
1492        return prefix
1493    }
1494
1495    Tooltip.prototype.tip = function () {
1496        return (this.$tip = this.$tip || $(this.options.template))
1497    }
1498
1499    Tooltip.prototype.arrow = function () {
1500        return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow'))
1501    }
1502
1503    Tooltip.prototype.validate = function () {
1504        if (!this.$element[0].parentNode) {
1505            this.hide()
1506            this.$element = null
1507            this.options = null
1508        }
1509    }
1510
1511    Tooltip.prototype.enable = function () {
1512        this.enabled = true
1513    }
1514
1515    Tooltip.prototype.disable = function () {
1516        this.enabled = false
1517    }
1518
1519    Tooltip.prototype.toggleEnabled = function () {
1520        this.enabled = !this.enabled
1521    }
1522
1523    Tooltip.prototype.toggle = function (e) {
1524        var self = this
1525        if (e) {
1526            self = $(e.currentTarget).data('bs.' + this.type)
1527            if (!self) {
1528                self = new this.constructor(e.currentTarget, this.getDelegateOptions())
1529                $(e.currentTarget).data('bs.' + this.type, self)
1530            }
1531        }
1532
1533        self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
1534    }
1535
1536    Tooltip.prototype.destroy = function () {
1537        clearTimeout(this.timeout)
1538        this.hide().$element.off('.' + this.type).removeData('bs.' + this.type)
1539    }
1540
1541
1542    // TOOLTIP PLUGIN DEFINITION
1543    // =========================
1544
1545    function Plugin(option) {
1546        return this.each(function () {
1547            var $this = $(this)
1548            var data = $this.data('bs.tooltip')
1549            var options = typeof option == 'object' && option
1550
1551            if (!data && option == 'destroy') return
1552            if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
1553            if (typeof option == 'string') data[option]()
1554        })
1555    }
1556
1557    var old = $.fn.tooltip
1558
1559    $.fn.tooltip = Plugin
1560    $.fn.tooltip.Constructor = Tooltip
1561
1562
1563    // TOOLTIP NO CONFLICT
1564    // ===================
1565
1566    $.fn.tooltip.noConflict = function () {
1567        $.fn.tooltip = old
1568        return this
1569    }
1570
1571}(jQuery);
1572
1573/* ========================================================================
1574 * Bootstrap: popover.js v3.2.0
1575 * http://getbootstrap.com/javascript/#popovers
1576 * ========================================================================
1577 * Copyright 2011-2014 Twitter, Inc.
1578 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1579 * ======================================================================== */
1580
1581
1582+function ($) {
1583    'use strict';
1584
1585    // POPOVER PUBLIC CLASS DEFINITION
1586    // ===============================
1587
1588    var Popover = function (element, options) {
1589        this.init('popover', element, options)
1590    }
1591
1592    if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
1593
1594    Popover.VERSION = '3.2.0'
1595
1596    Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
1597        placement: 'right',
1598        trigger: 'click',
1599        content: '',
1600        template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
1601    })
1602
1603
1604    // NOTE: POPOVER EXTENDS tooltip.js
1605    // ================================
1606
1607    Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)
1608
1609    Popover.prototype.constructor = Popover
1610
1611    Popover.prototype.getDefaults = function () {
1612        return Popover.DEFAULTS
1613    }
1614
1615    Popover.prototype.setContent = function () {
1616        var $tip = this.tip()
1617        var title = this.getTitle()
1618        var content = this.getContent()
1619
1620        $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
1621        $tip.find('.popover-content').empty()[ // we use append for html objects to maintain js events
1622          this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
1623        ](content)
1624
1625        $tip.removeClass('fade top bottom left right in')
1626
1627        // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
1628        // this manually by checking the contents.
1629        if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()
1630    }
1631
1632    Popover.prototype.hasContent = function () {
1633        return this.getTitle() || this.getContent()
1634    }
1635
1636    Popover.prototype.getContent = function () {
1637        var $e = this.$element
1638        var o = this.options
1639
1640        return $e.attr('data-content')
1641          || (typeof o.content == 'function' ?
1642                o.content.call($e[0]) :
1643                o.content)
1644    }
1645
1646    Popover.prototype.arrow = function () {
1647        return (this.$arrow = this.$arrow || this.tip().find('.arrow'))
1648    }
1649
1650    Popover.prototype.tip = function () {
1651        if (!this.$tip) this.$tip = $(this.options.template)
1652        return this.$tip
1653    }
1654
1655
1656    // POPOVER PLUGIN DEFINITION
1657    // =========================
1658
1659    function Plugin(option) {
1660        return this.each(function () {
1661            var $this = $(this)
1662            var data = $this.data('bs.popover')
1663            var options = typeof option == 'object' && option
1664
1665            if (!data && option == 'destroy') return
1666            if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
1667            if (typeof option == 'string') data[option]()
1668        })
1669    }
1670
1671    var old = $.fn.popover
1672
1673    $.fn.popover = Plugin
1674    $.fn.popover.Constructor = Popover
1675
1676
1677    // POPOVER NO CONFLICT
1678    // ===================
1679
1680    $.fn.popover.noConflict = function () {
1681        $.fn.popover = old
1682        return this
1683    }
1684
1685}(jQuery);
1686
1687/* ========================================================================
1688 * Bootstrap: scrollspy.js v3.2.0
1689 * http://getbootstrap.com/javascript/#scrollspy
1690 * ========================================================================
1691 * Copyright 2011-2014 Twitter, Inc.
1692 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1693 * ======================================================================== */
1694
1695
1696+function ($) {
1697    'use strict';
1698
1699    // SCROLLSPY CLASS DEFINITION
1700    // ==========================
1701
1702    function ScrollSpy(element, options) {
1703        var process = $.proxy(this.process, this)
1704
1705        this.$body = $('body')
1706        this.$scrollElement = $(element).is('body') ? $(window) : $(element)
1707        this.options = $.extend({}, ScrollSpy.DEFAULTS, options)
1708        this.selector = (this.options.target || '') + ' .nav li > a'
1709        this.offsets = []
1710        this.targets = []
1711        this.activeTarget = null
1712        this.scrollHeight = 0
1713
1714        this.$scrollElement.on('scroll.bs.scrollspy', process)
1715        this.refresh()
1716        this.process()
1717    }
1718
1719    ScrollSpy.VERSION = '3.2.0'
1720
1721    ScrollSpy.DEFAULTS = {
1722        offset: 10
1723    }
1724
1725    ScrollSpy.prototype.getScrollHeight = function () {
1726        return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
1727    }
1728
1729    ScrollSpy.prototype.refresh = function () {
1730        var offsetMethod = 'offset'
1731        var offsetBase = 0
1732
1733        if (!$.isWindow(this.$scrollElement[0])) {
1734            offsetMethod = 'position'
1735            offsetBase = this.$scrollElement.scrollTop()
1736        }
1737
1738        this.offsets = []
1739        this.targets = []
1740        this.scrollHeight = this.getScrollHeight()
1741
1742        var self = this
1743
1744        this.$body
1745          .find(this.selector)
1746          .map(function () {
1747              var $el = $(this)
1748              var href = $el.data('target') || $el.attr('href')
1749              var $href = /^#./.test(href) && $(href)
1750
1751              return ($href
1752                && $href.length
1753                && $href.is(':visible')
1754                && [[$href[offsetMethod]().top + offsetBase, href]]) || null
1755          })
1756          .sort(function (a, b) { return a[0] - b[0] })
1757          .each(function () {
1758              self.offsets.push(this[0])
1759              self.targets.push(this[1])
1760          })
1761    }
1762
1763    ScrollSpy.prototype.process = function () {
1764        var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
1765        var scrollHeight = this.getScrollHeight()
1766        var maxScroll = this.options.offset + scrollHeight - this.$scrollElement.height()
1767        var offsets = this.offsets
1768        var targets = this.targets
1769        var activeTarget = this.activeTarget
1770        var i
1771
1772        if (this.scrollHeight != scrollHeight) {
1773            this.refresh()
1774        }
1775
1776        if (scrollTop >= maxScroll) {
1777            return activeTarget != (i = targets[targets.length - 1]) && this.activate(i)
1778        }
1779
1780        if (activeTarget && scrollTop <= offsets[0]) {
1781            return activeTarget != (i = targets[0]) && this.activate(i)
1782        }
1783
1784        for (i = offsets.length; i--;) {
1785            activeTarget != targets[i]
1786              && scrollTop >= offsets[i]
1787              && (!offsets[i + 1] || scrollTop <= offsets[i + 1])
1788              && this.activate(targets[i])
1789        }
1790    }
1791
1792    ScrollSpy.prototype.activate = function (target) {
1793        this.activeTarget = target
1794
1795        $(this.selector)
1796          .parentsUntil(this.options.target, '.active')
1797          .removeClass('active')
1798
1799        var selector = this.selector +
1800            '[data-target="' + target + '"],' +
1801            this.selector + '[href="' + target + '"]'
1802
1803        var active = $(selector)
1804          .parents('li')
1805          .addClass('active')
1806
1807        if (active.parent('.dropdown-menu').length) {
1808            active = active
1809              .closest('li.dropdown')
1810              .addClass('active')
1811        }
1812
1813        active.trigger('activate.bs.scrollspy')
1814    }
1815
1816
1817    // SCROLLSPY PLUGIN DEFINITION
1818    // ===========================
1819
1820    function Plugin(option) {
1821        return this.each(function () {
1822            var $this = $(this)
1823            var data = $this.data('bs.scrollspy')
1824            var options = typeof option == 'object' && option
1825
1826            if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))
1827            if (typeof option == 'string') data[option]()
1828        })
1829    }
1830
1831    var old = $.fn.scrollspy
1832
1833    $.fn.scrollspy = Plugin
1834    $.fn.scrollspy.Constructor = ScrollSpy
1835
1836
1837    // SCROLLSPY NO CONFLICT
1838    // =====================
1839
1840    $.fn.scrollspy.noConflict = function () {
1841        $.fn.scrollspy = old
1842        return this
1843    }
1844
1845
1846    // SCROLLSPY DATA-API
1847    // ==================
1848
1849    $(window).on('load.bs.scrollspy.data-api', function () {
1850        $('[data-spy="scroll"]').each(function () {
1851            var $spy = $(this)
1852            Plugin.call($spy, $spy.data())
1853        })
1854    })
1855
1856}(jQuery);
1857
1858/* ========================================================================
1859 * Bootstrap: tab.js v3.2.0
1860 * http://getbootstrap.com/javascript/#tabs
1861 * ========================================================================
1862 * Copyright 2011-2014 Twitter, Inc.
1863 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1864 * ======================================================================== */
1865
1866
1867+function ($) {
1868    'use strict';
1869
1870    // TAB CLASS DEFINITION
1871    // ====================
1872
1873    var Tab = function (element) {
1874        this.element = $(element)
1875    }
1876
1877    Tab.VERSION = '3.2.0'
1878
1879    Tab.prototype.show = function () {
1880        var $this = this.element
1881        var $ul = $this.closest('ul:not(.dropdown-menu)')
1882        var selector = $this.data('target')
1883
1884        if (!selector) {
1885            selector = $this.attr('href')
1886            selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
1887        }
1888
1889        if ($this.parent('li').hasClass('active')) return
1890
1891        var previous = $ul.find('.active:last a')[0]
1892        var e = $.Event('show.bs.tab', {
1893            relatedTarget: previous
1894        })
1895
1896        $this.trigger(e)
1897
1898        if (e.isDefaultPrevented()) return
1899
1900        var $target = $(selector)
1901
1902        this.activate($this.closest('li'), $ul)
1903        this.activate($target, $target.parent(), function () {
1904            $this.trigger({
1905                type: 'shown.bs.tab',
1906                relatedTarget: previous
1907            })
1908        })
1909    }
1910
1911    Tab.prototype.activate = function (element, container, callback) {
1912        var $active = container.find('> .active')
1913        var transition = callback
1914          && $.support.transition
1915          && $active.hasClass('fade')
1916
1917        function next() {
1918            $active
1919              .removeClass('active')
1920              .find('> .dropdown-menu > .active')
1921              .removeClass('active')
1922
1923            element.addClass('active')
1924
1925            if (transition) {
1926                element[0].offsetWidth // reflow for transition
1927                element.addClass('in')
1928            } else {
1929                element.removeClass('fade')
1930            }
1931
1932            if (element.parent('.dropdown-menu')) {
1933                element.closest('li.dropdown').addClass('active')
1934            }
1935
1936            callback && callback()
1937        }
1938
1939        transition ?
1940          $active
1941            .one('bsTransitionEnd', next)
1942            .emulateTransitionEnd(150) :
1943          next()
1944
1945        $active.removeClass('in')
1946    }
1947
1948
1949    // TAB PLUGIN DEFINITION
1950    // =====================
1951
1952    function Plugin(option) {
1953        return this.each(function () {
1954            var $this = $(this)
1955            var data = $this.data('bs.tab')
1956
1957            if (!data) $this.data('bs.tab', (data = new Tab(this)))
1958            if (typeof option == 'string') data[option]()
1959        })
1960    }
1961
1962    var old = $.fn.tab
1963
1964    $.fn.tab = Plugin
1965    $.fn.tab.Constructor = Tab
1966
1967
1968    // TAB NO CONFLICT
1969    // ===============
1970
1971    $.fn.tab.noConflict = function () {
1972        $.fn.tab = old
1973        return this
1974    }
1975
1976
1977    // TAB DATA-API
1978    // ============
1979
1980    $(document).on('click.bs.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
1981        e.preventDefault()
1982        Plugin.call($(this), 'show')
1983    })
1984
1985}(jQuery);
1986
1987/* ========================================================================
1988 * Bootstrap: affix.js v3.2.0
1989 * http://getbootstrap.com/javascript/#affix
1990 * ========================================================================
1991 * Copyright 2011-2014 Twitter, Inc.
1992 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1993 * ======================================================================== */
1994
1995
1996+function ($) {
1997    'use strict';
1998
1999    // AFFIX CLASS DEFINITION
2000    // ======================
2001
2002    var Affix = function (element, options) {
2003        this.options = $.extend({}, Affix.DEFAULTS, options)
2004
2005        this.$target = $(this.options.target)
2006          .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
2007          .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
2008
2009        this.$element = $(element)
2010        this.affixed =
2011        this.unpin =
2012        this.pinnedOffset = null
2013
2014        this.checkPosition()
2015    }
2016
2017    Affix.VERSION = '3.2.0'
2018
2019    Affix.RESET = 'affix affix-top affix-bottom'
2020
2021    Affix.DEFAULTS = {
2022        offset: 0,
2023        target: window
2024    }
2025
2026    Affix.prototype.getPinnedOffset = function () {
2027        if (this.pinnedOffset) return this.pinnedOffset
2028        this.$element.removeClass(Affix.RESET).addClass('affix')
2029        var scrollTop = this.$target.scrollTop()
2030        var position = this.$element.offset()
2031        return (this.pinnedOffset = position.top - scrollTop)
2032    }
2033
2034    Affix.prototype.checkPositionWithEventLoop = function () {
2035        setTimeout($.proxy(this.checkPosition, this), 1)
2036    }
2037
2038    Affix.prototype.checkPosition = function () {
2039        if (!this.$element.is(':visible')) return
2040
2041        var scrollHeight = $(document).height()
2042        var scrollTop = this.$target.scrollTop()
2043        var position = this.$element.offset()
2044        var offset = this.options.offset
2045        var offsetTop = offset.top
2046        var offsetBottom = offset.bottom
2047
2048        if (typeof offset != 'object') offsetBottom = offsetTop = offset
2049        if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)
2050        if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)
2051
2052        var affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ? false :
2053                    offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ? 'bottom' :
2054                    offsetTop != null && (scrollTop <= offsetTop) ? 'top' : false
2055
2056        if (this.affixed === affix) return
2057        if (this.unpin != null) this.$element.css('top', '')
2058
2059        var affixType = 'affix' + (affix ? '-' + affix : '')
2060        var e = $.Event(affixType + '.bs.affix')
2061
2062        this.$element.trigger(e)
2063
2064        if (e.isDefaultPrevented()) return
2065
2066        this.affixed = affix
2067        this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null
2068
2069        this.$element
2070          .removeClass(Affix.RESET)
2071          .addClass(affixType)
2072          .trigger($.Event(affixType.replace('affix', 'affixed')))
2073
2074        if (affix == 'bottom') {
2075            this.$element.offset({
2076                top: scrollHeight - this.$element.height() - offsetBottom
2077            })
2078        }
2079    }
2080
2081
2082    // AFFIX PLUGIN DEFINITION
2083    // =======================
2084
2085    function Plugin(option) {
2086        return this.each(function () {
2087            var $this = $(this)
2088            var data = $this.data('bs.affix')
2089            var options = typeof option == 'object' && option
2090
2091            if (!data) $this.data('bs.affix', (data = new Affix(this, options)))
2092            if (typeof option == 'string') data[option]()
2093        })
2094    }
2095
2096    var old = $.fn.affix
2097
2098    $.fn.affix = Plugin
2099    $.fn.affix.Constructor = Affix
2100
2101
2102    // AFFIX NO CONFLICT
2103    // =================
2104
2105    $.fn.affix.noConflict = function () {
2106        $.fn.affix = old
2107        return this
2108    }
2109
2110
2111    // AFFIX DATA-API
2112    // ==============
2113
2114    $(window).on('load', function () {
2115        $('[data-spy="affix"]').each(function () {
2116            var $spy = $(this)
2117            var data = $spy.data()
2118
2119            data.offset = data.offset || {}
2120
2121            if (data.offsetBottom) data.offset.bottom = data.offsetBottom
2122            if (data.offsetTop) data.offset.top = data.offsetTop
2123
2124            Plugin.call($spy, data)
2125        })
2126    })
2127
2128}(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.