var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,c,b){a instanceof String&&(a=String(a));for(var e=a.length,d=0;d<e;d++){var f=a[d];if(c.call(b,f,d,a))return{i:d,v:f}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,c,b){if(a==Array.prototype||a==Object.prototype)return a;a[c]=b.value;return a};$jscomp.getGlobal=function(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var c=0;c<a.length;++c){var b=a[c];if(b&&b.Math==Math)return b}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");var $jscomp$lookupPolyfilledValue=function(a,c){var b=$jscomp.propertyToPolyfillSymbol[c];if(null==b)return a[c];b=a[b];return void 0!==b?b:a[c]};$jscomp.polyfill=function(a,c,b,e){c&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(a,c,b,e):$jscomp.polyfillUnisolated(a,c,b,e))};
$jscomp.polyfillUnisolated=function(a,c,b,e){b=$jscomp.global;a=a.split(".");for(e=0;e<a.length-1;e++){var d=a[e];d in b||(b[d]={});b=b[d]}a=a[a.length-1];e=b[a];c=c(e);c!=e&&null!=c&&$jscomp.defineProperty(b,a,{configurable:!0,writable:!0,value:c})};
$jscomp.polyfillIsolated=function(a,c,b,e){var d=a.split(".");a=1===d.length;e=d[0];e=!a&&e in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var f=0;f<d.length-1;f++){var g=d[f];g in e||(e[g]={});e=e[g]}d=d[d.length-1];b=$jscomp.IS_SYMBOL_NATIVE&&"es6"===b?e[d]:null;c=c(b);null!=c&&(a?$jscomp.defineProperty($jscomp.polyfills,d,{configurable:!0,writable:!0,value:c}):c!==b&&($jscomp.propertyToPolyfillSymbol[d]=$jscomp.IS_SYMBOL_NATIVE?$jscomp.global.Symbol(d):$jscomp.POLYFILL_PREFIX+d,d=$jscomp.propertyToPolyfillSymbol[d],
$jscomp.defineProperty(e,d,{configurable:!0,writable:!0,value:c})))};$jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,b){return $jscomp.findInternal(this,a,b).v}},"es6","es3");$jscomp.polyfill("Object.is",function(a){return a?a:function(a,b){return a===b?0!==a||1/a===1/b:a!==a&&b!==b}},"es6","es3");
$jscomp.polyfill("Array.prototype.includes",function(a){return a?a:function(a,b){var c=this;c instanceof String&&(c=String(c));var d=c.length;b=b||0;for(0>b&&(b=Math.max(b+d,0));b<d;b++){var f=c[b];if(f===a||Object.is(f,a))return!0}return!1}},"es7","es3");
$jscomp.checkStringArgs=function(a,c,b){if(null==a)throw new TypeError("The 'this' value for String.prototype."+b+" must not be null or undefined");if(c instanceof RegExp)throw new TypeError("First argument to String.prototype."+b+" must not be a regular expression");return a+""};$jscomp.polyfill("String.prototype.includes",function(a){return a?a:function(a,b){return-1!==$jscomp.checkStringArgs(this,a,"includes").indexOf(a,b||0)}},"es6","es3");
app.config.blog_post_comment_response_display_time=app.config.blog_post_comment_response_display_time||6E3;$(function(){initBlogPostDetails($(".blog-post-details"))});
function initBlogPostDetails(a){function c(a){bm.ajax({url:app.baseUrl+"blogPage/loadPostComments",dataType:"json",data:a,success:function(a){a=a.html;l.html(a);b(a);e();f();bindloginAskingPopupEvents()}})}function b(a){$(a).on("click",".view-all-comment",function(){c({id:g,max:-1})})}function e(){a.find(".reaction").on("click",function(){var a=$(this).data();bm.ajax({url:app.baseUrl+"blogPage/reactBlogComment",dataType:"json",data:a,success:function(a){c({id:g})}})})}function d(a){a=a.data();bm.ajax({url:app.baseUrl+
"blogPage/getReplyPopup",dataType:"html",data:a,success:function(a){var b=$(a);b.find(".blog-comment-reply-popup").form({ajax:!0,preSubmit:function(a){$.extend(a,{success:function(a){bm.notify(a.message,"success");c({id:g});d.close()},error:function(a,c,d){renderMessage(b.find(".body .message-container"),d.message,"error");app.captchaUtil.reloadCaptcha(d.captchaType)}})}});var d=renderGlobalSitePopup(b,{clazz:"blog-comment-reply-popup"})}})}function f(){a.find(".btn-comment-reply").on("click",function(){var a=
$(this);d(a)})}var g=a.find("input[name='postId']").val(),l=a.find(".blog-post-comment-panel"),h=a.find(".comment-post-panel"),k=a.find("form#blog-post-create-comment-panel");k.form({ajax:{success:function(a){k.trigger("reset");"approved"==a.status&&c({id:g});var b=$('<div class="message-block info-message">'+a.message+"</div>");h.prepend(b);app.captchaUtil.reloadCaptcha(a.captchaType);setTimeout(function(){b.remove()},app.config.blog_post_comment_response_display_time)},error:function(a,b,c){var d=
$('<div class="message-block error-message">'+c.message+"</div>");h.prepend(d);app.captchaUtil.reloadCaptcha(c.captchaType);setTimeout(function(){d.remove()},app.config.blog_post_comment_response_display_time)}}});e();f();(function(){a.on("click",".loging-to-react",function(){var a=$(this).data();bm.ajax({url:app.baseUrl+"blogPage/logingToReact",dataType:"html",data:a,success:function(a){a=$(a);renderGlobalSitePopup(a)}})})})();b(a);a.find(".facebook-share-icon").on("click",function(){window.open("https://www.facebook.com/sharer/sharer.php?u="+
location.href+"?fbshare=true","_blank","width=480, height=360")});a.find(".facebook-messenger-share-icon").on("click",function(){window.open("https://api.addthis.com/oexchange/0.8/forward/messenger/offer?url="+location.href,"_blank","width=480, height=360")});a.find(".twitter-share-icon").on("click",function(){var a="http://twitter.com/share?url="+location.href;location.href.includes("?twtshare=true")||(a="http://twitter.com/share?url="+location.href+"?twtshare=true");window.open(a,"_blank","width=480, height=360")})}
;
