/* >>> file start: js/jquery/jquery.comments.js */ !function(e){e.comments=e.comments||{options:{selectors:{leaf:LJ.Util.isMediusJournal()?".mdspost-comment":".b-leaf",levelTwig:LJ.Util.isMediusJournal()?".mdspost-thread--level-{level}":".b-tree-twig-{level}",twig:LJ.Util.isMediusJournal()?".mdspost-thread":".b-tree-twig"},classNames:{levelTwig:LJ.Util.isMediusJournal()?"mdspost-thread--level-{level}":"b-tree-twig-{level}"}},scrollIsBugged:LJ.Support.isMobile(),mustFocusSynchronously:LJ.Support.isMobile(),skipAnimation:jQuery.browser.msie&&+jQuery.browser.version<=8||LJ.Support.isMobile()||!1,isMac:!!navigator.appVersion.match(/mac/i),_selector:function(e){return this.options.selectors[e]},_className:function(e){return this.options.classNames[e]}};var t=e.comments._selector.bind(e.comments),s=e.comments._className.bind(e.comments);e.extend(e.comments,{level:function(e){var l=e.is(t("twig"))?e:e.closest(t("twig")),i=RegExp(s("levelTwig").supplant({level:"(\\d+)"})).exec(l.prop("className"));return i&&parseInt(i[1],10)||1},parent:function(s,l){for(var i=s.closest(t("twig")),n=e.comments.level(i),r=i;n>1;){if(n--,r=r.prevAll(t("levelTwig").supplant({level:n})+":first"),0===r.length)return!1;if(!l||r.data("tid")===l)return r.find(t("leaf"))}return!1},parentByID:function(e){var t=angular.element("#"+e);return t.length?this.parent(t):!1},hasChildren:function(s){var l=s.is(t("twig"))?s:s.closest(t("twig")),i=e.comments.level(l);return e.comments.level(l.next())>i},isChild:function(s,l){var i=s.is(t("twig"))?s:s.closest(t("twig")),n=l.is(t("twig"))?l:l.closest(t("twig")),r=e.comments.level(l),o=e.comments.level(s);if(1===o||r>=o)return!1;var a=i.prevAll(t("levelTwig").supplant({level:r})+":first");return a.get(0)===n.get(0)},getThread:function(s,l){var i,n=s.closest(t("twig")),r=e.comments.level(n),o=l?[]:jQuery(),a=n;for(l?o.push(n.find(t("leaf"))):o=o.add(n.find(t("leaf")));;){if(a=a.next(),0===a.length)break;if(i=e.comments.level(a),r>=i)break;l?o.push(a.find(t("leaf"))):o=o.add(a.find(t("leaf")))}return o}})}(jQuery); /* <<< file end: js/jquery/jquery.comments.js */ //# map link was there [jquery.comments.js.map] /* >>> file start: js/jquery/jquery.hotkeys.js */ !function(e){function t(t){if("string"==typeof t.data){var s=t.handler,a=t.data.toLowerCase().split(" ");t.handler=function(t){if(this===t.target||!/textarea|select/i.test(t.target.nodeName)&&!/text|password|search|tel|url|email|number/.test(t.target.type)){var r="keypress"!==t.type&&e.hotkeys.specialKeys[t.which],f=String.fromCharCode(t.which).toLowerCase(),i="",h={};t.altKey&&"alt"!==r&&(i+="alt+"),t.ctrlKey&&"ctrl"!==r&&(i+="ctrl+"),t.metaKey&&!t.ctrlKey&&"meta"!==r&&(i+="meta+"),t.shiftKey&&"shift"!==r&&(i+="shift+"),r?h[i+r]=!0:(h[i+f]=!0,h[i+e.hotkeys.shiftNums[f]]=!0,"shift+"===i&&(h[e.hotkeys.shiftNums[f]]=!0));for(var l=0,o=a.length;o>l;l++)if(h[a[l]])return s.apply(this,arguments)}}}}e.hotkeys={version:"0.8",specialKeys:{8:"backspace",9:"tab",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",187:"+",189:"-",191:"/",224:"meta"},shiftNums:{"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":": ","'":'"',",":"<",".":">","/":"?","\\":"|"}},e.each(["keydown","keyup","keypress"],function(){e.event.special[this]={add:t}})}(jQuery); /* <<< file end: js/jquery/jquery.hotkeys.js */ //# map link was there [jquery.hotkeys.js.map] /* >>> file start: js/jquery/jquery.lj.commentsPager.js */ //= require js/jquery/jquery.hotkeys.js !function(t){"use strict";function e(t){this._switch("prev",t)}function a(t){this._switch("next",t)}function s(){return this._currentPage}function i(t){var e=Number(jQuery(t.currentTarget).text());e&&this._switch(e,t)}function r(t){var e;this._el("page").removeClass(this._cl("active")).eq(t-1).addClass(this._cl("active")),this.element.toggleClass(this._cl("first"),1===t).toggleClass(this._cl("last"),t===this._totalPages),this._ajaxLoader&&this._master&&(e=location.href.split("#")[0].replace(/\&?(page|view)=\d+/g,""),e=LiveJournal.constructUrl(e,t>1?{page:t}:null).replace("?&","?"),t!==this._currentPage&&(this._pushStateCount++,window.history.pushState(null,"",e))),this._ajaxLoader&&(e=location.href.split("#")[0].replace(/\&?(page|view)=\d+/g,""),this._el("prev").attr("href",LiveJournal.constructUrl(e,3>t?null:{page:t-1})),this._el("next").attr("href",LiveJournal.constructUrl(e,{page:t+1}))),this._currentPage=t,this._formatPages()}function n(t,e){var a,s;this._ajaxLoader?(s="next"!==t&&"prev"!==t?t:this._currentPage+("next"===t?1:-1),s=this._correctPageNumber(s),s!==this._currentPage&&this._fire("commentsPage",[s],!0)):(a=this._links[t].prop("href"),document.location=a),LJ.Event.trigger("commentsPager/change"),e&&e.preventDefault&&e.preventDefault()}function o(){var e,a=this;this._master&&(e=this._scrollTop,this._scrollTop=t(window).scrollTop(),this._scrollTop<=e||(this._bottomPager=this._bottomPager||t(".b-pager").last(),this._bottomPager.is(":screenable")&&!this._cachePages[this._currentPage]&&(this._cachePages[this._currentPage]=!0,setTimeout(function(){a._cachePages[a._currentPage]=!1},1e3*a._cachePagesTime),this._fire("cachePage",[this._correctPageNumber(this._currentPage+1)]),this._fire("cachePage",[this._correctPageNumber(this._currentPage-1)]))))}function c(t){return 1>t?1:t>this._totalPages?this._totalPages:t}function h(){t.lj.basicWidget.prototype._bindControls.apply(this);var e=this,a=t.comments.isMac?"alt":"ctrl",s=LJ.Function.threshold(this._switch,500);_||(jQuery(document).bind("keydown",a+"+left",s.bind(this,"prev")).bind("keydown",a+"+right",s.bind(this,"next")),this._ajaxLoader&&(window.onpopstate=function(){var t=1;location.href.match(/page=(\d+)/)&&(t=Number(RegExp.$1)),e._currentPage!==t&&e._pushStateCount>0&&(e._currentPage=t,e._fire("commentsPage",[t],!0))},t(window).on("scroll",LJ.Function.throttle(this._scroll.bind(this),100))),_=!0,this._master=!0),this._ajaxLoader&&(this.element.on("click",this._s("page"),this.loadPage.bind(this)).on("click",this._s("next"),this.next.bind(this)).on("click",this._s("prev"),this.prev.bind(this)),this._on("commentsPage",function(t){this._updatePager(t)}.bind(this)))}function l(){function t(t){jQuery(s[t]).after(a)}function e(t,e){LJ.Function.range(t,e).forEach(function(t){jQuery(s[t]).hide()})}jQuery(".b-pager-more__wrap",this.element).remove();var a='
  • ...
  • ',s=this._el("page");if(s.show(),!(this._totalPages<=9)){if(10===this._totalPages)return this._currentPage<=5?(e(7,8),t(7)):(e(1,2),t(1));if(this._currentPage<=5)return e(7,this._totalPages-2),t(7);if(this._currentPage>=this._totalPages-4)return e(1,this._totalPages-8),t(1);e(1,this._currentPage-4),e(this._currentPage+2,this._totalPages-2),t(1),t(this._currentPage+2)}}function g(){t.lj.basicWidget.prototype._create.apply(this);var e=this.options.selectors,a=this.element;this._scrollTop=null,this._bottomPager=null,this._cachePages={},this._cachePagesTime=100,this._links={prev:a.find(e.prev),next:a.find(e.next)},t.comments.isMac&&this.element.addClass(this._cl("mac")),this._ajaxLoader=!(!LJ.get("ajaxPagination")||!LJ.Support.history),this._currentPage=parseInt(a.find(e.active).text(),10)||1,this._totalPages=this._el("page").length,this._master=!1,this._formatPages(),this._pushStateCount=/webkit/i.test(navigator.userAgent)?0:1,this._bindControls()}var _=!1,u={classNames:{first:"b-pager-first",last:"b-pager-last",mac:"b-pager-mac",active:"b-pager-page-active"},selectors:{page:".b-pager-page",prev:".b-pager-prev a",next:".b-pager-next a",active:".b-pager-page-active"}};t.widget("lj.commentsPager",jQuery.lj.basicWidget,{options:u,_create:g,_bindControls:h,_formatPages:l,_correctPageNumber:c,_scroll:o,_switch:n,_updatePager:r,loadPage:i,page:s,next:a,prev:e})}(jQuery); /* <<< file end: js/jquery/jquery.lj.commentsPager.js */ //# map link was there [jquery.lj.commentsPager.js.map] /* >>> file start: js/core/crossStorageClient.js */ !function(){var e=LJ.Util.getWindow(),t={};LJ.define("LJ.Util.CrossStorage"),LJ.Util.CrossStorage=t;var n=void 0,r=function(){if(n)return n;var t=e.document.createElement("iframe");return t.style="display: none; width: 0; height: 0; border: 0;",t.frameBorder=0,t.src=LJ.get("statprefix")+("/??plain/crossStorageServ.html?&v="+LJ.get("v")),e.document.body.appendChild(t),n=new Promise(function(e){t.onload=function(){e(t)}})},o=function(t){var n=t.requestID;return new Promise(function(t){var r=function o(r){if(r.origin===LJ.get("statprefix")){var s=r.data||{};"crossStorageServResponse"in s&&s.requestID===n&&(e.removeEventListener("message",o),t(s.crossStorageServResponse))}};e.addEventListener("message",r)})};t.getItem=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return r().then(function(n){var r=Date.now()+""+Math.floor(1e4*Math.random()),s={fn:"getItem",args:[e],requestID:r};return n.contentWindow.postMessage(s,"*"),o({requestID:r}).then(function(e){var n=e;if(t.parseJSON)try{n=JSON.parse(e)}catch(r){}return n})})},t.setItem=function(e,t){return r().then(function(n){var r={fn:"setItem",args:[e,t]};n.contentWindow.postMessage(r,"*")})}}(); /* <<< file end: js/core/crossStorageClient.js */ //# map link was there [crossStorageClient.js.map] /* >>> file start: js/misc/newCommentsCounter.js */ //= require js/core/crossStorageClient.js !function(){var r={};LJ.define("LJ.Misc.NewCommentsCounter"),LJ.Misc.NewCommentsCounter=r;var e=1e3,t="ljNewCommentsCounter",n=LJ.Util.CrossStorage,o=function(){return{counters:{},orderArr:[],v:.1}};r.getAllStoredData=function(){return n.getItem(t,{parseJSON:!0})};var u=function(r){return r.replace(/^https?:\/\//,"")};r.setCounter=function(){var c=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],s=c.postURL,i=c.count;return r.getAllStoredData().then(function(r){var c=u(s),a=o();r&&(a=r),a.counters[c]=i;var d=a.orderArr.indexOf(c);d>-1&&(a.orderArr=a.orderArr.slice(0,d).concat(a.orderArr.slice(d+1))),a.orderArr.push(c);var l=a.orderArr.length-e;if(l>0){var f=a.orderArr.slice(0,l);a.orderArr=a.orderArr.slice(l),f.forEach(function(r){return delete a.counters[r]})}n.setItem(t,a)})},r.getCount=function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.postURL,n=u(t);return r.getAllStoredData().then(function(r){if(!r||!r.counters)return Promise.reject();var e=r.counters;return"number"!=typeof e[n]?Promise.reject():e[n]})},r.createCounter=function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.count,n=u(e.postURL);return r.getCount({postURL:n})["catch"](function(){r.setCounter({postURL:n,count:t})})}}(); /* <<< file end: js/misc/newCommentsCounter.js */ //# map link was there [newCommentsCounter.js.map] /* >>> file start: js/jquery/jquery.lj.comments.js */ LJ.UI.registerTemplate('templates-Comments-Twig', "
    {{if $data.html}} {{html $data.html}} {{else}} {{if $data.more}}
    {{each ($value.actions || $data.actions)}} {{html ($value.title || $data.title)}} {{if ($value.is_remote_sup || $data.is_remote_sup)}} {{if ($value.ljusers || $data.ljusers)}} {{html LJ.mltext(\'talk.from\')}} {{each ($value.ljusers || $data.ljusers)}}{{if !(($value.anonymous || $data.anonymous))}}{{if ($value.legacy || $data.legacy)}}{{html ($value.ljuser || $data.ljuser)}}{{else}}{{if ($value.amp || $data.amp)}}{{if ($value.show_userhead || $data.show_userhead)}}{{/if}}{{html ($value.journal || $data.journal)}}{{else}}{{if ($value.show_userhead || $data.show_userhead)}}{{/if}}{{if ($value.inline_css || $data.inline_css)}}{{if ($value.bold || $data.bold)}}{{/if}}{{html ($value.journal || $data.journal)}}{{if ($value.alias || $data.alias)}}*{{/if}}{{if ($value.bold || $data.bold)}}{{/if}}{{else}}{{if ($value.bold || $data.bold)}}{{/if}}{{html ($value.journal || $data.journal)}}{{if ($value.bold || $data.bold)}}{{/if}}{{/if}}{{if ($value.alias || $data.alias) && ($value.side_alias || $data.side_alias)}}{{html ($value.user_alias || $data.user_alias)}}{{/if}}{{/if}} {{/if}}{{else}}{{html LJ.mltext(\'talk.anonuser\')}}{{/if}}{{if !(($index === ljusers.length - 1))}}, {{/if}}{{/each}}{{if ($value.moreusers || $data.moreusers)}}…{{/if}} {{/if}} {{/if}} {{html LJ.mltext(\'talk.expandlink\')}} {{/each}}
    {{else}} {{if $data.deleted || !$data.shown}}

    {{if $data.leafclass == \'deleted\'}} {{html LJ.mltext(\'talk.deletedpost\')}} {{else $data.leafclass == \'screened\'}} {{html LJ.mltext(\'talk.screenedpost\')}} {{else $data.leafclass == \'spammed\'}} {{html LJ.mltext(\'talk.spammedpost\')}} {{else $data.leafclass == \'suspended\'}} {{html LJ.mltext(\'talk.suspendedpost\')}} {{/if}}

    {{if $data.controls}}
      {{each ($value.controls || $data.controls)}} {{if ($value.allowed || $data.allowed)}} {{if !($value.nocontrols || $data.nocontrols) || ($value.name || $data.name) == \'cancel_best\'}}
    • {{html ($value.title || $data.title)}}
    • {{/if}} {{/if}} {{/each}}
    {{/if}} {{if $data.actions}}
      {{each ($value.actions || $data.actions)}} {{if !(($value.footer || $data.footer))}} {{if ($value.name || $data.name) != \'permalink\'}} {{if !($value.noid || $data.noid) || ($value.name || $data.name) != \'collapse\'}} {{if ($value.allowed || $data.allowed)}} {{if !($value.checkbox || $data.checkbox) || ($value.massactions || $data.massactions)}}
    • {{if ($value.disabled || $data.disabled)}} {{html ($value.title || $data.title)}} {{else}} {{if ($value.checkbox || $data.checkbox)}} {{else}} {{html ($value.title || $data.title)}}{{if ($value.ljusers || $data.ljusers)}} {{html ($value.ljusers || $data.ljusers)}}{{if ($value.moreusers || $data.moreusers)}}, &ellipsis;{{/if}}{{/if}} {{/if}} {{/if}}
    • {{/if}} {{/if}} {{/if}} {{/if}} {{/if}} {{/each}}
    {{/if}}
    {{if $data.actions}}
      {{each ($value.actions || $data.actions)}} {{if ($value.footer || $data.footer)}} {{if ($value.name || $data.name) != \'permalink\'}} {{if !($value.noid || $data.noid) || ($value.name || $data.name) != \'collapse\'}} {{if ($value.allowed || $data.allowed)}} {{if !($value.checkbox || $data.checkbox) || ($value.massactions || $data.massactions)}}
    • {{if ($value.disabled || $data.disabled)}} {{html ($value.title || $data.title)}} {{else}} {{if ($value.checkbox || $data.checkbox)}} {{else}} {{html ($value.title || $data.title)}}{{if ($value.ljusers || $data.ljusers)}} {{html ($value.ljusers || $data.ljusers)}}{{if ($value.moreusers || $data.moreusers)}}, &ellipsis;{{/if}}{{/if}} {{/if}} {{/if}}
    • {{/if}} {{/if}} {{/if}} {{/if}} {{/if}} {{/each}}
    {{/if}}
    {{else}}
    {{if $data.shown}} {{if $data.subject}}

    {{html $data.subject}}

    {{/if}}

    {{if $data.is_best}}{{html LJ.mltext(\'talk.comment.best\')}}{{/if}}{{if $data.is_promo}}{{html LJ.mltext(\'talk.comment.promo\')}}{{/if}}{{if $data.username}}{{if $data.deleted_poster}}{{html $data.deleted_poster}}{{else}}{{each ($value.username || $data.username)}}{{if ($value.legacy || $data.legacy)}}{{html ($value.ljuser || $data.ljuser)}}{{else}}{{if ($value.amp || $data.amp)}}{{if ($value.show_userhead || $data.show_userhead)}}{{/if}}{{html ($value.journal || $data.journal)}}{{else}}{{if ($value.show_userhead || $data.show_userhead)}}{{/if}}{{if ($value.inline_css || $data.inline_css)}}{{if ($value.bold || $data.bold)}}{{/if}}{{html ($value.journal || $data.journal)}}{{if ($value.alias || $data.alias)}}*{{/if}}{{if ($value.bold || $data.bold)}}{{/if}}{{else}}{{if ($value.bold || $data.bold)}}{{/if}}{{html ($value.journal || $data.journal)}}{{if ($value.bold || $data.bold)}}{{/if}}{{/if}}{{if ($value.alias || $data.alias) && ($value.side_alias || $data.side_alias)}}{{html ($value.user_alias || $data.user_alias)}}{{/if}}{{/if}} {{/if}}{{/each}}{{/if}}{{else}}{{html LJ.mltext(\'talk.anonuser\')}}{{/if}} {{if $data.ipaddr}} {{html $data.ipaddr}} {{/if}}

    {{if $data.ctime}} {{html $data.ctime}} {{/if}} {{if $data.stime}} {{html $data.stime}} {{/if}} {{if $data.etime}} {{html LJ.mltext(\'talk.edited\')}} {{html $data.etime}} {{/if}}

    {{if $data.actions}}
      {{each ($value.actions || $data.actions)}} {{if !(($value.footer || $data.footer))}} {{if ($value.name || $data.name) != \'permalink\'}} {{if !($value.noid || $data.noid) || ($value.name || $data.name) != \'collapse\'}} {{if ($value.allowed || $data.allowed)}} {{if !($value.checkbox || $data.checkbox) || ($value.massactions || $data.massactions)}}
    • {{if ($value.disabled || $data.disabled)}} {{html ($value.title || $data.title)}} {{else}} {{if ($value.checkbox || $data.checkbox)}} {{else}} {{html ($value.title || $data.title)}}{{if ($value.ljusers || $data.ljusers)}} {{html ($value.ljusers || $data.ljusers)}}{{if ($value.moreusers || $data.moreusers)}}, &ellipsis;{{/if}}{{/if}} {{/if}} {{/if}}
    • {{/if}} {{/if}} {{/if}} {{/if}} {{/if}} {{/each}}
    • {{html LJ.mltext(\'talk.new\')}}
    {{/if}} {{/if}} {{if $data.loaded}} {{if $data.controls}}
      {{each ($value.controls || $data.controls)}} {{if ($value.allowed || $data.allowed)}} {{if !($value.nocontrols || $data.nocontrols) || ($value.name || $data.name) == \'cancel_best\'}}
    • {{html ($value.title || $data.title)}}
    • {{/if}} {{/if}} {{/each}}
    {{/if}} {{/if}}
    {{if $data.article}}
    {{html $data.article}}
    {{/if}}
    {{if $data.actions}}
      {{each ($value.actions || $data.actions)}} {{if ($value.footer || $data.footer)}} {{if ($value.name || $data.name) != \'permalink\'}} {{if !($value.noid || $data.noid) || ($value.name || $data.name) != \'collapse\'}} {{if ($value.allowed || $data.allowed)}} {{if !($value.checkbox || $data.checkbox) || ($value.massactions || $data.massactions)}}
    • {{if ($value.disabled || $data.disabled)}} {{html ($value.title || $data.title)}} {{else}} {{if ($value.checkbox || $data.checkbox)}} {{else}} {{html ($value.title || $data.title)}}{{if ($value.ljusers || $data.ljusers)}} {{html ($value.ljusers || $data.ljusers)}}{{if ($value.moreusers || $data.moreusers)}}, &ellipsis;{{/if}}{{/if}} {{/if}} {{/if}}
    • {{/if}} {{/if}} {{/if}} {{/if}} {{/if}} {{/each}}
    • {{html LJ.mltext(\'talk.new\')}}
    {{/if}}
    {{/if}} {{/if}} {{/if}}
    ", 'JQuery.stat'); LJ.UI.registerTemplate('templates-Widgets-promocomment', "
    {{if $data.promoAllowed}}

    {{html LJ.mltext(\'talk.promo.place.desc\')}}

    {{else}}

    {{html LJ.mltext(\'talk.promo.notokens.desc\', \'tokens\', $data.tokens)}}

    {{html LJ.mltext(\'talk.promo.notokens.button\')}} {{html LJ.mltext(\'talk.promo.notokens.window\')}}

    {{/if}}
    ", 'JQuery.stat'); LJ.UI.registerTemplate('templates-Comments-v6-Comment', "
    {{if $data.html}} {{html $data.html}} {{else}} {{if $data.more}}
    {{each ($value.actions || $data.actions)}}{{html ($value.title || $data.title)}}{{if ($value.ljusers || $data.ljusers)}}{{html LJ.mltext(\'talk.from\')}}{{each ($value.ljusers || $data.ljusers)}}{{if ($value.anonymous || $data.anonymous)}}{{html LJ.mltext(\'talk.anonuser\')}}{{else}}{{if ($value.legacy || $data.legacy)}}{{html ($value.ljuser || $data.ljuser)}}{{else}}{{if ($value.amp || $data.amp)}}{{if ($value.show_userhead || $data.show_userhead)}}{{/if}}{{html ($value.journal || $data.journal)}}{{else}}{{if ($value.show_userhead || $data.show_userhead)}}{{/if}}{{if ($value.inline_css || $data.inline_css)}}{{if ($value.bold || $data.bold)}}{{/if}}{{html ($value.journal || $data.journal)}}{{if ($value.alias || $data.alias)}}*{{/if}}{{if ($value.bold || $data.bold)}}{{/if}}{{else}}{{if ($value.bold || $data.bold)}}{{/if}}{{html ($value.journal || $data.journal)}}{{if ($value.bold || $data.bold)}}{{/if}}{{/if}}{{if ($value.alias || $data.alias) && ($value.side_alias || $data.side_alias)}}{{html ($value.user_alias || $data.user_alias)}}{{/if}}{{/if}} {{/if}}{{/if}}{{/each}}{{if ($value.moreusers || $data.moreusers)}}…{{/if}}{{/if}}{{/each}}
    {{else}} {{if $data.deleted || !$data.shown}}
    {{if $data.leafclass == \'deleted\'}}{{html LJ.mltext(\'talk.deletedpost\')}}{{else $data.leafclass == \'screened\'}}{{html LJ.mltext(\'talk.screenedpost\')}}{{else $data.leafclass == \'spammed\'}}{{html LJ.mltext(\'talk.spammedpost\')}}{{else $data.leafclass == \'suspended\'}}{{html LJ.mltext(\'talk.suspendedpost\')}}{{/if}}
    {{if $data.actions}}
      {{each ($value.actions || $data.actions)}}{{if ($value.name || $data.name) != \'permalink\'}}{{if !($value.noid || $data.noid) || ($value.name || $data.name) != \'collapse\'}}{{if ($value.allowed || $data.allowed)}}{{if !($value.checkbox || $data.checkbox) || ($value.massactions || $data.massactions)}}
    • {{if ($value.disabled || $data.disabled)}}{{html ($value.title || $data.title)}}{{else}}{{if ($value.checkbox || $data.checkbox)}}{{else}}{{html ($value.title || $data.title)}}{{if ($value.ljusers || $data.ljusers)}} {{html ($value.ljusers || $data.ljusers)}}{{if ($value.moreusers || $data.moreusers)}}, &ellipsis;{{/if}}{{/if}}{{/if}}{{/if}}
    • {{/if}}{{/if}}{{/if}}{{/if}}{{/each}}
    • {{html LJ.mltext(\'post2017.comments.new-comment\')}}
    {{/if}}
    {{else}}
    {{if $data.userpic}}\"\"{{else}}\"\"{{/if}}
    {{if $data.shown}}

    {{if $data.username}}{{if $data.deleted_poster}}{{html $data.deleted_poster}}{{else}}{{each ($value.username || $data.username)}}{{if ($value.legacy || $data.legacy)}}{{html ($value.ljuser || $data.ljuser)}}{{else}}{{if ($value.amp || $data.amp)}}{{if ($value.show_userhead || $data.show_userhead)}}{{/if}}{{html ($value.journal || $data.journal)}}{{else}}{{if ($value.show_userhead || $data.show_userhead)}}{{/if}}{{if ($value.inline_css || $data.inline_css)}}{{if ($value.bold || $data.bold)}}{{/if}}{{html ($value.journal || $data.journal)}}{{if ($value.alias || $data.alias)}}*{{/if}}{{if ($value.bold || $data.bold)}}{{/if}}{{else}}{{if ($value.bold || $data.bold)}}{{/if}}{{html ($value.journal || $data.journal)}}{{if ($value.bold || $data.bold)}}{{/if}}{{/if}}{{if ($value.alias || $data.alias) && ($value.side_alias || $data.side_alias)}}{{html ($value.user_alias || $data.user_alias)}}{{/if}}{{/if}} {{/if}}{{/each}}{{/if}}{{else}}{{html LJ.mltext(\'talk.anonuser\')}}{{/if}}{{if $data.ipaddr}}{{html $data.ipaddr}}{{/if}}

    {{if $data.ctime}}{{html $data.ctime}}{{/if}}{{if $data.stime}}{{/if}}{{if $data.etime}}{{/if}}

    {{/if}}{{if $data.loaded}}{{if $data.controls}}{{/if}}{{/if}}{{if $data.is_best}}{{html LJ.mltext(\'talk.comment.best\')}} {{/if}}
    {{if $data.article}}
    {{if $data.subject}}

    {{html $data.subject}}

    {{/if}}{{html $data.article}}
    {{/if}}{{if $data.actions}}{{/if}}
    {{/if}} {{/if}} {{/if}}
    ", 'JQuery.stat'); //= require js/misc/newCommentsCounter.js !function(e,t){"use strict";var o=LJ.Util.getWindow(),s=LJ.Util.getDocument(),i=void 0,a=function(){function e(e){var o=l[e];if(o){if(t(e))return!0;a(e)}return!1}function t(e){var t=new Date,o=m[e];return 1e3*d>t-o}function o(){for(var e;r.length>c;)e=r[0],a(e)}function s(t,s){e(t)||(s?(l[t]=s,m[t]=new Date,r.push(t),o()):h._fetchThread(t,function(e){l[t]=e,m[t]=new Date,r.push(t),o()}))}function i(t){return e(t)?l[t]:null}function a(e){l[e]&&(delete l[e],delete m[e],r=r.filter(function(t){return t!==e}))}function n(e,t){h=e}var r=[],l={},m={},d=180,c=10,h=null;return{init:n,add:s,remove:a,get:i,isCached:e}}(),n=!!LJ.get("is_post"),r=LJ.Util.isMediusJournal(),l=function(e,t){var o=t.isPost2017ViewPage,s=t.isMediusJournal;return"spamCounter"===e?o?".js-spamcount":".b-xylem-cell-spam .js-amount":"replyCounter"===e?o?".js-replycount":s?".mdspost-comments-controls__count .js-amount":".b-xylem-cell-amount .js-amount":""},m=function(e,t){var o=t.isPost2017ViewPage;return"showSpam"===e?o?"mdspost-comments--showspam":"b-grove-showspam":""};e.widget("lj.comments",e.lj.basicWidget,{options:{selectors:{linkCollapse:LJ.Util.isMediusJournal()?".mdspost-comment-actions__item--collapse a":".b-leaf-actions-collapse a",linkExpand:LJ.Util.isMediusJournal()?".mdspost-comment-actions__item--expand a":".b-leaf-actions-expand a",linkExpandChildren:LJ.Util.isMediusJournal()?".mdspost-comment-actions__item--expandchilds a":".b-leaf-actions-expandchilds a",linkPromote:LJ.Util.isMediusJournal()?".mdspost-comment-actions__item--promote a":".b-leaf-actions-promote a",linkUnpromote:LJ.Util.isMediusJournal()?".mdspost-comment-actions__item--cancel_promo a":".b-leaf-actions-cancel_promo a",leafMore:LJ.Util.isMediusJournal()?".mdspost-comment--seemore":".b-leaf-seemore",seeMore:LJ.Util.isMediusJournal()?".mdspost-comment-seemore__more":".b-leaf-seemore-more a, .b-leaf-seemore-expand a",commentDeleted:LJ.Util.isMediusJournal()?".mdspost-comment--deleted":".b-leaf-deleted",commentBest:LJ.Util.isMediusJournal()?".mdspost-comment--best":".b-leaf-best",leaf:LJ.Util.isMediusJournal()?".mdspost-comment":".b-leaf",leafCollapsed:LJ.Util.isMediusJournal()?".mdspost-comment--collapsed":".b-leaf-collapsed",tree:".b-tree-root",twig:LJ.Util.isMediusJournal()?".mdspost-thread":".b-tree-twig",pager:".b-pager",replyCounter:l("replyCounter",{isPost2017ViewPage:n,isMediusJournal:r}),spamCounter:l("spamCounter",{isPost2017ViewPage:n}),commentsJSON:"#comments_json",title:"title",metaDescription:"meta[name=description]",actionsItem:LJ.Util.isMediusJournal()?".mdspost-comment-actions__item":".b-leaf-actions-item",treeStart:LJ.Util.isMediusJournal()?".mdscomments-list--":".b-tree-",promoPrice:LJ.Util.isMediusJournal()?".mdscomments-list--promo":".b-tree-promo"},classNames:{groveLoading:"b-grove-loading",newComment:"b-leaf-new",commentScreened:(LJ.Util.isMediusJournal()?"mdspost-comment--":"b-leaf-")+"screened",leafCollapsed:LJ.Util.isMediusJournal()?"mdspost-comment--collapsed":"b-leaf-collapsed",leafCollapsing:"b-leaf-collapsing",leafExpanding:"b-leaf-expanding",leafActive:"b-leaf-commenting",leafShow:"b-leaf-hover",leafClipped:"b-leaf-clipped",leafLevelUp:LJ.Util.isMediusJournal()?"mdspost-comment--parent":"b-leaf-seemore-parent",leafMore:"b-leaf-seemore",shortTime:LJ.Util.isMediusJournal()?"mdspost-comment-time--shorttime":"b-leaf-shorttime",seeMoreVertical:"b-leaf-seemore-depth",groveShowOnHover:"b-grove-hover",showSpam:m("showSpam",{isPost2017ViewPage:n}),twigLevel:"b-tree-twig-"},templates:{twig:LJ.Util.isMediusJournal()?'
    {html}
    ':'
    {html}
    ',emptyLeaf:'
    ',promoBubble:"templates-Widgets-promocomment",leaf:LJ.Util.isMediusJournal()?"templates-Comments-v6-Comment":"templates-Comments-Twig"}},_create:function(){var n=this;e.lj.basicWidget.prototype._create.apply(this);var r,l=location.href.match(/(\d+)\.html/),m=this.options.selectors,d=null;this._itemid=l&&l[1],this._remoteBalance=LJ.get("remote.balance"),this._root=this._el("tree"),this._pager=this._el("pager"),this._constructionCache={},this._showSpamPage=this.element.hasClass(this._cl("showSpam")),this.element.removeClass(this._cl("groveShowOnHover")),this._bindControls(),this._pager.commentsPager(),this._pagerWidget=this._pager.first().data("commentsPager"),this._title=e(m.title),this._pageTitle=this._title.text(),this._description=e(m.metaDescription),this._pageDescription=this._description.attr("content"),this._titleMl=LJ.ml("talk.post.subject_page"),this._descriptionMl=LJ.ml("talk.post.meta_desct_page"),this._addPagerData(),this._replycount=LJ.get("replycount")||0,i=LJ.Object.resolve(LJ,"Misc.NewCommentsCounter"),i&&i.createCounter({postURL:o.location.host+o.location.pathname,count:this._replycount}),this._spamcount=LJ.get("spamcount")||0,this._bestTid=e(LJ.Util.isMediusJournal()?".mdscomments-list--best .mdspost-thread":".b-tree-best .b-tree-twig").attr("data-tid")||"",this._promoTid=e(m.promoPrice).find(".b-tree-twig").attr("data-tid")||"",this._promoPrice=Number(e(m.promoPrice).attr("data-currentprice")),a.init(this,this._pagerWidget),this._on("cachePage",a.add),"undefined"!=typeof LJ.get("comments")&&(this.element.addClass(this._cl("groveLoading")),this._root.css({"min-height":e(t).height()}),this._hideRoot(),this._one("commentsConstructed",function(){this._restoreRoot(),this.element.removeClass(this._cl("groveLoading"))}.bind(this)),this._on("commentsPage",function(){this._root.css({"min-height":e(t).height()}),this._loadPage.apply(this,[].slice.call(arguments)),e(t).scrollTop(this.element.offset().top+this.element.outerHeight()-this.element.height())}.bind(this)),this._on("commentsConstructed",function(){setTimeout(function(){LJ.Event.trigger("social:widgets:parse")},300),this._root.removeAttr("style"),this.hasOwnProperty("_realRoot")&&this._realRoot.removeAttr("style")}.bind(this)),d=LJ.get("comments"),this._pagerWidget&&(r=this._pagerWidget.page(),a.add(r,d)),this._constructComments(d),setTimeout(function(){document.location.hash.length>0&&(document.location.hash=document.location.hash)},0));var c=s.querySelector("#comments"),h=LJ.Function.debounce(function(){var e=c.getBoundingClientRect(),t=o.innerHeight;e.topi-t?setTimeout(r.bind(null,s),o-(i-t)):r(s),a.add(e,s)}))},_bindControls:function(){var t,o,s=this,i=this.options.selectors,n=this.options.classNames;e.lj.basicWidget.prototype._bindControls.apply(this),["Expand","Collapse","ExpandChildren","Promote","Unpromote"].forEach(function(t){var o=i["link"+t],a=t.toLowerCase();"expandchildren"===a&&(a="expand"),s.element.delegate(o,"click",function(t){var o=e(this),n=o.closest(i.leaf);s[a](n.prop("id"),n,o.prop("href"),o.closest(i.actionsItem)[0]),t.preventDefault()})}),o=new LJ.DelayedCall(function(e){e.addClass(n.leafShow)},150),t=new LJ.DelayedCall(this._loadTimestamp.bind(this),150),this.element.delegate(i.leaf,"click",function(){e(this).removeClass(n.newComment)}).delegate(i.seeMore,"click",function(t){var o=e(this).closest(i.leaf),a=o.hasClass(n.leafExpanding)||o.hasClass(n.leafCollapsing);o.hasClass(n.leafLevelUp)||(a||s._loadMore(o),t.preventDefault())}).delegate(i.leaf,"mouseover",function(s){var i=e(this);s.target.className.indexOf&&-1!==s.target.className.indexOf(n.shortTime)&&!s.target.getAttribute("title")&&t.run(i,e(s.target)),i.hasClass(n.leafShow)||o.run(i)}).delegate(i.leaf,"mouseout",function(s){var i=e(this),a=e(s.relatedTarget);t.stop(),0===a.closest(i).length&&(o.stop(),i.removeClass(n.leafShow))}),this.element.bind("expand",function(e,t,o){s.expand(t,null,o)}).bind("collapse",function(e,t,o){s.collapse(t,null,o)}).bind("refreshThread",this._refreshThread.bind(this)).bind("newComment",this._addNewComment.bind(this)).bind("deleteComment",this._deleteComment.bind(this)).bind("removeFromDOM",this._removeFromDOM.bind(this)),this.element.bind("commentsUpdated",function(e,t,o,i){var a=arguments.length<=4||void 0===arguments[4]?{}:arguments[4],n=0;if(["addnew","unscreen"].indexOf(o)>-1)n=1;else if("delone"===o||"delmany"===o)if(a&&a.length){var r=a.filter(function(e){return!e.screened}).length;n=-r}else n=-i;else"screen"===o&&(n=-1);0!==n&&(s._showSpamPage?s._spamNumberChanged(n):s._commentsNumberChanged(n)),LJ.Event.trigger("entry/fixLinks"),setTimeout(function(){LJ.Event.trigger("social:widgets:parse")},300)}),LJ.Event.on("commentator/submit",function(){s._pagerWidget&&a.remove(s._pagerWidget.page())}),LJ.Event.on("commentsPager/change",s._addPagerData.bind(s))},_addPagerData:function(){var e,t=this._pageTitle,o=this._pageDescription;this._pagerWidget&&(e=this._pagerWidget.page()),e&&1!==e&&(t+=" - "+this._titleMl+" "+e,o+=" - "+this._descriptionMl+" "+e),this._title.text(t),this._description.attr("content",o)},_loadTimestamp:function(t,o){var s={journal:Site.currentJournal,thread:t.attr("id").substr(1)},i=function(e){"ok"===e.status&&o.attr("title",e.stamp)};e.get(LiveJournal.getAjaxUrl("get_thread_timestamp"),s,i,"json")},_highlightNewComments:function(){this._highlightNewLeaves(this.element.find(this.options.selectors.leaf))},_highlightNewLeaves:function(t,o){o=o||this._getPageTimestamp();var s,i=this,a=this.options.classNames.newComment,n=o||0;e.each(t,function(){var e=parseInt(this.getAttribute("data-updated-ts"),10),t=this.getAttribute("data-username"),s=this.className,r=-1!==s.indexOf(i._cl("leafMore"));e>n&&!r&&(n=e),o&&e>o&&(!Site.remoteUser||Site.remoteUser!==t)&&(this.className=s+" "+a,r&&this.setAttribute("data-max-ts",o))}),s=this._getPageTimestamp(),(!o||n>s)&&this._setPageTimestamp(n)},_getPageTimestamp:function(){var e=this._getPageHash(),t=LJ.Storage.getItem(e)||{};return t&&parseInt(t.stamp,10)},_setPageTimestamp:function(e){if(e){var t=this._getPageHash();LJ.Storage.setItem(t,{stamp:e,updated:+new Date})}},_getPageHash:function(){var e=["url="+Site.currentEntry];return e.push("thread="+(LiveJournal.parseGetArgs(location.href).thread||0)),e.push("page="+this._getCurrentPage()),e.join(";")},_getCurrentPage:function(){return 0===this._pager.length?1:this._pager.commentsPager("page")},_addPoster:function(e){e.poster=LJ.get("entry.poster")},_createComment:function(t){var o,s,i,a,n,r,l,m,d=this.options.selectors,c=this.options.templates;return t.parent?(l=this._constructionCache.hasOwnProperty(t.parent)?this._constructionCache[t.parent]:this._root.find("#t"+t.parent),m=e.comments.getThread(l,!0),i=t.level?t.level:e.comments.level(l)+1,r=m[m.length-1].closest(d.twig)):(i=1,r=this._root),n=t.margin||30*(i-1),a=i>=50?50:10*Math.floor(i/10),s={dtalkid:t.dtalkid,level:i,deepLevel:a,margin:n},t.hasOwnProperty("html")?o=e(c.twig.supplant({html:t.html||c.emptyLeaf}).supplant(s)):(t=e.extend({},t,{level:i,deepLevel:a,margin:n}),this._addPoster(t),o=this._tmpl("leaf",t)),r===this._root?r.append(o):o.insertAfter(r),this._constructionCache[t.dtalkid]=o,o},_addNewComment:function(o,s){if(this._showSpamPage||!LiveJournal.parseGetArgs(location.href).thread&&this._getCurrentPage()-s.page!==0||!s.parenttalkid&&LiveJournal.parseGetArgs(location.href).thread)return void(t.location.href=decodeURIComponent(s.result));if(0===e("#t"+s.dtalkid).length){var i=s.parenttalkid&&s.parenttalkid.substr(1)||null;this._createComment({dtalkid:s.dtalkid,parent:i,html:""}),e("#t"+s.dtalkid).empty()}this._refreshThread(null,s.dtalkid,!0,"addnew"),setTimeout(function(){t.location.hash="t"+s.dtalkid},0)},_constructComments:function(e,t){function o(){s._restoreRoot(),r.resetQueue()}var s=this,i=[],a=e.length,n=0,r=LJ.Function.threshold(function(){if(n===a)return s._off("commentsPage",o),s._highlightNewLeaves(i,t),s._fire("commentsConstructed",null,!0),LJ.Event.trigger("entry/fixLinks"),void n++;if(!(n>a)){var l=s._createComment(e[n]).find(s._s("leaf"));i.push(l.get(0)),n++,r()}},25,!0);!function(e){return e}(),t=t||this._getPageTimestamp(),r.batch(20),Function.defer(s._one.bind(s,"commentsPage",o)),r()},_loadMore:function(e){var t=this,o=e.data("parent");e.addClass(this.options.classNames.leafExpanding),this._fetchThread("t"+o,function(o){o.shift(),t._constructComments(o,e.data("max-ts")),e.remove()},null,e.hasClass(this._cl("seeMoreVertical"))?0:2)},_deleteComment:function(t,o,s,i){function a(){var t=0;h.each(function(o){h[o].id&&(l._bestTid===h[o].id&&(h=h.add(e(LJ.Util.isMediusJournal()?".mdscomments-list--best .mdspost-thread .mdspost-comment":".b-tree-best .b-tree-twig .b-leaf"))),l._promoTid===h[o].id&&(h=h.add(e(r.promoPrice).find(".b-tree-twig .b-leaf"))),t++)}),h.replaceWith(c);var a=h.map(function(e,t){return{screened:t.classList.contains(n.commentScreened)}}).toArray(),m=s||i?"delmany":"delone";l.element.trigger("commentsUpdated",["t"+o,m,t,a]),l._checkSpamPageStatus()}var n=this.options.classNames,r=this.options.selectors,l=this,m=function(e){return e.clone().wrap("
    ").parent().html()},d=this.element.find(r.commentDeleted+":first"),c=d.length&&m(d),h=this.element.find("#t"+o);0===d.length&&this._fetchThread("t"+o,function(t){var o=t.pop(),s=o.hasOwnProperty("html")?e(o.html).filter(r.commentDeleted):l._tmpl("leaf",o).find(r.commentDeleted);if(0===s.length){var i=e('[data-tid="t'+o.dtalkid+'"]').find('input[type="checkbox"]');return void i.prop("checked",!1)}c=m(s),a()},!0),s&&(h=h.add(e.comments.getThread(h))),i&&(h=h.add(this.element.find(r.leaf+"[data-username="+i+"]"))),0!==d.length&&a()},_removeFromDOM:function(t,o,s){e.isArray(o)||(o=[o]),o.forEach(function(t){var o="#t"+t,s=e(o);s.length>0&&s.remove()}),this._checkSpamPageStatus(),!this._showSpamPage||"spamcomment"!==s&&"unspam"!==s||(this._spamNumberChanged(-o.length),this._commentsNumberChanged(o.length))},_checkSpamPageStatus:function(){var e,t,o=this.options.selectors,s=o.leaf+":not("+o.commentDeleted+"):not("+o.commentBest+"):first";this._showSpamPage&&0===this.element.find(s).length&&(e=LiveJournal.parseGetArgs(location.href),t=location.href.split("?")[0],delete e.mode,delete e.page,location.href=LiveJournal.constructUrl(t,e).replace(/\?$/,"")+"#comments")},_refreshThread:function(t,o,s,i){var a=this;this._fetchThread("t"+o,function(t){a._applyFetchResults(t,!0,function(){if(!s){var n,r,l,m,d=[];for(l=0,m=t.length;m>l;++l)d.push("t"+t[l].dtalkid);n=" "+d.join(" ")+" ",r=e.comments.getThread(e("#t"+o)).filter(function(){return-1===n.indexOf(" "+this.id+" ")}),r.addClass(a._cl("leafCollapsed")).removeAttr("data-full")}a.element.trigger("commentsUpdated",["t"+o,i])},i),/set_(promo|best)/.test(i)&&a._updateTop(t,function(){a.element.trigger("topUpdated")},i)},s)},_fetchThread:function(t,o,s,i){function a(){m._restoreRoot(),n.abort()}s=s||!1,o=o||e.noop;var n,r,l,m=this,d=t.toString().match(/t(\d+)/),c=d&&d[1],h=LJ.get("journal.is_medius"),p="thread";c||(p="page",c=t),l={journal:Site.currentJournal,itemid:this._itemid,flat:s?"1":"",skip:i?i:"",media:h?"1":""},r=LiveJournal.parseGetArgs(location.href),l[p]=c,"thread"===p&&(l.expand_all=s?"":"1"),r&&r.style&&"mine"===r.style&&(l.style="mine"),n=e.ajax({url:LiveJournal.getAjaxUrl("get_thread"),data:l,dataType:"json",timeout:7500}).success(function(e){m._off("commentsPage",a),e.hasOwnProperty("comments")&&(e=e.comments),o(e)}).error(function(e,i){"abort"!==i&&(m._off("commentsPage",a),setTimeout(m._fetchThread.bind(m,t,o,s),7500))}),function(e){return e}(),Function.defer(m._one.bind(m,"commentsPage",a))},_updateCounters:function(e){"replycount"in e&&(this._el("replyCounter").html(LJ.ml("talk.replycount",{count:e.replycount})),LJ.Event.trigger("commentCounterChange",{formElement:this,replyCounter:e.replycount})),"spamcount"in e&&this._el("spamCounter").html(LJ.ml("talk.spamcount",{count:e.spamcount}))},_applyFetchResults:function(t,o,s,i){var a=this,n=t.length,r=function(){n--,n||s()};s=s||e.noop,t.forEach(function(t){var o,s,n;t.html?n=e(t.html).filter("div"):(a._addPoster(t),n=a._tmpl("leaf",t).find(a._s("leaf"))),o=n.prop("id"),s=e("#"+o),s.hasClass(a._cl("leafCollapsed"))&&!n.hasClass(a._cl("leafCollapsed"))&&n.addClass(a._cl("leafCollapsed")).data("full",1),"expand"===i&&s.hasClass(a.options.classNames.leafActive)?"expand"===i&&s.removeClass(a._cl("leafExpanding")):s.replaceWith(n),r()})},_commentsNumberChanged:function(t){var o=e(".b-watering").data("commentform");"edit"===o.previousState()?o.syncPreviousState():(this._replycount=Math.max(0,this._replycount+t),this._updateCounters({replycount:this._replycount}))},_spamNumberChanged:function(e){this._spamcount+=e,this._el("spamCounter").html(LJ.ml("talk.spamcount",{count:this._spamcount}))},expand:function(t,o,s){if(o=o||e("#"+t),!o.hasClass(this.options.classNames.leafExpanding)&&!o.hasClass(this.options.classNames.leafCollapsing)){o.addClass(this.options.classNames.leafExpanding);var i=this,a=i.options.classNames.leafCollapsed,n=this.options.selectors,r=e.comments.getThread(o),l=r.filter(n.leafCollapsed),m=function(t){return function(){var o=e(this),s=!!o.data("full");return s===t}},d=function(t){t.filter(i._s("leafMore")).each(function(){var t=e(this),o=+t.data("count");25>o&&i._loadMore(t)})};void 0===s&&(s=e.comments.skipAnimation),!o.data("full")&&o.hasClass(a)||l.filter(m(!1)).length>0?this._fetchThread(t,function(t){i._applyFetchResults(t,!1,function(){var t=e();l.each(function(){t=t.add(e("#"+this.id))}),i._expandNodes(o,o.prop("id"),t.filter(m(!0)),s);for(var a=c?e.comments.getThread(c).filter(n.leafCollapsed):[],c=e.comments.parentByID(o.prop("id")),h=[],p=!1;c&&!a.length;){var u=c.prop("id").split("t").join(""),f=Site.page.comments.find(function(e){return+e.dtalkid===+u});if(!f){console.error("Can't find data for comment",{dtalkid:u});break}var g=f.actions.findIndex(function(e){return"expandchilds"===e.name&&e.footer});if(-1===g)break;delete f.actions[g],f.actions=f.actions.filter(Boolean),h.push(f),p=!0,c=e.comments.parentByID(c.prop("id")),a=c?e.comments.getThread(c).filter(n.leafCollapsed):[]}p?i._applyFetchResults(h,!1,function(){d(r)}):d(r)},"expand")}):o.hasClass(a)||l.length>0?(this._expandNodes(o,o.prop("id"),l.filter(m(!0)),s),d(r)):o.removeClass(this.options.classNames.leafExpanding)}},_expandNodes:function(t,o,s,i){var a=this,n=a.options.classNames.leafCollapsed;void 0===i&&(i=e.comments.skipAnimation),t.removeClass(this.options.classNames.leafExpanding),i?s.removeClass(n):s.each(function(){var t,o=e(this),s=o.height();o.hasClass(a.options.classNames.leafActive)||(o.removeClass(n).attr("style",""),t=o.height(),o.css({opacity:0,height:s,overflow:"hidden"}).animate({opacity:1,height:t},{duration:300,complete:function(){o.attr("style","")},queue:!1}))}),this.element.trigger("commentsUpdated",[o,"expand"])},collapse:function(t,o,s){var i,a,n,r,l=this,m=l.options.classNames.leafCollapsed,d=l.options.classNames.leafClipped,c=l.options.classNames.leafCollapsing;o=o||e("#"+t),void 0===s&&(s=e.comments.skipAnimation),o.hasClass(this.options.classNames.leafExpanding)||o.hasClass(c)||(a=this.options.selectors,n=o.closest(a.twig),r=e.comments.getThread(o).filter(":not(."+m+"):not(."+c+"):not(."+d+")"),o.hasClass(m)&&0===r.length||(r.addClass(m),i=n.height(),r.removeClass(m).data("full",!0).attr("style","").addClass(c),s?r.addClass(m).removeClass(c):r.each(function(){var t=e(this),o=t.height();t.css({height:o,overflow:"hidden"}),t.animate({opacity:0,height:i},{duration:300,complete:function(){r.addClass(m).attr("style","").removeClass(c)},queue:!1})}),this.element.trigger("commentsUpdated",[t,"collapse"])))},_promoteApi:function(t,o,s){s=s||e.noop,LJ.Api.call("promo."+o,{"class":"comments",type:"comment",user:LJ.get("currentJournal"),ditemid:this._itemid,price:this._promoPrice,object_url:t},s)},_promoteDone:function(e,t,o){this.element.trigger("refreshThread",[t.slice(1),!0,o]),this._promoPrice=e.current_price},_promoteFail:function(e){alert(e.error.message),location.reload()},promote:function(t,o,s,i){var a,n,r,l,m,d,c=this;r=function(){e(this).addClass("b-flatbutton-loading"),a.addClass("promocomment-loading"),c._promoteApi(s,"promote",function(e){return e.error?void l(e):(c._promoteDone(e,t,"set_promo"),void a.bubble("hide"))})},l=function(){e(this).addClass("promocomment-update-loading"),a.addClass("promocomment-loading"),c._promoteApi(s,"get_slot",function(e){return e.error?void c._promoteFail(e):(n=!0,c._promoPrice=e.comment[0].buyout_cost,c._remoteBalance=e.comment[0].balance,a.bubble("hide"),void d())})},m=function(){o.removeClass("b-leaf-herbarium"),a.closest(".b-popup").remove()},d=function(){var e={promoMessage:n,tokens:c._promoPrice,promoAllowed:c._remoteBalance>c._promoPrice,siteroot:LJ.get("siteroot")},t={target:i};o.addClass("b-leaf-herbarium"),a=c._tmpl("promoBubble",e).delegate(".promocomment-submit","click",r).delegate(".promocomment-update","click",l).bind("bubblehide",m).bubble(t).bubble("show")},setTimeout(d,0)},unpromote:function(e,t,o){var s=this;this._promoteApi(o,"withdraw",function(t){return t.error?void s._promoteFail(t):void s._promoteDone(t,e,"unset_promo")})},_updateTop:function(t,o,s){if(t&&t[0]&&s){var i,a,n,r,l=this,m=s.split("_");if(o=o||e.noop,r=e(l.options.selectors.treeStart+m[1]),a=r.find(l.options.selectors.twig),"unset"===m[0])return l["_"+m[1]+"Tid"]="",a.remove(),void o();if(l["_"+m[1]+"Tid"]="t"+t[0].dtalkid,i=l._tmpl("leaf",e.extend({},t[0],{is_promo:"promo"===m[1],is_best:"best"===m[1],noid:!0,noactions:!0,nocontrols:!0,massactions:!1})),0===a.length)return r.append(i),void o();n=a.attr("data-tid").slice(1),a.replaceWith(i),e("#t"+n).length>0&&l.element.trigger("refreshThread",[n,!0]),o()}},_hideRoot:function(){this.hasOwnProperty("_realRoot")||(this._realRoot=this._root,this._root=e("
    "))},_restoreRoot:function(){this.hasOwnProperty("_realRoot")&&(this._realRoot.append(this._root.children()),this._root=this._realRoot,delete this._realRoot)}})}(jQuery,window); /* <<< file end: js/jquery/jquery.lj.comments.js */ //# map link was there [jquery.lj.comments.js.map] /* >>> file start: js/captcha.js */ !function(e){return e}(),function(e){function t(){return"undefined"!=typeof d}function n(){var t=e.Deferred();return s?t.resolve(s):LJ.Api.call("captcha.get_public_key",{},function(e){s=e.captcha_public,t.resolve(s)}),t.promise()}function r(){return location.protocol+"//www.google.com/recaptcha/api.js?onload=onRecaptchaLoad&render=explicit"}function a(r,a){var o=e.Deferred();return a=e.extend(C,a||{}),LJ.Captcha.current?e.when(n(),L()).then(function(){return t()?(a.sitekey=s,f(),d.render(r,a)):void console.error("Something went wrong. Captcha object is not defined.")}):(o.resolve(),o.promise())}function o(){}function c(){return t()?(f(),d.reset.apply(null,arguments)):void 0}function i(){return null}function l(e){return t()?d.getResponse(e):void 0}function p(){return h(),(d||grecaptcha).execute.apply(null,arguments)}function u(e){var t=e.attributes.title,n=e.attributes.src;if(t){var r=t.value;if(/испытание|challenge/.test(r)&&/recaptcha/.test(r))return!0}if(n){var a=n.value;if(/google\.com.*recaptcha.*bframe/.test(a))return!0}return!1}LJ.define("LJ.Captcha"),LJ.Captcha={create:a,reload:c,destroy:o,getChallenge:i,getResponse:l,isDefined:t,execute:p,current:["recaptcha"].filter(LJ.Flags.isEnabled).shift()},LJ.Captcha.available=!!LJ.Captcha.current;var s,d,f=void 0,v=void 0,h=void 0,C={lang:"ru"},g=e.Deferred();window.onRecaptchaLoad=function(){g.resolve()};var L=LJ.Function.once(function(){var t=e.Deferred();return LJ.injectScript(r()),g.then(function(){d=grecaptcha,t.resolve()}),t.promise()});LJ.Captcha.getCaptchaApiObject=function(){return d||grecaptcha},LJ.Captcha.setOnSimpleForm=function(e,t){f(),window.onCaptchaPass=function(){var t=Object.getPrototypeOf(e).submit;t.call(e)},t.addEventListener("click",function(e){e.preventDefault(),p()})},LJ.Event.on("reCAPTCHA::popup::created",function(e){var t=e.firstChild,n=e.lastChild,r=n.firstChild;e.classList.add("recaptcha-tiles"),t&&t.classList.add("recaptcha-tiles__fader"),n&&n.classList.add("recaptcha-tiles__iframe-wrapper"),r&&r.classList.add("recaptcha-tiles__iframe")}),LJ.Event.on("reCAPTCHA::popup::shown",function(){document.body.classList.add("body--recaptcha-opened")}),LJ.Event.on("reCAPTCHA::popup::hidden",function(){document.body.classList.remove("body--recaptcha-opened")}),function(){var e=void 0,t=void 0;f=function(){var n=document.body.lastChild;e=setInterval(function(){var r=document.body.lastChild;if(r!==n){n=r;var a=n.querySelector("iframe");a&&u(a)&&(t=n,console.log("reCAPTCHA popup created"),LJ.Event.trigger("reCAPTCHA::popup::created",t),clearInterval(e),e=null)}},100)};var n=void 0,r=void 0;v=function(){n=new Date,r||(r=setInterval(function(){t&&0===+t.style.opacity&&(console.log("reCAPTCHA popup hidden"),LJ.Event.trigger("reCAPTCHA::popup::hidden"),clearInterval(r),r=null)},100))};var a=1e4;h=function(){n=new Date,r||(r=setInterval(function(){t&&1===+t.style.opacity?(console.log("reCAPTCHA popup shown"),LJ.Event.trigger("reCAPTCHA::popup::shown"),clearInterval(r),r=null,v()):new Date>n+a&&(console.log("reCAPTCHA popup taking too long to appear, aborting wait"),clearInterval(r),r=null)},100))}}()}(jQuery); /* <<< file end: js/captcha.js */ //# map link was there [captcha.js.map] /* >>> file start: js/misc/tempImageChecker.js */ //= require_ml message.warnings.temporary_url_insertion LJ.define("LJ.Misc"),LJ.Misc.checkForTempImageURLs=function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=e.event,t=e.string,a="";if(t)a=t;else if(n)try{var r=n.originalEvent||n;a=r.clipboardData.getData("text/plain")}catch(i){console.log("Could not parse text content from pasted text")}var s=a.match(/https?:\/\/[^\s'"\r\n]+/g)||[],o=s.filter(function(e){return e.indexOf("imgprx.livejournal.net/")>0?!0:e.indexOf("downloader.disk.yandex.ru/")>0?!0:e.indexOf("fna.fbcdn.net/")>0});return o.length&&LJ.Messages&&LJ.Messages.add({body:LJ.ml("message.warnings.temporary_url_insertion"),type:"warning"}),o}; /* <<< file end: js/misc/tempImageChecker.js */ //# map link was there [tempImageChecker.js.map] /* >>> file start: js/common/comments.js */ //= require js/misc/tempImageChecker.js !function(){var n=void 0;LJ.Event.on("commentField::init",function(n){var t=n.node;t.addEventListener("paste",function(n){var t=LJ.Object.resolve(LJ,"Misc.checkForTempImageURLs")||function(){};t({event:n})})}),LJ.Event.on("comment::submit::success",function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=t.postURL;n=LJ.Object.resolve(LJ,"Misc.NewCommentsCounter"),e&&n&&n.getCount({postURL:e}).then(function(t){n.setCounter({postURL:e,count:t+1})})["catch"](function(){})})}(); /* <<< file end: js/common/comments.js */ //# map link was there [comments.js.map] /* >>> file start: js/jquery/jquery.lj.commentator.js */ //= require js/captcha.js //= require js/common/comments.js !function(e,t,a){e.widget("lj.commentator",{options:{publicKey:"",ajax:!0,needCaptcha:!1,keyCaptchaLoaded:!1,captchaContainerId:"",selectors:{comments:"#comments",errorWrapper:".b-msgsystem-errorbox",errorBlock:".b-postform-alert-ajax",blockingErrorBlocks:".b-bubble-warning",preloaderElem:".b-postform-preload",controls:":button, :submit",ajaxField:'input[name="json"]',captchaResponse:'input[name="captcha_response"]',captchaType:'input[name="captcha_type"]',previewControl:'input[name="submitpreview"]',inputParentTalkid:"#parenttalkid",submitControl:"button[name=submitpost]",form:"form",captchaBox:".b-postform-captchabox",anonLoginSubmit:".b-watering-authtype-user.b-watering-user-notreg"},classNames:{idle:"b-postform-preload-active",captchaActive:"b-postform-captchabox-active",errorWrapperShow:"b-msgsystem-errorbox-show",replyPage:"b-postform",loginTypeContainerPrefix:"b-postform-login-",authtypePrefix:"b-postform-authtype-"},templates:{frame:'