AnonSec Shell
Server IP : 85.193.89.191  /  Your IP : 3.144.222.209
Web Server : Apache
System : Linux 956367-cx40159.tmweb.ru 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64
User : bitrix ( 600)
PHP Version : 8.1.27
Disable Function : NONE
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/bitrix/www/bitrix/js/im/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/bitrix/www/bitrix/js/im//window.min.js
(function(t){if(t.BX.MessengerWindow)return;var e=t.BX;var s=function(){this.popupConfirm=null;this.BXIM={};this.popup=null;this.backgroundSelector=null;this.content=null;this.contentFullWindow=true;this.contentBodyWindow=false;this.contentMenu=null;this.contentAvatar=null;this.contentTab=null;this.contentTabContent=null;this.currentTab="";this.currentTabTarget="";this.lastTab="";this.lastTabTarget="";this.tabItems={};this.tabRedrawTimeout=null;this.userInfo={id:0,name:"",gender:"M",avatar:"",profile:""};this.inited=false;this.width=914;this.height=454;this.initWidth=914;this.initHeight=454;this.minWidth=515;this.minHeight=384};s.prototype.init=function(s){s=s||{};if(this.inited){return true}this.inited=true;this.BXIM=s.bxim||{};this.context=s.context||"DESKTOP";this.design=s.design||"DESKTOP";this.showMenu=s.showMenu!==false;if(this.context=="SLIDER"){this.content=e.create("div",{})}else if(this.context=="FULLSCREEN"||this.context=="POPUP-FULLSCREEN"||this.context=="PAGE"||this.context=="DIALOG"||this.context=="LINES"){if(this.context=="FULLSCREEN"||this.context=="PAGE"||this.context=="POPUP-FULLSCREEN"){this.contentBodyWindow=true}this.popup=e("im-workarea-popup");this.popupBackground=this.popup;this.content=e("im-workarea-content");this.apps=e("im-workarea-apps");this.backgroundSelector=e("im-workarea-backgound-selector");if(!this.content){this.popup=e("workarea-popup");this.content=e("workarea-content")}if(this.popup){e.addClass(this.popup,"bx-im-fullscreen-closed");e.bind(this.popup,"click",e.delegate(this.closePopup,this))}else{this.popupBackground=e("im-workarea-popup-bg")}if(this.context=="PAGE"){var i=t.innerWidth-document.documentElement.clientWidth;e.onCustomEvent(t,"onMessengerWindowBodyOverflow",[this,i]);e.addClass(document.body,"bx-im-fullscreen-block-scroll")}if(this.backgroundSelector){e.bind(this.backgroundSelector.parentNode,"click",e.delegate(e.PreventDefault,this));e.bind(this.backgroundSelector,"change",e.delegate((function(t){this.backgroundChange();e.localStorage.set("imFullscreenBackground",this.backgroundSelector.value,3e6);return e.PreventDefault(t)}),this));var n=e.localStorage.get("imFullscreenBackground");if(n!==null){this.backgroundSelector.value=n}this.backgroundChange()}if(!this.content){this.content=e.create("div",{attrs:{className:"bx-desktop"}});document.body.insertBefore(this.content,document.body.firstChild)}if(this.apps){e.bind(this.apps,"click",e.delegate(e.MessengerCommon.preventDefault,this))}e.bind(this.content,"click",e.delegate(e.MessengerCommon.preventDefault,this));if(!e.hasClass(this.content,"bx-desktop")){e.addClass(this.content,"bx-desktop")}if(this.context=="LINES"||this.context=="DIALOG"){this.contentFullWindow=false}else if(this.context!="POPUP-FULLSCREEN"){if(this.content.offsetWidth<this.minWidth){e.style(this.content,"width",this.minWidth+"px")}}}else{this.content=e.create("div");document.body.insertBefore(this.content,document.body.firstChild)}this.withMenu=false;if(this.context==="DESKTOP"||this.context==="FULLSCREEN"||this.context==="SLIDER"){e.addClass(this.content,"bx-desktop-appearance-show-menu");this.withMenu=true}if(e.desktop&&e.desktop.apiReady&&(navigator.userAgent.toLowerCase().indexOf("linux")>0&&!e.desktop.enableInVersion(29)||navigator.userAgent.toLowerCase().indexOf("linux")<0&&!e.desktop.enableInVersion(37)||["11.0.20.53"].includes(e.desktop.clientVersion.join(".")))){document.body.classList.remove("bx-messenger-dark");document.documentElement.style="background: #fff";e.desktop.notSupported();e.desktop.apiReady=false;e.desktop.disableLogin=true;return false}if(e.desktop&&e.desktop.apiReady&&!this.BXIM.ppServerStatus){document.body.classList.remove("bx-messenger-dark");document.documentElement.style="background: #fff";e.desktop.withoutPushServer();e.desktop.apiReady=false;e.desktop.disableLogin=true;return false}if(e.browser.SupportLocalStorage()){e.addCustomEvent(t,"onLocalStorageSet",e.delegate(this.storageSet,this))}if(e.MessengerCommon.isDesktop()){e.MessengerWindow.addTab({id:"exit",title:e.message("BXD_LOGOUT"),order:1100,target:false,events:{open:e.delegate((function(){this.logout(false,"exit_tab")}),this)}})}e.bind(t,"resize",e.delegate((function(){this.adjustSize()}),this))};s.prototype.browse=function(s){if(e.MessengerCommon.isDesktop()){e.desktop.browse(s)}else if(this.context=="POPUP-FULLSCREEN"){location.href=s}else{t.open(s,"_blank")}};s.prototype.getCurrentUrl=function(){return document.location.protocol+"//"+document.location.hostname+(document.location.port==""?"":":"+document.location.port)};s.prototype.windowReload=function(){location.reload()};s.prototype.logout=function(t,s,i){if(typeof BXDesktopSystem=="undefined"||typeof BXDesktopWindow=="undefined"){location.href="/?logout=yes";return true}if(e.desktop&&e.desktop.apiReady){e.desktop.logout(t,s,i)}return true};s.prototype.adjustSize=function(s,i,n){if(this.context=="POPUP-FULLSCREEN"&&e.hasClass(this.popup,"bx-im-fullscreen-closed")){return false}var o=0;var a=0;if(this.context=="SLIDER"){a=this.content.parentNode?this.content.parentNode.offsetHeight:this.initHeight;o=this.content.offsetWidth;if(!n){clearTimeout(this.sliderResizeTimeout);this.sliderResizeTimeout=setTimeout((function(){e.MessengerWindow.adjustSize(undefined,undefined,true);BXIM.desktop.adjustSize()}),300)}}else if(this.contentBodyWindow){if(!this.popupFullscreenSizeTop&&!this.popupFullscreenSizeBottom){var r=e.pos(this.content.parentNode);this.popupFullscreenSizeTop=r.top;this.popupFullscreenSizeBottom=t.innerHeight-r.top-r.height}a=Math.max(t.innerHeight-this.popupFullscreenSizeTop-this.popupFullscreenSizeBottom,this.initHeight);o=this.content.offsetWidth}else if(this.contentFullWindow){o=t.innerWidth;a=t.innerHeight}else{try{e.style(document.body,"height",t.innerHeight+"px")}catch(t){setTimeout((function(){this.adjustSize(s,i)}),500)}o=Math.max(this.content.offsetWidth,this.minWidth);a=Math.max(this.content.offsetHeight,this.minHeight)}if(e.desktop&&e.desktop.apiReady&&(!s||!i)&&(a<this.minHeight||o<this.minWidth)){return false}if(this.context=="POPUP-FULLSCREEN"&&e.browser.IsMobile()){this.height=this.initHeight;this.width=this.initWidth}else{e.addClass(this.content,"bx-im-fullscreen-adaptive");this.width=s?s:o;this.height=i?i:a}e.style(this.contentMenu,"height",this.height+"px");e.style(this.contentTabContent,"height",this.height+"px");e.style(this.content,"max-width",t.innerWidth+"px");return true};s.prototype.openConfirm=function(t,s,i){if(this.popupConfirm!=null)this.popupConfirm.destroy();if(typeof t=="object")t='<div class="bx-desktop-confirm-title">'+t.title+"</div>"+t.message;i=i!==false;if(typeof s=="undefined"||typeof s=="object"&&s.length<=0){s=[new e.PopupWindowButton({text:e.message("BXD_CONFIRM_CLOSE"),className:"popup-window-button-decline",events:{click:function(t){this.popupWindow.close();e.PreventDefault(t)}}})]}this.popupConfirm=new e.PopupWindow("bx-desktop-confirm",null,{targetContainer:document.body,zIndex:200,autoHide:s===false,buttons:s,closeByEsc:s===false,overlay:i,events:{onPopupClose:function(){this.destroy()},onPopupDestroy:e.delegate((function(){this.popupConfirm=null}),this)},content:e.create("div",{props:{className:s===false?" bx-desktop-confirm-without-buttons":"bx-desktop-confirm"},html:t})});this.popupConfirm.show();e.bind(this.popupConfirm.popupContainer,"click",e.PreventDefault);e.bind(this.popupConfirm.contentContainer,"click",e.PreventDefault);e.bind(this.popupConfirm.overlay.element,"click",e.PreventDefault);return true};s.prototype.addSeparator=function(t){t.type="separator";t.id="sep"+ +new Date;this.tabItems[t.id]=t;this.drawTabs()};s.prototype.addTab=function(t){if(!t||!t.id)return false;if(!t.order)t.order=500;t.title=t.title||"";t.hide=!!t.hide;t.toggleEnable=t.toggleEnable!==false;if(parseInt(t.badge)>0){t.badge=parseInt(t.badge)}else{t.badge=0}if(!t.initContent||!e.type.isDomNode(t.initContent))t.initContent=null;if(!t.events)t.events={};if(typeof t.target=="undefined")t.target=t.id;if(!t.events.open)t.events.open=function(){};if(!t.events.close)t.events.close=function(){};if(!t.events.init)t.events.init=function(){};t.type="item";this.tabItems[t.id]=t;this.drawTabs()};s.prototype.hideTab=function(t){if(!t||!this.tabItems[t])return false;this.tabItems[t].hide=true;this.drawTabs()};s.prototype.showTab=function(t){if(!t||!this.tabItems[t])return false;this.tabItems[t].hide=false;this.drawTabs()};s.prototype.existsTab=function(t){return this.tabItems[t]};s.prototype.drawTabs=function(t){if(!t){clearTimeout(this.tabRedrawTimeout);this.tabRedrawTimeout=setTimeout(e.delegate((function(){this.drawTabs(true)}),this),100);return true}if(!this.contentTabContent){if(!this.drawAppearance())return false}this.contentTab.innerHTML="";var s=e.util.objectSort(this.tabItems,"order","asc");for(var i=0;i<s.length;i++){this.drawTab(s[i])}e.onCustomEvent(this,"OnDesktopTabsInit");if(this.currentTab==""){if(s[0].id=="exit"){if(typeof s[1]!="undefined"){this.changeTab(s[1].id)}}else{this.changeTab(s[0].id)}}return true};s.prototype.drawTab=function(t){if(t.type=="separator"){this.contentTab.appendChild(e.create("div",{attrs:{"data-id":t.id,id:"bx-desktop-sep-"+t.id},props:{className:"bx-desktop-separator"}}))}else{var s=t.badge>99?"99+":t.badge;var i="digits";if(s.toString().length===2){i="dozens"}else if(s.toString().length>2){i="hundreds"}this.contentTab.appendChild(e.create("div",{attrs:{"data-id":t.id,id:"bx-desktop-tab-"+t.id,title:t.title},props:{className:"bx-desktop-tab bx-desktop-tab-"+t.id+(this.currentTab==t.id?" bx-desktop-tab-active":"")+(t.hide?" bx-desktop-tab-hide":"")},children:[e.create("span",{props:{className:"bx-desktop-tab-counter"},html:t.badge>0?'<span class="bx-desktop-tab-counter-digit" data-counter-type="'+i+'" >'+s+"</span>":""}),e.create("div",{props:{className:"bx-desktop-tab-icon bx-desktop-tab-icon-"+t.id}})]}));if(!e("bx-desktop-tab-content-"+t.id)&&t.id==t.target){var n=false;if(this.currentTab==t.id||this.tabItems[this.currentTab]&&this.tabItems[this.currentTab].target==t.id){n=true}this.contentTabContent.appendChild(e.create("div",{attrs:{"data-id":t.id,id:"bx-desktop-tab-content-"+t.id},props:{className:"bx-desktop-tab-content bx-desktop-tab-content-"+t.id+(n?" bx-desktop-tab-content-active":"")},children:t.initContent?[t.initContent]:[]}));t.events.init()}}return true};s.prototype.drawAppearance=function(){if(!this.content)return false;this.content.innerHTML="";this.content.appendChild(this.contentBox=e.create("div",{props:{className:"bx-desktop-appearance"+(e.MessengerTheme.isDark()?" bx-messenger-dark":"")+(this.showMenu?"":" bx-desktop-appearance-hide-menu")},style:{minHeight:this.minHeight+"px"},children:[this.contentMenu=e.create("div",{props:{className:"bx-desktop-appearance-menu"},children:[this.contentAvatar=e.create("div",{props:{className:"bx-desktop-appearance-avatar"}}),this.contentTab=e.create("div",{props:{className:"bx-desktop-appearance-tab"}})]}),this.contentTabContent=e.create("div",{props:{className:"bx-desktop-appearance-content"}})]}));e.bindDelegate(this.contentTab,"click",{className:"bx-desktop-tab"},e.delegate((function(t){this.changeTab(t,false);e.PreventDefault(t)}),this));this.adjustSize();e.onCustomEvent(t,"onMessengerWindowInit",[this,this.BXIM]);return true};s.prototype.changeTab=function(t,s,i){s=typeof s=="undefined"?true:s;i=typeof i=="undefined"?false:i;if(typeof t=="object"){if(!e.proxy_context){return false}t=e.proxy_context.getAttribute("data-id")}if(!this.tabItems[t])return false;if(this.tabItems[t].target){var n=false;if(!s||this.currentTab!=t){this.lastTab=this.currentTab;this.lastTabTarget=this.currentTabTarget;this.currentTab=this.tabItems[t].id;this.currentTabTarget=this.tabItems[t].target;n=true}if(e("bx-desktop-tab-"+this.lastTab))e.removeClass(e("bx-desktop-tab-"+this.lastTab),"bx-desktop-tab-active");if(e("bx-desktop-tab-"+t))e.addClass(e("bx-desktop-tab-"+t),"bx-desktop-tab-active");if(e("bx-desktop-tab-content-"+this.lastTab)){e.removeClass(e("bx-desktop-tab-content-"+this.lastTab),"bx-desktop-tab-content-active")}else if(e("bx-desktop-tab-content-"+this.lastTabTarget)){e.removeClass(e("bx-desktop-tab-content-"+this.lastTabTarget),"bx-desktop-tab-content-active")}if(e("bx-desktop-tab-content-"+this.currentTab)){e.addClass(e("bx-desktop-tab-content-"+this.currentTab),"bx-desktop-tab-content-active")}else if(e("bx-desktop-tab-content-"+this.currentTabTarget)){e.addClass(e("bx-desktop-tab-content-"+this.currentTabTarget),"bx-desktop-tab-content-active")}if(n&&!i){if(this.lastTab===this.currentTab&&!this.tabItems[this.lastTab].toggleEnable){return false}if(this.tabItems[this.lastTab]){this.tabItems[this.lastTab].events.close()}if(this.tabItems[this.currentTab]){e.onCustomEvent(this,"OnDesktopTabChange",[this.currentTab,this.lastTab]);this.tabItems[this.currentTab].events.open()}}}else if(!i){this.tabItems[t].events.open()}return true};s.prototype.closeTab=function(t){t=t||this.getCurrentTab();if(!this.tabItems[t]||this.getCurrentTab()!=t)return false;if(this.tabItems[t].target!=this.currentTabTarget){this.changeTab(t,false)}else{if(e("bx-desktop-tab-"+this.currentTab))e.removeClass(e("bx-desktop-tab-"+this.currentTab),"bx-desktop-tab-active");if(e("bx-desktop-tab-"+this.lastTab))e.addClass(e("bx-desktop-tab-"+this.lastTab),"bx-desktop-tab-active");var s=this.lastTab;this.lastTab=this.currentTab;this.currentTab=s}};s.prototype.setTabBadge=function(t,s){if(!this.tabItems[t])return false;s=parseInt(s);this.tabItems[t].badge=s>0?s:0;if(e("bx-desktop-tab-"+t)){var i=e.findChild(e("bx-desktop-tab-"+t),{className:"bx-desktop-tab-counter"},true);if(i){var n=s>99?"99+":s;var o="digits";if(n.toString().length===2){o="dozens"}else if(n.toString().length>2){o="hundreds"}i.innerHTML=s?'<span class="bx-desktop-tab-counter-digit"  data-counter-type="'+o+'">'+n+"</span>":""}}};s.prototype.setTabContent=function(t,s){if(!this.tabItems[t]){return false}if(e("bx-desktop-tab-content-"+t)){if(e.type.isDomNode(s)){e("bx-desktop-tab-content-"+t).innerHTML="";e("bx-desktop-tab-content-"+t).appendChild(s)}else{e("bx-desktop-tab-content-"+t).innerHTML=s}}else{this.tabItems[t].initContent=s}return true};s.prototype.getCurrentTab=function(){return this.currentTab};s.prototype.getCurrentTabTarget=function(){return this.currentTabTarget};s.prototype.setUserInfo=function(t){if(!this.userInfo){if(!t||!t.id||!t.name)return false}if(t){t=e.clone(t);if(!t.gender)t.gender="M";if(!t.avatar)t.avatar="";this.userInfo=t}if(!this.contentAvatar){if(!this.drawAppearance())return false}var s={};s.click=function(t){BXIM.openMessenger(BXIM.userId);return e.PreventDefault(t)};this.contentAvatar.innerHTML="";this.contentAvatar.appendChild(e.create("a",{attrs:{href:this.userInfo.profile,title:e.util.htmlspecialcharsback(this.userInfo.name),target:"_blank","data-slider-ignore-autobinding":"true"},props:{className:"bx-desktop-avatar"},events:s,children:[e.create("span",{attrs:{style:e.MessengerCommon.getAvatarStyle(this.userInfo,true)},props:{className:"bx-desktop-avatar-img"+(e.MessengerCommon.isBlankAvatar(this.userInfo.avatar)?" bx-desktop-avatar-img-default":"")}})]}));return true};s.prototype.updateUserInfo=function(t){for(var e in t){this.userInfo[e]=t[e]}return this.setUserInfo(this.userInfo)};s.prototype.getUserInfo=function(){return this.userInfo};s.prototype.isPopupShow=function(){if(this.context=="DESKTOP")return true;else if(this.context=="PAGE")return true;else if(this.context=="POPUP-FULLSCREEN"&&!e.hasClass(this.popup,"bx-im-fullscreen-closed"))return true;else if(this.context=="SLIDER"&&e.MessengerSlider.isOpen())return true;return false};s.prototype.backgroundChange=function(){if(!this.backgroundSelector){return}var t=this.backgroundSelector.value;if(t=="transparent"){e.removeClass(this.popupBackground,"bx-im-fullscreen-popup-bitrix24");e.addClass(this.popupBackground,"bx-im-fullscreen-popup-transparent");e.style(this.popupBackground,"background","");e.style(this.popupBackground,"backgroundSize","")}else if(t>0){e.removeClass(this.popupBackground,"bx-im-fullscreen-popup-bitrix24");e.removeClass(this.popupBackground,"bx-im-fullscreen-popup-transparent");e.style(this.popupBackground,"background","url(/bitrix/js/im/images/bg-image-"+t+".jpg) #ccc");e.style(this.popupBackground,"backgroundSize","cover")}else{e.removeClass(this.popupBackground,"bx-im-fullscreen-popup-transparent");e.addClass(this.popupBackground,"bx-im-fullscreen-popup-bitrix24");e.style(this.popupBackground,"background","");e.style(this.popupBackground,"backgroundSize","")}};s.prototype.setZIndex=function(t){e.style(this.popup,"z-index",t)};s.prototype.showPopup=function(s){if(this.isPopupShow())return false;this.popupTimestart=+new Date;clearTimeout(this.popupTimeout);var i=t.innerWidth-document.documentElement.clientWidth;e.onCustomEvent(t,"onMessengerWindowBodyOverflow",[this,i]);e.addClass(document.body,"bx-im-fullscreen-block-scroll");e.addClass(this.popup,"bx-im-fullscreen-opening");e.removeClass(this.popup,"bx-im-fullscreen-closing");e.removeClass(this.popup,"bx-im-fullscreen-closed");this.adjustSize();this.BXIM.desktop.initHeight=this.content.offsetHeight;this.popupTimeout=setTimeout(e.delegate((function(){e.removeClass(this.popup,"bx-im-fullscreen-opening");e.addClass(this.popup,"bx-im-fullscreen-open")}),this),400);if(e.SidePanel&&e.SidePanel.Instance.getTopSlider()){var n=e.SidePanel.Instance.getTopSlider().getZindex();this.setZIndex(n+1)}e.onCustomEvent(this,"OnMessengerWindowShowPopup",[s]);return true};s.prototype.closePopup=function(s){if(!e.type.isPlainObject(s)){s={}}if(!this.isPopupShow()||this.BXIM.callController.hasActiveCall()||this.redirectFlag)return false;if(this.popupTimestart+400>+new Date)return false;if(s.redirect){this.redirectFlag=true;document.location.href=s.redirect;return true}clearTimeout(this.popupTimeout);e.removeClass(document.body,"bx-im-fullscreen-block-scroll");e.onCustomEvent(this,"OnMessengerWindowClosePopup",[]);e.onCustomEvent(t,"onMessengerWindowBodyOverflow",[this,0]);e.addClass(this.popup,"bx-im-fullscreen-open");e.addClass(this.popup,"bx-im-fullscreen-closing");e.removeClass(this.popup,"bx-im-fullscreen-opening");this.popupTimeout=setTimeout(e.delegate((function(){e.removeClass(this.popup,"bx-im-fullscreen-closing");e.removeClass(this.popup,"bx-im-fullscreen-open");e.addClass(this.popup,"bx-im-fullscreen-closed");e.style(this.popup,"z-index","")}),this),400);return true};s.prototype.storageSet=function(t){if(!this.backgroundSelector)return false;if(t.key!="imFullscreenBackground")return false;this.backgroundSelector.value=t.value;this.backgroundChange()};e.MessengerWindow=new s})(window);
//# sourceMappingURL=window.map.js

Anon7 - 2022
AnonSec Team