vendor: 45,703 bytes, lines 1-709
1if(typeof jQuery==='undefined'){throw new Error('Bootstrap\'s JavaScript requires jQuery')}+function($){'use strict';var version=$.fn.jquery.split(' ')[0].split('.') 2if((version[0]<2&&version[1]<9)||(version[0]==1&&version[1]==9&&version[2]<1)){throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher')}}(jQuery);+function($){'use strict';function transitionEnd(){var el=document.createElement('bootstrap') 3var transEndEventNames={WebkitTransition:'webkitTransitionEnd',MozTransition:'transitionend',OTransition:'oTransitionEnd otransitionend',transition:'transitionend'} 4for(var name in transEndEventNames){if(el.style[name]!==undefined){return{end:transEndEventNames[name]}}}return false}$.fn.emulateTransitionEnd=function(duration){var called=false 5var $el=this 6$(this).one('bsTransitionEnd',function(){called=true}) 7var callback=function(){if(!called)$($el).trigger($.support.transition.end)} 8setTimeout(callback,duration) 9return this} 10$(function(){$.support.transition=transitionEnd() 11if(!$.support.transition)return 12$.event.special.bsTransitionEnd={bindType:$.support.transition.end,delegateType:$.support.transition.end,handle:function(e){if($(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}}})}(jQuery);+function($){'use strict';var dismiss='[data-dismiss="alert"]' 13var Alert=function(el){$(el).on('click',dismiss,this.close)} 14Alert.VERSION='3.3.4' 15Alert.TRANSITION_DURATION=150 16Alert.prototype.close=function(e){var $this=$(this) 17var selector=$this.attr('data-target') 18if(!selector){selector=$this.attr('href') 19selector=selector&&selector.replace(/.*(?=#[^\s]*$)/,'')}var $parent=$(selector) 20if(e)e.preventDefault() 21if(!$parent.length){$parent=$this.closest('.alert')}$parent.trigger(e=$.Event('close.bs.alert')) 22if(e.isDefaultPrevented())return 23$parent.removeClass('in') 24function removeElement(){$parent.detach().trigger('closed.bs.alert').remove()}$.support.transition&&$parent.hasClass('fade')?$parent.one('bsTransitionEnd',removeElement).emulateTransitionEnd(Alert.TRANSITION_DURATION):removeElement()} 25function Plugin(option){return this.each(function(){var $this=$(this) 26var data=$this.data('bs.alert') 27if(!data)$this.data('bs.alert',(data=new Alert(this))) 28if(typeof option=='string')data[option].call($this)})}var old=$.fn.alert 29$.fn.alert=Plugin 30$.fn.alert.Constructor=Alert 31$.fn.alert.noConflict=function(){$.fn.alert=old 32return this} 33$(document).on('click.bs.alert.data-api',dismiss,Alert.prototype.close)}(jQuery);+function($){'use strict';var Button=function(element,options){this.$element=$(element) 34this.options=$.extend({},Button.DEFAULTS,options) 35this.isLoading=false} 36Button.VERSION='3.3.4' 37Button.DEFAULTS={loadingText:'loading...'} 38Button.prototype.setState=function(state){var d='disabled' 39var $el=this.$element 40var val=$el.is('input')?'val':'html' 41var data=$el.data() 42state=state+'Text' 43if(data.resetText==null)$el.data('resetText',$el[val]()) 44setTimeout($.proxy(function(){$el[val](data[state]==null?this.options[state]:data[state]) 45if(state=='loadingText'){this.isLoading=true 46$el.addClass(d).attr(d,d)}else if(this.isLoading){this.isLoading=false 47$el.removeClass(d).removeAttr(d)}},this),0)} 48Button.prototype.toggle=function(){var changed=true 49var $parent=this.$element.closest('[data-toggle="buttons"]') 50if($parent.length){var $input=this.$element.find('input') 51if($input.prop('type')=='radio'){if($input.prop('checked')&&this.$element.hasClass('active'))changed=false 52else $parent.find('.active').removeClass('active')}if(changed)$input.prop('checked',!this.$element.hasClass('active')).trigger('change')}else{this.$element.attr('aria-pressed',!this.$element.hasClass('active'))}if(changed)this.$element.toggleClass('active')} 53function Plugin(option){return this.each(function(){var $this=$(this) 54var data=$this.data('bs.button') 55var options=typeof option=='object'&&option 56if(!data)$this.data('bs.button',(data=new Button(this,options))) 57if(option=='toggle')data.toggle() 58else if(option)data.setState(option)})}var old=$.fn.button 59$.fn.button=Plugin 60$.fn.button.Constructor=Button 61$.fn.button.noConflict=function(){$.fn.button=old 62return this} 63$(document).on('click.bs.button.data-api','[data-toggle^="button"]',function(e){var $btn=$(e.target) 64if(!$btn.hasClass('btn'))$btn=$btn.closest('.btn') 65Plugin.call($btn,'toggle') 66e.preventDefault()}).on('focus.bs.button.data-api blur.bs.button.data-api','[data-toggle^="button"]',function(e){$(e.target).closest('.btn').toggleClass('focus',/^focus(in)?$/.test(e.type))})}(jQuery);+function($){'use strict';var Carousel=function(element,options){this.$element=$(element) 67this.$indicators=this.$element.find('.carousel-indicators') 68this.options=options 69this.paused=null 70this.sliding=null 71this.interval=null 72this.$active=null 73this.$items=null 74this.options.keyboard&&this.$element.on('keydown.bs.carousel',$.proxy(this.keydown,this)) 75this.options.pause=='hover'&&!('ontouchstart'in document.documentElement)&&this.$element.on('mouseenter.bs.carousel',$.proxy(this.pause,this)).on('mouseleave.bs.carousel',$.proxy(this.cycle,this))} 76Carousel.VERSION='3.3.4' 77Carousel.TRANSITION_DURATION=600 78Carousel.DEFAULTS={interval:5000,pause:'hover',wrap:true,keyboard:true} 79Carousel.prototype.keydown=function(e){if(/input|textarea/i.test(e.target.tagName))return 80switch(e.which){case 37:this.prev();break 81case 39:this.next();break 82default:return}e.preventDefault()} 83Carousel.prototype.cycle=function(e){e||(this.paused=false) 84this.interval&&clearInterval(this.interval) 85this.options.interval&&!this.paused&&(this.interval=setInterval($.proxy(this.next,this),this.options.interval)) 86return this} 87Carousel.prototype.getItemIndex=function(item){this.$items=item.parent().children('.item') 88return this.$items.index(item||this.$active)} 89Carousel.prototype.getItemForDirection=function(direction,active){var activeIndex=this.getItemIndex(active) 90var willWrap=(direction=='prev'&&activeIndex===0)||(direction=='next'&&activeIndex==(this.$items.length-1)) 91if(willWrap&&!this.options.wrap)return active 92var delta=direction=='prev'?-1:1 93var itemIndex=(activeIndex+delta)%this.$items.length 94return this.$items.eq(itemIndex)} 95Carousel.prototype.to=function(pos){var that=this 96var activeIndex=this.getItemIndex(this.$active=this.$element.find('.item.active')) 97if(pos>(this.$items.length-1)||pos<0)return 98if(this.sliding)return this.$element.one('slid.bs.carousel',function(){that.to(pos)}) 99if(activeIndex==pos)return this.pause().cycle() 100return this.slide(pos>activeIndex?'next':'prev',this.$items.eq(pos))} 101Carousel.prototype.pause=function(e){e||(this.paused=true) 102if(this.$element.find('.next, .prev').length&&$.support.transition){this.$element.trigger($.support.transition.end) 103this.cycle(true)}this.interval=clearInterval(this.interval) 104return this} 105Carousel.prototype.next=function(){if(this.sliding)return 106return this.slide('next')} 107Carousel.prototype.prev=function(){if(this.sliding)return 108return this.slide('prev')} 109Carousel.prototype.slide=function(type,next){var $active=this.$element.find('.item.active') 110var $next=next||this.getItemForDirection(type,$active) 111var isCycling=this.interval 112var direction=type=='next'?'left':'right' 113var that=this 114if($next.hasClass('active'))return(this.sliding=false) 115var relatedTarget=$next[0] 116var slideEvent=$.Event('slide.bs.carousel',{relatedTarget:relatedTarget,direction:direction}) 117this.$element.trigger(slideEvent) 118if(slideEvent.isDefaultPrevented())return 119this.sliding=true 120isCycling&&this.pause() 121if(this.$indicators.length){this.$indicators.find('.active').removeClass('active') 122var $nextIndicator=$(this.$indicators.children()[this.getItemIndex($next)]) 123$nextIndicator&&$nextIndicator.addClass('active')}var slidEvent=$.Event('slid.bs.carousel',{relatedTarget:relatedTarget,direction:direction}) 124if($.support.transition&&this.$element.hasClass('slide')){$next.addClass(type) 125$next[0].offsetWidth 126$active.addClass(direction) 127$next.addClass(direction) 128$active.one('bsTransitionEnd',function(){$next.removeClass([type,direction].join(' ')).addClass('active') 129$active.removeClass(['active',direction].join(' ')) 130that.sliding=false 131setTimeout(function(){that.$element.trigger(slidEvent)},0)}).emulateTransitionEnd(Carousel.TRANSITION_DURATION)}else{$active.removeClass('active') 132$next.addClass('active') 133this.sliding=false 134this.$element.trigger(slidEvent)}isCycling&&this.cycle() 135return this} 136function Plugin(option){return this.each(function(){var $this=$(this) 137var data=$this.data('bs.carousel') 138var options=$.extend({},Carousel.DEFAULTS,$this.data(),typeof option=='object'&&option) 139var action=typeof option=='string'?option:options.slide 140if(!data)$this.data('bs.carousel',(data=new Carousel(this,options))) 141if(typeof option=='number')data.to(option) 142else if(action)data[action]() 143else if(options.interval)data.pause().cycle()})}var old=$.fn.carousel 144$.fn.carousel=Plugin 145$.fn.carousel.Constructor=Carousel 146$.fn.carousel.noConflict=function(){$.fn.carousel=old 147return this} 148var clickHandler=function(e){var href 149var $this=$(this) 150var $target=$($this.attr('data-target')||(href=$this.attr('href'))&&href.replace(/.*(?=#[^\s]+$)/,'')) 151if(!$target.hasClass('carousel'))return 152var options=$.extend({},$target.data(),$this.data()) 153var slideIndex=$this.attr('data-slide-to') 154if(slideIndex)options.interval=false 155Plugin.call($target,options) 156if(slideIndex){$target.data('bs.carousel').to(slideIndex)}e.preventDefault()} 157$(document).on('click.bs.carousel.data-api','[data-slide]',clickHandler).on('click.bs.carousel.data-api','[data-slide-to]',clickHandler) 158$(window).on('load',function(){$('[data-ride="carousel"]').each(function(){var $carousel=$(this) 159Plugin.call($carousel,$carousel.data())})})}(jQuery);+function($){'use strict';var Collapse=function(element,options){this.$element=$(element) 160this.options=$.extend({},Collapse.DEFAULTS,options) 161this.$trigger=$('[data-toggle="collapse"][href="#'+element.id+'"],'+'[data-toggle="collapse"][data-target="#'+element.id+'"]') 162this.transitioning=null 163if(this.options.parent){this.$parent=this.getParent()}else{this.addAriaAndCollapsedClass(this.$element,this.$trigger)}if(this.options.toggle)this.toggle()} 164Collapse.VERSION='3.3.4' 165Collapse.TRANSITION_DURATION=350 166Collapse.DEFAULTS={toggle:true} 167Collapse.prototype.dimension=function(){var hasWidth=this.$element.hasClass('width') 168return hasWidth?'width':'height'} 169Collapse.prototype.show=function(){if(this.transitioning||this.$element.hasClass('in'))return 170var activesData 171var actives=this.$parent&&this.$parent.children('.panel').children('.in, .collapsing') 172if(actives&&actives.length){activesData=actives.data('bs.collapse') 173if(activesData&&activesData.transitioning)return}var startEvent=$.Event('show.bs.collapse') 174this.$element.trigger(startEvent) 175if(startEvent.isDefaultPrevented())return 176if(actives&&actives.length){Plugin.call(actives,'hide') 177activesData||actives.data('bs.collapse',null)}var dimension=this.dimension() 178this.$element.removeClass('collapse').addClass('collapsing')[dimension](0).attr('aria-expanded',true) 179this.$trigger.removeClass('collapsed').attr('aria-expanded',true) 180this.transitioning=1 181var complete=function(){this.$element.removeClass('collapsing').addClass('collapse in')[dimension]('') 182this.transitioning=0 183this.$element.trigger('shown.bs.collapse')} 184if(!$.support.transition)return complete.call(this) 185var scrollSize=$.camelCase(['scroll',dimension].join('-')) 186this.$element.one('bsTransitionEnd',$.proxy(complete,this)).emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize])} 187Collapse.prototype.hide=function(){if(this.transitioning||!this.$element.hasClass('in'))return 188var startEvent=$.Event('hide.bs.collapse') 189this.$element.trigger(startEvent) 190if(startEvent.isDefaultPrevented())return 191var dimension=this.dimension() 192this.$element[dimension](this.$element[dimension]())[0].offsetHeight 193this.$element.addClass('collapsing').removeClass('collapse in').attr('aria-expanded',false) 194this.$trigger.addClass('collapsed').attr('aria-expanded',false) 195this.transitioning=1 196var complete=function(){this.transitioning=0 197this.$element.removeClass('collapsing').addClass('collapse').trigger('hidden.bs.collapse')} 198if(!$.support.transition)return complete.call(this) 199this.$element 200[dimension](0).one('bsTransitionEnd',$.proxy(complete,this)).emulateTransitionEnd(Collapse.TRANSITION_DURATION)} 201Collapse.prototype.toggle=function(){this[this.$element.hasClass('in')?'hide':'show']()} 202Collapse.prototype.getParent=function(){return $(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each($.proxy(function(i,element){var $element=$(element) 203this.addAriaAndCollapsedClass(getTargetFromTrigger($element),$element)},this)).end()} 204Collapse.prototype.addAriaAndCollapsedClass=function($element,$trigger){var isOpen=$element.hasClass('in') 205$element.attr('aria-expanded',isOpen) 206$trigger.toggleClass('collapsed',!isOpen).attr('aria-expanded',isOpen)} 207function getTargetFromTrigger($trigger){var href 208var target=$trigger.attr('data-target')||(href=$trigger.attr('href'))&&href.replace(/.*(?=#[^\s]+$)/,'') 209return $(target)}function Plugin(option){return this.each(function(){var $this=$(this) 210var data=$this.data('bs.collapse') 211var options=$.extend({},Collapse.DEFAULTS,$this.data(),typeof option=='object'&&option) 212if(!data&&options.toggle&&/show|hide/.test(option))options.toggle=false 213if(!data)$this.data('bs.collapse',(data=new Collapse(this,options))) 214if(typeof option=='string')data[option]()})}var old=$.fn.collapse 215$.fn.collapse=Plugin 216$.fn.collapse.Constructor=Collapse 217$.fn.collapse.noConflict=function(){$.fn.collapse=old 218return this} 219$(document).on('click.bs.collapse.data-api','[data-toggle="collapse"]',function(e){var $this=$(this) 220if(!$this.attr('data-target'))e.preventDefault() 221var $target=getTargetFromTrigger($this) 222var data=$target.data('bs.collapse') 223var option=data?'toggle':$this.data() 224Plugin.call($target,option)})}(jQuery);+function($){'use strict';var backdrop='.dropdown-backdrop' 225var toggle='[data-toggle="dropdown"]' 226var Dropdown=function(element){$(element).on('click.bs.dropdown',this.toggle)} 227Dropdown.VERSION='3.3.4' 228Dropdown.prototype.toggle=function(e){var $this=$(this) 229if($this.is('.disabled, :disabled'))return 230var $parent=getParent($this) 231var isActive=$parent.hasClass('open') 232clearMenus() 233if(!isActive){if('ontouchstart'in document.documentElement&&!$parent.closest('.navbar-nav').length){$('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click',clearMenus)}var relatedTarget={relatedTarget:this} 234$parent.trigger(e=$.Event('show.bs.dropdown',relatedTarget)) 235if(e.isDefaultPrevented())return 236$this.trigger('focus').attr('aria-expanded','true') 237$parent.toggleClass('open').trigger('shown.bs.dropdown',relatedTarget)}return false} 238Dropdown.prototype.keydown=function(e){if(!/(38|40|27|32)/.test(e.which)||/input|textarea/i.test(e.target.tagName))return 239var $this=$(this) 240e.preventDefault() 241e.stopPropagation() 242if($this.is('.disabled, :disabled'))return 243var $parent=getParent($this) 244var isActive=$parent.hasClass('open') 245if((!isActive&&e.which!=27)||(isActive&&e.which==27)){if(e.which==27)$parent.find(toggle).trigger('focus') 246return $this.trigger('click')}var desc=' li:not(.disabled):visible a' 247var $items=$parent.find('[role="menu"]'+desc+', [role="listbox"]'+desc) 248if(!$items.length)return 249var index=$items.index(e.target) 250if(e.which==38&&index>0)index-- 251if(e.which==40&&index<$items.length-1)index++ 252if(!~index)index=0 253$items.eq(index).trigger('focus')} 254function clearMenus(e){if(e&&e.which===3)return 255$(backdrop).remove() 256$(toggle).each(function(){var $this=$(this) 257var $parent=getParent($this) 258var relatedTarget={relatedTarget:this} 259if(!$parent.hasClass('open'))return 260$parent.trigger(e=$.Event('hide.bs.dropdown',relatedTarget)) 261if(e.isDefaultPrevented())return 262$this.attr('aria-expanded','false') 263$parent.removeClass('open').trigger('hidden.bs.dropdown',relatedTarget)})}function getParent($this){var selector=$this.attr('data-target') 264if(!selector){selector=$this.attr('href') 265selector=selector&&/#[A-Za-z]/.test(selector)&&selector.replace(/.*(?=#[^\s]*$)/,'')}var $parent=selector&&$(selector) 266return $parent&&$parent.length?$parent:$this.parent()}function Plugin(option){return this.each(function(){var $this=$(this) 267var data=$this.data('bs.dropdown') 268if(!data)$this.data('bs.dropdown',(data=new Dropdown(this))) 269if(typeof option=='string')data[option].call($this)})}var old=$.fn.dropdown 270$.fn.dropdown=Plugin 271$.fn.dropdown.Constructor=Dropdown 272$.fn.dropdown.noConflict=function(){$.fn.dropdown=old 273return this} 274$(document).on('click.bs.dropdown.data-api',clearMenus).on('click.bs.dropdown.data-api','.dropdown form',function(e){e.stopPropagation()}).on('click.bs.dropdown.data-api',toggle,Dropdown.prototype.toggle).on('keydown.bs.dropdown.data-api',toggle,Dropdown.prototype.keydown).on('keydown.bs.dropdown.data-api','[role="menu"]',Dropdown.prototype.keydown).on('keydown.bs.dropdown.data-api','[role="listbox"]',Dropdown.prototype.keydown)}(jQuery);+function($){'use strict';var Modal=function(element,options){this.options=options 275this.$body=$(document.body) 276this.$element=$(element) 277this.$dialog=this.$element.find('.modal-dialog') 278this.$backdrop=null 279this.isShown=null 280this.originalBodyPad=null 281this.scrollbarWidth=0 282this.ignoreBackdropClick=false 283if(this.options.remote){this.$element.find('.modal-content').load(this.options.remote,$.proxy(function(){this.$element.trigger('loaded.bs.modal')},this))}} 284Modal.VERSION='3.3.4' 285Modal.TRANSITION_DURATION=300 286Modal.BACKDROP_TRANSITION_DURATION=150 287Modal.DEFAULTS={backdrop:true,keyboard:true,show:true} 288Modal.prototype.toggle=function(_relatedTarget){return this.isShown?this.hide():this.show(_relatedTarget)} 289Modal.prototype.show=function(_relatedTarget){var that=this 290var e=$.Event('show.bs.modal',{relatedTarget:_relatedTarget}) 291this.$element.trigger(e) 292if(this.isShown||e.isDefaultPrevented())return 293this.isShown=true 294this.checkScrollbar() 295this.setScrollbar() 296this.$body.addClass('modal-open') 297this.escape() 298this.resize() 299this.$element.on('click.dismiss.bs.modal','[data-dismiss="modal"]',$.proxy(this.hide,this)) 300this.$dialog.on('mousedown.dismiss.bs.modal',function(){that.$element.one('mouseup.dismiss.bs.modal',function(e){if($(e.target).is(that.$element))that.ignoreBackdropClick=true})}) 301this.backdrop(function(){var transition=$.support.transition&&that.$element.hasClass('fade') 302if(!that.$element.parent().length){that.$element.appendTo(that.$body)}that.$element.show().scrollTop(0) 303that.adjustDialog() 304if(transition){that.$element[0].offsetWidth}that.$element.addClass('in').attr('aria-hidden',false) 305that.enforceFocus() 306var e=$.Event('shown.bs.modal',{relatedTarget:_relatedTarget}) 307transition?that.$dialog.one('bsTransitionEnd',function(){that.$element.trigger('focus').trigger(e)}).emulateTransitionEnd(Modal.TRANSITION_DURATION):that.$element.trigger('focus').trigger(e)})} 308Modal.prototype.hide=function(e){if(e)e.preventDefault() 309e=$.Event('hide.bs.modal') 310this.$element.trigger(e) 311if(!this.isShown||e.isDefaultPrevented())return 312this.isShown=false 313this.escape() 314this.resize() 315$(document).off('focusin.bs.modal') 316this.$element.removeClass('in').attr('aria-hidden',true).off('click.dismiss.bs.modal').off('mouseup.dismiss.bs.modal') 317this.$dialog.off('mousedown.dismiss.bs.modal') 318$.support.transition&&this.$element.hasClass('fade')?this.$element.one('bsTransitionEnd',$.proxy(this.hideModal,this)).emulateTransitionEnd(Modal.TRANSITION_DURATION):this.hideModal()} 319Modal.prototype.enforceFocus=function(){$(document).off('focusin.bs.modal').on('focusin.bs.modal',$.proxy(function(e){if(this.$element[0]!==e.target&&!this.$element.has(e.target).length){this.$element.trigger('focus')}},this))} 320Modal.prototype.escape=function(){if(this.isShown&&this.options.keyboard){this.$element.on('keydown.dismiss.bs.modal',$.proxy(function(e){e.which==27&&this.hide()},this))}else if(!this.isShown){this.$element.off('keydown.dismiss.bs.modal')}} 321Modal.prototype.resize=function(){if(this.isShown){$(window).on('resize.bs.modal',$.proxy(this.handleUpdate,this))}else{$(window).off('resize.bs.modal')}} 322Modal.prototype.hideModal=function(){var that=this 323this.$element.hide() 324this.backdrop(function(){that.$body.removeClass('modal-open') 325that.resetAdjustments() 326that.resetScrollbar() 327that.$element.trigger('hidden.bs.modal')})} 328Modal.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove() 329this.$backdrop=null} 330Modal.prototype.backdrop=function(callback){var that=this 331var animate=this.$element.hasClass('fade')?'fade':'' 332if(this.isShown&&this.options.backdrop){var doAnimate=$.support.transition&&animate 333this.$backdrop=$('<div class="modal-backdrop '+animate+'" />').appendTo(this.$body) 334this.$element.on('click.dismiss.bs.modal',$.proxy(function(e){if(this.ignoreBackdropClick){this.ignoreBackdropClick=false 335return}if(e.target!==e.currentTarget)return 336this.options.backdrop=='static'?this.$element[0].focus():this.hide()},this)) 337if(doAnimate)this.$backdrop[0].offsetWidth 338this.$backdrop.addClass('in') 339if(!callback)return 340doAnimate?this.$backdrop.one('bsTransitionEnd',callback).emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION):callback()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass('in') 341var callbackRemove=function(){that.removeBackdrop() 342callback&&callback()} 343$.support.transition&&this.$element.hasClass('fade')?this.$backdrop.one('bsTransitionEnd',callbackRemove).emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION):callbackRemove()}else if(callback){callback()}} 344Modal.prototype.handleUpdate=function(){this.adjustDialog()} 345Modal.prototype.adjustDialog=function(){var modalIsOverflowing=this.$element[0].scrollHeight>document.documentElement.clientHeight 346this.$element.css({paddingLeft:!this.bodyIsOverflowing&&modalIsOverflowing?this.scrollbarWidth:'',paddingRight:this.bodyIsOverflowing&&!modalIsOverflowing?this.scrollbarWidth:''})} 347Modal.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:'',paddingRight:''})} 348Modal.prototype.checkScrollbar=function(){var fullWindowWidth=window.innerWidth 349if(!fullWindowWidth){var documentElementRect=document.documentElement.getBoundingClientRect() 350fullWindowWidth=documentElementRect.right-Math.abs(documentElementRect.left)}this.bodyIsOverflowing=document.body.clientWidth<fullWindowWidth 351this.scrollbarWidth=this.measureScrollbar()} 352Modal.prototype.setScrollbar=function(){var bodyPad=parseInt((this.$body.css('padding-right')||0),10) 353this.originalBodyPad=document.body.style.paddingRight||'' 354if(this.bodyIsOverflowing)this.$body.css('padding-right',bodyPad+this.scrollbarWidth)} 355Modal.prototype.resetScrollbar=function(){this.$body.css('padding-right',this.originalBodyPad)} 356Modal.prototype.measureScrollbar=function(){var scrollDiv=document.createElement('div') 357scrollDiv.className='modal-scrollbar-measure' 358this.$body.append(scrollDiv) 359var scrollbarWidth=scrollDiv.offsetWidth-scrollDiv.clientWidth 360this.$body[0].removeChild(scrollDiv) 361return scrollbarWidth} 362function Plugin(option,_relatedTarget){return this.each(function(){var $this=$(this) 363var data=$this.data('bs.modal') 364var options=$.extend({},Modal.DEFAULTS,$this.data(),typeof option=='object'&&option) 365if(!data)$this.data('bs.modal',(data=new Modal(this,options))) 366if(typeof option=='string')data[option](_relatedTarget) 367else if(options.show)data.show(_relatedTarget)})}var old=$.fn.modal 368$.fn.modal=Plugin 369$.fn.modal.Constructor=Modal 370$.fn.modal.noConflict=function(){$.fn.modal=old 371return this} 372$(document).on('click.bs.modal.data-api','[data-toggle="modal"]',function(e){var $this=$(this) 373var href=$this.attr('href') 374var $target=$($this.attr('data-target')||(href&&href.replace(/.*(?=#[^\s]+$)/,''))) 375var option=$target.data('bs.modal')?'toggle':$.extend({remote:!/#/.test(href)&&href},$target.data(),$this.data()) 376if($this.is('a'))e.preventDefault() 377$target.one('show.bs.modal',function(showEvent){if(showEvent.isDefaultPrevented())return 378$target.one('hidden.bs.modal',function(){$this.is(':visible')&&$this.trigger('focus')})}) 379Plugin.call($target,option,this)})}(jQuery);+function($){'use strict';var Tooltip=function(element,options){this.type=null 380this.options=null 381this.enabled=null 382this.timeout=null 383this.hoverState=null 384this.$element=null 385this.init('tooltip',element,options)} 386Tooltip.VERSION='3.3.4' 387Tooltip.TRANSITION_DURATION=150 388Tooltip.DEFAULTS={animation:true,placement:'top',selector:false,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:'hover focus',title:'',delay:0,html:false,container:false,viewport:{selector:'body',padding:0}} 389Tooltip.prototype.init=function(type,element,options){this.enabled=true 390this.type=type 391this.$element=$(element) 392this.options=this.getOptions(options) 393this.$viewport=this.options.viewport&&$(this.options.viewport.selector||this.options.viewport) 394if(this.$element[0]instanceof document.constructor&&!this.options.selector){throw new Error('`selector` option must be specified when initializing '+this.type+' on the window.document object!')}var triggers=this.options.trigger.split(' ') 395for(var i=triggers.length;i--;){var trigger=triggers[i] 396if(trigger=='click'){this.$element.on('click.'+this.type,this.options.selector,$.proxy(this.toggle,this))}else if(trigger!='manual'){var eventIn=trigger=='hover'?'mouseenter':'focusin' 397var eventOut=trigger=='hover'?'mouseleave':'focusout' 398this.$element.on(eventIn+'.'+this.type,this.options.selector,$.proxy(this.enter,this)) 399this.$element.on(eventOut+'.'+this.type,this.options.selector,$.proxy(this.leave,this))}}this.options.selector?(this._options=$.extend({},this.options,{trigger:'manual',selector:''})):this.fixTitle()} 400Tooltip.prototype.getDefaults=function(){return Tooltip.DEFAULTS} 401Tooltip.prototype.getOptions=function(options){options=$.extend({},this.getDefaults(),this.$element.data(),options) 402if(options.delay&&typeof options.delay=='number'){options.delay={show:options.delay,hide:options.delay}}return options} 403Tooltip.prototype.getDelegateOptions=function(){var options={} 404var defaults=this.getDefaults() 405this._options&&$.each(this._options,function(key,value){if(defaults[key]!=value)options[key]=value}) 406return options} 407Tooltip.prototype.enter=function(obj){var self=obj instanceof this.constructor?obj:$(obj.currentTarget).data('bs.'+this.type) 408if(self&&self.$tip&&self.$tip.is(':visible')){self.hoverState='in' 409return}if(!self){self=new this.constructor(obj.currentTarget,this.getDelegateOptions()) 410$(obj.currentTarget).data('bs.'+this.type,self)}clearTimeout(self.timeout) 411self.hoverState='in' 412if(!self.options.delay||!self.options.delay.show)return self.show() 413self.timeout=setTimeout(function(){if(self.hoverState=='in')self.show()},self.options.delay.show)} 414Tooltip.prototype.leave=function(obj){var self=obj instanceof this.constructor?obj:$(obj.currentTarget).data('bs.'+this.type) 415if(!self){self=new this.constructor(obj.currentTarget,this.getDelegateOptions()) 416$(obj.currentTarget).data('bs.'+this.type,self)}clearTimeout(self.timeout) 417self.hoverState='out' 418if(!self.options.delay||!self.options.delay.hide)return self.hide() 419self.timeout=setTimeout(function(){if(self.hoverState=='out')self.hide()},self.options.delay.hide)} 420Tooltip.prototype.show=function(){var e=$.Event('show.bs.'+this.type) 421if(this.hasContent()&&this.enabled){this.$element.trigger(e) 422var inDom=$.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]) 423if(e.isDefaultPrevented()||!inDom)return 424var that=this 425var $tip=this.tip() 426var tipId=this.getUID(this.type) 427this.setContent() 428$tip.attr('id',tipId) 429this.$element.attr('aria-describedby',tipId) 430if(this.options.animation)$tip.addClass('fade') 431var placement=typeof this.options.placement=='function'?this.options.placement.call(this,$tip[0],this.$element[0]):this.options.placement 432var autoToken=/\s?auto?\s?/i 433var autoPlace=autoToken.test(placement) 434if(autoPlace)placement=placement.replace(autoToken,'')||'top' 435$tip.detach().css({top:0,left:0,display:'block'}).addClass(placement).data('bs.'+this.type,this) 436this.options.container?$tip.appendTo(this.options.container):$tip.insertAfter(this.$element) 437var pos=this.getPosition() 438var actualWidth=$tip[0].offsetWidth 439var actualHeight=$tip[0].offsetHeight 440if(autoPlace){var orgPlacement=placement 441var $container=this.options.container?$(this.options.container):this.$element.parent() 442var containerDim=this.getPosition($container) 443placement=placement=='bottom'&&pos.bottom+actualHeight>containerDim.bottom?'top':placement=='top'&&pos.top-actualHeight<containerDim.top?'bottom':placement=='right'&&pos.right+actualWidth>containerDim.width?'left':placement=='left'&&pos.left-actualWidth<containerDim.left?'right':placement 444$tip.removeClass(orgPlacement).addClass(placement)}var calculatedOffset=this.getCalculatedOffset(placement,pos,actualWidth,actualHeight) 445this.applyPlacement(calculatedOffset,placement) 446var complete=function(){var prevHoverState=that.hoverState 447that.$element.trigger('shown.bs.'+that.type) 448that.hoverState=null 449if(prevHoverState=='out')that.leave(that)} 450$.support.transition&&this.$tip.hasClass('fade')?$tip.one('bsTransitionEnd',complete).emulateTransitionEnd(Tooltip.TRANSITION_DURATION):complete()}} 451Tooltip.prototype.applyPlacement=function(offset,placement){var $tip=this.tip() 452var width=$tip[0].offsetWidth 453var height=$tip[0].offsetHeight 454var marginTop=parseInt($tip.css('margin-top'),10) 455var marginLeft=parseInt($tip.css('margin-left'),10) 456if(isNaN(marginTop))marginTop=0 457if(isNaN(marginLeft))marginLeft=0 458offset.top=offset.top+marginTop 459offset.left=offset.left+marginLeft 460$.offset.setOffset($tip[0],$.extend({using:function(props){$tip.css({top:Math.round(props.top),left:Math.round(props.left)})}},offset),0) 461$tip.addClass('in') 462var actualWidth=$tip[0].offsetWidth 463var actualHeight=$tip[0].offsetHeight 464if(placement=='top'&&actualHeight!=height){offset.top=offset.top+height-actualHeight}var delta=this.getViewportAdjustedDelta(placement,offset,actualWidth,actualHeight) 465if(delta.left)offset.left+=delta.left 466else offset.top+=delta.top 467var isVertical=/top|bottom/.test(placement) 468var arrowDelta=isVertical?delta.left*2-width+actualWidth:delta.top*2-height+actualHeight 469var arrowOffsetPosition=isVertical?'offsetWidth':'offsetHeight' 470$tip.offset(offset) 471this.replaceArrow(arrowDelta,$tip[0][arrowOffsetPosition],isVertical)} 472Tooltip.prototype.replaceArrow=function(delta,dimension,isVertical){this.arrow().css(isVertical?'left':'top',50*(1-delta/dimension)+'%').css(isVertical?'top':'left','')} 473Tooltip.prototype.setContent=function(){var $tip=this.tip() 474var title=this.getTitle() 475$tip.find('.tooltip-inner')[this.options.html?'html':'text'](title) 476$tip.removeClass('fade in top bottom left right')} 477Tooltip.prototype.hide=function(callback){var that=this 478var $tip=$(this.$tip) 479var e=$.Event('hide.bs.'+this.type) 480function complete(){if(that.hoverState!='in')$tip.detach() 481that.$element.removeAttr('aria-describedby').trigger('hidden.bs.'+that.type) 482callback&&callback()}this.$element.trigger(e) 483if(e.isDefaultPrevented())return 484$tip.removeClass('in') 485$.support.transition&&$tip.hasClass('fade')?$tip.one('bsTransitionEnd',complete).emulateTransitionEnd(Tooltip.TRANSITION_DURATION):complete() 486this.hoverState=null 487return this} 488Tooltip.prototype.fixTitle=function(){var $e=this.$element 489if($e.attr('title')||typeof($e.attr('data-original-title'))!='string'){$e.attr('data-original-title',$e.attr('title')||'').attr('title','')}} 490Tooltip.prototype.hasContent=function(){return this.getTitle()} 491Tooltip.prototype.getPosition=function($element){$element=$element||this.$element 492var el=$element[0] 493var isBody=el.tagName=='BODY' 494var elRect=el.getBoundingClientRect() 495if(elRect.width==null){elRect=$.extend({},elRect,{width:elRect.right-elRect.left,height:elRect.bottom-elRect.top})}var elOffset=isBody?{top:0,left:0}:$element.offset() 496var scroll={scroll:isBody?document.documentElement.scrollTop||document.body.scrollTop:$element.scrollTop()} 497var outerDims=isBody?{width:$(window).width(),height:$(window).height()}:null 498return $.extend({},elRect,scroll,outerDims,elOffset)} 499Tooltip.prototype.getCalculatedOffset=function(placement,pos,actualWidth,actualHeight){return placement=='bottom'?{top:pos.top+pos.height,left:pos.left+pos.width/2-actualWidth/2}:placement=='top'?{top:pos.top-actualHeight,left:pos.left+pos.width/2-actualWidth/2}:placement=='left'?{top:pos.top+pos.height/2-actualHeight/2,left:pos.left-actualWidth}:{top:pos.top+pos.height/2-actualHeight/2,left:pos.left+pos.width}} 500Tooltip.prototype.getViewportAdjustedDelta=function(placement,pos,actualWidth,actualHeight){var delta={top:0,left:0} 501if(!this.$viewport)return delta 502var viewportPadding=this.options.viewport&&this.options.viewport.padding||0 503var viewportDimensions=this.getPosition(this.$viewport) 504if(/right|left/.test(placement)){var topEdgeOffset=pos.top-viewportPadding-viewportDimensions.scroll 505var bottomEdgeOffset=pos.top+viewportPadding-viewportDimensions.scroll+actualHeight 506if(topEdgeOffset<viewportDimensions.top){delta.top=viewportDimensions.top-topEdgeOffset}else if(bottomEdgeOffset>viewportDimensions.top+viewportDimensions.height){delta.top=viewportDimensions.top+viewportDimensions.height-bottomEdgeOffset}}else{var leftEdgeOffset=pos.left-viewportPadding 507var rightEdgeOffset=pos.left+viewportPadding+actualWidth 508if(leftEdgeOffset<viewportDimensions.left){delta.left=viewportDimensions.left-leftEdgeOffset}else if(rightEdgeOffset>viewportDimensions.width){delta.left=viewportDimensions.left+viewportDimensions.width-rightEdgeOffset}}return delta} 509Tooltip.prototype.getTitle=function(){var title 510var $e=this.$element 511var o=this.options 512title=$e.attr('data-original-title')||(typeof o.title=='function'?o.title.call($e[0]):o.title) 513return title} 514Tooltip.prototype.getUID=function(prefix){do prefix+=~~(Math.random()*1000000) 515while(document.getElementById(prefix))return prefix} 516Tooltip.prototype.tip=function(){return(this.$tip=this.$tip||$(this.options.template))} 517Tooltip.prototype.arrow=function(){return(this.$arrow=this.$arrow||this.tip().find('.tooltip-arrow'))} 518Tooltip.prototype.enable=function(){this.enabled=true} 519Tooltip.prototype.disable=function(){this.enabled=false} 520Tooltip.prototype.toggleEnabled=function(){this.enabled=!this.enabled} 521Tooltip.prototype.toggle=function(e){var self=this 522if(e){self=$(e.currentTarget).data('bs.'+this.type) 523if(!self){self=new this.constructor(e.currentTarget,this.getDelegateOptions()) 524$(e.currentTarget).data('bs.'+this.type,self)}}self.tip().hasClass('in')?self.leave(self):self.enter(self)} 525Tooltip.prototype.destroy=function(){var that=this 526clearTimeout(this.timeout) 527this.hide(function(){that.$element.off('.'+that.type).removeData('bs.'+that.type)})} 528function Plugin(option){return this.each(function(){var $this=$(this) 529var data=$this.data('bs.tooltip') 530var options=typeof option=='object'&&option 531if(!data&&/destroy|hide/.test(option))return 532if(!data)$this.data('bs.tooltip',(data=new Tooltip(this,options))) 533if(typeof option=='string')data[option]()})}var old=$.fn.tooltip 534$.fn.tooltip=Plugin 535$.fn.tooltip.Constructor=Tooltip 536$.fn.tooltip.noConflict=function(){$.fn.tooltip=old 537return this}}(jQuery);+function($){'use strict';var Popover=function(element,options){this.init('popover',element,options)} 538if(!$.fn.tooltip)throw new Error('Popover requires tooltip.js') 539Popover.VERSION='3.3.4' 540Popover.DEFAULTS=$.extend({},$.fn.tooltip.Constructor.DEFAULTS,{placement:'right',trigger:'click',content:'',template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}) 541Popover.prototype=$.extend({},$.fn.tooltip.Constructor.prototype) 542Popover.prototype.constructor=Popover 543Popover.prototype.getDefaults=function(){return Popover.DEFAULTS} 544Popover.prototype.setContent=function(){var $tip=this.tip() 545var title=this.getTitle() 546var content=this.getContent() 547$tip.find('.popover-title')[this.options.html?'html':'text'](title) 548$tip.find('.popover-content').children().detach().end()[this.options.html?(typeof content=='string'?'html':'append'):'text'](content) 549$tip.removeClass('fade top bottom left right in') 550if(!$tip.find('.popover-title').html())$tip.find('.popover-title').hide()} 551Popover.prototype.hasContent=function(){return this.getTitle()||this.getContent()} 552Popover.prototype.getContent=function(){var $e=this.$element 553var o=this.options 554return $e.attr('data-content')||(typeof o.content=='function'?o.content.call($e[0]):o.content)} 555Popover.prototype.arrow=function(){return(this.$arrow=this.$arrow||this.tip().find('.arrow'))} 556function Plugin(option){return this.each(function(){var $this=$(this) 557var data=$this.data('bs.popover') 558var options=typeof option=='object'&&option 559if(!data&&/destroy|hide/.test(option))return 560if(!data)$this.data('bs.popover',(data=new Popover(this,options))) 561if(typeof option=='string')data[option]()})}var old=$.fn.popover 562$.fn.popover=Plugin 563$.fn.popover.Constructor=Popover 564$.fn.popover.noConflict=function(){$.fn.popover=old 565return this}}(jQuery);+function($){'use strict';function ScrollSpy(element,options){this.$body=$(document.body) 566this.$scrollElement=$(element).is(document.body)?$(window):$(element) 567this.options=$.extend({},ScrollSpy.DEFAULTS,options) 568this.selector=(this.options.target||'')+' .nav li > a' 569this.offsets=[] 570this.targets=[] 571this.activeTarget=null 572this.scrollHeight=0 573this.$scrollElement.on('scroll.bs.scrollspy',$.proxy(this.process,this)) 574this.refresh() 575this.process()}ScrollSpy.VERSION='3.3.4' 576ScrollSpy.DEFAULTS={offset:10} 577ScrollSpy.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)} 578ScrollSpy.prototype.refresh=function(){var that=this 579var offsetMethod='offset' 580var offsetBase=0 581this.offsets=[] 582this.targets=[] 583this.scrollHeight=this.getScrollHeight() 584if(!$.isWindow(this.$scrollElement[0])){offsetMethod='position' 585offsetBase=this.$scrollElement.scrollTop()}this.$body.find(this.selector).map(function(){var $el=$(this) 586var href=$el.data('target')||$el.attr('href') 587var $href=/^#./.test(href)&&$(href) 588return($href&&$href.length&&$href.is(':visible')&&[[$href[offsetMethod]().top+offsetBase,href]])||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){that.offsets.push(this[0]) 589that.targets.push(this[1])})} 590ScrollSpy.prototype.process=function(){var scrollTop=this.$scrollElement.scrollTop()+this.options.offset 591var scrollHeight=this.getScrollHeight() 592var maxScroll=this.options.offset+scrollHeight-this.$scrollElement.height() 593var offsets=this.offsets 594var targets=this.targets 595var activeTarget=this.activeTarget 596var i 597if(this.scrollHeight!=scrollHeight){this.refresh()}if(scrollTop>=maxScroll){return activeTarget!=(i=targets[targets.length-1])&&this.activate(i)}if(activeTarget&&scrollTop<offsets[0]){this.activeTarget=null 598return this.clear()}for(i=offsets.length;i--;){activeTarget!=targets[i]&&scrollTop>=offsets[i]&&(offsets[i+1]===undefined||scrollTop<offsets[i+1])&&this.activate(targets[i])}} 599ScrollSpy.prototype.activate=function(target){this.activeTarget=target 600this.clear() 601var selector=this.selector+'[data-target="'+target+'"],'+this.selector+'[href="'+target+'"]' 602var active=$(selector).parents('li').addClass('active') 603if(active.parent('.dropdown-menu').length){active=active.closest('li.dropdown').addClass('active')}active.trigger('activate.bs.scrollspy')} 604ScrollSpy.prototype.clear=function(){$(this.selector).parentsUntil(this.options.target,'.active').removeClass('active')} 605function Plugin(option){return this.each(function(){var $this=$(this) 606var data=$this.data('bs.scrollspy') 607var options=typeof option=='object'&&option 608if(!data)$this.data('bs.scrollspy',(data=new ScrollSpy(this,options))) 609if(typeof option=='string')data[option]()})}var old=$.fn.scrollspy 610$.fn.scrollspy=Plugin 611$.fn.scrollspy.Constructor=ScrollSpy 612$.fn.scrollspy.noConflict=function(){$.fn.scrollspy=old 613return this} 614$(window).on('load.bs.scrollspy.data-api',function(){$('[data-spy="scroll"]').each(function(){var $spy=$(this) 615Plugin.call($spy,$spy.data())})})}(jQuery);+function($){'use strict';var Tab=function(element){this.element=$(element)} 616Tab.VERSION='3.3.4' 617Tab.TRANSITION_DURATION=150 618Tab.prototype.show=function(){var $this=this.element 619var $ul=$this.closest('ul:not(.dropdown-menu)') 620var selector=$this.data('target') 621if(!selector){selector=$this.attr('href') 622selector=selector&&selector.replace(/.*(?=#[^\s]*$)/,'')}if($this.parent('li').hasClass('active'))return 623var $previous=$ul.find('.active:last a') 624var hideEvent=$.Event('hide.bs.tab',{relatedTarget:$this[0]}) 625var showEvent=$.Event('show.bs.tab',{relatedTarget:$previous[0]}) 626$previous.trigger(hideEvent) 627$this.trigger(showEvent) 628if(showEvent.isDefaultPrevented()||hideEvent.isDefaultPrevented())return 629var $target=$(selector) 630this.activate($this.closest('li'),$ul) 631this.activate($target,$target.parent(),function(){$previous.trigger({type:'hidden.bs.tab',relatedTarget:$this[0]}) 632$this.trigger({type:'shown.bs.tab',relatedTarget:$previous[0]})})} 633Tab.prototype.activate=function(element,container,callback){var $active=container.find('> .active') 634var transition=callback&&$.support.transition&&(($active.length&&$active.hasClass('fade'))||!!container.find('> .fade').length) 635function next(){$active.removeClass('active').find('> .dropdown-menu > .active').removeClass('active').end().find('[data-toggle="tab"]').attr('aria-expanded',false) 636element.addClass('active').find('[data-toggle="tab"]').attr('aria-expanded',true) 637if(transition){element[0].offsetWidth 638element.addClass('in')}else{element.removeClass('fade')}if(element.parent('.dropdown-menu').length){element.closest('li.dropdown').addClass('active').end().find('[data-toggle="tab"]').attr('aria-expanded',true)}callback&&callback()}$active.length&&transition?$active.one('bsTransitionEnd',next).emulateTransitionEnd(Tab.TRANSITION_DURATION):next() 639$active.removeClass('in')} 640function Plugin(option){return this.each(function(){var $this=$(this) 641var data=$this.data('bs.tab') 642if(!data)$this.data('bs.tab',(data=new Tab(this))) 643if(typeof option=='string')data[option]()})}var old=$.fn.tab 644$.fn.tab=Plugin 645$.fn.tab.Constructor=Tab 646$.fn.tab.noConflict=function(){$.fn.tab=old 647return this} 648var clickHandler=function(e){e.preventDefault() 649Plugin.call($(this),'show')} 650$(document).on('click.bs.tab.data-api','[data-toggle="tab"]',clickHandler).on('click.bs.tab.data-api','[data-toggle="pill"]',clickHandler)}(jQuery);+function($){'use strict';var Affix=function(element,options){this.options=$.extend({},Affix.DEFAULTS,options) 651this.$target=$(this.options.target).on('scroll.bs.affix.data-api',$.proxy(this.checkPosition,this)).on('click.bs.affix.data-api',$.proxy(this.checkPositionWithEventLoop,this)) 652this.$element=$(element) 653this.affixed=null 654this.unpin=null 655this.pinnedOffset=null 656this.checkPosition()} 657Affix.VERSION='3.3.4' 658Affix.RESET='affix affix-top affix-bottom' 659Affix.DEFAULTS={offset:0,target:window} 660Affix.prototype.getState=function(scrollHeight,height,offsetTop,offsetBottom){var scrollTop=this.$target.scrollTop() 661var position=this.$element.offset() 662var targetHeight=this.$target.height() 663if(offsetTop!=null&&this.affixed=='top')return scrollTop<offsetTop?'top':false 664if(this.affixed=='bottom'){if(offsetTop!=null)return(scrollTop+this.unpin<=position.top)?false:'bottom' 665return(scrollTop+targetHeight<=scrollHeight-offsetBottom)?false:'bottom'}var initializing=this.affixed==null 666var colliderTop=initializing?scrollTop:position.top 667var colliderHeight=initializing?targetHeight:height 668if(offsetTop!=null&&scrollTop<=offsetTop)return'top' 669if(offsetBottom!=null&&(colliderTop+colliderHeight>=scrollHeight-offsetBottom))return'bottom' 670return false} 671Affix.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset 672this.$element.removeClass(Affix.RESET).addClass('affix') 673var scrollTop=this.$target.scrollTop() 674var position=this.$element.offset() 675return(this.pinnedOffset=position.top-scrollTop)} 676Affix.prototype.checkPositionWithEventLoop=function(){setTimeout($.proxy(this.checkPosition,this),1)} 677Affix.prototype.checkPosition=function(){if(!this.$element.is(':visible'))return 678var height=this.$element.height() 679var offset=this.options.offset 680var offsetTop=offset.top 681var offsetBottom=offset.bottom 682var scrollHeight=$(document.body).height() 683if(typeof offset!='object')offsetBottom=offsetTop=offset 684if(typeof offsetTop=='function')offsetTop=offset.top(this.$element) 685if(typeof offsetBottom=='function')offsetBottom=offset.bottom(this.$element) 686var affix=this.getState(scrollHeight,height,offsetTop,offsetBottom) 687if(this.affixed!=affix){if(this.unpin!=null)this.$element.css('top','') 688var affixType='affix'+(affix?'-'+affix:'') 689var e=$.Event(affixType+'.bs.affix') 690this.$element.trigger(e) 691if(e.isDefaultPrevented())return 692this.affixed=affix 693this.unpin=affix=='bottom'?this.getPinnedOffset():null 694this.$element.removeClass(Affix.RESET).addClass(affixType).trigger(affixType.replace('affix','affixed')+'.bs.affix')}if(affix=='bottom'){this.$element.offset({top:scrollHeight-height-offsetBottom})}} 695function Plugin(option){return this.each(function(){var $this=$(this) 696var data=$this.data('bs.affix') 697var options=typeof option=='object'&&option 698if(!data)$this.data('bs.affix',(data=new Affix(this,options))) 699if(typeof option=='string')data[option]()})}var old=$.fn.affix 700$.fn.affix=Plugin 701$.fn.affix.Constructor=Affix 702$.fn.affix.noConflict=function(){$.fn.affix=old 703return this} 704$(window).on('load',function(){$('[data-spy="affix"]').each(function(){var $spy=$(this) 705var data=$spy.data() 706data.offset=data.offset||{} 707if(data.offsetBottom!=null)data.offset.bottom=data.offsetBottom 708if(data.offsetTop!=null)data.offset.top=data.offsetTop 709Plugin.call($spy,data)})})}(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.