Your IP : 3.143.239.63


Current Path : /var/www/www-root/data/www/monolith-realty.ru/bitrix/js/main/rating/
Upload File :
Current File : /var/www/www-root/data/www/monolith-realty.ru/bitrix/js/main/rating/main.rating.js.map

{"version":3,"file":"main.rating.js","sources":["src/listpopup.js","src/render.js","src/manager.js","src/like.js","src/index.js"],"sourcesContent":["import { Type, Dom, Event, ajax } from 'main.core';\nimport { Popup } from 'main.popup';\nimport { EventEmitter } from 'main.core.events';\n\nimport { RatingManager } from './manager';\nimport { RatingLike } from './like';\nimport { RatingRender } from './render';\n\nexport class ListPopup\n{\n\tstatic popupLikeId = null;\n\n\tstatic removeOnCloseHandler = this.removeOnClose.bind(this);\n\n\tstatic getListPopup(params)\n\t{\n\t\tconst likeId = params.likeId;\n\t\tconst likeInstance = RatingLike.getInstance(likeId);\n\t\tconst target = params.target;\n\t\tconst reaction = params.reaction;\n\t\tconst nodeId = params.nodeId;\n\n\t\tif (this.popupLikeId === likeId)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\tif (likeInstance.popupContentPage != 1)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tthis.List(likeId, 1, reaction, true);\n\n\t\tlikeInstance.popupTimeoutIdShow = setTimeout(() => {\n\t\t\tthis.getListPopupShow({\n\t\t\t\tlikeId: likeId,\n\t\t\t\treaction: reaction,\n\t\t\t\ttarget: target,\n\t\t\t\tnodeId: nodeId,\n\t\t\t})\n\t\t}, 100);\n\t}\n\n\tstatic getListPopupShow(params)\n\t{\n\t\tconst likeId = params.likeId;\n\t\tconst likeInstance = RatingLike.getInstance(likeId);\n\t\tconst target = params.target;\n\t\tconst reaction = params.reaction;\n\t\tconst nodeId = params.nodeId;\n\n\t\tlikeInstance.resultPopupAnimation = true;\n\n\t\tsetTimeout(() => {\n\t\t\tthis.getListPopupAnimation({\n\t\t\t\tlikeId: likeId,\n\t\t\t});\n\t\t}, 500);\n\n\t\tif (likeInstance.mouseInShowPopupNode[reaction])\n\t\t{\n\t\t\tthis.OpenWindow(\n\t\t\t\tlikeId,\n\t\t\t\tnull,\n\t\t\t\ttarget,\n\t\t\t\tnodeId\n\t\t\t);\n\t\t}\n\t}\n\n\tstatic getListPopupAnimation(params)\n\t{\n\t\tconst likeId = params.likeId;\n\t\tconst likeInstance = RatingLike.getInstance(likeId);\n\n\t\tlikeInstance.resultPopupAnimation = false;\n\t}\n\n\tstatic OpenWindow(likeId, clickEvent, target, targetId)\n\t{\n\t\tconst likeInstance = RatingLike.getInstance(likeId);\n\n\t\tif (Number(likeInstance.countText.innerHTML) === 0)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tconst bindNode = (\n\t\t\tlikeInstance.template === 'standart'\n\t\t\t\t? likeInstance.count\n\t\t\t\t: (\n\t\t\t\t\tlikeInstance.version === 2\n\t\t\t\t\t\t? (\n\t\t\t\t\t\t\tType.isDomNode(target)\n\t\t\t\t\t\t\t\t? target\n\t\t\t\t\t\t\t\t: (\n\t\t\t\t\t\t\t\t\tType.isStringFilled(targetId) && document.getElementById(targetId)\n\t\t\t\t\t\t\t\t\t\t? document.getElementById(targetId)\n\t\t\t\t\t\t\t\t\t\t: null\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t\t: likeInstance.box\n\t\t\t\t)\n\t\t);\n\n\t\tif (!Type.isDomNode(bindNode))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tif (likeInstance.popup == null)\n\t\t{\n\t\t\tconst globalZIndex = this.getGlobalIndex(bindNode);\n\n\t\t\tconst popupClassNameList = [];\n\t\t\tif (likeInstance.topPanel)\n\t\t\t{\n\t\t\t\tpopupClassNameList.push('bx-ilike-wrap-block-react-wrap');\n\t\t\t}\n\t\t\tif (RatingManager.mobile)\n\t\t\t{\n\t\t\t\tpopupClassNameList.push('bx-ilike-mobile-wrap');\n\t\t\t}\n\n\t\t\tlikeInstance.popup = new Popup({\n\t\t\t\tid: `ilike-popup-${likeId}`,\n\t\t\t\tbindElement: bindNode,\n\t\t\t\tlightShadow : true,\n\t\t\t\toffsetTop: 0,\n\t\t\t\toffsetLeft: (\n\t\t\t\t\t!Type.isUndefined(clickEvent)\n\t\t\t\t\t&& !Type.isNull(clickEvent)\n\t\t\t\t\t&& !Type.isUndefined(clickEvent.offsetX)\n\t\t\t\t\t\t? (clickEvent.offsetX - 100)\n\t\t\t\t\t\t: (likeInstance.version == 2 ? -30 : 5)\n\t\t\t\t),\n\t\t\t\tautoHide: true,\n\t\t\t\tcloseByEsc: true,\n\t\t\t\tzIndexAbsolute: (globalZIndex > 1000 ? globalZIndex + 1 : 1000),\n\t\t\t\tbindOptions: {\n\t\t\t\t\tposition: 'top',\n\t\t\t\t},\n\t\t\t\tanimation: 'fading-slide',\n\t\t\t\tevents: {\n\t\t\t\t\tonPopupClose: () => {\n\t\t\t\t\t\tthis.popupLikeId = null;\n\t\t\t\t\t},\n\t\t\t\t\tonPopupDestroy: () => {},\n\t\t\t\t},\n\t\t\t\tcontent : document.getElementById(`bx-ilike-popup-cont-${likeId}`),\n\t\t\t\tclassName: popupClassNameList.join(' '),\n\t\t\t});\n\n\t\t\tif (\n\t\t\t\t!likeInstance.topPanel\n\t\t\t\t&& !RatingManager.mobile\n\t\t\t)\n\t\t\t{\n\t\t\t\tlikeInstance.popup.setAngle({});\n\n\t\t\t\tdocument.getElementById(`ilike-popup-${likeId}`).addEventListener('mouseout', () => {\n\t\t\t\t\tclearTimeout(likeInstance.popupTimeout);\n\t\t\t\t\tlikeInstance.popupTimeout = setTimeout(() => {\n\t\t\t\t\t\tlikeInstance.popup.close();\n\t\t\t\t\t}, 1000);\n\t\t\t\t});\n\n\t\t\t\tdocument.getElementById(`ilike-popup-${likeId}`).addEventListener('mouseover', () => {\n\t\t\t\t\tclearTimeout(likeInstance.popupTimeout);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (\n\t\t\t\t!Type.isUndefined(clickEvent)\n\t\t\t\t&& !Type.isNull(clickEvent)\n\t\t\t\t&& !Type.isUndefined(clickEvent.offsetX)\n\t\t\t)\n\t\t\t{\n\t\t\t\tlikeInstance.popup.offsetLeft = (clickEvent.offsetX - 100);\n\t\t\t}\n\n\t\t\tlikeInstance.popup.setBindElement(bindNode);\n\t\t}\n\n\t\tif (this.popupLikeId !== likeId)\n\t\t{\n\t\t\tconst popupLikeInstance = RatingLike.getInstance(this.popupLikeId);\n\t\t\tif (popupLikeInstance)\n\t\t\t{\n\t\t\t\tpopupLikeInstance.popup.close();\n\t\t\t}\n\t\t}\n\n\t\tthis.popupLikeId = likeId;\n\n\t\tlikeInstance.popup.show();\n\n\t\tthis.AdjustWindow(likeId);\n\t}\n\n\tstatic getGlobalIndex(element)\n\t{\n\t\tlet index = 0;\n\t\tlet propertyValue = '';\n\n\t\tdo\n\t\t{\n\t\t\tpropertyValue = Dom.style(element, 'z-index');\n\t\t\tif (propertyValue !== 'auto')\n\t\t\t{\n\t\t\t\tindex = !Number.isNaN(parseInt(propertyValue)) ? index : 0;\n\t\t\t}\n\t\t\telement = element.offsetParent;\n\t\t}\n\t\twhile (\n\t\t\telement\n\t\t\t&& element.tagName !== 'BODY'\n\t\t\t);\n\n\t\treturn index;\n\t}\n\n\tstatic removeOnClose()\n\t{\n\t\tEventEmitter.unsubscribe(BX.SidePanel.Instance.getTopSlider().getWindow(), 'SidePanel.Slider:onClose', this.removeOnCloseHandler);\n\n\t\tconst popupLikeInstance = RatingLike.getInstance(this.popupLikeId);\n\t\tif (popupLikeInstance)\n\t\t{\n\t\t\tpopupLikeInstance.popup.close();\n\t\t}\n\t}\n\n\tstatic AdjustWindow(likeId)\n\t{\n\t\tlet likeInstance = RatingLike.getInstance(likeId);\n\n\t\tif (!likeInstance.popup)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tlikeInstance.popup.bindOptions.forceBindPosition = true;\n\t\tlikeInstance.popup.adjustPosition();\n\t\tlikeInstance.popup.bindOptions.forceBindPosition = false;\n\t}\n\n\tstatic PopupScroll(likeId)\n\t{\n\t\tconst likeInstance = RatingLike.getInstance(likeId);\n\n\t\tlet contentContainerNodeList = likeInstance.popupContent.querySelectorAll('.bx-ilike-popup-content'); // reactions\n\t\tif (contentContainerNodeList.length <= 0)\n\t\t{\n\t\t\tcontentContainerNodeList = [ likeInstance.popupContent ];\n\t\t}\n\n\t\tcontentContainerNodeList.forEach((contentContainerNode) => {\n\t\t\tcontentContainerNode.addEventListener('scroll', (e) => {\n\t\t\t\tif (e.target.scrollTop <= (e.target.scrollHeight - e.target.offsetHeight) / 1.5)\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis.List(likeId, null, (likeInstance.version == 2 ? RatingRender.popupCurrentReaction : false));\n\t\t\t\tEvent.unbindAll(e.target);\n\t\t\t});\n\t\t});\n\t}\n\n\tstatic List(likeId, page, reaction, clear)\n\t{\n\t\tconst likeInstance = RatingLike.getInstance(likeId);\n\n\t\tif (Number(likeInstance.countText.innerHTML) === 0)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treaction = (Type.isStringFilled(reaction) ? reaction : '');\n\n\t\tif (Type.isNull(page))\n\t\t{\n\t\t\tpage = (\n\t\t\t\tlikeInstance.version === 2\n\t\t\t\t\t? (\n\t\t\t\t\t\t!Type.isUndefined(RatingRender.popupPagesList[reaction])\n\t\t\t\t\t\t\t? RatingRender.popupPagesList[reaction]\n\t\t\t\t\t\t\t: 1\n\t\t\t\t\t)\n\t\t\t\t\t: likeInstance.popupContentPage\n\t\t\t);\n\t\t}\n\n\t\tif (\n\t\t\tclear\n\t\t\t&& Number(page) === 1\n\t\t\t&& likeInstance.version === 2\n\t\t)\n\t\t{\n\t\t\tRatingRender.clearPopupContent({\n\t\t\t\tlikeId: likeId,\n\t\t\t});\n\t\t}\n\n\t\tif (likeInstance.listXHR)\n\t\t{\n\t\t\tlikeInstance.listXHR.abort();\n\t\t}\n\n\t\tajax.runAction('main.rating.list', {\n\t\t\tdata: {\n\t\t\t\tparams: {\n\t\t\t\t\tRATING_VOTE_TYPE_ID: likeInstance.entityTypeId,\n\t\t\t\t\tRATING_VOTE_KEY_SIGNED: likeInstance.keySigned,\n\t\t\t\t\tRATING_VOTE_ENTITY_ID: likeInstance.entityId,\n\t\t\t\t\tRATING_VOTE_LIST_PAGE: page,\n\t\t\t\t\tRATING_VOTE_REACTION: (reaction === 'all' ? '' : reaction),\n\t\t\t\t\tPATH_TO_USER_PROFILE: likeInstance.pathToUserProfile,\n\t\t\t\t},\n\t\t\t},\n\t\t\tonrequeststart: (xhr) => {\n\t\t\t\tlikeInstance.listXHR = xhr;\n\t\t\t},\n\t\t}).then((result) => {\n\t\t\t\tthis.onListSuccess(result.data, {\n\t\t\t\t\tlikeId: likeId,\n\t\t\t\t\treaction: reaction,\n\t\t\t\t\tpage: page,\n\t\t\t\t\tclear: clear,\n\t\t\t\t});\n\t\t\t},\n\t\t\t() => {}\n\t\t);\n\n\t\treturn false;\n\t}\n\n\tstatic onListSuccess(data, params)\n\t{\n\t\tif (!data)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\tconst likeInstance = RatingLike.getInstance(params.likeId);\n\n\t\tlikeInstance.countText.innerHTML = data.items_all;\n\n\t\tif (Number(data.items_page) === 0)\n\t\t{\n\t\t\tif (Number(data.list_page) === 1)\n\t\t\t{\n\t\t\t\tlikeInstance.popup.close();\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\tif (likeInstance.version === 2)\n\t\t{\n\t\t\tRatingRender.buildPopupContent({\n\t\t\t\tlikeId: params.likeId,\n\t\t\t\treaction: params.reaction,\n\t\t\t\trating: likeInstance,\n\t\t\t\tpage: params.page,\n\t\t\t\tdata: data,\n\t\t\t\tclear: params.clear,\n\t\t\t});\n\t\t\tlikeInstance.topPanel.setAttribute('data-popup', 'Y');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tRatingRender.buildPopupContentNoReactions({\n\t\t\t\trating: likeInstance,\n\t\t\t\tpage: params.page,\n\t\t\t\tdata: data,\n\t\t\t});\n\t\t}\n\n\t\tthis.AdjustWindow(params.likeId);\n\t\tthis.PopupScroll(params.likeId);\n\t}\n\n\tstatic onResultClick(params)\n\t{\n\t\tconst likeId = (Type.isStringFilled(params.likeId) ? params.likeId : false);\n\t\tconst clickEvent = (!Type.isUndefined(params.event) ? params.event : false);\n\t\tconst reaction = (Type.isStringFilled(params.reaction) ? params.reaction : '');\n\t\tconst likeInstance = RatingLike.getInstance(likeId);\n\n\t\tif (likeInstance.resultPopupAnimation)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tif (\n\t\t\tlikeInstance.popup\n\t\t\t&& likeInstance.popup.isShown()\n\t\t)\n\t\t{\n\t\t\tlikeInstance.popup.close();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tclearTimeout(likeInstance.popupTimeoutIdList);\n\t\t\tclearTimeout(likeInstance.popupTimeoutIdShow);\n\n\t\t\tif (\n\t\t\t\tlikeInstance.popupContentPage == 1\n\t\t\t\t&& (\n\t\t\t\t\tlikeInstance.topPanel.getAttribute('data-popup') !== 'Y'\n\t\t\t\t\t|| likeInstance.popupCurrentReaction != reaction\n\t\t\t\t)\n\t\t\t)\n\t\t\t{\n\t\t\t\tthis.List(likeId, 1, reaction, true);\n\t\t\t}\n\n\t\t\tthis.OpenWindow(\n\t\t\t\tlikeId,\n\t\t\t\t(clickEvent.currentTarget === likeInstance.count ? null : clickEvent),\n\t\t\t\tclickEvent.currentTarget,\n\t\t\t\tclickEvent.currentTarget.id\n\t\t\t);\n\t\t}\n\t}\n\n\tstatic onResultMouseEnter(params)\n\t{\n\t\tconst likeId = (Type.isStringFilled(params.likeId) ? params.likeId : false);\n\t\tconst mouseEnterEvent = (!Type.isUndefined(params.event) ? params.event : null);\n\t\tconst reaction = (Type.isStringFilled(params.reaction) ? params.reaction : '');\n\t\tconst nodeId = (\n\t\t\tmouseEnterEvent && Type.isStringFilled(mouseEnterEvent.currentTarget.id)\n\t\t\t\t? mouseEnterEvent.currentTarget.id\n\t\t\t\t: ''\n\t\t);\n\n\t\tconst likeInstance = RatingLike.getInstance(likeId);\n\n\t\tlikeInstance.mouseInShowPopupNode[reaction] = true;\n\n\t\tclearTimeout(likeInstance.popupTimeoutIdList);\n\t\tclearTimeout(likeInstance.popupTimeoutIdShow);\n\n\t\tlikeInstance.popupTimeoutIdList = setTimeout(() => {\n\t\t\tthis.getListPopup({\n\t\t\t\tlikeId: likeId,\n\t\t\t\ttarget: mouseEnterEvent.currentTarget,\n\t\t\t\treaction: reaction,\n\t\t\t\tnodeId: nodeId,\n\t\t\t});\n\t\t}, 300);\n\t}\n\n\tstatic onResultMouseLeave(params)\n\t{\n\t\tconst likeId = (Type.isStringFilled(params.likeId) ? params.likeId : false);\n\t\tconst reaction = (Type.isStringFilled(params.reaction) ? params.reaction : '');\n\t\tconst likeInstance = RatingLike.getInstance(likeId);\n\n\t\tlikeInstance.mouseInShowPopupNode[reaction] = false;\n\t\tlikeInstance.resultPopupAnimation = false;\n\t}\n}\n","import { Type, Loc, Dom, Runtime, pos, GetWindowSize } from 'main.core';\nimport { EventEmitter } from 'main.core.events'\nimport {Lottie} from 'ui.lottie';\n\nimport { RatingManager } from './manager';\nimport { RatingLike } from './like';\nimport { ListPopup } from './listpopup';\nimport likeAnimatedEmojiData from '../animations/em_01.json';\nimport laughAnimatedEmojiData from '../animations/em_02.json';\nimport wonderAnimatedEmojiData from '../animations/em_03.json';\nimport cryAnimatedEmojiData from '../animations/em_04.json';\nimport angryAnimatedEmojiData from '../animations/em_05.json';\nimport facepalmAnimatedEmojiData from '../animations/em_06.json';\nimport kissAnimatedEmojiData from '../animations/em_07.json';\n\nexport class RatingRender\n{\n\tstatic reactionsList = [ 'like', 'kiss', 'laugh', 'wonder', 'cry', 'angry', 'facepalm' ];\n\tstatic reactionsAnimationData = {\n\t\tlike: likeAnimatedEmojiData,\n\t\tkiss: kissAnimatedEmojiData,\n\t\tlaugh: laughAnimatedEmojiData,\n\t\twonder: wonderAnimatedEmojiData,\n\t\tcry: cryAnimatedEmojiData,\n\t\tangry: angryAnimatedEmojiData,\n\t\tfacepalm: facepalmAnimatedEmojiData,\n\t}\n\tstatic popupCurrentReaction = false;\n\tstatic popupPagesList = [];\n\tstatic popupSizeInitialized = false;\n\tstatic blockShowPopup = false;\n\tstatic blockShowPopupTimeout = false;\n\tstatic afterClickBlockShowPopup = false;\n\tstatic afterClickHandler = null;\n\tstatic touchStartPosition = null;\n\tstatic touchCurrentPosition = {\n\t\tx: null,\n\t\ty: null,\n\t};\n\tstatic currentReactionNodeHover = null;\n\n\tstatic touchMoveDeltaY = null;\n\tstatic touchScrollTop = 0;\n\n\tstatic hasMobileTouchMoved = null;\n\tstatic mobileOverlay = null;\n\n\tstatic reactionsPopup = null;\n\tstatic reactionsPopupAnimation = null;\n\tstatic reactionsPopupAnimation2 = null;\n\tstatic reactionsPopupLikeId = null;\n\tstatic reactionsPopupMouseOutHandler = null;\n\tstatic reactionsPopupOpacityState = 0;\n\tstatic reactionsPopupTouchStartIn = null;\n\tstatic reactionsPopupPositionY = null;\n\tstatic blockTouchEndByScroll = false;\n\n\tstatic reactionsPopupMobileTouchEndHandler = this.reactionsPopupMobileTouchEnd.bind(this);\n\tstatic reactionsPopupMobileTouchMoveHandler = this.reactionsPopupMobileTouchMove.bind(this);\n\tstatic reactionsPopupMobileHideHandler = this.reactionsPopupMobileHide.bind(this);\n\n\tstatic getTopUsersText(params)\n\t{\n\t\tconst currentUserId = Number(Loc.getMessage('USER_ID'));\n\t\tconst you = (!Type.isUndefined(params.you) ? !!params.you : false);\n\t\tconst topList = (!Type.isUndefined(params.top) && Type.isArray(params.top) ? params.top : []);\n\t\tconst more = (!Type.isUndefined(params.more) ? Number(params.more) : 0);\n\t\tlet result = '';\n\n\t\tif (\n\t\t\ttopList.length <= 0\n\t\t\t&& !you\n\t\t\t&& (\n\t\t\t\tRatingManager.mobile\n\t\t\t\t|| more <= 0\n\t\t\t)\n\t\t)\n\t\t{\n\t\t\treturn result;\n\t\t}\n\n\t\tif (RatingManager.mobile)\n\t\t{\n\t\t\tif (you)\n\t\t\t{\n\t\t\t\ttopList.push({\n\t\t\t\t\tID: currentUserId,\n\t\t\t\t\tNAME_FORMATTED: Loc.getMessage('RATING_LIKE_TOP_TEXT3_YOU'),\n\t\t\t\t\tWEIGHT: 1,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tresult = Loc.getMessage(`RATING_LIKE_TOP_TEXT3_${(topList.length > 1 ? '2' : '1')}`)\n\t\t\t\t.replace('#OVERFLOW_START#', RatingManager.mobile ? '<span class=\"feed-post-emoji-text-item-overflow\">' : '')\n\t\t\t\t.replace('#OVERFLOW_END#', RatingManager.mobile ? '</span>' : '');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tresult = Loc.getMessage(`RATING_LIKE_TOP_TEXT2_${(you ? 'YOU_' : '')}${(topList.length)}${(more > 0 ? '_MORE' : '')}`)\n\t\t\t\t.replace('#OVERFLOW_START#', RatingManager.mobile ? '<span class=\"feed-post-emoji-text-item-overflow\">' : '')\n\t\t\t\t.replace('#OVERFLOW_END#', RatingManager.mobile ? '</span>' : '')\n\t\t\t\t.replace('#MORE_START#', RatingManager.mobile ? '<span class=\"feed-post-emoji-text-item-more\">' : '&nbsp;')\n\t\t\t\t.replace('#MORE_END#', RatingManager.mobile ? '</span>' : '');\n\t\t}\n\n\t\tif (RatingManager.mobile)\n\t\t{\n\t\t\ttopList.sort((a, b) => {\n\t\t\t\tif (parseInt(a.ID) === currentUserId)\n\t\t\t\t{\n\t\t\t\t\treturn -1;\n\t\t\t\t}\n\n\t\t\t\tif (parseInt(b.ID) === currentUserId)\n\t\t\t\t{\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\n\t\t\t\tif (parseFloat(a.WEIGHT) === parseFloat(b.WEIGHT))\n\t\t\t\t{\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\n\t\t\t\treturn (parseFloat(a.WEIGHT) > parseFloat(b.WEIGHT) ? -1 : 1);\n\t\t\t});\n\n\t\t\tconst userNameList = topList.map((item) => {\n\t\t\t\treturn item.NAME_FORMATTED;\n\t\t\t});\n\n\t\t\tlet userNameBegin = '';\n\t\t\tlet userNameEnd = '';\n\n\t\t\tif (userNameList.length === 1)\n\t\t\t{\n\t\t\t\tuserNameBegin = userNameList.pop();\n\t\t\t\tuserNameEnd = '';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tuserNameBegin = userNameList.slice(0, userNameList.length - 1)\n\t\t\t\t\t.join(Loc.getMessage('RATING_LIKE_TOP_TEXT3_USERLIST_SEPARATOR').replace(/#USERNAME#/g, ''));\n\t\t\t\tuserNameEnd = userNameList[userNameList.length - 1];\n\t\t\t}\n\n\t\t\tresult = result.replace('#USER_LIST_BEGIN#', userNameBegin)\n\t\t\t\t.replace('#USER_LIST_END#', userNameEnd);\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttopList.forEach((item, i) => {\n\n\t\t\t\tresult = result.replace(\n\t\t\t\t\t`#USER_${(Number(i) + 1)}#`,\n\t\t\t\t\t`<span class=\"feed-post-emoji-text-item\">${item.NAME_FORMATTED}</span>`\n\t\t\t\t);\n\t\t\t});\n\n\t\t\tresult = result.replace('#USERS_MORE#', '<span class=\"feed-post-emoji-text-item\">' + more + '</span>');\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tstatic getUserReaction(params)\n\t{\n\t\treturn (\n\t\t\tType.isDomNode(params.userReactionNode)\n\t\t\t\t? params.userReactionNode.getAttribute('data-value')\n\t\t\t\t: ''\n\t\t);\n\t}\n\n\tstatic setReaction(params)\n\t{\n\t\tif (\n\t\t\tType.isUndefined(params.rating)\n\t\t\t|| !Type.isStringFilled(params.likeId)\n\t\t)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tconst action = (Type.isStringFilled(params.action) ? params.action : 'add');\n\t\tif (!['add', 'cancel', 'change'].includes(action))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tconst likeId = params.likeId;\n\t\tconst rating = params.rating;\n\t\tconst userReaction = (Type.isStringFilled(params.userReaction) ? params.userReaction : Loc.getMessage('RATING_LIKE_REACTION_DEFAULT'));\n\t\tconst userReactionOld = (Type.isStringFilled(params.userReactionOld) ? params.userReactionOld : Loc.getMessage('RATING_LIKE_REACTION_DEFAULT'));\n\t\tif (\n\t\t\taction === 'change'\n\t\t\t&& userReaction === userReactionOld\n\t\t)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tconst totalCount = (!Type.isUndefined(params.totalCount) ? Number(params.totalCount) : null);\n\t\tconst currentUserId = Number(Loc.getMessage('USER_ID'));\n\t\tconst userId = (!Type.isUndefined(params.userId) ? Number(params.userId) : currentUserId);\n\n\t\tconst userReactionNode = this.getNode(rating.userReactionNode);\n\t\tconst reactionsNode = this.getNode(rating.reactionsNode);\n\t\tconst topPanel = this.getNode(rating.topPanel);\n\t\tconst topPanelContainer = this.getNode(rating.topPanelContainer);\n\t\tconst topUsersText = this.getNode(rating.topUsersText);\n\t\tconst countText = this.getNode(rating.countText);\n\t\tconst buttonText = this.getNode(rating.buttonText);\n\n\t\tif (\n\t\t\tuserId === currentUserId // not pull\n\t\t\t&& userReactionNode\n\t\t)\n\t\t{\n\t\t\tuserReactionNode.setAttribute('data-value', [ 'add', 'change' ].includes(action) ? userReaction : '');\n\t\t}\n\n\t\tlet i = 0;\n\t\tlet elements = [];\n\t\tlet elementsNew = [];\n\n\t\tif (\n\t\t\ttotalCount !== null\n\t\t\t&& topPanel\n\t\t\t&& topUsersText\n\t\t\t&& reactionsNode\n\t\t)\n\t\t{\n\t\t\tif (totalCount > 0)\n\t\t\t{\n\t\t\t\ttopPanelContainer.classList.add('feed-post-emoji-top-panel-container-active');\n\n\t\t\t\tif (!topPanel.classList.contains('feed-post-emoji-container-toggle'))\n\t\t\t\t{\n\t\t\t\t\ttopPanel.classList.add('feed-post-emoji-container-toggle');\n\t\t\t\t\ttopUsersText.classList.add('feed-post-emoji-move-to-right');\n\t\t\t\t\treactionsNode.classList.add('feed-post-emoji-icon-box-show');\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (totalCount <= 0)\n\t\t\t{\n\t\t\t\ttopPanelContainer.classList.remove('feed-post-emoji-top-panel-container-active');\n\n\t\t\t\tif (topPanel.classList.contains('feed-post-emoji-container-toggle'))\n\t\t\t\t{\n\t\t\t\t\ttopPanel.classList.remove('feed-post-emoji-container-toggle');\n\t\t\t\t\ttopUsersText.classList.remove('feed-post-emoji-move-to-right');\n\t\t\t\t\treactionsNode.classList.remove('feed-post-emoji-icon-box-show');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (\n\t\t\ttotalCount !== null\n\t\t\t&& countText\n\t\t)\n\t\t{\n\t\t\tif (\n\t\t\t\ttotalCount <= 0\n\t\t\t\t&& !countText.classList.contains('feed-post-emoji-text-counter-invisible')\n\t\t\t)\n\t\t\t{\n\t\t\t\tcountText.classList.add('feed-post-emoji-text-counter-invisible');\n\t\t\t}\n\t\t\telse if (\n\t\t\t\ttotalCount > 0\n\t\t\t\t&& countText.classList.contains('feed-post-emoji-text-counter-invisible')\n\t\t\t)\n\t\t\t{\n\t\t\t\tcountText.classList.remove('feed-post-emoji-text-counter-invisible');\n\t\t\t}\n\t\t}\n\n\t\tif (reactionsNode)\n\t\t{\n\t\t\tconst reactionsContainer = reactionsNode.querySelector('.feed-post-emoji-icon-container');\n\t\t\telements = reactionsNode.querySelectorAll('.feed-post-emoji-icon-item');\n\n\t\t\tif (reactionsContainer)\n\t\t\t{\n\t\t\t\tlet found = false;\n\t\t\t\tlet newValue = false;\n\n\t\t\t\telements.forEach((element) => {\n\n\t\t\t\t\tconst reactionValue = element.getAttribute('data-reaction');\n\t\t\t\t\tconst reactionCount = Number(element.getAttribute('data-value'));\n\n\t\t\t\t\tif (reactionValue === userReaction)\n\t\t\t\t\t{\n\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\tif (action === 'cancel')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tnewValue = (reactionCount > 0 ? reactionCount - 1 : 0);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if ([ 'add', 'change' ].includes(action))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tnewValue = reactionCount + 1;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (newValue > 0 && newValue > reactionCount)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\telementsNew.push({\n\t\t\t\t\t\t\t\treaction: reactionValue,\n\t\t\t\t\t\t\t\tcount: newValue,\n\t\t\t\t\t\t\t\tanimate: {\n\t\t\t\t\t\t\t\t\ttype: 'pop',\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (newValue > 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\telementsNew.push({\n\t\t\t\t\t\t\t\treaction: reactionValue,\n\t\t\t\t\t\t\t\tcount: reactionCount,\n\t\t\t\t\t\t\t\tanimate: false,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (\n\t\t\t\t\t\taction === 'change'\n\t\t\t\t\t\t&& reactionValue === userReactionOld\n\t\t\t\t\t)\n\t\t\t\t\t{\n\t\t\t\t\t\tnewValue = (reactionCount > 0 ? reactionCount - 1 : 0);\n\n\t\t\t\t\t\tif (newValue > 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\telementsNew.push({\n\t\t\t\t\t\t\t\treaction: reactionValue,\n\t\t\t\t\t\t\t\tcount: newValue,\n\t\t\t\t\t\t\t\tanimate: false,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\telementsNew.push({\n\t\t\t\t\t\t\treaction: reactionValue,\n\t\t\t\t\t\t\tcount: reactionCount,\n\t\t\t\t\t\t\tanimate: false,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tif (\n\t\t\t\t\t['add', 'change'].includes(action)\n\t\t\t\t\t&& !found\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\telementsNew.push({\n\t\t\t\t\t\treaction: userReaction,\n\t\t\t\t\t\tcount: 1,\n\t\t\t\t\t\tanimate: true,\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tDom.clean(reactionsContainer);\n\n\t\t\t\tif (topPanel)\n\t\t\t\t{\n\t\t\t\t\tif (elementsNew.length > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\ttopPanel.classList.add('feed-post-emoji-container-nonempty');\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\ttopPanel.classList.remove('feed-post-emoji-container-nonempty');\n\t\t\t\t\t}\n\n\t\t\t\t\tif (RatingManager.mobile)\n\t\t\t\t\t{\n\t\t\t\t\t\tconst commentNode = topPanel.closest('.post-comment-block');\n\t\t\t\t\t\tif (commentNode)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (elementsNew.length > 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcommentNode.classList.add('comment-block-rating-nonempty');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcommentNode.classList.remove('comment-block-rating-nonempty');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.drawReactions({\n\t\t\t\t\tlikeId: likeId,\n\t\t\t\t\tcontainer: reactionsContainer,\n\t\t\t\t\tdata: elementsNew,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tif (\n\t\t\tuserId === currentUserId\n\t\t\t&& buttonText\n\t\t)\n\t\t{\n\t\t\tif ([ 'add', 'change' ].includes(action))\n\t\t\t{\n\t\t\t\tbuttonText.innerHTML = Loc.getMessage(`RATING_LIKE_EMOTION_${userReaction.toUpperCase()}_CALC`);\n\t\t\t\tif (RatingManager.mobile)\n\t\t\t\t{\n\t\t\t\t\tbuttonText.parentElement.className = '';\n\t\t\t\t\tbuttonText.parentElement.classList.add(\n\t\t\t\t\t\t'bx-ilike-left-wrap',\n\t\t\t\t\t\t'bx-you-like-button',\n\t\t\t\t\t\t`bx-you-like-button-${userReaction.toLowerCase()}`\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbuttonText.innerHTML = Loc.getMessage('RATING_LIKE_EMOTION_LIKE_CALC');\n\t\t\t\tif (RatingManager.mobile)\n\t\t\t\t{\n\t\t\t\t\tbuttonText.parentElement.className = 'bx-ilike-left-wrap';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tstatic drawReactions(params)\n\t{\n\t\tconst container = (Type.isDomNode(params.container) ? params.container : null);\n\t\tconst data = (Type.isArray(params.data) ? params.data : []);\n\t\tconst likeId = (Type.isStringFilled(params.likeId) ? params.likeId : '')\n\t\tif (\n\t\t\t!container\n\t\t\t|| !Type.isStringFilled(likeId)\n\t\t)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tconst reactionEvents = (\n\t\t\tRatingManager.mobile\n\t\t\t\t? {}\n\t\t\t\t: {\n\t\t\t\t\tclick: this.resultReactionClick.bind(this),\n\t\t\t\t\tmouseenter: this.resultReactionMouseEnter.bind(this),\n\t\t\t\t\tmouseleave: this.resultReactionMouseLeave.bind(this),\n\t\t\t\t}\n\t\t);\n\n\t\tDom.clean(container);\n\n\t\tconst reactionsData = {};\n\n\t\tdata.forEach((element, i) => {\n\n\t\t\tconst classList = [\n\t\t\t\t'feed-post-emoji-icon-item',\n\t\t\t\t`feed-post-emoji-icon-item-${(i+1)}`,\n\t\t\t];\n\n\t\t\tif (element?.animate)\n\t\t\t{\n\t\t\t\tif (element.animate?.type === 'pop')\n\t\t\t\t{\n\t\t\t\t\tclassList.push('feed-post-emoji-animation-pop');\n\t\t\t\t}\n\t\t\t\telse if (i >= 1)\n\t\t\t\t{\n\t\t\t\t\tclassList.push('feed-post-emoji-icon-animate');\n\t\t\t\t}\n\t\t\t\telse if (data.length == 1)\n\t\t\t\t{\n\t\t\t\t\tclassList.push('feed-post-emoji-animation-pop');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst emojiContainer = Dom.create('div', {\n\t\t\t\tprops: {\n\t\t\t\t\tid: `bx-ilike-result-reaction-${element.reaction}-${likeId}`,\n\t\t\t\t\tclassName: classList.join(' '),\n\t\t\t\t},\n\t\t\t\tattrs: {\n\t\t\t\t\t'data-reaction': element.reaction,\n\t\t\t\t\t'data-value': element.count,\n\t\t\t\t\t'data-like-id': likeId,\n\t\t\t\t\ttitle: Loc.getMessage(`RATING_LIKE_EMOTION_${element.reaction.toUpperCase()}_CALC`),\n\t\t\t\t},\n\t\t\t\tevents: reactionEvents,\n\t\t\t});\n\n\t\t\tconst animation = Lottie.loadAnimation({\n\t\t\t\tanimationData: this.reactionsAnimationData[element.reaction],\n\t\t\t\tcontainer: emojiContainer,\n\t\t\t\tloop: false,\n\t\t\t\tautoplay: false,\n\t\t\t\trenderer: 'svg',\n\t\t\t\trendererSettings: {\n\t\t\t\t\tviewBoxOnly: true,\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif (Boolean(element.animate))\n\t\t\t{\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tanimation.play();\n\t\t\t\t}, 200);\n\t\t\t}\n\n\t\t\tcontainer.appendChild(emojiContainer);\n\n\t\t\treactionsData[element.reaction] = element.count;\n\t\t});\n\n\t\tcontainer.setAttribute('data-reactions-data', JSON.stringify(reactionsData));\n\t}\n\n\tstatic showReactionsPopup(params)\n\t{\n\t\tconst bindElement = this.getNode(params.bindElement);\n\t\tconst likeId = (Type.isStringFilled(params.likeId) ? params.likeId : '');\n\n\t\tif (\n\t\t\t!bindElement\n\t\t\t|| !Type.isStringFilled(likeId)\n\t\t)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\tthis.reactionsPopupLikeId = likeId;\n\n\t\tif (this.reactionsPopup === null)\n\t\t{\n\t\t\tconst reactionsNodesList = [];\n\n\t\t\tthis.reactionsList.forEach((currentEmotion, index) => {\n\n\t\t\t\tconst emojiItem = Dom.create('div', {\n\t\t\t\t\tprops: {\n\t\t\t\t\t\tclassName: `feed-post-emoji-icon-item`,\n\t\t\t\t\t},\n\t\t\t\t\tattrs: {\n\t\t\t\t\t\t'data-reaction': currentEmotion,\n\t\t\t\t\t\ttitle: Loc.getMessage(`RATING_LIKE_EMOTION_${currentEmotion.toUpperCase()}_CALC`),\n\t\t\t\t\t},\n\t\t\t\t});\n\n\t\t\t\tLottie.loadAnimation({\n\t\t\t\t\trenderer: 'svg',\n\t\t\t\t\tcontainer: emojiItem,\n\t\t\t\t\tanimationData: this.reactionsAnimationData[currentEmotion],\n\t\t\t\t});\n\n\t\t\t\treactionsNodesList.push(emojiItem);\n\t\t\t});\n\n\t\t\tthis.reactionsPopup = Dom.create('div', {\n\t\t\t\tprops: {\n\t\t\t\t\tclassName: `feed-post-emoji-popup-container ${(RatingManager.mobile ? '--mobile' : '')}`,\n\t\t\t\t},\n\t\t\t\tchildren: [\n\t\t\t\t\tDom.create('div', {\n\t\t\t\t\t\tprops: {\n\t\t\t\t\t\t\tclassName: 'feed-post-emoji-icon-inner',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tchildren: reactionsNodesList,\n\t\t\t\t\t})\n\t\t\t\t],\n\t\t\t});\n\n\t\t\tthis.reactionsPopup.addEventListener((RatingManager.mobile ? 'touchend' : 'click'), (e) => {\n\n\t\t\t\tconst reactionNode = (\n\t\t\t\t\t(e.target.classList.contains('feed-post-emoji-icon-item'))\n\t\t\t\t\t\t? e.target\n\t\t\t\t\t\t: e.target.closest('.feed-post-emoji-icon-item')\n\t\t\t\t);\n\n\t\t\t\tif (reactionNode)\n\t\t\t\t{\n\t\t\t\t\tRatingLike.ClickVote(\n\t\t\t\t\t\te,\n\t\t\t\t\t\tthis.reactionsPopupLikeId,\n\t\t\t\t\t\treactionNode.getAttribute('data-reaction'),\n\t\t\t\t\t\ttrue\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\te.preventDefault();\n\t\t\t});\n\n\t\t\tDom.append(this.reactionsPopup, document.body);\n\t\t}\n\t\telse if (this.reactionsPopup.classList.contains('feed-post-emoji-popup-invisible'))\n\t\t{\n\t\t\tthis.reactionsPopup.classList.remove('feed-post-emoji-popup-invisible');\n\t\t}\n\t\telse if (\n\t\t\tRatingManager.mobile\n\t\t\t&& this.reactionsPopup.classList.contains('feed-post-emoji-popup-invisible-final-mobile')\n\t\t)\n\t\t{\n\t\t\tthis.reactionsPopup.classList.remove('feed-post-emoji-popup-invisible-final-mobile');\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tthis.reactionsPopupMouseOutHandler = this.getReactionsPopupMouseOutHandler(likeId);\n\n\t\tconst bindElementPosition = pos(bindElement);\n\n\t\tif (\n\t\t\tbindElement.closest('.feed-com-informers-bottom')\n\t\t\t&& bindElement.closest('.iframe-comments-cont, .task-iframe-popup')\n\t\t)\n\t\t{\n\t\t\tbindElementPosition.left += 100;\n\t\t}\n\n\t\tconst inverted = ((bindElementPosition.top - GetWindowSize().scrollTop) < 80);\n\t\tconst deltaY = (inverted ? 15 : -45);\n\n\t\tif (inverted)\n\t\t{\n\t\t\tthis.reactionsPopup.classList.add('feed-post-emoji-popup-inverted');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.reactionsPopup.classList.remove('feed-post-emoji-popup-inverted');\n\t\t}\n\n\t\tconst likeInstance = RatingLike.getInstance(likeId);\n\n\t\tif (RatingManager.mobile)\n\t\t{\n\t\t\tthis.touchMoveDeltaY = (inverted ? 60 : -45);\n\t\t\tDom.adjust(this.reactionsPopup, {\n\t\t\t\tstyle: {\n\t\t\t\t\tleft: '12px',\n\t\t\t\t\ttop: ((inverted ? (bindElementPosition.top - 23) : (bindElementPosition.top - 28)) + deltaY) + 'px',\n\t\t\t\t\twidth: '330px',\n\t\t\t\t\tborderRadius: '61px',\n\t\t\t\t},\n\t\t\t});\n\n\t\t\tthis.reactionsPopup.classList.remove('feed-post-emoji-popup-invisible-final');\n\t\t\tthis.reactionsPopup.classList.add('feed-post-emoji-popup-active-final');\n\t\t\tthis.reactionsPopup.classList.add('feed-post-emoji-popup-active-final-item');\n\t\t\tlikeInstance.box.classList.add('feed-post-emoji-control-active');\n\t\t\tthis.reactionsPopupMobileDisableScroll();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.reactionsPopupAnimation = new BX.easing({\n\t\t\t\tduration: 300,\n\t\t\t\tstart: {\n\t\t\t\t\twidth: 100,\n\t\t\t\t\tleft: (bindElementPosition.left + (bindElementPosition.width / 2) - 50),\n\t\t\t\t\ttop: ((inverted ? bindElementPosition.top - 30 : bindElementPosition.top + 30 ) + deltaY),\n\t\t\t\t\tborderRadius: 0,\n\t\t\t\t\topacity: 0,\n\t\t\t\t},\n\t\t\t\tfinish: {\n\t\t\t\t\twidth: 300,\n\t\t\t\t\tleft: (bindElementPosition.left + (bindElementPosition.width / 2) - 133),\n\t\t\t\t\ttop: (bindElementPosition.top + deltaY - 5),\n\t\t\t\t\tborderRadius: 50,\n\t\t\t\t\topacity: 100,\n\t\t\t\t},\n\t\t\t\ttransition : BX.easing.makeEaseInOut(BX.easing.transitions.cubic),\n\t\t\t\tstep: (state) => {\n\t\t\t\t\tif (!this.reactionsPopup)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.reactionsPopupAnimation.stop();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tthis.reactionsPopup.style.width = `${state.width}px`;\n\t\t\t\t\tthis.reactionsPopup.style.left = `${state.left}px`;\n\t\t\t\t\tthis.reactionsPopup.style.top = `${state.top}px`;\n\t\t\t\t\tthis.reactionsPopup.style.borderRadius = `${state.borderRadius}px`;\n\t\t\t\t\tthis.reactionsPopup.style.opacity = state.opacity / 100;\n\t\t\t\t\tthis.reactionsPopupOpacityState = state.opacity;\n\t\t\t\t},\n\t\t\t\tcomplete: () => {\n\t\t\t\t\tif (!this.reactionsPopup)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tthis.reactionsPopup.style.opacity = '';\n\t\t\t\t\tthis.reactionsPopup.classList.add('feed-post-emoji-popup-active-final');\n\t\t\t\t\tlikeInstance.box.classList.add('feed-post-emoji-control-active');\n\t\t\t\t\tif (Type.isFunction(params.onComplete))\n\t\t\t\t\t{\n\t\t\t\t\t\tparams.onComplete();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t});\n\t\t\tthis.reactionsPopupAnimation.animate();\n\n\t\t\tsetTimeout(() => {\n\n\t\t\t\tif (!this.reactionsPopup)\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst reactions = this.reactionsPopup.querySelectorAll('.feed-post-emoji-icon-item');\n\n\t\t\t\tthis.reactionsPopupAnimation2 = new BX.easing({\n\t\t\t\t\tduration: 140,\n\t\t\t\t\tstart: {\n\t\t\t\t\t\topacity: 0,\n\t\t\t\t\t},\n\t\t\t\t\tfinish: {\n\t\t\t\t\t\topacity: 100\n\t\t\t\t\t},\n\t\t\t\t\ttransition : BX.easing.transitions.cubic,\n\t\t\t\t\tstep: (state) => {\n\t\t\t\t\t\treactions[0].style.opacity = state.opacity / 100;\n\t\t\t\t\t\treactions[1].style.opacity = state.opacity / 100;\n\t\t\t\t\t\treactions[2].style.opacity = state.opacity / 100;\n\t\t\t\t\t\treactions[3].style.opacity = state.opacity / 100;\n\t\t\t\t\t\treactions[4].style.opacity = state.opacity / 100;\n\t\t\t\t\t\treactions[5].style.opacity = state.opacity / 100;\n\t\t\t\t\t\treactions[6].style.opacity = state.opacity / 100;\n\t\t\t\t\t},\n\t\t\t\t\tcomplete: () => {\n\t\t\t\t\t\tthis.reactionsPopup.classList.add('feed-post-emoji-popup-active-final-item');\n\t\t\t\t\t\treactions[0].style.opacity = '';\n\t\t\t\t\t\treactions[1].style.opacity = '';\n\t\t\t\t\t\treactions[2].style.opacity = '';\n\t\t\t\t\t\treactions[3].style.opacity = '';\n\t\t\t\t\t\treactions[4].style.opacity = '';\n\t\t\t\t\t\treactions[5].style.opacity = '';\n\t\t\t\t\t\treactions[6].style.opacity = '';\n\t\t\t\t\t},\n\t\t\t\t});\n\t\t\t\tthis.reactionsPopupAnimation2.animate();\n\t\t\t}, 100);\n\t\t}\n\n\t\tif (!this.reactionsPopup.classList.contains('feed-post-emoji-popup-active'))\n\t\t{\n\t\t\tthis.reactionsPopup.classList.add('feed-post-emoji-popup-active');\n\t\t}\n\n\t\tif (!RatingManager.mobile)\n\t\t{\n\t\t\tdocument.addEventListener('mousemove', this.reactionsPopupMouseOutHandler);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.touchScrollTop = GetWindowSize().scrollTop;\n\t\t\tthis.hasMobileTouchMoved = null;\n\n\t\t\twindow.addEventListener('touchend', this.reactionsPopupMobileTouchEndHandler);\n\t\t\twindow.addEventListener('touchmove', this.reactionsPopupMobileTouchMoveHandler);\n\t\t}\n\t}\n\n\tstatic reactionsPopupMobileTouchEnd(e)\n\t{\n\t\tconst coords = {\n\t\t\tx: e.changedTouches[0].pageX, // e.touches[0].clientX + window.pageXOffset\n\t\t\ty: e.changedTouches[0].pageY, // e.touches[0].clientY + window.pageYOffset\n\t\t};\n\n\t\tif (this.hasMobileTouchMoved === true)\n\t\t{\n\t\t\tlet userReaction = null;\n\t\t\tconst reactionNode = this.reactionsPopupMobileGetHoverNode(coords.x, coords.y);\n\n\t\t\tif (\n\t\t\t\treactionNode\n\t\t\t\t&& (userReaction = reactionNode.getAttribute('data-reaction'))\n\t\t\t)\n\t\t\t{\n\t\t\t\tRatingLike.ClickVote(\n\t\t\t\t\te,\n\t\t\t\t\tthis.reactionsPopupLikeId,\n\t\t\t\t\tuserReaction,\n\t\t\t\t\ttrue\n\t\t\t\t);\n\t\t\t}\n\t\t\tthis.reactionsPopupMobileHideHandler();\n\t\t}\n\t\telse // show reactions popup and handle clicks\n\t\t{\n\t\t\twindow.addEventListener('touchend', this.reactionsPopupMobileHideHandler);\n\t\t}\n\n\t\twindow.removeEventListener('touchend', this.reactionsPopupMobileTouchEndHandler);\n\t\twindow.removeEventListener('touchmove', this.reactionsPopupMobileTouchMoveHandler);\n\n\t\tthis.touchStartPosition = null;\n\t\te.preventDefault();\n\t}\n\n\tstatic reactionsPopupMobileTouchMove(e)\n\t{\n\t\tconst coords = {\n\t\t\tx: e.touches[0].pageX, // e.touches[0].clientX + window.pageXOffset\n\t\t\ty: e.touches[0].pageY, // e.touches[0].clientY + window.pageYOffset\n\t\t};\n\n\n\t\tthis.touchCurrentPosition = {\n\t\t\tx: coords.x,\n\t\t\ty: coords.y,\n\t\t};\n\n\t\tif (this.touchStartPosition === null)\n\t\t{\n\t\t\tthis.touchStartPosition = {\n\t\t\t\tx: coords.x,\n\t\t\t\ty: coords.y,\n\t\t\t};\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (this.hasMobileTouchMoved !== true)\n\t\t\t{\n\t\t\t\tthis.hasMobileTouchMoved = !this.reactionsPopupMobileCheckTouchMove();\n\t\t\t}\n\t\t}\n\n\t\tif (this.hasMobileTouchMoved === true)\n\t\t{\n\t\t\tconst reactionNode = this.reactionsPopupMobileGetHoverNode(coords.x, coords.y);\n\t\t\tif (reactionNode)\n\t\t\t{\n\t\t\t\tif (\n\t\t\t\t\tthis.currentReactionNodeHover\n\t\t\t\t\t&& this.currentReactionNodeHover !== reactionNode\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\tthis.reactionsPopupMobileRemoveHover(this.currentReactionNodeHover);\n\t\t\t\t}\n\t\t\t\tthis.reactionsPopupMobileAddHover(reactionNode);\n\t\t\t\tthis.currentReactionNodeHover = reactionNode;\n\t\t\t}\n\t\t\telse if (this.currentReactionNodeHover)\n\t\t\t{\n\t\t\t\tthis.reactionsPopupMobileRemoveHover(this.currentReactionNodeHover);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (this.currentReactionNodeHover)\n\t\t\t{\n\t\t\t\tthis.reactionsPopupMobileRemoveHover(this.currentReactionNodeHover);\n\t\t\t}\n\t\t}\n\t}\n\n\tstatic blockReactionsPopup()\n\t{\n\t\tif (this.blockShowPopupTimeout)\n\t\t{\n\t\t\twindow.clearTimeout(this.blockShowPopupTimeout);\n\t\t}\n\n\t\tthis.blockShowPopup = true;\n\t\tthis.blockShowPopupTimeout = setTimeout(() => {\n\t\t\tthis.blockShowPopup = false;\n\t\t}, 500);\n\t}\n\n\tstatic hideReactionsPopup(params)\n\t{\n\t\tconst likeId = (Type.isStringFilled(params.likeId) ? params.likeId : false);\n\n\t\tif (this.reactionsPopup)\n\t\t{\n\t\t\tif (RatingManager.mobile)\n\t\t\t{\n\t\t\t\tthis.reactionsPopup.classList.add('feed-post-emoji-popup-invisible-final');\n\t\t\t\tthis.reactionsPopup.classList.add('feed-post-emoji-popup-invisible-final-mobile');\n\t\t\t\tthis.reactionsPopup.classList.remove('feed-post-emoji-popup-active');\n\t\t\t\tthis.reactionsPopup.classList.remove('feed-post-emoji-popup-active-final');\n\t\t\t\tthis.reactionsPopup.classList.remove('feed-post-emoji-popup-active-final-item');\n\t\t\t\tthis.reactionsPopupMobileEnableScroll();\n\t\t\t\tDom.remove(this.reactionsPopup);\n\t\t\t\tthis.reactionsPopup = null;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (this.reactionsPopupAnimation)\n\t\t\t\t{\n\t\t\t\t\tthis.reactionsPopupAnimation.stop();\n\t\t\t\t}\n\t\t\t\tif (this.reactionsPopupAnimation2)\n\t\t\t\t{\n\t\t\t\t\tthis.reactionsPopupAnimation2.stop();\n\t\t\t\t}\n\n\t\t\t\tthis.reactionsPopup.classList.add('feed-post-emoji-popup-invisible');\n\n\t\t\t\tthis.reactionsPopupAnimation4 = new BX.easing({\n\t\t\t\t\tduration: 500,\n\t\t\t\t\tstart: {\n\t\t\t\t\t\topacity: this.reactionsPopupOpacityState,\n\t\t\t\t\t},\n\t\t\t\t\tfinish: {\n\t\t\t\t\t\topacity: 0,\n\t\t\t\t\t},\n\t\t\t\t\ttransition: BX.easing.transitions.linear,\n\t\t\t\t\tstep: (state) => {\n\t\t\t\t\t\tthis.reactionsPopup.style.opacity = state.opacity / 100;\n\t\t\t\t\t\tthis.reactionsPopupOpacityState = state.opacity;\n\t\t\t\t\t},\n\t\t\t\t\tcomplete: () => {\n\t\t\t\t\t\tthis.reactionsPopup.style.opacity = '';\n\t\t\t\t\t\tthis.reactionsPopup.classList.add('feed-post-emoji-popup-invisible-final');\n\t\t\t\t\t\tthis.reactionsPopup.classList.remove('feed-post-emoji-popup-active');\n\t\t\t\t\t\tthis.reactionsPopup.classList.remove('feed-post-emoji-popup-active-final');\n\t\t\t\t\t\tthis.reactionsPopup.classList.remove('feed-post-emoji-popup-active-final-item');\n\t\t\t\t\t\tDom.remove(this.reactionsPopup);\n\t\t\t\t\t\tthis.reactionsPopup = null;\n\t\t\t\t\t},\n\t\t\t\t});\n\n\t\t\t\tthis.reactionsPopupAnimation4.animate();\n\t\t\t}\n\n\t\t\tthis.reactionsPopupLikeId = null;\n\n\t\t\tif (likeId)\n\t\t\t{\n\t\t\t\tRatingLike.getInstance(likeId).box.classList.remove('feed-post-emoji-control-active');\n\t\t\t}\n\t\t}\n\n\t\tthis.reactionsPopupMobileRemoveHover(this.currentReactionNodeHover);\n\n\t\tif (likeId)\n\t\t{\n\t\t\tthis.bindReactionsPopup({\n\t\t\t\tlikeId: likeId,\n\t\t\t});\n\t\t}\n\t}\n\n\tstatic reactionsPopupMobileCheckTouchMove()\n\t{\n\t\tif (this.touchStartPosition === null)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (\n\t\t\t\tMath.abs(this.touchCurrentPosition.x - this.touchStartPosition.x) > 5\n\t\t\t\t|| Math.abs(this.touchCurrentPosition.y - this.touchStartPosition.y) > 5\n\t\t\t)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tstatic reactionsPopupMobileHide(e)\n\t{\n\t\twindow.removeEventListener('touchend', this.reactionsPopupMobileHideHandler);\n\t\tif (this.reactionsPopupLikeId)\n\t\t{\n\t\t\tthis.hideReactionsPopup({\n\t\t\t\tlikeId: this.reactionsPopupLikeId,\n\t\t\t});\n\n\t\t\tif (e)\n\t\t\t{\n\t\t\t\te.preventDefault();\n\t\t\t}\n\t\t}\n\t}\n\n\tstatic reactionsPopupMobileGetHoverNode(x, y)\n\t{\n\t\tconst nodeAboveFinger = document.elementFromPoint(x, (y + this.touchMoveDeltaY - this.touchScrollTop));\n\t\tconst nodeBelowFinger = document.elementFromPoint(x, (y - this.touchScrollTop));\n\n\t\tconst iconNodeAboveFinger = nodeAboveFinger?.closest('[data-reaction]');\n\t\tconst iconNodeBelowFinger = nodeBelowFinger?.closest('[data-reaction]');\n\n\t\tconst reactionNode = iconNodeAboveFinger || iconNodeBelowFinger;\n\n\t\tconst userReaction = reactionNode?.getAttribute('data-reaction');\n\n\t\treturn Type.isStringFilled(userReaction) ? reactionNode : null;\n\t}\n\n\tstatic reactionsPopupMobileAddHover(reactionNode)\n\t{\n\t\tif (!reactionNode)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\treactionNode.classList.add('feed-post-emoji-icon-item-hover');\n\t}\n\n\tstatic reactionsPopupMobileRemoveHover(reactionNode)\n\t{\n\t\tif (!reactionNode)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\treactionNode.classList.remove('feed-post-emoji-icon-item-hover');\n\t}\n\n\tstatic reactionsPopupMobileEnableScroll()\n\t{\n\t\tdocument.removeEventListener('touchmove', this.touchMoveScrollListener, { passive: false });\n\t\tEventEmitter.emit('onPullDownEnable');\n\n\t\tif (this.mobileOverlay !== null)\n\t\t{\n\t\t\tDom.clean(this.mobileOverlay);\n\t\t\tDom.remove(this.mobileOverlay);\n\n\t\t\tthis.mobileOverlay = null;\n\t\t}\n\t}\n\n\tstatic reactionsPopupMobileDisableScroll()\n\t{\n\t\tdocument.addEventListener('touchmove', this.touchMoveScrollListener, { passive: false });\n\t\tif (app)\n\t\t{\n\t\t\tapp.exec('disableTabScrolling');\n\t\t}\n\t\tEventEmitter.emit('onPullDownDisable');\n\n\t\tif (!Type.isNull(this.mobileOverlay))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tthis.mobileOverlay = Dom.create('DIV', {\n\t\t\tprops: {\n\t\t\t\tclassName: 'feed-post-emoji-popup-mobile-overlay',\n\t\t\t},\n\t\t});\n\t\tsetTimeout(() => {\n\t\t\tif (Type.isNull(this.mobileOverlay))\n\t\t\t{\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tDom.append(this.mobileOverlay, document.body);\n\t\t}, 1000); // to avoid blink\n\t}\n\n\tstatic bindReactionsPopup(params) {\n\n\t\tif (RatingManager.mobile)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\tconst likeId = (Type.isStringFilled(params.likeId) ? params.likeId : '');\n\n\t\tif (!Type.isStringFilled(likeId))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\tconst likeInstance = RatingLike.getInstance(likeId);\n\t\tif (!likeInstance)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\tlikeInstance.mouseOverHandler = Runtime.debounce(this.getMouseOverHandler(likeId), 500);\n\n\t\tlikeInstance.box.addEventListener('mouseenter', likeInstance.mouseOverHandler);\n\t\tlikeInstance.box.addEventListener('mouseleave', this.blockReactionsPopup);\n\t}\n\n\tstatic touchMoveScrollListener(e)\n\t{\n\t\te.preventDefault();\n\t}\n\n\tstatic getReactionsPopupMouseOutHandler(likeId)\n\t{\n\t\treturn (e) => {\n\n\t\t\tif (!this.reactionsPopup)\n\t\t\t{\n\t\t\t\tdocument.removeEventListener('mousemove', this.reactionsPopupMouseOutHandler)\n\t\t\t\tthis.reactionsPopupMouseOutHandler = null;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst popupPosition = this.reactionsPopup.getBoundingClientRect();\n\t\t\tconst inverted = this.reactionsPopup.classList.contains('feed-post-emoji-popup-inverted');\n\n\t\t\tif (\n\t\t\t\te.clientX >= popupPosition.left\n\t\t\t\t&& e.clientX <= popupPosition.right\n\t\t\t\t&& e.clientY >= popupPosition.top - (inverted ? 25 : 0)\n\t\t\t\t&& e.clientY <= (popupPosition.bottom + (inverted ? 0 : 25))\n\t\t\t)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.blockReactionsPopup();\n\t\t\tthis.hideReactionsPopup({\n\t\t\t\tlikeId: likeId\n\t\t\t});\n\n\t\t\tdocument.removeEventListener('mousemove', this.reactionsPopupMouseOutHandler)\n\t\t\tthis.reactionsPopupMouseOutHandler = null;\n\t\t};\n\t}\n\n\tstatic getMouseOverHandler(likeId)\n\t{\n\t\treturn () => {\n\n\t\t\tconst likeInstance = RatingLike.getInstance(likeId);\n\n\t\t\tif (\n\t\t\t\tthis.reactionsPopup\n\t\t\t\t&& !this.reactionsPopup?.classList.contains('feed-post-emoji-popup-invisible')\n\t\t\t\t&& !(\n\t\t\t\t\tRatingManager.mobile\n\t\t\t\t\t&& this.reactionsPopup?.classList.contains('feed-post-emoji-popup-invisible-final-mobile')\n\t\t\t\t)\n\t\t\t)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (!this.afterClickBlockShowPopup)\n\t\t\t{\n\t\t\t\tif (this.blockShowPopup)\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (RatingManager.mobile)\n\t\t\t\t{\n\t\t\t\t\tapp.exec('callVibration');\n\t\t\t\t}\n\n\t\t\t\tthis.showReactionsPopup({\n\t\t\t\t\tbindElement: likeInstance.box,\n\t\t\t\t\tlikeId: likeId,\n\t\t\t\t\tonComplete: () => {\n\t\t\t\t\t\tlikeInstance.box.removeEventListener('mouseenter', likeInstance.mouseOverHandler);\n\t\t\t\t\t\tlikeInstance.box.removeEventListener('mouseleave', this.blockReactionsPopup.bind(this));\n\t\t\t\t\t},\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t}\n\n\tstatic buildPopupContent(params)\n\t{\n\t\tconst clear = (params.clear ? Boolean(params.clear) : false);\n\t\tconst likeId = (Type.isStringFilled(params.likeId) ? params.likeId : '');\n\t\tconst rating = params.rating;\n\t\tconst requestReaction = (Type.isStringFilled(params.reaction) ? params.reaction : '');\n\t\tconst page = (Number(params.page) > 0 ? Number(params.page) : 1);\n\t\tconst data = params.data;\n\t\tconst reaction = false;\n\n\t\tconst reactionsList = [];\n\t\tlet reactionsCount = 0;\n\n\t\tif (\n\t\t\tclear\n\t\t\t&& page === 1\n\t\t)\n\t\t{\n\t\t\tthis.clearPopupContent({\n\t\t\t\tlikeId: likeId,\n\t\t\t});\n\t\t}\n\n\t\tthis.popupCurrentReaction = (Type.isStringFilled(requestReaction) ? requestReaction : 'all');\n\n\t\tif (\n\t\t\trequestReaction.length <= 0\n\t\t\t|| requestReaction == 'all'\n\t\t) // first current tab\n\t\t{\n\t\t\tthis.popupSizeInitialized = false;\n\t\t\tdocument.getElementById(`bx-ilike-popup-cont-${likeId}`).style.height = 'auto';\n\t\t\tdocument.getElementById(`bx-ilike-popup-cont-${likeId}`).style.minWidth = 'auto';\n\t\t}\n\n\t\tif (!Type.isStringFilled(requestReaction))\n\t\t{\n\t\t\tthis.popupPagesList = {};\n\t\t}\n\n\t\tthis.popupPagesList[(requestReaction == '' ? 'all' : requestReaction)] = (page + 1);\n\n\t\tif (Type.isPlainObject(data.reactions))\n\t\t{\n\t\t\tObject.entries(data.reactions).forEach(([ reaction, count ]) => {\n\t\t\t\tif (Number(count) <= 0)\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\treactionsList.push({\n\t\t\t\t\treaction: reaction,\n\t\t\t\t\tcount: Number(count)\n\t\t\t\t});\n\t\t\t\treactionsCount++;\n\t\t\t});\n\t\t}\n\n\t\tconst tabsNode = Dom.create('span', {\n\t\t\tprops: {\n\t\t\t\tclassName: 'bx-ilike-popup-head',\n\t\t\t},\n\t\t});\n\n\t\tif (reactionsCount > 1)\n\t\t{\n\t\t\tconst headClassList = [ 'bx-ilike-popup-head-item' ];\n\t\t\tif (!Type.isStringFilled(requestReaction) || requestReaction == 'all')\n\t\t\t{\n\t\t\t\theadClassList.push('bx-ilike-popup-head-item-current');\n\t\t\t}\n\n\t\t\ttabsNode.appendChild(Dom.create('span', {\n\t\t\t\tprops: {\n\t\t\t\t\tclassName: headClassList.join(' '),\n\t\t\t\t},\n\t\t\t\tchildren: [\n\t\t\t\t\tDom.create('span', {\n\t\t\t\t\t\tprops: {\n\t\t\t\t\t\t\tclassName: 'bx-ilike-popup-head-icon feed-post-emoji-icon-all',\n\t\t\t\t\t\t},\n\t\t\t\t\t}),\n\t\t\t\t\tDom.create('span', {\n\t\t\t\t\t\tprops: {\n\t\t\t\t\t\t\tclassName: 'bx-ilike-popup-head-text',\n\t\t\t\t\t\t},\n\t\t\t\t\t\thtml: Loc.getMessage('RATING_LIKE_POPUP_ALL').replace('#CNT#', Number(data.items_all)),\n\t\t\t\t\t})\n\t\t\t\t],\n\t\t\t\tevents: {\n\t\t\t\t\tclick: ((e) => {\n\t\t\t\t\t\tthis.changePopupTab({\n\t\t\t\t\t\t\tlikeId: likeId,\n\t\t\t\t\t\t\trating: rating,\n\t\t\t\t\t\t\treaction: 'all',\n\t\t\t\t\t\t});\n\t\t\t\t\t\te. preventDefault();\n\t\t\t\t\t}),\n\t\t\t\t},\n\t\t\t}));\n\t\t}\n\n\t\tif (reactionsCount === 0)\n\t\t{\n\t\t\treactionsList.push({\n\t\t\t\treaction: Loc.getMessage('RATING_LIKE_REACTION_DEFAULT'),\n\t\t\t\tcount: Number(data.items_all),\n\t\t\t});\n\t\t}\n\n\t\treactionsList.sort((a, b) => {\n\t\t\tconst sample = {\n\t\t\t\tlike: 0,\n\t\t\t\tkiss: 1,\n\t\t\t\tlaugh: 2,\n\t\t\t\twonder: 3,\n\t\t\t\tcry: 4,\n\t\t\t\tangry: 5,\n\t\t\t\tfacepalm: 6,\n\t\t\t};\n\t\t\tif (sample[a.reaction] < sample[b.reaction])\n\t\t\t{\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\tif (sample[a.reaction] > sample[b.reaction])\n\t\t\t{\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\treturn 0;\n\t\t});\n\n\t\treactionsList.forEach((reactionData) => {\n\n\t\t\tconst headItemClassList = [ 'bx-ilike-popup-head-item' ];\n\t\t\tif (requestReaction === reactionData.reaction)\n\t\t\t{\n\t\t\t\theadItemClassList.push('bx-ilike-popup-head-item-current');\n\t\t\t}\n\n\t\t\ttabsNode.appendChild(Dom.create('span', {\n\t\t\t\tprops: {\n\t\t\t\t\tclassName: headItemClassList.join(' '),\n\t\t\t\t},\n\t\t\t\tattrs: {\n\t\t\t\t\ttitle: Loc.getMessage(`RATING_LIKE_EMOTION_${reactionData.reaction.toUpperCase()}_CALC`),\n\t\t\t\t},\n\t\t\t\tchildren: [\n\t\t\t\t\tDom.create('span', {\n\t\t\t\t\t\tprops: {\n\t\t\t\t\t\t\tclassName: [\n\t\t\t\t\t\t\t\t'bx-ilike-popup-head-icon',\n\t\t\t\t\t\t\t\t'feed-post-emoji-icon-item',\n\t\t\t\t\t\t\t\t`feed-post-emoji-icon-${reactionData.reaction}`,\n\t\t\t\t\t\t\t].join(' '),\n\t\t\t\t\t\t}\n\t\t\t\t\t}),\n\t\t\t\t\tDom.create('span', {\n\t\t\t\t\t\tprops: {\n\t\t\t\t\t\t\tclassName: 'bx-ilike-popup-head-text',\n\t\t\t\t\t\t},\n\t\t\t\t\t\thtml: reactionData.count,\n\t\t\t\t\t})\n\t\t\t\t],\n\t\t\t\tevents: {\n\t\t\t\t\tclick: (e) => {\n\n\t\t\t\t\t\tconst popupContent = document.getElementById(`bx-ilike-popup-cont-${likeId}`);\n\t\t\t\t\t\tconst popupContentPosition = popupContent.getBoundingClientRect();\n\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\trequestReaction.length <= 0\n\t\t\t\t\t\t\t|| requestReaction === 'all'\n\t\t\t\t\t\t) // first current tab\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.popupSizeInitialized = true;\n\t\t\t\t\t\t\tpopupContent.style.height = `${popupContentPosition.height}px`;\n\t\t\t\t\t\t\tpopupContent.style.minWidth = `${popupContentPosition.width}px`;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (popupContentPosition.width > Number(popupContent.style.minWidth))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tpopupContent.style.minWidth = `${popupContentPosition.width}px`;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthis.changePopupTab({\n\t\t\t\t\t\t\tlikeId: likeId,\n\t\t\t\t\t\t\trating: rating,\n\t\t\t\t\t\t\treaction: reactionData.reaction,\n\t\t\t\t\t\t});\n\t\t\t\t\t\te. preventDefault();\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t}));\n\t\t});\n\n\t\tlet usersNode = rating.popupContent.querySelector('.bx-ilike-popup-content-container');\n\t\tlet usersNodeExists = false;\n\n\t\tif (!usersNode)\n\t\t{\n\t\t\tusersNode = Dom.create('span', {\n\t\t\t\tprops: {\n\t\t\t\t\tclassName: 'bx-ilike-popup-content-container',\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\telse\n\t\t{\n\t\t\tusersNodeExists = true;\n\t\t}\n\n\t\tusersNode.querySelectorAll('.bx-ilike-popup-content').forEach((contentNode) => {\n\t\t\tcontentNode.classList.add('bx-ilike-popup-content-invisible');\n\t\t});\n\n\t\tlet reactionUsersNode = usersNode.querySelector(`.bx-ilike-popup-content-${this.popupCurrentReaction}`);\n\t\tif (!reactionUsersNode)\n\t\t{\n\t\t\treactionUsersNode = Dom.create('span', {\n\t\t\t\tprops: {\n\t\t\t\t\tclassName: [\n\t\t\t\t\t\t'bx-ilike-popup-content',\n\t\t\t\t\t\t`bx-ilike-popup-content-${this.popupCurrentReaction}`,\n\t\t\t\t\t].join(' '),\n\t\t\t\t}\n\t\t\t});\n\t\t\tusersNode.appendChild(reactionUsersNode);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treactionUsersNode.classList.remove('bx-ilike-popup-content-invisible');\n\t\t}\n\n\t\tdata.items.forEach((item) => {\n\n\t\t\tconst userItemClassList = [ 'bx-ilike-popup-user-item' ];\n\t\t\tif (Type.isStringFilled(item.USER_TYPE))\n\t\t\t{\n\t\t\t\tuserItemClassList.push(`bx-ilike-popup-user-item-${item.USER_TYPE}`);\n\t\t\t}\n\n\t\t\treactionUsersNode.appendChild(Dom.create('a', {\n\t\t\t\tprops: {\n\t\t\t\t\tclassName: userItemClassList.join(' '),\n\t\t\t\t},\n\t\t\t\tattrs: {\n\t\t\t\t\thref: item.URL,\n\t\t\t\t\ttarget: '_blank',\n\t\t\t\t},\n\t\t\t\tchildren: [\n\t\t\t\t\tDom.create('span', {\n\t\t\t\t\t\tprops: {\n\t\t\t\t\t\t\tclassName: 'bx-ilike-popup-user-icon',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tstyle: (\n\t\t\t\t\t\t\tType.isStringFilled(item.PHOTO_SRC)\n\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t'background-image': `url(\"${encodeURI(item.PHOTO_SRC)}\")`,\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t: {}\n\t\t\t\t\t\t)\n\t\t\t\t\t}),\n\t\t\t\t\tDom.create('span', {\n\t\t\t\t\t\tprops: {\n\t\t\t\t\t\t\tclassName: 'bx-ilike-popup-user-name'\n\t\t\t\t\t\t},\n\t\t\t\t\t\thtml: item.FULL_NAME,\n\t\t\t\t\t}),\n\t\t\t\t\tDom.create('span', {\n\t\t\t\t\t\tprops: {\n\t\t\t\t\t\t\tclassName: 'bx-ilike-popup-user-status',\n\t\t\t\t\t\t},\n\t\t\t\t\t}),\n\t\t\t\t],\n\t\t\t}));\n\t\t});\n\n\n\t\tconst waitNode = rating.popupContent.querySelector('.bx-ilike-wait');\n\t\tif (waitNode)\n\t\t{\n\t\t\tDom.clean(waitNode);\n\t\t\tDom.remove(waitNode);\n\t\t}\n\t\tconst tabsNodeOld = rating.popupContent.querySelector('.bx-ilike-popup-head');\n\t\tif (tabsNodeOld)\n\t\t{\n\t\t\ttabsNodeOld.parentNode.insertBefore(tabsNode, tabsNodeOld);\n\t\t\ttabsNodeOld.parentNode.removeChild(tabsNodeOld);\n\t\t}\n\t\telse\n\t\t{\n\t\t\trating.popupContent.appendChild(tabsNode);\n\t\t}\n\n\t\tif (!usersNodeExists)\n\t\t{\n\t\t\trating.popupContent.appendChild(usersNode);\n\t\t}\n\t}\n\n\tstatic clearPopupContent(params)\n\t{\n\t\tconst likeId = (Type.isStringFilled(params.likeId) ? params.likeId : '');\n\n\t\tconst likeInstance = RatingLike.getInstance(likeId);\n\t\tlikeInstance.popupContent.innerHTML = '';\n\t\tdocument.getElementById(`bx-ilike-popup-cont-${likeId}`).style.height = 'auto';\n\t\tdocument.getElementById(`bx-ilike-popup-cont-${likeId}`).style.minWidth = 'auto';\n\t\tlikeInstance.popupContent.appendChild(Dom.create('span', {\n\t\t\tprops: {\n\t\t\t\tclassName: 'bx-ilike-wait',\n\t\t\t},\n\t\t}));\n\t}\n\n\tstatic changePopupTab(params)\n\t{\n\t\tconst likeId = (Type.isStringFilled(params.likeId) ? params.likeId : '');\n\t\tconst rating = params.rating;\n\t\tconst reaction = (Type.isStringFilled(params.reaction) ? params.reaction : '');\n\n\t\tconst contentContainerNode = rating.popupContent.querySelector('.bx-ilike-popup-content-container');\n\t\tif (!contentContainerNode)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\tconst reactionUsersNode = contentContainerNode.querySelector('.bx-ilike-popup-content-' + reaction);\n\t\tif (reactionUsersNode)\n\t\t{\n\t\t\tthis.popupCurrentReaction = (Type.isStringFilled(reaction) ? reaction : 'all');\n\n\t\t\trating.popupContent.querySelectorAll('.bx-ilike-popup-head-item').forEach((tabNode) => {\n\t\t\t\ttabNode.classList.remove('bx-ilike-popup-head-item-current');\n\t\t\t\tconst reactionTabNode = tabNode.querySelector(`.feed-post-emoji-icon-${reaction}`);\n\t\t\t\tif (reactionTabNode)\n\t\t\t\t{\n\t\t\t\t\ttabNode.classList.add('bx-ilike-popup-head-item-current');\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tcontentContainerNode.querySelectorAll('.bx-ilike-popup-content').forEach((contentNode) => {\n\t\t\t\tcontentNode.classList.add('bx-ilike-popup-content-invisible');\n\t\t\t});\n\t\t\treactionUsersNode.classList.remove('bx-ilike-popup-content-invisible');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tListPopup.List(likeId, 1, reaction);\n\t\t}\n\t}\n\n\tstatic buildPopupContentNoReactions(params)\n\t{\n\t\tconst page = (Number(params.page) > 0 ? Number(params.page) : 1);\n\t\tconst likeInstance = (!Type.isUndefined(params.rating) ? params.rating : null);\n\t\tconst data = params.data;\n\n\t\tif (!likeInstance)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\tif (page === 1)\n\t\t{\n\t\t\tlikeInstance.popupContent.innerHTML = '';\n\t\t\tlikeInstance.popupContent.appendChild(Dom.create('span', {\n\t\t\t\tprops: {\n\t\t\t\t\tclassName: 'bx-ilike-bottom_scroll',\n\t\t\t\t}\n\t\t\t}));\n\t\t}\n\n\t\tlikeInstance.popupContentPage += 1;\n\n\t\tdata.items.forEach((item) => {\n\t\t\tlet avatarNode = null;\n\n\t\t\tif (Type.isStringFilled(item.PHOTO_SRC))\n\t\t\t{\n\t\t\t\tavatarNode = Dom.create('img', {\n\t\t\t\t\tattrs: {\n\t\t\t\t\t\tsrc: encodeURI(item.PHOTO_SRC),\n\t\t\t\t\t},\n\t\t\t\t\tprops: {\n\t\t\t\t\t\tclassName: 'bx-ilike-popup-avatar-img',\n\t\t\t\t\t},\n\t\t\t\t});\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tavatarNode = Dom.create('img', {\n\t\t\t\t\tattrs: {\n\t\t\t\t\t\tsrc: '/bitrix/images/main/blank.gif',\n\t\t\t\t\t},\n\t\t\t\t\tprops: {\n\t\t\t\t\t\tclassName: 'bx-ilike-popup-avatar-img bx-ilike-popup-avatar-img-default',\n\t\t\t\t\t},\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tconst imgClassList = [\n\t\t\t\t'bx-ilike-popup-img',\n\t\t\t];\n\t\t\tif (Type.isStringFilled(item.USER_TYPE))\n\t\t\t{\n\t\t\t\timgClassList.push(`bx-ilike-popup-img-${item.USER_TYPE}`);\n\t\t\t}\n\n\t\t\tlikeInstance.popupContent.appendChild(\n\t\t\t\tDom.create('a', {\n\t\t\t\t\tattrs: {\n\t\t\t\t\t\thref: item.URL,\n\t\t\t\t\t\ttarget: '_blank',\n\t\t\t\t\t},\n\t\t\t\t\tprops: {\n\t\t\t\t\t\tclassName: imgClassList.join(' '),\n\t\t\t\t\t},\n\t\t\t\t\tchildren: [\n\t\t\t\t\t\tDom.create('span', {\n\t\t\t\t\t\t\tprops: {\n\t\t\t\t\t\t\t\tclassName: 'bx-ilike-popup-avatar-new',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tchildren: [\n\t\t\t\t\t\t\t\tavatarNode,\n\t\t\t\t\t\t\t\tDom.create('span', {\n\t\t\t\t\t\t\t\t\tprops: {\n\t\t\t\t\t\t\t\t\t\tclassName: 'bx-ilike-popup-avatar-status-icon',\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t}),\n\t\t\t\t\t\tDom.create('span', {\n\t\t\t\t\t\t\tprops: {\n\t\t\t\t\t\t\t\tclassName: 'bx-ilike-popup-name-new',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\thtml: item.FULL_NAME,\n\t\t\t\t\t\t}),\n\t\t\t\t\t],\n\t\t\t\t})\n\t\t\t);\n\t\t});\n\t}\n\n\tstatic afterClick(params)\n\t{\n\t\tconst likeId = (Type.isStringFilled(params.likeId) ? params.likeId : '');\n\n\t\tif (!Type.isStringFilled(likeId))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tthis.afterClickBlockShowPopup = true;\n\n\t\tthis.afterClickHandler = this.getAfterClickHandler(likeId);\n\n\t\tRatingLike.getInstance(likeId).box.addEventListener('mouseleave', this.afterClickHandler);\n\t}\n\n\tstatic getAfterClickHandler(likeId)\n\t{\n\t\treturn () => {\n\t\t\tthis.afterClickBlockShowPopup = false;\n\n\t\t\tRatingLike.getInstance(likeId).box.removeEventListener('mouseleave', this.afterClickHandler);\n\t\t};\n\t}\n\n\tstatic resultReactionClick(e)\n\t{\n\t\tconst likeId = e.currentTarget.getAttribute('data-like-id');\n\t\tlet reaction = e.currentTarget.getAttribute('data-reaction');\n\n\t\tif (!Type.isSet(reaction))\n\t\t{\n\t\t\treaction = '';\n\t\t}\n\n\t\tListPopup.onResultClick({\n\t\t\tlikeId: likeId,\n\t\t\tevent: e,\n\t\t\treaction: reaction,\n\t\t});\n\n\t\te.stopPropagation();\n\t}\n\n\tstatic resultReactionMouseEnter(e)\n\t{\n\t\tconst likeId = e.currentTarget.getAttribute('data-like-id');\n\t\tconst reaction = e.currentTarget.getAttribute('data-reaction');\n\n\t\tListPopup.onResultMouseEnter({\n\t\t\tlikeId: likeId,\n\t\t\tevent: e,\n\t\t\treaction: reaction,\n\t\t});\n\t}\n\n\tstatic resultReactionMouseLeave(e)\n\t{\n\t\tconst likeId = e.currentTarget.getAttribute('data-like-id');\n\t\tconst reaction = e.currentTarget.getAttribute('data-reaction');\n\n\t\tListPopup.onResultMouseLeave({\n\t\t\tlikeId: likeId,\n\t\t\treaction: reaction,\n\t\t});\n\t}\n\n\tstatic openMobileReactionsPage(params)\n\t{\n\t\tBXMobileApp.PageManager.loadPageBlank({\n\t\t\turl: `${Loc.getMessage('SITE_DIR')}mobile/like/result.php`,\n\t\t\ttitle: Loc.getMessage('RATING_LIKE_RESULTS'),\n\t\t\tbackdrop: {\n\t\t\t\tmediumPositionPercent: 65,\n\t\t\t},\n\t\t\tcache: true,\n\t\t\tdata: {\n\t\t\t\tentityTypeId: params.entityTypeId,\n\t\t\t\tentityId: params.entityId,\n\t\t\t}\n\t\t});\n\t}\n\n\tstatic onRatingLike(eventData)\n\t{\n\t\tRatingLike.repo.forEach((likeInstance, likeId) => {\n\t\t\tif (\n\t\t\t\tlikeInstance.entityTypeId !== eventData.entityTypeId\n\t\t\t\t&& Number(likeInstance.entityId) !== Number(eventData.entityId)\n\t\t\t)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet voteAction = (Type.isStringFilled(eventData.voteAction) ? eventData.voteAction.toUpperCase() : 'ADD');\n\t\t\tvoteAction = (voteAction === 'PLUS' ? 'ADD' : voteAction);\n\n\t\t\tif (\n\t\t\t\tNumber(eventData.userId) === Number(Loc.getMessage('USER_ID'))\n\t\t\t\t&& likeInstance.button\n\t\t\t)\n\t\t\t{\n\t\t\t\tif (voteAction === 'CANCEL')\n\t\t\t\t{\n\t\t\t\t\tlikeInstance.button.classList.remove('bx-you-like-button');\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tlikeInstance.button.classList.add('bx-you-like-button');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tRatingLike.Draw(likeId, {\n\t\t\t\tTYPE: voteAction,\n\t\t\t\tUSER_ID: eventData.userId,\n\t\t\t\tENTITY_TYPE_ID: eventData.entityTypeId,\n\t\t\t\tENTITY_ID: eventData.entityId,\n\t\t\t\tUSER_DATA: eventData.userData,\n\t\t\t\tREACTION: eventData.voteReaction,\n\t\t\t\tREACTION_OLD: eventData.voteReactionOld,\n\t\t\t\tTOTAL_POSITIVE_VOTES: eventData.itemsAll,\n\t\t\t});\n\t\t});\n\t}\n\n\tstatic onMobileCommentsGet()\n\t{\n\t\tconst ratingEmojiSelectorPopup = document.querySelector('.feed-post-emoji-popup-container');\n\t\tif (ratingEmojiSelectorPopup)\n\t\t{\n\t\t\tratingEmojiSelectorPopup.style.top = 0;\n\t\t\tratingEmojiSelectorPopup.style.left = 0;\n\t\t\tratingEmojiSelectorPopup.classList.remove('feed-post-emoji-popup-active');\n\t\t\tratingEmojiSelectorPopup.classList.remove('feed-post-emoji-popup-active-final');\n\t\t\tratingEmojiSelectorPopup.classList.remove('feed-post-emoji-popup-active-final-item');\n\t\t\tratingEmojiSelectorPopup.classList.add('feed-post-emoji-popup-invisible-final');\n\t\t\tratingEmojiSelectorPopup.classList.add('feed-post-emoji-popup-invisible-final-mobile');\n\t\t}\n\t}\n\n\tstatic getNode(node)\n\t{\n\t\tif (Type.isDomNode(node))\n\t\t{\n\t\t\treturn node;\n\t\t}\n\t\telse if (Type.isStringFilled(node))\n\t\t{\n\t\t\treturn document.getElementById(node);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t}\n}\n","import { Type, Runtime } from 'main.core';\nimport { EventEmitter, BaseEvent } from 'main.core.events';\n\nimport { RatingRender } from './render';\nimport { ListPopup } from './listpopup';\n\nexport class RatingManager\n{\n\tstatic mobile = false;\n\tstatic initialized = false;\n\tstatic displayHeight = 0;\n\tstatic startScrollTop = 0;\n\tstatic entityList = [];\n\tstatic ratingNodeList = new Map();\n\tstatic delayedList = new Map();\n\n\tstatic init(params)\n\t{\n\t\tif (!Type.isPlainObject(params))\n\t\t{\n\t\t\tparams = {};\n\t\t}\n\n\t\tif (this.initialized)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tthis.mobile = (!Type.isUndefined(params.mobile) && !!params.mobile);\n\n\t\tthis.initialized = true;\n\n\t\tthis.setDisplayHeight();\n\n\t\tif (!this.mobile)\n\t\t{\n\t\t\twindow.addEventListener('scroll', Runtime.throttle(() => {\n\t\t\t\tthis.getInViewScope();\n\t\t\t}, 80), { passive: true });\n\n\t\t\twindow.addEventListener('resize', this.setDisplayHeight.bind(this));\n\t\t}\n\n\t\tEventEmitter.subscribe('onBeforeMobileLivefeedRefresh', RatingRender.reactionsPopupMobileHide)\n\t\tEventEmitter.subscribe('BX.MobileLF:onCommentsGet', RatingRender.onMobileCommentsGet)\n\n\t\tif (this.mobile)\n\t\t{\n\t\t\t// new one\n\t\t\tBXMobileApp.addCustomEvent('onRatingLike', RatingRender.onRatingLike);\n\t\t}\n\n\t\tif (this.mobile)\n\t\t{\n\t\t\tBXMobileApp.addCustomEvent('onPull-main', (data) => {\n\t\t\t\tif (data.command == 'rating_vote')\n\t\t\t\t{\n\t\t\t\t\tRatingLike.LiveUpdate(data.params);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\telse\n\t\t{\n\t\t\tEventEmitter.subscribe('onPullEvent-main', (event: BaseEvent) => {\n\t\t\t\tconst [ command, params ] = event.getCompatData();\n\n\t\t\t\tif (command === 'rating_vote')\n\t\t\t\t{\n\t\t\t\t\tRatingLike.LiveUpdate(params);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif (\n\t\t\t\t!Type.isUndefined(window.BX.SidePanel)\n\t\t\t\t&& BX.SidePanel.Instance.getTopSlider()\n\t\t\t)\n\t\t\t{\n\t\t\t\tEventEmitter.subscribe(\n\t\t\t\t\tBX.SidePanel.Instance.getTopSlider().getWindow(),\n\t\t\t\t\t'SidePanel.Slider:onCloseComplete',\n\t\t\t\t\tListPopup.removeOnCloseHandler\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tstatic setDisplayHeight()\n\t{\n\t\tthis.displayHeight = document.documentElement.clientHeight;\n\t}\n\n\tstatic getInViewScope()\n\t{\n\t\tlet ratingNode = null;\n\t\tthis.delayedList.forEach((value, key) => {\n\n\t\t\tratingNode = BX(this.getNode(key));\n\n\t\t\tif (!ratingNode)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (this.isNodeVisibleOnScreen(ratingNode))\n\t\t\t{\n\t\t\t\tthis.fireAnimation(key);\n\t\t\t}\n\t\t});\n\t}\n\n\tstatic addNode(entityId, node)\n\t{\n\t\tif (\n\t\t\t!Type.isDomNode(node)\n//\t\t\t|| !Type.isUndefined(this.ratingNodeList.get(entityId))\n\t\t)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tthis.ratingNodeList.set(entityId, node);\n\t}\n\n\n\tstatic getNode(entityId)\n\t{\n\t\tconst node = this.ratingNodeList.get(entityId);\n\t\treturn (!Type.isUndefined(node) ? node : false);\n\t}\n\n\tstatic isNodeVisibleOnScreen(node)\n\t{\n\t\tconst coords = node.getBoundingClientRect();\n\t\tconst visibleAreaTop = Number(this.displayHeight / 10);\n\t\tconst visibleAreaBottom = Number(this.displayHeight * 9 / 10);\n\n\t\treturn (\n\t\t\t(\n\t\t\t\t(\n\t\t\t\t\tcoords.top > 0\n\t\t\t\t\t&& coords.top < visibleAreaBottom\n\t\t\t\t)\n\t\t\t\t|| (\n\t\t\t\t\tcoords.bottom > visibleAreaTop\n\t\t\t\t\t&& coords.bottom < this.displayHeight\n\t\t\t\t)\n\t\t\t)\n\t\t\t&& (\n\t\t\t\tthis.mobile\n\t\t\t\t|| !(\n\t\t\t\t\t(\n\t\t\t\t\t\tcoords.top < visibleAreaTop\n\t\t\t\t\t\t&& coords.bottom < visibleAreaTop\n\t\t\t\t)\n\t\t\t\t|| (\n\t\t\t\t\tcoords.top > visibleAreaBottom\n\t\t\t\t\t&& coords.bottom > visibleAreaBottom\n\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t}\n\n\tstatic fireAnimation(key)\n\t{\n\t\tthis.delayedList.delete(key);\n\t}\n\n\tstatic addEntity(entityId, ratingObject)\n\t{\n\t\tif (\n\t\t\t!this.entityList.includes(entityId)\n\t\t\t&& ratingObject.topPanelContainer\n\t\t\t)\n\t\t\t{\n\t\t\t\tthis.entityList.push(entityId);\n\t\t\t\tthis.addNode(entityId, ratingObject.topPanelContainer);\n\t\t\t}\n\t}\n\n\tstatic live(params)\n\t{\n\t\tif (\n\t\t\tType.isUndefined(params.TYPE)\n\t\t\t|| params.TYPE !== 'ADD'\n\t\t\t|| !Type.isStringFilled(params.ENTITY_TYPE_ID)\n\t\t\t|| Type.isUndefined(params.ENTITY_ID)\n\t\t\t|| Number(params.ENTITY_ID) <= 0\n\t\t)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tconst key = `${params.ENTITY_TYPE_ID}_${params.ENTITY_ID}`;\n\t\tif (!this.checkEntity(key))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tconst ratingNode = this.getNode(key);\n\t\tif (!ratingNode)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\tif (this.isNodeVisibleOnScreen(ratingNode))\n\t\t{\n\t\t\tthis.fireAnimation(key);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.addDelayed(params)\n\t\t}\n\t}\n\n\tstatic checkEntity(entityId)\n\t{\n\t\treturn this.entityList.includes(entityId);\n\t}\n\n\tstatic addDelayed(liveParams)\n\t{\n\t\tif (\n\t\t\t!Type.isStringFilled(liveParams.ENTITY_TYPE_ID)\n\t\t\t|| Type.isUndefined(liveParams.ENTITY_ID)\n\t\t\t|| Number(liveParams.ENTITY_ID) <= 0\n\t\t)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tconst key = `${liveParams.ENTITY_TYPE_ID}_${liveParams.ENTITY_ID}`;\n\n\t\tlet delayedListItem = this.delayedList.get(key);\n\t\tif (Type.isUndefined(delayedListItem))\n\t\t{\n\t\t\tdelayedListItem = [];\n\t\t}\n\n\t\tdelayedListItem.push(liveParams);\n\t\tthis.delayedList.set(key, delayedListItem);\n\t}\n}\n","import { Type, Dom, Loc, ajax } from 'main.core';\n\nimport { RatingManager } from './manager';\nimport { RatingRender } from './render';\nimport { ListPopup } from './listpopup';\n\nimport './css/reaction.css';\nimport './css/mobile.css';\n\ntype Params = {\n\tlikeId: string,\n\tkeySigned: string,\n\tentityTypeId: string,\n\tentityId: number,\n\tavailable: number,\n\tuserId?: number,\n\tlocalize?: Object,\n\ttemplate?: string,\n\tpathToUserProfile?: string,\n\tmobile?: boolean | 'true' | 'false'\n}\n\nexport class RatingLike\n{\n\tstatic repo = new Map();\n\tstatic lastVoteRepo = new Map();\n\tstatic lastReactionRepo = new Map();\n\tstatic additionalParams = new Map();\n\n\tconstructor(params: Params)\n\t{\n\t\tthis.likeId = Type.isStringFilled(params.likeId) ? params.likeId : '';\n\t\tthis.keySigned = Type.isStringFilled(params.keySigned) ? params.keySigned : '';\n\t\tthis.entityTypeId = Type.isStringFilled(params.entityTypeId) ? params.entityTypeId : '';\n\t\tthis.entityId = !Type.isUndefined(params.entityId) ? Number(params.entityId) : 0;\n\t\tthis.available = Type.isStringFilled(params.available) ? params.available === 'Y' : false;\n\t\tthis.userId = !Type.isUndefined(params.userId) ? Number(params.userId) : 0;\n\t\tthis.localize = Type.isPlainObject(params.localize) ? params.localize : {};\n\t\tthis.template = Type.isStringFilled(params.template) ? params.template : '';\n\t\tthis.pathToUserProfile = Type.isStringFilled(params.pathToUserProfile) ? params.pathToUserProfile : '';\n\n\t\tconst key = `${this.entityTypeId}_${this.entityId}`;\n\n\t\tthis.enabled = true;\n\n\t\tthis.box = document.getElementById(`bx-ilike-button-${this.likeId}`);\n\t\tif (this.box === null)\n\t\t{\n\t\t\tthis.enabled = false;\n\t\t\treturn false;\n\t\t}\n\n\t\tthis.box.setAttribute('data-rating-vote-id', this.likeId);\n\n\t\tif (this.keySigned === '')\n\t\t{\n\t\t\tconst keySigned = this.box.getAttribute('data-vote-key-signed');\n\t\t\tthis.keySigned = keySigned ? keySigned : '';\n\t\t}\n\n\t\tthis.button = this.box.querySelector('.bx-ilike-left-wrap');\n\t\tthis.buttonText = this.button.querySelector('.bx-ilike-text');\n\t\tthis.count = this.box.querySelector('span.bx-ilike-right-wrap');\n\t\tif (!this.count)\n\t\t{\n\t\t\tthis.count = document.getElementById(`bx-ilike-count-${this.likeId}`);\n\t\t}\n\t\tthis.countText = this.count.querySelector('.bx-ilike-right');\n\n\t\tthis.topPanelContainer = document.getElementById(`feed-post-emoji-top-panel-container-${this.likeId}`);\n\t\tthis.topPanel = document.getElementById(`feed-post-emoji-top-panel-${this.likeId}`);\n\t\tthis.topUsersText = document.getElementById(`bx-ilike-top-users-${this.likeId}`);\n\t\tthis.topUsersDataNode = document.getElementById(`bx-ilike-top-users-data-${this.likeId}`);\n\t\tthis.userReactionNode = document.getElementById(`bx-ilike-user-reaction-${this.likeId}`);\n\t\tthis.reactionsNode = document.getElementById(`feed-post-emoji-icons-${this.likeId}`);\n\n\t\tthis.popup = null;\n\t\tthis.popupId = null;\n\t\tthis.popupTimeoutIdShow = null;\n\t\tthis.popupTimeoutIdList = null;\n\n\t\tthis.popupContent = document.getElementById(`bx-ilike-popup-cont-${this.likeId}`)\n\t\t\t.querySelector('span.bx-ilike-popup')\n\t\t;\n\t\tthis.popupContentPage = 1;\n\t\tthis.popupTimeout = false;\n\t\tthis.likeTimeout = false;\n\t\tthis.mouseOverHandler = null;\n\t\tthis.version = (Type.isDomNode(this.topPanel) ? 2 : 1);\n\t\tthis.mouseInShowPopupNode = {};\n\t\tthis.listXHR = null;\n\n\t\tif (\n\t\t\tthis.template === 'light'\n\t\t\t&& Type.isDomNode(this.reactionsNode)\n\t\t)\n\t\t{\n\t\t\tconst container = this.reactionsNode.querySelector('.feed-post-emoji-icon-container');\n\t\t\tif (container)\n\t\t\t{\n\t\t\t\tlet reactionsData = container.getAttribute('data-reactions-data');\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\treactionsData = JSON.parse(reactionsData);\n\n\t\t\t\t\tconst elementsNew = [];\n\t\t\t\t\tObject.entries(reactionsData).forEach(([reaction, count]) => {\n\t\t\t\t\t\telementsNew.push({\n\t\t\t\t\t\t\treaction: reaction,\n\t\t\t\t\t\t\tcount: count,\n\t\t\t\t\t\t\tanimate: false,\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\n\t\t\t\t\tRatingRender.drawReactions({\n\t\t\t\t\t\tlikeId: this.likeId,\n\t\t\t\t\t\tcontainer: container,\n\t\t\t\t\t\tdata: elementsNew,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tcatch (e)\n\t\t\t\t{\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (!Type.isUndefined(RatingLike.lastVoteRepo.get(key)))\n\t\t{\n\t\t\tthis.lastVote = RatingLike.lastVoteRepo.get(key);\n\n\t\t\tconst ratingNode = (this.template === 'standart' ? this.button : this.count);\n\t\t\tif (this.lastVote === 'plus')\n\t\t\t{\n\t\t\t\tratingNode.classList.add('bx-you-like');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tratingNode.classList.remove('bx-you-like');\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.lastVote = (\n\t\t\t\t(this.template === 'standart' ? this.button : this.count).classList.contains('bx-you-like')\n\t\t\t\t\t? 'plus'\n\t\t\t\t\t: 'cancel'\n\t\t\t);\n\t\t\tRatingLike.lastVoteRepo.set(key, this.lastVote);\n\t\t}\n\n\t\tif (!Type.isUndefined(RatingLike.lastReactionRepo.get(key)))\n\t\t{\n\t\t\tthis.lastReaction = RatingLike.lastReactionRepo.get(key);\n\t\t\tthis.count.setAttribute('data-myreaction', this.lastReaction);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tconst lastReaction = this.count.getAttribute('data-myreaction');\n\t\t\tthis.lastReaction = (Type.isStringFilled(lastReaction) ? lastReaction : 'like');\n\t\t\tRatingLike.lastReactionRepo.set(key, this.lastReaction);\n\t\t}\n\n\t\tif (this.topPanelContainer)\n\t\t{\n\t\t\tRatingManager.addEntity(key, this);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\tstatic setInstance(likeId: string, likeInstance)\n\t{\n\t\tthis.repo.set(likeId, likeInstance);\n\t\twindow.BXRL[likeId] = likeInstance;\n\t}\n\n\tstatic getInstance(likeId: string)\n\t{\n\t\treturn this.repo.get(likeId);\n\t}\n\n\tstatic ClickVote(e, likeId, userReaction, forceAdd)\n\t{\n\t\tif (Type.isUndefined(userReaction))\n\t\t{\n\t\t\tuserReaction = 'like';\n\t\t}\n\n\t\tconst likeInstance = this.getInstance(likeId);\n\t\tconst container = (likeInstance.template === 'standart' ? e.target : likeInstance.count);\n\n\t\tif (\n\t\t\tlikeInstance.version === 2\n\t\t\t&& likeInstance.userReactionNode\n\t\t)\n\t\t{\n\t\t\tRatingRender.hideReactionsPopup({\n\t\t\t\tlikeId: likeId,\n\t\t\t});\n\t\t\tRatingRender.blockReactionsPopup();\n\t\t\tdocument.removeEventListener('mousemove', RatingRender.reactionsPopupMouseOutHandler);\n\t\t}\n\n\t\tclearTimeout(likeInstance.likeTimeout);\n\n\t\tconst active = container.classList.contains('bx-you-like');\n\n\t\tforceAdd = !!forceAdd;\n\n\t\tlet change = false;\n\t\tlet userReactionOld = false;\n\n\t\tif (active && !forceAdd)\n\t\t{\n\t\t\tuserReaction = (\n\t\t\t\tlikeInstance.version === 2\n\t\t\t\t\t? RatingRender.getUserReaction({\n\t\t\t\t\t\tuserReactionNode: likeInstance.userReactionNode\n\t\t\t\t\t})\n\t\t\t\t\t: false\n\t\t\t);\n\n\t\t\tlikeInstance.buttonText.innerHTML = likeInstance.localize['LIKE_N'];\n\t\t\tlikeInstance.countText.innerHTML = Number(likeInstance.countText.innerHTML)-1;\n\n\t\t\tcontainer.classList.remove('bx-you-like');\n\t\t\tlikeInstance.button.classList.remove('bx-you-like-button');\n\n\t\t\tif (userReaction)\n\t\t\t{\n\t\t\t\tlikeInstance.button.classList.remove(`bx-you-like-button-${userReaction}`);\n\t\t\t}\n\n\t\t\tlikeInstance.likeTimeout = setTimeout(() => {\n\t\t\t\tif (likeInstance.lastVote != 'cancel')\n\t\t\t\t{\n\t\t\t\t\tthis.Vote(likeId, 'cancel', userReaction);\n\t\t\t\t}\n\t\t\t}, 1000);\n\t\t}\n\t\telse if (active && forceAdd)\n\t\t{\n\t\t\tchange = true;\n\t\t\tuserReactionOld = (\n\t\t\t\tlikeInstance.version === 2\n\t\t\t\t\t? RatingRender.getUserReaction({ userReactionNode: likeInstance.userReactionNode })\n\t\t\t\t\t: false\n\t\t\t);\n\n\t\t\tif (userReaction != userReactionOld)\n\t\t\t{\n\t\t\t\tif (userReactionOld)\n\t\t\t\t{\n\t\t\t\t\tlikeInstance.button.classList.remove(`bx-you-like-button-${userReactionOld}`);\n\t\t\t\t}\n\t\t\t\tlikeInstance.button.classList.add(`bx-you-like-button-${userReaction}`);\n\n\t\t\t\tlikeInstance.likeTimeout = setTimeout(() => {\n\t\t\t\t\tthis.Vote(likeId, 'change', userReaction, userReactionOld);\n\t\t\t\t}, 1000);\n\t\t\t}\n\t\t}\n\t\telse if (!active)\n\t\t{\n\t\t\tlikeInstance.buttonText.innerHTML = likeInstance.localize['LIKE_Y'];\n\t\t\tlikeInstance.countText.innerHTML = Number(likeInstance.countText.innerHTML) + 1;\n\t\t\tcontainer.classList.add('bx-you-like');\n\n\t\t\tlikeInstance.button.classList.add('bx-you-like-button');\n\t\t\tlikeInstance.button.classList.add(`bx-you-like-button-${userReaction}`);\n\n\t\t\tlikeInstance.likeTimeout = setTimeout(() => {\n\t\t\t\tif (likeInstance.lastVote !== 'plus')\n\t\t\t\t{\n\t\t\t\t\tthis.Vote(likeId, 'plus', userReaction);\n\t\t\t\t}\n\t\t\t\telse if (userReaction !== likeInstance.lastReaction) // http://jabber.bx/view.php?id=99339\n\t\t\t\t{\n\t\t\t\t\tthis.Vote(likeId, 'change', userReaction, likeInstance.lastReaction);\n\t\t\t\t}\n\t\t\t}, 1000);\n\t\t}\n\n\t\tif (likeInstance.version === 2)\n\t\t{\n\t\t\tif (change)\n\t\t\t{\n\t\t\t\tRatingRender.setReaction({\n\t\t\t\t\tlikeId: likeId,\n\t\t\t\t\trating: likeInstance,\n\t\t\t\t\taction: 'change',\n\t\t\t\t\tuserReaction: userReaction,\n\t\t\t\t\tuserReactionOld: userReactionOld,\n\t\t\t\t\ttotalCount: Number(likeInstance.countText.innerHTML),\n\t\t\t\t});\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tRatingRender.setReaction({\n\t\t\t\t\tlikeId: likeId,\n\t\t\t\t\trating: likeInstance,\n\t\t\t\t\taction: (active ? 'cancel' : 'add'),\n\t\t\t\t\tuserReaction: userReaction,\n\t\t\t\t\ttotalCount: Number(likeInstance.countText.innerHTML),\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tif (\n\t\t\t!change\n\t\t\t&& likeInstance.version === 2\n\t\t)\n\t\t{\n\t\t\tconst dataUsers = (\n\t\t\t\tlikeInstance.topUsersDataNode\n\t\t\t\t\t? JSON.parse(likeInstance.topUsersDataNode.getAttribute('data-users'))\n\t\t\t\t\t: false\n\t\t\t);\n\n\t\t\tif (dataUsers)\n\t\t\t{\n\t\t\t\tdataUsers.TOP = Object.values(dataUsers.TOP);\n\n\t\t\t\tlikeInstance.topUsersText.innerHTML = RatingRender.getTopUsersText({\n\t\t\t\t\tyou: !active,\n\t\t\t\t\ttop: dataUsers.TOP,\n\t\t\t\t\tmore: dataUsers.MORE,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tif (\n\t\t\tlikeInstance.template === 'light'\n\t\t\t&& !likeInstance.userReactionNode\n\t\t)\n\t\t{\n\t\t\tconst cont = likeInstance.box;\n\t\t\tconst likeNode = cont.cloneNode(true);\n\n\t\t\tlikeNode.id = 'like_anim'; // to not dublicate original id\n\n\t\t\tlet type = 'normal';\n\t\t\tif (cont.closest('.feed-com-informers-bottom'))\n\t\t\t{\n\t\t\t\ttype = 'comment';\n\t\t\t}\n\t\t\telse if (cont.closest('.feed-post-informers'))\n\t\t\t{\n\t\t\t\ttype = 'post';\n\t\t\t}\n\n\t\t\tlikeNode.classList.remove('bx-ilike-button-hover')\n\t\t\tlikeNode.classList.add('bx-like-anim')\n\n\t\t\tDom.adjust(cont.parentNode, { style: { position: 'relative' } });\n\n\t\t\tDom.adjust(likeNode, {\n\t\t\t\tstyle: {\n\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\twhiteSpace: 'nowrap',\n\t\t\t\t\ttop: (type === 'post' ? '1px' : (type === 'comment' ? '0' : '')),\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tDom.adjust(cont, { style: { visibility: 'hidden' } });\n\t\t\tDom.prepend(likeNode, cont.parentNode);\n\n\t\t\tnew BX.easing({\n\t\t\t\tduration: 140,\n\t\t\t\tstart: { scale: 100 },\n\t\t\t\tfinish: { scale: (type === 'comment' ? 110 : 115) },\n\t\t\t\ttransition : BX.easing.transitions.quad,\n\t\t\t\tstep: (state) => {\n\t\t\t\t\tlikeNode.style.transform = `scale(${state.scale / 100})`;\n\t\t\t\t},\n\t\t\t\tcomplete: () => {\n\t\t\t\t\tconst likeThumbNode = Dom.create('SPAN', {\n\t\t\t\t\t\tprops: {\n\t\t\t\t\t\t\tclassName: (active ? 'bx-ilike-icon' : 'bx-ilike-icon bx-ilike-icon-orange'),\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\n\t\t\t\t\tDom.adjust(likeThumbNode, {\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\twhiteSpace: 'nowrap',\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\n\t\t\t\t\tDom.prepend(likeThumbNode, cont.parentNode);\n\n\t\t\t\t\tnew BX.easing({\n\t\t\t\t\t\tduration: 140,\n\t\t\t\t\t\tstart: { scale: (type == 'comment' ? 110 : 115) },\n\t\t\t\t\t\tfinish: { scale: 100 },\n\t\t\t\t\t\ttransition : BX.easing.transitions.quad,\n\t\t\t\t\t\tstep: (state) => {\n\t\t\t\t\t\t\tlikeNode.style.transform = `scale(${state.scale / 100})`;\n\t\t\t\t\t\t},\n\t\t\t\t\t\tcomplete: () => {}\n\t\t\t\t\t}).animate();\n\n\t\t\t\t\tconst propsStart = {\n\t\t\t\t\t\topacity: 100,\n\t\t\t\t\t\tscale: (type === 'comment' ? 110 : 115),\n\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t};\n\t\t\t\t\tconst propsFinish = {\n\t\t\t\t\t\topacity: 0,\n\t\t\t\t\t\tscale: 200,\n\t\t\t\t\t\ttop: (type === 'comment' ? -3 : -2),\n\t\t\t\t\t};\n\n\t\t\t\t\tif (type !== 'comment')\n\t\t\t\t\t{\n\t\t\t\t\t\tpropsStart.left = -5;\n\t\t\t\t\t\tpropsFinish.left = -13;\n\t\t\t\t\t}\n\n\t\t\t\t\tnew BX.easing({\n\t\t\t\t\t\tduration: 200,\n\t\t\t\t\t\tstart: propsStart,\n\t\t\t\t\t\tfinish: propsFinish,\n\t\t\t\t\t\ttransition : BX.easing.transitions.linear,\n\t\t\t\t\t\tstep: (state) => {\n\t\t\t\t\t\t\tlikeThumbNode.style.transform = `scale(${state.scale / 100})`;\n\t\t\t\t\t\t\tlikeThumbNode.style.opacity = state.opacity / 100;\n\t\t\t\t\t\t\tif (type !== 'comment')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlikeThumbNode.style.left = `${state.left}px`;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tlikeThumbNode.style.top = `${state.top}px`;\n\t\t\t\t\t\t},\n\t\t\t\t\t\tcomplete: () => {\n\t\t\t\t\t\t\tlikeNode.parentNode.removeChild(likeNode);\n\t\t\t\t\t\t\tlikeThumbNode.parentNode.removeChild(likeThumbNode);\n\n\t\t\t\t\t\t\tDom.adjust(cont.parentNode, { style: { position: 'static' } });\n\t\t\t\t\t\t\tDom.adjust(cont, { style: { visibility: 'visible' } });\n\t\t\t\t\t\t}\n\t\t\t\t\t}).animate();\n\n\t\t\t\t}\n\t\t\t}).animate();\n\t\t}\n\n\t\tlikeInstance.box.classList.remove('bx-ilike-button-hover');\n\t}\n\n\tstatic Draw(likeId, params)\n\t{\n\t\tconst likeInstance = this.getInstance(likeId);\n\t\tlikeInstance.countText.innerHTML = Number(params.TOTAL_POSITIVE_VOTES);\n\n\t\tif (\n\t\t\t!Type.isUndefined(params.TYPE)\n\t\t\t&& !Type.isUndefined(params.USER_ID)\n\t\t\t&& Number(params.USER_ID) > 0\n\t\t\t&& !Type.isUndefined(params.USER_DATA)\n\t\t\t&& !Type.isUndefined(params.USER_DATA.WEIGHT)\n\t\t)\n\t\t{\n\t\t\tconst userWeight = parseFloat(params.USER_DATA.WEIGHT);\n\n\t\t\tconst usersData = (\n\t\t\t\tlikeInstance.topUsersDataNode\n\t\t\t\t\t? JSON.parse(likeInstance.topUsersDataNode.getAttribute('data-users'))\n\t\t\t\t\t: false\n\t\t\t);\n\n\t\t\tif (\n\t\t\t\tparams.TYPE != 'CHANGE'\n\t\t\t\t&& Type.isPlainObject(usersData)\n\t\t\t)\n\t\t\t{\n\t\t\t\tusersData.TOP = Object.values(usersData.TOP);\n\t\t\t\tlet recalcNeeded = (usersData.TOP.length < 2);\n\n\t\t\t\tObject.values(usersData.TOP).forEach((item) => {\n\t\t\t\t\tif (recalcNeeded)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\tparams.TYPE === 'ADD'\n\t\t\t\t\t\t\t&& userWeight > item.WEIGHT\n\t\t\t\t\t\t)\n\t\t\t\t\t\t|| (\n\t\t\t\t\t\t\tparams.TYPE === 'CANCEL'\n\t\t\t\t\t\t\t&& params.USER_ID === item.ID\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t\t{\n\t\t\t\t\t\trecalcNeeded = true;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\n\t\t\t\tif (recalcNeeded)\n\t\t\t\t{\n\t\t\t\t\tif (\n\t\t\t\t\t\tparams.TYPE === 'ADD'\n\t\t\t\t\t\t&& Number(params.USER_ID) !== Number(Loc.getMessage('USER_ID'))\n\t\t\t\t\t)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (!usersData.TOP.find((a) => {\n\t\t\t\t\t\t\treturn Number(a.ID) === Number(params.USER_ID)\n\t\t\t\t\t\t}))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tusersData.TOP.push({\n\t\t\t\t\t\t\t\tID: Number(params.USER_ID),\n\t\t\t\t\t\t\t\tNAME_FORMATTED: params.USER_DATA.NAME_FORMATTED,\n\t\t\t\t\t\t\t\tWEIGHT: parseFloat(params.USER_DATA.WEIGHT),\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (params.TYPE === 'CANCEL')\n\t\t\t\t\t{\n\t\t\t\t\t\tusersData.TOP = usersData.TOP.filter((a) => {\n\t\t\t\t\t\t\treturn Number(a.ID) !== Number(params.USER_ID);\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\n\t\t\t\t\tusersData.TOP.sort((a, b) => {\n\t\t\t\t\t\tif (parseFloat(a.WEIGHT) === parseFloat(b.WEIGHT))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn 0;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn (parseFloat(a.WEIGHT) > parseFloat(b.WEIGHT)) ? -1 : 1;\n\t\t\t\t\t});\n\n\t\t\t\t\tif (\n\t\t\t\t\t\tusersData.TOP.length > 2\n\t\t\t\t\t\t&& params.TYPE === 'ADD'\n\t\t\t\t\t)\n\t\t\t\t\t{\n\t\t\t\t\t\tusersData.TOP.pop();\n\t\t\t\t\t\tusersData.MORE++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (params.TYPE === 'ADD')\n\t\t\t\t\t{\n\t\t\t\t\t\tusersData.MORE = (\n\t\t\t\t\t\t\t!Type.isUndefined(usersData.MORE)\n\t\t\t\t\t\t\t\t? Number(usersData.MORE) + 1\n\t\t\t\t\t\t\t\t: 1\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\telse if (params.TYPE === 'CANCEL')\n\t\t\t\t\t{\n\t\t\t\t\t\tusersData.MORE = (\n\t\t\t\t\t\t\t!Type.isUndefined(usersData.MORE)\n\t\t\t\t\t\t\t&& Number(usersData.MORE) > 0\n\t\t\t\t\t\t\t\t? Number(usersData.MORE) - 1\n\t\t\t\t\t\t\t\t: 0\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tlikeInstance.topUsersDataNode.setAttribute('data-users', JSON.stringify(usersData));\n\n\t\t\t\tif (likeInstance.topUsersText)\n\t\t\t\t{\n\t\t\t\t\tlikeInstance.topUsersText.innerHTML = RatingRender.getTopUsersText({\n\t\t\t\t\t\tyou: (\n\t\t\t\t\t\t\tNumber(params.USER_ID) === Number(Loc.getMessage('USER_ID'))\n\t\t\t\t\t\t\t\t? params.TYPE !== 'CANCEL'\n\t\t\t\t\t\t\t\t: likeInstance.count.classList.contains('bx-you-like')\n\t\t\t\t\t\t),\n\t\t\t\t\t\ttop: usersData.TOP,\n\t\t\t\t\t\tmore: usersData.MORE,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tType.isStringFilled(params.REACTION)\n\t\t\t\t&& Type.isStringFilled(params.REACTION_OLD)\n\t\t\t\t&& params.TYPE === 'CHANGE'\n\t\t\t)\n\t\t\t{\n\t\t\t\tRatingRender.setReaction({\n\t\t\t\t\tlikeId: likeId,\n\t\t\t\t\trating: likeInstance,\n\t\t\t\t\taction: 'change',\n\t\t\t\t\tuserReaction: params.REACTION,\n\t\t\t\t\tuserReactionOld: params.REACTION_OLD,\n\t\t\t\t\ttotalCount: params.TOTAL_POSITIVE_VOTES,\n\t\t\t\t\tuserId: params.USER_ID,\n\t\t\t\t});\n\t\t\t}\n\t\t\telse if (\n\t\t\t\tType.isStringFilled(params.REACTION)\n\t\t\t\t&& [ 'ADD', 'CANCEL' ].includes(params.TYPE)\n\t\t\t)\n\t\t\t{\n\t\t\t\tRatingRender.setReaction({\n\t\t\t\t\tlikeId: likeId,\n\t\t\t\t\trating: likeInstance,\n\t\t\t\t\tuserReaction: params.REACTION,\n\t\t\t\t\taction: (params.TYPE === 'ADD' ? 'add' : 'cancel'),\n\t\t\t\t\ttotalCount: params.TOTAL_POSITIVE_VOTES,\n\t\t\t\t\tuserId: params.USER_ID,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tif (likeInstance.topPanel)\n\t\t{\n\t\t\tlikeInstance.topPanel.setAttribute('data-popup', 'N');\n\t\t}\n\n\t\tif (!likeInstance.userReactionNode)\n\t\t{\n\t\t\tlikeInstance.count.insertBefore(\n\t\t\t\tDom.create('span', {\n\t\t\t\t\tprops: {\n\t\t\t\t\t\tclassName: 'bx-ilike-plus-one',\n\t\t\t\t\t},\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\twidth: `${(element.countText.clientWidth - 8)}px`,\n\t\t\t\t\t\theight: `${(element.countText.clientHeight - 8)}px`,\n\t\t\t\t\t},\n\t\t\t\t\thtml: (params.TYPE === 'ADD'? '+1': '-1'),\n\t\t\t\t}),\n\t\t\t\telement.count.firstChild\n\t\t\t);\n\t\t}\n\n\t\tif (likeInstance.popup)\n\t\t{\n\t\t\tlikeInstance.popup.close();\n\t\t\tlikeInstance.popupContentPage = 1;\n\t\t}\n\t}\n\n\tstatic Vote(likeId, voteAction, voteReaction, voteReactionOld)\n\t{\n\t\tif (!Type.isStringFilled(voteReaction))\n\t\t{\n\t\t\tvoteReaction = 'like';\n\t\t}\n\n\t\tconst ajaxInstance = (RatingManager.mobile ? new MobileAjaxWrapper : ajax);\n\t\tconst likeInstance = this.getInstance(likeId);\n\n\t\tconst successCallback = (response) => {\n\n\t\t\tconst data = response.data;\n\n\t\t\tlikeInstance.lastVote = data.action;\n\t\t\tlikeInstance.lastReaction = voteReaction;\n\n\t\t\tconst key = `${likeInstance.entityTypeId}_${likeInstance.entityId}`;\n\n\t\t\tthis.lastVoteRepo.set(key, data.action);\n\t\t\tthis.lastReactionRepo.set(key, data.voteReaction);\n\n\t\t\tlikeInstance.countText.innerHTML = data.items_all;\n\t\t\tlikeInstance.popupContentPage = 1;\n\t\t\tlikeInstance.popupContent.innerHTML = '';\n\t\t\tlikeInstance.popupContent.appendChild(Dom.create('span', {\n\t\t\t\tprops: {\n\t\t\t\t\tclassName: 'bx-ilike-wait',\n\t\t\t\t},\n\t\t\t}));\n\n\t\t\tif (likeInstance.topPanel)\n\t\t\t{\n\t\t\t\tlikeInstance.topPanel.setAttribute('data-popup', 'N');\n\t\t\t}\n\n\t\t\tListPopup.AdjustWindow(likeId);\n\n\t\t\tconst popup = document.getElementById(`ilike-popup-${likeId}`)\n\t\t\tif (\n\t\t\t\tpopup\n\t\t\t\t&& popup.style.display === 'block'\n\t\t\t)\n\t\t\t{\n\t\t\t\tListPopup.List(likeId, null, '', true);\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tlikeInstance.version >= 2\n\t\t\t\t&& RatingManager.mobile\n\t\t\t)\n\t\t\t{\n\t\t\t\tBXMobileApp.onCustomEvent('onRatingLike', {\n\t\t\t\t\taction: data.action,\n\t\t\t\t\tratingId: likeId,\n\t\t\t\t\tentityTypeId : likeInstance.entityTypeId,\n\t\t\t\t\tentityId: likeInstance.entityId,\n\t\t\t\t\tvoteAction: voteAction,\n\t\t\t\t\tvoteReaction: voteReaction,\n\t\t\t\t\tvoteReactionOld: voteReactionOld,\n\t\t\t\t\tuserId: Loc.getMessage('USER_ID'),\n\t\t\t\t\tuserData: (!Type.isUndefined(data.user_data) ? data.user_data : null),\n\t\t\t\t\titemsAll: data.items_all,\n\t\t\t\t}, true);\n\t\t\t}\n\t\t};\n\n\t\tconst failureCallback = () => {\n\n\t\t\tconst dataUsers = ((likeInstance.topUsersDataNode)\n\t\t\t\t? JSON.parse(likeInstance.topUsersDataNode.getAttribute('data-users'))\n\t\t\t\t: false\n\t\t\t);\n\n\t\t\tif (likeInstance.version == 2)\n\t\t\t{\n\t\t\t\tif (voteAction === 'change')\n\t\t\t\t{\n\t\t\t\t\tRatingRender.setReaction({\n\t\t\t\t\t\tlikeId: likeId,\n\t\t\t\t\t\trating: likeInstance,\n\t\t\t\t\t\taction: voteAction,\n\t\t\t\t\t\tuserReaction: voteReaction,\n\t\t\t\t\t\tuserReactionOld: voteReactionOld,\n\t\t\t\t\t\ttotalCount: Number(likeInstance.countText.innerHTML),\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tRatingRender.setReaction({\n\t\t\t\t\t\tlikeId: likeId,\n\t\t\t\t\t\trating: likeInstance,\n\t\t\t\t\t\taction: (voteAction === 'cancel' ? 'add' : 'cancel'),\n\t\t\t\t\t\tuserReaction: voteReaction,\n\t\t\t\t\t\ttotalCount: (\n\t\t\t\t\t\t\tvoteAction == 'cancel'\n\t\t\t\t\t\t\t\t? Number(likeInstance.countText.innerHTML) + 1\n\t\t\t\t\t\t\t\t: Number(likeInstance.countText.innerHTML) - 1\n\t\t\t\t\t\t)\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tif (likeInstance.buttonText)\n\t\t\t\t{\n\t\t\t\t\tif (voteAction === 'add')\n\t\t\t\t\t{\n\t\t\t\t\t\tlikeInstance.buttonText.innerHTML = Loc.getMessage('RATING_LIKE_EMOTION_LIKE_CALC');\n\t\t\t\t\t}\n\t\t\t\t\telse if (voteAction === 'change')\n\t\t\t\t\t{\n\t\t\t\t\t\tlikeInstance.buttonText.innerHTML = Loc.getMessage(`RATING_LIKE_EMOTION_${voteReactionOld.toUpperCase()}_CALC`);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tlikeInstance.buttonText.innerHTML = Loc.getMessage(`RATING_LIKE_EMOTION_${voteReaction.toUpperCase()}_CALC`);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tdataUsers\n\t\t\t\t&& voteAction !== 'change'\n\t\t\t\t&& likeInstance.version == 2\n\t\t\t)\n\t\t\t{\n\t\t\t\tlikeInstance.topUsersText.innerHTML = RatingRender.getTopUsersText({\n\t\t\t\t\tyou: (voteAction === 'cancel'), // negative\n\t\t\t\t\ttop: Object.values(dataUsers.TOP),\n\t\t\t\t\tmore: dataUsers.MORE\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\n\t\tconst analyticsLabel ={\n\t\t\tb24statAction: 'addLike',\n\t\t}\n\n\t\tif (\n\t\t\tlikeInstance.version >= 2\n\t\t\t&& RatingManager.mobile\n\t\t)\n\t\t{\n\t\t\tanalyticsLabel.b24statContext = 'mobile';\n\t\t}\n\n\t\tajaxInstance.runAction('main.rating.vote', {\n\t\t\tdata: {\n\t\t\t\tparams: {\n\t\t\t\t\tRATING_VOTE_TYPE_ID: likeInstance.entityTypeId,\n\t\t\t\t\tRATING_VOTE_KEY_SIGNED: likeInstance.keySigned,\n\t\t\t\t\tRATING_VOTE_ENTITY_ID: likeInstance.entityId,\n\t\t\t\t\tRATING_VOTE_ACTION: voteAction,\n\t\t\t\t\tRATING_VOTE_REACTION: voteReaction,\n\t\t\t\t},\n\t\t\t},\n\t\t\tanalyticsLabel: analyticsLabel,\n\t\t}).then(\n\t\t\tsuccessCallback,\n\t\t\tfailureCallback\n\t\t);\n\n\t\treturn false;\n\t}\n\n\tstatic LiveUpdate(params)\n\t{\n\t\tif (Number(params.USER_ID) === Number(Loc.getMessage('USER_ID')))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\tthis.repo.forEach((likeInstance, likeId) => {\n\t\t\tif (\n\t\t\t\tlikeInstance.entityTypeId !== params.ENTITY_TYPE_ID\n\t\t\t\t|| Number(likeInstance.entityId) !== Number(params.ENTITY_ID)\n\t\t\t)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.Draw(likeId, params);\n\t\t});\n\n\n\t\tRatingManager.live(params);\n\t}\n\n\tstatic Set(params: Params)\n\t{\n\t\tconst mobile = !!params.mobile;\n\n\t\tif (params.template === undefined)\n\t\t{\n\t\t\tparams.template = 'standart';\n\t\t}\n\n\t\tif (this.additionalParams.get('pathToUserProfile'))\n\t\t{\n\t\t\tparams.pathToUserProfile = this.additionalParams.get('pathToUserProfile');\n\t\t}\n\n\t\tlet likeInstance = this.getInstance(params.likeId);\n\n\t\tif (likeInstance && likeInstance.tryToSet > 5)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tconst tryToSend = likeInstance && likeInstance.tryToSet ? likeInstance.tryToSet : 1;\n\n\t\tlikeInstance = new RatingLike(params);\n\t\tthis.setInstance(\n\t\t\tparams.likeId,\n\t\t\tlikeInstance\n\t\t);\n\n\t\tif (likeInstance.enabled)\n\t\t{\n\t\t\tthis.Init(\n\t\t\t\tparams.likeId,\n\t\t\t\t{\n\t\t\t\t\tmobile: mobile,\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tsetTimeout(() => {\n\t\t\t\tlikeInstance.tryToSet = tryToSend + 1;\n\t\t\t\tthis.Set(params);\n\t\t\t}, 500);\n\t\t}\n\t}\n\n\tstatic setParams(params)\n\t{\n\t\tif (!Type.isUndefined(params.pathToUserProfile))\n\t\t{\n\t\t\tthis.additionalParams.set('pathToUserProfile', params.pathToUserProfile);\n\t\t}\n\t}\n\n\tstatic Init(likeId, params)\n\t{\n\t\tparams = (!Type.isUndefined(params) ? params : {});\n\n\t\tRatingManager.init(params);\n\n\t\tconst likeInstance = this.getInstance(likeId);\n\n\t\t// like/unlike button\n\t\tif (likeInstance.available)\n\t\t{\n\t\t\tlet eventNode = (\n\t\t\t\tlikeInstance.template === 'standart'\n\t\t\t\t\t? likeInstance.button\n\t\t\t\t\t: likeInstance.buttonText\n\t\t\t);\n\n\t\t\tif (!RatingManager.mobile)\n\t\t\t{\n\t\t\t\tconst eventNodeNew = eventNode.closest('.feed-new-like');\n\t\t\t\tif (eventNodeNew)\n\t\t\t\t{\n\t\t\t\t\teventNode = eventNodeNew;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tlikeInstance.version >= 2\n\t\t\t\t&& RatingManager.mobile\n\t\t\t)\n\t\t\t{\n\t\t\t\teventNode.removeEventListener('touchstart', this.mobileTouchStartHandler);\n\t\t\t\teventNode.addEventListener('touchstart', this.mobileTouchStartHandler);\n\t\t\t}\n\n\t\t\tconst eventName = (RatingManager.mobile ? 'touchend' : 'click');\n\t\t\teventNode.removeEventListener(eventName, this.buttonClickHandler);\n\t\t\teventNode.addEventListener(eventName, this.buttonClickHandler);\n\n\t\t\tif (!RatingManager.mobile)\n\t\t\t{\n\t\t\t\t// Hover/unHover like-button\n\t\t\t\tlikeInstance.box.addEventListener('mouseover', () => {\n\t\t\t\t\tlikeInstance.box.classList.add('bx-ilike-button-hover');\n\t\t\t\t});\n\t\t\t\tlikeInstance.box.addEventListener('mouseout', () => {\n\t\t\t\t\tlikeInstance.box.classList.remove('bx-ilike-button-hover');\n\t\t\t\t});\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tlikeInstance.topPanel.removeEventListener('click', this.mobileTopPanelClickHandler);\n\t\t\t\tlikeInstance.topPanel.addEventListener('click', this.mobileTopPanelClickHandler);\n\t\t\t}\n\t\t}\n\t\telse if (Type.isDomNode(likeInstance.buttonText))\n\t\t{\n\t\t\tlikeInstance.buttonText.innerHTML = likeInstance.localize['LIKE_D'];\n\t\t\tlikeInstance.buttonText.classList.add('bx-ilike-text-unavailable');\n\t\t}\n\t\t// get like-user-list\n\t\tconst clickShowPopupNode = (likeInstance.topUsersText ? likeInstance.topUsersText : likeInstance.count);\n\n\t\tif (!RatingManager.mobile)\n\t\t{\n\t\t\tclickShowPopupNode.addEventListener('mouseenter', (e) => {\n\t\t\t\tListPopup.onResultMouseEnter({\n\t\t\t\t\tlikeId: likeId,\n\t\t\t\t\tevent: e,\n\t\t\t\t\tnodeId: e.currentTarget.id,\n\t\t\t\t});\n\t\t\t});\n\n\t\t\tclickShowPopupNode.addEventListener('mouseleave', (e) => {\n\t\t\t\tListPopup.onResultMouseLeave({\n\t\t\t\t\tlikeId: likeId,\n\t\t\t\t});\n\t\t\t})\n\n\t\t\tclickShowPopupNode.addEventListener('click', (e) => {\n\t\t\t\tListPopup.onResultClick({\n\t\t\t\t\tlikeId: likeId,\n\t\t\t\t\tevent: e,\n\t\t\t\t\tnodeId: e.currentTarget.id,\n\t\t\t\t});\n\t\t\t})\n\t\t}\n\n\t\tif (\n\t\t\tlikeInstance.version === 2\n\t\t\t&& likeInstance.available\n\t\t\t&& likeInstance.userReactionNode\n\t\t)\n\t\t{\n\t\t\tRatingRender.bindReactionsPopup({\n\t\t\t\tlikeId: likeId,\n\t\t\t});\n\t\t}\n\t}\n\n\tstatic mobileTouchStartHandler()\n\t{\n\t\tRatingManager.startScrollTop = (\n\t\t\t(\n\t\t\t\tdocument.documentElement\n\t\t\t\t&& document.documentElement.scrollTop\n\t\t\t)\n\t\t\t|| document.body.scrollTop\n\t\t);\n\t}\n\n\tstatic buttonClickHandler(e)\n\t{\n\t\tconst likeInstanceNode = e.currentTarget.closest('[data-rating-vote-id]');\n\t\tif (!Type.isDomNode(likeInstanceNode))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tconst likeId = likeInstanceNode.getAttribute('data-rating-vote-id');\n\t\tif (!Type.isStringFilled(likeId))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tconst likeInstance = RatingLike.getInstance(likeId);\n\n\t\tif (\n\t\t\tlikeInstance.version >= 2\n\t\t\t&& RatingManager.mobile\n\t\t\t&& RatingRender.blockTouchEndByScroll\n\t\t)\n\t\t{\n\t\t\tRatingRender.blockTouchEndByScroll = false;\n\t\t\treturn;\n\t\t}\n\n\t\tif (\n\t\t\tlikeInstance.version < 2\n\t\t\t|| !RatingManager.mobile\n\t\t\t|| !RatingRender.reactionsPopupLikeId\n\t\t)\n\t\t{\n\t\t\tif (\n\t\t\t\tlikeInstance.version >= 2\n\t\t\t\t&& RatingManager.mobile\n\t\t\t)\n\t\t\t{\n\t\t\t\tconst currentScrollTop = (\n\t\t\t\t\t(\n\t\t\t\t\t\tdocument.documentElement\n\t\t\t\t\t\t&& document.documentElement.scrollTop\n\t\t\t\t\t)\n\t\t\t\t\t|| document.body.scrollTop\n\t\t\t\t);\n\n\t\t\t\tif (Math.abs(currentScrollTop - RatingManager.startScrollTop) > 2)\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tRatingLike.ClickVote(e, likeId);\n\t\t}\n\n\t\tif (likeInstance.version == 2)\n\t\t{\n\t\t\tRatingRender.afterClick({\n\t\t\t\tlikeId: likeId,\n\t\t\t});\n\t\t}\n\n\t\te.preventDefault();\n\t}\n\n\tstatic mobileTopPanelClickHandler(e)\n\t{\n\t\tconst likeInstanceNode = e.currentTarget.querySelector('[data-like-id]');\n\t\tif (!Type.isDomNode(likeInstanceNode))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tconst likeId = likeInstanceNode.getAttribute('data-like-id');\n\t\tif (!Type.isStringFilled(likeId))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tconst likeInstance = RatingLike.getInstance(likeId);\n\n\t\tRatingRender.openMobileReactionsPage({\n\t\t\tentityTypeId: likeInstance.entityTypeId,\n\t\t\tentityId: likeInstance.entityId,\n\t\t});\n\t\te.stopPropagation();\n\t}\n}\n","import { Type } from 'main.core';\n\nimport { RatingLike } from './like.js';\nimport { RatingManager } from './manager.js';\nimport { RatingRender } from './render.js';\n\nimport likeAnimatedEmojiData from '../animations/em_01.json';\nimport laughAnimatedEmojiData from '../animations/em_02.json';\nimport wonderAnimatedEmojiData from '../animations/em_03.json';\nimport cryAnimatedEmojiData from '../animations/em_04.json';\nimport angryAnimatedEmojiData from '../animations/em_05.json';\nimport facepalmAnimatedEmojiData from '../animations/em_06.json';\nimport admireAnimatedEmojiData from '../animations/em_07.json';\n\nexport const lottieAnimations = Object.freeze({\n\tlike: likeAnimatedEmojiData,\n\tlaugh: laughAnimatedEmojiData,\n\twonder: wonderAnimatedEmojiData,\n\tcry: cryAnimatedEmojiData,\n\tangry: angryAnimatedEmojiData,\n\tfacepalm: facepalmAnimatedEmojiData,\n\tadmire: admireAnimatedEmojiData,\n});\n\n\nif (Type.isUndefined(window.BXRL))\n{\n\twindow.BXRL = {};\n}\nwindow.BXRL.manager = RatingManager;\nwindow.BXRL.render = RatingRender;\n\nwindow.RatingLike = RatingLike;\n"],"names":["ListPopup","params","likeId","likeInstance","RatingLike","getInstance","target","reaction","nodeId","popupLikeId","popupContentPage","List","popupTimeoutIdShow","setTimeout","getListPopupShow","resultPopupAnimation","getListPopupAnimation","mouseInShowPopupNode","OpenWindow","clickEvent","targetId","Number","countText","innerHTML","bindNode","template","count","version","Type","isDomNode","isStringFilled","document","getElementById","box","popup","globalZIndex","getGlobalIndex","popupClassNameList","topPanel","push","RatingManager","mobile","Popup","id","bindElement","lightShadow","offsetTop","offsetLeft","isUndefined","isNull","offsetX","autoHide","closeByEsc","zIndexAbsolute","bindOptions","position","animation","events","onPopupClose","onPopupDestroy","content","className","join","setAngle","addEventListener","clearTimeout","popupTimeout","close","setBindElement","popupLikeInstance","show","AdjustWindow","element","index","propertyValue","Dom","style","isNaN","parseInt","offsetParent","tagName","EventEmitter","unsubscribe","BX","SidePanel","Instance","getTopSlider","getWindow","removeOnCloseHandler","forceBindPosition","adjustPosition","contentContainerNodeList","popupContent","querySelectorAll","length","forEach","contentContainerNode","e","scrollTop","scrollHeight","offsetHeight","RatingRender","popupCurrentReaction","Event","unbindAll","page","clear","popupPagesList","clearPopupContent","listXHR","abort","ajax","runAction","data","RATING_VOTE_TYPE_ID","entityTypeId","RATING_VOTE_KEY_SIGNED","keySigned","RATING_VOTE_ENTITY_ID","entityId","RATING_VOTE_LIST_PAGE","RATING_VOTE_REACTION","PATH_TO_USER_PROFILE","pathToUserProfile","onrequeststart","xhr","then","result","onListSuccess","items_all","items_page","list_page","buildPopupContent","rating","setAttribute","buildPopupContentNoReactions","PopupScroll","event","isShown","popupTimeoutIdList","getAttribute","currentTarget","mouseEnterEvent","getListPopup","removeOnClose","bind","currentUserId","Loc","getMessage","you","topList","top","isArray","more","ID","NAME_FORMATTED","WEIGHT","replace","sort","a","b","parseFloat","userNameList","map","item","userNameBegin","userNameEnd","pop","slice","i","userReactionNode","action","includes","userReaction","userReactionOld","totalCount","userId","getNode","reactionsNode","topPanelContainer","topUsersText","buttonText","elements","elementsNew","classList","add","contains","remove","reactionsContainer","querySelector","found","newValue","reactionValue","reactionCount","animate","type","clean","commentNode","closest","drawReactions","container","toUpperCase","parentElement","toLowerCase","reactionEvents","click","resultReactionClick","mouseenter","resultReactionMouseEnter","mouseleave","resultReactionMouseLeave","reactionsData","emojiContainer","create","props","attrs","title","Lottie","loadAnimation","animationData","reactionsAnimationData","loop","autoplay","renderer","rendererSettings","viewBoxOnly","Boolean","play","appendChild","JSON","stringify","reactionsPopupLikeId","reactionsPopup","reactionsNodesList","reactionsList","currentEmotion","emojiItem","children","reactionNode","ClickVote","preventDefault","append","body","reactionsPopupMouseOutHandler","getReactionsPopupMouseOutHandler","bindElementPosition","pos","left","inverted","GetWindowSize","deltaY","touchMoveDeltaY","adjust","width","borderRadius","reactionsPopupMobileDisableScroll","reactionsPopupAnimation","easing","duration","start","opacity","finish","transition","makeEaseInOut","transitions","cubic","step","state","stop","reactionsPopupOpacityState","complete","isFunction","onComplete","reactions","reactionsPopupAnimation2","touchScrollTop","hasMobileTouchMoved","window","reactionsPopupMobileTouchEndHandler","reactionsPopupMobileTouchMoveHandler","coords","x","changedTouches","pageX","y","pageY","reactionsPopupMobileGetHoverNode","reactionsPopupMobileHideHandler","removeEventListener","touchStartPosition","touches","touchCurrentPosition","reactionsPopupMobileCheckTouchMove","currentReactionNodeHover","reactionsPopupMobileRemoveHover","reactionsPopupMobileAddHover","blockShowPopupTimeout","blockShowPopup","reactionsPopupMobileEnableScroll","reactionsPopupAnimation4","linear","bindReactionsPopup","Math","abs","hideReactionsPopup","nodeAboveFinger","elementFromPoint","nodeBelowFinger","iconNodeAboveFinger","iconNodeBelowFinger","touchMoveScrollListener","passive","emit","mobileOverlay","app","exec","mouseOverHandler","Runtime","debounce","getMouseOverHandler","blockReactionsPopup","popupPosition","getBoundingClientRect","clientX","right","clientY","bottom","afterClickBlockShowPopup","showReactionsPopup","requestReaction","reactionsCount","popupSizeInitialized","height","minWidth","isPlainObject","Object","entries","tabsNode","headClassList","html","changePopupTab","sample","like","kiss","laugh","wonder","cry","angry","facepalm","reactionData","headItemClassList","popupContentPosition","usersNode","usersNodeExists","contentNode","reactionUsersNode","items","userItemClassList","USER_TYPE","href","URL","PHOTO_SRC","encodeURI","FULL_NAME","waitNode","tabsNodeOld","parentNode","insertBefore","removeChild","tabNode","reactionTabNode","avatarNode","src","imgClassList","afterClickHandler","getAfterClickHandler","isSet","onResultClick","stopPropagation","onResultMouseEnter","onResultMouseLeave","BXMobileApp","PageManager","loadPageBlank","url","backdrop","mediumPositionPercent","cache","eventData","repo","voteAction","button","Draw","TYPE","USER_ID","ENTITY_TYPE_ID","ENTITY_ID","USER_DATA","userData","REACTION","voteReaction","REACTION_OLD","voteReactionOld","TOTAL_POSITIVE_VOTES","itemsAll","ratingEmojiSelectorPopup","node","likeAnimatedEmojiData","kissAnimatedEmojiData","laughAnimatedEmojiData","wonderAnimatedEmojiData","cryAnimatedEmojiData","angryAnimatedEmojiData","facepalmAnimatedEmojiData","reactionsPopupMobileTouchEnd","reactionsPopupMobileTouchMove","reactionsPopupMobileHide","initialized","setDisplayHeight","throttle","getInViewScope","subscribe","onMobileCommentsGet","addCustomEvent","onRatingLike","command","LiveUpdate","getCompatData","displayHeight","documentElement","clientHeight","ratingNode","delayedList","value","key","isNodeVisibleOnScreen","fireAnimation","ratingNodeList","set","get","visibleAreaTop","visibleAreaBottom","ratingObject","entityList","addNode","checkEntity","addDelayed","liveParams","delayedListItem","Map","available","localize","enabled","topUsersDataNode","popupId","likeTimeout","parse","lastVoteRepo","lastVote","lastReactionRepo","lastReaction","addEntity","BXRL","forceAdd","active","change","getUserReaction","Vote","setReaction","dataUsers","TOP","values","getTopUsersText","MORE","cont","likeNode","cloneNode","whiteSpace","visibility","prepend","scale","quad","transform","likeThumbNode","propsStart","propsFinish","userWeight","usersData","recalcNeeded","find","filter","clientWidth","firstChild","ajaxInstance","MobileAjaxWrapper","successCallback","response","display","onCustomEvent","ratingId","user_data","failureCallback","analyticsLabel","b24statAction","b24statContext","RATING_VOTE_ACTION","live","undefined","additionalParams","tryToSet","tryToSend","setInstance","Init","Set","init","eventNode","eventNodeNew","mobileTouchStartHandler","eventName","buttonClickHandler","mobileTopPanelClickHandler","clickShowPopupNode","startScrollTop","likeInstanceNode","blockTouchEndByScroll","currentScrollTop","afterClick","openMobileReactionsPage","lottieAnimations","freeze","admire","admireAnimatedEmojiData","manager","render"],"mappings":";;;;;KAQaA,SAAS;GAAA;KAAA;;GAAA;KAAA;KAAA,6BAMDC,MAAM,EAC1B;OAAA;OACC,IAAMC,MAAM,GAAGD,MAAM,CAACC,MAAM;OAC5B,IAAMC,YAAY,GAAGC,YAAU,CAACC,WAAW,CAACH,MAAM,CAAC;OACnD,IAAMI,MAAM,GAAGL,MAAM,CAACK,MAAM;OAC5B,IAAMC,QAAQ,GAAGN,MAAM,CAACM,QAAQ;OAChC,IAAMC,MAAM,GAAGP,MAAM,CAACO,MAAM;OAE5B,IAAI,IAAI,CAACC,WAAW,KAAKP,MAAM,EAC/B;SACC,OAAO,KAAK;;OAGb,IAAIC,YAAY,CAACO,gBAAgB,IAAI,CAAC,EACtC;SACC;;OAGD,IAAI,CAACC,IAAI,CAACT,MAAM,EAAE,CAAC,EAAEK,QAAQ,EAAE,IAAI,CAAC;OAEpCJ,YAAY,CAACS,kBAAkB,GAAGC,UAAU,CAAC,YAAM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