var Unibase;(function(n){let t;(function(t){let i;(function(t){let i;(function(t){class i{constructor(){this.ssMenuBarFullScreen=!1;this.isDocFullscreen=!1}refreshWordDocumentHeight(t){this.docBase=n.Apps.Collaboration.Components.DocEditor.Base.Instance();let i=t.element;this.wordDocRibbon=document.getElementsByClassName("biz-doc-ribbon")[0];this.wordDocToolbar=document.getElementsByClassName("biz-doc-bottomtoolbar")[0];this.wordDocFooter=i.parentElement.nextElementSibling;this.wordDocFooter.style.display="none";this.wordDocRibbon.style.display="none";this.wordDocToolbar.style.display="none";t.height=window.innerHeight+"px";document.getElementsByClassName("e-de-text-target")[0].contentWindow.document.addEventListener("keyup",n=>{this.refreshDocumentHeightProps(i),event.preventDefault(),this.exitFullscreenEsc(n,t),n.keyCode==122&&(this.isDocFullscreen?(this.totalHeight=window.innerHeight-this.ribbonHeight-this.toolbarHeight-this.footerHeight,t.height=this.totalHeight+"px",this.isDocFullscreen=!1):(this.totalHeight=window.innerHeight-this.ribbonHeight-this.toolbarHeight-this.footerHeight,t.height=this.totalHeight+"px",this.isDocFullscreen=!0))});document.body.addEventListener("keyup",n=>{this.exitFullscreenEsc(n,this.docBase.wordDocumentObj)})}refreshDocumentHeightProps(n){this.ribbonHeight=document.getElementsByClassName("biz-doc-ribbon")[0].offsetHeight;this.toolbarHeight=document.getElementsByClassName("biz-doc-bottomtoolbar")[0].offsetHeight;this.footerHeight=n.parentElement.nextElementSibling.offsetHeight}exitFullscreenEsc(n,t){n.keyCode==27&&(this.refreshDocumentHeightProps(t.element),this.wordDocRibbon.style.display="",this.wordDocToolbar.style.display="",this.wordDocFooter.style.display="",this.totalHeight=window.innerHeight-this.ribbonHeight-this.toolbarHeight-this.footerHeight,t.height=this.totalHeight+"px")}refreshSpreadsheetHeight(t){this.sheetBase=n.Apps.Collaboration.Components.Sheets.Base.Instance();this.dialog=n.Apps.Collaboration.Components.Sheets.Dialogue.Instance();this.ssMenuBarFullScreen=!0;let r=t.element,i=document.getElementById("DocumentViewer_sheet_panel");r.parentElement.nextElementSibling.style.display="none";r.parentElement.previousElementSibling.style.display="none";document.getElementById("DocumentViewer_ribbon").style.display="none";var u=i.nextElementSibling.offsetHeight,f=i.previousElementSibling.offsetHeight;i.style.height=window.innerHeight-u-f+"px";this.dialog.renderMenubarFullscreenDialog()}inintEvents(){}removeEvetns(){}static Instance(){return this.instance===undefined&&(this.instance=new i),this.instance}}t.Fullscreen=i})(i=t.Components||(t.Components={}))})(i=t.Collaboration||(t.Collaboration={}))})(t=n.Apps||(n.Apps={}))})(Unibase||(Unibase={}));