2603 lines
534 KiB
JavaScript
2603 lines
534 KiB
JavaScript
var _extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(e,t){"object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.LazyLoad=t()}(this,function(){"use strict";var e={elements_selector:"img",container:document,threshold:300,data_src:"src",data_srcset:"srcset",class_loading:"loading",class_loaded:"loaded",class_error:"error",callback_load:null,callback_error:null,callback_set:null},t=function(e,t){return e.getAttribute("data-"+t)},n=function(e,t,n){return e.setAttribute("data-"+t,n)},r=function(e){return e.filter(function(e){return!t(e,"was-processed")})},s=function(e,t){var n=new e(t),r=new CustomEvent("LazyLoad::Initialized",{detail:{instance:n}});window.dispatchEvent(r)},o=function(e,n){var r=n.data_srcset,s=e.parentElement;if("PICTURE"===s.tagName)for(var o,a=0;o=s.children[a];a+=1)if("SOURCE"===o.tagName){var i=t(o,r);i&&o.setAttribute("srcset",i)}},a=function(e,n){var r=n.data_src,s=n.data_srcset,a=e.tagName,i=t(e,r);if("IMG"===a){o(e,n);var c=t(e,s);return c&&e.setAttribute("srcset",c),void(i&&e.setAttribute("src",i))}"IFRAME"!==a?i&&(e.style.backgroundImage='url("'+i+'")'):i&&e.setAttribute("src",i)},i=!!document.body.classList,c=function(e,t){i?e.classList.add(t):e.className+=(e.className?" ":"")+t},l=function(e,t){i?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\s+)"+t+"(\\s+|$)")," ").replace(/^\s+/,"").replace(/\s+$/,"")},u=function(e,t){e&&e(t)},f=function(e,t,n){e.removeEventListener("load",t),e.removeEventListener("error",n)},d=function(e,t){var n=function n(s){_(s,!0,t),f(e,n,r)},r=function r(s){_(s,!1,t),f(e,n,r)};e.addEventListener("load",n),e.addEventListener("error",r)},_=function(e,t,n){var r=e.target;l(r,n.class_loading),c(r,t?n.class_loaded:n.class_error),u(t?n.callback_load:n.callback_error,r)},v=function(e,t){["IMG","IFRAME"].indexOf(e.tagName)>-1&&(d(e,t),c(e,t.class_loading)),a(e,t),n(e,"was-processed",!0),u(t.callback_set,e)},m=function(t,n){this._settings=_extends({},e,t),this._setObserver(),this.update(n)};m.prototype={_setObserver:function(){var e=this;if("IntersectionObserver"in window){var t=this._settings;this._observer=new IntersectionObserver(function(n){n.forEach(function(n){if(n.intersectionRatio>0){var r=n.target;v(r,t),e._observer.unobserve(r)}}),e._elements=r(e._elements)},{root:t.container===document?null:t.container,rootMargin:t.threshold+"px"})}},update:function(e){var t=this,n=this._settings,s=e||n.container.querySelectorAll(n.elements_selector);this._elements=r(Array.prototype.slice.call(s)),this._observer?this._elements.forEach(function(e){t._observer.observe(e)}):(this._elements.forEach(function(e){v(e,n)}),this._elements=r(this._elements))},destroy:function(){var e=this;this._observer&&(r(this._elements).forEach(function(t){e._observer.unobserve(t)}),this._observer=null),this._elements=null,this._settings=null}};var b=window.lazyLoadOptions;return b&&function(e,t){if(t.length)for(var n,r=0;n=t[r];r+=1)s(e,n);else s(e,t)}(m,b),m});(function(modules){var installedModules={};function __webpack_require__(moduleId){if(installedModules[moduleId])
|
||
return installedModules[moduleId].exports;var module=installedModules[moduleId]={exports:{},id:moduleId,loaded:false};modules[moduleId].call(module.exports,module,module.exports,__webpack_require__);module.loaded=true;return module.exports;}
|
||
__webpack_require__.m=modules;__webpack_require__.c=installedModules;__webpack_require__.p="";return __webpack_require__(0);})
|
||
([(function(module,exports,__webpack_require__){(function($,jQuery){'use strict';__webpack_require__(2);__webpack_require__(3);__webpack_require__(7);__webpack_require__(8);var Flickity=__webpack_require__(21);__webpack_require__(42);__webpack_require__(43);__webpack_require__(44);__webpack_require__(45);var globals=__webpack_require__(48);var gallery=__webpack_require__(49);$(window).on('load',function(){$("body").removeClass("preload");});$(document).ready(function(){initAll();});window.initAll=function(){globals.handleResponsiveCollapsing().init();globals.animateMainNavigation();globals.initScrollToBottomLinks();globals.initScrollToTopLinks();globals.initScrollToSectionLinks();globals.initFilterlistByText();initGallery();mPopup();setActiveBranche();openActiveParentNav();closeBranchenNav();chosenSelect();branchenNavTitle();scrollToBzk();bodyBottom();initializeGlobalSearch();initBranchenSearch();openMainNav();mobileCopyright();switchTabPanel();areaDropdown();toggleMeinWKONav();moveMeinWKO();ellipsisText($('.ad-overview .overview__descripton'),200);$('.ad-overview .show-more-link').on('click',function(){setTimeout(function(){ellipsisText($('.ad-overview .overview__descripton'),200);},100);});if($('body').hasClass('intranet')){if(typeof Aloha=="undefined"){img2svg();}
|
||
$(window).resize(function(){if($('#appbar ul').height()>$('#page-content').height()){$('#page-content .tfn').css('min-height',($('#appbar ul').height()-$('#page-content header').height()-$('#page-content nav').height()+10)+'px');}}).resize();toggleAppbar();editFeeds();initializeContactSearch();ellipsisText($('.intranet .myfeed article h3 > .news-item__short__link'),60);ellipsisText($('.intranet .myfeed article h3 + .news-item__short__link'),140);$('.selected-feeds .btn').on('click',function(){setTimeout(function(){ellipsisText($('.intranet .myfeed article h3 > .news-item__short__link'),60);ellipsisText($('.intranet .myfeed article h3 + .news-item__short__link'),140);},100);});if($('body').hasClass('inhouse')){initComments();}
|
||
pauseVideo();if($('.intranet .gallery-news .flickity-slider > .gallery-news__item').length==1){$('.intranet .gallery-news .flickity-page-dots, .intranet .gallery-news > button').hide();}}
|
||
eventsEqualHeight();var aussenwirtschaftLogo=document.querySelectorAll('svg.icon-wko-aussenwirtschaft.l-channel__header__icon')[0];if(aussenwirtschaftLogo){aussenwirtschaftLogo.setAttribute('viewBox','0 0 1440 1024')}
|
||
initPlyr();collapseAll();openPanelUrl();$('.panel-primary__info-close').on('click',function(){$(this).closest('.panel-primary__info').remove();});};window.mobileCopyright=function(){if($(window).width()<992){$('.teaser__image, .news-item--image').each(function(){var attrtitle=$(this).children('a').find('img').attr('title');if(!$(this).hasClass('top-story')){if(attrtitle&&attrtitle!==undefined&&attrtitle!==false&&attrtitle!==""){$(this).children('a').append("<span class='figcation-credit'>"+attrtitle+"</span>");}
|
||
if(!$(this).find('.figcation-credit').length){var attrtitle=$(this).find('img').attr('title');if(attrtitle&&attrtitle!==undefined&&attrtitle!==false&&attrtitle!==""){$(this).append("<span class='figcation-credit'>"+attrtitle+"</span>");}}}});$('.news-item--image.top-story').each(function(){$(this).find('a').find('img').parent('a').addClass('top-story__image');var attrtitle=$(this).find('a').find('img').attr('title');if(attrtitle&&attrtitle!==undefined&&attrtitle!==false&&attrtitle!==""){$(this).find('a.top-story__image').append("<span class='figcation-credit'>"+attrtitle+"</span>");}});$('.opinion__img').each(function(){var attrtitle=$(this).attr('title');if(attrtitle&&attrtitle!==undefined&&attrtitle!==false&&attrtitle!==""){$(this).parent('div').append("<span class='figcation-credit'>"+$(this).attr('title')+"</span>");}});}};window.branchenNavTitle=function(){$('#nav-branche .nav-collapsed-group__title > a').text('Navigation');};window.scrollToBzk=function(){$('#header-contact .link-list--half-width li').on('click',function(){$('html, body').animate({scrollTop:$("#header-contact .col-md-4:nth-child(3)").offset().top},1000);});};window.bodyBottom=function(){if($('#select-area-info').not(':hidden')){$('body').css('padding-bottom',$('#select-area-info').outerHeight());}
|
||
$(window).on("mousemove vmousemove",function(){if($('#select-area-info').is(':hidden')){$('body').css('padding-bottom','0');}});};window.setActiveBranche=function(){$('.choose-branche div[id^="choose-branche-"] ul > li > a').on('click',function(){$(this).closest("li").addClass("active").siblings().removeClass("active");});};window.openActiveParentNav=function(){$('.no-area .l-channel #branchennavigation-menu').on('show.bs.collapse',function(){$('.l-channel #branchennavigation-menu ul li span.active').closest('ul').addClass('in').attr('aria-expanded','true').css('height','auto').parent('li').children('a').attr('aria-expanded','true').removeClass('collapsed');});};window.closeBranchenNav=function(){$('.nav-collapsed-group a.collapsed, .nav-collapsed-group a.active').click(function(){$(this).parent().siblings().find('.collapse.in').removeClass('in').attr("aria-expanded","false");$(this).parent().siblings().find('[data-toggle="collapse"]').attr("aria-expanded","false");});$(document).click(function(e){if($('.nav-collapsed-group .collapse').hasClass('in')&&$(e.target).closest('.nav-collapsed-group').length===0){$('.nav-collapsed-group [data-toggle="collapse"]').attr("aria-expanded","false");$('.nav-collapsed-group .collapse.in').animate({height:"0px"},150,function(){$('.collapse.in').removeClass('in').attr("aria-expanded","false");});}});};window.initGallery=function(){gallery('.photoswipe-gallery:not(.init-gallery)');$('.photoswipe-gallery:not(.init-gallery)').addClass('init-gallery');$('.gallery-nav:not(.init-gallery-nav)').each(function(){this.addClass('init-gallery-nav');});$('.gallery-news:not(.init-gallery-news)').each(function(){$(this).addClass('init-gallery-news');var $that=$(this);var flkty=new Flickity(this,$that.data('flickityOptions'));activeNavItem();flkty.on('settle',activeNavItem);setTimeout(function(){flkty.resize();flkty.reposition();},1000);function activeNavItem(){$that.closest('.gallery-news-wrapper').find('.gallery-news-link').removeClass('active');$that.closest('.gallery-news-wrapper').find('.gallery-pagination__items__item').eq(flkty.selectedIndex).find('a').addClass('active');var medias=Array.prototype.slice.apply(document.querySelectorAll('.news-item--video video'));medias.forEach(function(media){if(media){media.pause();}});}});$('.gallery-news-prev').click(function(e){e.preventDefault();var flkty=Flickity.data($(this).closest('.gallery-news-wrapper').find('.gallery-news')[0]);if(flkty){flkty.previous();$(this).closest('.gallery-pagination__nav').find('gallery-pagination__items__item').removeClass('active').find('.gallery-pagination__nav__current-page').eq(flkty.selectedIndex+1).addClass('active');}});$('.gallery-news-next').click(function(e){e.preventDefault();var flkty=Flickity.data($(this).closest('.gallery-news-wrapper').find('.gallery-news')[0]);if(flkty){flkty.next(true);$(this).closest('.gallery-pagination__nav').find('.gallery-pagination__nav__current-page').text(flkty.selectedIndex+1)}});$('.gallery-news-link').click(function(e){e.preventDefault();var flkty=Flickity.data($(this).closest('.gallery-news-wrapper').find('.gallery-news')[0]);var index=0;if(flkty){index=$(this).closest('.gallery-pagination__items__item').index();flkty.select(index);$(this).closest('.gallery-news-wrapper').find('.gallery-pagination__nav__current-page').text(flkty.selectedIndex+1)}});};window.mPopup=function(){setTimeout(function(){if($.magnificPopup){$('.magnific-image-link').magnificPopup({type:'image',mainClass:'mfp-with-zoom',zoom:{enabled:true,duration:300,easing:'ease-in-out',opener:function(openerElement){return openerElement.is('img')?openerElement:openerElement.find('img');}}});}},1000);};window.chosenSelect=function(){$(".chosen-select").chosen({width:"100%",disable_search_threshold:10});};window.cutTeaser=function(){$(".teaser--responsive .teaser__content p").each(function(){function cut(n){return function textCutter(i,text){var short=text.substr(0,n);if(/^\S/.test(text.substr(n)))
|
||
return short.replace(/\s+\S*$/," ... ");return short;};}
|
||
var $cache=$(this).children();if($(this).text().length>115){$(this).text(cut(115));$(this).html($(this).html()+$cache.html());}});};window.initializeGlobalSearch=function(){var ajaxSearch=function(query,syncResults,asyncResults){var autourl=$(this.$el[0].parentElement.parentElement).closest('form').data('autocompleteurl');if($(this.$el[0].parentElement.parentElement).closest('form').data('autocompleteurl')===undefined){autourl='/search/search/autocomplete';}
|
||
var laka={};$.each($('#search-form-contact').serializeArray(),function(i,field){laka[field.name]=field.value;});var type=$(this.$el[0].parentElement.parentElement).children("input").first().data("searchType");return $.ajax(autourl,{data:{query:query,laka:laka['laka'],type:type},success:function(data){return asyncResults(data.options);},method:"GET",dataType:"json"});};$('.main-search__form .form-control, #main-nav-search .form-control, #searchTextInput.form-control').typeahead({hint:false,highlight:true,minLength:2},{name:'wkosearch',source:ajaxSearch,async:true,limit:12}).on('typeahead:selected',function(){$(this).closest('form').submit();});};window.initializeContactSearch=function(){var ajaxSearch=function(query,syncResults,asyncResults){var autourl=$(this.$el[0].parentElement.parentElement).closest('form').data('autocompleteurl');if($(this.$el[0].parentElement.parentElement).closest('form').data('autocompleteurl')===undefined){autourl='/search/search/autocomplete';}
|
||
return $.ajax(autourl,{data:{query:query},success:function(data){return asyncResults(data);},method:"GET",dataType:"json"});};$('#contact-search .form-control').typeahead({hint:false,highlight:false,minLength:2},{name:'wkocontactsearch',source:ajaxSearch,async:true,display:'name',templates:{suggestion:function(data){return'<div class="row-eq-height"><a href="'+data.link+'"><strong>'+data.name+'</strong><p>'+data.org+'</p><p>'+data.tel+'</p><p>'+data.email+'</p></a><a href="tel:'+data.tel+'"><svg class="icon icon-intra-phone" viewBox="0 0 450 450"><path d="M428.82,51.76c-2.57-2.57-5.19-5.32-8-8.24-16.41-17.25-35-36.81-59.54-35.78-17,.7-33.38,11.22-50.2,32.14-22.63,28.15-31.57,48.9-29,67.3,2.41,17.16,14.65,29.22,27.61,42,1.51,1.48,3.05,3,4.59,4.53,7.66,7.67-2.58,26.32-9.37,36.76-10.77,16.56-28.56,37.29-52.89,61.62S207,294.21,190.44,305c-10.44,6.78-29.09,17-36.74,9.36q-2.34-2.34-4.6-4.64c-12.76-12.94-24.81-25.16-42-27.56-18.39-2.57-39.14,6.37-67.27,29C18.94,328,8.43,344.36,7.73,361.32c-1,24.58,18.57,43.18,35.85,59.58,2.9,2.75,5.63,5.35,8.18,7.89,9,9,23.24,13.46,41.24,13.46s39.93-4.52,63.92-13.57c52.65-19.86,109.93-59.09,161.29-110.45s90.6-108.66,110.47-161.32C446.74,109,446.8,69.73,428.82,51.76Z"/><path class="cls-1" d="M90.45,187.3a7.32,7.32,0,0,1-6.78-4.57A76.05,76.05,0,0,1,185.48,84.86a7.31,7.31,0,0,1-6,13.32,61.43,61.43,0,0,0-82.24,79.06,7.32,7.32,0,0,1-6.77,10.06Z"/><path class="cls-1" d="M25.2,213.79a7.32,7.32,0,0,1-6.78-4.56A146.5,146.5,0,0,1,214.5,20.68a7.31,7.31,0,1,1-6,13.32A131.87,131.87,0,0,0,32,203.73a7.31,7.31,0,0,1-4,9.52A7.19,7.19,0,0,1,25.2,213.79Z"></path></svg></a></div>';}}}).on('typeahead:select',function(data){window.location.href=$('.tt-dataset-wkocontactsearch .tt-suggestion.tt-cursor > a:first-child').attr('href');});};var initBranchenSearch=function(){var form=$('#industrie-quicksearch');if(form){$('#industrie-quicksearch').on('submit',function(e){e.preventDefault();if($('#industrie-quicksearch input').val()!=""){$('.industrie-quicksearch__hide').css('display','none');$('.industrie-quicksearch').css('display','block');}else{$('.industrie-quicksearch__hide').css('display','block');$('.industrie-quicksearch').css('display','none');}
|
||
var height=$(this).closest('.dropdown-menu').outerHeight();$('.tfn').css('transform','translate3d(0,'+height+'px, 0)');});}};window.eventsEqualHeight=function(){if($(window).width()>991){$(".h-event:not(.event-entry)").closest('.col-md-6').matchHeight({byRow:true,property:'height',remove:false});}};window.openMainNav=function(){if($(window).width()<992){$('.breadcrumb > li > a.dropdown-navigation').on('click vclick',function(){var navItem=$(this).attr('href').substr(1);$('#main-navigation').addClass('in').css({'max-height':'700px','height':'auto'});$('#nav-item-mobile-toggle').removeClass('collapsed').attr('aria-expanded','true');});}};window.initPlyr=function(){function youtube_parser(url){var regExp=/.*(?:youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=)([^#\&\?]*).*/;var match=url.match(regExp);return(match&&match[1].length==11)?match[1]:false;}
|
||
$('.plyr__video-embed').prepend('<button class="plyr__load"></button>');$('.plyr iframe').each(function(){var ytid=youtube_parser($(this).attr('data-src'));$(this).parent('.plyr').find('.plyr__load').css({'background':'url("https://img.youtube.com/vi/'+ytid+'/hqdefault.jpg") no-repeat center','background-size':'cover'});$(this).parent('.plyr').attr('id','ve'+ytid);});$('.plyr__load').on('click',function(){var id='#'+$(this).parent('.plyr').attr('id');var iframe=$(this).next('iframe');var src=iframe.attr('data-src');iframe.attr('src',src);const player=new Plyr(id,{hideControls:false,autoplay:true,youtube:{rel:0,showinfo:0,autoplay:1,playsinline:1,modestbranding:1}});player.on('ready',function(){$('.plyr').removeClass('plyr--triggered');$('.plyr--playing .plyr__poster').trigger('click');if(!navigator.userAgent.match(/(iPhone|iPad)/g)){player.play();}});$(this).parent('.plyr').addClass('plyr--triggered');$(this).remove();});$(document).on('click','button.plyr__control[data-plyr="play"], .plyr .plyr__poster',function(){$('.plyr--playing').removeClass('plyr--triggered');$(this).closest('.plyr').addClass('plyr--triggered');$('.plyr--playing').not('.plyr--triggered').trigger('click');});};window.pauseVideo=function(){$(".video-js").each(function(videoIndex){var videoId=$(this).attr("id");videojs(videoId).ready(function(){this.on("play",function(e){$(".video-js").each(function(index){if(videoIndex!==index){this.player.pause();}});});});});};window.switchTabPanel=function(){$(".panel-collapse").on("show.bs.collapse hide.bs.collapse",function(e){var activeNavTab=$(this).closest('.tab-pane').attr('id');if(e.type=='show'){$(this).closest('.tab-pane').addClass('active');$('.nav-tabs > li > a[aria-controls="'+activeNavTab+'"]').closest('li').addClass('active');}else{$(this).closest('.tab-pane').removeClass('active');$('.nav-tabs > li > a[aria-controls="'+activeNavTab+'"]').closest('li').removeClass('active');}});};window.areaDropdown=function(){if(($('body').hasClass('news')||($('body').hasClass('intranet')&&!$('body').hasClass('inhouse')))&&$('.global-select').length){$(window).resize(function(){var bundesland=$('.global-select')[0];var burgenland;var kaernten;var niederoesterreich;var oberoesterreich;var salzburg;var steiermark;var tirol;var vorarlberg;var wien;var oesterreich;if($(window).outerWidth()<=460){burgenland='B';kaernten='K';niederoesterreich='NÖ';oberoesterreich='OÖ';salzburg='S';steiermark='ST';tirol='T';vorarlberg='V';wien='W';oesterreich='Ö';}else{burgenland='Burgenland';kaernten='Kärnten';niederoesterreich='Niederösterreich';oberoesterreich='Oberösterreich';salzburg='Salzburg';steiermark='Steiermark';tirol='Tirol';vorarlberg='Vorarlberg';wien='Wien';oesterreich='Österreich';}
|
||
for(var i=0;i<bundesland.length;i++){var option=bundesland.options[i];switch(option.value){case'b':option.text=burgenland;break;case'k':option.text=kaernten;break;case'noe':option.text=niederoesterreich;break;case'ooe':option.text=oberoesterreich;break;case'sbg':option.text=salzburg;break;case'stmk':option.text=steiermark;break;case't':option.text=tirol;break;case'vbg':option.text=vorarlberg;break;case'w':option.text=wien;break;case'oe':option.text=oesterreich;break;default:console.log('no area');}}}).resize();}};window.ellipsisText=function(el,chars){el.each(function(){if($(this).text().length>chars){$(this).text(function(index,text){return text.substr(0,chars)+'...';});}});};window.toggleMeinWKONav=function(){$('#header-user').on('show.bs.collapse',function(){$('#main-navigation').collapse('hide');});$('#main-navigation').on('show.bs.collapse',function(){$('#header-user').collapse('hide');});};window.moveMeinWKO=function(){$(window).resize(function(){if($(window).outerWidth()<=390){$('header .header .header__content #header-collapse-user').prependTo('#main-navigation');$('header .header .header__content .meinWKO').prependTo('#main-navigation');}else{$('#main-navigation .meinWKO').insertAfter($('header .header .header__content .header__areas'));$('#main-navigation #header-collapse-user').appendTo('header .header .header__content');}}).resize();};window.img2svg=function(){$('#apps img.icon').each(function(){var $img=jQuery(this);var attributes=$img.prop("attributes");var imgURL=$img.attr("src");$.get(imgURL,function(data){var $svg=$(data).find('svg');$svg=$svg.removeAttr('xmlns:a');$.each(attributes,function(){$svg.attr(this.name,this.value);});$img.replaceWith($svg);});});};window.toggleAppbar=function(){$('.toggleAppbar').on('click',function(){$('.apps-desc, #appbar').toggleClass('toggled');if(!$('#appbar').hasClass('toggled')){$('#contact-results').hide();$('.contactsearch + .apps-desc').css('overflow','hidden');}});$('.toggleAppbar').on('click',function(){$('#appbar-search__input').focus();});};window.editFeeds=function(){$('.row-feeds #edit-feeds').on('click',function(e){e.preventDefault();$('.row-feeds .no-feeds, .row-feeds .selected-feeds, .row-feeds #edit-feeds').hide();$('.row-feeds .select-feeds, .row-feeds #save-feeds').show();});$('.row-feeds #save-feeds').on('click',function(e){e.preventDefault();if(!$('.row-feeds .select-feeds input').is(":checked")){$('.row-feeds .no-feeds,.row-feeds #edit-feeds').show();$('.row-feeds .select-feeds, .row-feeds #save-feeds').hide();}else{$('.row-feeds .select-feeds, .row-feeds #save-feeds').hide();$('.row-feeds .selected-feeds, .row-feeds #edit-feeds').show();}});$('.select-feeds ul li input').on('change',function(){if($(this).is(":checked")){$(this).closest('ul').find('li').first().find('.select-feeds__all').hide();$(this).closest('ul').find('li').first().find('.select-feeds__none').show();}
|
||
if(!$(this).closest('ul').find('input').is(":checked")){$(this).closest('ul').find('li').first().find('.select-feeds__none').hide();$(this).closest('ul').find('li').first().find('.select-feeds__all').show();}});$('.select-feeds__all').on('click',function(){$(this).closest('ul').find('input').prop('checked',true);$(this).closest('ul').find('li').first().find('.select-feeds__all').hide();$(this).closest('ul').find('li').first().find('.select-feeds__none').show();});$('.select-feeds__none').on('click',function(){$(this).closest('ul').find('input').prop('checked',false);$(this).closest('ul').find('li').first().find('.select-feeds__none').hide();$(this).closest('ul').find('li').first().find('.select-feeds__all').show();});};window.initComments=function(){$(document).on('click','.comments__alert .close, .comments__alert--close',function(){$(".comments__alert").fadeOut();});$(document).on('click','.comments .comments__terms',function(e){$(".comments .alert").fadeIn().removeClass("hide");if(!localStorage.getItem('accept_rules')){$(".comments__form textarea, .comments__form button").prop('disabled',true);$(".comments__responses textarea, .comments__responses button").prop('disabled',true);}});$(document).on('change','.comments #accept_rules',function(){var checked=$(this).prop('checked');if(checked){localStorage.setItem('accept_rules',true);$(".comments__form textarea, .comments__form button").prop('disabled',false);$(".comments__responses textarea, .comments__responses button").prop('disabled',false);}else{localStorage.setItem('accept_rules',false);$(".comments__form textarea, .comments__form button").prop('disabled',true);$(".comments__responses textarea, .comments__responses button").prop('disabled',true);}});$(document).on('focus','.comments .comments__form textarea',function(){if(!JSON.parse(localStorage.getItem('accept_rules'))){$(".comments__alert").fadeIn().removeClass("hide");$(".comments__form textarea, .comments__form button").prop('disabled',true);$(".comments__responses textarea, .comments__responses button").prop('disabled',true);var offset=-20;if(window.innerWidth<992){offset=-150;}
|
||
$('html, body').animate({scrollTop:$("#kommentare").offset().top+offset},1000);}});$(".comments #accept_rules").prop("checked",JSON.parse(localStorage.getItem('accept_rules')));$(".comments .comment").each(function(index,comment){setupComment(comment);})};window.setupComment=function(comment){var $comment=$(comment);$comment.find(".comment__actions__action--delete").click(function(e){var $deleteBtn=$(this);var $comment=$(this).closest('.comment');var ajaxDeleteURL=$deleteBtn.data('ajaxDelete');function removeComment(){if(ajaxDeleteURL){$.ajax(ajaxDeleteURL,{method:'POST',data:{'YII_CSRF_TOKEN':$('#kommentare form').attr('data-token')},success:function(){$comment.slideToggle(800);},error:function(){bootbox.alert({size:"small",title:"Fehler beim Löschen",message:"Der Kommentar konnte am Server nicht gelöscht werden.",})}})}
|
||
else{$comment.slideToggle();}}
|
||
function confirmDelete(confirm,decline){bootbox.confirm({size:"small",title:"Löschen",message:"Möchten Sie den Kommentar wirklich löschen?",callback:function(result){if(result){confirm();}
|
||
else{decline();}}});}
|
||
if($deleteBtn.data('confirmDelete')===true){confirmDelete(function(){removeComment();},function(){})}
|
||
else{removeComment();}});};window.collapseAll=function(){$('.panel-group__collapse-all > span').on('click',function(){if($(this).data("lastState")===null||$(this).data("lastState")===0){$(this).closest('.panel-group').find('.panel-collapse.in').collapse('hide');$(this).data("lastState",1);$(this).text("alle aufklappen");}
|
||
else{$(this).closest('.panel-group').find('.panel-collapse').removeData('bs.collapse').collapse({parent:false,toggle:false}).collapse('show').removeData('bs.collapse').collapse({parent:'false',toggle:false});$(this).data("lastState",0);$(this).text("alle einklappen");}});$('.panel-collapse').on('hidden.bs.collapse shown.bs.collapse',function(){if($(this).closest('.panel-group').find('.panel-collapse.in').length===0){$(this).closest('.panel-group').find('.panel-group__collapse-all > span').data("lastState",1).text("alle aufklappen");}
|
||
if($(this).closest('.panel-group').find('.panel-collapse.in').length===$(this).closest('.panel-group').find('.panel-collapse').length){$(this).closest('.panel-group').find('.panel-group__collapse-all > span').data("lastState",0).text("alle einklappen");}});};window.openPanelUrl=function(){function getURLParameter(sParam){var sPageURL=window.location.search.substring(1);var sURLVariables=sPageURL.split('&');for(var i=0;i<sURLVariables.length;i++){var sParameterName=sURLVariables[i].split('=');if(sParameterName[0]==sParam){return sParameterName[1];}}}
|
||
if(typeof getURLParameter('faq')!=='undefined'){var faq=getURLParameter('faq');$('#'+faq).attr('aria-expanded','true');$('#'+faq+'__collapse').addClass('in').attr('aria-expanded','true');$("html, body").animate({scrollTop:$('#'+faq).offset().top},200);}};window.cmsLayoutUpdate=function(){$(function(){$('[data-mh]').matchHeight({byRow:true,property:'height',target:null,remove:false});});};window.wkoLayoutUpdate=function(){$.fn.matchHeight._update();};}.call(exports,__webpack_require__(1),__webpack_require__(1)))}),(function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;
|
||
/*!
|
||
* jQuery JavaScript Library v3.2.1
|
||
* https://jquery.com/
|
||
*
|
||
* Includes Sizzle.js
|
||
* https://sizzlejs.com/
|
||
*
|
||
* Copyright JS Foundation and other contributors
|
||
* Released under the MIT license
|
||
* https://jquery.org/license
|
||
*
|
||
* Date: 2017-03-20T18:59Z
|
||
*/
|
||
(function(global,factory){"use strict";if(typeof module==="object"&&typeof module.exports==="object"){module.exports=global.document?factory(global,true):function(w){if(!w.document){throw new Error("jQuery requires a window with a document");}
|
||
return factory(w);};}else{factory(global);}})(typeof window!=="undefined"?window:this,function(window,noGlobal){"use strict";var arr=[];var document=window.document;var getProto=Object.getPrototypeOf;var slice=arr.slice;var concat=arr.concat;var push=arr.push;var indexOf=arr.indexOf;var class2type={};var toString=class2type.toString;var hasOwn=class2type.hasOwnProperty;var fnToString=hasOwn.toString;var ObjectFunctionString=fnToString.call(Object);var support={};function DOMEval(code,doc){doc=doc||document;var script=doc.createElement("script");script.text=code;doc.head.appendChild(script).parentNode.removeChild(script);}
|
||
var
|
||
version="3.2.1",jQuery=function(selector,context){return new jQuery.fn.init(selector,context);},rtrim=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,rmsPrefix=/^-ms-/,rdashAlpha=/-([a-z])/g,fcamelCase=function(all,letter){return letter.toUpperCase();};jQuery.fn=jQuery.prototype={jquery:version,constructor:jQuery,length:0,toArray:function(){return slice.call(this);},get:function(num){if(num==null){return slice.call(this);}
|
||
return num<0?this[num+this.length]:this[num];},pushStack:function(elems){var ret=jQuery.merge(this.constructor(),elems);ret.prevObject=this;return ret;},each:function(callback){return jQuery.each(this,callback);},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},slice:function(){return this.pushStack(slice.apply(this,arguments));},first:function(){return this.eq(0);},last:function(){return this.eq(-1);},eq:function(i){var len=this.length,j=+i+(i<0?len:0);return this.pushStack(j>=0&&j<len?[this[j]]:[]);},end:function(){return this.prevObject||this.constructor();},push:push,sort:arr.sort,splice:arr.splice};jQuery.extend=jQuery.fn.extend=function(){var options,name,src,copy,copyIsArray,clone,target=arguments[0]||{},i=1,length=arguments.length,deep=false;if(typeof target==="boolean"){deep=target;target=arguments[i]||{};i++;}
|
||
if(typeof target!=="object"&&!jQuery.isFunction(target)){target={};}
|
||
if(i===length){target=this;i--;}
|
||
for(;i<length;i++){if((options=arguments[i])!=null){for(name in options){src=target[name];copy=options[name];if(target===copy){continue;}
|
||
if(deep&©&&(jQuery.isPlainObject(copy)||(copyIsArray=Array.isArray(copy)))){if(copyIsArray){copyIsArray=false;clone=src&&Array.isArray(src)?src:[];}else{clone=src&&jQuery.isPlainObject(src)?src:{};}
|
||
target[name]=jQuery.extend(deep,clone,copy);}else if(copy!==undefined){target[name]=copy;}}}}
|
||
return target;};jQuery.extend({expando:"jQuery"+(version+Math.random()).replace(/\D/g,""),isReady:true,error:function(msg){throw new Error(msg);},noop:function(){},isFunction:function(obj){return jQuery.type(obj)==="function";},isWindow:function(obj){return obj!=null&&obj===obj.window;},isNumeric:function(obj){var type=jQuery.type(obj);return(type==="number"||type==="string")&&!isNaN(obj-parseFloat(obj));},isPlainObject:function(obj){var proto,Ctor;if(!obj||toString.call(obj)!=="[object Object]"){return false;}
|
||
proto=getProto(obj);if(!proto){return true;}
|
||
Ctor=hasOwn.call(proto,"constructor")&&proto.constructor;return typeof Ctor==="function"&&fnToString.call(Ctor)===ObjectFunctionString;},isEmptyObject:function(obj){var name;for(name in obj){return false;}
|
||
return true;},type:function(obj){if(obj==null){return obj+"";}
|
||
return typeof obj==="object"||typeof obj==="function"?class2type[toString.call(obj)]||"object":typeof obj;},globalEval:function(code){DOMEval(code);},camelCase:function(string){return string.replace(rmsPrefix,"ms-").replace(rdashAlpha,fcamelCase);},each:function(obj,callback){var length,i=0;if(isArrayLike(obj)){length=obj.length;for(;i<length;i++){if(callback.call(obj[i],i,obj[i])===false){break;}}}else{for(i in obj){if(callback.call(obj[i],i,obj[i])===false){break;}}}
|
||
return obj;},trim:function(text){return text==null?"":(text+"").replace(rtrim,"");},makeArray:function(arr,results){var ret=results||[];if(arr!=null){if(isArrayLike(Object(arr))){jQuery.merge(ret,typeof arr==="string"?[arr]:arr);}else{push.call(ret,arr);}}
|
||
return ret;},inArray:function(elem,arr,i){return arr==null?-1:indexOf.call(arr,elem,i);},merge:function(first,second){var len=+second.length,j=0,i=first.length;for(;j<len;j++){first[i++]=second[j];}
|
||
first.length=i;return first;},grep:function(elems,callback,invert){var callbackInverse,matches=[],i=0,length=elems.length,callbackExpect=!invert;for(;i<length;i++){callbackInverse=!callback(elems[i],i);if(callbackInverse!==callbackExpect){matches.push(elems[i]);}}
|
||
return matches;},map:function(elems,callback,arg){var length,value,i=0,ret=[];if(isArrayLike(elems)){length=elems.length;for(;i<length;i++){value=callback(elems[i],i,arg);if(value!=null){ret.push(value);}}}else{for(i in elems){value=callback(elems[i],i,arg);if(value!=null){ret.push(value);}}}
|
||
return concat.apply([],ret);},guid:1,proxy:function(fn,context){var tmp,args,proxy;if(typeof context==="string"){tmp=fn[context];context=fn;fn=tmp;}
|
||
if(!jQuery.isFunction(fn)){return undefined;}
|
||
args=slice.call(arguments,2);proxy=function(){return fn.apply(context||this,args.concat(slice.call(arguments)));};proxy.guid=fn.guid=fn.guid||jQuery.guid++;return proxy;},now:Date.now,support:support});if(typeof Symbol==="function"){jQuery.fn[Symbol.iterator]=arr[Symbol.iterator];}
|
||
jQuery.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(i,name){class2type["[object "+name+"]"]=name.toLowerCase();});function isArrayLike(obj){var length=!!obj&&"length"in obj&&obj.length,type=jQuery.type(obj);if(type==="function"||jQuery.isWindow(obj)){return false;}
|
||
return type==="array"||length===0||typeof length==="number"&&length>0&&(length-1)in obj;}
|
||
var Sizzle=
|
||
/*!
|
||
* Sizzle CSS Selector Engine v2.3.3
|
||
* https://sizzlejs.com/
|
||
*
|
||
* Copyright jQuery Foundation and other contributors
|
||
* Released under the MIT license
|
||
* http://jquery.org/license
|
||
*
|
||
* Date: 2016-08-08
|
||
*/
|
||
(function(window){var i,support,Expr,getText,isXML,tokenize,compile,select,outermostContext,sortInput,hasDuplicate,setDocument,document,docElem,documentIsHTML,rbuggyQSA,rbuggyMatches,matches,contains,expando="sizzle"+1*new Date(),preferredDoc=window.document,dirruns=0,done=0,classCache=createCache(),tokenCache=createCache(),compilerCache=createCache(),sortOrder=function(a,b){if(a===b){hasDuplicate=true;}
|
||
return 0;},hasOwn=({}).hasOwnProperty,arr=[],pop=arr.pop,push_native=arr.push,push=arr.push,slice=arr.slice,indexOf=function(list,elem){var i=0,len=list.length;for(;i<len;i++){if(list[i]===elem){return i;}}
|
||
return-1;},booleans="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",whitespace="[\\x20\\t\\r\\n\\f]",identifier="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",attributes="\\["+whitespace+"*("+identifier+")(?:"+whitespace+"*([*^$|!~]?=)"+whitespace+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+identifier+"))|)"+whitespace+"*\\]",pseudos=":("+identifier+")(?:\\(("+"('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|"+"((?:\\\\.|[^\\\\()[\\]]|"+attributes+")*)|"+".*"+")\\)|)",rwhitespace=new RegExp(whitespace+"+","g"),rtrim=new RegExp("^"+whitespace+"+|((?:^|[^\\\\])(?:\\\\.)*)"+whitespace+"+$","g"),rcomma=new RegExp("^"+whitespace+"*,"+whitespace+"*"),rcombinators=new RegExp("^"+whitespace+"*([>+~]|"+whitespace+")"+whitespace+"*"),rattributeQuotes=new RegExp("="+whitespace+"*([^\\]'\"]*?)"+whitespace+"*\\]","g"),rpseudo=new RegExp(pseudos),ridentifier=new RegExp("^"+identifier+"$"),matchExpr={"ID":new RegExp("^#("+identifier+")"),"CLASS":new RegExp("^\\.("+identifier+")"),"TAG":new RegExp("^("+identifier+"|[*])"),"ATTR":new RegExp("^"+attributes),"PSEUDO":new RegExp("^"+pseudos),"CHILD":new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+whitespace+"*(even|odd|(([+-]|)(\\d*)n|)"+whitespace+"*(?:([+-]|)"+whitespace+"*(\\d+)|))"+whitespace+"*\\)|)","i"),"bool":new RegExp("^(?:"+booleans+")$","i"),"needsContext":new RegExp("^"+whitespace+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+
|
||
whitespace+"*((?:-\\d)?\\d*)"+whitespace+"*\\)|)(?=[^-]|$)","i")},rinputs=/^(?:input|select|textarea|button)$/i,rheader=/^h\d$/i,rnative=/^[^{]+\{\s*\[native \w/,rquickExpr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,rsibling=/[+~]/,runescape=new RegExp("\\\\([\\da-f]{1,6}"+whitespace+"?|("+whitespace+")|.)","ig"),funescape=function(_,escaped,escapedWhitespace){var high="0x"+escaped-0x10000;return high!==high||escapedWhitespace?escaped:high<0?String.fromCharCode(high+0x10000):String.fromCharCode(high>>10|0xD800,high&0x3FF|0xDC00);},rcssescape=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,fcssescape=function(ch,asCodePoint){if(asCodePoint){if(ch==="\0"){return"\uFFFD";}
|
||
return ch.slice(0,-1)+"\\"+ch.charCodeAt(ch.length-1).toString(16)+" ";}
|
||
return"\\"+ch;},unloadHandler=function(){setDocument();},disabledAncestor=addCombinator(function(elem){return elem.disabled===true&&("form"in elem||"label"in elem);},{dir:"parentNode",next:"legend"});try{push.apply((arr=slice.call(preferredDoc.childNodes)),preferredDoc.childNodes);arr[preferredDoc.childNodes.length].nodeType;}catch(e){push={apply:arr.length?function(target,els){push_native.apply(target,slice.call(els));}:function(target,els){var j=target.length,i=0;while((target[j++]=els[i++])){}
|
||
target.length=j-1;}};}
|
||
function Sizzle(selector,context,results,seed){var m,i,elem,nid,match,groups,newSelector,newContext=context&&context.ownerDocument,nodeType=context?context.nodeType:9;results=results||[];if(typeof selector!=="string"||!selector||nodeType!==1&&nodeType!==9&&nodeType!==11){return results;}
|
||
if(!seed){if((context?context.ownerDocument||context:preferredDoc)!==document){setDocument(context);}
|
||
context=context||document;if(documentIsHTML){if(nodeType!==11&&(match=rquickExpr.exec(selector))){if((m=match[1])){if(nodeType===9){if((elem=context.getElementById(m))){if(elem.id===m){results.push(elem);return results;}}else{return results;}}else{if(newContext&&(elem=newContext.getElementById(m))&&contains(context,elem)&&elem.id===m){results.push(elem);return results;}}}else if(match[2]){push.apply(results,context.getElementsByTagName(selector));return results;}else if((m=match[3])&&support.getElementsByClassName&&context.getElementsByClassName){push.apply(results,context.getElementsByClassName(m));return results;}}
|
||
if(support.qsa&&!compilerCache[selector+" "]&&(!rbuggyQSA||!rbuggyQSA.test(selector))){if(nodeType!==1){newContext=context;newSelector=selector;}else if(context.nodeName.toLowerCase()!=="object"){if((nid=context.getAttribute("id"))){nid=nid.replace(rcssescape,fcssescape);}else{context.setAttribute("id",(nid=expando));}
|
||
groups=tokenize(selector);i=groups.length;while(i--){groups[i]="#"+nid+" "+toSelector(groups[i]);}
|
||
newSelector=groups.join(",");newContext=rsibling.test(selector)&&testContext(context.parentNode)||context;}
|
||
if(newSelector){try{push.apply(results,newContext.querySelectorAll(newSelector));return results;}catch(qsaError){}finally{if(nid===expando){context.removeAttribute("id");}}}}}}
|
||
return select(selector.replace(rtrim,"$1"),context,results,seed);}
|
||
function createCache(){var keys=[];function cache(key,value){if(keys.push(key+" ")>Expr.cacheLength){delete cache[keys.shift()];}
|
||
return(cache[key+" "]=value);}
|
||
return cache;}
|
||
function markFunction(fn){fn[expando]=true;return fn;}
|
||
function assert(fn){var el=document.createElement("fieldset");try{return!!fn(el);}catch(e){return false;}finally{if(el.parentNode){el.parentNode.removeChild(el);}
|
||
el=null;}}
|
||
function addHandle(attrs,handler){var arr=attrs.split("|"),i=arr.length;while(i--){Expr.attrHandle[arr[i]]=handler;}}
|
||
function siblingCheck(a,b){var cur=b&&a,diff=cur&&a.nodeType===1&&b.nodeType===1&&a.sourceIndex-b.sourceIndex;if(diff){return diff;}
|
||
if(cur){while((cur=cur.nextSibling)){if(cur===b){return-1;}}}
|
||
return a?1:-1;}
|
||
function createInputPseudo(type){return function(elem){var name=elem.nodeName.toLowerCase();return name==="input"&&elem.type===type;};}
|
||
function createButtonPseudo(type){return function(elem){var name=elem.nodeName.toLowerCase();return(name==="input"||name==="button")&&elem.type===type;};}
|
||
function createDisabledPseudo(disabled){return function(elem){if("form"in elem){if(elem.parentNode&&elem.disabled===false){if("label"in elem){if("label"in elem.parentNode){return elem.parentNode.disabled===disabled;}else{return elem.disabled===disabled;}}
|
||
return elem.isDisabled===disabled||elem.isDisabled!==!disabled&&disabledAncestor(elem)===disabled;}
|
||
return elem.disabled===disabled;}else if("label"in elem){return elem.disabled===disabled;}
|
||
return false;};}
|
||
function createPositionalPseudo(fn){return markFunction(function(argument){argument=+argument;return markFunction(function(seed,matches){var j,matchIndexes=fn([],seed.length,argument),i=matchIndexes.length;while(i--){if(seed[(j=matchIndexes[i])]){seed[j]=!(matches[j]=seed[j]);}}});});}
|
||
function testContext(context){return context&&typeof context.getElementsByTagName!=="undefined"&&context;}
|
||
support=Sizzle.support={};isXML=Sizzle.isXML=function(elem){var documentElement=elem&&(elem.ownerDocument||elem).documentElement;return documentElement?documentElement.nodeName!=="HTML":false;};setDocument=Sizzle.setDocument=function(node){var hasCompare,subWindow,doc=node?node.ownerDocument||node:preferredDoc;if(doc===document||doc.nodeType!==9||!doc.documentElement){return document;}
|
||
document=doc;docElem=document.documentElement;documentIsHTML=!isXML(document);if(preferredDoc!==document&&(subWindow=document.defaultView)&&subWindow.top!==subWindow){if(subWindow.addEventListener){subWindow.addEventListener("unload",unloadHandler,false);}else if(subWindow.attachEvent){subWindow.attachEvent("onunload",unloadHandler);}}
|
||
support.attributes=assert(function(el){el.className="i";return!el.getAttribute("className");});support.getElementsByTagName=assert(function(el){el.appendChild(document.createComment(""));return!el.getElementsByTagName("*").length;});support.getElementsByClassName=rnative.test(document.getElementsByClassName);support.getById=assert(function(el){docElem.appendChild(el).id=expando;return!document.getElementsByName||!document.getElementsByName(expando).length;});if(support.getById){Expr.filter["ID"]=function(id){var attrId=id.replace(runescape,funescape);return function(elem){return elem.getAttribute("id")===attrId;};};Expr.find["ID"]=function(id,context){if(typeof context.getElementById!=="undefined"&&documentIsHTML){var elem=context.getElementById(id);return elem?[elem]:[];}};}else{Expr.filter["ID"]=function(id){var attrId=id.replace(runescape,funescape);return function(elem){var node=typeof elem.getAttributeNode!=="undefined"&&elem.getAttributeNode("id");return node&&node.value===attrId;};};Expr.find["ID"]=function(id,context){if(typeof context.getElementById!=="undefined"&&documentIsHTML){var node,i,elems,elem=context.getElementById(id);if(elem){node=elem.getAttributeNode("id");if(node&&node.value===id){return[elem];}
|
||
elems=context.getElementsByName(id);i=0;while((elem=elems[i++])){node=elem.getAttributeNode("id");if(node&&node.value===id){return[elem];}}}
|
||
return[];}};}
|
||
Expr.find["TAG"]=support.getElementsByTagName?function(tag,context){if(typeof context.getElementsByTagName!=="undefined"){return context.getElementsByTagName(tag);}else if(support.qsa){return context.querySelectorAll(tag);}}:function(tag,context){var elem,tmp=[],i=0,results=context.getElementsByTagName(tag);if(tag==="*"){while((elem=results[i++])){if(elem.nodeType===1){tmp.push(elem);}}
|
||
return tmp;}
|
||
return results;};Expr.find["CLASS"]=support.getElementsByClassName&&function(className,context){if(typeof context.getElementsByClassName!=="undefined"&&documentIsHTML){return context.getElementsByClassName(className);}};rbuggyMatches=[];rbuggyQSA=[];if((support.qsa=rnative.test(document.querySelectorAll))){assert(function(el){docElem.appendChild(el).innerHTML="<a id='"+expando+"'></a>"+"<select id='"+expando+"-\r\\' msallowcapture=''>"+"<option selected=''></option></select>";if(el.querySelectorAll("[msallowcapture^='']").length){rbuggyQSA.push("[*^$]="+whitespace+"*(?:''|\"\")");}
|
||
if(!el.querySelectorAll("[selected]").length){rbuggyQSA.push("\\["+whitespace+"*(?:value|"+booleans+")");}
|
||
if(!el.querySelectorAll("[id~="+expando+"-]").length){rbuggyQSA.push("~=");}
|
||
if(!el.querySelectorAll(":checked").length){rbuggyQSA.push(":checked");}
|
||
if(!el.querySelectorAll("a#"+expando+"+*").length){rbuggyQSA.push(".#.+[+~]");}});assert(function(el){el.innerHTML="<a href='' disabled='disabled'></a>"+"<select disabled='disabled'><option/></select>";var input=document.createElement("input");input.setAttribute("type","hidden");el.appendChild(input).setAttribute("name","D");if(el.querySelectorAll("[name=d]").length){rbuggyQSA.push("name"+whitespace+"*[*^$|!~]?=");}
|
||
if(el.querySelectorAll(":enabled").length!==2){rbuggyQSA.push(":enabled",":disabled");}
|
||
docElem.appendChild(el).disabled=true;if(el.querySelectorAll(":disabled").length!==2){rbuggyQSA.push(":enabled",":disabled");}
|
||
el.querySelectorAll("*,:x");rbuggyQSA.push(",.*:");});}
|
||
if((support.matchesSelector=rnative.test((matches=docElem.matches||docElem.webkitMatchesSelector||docElem.mozMatchesSelector||docElem.oMatchesSelector||docElem.msMatchesSelector)))){assert(function(el){support.disconnectedMatch=matches.call(el,"*");matches.call(el,"[s!='']:x");rbuggyMatches.push("!=",pseudos);});}
|
||
rbuggyQSA=rbuggyQSA.length&&new RegExp(rbuggyQSA.join("|"));rbuggyMatches=rbuggyMatches.length&&new RegExp(rbuggyMatches.join("|"));hasCompare=rnative.test(docElem.compareDocumentPosition);contains=hasCompare||rnative.test(docElem.contains)?function(a,b){var adown=a.nodeType===9?a.documentElement:a,bup=b&&b.parentNode;return a===bup||!!(bup&&bup.nodeType===1&&(adown.contains?adown.contains(bup):a.compareDocumentPosition&&a.compareDocumentPosition(bup)&16));}:function(a,b){if(b){while((b=b.parentNode)){if(b===a){return true;}}}
|
||
return false;};sortOrder=hasCompare?function(a,b){if(a===b){hasDuplicate=true;return 0;}
|
||
var compare=!a.compareDocumentPosition-!b.compareDocumentPosition;if(compare){return compare;}
|
||
compare=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1;if(compare&1||(!support.sortDetached&&b.compareDocumentPosition(a)===compare)){if(a===document||a.ownerDocument===preferredDoc&&contains(preferredDoc,a)){return-1;}
|
||
if(b===document||b.ownerDocument===preferredDoc&&contains(preferredDoc,b)){return 1;}
|
||
return sortInput?(indexOf(sortInput,a)-indexOf(sortInput,b)):0;}
|
||
return compare&4?-1:1;}:function(a,b){if(a===b){hasDuplicate=true;return 0;}
|
||
var cur,i=0,aup=a.parentNode,bup=b.parentNode,ap=[a],bp=[b];if(!aup||!bup){return a===document?-1:b===document?1:aup?-1:bup?1:sortInput?(indexOf(sortInput,a)-indexOf(sortInput,b)):0;}else if(aup===bup){return siblingCheck(a,b);}
|
||
cur=a;while((cur=cur.parentNode)){ap.unshift(cur);}
|
||
cur=b;while((cur=cur.parentNode)){bp.unshift(cur);}
|
||
while(ap[i]===bp[i]){i++;}
|
||
return i?siblingCheck(ap[i],bp[i]):ap[i]===preferredDoc?-1:bp[i]===preferredDoc?1:0;};return document;};Sizzle.matches=function(expr,elements){return Sizzle(expr,null,null,elements);};Sizzle.matchesSelector=function(elem,expr){if((elem.ownerDocument||elem)!==document){setDocument(elem);}
|
||
expr=expr.replace(rattributeQuotes,"='$1']");if(support.matchesSelector&&documentIsHTML&&!compilerCache[expr+" "]&&(!rbuggyMatches||!rbuggyMatches.test(expr))&&(!rbuggyQSA||!rbuggyQSA.test(expr))){try{var ret=matches.call(elem,expr);if(ret||support.disconnectedMatch||elem.document&&elem.document.nodeType!==11){return ret;}}catch(e){}}
|
||
return Sizzle(expr,document,null,[elem]).length>0;};Sizzle.contains=function(context,elem){if((context.ownerDocument||context)!==document){setDocument(context);}
|
||
return contains(context,elem);};Sizzle.attr=function(elem,name){if((elem.ownerDocument||elem)!==document){setDocument(elem);}
|
||
var fn=Expr.attrHandle[name.toLowerCase()],val=fn&&hasOwn.call(Expr.attrHandle,name.toLowerCase())?fn(elem,name,!documentIsHTML):undefined;return val!==undefined?val:support.attributes||!documentIsHTML?elem.getAttribute(name):(val=elem.getAttributeNode(name))&&val.specified?val.value:null;};Sizzle.escape=function(sel){return(sel+"").replace(rcssescape,fcssescape);};Sizzle.error=function(msg){throw new Error("Syntax error, unrecognized expression: "+msg);};Sizzle.uniqueSort=function(results){var elem,duplicates=[],j=0,i=0;hasDuplicate=!support.detectDuplicates;sortInput=!support.sortStable&&results.slice(0);results.sort(sortOrder);if(hasDuplicate){while((elem=results[i++])){if(elem===results[i]){j=duplicates.push(i);}}
|
||
while(j--){results.splice(duplicates[j],1);}}
|
||
sortInput=null;return results;};getText=Sizzle.getText=function(elem){var node,ret="",i=0,nodeType=elem.nodeType;if(!nodeType){while((node=elem[i++])){ret+=getText(node);}}else if(nodeType===1||nodeType===9||nodeType===11){if(typeof elem.textContent==="string"){return elem.textContent;}else{for(elem=elem.firstChild;elem;elem=elem.nextSibling){ret+=getText(elem);}}}else if(nodeType===3||nodeType===4){return elem.nodeValue;}
|
||
return ret;};Expr=Sizzle.selectors={cacheLength:50,createPseudo:markFunction,match:matchExpr,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:true}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:true},"~":{dir:"previousSibling"}},preFilter:{"ATTR":function(match){match[1]=match[1].replace(runescape,funescape);match[3]=(match[3]||match[4]||match[5]||"").replace(runescape,funescape);if(match[2]==="~="){match[3]=" "+match[3]+" ";}
|
||
return match.slice(0,4);},"CHILD":function(match){match[1]=match[1].toLowerCase();if(match[1].slice(0,3)==="nth"){if(!match[3]){Sizzle.error(match[0]);}
|
||
match[4]=+(match[4]?match[5]+(match[6]||1):2*(match[3]==="even"||match[3]==="odd"));match[5]=+((match[7]+match[8])||match[3]==="odd");}else if(match[3]){Sizzle.error(match[0]);}
|
||
return match;},"PSEUDO":function(match){var excess,unquoted=!match[6]&&match[2];if(matchExpr["CHILD"].test(match[0])){return null;}
|
||
if(match[3]){match[2]=match[4]||match[5]||"";}else if(unquoted&&rpseudo.test(unquoted)&&(excess=tokenize(unquoted,true))&&(excess=unquoted.indexOf(")",unquoted.length-excess)-unquoted.length)){match[0]=match[0].slice(0,excess);match[2]=unquoted.slice(0,excess);}
|
||
return match.slice(0,3);}},filter:{"TAG":function(nodeNameSelector){var nodeName=nodeNameSelector.replace(runescape,funescape).toLowerCase();return nodeNameSelector==="*"?function(){return true;}:function(elem){return elem.nodeName&&elem.nodeName.toLowerCase()===nodeName;};},"CLASS":function(className){var pattern=classCache[className+" "];return pattern||(pattern=new RegExp("(^|"+whitespace+")"+className+"("+whitespace+"|$)"))&&classCache(className,function(elem){return pattern.test(typeof elem.className==="string"&&elem.className||typeof elem.getAttribute!=="undefined"&&elem.getAttribute("class")||"");});},"ATTR":function(name,operator,check){return function(elem){var result=Sizzle.attr(elem,name);if(result==null){return operator==="!=";}
|
||
if(!operator){return true;}
|
||
result+="";return operator==="="?result===check:operator==="!="?result!==check:operator==="^="?check&&result.indexOf(check)===0:operator==="*="?check&&result.indexOf(check)>-1:operator==="$="?check&&result.slice(-check.length)===check:operator==="~="?(" "+result.replace(rwhitespace," ")+" ").indexOf(check)>-1:operator==="|="?result===check||result.slice(0,check.length+1)===check+"-":false;};},"CHILD":function(type,what,argument,first,last){var simple=type.slice(0,3)!=="nth",forward=type.slice(-4)!=="last",ofType=what==="of-type";return first===1&&last===0?function(elem){return!!elem.parentNode;}:function(elem,context,xml){var cache,uniqueCache,outerCache,node,nodeIndex,start,dir=simple!==forward?"nextSibling":"previousSibling",parent=elem.parentNode,name=ofType&&elem.nodeName.toLowerCase(),useCache=!xml&&!ofType,diff=false;if(parent){if(simple){while(dir){node=elem;while((node=node[dir])){if(ofType?node.nodeName.toLowerCase()===name:node.nodeType===1){return false;}}
|
||
start=dir=type==="only"&&!start&&"nextSibling";}
|
||
return true;}
|
||
start=[forward?parent.firstChild:parent.lastChild];if(forward&&useCache){node=parent;outerCache=node[expando]||(node[expando]={});uniqueCache=outerCache[node.uniqueID]||(outerCache[node.uniqueID]={});cache=uniqueCache[type]||[];nodeIndex=cache[0]===dirruns&&cache[1];diff=nodeIndex&&cache[2];node=nodeIndex&&parent.childNodes[nodeIndex];while((node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop())){if(node.nodeType===1&&++diff&&node===elem){uniqueCache[type]=[dirruns,nodeIndex,diff];break;}}}else{if(useCache){node=elem;outerCache=node[expando]||(node[expando]={});uniqueCache=outerCache[node.uniqueID]||(outerCache[node.uniqueID]={});cache=uniqueCache[type]||[];nodeIndex=cache[0]===dirruns&&cache[1];diff=nodeIndex;}
|
||
if(diff===false){while((node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop())){if((ofType?node.nodeName.toLowerCase()===name:node.nodeType===1)&&++diff){if(useCache){outerCache=node[expando]||(node[expando]={});uniqueCache=outerCache[node.uniqueID]||(outerCache[node.uniqueID]={});uniqueCache[type]=[dirruns,diff];}
|
||
if(node===elem){break;}}}}}
|
||
diff-=last;return diff===first||(diff%first===0&&diff/first>=0);}};},"PSEUDO":function(pseudo,argument){var args,fn=Expr.pseudos[pseudo]||Expr.setFilters[pseudo.toLowerCase()]||Sizzle.error("unsupported pseudo: "+pseudo);if(fn[expando]){return fn(argument);}
|
||
if(fn.length>1){args=[pseudo,pseudo,"",argument];return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase())?markFunction(function(seed,matches){var idx,matched=fn(seed,argument),i=matched.length;while(i--){idx=indexOf(seed,matched[i]);seed[idx]=!(matches[idx]=matched[i]);}}):function(elem){return fn(elem,0,args);};}
|
||
return fn;}},pseudos:{"not":markFunction(function(selector){var input=[],results=[],matcher=compile(selector.replace(rtrim,"$1"));return matcher[expando]?markFunction(function(seed,matches,context,xml){var elem,unmatched=matcher(seed,null,xml,[]),i=seed.length;while(i--){if((elem=unmatched[i])){seed[i]=!(matches[i]=elem);}}}):function(elem,context,xml){input[0]=elem;matcher(input,null,xml,results);input[0]=null;return!results.pop();};}),"has":markFunction(function(selector){return function(elem){return Sizzle(selector,elem).length>0;};}),"contains":markFunction(function(text){text=text.replace(runescape,funescape);return function(elem){return(elem.textContent||elem.innerText||getText(elem)).indexOf(text)>-1;};}),"lang":markFunction(function(lang){if(!ridentifier.test(lang||"")){Sizzle.error("unsupported lang: "+lang);}
|
||
lang=lang.replace(runescape,funescape).toLowerCase();return function(elem){var elemLang;do{if((elemLang=documentIsHTML?elem.lang:elem.getAttribute("xml:lang")||elem.getAttribute("lang"))){elemLang=elemLang.toLowerCase();return elemLang===lang||elemLang.indexOf(lang+"-")===0;}}while((elem=elem.parentNode)&&elem.nodeType===1);return false;};}),"target":function(elem){var hash=window.location&&window.location.hash;return hash&&hash.slice(1)===elem.id;},"root":function(elem){return elem===docElem;},"focus":function(elem){return elem===document.activeElement&&(!document.hasFocus||document.hasFocus())&&!!(elem.type||elem.href||~elem.tabIndex);},"enabled":createDisabledPseudo(false),"disabled":createDisabledPseudo(true),"checked":function(elem){var nodeName=elem.nodeName.toLowerCase();return(nodeName==="input"&&!!elem.checked)||(nodeName==="option"&&!!elem.selected);},"selected":function(elem){if(elem.parentNode){elem.parentNode.selectedIndex;}
|
||
return elem.selected===true;},"empty":function(elem){for(elem=elem.firstChild;elem;elem=elem.nextSibling){if(elem.nodeType<6){return false;}}
|
||
return true;},"parent":function(elem){return!Expr.pseudos["empty"](elem);},"header":function(elem){return rheader.test(elem.nodeName);},"input":function(elem){return rinputs.test(elem.nodeName);},"button":function(elem){var name=elem.nodeName.toLowerCase();return name==="input"&&elem.type==="button"||name==="button";},"text":function(elem){var attr;return elem.nodeName.toLowerCase()==="input"&&elem.type==="text"&&((attr=elem.getAttribute("type"))==null||attr.toLowerCase()==="text");},"first":createPositionalPseudo(function(){return[0];}),"last":createPositionalPseudo(function(matchIndexes,length){return[length-1];}),"eq":createPositionalPseudo(function(matchIndexes,length,argument){return[argument<0?argument+length:argument];}),"even":createPositionalPseudo(function(matchIndexes,length){var i=0;for(;i<length;i+=2){matchIndexes.push(i);}
|
||
return matchIndexes;}),"odd":createPositionalPseudo(function(matchIndexes,length){var i=1;for(;i<length;i+=2){matchIndexes.push(i);}
|
||
return matchIndexes;}),"lt":createPositionalPseudo(function(matchIndexes,length,argument){var i=argument<0?argument+length:argument;for(;--i>=0;){matchIndexes.push(i);}
|
||
return matchIndexes;}),"gt":createPositionalPseudo(function(matchIndexes,length,argument){var i=argument<0?argument+length:argument;for(;++i<length;){matchIndexes.push(i);}
|
||
return matchIndexes;})}};Expr.pseudos["nth"]=Expr.pseudos["eq"];for(i in{radio:true,checkbox:true,file:true,password:true,image:true}){Expr.pseudos[i]=createInputPseudo(i);}
|
||
for(i in{submit:true,reset:true}){Expr.pseudos[i]=createButtonPseudo(i);}
|
||
function setFilters(){}
|
||
setFilters.prototype=Expr.filters=Expr.pseudos;Expr.setFilters=new setFilters();tokenize=Sizzle.tokenize=function(selector,parseOnly){var matched,match,tokens,type,soFar,groups,preFilters,cached=tokenCache[selector+" "];if(cached){return parseOnly?0:cached.slice(0);}
|
||
soFar=selector;groups=[];preFilters=Expr.preFilter;while(soFar){if(!matched||(match=rcomma.exec(soFar))){if(match){soFar=soFar.slice(match[0].length)||soFar;}
|
||
groups.push((tokens=[]));}
|
||
matched=false;if((match=rcombinators.exec(soFar))){matched=match.shift();tokens.push({value:matched,type:match[0].replace(rtrim," ")});soFar=soFar.slice(matched.length);}
|
||
for(type in Expr.filter){if((match=matchExpr[type].exec(soFar))&&(!preFilters[type]||(match=preFilters[type](match)))){matched=match.shift();tokens.push({value:matched,type:type,matches:match});soFar=soFar.slice(matched.length);}}
|
||
if(!matched){break;}}
|
||
return parseOnly?soFar.length:soFar?Sizzle.error(selector):tokenCache(selector,groups).slice(0);};function toSelector(tokens){var i=0,len=tokens.length,selector="";for(;i<len;i++){selector+=tokens[i].value;}
|
||
return selector;}
|
||
function addCombinator(matcher,combinator,base){var dir=combinator.dir,skip=combinator.next,key=skip||dir,checkNonElements=base&&key==="parentNode",doneName=done++;return combinator.first?function(elem,context,xml){while((elem=elem[dir])){if(elem.nodeType===1||checkNonElements){return matcher(elem,context,xml);}}
|
||
return false;}:function(elem,context,xml){var oldCache,uniqueCache,outerCache,newCache=[dirruns,doneName];if(xml){while((elem=elem[dir])){if(elem.nodeType===1||checkNonElements){if(matcher(elem,context,xml)){return true;}}}}else{while((elem=elem[dir])){if(elem.nodeType===1||checkNonElements){outerCache=elem[expando]||(elem[expando]={});uniqueCache=outerCache[elem.uniqueID]||(outerCache[elem.uniqueID]={});if(skip&&skip===elem.nodeName.toLowerCase()){elem=elem[dir]||elem;}else if((oldCache=uniqueCache[key])&&oldCache[0]===dirruns&&oldCache[1]===doneName){return(newCache[2]=oldCache[2]);}else{uniqueCache[key]=newCache;if((newCache[2]=matcher(elem,context,xml))){return true;}}}}}
|
||
return false;};}
|
||
function elementMatcher(matchers){return matchers.length>1?function(elem,context,xml){var i=matchers.length;while(i--){if(!matchers[i](elem,context,xml)){return false;}}
|
||
return true;}:matchers[0];}
|
||
function multipleContexts(selector,contexts,results){var i=0,len=contexts.length;for(;i<len;i++){Sizzle(selector,contexts[i],results);}
|
||
return results;}
|
||
function condense(unmatched,map,filter,context,xml){var elem,newUnmatched=[],i=0,len=unmatched.length,mapped=map!=null;for(;i<len;i++){if((elem=unmatched[i])){if(!filter||filter(elem,context,xml)){newUnmatched.push(elem);if(mapped){map.push(i);}}}}
|
||
return newUnmatched;}
|
||
function setMatcher(preFilter,selector,matcher,postFilter,postFinder,postSelector){if(postFilter&&!postFilter[expando]){postFilter=setMatcher(postFilter);}
|
||
if(postFinder&&!postFinder[expando]){postFinder=setMatcher(postFinder,postSelector);}
|
||
return markFunction(function(seed,results,context,xml){var temp,i,elem,preMap=[],postMap=[],preexisting=results.length,elems=seed||multipleContexts(selector||"*",context.nodeType?[context]:context,[]),matcherIn=preFilter&&(seed||!selector)?condense(elems,preMap,preFilter,context,xml):elems,matcherOut=matcher?postFinder||(seed?preFilter:preexisting||postFilter)?[]:results:matcherIn;if(matcher){matcher(matcherIn,matcherOut,context,xml);}
|
||
if(postFilter){temp=condense(matcherOut,postMap);postFilter(temp,[],context,xml);i=temp.length;while(i--){if((elem=temp[i])){matcherOut[postMap[i]]=!(matcherIn[postMap[i]]=elem);}}}
|
||
if(seed){if(postFinder||preFilter){if(postFinder){temp=[];i=matcherOut.length;while(i--){if((elem=matcherOut[i])){temp.push((matcherIn[i]=elem));}}
|
||
postFinder(null,(matcherOut=[]),temp,xml);}
|
||
i=matcherOut.length;while(i--){if((elem=matcherOut[i])&&(temp=postFinder?indexOf(seed,elem):preMap[i])>-1){seed[temp]=!(results[temp]=elem);}}}}else{matcherOut=condense(matcherOut===results?matcherOut.splice(preexisting,matcherOut.length):matcherOut);if(postFinder){postFinder(null,results,matcherOut,xml);}else{push.apply(results,matcherOut);}}});}
|
||
function matcherFromTokens(tokens){var checkContext,matcher,j,len=tokens.length,leadingRelative=Expr.relative[tokens[0].type],implicitRelative=leadingRelative||Expr.relative[" "],i=leadingRelative?1:0,matchContext=addCombinator(function(elem){return elem===checkContext;},implicitRelative,true),matchAnyContext=addCombinator(function(elem){return indexOf(checkContext,elem)>-1;},implicitRelative,true),matchers=[function(elem,context,xml){var ret=(!leadingRelative&&(xml||context!==outermostContext))||((checkContext=context).nodeType?matchContext(elem,context,xml):matchAnyContext(elem,context,xml));checkContext=null;return ret;}];for(;i<len;i++){if((matcher=Expr.relative[tokens[i].type])){matchers=[addCombinator(elementMatcher(matchers),matcher)];}else{matcher=Expr.filter[tokens[i].type].apply(null,tokens[i].matches);if(matcher[expando]){j=++i;for(;j<len;j++){if(Expr.relative[tokens[j].type]){break;}}
|
||
return setMatcher(i>1&&elementMatcher(matchers),i>1&&toSelector(tokens.slice(0,i-1).concat({value:tokens[i-2].type===" "?"*":""})).replace(rtrim,"$1"),matcher,i<j&&matcherFromTokens(tokens.slice(i,j)),j<len&&matcherFromTokens((tokens=tokens.slice(j))),j<len&&toSelector(tokens));}
|
||
matchers.push(matcher);}}
|
||
return elementMatcher(matchers);}
|
||
function matcherFromGroupMatchers(elementMatchers,setMatchers){var bySet=setMatchers.length>0,byElement=elementMatchers.length>0,superMatcher=function(seed,context,xml,results,outermost){var elem,j,matcher,matchedCount=0,i="0",unmatched=seed&&[],setMatched=[],contextBackup=outermostContext,elems=seed||byElement&&Expr.find["TAG"]("*",outermost),dirrunsUnique=(dirruns+=contextBackup==null?1:Math.random()||0.1),len=elems.length;if(outermost){outermostContext=context===document||context||outermost;}
|
||
for(;i!==len&&(elem=elems[i])!=null;i++){if(byElement&&elem){j=0;if(!context&&elem.ownerDocument!==document){setDocument(elem);xml=!documentIsHTML;}
|
||
while((matcher=elementMatchers[j++])){if(matcher(elem,context||document,xml)){results.push(elem);break;}}
|
||
if(outermost){dirruns=dirrunsUnique;}}
|
||
if(bySet){if((elem=!matcher&&elem)){matchedCount--;}
|
||
if(seed){unmatched.push(elem);}}}
|
||
matchedCount+=i;if(bySet&&i!==matchedCount){j=0;while((matcher=setMatchers[j++])){matcher(unmatched,setMatched,context,xml);}
|
||
if(seed){if(matchedCount>0){while(i--){if(!(unmatched[i]||setMatched[i])){setMatched[i]=pop.call(results);}}}
|
||
setMatched=condense(setMatched);}
|
||
push.apply(results,setMatched);if(outermost&&!seed&&setMatched.length>0&&(matchedCount+setMatchers.length)>1){Sizzle.uniqueSort(results);}}
|
||
if(outermost){dirruns=dirrunsUnique;outermostContext=contextBackup;}
|
||
return unmatched;};return bySet?markFunction(superMatcher):superMatcher;}
|
||
compile=Sizzle.compile=function(selector,match){var i,setMatchers=[],elementMatchers=[],cached=compilerCache[selector+" "];if(!cached){if(!match){match=tokenize(selector);}
|
||
i=match.length;while(i--){cached=matcherFromTokens(match[i]);if(cached[expando]){setMatchers.push(cached);}else{elementMatchers.push(cached);}}
|
||
cached=compilerCache(selector,matcherFromGroupMatchers(elementMatchers,setMatchers));cached.selector=selector;}
|
||
return cached;};select=Sizzle.select=function(selector,context,results,seed){var i,tokens,token,type,find,compiled=typeof selector==="function"&&selector,match=!seed&&tokenize((selector=compiled.selector||selector));results=results||[];if(match.length===1){tokens=match[0]=match[0].slice(0);if(tokens.length>2&&(token=tokens[0]).type==="ID"&&context.nodeType===9&&documentIsHTML&&Expr.relative[tokens[1].type]){context=(Expr.find["ID"](token.matches[0].replace(runescape,funescape),context)||[])[0];if(!context){return results;}else if(compiled){context=context.parentNode;}
|
||
selector=selector.slice(tokens.shift().value.length);}
|
||
i=matchExpr["needsContext"].test(selector)?0:tokens.length;while(i--){token=tokens[i];if(Expr.relative[(type=token.type)]){break;}
|
||
if((find=Expr.find[type])){if((seed=find(token.matches[0].replace(runescape,funescape),rsibling.test(tokens[0].type)&&testContext(context.parentNode)||context))){tokens.splice(i,1);selector=seed.length&&toSelector(tokens);if(!selector){push.apply(results,seed);return results;}
|
||
break;}}}}
|
||
(compiled||compile(selector,match))(seed,context,!documentIsHTML,results,!context||rsibling.test(selector)&&testContext(context.parentNode)||context);return results;};support.sortStable=expando.split("").sort(sortOrder).join("")===expando;support.detectDuplicates=!!hasDuplicate;setDocument();support.sortDetached=assert(function(el){return el.compareDocumentPosition(document.createElement("fieldset"))&1;});if(!assert(function(el){el.innerHTML="<a href='#'></a>";return el.firstChild.getAttribute("href")==="#";})){addHandle("type|href|height|width",function(elem,name,isXML){if(!isXML){return elem.getAttribute(name,name.toLowerCase()==="type"?1:2);}});}
|
||
if(!support.attributes||!assert(function(el){el.innerHTML="<input/>";el.firstChild.setAttribute("value","");return el.firstChild.getAttribute("value")==="";})){addHandle("value",function(elem,name,isXML){if(!isXML&&elem.nodeName.toLowerCase()==="input"){return elem.defaultValue;}});}
|
||
if(!assert(function(el){return el.getAttribute("disabled")==null;})){addHandle(booleans,function(elem,name,isXML){var val;if(!isXML){return elem[name]===true?name.toLowerCase():(val=elem.getAttributeNode(name))&&val.specified?val.value:null;}});}
|
||
return Sizzle;})(window);jQuery.find=Sizzle;jQuery.expr=Sizzle.selectors;jQuery.expr[":"]=jQuery.expr.pseudos;jQuery.uniqueSort=jQuery.unique=Sizzle.uniqueSort;jQuery.text=Sizzle.getText;jQuery.isXMLDoc=Sizzle.isXML;jQuery.contains=Sizzle.contains;jQuery.escapeSelector=Sizzle.escape;var dir=function(elem,dir,until){var matched=[],truncate=until!==undefined;while((elem=elem[dir])&&elem.nodeType!==9){if(elem.nodeType===1){if(truncate&&jQuery(elem).is(until)){break;}
|
||
matched.push(elem);}}
|
||
return matched;};var siblings=function(n,elem){var matched=[];for(;n;n=n.nextSibling){if(n.nodeType===1&&n!==elem){matched.push(n);}}
|
||
return matched;};var rneedsContext=jQuery.expr.match.needsContext;function nodeName(elem,name){return elem.nodeName&&elem.nodeName.toLowerCase()===name.toLowerCase();};var rsingleTag=(/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i);var risSimple=/^.[^:#\[\.,]*$/;function winnow(elements,qualifier,not){if(jQuery.isFunction(qualifier)){return jQuery.grep(elements,function(elem,i){return!!qualifier.call(elem,i,elem)!==not;});}
|
||
if(qualifier.nodeType){return jQuery.grep(elements,function(elem){return(elem===qualifier)!==not;});}
|
||
if(typeof qualifier!=="string"){return jQuery.grep(elements,function(elem){return(indexOf.call(qualifier,elem)>-1)!==not;});}
|
||
if(risSimple.test(qualifier)){return jQuery.filter(qualifier,elements,not);}
|
||
qualifier=jQuery.filter(qualifier,elements);return jQuery.grep(elements,function(elem){return(indexOf.call(qualifier,elem)>-1)!==not&&elem.nodeType===1;});}
|
||
jQuery.filter=function(expr,elems,not){var elem=elems[0];if(not){expr=":not("+expr+")";}
|
||
if(elems.length===1&&elem.nodeType===1){return jQuery.find.matchesSelector(elem,expr)?[elem]:[];}
|
||
return jQuery.find.matches(expr,jQuery.grep(elems,function(elem){return elem.nodeType===1;}));};jQuery.fn.extend({find:function(selector){var i,ret,len=this.length,self=this;if(typeof selector!=="string"){return this.pushStack(jQuery(selector).filter(function(){for(i=0;i<len;i++){if(jQuery.contains(self[i],this)){return true;}}}));}
|
||
ret=this.pushStack([]);for(i=0;i<len;i++){jQuery.find(selector,self[i],ret);}
|
||
return len>1?jQuery.uniqueSort(ret):ret;},filter:function(selector){return this.pushStack(winnow(this,selector||[],false));},not:function(selector){return this.pushStack(winnow(this,selector||[],true));},is:function(selector){return!!winnow(this,typeof selector==="string"&&rneedsContext.test(selector)?jQuery(selector):selector||[],false).length;}});var rootjQuery,rquickExpr=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,init=jQuery.fn.init=function(selector,context,root){var match,elem;if(!selector){return this;}
|
||
root=root||rootjQuery;if(typeof selector==="string"){if(selector[0]==="<"&&selector[selector.length-1]===">"&&selector.length>=3){match=[null,selector,null];}else{match=rquickExpr.exec(selector);}
|
||
if(match&&(match[1]||!context)){if(match[1]){context=context instanceof jQuery?context[0]:context;jQuery.merge(this,jQuery.parseHTML(match[1],context&&context.nodeType?context.ownerDocument||context:document,true));if(rsingleTag.test(match[1])&&jQuery.isPlainObject(context)){for(match in context){if(jQuery.isFunction(this[match])){this[match](context[match]);}else{this.attr(match,context[match]);}}}
|
||
return this;}else{elem=document.getElementById(match[2]);if(elem){this[0]=elem;this.length=1;}
|
||
return this;}}else if(!context||context.jquery){return(context||root).find(selector);}else{return this.constructor(context).find(selector);}}else if(selector.nodeType){this[0]=selector;this.length=1;return this;}else if(jQuery.isFunction(selector)){return root.ready!==undefined?root.ready(selector):selector(jQuery);}
|
||
return jQuery.makeArray(selector,this);};init.prototype=jQuery.fn;rootjQuery=jQuery(document);var rparentsprev=/^(?:parents|prev(?:Until|All))/,guaranteedUnique={children:true,contents:true,next:true,prev:true};jQuery.fn.extend({has:function(target){var targets=jQuery(target,this),l=targets.length;return this.filter(function(){var i=0;for(;i<l;i++){if(jQuery.contains(this,targets[i])){return true;}}});},closest:function(selectors,context){var cur,i=0,l=this.length,matched=[],targets=typeof selectors!=="string"&&jQuery(selectors);if(!rneedsContext.test(selectors)){for(;i<l;i++){for(cur=this[i];cur&&cur!==context;cur=cur.parentNode){if(cur.nodeType<11&&(targets?targets.index(cur)>-1:cur.nodeType===1&&jQuery.find.matchesSelector(cur,selectors))){matched.push(cur);break;}}}}
|
||
return this.pushStack(matched.length>1?jQuery.uniqueSort(matched):matched);},index:function(elem){if(!elem){return(this[0]&&this[0].parentNode)?this.first().prevAll().length:-1;}
|
||
if(typeof elem==="string"){return indexOf.call(jQuery(elem),this[0]);}
|
||
return indexOf.call(this,elem.jquery?elem[0]:elem);},add:function(selector,context){return this.pushStack(jQuery.uniqueSort(jQuery.merge(this.get(),jQuery(selector,context))));},addBack:function(selector){return this.add(selector==null?this.prevObject:this.prevObject.filter(selector));}});function sibling(cur,dir){while((cur=cur[dir])&&cur.nodeType!==1){}
|
||
return cur;}
|
||
jQuery.each({parent:function(elem){var parent=elem.parentNode;return parent&&parent.nodeType!==11?parent:null;},parents:function(elem){return dir(elem,"parentNode");},parentsUntil:function(elem,i,until){return dir(elem,"parentNode",until);},next:function(elem){return sibling(elem,"nextSibling");},prev:function(elem){return sibling(elem,"previousSibling");},nextAll:function(elem){return dir(elem,"nextSibling");},prevAll:function(elem){return dir(elem,"previousSibling");},nextUntil:function(elem,i,until){return dir(elem,"nextSibling",until);},prevUntil:function(elem,i,until){return dir(elem,"previousSibling",until);},siblings:function(elem){return siblings((elem.parentNode||{}).firstChild,elem);},children:function(elem){return siblings(elem.firstChild);},contents:function(elem){if(nodeName(elem,"iframe")){return elem.contentDocument;}
|
||
if(nodeName(elem,"template")){elem=elem.content||elem;}
|
||
return jQuery.merge([],elem.childNodes);}},function(name,fn){jQuery.fn[name]=function(until,selector){var matched=jQuery.map(this,fn,until);if(name.slice(-5)!=="Until"){selector=until;}
|
||
if(selector&&typeof selector==="string"){matched=jQuery.filter(selector,matched);}
|
||
if(this.length>1){if(!guaranteedUnique[name]){jQuery.uniqueSort(matched);}
|
||
if(rparentsprev.test(name)){matched.reverse();}}
|
||
return this.pushStack(matched);};});var rnothtmlwhite=(/[^\x20\t\r\n\f]+/g);function createOptions(options){var object={};jQuery.each(options.match(rnothtmlwhite)||[],function(_,flag){object[flag]=true;});return object;}
|
||
jQuery.Callbacks=function(options){options=typeof options==="string"?createOptions(options):jQuery.extend({},options);var
|
||
firing,memory,fired,locked,list=[],queue=[],firingIndex=-1,fire=function(){locked=locked||options.once;fired=firing=true;for(;queue.length;firingIndex=-1){memory=queue.shift();while(++firingIndex<list.length){if(list[firingIndex].apply(memory[0],memory[1])===false&&options.stopOnFalse){firingIndex=list.length;memory=false;}}}
|
||
if(!options.memory){memory=false;}
|
||
firing=false;if(locked){if(memory){list=[];}else{list="";}}},self={add:function(){if(list){if(memory&&!firing){firingIndex=list.length-1;queue.push(memory);}
|
||
(function add(args){jQuery.each(args,function(_,arg){if(jQuery.isFunction(arg)){if(!options.unique||!self.has(arg)){list.push(arg);}}else if(arg&&arg.length&&jQuery.type(arg)!=="string"){add(arg);}});})(arguments);if(memory&&!firing){fire();}}
|
||
return this;},remove:function(){jQuery.each(arguments,function(_,arg){var index;while((index=jQuery.inArray(arg,list,index))>-1){list.splice(index,1);if(index<=firingIndex){firingIndex--;}}});return this;},has:function(fn){return fn?jQuery.inArray(fn,list)>-1:list.length>0;},empty:function(){if(list){list=[];}
|
||
return this;},disable:function(){locked=queue=[];list=memory="";return this;},disabled:function(){return!list;},lock:function(){locked=queue=[];if(!memory&&!firing){list=memory="";}
|
||
return this;},locked:function(){return!!locked;},fireWith:function(context,args){if(!locked){args=args||[];args=[context,args.slice?args.slice():args];queue.push(args);if(!firing){fire();}}
|
||
return this;},fire:function(){self.fireWith(this,arguments);return this;},fired:function(){return!!fired;}};return self;};function Identity(v){return v;}
|
||
function Thrower(ex){throw ex;}
|
||
function adoptValue(value,resolve,reject,noValue){var method;try{if(value&&jQuery.isFunction((method=value.promise))){method.call(value).done(resolve).fail(reject);}else if(value&&jQuery.isFunction((method=value.then))){method.call(value,resolve,reject);}else{resolve.apply(undefined,[value].slice(noValue));}}catch(value){reject.apply(undefined,[value]);}}
|
||
jQuery.extend({Deferred:function(func){var tuples=[["notify","progress",jQuery.Callbacks("memory"),jQuery.Callbacks("memory"),2],["resolve","done",jQuery.Callbacks("once memory"),jQuery.Callbacks("once memory"),0,"resolved"],["reject","fail",jQuery.Callbacks("once memory"),jQuery.Callbacks("once memory"),1,"rejected"]],state="pending",promise={state:function(){return state;},always:function(){deferred.done(arguments).fail(arguments);return this;},"catch":function(fn){return promise.then(null,fn);},pipe:function(){var fns=arguments;return jQuery.Deferred(function(newDefer){jQuery.each(tuples,function(i,tuple){var fn=jQuery.isFunction(fns[tuple[4]])&&fns[tuple[4]];deferred[tuple[1]](function(){var returned=fn&&fn.apply(this,arguments);if(returned&&jQuery.isFunction(returned.promise)){returned.promise().progress(newDefer.notify).done(newDefer.resolve).fail(newDefer.reject);}else{newDefer[tuple[0]+"With"](this,fn?[returned]:arguments);}});});fns=null;}).promise();},then:function(onFulfilled,onRejected,onProgress){var maxDepth=0;function resolve(depth,deferred,handler,special){return function(){var that=this,args=arguments,mightThrow=function(){var returned,then;if(depth<maxDepth){return;}
|
||
returned=handler.apply(that,args);if(returned===deferred.promise()){throw new TypeError("Thenable self-resolution");}
|
||
then=returned&&(typeof returned==="object"||typeof returned==="function")&&returned.then;if(jQuery.isFunction(then)){if(special){then.call(returned,resolve(maxDepth,deferred,Identity,special),resolve(maxDepth,deferred,Thrower,special));}else{maxDepth++;then.call(returned,resolve(maxDepth,deferred,Identity,special),resolve(maxDepth,deferred,Thrower,special),resolve(maxDepth,deferred,Identity,deferred.notifyWith));}}else{if(handler!==Identity){that=undefined;args=[returned];}
|
||
(special||deferred.resolveWith)(that,args);}},process=special?mightThrow:function(){try{mightThrow();}catch(e){if(jQuery.Deferred.exceptionHook){jQuery.Deferred.exceptionHook(e,process.stackTrace);}
|
||
if(depth+1>=maxDepth){if(handler!==Thrower){that=undefined;args=[e];}
|
||
deferred.rejectWith(that,args);}}};if(depth){process();}else{if(jQuery.Deferred.getStackHook){process.stackTrace=jQuery.Deferred.getStackHook();}
|
||
window.setTimeout(process);}};}
|
||
return jQuery.Deferred(function(newDefer){tuples[0][3].add(resolve(0,newDefer,jQuery.isFunction(onProgress)?onProgress:Identity,newDefer.notifyWith));tuples[1][3].add(resolve(0,newDefer,jQuery.isFunction(onFulfilled)?onFulfilled:Identity));tuples[2][3].add(resolve(0,newDefer,jQuery.isFunction(onRejected)?onRejected:Thrower));}).promise();},promise:function(obj){return obj!=null?jQuery.extend(obj,promise):promise;}},deferred={};jQuery.each(tuples,function(i,tuple){var list=tuple[2],stateString=tuple[5];promise[tuple[1]]=list.add;if(stateString){list.add(function(){state=stateString;},tuples[3-i][2].disable,tuples[0][2].lock);}
|
||
list.add(tuple[3].fire);deferred[tuple[0]]=function(){deferred[tuple[0]+"With"](this===deferred?undefined:this,arguments);return this;};deferred[tuple[0]+"With"]=list.fireWith;});promise.promise(deferred);if(func){func.call(deferred,deferred);}
|
||
return deferred;},when:function(singleValue){var
|
||
remaining=arguments.length,i=remaining,resolveContexts=Array(i),resolveValues=slice.call(arguments),master=jQuery.Deferred(),updateFunc=function(i){return function(value){resolveContexts[i]=this;resolveValues[i]=arguments.length>1?slice.call(arguments):value;if(!(--remaining)){master.resolveWith(resolveContexts,resolveValues);}};};if(remaining<=1){adoptValue(singleValue,master.done(updateFunc(i)).resolve,master.reject,!remaining);if(master.state()==="pending"||jQuery.isFunction(resolveValues[i]&&resolveValues[i].then)){return master.then();}}
|
||
while(i--){adoptValue(resolveValues[i],updateFunc(i),master.reject);}
|
||
return master.promise();}});var rerrorNames=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;jQuery.Deferred.exceptionHook=function(error,stack){if(window.console&&window.console.warn&&error&&rerrorNames.test(error.name)){window.console.warn("jQuery.Deferred exception: "+error.message,error.stack,stack);}};jQuery.readyException=function(error){window.setTimeout(function(){throw error;});};var readyList=jQuery.Deferred();jQuery.fn.ready=function(fn){readyList.then(fn).catch(function(error){jQuery.readyException(error);});return this;};jQuery.extend({isReady:false,readyWait:1,ready:function(wait){if(wait===true?--jQuery.readyWait:jQuery.isReady){return;}
|
||
jQuery.isReady=true;if(wait!==true&&--jQuery.readyWait>0){return;}
|
||
readyList.resolveWith(document,[jQuery]);}});jQuery.ready.then=readyList.then;function completed(){document.removeEventListener("DOMContentLoaded",completed);window.removeEventListener("load",completed);jQuery.ready();}
|
||
if(document.readyState==="complete"||(document.readyState!=="loading"&&!document.documentElement.doScroll)){window.setTimeout(jQuery.ready);}else{document.addEventListener("DOMContentLoaded",completed);window.addEventListener("load",completed);}
|
||
var access=function(elems,fn,key,value,chainable,emptyGet,raw){var i=0,len=elems.length,bulk=key==null;if(jQuery.type(key)==="object"){chainable=true;for(i in key){access(elems,fn,i,key[i],true,emptyGet,raw);}}else if(value!==undefined){chainable=true;if(!jQuery.isFunction(value)){raw=true;}
|
||
if(bulk){if(raw){fn.call(elems,value);fn=null;}else{bulk=fn;fn=function(elem,key,value){return bulk.call(jQuery(elem),value);};}}
|
||
if(fn){for(;i<len;i++){fn(elems[i],key,raw?value:value.call(elems[i],i,fn(elems[i],key)));}}}
|
||
if(chainable){return elems;}
|
||
if(bulk){return fn.call(elems);}
|
||
return len?fn(elems[0],key):emptyGet;};var acceptData=function(owner){return owner.nodeType===1||owner.nodeType===9||!(+owner.nodeType);};function Data(){this.expando=jQuery.expando+Data.uid++;}
|
||
Data.uid=1;Data.prototype={cache:function(owner){var value=owner[this.expando];if(!value){value={};if(acceptData(owner)){if(owner.nodeType){owner[this.expando]=value;}else{Object.defineProperty(owner,this.expando,{value:value,configurable:true});}}}
|
||
return value;},set:function(owner,data,value){var prop,cache=this.cache(owner);if(typeof data==="string"){cache[jQuery.camelCase(data)]=value;}else{for(prop in data){cache[jQuery.camelCase(prop)]=data[prop];}}
|
||
return cache;},get:function(owner,key){return key===undefined?this.cache(owner):owner[this.expando]&&owner[this.expando][jQuery.camelCase(key)];},access:function(owner,key,value){if(key===undefined||((key&&typeof key==="string")&&value===undefined)){return this.get(owner,key);}
|
||
this.set(owner,key,value);return value!==undefined?value:key;},remove:function(owner,key){var i,cache=owner[this.expando];if(cache===undefined){return;}
|
||
if(key!==undefined){if(Array.isArray(key)){key=key.map(jQuery.camelCase);}else{key=jQuery.camelCase(key);key=key in cache?[key]:(key.match(rnothtmlwhite)||[]);}
|
||
i=key.length;while(i--){delete cache[key[i]];}}
|
||
if(key===undefined||jQuery.isEmptyObject(cache)){if(owner.nodeType){owner[this.expando]=undefined;}else{delete owner[this.expando];}}},hasData:function(owner){var cache=owner[this.expando];return cache!==undefined&&!jQuery.isEmptyObject(cache);}};var dataPriv=new Data();var dataUser=new Data();var rbrace=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,rmultiDash=/[A-Z]/g;function getData(data){if(data==="true"){return true;}
|
||
if(data==="false"){return false;}
|
||
if(data==="null"){return null;}
|
||
if(data===+data+""){return+data;}
|
||
if(rbrace.test(data)){return JSON.parse(data);}
|
||
return data;}
|
||
function dataAttr(elem,key,data){var name;if(data===undefined&&elem.nodeType===1){name="data-"+key.replace(rmultiDash,"-$&").toLowerCase();data=elem.getAttribute(name);if(typeof data==="string"){try{data=getData(data);}catch(e){}
|
||
dataUser.set(elem,key,data);}else{data=undefined;}}
|
||
return data;}
|
||
jQuery.extend({hasData:function(elem){return dataUser.hasData(elem)||dataPriv.hasData(elem);},data:function(elem,name,data){return dataUser.access(elem,name,data);},removeData:function(elem,name){dataUser.remove(elem,name);},_data:function(elem,name,data){return dataPriv.access(elem,name,data);},_removeData:function(elem,name){dataPriv.remove(elem,name);}});jQuery.fn.extend({data:function(key,value){var i,name,data,elem=this[0],attrs=elem&&elem.attributes;if(key===undefined){if(this.length){data=dataUser.get(elem);if(elem.nodeType===1&&!dataPriv.get(elem,"hasDataAttrs")){i=attrs.length;while(i--){if(attrs[i]){name=attrs[i].name;if(name.indexOf("data-")===0){name=jQuery.camelCase(name.slice(5));dataAttr(elem,name,data[name]);}}}
|
||
dataPriv.set(elem,"hasDataAttrs",true);}}
|
||
return data;}
|
||
if(typeof key==="object"){return this.each(function(){dataUser.set(this,key);});}
|
||
return access(this,function(value){var data;if(elem&&value===undefined){data=dataUser.get(elem,key);if(data!==undefined){return data;}
|
||
data=dataAttr(elem,key);if(data!==undefined){return data;}
|
||
return;}
|
||
this.each(function(){dataUser.set(this,key,value);});},null,value,arguments.length>1,null,true);},removeData:function(key){return this.each(function(){dataUser.remove(this,key);});}});jQuery.extend({queue:function(elem,type,data){var queue;if(elem){type=(type||"fx")+"queue";queue=dataPriv.get(elem,type);if(data){if(!queue||Array.isArray(data)){queue=dataPriv.access(elem,type,jQuery.makeArray(data));}else{queue.push(data);}}
|
||
return queue||[];}},dequeue:function(elem,type){type=type||"fx";var queue=jQuery.queue(elem,type),startLength=queue.length,fn=queue.shift(),hooks=jQuery._queueHooks(elem,type),next=function(){jQuery.dequeue(elem,type);};if(fn==="inprogress"){fn=queue.shift();startLength--;}
|
||
if(fn){if(type==="fx"){queue.unshift("inprogress");}
|
||
delete hooks.stop;fn.call(elem,next,hooks);}
|
||
if(!startLength&&hooks){hooks.empty.fire();}},_queueHooks:function(elem,type){var key=type+"queueHooks";return dataPriv.get(elem,key)||dataPriv.access(elem,key,{empty:jQuery.Callbacks("once memory").add(function(){dataPriv.remove(elem,[type+"queue",key]);})});}});jQuery.fn.extend({queue:function(type,data){var setter=2;if(typeof type!=="string"){data=type;type="fx";setter--;}
|
||
if(arguments.length<setter){return jQuery.queue(this[0],type);}
|
||
return data===undefined?this:this.each(function(){var queue=jQuery.queue(this,type,data);jQuery._queueHooks(this,type);if(type==="fx"&&queue[0]!=="inprogress"){jQuery.dequeue(this,type);}});},dequeue:function(type){return this.each(function(){jQuery.dequeue(this,type);});},clearQueue:function(type){return this.queue(type||"fx",[]);},promise:function(type,obj){var tmp,count=1,defer=jQuery.Deferred(),elements=this,i=this.length,resolve=function(){if(!(--count)){defer.resolveWith(elements,[elements]);}};if(typeof type!=="string"){obj=type;type=undefined;}
|
||
type=type||"fx";while(i--){tmp=dataPriv.get(elements[i],type+"queueHooks");if(tmp&&tmp.empty){count++;tmp.empty.add(resolve);}}
|
||
resolve();return defer.promise(obj);}});var pnum=(/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source;var rcssNum=new RegExp("^(?:([+-])=|)("+pnum+")([a-z%]*)$","i");var cssExpand=["Top","Right","Bottom","Left"];var isHiddenWithinTree=function(elem,el){elem=el||elem;return elem.style.display==="none"||elem.style.display===""&&jQuery.contains(elem.ownerDocument,elem)&&jQuery.css(elem,"display")==="none";};var swap=function(elem,options,callback,args){var ret,name,old={};for(name in options){old[name]=elem.style[name];elem.style[name]=options[name];}
|
||
ret=callback.apply(elem,args||[]);for(name in options){elem.style[name]=old[name];}
|
||
return ret;};function adjustCSS(elem,prop,valueParts,tween){var adjusted,scale=1,maxIterations=20,currentValue=tween?function(){return tween.cur();}:function(){return jQuery.css(elem,prop,"");},initial=currentValue(),unit=valueParts&&valueParts[3]||(jQuery.cssNumber[prop]?"":"px"),initialInUnit=(jQuery.cssNumber[prop]||unit!=="px"&&+initial)&&rcssNum.exec(jQuery.css(elem,prop));if(initialInUnit&&initialInUnit[3]!==unit){unit=unit||initialInUnit[3];valueParts=valueParts||[];initialInUnit=+initial||1;do{scale=scale||".5";initialInUnit=initialInUnit/scale;jQuery.style(elem,prop,initialInUnit+unit);}while(scale!==(scale=currentValue()/initial)&&scale!==1&&--maxIterations);}
|
||
if(valueParts){initialInUnit=+initialInUnit||+initial||0;adjusted=valueParts[1]?initialInUnit+(valueParts[1]+1)*valueParts[2]:+valueParts[2];if(tween){tween.unit=unit;tween.start=initialInUnit;tween.end=adjusted;}}
|
||
return adjusted;}
|
||
var defaultDisplayMap={};function getDefaultDisplay(elem){var temp,doc=elem.ownerDocument,nodeName=elem.nodeName,display=defaultDisplayMap[nodeName];if(display){return display;}
|
||
temp=doc.body.appendChild(doc.createElement(nodeName));display=jQuery.css(temp,"display");temp.parentNode.removeChild(temp);if(display==="none"){display="block";}
|
||
defaultDisplayMap[nodeName]=display;return display;}
|
||
function showHide(elements,show){var display,elem,values=[],index=0,length=elements.length;for(;index<length;index++){elem=elements[index];if(!elem.style){continue;}
|
||
display=elem.style.display;if(show){if(display==="none"){values[index]=dataPriv.get(elem,"display")||null;if(!values[index]){elem.style.display="";}}
|
||
if(elem.style.display===""&&isHiddenWithinTree(elem)){values[index]=getDefaultDisplay(elem);}}else{if(display!=="none"){values[index]="none";dataPriv.set(elem,"display",display);}}}
|
||
for(index=0;index<length;index++){if(values[index]!=null){elements[index].style.display=values[index];}}
|
||
return elements;}
|
||
jQuery.fn.extend({show:function(){return showHide(this,true);},hide:function(){return showHide(this);},toggle:function(state){if(typeof state==="boolean"){return state?this.show():this.hide();}
|
||
return this.each(function(){if(isHiddenWithinTree(this)){jQuery(this).show();}else{jQuery(this).hide();}});}});var rcheckableType=(/^(?:checkbox|radio)$/i);var rtagName=(/<([a-z][^\/\0>\x20\t\r\n\f]+)/i);var rscriptType=(/^$|\/(?:java|ecma)script/i);var wrapMap={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};wrapMap.optgroup=wrapMap.option;wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead;wrapMap.th=wrapMap.td;function getAll(context,tag){var ret;if(typeof context.getElementsByTagName!=="undefined"){ret=context.getElementsByTagName(tag||"*");}else if(typeof context.querySelectorAll!=="undefined"){ret=context.querySelectorAll(tag||"*");}else{ret=[];}
|
||
if(tag===undefined||tag&&nodeName(context,tag)){return jQuery.merge([context],ret);}
|
||
return ret;}
|
||
function setGlobalEval(elems,refElements){var i=0,l=elems.length;for(;i<l;i++){dataPriv.set(elems[i],"globalEval",!refElements||dataPriv.get(refElements[i],"globalEval"));}}
|
||
var rhtml=/<|&#?\w+;/;function buildFragment(elems,context,scripts,selection,ignored){var elem,tmp,tag,wrap,contains,j,fragment=context.createDocumentFragment(),nodes=[],i=0,l=elems.length;for(;i<l;i++){elem=elems[i];if(elem||elem===0){if(jQuery.type(elem)==="object"){jQuery.merge(nodes,elem.nodeType?[elem]:elem);}else if(!rhtml.test(elem)){nodes.push(context.createTextNode(elem));}else{tmp=tmp||fragment.appendChild(context.createElement("div"));tag=(rtagName.exec(elem)||["",""])[1].toLowerCase();wrap=wrapMap[tag]||wrapMap._default;tmp.innerHTML=wrap[1]+jQuery.htmlPrefilter(elem)+wrap[2];j=wrap[0];while(j--){tmp=tmp.lastChild;}
|
||
jQuery.merge(nodes,tmp.childNodes);tmp=fragment.firstChild;tmp.textContent="";}}}
|
||
fragment.textContent="";i=0;while((elem=nodes[i++])){if(selection&&jQuery.inArray(elem,selection)>-1){if(ignored){ignored.push(elem);}
|
||
continue;}
|
||
contains=jQuery.contains(elem.ownerDocument,elem);tmp=getAll(fragment.appendChild(elem),"script");if(contains){setGlobalEval(tmp);}
|
||
if(scripts){j=0;while((elem=tmp[j++])){if(rscriptType.test(elem.type||"")){scripts.push(elem);}}}}
|
||
return fragment;}
|
||
(function(){var fragment=document.createDocumentFragment(),div=fragment.appendChild(document.createElement("div")),input=document.createElement("input");input.setAttribute("type","radio");input.setAttribute("checked","checked");input.setAttribute("name","t");div.appendChild(input);support.checkClone=div.cloneNode(true).cloneNode(true).lastChild.checked;div.innerHTML="<textarea>x</textarea>";support.noCloneChecked=!!div.cloneNode(true).lastChild.defaultValue;})();var documentElement=document.documentElement;var
|
||
rkeyEvent=/^key/,rmouseEvent=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,rtypenamespace=/^([^.]*)(?:\.(.+)|)/;function returnTrue(){return true;}
|
||
function returnFalse(){return false;}
|
||
function safeActiveElement(){try{return document.activeElement;}catch(err){}}
|
||
function on(elem,types,selector,data,fn,one){var origFn,type;if(typeof types==="object"){if(typeof selector!=="string"){data=data||selector;selector=undefined;}
|
||
for(type in types){on(elem,type,selector,data,types[type],one);}
|
||
return elem;}
|
||
if(data==null&&fn==null){fn=selector;data=selector=undefined;}else if(fn==null){if(typeof selector==="string"){fn=data;data=undefined;}else{fn=data;data=selector;selector=undefined;}}
|
||
if(fn===false){fn=returnFalse;}else if(!fn){return elem;}
|
||
if(one===1){origFn=fn;fn=function(event){jQuery().off(event);return origFn.apply(this,arguments);};fn.guid=origFn.guid||(origFn.guid=jQuery.guid++);}
|
||
return elem.each(function(){jQuery.event.add(this,types,fn,data,selector);});}
|
||
jQuery.event={global:{},add:function(elem,types,handler,data,selector){var handleObjIn,eventHandle,tmp,events,t,handleObj,special,handlers,type,namespaces,origType,elemData=dataPriv.get(elem);if(!elemData){return;}
|
||
if(handler.handler){handleObjIn=handler;handler=handleObjIn.handler;selector=handleObjIn.selector;}
|
||
if(selector){jQuery.find.matchesSelector(documentElement,selector);}
|
||
if(!handler.guid){handler.guid=jQuery.guid++;}
|
||
if(!(events=elemData.events)){events=elemData.events={};}
|
||
if(!(eventHandle=elemData.handle)){eventHandle=elemData.handle=function(e){return typeof jQuery!=="undefined"&&jQuery.event.triggered!==e.type?jQuery.event.dispatch.apply(elem,arguments):undefined;};}
|
||
types=(types||"").match(rnothtmlwhite)||[""];t=types.length;while(t--){tmp=rtypenamespace.exec(types[t])||[];type=origType=tmp[1];namespaces=(tmp[2]||"").split(".").sort();if(!type){continue;}
|
||
special=jQuery.event.special[type]||{};type=(selector?special.delegateType:special.bindType)||type;special=jQuery.event.special[type]||{};handleObj=jQuery.extend({type:type,origType:origType,data:data,handler:handler,guid:handler.guid,selector:selector,needsContext:selector&&jQuery.expr.match.needsContext.test(selector),namespace:namespaces.join(".")},handleObjIn);if(!(handlers=events[type])){handlers=events[type]=[];handlers.delegateCount=0;if(!special.setup||special.setup.call(elem,data,namespaces,eventHandle)===false){if(elem.addEventListener){elem.addEventListener(type,eventHandle);}}}
|
||
if(special.add){special.add.call(elem,handleObj);if(!handleObj.handler.guid){handleObj.handler.guid=handler.guid;}}
|
||
if(selector){handlers.splice(handlers.delegateCount++,0,handleObj);}else{handlers.push(handleObj);}
|
||
jQuery.event.global[type]=true;}},remove:function(elem,types,handler,selector,mappedTypes){var j,origCount,tmp,events,t,handleObj,special,handlers,type,namespaces,origType,elemData=dataPriv.hasData(elem)&&dataPriv.get(elem);if(!elemData||!(events=elemData.events)){return;}
|
||
types=(types||"").match(rnothtmlwhite)||[""];t=types.length;while(t--){tmp=rtypenamespace.exec(types[t])||[];type=origType=tmp[1];namespaces=(tmp[2]||"").split(".").sort();if(!type){for(type in events){jQuery.event.remove(elem,type+types[t],handler,selector,true);}
|
||
continue;}
|
||
special=jQuery.event.special[type]||{};type=(selector?special.delegateType:special.bindType)||type;handlers=events[type]||[];tmp=tmp[2]&&new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)");origCount=j=handlers.length;while(j--){handleObj=handlers[j];if((mappedTypes||origType===handleObj.origType)&&(!handler||handler.guid===handleObj.guid)&&(!tmp||tmp.test(handleObj.namespace))&&(!selector||selector===handleObj.selector||selector==="**"&&handleObj.selector)){handlers.splice(j,1);if(handleObj.selector){handlers.delegateCount--;}
|
||
if(special.remove){special.remove.call(elem,handleObj);}}}
|
||
if(origCount&&!handlers.length){if(!special.teardown||special.teardown.call(elem,namespaces,elemData.handle)===false){jQuery.removeEvent(elem,type,elemData.handle);}
|
||
delete events[type];}}
|
||
if(jQuery.isEmptyObject(events)){dataPriv.remove(elem,"handle events");}},dispatch:function(nativeEvent){var event=jQuery.event.fix(nativeEvent);var i,j,ret,matched,handleObj,handlerQueue,args=new Array(arguments.length),handlers=(dataPriv.get(this,"events")||{})[event.type]||[],special=jQuery.event.special[event.type]||{};args[0]=event;for(i=1;i<arguments.length;i++){args[i]=arguments[i];}
|
||
event.delegateTarget=this;if(special.preDispatch&&special.preDispatch.call(this,event)===false){return;}
|
||
handlerQueue=jQuery.event.handlers.call(this,event,handlers);i=0;while((matched=handlerQueue[i++])&&!event.isPropagationStopped()){event.currentTarget=matched.elem;j=0;while((handleObj=matched.handlers[j++])&&!event.isImmediatePropagationStopped()){if(!event.rnamespace||event.rnamespace.test(handleObj.namespace)){event.handleObj=handleObj;event.data=handleObj.data;ret=((jQuery.event.special[handleObj.origType]||{}).handle||handleObj.handler).apply(matched.elem,args);if(ret!==undefined){if((event.result=ret)===false){event.preventDefault();event.stopPropagation();}}}}}
|
||
if(special.postDispatch){special.postDispatch.call(this,event);}
|
||
return event.result;},handlers:function(event,handlers){var i,handleObj,sel,matchedHandlers,matchedSelectors,handlerQueue=[],delegateCount=handlers.delegateCount,cur=event.target;if(delegateCount&&cur.nodeType&&!(event.type==="click"&&event.button>=1)){for(;cur!==this;cur=cur.parentNode||this){if(cur.nodeType===1&&!(event.type==="click"&&cur.disabled===true)){matchedHandlers=[];matchedSelectors={};for(i=0;i<delegateCount;i++){handleObj=handlers[i];sel=handleObj.selector+" ";if(matchedSelectors[sel]===undefined){matchedSelectors[sel]=handleObj.needsContext?jQuery(sel,this).index(cur)>-1:jQuery.find(sel,this,null,[cur]).length;}
|
||
if(matchedSelectors[sel]){matchedHandlers.push(handleObj);}}
|
||
if(matchedHandlers.length){handlerQueue.push({elem:cur,handlers:matchedHandlers});}}}}
|
||
cur=this;if(delegateCount<handlers.length){handlerQueue.push({elem:cur,handlers:handlers.slice(delegateCount)});}
|
||
return handlerQueue;},addProp:function(name,hook){Object.defineProperty(jQuery.Event.prototype,name,{enumerable:true,configurable:true,get:jQuery.isFunction(hook)?function(){if(this.originalEvent){return hook(this.originalEvent);}}:function(){if(this.originalEvent){return this.originalEvent[name];}},set:function(value){Object.defineProperty(this,name,{enumerable:true,configurable:true,writable:true,value:value});}});},fix:function(originalEvent){return originalEvent[jQuery.expando]?originalEvent:new jQuery.Event(originalEvent);},special:{load:{noBubble:true},focus:{trigger:function(){if(this!==safeActiveElement()&&this.focus){this.focus();return false;}},delegateType:"focusin"},blur:{trigger:function(){if(this===safeActiveElement()&&this.blur){this.blur();return false;}},delegateType:"focusout"},click:{trigger:function(){if(this.type==="checkbox"&&this.click&&nodeName(this,"input")){this.click();return false;}},_default:function(event){return nodeName(event.target,"a");}},beforeunload:{postDispatch:function(event){if(event.result!==undefined&&event.originalEvent){event.originalEvent.returnValue=event.result;}}}}};jQuery.removeEvent=function(elem,type,handle){if(elem.removeEventListener){elem.removeEventListener(type,handle);}};jQuery.Event=function(src,props){if(!(this instanceof jQuery.Event)){return new jQuery.Event(src,props);}
|
||
if(src&&src.type){this.originalEvent=src;this.type=src.type;this.isDefaultPrevented=src.defaultPrevented||src.defaultPrevented===undefined&&src.returnValue===false?returnTrue:returnFalse;this.target=(src.target&&src.target.nodeType===3)?src.target.parentNode:src.target;this.currentTarget=src.currentTarget;this.relatedTarget=src.relatedTarget;}else{this.type=src;}
|
||
if(props){jQuery.extend(this,props);}
|
||
this.timeStamp=src&&src.timeStamp||jQuery.now();this[jQuery.expando]=true;};jQuery.Event.prototype={constructor:jQuery.Event,isDefaultPrevented:returnFalse,isPropagationStopped:returnFalse,isImmediatePropagationStopped:returnFalse,isSimulated:false,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=returnTrue;if(e&&!this.isSimulated){e.preventDefault();}},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=returnTrue;if(e&&!this.isSimulated){e.stopPropagation();}},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=returnTrue;if(e&&!this.isSimulated){e.stopImmediatePropagation();}
|
||
this.stopPropagation();}};jQuery.each({altKey:true,bubbles:true,cancelable:true,changedTouches:true,ctrlKey:true,detail:true,eventPhase:true,metaKey:true,pageX:true,pageY:true,shiftKey:true,view:true,"char":true,charCode:true,key:true,keyCode:true,button:true,buttons:true,clientX:true,clientY:true,offsetX:true,offsetY:true,pointerId:true,pointerType:true,screenX:true,screenY:true,targetTouches:true,toElement:true,touches:true,which:function(event){var button=event.button;if(event.which==null&&rkeyEvent.test(event.type)){return event.charCode!=null?event.charCode:event.keyCode;}
|
||
if(!event.which&&button!==undefined&&rmouseEvent.test(event.type)){if(button&1){return 1;}
|
||
if(button&2){return 3;}
|
||
if(button&4){return 2;}
|
||
return 0;}
|
||
return event.which;}},jQuery.event.addProp);jQuery.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(orig,fix){jQuery.event.special[orig]={delegateType:fix,bindType:fix,handle:function(event){var ret,target=this,related=event.relatedTarget,handleObj=event.handleObj;if(!related||(related!==target&&!jQuery.contains(target,related))){event.type=handleObj.origType;ret=handleObj.handler.apply(this,arguments);event.type=fix;}
|
||
return ret;}};});jQuery.fn.extend({on:function(types,selector,data,fn){return on(this,types,selector,data,fn);},one:function(types,selector,data,fn){return on(this,types,selector,data,fn,1);},off:function(types,selector,fn){var handleObj,type;if(types&&types.preventDefault&&types.handleObj){handleObj=types.handleObj;jQuery(types.delegateTarget).off(handleObj.namespace?handleObj.origType+"."+handleObj.namespace:handleObj.origType,handleObj.selector,handleObj.handler);return this;}
|
||
if(typeof types==="object"){for(type in types){this.off(type,selector,types[type]);}
|
||
return this;}
|
||
if(selector===false||typeof selector==="function"){fn=selector;selector=undefined;}
|
||
if(fn===false){fn=returnFalse;}
|
||
return this.each(function(){jQuery.event.remove(this,types,fn,selector);});}});var
|
||
rxhtmlTag=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,rnoInnerhtml=/<script|<style|<link/i,rchecked=/checked\s*(?:[^=]|=\s*.checked.)/i,rscriptTypeMasked=/^true\/(.*)/,rcleanScript=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function manipulationTarget(elem,content){if(nodeName(elem,"table")&&nodeName(content.nodeType!==11?content:content.firstChild,"tr")){return jQuery(">tbody",elem)[0]||elem;}
|
||
return elem;}
|
||
function disableScript(elem){elem.type=(elem.getAttribute("type")!==null)+"/"+elem.type;return elem;}
|
||
function restoreScript(elem){var match=rscriptTypeMasked.exec(elem.type);if(match){elem.type=match[1];}else{elem.removeAttribute("type");}
|
||
return elem;}
|
||
function cloneCopyEvent(src,dest){var i,l,type,pdataOld,pdataCur,udataOld,udataCur,events;if(dest.nodeType!==1){return;}
|
||
if(dataPriv.hasData(src)){pdataOld=dataPriv.access(src);pdataCur=dataPriv.set(dest,pdataOld);events=pdataOld.events;if(events){delete pdataCur.handle;pdataCur.events={};for(type in events){for(i=0,l=events[type].length;i<l;i++){jQuery.event.add(dest,type,events[type][i]);}}}}
|
||
if(dataUser.hasData(src)){udataOld=dataUser.access(src);udataCur=jQuery.extend({},udataOld);dataUser.set(dest,udataCur);}}
|
||
function fixInput(src,dest){var nodeName=dest.nodeName.toLowerCase();if(nodeName==="input"&&rcheckableType.test(src.type)){dest.checked=src.checked;}else if(nodeName==="input"||nodeName==="textarea"){dest.defaultValue=src.defaultValue;}}
|
||
function domManip(collection,args,callback,ignored){args=concat.apply([],args);var fragment,first,scripts,hasScripts,node,doc,i=0,l=collection.length,iNoClone=l-1,value=args[0],isFunction=jQuery.isFunction(value);if(isFunction||(l>1&&typeof value==="string"&&!support.checkClone&&rchecked.test(value))){return collection.each(function(index){var self=collection.eq(index);if(isFunction){args[0]=value.call(this,index,self.html());}
|
||
domManip(self,args,callback,ignored);});}
|
||
if(l){fragment=buildFragment(args,collection[0].ownerDocument,false,collection,ignored);first=fragment.firstChild;if(fragment.childNodes.length===1){fragment=first;}
|
||
if(first||ignored){scripts=jQuery.map(getAll(fragment,"script"),disableScript);hasScripts=scripts.length;for(;i<l;i++){node=fragment;if(i!==iNoClone){node=jQuery.clone(node,true,true);if(hasScripts){jQuery.merge(scripts,getAll(node,"script"));}}
|
||
callback.call(collection[i],node,i);}
|
||
if(hasScripts){doc=scripts[scripts.length-1].ownerDocument;jQuery.map(scripts,restoreScript);for(i=0;i<hasScripts;i++){node=scripts[i];if(rscriptType.test(node.type||"")&&!dataPriv.access(node,"globalEval")&&jQuery.contains(doc,node)){if(node.src){if(jQuery._evalUrl){jQuery._evalUrl(node.src);}}else{DOMEval(node.textContent.replace(rcleanScript,""),doc);}}}}}}
|
||
return collection;}
|
||
function remove(elem,selector,keepData){var node,nodes=selector?jQuery.filter(selector,elem):elem,i=0;for(;(node=nodes[i])!=null;i++){if(!keepData&&node.nodeType===1){jQuery.cleanData(getAll(node));}
|
||
if(node.parentNode){if(keepData&&jQuery.contains(node.ownerDocument,node)){setGlobalEval(getAll(node,"script"));}
|
||
node.parentNode.removeChild(node);}}
|
||
return elem;}
|
||
jQuery.extend({htmlPrefilter:function(html){return html.replace(rxhtmlTag,"<$1></$2>");},clone:function(elem,dataAndEvents,deepDataAndEvents){var i,l,srcElements,destElements,clone=elem.cloneNode(true),inPage=jQuery.contains(elem.ownerDocument,elem);if(!support.noCloneChecked&&(elem.nodeType===1||elem.nodeType===11)&&!jQuery.isXMLDoc(elem)){destElements=getAll(clone);srcElements=getAll(elem);for(i=0,l=srcElements.length;i<l;i++){fixInput(srcElements[i],destElements[i]);}}
|
||
if(dataAndEvents){if(deepDataAndEvents){srcElements=srcElements||getAll(elem);destElements=destElements||getAll(clone);for(i=0,l=srcElements.length;i<l;i++){cloneCopyEvent(srcElements[i],destElements[i]);}}else{cloneCopyEvent(elem,clone);}}
|
||
destElements=getAll(clone,"script");if(destElements.length>0){setGlobalEval(destElements,!inPage&&getAll(elem,"script"));}
|
||
return clone;},cleanData:function(elems){var data,elem,type,special=jQuery.event.special,i=0;for(;(elem=elems[i])!==undefined;i++){if(acceptData(elem)){if((data=elem[dataPriv.expando])){if(data.events){for(type in data.events){if(special[type]){jQuery.event.remove(elem,type);}else{jQuery.removeEvent(elem,type,data.handle);}}}
|
||
elem[dataPriv.expando]=undefined;}
|
||
if(elem[dataUser.expando]){elem[dataUser.expando]=undefined;}}}}});jQuery.fn.extend({detach:function(selector){return remove(this,selector,true);},remove:function(selector){return remove(this,selector);},text:function(value){return access(this,function(value){return value===undefined?jQuery.text(this):this.empty().each(function(){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){this.textContent=value;}});},null,value,arguments.length);},append:function(){return domManip(this,arguments,function(elem){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var target=manipulationTarget(this,elem);target.appendChild(elem);}});},prepend:function(){return domManip(this,arguments,function(elem){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var target=manipulationTarget(this,elem);target.insertBefore(elem,target.firstChild);}});},before:function(){return domManip(this,arguments,function(elem){if(this.parentNode){this.parentNode.insertBefore(elem,this);}});},after:function(){return domManip(this,arguments,function(elem){if(this.parentNode){this.parentNode.insertBefore(elem,this.nextSibling);}});},empty:function(){var elem,i=0;for(;(elem=this[i])!=null;i++){if(elem.nodeType===1){jQuery.cleanData(getAll(elem,false));elem.textContent="";}}
|
||
return this;},clone:function(dataAndEvents,deepDataAndEvents){dataAndEvents=dataAndEvents==null?false:dataAndEvents;deepDataAndEvents=deepDataAndEvents==null?dataAndEvents:deepDataAndEvents;return this.map(function(){return jQuery.clone(this,dataAndEvents,deepDataAndEvents);});},html:function(value){return access(this,function(value){var elem=this[0]||{},i=0,l=this.length;if(value===undefined&&elem.nodeType===1){return elem.innerHTML;}
|
||
if(typeof value==="string"&&!rnoInnerhtml.test(value)&&!wrapMap[(rtagName.exec(value)||["",""])[1].toLowerCase()]){value=jQuery.htmlPrefilter(value);try{for(;i<l;i++){elem=this[i]||{};if(elem.nodeType===1){jQuery.cleanData(getAll(elem,false));elem.innerHTML=value;}}
|
||
elem=0;}catch(e){}}
|
||
if(elem){this.empty().append(value);}},null,value,arguments.length);},replaceWith:function(){var ignored=[];return domManip(this,arguments,function(elem){var parent=this.parentNode;if(jQuery.inArray(this,ignored)<0){jQuery.cleanData(getAll(this));if(parent){parent.replaceChild(elem,this);}}},ignored);}});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(selector){var elems,ret=[],insert=jQuery(selector),last=insert.length-1,i=0;for(;i<=last;i++){elems=i===last?this:this.clone(true);jQuery(insert[i])[original](elems);push.apply(ret,elems.get());}
|
||
return this.pushStack(ret);};});var rmargin=(/^margin/);var rnumnonpx=new RegExp("^("+pnum+")(?!px)[a-z%]+$","i");var getStyles=function(elem){var view=elem.ownerDocument.defaultView;if(!view||!view.opener){view=window;}
|
||
return view.getComputedStyle(elem);};(function(){function computeStyleTests(){if(!div){return;}
|
||
div.style.cssText="box-sizing:border-box;"+"position:relative;display:block;"+"margin:auto;border:1px;padding:1px;"+"top:1%;width:50%";div.innerHTML="";documentElement.appendChild(container);var divStyle=window.getComputedStyle(div);pixelPositionVal=divStyle.top!=="1%";reliableMarginLeftVal=divStyle.marginLeft==="2px";boxSizingReliableVal=divStyle.width==="4px";div.style.marginRight="50%";pixelMarginRightVal=divStyle.marginRight==="4px";documentElement.removeChild(container);div=null;}
|
||
var pixelPositionVal,boxSizingReliableVal,pixelMarginRightVal,reliableMarginLeftVal,container=document.createElement("div"),div=document.createElement("div");if(!div.style){return;}
|
||
div.style.backgroundClip="content-box";div.cloneNode(true).style.backgroundClip="";support.clearCloneStyle=div.style.backgroundClip==="content-box";container.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;"+"padding:0;margin-top:1px;position:absolute";container.appendChild(div);jQuery.extend(support,{pixelPosition:function(){computeStyleTests();return pixelPositionVal;},boxSizingReliable:function(){computeStyleTests();return boxSizingReliableVal;},pixelMarginRight:function(){computeStyleTests();return pixelMarginRightVal;},reliableMarginLeft:function(){computeStyleTests();return reliableMarginLeftVal;}});})();function curCSS(elem,name,computed){var width,minWidth,maxWidth,ret,style=elem.style;computed=computed||getStyles(elem);if(computed){ret=computed.getPropertyValue(name)||computed[name];if(ret===""&&!jQuery.contains(elem.ownerDocument,elem)){ret=jQuery.style(elem,name);}
|
||
if(!support.pixelMarginRight()&&rnumnonpx.test(ret)&&rmargin.test(name)){width=style.width;minWidth=style.minWidth;maxWidth=style.maxWidth;style.minWidth=style.maxWidth=style.width=ret;ret=computed.width;style.width=width;style.minWidth=minWidth;style.maxWidth=maxWidth;}}
|
||
return ret!==undefined?ret+"":ret;}
|
||
function addGetHookIf(conditionFn,hookFn){return{get:function(){if(conditionFn()){delete this.get;return;}
|
||
return(this.get=hookFn).apply(this,arguments);}};}
|
||
var
|
||
rdisplayswap=/^(none|table(?!-c[ea]).+)/,rcustomProp=/^--/,cssShow={position:"absolute",visibility:"hidden",display:"block"},cssNormalTransform={letterSpacing:"0",fontWeight:"400"},cssPrefixes=["Webkit","Moz","ms"],emptyStyle=document.createElement("div").style;function vendorPropName(name){if(name in emptyStyle){return name;}
|
||
var capName=name[0].toUpperCase()+name.slice(1),i=cssPrefixes.length;while(i--){name=cssPrefixes[i]+capName;if(name in emptyStyle){return name;}}}
|
||
function finalPropName(name){var ret=jQuery.cssProps[name];if(!ret){ret=jQuery.cssProps[name]=vendorPropName(name)||name;}
|
||
return ret;}
|
||
function setPositiveNumber(elem,value,subtract){var matches=rcssNum.exec(value);return matches?Math.max(0,matches[2]-(subtract||0))+(matches[3]||"px"):value;}
|
||
function augmentWidthOrHeight(elem,name,extra,isBorderBox,styles){var i,val=0;if(extra===(isBorderBox?"border":"content")){i=4;}else{i=name==="width"?1:0;}
|
||
for(;i<4;i+=2){if(extra==="margin"){val+=jQuery.css(elem,extra+cssExpand[i],true,styles);}
|
||
if(isBorderBox){if(extra==="content"){val-=jQuery.css(elem,"padding"+cssExpand[i],true,styles);}
|
||
if(extra!=="margin"){val-=jQuery.css(elem,"border"+cssExpand[i]+"Width",true,styles);}}else{val+=jQuery.css(elem,"padding"+cssExpand[i],true,styles);if(extra!=="padding"){val+=jQuery.css(elem,"border"+cssExpand[i]+"Width",true,styles);}}}
|
||
return val;}
|
||
function getWidthOrHeight(elem,name,extra){var valueIsBorderBox,styles=getStyles(elem),val=curCSS(elem,name,styles),isBorderBox=jQuery.css(elem,"boxSizing",false,styles)==="border-box";if(rnumnonpx.test(val)){return val;}
|
||
valueIsBorderBox=isBorderBox&&(support.boxSizingReliable()||val===elem.style[name]);if(val==="auto"){val=elem["offset"+name[0].toUpperCase()+name.slice(1)];}
|
||
val=parseFloat(val)||0;return(val+
|
||
augmentWidthOrHeight(elem,name,extra||(isBorderBox?"border":"content"),valueIsBorderBox,styles))+"px";}
|
||
jQuery.extend({cssHooks:{opacity:{get:function(elem,computed){if(computed){var ret=curCSS(elem,"opacity");return ret===""?"1":ret;}}}},cssNumber:{"animationIterationCount":true,"columnCount":true,"fillOpacity":true,"flexGrow":true,"flexShrink":true,"fontWeight":true,"lineHeight":true,"opacity":true,"order":true,"orphans":true,"widows":true,"zIndex":true,"zoom":true},cssProps:{"float":"cssFloat"},style:function(elem,name,value,extra){if(!elem||elem.nodeType===3||elem.nodeType===8||!elem.style){return;}
|
||
var ret,type,hooks,origName=jQuery.camelCase(name),isCustomProp=rcustomProp.test(name),style=elem.style;if(!isCustomProp){name=finalPropName(origName);}
|
||
hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName];if(value!==undefined){type=typeof value;if(type==="string"&&(ret=rcssNum.exec(value))&&ret[1]){value=adjustCSS(elem,name,ret);type="number";}
|
||
if(value==null||value!==value){return;}
|
||
if(type==="number"){value+=ret&&ret[3]||(jQuery.cssNumber[origName]?"":"px");}
|
||
if(!support.clearCloneStyle&&value===""&&name.indexOf("background")===0){style[name]="inherit";}
|
||
if(!hooks||!("set"in hooks)||(value=hooks.set(elem,value,extra))!==undefined){if(isCustomProp){style.setProperty(name,value);}else{style[name]=value;}}}else{if(hooks&&"get"in hooks&&(ret=hooks.get(elem,false,extra))!==undefined){return ret;}
|
||
return style[name];}},css:function(elem,name,extra,styles){var val,num,hooks,origName=jQuery.camelCase(name),isCustomProp=rcustomProp.test(name);if(!isCustomProp){name=finalPropName(origName);}
|
||
hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName];if(hooks&&"get"in hooks){val=hooks.get(elem,true,extra);}
|
||
if(val===undefined){val=curCSS(elem,name,styles);}
|
||
if(val==="normal"&&name in cssNormalTransform){val=cssNormalTransform[name];}
|
||
if(extra===""||extra){num=parseFloat(val);return extra===true||isFinite(num)?num||0:val;}
|
||
return val;}});jQuery.each(["height","width"],function(i,name){jQuery.cssHooks[name]={get:function(elem,computed,extra){if(computed){return rdisplayswap.test(jQuery.css(elem,"display"))&&(!elem.getClientRects().length||!elem.getBoundingClientRect().width)?swap(elem,cssShow,function(){return getWidthOrHeight(elem,name,extra);}):getWidthOrHeight(elem,name,extra);}},set:function(elem,value,extra){var matches,styles=extra&&getStyles(elem),subtract=extra&&augmentWidthOrHeight(elem,name,extra,jQuery.css(elem,"boxSizing",false,styles)==="border-box",styles);if(subtract&&(matches=rcssNum.exec(value))&&(matches[3]||"px")!=="px"){elem.style[name]=value;value=jQuery.css(elem,name);}
|
||
return setPositiveNumber(elem,value,subtract);}};});jQuery.cssHooks.marginLeft=addGetHookIf(support.reliableMarginLeft,function(elem,computed){if(computed){return(parseFloat(curCSS(elem,"marginLeft"))||elem.getBoundingClientRect().left-
|
||
swap(elem,{marginLeft:0},function(){return elem.getBoundingClientRect().left;}))+"px";}});jQuery.each({margin:"",padding:"",border:"Width"},function(prefix,suffix){jQuery.cssHooks[prefix+suffix]={expand:function(value){var i=0,expanded={},parts=typeof value==="string"?value.split(" "):[value];for(;i<4;i++){expanded[prefix+cssExpand[i]+suffix]=parts[i]||parts[i-2]||parts[0];}
|
||
return expanded;}};if(!rmargin.test(prefix)){jQuery.cssHooks[prefix+suffix].set=setPositiveNumber;}});jQuery.fn.extend({css:function(name,value){return access(this,function(elem,name,value){var styles,len,map={},i=0;if(Array.isArray(name)){styles=getStyles(elem);len=name.length;for(;i<len;i++){map[name[i]]=jQuery.css(elem,name[i],false,styles);}
|
||
return map;}
|
||
return value!==undefined?jQuery.style(elem,name,value):jQuery.css(elem,name);},name,value,arguments.length>1);}});function Tween(elem,options,prop,end,easing){return new Tween.prototype.init(elem,options,prop,end,easing);}
|
||
jQuery.Tween=Tween;Tween.prototype={constructor:Tween,init:function(elem,options,prop,end,easing,unit){this.elem=elem;this.prop=prop;this.easing=easing||jQuery.easing._default;this.options=options;this.start=this.now=this.cur();this.end=end;this.unit=unit||(jQuery.cssNumber[prop]?"":"px");},cur:function(){var hooks=Tween.propHooks[this.prop];return hooks&&hooks.get?hooks.get(this):Tween.propHooks._default.get(this);},run:function(percent){var eased,hooks=Tween.propHooks[this.prop];if(this.options.duration){this.pos=eased=jQuery.easing[this.easing](percent,this.options.duration*percent,0,1,this.options.duration);}else{this.pos=eased=percent;}
|
||
this.now=(this.end-this.start)*eased+this.start;if(this.options.step){this.options.step.call(this.elem,this.now,this);}
|
||
if(hooks&&hooks.set){hooks.set(this);}else{Tween.propHooks._default.set(this);}
|
||
return this;}};Tween.prototype.init.prototype=Tween.prototype;Tween.propHooks={_default:{get:function(tween){var result;if(tween.elem.nodeType!==1||tween.elem[tween.prop]!=null&&tween.elem.style[tween.prop]==null){return tween.elem[tween.prop];}
|
||
result=jQuery.css(tween.elem,tween.prop,"");return!result||result==="auto"?0:result;},set:function(tween){if(jQuery.fx.step[tween.prop]){jQuery.fx.step[tween.prop](tween);}else if(tween.elem.nodeType===1&&(tween.elem.style[jQuery.cssProps[tween.prop]]!=null||jQuery.cssHooks[tween.prop])){jQuery.style(tween.elem,tween.prop,tween.now+tween.unit);}else{tween.elem[tween.prop]=tween.now;}}}};Tween.propHooks.scrollTop=Tween.propHooks.scrollLeft={set:function(tween){if(tween.elem.nodeType&&tween.elem.parentNode){tween.elem[tween.prop]=tween.now;}}};jQuery.easing={linear:function(p){return p;},swing:function(p){return 0.5-Math.cos(p*Math.PI)/2;},_default:"swing"};jQuery.fx=Tween.prototype.init;jQuery.fx.step={};var
|
||
fxNow,inProgress,rfxtypes=/^(?:toggle|show|hide)$/,rrun=/queueHooks$/;function schedule(){if(inProgress){if(document.hidden===false&&window.requestAnimationFrame){window.requestAnimationFrame(schedule);}else{window.setTimeout(schedule,jQuery.fx.interval);}
|
||
jQuery.fx.tick();}}
|
||
function createFxNow(){window.setTimeout(function(){fxNow=undefined;});return(fxNow=jQuery.now());}
|
||
function genFx(type,includeWidth){var which,i=0,attrs={height:type};includeWidth=includeWidth?1:0;for(;i<4;i+=2-includeWidth){which=cssExpand[i];attrs["margin"+which]=attrs["padding"+which]=type;}
|
||
if(includeWidth){attrs.opacity=attrs.width=type;}
|
||
return attrs;}
|
||
function createTween(value,prop,animation){var tween,collection=(Animation.tweeners[prop]||[]).concat(Animation.tweeners["*"]),index=0,length=collection.length;for(;index<length;index++){if((tween=collection[index].call(animation,prop,value))){return tween;}}}
|
||
function defaultPrefilter(elem,props,opts){var prop,value,toggle,hooks,oldfire,propTween,restoreDisplay,display,isBox="width"in props||"height"in props,anim=this,orig={},style=elem.style,hidden=elem.nodeType&&isHiddenWithinTree(elem),dataShow=dataPriv.get(elem,"fxshow");if(!opts.queue){hooks=jQuery._queueHooks(elem,"fx");if(hooks.unqueued==null){hooks.unqueued=0;oldfire=hooks.empty.fire;hooks.empty.fire=function(){if(!hooks.unqueued){oldfire();}};}
|
||
hooks.unqueued++;anim.always(function(){anim.always(function(){hooks.unqueued--;if(!jQuery.queue(elem,"fx").length){hooks.empty.fire();}});});}
|
||
for(prop in props){value=props[prop];if(rfxtypes.test(value)){delete props[prop];toggle=toggle||value==="toggle";if(value===(hidden?"hide":"show")){if(value==="show"&&dataShow&&dataShow[prop]!==undefined){hidden=true;}else{continue;}}
|
||
orig[prop]=dataShow&&dataShow[prop]||jQuery.style(elem,prop);}}
|
||
propTween=!jQuery.isEmptyObject(props);if(!propTween&&jQuery.isEmptyObject(orig)){return;}
|
||
if(isBox&&elem.nodeType===1){opts.overflow=[style.overflow,style.overflowX,style.overflowY];restoreDisplay=dataShow&&dataShow.display;if(restoreDisplay==null){restoreDisplay=dataPriv.get(elem,"display");}
|
||
display=jQuery.css(elem,"display");if(display==="none"){if(restoreDisplay){display=restoreDisplay;}else{showHide([elem],true);restoreDisplay=elem.style.display||restoreDisplay;display=jQuery.css(elem,"display");showHide([elem]);}}
|
||
if(display==="inline"||display==="inline-block"&&restoreDisplay!=null){if(jQuery.css(elem,"float")==="none"){if(!propTween){anim.done(function(){style.display=restoreDisplay;});if(restoreDisplay==null){display=style.display;restoreDisplay=display==="none"?"":display;}}
|
||
style.display="inline-block";}}}
|
||
if(opts.overflow){style.overflow="hidden";anim.always(function(){style.overflow=opts.overflow[0];style.overflowX=opts.overflow[1];style.overflowY=opts.overflow[2];});}
|
||
propTween=false;for(prop in orig){if(!propTween){if(dataShow){if("hidden"in dataShow){hidden=dataShow.hidden;}}else{dataShow=dataPriv.access(elem,"fxshow",{display:restoreDisplay});}
|
||
if(toggle){dataShow.hidden=!hidden;}
|
||
if(hidden){showHide([elem],true);}
|
||
anim.done(function(){if(!hidden){showHide([elem]);}
|
||
dataPriv.remove(elem,"fxshow");for(prop in orig){jQuery.style(elem,prop,orig[prop]);}});}
|
||
propTween=createTween(hidden?dataShow[prop]:0,prop,anim);if(!(prop in dataShow)){dataShow[prop]=propTween.start;if(hidden){propTween.end=propTween.start;propTween.start=0;}}}}
|
||
function propFilter(props,specialEasing){var index,name,easing,value,hooks;for(index in props){name=jQuery.camelCase(index);easing=specialEasing[name];value=props[index];if(Array.isArray(value)){easing=value[1];value=props[index]=value[0];}
|
||
if(index!==name){props[name]=value;delete props[index];}
|
||
hooks=jQuery.cssHooks[name];if(hooks&&"expand"in hooks){value=hooks.expand(value);delete props[name];for(index in value){if(!(index in props)){props[index]=value[index];specialEasing[index]=easing;}}}else{specialEasing[name]=easing;}}}
|
||
function Animation(elem,properties,options){var result,stopped,index=0,length=Animation.prefilters.length,deferred=jQuery.Deferred().always(function(){delete tick.elem;}),tick=function(){if(stopped){return false;}
|
||
var currentTime=fxNow||createFxNow(),remaining=Math.max(0,animation.startTime+animation.duration-currentTime),temp=remaining/animation.duration||0,percent=1-temp,index=0,length=animation.tweens.length;for(;index<length;index++){animation.tweens[index].run(percent);}
|
||
deferred.notifyWith(elem,[animation,percent,remaining]);if(percent<1&&length){return remaining;}
|
||
if(!length){deferred.notifyWith(elem,[animation,1,0]);}
|
||
deferred.resolveWith(elem,[animation]);return false;},animation=deferred.promise({elem:elem,props:jQuery.extend({},properties),opts:jQuery.extend(true,{specialEasing:{},easing:jQuery.easing._default},options),originalProperties:properties,originalOptions:options,startTime:fxNow||createFxNow(),duration:options.duration,tweens:[],createTween:function(prop,end){var tween=jQuery.Tween(elem,animation.opts,prop,end,animation.opts.specialEasing[prop]||animation.opts.easing);animation.tweens.push(tween);return tween;},stop:function(gotoEnd){var index=0,length=gotoEnd?animation.tweens.length:0;if(stopped){return this;}
|
||
stopped=true;for(;index<length;index++){animation.tweens[index].run(1);}
|
||
if(gotoEnd){deferred.notifyWith(elem,[animation,1,0]);deferred.resolveWith(elem,[animation,gotoEnd]);}else{deferred.rejectWith(elem,[animation,gotoEnd]);}
|
||
return this;}}),props=animation.props;propFilter(props,animation.opts.specialEasing);for(;index<length;index++){result=Animation.prefilters[index].call(animation,elem,props,animation.opts);if(result){if(jQuery.isFunction(result.stop)){jQuery._queueHooks(animation.elem,animation.opts.queue).stop=jQuery.proxy(result.stop,result);}
|
||
return result;}}
|
||
jQuery.map(props,createTween,animation);if(jQuery.isFunction(animation.opts.start)){animation.opts.start.call(elem,animation);}
|
||
animation.progress(animation.opts.progress).done(animation.opts.done,animation.opts.complete).fail(animation.opts.fail).always(animation.opts.always);jQuery.fx.timer(jQuery.extend(tick,{elem:elem,anim:animation,queue:animation.opts.queue}));return animation;}
|
||
jQuery.Animation=jQuery.extend(Animation,{tweeners:{"*":[function(prop,value){var tween=this.createTween(prop,value);adjustCSS(tween.elem,prop,rcssNum.exec(value),tween);return tween;}]},tweener:function(props,callback){if(jQuery.isFunction(props)){callback=props;props=["*"];}else{props=props.match(rnothtmlwhite);}
|
||
var prop,index=0,length=props.length;for(;index<length;index++){prop=props[index];Animation.tweeners[prop]=Animation.tweeners[prop]||[];Animation.tweeners[prop].unshift(callback);}},prefilters:[defaultPrefilter],prefilter:function(callback,prepend){if(prepend){Animation.prefilters.unshift(callback);}else{Animation.prefilters.push(callback);}}});jQuery.speed=function(speed,easing,fn){var opt=speed&&typeof speed==="object"?jQuery.extend({},speed):{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&!jQuery.isFunction(easing)&&easing};if(jQuery.fx.off){opt.duration=0;}else{if(typeof opt.duration!=="number"){if(opt.duration in jQuery.fx.speeds){opt.duration=jQuery.fx.speeds[opt.duration];}else{opt.duration=jQuery.fx.speeds._default;}}}
|
||
if(opt.queue==null||opt.queue===true){opt.queue="fx";}
|
||
opt.old=opt.complete;opt.complete=function(){if(jQuery.isFunction(opt.old)){opt.old.call(this);}
|
||
if(opt.queue){jQuery.dequeue(this,opt.queue);}};return opt;};jQuery.fn.extend({fadeTo:function(speed,to,easing,callback){return this.filter(isHiddenWithinTree).css("opacity",0).show().end().animate({opacity:to},speed,easing,callback);},animate:function(prop,speed,easing,callback){var empty=jQuery.isEmptyObject(prop),optall=jQuery.speed(speed,easing,callback),doAnimation=function(){var anim=Animation(this,jQuery.extend({},prop),optall);if(empty||dataPriv.get(this,"finish")){anim.stop(true);}};doAnimation.finish=doAnimation;return empty||optall.queue===false?this.each(doAnimation):this.queue(optall.queue,doAnimation);},stop:function(type,clearQueue,gotoEnd){var stopQueue=function(hooks){var stop=hooks.stop;delete hooks.stop;stop(gotoEnd);};if(typeof type!=="string"){gotoEnd=clearQueue;clearQueue=type;type=undefined;}
|
||
if(clearQueue&&type!==false){this.queue(type||"fx",[]);}
|
||
return this.each(function(){var dequeue=true,index=type!=null&&type+"queueHooks",timers=jQuery.timers,data=dataPriv.get(this);if(index){if(data[index]&&data[index].stop){stopQueue(data[index]);}}else{for(index in data){if(data[index]&&data[index].stop&&rrun.test(index)){stopQueue(data[index]);}}}
|
||
for(index=timers.length;index--;){if(timers[index].elem===this&&(type==null||timers[index].queue===type)){timers[index].anim.stop(gotoEnd);dequeue=false;timers.splice(index,1);}}
|
||
if(dequeue||!gotoEnd){jQuery.dequeue(this,type);}});},finish:function(type){if(type!==false){type=type||"fx";}
|
||
return this.each(function(){var index,data=dataPriv.get(this),queue=data[type+"queue"],hooks=data[type+"queueHooks"],timers=jQuery.timers,length=queue?queue.length:0;data.finish=true;jQuery.queue(this,type,[]);if(hooks&&hooks.stop){hooks.stop.call(this,true);}
|
||
for(index=timers.length;index--;){if(timers[index].elem===this&&timers[index].queue===type){timers[index].anim.stop(true);timers.splice(index,1);}}
|
||
for(index=0;index<length;index++){if(queue[index]&&queue[index].finish){queue[index].finish.call(this);}}
|
||
delete data.finish;});}});jQuery.each(["toggle","show","hide"],function(i,name){var cssFn=jQuery.fn[name];jQuery.fn[name]=function(speed,easing,callback){return speed==null||typeof speed==="boolean"?cssFn.apply(this,arguments):this.animate(genFx(name,true),speed,easing,callback);};});jQuery.each({slideDown:genFx("show"),slideUp:genFx("hide"),slideToggle:genFx("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(name,props){jQuery.fn[name]=function(speed,easing,callback){return this.animate(props,speed,easing,callback);};});jQuery.timers=[];jQuery.fx.tick=function(){var timer,i=0,timers=jQuery.timers;fxNow=jQuery.now();for(;i<timers.length;i++){timer=timers[i];if(!timer()&&timers[i]===timer){timers.splice(i--,1);}}
|
||
if(!timers.length){jQuery.fx.stop();}
|
||
fxNow=undefined;};jQuery.fx.timer=function(timer){jQuery.timers.push(timer);jQuery.fx.start();};jQuery.fx.interval=13;jQuery.fx.start=function(){if(inProgress){return;}
|
||
inProgress=true;schedule();};jQuery.fx.stop=function(){inProgress=null;};jQuery.fx.speeds={slow:600,fast:200,_default:400};jQuery.fn.delay=function(time,type){time=jQuery.fx?jQuery.fx.speeds[time]||time:time;type=type||"fx";return this.queue(type,function(next,hooks){var timeout=window.setTimeout(next,time);hooks.stop=function(){window.clearTimeout(timeout);};});};(function(){var input=document.createElement("input"),select=document.createElement("select"),opt=select.appendChild(document.createElement("option"));input.type="checkbox";support.checkOn=input.value!=="";support.optSelected=opt.selected;input=document.createElement("input");input.value="t";input.type="radio";support.radioValue=input.value==="t";})();var boolHook,attrHandle=jQuery.expr.attrHandle;jQuery.fn.extend({attr:function(name,value){return access(this,jQuery.attr,name,value,arguments.length>1);},removeAttr:function(name){return this.each(function(){jQuery.removeAttr(this,name);});}});jQuery.extend({attr:function(elem,name,value){var ret,hooks,nType=elem.nodeType;if(nType===3||nType===8||nType===2){return;}
|
||
if(typeof elem.getAttribute==="undefined"){return jQuery.prop(elem,name,value);}
|
||
if(nType!==1||!jQuery.isXMLDoc(elem)){hooks=jQuery.attrHooks[name.toLowerCase()]||(jQuery.expr.match.bool.test(name)?boolHook:undefined);}
|
||
if(value!==undefined){if(value===null){jQuery.removeAttr(elem,name);return;}
|
||
if(hooks&&"set"in hooks&&(ret=hooks.set(elem,value,name))!==undefined){return ret;}
|
||
elem.setAttribute(name,value+"");return value;}
|
||
if(hooks&&"get"in hooks&&(ret=hooks.get(elem,name))!==null){return ret;}
|
||
ret=jQuery.find.attr(elem,name);return ret==null?undefined:ret;},attrHooks:{type:{set:function(elem,value){if(!support.radioValue&&value==="radio"&&nodeName(elem,"input")){var val=elem.value;elem.setAttribute("type",value);if(val){elem.value=val;}
|
||
return value;}}}},removeAttr:function(elem,value){var name,i=0,attrNames=value&&value.match(rnothtmlwhite);if(attrNames&&elem.nodeType===1){while((name=attrNames[i++])){elem.removeAttribute(name);}}}});boolHook={set:function(elem,value,name){if(value===false){jQuery.removeAttr(elem,name);}else{elem.setAttribute(name,name);}
|
||
return name;}};jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g),function(i,name){var getter=attrHandle[name]||jQuery.find.attr;attrHandle[name]=function(elem,name,isXML){var ret,handle,lowercaseName=name.toLowerCase();if(!isXML){handle=attrHandle[lowercaseName];attrHandle[lowercaseName]=ret;ret=getter(elem,name,isXML)!=null?lowercaseName:null;attrHandle[lowercaseName]=handle;}
|
||
return ret;};});var rfocusable=/^(?:input|select|textarea|button)$/i,rclickable=/^(?:a|area)$/i;jQuery.fn.extend({prop:function(name,value){return access(this,jQuery.prop,name,value,arguments.length>1);},removeProp:function(name){return this.each(function(){delete this[jQuery.propFix[name]||name];});}});jQuery.extend({prop:function(elem,name,value){var ret,hooks,nType=elem.nodeType;if(nType===3||nType===8||nType===2){return;}
|
||
if(nType!==1||!jQuery.isXMLDoc(elem)){name=jQuery.propFix[name]||name;hooks=jQuery.propHooks[name];}
|
||
if(value!==undefined){if(hooks&&"set"in hooks&&(ret=hooks.set(elem,value,name))!==undefined){return ret;}
|
||
return(elem[name]=value);}
|
||
if(hooks&&"get"in hooks&&(ret=hooks.get(elem,name))!==null){return ret;}
|
||
return elem[name];},propHooks:{tabIndex:{get:function(elem){var tabindex=jQuery.find.attr(elem,"tabindex");if(tabindex){return parseInt(tabindex,10);}
|
||
if(rfocusable.test(elem.nodeName)||rclickable.test(elem.nodeName)&&elem.href){return 0;}
|
||
return-1;}}},propFix:{"for":"htmlFor","class":"className"}});if(!support.optSelected){jQuery.propHooks.selected={get:function(elem){var parent=elem.parentNode;if(parent&&parent.parentNode){parent.parentNode.selectedIndex;}
|
||
return null;},set:function(elem){var parent=elem.parentNode;if(parent){parent.selectedIndex;if(parent.parentNode){parent.parentNode.selectedIndex;}}}};}
|
||
jQuery.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){jQuery.propFix[this.toLowerCase()]=this;});function stripAndCollapse(value){var tokens=value.match(rnothtmlwhite)||[];return tokens.join(" ");}
|
||
function getClass(elem){return elem.getAttribute&&elem.getAttribute("class")||"";}
|
||
jQuery.fn.extend({addClass:function(value){var classes,elem,cur,curValue,clazz,j,finalValue,i=0;if(jQuery.isFunction(value)){return this.each(function(j){jQuery(this).addClass(value.call(this,j,getClass(this)));});}
|
||
if(typeof value==="string"&&value){classes=value.match(rnothtmlwhite)||[];while((elem=this[i++])){curValue=getClass(elem);cur=elem.nodeType===1&&(" "+stripAndCollapse(curValue)+" ");if(cur){j=0;while((clazz=classes[j++])){if(cur.indexOf(" "+clazz+" ")<0){cur+=clazz+" ";}}
|
||
finalValue=stripAndCollapse(cur);if(curValue!==finalValue){elem.setAttribute("class",finalValue);}}}}
|
||
return this;},removeClass:function(value){var classes,elem,cur,curValue,clazz,j,finalValue,i=0;if(jQuery.isFunction(value)){return this.each(function(j){jQuery(this).removeClass(value.call(this,j,getClass(this)));});}
|
||
if(!arguments.length){return this.attr("class","");}
|
||
if(typeof value==="string"&&value){classes=value.match(rnothtmlwhite)||[];while((elem=this[i++])){curValue=getClass(elem);cur=elem.nodeType===1&&(" "+stripAndCollapse(curValue)+" ");if(cur){j=0;while((clazz=classes[j++])){while(cur.indexOf(" "+clazz+" ")>-1){cur=cur.replace(" "+clazz+" "," ");}}
|
||
finalValue=stripAndCollapse(cur);if(curValue!==finalValue){elem.setAttribute("class",finalValue);}}}}
|
||
return this;},toggleClass:function(value,stateVal){var type=typeof value;if(typeof stateVal==="boolean"&&type==="string"){return stateVal?this.addClass(value):this.removeClass(value);}
|
||
if(jQuery.isFunction(value)){return this.each(function(i){jQuery(this).toggleClass(value.call(this,i,getClass(this),stateVal),stateVal);});}
|
||
return this.each(function(){var className,i,self,classNames;if(type==="string"){i=0;self=jQuery(this);classNames=value.match(rnothtmlwhite)||[];while((className=classNames[i++])){if(self.hasClass(className)){self.removeClass(className);}else{self.addClass(className);}}}else if(value===undefined||type==="boolean"){className=getClass(this);if(className){dataPriv.set(this,"__className__",className);}
|
||
if(this.setAttribute){this.setAttribute("class",className||value===false?"":dataPriv.get(this,"__className__")||"");}}});},hasClass:function(selector){var className,elem,i=0;className=" "+selector+" ";while((elem=this[i++])){if(elem.nodeType===1&&(" "+stripAndCollapse(getClass(elem))+" ").indexOf(className)>-1){return true;}}
|
||
return false;}});var rreturn=/\r/g;jQuery.fn.extend({val:function(value){var hooks,ret,isFunction,elem=this[0];if(!arguments.length){if(elem){hooks=jQuery.valHooks[elem.type]||jQuery.valHooks[elem.nodeName.toLowerCase()];if(hooks&&"get"in hooks&&(ret=hooks.get(elem,"value"))!==undefined){return ret;}
|
||
ret=elem.value;if(typeof ret==="string"){return ret.replace(rreturn,"");}
|
||
return ret==null?"":ret;}
|
||
return;}
|
||
isFunction=jQuery.isFunction(value);return this.each(function(i){var val;if(this.nodeType!==1){return;}
|
||
if(isFunction){val=value.call(this,i,jQuery(this).val());}else{val=value;}
|
||
if(val==null){val="";}else if(typeof val==="number"){val+="";}else if(Array.isArray(val)){val=jQuery.map(val,function(value){return value==null?"":value+"";});}
|
||
hooks=jQuery.valHooks[this.type]||jQuery.valHooks[this.nodeName.toLowerCase()];if(!hooks||!("set"in hooks)||hooks.set(this,val,"value")===undefined){this.value=val;}});}});jQuery.extend({valHooks:{option:{get:function(elem){var val=jQuery.find.attr(elem,"value");return val!=null?val:stripAndCollapse(jQuery.text(elem));}},select:{get:function(elem){var value,option,i,options=elem.options,index=elem.selectedIndex,one=elem.type==="select-one",values=one?null:[],max=one?index+1:options.length;if(index<0){i=max;}else{i=one?index:0;}
|
||
for(;i<max;i++){option=options[i];if((option.selected||i===index)&&!option.disabled&&(!option.parentNode.disabled||!nodeName(option.parentNode,"optgroup"))){value=jQuery(option).val();if(one){return value;}
|
||
values.push(value);}}
|
||
return values;},set:function(elem,value){var optionSet,option,options=elem.options,values=jQuery.makeArray(value),i=options.length;while(i--){option=options[i];if(option.selected=jQuery.inArray(jQuery.valHooks.option.get(option),values)>-1){optionSet=true;}}
|
||
if(!optionSet){elem.selectedIndex=-1;}
|
||
return values;}}}});jQuery.each(["radio","checkbox"],function(){jQuery.valHooks[this]={set:function(elem,value){if(Array.isArray(value)){return(elem.checked=jQuery.inArray(jQuery(elem).val(),value)>-1);}}};if(!support.checkOn){jQuery.valHooks[this].get=function(elem){return elem.getAttribute("value")===null?"on":elem.value;};}});var rfocusMorph=/^(?:focusinfocus|focusoutblur)$/;jQuery.extend(jQuery.event,{trigger:function(event,data,elem,onlyHandlers){var i,cur,tmp,bubbleType,ontype,handle,special,eventPath=[elem||document],type=hasOwn.call(event,"type")?event.type:event,namespaces=hasOwn.call(event,"namespace")?event.namespace.split("."):[];cur=tmp=elem=elem||document;if(elem.nodeType===3||elem.nodeType===8){return;}
|
||
if(rfocusMorph.test(type+jQuery.event.triggered)){return;}
|
||
if(type.indexOf(".")>-1){namespaces=type.split(".");type=namespaces.shift();namespaces.sort();}
|
||
ontype=type.indexOf(":")<0&&"on"+type;event=event[jQuery.expando]?event:new jQuery.Event(type,typeof event==="object"&&event);event.isTrigger=onlyHandlers?2:3;event.namespace=namespaces.join(".");event.rnamespace=event.namespace?new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)"):null;event.result=undefined;if(!event.target){event.target=elem;}
|
||
data=data==null?[event]:jQuery.makeArray(data,[event]);special=jQuery.event.special[type]||{};if(!onlyHandlers&&special.trigger&&special.trigger.apply(elem,data)===false){return;}
|
||
if(!onlyHandlers&&!special.noBubble&&!jQuery.isWindow(elem)){bubbleType=special.delegateType||type;if(!rfocusMorph.test(bubbleType+type)){cur=cur.parentNode;}
|
||
for(;cur;cur=cur.parentNode){eventPath.push(cur);tmp=cur;}
|
||
if(tmp===(elem.ownerDocument||document)){eventPath.push(tmp.defaultView||tmp.parentWindow||window);}}
|
||
i=0;while((cur=eventPath[i++])&&!event.isPropagationStopped()){event.type=i>1?bubbleType:special.bindType||type;handle=(dataPriv.get(cur,"events")||{})[event.type]&&dataPriv.get(cur,"handle");if(handle){handle.apply(cur,data);}
|
||
handle=ontype&&cur[ontype];if(handle&&handle.apply&&acceptData(cur)){event.result=handle.apply(cur,data);if(event.result===false){event.preventDefault();}}}
|
||
event.type=type;if(!onlyHandlers&&!event.isDefaultPrevented()){if((!special._default||special._default.apply(eventPath.pop(),data)===false)&&acceptData(elem)){if(ontype&&jQuery.isFunction(elem[type])&&!jQuery.isWindow(elem)){tmp=elem[ontype];if(tmp){elem[ontype]=null;}
|
||
jQuery.event.triggered=type;elem[type]();jQuery.event.triggered=undefined;if(tmp){elem[ontype]=tmp;}}}}
|
||
return event.result;},simulate:function(type,elem,event){var e=jQuery.extend(new jQuery.Event(),event,{type:type,isSimulated:true});jQuery.event.trigger(e,null,elem);}});jQuery.fn.extend({trigger:function(type,data){return this.each(function(){jQuery.event.trigger(type,data,this);});},triggerHandler:function(type,data){var elem=this[0];if(elem){return jQuery.event.trigger(type,data,elem,true);}}});jQuery.each(("blur focus focusin focusout resize scroll click dblclick "+"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave "+"change select submit keydown keypress keyup contextmenu").split(" "),function(i,name){jQuery.fn[name]=function(data,fn){return arguments.length>0?this.on(name,null,data,fn):this.trigger(name);};});jQuery.fn.extend({hover:function(fnOver,fnOut){return this.mouseenter(fnOver).mouseleave(fnOut||fnOver);}});support.focusin="onfocusin"in window;if(!support.focusin){jQuery.each({focus:"focusin",blur:"focusout"},function(orig,fix){var handler=function(event){jQuery.event.simulate(fix,event.target,jQuery.event.fix(event));};jQuery.event.special[fix]={setup:function(){var doc=this.ownerDocument||this,attaches=dataPriv.access(doc,fix);if(!attaches){doc.addEventListener(orig,handler,true);}
|
||
dataPriv.access(doc,fix,(attaches||0)+1);},teardown:function(){var doc=this.ownerDocument||this,attaches=dataPriv.access(doc,fix)-1;if(!attaches){doc.removeEventListener(orig,handler,true);dataPriv.remove(doc,fix);}else{dataPriv.access(doc,fix,attaches);}}};});}
|
||
var location=window.location;var nonce=jQuery.now();var rquery=(/\?/);jQuery.parseXML=function(data){var xml;if(!data||typeof data!=="string"){return null;}
|
||
try{xml=(new window.DOMParser()).parseFromString(data,"text/xml");}catch(e){xml=undefined;}
|
||
if(!xml||xml.getElementsByTagName("parsererror").length){jQuery.error("Invalid XML: "+data);}
|
||
return xml;};var
|
||
rbracket=/\[\]$/,rCRLF=/\r?\n/g,rsubmitterTypes=/^(?:submit|button|image|reset|file)$/i,rsubmittable=/^(?:input|select|textarea|keygen)/i;function buildParams(prefix,obj,traditional,add){var name;if(Array.isArray(obj)){jQuery.each(obj,function(i,v){if(traditional||rbracket.test(prefix)){add(prefix,v);}else{buildParams(prefix+"["+(typeof v==="object"&&v!=null?i:"")+"]",v,traditional,add);}});}else if(!traditional&&jQuery.type(obj)==="object"){for(name in obj){buildParams(prefix+"["+name+"]",obj[name],traditional,add);}}else{add(prefix,obj);}}
|
||
jQuery.param=function(a,traditional){var prefix,s=[],add=function(key,valueOrFunction){var value=jQuery.isFunction(valueOrFunction)?valueOrFunction():valueOrFunction;s[s.length]=encodeURIComponent(key)+"="+
|
||
encodeURIComponent(value==null?"":value);};if(Array.isArray(a)||(a.jquery&&!jQuery.isPlainObject(a))){jQuery.each(a,function(){add(this.name,this.value);});}else{for(prefix in a){buildParams(prefix,a[prefix],traditional,add);}}
|
||
return s.join("&");};jQuery.fn.extend({serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){var elements=jQuery.prop(this,"elements");return elements?jQuery.makeArray(elements):this;}).filter(function(){var type=this.type;return this.name&&!jQuery(this).is(":disabled")&&rsubmittable.test(this.nodeName)&&!rsubmitterTypes.test(type)&&(this.checked||!rcheckableType.test(type));}).map(function(i,elem){var val=jQuery(this).val();if(val==null){return null;}
|
||
if(Array.isArray(val)){return jQuery.map(val,function(val){return{name:elem.name,value:val.replace(rCRLF,"\r\n")};});}
|
||
return{name:elem.name,value:val.replace(rCRLF,"\r\n")};}).get();}});var
|
||
r20=/%20/g,rhash=/#.*$/,rantiCache=/([?&])_=[^&]*/,rheaders=/^(.*?):[ \t]*([^\r\n]*)$/mg,rlocalProtocol=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,rnoContent=/^(?:GET|HEAD)$/,rprotocol=/^\/\//,prefilters={},transports={},allTypes="*/".concat("*"),originAnchor=document.createElement("a");originAnchor.href=location.href;function addToPrefiltersOrTransports(structure){return function(dataTypeExpression,func){if(typeof dataTypeExpression!=="string"){func=dataTypeExpression;dataTypeExpression="*";}
|
||
var dataType,i=0,dataTypes=dataTypeExpression.toLowerCase().match(rnothtmlwhite)||[];if(jQuery.isFunction(func)){while((dataType=dataTypes[i++])){if(dataType[0]==="+"){dataType=dataType.slice(1)||"*";(structure[dataType]=structure[dataType]||[]).unshift(func);}else{(structure[dataType]=structure[dataType]||[]).push(func);}}}};}
|
||
function inspectPrefiltersOrTransports(structure,options,originalOptions,jqXHR){var inspected={},seekingTransport=(structure===transports);function inspect(dataType){var selected;inspected[dataType]=true;jQuery.each(structure[dataType]||[],function(_,prefilterOrFactory){var dataTypeOrTransport=prefilterOrFactory(options,originalOptions,jqXHR);if(typeof dataTypeOrTransport==="string"&&!seekingTransport&&!inspected[dataTypeOrTransport]){options.dataTypes.unshift(dataTypeOrTransport);inspect(dataTypeOrTransport);return false;}else if(seekingTransport){return!(selected=dataTypeOrTransport);}});return selected;}
|
||
return inspect(options.dataTypes[0])||!inspected["*"]&&inspect("*");}
|
||
function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:(deep||(deep={})))[key]=src[key];}}
|
||
if(deep){jQuery.extend(true,target,deep);}
|
||
return target;}
|
||
function ajaxHandleResponses(s,jqXHR,responses){var ct,type,finalDataType,firstDataType,contents=s.contents,dataTypes=s.dataTypes;while(dataTypes[0]==="*"){dataTypes.shift();if(ct===undefined){ct=s.mimeType||jqXHR.getResponseHeader("Content-Type");}}
|
||
if(ct){for(type in contents){if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break;}}}
|
||
if(dataTypes[0]in responses){finalDataType=dataTypes[0];}else{for(type in responses){if(!dataTypes[0]||s.converters[type+" "+dataTypes[0]]){finalDataType=type;break;}
|
||
if(!firstDataType){firstDataType=type;}}
|
||
finalDataType=finalDataType||firstDataType;}
|
||
if(finalDataType){if(finalDataType!==dataTypes[0]){dataTypes.unshift(finalDataType);}
|
||
return responses[finalDataType];}}
|
||
function ajaxConvert(s,response,jqXHR,isSuccess){var conv2,current,conv,tmp,prev,converters={},dataTypes=s.dataTypes.slice();if(dataTypes[1]){for(conv in s.converters){converters[conv.toLowerCase()]=s.converters[conv];}}
|
||
current=dataTypes.shift();while(current){if(s.responseFields[current]){jqXHR[s.responseFields[current]]=response;}
|
||
if(!prev&&isSuccess&&s.dataFilter){response=s.dataFilter(response,s.dataType);}
|
||
prev=current;current=dataTypes.shift();if(current){if(current==="*"){current=prev;}else if(prev!=="*"&&prev!==current){conv=converters[prev+" "+current]||converters["* "+current];if(!conv){for(conv2 in converters){tmp=conv2.split(" ");if(tmp[1]===current){conv=converters[prev+" "+tmp[0]]||converters["* "+tmp[0]];if(conv){if(conv===true){conv=converters[conv2];}else if(converters[conv2]!==true){current=tmp[0];dataTypes.unshift(tmp[1]);}
|
||
break;}}}}
|
||
if(conv!==true){if(conv&&s.throws){response=conv(response);}else{try{response=conv(response);}catch(e){return{state:"parsererror",error:conv?e:"No conversion from "+prev+" to "+current};}}}}}}
|
||
return{state:"success",data:response};}
|
||
jQuery.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:location.href,type:"GET",isLocal:rlocalProtocol.test(location.protocol),global:true,processData:true,async:true,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":allTypes,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":true,"text json":JSON.parse,"text xml":jQuery.parseXML},flatOptions:{url:true,context:true}},ajaxSetup:function(target,settings){return settings?ajaxExtend(ajaxExtend(target,jQuery.ajaxSettings),settings):ajaxExtend(jQuery.ajaxSettings,target);},ajaxPrefilter:addToPrefiltersOrTransports(prefilters),ajaxTransport:addToPrefiltersOrTransports(transports),ajax:function(url,options){if(typeof url==="object"){options=url;url=undefined;}
|
||
options=options||{};var transport,cacheURL,responseHeadersString,responseHeaders,timeoutTimer,urlAnchor,completed,fireGlobals,i,uncached,s=jQuery.ajaxSetup({},options),callbackContext=s.context||s,globalEventContext=s.context&&(callbackContext.nodeType||callbackContext.jquery)?jQuery(callbackContext):jQuery.event,deferred=jQuery.Deferred(),completeDeferred=jQuery.Callbacks("once memory"),statusCode=s.statusCode||{},requestHeaders={},requestHeadersNames={},strAbort="canceled",jqXHR={readyState:0,getResponseHeader:function(key){var match;if(completed){if(!responseHeaders){responseHeaders={};while((match=rheaders.exec(responseHeadersString))){responseHeaders[match[1].toLowerCase()]=match[2];}}
|
||
match=responseHeaders[key.toLowerCase()];}
|
||
return match==null?null:match;},getAllResponseHeaders:function(){return completed?responseHeadersString:null;},setRequestHeader:function(name,value){if(completed==null){name=requestHeadersNames[name.toLowerCase()]=requestHeadersNames[name.toLowerCase()]||name;requestHeaders[name]=value;}
|
||
return this;},overrideMimeType:function(type){if(completed==null){s.mimeType=type;}
|
||
return this;},statusCode:function(map){var code;if(map){if(completed){jqXHR.always(map[jqXHR.status]);}else{for(code in map){statusCode[code]=[statusCode[code],map[code]];}}}
|
||
return this;},abort:function(statusText){var finalText=statusText||strAbort;if(transport){transport.abort(finalText);}
|
||
done(0,finalText);return this;}};deferred.promise(jqXHR);s.url=((url||s.url||location.href)+"").replace(rprotocol,location.protocol+"//");s.type=options.method||options.type||s.method||s.type;s.dataTypes=(s.dataType||"*").toLowerCase().match(rnothtmlwhite)||[""];if(s.crossDomain==null){urlAnchor=document.createElement("a");try{urlAnchor.href=s.url;urlAnchor.href=urlAnchor.href;s.crossDomain=originAnchor.protocol+"//"+originAnchor.host!==urlAnchor.protocol+"//"+urlAnchor.host;}catch(e){s.crossDomain=true;}}
|
||
if(s.data&&s.processData&&typeof s.data!=="string"){s.data=jQuery.param(s.data,s.traditional);}
|
||
inspectPrefiltersOrTransports(prefilters,s,options,jqXHR);if(completed){return jqXHR;}
|
||
fireGlobals=jQuery.event&&s.global;if(fireGlobals&&jQuery.active++===0){jQuery.event.trigger("ajaxStart");}
|
||
s.type=s.type.toUpperCase();s.hasContent=!rnoContent.test(s.type);cacheURL=s.url.replace(rhash,"");if(!s.hasContent){uncached=s.url.slice(cacheURL.length);if(s.data){cacheURL+=(rquery.test(cacheURL)?"&":"?")+s.data;delete s.data;}
|
||
if(s.cache===false){cacheURL=cacheURL.replace(rantiCache,"$1");uncached=(rquery.test(cacheURL)?"&":"?")+"_="+(nonce++)+uncached;}
|
||
s.url=cacheURL+uncached;}else if(s.data&&s.processData&&(s.contentType||"").indexOf("application/x-www-form-urlencoded")===0){s.data=s.data.replace(r20,"+");}
|
||
if(s.ifModified){if(jQuery.lastModified[cacheURL]){jqXHR.setRequestHeader("If-Modified-Since",jQuery.lastModified[cacheURL]);}
|
||
if(jQuery.etag[cacheURL]){jqXHR.setRequestHeader("If-None-Match",jQuery.etag[cacheURL]);}}
|
||
if(s.data&&s.hasContent&&s.contentType!==false||options.contentType){jqXHR.setRequestHeader("Content-Type",s.contentType);}
|
||
jqXHR.setRequestHeader("Accept",s.dataTypes[0]&&s.accepts[s.dataTypes[0]]?s.accepts[s.dataTypes[0]]+
|
||
(s.dataTypes[0]!=="*"?", "+allTypes+"; q=0.01":""):s.accepts["*"]);for(i in s.headers){jqXHR.setRequestHeader(i,s.headers[i]);}
|
||
if(s.beforeSend&&(s.beforeSend.call(callbackContext,jqXHR,s)===false||completed)){return jqXHR.abort();}
|
||
strAbort="abort";completeDeferred.add(s.complete);jqXHR.done(s.success);jqXHR.fail(s.error);transport=inspectPrefiltersOrTransports(transports,s,options,jqXHR);if(!transport){done(-1,"No Transport");}else{jqXHR.readyState=1;if(fireGlobals){globalEventContext.trigger("ajaxSend",[jqXHR,s]);}
|
||
if(completed){return jqXHR;}
|
||
if(s.async&&s.timeout>0){timeoutTimer=window.setTimeout(function(){jqXHR.abort("timeout");},s.timeout);}
|
||
try{completed=false;transport.send(requestHeaders,done);}catch(e){if(completed){throw e;}
|
||
done(-1,e);}}
|
||
function done(status,nativeStatusText,responses,headers){var isSuccess,success,error,response,modified,statusText=nativeStatusText;if(completed){return;}
|
||
completed=true;if(timeoutTimer){window.clearTimeout(timeoutTimer);}
|
||
transport=undefined;responseHeadersString=headers||"";jqXHR.readyState=status>0?4:0;isSuccess=status>=200&&status<300||status===304;if(responses){response=ajaxHandleResponses(s,jqXHR,responses);}
|
||
response=ajaxConvert(s,response,jqXHR,isSuccess);if(isSuccess){if(s.ifModified){modified=jqXHR.getResponseHeader("Last-Modified");if(modified){jQuery.lastModified[cacheURL]=modified;}
|
||
modified=jqXHR.getResponseHeader("etag");if(modified){jQuery.etag[cacheURL]=modified;}}
|
||
if(status===204||s.type==="HEAD"){statusText="nocontent";}else if(status===304){statusText="notmodified";}else{statusText=response.state;success=response.data;error=response.error;isSuccess=!error;}}else{error=statusText;if(status||!statusText){statusText="error";if(status<0){status=0;}}}
|
||
jqXHR.status=status;jqXHR.statusText=(nativeStatusText||statusText)+"";if(isSuccess){deferred.resolveWith(callbackContext,[success,statusText,jqXHR]);}else{deferred.rejectWith(callbackContext,[jqXHR,statusText,error]);}
|
||
jqXHR.statusCode(statusCode);statusCode=undefined;if(fireGlobals){globalEventContext.trigger(isSuccess?"ajaxSuccess":"ajaxError",[jqXHR,s,isSuccess?success:error]);}
|
||
completeDeferred.fireWith(callbackContext,[jqXHR,statusText]);if(fireGlobals){globalEventContext.trigger("ajaxComplete",[jqXHR,s]);if(!(--jQuery.active)){jQuery.event.trigger("ajaxStop");}}}
|
||
return jqXHR;},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");},getScript:function(url,callback){return jQuery.get(url,undefined,callback,"script");}});jQuery.each(["get","post"],function(i,method){jQuery[method]=function(url,data,callback,type){if(jQuery.isFunction(data)){type=type||callback;callback=data;data=undefined;}
|
||
return jQuery.ajax(jQuery.extend({url:url,type:method,dataType:type,data:data,success:callback},jQuery.isPlainObject(url)&&url));};});jQuery._evalUrl=function(url){return jQuery.ajax({url:url,type:"GET",dataType:"script",cache:true,async:false,global:false,"throws":true});};jQuery.fn.extend({wrapAll:function(html){var wrap;if(this[0]){if(jQuery.isFunction(html)){html=html.call(this[0]);}
|
||
wrap=jQuery(html,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){wrap.insertBefore(this[0]);}
|
||
wrap.map(function(){var elem=this;while(elem.firstElementChild){elem=elem.firstElementChild;}
|
||
return elem;}).append(this);}
|
||
return this;},wrapInner:function(html){if(jQuery.isFunction(html)){return this.each(function(i){jQuery(this).wrapInner(html.call(this,i));});}
|
||
return this.each(function(){var self=jQuery(this),contents=self.contents();if(contents.length){contents.wrapAll(html);}else{self.append(html);}});},wrap:function(html){var isFunction=jQuery.isFunction(html);return this.each(function(i){jQuery(this).wrapAll(isFunction?html.call(this,i):html);});},unwrap:function(selector){this.parent(selector).not("body").each(function(){jQuery(this).replaceWith(this.childNodes);});return this;}});jQuery.expr.pseudos.hidden=function(elem){return!jQuery.expr.pseudos.visible(elem);};jQuery.expr.pseudos.visible=function(elem){return!!(elem.offsetWidth||elem.offsetHeight||elem.getClientRects().length);};jQuery.ajaxSettings.xhr=function(){try{return new window.XMLHttpRequest();}catch(e){}};var xhrSuccessStatus={0:200,1223:204},xhrSupported=jQuery.ajaxSettings.xhr();support.cors=!!xhrSupported&&("withCredentials"in xhrSupported);support.ajax=xhrSupported=!!xhrSupported;jQuery.ajaxTransport(function(options){var callback,errorCallback;if(support.cors||xhrSupported&&!options.crossDomain){return{send:function(headers,complete){var i,xhr=options.xhr();xhr.open(options.type,options.url,options.async,options.username,options.password);if(options.xhrFields){for(i in options.xhrFields){xhr[i]=options.xhrFields[i];}}
|
||
if(options.mimeType&&xhr.overrideMimeType){xhr.overrideMimeType(options.mimeType);}
|
||
if(!options.crossDomain&&!headers["X-Requested-With"]){headers["X-Requested-With"]="XMLHttpRequest";}
|
||
for(i in headers){xhr.setRequestHeader(i,headers[i]);}
|
||
callback=function(type){return function(){if(callback){callback=errorCallback=xhr.onload=xhr.onerror=xhr.onabort=xhr.onreadystatechange=null;if(type==="abort"){xhr.abort();}else if(type==="error"){if(typeof xhr.status!=="number"){complete(0,"error");}else{complete(xhr.status,xhr.statusText);}}else{complete(xhrSuccessStatus[xhr.status]||xhr.status,xhr.statusText,(xhr.responseType||"text")!=="text"||typeof xhr.responseText!=="string"?{binary:xhr.response}:{text:xhr.responseText},xhr.getAllResponseHeaders());}}};};xhr.onload=callback();errorCallback=xhr.onerror=callback("error");if(xhr.onabort!==undefined){xhr.onabort=errorCallback;}else{xhr.onreadystatechange=function(){if(xhr.readyState===4){window.setTimeout(function(){if(callback){errorCallback();}});}};}
|
||
callback=callback("abort");try{xhr.send(options.hasContent&&options.data||null);}catch(e){if(callback){throw e;}}},abort:function(){if(callback){callback();}}};}});jQuery.ajaxPrefilter(function(s){if(s.crossDomain){s.contents.script=false;}});jQuery.ajaxSetup({accepts:{script:"text/javascript, application/javascript, "+"application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(text){jQuery.globalEval(text);return text;}}});jQuery.ajaxPrefilter("script",function(s){if(s.cache===undefined){s.cache=false;}
|
||
if(s.crossDomain){s.type="GET";}});jQuery.ajaxTransport("script",function(s){if(s.crossDomain){var script,callback;return{send:function(_,complete){script=jQuery("<script>").prop({charset:s.scriptCharset,src:s.url}).on("load error",callback=function(evt){script.remove();callback=null;if(evt){complete(evt.type==="error"?404:200,evt.type);}});document.head.appendChild(script[0]);},abort:function(){if(callback){callback();}}};}});var oldCallbacks=[],rjsonp=/(=)\?(?=&|$)|\?\?/;jQuery.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var callback=oldCallbacks.pop()||(jQuery.expando+"_"+(nonce++));this[callback]=true;return callback;}});jQuery.ajaxPrefilter("json jsonp",function(s,originalSettings,jqXHR){var callbackName,overwritten,responseContainer,jsonProp=s.jsonp!==false&&(rjsonp.test(s.url)?"url":typeof s.data==="string"&&(s.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&rjsonp.test(s.data)&&"data");if(jsonProp||s.dataTypes[0]==="jsonp"){callbackName=s.jsonpCallback=jQuery.isFunction(s.jsonpCallback)?s.jsonpCallback():s.jsonpCallback;if(jsonProp){s[jsonProp]=s[jsonProp].replace(rjsonp,"$1"+callbackName);}else if(s.jsonp!==false){s.url+=(rquery.test(s.url)?"&":"?")+s.jsonp+"="+callbackName;}
|
||
s.converters["script json"]=function(){if(!responseContainer){jQuery.error(callbackName+" was not called");}
|
||
return responseContainer[0];};s.dataTypes[0]="json";overwritten=window[callbackName];window[callbackName]=function(){responseContainer=arguments;};jqXHR.always(function(){if(overwritten===undefined){jQuery(window).removeProp(callbackName);}else{window[callbackName]=overwritten;}
|
||
if(s[callbackName]){s.jsonpCallback=originalSettings.jsonpCallback;oldCallbacks.push(callbackName);}
|
||
if(responseContainer&&jQuery.isFunction(overwritten)){overwritten(responseContainer[0]);}
|
||
responseContainer=overwritten=undefined;});return"script";}});support.createHTMLDocument=(function(){var body=document.implementation.createHTMLDocument("").body;body.innerHTML="<form></form><form></form>";return body.childNodes.length===2;})();jQuery.parseHTML=function(data,context,keepScripts){if(typeof data!=="string"){return[];}
|
||
if(typeof context==="boolean"){keepScripts=context;context=false;}
|
||
var base,parsed,scripts;if(!context){if(support.createHTMLDocument){context=document.implementation.createHTMLDocument("");base=context.createElement("base");base.href=document.location.href;context.head.appendChild(base);}else{context=document;}}
|
||
parsed=rsingleTag.exec(data);scripts=!keepScripts&&[];if(parsed){return[context.createElement(parsed[1])];}
|
||
parsed=buildFragment([data],context,scripts);if(scripts&&scripts.length){jQuery(scripts).remove();}
|
||
return jQuery.merge([],parsed.childNodes);};jQuery.fn.load=function(url,params,callback){var selector,type,response,self=this,off=url.indexOf(" ");if(off>-1){selector=stripAndCollapse(url.slice(off));url=url.slice(0,off);}
|
||
if(jQuery.isFunction(params)){callback=params;params=undefined;}else if(params&&typeof params==="object"){type="POST";}
|
||
if(self.length>0){jQuery.ajax({url:url,type:type||"GET",dataType:"html",data:params}).done(function(responseText){response=arguments;self.html(selector?jQuery("<div>").append(jQuery.parseHTML(responseText)).find(selector):responseText);}).always(callback&&function(jqXHR,status){self.each(function(){callback.apply(this,response||[jqXHR.responseText,status,jqXHR]);});});}
|
||
return this;};jQuery.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(i,type){jQuery.fn[type]=function(fn){return this.on(type,fn);};});jQuery.expr.pseudos.animated=function(elem){return jQuery.grep(jQuery.timers,function(fn){return elem===fn.elem;}).length;};jQuery.offset={setOffset:function(elem,options,i){var curPosition,curLeft,curCSSTop,curTop,curOffset,curCSSLeft,calculatePosition,position=jQuery.css(elem,"position"),curElem=jQuery(elem),props={};if(position==="static"){elem.style.position="relative";}
|
||
curOffset=curElem.offset();curCSSTop=jQuery.css(elem,"top");curCSSLeft=jQuery.css(elem,"left");calculatePosition=(position==="absolute"||position==="fixed")&&(curCSSTop+curCSSLeft).indexOf("auto")>-1;if(calculatePosition){curPosition=curElem.position();curTop=curPosition.top;curLeft=curPosition.left;}else{curTop=parseFloat(curCSSTop)||0;curLeft=parseFloat(curCSSLeft)||0;}
|
||
if(jQuery.isFunction(options)){options=options.call(elem,i,jQuery.extend({},curOffset));}
|
||
if(options.top!=null){props.top=(options.top-curOffset.top)+curTop;}
|
||
if(options.left!=null){props.left=(options.left-curOffset.left)+curLeft;}
|
||
if("using"in options){options.using.call(elem,props);}else{curElem.css(props);}}};jQuery.fn.extend({offset:function(options){if(arguments.length){return options===undefined?this:this.each(function(i){jQuery.offset.setOffset(this,options,i);});}
|
||
var doc,docElem,rect,win,elem=this[0];if(!elem){return;}
|
||
if(!elem.getClientRects().length){return{top:0,left:0};}
|
||
rect=elem.getBoundingClientRect();doc=elem.ownerDocument;docElem=doc.documentElement;win=doc.defaultView;return{top:rect.top+win.pageYOffset-docElem.clientTop,left:rect.left+win.pageXOffset-docElem.clientLeft};},position:function(){if(!this[0]){return;}
|
||
var offsetParent,offset,elem=this[0],parentOffset={top:0,left:0};if(jQuery.css(elem,"position")==="fixed"){offset=elem.getBoundingClientRect();}else{offsetParent=this.offsetParent();offset=this.offset();if(!nodeName(offsetParent[0],"html")){parentOffset=offsetParent.offset();}
|
||
parentOffset={top:parentOffset.top+jQuery.css(offsetParent[0],"borderTopWidth",true),left:parentOffset.left+jQuery.css(offsetParent[0],"borderLeftWidth",true)};}
|
||
return{top:offset.top-parentOffset.top-jQuery.css(elem,"marginTop",true),left:offset.left-parentOffset.left-jQuery.css(elem,"marginLeft",true)};},offsetParent:function(){return this.map(function(){var offsetParent=this.offsetParent;while(offsetParent&&jQuery.css(offsetParent,"position")==="static"){offsetParent=offsetParent.offsetParent;}
|
||
return offsetParent||documentElement;});}});jQuery.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(method,prop){var top="pageYOffset"===prop;jQuery.fn[method]=function(val){return access(this,function(elem,method,val){var win;if(jQuery.isWindow(elem)){win=elem;}else if(elem.nodeType===9){win=elem.defaultView;}
|
||
if(val===undefined){return win?win[prop]:elem[method];}
|
||
if(win){win.scrollTo(!top?val:win.pageXOffset,top?val:win.pageYOffset);}else{elem[method]=val;}},method,val,arguments.length);};});jQuery.each(["top","left"],function(i,prop){jQuery.cssHooks[prop]=addGetHookIf(support.pixelPosition,function(elem,computed){if(computed){computed=curCSS(elem,prop);return rnumnonpx.test(computed)?jQuery(elem).position()[prop]+"px":computed;}});});jQuery.each({Height:"height",Width:"width"},function(name,type){jQuery.each({padding:"inner"+name,content:type,"":"outer"+name},function(defaultExtra,funcName){jQuery.fn[funcName]=function(margin,value){var chainable=arguments.length&&(defaultExtra||typeof margin!=="boolean"),extra=defaultExtra||(margin===true||value===true?"margin":"border");return access(this,function(elem,type,value){var doc;if(jQuery.isWindow(elem)){return funcName.indexOf("outer")===0?elem["inner"+name]:elem.document.documentElement["client"+name];}
|
||
if(elem.nodeType===9){doc=elem.documentElement;return Math.max(elem.body["scroll"+name],doc["scroll"+name],elem.body["offset"+name],doc["offset"+name],doc["client"+name]);}
|
||
return value===undefined?jQuery.css(elem,type,extra):jQuery.style(elem,type,value,extra);},type,chainable?margin:undefined,chainable);};});});jQuery.fn.extend({bind:function(types,data,fn){return this.on(types,null,data,fn);},unbind:function(types,fn){return this.off(types,null,fn);},delegate:function(selector,types,data,fn){return this.on(types,selector,data,fn);},undelegate:function(selector,types,fn){return arguments.length===1?this.off(selector,"**"):this.off(types,selector||"**",fn);}});jQuery.holdReady=function(hold){if(hold){jQuery.readyWait++;}else{jQuery.ready(true);}};jQuery.isArray=Array.isArray;jQuery.parseJSON=JSON.parse;jQuery.nodeName=nodeName;if(true){!(__WEBPACK_AMD_DEFINE_ARRAY__=[],__WEBPACK_AMD_DEFINE_RESULT__=function(){return jQuery;}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),__WEBPACK_AMD_DEFINE_RESULT__!==undefined&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__));}
|
||
var
|
||
_jQuery=window.jQuery,_$=window.$;jQuery.noConflict=function(deep){if(window.$===jQuery){window.$=_$;}
|
||
if(deep&&window.jQuery===jQuery){window.jQuery=_jQuery;}
|
||
return jQuery;};if(!noGlobal){window.jQuery=window.$=jQuery;}
|
||
return jQuery;});}),(function(module,exports){
|
||
/*! modernizr 3.5.0 (Custom Build) | MIT *
|
||
* https://modernizr.com/download/?-flexbox-flexboxlegacy-flexboxtweener-flexwrap-setclasses !*/
|
||
!function(e,n,t){function r(e,n){return typeof e===n}function o(){var e,n,t,o,s,i,l;for(var a in x)if(x.hasOwnProperty(a)){if(e=[],n=x[a],n.name&&(e.push(n.name.toLowerCase()),n.options&&n.options.aliases&&n.options.aliases.length))for(t=0;t<n.options.aliases.length;t++)e.push(n.options.aliases[t].toLowerCase());for(o=r(n.fn,"function")?n.fn():n.fn,s=0;s<e.length;s++)i=e[s],l=i.split("."),1===l.length?Modernizr[l[0]]=o:(!Modernizr[l[0]]||Modernizr[l[0]]instanceof Boolean||(Modernizr[l[0]]=new Boolean(Modernizr[l[0]])),Modernizr[l[0]][l[1]]=o),w.push((o?"":"no-")+l.join("-"))}}function s(e){var n=S.className,t=Modernizr._config.classPrefix||"";if(_&&(n=n.baseVal),Modernizr._config.enableJSClass){var r=new RegExp("(^|\\s)"+t+"no-js(\\s|$)");n=n.replace(r,"$1"+t+"js$2")}Modernizr._config.enableClasses&&(n+=" "+t+e.join(" "+t),_?S.className.baseVal=n:S.className=n)}function i(e,n){return!!~(""+e).indexOf(n)}function l(){return"function"!=typeof n.createElement?n.createElement(arguments[0]):_?n.createElementNS.call(n,"http://www.w3.org/2000/svg",arguments[0]):n.createElement.apply(n,arguments)}function a(){var e=n.body;return e||(e=l(_?"svg":"body"),e.fake=!0),e}function f(e,t,r,o){var s,i,f,u,d="modernizr",c=l("div"),p=a();if(parseInt(r,10))for(;r--;)f=l("div"),f.id=o?o[r]:d+(r+1),c.appendChild(f);return s=l("style"),s.type="text/css",s.id="s"+d,(p.fake?p:c).appendChild(s),p.appendChild(c),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(n.createTextNode(e)),c.id=d,p.fake&&(p.style.background="",p.style.overflow="hidden",u=S.style.overflow,S.style.overflow="hidden",S.appendChild(p)),i=t(c,e),p.fake?(p.parentNode.removeChild(p),S.style.overflow=u,S.offsetHeight):c.parentNode.removeChild(c),!!i}function u(e){return e.replace(/([A-Z])/g,function(e,n){return"-"+n.toLowerCase()}).replace(/^ms-/,"-ms-")}function d(n,t,r){var o;if("getComputedStyle"in e){o=getComputedStyle.call(e,n,t);var s=e.console;if(null!==o)r&&(o=o.getPropertyValue(r));else if(s){var i=s.error?"error":"log";s[i].call(s,"getComputedStyle returning null, its possible modernizr test results are inaccurate")}}else o=!t&&n.currentStyle&&n.currentStyle[r];return o}function c(n,r){var o=n.length;if("CSS"in e&&"supports"in e.CSS){for(;o--;)if(e.CSS.supports(u(n[o]),r))return!0;return!1}if("CSSSupportsRule"in e){for(var s=[];o--;)s.push("("+u(n[o])+":"+r+")");return s=s.join(" or "),f("@supports ("+s+") { #modernizr { position: absolute; } }",function(e){return"absolute"==d(e,null,"position")})}return t}function p(e){return e.replace(/([a-z])-([a-z])/g,function(e,n,t){return n+t.toUpperCase()}).replace(/^-/,"")}function m(e,n,o,s){function a(){u&&(delete z.style,delete z.modElem)}if(s=r(s,"undefined")?!1:s,!r(o,"undefined")){var f=c(e,o);if(!r(f,"undefined"))return f}for(var u,d,m,y,g,v=["modernizr","tspan","samp"];!z.style&&v.length;)u=!0,z.modElem=l(v.shift()),z.style=z.modElem.style;for(m=e.length,d=0;m>d;d++)if(y=e[d],g=z.style[y],i(y,"-")&&(y=p(y)),z.style[y]!==t){if(s||r(o,"undefined"))return a(),"pfx"==n?y:!0;try{z.style[y]=o}catch(h){}if(z.style[y]!=g)return a(),"pfx"==n?y:!0}return a(),!1}function y(e,n){return function(){return e.apply(n,arguments)}}function g(e,n,t){var o;for(var s in e)if(e[s]in n)return t===!1?e[s]:(o=n[e[s]],r(o,"function")?y(o,t||n):o);return!1}function v(e,n,t,o,s){var i=e.charAt(0).toUpperCase()+e.slice(1),l=(e+" "+P.join(i+" ")+i).split(" ");return r(n,"string")||r(n,"undefined")?m(l,n,o,s):(l=(e+" "+E.join(i+" ")+i).split(" "),g(l,n,t))}function h(e,n,r){return v(e,t,t,n,r)}var x=[],C={_version:"3.5.0",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,n){var t=this;setTimeout(function(){n(t[e])},0)},addTest:function(e,n,t){x.push({name:e,fn:n,options:t})},addAsyncTest:function(e){x.push({name:null,fn:e})}},Modernizr=function(){};Modernizr.prototype=C,Modernizr=new Modernizr;var w=[],S=n.documentElement,_="svg"===S.nodeName.toLowerCase(),b="Moz O ms Webkit",P=C._config.usePrefixes?b.split(" "):[];C._cssomPrefixes=P;var T={elem:l("modernizr")};Modernizr._q.push(function(){delete T.elem});var z={style:T.elem.style};Modernizr._q.unshift(function(){delete z.style});var E=C._config.usePrefixes?b.toLowerCase().split(" "):[];C._domPrefixes=E,C.testAllProps=v,C.testAllProps=h,Modernizr.addTest("flexbox",h("flexBasis","1px",!0)),Modernizr.addTest("flexboxlegacy",h("boxDirection","reverse",!0)),Modernizr.addTest("flexboxtweener",h("flexAlign","end",!0)),Modernizr.addTest("flexwrap",h("flexWrap","wrap",!0)),o(),s(w),delete C.addTest,delete C.addAsyncTest;for(var N=0;N<Modernizr._q.length;N++)Modernizr._q[N]();e.Modernizr=Modernizr}(window,document);}),(function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(setImmediate){
|
||
/*!
|
||
* typeahead.js 0.11.1
|
||
* https://github.com/twitter/typeahead.js
|
||
* Copyright 2013-2015 Twitter, Inc. and other contributors; Licensed MIT
|
||
*/
|
||
(function(root,factory){if(true){!(__WEBPACK_AMD_DEFINE_ARRAY__=[__webpack_require__(1)],__WEBPACK_AMD_DEFINE_RESULT__=function(a0){return factory(a0);}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),__WEBPACK_AMD_DEFINE_RESULT__!==undefined&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__));}else if(typeof exports==="object"){module.exports=factory(require("jquery"));}else{factory(jQuery);}})(this,function($){var _=function(){"use strict";return{isMsie:function(){return/(msie|trident)/i.test(navigator.userAgent)?navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2]:false;},isBlankString:function(str){return!str||/^\s*$/.test(str);},escapeRegExChars:function(str){return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");},isString:function(obj){return typeof obj==="string";},isNumber:function(obj){return typeof obj==="number";},isArray:$.isArray,isFunction:$.isFunction,isObject:$.isPlainObject,isUndefined:function(obj){return typeof obj==="undefined";},isElement:function(obj){return!!(obj&&obj.nodeType===1);},isJQuery:function(obj){return obj instanceof $;},toStr:function toStr(s){return _.isUndefined(s)||s===null?"":s+"";},bind:$.proxy,each:function(collection,cb){$.each(collection,reverseArgs);function reverseArgs(index,value){return cb(value,index);}},map:$.map,filter:$.grep,every:function(obj,test){var result=true;if(!obj){return result;}
|
||
$.each(obj,function(key,val){if(!(result=test.call(null,val,key,obj))){return false;}});return!!result;},some:function(obj,test){var result=false;if(!obj){return result;}
|
||
$.each(obj,function(key,val){if(result=test.call(null,val,key,obj)){return false;}});return!!result;},mixin:$.extend,identity:function(x){return x;},clone:function(obj){return $.extend(true,{},obj);},getIdGenerator:function(){var counter=0;return function(){return counter++;};},templatify:function templatify(obj){return $.isFunction(obj)?obj:template;function template(){return String(obj);}},defer:function(fn){setTimeout(fn,0);},debounce:function(func,wait,immediate){var timeout,result;return function(){var context=this,args=arguments,later,callNow;later=function(){timeout=null;if(!immediate){result=func.apply(context,args);}};callNow=immediate&&!timeout;clearTimeout(timeout);timeout=setTimeout(later,wait);if(callNow){result=func.apply(context,args);}
|
||
return result;};},throttle:function(func,wait){var context,args,timeout,result,previous,later;previous=0;later=function(){previous=new Date();timeout=null;result=func.apply(context,args);};return function(){var now=new Date(),remaining=wait-(now-previous);context=this;args=arguments;if(remaining<=0){clearTimeout(timeout);timeout=null;previous=now;result=func.apply(context,args);}else if(!timeout){timeout=setTimeout(later,remaining);}
|
||
return result;};},stringify:function(val){return _.isString(val)?val:JSON.stringify(val);},noop:function(){}};}();var WWW=function(){"use strict";var defaultClassNames={wrapper:"twitter-typeahead",input:"tt-input",hint:"tt-hint",menu:"tt-menu",dataset:"tt-dataset",suggestion:"tt-suggestion",selectable:"tt-selectable",empty:"tt-empty",open:"tt-open",cursor:"tt-cursor",highlight:"tt-highlight"};return build;function build(o){var www,classes;classes=_.mixin({},defaultClassNames,o);www={css:buildCss(),classes:classes,html:buildHtml(classes),selectors:buildSelectors(classes)};return{css:www.css,html:www.html,classes:www.classes,selectors:www.selectors,mixin:function(o){_.mixin(o,www);}};}
|
||
function buildHtml(c){return{wrapper:'<span class="'+c.wrapper+'"></span>',menu:'<div class="'+c.menu+'"></div>'};}
|
||
function buildSelectors(classes){var selectors={};_.each(classes,function(v,k){selectors[k]="."+v;});return selectors;}
|
||
function buildCss(){var css={wrapper:{position:"relative",display:"inline-block"},hint:{position:"absolute",top:"0",left:"0",borderColor:"transparent",boxShadow:"none",opacity:"1"},input:{position:"relative",verticalAlign:"top",backgroundColor:"transparent"},inputWithNoHint:{position:"relative",verticalAlign:"top"},menu:{position:"absolute",top:"100%",left:"0",zIndex:"100",display:"none"},ltr:{left:"0",right:"auto"},rtl:{left:"auto",right:" 0"}};if(_.isMsie()){_.mixin(css.input,{backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"});}
|
||
return css;}}();var EventBus=function(){"use strict";var namespace,deprecationMap;namespace="typeahead:";deprecationMap={render:"rendered",cursorchange:"cursorchanged",select:"selected",autocomplete:"autocompleted"};function EventBus(o){if(!o||!o.el){$.error("EventBus initialized without el");}
|
||
this.$el=$(o.el);}
|
||
_.mixin(EventBus.prototype,{_trigger:function(type,args){var $e;$e=$.Event(namespace+type);(args=args||[]).unshift($e);this.$el.trigger.apply(this.$el,args);return $e;},before:function(type){var args,$e;args=[].slice.call(arguments,1);$e=this._trigger("before"+type,args);return $e.isDefaultPrevented();},trigger:function(type){var deprecatedType;this._trigger(type,[].slice.call(arguments,1));if(deprecatedType=deprecationMap[type]){this._trigger(deprecatedType,[].slice.call(arguments,1));}}});return EventBus;}();var EventEmitter=function(){"use strict";var splitter=/\s+/,nextTick=getNextTick();return{onSync:onSync,onAsync:onAsync,off:off,trigger:trigger};function on(method,types,cb,context){var type;if(!cb){return this;}
|
||
types=types.split(splitter);cb=context?bindContext(cb,context):cb;this._callbacks=this._callbacks||{};while(type=types.shift()){this._callbacks[type]=this._callbacks[type]||{sync:[],async:[]};this._callbacks[type][method].push(cb);}
|
||
return this;}
|
||
function onAsync(types,cb,context){return on.call(this,"async",types,cb,context);}
|
||
function onSync(types,cb,context){return on.call(this,"sync",types,cb,context);}
|
||
function off(types){var type;if(!this._callbacks){return this;}
|
||
types=types.split(splitter);while(type=types.shift()){delete this._callbacks[type];}
|
||
return this;}
|
||
function trigger(types){var type,callbacks,args,syncFlush,asyncFlush;if(!this._callbacks){return this;}
|
||
types=types.split(splitter);args=[].slice.call(arguments,1);while((type=types.shift())&&(callbacks=this._callbacks[type])){syncFlush=getFlush(callbacks.sync,this,[type].concat(args));asyncFlush=getFlush(callbacks.async,this,[type].concat(args));syncFlush()&&nextTick(asyncFlush);}
|
||
return this;}
|
||
function getFlush(callbacks,context,args){return flush;function flush(){var cancelled;for(var i=0,len=callbacks.length;!cancelled&&i<len;i+=1){cancelled=callbacks[i].apply(context,args)===false;}
|
||
return!cancelled;}}
|
||
function getNextTick(){var nextTickFn;if(window.setImmediate){nextTickFn=function nextTickSetImmediate(fn){setImmediate(function(){fn();});};}else{nextTickFn=function nextTickSetTimeout(fn){setTimeout(function(){fn();},0);};}
|
||
return nextTickFn;}
|
||
function bindContext(fn,context){return fn.bind?fn.bind(context):function(){fn.apply(context,[].slice.call(arguments,0));};}}();var highlight=function(doc){"use strict";var defaults={node:null,pattern:null,tagName:"strong",className:null,wordsOnly:false,caseSensitive:false};return function hightlight(o){var regex;o=_.mixin({},defaults,o);if(!o.node||!o.pattern){return;}
|
||
o.pattern=_.isArray(o.pattern)?o.pattern:[o.pattern];regex=getRegex(o.pattern,o.caseSensitive,o.wordsOnly);traverse(o.node,hightlightTextNode);function hightlightTextNode(textNode){var match,patternNode,wrapperNode;if(match=regex.exec(textNode.data)){wrapperNode=doc.createElement(o.tagName);o.className&&(wrapperNode.className=o.className);patternNode=textNode.splitText(match.index);patternNode.splitText(match[0].length);wrapperNode.appendChild(patternNode.cloneNode(true));textNode.parentNode.replaceChild(wrapperNode,patternNode);}
|
||
return!!match;}
|
||
function traverse(el,hightlightTextNode){var childNode,TEXT_NODE_TYPE=3;for(var i=0;i<el.childNodes.length;i++){childNode=el.childNodes[i];if(childNode.nodeType===TEXT_NODE_TYPE){i+=hightlightTextNode(childNode)?1:0;}else{traverse(childNode,hightlightTextNode);}}}};function getRegex(patterns,caseSensitive,wordsOnly){var escapedPatterns=[],regexStr;for(var i=0,len=patterns.length;i<len;i++){escapedPatterns.push(_.escapeRegExChars(patterns[i]));}
|
||
regexStr=wordsOnly?"\\b("+escapedPatterns.join("|")+")\\b":"("+escapedPatterns.join("|")+")";return caseSensitive?new RegExp(regexStr):new RegExp(regexStr,"i");}}(window.document);var Input=function(){"use strict";var specialKeyCodeMap;specialKeyCodeMap={9:"tab",27:"esc",37:"left",39:"right",13:"enter",38:"up",40:"down"};function Input(o,www){o=o||{};if(!o.input){$.error("input is missing");}
|
||
www.mixin(this);this.$hint=$(o.hint);this.$input=$(o.input);this.query=this.$input.val();this.queryWhenFocused=this.hasFocus()?this.query:null;this.$overflowHelper=buildOverflowHelper(this.$input);this._checkLanguageDirection();if(this.$hint.length===0){this.setHint=this.getHint=this.clearHint=this.clearHintIfInvalid=_.noop;}}
|
||
Input.normalizeQuery=function(str){return _.toStr(str).replace(/^\s*/g,"").replace(/\s{2,}/g," ");};_.mixin(Input.prototype,EventEmitter,{_onBlur:function onBlur(){this.resetInputValue();this.trigger("blurred");},_onFocus:function onFocus(){this.queryWhenFocused=this.query;this.trigger("focused");},_onKeydown:function onKeydown($e){var keyName=specialKeyCodeMap[$e.which||$e.keyCode];this._managePreventDefault(keyName,$e);if(keyName&&this._shouldTrigger(keyName,$e)){this.trigger(keyName+"Keyed",$e);}},_onInput:function onInput(){this._setQuery(this.getInputValue());this.clearHintIfInvalid();this._checkLanguageDirection();},_managePreventDefault:function managePreventDefault(keyName,$e){var preventDefault;switch(keyName){case"up":case"down":preventDefault=!withModifier($e);break;default:preventDefault=false;}
|
||
preventDefault&&$e.preventDefault();},_shouldTrigger:function shouldTrigger(keyName,$e){var trigger;switch(keyName){case"tab":trigger=!withModifier($e);break;default:trigger=true;}
|
||
return trigger;},_checkLanguageDirection:function checkLanguageDirection(){var dir=(this.$input.css("direction")||"ltr").toLowerCase();if(this.dir!==dir){this.dir=dir;this.$hint.attr("dir",dir);this.trigger("langDirChanged",dir);}},_setQuery:function setQuery(val,silent){var areEquivalent,hasDifferentWhitespace;areEquivalent=areQueriesEquivalent(val,this.query);hasDifferentWhitespace=areEquivalent?this.query.length!==val.length:false;this.query=val;if(!silent&&!areEquivalent){this.trigger("queryChanged",this.query);}else if(!silent&&hasDifferentWhitespace){this.trigger("whitespaceChanged",this.query);}},bind:function(){var that=this,onBlur,onFocus,onKeydown,onInput;onBlur=_.bind(this._onBlur,this);onFocus=_.bind(this._onFocus,this);onKeydown=_.bind(this._onKeydown,this);onInput=_.bind(this._onInput,this);this.$input.on("blur.tt",onBlur).on("focus.tt",onFocus).on("keydown.tt",onKeydown);if(!_.isMsie()||_.isMsie()>9){this.$input.on("input.tt",onInput);}else{this.$input.on("keydown.tt keypress.tt cut.tt paste.tt",function($e){if(specialKeyCodeMap[$e.which||$e.keyCode]){return;}
|
||
_.defer(_.bind(that._onInput,that,$e));});}
|
||
return this;},focus:function focus(){this.$input.focus();},blur:function blur(){this.$input.blur();},getLangDir:function getLangDir(){return this.dir;},getQuery:function getQuery(){return this.query||"";},setQuery:function setQuery(val,silent){this.setInputValue(val);this._setQuery(val,silent);},hasQueryChangedSinceLastFocus:function hasQueryChangedSinceLastFocus(){return this.query!==this.queryWhenFocused;},getInputValue:function getInputValue(){return this.$input.val();},setInputValue:function setInputValue(value){this.$input.val(value);this.clearHintIfInvalid();this._checkLanguageDirection();},resetInputValue:function resetInputValue(){this.setInputValue(this.query);},getHint:function getHint(){return this.$hint.val();},setHint:function setHint(value){this.$hint.val(value);},clearHint:function clearHint(){this.setHint("");},clearHintIfInvalid:function clearHintIfInvalid(){var val,hint,valIsPrefixOfHint,isValid;val=this.getInputValue();hint=this.getHint();valIsPrefixOfHint=val!==hint&&hint.indexOf(val)===0;isValid=val!==""&&valIsPrefixOfHint&&!this.hasOverflow();!isValid&&this.clearHint();},hasFocus:function hasFocus(){return this.$input.is(":focus");},hasOverflow:function hasOverflow(){var constraint=this.$input.width()-2;this.$overflowHelper.text(this.getInputValue());return this.$overflowHelper.width()>=constraint;},isCursorAtEnd:function(){var valueLength,selectionStart,range;valueLength=this.$input.val().length;selectionStart=this.$input[0].selectionStart;if(_.isNumber(selectionStart)){return selectionStart===valueLength;}else if(document.selection){range=document.selection.createRange();range.moveStart("character",-valueLength);return valueLength===range.text.length;}
|
||
return true;},destroy:function destroy(){this.$hint.off(".tt");this.$input.off(".tt");this.$overflowHelper.remove();this.$hint=this.$input=this.$overflowHelper=$("<div>");}});return Input;function buildOverflowHelper($input){return $('<pre aria-hidden="true"></pre>').css({position:"absolute",visibility:"hidden",whiteSpace:"pre",fontFamily:$input.css("font-family"),fontSize:$input.css("font-size"),fontStyle:$input.css("font-style"),fontVariant:$input.css("font-variant"),fontWeight:$input.css("font-weight"),wordSpacing:$input.css("word-spacing"),letterSpacing:$input.css("letter-spacing"),textIndent:$input.css("text-indent"),textRendering:$input.css("text-rendering"),textTransform:$input.css("text-transform")}).insertAfter($input);}
|
||
function areQueriesEquivalent(a,b){return Input.normalizeQuery(a)===Input.normalizeQuery(b);}
|
||
function withModifier($e){return $e.altKey||$e.ctrlKey||$e.metaKey||$e.shiftKey;}}();var Dataset=function(){"use strict";var keys,nameGenerator;keys={val:"tt-selectable-display",obj:"tt-selectable-object"};nameGenerator=_.getIdGenerator();function Dataset(o,www){o=o||{};o.templates=o.templates||{};o.templates.notFound=o.templates.notFound||o.templates.empty;if(!o.source){$.error("missing source");}
|
||
if(!o.node){$.error("missing node");}
|
||
if(o.name&&!isValidName(o.name)){$.error("invalid dataset name: "+o.name);}
|
||
www.mixin(this);this.highlight=!!o.highlight;this.name=o.name||nameGenerator();this.limit=o.limit||5;this.displayFn=getDisplayFn(o.display||o.displayKey);this.templates=getTemplates(o.templates,this.displayFn);this.source=o.source.__ttAdapter?o.source.__ttAdapter():o.source;this.async=_.isUndefined(o.async)?this.source.length>2:!!o.async;this._resetLastSuggestion();this.$el=$(o.node).addClass(this.classes.dataset).addClass(this.classes.dataset+"-"+this.name);}
|
||
Dataset.extractData=function extractData(el){var $el=$(el);if($el.data(keys.obj)){return{val:$el.data(keys.val)||"",obj:$el.data(keys.obj)||null};}
|
||
return null;};_.mixin(Dataset.prototype,EventEmitter,{_overwrite:function overwrite(query,suggestions){suggestions=suggestions||[];if(suggestions.length){this._renderSuggestions(query,suggestions);}else if(this.async&&this.templates.pending){this._renderPending(query);}else if(!this.async&&this.templates.notFound){this._renderNotFound(query);}else{this._empty();}
|
||
this.trigger("rendered",this.name,suggestions,false);},_append:function append(query,suggestions){suggestions=suggestions||[];if(suggestions.length&&this.$lastSuggestion.length){this._appendSuggestions(query,suggestions);}else if(suggestions.length){this._renderSuggestions(query,suggestions);}else if(!this.$lastSuggestion.length&&this.templates.notFound){this._renderNotFound(query);}
|
||
this.trigger("rendered",this.name,suggestions,true);},_renderSuggestions:function renderSuggestions(query,suggestions){var $fragment;$fragment=this._getSuggestionsFragment(query,suggestions);this.$lastSuggestion=$fragment.children().last();this.$el.html($fragment).prepend(this._getHeader(query,suggestions)).append(this._getFooter(query,suggestions));},_appendSuggestions:function appendSuggestions(query,suggestions){var $fragment,$lastSuggestion;$fragment=this._getSuggestionsFragment(query,suggestions);$lastSuggestion=$fragment.children().last();this.$lastSuggestion.after($fragment);this.$lastSuggestion=$lastSuggestion;},_renderPending:function renderPending(query){var template=this.templates.pending;this._resetLastSuggestion();template&&this.$el.html(template({query:query,dataset:this.name}));},_renderNotFound:function renderNotFound(query){var template=this.templates.notFound;this._resetLastSuggestion();template&&this.$el.html(template({query:query,dataset:this.name}));},_empty:function empty(){this.$el.empty();this._resetLastSuggestion();},_getSuggestionsFragment:function getSuggestionsFragment(query,suggestions){var that=this,fragment;fragment=document.createDocumentFragment();_.each(suggestions,function getSuggestionNode(suggestion){var $el,context;context=that._injectQuery(query,suggestion);$el=$(that.templates.suggestion(context)).data(keys.obj,suggestion).data(keys.val,that.displayFn(suggestion)).addClass(that.classes.suggestion+" "+that.classes.selectable);fragment.appendChild($el[0]);});this.highlight&&highlight({className:this.classes.highlight,node:fragment,pattern:query});return $(fragment);},_getFooter:function getFooter(query,suggestions){return this.templates.footer?this.templates.footer({query:query,suggestions:suggestions,dataset:this.name}):null;},_getHeader:function getHeader(query,suggestions){return this.templates.header?this.templates.header({query:query,suggestions:suggestions,dataset:this.name}):null;},_resetLastSuggestion:function resetLastSuggestion(){this.$lastSuggestion=$();},_injectQuery:function injectQuery(query,obj){return _.isObject(obj)?_.mixin({_query:query},obj):obj;},update:function update(query){var that=this,canceled=false,syncCalled=false,rendered=0;this.cancel();this.cancel=function cancel(){canceled=true;that.cancel=$.noop;that.async&&that.trigger("asyncCanceled",query);};this.source(query,sync,async);!syncCalled&&sync([]);function sync(suggestions){if(syncCalled){return;}
|
||
syncCalled=true;suggestions=(suggestions||[]).slice(0,that.limit);rendered=suggestions.length;that._overwrite(query,suggestions);if(rendered<that.limit&&that.async){that.trigger("asyncRequested",query);}}
|
||
function async(suggestions){suggestions=suggestions||[];if(!canceled&&rendered<that.limit){that.cancel=$.noop;that._append(query,suggestions.slice(0,that.limit-rendered));rendered+=suggestions.length;that.async&&that.trigger("asyncReceived",query);}}},cancel:$.noop,clear:function clear(){this._empty();this.cancel();this.trigger("cleared");},isEmpty:function isEmpty(){return this.$el.is(":empty");},destroy:function destroy(){this.$el=$("<div>");}});return Dataset;function getDisplayFn(display){display=display||_.stringify;return _.isFunction(display)?display:displayFn;function displayFn(obj){return obj[display];}}
|
||
function getTemplates(templates,displayFn){return{notFound:templates.notFound&&_.templatify(templates.notFound),pending:templates.pending&&_.templatify(templates.pending),header:templates.header&&_.templatify(templates.header),footer:templates.footer&&_.templatify(templates.footer),suggestion:templates.suggestion||suggestionTemplate};function suggestionTemplate(context){return $("<div>").text(displayFn(context));}}
|
||
function isValidName(str){return/^[_a-zA-Z0-9-]+$/.test(str);}}();var Menu=function(){"use strict";function Menu(o,www){var that=this;o=o||{};if(!o.node){$.error("node is required");}
|
||
www.mixin(this);this.$node=$(o.node);this.query=null;this.datasets=_.map(o.datasets,initializeDataset);function initializeDataset(oDataset){var node=that.$node.find(oDataset.node).first();oDataset.node=node.length?node:$("<div>").appendTo(that.$node);return new Dataset(oDataset,www);}}
|
||
_.mixin(Menu.prototype,EventEmitter,{_onSelectableClick:function onSelectableClick($e){this.trigger("selectableClicked",$($e.currentTarget));},_onRendered:function onRendered(type,dataset,suggestions,async){this.$node.toggleClass(this.classes.empty,this._allDatasetsEmpty());this.trigger("datasetRendered",dataset,suggestions,async);},_onCleared:function onCleared(){this.$node.toggleClass(this.classes.empty,this._allDatasetsEmpty());this.trigger("datasetCleared");},_propagate:function propagate(){this.trigger.apply(this,arguments);},_allDatasetsEmpty:function allDatasetsEmpty(){return _.every(this.datasets,isDatasetEmpty);function isDatasetEmpty(dataset){return dataset.isEmpty();}},_getSelectables:function getSelectables(){return this.$node.find(this.selectors.selectable);},_removeCursor:function _removeCursor(){var $selectable=this.getActiveSelectable();$selectable&&$selectable.removeClass(this.classes.cursor);},_ensureVisible:function ensureVisible($el){var elTop,elBottom,nodeScrollTop,nodeHeight;elTop=$el.position().top;elBottom=elTop+$el.outerHeight(true);nodeScrollTop=this.$node.scrollTop();nodeHeight=this.$node.height()+parseInt(this.$node.css("paddingTop"),10)+parseInt(this.$node.css("paddingBottom"),10);if(elTop<0){this.$node.scrollTop(nodeScrollTop+elTop);}else if(nodeHeight<elBottom){this.$node.scrollTop(nodeScrollTop+(elBottom-nodeHeight));}},bind:function(){var that=this,onSelectableClick;onSelectableClick=_.bind(this._onSelectableClick,this);this.$node.on("click.tt",this.selectors.selectable,onSelectableClick);_.each(this.datasets,function(dataset){dataset.onSync("asyncRequested",that._propagate,that).onSync("asyncCanceled",that._propagate,that).onSync("asyncReceived",that._propagate,that).onSync("rendered",that._onRendered,that).onSync("cleared",that._onCleared,that);});return this;},isOpen:function isOpen(){return this.$node.hasClass(this.classes.open);},open:function open(){this.$node.addClass(this.classes.open);},close:function close(){this.$node.removeClass(this.classes.open);this._removeCursor();},setLanguageDirection:function setLanguageDirection(dir){this.$node.attr("dir",dir);},selectableRelativeToCursor:function selectableRelativeToCursor(delta){var $selectables,$oldCursor,oldIndex,newIndex;$oldCursor=this.getActiveSelectable();$selectables=this._getSelectables();oldIndex=$oldCursor?$selectables.index($oldCursor):-1;newIndex=oldIndex+delta;newIndex=(newIndex+1)%($selectables.length+1)-1;newIndex=newIndex<-1?$selectables.length-1:newIndex;return newIndex===-1?null:$selectables.eq(newIndex);},setCursor:function setCursor($selectable){this._removeCursor();if($selectable=$selectable&&$selectable.first()){$selectable.addClass(this.classes.cursor);this._ensureVisible($selectable);}},getSelectableData:function getSelectableData($el){return $el&&$el.length?Dataset.extractData($el):null;},getActiveSelectable:function getActiveSelectable(){var $selectable=this._getSelectables().filter(this.selectors.cursor).first();return $selectable.length?$selectable:null;},getTopSelectable:function getTopSelectable(){var $selectable=this._getSelectables().first();return $selectable.length?$selectable:null;},update:function update(query){var isValidUpdate=query!==this.query;if(isValidUpdate){this.query=query;_.each(this.datasets,updateDataset);}
|
||
return isValidUpdate;function updateDataset(dataset){dataset.update(query);}},empty:function empty(){_.each(this.datasets,clearDataset);this.query=null;this.$node.addClass(this.classes.empty);function clearDataset(dataset){dataset.clear();}},destroy:function destroy(){this.$node.off(".tt");this.$node=$("<div>");_.each(this.datasets,destroyDataset);function destroyDataset(dataset){dataset.destroy();}}});return Menu;}();var DefaultMenu=function(){"use strict";var s=Menu.prototype;function DefaultMenu(){Menu.apply(this,[].slice.call(arguments,0));}
|
||
_.mixin(DefaultMenu.prototype,Menu.prototype,{open:function open(){!this._allDatasetsEmpty()&&this._show();return s.open.apply(this,[].slice.call(arguments,0));},close:function close(){this._hide();return s.close.apply(this,[].slice.call(arguments,0));},_onRendered:function onRendered(){if(this._allDatasetsEmpty()){this._hide();}else{this.isOpen()&&this._show();}
|
||
return s._onRendered.apply(this,[].slice.call(arguments,0));},_onCleared:function onCleared(){if(this._allDatasetsEmpty()){this._hide();}else{this.isOpen()&&this._show();}
|
||
return s._onCleared.apply(this,[].slice.call(arguments,0));},setLanguageDirection:function setLanguageDirection(dir){this.$node.css(dir==="ltr"?this.css.ltr:this.css.rtl);return s.setLanguageDirection.apply(this,[].slice.call(arguments,0));},_hide:function hide(){this.$node.hide();},_show:function show(){this.$node.css("display","block");}});return DefaultMenu;}();var Typeahead=function(){"use strict";function Typeahead(o,www){var onFocused,onBlurred,onEnterKeyed,onTabKeyed,onEscKeyed,onUpKeyed,onDownKeyed,onLeftKeyed,onRightKeyed,onQueryChanged,onWhitespaceChanged;o=o||{};if(!o.input){$.error("missing input");}
|
||
if(!o.menu){$.error("missing menu");}
|
||
if(!o.eventBus){$.error("missing event bus");}
|
||
www.mixin(this);this.eventBus=o.eventBus;this.minLength=_.isNumber(o.minLength)?o.minLength:1;this.input=o.input;this.menu=o.menu;this.enabled=true;this.active=false;this.input.hasFocus()&&this.activate();this.dir=this.input.getLangDir();this._hacks();this.menu.bind().onSync("selectableClicked",this._onSelectableClicked,this).onSync("asyncRequested",this._onAsyncRequested,this).onSync("asyncCanceled",this._onAsyncCanceled,this).onSync("asyncReceived",this._onAsyncReceived,this).onSync("datasetRendered",this._onDatasetRendered,this).onSync("datasetCleared",this._onDatasetCleared,this);onFocused=c(this,"activate","open","_onFocused");onBlurred=c(this,"deactivate","_onBlurred");onEnterKeyed=c(this,"isActive","isOpen","_onEnterKeyed");onTabKeyed=c(this,"isActive","isOpen","_onTabKeyed");onEscKeyed=c(this,"isActive","_onEscKeyed");onUpKeyed=c(this,"isActive","open","_onUpKeyed");onDownKeyed=c(this,"isActive","open","_onDownKeyed");onLeftKeyed=c(this,"isActive","isOpen","_onLeftKeyed");onRightKeyed=c(this,"isActive","isOpen","_onRightKeyed");onQueryChanged=c(this,"_openIfActive","_onQueryChanged");onWhitespaceChanged=c(this,"_openIfActive","_onWhitespaceChanged");this.input.bind().onSync("focused",onFocused,this).onSync("blurred",onBlurred,this).onSync("enterKeyed",onEnterKeyed,this).onSync("tabKeyed",onTabKeyed,this).onSync("escKeyed",onEscKeyed,this).onSync("upKeyed",onUpKeyed,this).onSync("downKeyed",onDownKeyed,this).onSync("leftKeyed",onLeftKeyed,this).onSync("rightKeyed",onRightKeyed,this).onSync("queryChanged",onQueryChanged,this).onSync("whitespaceChanged",onWhitespaceChanged,this).onSync("langDirChanged",this._onLangDirChanged,this);}
|
||
_.mixin(Typeahead.prototype,{_hacks:function hacks(){var $input,$menu;$input=this.input.$input||$("<div>");$menu=this.menu.$node||$("<div>");$input.on("blur.tt",function($e){var active,isActive,hasActive;active=document.activeElement;isActive=$menu.is(active);hasActive=$menu.has(active).length>0;if(_.isMsie()&&(isActive||hasActive)){$e.preventDefault();$e.stopImmediatePropagation();_.defer(function(){$input.focus();});}});$menu.on("mousedown.tt",function($e){$e.preventDefault();});},_onSelectableClicked:function onSelectableClicked(type,$el){this.select($el);},_onDatasetCleared:function onDatasetCleared(){this._updateHint();},_onDatasetRendered:function onDatasetRendered(type,dataset,suggestions,async){this._updateHint();this.eventBus.trigger("render",suggestions,async,dataset);},_onAsyncRequested:function onAsyncRequested(type,dataset,query){this.eventBus.trigger("asyncrequest",query,dataset);},_onAsyncCanceled:function onAsyncCanceled(type,dataset,query){this.eventBus.trigger("asynccancel",query,dataset);},_onAsyncReceived:function onAsyncReceived(type,dataset,query){this.eventBus.trigger("asyncreceive",query,dataset);},_onFocused:function onFocused(){this._minLengthMet()&&this.menu.update(this.input.getQuery());},_onBlurred:function onBlurred(){if(this.input.hasQueryChangedSinceLastFocus()){this.eventBus.trigger("change",this.input.getQuery());}},_onEnterKeyed:function onEnterKeyed(type,$e){var $selectable;if($selectable=this.menu.getActiveSelectable()){this.select($selectable)&&$e.preventDefault();}},_onTabKeyed:function onTabKeyed(type,$e){var $selectable;if($selectable=this.menu.getActiveSelectable()){this.select($selectable)&&$e.preventDefault();}else if($selectable=this.menu.getTopSelectable()){this.autocomplete($selectable)&&$e.preventDefault();}},_onEscKeyed:function onEscKeyed(){this.close();},_onUpKeyed:function onUpKeyed(){this.moveCursor(-1);},_onDownKeyed:function onDownKeyed(){this.moveCursor(+1);},_onLeftKeyed:function onLeftKeyed(){if(this.dir==="rtl"&&this.input.isCursorAtEnd()){this.autocomplete(this.menu.getTopSelectable());}},_onRightKeyed:function onRightKeyed(){if(this.dir==="ltr"&&this.input.isCursorAtEnd()){this.autocomplete(this.menu.getTopSelectable());}},_onQueryChanged:function onQueryChanged(e,query){this._minLengthMet(query)?this.menu.update(query):this.menu.empty();},_onWhitespaceChanged:function onWhitespaceChanged(){this._updateHint();},_onLangDirChanged:function onLangDirChanged(e,dir){if(this.dir!==dir){this.dir=dir;this.menu.setLanguageDirection(dir);}},_openIfActive:function openIfActive(){this.isActive()&&this.open();},_minLengthMet:function minLengthMet(query){query=_.isString(query)?query:this.input.getQuery()||"";return query.length>=this.minLength;},_updateHint:function updateHint(){var $selectable,data,val,query,escapedQuery,frontMatchRegEx,match;$selectable=this.menu.getTopSelectable();data=this.menu.getSelectableData($selectable);val=this.input.getInputValue();if(data&&!_.isBlankString(val)&&!this.input.hasOverflow()){query=Input.normalizeQuery(val);escapedQuery=_.escapeRegExChars(query);frontMatchRegEx=new RegExp("^(?:"+escapedQuery+")(.+$)","i");match=frontMatchRegEx.exec(data.val);match&&this.input.setHint(val+match[1]);}else{this.input.clearHint();}},isEnabled:function isEnabled(){return this.enabled;},enable:function enable(){this.enabled=true;},disable:function disable(){this.enabled=false;},isActive:function isActive(){return this.active;},activate:function activate(){if(this.isActive()){return true;}else if(!this.isEnabled()||this.eventBus.before("active")){return false;}else{this.active=true;this.eventBus.trigger("active");return true;}},deactivate:function deactivate(){if(!this.isActive()){return true;}else if(this.eventBus.before("idle")){return false;}else{this.active=false;this.close();this.eventBus.trigger("idle");return true;}},isOpen:function isOpen(){return this.menu.isOpen();},open:function open(){if(!this.isOpen()&&!this.eventBus.before("open")){this.menu.open();this._updateHint();this.eventBus.trigger("open");}
|
||
return this.isOpen();},close:function close(){if(this.isOpen()&&!this.eventBus.before("close")){this.menu.close();this.input.clearHint();this.input.resetInputValue();this.eventBus.trigger("close");}
|
||
return!this.isOpen();},setVal:function setVal(val){this.input.setQuery(_.toStr(val));},getVal:function getVal(){return this.input.getQuery();},select:function select($selectable){var data=this.menu.getSelectableData($selectable);if(data&&!this.eventBus.before("select",data.obj)){this.input.setQuery(data.val,true);this.eventBus.trigger("select",data.obj);this.close();return true;}
|
||
return false;},autocomplete:function autocomplete($selectable){var query,data,isValid;query=this.input.getQuery();data=this.menu.getSelectableData($selectable);isValid=data&&query!==data.val;if(isValid&&!this.eventBus.before("autocomplete",data.obj)){this.input.setQuery(data.val);this.eventBus.trigger("autocomplete",data.obj);return true;}
|
||
return false;},moveCursor:function moveCursor(delta){var query,$candidate,data,payload,cancelMove;query=this.input.getQuery();$candidate=this.menu.selectableRelativeToCursor(delta);data=this.menu.getSelectableData($candidate);payload=data?data.obj:null;cancelMove=this._minLengthMet()&&this.menu.update(query);if(!cancelMove&&!this.eventBus.before("cursorchange",payload)){this.menu.setCursor($candidate);if(data){this.input.setInputValue(data.val);}else{this.input.resetInputValue();this._updateHint();}
|
||
this.eventBus.trigger("cursorchange",payload);return true;}
|
||
return false;},destroy:function destroy(){this.input.destroy();this.menu.destroy();}});return Typeahead;function c(ctx){var methods=[].slice.call(arguments,1);return function(){var args=[].slice.call(arguments);_.each(methods,function(method){return ctx[method].apply(ctx,args);});};}}();(function(){"use strict";var old,keys,methods;old=$.fn.typeahead;keys={www:"tt-www",attrs:"tt-attrs",typeahead:"tt-typeahead"};methods={initialize:function initialize(o,datasets){var www;datasets=_.isArray(datasets)?datasets:[].slice.call(arguments,1);o=o||{};www=WWW(o.classNames);return this.each(attach);function attach(){var $input,$wrapper,$hint,$menu,defaultHint,defaultMenu,eventBus,input,menu,typeahead,MenuConstructor;_.each(datasets,function(d){d.highlight=!!o.highlight;});$input=$(this);$wrapper=$(www.html.wrapper);$hint=$elOrNull(o.hint);$menu=$elOrNull(o.menu);defaultHint=o.hint!==false&&!$hint;defaultMenu=o.menu!==false&&!$menu;defaultHint&&($hint=buildHintFromInput($input,www));defaultMenu&&($menu=$(www.html.menu).css(www.css.menu));$hint&&$hint.val("");$input=prepInput($input,www);if(defaultHint||defaultMenu){$wrapper.css(www.css.wrapper);$input.css(defaultHint?www.css.input:www.css.inputWithNoHint);$input.wrap($wrapper).parent().prepend(defaultHint?$hint:null).append(defaultMenu?$menu:null);}
|
||
MenuConstructor=defaultMenu?DefaultMenu:Menu;eventBus=new EventBus({el:$input});input=new Input({hint:$hint,input:$input},www);menu=new MenuConstructor({node:$menu,datasets:datasets},www);typeahead=new Typeahead({input:input,menu:menu,eventBus:eventBus,minLength:o.minLength},www);$input.data(keys.www,www);$input.data(keys.typeahead,typeahead);}},isEnabled:function isEnabled(){var enabled;ttEach(this.first(),function(t){enabled=t.isEnabled();});return enabled;},enable:function enable(){ttEach(this,function(t){t.enable();});return this;},disable:function disable(){ttEach(this,function(t){t.disable();});return this;},isActive:function isActive(){var active;ttEach(this.first(),function(t){active=t.isActive();});return active;},activate:function activate(){ttEach(this,function(t){t.activate();});return this;},deactivate:function deactivate(){ttEach(this,function(t){t.deactivate();});return this;},isOpen:function isOpen(){var open;ttEach(this.first(),function(t){open=t.isOpen();});return open;},open:function open(){ttEach(this,function(t){t.open();});return this;},close:function close(){ttEach(this,function(t){t.close();});return this;},select:function select(el){var success=false,$el=$(el);ttEach(this.first(),function(t){success=t.select($el);});return success;},autocomplete:function autocomplete(el){var success=false,$el=$(el);ttEach(this.first(),function(t){success=t.autocomplete($el);});return success;},moveCursor:function moveCursoe(delta){var success=false;ttEach(this.first(),function(t){success=t.moveCursor(delta);});return success;},val:function val(newVal){var query;if(!arguments.length){ttEach(this.first(),function(t){query=t.getVal();});return query;}else{ttEach(this,function(t){t.setVal(newVal);});return this;}},destroy:function destroy(){ttEach(this,function(typeahead,$input){revert($input);typeahead.destroy();});return this;}};$.fn.typeahead=function(method){if(methods[method]){return methods[method].apply(this,[].slice.call(arguments,1));}else{return methods.initialize.apply(this,arguments);}};$.fn.typeahead.noConflict=function noConflict(){$.fn.typeahead=old;return this;};function ttEach($els,fn){$els.each(function(){var $input=$(this),typeahead;(typeahead=$input.data(keys.typeahead))&&fn(typeahead,$input);});}
|
||
function buildHintFromInput($input,www){return $input.clone().addClass(www.classes.hint).removeData().css(www.css.hint).css(getBackgroundStyles($input)).prop("readonly",true).removeAttr("id name placeholder required").attr({autocomplete:"off",spellcheck:"false",tabindex:-1});}
|
||
function prepInput($input,www){$input.data(keys.attrs,{dir:$input.attr("dir"),autocomplete:$input.attr("autocomplete"),spellcheck:$input.attr("spellcheck"),style:$input.attr("style")});$input.addClass(www.classes.input).attr({autocomplete:"off",spellcheck:false});try{!$input.attr("dir")&&$input.attr("dir","auto");}catch(e){}
|
||
return $input;}
|
||
function getBackgroundStyles($el){return{backgroundAttachment:$el.css("background-attachment"),backgroundClip:$el.css("background-clip"),backgroundColor:$el.css("background-color"),backgroundImage:$el.css("background-image"),backgroundOrigin:$el.css("background-origin"),backgroundPosition:$el.css("background-position"),backgroundRepeat:$el.css("background-repeat"),backgroundSize:$el.css("background-size")};}
|
||
function revert($input){var www,$wrapper;www=$input.data(keys.www);$wrapper=$input.parent().filter(www.selectors.wrapper);_.each($input.data(keys.attrs),function(val,key){_.isUndefined(val)?$input.removeAttr(key):$input.attr(key,val);});$input.removeData(keys.typeahead).removeData(keys.www).removeData(keys.attr).removeClass(www.classes.input);if($wrapper.length){$input.detach().insertAfter($wrapper);$wrapper.remove();}}
|
||
function $elOrNull(obj){var isValid,$el;isValid=_.isJQuery(obj)||_.isElement(obj);$el=isValid?$(obj).first():[];return $el.length?$el:null;}})();});}.call(exports,__webpack_require__(4).setImmediate))}),(function(module,exports,__webpack_require__){var apply=Function.prototype.apply;exports.setTimeout=function(){return new Timeout(apply.call(setTimeout,window,arguments),clearTimeout);};exports.setInterval=function(){return new Timeout(apply.call(setInterval,window,arguments),clearInterval);};exports.clearTimeout=exports.clearInterval=function(timeout){if(timeout){timeout.close();}};function Timeout(id,clearFn){this._id=id;this._clearFn=clearFn;}
|
||
Timeout.prototype.unref=Timeout.prototype.ref=function(){};Timeout.prototype.close=function(){this._clearFn.call(window,this._id);};exports.enroll=function(item,msecs){clearTimeout(item._idleTimeoutId);item._idleTimeout=msecs;};exports.unenroll=function(item){clearTimeout(item._idleTimeoutId);item._idleTimeout=-1;};exports._unrefActive=exports.active=function(item){clearTimeout(item._idleTimeoutId);var msecs=item._idleTimeout;if(msecs>=0){item._idleTimeoutId=setTimeout(function onTimeout(){if(item._onTimeout)
|
||
item._onTimeout();},msecs);}};__webpack_require__(5);exports.setImmediate=setImmediate;exports.clearImmediate=clearImmediate;}),(function(module,exports,__webpack_require__){(function(global,process){(function(global,undefined){"use strict";if(global.setImmediate){return;}
|
||
var nextHandle=1;var tasksByHandle={};var currentlyRunningATask=false;var doc=global.document;var registerImmediate;function setImmediate(callback){if(typeof callback!=="function"){callback=new Function(""+callback);}
|
||
var args=new Array(arguments.length-1);for(var i=0;i<args.length;i++){args[i]=arguments[i+1];}
|
||
var task={callback:callback,args:args};tasksByHandle[nextHandle]=task;registerImmediate(nextHandle);return nextHandle++;}
|
||
function clearImmediate(handle){delete tasksByHandle[handle];}
|
||
function run(task){var callback=task.callback;var args=task.args;switch(args.length){case 0:callback();break;case 1:callback(args[0]);break;case 2:callback(args[0],args[1]);break;case 3:callback(args[0],args[1],args[2]);break;default:callback.apply(undefined,args);break;}}
|
||
function runIfPresent(handle){if(currentlyRunningATask){setTimeout(runIfPresent,0,handle);}else{var task=tasksByHandle[handle];if(task){currentlyRunningATask=true;try{run(task);}finally{clearImmediate(handle);currentlyRunningATask=false;}}}}
|
||
function installNextTickImplementation(){registerImmediate=function(handle){process.nextTick(function(){runIfPresent(handle);});};}
|
||
function canUsePostMessage(){if(global.postMessage&&!global.importScripts){var postMessageIsAsynchronous=true;var oldOnMessage=global.onmessage;global.onmessage=function(){postMessageIsAsynchronous=false;};global.postMessage("","*");global.onmessage=oldOnMessage;return postMessageIsAsynchronous;}}
|
||
function installPostMessageImplementation(){var messagePrefix="setImmediate$"+Math.random()+"$";var onGlobalMessage=function(event){if(event.source===global&&typeof event.data==="string"&&event.data.indexOf(messagePrefix)===0){runIfPresent(+event.data.slice(messagePrefix.length));}};if(global.addEventListener){global.addEventListener("message",onGlobalMessage,false);}else{global.attachEvent("onmessage",onGlobalMessage);}
|
||
registerImmediate=function(handle){global.postMessage(messagePrefix+handle,"*");};}
|
||
function installMessageChannelImplementation(){var channel=new MessageChannel();channel.port1.onmessage=function(event){var handle=event.data;runIfPresent(handle);};registerImmediate=function(handle){channel.port2.postMessage(handle);};}
|
||
function installReadyStateChangeImplementation(){var html=doc.documentElement;registerImmediate=function(handle){var script=doc.createElement("script");script.onreadystatechange=function(){runIfPresent(handle);script.onreadystatechange=null;html.removeChild(script);script=null;};html.appendChild(script);};}
|
||
function installSetTimeoutImplementation(){registerImmediate=function(handle){setTimeout(runIfPresent,0,handle);};}
|
||
var attachTo=Object.getPrototypeOf&&Object.getPrototypeOf(global);attachTo=attachTo&&attachTo.setTimeout?attachTo:global;if({}.toString.call(global.process)==="[object process]"){installNextTickImplementation();}else if(canUsePostMessage()){installPostMessageImplementation();}else if(global.MessageChannel){installMessageChannelImplementation();}else if(doc&&"onreadystatechange"in doc.createElement("script")){installReadyStateChangeImplementation();}else{installSetTimeoutImplementation();}
|
||
attachTo.setImmediate=setImmediate;attachTo.clearImmediate=clearImmediate;}(typeof self==="undefined"?typeof global==="undefined"?this:global:self));}.call(exports,(function(){return this;}()),__webpack_require__(6)))}),(function(module,exports){var process=module.exports={};var cachedSetTimeout;var cachedClearTimeout;function defaultSetTimout(){throw new Error('setTimeout has not been defined');}
|
||
function defaultClearTimeout(){throw new Error('clearTimeout has not been defined');}
|
||
(function(){try{if(typeof setTimeout==='function'){cachedSetTimeout=setTimeout;}else{cachedSetTimeout=defaultSetTimout;}}catch(e){cachedSetTimeout=defaultSetTimout;}
|
||
try{if(typeof clearTimeout==='function'){cachedClearTimeout=clearTimeout;}else{cachedClearTimeout=defaultClearTimeout;}}catch(e){cachedClearTimeout=defaultClearTimeout;}}())
|
||
function runTimeout(fun){if(cachedSetTimeout===setTimeout){return setTimeout(fun,0);}
|
||
if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout){cachedSetTimeout=setTimeout;return setTimeout(fun,0);}
|
||
try{return cachedSetTimeout(fun,0);}catch(e){try{return cachedSetTimeout.call(null,fun,0);}catch(e){return cachedSetTimeout.call(this,fun,0);}}}
|
||
function runClearTimeout(marker){if(cachedClearTimeout===clearTimeout){return clearTimeout(marker);}
|
||
if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout){cachedClearTimeout=clearTimeout;return clearTimeout(marker);}
|
||
try{return cachedClearTimeout(marker);}catch(e){try{return cachedClearTimeout.call(null,marker);}catch(e){return cachedClearTimeout.call(this,marker);}}}
|
||
var queue=[];var draining=false;var currentQueue;var queueIndex=-1;function cleanUpNextTick(){if(!draining||!currentQueue){return;}
|
||
draining=false;if(currentQueue.length){queue=currentQueue.concat(queue);}else{queueIndex=-1;}
|
||
if(queue.length){drainQueue();}}
|
||
function drainQueue(){if(draining){return;}
|
||
var timeout=runTimeout(cleanUpNextTick);draining=true;var len=queue.length;while(len){currentQueue=queue;queue=[];while(++queueIndex<len){if(currentQueue){currentQueue[queueIndex].run();}}
|
||
queueIndex=-1;len=queue.length;}
|
||
currentQueue=null;draining=false;runClearTimeout(timeout);}
|
||
process.nextTick=function(fun){var args=new Array(arguments.length-1);if(arguments.length>1){for(var i=1;i<arguments.length;i++){args[i-1]=arguments[i];}}
|
||
queue.push(new Item(fun,args));if(queue.length===1&&!draining){runTimeout(drainQueue);}};function Item(fun,array){this.fun=fun;this.array=array;}
|
||
Item.prototype.run=function(){this.fun.apply(null,this.array);};process.title='browser';process.browser=true;process.env={};process.argv=[];process.version='';process.versions={};function noop(){}
|
||
process.on=noop;process.addListener=noop;process.once=noop;process.off=noop;process.removeListener=noop;process.removeAllListeners=noop;process.emit=noop;process.prependListener=noop;process.prependOnceListener=noop;process.listeners=function(name){return[]}
|
||
process.binding=function(name){throw new Error('process.binding is not supported');};process.cwd=function(){return'/'};process.chdir=function(dir){throw new Error('process.chdir is not supported');};process.umask=function(){return 0;};}),(function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_FACTORY__,__WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;
|
||
/*! Magnific Popup - v1.1.0 - 2016-02-20
|
||
* http://dimsemenov.com/plugins/magnific-popup/
|
||
* Copyright (c) 2016 Dmitry Semenov; */
|
||
;(function(factory){if(true){!(__WEBPACK_AMD_DEFINE_ARRAY__=[__webpack_require__(1)],__WEBPACK_AMD_DEFINE_FACTORY__=(factory),__WEBPACK_AMD_DEFINE_RESULT__=(typeof __WEBPACK_AMD_DEFINE_FACTORY__==='function'?(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__)):__WEBPACK_AMD_DEFINE_FACTORY__),__WEBPACK_AMD_DEFINE_RESULT__!==undefined&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__));}else if(typeof exports==='object'){factory(require('jquery'));}else{factory(window.jQuery||window.Zepto);}}(function($){var CLOSE_EVENT='Close',BEFORE_CLOSE_EVENT='BeforeClose',AFTER_CLOSE_EVENT='AfterClose',BEFORE_APPEND_EVENT='BeforeAppend',MARKUP_PARSE_EVENT='MarkupParse',OPEN_EVENT='Open',CHANGE_EVENT='Change',NS='mfp',EVENT_NS='.'+NS,READY_CLASS='mfp-ready',REMOVING_CLASS='mfp-removing',PREVENT_CLOSE_CLASS='mfp-prevent-close';var mfp,MagnificPopup=function(){},_isJQ=!!(window.jQuery),_prevStatus,_window=$(window),_document,_prevContentType,_wrapClasses,_currPopupType;var _mfpOn=function(name,f){mfp.ev.on(NS+name+EVENT_NS,f);},_getEl=function(className,appendTo,html,raw){var el=document.createElement('div');el.className='mfp-'+className;if(html){el.innerHTML=html;}
|
||
if(!raw){el=$(el);if(appendTo){el.appendTo(appendTo);}}else if(appendTo){appendTo.appendChild(el);}
|
||
return el;},_mfpTrigger=function(e,data){mfp.ev.triggerHandler(NS+e,data);if(mfp.st.callbacks){e=e.charAt(0).toLowerCase()+e.slice(1);if(mfp.st.callbacks[e]){mfp.st.callbacks[e].apply(mfp,$.isArray(data)?data:[data]);}}},_getCloseBtn=function(type){if(type!==_currPopupType||!mfp.currTemplate.closeBtn){mfp.currTemplate.closeBtn=$(mfp.st.closeMarkup.replace('%title%',mfp.st.tClose));_currPopupType=type;}
|
||
return mfp.currTemplate.closeBtn;},_checkInstance=function(){if(!$.magnificPopup.instance){mfp=new MagnificPopup();mfp.init();$.magnificPopup.instance=mfp;}},supportsTransitions=function(){var s=document.createElement('p').style,v=['ms','O','Moz','Webkit'];if(s['transition']!==undefined){return true;}
|
||
while(v.length){if(v.pop()+'Transition'in s){return true;}}
|
||
return false;};MagnificPopup.prototype={constructor:MagnificPopup,init:function(){var appVersion=navigator.appVersion;mfp.isLowIE=mfp.isIE8=document.all&&!document.addEventListener;mfp.isAndroid=(/android/gi).test(appVersion);mfp.isIOS=(/iphone|ipad|ipod/gi).test(appVersion);mfp.supportsTransition=supportsTransitions();mfp.probablyMobile=(mfp.isAndroid||mfp.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent));_document=$(document);mfp.popupsCache={};},open:function(data){var i;if(data.isObj===false){mfp.items=data.items.toArray();mfp.index=0;var items=data.items,item;for(i=0;i<items.length;i++){item=items[i];if(item.parsed){item=item.el[0];}
|
||
if(item===data.el[0]){mfp.index=i;break;}}}else{mfp.items=$.isArray(data.items)?data.items:[data.items];mfp.index=data.index||0;}
|
||
if(mfp.isOpen){mfp.updateItemHTML();return;}
|
||
mfp.types=[];_wrapClasses='';if(data.mainEl&&data.mainEl.length){mfp.ev=data.mainEl.eq(0);}else{mfp.ev=_document;}
|
||
if(data.key){if(!mfp.popupsCache[data.key]){mfp.popupsCache[data.key]={};}
|
||
mfp.currTemplate=mfp.popupsCache[data.key];}else{mfp.currTemplate={};}
|
||
mfp.st=$.extend(true,{},$.magnificPopup.defaults,data);mfp.fixedContentPos=mfp.st.fixedContentPos==='auto'?!mfp.probablyMobile:mfp.st.fixedContentPos;if(mfp.st.modal){mfp.st.closeOnContentClick=false;mfp.st.closeOnBgClick=false;mfp.st.showCloseBtn=false;mfp.st.enableEscapeKey=false;}
|
||
if(!mfp.bgOverlay){mfp.bgOverlay=_getEl('bg').on('click'+EVENT_NS,function(){mfp.close();});mfp.wrap=_getEl('wrap').attr('tabindex',-1).on('click'+EVENT_NS,function(e){if(mfp._checkIfClose(e.target)){mfp.close();}});mfp.container=_getEl('container',mfp.wrap);}
|
||
mfp.contentContainer=_getEl('content');if(mfp.st.preloader){mfp.preloader=_getEl('preloader',mfp.container,mfp.st.tLoading);}
|
||
var modules=$.magnificPopup.modules;for(i=0;i<modules.length;i++){var n=modules[i];n=n.charAt(0).toUpperCase()+n.slice(1);mfp['init'+n].call(mfp);}
|
||
_mfpTrigger('BeforeOpen');if(mfp.st.showCloseBtn){if(!mfp.st.closeBtnInside){mfp.wrap.append(_getCloseBtn());}else{_mfpOn(MARKUP_PARSE_EVENT,function(e,template,values,item){values.close_replaceWith=_getCloseBtn(item.type);});_wrapClasses+=' mfp-close-btn-in';}}
|
||
if(mfp.st.alignTop){_wrapClasses+=' mfp-align-top';}
|
||
if(mfp.fixedContentPos){mfp.wrap.css({overflow:mfp.st.overflowY,overflowX:'hidden',overflowY:mfp.st.overflowY});}else{mfp.wrap.css({top:_window.scrollTop(),position:'absolute'});}
|
||
if(mfp.st.fixedBgPos===false||(mfp.st.fixedBgPos==='auto'&&!mfp.fixedContentPos)){mfp.bgOverlay.css({height:_document.height(),position:'absolute'});}
|
||
if(mfp.st.enableEscapeKey){_document.on('keyup'+EVENT_NS,function(e){if(e.keyCode===27){mfp.close();}});}
|
||
_window.on('resize'+EVENT_NS,function(){mfp.updateSize();});if(!mfp.st.closeOnContentClick){_wrapClasses+=' mfp-auto-cursor';}
|
||
if(_wrapClasses)
|
||
mfp.wrap.addClass(_wrapClasses);var windowHeight=mfp.wH=_window.height();var windowStyles={};if(mfp.fixedContentPos){if(mfp._hasScrollBar(windowHeight)){var s=mfp._getScrollbarSize();if(s){windowStyles.marginRight=s;}}}
|
||
if(mfp.fixedContentPos){if(!mfp.isIE7){windowStyles.overflow='hidden';}else{$('body, html').css('overflow','hidden');}}
|
||
var classesToadd=mfp.st.mainClass;if(mfp.isIE7){classesToadd+=' mfp-ie7';}
|
||
if(classesToadd){mfp._addClassToMFP(classesToadd);}
|
||
mfp.updateItemHTML();_mfpTrigger('BuildControls');$('html').css(windowStyles);mfp.bgOverlay.add(mfp.wrap).prependTo(mfp.st.prependTo||$(document.body));mfp._lastFocusedEl=document.activeElement;setTimeout(function(){if(mfp.content){mfp._addClassToMFP(READY_CLASS);mfp._setFocus();}else{mfp.bgOverlay.addClass(READY_CLASS);}
|
||
_document.on('focusin'+EVENT_NS,mfp._onFocusIn);},16);mfp.isOpen=true;mfp.updateSize(windowHeight);_mfpTrigger(OPEN_EVENT);return data;},close:function(){if(!mfp.isOpen)return;_mfpTrigger(BEFORE_CLOSE_EVENT);mfp.isOpen=false;if(mfp.st.removalDelay&&!mfp.isLowIE&&mfp.supportsTransition){mfp._addClassToMFP(REMOVING_CLASS);setTimeout(function(){mfp._close();},mfp.st.removalDelay);}else{mfp._close();}},_close:function(){_mfpTrigger(CLOSE_EVENT);var classesToRemove=REMOVING_CLASS+' '+READY_CLASS+' ';mfp.bgOverlay.detach();mfp.wrap.detach();mfp.container.empty();if(mfp.st.mainClass){classesToRemove+=mfp.st.mainClass+' ';}
|
||
mfp._removeClassFromMFP(classesToRemove);if(mfp.fixedContentPos){var windowStyles={marginRight:''};if(mfp.isIE7){$('body, html').css('overflow','');}else{windowStyles.overflow='';}
|
||
$('html').css(windowStyles);}
|
||
_document.off('keyup'+EVENT_NS+' focusin'+EVENT_NS);mfp.ev.off(EVENT_NS);mfp.wrap.attr('class','mfp-wrap').removeAttr('style');mfp.bgOverlay.attr('class','mfp-bg');mfp.container.attr('class','mfp-container');if(mfp.st.showCloseBtn&&(!mfp.st.closeBtnInside||mfp.currTemplate[mfp.currItem.type]===true)){if(mfp.currTemplate.closeBtn)
|
||
mfp.currTemplate.closeBtn.detach();}
|
||
if(mfp.st.autoFocusLast&&mfp._lastFocusedEl){$(mfp._lastFocusedEl).focus();}
|
||
mfp.currItem=null;mfp.content=null;mfp.currTemplate=null;mfp.prevHeight=0;_mfpTrigger(AFTER_CLOSE_EVENT);},updateSize:function(winHeight){if(mfp.isIOS){var zoomLevel=document.documentElement.clientWidth/window.innerWidth;var height=window.innerHeight*zoomLevel;mfp.wrap.css('height',height);mfp.wH=height;}else{mfp.wH=winHeight||_window.height();}
|
||
if(!mfp.fixedContentPos){mfp.wrap.css('height',mfp.wH);}
|
||
_mfpTrigger('Resize');},updateItemHTML:function(){var item=mfp.items[mfp.index];mfp.contentContainer.detach();if(mfp.content)
|
||
mfp.content.detach();if(!item.parsed){item=mfp.parseEl(mfp.index);}
|
||
var type=item.type;_mfpTrigger('BeforeChange',[mfp.currItem?mfp.currItem.type:'',type]);mfp.currItem=item;if(!mfp.currTemplate[type]){var markup=mfp.st[type]?mfp.st[type].markup:false;_mfpTrigger('FirstMarkupParse',markup);if(markup){mfp.currTemplate[type]=$(markup);}else{mfp.currTemplate[type]=true;}}
|
||
if(_prevContentType&&_prevContentType!==item.type){mfp.container.removeClass('mfp-'+_prevContentType+'-holder');}
|
||
var newContent=mfp['get'+type.charAt(0).toUpperCase()+type.slice(1)](item,mfp.currTemplate[type]);mfp.appendContent(newContent,type);item.preloaded=true;_mfpTrigger(CHANGE_EVENT,item);_prevContentType=item.type;mfp.container.prepend(mfp.contentContainer);_mfpTrigger('AfterChange');},appendContent:function(newContent,type){mfp.content=newContent;if(newContent){if(mfp.st.showCloseBtn&&mfp.st.closeBtnInside&&mfp.currTemplate[type]===true){if(!mfp.content.find('.mfp-close').length){mfp.content.append(_getCloseBtn());}}else{mfp.content=newContent;}}else{mfp.content='';}
|
||
_mfpTrigger(BEFORE_APPEND_EVENT);mfp.container.addClass('mfp-'+type+'-holder');mfp.contentContainer.append(mfp.content);},parseEl:function(index){var item=mfp.items[index],type;if(item.tagName){item={el:$(item)};}else{type=item.type;item={data:item,src:item.src};}
|
||
if(item.el){var types=mfp.types;for(var i=0;i<types.length;i++){if(item.el.hasClass('mfp-'+types[i])){type=types[i];break;}}
|
||
item.src=item.el.attr('data-mfp-src');if(!item.src){item.src=item.el.attr('href');}}
|
||
item.type=type||mfp.st.type||'inline';item.index=index;item.parsed=true;mfp.items[index]=item;_mfpTrigger('ElementParse',item);return mfp.items[index];},addGroup:function(el,options){var eHandler=function(e){e.mfpEl=this;mfp._openClick(e,el,options);};if(!options){options={};}
|
||
var eName='click.magnificPopup';options.mainEl=el;if(options.items){options.isObj=true;el.off(eName).on(eName,eHandler);}else{options.isObj=false;if(options.delegate){el.off(eName).on(eName,options.delegate,eHandler);}else{options.items=el;el.off(eName).on(eName,eHandler);}}},_openClick:function(e,el,options){var midClick=options.midClick!==undefined?options.midClick:$.magnificPopup.defaults.midClick;if(!midClick&&(e.which===2||e.ctrlKey||e.metaKey||e.altKey||e.shiftKey)){return;}
|
||
var disableOn=options.disableOn!==undefined?options.disableOn:$.magnificPopup.defaults.disableOn;if(disableOn){if($.isFunction(disableOn)){if(!disableOn.call(mfp)){return true;}}else{if(_window.width()<disableOn){return true;}}}
|
||
if(e.type){e.preventDefault();if(mfp.isOpen){e.stopPropagation();}}
|
||
options.el=$(e.mfpEl);if(options.delegate){options.items=el.find(options.delegate);}
|
||
mfp.open(options);},updateStatus:function(status,text){if(mfp.preloader){if(_prevStatus!==status){mfp.container.removeClass('mfp-s-'+_prevStatus);}
|
||
if(!text&&status==='loading'){text=mfp.st.tLoading;}
|
||
var data={status:status,text:text};_mfpTrigger('UpdateStatus',data);status=data.status;text=data.text;mfp.preloader.html(text);mfp.preloader.find('a').on('click',function(e){e.stopImmediatePropagation();});mfp.container.addClass('mfp-s-'+status);_prevStatus=status;}},_checkIfClose:function(target){if($(target).hasClass(PREVENT_CLOSE_CLASS)){return;}
|
||
var closeOnContent=mfp.st.closeOnContentClick;var closeOnBg=mfp.st.closeOnBgClick;if(closeOnContent&&closeOnBg){return true;}else{if(!mfp.content||$(target).hasClass('mfp-close')||(mfp.preloader&&target===mfp.preloader[0])){return true;}
|
||
if((target!==mfp.content[0]&&!$.contains(mfp.content[0],target))){if(closeOnBg){if($.contains(document,target)){return true;}}}else if(closeOnContent){return true;}}
|
||
return false;},_addClassToMFP:function(cName){mfp.bgOverlay.addClass(cName);mfp.wrap.addClass(cName);},_removeClassFromMFP:function(cName){this.bgOverlay.removeClass(cName);mfp.wrap.removeClass(cName);},_hasScrollBar:function(winHeight){return((mfp.isIE7?_document.height():document.body.scrollHeight)>(winHeight||_window.height()));},_setFocus:function(){(mfp.st.focus?mfp.content.find(mfp.st.focus).eq(0):mfp.wrap).focus();},_onFocusIn:function(e){if(e.target!==mfp.wrap[0]&&!$.contains(mfp.wrap[0],e.target)){mfp._setFocus();return false;}},_parseMarkup:function(template,values,item){var arr;if(item.data){values=$.extend(item.data,values);}
|
||
_mfpTrigger(MARKUP_PARSE_EVENT,[template,values,item]);$.each(values,function(key,value){if(value===undefined||value===false){return true;}
|
||
arr=key.split('_');if(arr.length>1){var el=template.find(EVENT_NS+'-'+arr[0]);if(el.length>0){var attr=arr[1];if(attr==='replaceWith'){if(el[0]!==value[0]){el.replaceWith(value);}}else if(attr==='img'){if(el.is('img')){el.attr('src',value);}else{el.replaceWith($('<img>').attr('src',value).attr('class',el.attr('class')));}}else{el.attr(arr[1],value);}}}else{template.find(EVENT_NS+'-'+key).html(value);}});},_getScrollbarSize:function(){if(mfp.scrollbarSize===undefined){var scrollDiv=document.createElement("div");scrollDiv.style.cssText='width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;';document.body.appendChild(scrollDiv);mfp.scrollbarSize=scrollDiv.offsetWidth-scrollDiv.clientWidth;document.body.removeChild(scrollDiv);}
|
||
return mfp.scrollbarSize;}};$.magnificPopup={instance:null,proto:MagnificPopup.prototype,modules:[],open:function(options,index){_checkInstance();if(!options){options={};}else{options=$.extend(true,{},options);}
|
||
options.isObj=true;options.index=index||0;return this.instance.open(options);},close:function(){return $.magnificPopup.instance&&$.magnificPopup.instance.close();},registerModule:function(name,module){if(module.options){$.magnificPopup.defaults[name]=module.options;}
|
||
$.extend(this.proto,module.proto);this.modules.push(name);},defaults:{disableOn:0,key:null,midClick:false,mainClass:'',preloader:true,focus:'',closeOnContentClick:false,closeOnBgClick:true,closeBtnInside:true,showCloseBtn:true,enableEscapeKey:true,modal:false,alignTop:false,removalDelay:0,prependTo:null,fixedContentPos:'auto',fixedBgPos:'auto',overflowY:'auto',closeMarkup:'<button title="%title%" type="button" class="mfp-close">×</button>',tClose:'Close (Esc)',tLoading:'Loading...',autoFocusLast:true}};$.fn.magnificPopup=function(options){_checkInstance();var jqEl=$(this);if(typeof options==="string"){if(options==='open'){var items,itemOpts=_isJQ?jqEl.data('magnificPopup'):jqEl[0].magnificPopup,index=parseInt(arguments[1],10)||0;if(itemOpts.items){items=itemOpts.items[index];}else{items=jqEl;if(itemOpts.delegate){items=items.find(itemOpts.delegate);}
|
||
items=items.eq(index);}
|
||
mfp._openClick({mfpEl:items},jqEl,itemOpts);}else{if(mfp.isOpen)
|
||
mfp[options].apply(mfp,Array.prototype.slice.call(arguments,1));}}else{options=$.extend(true,{},options);if(_isJQ){jqEl.data('magnificPopup',options);}else{jqEl[0].magnificPopup=options;}
|
||
mfp.addGroup(jqEl,options);}
|
||
return jqEl;};var INLINE_NS='inline',_hiddenClass,_inlinePlaceholder,_lastInlineElement,_putInlineElementsBack=function(){if(_lastInlineElement){_inlinePlaceholder.after(_lastInlineElement.addClass(_hiddenClass)).detach();_lastInlineElement=null;}};$.magnificPopup.registerModule(INLINE_NS,{options:{hiddenClass:'hide',markup:'',tNotFound:'Content not found'},proto:{initInline:function(){mfp.types.push(INLINE_NS);_mfpOn(CLOSE_EVENT+'.'+INLINE_NS,function(){_putInlineElementsBack();});},getInline:function(item,template){_putInlineElementsBack();if(item.src){var inlineSt=mfp.st.inline,el=$(item.src);if(el.length){var parent=el[0].parentNode;if(parent&&parent.tagName){if(!_inlinePlaceholder){_hiddenClass=inlineSt.hiddenClass;_inlinePlaceholder=_getEl(_hiddenClass);_hiddenClass='mfp-'+_hiddenClass;}
|
||
_lastInlineElement=el.after(_inlinePlaceholder).detach().removeClass(_hiddenClass);}
|
||
mfp.updateStatus('ready');}else{mfp.updateStatus('error',inlineSt.tNotFound);el=$('<div>');}
|
||
item.inlineElement=el;return el;}
|
||
mfp.updateStatus('ready');mfp._parseMarkup(template,{},item);return template;}}});var AJAX_NS='ajax',_ajaxCur,_removeAjaxCursor=function(){if(_ajaxCur){$(document.body).removeClass(_ajaxCur);}},_destroyAjaxRequest=function(){_removeAjaxCursor();if(mfp.req){mfp.req.abort();}};$.magnificPopup.registerModule(AJAX_NS,{options:{settings:null,cursor:'mfp-ajax-cur',tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){mfp.types.push(AJAX_NS);_ajaxCur=mfp.st.ajax.cursor;_mfpOn(CLOSE_EVENT+'.'+AJAX_NS,_destroyAjaxRequest);_mfpOn('BeforeChange.'+AJAX_NS,_destroyAjaxRequest);},getAjax:function(item){if(_ajaxCur){$(document.body).addClass(_ajaxCur);}
|
||
mfp.updateStatus('loading');var opts=$.extend({url:item.src,success:function(data,textStatus,jqXHR){var temp={data:data,xhr:jqXHR};_mfpTrigger('ParseAjax',temp);mfp.appendContent($(temp.data),AJAX_NS);item.finished=true;_removeAjaxCursor();mfp._setFocus();setTimeout(function(){mfp.wrap.addClass(READY_CLASS);},16);mfp.updateStatus('ready');_mfpTrigger('AjaxContentAdded');},error:function(){_removeAjaxCursor();item.finished=item.loadError=true;mfp.updateStatus('error',mfp.st.ajax.tError.replace('%url%',item.src));}},mfp.st.ajax.settings);mfp.req=$.ajax(opts);return'';}}});var _imgInterval,_getTitle=function(item){if(item.data&&item.data.title!==undefined)
|
||
return item.data.title;var src=mfp.st.image.titleSrc;if(src){if($.isFunction(src)){return src.call(mfp,item);}else if(item.el){return item.el.attr(src)||'';}}
|
||
return'';};$.magnificPopup.registerModule('image',{options:{markup:'<div class="mfp-figure">'+'<div class="mfp-close"></div>'+'<figure>'+'<div class="mfp-img"></div>'+'<figcaption>'+'<div class="mfp-bottom-bar">'+'<div class="mfp-title"></div>'+'<div class="mfp-counter"></div>'+'</div>'+'</figcaption>'+'</figure>'+'</div>',cursor:'mfp-zoom-out-cur',titleSrc:'title',verticalFit:true,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var imgSt=mfp.st.image,ns='.image';mfp.types.push('image');_mfpOn(OPEN_EVENT+ns,function(){if(mfp.currItem.type==='image'&&imgSt.cursor){$(document.body).addClass(imgSt.cursor);}});_mfpOn(CLOSE_EVENT+ns,function(){if(imgSt.cursor){$(document.body).removeClass(imgSt.cursor);}
|
||
_window.off('resize'+EVENT_NS);});_mfpOn('Resize'+ns,mfp.resizeImage);if(mfp.isLowIE){_mfpOn('AfterChange',mfp.resizeImage);}},resizeImage:function(){var item=mfp.currItem;if(!item||!item.img)return;if(mfp.st.image.verticalFit){var decr=0;if(mfp.isLowIE){decr=parseInt(item.img.css('padding-top'),10)+parseInt(item.img.css('padding-bottom'),10);}
|
||
item.img.css('max-height',mfp.wH-decr);}},_onImageHasSize:function(item){if(item.img){item.hasSize=true;if(_imgInterval){clearInterval(_imgInterval);}
|
||
item.isCheckingImgSize=false;_mfpTrigger('ImageHasSize',item);if(item.imgHidden){if(mfp.content)
|
||
mfp.content.removeClass('mfp-loading');item.imgHidden=false;}}},findImageSize:function(item){var counter=0,img=item.img[0],mfpSetInterval=function(delay){if(_imgInterval){clearInterval(_imgInterval);}
|
||
_imgInterval=setInterval(function(){if(img.naturalWidth>0){mfp._onImageHasSize(item);return;}
|
||
if(counter>200){clearInterval(_imgInterval);}
|
||
counter++;if(counter===3){mfpSetInterval(10);}else if(counter===40){mfpSetInterval(50);}else if(counter===100){mfpSetInterval(500);}},delay);};mfpSetInterval(1);},getImage:function(item,template){var guard=0,onLoadComplete=function(){if(item){if(item.img[0].complete){item.img.off('.mfploader');if(item===mfp.currItem){mfp._onImageHasSize(item);mfp.updateStatus('ready');}
|
||
item.hasSize=true;item.loaded=true;_mfpTrigger('ImageLoadComplete');}
|
||
else{guard++;if(guard<200){setTimeout(onLoadComplete,100);}else{onLoadError();}}}},onLoadError=function(){if(item){item.img.off('.mfploader');if(item===mfp.currItem){mfp._onImageHasSize(item);mfp.updateStatus('error',imgSt.tError.replace('%url%',item.src));}
|
||
item.hasSize=true;item.loaded=true;item.loadError=true;}},imgSt=mfp.st.image;var el=template.find('.mfp-img');if(el.length){var img=document.createElement('img');img.className='mfp-img';if(item.el&&item.el.find('img').length){img.alt=item.el.find('img').attr('alt');}
|
||
item.img=$(img).on('load.mfploader',onLoadComplete).on('error.mfploader',onLoadError);img.src=item.src;if(el.is('img')){item.img=item.img.clone();}
|
||
img=item.img[0];if(img.naturalWidth>0){item.hasSize=true;}else if(!img.width){item.hasSize=false;}}
|
||
mfp._parseMarkup(template,{title:_getTitle(item),img_replaceWith:item.img},item);mfp.resizeImage();if(item.hasSize){if(_imgInterval)clearInterval(_imgInterval);if(item.loadError){template.addClass('mfp-loading');mfp.updateStatus('error',imgSt.tError.replace('%url%',item.src));}else{template.removeClass('mfp-loading');mfp.updateStatus('ready');}
|
||
return template;}
|
||
mfp.updateStatus('loading');item.loading=true;if(!item.hasSize){item.imgHidden=true;template.addClass('mfp-loading');mfp.findImageSize(item);}
|
||
return template;}}});var hasMozTransform,getHasMozTransform=function(){if(hasMozTransform===undefined){hasMozTransform=document.createElement('p').style.MozTransform!==undefined;}
|
||
return hasMozTransform;};$.magnificPopup.registerModule('zoom',{options:{enabled:false,easing:'ease-in-out',duration:300,opener:function(element){return element.is('img')?element:element.find('img');}},proto:{initZoom:function(){var zoomSt=mfp.st.zoom,ns='.zoom',image;if(!zoomSt.enabled||!mfp.supportsTransition){return;}
|
||
var duration=zoomSt.duration,getElToAnimate=function(image){var newImg=image.clone().removeAttr('style').removeAttr('class').addClass('mfp-animated-image'),transition='all '+(zoomSt.duration/1000)+'s '+zoomSt.easing,cssObj={position:'fixed',zIndex:9999,left:0,top:0,'-webkit-backface-visibility':'hidden'},t='transition';cssObj['-webkit-'+t]=cssObj['-moz-'+t]=cssObj['-o-'+t]=cssObj[t]=transition;newImg.css(cssObj);return newImg;},showMainContent=function(){mfp.content.css('visibility','visible');},openTimeout,animatedImg;_mfpOn('BuildControls'+ns,function(){if(mfp._allowZoom()){clearTimeout(openTimeout);mfp.content.css('visibility','hidden');image=mfp._getItemToZoom();if(!image){showMainContent();return;}
|
||
animatedImg=getElToAnimate(image);animatedImg.css(mfp._getOffset());mfp.wrap.append(animatedImg);openTimeout=setTimeout(function(){animatedImg.css(mfp._getOffset(true));openTimeout=setTimeout(function(){showMainContent();setTimeout(function(){animatedImg.remove();image=animatedImg=null;_mfpTrigger('ZoomAnimationEnded');},16);},duration);},16);}});_mfpOn(BEFORE_CLOSE_EVENT+ns,function(){if(mfp._allowZoom()){clearTimeout(openTimeout);mfp.st.removalDelay=duration;if(!image){image=mfp._getItemToZoom();if(!image){return;}
|
||
animatedImg=getElToAnimate(image);}
|
||
animatedImg.css(mfp._getOffset(true));mfp.wrap.append(animatedImg);mfp.content.css('visibility','hidden');setTimeout(function(){animatedImg.css(mfp._getOffset());},16);}});_mfpOn(CLOSE_EVENT+ns,function(){if(mfp._allowZoom()){showMainContent();if(animatedImg){animatedImg.remove();}
|
||
image=null;}});},_allowZoom:function(){return mfp.currItem.type==='image';},_getItemToZoom:function(){if(mfp.currItem.hasSize){return mfp.currItem.img;}else{return false;}},_getOffset:function(isLarge){var el;if(isLarge){el=mfp.currItem.img;}else{el=mfp.st.zoom.opener(mfp.currItem.el||mfp.currItem);}
|
||
var offset=el.offset();var paddingTop=parseInt(el.css('padding-top'),10);var paddingBottom=parseInt(el.css('padding-bottom'),10);offset.top-=($(window).scrollTop()-paddingTop);var obj={width:el.width(),height:(_isJQ?el.innerHeight():el[0].offsetHeight)-paddingBottom-paddingTop};if(getHasMozTransform()){obj['-moz-transform']=obj['transform']='translate('+offset.left+'px,'+offset.top+'px)';}else{obj.left=offset.left;obj.top=offset.top;}
|
||
return obj;}}});var IFRAME_NS='iframe',_emptyPage='//about:blank',_fixIframeBugs=function(isShowing){if(mfp.currTemplate[IFRAME_NS]){var el=mfp.currTemplate[IFRAME_NS].find('iframe');if(el.length){if(!isShowing){el[0].src=_emptyPage;}
|
||
if(mfp.isIE8){el.css('display',isShowing?'block':'none');}}}};$.magnificPopup.registerModule(IFRAME_NS,{options:{markup:'<div class="mfp-iframe-scaler">'+'<div class="mfp-close"></div>'+'<iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe>'+'</div>',srcAction:'iframe_src',patterns:{youtube:{index:'youtube.com',id:'v=',src:'//www.youtube.com/embed/%id%?autoplay=1'},vimeo:{index:'vimeo.com/',id:'/',src:'//player.vimeo.com/video/%id%?autoplay=1'},gmaps:{index:'//maps.google.',src:'%id%&output=embed'}}},proto:{initIframe:function(){mfp.types.push(IFRAME_NS);_mfpOn('BeforeChange',function(e,prevType,newType){if(prevType!==newType){if(prevType===IFRAME_NS){_fixIframeBugs();}else if(newType===IFRAME_NS){_fixIframeBugs(true);}}});_mfpOn(CLOSE_EVENT+'.'+IFRAME_NS,function(){_fixIframeBugs();});},getIframe:function(item,template){var embedSrc=item.src;var iframeSt=mfp.st.iframe;$.each(iframeSt.patterns,function(){if(embedSrc.indexOf(this.index)>-1){if(this.id){if(typeof this.id==='string'){embedSrc=embedSrc.substr(embedSrc.lastIndexOf(this.id)+this.id.length,embedSrc.length);}else{embedSrc=this.id.call(this,embedSrc);}}
|
||
embedSrc=this.src.replace('%id%',embedSrc);return false;}});var dataObj={};if(iframeSt.srcAction){dataObj[iframeSt.srcAction]=embedSrc;}
|
||
mfp._parseMarkup(template,dataObj,item);mfp.updateStatus('ready');return template;}}});var _getLoopedId=function(index){var numSlides=mfp.items.length;if(index>numSlides-1){return index-numSlides;}else if(index<0){return numSlides+index;}
|
||
return index;},_replaceCurrTotal=function(text,curr,total){return text.replace(/%curr%/gi,curr+1).replace(/%total%/gi,total);};$.magnificPopup.registerModule('gallery',{options:{enabled:false,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:true,arrows:true,tPrev:'Previous (Left arrow key)',tNext:'Next (Right arrow key)',tCounter:'%curr% of %total%'},proto:{initGallery:function(){var gSt=mfp.st.gallery,ns='.mfp-gallery';mfp.direction=true;if(!gSt||!gSt.enabled)return false;_wrapClasses+=' mfp-gallery';_mfpOn(OPEN_EVENT+ns,function(){if(gSt.navigateByImgClick){mfp.wrap.on('click'+ns,'.mfp-img',function(){if(mfp.items.length>1){mfp.next();return false;}});}
|
||
_document.on('keydown'+ns,function(e){if(e.keyCode===37){mfp.prev();}else if(e.keyCode===39){mfp.next();}});});_mfpOn('UpdateStatus'+ns,function(e,data){if(data.text){data.text=_replaceCurrTotal(data.text,mfp.currItem.index,mfp.items.length);}});_mfpOn(MARKUP_PARSE_EVENT+ns,function(e,element,values,item){var l=mfp.items.length;values.counter=l>1?_replaceCurrTotal(gSt.tCounter,item.index,l):'';});_mfpOn('BuildControls'+ns,function(){if(mfp.items.length>1&&gSt.arrows&&!mfp.arrowLeft){var markup=gSt.arrowMarkup,arrowLeft=mfp.arrowLeft=$(markup.replace(/%title%/gi,gSt.tPrev).replace(/%dir%/gi,'left')).addClass(PREVENT_CLOSE_CLASS),arrowRight=mfp.arrowRight=$(markup.replace(/%title%/gi,gSt.tNext).replace(/%dir%/gi,'right')).addClass(PREVENT_CLOSE_CLASS);arrowLeft.click(function(){mfp.prev();});arrowRight.click(function(){mfp.next();});mfp.container.append(arrowLeft.add(arrowRight));}});_mfpOn(CHANGE_EVENT+ns,function(){if(mfp._preloadTimeout)clearTimeout(mfp._preloadTimeout);mfp._preloadTimeout=setTimeout(function(){mfp.preloadNearbyImages();mfp._preloadTimeout=null;},16);});_mfpOn(CLOSE_EVENT+ns,function(){_document.off(ns);mfp.wrap.off('click'+ns);mfp.arrowRight=mfp.arrowLeft=null;});},next:function(){mfp.direction=true;mfp.index=_getLoopedId(mfp.index+1);mfp.updateItemHTML();},prev:function(){mfp.direction=false;mfp.index=_getLoopedId(mfp.index-1);mfp.updateItemHTML();},goTo:function(newIndex){mfp.direction=(newIndex>=mfp.index);mfp.index=newIndex;mfp.updateItemHTML();},preloadNearbyImages:function(){var p=mfp.st.gallery.preload,preloadBefore=Math.min(p[0],mfp.items.length),preloadAfter=Math.min(p[1],mfp.items.length),i;for(i=1;i<=(mfp.direction?preloadAfter:preloadBefore);i++){mfp._preloadItem(mfp.index+i);}
|
||
for(i=1;i<=(mfp.direction?preloadBefore:preloadAfter);i++){mfp._preloadItem(mfp.index-i);}},_preloadItem:function(index){index=_getLoopedId(index);if(mfp.items[index].preloaded){return;}
|
||
var item=mfp.items[index];if(!item.parsed){item=mfp.parseEl(index);}
|
||
_mfpTrigger('LazyLoad',item);if(item.type==='image'){item.img=$('<img class="mfp-img" />').on('load.mfploader',function(){item.hasSize=true;}).on('error.mfploader',function(){item.hasSize=true;item.loadError=true;_mfpTrigger('LazyLoadError',item);}).attr('src',item.src);}
|
||
item.preloaded=true;}}});var RETINA_NS='retina';$.magnificPopup.registerModule(RETINA_NS,{options:{replaceSrc:function(item){return item.src.replace(/\.\w+$/,function(m){return'@2x'+m;});},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var st=mfp.st.retina,ratio=st.ratio;ratio=!isNaN(ratio)?ratio:ratio();if(ratio>1){_mfpOn('ImageHasSize'+'.'+RETINA_NS,function(e,item){item.img.css({'max-width':item.img[0].naturalWidth/ratio,'width':'100%'});});_mfpOn('ElementParse'+'.'+RETINA_NS,function(e,item){item.src=st.replaceSrc(item,ratio);});}}}}});_checkInstance();}));}),(function(module,exports,__webpack_require__){__webpack_require__(9)
|
||
__webpack_require__(10)
|
||
__webpack_require__(11)
|
||
__webpack_require__(12)
|
||
__webpack_require__(13)
|
||
__webpack_require__(14)
|
||
__webpack_require__(15)
|
||
__webpack_require__(16)
|
||
__webpack_require__(17)
|
||
__webpack_require__(18)
|
||
__webpack_require__(19)
|
||
__webpack_require__(20)}),(function(module,exports,__webpack_require__){(function(jQuery){+function($){'use strict';function transitionEnd(){var el=document.createElement('bootstrap')
|
||
var transEndEventNames={WebkitTransition:'webkitTransitionEnd',MozTransition:'transitionend',OTransition:'oTransitionEnd otransitionend',transition:'transitionend'}
|
||
for(var name in transEndEventNames){if(el.style[name]!==undefined){return{end:transEndEventNames[name]}}}
|
||
return false}
|
||
$.fn.emulateTransitionEnd=function(duration){var called=false
|
||
var $el=this
|
||
$(this).one('bsTransitionEnd',function(){called=true})
|
||
var callback=function(){if(!called)$($el).trigger($.support.transition.end)}
|
||
setTimeout(callback,duration)
|
||
return this}
|
||
$(function(){$.support.transition=transitionEnd()
|
||
if(!$.support.transition)return
|
||
$.event.special.bsTransitionEnd={bindType:$.support.transition.end,delegateType:$.support.transition.end,handle:function(e){if($(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}}})}(jQuery);}.call(exports,__webpack_require__(1)))}),(function(module,exports,__webpack_require__){(function(jQuery){+function($){'use strict';var dismiss='[data-dismiss="alert"]'
|
||
var Alert=function(el){$(el).on('click',dismiss,this.close)}
|
||
Alert.VERSION='3.3.7'
|
||
Alert.TRANSITION_DURATION=150
|
||
Alert.prototype.close=function(e){var $this=$(this)
|
||
var selector=$this.attr('data-target')
|
||
if(!selector){selector=$this.attr('href')
|
||
selector=selector&&selector.replace(/.*(?=#[^\s]*$)/,'')}
|
||
var $parent=$(selector==='#'?[]:selector)
|
||
if(e)e.preventDefault()
|
||
if(!$parent.length){$parent=$this.closest('.alert')}
|
||
$parent.trigger(e=$.Event('close.bs.alert'))
|
||
if(e.isDefaultPrevented())return
|
||
$parent.removeClass('in')
|
||
function removeElement(){$parent.detach().trigger('closed.bs.alert').remove()}
|
||
$.support.transition&&$parent.hasClass('fade')?$parent.one('bsTransitionEnd',removeElement).emulateTransitionEnd(Alert.TRANSITION_DURATION):removeElement()}
|
||
function Plugin(option){return this.each(function(){var $this=$(this)
|
||
var data=$this.data('bs.alert')
|
||
if(!data)$this.data('bs.alert',(data=new Alert(this)))
|
||
if(typeof option=='string')data[option].call($this)})}
|
||
var old=$.fn.alert
|
||
$.fn.alert=Plugin
|
||
$.fn.alert.Constructor=Alert
|
||
$.fn.alert.noConflict=function(){$.fn.alert=old
|
||
return this}
|
||
$(document).on('click.bs.alert.data-api',dismiss,Alert.prototype.close)}(jQuery);}.call(exports,__webpack_require__(1)))}),(function(module,exports,__webpack_require__){(function(jQuery){+function($){'use strict';var Button=function(element,options){this.$element=$(element)
|
||
this.options=$.extend({},Button.DEFAULTS,options)
|
||
this.isLoading=false}
|
||
Button.VERSION='3.3.7'
|
||
Button.DEFAULTS={loadingText:'loading...'}
|
||
Button.prototype.setState=function(state){var d='disabled'
|
||
var $el=this.$element
|
||
var val=$el.is('input')?'val':'html'
|
||
var data=$el.data()
|
||
state+='Text'
|
||
if(data.resetText==null)$el.data('resetText',$el[val]())
|
||
setTimeout($.proxy(function(){$el[val](data[state]==null?this.options[state]:data[state])
|
||
if(state=='loadingText'){this.isLoading=true
|
||
$el.addClass(d).attr(d,d).prop(d,true)}else if(this.isLoading){this.isLoading=false
|
||
$el.removeClass(d).removeAttr(d).prop(d,false)}},this),0)}
|
||
Button.prototype.toggle=function(){var changed=true
|
||
var $parent=this.$element.closest('[data-toggle="buttons"]')
|
||
if($parent.length){var $input=this.$element.find('input')
|
||
if($input.prop('type')=='radio'){if($input.prop('checked'))changed=false
|
||
$parent.find('.active').removeClass('active')
|
||
this.$element.addClass('active')}else if($input.prop('type')=='checkbox'){if(($input.prop('checked'))!==this.$element.hasClass('active'))changed=false
|
||
this.$element.toggleClass('active')}
|
||
$input.prop('checked',this.$element.hasClass('active'))
|
||
if(changed)$input.trigger('change')}else{this.$element.attr('aria-pressed',!this.$element.hasClass('active'))
|
||
this.$element.toggleClass('active')}}
|
||
function Plugin(option){return this.each(function(){var $this=$(this)
|
||
var data=$this.data('bs.button')
|
||
var options=typeof option=='object'&&option
|
||
if(!data)$this.data('bs.button',(data=new Button(this,options)))
|
||
if(option=='toggle')data.toggle()
|
||
else if(option)data.setState(option)})}
|
||
var old=$.fn.button
|
||
$.fn.button=Plugin
|
||
$.fn.button.Constructor=Button
|
||
$.fn.button.noConflict=function(){$.fn.button=old
|
||
return this}
|
||
$(document).on('click.bs.button.data-api','[data-toggle^="button"]',function(e){var $btn=$(e.target).closest('.btn')
|
||
Plugin.call($btn,'toggle')
|
||
if(!($(e.target).is('input[type="radio"], input[type="checkbox"]'))){e.preventDefault()
|
||
if($btn.is('input,button'))$btn.trigger('focus')
|
||
else $btn.find('input:visible,button:visible').first().trigger('focus')}}).on('focus.bs.button.data-api blur.bs.button.data-api','[data-toggle^="button"]',function(e){$(e.target).closest('.btn').toggleClass('focus',/^focus(in)?$/.test(e.type))})}(jQuery);}.call(exports,__webpack_require__(1)))}),(function(module,exports,__webpack_require__){(function(jQuery){+function($){'use strict';var Carousel=function(element,options){this.$element=$(element)
|
||
this.$indicators=this.$element.find('.carousel-indicators')
|
||
this.options=options
|
||
this.paused=null
|
||
this.sliding=null
|
||
this.interval=null
|
||
this.$active=null
|
||
this.$items=null
|
||
this.options.keyboard&&this.$element.on('keydown.bs.carousel',$.proxy(this.keydown,this))
|
||
this.options.pause=='hover'&&!('ontouchstart'in document.documentElement)&&this.$element.on('mouseenter.bs.carousel',$.proxy(this.pause,this)).on('mouseleave.bs.carousel',$.proxy(this.cycle,this))}
|
||
Carousel.VERSION='3.3.7'
|
||
Carousel.TRANSITION_DURATION=600
|
||
Carousel.DEFAULTS={interval:5000,pause:'hover',wrap:true,keyboard:true}
|
||
Carousel.prototype.keydown=function(e){if(/input|textarea/i.test(e.target.tagName))return
|
||
switch(e.which){case 37:this.prev();break
|
||
case 39:this.next();break
|
||
default:return}
|
||
e.preventDefault()}
|
||
Carousel.prototype.cycle=function(e){e||(this.paused=false)
|
||
this.interval&&clearInterval(this.interval)
|
||
this.options.interval&&!this.paused&&(this.interval=setInterval($.proxy(this.next,this),this.options.interval))
|
||
return this}
|
||
Carousel.prototype.getItemIndex=function(item){this.$items=item.parent().children('.item')
|
||
return this.$items.index(item||this.$active)}
|
||
Carousel.prototype.getItemForDirection=function(direction,active){var activeIndex=this.getItemIndex(active)
|
||
var willWrap=(direction=='prev'&&activeIndex===0)||(direction=='next'&&activeIndex==(this.$items.length-1))
|
||
if(willWrap&&!this.options.wrap)return active
|
||
var delta=direction=='prev'?-1:1
|
||
var itemIndex=(activeIndex+delta)%this.$items.length
|
||
return this.$items.eq(itemIndex)}
|
||
Carousel.prototype.to=function(pos){var that=this
|
||
var activeIndex=this.getItemIndex(this.$active=this.$element.find('.item.active'))
|
||
if(pos>(this.$items.length-1)||pos<0)return
|
||
if(this.sliding)return this.$element.one('slid.bs.carousel',function(){that.to(pos)})
|
||
if(activeIndex==pos)return this.pause().cycle()
|
||
return this.slide(pos>activeIndex?'next':'prev',this.$items.eq(pos))}
|
||
Carousel.prototype.pause=function(e){e||(this.paused=true)
|
||
if(this.$element.find('.next, .prev').length&&$.support.transition){this.$element.trigger($.support.transition.end)
|
||
this.cycle(true)}
|
||
this.interval=clearInterval(this.interval)
|
||
return this}
|
||
Carousel.prototype.next=function(){if(this.sliding)return
|
||
return this.slide('next')}
|
||
Carousel.prototype.prev=function(){if(this.sliding)return
|
||
return this.slide('prev')}
|
||
Carousel.prototype.slide=function(type,next){var $active=this.$element.find('.item.active')
|
||
var $next=next||this.getItemForDirection(type,$active)
|
||
var isCycling=this.interval
|
||
var direction=type=='next'?'left':'right'
|
||
var that=this
|
||
if($next.hasClass('active'))return(this.sliding=false)
|
||
var relatedTarget=$next[0]
|
||
var slideEvent=$.Event('slide.bs.carousel',{relatedTarget:relatedTarget,direction:direction})
|
||
this.$element.trigger(slideEvent)
|
||
if(slideEvent.isDefaultPrevented())return
|
||
this.sliding=true
|
||
isCycling&&this.pause()
|
||
if(this.$indicators.length){this.$indicators.find('.active').removeClass('active')
|
||
var $nextIndicator=$(this.$indicators.children()[this.getItemIndex($next)])
|
||
$nextIndicator&&$nextIndicator.addClass('active')}
|
||
var slidEvent=$.Event('slid.bs.carousel',{relatedTarget:relatedTarget,direction:direction})
|
||
if($.support.transition&&this.$element.hasClass('slide')){$next.addClass(type)
|
||
$next[0].offsetWidth
|
||
$active.addClass(direction)
|
||
$next.addClass(direction)
|
||
$active.one('bsTransitionEnd',function(){$next.removeClass([type,direction].join(' ')).addClass('active')
|
||
$active.removeClass(['active',direction].join(' '))
|
||
that.sliding=false
|
||
setTimeout(function(){that.$element.trigger(slidEvent)},0)}).emulateTransitionEnd(Carousel.TRANSITION_DURATION)}else{$active.removeClass('active')
|
||
$next.addClass('active')
|
||
this.sliding=false
|
||
this.$element.trigger(slidEvent)}
|
||
isCycling&&this.cycle()
|
||
return this}
|
||
function Plugin(option){return this.each(function(){var $this=$(this)
|
||
var data=$this.data('bs.carousel')
|
||
var options=$.extend({},Carousel.DEFAULTS,$this.data(),typeof option=='object'&&option)
|
||
var action=typeof option=='string'?option:options.slide
|
||
if(!data)$this.data('bs.carousel',(data=new Carousel(this,options)))
|
||
if(typeof option=='number')data.to(option)
|
||
else if(action)data[action]()
|
||
else if(options.interval)data.pause().cycle()})}
|
||
var old=$.fn.carousel
|
||
$.fn.carousel=Plugin
|
||
$.fn.carousel.Constructor=Carousel
|
||
$.fn.carousel.noConflict=function(){$.fn.carousel=old
|
||
return this}
|
||
var clickHandler=function(e){var href
|
||
var $this=$(this)
|
||
var $target=$($this.attr('data-target')||(href=$this.attr('href'))&&href.replace(/.*(?=#[^\s]+$)/,''))
|
||
if(!$target.hasClass('carousel'))return
|
||
var options=$.extend({},$target.data(),$this.data())
|
||
var slideIndex=$this.attr('data-slide-to')
|
||
if(slideIndex)options.interval=false
|
||
Plugin.call($target,options)
|
||
if(slideIndex){$target.data('bs.carousel').to(slideIndex)}
|
||
e.preventDefault()}
|
||
$(document).on('click.bs.carousel.data-api','[data-slide]',clickHandler).on('click.bs.carousel.data-api','[data-slide-to]',clickHandler)
|
||
$(window).on('load',function(){$('[data-ride="carousel"]').each(function(){var $carousel=$(this)
|
||
Plugin.call($carousel,$carousel.data())})})}(jQuery);}.call(exports,__webpack_require__(1)))}),(function(module,exports,__webpack_require__){(function(jQuery){+function($){'use strict';var Collapse=function(element,options){this.$element=$(element)
|
||
this.options=$.extend({},Collapse.DEFAULTS,options)
|
||
this.$trigger=$('[data-toggle="collapse"][href="#'+element.id+'"],'+'[data-toggle="collapse"][data-target="#'+element.id+'"]')
|
||
this.transitioning=null
|
||
if(this.options.parent){this.$parent=this.getParent()}else{this.addAriaAndCollapsedClass(this.$element,this.$trigger)}
|
||
if(this.options.toggle)this.toggle()}
|
||
Collapse.VERSION='3.3.7'
|
||
Collapse.TRANSITION_DURATION=350
|
||
Collapse.DEFAULTS={toggle:true}
|
||
Collapse.prototype.dimension=function(){var hasWidth=this.$element.hasClass('width')
|
||
return hasWidth?'width':'height'}
|
||
Collapse.prototype.show=function(){if(this.transitioning||this.$element.hasClass('in'))return
|
||
var activesData
|
||
var actives=this.$parent&&this.$parent.children('.panel').children('.in, .collapsing')
|
||
if(actives&&actives.length){activesData=actives.data('bs.collapse')
|
||
if(activesData&&activesData.transitioning)return}
|
||
var startEvent=$.Event('show.bs.collapse')
|
||
this.$element.trigger(startEvent)
|
||
if(startEvent.isDefaultPrevented())return
|
||
if(actives&&actives.length){Plugin.call(actives,'hide')
|
||
activesData||actives.data('bs.collapse',null)}
|
||
var dimension=this.dimension()
|
||
this.$element.removeClass('collapse').addClass('collapsing')[dimension](0).attr('aria-expanded',true)
|
||
this.$trigger.removeClass('collapsed').attr('aria-expanded',true)
|
||
this.transitioning=1
|
||
var complete=function(){this.$element.removeClass('collapsing').addClass('collapse in')[dimension]('')
|
||
this.transitioning=0
|
||
this.$element.trigger('shown.bs.collapse')}
|
||
if(!$.support.transition)return complete.call(this)
|
||
var scrollSize=$.camelCase(['scroll',dimension].join('-'))
|
||
this.$element.one('bsTransitionEnd',$.proxy(complete,this)).emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize])}
|
||
Collapse.prototype.hide=function(){if(this.transitioning||!this.$element.hasClass('in'))return
|
||
var startEvent=$.Event('hide.bs.collapse')
|
||
this.$element.trigger(startEvent)
|
||
if(startEvent.isDefaultPrevented())return
|
||
var dimension=this.dimension()
|
||
this.$element[dimension](this.$element[dimension]())[0].offsetHeight
|
||
this.$element.addClass('collapsing').removeClass('collapse in').attr('aria-expanded',false)
|
||
this.$trigger.addClass('collapsed').attr('aria-expanded',false)
|
||
this.transitioning=1
|
||
var complete=function(){this.transitioning=0
|
||
this.$element.removeClass('collapsing').addClass('collapse').trigger('hidden.bs.collapse')}
|
||
if(!$.support.transition)return complete.call(this)
|
||
this.$element
|
||
[dimension](0).one('bsTransitionEnd',$.proxy(complete,this)).emulateTransitionEnd(Collapse.TRANSITION_DURATION)}
|
||
Collapse.prototype.toggle=function(){this[this.$element.hasClass('in')?'hide':'show']()}
|
||
Collapse.prototype.getParent=function(){return $(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each($.proxy(function(i,element){var $element=$(element)
|
||
this.addAriaAndCollapsedClass(getTargetFromTrigger($element),$element)},this)).end()}
|
||
Collapse.prototype.addAriaAndCollapsedClass=function($element,$trigger){var isOpen=$element.hasClass('in')
|
||
$element.attr('aria-expanded',isOpen)
|
||
$trigger.toggleClass('collapsed',!isOpen).attr('aria-expanded',isOpen)}
|
||
function getTargetFromTrigger($trigger){var href
|
||
var target=$trigger.attr('data-target')||(href=$trigger.attr('href'))&&href.replace(/.*(?=#[^\s]+$)/,'')
|
||
return $(target)}
|
||
function Plugin(option){return this.each(function(){var $this=$(this)
|
||
var data=$this.data('bs.collapse')
|
||
var options=$.extend({},Collapse.DEFAULTS,$this.data(),typeof option=='object'&&option)
|
||
if(!data&&options.toggle&&/show|hide/.test(option))options.toggle=false
|
||
if(!data)$this.data('bs.collapse',(data=new Collapse(this,options)))
|
||
if(typeof option=='string')data[option]()})}
|
||
var old=$.fn.collapse
|
||
$.fn.collapse=Plugin
|
||
$.fn.collapse.Constructor=Collapse
|
||
$.fn.collapse.noConflict=function(){$.fn.collapse=old
|
||
return this}
|
||
$(document).on('click.bs.collapse.data-api','[data-toggle="collapse"]',function(e){var $this=$(this)
|
||
if(!$this.attr('data-target'))e.preventDefault()
|
||
var $target=getTargetFromTrigger($this)
|
||
var data=$target.data('bs.collapse')
|
||
var option=data?'toggle':$this.data()
|
||
Plugin.call($target,option)})}(jQuery);}.call(exports,__webpack_require__(1)))}),(function(module,exports,__webpack_require__){(function(jQuery){+function($){'use strict';var backdrop='.dropdown-backdrop'
|
||
var toggle='[data-toggle="dropdown"]'
|
||
var Dropdown=function(element){$(element).on('click.bs.dropdown',this.toggle)}
|
||
Dropdown.VERSION='3.3.7'
|
||
function getParent($this){var selector=$this.attr('data-target')
|
||
if(!selector){selector=$this.attr('href')
|
||
selector=selector&&/#[A-Za-z]/.test(selector)&&selector.replace(/.*(?=#[^\s]*$)/,'')}
|
||
var $parent=selector&&$(selector)
|
||
return $parent&&$parent.length?$parent:$this.parent()}
|
||
function clearMenus(e){if(e&&e.which===3)return
|
||
$(backdrop).remove()
|
||
$(toggle).each(function(){var $this=$(this)
|
||
var $parent=getParent($this)
|
||
var relatedTarget={relatedTarget:this}
|
||
if(!$parent.hasClass('open'))return
|
||
if(e&&e.type=='click'&&/input|textarea/i.test(e.target.tagName)&&$.contains($parent[0],e.target))return
|
||
$parent.trigger(e=$.Event('hide.bs.dropdown',relatedTarget))
|
||
if(e.isDefaultPrevented())return
|
||
$this.attr('aria-expanded','false')
|
||
$parent.removeClass('open').trigger($.Event('hidden.bs.dropdown',relatedTarget))})}
|
||
Dropdown.prototype.toggle=function(e){var $this=$(this)
|
||
if($this.is('.disabled, :disabled'))return
|
||
var $parent=getParent($this)
|
||
var isActive=$parent.hasClass('open')
|
||
clearMenus()
|
||
if(!isActive){if('ontouchstart'in document.documentElement&&!$parent.closest('.navbar-nav').length){$(document.createElement('div')).addClass('dropdown-backdrop').insertAfter($(this)).on('click',clearMenus)}
|
||
var relatedTarget={relatedTarget:this}
|
||
$parent.trigger(e=$.Event('show.bs.dropdown',relatedTarget))
|
||
if(e.isDefaultPrevented())return
|
||
$this.trigger('focus').attr('aria-expanded','true')
|
||
$parent.toggleClass('open').trigger($.Event('shown.bs.dropdown',relatedTarget))}
|
||
return false}
|
||
Dropdown.prototype.keydown=function(e){if(!/(38|40|27|32)/.test(e.which)||/input|textarea/i.test(e.target.tagName))return
|
||
var $this=$(this)
|
||
e.preventDefault()
|
||
e.stopPropagation()
|
||
if($this.is('.disabled, :disabled'))return
|
||
var $parent=getParent($this)
|
||
var isActive=$parent.hasClass('open')
|
||
if(!isActive&&e.which!=27||isActive&&e.which==27){if(e.which==27)$parent.find(toggle).trigger('focus')
|
||
return $this.trigger('click')}
|
||
var desc=' li:not(.disabled):visible a'
|
||
var $items=$parent.find('.dropdown-menu'+desc)
|
||
if(!$items.length)return
|
||
var index=$items.index(e.target)
|
||
if(e.which==38&&index>0)index--
|
||
if(e.which==40&&index<$items.length-1)index++
|
||
if(!~index)index=0
|
||
$items.eq(index).trigger('focus')}
|
||
function Plugin(option){return this.each(function(){var $this=$(this)
|
||
var data=$this.data('bs.dropdown')
|
||
if(!data)$this.data('bs.dropdown',(data=new Dropdown(this)))
|
||
if(typeof option=='string')data[option].call($this)})}
|
||
var old=$.fn.dropdown
|
||
$.fn.dropdown=Plugin
|
||
$.fn.dropdown.Constructor=Dropdown
|
||
$.fn.dropdown.noConflict=function(){$.fn.dropdown=old
|
||
return this}
|
||
$(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','.dropdown-menu',Dropdown.prototype.keydown)}(jQuery);}.call(exports,__webpack_require__(1)))}),(function(module,exports,__webpack_require__){(function(jQuery){+function($){'use strict';var Modal=function(element,options){this.options=options
|
||
this.$body=$(document.body)
|
||
this.$element=$(element)
|
||
this.$dialog=this.$element.find('.modal-dialog')
|
||
this.$backdrop=null
|
||
this.isShown=null
|
||
this.originalBodyPad=null
|
||
this.scrollbarWidth=0
|
||
this.ignoreBackdropClick=false
|
||
if(this.options.remote){this.$element.find('.modal-content').load(this.options.remote,$.proxy(function(){this.$element.trigger('loaded.bs.modal')},this))}}
|
||
Modal.VERSION='3.3.7'
|
||
Modal.TRANSITION_DURATION=300
|
||
Modal.BACKDROP_TRANSITION_DURATION=150
|
||
Modal.DEFAULTS={backdrop:true,keyboard:true,show:true}
|
||
Modal.prototype.toggle=function(_relatedTarget){return this.isShown?this.hide():this.show(_relatedTarget)}
|
||
Modal.prototype.show=function(_relatedTarget){var that=this
|
||
var e=$.Event('show.bs.modal',{relatedTarget:_relatedTarget})
|
||
this.$element.trigger(e)
|
||
if(this.isShown||e.isDefaultPrevented())return
|
||
this.isShown=true
|
||
this.checkScrollbar()
|
||
this.setScrollbar()
|
||
this.$body.addClass('modal-open')
|
||
this.escape()
|
||
this.resize()
|
||
this.$element.on('click.dismiss.bs.modal','[data-dismiss="modal"]',$.proxy(this.hide,this))
|
||
this.$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})})
|
||
this.backdrop(function(){var transition=$.support.transition&&that.$element.hasClass('fade')
|
||
if(!that.$element.parent().length){that.$element.appendTo(that.$body)}
|
||
that.$element.show().scrollTop(0)
|
||
that.adjustDialog()
|
||
if(transition){that.$element[0].offsetWidth}
|
||
that.$element.addClass('in')
|
||
that.enforceFocus()
|
||
var e=$.Event('shown.bs.modal',{relatedTarget:_relatedTarget})
|
||
transition?that.$dialog.one('bsTransitionEnd',function(){that.$element.trigger('focus').trigger(e)}).emulateTransitionEnd(Modal.TRANSITION_DURATION):that.$element.trigger('focus').trigger(e)})}
|
||
Modal.prototype.hide=function(e){if(e)e.preventDefault()
|
||
e=$.Event('hide.bs.modal')
|
||
this.$element.trigger(e)
|
||
if(!this.isShown||e.isDefaultPrevented())return
|
||
this.isShown=false
|
||
this.escape()
|
||
this.resize()
|
||
$(document).off('focusin.bs.modal')
|
||
this.$element.removeClass('in').off('click.dismiss.bs.modal').off('mouseup.dismiss.bs.modal')
|
||
this.$dialog.off('mousedown.dismiss.bs.modal')
|
||
$.support.transition&&this.$element.hasClass('fade')?this.$element.one('bsTransitionEnd',$.proxy(this.hideModal,this)).emulateTransitionEnd(Modal.TRANSITION_DURATION):this.hideModal()}
|
||
Modal.prototype.enforceFocus=function(){$(document).off('focusin.bs.modal').on('focusin.bs.modal',$.proxy(function(e){if(document!==e.target&&this.$element[0]!==e.target&&!this.$element.has(e.target).length){this.$element.trigger('focus')}},this))}
|
||
Modal.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')}}
|
||
Modal.prototype.resize=function(){if(this.isShown){$(window).on('resize.bs.modal',$.proxy(this.handleUpdate,this))}else{$(window).off('resize.bs.modal')}}
|
||
Modal.prototype.hideModal=function(){var that=this
|
||
this.$element.hide()
|
||
this.backdrop(function(){that.$body.removeClass('modal-open')
|
||
that.resetAdjustments()
|
||
that.resetScrollbar()
|
||
that.$element.trigger('hidden.bs.modal')})}
|
||
Modal.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove()
|
||
this.$backdrop=null}
|
||
Modal.prototype.backdrop=function(callback){var that=this
|
||
var animate=this.$element.hasClass('fade')?'fade':''
|
||
if(this.isShown&&this.options.backdrop){var doAnimate=$.support.transition&&animate
|
||
this.$backdrop=$(document.createElement('div')).addClass('modal-backdrop '+animate).appendTo(this.$body)
|
||
this.$element.on('click.dismiss.bs.modal',$.proxy(function(e){if(this.ignoreBackdropClick){this.ignoreBackdropClick=false
|
||
return}
|
||
if(e.target!==e.currentTarget)return
|
||
this.options.backdrop=='static'?this.$element[0].focus():this.hide()},this))
|
||
if(doAnimate)this.$backdrop[0].offsetWidth
|
||
this.$backdrop.addClass('in')
|
||
if(!callback)return
|
||
doAnimate?this.$backdrop.one('bsTransitionEnd',callback).emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION):callback()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass('in')
|
||
var callbackRemove=function(){that.removeBackdrop()
|
||
callback&&callback()}
|
||
$.support.transition&&this.$element.hasClass('fade')?this.$backdrop.one('bsTransitionEnd',callbackRemove).emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION):callbackRemove()}else if(callback){callback()}}
|
||
Modal.prototype.handleUpdate=function(){this.adjustDialog()}
|
||
Modal.prototype.adjustDialog=function(){var modalIsOverflowing=this.$element[0].scrollHeight>document.documentElement.clientHeight
|
||
this.$element.css({paddingLeft:!this.bodyIsOverflowing&&modalIsOverflowing?this.scrollbarWidth:'',paddingRight:this.bodyIsOverflowing&&!modalIsOverflowing?this.scrollbarWidth:''})}
|
||
Modal.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:'',paddingRight:''})}
|
||
Modal.prototype.checkScrollbar=function(){var fullWindowWidth=window.innerWidth
|
||
if(!fullWindowWidth){var documentElementRect=document.documentElement.getBoundingClientRect()
|
||
fullWindowWidth=documentElementRect.right-Math.abs(documentElementRect.left)}
|
||
this.bodyIsOverflowing=document.body.clientWidth<fullWindowWidth
|
||
this.scrollbarWidth=this.measureScrollbar()}
|
||
Modal.prototype.setScrollbar=function(){var bodyPad=parseInt((this.$body.css('padding-right')||0),10)
|
||
this.originalBodyPad=document.body.style.paddingRight||''
|
||
if(this.bodyIsOverflowing)this.$body.css('padding-right',bodyPad+this.scrollbarWidth)}
|
||
Modal.prototype.resetScrollbar=function(){this.$body.css('padding-right',this.originalBodyPad)}
|
||
Modal.prototype.measureScrollbar=function(){var scrollDiv=document.createElement('div')
|
||
scrollDiv.className='modal-scrollbar-measure'
|
||
this.$body.append(scrollDiv)
|
||
var scrollbarWidth=scrollDiv.offsetWidth-scrollDiv.clientWidth
|
||
this.$body[0].removeChild(scrollDiv)
|
||
return scrollbarWidth}
|
||
function Plugin(option,_relatedTarget){return this.each(function(){var $this=$(this)
|
||
var data=$this.data('bs.modal')
|
||
var options=$.extend({},Modal.DEFAULTS,$this.data(),typeof option=='object'&&option)
|
||
if(!data)$this.data('bs.modal',(data=new Modal(this,options)))
|
||
if(typeof option=='string')data[option](_relatedTarget)
|
||
else if(options.show)data.show(_relatedTarget)})}
|
||
var old=$.fn.modal
|
||
$.fn.modal=Plugin
|
||
$.fn.modal.Constructor=Modal
|
||
$.fn.modal.noConflict=function(){$.fn.modal=old
|
||
return this}
|
||
$(document).on('click.bs.modal.data-api','[data-toggle="modal"]',function(e){var $this=$(this)
|
||
var href=$this.attr('href')
|
||
var $target=$($this.attr('data-target')||(href&&href.replace(/.*(?=#[^\s]+$)/,'')))
|
||
var option=$target.data('bs.modal')?'toggle':$.extend({remote:!/#/.test(href)&&href},$target.data(),$this.data())
|
||
if($this.is('a'))e.preventDefault()
|
||
$target.one('show.bs.modal',function(showEvent){if(showEvent.isDefaultPrevented())return
|
||
$target.one('hidden.bs.modal',function(){$this.is(':visible')&&$this.trigger('focus')})})
|
||
Plugin.call($target,option,this)})}(jQuery);}.call(exports,__webpack_require__(1)))}),(function(module,exports,__webpack_require__){(function(jQuery){+function($){'use strict';var Tooltip=function(element,options){this.type=null
|
||
this.options=null
|
||
this.enabled=null
|
||
this.timeout=null
|
||
this.hoverState=null
|
||
this.$element=null
|
||
this.inState=null
|
||
this.init('tooltip',element,options)}
|
||
Tooltip.VERSION='3.3.7'
|
||
Tooltip.TRANSITION_DURATION=150
|
||
Tooltip.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}}
|
||
Tooltip.prototype.init=function(type,element,options){this.enabled=true
|
||
this.type=type
|
||
this.$element=$(element)
|
||
this.options=this.getOptions(options)
|
||
this.$viewport=this.options.viewport&&$($.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):(this.options.viewport.selector||this.options.viewport))
|
||
this.inState={click:false,hover:false,focus:false}
|
||
if(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(' ')
|
||
for(var i=triggers.length;i--;){var trigger=triggers[i]
|
||
if(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'
|
||
var eventOut=trigger=='hover'?'mouseleave':'focusout'
|
||
this.$element.on(eventIn+'.'+this.type,this.options.selector,$.proxy(this.enter,this))
|
||
this.$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()}
|
||
Tooltip.prototype.getDefaults=function(){return Tooltip.DEFAULTS}
|
||
Tooltip.prototype.getOptions=function(options){options=$.extend({},this.getDefaults(),this.$element.data(),options)
|
||
if(options.delay&&typeof options.delay=='number'){options.delay={show:options.delay,hide:options.delay}}
|
||
return options}
|
||
Tooltip.prototype.getDelegateOptions=function(){var options={}
|
||
var defaults=this.getDefaults()
|
||
this._options&&$.each(this._options,function(key,value){if(defaults[key]!=value)options[key]=value})
|
||
return options}
|
||
Tooltip.prototype.enter=function(obj){var self=obj instanceof this.constructor?obj:$(obj.currentTarget).data('bs.'+this.type)
|
||
if(!self){self=new this.constructor(obj.currentTarget,this.getDelegateOptions())
|
||
$(obj.currentTarget).data('bs.'+this.type,self)}
|
||
if(obj instanceof $.Event){self.inState[obj.type=='focusin'?'focus':'hover']=true}
|
||
if(self.tip().hasClass('in')||self.hoverState=='in'){self.hoverState='in'
|
||
return}
|
||
clearTimeout(self.timeout)
|
||
self.hoverState='in'
|
||
if(!self.options.delay||!self.options.delay.show)return self.show()
|
||
self.timeout=setTimeout(function(){if(self.hoverState=='in')self.show()},self.options.delay.show)}
|
||
Tooltip.prototype.isInStateTrue=function(){for(var key in this.inState){if(this.inState[key])return true}
|
||
return false}
|
||
Tooltip.prototype.leave=function(obj){var self=obj instanceof this.constructor?obj:$(obj.currentTarget).data('bs.'+this.type)
|
||
if(!self){self=new this.constructor(obj.currentTarget,this.getDelegateOptions())
|
||
$(obj.currentTarget).data('bs.'+this.type,self)}
|
||
if(obj instanceof $.Event){self.inState[obj.type=='focusout'?'focus':'hover']=false}
|
||
if(self.isInStateTrue())return
|
||
clearTimeout(self.timeout)
|
||
self.hoverState='out'
|
||
if(!self.options.delay||!self.options.delay.hide)return self.hide()
|
||
self.timeout=setTimeout(function(){if(self.hoverState=='out')self.hide()},self.options.delay.hide)}
|
||
Tooltip.prototype.show=function(){var e=$.Event('show.bs.'+this.type)
|
||
if(this.hasContent()&&this.enabled){this.$element.trigger(e)
|
||
var inDom=$.contains(this.$element[0].ownerDocument.documentElement,this.$element[0])
|
||
if(e.isDefaultPrevented()||!inDom)return
|
||
var that=this
|
||
var $tip=this.tip()
|
||
var tipId=this.getUID(this.type)
|
||
this.setContent()
|
||
$tip.attr('id',tipId)
|
||
this.$element.attr('aria-describedby',tipId)
|
||
if(this.options.animation)$tip.addClass('fade')
|
||
var placement=typeof this.options.placement=='function'?this.options.placement.call(this,$tip[0],this.$element[0]):this.options.placement
|
||
var autoToken=/\s?auto?\s?/i
|
||
var autoPlace=autoToken.test(placement)
|
||
if(autoPlace)placement=placement.replace(autoToken,'')||'top'
|
||
$tip.detach().css({top:0,left:0,display:'block'}).addClass(placement).data('bs.'+this.type,this)
|
||
this.options.container?$tip.appendTo(this.options.container):$tip.insertAfter(this.$element)
|
||
this.$element.trigger('inserted.bs.'+this.type)
|
||
var pos=this.getPosition()
|
||
var actualWidth=$tip[0].offsetWidth
|
||
var actualHeight=$tip[0].offsetHeight
|
||
if(autoPlace){var orgPlacement=placement
|
||
var viewportDim=this.getPosition(this.$viewport)
|
||
placement=placement=='bottom'&&pos.bottom+actualHeight>viewportDim.bottom?'top':placement=='top'&&pos.top-actualHeight<viewportDim.top?'bottom':placement=='right'&&pos.right+actualWidth>viewportDim.width?'left':placement=='left'&&pos.left-actualWidth<viewportDim.left?'right':placement
|
||
$tip.removeClass(orgPlacement).addClass(placement)}
|
||
var calculatedOffset=this.getCalculatedOffset(placement,pos,actualWidth,actualHeight)
|
||
this.applyPlacement(calculatedOffset,placement)
|
||
var complete=function(){var prevHoverState=that.hoverState
|
||
that.$element.trigger('shown.bs.'+that.type)
|
||
that.hoverState=null
|
||
if(prevHoverState=='out')that.leave(that)}
|
||
$.support.transition&&this.$tip.hasClass('fade')?$tip.one('bsTransitionEnd',complete).emulateTransitionEnd(Tooltip.TRANSITION_DURATION):complete()}}
|
||
Tooltip.prototype.applyPlacement=function(offset,placement){var $tip=this.tip()
|
||
var width=$tip[0].offsetWidth
|
||
var height=$tip[0].offsetHeight
|
||
var marginTop=parseInt($tip.css('margin-top'),10)
|
||
var marginLeft=parseInt($tip.css('margin-left'),10)
|
||
if(isNaN(marginTop))marginTop=0
|
||
if(isNaN(marginLeft))marginLeft=0
|
||
offset.top+=marginTop
|
||
offset.left+=marginLeft
|
||
$.offset.setOffset($tip[0],$.extend({using:function(props){$tip.css({top:Math.round(props.top),left:Math.round(props.left)})}},offset),0)
|
||
$tip.addClass('in')
|
||
var actualWidth=$tip[0].offsetWidth
|
||
var actualHeight=$tip[0].offsetHeight
|
||
if(placement=='top'&&actualHeight!=height){offset.top=offset.top+height-actualHeight}
|
||
var delta=this.getViewportAdjustedDelta(placement,offset,actualWidth,actualHeight)
|
||
if(delta.left)offset.left+=delta.left
|
||
else offset.top+=delta.top
|
||
var isVertical=/top|bottom/.test(placement)
|
||
var arrowDelta=isVertical?delta.left*2-width+actualWidth:delta.top*2-height+actualHeight
|
||
var arrowOffsetPosition=isVertical?'offsetWidth':'offsetHeight'
|
||
$tip.offset(offset)
|
||
this.replaceArrow(arrowDelta,$tip[0][arrowOffsetPosition],isVertical)}
|
||
Tooltip.prototype.replaceArrow=function(delta,dimension,isVertical){this.arrow().css(isVertical?'left':'top',50*(1-delta/dimension)+'%').css(isVertical?'top':'left','')}
|
||
Tooltip.prototype.setContent=function(){var $tip=this.tip()
|
||
var title=this.getTitle()
|
||
$tip.find('.tooltip-inner')[this.options.html?'html':'text'](title)
|
||
$tip.removeClass('fade in top bottom left right')}
|
||
Tooltip.prototype.hide=function(callback){var that=this
|
||
var $tip=$(this.$tip)
|
||
var e=$.Event('hide.bs.'+this.type)
|
||
function complete(){if(that.hoverState!='in')$tip.detach()
|
||
if(that.$element){that.$element.removeAttr('aria-describedby').trigger('hidden.bs.'+that.type)}
|
||
callback&&callback()}
|
||
this.$element.trigger(e)
|
||
if(e.isDefaultPrevented())return
|
||
$tip.removeClass('in')
|
||
$.support.transition&&$tip.hasClass('fade')?$tip.one('bsTransitionEnd',complete).emulateTransitionEnd(Tooltip.TRANSITION_DURATION):complete()
|
||
this.hoverState=null
|
||
return this}
|
||
Tooltip.prototype.fixTitle=function(){var $e=this.$element
|
||
if($e.attr('title')||typeof $e.attr('data-original-title')!='string'){$e.attr('data-original-title',$e.attr('title')||'').attr('title','')}}
|
||
Tooltip.prototype.hasContent=function(){return this.getTitle()}
|
||
Tooltip.prototype.getPosition=function($element){$element=$element||this.$element
|
||
var el=$element[0]
|
||
var isBody=el.tagName=='BODY'
|
||
var elRect=el.getBoundingClientRect()
|
||
if(elRect.width==null){elRect=$.extend({},elRect,{width:elRect.right-elRect.left,height:elRect.bottom-elRect.top})}
|
||
var isSvg=window.SVGElement&&el instanceof window.SVGElement
|
||
var elOffset=isBody?{top:0,left:0}:(isSvg?null:$element.offset())
|
||
var scroll={scroll:isBody?document.documentElement.scrollTop||document.body.scrollTop:$element.scrollTop()}
|
||
var outerDims=isBody?{width:$(window).width(),height:$(window).height()}:null
|
||
return $.extend({},elRect,scroll,outerDims,elOffset)}
|
||
Tooltip.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}}
|
||
Tooltip.prototype.getViewportAdjustedDelta=function(placement,pos,actualWidth,actualHeight){var delta={top:0,left:0}
|
||
if(!this.$viewport)return delta
|
||
var viewportPadding=this.options.viewport&&this.options.viewport.padding||0
|
||
var viewportDimensions=this.getPosition(this.$viewport)
|
||
if(/right|left/.test(placement)){var topEdgeOffset=pos.top-viewportPadding-viewportDimensions.scroll
|
||
var bottomEdgeOffset=pos.top+viewportPadding-viewportDimensions.scroll+actualHeight
|
||
if(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
|
||
var rightEdgeOffset=pos.left+viewportPadding+actualWidth
|
||
if(leftEdgeOffset<viewportDimensions.left){delta.left=viewportDimensions.left-leftEdgeOffset}else if(rightEdgeOffset>viewportDimensions.right){delta.left=viewportDimensions.left+viewportDimensions.width-rightEdgeOffset}}
|
||
return delta}
|
||
Tooltip.prototype.getTitle=function(){var title
|
||
var $e=this.$element
|
||
var o=this.options
|
||
title=$e.attr('data-original-title')||(typeof o.title=='function'?o.title.call($e[0]):o.title)
|
||
return title}
|
||
Tooltip.prototype.getUID=function(prefix){do prefix+=~~(Math.random()*1000000)
|
||
while(document.getElementById(prefix))
|
||
return prefix}
|
||
Tooltip.prototype.tip=function(){if(!this.$tip){this.$tip=$(this.options.template)
|
||
if(this.$tip.length!=1){throw new Error(this.type+' `template` option must consist of exactly 1 top-level element!')}}
|
||
return this.$tip}
|
||
Tooltip.prototype.arrow=function(){return(this.$arrow=this.$arrow||this.tip().find('.tooltip-arrow'))}
|
||
Tooltip.prototype.enable=function(){this.enabled=true}
|
||
Tooltip.prototype.disable=function(){this.enabled=false}
|
||
Tooltip.prototype.toggleEnabled=function(){this.enabled=!this.enabled}
|
||
Tooltip.prototype.toggle=function(e){var self=this
|
||
if(e){self=$(e.currentTarget).data('bs.'+this.type)
|
||
if(!self){self=new this.constructor(e.currentTarget,this.getDelegateOptions())
|
||
$(e.currentTarget).data('bs.'+this.type,self)}}
|
||
if(e){self.inState.click=!self.inState.click
|
||
if(self.isInStateTrue())self.enter(self)
|
||
else self.leave(self)}else{self.tip().hasClass('in')?self.leave(self):self.enter(self)}}
|
||
Tooltip.prototype.destroy=function(){var that=this
|
||
clearTimeout(this.timeout)
|
||
this.hide(function(){that.$element.off('.'+that.type).removeData('bs.'+that.type)
|
||
if(that.$tip){that.$tip.detach()}
|
||
that.$tip=null
|
||
that.$arrow=null
|
||
that.$viewport=null
|
||
that.$element=null})}
|
||
function Plugin(option){return this.each(function(){var $this=$(this)
|
||
var data=$this.data('bs.tooltip')
|
||
var options=typeof option=='object'&&option
|
||
if(!data&&/destroy|hide/.test(option))return
|
||
if(!data)$this.data('bs.tooltip',(data=new Tooltip(this,options)))
|
||
if(typeof option=='string')data[option]()})}
|
||
var old=$.fn.tooltip
|
||
$.fn.tooltip=Plugin
|
||
$.fn.tooltip.Constructor=Tooltip
|
||
$.fn.tooltip.noConflict=function(){$.fn.tooltip=old
|
||
return this}}(jQuery);}.call(exports,__webpack_require__(1)))}),(function(module,exports,__webpack_require__){(function(jQuery){+function($){'use strict';var Popover=function(element,options){this.init('popover',element,options)}
|
||
if(!$.fn.tooltip)throw new Error('Popover requires tooltip.js')
|
||
Popover.VERSION='3.3.7'
|
||
Popover.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>'})
|
||
Popover.prototype=$.extend({},$.fn.tooltip.Constructor.prototype)
|
||
Popover.prototype.constructor=Popover
|
||
Popover.prototype.getDefaults=function(){return Popover.DEFAULTS}
|
||
Popover.prototype.setContent=function(){var $tip=this.tip()
|
||
var title=this.getTitle()
|
||
var content=this.getContent()
|
||
$tip.find('.popover-title')[this.options.html?'html':'text'](title)
|
||
$tip.find('.popover-content').children().detach().end()[this.options.html?(typeof content=='string'?'html':'append'):'text'](content)
|
||
$tip.removeClass('fade top bottom left right in')
|
||
if(!$tip.find('.popover-title').html())$tip.find('.popover-title').hide()}
|
||
Popover.prototype.hasContent=function(){return this.getTitle()||this.getContent()}
|
||
Popover.prototype.getContent=function(){var $e=this.$element
|
||
var o=this.options
|
||
return $e.attr('data-content')||(typeof o.content=='function'?o.content.call($e[0]):o.content)}
|
||
Popover.prototype.arrow=function(){return(this.$arrow=this.$arrow||this.tip().find('.arrow'))}
|
||
function Plugin(option){return this.each(function(){var $this=$(this)
|
||
var data=$this.data('bs.popover')
|
||
var options=typeof option=='object'&&option
|
||
if(!data&&/destroy|hide/.test(option))return
|
||
if(!data)$this.data('bs.popover',(data=new Popover(this,options)))
|
||
if(typeof option=='string')data[option]()})}
|
||
var old=$.fn.popover
|
||
$.fn.popover=Plugin
|
||
$.fn.popover.Constructor=Popover
|
||
$.fn.popover.noConflict=function(){$.fn.popover=old
|
||
return this}}(jQuery);}.call(exports,__webpack_require__(1)))}),(function(module,exports,__webpack_require__){(function(jQuery){+function($){'use strict';function ScrollSpy(element,options){this.$body=$(document.body)
|
||
this.$scrollElement=$(element).is(document.body)?$(window):$(element)
|
||
this.options=$.extend({},ScrollSpy.DEFAULTS,options)
|
||
this.selector=(this.options.target||'')+' .nav li > a'
|
||
this.offsets=[]
|
||
this.targets=[]
|
||
this.activeTarget=null
|
||
this.scrollHeight=0
|
||
this.$scrollElement.on('scroll.bs.scrollspy',$.proxy(this.process,this))
|
||
this.refresh()
|
||
this.process()}
|
||
ScrollSpy.VERSION='3.3.7'
|
||
ScrollSpy.DEFAULTS={offset:10}
|
||
ScrollSpy.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)}
|
||
ScrollSpy.prototype.refresh=function(){var that=this
|
||
var offsetMethod='offset'
|
||
var offsetBase=0
|
||
this.offsets=[]
|
||
this.targets=[]
|
||
this.scrollHeight=this.getScrollHeight()
|
||
if(!$.isWindow(this.$scrollElement[0])){offsetMethod='position'
|
||
offsetBase=this.$scrollElement.scrollTop()}
|
||
this.$body.find(this.selector).map(function(){var $el=$(this)
|
||
var href=$el.data('target')||$el.attr('href')
|
||
var $href=/^#./.test(href)&&$(href)
|
||
return($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])
|
||
that.targets.push(this[1])})}
|
||
ScrollSpy.prototype.process=function(){var scrollTop=this.$scrollElement.scrollTop()+this.options.offset
|
||
var scrollHeight=this.getScrollHeight()
|
||
var maxScroll=this.options.offset+scrollHeight-this.$scrollElement.height()
|
||
var offsets=this.offsets
|
||
var targets=this.targets
|
||
var activeTarget=this.activeTarget
|
||
var i
|
||
if(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
|
||
return 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])}}
|
||
ScrollSpy.prototype.activate=function(target){this.activeTarget=target
|
||
this.clear()
|
||
var selector=this.selector+'[data-target="'+target+'"],'+
|
||
this.selector+'[href="'+target+'"]'
|
||
var active=$(selector).parents('li').addClass('active')
|
||
if(active.parent('.dropdown-menu').length){active=active.closest('li.dropdown').addClass('active')}
|
||
active.trigger('activate.bs.scrollspy')}
|
||
ScrollSpy.prototype.clear=function(){$(this.selector).parentsUntil(this.options.target,'.active').removeClass('active')}
|
||
function Plugin(option){return this.each(function(){var $this=$(this)
|
||
var data=$this.data('bs.scrollspy')
|
||
var options=typeof option=='object'&&option
|
||
if(!data)$this.data('bs.scrollspy',(data=new ScrollSpy(this,options)))
|
||
if(typeof option=='string')data[option]()})}
|
||
var old=$.fn.scrollspy
|
||
$.fn.scrollspy=Plugin
|
||
$.fn.scrollspy.Constructor=ScrollSpy
|
||
$.fn.scrollspy.noConflict=function(){$.fn.scrollspy=old
|
||
return this}
|
||
$(window).on('load.bs.scrollspy.data-api',function(){$('[data-spy="scroll"]').each(function(){var $spy=$(this)
|
||
Plugin.call($spy,$spy.data())})})}(jQuery);}.call(exports,__webpack_require__(1)))}),(function(module,exports,__webpack_require__){(function(jQuery){+function($){'use strict';var Tab=function(element){this.element=$(element)}
|
||
Tab.VERSION='3.3.7'
|
||
Tab.TRANSITION_DURATION=150
|
||
Tab.prototype.show=function(){var $this=this.element
|
||
var $ul=$this.closest('ul:not(.dropdown-menu)')
|
||
var selector=$this.data('target')
|
||
if(!selector){selector=$this.attr('href')
|
||
selector=selector&&selector.replace(/.*(?=#[^\s]*$)/,'')}
|
||
if($this.parent('li').hasClass('active'))return
|
||
var $previous=$ul.find('.active:last a')
|
||
var hideEvent=$.Event('hide.bs.tab',{relatedTarget:$this[0]})
|
||
var showEvent=$.Event('show.bs.tab',{relatedTarget:$previous[0]})
|
||
$previous.trigger(hideEvent)
|
||
$this.trigger(showEvent)
|
||
if(showEvent.isDefaultPrevented()||hideEvent.isDefaultPrevented())return
|
||
var $target=$(selector)
|
||
this.activate($this.closest('li'),$ul)
|
||
this.activate($target,$target.parent(),function(){$previous.trigger({type:'hidden.bs.tab',relatedTarget:$this[0]})
|
||
$this.trigger({type:'shown.bs.tab',relatedTarget:$previous[0]})})}
|
||
Tab.prototype.activate=function(element,container,callback){var $active=container.find('> .active')
|
||
var transition=callback&&$.support.transition&&($active.length&&$active.hasClass('fade')||!!container.find('> .fade').length)
|
||
function next(){$active.removeClass('active').find('> .dropdown-menu > .active').removeClass('active').end().find('[data-toggle="tab"]').attr('aria-expanded',false)
|
||
element.addClass('active').find('[data-toggle="tab"]').attr('aria-expanded',true)
|
||
if(transition){element[0].offsetWidth
|
||
element.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()
|
||
$active.removeClass('in')}
|
||
function Plugin(option){return this.each(function(){var $this=$(this)
|
||
var data=$this.data('bs.tab')
|
||
if(!data)$this.data('bs.tab',(data=new Tab(this)))
|
||
if(typeof option=='string')data[option]()})}
|
||
var old=$.fn.tab
|
||
$.fn.tab=Plugin
|
||
$.fn.tab.Constructor=Tab
|
||
$.fn.tab.noConflict=function(){$.fn.tab=old
|
||
return this}
|
||
var clickHandler=function(e){e.preventDefault()
|
||
Plugin.call($(this),'show')}
|
||
$(document).on('click.bs.tab.data-api','[data-toggle="tab"]',clickHandler).on('click.bs.tab.data-api','[data-toggle="pill"]',clickHandler)}(jQuery);}.call(exports,__webpack_require__(1)))}),(function(module,exports,__webpack_require__){(function(jQuery){+function($){'use strict';var Affix=function(element,options){this.options=$.extend({},Affix.DEFAULTS,options)
|
||
this.$target=$(this.options.target).on('scroll.bs.affix.data-api',$.proxy(this.checkPosition,this)).on('click.bs.affix.data-api',$.proxy(this.checkPositionWithEventLoop,this))
|
||
this.$element=$(element)
|
||
this.affixed=null
|
||
this.unpin=null
|
||
this.pinnedOffset=null
|
||
this.checkPosition()}
|
||
Affix.VERSION='3.3.7'
|
||
Affix.RESET='affix affix-top affix-bottom'
|
||
Affix.DEFAULTS={offset:0,target:window}
|
||
Affix.prototype.getState=function(scrollHeight,height,offsetTop,offsetBottom){var scrollTop=this.$target.scrollTop()
|
||
var position=this.$element.offset()
|
||
var targetHeight=this.$target.height()
|
||
if(offsetTop!=null&&this.affixed=='top')return scrollTop<offsetTop?'top':false
|
||
if(this.affixed=='bottom'){if(offsetTop!=null)return(scrollTop+this.unpin<=position.top)?false:'bottom'
|
||
return(scrollTop+targetHeight<=scrollHeight-offsetBottom)?false:'bottom'}
|
||
var initializing=this.affixed==null
|
||
var colliderTop=initializing?scrollTop:position.top
|
||
var colliderHeight=initializing?targetHeight:height
|
||
if(offsetTop!=null&&scrollTop<=offsetTop)return'top'
|
||
if(offsetBottom!=null&&(colliderTop+colliderHeight>=scrollHeight-offsetBottom))return'bottom'
|
||
return false}
|
||
Affix.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset
|
||
this.$element.removeClass(Affix.RESET).addClass('affix')
|
||
var scrollTop=this.$target.scrollTop()
|
||
var position=this.$element.offset()
|
||
return(this.pinnedOffset=position.top-scrollTop)}
|
||
Affix.prototype.checkPositionWithEventLoop=function(){setTimeout($.proxy(this.checkPosition,this),1)}
|
||
Affix.prototype.checkPosition=function(){if(!this.$element.is(':visible'))return
|
||
var height=this.$element.height()
|
||
var offset=this.options.offset
|
||
var offsetTop=offset.top
|
||
var offsetBottom=offset.bottom
|
||
var scrollHeight=Math.max($(document).height(),$(document.body).height())
|
||
if(typeof offset!='object')offsetBottom=offsetTop=offset
|
||
if(typeof offsetTop=='function')offsetTop=offset.top(this.$element)
|
||
if(typeof offsetBottom=='function')offsetBottom=offset.bottom(this.$element)
|
||
var affix=this.getState(scrollHeight,height,offsetTop,offsetBottom)
|
||
if(this.affixed!=affix){if(this.unpin!=null)this.$element.css('top','')
|
||
var affixType='affix'+(affix?'-'+affix:'')
|
||
var e=$.Event(affixType+'.bs.affix')
|
||
this.$element.trigger(e)
|
||
if(e.isDefaultPrevented())return
|
||
this.affixed=affix
|
||
this.unpin=affix=='bottom'?this.getPinnedOffset():null
|
||
this.$element.removeClass(Affix.RESET).addClass(affixType).trigger(affixType.replace('affix','affixed')+'.bs.affix')}
|
||
if(affix=='bottom'){this.$element.offset({top:scrollHeight-height-offsetBottom})}}
|
||
function Plugin(option){return this.each(function(){var $this=$(this)
|
||
var data=$this.data('bs.affix')
|
||
var options=typeof option=='object'&&option
|
||
if(!data)$this.data('bs.affix',(data=new Affix(this,options)))
|
||
if(typeof option=='string')data[option]()})}
|
||
var old=$.fn.affix
|
||
$.fn.affix=Plugin
|
||
$.fn.affix.Constructor=Affix
|
||
$.fn.affix.noConflict=function(){$.fn.affix=old
|
||
return this}
|
||
$(window).on('load',function(){$('[data-spy="affix"]').each(function(){var $spy=$(this)
|
||
var data=$spy.data()
|
||
data.offset=data.offset||{}
|
||
if(data.offsetBottom!=null)data.offset.bottom=data.offsetBottom
|
||
if(data.offsetTop!=null)data.offset.top=data.offsetTop
|
||
Plugin.call($spy,data)})})}(jQuery);}.call(exports,__webpack_require__(1)))}),(function(module,exports,__webpack_require__){var define=false;(function(){
|
||
/*!
|
||
* Flickity v1.2.1
|
||
* Touch, responsive, flickable galleries
|
||
*
|
||
* Licensed GPLv3 for open source use
|
||
* or Flickity Commercial License for commercial use
|
||
*
|
||
* http://flickity.metafizzy.co
|
||
* Copyright 2015 Metafizzy
|
||
*/
|
||
(function(window,factory){'use strict';if(typeof define=='function'&&define.amd){define(['./flickity','./drag','./prev-next-button','./page-dots','./player','./add-remove-cell','./lazyload'],factory);}else if(true){module.exports=factory(__webpack_require__(22),__webpack_require__(33),__webpack_require__(36),__webpack_require__(38),__webpack_require__(39),__webpack_require__(40),__webpack_require__(41));}})(window,function factory(Flickity){return Flickity;});}.call(window));}),(function(module,exports,__webpack_require__){var define=false;(function(){(function(window,factory){'use strict';if(typeof define=='function'&&define.amd){define(['classie/classie','eventEmitter/EventEmitter','eventie/eventie','get-size/get-size','fizzy-ui-utils/utils','./cell','./animate'],function(classie,EventEmitter,eventie,getSize,utils,Cell,animatePrototype){return factory(window,classie,EventEmitter,eventie,getSize,utils,Cell,animatePrototype);});}else if(true){module.exports=factory(window,__webpack_require__(23),__webpack_require__(24),__webpack_require__(25),__webpack_require__(26),__webpack_require__(28),__webpack_require__(31),__webpack_require__(32));}else{var _Flickity=window.Flickity;window.Flickity=factory(window,window.classie,window.EventEmitter,window.eventie,window.getSize,window.fizzyUIUtils,_Flickity.Cell,_Flickity.animatePrototype);}}(window,function factory(window,classie,EventEmitter,eventie,getSize,utils,Cell,animatePrototype){'use strict';var jQuery=window.jQuery;var getComputedStyle=window.getComputedStyle;var console=window.console;function moveElements(elems,toElem){elems=utils.makeArray(elems);while(elems.length){toElem.appendChild(elems.shift());}}
|
||
var GUID=0;var instances={};function Flickity(element,options){var queryElement=utils.getQueryElement(element);if(!queryElement){if(console){console.error('Bad element for Flickity: '+(queryElement||element));}
|
||
return;}
|
||
this.element=queryElement;if(jQuery){this.$element=jQuery(this.element);}
|
||
this.options=utils.extend({},this.constructor.defaults);this.option(options);this._create();}
|
||
Flickity.defaults={accessibility:true,cellAlign:'center',freeScrollFriction:0.075,friction:0.28,percentPosition:true,resize:true,selectedAttraction:0.025,setGallerySize:true};Flickity.createMethods=[];utils.extend(Flickity.prototype,EventEmitter.prototype);Flickity.prototype._create=function(){var id=this.guid=++GUID;this.element.flickityGUID=id;instances[id]=this;this.selectedIndex=0;this.restingFrames=0;this.x=0;this.velocity=0;this.accel=0;this.originSide=this.options.rightToLeft?'right':'left';this.viewport=document.createElement('div');this.viewport.className='flickity-viewport';Flickity.setUnselectable(this.viewport);this._createSlider();if(this.options.resize||this.options.watchCSS){eventie.bind(window,'resize',this);this.isResizeBound=true;}
|
||
for(var i=0,len=Flickity.createMethods.length;i<len;i++){var method=Flickity.createMethods[i];this[method]();}
|
||
if(this.options.watchCSS){this.watchCSS();}else{this.activate();}};Flickity.prototype.option=function(opts){utils.extend(this.options,opts);};Flickity.prototype.activate=function(){if(this.isActive){return;}
|
||
this.isActive=true;classie.add(this.element,'flickity-enabled');if(this.options.rightToLeft){classie.add(this.element,'flickity-rtl');}
|
||
this.getSize();var cellElems=this._filterFindCellElements(this.element.children);moveElements(cellElems,this.slider);this.viewport.appendChild(this.slider);this.element.appendChild(this.viewport);this.reloadCells();if(this.options.accessibility){this.element.tabIndex=0;eventie.bind(this.element,'keydown',this);}
|
||
this.emit('activate');var index;var initialIndex=this.options.initialIndex;if(this.isInitActivated){index=this.selectedIndex;}else if(initialIndex!==undefined){index=this.cells[initialIndex]?initialIndex:0;}else{index=0;}
|
||
this.select(index,false,true);this.isInitActivated=true;};Flickity.prototype._createSlider=function(){var slider=document.createElement('div');slider.className='flickity-slider';slider.style[this.originSide]=0;this.slider=slider;};Flickity.prototype._filterFindCellElements=function(elems){return utils.filterFindElements(elems,this.options.cellSelector);};Flickity.prototype.reloadCells=function(){this.cells=this._makeCells(this.slider.children);this.positionCells();this._getWrapShiftCells();this.setGallerySize();};Flickity.prototype._makeCells=function(elems){var cellElems=this._filterFindCellElements(elems);var cells=[];for(var i=0,len=cellElems.length;i<len;i++){var elem=cellElems[i];var cell=new Cell(elem,this);cells.push(cell);}
|
||
return cells;};Flickity.prototype.getLastCell=function(){return this.cells[this.cells.length-1];};Flickity.prototype.positionCells=function(){this._sizeCells(this.cells);this._positionCells(0);};Flickity.prototype._positionCells=function(index){index=index||0;this.maxCellHeight=index?this.maxCellHeight||0:0;var cellX=0;if(index>0){var startCell=this.cells[index-1];cellX=startCell.x+startCell.size.outerWidth;}
|
||
var cell;for(var len=this.cells.length,i=index;i<len;i++){cell=this.cells[i];cell.setPosition(cellX);cellX+=cell.size.outerWidth;this.maxCellHeight=Math.max(cell.size.outerHeight,this.maxCellHeight);}
|
||
this.slideableWidth=cellX;this._containCells();};Flickity.prototype._sizeCells=function(cells){for(var i=0,len=cells.length;i<len;i++){var cell=cells[i];cell.getSize();}};Flickity.prototype._init=Flickity.prototype.reposition=function(){this.positionCells();this.positionSliderAtSelected();};Flickity.prototype.getSize=function(){this.size=getSize(this.element);this.setCellAlign();this.cursorPosition=this.size.innerWidth*this.cellAlign;};var cellAlignShorthands={center:{left:0.5,right:0.5},left:{left:0,right:1},right:{right:0,left:1}};Flickity.prototype.setCellAlign=function(){var shorthand=cellAlignShorthands[this.options.cellAlign];this.cellAlign=shorthand?shorthand[this.originSide]:this.options.cellAlign;};Flickity.prototype.setGallerySize=function(){if(this.options.setGallerySize){this.viewport.style.height=this.maxCellHeight+'px';}};Flickity.prototype._getWrapShiftCells=function(){if(!this.options.wrapAround){return;}
|
||
this._unshiftCells(this.beforeShiftCells);this._unshiftCells(this.afterShiftCells);var gapX=this.cursorPosition;var cellIndex=this.cells.length-1;this.beforeShiftCells=this._getGapCells(gapX,cellIndex,-1);gapX=this.size.innerWidth-this.cursorPosition;this.afterShiftCells=this._getGapCells(gapX,0,1);};Flickity.prototype._getGapCells=function(gapX,cellIndex,increment){var cells=[];while(gapX>0){var cell=this.cells[cellIndex];if(!cell){break;}
|
||
cells.push(cell);cellIndex+=increment;gapX-=cell.size.outerWidth;}
|
||
return cells;};Flickity.prototype._containCells=function(){if(!this.options.contain||this.options.wrapAround||!this.cells.length){return;}
|
||
var startMargin=this.options.rightToLeft?'marginRight':'marginLeft';var endMargin=this.options.rightToLeft?'marginLeft':'marginRight';var firstCellStartMargin=this.cells[0].size[startMargin];var lastCell=this.getLastCell();var contentWidth=this.slideableWidth-lastCell.size[endMargin];var endLimit=contentWidth-this.size.innerWidth*(1-this.cellAlign);var isContentSmaller=contentWidth<this.size.innerWidth;for(var i=0,len=this.cells.length;i<len;i++){var cell=this.cells[i];cell.setDefaultTarget();if(isContentSmaller){cell.target=contentWidth*this.cellAlign;}else{cell.target=Math.max(cell.target,this.cursorPosition+firstCellStartMargin);cell.target=Math.min(cell.target,endLimit);}}};Flickity.prototype.dispatchEvent=function(type,event,args){var emitArgs=[event].concat(args);this.emitEvent(type,emitArgs);if(jQuery&&this.$element){if(event){var $event=jQuery.Event(event);$event.type=type;this.$element.trigger($event,args);}else{this.$element.trigger(type,args);}}};Flickity.prototype.select=function(index,isWrap,isInstant){if(!this.isActive){return;}
|
||
index=parseInt(index,10);var len=this.cells.length;if(this.options.wrapAround&&len>1){if(index<0){this.x-=this.slideableWidth;}else if(index>=len){this.x+=this.slideableWidth;}}
|
||
if(this.options.wrapAround||isWrap){index=utils.modulo(index,len);}
|
||
if(!this.cells[index]){return;}
|
||
this.selectedIndex=index;this.setSelectedCell();if(isInstant){this.positionSliderAtSelected();}else{this.startAnimation();}
|
||
this.dispatchEvent('cellSelect');};Flickity.prototype.previous=function(isWrap){this.select(this.selectedIndex-1,isWrap);};Flickity.prototype.next=function(isWrap){this.select(this.selectedIndex+1,isWrap);};Flickity.prototype.setSelectedCell=function(){this._removeSelectedCellClass();this.selectedCell=this.cells[this.selectedIndex];this.selectedElement=this.selectedCell.element;classie.add(this.selectedElement,'is-selected');};Flickity.prototype._removeSelectedCellClass=function(){if(this.selectedCell){classie.remove(this.selectedCell.element,'is-selected');}};Flickity.prototype.getCell=function(elem){for(var i=0,len=this.cells.length;i<len;i++){var cell=this.cells[i];if(cell.element==elem){return cell;}}};Flickity.prototype.getCells=function(elems){elems=utils.makeArray(elems);var cells=[];for(var i=0,len=elems.length;i<len;i++){var elem=elems[i];var cell=this.getCell(elem);if(cell){cells.push(cell);}}
|
||
return cells;};Flickity.prototype.getCellElements=function(){var cellElems=[];for(var i=0,len=this.cells.length;i<len;i++){cellElems.push(this.cells[i].element);}
|
||
return cellElems;};Flickity.prototype.getParentCell=function(elem){var cell=this.getCell(elem);if(cell){return cell;}
|
||
elem=utils.getParent(elem,'.flickity-slider > *');return this.getCell(elem);};Flickity.prototype.getAdjacentCellElements=function(adjCount,index){if(!adjCount){return[this.selectedElement];}
|
||
index=index===undefined?this.selectedIndex:index;var len=this.cells.length;if(1+(adjCount*2)>=len){return this.getCellElements();}
|
||
var cellElems=[];for(var i=index-adjCount;i<=index+adjCount;i++){var cellIndex=this.options.wrapAround?utils.modulo(i,len):i;var cell=this.cells[cellIndex];if(cell){cellElems.push(cell.element);}}
|
||
return cellElems;};Flickity.prototype.uiChange=function(){this.emit('uiChange');};Flickity.prototype.childUIPointerDown=function(event){this.emitEvent('childUIPointerDown',[event]);};Flickity.prototype.onresize=function(){this.watchCSS();this.resize();};utils.debounceMethod(Flickity,'onresize',150);Flickity.prototype.resize=function(){if(!this.isActive){return;}
|
||
this.getSize();if(this.options.wrapAround){this.x=utils.modulo(this.x,this.slideableWidth);}
|
||
this.positionCells();this._getWrapShiftCells();this.setGallerySize();this.positionSliderAtSelected();};var supportsConditionalCSS=Flickity.supportsConditionalCSS=(function(){var supports;return function checkSupport(){if(supports!==undefined){return supports;}
|
||
if(!getComputedStyle){supports=false;return;}
|
||
var style=document.createElement('style');var cssText=document.createTextNode('body:after { content: "foo"; display: none; }');style.appendChild(cssText);document.head.appendChild(style);var afterContent=getComputedStyle(document.body,':after').content;supports=afterContent.indexOf('foo')!=-1;document.head.removeChild(style);return supports;};})();Flickity.prototype.watchCSS=function(){var watchOption=this.options.watchCSS;if(!watchOption){return;}
|
||
var supports=supportsConditionalCSS();if(!supports){var method=watchOption=='fallbackOn'?'activate':'deactivate';this[method]();return;}
|
||
var afterContent=getComputedStyle(this.element,':after').content;if(afterContent.indexOf('flickity')!=-1){this.activate();}else{this.deactivate();}};Flickity.prototype.onkeydown=function(event){if(!this.options.accessibility||(document.activeElement&&document.activeElement!=this.element)){return;}
|
||
if(event.keyCode==37){var leftMethod=this.options.rightToLeft?'next':'previous';this.uiChange();this[leftMethod]();}else if(event.keyCode==39){var rightMethod=this.options.rightToLeft?'previous':'next';this.uiChange();this[rightMethod]();}};Flickity.prototype.deactivate=function(){if(!this.isActive){return;}
|
||
classie.remove(this.element,'flickity-enabled');classie.remove(this.element,'flickity-rtl');for(var i=0,len=this.cells.length;i<len;i++){var cell=this.cells[i];cell.destroy();}
|
||
this._removeSelectedCellClass();this.element.removeChild(this.viewport);moveElements(this.slider.children,this.element);if(this.options.accessibility){this.element.removeAttribute('tabIndex');eventie.unbind(this.element,'keydown',this);}
|
||
this.isActive=false;this.emit('deactivate');};Flickity.prototype.destroy=function(){this.deactivate();if(this.isResizeBound){eventie.unbind(window,'resize',this);}
|
||
this.emit('destroy');if(jQuery&&this.$element){jQuery.removeData(this.element,'flickity');}
|
||
delete this.element.flickityGUID;delete instances[this.guid];};utils.extend(Flickity.prototype,animatePrototype);var isIE8='attachEvent'in window;Flickity.setUnselectable=function(elem){if(!isIE8){return;}
|
||
elem.setAttribute('unselectable','on');};Flickity.data=function(elem){elem=utils.getQueryElement(elem);var id=elem&&elem.flickityGUID;return id&&instances[id];};utils.htmlInit(Flickity,'flickity');if(jQuery&&jQuery.bridget){jQuery.bridget('flickity',Flickity);}
|
||
Flickity.Cell=Cell;return Flickity;}));}.call(window));}),(function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_FACTORY__,__WEBPACK_AMD_DEFINE_RESULT__;
|
||
/*!
|
||
* classie v1.0.1
|
||
* class helper functions
|
||
* from bonzo https://github.com/ded/bonzo
|
||
* MIT license
|
||
*
|
||
* classie.has( elem, 'my-class' ) -> true/false
|
||
* classie.add( elem, 'my-new-class' )
|
||
* classie.remove( elem, 'my-unwanted-class' )
|
||
* classie.toggle( elem, 'my-class' )
|
||
*/
|
||
(function(window){'use strict';function classReg(className){return new RegExp("(^|\\s+)"+className+"(\\s+|$)");}
|
||
var hasClass,addClass,removeClass;if('classList'in document.documentElement){hasClass=function(elem,c){return elem.classList.contains(c);};addClass=function(elem,c){elem.classList.add(c);};removeClass=function(elem,c){elem.classList.remove(c);};}
|
||
else{hasClass=function(elem,c){return classReg(c).test(elem.className);};addClass=function(elem,c){if(!hasClass(elem,c)){elem.className=elem.className+' '+c;}};removeClass=function(elem,c){elem.className=elem.className.replace(classReg(c),' ');};}
|
||
function toggleClass(elem,c){var fn=hasClass(elem,c)?removeClass:addClass;fn(elem,c);}
|
||
var classie={hasClass:hasClass,addClass:addClass,removeClass:removeClass,toggleClass:toggleClass,has:hasClass,add:addClass,remove:removeClass,toggle:toggleClass};if(true){!(__WEBPACK_AMD_DEFINE_FACTORY__=(classie),__WEBPACK_AMD_DEFINE_RESULT__=(typeof __WEBPACK_AMD_DEFINE_FACTORY__==='function'?(__WEBPACK_AMD_DEFINE_FACTORY__.call(exports,__webpack_require__,exports,module)):__WEBPACK_AMD_DEFINE_FACTORY__),__WEBPACK_AMD_DEFINE_RESULT__!==undefined&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__));}else if(typeof exports==='object'){module.exports=classie;}else{window.classie=classie;}})(window);}),(function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_RESULT__;
|
||
/*!
|
||
* EventEmitter v4.2.11 - git.io/ee
|
||
* Unlicense - http://unlicense.org/
|
||
* Oliver Caldwell - http://oli.me.uk/
|
||
* @preserve
|
||
*/
|
||
;(function(){'use strict';function EventEmitter(){}
|
||
var proto=EventEmitter.prototype;var exports=this;var originalGlobalValue=exports.EventEmitter;function indexOfListener(listeners,listener){var i=listeners.length;while(i--){if(listeners[i].listener===listener){return i;}}
|
||
return-1;}
|
||
function alias(name){return function aliasClosure(){return this[name].apply(this,arguments);};}
|
||
proto.getListeners=function getListeners(evt){var events=this._getEvents();var response;var key;if(evt instanceof RegExp){response={};for(key in events){if(events.hasOwnProperty(key)&&evt.test(key)){response[key]=events[key];}}}
|
||
else{response=events[evt]||(events[evt]=[]);}
|
||
return response;};proto.flattenListeners=function flattenListeners(listeners){var flatListeners=[];var i;for(i=0;i<listeners.length;i+=1){flatListeners.push(listeners[i].listener);}
|
||
return flatListeners;};proto.getListenersAsObject=function getListenersAsObject(evt){var listeners=this.getListeners(evt);var response;if(listeners instanceof Array){response={};response[evt]=listeners;}
|
||
return response||listeners;};proto.addListener=function addListener(evt,listener){var listeners=this.getListenersAsObject(evt);var listenerIsWrapped=typeof listener==='object';var key;for(key in listeners){if(listeners.hasOwnProperty(key)&&indexOfListener(listeners[key],listener)===-1){listeners[key].push(listenerIsWrapped?listener:{listener:listener,once:false});}}
|
||
return this;};proto.on=alias('addListener');proto.addOnceListener=function addOnceListener(evt,listener){return this.addListener(evt,{listener:listener,once:true});};proto.once=alias('addOnceListener');proto.defineEvent=function defineEvent(evt){this.getListeners(evt);return this;};proto.defineEvents=function defineEvents(evts){for(var i=0;i<evts.length;i+=1){this.defineEvent(evts[i]);}
|
||
return this;};proto.removeListener=function removeListener(evt,listener){var listeners=this.getListenersAsObject(evt);var index;var key;for(key in listeners){if(listeners.hasOwnProperty(key)){index=indexOfListener(listeners[key],listener);if(index!==-1){listeners[key].splice(index,1);}}}
|
||
return this;};proto.off=alias('removeListener');proto.addListeners=function addListeners(evt,listeners){return this.manipulateListeners(false,evt,listeners);};proto.removeListeners=function removeListeners(evt,listeners){return this.manipulateListeners(true,evt,listeners);};proto.manipulateListeners=function manipulateListeners(remove,evt,listeners){var i;var value;var single=remove?this.removeListener:this.addListener;var multiple=remove?this.removeListeners:this.addListeners;if(typeof evt==='object'&&!(evt instanceof RegExp)){for(i in evt){if(evt.hasOwnProperty(i)&&(value=evt[i])){if(typeof value==='function'){single.call(this,i,value);}
|
||
else{multiple.call(this,i,value);}}}}
|
||
else{i=listeners.length;while(i--){single.call(this,evt,listeners[i]);}}
|
||
return this;};proto.removeEvent=function removeEvent(evt){var type=typeof evt;var events=this._getEvents();var key;if(type==='string'){delete events[evt];}
|
||
else if(evt instanceof RegExp){for(key in events){if(events.hasOwnProperty(key)&&evt.test(key)){delete events[key];}}}
|
||
else{delete this._events;}
|
||
return this;};proto.removeAllListeners=alias('removeEvent');proto.emitEvent=function emitEvent(evt,args){var listeners=this.getListenersAsObject(evt);var listener;var i;var key;var response;for(key in listeners){if(listeners.hasOwnProperty(key)){i=listeners[key].length;while(i--){listener=listeners[key][i];if(listener.once===true){this.removeListener(evt,listener.listener);}
|
||
response=listener.listener.apply(this,args||[]);if(response===this._getOnceReturnValue()){this.removeListener(evt,listener.listener);}}}}
|
||
return this;};proto.trigger=alias('emitEvent');proto.emit=function emit(evt){var args=Array.prototype.slice.call(arguments,1);return this.emitEvent(evt,args);};proto.setOnceReturnValue=function setOnceReturnValue(value){this._onceReturnValue=value;return this;};proto._getOnceReturnValue=function _getOnceReturnValue(){if(this.hasOwnProperty('_onceReturnValue')){return this._onceReturnValue;}
|
||
else{return true;}};proto._getEvents=function _getEvents(){return this._events||(this._events={});};EventEmitter.noConflict=function noConflict(){exports.EventEmitter=originalGlobalValue;return EventEmitter;};if(true){!(__WEBPACK_AMD_DEFINE_RESULT__=function(){return EventEmitter;}.call(exports,__webpack_require__,exports,module),__WEBPACK_AMD_DEFINE_RESULT__!==undefined&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__));}
|
||
else if(typeof module==='object'&&module.exports){module.exports=EventEmitter;}
|
||
else{exports.EventEmitter=EventEmitter;}}.call(this));}),(function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_FACTORY__,__WEBPACK_AMD_DEFINE_RESULT__;
|
||
/*!
|
||
* eventie v1.0.6
|
||
* event binding helper
|
||
* eventie.bind( elem, 'click', myFn )
|
||
* eventie.unbind( elem, 'click', myFn )
|
||
* MIT license
|
||
*/
|
||
(function(window){'use strict';var docElem=document.documentElement;var bind=function(){};function getIEEvent(obj){var event=window.event;event.target=event.target||event.srcElement||obj;return event;}
|
||
if(docElem.addEventListener){bind=function(obj,type,fn){obj.addEventListener(type,fn,false);};}else if(docElem.attachEvent){bind=function(obj,type,fn){obj[type+fn]=fn.handleEvent?function(){var event=getIEEvent(obj);fn.handleEvent.call(fn,event);}:function(){var event=getIEEvent(obj);fn.call(obj,event);};obj.attachEvent("on"+type,obj[type+fn]);};}
|
||
var unbind=function(){};if(docElem.removeEventListener){unbind=function(obj,type,fn){obj.removeEventListener(type,fn,false);};}else if(docElem.detachEvent){unbind=function(obj,type,fn){obj.detachEvent("on"+type,obj[type+fn]);try{delete obj[type+fn];}catch(err){obj[type+fn]=undefined;}};}
|
||
var eventie={bind:bind,unbind:unbind};if(true){!(__WEBPACK_AMD_DEFINE_FACTORY__=(eventie),__WEBPACK_AMD_DEFINE_RESULT__=(typeof __WEBPACK_AMD_DEFINE_FACTORY__==='function'?(__WEBPACK_AMD_DEFINE_FACTORY__.call(exports,__webpack_require__,exports,module)):__WEBPACK_AMD_DEFINE_FACTORY__),__WEBPACK_AMD_DEFINE_RESULT__!==undefined&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__));}else if(typeof exports==='object'){module.exports=eventie;}else{window.eventie=eventie;}})(window);}),(function(module,exports,__webpack_require__){var define=false;(function(){
|
||
/*!
|
||
* getSize v1.2.2
|
||
* measure size of elements
|
||
* MIT license
|
||
*/
|
||
(function(window,undefined){'use strict';function getStyleSize(value){var num=parseFloat(value);var isValid=value.indexOf('%')===-1&&!isNaN(num);return isValid&#}
|
||
function noop(){}
|
||
var logError=typeof console==='undefined'?noop:function(message){console.error(message);};var measurements=['paddingLeft','paddingRight','paddingTop','paddingBottom','marginLeft','marginRight','marginTop','marginBottom','borderLeftWidth','borderRightWidth','borderTopWidth','borderBottomWidth'];function getZeroSize(){var size={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0};for(var i=0,len=measurements.length;i<len;i++){var measurement=measurements[i];size[measurement]=0;}
|
||
return size;}
|
||
function defineGetSize(getStyleProperty){var isSetup=false;var getStyle,boxSizingProp,isBoxSizeOuter;function setup(){if(isSetup){return;}
|
||
isSetup=true;var getComputedStyle=window.getComputedStyle;getStyle=(function(){var getStyleFn=getComputedStyle?function(elem){return getComputedStyle(elem,null);}:function(elem){return elem.currentStyle;};return function getStyle(elem){var style=getStyleFn(elem);if(!style){logError('Style returned '+style+'. Are you running this code in a hidden iframe on Firefox? '+'See http://bit.ly/getsizebug1');}
|
||
return style;};})();boxSizingProp=getStyleProperty('boxSizing');if(boxSizingProp){var div=document.createElement('div');div.style.width='200px';div.style.padding='1px 2px 3px 4px';div.style.borderStyle='solid';div.style.borderWidth='1px 2px 3px 4px';div.style[boxSizingProp]='border-box';var body=document.body||document.documentElement;body.appendChild(div);var style=getStyle(div);isBoxSizeOuter=getStyleSize(style.width)===200;body.removeChild(div);}}
|
||
function getSize(elem){setup();if(typeof elem==='string'){elem=document.querySelector(elem);}
|
||
if(!elem||typeof elem!=='object'||!elem.nodeType){return;}
|
||
var style=getStyle(elem);if(style.display==='none'){return getZeroSize();}
|
||
var size={};size.width=elem.offsetWidth;size.height=elem.offsetHeight;var isBorderBox=size.isBorderBox=!!(boxSizingProp&&style[boxSizingProp]&&style[boxSizingProp]==='border-box');for(var i=0,len=measurements.length;i<len;i++){var measurement=measurements[i];var value=style[measurement];value=mungeNonPixel(elem,value);var num=parseFloat(value);size[measurement]=!isNaN(num)?num:0;}
|
||
var paddingWidth=size.paddingLeft+size.paddingRight;var paddingHeight=size.paddingTop+size.paddingBottom;var marginWidth=size.marginLeft+size.marginRight;var marginHeight=size.marginTop+size.marginBottom;var borderWidth=size.borderLeftWidth+size.borderRightWidth;var borderHeight=size.borderTopWidth+size.borderBottomWidth;var isBorderBoxSizeOuter=isBorderBox&&isBoxSizeOuter;var styleWidth=getStyleSize(style.width);if(styleWidth!==false){size.width=styleWidth+
|
||
(isBorderBoxSizeOuter?0:paddingWidth+borderWidth);}
|
||
var styleHeight=getStyleSize(style.height);if(styleHeight!==false){size.height=styleHeight+
|
||
(isBorderBoxSizeOuter?0:paddingHeight+borderHeight);}
|
||
size.innerWidth=size.width-(paddingWidth+borderWidth);size.innerHeight=size.height-(paddingHeight+borderHeight);size.outerWidth=size.width+marginWidth;size.outerHeight=size.height+marginHeight;return size;}
|
||
function mungeNonPixel(elem,value){if(window.getComputedStyle||value.indexOf('%')===-1){return value;}
|
||
var style=elem.style;var left=style.left;var rs=elem.runtimeStyle;var rsLeft=rs&&rs.left;if(rsLeft){rs.left=elem.currentStyle.left;}
|
||
style.left=value;value=style.pixelLeft;style.left=left;if(rsLeft){rs.left=rsLeft;}
|
||
return value;}
|
||
return getSize;}
|
||
if(typeof define==='function'&&define.amd){define(['get-style-property/get-style-property'],defineGetSize);}else if(true){module.exports=defineGetSize(__webpack_require__(27));}else{window.getSize=defineGetSize(window.getStyleProperty);}})(window);}.call(window));}),(function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_RESULT__;
|
||
/*!
|
||
* getStyleProperty v1.0.4
|
||
* original by kangax
|
||
* http://perfectionkills.com/feature-testing-css-properties/
|
||
* MIT license
|
||
*/
|
||
(function(window){'use strict';var prefixes='Webkit Moz ms Ms O'.split(' ');var docElemStyle=document.documentElement.style;function getStyleProperty(propName){if(!propName){return;}
|
||
if(typeof docElemStyle[propName]==='string'){return propName;}
|
||
propName=propName.charAt(0).toUpperCase()+propName.slice(1);var prefixed;for(var i=0,len=prefixes.length;i<len;i++){prefixed=prefixes[i]+propName;if(typeof docElemStyle[prefixed]==='string'){return prefixed;}}}
|
||
if(true){!(__WEBPACK_AMD_DEFINE_RESULT__=function(){return getStyleProperty;}.call(exports,__webpack_require__,exports,module),__WEBPACK_AMD_DEFINE_RESULT__!==undefined&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__));}else if(typeof exports==='object'){module.exports=getStyleProperty;}else{window.getStyleProperty=getStyleProperty;}})(window);}),(function(module,exports,__webpack_require__){var define=false;(function(){(function(window,factory){'use strict';if(typeof define=='function'&&define.amd){define(['doc-ready/doc-ready','matches-selector/matches-selector'],function(docReady,matchesSelector){return factory(window,docReady,matchesSelector);});}else if(true){module.exports=factory(window,__webpack_require__(29),__webpack_require__(30));}else{window.fizzyUIUtils=factory(window,window.docReady,window.matchesSelector);}}(window,function factory(window,docReady,matchesSelector){'use strict';var utils={};utils.extend=function(a,b){for(var prop in b){a[prop]=b[prop];}
|
||
return a;};utils.modulo=function(num,div){return((num%div)+div)%div;};var objToString=Object.prototype.toString;utils.isArray=function(obj){return objToString.call(obj)=='[object Array]';};utils.makeArray=function(obj){var ary=[];if(utils.isArray(obj)){ary=obj;}else if(obj&&typeof obj.length=='number'){for(var i=0,len=obj.length;i<len;i++){ary.push(obj[i]);}}else{ary.push(obj);}
|
||
return ary;};utils.indexOf=Array.prototype.indexOf?function(ary,obj){return ary.indexOf(obj);}:function(ary,obj){for(var i=0,len=ary.length;i<len;i++){if(ary[i]===obj){return i;}}
|
||
return-1;};utils.removeFrom=function(ary,obj){var index=utils.indexOf(ary,obj);if(index!=-1){ary.splice(index,1);}};utils.isElement=(typeof HTMLElement=='function'||typeof HTMLElement=='object')?function isElementDOM2(obj){return obj instanceof HTMLElement;}:function isElementQuirky(obj){return obj&&typeof obj=='object'&&obj.nodeType==1&&typeof obj.nodeName=='string';};utils.setText=(function(){var setTextProperty;function setText(elem,text){setTextProperty=setTextProperty||(document.documentElement.textContent!==undefined?'textContent':'innerText');elem[setTextProperty]=text;}
|
||
return setText;})();utils.getParent=function(elem,selector){while(elem!=document.body){elem=elem.parentNode;if(matchesSelector(elem,selector)){return elem;}}};utils.getQueryElement=function(elem){if(typeof elem=='string'){return document.querySelector(elem);}
|
||
return elem;};utils.handleEvent=function(event){var method='on'+event.type;if(this[method]){this[method](event);}};utils.filterFindElements=function(elems,selector){elems=utils.makeArray(elems);var ffElems=[];for(var i=0,len=elems.length;i<len;i++){var elem=elems[i];if(!utils.isElement(elem)){continue;}
|
||
if(selector){if(matchesSelector(elem,selector)){ffElems.push(elem);}
|
||
var childElems=elem.querySelectorAll(selector);for(var j=0,jLen=childElems.length;j<jLen;j++){ffElems.push(childElems[j]);}}else{ffElems.push(elem);}}
|
||
return ffElems;};utils.debounceMethod=function(_class,methodName,threshold){var method=_class.prototype[methodName];var timeoutName=methodName+'Timeout';_class.prototype[methodName]=function(){var timeout=this[timeoutName];if(timeout){clearTimeout(timeout);}
|
||
var args=arguments;var _this=this;this[timeoutName]=setTimeout(function(){method.apply(_this,args);delete _this[timeoutName];},threshold||100);};};utils.toDashed=function(str){return str.replace(/(.)([A-Z])/g,function(match,$1,$2){return $1+'-'+$2;}).toLowerCase();};var console=window.console;utils.htmlInit=function(WidgetClass,namespace){docReady(function(){var dashedNamespace=utils.toDashed(namespace);var elems=document.querySelectorAll('.js-'+dashedNamespace);var dataAttr='data-'+dashedNamespace+'-options';for(var i=0,len=elems.length;i<len;i++){var elem=elems[i];var attr=elem.getAttribute(dataAttr);var options;try{options=attr&&JSON.parse(attr);}catch(error){if(console){console.error('Error parsing '+dataAttr+' on '+
|
||
elem.nodeName.toLowerCase()+(elem.id?'#'+elem.id:'')+': '+
|
||
error);}
|
||
continue;}
|
||
var instance=new WidgetClass(elem,options);var jQuery=window.jQuery;if(jQuery){jQuery.data(elem,namespace,instance);}}});};return utils;}));}.call(window));}),(function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_FACTORY__,__WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;
|
||
/*!
|
||
* docReady v1.0.4
|
||
* Cross browser DOMContentLoaded event emitter
|
||
* MIT license
|
||
*/
|
||
(function(window){'use strict';var document=window.document;var queue=[];function docReady(fn){if(typeof fn!=='function'){return;}
|
||
if(docReady.isReady){fn();}else{queue.push(fn);}}
|
||
docReady.isReady=false;function onReady(event){var isIE8NotReady=event.type==='readystatechange'&&document.readyState!=='complete';if(docReady.isReady||isIE8NotReady){return;}
|
||
trigger();}
|
||
function trigger(){docReady.isReady=true;for(var i=0,len=queue.length;i<len;i++){var fn=queue[i];fn();}}
|
||
function defineDocReady(eventie){if(document.readyState==='complete'){trigger();}else{eventie.bind(document,'DOMContentLoaded',onReady);eventie.bind(document,'readystatechange',onReady);eventie.bind(window,'load',onReady);}
|
||
return docReady;}
|
||
if(true){!(__WEBPACK_AMD_DEFINE_ARRAY__=[__webpack_require__(25)],__WEBPACK_AMD_DEFINE_FACTORY__=(defineDocReady),__WEBPACK_AMD_DEFINE_RESULT__=(typeof __WEBPACK_AMD_DEFINE_FACTORY__==='function'?(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__)):__WEBPACK_AMD_DEFINE_FACTORY__),__WEBPACK_AMD_DEFINE_RESULT__!==undefined&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__));}else if(typeof exports==='object'){module.exports=defineDocReady(require('eventie'));}else{window.docReady=defineDocReady(window.eventie);}})(window);}),(function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_RESULT__;(function(ElemProto){'use strict';var matchesMethod=(function(){if(ElemProto.matches){return'matches';}
|
||
if(ElemProto.matchesSelector){return'matchesSelector';}
|
||
var prefixes=['webkit','moz','ms','o'];for(var i=0,len=prefixes.length;i<len;i++){var prefix=prefixes[i];var method=prefix+'MatchesSelector';if(ElemProto[method]){return method;}}})();function match(elem,selector){return elem[matchesMethod](selector);}
|
||
function checkParent(elem){if(elem.parentNode){return;}
|
||
var fragment=document.createDocumentFragment();fragment.appendChild(elem);}
|
||
function query(elem,selector){checkParent(elem);var elems=elem.parentNode.querySelectorAll(selector);for(var i=0,len=elems.length;i<len;i++){if(elems[i]===elem){return true;}}
|
||
return false;}
|
||
function matchChild(elem,selector){checkParent(elem);return match(elem,selector);}
|
||
var matchesSelector;if(matchesMethod){var div=document.createElement('div');var supportsOrphans=match(div,'div');matchesSelector=supportsOrphans?match:matchChild;}else{matchesSelector=query;}
|
||
if(true){!(__WEBPACK_AMD_DEFINE_RESULT__=function(){return matchesSelector;}.call(exports,__webpack_require__,exports,module),__WEBPACK_AMD_DEFINE_RESULT__!==undefined&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__));}else if(typeof exports==='object'){module.exports=matchesSelector;}
|
||
else{window.matchesSelector=matchesSelector;}})(Element.prototype);}),(function(module,exports,__webpack_require__){var define=false;(function(){(function(window,factory){'use strict';if(typeof define=='function'&&define.amd){define(['get-size/get-size'],function(getSize){return factory(window,getSize);});}else if(true){module.exports=factory(window,__webpack_require__(26));}else{window.Flickity=window.Flickity||{};window.Flickity.Cell=factory(window,window.getSize);}}(window,function factory(window,getSize){'use strict';function Cell(elem,parent){this.element=elem;this.parent=parent;this.create();}
|
||
var isIE8='attachEvent'in window;Cell.prototype.create=function(){this.element.style.position='absolute';if(isIE8){this.element.setAttribute('unselectable','on');}
|
||
this.x=0;this.shift=0;};Cell.prototype.destroy=function(){this.element.style.position='';var side=this.parent.originSide;this.element.style[side]='';};Cell.prototype.getSize=function(){this.size=getSize(this.element);};Cell.prototype.setPosition=function(x){this.x=x;this.setDefaultTarget();this.renderPosition(x);};Cell.prototype.setDefaultTarget=function(){var marginProperty=this.parent.originSide=='left'?'marginLeft':'marginRight';this.target=this.x+this.size[marginProperty]+
|
||
this.size.width*this.parent.cellAlign;};Cell.prototype.renderPosition=function(x){var side=this.parent.originSide;this.element.style[side]=this.parent.getPositionValue(x);};Cell.prototype.wrapShift=function(shift){this.shift=shift;this.renderPosition(this.x+this.parent.slideableWidth*shift);};Cell.prototype.remove=function(){this.element.parentNode.removeChild(this.element);};return Cell;}));}.call(window));}),(function(module,exports,__webpack_require__){var define=false;(function(){(function(window,factory){'use strict';if(typeof define=='function'&&define.amd){define(['get-style-property/get-style-property','fizzy-ui-utils/utils'],function(getStyleProperty,utils){return factory(window,getStyleProperty,utils);});}else if(true){module.exports=factory(window,__webpack_require__(27),__webpack_require__(28));}else{window.Flickity=window.Flickity||{};window.Flickity.animatePrototype=factory(window,window.getStyleProperty,window.fizzyUIUtils);}}(window,function factory(window,getStyleProperty,utils){'use strict';var lastTime=0;var prefixes='webkit moz ms o'.split(' ');var requestAnimationFrame=window.requestAnimationFrame;var cancelAnimationFrame=window.cancelAnimationFrame;var prefix;for(var i=0;i<prefixes.length;i++){if(requestAnimationFrame&&cancelAnimationFrame){break;}
|
||
prefix=prefixes[i];requestAnimationFrame=requestAnimationFrame||window[prefix+'RequestAnimationFrame'];cancelAnimationFrame=cancelAnimationFrame||window[prefix+'CancelAnimationFrame']||window[prefix+'CancelRequestAnimationFrame'];}
|
||
if(!requestAnimationFrame||!cancelAnimationFrame){requestAnimationFrame=function(callback){var currTime=new Date().getTime();var timeToCall=Math.max(0,16-(currTime-lastTime));var id=window.setTimeout(function(){callback(currTime+timeToCall);},timeToCall);lastTime=currTime+timeToCall;return id;};cancelAnimationFrame=function(id){window.clearTimeout(id);};}
|
||
var proto={};proto.startAnimation=function(){if(this.isAnimating){return;}
|
||
this.isAnimating=true;this.restingFrames=0;this.animate();};proto.animate=function(){this.applyDragForce();this.applySelectedAttraction();var previousX=this.x;this.integratePhysics();this.positionSlider();this.settle(previousX);if(this.isAnimating){var _this=this;requestAnimationFrame(function animateFrame(){_this.animate();});}};var transformProperty=getStyleProperty('transform');var is3d=!!getStyleProperty('perspective');proto.positionSlider=function(){var x=this.x;if(this.options.wrapAround&&this.cells.length>1){x=utils.modulo(x,this.slideableWidth);x=x-this.slideableWidth;this.shiftWrapCells(x);}
|
||
x=x+this.cursorPosition;x=this.options.rightToLeft&&transformProperty?-x:x;var value=this.getPositionValue(x);if(transformProperty){this.slider.style[transformProperty]=is3d&&this.isAnimating?'translate3d('+value+',0,0)':'translateX('+value+')';}else{this.slider.style[this.originSide]=value;}};proto.positionSliderAtSelected=function(){if(!this.cells.length){return;}
|
||
var selectedCell=this.cells[this.selectedIndex];this.x=-selectedCell.target;this.positionSlider();};proto.getPositionValue=function(position){if(this.options.percentPosition){return(Math.round((position/this.size.innerWidth)*10000)*0.01)+'%';}else{return Math.round(position)+'px';}};proto.settle=function(previousX){if(!this.isPointerDown&&Math.round(this.x*100)==Math.round(previousX*100)){this.restingFrames++;}
|
||
if(this.restingFrames>2){this.isAnimating=false;delete this.isFreeScrolling;if(is3d){this.positionSlider();}
|
||
this.dispatchEvent('settle');}};proto.shiftWrapCells=function(x){var beforeGap=this.cursorPosition+x;this._shiftCells(this.beforeShiftCells,beforeGap,-1);var afterGap=this.size.innerWidth-(x+this.slideableWidth+this.cursorPosition);this._shiftCells(this.afterShiftCells,afterGap,1);};proto._shiftCells=function(cells,gap,shift){for(var i=0,len=cells.length;i<len;i++){var cell=cells[i];var cellShift=gap>0?shift:0;cell.wrapShift(cellShift);gap-=cell.size.outerWidth;}};proto._unshiftCells=function(cells){if(!cells||!cells.length){return;}
|
||
for(var i=0,len=cells.length;i<len;i++){cells[i].wrapShift(0);}};proto.integratePhysics=function(){this.velocity+=this.accel;this.x+=this.velocity;this.velocity*=this.getFrictionFactor();this.accel=0;};proto.applyForce=function(force){this.accel+=force;};proto.getFrictionFactor=function(){return 1-this.options[this.isFreeScrolling?'freeScrollFriction':'friction'];};proto.getRestingPosition=function(){return this.x+this.velocity/(1-this.getFrictionFactor());};proto.applyDragForce=function(){if(!this.isPointerDown){return;}
|
||
var dragVelocity=this.dragX-this.x;var dragForce=dragVelocity-this.velocity;this.applyForce(dragForce);};proto.applySelectedAttraction=function(){var len=this.cells.length;if(this.isPointerDown||this.isFreeScrolling||!len){return;}
|
||
var cell=this.cells[this.selectedIndex];var wrap=this.options.wrapAround&&len>1?this.slideableWidth*Math.floor(this.selectedIndex/len):0;var distance=(cell.target+wrap)*-1-this.x;var force=distance*this.options.selectedAttraction;this.applyForce(force);};return proto;}));}.call(window));}),(function(module,exports,__webpack_require__){var define=false;(function(){(function(window,factory){'use strict';if(typeof define=='function'&&define.amd){define(['classie/classie','eventie/eventie','./flickity','unidragger/unidragger','fizzy-ui-utils/utils'],function(classie,eventie,Flickity,Unidragger,utils){return factory(window,classie,eventie,Flickity,Unidragger,utils);});}else if(true){module.exports=factory(window,__webpack_require__(23),__webpack_require__(25),__webpack_require__(22),__webpack_require__(34),__webpack_require__(28));}else{window.Flickity=factory(window,window.classie,window.eventie,window.Flickity,window.Unidragger,window.fizzyUIUtils);}}(window,function factory(window,classie,eventie,Flickity,Unidragger,utils){'use strict';function preventDefaultEvent(event){if(event.preventDefault){event.preventDefault();}else{event.returnValue=false;}}
|
||
utils.extend(Flickity.defaults,{draggable:true});Flickity.createMethods.push('_createDrag');utils.extend(Flickity.prototype,Unidragger.prototype);Flickity.prototype._createDrag=function(){this.on('activate',this.bindDrag);this.on('uiChange',this._uiChangeDrag);this.on('childUIPointerDown',this._childUIPointerDownDrag);this.on('deactivate',this.unbindDrag);};Flickity.prototype.bindDrag=function(){if(!this.options.draggable||this.isDragBound){return;}
|
||
classie.add(this.element,'is-draggable');this.handles=[this.viewport];this.bindHandles();this.isDragBound=true;};Flickity.prototype.unbindDrag=function(){if(!this.isDragBound){return;}
|
||
classie.remove(this.element,'is-draggable');this.unbindHandles();delete this.isDragBound;};Flickity.prototype._uiChangeDrag=function(){delete this.isFreeScrolling;};Flickity.prototype._childUIPointerDownDrag=function(event){preventDefaultEvent(event);this.pointerDownFocus(event);};Flickity.prototype.pointerDown=function(event,pointer){if(event.target.nodeName=='INPUT'&&event.target.type=='range'){this.isPointerDown=false;delete this.pointerIdentifier;return;}
|
||
this._dragPointerDown(event,pointer);var focused=document.activeElement;if(focused&&focused.blur&&focused!=this.element&&focused!=document.body){focused.blur();}
|
||
this.pointerDownFocus(event);this.dragX=this.x;classie.add(this.viewport,'is-pointer-down');this._bindPostStartEvents(event);this.pointerDownScroll=Unidragger.getScrollPosition();eventie.bind(window,'scroll',this);this.dispatchEvent('pointerDown',event,[pointer]);};var touchStartEvents={touchstart:true,MSPointerDown:true};var focusNodes={INPUT:true,SELECT:true};Flickity.prototype.pointerDownFocus=function(event){if(!this.options.accessibility||touchStartEvents[event.type]||focusNodes[event.target.nodeName]){return;}
|
||
var prevScrollY=window.pageYOffset;this.element.focus();if(window.pageYOffset!=prevScrollY){window.scrollTo(window.pageXOffset,prevScrollY);}};Flickity.prototype.hasDragStarted=function(moveVector){return Math.abs(moveVector.x)>3;};Flickity.prototype.pointerUp=function(event,pointer){classie.remove(this.viewport,'is-pointer-down');this.dispatchEvent('pointerUp',event,[pointer]);this._dragPointerUp(event,pointer);};Flickity.prototype.pointerDone=function(){eventie.unbind(window,'scroll',this);delete this.pointerDownScroll;};Flickity.prototype.dragStart=function(event,pointer){this.dragStartPosition=this.x;this.startAnimation();this.dispatchEvent('dragStart',event,[pointer]);};Flickity.prototype.dragMove=function(event,pointer,moveVector){preventDefaultEvent(event);this.previousDragX=this.dragX;var direction=this.options.rightToLeft?-1:1;var dragX=this.dragStartPosition+moveVector.x*direction;if(!this.options.wrapAround&&this.cells.length){var originBound=Math.max(-this.cells[0].target,this.dragStartPosition);dragX=dragX>originBound?(dragX+originBound)*0.5:dragX;var endBound=Math.min(-this.getLastCell().target,this.dragStartPosition);dragX=dragX<endBound?(dragX+endBound)*0.5:dragX;}
|
||
this.dragX=dragX;this.dragMoveTime=new Date();this.dispatchEvent('dragMove',event,[pointer,moveVector]);};Flickity.prototype.dragEnd=function(event,pointer){if(this.options.freeScroll){this.isFreeScrolling=true;}
|
||
var index=this.dragEndRestingSelect();if(this.options.freeScroll&&!this.options.wrapAround){var restingX=this.getRestingPosition();this.isFreeScrolling=-restingX>this.cells[0].target&&-restingX<this.getLastCell().target;}else if(!this.options.freeScroll&&index==this.selectedIndex){index+=this.dragEndBoostSelect();}
|
||
delete this.previousDragX;this.select(index);this.dispatchEvent('dragEnd',event,[pointer]);};Flickity.prototype.dragEndRestingSelect=function(){var restingX=this.getRestingPosition();var distance=Math.abs(this.getCellDistance(-restingX,this.selectedIndex));var positiveResting=this._getClosestResting(restingX,distance,1);var negativeResting=this._getClosestResting(restingX,distance,-1);var index=positiveResting.distance<negativeResting.distance?positiveResting.index:negativeResting.index;return index;};Flickity.prototype._getClosestResting=function(restingX,distance,increment){var index=this.selectedIndex;var minDistance=Infinity;var condition=this.options.contain&&!this.options.wrapAround?function(d,md){return d<=md;}:function(d,md){return d<md;};while(condition(distance,minDistance)){index+=increment;minDistance=distance;distance=this.getCellDistance(-restingX,index);if(distance===null){break;}
|
||
distance=Math.abs(distance);}
|
||
return{distance:minDistance,index:index-increment};};Flickity.prototype.getCellDistance=function(x,index){var len=this.cells.length;var isWrapAround=this.options.wrapAround&&len>1;var cellIndex=isWrapAround?utils.modulo(index,len):index;var cell=this.cells[cellIndex];if(!cell){return null;}
|
||
var wrap=isWrapAround?this.slideableWidth*Math.floor(index/len):0;return x-(cell.target+wrap);};Flickity.prototype.dragEndBoostSelect=function(){if(this.previousDragX===undefined||!this.dragMoveTime||new Date()-this.dragMoveTime>100){return 0;}
|
||
var distance=this.getCellDistance(-this.dragX,this.selectedIndex);var delta=this.previousDragX-this.dragX;if(distance>0&&delta>0){return 1;}else if(distance<0&&delta<0){return-1;}
|
||
return 0;};Flickity.prototype.staticClick=function(event,pointer){var clickedCell=this.getParentCell(event.target);var cellElem=clickedCell&&clickedCell.element;var cellIndex=clickedCell&&utils.indexOf(this.cells,clickedCell);this.dispatchEvent('staticClick',event,[pointer,cellElem,cellIndex]);};return Flickity;}));}.call(window));}),(function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;
|
||
/*!
|
||
* Unidragger v1.1.5
|
||
* Draggable base class
|
||
* MIT license
|
||
*/
|
||
(function(window,factory){'use strict';if(true){!(__WEBPACK_AMD_DEFINE_ARRAY__=[__webpack_require__(25),__webpack_require__(35)],__WEBPACK_AMD_DEFINE_RESULT__=function(eventie,Unipointer){return factory(window,eventie,Unipointer);}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),__WEBPACK_AMD_DEFINE_RESULT__!==undefined&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__));}else if(typeof exports=='object'){module.exports=factory(window,require('eventie'),require('unipointer'));}else{window.Unidragger=factory(window,window.eventie,window.Unipointer);}}(window,function factory(window,eventie,Unipointer){'use strict';function noop(){}
|
||
function preventDefaultEvent(event){if(event.preventDefault){event.preventDefault();}else{event.returnValue=false;}}
|
||
function Unidragger(){}
|
||
Unidragger.prototype=new Unipointer();Unidragger.prototype.bindHandles=function(){this._bindHandles(true);};Unidragger.prototype.unbindHandles=function(){this._bindHandles(false);};var navigator=window.navigator;Unidragger.prototype._bindHandles=function(isBind){isBind=isBind===undefined?true:!!isBind;var binderExtra;if(navigator.pointerEnabled){binderExtra=function(handle){handle.style.touchAction=isBind?'none':'';};}else if(navigator.msPointerEnabled){binderExtra=function(handle){handle.style.msTouchAction=isBind?'none':'';};}else{binderExtra=function(){if(isBind){disableImgOndragstart(handle);}};}
|
||
var bindMethod=isBind?'bind':'unbind';for(var i=0,len=this.handles.length;i<len;i++){var handle=this.handles[i];this._bindStartEvent(handle,isBind);binderExtra(handle);eventie[bindMethod](handle,'click',this);}};function noDragStart(){return false;}
|
||
var isIE8='attachEvent'in document.documentElement;var disableImgOndragstart=!isIE8?noop:function(handle){if(handle.nodeName=='IMG'){handle.ondragstart=noDragStart;}
|
||
var images=handle.querySelectorAll('img');for(var i=0,len=images.length;i<len;i++){var img=images[i];img.ondragstart=noDragStart;}};Unidragger.prototype.pointerDown=function(event,pointer){if(event.target.nodeName=='INPUT'&&event.target.type=='range'){this.isPointerDown=false;delete this.pointerIdentifier;return;}
|
||
this._dragPointerDown(event,pointer);var focused=document.activeElement;if(focused&&focused.blur){focused.blur();}
|
||
this._bindPostStartEvents(event);this.pointerDownScroll=Unidragger.getScrollPosition();eventie.bind(window,'scroll',this);this.emitEvent('pointerDown',[event,pointer]);};Unidragger.prototype._dragPointerDown=function(event,pointer){this.pointerDownPoint=Unipointer.getPointerPoint(pointer);var isTouchstart=event.type=='touchstart';var targetNodeName=event.target.nodeName;if(!isTouchstart&&targetNodeName!='SELECT'){preventDefaultEvent(event);}};Unidragger.prototype.pointerMove=function(event,pointer){var moveVector=this._dragPointerMove(event,pointer);this.emitEvent('pointerMove',[event,pointer,moveVector]);this._dragMove(event,pointer,moveVector);};Unidragger.prototype._dragPointerMove=function(event,pointer){var movePoint=Unipointer.getPointerPoint(pointer);var moveVector={x:movePoint.x-this.pointerDownPoint.x,y:movePoint.y-this.pointerDownPoint.y};if(!this.isDragging&&this.hasDragStarted(moveVector)){this._dragStart(event,pointer);}
|
||
return moveVector;};Unidragger.prototype.hasDragStarted=function(moveVector){return Math.abs(moveVector.x)>3||Math.abs(moveVector.y)>3;};Unidragger.prototype.pointerUp=function(event,pointer){this.emitEvent('pointerUp',[event,pointer]);this._dragPointerUp(event,pointer);};Unidragger.prototype._dragPointerUp=function(event,pointer){if(this.isDragging){this._dragEnd(event,pointer);}else{this._staticClick(event,pointer);}};Unipointer.prototype.pointerDone=function(){eventie.unbind(window,'scroll',this);};Unidragger.prototype._dragStart=function(event,pointer){this.isDragging=true;this.dragStartPoint=Unidragger.getPointerPoint(pointer);this.isPreventingClicks=true;this.dragStart(event,pointer);};Unidragger.prototype.dragStart=function(event,pointer){this.emitEvent('dragStart',[event,pointer]);};Unidragger.prototype._dragMove=function(event,pointer,moveVector){if(!this.isDragging){return;}
|
||
this.dragMove(event,pointer,moveVector);};Unidragger.prototype.dragMove=function(event,pointer,moveVector){preventDefaultEvent(event);this.emitEvent('dragMove',[event,pointer,moveVector]);};Unidragger.prototype._dragEnd=function(event,pointer){this.isDragging=false;var _this=this;setTimeout(function(){delete _this.isPreventingClicks;});this.dragEnd(event,pointer);};Unidragger.prototype.dragEnd=function(event,pointer){this.emitEvent('dragEnd',[event,pointer]);};Unidragger.prototype.pointerDone=function(){eventie.unbind(window,'scroll',this);delete this.pointerDownScroll;};Unidragger.prototype.onclick=function(event){if(this.isPreventingClicks){preventDefaultEvent(event);}};Unidragger.prototype._staticClick=function(event,pointer){if(this.isIgnoringMouseUp&&event.type=='mouseup'){return;}
|
||
var nodeName=event.target.nodeName;if(nodeName=='INPUT'||nodeName=='TEXTAREA'){event.target.focus();}
|
||
this.staticClick(event,pointer);if(event.type!='mouseup'){this.isIgnoringMouseUp=true;var _this=this;setTimeout(function(){delete _this.isIgnoringMouseUp;},400);}};Unidragger.prototype.staticClick=function(event,pointer){this.emitEvent('staticClick',[event,pointer]);};Unidragger.prototype.onscroll=function(){var scroll=Unidragger.getScrollPosition();var scrollMoveX=this.pointerDownScroll.x-scroll.x;var scrollMoveY=this.pointerDownScroll.y-scroll.y;if(Math.abs(scrollMoveX)>3||Math.abs(scrollMoveY)>3){this._pointerDone();}};Unidragger.getPointerPoint=function(pointer){return{x:pointer.pageX!==undefined?pointer.pageX:pointer.clientX,y:pointer.pageY!==undefined?pointer.pageY:pointer.clientY};};var isPageOffset=window.pageYOffset!==undefined;Unidragger.getScrollPosition=function(){return{x:isPageOffset?window.pageXOffset:document.body.scrollLeft,y:isPageOffset?window.pageYOffset:document.body.scrollTop};};Unidragger.getPointerPoint=Unipointer.getPointerPoint;return Unidragger;}));}),(function(module,exports,__webpack_require__){var define=false;(function(){
|
||
/*!
|
||
* Unipointer v1.1.0
|
||
* base class for doing one thing with pointer event
|
||
* MIT license
|
||
*/
|
||
(function(window,factory){'use strict';if(typeof define=='function'&&define.amd){define(['eventEmitter/EventEmitter','eventie/eventie'],function(EventEmitter,eventie){return factory(window,EventEmitter,eventie);});}else if(true){module.exports=factory(window,__webpack_require__(24),__webpack_require__(25));}else{window.Unipointer=factory(window,window.EventEmitter,window.eventie);}}(window,function factory(window,EventEmitter,eventie){'use strict';function noop(){}
|
||
function Unipointer(){}
|
||
Unipointer.prototype=new EventEmitter();Unipointer.prototype.bindStartEvent=function(elem){this._bindStartEvent(elem,true);};Unipointer.prototype.unbindStartEvent=function(elem){this._bindStartEvent(elem,false);};Unipointer.prototype._bindStartEvent=function(elem,isBind){isBind=isBind===undefined?true:!!isBind;var bindMethod=isBind?'bind':'unbind';if(window.navigator.pointerEnabled){eventie[bindMethod](elem,'pointerdown',this);}else if(window.navigator.msPointerEnabled){eventie[bindMethod](elem,'MSPointerDown',this);}else{eventie[bindMethod](elem,'mousedown',this);eventie[bindMethod](elem,'touchstart',this);}};Unipointer.prototype.handleEvent=function(event){var method='on'+event.type;if(this[method]){this[method](event);}};Unipointer.prototype.getTouch=function(touches){for(var i=0,len=touches.length;i<len;i++){var touch=touches[i];if(touch.identifier==this.pointerIdentifier){return touch;}}};Unipointer.prototype.onmousedown=function(event){var button=event.button;if(button&&(button!==0&&button!==1)){return;}
|
||
this._pointerDown(event,event);};Unipointer.prototype.ontouchstart=function(event){this._pointerDown(event,event.changedTouches[0]);};Unipointer.prototype.onMSPointerDown=Unipointer.prototype.onpointerdown=function(event){this._pointerDown(event,event);};Unipointer.prototype._pointerDown=function(event,pointer){if(this.isPointerDown){return;}
|
||
this.isPointerDown=true;this.pointerIdentifier=pointer.pointerId!==undefined?pointer.pointerId:pointer.identifier;this.pointerDown(event,pointer);};Unipointer.prototype.pointerDown=function(event,pointer){this._bindPostStartEvents(event);this.emitEvent('pointerDown',[event,pointer]);};var postStartEvents={mousedown:['mousemove','mouseup'],touchstart:['touchmove','touchend','touchcancel'],pointerdown:['pointermove','pointerup','pointercancel'],MSPointerDown:['MSPointerMove','MSPointerUp','MSPointerCancel']};Unipointer.prototype._bindPostStartEvents=function(event){if(!event){return;}
|
||
var events=postStartEvents[event.type];var node=event.preventDefault?window:document;for(var i=0,len=events.length;i<len;i++){var evnt=events[i];eventie.bind(node,evnt,this);}
|
||
this._boundPointerEvents={events:events,node:node};};Unipointer.prototype._unbindPostStartEvents=function(){var args=this._boundPointerEvents;if(!args||!args.events){return;}
|
||
for(var i=0,len=args.events.length;i<len;i++){var event=args.events[i];eventie.unbind(args.node,event,this);}
|
||
delete this._boundPointerEvents;};Unipointer.prototype.onmousemove=function(event){this._pointerMove(event,event);};Unipointer.prototype.onMSPointerMove=Unipointer.prototype.onpointermove=function(event){if(event.pointerId==this.pointerIdentifier){this._pointerMove(event,event);}};Unipointer.prototype.ontouchmove=function(event){var touch=this.getTouch(event.changedTouches);if(touch){this._pointerMove(event,touch);}};Unipointer.prototype._pointerMove=function(event,pointer){this.pointerMove(event,pointer);};Unipointer.prototype.pointerMove=function(event,pointer){this.emitEvent('pointerMove',[event,pointer]);};Unipointer.prototype.onmouseup=function(event){this._pointerUp(event,event);};Unipointer.prototype.onMSPointerUp=Unipointer.prototype.onpointerup=function(event){if(event.pointerId==this.pointerIdentifier){this._pointerUp(event,event);}};Unipointer.prototype.ontouchend=function(event){var touch=this.getTouch(event.changedTouches);if(touch){this._pointerUp(event,touch);}};Unipointer.prototype._pointerUp=function(event,pointer){this._pointerDone();this.pointerUp(event,pointer);};Unipointer.prototype.pointerUp=function(event,pointer){this.emitEvent('pointerUp',[event,pointer]);};Unipointer.prototype._pointerDone=function(){this.isPointerDown=false;delete this.pointerIdentifier;this._unbindPostStartEvents();this.pointerDone();};Unipointer.prototype.pointerDone=noop;Unipointer.prototype.onMSPointerCancel=Unipointer.prototype.onpointercancel=function(event){if(event.pointerId==this.pointerIdentifier){this._pointerCancel(event,event);}};Unipointer.prototype.ontouchcancel=function(event){var touch=this.getTouch(event.changedTouches);if(touch){this._pointerCancel(event,touch);}};Unipointer.prototype._pointerCancel=function(event,pointer){this._pointerDone();this.pointerCancel(event,pointer);};Unipointer.prototype.pointerCancel=function(event,pointer){this.emitEvent('pointerCancel',[event,pointer]);};Unipointer.getPointerPoint=function(pointer){return{x:pointer.pageX!==undefined?pointer.pageX:pointer.clientX,y:pointer.pageY!==undefined?pointer.pageY:pointer.clientY};};return Unipointer;}));}.call(window));}),(function(module,exports,__webpack_require__){var define=false;(function(){(function(window,factory){'use strict';if(typeof define=='function'&&define.amd){define(['eventie/eventie','./flickity','tap-listener/tap-listener','fizzy-ui-utils/utils'],function(eventie,Flickity,TapListener,utils){return factory(window,eventie,Flickity,TapListener,utils);});}else if(true){module.exports=factory(window,__webpack_require__(25),__webpack_require__(22),__webpack_require__(37),__webpack_require__(28));}else{factory(window,window.eventie,window.Flickity,window.TapListener,window.fizzyUIUtils);}}(window,function factory(window,eventie,Flickity,TapListener,utils){'use strict';var svgURI='http://www.w3.org/2000/svg';var supportsInlineSVG=(function(){var supports;function checkSupport(){if(supports!==undefined){return supports;}
|
||
var div=document.createElement('div');div.innerHTML='<svg/>';supports=(div.firstChild&&div.firstChild.namespaceURI)==svgURI;return supports;}
|
||
return checkSupport;})();function PrevNextButton(direction,parent){this.direction=direction;this.parent=parent;this._create();}
|
||
PrevNextButton.prototype=new TapListener();PrevNextButton.prototype._create=function(){this.isEnabled=true;this.isPrevious=this.direction==-1;var leftDirection=this.parent.options.rightToLeft?1:-1;this.isLeft=this.direction==leftDirection;var element=this.element=document.createElement('button');element.className='flickity-prev-next-button';element.className+=this.isPrevious?' previous':' next';element.setAttribute('type','button');this.disable();element.setAttribute('aria-label',this.isPrevious?'previous':'next');Flickity.setUnselectable(element);if(supportsInlineSVG()){var svg=this.createSVG();element.appendChild(svg);}else{this.setArrowText();element.className+=' no-svg';}
|
||
var _this=this;this.onCellSelect=function(){_this.update();};this.parent.on('cellSelect',this.onCellSelect);this.on('tap',this.onTap);this.on('pointerDown',function onPointerDown(button,event){_this.parent.childUIPointerDown(event);});};PrevNextButton.prototype.activate=function(){this.bindTap(this.element);eventie.bind(this.element,'click',this);this.parent.element.appendChild(this.element);};PrevNextButton.prototype.deactivate=function(){this.parent.element.removeChild(this.element);TapListener.prototype.destroy.call(this);eventie.unbind(this.element,'click',this);};PrevNextButton.prototype.createSVG=function(){var svg=document.createElementNS(svgURI,'svg');svg.setAttribute('viewBox','0 0 100 100');var path=document.createElementNS(svgURI,'path');var pathMovements=getArrowMovements(this.parent.options.arrowShape);path.setAttribute('d',pathMovements);path.setAttribute('class','arrow');if(!this.isLeft){path.setAttribute('transform','translate(100, 100) rotate(180) ');}
|
||
svg.appendChild(path);return svg;};function getArrowMovements(shape){if(typeof shape=='string'){return shape;}
|
||
return'M '+shape.x0+',50'+' L '+shape.x1+','+(shape.y1+50)+' L '+shape.x2+','+(shape.y2+50)+' L '+shape.x3+',50 '+' L '+shape.x2+','+(50-shape.y2)+' L '+shape.x1+','+(50-shape.y1)+' Z';}
|
||
PrevNextButton.prototype.setArrowText=function(){var parentOptions=this.parent.options;var arrowText=this.isLeft?parentOptions.leftArrowText:parentOptions.rightArrowText;utils.setText(this.element,arrowText);};PrevNextButton.prototype.onTap=function(){if(!this.isEnabled){return;}
|
||
this.parent.uiChange();var method=this.isPrevious?'previous':'next';this.parent[method]();};PrevNextButton.prototype.handleEvent=utils.handleEvent;PrevNextButton.prototype.onclick=function(){var focused=document.activeElement;if(focused&&focused==this.element){this.onTap();}};PrevNextButton.prototype.enable=function(){if(this.isEnabled){return;}
|
||
this.element.disabled=false;this.isEnabled=true;};PrevNextButton.prototype.disable=function(){if(!this.isEnabled){return;}
|
||
this.element.disabled=true;this.isEnabled=false;};PrevNextButton.prototype.update=function(){var cells=this.parent.cells;if(this.parent.options.wrapAround&&cells.length>1){this.enable();return;}
|
||
var lastIndex=cells.length?cells.length-1:0;var boundIndex=this.isPrevious?0:lastIndex;var method=this.parent.selectedIndex==boundIndex?'disable':'enable';this[method]();};PrevNextButton.prototype.destroy=function(){this.deactivate();};utils.extend(Flickity.defaults,{prevNextButtons:true,leftArrowText:'‹',rightArrowText:'›',arrowShape:{x0:10,x1:60,y1:50,x2:70,y2:40,x3:30}});Flickity.createMethods.push('_createPrevNextButtons');Flickity.prototype._createPrevNextButtons=function(){if(!this.options.prevNextButtons){return;}
|
||
this.prevButton=new PrevNextButton(-1,this);this.nextButton=new PrevNextButton(1,this);this.on('activate',this.activatePrevNextButtons);};Flickity.prototype.activatePrevNextButtons=function(){this.prevButton.activate();this.nextButton.activate();this.on('deactivate',this.deactivatePrevNextButtons);};Flickity.prototype.deactivatePrevNextButtons=function(){this.prevButton.deactivate();this.nextButton.deactivate();this.off('deactivate',this.deactivatePrevNextButtons);};Flickity.PrevNextButton=PrevNextButton;return Flickity;}));}.call(window));}),(function(module,exports,__webpack_require__){var define=false;(function(){
|
||
/*!
|
||
* Tap listener v1.1.2
|
||
* listens to taps
|
||
* MIT license
|
||
*/
|
||
(function(window,factory){if(typeof define=='function'&&define.amd){define(['unipointer/unipointer'],function(Unipointer){return factory(window,Unipointer);});}else if(true){module.exports=factory(window,__webpack_require__(35));}else{window.TapListener=factory(window,window.Unipointer);}}(window,function factory(window,Unipointer){'use strict';function TapListener(elem){this.bindTap(elem);}
|
||
TapListener.prototype=new Unipointer();TapListener.prototype.bindTap=function(elem){if(!elem){return;}
|
||
this.unbindTap();this.tapElement=elem;this._bindStartEvent(elem,true);};TapListener.prototype.unbindTap=function(){if(!this.tapElement){return;}
|
||
this._bindStartEvent(this.tapElement,true);delete this.tapElement;};var isPageOffset=window.pageYOffset!==undefined;TapListener.prototype.pointerUp=function(event,pointer){if(this.isIgnoringMouseUp&&event.type=='mouseup'){return;}
|
||
var pointerPoint=Unipointer.getPointerPoint(pointer);var boundingRect=this.tapElement.getBoundingClientRect();var scrollX=isPageOffset?window.pageXOffset:document.body.scrollLeft;var scrollY=isPageOffset?window.pageYOffset:document.body.scrollTop;var isInside=pointerPoint.x>=boundingRect.left+scrollX&&pointerPoint.x<=boundingRect.right+scrollX&&pointerPoint.y>=boundingRect.top+scrollY&&pointerPoint.y<=boundingRect.bottom+scrollY;if(isInside){this.emitEvent('tap',[event,pointer]);}
|
||
if(event.type!='mouseup'){this.isIgnoringMouseUp=true;setTimeout(function(){delete this.isIgnoringMouseUp;}.bind(this),320);}};TapListener.prototype.destroy=function(){this.pointerDone();this.unbindTap();};return TapListener;}));}.call(window));}),(function(module,exports,__webpack_require__){var define=false;(function(){(function(window,factory){'use strict';if(typeof define=='function'&&define.amd){define(['eventie/eventie','./flickity','tap-listener/tap-listener','fizzy-ui-utils/utils'],function(eventie,Flickity,TapListener,utils){return factory(window,eventie,Flickity,TapListener,utils);});}else if(true){module.exports=factory(window,__webpack_require__(25),__webpack_require__(22),__webpack_require__(37),__webpack_require__(28));}else{factory(window,window.eventie,window.Flickity,window.TapListener,window.fizzyUIUtils);}}(window,function factory(window,eventie,Flickity,TapListener,utils){'use strict';function PageDots(parent){this.parent=parent;this._create();}
|
||
PageDots.prototype=new TapListener();PageDots.prototype._create=function(){this.holder=document.createElement('ol');this.holder.className='flickity-page-dots';Flickity.setUnselectable(this.holder);this.dots=[];var _this=this;this.onCellSelect=function(){_this.updateSelected();};this.parent.on('cellSelect',this.onCellSelect);this.on('tap',this.onTap);this.on('pointerDown',function onPointerDown(button,event){_this.parent.childUIPointerDown(event);});};PageDots.prototype.activate=function(){this.setDots();this.bindTap(this.holder);this.parent.element.appendChild(this.holder);};PageDots.prototype.deactivate=function(){this.parent.element.removeChild(this.holder);TapListener.prototype.destroy.call(this);};PageDots.prototype.setDots=function(){var delta=this.parent.cells.length-this.dots.length;if(delta>0){this.addDots(delta);}else if(delta<0){this.removeDots(-delta);}};PageDots.prototype.addDots=function(count){var fragment=document.createDocumentFragment();var newDots=[];while(count){var dot=document.createElement('li');dot.className='dot';fragment.appendChild(dot);newDots.push(dot);count--;}
|
||
this.holder.appendChild(fragment);this.dots=this.dots.concat(newDots);};PageDots.prototype.removeDots=function(count){var removeDots=this.dots.splice(this.dots.length-count,count);for(var i=0,len=removeDots.length;i<len;i++){var dot=removeDots[i];this.holder.removeChild(dot);}};PageDots.prototype.updateSelected=function(){if(this.selectedDot){this.selectedDot.className='dot';}
|
||
if(!this.dots.length){return;}
|
||
this.selectedDot=this.dots[this.parent.selectedIndex];this.selectedDot.className='dot is-selected';};PageDots.prototype.onTap=function(event){var target=event.target;if(target.nodeName!='LI'){return;}
|
||
this.parent.uiChange();var index=utils.indexOf(this.dots,target);this.parent.select(index);};PageDots.prototype.destroy=function(){this.deactivate();};Flickity.PageDots=PageDots;utils.extend(Flickity.defaults,{pageDots:true});Flickity.createMethods.push('_createPageDots');Flickity.prototype._createPageDots=function(){if(!this.options.pageDots){return;}
|
||
this.pageDots=new PageDots(this);this.on('activate',this.activatePageDots);this.on('cellAddedRemoved',this.onCellAddedRemovedPageDots);this.on('deactivate',this.deactivatePageDots);};Flickity.prototype.activatePageDots=function(){this.pageDots.activate();};Flickity.prototype.onCellAddedRemovedPageDots=function(){this.pageDots.setDots();};Flickity.prototype.deactivatePageDots=function(){this.pageDots.deactivate();};Flickity.PageDots=PageDots;return Flickity;}));}.call(window));}),(function(module,exports,__webpack_require__){var define=false;(function(){(function(window,factory){'use strict';if(typeof define=='function'&&define.amd){define(['eventEmitter/EventEmitter','eventie/eventie','fizzy-ui-utils/utils','./flickity'],function(EventEmitter,eventie,utils,Flickity){return factory(EventEmitter,eventie,utils,Flickity);});}else if(true){module.exports=factory(__webpack_require__(24),__webpack_require__(25),__webpack_require__(28),__webpack_require__(22));}else{factory(window.EventEmitter,window.eventie,window.fizzyUIUtils,window.Flickity);}}(window,function factory(EventEmitter,eventie,utils,Flickity){'use strict';var hiddenProperty,visibilityEvent;if('hidden'in document){hiddenProperty='hidden';visibilityEvent='visibilitychange';}else if('webkitHidden'in document){hiddenProperty='webkitHidden';visibilityEvent='webkitvisibilitychange';}
|
||
function Player(parent){this.parent=parent;this.state='stopped';if(visibilityEvent){var _this=this;this.onVisibilityChange=function(){_this.visibilityChange();};}}
|
||
Player.prototype=new EventEmitter();Player.prototype.play=function(){if(this.state=='playing'){return;}
|
||
this.state='playing';if(visibilityEvent){document.addEventListener(visibilityEvent,this.onVisibilityChange,false);}
|
||
this.tick();};Player.prototype.tick=function(){if(this.state!='playing'){return;}
|
||
var time=this.parent.options.autoPlay;time=typeof time=='number'?time:3000;var _this=this;this.clear();this.timeout=setTimeout(function(){_this.parent.next(true);_this.tick();},time);};Player.prototype.stop=function(){this.state='stopped';this.clear();if(visibilityEvent){document.removeEventListener(visibilityEvent,this.onVisibilityChange,false);}};Player.prototype.clear=function(){clearTimeout(this.timeout);};Player.prototype.pause=function(){if(this.state=='playing'){this.state='paused';this.clear();}};Player.prototype.unpause=function(){if(this.state=='paused'){this.play();}};Player.prototype.visibilityChange=function(){var isHidden=document[hiddenProperty];this[isHidden?'pause':'unpause']();};utils.extend(Flickity.defaults,{pauseAutoPlayOnHover:true});Flickity.createMethods.push('_createPlayer');Flickity.prototype._createPlayer=function(){this.player=new Player(this);this.on('activate',this.activatePlayer);this.on('uiChange',this.stopPlayer);this.on('pointerDown',this.stopPlayer);this.on('deactivate',this.deactivatePlayer);};Flickity.prototype.activatePlayer=function(){if(!this.options.autoPlay){return;}
|
||
this.player.play();eventie.bind(this.element,'mouseenter',this);this.isMouseenterBound=true;};Flickity.prototype.playPlayer=function(){this.player.play();};Flickity.prototype.stopPlayer=function(){this.player.stop();};Flickity.prototype.pausePlayer=function(){this.player.pause();};Flickity.prototype.unpausePlayer=function(){this.player.unpause();};Flickity.prototype.deactivatePlayer=function(){this.player.stop();if(this.isMouseenterBound){eventie.unbind(this.element,'mouseenter',this);delete this.isMouseenterBound;}};Flickity.prototype.onmouseenter=function(){if(!this.options.pauseAutoPlayOnHover){return;}
|
||
this.player.pause();eventie.bind(this.element,'mouseleave',this);};Flickity.prototype.onmouseleave=function(){this.player.unpause();eventie.unbind(this.element,'mouseleave',this);};Flickity.Player=Player;return Flickity;}));}.call(window));}),(function(module,exports,__webpack_require__){var define=false;(function(){(function(window,factory){'use strict';if(typeof define=='function'&&define.amd){define(['./flickity','fizzy-ui-utils/utils'],function(Flickity,utils){return factory(window,Flickity,utils);});}else if(true){module.exports=factory(window,__webpack_require__(22),__webpack_require__(28));}else{factory(window,window.Flickity,window.fizzyUIUtils);}}(window,function factory(window,Flickity,utils){'use strict';function getCellsFragment(cells){var fragment=document.createDocumentFragment();for(var i=0,len=cells.length;i<len;i++){var cell=cells[i];fragment.appendChild(cell.element);}
|
||
return fragment;}
|
||
Flickity.prototype.insert=function(elems,index){var cells=this._makeCells(elems);if(!cells||!cells.length){return;}
|
||
var len=this.cells.length;index=index===undefined?len:index;var fragment=getCellsFragment(cells);var isAppend=index==len;if(isAppend){this.slider.appendChild(fragment);}else{var insertCellElement=this.cells[index].element;this.slider.insertBefore(fragment,insertCellElement);}
|
||
if(index===0){this.cells=cells.concat(this.cells);}else if(isAppend){this.cells=this.cells.concat(cells);}else{var endCells=this.cells.splice(index,len-index);this.cells=this.cells.concat(cells).concat(endCells);}
|
||
this._sizeCells(cells);var selectedIndexDelta=index>this.selectedIndex?0:cells.length;this._cellAddedRemoved(index,selectedIndexDelta);};Flickity.prototype.append=function(elems){this.insert(elems,this.cells.length);};Flickity.prototype.prepend=function(elems){this.insert(elems,0);};Flickity.prototype.remove=function(elems){var cells=this.getCells(elems);var selectedIndexDelta=0;var i,len,cell;for(i=0,len=cells.length;i<len;i++){cell=cells[i];var wasBefore=utils.indexOf(this.cells,cell)<this.selectedIndex;selectedIndexDelta-=wasBefore?1:0;}
|
||
for(i=0,len=cells.length;i<len;i++){cell=cells[i];cell.remove();utils.removeFrom(this.cells,cell);}
|
||
if(cells.length){this._cellAddedRemoved(0,selectedIndexDelta);}};Flickity.prototype._cellAddedRemoved=function(changedCellIndex,selectedIndexDelta){selectedIndexDelta=selectedIndexDelta||0;this.selectedIndex+=selectedIndexDelta;this.selectedIndex=Math.max(0,Math.min(this.cells.length-1,this.selectedIndex));this.emitEvent('cellAddedRemoved',[changedCellIndex,selectedIndexDelta]);this.cellChange(changedCellIndex,true);};Flickity.prototype.cellSizeChange=function(elem){var cell=this.getCell(elem);if(!cell){return;}
|
||
cell.getSize();var index=utils.indexOf(this.cells,cell);this.cellChange(index);};Flickity.prototype.cellChange=function(changedCellIndex,isPositioningSlider){var prevSlideableWidth=this.slideableWidth;this._positionCells(changedCellIndex);this._getWrapShiftCells();this.setGallerySize();if(this.options.freeScroll){var deltaX=prevSlideableWidth-this.slideableWidth;this.x+=deltaX*this.cellAlign;this.positionSlider();}else{if(isPositioningSlider){this.positionSliderAtSelected();}
|
||
this.select(this.selectedIndex);}};return Flickity;}));}.call(window));}),(function(module,exports,__webpack_require__){var define=false;(function(){(function(window,factory){'use strict';if(typeof define=='function'&&define.amd){define(['classie/classie','eventie/eventie','./flickity','fizzy-ui-utils/utils'],function(classie,eventie,Flickity,utils){return factory(window,classie,eventie,Flickity,utils);});}else if(true){module.exports=factory(window,__webpack_require__(23),__webpack_require__(25),__webpack_require__(22),__webpack_require__(28));}else{factory(window,window.classie,window.eventie,window.Flickity,window.fizzyUIUtils);}}(window,function factory(window,classie,eventie,Flickity,utils){'use strict';Flickity.createMethods.push('_createLazyload');Flickity.prototype._createLazyload=function(){this.on('cellSelect',this.lazyLoad);};Flickity.prototype.lazyLoad=function(){var lazyLoad=this.options.lazyLoad;if(!lazyLoad){return;}
|
||
var adjCount=typeof lazyLoad=='number'?lazyLoad:0;var cellElems=this.getAdjacentCellElements(adjCount);var lazyImages=[];for(var i=0,len=cellElems.length;i<len;i++){var cellElem=cellElems[i];var lazyCellImages=getCellLazyImages(cellElem);lazyImages=lazyImages.concat(lazyCellImages);}
|
||
for(i=0,len=lazyImages.length;i<len;i++){var img=lazyImages[i];new LazyLoader(img,this);}};function getCellLazyImages(cellElem){if(cellElem.nodeName=='IMG'&&cellElem.getAttribute('data-flickity-lazyload')){return[cellElem];}
|
||
var imgs=cellElem.querySelectorAll('img[data-flickity-lazyload]');return utils.makeArray(imgs);}
|
||
function LazyLoader(img,flickity){this.img=img;this.flickity=flickity;this.load();}
|
||
LazyLoader.prototype.handleEvent=utils.handleEvent;LazyLoader.prototype.load=function(){eventie.bind(this.img,'load',this);eventie.bind(this.img,'error',this);this.img.src=this.img.getAttribute('data-flickity-lazyload');this.img.removeAttribute('data-flickity-lazyload');};LazyLoader.prototype.onload=function(event){this.complete(event,'flickity-lazyloaded');};LazyLoader.prototype.onerror=function(event){this.complete(event,'flickity-lazyerror');};LazyLoader.prototype.complete=function(event,className){eventie.unbind(this.img,'load',this);eventie.unbind(this.img,'error',this);var cell=this.flickity.getParentCell(this.img);var cellElem=cell&&cell.element;this.flickity.cellSizeChange(cellElem);classie.add(this.img,className);this.flickity.dispatchEvent('lazyLoad',event,cellElem);};Flickity.LazyLoader=LazyLoader;return Flickity;}));}.call(window));}),(function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_FACTORY__,__WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;;(function(factory){'use strict';if(true){!(__WEBPACK_AMD_DEFINE_ARRAY__=[__webpack_require__(1)],__WEBPACK_AMD_DEFINE_FACTORY__=(factory),__WEBPACK_AMD_DEFINE_RESULT__=(typeof __WEBPACK_AMD_DEFINE_FACTORY__==='function'?(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__)):__WEBPACK_AMD_DEFINE_FACTORY__),__WEBPACK_AMD_DEFINE_RESULT__!==undefined&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__));}else if(typeof module!=='undefined'&&module.exports){module.exports=factory(require('jquery'));}else{factory(jQuery);}})(function($){var _previousResizeWidth=-1,_updateTimeout=-1;var _parse=function(value){return parseFloat(value)||0;};var _rows=function(elements){var tolerance=1,$elements=$(elements),lastTop=null,rows=[];$elements.each(function(){var $that=$(this),top=$that.offset().top-_parse($that.css('margin-top')),lastRow=rows.length>0?rows[rows.length-1]:null;if(lastRow===null){rows.push($that);}else{if(Math.floor(Math.abs(lastTop-top))<=tolerance){rows[rows.length-1]=lastRow.add($that);}else{rows.push($that);}}
|
||
lastTop=top;});return rows;};var _parseOptions=function(options){var opts={byRow:true,property:'height',target:null,remove:false};if(typeof options==='object'){return $.extend(opts,options);}
|
||
if(typeof options==='boolean'){opts.byRow=options;}else if(options==='remove'){opts.remove=true;}
|
||
return opts;};var matchHeight=$.fn.matchHeight=function(options){var opts=_parseOptions(options);if(opts.remove){var that=this;this.css(opts.property,'');$.each(matchHeight._groups,function(key,group){group.elements=group.elements.not(that);});return this;}
|
||
if(this.length<=1&&!opts.target){return this;}
|
||
matchHeight._groups.push({elements:this,options:opts});matchHeight._apply(this,opts);return this;};matchHeight.version='0.7.2';matchHeight._groups=[];matchHeight._throttle=80;matchHeight._maintainScroll=false;matchHeight._beforeUpdate=null;matchHeight._afterUpdate=null;matchHeight._rows=_rows;matchHeight._parse=_parse;matchHeight._parseOptions=_parseOptions;matchHeight._apply=function(elements,options){var opts=_parseOptions(options),$elements=$(elements),rows=[$elements];var scrollTop=$(window).scrollTop(),htmlHeight=$('html').outerHeight(true);var $hiddenParents=$elements.parents().filter(':hidden');$hiddenParents.each(function(){var $that=$(this);$that.data('style-cache',$that.attr('style'));});$hiddenParents.css('display','block');if(opts.byRow&&!opts.target){$elements.each(function(){var $that=$(this),display=$that.css('display');if(display!=='inline-block'&&display!=='flex'&&display!=='inline-flex'){display='block';}
|
||
$that.data('style-cache',$that.attr('style'));$that.css({'display':display,'padding-top':'0','padding-bottom':'0','margin-top':'0','margin-bottom':'0','border-top-width':'0','border-bottom-width':'0','height':'100px','overflow':'hidden'});});rows=_rows($elements);$elements.each(function(){var $that=$(this);$that.attr('style',$that.data('style-cache')||'');});}
|
||
$.each(rows,function(key,row){var $row=$(row),targetHeight=0;if(!opts.target){if(opts.byRow&&$row.length<=1){$row.css(opts.property,'');return;}
|
||
$row.each(function(){var $that=$(this),style=$that.attr('style'),display=$that.css('display');if(display!=='inline-block'&&display!=='flex'&&display!=='inline-flex'){display='block';}
|
||
var css={'display':display};css[opts.property]='';$that.css(css);if($that.outerHeight(false)>targetHeight){targetHeight=$that.outerHeight(false);}
|
||
if(style){$that.attr('style',style);}else{$that.css('display','');}});}else{targetHeight=opts.target.outerHeight(false);}
|
||
$row.each(function(){var $that=$(this),verticalPadding=0;if(opts.target&&$that.is(opts.target)){return;}
|
||
if($that.css('box-sizing')!=='border-box'){verticalPadding+=_parse($that.css('border-top-width'))+_parse($that.css('border-bottom-width'));verticalPadding+=_parse($that.css('padding-top'))+_parse($that.css('padding-bottom'));}
|
||
$that.css(opts.property,(targetHeight-verticalPadding)+'px');});});$hiddenParents.each(function(){var $that=$(this);$that.attr('style',$that.data('style-cache')||null);});if(matchHeight._maintainScroll){$(window).scrollTop((scrollTop/htmlHeight)*$('html').outerHeight(true));}
|
||
return this;};matchHeight._applyDataApi=function(){var groups={};$('[data-match-height], [data-mh]').each(function(){var $this=$(this),groupId=$this.attr('data-mh')||$this.attr('data-match-height');if(groupId in groups){groups[groupId]=groups[groupId].add($this);}else{groups[groupId]=$this;}});$.each(groups,function(){this.matchHeight(true);});};var _update=function(event){if(matchHeight._beforeUpdate){matchHeight._beforeUpdate(event,matchHeight._groups);}
|
||
$.each(matchHeight._groups,function(){matchHeight._apply(this.elements,this.options);});if(matchHeight._afterUpdate){matchHeight._afterUpdate(event,matchHeight._groups);}};matchHeight._update=function(throttle,event){if(event&&event.type==='resize'){var windowWidth=$(window).width();if(windowWidth===_previousResizeWidth){return;}
|
||
_previousResizeWidth=windowWidth;}
|
||
if(!throttle){_update(event);}else if(_updateTimeout===-1){_updateTimeout=setTimeout(function(){_update(event);_updateTimeout=-1;},matchHeight._throttle);}};$(matchHeight._applyDataApi);var on=$.fn.on?'on':'bind';$(window)[on]('load',function(event){matchHeight._update(false,event);});$(window)[on]('resize orientationchange',function(event){matchHeight._update(true,event);});});}),(function(module,exports,__webpack_require__){(function(jQuery){
|
||
/*!
|
||
Chosen, a Select Box Enhancer for jQuery and Prototype
|
||
by Patrick Filler for Harvest, http://getharvest.com
|
||
|
||
Version 1.4.2
|
||
Full source at https://github.com/harvesthq/chosen
|
||
Copyright (c) 2011-2015 Harvest http://getharvest.com
|
||
|
||
MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
|
||
This file is generated by `grunt build`, do not edit it by hand.
|
||
*/
|
||
(function(){var $,AbstractChosen,Chosen,SelectParser,_ref,__hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key))child[key]=parent[key];}function ctor(){this.constructor=child;}ctor.prototype=parent.prototype;child.prototype=new ctor();child.__super__=parent.prototype;return child;};SelectParser=(function(){function SelectParser(){this.options_index=0;this.parsed=[];}
|
||
SelectParser.prototype.add_node=function(child){if(child.nodeName.toUpperCase()==="OPTGROUP"){return this.add_group(child);}else{return this.add_option(child);}};SelectParser.prototype.add_group=function(group){var group_position,option,_i,_len,_ref,_results;group_position=this.parsed.length;this.parsed.push({array_index:group_position,group:true,label:this.escapeExpression(group.label),title:group.title?group.title:void 0,children:0,disabled:group.disabled,classes:group.className});_ref=group.childNodes;_results=[];for(_i=0,_len=_ref.length;_i<_len;_i++){option=_ref[_i];_results.push(this.add_option(option,group_position,group.disabled));}
|
||
return _results;};SelectParser.prototype.add_option=function(option,group_position,group_disabled){if(option.nodeName.toUpperCase()==="OPTION"){if(option.text!==""){if(group_position!=null){this.parsed[group_position].children+=1;}
|
||
this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:option.value,text:option.text,html:option.innerHTML,title:option.title?option.title:void 0,selected:option.selected,disabled:group_disabled===true?group_disabled:option.disabled,group_array_index:group_position,group_label:group_position!=null?this.parsed[group_position].label:null,classes:option.className,style:option.style.cssText});}else{this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:true});}
|
||
return this.options_index+=1;}};SelectParser.prototype.escapeExpression=function(text){var map,unsafe_chars;if((text==null)||text===false){return"";}
|
||
if(!/[\&\<\>\"\'\`]/.test(text)){return text;}
|
||
map={"<":"<",">":">",'"':""","'":"'","`":"`"};unsafe_chars=/&(?!\w+;)|[\<\>\"\'\`]/g;return text.replace(unsafe_chars,function(chr){return map[chr]||"&";});};return SelectParser;})();SelectParser.select_to_array=function(select){var child,parser,_i,_len,_ref;parser=new SelectParser();_ref=select.childNodes;for(_i=0,_len=_ref.length;_i<_len;_i++){child=_ref[_i];parser.add_node(child);}
|
||
return parser.parsed;};AbstractChosen=(function(){function AbstractChosen(form_field,options){this.form_field=form_field;this.options=options!=null?options:{};if(!AbstractChosen.browser_is_supported()){return;}
|
||
this.is_multiple=this.form_field.multiple;this.set_default_text();this.set_default_values();this.setup();this.set_up_html();this.register_observers();this.on_ready();}
|
||
AbstractChosen.prototype.set_default_values=function(){var _this=this;this.click_test_action=function(evt){return _this.test_active_click(evt);};this.activate_action=function(evt){return _this.activate_field(evt);};this.active_field=false;this.mouse_on_container=false;this.results_showing=false;this.result_highlighted=null;this.allow_single_deselect=(this.options.allow_single_deselect!=null)&&(this.form_field.options[0]!=null)&&this.form_field.options[0].text===""?this.options.allow_single_deselect:false;this.disable_search_threshold=this.options.disable_search_threshold||0;this.disable_search=this.options.disable_search||false;this.enable_split_word_search=this.options.enable_split_word_search!=null?this.options.enable_split_word_search:true;this.group_search=this.options.group_search!=null?this.options.group_search:true;this.search_contains=this.options.search_contains||false;this.single_backstroke_delete=this.options.single_backstroke_delete!=null?this.options.single_backstroke_delete:true;this.max_selected_options=this.options.max_selected_options||Infinity;this.inherit_select_classes=this.options.inherit_select_classes||false;this.display_selected_options=this.options.display_selected_options!=null?this.options.display_selected_options:true;this.display_disabled_options=this.options.display_disabled_options!=null?this.options.display_disabled_options:true;this.include_group_label_in_selected=this.options.include_group_label_in_selected||false;return this.max_shown_results=this.options.max_shown_results||Number.POSITIVE_INFINITY;};AbstractChosen.prototype.set_default_text=function(){if(this.form_field.getAttribute("data-placeholder")){this.default_text=this.form_field.getAttribute("data-placeholder");}else if(this.is_multiple){this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||AbstractChosen.default_multiple_text;}else{this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||AbstractChosen.default_single_text;}
|
||
return this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||AbstractChosen.default_no_result_text;};AbstractChosen.prototype.choice_label=function(item){if(this.include_group_label_in_selected&&(item.group_label!=null)){return"<b class='group-name'>"+item.group_label+"</b>"+item.html;}else{return item.html;}};AbstractChosen.prototype.mouse_enter=function(){return this.mouse_on_container=true;};AbstractChosen.prototype.mouse_leave=function(){return this.mouse_on_container=false;};AbstractChosen.prototype.input_focus=function(evt){var _this=this;if(this.is_multiple){if(!this.active_field){return setTimeout((function(){return _this.container_mousedown();}),50);}}else{if(!this.active_field){return this.activate_field();}}};AbstractChosen.prototype.input_blur=function(evt){var _this=this;if(!this.mouse_on_container){this.active_field=false;return setTimeout((function(){return _this.blur_test();}),100);}};AbstractChosen.prototype.results_option_build=function(options){var content,data,data_content,shown_results,_i,_len,_ref;content='';shown_results=0;_ref=this.results_data;for(_i=0,_len=_ref.length;_i<_len;_i++){data=_ref[_i];data_content='';if(data.group){data_content=this.result_add_group(data);}else{data_content=this.result_add_option(data);}
|
||
if(data_content!==''){shown_results++;content+=data_content;}
|
||
if(options!=null?options.first:void 0){if(data.selected&&this.is_multiple){this.choice_build(data);}else if(data.selected&&!this.is_multiple){this.single_set_selected_text(this.choice_label(data));}}
|
||
if(shown_results>=this.max_shown_results){break;}}
|
||
return content;};AbstractChosen.prototype.result_add_option=function(option){var classes,option_el;if(!option.search_match){return'';}
|
||
if(!this.include_option_in_results(option)){return'';}
|
||
classes=[];if(!option.disabled&&!(option.selected&&this.is_multiple)){classes.push("active-result");}
|
||
if(option.disabled&&!(option.selected&&this.is_multiple)){classes.push("disabled-result");}
|
||
if(option.selected){classes.push("result-selected");}
|
||
if(option.group_array_index!=null){classes.push("group-option");}
|
||
if(option.classes!==""){classes.push(option.classes);}
|
||
option_el=document.createElement("li");option_el.className=classes.join(" ");option_el.style.cssText=option.style;option_el.setAttribute("data-option-array-index",option.array_index);option_el.innerHTML=option.search_text;if(option.title){option_el.title=option.title;}
|
||
return this.outerHTML(option_el);};AbstractChosen.prototype.result_add_group=function(group){var classes,group_el;if(!(group.search_match||group.group_match)){return'';}
|
||
if(!(group.active_options>0)){return'';}
|
||
classes=[];classes.push("group-result");if(group.classes){classes.push(group.classes);}
|
||
group_el=document.createElement("li");group_el.className=classes.join(" ");group_el.innerHTML=group.search_text;if(group.title){group_el.title=group.title;}
|
||
return this.outerHTML(group_el);};AbstractChosen.prototype.results_update_field=function(){this.set_default_text();if(!this.is_multiple){this.results_reset_cleanup();}
|
||
this.result_clear_highlight();this.results_build();if(this.results_showing){return this.winnow_results();}};AbstractChosen.prototype.reset_single_select_options=function(){var result,_i,_len,_ref,_results;_ref=this.results_data;_results=[];for(_i=0,_len=_ref.length;_i<_len;_i++){result=_ref[_i];if(result.selected){_results.push(result.selected=false);}else{_results.push(void 0);}}
|
||
return _results;};AbstractChosen.prototype.results_toggle=function(){if(this.results_showing){return this.results_hide();}else{return this.results_show();}};AbstractChosen.prototype.results_search=function(evt){if(this.results_showing){return this.winnow_results();}else{return this.results_show();}};AbstractChosen.prototype.winnow_results=function(){var escapedSearchText,option,regex,results,results_group,searchText,startpos,text,zregex,_i,_len,_ref;this.no_results_clear();results=0;searchText=this.get_search_text();escapedSearchText=searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");zregex=new RegExp(escapedSearchText,'i');regex=this.get_search_regex(escapedSearchText);_ref=this.results_data;for(_i=0,_len=_ref.length;_i<_len;_i++){option=_ref[_i];option.search_match=false;results_group=null;if(this.include_option_in_results(option)){if(option.group){option.group_match=false;option.active_options=0;}
|
||
if((option.group_array_index!=null)&&this.results_data[option.group_array_index]){results_group=this.results_data[option.group_array_index];if(results_group.active_options===0&&results_group.search_match){results+=1;}
|
||
results_group.active_options+=1;}
|
||
option.search_text=option.group?option.label:option.html;if(!(option.group&&!this.group_search)){option.search_match=this.search_string_match(option.search_text,regex);if(option.search_match&&!option.group){results+=1;}
|
||
if(option.search_match){if(searchText.length){startpos=option.search_text.search(zregex);text=option.search_text.substr(0,startpos+searchText.length)+'</em>'+option.search_text.substr(startpos+searchText.length);option.search_text=text.substr(0,startpos)+'<em>'+text.substr(startpos);}
|
||
if(results_group!=null){results_group.group_match=true;}}else if((option.group_array_index!=null)&&this.results_data[option.group_array_index].search_match){option.search_match=true;}}}}
|
||
this.result_clear_highlight();if(results<1&&searchText.length){this.update_results_content("");return this.no_results(searchText);}else{this.update_results_content(this.results_option_build());return this.winnow_results_set_highlight();}};AbstractChosen.prototype.get_search_regex=function(escaped_search_string){var regex_anchor;regex_anchor=this.search_contains?"":"^";return new RegExp(regex_anchor+escaped_search_string,'i');};AbstractChosen.prototype.search_string_match=function(search_string,regex){var part,parts,_i,_len;if(regex.test(search_string)){return true;}else if(this.enable_split_word_search&&(search_string.indexOf(" ")>=0||search_string.indexOf("[")===0)){parts=search_string.replace(/\[|\]/g,"").split(" ");if(parts.length){for(_i=0,_len=parts.length;_i<_len;_i++){part=parts[_i];if(regex.test(part)){return true;}}}}};AbstractChosen.prototype.choices_count=function(){var option,_i,_len,_ref;if(this.selected_option_count!=null){return this.selected_option_count;}
|
||
this.selected_option_count=0;_ref=this.form_field.options;for(_i=0,_len=_ref.length;_i<_len;_i++){option=_ref[_i];if(option.selected){this.selected_option_count+=1;}}
|
||
return this.selected_option_count;};AbstractChosen.prototype.choices_click=function(evt){evt.preventDefault();if(!(this.results_showing||this.is_disabled)){return this.results_show();}};AbstractChosen.prototype.keyup_checker=function(evt){var stroke,_ref;stroke=(_ref=evt.which)!=null?_ref:evt.keyCode;this.search_field_scale();switch(stroke){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0){return this.keydown_backstroke();}else if(!this.pending_backstroke){this.result_clear_highlight();return this.results_search();}
|
||
break;case 13:evt.preventDefault();if(this.results_showing){return this.result_select(evt);}
|
||
break;case 27:if(this.results_showing){this.results_hide();}
|
||
return true;case 9:case 38:case 40:case 16:case 91:case 17:break;default:return this.results_search();}};AbstractChosen.prototype.clipboard_event_checker=function(evt){var _this=this;return setTimeout((function(){return _this.results_search();}),50);};AbstractChosen.prototype.container_width=function(){if(this.options.width!=null){return this.options.width;}else{return""+this.form_field.offsetWidth+"px";}};AbstractChosen.prototype.include_option_in_results=function(option){if(this.is_multiple&&(!this.display_selected_options&&option.selected)){return false;}
|
||
if(!this.display_disabled_options&&option.disabled){return false;}
|
||
if(option.empty){return false;}
|
||
return true;};AbstractChosen.prototype.search_results_touchstart=function(evt){this.touch_started=true;return this.search_results_mouseover(evt);};AbstractChosen.prototype.search_results_touchmove=function(evt){this.touch_started=false;return this.search_results_mouseout(evt);};AbstractChosen.prototype.search_results_touchend=function(evt){if(this.touch_started){return this.search_results_mouseup(evt);}};AbstractChosen.prototype.outerHTML=function(element){var tmp;if(element.outerHTML){return element.outerHTML;}
|
||
tmp=document.createElement("div");tmp.appendChild(element);return tmp.innerHTML;};AbstractChosen.browser_is_supported=function(){if(/iP(od|hone)/i.test(window.navigator.userAgent)){return false;}
|
||
if(/Android/i.test(window.navigator.userAgent)){if(/Mobile/i.test(window.navigator.userAgent)){return false;}}
|
||
if(/IEMobile/i.test(window.navigator.userAgent)){return false;}
|
||
if(/Windows Phone/i.test(window.navigator.userAgent)){return false;}
|
||
if(/BlackBerry/i.test(window.navigator.userAgent)){return false;}
|
||
if(/BB10/i.test(window.navigator.userAgent)){return false;}
|
||
if(window.navigator.appName==="Microsoft Internet Explorer"){return document.documentMode>=8;}
|
||
return true;};AbstractChosen.default_multiple_text="Select Some Options";AbstractChosen.default_single_text="Select an Option";AbstractChosen.default_no_result_text="No results match";return AbstractChosen;})();$=jQuery;$.fn.extend({chosen:function(options){if(!AbstractChosen.browser_is_supported()){return this;}
|
||
return this.each(function(input_field){var $this,chosen;$this=$(this);chosen=$this.data('chosen');if(options==='destroy'){if(chosen instanceof Chosen){chosen.destroy();}
|
||
return;}
|
||
if(!(chosen instanceof Chosen)){$this.data('chosen',new Chosen(this,options));}});}});Chosen=(function(_super){__extends(Chosen,_super);function Chosen(){_ref=Chosen.__super__.constructor.apply(this,arguments);return _ref;}
|
||
Chosen.prototype.setup=function(){this.form_field_jq=$(this.form_field);this.current_selectedIndex=this.form_field.selectedIndex;return this.is_rtl=this.form_field_jq.hasClass("chosen-rtl");};Chosen.prototype.set_up_html=function(){var container_classes,container_props;container_classes=["chosen-container"];container_classes.push("chosen-container-"+(this.is_multiple?"multi":"single"));if(this.inherit_select_classes&&this.form_field.className){container_classes.push(this.form_field.className);}
|
||
if(this.is_rtl){container_classes.push("chosen-rtl");}
|
||
container_props={'class':container_classes.join(' '),'style':"width: "+(this.container_width())+";",'title':this.form_field.title};if(this.form_field.id.length){container_props.id=this.form_field.id.replace(/[^\w]/g,'_')+"_chosen";}
|
||
this.container=$("<div />",container_props);if(this.is_multiple){this.container.html('<ul class="chosen-choices"><li class="search-field"><input type="text" value="'+this.default_text+'" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chosen-drop"><ul class="chosen-results"></ul></div>');}else{this.container.html('<a class="chosen-single chosen-default"><span>'+this.default_text+'</span><div><b></b></div></a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off" /></div><ul class="chosen-results"></ul></div>');}
|
||
this.form_field_jq.hide().after(this.container);this.dropdown=this.container.find('div.chosen-drop').first();this.search_field=this.container.find('input').first();this.search_results=this.container.find('ul.chosen-results').first();this.search_field_scale();this.search_no_results=this.container.find('li.no-results').first();if(this.is_multiple){this.search_choices=this.container.find('ul.chosen-choices').first();this.search_container=this.container.find('li.search-field').first();}else{this.search_container=this.container.find('div.chosen-search').first();this.selected_item=this.container.find('.chosen-single').first();}
|
||
this.results_build();this.set_tab_index();return this.set_label_behavior();};Chosen.prototype.on_ready=function(){return this.form_field_jq.trigger("chosen:ready",{chosen:this});};Chosen.prototype.register_observers=function(){var _this=this;this.container.bind('touchstart.chosen',function(evt){_this.container_mousedown(evt);return evt.preventDefault();});this.container.bind('touchend.chosen',function(evt){_this.container_mouseup(evt);return evt.preventDefault();});this.container.bind('mousedown.chosen',function(evt){_this.container_mousedown(evt);});this.container.bind('mouseup.chosen',function(evt){_this.container_mouseup(evt);});this.container.bind('mouseenter.chosen',function(evt){_this.mouse_enter(evt);});this.container.bind('mouseleave.chosen',function(evt){_this.mouse_leave(evt);});this.search_results.bind('mouseup.chosen',function(evt){_this.search_results_mouseup(evt);});this.search_results.bind('mouseover.chosen',function(evt){_this.search_results_mouseover(evt);});this.search_results.bind('mouseout.chosen',function(evt){_this.search_results_mouseout(evt);});this.search_results.bind('mousewheel.chosen DOMMouseScroll.chosen',function(evt){_this.search_results_mousewheel(evt);});this.search_results.bind('touchstart.chosen',function(evt){_this.search_results_touchstart(evt);});this.search_results.bind('touchmove.chosen',function(evt){_this.search_results_touchmove(evt);});this.search_results.bind('touchend.chosen',function(evt){_this.search_results_touchend(evt);});this.form_field_jq.bind("chosen:updated.chosen",function(evt){_this.results_update_field(evt);});this.form_field_jq.bind("chosen:activate.chosen",function(evt){_this.activate_field(evt);});this.form_field_jq.bind("chosen:open.chosen",function(evt){_this.container_mousedown(evt);});this.form_field_jq.bind("chosen:close.chosen",function(evt){_this.input_blur(evt);});this.search_field.bind('blur.chosen',function(evt){_this.input_blur(evt);});this.search_field.bind('keyup.chosen',function(evt){_this.keyup_checker(evt);});this.search_field.bind('keydown.chosen',function(evt){_this.keydown_checker(evt);});this.search_field.bind('focus.chosen',function(evt){_this.input_focus(evt);});this.search_field.bind('cut.chosen',function(evt){_this.clipboard_event_checker(evt);});this.search_field.bind('paste.chosen',function(evt){_this.clipboard_event_checker(evt);});if(this.is_multiple){return this.search_choices.bind('click.chosen',function(evt){_this.choices_click(evt);});}else{return this.container.bind('click.chosen',function(evt){evt.preventDefault();});}};Chosen.prototype.destroy=function(){$(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action);if(this.search_field[0].tabIndex){this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex;}
|
||
this.container.remove();this.form_field_jq.removeData('chosen');return this.form_field_jq.show();};Chosen.prototype.search_field_disabled=function(){this.is_disabled=this.form_field_jq[0].disabled;if(this.is_disabled){this.container.addClass('chosen-disabled');this.search_field[0].disabled=true;if(!this.is_multiple){this.selected_item.unbind("focus.chosen",this.activate_action);}
|
||
return this.close_field();}else{this.container.removeClass('chosen-disabled');this.search_field[0].disabled=false;if(!this.is_multiple){return this.selected_item.bind("focus.chosen",this.activate_action);}}};Chosen.prototype.container_mousedown=function(evt){if(!this.is_disabled){if(evt&&evt.type==="mousedown"&&!this.results_showing){evt.preventDefault();}
|
||
if(!((evt!=null)&&($(evt.target)).hasClass("search-choice-close"))){if(!this.active_field){if(this.is_multiple){this.search_field.val("");}
|
||
$(this.container[0].ownerDocument).bind('click.chosen',this.click_test_action);this.results_show();}else if(!this.is_multiple&&evt&&(($(evt.target)[0]===this.selected_item[0])||$(evt.target).parents("a.chosen-single").length)){evt.preventDefault();this.results_toggle();}
|
||
return this.activate_field();}}};Chosen.prototype.container_mouseup=function(evt){if(evt.target.nodeName==="ABBR"&&!this.is_disabled){return this.results_reset(evt);}};Chosen.prototype.search_results_mousewheel=function(evt){var delta;if(evt.originalEvent){delta=evt.originalEvent.deltaY||-evt.originalEvent.wheelDelta||evt.originalEvent.detail;}
|
||
if(delta!=null){evt.preventDefault();if(evt.type==='DOMMouseScroll'){delta=delta*40;}
|
||
return this.search_results.scrollTop(delta+this.search_results.scrollTop());}};Chosen.prototype.blur_test=function(evt){if(!this.active_field&&this.container.hasClass("chosen-container-active")){return this.close_field();}};Chosen.prototype.close_field=function(){$(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action);this.active_field=false;this.results_hide();this.container.removeClass("chosen-container-active");this.clear_backstroke();this.show_search_field_default();return this.search_field_scale();};Chosen.prototype.activate_field=function(){this.container.addClass("chosen-container-active");this.active_field=true;this.search_field.val(this.search_field.val());return this.search_field.focus();};Chosen.prototype.test_active_click=function(evt){var active_container;active_container=$(evt.target).closest('.chosen-container');if(active_container.length&&this.container[0]===active_container[0]){return this.active_field=true;}else{return this.close_field();}};Chosen.prototype.results_build=function(){this.parsing=true;this.selected_option_count=null;this.results_data=SelectParser.select_to_array(this.form_field);if(this.is_multiple){this.search_choices.find("li.search-choice").remove();}else if(!this.is_multiple){this.single_set_selected_text();if(this.disable_search||this.form_field.options.length<=this.disable_search_threshold){this.search_field[0].readOnly=true;this.container.addClass("chosen-container-single-nosearch");}else{this.search_field[0].readOnly=false;this.container.removeClass("chosen-container-single-nosearch");}}
|
||
this.update_results_content(this.results_option_build({first:true}));this.search_field_disabled();this.show_search_field_default();this.search_field_scale();return this.parsing=false;};Chosen.prototype.result_do_highlight=function(el){var high_bottom,high_top,maxHeight,visible_bottom,visible_top;if(el.length){this.result_clear_highlight();this.result_highlight=el;this.result_highlight.addClass("highlighted");maxHeight=parseInt(this.search_results.css("maxHeight"),10);visible_top=this.search_results.scrollTop();visible_bottom=maxHeight+visible_top;high_top=this.result_highlight.position().top+this.search_results.scrollTop();high_bottom=high_top+this.result_highlight.outerHeight();if(high_bottom>=visible_bottom){return this.search_results.scrollTop((high_bottom-maxHeight)>0?high_bottom-maxHeight:0);}else if(high_top<visible_top){return this.search_results.scrollTop(high_top);}}};Chosen.prototype.result_clear_highlight=function(){if(this.result_highlight){this.result_highlight.removeClass("highlighted");}
|
||
return this.result_highlight=null;};Chosen.prototype.results_show=function(){if(this.is_multiple&&this.max_selected_options<=this.choices_count()){this.form_field_jq.trigger("chosen:maxselected",{chosen:this});return false;}
|
||
this.container.addClass("chosen-with-drop");this.results_showing=true;this.search_field.focus();this.search_field.val(this.search_field.val());this.winnow_results();return this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this});};Chosen.prototype.update_results_content=function(content){return this.search_results.html(content);};Chosen.prototype.results_hide=function(){if(this.results_showing){this.result_clear_highlight();this.container.removeClass("chosen-with-drop");this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this});}
|
||
return this.results_showing=false;};Chosen.prototype.set_tab_index=function(el){var ti;if(this.form_field.tabIndex){ti=this.form_field.tabIndex;this.form_field.tabIndex=-1;return this.search_field[0].tabIndex=ti;}};Chosen.prototype.set_label_behavior=function(){var _this=this;this.form_field_label=this.form_field_jq.parents("label");if(!this.form_field_label.length&&this.form_field.id.length){this.form_field_label=$("label[for='"+this.form_field.id+"']");}
|
||
if(this.form_field_label.length>0){return this.form_field_label.bind('click.chosen',function(evt){if(_this.is_multiple){return _this.container_mousedown(evt);}else{return _this.activate_field();}});}};Chosen.prototype.show_search_field_default=function(){if(this.is_multiple&&this.choices_count()<1&&!this.active_field){this.search_field.val(this.default_text);return this.search_field.addClass("default");}else{this.search_field.val("");return this.search_field.removeClass("default");}};Chosen.prototype.search_results_mouseup=function(evt){var target;target=$(evt.target).hasClass("active-result")?$(evt.target):$(evt.target).parents(".active-result").first();if(target.length){this.result_highlight=target;this.result_select(evt);return this.search_field.focus();}};Chosen.prototype.search_results_mouseover=function(evt){var target;target=$(evt.target).hasClass("active-result")?$(evt.target):$(evt.target).parents(".active-result").first();if(target){return this.result_do_highlight(target);}};Chosen.prototype.search_results_mouseout=function(evt){if($(evt.target).hasClass("active-result"||$(evt.target).parents('.active-result').first())){return this.result_clear_highlight();}};Chosen.prototype.choice_build=function(item){var choice,close_link,_this=this;choice=$('<li />',{"class":"search-choice"}).html("<span>"+(this.choice_label(item))+"</span>");if(item.disabled){choice.addClass('search-choice-disabled');}else{close_link=$('<a />',{"class":'search-choice-close','data-option-array-index':item.array_index});close_link.bind('click.chosen',function(evt){return _this.choice_destroy_link_click(evt);});choice.append(close_link);}
|
||
return this.search_container.before(choice);};Chosen.prototype.choice_destroy_link_click=function(evt){evt.preventDefault();evt.stopPropagation();if(!this.is_disabled){return this.choice_destroy($(evt.target));}};Chosen.prototype.choice_destroy=function(link){if(this.result_deselect(link[0].getAttribute("data-option-array-index"))){this.show_search_field_default();if(this.is_multiple&&this.choices_count()>0&&this.search_field.val().length<1){this.results_hide();}
|
||
link.parents('li').first().remove();return this.search_field_scale();}};Chosen.prototype.results_reset=function(){this.reset_single_select_options();this.form_field.options[0].selected=true;this.single_set_selected_text();this.show_search_field_default();this.results_reset_cleanup();this.form_field_jq.trigger("change");if(this.active_field){return this.results_hide();}};Chosen.prototype.results_reset_cleanup=function(){this.current_selectedIndex=this.form_field.selectedIndex;return this.selected_item.find("abbr").remove();};Chosen.prototype.result_select=function(evt){var high,item;if(this.result_highlight){high=this.result_highlight;this.result_clear_highlight();if(this.is_multiple&&this.max_selected_options<=this.choices_count()){this.form_field_jq.trigger("chosen:maxselected",{chosen:this});return false;}
|
||
if(this.is_multiple){high.removeClass("active-result");}else{this.reset_single_select_options();}
|
||
high.addClass("result-selected");item=this.results_data[high[0].getAttribute("data-option-array-index")];item.selected=true;this.form_field.options[item.options_index].selected=true;this.selected_option_count=null;if(this.is_multiple){this.choice_build(item);}else{this.single_set_selected_text(this.choice_label(item));}
|
||
if(!((evt.metaKey||evt.ctrlKey)&&this.is_multiple)){this.results_hide();}
|
||
this.show_search_field_default();if(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex){this.form_field_jq.trigger("change",{'selected':this.form_field.options[item.options_index].value});}
|
||
this.current_selectedIndex=this.form_field.selectedIndex;evt.preventDefault();return this.search_field_scale();}};Chosen.prototype.single_set_selected_text=function(text){if(text==null){text=this.default_text;}
|
||
if(text===this.default_text){this.selected_item.addClass("chosen-default");}else{this.single_deselect_control_build();this.selected_item.removeClass("chosen-default");}
|
||
return this.selected_item.find("span").html(text);};Chosen.prototype.result_deselect=function(pos){var result_data;result_data=this.results_data[pos];if(!this.form_field.options[result_data.options_index].disabled){result_data.selected=false;this.form_field.options[result_data.options_index].selected=false;this.selected_option_count=null;this.result_clear_highlight();if(this.results_showing){this.winnow_results();}
|
||
this.form_field_jq.trigger("change",{deselected:this.form_field.options[result_data.options_index].value});this.search_field_scale();return true;}else{return false;}};Chosen.prototype.single_deselect_control_build=function(){if(!this.allow_single_deselect){return;}
|
||
if(!this.selected_item.find("abbr").length){this.selected_item.find("span").first().after("<abbr class=\"search-choice-close\"></abbr>");}
|
||
return this.selected_item.addClass("chosen-single-with-deselect");};Chosen.prototype.get_search_text=function(){return $('<div/>').text($.trim(this.search_field.val())).html();};Chosen.prototype.winnow_results_set_highlight=function(){var do_high,selected_results;selected_results=!this.is_multiple?this.search_results.find(".result-selected.active-result"):[];do_high=selected_results.length?selected_results.first():this.search_results.find(".active-result").first();if(do_high!=null){return this.result_do_highlight(do_high);}};Chosen.prototype.no_results=function(terms){var no_results_html;no_results_html=$('<li class="no-results">'+this.results_none_found+' "<span></span>"</li>');no_results_html.find("span").first().html(terms);this.search_results.append(no_results_html);return this.form_field_jq.trigger("chosen:no_results",{chosen:this});};Chosen.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove();};Chosen.prototype.keydown_arrow=function(){var next_sib;if(this.results_showing&&this.result_highlight){next_sib=this.result_highlight.nextAll("li.active-result").first();if(next_sib){return this.result_do_highlight(next_sib);}}else{return this.results_show();}};Chosen.prototype.keyup_arrow=function(){var prev_sibs;if(!this.results_showing&&!this.is_multiple){return this.results_show();}else if(this.result_highlight){prev_sibs=this.result_highlight.prevAll("li.active-result");if(prev_sibs.length){return this.result_do_highlight(prev_sibs.first());}else{if(this.choices_count()>0){this.results_hide();}
|
||
return this.result_clear_highlight();}}};Chosen.prototype.keydown_backstroke=function(){var next_available_destroy;if(this.pending_backstroke){this.choice_destroy(this.pending_backstroke.find("a").first());return this.clear_backstroke();}else{next_available_destroy=this.search_container.siblings("li.search-choice").last();if(next_available_destroy.length&&!next_available_destroy.hasClass("search-choice-disabled")){this.pending_backstroke=next_available_destroy;if(this.single_backstroke_delete){return this.keydown_backstroke();}else{return this.pending_backstroke.addClass("search-choice-focus");}}}};Chosen.prototype.clear_backstroke=function(){if(this.pending_backstroke){this.pending_backstroke.removeClass("search-choice-focus");}
|
||
return this.pending_backstroke=null;};Chosen.prototype.keydown_checker=function(evt){var stroke,_ref1;stroke=(_ref1=evt.which)!=null?_ref1:evt.keyCode;this.search_field_scale();if(stroke!==8&&this.pending_backstroke){this.clear_backstroke();}
|
||
switch(stroke){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:if(this.results_showing&&!this.is_multiple){this.result_select(evt);}
|
||
this.mouse_on_container=false;break;case 13:if(this.results_showing){evt.preventDefault();}
|
||
break;case 32:if(this.disable_search){evt.preventDefault();}
|
||
break;case 38:evt.preventDefault();this.keyup_arrow();break;case 40:evt.preventDefault();this.keydown_arrow();break;}};Chosen.prototype.search_field_scale=function(){var div,f_width,h,style,style_block,styles,w,_i,_len;if(this.is_multiple){h=0;w=0;style_block="position:absolute; left: -1000px; top: -1000px; display:none;";styles=['font-size','font-style','font-weight','font-family','line-height','text-transform','letter-spacing'];for(_i=0,_len=styles.length;_i<_len;_i++){style=styles[_i];style_block+=style+":"+this.search_field.css(style)+";";}
|
||
div=$('<div />',{'style':style_block});div.text(this.search_field.val());$('body').append(div);w=div.width()+25;div.remove();f_width=this.container.outerWidth();if(w>f_width-10){w=f_width-10;}
|
||
return this.search_field.css({'width':w+'px'});}};return Chosen;})(AbstractChosen);}).call(this);}.call(exports,__webpack_require__(1)))}),(function(module,exports,__webpack_require__){(function(jQuery){+function($){'use strict';function getValue($el){return $el.is('[type="checkbox"]')?$el.prop('checked'):$el.is('[type="radio"]')?!!$('[name="'+$el.attr('name')+'"]:checked').length:$el.val()}
|
||
var Validator=function(element,options){this.options=options
|
||
this.validators=$.extend({},Validator.VALIDATORS,options.custom)
|
||
this.$element=$(element)
|
||
this.$btn=$('button[type="submit"], input[type="submit"]').filter('[form="'+this.$element.attr('id')+'"]').add(this.$element.find('input[type="submit"], button[type="submit"]'))
|
||
this.update()
|
||
this.$element.on('input.bs.validator change.bs.validator focusout.bs.validator',$.proxy(this.onInput,this))
|
||
this.$element.on('submit.bs.validator',$.proxy(this.onSubmit,this))
|
||
this.$element.on('reset.bs.validator',$.proxy(this.reset,this))
|
||
this.$element.find('[data-match]').each(function(){var $this=$(this)
|
||
var target=$this.data('match')
|
||
$(target).on('input.bs.validator',function(e){getValue($this)&&$this.trigger('input.bs.validator')})})
|
||
this.$inputs.filter(function(){return getValue($(this))}).trigger('focusout')
|
||
this.$element.attr('novalidate',true)
|
||
this.toggleSubmit()}
|
||
Validator.VERSION='0.11.5'
|
||
Validator.INPUT_SELECTOR=':input:not([type="hidden"], [type="submit"], [type="reset"], button)'
|
||
Validator.FOCUS_OFFSET=20
|
||
Validator.DEFAULTS={delay:500,html:false,disable:true,focus:true,custom:{},errors:{match:'Does not match',minlength:'Not long enough'},feedback:{success:'glyphicon-ok',error:'glyphicon-remove'}}
|
||
Validator.VALIDATORS={'native':function($el){var el=$el[0]
|
||
if(el.checkValidity){return!el.checkValidity()&&!el.validity.valid&&(el.validationMessage||"error!")}},'match':function($el){var target=$el.data('match')
|
||
return $el.val()!==$(target).val()&&Validator.DEFAULTS.errors.match},'minlength':function($el){var minlength=$el.data('minlength')
|
||
return $el.val().length<minlength&&Validator.DEFAULTS.errors.minlength}}
|
||
Validator.prototype.update=function(){this.$inputs=this.$element.find(Validator.INPUT_SELECTOR).add(this.$element.find('[data-validate="true"]')).not(this.$element.find('[data-validate="false"]'))
|
||
return this}
|
||
Validator.prototype.onInput=function(e){var self=this
|
||
var $el=$(e.target)
|
||
var deferErrors=e.type!=='focusout'
|
||
if(!this.$inputs.is($el))return
|
||
this.validateInput($el,deferErrors).done(function(){self.toggleSubmit()})}
|
||
Validator.prototype.validateInput=function($el,deferErrors){var value=getValue($el)
|
||
var prevErrors=$el.data('bs.validator.errors')
|
||
var errors
|
||
if($el.is('[type="radio"]'))$el=this.$element.find('input[name="'+$el.attr('name')+'"]')
|
||
var e=$.Event('validate.bs.validator',{relatedTarget:$el[0]})
|
||
this.$element.trigger(e)
|
||
if(e.isDefaultPrevented())return
|
||
var self=this
|
||
return this.runValidators($el).done(function(errors){$el.data('bs.validator.errors',errors)
|
||
errors.length?deferErrors?self.defer($el,self.showErrors):self.showErrors($el):self.clearErrors($el)
|
||
if(!prevErrors||errors.toString()!==prevErrors.toString()){e=errors.length?$.Event('invalid.bs.validator',{relatedTarget:$el[0],detail:errors}):$.Event('valid.bs.validator',{relatedTarget:$el[0],detail:prevErrors})
|
||
self.$element.trigger(e)}
|
||
self.toggleSubmit()
|
||
self.$element.trigger($.Event('validated.bs.validator',{relatedTarget:$el[0]}))})}
|
||
Validator.prototype.runValidators=function($el){var errors=[]
|
||
var deferred=$.Deferred()
|
||
$el.data('bs.validator.deferred')&&$el.data('bs.validator.deferred').reject()
|
||
$el.data('bs.validator.deferred',deferred)
|
||
function getValidatorSpecificError(key){return $el.data(key+'-error')}
|
||
function getValidityStateError(){var validity=$el[0].validity
|
||
return validity.typeMismatch?$el.data('type-error'):validity.patternMismatch?$el.data('pattern-error'):validity.stepMismatch?$el.data('step-error'):validity.rangeOverflow?$el.data('max-error'):validity.rangeUnderflow?$el.data('min-error'):validity.valueMissing?$el.data('required-error'):null}
|
||
function getGenericError(){return $el.data('error')}
|
||
function getErrorMessage(key){return getValidatorSpecificError(key)||getValidityStateError()||getGenericError()}
|
||
$.each(this.validators,$.proxy(function(key,validator){var error=null
|
||
if((getValue($el)||$el.attr('required'))&&($el.data(key)||key=='native')&&(error=validator.call(this,$el))){error=getErrorMessage(key)||error;!~errors.indexOf(error)&&errors.push(error)}},this))
|
||
if(!errors.length&&getValue($el)&&$el.data('remote')){this.defer($el,function(){var data={}
|
||
data[$el.attr('name')]=getValue($el)
|
||
$.get($el.data('remote'),data).fail(function(jqXHR,textStatus,error){errors.push(getErrorMessage('remote')||error)}).always(function(){deferred.resolve(errors)})})}else deferred.resolve(errors)
|
||
return deferred.promise()}
|
||
Validator.prototype.validate=function(){var self=this
|
||
$.when(this.$inputs.map(function(el){return self.validateInput($(this),false)})).then(function(){self.toggleSubmit()
|
||
self.focusError()})
|
||
return this}
|
||
Validator.prototype.focusError=function(){if(!this.options.focus)return
|
||
var $input=$(".has-error:first :input")
|
||
if($input.length===0)return
|
||
$('html, body').animate({scrollTop:$input.offset().top-Validator.FOCUS_OFFSET},250)
|
||
$input.focus()}
|
||
Validator.prototype.showErrors=function($el){var method=this.options.html?'html':'text'
|
||
var errors=$el.data('bs.validator.errors')
|
||
var $group=$el.closest('.form-group')
|
||
var $block=$group.find('.help-block.with-errors')
|
||
var $feedback=$group.find('.form-control-feedback')
|
||
if(!errors.length)return
|
||
errors=$('<ul/>').addClass('list-unstyled').append($.map(errors,function(error){return $('<li/>')[method](error)}))
|
||
$block.data('bs.validator.originalContent')===undefined&&$block.data('bs.validator.originalContent',$block.html())
|
||
$block.empty().append(errors)
|
||
$group.addClass('has-error has-danger')
|
||
$group.hasClass('has-feedback')&&$feedback.removeClass(this.options.feedback.success)&&$feedback.addClass(this.options.feedback.error)&&$group.removeClass('has-success')}
|
||
Validator.prototype.clearErrors=function($el){var $group=$el.closest('.form-group')
|
||
var $block=$group.find('.help-block.with-errors')
|
||
var $feedback=$group.find('.form-control-feedback')
|
||
$block.html($block.data('bs.validator.originalContent'))
|
||
$group.removeClass('has-error has-danger has-success')
|
||
$group.hasClass('has-feedback')&&$feedback.removeClass(this.options.feedback.error)&&$feedback.removeClass(this.options.feedback.success)&&getValue($el)&&$feedback.addClass(this.options.feedback.success)&&$group.addClass('has-success')}
|
||
Validator.prototype.hasErrors=function(){function fieldErrors(){return!!($(this).data('bs.validator.errors')||[]).length}
|
||
return!!this.$inputs.filter(fieldErrors).length}
|
||
Validator.prototype.isIncomplete=function(){function fieldIncomplete(){var value=getValue($(this))
|
||
return!(typeof value=="string"?$.trim(value):value)}
|
||
return!!this.$inputs.filter('[required]').filter(fieldIncomplete).length}
|
||
Validator.prototype.onSubmit=function(e){this.validate()
|
||
if(this.isIncomplete()||this.hasErrors())e.preventDefault()}
|
||
Validator.prototype.toggleSubmit=function(){if(!this.options.disable)return
|
||
this.$btn.toggleClass('disabled',this.isIncomplete()||this.hasErrors())}
|
||
Validator.prototype.defer=function($el,callback){callback=$.proxy(callback,this,$el)
|
||
if(!this.options.delay)return callback()
|
||
window.clearTimeout($el.data('bs.validator.timeout'))
|
||
$el.data('bs.validator.timeout',window.setTimeout(callback,this.options.delay))}
|
||
Validator.prototype.reset=function(){this.$element.find('.form-control-feedback').removeClass(this.options.feedback.error).removeClass(this.options.feedback.success)
|
||
this.$inputs.removeData(['bs.validator.errors','bs.validator.deferred']).each(function(){var $this=$(this)
|
||
var timeout=$this.data('bs.validator.timeout')
|
||
window.clearTimeout(timeout)&&$this.removeData('bs.validator.timeout')})
|
||
this.$element.find('.help-block.with-errors').each(function(){var $this=$(this)
|
||
var originalContent=$this.data('bs.validator.originalContent')
|
||
$this.removeData('bs.validator.originalContent').html(originalContent)})
|
||
this.$btn.removeClass('disabled')
|
||
this.$element.find('.has-error, .has-danger, .has-success').removeClass('has-error has-danger has-success')
|
||
return this}
|
||
Validator.prototype.destroy=function(){this.reset()
|
||
this.$element.removeAttr('novalidate').removeData('bs.validator').off('.bs.validator')
|
||
this.$inputs.off('.bs.validator')
|
||
this.options=null
|
||
this.validators=null
|
||
this.$element=null
|
||
this.$btn=null
|
||
return this}
|
||
function Plugin(option){return this.each(function(){var $this=$(this)
|
||
var options=$.extend({},Validator.DEFAULTS,$this.data(),typeof option=='object'&&option)
|
||
var data=$this.data('bs.validator')
|
||
if(!data&&option=='destroy')return
|
||
if(!data)$this.data('bs.validator',(data=new Validator(this,options)))
|
||
if(typeof option=='string')data[option]()})}
|
||
var old=$.fn.validator
|
||
$.fn.validator=Plugin
|
||
$.fn.validator.Constructor=Validator
|
||
$.fn.validator.noConflict=function(){$.fn.validator=old
|
||
return this}
|
||
$(window).on('load',function(){$('form[data-toggle="validator"]').each(function(){var $form=$(this)
|
||
Plugin.call($form,$form.data())})})}(jQuery);}.call(exports,__webpack_require__(1)))}),(function(module,exports,__webpack_require__){__webpack_require__(46)(__webpack_require__(47))}),(function(module,exports){module.exports=function(src){function log(error){(typeof console!=="undefined")&&(console.error||console.log)("[Script Loader]",error);}
|
||
function isIE(){return typeof attachEvent!=="undefined"&&typeof addEventListener==="undefined";}
|
||
try{if(typeof execScript!=="undefined"&&isIE()){execScript(src);}else if(typeof eval!=="undefined"){eval.call(null,src);}else{log("EvalError: No eval function available");}}catch(error){log(error);}}}),(function(module,exports){module.exports="/*!\n * @copyright Copyright (c) 2017 IcoMoon.io\n * @license Licensed under MIT license\n * See https://github.com/Keyamoon/svgxuse\n * @version 1.2.4\n */\n/*jslint browser: true */\n/*global XDomainRequest, MutationObserver, window */\n(function () {\n \"use strict\";\n if (typeof window !== \"undefined\" && window.addEventListener) {\n var cache = Object.create(null); // holds xhr objects to prevent multiple requests\n var checkUseElems;\n var tid; // timeout id\n var debouncedCheck = function () {\n clearTimeout(tid);\n tid = setTimeout(checkUseElems, 100);\n };\n var unobserveChanges = function () {\n return;\n };\n var observeChanges = function () {\n var observer;\n window.addEventListener(\"resize\", debouncedCheck, false);\n window.addEventListener(\"orientationchange\", debouncedCheck, false);\n if (window.MutationObserver) {\n observer = new MutationObserver(debouncedCheck);\n observer.observe(document.documentElement, {\n childList: true,\n subtree: true,\n attributes: true\n });\n unobserveChanges = function () {\n try {\n observer.disconnect();\n window.removeEventListener(\"resize\", debouncedCheck, false);\n window.removeEventListener(\"orientationchange\", debouncedCheck, false);\n } catch (ignore) {}\n };\n } else {\n document.documentElement.addEventListener(\"DOMSubtreeModified\", debouncedCheck, false);\n unobserveChanges = function () {\n document.documentElement.removeEventListener(\"DOMSubtreeModified\", debouncedCheck, false);\n window.removeEventListener(\"resize\", debouncedCheck, false);\n window.removeEventListener(\"orientationchange\", debouncedCheck, false);\n };\n }\n };\n var createRequest = function (url) {\n // In IE 9, cross origin requests can only be sent using XDomainRequest.\n // XDomainRequest would fail if CORS headers are not set.\n // Therefore, XDomainRequest should only be used with cross origin requests.\n function getOrigin(loc) {\n var a;\n if (loc.protocol !== undefined) {\n a = loc;\n } else {\n a = document.createElement(\"a\");\n a.href = loc;\n }\n return a.protocol.replace(/:/g, \"\") + a.host;\n }\n var Request;\n var origin;\n var origin2;\n if (window.XMLHttpRequest) {\n Request = new XMLHttpRequest();\n origin = getOrigin(location);\n origin2 = getOrigin(url);\n if (Request.withCredentials === undefined && origin2 !== \"\" && origin2 !== origin) {\n Request = XDomainRequest || undefined;\n } else {\n Request = XMLHttpRequest;\n }\n }\n return Request;\n };\n var xlinkNS = \"http://www.w3.org/1999/xlink\";\n checkUseElems = function () {\n var base;\n var bcr;\n var fallback = \"\"; // optional fallback URL in case no base path to SVG file was given and no symbol definition was found.\n var hash;\n var href;\n var i;\n var inProgressCount = 0;\n var isHidden;\n var isXlink = false;\n var Request;\n var url;\n var uses;\n var xhr;\n function observeIfDone() {\n // If done with making changes, start watching for chagnes in DOM again\n inProgressCount -= 1;\n if (inProgressCount === 0) { // if all xhrs were resolved\n unobserveChanges(); // make sure to remove old handlers\n observeChanges(); // watch for changes to DOM\n }\n }\n function attrUpdateFunc(spec) {\n return function () {\n if (cache[spec.base] !== true) {\n if (spec.isXlink) {\n spec.useEl.setAttributeNS(xlinkNS, \"xlink:href\", \"#\" + spec.hash);\n } else {\n spec.useEl.setAttribute(\"href\", \"#\" + spec.hash);\n }\n }\n };\n }\n function onloadFunc(xhr) {\n return function () {\n var body = document.body;\n var x = document.createElement(\"x\");\n var svg;\n xhr.onload = null;\n x.innerHTML = xhr.responseText;\n svg = x.getElementsByTagName(\"svg\")[0];\n if (svg) {\n svg.setAttribute(\"aria-hidden\", \"true\");\n svg.style.position = \"absolute\";\n svg.style.width = 0;\n svg.style.height = 0;\n svg.style.overflow = \"hidden\";\n body.insertBefore(svg, body.firstChild);\n }\n observeIfDone();\n };\n }\n function onErrorTimeout(xhr) {\n return function () {\n xhr.onerror = null;\n xhr.ontimeout = null;\n observeIfDone();\n };\n }\n unobserveChanges(); // stop watching for changes to DOM\n // find all use elements\n uses = document.getElementsByTagName(\"use\");\n for (i = 0; i < uses.length; i += 1) {\n try {\n bcr = uses[i].getBoundingClientRect();\n } catch (ignore) {\n // failed to get bounding rectangle of the use element\n bcr = false;\n }\n href = uses[i].getAttribute(\"href\");\n if (!href) {\n href = uses[i].getAttributeNS(xlinkNS, \"href\");\n isXlink = true;\n } else {\n isXlink = false;\n }\n if (href && href.split) {\n url = href.split(\"#\");\n } else {\n url = [\"\", \"\"];\n }\n base = url[0];\n hash = url[1];\n isHidden = bcr && bcr.left === 0 && bcr.right === 0 && bcr.top === 0 && bcr.bottom === 0;\n if (bcr && bcr.width === 0 && bcr.height === 0 && !isHidden) {\n // the use element is empty\n // if there is a reference to an external SVG, try to fetch it\n // use the optional fallback URL if there is no reference to an external SVG\n if (fallback && !base.length && hash && !document.getElementById(hash)) {\n base = fallback;\n }\n if (base.length) {\n // schedule updating xlink:href\n xhr = cache[base];\n if (xhr !== true) {\n // true signifies that prepending the SVG was not required\n setTimeout(attrUpdateFunc({\n useEl: uses[i],\n base: base,\n hash: hash,\n isXlink: isXlink\n }), 0);\n }\n if (xhr === undefined) {\n Request = createRequest(base);\n if (Request !== undefined) {\n xhr = new Request();\n cache[base] = xhr;\n xhr.onload = onloadFunc(xhr);\n xhr.onerror = onErrorTimeout(xhr);\n xhr.ontimeout = onErrorTimeout(xhr);\n xhr.open(\"GET\", base);\n xhr.send();\n inProgressCount += 1;\n }\n }\n }\n } else {\n if (!isHidden) {\n if (cache[base] === undefined) {\n // remember this URL if the use element was not empty and no request was sent\n cache[base] = true;\n } else if (cache[base].onload) {\n // if it turns out that prepending the SVG is not necessary,\n // abort the in-progress xhr.\n cache[base].abort();\n delete cache[base].onload;\n cache[base] = true;\n }\n } else if (base.length && cache[base]) {\n setTimeout(attrUpdateFunc({\n useEl: uses[i],\n base: base,\n hash: hash,\n isXlink: isXlink\n }), 0);\n }\n }\n }\n uses = \"\";\n inProgressCount += 1;\n observeIfDone();\n };\n var winLoad;\n winLoad = function () {\n window.removeEventListener(\"load\", winLoad, false); // to prevent memory leaks\n tid = setTimeout(checkUseElems, 0);\n };\n if (document.readyState !== \"complete\") {\n // The load event fires when all resources have finished loading, which allows detecting whether SVG use elements are empty.\n window.addEventListener(\"load\", winLoad, false);\n } else {\n // No need to add a listener if the document is already loaded, initialize immediately.\n winLoad();\n }\n }\n}());\n"}),(function(module,exports,__webpack_require__){(function($,jQuery){var _wkoSite=window._wkoSite||{};_wkoSite.screen_lg=1999;_wkoSite.screen_md=991;_wkoSite.screen_sm=767;_wkoSite.screen_xs=479;_wkoSite.handleResponsiveCollapsing=function(){"use strict";function handle_screenSize(className,width){var windowWidth=$(window).width();if(windowWidth<width){$(className).each(function(){$(this.getAttribute("href")).collapse('hide');})}
|
||
else{$(className).each(function(){$(this.getAttribute("href")).collapse('show');})}}
|
||
return{init:function(){handle_screenSize('.collapse-link--at-xs',_wkoSite.screen_sm);handle_screenSize('.collapse-link--at-sm',_wkoSite.screen_md);handle_screenSize('.collapse-link--at-md',_wkoSite.screen_lg);$(window).resize(function(){handle_screenSize('.collapse-link--at-xs',_wkoSite.screen_sm);handle_screenSize('.collapse-link--at-sm',_wkoSite.screen_md);handle_screenSize('.collapse-link--at-md',_wkoSite.screen_lg);});}}};_wkoSite.animateMainNavigation=function(){"use strict";var navbarToggle=$('.navbar-toggle');$('#main-navigation').on('shown.bs.collapse hidden.bs.collapse',function(e){if(e.type==='shown'){this.style.maxHeight='100%';}
|
||
else{this.style.maxHeight='none';}});$('#main-navigation .dropdown').on('shown.bs.dropdown hidden.bs.dropdown',function(e){if(!navbarToggle.is(':visible')){var height=0;if($(this).hasClass('open')){height=$(this).find('.dropdown-menu').outerHeight();$(this).find('.tfn-trigger').addClass('open-tfn');}
|
||
else{$(this).find('.tfn-trigger').removeClass('open-tfn');}
|
||
$('.tfn').css('transform','translate3d(0,'+height+'px, 0)');}});$('.dropdown-navigation').click(function(e){e.preventDefault();var isOpened=$(this.getAttribute('href')).parent().hasClass('open');var href=this.getAttribute("href");$('html, body').animate({scrollTop:0},500,function(){$(href).dropdown('toggle');});setTimeout(function(){if(isOpened==false){$(href).dropdown('toggle');}},500);});var didScroll;var lastScrollTop=0;var delta=30;var navbarHeight=$('.nav-section').outerHeight();if($(window).width()<=_wkoSite.screen_md){$(window).scroll(function(){didScroll=true;});setInterval(function(){if(didScroll){hasScrolled();didScroll=false;}},250);}
|
||
function hasScrolled(){if($('#header-collapse .collapse').hasClass('in')===true){$('.top-section .nav-section').css('position','static');return false;}
|
||
else{$('.top-section .nav-section').removeAttr('style');}
|
||
var st=$(document).scrollTop();if(st<delta){$('.nav-section').removeClass('nav-down').removeClass('nav-up');return;}
|
||
if(Math.abs(lastScrollTop-st)<=delta){return;}
|
||
if(st>lastScrollTop&&st>navbarHeight){$('.nav-section').removeClass('nav-down').addClass('nav-up');}else{if(st+$(window).height()<$(document).height()){$('.nav-section').removeClass('nav-up').addClass('nav-down');}}
|
||
lastScrollTop=st;}};_wkoSite.initScrollToBottomLinks=function(){"use strict";$('.scroll-to-bottom-link').click(function(e){e.preventDefault();setTimeout(function(){$("html, body").animate({scrollTop:$(document).height()},1000);},$(this).data('delay')?$(this).data('delay'):10);})};_wkoSite.initScrollToTopLinks=function(){"use strict";$('.link-to-top-inline').click(function(e){e.preventDefault();$('html, body').animate({scrollTop:$($(this).attr('href')).offset().top-50},500);});$('.link-to-top-global').click(function(e){e.preventDefault();$("html, body").animate({scrollTop:0},1000);});$(window).scroll(function(){if($(this).scrollTop()>500){$('#global-to-top').fadeIn();}else{$('#global-to-top').fadeOut();}});};_wkoSite.initScrollToSectionLinks=function(){"use strict";$('.scroll-to-section-link').click(function(e){e.preventDefault();$('html, body').animate({scrollTop:$($(this).attr('href')).offset().top-50},500);})};_wkoSite.initFilterlistByText=function(){"use strict";var filter,list;var slideSpeed=100;jQuery.expr[':'].Contains=function(a,i,m){return(a.textContent||a.innerText||"").toUpperCase().indexOf(m[3].toUpperCase())>=0;};function debounce(func,wait,immediate){var timeout;return function(){var context=this,args=arguments;var later=function(){timeout=null;if(!immediate)func.apply(context,args);};var callNow=immediate&&!timeout;clearTimeout(timeout);timeout=setTimeout(later,wait);if(callNow)func.apply(context,args);};};$('.filter-list').keyup(debounce(function(){filter=$(this).val();list=$(this).data('filterlist');if(filter){$(list).find(".grouped-list__content:not(:Contains("+filter+"))").parent().hide().closest('.grouped-list').hide();$(list).find(".grouped-list__content:Contains("+filter+")").parent().show().closest('.grouped-list').show();}else{$(list).find("li").show().closest('.grouped-list').show();}},500));};_wkoSite.handleWhatsAppLink=function(){"use strict";if(navigator.userAgent.match(/(iPhone)/g)){$(".whatsapp-link").fadeIn();}};module.exports=_wkoSite;}.call(exports,__webpack_require__(1),__webpack_require__(1)))}),(function(module,exports,__webpack_require__){var PhotoSwipe=__webpack_require__(50);var PhotoSwipeUI_Default=__webpack_require__(51);var initPhotoSwipeFromDOM=function(gallerySelector){var parseThumbnailElements=function(el){var thumbElements=el.childNodes,numNodes=thumbElements.length,items=[],el,childElements,thumbnailEl,size,item;for(var i=0;i<numNodes;i++){el=thumbElements[i];if(el.nodeType!==1){continue;}
|
||
childElements=el.children;size=el.getAttribute('data-size').split('x');item={src:el.getAttribute('href'),w:parseInt(size[0],10),h:parseInt(size[1],10),author:el.getAttribute('data-author')};item.el=el;if(childElements.length>0){item.msrc=childElements[0].getAttribute('src');if(childElements.length>1){item.title=childElements[1].innerHTML;}}
|
||
var mediumSrc=el.getAttribute('data-med');if(mediumSrc){size=el.getAttribute('data-med-size').split('x');item.m={src:mediumSrc,w:parseInt(size[0],10),h:parseInt(size[1],10)};}
|
||
item.o={src:item.src,w:item.w,h:item.h};items.push(item);}
|
||
return items;};var closest=function closest(el,fn){return el&&(fn(el)?el:closest(el.parentNode,fn));};var onThumbnailsClick=function(e){e=e||window.event;e.preventDefault?e.preventDefault():e.returnValue=false;var eTarget=e.target||e.srcElement;var clickedListItem=closest(eTarget,function(el){return el.tagName==='A';});if(!clickedListItem){return;}
|
||
var clickedGallery=clickedListItem.parentNode;var childNodes=clickedListItem.parentNode.childNodes,numChildNodes=childNodes.length,nodeIndex=0,index;for(var i=0;i<numChildNodes;i++){if(childNodes[i].nodeType!==1){continue;}
|
||
if(childNodes[i]===clickedListItem){index=nodeIndex;break;}
|
||
nodeIndex++;}
|
||
if(index>=0){openPhotoSwipe(index,clickedGallery);}
|
||
return false;};var photoswipeParseHash=function(){var hash=window.location.hash.substring(1),params={};if(hash.length<5){return params;}
|
||
var vars=hash.split('&');for(var i=0;i<vars.length;i++){if(!vars[i]){continue;}
|
||
var pair=vars[i].split('=');if(pair.length<2){continue;}
|
||
params[pair[0]]=pair[1];}
|
||
if(params.gid){params.gid=parseInt(params.gid,10);}
|
||
return params;};var openPhotoSwipe=function(index,galleryElement,disableAnimation,fromURL){var pswpElement=document.querySelectorAll('.pswp')[0],gallery,options,items;items=parseThumbnailElements(galleryElement);options={galleryUID:galleryElement.getAttribute('data-pswp-uid'),getThumbBoundsFn:function(index){var thumbnail=items[index].el.children[0],pageYScroll=window.pageYOffset||document.documentElement.scrollTop,rect=thumbnail.getBoundingClientRect();return{x:rect.left,y:rect.top+pageYScroll,w:rect.width};},addCaptionHTMLFn:function(item,captionEl,isFake){if(!item.title){captionEl.children[0].innerText='';return false;}
|
||
captionEl.children[0].innerHTML=item.title+'<br/><small>Photo: '+item.author+'</small>';return true;}};if(fromURL){if(options.galleryPIDs){for(var j=0;j<items.length;j++){if(items[j].pid==index){options.index=j;break;}}}else{options.index=parseInt(index,10)-1;}}else{options.index=parseInt(index,10);}
|
||
if(isNaN(options.index)){return;}
|
||
var radios=document.getElementsByName('gallery-style');for(var i=0,length=radios.length;i<length;i++){if(radios[i].checked){if(radios[i].id=='radio-all-controls'){}else if(radios[i].id=='radio-minimal-black'){options.mainClass='pswp--minimal--dark';options.barsSize={top:0,bottom:0};options.captionEl=false;options.fullscreenEl=false;options.shareEl=false;options.bgOpacity=0.85;options.tapToClose=true;options.tapToToggleControls=false;}
|
||
break;}}
|
||
if(disableAnimation){options.showAnimationDuration=0;}
|
||
gallery=new PhotoSwipe(pswpElement,PhotoSwipeUI_Default,items,options);var realViewportWidth,useLargeImages=false,firstResize=true,imageSrcWillChange;gallery.listen('beforeResize',function(){var dpiRatio=window.devicePixelRatio?window.devicePixelRatio:1;dpiRatio=Math.min(dpiRatio,2.5);realViewportWidth=gallery.viewportSize.x*dpiRatio;if(realViewportWidth>=1200||(!gallery.likelyTouchDevice&&realViewportWidth>800)||screen.width>1200){if(!useLargeImages){useLargeImages=true;imageSrcWillChange=true;}}else{if(useLargeImages){useLargeImages=false;imageSrcWillChange=true;}}
|
||
if(imageSrcWillChange&&!firstResize){gallery.invalidateCurrItems();}
|
||
if(firstResize){firstResize=false;}
|
||
imageSrcWillChange=false;});gallery.listen('gettingData',function(index,item){if(useLargeImages){item.src=item.o.src;item.w=item.o.w;item.h=item.o.h;}else{item.src=item.m.src;item.w=item.m.w;item.h=item.m.h;}});gallery.init();};var galleryElements=document.querySelectorAll(gallerySelector);for(var i=0,l=galleryElements.length;i<l;i++){galleryElements[i].setAttribute('data-pswp-uid',i+1);galleryElements[i].onclick=onThumbnailsClick;}
|
||
var hashData=photoswipeParseHash();if(hashData.pid&&hashData.gid){openPhotoSwipe(hashData.pid,galleryElements[hashData.gid-1],true,true);}};module.exports=initPhotoSwipeFromDOM;}),(function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_FACTORY__,__WEBPACK_AMD_DEFINE_RESULT__;
|
||
/*! PhotoSwipe - v4.1.2 - 2017-04-05
|
||
* http://photoswipe.com
|
||
* Copyright (c) 2017 Dmitry Semenov; */
|
||
(function(root,factory){if(true){!(__WEBPACK_AMD_DEFINE_FACTORY__=(factory),__WEBPACK_AMD_DEFINE_RESULT__=(typeof __WEBPACK_AMD_DEFINE_FACTORY__==='function'?(__WEBPACK_AMD_DEFINE_FACTORY__.call(exports,__webpack_require__,exports,module)):__WEBPACK_AMD_DEFINE_FACTORY__),__WEBPACK_AMD_DEFINE_RESULT__!==undefined&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__));}else if(typeof exports==='object'){module.exports=factory();}else{root.PhotoSwipe=factory();}})(this,function(){'use strict';var PhotoSwipe=function(template,UiClass,items,options){var framework={features:null,bind:function(target,type,listener,unbind){var methodName=(unbind?'remove':'add')+'EventListener';type=type.split(' ');for(var i=0;i<type.length;i++){if(type[i]){target[methodName](type[i],listener,false);}}},isArray:function(obj){return(obj instanceof Array);},createEl:function(classes,tag){var el=document.createElement(tag||'div');if(classes){el.className=classes;}
|
||
return el;},getScrollY:function(){var yOffset=window.pageYOffset;return yOffset!==undefined?yOffset:document.documentElement.scrollTop;},unbind:function(target,type,listener){framework.bind(target,type,listener,true);},removeClass:function(el,className){var reg=new RegExp('(\\s|^)'+className+'(\\s|$)');el.className=el.className.replace(reg,' ').replace(/^\s\s*/,'').replace(/\s\s*$/,'');},addClass:function(el,className){if(!framework.hasClass(el,className)){el.className+=(el.className?' ':'')+className;}},hasClass:function(el,className){return el.className&&new RegExp('(^|\\s)'+className+'(\\s|$)').test(el.className);},getChildByClass:function(parentEl,childClassName){var node=parentEl.firstChild;while(node){if(framework.hasClass(node,childClassName)){return node;}
|
||
node=node.nextSibling;}},arraySearch:function(array,value,key){var i=array.length;while(i--){if(array[i][key]===value){return i;}}
|
||
return-1;},extend:function(o1,o2,preventOverwrite){for(var prop in o2){if(o2.hasOwnProperty(prop)){if(preventOverwrite&&o1.hasOwnProperty(prop)){continue;}
|
||
o1[prop]=o2[prop];}}},easing:{sine:{out:function(k){return Math.sin(k*(Math.PI/2));},inOut:function(k){return-(Math.cos(Math.PI*k)-1)/2;}},cubic:{out:function(k){return--k*k*k+1;}}},detectFeatures:function(){if(framework.features){return framework.features;}
|
||
var helperEl=framework.createEl(),helperStyle=helperEl.style,vendor='',features={};features.oldIE=document.all&&!document.addEventListener;features.touch='ontouchstart'in window;if(window.requestAnimationFrame){features.raf=window.requestAnimationFrame;features.caf=window.cancelAnimationFrame;}
|
||
features.pointerEvent=navigator.pointerEnabled||navigator.msPointerEnabled;if(!features.pointerEvent){var ua=navigator.userAgent;if(/iP(hone|od)/.test(navigator.platform)){var v=(navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/);if(v&&v.length>0){v=parseInt(v[1],10);if(v>=1&&v<8){features.isOldIOSPhone=true;}}}
|
||
var match=ua.match(/Android\s([0-9\.]*)/);var androidversion=match?match[1]:0;androidversion=parseFloat(androidversion);if(androidversion>=1){if(androidversion<4.4){features.isOldAndroid=true;}
|
||
features.androidVersion=androidversion;}
|
||
features.isMobileOpera=/opera mini|opera mobi/i.test(ua);}
|
||
var styleChecks=['transform','perspective','animationName'],vendors=['','webkit','Moz','ms','O'],styleCheckItem,styleName;for(var i=0;i<4;i++){vendor=vendors[i];for(var a=0;a<3;a++){styleCheckItem=styleChecks[a];styleName=vendor+(vendor?styleCheckItem.charAt(0).toUpperCase()+styleCheckItem.slice(1):styleCheckItem);if(!features[styleCheckItem]&&styleName in helperStyle){features[styleCheckItem]=styleName;}}
|
||
if(vendor&&!features.raf){vendor=vendor.toLowerCase();features.raf=window[vendor+'RequestAnimationFrame'];if(features.raf){features.caf=window[vendor+'CancelAnimationFrame']||window[vendor+'CancelRequestAnimationFrame'];}}}
|
||
if(!features.raf){var lastTime=0;features.raf=function(fn){var currTime=new Date().getTime();var timeToCall=Math.max(0,16-(currTime-lastTime));var id=window.setTimeout(function(){fn(currTime+timeToCall);},timeToCall);lastTime=currTime+timeToCall;return id;};features.caf=function(id){clearTimeout(id);};}
|
||
features.svg=!!document.createElementNS&&!!document.createElementNS('http://www.w3.org/2000/svg','svg').createSVGRect;framework.features=features;return features;}};framework.detectFeatures();if(framework.features.oldIE){framework.bind=function(target,type,listener,unbind){type=type.split(' ');var methodName=(unbind?'detach':'attach')+'Event',evName,_handleEv=function(){listener.handleEvent.call(listener);};for(var i=0;i<type.length;i++){evName=type[i];if(evName){if(typeof listener==='object'&&listener.handleEvent){if(!unbind){listener['oldIE'+evName]=_handleEv;}else{if(!listener['oldIE'+evName]){return false;}}
|
||
target[methodName]('on'+evName,listener['oldIE'+evName]);}else{target[methodName]('on'+evName,listener);}}}};}
|
||
var self=this;var DOUBLE_TAP_RADIUS=25,NUM_HOLDERS=3;var _options={allowPanToNext:true,spacing:0.12,bgOpacity:1,mouseUsed:false,loop:true,pinchToClose:true,closeOnScroll:true,closeOnVerticalDrag:true,verticalDragRange:0.75,hideAnimationDuration:333,showAnimationDuration:333,showHideOpacity:false,focus:true,escKey:true,arrowKeys:true,mainScrollEndFriction:0.35,panEndFriction:0.35,isClickableElement:function(el){return el.tagName==='A';},getDoubleTapZoom:function(isMouseClick,item){if(isMouseClick){return 1;}else{return item.initialZoomLevel<0.7?1:1.33;}},maxSpreadZoom:1.33,modal:true,scaleMode:'fit'};framework.extend(_options,options);var _getEmptyPoint=function(){return{x:0,y:0};};var _isOpen,_isDestroying,_closedByScroll,_currentItemIndex,_containerStyle,_containerShiftIndex,_currPanDist=_getEmptyPoint(),_startPanOffset=_getEmptyPoint(),_panOffset=_getEmptyPoint(),_upMoveEvents,_downEvents,_globalEventHandlers,_viewportSize={},_currZoomLevel,_startZoomLevel,_translatePrefix,_translateSufix,_updateSizeInterval,_itemsNeedUpdate,_currPositionIndex=0,_offset={},_slideSize=_getEmptyPoint(),_itemHolders,_prevItemIndex,_indexDiff=0,_dragStartEvent,_dragMoveEvent,_dragEndEvent,_dragCancelEvent,_transformKey,_pointerEventEnabled,_isFixedPosition=true,_likelyTouchDevice,_modules=[],_requestAF,_cancelAF,_initalClassName,_initalWindowScrollY,_oldIE,_currentWindowScrollY,_features,_windowVisibleSize={},_renderMaxResolution=false,_orientationChangeTimeout,_registerModule=function(name,module){framework.extend(self,module.publicMethods);_modules.push(name);},_getLoopedId=function(index){var numSlides=_getNumItems();if(index>numSlides-1){return index-numSlides;}else if(index<0){return numSlides+index;}
|
||
return index;},_listeners={},_listen=function(name,fn){if(!_listeners[name]){_listeners[name]=[];}
|
||
return _listeners[name].push(fn);},_shout=function(name){var listeners=_listeners[name];if(listeners){var args=Array.prototype.slice.call(arguments);args.shift();for(var i=0;i<listeners.length;i++){listeners[i].apply(self,args);}}},_getCurrentTime=function(){return new Date().getTime();},_applyBgOpacity=function(opacity){_bgOpacity=opacity;self.bg.style.opacity=opacity*_options.bgOpacity;},_applyZoomTransform=function(styleObj,x,y,zoom,item){if(!_renderMaxResolution||(item&&item!==self.currItem)){zoom=zoom/(item?item.fitRatio:self.currItem.fitRatio);}
|
||
styleObj[_transformKey]=_translatePrefix+x+'px, '+y+'px'+_translateSufix+' scale('+zoom+')';},_applyCurrentZoomPan=function(allowRenderResolution){if(_currZoomElementStyle){if(allowRenderResolution){if(_currZoomLevel>self.currItem.fitRatio){if(!_renderMaxResolution){_setImageSize(self.currItem,false,true);_renderMaxResolution=true;}}else{if(_renderMaxResolution){_setImageSize(self.currItem);_renderMaxResolution=false;}}}
|
||
_applyZoomTransform(_currZoomElementStyle,_panOffset.x,_panOffset.y,_currZoomLevel);}},_applyZoomPanToItem=function(item){if(item.container){_applyZoomTransform(item.container.style,item.initialPosition.x,item.initialPosition.y,item.initialZoomLevel,item);}},_setTranslateX=function(x,elStyle){elStyle[_transformKey]=_translatePrefix+x+'px, 0px'+_translateSufix;},_moveMainScroll=function(x,dragging){if(!_options.loop&&dragging){var newSlideIndexOffset=_currentItemIndex+(_slideSize.x*_currPositionIndex-x)/_slideSize.x,delta=Math.round(x-_mainScrollPos.x);if((newSlideIndexOffset<0&&delta>0)||(newSlideIndexOffset>=_getNumItems()-1&&delta<0)){x=_mainScrollPos.x+delta*_options.mainScrollEndFriction;}}
|
||
_mainScrollPos.x=x;_setTranslateX(x,_containerStyle);},_calculatePanOffset=function(axis,zoomLevel){var m=_midZoomPoint[axis]-_offset[axis];return _startPanOffset[axis]+_currPanDist[axis]+m-m*(zoomLevel/_startZoomLevel);},_equalizePoints=function(p1,p2){p1.x=p2.x;p1.y=p2.y;if(p2.id){p1.id=p2.id;}},_roundPoint=function(p){p.x=Math.round(p.x);p.y=Math.round(p.y);},_mouseMoveTimeout=null,_onFirstMouseMove=function(){if(_mouseMoveTimeout){framework.unbind(document,'mousemove',_onFirstMouseMove);framework.addClass(template,'pswp--has_mouse');_options.mouseUsed=true;_shout('mouseUsed');}
|
||
_mouseMoveTimeout=setTimeout(function(){_mouseMoveTimeout=null;},100);},_bindEvents=function(){framework.bind(document,'keydown',self);if(_features.transform){framework.bind(self.scrollWrap,'click',self);}
|
||
if(!_options.mouseUsed){framework.bind(document,'mousemove',_onFirstMouseMove);}
|
||
framework.bind(window,'resize scroll orientationchange',self);_shout('bindEvents');},_unbindEvents=function(){framework.unbind(window,'resize scroll orientationchange',self);framework.unbind(window,'scroll',_globalEventHandlers.scroll);framework.unbind(document,'keydown',self);framework.unbind(document,'mousemove',_onFirstMouseMove);if(_features.transform){framework.unbind(self.scrollWrap,'click',self);}
|
||
if(_isDragging){framework.unbind(window,_upMoveEvents,self);}
|
||
clearTimeout(_orientationChangeTimeout);_shout('unbindEvents');},_calculatePanBounds=function(zoomLevel,update){var bounds=_calculateItemSize(self.currItem,_viewportSize,zoomLevel);if(update){_currPanBounds=bounds;}
|
||
return bounds;},_getMinZoomLevel=function(item){if(!item){item=self.currItem;}
|
||
return item.initialZoomLevel;},_getMaxZoomLevel=function(item){if(!item){item=self.currItem;}
|
||
return item.w>0?_options.maxSpreadZoom:1;},_modifyDestPanOffset=function(axis,destPanBounds,destPanOffset,destZoomLevel){if(destZoomLevel===self.currItem.initialZoomLevel){destPanOffset[axis]=self.currItem.initialPosition[axis];return true;}else{destPanOffset[axis]=_calculatePanOffset(axis,destZoomLevel);if(destPanOffset[axis]>destPanBounds.min[axis]){destPanOffset[axis]=destPanBounds.min[axis];return true;}else if(destPanOffset[axis]<destPanBounds.max[axis]){destPanOffset[axis]=destPanBounds.max[axis];return true;}}
|
||
return false;},_setupTransforms=function(){if(_transformKey){var allow3dTransform=_features.perspective&&!_likelyTouchDevice;_translatePrefix='translate'+(allow3dTransform?'3d(':'(');_translateSufix=_features.perspective?', 0px)':')';return;}
|
||
_transformKey='left';framework.addClass(template,'pswp--ie');_setTranslateX=function(x,elStyle){elStyle.left=x+'px';};_applyZoomPanToItem=function(item){var zoomRatio=item.fitRatio>1?1:item.fitRatio,s=item.container.style,w=zoomRatio*item.w,h=zoomRatio*item.h;s.width=w+'px';s.height=h+'px';s.left=item.initialPosition.x+'px';s.top=item.initialPosition.y+'px';};_applyCurrentZoomPan=function(){if(_currZoomElementStyle){var s=_currZoomElementStyle,item=self.currItem,zoomRatio=item.fitRatio>1?1:item.fitRatio,w=zoomRatio*item.w,h=zoomRatio*item.h;s.width=w+'px';s.height=h+'px';s.left=_panOffset.x+'px';s.top=_panOffset.y+'px';}};},_onKeyDown=function(e){var keydownAction='';if(_options.escKey&&e.keyCode===27){keydownAction='close';}else if(_options.arrowKeys){if(e.keyCode===37){keydownAction='prev';}else if(e.keyCode===39){keydownAction='next';}}
|
||
if(keydownAction){if(!e.ctrlKey&&!e.altKey&&!e.shiftKey&&!e.metaKey){if(e.preventDefault){e.preventDefault();}else{e.returnValue=false;}
|
||
self[keydownAction]();}}},_onGlobalClick=function(e){if(!e){return;}
|
||
if(_moved||_zoomStarted||_mainScrollAnimating||_verticalDragInitiated){e.preventDefault();e.stopPropagation();}},_updatePageScrollOffset=function(){self.setScrollOffset(0,framework.getScrollY());};var _animations={},_numAnimations=0,_stopAnimation=function(name){if(_animations[name]){if(_animations[name].raf){_cancelAF(_animations[name].raf);}
|
||
_numAnimations--;delete _animations[name];}},_registerStartAnimation=function(name){if(_animations[name]){_stopAnimation(name);}
|
||
if(!_animations[name]){_numAnimations++;_animations[name]={};}},_stopAllAnimations=function(){for(var prop in _animations){if(_animations.hasOwnProperty(prop)){_stopAnimation(prop);}}},_animateProp=function(name,b,endProp,d,easingFn,onUpdate,onComplete){var startAnimTime=_getCurrentTime(),t;_registerStartAnimation(name);var animloop=function(){if(_animations[name]){t=_getCurrentTime()-startAnimTime;if(t>=d){_stopAnimation(name);onUpdate(endProp);if(onComplete){onComplete();}
|
||
return;}
|
||
onUpdate((endProp-b)*easingFn(t/d)+b);_animations[name].raf=_requestAF(animloop);}};animloop();};var publicMethods={shout:_shout,listen:_listen,viewportSize:_viewportSize,options:_options,isMainScrollAnimating:function(){return _mainScrollAnimating;},getZoomLevel:function(){return _currZoomLevel;},getCurrentIndex:function(){return _currentItemIndex;},isDragging:function(){return _isDragging;},isZooming:function(){return _isZooming;},setScrollOffset:function(x,y){_offset.x=x;_currentWindowScrollY=_offset.y=y;_shout('updateScrollOffset',_offset);},applyZoomPan:function(zoomLevel,panX,panY,allowRenderResolution){_panOffset.x=panX;_panOffset.y=panY;_currZoomLevel=zoomLevel;_applyCurrentZoomPan(allowRenderResolution);},init:function(){if(_isOpen||_isDestroying){return;}
|
||
var i;self.framework=framework;self.template=template;self.bg=framework.getChildByClass(template,'pswp__bg');_initalClassName=template.className;_isOpen=true;_features=framework.detectFeatures();_requestAF=_features.raf;_cancelAF=_features.caf;_transformKey=_features.transform;_oldIE=_features.oldIE;self.scrollWrap=framework.getChildByClass(template,'pswp__scroll-wrap');self.container=framework.getChildByClass(self.scrollWrap,'pswp__container');_containerStyle=self.container.style;self.itemHolders=_itemHolders=[{el:self.container.children[0],wrap:0,index:-1},{el:self.container.children[1],wrap:0,index:-1},{el:self.container.children[2],wrap:0,index:-1}];_itemHolders[0].el.style.display=_itemHolders[2].el.style.display='none';_setupTransforms();_globalEventHandlers={resize:self.updateSize,orientationchange:function(){clearTimeout(_orientationChangeTimeout);_orientationChangeTimeout=setTimeout(function(){if(_viewportSize.x!==self.scrollWrap.clientWidth){self.updateSize();}},500);},scroll:_updatePageScrollOffset,keydown:_onKeyDown,click:_onGlobalClick};var oldPhone=_features.isOldIOSPhone||_features.isOldAndroid||_features.isMobileOpera;if(!_features.animationName||!_features.transform||oldPhone){_options.showAnimationDuration=_options.hideAnimationDuration=0;}
|
||
for(i=0;i<_modules.length;i++){self['init'+_modules[i]]();}
|
||
if(UiClass){var ui=self.ui=new UiClass(self,framework);ui.init();}
|
||
_shout('firstUpdate');_currentItemIndex=_currentItemIndex||_options.index||0;if(isNaN(_currentItemIndex)||_currentItemIndex<0||_currentItemIndex>=_getNumItems()){_currentItemIndex=0;}
|
||
self.currItem=_getItemAt(_currentItemIndex);if(_features.isOldIOSPhone||_features.isOldAndroid){_isFixedPosition=false;}
|
||
template.setAttribute('aria-hidden','false');if(_options.modal){if(!_isFixedPosition){template.style.position='absolute';template.style.top=framework.getScrollY()+'px';}else{template.style.position='fixed';}}
|
||
if(_currentWindowScrollY===undefined){_shout('initialLayout');_currentWindowScrollY=_initalWindowScrollY=framework.getScrollY();}
|
||
var rootClasses='pswp--open ';if(_options.mainClass){rootClasses+=_options.mainClass+' ';}
|
||
if(_options.showHideOpacity){rootClasses+='pswp--animate_opacity ';}
|
||
rootClasses+=_likelyTouchDevice?'pswp--touch':'pswp--notouch';rootClasses+=_features.animationName?' pswp--css_animation':'';rootClasses+=_features.svg?' pswp--svg':'';framework.addClass(template,rootClasses);self.updateSize();_containerShiftIndex=-1;_indexDiff=null;for(i=0;i<NUM_HOLDERS;i++){_setTranslateX((i+_containerShiftIndex)*_slideSize.x,_itemHolders[i].el.style);}
|
||
if(!_oldIE){framework.bind(self.scrollWrap,_downEvents,self);}
|
||
_listen('initialZoomInEnd',function(){self.setContent(_itemHolders[0],_currentItemIndex-1);self.setContent(_itemHolders[2],_currentItemIndex+1);_itemHolders[0].el.style.display=_itemHolders[2].el.style.display='block';if(_options.focus){template.focus();}
|
||
_bindEvents();});self.setContent(_itemHolders[1],_currentItemIndex);self.updateCurrItem();_shout('afterInit');if(!_isFixedPosition){_updateSizeInterval=setInterval(function(){if(!_numAnimations&&!_isDragging&&!_isZooming&&(_currZoomLevel===self.currItem.initialZoomLevel)){self.updateSize();}},1000);}
|
||
framework.addClass(template,'pswp--visible');},close:function(){if(!_isOpen){return;}
|
||
_isOpen=false;_isDestroying=true;_shout('close');_unbindEvents();_showOrHide(self.currItem,null,true,self.destroy);},destroy:function(){_shout('destroy');if(_showOrHideTimeout){clearTimeout(_showOrHideTimeout);}
|
||
template.setAttribute('aria-hidden','true');template.className=_initalClassName;if(_updateSizeInterval){clearInterval(_updateSizeInterval);}
|
||
framework.unbind(self.scrollWrap,_downEvents,self);framework.unbind(window,'scroll',self);_stopDragUpdateLoop();_stopAllAnimations();_listeners=null;},panTo:function(x,y,force){if(!force){if(x>_currPanBounds.min.x){x=_currPanBounds.min.x;}else if(x<_currPanBounds.max.x){x=_currPanBounds.max.x;}
|
||
if(y>_currPanBounds.min.y){y=_currPanBounds.min.y;}else if(y<_currPanBounds.max.y){y=_currPanBounds.max.y;}}
|
||
_panOffset.x=x;_panOffset.y=y;_applyCurrentZoomPan();},handleEvent:function(e){e=e||window.event;if(_globalEventHandlers[e.type]){_globalEventHandlers[e.type](e);}},goTo:function(index){index=_getLoopedId(index);var diff=index-_currentItemIndex;_indexDiff=diff;_currentItemIndex=index;self.currItem=_getItemAt(_currentItemIndex);_currPositionIndex-=diff;_moveMainScroll(_slideSize.x*_currPositionIndex);_stopAllAnimations();_mainScrollAnimating=false;self.updateCurrItem();},next:function(){self.goTo(_currentItemIndex+1);},prev:function(){self.goTo(_currentItemIndex-1);},updateCurrZoomItem:function(emulateSetContent){if(emulateSetContent){_shout('beforeChange',0);}
|
||
if(_itemHolders[1].el.children.length){var zoomElement=_itemHolders[1].el.children[0];if(framework.hasClass(zoomElement,'pswp__zoom-wrap')){_currZoomElementStyle=zoomElement.style;}else{_currZoomElementStyle=null;}}else{_currZoomElementStyle=null;}
|
||
_currPanBounds=self.currItem.bounds;_startZoomLevel=_currZoomLevel=self.currItem.initialZoomLevel;_panOffset.x=_currPanBounds.center.x;_panOffset.y=_currPanBounds.center.y;if(emulateSetContent){_shout('afterChange');}},invalidateCurrItems:function(){_itemsNeedUpdate=true;for(var i=0;i<NUM_HOLDERS;i++){if(_itemHolders[i].item){_itemHolders[i].item.needsUpdate=true;}}},updateCurrItem:function(beforeAnimation){if(_indexDiff===0){return;}
|
||
var diffAbs=Math.abs(_indexDiff),tempHolder;if(beforeAnimation&&diffAbs<2){return;}
|
||
self.currItem=_getItemAt(_currentItemIndex);_renderMaxResolution=false;_shout('beforeChange',_indexDiff);if(diffAbs>=NUM_HOLDERS){_containerShiftIndex+=_indexDiff+(_indexDiff>0?-NUM_HOLDERS:NUM_HOLDERS);diffAbs=NUM_HOLDERS;}
|
||
for(var i=0;i<diffAbs;i++){if(_indexDiff>0){tempHolder=_itemHolders.shift();_itemHolders[NUM_HOLDERS-1]=tempHolder;_containerShiftIndex++;_setTranslateX((_containerShiftIndex+2)*_slideSize.x,tempHolder.el.style);self.setContent(tempHolder,_currentItemIndex-diffAbs+i+1+1);}else{tempHolder=_itemHolders.pop();_itemHolders.unshift(tempHolder);_containerShiftIndex--;_setTranslateX(_containerShiftIndex*_slideSize.x,tempHolder.el.style);self.setContent(tempHolder,_currentItemIndex+diffAbs-i-1-1);}}
|
||
if(_currZoomElementStyle&&Math.abs(_indexDiff)===1){var prevItem=_getItemAt(_prevItemIndex);if(prevItem.initialZoomLevel!==_currZoomLevel){_calculateItemSize(prevItem,_viewportSize);_setImageSize(prevItem);_applyZoomPanToItem(prevItem);}}
|
||
_indexDiff=0;self.updateCurrZoomItem();_prevItemIndex=_currentItemIndex;_shout('afterChange');},updateSize:function(force){if(!_isFixedPosition&&_options.modal){var windowScrollY=framework.getScrollY();if(_currentWindowScrollY!==windowScrollY){template.style.top=windowScrollY+'px';_currentWindowScrollY=windowScrollY;}
|
||
if(!force&&_windowVisibleSize.x===window.innerWidth&&_windowVisibleSize.y===window.innerHeight){return;}
|
||
_windowVisibleSize.x=window.innerWidth;_windowVisibleSize.y=window.innerHeight;template.style.height=_windowVisibleSize.y+'px';}
|
||
_viewportSize.x=self.scrollWrap.clientWidth;_viewportSize.y=self.scrollWrap.clientHeight;_updatePageScrollOffset();_slideSize.x=_viewportSize.x+Math.round(_viewportSize.x*_options.spacing);_slideSize.y=_viewportSize.y;_moveMainScroll(_slideSize.x*_currPositionIndex);_shout('beforeResize');if(_containerShiftIndex!==undefined){var holder,item,hIndex;for(var i=0;i<NUM_HOLDERS;i++){holder=_itemHolders[i];_setTranslateX((i+_containerShiftIndex)*_slideSize.x,holder.el.style);hIndex=_currentItemIndex+i-1;if(_options.loop&&_getNumItems()>2){hIndex=_getLoopedId(hIndex);}
|
||
item=_getItemAt(hIndex);if(item&&(_itemsNeedUpdate||item.needsUpdate||!item.bounds)){self.cleanSlide(item);self.setContent(holder,hIndex);if(i===1){self.currItem=item;self.updateCurrZoomItem(true);}
|
||
item.needsUpdate=false;}else if(holder.index===-1&&hIndex>=0){self.setContent(holder,hIndex);}
|
||
if(item&&item.container){_calculateItemSize(item,_viewportSize);_setImageSize(item);_applyZoomPanToItem(item);}}
|
||
_itemsNeedUpdate=false;}
|
||
_startZoomLevel=_currZoomLevel=self.currItem.initialZoomLevel;_currPanBounds=self.currItem.bounds;if(_currPanBounds){_panOffset.x=_currPanBounds.center.x;_panOffset.y=_currPanBounds.center.y;_applyCurrentZoomPan(true);}
|
||
_shout('resize');},zoomTo:function(destZoomLevel,centerPoint,speed,easingFn,updateFn){if(centerPoint){_startZoomLevel=_currZoomLevel;_midZoomPoint.x=Math.abs(centerPoint.x)-_panOffset.x;_midZoomPoint.y=Math.abs(centerPoint.y)-_panOffset.y;_equalizePoints(_startPanOffset,_panOffset);}
|
||
var destPanBounds=_calculatePanBounds(destZoomLevel,false),destPanOffset={};_modifyDestPanOffset('x',destPanBounds,destPanOffset,destZoomLevel);_modifyDestPanOffset('y',destPanBounds,destPanOffset,destZoomLevel);var initialZoomLevel=_currZoomLevel;var initialPanOffset={x:_panOffset.x,y:_panOffset.y};_roundPoint(destPanOffset);var onUpdate=function(now){if(now===1){_currZoomLevel=destZoomLevel;_panOffset.x=destPanOffset.x;_panOffset.y=destPanOffset.y;}else{_currZoomLevel=(destZoomLevel-initialZoomLevel)*now+initialZoomLevel;_panOffset.x=(destPanOffset.x-initialPanOffset.x)*now+initialPanOffset.x;_panOffset.y=(destPanOffset.y-initialPanOffset.y)*now+initialPanOffset.y;}
|
||
if(updateFn){updateFn(now);}
|
||
_applyCurrentZoomPan(now===1);};if(speed){_animateProp('customZoomTo',0,1,speed,easingFn||framework.easing.sine.inOut,onUpdate);}else{onUpdate(1);}}};var MIN_SWIPE_DISTANCE=30,DIRECTION_CHECK_OFFSET=10;var _gestureStartTime,_gestureCheckSpeedTime,p={},p2={},delta={},_currPoint={},_startPoint={},_currPointers=[],_startMainScrollPos={},_releaseAnimData,_posPoints=[],_tempPoint={},_isZoomingIn,_verticalDragInitiated,_oldAndroidTouchEndTimeout,_currZoomedItemIndex=0,_centerPoint=_getEmptyPoint(),_lastReleaseTime=0,_isDragging,_isMultitouch,_zoomStarted,_moved,_dragAnimFrame,_mainScrollShifted,_currentPoints,_isZooming,_currPointsDistance,_startPointsDistance,_currPanBounds,_mainScrollPos=_getEmptyPoint(),_currZoomElementStyle,_mainScrollAnimating,_midZoomPoint=_getEmptyPoint(),_currCenterPoint=_getEmptyPoint(),_direction,_isFirstMove,_opacityChanged,_bgOpacity,_wasOverInitialZoom,_isEqualPoints=function(p1,p2){return p1.x===p2.x&&p1.y===p2.y;},_isNearbyPoints=function(touch0,touch1){return Math.abs(touch0.x-touch1.x)<DOUBLE_TAP_RADIUS&&Math.abs(touch0.y-touch1.y)<DOUBLE_TAP_RADIUS;},_calculatePointsDistance=function(p1,p2){_tempPoint.x=Math.abs(p1.x-p2.x);_tempPoint.y=Math.abs(p1.y-p2.y);return Math.sqrt(_tempPoint.x*_tempPoint.x+_tempPoint.y*_tempPoint.y);},_stopDragUpdateLoop=function(){if(_dragAnimFrame){_cancelAF(_dragAnimFrame);_dragAnimFrame=null;}},_dragUpdateLoop=function(){if(_isDragging){_dragAnimFrame=_requestAF(_dragUpdateLoop);_renderMovement();}},_canPan=function(){return!(_options.scaleMode==='fit'&&_currZoomLevel===self.currItem.initialZoomLevel);},_closestElement=function(el,fn){if(!el||el===document){return false;}
|
||
if(el.getAttribute('class')&&el.getAttribute('class').indexOf('pswp__scroll-wrap')>-1){return false;}
|
||
if(fn(el)){return el;}
|
||
return _closestElement(el.parentNode,fn);},_preventObj={},_preventDefaultEventBehaviour=function(e,isDown){_preventObj.prevent=!_closestElement(e.target,_options.isClickableElement);_shout('preventDragEvent',e,isDown,_preventObj);return _preventObj.prevent;},_convertTouchToPoint=function(touch,p){p.x=touch.pageX;p.y=touch.pageY;p.id=touch.identifier;return p;},_findCenterOfPoints=function(p1,p2,pCenter){pCenter.x=(p1.x+p2.x)*0.5;pCenter.y=(p1.y+p2.y)*0.5;},_pushPosPoint=function(time,x,y){if(time-_gestureCheckSpeedTime>50){var o=_posPoints.length>2?_posPoints.shift():{};o.x=x;o.y=y;_posPoints.push(o);_gestureCheckSpeedTime=time;}},_calculateVerticalDragOpacityRatio=function(){var yOffset=_panOffset.y-self.currItem.initialPosition.y;return 1-Math.abs(yOffset/(_viewportSize.y/2));},_ePoint1={},_ePoint2={},_tempPointsArr=[],_tempCounter,_getTouchPoints=function(e){while(_tempPointsArr.length>0){_tempPointsArr.pop();}
|
||
if(!_pointerEventEnabled){if(e.type.indexOf('touch')>-1){if(e.touches&&e.touches.length>0){_tempPointsArr[0]=_convertTouchToPoint(e.touches[0],_ePoint1);if(e.touches.length>1){_tempPointsArr[1]=_convertTouchToPoint(e.touches[1],_ePoint2);}}}else{_ePoint1.x=e.pageX;_ePoint1.y=e.pageY;_ePoint1.id='';_tempPointsArr[0]=_ePoint1;}}else{_tempCounter=0;_currPointers.forEach(function(p){if(_tempCounter===0){_tempPointsArr[0]=p;}else if(_tempCounter===1){_tempPointsArr[1]=p;}
|
||
_tempCounter++;});}
|
||
return _tempPointsArr;},_panOrMoveMainScroll=function(axis,delta){var panFriction,overDiff=0,newOffset=_panOffset[axis]+delta[axis],startOverDiff,dir=delta[axis]>0,newMainScrollPosition=_mainScrollPos.x+delta.x,mainScrollDiff=_mainScrollPos.x-_startMainScrollPos.x,newPanPos,newMainScrollPos;if(newOffset>_currPanBounds.min[axis]||newOffset<_currPanBounds.max[axis]){panFriction=_options.panEndFriction;}else{panFriction=1;}
|
||
newOffset=_panOffset[axis]+delta[axis]*panFriction;if(_options.allowPanToNext||_currZoomLevel===self.currItem.initialZoomLevel){if(!_currZoomElementStyle){newMainScrollPos=newMainScrollPosition;}else if(_direction==='h'&&axis==='x'&&!_zoomStarted){if(dir){if(newOffset>_currPanBounds.min[axis]){panFriction=_options.panEndFriction;overDiff=_currPanBounds.min[axis]-newOffset;startOverDiff=_currPanBounds.min[axis]-_startPanOffset[axis];}
|
||
if((startOverDiff<=0||mainScrollDiff<0)&&_getNumItems()>1){newMainScrollPos=newMainScrollPosition;if(mainScrollDiff<0&&newMainScrollPosition>_startMainScrollPos.x){newMainScrollPos=_startMainScrollPos.x;}}else{if(_currPanBounds.min.x!==_currPanBounds.max.x){newPanPos=newOffset;}}}else{if(newOffset<_currPanBounds.max[axis]){panFriction=_options.panEndFriction;overDiff=newOffset-_currPanBounds.max[axis];startOverDiff=_startPanOffset[axis]-_currPanBounds.max[axis];}
|
||
if((startOverDiff<=0||mainScrollDiff>0)&&_getNumItems()>1){newMainScrollPos=newMainScrollPosition;if(mainScrollDiff>0&&newMainScrollPosition<_startMainScrollPos.x){newMainScrollPos=_startMainScrollPos.x;}}else{if(_currPanBounds.min.x!==_currPanBounds.max.x){newPanPos=newOffset;}}}}
|
||
if(axis==='x'){if(newMainScrollPos!==undefined){_moveMainScroll(newMainScrollPos,true);if(newMainScrollPos===_startMainScrollPos.x){_mainScrollShifted=false;}else{_mainScrollShifted=true;}}
|
||
if(_currPanBounds.min.x!==_currPanBounds.max.x){if(newPanPos!==undefined){_panOffset.x=newPanPos;}else if(!_mainScrollShifted){_panOffset.x+=delta.x*panFriction;}}
|
||
return newMainScrollPos!==undefined;}}
|
||
if(!_mainScrollAnimating){if(!_mainScrollShifted){if(_currZoomLevel>self.currItem.fitRatio){_panOffset[axis]+=delta[axis]*panFriction;}}}},_onDragStart=function(e){if(e.type==='mousedown'&&e.button>0){return;}
|
||
if(_initialZoomRunning){e.preventDefault();return;}
|
||
if(_oldAndroidTouchEndTimeout&&e.type==='mousedown'){return;}
|
||
if(_preventDefaultEventBehaviour(e,true)){e.preventDefault();}
|
||
_shout('pointerDown');if(_pointerEventEnabled){var pointerIndex=framework.arraySearch(_currPointers,e.pointerId,'id');if(pointerIndex<0){pointerIndex=_currPointers.length;}
|
||
_currPointers[pointerIndex]={x:e.pageX,y:e.pageY,id:e.pointerId};}
|
||
var startPointsList=_getTouchPoints(e),numPoints=startPointsList.length;_currentPoints=null;_stopAllAnimations();if(!_isDragging||numPoints===1){_isDragging=_isFirstMove=true;framework.bind(window,_upMoveEvents,self);_isZoomingIn=_wasOverInitialZoom=_opacityChanged=_verticalDragInitiated=_mainScrollShifted=_moved=_isMultitouch=_zoomStarted=false;_direction=null;_shout('firstTouchStart',startPointsList);_equalizePoints(_startPanOffset,_panOffset);_currPanDist.x=_currPanDist.y=0;_equalizePoints(_currPoint,startPointsList[0]);_equalizePoints(_startPoint,_currPoint);_startMainScrollPos.x=_slideSize.x*_currPositionIndex;_posPoints=[{x:_currPoint.x,y:_currPoint.y}];_gestureCheckSpeedTime=_gestureStartTime=_getCurrentTime();_calculatePanBounds(_currZoomLevel,true);_stopDragUpdateLoop();_dragUpdateLoop();}
|
||
if(!_isZooming&&numPoints>1&&!_mainScrollAnimating&&!_mainScrollShifted){_startZoomLevel=_currZoomLevel;_zoomStarted=false;_isZooming=_isMultitouch=true;_currPanDist.y=_currPanDist.x=0;_equalizePoints(_startPanOffset,_panOffset);_equalizePoints(p,startPointsList[0]);_equalizePoints(p2,startPointsList[1]);_findCenterOfPoints(p,p2,_currCenterPoint);_midZoomPoint.x=Math.abs(_currCenterPoint.x)-_panOffset.x;_midZoomPoint.y=Math.abs(_currCenterPoint.y)-_panOffset.y;_currPointsDistance=_startPointsDistance=_calculatePointsDistance(p,p2);}},_onDragMove=function(e){e.preventDefault();if(_pointerEventEnabled){var pointerIndex=framework.arraySearch(_currPointers,e.pointerId,'id');if(pointerIndex>-1){var p=_currPointers[pointerIndex];p.x=e.pageX;p.y=e.pageY;}}
|
||
if(_isDragging){var touchesList=_getTouchPoints(e);if(!_direction&&!_moved&&!_isZooming){if(_mainScrollPos.x!==_slideSize.x*_currPositionIndex){_direction='h';}else{var diff=Math.abs(touchesList[0].x-_currPoint.x)-Math.abs(touchesList[0].y-_currPoint.y);if(Math.abs(diff)>=DIRECTION_CHECK_OFFSET){_direction=diff>0?'h':'v';_currentPoints=touchesList;}}}else{_currentPoints=touchesList;}}},_renderMovement=function(){if(!_currentPoints){return;}
|
||
var numPoints=_currentPoints.length;if(numPoints===0){return;}
|
||
_equalizePoints(p,_currentPoints[0]);delta.x=p.x-_currPoint.x;delta.y=p.y-_currPoint.y;if(_isZooming&&numPoints>1){_currPoint.x=p.x;_currPoint.y=p.y;if(!delta.x&&!delta.y&&_isEqualPoints(_currentPoints[1],p2)){return;}
|
||
_equalizePoints(p2,_currentPoints[1]);if(!_zoomStarted){_zoomStarted=true;_shout('zoomGestureStarted');}
|
||
var pointsDistance=_calculatePointsDistance(p,p2);var zoomLevel=_calculateZoomLevel(pointsDistance);if(zoomLevel>self.currItem.initialZoomLevel+self.currItem.initialZoomLevel/15){_wasOverInitialZoom=true;}
|
||
var zoomFriction=1,minZoomLevel=_getMinZoomLevel(),maxZoomLevel=_getMaxZoomLevel();if(zoomLevel<minZoomLevel){if(_options.pinchToClose&&!_wasOverInitialZoom&&_startZoomLevel<=self.currItem.initialZoomLevel){var minusDiff=minZoomLevel-zoomLevel;var percent=1-minusDiff/(minZoomLevel/1.2);_applyBgOpacity(percent);_shout('onPinchClose',percent);_opacityChanged=true;}else{zoomFriction=(minZoomLevel-zoomLevel)/minZoomLevel;if(zoomFriction>1){zoomFriction=1;}
|
||
zoomLevel=minZoomLevel-zoomFriction*(minZoomLevel/3);}}else if(zoomLevel>maxZoomLevel){zoomFriction=(zoomLevel-maxZoomLevel)/(minZoomLevel*6);if(zoomFriction>1){zoomFriction=1;}
|
||
zoomLevel=maxZoomLevel+zoomFriction*minZoomLevel;}
|
||
if(zoomFriction<0){zoomFriction=0;}
|
||
_currPointsDistance=pointsDistance;_findCenterOfPoints(p,p2,_centerPoint);_currPanDist.x+=_centerPoint.x-_currCenterPoint.x;_currPanDist.y+=_centerPoint.y-_currCenterPoint.y;_equalizePoints(_currCenterPoint,_centerPoint);_panOffset.x=_calculatePanOffset('x',zoomLevel);_panOffset.y=_calculatePanOffset('y',zoomLevel);_isZoomingIn=zoomLevel>_currZoomLevel;_currZoomLevel=zoomLevel;_applyCurrentZoomPan();}else{if(!_direction){return;}
|
||
if(_isFirstMove){_isFirstMove=false;if(Math.abs(delta.x)>=DIRECTION_CHECK_OFFSET){delta.x-=_currentPoints[0].x-_startPoint.x;}
|
||
if(Math.abs(delta.y)>=DIRECTION_CHECK_OFFSET){delta.y-=_currentPoints[0].y-_startPoint.y;}}
|
||
_currPoint.x=p.x;_currPoint.y=p.y;if(delta.x===0&&delta.y===0){return;}
|
||
if(_direction==='v'&&_options.closeOnVerticalDrag){if(!_canPan()){_currPanDist.y+=delta.y;_panOffset.y+=delta.y;var opacityRatio=_calculateVerticalDragOpacityRatio();_verticalDragInitiated=true;_shout('onVerticalDrag',opacityRatio);_applyBgOpacity(opacityRatio);_applyCurrentZoomPan();return;}}
|
||
_pushPosPoint(_getCurrentTime(),p.x,p.y);_moved=true;_currPanBounds=self.currItem.bounds;var mainScrollChanged=_panOrMoveMainScroll('x',delta);if(!mainScrollChanged){_panOrMoveMainScroll('y',delta);_roundPoint(_panOffset);_applyCurrentZoomPan();}}},_onDragRelease=function(e){if(_features.isOldAndroid){if(_oldAndroidTouchEndTimeout&&e.type==='mouseup'){return;}
|
||
if(e.type.indexOf('touch')>-1){clearTimeout(_oldAndroidTouchEndTimeout);_oldAndroidTouchEndTimeout=setTimeout(function(){_oldAndroidTouchEndTimeout=0;},600);}}
|
||
_shout('pointerUp');if(_preventDefaultEventBehaviour(e,false)){e.preventDefault();}
|
||
var releasePoint;if(_pointerEventEnabled){var pointerIndex=framework.arraySearch(_currPointers,e.pointerId,'id');if(pointerIndex>-1){releasePoint=_currPointers.splice(pointerIndex,1)[0];if(navigator.pointerEnabled){releasePoint.type=e.pointerType||'mouse';}else{var MSPOINTER_TYPES={4:'mouse',2:'touch',3:'pen'};releasePoint.type=MSPOINTER_TYPES[e.pointerType];if(!releasePoint.type){releasePoint.type=e.pointerType||'mouse';}}}}
|
||
var touchList=_getTouchPoints(e),gestureType,numPoints=touchList.length;if(e.type==='mouseup'){numPoints=0;}
|
||
if(numPoints===2){_currentPoints=null;return true;}
|
||
if(numPoints===1){_equalizePoints(_startPoint,touchList[0]);}
|
||
if(numPoints===0&&!_direction&&!_mainScrollAnimating){if(!releasePoint){if(e.type==='mouseup'){releasePoint={x:e.pageX,y:e.pageY,type:'mouse'};}else if(e.changedTouches&&e.changedTouches[0]){releasePoint={x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY,type:'touch'};}}
|
||
_shout('touchRelease',e,releasePoint);}
|
||
var releaseTimeDiff=-1;if(numPoints===0){_isDragging=false;framework.unbind(window,_upMoveEvents,self);_stopDragUpdateLoop();if(_isZooming){releaseTimeDiff=0;}else if(_lastReleaseTime!==-1){releaseTimeDiff=_getCurrentTime()-_lastReleaseTime;}}
|
||
_lastReleaseTime=numPoints===1?_getCurrentTime():-1;if(releaseTimeDiff!==-1&&releaseTimeDiff<150){gestureType='zoom';}else{gestureType='swipe';}
|
||
if(_isZooming&&numPoints<2){_isZooming=false;if(numPoints===1){gestureType='zoomPointerUp';}
|
||
_shout('zoomGestureEnded');}
|
||
_currentPoints=null;if(!_moved&&!_zoomStarted&&!_mainScrollAnimating&&!_verticalDragInitiated){return;}
|
||
_stopAllAnimations();if(!_releaseAnimData){_releaseAnimData=_initDragReleaseAnimationData();}
|
||
_releaseAnimData.calculateSwipeSpeed('x');if(_verticalDragInitiated){var opacityRatio=_calculateVerticalDragOpacityRatio();if(opacityRatio<_options.verticalDragRange){self.close();}else{var initalPanY=_panOffset.y,initialBgOpacity=_bgOpacity;_animateProp('verticalDrag',0,1,300,framework.easing.cubic.out,function(now){_panOffset.y=(self.currItem.initialPosition.y-initalPanY)*now+initalPanY;_applyBgOpacity((1-initialBgOpacity)*now+initialBgOpacity);_applyCurrentZoomPan();});_shout('onVerticalDrag',1);}
|
||
return;}
|
||
if((_mainScrollShifted||_mainScrollAnimating)&&numPoints===0){var itemChanged=_finishSwipeMainScrollGesture(gestureType,_releaseAnimData);if(itemChanged){return;}
|
||
gestureType='zoomPointerUp';}
|
||
if(_mainScrollAnimating){return;}
|
||
if(gestureType!=='swipe'){_completeZoomGesture();return;}
|
||
if(!_mainScrollShifted&&_currZoomLevel>self.currItem.fitRatio){_completePanGesture(_releaseAnimData);}},_initDragReleaseAnimationData=function(){var lastFlickDuration,tempReleasePos;var s={lastFlickOffset:{},lastFlickDist:{},lastFlickSpeed:{},slowDownRatio:{},slowDownRatioReverse:{},speedDecelerationRatio:{},speedDecelerationRatioAbs:{},distanceOffset:{},backAnimDestination:{},backAnimStarted:{},calculateSwipeSpeed:function(axis){if(_posPoints.length>1){lastFlickDuration=_getCurrentTime()-_gestureCheckSpeedTime+50;tempReleasePos=_posPoints[_posPoints.length-2][axis];}else{lastFlickDuration=_getCurrentTime()-_gestureStartTime;tempReleasePos=_startPoint[axis];}
|
||
s.lastFlickOffset[axis]=_currPoint[axis]-tempReleasePos;s.lastFlickDist[axis]=Math.abs(s.lastFlickOffset[axis]);if(s.lastFlickDist[axis]>20){s.lastFlickSpeed[axis]=s.lastFlickOffset[axis]/lastFlickDuration;}else{s.lastFlickSpeed[axis]=0;}
|
||
if(Math.abs(s.lastFlickSpeed[axis])<0.1){s.lastFlickSpeed[axis]=0;}
|
||
s.slowDownRatio[axis]=0.95;s.slowDownRatioReverse[axis]=1-s.slowDownRatio[axis];s.speedDecelerationRatio[axis]=1;},calculateOverBoundsAnimOffset:function(axis,speed){if(!s.backAnimStarted[axis]){if(_panOffset[axis]>_currPanBounds.min[axis]){s.backAnimDestination[axis]=_currPanBounds.min[axis];}else if(_panOffset[axis]<_currPanBounds.max[axis]){s.backAnimDestination[axis]=_currPanBounds.max[axis];}
|
||
if(s.backAnimDestination[axis]!==undefined){s.slowDownRatio[axis]=0.7;s.slowDownRatioReverse[axis]=1-s.slowDownRatio[axis];if(s.speedDecelerationRatioAbs[axis]<0.05){s.lastFlickSpeed[axis]=0;s.backAnimStarted[axis]=true;_animateProp('bounceZoomPan'+axis,_panOffset[axis],s.backAnimDestination[axis],speed||300,framework.easing.sine.out,function(pos){_panOffset[axis]=pos;_applyCurrentZoomPan();});}}}},calculateAnimOffset:function(axis){if(!s.backAnimStarted[axis]){s.speedDecelerationRatio[axis]=s.speedDecelerationRatio[axis]*(s.slowDownRatio[axis]+
|
||
s.slowDownRatioReverse[axis]-
|
||
s.slowDownRatioReverse[axis]*s.timeDiff/10);s.speedDecelerationRatioAbs[axis]=Math.abs(s.lastFlickSpeed[axis]*s.speedDecelerationRatio[axis]);s.distanceOffset[axis]=s.lastFlickSpeed[axis]*s.speedDecelerationRatio[axis]*s.timeDiff;_panOffset[axis]+=s.distanceOffset[axis];}},panAnimLoop:function(){if(_animations.zoomPan){_animations.zoomPan.raf=_requestAF(s.panAnimLoop);s.now=_getCurrentTime();s.timeDiff=s.now-s.lastNow;s.lastNow=s.now;s.calculateAnimOffset('x');s.calculateAnimOffset('y');_applyCurrentZoomPan();s.calculateOverBoundsAnimOffset('x');s.calculateOverBoundsAnimOffset('y');if(s.speedDecelerationRatioAbs.x<0.05&&s.speedDecelerationRatioAbs.y<0.05){_panOffset.x=Math.round(_panOffset.x);_panOffset.y=Math.round(_panOffset.y);_applyCurrentZoomPan();_stopAnimation('zoomPan');return;}}}};return s;},_completePanGesture=function(animData){animData.calculateSwipeSpeed('y');_currPanBounds=self.currItem.bounds;animData.backAnimDestination={};animData.backAnimStarted={};if(Math.abs(animData.lastFlickSpeed.x)<=0.05&&Math.abs(animData.lastFlickSpeed.y)<=0.05){animData.speedDecelerationRatioAbs.x=animData.speedDecelerationRatioAbs.y=0;animData.calculateOverBoundsAnimOffset('x');animData.calculateOverBoundsAnimOffset('y');return true;}
|
||
_registerStartAnimation('zoomPan');animData.lastNow=_getCurrentTime();animData.panAnimLoop();},_finishSwipeMainScrollGesture=function(gestureType,_releaseAnimData){var itemChanged;if(!_mainScrollAnimating){_currZoomedItemIndex=_currentItemIndex;}
|
||
var itemsDiff;if(gestureType==='swipe'){var totalShiftDist=_currPoint.x-_startPoint.x,isFastLastFlick=_releaseAnimData.lastFlickDist.x<10;if(totalShiftDist>MIN_SWIPE_DISTANCE&&(isFastLastFlick||_releaseAnimData.lastFlickOffset.x>20)){itemsDiff=-1;}else if(totalShiftDist<-MIN_SWIPE_DISTANCE&&(isFastLastFlick||_releaseAnimData.lastFlickOffset.x<-20)){itemsDiff=1;}}
|
||
var nextCircle;if(itemsDiff){_currentItemIndex+=itemsDiff;if(_currentItemIndex<0){_currentItemIndex=_options.loop?_getNumItems()-1:0;nextCircle=true;}else if(_currentItemIndex>=_getNumItems()){_currentItemIndex=_options.loop?0:_getNumItems()-1;nextCircle=true;}
|
||
if(!nextCircle||_options.loop){_indexDiff+=itemsDiff;_currPositionIndex-=itemsDiff;itemChanged=true;}}
|
||
var animateToX=_slideSize.x*_currPositionIndex;var animateToDist=Math.abs(animateToX-_mainScrollPos.x);var finishAnimDuration;if(!itemChanged&&animateToX>_mainScrollPos.x!==_releaseAnimData.lastFlickSpeed.x>0){finishAnimDuration=333;}else{finishAnimDuration=Math.abs(_releaseAnimData.lastFlickSpeed.x)>0?animateToDist/Math.abs(_releaseAnimData.lastFlickSpeed.x):333;finishAnimDuration=Math.min(finishAnimDuration,400);finishAnimDuration=Math.max(finishAnimDuration,250);}
|
||
if(_currZoomedItemIndex===_currentItemIndex){itemChanged=false;}
|
||
_mainScrollAnimating=true;_shout('mainScrollAnimStart');_animateProp('mainScroll',_mainScrollPos.x,animateToX,finishAnimDuration,framework.easing.cubic.out,_moveMainScroll,function(){_stopAllAnimations();_mainScrollAnimating=false;_currZoomedItemIndex=-1;if(itemChanged||_currZoomedItemIndex!==_currentItemIndex){self.updateCurrItem();}
|
||
_shout('mainScrollAnimComplete');});if(itemChanged){self.updateCurrItem(true);}
|
||
return itemChanged;},_calculateZoomLevel=function(touchesDistance){return 1/_startPointsDistance*touchesDistance*_startZoomLevel;},_completeZoomGesture=function(){var destZoomLevel=_currZoomLevel,minZoomLevel=_getMinZoomLevel(),maxZoomLevel=_getMaxZoomLevel();if(_currZoomLevel<minZoomLevel){destZoomLevel=minZoomLevel;}else if(_currZoomLevel>maxZoomLevel){destZoomLevel=maxZoomLevel;}
|
||
var destOpacity=1,onUpdate,initialOpacity=_bgOpacity;if(_opacityChanged&&!_isZoomingIn&&!_wasOverInitialZoom&&_currZoomLevel<minZoomLevel){self.close();return true;}
|
||
if(_opacityChanged){onUpdate=function(now){_applyBgOpacity((destOpacity-initialOpacity)*now+initialOpacity);};}
|
||
self.zoomTo(destZoomLevel,0,200,framework.easing.cubic.out,onUpdate);return true;};_registerModule('Gestures',{publicMethods:{initGestures:function(){var addEventNames=function(pref,down,move,up,cancel){_dragStartEvent=pref+down;_dragMoveEvent=pref+move;_dragEndEvent=pref+up;if(cancel){_dragCancelEvent=pref+cancel;}else{_dragCancelEvent='';}};_pointerEventEnabled=_features.pointerEvent;if(_pointerEventEnabled&&_features.touch){_features.touch=false;}
|
||
if(_pointerEventEnabled){if(navigator.pointerEnabled){addEventNames('pointer','down','move','up','cancel');}else{addEventNames('MSPointer','Down','Move','Up','Cancel');}}else if(_features.touch){addEventNames('touch','start','move','end','cancel');_likelyTouchDevice=true;}else{addEventNames('mouse','down','move','up');}
|
||
_upMoveEvents=_dragMoveEvent+' '+_dragEndEvent+' '+_dragCancelEvent;_downEvents=_dragStartEvent;if(_pointerEventEnabled&&!_likelyTouchDevice){_likelyTouchDevice=(navigator.maxTouchPoints>1)||(navigator.msMaxTouchPoints>1);}
|
||
self.likelyTouchDevice=_likelyTouchDevice;_globalEventHandlers[_dragStartEvent]=_onDragStart;_globalEventHandlers[_dragMoveEvent]=_onDragMove;_globalEventHandlers[_dragEndEvent]=_onDragRelease;if(_dragCancelEvent){_globalEventHandlers[_dragCancelEvent]=_globalEventHandlers[_dragEndEvent];}
|
||
if(_features.touch){_downEvents+=' mousedown';_upMoveEvents+=' mousemove mouseup';_globalEventHandlers.mousedown=_globalEventHandlers[_dragStartEvent];_globalEventHandlers.mousemove=_globalEventHandlers[_dragMoveEvent];_globalEventHandlers.mouseup=_globalEventHandlers[_dragEndEvent];}
|
||
if(!_likelyTouchDevice){_options.allowPanToNext=false;}}}});var _showOrHideTimeout,_showOrHide=function(item,img,out,completeFn){if(_showOrHideTimeout){clearTimeout(_showOrHideTimeout);}
|
||
_initialZoomRunning=true;_initialContentSet=true;var thumbBounds;if(item.initialLayout){thumbBounds=item.initialLayout;item.initialLayout=null;}else{thumbBounds=_options.getThumbBoundsFn&&_options.getThumbBoundsFn(_currentItemIndex);}
|
||
var duration=out?_options.hideAnimationDuration:_options.showAnimationDuration;var onComplete=function(){_stopAnimation('initialZoom');if(!out){_applyBgOpacity(1);if(img){img.style.display='block';}
|
||
framework.addClass(template,'pswp--animated-in');_shout('initialZoom'+(out?'OutEnd':'InEnd'));}else{self.template.removeAttribute('style');self.bg.removeAttribute('style');}
|
||
if(completeFn){completeFn();}
|
||
_initialZoomRunning=false;};if(!duration||!thumbBounds||thumbBounds.x===undefined){_shout('initialZoom'+(out?'Out':'In'));_currZoomLevel=item.initialZoomLevel;_equalizePoints(_panOffset,item.initialPosition);_applyCurrentZoomPan();template.style.opacity=out?0:1;_applyBgOpacity(1);if(duration){setTimeout(function(){onComplete();},duration);}else{onComplete();}
|
||
return;}
|
||
var startAnimation=function(){var closeWithRaf=_closedByScroll,fadeEverything=!self.currItem.src||self.currItem.loadError||_options.showHideOpacity;if(item.miniImg){item.miniImg.style.webkitBackfaceVisibility='hidden';}
|
||
if(!out){_currZoomLevel=thumbBounds.w/item.w;_panOffset.x=thumbBounds.x;_panOffset.y=thumbBounds.y-_initalWindowScrollY;self[fadeEverything?'template':'bg'].style.opacity=0.001;_applyCurrentZoomPan();}
|
||
_registerStartAnimation('initialZoom');if(out&&!closeWithRaf){framework.removeClass(template,'pswp--animated-in');}
|
||
if(fadeEverything){if(out){framework[(closeWithRaf?'remove':'add')+'Class'](template,'pswp--animate_opacity');}else{setTimeout(function(){framework.addClass(template,'pswp--animate_opacity');},30);}}
|
||
_showOrHideTimeout=setTimeout(function(){_shout('initialZoom'+(out?'Out':'In'));if(!out){_currZoomLevel=item.initialZoomLevel;_equalizePoints(_panOffset,item.initialPosition);_applyCurrentZoomPan();_applyBgOpacity(1);if(fadeEverything){template.style.opacity=1;}else{_applyBgOpacity(1);}
|
||
_showOrHideTimeout=setTimeout(onComplete,duration+20);}else{var destZoomLevel=thumbBounds.w/item.w,initialPanOffset={x:_panOffset.x,y:_panOffset.y},initialZoomLevel=_currZoomLevel,initalBgOpacity=_bgOpacity,onUpdate=function(now){if(now===1){_currZoomLevel=destZoomLevel;_panOffset.x=thumbBounds.x;_panOffset.y=thumbBounds.y-_currentWindowScrollY;}else{_currZoomLevel=(destZoomLevel-initialZoomLevel)*now+initialZoomLevel;_panOffset.x=(thumbBounds.x-initialPanOffset.x)*now+initialPanOffset.x;_panOffset.y=(thumbBounds.y-_currentWindowScrollY-initialPanOffset.y)*now+initialPanOffset.y;}
|
||
_applyCurrentZoomPan();if(fadeEverything){template.style.opacity=1-now;}else{_applyBgOpacity(initalBgOpacity-now*initalBgOpacity);}};if(closeWithRaf){_animateProp('initialZoom',0,1,duration,framework.easing.cubic.out,onUpdate,onComplete);}else{onUpdate(1);_showOrHideTimeout=setTimeout(onComplete,duration+20);}}},out?25:90);};startAnimation();};var _items,_tempPanAreaSize={},_imagesToAppendPool=[],_initialContentSet,_initialZoomRunning,_controllerDefaultOptions={index:0,errorMsg:'<div class="pswp__error-msg"><a href="%url%" target="_blank">The image</a> could not be loaded.</div>',forceProgressiveLoading:false,preload:[1,1],getNumItemsFn:function(){return _items.length;}};var _getItemAt,_getNumItems,_initialIsLoop,_getZeroBounds=function(){return{center:{x:0,y:0},max:{x:0,y:0},min:{x:0,y:0}};},_calculateSingleItemPanBounds=function(item,realPanElementW,realPanElementH){var bounds=item.bounds;bounds.center.x=Math.round((_tempPanAreaSize.x-realPanElementW)/2);bounds.center.y=Math.round((_tempPanAreaSize.y-realPanElementH)/2)+item.vGap.top;bounds.max.x=(realPanElementW>_tempPanAreaSize.x)?Math.round(_tempPanAreaSize.x-realPanElementW):bounds.center.x;bounds.max.y=(realPanElementH>_tempPanAreaSize.y)?Math.round(_tempPanAreaSize.y-realPanElementH)+item.vGap.top:bounds.center.y;bounds.min.x=(realPanElementW>_tempPanAreaSize.x)?0:bounds.center.x;bounds.min.y=(realPanElementH>_tempPanAreaSize.y)?item.vGap.top:bounds.center.y;},_calculateItemSize=function(item,viewportSize,zoomLevel){if(item.src&&!item.loadError){var isInitial=!zoomLevel;if(isInitial){if(!item.vGap){item.vGap={top:0,bottom:0};}
|
||
_shout('parseVerticalMargin',item);}
|
||
_tempPanAreaSize.x=viewportSize.x;_tempPanAreaSize.y=viewportSize.y-item.vGap.top-item.vGap.bottom;if(isInitial){var hRatio=_tempPanAreaSize.x/item.w;var vRatio=_tempPanAreaSize.y/item.h;item.fitRatio=hRatio<vRatio?hRatio:vRatio;var scaleMode=_options.scaleMode;if(scaleMode==='orig'){zoomLevel=1;}else if(scaleMode==='fit'){zoomLevel=item.fitRatio;}
|
||
if(zoomLevel>1){zoomLevel=1;}
|
||
item.initialZoomLevel=zoomLevel;if(!item.bounds){item.bounds=_getZeroBounds();}}
|
||
if(!zoomLevel){return;}
|
||
_calculateSingleItemPanBounds(item,item.w*zoomLevel,item.h*zoomLevel);if(isInitial&&zoomLevel===item.initialZoomLevel){item.initialPosition=item.bounds.center;}
|
||
return item.bounds;}else{item.w=item.h=0;item.initialZoomLevel=item.fitRatio=1;item.bounds=_getZeroBounds();item.initialPosition=item.bounds.center;return item.bounds;}},_appendImage=function(index,item,baseDiv,img,preventAnimation,keepPlaceholder){if(item.loadError){return;}
|
||
if(img){item.imageAppended=true;_setImageSize(item,img,(item===self.currItem&&_renderMaxResolution));baseDiv.appendChild(img);if(keepPlaceholder){setTimeout(function(){if(item&&item.loaded&&item.placeholder){item.placeholder.style.display='none';item.placeholder=null;}},500);}}},_preloadImage=function(item){item.loading=true;item.loaded=false;var img=item.img=framework.createEl('pswp__img','img');var onComplete=function(){item.loading=false;item.loaded=true;if(item.loadComplete){item.loadComplete(item);}else{item.img=null;}
|
||
img.onload=img.onerror=null;img=null;};img.onload=onComplete;img.onerror=function(){item.loadError=true;onComplete();};img.src=item.src;return img;},_checkForError=function(item,cleanUp){if(item.src&&item.loadError&&item.container){if(cleanUp){item.container.innerHTML='';}
|
||
item.container.innerHTML=_options.errorMsg.replace('%url%',item.src);return true;}},_setImageSize=function(item,img,maxRes){if(!item.src){return;}
|
||
if(!img){img=item.container.lastChild;}
|
||
var w=maxRes?item.w:Math.round(item.w*item.fitRatio),h=maxRes?item.h:Math.round(item.h*item.fitRatio);if(item.placeholder&&!item.loaded){item.placeholder.style.width=w+'px';item.placeholder.style.height=h+'px';}
|
||
img.style.width=w+'px';img.style.height=h+'px';},_appendImagesPool=function(){if(_imagesToAppendPool.length){var poolItem;for(var i=0;i<_imagesToAppendPool.length;i++){poolItem=_imagesToAppendPool[i];if(poolItem.holder.index===poolItem.index){_appendImage(poolItem.index,poolItem.item,poolItem.baseDiv,poolItem.img,false,poolItem.clearPlaceholder);}}
|
||
_imagesToAppendPool=[];}};_registerModule('Controller',{publicMethods:{lazyLoadItem:function(index){index=_getLoopedId(index);var item=_getItemAt(index);if(!item||((item.loaded||item.loading)&&!_itemsNeedUpdate)){return;}
|
||
_shout('gettingData',index,item);if(!item.src){return;}
|
||
_preloadImage(item);},initController:function(){framework.extend(_options,_controllerDefaultOptions,true);self.items=_items=items;_getItemAt=self.getItemAt;_getNumItems=_options.getNumItemsFn;_initialIsLoop=_options.loop;if(_getNumItems()<3){_options.loop=false;}
|
||
_listen('beforeChange',function(diff){var p=_options.preload,isNext=diff===null?true:(diff>=0),preloadBefore=Math.min(p[0],_getNumItems()),preloadAfter=Math.min(p[1],_getNumItems()),i;for(i=1;i<=(isNext?preloadAfter:preloadBefore);i++){self.lazyLoadItem(_currentItemIndex+i);}
|
||
for(i=1;i<=(isNext?preloadBefore:preloadAfter);i++){self.lazyLoadItem(_currentItemIndex-i);}});_listen('initialLayout',function(){self.currItem.initialLayout=_options.getThumbBoundsFn&&_options.getThumbBoundsFn(_currentItemIndex);});_listen('mainScrollAnimComplete',_appendImagesPool);_listen('initialZoomInEnd',_appendImagesPool);_listen('destroy',function(){var item;for(var i=0;i<_items.length;i++){item=_items[i];if(item.container){item.container=null;}
|
||
if(item.placeholder){item.placeholder=null;}
|
||
if(item.img){item.img=null;}
|
||
if(item.preloader){item.preloader=null;}
|
||
if(item.loadError){item.loaded=item.loadError=false;}}
|
||
_imagesToAppendPool=null;});},getItemAt:function(index){if(index>=0){return _items[index]!==undefined?_items[index]:false;}
|
||
return false;},allowProgressiveImg:function(){return _options.forceProgressiveLoading||!_likelyTouchDevice||_options.mouseUsed||screen.width>1200;},setContent:function(holder,index){if(_options.loop){index=_getLoopedId(index);}
|
||
var prevItem=self.getItemAt(holder.index);if(prevItem){prevItem.container=null;}
|
||
var item=self.getItemAt(index),img;if(!item){holder.el.innerHTML='';return;}
|
||
_shout('gettingData',index,item);holder.index=index;holder.item=item;var baseDiv=item.container=framework.createEl('pswp__zoom-wrap');if(!item.src&&item.html){if(item.html.tagName){baseDiv.appendChild(item.html);}else{baseDiv.innerHTML=item.html;}}
|
||
_checkForError(item);_calculateItemSize(item,_viewportSize);if(item.src&&!item.loadError&&!item.loaded){item.loadComplete=function(item){if(!_isOpen){return;}
|
||
if(holder&&holder.index===index){if(_checkForError(item,true)){item.loadComplete=item.img=null;_calculateItemSize(item,_viewportSize);_applyZoomPanToItem(item);if(holder.index===_currentItemIndex){self.updateCurrZoomItem();}
|
||
return;}
|
||
if(!item.imageAppended){if(_features.transform&&(_mainScrollAnimating||_initialZoomRunning)){_imagesToAppendPool.push({item:item,baseDiv:baseDiv,img:item.img,index:index,holder:holder,clearPlaceholder:true});}else{_appendImage(index,item,baseDiv,item.img,_mainScrollAnimating||_initialZoomRunning,true);}}else{if(!_initialZoomRunning&&item.placeholder){item.placeholder.style.display='none';item.placeholder=null;}}}
|
||
item.loadComplete=null;item.img=null;_shout('imageLoadComplete',index,item);};if(framework.features.transform){var placeholderClassName='pswp__img pswp__img--placeholder';placeholderClassName+=(item.msrc?'':' pswp__img--placeholder--blank');var placeholder=framework.createEl(placeholderClassName,item.msrc?'img':'');if(item.msrc){placeholder.src=item.msrc;}
|
||
_setImageSize(item,placeholder);baseDiv.appendChild(placeholder);item.placeholder=placeholder;}
|
||
if(!item.loading){_preloadImage(item);}
|
||
if(self.allowProgressiveImg()){if(!_initialContentSet&&_features.transform){_imagesToAppendPool.push({item:item,baseDiv:baseDiv,img:item.img,index:index,holder:holder});}else{_appendImage(index,item,baseDiv,item.img,true,true);}}}else if(item.src&&!item.loadError){img=framework.createEl('pswp__img','img');img.style.opacity=1;img.src=item.src;_setImageSize(item,img);_appendImage(index,item,baseDiv,img,true);}
|
||
if(!_initialContentSet&&index===_currentItemIndex){_currZoomElementStyle=baseDiv.style;_showOrHide(item,(img||item.img));}else{_applyZoomPanToItem(item);}
|
||
holder.el.innerHTML='';holder.el.appendChild(baseDiv);},cleanSlide:function(item){if(item.img){item.img.onload=item.img.onerror=null;}
|
||
item.loaded=item.loading=item.img=item.imageAppended=false;}}});var tapTimer,tapReleasePoint={},_dispatchTapEvent=function(origEvent,releasePoint,pointerType){var e=document.createEvent('CustomEvent'),eDetail={origEvent:origEvent,target:origEvent.target,releasePoint:releasePoint,pointerType:pointerType||'touch'};e.initCustomEvent('pswpTap',true,true,eDetail);origEvent.target.dispatchEvent(e);};_registerModule('Tap',{publicMethods:{initTap:function(){_listen('firstTouchStart',self.onTapStart);_listen('touchRelease',self.onTapRelease);_listen('destroy',function(){tapReleasePoint={};tapTimer=null;});},onTapStart:function(touchList){if(touchList.length>1){clearTimeout(tapTimer);tapTimer=null;}},onTapRelease:function(e,releasePoint){if(!releasePoint){return;}
|
||
if(!_moved&&!_isMultitouch&&!_numAnimations){var p0=releasePoint;if(tapTimer){clearTimeout(tapTimer);tapTimer=null;if(_isNearbyPoints(p0,tapReleasePoint)){_shout('doubleTap',p0);return;}}
|
||
if(releasePoint.type==='mouse'){_dispatchTapEvent(e,releasePoint,'mouse');return;}
|
||
var clickedTagName=e.target.tagName.toUpperCase();if(clickedTagName==='BUTTON'||framework.hasClass(e.target,'pswp__single-tap')){_dispatchTapEvent(e,releasePoint);return;}
|
||
_equalizePoints(tapReleasePoint,p0);tapTimer=setTimeout(function(){_dispatchTapEvent(e,releasePoint);tapTimer=null;},300);}}}});var _wheelDelta;_registerModule('DesktopZoom',{publicMethods:{initDesktopZoom:function(){if(_oldIE){return;}
|
||
if(_likelyTouchDevice){_listen('mouseUsed',function(){self.setupDesktopZoom();});}else{self.setupDesktopZoom(true);}},setupDesktopZoom:function(onInit){_wheelDelta={};var events='wheel mousewheel DOMMouseScroll';_listen('bindEvents',function(){framework.bind(template,events,self.handleMouseWheel);});_listen('unbindEvents',function(){if(_wheelDelta){framework.unbind(template,events,self.handleMouseWheel);}});self.mouseZoomedIn=false;var hasDraggingClass,updateZoomable=function(){if(self.mouseZoomedIn){framework.removeClass(template,'pswp--zoomed-in');self.mouseZoomedIn=false;}
|
||
if(_currZoomLevel<1){framework.addClass(template,'pswp--zoom-allowed');}else{framework.removeClass(template,'pswp--zoom-allowed');}
|
||
removeDraggingClass();},removeDraggingClass=function(){if(hasDraggingClass){framework.removeClass(template,'pswp--dragging');hasDraggingClass=false;}};_listen('resize',updateZoomable);_listen('afterChange',updateZoomable);_listen('pointerDown',function(){if(self.mouseZoomedIn){hasDraggingClass=true;framework.addClass(template,'pswp--dragging');}});_listen('pointerUp',removeDraggingClass);if(!onInit){updateZoomable();}},handleMouseWheel:function(e){if(_currZoomLevel<=self.currItem.fitRatio){if(_options.modal){if(!_options.closeOnScroll||_numAnimations||_isDragging){e.preventDefault();}else if(_transformKey&&Math.abs(e.deltaY)>2){_closedByScroll=true;self.close();}}
|
||
return true;}
|
||
e.stopPropagation();_wheelDelta.x=0;if('deltaX'in e){if(e.deltaMode===1){_wheelDelta.x=e.deltaX*18;_wheelDelta.y=e.deltaY*18;}else{_wheelDelta.x=e.deltaX;_wheelDelta.y=e.deltaY;}}else if('wheelDelta'in e){if(e.wheelDeltaX){_wheelDelta.x=-0.16*e.wheelDeltaX;}
|
||
if(e.wheelDeltaY){_wheelDelta.y=-0.16*e.wheelDeltaY;}else{_wheelDelta.y=-0.16*e.wheelDelta;}}else if('detail'in e){_wheelDelta.y=e.detail;}else{return;}
|
||
_calculatePanBounds(_currZoomLevel,true);var newPanX=_panOffset.x-_wheelDelta.x,newPanY=_panOffset.y-_wheelDelta.y;if(_options.modal||(newPanX<=_currPanBounds.min.x&&newPanX>=_currPanBounds.max.x&&newPanY<=_currPanBounds.min.y&&newPanY>=_currPanBounds.max.y)){e.preventDefault();}
|
||
self.panTo(newPanX,newPanY);},toggleDesktopZoom:function(centerPoint){centerPoint=centerPoint||{x:_viewportSize.x/2+_offset.x,y:_viewportSize.y/2+_offset.y};var doubleTapZoomLevel=_options.getDoubleTapZoom(true,self.currItem);var zoomOut=_currZoomLevel===doubleTapZoomLevel;self.mouseZoomedIn=!zoomOut;self.zoomTo(zoomOut?self.currItem.initialZoomLevel:doubleTapZoomLevel,centerPoint,333);framework[(!zoomOut?'add':'remove')+'Class'](template,'pswp--zoomed-in');}}});var _historyDefaultOptions={history:true,galleryUID:1};var _historyUpdateTimeout,_hashChangeTimeout,_hashAnimCheckTimeout,_hashChangedByScript,_hashChangedByHistory,_hashReseted,_initialHash,_historyChanged,_closedFromURL,_urlChangedOnce,_windowLoc,_supportsPushState,_getHash=function(){return _windowLoc.hash.substring(1);},_cleanHistoryTimeouts=function(){if(_historyUpdateTimeout){clearTimeout(_historyUpdateTimeout);}
|
||
if(_hashAnimCheckTimeout){clearTimeout(_hashAnimCheckTimeout);}},_parseItemIndexFromURL=function(){var hash=_getHash(),params={};if(hash.length<5){return params;}
|
||
var i,vars=hash.split('&');for(i=0;i<vars.length;i++){if(!vars[i]){continue;}
|
||
var pair=vars[i].split('=');if(pair.length<2){continue;}
|
||
params[pair[0]]=pair[1];}
|
||
if(_options.galleryPIDs){var searchfor=params.pid;params.pid=0;for(i=0;i<_items.length;i++){if(_items[i].pid===searchfor){params.pid=i;break;}}}else{params.pid=parseInt(params.pid,10)-1;}
|
||
if(params.pid<0){params.pid=0;}
|
||
return params;},_updateHash=function(){if(_hashAnimCheckTimeout){clearTimeout(_hashAnimCheckTimeout);}
|
||
if(_numAnimations||_isDragging){_hashAnimCheckTimeout=setTimeout(_updateHash,500);return;}
|
||
if(_hashChangedByScript){clearTimeout(_hashChangeTimeout);}else{_hashChangedByScript=true;}
|
||
var pid=(_currentItemIndex+1);var item=_getItemAt(_currentItemIndex);if(item.hasOwnProperty('pid')){pid=item.pid;}
|
||
var newHash=_initialHash+'&'+'gid='+_options.galleryUID+'&'+'pid='+pid;if(!_historyChanged){if(_windowLoc.hash.indexOf(newHash)===-1){_urlChangedOnce=true;}}
|
||
var newURL=_windowLoc.href.split('#')[0]+'#'+newHash;if(_supportsPushState){if('#'+newHash!==window.location.hash){history[_historyChanged?'replaceState':'pushState']('',document.title,newURL);}}else{if(_historyChanged){_windowLoc.replace(newURL);}else{_windowLoc.hash=newHash;}}
|
||
_historyChanged=true;_hashChangeTimeout=setTimeout(function(){_hashChangedByScript=false;},60);};_registerModule('History',{publicMethods:{initHistory:function(){framework.extend(_options,_historyDefaultOptions,true);if(!_options.history){return;}
|
||
_windowLoc=window.location;_urlChangedOnce=false;_closedFromURL=false;_historyChanged=false;_initialHash=_getHash();_supportsPushState=('pushState'in history);if(_initialHash.indexOf('gid=')>-1){_initialHash=_initialHash.split('&gid=')[0];_initialHash=_initialHash.split('?gid=')[0];}
|
||
_listen('afterChange',self.updateURL);_listen('unbindEvents',function(){framework.unbind(window,'hashchange',self.onHashChange);});var returnToOriginal=function(){_hashReseted=true;if(!_closedFromURL){if(_urlChangedOnce){history.back();}else{if(_initialHash){_windowLoc.hash=_initialHash;}else{if(_supportsPushState){history.pushState('',document.title,_windowLoc.pathname+_windowLoc.search);}else{_windowLoc.hash='';}}}}
|
||
_cleanHistoryTimeouts();};_listen('unbindEvents',function(){if(_closedByScroll){returnToOriginal();}});_listen('destroy',function(){if(!_hashReseted){returnToOriginal();}});_listen('firstUpdate',function(){_currentItemIndex=_parseItemIndexFromURL().pid;});var index=_initialHash.indexOf('pid=');if(index>-1){_initialHash=_initialHash.substring(0,index);if(_initialHash.slice(-1)==='&'){_initialHash=_initialHash.slice(0,-1);}}
|
||
setTimeout(function(){if(_isOpen){framework.bind(window,'hashchange',self.onHashChange);}},40);},onHashChange:function(){if(_getHash()===_initialHash){_closedFromURL=true;self.close();return;}
|
||
if(!_hashChangedByScript){_hashChangedByHistory=true;self.goTo(_parseItemIndexFromURL().pid);_hashChangedByHistory=false;}},updateURL:function(){_cleanHistoryTimeouts();if(_hashChangedByHistory){return;}
|
||
if(!_historyChanged){_updateHash();}else{_historyUpdateTimeout=setTimeout(_updateHash,800);}}}});framework.extend(self,publicMethods);};return PhotoSwipe;});}),(function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_FACTORY__,__WEBPACK_AMD_DEFINE_RESULT__;
|
||
/*! PhotoSwipe Default UI - 4.1.2 - 2017-04-05
|
||
* http://photoswipe.com
|
||
* Copyright (c) 2017 Dmitry Semenov; */
|
||
(function(root,factory){if(true){!(__WEBPACK_AMD_DEFINE_FACTORY__=(factory),__WEBPACK_AMD_DEFINE_RESULT__=(typeof __WEBPACK_AMD_DEFINE_FACTORY__==='function'?(__WEBPACK_AMD_DEFINE_FACTORY__.call(exports,__webpack_require__,exports,module)):__WEBPACK_AMD_DEFINE_FACTORY__),__WEBPACK_AMD_DEFINE_RESULT__!==undefined&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__));}else if(typeof exports==='object'){module.exports=factory();}else{root.PhotoSwipeUI_Default=factory();}})(this,function(){'use strict';var PhotoSwipeUI_Default=function(pswp,framework){var ui=this;var _overlayUIUpdated=false,_controlsVisible=true,_fullscrenAPI,_controls,_captionContainer,_fakeCaptionContainer,_indexIndicator,_shareButton,_shareModal,_shareModalHidden=true,_initalCloseOnScrollValue,_isIdle,_listen,_loadingIndicator,_loadingIndicatorHidden,_loadingIndicatorTimeout,_galleryHasOneSlide,_options,_defaultUIOptions={barsSize:{top:44,bottom:'auto'},closeElClasses:['item','caption','zoom-wrap','ui','top-bar'],timeToIdle:4000,timeToIdleOutside:1000,loadingIndicatorDelay:1000,addCaptionHTMLFn:function(item,captionEl){if(!item.title){captionEl.children[0].innerHTML='';return false;}
|
||
captionEl.children[0].innerHTML=item.title;return true;},closeEl:true,captionEl:true,fullscreenEl:true,zoomEl:true,shareEl:true,counterEl:true,arrowEl:true,preloaderEl:true,tapToClose:false,tapToToggleControls:true,clickToCloseNonZoomable:true,shareButtons:[{id:'facebook',label:'Share on Facebook',url:'https://www.facebook.com/sharer/sharer.php?u={{url}}'},{id:'twitter',label:'Tweet',url:'https://twitter.com/intent/tweet?text={{text}}&url={{url}}'},{id:'pinterest',label:'Pin it',url:'http://www.pinterest.com/pin/create/button/'+'?url={{url}}&media={{image_url}}&description={{text}}'},{id:'download',label:'Download image',url:'{{raw_image_url}}',download:true}],getImageURLForShare:function(){return pswp.currItem.src||'';},getPageURLForShare:function(){return window.location.href;},getTextForShare:function(){return pswp.currItem.title||'';},indexIndicatorSep:' / ',fitControlsWidth:1200},_blockControlsTap,_blockControlsTapTimeout;var _onControlsTap=function(e){if(_blockControlsTap){return true;}
|
||
e=e||window.event;if(_options.timeToIdle&&_options.mouseUsed&&!_isIdle){_onIdleMouseMove();}
|
||
var target=e.target||e.srcElement,uiElement,clickedClass=target.getAttribute('class')||'',found;for(var i=0;i<_uiElements.length;i++){uiElement=_uiElements[i];if(uiElement.onTap&&clickedClass.indexOf('pswp__'+uiElement.name)>-1){uiElement.onTap();found=true;}}
|
||
if(found){if(e.stopPropagation){e.stopPropagation();}
|
||
_blockControlsTap=true;var tapDelay=framework.features.isOldAndroid?600:30;_blockControlsTapTimeout=setTimeout(function(){_blockControlsTap=false;},tapDelay);}},_fitControlsInViewport=function(){return!pswp.likelyTouchDevice||_options.mouseUsed||screen.width>_options.fitControlsWidth;},_togglePswpClass=function(el,cName,add){framework[(add?'add':'remove')+'Class'](el,'pswp__'+cName);},_countNumItems=function(){var hasOneSlide=(_options.getNumItemsFn()===1);if(hasOneSlide!==_galleryHasOneSlide){_togglePswpClass(_controls,'ui--one-slide',hasOneSlide);_galleryHasOneSlide=hasOneSlide;}},_toggleShareModalClass=function(){_togglePswpClass(_shareModal,'share-modal--hidden',_shareModalHidden);},_toggleShareModal=function(){_shareModalHidden=!_shareModalHidden;if(!_shareModalHidden){_toggleShareModalClass();setTimeout(function(){if(!_shareModalHidden){framework.addClass(_shareModal,'pswp__share-modal--fade-in');}},30);}else{framework.removeClass(_shareModal,'pswp__share-modal--fade-in');setTimeout(function(){if(_shareModalHidden){_toggleShareModalClass();}},300);}
|
||
if(!_shareModalHidden){_updateShareURLs();}
|
||
return false;},_openWindowPopup=function(e){e=e||window.event;var target=e.target||e.srcElement;pswp.shout('shareLinkClick',e,target);if(!target.href){return false;}
|
||
if(target.hasAttribute('download')){return true;}
|
||
window.open(target.href,'pswp_share','scrollbars=yes,resizable=yes,toolbar=no,'+'location=yes,width=550,height=420,top=100,left='+
|
||
(window.screen?Math.round(screen.width/2-275):100));if(!_shareModalHidden){_toggleShareModal();}
|
||
return false;},_updateShareURLs=function(){var shareButtonOut='',shareButtonData,shareURL,image_url,page_url,share_text;for(var i=0;i<_options.shareButtons.length;i++){shareButtonData=_options.shareButtons[i];image_url=_options.getImageURLForShare(shareButtonData);page_url=_options.getPageURLForShare(shareButtonData);share_text=_options.getTextForShare(shareButtonData);shareURL=shareButtonData.url.replace('{{url}}',encodeURIComponent(page_url)).replace('{{image_url}}',encodeURIComponent(image_url)).replace('{{raw_image_url}}',image_url).replace('{{text}}',encodeURIComponent(share_text));shareButtonOut+='<a href="'+shareURL+'" target="_blank" '+'class="pswp__share--'+shareButtonData.id+'"'+
|
||
(shareButtonData.download?'download':'')+'>'+
|
||
shareButtonData.label+'</a>';if(_options.parseShareButtonOut){shareButtonOut=_options.parseShareButtonOut(shareButtonData,shareButtonOut);}}
|
||
_shareModal.children[0].innerHTML=shareButtonOut;_shareModal.children[0].onclick=_openWindowPopup;},_hasCloseClass=function(target){for(var i=0;i<_options.closeElClasses.length;i++){if(framework.hasClass(target,'pswp__'+_options.closeElClasses[i])){return true;}}},_idleInterval,_idleTimer,_idleIncrement=0,_onIdleMouseMove=function(){clearTimeout(_idleTimer);_idleIncrement=0;if(_isIdle){ui.setIdle(false);}},_onMouseLeaveWindow=function(e){e=e?e:window.event;var from=e.relatedTarget||e.toElement;if(!from||from.nodeName==='HTML'){clearTimeout(_idleTimer);_idleTimer=setTimeout(function(){ui.setIdle(true);},_options.timeToIdleOutside);}},_setupFullscreenAPI=function(){if(_options.fullscreenEl&&!framework.features.isOldAndroid){if(!_fullscrenAPI){_fullscrenAPI=ui.getFullscreenAPI();}
|
||
if(_fullscrenAPI){framework.bind(document,_fullscrenAPI.eventK,ui.updateFullscreen);ui.updateFullscreen();framework.addClass(pswp.template,'pswp--supports-fs');}else{framework.removeClass(pswp.template,'pswp--supports-fs');}}},_setupLoadingIndicator=function(){if(_options.preloaderEl){_toggleLoadingIndicator(true);_listen('beforeChange',function(){clearTimeout(_loadingIndicatorTimeout);_loadingIndicatorTimeout=setTimeout(function(){if(pswp.currItem&&pswp.currItem.loading){if(!pswp.allowProgressiveImg()||(pswp.currItem.img&&!pswp.currItem.img.naturalWidth)){_toggleLoadingIndicator(false);}}else{_toggleLoadingIndicator(true);}},_options.loadingIndicatorDelay);});_listen('imageLoadComplete',function(index,item){if(pswp.currItem===item){_toggleLoadingIndicator(true);}});}},_toggleLoadingIndicator=function(hide){if(_loadingIndicatorHidden!==hide){_togglePswpClass(_loadingIndicator,'preloader--active',!hide);_loadingIndicatorHidden=hide;}},_applyNavBarGaps=function(item){var gap=item.vGap;if(_fitControlsInViewport()){var bars=_options.barsSize;if(_options.captionEl&&bars.bottom==='auto'){if(!_fakeCaptionContainer){_fakeCaptionContainer=framework.createEl('pswp__caption pswp__caption--fake');_fakeCaptionContainer.appendChild(framework.createEl('pswp__caption__center'));_controls.insertBefore(_fakeCaptionContainer,_captionContainer);framework.addClass(_controls,'pswp__ui--fit');}
|
||
if(_options.addCaptionHTMLFn(item,_fakeCaptionContainer,true)){var captionSize=_fakeCaptionContainer.clientHeight;gap.bottom=parseInt(captionSize,10)||44;}else{gap.bottom=bars.top;}}else{gap.bottom=bars.bottom==='auto'?0:bars.bottom;}
|
||
gap.top=bars.top;}else{gap.top=gap.bottom=0;}},_setupIdle=function(){if(_options.timeToIdle){_listen('mouseUsed',function(){framework.bind(document,'mousemove',_onIdleMouseMove);framework.bind(document,'mouseout',_onMouseLeaveWindow);_idleInterval=setInterval(function(){_idleIncrement++;if(_idleIncrement===2){ui.setIdle(true);}},_options.timeToIdle/2);});}},_setupHidingControlsDuringGestures=function(){_listen('onVerticalDrag',function(now){if(_controlsVisible&&now<0.95){ui.hideControls();}else if(!_controlsVisible&&now>=0.95){ui.showControls();}});var pinchControlsHidden;_listen('onPinchClose',function(now){if(_controlsVisible&&now<0.9){ui.hideControls();pinchControlsHidden=true;}else if(pinchControlsHidden&&!_controlsVisible&&now>0.9){ui.showControls();}});_listen('zoomGestureEnded',function(){pinchControlsHidden=false;if(pinchControlsHidden&&!_controlsVisible){ui.showControls();}});};var _uiElements=[{name:'caption',option:'captionEl',onInit:function(el){_captionContainer=el;}},{name:'share-modal',option:'shareEl',onInit:function(el){_shareModal=el;},onTap:function(){_toggleShareModal();}},{name:'button--share',option:'shareEl',onInit:function(el){_shareButton=el;},onTap:function(){_toggleShareModal();}},{name:'button--zoom',option:'zoomEl',onTap:pswp.toggleDesktopZoom},{name:'counter',option:'counterEl',onInit:function(el){_indexIndicator=el;}},{name:'button--close',option:'closeEl',onTap:pswp.close},{name:'button--arrow--left',option:'arrowEl',onTap:pswp.prev},{name:'button--arrow--right',option:'arrowEl',onTap:pswp.next},{name:'button--fs',option:'fullscreenEl',onTap:function(){if(_fullscrenAPI.isFullscreen()){_fullscrenAPI.exit();}else{_fullscrenAPI.enter();}}},{name:'preloader',option:'preloaderEl',onInit:function(el){_loadingIndicator=el;}}];var _setupUIElements=function(){var item,classAttr,uiElement;var loopThroughChildElements=function(sChildren){if(!sChildren){return;}
|
||
var l=sChildren.length;for(var i=0;i<l;i++){item=sChildren[i];classAttr=item.className;for(var a=0;a<_uiElements.length;a++){uiElement=_uiElements[a];if(classAttr.indexOf('pswp__'+uiElement.name)>-1){if(_options[uiElement.option]){framework.removeClass(item,'pswp__element--disabled');if(uiElement.onInit){uiElement.onInit(item);}}else{framework.addClass(item,'pswp__element--disabled');}}}}};loopThroughChildElements(_controls.children);var topBar=framework.getChildByClass(_controls,'pswp__top-bar');if(topBar){loopThroughChildElements(topBar.children);}};ui.init=function(){framework.extend(pswp.options,_defaultUIOptions,true);_options=pswp.options;_controls=framework.getChildByClass(pswp.scrollWrap,'pswp__ui');_listen=pswp.listen;_setupHidingControlsDuringGestures();_listen('beforeChange',ui.update);_listen('doubleTap',function(point){var initialZoomLevel=pswp.currItem.initialZoomLevel;if(pswp.getZoomLevel()!==initialZoomLevel){pswp.zoomTo(initialZoomLevel,point,333);}else{pswp.zoomTo(_options.getDoubleTapZoom(false,pswp.currItem),point,333);}});_listen('preventDragEvent',function(e,isDown,preventObj){var t=e.target||e.srcElement;if(t&&t.getAttribute('class')&&e.type.indexOf('mouse')>-1&&(t.getAttribute('class').indexOf('__caption')>0||(/(SMALL|STRONG|EM)/i).test(t.tagName))){preventObj.prevent=false;}});_listen('bindEvents',function(){framework.bind(_controls,'pswpTap click',_onControlsTap);framework.bind(pswp.scrollWrap,'pswpTap',ui.onGlobalTap);if(!pswp.likelyTouchDevice){framework.bind(pswp.scrollWrap,'mouseover',ui.onMouseOver);}});_listen('unbindEvents',function(){if(!_shareModalHidden){_toggleShareModal();}
|
||
if(_idleInterval){clearInterval(_idleInterval);}
|
||
framework.unbind(document,'mouseout',_onMouseLeaveWindow);framework.unbind(document,'mousemove',_onIdleMouseMove);framework.unbind(_controls,'pswpTap click',_onControlsTap);framework.unbind(pswp.scrollWrap,'pswpTap',ui.onGlobalTap);framework.unbind(pswp.scrollWrap,'mouseover',ui.onMouseOver);if(_fullscrenAPI){framework.unbind(document,_fullscrenAPI.eventK,ui.updateFullscreen);if(_fullscrenAPI.isFullscreen()){_options.hideAnimationDuration=0;_fullscrenAPI.exit();}
|
||
_fullscrenAPI=null;}});_listen('destroy',function(){if(_options.captionEl){if(_fakeCaptionContainer){_controls.removeChild(_fakeCaptionContainer);}
|
||
framework.removeClass(_captionContainer,'pswp__caption--empty');}
|
||
if(_shareModal){_shareModal.children[0].onclick=null;}
|
||
framework.removeClass(_controls,'pswp__ui--over-close');framework.addClass(_controls,'pswp__ui--hidden');ui.setIdle(false);});if(!_options.showAnimationDuration){framework.removeClass(_controls,'pswp__ui--hidden');}
|
||
_listen('initialZoomIn',function(){if(_options.showAnimationDuration){framework.removeClass(_controls,'pswp__ui--hidden');}});_listen('initialZoomOut',function(){framework.addClass(_controls,'pswp__ui--hidden');});_listen('parseVerticalMargin',_applyNavBarGaps);_setupUIElements();if(_options.shareEl&&_shareButton&&_shareModal){_shareModalHidden=true;}
|
||
_countNumItems();_setupIdle();_setupFullscreenAPI();_setupLoadingIndicator();};ui.setIdle=function(isIdle){_isIdle=isIdle;_togglePswpClass(_controls,'ui--idle',isIdle);};ui.update=function(){if(_controlsVisible&&pswp.currItem){ui.updateIndexIndicator();if(_options.captionEl){_options.addCaptionHTMLFn(pswp.currItem,_captionContainer);_togglePswpClass(_captionContainer,'caption--empty',!pswp.currItem.title);}
|
||
_overlayUIUpdated=true;}else{_overlayUIUpdated=false;}
|
||
if(!_shareModalHidden){_toggleShareModal();}
|
||
_countNumItems();};ui.updateFullscreen=function(e){if(e){setTimeout(function(){pswp.setScrollOffset(0,framework.getScrollY());},50);}
|
||
framework[(_fullscrenAPI.isFullscreen()?'add':'remove')+'Class'](pswp.template,'pswp--fs');};ui.updateIndexIndicator=function(){if(_options.counterEl){_indexIndicator.innerHTML=(pswp.getCurrentIndex()+1)+
|
||
_options.indexIndicatorSep+
|
||
_options.getNumItemsFn();}};ui.onGlobalTap=function(e){e=e||window.event;var target=e.target||e.srcElement;if(_blockControlsTap){return;}
|
||
if(e.detail&&e.detail.pointerType==='mouse'){if(_hasCloseClass(target)){pswp.close();return;}
|
||
if(framework.hasClass(target,'pswp__img')){if(pswp.getZoomLevel()===1&&pswp.getZoomLevel()<=pswp.currItem.fitRatio){if(_options.clickToCloseNonZoomable){pswp.close();}}else{pswp.toggleDesktopZoom(e.detail.releasePoint);}}}else{if(_options.tapToToggleControls){if(_controlsVisible){ui.hideControls();}else{ui.showControls();}}
|
||
if(_options.tapToClose&&(framework.hasClass(target,'pswp__img')||_hasCloseClass(target))){pswp.close();return;}}};ui.onMouseOver=function(e){e=e||window.event;var target=e.target||e.srcElement;_togglePswpClass(_controls,'ui--over-close',_hasCloseClass(target));};ui.hideControls=function(){framework.addClass(_controls,'pswp__ui--hidden');_controlsVisible=false;};ui.showControls=function(){_controlsVisible=true;if(!_overlayUIUpdated){ui.update();}
|
||
framework.removeClass(_controls,'pswp__ui--hidden');};ui.supportsFullscreen=function(){var d=document;return!!(d.exitFullscreen||d.mozCancelFullScreen||d.webkitExitFullscreen||d.msExitFullscreen);};ui.getFullscreenAPI=function(){var dE=document.documentElement,api,tF='fullscreenchange';if(dE.requestFullscreen){api={enterK:'requestFullscreen',exitK:'exitFullscreen',elementK:'fullscreenElement',eventK:tF};}else if(dE.mozRequestFullScreen){api={enterK:'mozRequestFullScreen',exitK:'mozCancelFullScreen',elementK:'mozFullScreenElement',eventK:'moz'+tF};}else if(dE.webkitRequestFullscreen){api={enterK:'webkitRequestFullscreen',exitK:'webkitExitFullscreen',elementK:'webkitFullscreenElement',eventK:'webkit'+tF};}else if(dE.msRequestFullscreen){api={enterK:'msRequestFullscreen',exitK:'msExitFullscreen',elementK:'msFullscreenElement',eventK:'MSFullscreenChange'};}
|
||
if(api){api.enter=function(){_initalCloseOnScrollValue=_options.closeOnScroll;_options.closeOnScroll=false;if(this.enterK==='webkitRequestFullscreen'){pswp.template[this.enterK](Element.ALLOW_KEYBOARD_INPUT);}else{return pswp.template[this.enterK]();}};api.exit=function(){_options.closeOnScroll=_initalCloseOnScrollValue;return document[this.exitK]();};api.isFullscreen=function(){return document[this.elementK];};}
|
||
return api;};};return PhotoSwipeUI_Default;});})]);$(document).ready(function(){if(window.location.href.indexOf("datenschutzerklaerung.html")>-1){}else{checkCookie();}
|
||
if($('.popup__area').length&&$('.popup__cookie').length){$('.popup__area').hide();}
|
||
$('#edit-cookiesettings').on('click',function(e){e.preventDefault();if($('.popup__cookie').length){$('#cookiesettings').show();$('#cookiehint').hide();}else{$('.popup__area').hide();$('body').prepend('<div class="popup popup__cookie">'+'<style scoped>'+'body.hasPopup > * { opacity: 0.5; }'+'body.hasPopup .popup { opacity: 1; width: 60%; background: #fff; -webkit-box-shadow: 0px 0px 30px 0 rgba(0,0,0,0.7); -moz-box-shadow: 0px 0px 30px 0 rgba(0,0,0,0.7); box-shadow: 0px 0px 30px 0 rgba(0,0,0,0.7); padding: 60px; position: fixed; z-index: 2000; left: 20%; top: 15%; overflow: auto; max-height: 80%; display: block; }'+'.popup p > strong { font-size: 20px; }'+'.popup .btn-success { margin: 20px 0; }'+'#cookiehint > p:last-child, #cookiesettings > p:last-child { text-align: center; }'+'#cookiesettings{z-index:2000;font-size:17px;color:#333}#cookiesettings p{font-family:inherit}#cookiesettings h4{font-size:20px;color:#304c59}#cookiesettings .btn{text-transform:none;-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}#cookiegroups .panel{border:0;margin:5px 0;box-shadow:none;position:relative}#cookiegroups .panel-heading{background:#678089;padding:0;margin-left:30px}#cookiegroups .panel-title{font-weight:400;font-size:inherit}#cookiegroups .panel-title>a{color:#fff;position:relative;display:block;border:none;padding:11px 40px 9px 20px}#cookiegroups .panel-title>a::before{display:none}#cookiegroups .panel-title>a::after{content:" ";position:absolute;right:20px;background:url(https://www.wko.at/css-js/images/arrow-down-white.svg) no-repeat center;background-size:contain;height:15px;width:15px}#cookiegroups .panel-title>a:focus,#cookiegroups .panel-title>a:hover{text-decoration:none}#cookiegroups .panel-title>a[aria-expanded=true]::after{background-image:url(https://www.wko.at/css-js/images/arrow-up-white.svg)}#cookiegroups .panel-body{padding-top:20px;padding-left:30px}#cookiegroups .panel-body>div[class^=app-]>p:last-child{font-weight:400;font-size:13px}#cookiegroups .panel-body>div[class^=app-]>p:first-child{font-size:15px;font-weight:500;margin-bottom:0}#cookiegroups .panel-body>div[class^=app-]>p>.appname,#cookiegroups .panel-body>div[class^=app-]>p>.cookieid{display:inline-block;margin-right:5px}#cookiegroups .panel-body>div[class^=app-]>p>.cookieid:last-child{margin-right:0}#cookiegroups .cookieswitch{position:relative;margin-bottom:15px}#cookiegroups .cookieswitch .cookieid{font-size:15px;font-weight:500;display:block;margin-left:60px}#cookiegroups .cookieswitch p{font-weight:400;font-size:13px;margin-left:60px;margin-bottom:0}#cookiegroups .cookieswitch p .appname{font-size:15px;font-weight:500}#cookiesettings .panel-heading,#cookiesettings button,.cookiehint button{border-radius:0}'+'input[type=checkbox]+.toggleCookie{position:relative;float:left;width:50px;height:20px;cursor:pointer;-webkit-tap-highlight-color:transparent;transform:translate3d(0,0,0)}input[type=checkbox]+.toggleCookie:before{content:"Ein";position:relative;width:49px;height:24px;display:block;background:#ccc;border-radius:20px;transition:background .2s ease;padding:6px 0 0 5px;color:#fff;font-size:11px;top:0;box-shadow:none;border:none}input[type=checkbox]+.toggleCookie:after{content:"Aus";position:absolute;right:4px;top:6px;font-size:11px;color:#fff}input[type=checkbox]+.toggleCookie span{position:absolute;top:2px;left:2px;width:20px;height:20px;display:block;background:#fff;border-radius:10px;box-shadow:2px 0 5px 0 rgba(0,0,0,.3);transition:all .2s ease}input[type=checkbox]+.toggleCookie span:before{content:"";position:absolute;display:block;margin:-18px;width:56px;height:56px;background:rgba(76,174,76,.5);border-radius:50%;transform:scale(0);opacity:1;pointer-events:none}.cookieswitch input[type=checkbox].checkbox-cookie{position:absolute;top:0;left:0;width:50px;height:25px;-webkit-appearance:none;display:inline-block;margin:0}.cookieswitch input[type=checkbox].checkbox-cookie:focus{outline:0;border:2px solid #add8e6}input[type=checkbox].checkbox-cookie:checked+.toggleCookie:before{background:#5cb85c}input[type=checkbox].checkbox-cookie:checked+.toggleCookie span{transform:translateX(25px);transition:all .2s cubic-bezier(.8,.4,.3,1.25),background .15s ease;box-shadow:-2px 0 5px 0 rgba(255,255,255,.3)}.checkbox-cookie:checked+.toggleCookie span:before{transform:scale(1);opacity:0;transition:all .4s ease}.select-cookie-group:hover{cursor:pointer}.panel-default>input[type=checkbox],input[type=checkbox]#select-all-cookies,input[type=checkbox].select-cookie-group{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:15px;width:15px;border:1px solid gray;float:left;margin:10px 15px 0 0;position:relative;opacity:1}.panel-default>input[type=checkbox]:checked:before,input[type=checkbox]#select-all-cookies:checked:before,input[type=checkbox].select-cookie-group:checked:before{content:"";height:2px;width:4px;background:gray;display:block;position:absolute;left:1px;top:7px;transform:rotate(45deg)}.panel-default>input[type=checkbox]:checked:after,input[type=checkbox]#select-all-cookies:checked:after,input[type=checkbox].select-cookie-group:checked:after{content:"";height:2px;width:11px;background:gray;display:block;position:absolute;left:2px;top:5px;transform:rotate(-45deg)}.panel-default>input[type=checkbox]:indeterminate:after,input[type=checkbox]#select-all-cookies:indeterminate:after,input[type=checkbox].select-cookie-group:indeterminate:after{content:"";height:2px;width:9px;background:gray;display:block;position:absolute;left:2px;top:5px}.panel-default>input[type=checkbox]:disabled,input[type=checkbox]#select-all-cookies:disabled,input[type=checkbox].select-cookie-group:disabled{border-color:#d3d3d3}.panel-default>input[type=checkbox]:disabled:after,.panel-default>input[type=checkbox]:disabled:before,input[type=checkbox]#select-all-cookies:disabled:after,input[type=checkbox]#select-all-cookies:disabled:before,input[type=checkbox].select-cookie-group:disabled:after,input[type=checkbox].select-cookie-group:disabled:before{background:#d3d3d3}input[type=checkbox]#select-all-cookies{margin-top:2px}input[type=checkbox]#select-all-cookies:hover{cursor:pointer}.panel-default>input[type=checkbox]:focus,input[type=checkbox]#select-all-cookies:focus,input[type=checkbox].select-cookie-group:focus{outline:0}.panel-default>input[type=checkbox]:focus,input[type=checkbox]#select-all-cookies:focus,input[type=checkbox].select-cookie-group:focus{border-color:#add8e6;border-width:2px}#cookiegroups .panel-heading:before{display:none}#cookiegroups .panel-title>a:focus{border:2px solid #add8e6;outline:0}'+'@media print{.popup{display:none}}.cookie-visible.one .navbar-fixed-top{position:static}.one #cookiesettings [id],.one .modal.fade{padding-top:0;margin-top:0}.blog #cookiegroups .cookieswitch .cookieid,.one #cookiegroups .cookieswitch .cookieid{font-weight:700}.blog #cookiesettings button,.blog .cookiehint button{padding:0 15px;min-height:34px}body.mein-wko #cookiesettings button,body[id*=faz_] #cookiesettings button,body[id*=pageElement] #cookiesettings button{border:none!important}body.mein-wko .btn-default,body[id*=faz_] .btn-default,body[id*=pageElement] .btn-default{color:#333!important;background-color:#e6e6e6}body.mein-wko .btn-default:focus,body.mein-wko .btn-default:hover,body[id*=faz_] .btn-default:focus,body[id*=faz_] .btn-default:hover,body[id*=pageElement] .btn-default:focus,body[id*=pageElement] .btn-default:hover{color:#333!important;background-color:#d4d4d4!important}body.mein-wko #cookiesettings .toggle-group .btn,body[id*=faz_] #cookiesettings .toggle-group .btn,body[id*=pageElement] #cookiesettings .toggle-group .btn{border-width:0!important}body.mein-wko #cookiesettings .toggle-group .btn.toggle-handle,body[id*=faz_] #cookiesettings .toggle-group .btn.toggle-handle,body[id*=pageElement] #cookiesettings .toggle-group .btn.toggle-handle{border-width:0 1px!important;background:#fff!important;position:absolute}body.mein-wko #cookiesettings .toggle-group .btn.toggle-on{font-size:13px}body.mein-wko .popup__cookie .btn-success{background-color:#5cb85c}body.mein-wko .popup__cookie .btn-success:focus,body.mein-wko .popup__cookie .btn-success:hover{background-color:#449d44}'+'@media (max-width: 991px) {'+'body.hasPopup .popup { top: 50px; } '+'body.hasPopup .top-section .nav-section { position: static; } '+'}'+'@media (max-width: 767px) {'+'body.hasPopup .popup { padding: 20px; width: 80%; left: 10%; top: 5%; font-size: 15px; }'+'#cookiesettings, .btn { font-size: 15px; }'+'#areas .col-sm-6 { padding: 0; }'+'#areas .radio { margin: 10px 0; }'+'#areas .radio label { font-size: 17px; }'+'}'+'@media (min-width: 786px) {'+'body.hasPopup .popup { font-size: 17px; padding: 60px; top: 15%; left: 20%; width: 60%; }'+'}'+'.popup::-webkit-scrollbar-track { -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.2); background-color: #F5F5F5; }'+'.popup::-webkit-scrollbar { width: 6px; background-color: #F5F5F5; }'+'.popup::-webkit-scrollbar-thumb { background-color: #ccc; }'+'</style>'+'</div>').addClass('hasPopup');editCookieSettings();}});});function setCookie(cname,cvalue,exdays){var d=new Date();d.setTime(d.getTime()+(exdays*24*60*60*1000));var expires="expires="+d.toUTCString();var path="path=/";var host=window.location.hostname.match(/[^\.]*\.[^.]*$/);var domain=(host!=null)?"; domain=."+host[0]:"";document.cookie=cname+"="+cvalue+"; "+expires+"; "+path+domain;dataLayer.push({event:'consent',consent:{'googleanalytics':window.GCM.apps.get('googleanalytics'),'googleremarketing':window.GCM.apps.get('googleremarketing'),'googlefloodlight':window.GCM.apps.get('googlefloodlight'),'facebook':window.GCM.apps.get('facebook'),'wkattribute':window.GCM.apps.get('wkattribute'),'socialmedia':window.GCM.apps.get('socialmedia')}});}
|
||
function getCookie(cname){var name=cname+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1);if(c.indexOf(name)==0)return c.substring(name.length,c.length);}
|
||
return"";}
|
||
function saveCookie(){window.GCM.settings.save();setCookie("cookiesAllowed",true,365);$('.popup__cookie').remove();if($('.popup__area').length){$('.popup__area').show();}else{$('body').removeClass('hasPopup');}}
|
||
function checkCookie(){var cookie=getCookie("cookiesAllowed");if(cookie==""||!window.GCM.settings.active()||window.GCM.settings.configChanged()){$('body').prepend('<div class="popup popup__cookie">'+'<style scoped>'+'body.hasPopup > * { opacity: 0.5; }'+'body.hasPopup .popup { opacity: 1; width: 60%; background: #fff; -webkit-box-shadow: 0px 0px 30px 0 rgba(0,0,0,0.7); -moz-box-shadow: 0px 0px 30px 0 rgba(0,0,0,0.7); box-shadow: 0px 0px 30px 0 rgba(0,0,0,0.7); padding: 60px; position: fixed; z-index: 2000; left: 20%; top: 15%; overflow: auto; max-height: 80%; display: block; }'+'.popup p > strong { font-size: 20px; }'+'.popup .btn-success { margin: 20px 0; }'+'#cookiehint > p:last-child, #cookiesettings > p:last-child { text-align: center; }'+'#cookiesettings{z-index:2000;font-size:17px;color:#333}#cookiesettings p{font-family:inherit}#cookiesettings h4{font-size:20px;color:#304c59}#cookiesettings .btn{text-transform:none;-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}#cookiegroups .panel{border:0;margin:5px 0;box-shadow:none;position:relative}#cookiegroups .panel-heading{background:#678089;padding:0;margin-left:30px}#cookiegroups .panel-title{font-weight:400;font-size:inherit}#cookiegroups .panel-title>a{color:#fff;position:relative;display:block;border:none;padding:11px 40px 9px 20px}#cookiegroups .panel-title>a::before{display:none}#cookiegroups .panel-title>a::after{content:" ";position:absolute;right:20px;background:url(https://www.wko.at/css-js/images/arrow-down-white.svg) no-repeat center;background-size:contain;height:15px;width:15px}#cookiegroups .panel-title>a:focus,#cookiegroups .panel-title>a:hover{text-decoration:none}#cookiegroups .panel-title>a[aria-expanded=true]::after{background-image:url(https://www.wko.at/css-js/images/arrow-up-white.svg)}#cookiegroups .panel-body{padding-top:20px;padding-left:30px}#cookiegroups .panel-body>div[class^=app-]>p:last-child{font-weight:400;font-size:13px}#cookiegroups .panel-body>div[class^=app-]>p:first-child{font-size:15px;font-weight:500;margin-bottom:0}#cookiegroups .panel-body>div[class^=app-]>p>.appname,#cookiegroups .panel-body>div[class^=app-]>p>.cookieid{display:inline-block;margin-right:5px}#cookiegroups .panel-body>div[class^=app-]>p>.cookieid:last-child{margin-right:0}#cookiegroups .cookieswitch{position:relative;margin-bottom:15px}#cookiegroups .cookieswitch .cookieid{font-size:15px;font-weight:500;display:block;margin-left:60px}#cookiegroups .cookieswitch p{font-weight:400;font-size:13px;margin-left:60px;margin-bottom:0}#cookiegroups .cookieswitch p .appname{font-size:15px;font-weight:500}#cookiesettings .panel-heading,#cookiesettings button,.cookiehint button{border-radius:0}'+'input[type=checkbox]+.toggleCookie{position:relative;float:left;width:50px;height:20px;cursor:pointer;-webkit-tap-highlight-color:transparent;transform:translate3d(0,0,0)}input[type=checkbox]+.toggleCookie:before{content:"Ein";position:relative;width:49px;height:24px;display:block;background:#ccc;border-radius:20px;transition:background .2s ease;padding:6px 0 0 5px;color:#fff;font-size:11px;top:0;box-shadow:none;border:none}input[type=checkbox]+.toggleCookie:after{content:"Aus";position:absolute;right:4px;top:6px;font-size:11px;color:#fff}input[type=checkbox]+.toggleCookie span{position:absolute;top:2px;left:2px;width:20px;height:20px;display:block;background:#fff;border-radius:10px;box-shadow:2px 0 5px 0 rgba(0,0,0,.3);transition:all .2s ease}input[type=checkbox]+.toggleCookie span:before{content:"";position:absolute;display:block;margin:-18px;width:56px;height:56px;background:rgba(76,174,76,.5);border-radius:50%;transform:scale(0);opacity:1;pointer-events:none}.cookieswitch input[type=checkbox].checkbox-cookie{position:absolute;top:0;left:0;width:50px;height:25px;-webkit-appearance:none;display:inline-block;margin:0}.cookieswitch input[type=checkbox].checkbox-cookie:focus{outline:0;border:2px solid #add8e6}input[type=checkbox].checkbox-cookie:checked+.toggleCookie:before{background:#5cb85c}input[type=checkbox].checkbox-cookie:checked+.toggleCookie span{transform:translateX(25px);transition:all .2s cubic-bezier(.8,.4,.3,1.25),background .15s ease;box-shadow:-2px 0 5px 0 rgba(255,255,255,.3)}.checkbox-cookie:checked+.toggleCookie span:before{transform:scale(1);opacity:0;transition:all .4s ease}.select-cookie-group:hover{cursor:pointer}.panel-default>input[type=checkbox],input[type=checkbox]#select-all-cookies,input[type=checkbox].select-cookie-group{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:15px;width:15px;border:1px solid gray;float:left;margin:10px 15px 0 0;position:relative;opacity:1}.panel-default>input[type=checkbox]:checked:before,input[type=checkbox]#select-all-cookies:checked:before,input[type=checkbox].select-cookie-group:checked:before{content:"";height:2px;width:4px;background:gray;display:block;position:absolute;left:1px;top:7px;transform:rotate(45deg)}.panel-default>input[type=checkbox]:checked:after,input[type=checkbox]#select-all-cookies:checked:after,input[type=checkbox].select-cookie-group:checked:after{content:"";height:2px;width:11px;background:gray;display:block;position:absolute;left:2px;top:5px;transform:rotate(-45deg)}.panel-default>input[type=checkbox]:indeterminate:after,input[type=checkbox]#select-all-cookies:indeterminate:after,input[type=checkbox].select-cookie-group:indeterminate:after{content:"";height:2px;width:9px;background:gray;display:block;position:absolute;left:2px;top:5px}.panel-default>input[type=checkbox]:disabled,input[type=checkbox]#select-all-cookies:disabled,input[type=checkbox].select-cookie-group:disabled{border-color:#d3d3d3}.panel-default>input[type=checkbox]:disabled:after,.panel-default>input[type=checkbox]:disabled:before,input[type=checkbox]#select-all-cookies:disabled:after,input[type=checkbox]#select-all-cookies:disabled:before,input[type=checkbox].select-cookie-group:disabled:after,input[type=checkbox].select-cookie-group:disabled:before{background:#d3d3d3}input[type=checkbox]#select-all-cookies{margin-top:2px}input[type=checkbox]#select-all-cookies:hover{cursor:pointer}.panel-default>input[type=checkbox]:focus,input[type=checkbox]#select-all-cookies:focus,input[type=checkbox].select-cookie-group:focus{outline:0}.panel-default>input[type=checkbox]:focus,input[type=checkbox]#select-all-cookies:focus,input[type=checkbox].select-cookie-group:focus{border-color:#add8e6;border-width:2px}#cookiegroups .panel-heading:before{display:none}#cookiegroups .panel-title>a:focus{border:2px solid #add8e6;outline:0}'+'@media print{.popup{display:none}}.cookie-visible.one .navbar-fixed-top{position:static}.one #cookiesettings [id],.one .modal.fade{padding-top:0;margin-top:0}.blog #cookiegroups .cookieswitch .cookieid,.one #cookiegroups .cookieswitch .cookieid{font-weight:700}.blog #cookiesettings button,.blog .cookiehint button{padding:0 15px;min-height:34px}body.mein-wko #cookiesettings button,body[id*=faz_] #cookiesettings button,body[id*=pageElement] #cookiesettings button{border:none!important}body.mein-wko .btn-default,body[id*=faz_] .btn-default,body[id*=pageElement] .btn-default{color:#333!important;background-color:#e6e6e6}body.mein-wko .btn-default:focus,body.mein-wko .btn-default:hover,body[id*=faz_] .btn-default:focus,body[id*=faz_] .btn-default:hover,body[id*=pageElement] .btn-default:focus,body[id*=pageElement] .btn-default:hover{color:#333!important;background-color:#d4d4d4!important}body.mein-wko #cookiesettings .toggle-group .btn,body[id*=faz_] #cookiesettings .toggle-group .btn,body[id*=pageElement] #cookiesettings .toggle-group .btn{border-width:0!important}body.mein-wko #cookiesettings .toggle-group .btn.toggle-handle,body[id*=faz_] #cookiesettings .toggle-group .btn.toggle-handle,body[id*=pageElement] #cookiesettings .toggle-group .btn.toggle-handle{border-width:0 1px!important;background:#fff!important;position:absolute}body.mein-wko #cookiesettings .toggle-group .btn.toggle-on{font-size:13px}body.mein-wko .popup__cookie .btn-success{background-color:#5cb85c}body.mein-wko .popup__cookie .btn-success:focus,body.mein-wko .popup__cookie .btn-success:hover{background-color:#449d44}'+'@media (max-width: 991px) {'+'body.hasPopup .popup { top: 50px; } '+'body.hasPopup .top-section .nav-section { position: static; } '+'}'+'@media (max-width: 767px) {'+'body.hasPopup .popup { padding: 20px; width: 80%; left: 10%; top: 5%; font-size: 15px; }'+'#cookiesettings, .btn { font-size: 15px; }'+'#areas .col-sm-6 { padding: 0; }'+'#areas .radio { margin: 10px 0; }'+'#areas .radio label { font-size: 17px; }'+'}'+'@media (min-width: 786px) {'+'body.hasPopup .popup { font-size: 17px; padding: 60px; top: 15%; left: 20%; width: 60%; }'+'}'+'.popup::-webkit-scrollbar-track { -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.2); background-color: #F5F5F5; }'+'.popup::-webkit-scrollbar { width: 6px; background-color: #F5F5F5; }'+'.popup::-webkit-scrollbar-thumb { background-color: #ccc; }'+'#cookiesettings { display: none; }'+'</style>'+'<div id="cookiehint">'+'<p>Diese Website verwendet Cookies - nähere Informationen dazu und zu Ihren Rechten als Benutzer finden Sie in unserer Datenschutzerklärung am Ende der Seite. Klicken Sie auf <span class="cookie-italic">„Ich stimme zu“</span>, um Cookies zu akzeptieren und direkt unsere Webseite besuchen zu können, oder klicken Sie auf <span class="cookie-italic">„<a href="#" id="show-cookiesettings">Cookie-Einstellungen</a>“</span>, um Ihre Cookies selbst zu verwalten.</p>'+'<p><button class="cookieagree btn btn-success" data-gtm-element="cookieconsent-banner">Ich stimme zu</button></p>'+'</div>'+'</div>').addClass('hasPopup');editCookieSettings();$('.cookieagree').on('click',function(){window.GCM.apps.setAllAndSave(true);window.GCM.settings.save();setCookie("cookiesAllowed",true,365);$('.popup__cookie').remove();if($('.popup__area').length){$('.popup__area').show();}else{$('body').removeClass('hasPopup');}});$('#show-cookiesettings').on('click',function(e){e.preventDefault();$('#cookiesettings').show();$('#cookiehint').hide();});}}
|
||
function editCookieSettings(){$('.popup__cookie').append('<div id="cookiesettings">'+'<p><strong>Cookie-Einstellungen</strong></p>'+'<p>Hier können Sie die Cookie-Einstellungen verschiedener Tools, die auf dieser Domain und ihren Subdomains verwendet werden, einsehen bzw. ändern.</p>'+'<p><label><input type="checkbox" id="select-all-cookies" />Alle Auswählen</label></p>'+'<div class="panel-group" id="cookiegroups" role="tablist" aria-multiselectable="true">'+'</div>'+'<p><button type="button" class="btn btn-success" onclick="saveCookie();" data-gtm-element="cookieconsent-settings">Einstellungen speichern</button></p>'+'</div>');reloadCookies();toggleCookies();}
|
||
function reloadCookies(){var groups=window.GCM.groups.getList();var groupContainer='';for(var g in groups){var group=groups[g];var groupChecked=true;var groupCheckedNone=true;var appsContainer='';for(var i in group.apps){var app=group.apps[i];var checked='';if(app.value){var checked='checked';groupCheckedNone=false;}else{groupChecked=false;}
|
||
var cookieContainer='';for(var j in app.cookies){var single=singleCookie(j);cookieContainer+=single;}
|
||
appsContainer=appsContainer+innerAccordionWrapper(i,app.label,cookieContainer,checked,app.protected,app.description);}
|
||
groupContainer=groupContainer+outerAccordionWrapper(g,group.label,appsContainer,group.description,app.protected);}
|
||
$('#cookiegroups').html(groupContainer);}
|
||
function outerAccordionWrapper(groupId,groupName,groupContent,groupDescription,protected){var groupCheckbox;if(protected){groupCheckbox='<input type="checkbox" checked disabled />';}else{groupCheckbox='<input type="checkbox" class="select-cookie-group" />';}
|
||
return'<div class="panel panel-default">'+
|
||
groupCheckbox+'<div class="panel-heading" role="tab" id="'+groupId+'heading">'+'<h6 class="panel-title">'+'<a role="button" data-toggle="collapse" data-parent="#cookiegroups" href="#'+groupId+'cookies" aria-expanded="false" aria-controls="'+groupId+'cookies" class="collapsed">'+
|
||
groupName+'</a>'+'</h6>'+'</div>'+'<div id="'+groupId+'cookies" class="panel-collapse collapse" role="tabpanel" aria-labelledby="'+groupId+'heading" aria-expanded="false">'+'<div class="panel-body">'+'<p class="cookie_groupdesc">'+groupDescription+'</p>'+
|
||
groupContent+'</div>'+'</div>'+'</div>';}
|
||
function innerAccordionWrapper(appId,appName,appContent,checked,protected,appDescription){if(protected){return'<div class="app-'+appId+'">'+'<p><span class="appname">'+appName+'</span>('+appContent+')</p>'+'<p>'+appDescription+'</p>'+'</div>';}else{return'<div class="app-'+appId+'">'+'<div class="cookieswitch"><input class="checkbox-cookie" data-appid="'+appId+'" id="app-'+appId+'" type="checkbox" '+checked+'/><label for="app-'+appId+'" class="toggleCookie"><span></span></label> '+'<p><span class="appname">'+appName+'</span></p>'+'<p>'+appDescription+'</p>'+'</div>'+'</div>';}}
|
||
function singleCookie(cookie){return'<span class="cookieid">'+cookie+'</span>';}
|
||
function toggleCookies(){$('.panel-default').each(function(){var selectAll=$(this).find('.select-cookie-group');var checkboxes=$(this).find('.checkbox-cookie').length;var checked=$(this).find('.checkbox-cookie:checked').length;if(checked>0&&checked<checkboxes){selectAll.prop('indeterminate',true);}
|
||
if(checked===0){selectAll.prop('checked',false);}
|
||
if(checked===checkboxes){selectAll.prop('checked',true);}
|
||
allCookiesChecked();});$('#select-all-cookies').on('click',function(){if($(this).prop('checked')){$('#cookiegroups .select-cookie-group, #cookiegroups .checkbox-cookie').prop({'checked':true,'indeterminate':false}).change();}else{$('#cookiegroups .select-cookie-group, #cookiegroups .checkbox-cookie').prop({'checked':false,'indeterminate':false}).change();}});$('.select-cookie-group').on('click',function(){if($(this).prop('checked')){$(this).closest('.panel-default').find('.checkbox-cookie').prop('checked',true).change();}else{$(this).closest('.panel-default').find('.checkbox-cookie').prop('checked',false).change();}
|
||
allCookiesChecked();});$('.checkbox-cookie').on('click',function(){var cookieGroup=$(this).closest('.panel-default');var selectAll=cookieGroup.find('.select-cookie-group');var checkboxes=cookieGroup.find('.checkbox-cookie').length;var checked=cookieGroup.find('.checkbox-cookie:checked').length;switch(checked){case checkboxes:selectAll.prop({'checked':true,'indeterminate':false});break;case 0:selectAll.prop({'checked':false,'indeterminate':false});break;default:selectAll.prop('indeterminate',true);}
|
||
allCookiesChecked();});$('.checkbox-cookie').on('change',function(){$('.checkbox-cookie:checked').each(function(){window.GCM.apps.set($(this).data('appid'),true);});$('.checkbox-cookie').not(':checked').each(function(){window.GCM.apps.set($(this).data('appid'),false);});});}
|
||
function allCookiesChecked(){var selectAll=$('.select-cookie-group');var selectAllChecked=$('.select-cookie-group:checked');if(selectAll.length===selectAllChecked.length){$('#select-all-cookies').prop('checked',true);}else{$('#select-all-cookies').prop('checked',false);}}
|
||
window.selectArea=function(){if(window.location.href.indexOf("datenschutzerklaerung.html")>-1){}else{var blText;if($('body').hasClass('news')){blText='Ich möchte News aus der Wirtschaftskammer';}else{blText='Treffen Sie eine Auswahl, um die passenden Serviceangebote und Kontakte Ihrer Wirtschaftskammer zu erhalten.';}
|
||
$('body').prepend('<div class="popup popup__area">'+'<style scoped>'+'#selectarea input:checked:after { background: #304C59; width: 11px; height: 11px; content: " "; border-radius: 50%; display: block; margin: 2px; }'+'body.hasPopup > * { opacity: 0.5; }'+'body.hasPopup .popup { opacity: 1; width: 60%; background: #fff; -webkit-box-shadow: 0px 0px 30px 0 rgba(0,0,0,0.7); -moz-box-shadow: 0px 0px 30px 0 rgba(0,0,0,0.7); box-shadow: 0px 0px 30px 0 rgba(0,0,0,0.7); padding: 60px; position: fixed; z-index: 2000; left: 20%; top: 15%; overflow: auto; max-height: 80%; display: block; }'+'.popup p > strong { font-size: 20px; }'+'.popup .btn-success { margin: 20px 0; }'+'#selectarea .button { text-align: center; }'+'#selectarea input { -webkit-appearance: none; height: 17px; width: 17px; border-radius: 50%; border: 1px solid #304C59; margin-left: -30px; }'+'#selectarea label { padding-left: 30px; }'+'#selectarea .radio { margin: 20px 0; }'+'@media (max-width: 991px) {'+'body.hasPopup .popup { top: 50px; } '+'body.hasPopup .top-section .nav-section { position: static; } '+'}'+'@media (max-width: 767px) {'+'body.hasPopup .popup { padding: 20px; width: 80%; left: 10%; top: 5%; font-size: 15px; }'+'#cookiesettings, .btn { font-size: 15px; }'+'#areas .col-sm-6 { padding: 0; }'+'#areas .radio { margin: 10px 0; }'+'#areas .radio label { font-size: 17px; }'+'}'+'@media (min-width: 786px) {'+'body.hasPopup .popup { font-size: 17px; padding: 60px; top: 15%; left: 20%; width: 60%; }'+'}'+'.popup::-webkit-scrollbar-track { -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.2); background-color: #F5F5F5; }'+'.popup::-webkit-scrollbar { width: 6px; background-color: #F5F5F5; }'+'.popup::-webkit-scrollbar-thumb { background-color: #ccc; }'+'</style>'+'<div id="selectarea">'+'<p><strong>Wählen Sie Ihr Angebot</strong></p>'+'<p>'+blText+'</p>'+'<div id="areas">'+'<form onsubmit="return false;">'+'<div class="col-sm-6">'+'<div class="radio">'+'<label><input type="radio" name="areas" value="b"> Burgenland</label>'+'</div>'+'<div class="radio">'+'<label><input type="radio" name="areas" value="k"> Kärnten</label>'+'</div>'+'<div class="radio">'+'<label><input type="radio" name="areas" value="noe"> Niederösterreich</label>'+'</div>'+'<div class="radio">'+'<label><input type="radio" name="areas" value="ooe"> Oberösterreich</label>'+'</div>'+'<div class="radio">'+'<label><input type="radio" name="areas" value="sbg"> Salzburg</label>'+'</div>'+'</div>'+'<div class="col-sm-6">'+'<div class="radio">'+'<label><input type="radio" name="areas" value="stmk"> Steiermark</label>'+'</div>'+'<div class="radio">'+'<label><input type="radio" name="areas" value="t"> Tirol</label>'+'</div>'+'<div class="radio">'+'<label><input type="radio" name="areas" value="vbg"> Vorarlberg</label>'+'</div>'+'<div class="radio">'+'<label><input type="radio" name="areas" value="w"> Wien</label>'+'</div>'+'<div class="radio">'+'<label><input type="radio" name="areas" value="oe"> Österreich</label>'+'</div>'+'</div>'+'<p>Ihre Einstellung können Sie jederzeit über das Auswahlmenü links oben verändern.</p>'+'<div class="button">'+'<button name="submit" type="submit" class="btn btn-success" data-gtm-element="portal-region-selection" disabled>Auswahl speichern</button>'+'</div>'+'</form>'+'</div>'+'</div>'+'</div>').addClass('hasPopup');var area;$('#selectarea form input').on('change',function(){area=$('input[name=areas]:checked','#selectarea form').val();$('#selectarea button').removeAttr('disabled');});$('#selectarea button').on('click',function(){WKFE.updateBundeslandWithCookie(area);$('body').removeClass('hasPopup');});}} |