!function(){"use strict";class e{generateCallbackFunction(){return`jsonp_${Date.now()}_${Math.ceil(1e5*Math.random())}`}httpRequest(){return new XMLHttpRequest}jsonp(e,t){const o=this.generateCallbackFunction();window[o]=e=>{t(e)};const n=`${e}${-1!==e.indexOf("?")?"&":"?"}callback=${o}`,s=document.createElement("script");s.type="text/javascript";s.async=!0;s.src=n;document.getElementsByTagName("head")[0].appendChild(s)}send(e,t,o){const n=this.httpRequest();n.open(o,e);n.onreadystatechange=()=>{if(4===n.readyState&&200===n.status)try{const e=JSON.parse(n.responseText);t(e)}catch(e){console.log(`${e.message} in ${n.responseText}`);return}};n.send()}get(e,t){this.send(e,t,"GET")}}var t=new e;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);Element.prototype.closest||(Element.prototype.closest=function(e){let t=this;if(!document.documentElement.contains(t))return null;do{if(t.matches(e))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null});const o=()=>Array.prototype.slice.call(document.querySelectorAll(".comment-reply-to"));class n{constructor(){this.oneQuarterOfASecondMS=250;this.successRegexp=/[?|&]success=true/;this.replyingTo="";this.disableContactPromotion=!1;this.onFormReady=this.onFormReady.bind(this);this.onFormSubmitted=this.onFormSubmitted.bind(this);this.handleSuccess=this.handleSuccess.bind(this);this.handlePostResponse=this.handlePostResponse.bind(this);this.scrollToComment=this.scrollToComment.bind(this);this.renderComment=this.renderComment.bind(this);this.hsPopulateCommentsFeed=this.hsPopulateCommentsFeed.bind(this);this.getExtraMetaDataBeforeSubmit=this.getExtraMetaDataBeforeSubmit.bind(this);this.setUpThreading=this.setUpThreading.bind(this)}scrollToTarget(e){setTimeout((()=>{const t=document.documentElement||document.body,o=document.querySelector(e);if(o){t.style.transition=`all ${this.oneQuarterOfASecondMS}`;t.scrollTop=o.offsetTop}}),0)}getExtraMetaDataBeforeSubmit(){return{disableContactPromotion:this.disableContactPromotion,replyingTo:this.replyingTo}}onFormSubmitted(){const e="success=true";window.location.search?this.successRegexp.exec(window.location.search)?window.location.reload():window.location.search+=`&${e}`:window.location.search=e}handleSuccess(e,t){const o=document.querySelector(e);if(!(o&&o.querySelector("form").length>0))return setTimeout((()=>this.handleSuccess(e,t)),this.oneQuarterOfASecondMS);o.insertAdjacentHTML("afterbegin",`
`);return this.scrollToTarget(e)}handlePostResponse({successMessage:e,target:t}){this.successRegexp.exec(window.location.search)&&this.handleSuccess(t,e)}onFormReady({successMessage:e,target:t}={}){return this.handlePostResponse({successMessage:e,target:t})}isThreadId(e){const t=e.split(".");for(let e=0;e${d}
\n `;if(i){p+=`${r}`}else p+=r;p+=`\n
\n