File manager - Edit - /home/c14075/dragmet-ural.ru/www/bitrix/js/im/component/notifications/dist/notifications.bundle.js.map
Back
{"version":3,"file":"notifications.bundle.js","sources":["../src/component/notification-quick-answer.js","../src/component/notification-item-header.js","../src/component/notification-placeholder.js","../src/component/notification-item.js","../src/mixin/notificationCore.js","../src/component/notification-search-result.js","../src/notifications.js"],"sourcesContent":["export const NotificationQuickAnswer = {\n\tprops: ['listItem'],\n\tdata()\n\t{\n\t\treturn {\n\t\t\tquickAnswerText: '',\n\t\t\tquickAnswerResultMessage: '',\n\t\t\tshowQuickAnswer: false,\n\t\t\tisSendingQuickAnswer: false,\n\t\t\tsuccessSentQuickAnswer: false\n\t\t};\n\t},\n\tmethods:\n\t{\n\t\ttoggleQuickAnswer()\n\t\t{\n\t\t\tif (this.successSentQuickAnswer)\n\t\t\t{\n\t\t\t\tthis.showQuickAnswer = true;\n\t\t\t\tthis.successSentQuickAnswer = false;\n\t\t\t\tthis.quickAnswerResultMessage = '';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.showQuickAnswer = !this.showQuickAnswer;\n\t\t\t}\n\n\t\t\tif (this.showQuickAnswer)\n\t\t\t{\n\t\t\t\tthis.$nextTick(() => {\n\t\t\t\t\tthis.$refs['input'].focus();\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tsendQuickAnswer(event)\n\t\t{\n\t\t\tif (this.quickAnswerText.trim() === '')\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.isSendingQuickAnswer = true;\n\t\t\tconst notificationId = event.item.id;\n\n\t\t\tthis.$Bitrix.RestClient.get().callMethod('im.notify.answer', {\n\t\t\t\tnotify_id: notificationId,\n\t\t\t\tanswer_text: this.quickAnswerText\n\t\t\t}).then((result) => {\n\t\t\t\tthis.quickAnswerResultMessage = result.data().result_message[0];\n\t\t\t\tthis.successSentQuickAnswer = true;\n\t\t\t\tthis.quickAnswerText = '';\n\t\t\t\tthis.isSendingQuickAnswer = false;\n\t\t\t}).catch((error) => {\n\t\t\t\tconsole.error(error);\n\t\t\t\tthis.quickAnswerResultMessage = result.data().result_message[0];\n\t\t\t\tthis.isSendingQuickAnswer = false;\n\t\t\t});\n\t\t},\n\t},\n\t//language=Vue\n\ttemplate: `\n\t\t<div class=\"bx-notifier-item-text-vue\">\n\t\t\t<div class=\"bx-notifier-answer-link-vue\">\n\t\t\t\t<span class=\"bx-notifier-answer-reply bx-messenger-ajax\" @click=\"toggleQuickAnswer()\" @dblclick.stop>\n\t\t\t\t\t{{ $Bitrix.Loc.getMessage('IM_NOTIFICATIONS_QUICK_ANSWER_BUTTON') }}\n\t\t\t\t</span>\n\t\t\t</div>\n\t\t\t<transition name=\"quick-answer-slide\">\n\t\t\t\t<div v-if=\"showQuickAnswer && !successSentQuickAnswer\" class=\"bx-notifier-answer-box-vue\">\n\t\t\t\t\t<span v-if=\"isSendingQuickAnswer\" class=\"bx-notifier-answer-progress-vue bx-messenger-content-load-img\"></span>\n\t\t\t\t\t<span class=\"bx-notifier-answer-input\">\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\tref=\"input\"\n\t\t\t\t\t\t\tautofocus\n\t\t\t\t\t\t\tclass=\"bx-messenger-input\"\n\t\t\t\t\t\t\tv-model=\"quickAnswerText\"\n\t\t\t\t\t\t\t:disabled=\"isSendingQuickAnswer\"\n\t\t\t\t\t\t\t@keyup.enter=\"sendQuickAnswer({item: listItem, event: $event})\"\n\t\t\t\t\t\t>\n\t\t\t\t\t</span>\n\t\t\t\t\t<div class=\"bx-notifier-answer-button\" @click=\"sendQuickAnswer({item: listItem, event: $event})\"></div>\n\t\t\t\t</div>\n\t\t\t</transition>\n\t\t\t<div v-if=\"successSentQuickAnswer\" class=\"bx-notifier-answer-text-vue\">\n\t\t\t\t{{ quickAnswerResultMessage }}\n\t\t\t</div>\n\t\t</div>\n\t`\n};","import { NotificationTypesCodes } from 'im.const';\n\n// @vue/component\nexport const NotificationItemHeader = {\n\tprops: {\n\t\tlistItem: {\n\t\t\ttype: Object,\n\t\t\trequired: true\n\t\t},\n\t\tisExtranet: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false\n\t\t}\n\t},\n\tcomputed:\n\t{\n\t\tmoreUsers()\n\t\t{\n\t\t\tconst phrase = this.$Bitrix.Loc.getMessage('IM_NOTIFICATIONS_MORE_USERS').split('#COUNT#');\n\n\t\t\treturn {\n\t\t\t\tstart: phrase[0],\n\t\t\t\tend: this.listItem.params.USERS.length + phrase[1]\n\t\t\t};\n\t\t},\n\t\tisMoreUsers()\n\t\t{\n\t\t\treturn this.listItem.params.hasOwnProperty('USERS') && this.listItem.params.USERS.length > 0;\n\t\t},\n\t\tisAbleToDelete()\n\t\t{\n\t\t\treturn this.listItem.sectionCode === NotificationTypesCodes.simple;\n\t\t},\n\t},\n\tmethods:\n\t{\n\t\tonDeleteClick(event)\n\t\t{\n\t\t\tif (event.item.sectionCode === NotificationTypesCodes.simple)\n\t\t\t{\n\t\t\t\tthis.$emit('deleteClick', event);\n\t\t\t}\n\t\t},\n\t\tonMoreUsersClick(event)\n\t\t{\n\t\t\tif (event.users)\n\t\t\t{\n\t\t\t\tthis.$emit('moreUsersClick', {\n\t\t\t\t\tevent: event.event,\n\t\t\t\t\tcontent: {\n\t\t\t\t\t\ttype: 'USERS',\n\t\t\t\t\t\tvalue: event.users\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tonUserTitleClick(event)\n\t\t{\n\t\t\tif (window.top[\"BXIM\"] && event.userId > 0)\n\t\t\t{\n\t\t\t\twindow.top[\"BXIM\"].openMessenger(event.userId);\n\t\t\t}\n\t\t},\n\t},\n\t//language=Vue\n\ttemplate: `\n\t\t<div class=\"bx-im-notifications-item-content-header\">\n\t\t\t<div v-if=\"listItem.title\" class=\"bx-im-notifications-item-header-title\">\n\t\t\t\t<span\n\t\t\t\t\tv-if=\"!listItem.systemType\"\n\t\t\t\t\t@click.prevent=\"onUserTitleClick({userId: listItem.authorId, event: $event})\"\n\t\t\t\t\tclass=\"bx-im-notifications-item-header-title-text-link\"\n\t\t\t\t\t:class=\"[isExtranet ? '--extranet' : '']\"\n\t\t\t\t>\n\t\t\t\t\t{{ listItem.title.value }}\n\t\t\t\t</span>\n\t\t\t\t<span v-else class=\"bx-im-notifications-item-header-title-text\">{{ listItem.title.value }}</span>\n\t\t\t\t<span\n\t\t\t\t\tv-if=\"isMoreUsers && !listItem.systemType\"\n\t\t\t\t\tclass=\"bx-im-notifications-item-header-more-users\"\n\t\t\t\t>\n\t\t\t\t\t{{ moreUsers.start }}\n\t\t\t\t\t<span class=\"bx-messenger-ajax\" @click=\"onMoreUsersClick({users: listItem.params.USERS, event: $event})\">\n\t\t\t\t\t\t{{ moreUsers.end }}\n\t\t\t\t\t</span>\n\t\t\t\t</span>\n\t\t\t</div>\n\t\t\t<div class=\"bx-im-notifications-item-content-header-right\">\n\t\t\t\t<div class=\"bx-im-notifications-item-header-date\">\n\t\t\t\t\t{{ listItem.date.value }}\n\t\t\t\t</div>\n\t\t\t\t<span\n\t\t\t\t\tv-if=\"isAbleToDelete\"\n\t\t\t\t\tclass=\"bx-im-notifications-item-header-delete\"\n\t\t\t\t\t@click=\"onDeleteClick({item: listItem, event: $event})\">\n\t\t\t\t</span>\n\t\t\t</div>\n\t\t</div>\n\t`\n};","export const NotificationPlaceholder = {\n\t//language=Vue\n\ttemplate: `\n\t\t<div style=\"display: flex; width: 100%;\">\n\t\t\t<div class=\"bx-im-notifications-item-image-wrap\">\n\t\t\t\t<div class=\"bx-im-notifications-item-image bx-im-notifications-item-placeholder-image\"></div>\n\t\t\t</div>\n\t\t\t<div class=\"bx-im-notifications-item-content bx-im-notifications-skeleton\">\n\t\t\t\t<div class=\"bx-im-notifications-item-content-header\">\n\t\t\t\t\t<div class=\"bx-im-notifications-item-placeholder-title\"></div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"bx-im-notifications-item-content-middle\">\n\t\t\t\t\t<div class=\"bx-im-notifications-item-bottom-subtitle\">\n\t\t\t\t\t\t<div class=\"bx-im-notifications-item-placeholder-subtitle\"></div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"bx-im-notifications-item-content-bottom\">\n\t\t\t\t\t<div class=\"bx-im-notifications-item-bottom-subtitle\">\n\t\t\t\t\t\t<div class=\"bx-im-notifications-item-placeholder-subtitle\"></div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t`\n};","import 'ui.design-tokens';\n\nimport 'im.view.element.attach';\nimport 'im.view.element.keyboard';\n\nimport \"./notification-item.css\";\nimport \"./notification-item.dark.css\";\nimport { Utils } from \"im.lib.utils\";\nimport { Vue } from \"ui.vue\";\nimport { NotificationQuickAnswer } from './notification-quick-answer';\nimport { NotificationItemHeader } from './notification-item-header';\nimport { NotificationPlaceholder } from './notification-placeholder';\nimport { PopupManager } from \"main.popup\";\nimport { Dom } from 'main.core';\nimport { NotificationTypesCodes } from 'im.const';\n\nexport const NotificationItem = {\n\tcomponents:\n\t{\n\t\tNotificationQuickAnswer,\n\t\tNotificationItemHeader,\n\t\tNotificationPlaceholder\n\t},\n\tprops: ['rawListItem', 'searchMode'],\n\tdata()\n\t{\n\t\treturn {\n\t\t\tmenuId: 'popup-window-content-bx-messenger-popup-notify'\n\t\t};\n\t},\n\tcomputed:\n\t{\n\t\tNotificationTypesCodes: () => NotificationTypesCodes,\n\t\tlistItem()\n\t\t{\n\t\t\treturn {\n\t\t\t\tid: this.rawListItem.id,\n\t\t\t\ttype: this.rawListItem.type,\n\t\t\t\tsectionCode: this.rawListItem.sectionCode,\n\t\t\t\tauthorId: this.rawListItem.authorId,\n\t\t\t\tsystemType: this.rawListItem.type === 4 || (this.rawListItem.authorId === 0 && this.avatar === ''),\n\t\t\t\ttitle: {\n\t\t\t\t\tvalue: this.userTitle,\n\t\t\t\t},\n\t\t\t\tsubtitle: {\n\t\t\t\t\tvalue: this.rawListItem.textConverted,\n\t\t\t\t},\n\t\t\t\tavatar: {\n\t\t\t\t\turl: this.avatar,\n\t\t\t\t\tcolor: this.defaultAvatarColor\n\t\t\t\t},\n\t\t\t\tparams: this.rawListItem.params || {},\n\t\t\t\tnotifyButtons: this.rawListItem.notifyButtons || undefined,\n\t\t\t\tunread: this.rawListItem.unread,\n\t\t\t\tsettingName: this.rawListItem.settingName,\n\t\t\t\tdate: {\n\t\t\t\t\tvalue: Utils.date.format(this.rawListItem.date, null, this.$Bitrix.Loc.getMessages())\n\t\t\t\t},\n\t\t\t}\n\t\t},\n\t\tisRealItem()\n\t\t{\n\t\t\treturn this.rawListItem.sectionCode !== NotificationTypesCodes.placeholder;\n\t\t},\n\t\tisNeedQuickAnswer()\n\t\t{\n\t\t\treturn this.listItem.params.CAN_ANSWER && this.listItem.params.CAN_ANSWER === 'Y'\n\t\t},\n\n\t\tuserTitle()\n\t\t{\n\t\t\tif (this.isRealItem && this.rawListItem.authorId > 0)\n\t\t\t{\n\t\t\t\treturn this.userData.name;\n\t\t\t}\n\t\t\telse if (this.isRealItem && this.rawListItem.authorId === 0)\n\t\t\t{\n\t\t\t\t// System notification\n\t\t\t\treturn this.rawListItem.title;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn '';\n\t\t\t}\n\t\t},\n\t\tavatar()\n\t\t{\n\t\t\tlet avatar = '';\n\n\t\t\tif (this.isRealItem && this.rawListItem.authorId > 0)\n\t\t\t{\n\t\t\t\tavatar = this.userData.avatar;\n\t\t\t}\n\t\t\telse if (this.isRealItem && this.rawListItem.authorId === 0)\n\t\t\t{\n\t\t\t\t//system notification\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\treturn avatar;\n\t\t},\n\t\tdefaultAvatarColor()\n\t\t{\n\t\t\tif (this.rawListItem.authorId <= 0)\n\t\t\t{\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\treturn this.userData.color;\n\t\t},\n\t\tuserData()\n\t\t{\n\t\t\treturn this.$store.getters['users/get'](this.rawListItem.authorId, true);\n\t\t},\n\t\tisExtranet(): boolean\n\t\t{\n\t\t\treturn this.userData.extranet;\n\t\t},\n\t\tavatarStyles()\n\t\t{\n\t\t\treturn {\n\t\t\t\tbackgroundImage: 'url(\"' + this.listItem.avatar.url +'\")',\n\t\t\t}\n\t\t}\n\t},\n\tmethods:\n\t{\n\t\t//events\n\t\tonDoubleClick(event)\n\t\t{\n\t\t\tif (!this.searchMode && event.item.sectionCode === NotificationTypesCodes.simple)\n\t\t\t{\n\t\t\t\tthis.$emit('dblclick', event);\n\t\t\t}\n\t\t},\n\t\tonButtonsClick(event)\n\t\t{\n\t\t\tif (event.action === 'COMMAND')\n\t\t\t{\n\t\t\t\tthis.$emit('buttonsClick', event);\n\t\t\t}\n\t\t},\n\t\tonDeleteClick(event)\n\t\t{\n\t\t\tthis.$emit('deleteClick', event);\n\t\t},\n\t\tonMoreUsersClick(event)\n\t\t{\n\t\t\tthis.$emit('contentClick', event);\n\t\t},\n\t\tonContentClick(event)\n\t\t{\n\t\t\tif (Vue.testNode(event.target, {className: 'bx-im-mention'}))\n\t\t\t{\n\t\t\t\tthis.$emit('contentClick', {\n\t\t\t\t\tevent,\n\t\t\t\t\tcontent: {\n\t\t\t\t\t\ttype: event.target.dataset.type,\n\t\t\t\t\t\tvalue: event.target.dataset.value\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tonRightClick(event)\n\t\t{\n\t\t\tif (\n\t\t\t\tUtils.platform.isBitrixDesktop()\n\t\t\t\t&& event.target.tagName === 'A'\n\t\t\t\t&& (\n\t\t\t\t\t!event.target.href.startsWith('/desktop_app/')\n\t\t\t\t\t|| event.target.href.startsWith('/desktop_app/show.file.php')\n\t\t\t\t)\n\t\t\t)\n\t\t\t{\n\t\t\t\tconst hrefToCopy = event.target.href;\n\t\t\t\tif (!hrefToCopy)\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (this.menuPopup)\n\t\t\t\t{\n\t\t\t\t\tthis.menuPopup.destroy();\n\t\t\t\t\tthis.menuPopup = null;\n\t\t\t\t}\n\n\t\t\t\t//menu for other items\n\t\t\t\tconst existingMenu = PopupManager.getPopupById(this.menuId);\n\t\t\t\tif (existingMenu)\n\t\t\t\t{\n\t\t\t\t\texistingMenu.destroy();\n\t\t\t\t}\n\n\t\t\t\tconst menuItem = Dom.create('span', {\n\t\t\t\t\tattrs: {\n\t\t\t\t\t\tclassName: 'bx-messenger-popup-menu-item-text bx-messenger-popup-menu-item',\n\t\t\t\t\t},\n\t\t\t\t\tevents: {\n\t\t\t\t\t\tclick: (event) => {\n\t\t\t\t\t\t\tBX.desktop.clipboardCopy(hrefToCopy);\n\t\t\t\t\t\t\tthis.menuPopup.destroy();\n\t\t\t\t\t\t\tthis.menuPopup = null;\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\ttext: this.$Bitrix.Loc.getMessage('IM_NOTIFICATIONS_CONTEXT_COPY_LINK'),\n\t\t\t\t});\n\n\t\t\t\tthis.menuPopup = PopupManager.create({\n\t\t\t\t\tid: this.menuId,\n\t\t\t\t\ttargetContainer: document.body,\n\t\t\t\t\tclassName: BX.MessengerTheme.isDark() ? 'bx-im-notifications-popup-window-dark' : '',\n\t\t\t\t\tdarkMode: BX.MessengerTheme.isDark(),\n\t\t\t\t\tbindElement: event,\n\t\t\t\t\toffsetLeft: 13,\n\t\t\t\t\tautoHide: true,\n\t\t\t\t\tcloseByEsc: true,\n\t\t\t\t\tevents: {\n\t\t\t\t\t\tonPopupClose: () => this.menuPopup.destroy(),\n\t\t\t\t\t\tonPopupDestroy: () => this.menuPopup = null,\n\t\t\t\t\t},\n\t\t\t\t\tcontent: menuItem\n\t\t\t\t});\n\t\t\t\tif (!BX.MessengerTheme.isDark())\n\t\t\t\t{\n\t\t\t\t\tthis.menuPopup.setAngle({});\n\t\t\t\t}\n\n\t\t\t\tthis.menuPopup.show();\n\t\t\t}\n\t\t},\n\t},\n\t//language=Vue\n\ttemplate: `\n\t\t<div \n\t\t\tclass=\"bx-im-notifications-item\"\n\t\t\t:class=\"[listItem.unread && !searchMode ? 'bx-im-notifications-item-unread' : '']\"\n\t\t\t@dblclick=\"onDoubleClick({item: listItem, event: $event})\"\n\t\t\t@contextmenu=\"onRightClick\"\n\t\t>\n\t\t\t<template v-if=\"listItem.sectionCode !== NotificationTypesCodes.placeholder\">\n\t\t\t\t<div v-if=\"listItem.avatar\" class=\"bx-im-notifications-item-image-wrap\">\n\t\t\t\t\t<div \n\t\t\t\t\t\tv-if=\"listItem.avatar.url\" \n\t\t\t\t\t\tclass=\"bx-im-notifications-item-image\"\n\t\t\t\t\t\t:style=\"avatarStyles\"\n\t\t\t\t\t></div>\n\t\t\t\t\t<div v-else-if=\"listItem.systemType\" class=\"bx-im-notifications-item-image bx-im-notifications-image-system\"></div>\n\t\t\t\t\t<div \n\t\t\t\t\t\tv-else-if=\"!listItem.avatar.url\" \n\t\t\t\t\t\tclass=\"bx-im-notifications-item-image bx-im-notifications-item-image-default\"\n\t\t\t\t\t\t:style=\"{backgroundColor: listItem.avatar.color}\"\n\t\t\t\t\t\t>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"bx-im-notifications-item-content\" @click=\"onContentClick\">\n\t\t\t\t\t<NotificationItemHeader \n\t\t\t\t\t\t:listItem=\"listItem\"\n\t\t\t\t\t\t:isExtranet=\"isExtranet\"\n\t\t\t\t\t\t@deleteClick=\"onDeleteClick\"\n\t\t\t\t\t\t@moreUsersClick=\"onMoreUsersClick\"\n\t\t\t\t\t/>\n\t\t\t\t\t<div v-if=\"listItem.subtitle.value.length > 0\" class=\"bx-im-notifications-item-content-bottom\">\n\t\t\t\t\t\t<div class=\"bx-im-notifications-item-bottom-subtitle\">\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t:class=\"[!listItem.title.value ? 'bx-im-notifications-item-bottom-subtitle-text' : 'bx-im-notifications-item-bottom-no-subtitle-text']\"\n\t\t\t\t\t\t\t\tv-html=\"listItem.subtitle.value\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<NotificationQuickAnswer v-if=\"isNeedQuickAnswer\" :listItem=\"listItem\"/>\n\t\t\t\t\t<div v-if=\"listItem.params['ATTACH']\" class=\"bx-im-notifications-item-content-additional\">\n\t\t\t\t\t\t<div v-for=\"attach in listItem.params['ATTACH']\">\n\t\t\t\t\t\t\t<bx-im-view-element-attach :config=\"attach\"/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div v-if=\"listItem.notifyButtons\">\n\t\t\t\t\t\t<bx-im-view-element-keyboard @click=\"onButtonsClick\" :buttons=\"listItem.notifyButtons\"/>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</template>\n\t\t\t<NotificationPlaceholder v-else-if=\"listItem.sectionCode === NotificationTypesCodes.placeholder\"/>\n\t\t</div>\n\t`\n};\n","import { PopupManager } from \"main.popup\";\nimport { NotificationTypesCodes } from 'im.const';\n\nexport const NotificationCore = {\n\tdata()\n\t{\n\t\treturn {\n\t\t\tplaceholderCount: 0,\n\t\t}\n\t},\n\tmethods:\n\t{\n\t\tisReadyToLoadNewPage(event)\n\t\t{\n\t\t\tconst leftSpaceBottom = event.target.scrollHeight - event.target.scrollTop - event.target.clientHeight;\n\n\t\t\treturn leftSpaceBottom < 200; //pixels offset before load new page\n\t\t},\n\t\tgetLastItemId(collection)\n\t\t{\n\t\t\treturn collection[collection.length - 1].id;\n\t\t},\n\t\tgeneratePlaceholders(amount)\n\t\t{\n\t\t\tconst placeholders = [];\n\t\t\tfor (let i = 0; i < amount; i++)\n\t\t\t{\n\t\t\t\tplaceholders.push({\n\t\t\t\t\tid: `placeholder${this.placeholderCount}`,\n\t\t\t\t\ttype: NotificationTypesCodes.placeholder\n\t\t\t\t});\n\t\t\t\tthis.placeholderCount++;\n\t\t\t}\n\n\t\t\treturn placeholders;\n\t\t},\n\t\tgetRestClient()\n\t\t{\n\t\t\treturn this.$Bitrix.RestClient.get();\n\t\t},\n\t\tonContentClick(event)\n\t\t{\n\t\t\tthis.contentPopupType = event.content.type.toLowerCase();\n\t\t\tthis.contentPopupValue = event.content.value;\n\n\t\t\tif (this.popupInstance != null)\n\t\t\t{\n\t\t\t\tthis.popupInstance.destroy();\n\t\t\t\tthis.popupInstance = null;\n\t\t\t}\n\n\t\t\t// TODO: replace it with new popups.\n\t\t\tif (this.contentPopupType === 'user' || this.contentPopupType === 'chat')\n\t\t\t{\n\t\t\t\tconst popupAngle = !this.isDarkTheme;\n\n\t\t\t\tBXIM.messenger.openPopupExternalData(\n\t\t\t\t\tevent.event.target,\n\t\t\t\t\tthis.contentPopupType,\n\t\t\t\t\tpopupAngle,\n\t\t\t\t\t{'ID': this.contentPopupValue}\n\t\t\t\t);\n\t\t\t}\n\t\t\telse if (this.contentPopupType === 'openlines')\n\t\t\t{\n\t\t\t\tBX.MessengerCommon.linesGetSessionHistory(this.contentPopupValue);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tconst popup = PopupManager.create({\n\t\t\t\t\tid: \"bx-messenger-popup-external-data\",\n\t\t\t\t\ttargetContainer: document.body,\n\t\t\t\t\tclassName: this.isDarkTheme ? 'bx-im-notifications-popup-window-dark' : '',\n\t\t\t\t\tbindElement: event.event.target,\n\t\t\t\t\tlightShadow : true,\n\t\t\t\t\toffsetTop: 0,\n\t\t\t\t\toffsetLeft: 10,\n\t\t\t\t\tautoHide: true,\n\t\t\t\t\tcloseByEsc: true,\n\t\t\t\t\tbindOptions: {position: \"top\"},\n\t\t\t\t\tevents: {\n\t\t\t\t\t\tonPopupClose: () => this.popupInstance.destroy(),\n\t\t\t\t\t\tonPopupDestroy: () => this.popupInstance = null\n\t\t\t\t\t},\n\t\t\t\t});\n\t\t\t\tif (!this.isDarkTheme)\n\t\t\t\t{\n\t\t\t\t\tpopup.setAngle({});\n\t\t\t\t}\n\n\t\t\t\tthis.popupIdSelector = `#${popup.getContentContainer().id}`;\n\n\t\t\t\t//little hack for correct open several popups in a row.\n\t\t\t\tthis.$nextTick(() => this.popupInstance = popup);\n\t\t\t}\n\t\t},\n\t},\n\tcomputed:\n\t{\n\t\tisDarkTheme()\n\t\t{\n\t\t\tif (this.darkTheme === undefined)\n\t\t\t{\n\t\t\t\treturn BX.MessengerTheme.isDark();\n\t\t\t}\n\n\t\t\treturn this.darkTheme;\n\t\t},\n\t}\n};","import { Vuex } from 'ui.vue.vuex';\nimport { NotificationItem } from './notification-item';\nimport { Logger } from 'im.lib.logger';\nimport { MountingPortal } from 'ui.vue.portal';\nimport { Popup } from \"im.view.popup\";\nimport { NotificationCore } from '../mixin/notificationCore';\nimport { Utils } from 'im.lib.utils';\n\nexport const NotificationSearchResult = {\n\tcomponents:\n\t{\n\t\tNotificationItem,\n\t\tMountingPortal,\n\t\tPopup\n\t},\n\tmixins: [\n\t\tNotificationCore\n\t],\n\tprops: [\n\t\t'searchQuery',\n\t\t'searchType',\n\t\t'searchDate',\n\t],\n\tdata()\n\t{\n\t\treturn {\n\t\t\tpageLimit: 50,\n\t\t\tlastId: 0,\n\t\t\tinitialDataReceived: false,\n\t\t\tisLoadingNewPage: false,\n\t\t\tcontentPopupType: '',\n\t\t\tcontentPopupValue: '',\n\t\t\tpopupInstance: null,\n\t\t\tpopupIdSelector: '',\n\t\t\tsearchResultsTotal: 0,\n\t\t\tsearchPageLoaded: 0,\n\t\t\tsearchPagesRequested: 0,\n\t\t};\n\t},\n\tcomputed:\n\t{\n\t\tremainingPages()\n\t\t{\n\t\t\treturn Math.ceil(\n\t\t\t\t(this.searchResultsTotal - this.searchResults.length) / this.pageLimit\n\t\t\t);\n\t\t},\n\t\t...Vuex.mapState({\n\t\t\tnotification: state => state.notifications.collection,\n\t\t\tsearchResults: state => state.notifications.searchCollection,\n\t\t})\n\t},\n\twatch:\n\t{\n\t\tsearchQuery(value)\n\t\t{\n\t\t\tif (value.length >= 3 || value === '')\n\t\t\t{\n\t\t\t\tthis.search();\n\t\t\t}\n\t\t},\n\t\tsearchType()\n\t\t{\n\t\t\tthis.search();\n\t\t},\n\t\tsearchDate(value)\n\t\t{\n\t\t\tif (BX.parseDate(value) instanceof Date || value === '')\n\t\t\t{\n\t\t\t\tthis.search();\n\t\t\t}\n\t\t},\n\t},\n\tcreated()\n\t{\n\t\tthis.searchServerDelayed = Utils.debounce(this.getSearchResultsFromServer, 1500, this);\n\t\tthis.search();\n\t},\n\tbeforeDestroy()\n\t{\n\t\tthis.$store.dispatch('notifications/deleteSearchResults');\n\t},\n\tmethods:\n\t{\n\t\tsearch()\n\t\t{\n\t\t\tthis.resetSearchState();\n\n\t\t\tconst localResults = this.notification.filter((item) => {\n\t\t\t\tlet result = false;\n\t\t\t\tif (this.searchQuery.length >= 3)\n\t\t\t\t{\n\t\t\t\t\t result = item.textConverted.toLowerCase().includes(this.searchQuery.toLowerCase());\n\t\t\t\t\t if (!result)\n\t\t\t\t\t {\n\t\t\t\t\t \treturn result;\n\t\t\t\t\t }\n\t\t\t\t}\n\t\t\t\tif (this.searchType !== '')\n\t\t\t\t{\n\t\t\t\t\tresult = item.settingName === this.searchType;\n\t\t\t\t\tif (!result)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn result;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (this.searchDate !== '')\n\t\t\t\t{\n\t\t\t\t\tconst date = BX.parseDate(this.searchDate);\n\t\t\t\t\tif (date instanceof Date)\n\t\t\t\t\t{\n\t\t\t\t\t\t// compare dates excluding time.\n\t\t\t\t\t\tconst itemDateForCompare = (new Date(item.date.getTime())).setHours(0,0,0,0);\n\t\t\t\t\t\tconst dateFromInput = date.setHours(0,0,0,0);\n\n\t\t\t\t\t\tresult = itemDateForCompare === dateFromInput;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn result;\n\t\t\t});\n\t\t\tif (localResults.length > 0)\n\t\t\t{\n\t\t\t\tthis.$store.dispatch('notifications/setSearchResults', {notification: localResults, type: 'local'});\n\t\t\t}\n\n\t\t\tconst isNeedPlaceholders = this.pageLimit - localResults.length > 0;\n\t\t\tif (isNeedPlaceholders > 0)\n\t\t\t{\n\t\t\t\tthis.drawPlaceholders(this.pageLimit).then(() => {\n\t\t\t\t\tthis.searchServerDelayed();\n\t\t\t\t});\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.searchServerDelayed();\n\t\t\t}\n\t\t},\n\t\tgetSearchResultsFromServer()\n\t\t{\n\t\t\tconst queryParams = this.getSearchRequestParams();\n\t\t\tthis.getRestClient().callMethod('im.notify.history.search', queryParams).then(result => {\n\t\t\t\tLogger.warn('im.notify.history.search: first page results', result.data());\n\t\t\t\tthis.processHistoryData(result.data());\n\t\t\t\tthis.initialDataReceived = true;\n\t\t\t\tthis.isLoadingNewPage = false;\n\t\t\t\tthis.searchPageLoaded++;\n\t\t\t}).catch(result => {\n\t\t\t\tLogger.warn('History request error', result)\n\t\t\t});\n\t\t},\n\t\tprocessHistoryData(data)\n\t\t{\n\t\t\tthis.$store.dispatch('notifications/clearPlaceholders');\n\t\t\tif (data.notifications.length <= 0)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tthis.lastId = this.getLastItemId(data.notifications);\n\t\t\tthis.searchResultsTotal = data.total_results;\n\n\t\t\tthis.$store.dispatch('notifications/setSearchResults', {\n\t\t\t\tnotification: data.notifications,\n\t\t\t});\n\t\t\tthis.$store.dispatch('users/set', data.users);\n\t\t\tthis.isLoadingNewPage = false;\n\t\t},\n\t\tloadNextPage()\n\t\t{\n\t\t\tLogger.warn(`Loading more search results!`);\n\n\t\t\tconst queryParams = this.getSearchRequestParams();\n\n\t\t\tthis.getRestClient().callMethod('im.notify.history.search', queryParams)\n\t\t\t\t.then(result => {\n\t\t\t\t\tLogger.warn('im.notify.history.search: new page results', result.data());\n\n\t\t\t\t\tconst newUsers = result.data().users;\n\t\t\t\t\tconst newItems = result.data().notifications;\n\t\t\t\t\tif (!newItems || newItems.length === 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.$store.dispatch('notifications/clearPlaceholders');\n\t\t\t\t\t\tthis.searchResultsTotal = this.searchResults.length;\n\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.lastId = this.getLastItemId(newItems);\n\n\t\t\t\t\tthis.$store.dispatch('users/set', newUsers);\n\t\t\t\t\treturn this.$store.dispatch('notifications/updatePlaceholders', {\n\t\t\t\t\t\tsearchCollection: true,\n\t\t\t\t\t\titems: newItems,\n\t\t\t\t\t\tfirstItem: this.searchPageLoaded * this.pageLimit,\n\t\t\t\t\t});\n\n\t\t\t\t}).then(() => {\n\t\t\t\t\tthis.searchPageLoaded++;\n\n\t\t\t\t\treturn this.onAfterLoadNextPageRequest();\n\t\t\t\t}).catch(result => {\n\t\t\t\t\tthis.$store.dispatch('notifications/clearPlaceholders');\n\t\t\t\t\tLogger.warn('History request error', result);\n\t\t\t\t});\n\t\t},\n\t\tonAfterLoadNextPageRequest()\n\t\t{\n\t\t\tLogger.warn('onAfterLoadNextPageRequest');\n\t\t\tif (this.searchPagesRequested > 0)\n\t\t\t{\n\t\t\t\tLogger.warn('We have delayed requests -', this.searchPagesRequested);\n\t\t\t\tthis.searchPagesRequested--;\n\n\t\t\t\treturn this.loadNextPage();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tLogger.warn('No more delayed requests, clearing placeholders');\n\t\t\t\tthis.$store.dispatch('notifications/clearPlaceholders');\n\t\t\t\tthis.isLoadingNewPage = false;\n\n\t\t\t\treturn true;\n\t\t\t}\n\t\t},\n\t\tgetSearchRequestParams()\n\t\t{\n\t\t\tconst params = {\n\t\t\t\t'SEARCH_TEXT': this.searchQuery,\n\t\t\t\t'SEARCH_TYPE': this.searchType,\n\t\t\t\t'LIMIT': this.pageLimit,\n\t\t\t\t'CONVERT_TEXT': 'Y'\n\t\t\t};\n\t\t\tif (BX.parseDate(this.searchDate) instanceof Date)\n\t\t\t{\n\t\t\t\tparams['SEARCH_DATE'] = BX.parseDate(this.searchDate).toISOString();\n\t\t\t}\n\t\t\tif (this.lastId > 0)\n\t\t\t{\n\t\t\t\tparams['LAST_ID'] = this.lastId;\n\t\t\t}\n\n\t\t\treturn params;\n\t\t},\n\t\tresetSearchState()\n\t\t{\n\t\t\tthis.$store.dispatch('notifications/deleteSearchResults');\n\t\t\tthis.initialDataReceived = false;\n\t\t\tthis.lastId = 0;\n\t\t\tthis.isLoadingNewPage = true;\n\t\t\tthis.placeholderCount = 0;\n\t\t\tthis.searchPageLoaded = 0;\n\t\t},\n\t\tdrawPlaceholders(amount = 0)\n\t\t{\n\t\t\tconst placeholders = this.generatePlaceholders(amount);\n\n\t\t\treturn this.$store.dispatch('notifications/setSearchResults', {notification: placeholders});\n\t\t},\n\n\t\t//events\n\t\tonScroll(event)\n\t\t{\n\t\t\tif (!this.isReadyToLoadNewPage(event) || !this.initialDataReceived || this.remainingPages <= 0)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (this.isLoadingNewPage)\n\t\t\t{\n\t\t\t\tthis.drawPlaceholders(this.pageLimit).then(() => {\n\t\t\t\t\tthis.searchPagesRequested++;\n\t\t\t\t\tLogger.warn('Already loading! Draw placeholders and add request, total - ', this.pagesRequested);\n\t\t\t\t});\n\t\t\t}\n\t\t\telse //if (!this.isLoadingNewPage)\n\t\t\t{\n\t\t\t\tLogger.warn('Starting new request');\n\n\t\t\t\tthis.isLoadingNewPage = true;\n\n\t\t\t\tthis.drawPlaceholders(this.pageLimit).then(() => {\n\t\t\t\t\tthis.loadNextPage();\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tonButtonsClick(event)\n\t\t{\n\t\t\tconst params = this.getConfirmRequestParams(event);\n\t\t\tconst itemId = +params.NOTIFY_ID;\n\t\t\tconst notification = this.$store.getters['notifications/getById'](itemId)\n\n\t\t\tthis.getRestClient().callMethod('im.notify.confirm', params)\n\t\t\t\t.then(() => {\n\t\t\t\t\tthis.$store.dispatch('notifications/delete', {\n\t\t\t\t\t\tid: itemId,\n\t\t\t\t\t});\n\t\t\t\t\tif (notification.unread)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.$store.dispatch('notifications/setCounter', { unreadTotal: this.unreadCounter - 1});\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.catch(() => {\n\t\t\t\t\tthis.$store.dispatch('notifications/update', {\n\t\t\t\t\t\tid: itemId,\n\t\t\t\t\t\tfields: { display: true }\n\t\t\t\t\t});\n\t\t\t\t});\n\n\t\t\tthis.$store.dispatch('notifications/update', {\n\t\t\t\tid: itemId,\n\t\t\t\tfields: { display: false }\n\t\t\t});\n\t\t},\n\t\tonDeleteClick(event)\n\t\t{\n\t\t\tconst itemId = +event.item.id;\n\t\t\tconst notification = this.$store.getters['notifications/getSearchItemById'](itemId)\n\n\t\t\tthis.getRestClient().callMethod('im.notify.delete', { id: itemId })\n\t\t\t\t.then(() => {\n\t\t\t\t\tthis.$store.dispatch('notifications/delete', { id: itemId, searchMode: true});\n\t\t\t\t\t//we need to load more, if we are on the first page and we have not enough elements (~15).\n\t\t\t\t\tif (!this.isLoadingNewPage && this.remainingPages > 0 && this.searchResults.length < 15)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.isLoadingNewPage = true;\n\n\t\t\t\t\t\tthis.drawPlaceholders(this.pageLimit).then(() => {\n\t\t\t\t\t\t\tthis.loadNextPage();\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\tif (notification.unread)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.$store.dispatch('notifications/setCounter', { unreadTotal: this.unreadCounter - 1});\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.catch((error) => {\n\t\t\t\t\tconsole.error(error)\n\t\t\t\t\tthis.$store.dispatch('notifications/update', {\n\t\t\t\t\t\tid: itemId,\n\t\t\t\t\t\tfields: { display: true },\n\t\t\t\t\t\tsearchMode: true\n\t\t\t\t\t});\n\t\t\t\t});\n\n\t\t\tthis.$store.dispatch('notifications/update', {\n\t\t\t\tid: itemId,\n\t\t\t\tfields: { display: false },\n\t\t\t\tsearchMode: true\n\t\t\t});\n\t\t},\n\t},\n\t//language=Vue\n\ttemplate: `\n\t\t<div class=\"bx-messenger-notifications-search-results-wrap\" @scroll.passive=\"onScroll\">\n\t\t\t<notification-item\n\t\t\t\tv-for=\"listItem in searchResults\"\n\t\t\t\tv-if=\"listItem.display\"\n\t\t\t\t:key=\"listItem.id\"\n\t\t\t\t:data-id=\"listItem.id\"\n\t\t\t\t:rawListItem=\"listItem\"\n\t\t\t\tsearchMode=\"true\"\n\t\t\t\t@buttonsClick=\"onButtonsClick\"\n\t\t\t\t@contentClick=\"onContentClick\"\n\t\t\t\t@deleteClick=\"onDeleteClick\"\n\t\t\t/>\n\t\t\t<mounting-portal :mount-to=\"popupIdSelector\" append v-if=\"popupInstance\">\n\t\t\t\t<popup :type=\"contentPopupType\" :value=\"contentPopupValue\" :popupInstance=\"popupInstance\"/>\n\t\t\t</mounting-portal>\n\t\t\t<div \n\t\t\t\tv-if=\"searchResults.length <= 0\" \n\t\t\t\tstyle=\"padding-top: 210px; margin-bottom: 20px;\"\n\t\t\t\tclass=\"bx-messenger-box-empty bx-notifier-content-empty\" \n\t\t\t>\n\t\t\t\t{{ $Bitrix.Loc.getMessage('IM_NOTIFICATIONS_SEARCH_RESULTS_NOT_FOUND') }}\n\t\t\t</div>\n\t\t</div>\n\t`\n};","/**\n * Bitrix im\n * Notifications vue component\n *\n * @package bitrix\n * @subpackage im\n * @copyright 2001-2020 Bitrix\n */\n\nimport 'ui.design-tokens';\n\nimport { BitrixVue } from 'ui.vue';\nimport { Vuex } from 'ui.vue.vuex';\nimport { Logger } from 'im.lib.logger';\nimport { Utils as MessengerUtils } from 'im.lib.utils';\nimport { Popup } from 'im.view.popup';\nimport { MountingPortal } from 'ui.vue.portal';\nimport { Animation } from \"im.lib.animation\";\n\nimport { MenuManager } from 'main.popup';\nimport { Type } from 'main.core';\nimport 'ui.forms';\n\nimport { NotificationItem } from './component/notification-item';\nimport { NotificationSearchResult } from './component/notification-search-result';\nimport './notifications.css';\nimport { EventType, RestMethod, RestMethodHandler, NotificationTypesCodes } from 'im.const';\nimport { NotificationCore } from './mixin/notificationCore';\nimport { Timer } from 'im.lib.timer';\nimport { EventEmitter } from \"main.core.events\";\n\nconst ObserverType = Object.freeze({\n\tread: 'read',\n\tnone: 'none',\n});\n\n/**\n * @notice Do not mutate or clone this component! It is under development.\n */\nBitrixVue.component('bx-im-component-notifications',\n{\n\tcomponents:\n\t{\n\t\tNotificationItem,\n\t\tMountingPortal,\n\t\tPopup,\n\t\tNotificationSearchResult\n\t},\n\tdirectives:\n\t{\n\t\t'bx-im-directive-notifications-observer':\n\t\t{\n\t\t\tinserted(element, bindings, vnode)\n\t\t\t{\n\t\t\t\tif (bindings.value === ObserverType.none)\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif (!vnode.context.observers[bindings.value])\n\t\t\t\t{\n\t\t\t\t\tvnode.context.observers[bindings.value] = vnode.context.getObserver({\n\t\t\t\t\t\ttype: bindings.value\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tvnode.context.observers[bindings.value].observe(element);\n\n\t\t\t\treturn true;\n\t\t\t},\n\t\t\tunbind(element, bindings, vnode)\n\t\t\t{\n\t\t\t\tif (bindings.value === ObserverType.none)\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tif (vnode.context.observers[bindings.value])\n\t\t\t\t{\n\t\t\t\t\tvnode.context.observers[bindings.value].unobserve(element);\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t},\n\tmixins: [\n\t\tNotificationCore\n\t],\n\tprops:\n\t{\n\t\tdarkTheme: { default: undefined },\n\t},\n\tdata: function()\n\t{\n\t\treturn {\n\t\t\tinitialDataReceived: false,\n\t\t\tperPage: 50,\n\t\t\tisLoadingInitialData: false,\n\t\t\tisLoadingNewPage: false,\n\t\t\tpagesRequested: 0,\n\t\t\tpagesLoaded: 0,\n\t\t\tlastId: 0,\n\t\t\tlastType: NotificationTypesCodes.confirm,\n\n\t\t\tObserverType: ObserverType,\n\t\t\tnotificationsOnScreen: [],\n\t\t\tnotificationsToRead: [],\n\t\t\tnotificationsToDelete: [],\n\t\t\tchangeReadStatusBlockTimeout: {},\n\t\t\tfirstUnreadNotificationOnInit: null,\n\n\t\t\tcontentPopupType: '',\n\t\t\tcontentPopupValue: '',\n\t\t\tpopupInstance: null,\n\t\t\tpopupIdSelector: '',\n\t\t\tcontextPopupInstance: null,\n\n\t\t\tsearchQuery: '',\n\t\t\tsearchType: '',\n\t\t\tsearchDate: '',\n\t\t\tshowSearch: false,\n\n\t\t\tcallViewState: false,\n\t\t};\n\t},\n\tcomputed:\n\t{\n\t\tNotificationTypesCodes: () => NotificationTypesCodes,\n\t\tremainingPages()\n\t\t{\n\t\t\treturn Math.ceil(\n\t\t\t\t(this.total - this.notification.length) / this.perPage\n\t\t\t);\n\t\t},\n\t\tlocalize()\n\t\t{\n\t\t\treturn BitrixVue.getFilteredPhrases('IM_NOTIFICATIONS_', this);\n\t\t},\n\t\tvisibleNotifications()\n\t\t{\n\t\t\treturn this.notification.filter((notificationItem) => {\n\t\t\t\treturn notificationItem.display;\n\t\t\t});\n\t\t},\n\t\thighestNotificationId()\n\t\t{\n\t\t\treturn this.notification.reduce((highestId, currentNotification) => {\n\t\t\t\treturn currentNotification.id > highestId ? currentNotification.id : highestId\n\t\t\t}, 0);\n\t\t},\n\t\tisNeedToReadAll()\n\t\t{\n\t\t\tconst confirmCounterInModel = this.notification.filter(notificationItem => {\n\t\t\t\treturn notificationItem.sectionCode === NotificationTypesCodes.confirm\n\t\t\t}).length;\n\n\t\t\treturn confirmCounterInModel < this.unreadCounter\n\t\t},\n\t\tpanelStyles()\n\t\t{\n\t\t\tif (this.callViewState === BX.Call.Controller.ViewState.Folded && !this.showSearch)\n\t\t\t{\n\t\t\t\treturn {\n\t\t\t\t\tpaddingBottom: '60px' // height of .bx-messenger-videocall-panel-folded\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn {};\n\t\t},\n\t\tfilterBoxStyles()\n\t\t{\n\t\t\tif (this.callViewState === BX.Call.Controller.ViewState.Folded && this.showSearch)\n\t\t\t{\n\t\t\t\treturn {\n\t\t\t\t\tpaddingTop: '70px' // height of .bx-messenger-videocall-panel-folded + 10px for space\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn {};\n\t\t},\n\t\tfirstUnreadNotification()\n\t\t{\n\t\t\tlet unreadNotification = null;\n\t\t\tconst maxNotificationIndex = this.notification.length - 1;\n\n\t\t\tfor (let i = 0; i <= maxNotificationIndex; i++)\n\t\t\t{\n\t\t\t\tif (this.notification[i].unread && this.notification[i].sectionCode !== NotificationTypesCodes.placeholder)\n\t\t\t\t{\n\t\t\t\t\tunreadNotification = this.notification[i];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn unreadNotification;\n\t\t},\n\t\tfirstUnreadNotificationBelowVisible()\n\t\t{\n\t\t\tconst minIdOnScreen = Math.max(...this.notificationsOnScreen);\n\n\t\t\tlet unreadId = null;\n\t\t\tconst maxNotificationIndex = this.notification.length - 1;\n\n\t\t\tfor (let i = 0; i <= maxNotificationIndex; i++)\n\t\t\t{\n\t\t\t\tif (\n\t\t\t\t\tthis.notification[i].unread\n\t\t\t\t\t&& minIdOnScreen > this.notification[i].id\n\t\t\t\t\t&& this.notification[i].sectionCode === NotificationTypesCodes.simple\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\tunreadId = this.notification[i].id;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn unreadId;\n\t\t},\n\t\tisUnreadNotificationVisible()\n\t\t{\n\t\t\tconst unreadOnScreen = Array.from(this.notificationsOnScreen).filter(idOnScreen => {\n\t\t\t\tconst notificationOnScreen = this.$store.getters['notifications/getById'](idOnScreen);\n\n\t\t\t\treturn notificationOnScreen ? notificationOnScreen.unread : false;\n\t\t\t});\n\n\t\t\treturn unreadOnScreen.length > 0\n\t\t},\n\t\tshowScrollButton()\n\t\t{\n\t\t\tif (!this.initialDataReceived)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (this.unreadCounter <= 0 || !BXIM.settings.notifyAutoRead)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (this.notificationsOnScreen.length === 0)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (this.isUnreadNotificationVisible)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t},\n\n\t\thasUnreadBelowVisible()\n\t\t{\n\t\t\tlet unreadCounterBeforeVisible = 0;\n\n\t\t\tfor (let i = 0; i <= this.notification.length - 1; i++)\n\t\t\t{\n\t\t\t\tif (this.notification[i].unread && this.notification[i].sectionCode !== NotificationTypesCodes.placeholder)\n\t\t\t\t{\n\t\t\t\t\t++unreadCounterBeforeVisible;\n\t\t\t\t}\n\n\t\t\t\t// In this case we decide that there is no more unread notifications below visible notifications,\n\t\t\t\t// so we show arrow up on scroll button.\n\t\t\t\tif (\n\t\t\t\t\tthis.notificationsOnScreen.includes(this.notification[i].id)\n\t\t\t\t\t&& this.unreadCounter === unreadCounterBeforeVisible\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn true;\n\t\t},\n\n\t\tarrowButtonClass()\n\t\t{\n\t\t\tlet arrowUp = !this.hasUnreadBelowVisible;\n\n\t\t\treturn {\n\t\t\t\t'bx-im-notifications-scroll-button-arrow-down': !arrowUp,\n\t\t\t\t'bx-im-notifications-scroll-button-arrow-up': arrowUp,\n\t\t\t\t'bx-im-notifications-scroll-button-arrow': true,\n\t\t\t}\n\t\t},\n\t\tfilterTypes()\n\t\t{\n\t\t\tconst originalSchema = Object.assign({}, this.schema);\n\n\t\t\t// get rid of some subcategories\n\t\t\tconst modulesToReduceListItems = [\n\t\t\t\t'timeman', 'mail', 'disk', 'bizproc', 'voximplant', 'sender', 'blog', 'vote', 'socialnetwork',\n\t\t\t\t'imopenlines', 'photogallery', 'intranet', 'forum'\n\t\t\t];\n\t\t\tmodulesToReduceListItems.forEach(moduleId => {\n\t\t\t\tif (originalSchema.hasOwnProperty(moduleId))\n\t\t\t\t{\n\t\t\t\t\tdelete originalSchema[moduleId].LIST;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// rename some groups\n\t\t\tif (originalSchema.hasOwnProperty('calendar'))\n\t\t\t{\n\t\t\t\toriginalSchema['calendar'].NAME = this.localize['IM_NOTIFICATIONS_SEARCH_FILTER_TYPE_CALENDAR'];\n\t\t\t}\n\t\t\tif (originalSchema.hasOwnProperty('sender'))\n\t\t\t{\n\t\t\t\toriginalSchema['sender'].NAME = this.localize['IM_NOTIFICATIONS_SEARCH_FILTER_TYPE_SENDER'];\n\t\t\t}\n\t\t\tif (originalSchema.hasOwnProperty('blog'))\n\t\t\t{\n\t\t\t\toriginalSchema['blog'].NAME = this.localize['IM_NOTIFICATIONS_SEARCH_FILTER_TYPE_BLOG'];\n\t\t\t}\n\t\t\tif (originalSchema.hasOwnProperty('socialnetwork'))\n\t\t\t{\n\t\t\t\toriginalSchema['socialnetwork'].NAME = this.localize['IM_NOTIFICATIONS_SEARCH_FILTER_TYPE_SOCIALNETWORK'];\n\t\t\t}\n\t\t\tif (originalSchema.hasOwnProperty('intranet'))\n\t\t\t{\n\t\t\t\toriginalSchema['intranet'].NAME = this.localize['IM_NOTIFICATIONS_SEARCH_FILTER_TYPE_INTRANET'];\n\t\t\t}\n\n\t\t\t// we need only this modules in this order!\n\t\t\tconst modulesToShowInFilter = [\n\t\t\t\t'tasks', 'calendar', 'crm', 'timeman', 'mail', 'disk', 'bizproc', 'voximplant', 'sender',\n\t\t\t\t'blog', 'vote', 'socialnetwork', 'imopenlines', 'photogallery', 'intranet', 'forum'\n\t\t\t];\n\t\t\tconst notificationFilterTypes = [];\n\t\t\tmodulesToShowInFilter.forEach(moduleId => {\n\t\t\t\tif (originalSchema.hasOwnProperty(moduleId))\n\t\t\t\t{\n\t\t\t\t\tnotificationFilterTypes.push(originalSchema[moduleId]);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn notificationFilterTypes;\n\t\t},\n\t\t...Vuex.mapState({\n\t\t\tnotification: state => state.notifications.collection,\n\t\t\ttotal: state => state.notifications.total,\n\t\t\tunreadCounter: state => state.notifications.unreadCounter,\n\t\t\tschema: state => state.notifications.schema,\n\t\t})\n\t},\n\tcreated()\n\t{\n\t\tthis.drawPlaceholders().then(() => {\n\t\t\tthis.getInitialData();\n\t\t});\n\n\t\tEventEmitter.subscribe(EventType.notification.updateState, this.onUpdateState);\n\t\twindow.addEventListener('focus', this.onWindowFocus);\n\t\twindow.addEventListener('blur', this.onWindowBlur);\n\n\t\tif (BXIM && BX.Call)\n\t\t{\n\t\t\tthis.callViewState = BXIM.callController.callViewState;\n\n\t\t\tBXIM.callController.subscribe(BX.Call.Controller.Events.onViewStateChanged, this.onCallViewStateChange);\n\t\t}\n\n\t\tthis.timer = new Timer();\n\t\tthis.readNotificationsQueue = new Set();\n\t\tthis.readNotificationsNodes = {};\n\t\tthis.observers = {};\n\n\t\tthis.readVisibleNotificationsDelayed = MessengerUtils.debounce(this.readVisibleNotifications, 50, this);\n\t},\n\tmounted()\n\t{\n\t\tthis.windowFocused = document.hasFocus();\n\t},\n\tbeforeDestroy()\n\t{\n\t\tthis.observers = {};\n\t\twindow.removeEventListener('focus', this.onWindowFocus);\n\t\twindow.removeEventListener('blur', this.onWindowBlur);\n\t\tEventEmitter.unsubscribe(EventType.notification.updateState, this.onUpdateState);\n\t\tif (BXIM && BX.Call)\n\t\t{\n\t\t\tBXIM.callController.unsubscribe(BX.Call.Controller.Events.onViewStateChanged, this.onCallViewStateChange);\n\t\t}\n\t},\n\tmethods:\n\t{\n\t\tgetFirstUnreadNotificationOnInit()\n\t\t{\n\t\t\tif (this.unreadCounter <= 0)\n\t\t\t{\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tlet unreadId = null;\n\t\t\tconst maxNotificationIndex = this.notification.length - 1;\n\n\t\t\tfor (let i = 0; i <= maxNotificationIndex; i++)\n\t\t\t{\n\t\t\t\tif (this.notification[i].unread)\n\t\t\t\t{\n\t\t\t\t\tunreadId = this.notification[i].id;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn unreadId;\n\t\t},\n\t\tonCallViewStateChange({data})\n\t\t{\n\t\t\tthis.callViewState = data.callViewState;\n\t\t},\n\t\tonUpdateState(event)\n\t\t{\n\t\t\tconst lastNotificationId = event.data.lastId;\n\t\t\tif (\n\t\t\t\t!this.isLoadingInitialData\n\t\t\t\t&& this.highestNotificationId > 0\n\t\t\t\t&& lastNotificationId !== this.highestNotificationId\n\t\t\t)\n\t\t\t{\n\t\t\t\tthis.getInitialData();\n\t\t\t}\n\t\t},\n\t\treadVisibleNotifications()\n\t\t{\n\t\t\t//todo: replace legacy chat API\n\t\t\tif (!this.windowFocused || !BXIM.settings.notifyAutoRead)\n\t\t\t{\n\t\t\t\tLogger.warn('reading is disabled!');\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tthis.readNotificationsQueue.forEach(notificationId => {\n\t\t\t\tif (this.readNotificationsNodes[notificationId])\n\t\t\t\t{\n\t\t\t\t\tdelete this.readNotificationsNodes[notificationId];\n\t\t\t\t}\n\t\t\t\tthis.readNotifications(parseInt(notificationId, 10));\n\t\t\t});\n\t\t\tthis.readNotificationsQueue.clear();\n\t\t},\n\t\tgetInitialData()\n\t\t{\n\t\t\tthis.isLoadingInitialData = true;\n\t\t\tconst queryParams = {\n\t\t\t\t[RestMethodHandler.imNotifyGet]: [RestMethod.imNotifyGet, {\n\t\t\t\t\t'LIMIT': this.perPage,\n\t\t\t\t\t'CONVERT_TEXT': 'Y'\n\t\t\t\t}],\n\t\t\t\t[RestMethodHandler.imNotifySchemaGet]: [RestMethod.imNotifySchemaGet, {}],\n\t\t\t};\n\n\t\t\tthis.getRestClient().callBatch(queryParams, (response) => {\n\t\t\t\tLogger.warn('im.notify.get: initial result', response[RestMethodHandler.imNotifyGet].data());\n\t\t\t\tthis.processInitialData(response[RestMethodHandler.imNotifyGet].data());\n\t\t\t\tthis.processSchemaData(response[RestMethodHandler.imNotifySchemaGet].data());\n\t\t\t\tthis.pagesLoaded++;\n\t\t\t\tthis.isLoadingInitialData = false;\n\t\t\t\tthis.firstUnreadNotificationOnInit = this.getFirstUnreadNotificationOnInit();\n\t\t\t}, false, false);\n\t\t},\n\t\tprocessInitialData(data)\n\t\t{\n\t\t\t//if we got empty data - clear all placeholders\n\t\t\tif (!data.notifications || data.notifications.length === 0)\n\t\t\t{\n\t\t\t\tthis.$store.dispatch('notifications/clearPlaceholders');\n\n\t\t\t\tthis.$store.dispatch('notifications/setTotal', {\n\t\t\t\t\ttotal: this.notification.length,\n\t\t\t\t});\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tthis.lastId = this.getLastItemId(data.notifications);\n\t\t\tthis.lastType = this.getLastItemType(data.notifications);\n\n\t\t\tthis.$store.dispatch('notifications/clearPlaceholders');\n\t\t\tthis.$store.dispatch('notifications/setCounter', {\n\t\t\t\tunreadTotal: data.total_unread_count\n\t\t\t});\n\t\t\tthis.$store.dispatch('notifications/set', {\n\t\t\t\tnotification: data.notifications,\n\t\t\t\ttotal: data.total_count,\n\t\t\t});\n\t\t\tthis.$store.dispatch('users/set', data.users);\n\t\t\tthis.updateRecentList(data.total_unread_count, true);\n\n\t\t\tthis.initialDataReceived = true;\n\t\t},\n\t\tprocessSchemaData(data)\n\t\t{\n\t\t\tthis.$store.dispatch('notifications/setSchema', {data: data});\n\t\t},\n\t\tdrawPlaceholders()\n\t\t{\n\t\t\tconst placeholders = this.generatePlaceholders(this.perPage);\n\n\t\t\treturn this.$store.dispatch('notifications/set', {notification: placeholders});\n\t\t},\n\t\tloadNextPage()\n\t\t{\n\t\t\tLogger.warn(`Loading more notifications!`);\n\n\t\t\tconst queryParams = {\n\t\t\t\t'LIMIT': this.perPage,\n\t\t\t\t'LAST_ID': this.lastId,\n\t\t\t\t'LAST_TYPE': this.lastType,\n\t\t\t\t'CONVERT_TEXT': 'Y'\n\t\t\t};\n\n\t\t\tthis.getRestClient().callMethod('im.notify.get', queryParams).then(result => {\n\t\t\t\tLogger.warn('im.notify.get: new page results', result.data());\n\n\t\t\t\tconst newUsers = result.data().users;\n\t\t\t\tconst newItems = result.data().notifications;\n\n\t\t\t\t//if we got empty data - clear all placeholders\n\t\t\t\tif (!newItems || newItems.length === 0)\n\t\t\t\t{\n\t\t\t\t\tthis.$store.dispatch('notifications/clearPlaceholders');\n\n\t\t\t\t\tthis.$store.dispatch('notifications/setTotal', {\n\t\t\t\t\t\ttotal: this.notification.length,\n\t\t\t\t\t});\n\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tthis.lastId = this.getLastItemId(newItems);\n\t\t\t\tthis.lastType = this.getLastItemType(newItems);\n\n\t\t\t\tthis.$store.dispatch('users/set', newUsers);\n\n\t\t\t\t//change temp data in models to real data, we need new items, first item to update and section\n\t\t\t\treturn this.$store.dispatch('notifications/updatePlaceholders', {\n\t\t\t\t\t\titems: newItems,\n\t\t\t\t\t\tfirstItem: this.pagesLoaded * this.perPage,\n\t\t\t\t\t});\n\t\t\t}).then(() => {\n\t\t\t\tthis.pagesLoaded++;\n\t\t\t\tLogger.warn('Page loaded. Total loaded - ', this.pagesLoaded);\n\n\t\t\t\treturn this.onAfterLoadNextPageRequest();\n\t\t\t}).catch(result => {\n\t\t\t\tLogger.warn('Request history error', result);\n\t\t\t});\n\t\t},\n\t\tonAfterLoadNextPageRequest()\n\t\t{\n\t\t\tLogger.warn('onAfterLoadNextPageRequest');\n\t\t\tif (this.pagesRequested > 0)\n\t\t\t{\n\t\t\t\tLogger.warn('We have delayed requests -', this.pagesRequested);\n\t\t\t\tthis.pagesRequested--;\n\n\t\t\t\treturn this.loadNextPage();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tLogger.warn('No more delayed requests, clearing placeholders');\n\t\t\t\tthis.$store.dispatch('notifications/clearPlaceholders');\n\t\t\t\tthis.isLoadingNewPage = false;\n\n\t\t\t\treturn true;\n\t\t\t}\n\t\t},\n\t\tchangeReadStatus(item)\n\t\t{\n\t\t\tthis.$store.dispatch('notifications/read', { ids: [item.id], action: item.unread });\n\t\t\t// change the unread counter\n\t\t\tconst originalCounterBeforeUpdate = this.unreadCounter;\n\t\t\tconst counterValue = item.unread ? this.unreadCounter - 1 : this.unreadCounter + 1;\n\t\t\tthis.updateRecentList(counterValue);\n\t\t\tthis.$store.dispatch('notifications/setCounter', {\n\t\t\t\tunreadTotal: counterValue\n\t\t\t});\n\n\t\t\tclearTimeout(this.changeReadStatusBlockTimeout[item.id]);\n\t\t\tthis.changeReadStatusBlockTimeout[item.id] = setTimeout(() => {\n\t\t\t\tthis.getRestClient().callMethod('im.notify.read', {\n\t\t\t\t\t\tid: item.id,\n\t\t\t\t\t\taction: item.unread ? 'Y' : 'N',\n\t\t\t\t\t\tonly_current: 'Y'\n\t\t\t\t\t})\n\t\t\t\t\t.then(() => {\n\t\t\t\t\t\tLogger.warn(`Notification ${item.id} unread status set to ${!item.unread}`);\n\t\t\t\t\t})\n\t\t\t\t\t.catch((error) => {\n\t\t\t\t\t\tconsole.error(error);\n\t\t\t\t\t\tthis.$store.dispatch('notifications/read', { ids: [item.id], action: !item.unread });\n\t\t\t\t\t\t// restore the unread counter in case of an error\n\t\t\t\t\t\tthis.updateRecentList(originalCounterBeforeUpdate)\n\t\t\t\t\t\tthis.$store.dispatch('notifications/setCounter', {\n\t\t\t\t\t\t\tunreadTotal: originalCounterBeforeUpdate\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t}, 1500);\n\t\t},\n\t\tdelete(item)\n\t\t{\n\t\t\tconst itemId = +item.id;\n\t\t\tthis.notificationsToDelete.push(itemId);\n\t\t\tconst notification = this.$store.getters['notifications/getById'](itemId);\n\t\t\tthis.$store.dispatch('notifications/update', {\n\t\t\t\tid: itemId,\n\t\t\t\tfields: { display: false }\n\t\t\t});\n\t\t\t// change the unread counter\n\t\t\tconst originalCounterBeforeUpdate = this.unreadCounter;\n\t\t\tconst counterValue = notification.unread ? this.unreadCounter - 1 : this.unreadCounter;\n\t\t\tthis.updateRecentList(counterValue, true)\n\t\t\tthis.$store.dispatch('notifications/setCounter', {\n\t\t\t\tunreadTotal: counterValue\n\t\t\t});\n\n\t\t\tthis.timer.stop('deleteNotificationServer', 'notifications', true);\n\n\t\t\tthis.timer.start('deleteNotificationServer', 'notifications', .5, () => {\n\t\t\t\tconst idsToDelete = this.notificationsToDelete;\n\t\t\t\tthis.notificationsToDelete = [];\n\n\t\t\t\tthis.getRestClient().callMethod('im.notify.delete', { id: idsToDelete })\n\t\t\t\t\t.then(() => {\n\t\t\t\t\t\tidsToDelete.forEach(id => {\n\t\t\t\t\t\t\tthis.$store.dispatch('notifications/delete', { id: id });\n\t\t\t\t\t\t});\n\n\t\t\t\t\t})\n\t\t\t\t\t.catch((error) => {\n\t\t\t\t\t\tconsole.error(error)\n\t\t\t\t\t\tidsToDelete.forEach(id => {\n\t\t\t\t\t\t\tthis.$store.dispatch('notifications/update', {\n\t\t\t\t\t\t\t\tid: id,\n\t\t\t\t\t\t\t\tfields: { display: true }\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\t// restore the unread counter in case of an error\n\t\t\t\t\t\tthis.updateRecentList(originalCounterBeforeUpdate, true)\n\t\t\t\t\t\tthis.$store.dispatch('notifications/setCounter', {\n\t\t\t\t\t\t\tunreadTotal: originalCounterBeforeUpdate\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\tgetObserver(config)\n\t\t{\n\t\t\tif (\n\t\t\t\ttypeof window.IntersectionObserver === 'undefined'\n\t\t\t\t|| config.type === ObserverType.none\n\t\t\t)\n\t\t\t{\n\t\t\t\treturn {\n\t\t\t\t\tobserve: () => {},\n\t\t\t\t\tunobserve: () => {}\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconst observerCallback = (entries) => {\n\t\t\t\tentries.forEach(entry => {\n\t\t\t\t\tlet sendReadEvent = false;\n\t\t\t\t\tconst entryNotificationId = parseInt(entry.target.dataset.id, 10);\n\t\t\t\t\tif (entry.isIntersecting)\n\t\t\t\t\t{\n\t\t\t\t\t\t//on Windows with interface scaling intersectionRatio will never be 1\n\t\t\t\t\t\tif (entry.intersectionRatio >= 0.99)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tsendReadEvent = true;\n\t\t\t\t\t\t\tthis.notificationsOnScreen.push(entryNotificationId);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (\n\t\t\t\t\t\t\tentry.intersectionRatio > 0\n\t\t\t\t\t\t\t&& entry.intersectionRect.height > entry.rootBounds.height / 2\n\t\t\t\t\t\t)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tsendReadEvent = true;\n\t\t\t\t\t\t\tthis.notificationsOnScreen.push(entryNotificationId);\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\tthis.notificationsOnScreen = this.notificationsOnScreen.filter(notificationId => notificationId !== entryNotificationId);\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\tthis.notificationsOnScreen = this.notificationsOnScreen.filter(notificationId => notificationId !== entryNotificationId);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (sendReadEvent)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.readNotificationsQueue.add(entryNotificationId);\n\t\t\t\t\t\tthis.readNotificationsNodes[entryNotificationId] = entry.target;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.readNotificationsQueue.delete(entryNotificationId);\n\t\t\t\t\t\tdelete this.readNotificationsNodes[entryNotificationId];\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.readVisibleNotificationsDelayed();\n\t\t\t\t});\n\t\t\t};\n\n\t\t\tconst observerOptions = {\n\t\t\t\troot: this.$refs['listNotifications'],\n\t\t\t\tthreshold: new Array(101).fill(0).map((zero, index) => index * 0.01)\n\t\t\t};\n\n\t\t\treturn new IntersectionObserver(observerCallback, observerOptions);\n\n\t\t},\n\n\t\t//events\n\t\tonScroll(event)\n\t\t{\n\t\t\tif (!this.isReadyToLoadNewPage(event))\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (this.remainingPages === 0 || !this.initialDataReceived)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (this.isLoadingNewPage)\n\t\t\t{\n\t\t\t\tthis.drawPlaceholders().then(() => {\n\t\t\t\t\tthis.pagesRequested++;\n\t\t\t\t\tLogger.warn('Already loading! Draw placeholders and add request, total - ', this.pagesRequested);\n\t\t\t\t});\n\t\t\t}\n\t\t\telse //if (!this.isLoadingNewPage)\n\t\t\t{\n\t\t\t\tLogger.warn('Starting new request');\n\n\t\t\t\tthis.isLoadingNewPage = true;\n\n\t\t\t\tthis.drawPlaceholders().then(() => {\n\t\t\t\t\tthis.loadNextPage();\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tonWindowFocus()\n\t\t{\n\t\t\tthis.windowFocused = true;\n\t\t\tthis.readVisibleNotifications();\n\t\t},\n\t\tonWindowBlur()\n\t\t{\n\t\t\tthis.windowFocused = false;\n\t\t},\n\t\tonDoubleClick(event)\n\t\t{\n\t\t\tthis.changeReadStatus(event.item);\n\t\t},\n\t\tonButtonsClick(event)\n\t\t{\n\t\t\tconst params = this.getConfirmRequestParams(event);\n\t\t\tconst itemId = +params.NOTIFY_ID;\n\n\t\t\tthis.$store.dispatch('notifications/update', {\n\t\t\t\tid: itemId,\n\t\t\t\tfields: { display: false }\n\t\t\t});\n\t\t\t// change the unread counter\n\t\t\tconst counterValueBeforeUpdate = this.unreadCounter;\n\t\t\tconst counterValue = this.unreadCounter - 1;\n\t\t\tthis.updateRecentList(counterValue, true);\n\t\t\tthis.$store.dispatch('notifications/setCounter', {\n\t\t\t\tunreadTotal: counterValue\n\t\t\t});\n\n\t\t\tthis.getRestClient().callMethod('im.notify.confirm', params)\n\t\t\t\t.then(() => {\n\t\t\t\t\tthis.$store.dispatch('notifications/delete', {\n\t\t\t\t\t\tid: itemId,\n\t\t\t\t\t});\n\t\t\t\t})\n\t\t\t\t.catch(() => {\n\t\t\t\t\tthis.$store.dispatch('notifications/update', {\n\t\t\t\t\t\tid: itemId,\n\t\t\t\t\t\tfields: { display: true }\n\t\t\t\t\t});\n\t\t\t\t\t// restore the unread counter in case of an error\n\t\t\t\t\tthis.updateRecentList(counterValueBeforeUpdate, true);\n\t\t\t\t\tthis.$store.dispatch('notifications/setCounter', {\n\t\t\t\t\t\tunreadTotal: counterValueBeforeUpdate\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t},\n\t\tonDeleteClick(event)\n\t\t{\n\t\t\tthis.delete(event.item);\n\n\t\t\t//we need to load more, if we are on the first page and we have more elements.\n\t\t\tif (!this.isLoadingNewPage && this.remainingPages > 0 && this.notification.length === this.perPage - 1)\n\t\t\t{\n\t\t\t\tthis.isLoadingNewPage = true;\n\n\t\t\t\tthis.drawPlaceholders().then(() => {\n\t\t\t\t\tthis.loadNextPage();\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tonRightClick(event)\n\t\t{\n\t\t\tif (this.contextPopupInstance !== null)\n\t\t\t{\n\t\t\t\tthis.closeContextMenuPopup();\n\t\t\t}\n\n\t\t\tconst items = this.getContextMenu(event.item);\n\n\t\t\tthis.contextPopupInstance = MenuManager.create({\n\t\t\t\tid: 'bx-messenger-context-popup-external-data',\n\t\t\t\tbindElement: event.event,\n\t\t\t\titems: items,\n\t\t\t\tevents: {\n\t\t\t\t\tonPopupClose: () => this.contextPopupInstance.destroy(),\n\t\t\t\t\tonPopupDestroy: () => this.contextPopupInstance = null\n\t\t\t\t},\n\t\t\t});\n\n\t\t\tthis.contextPopupInstance.show();\n\t\t},\n\n\t\tonDateFilterClick(event)\n\t\t{\n\t\t\tif (typeof (BX) !== 'undefined' && BX.calendar && BX.calendar.get().popup)\n\t\t\t{\n\t\t\t\tBX.calendar.get().popup.close();\n\t\t\t}\n\n\t\t\tBX.calendar({\n\t\t\t\tnode: event.target,\n\t\t\t\tfield: event.target,\n\t\t\t\tbTime: false,\n\t\t\t\tcallback_after: () => {\n\t\t\t\t\tthis.searchDate = event.target.value;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn false;\n\t\t},\n\n\t\tgetContextMenu(notification)\n\t\t{\n\t\t\tconst unreadMenuItemText = notification.unread ?\n\t\t\t\tthis.localize['IM_NOTIFICATIONS_CONTEXT_POPUP_SET_READ'] :\n\t\t\t\tthis.localize['IM_NOTIFICATIONS_CONTEXT_POPUP_SET_UNREAD'];\n\n\t\t\tconst blockMenuItemText = Type.isUndefined(BXIM.settingsNotifyBlocked[notification.settingName]) ?\n\t\t\t\tthis.localize['IM_NOTIFICATIONS_CONTEXT_POPUP_DONT_NOTIFY'] :\n\t\t\t\tthis.localize['IM_NOTIFICATIONS_CONTEXT_POPUP_NOTIFY'];\n\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\ttext: unreadMenuItemText,\n\t\t\t\t\tonclick: (event, item) => {\n\t\t\t\t\t\tthis.changeReadStatus(notification);\n\t\t\t\t\t\tthis.closeContextMenuPopup();\n\t\t\t\t\t}},\n\t\t\t\t{\n\t\t\t\t\ttext: this.localize['IM_NOTIFICATIONS_CONTEXT_POPUP_DELETE_NOTIFICATION'],\n\t\t\t\t\tonclick: (event, item) => {\n\t\t\t\t\t\tthis.delete(notification);\n\t\t\t\t\t\tthis.closeContextMenuPopup();\n\t\t\t\t\t}},\n\t\t\t\t{\n\t\t\t\t\ttext: blockMenuItemText,\n\t\t\t\t\tonclick: (event, item) => {\n\t\t\t\t\t\tconsole.log(notification)\n\t\t\t\t\t\tthis.closeContextMenuPopup();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t];\n\t\t},\n\t\tcloseContextMenuPopup()\n\t\t{\n\t\t\tthis.contextPopupInstance.destroy();\n\t\t\tthis.contextPopupInstance = null;\n\t\t},\n\t\tgetConfirmRequestParams(event)\n\t\t{\n\t\t\tif (event.params)\n\t\t\t{\n\t\t\t\tconst options = event.params.params.split('|');\n\n\t\t\t\treturn {\n\t\t\t\t\t'NOTIFY_ID': options[0],\n\t\t\t\t\t'NOTIFY_VALUE': options[1],\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn null;\n\t\t},\n\t\treadNotifications(notificationId)\n\t\t{\n\t\t\tconst notification = this.$store.getters['notifications/getById'](notificationId);\n\t\t\tif (notification.unread === false || notification.sectionCode === NotificationTypesCodes.confirm)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tthis.notificationsToRead.push(notificationId);\n\t\t\t// read on front\n\t\t\tthis.$store.dispatch('notifications/read', { ids: [notificationId], action: true });\n\n\t\t\t// change the unread counter\n\t\t\tconst counterValueBeforeUpdate = this.unreadCounter;\n\t\t\tconst counterValue = this.unreadCounter - 1;\n\t\t\tthis.$store.dispatch('notifications/setCounter', { unreadTotal: counterValue });\n\t\t\t// update recent counter\n\t\t\tthis.updateRecentList(counterValue);\n\n\t\t\tthis.timer.stop('readNotificationServer', 'notifications', true);\n\n\t\t\tthis.timer.start('readNotificationServer', 'notifications', .5, () => {\n\t\t\t\tconst idsToRead = this.notificationsToRead;\n\t\t\t\tthis.notificationsToRead = [];\n\n\t\t\t\t// we can read all notifications from some ID, only if we have not received new notifications\n\t\t\t\t// (otherwise we will read notifications at the top that we are not actually seeing)\n\t\t\t\tlet canReadFromId = false;\n\t\t\t\tif (this.firstUnreadNotificationOnInit !== null)\n\t\t\t\t{\n\t\t\t\t\tcanReadFromId = Math.max(...idsToRead) <= this.firstUnreadNotificationOnInit;\n\t\t\t\t}\n\n\t\t\t\tlet restMethod = 'im.notify.read.list';\n\t\t\t\tlet requestParams = {\n\t\t\t\t\tids: idsToRead,\n\t\t\t\t\taction: 'Y'\n\t\t\t\t};\n\n\t\t\t\tif (canReadFromId)\n\t\t\t\t{\n\t\t\t\t\tconst readFromId = Math.min(...idsToRead);\n\t\t\t\t\trestMethod = 'im.notify.read';\n\t\t\t\t\trequestParams = {\n\t\t\t\t\t\tid: readFromId,\n\t\t\t\t\t\taction: 'Y'\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tthis.getRestClient().callMethod(restMethod, requestParams).then(() => {\n\t\t\t\t\tLogger.warn('I have read the notifications', requestParams);\n\t\t\t\t}).catch(() => {\n\t\t\t\t\tthis.$store.dispatch('notifications/read', { ids: idsToRead, action: false });\n\t\t\t\t\t// restore the unread counter in case of an error\n\t\t\t\t\tthis.$store.dispatch('notifications/setCounter', { unreadTotal: counterValueBeforeUpdate });\n\t\t\t\t\tthis.updateRecentList(counterValueBeforeUpdate);\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\tgetLastItemType(collection)\n\t\t{\n\t\t\treturn this.getItemType(collection[collection.length - 1]);\n\t\t},\n\t\tgetItemType(item)\n\t\t{\n\t\t\tif (item.notify_type === NotificationTypesCodes.confirm)\n\t\t\t{\n\t\t\t\treturn NotificationTypesCodes.confirm;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn NotificationTypesCodes.simple;\n\t\t\t}\n\t\t},\n\t\tgetLatest()\n\t\t{\n\t\t\tlet latestNotification = {\n\t\t\t\tid: 0\n\t\t\t};\n\n\t\t\tfor (const notification of this.notification)\n\t\t\t{\n\t\t\t\tif (notification.id > latestNotification.id)\n\t\t\t\t{\n\t\t\t\t\tlatestNotification = notification;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn latestNotification;\n\t\t},\n\t\t//todo: refactor this method for the new chat\n\t\tshowConfirmPopupOnReadAll()\n\t\t{\n\t\t\tconst readAll = this.readAll.bind(this);\n\n\t\t\tBXIM.openConfirm(this.localize['IM_NOTIFICATIONS_READ_ALL_WARNING_POPUP'], [\n\t\t\t\tnew BX.PopupWindowButton({\n\t\t\t\t\ttext: this.localize['IM_NOTIFICATIONS_READ_ALL_WARNING_POPUP_YES'],\n\t\t\t\t\tclassName: 'popup-window-button-accept',\n\t\t\t\t\tevents: {\n\t\t\t\t\t\tclick: function() {\n\t\t\t\t\t\t\treadAll();\n\t\t\t\t\t\t\tthis.popupWindow.close();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tnew BX.PopupWindowButton({\n\t\t\t\t\ttext: this.localize['IM_NOTIFICATIONS_READ_ALL_WARNING_POPUP_CANCEL'],\n\t\t\t\t\tclassName: 'popup-window-button',\n\t\t\t\t\tevents: {\n\t\t\t\t\t\tclick: function() {\n\t\t\t\t\t\t\tthis.popupWindow.close();\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\treadAll()\n\t\t{\n\t\t\tif (this.notification.lastId <= 0)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (!this.isNeedToReadAll)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tthis.$store.dispatch('notifications/readAll');\n\n\t\t\t//we need to count \"confirms\" because its always \"unread\"\n\t\t\tconst confirms = this.notification.filter((notificationItem) => {\n\t\t\t\treturn notificationItem.sectionCode === NotificationTypesCodes.confirm;\n\t\t\t});\n\t\t\tthis.$store.dispatch('notifications/setCounter', { unreadTotal: confirms.length });\n\t\t\tthis.updateRecentList(confirms.length);\n\n\t\t\tthis.getRestClient().callMethod('im.notify.read', {\n\t\t\t\tid: 0,\n\t\t\t\taction: 'Y'\n\t\t\t}).catch((result) => {\n\t\t\t\tthis.getInitialData();\n\t\t\t\tconsole.error(result);\n\t\t\t});\n\t\t},\n\t\tupdateRecentList(counterValue, setPreview = false)\n\t\t{\n\t\t\tconst fields = {\n\t\t\t\tcounter: counterValue\n\t\t\t};\n\n\t\t\tif (setPreview)\n\t\t\t{\n\t\t\t\tconst latestNotification = this.getLatest();\n\t\t\t\tfields.message = {\n\t\t\t\t\tid: latestNotification.id,\n\t\t\t\t\ttext: latestNotification.text,\n\t\t\t\t\tdate: latestNotification.date\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tthis.$store.dispatch('recent/update', {\n\t\t\t\tid: 'notify',\n\t\t\t\tfields: fields\n\t\t\t});\n\t\t},\n\t\tonScrollButtonClick(event)\n\t\t{\n\t\t\tif (this.isLoadingNewPage || !this.initialDataReceived)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tlet notificationIdToScroll = null;\n\t\t\tif (this.firstUnreadNotificationBelowVisible !== null)\n\t\t\t{\n\t\t\t\tnotificationIdToScroll = this.firstUnreadNotificationBelowVisible;\n\t\t\t}\n\t\t\telse if (!this.hasUnreadBelowVisible)\n\t\t\t{\n\t\t\t\tnotificationIdToScroll = this.firstUnreadNotification.id\n\t\t\t}\n\n\t\t\tlet firstUnreadNotificationNode = null\n\t\t\tif (notificationIdToScroll !== null)\n\t\t\t{\n\t\t\t\tconst selector = `.bx-im-notifications-item[data-id=\"${notificationIdToScroll}\"]`;\n\t\t\t\tfirstUnreadNotificationNode = document.querySelector(selector);\n\t\t\t}\n\n\t\t\tif (firstUnreadNotificationNode)\n\t\t\t{\n\t\t\t\tthis.animatedScrollToPosition({\n\t\t\t\t\tstart: this.$refs['listNotifications'].scrollTop,\n\t\t\t\t\tend: firstUnreadNotificationNode.offsetTop\n\t\t\t\t});\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tconst latestNotification = this.notification[this.notification.length - 1];\n\t\t\t\tconst selector = `.bx-im-notifications-item[data-id=\"${latestNotification.id}\"]`;\n\t\t\t\tconst latestNotificationNode = document.querySelector(selector);\n\n\t\t\t\tthis.animatedScrollToPosition({\n\t\t\t\t\tstart: this.$refs['listNotifications'].scrollTop,\n\t\t\t\t\tend: latestNotificationNode.offsetTop\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tanimatedScrollToPosition(params = {})\n\t\t{\n\t\t\tif (this.animateScrollId)\n\t\t\t{\n\t\t\t\tAnimation.cancel(this.animateScrollId);\n\t\t\t\tthis.scrollAnimating = false;\n\t\t\t}\n\t\t\tif (typeof params === 'function')\n\t\t\t{\n\t\t\t\tparams = {callback: params};\n\t\t\t}\n\n\t\t\tconst container = this.$refs.listNotifications;\n\n\t\t\tlet {\n\t\t\t\tstart = container.scrollTop,\n\t\t\t\tend = container.scrollHeight - container.clientHeight,\n\t\t\t\tincrement = 20,\n\t\t\t\tcallback,\n\t\t\t\tduration = 500\n\t\t\t} = params;\n\n\t\t\tif (container && (end - start) > container.offsetHeight * 3)\n\t\t\t{\n\t\t\t\tstart = end - container.offsetHeight * 3;\n\t\t\t}\n\n\t\t\tthis.scrollAnimating = true;\n\n\t\t\tthis.animateScrollId = Animation.start({\n\t\t\t\tstart,\n\t\t\t\tend,\n\t\t\t\tincrement,\n\t\t\t\tduration,\n\n\t\t\t\telement: container,\n\t\t\t\telementProperty: 'scrollTop',\n\n\t\t\t\tcallback: () =>\n\t\t\t\t{\n\t\t\t\t\tthis.animateScrollId = null;\n\t\t\t\t\tthis.scrollAnimating = false;\n\t\t\t\t\tif (callback && typeof callback === 'function')\n\t\t\t\t\t{\n\t\t\t\t\t\tcallback();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t});\n\t\t},\n\t},\n\t//language=Vue\n\ttemplate: `\n\t\t<div class=\"bx-messenger-next-notify\">\n\t\t\t<div class=\"bx-messenger-panel-next-wrapper\" :style=\"panelStyles\">\n\t\t\t\t<div class=\"bx-messenger-panel-next\">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<span \n\t\t\t\t\t\t\tclass=\"bx-messenger-panel-avatar bx-im-notifications-image-system bx-im-notifications-header-image\"\n\t\t\t\t\t\t></span>\n\t\t\t\t\t\t<span class=\"bx-messenger-panel-title bx-messenger-panel-title-middle\" style=\"flex-shrink: 0;\">\n\t\t\t\t\t\t\t{{ $Bitrix.Loc.getMessage('IM_NOTIFICATIONS_HEADER') }}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div v-if=\"notification.length > 0\" class=\"bx-im-notifications-header-buttons\">\n\t\t\t\t\t\t<transition name=\"notifications-read-all-fade\">\n\t\t\t\t\t\t\t<div v-if=\"isNeedToReadAll\" class=\"bx-im-notifications-header-read-all\">\n\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\tclass='bx-messenger-panel-button bx-im-notifications-header-read-all-icon'\n\t\t\t\t\t\t\t\t\t@click=\"showConfirmPopupOnReadAll\"\n\t\t\t\t\t\t\t\t\t:title=\"$Bitrix.Loc.getMessage('IM_NOTIFICATIONS_READ_ALL_BUTTON')\"\n\t\t\t\t\t\t\t\t></span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</transition>\n\t\t\t\t\t\t<div class=\"bx-im-notifications-header-filter\">\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t:class=\"['bx-messenger-panel-button bx-messenger-panel-history bx-im-notifications-header-filter-icon', (showSearch? 'bx-im-notifications-header-filter-active': '')]\"\n\t\t\t\t\t\t\t\t@click=\"showSearch = !showSearch\"\n\t\t\t\t\t\t\t\t:title=\"$Bitrix.Loc.getMessage('IM_NOTIFICATIONS_SEARCH_FILTER_OPEN_BUTTON')\"\n\t\t\t\t\t\t\t></span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div v-if=\"showSearch\" class=\"bx-im-notifications-header-filter-box\" :style=\"filterBoxStyles\">\n\t\t\t\t\t<div class=\"ui-ctl ui-ctl-after-icon ui-ctl-dropdown ui-ctl-xs ui-ctl-w25\">\n\t\t\t\t\t\t<div class=\"ui-ctl-after ui-ctl-icon-angle\"></div>\n\t\t\t\t\t\t<select class=\"ui-ctl-element\" v-model=\"searchType\">\n\t\t\t\t\t\t\t<option value=\"\">\n\t\t\t\t\t\t\t\t{{ $Bitrix.Loc.getMessage('IM_NOTIFICATIONS_SEARCH_FILTER_TYPE_PLACEHOLDER') }}\n\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t<template v-for=\"group in filterTypes\">\n\t\t\t\t\t\t\t\t<template v-if=\"group.LIST\">\n\t\t\t\t\t\t\t\t\t<optgroup :label=\"group.NAME\">\n\t\t\t\t\t\t\t\t\t\t<option v-for=\"option in group.LIST\" :value=\"option.ID\">\n\t\t\t\t\t\t\t\t\t\t\t{{ option.NAME }}\n\t\t\t\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t\t\t</optgroup>\n\t\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t\t<template v-else> \n\t\t\t\t\t\t\t\t\t<option :value=\"group.MODULE_ID\">\n\t\t\t\t\t\t\t\t\t\t{{ group.NAME }}\n\t\t\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t</select>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"ui-ctl ui-ctl-textbox ui-ctl-after-icon ui-ctl-xs ui-ctl-w50\"> \n\t\t\t\t\t\t<button class=\"ui-ctl-after ui-ctl-icon-clear\" @click.prevent=\"searchQuery=''\"></button>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tautofocus\n\t\t\t\t\t\t\ttype=\"text\" \n\t\t\t\t\t\t\tclass=\"ui-ctl-element\" \n\t\t\t\t\t\t\tv-model=\"searchQuery\" \n\t\t\t\t\t\t\t:placeholder=\"$Bitrix.Loc.getMessage('IM_NOTIFICATIONS_SEARCH_FILTER_TEXT_PLACEHOLDER')\"\n\t\t\t\t\t\t>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"ui-ctl ui-ctl-after-icon ui-ctl-before-icon ui-ctl-xs ui-ctl-w25\">\n\t\t\t\t\t\t<div class=\"ui-ctl-before ui-ctl-icon-calendar\"></div>\n\t\t\t\t\t\t<input \n\t\t\t\t\t\t\ttype=\"text\" \n\t\t\t\t\t\t\tclass=\"ui-ctl-element ui-ctl-textbox\" \n\t\t\t\t\t\t\tv-model=\"searchDate\"\n\t\t\t\t\t\t\t@focus.prevent.stop=\"onDateFilterClick\"\n\t\t\t\t\t\t\t@click.prevent.stop=\"onDateFilterClick\"\n\t\t\t\t\t\t\t:placeholder=\"$Bitrix.Loc.getMessage('IM_NOTIFICATIONS_SEARCH_FILTER_DATE_PLACEHOLDER')\"\n\t\t\t\t\t\t\treadonly\n\t\t\t\t\t\t>\n\t\t\t\t\t\t<button class=\"ui-ctl-after ui-ctl-icon-clear\" @click.prevent=\"searchDate=''\"></button>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div \n\t\t\t\tv-if=\"showSearch && (searchQuery.length >= 3 || searchType !== '' || searchDate !== '')\" \n\t\t\t\tclass=\"bx-messenger-list-notifications-wrap\"\n\t\t\t>\n\t\t\t\t<NotificationSearchResult :searchQuery=\"searchQuery\" :searchType=\"searchType\" :searchDate=\"searchDate\"/>\n\t\t\t</div>\n\t\t\t<div v-else class=\"bx-messenger-list-notifications-wrap\">\n\t\t\t\t<div :class=\"[ darkTheme ? 'bx-messenger-dark' : '', 'bx-messenger-list-notifications']\" @scroll.passive=\"onScroll\" ref=\"listNotifications\">\n\t\t\t\t\t<notification-item\n\t\t\t\t\t\tv-for=\"listItem in visibleNotifications\"\n\t\t\t\t\t\t:key=\"listItem.id\"\n\t\t\t\t\t\t:data-id=\"listItem.id\"\n\t\t\t\t\t\t:rawListItem=\"listItem\"\n\t\t\t\t\t\t@dblclick=\"onDoubleClick\"\n\t\t\t\t\t\t@buttonsClick=\"onButtonsClick\"\n\t\t\t\t\t\t@deleteClick=\"onDeleteClick\"\n\t\t\t\t\t\t@contentClick=\"onContentClick\"\n\t\t\t\t\t\tv-bx-im-directive-notifications-observer=\"\n\t\t\t\t\t\t\tlistItem.sectionCode !== NotificationTypesCodes.placeholder\n\t\t\t\t\t\t\t? ObserverType.read \n\t\t\t\t\t\t\t: ObserverType.none\n\t\t\t\t\t\t\"\n\t\t\t\t\t/>\n\t\t\t\t\t<div\n\t\t\t\t\t\tv-if=\"notification.length <= 0\"\n\t\t\t\t\t\tstyle=\"padding-top: 210px; margin-bottom: 20px;\"\n\t\t\t\t\t\tclass=\"bx-messenger-box-empty bx-notifier-content-empty\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{{ $Bitrix.Loc.getMessage('IM_NOTIFICATIONS_NO_ITEMS') }}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<!-- Scroll button -->\n\t\t\t\t<transition name=\"bx-im-notifications-scroll-button\">\n\t\t\t\t\t<div v-show=\"showScrollButton\" class=\"bx-im-notifications-scroll-button-box\" @click=\"onScrollButtonClick\">\n\t\t\t\t\t\t<div class=\"bx-im-notifications-scroll-button\">\n\t\t\t\t\t\t\t<div class=\"bx-im-notifications-scroll-button-counter\">\n\t\t\t\t\t\t\t\t<div class=\"bx-im-notifications-scroll-button-counter-digit\">{{ unreadCounter }}</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div :class=\"arrowButtonClass\"></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</transition>\n\t\t\t\t\n\t\t\t\t<mounting-portal :mount-to=\"popupIdSelector\" append v-if=\"popupInstance\">\n\t\t\t\t\t<popup :type=\"contentPopupType\" :value=\"contentPopupValue\" :popupInstance=\"popupInstance\"/>\n\t\t\t\t</mounting-portal>\n\t\t\t</div>\n\t\t</div>\n\t`\n});"],"names":["NotificationQuickAnswer","props","data","quickAnswerText","quickAnswerResultMessage","showQuickAnswer","isSendingQuickAnswer","successSentQuickAnswer","methods","toggleQuickAnswer","$nextTick","$refs","focus","sendQuickAnswer","event","trim","notificationId","item","id","$Bitrix","RestClient","get","callMethod","notify_id","answer_text","then","result","result_message","error","console","template","NotificationItemHeader","listItem","type","Object","required","isExtranet","Boolean","computed","moreUsers","phrase","Loc","getMessage","split","start","end","params","USERS","length","isMoreUsers","hasOwnProperty","isAbleToDelete","sectionCode","NotificationTypesCodes","simple","onDeleteClick","$emit","onMoreUsersClick","users","content","value","onUserTitleClick","window","top","userId","openMessenger","NotificationPlaceholder","NotificationItem","components","menuId","rawListItem","authorId","systemType","avatar","title","userTitle","subtitle","textConverted","url","color","defaultAvatarColor","notifyButtons","undefined","unread","settingName","date","Utils","format","getMessages","isRealItem","placeholder","isNeedQuickAnswer","CAN_ANSWER","userData","name","$store","getters","extranet","avatarStyles","backgroundImage","onDoubleClick","searchMode","onButtonsClick","action","onContentClick","Vue","testNode","target","className","dataset","onRightClick","platform","isBitrixDesktop","tagName","href","startsWith","hrefToCopy","menuPopup","destroy","existingMenu","PopupManager","getPopupById","menuItem","Dom","create","attrs","events","click","BX","desktop","clipboardCopy","text","targetContainer","document","body","MessengerTheme","isDark","darkMode","bindElement","offsetLeft","autoHide","closeByEsc","onPopupClose","onPopupDestroy","setAngle","show","NotificationCore","placeholderCount","isReadyToLoadNewPage","leftSpaceBottom","scrollHeight","scrollTop","clientHeight","getLastItemId","collection","generatePlaceholders","amount","placeholders","i","push","getRestClient","contentPopupType","toLowerCase","contentPopupValue","popupInstance","popupAngle","isDarkTheme","BXIM","messenger","openPopupExternalData","MessengerCommon","linesGetSessionHistory","popup","lightShadow","offsetTop","bindOptions","position","popupIdSelector","getContentContainer","darkTheme","NotificationSearchResult","MountingPortal","Popup","mixins","pageLimit","lastId","initialDataReceived","isLoadingNewPage","searchResultsTotal","searchPageLoaded","searchPagesRequested","remainingPages","Math","ceil","searchResults","Vuex","mapState","notification","state","notifications","searchCollection","watch","searchQuery","search","searchType","searchDate","parseDate","Date","created","searchServerDelayed","debounce","getSearchResultsFromServer","beforeDestroy","dispatch","resetSearchState","localResults","filter","includes","itemDateForCompare","getTime","setHours","dateFromInput","isNeedPlaceholders","drawPlaceholders","queryParams","getSearchRequestParams","Logger","warn","processHistoryData","total_results","loadNextPage","newUsers","newItems","items","firstItem","onAfterLoadNextPageRequest","toISOString","onScroll","pagesRequested","getConfirmRequestParams","itemId","NOTIFY_ID","unreadTotal","unreadCounter","fields","display","ObserverType","freeze","read","none","BitrixVue","component","directives","inserted","element","bindings","vnode","context","observers","getObserver","observe","unbind","unobserve","perPage","isLoadingInitialData","pagesLoaded","lastType","confirm","notificationsOnScreen","notificationsToRead","notificationsToDelete","changeReadStatusBlockTimeout","firstUnreadNotificationOnInit","contextPopupInstance","showSearch","callViewState","total","localize","getFilteredPhrases","visibleNotifications","notificationItem","highestNotificationId","reduce","highestId","currentNotification","isNeedToReadAll","confirmCounterInModel","panelStyles","Call","Controller","ViewState","Folded","paddingBottom","filterBoxStyles","paddingTop","firstUnreadNotification","unreadNotification","maxNotificationIndex","firstUnreadNotificationBelowVisible","minIdOnScreen","max","unreadId","isUnreadNotificationVisible","unreadOnScreen","Array","from","idOnScreen","notificationOnScreen","showScrollButton","settings","notifyAutoRead","hasUnreadBelowVisible","unreadCounterBeforeVisible","arrowButtonClass","arrowUp","filterTypes","originalSchema","assign","schema","modulesToReduceListItems","forEach","moduleId","LIST","NAME","modulesToShowInFilter","notificationFilterTypes","getInitialData","EventEmitter","subscribe","EventType","updateState","onUpdateState","addEventListener","onWindowFocus","onWindowBlur","callController","Events","onViewStateChanged","onCallViewStateChange","timer","Timer","readNotificationsQueue","Set","readNotificationsNodes","readVisibleNotificationsDelayed","MessengerUtils","readVisibleNotifications","mounted","windowFocused","hasFocus","removeEventListener","unsubscribe","getFirstUnreadNotificationOnInit","lastNotificationId","readNotifications","parseInt","clear","RestMethodHandler","imNotifyGet","RestMethod","imNotifySchemaGet","callBatch","response","processInitialData","processSchemaData","getLastItemType","total_unread_count","total_count","updateRecentList","changeReadStatus","ids","originalCounterBeforeUpdate","counterValue","clearTimeout","setTimeout","only_current","stop","idsToDelete","config","IntersectionObserver","observerCallback","entries","entry","sendReadEvent","entryNotificationId","isIntersecting","intersectionRatio","intersectionRect","height","rootBounds","add","observerOptions","root","threshold","fill","map","zero","index","counterValueBeforeUpdate","closeContextMenuPopup","getContextMenu","MenuManager","onDateFilterClick","calendar","close","node","field","bTime","callback_after","unreadMenuItemText","blockMenuItemText","Type","isUndefined","settingsNotifyBlocked","onclick","log","options","idsToRead","canReadFromId","restMethod","requestParams","readFromId","min","getItemType","notify_type","getLatest","latestNotification","showConfirmPopupOnReadAll","readAll","bind","openConfirm","PopupWindowButton","popupWindow","confirms","setPreview","counter","message","onScrollButtonClick","notificationIdToScroll","firstUnreadNotificationNode","selector","querySelector","animatedScrollToPosition","latestNotificationNode","animateScrollId","Animation","cancel","scrollAnimating","callback","container","listNotifications","increment","duration","offsetHeight","elementProperty"],"mappings":";;;;CAAO,IAAMA,uBAAuB,GAAG;GACtCC,KAAK,EAAE,CAAC,UAAU,CAAC;GACnBC,IAAI,kBACJ;KACC,OAAO;OACNC,eAAe,EAAE,EAAE;OACnBC,wBAAwB,EAAE,EAAE;OAC5BC,eAAe,EAAE,KAAK;OACtBC,oBAAoB,EAAE,KAAK;OAC3BC,sBAAsB,EAAE;MACxB;IACD;GACDC,OAAO,EACP;KACCC,iBAAiB,+BACjB;OAAA;OACC,IAAI,IAAI,CAACF,sBAAsB,EAC/B;SACC,IAAI,CAACF,eAAe,GAAG,IAAI;SAC3B,IAAI,CAACE,sBAAsB,GAAG,KAAK;SACnC,IAAI,CAACH,wBAAwB,GAAG,EAAE;QAClC,MAED;SACC,IAAI,CAACC,eAAe,GAAG,CAAC,IAAI,CAACA,eAAe;;OAG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