PageSourceSearch

https://lynx.co/wp-content/plugins/responsive-accordion-and-collapse/js/accordion-custom.js?ver=6.6.2

js lynx.co collected 2026-09-26 06:14:40 UTC 65,345 bytes, 2,244 lines download raw bytes

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