/* Cookie */ (function(factory){var registeredInModuleLoader=false;if(typeof define==='function'&&define.amd){define(factory);registeredInModuleLoader=true}if(typeof exports==='object'){module.exports=factory();registeredInModuleLoader=true}if(!registeredInModuleLoader){var OldCookies=window.Cookies;var api=window.Cookies=factory();api.noConflict=function(){window.Cookies=OldCookies;return api}}}(function(){function extend(){var i=0;var result={};for(;i1){attributes=extend({path:'/'},api.defaults,attributes);if(typeof attributes.expires==='number'){var expires=new Date();expires.setMilliseconds(expires.getMilliseconds()+attributes.expires*864e+5);attributes.expires=expires}attributes.expires=attributes.expires?attributes.expires.toUTCString():'';try{result=JSON.stringify(value);if(/^[\{\[]/.test(result)){value=result}}catch(e){}if(!converter.write){value=encodeURIComponent(String(value)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent)}else{value=converter.write(value,key)}key=encodeURIComponent(String(key));key=key.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent);key=key.replace(/[\(\)]/g,escape);var stringifiedAttributes='';for(var attributeName in attributes){if(!attributes[attributeName]){continue}stringifiedAttributes+='; '+attributeName;if(attributes[attributeName]===true){continue}stringifiedAttributes+='='+attributes[attributeName]}return(document.cookie=key+'='+value+stringifiedAttributes)}if(!key){result={}}var cookies=document.cookie?document.cookie.split('; '):[];var rdecode=/(%[0-9A-Z]{2})+/g;var i=0;for(;i');return jQuery(textarea).next(".autogrow-textarea-mirror")[0]};var sendContentToMirror=function(textarea){mirror.innerHTML=String(textarea.value).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">").replace(/\n/g,"
")+".
.";if(jQuery(textarea).height()!=jQuery(mirror).height())jQuery(textarea).height(jQuery(mirror).height())};var growTextarea=function(){sendContentToMirror(this)};var mirror=createMirror(this);mirror.style.display="none";mirror.style.wordWrap="break-word";mirror.style.padding=jQuery(this).css("padding");mirror.style.width=jQuery(this).css("width");mirror.style.fontFamily=jQuery(this).css("font-family");mirror.style.fontSize=jQuery(this).css("font-size");mirror.style.lineHeight=jQuery(this).css("line-height");this.style.overflow="hidden";this.style.minHeight=this.rows+"em";this.onkeydown=growTextarea;sendContentToMirror(this)})}; /* wpDiscuz */ var wpdiscuzLoadRichEditor=parseInt(wpdiscuzAjaxObj.loadRichEditor);if(wpdiscuzLoadRichEditor&&document.querySelector(".wpdiscuz-textarea-wrap"))var wpDiscuzEditor=new WpdEditor;function wpdMessagesOnInit(a,b){wpdiscuzAjaxObj.setCommentMessage(a,b),setTimeout(function(){location.href=location.href.substring(0,location.href.indexOf("wpdiscuzUrlAnchor")-1)},3e3)}wpdiscuzAjaxObj.setCommentMessage=function(c,b,d){var a="wpdiscuz-message-error";if(c instanceof Array)for(var e in c)b instanceof Array?"success"===b[e]?a="wpdiscuz-message-success":"warning"===b[e]&&(a="wpdiscuz-message-warning"):"success"===b?a="wpdiscuz-message-success":"warning"===b&&(a="wpdiscuz-message-warning"),jQuery("
").addClass(a).html(c[e]).prependTo("#wpdiscuz-comment-message").delay(d instanceof Array?d[e]:d||4e3).fadeOut(1e3,function(){jQuery(this).remove()});else"success"===b?a="wpdiscuz-message-success":"warning"===b&&(a="wpdiscuz-message-warning"),jQuery("
").addClass(a).html(c).prependTo("#wpdiscuz-comment-message").delay(d||4e3).fadeOut(1e3,function(){jQuery(this).remove()})},wpdiscuzAjaxObj.applyFilterOnPhrase=function(a,b,c){return wpdiscuzAjaxObj.phraseFilters&&jQuery.each(wpdiscuzAjaxObj.phraseFilters,function(d){"function"==typeof wpdiscuzAjaxObj[wpdiscuzAjaxObj.phraseFilters[d]]&&(a=wpdiscuzAjaxObj[wpdiscuzAjaxObj.phraseFilters[d]](a,b,c))}),a},jQuery(document).ready(function($){$("body").addClass("wpdiscuz_"+wpdiscuzAjaxObj.version);var H,c=wpdiscuzAjaxObj.is_user_logged_in,q=1==wpdiscuzAjaxObj.wc_captcha_show_for_guest&&!c,r=1==wpdiscuzAjaxObj.wc_captcha_show_for_members&&c,e=wpdiscuzAjaxObj.wpDiscuzReCaptchaVersion,s=parseInt(wpdiscuzAjaxObj.commentListLoadType),I=parseInt(wpdiscuzAjaxObj.wc_post_id);wpdiscuzAjaxObj.wpdiscuz_nonce="";var t=parseInt(wpdiscuzAjaxObj.commentListUpdateType),u=1e3*parseInt(wpdiscuzAjaxObj.commentListUpdateTimer),v=parseInt(wpdiscuzAjaxObj.liveUpdateGuests),w=wpdiscuzAjaxObj.loadLastCommentId,J=w,f=parseInt(wpdiscuzAjaxObj.firstLoadWithAjax);Cookies.get("wpdiscuz_comments_sorting")&&Cookies.remove("wpdiscuz_comments_sorting",{path:""}),Cookies.get("wordpress_last_visit")&&Cookies.remove("wordpress_last_visit",{path:""}),Cookies.get("wpdiscuz_last_visit")&&Cookies.remove("wpdiscuz_last_visit",{path:""});var i=parseInt(wpdiscuzAjaxObj.wordpressIsPaginate),K=wpdiscuzAjaxObj.storeCommenterData,L=parseInt(wpdiscuzAjaxObj.wmuEnabled),M=wpdiscuzAjaxObj.isCookiesEnabled,N=!0,g=wpdiscuzAjaxObj.cookiehash,O=parseInt(wpdiscuzAjaxObj.isLoadOnlyParentComments),P=parseInt(wpdiscuzAjaxObj.enableDropAnimation)?500:0,x=parseInt(wpdiscuzAjaxObj.isNativeAjaxEnabled),j=parseInt(wpdiscuzAjaxObj.enableBubble),y=parseInt(wpdiscuzAjaxObj.bubbleLiveUpdate),k=parseInt(wpdiscuzAjaxObj.bubbleHintTimeout),Q=parseInt(wpdiscuzAjaxObj.bubbleHintHideTimeout)?parseInt(wpdiscuzAjaxObj.bubbleHintHideTimeout):5,R=parseInt(wpdiscuzAjaxObj.bubbleShowNewCommentMessage),h=wpdiscuzAjaxObj.bubbleLocation,l=wpdiscuzAjaxObj.inlineFeedbackAttractionType,m=parseInt(wpdiscuzAjaxObj.scrollSize),m=m||32,S=[],T=[],U=[],V=!1,z=1,W=$("html").css("scroll-behavior"),X=$("body").css("scroll-behavior");if($(".wc_social_plugin_wrapper .wp-social-login-provider-list").length?$(".wc_social_plugin_wrapper .wp-social-login-provider-list").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wpd-form-wrapper > .wpd-secondary-forms-social-content"):$(".wc_social_plugin_wrapper .the_champ_login_container").length?$(".wc_social_plugin_wrapper .the_champ_login_container").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wpd-form-wrapper > .wpd-secondary-forms-social-content"):$(".wc_social_plugin_wrapper .social_connect_form").length?$(".wc_social_plugin_wrapper .social_connect_form").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wpd-form-wrapper > .wpd-secondary-forms-social-content"):$(".wc_social_plugin_wrapper .oneall_social_login_providers").length&&$(".wc_social_plugin_wrapper .oneall_social_login .oneall_social_login_providers").clone().prependTo("#wpdiscuz_hidden_secondary_form > .wpd-form-wrapper > .wpd-secondary-forms-social-content"),wpdiscuzLoadRichEditor&&$("#wpd-editor-0_0").length&&wpDiscuzEditor.createEditor("#wpd-editor-0_0"),window.addEventListener("beforeunload",function(c){var b=$(".wpd-form").not(":hidden");if(b.length){if(wpdiscuzLoadRichEditor&&document.querySelector(".wpdiscuz-textarea-wrap")){for(var a=0;a");a.appendTo("body").css({position:"absolute",top:"-10000000px"}).val(b),a.trigger("select"),document.execCommand("copy"),a.remove(),wpdiscuzAjaxObj.setCommentMessage(b+"
"+wpdiscuzAjaxObj.wc_copied_to_clipboard,"success",5e3)}),$("body").on("click",".wpdiscuz-nofollow,.wc_captcha_refresh_img,.wpd-load-more-submit",function(a){a.preventDefault()}),$("body").on("click",".wpd-toggle.wpd_not_clicked",function(){var a=$(this);a.removeClass("wpd_not_clicked");var b=aj($(this),0),c=$(this),d=$(".fas",c);!c.parents(".wpd-comment:not(.wpd-reply)").children(".wpd-reply").length&&O?aw(b,a):$("#wpd-comm-"+b+"> .wpd-reply").slideToggle(700,function(){$(this).is(":hidden")?(d.removeClass("fa-chevron-up"),d.addClass("fa-chevron-down"),c.find(".wpd-view-replies-text").text(wpdiscuzAjaxObj.wc_show_replies_text),c.attr("wpd-tooltip",wpdiscuzAjaxObj.wc_show_replies_text)):(d.removeClass("fa-chevron-down"),d.addClass("fa-chevron-up"),c.find(".wpd-view-replies-text").text(wpdiscuzAjaxObj.wc_hide_replies_text),c.attr("wpd-tooltip",wpdiscuzAjaxObj.wc_hide_replies_text)),a.addClass("wpd_not_clicked")})}),$("body").on("mouseenter",".wpd-new-loaded-comment",function(){$(this).removeClass("wpd-new-loaded-comment")}),$("body").on("click",".wpd-sbs-toggle",function(){$(".wpdiscuz-subscribe-bar").slideToggle(P)}),parseInt(wpdiscuzAjaxObj.wpDiscuzIsShowOnSubscribeForm)&&!c&&wpdiscuzAjaxObj.wpDiscuzReCaptchaSK&&$("#wpdiscuz-subscribe-form").length&&("2.0"===e?(setTimeout(function(){try{grecaptcha.render("wpdiscuz-recaptcha-subscribe-form",{sitekey:wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,theme:wpdiscuzAjaxObj.wpDiscuzReCaptchaTheme,callback:function(a){$("#wpdiscuz-recaptcha-field-subscribe-form").val("key")},"expired-callback":function(){$("#wpdiscuz-recaptcha-field-subscribe-form").val("")}})}catch(a){console.log(a),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+a.message,"error")}},1e3),$("body").on("submit","#wpdiscuz-subscribe-form",function(a){$("#wpdiscuz-recaptcha-field-subscribe-form").val()?$(".wpdiscuz-recaptcha",$(this)).css("border","none"):($(".wpdiscuz-recaptcha",$(this)).css("border","1px solid red"),a.preventDefault())})):"3.0"===e&&$("body").on("click","#wpdiscuz_subscription_button",function(b){var c=$(this).parents("#wpdiscuz-subscribe-form");b.preventDefault();try{grecaptcha.ready(function(){grecaptcha.execute(wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,{action:"wpdiscuz/wpdAddSubscription"}).then(function(a){console.log(5555),document.getElementById("wpdiscuz-recaptcha-field-subscribe-form").value=a,c.trigger("submit")},function(a){wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error","error"),console.log(a)})})}catch(a){console.log(a),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+a.message,"error")}})),(q||r)&&"2.0"===e){var A=$(window).width(),a=$("#wpdcom").width();a>=1100&&($("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),$("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),$("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"65%"}),$("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"35%"})),a>=940&&a<1100&&($("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),$("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),$("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"60%"}),$("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"40%"})),a>=810&&a<940&&($("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),$("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.8)","-webkit-transform":"scale(0.8)"}),$("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({width:"40%"}),$("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({width:"60%"})),a>=730&&a<810&&($("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.9)","-webkit-transform":"scale(0.9)"}),$("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.8)","-webkit-transform":"scale(0.8)"}),$("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({width:"45%"}),$("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({width:"55%"})),a>=610&&a<730&&($("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.85)","-webkit-transform":"scale(0.85)"}),$("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({transform:"scale(0.8)","-webkit-transform":"scale(0.8)"}),$("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"43%"}),$("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"55%"}),$("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({width:"30%"}),$("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({width:"70%"})),A>650&&(a>=510&&a<610&&($("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"center 0","-webkit-transform-origin":"center 0",transform:"scale(0.77)","-webkit-transform":"scale(0.77)"}),$("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.77)","-webkit-transform":"scale(0.77)"}),$("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"35%"}),$("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"63%"}),$("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({width:"30%",position:"relative",right:"-60px"}),$("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({width:"70%"}),$("#wpdcom .wpd-secondary-form-wrapper .wc-form-footer").css({"margin-left":"0px"})),a>=470&&a<510&&($("#wpdcom .wpd_main_comm_form .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"center 0","-webkit-transform-origin":"center 0",transform:"scale(0.77)","-webkit-transform":"scale(0.77)"}),$("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({"transform-origin":"right 0","-webkit-transform-origin":"right 0",transform:"scale(0.77)","-webkit-transform":"scale(0.77)"}),$("#wpdcom .wpd_main_comm_form .wpd-form-col-left").css({width:"40%"}),$("#wpdcom .wpd_main_comm_form .wpd-form-col-right").css({width:"60%"}),$("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-left").css({float:"none",width:"100%",display:"block"}),$("#wpdcom .wpd-secondary-form-wrapper .wpd-form-col-right").css({float:"none",width:"100%",display:"block"}),$("#wpdcom .wpd_main_comm_form .wc-form-footer").css({"margin-left":"0px"}),$("#wpdcom .wpd-secondary-form-wrapper .wc-form-footer").css({"margin-left":"0px"})),a<470&&($("#wpdcom .wpd-secondary-form-wrapper .wpd-field-captcha .wpdiscuz-recaptcha").css({margin:"0px auto","transform-origin":"center 0","-webkit-transform-origin":"center 0"}),$("#wpdcom .wpd-form-col-left").css({float:"none",width:"100%",display:"block"}),$("#wpdcom .wpd-form-col-right").css({float:"none",width:"100%",display:"block"}),$("#wpdcom .wpd-secondary-form-wrapper .wc-form-footer").css({"margin-left":"0px"}),$("#wpdcom .wpd-secondary-form-wrapper .wc_notification_checkboxes").css({"text-align":"center"}),$("#wpdcom .wpd-secondary-form-wrapper .wc-field-submit").css({"text-align":"center"})))}function Y(b,a,c){G(x||L,!1,a).done(function(a){if($(c).addClass("wpd_not_clicked"),"object"==typeof a){if(a.success){"collapsed"===wpdiscuzAjaxObj.commentFormView&&$(".wpd-form-foot",b).slideUp(P),a.data.wc_all_comments_count_new=parseInt(a.data.wc_all_comments_count_new),$(".wpd-thread-info").html(a.data.wc_all_comments_count_before_threads_html),$(".wpd-thread-info").attr("data-comments-count",a.data.wc_all_comments_count_new),$("#wpd-bubble-all-comments-count").replaceWith(a.data.wc_all_comments_count_bubble_html);var d=P;a.data.is_main?az(a.data.message):(d=P+700,$("#wpd-secondary-form-wrapper-"+a.data.uniqueid).slideToggle(700),1==a.data.is_in_same_container?$("#wpd-secondary-form-wrapper-"+a.data.uniqueid).after(a.data.message):$("#wpd-comm-"+a.data.uniqueid).after(a.data.message)),Z(a),_(a),M&&N?ab(a.data):N||$(".wpd-cookies-checkbox").prop("checked",!1),b.get(0).reset(),wpdiscuzLoadRichEditor?wpDiscuzEditor.createEditor("#wpd-editor-"+$(".wpdiscuz_unique_id",b).val()).setContents([{insert:"\n"}]):aD(b.find(".wc_comment")),aa(a.data),$(".wmu-preview-wrap",b).remove(),ay(),parseInt(wpdiscuzAjaxObj.scrollToComment)&&setTimeout(function(){au(),$("html, body").animate({scrollTop:$("#comment-"+a.data.new_comment_id).offset().top-m},1e3,av)},d),aE(a,b)}else a.data&&(wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[a.data],a.data,b),"error"),aE(a,b))}else wpdiscuzAjaxObj.setCommentMessage(a,"error");$("#wpdiscuz-loading-bar").fadeOut(250),V=!1}).fail(function(b,d,a){console.log(a),$(c).addClass("wpd_not_clicked"),$("#wpdiscuz-loading-bar").fadeOut(250)})}function Z(b){if(!b.data.held_moderate){var a=new FormData;a.append("action","wpdCheckNotificationType"),a.append("comment_id",b.data.new_comment_id),a.append("email",b.data.comment_author_email),a.append("isParent",b.data.is_main),G(x,!0,a)}}function _(a){if(a.data.redirect>0&&a.data.new_comment_id){var b=new FormData;b.append("action","wpdRedirect"),b.append("commentId",a.data.new_comment_id),G(x,!0,b).done(function(a){"object"==typeof a&&a.success&&setTimeout(function(){location.href=a.data},2e3)}).fail(function(b,c,a){console.log(a)})}}function aa(a){$(".wpd_comm_form .wc_name").val(a.comment_author),a.comment_author_email&&0>a.comment_author_email.indexOf("@example.com")&&$(".wpd_comm_form .wc_email").val(a.comment_author_email),a.comment_author_url&&$(".wpd_comm_form .wc_website").val(a.comment_author_url)}function ab(b){var c=b.comment_author_email,d=b.comment_author,a=b.comment_author_url;null==K?(Cookies.set("comment_author_email_"+g,c),Cookies.set("comment_author_"+g,d),a.length&&Cookies.set("comment_author_url_"+g,a)):(K=parseInt(K),Cookies.set("comment_author_email_"+g,c,{expires:K,path:"/"}),Cookies.set("comment_author_"+g,d,{expires:K,path:"/"}),a.length&&Cookies.set("comment_author_url_"+g,a,{expires:K,path:"/"})),$(".wpd-cookies-checkbox").length&&$(".wpd-cookies-checkbox").prop("checked",!0)}function ac(a,b){$("#wpd-comm-"+a+" > .wpd-comment-wrap .wpd-comment-right .wpd_editable_comment").show(),$("#wpd-comm-"+a+" .wpdiscuz-edit-form-wrap").replaceWith(b),$("#wpd-comm-"+a+" > .wpd-comment-wrap .wpd-comment-last-edited").show()}$("body").on("click",".wc_comm_submit.wpd_not_clicked",function(){var d=$(this),f=1,a=$(this).parents("form");if("true"===a.attr("data-uploading")){wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj.wmuPhraseDoingUpload,"wmuPhraseDoingUpload",a),"warning");return}if(a.hasClass("wpd_main_comm_form")||(f=an($(this).parents(".wpd-comment"))),as(a,"#wpd-editor-"+$(".wpdiscuz_unique_id",a).val()),a.on("submit",function(a){a.preventDefault()}),a[0].checkValidity()&&(h=a,i=!0,"2.0"===e&&$("input[name=wc_captcha]",h).length&&!$("input[name=wc_captcha]",h).val().length?(i=!1,$(".wpdiscuz-recaptcha",h).css("border","1px solid red")):"2.0"===e&&$("input[name=wc_captcha]",h).length&&$(".wpdiscuz-recaptcha",h).css("border","none"),i)){V=!0,ax(a),$(d).removeClass("wpd_not_clicked");var h,i,b=new FormData;if(b.append("action","wpdAddComment"),$(":input",a).each(function(){""!=this.name&&"checkbox"!=this.type&&"radio"!=this.type&&b.append(this.name+"",$(this).val().trim()),("checkbox"==this.type||"radio"==this.type)&&$(this).is(":checked")&&b.append(this.name+"",$(this).val())}),b.append("wpd_comment_depth",f),wpdiscuzAjaxObj.wpdiscuz_zs&&b.append("wpdiscuz_zs",wpdiscuzAjaxObj.wpdiscuz_zs),$(".wpd-cookies-checkbox",a).length?$(".wpd-cookies-checkbox",a).prop("checked")||(N=!1):c&&(N=!1),$("#wpdiscuz-loading-bar").show(),wpdiscuzAjaxObj.wpDiscuzReCaptchaSK&&"3.0"===e&&(1==wpdiscuzAjaxObj.wc_captcha_show_for_guest&&!wpdiscuzAjaxObj.is_user_logged_in||1==wpdiscuzAjaxObj.wc_captcha_show_for_members&&wpdiscuzAjaxObj.is_user_logged_in))try{grecaptcha.ready(function(){grecaptcha.execute(wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,{action:"wpdiscuz/addComment"}).then(function(c){b.append("g-recaptcha-response",c),Y(a,b,d)},function(a){wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error","error"),console.log(a)})})}catch(g){console.log(g),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+g.message,"error"),$("#wpdiscuz-loading-bar").fadeOut(250)}else Y(a,b,d)}(function(a){if((q||r)&&"2.0"===e){var b=ak(a);grecaptcha.reset(T[b])}})($(".wpdiscuz_unique_id",a).val()),ar()}),$("body").on("click",".wpd_editable_comment",function(){H&&$(".wpdiscuz-edit-form-wrap").length&&ac(aj($(".wpdiscuz-edit-form-wrap"),0),H);var c=$(this),b=aj(c,0),d=ak(b),a=new FormData;a.append("action","wpdEditComment"),a.append("commentId",d),H=$("#wpd-comm-"+b+" > .wpd-comment-wrap .wpd-comment-text").get(0),G(x,!0,a).done(function(a){if("object"==typeof a){if(a.success){if($("#wpd-comm-"+b+" > .wpd-comment-wrap .wpd-comment-right .wpd-comment-text").replaceWith(a.data.html),wpdiscuzLoadRichEditor){var d=wpDiscuzEditor.createEditor("#wpd-editor-edit_"+b);d.clipboard.dangerouslyPasteHTML(0,a.data.content),d.update(),$(".wpd-toolbar-hidden").prev("[id^=wpd-editor-]").css("border-bottom","1px solid #dddddd")}else $("#wc-textarea-edit_"+b).val(a.data.content),aD($("#wc-textarea-edit_"+b));$("#wpd-comm-"+b+" > .wpd-comment-wrap .wpd-comment-right .wpd_editable_comment").hide(),$("#wpd-comm-"+b+" > .wpd-comment-wrap .wpd-comment-last-edited").hide()}else wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[a.data],a.data,c),"error")}else console.log(a);$("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(b,c,a){console.log(a),$("#wpdiscuz-loading-bar").fadeOut(250)})}),$("body").on("click",".wc_save_edited_comment",function(){var d=$(this),b=aj(d),e=ak(b),a=$("#wpd-comm-"+b+" #wpdiscuz-edit-form");if(as(a,"#wpd-editor-edit_"+b),a.on("submit",function(a){a.preventDefault()}),a[0].checkValidity()){var c=new FormData;c.append("action","wpdSaveEditedComment"),c.append("commentId",e),$(":input",a).each(function(){""!==this.name&&"checkbox"!==this.type&&"radio"!==this.type&&c.append(this.name+"",$(this).val()),("checkbox"===this.type||"radio"===this.type)&&$(this).is(":checked")&&c.append(this.name+"",$(this).val())}),G(x,!0,c).done(function(a){"object"==typeof a?(a.success?(ac(b,a.data.message),a.data.comment_approved_html&&$("#wpd-comm-"+b+" > .wpd-comment-wrap .wpd-comment-subheader").append(a.data.comment_approved_html),a.data.lastEdited&&($("#wpd-comm-"+b+" > .wpd-comment-wrap .wpd-comment-last-edited").remove(),$(a.data.lastEdited).insertAfter("#wpd-comm-"+b+" > .wpd-comment-wrap .wpd-comment-right .wpd-comment-text")),a.data.twitterShareLink&&$("#wpd-comm-"+b+" > .wpd-comment-wrap .wpd-comment-share .wpd-tooltip-content .wc_tw").attr("href",a.data.twitterShareLink),a.data.whatsappShareLink&&$("#wpd-comm-"+b+" > .wpd-comment-wrap .wpd-comment-share .wpd-tooltip-content .wc_whatsapp").attr("href",a.data.whatsappShareLink),wpdiscuzLoadRichEditor&&wpDiscuzEditor.removeEditor("#wpd-editor-edit_"+b)):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[a.data],a.data,d),"error"),aE(a,e)):console.log(a),$("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(b,c,a){console.log(a),$("#wpdiscuz-loading-bar").fadeOut(250)})}}),$("body").on("click",".wc_cancel_edit",function(){var a=aj($(this));ac(a,H),wpdiscuzLoadRichEditor&&wpDiscuzEditor.removeEditor("#wpd-editor-edit_"+a)}),!i&&f&&(z=0,1==f?setTimeout(function(){ae(!0)},500):$("body").on("click",".wpd-load-comments",function(){$(this).parent(".wpd-load-more-submit-wrap").remove(),ae(!0)})),$("body").on("click",".wpd-load-more-submit",function(){var a=$(this),b="wpd-loaded";a.hasClass(b)&&ae(!1,a,b,"wpd-loading")});var ad=!1;function B(){var a=document.getElementById("wpdiscuzHasMoreComments"),b=0;a&&(b=a.dataset.is_show_load_more);var c=document.getElementById("wpdcom")?document.getElementById("wpdcom").clientHeight:0,d=$(window).height()+$(window).scrollTop();c&&d&&100*d/c>=80&& !1===ad&&1==b&&(ad=!0,ae(!1,$(".wpd-load-more-submit")))}function ae(c,b,e,g){b&&(b.toggleClass(e),b.toggleClass(g));var a=new FormData;a.append("action","wpdLoadMoreComments");var d=$(".wpdiscuz-sort-button-active").attr("data-sorting");d&&a.append("sorting",d),a.append("offset",z),a.append("lastParentId",al()),a.append("isFirstLoad",c?1:0);var h=$(".wpdf-active").attr("data-filter-type");a.append("wpdType",h||""),G(x,!c||1!=f,a).done(function(a){"object"==typeof a&&a.success&&(z++,c&&$(".wpd-comment").remove(),$(".wpdiscuz_single").remove(),$(".wpdiscuz-comment-pagination").before(a.data.comment_list),C(a,c&&2!==s),ad=!1,a.data.loadLastCommentId&&(w=a.data.loadLastCommentId),aE(a),c&&D(!1)),$("#wpdiscuz-loading-bar").fadeOut(250),$(".wpd-load-more-submit").blur(),b&&(b.toggleClass(e),b.toggleClass(g))}).fail(function(c,d,a){console.log(a),$("#wpdiscuz-loading-bar").fadeOut(250),$(".wpd-load-more-submit").blur(),b&&(b.toggleClass(e),b.toggleClass(g))})}function C(a,d){var b=document.getElementById("wpdiscuzHasMoreComments");if(!1==a.data.is_show_load_more)b&&(b.dataset.is_show_load_more=0),$(".wpd-load-more-submit").parents(".wpdiscuz-comment-pagination").hide();else if(am(a.data.last_parent_id),b&&(b.dataset.is_show_load_more=1),d&&$(".wpd-load-more-submit").parents(".wpdiscuz-comment-pagination").show(),a.data.comments_left>0){if(!$(".wpd-load-more-submit .wpd-comments-left").length){let c=$("");c.addClass("wpd-comments-left"),$(".wpd-load-more-submit").append(c)}$(".wpd-load-more-submit .wpd-comments-left").text(a.data.comments_left_text)}aE(a)}function D(d){var b=location.href.match(/#comment\-(\d+)/);if(null!==b){var c=b[1];if($("#comment-"+c).length)setTimeout(function(){au(),$("html, body").animate({scrollTop:$("#comment-"+c).parents("[id^=wpd-comm-]").offset().top-m},1e3,av),d&&af(c)},500);else{var a=new FormData;a.append("action","wpdGetSingleComment"),a.append("commentId",c),G(x,!0,a).done(function(a){if("object"==typeof a&&a.success){var b="#comment-"+c;$("#comment-"+a.data.parentCommentID).length?$("#comment-"+a.data.parentCommentID).parents("[id^=wpd-comm-"+a.data.parentCommentID+"]").replaceWith(a.data.message):$(".wpd-thread-list").prepend(a.data.message),aE(a),au(),$("html, body").animate({scrollTop:$(b).offset().top-m},1e3,av),d&&af(c)}$("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(b,c,a){console.log(a),$("#wpdiscuz-loading-bar").fadeOut(250)})}}}function af(a){setTimeout(function(){$("#comment-"+a).siblings(".wpd-secondary-form-wrapper").is(":visible")||$("#comment-"+a).find(".wpd-reply-button").trigger("click")},1100)}function ag(b){if(void 0!==b.data.message)for(var c,d=b.data.message,a=0;a.ql-editor").html()),at(a),$.each(c,function(){$("input",this).prop("required",!1),0===$("input:checked",this).length?$("input",$(this)).prop("required",!0):$(".wpd-field-invalid",this).remove()})}function at(c){var b=c.find(".wc_comment"),a=b.val().trim().replace(/


<\/p>/g,"\n").replace(/

(.*?)<\/p>/g,"$1\n");a=(a=(a=(a=a.replace(/]*>/g," $3 ")).replace(/]+alt=["|']([^"|']+)["|'][^>]+src=["|']https\:\/\/s\.w\.org\/images\/core\/emoji\/([^"|']+)["|'][^>]?>/g," $1 ")).replace(/]*)class=["|']wpdem\-sticker["|'](.*?)alt=["|']([^"|']+)["|'](.*?)[^>]*>/g," $3 ")).replace(/]*)src=["|']([^"|']+)["|'](.*?)[^>]*>/g," $2 "),b.val(a)}function au(){$("html, body").css("scroll-behavior","unset")}function av(){$("html").css("scroll-behavior",W),$("body").css("scroll-behavior",X)}function aw(b,d){var c=ak(b),a=new FormData;a.append("action","wpdShowReplies"),a.append("commentId",c),G(x,!0,a).done(function(a){d.addClass("wpd_not_clicked"),"object"==typeof a&&a.success&&($("#wpd-comm-"+b).replaceWith(a.data.comment_list),$("#wpd-comm-"+b+" .wpd-toggle .fas").removeClass("fa-chevron-down").addClass("fa-chevron-up"),$("#wpd-comm-"+b+" .wpd-toggle .wpd-view-replies .wpd-view-replies-text").text(wpdiscuzAjaxObj.wc_hide_replies_text),$("#wpd-comm-"+b+" .wpd-toggle").attr("wpd-tooltip",wpdiscuzAjaxObj.wc_hide_replies_text),aE(a)),$("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(b,c,a){console.log(a),d.addClass("wpd_not_clicked"),$("#wpdiscuz-loading-bar").fadeOut(250)})}function ax(a){$(".wpd-agreement-checkbox",a).each(function(){$(this).hasClass("wpd_agreement_hide")&&M&&$(this).prop("checked")&&(Cookies.set($(this).attr("name")+"_"+g,1,{expires:30,path:"/"}),$("input[name="+$(this).attr("name")+"]").each(function(){S.push($(this))}))})}function ay(){S.length&&(S.forEach(function(a){a.parents(".wpd-field-checkbox").remove()}),S=[])}function az(a){$(".wpd-sticky-comment").last()[0]?$(a).insertAfter($(".wpd-sticky-comment").last()[0]):$(".wpd-thread-list").prepend(a)}function E(a){a?a.prop("required")||(a.val()?a.parents("form").find("[name=wpdiscuz_notification_type]").parent().css("display","inline-block"):a.parents("form").find("[name=wpdiscuz_notification_type]").parent().css("display","none")):$.each($(".wc_email"),function(c,b){var a=$(b);a.prop("required")||(a.val()?a.parents("form").find("[name=wpdiscuz_notification_type]").parent().css("display","inline-block"):a.parents("form").find("[name=wpdiscuz_notification_type]").parent().css("display","none"))})}if(2!==s||i||($(".wpd-load-more-submit").parents(".wpdiscuz-comment-pagination").hide(),B(),$(window).scroll(function(){B()})),wpdiscuzAjaxObj.setLoadMoreVisibility=C,$("body").on("click",".wpd-vote-up.wpd_not_clicked, .wpd-vote-down.wpd_not_clicked",function(){var b,c=$(this);$(c).removeClass("wpd_not_clicked");var d=aj(c),e=ak(d);b=$(this).hasClass("wpd-vote-up")?1:-1;var a=new FormData;a.append("action","wpdVoteOnComment"),a.append("commentId",e),a.append("voteType",b),G(x,!0,a).done(function(a){if($(c).addClass("wpd_not_clicked"),"object"==typeof a){if(a.success){if("total"===a.data.buttonsStyle){var d=$(".wpd-comment-footer .wpd-vote-result",$("#comment-"+e)),h=a.data.votes;d.text(a.data.votesHumanReadable),d.attr("title",h),d.removeClass("wpd-up wpd-down"),h>0&&d.addClass("wpd-up"),h<0&&d.addClass("wpd-down")}else{var f=$(".wpd-comment-footer .wpd-vote-result-like",$("#comment-"+e)),g=$(".wpd-comment-footer .wpd-vote-result-dislike",$("#comment-"+e));f.text(a.data.likeCountHumanReadable),f.attr("title",a.data.likeCount),g.text(a.data.dislikeCountHumanReadable),g.attr("title",a.data.dislikeCount),parseInt(a.data.likeCount)>0?f.addClass("wpd-up"):f.removeClass("wpd-up"),0>parseInt(a.data.dislikeCount)?g.addClass("wpd-down"):g.removeClass("wpd-down")}var i=$(".wpd-comment-footer .wpd-vote-up",$("#comment-"+e)),j=$(".wpd-comment-footer .wpd-vote-down",$("#comment-"+e));i.removeClass("wpd-up"),j.removeClass("wpd-down"),a.data.curUserReaction>0?i.addClass("wpd-up"):a.data.curUserReaction<0&&j.addClass("wpd-down")}else a.data&&wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[a.data],a.data,c),"error");aE(a,e,b)}else console.log(a);$("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(b,d,a){console.log(a),$(c).addClass("wpd_not_clicked"),$("#wpdiscuz-loading-bar").fadeOut(250)})}),$(document).on("click","body",function(b){var a=$(".wpdiscuz-sort-buttons");$(b.target).hasClass("wpdf-sorting")||$(b.target).parent().hasClass("wpdf-sorting")?a.css({display:a.is(":visible")?"none":"flex"}):a.hide()}),$("body").on("click",".wpdiscuz-sort-button:not(.wpdiscuz-sort-button-active)",function(){var c=$(this),b=$(this).attr("data-sorting");if(b){$(".wpdiscuz-sort-button.wpdiscuz-sort-button-active").removeClass("wpdiscuz-sort-button-active").appendTo(".wpdiscuz-sort-buttons"),c.addClass("wpdiscuz-sort-button-active").prependTo(".wpdf-sorting");var a=new FormData;a.append("action","wpdSorting"),a.append("sorting",b);var d=$(".wpdf-active").attr("data-filter-type");a.append("wpdType",d||""),G(x,!0,a).done(function(a){"object"==typeof a&&a.success&&($("#wpdcom .wpd-comment").remove(),$("#wpdcom .wpd-thread-list").prepend(a.data.message),C(a,!1),z=1),$("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(b,c,a){console.log(a),$("#wpdiscuz-loading-bar").fadeOut(250)})}}),window.onhashchange=function(){D(!1)},1!=f&&D(!1),$("body").on("click",".wpdiscuz-readmore",function(){var b=aj($(this)),c=ak(b),a=new FormData;a.append("action","wpdReadMore"),a.append("commentId",c),G(x,!0,a).done(function(a){"object"==typeof a?(a.success?($("#comment-"+c+" .wpd-comment-text").replaceWith(" "+a.data.message),$("#wpdiscuz-readmore-"+b).remove()):console.log(a.data),aE(a)):console.log(a),$("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(b,c,a){console.log(a),$("#wpdiscuz-loading-bar").fadeOut(250)})}),$("body").on("change",".wpd-required-group",function(){0!==$("input:checked",this).length?$("input",$(this)).prop("required",!1):$("input",$(this)).prop("required",!0)}),$("body").on("click",".wpdiscuz-spoiler",function(){$(this).next().slideToggle(),$(this).hasClass("wpdiscuz-spoiler-closed")?$(this).parents(".wpdiscuz-spoiler-wrap").find(".fa-plus").removeClass("fa-plus").addClass("fa-minus"):$(this).parents(".wpdiscuz-spoiler-wrap").find(".fa-minus").removeClass("fa-minus").addClass("fa-plus"),$(this).toggleClass("wpdiscuz-spoiler-closed")}),$("body").on("click",".wpd-tools i",function(){var a=$(this).siblings(".wpd-tools-actions");a.is(":visible")||$(this).parents(".wpd-comment-right").attr("id")!==$("[id^=comment-]","#wpdcom").last().attr("id")||$("#comments").css({paddingBottom:"160px"}),a.css({display:a.is(":visible")?"none":"flex"})}),$("body").on("mouseleave",".wpd-comment-right",function(){$(this).find(".wpd-tools-actions").hide(),$("#comments").css({paddingBottom:"0"})}),$("body").on("click",".wpd_stick_btn",function(){var b=aj($(this),0),c=ak(b),a=new FormData;a.append("action","wpdStickComment"),a.append("commentId",c),G(x,!0,a).done(function(a){"object"==typeof a&&a.success&&location.reload(!0),$("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(b,c,a){console.log(a),$("#wpdiscuz-loading-bar").fadeOut(250)})}),$("body").on("click",".wpd_close_btn",function(){var b=aj($(this),0),c=ak(b),a=new FormData;a.append("action","wpdCloseThread"),a.append("commentId",c),G(x,!0,a).done(function(a){"object"==typeof a&&a.success&&location.reload(!0),$("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(b,c,a){console.log(a),$("#wpdiscuz-loading-bar").fadeOut(250)})}),$("body").on("click",".wpd-filter.wpd_not_clicked[data-filter-type]",function(){var b=$(this),c=b.attr("data-filter-type");wpdiscuzAjaxObj.resetActiveFilters(".wpdf-"+c),b.removeClass("wpd_not_clicked"),$(".fas",b).addClass("fa-pulse fa-spinner");var a=new FormData;a.append("action","wpdLoadMoreComments");var d=$(".wpdiscuz-sort-button-active").attr("data-sorting");d&&a.append("sorting",d),a.append("lastParentId",0),a.append("offset",0),z=1,a.append("wpdType",b.hasClass("wpdf-active")?"":c),a.append("isFirstLoad",1),$(this).hasClass("wpdf-inline")?$(this).hasClass("wpdf-active")?$(".wpd-comment-info-bar").hide():$(".wpd-comment-info-bar").css("display","flex"):$(".wpd-comment-info-bar").hide(),G(x,!1,a).done(function(a){b.addClass("wpd_not_clicked"),$(".fas",b).removeClass("fa-pulse fa-spinner"),"object"==typeof a&&a.success&&(b.toggleClass("wpdf-active"),$(".wpd-load-comments").remove(),$(".wpd-comment").remove(),$(".wpd-thread-list").prepend(a.data.comment_list),C(a),w=a.data.loadLastCommentId,$(".wpd-load-more-submit").blur(),aE(a)),$("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(b,c,a){console.log(a),$("#wpdiscuz-loading-bar").fadeOut(250)})}),$("body").on("click",".wpdf-reacted.wpd_not_clicked",function(){var a=$(this);a.removeClass("wpd_not_clicked"),$(".fas",a).addClass("fa-pulse fa-spinner");var b=new FormData;b.append("action","wpdMostReactedComment"),G(x,!1,b).done(function(b){a.addClass("wpd_not_clicked"),$(".fas",a).removeClass("fa-pulse fa-spinner"),"object"==typeof b&&b.success&&($("#comment-"+b.data.parentCommentID).length?$("#comment-"+b.data.parentCommentID).parents("[id^=wpd-comm-"+b.data.parentCommentID+"]").replaceWith(b.data.message):$("#comment-"+b.data.commentId).length||$(".wpd-thread-list").prepend(b.data.message),aE(b),au(),$("html, body").animate({scrollTop:$("#comment-"+b.data.commentId).offset().top-m},1e3,av))}).fail(function(c,d,b){console.log(b),$(".fas",a).removeClass("fa-pulse fa-spinner")})}),$("body").on("click",".wpdf-hottest.wpd_not_clicked",function(){var a=$(this);a.removeClass("wpd_not_clicked"),$(".fas",a).addClass("fa-pulse fa-spinner");var b=new FormData;b.append("action","wpdHottestThread"),G(x,!1,b).done(function(b){a.addClass("wpd_not_clicked"),$(".fas",a).removeClass("fa-pulse fa-spinner"),"object"==typeof b&&b.success&&($("#comment-"+b.data.commentId).length?$("#comment-"+b.data.commentId).parents("[id^=wpd-comm-"+b.data.commentId+"]").replaceWith(b.data.message):$(".wpd-thread-list").prepend(b.data.message),aE(b),au(),$("html, body").animate({scrollTop:$("#comment-"+b.data.commentId).offset().top-m},1e3,av))}).fail(function(c,d,b){console.log(b),$(".fas",a).removeClass("fa-pulse fa-spinner")})}),$("body").on("click",".wpd-filter-view-all",function(){$(".wpdf-inline.wpdf-active.wpd_not_clicked").trigger("click")}),$("body").on("click",".wpd-follow-link.wpd_not_clicked",function(){var a=$(this);a.removeClass("wpd_not_clicked"),$(".fas",a).addClass("fa-pulse fa-spinner");var c=aj(a,0),d=ak(c),b=new FormData;b.append("action","wpdFollowUser"),b.append("commentId",d),G(x,!0,b).done(function(b){a.addClass("wpd_not_clicked"),"object"==typeof b?b.success?(wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[b.data.code],b.data.code,a),"success"),a.removeClass("wpd-follow-active"),b.data.followTip&&a.attr("wpd-tooltip",b.data.followTip),b.data.followClass&&a.addClass(b.data.followClass),aE(b)):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[b.data],b.data,a),"error"):console.log(b),$(".fas",a).removeClass("fa-pulse fa-spinner"),$("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(c,d,b){console.log(b),$(".fas",a).removeClass("fa-pulse fa-spinner"),$("#wpdiscuz-loading-bar").fadeOut(250)})}),E(),$("body").on("keyup",".wc_email",function(){E($(this))}),j&&$("#wpdcom").length){if($("#wpd-bubble-wrapper").hover(function(){$(this).addClass("wpd-bubble-hover")},function(){$(this).removeClass("wpd-bubble-hover")}),k&&!Cookies.get(wpdiscuzAjaxObj.cookieHideBubbleHint)&&setTimeout(function(){$("#wpd-bubble-wrapper").addClass("wpd-bubble-hover"),Cookies.set(wpdiscuzAjaxObj.cookieHideBubbleHint,"1",{expires:7,path:"/"}),setTimeout(function(){$("#wpd-bubble-wrapper").removeClass("wpd-bubble-hover")},1e3*Q)},1e3*k),"content_left"===h){if($(".entry-content").length){var b=Math.min($(".entry-content").offset().left,$("#wpdcom").offset().left)-120,d=b>25?b:25;$("#wpd-bubble-wrapper").css({left:d+"px"}),$("#wpd-bubble-wrapper").addClass("wpd-left-content")}else if($(".post-entry").length){var b=Math.min($(".post-entry").offset().left,$("#wpdcom").offset().left)-120,d=b>25?b:25;$("#wpd-bubble-wrapper").css({left:d+"px"}),$("#wpd-bubble-wrapper").addClass("wpd-left-content")}else if($(".container").length){var b=Math.min($(".container").offset().left,$("#wpdcom").offset().left)-120,d=b>25?b:25;$("#wpd-bubble-wrapper").css({left:d+"px"}),$("#wpd-bubble-wrapper").addClass("wpd-left-content")}else $("#wpd-bubble-wrapper").css({left:"25px"}),$("#wpd-bubble-wrapper").addClass("wpd-left-corner")}else"left_corner"===h?($("#wpd-bubble-wrapper").css({left:"25px"}),$("#wpd-bubble-wrapper").addClass("wpd-left-corner")):"right_corner"===h&&($("#wpd-bubble-wrapper").css({right:"25px"}),$("#wpd-bubble-wrapper").addClass("wpd-right-corner"));$("#wpd-bubble-wrapper").show(),$("body").on("click","#wpd-bubble-add-message-close",function(a){a.preventDefault(),a.stopPropagation(),$("#wpd-bubble-wrapper").removeClass("wpd-bubble-hover")}),$("body").on("click","#wpd-bubble",function(){au(),$("#tab-title-reviews").length&&$("#tab-title-reviews a").trigger("click"),$("html, body").animate({scrollTop:$("#wpdcom").offset().top-(m+28)},1e3,function(){av(),$("#wpd-bubble-wrapper").removeClass("wpd-bubble-hover"),wpdiscuzLoadRichEditor?$("#wpd-editor-0_0").length&&wpDiscuzEditor.createEditor("#wpd-editor-0_0").focus():$("#wc-textarea-0_0").length&&$("#wc-textarea-0_0").trigger("focus")})}),$("body").on("click","#wpd-bubble-comment-close",function(a){a.preventDefault(),$("#wpd-bubble-notification-message").hide(),$("#wpd-bubble-wrapper").removeClass("wpd-new-comment-added")}),$("body").on("click","#wpd-bubble-comment-reply-link a",function(){var a=$(this).attr("href");setTimeout(function(){$("#wpd-bubble-notification-message").hide(),$("#wpd-bubble-wrapper").removeClass("wpd-new-comment-added"),D(!0);var b=a.match(/#comment\-(\d+)/);U=U.filter(function(a){return a!=b[1]}),$("#wpd-bubble-count .wpd-new-comments-count").text(U.length),0==U.length&&$("#wpd-bubble-count").removeClass("wpd-new-comments")},100)}),$("body").on("click","#wpd-bubble-count",function(){if(U.length){var a=new FormData;a.append("action","wpdBubbleUpdate"),a.append("newCommentIds",U.join()),G(x,!0,a).done(function(a){"object"==typeof a&&a.success&&(a.data.message=a.data.message.filter(function(a){if(!$("#comment-"+a.comment_id).length)return a}),ag(a),$("#wpd-bubble-count").removeClass("wpd-new-comments"),$("#wpd-bubble-count .wpd-new-comments-count").text("0"),U=[],$(".wpd-new-loaded-comment").length&&(au(),$("html, body").animate({scrollTop:$($(".wpd-new-loaded-comment")[0]).offset().top-(m+28)},1e3,av)),aE(a)),$("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(b,c,a){console.log(a)})}})}function F(){$.ajax({type:"GET",url:wpdiscuzAjaxObj.bubbleUpdateUrl,beforeSend:function(a){a.setRequestHeader("X-WP-Nonce",wpdiscuzAjaxObj.restNonce)},data:{postId:I,lastId:J,visibleCommentIds:aq()}}).done(function(a){if(!V){if("object"==typeof a){if(a.commentIDsToRemove.forEach(function(a){$("[id^=wpd-comm-"+a+"]").remove()}),a.ids.length){if(t){var b;(b=new FormData).append("action","wpdUpdateAutomatically"),b.append("loadLastCommentId",w),b.append("visibleCommentIds",aq()),G(x,!1,b).done(function(a){!V&&"object"==typeof a&&a.success&&(ag(a),a.data.wc_all_comments_count_new=parseInt(a.data.wc_all_comments_count_new),$(".wpd-thread-info").html(a.data.wc_all_comments_count_before_threads_html),$(".wpd-thread-info").attr("data-comments-count",a.data.wc_all_comments_count_new),$("#wpd-bubble-all-comments-count").replaceWith(a.data.wc_all_comments_count_bubble_html),w=a.data.loadLastCommentId)}).fail(function(b,c,a){console.log(a)})}a.ids=a.ids.filter(function(a){if(!$("#comment-"+a).length)return a});var c=5e3;J=parseInt(a.ids[a.ids.length-1]),U=U.concat(a.ids),R&&a.commentText&&($("#wpd-bubble-author-avatar").html(a.avatar),$("#wpd-bubble-author-name").html(a.authorName),$("#wpd-bubble-comment-date span").html(a.commentDate),$("#wpd-bubble-comment-text").html(a.commentText),$("#wpd-bubble-comment-reply-link a").attr("href",a.commentLink),$("#wpd-bubble-notification-message").show(),c=1e4);var d=parseInt($(".wpd-new-comments-count").text());d+=a.ids.length,$("#wpd-bubble-wrapper").removeClass("wpd-new-comment-added"),$("#wpd-bubble-wrapper").addClass("wpd-new-comment-added"),setTimeout(function(){$("#wpd-bubble-notification-message").hide(),$("#wpd-bubble-wrapper").removeClass("wpd-new-comment-added")},c),$(".wpd-new-comments-count").text(d),$("#wpd-bubble-count").addClass("wpd-new-comments")}a.all_comments_count=parseInt(a.all_comments_count),$("#wpd-bubble-all-comments-count").replaceWith(a.all_comments_count_bubble_html),$(".wpd-reviews-tab").length||($(".wpd-thread-info").html(a.all_comments_count_before_threads_html),$(".wpd-thread-info").attr("data-comments-count",a.all_comments_count))}else console.log(a)}setTimeout(F,u)}).fail(function(b,c,a){console.log(a),setTimeout(F,u)})}if((j&&y||t)&&(c|| !c&&v)&&setTimeout(F,u),$(".wpd-inline-form-wrapper").length){var n=new FormData;n.append("action","wpdGetInlineCommentForm"),G(x,!1,n).done(function(a){"object"==typeof a?a.success?($(".wpd-inline-form-wrapper").append(a.data),$.each($("[name=_wpd_inline_nonce]"),function(){var b=$(this).attr("id"),a=$(this).parents(".wpd-inline-shortcode").attr("id");$(this).attr("id",b+"-"+a.substring(a.lastIndexOf("-")+1))}),$(".wpd-inline-opened").addClass("wpd-active"),$(".wpd-inline-opened").find(".wpd-inline-form-wrapper").show(),$(".wpd-inline-opened").find(".wpd-inline-icon").addClass("wpd-open"),$(".wpd-inline-opened").find(".wpd-inline-icon").removeClass("wpd-ignored"),aC()):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[a.data]),a.data,"error"):console.log(a)}).fail(function(b,c,a){console.log(a)})}function aA(a){if($(a).hasClass("wpd-inline-shortcode"))var b=$(a).attr("id");else var b=$(a).parents(".wpd-inline-shortcode").attr("id");return b.substring(b.lastIndexOf("-")+1)}function aB(){$(".wpd-inline-form-wrapper").hide(),$(".wpd-inline-shortcode").removeClass("wpd-active"),$(".wpd-inline-icon").removeClass("wpd-open")}function o(){$.each($(".wpd-inline-shortcode:not(.wpd-inline-opened) .wpd-inline-icon"),function(){var a=$(this),b=a.offset().top-window.pageYOffset;a.parents(".wpd-inline-shortcode").find(".wpd-inline-form").length&&b>0&&b<300&&("blink"===l?(a.addClass("wpd-blink"),setTimeout(function(){a.removeClass("wpd-blink")},3e3)):(a.parents(".wpd-inline-shortcode").addClass("wpd-active"),a.siblings(".wpd-inline-form-wrapper").show(),a.addClass("wpd-open"),aC(a.siblings(".wpd-inline-form-wrapper"))))})}function aC(a){if(a){if(a.offset().left<=10){a.css("left",Math.ceil(parseInt(a.css("left"))-a.offset().left+10));var b=Math.ceil(a.siblings(".wpd-inline-icon.wpd-open").offset().left-a.offset().left+2);b<3&&(b=3),document.styleSheets[0].addRule("#"+a.parents(".wpd-inline-shortcode").attr("id")+" .wpd-inline-form-wrapper::before","left: "+b+"px;")}else if(a.offset().left+a.width()>document.body.clientWidth-10){a.css("left",Math.ceil(parseInt(a.css("left"))+(document.body.clientWidth-(a.offset().left+a.width()))-10));var b=Math.ceil(a.siblings(".wpd-inline-icon.wpd-open").offset().left-a.offset().left+2);b>a.width()-3&&(b=a.width()-3),document.styleSheets[0].addRule("#"+a.parents(".wpd-inline-shortcode").attr("id")+" .wpd-inline-form-wrapper::before","left: "+b+"px;")}}else $.each($(".wpd-inline-form-wrapper:visible"),function(){if($(this).offset().left<=10){$(this).css("left",Math.ceil(parseInt($(this).css("left"))-$(this).offset().left+10));var a=Math.ceil($(this).siblings(".wpd-inline-icon.wpd-open").offset().left-$(this).offset().left+2);a<3&&(a=3),document.styleSheets[0].addRule("#"+$(this).parents(".wpd-inline-shortcode").attr("id")+" .wpd-inline-form-wrapper::before","left: "+a+"px;")}else if($(this).offset().left+$(this).width()>document.body.clientWidth-10){$(this).css("left",Math.ceil(parseInt($(this).css("left"))+(document.body.clientWidth-($(this).offset().left+$(this).width()))-10));var a=Math.ceil($(this).siblings(".wpd-inline-icon.wpd-open").offset().left-$(this).offset().left+2);a>$(this).width()-3&&(a=$(this).width()-3),document.styleSheets[0].addRule("#"+$(this).parents(".wpd-inline-shortcode").attr("id")+" .wpd-inline-form-wrapper::before","left: "+a+"px;")}})}function aD(a){var b,c=0;if(a.parents(".wpd_main_comm_form").length)c=parseInt(wpdiscuzAjaxObj.commentTextMaxLength),b=a.parents(".wpd_main_comm_form");else if(a.parents(".wpd-secondary-form-wrapper").length)c=parseInt(wpdiscuzAjaxObj.replyTextMaxLength),b=a.parents(".wpd-secondary-form-wrapper");else if(a.parents("#wpdiscuz-edit-form").length){var e=aj(a);c=parseInt(e.substring(e.lastIndexOf("_")+1))?parseInt(wpdiscuzAjaxObj.replyTextMaxLength):parseInt(wpdiscuzAjaxObj.commentTextMaxLength),b=a.parents("#wpdiscuz-edit-form")}if(c&&b){var g=a.val().length,d=$(".wpd-editor-char-counter",b),f=c-g;d.html(f),f<=10?d.addClass("error"):d.removeClass("error")}}function aE(a,b,c,d){a.data.callbackFunctions&&$.each(a.data.callbackFunctions,function(e){"function"==typeof wpdiscuzAjaxObj[a.data.callbackFunctions[e]]?wpdiscuzAjaxObj[a.data.callbackFunctions[e]](a,b,c,d):"function"==typeof window[a.data.callbackFunctions[e]]?window[a.data.callbackFunctions[e]](a,b,c,d):console.log(a.data.callbackFunctions[e]+" is not a function")})}function G(c,d,a){d&&$("#wpdiscuz-loading-bar").show(),a.append("postId",I),a.append("wpdiscuz_nonce",wpdiscuzAjaxObj.wpdiscuz_nonce);var b=a.get("action");wpdiscuzAjaxObj.dataFilterCallbacks&&wpdiscuzAjaxObj.dataFilterCallbacks[b]&&$.each(wpdiscuzAjaxObj.dataFilterCallbacks[b],function(e){"function"==typeof wpdiscuzAjaxObj[wpdiscuzAjaxObj.dataFilterCallbacks[b][e]]&&(a=wpdiscuzAjaxObj[wpdiscuzAjaxObj.dataFilterCallbacks[b][e]](a,c,d))});var e=c?wpdiscuzAjaxObj.url:wpdiscuzAjaxObj.customAjaxUrl;return $.ajax({type:"POST",url:e,data:a,contentType:!1,processData:!1})}function p(){if(c||wpdiscuzAjaxObj.validateNonceForGuests){var a=new FormData;a.append("action","wpdGetNonce"),G(x,!1,a).done(function(a){"object"==typeof a?a.success?wpdiscuzAjaxObj.wpdiscuz_nonce=a.data:wpdiscuzAjaxObj.setCommentMessage(a.data,"error"):console.log(a)}).fail(function(b,c,a){console.log(a)})}}$(document).on("click","body",function(a){if($(a.target).hasClass("wpd-inline-form-close")||$(a.target).parents(".wpd-inline-form-close").length)a.preventDefault(),$(a.target).parents(".wpd-inline-form-wrapper").hide(),$(a.target).parents(".wpd-inline-shortcode").removeClass("wpd-active"),$(a.target).parents(".wpd-inline-form-wrapper").siblings(".wpd-inline-icon").removeClass("wpd-open");else if(!$(a.target).hasClass("wpd-inline-form-wrapper")&&!$(a.target).parents(".wpd-inline-form-wrapper").length){aB();var b="";$(a.target).hasClass("wpd-inline-icon")?b=$(a.target):$(a.target).parents(".wpd-inline-icon").length&&(b=$(a.target).parents(".wpd-inline-icon")),b.length&&b.parents(".wpd-inline-shortcode").find(".wpd-inline-form").length&&(b.parents(".wpd-inline-shortcode").addClass("wpd-active"),b.siblings(".wpd-inline-form-wrapper").show(),b.addClass("wpd-open"),b.removeClass("wpd-ignored"),aC(b.siblings(".wpd-inline-form-wrapper")))}(!$(a.target).hasClass("wpd-last-inline-comments-wrapper")&&!$(a.target).parents(".wpd-last-inline-comments-wrapper").length||$(a.target).parents(".wpd-last-inline-comments-wrapper").length&&$(a.target).hasClass("wpd-load-inline-comment"))&&$(".wpd-last-inline-comments-wrapper").remove()}),$("body").on("click",".wpd-inline-submit.wpd_not_clicked",function(c){c.preventDefault();var d=$(this),a=$(this).parents(".wpd_inline_comm_form");if(a[0].checkValidity()){$(this).removeClass("wpd_not_clicked");var b=new FormData;b.append("action","wpdAddInlineComment"),b.append("inline_form_id",aA(a)),$.each($("input, textarea",a),function(c,a){"checkbox"===this.type?$(this).is(":checked")&&b.append($(a).attr("name"),$(a).val()):b.append($(a).attr("name"),$(a).val())}),G(x,!0,b).done(function(b){if(d.addClass("wpd_not_clicked"),"object"==typeof b){if(b.success){a[0].reset(),aB();var e=parseInt(b.data.newCount),c=d.parents(".wpd-inline-icon-wrapper").find(".wpd-inline-icon-count");c.text(e),e?c.addClass("wpd-has-comments"):c.removeClass("wpd-has-comments"),b.data.allCommentsCountNew=parseInt(b.data.allCommentsCountNew),$(".wpd-thread-info").html(b.data.allCommentsCountBeforeThreadsHtml),$(".wpd-thread-info").attr("data-comments-count",b.data.allCommentsCountNew),$("#wpd-bubble-all-comments-count").replaceWith(b.data.allCommentsCountBubbleHtml),b.data.message&&az(b.data.message),wpdiscuzAjaxObj.setCommentMessage(b.data.notification,"success")}else b.data&&wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[b.data],b.data,d),"error")}else wpdiscuzAjaxObj.setCommentMessage(b,"error");$("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(b,c,a){console.log(a),$("#wpdiscuz-loading-bar").fadeOut(250)})}}),$("body").on("keydown",".wpd-form",function(a){a.ctrlKey&&13==a.keyCode&&$(this).find(".wc_comm_submit").trigger("click")}),$("body").on("keydown","#wpdiscuz-edit-form",function(a){a.ctrlKey&&13==a.keyCode&&$(this).find(".wc_save_edited_comment").trigger("click")}),$("body").on("keydown",".wpd-inline-comment-content",function(a){a.ctrlKey&&13==a.keyCode&&$(this).parents(".wpd_inline_comm_form").find(".wpd-inline-submit.wpd_not_clicked").trigger("click")}),$("body").on("click",".wpd-inline-icon-count.wpd-has-comments",function(){var b=$(this),a=new FormData;a.append("action","wpdGetLastInlineComments"),a.append("inline_form_id",aA(b)),G(x,!0,a).done(function(a){"object"==typeof a?a.success?$(a.data).insertAfter(b):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[a.data],a.data,b),"error"):console.log(a),$("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(b,c,a){console.log(a),$("#wpdiscuz-loading-bar").fadeOut(250)})}),$("body").on("click",".wpd-view-all-inline-comments",function(a){a.preventDefault(),$(this).parents(".wpd-last-inline-comments-wrapper").remove(),$(".wpdf-inline").hasClass("wpdf-active")||$(".wpdf-inline").trigger("click"),au(),$("html, body").animate({scrollTop:$(".wpdf-inline").offset().top-m},1e3,av)}),$("body").on("click",".wpd-feedback-content-link",function(a){a.preventDefault();var b=$(this).data("feedback-content-id");au(),$("html, body").animate({scrollTop:$("#wpd-inline-"+b).offset().top-(m+6)},1e3,function(){av(),$("#wpd-inline-"+b).addClass("wpd-active")})}),("scroll_open"===l||"blink"===l)&&(o(),$(window).on("scroll",o)),$("body").on("click","#wpd-post-rating.wpd-not-rated .wpd-rate-starts svg",function(){var a=new FormData,b=$(this).index();b>=0&&b<5&&(a.append("action","wpdUserRate"),a.append("rating",b+1),G(x,!0,a).done(function(a){"object"==typeof a?(a.success?location.reload(!0):wpdiscuzAjaxObj.setCommentMessage(wpdiscuzAjaxObj.applyFilterOnPhrase(wpdiscuzAjaxObj[a.data],a.data),"error"),aE(a)):console.log(a),$("#wpdiscuz-loading-bar").fadeOut(250)}).fail(function(b,c,a){console.log(a),$("#wpdiscuz-loading-bar").fadeOut(250)}))}),$("body").on("submit","#wpdiscuz-subscribe-form",function(d){d.preventDefault();var a=$(this);let b=$("#wpdiscuz_subscription_button",a);if(a[0].checkValidity()&&(f=a,g=!0,"2.0"===e&&$("input[name=wpdiscuz_recaptcha_subscribe_form]",f).length&&!$("input[name=wpdiscuz_recaptcha_subscribe_form]",f).val().length?(g=!1,$(".wpdiscuz-recaptcha",f).css("border","1px solid red")):"2.0"===e&&$("input[name=wpdiscuz_recaptcha_subscribe_form]",f).length&&$(".wpdiscuz-recaptcha",f).css("border","none"),g)&&b.hasClass("wpd_not_clicked")){b.removeClass("wpd_not_clicked");var f,g,c=new FormData;c.append("action","wpdAddSubscription"),$("*",a).each(function(){""!=this.name&&"checkbox"!=this.type&&"radio"!=this.type&&c.append(this.name+"",$(this).val()),("checkbox"==this.type||"radio"==this.type)&&$(this).is(":checked")&&c.append(this.name+"",$(this).val())}),G(x,!0,c).done(function(a){"object"==typeof a?a.success?(wpdiscuzAjaxObj.setCommentMessage(a.data,"success"),setTimeout(function(){location.reload(!0)},3e3)):wpdiscuzAjaxObj.setCommentMessage(a.data,"error"):wpdiscuzAjaxObj.setCommentMessage(a,"error"),$("#wpdiscuz-loading-bar").fadeOut(250),V=!1,b.addClass("wpd_not_clicked")}).fail(function(c,d,a){console.log(a),b.addClass("wpd_not_clicked"),$("#wpdiscuz-loading-bar").fadeOut(250)})}}),$("body").on("click",".wpd-unsubscribe",function(b){b.preventDefault();var a=new FormData;a.append("action","wpdUnsubscribe"),a.append("sid",$(this).data("sid")),a.append("skey",$(this).data("skey")),G(x,!0,a).done(function(a){"object"==typeof a?a.success?(wpdiscuzAjaxObj.setCommentMessage(a.data,"success"),setTimeout(function(){location.reload(!0)},3e3)):wpdiscuzAjaxObj.setCommentMessage(a.data,"error"):console.log(a),$("#wpdiscuz-loading-bar").fadeOut(250),V=!1}).fail(function(b,c,a){console.log(a),$("#wpdiscuz-loading-bar").fadeOut(250)})}),wpdiscuzAjaxObj.resetActiveFilters=function(a){$(".wpd-filter.wpdf-active"+(a?":not("+a+")":"")).removeClass("wpdf-active")},wpdiscuzAjaxObj.getAjaxObj=G,wpdiscuzAjaxObj.initNonce=p,p()});var onloadCallback=function(){if(document.getElementById("wpdiscuz-recaptcha-0_0")&&"2.0"===wpdiscuzAjaxObj.wpDiscuzReCaptchaVersion&&(1==wpdiscuzAjaxObj.wc_captcha_show_for_guest&&!wpdiscuzAjaxObj.is_user_logged_in||1==wpdiscuzAjaxObj.wc_captcha_show_for_members&&wpdiscuzAjaxObj.is_user_logged_in))try{grecaptcha.render("wpdiscuz-recaptcha-0_0",{sitekey:wpdiscuzAjaxObj.wpDiscuzReCaptchaSK,theme:wpdiscuzAjaxObj.wpDiscuzReCaptchaTheme,callback:function(a){jQuery("#wpdiscuz-recaptcha-field-0_0").val("key")},"expired-callback":function(){jQuery("#wpdiscuz-recaptcha-field-0_0").val("")}})}catch(a){console.log(a),wpdiscuzAjaxObj.setCommentMessage("reCaptcha Error: "+a.message,"error")}} /* Colorbox */ !function(t,e,i){var o,n,r,h,a,s,l,c,d,g,f,u,p,m,w,v,y,x,b,T,C,H,k,W,E,I,M,L,R,S,K,P,B,O={html:!1,photo:!1,iframe:!1,inline:!1,transition:"elastic",speed:300,fadeOut:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,opacity:.9,preloading:!0,className:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:void 0,closeButton:!0,fastIframe:!0,open:!1,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",photoRegex:/\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i,retinaImage:!1,retinaUrl:!1,retinaSuffix:"@2x.$1",current:"image {current} of {total}",previous:"previous",next:"next",close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",returnFocus:!0,trapFocus:!0,onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,rel:function(){return this.rel},href:function(){return t(this).attr("href")},title:function(){return this.title},createImg:function(){var e=new Image,i=t(this).data("cbox-img-attrs");return"object"==typeof i&&t.each(i,function(t,i){e[t]=i}),e},createIframe:function(){var i=e.createElement("iframe"),o=t(this).data("cbox-iframe-attrs");return"object"==typeof o&&t.each(o,function(t,e){i[t]=e}),"frameBorder"in i&&(i.frameBorder=0),"allowTransparency"in i&&(i.allowTransparency="true"),i.name=(new Date).getTime(),i.allowFullscreen=!0,i}},_="colorbox",j="cbox",D=j+"Element",F=j+"_open",N=j+"_load",z=j+"_complete",A=j+"_cleanup",q=j+"_closed",U=j+"_purge",$=t(""),G="div",Q=0,J={};function V(i,o,n){var r=e.createElement(i);return o&&(r.id=j+o),n&&(r.style.cssText=n),t(r)}function X(){return i.innerHeight?i.innerHeight:t(i).height()}function Y(e,i){i!==Object(i)&&(i={}),this.cache={},this.el=e,this.value=function(e){var o;return void 0===this.cache[e]&&(void 0!==(o=t(this.el).attr("data-cbox-"+e))?this.cache[e]=o:void 0!==i[e]?this.cache[e]=i[e]:void 0!==O[e]&&(this.cache[e]=O[e])),this.cache[e]},this.get=function(t){var e=this.value(t);return"function"==typeof e?e.call(this.el,this):e}}function Z(t){var e=d.length,i=(I+t)%e;return i<0?e+i:i}function tt(t,e){return Math.round((/%/.test(t)?("x"===e?g.width():X())/100:1)*parseInt(t,10))}function et(t,e){return t.get("photo")||t.get("photoRegex").test(e)}function it(t,e){return t.get("retinaUrl")&&i.devicePixelRatio>1?e.replace(t.get("photoRegex"),t.get("retinaSuffix")):e}function ot(t){"contains"in n[0]&&!n[0].contains(t.target)&&t.target!==o[0]&&(t.stopPropagation(),n.trigger("focus"))}function nt(t){nt.str!==t&&(n.add(o).removeClass(nt.str).addClass(t),nt.str=t)}function rt(i){t(e).trigger(i),$.triggerHandler(i)}var ht=function(){var t,e,i=j+"Slideshow_",o="click."+j;function r(){clearTimeout(e)}function h(){(C.get("loop")||d[I+1])&&(r(),e=setTimeout(P.next,C.get("slideshowSpeed")))}function a(){v.html(C.get("slideshowStop")).off(o).one(o,s),$.on(z,h).on(N,r),n.removeClass(i+"off").addClass(i+"on")}function s(){r(),$.off(z,h).off(N,r),v.html(C.get("slideshowStart")).off(o).one(o,function(){P.next(),a()}),n.removeClass(i+"on").addClass(i+"off")}function l(){t=!1,v.hide(),r(),$.off(z,h).off(N,r),n.removeClass(i+"off "+i+"on")}return function(){t?C.get("slideshow")||($.off(A,l),l()):C.get("slideshow")&&d[1]&&(t=!0,$.one(A,l),C.get("slideshowAuto")?a():s(),v.show())}}();function at(r){var g,w;if(!S){if(g=t(r).data(_),C=new Y(r,g),w=C.get("rel"),I=0,w&&!1!==w&&"nofollow"!==w?(d=t("."+D).filter(function(){return new Y(this,t.data(this,_)).get("rel")===w}),-1===(I=d.index(C.el))&&(d=d.add(C.el),I=d.length-1)):d=t(C.el),!L){L=R=!0,nt(C.get("className")),n.css({visibility:"hidden",display:"block",opacity:""}),f=V(G,"LoadedContent","width:0; height:0; overflow:hidden; visibility:hidden"),h.css({width:"",height:""}).append(f),H=a.height()+c.height()+h.outerHeight(!0)-h.height(),k=s.width()+l.width()+h.outerWidth(!0)-h.width(),W=f.outerHeight(!0),E=f.outerWidth(!0);var v=tt(C.get("initialWidth"),"x"),y=tt(C.get("initialHeight"),"y"),x=C.get("maxWidth"),B=C.get("maxHeight");C.w=Math.max((!1!==x?Math.min(v,tt(x,"x")):v)-E-k,0),C.h=Math.max((!1!==B?Math.min(y,tt(B,"y")):y)-W-H,0),f.css({width:"",height:C.h}),P.position(),rt(F),C.get("onOpen"),T.add(m).hide(),n.trigger("focus"),C.get("trapFocus")&&e.addEventListener&&(e.addEventListener("focus",ot,!0),$.one(q,function(){e.removeEventListener("focus",ot,!0)})),C.get("returnFocus")&&$.one(q,function(){t(C.el).trigger("focus")})}var O=parseFloat(C.get("opacity"));o.css({opacity:O==O?O:"",cursor:C.get("overlayClose")?"pointer":"",visibility:"visible"}).show(),C.get("closeButton")?b.html(C.get("close")).appendTo(h):b.appendTo("

"),function(){var e,o,n,r=P.prep,h=++Q;R=!0,M=!1,rt(U),rt(N),C.get("onLoad"),C.h=C.get("height")?tt(C.get("height"),"y")-W-H:C.get("innerHeight")&&tt(C.get("innerHeight"),"y"),C.w=C.get("width")?tt(C.get("width"),"x")-E-k:C.get("innerWidth")&&tt(C.get("innerWidth"),"x"),C.mw=C.w,C.mh=C.h,C.get("maxWidth")&&(C.mw=tt(C.get("maxWidth"),"x")-E-k,C.mw=C.w&&C.w").hide().insertBefore(a),$.one(U,function(){n.replaceWith(a)}),r(a)}else C.get("iframe")?r(" "):C.get("html")?r(C.get("html")):et(C,e)?(e=it(C,e),M=C.get("createImg"),t(M).addClass(j+"Photo").on("error."+j,function(){r(V(G,"Error").html(C.get("imgError")))}).one("load",function(){h===Q&&setTimeout(function(){var e;C.get("retinaImage")&&i.devicePixelRatio>1&&(M.height=M.height/i.devicePixelRatio,M.width=M.width/i.devicePixelRatio),C.get("scalePhotos")&&(o=function(){M.height-=M.height*e,M.width-=M.width*e},C.mw&&M.width>C.mw&&(e=(M.width-C.mw)/M.width,o()),C.mh&&M.height>C.mh&&(e=(M.height-C.mh)/M.height,o())),C.h&&(M.style.marginTop=Math.max(C.mh-M.height,0)/2+"px"),d[1]&&(C.get("loop")||d[I+1])&&(M.style.cursor="pointer",t(M).on("click."+j,function(){P.next()})),M.style.width=M.width+"px",M.style.height=M.height+"px",r(M)},1)}),M.src=e):e&&u.load(e,C.get("data"),function(e,i){h===Q&&r("error"===i?V(G,"Error").html(C.get("xhrError")):t(this).contents())})}()}}function st(){n||(B=!1,g=t(i),n=V(G).attr({id:_,class:!1===t.support.opacity?j+"IE":"",role:"dialog",tabindex:"-1"}).hide(),o=V(G,"Overlay").hide(),p=t([V(G,"LoadingOverlay")[0],V(G,"LoadingGraphic")[0]]),r=V(G,"Wrapper"),h=V(G,"Content").append(m=V(G,"Title"),w=V(G,"Current"),x=t('
'},u=/(^data:image\/)|(\.(png|jpe?g|gif|svg|webp|bmp|ico|tiff?)(\?\S*)?$)/i,f=/(youtube(-nocookie)?\.com|youtu\.be)\/(watch\?v=|v\/|u\/|embed\/?)?([\w-]{11})(.*)?/i,y=/(vimeo(pro)?.com)\/(?:[^\d]+)?(\d+)\??(.*)?$/,v=/((maps|www)\.)?google\.([^\/\?]+)\/?((maps\/?)?\?)(.*)/i,p=/(facebook\.com)\/([a-z0-9_-]*)\/videos\/([0-9]*)(.*)?$/i,m=function(){var e=n.createElement("div"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in t)if(void 0!==e.style[i])return t[i];return!1}();function h(e){var t=r();return m&&e.length?(e.one(m,t.resolve),setTimeout(t.resolve,500)):t.resolve(),t.promise()}function g(e,n,i){if(1===arguments.length)return t.extend({},e);if("string"==typeof n){if(void 0===i)return void 0===e[n]?null:e[n];e[n]=i}else t.extend(e,n);return this}function b(e){for(var t,n=decodeURI(e.split("#")[0]).split("&"),i={},r=0,o=n.length;r-1?"&":"?")+t.param(n)}function x(e,t){var n=e.indexOf("#");return-1===n?t:(n>0&&(e=e.substr(n)),t+e)}function C(e,n){var i=n.opener()&&n.opener().data("lity-desc")||"Image with no description",o=t(''+i+''),a=r(),l=function(){var e;a.reject((e="Failed loading image",t('').append(e)))};return o.on("load",function(){if(0===this.naturalWidth)return l();a.resolve(o)}).on("error",l),a.promise()}function k(e){return'