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