").html(a).text()&&(s=""),r=s.length?'
'+s+"
":"",r+=a.length?'
'+a+"
":"",o.html(r).fadeIn("slow")),e("div#jp-carousel-comment-form-container").css("margin-top","20px"),e("div#jp-carousel-comments-loading").css("margin-top","20px")},updateExif:function(t){if(!t||1!==Number(jetpackCarouselStrings.display_exif))return!1;var a=e("
");e.each(t,function(t,o){if(0!==parseFloat(o)&&o.length&&-1!==e.inArray(t,e.makeArray(jetpackCarouselStrings.meta_data))){switch(t){case"focal_length":o+="mm";break;case"shutter_speed":o=i.jp_carousel("shutterSpeed",o);break;case"aperture":o="f/"+o}a.append("
"+jetpackCarouselStrings[t]+"
"+o+"")}}),e("div.jp-carousel-image-meta ul.jp-carousel-image-exif").replaceWith(a)},updateFullSizeLink:function(t){if(!t||!t.data)return!1;var a,o=t.data("orig-size").split(","),s=document.createElement("a");s.href=t.data("src").replace(/\?.+$/,""),a=null!==s.hostname.match(/^i[\d]{1}.wp.com$/i)?s.href:t.data("orig-file").replace(/\?.+$/,"");var r=e("
"+i.jp_carousel("format",{text:jetpackCarouselStrings.download_original,replacements:o})+"").addClass("jp-carousel-image-download").attr("href",a).attr("target","_blank");e("div.jp-carousel-image-meta a.jp-carousel-image-download").replaceWith(r)},updateMap:function(t){if(t.latitude&&t.longitude&&1===Number(jetpackCarouselStrings.display_geo)){var a=t.latitude,i=t.longitude,o=e("div.jp-carousel-image-meta","div.jp-carousel-wrap"),s="&scale=2&style=feature:all|element:all|invert_lightness:true|hue:0x0077FF|saturation:-50|lightness:-5|gamma:0.91";e("
").addClass("jp-carousel-image-map").html('

