Your IP : 18.221.11.166


Current Path : /home/bitrix/ext_www/klimatlend.ua/bitrix/js/main/rating/
Upload File :
Current File : /home/bitrix/ext_www/klimatlend.ua/bitrix/js/main/rating/main.rating.min.js

(function(){var e=window.BX;e.namespace("BXRL");if(typeof BXRL.render!="undefined"){return}e.namespace("BXRL.render");e.namespace("BXRL.manager");BXRL.render={reactionsList:["like","kiss","laugh","wonder","cry","angry"],popupCurrentReaction:false,popupPagesList:[],popupSizeInitialized:false,blockShowPopup:false,blockShowPopupTimeout:false,afterClickBlockShowPopup:false,getTopUsersText:function(t){var i=typeof t.you!="undefined"?!!t.you:false;var n=typeof t.top!="undefined"&&e.type.isArray(t.top)?t.top:[];var o=typeof t.more!="undefined"?parseInt(t.more):0;if(!i&&n.length<=0&&o<=0){return""}var a=e.message("RATING_LIKE_TOP_TEXT_"+(i?"YOU_":"")+n.length+(o>0?"_MORE":""));for(var s in n){if(!n.hasOwnProperty(s)){continue}a=a.replace("#USER_"+(parseInt(s)+1)+"#",'<span class="feed-post-emoji-text-item">'+n[s].NAME_FORMATTED+"</span>")}return a.replace("#USERS_MORE#",'<span class="feed-post-emoji-text-item">'+o+"</span>")},getUserReaction:function(t){var i="";var n=e(t.userReactionNode)?e(t.userReactionNode):false;if(n){i=n.getAttribute("data-value")}return i},setReaction:function(t){if(typeof t.rating=="undefined"||!e.type.isNotEmptyString(t.likeId)){return}var i=t.likeId,n=t.rating,o=e.type.isNotEmptyString(t.action)?t.action:"add",a=e.type.isNotEmptyString(t.userReaction)?t.userReaction:e.message("RATING_LIKE_REACTION_DEFAULT"),s=e.type.isNotEmptyString(t.userReactionOld)?t.userReactionOld:e.message("RATING_LIKE_REACTION_DEFAULT"),r=typeof t.totalCount!="undefined"?parseInt(t.totalCount):null,p=typeof t.userId!="undefined"?parseInt(t.userId):parseInt(e.message("USER_ID"));if(!e.util.in_array(o,["add","cancel","change"])){return}if(o=="change"&&a==s){return}var l=e(n.userReactionNode)?e(n.userReactionNode):false;var c=e(n.reactionsNode)?e(n.reactionsNode):false;var d=e(n.topPanel)?e(n.topPanel):false;var u=e(n.topPanelContainer)?e(n.topPanelContainer):false;var f=e(n.topUsersText)?e(n.topUsersText):false;var m=e(n.countText)?e(n.countText):false;var L=e(n.buttonText)?e(n.buttonText):false;if(p==e.message("USER_ID")&&l){l.setAttribute("data-value",e.util.in_array(o,["add","change"])?a:"")}var h=0,y=false,R=false,g=false,v=false;if(r!==null&&d&&f&&c){if(r>0){u.classList.add("feed-post-emoji-top-panel-container-active");if(!d.classList.contains("feed-post-emoji-container-toggle")){d.classList.add("feed-post-emoji-container-toggle");f.classList.add("feed-post-emoji-move-to-right");c.classList.add("feed-post-emoji-icon-box-show")}}else if(r<=0){u.classList.remove("feed-post-emoji-top-panel-container-active");if(d.classList.contains("feed-post-emoji-container-toggle")){d.classList.remove("feed-post-emoji-container-toggle");f.classList.remove("feed-post-emoji-move-to-right");c.classList.remove("feed-post-emoji-icon-box-show")}}}if(r!==null&&m){if(r<=0&&!m.classList.contains("feed-post-emoji-text-counter-invisible")){m.classList.add("feed-post-emoji-text-counter-invisible")}else if(r>0&&m.classList.contains("feed-post-emoji-text-counter-invisible")){m.classList.remove("feed-post-emoji-text-counter-invisible")}}if(c){var k=e.findChild(c,{className:"feed-post-emoji-icon-container"});y=e.findChildren(c,{className:"feed-post-emoji-icon-item"},true);R=[];if(e.type.isArray(y)&&k){var b=false,N=false;for(h=0;h<y.length;h++){g=y[h].getAttribute("data-reaction");v=parseInt(y[h].getAttribute("data-value"));if(g==a){b=true;if(o=="cancel"){N=v>0?v-1:0}else if(e.util.in_array(o,["add","change"])){N=v+1}if(N>0){R.push({reaction:g,count:N,animate:false})}}else if(o=="change"&&g==s){N=v>0?v-1:0;if(N>0){R.push({reaction:g,count:N,animate:false})}}else{R.push({reaction:g,count:v,animate:false})}}if(e.util.in_array(o,["add","change"])&&!b){R.push({reaction:a,count:1,animate:true})}e.cleanNode(k);if(d){if(R.length>0){d.classList.add("feed-post-emoji-container-nonempty")}else{d.classList.remove("feed-post-emoji-container-nonempty")}}for(h=0;h<R.length;h++){if(h>=1){k.appendChild(e.create("span",{props:{id:"bx-ilike-result-reaction-"+R[h].reaction+"-"+i,className:"feed-post-emoji-icon-item "+(R[h].animate?"feed-post-emoji-icon-animate":"")+" feed-post-emoji-icon-"+R[h].reaction+" feed-post-emoji-icon-item-"+(h+1)},attrs:{"data-reaction":R[h].reaction,"data-value":R[h].count,"data-like-id":i,title:e.message("RATING_LIKE_EMOTION_"+R[h].reaction.toUpperCase()+"_CALC")},events:{click:BXRL.render.resultReactionClick,mouseenter:BXRL.render.resultReactionMouseEnter,mouseleave:BXRL.render.resultReactionMouseLeave}}))}else{k.appendChild(e.create("span",{props:{id:"bx-ilike-result-reaction-"+R[h].reaction+"-"+i,className:"feed-post-emoji-icon-item "+(R.length==1&&R[h].animate?"feed-post-emoji-animation-pop":"")+" feed-post-emoji-icon-"+R[h].reaction+" feed-post-emoji-icon-item-"+(h+1)},attrs:{"data-reaction":R[h].reaction,"data-value":R[h].count,"data-like-id":i,title:e.message("RATING_LIKE_EMOTION_"+R[h].reaction.toUpperCase()+"_CALC")},events:{click:BXRL.render.resultReactionClick,mouseenter:BXRL.render.resultReactionMouseEnter,mouseleave:BXRL.render.resultReactionMouseLeave}}))}}}}if(p==e.message("USER_ID")&&e(L)){if(e.util.in_array(o,["add","change"])){e(L).innerHTML=e.message("RATING_LIKE_EMOTION_"+a.toUpperCase()+"_CALC")}else{e(L).innerHTML=e.message("RATING_LIKE_EMOTION_LIKE_CALC")}}},animateReactionText:function(t){var i=t.rating;var n=e(i.buttonText)?e(i.buttonText):false;likeNode=n.cloneNode(true);likeNode.id="like_anim";e.removeClass(likeNode,"bx-ilike-button-hover");e.addClass(likeNode,"bx-like-anim");e.adjust(n.parentNode,{style:{position:"relative"}});var o="normal";if(e.findParent(n,{className:"feed-com-informers-bottom"})){o="comment"}else if(e.findParent(n,{className:"feed-post-informers"})){o="post"}e.adjust(likeNode,{style:{position:"absolute",whiteSpace:"nowrap",top:o=="comment"?"-3px":""}});e.adjust(n,{style:{visibility:"hidden"}});e.prepend(likeNode,n.parentNode);new e.easing({duration:140,start:{scale:100},finish:{scale:115},transition:e.easing.transitions.quad,step:function(e){likeNode.style.transform="scale("+e.scale/100+")"},complete:function(){new e.easing({duration:140,start:{scale:115},finish:{scale:100},transition:e.easing.transitions.quad,step:function(e){likeNode.style.transform="scale("+e.scale/100+")"},complete:function(){likeNode.parentNode.removeChild(likeNode);e.adjust(n.parentNode,{style:{position:"static"}});e.adjust(n,{style:{visibility:"visible"}})}}).animate()}}).animate()},reactionsPopup:null,reactionsPopupAnimation:null,reactionsPopupAnimation2:null,reactionsPopupLikeId:null,reactionsPopupMouseOutHandler:null,reactionsPopupOpacityState:0,showReactionsPopup:function(t){var i=e(t.bindElement)?e(t.bindElement):false,n=e.type.isNotEmptyString(t.likeId)?t.likeId:false;if(!i||!n){return false}BXRL.render.reactionsPopupLikeId=n;if(BXRL.render.reactionsPopup==null){var o=[];for(var a in BXRL.render.reactionsList){var s=BXRL.render.reactionsList[a];o.push(e.create("div",{props:{className:"feed-post-emoji-icon-item feed-post-emoji-icon-"+s},attrs:{"data-reaction":s,title:e.message("RATING_LIKE_EMOTION_"+s.toUpperCase()+"_CALC")}}))}BXRL.render.reactionsPopup=e.create("div",{props:{className:"feed-post-emoji-popup-container"},children:[e.create("div",{props:{className:"feed-post-emoji-icon-inner"},children:o})]});e.adjust(BXRL.render.reactionsPopup,{events:{click:function(t){var i=false;if(t.target.classList.contains("feed-post-emoji-icon-item")){i=t.target}else{i=e.findParent(t.target,{className:"feed-post-emoji-icon-item"},BXRL.render.reactionsPopup)}if(i){RatingLike.ClickVote(BXRL.render.reactionsPopupLikeId,i.getAttribute("data-reaction"),true)}t.preventDefault()}}});e.append(BXRL.render.reactionsPopup,document.body)}else if(BXRL.render.reactionsPopup.classList.contains("feed-post-emoji-popup-invisible")){BXRL.render.reactionsPopup.classList.remove("feed-post-emoji-popup-invisible")}else{return}BXRL.render.reactionsPopupMouseOutHandler=e.proxy(function(t){var i=BXRL.render.reactionsPopup.getBoundingClientRect();var n=BXRL.render.reactionsPopup.classList.contains("feed-post-emoji-popup-inverted");if(t.clientX>=i.left&&t.clientX<=i.right&&t.clientY>=i.top-(n?25:0)&&t.clientY<=i.bottom+(n?0:25)){return}BXRL.render.blockReactionsPopup();BXRL.render.hideReactionsPopup({likeId:this.likeId});e.unbind(document,"mousemove",BXRL.render.reactionsPopupMouseOutHandler);BXRL.render.reactionsPopupMouseOutHandler=null},{likeId:n});var r=e.pos(i);if(e.findParent(i,{className:"iframe-comments-cont"})){r.left=+100}var p=r.top-e.GetWindowSize().scrollTop<80;if(p){BXRL.render.reactionsPopup.classList.add("feed-post-emoji-popup-inverted")}else{BXRL.render.reactionsPopup.classList.remove("feed-post-emoji-popup-inverted")}var l=p?15:-50;BXRL.render.reactionsPopupAnimation=new e.easing({duration:300,start:{width:100,left:r.left+r.width/2-50,top:(p?r.top-30:r.top+30)+l,borderRadius:0,opacity:0},finish:{width:271,left:r.left+r.width/2-133,top:r.top+l,borderRadius:50,opacity:100},transition:e.easing.makeEaseInOut(e.easing.transitions.cubic),step:function(e){BXRL.render.reactionsPopup.style.width=e.width+"px";BXRL.render.reactionsPopup.style.left=e.left+"px";BXRL.render.reactionsPopup.style.top=e.top+"px";BXRL.render.reactionsPopup.style.borderRadius=e.borderRadius+"px";BXRL.render.reactionsPopup.style.opacity=e.opacity/100;BXRL.render.reactionsPopupOpacityState=e.opacity},complete:function(){BXRL.render.reactionsPopup.style.opacity="";BXRL.render.reactionsPopup.classList.add("feed-post-emoji-popup-active-final");BXRL[n].box.classList.add("feed-post-emoji-control-active")}});BXRL.render.reactionsPopupAnimation.animate();setTimeout(function(){var t=e.findChildren(BXRL.render.reactionsPopup,{className:"feed-post-emoji-icon-item"},true);BXRL.render.reactionsPopupAnimation2=new e.easing({duration:140,start:{opacity:0},finish:{opacity:100},transition:e.easing.transitions.cubic,step:function(e){t[0].style.opacity=e.opacity/100;t[1].style.opacity=e.opacity/100;t[2].style.opacity=e.opacity/100;t[3].style.opacity=e.opacity/100;t[4].style.opacity=e.opacity/100;t[5].style.opacity=e.opacity/100},complete:function(){BXRL.render.reactionsPopup.classList.add("feed-post-emoji-popup-active-final-item");t[0].style.opacity="";t[1].style.opacity="";t[2].style.opacity="";t[3].style.opacity="";t[4].style.opacity="";t[5].style.opacity=""}});BXRL.render.reactionsPopupAnimation2.animate()},100);if(!BXRL.render.reactionsPopup.classList.contains("feed-post-emoji-popup-active")){BXRL.render.reactionsPopup.classList.add("feed-post-emoji-popup-active")}e.bind(document,"mousemove",BXRL.render.reactionsPopupMouseOutHandler)},hideReactionsPopup:function(t){var i=e.type.isNotEmptyString(t.likeId)?t.likeId:false;if(BXRL.render.reactionsPopup){if(BXRL.render.reactionsPopupAnimation){BXRL.render.reactionsPopupAnimation.stop()}if(BXRL.render.reactionsPopupAnimation2){BXRL.render.reactionsPopupAnimation2.stop()}BXRL.render.reactionsPopup.classList.add("feed-post-emoji-popup-invisible");BXRL.render.reactionsPopupAnimation4=new e.easing({duration:500,start:{opacity:BXRL.render.reactionsPopupOpacityState},finish:{opacity:0},transition:e.easing.transitions.linear,step:function(e){BXRL.render.reactionsPopup.style.opacity=e.opacity/100;BXRL.render.reactionsPopupOpacityState=e.opacity},complete:function(){BXRL.render.reactionsPopup.style.opacity="";BXRL.render.reactionsPopup.classList.add("feed-post-emoji-popup-invisible-final");BXRL.render.reactionsPopup.classList.remove("feed-post-emoji-popup-active");BXRL.render.reactionsPopup.classList.remove("feed-post-emoji-popup-active-final");BXRL.render.reactionsPopup.classList.remove("feed-post-emoji-popup-active-final-item")}});BXRL.render.reactionsPopupAnimation4.animate();BXRL[i].box.classList.remove("feed-post-emoji-control-active")}BXRL.render.bindReactionsPopup({likeId:i})},bindReactionsPopup:function(t){var i=e.type.isNotEmptyString(t.likeId)?t.likeId:false;if(!i||typeof BXRL[i]=="undefined"||!BXRL[i]){return false}BXRL[i].mouseOverHandler=e.debounce(function(){if(BXRL.render.afterClickBlockShowPopup){e.unbind(BXRL[this.likeId].box,"mouseenter",BXRL[this.likeId].mouseOverHandler);e.unbind(BXRL[this.likeId].box,"mouseleave",BXRL.render.blockReactionsPopup);return}if(!BXRL.render.blockShowPopup){BXRL.render.showReactionsPopup({bindElement:BXRL[this.likeId].box,likeId:this.likeId});e.unbind(BXRL[this.likeId].box,"mouseenter",BXRL[this.likeId].mouseOverHandler);e.unbind(BXRL[this.likeId].box,"mouseleave",BXRL.render.blockReactionsPopup)}},500,{likeId:i});e.bind(BXRL[i].box,"mouseenter",BXRL[i].mouseOverHandler);e.bind(BXRL[i].box,"mouseleave",BXRL.render.blockReactionsPopup)},buildPopupContent:function(t){var i=!!t.clear?t.clear:false,n=e.type.isNotEmptyString(t.likeId)?t.likeId:false,o=t.rating,a=e.type.isNotEmptyString(t.reaction)?t.reaction:"",s=parseInt(t.page)>0?t.page:1,r=t.data,p=false;var l=[],c=0,d=null,u=null;if(i&&s==1){BXRL.render.clearPopupContent({likeId:n})}this.popupCurrentReaction=e.type.isNotEmptyString(a)?a:"all";if(a.length<=0||a=="all"){BXRL.render.popupSizeInitialized=false;e("bx-ilike-popup-cont-"+n).style.height="auto";e("bx-ilike-popup-cont-"+n).style.minWidth="auto"}if(!e.type.isNotEmptyString(a)){this.popupPagesList={}}this.popupPagesList[a==""?"all":a]=s+1;if(typeof r.reactions!="undefined"){for(p in r.reactions){if(!r.reactions.hasOwnProperty(p)||parseInt(r.reactions[p])<=0){continue}l.push({reaction:p,count:parseInt(r.reactions[p])});c++;d=p}}var f=e.create("span",{props:{className:"bx-ilike-popup-head"}});if(c>1){f.appendChild(e.create("span",{props:{className:"bx-ilike-popup-head-item"+(!e.type.isNotEmptyString(a)||a=="all"?" bx-ilike-popup-head-item-current":"")},children:[e.create("span",{props:{className:"bx-ilike-popup-head-icon feed-post-emoji-icon-all"}}),e.create("span",{props:{className:"bx-ilike-popup-head-text"},html:e.message("RATING_LIKE_POPUP_ALL").replace("#CNT#",parseInt(r.items_all))})],events:{click:e.proxy(function(e){BXRL.render.changePopupTab({likeId:this.likeId,rating:this.rating,reaction:"all"});e.preventDefault()},{likeId:n,rating:o})}}))}if(c==0){l.push({reaction:e.message("RATING_LIKE_REACTION_DEFAULT"),count:parseInt(r.items_all)})}l.sort(function(e,t){var i={like:0,kiss:1,laugh:2,wonder:3,cry:4,angry:5};return i[e.reaction]>i[t.reaction]});for(var m=0;m<l.length;m++){f.appendChild(e.create("span",{props:{className:"bx-ilike-popup-head-item"+(a==l[m].reaction?" bx-ilike-popup-head-item-current":"")},attrs:{title:e.message("RATING_LIKE_EMOTION_"+l[m].reaction.toUpperCase()+"_CALC")},children:[e.create("span",{props:{className:"bx-ilike-popup-head-icon feed-post-emoji-icon-item feed-post-emoji-icon-"+l[m].reaction}}),e.create("span",{props:{className:"bx-ilike-popup-head-text"},html:l[m].count})],events:{click:e.proxy(function(t){var i=e("bx-ilike-popup-cont-"+this.likeId);var n=i.getBoundingClientRect();if(a.length<=0||a=="all"){BXRL.render.popupSizeInitialized=true;i.style.height=n.height+"px";i.style.minWidth=n.width+"px"}else{if(n.width>parseInt(i.style.minWidth)){i.style.minWidth=n.width+"px"}}BXRL.render.changePopupTab({likeId:this.likeId,rating:this.rating,reaction:this.reaction});t.preventDefault()},{likeId:n,rating:o,reaction:l[m].reaction})}}))}var L=e.findChild(o.popupContent,{className:"bx-ilike-popup-content-container"});var h=false;if(!L){L=e.create("span",{props:{className:"bx-ilike-popup-content-container"}})}else{h=true}var y=e.findChildren(L,{className:"bx-ilike-popup-content"});for(u=0;u<y.length;u++){y[u].classList.add("bx-ilike-popup-content-invisible")}var R=e.findChild(L,{className:"bx-ilike-popup-content-"+this.popupCurrentReaction});if(!R){R=e.create("span",{props:{className:"bx-ilike-popup-content bx-ilike-popup-content-"+this.popupCurrentReaction}});L.appendChild(R)}else{R.classList.remove("bx-ilike-popup-content-invisible")}for(u=0;u<r.items.length;u++){R.appendChild(e.create("a",{props:{className:"bx-ilike-popup-user-item"+(e.type.isNotEmptyString(r.items[u]["USER_TYPE"])?" bx-ilike-popup-user-item-"+r.items[u]["USER_TYPE"]:"")},attrs:{href:r.items[u]["URL"],target:"_blank"},children:[e.create("span",{props:{className:"bx-ilike-popup-user-icon"},style:e.type.isNotEmptyString(r.items[u]["PHOTO_SRC"])?{"background-image":'url("'+r.items[u]["PHOTO_SRC"]+'")'}:{}}),e.create("span",{props:{className:"bx-ilike-popup-user-name"},html:r.items[u]["FULL_NAME"]}),e.create("SPAN",{props:{className:"bx-ilike-popup-user-status"}})]}))}var g=e.findChild(o.popupContent,{className:"bx-ilike-wait"});if(g){e.cleanNode(g,true)}var v=e.findChild(o.popupContent,{className:"bx-ilike-popup-head"});if(v){v.parentNode.insertBefore(f,v);v.parentNode.removeChild(v)}else{o.popupContent.appendChild(f)}if(!h){o.popupContent.appendChild(L)}},clearPopupContent:function(t){var i=e.type.isNotEmptyString(t.likeId)?t.likeId:false;BXRL[i].popupContent.innerHTML="";e("bx-ilike-popup-cont-"+i).style.height="auto";e("bx-ilike-popup-cont-"+i).style.minWidth="auto";BXRL[i].popupContent.appendChild(e.create("span",{props:{className:"bx-ilike-wait"}}))},blockReactionsPopup:function(){if(BXRL.render.blockShowPopupTimeout){window.clearTimeout(BXRL.render.blockShowPopupTimeout)}BXRL.render.blockShowPopup=true;BXRL.render.blockShowPopupTimeout=setTimeout(function(){BXRL.render.blockShowPopup=false},500)},changePopupTab:function(t){var i=e.type.isNotEmptyString(t.likeId)?t.likeId:false,n=t.rating,o=e.type.isNotEmptyString(t.reaction)?t.reaction:"",a=false,s=false;var r=e.findChild(n.popupContent,{className:"bx-ilike-popup-content-container"});if(!r){return false}var p=e.findChild(r,{className:"bx-ilike-popup-content-"+o});if(p){this.popupCurrentReaction=e.type.isNotEmptyString(o)?o:"all";var l=e.findChildren(n.popupContent,{className:"bx-ilike-popup-head-item"},true);for(a=0;a<l.length;a++){l[a].classList.remove("bx-ilike-popup-head-item-current");s=e.findChild(l[a],{className:"feed-post-emoji-icon-"+o});if(s){l[a].classList.add("bx-ilike-popup-head-item-current")}}var c=e.findChildren(r,{className:"bx-ilike-popup-content"});for(a=0;a<c.length;a++){c[a].classList.add("bx-ilike-popup-content-invisible")}p.classList.remove("bx-ilike-popup-content-invisible")}else{RatingLike.List(i,1,o)}},afterClick:function(t){var i=e.type.isNotEmptyString(t.likeId)?t.likeId:false;if(!i){return}BXRL.render.afterClickBlockShowPopup=true;BXRL.render.afterClickHandler=e.proxy(function(t){BXRL.render.afterClickBlockShowPopup=false;e.unbind(BXRL[this.likeId].box,"mouseleave",BXRL.render.afterClickHandler)},{likeId:i});e.bind(BXRL[i].box,"mouseleave",BXRL.render.afterClickHandler)},resultReactionClick:function(e){var t=e.currentTarget.getAttribute("data-like-id"),i=e.currentTarget.getAttribute("data-reaction");RatingLike.onResultClick({likeId:t,event:e,reaction:i})},resultReactionMouseEnter:function(e){var t=e.currentTarget.getAttribute("data-like-id"),i=e.currentTarget.getAttribute("data-reaction");RatingLike.onResultMouseEnter({likeId:t,event:e,reaction:i})},resultReactionMouseLeave:function(e){var t=e.currentTarget.getAttribute("data-like-id"),i=e.currentTarget.getAttribute("data-reaction");RatingLike.onResultMouseLeave({likeId:t,reaction:i})}};BXRL.manager={inited:false,displayHeight:0,entityList:[],ratingNodeList:{},delayedList:{},init:function(){if(this.inited){return}this.inited=true;this.setDisplayHeight();window.addEventListener("scroll",e.throttle(function(){this.getInViewScope()},80,this),{passive:true});window.addEventListener("resize",e.delegate(this.setDisplayHeight,this))},addEntity:function(t,i){if(!e.util.in_array(t,this.entityList)&&i.topPanelContainer){this.entityList.push(t);this.addNode(t,i.topPanelContainer)}},checkEntity:function(t){return e.util.in_array(t,this.entityList)},addNode:function(t,i){if(e(i)&&typeof this.ratingNodeList[t]!="undefined"){return}this.ratingNodeList[t]=i},getNode:function(e){var t=false;if(typeof this.ratingNodeList[e]!=undefined){t=this.ratingNodeList[e]}return t},setDisplayHeight:function(){this.displayHeight=document.documentElement.clientHeight},getInViewScope:function(){var t=null;for(var i in this.delayedList){if(!this.delayedList.hasOwnProperty(i)){continue}t=e(this.getNode(i));if(!t){continue}if(this.isNodeVisibleOnScreen(t)){this.fireAnimation(i,t,this.delayedList[i])}}},isNodeVisibleOnScreen:function(e){var t=e.getBoundingClientRect();var i=parseInt(this.displayHeight/10);var n=parseInt(this.displayHeight*9/10);return(t.top>0&&t.top<n||t.bottom>i&&t.bottom<this.displayHeight)&&(this.mobile||!(t.top<i&&t.bottom<i||t.top>n&&t.bottom>n))},live:function(t){if(typeof t.TYPE=="undefined"||t.TYPE!="ADD"||!e.type.isNotEmptyString(t.ENTITY_TYPE_ID)||typeof t.ENTITY_ID=="undefined"||parseInt(t.ENTITY_ID)<=0){return}var i=t.ENTITY_TYPE_ID+"_"+t.ENTITY_ID;if(!this.checkEntity(i)){return}var n=this.getNode(i);if(!n){return false}if(this.isNodeVisibleOnScreen(n)){this.fireAnimation(i,n,t)}else{this.addDelayed(t)}},addDelayed:function(t){if(!e.type.isNotEmptyString(t.ENTITY_TYPE_ID)||typeof t.ENTITY_ID=="undefined"||parseInt(t.ENTITY_ID)<=0){return}var i=t.ENTITY_TYPE_ID+"_"+t.ENTITY_ID;if(typeof this.delayedList[i]=="undefined"){this.delayedList[i]=[]}this.delayedList[i].push(t)},fireAnimation:function(e,t,i){if(typeof this.delayedList[e]!="undefined"){delete this.delayedList[e]}}}})();