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