\t\t\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\t\t').prependTo(o)}},testCommentsOpened:function(t){1===parseInt(t,10)?(e(".jp-carousel-buttons").fadeIn("fast"),j.fadeIn("fast")):(e(".jp-carousel-buttons").fadeOut("fast"),j.fadeOut("fast"))},getComments:function(t){if(clearInterval(m),"object"==typeof t&&void 0!==t.attachment_id&&t.attachment_id){(!t.offset||void 0===t.offset||t.offset<1)&&(t.offset=0);var a=e(".jp-carousel-comments"),o=e("#jp-carousel-comments-loading").show();t.clear&&a.hide().empty(),e.ajax({type:"GET",url:jetpackCarouselStrings.ajaxurl,dataType:"json",data:{action:"get_attachment_comments",nonce:jetpackCarouselStrings.nonce,id:t.attachment_id,offset:t.offset},success:function(s){t.clear&&a.fadeOut("fast").empty(),e(s).each(function(){var o=e("
").addClass("jp-carousel-comment").attr("id","jp-carousel-comment-"+this.id).html('");a.append(o),clearInterval(m),m=setInterval(function(){e(".jp-carousel-overlay").height()-150
0?a.height():f.height())+200),a.show(),o.hide()},error:function(e,t,i){console.log("Comment get fail...",e,t,i),a.fadeIn("fast"),o.fadeOut("fast")}})}},postCommentError:function(t){"object"!=typeof t&&(t={}),t.field&&void 0!==t.field&&t.error&&void 0!==t.error&&(e("#jp-carousel-comment-post-results").slideUp("fast").html('").slideDown("fast"),e("#jp-carousel-comment-form-spinner").hide())},setCommentIframeSrc:function(t){var a=e("#jp-carousel-comment-iframe");a&&a.length&&(a.attr("src",a.attr("src").replace(/(postid=)\d+/,"$1"+t)),a.attr("src",a.attr("src").replace(/(%23.+)?$/,"%23jp-carousel-"+t)))},clearCommentTextAreaValue:function(){var t=e("#jp-carousel-comment-form-comment-field");t&&t.val("")},nextSlide:function(){var e=this.jp_carousel("slides"),t=this.jp_carousel("selectedSlide");return 0===t.length||e.length>2&&t.is(e.last())?e.first():t.next()},prevSlide:function(){var e=this.jp_carousel("slides"),t=this.jp_carousel("selectedSlide");return 0===t.length||e.length>2&&t.is(e.first())?e.last():t.prev()},loadFullImage:function(t){var a=t.find("img:first");a.data("loaded")||(a.on("load.jetpack",function(){a.off("load.jetpack"),e(this).closest(".jp-carousel-slide").css("background-image","")}),!t.data("preview-image")||t.data("thumb-size")&&t.width()>t.data("thumb-size").width?a.attr("src",a.closest(".jp-carousel-slide").data("src")).attr("itemprop","image"):a.attr("src",t.data("preview-image")).attr("itemprop","image"),a.data("loaded",1))},hasMultipleImages:function(){return i.jp_carousel("slides").length>1}};e.fn.jp_carousel=function(t){return I[t]?I[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void e.error("Method "+t+" does not exist on jQuery.jp_carousel"):I.open.apply(this,arguments)},e(document.body).on("click.jp-carousel","div.gallery, div.tiled-gallery, ul.wp-block-gallery, ul.blocks-gallery-grid, div.wp-block-jetpack-tiled-gallery, a.single-image-gallery",function(t){e(this).jp_carousel("testForData",t.currentTarget)&&(e(t.target).parent().hasClass("gallery-caption")||e(t.target).parent().is("figcaption")||(e("html").css("height","auto"),t.preventDefault(),t.stopPropagation(),e(this).jp_carousel("open",{start_index:e(this).find(".gallery-item, .tiled-gallery-item, .blocks-gallery-item, .tiled-gallery__item").index(e(t.target).parents(".gallery-item, .tiled-gallery-item, .blocks-gallery-item, .tiled-gallery__item"))})))}),1===Number(jetpackCarouselStrings.single_image_gallery)&&(C(),e(document.body).on("post-load",function(){C()})),e(window).on("hashchange.jp-carousel",function(){var t,a,s,r=/jp-carousel-(\d+)/;window.location.hash&&r.test(window.location.hash)?window.location.hash===y&&i.opened||(window.location.hash&&i&&!i.opened&&history.back?history.back():(y=window.location.hash,t=window.location.hash.match(r),a=parseInt(t[1],10),e("div.gallery, div.tiled-gallery, a.single-image-gallery, ul.wp-block-gallery, div.wp-block-jetpack-tiled-gallery").each(function(t,i){if(e(i).find("img").each(function(t,o){if(e(o).data("attachment-id")===parseInt(a,10))return s={index:t,gallery:i},!1}),s)return e(s.gallery).jp_carousel("openOrSelectSlide",s.index),!1}))):i&&i.opened&&o.jp_carousel("close")}),window.location.hash&&e(window).trigger("hashchange")}),function(e){e.fn.touchwipe=function(t){var a={min_move_x:20,min_move_y:20,wipeLeft:function(){},wipeRight:function(){},wipeUp:function(){},wipeDown:function(){},preventDefaultEvents:!0};return t&&e.extend(a,t),this.each(function(){var e,t,i=!1;function o(){this.removeEventListener("touchmove",s),e=null,i=!1}function s(s){if(a.preventDefaultEvents&&s.preventDefault(),i){var r=s.touches[0].pageX,n=s.touches[0].pageY,l=e-r,c=t-n;Math.abs(l)>=a.min_move_x?(o(),l>0?a.wipeLeft(s):a.wipeRight(s)):Math.abs(c)>=a.min_move_y&&(o(),c>0?a.wipeDown(s):a.wipeUp(s))}}"ontouchstart"in document.documentElement&&this.addEventListener("touchstart",function(a){1===a.touches.length&&(e=a.touches[0].pageX,t=a.touches[0].pageY,i=!0,this.addEventListener("touchmove",s,!1))},!1)}),this}}(jQuery);;
/* Do not modify this file directly. It is compiled from other files. */
!function(e){function i(){this.galleries=[],this.findAndSetupNewGalleries()}function t(e){this.gallery=e,this.addCaptionEvents(),this.resize(),this.gallery.removeClass("tiled-gallery-unresized")}i.prototype.findAndSetupNewGalleries=function(){var i=this;e(".tiled-gallery.tiled-gallery-unresized").each(function(){i.galleries.push(new t(e(this)))})},i.prototype.resizeAll=function(){e.each(this.galleries,function(e,i){i.resize()})},t.prototype.resizeableElementsSelector=".gallery-row, .gallery-group, .tiled-gallery-item img",t.prototype.addCaptionEvents=function(){this.gallery.find(".tiled-gallery-caption").hide(),this.gallery.find(".tiled-gallery-item").hover(function(){e(this).find(".tiled-gallery-caption").stop(!0,!0).slideDown("fast")},function(){e(this).find(".tiled-gallery-caption").stop(!0,!0).slideUp("fast")})},t.prototype.getExtraDimension=function(e,i,t){if("horizontal"===t){var n="border"===i?"borderLeftWidth":i+"Left",r="border"===i?"borderRightWidth":i+"Right";return(parseInt(e.css(n),10)||0)+(parseInt(e.css(r),10)||0)}if("vertical"===t){var o="border"===i?"borderTopWidth":i+"Top",a="border"===i?"borderBottomWidth":i+"Bottom";return(parseInt(e.css(o),10)||0)+(parseInt(e.css(a),10)||0)}return 0},t.prototype.resize=function(){var i=this.gallery.data("original-width"),t=this.gallery.parent().width(),n=Math.min(1,t/i),r=this;this.gallery.find(this.resizeableElementsSelector).each(function(){var i=e(this),t=r.getExtraDimension(i,"margin","horizontal"),o=r.getExtraDimension(i,"margin","vertical"),a=r.getExtraDimension(i,"padding","horizontal"),l=r.getExtraDimension(i,"padding","vertical"),s=r.getExtraDimension(i,"border","horizontal"),d=r.getExtraDimension(i,"border","vertical"),c=i.data("original-width")+a+s+t,h=i.data("original-height")+l+d+o;i.width(Math.floor(n*c)-t).height(Math.floor(n*h)-o)})};var n=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame;e(document).ready(function(){var t=new i;e("body").on("post-load",function(e,i){"string"==typeof i&&"resize"===i?t.resizeAll():t.findAndSetupNewGalleries()}),e(document).on("page-rendered.wpcom-newdash",function(){t.findAndSetupNewGalleries()}),window.chrome&&n?function(i){var t=!1,r=null;function o(){i.resizeAll(),t&&n(o)}e(window).resize(function(){clearTimeout(r),t||n(o),t=!0,r=setTimeout(function(){t=!1},15)})}(t):function(i){e(window).resize(function(){i.resizeAll()})}(t),"undefined"!=typeof wp&&wp.customize&&wp.customize.selectiveRefresh&&wp.customize.selectiveRefresh.bind("partial-content-rendered",function(e){wp.isJetpackWidgetPlaced(e,"gallery")&&t.findAndSetupNewGalleries()})})}(jQuery);;
var ak_js = document.getElementById( "ak_js" );
if ( ! ak_js ) {
ak_js = document.createElement( 'input' );
ak_js.setAttribute( 'id', 'ak_js' );
ak_js.setAttribute( 'name', 'ak_js' );
ak_js.setAttribute( 'type', 'hidden' );
}
else {
ak_js.parentNode.removeChild( ak_js );
}
ak_js.setAttribute( 'value', ( new Date() ).getTime() );
var commentForm = document.getElementById( 'commentform' );
if ( commentForm ) {
commentForm.appendChild( ak_js );
}
else {
var replyRowContainer = document.getElementById( 'replyrow' );
if ( replyRowContainer ) {
var children = replyRowContainer.getElementsByTagName( 'td' );
if ( children.length > 0 ) {
children[0].appendChild( ak_js );
}
}
};