diff --git a/www/common/onlyoffice/v5/fonts/Asana-Math.otf b/www/common/onlyoffice/v5/fonts/Asana-Math.otf deleted file mode 100644 index c79231015..000000000 Binary files a/www/common/onlyoffice/v5/fonts/Asana-Math.otf and /dev/null differ diff --git a/www/common/onlyoffice/v5/fonts/AsanaMath.ttf b/www/common/onlyoffice/v5/fonts/AsanaMath.ttf new file mode 100644 index 000000000..cd72632fb Binary files /dev/null and b/www/common/onlyoffice/v5/fonts/AsanaMath.ttf differ diff --git a/www/common/onlyoffice/v5/fonts/NotoSansLao-Regular.ttf b/www/common/onlyoffice/v5/fonts/NotoSansLao-Regular.ttf new file mode 100644 index 000000000..cec180b1a Binary files /dev/null and b/www/common/onlyoffice/v5/fonts/NotoSansLao-Regular.ttf differ diff --git a/www/common/onlyoffice/v5/sdkjs/cell/sdk-all-min.js b/www/common/onlyoffice/v5/sdkjs/cell/sdk-all-min.js index e1b3f49c3..c4cb6f2ac 100644 --- a/www/common/onlyoffice/v5/sdkjs/cell/sdk-all-min.js +++ b/www/common/onlyoffice/v5/sdkjs/cell/sdk-all-min.js @@ -1,5 +1,5 @@ /* - * Copyright (C) Ascensio System SIA 2012-2021. All rights reserved + * Copyright (C) Ascensio System SIA 2012-2022. All rights reserved * * https://www.onlyoffice.com/ * @@ -1812,7 +1812,7 @@ function(){this.isPreOpenLocks=false;for(var i=0;i");if(-1!=nIndex)_html_format=_html_format.substring(0,nIndex+"".length);this.CommonIframe_PasteStart(_html_format,_text_format); -return false}if(_text_format&&_text_format!=""){this.Api.asc_PasteData(AscCommon.c_oAscClipboardDataFormat.Text,_text_format);g_clipboardBase.Paste_End();return false}var items=_clipboard.items;if(null!=items&&0!=items.length){g_clipboardBase.PasteImagesBody="";g_clipboardBase.PasteImagesCount=items.length;g_clipboardBase.PasteImagesCounter=0;for(var i=0;i';if(g_clipboardBase.PasteImagesCounter==g_clipboardBase.PasteImagesCount){g_clipboardBase.CommonIframe_PasteStart(""+g_clipboardBase.PasteImagesBody+"");g_clipboardBase.PasteImagesBody="";g_clipboardBase.PasteImagesCounter=0;g_clipboardBase.PasteImagesCount=0}};reader.onabort=reader.onerror=function(e){g_clipboardBase.PasteImagesCounter++;if(g_clipboardBase.PasteImagesCounter== -g_clipboardBase.PasteImagesCount){g_clipboardBase.CommonIframe_PasteStart(""+g_clipboardBase.PasteImagesBody+"");g_clipboardBase.PasteImagesBody="";g_clipboardBase.PasteImagesCounter=0;g_clipboardBase.PasteImagesCount=0}};try{reader.readAsDataURL(blob)}catch(err){g_clipboardBase.PasteImagesCounter++}}else g_clipboardBase.PasteImagesCounter++;if(g_clipboardBase.PasteImagesCounter==g_clipboardBase.PasteImagesCount)g_clipboardBase.Paste_End();return false}}g_clipboardBase.Paste_End(); -return false},_private_onbeforepaste:function(e,isAttackEmulate){this._console_log("onbeforepaste");if(!this.Api.asc_IsFocus(true))return;{this.CommonDiv=this.CommonDiv_Check();this.CommonDiv_Start();this.CommonDiv.focus();this.StartFocus();this.CommonDiv_Select();return}return false},_private_onbeforecopy_select:function(){if(AscBrowser.isIE){this._console_log("onbeforecopy_select");this.CommonDiv=this.CommonDiv_Check();this.CommonDiv_Start();this.CommonDiv.innerHTML=" ";this.CommonDiv.focus(); -this.StartFocus();this.CommonDiv_Select()}},_private_onbeforecopy:function(e,isAttackEmulate){this._console_log("onbeforecopy");if(!this.Api.asc_IsFocus(true))return;{this.CommonDiv=this.CommonDiv_Check();this.CommonDiv_Start();this.CommonDiv.innerHTML=" ";this.CommonDiv.focus();this.StartFocus();this.CommonDiv_Select()}return false},Init:function(_api){this.Api=_api;window["AscCommon"].g_specialPasteHelper.Init(_api);this.ClosureParams.getData=function(type){var _clipboard=this._e&& -this._e.clipboardData?this._e.clipboardData:window.clipboardData;if(!_clipboard||!_clipboard.getData)return null;var _type=type;if(AscBrowser.isIE&&(type=="text"||type=="text/plain"))_type="Text";try{return _clipboard.getData(_type)}catch(e){}return null};this.ClosureParams.setData=function(type,_data){var _clipboard=this._e&&this._e.clipboardData?this._e.clipboardData:window.clipboardData;if(!_clipboard||!_clipboard.setData)return null;var _type=type;if(AscBrowser.isIE&&(type=="text"||type=="text/plain"))_type= -"Text";try{_clipboard.setData(_type,_data)}catch(e){}};if(!AscBrowser.isIE){document.oncopy=function(e){return g_clipboardBase._private_oncopy(e)};document.oncut=function(e){return g_clipboardBase._private_oncut(e)};document.onpaste=function(e){return g_clipboardBase._private_onpaste(e)};document["onbeforecopy"]=function(e){return g_clipboardBase._private_onbeforecopy(e)};document["onbeforecut"]=function(e){return g_clipboardBase._private_onbeforecopy(e)};document["onbeforepaste"]=function(e){return g_clipboardBase._private_onbeforepaste(e)}}else{document.addEventListener("copy", -function(e){return g_clipboardBase._private_oncopy(e)});document.addEventListener("cut",function(e){return g_clipboardBase._private_oncut(e)});document.addEventListener("paste",function(e){return g_clipboardBase._private_onpaste(e)});document.addEventListener("beforepaste",function(e){return g_clipboardBase._private_onbeforepaste(e)});document.addEventListener("beforecopy",function(e){return g_clipboardBase._private_onbeforecopy(e)});document.addEventListener("beforecut",function(e){return g_clipboardBase._private_onbeforecopy(e)})}if(this.IsCopyCutOnlyInEditable|| -this.IsPasteOnlyInEditable)document.onkeydown=function(e){if(!g_clipboardBase.Api.asc_IsFocus(true)||g_clipboardBase.Api.isLongAction())return;var isAltGr=AscCommon.getAltGr(e);if(isAltGr)return;var isCtrl=e.ctrlKey===true||e.metaKey===true;var isShift=e.shiftKey;var keyCode=e.keyCode;if(g_clipboardBase.IsCopyCutOnlyInEditable){var bIsBeforeCopyCutEmulate=false;var _cut=false;if(isCtrl&&!isShift&&(keyCode==67||keyCode==88))bIsBeforeCopyCutEmulate=true;if(!isCtrl&&isShift&&keyCode==45){bIsBeforeCopyCutEmulate= -true;_cut=true}if(bIsBeforeCopyCutEmulate){g_clipboardBase._console_log("emulate_beforecopycut");var isEmulate=false;try{isEmulate=_cut?document.execCommand("beforecut"):document.execCommand("beforecopy")}catch(err){}g_clipboardBase._private_onbeforecopy(undefined,!isEmulate)}}if(g_clipboardBase.IsPasteOnlyInEditable){var bIsBeforePasteEmulate=false;if(isCtrl&&!isShift&&keyCode==86)bIsBeforePasteEmulate=true;if(!isCtrl&&isShift&&keyCode==45)bIsBeforePasteEmulate=true;if(bIsBeforePasteEmulate){g_clipboardBase._console_log("emulate_beforepaste"); -var isEmulate=false;try{isEmulate=document.execCommand("beforepaste")}catch(err$14){}g_clipboardBase._private_onbeforepaste(undefined,!isEmulate)}}};if(AscBrowser.isSafari&&false){this.CommonDiv=this.CommonDiv_Check();setInterval(function(){if(g_clipboardBase.Api.asc_IsFocus(true))g_clipboardBase.CommonDiv.focus()},100)}},IsWorking:function(){return this.CopyFlag||this.PasteFlag?true:false},StartFocus:function(){this.EndFocus(false);this.CopyPasteFocus=true;this.CopyPasteFocusTimer=setTimeout(function(){g_clipboardBase.EndFocus()}, -1E3)},EndFocus:function(isFocusToEditor){this.CopyPasteFocus=false;if(-1!=this.CopyPasteFocusTimer){clearTimeout(this.CopyPasteFocusTimer);this.CopyPasteFocusTimer=-1;if(false!==isFocusToEditor&&null!=this.inputContext)if(this.inputContext.HtmlArea)this.inputContext.HtmlArea.focus()}},IsFocus:function(){return this.CopyPasteFocus},CommonDiv_Check:function(){var ElemToSelect=document.getElementById(this.CommonDivId);if(!ElemToSelect){ElemToSelect=document.createElement("div");ElemToSelect.id=this.CommonDivId; -ElemToSelect.className=this.CommonDivClassName;ElemToSelect.style.position="fixed";ElemToSelect.style.left="0px";ElemToSelect.style.top="-100px";ElemToSelect.style.width="10000px";ElemToSelect.style.height="100px";ElemToSelect.style.overflow="hidden";ElemToSelect.style.zIndex=-1E3;ElemToSelect.style.MozUserSelect="text";ElemToSelect.style.fontFamily="onlyofficeDefaultFont";ElemToSelect.style.fontSize="11pt";ElemToSelect.style.color="black";ElemToSelect.style["-khtml-user-select"]="text";ElemToSelect.style["-o-user-select"]= -"text";ElemToSelect.style["user-select"]="text";ElemToSelect.style["-webkit-user-select"]="text";ElemToSelect.setAttribute("contentEditable",this.isCopyOutEnabled());var _parent=""==this.CommonDivIdParent?document.body:document.getElementById(this.CommonDivIdParent);_parent.appendChild(ElemToSelect)}else ElemToSelect.setAttribute("contentEditable",this.isCopyOutEnabled());return ElemToSelect},CommonDiv_Select:function(){var ElemToSelect=this.CommonDiv;if(window.getSelection){var selection=window.getSelection(); -var rangeToSelect=document.createRange();var is_gecko=AscBrowser.isGecko;if(is_gecko){ElemToSelect.appendChild(document.createTextNode("\u00a0"));ElemToSelect.insertBefore(document.createTextNode("\u00a0"),ElemToSelect.firstChild);rangeToSelect.setStartAfter(ElemToSelect.firstChild);rangeToSelect.setEndBefore(ElemToSelect.lastChild)}else{var aChildNodes=ElemToSelect.childNodes;if(aChildNodes.length==1){var elem=aChildNodes[0];var wrap=document.createElement("b");wrap.setAttribute("style","font-weight:normal; background-color: transparent; color: transparent;"); -elem=ElemToSelect.removeChild(elem);wrap.appendChild(elem);ElemToSelect.appendChild(wrap)}rangeToSelect.selectNodeContents(ElemToSelect)}selection.removeAllRanges();selection.addRange(rangeToSelect)}else if(document.body.createTextRange){var rangeToSelect=document.body.createTextRange();rangeToSelect.moveToElementText(ElemToSelect);rangeToSelect.select()}},CommonDiv_Start:function(){this.ClosureParams.overflowBody=document.body.style.overflow;document.body.style.overflow="hidden";this.ClosureParams.backgroundcolorBody= -document.body.style["background-color"];document.body.style["background-color"]="transparent";var ElemToSelect=this.CommonDiv;ElemToSelect.style.display="block";while(ElemToSelect.hasChildNodes())ElemToSelect.removeChild(ElemToSelect.lastChild);document.body.style.MozUserSelect="text";delete document.body.style["-khtml-user-select"];delete document.body.style["-o-user-select"];delete document.body.style["user-select"];document.body.style["-webkit-user-select"]="text";ElemToSelect.style.MozUserSelect= -"all"},CommonDiv_End:function(){var ElemToSelect=this.CommonDiv;if(ElemToSelect){ElemToSelect.style.display=AscBrowser.isSafari?"block":"none";ElemToSelect.style.MozUserSelect="none"}document.body.style.MozUserSelect="none";document.body.style["-khtml-user-select"]="none";document.body.style["-o-user-select"]="none";document.body.style["user-select"]="none";document.body.style["-webkit-user-select"]="none";document.body.style["background-color"]=this.ClosureParams.backgroundcolorBody;document.body.style.overflow= -this.ClosureParams.overflowBody;this.CopyFlag=false;this.bCut=false;this.EndFocus()},CommonDiv_Copy:function(){this.CopyFlag=true;this.CommonDiv=this.CommonDiv_Check();this.CommonDiv_Start();this.ClosureParams.isDivCopy=true;this.DivOnCopyHtmlPresent=false;this.DivOnCopyText="";this.LastCopyBinary=null;this.checkCopy(AscCommon.c_oAscClipboardDataFormat.Text|AscCommon.c_oAscClipboardDataFormat.Html|AscCommon.c_oAscClipboardDataFormat.Internal);this.ClosureParams.isDivCopy=false;if(!this.DivOnCopyHtmlPresent&& -this.DivOnCopyText!="")this.CommonDiv.innerHTML=this.DivOnCopyText;this.DivOnCopyHtmlPresent=false;this.DivOnCopyText="";this.CommonDiv_Select();window.setTimeout(function(){g_clipboardBase.CommonDiv_End()},0)},CommonDiv_Execute_CopyCut:function(){if(this.IsCopyCutOnlyInEditable)this._private_onbeforecopy(undefined,true)},CommonIframe_PasteStart:function(_html_data,text_data){var ifr=document.getElementById(this.CommonIframeId);if(!ifr){ifr=document.createElement("iframe");ifr.name=this.CommonIframeId; -ifr.id=this.CommonIframeId;ifr.style.position="absolute";ifr.style.top="-100px";ifr.style.left="0px";ifr.style.width="10000px";ifr.style.height="100px";ifr.style.overflow="hidden";ifr.style.zIndex=-1E3;ifr.setAttribute("sandbox","allow-same-origin");document.body.appendChild(ifr);this.CommonIframe=ifr}else ifr.style.width="10000px";var frameWindow=window.frames[this.CommonIframeId];if(frameWindow){frameWindow.document.open();frameWindow.document.write(_html_data);frameWindow.document.close();if(null!= -frameWindow.document&&null!=frameWindow.document.body){ifr.style.display="block";this.pastedFrom=definePastedFrom(frameWindow.document);this.Api.asc_PasteData(AscCommon.c_oAscClipboardDataFormat.HtmlElement,frameWindow.document.body,ifr,text_data)}}ifr.style.width="100px";g_clipboardBase.Paste_End()},CommonIframe_PasteEnd:function(){if(this.CommonIframe&&this.CommonIframe.style.display!="none"){this.CommonIframe.blur();this.CommonIframe.style.display="none"}},Paste_End:function(){this.CommonIframe_PasteEnd(); -this.Api.decrementCounterLongAction();this.PasteFlag=false;this.EndFocus();if(this.needClearBuffer){this.ClearBuffer();this.needClearBuffer=false}},pushData:function(_format,_data){if(null==this.LastCopyBinary)this.LastCopyBinary=[];this.LastCopyBinary.push({type:_format,data:_data});if(this.ClosureParams.isDivCopy===true){if(!this.isCopyOutEnabled())return;if(_format==AscCommon.c_oAscClipboardDataFormat.Html){this.CommonDiv.innerHTML=_data;this.DivOnCopyHtmlPresent=true}if(_format==AscCommon.c_oAscClipboardDataFormat.Text)this.DivOnCopyText= -_data;return}var _data_format="";switch(_format){case AscCommon.c_oAscClipboardDataFormat.Html:_data_format="text/html";break;case AscCommon.c_oAscClipboardDataFormat.Text:_data_format="text/plain";break;case AscCommon.c_oAscClipboardDataFormat.Internal:_data_format="text/x-custom";break;default:break}if(_data_format!=""&&_data!==null&&this.isCopyOutEnabled())if(_data_format=="text/x-custom")this.ClosureParams.setData(_data_format,"asc_internalData2;"+_data);else this.ClosureParams.setData(_data_format, -_data)},Button_Copy:function(){if(this.inputContext){if(this.inputContext.isHardCheckKeyboard)this.inputContext.enableVirtualKeyboard_Hard();this.inputContext.HtmlArea.focus()}this.Api.asc_enableKeyEvents(true,true);this.CommonDiv_Execute_CopyCut();var _ret=false;try{_ret=document.execCommand("copy")}catch(err){_ret=false}if(!_ret){this.LastCopyBinary=null;this.checkCopy(AscCommon.c_oAscClipboardDataFormat.Text|AscCommon.c_oAscClipboardDataFormat.Html|AscCommon.c_oAscClipboardDataFormat.Internal)}return _ret}, -Button_Cut:function(){if(this.inputContext){if(this.inputContext.isHardCheckKeyboard)this.inputContext.enableVirtualKeyboard_Hard();this.inputContext.HtmlArea.focus()}this.Api.asc_enableKeyEvents(true,true);this.CommonDiv_Execute_CopyCut();var _ret=false;try{_ret=document.execCommand("cut")}catch(err){_ret=false}if(!_ret){this.LastCopyBinary=null;this.bCut=true;this.checkCopy(AscCommon.c_oAscClipboardDataFormat.Text|AscCommon.c_oAscClipboardDataFormat.Html|AscCommon.c_oAscClipboardDataFormat.Internal); -this.Api.asc_SelectionCut();this.bCut=false}return _ret},Button_Paste:function(){if(this.inputContext){if(this.inputContext.isHardCheckKeyboard)this.inputContext.enableVirtualKeyboard_Hard();this.inputContext.HtmlArea.focus()}this.Api.asc_enableKeyEvents(true,true);var _ret=false;try{_ret=document.execCommand("paste")}catch(err){_ret=false}if(!_ret&&null!=this.LastCopyBinary){var _data=null;var _isInternal=false;for(var i=0;i0)this.Api.asc_PasteData(this.LastCopyBinary[0].type,this.LastCopyBinary[0].data)}return _ret},ClearBuffer:function(){if(-1!=this.clearBufferTimerId)clearTimeout(this.clearBufferTimerId);this.clearBufferTimerId=setTimeout(function(){if(AscCommon.g_clipboardBase)AscCommon.g_clipboardBase.clearBufferTimerId=-1},500);this.Button_Copy()},isCopyOutEnabled:function(){if(this.Api&&this.Api.isCopyOutEnabled)return this.Api.isCopyOutEnabled(); -return true}};function definePastedFrom(doc){if(!doc)return null;var res=null;var metaTags=doc.getElementsByTagName("meta");for(var i=0;i>1)+"px;top:"+-this.HtmlAreaOffset+ -"px;";_style+="background:transparent;border:none;position:absolute;text-shadow:0 0 0 #000;outline:none;color:transparent;width:"+this.HtmlAreaWidth+"px;height:50px;";_style+="overflow:hidden;padding:0px;margin:0px;font-family:arial;resize:none;font-weight:normal;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;";_style+="touch-action: none;-webkit-touch-callout: none;color:transparent;caret-color:transparent;";_style+=AscCommon.AscBrowser.isAppleDevices?"font-size:0px;": -"font-size:8px;";this.HtmlArea.setAttribute("style",_style);this.HtmlArea.setAttribute("spellcheck",false);this.HtmlArea.setAttribute("autocapitalize","none");this.HtmlArea.setAttribute("autocomplete","off");this.HtmlArea.setAttribute("autocorrect","off");this.HtmlDiv.appendChild(this.HtmlArea);if(true){var oHtmlDivScrollable=document.createElement("div");oHtmlDivScrollable.id="area_id_main";oHtmlDivScrollable.setAttribute("style","background:transparent;border:none;position:absolute;padding:0px;margin:0px;z-index:0;pointer-events:none;"); -var parentStyle=getComputedStyle(oHtmlParent);oHtmlDivScrollable.style.left=parentStyle.left;oHtmlDivScrollable.style.top=parentStyle.top;oHtmlDivScrollable.style.width=parentStyle.width;oHtmlDivScrollable.style.height=parentStyle.height;oHtmlDivScrollable.style.overflow="hidden";oHtmlDivScrollable.appendChild(this.HtmlDiv);oHtmlParent.parentNode.appendChild(oHtmlDivScrollable)}else oHtmlParent.appendChild(this.HtmlDiv);var oThis=this;this.HtmlArea["onkeydown"]=function(e){if(AscCommon.AscBrowser.isSafariMacOs){var cmdButton= -e.ctrlKey||e.metaKey?true:false;var buttonCode=e.keyCode==67||e.keyCode==88||e.keyCode==86;if(cmdButton&&buttonCode)oThis.IsDisableKeyPress=true;else oThis.IsDisableKeyPress=false}return oThis.onKeyDown(e)};this.HtmlArea["onkeypress"]=function(e){if(oThis.IsDisableKeyPress==true){oThis.IsDisableKeyPress=false;var cmdButton=e.ctrlKey||e.metaKey?true:false;if(cmdButton)return}return oThis.onKeyPress(e)};this.HtmlArea["onkeyup"]=function(e){oThis.IsDisableKeyPress=false;return oThis.onKeyUp(e)};this.HtmlArea.addEventListener("input", -function(e){return oThis.onInput(e)},false);this.HtmlArea.addEventListener("compositionstart",function(e){return oThis.onCompositionStart(e)},false);this.HtmlArea.addEventListener("compositionupdate",function(e){return oThis.onCompositionUpdate(e)},false);this.HtmlArea.addEventListener("compositionend",function(e){return oThis.onCompositionEnd(e)},false);this.show();this.Api.Input_UpdatePos();if(AscCommon.AscBrowser.isAndroid)this.HtmlArea.onclick=function(e){var _this=AscCommon.g_inputContext;if(-1!= -_this.virtualKeyboardClickTimeout){clearTimeout(_this.virtualKeyboardClickTimeout);_this.virtualKeyboardClickTimeout=-1}_this.apiCompositeEnd();if(!_this.virtualKeyboardClickPrevent)return;_this.setReadOnlyWrapper(true);_this.virtualKeyboardClickPrevent=false;AscCommon.stopEvent(e);_this.virtualKeyboardClickTimeout=setTimeout(function(){_this.setReadOnlyWrapper(false);_this.virtualKeyboardClickTimeout=-1},1);return false}},onResize:function(_editorContainerId){var _elem=document.getElementById("area_id_main"); -var _elemSrc=document.getElementById(_editorContainerId);if(!_elem||!_elemSrc)return;if(AscCommon.AscBrowser.isChrome){var rectObject=_elemSrc.getBoundingClientRect();this.FixedPosCheckElementX=rectObject.left;this.FixedPosCheckElementY=rectObject.top}var _width=_elemSrc.style.width;if((null==_width||""==_width)&&window.getComputedStyle){var _s=window.getComputedStyle(_elemSrc);_elem.style.left=_s.left;_elem.style.top=_s.top;_elem.style.width=_s.width;_elem.style.height=_s.height}else{_elem.style.left= -_elemSrc.style.left;_elem.style.top=_elemSrc.style.top;_elem.style.width=_width;_elem.style.height=_elemSrc.style.height}if(this.Api.isMobileVersion){var _elem1=document.getElementById("area_id_parent");var _elem2=document.getElementById("area_id");_elem1.parentNode.style.pointerEvents="";_elem1.style.left="0px";_elem1.style.top="-1000px";_elem1.style.right="0px";_elem1.style.bottom="-100px";_elem1.style.width="auto";_elem1.style.height="auto";_elem2.style.left="0px";_elem2.style.top="0px";_elem2.style.right= -"0px";_elem2.style.bottom="0px";_elem2.style.width="100%";_elem2.style.height="100%";if(AscCommon.AscBrowser.isIE){document.body.style["msTouchAction"]="none";document.body.style["touchAction"]="none"}}var _editorSdk=document.getElementById("editor_sdk");this.editorSdkW=_editorSdk.clientWidth;this.editorSdkH=_editorSdk.clientHeight},checkFocus:function(){if(this.Api.asc_IsFocus()&&!AscCommon.g_clipboardBase.IsFocus()&&!AscCommon.g_clipboardBase.IsWorking())if(document.activeElement!=this.HtmlArea)this.HtmlArea.focus()}, -move:function(x,y){if(this.Api.isMobileVersion)return;var oTarget=document.getElementById(this.TargetId);if(!oTarget)return;var xPos=x?x:parseInt(oTarget.style.left);var yPos=(y?y:parseInt(oTarget.style.top))+parseInt(oTarget.style.height);if(AscCommon.AscBrowser.isSafari&&AscCommon.AscBrowser.isMobile)xPos=-100;if(!this.isDebug&&!this.isSystem){this.HtmlDiv.style.left=xPos+this.FixedPosCheckElementX+"px";this.HtmlDiv.style.top=yPos+this.FixedPosCheckElementY+this.TargetOffsetY+this.HtmlAreaOffset+ -"px";this.HtmlArea.scrollTop=this.HtmlArea.scrollHeight}else this.debugCalculatePlace(xPos+this.FixedPosCheckElementX,yPos+this.FixedPosCheckElementY+this.TargetOffsetY);if(window.g_asc_plugins)window.g_asc_plugins.onPluginEvent("onTargetPositionChanged")},emulateKeyDownApi:function(code){var _e={altKey:false,ctrlKey:false,shiftKey:false,target:null,charCode:0,which:code,keyCode:code,code:"",preventDefault:function(){},stopPropagation:function(){}};this.Api.onKeyDown(_e);this.Api.onKeyUp(_e)},clear:function(isFromFocus){if(!this.TextArea_Not_ContentEditableDiv)this.HtmlArea.innerHTML= -"";else this.HtmlArea.value="";if(isFromFocus!==true)this.HtmlArea.focus();this.TextBeforeComposition="";this.Text="";this.Target=0;this.CompositionStart=0;this.CompositionEnd=0;this.IsComposition=false;this.keyPressInput="";if(window.g_asc_plugins)window.g_asc_plugins.onPluginEvent("onInputHelperClear")},getAreaValue:function(){return this.TextArea_Not_ContentEditableDiv?this.HtmlArea.value:this.HtmlArea.innerText},setReadOnly:function(isLock){if(isLock)this.ReadOnlyCounter++;else this.ReadOnlyCounter--; -this.setReadOnlyWrapper(0>=this.ReadOnlyCounter?false:true)},setReadOnlyWrapper:function(val){this.HtmlArea.readOnly=this.Api.isViewMode?true:val},show:function(){if(this.isDebug||this.isSystem){this.log("ti: show");document.getElementById("area_id_main").style.zIndex=10;this.HtmlArea.style.top="0px";this.HtmlArea.style.width="100%";this.HtmlArea.style.height="100%";this.HtmlArea.style.background="#FFFFFF";this.HtmlArea.style.color="black";this.HtmlDiv.style.zIndex=90;this.HtmlDiv.style.border="2px solid #4363A4"; -this.isShow=true}},unshow:function(isAttack){if(this.isDebug||this.isSystem||true==isAttack){this.log("ti: unshow");document.getElementById("area_id_main").style.zIndex=0;this.HtmlArea.style.top=-this.HtmlAreaOffset+"px";this.HtmlArea.style.width="1000px";this.HtmlArea.style.height="50px";this.HtmlArea.style.background="transparent";this.HtmlArea.style.color="transparent";this.HtmlDiv.style.zIndex=0;this.HtmlDiv.style.border="none";this.isShow=false}},debugCalculatePlace:function(x,y){var _left=x; -var _top=y;if(undefined==_left)_left=parseInt(this.HtmlDiv.style.left);if(undefined==_top)_top=parseInt(this.HtmlDiv.style.top);var _r_max=this.editorSdkW;var _b_max=this.editorSdkH;_r_max-=60;if(_r_max-_left>50)this.debugTexBoxMaxW=_r_max-_left;else{_left=_r_max-50;this.debugTexBoxMaxW=50}_b_max-=40;if(_b_max-_top>50)this.debugTexBoxMaxH=_b_max-_top;else{_top=_b_max-50;this.debugTexBoxMaxH=50}if(AscCommon.AscBrowser.isSafari&&AscCommon.AscBrowser.isMobile)_left=-100;this.HtmlDiv.style.left=_left+ -"px";this.HtmlDiv.style.top=_top+"px";var _height=22;var _t=this.getAreaValue();if(0!=_t.length){var _editorSdk=document.getElementById("editor_sdk");var _p=document.createElement("p");_p.style.zIndex="-1";_p.style.position="absolute";_p.style.fontFamily="arial";_p.style.fontSize="12pt";_p.style.left="0px";_p.style.width=this.debugTexBoxMaxW+"px";_editorSdk.appendChild(_p);_t=_t.replace(/ /g," ");_p.innerHTML=""+_t+"";var _width=_p.firstChild.offsetWidth;_width=Math.min(_width+20, -this.debugTexBoxMaxW);if(AscCommon.AscBrowser.isIE)_width+=10;var area=document.createElement("textarea");area.style.zIndex="-1";area.id="area2_id";area.rows=1;area.setAttribute("style","font-family:arial;font-size:12pt;position:absolute;resize:none;padding:0px;margin:0px;font-weight:normal;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;");area.style.overflow="hidden";area.style.width=_width+"px";_editorSdk.appendChild(area);area.value=this.getAreaValue();_height= -area.clientHeight;if(area.scrollHeight>_height)_height=area.scrollHeight;_editorSdk.removeChild(_p);_editorSdk.removeChild(area)}if(_height>this.debugTexBoxMaxH)_height=this.debugTexBoxMaxH;this.HtmlDiv.style.width=_width+"px";this.HtmlDiv.style.height=_height+"px";var oldZindex=parseInt(this.HtmlDiv.style.zIndex);var newZindex=oldZindex==90?"89":"90";this.HtmlDiv.style.zIndex=newZindex},onInput:function(e,isFromCompositionUpdate){if(this.Api.isLongAction()||this.Api.isViewMode){AscCommon.stopEvent(e); -return false}if(this.isSystem){if(!this.isShow)this.show();this.debugCalculatePlace(undefined,undefined);return}if(this.isKeyPressOnUp&&this.keyPressOnUpCodes.length>0){if(!this.TextArea_Not_ContentEditableDiv)this.HtmlArea.innerHTML="";else this.HtmlArea.value="";this.TextBeforeComposition="";this.Text="";AscCommon.stopEvent(e);return false}this.log("ti: onInput");this.Text=this.getAreaValue();this.Text=this.Text.split(" ").join(" ");var codes=[];if(this.IsComposition||this.ApiIsComposition){var ieStart= --1;var ieEnd=-1;if(true){var target=e.target;if(target["msGetInputContext"]){var ctx=target["msGetInputContext"]();if(ctx){ieStart=ctx["compositionStartOffset"];ieEnd=ctx["compositionEndOffset"]}}}this.CompositionEnd=this.Text.length;this.CompositionStart=this.TextBeforeComposition.length;var textReplace=this.Text.substr(this.CompositionStart);var iter;for(iter=textReplace.getUnicodeIterator();iter.check();iter.next())codes.push(iter.value());var isAsync=AscFonts.FontPickerByCharacter.checkTextLight(codes, -true);if(!isAsync){if(ieStart>this.CompositionStart){textReplace=textReplace.substr(0,ieStart-this.CompositionStart);codes=[];for(iter=textReplace.getUnicodeIterator();iter.check();iter.next())codes.push(iter.value());this.apiCompositeReplace(codes);this.apiCompositeEnd();this.TextBeforeComposition=this.Text.substr(0,ieStart);this.apiCompositeStart();this.CompositionStart=ieStart;codes=[];textReplace=this.Text.substr(this.CompositionStart);for(iter=textReplace.getUnicodeIterator();iter.check();iter.next())codes.push(iter.value()); -this.apiCompositeReplace(codes)}else this.apiCompositeReplace(codes);if(!this.IsComposition){this.apiCompositeEnd();this.TextBeforeComposition=this.Text}}else{AscFonts.FontPickerByCharacter.loadFonts(this,function(){this.apiCompositeReplace(codes);this.apiCompositeEnd();this.clear();this.setReadOnly(false)});AscCommon.stopEvent(e);this.setReadOnly(true);return false}}else{var textToApi=this.Text.substr(this.TextBeforeComposition.length);for(var iter=textToApi.getUnicodeIterator();iter.check();iter.next())codes.push(iter.value()); -if(codes.length>0)this.apiInputText(codes);this.TextBeforeComposition=this.Text}if(!this.IsComposition)if(this.Text.length>0){var _lastCode=this.Text.charCodeAt(this.Text.length-1);if(_lastCode==12290||_lastCode==46){AscCommon.stopEvent(e);if(AscCommon.AscBrowser.isIE&&!AscCommon.AscBrowser.isIeEdge)setTimeout(function(){window["AscCommon"].g_inputContext.clear();window["AscCommon"].g_inputContext.HtmlArea.focus()},0);else this.clear();return false}}},emulateNativeKeyDown:function(e,target){var oEvent= -document.createEvent("KeyboardEvent");Object.defineProperty(oEvent,"keyCode",{get:function(){return this.keyCodeVal}});Object.defineProperty(oEvent,"which",{get:function(){return this.keyCodeVal}});Object.defineProperty(oEvent,"shiftKey",{get:function(){return this.shiftKeyVal}});Object.defineProperty(oEvent,"altKey",{get:function(){return this.altKeyVal}});Object.defineProperty(oEvent,"metaKey",{get:function(){return this.metaKeyVal}});Object.defineProperty(oEvent,"ctrlKey",{get:function(){return this.ctrlKeyVal}}); -if(AscCommon.AscBrowser.isIE)oEvent.preventDefault=function(){try{Object.defineProperty(this,"defaultPrevented",{get:function(){return true}})}catch(err){}};var k=e.keyCode;if(oEvent.initKeyboardEvent)oEvent.initKeyboardEvent("keydown",true,true,window,false,false,false,false,k,k);else oEvent.initKeyEvent("keydown",true,true,window,false,false,false,false,k,0);oEvent.keyCodeVal=k;oEvent.shiftKeyVal=e.shiftKey;oEvent.altKeyVal=e.altKey;oEvent.metaKeyVal=e.metaKey;oEvent.ctrlKeyVal=e.ctrlKey;var _elem= -target?target:_getElementKeyboardDown(this.nativeFocusElement,3);_elem.dispatchEvent(oEvent);return oEvent.defaultPrevented},isSpaceSymbol:function(e){if(e.keyCode==32)return true;if(e.keyCode==229&&(e.code=="space"||e.code=="Space"||e.key=="Spacebar"))return true;return false},systemInputEnable:function(isEnabled){if(this.isSystem==isEnabled)return;this.isSystem=isEnabled;this.HtmlArea.style.left=this.isSystem?"0px":"-"+(this.HtmlAreaWidth>>1)+"px";this.clear();if(this.isShow)this.unshow(true);if(this.Api.WordControl&& -this.Api.WordControl.m_oLogicDocument&&this.Api.WordControl.m_oLogicDocument.Document_UpdateSelectionState)this.Api.WordControl.m_oLogicDocument.Document_UpdateSelectionState()},debugInputEnable:function(isEnabled){if(this.isDebug==isEnabled)return;this.isDebug=isEnabled;this.HtmlArea.style.left=this.isDebug?"0px":"-"+(this.HtmlAreaWidth>>1)+"px"},apiInputText:function(codes){var isAsync=AscFonts.FontPickerByCharacter.checkTextLight(codes,true);if(!isAsync){this.apiCompositeStart();this.apiCompositeReplace(codes); -this.apiCompositeEnd()}else{AscFonts.FontPickerByCharacter.loadFonts(this,function(){this.apiCompositeStart();this.apiCompositeReplace(codes);this.apiCompositeEnd();this.setReadOnly(false)});this.setReadOnly(true);return false}},onKeyDown:function(e){if(this.Api.isLongAction()){AscCommon.stopEvent(e);return false}if(this.isInputHelpersPresent)switch(e.keyCode){case 9:case 13:case 38:case 40:case 33:case 34:case 35:case 36:case 27:{window.g_asc_plugins.onPluginEvent2("onKeyDown",{"keyCode":e.keyCode}, -this.isInputHelpers);AscCommon.stopEvent(e);return false}case 32:{if(window.g_asc_plugins)window.g_asc_plugins.onPluginEvent("onInputHelperInput",{"text":this.keyPressInput})}default:break}else if(32==e.keyCode);if(this.isSystem&&this.isShow){if(e.keyCode==13){var text=this.getAreaValue();var codes=[];for(var iter=text.getUnicodeIterator();iter.check();iter.next())codes.push(iter.value());this.apiInputText(codes);this.clear();this.unshow();AscCommon.stopEvent(e);return false}else if(e.keyCode==27){this.clear(); -this.unshow();AscCommon.stopEvent(e);return false}return}if(null!=this.nativeFocusElement)if(this.emulateNativeKeyDown(e)){e.preventDefault();return false}var _code=e.keyCode;if(_code!=8&&_code!=46)this.KeyDownFlag=true;AscCommon.check_KeyboardEvent(e);var arrCodes=this.Api.getAddedTextOnKeyDown(AscCommon.global_keyboardEvent);var isAsync=AscFonts.FontPickerByCharacter.checkTextLight(arrCodes,true);if(isAsync){AscFonts.FontPickerByCharacter.loadFonts(this,function(){this.onKeyDown(e);this.onKeyUp(e); -this.setReadOnly(false)});AscCommon.stopEvent(e);this.setReadOnly(true);return false}var ret=this.Api.onKeyDown(e);switch(e.keyCode){case 8:{var oldKeyPressInput=this.keyPressInput;this.clear();if(oldKeyPressInput.length>1){this.keyPressInput=oldKeyPressInput.substr(0,oldKeyPressInput.length-1);if(window.g_asc_plugins)window.g_asc_plugins.onPluginEvent("onInputHelperInput",{"text":this.keyPressInput})}return false}case 9:case 13:case 37:case 38:case 39:case 40:case 33:case 34:case 35:case 36:{this.clear(); +_internal!=""&&_internal.indexOf("asc_internalData2;")==0){this.Api.asc_PasteData(AscCommon.c_oAscClipboardDataFormat.Internal,_internal.substr("asc_internalData2;".length),null,_text_format);g_clipboardBase.Paste_End();return false}var _html_format=this.ClosureParams.getData("text/html");_html_format=_html_format.replace(/]+>/g,"");if(!_html_format){this.PasteFlag=false;g_clipboardBase.Paste_End();return false}if(_html_format&&_html_format!=""){var nIndex=_html_format.indexOf("");if(-1!= +nIndex)_html_format=_html_format.substring(0,nIndex+"".length);this.CommonIframe_PasteStart(_html_format,_text_format);return false}if(_text_format&&_text_format!=""){this.Api.asc_PasteData(AscCommon.c_oAscClipboardDataFormat.Text,_text_format);g_clipboardBase.Paste_End();return false}var items=_clipboard.items;if(null!=items&&0!=items.length){g_clipboardBase.PasteImagesBody="";g_clipboardBase.PasteImagesCount=items.length;g_clipboardBase.PasteImagesCounter=0;for(var i=0;i';if(g_clipboardBase.PasteImagesCounter==g_clipboardBase.PasteImagesCount){g_clipboardBase.CommonIframe_PasteStart(""+g_clipboardBase.PasteImagesBody+"");g_clipboardBase.PasteImagesBody="";g_clipboardBase.PasteImagesCounter=0;g_clipboardBase.PasteImagesCount= +0}};reader.onabort=reader.onerror=function(e){g_clipboardBase.PasteImagesCounter++;if(g_clipboardBase.PasteImagesCounter==g_clipboardBase.PasteImagesCount){g_clipboardBase.CommonIframe_PasteStart(""+g_clipboardBase.PasteImagesBody+"");g_clipboardBase.PasteImagesBody="";g_clipboardBase.PasteImagesCounter=0;g_clipboardBase.PasteImagesCount=0}};try{reader.readAsDataURL(blob)}catch(err){g_clipboardBase.PasteImagesCounter++}}else g_clipboardBase.PasteImagesCounter++;if(g_clipboardBase.PasteImagesCounter== +g_clipboardBase.PasteImagesCount)g_clipboardBase.Paste_End();return false}}g_clipboardBase.Paste_End();return false},_private_onbeforepaste:function(e,isAttackEmulate){this._console_log("onbeforepaste");if(!this.Api.asc_IsFocus(true))return;{this.CommonDiv=this.CommonDiv_Check();this.CommonDiv_Start();this.CommonDiv.focus();this.StartFocus();this.CommonDiv_Select();return}return false},_private_onbeforecopy_select:function(){if(AscBrowser.isIE){this._console_log("onbeforecopy_select");this.CommonDiv= +this.CommonDiv_Check();this.CommonDiv_Start();this.CommonDiv.innerHTML=" ";this.CommonDiv.focus();this.StartFocus();this.CommonDiv_Select()}},_private_onbeforecopy:function(e,isAttackEmulate){this._console_log("onbeforecopy");if(!this.Api.asc_IsFocus(true))return;{this.CommonDiv=this.CommonDiv_Check();this.CommonDiv_Start();this.CommonDiv.innerHTML=" ";this.CommonDiv.focus();this.StartFocus();this.CommonDiv_Select()}return false},Init:function(_api){this.Api=_api;window["AscCommon"].g_specialPasteHelper.Init(_api); +this.ClosureParams.getData=function(type){var _clipboard=this._e&&this._e.clipboardData?this._e.clipboardData:window.clipboardData;if(!_clipboard||!_clipboard.getData)return null;var _type=type;if(AscBrowser.isIE&&(type=="text"||type=="text/plain"))_type="Text";try{return _clipboard.getData(_type)}catch(e){}return null};this.ClosureParams.setData=function(type,_data){var _clipboard=this._e&&this._e.clipboardData?this._e.clipboardData:window.clipboardData;if(!_clipboard||!_clipboard.setData)return null; +var _type=type;if(AscBrowser.isIE&&(type=="text"||type=="text/plain"))_type="Text";try{_clipboard.setData(_type,_data)}catch(e){}};if(!AscBrowser.isIE){document.oncopy=function(e){return g_clipboardBase._private_oncopy(e)};document.oncut=function(e){return g_clipboardBase._private_oncut(e)};document.onpaste=function(e){return g_clipboardBase._private_onpaste(e)};document["onbeforecopy"]=function(e){return g_clipboardBase._private_onbeforecopy(e)};document["onbeforecut"]=function(e){return g_clipboardBase._private_onbeforecopy(e)}; +document["onbeforepaste"]=function(e){return g_clipboardBase._private_onbeforepaste(e)}}else{document.addEventListener("copy",function(e){return g_clipboardBase._private_oncopy(e)});document.addEventListener("cut",function(e){return g_clipboardBase._private_oncut(e)});document.addEventListener("paste",function(e){return g_clipboardBase._private_onpaste(e)});document.addEventListener("beforepaste",function(e){return g_clipboardBase._private_onbeforepaste(e)});document.addEventListener("beforecopy", +function(e){return g_clipboardBase._private_onbeforecopy(e)});document.addEventListener("beforecut",function(e){return g_clipboardBase._private_onbeforecopy(e)})}if(this.IsCopyCutOnlyInEditable||this.IsPasteOnlyInEditable)document.onkeydown=function(e){if(!g_clipboardBase.Api.asc_IsFocus(true)||g_clipboardBase.Api.isLongAction())return;var isAltGr=AscCommon.getAltGr(e);if(isAltGr)return;var isCtrl=e.ctrlKey===true||e.metaKey===true;var isShift=e.shiftKey;var keyCode=e.keyCode;if(g_clipboardBase.IsCopyCutOnlyInEditable){var bIsBeforeCopyCutEmulate= +false;var _cut=false;if(isCtrl&&!isShift&&(keyCode==67||keyCode==88))bIsBeforeCopyCutEmulate=true;if(!isCtrl&&isShift&&keyCode==45){bIsBeforeCopyCutEmulate=true;_cut=true}if(bIsBeforeCopyCutEmulate){g_clipboardBase._console_log("emulate_beforecopycut");var isEmulate=false;try{isEmulate=_cut?document.execCommand("beforecut"):document.execCommand("beforecopy")}catch(err){}g_clipboardBase._private_onbeforecopy(undefined,!isEmulate)}}if(g_clipboardBase.IsPasteOnlyInEditable){var bIsBeforePasteEmulate= +false;if(isCtrl&&!isShift&&keyCode==86)bIsBeforePasteEmulate=true;if(!isCtrl&&isShift&&keyCode==45)bIsBeforePasteEmulate=true;if(bIsBeforePasteEmulate){g_clipboardBase._console_log("emulate_beforepaste");var isEmulate=false;try{isEmulate=document.execCommand("beforepaste")}catch(err$14){}g_clipboardBase._private_onbeforepaste(undefined,!isEmulate)}}};if(AscBrowser.isSafari&&false){this.CommonDiv=this.CommonDiv_Check();setInterval(function(){if(g_clipboardBase.Api.asc_IsFocus(true))g_clipboardBase.CommonDiv.focus()}, +100)}},IsWorking:function(){return this.CopyFlag||this.PasteFlag?true:false},StartFocus:function(){this.EndFocus(false);this.CopyPasteFocus=true;this.CopyPasteFocusTimer=setTimeout(function(){g_clipboardBase.EndFocus()},1E3)},EndFocus:function(isFocusToEditor){this.CopyPasteFocus=false;if(-1!=this.CopyPasteFocusTimer){clearTimeout(this.CopyPasteFocusTimer);this.CopyPasteFocusTimer=-1;if(false!==isFocusToEditor&&null!=this.inputContext)if(this.inputContext.HtmlArea)this.inputContext.HtmlArea.focus()}}, +IsFocus:function(){return this.CopyPasteFocus},CommonDiv_Check:function(){var ElemToSelect=document.getElementById(this.CommonDivId);if(!ElemToSelect){ElemToSelect=document.createElement("div");ElemToSelect.id=this.CommonDivId;ElemToSelect.className=this.CommonDivClassName;ElemToSelect.style.position="fixed";ElemToSelect.style.left="0px";ElemToSelect.style.top="-100px";ElemToSelect.style.width="10000px";ElemToSelect.style.height="100px";ElemToSelect.style.overflow="hidden";ElemToSelect.style.zIndex= +-1E3;ElemToSelect.style.MozUserSelect="text";ElemToSelect.style.fontFamily="onlyofficeDefaultFont";ElemToSelect.style.fontSize="11pt";ElemToSelect.style.color="black";ElemToSelect.style["-khtml-user-select"]="text";ElemToSelect.style["-o-user-select"]="text";ElemToSelect.style["user-select"]="text";ElemToSelect.style["-webkit-user-select"]="text";ElemToSelect.setAttribute("contentEditable",this.isCopyOutEnabled());var _parent=""==this.CommonDivIdParent?document.body:document.getElementById(this.CommonDivIdParent); +_parent.appendChild(ElemToSelect)}else ElemToSelect.setAttribute("contentEditable",this.isCopyOutEnabled());return ElemToSelect},CommonDiv_Select:function(){var ElemToSelect=this.CommonDiv;if(window.getSelection){var selection=window.getSelection();var rangeToSelect=document.createRange();var is_gecko=AscBrowser.isGecko;if(is_gecko){ElemToSelect.appendChild(document.createTextNode("\u00a0"));ElemToSelect.insertBefore(document.createTextNode("\u00a0"),ElemToSelect.firstChild);rangeToSelect.setStartAfter(ElemToSelect.firstChild); +rangeToSelect.setEndBefore(ElemToSelect.lastChild)}else{var aChildNodes=ElemToSelect.childNodes;if(aChildNodes.length==1){var elem=aChildNodes[0];var wrap=document.createElement("b");wrap.setAttribute("style","font-weight:normal; background-color: transparent; color: transparent;");elem=ElemToSelect.removeChild(elem);wrap.appendChild(elem);ElemToSelect.appendChild(wrap)}rangeToSelect.selectNodeContents(ElemToSelect)}selection.removeAllRanges();selection.addRange(rangeToSelect)}else if(document.body.createTextRange){var rangeToSelect= +document.body.createTextRange();rangeToSelect.moveToElementText(ElemToSelect);rangeToSelect.select()}},CommonDiv_Start:function(){this.ClosureParams.overflowBody=document.body.style.overflow;document.body.style.overflow="hidden";this.ClosureParams.backgroundcolorBody=document.body.style["background-color"];document.body.style["background-color"]="transparent";var ElemToSelect=this.CommonDiv;ElemToSelect.style.display="block";while(ElemToSelect.hasChildNodes())ElemToSelect.removeChild(ElemToSelect.lastChild); +document.body.style.MozUserSelect="text";delete document.body.style["-khtml-user-select"];delete document.body.style["-o-user-select"];delete document.body.style["user-select"];document.body.style["-webkit-user-select"]="text";ElemToSelect.style.MozUserSelect="all"},CommonDiv_End:function(){var ElemToSelect=this.CommonDiv;if(ElemToSelect){ElemToSelect.style.display=AscBrowser.isSafari?"block":"none";ElemToSelect.style.MozUserSelect="none"}document.body.style.MozUserSelect="none";document.body.style["-khtml-user-select"]= +"none";document.body.style["-o-user-select"]="none";document.body.style["user-select"]="none";document.body.style["-webkit-user-select"]="none";document.body.style["background-color"]=this.ClosureParams.backgroundcolorBody;document.body.style.overflow=this.ClosureParams.overflowBody;this.CopyFlag=false;this.bCut=false;this.EndFocus()},CommonDiv_Copy:function(){this.CopyFlag=true;this.CommonDiv=this.CommonDiv_Check();this.CommonDiv_Start();this.ClosureParams.isDivCopy=true;this.DivOnCopyHtmlPresent= +false;this.DivOnCopyText="";this.LastCopyBinary=null;this.checkCopy(AscCommon.c_oAscClipboardDataFormat.Text|AscCommon.c_oAscClipboardDataFormat.Html|AscCommon.c_oAscClipboardDataFormat.Internal);this.ClosureParams.isDivCopy=false;if(!this.DivOnCopyHtmlPresent&&this.DivOnCopyText!="")this.CommonDiv.innerHTML=this.DivOnCopyText;this.DivOnCopyHtmlPresent=false;this.DivOnCopyText="";this.CommonDiv_Select();window.setTimeout(function(){g_clipboardBase.CommonDiv_End()},0)},CommonDiv_Execute_CopyCut:function(){if(this.IsCopyCutOnlyInEditable)this._private_onbeforecopy(undefined, +true)},CommonIframe_PasteStart:function(_html_data,text_data){var ifr=document.getElementById(this.CommonIframeId);if(!ifr){ifr=document.createElement("iframe");ifr.name=this.CommonIframeId;ifr.id=this.CommonIframeId;ifr.style.position="absolute";ifr.style.top="-100px";ifr.style.left="0px";ifr.style.width="10000px";ifr.style.height="100px";ifr.style.overflow="hidden";ifr.style.zIndex=-1E3;ifr.setAttribute("sandbox","allow-same-origin");document.body.appendChild(ifr);this.CommonIframe=ifr}else ifr.style.width= +"10000px";var frameWindow=window.frames[this.CommonIframeId];if(frameWindow){frameWindow.document.open();frameWindow.document.write(_html_data);frameWindow.document.close();if(null!=frameWindow.document&&null!=frameWindow.document.body){ifr.style.display="block";this.pastedFrom=definePastedFrom(frameWindow.document);this.Api.asc_PasteData(AscCommon.c_oAscClipboardDataFormat.HtmlElement,frameWindow.document.body,ifr,text_data)}}ifr.style.width="100px";g_clipboardBase.Paste_End()},CommonIframe_PasteEnd:function(){if(this.CommonIframe&& +this.CommonIframe.style.display!="none"){this.CommonIframe.blur();this.CommonIframe.style.display="none"}},Paste_End:function(){this.CommonIframe_PasteEnd();this.Api.decrementCounterLongAction();this.PasteFlag=false;this.EndFocus();if(this.needClearBuffer){this.ClearBuffer();this.needClearBuffer=false}},pushData:function(_format,_data){if(null==this.LastCopyBinary)this.LastCopyBinary=[];this.LastCopyBinary.push({type:_format,data:_data});if(this.ClosureParams.isDivCopy===true){if(!this.isCopyOutEnabled())return; +if(_format==AscCommon.c_oAscClipboardDataFormat.Html){this.CommonDiv.innerHTML=_data;this.DivOnCopyHtmlPresent=true}if(_format==AscCommon.c_oAscClipboardDataFormat.Text)this.DivOnCopyText=_data;return}var _data_format="";switch(_format){case AscCommon.c_oAscClipboardDataFormat.Html:_data_format="text/html";break;case AscCommon.c_oAscClipboardDataFormat.Text:_data_format="text/plain";break;case AscCommon.c_oAscClipboardDataFormat.Internal:_data_format="text/x-custom";break;default:break}if(_data_format!= +""&&_data!==null&&this.isCopyOutEnabled())if(_data_format=="text/x-custom")this.ClosureParams.setData(_data_format,"asc_internalData2;"+_data);else this.ClosureParams.setData(_data_format,_data)},Button_Copy:function(){if(this.inputContext){if(this.inputContext.isHardCheckKeyboard)this.inputContext.enableVirtualKeyboard_Hard();this.inputContext.HtmlArea.focus()}this.Api.asc_enableKeyEvents(true,true);this.CommonDiv_Execute_CopyCut();var _ret=false;try{_ret=document.execCommand("copy")}catch(err){_ret= +false}if(!_ret){this.LastCopyBinary=null;this.checkCopy(AscCommon.c_oAscClipboardDataFormat.Text|AscCommon.c_oAscClipboardDataFormat.Html|AscCommon.c_oAscClipboardDataFormat.Internal)}return _ret},Button_Cut:function(){if(this.inputContext){if(this.inputContext.isHardCheckKeyboard)this.inputContext.enableVirtualKeyboard_Hard();this.inputContext.HtmlArea.focus()}this.Api.asc_enableKeyEvents(true,true);this.CommonDiv_Execute_CopyCut();var _ret=false;try{_ret=document.execCommand("cut")}catch(err){_ret= +false}if(!_ret){this.LastCopyBinary=null;this.bCut=true;this.checkCopy(AscCommon.c_oAscClipboardDataFormat.Text|AscCommon.c_oAscClipboardDataFormat.Html|AscCommon.c_oAscClipboardDataFormat.Internal);this.Api.asc_SelectionCut();this.bCut=false}return _ret},Button_Paste:function(){if(this.inputContext){if(this.inputContext.isHardCheckKeyboard)this.inputContext.enableVirtualKeyboard_Hard();this.inputContext.HtmlArea.focus()}this.Api.asc_enableKeyEvents(true,true);var _ret=false;try{_ret=document.execCommand("paste")}catch(err){_ret= +false}if(!_ret&&null!=this.LastCopyBinary){var _data=null;var _isInternal=false;for(var i=0;i0)this.Api.asc_PasteData(this.LastCopyBinary[0].type,this.LastCopyBinary[0].data)}return _ret},ClearBuffer:function(){if(-1!=this.clearBufferTimerId)clearTimeout(this.clearBufferTimerId); +this.clearBufferTimerId=setTimeout(function(){if(AscCommon.g_clipboardBase)AscCommon.g_clipboardBase.clearBufferTimerId=-1},500);this.Button_Copy()},isCopyOutEnabled:function(){if(this.Api&&this.Api.isCopyOutEnabled)return this.Api.isCopyOutEnabled();return true}};function definePastedFrom(doc){if(!doc)return null;var res=null;var metaTags=doc.getElementsByTagName("meta");for(var i=0;i>1)+"px;top:"+-this.HtmlAreaOffset+"px;";_style+="background:transparent;border:none;position:absolute;text-shadow:0 0 0 #000;outline:none;color:transparent;width:"+this.HtmlAreaWidth+"px;height:50px;";_style+="overflow:hidden;padding:0px;margin:0px;font-family:arial;resize:none;font-weight:normal;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;"; +_style+="touch-action: none;-webkit-touch-callout: none;color:transparent;caret-color:transparent;";_style+=AscCommon.AscBrowser.isAppleDevices?"font-size:0px;":"font-size:8px;";this.HtmlArea.setAttribute("style",_style);this.HtmlArea.setAttribute("spellcheck",false);this.HtmlArea.setAttribute("autocapitalize","none");this.HtmlArea.setAttribute("autocomplete","off");this.HtmlArea.setAttribute("autocorrect","off");this.HtmlDiv.appendChild(this.HtmlArea);if(true){var oHtmlDivScrollable=document.createElement("div"); +oHtmlDivScrollable.id="area_id_main";oHtmlDivScrollable.setAttribute("style","background:transparent;border:none;position:absolute;padding:0px;margin:0px;z-index:0;pointer-events:none;");var parentStyle=getComputedStyle(oHtmlParent);oHtmlDivScrollable.style.left=parentStyle.left;oHtmlDivScrollable.style.top=parentStyle.top;oHtmlDivScrollable.style.width=parentStyle.width;oHtmlDivScrollable.style.height=parentStyle.height;oHtmlDivScrollable.style.overflow="hidden";oHtmlDivScrollable.appendChild(this.HtmlDiv); +oHtmlParent.parentNode.appendChild(oHtmlDivScrollable)}else oHtmlParent.appendChild(this.HtmlDiv);var oThis=this;this.HtmlArea["onkeydown"]=function(e){if(AscCommon.AscBrowser.isSafariMacOs){var cmdButton=e.ctrlKey||e.metaKey?true:false;var buttonCode=e.keyCode==67||e.keyCode==88||e.keyCode==86;if(cmdButton&&buttonCode)oThis.IsDisableKeyPress=true;else oThis.IsDisableKeyPress=false}return oThis.onKeyDown(e)};this.HtmlArea["onkeypress"]=function(e){if(oThis.IsDisableKeyPress==true){oThis.IsDisableKeyPress= +false;var cmdButton=e.ctrlKey||e.metaKey?true:false;if(cmdButton)return}return oThis.onKeyPress(e)};this.HtmlArea["onkeyup"]=function(e){oThis.IsDisableKeyPress=false;return oThis.onKeyUp(e)};this.HtmlArea.addEventListener("input",function(e){return oThis.onInput(e)},false);this.HtmlArea.addEventListener("compositionstart",function(e){return oThis.onCompositionStart(e)},false);this.HtmlArea.addEventListener("compositionupdate",function(e){return oThis.onCompositionUpdate(e)},false);this.HtmlArea.addEventListener("compositionend", +function(e){return oThis.onCompositionEnd(e)},false);this.show();this.Api.Input_UpdatePos();if(AscCommon.AscBrowser.isAndroid)this.HtmlArea.onclick=function(e){var _this=AscCommon.g_inputContext;if(-1!=_this.virtualKeyboardClickTimeout){clearTimeout(_this.virtualKeyboardClickTimeout);_this.virtualKeyboardClickTimeout=-1}_this.apiCompositeEnd();if(!_this.virtualKeyboardClickPrevent)return;_this.setReadOnlyWrapper(true);_this.virtualKeyboardClickPrevent=false;AscCommon.stopEvent(e);_this.virtualKeyboardClickTimeout= +setTimeout(function(){_this.setReadOnlyWrapper(false);_this.virtualKeyboardClickTimeout=-1},1);return false}},onResize:function(_editorContainerId){var _elem=document.getElementById("area_id_main");var _elemSrc=document.getElementById(_editorContainerId);if(!_elem||!_elemSrc)return;if(AscCommon.AscBrowser.isChrome){var rectObject=_elemSrc.getBoundingClientRect();this.FixedPosCheckElementX=rectObject.left;this.FixedPosCheckElementY=rectObject.top}var _width=_elemSrc.style.width;if((null==_width||""== +_width)&&window.getComputedStyle){var _s=window.getComputedStyle(_elemSrc);_elem.style.left=_s.left;_elem.style.top=_s.top;_elem.style.width=_s.width;_elem.style.height=_s.height}else{_elem.style.left=_elemSrc.style.left;_elem.style.top=_elemSrc.style.top;_elem.style.width=_width;_elem.style.height=_elemSrc.style.height}if(this.Api.isMobileVersion){var _elem1=document.getElementById("area_id_parent");var _elem2=document.getElementById("area_id");_elem1.parentNode.style.pointerEvents="";_elem1.style.left= +"0px";_elem1.style.top="-1000px";_elem1.style.right="0px";_elem1.style.bottom="-100px";_elem1.style.width="auto";_elem1.style.height="auto";_elem2.style.left="0px";_elem2.style.top="0px";_elem2.style.right="0px";_elem2.style.bottom="0px";_elem2.style.width="100%";_elem2.style.height="100%";if(AscCommon.AscBrowser.isIE){document.body.style["msTouchAction"]="none";document.body.style["touchAction"]="none"}}var _editorSdk=document.getElementById("editor_sdk");this.editorSdkW=_editorSdk.clientWidth;this.editorSdkH= +_editorSdk.clientHeight},checkFocus:function(){if(this.Api.asc_IsFocus()&&!AscCommon.g_clipboardBase.IsFocus()&&!AscCommon.g_clipboardBase.IsWorking())if(document.activeElement!=this.HtmlArea)this.HtmlArea.focus()},move:function(x,y){if(this.Api.isMobileVersion)return;var oTarget=document.getElementById(this.TargetId);if(!oTarget)return;var xPos=x?x:parseInt(oTarget.style.left);var yPos=(y?y:parseInt(oTarget.style.top))+parseInt(oTarget.style.height);if(AscCommon.AscBrowser.isSafari&&AscCommon.AscBrowser.isMobile)xPos= +-100;if(!this.isDebug&&!this.isSystem){this.HtmlDiv.style.left=xPos+this.FixedPosCheckElementX+"px";this.HtmlDiv.style.top=yPos+this.FixedPosCheckElementY+this.TargetOffsetY+this.HtmlAreaOffset+"px";this.HtmlArea.scrollTop=this.HtmlArea.scrollHeight}else this.debugCalculatePlace(xPos+this.FixedPosCheckElementX,yPos+this.FixedPosCheckElementY+this.TargetOffsetY);if(window.g_asc_plugins)window.g_asc_plugins.onPluginEvent("onTargetPositionChanged")},emulateKeyDownApi:function(code){var _e={altKey:false, +ctrlKey:false,shiftKey:false,target:null,charCode:0,which:code,keyCode:code,code:"",preventDefault:function(){},stopPropagation:function(){}};this.Api.onKeyDown(_e);this.Api.onKeyUp(_e)},clear:function(isFromFocus){if(!this.TextArea_Not_ContentEditableDiv)this.HtmlArea.innerHTML="";else this.HtmlArea.value="";if(isFromFocus!==true)this.HtmlArea.focus();this.TextBeforeComposition="";this.Text="";this.Target=0;this.CompositionStart=0;this.CompositionEnd=0;this.IsComposition=false;this.keyPressInput= +"";if(window.g_asc_plugins)window.g_asc_plugins.onPluginEvent("onInputHelperClear")},getAreaValue:function(){return this.TextArea_Not_ContentEditableDiv?this.HtmlArea.value:this.HtmlArea.innerText},setReadOnly:function(isLock){if(isLock)this.ReadOnlyCounter++;else this.ReadOnlyCounter--;this.setReadOnlyWrapper(0>=this.ReadOnlyCounter?false:true)},setReadOnlyWrapper:function(val){this.HtmlArea.readOnly=this.Api.isViewMode?true:val},show:function(){if(this.isDebug||this.isSystem){this.log("ti: show"); +document.getElementById("area_id_main").style.zIndex=10;this.HtmlArea.style.top="0px";this.HtmlArea.style.width="100%";this.HtmlArea.style.height="100%";this.HtmlArea.style.background="#FFFFFF";this.HtmlArea.style.color="black";this.HtmlDiv.style.zIndex=90;this.HtmlDiv.style.border="2px solid #4363A4";this.isShow=true}},unshow:function(isAttack){if(this.isDebug||this.isSystem||true==isAttack){this.log("ti: unshow");document.getElementById("area_id_main").style.zIndex=0;this.HtmlArea.style.top=-this.HtmlAreaOffset+ +"px";this.HtmlArea.style.width="1000px";this.HtmlArea.style.height="50px";this.HtmlArea.style.background="transparent";this.HtmlArea.style.color="transparent";this.HtmlDiv.style.zIndex=0;this.HtmlDiv.style.border="none";this.isShow=false}},debugCalculatePlace:function(x,y){var _left=x;var _top=y;if(undefined==_left)_left=parseInt(this.HtmlDiv.style.left);if(undefined==_top)_top=parseInt(this.HtmlDiv.style.top);var _r_max=this.editorSdkW;var _b_max=this.editorSdkH;_r_max-=60;if(_r_max-_left>50)this.debugTexBoxMaxW= +_r_max-_left;else{_left=_r_max-50;this.debugTexBoxMaxW=50}_b_max-=40;if(_b_max-_top>50)this.debugTexBoxMaxH=_b_max-_top;else{_top=_b_max-50;this.debugTexBoxMaxH=50}if(AscCommon.AscBrowser.isSafari&&AscCommon.AscBrowser.isMobile)_left=-100;this.HtmlDiv.style.left=_left+"px";this.HtmlDiv.style.top=_top+"px";var _height=22;var _t=this.getAreaValue();if(0!=_t.length){var _editorSdk=document.getElementById("editor_sdk");var _p=document.createElement("p");_p.style.zIndex="-1";_p.style.position="absolute"; +_p.style.fontFamily="arial";_p.style.fontSize="12pt";_p.style.left="0px";_p.style.width=this.debugTexBoxMaxW+"px";_editorSdk.appendChild(_p);_t=_t.replace(/ /g," ");_p.innerHTML=""+_t+"";var _width=_p.firstChild.offsetWidth;_width=Math.min(_width+20,this.debugTexBoxMaxW);if(AscCommon.AscBrowser.isIE)_width+=10;var area=document.createElement("textarea");area.style.zIndex="-1";area.id="area2_id";area.rows=1;area.setAttribute("style","font-family:arial;font-size:12pt;position:absolute;resize:none;padding:0px;margin:0px;font-weight:normal;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;"); +area.style.overflow="hidden";area.style.width=_width+"px";_editorSdk.appendChild(area);area.value=this.getAreaValue();_height=area.clientHeight;if(area.scrollHeight>_height)_height=area.scrollHeight;_editorSdk.removeChild(_p);_editorSdk.removeChild(area)}if(_height>this.debugTexBoxMaxH)_height=this.debugTexBoxMaxH;this.HtmlDiv.style.width=_width+"px";this.HtmlDiv.style.height=_height+"px";var oldZindex=parseInt(this.HtmlDiv.style.zIndex);var newZindex=oldZindex==90?"89":"90";this.HtmlDiv.style.zIndex= +newZindex},onInput:function(e,isFromCompositionUpdate){if(this.Api.isLongAction()||this.Api.isViewMode){AscCommon.stopEvent(e);return false}if(this.isSystem){if(!this.isShow)this.show();this.debugCalculatePlace(undefined,undefined);return}if(this.isKeyPressOnUp&&this.keyPressOnUpCodes.length>0){if(!this.TextArea_Not_ContentEditableDiv)this.HtmlArea.innerHTML="";else this.HtmlArea.value="";this.TextBeforeComposition="";this.Text="";AscCommon.stopEvent(e);return false}this.log("ti: onInput");this.Text= +this.getAreaValue();this.Text=this.Text.split(" ").join(" ");var codes=[];if(this.IsComposition||this.ApiIsComposition){var ieStart=-1;var ieEnd=-1;if(true){var target=e.target;if(target["msGetInputContext"]){var ctx=target["msGetInputContext"]();if(ctx){ieStart=ctx["compositionStartOffset"];ieEnd=ctx["compositionEndOffset"]}}}this.CompositionEnd=this.Text.length;this.CompositionStart=this.TextBeforeComposition.length;var textReplace=this.Text.substr(this.CompositionStart);var iter;for(iter= +textReplace.getUnicodeIterator();iter.check();iter.next())codes.push(iter.value());var isAsync=AscFonts.FontPickerByCharacter.checkTextLight(codes,true);if(!isAsync){if(ieStart>this.CompositionStart){textReplace=textReplace.substr(0,ieStart-this.CompositionStart);codes=[];for(iter=textReplace.getUnicodeIterator();iter.check();iter.next())codes.push(iter.value());this.apiCompositeReplace(codes);this.apiCompositeEnd();this.TextBeforeComposition=this.Text.substr(0,ieStart);this.apiCompositeStart();this.CompositionStart= +ieStart;codes=[];textReplace=this.Text.substr(this.CompositionStart);for(iter=textReplace.getUnicodeIterator();iter.check();iter.next())codes.push(iter.value());this.apiCompositeReplace(codes)}else this.apiCompositeReplace(codes);if(!this.IsComposition){this.apiCompositeEnd();this.TextBeforeComposition=this.Text}}else{AscFonts.FontPickerByCharacter.loadFonts(this,function(){this.apiCompositeReplace(codes);this.apiCompositeEnd();this.clear();this.setReadOnly(false)});AscCommon.stopEvent(e);this.setReadOnly(true); +return false}}else{var textToApi=this.Text.substr(this.TextBeforeComposition.length);for(var iter=textToApi.getUnicodeIterator();iter.check();iter.next())codes.push(iter.value());if(codes.length>0)this.apiInputText(codes);this.TextBeforeComposition=this.Text}if(!this.IsComposition)if(this.Text.length>0){var _lastCode=this.Text.charCodeAt(this.Text.length-1);if(_lastCode==12290||_lastCode==46){AscCommon.stopEvent(e);if(AscCommon.AscBrowser.isIE&&!AscCommon.AscBrowser.isIeEdge)setTimeout(function(){window["AscCommon"].g_inputContext.clear(); +window["AscCommon"].g_inputContext.HtmlArea.focus()},0);else this.clear();return false}}},emulateNativeKeyDown:function(e,target){var oEvent=document.createEvent("KeyboardEvent");Object.defineProperty(oEvent,"keyCode",{get:function(){return this.keyCodeVal}});Object.defineProperty(oEvent,"which",{get:function(){return this.keyCodeVal}});Object.defineProperty(oEvent,"shiftKey",{get:function(){return this.shiftKeyVal}});Object.defineProperty(oEvent,"altKey",{get:function(){return this.altKeyVal}}); +Object.defineProperty(oEvent,"metaKey",{get:function(){return this.metaKeyVal}});Object.defineProperty(oEvent,"ctrlKey",{get:function(){return this.ctrlKeyVal}});if(AscCommon.AscBrowser.isIE)oEvent.preventDefault=function(){try{Object.defineProperty(this,"defaultPrevented",{get:function(){return true}})}catch(err){}};var k=e.keyCode;if(oEvent.initKeyboardEvent)oEvent.initKeyboardEvent("keydown",true,true,window,false,false,false,false,k,k);else oEvent.initKeyEvent("keydown",true,true,window,false, +false,false,false,k,0);oEvent.keyCodeVal=k;oEvent.shiftKeyVal=e.shiftKey;oEvent.altKeyVal=e.altKey;oEvent.metaKeyVal=e.metaKey;oEvent.ctrlKeyVal=e.ctrlKey;var _elem=target?target:_getElementKeyboardDown(this.nativeFocusElement,3);_elem.dispatchEvent(oEvent);return oEvent.defaultPrevented},isSpaceSymbol:function(e){if(e.keyCode==32)return true;if(e.keyCode==229&&(e.code=="space"||e.code=="Space"||e.key=="Spacebar"))return true;return false},systemInputEnable:function(isEnabled){if(this.isSystem==isEnabled)return; +this.isSystem=isEnabled;this.HtmlArea.style.left=this.isSystem?"0px":"-"+(this.HtmlAreaWidth>>1)+"px";this.clear();if(this.isShow)this.unshow(true);if(this.Api.WordControl&&this.Api.WordControl.m_oLogicDocument&&this.Api.WordControl.m_oLogicDocument.Document_UpdateSelectionState)this.Api.WordControl.m_oLogicDocument.Document_UpdateSelectionState()},debugInputEnable:function(isEnabled){if(this.isDebug==isEnabled)return;this.isDebug=isEnabled;this.HtmlArea.style.left=this.isDebug?"0px":"-"+(this.HtmlAreaWidth>> +1)+"px"},apiInputText:function(codes){var isAsync=AscFonts.FontPickerByCharacter.checkTextLight(codes,true);if(!isAsync){this.apiCompositeStart();this.apiCompositeReplace(codes);this.apiCompositeEnd()}else{AscFonts.FontPickerByCharacter.loadFonts(this,function(){this.apiCompositeStart();this.apiCompositeReplace(codes);this.apiCompositeEnd();this.setReadOnly(false)});this.setReadOnly(true);return false}},onKeyDown:function(e){if(this.Api.isLongAction()){AscCommon.stopEvent(e);return false}if(this.isInputHelpersPresent)switch(e.keyCode){case 9:case 13:case 38:case 40:case 33:case 34:case 35:case 36:case 27:{window.g_asc_plugins.onPluginEvent2("onKeyDown", +{"keyCode":e.keyCode},this.isInputHelpers);AscCommon.stopEvent(e);return false}case 32:{if(window.g_asc_plugins)window.g_asc_plugins.onPluginEvent("onInputHelperInput",{"text":this.keyPressInput})}default:break}else if(32==e.keyCode);if(this.isSystem&&this.isShow){if(e.keyCode==13){var text=this.getAreaValue();var codes=[];for(var iter=text.getUnicodeIterator();iter.check();iter.next())codes.push(iter.value());this.apiInputText(codes);this.clear();this.unshow();AscCommon.stopEvent(e);return false}else if(e.keyCode== +27){this.clear();this.unshow();AscCommon.stopEvent(e);return false}return}if(null!=this.nativeFocusElement)if(this.emulateNativeKeyDown(e)){e.preventDefault();return false}var _code=e.keyCode;if(_code!=8&&_code!=46)this.KeyDownFlag=true;AscCommon.check_KeyboardEvent(e);var arrCodes=this.Api.getAddedTextOnKeyDown(AscCommon.global_keyboardEvent);var isAsync=AscFonts.FontPickerByCharacter.checkTextLight(arrCodes,true);if(isAsync){AscFonts.FontPickerByCharacter.loadFonts(this,function(){this.onKeyDown(e); +this.onKeyUp(e);this.setReadOnly(false)});AscCommon.stopEvent(e);this.setReadOnly(true);return false}var ret=this.Api.onKeyDown(e);switch(e.keyCode){case 8:{var oldKeyPressInput=this.keyPressInput;this.clear();if(oldKeyPressInput.length>1){this.keyPressInput=oldKeyPressInput.substr(0,oldKeyPressInput.length-1);if(window.g_asc_plugins)window.g_asc_plugins.onPluginEvent("onInputHelperInput",{"text":this.keyPressInput})}return false}case 9:case 13:case 37:case 38:case 39:case 40:case 33:case 34:case 35:case 36:{this.clear(); return false}case 46:case 45:{if(!AscCommon.global_keyboardEvent.CtrlKey&&!AscCommon.global_keyboardEvent.ShiftKey){this.clear();return false}}default:break}if(e.keyCode==32&&AscCommon.global_keyboardEvent.CtrlKey&&!AscCommon.global_keyboardEvent.ShiftKey)if(window.g_asc_plugins)window.g_asc_plugins.onPluginEvent("onClick");return ret},onKeyPress:function(e){if(this.Api.isLongAction()||!this.Api.asc_IsFocus()||this.Api.isViewMode){AscCommon.stopEvent(e);return false}if(this.isSystem)return;if(this.KeyDownFlag)this.KeyPressFlag= true;if(this.IsComposition)return;if(e.which==13&&e.keyCode==13||e.which==10&&e.keyCode==10){AscCommon.stopEvent(e);return false}var c=e.which||e.keyCode;var isAsync=c>=32?AscFonts.FontPickerByCharacter.checkTextLight([c],true):false;if(isAsync){AscFonts.FontPickerByCharacter.loadFonts(this,function(){this.apiCompositeStart();this.apiCompositeReplace([c]);this.apiCompositeEnd();this.setReadOnly(false)});AscCommon.stopEvent(e);this.setReadOnly(true);return false}if(this.isKeyPressOnUp){var isSaveCode= true;switch(e.which){case 46:{isSaveCode=false;break}default:break}if(isSaveCode){if(this.isKeyPressOnUpStackedMode)this.keyPressOnUpCodes.push({which:e.which,charCode:e.charCode,keyCode:e.keyCode,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey,preventDefault:function(){}});return}}var ret=this.Api.onKeyPress(e);switch(e.which){case 46:{AscCommon.stopEvent(e);this.clear();return false}default:break}this.keyPressInput+=String.fromCharCode(e.which);if(window.g_asc_plugins)window.g_asc_plugins.onPluginEvent("onInputHelperInput", diff --git a/www/common/onlyoffice/v5/sdkjs/common/AllFonts.js b/www/common/onlyoffice/v5/sdkjs/common/AllFonts.js index 62757a903..ff6615a51 100755 --- a/www/common/onlyoffice/v5/sdkjs/common/AllFonts.js +++ b/www/common/onlyoffice/v5/sdkjs/common/AllFonts.js @@ -11,6 +11,7 @@ "NotoSansUI-Italic.ttf", "SymbolNeu.ttf", "NotoSerif-Italic.ttf", +"NotoSansLao-Regular.ttf", "Arimo-BoldItalic.ttf", "Ubuntu-L.ttf", "RobotoCondensed-Italic.ttf", @@ -58,6 +59,7 @@ "DroidSerif-Regular.ttf", "Arimo-Bold.ttf", "NotoSans-Italic.ttf", +"AsanaMath.ttf", "arialbi.ttf", "DejaVuSansMono.ttf", "Cousine-Regular.ttf", @@ -91,38 +93,40 @@ ]; window["__fonts_infos"] = [ -["Arial",87,0,16,0,6,0,59,0], -["Arimo",17,0,34,0,57,0,12,0], -["Caladea",3,0,44,0,1,0,28,0], -["Calibri",70,0,62,0,68,0,18,0], -["Carlito",26,0,66,0,52,0,0,0], -["Cousine",61,0,43,0,27,0,29,0], -["DejaVu Sans",22,0,-1,-1,86,0,-1,-1], -["DejaVu Sans Mono",60,0,-1,-1,48,0,-1,-1], -["DejaVu Serif",46,0,-1,-1,2,0,-1,-1], -["Droid Sans",32,0,-1,-1,8,0,-1,-1], -["Droid Sans Mono",73,0,-1,-1,-1,-1,-1,-1], -["Droid Serif",56,0,64,0,79,0,50,0], -["Hind",7,0,-1,-1,31,0,-1,-1], -["IBM Plex Mono Medm",33,0,-1,-1,-1,-1,-1,-1], -["Noto Mono",35,0,-1,-1,-1,-1,-1,-1], -["Noto Sans",21,0,58,0,76,0,67,0], -["Noto Sans UI",69,0,9,0,49,0,55,0], -["Noto Serif",45,0,11,0,41,0,53,0], -["Open Sans",39,0,-1,-1,-1,-1,-1,-1], -["OpenSymbol",37,0,-1,-1,-1,-1,-1,-1], -["Roboto",78,0,81,0,30,0,85,0], -["Roboto Condensed",74,0,14,0,4,0,24,0], +["Arial",89,0,17,0,6,0,61,0], +["Arimo",18,0,35,0,58,0,13,0], +["Asana Math",60,0,-1,-1,-1,-1,-1,-1], +["Caladea",3,0,45,0,1,0,29,0], +["Calibri",72,0,64,0,70,0,19,0], +["Carlito",27,0,68,0,53,0,0,0], +["Cousine",63,0,44,0,28,0,30,0], +["DejaVu Sans",23,0,-1,-1,88,0,-1,-1], +["DejaVu Sans Mono",62,0,-1,-1,49,0,-1,-1], +["DejaVu Serif",47,0,-1,-1,2,0,-1,-1], +["Droid Sans",33,0,-1,-1,8,0,-1,-1], +["Droid Sans Mono",75,0,-1,-1,-1,-1,-1,-1], +["Droid Serif",57,0,66,0,81,0,51,0], +["Hind",7,0,-1,-1,32,0,-1,-1], +["IBM Plex Mono Medm",34,0,-1,-1,-1,-1,-1,-1], +["komorebi gothic",41,0,-1,-1,-1,-1,-1,-1], +["komorebi gothic P",52,0,-1,-1,-1,-1,-1,-1], +["Noto Mono",36,0,-1,-1,-1,-1,-1,-1], +["Noto Sans",22,0,59,0,78,0,69,0], +["Noto Sans Lao",12,0,-1,-1,-1,-1,-1,-1], +["Noto Sans UI",71,0,9,0,50,0,56,0], +["Noto Serif",46,0,11,0,42,0,54,0], +["Open Sans",40,0,-1,-1,-1,-1,-1,-1], +["OpenSymbol",38,0,-1,-1,-1,-1,-1,-1], +["Roboto",80,0,83,0,31,0,87,0], +["Roboto Condensed",76,0,15,0,4,0,25,0], ["Symbol Neu",10,0,-1,-1,-1,-1,-1,-1], -["Symbola",83,0,-1,-1,-1,-1,-1,-1], -["Tinos",5,0,65,0,42,0,38,0], -["Ubuntu",88,0,72,0,47,0,75,0], -["Ubuntu Condensed",23,0,-1,-1,-1,-1,-1,-1], -["Ubuntu Light",13,0,80,0,19,0,15,0], -["Ubuntu Mono",36,0,77,0,63,0,82,0], -["WenQuanYi Zen Hei Mono",84,0,-1,-1,-1,-1,-1,-1], -["komorebi gothic",40,0,-1,-1,-1,-1,-1,-1], -["komorebi gothic P",51,0,-1,-1,-1,-1,-1,-1] +["Symbola",85,0,-1,-1,-1,-1,-1,-1], +["Tinos",5,0,67,0,43,0,39,0], +["Ubuntu",90,0,74,0,48,0,77,0], +["Ubuntu Condensed",24,0,-1,-1,-1,-1,-1,-1], +["Ubuntu Light",14,0,82,0,20,0,16,0], +["Ubuntu Mono",37,0,79,0,65,0,84,0], +["WenQuanYi Zen Hei Mono",86,0,-1,-1,-1,-1,-1,-1], ]; -window["g_fonts_selection_bin"] = "WQAAABAAAABDAGEAcgBsAGkAdABvAAAALgAAAEMAYQByAGwAaQB0AG8ALQBCAG8AbABkAEkAdABhAGwAaQBjAC4AdAB0AGYAAAAAAAAAAQAAAAEAAAAAAAAACgAAAAIPBQICAgQDAgT/AgDh/+wAUAkAAAAAAAAAnwEAIAAAAAC8AgUAAAABAAgC7gIG/9wA5AGIAhAAAABDAGEAbABhAGQAZQBhAAAAIgAAAEMAYQBsAGEAZABlAGEALQBCAG8AbABkAC4AdAB0AGYAAAAAAAAAAAAAAAEAAAAAAAAACgAAAAIEBQMFBAYDAgQHAAAAAAAAAAAAAAAAAAAAkwAAIAAAAAC8AgUAAAABAC4CCgMi/6wA5AGbAhoAAABEAGUAagBhAFYAdQAgAFMAZQByAGkAZgAAACoAAABEAGUAagBhAFYAdQBTAGUAcgBpAGYALQBCAG8AbABkAC4AdAB0AGYAAAAAAAAAAAAAAAEAAAAAAAAACgAAAAIGCAMFBgUCAgT/BgDl+/kAUiAABAoAAAAAnwAAYAAA19+8AgUAAAABADU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AAAAAGgAAAAAAAAAZAAAAAAAAABoAAAAAAAAA6wAAAAAAAAAaAAAAAAAAAAAAAAAAAAAAJQAAAAAAAAAZAAAAAAAAAAQAAAAAAAAAGQAAAAAAAADrAAAAAAAAABkAAAAAAAAAAAAAAAAAAAAlAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAlAAAAAAAAABcAAAAAAAAAAgAAAAAAAAAAAAAAAAAAACUAAAAAAAAAFwAAAAAAAAAAAAAAAAAAACUAAAAAAAAAFgAAAAAAAAAWAAAAAAAAACAXAAAAAAAAFQAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAJQAAAAAAAAAVAAAAAAAAAAAAAAAAAAAAJQAAAAAAAAAUAAAAAAAAABMAAAAAAAAAAAAAAAAAAAAlAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAgFwAAAAAAABQAAAAAAAAA6QQAAAAAAACpBAAAAAAAABMAAAAAAAAAEwAAAAAAAAAgFwAAAAAAABIAAAAAAAAABAAAAAAAAAASAAAAAAAAAOsAAAAAAAAAEgAAAAAAAAAAAAAAAAAAACUAAAAAAAAAEQAAAAAAAAADAAAAAAAAAAAAAAAAAAAAJQAAAAAAAAARAAAAAAAAAAAAAAAAAAAAJQAAAAAAAAAQAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAlAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAlAAAAAAAAAA8AAAAAAAAACQAAAAAAAAAPAAAAAAAAAHsAAAAAAAAADwAAAAAAAAAAAAAAAAAAACUAAAAAAAAADgAAAAAAAAAEAAAAAAAAAA4AAAAAAAAA6wAAAAAAAAAOAAAAAAA="; diff --git a/www/common/onlyoffice/v5/sdkjs/common/Images/fonts_thumbnail.png b/www/common/onlyoffice/v5/sdkjs/common/Images/fonts_thumbnail.png index 59692457a..ff13baf02 100644 Binary files a/www/common/onlyoffice/v5/sdkjs/common/Images/fonts_thumbnail.png and b/www/common/onlyoffice/v5/sdkjs/common/Images/fonts_thumbnail.png differ diff --git a/www/common/onlyoffice/v5/sdkjs/common/Images/fonts_thumbnail@1.25x.png b/www/common/onlyoffice/v5/sdkjs/common/Images/fonts_thumbnail@1.25x.png index 02138ccf6..00e4a025f 100644 Binary files a/www/common/onlyoffice/v5/sdkjs/common/Images/fonts_thumbnail@1.25x.png and b/www/common/onlyoffice/v5/sdkjs/common/Images/fonts_thumbnail@1.25x.png differ diff --git a/www/common/onlyoffice/v5/sdkjs/common/Images/fonts_thumbnail@1.5x.png b/www/common/onlyoffice/v5/sdkjs/common/Images/fonts_thumbnail@1.5x.png index 543b1c93e..7997fdc14 100644 Binary files a/www/common/onlyoffice/v5/sdkjs/common/Images/fonts_thumbnail@1.5x.png and b/www/common/onlyoffice/v5/sdkjs/common/Images/fonts_thumbnail@1.5x.png differ diff --git a/www/common/onlyoffice/v5/sdkjs/common/Images/fonts_thumbnail@1.75x.png b/www/common/onlyoffice/v5/sdkjs/common/Images/fonts_thumbnail@1.75x.png index 85aaf3bea..af514eb36 100644 Binary files a/www/common/onlyoffice/v5/sdkjs/common/Images/fonts_thumbnail@1.75x.png and b/www/common/onlyoffice/v5/sdkjs/common/Images/fonts_thumbnail@1.75x.png differ diff --git a/www/common/onlyoffice/v5/sdkjs/common/Images/fonts_thumbnail@2x.png b/www/common/onlyoffice/v5/sdkjs/common/Images/fonts_thumbnail@2x.png index be7f03d76..8fa91f5a1 100644 Binary files a/www/common/onlyoffice/v5/sdkjs/common/Images/fonts_thumbnail@2x.png and b/www/common/onlyoffice/v5/sdkjs/common/Images/fonts_thumbnail@2x.png differ diff --git a/www/common/onlyoffice/v5/sdkjs/common/Images/fonts_thumbnail_ea.png b/www/common/onlyoffice/v5/sdkjs/common/Images/fonts_thumbnail_ea.png index aa46eeab0..121e5ea53 100644 Binary files a/www/common/onlyoffice/v5/sdkjs/common/Images/fonts_thumbnail_ea.png and b/www/common/onlyoffice/v5/sdkjs/common/Images/fonts_thumbnail_ea.png differ diff --git a/www/common/onlyoffice/v5/sdkjs/common/Images/fonts_thumbnail_ea@1.25x.png b/www/common/onlyoffice/v5/sdkjs/common/Images/fonts_thumbnail_ea@1.25x.png index 4f63bec38..e7479fd7e 100644 Binary files a/www/common/onlyoffice/v5/sdkjs/common/Images/fonts_thumbnail_ea@1.25x.png and b/www/common/onlyoffice/v5/sdkjs/common/Images/fonts_thumbnail_ea@1.25x.png differ diff --git a/www/common/onlyoffice/v5/sdkjs/common/Images/fonts_thumbnail_ea@1.5x.png b/www/common/onlyoffice/v5/sdkjs/common/Images/fonts_thumbnail_ea@1.5x.png index 42cddb013..55a45f1ab 100644 Binary files a/www/common/onlyoffice/v5/sdkjs/common/Images/fonts_thumbnail_ea@1.5x.png and b/www/common/onlyoffice/v5/sdkjs/common/Images/fonts_thumbnail_ea@1.5x.png differ diff --git a/www/common/onlyoffice/v5/sdkjs/common/Images/fonts_thumbnail_ea@1.75x.png b/www/common/onlyoffice/v5/sdkjs/common/Images/fonts_thumbnail_ea@1.75x.png index 3131f2ac9..b88acd046 100644 Binary files a/www/common/onlyoffice/v5/sdkjs/common/Images/fonts_thumbnail_ea@1.75x.png and b/www/common/onlyoffice/v5/sdkjs/common/Images/fonts_thumbnail_ea@1.75x.png differ diff --git a/www/common/onlyoffice/v5/sdkjs/common/Images/fonts_thumbnail_ea@2x.png b/www/common/onlyoffice/v5/sdkjs/common/Images/fonts_thumbnail_ea@2x.png index 638aebf8a..9856ad10b 100644 Binary files a/www/common/onlyoffice/v5/sdkjs/common/Images/fonts_thumbnail_ea@2x.png and b/www/common/onlyoffice/v5/sdkjs/common/Images/fonts_thumbnail_ea@2x.png differ diff --git a/www/common/onlyoffice/v5/sdkjs/common/libfont/js/fonts.js b/www/common/onlyoffice/v5/sdkjs/common/libfont/js/fonts.js index ac1fa92f7..aff78bb56 100644 --- a/www/common/onlyoffice/v5/sdkjs/common/libfont/js/fonts.js +++ b/www/common/onlyoffice/v5/sdkjs/common/libfont/js/fonts.js @@ -1,5 +1,5 @@ /* - * Copyright (C) Ascensio System SIA 2012-2021. All rights reserved + * Copyright (C) Ascensio System SIA 2012-2022. All rights reserved * * https://www.onlyoffice.com/ * diff --git a/www/common/onlyoffice/v5/sdkjs/common/libfont/wasm/fonts.js b/www/common/onlyoffice/v5/sdkjs/common/libfont/wasm/fonts.js index 2aa2d1267..9ae64f05c 100644 --- a/www/common/onlyoffice/v5/sdkjs/common/libfont/wasm/fonts.js +++ b/www/common/onlyoffice/v5/sdkjs/common/libfont/wasm/fonts.js @@ -1,5 +1,5 @@ /* - * Copyright (C) Ascensio System SIA 2012-2021. All rights reserved + * Copyright (C) Ascensio System SIA 2012-2022. All rights reserved * * https://www.onlyoffice.com/ * diff --git a/www/common/onlyoffice/v5/sdkjs/slide/sdk-all-min.js b/www/common/onlyoffice/v5/sdkjs/slide/sdk-all-min.js index 9858d0775..8b48bea48 100644 --- a/www/common/onlyoffice/v5/sdkjs/slide/sdk-all-min.js +++ b/www/common/onlyoffice/v5/sdkjs/slide/sdk-all-min.js @@ -1,5 +1,5 @@ /* - * Copyright (C) Ascensio System SIA 2012-2021. All rights reserved + * Copyright (C) Ascensio System SIA 2012-2022. All rights reserved * * https://www.onlyoffice.com/ * @@ -1668,7 +1668,7 @@ function(){this.isPreOpenLocks=false;for(var i=0;i");if(-1!=nIndex)_html_format=_html_format.substring(0,nIndex+"".length);this.CommonIframe_PasteStart(_html_format,_text_format); -return false}if(_text_format&&_text_format!=""){this.Api.asc_PasteData(AscCommon.c_oAscClipboardDataFormat.Text,_text_format);g_clipboardBase.Paste_End();return false}var items=_clipboard.items;if(null!=items&&0!=items.length){g_clipboardBase.PasteImagesBody="";g_clipboardBase.PasteImagesCount=items.length;g_clipboardBase.PasteImagesCounter=0;for(var i=0;i';if(g_clipboardBase.PasteImagesCounter==g_clipboardBase.PasteImagesCount){g_clipboardBase.CommonIframe_PasteStart(""+g_clipboardBase.PasteImagesBody+"");g_clipboardBase.PasteImagesBody="";g_clipboardBase.PasteImagesCounter=0;g_clipboardBase.PasteImagesCount=0}};reader.onabort=reader.onerror=function(e){g_clipboardBase.PasteImagesCounter++;if(g_clipboardBase.PasteImagesCounter== -g_clipboardBase.PasteImagesCount){g_clipboardBase.CommonIframe_PasteStart(""+g_clipboardBase.PasteImagesBody+"");g_clipboardBase.PasteImagesBody="";g_clipboardBase.PasteImagesCounter=0;g_clipboardBase.PasteImagesCount=0}};try{reader.readAsDataURL(blob)}catch(err){g_clipboardBase.PasteImagesCounter++}}else g_clipboardBase.PasteImagesCounter++;if(g_clipboardBase.PasteImagesCounter==g_clipboardBase.PasteImagesCount)g_clipboardBase.Paste_End();return false}}g_clipboardBase.Paste_End(); -return false},_private_onbeforepaste:function(e,isAttackEmulate){this._console_log("onbeforepaste");if(!this.Api.asc_IsFocus(true))return;{this.CommonDiv=this.CommonDiv_Check();this.CommonDiv_Start();this.CommonDiv.focus();this.StartFocus();this.CommonDiv_Select();return}return false},_private_onbeforecopy_select:function(){if(AscBrowser.isIE){this._console_log("onbeforecopy_select");this.CommonDiv=this.CommonDiv_Check();this.CommonDiv_Start();this.CommonDiv.innerHTML=" ";this.CommonDiv.focus(); -this.StartFocus();this.CommonDiv_Select()}},_private_onbeforecopy:function(e,isAttackEmulate){this._console_log("onbeforecopy");if(!this.Api.asc_IsFocus(true))return;{this.CommonDiv=this.CommonDiv_Check();this.CommonDiv_Start();this.CommonDiv.innerHTML=" ";this.CommonDiv.focus();this.StartFocus();this.CommonDiv_Select()}return false},Init:function(_api){this.Api=_api;window["AscCommon"].g_specialPasteHelper.Init(_api);this.ClosureParams.getData=function(type){var _clipboard=this._e&& -this._e.clipboardData?this._e.clipboardData:window.clipboardData;if(!_clipboard||!_clipboard.getData)return null;var _type=type;if(AscBrowser.isIE&&(type=="text"||type=="text/plain"))_type="Text";try{return _clipboard.getData(_type)}catch(e){}return null};this.ClosureParams.setData=function(type,_data){var _clipboard=this._e&&this._e.clipboardData?this._e.clipboardData:window.clipboardData;if(!_clipboard||!_clipboard.setData)return null;var _type=type;if(AscBrowser.isIE&&(type=="text"||type=="text/plain"))_type= -"Text";try{_clipboard.setData(_type,_data)}catch(e){}};if(!AscBrowser.isIE){document.oncopy=function(e){return g_clipboardBase._private_oncopy(e)};document.oncut=function(e){return g_clipboardBase._private_oncut(e)};document.onpaste=function(e){return g_clipboardBase._private_onpaste(e)};document["onbeforecopy"]=function(e){return g_clipboardBase._private_onbeforecopy(e)};document["onbeforecut"]=function(e){return g_clipboardBase._private_onbeforecopy(e)};document["onbeforepaste"]=function(e){return g_clipboardBase._private_onbeforepaste(e)}}else{document.addEventListener("copy", -function(e){return g_clipboardBase._private_oncopy(e)});document.addEventListener("cut",function(e){return g_clipboardBase._private_oncut(e)});document.addEventListener("paste",function(e){return g_clipboardBase._private_onpaste(e)});document.addEventListener("beforepaste",function(e){return g_clipboardBase._private_onbeforepaste(e)});document.addEventListener("beforecopy",function(e){return g_clipboardBase._private_onbeforecopy(e)});document.addEventListener("beforecut",function(e){return g_clipboardBase._private_onbeforecopy(e)})}if(this.IsCopyCutOnlyInEditable|| -this.IsPasteOnlyInEditable)document.onkeydown=function(e){if(!g_clipboardBase.Api.asc_IsFocus(true)||g_clipboardBase.Api.isLongAction())return;var isAltGr=AscCommon.getAltGr(e);if(isAltGr)return;var isCtrl=e.ctrlKey===true||e.metaKey===true;var isShift=e.shiftKey;var keyCode=e.keyCode;if(g_clipboardBase.IsCopyCutOnlyInEditable){var bIsBeforeCopyCutEmulate=false;var _cut=false;if(isCtrl&&!isShift&&(keyCode==67||keyCode==88))bIsBeforeCopyCutEmulate=true;if(!isCtrl&&isShift&&keyCode==45){bIsBeforeCopyCutEmulate= -true;_cut=true}if(bIsBeforeCopyCutEmulate){g_clipboardBase._console_log("emulate_beforecopycut");var isEmulate=false;try{isEmulate=_cut?document.execCommand("beforecut"):document.execCommand("beforecopy")}catch(err){}g_clipboardBase._private_onbeforecopy(undefined,!isEmulate)}}if(g_clipboardBase.IsPasteOnlyInEditable){var bIsBeforePasteEmulate=false;if(isCtrl&&!isShift&&keyCode==86)bIsBeforePasteEmulate=true;if(!isCtrl&&isShift&&keyCode==45)bIsBeforePasteEmulate=true;if(bIsBeforePasteEmulate){g_clipboardBase._console_log("emulate_beforepaste"); -var isEmulate=false;try{isEmulate=document.execCommand("beforepaste")}catch(err$19){}g_clipboardBase._private_onbeforepaste(undefined,!isEmulate)}}};if(AscBrowser.isSafari&&false){this.CommonDiv=this.CommonDiv_Check();setInterval(function(){if(g_clipboardBase.Api.asc_IsFocus(true))g_clipboardBase.CommonDiv.focus()},100)}},IsWorking:function(){return this.CopyFlag||this.PasteFlag?true:false},StartFocus:function(){this.EndFocus(false);this.CopyPasteFocus=true;this.CopyPasteFocusTimer=setTimeout(function(){g_clipboardBase.EndFocus()}, -1E3)},EndFocus:function(isFocusToEditor){this.CopyPasteFocus=false;if(-1!=this.CopyPasteFocusTimer){clearTimeout(this.CopyPasteFocusTimer);this.CopyPasteFocusTimer=-1;if(false!==isFocusToEditor&&null!=this.inputContext)if(this.inputContext.HtmlArea)this.inputContext.HtmlArea.focus()}},IsFocus:function(){return this.CopyPasteFocus},CommonDiv_Check:function(){var ElemToSelect=document.getElementById(this.CommonDivId);if(!ElemToSelect){ElemToSelect=document.createElement("div");ElemToSelect.id=this.CommonDivId; -ElemToSelect.className=this.CommonDivClassName;ElemToSelect.style.position="fixed";ElemToSelect.style.left="0px";ElemToSelect.style.top="-100px";ElemToSelect.style.width="10000px";ElemToSelect.style.height="100px";ElemToSelect.style.overflow="hidden";ElemToSelect.style.zIndex=-1E3;ElemToSelect.style.MozUserSelect="text";ElemToSelect.style.fontFamily="onlyofficeDefaultFont";ElemToSelect.style.fontSize="11pt";ElemToSelect.style.color="black";ElemToSelect.style["-khtml-user-select"]="text";ElemToSelect.style["-o-user-select"]= -"text";ElemToSelect.style["user-select"]="text";ElemToSelect.style["-webkit-user-select"]="text";ElemToSelect.setAttribute("contentEditable",this.isCopyOutEnabled());var _parent=""==this.CommonDivIdParent?document.body:document.getElementById(this.CommonDivIdParent);_parent.appendChild(ElemToSelect)}else ElemToSelect.setAttribute("contentEditable",this.isCopyOutEnabled());return ElemToSelect},CommonDiv_Select:function(){var ElemToSelect=this.CommonDiv;if(window.getSelection){var selection=window.getSelection(); -var rangeToSelect=document.createRange();var is_gecko=AscBrowser.isGecko;if(is_gecko){ElemToSelect.appendChild(document.createTextNode("\u00a0"));ElemToSelect.insertBefore(document.createTextNode("\u00a0"),ElemToSelect.firstChild);rangeToSelect.setStartAfter(ElemToSelect.firstChild);rangeToSelect.setEndBefore(ElemToSelect.lastChild)}else{var aChildNodes=ElemToSelect.childNodes;if(aChildNodes.length==1){var elem=aChildNodes[0];var wrap=document.createElement("b");wrap.setAttribute("style","font-weight:normal; background-color: transparent; color: transparent;"); -elem=ElemToSelect.removeChild(elem);wrap.appendChild(elem);ElemToSelect.appendChild(wrap)}rangeToSelect.selectNodeContents(ElemToSelect)}selection.removeAllRanges();selection.addRange(rangeToSelect)}else if(document.body.createTextRange){var rangeToSelect=document.body.createTextRange();rangeToSelect.moveToElementText(ElemToSelect);rangeToSelect.select()}},CommonDiv_Start:function(){this.ClosureParams.overflowBody=document.body.style.overflow;document.body.style.overflow="hidden";this.ClosureParams.backgroundcolorBody= -document.body.style["background-color"];document.body.style["background-color"]="transparent";var ElemToSelect=this.CommonDiv;ElemToSelect.style.display="block";while(ElemToSelect.hasChildNodes())ElemToSelect.removeChild(ElemToSelect.lastChild);document.body.style.MozUserSelect="text";delete document.body.style["-khtml-user-select"];delete document.body.style["-o-user-select"];delete document.body.style["user-select"];document.body.style["-webkit-user-select"]="text";ElemToSelect.style.MozUserSelect= -"all"},CommonDiv_End:function(){var ElemToSelect=this.CommonDiv;if(ElemToSelect){ElemToSelect.style.display=AscBrowser.isSafari?"block":"none";ElemToSelect.style.MozUserSelect="none"}document.body.style.MozUserSelect="none";document.body.style["-khtml-user-select"]="none";document.body.style["-o-user-select"]="none";document.body.style["user-select"]="none";document.body.style["-webkit-user-select"]="none";document.body.style["background-color"]=this.ClosureParams.backgroundcolorBody;document.body.style.overflow= -this.ClosureParams.overflowBody;this.CopyFlag=false;this.bCut=false;this.EndFocus()},CommonDiv_Copy:function(){this.CopyFlag=true;this.CommonDiv=this.CommonDiv_Check();this.CommonDiv_Start();this.ClosureParams.isDivCopy=true;this.DivOnCopyHtmlPresent=false;this.DivOnCopyText="";this.LastCopyBinary=null;this.checkCopy(AscCommon.c_oAscClipboardDataFormat.Text|AscCommon.c_oAscClipboardDataFormat.Html|AscCommon.c_oAscClipboardDataFormat.Internal);this.ClosureParams.isDivCopy=false;if(!this.DivOnCopyHtmlPresent&& -this.DivOnCopyText!="")this.CommonDiv.innerHTML=this.DivOnCopyText;this.DivOnCopyHtmlPresent=false;this.DivOnCopyText="";this.CommonDiv_Select();window.setTimeout(function(){g_clipboardBase.CommonDiv_End()},0)},CommonDiv_Execute_CopyCut:function(){if(this.IsCopyCutOnlyInEditable)this._private_onbeforecopy(undefined,true)},CommonIframe_PasteStart:function(_html_data,text_data){var ifr=document.getElementById(this.CommonIframeId);if(!ifr){ifr=document.createElement("iframe");ifr.name=this.CommonIframeId; -ifr.id=this.CommonIframeId;ifr.style.position="absolute";ifr.style.top="-100px";ifr.style.left="0px";ifr.style.width="10000px";ifr.style.height="100px";ifr.style.overflow="hidden";ifr.style.zIndex=-1E3;ifr.setAttribute("sandbox","allow-same-origin");document.body.appendChild(ifr);this.CommonIframe=ifr}else ifr.style.width="10000px";var frameWindow=window.frames[this.CommonIframeId];if(frameWindow){frameWindow.document.open();frameWindow.document.write(_html_data);frameWindow.document.close();if(null!= -frameWindow.document&&null!=frameWindow.document.body){ifr.style.display="block";this.pastedFrom=definePastedFrom(frameWindow.document);this.Api.asc_PasteData(AscCommon.c_oAscClipboardDataFormat.HtmlElement,frameWindow.document.body,ifr,text_data)}}ifr.style.width="100px";g_clipboardBase.Paste_End()},CommonIframe_PasteEnd:function(){if(this.CommonIframe&&this.CommonIframe.style.display!="none"){this.CommonIframe.blur();this.CommonIframe.style.display="none"}},Paste_End:function(){this.CommonIframe_PasteEnd(); -this.Api.decrementCounterLongAction();this.PasteFlag=false;this.EndFocus();if(this.needClearBuffer){this.ClearBuffer();this.needClearBuffer=false}},pushData:function(_format,_data){if(null==this.LastCopyBinary)this.LastCopyBinary=[];this.LastCopyBinary.push({type:_format,data:_data});if(this.ClosureParams.isDivCopy===true){if(!this.isCopyOutEnabled())return;if(_format==AscCommon.c_oAscClipboardDataFormat.Html){this.CommonDiv.innerHTML=_data;this.DivOnCopyHtmlPresent=true}if(_format==AscCommon.c_oAscClipboardDataFormat.Text)this.DivOnCopyText= -_data;return}var _data_format="";switch(_format){case AscCommon.c_oAscClipboardDataFormat.Html:_data_format="text/html";break;case AscCommon.c_oAscClipboardDataFormat.Text:_data_format="text/plain";break;case AscCommon.c_oAscClipboardDataFormat.Internal:_data_format="text/x-custom";break;default:break}if(_data_format!=""&&_data!==null&&this.isCopyOutEnabled())if(_data_format=="text/x-custom")this.ClosureParams.setData(_data_format,"asc_internalData2;"+_data);else this.ClosureParams.setData(_data_format, -_data)},Button_Copy:function(){if(this.inputContext){if(this.inputContext.isHardCheckKeyboard)this.inputContext.enableVirtualKeyboard_Hard();this.inputContext.HtmlArea.focus()}this.Api.asc_enableKeyEvents(true,true);this.CommonDiv_Execute_CopyCut();var _ret=false;try{_ret=document.execCommand("copy")}catch(err){_ret=false}if(!_ret){this.LastCopyBinary=null;this.checkCopy(AscCommon.c_oAscClipboardDataFormat.Text|AscCommon.c_oAscClipboardDataFormat.Html|AscCommon.c_oAscClipboardDataFormat.Internal)}return _ret}, -Button_Cut:function(){if(this.inputContext){if(this.inputContext.isHardCheckKeyboard)this.inputContext.enableVirtualKeyboard_Hard();this.inputContext.HtmlArea.focus()}this.Api.asc_enableKeyEvents(true,true);this.CommonDiv_Execute_CopyCut();var _ret=false;try{_ret=document.execCommand("cut")}catch(err){_ret=false}if(!_ret){this.LastCopyBinary=null;this.bCut=true;this.checkCopy(AscCommon.c_oAscClipboardDataFormat.Text|AscCommon.c_oAscClipboardDataFormat.Html|AscCommon.c_oAscClipboardDataFormat.Internal); -this.Api.asc_SelectionCut();this.bCut=false}return _ret},Button_Paste:function(){if(this.inputContext){if(this.inputContext.isHardCheckKeyboard)this.inputContext.enableVirtualKeyboard_Hard();this.inputContext.HtmlArea.focus()}this.Api.asc_enableKeyEvents(true,true);var _ret=false;try{_ret=document.execCommand("paste")}catch(err){_ret=false}if(!_ret&&null!=this.LastCopyBinary){var _data=null;var _isInternal=false;for(var i=0;i0)this.Api.asc_PasteData(this.LastCopyBinary[0].type,this.LastCopyBinary[0].data)}return _ret},ClearBuffer:function(){if(-1!=this.clearBufferTimerId)clearTimeout(this.clearBufferTimerId);this.clearBufferTimerId=setTimeout(function(){if(AscCommon.g_clipboardBase)AscCommon.g_clipboardBase.clearBufferTimerId=-1},500);this.Button_Copy()},isCopyOutEnabled:function(){if(this.Api&&this.Api.isCopyOutEnabled)return this.Api.isCopyOutEnabled(); -return true}};function definePastedFrom(doc){if(!doc)return null;var res=null;var metaTags=doc.getElementsByTagName("meta");for(var i=0;i>1)+"px;top:"+-this.HtmlAreaOffset+ -"px;";_style+="background:transparent;border:none;position:absolute;text-shadow:0 0 0 #000;outline:none;color:transparent;width:"+this.HtmlAreaWidth+"px;height:50px;";_style+="overflow:hidden;padding:0px;margin:0px;font-family:arial;resize:none;font-weight:normal;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;";_style+="touch-action: none;-webkit-touch-callout: none;color:transparent;caret-color:transparent;";_style+=AscCommon.AscBrowser.isAppleDevices?"font-size:0px;": -"font-size:8px;";this.HtmlArea.setAttribute("style",_style);this.HtmlArea.setAttribute("spellcheck",false);this.HtmlArea.setAttribute("autocapitalize","none");this.HtmlArea.setAttribute("autocomplete","off");this.HtmlArea.setAttribute("autocorrect","off");this.HtmlDiv.appendChild(this.HtmlArea);if(true){var oHtmlDivScrollable=document.createElement("div");oHtmlDivScrollable.id="area_id_main";oHtmlDivScrollable.setAttribute("style","background:transparent;border:none;position:absolute;padding:0px;margin:0px;z-index:0;pointer-events:none;"); -var parentStyle=getComputedStyle(oHtmlParent);oHtmlDivScrollable.style.left=parentStyle.left;oHtmlDivScrollable.style.top=parentStyle.top;oHtmlDivScrollable.style.width=parentStyle.width;oHtmlDivScrollable.style.height=parentStyle.height;oHtmlDivScrollable.style.overflow="hidden";oHtmlDivScrollable.appendChild(this.HtmlDiv);oHtmlParent.parentNode.appendChild(oHtmlDivScrollable)}else oHtmlParent.appendChild(this.HtmlDiv);var oThis=this;this.HtmlArea["onkeydown"]=function(e){if(AscCommon.AscBrowser.isSafariMacOs){var cmdButton= -e.ctrlKey||e.metaKey?true:false;var buttonCode=e.keyCode==67||e.keyCode==88||e.keyCode==86;if(cmdButton&&buttonCode)oThis.IsDisableKeyPress=true;else oThis.IsDisableKeyPress=false}return oThis.onKeyDown(e)};this.HtmlArea["onkeypress"]=function(e){if(oThis.IsDisableKeyPress==true){oThis.IsDisableKeyPress=false;var cmdButton=e.ctrlKey||e.metaKey?true:false;if(cmdButton)return}return oThis.onKeyPress(e)};this.HtmlArea["onkeyup"]=function(e){oThis.IsDisableKeyPress=false;return oThis.onKeyUp(e)};this.HtmlArea.addEventListener("input", -function(e){return oThis.onInput(e)},false);this.HtmlArea.addEventListener("compositionstart",function(e){return oThis.onCompositionStart(e)},false);this.HtmlArea.addEventListener("compositionupdate",function(e){return oThis.onCompositionUpdate(e)},false);this.HtmlArea.addEventListener("compositionend",function(e){return oThis.onCompositionEnd(e)},false);this.show();this.Api.Input_UpdatePos();if(AscCommon.AscBrowser.isAndroid)this.HtmlArea.onclick=function(e){var _this=AscCommon.g_inputContext;if(-1!= -_this.virtualKeyboardClickTimeout){clearTimeout(_this.virtualKeyboardClickTimeout);_this.virtualKeyboardClickTimeout=-1}_this.apiCompositeEnd();if(!_this.virtualKeyboardClickPrevent)return;_this.setReadOnlyWrapper(true);_this.virtualKeyboardClickPrevent=false;AscCommon.stopEvent(e);_this.virtualKeyboardClickTimeout=setTimeout(function(){_this.setReadOnlyWrapper(false);_this.virtualKeyboardClickTimeout=-1},1);return false}},onResize:function(_editorContainerId){var _elem=document.getElementById("area_id_main"); -var _elemSrc=document.getElementById(_editorContainerId);if(!_elem||!_elemSrc)return;if(AscCommon.AscBrowser.isChrome){var rectObject=_elemSrc.getBoundingClientRect();this.FixedPosCheckElementX=rectObject.left;this.FixedPosCheckElementY=rectObject.top}var _width=_elemSrc.style.width;if((null==_width||""==_width)&&window.getComputedStyle){var _s=window.getComputedStyle(_elemSrc);_elem.style.left=_s.left;_elem.style.top=_s.top;_elem.style.width=_s.width;_elem.style.height=_s.height}else{_elem.style.left= -_elemSrc.style.left;_elem.style.top=_elemSrc.style.top;_elem.style.width=_width;_elem.style.height=_elemSrc.style.height}if(this.Api.isMobileVersion){var _elem1=document.getElementById("area_id_parent");var _elem2=document.getElementById("area_id");_elem1.parentNode.style.pointerEvents="";_elem1.style.left="0px";_elem1.style.top="-1000px";_elem1.style.right="0px";_elem1.style.bottom="-100px";_elem1.style.width="auto";_elem1.style.height="auto";_elem2.style.left="0px";_elem2.style.top="0px";_elem2.style.right= -"0px";_elem2.style.bottom="0px";_elem2.style.width="100%";_elem2.style.height="100%";if(AscCommon.AscBrowser.isIE){document.body.style["msTouchAction"]="none";document.body.style["touchAction"]="none"}}var _editorSdk=document.getElementById("editor_sdk");this.editorSdkW=_editorSdk.clientWidth;this.editorSdkH=_editorSdk.clientHeight},checkFocus:function(){if(this.Api.asc_IsFocus()&&!AscCommon.g_clipboardBase.IsFocus()&&!AscCommon.g_clipboardBase.IsWorking())if(document.activeElement!=this.HtmlArea)this.HtmlArea.focus()}, -move:function(x,y){if(this.Api.isMobileVersion)return;var oTarget=document.getElementById(this.TargetId);if(!oTarget)return;var xPos=x?x:parseInt(oTarget.style.left);var yPos=(y?y:parseInt(oTarget.style.top))+parseInt(oTarget.style.height);if(AscCommon.AscBrowser.isSafari&&AscCommon.AscBrowser.isMobile)xPos=-100;if(!this.isDebug&&!this.isSystem){this.HtmlDiv.style.left=xPos+this.FixedPosCheckElementX+"px";this.HtmlDiv.style.top=yPos+this.FixedPosCheckElementY+this.TargetOffsetY+this.HtmlAreaOffset+ -"px";this.HtmlArea.scrollTop=this.HtmlArea.scrollHeight}else this.debugCalculatePlace(xPos+this.FixedPosCheckElementX,yPos+this.FixedPosCheckElementY+this.TargetOffsetY);if(window.g_asc_plugins)window.g_asc_plugins.onPluginEvent("onTargetPositionChanged")},emulateKeyDownApi:function(code){var _e={altKey:false,ctrlKey:false,shiftKey:false,target:null,charCode:0,which:code,keyCode:code,code:"",preventDefault:function(){},stopPropagation:function(){}};this.Api.onKeyDown(_e);this.Api.onKeyUp(_e)},clear:function(isFromFocus){if(!this.TextArea_Not_ContentEditableDiv)this.HtmlArea.innerHTML= -"";else this.HtmlArea.value="";if(isFromFocus!==true)this.HtmlArea.focus();this.TextBeforeComposition="";this.Text="";this.Target=0;this.CompositionStart=0;this.CompositionEnd=0;this.IsComposition=false;this.keyPressInput="";if(window.g_asc_plugins)window.g_asc_plugins.onPluginEvent("onInputHelperClear")},getAreaValue:function(){return this.TextArea_Not_ContentEditableDiv?this.HtmlArea.value:this.HtmlArea.innerText},setReadOnly:function(isLock){if(isLock)this.ReadOnlyCounter++;else this.ReadOnlyCounter--; -this.setReadOnlyWrapper(0>=this.ReadOnlyCounter?false:true)},setReadOnlyWrapper:function(val){this.HtmlArea.readOnly=this.Api.isViewMode?true:val},show:function(){if(this.isDebug||this.isSystem){this.log("ti: show");document.getElementById("area_id_main").style.zIndex=10;this.HtmlArea.style.top="0px";this.HtmlArea.style.width="100%";this.HtmlArea.style.height="100%";this.HtmlArea.style.background="#FFFFFF";this.HtmlArea.style.color="black";this.HtmlDiv.style.zIndex=90;this.HtmlDiv.style.border="2px solid #4363A4"; -this.isShow=true}},unshow:function(isAttack){if(this.isDebug||this.isSystem||true==isAttack){this.log("ti: unshow");document.getElementById("area_id_main").style.zIndex=0;this.HtmlArea.style.top=-this.HtmlAreaOffset+"px";this.HtmlArea.style.width="1000px";this.HtmlArea.style.height="50px";this.HtmlArea.style.background="transparent";this.HtmlArea.style.color="transparent";this.HtmlDiv.style.zIndex=0;this.HtmlDiv.style.border="none";this.isShow=false}},debugCalculatePlace:function(x,y){var _left=x; -var _top=y;if(undefined==_left)_left=parseInt(this.HtmlDiv.style.left);if(undefined==_top)_top=parseInt(this.HtmlDiv.style.top);var _r_max=this.editorSdkW;var _b_max=this.editorSdkH;_r_max-=60;if(_r_max-_left>50)this.debugTexBoxMaxW=_r_max-_left;else{_left=_r_max-50;this.debugTexBoxMaxW=50}_b_max-=40;if(_b_max-_top>50)this.debugTexBoxMaxH=_b_max-_top;else{_top=_b_max-50;this.debugTexBoxMaxH=50}if(AscCommon.AscBrowser.isSafari&&AscCommon.AscBrowser.isMobile)_left=-100;this.HtmlDiv.style.left=_left+ -"px";this.HtmlDiv.style.top=_top+"px";var _height=22;var _t=this.getAreaValue();if(0!=_t.length){var _editorSdk=document.getElementById("editor_sdk");var _p=document.createElement("p");_p.style.zIndex="-1";_p.style.position="absolute";_p.style.fontFamily="arial";_p.style.fontSize="12pt";_p.style.left="0px";_p.style.width=this.debugTexBoxMaxW+"px";_editorSdk.appendChild(_p);_t=_t.replace(/ /g," ");_p.innerHTML=""+_t+"";var _width=_p.firstChild.offsetWidth;_width=Math.min(_width+20, -this.debugTexBoxMaxW);if(AscCommon.AscBrowser.isIE)_width+=10;var area=document.createElement("textarea");area.style.zIndex="-1";area.id="area2_id";area.rows=1;area.setAttribute("style","font-family:arial;font-size:12pt;position:absolute;resize:none;padding:0px;margin:0px;font-weight:normal;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;");area.style.overflow="hidden";area.style.width=_width+"px";_editorSdk.appendChild(area);area.value=this.getAreaValue();_height= -area.clientHeight;if(area.scrollHeight>_height)_height=area.scrollHeight;_editorSdk.removeChild(_p);_editorSdk.removeChild(area)}if(_height>this.debugTexBoxMaxH)_height=this.debugTexBoxMaxH;this.HtmlDiv.style.width=_width+"px";this.HtmlDiv.style.height=_height+"px";var oldZindex=parseInt(this.HtmlDiv.style.zIndex);var newZindex=oldZindex==90?"89":"90";this.HtmlDiv.style.zIndex=newZindex},onInput:function(e,isFromCompositionUpdate){if(this.Api.isLongAction()||this.Api.isViewMode){AscCommon.stopEvent(e); -return false}if(this.isSystem){if(!this.isShow)this.show();this.debugCalculatePlace(undefined,undefined);return}if(this.isKeyPressOnUp&&this.keyPressOnUpCodes.length>0){if(!this.TextArea_Not_ContentEditableDiv)this.HtmlArea.innerHTML="";else this.HtmlArea.value="";this.TextBeforeComposition="";this.Text="";AscCommon.stopEvent(e);return false}this.log("ti: onInput");this.Text=this.getAreaValue();this.Text=this.Text.split(" ").join(" ");var codes=[];if(this.IsComposition||this.ApiIsComposition){var ieStart= --1;var ieEnd=-1;if(true){var target=e.target;if(target["msGetInputContext"]){var ctx=target["msGetInputContext"]();if(ctx){ieStart=ctx["compositionStartOffset"];ieEnd=ctx["compositionEndOffset"]}}}this.CompositionEnd=this.Text.length;this.CompositionStart=this.TextBeforeComposition.length;var textReplace=this.Text.substr(this.CompositionStart);var iter;for(iter=textReplace.getUnicodeIterator();iter.check();iter.next())codes.push(iter.value());var isAsync=AscFonts.FontPickerByCharacter.checkTextLight(codes, -true);if(!isAsync){if(ieStart>this.CompositionStart){textReplace=textReplace.substr(0,ieStart-this.CompositionStart);codes=[];for(iter=textReplace.getUnicodeIterator();iter.check();iter.next())codes.push(iter.value());this.apiCompositeReplace(codes);this.apiCompositeEnd();this.TextBeforeComposition=this.Text.substr(0,ieStart);this.apiCompositeStart();this.CompositionStart=ieStart;codes=[];textReplace=this.Text.substr(this.CompositionStart);for(iter=textReplace.getUnicodeIterator();iter.check();iter.next())codes.push(iter.value()); -this.apiCompositeReplace(codes)}else this.apiCompositeReplace(codes);if(!this.IsComposition){this.apiCompositeEnd();this.TextBeforeComposition=this.Text}}else{AscFonts.FontPickerByCharacter.loadFonts(this,function(){this.apiCompositeReplace(codes);this.apiCompositeEnd();this.clear();this.setReadOnly(false)});AscCommon.stopEvent(e);this.setReadOnly(true);return false}}else{var textToApi=this.Text.substr(this.TextBeforeComposition.length);for(var iter=textToApi.getUnicodeIterator();iter.check();iter.next())codes.push(iter.value()); -if(codes.length>0)this.apiInputText(codes);this.TextBeforeComposition=this.Text}if(!this.IsComposition)if(this.Text.length>0){var _lastCode=this.Text.charCodeAt(this.Text.length-1);if(_lastCode==12290||_lastCode==46){AscCommon.stopEvent(e);if(AscCommon.AscBrowser.isIE&&!AscCommon.AscBrowser.isIeEdge)setTimeout(function(){window["AscCommon"].g_inputContext.clear();window["AscCommon"].g_inputContext.HtmlArea.focus()},0);else this.clear();return false}}},emulateNativeKeyDown:function(e,target){var oEvent= -document.createEvent("KeyboardEvent");Object.defineProperty(oEvent,"keyCode",{get:function(){return this.keyCodeVal}});Object.defineProperty(oEvent,"which",{get:function(){return this.keyCodeVal}});Object.defineProperty(oEvent,"shiftKey",{get:function(){return this.shiftKeyVal}});Object.defineProperty(oEvent,"altKey",{get:function(){return this.altKeyVal}});Object.defineProperty(oEvent,"metaKey",{get:function(){return this.metaKeyVal}});Object.defineProperty(oEvent,"ctrlKey",{get:function(){return this.ctrlKeyVal}}); -if(AscCommon.AscBrowser.isIE)oEvent.preventDefault=function(){try{Object.defineProperty(this,"defaultPrevented",{get:function(){return true}})}catch(err){}};var k=e.keyCode;if(oEvent.initKeyboardEvent)oEvent.initKeyboardEvent("keydown",true,true,window,false,false,false,false,k,k);else oEvent.initKeyEvent("keydown",true,true,window,false,false,false,false,k,0);oEvent.keyCodeVal=k;oEvent.shiftKeyVal=e.shiftKey;oEvent.altKeyVal=e.altKey;oEvent.metaKeyVal=e.metaKey;oEvent.ctrlKeyVal=e.ctrlKey;var _elem= -target?target:_getElementKeyboardDown(this.nativeFocusElement,3);_elem.dispatchEvent(oEvent);return oEvent.defaultPrevented},isSpaceSymbol:function(e){if(e.keyCode==32)return true;if(e.keyCode==229&&(e.code=="space"||e.code=="Space"||e.key=="Spacebar"))return true;return false},systemInputEnable:function(isEnabled){if(this.isSystem==isEnabled)return;this.isSystem=isEnabled;this.HtmlArea.style.left=this.isSystem?"0px":"-"+(this.HtmlAreaWidth>>1)+"px";this.clear();if(this.isShow)this.unshow(true);if(this.Api.WordControl&& -this.Api.WordControl.m_oLogicDocument&&this.Api.WordControl.m_oLogicDocument.Document_UpdateSelectionState)this.Api.WordControl.m_oLogicDocument.Document_UpdateSelectionState()},debugInputEnable:function(isEnabled){if(this.isDebug==isEnabled)return;this.isDebug=isEnabled;this.HtmlArea.style.left=this.isDebug?"0px":"-"+(this.HtmlAreaWidth>>1)+"px"},apiInputText:function(codes){var isAsync=AscFonts.FontPickerByCharacter.checkTextLight(codes,true);if(!isAsync){this.apiCompositeStart();this.apiCompositeReplace(codes); -this.apiCompositeEnd()}else{AscFonts.FontPickerByCharacter.loadFonts(this,function(){this.apiCompositeStart();this.apiCompositeReplace(codes);this.apiCompositeEnd();this.setReadOnly(false)});this.setReadOnly(true);return false}},onKeyDown:function(e){if(this.Api.isLongAction()){AscCommon.stopEvent(e);return false}if(this.isInputHelpersPresent)switch(e.keyCode){case 9:case 13:case 38:case 40:case 33:case 34:case 35:case 36:case 27:{window.g_asc_plugins.onPluginEvent2("onKeyDown",{"keyCode":e.keyCode}, -this.isInputHelpers);AscCommon.stopEvent(e);return false}case 32:{if(window.g_asc_plugins)window.g_asc_plugins.onPluginEvent("onInputHelperInput",{"text":this.keyPressInput})}default:break}else if(32==e.keyCode);if(this.isSystem&&this.isShow){if(e.keyCode==13){var text=this.getAreaValue();var codes=[];for(var iter=text.getUnicodeIterator();iter.check();iter.next())codes.push(iter.value());this.apiInputText(codes);this.clear();this.unshow();AscCommon.stopEvent(e);return false}else if(e.keyCode==27){this.clear(); -this.unshow();AscCommon.stopEvent(e);return false}return}if(null!=this.nativeFocusElement)if(this.emulateNativeKeyDown(e)){e.preventDefault();return false}var _code=e.keyCode;if(_code!=8&&_code!=46)this.KeyDownFlag=true;AscCommon.check_KeyboardEvent(e);var arrCodes=this.Api.getAddedTextOnKeyDown(AscCommon.global_keyboardEvent);var isAsync=AscFonts.FontPickerByCharacter.checkTextLight(arrCodes,true);if(isAsync){AscFonts.FontPickerByCharacter.loadFonts(this,function(){this.onKeyDown(e);this.onKeyUp(e); -this.setReadOnly(false)});AscCommon.stopEvent(e);this.setReadOnly(true);return false}var ret=this.Api.onKeyDown(e);switch(e.keyCode){case 8:{var oldKeyPressInput=this.keyPressInput;this.clear();if(oldKeyPressInput.length>1){this.keyPressInput=oldKeyPressInput.substr(0,oldKeyPressInput.length-1);if(window.g_asc_plugins)window.g_asc_plugins.onPluginEvent("onInputHelperInput",{"text":this.keyPressInput})}return false}case 9:case 13:case 37:case 38:case 39:case 40:case 33:case 34:case 35:case 36:{this.clear(); +_internal!=""&&_internal.indexOf("asc_internalData2;")==0){this.Api.asc_PasteData(AscCommon.c_oAscClipboardDataFormat.Internal,_internal.substr("asc_internalData2;".length),null,_text_format);g_clipboardBase.Paste_End();return false}var _html_format=this.ClosureParams.getData("text/html");_html_format=_html_format.replace(/]+>/g,"");if(!_html_format){this.PasteFlag=false;g_clipboardBase.Paste_End();return false}if(_html_format&&_html_format!=""){var nIndex=_html_format.indexOf("");if(-1!= +nIndex)_html_format=_html_format.substring(0,nIndex+"".length);this.CommonIframe_PasteStart(_html_format,_text_format);return false}if(_text_format&&_text_format!=""){this.Api.asc_PasteData(AscCommon.c_oAscClipboardDataFormat.Text,_text_format);g_clipboardBase.Paste_End();return false}var items=_clipboard.items;if(null!=items&&0!=items.length){g_clipboardBase.PasteImagesBody="";g_clipboardBase.PasteImagesCount=items.length;g_clipboardBase.PasteImagesCounter=0;for(var i=0;i';if(g_clipboardBase.PasteImagesCounter==g_clipboardBase.PasteImagesCount){g_clipboardBase.CommonIframe_PasteStart(""+g_clipboardBase.PasteImagesBody+"");g_clipboardBase.PasteImagesBody="";g_clipboardBase.PasteImagesCounter=0;g_clipboardBase.PasteImagesCount= +0}};reader.onabort=reader.onerror=function(e){g_clipboardBase.PasteImagesCounter++;if(g_clipboardBase.PasteImagesCounter==g_clipboardBase.PasteImagesCount){g_clipboardBase.CommonIframe_PasteStart(""+g_clipboardBase.PasteImagesBody+"");g_clipboardBase.PasteImagesBody="";g_clipboardBase.PasteImagesCounter=0;g_clipboardBase.PasteImagesCount=0}};try{reader.readAsDataURL(blob)}catch(err){g_clipboardBase.PasteImagesCounter++}}else g_clipboardBase.PasteImagesCounter++;if(g_clipboardBase.PasteImagesCounter== +g_clipboardBase.PasteImagesCount)g_clipboardBase.Paste_End();return false}}g_clipboardBase.Paste_End();return false},_private_onbeforepaste:function(e,isAttackEmulate){this._console_log("onbeforepaste");if(!this.Api.asc_IsFocus(true))return;{this.CommonDiv=this.CommonDiv_Check();this.CommonDiv_Start();this.CommonDiv.focus();this.StartFocus();this.CommonDiv_Select();return}return false},_private_onbeforecopy_select:function(){if(AscBrowser.isIE){this._console_log("onbeforecopy_select");this.CommonDiv= +this.CommonDiv_Check();this.CommonDiv_Start();this.CommonDiv.innerHTML=" ";this.CommonDiv.focus();this.StartFocus();this.CommonDiv_Select()}},_private_onbeforecopy:function(e,isAttackEmulate){this._console_log("onbeforecopy");if(!this.Api.asc_IsFocus(true))return;{this.CommonDiv=this.CommonDiv_Check();this.CommonDiv_Start();this.CommonDiv.innerHTML=" ";this.CommonDiv.focus();this.StartFocus();this.CommonDiv_Select()}return false},Init:function(_api){this.Api=_api;window["AscCommon"].g_specialPasteHelper.Init(_api); +this.ClosureParams.getData=function(type){var _clipboard=this._e&&this._e.clipboardData?this._e.clipboardData:window.clipboardData;if(!_clipboard||!_clipboard.getData)return null;var _type=type;if(AscBrowser.isIE&&(type=="text"||type=="text/plain"))_type="Text";try{return _clipboard.getData(_type)}catch(e){}return null};this.ClosureParams.setData=function(type,_data){var _clipboard=this._e&&this._e.clipboardData?this._e.clipboardData:window.clipboardData;if(!_clipboard||!_clipboard.setData)return null; +var _type=type;if(AscBrowser.isIE&&(type=="text"||type=="text/plain"))_type="Text";try{_clipboard.setData(_type,_data)}catch(e){}};if(!AscBrowser.isIE){document.oncopy=function(e){return g_clipboardBase._private_oncopy(e)};document.oncut=function(e){return g_clipboardBase._private_oncut(e)};document.onpaste=function(e){return g_clipboardBase._private_onpaste(e)};document["onbeforecopy"]=function(e){return g_clipboardBase._private_onbeforecopy(e)};document["onbeforecut"]=function(e){return g_clipboardBase._private_onbeforecopy(e)}; +document["onbeforepaste"]=function(e){return g_clipboardBase._private_onbeforepaste(e)}}else{document.addEventListener("copy",function(e){return g_clipboardBase._private_oncopy(e)});document.addEventListener("cut",function(e){return g_clipboardBase._private_oncut(e)});document.addEventListener("paste",function(e){return g_clipboardBase._private_onpaste(e)});document.addEventListener("beforepaste",function(e){return g_clipboardBase._private_onbeforepaste(e)});document.addEventListener("beforecopy", +function(e){return g_clipboardBase._private_onbeforecopy(e)});document.addEventListener("beforecut",function(e){return g_clipboardBase._private_onbeforecopy(e)})}if(this.IsCopyCutOnlyInEditable||this.IsPasteOnlyInEditable)document.onkeydown=function(e){if(!g_clipboardBase.Api.asc_IsFocus(true)||g_clipboardBase.Api.isLongAction())return;var isAltGr=AscCommon.getAltGr(e);if(isAltGr)return;var isCtrl=e.ctrlKey===true||e.metaKey===true;var isShift=e.shiftKey;var keyCode=e.keyCode;if(g_clipboardBase.IsCopyCutOnlyInEditable){var bIsBeforeCopyCutEmulate= +false;var _cut=false;if(isCtrl&&!isShift&&(keyCode==67||keyCode==88))bIsBeforeCopyCutEmulate=true;if(!isCtrl&&isShift&&keyCode==45){bIsBeforeCopyCutEmulate=true;_cut=true}if(bIsBeforeCopyCutEmulate){g_clipboardBase._console_log("emulate_beforecopycut");var isEmulate=false;try{isEmulate=_cut?document.execCommand("beforecut"):document.execCommand("beforecopy")}catch(err){}g_clipboardBase._private_onbeforecopy(undefined,!isEmulate)}}if(g_clipboardBase.IsPasteOnlyInEditable){var bIsBeforePasteEmulate= +false;if(isCtrl&&!isShift&&keyCode==86)bIsBeforePasteEmulate=true;if(!isCtrl&&isShift&&keyCode==45)bIsBeforePasteEmulate=true;if(bIsBeforePasteEmulate){g_clipboardBase._console_log("emulate_beforepaste");var isEmulate=false;try{isEmulate=document.execCommand("beforepaste")}catch(err$19){}g_clipboardBase._private_onbeforepaste(undefined,!isEmulate)}}};if(AscBrowser.isSafari&&false){this.CommonDiv=this.CommonDiv_Check();setInterval(function(){if(g_clipboardBase.Api.asc_IsFocus(true))g_clipboardBase.CommonDiv.focus()}, +100)}},IsWorking:function(){return this.CopyFlag||this.PasteFlag?true:false},StartFocus:function(){this.EndFocus(false);this.CopyPasteFocus=true;this.CopyPasteFocusTimer=setTimeout(function(){g_clipboardBase.EndFocus()},1E3)},EndFocus:function(isFocusToEditor){this.CopyPasteFocus=false;if(-1!=this.CopyPasteFocusTimer){clearTimeout(this.CopyPasteFocusTimer);this.CopyPasteFocusTimer=-1;if(false!==isFocusToEditor&&null!=this.inputContext)if(this.inputContext.HtmlArea)this.inputContext.HtmlArea.focus()}}, +IsFocus:function(){return this.CopyPasteFocus},CommonDiv_Check:function(){var ElemToSelect=document.getElementById(this.CommonDivId);if(!ElemToSelect){ElemToSelect=document.createElement("div");ElemToSelect.id=this.CommonDivId;ElemToSelect.className=this.CommonDivClassName;ElemToSelect.style.position="fixed";ElemToSelect.style.left="0px";ElemToSelect.style.top="-100px";ElemToSelect.style.width="10000px";ElemToSelect.style.height="100px";ElemToSelect.style.overflow="hidden";ElemToSelect.style.zIndex= +-1E3;ElemToSelect.style.MozUserSelect="text";ElemToSelect.style.fontFamily="onlyofficeDefaultFont";ElemToSelect.style.fontSize="11pt";ElemToSelect.style.color="black";ElemToSelect.style["-khtml-user-select"]="text";ElemToSelect.style["-o-user-select"]="text";ElemToSelect.style["user-select"]="text";ElemToSelect.style["-webkit-user-select"]="text";ElemToSelect.setAttribute("contentEditable",this.isCopyOutEnabled());var _parent=""==this.CommonDivIdParent?document.body:document.getElementById(this.CommonDivIdParent); +_parent.appendChild(ElemToSelect)}else ElemToSelect.setAttribute("contentEditable",this.isCopyOutEnabled());return ElemToSelect},CommonDiv_Select:function(){var ElemToSelect=this.CommonDiv;if(window.getSelection){var selection=window.getSelection();var rangeToSelect=document.createRange();var is_gecko=AscBrowser.isGecko;if(is_gecko){ElemToSelect.appendChild(document.createTextNode("\u00a0"));ElemToSelect.insertBefore(document.createTextNode("\u00a0"),ElemToSelect.firstChild);rangeToSelect.setStartAfter(ElemToSelect.firstChild); +rangeToSelect.setEndBefore(ElemToSelect.lastChild)}else{var aChildNodes=ElemToSelect.childNodes;if(aChildNodes.length==1){var elem=aChildNodes[0];var wrap=document.createElement("b");wrap.setAttribute("style","font-weight:normal; background-color: transparent; color: transparent;");elem=ElemToSelect.removeChild(elem);wrap.appendChild(elem);ElemToSelect.appendChild(wrap)}rangeToSelect.selectNodeContents(ElemToSelect)}selection.removeAllRanges();selection.addRange(rangeToSelect)}else if(document.body.createTextRange){var rangeToSelect= +document.body.createTextRange();rangeToSelect.moveToElementText(ElemToSelect);rangeToSelect.select()}},CommonDiv_Start:function(){this.ClosureParams.overflowBody=document.body.style.overflow;document.body.style.overflow="hidden";this.ClosureParams.backgroundcolorBody=document.body.style["background-color"];document.body.style["background-color"]="transparent";var ElemToSelect=this.CommonDiv;ElemToSelect.style.display="block";while(ElemToSelect.hasChildNodes())ElemToSelect.removeChild(ElemToSelect.lastChild); +document.body.style.MozUserSelect="text";delete document.body.style["-khtml-user-select"];delete document.body.style["-o-user-select"];delete document.body.style["user-select"];document.body.style["-webkit-user-select"]="text";ElemToSelect.style.MozUserSelect="all"},CommonDiv_End:function(){var ElemToSelect=this.CommonDiv;if(ElemToSelect){ElemToSelect.style.display=AscBrowser.isSafari?"block":"none";ElemToSelect.style.MozUserSelect="none"}document.body.style.MozUserSelect="none";document.body.style["-khtml-user-select"]= +"none";document.body.style["-o-user-select"]="none";document.body.style["user-select"]="none";document.body.style["-webkit-user-select"]="none";document.body.style["background-color"]=this.ClosureParams.backgroundcolorBody;document.body.style.overflow=this.ClosureParams.overflowBody;this.CopyFlag=false;this.bCut=false;this.EndFocus()},CommonDiv_Copy:function(){this.CopyFlag=true;this.CommonDiv=this.CommonDiv_Check();this.CommonDiv_Start();this.ClosureParams.isDivCopy=true;this.DivOnCopyHtmlPresent= +false;this.DivOnCopyText="";this.LastCopyBinary=null;this.checkCopy(AscCommon.c_oAscClipboardDataFormat.Text|AscCommon.c_oAscClipboardDataFormat.Html|AscCommon.c_oAscClipboardDataFormat.Internal);this.ClosureParams.isDivCopy=false;if(!this.DivOnCopyHtmlPresent&&this.DivOnCopyText!="")this.CommonDiv.innerHTML=this.DivOnCopyText;this.DivOnCopyHtmlPresent=false;this.DivOnCopyText="";this.CommonDiv_Select();window.setTimeout(function(){g_clipboardBase.CommonDiv_End()},0)},CommonDiv_Execute_CopyCut:function(){if(this.IsCopyCutOnlyInEditable)this._private_onbeforecopy(undefined, +true)},CommonIframe_PasteStart:function(_html_data,text_data){var ifr=document.getElementById(this.CommonIframeId);if(!ifr){ifr=document.createElement("iframe");ifr.name=this.CommonIframeId;ifr.id=this.CommonIframeId;ifr.style.position="absolute";ifr.style.top="-100px";ifr.style.left="0px";ifr.style.width="10000px";ifr.style.height="100px";ifr.style.overflow="hidden";ifr.style.zIndex=-1E3;ifr.setAttribute("sandbox","allow-same-origin");document.body.appendChild(ifr);this.CommonIframe=ifr}else ifr.style.width= +"10000px";var frameWindow=window.frames[this.CommonIframeId];if(frameWindow){frameWindow.document.open();frameWindow.document.write(_html_data);frameWindow.document.close();if(null!=frameWindow.document&&null!=frameWindow.document.body){ifr.style.display="block";this.pastedFrom=definePastedFrom(frameWindow.document);this.Api.asc_PasteData(AscCommon.c_oAscClipboardDataFormat.HtmlElement,frameWindow.document.body,ifr,text_data)}}ifr.style.width="100px";g_clipboardBase.Paste_End()},CommonIframe_PasteEnd:function(){if(this.CommonIframe&& +this.CommonIframe.style.display!="none"){this.CommonIframe.blur();this.CommonIframe.style.display="none"}},Paste_End:function(){this.CommonIframe_PasteEnd();this.Api.decrementCounterLongAction();this.PasteFlag=false;this.EndFocus();if(this.needClearBuffer){this.ClearBuffer();this.needClearBuffer=false}},pushData:function(_format,_data){if(null==this.LastCopyBinary)this.LastCopyBinary=[];this.LastCopyBinary.push({type:_format,data:_data});if(this.ClosureParams.isDivCopy===true){if(!this.isCopyOutEnabled())return; +if(_format==AscCommon.c_oAscClipboardDataFormat.Html){this.CommonDiv.innerHTML=_data;this.DivOnCopyHtmlPresent=true}if(_format==AscCommon.c_oAscClipboardDataFormat.Text)this.DivOnCopyText=_data;return}var _data_format="";switch(_format){case AscCommon.c_oAscClipboardDataFormat.Html:_data_format="text/html";break;case AscCommon.c_oAscClipboardDataFormat.Text:_data_format="text/plain";break;case AscCommon.c_oAscClipboardDataFormat.Internal:_data_format="text/x-custom";break;default:break}if(_data_format!= +""&&_data!==null&&this.isCopyOutEnabled())if(_data_format=="text/x-custom")this.ClosureParams.setData(_data_format,"asc_internalData2;"+_data);else this.ClosureParams.setData(_data_format,_data)},Button_Copy:function(){if(this.inputContext){if(this.inputContext.isHardCheckKeyboard)this.inputContext.enableVirtualKeyboard_Hard();this.inputContext.HtmlArea.focus()}this.Api.asc_enableKeyEvents(true,true);this.CommonDiv_Execute_CopyCut();var _ret=false;try{_ret=document.execCommand("copy")}catch(err){_ret= +false}if(!_ret){this.LastCopyBinary=null;this.checkCopy(AscCommon.c_oAscClipboardDataFormat.Text|AscCommon.c_oAscClipboardDataFormat.Html|AscCommon.c_oAscClipboardDataFormat.Internal)}return _ret},Button_Cut:function(){if(this.inputContext){if(this.inputContext.isHardCheckKeyboard)this.inputContext.enableVirtualKeyboard_Hard();this.inputContext.HtmlArea.focus()}this.Api.asc_enableKeyEvents(true,true);this.CommonDiv_Execute_CopyCut();var _ret=false;try{_ret=document.execCommand("cut")}catch(err){_ret= +false}if(!_ret){this.LastCopyBinary=null;this.bCut=true;this.checkCopy(AscCommon.c_oAscClipboardDataFormat.Text|AscCommon.c_oAscClipboardDataFormat.Html|AscCommon.c_oAscClipboardDataFormat.Internal);this.Api.asc_SelectionCut();this.bCut=false}return _ret},Button_Paste:function(){if(this.inputContext){if(this.inputContext.isHardCheckKeyboard)this.inputContext.enableVirtualKeyboard_Hard();this.inputContext.HtmlArea.focus()}this.Api.asc_enableKeyEvents(true,true);var _ret=false;try{_ret=document.execCommand("paste")}catch(err){_ret= +false}if(!_ret&&null!=this.LastCopyBinary){var _data=null;var _isInternal=false;for(var i=0;i0)this.Api.asc_PasteData(this.LastCopyBinary[0].type,this.LastCopyBinary[0].data)}return _ret},ClearBuffer:function(){if(-1!=this.clearBufferTimerId)clearTimeout(this.clearBufferTimerId); +this.clearBufferTimerId=setTimeout(function(){if(AscCommon.g_clipboardBase)AscCommon.g_clipboardBase.clearBufferTimerId=-1},500);this.Button_Copy()},isCopyOutEnabled:function(){if(this.Api&&this.Api.isCopyOutEnabled)return this.Api.isCopyOutEnabled();return true}};function definePastedFrom(doc){if(!doc)return null;var res=null;var metaTags=doc.getElementsByTagName("meta");for(var i=0;i>1)+"px;top:"+-this.HtmlAreaOffset+"px;";_style+="background:transparent;border:none;position:absolute;text-shadow:0 0 0 #000;outline:none;color:transparent;width:"+this.HtmlAreaWidth+"px;height:50px;";_style+="overflow:hidden;padding:0px;margin:0px;font-family:arial;resize:none;font-weight:normal;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;"; +_style+="touch-action: none;-webkit-touch-callout: none;color:transparent;caret-color:transparent;";_style+=AscCommon.AscBrowser.isAppleDevices?"font-size:0px;":"font-size:8px;";this.HtmlArea.setAttribute("style",_style);this.HtmlArea.setAttribute("spellcheck",false);this.HtmlArea.setAttribute("autocapitalize","none");this.HtmlArea.setAttribute("autocomplete","off");this.HtmlArea.setAttribute("autocorrect","off");this.HtmlDiv.appendChild(this.HtmlArea);if(true){var oHtmlDivScrollable=document.createElement("div"); +oHtmlDivScrollable.id="area_id_main";oHtmlDivScrollable.setAttribute("style","background:transparent;border:none;position:absolute;padding:0px;margin:0px;z-index:0;pointer-events:none;");var parentStyle=getComputedStyle(oHtmlParent);oHtmlDivScrollable.style.left=parentStyle.left;oHtmlDivScrollable.style.top=parentStyle.top;oHtmlDivScrollable.style.width=parentStyle.width;oHtmlDivScrollable.style.height=parentStyle.height;oHtmlDivScrollable.style.overflow="hidden";oHtmlDivScrollable.appendChild(this.HtmlDiv); +oHtmlParent.parentNode.appendChild(oHtmlDivScrollable)}else oHtmlParent.appendChild(this.HtmlDiv);var oThis=this;this.HtmlArea["onkeydown"]=function(e){if(AscCommon.AscBrowser.isSafariMacOs){var cmdButton=e.ctrlKey||e.metaKey?true:false;var buttonCode=e.keyCode==67||e.keyCode==88||e.keyCode==86;if(cmdButton&&buttonCode)oThis.IsDisableKeyPress=true;else oThis.IsDisableKeyPress=false}return oThis.onKeyDown(e)};this.HtmlArea["onkeypress"]=function(e){if(oThis.IsDisableKeyPress==true){oThis.IsDisableKeyPress= +false;var cmdButton=e.ctrlKey||e.metaKey?true:false;if(cmdButton)return}return oThis.onKeyPress(e)};this.HtmlArea["onkeyup"]=function(e){oThis.IsDisableKeyPress=false;return oThis.onKeyUp(e)};this.HtmlArea.addEventListener("input",function(e){return oThis.onInput(e)},false);this.HtmlArea.addEventListener("compositionstart",function(e){return oThis.onCompositionStart(e)},false);this.HtmlArea.addEventListener("compositionupdate",function(e){return oThis.onCompositionUpdate(e)},false);this.HtmlArea.addEventListener("compositionend", +function(e){return oThis.onCompositionEnd(e)},false);this.show();this.Api.Input_UpdatePos();if(AscCommon.AscBrowser.isAndroid)this.HtmlArea.onclick=function(e){var _this=AscCommon.g_inputContext;if(-1!=_this.virtualKeyboardClickTimeout){clearTimeout(_this.virtualKeyboardClickTimeout);_this.virtualKeyboardClickTimeout=-1}_this.apiCompositeEnd();if(!_this.virtualKeyboardClickPrevent)return;_this.setReadOnlyWrapper(true);_this.virtualKeyboardClickPrevent=false;AscCommon.stopEvent(e);_this.virtualKeyboardClickTimeout= +setTimeout(function(){_this.setReadOnlyWrapper(false);_this.virtualKeyboardClickTimeout=-1},1);return false}},onResize:function(_editorContainerId){var _elem=document.getElementById("area_id_main");var _elemSrc=document.getElementById(_editorContainerId);if(!_elem||!_elemSrc)return;if(AscCommon.AscBrowser.isChrome){var rectObject=_elemSrc.getBoundingClientRect();this.FixedPosCheckElementX=rectObject.left;this.FixedPosCheckElementY=rectObject.top}var _width=_elemSrc.style.width;if((null==_width||""== +_width)&&window.getComputedStyle){var _s=window.getComputedStyle(_elemSrc);_elem.style.left=_s.left;_elem.style.top=_s.top;_elem.style.width=_s.width;_elem.style.height=_s.height}else{_elem.style.left=_elemSrc.style.left;_elem.style.top=_elemSrc.style.top;_elem.style.width=_width;_elem.style.height=_elemSrc.style.height}if(this.Api.isMobileVersion){var _elem1=document.getElementById("area_id_parent");var _elem2=document.getElementById("area_id");_elem1.parentNode.style.pointerEvents="";_elem1.style.left= +"0px";_elem1.style.top="-1000px";_elem1.style.right="0px";_elem1.style.bottom="-100px";_elem1.style.width="auto";_elem1.style.height="auto";_elem2.style.left="0px";_elem2.style.top="0px";_elem2.style.right="0px";_elem2.style.bottom="0px";_elem2.style.width="100%";_elem2.style.height="100%";if(AscCommon.AscBrowser.isIE){document.body.style["msTouchAction"]="none";document.body.style["touchAction"]="none"}}var _editorSdk=document.getElementById("editor_sdk");this.editorSdkW=_editorSdk.clientWidth;this.editorSdkH= +_editorSdk.clientHeight},checkFocus:function(){if(this.Api.asc_IsFocus()&&!AscCommon.g_clipboardBase.IsFocus()&&!AscCommon.g_clipboardBase.IsWorking())if(document.activeElement!=this.HtmlArea)this.HtmlArea.focus()},move:function(x,y){if(this.Api.isMobileVersion)return;var oTarget=document.getElementById(this.TargetId);if(!oTarget)return;var xPos=x?x:parseInt(oTarget.style.left);var yPos=(y?y:parseInt(oTarget.style.top))+parseInt(oTarget.style.height);if(AscCommon.AscBrowser.isSafari&&AscCommon.AscBrowser.isMobile)xPos= +-100;if(!this.isDebug&&!this.isSystem){this.HtmlDiv.style.left=xPos+this.FixedPosCheckElementX+"px";this.HtmlDiv.style.top=yPos+this.FixedPosCheckElementY+this.TargetOffsetY+this.HtmlAreaOffset+"px";this.HtmlArea.scrollTop=this.HtmlArea.scrollHeight}else this.debugCalculatePlace(xPos+this.FixedPosCheckElementX,yPos+this.FixedPosCheckElementY+this.TargetOffsetY);if(window.g_asc_plugins)window.g_asc_plugins.onPluginEvent("onTargetPositionChanged")},emulateKeyDownApi:function(code){var _e={altKey:false, +ctrlKey:false,shiftKey:false,target:null,charCode:0,which:code,keyCode:code,code:"",preventDefault:function(){},stopPropagation:function(){}};this.Api.onKeyDown(_e);this.Api.onKeyUp(_e)},clear:function(isFromFocus){if(!this.TextArea_Not_ContentEditableDiv)this.HtmlArea.innerHTML="";else this.HtmlArea.value="";if(isFromFocus!==true)this.HtmlArea.focus();this.TextBeforeComposition="";this.Text="";this.Target=0;this.CompositionStart=0;this.CompositionEnd=0;this.IsComposition=false;this.keyPressInput= +"";if(window.g_asc_plugins)window.g_asc_plugins.onPluginEvent("onInputHelperClear")},getAreaValue:function(){return this.TextArea_Not_ContentEditableDiv?this.HtmlArea.value:this.HtmlArea.innerText},setReadOnly:function(isLock){if(isLock)this.ReadOnlyCounter++;else this.ReadOnlyCounter--;this.setReadOnlyWrapper(0>=this.ReadOnlyCounter?false:true)},setReadOnlyWrapper:function(val){this.HtmlArea.readOnly=this.Api.isViewMode?true:val},show:function(){if(this.isDebug||this.isSystem){this.log("ti: show"); +document.getElementById("area_id_main").style.zIndex=10;this.HtmlArea.style.top="0px";this.HtmlArea.style.width="100%";this.HtmlArea.style.height="100%";this.HtmlArea.style.background="#FFFFFF";this.HtmlArea.style.color="black";this.HtmlDiv.style.zIndex=90;this.HtmlDiv.style.border="2px solid #4363A4";this.isShow=true}},unshow:function(isAttack){if(this.isDebug||this.isSystem||true==isAttack){this.log("ti: unshow");document.getElementById("area_id_main").style.zIndex=0;this.HtmlArea.style.top=-this.HtmlAreaOffset+ +"px";this.HtmlArea.style.width="1000px";this.HtmlArea.style.height="50px";this.HtmlArea.style.background="transparent";this.HtmlArea.style.color="transparent";this.HtmlDiv.style.zIndex=0;this.HtmlDiv.style.border="none";this.isShow=false}},debugCalculatePlace:function(x,y){var _left=x;var _top=y;if(undefined==_left)_left=parseInt(this.HtmlDiv.style.left);if(undefined==_top)_top=parseInt(this.HtmlDiv.style.top);var _r_max=this.editorSdkW;var _b_max=this.editorSdkH;_r_max-=60;if(_r_max-_left>50)this.debugTexBoxMaxW= +_r_max-_left;else{_left=_r_max-50;this.debugTexBoxMaxW=50}_b_max-=40;if(_b_max-_top>50)this.debugTexBoxMaxH=_b_max-_top;else{_top=_b_max-50;this.debugTexBoxMaxH=50}if(AscCommon.AscBrowser.isSafari&&AscCommon.AscBrowser.isMobile)_left=-100;this.HtmlDiv.style.left=_left+"px";this.HtmlDiv.style.top=_top+"px";var _height=22;var _t=this.getAreaValue();if(0!=_t.length){var _editorSdk=document.getElementById("editor_sdk");var _p=document.createElement("p");_p.style.zIndex="-1";_p.style.position="absolute"; +_p.style.fontFamily="arial";_p.style.fontSize="12pt";_p.style.left="0px";_p.style.width=this.debugTexBoxMaxW+"px";_editorSdk.appendChild(_p);_t=_t.replace(/ /g," ");_p.innerHTML=""+_t+"";var _width=_p.firstChild.offsetWidth;_width=Math.min(_width+20,this.debugTexBoxMaxW);if(AscCommon.AscBrowser.isIE)_width+=10;var area=document.createElement("textarea");area.style.zIndex="-1";area.id="area2_id";area.rows=1;area.setAttribute("style","font-family:arial;font-size:12pt;position:absolute;resize:none;padding:0px;margin:0px;font-weight:normal;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;"); +area.style.overflow="hidden";area.style.width=_width+"px";_editorSdk.appendChild(area);area.value=this.getAreaValue();_height=area.clientHeight;if(area.scrollHeight>_height)_height=area.scrollHeight;_editorSdk.removeChild(_p);_editorSdk.removeChild(area)}if(_height>this.debugTexBoxMaxH)_height=this.debugTexBoxMaxH;this.HtmlDiv.style.width=_width+"px";this.HtmlDiv.style.height=_height+"px";var oldZindex=parseInt(this.HtmlDiv.style.zIndex);var newZindex=oldZindex==90?"89":"90";this.HtmlDiv.style.zIndex= +newZindex},onInput:function(e,isFromCompositionUpdate){if(this.Api.isLongAction()||this.Api.isViewMode){AscCommon.stopEvent(e);return false}if(this.isSystem){if(!this.isShow)this.show();this.debugCalculatePlace(undefined,undefined);return}if(this.isKeyPressOnUp&&this.keyPressOnUpCodes.length>0){if(!this.TextArea_Not_ContentEditableDiv)this.HtmlArea.innerHTML="";else this.HtmlArea.value="";this.TextBeforeComposition="";this.Text="";AscCommon.stopEvent(e);return false}this.log("ti: onInput");this.Text= +this.getAreaValue();this.Text=this.Text.split(" ").join(" ");var codes=[];if(this.IsComposition||this.ApiIsComposition){var ieStart=-1;var ieEnd=-1;if(true){var target=e.target;if(target["msGetInputContext"]){var ctx=target["msGetInputContext"]();if(ctx){ieStart=ctx["compositionStartOffset"];ieEnd=ctx["compositionEndOffset"]}}}this.CompositionEnd=this.Text.length;this.CompositionStart=this.TextBeforeComposition.length;var textReplace=this.Text.substr(this.CompositionStart);var iter;for(iter= +textReplace.getUnicodeIterator();iter.check();iter.next())codes.push(iter.value());var isAsync=AscFonts.FontPickerByCharacter.checkTextLight(codes,true);if(!isAsync){if(ieStart>this.CompositionStart){textReplace=textReplace.substr(0,ieStart-this.CompositionStart);codes=[];for(iter=textReplace.getUnicodeIterator();iter.check();iter.next())codes.push(iter.value());this.apiCompositeReplace(codes);this.apiCompositeEnd();this.TextBeforeComposition=this.Text.substr(0,ieStart);this.apiCompositeStart();this.CompositionStart= +ieStart;codes=[];textReplace=this.Text.substr(this.CompositionStart);for(iter=textReplace.getUnicodeIterator();iter.check();iter.next())codes.push(iter.value());this.apiCompositeReplace(codes)}else this.apiCompositeReplace(codes);if(!this.IsComposition){this.apiCompositeEnd();this.TextBeforeComposition=this.Text}}else{AscFonts.FontPickerByCharacter.loadFonts(this,function(){this.apiCompositeReplace(codes);this.apiCompositeEnd();this.clear();this.setReadOnly(false)});AscCommon.stopEvent(e);this.setReadOnly(true); +return false}}else{var textToApi=this.Text.substr(this.TextBeforeComposition.length);for(var iter=textToApi.getUnicodeIterator();iter.check();iter.next())codes.push(iter.value());if(codes.length>0)this.apiInputText(codes);this.TextBeforeComposition=this.Text}if(!this.IsComposition)if(this.Text.length>0){var _lastCode=this.Text.charCodeAt(this.Text.length-1);if(_lastCode==12290||_lastCode==46){AscCommon.stopEvent(e);if(AscCommon.AscBrowser.isIE&&!AscCommon.AscBrowser.isIeEdge)setTimeout(function(){window["AscCommon"].g_inputContext.clear(); +window["AscCommon"].g_inputContext.HtmlArea.focus()},0);else this.clear();return false}}},emulateNativeKeyDown:function(e,target){var oEvent=document.createEvent("KeyboardEvent");Object.defineProperty(oEvent,"keyCode",{get:function(){return this.keyCodeVal}});Object.defineProperty(oEvent,"which",{get:function(){return this.keyCodeVal}});Object.defineProperty(oEvent,"shiftKey",{get:function(){return this.shiftKeyVal}});Object.defineProperty(oEvent,"altKey",{get:function(){return this.altKeyVal}}); +Object.defineProperty(oEvent,"metaKey",{get:function(){return this.metaKeyVal}});Object.defineProperty(oEvent,"ctrlKey",{get:function(){return this.ctrlKeyVal}});if(AscCommon.AscBrowser.isIE)oEvent.preventDefault=function(){try{Object.defineProperty(this,"defaultPrevented",{get:function(){return true}})}catch(err){}};var k=e.keyCode;if(oEvent.initKeyboardEvent)oEvent.initKeyboardEvent("keydown",true,true,window,false,false,false,false,k,k);else oEvent.initKeyEvent("keydown",true,true,window,false, +false,false,false,k,0);oEvent.keyCodeVal=k;oEvent.shiftKeyVal=e.shiftKey;oEvent.altKeyVal=e.altKey;oEvent.metaKeyVal=e.metaKey;oEvent.ctrlKeyVal=e.ctrlKey;var _elem=target?target:_getElementKeyboardDown(this.nativeFocusElement,3);_elem.dispatchEvent(oEvent);return oEvent.defaultPrevented},isSpaceSymbol:function(e){if(e.keyCode==32)return true;if(e.keyCode==229&&(e.code=="space"||e.code=="Space"||e.key=="Spacebar"))return true;return false},systemInputEnable:function(isEnabled){if(this.isSystem==isEnabled)return; +this.isSystem=isEnabled;this.HtmlArea.style.left=this.isSystem?"0px":"-"+(this.HtmlAreaWidth>>1)+"px";this.clear();if(this.isShow)this.unshow(true);if(this.Api.WordControl&&this.Api.WordControl.m_oLogicDocument&&this.Api.WordControl.m_oLogicDocument.Document_UpdateSelectionState)this.Api.WordControl.m_oLogicDocument.Document_UpdateSelectionState()},debugInputEnable:function(isEnabled){if(this.isDebug==isEnabled)return;this.isDebug=isEnabled;this.HtmlArea.style.left=this.isDebug?"0px":"-"+(this.HtmlAreaWidth>> +1)+"px"},apiInputText:function(codes){var isAsync=AscFonts.FontPickerByCharacter.checkTextLight(codes,true);if(!isAsync){this.apiCompositeStart();this.apiCompositeReplace(codes);this.apiCompositeEnd()}else{AscFonts.FontPickerByCharacter.loadFonts(this,function(){this.apiCompositeStart();this.apiCompositeReplace(codes);this.apiCompositeEnd();this.setReadOnly(false)});this.setReadOnly(true);return false}},onKeyDown:function(e){if(this.Api.isLongAction()){AscCommon.stopEvent(e);return false}if(this.isInputHelpersPresent)switch(e.keyCode){case 9:case 13:case 38:case 40:case 33:case 34:case 35:case 36:case 27:{window.g_asc_plugins.onPluginEvent2("onKeyDown", +{"keyCode":e.keyCode},this.isInputHelpers);AscCommon.stopEvent(e);return false}case 32:{if(window.g_asc_plugins)window.g_asc_plugins.onPluginEvent("onInputHelperInput",{"text":this.keyPressInput})}default:break}else if(32==e.keyCode);if(this.isSystem&&this.isShow){if(e.keyCode==13){var text=this.getAreaValue();var codes=[];for(var iter=text.getUnicodeIterator();iter.check();iter.next())codes.push(iter.value());this.apiInputText(codes);this.clear();this.unshow();AscCommon.stopEvent(e);return false}else if(e.keyCode== +27){this.clear();this.unshow();AscCommon.stopEvent(e);return false}return}if(null!=this.nativeFocusElement)if(this.emulateNativeKeyDown(e)){e.preventDefault();return false}var _code=e.keyCode;if(_code!=8&&_code!=46)this.KeyDownFlag=true;AscCommon.check_KeyboardEvent(e);var arrCodes=this.Api.getAddedTextOnKeyDown(AscCommon.global_keyboardEvent);var isAsync=AscFonts.FontPickerByCharacter.checkTextLight(arrCodes,true);if(isAsync){AscFonts.FontPickerByCharacter.loadFonts(this,function(){this.onKeyDown(e); +this.onKeyUp(e);this.setReadOnly(false)});AscCommon.stopEvent(e);this.setReadOnly(true);return false}var ret=this.Api.onKeyDown(e);switch(e.keyCode){case 8:{var oldKeyPressInput=this.keyPressInput;this.clear();if(oldKeyPressInput.length>1){this.keyPressInput=oldKeyPressInput.substr(0,oldKeyPressInput.length-1);if(window.g_asc_plugins)window.g_asc_plugins.onPluginEvent("onInputHelperInput",{"text":this.keyPressInput})}return false}case 9:case 13:case 37:case 38:case 39:case 40:case 33:case 34:case 35:case 36:{this.clear(); return false}case 46:case 45:{if(!AscCommon.global_keyboardEvent.CtrlKey&&!AscCommon.global_keyboardEvent.ShiftKey){this.clear();return false}}default:break}if(e.keyCode==32&&AscCommon.global_keyboardEvent.CtrlKey&&!AscCommon.global_keyboardEvent.ShiftKey)if(window.g_asc_plugins)window.g_asc_plugins.onPluginEvent("onClick");return ret},onKeyPress:function(e){if(this.Api.isLongAction()||!this.Api.asc_IsFocus()||this.Api.isViewMode){AscCommon.stopEvent(e);return false}if(this.isSystem)return;if(this.KeyDownFlag)this.KeyPressFlag= true;if(this.IsComposition)return;if(e.which==13&&e.keyCode==13||e.which==10&&e.keyCode==10){AscCommon.stopEvent(e);return false}var c=e.which||e.keyCode;var isAsync=c>=32?AscFonts.FontPickerByCharacter.checkTextLight([c],true):false;if(isAsync){AscFonts.FontPickerByCharacter.loadFonts(this,function(){this.apiCompositeStart();this.apiCompositeReplace([c]);this.apiCompositeEnd();this.setReadOnly(false)});AscCommon.stopEvent(e);this.setReadOnly(true);return false}if(this.isKeyPressOnUp){var isSaveCode= true;switch(e.which){case 46:{isSaveCode=false;break}default:break}if(isSaveCode){if(this.isKeyPressOnUpStackedMode)this.keyPressOnUpCodes.push({which:e.which,charCode:e.charCode,keyCode:e.keyCode,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey,preventDefault:function(){}});return}}var ret=this.Api.onKeyPress(e);switch(e.which){case 46:{AscCommon.stopEvent(e);this.clear();return false}default:break}this.keyPressInput+=String.fromCharCode(e.which);if(window.g_asc_plugins)window.g_asc_plugins.onPluginEvent("onInputHelperInput", diff --git a/www/common/onlyoffice/v5/sdkjs/word/sdk-all-min.js b/www/common/onlyoffice/v5/sdkjs/word/sdk-all-min.js index 431a7f3f1..947a79ccb 100644 --- a/www/common/onlyoffice/v5/sdkjs/word/sdk-all-min.js +++ b/www/common/onlyoffice/v5/sdkjs/word/sdk-all-min.js @@ -1,5 +1,5 @@ /* - * Copyright (C) Ascensio System SIA 2012-2021. All rights reserved + * Copyright (C) Ascensio System SIA 2012-2022. All rights reserved * * https://www.onlyoffice.com/ * @@ -1677,7 +1677,7 @@ function(){this.isPreOpenLocks=false;for(var i=0;i-1;--index)if(this.flowTables[index].IsPointIn(x,y)&&this.flowTables[index].CheckDocumentContent(documentContent))return this.flowTables[index];return null},delObjectById:function(id){var oDrawing=AscCommon.g_oTableId.Get_ById(id);if(oDrawing){var drawing_array;var Type=oDrawing.getDrawingArrayType();if(Type===DRAWING_ARRAY_TYPE_INLINE)drawing_array=this.inlineObjects;else if(Type===DRAWING_ARRAY_TYPE_BEHIND)drawing_array=this.behindDocObjects; -else drawing_array=this.beforeTextObjects;for(var index=0;index-1;--i)if(!drawingArray[i].parent||drawingArray[i].parent.DocumentContent===docContent|| -b_is_top_doc&&drawingArray[i].parent.DocumentContent.Is_TopDocument(true)===docContent)drawingArray.splice(i,1)}function findTableInArrayAndRemove(drawingArray,docContent,document){if(docContent===document){drawingArray.length=0;return}for(var i=drawingArray.length-1;i>-1;--i)if(drawingArray[i].Table.Parent.GetDocumentContentForRecalcInfo()===docContent)drawingArray.splice(i,1)}function findInArrayAndRemoveFromDrawingPage(drawingPage,docContent,document){if(!drawingPage)return;if(Array.isArray(drawingPage.inlineObjects)){findInArrayAndRemove(drawingPage.inlineObjects, +y,documentContent){for(var index=this.flowTables.length-1;index>-1;--index)if(this.flowTables[index].IsPointIn(x,y)&&this.flowTables[index].CheckDocumentContent(documentContent))return this.flowTables[index];return null},delObjectById:function(id){var oDrawing=AscCommon.g_oTableId.Get_ById(id);if(oDrawing&&oDrawing.getDrawingArrayType){var drawing_array;var Type=oDrawing.getDrawingArrayType();if(Type===DRAWING_ARRAY_TYPE_INLINE)drawing_array=this.inlineObjects;else if(Type===DRAWING_ARRAY_TYPE_BEHIND)drawing_array= +this.behindDocObjects;else drawing_array=this.beforeTextObjects;for(var index=0;index-1;--i)if(!drawingArray[i].parent||drawingArray[i].parent.DocumentContent=== +docContent||b_is_top_doc&&drawingArray[i].parent.DocumentContent.Is_TopDocument(true)===docContent)drawingArray.splice(i,1)}function findTableInArrayAndRemove(drawingArray,docContent,document){if(docContent===document){drawingArray.length=0;return}for(var i=drawingArray.length-1;i>-1;--i)if(drawingArray[i].Table.Parent.GetDocumentContentForRecalcInfo()===docContent)drawingArray.splice(i,1)}function findInArrayAndRemoveFromDrawingPage(drawingPage,docContent,document){if(!drawingPage)return;if(Array.isArray(drawingPage.inlineObjects)){findInArrayAndRemove(drawingPage.inlineObjects, docContent,document);findInArrayAndRemove(drawingPage.behindDocObjects,docContent,document);findInArrayAndRemove(drawingPage.beforeTextObjects,docContent,document);findTableInArrayAndRemove(drawingPage.flowTables,docContent,document)}}if(!AscCommon.isRealObject(docContent))docContent=this.graphicObjects.document;findInArrayAndRemoveFromDrawingPage(this,docContent,editor.WordControl.m_oLogicDocument)},draw:function(graphics){for(var _object_index=0;_object_index");if(-1!= -nIndex)_html_format=_html_format.substring(0,nIndex+"".length);this.CommonIframe_PasteStart(_html_format,_text_format);return false}if(_text_format&&_text_format!=""){this.Api.asc_PasteData(AscCommon.c_oAscClipboardDataFormat.Text,_text_format);g_clipboardBase.Paste_End();return false}var items=_clipboard.items;if(null!=items&&0!=items.length){g_clipboardBase.PasteImagesBody="";g_clipboardBase.PasteImagesCount=items.length;g_clipboardBase.PasteImagesCounter=0;for(var i=0;i';if(g_clipboardBase.PasteImagesCounter==g_clipboardBase.PasteImagesCount){g_clipboardBase.CommonIframe_PasteStart(""+g_clipboardBase.PasteImagesBody+"");g_clipboardBase.PasteImagesBody="";g_clipboardBase.PasteImagesCounter=0;g_clipboardBase.PasteImagesCount= -0}};reader.onabort=reader.onerror=function(e){g_clipboardBase.PasteImagesCounter++;if(g_clipboardBase.PasteImagesCounter==g_clipboardBase.PasteImagesCount){g_clipboardBase.CommonIframe_PasteStart(""+g_clipboardBase.PasteImagesBody+"");g_clipboardBase.PasteImagesBody="";g_clipboardBase.PasteImagesCounter=0;g_clipboardBase.PasteImagesCount=0}};try{reader.readAsDataURL(blob)}catch(err){g_clipboardBase.PasteImagesCounter++}}else g_clipboardBase.PasteImagesCounter++;if(g_clipboardBase.PasteImagesCounter== -g_clipboardBase.PasteImagesCount)g_clipboardBase.Paste_End();return false}}g_clipboardBase.Paste_End();return false},_private_onbeforepaste:function(e,isAttackEmulate){this._console_log("onbeforepaste");if(!this.Api.asc_IsFocus(true))return;{this.CommonDiv=this.CommonDiv_Check();this.CommonDiv_Start();this.CommonDiv.focus();this.StartFocus();this.CommonDiv_Select();return}return false},_private_onbeforecopy_select:function(){if(AscBrowser.isIE){this._console_log("onbeforecopy_select");this.CommonDiv= -this.CommonDiv_Check();this.CommonDiv_Start();this.CommonDiv.innerHTML=" ";this.CommonDiv.focus();this.StartFocus();this.CommonDiv_Select()}},_private_onbeforecopy:function(e,isAttackEmulate){this._console_log("onbeforecopy");if(!this.Api.asc_IsFocus(true))return;{this.CommonDiv=this.CommonDiv_Check();this.CommonDiv_Start();this.CommonDiv.innerHTML=" ";this.CommonDiv.focus();this.StartFocus();this.CommonDiv_Select()}return false},Init:function(_api){this.Api=_api;window["AscCommon"].g_specialPasteHelper.Init(_api); -this.ClosureParams.getData=function(type){var _clipboard=this._e&&this._e.clipboardData?this._e.clipboardData:window.clipboardData;if(!_clipboard||!_clipboard.getData)return null;var _type=type;if(AscBrowser.isIE&&(type=="text"||type=="text/plain"))_type="Text";try{return _clipboard.getData(_type)}catch(e){}return null};this.ClosureParams.setData=function(type,_data){var _clipboard=this._e&&this._e.clipboardData?this._e.clipboardData:window.clipboardData;if(!_clipboard||!_clipboard.setData)return null; -var _type=type;if(AscBrowser.isIE&&(type=="text"||type=="text/plain"))_type="Text";try{_clipboard.setData(_type,_data)}catch(e){}};if(!AscBrowser.isIE){document.oncopy=function(e){return g_clipboardBase._private_oncopy(e)};document.oncut=function(e){return g_clipboardBase._private_oncut(e)};document.onpaste=function(e){return g_clipboardBase._private_onpaste(e)};document["onbeforecopy"]=function(e){return g_clipboardBase._private_onbeforecopy(e)};document["onbeforecut"]=function(e){return g_clipboardBase._private_onbeforecopy(e)}; -document["onbeforepaste"]=function(e){return g_clipboardBase._private_onbeforepaste(e)}}else{document.addEventListener("copy",function(e){return g_clipboardBase._private_oncopy(e)});document.addEventListener("cut",function(e){return g_clipboardBase._private_oncut(e)});document.addEventListener("paste",function(e){return g_clipboardBase._private_onpaste(e)});document.addEventListener("beforepaste",function(e){return g_clipboardBase._private_onbeforepaste(e)});document.addEventListener("beforecopy", -function(e){return g_clipboardBase._private_onbeforecopy(e)});document.addEventListener("beforecut",function(e){return g_clipboardBase._private_onbeforecopy(e)})}if(this.IsCopyCutOnlyInEditable||this.IsPasteOnlyInEditable)document.onkeydown=function(e){if(!g_clipboardBase.Api.asc_IsFocus(true)||g_clipboardBase.Api.isLongAction())return;var isAltGr=AscCommon.getAltGr(e);if(isAltGr)return;var isCtrl=e.ctrlKey===true||e.metaKey===true;var isShift=e.shiftKey;var keyCode=e.keyCode;if(g_clipboardBase.IsCopyCutOnlyInEditable){var bIsBeforeCopyCutEmulate= -false;var _cut=false;if(isCtrl&&!isShift&&(keyCode==67||keyCode==88))bIsBeforeCopyCutEmulate=true;if(!isCtrl&&isShift&&keyCode==45){bIsBeforeCopyCutEmulate=true;_cut=true}if(bIsBeforeCopyCutEmulate){g_clipboardBase._console_log("emulate_beforecopycut");var isEmulate=false;try{isEmulate=_cut?document.execCommand("beforecut"):document.execCommand("beforecopy")}catch(err){}g_clipboardBase._private_onbeforecopy(undefined,!isEmulate)}}if(g_clipboardBase.IsPasteOnlyInEditable){var bIsBeforePasteEmulate= -false;if(isCtrl&&!isShift&&keyCode==86)bIsBeforePasteEmulate=true;if(!isCtrl&&isShift&&keyCode==45)bIsBeforePasteEmulate=true;if(bIsBeforePasteEmulate){g_clipboardBase._console_log("emulate_beforepaste");var isEmulate=false;try{isEmulate=document.execCommand("beforepaste")}catch(err$9){}g_clipboardBase._private_onbeforepaste(undefined,!isEmulate)}}};if(AscBrowser.isSafari&&false){this.CommonDiv=this.CommonDiv_Check();setInterval(function(){if(g_clipboardBase.Api.asc_IsFocus(true))g_clipboardBase.CommonDiv.focus()}, -100)}},IsWorking:function(){return this.CopyFlag||this.PasteFlag?true:false},StartFocus:function(){this.EndFocus(false);this.CopyPasteFocus=true;this.CopyPasteFocusTimer=setTimeout(function(){g_clipboardBase.EndFocus()},1E3)},EndFocus:function(isFocusToEditor){this.CopyPasteFocus=false;if(-1!=this.CopyPasteFocusTimer){clearTimeout(this.CopyPasteFocusTimer);this.CopyPasteFocusTimer=-1;if(false!==isFocusToEditor&&null!=this.inputContext)if(this.inputContext.HtmlArea)this.inputContext.HtmlArea.focus()}}, -IsFocus:function(){return this.CopyPasteFocus},CommonDiv_Check:function(){var ElemToSelect=document.getElementById(this.CommonDivId);if(!ElemToSelect){ElemToSelect=document.createElement("div");ElemToSelect.id=this.CommonDivId;ElemToSelect.className=this.CommonDivClassName;ElemToSelect.style.position="fixed";ElemToSelect.style.left="0px";ElemToSelect.style.top="-100px";ElemToSelect.style.width="10000px";ElemToSelect.style.height="100px";ElemToSelect.style.overflow="hidden";ElemToSelect.style.zIndex= --1E3;ElemToSelect.style.MozUserSelect="text";ElemToSelect.style.fontFamily="onlyofficeDefaultFont";ElemToSelect.style.fontSize="11pt";ElemToSelect.style.color="black";ElemToSelect.style["-khtml-user-select"]="text";ElemToSelect.style["-o-user-select"]="text";ElemToSelect.style["user-select"]="text";ElemToSelect.style["-webkit-user-select"]="text";ElemToSelect.setAttribute("contentEditable",this.isCopyOutEnabled());var _parent=""==this.CommonDivIdParent?document.body:document.getElementById(this.CommonDivIdParent); -_parent.appendChild(ElemToSelect)}else ElemToSelect.setAttribute("contentEditable",this.isCopyOutEnabled());return ElemToSelect},CommonDiv_Select:function(){var ElemToSelect=this.CommonDiv;if(window.getSelection){var selection=window.getSelection();var rangeToSelect=document.createRange();var is_gecko=AscBrowser.isGecko;if(is_gecko){ElemToSelect.appendChild(document.createTextNode("\u00a0"));ElemToSelect.insertBefore(document.createTextNode("\u00a0"),ElemToSelect.firstChild);rangeToSelect.setStartAfter(ElemToSelect.firstChild); -rangeToSelect.setEndBefore(ElemToSelect.lastChild)}else{var aChildNodes=ElemToSelect.childNodes;if(aChildNodes.length==1){var elem=aChildNodes[0];var wrap=document.createElement("b");wrap.setAttribute("style","font-weight:normal; background-color: transparent; color: transparent;");elem=ElemToSelect.removeChild(elem);wrap.appendChild(elem);ElemToSelect.appendChild(wrap)}rangeToSelect.selectNodeContents(ElemToSelect)}selection.removeAllRanges();selection.addRange(rangeToSelect)}else if(document.body.createTextRange){var rangeToSelect= -document.body.createTextRange();rangeToSelect.moveToElementText(ElemToSelect);rangeToSelect.select()}},CommonDiv_Start:function(){this.ClosureParams.overflowBody=document.body.style.overflow;document.body.style.overflow="hidden";this.ClosureParams.backgroundcolorBody=document.body.style["background-color"];document.body.style["background-color"]="transparent";var ElemToSelect=this.CommonDiv;ElemToSelect.style.display="block";while(ElemToSelect.hasChildNodes())ElemToSelect.removeChild(ElemToSelect.lastChild); -document.body.style.MozUserSelect="text";delete document.body.style["-khtml-user-select"];delete document.body.style["-o-user-select"];delete document.body.style["user-select"];document.body.style["-webkit-user-select"]="text";ElemToSelect.style.MozUserSelect="all"},CommonDiv_End:function(){var ElemToSelect=this.CommonDiv;if(ElemToSelect){ElemToSelect.style.display=AscBrowser.isSafari?"block":"none";ElemToSelect.style.MozUserSelect="none"}document.body.style.MozUserSelect="none";document.body.style["-khtml-user-select"]= -"none";document.body.style["-o-user-select"]="none";document.body.style["user-select"]="none";document.body.style["-webkit-user-select"]="none";document.body.style["background-color"]=this.ClosureParams.backgroundcolorBody;document.body.style.overflow=this.ClosureParams.overflowBody;this.CopyFlag=false;this.bCut=false;this.EndFocus()},CommonDiv_Copy:function(){this.CopyFlag=true;this.CommonDiv=this.CommonDiv_Check();this.CommonDiv_Start();this.ClosureParams.isDivCopy=true;this.DivOnCopyHtmlPresent= -false;this.DivOnCopyText="";this.LastCopyBinary=null;this.checkCopy(AscCommon.c_oAscClipboardDataFormat.Text|AscCommon.c_oAscClipboardDataFormat.Html|AscCommon.c_oAscClipboardDataFormat.Internal);this.ClosureParams.isDivCopy=false;if(!this.DivOnCopyHtmlPresent&&this.DivOnCopyText!="")this.CommonDiv.innerHTML=this.DivOnCopyText;this.DivOnCopyHtmlPresent=false;this.DivOnCopyText="";this.CommonDiv_Select();window.setTimeout(function(){g_clipboardBase.CommonDiv_End()},0)},CommonDiv_Execute_CopyCut:function(){if(this.IsCopyCutOnlyInEditable)this._private_onbeforecopy(undefined, -true)},CommonIframe_PasteStart:function(_html_data,text_data){var ifr=document.getElementById(this.CommonIframeId);if(!ifr){ifr=document.createElement("iframe");ifr.name=this.CommonIframeId;ifr.id=this.CommonIframeId;ifr.style.position="absolute";ifr.style.top="-100px";ifr.style.left="0px";ifr.style.width="10000px";ifr.style.height="100px";ifr.style.overflow="hidden";ifr.style.zIndex=-1E3;ifr.setAttribute("sandbox","allow-same-origin");document.body.appendChild(ifr);this.CommonIframe=ifr}else ifr.style.width= -"10000px";var frameWindow=window.frames[this.CommonIframeId];if(frameWindow){frameWindow.document.open();frameWindow.document.write(_html_data);frameWindow.document.close();if(null!=frameWindow.document&&null!=frameWindow.document.body){ifr.style.display="block";this.pastedFrom=definePastedFrom(frameWindow.document);this.Api.asc_PasteData(AscCommon.c_oAscClipboardDataFormat.HtmlElement,frameWindow.document.body,ifr,text_data)}}ifr.style.width="100px";g_clipboardBase.Paste_End()},CommonIframe_PasteEnd:function(){if(this.CommonIframe&& -this.CommonIframe.style.display!="none"){this.CommonIframe.blur();this.CommonIframe.style.display="none"}},Paste_End:function(){this.CommonIframe_PasteEnd();this.Api.decrementCounterLongAction();this.PasteFlag=false;this.EndFocus();if(this.needClearBuffer){this.ClearBuffer();this.needClearBuffer=false}},pushData:function(_format,_data){if(null==this.LastCopyBinary)this.LastCopyBinary=[];this.LastCopyBinary.push({type:_format,data:_data});if(this.ClosureParams.isDivCopy===true){if(!this.isCopyOutEnabled())return; -if(_format==AscCommon.c_oAscClipboardDataFormat.Html){this.CommonDiv.innerHTML=_data;this.DivOnCopyHtmlPresent=true}if(_format==AscCommon.c_oAscClipboardDataFormat.Text)this.DivOnCopyText=_data;return}var _data_format="";switch(_format){case AscCommon.c_oAscClipboardDataFormat.Html:_data_format="text/html";break;case AscCommon.c_oAscClipboardDataFormat.Text:_data_format="text/plain";break;case AscCommon.c_oAscClipboardDataFormat.Internal:_data_format="text/x-custom";break;default:break}if(_data_format!= -""&&_data!==null&&this.isCopyOutEnabled())if(_data_format=="text/x-custom")this.ClosureParams.setData(_data_format,"asc_internalData2;"+_data);else this.ClosureParams.setData(_data_format,_data)},Button_Copy:function(){if(this.inputContext){if(this.inputContext.isHardCheckKeyboard)this.inputContext.enableVirtualKeyboard_Hard();this.inputContext.HtmlArea.focus()}this.Api.asc_enableKeyEvents(true,true);this.CommonDiv_Execute_CopyCut();var _ret=false;try{_ret=document.execCommand("copy")}catch(err){_ret= -false}if(!_ret){this.LastCopyBinary=null;this.checkCopy(AscCommon.c_oAscClipboardDataFormat.Text|AscCommon.c_oAscClipboardDataFormat.Html|AscCommon.c_oAscClipboardDataFormat.Internal)}return _ret},Button_Cut:function(){if(this.inputContext){if(this.inputContext.isHardCheckKeyboard)this.inputContext.enableVirtualKeyboard_Hard();this.inputContext.HtmlArea.focus()}this.Api.asc_enableKeyEvents(true,true);this.CommonDiv_Execute_CopyCut();var _ret=false;try{_ret=document.execCommand("cut")}catch(err){_ret= -false}if(!_ret){this.LastCopyBinary=null;this.bCut=true;this.checkCopy(AscCommon.c_oAscClipboardDataFormat.Text|AscCommon.c_oAscClipboardDataFormat.Html|AscCommon.c_oAscClipboardDataFormat.Internal);this.Api.asc_SelectionCut();this.bCut=false}return _ret},Button_Paste:function(){if(this.inputContext){if(this.inputContext.isHardCheckKeyboard)this.inputContext.enableVirtualKeyboard_Hard();this.inputContext.HtmlArea.focus()}this.Api.asc_enableKeyEvents(true,true);var _ret=false;try{_ret=document.execCommand("paste")}catch(err){_ret= -false}if(!_ret&&null!=this.LastCopyBinary){var _data=null;var _isInternal=false;for(var i=0;i0)this.Api.asc_PasteData(this.LastCopyBinary[0].type,this.LastCopyBinary[0].data)}return _ret},ClearBuffer:function(){if(-1!=this.clearBufferTimerId)clearTimeout(this.clearBufferTimerId); -this.clearBufferTimerId=setTimeout(function(){if(AscCommon.g_clipboardBase)AscCommon.g_clipboardBase.clearBufferTimerId=-1},500);this.Button_Copy()},isCopyOutEnabled:function(){if(this.Api&&this.Api.isCopyOutEnabled)return this.Api.isCopyOutEnabled();return true}};function definePastedFrom(doc){if(!doc)return null;var res=null;var metaTags=doc.getElementsByTagName("meta");for(var i=0;i>1)+"px;top:"+-this.HtmlAreaOffset+"px;";_style+="background:transparent;border:none;position:absolute;text-shadow:0 0 0 #000;outline:none;color:transparent;width:"+this.HtmlAreaWidth+"px;height:50px;";_style+="overflow:hidden;padding:0px;margin:0px;font-family:arial;resize:none;font-weight:normal;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;"; -_style+="touch-action: none;-webkit-touch-callout: none;color:transparent;caret-color:transparent;";_style+=AscCommon.AscBrowser.isAppleDevices?"font-size:0px;":"font-size:8px;";this.HtmlArea.setAttribute("style",_style);this.HtmlArea.setAttribute("spellcheck",false);this.HtmlArea.setAttribute("autocapitalize","none");this.HtmlArea.setAttribute("autocomplete","off");this.HtmlArea.setAttribute("autocorrect","off");this.HtmlDiv.appendChild(this.HtmlArea);if(true){var oHtmlDivScrollable=document.createElement("div"); -oHtmlDivScrollable.id="area_id_main";oHtmlDivScrollable.setAttribute("style","background:transparent;border:none;position:absolute;padding:0px;margin:0px;z-index:0;pointer-events:none;");var parentStyle=getComputedStyle(oHtmlParent);oHtmlDivScrollable.style.left=parentStyle.left;oHtmlDivScrollable.style.top=parentStyle.top;oHtmlDivScrollable.style.width=parentStyle.width;oHtmlDivScrollable.style.height=parentStyle.height;oHtmlDivScrollable.style.overflow="hidden";oHtmlDivScrollable.appendChild(this.HtmlDiv); -oHtmlParent.parentNode.appendChild(oHtmlDivScrollable)}else oHtmlParent.appendChild(this.HtmlDiv);var oThis=this;this.HtmlArea["onkeydown"]=function(e){if(AscCommon.AscBrowser.isSafariMacOs){var cmdButton=e.ctrlKey||e.metaKey?true:false;var buttonCode=e.keyCode==67||e.keyCode==88||e.keyCode==86;if(cmdButton&&buttonCode)oThis.IsDisableKeyPress=true;else oThis.IsDisableKeyPress=false}return oThis.onKeyDown(e)};this.HtmlArea["onkeypress"]=function(e){if(oThis.IsDisableKeyPress==true){oThis.IsDisableKeyPress= -false;var cmdButton=e.ctrlKey||e.metaKey?true:false;if(cmdButton)return}return oThis.onKeyPress(e)};this.HtmlArea["onkeyup"]=function(e){oThis.IsDisableKeyPress=false;return oThis.onKeyUp(e)};this.HtmlArea.addEventListener("input",function(e){return oThis.onInput(e)},false);this.HtmlArea.addEventListener("compositionstart",function(e){return oThis.onCompositionStart(e)},false);this.HtmlArea.addEventListener("compositionupdate",function(e){return oThis.onCompositionUpdate(e)},false);this.HtmlArea.addEventListener("compositionend", -function(e){return oThis.onCompositionEnd(e)},false);this.show();this.Api.Input_UpdatePos();if(AscCommon.AscBrowser.isAndroid)this.HtmlArea.onclick=function(e){var _this=AscCommon.g_inputContext;if(-1!=_this.virtualKeyboardClickTimeout){clearTimeout(_this.virtualKeyboardClickTimeout);_this.virtualKeyboardClickTimeout=-1}_this.apiCompositeEnd();if(!_this.virtualKeyboardClickPrevent)return;_this.setReadOnlyWrapper(true);_this.virtualKeyboardClickPrevent=false;AscCommon.stopEvent(e);_this.virtualKeyboardClickTimeout= -setTimeout(function(){_this.setReadOnlyWrapper(false);_this.virtualKeyboardClickTimeout=-1},1);return false}},onResize:function(_editorContainerId){var _elem=document.getElementById("area_id_main");var _elemSrc=document.getElementById(_editorContainerId);if(!_elem||!_elemSrc)return;if(AscCommon.AscBrowser.isChrome){var rectObject=_elemSrc.getBoundingClientRect();this.FixedPosCheckElementX=rectObject.left;this.FixedPosCheckElementY=rectObject.top}var _width=_elemSrc.style.width;if((null==_width||""== -_width)&&window.getComputedStyle){var _s=window.getComputedStyle(_elemSrc);_elem.style.left=_s.left;_elem.style.top=_s.top;_elem.style.width=_s.width;_elem.style.height=_s.height}else{_elem.style.left=_elemSrc.style.left;_elem.style.top=_elemSrc.style.top;_elem.style.width=_width;_elem.style.height=_elemSrc.style.height}if(this.Api.isMobileVersion){var _elem1=document.getElementById("area_id_parent");var _elem2=document.getElementById("area_id");_elem1.parentNode.style.pointerEvents="";_elem1.style.left= -"0px";_elem1.style.top="-1000px";_elem1.style.right="0px";_elem1.style.bottom="-100px";_elem1.style.width="auto";_elem1.style.height="auto";_elem2.style.left="0px";_elem2.style.top="0px";_elem2.style.right="0px";_elem2.style.bottom="0px";_elem2.style.width="100%";_elem2.style.height="100%";if(AscCommon.AscBrowser.isIE){document.body.style["msTouchAction"]="none";document.body.style["touchAction"]="none"}}var _editorSdk=document.getElementById("editor_sdk");this.editorSdkW=_editorSdk.clientWidth;this.editorSdkH= -_editorSdk.clientHeight},checkFocus:function(){if(this.Api.asc_IsFocus()&&!AscCommon.g_clipboardBase.IsFocus()&&!AscCommon.g_clipboardBase.IsWorking())if(document.activeElement!=this.HtmlArea)this.HtmlArea.focus()},move:function(x,y){if(this.Api.isMobileVersion)return;var oTarget=document.getElementById(this.TargetId);if(!oTarget)return;var xPos=x?x:parseInt(oTarget.style.left);var yPos=(y?y:parseInt(oTarget.style.top))+parseInt(oTarget.style.height);if(AscCommon.AscBrowser.isSafari&&AscCommon.AscBrowser.isMobile)xPos= --100;if(!this.isDebug&&!this.isSystem){this.HtmlDiv.style.left=xPos+this.FixedPosCheckElementX+"px";this.HtmlDiv.style.top=yPos+this.FixedPosCheckElementY+this.TargetOffsetY+this.HtmlAreaOffset+"px";this.HtmlArea.scrollTop=this.HtmlArea.scrollHeight}else this.debugCalculatePlace(xPos+this.FixedPosCheckElementX,yPos+this.FixedPosCheckElementY+this.TargetOffsetY);if(window.g_asc_plugins)window.g_asc_plugins.onPluginEvent("onTargetPositionChanged")},emulateKeyDownApi:function(code){var _e={altKey:false, -ctrlKey:false,shiftKey:false,target:null,charCode:0,which:code,keyCode:code,code:"",preventDefault:function(){},stopPropagation:function(){}};this.Api.onKeyDown(_e);this.Api.onKeyUp(_e)},clear:function(isFromFocus){if(!this.TextArea_Not_ContentEditableDiv)this.HtmlArea.innerHTML="";else this.HtmlArea.value="";if(isFromFocus!==true)this.HtmlArea.focus();this.TextBeforeComposition="";this.Text="";this.Target=0;this.CompositionStart=0;this.CompositionEnd=0;this.IsComposition=false;this.keyPressInput= -"";if(window.g_asc_plugins)window.g_asc_plugins.onPluginEvent("onInputHelperClear")},getAreaValue:function(){return this.TextArea_Not_ContentEditableDiv?this.HtmlArea.value:this.HtmlArea.innerText},setReadOnly:function(isLock){if(isLock)this.ReadOnlyCounter++;else this.ReadOnlyCounter--;this.setReadOnlyWrapper(0>=this.ReadOnlyCounter?false:true)},setReadOnlyWrapper:function(val){this.HtmlArea.readOnly=this.Api.isViewMode?true:val},show:function(){if(this.isDebug||this.isSystem){this.log("ti: show"); -document.getElementById("area_id_main").style.zIndex=10;this.HtmlArea.style.top="0px";this.HtmlArea.style.width="100%";this.HtmlArea.style.height="100%";this.HtmlArea.style.background="#FFFFFF";this.HtmlArea.style.color="black";this.HtmlDiv.style.zIndex=90;this.HtmlDiv.style.border="2px solid #4363A4";this.isShow=true}},unshow:function(isAttack){if(this.isDebug||this.isSystem||true==isAttack){this.log("ti: unshow");document.getElementById("area_id_main").style.zIndex=0;this.HtmlArea.style.top=-this.HtmlAreaOffset+ -"px";this.HtmlArea.style.width="1000px";this.HtmlArea.style.height="50px";this.HtmlArea.style.background="transparent";this.HtmlArea.style.color="transparent";this.HtmlDiv.style.zIndex=0;this.HtmlDiv.style.border="none";this.isShow=false}},debugCalculatePlace:function(x,y){var _left=x;var _top=y;if(undefined==_left)_left=parseInt(this.HtmlDiv.style.left);if(undefined==_top)_top=parseInt(this.HtmlDiv.style.top);var _r_max=this.editorSdkW;var _b_max=this.editorSdkH;_r_max-=60;if(_r_max-_left>50)this.debugTexBoxMaxW= -_r_max-_left;else{_left=_r_max-50;this.debugTexBoxMaxW=50}_b_max-=40;if(_b_max-_top>50)this.debugTexBoxMaxH=_b_max-_top;else{_top=_b_max-50;this.debugTexBoxMaxH=50}if(AscCommon.AscBrowser.isSafari&&AscCommon.AscBrowser.isMobile)_left=-100;this.HtmlDiv.style.left=_left+"px";this.HtmlDiv.style.top=_top+"px";var _height=22;var _t=this.getAreaValue();if(0!=_t.length){var _editorSdk=document.getElementById("editor_sdk");var _p=document.createElement("p");_p.style.zIndex="-1";_p.style.position="absolute"; -_p.style.fontFamily="arial";_p.style.fontSize="12pt";_p.style.left="0px";_p.style.width=this.debugTexBoxMaxW+"px";_editorSdk.appendChild(_p);_t=_t.replace(/ /g," ");_p.innerHTML=""+_t+"";var _width=_p.firstChild.offsetWidth;_width=Math.min(_width+20,this.debugTexBoxMaxW);if(AscCommon.AscBrowser.isIE)_width+=10;var area=document.createElement("textarea");area.style.zIndex="-1";area.id="area2_id";area.rows=1;area.setAttribute("style","font-family:arial;font-size:12pt;position:absolute;resize:none;padding:0px;margin:0px;font-weight:normal;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;"); -area.style.overflow="hidden";area.style.width=_width+"px";_editorSdk.appendChild(area);area.value=this.getAreaValue();_height=area.clientHeight;if(area.scrollHeight>_height)_height=area.scrollHeight;_editorSdk.removeChild(_p);_editorSdk.removeChild(area)}if(_height>this.debugTexBoxMaxH)_height=this.debugTexBoxMaxH;this.HtmlDiv.style.width=_width+"px";this.HtmlDiv.style.height=_height+"px";var oldZindex=parseInt(this.HtmlDiv.style.zIndex);var newZindex=oldZindex==90?"89":"90";this.HtmlDiv.style.zIndex= -newZindex},onInput:function(e,isFromCompositionUpdate){if(this.Api.isLongAction()||this.Api.isViewMode){AscCommon.stopEvent(e);return false}if(this.isSystem){if(!this.isShow)this.show();this.debugCalculatePlace(undefined,undefined);return}if(this.isKeyPressOnUp&&this.keyPressOnUpCodes.length>0){if(!this.TextArea_Not_ContentEditableDiv)this.HtmlArea.innerHTML="";else this.HtmlArea.value="";this.TextBeforeComposition="";this.Text="";AscCommon.stopEvent(e);return false}this.log("ti: onInput");this.Text= -this.getAreaValue();this.Text=this.Text.split(" ").join(" ");var codes=[];if(this.IsComposition||this.ApiIsComposition){var ieStart=-1;var ieEnd=-1;if(true){var target=e.target;if(target["msGetInputContext"]){var ctx=target["msGetInputContext"]();if(ctx){ieStart=ctx["compositionStartOffset"];ieEnd=ctx["compositionEndOffset"]}}}this.CompositionEnd=this.Text.length;this.CompositionStart=this.TextBeforeComposition.length;var textReplace=this.Text.substr(this.CompositionStart);var iter;for(iter= -textReplace.getUnicodeIterator();iter.check();iter.next())codes.push(iter.value());var isAsync=AscFonts.FontPickerByCharacter.checkTextLight(codes,true);if(!isAsync){if(ieStart>this.CompositionStart){textReplace=textReplace.substr(0,ieStart-this.CompositionStart);codes=[];for(iter=textReplace.getUnicodeIterator();iter.check();iter.next())codes.push(iter.value());this.apiCompositeReplace(codes);this.apiCompositeEnd();this.TextBeforeComposition=this.Text.substr(0,ieStart);this.apiCompositeStart();this.CompositionStart= -ieStart;codes=[];textReplace=this.Text.substr(this.CompositionStart);for(iter=textReplace.getUnicodeIterator();iter.check();iter.next())codes.push(iter.value());this.apiCompositeReplace(codes)}else this.apiCompositeReplace(codes);if(!this.IsComposition){this.apiCompositeEnd();this.TextBeforeComposition=this.Text}}else{AscFonts.FontPickerByCharacter.loadFonts(this,function(){this.apiCompositeReplace(codes);this.apiCompositeEnd();this.clear();this.setReadOnly(false)});AscCommon.stopEvent(e);this.setReadOnly(true); -return false}}else{var textToApi=this.Text.substr(this.TextBeforeComposition.length);for(var iter=textToApi.getUnicodeIterator();iter.check();iter.next())codes.push(iter.value());if(codes.length>0)this.apiInputText(codes);this.TextBeforeComposition=this.Text}if(!this.IsComposition)if(this.Text.length>0){var _lastCode=this.Text.charCodeAt(this.Text.length-1);if(_lastCode==12290||_lastCode==46){AscCommon.stopEvent(e);if(AscCommon.AscBrowser.isIE&&!AscCommon.AscBrowser.isIeEdge)setTimeout(function(){window["AscCommon"].g_inputContext.clear(); -window["AscCommon"].g_inputContext.HtmlArea.focus()},0);else this.clear();return false}}},emulateNativeKeyDown:function(e,target){var oEvent=document.createEvent("KeyboardEvent");Object.defineProperty(oEvent,"keyCode",{get:function(){return this.keyCodeVal}});Object.defineProperty(oEvent,"which",{get:function(){return this.keyCodeVal}});Object.defineProperty(oEvent,"shiftKey",{get:function(){return this.shiftKeyVal}});Object.defineProperty(oEvent,"altKey",{get:function(){return this.altKeyVal}}); -Object.defineProperty(oEvent,"metaKey",{get:function(){return this.metaKeyVal}});Object.defineProperty(oEvent,"ctrlKey",{get:function(){return this.ctrlKeyVal}});if(AscCommon.AscBrowser.isIE)oEvent.preventDefault=function(){try{Object.defineProperty(this,"defaultPrevented",{get:function(){return true}})}catch(err){}};var k=e.keyCode;if(oEvent.initKeyboardEvent)oEvent.initKeyboardEvent("keydown",true,true,window,false,false,false,false,k,k);else oEvent.initKeyEvent("keydown",true,true,window,false, -false,false,false,k,0);oEvent.keyCodeVal=k;oEvent.shiftKeyVal=e.shiftKey;oEvent.altKeyVal=e.altKey;oEvent.metaKeyVal=e.metaKey;oEvent.ctrlKeyVal=e.ctrlKey;var _elem=target?target:_getElementKeyboardDown(this.nativeFocusElement,3);_elem.dispatchEvent(oEvent);return oEvent.defaultPrevented},isSpaceSymbol:function(e){if(e.keyCode==32)return true;if(e.keyCode==229&&(e.code=="space"||e.code=="Space"||e.key=="Spacebar"))return true;return false},systemInputEnable:function(isEnabled){if(this.isSystem==isEnabled)return; -this.isSystem=isEnabled;this.HtmlArea.style.left=this.isSystem?"0px":"-"+(this.HtmlAreaWidth>>1)+"px";this.clear();if(this.isShow)this.unshow(true);if(this.Api.WordControl&&this.Api.WordControl.m_oLogicDocument&&this.Api.WordControl.m_oLogicDocument.Document_UpdateSelectionState)this.Api.WordControl.m_oLogicDocument.Document_UpdateSelectionState()},debugInputEnable:function(isEnabled){if(this.isDebug==isEnabled)return;this.isDebug=isEnabled;this.HtmlArea.style.left=this.isDebug?"0px":"-"+(this.HtmlAreaWidth>> -1)+"px"},apiInputText:function(codes){var isAsync=AscFonts.FontPickerByCharacter.checkTextLight(codes,true);if(!isAsync){this.apiCompositeStart();this.apiCompositeReplace(codes);this.apiCompositeEnd()}else{AscFonts.FontPickerByCharacter.loadFonts(this,function(){this.apiCompositeStart();this.apiCompositeReplace(codes);this.apiCompositeEnd();this.setReadOnly(false)});this.setReadOnly(true);return false}},onKeyDown:function(e){if(this.Api.isLongAction()){AscCommon.stopEvent(e);return false}if(this.isInputHelpersPresent)switch(e.keyCode){case 9:case 13:case 38:case 40:case 33:case 34:case 35:case 36:case 27:{window.g_asc_plugins.onPluginEvent2("onKeyDown", -{"keyCode":e.keyCode},this.isInputHelpers);AscCommon.stopEvent(e);return false}case 32:{if(window.g_asc_plugins)window.g_asc_plugins.onPluginEvent("onInputHelperInput",{"text":this.keyPressInput})}default:break}else if(32==e.keyCode);if(this.isSystem&&this.isShow){if(e.keyCode==13){var text=this.getAreaValue();var codes=[];for(var iter=text.getUnicodeIterator();iter.check();iter.next())codes.push(iter.value());this.apiInputText(codes);this.clear();this.unshow();AscCommon.stopEvent(e);return false}else if(e.keyCode== -27){this.clear();this.unshow();AscCommon.stopEvent(e);return false}return}if(null!=this.nativeFocusElement)if(this.emulateNativeKeyDown(e)){e.preventDefault();return false}var _code=e.keyCode;if(_code!=8&&_code!=46)this.KeyDownFlag=true;AscCommon.check_KeyboardEvent(e);var arrCodes=this.Api.getAddedTextOnKeyDown(AscCommon.global_keyboardEvent);var isAsync=AscFonts.FontPickerByCharacter.checkTextLight(arrCodes,true);if(isAsync){AscFonts.FontPickerByCharacter.loadFonts(this,function(){this.onKeyDown(e); -this.onKeyUp(e);this.setReadOnly(false)});AscCommon.stopEvent(e);this.setReadOnly(true);return false}var ret=this.Api.onKeyDown(e);switch(e.keyCode){case 8:{var oldKeyPressInput=this.keyPressInput;this.clear();if(oldKeyPressInput.length>1){this.keyPressInput=oldKeyPressInput.substr(0,oldKeyPressInput.length-1);if(window.g_asc_plugins)window.g_asc_plugins.onPluginEvent("onInputHelperInput",{"text":this.keyPressInput})}return false}case 9:case 13:case 37:case 38:case 39:case 40:case 33:case 34:case 35:case 36:{this.clear(); -return false}case 46:case 45:{if(!AscCommon.global_keyboardEvent.CtrlKey&&!AscCommon.global_keyboardEvent.ShiftKey){this.clear();return false}}default:break}if(e.keyCode==32&&AscCommon.global_keyboardEvent.CtrlKey&&!AscCommon.global_keyboardEvent.ShiftKey)if(window.g_asc_plugins)window.g_asc_plugins.onPluginEvent("onClick");return ret},onKeyPress:function(e){if(this.Api.isLongAction()||!this.Api.asc_IsFocus()||this.Api.isViewMode){AscCommon.stopEvent(e);return false}if(this.isSystem)return;if(this.KeyDownFlag)this.KeyPressFlag= -true;if(this.IsComposition)return;if(e.which==13&&e.keyCode==13||e.which==10&&e.keyCode==10){AscCommon.stopEvent(e);return false}var c=e.which||e.keyCode;var isAsync=c>=32?AscFonts.FontPickerByCharacter.checkTextLight([c],true):false;if(isAsync){AscFonts.FontPickerByCharacter.loadFonts(this,function(){this.apiCompositeStart();this.apiCompositeReplace([c]);this.apiCompositeEnd();this.setReadOnly(false)});AscCommon.stopEvent(e);this.setReadOnly(true);return false}if(this.isKeyPressOnUp){var isSaveCode= -true;switch(e.which){case 46:{isSaveCode=false;break}default:break}if(isSaveCode){if(this.isKeyPressOnUpStackedMode)this.keyPressOnUpCodes.push({which:e.which,charCode:e.charCode,keyCode:e.keyCode,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey,preventDefault:function(){}});return}}var ret=this.Api.onKeyPress(e);switch(e.which){case 46:{AscCommon.stopEvent(e);this.clear();return false}default:break}this.keyPressInput+=String.fromCharCode(e.which);if(window.g_asc_plugins)window.g_asc_plugins.onPluginEvent("onInputHelperInput", -{"text":this.keyPressInput});AscCommon.stopEvent(e);return ret},onKeyUp:function(e){if(this.Api.isLongAction()){AscCommon.stopEvent(e);return false}if(this.isSystem&&this.isShow)return;if(this.isKeyPressOnUp&&this.keyPressOnUpCodes.length>0){this.isKeyPressOnUp=false;for(var i=0;i0){var range=sel.getRangeAt(0);_offset=range.endOffset}}return _offset},checkTargetPosition:function(isCorrect){var _offset=this.getAreaPos();if(false!==isCorrect){var _value=this.getAreaValue();_offset-=_value.length-this.compositionValue.length}if(!this.IsLockTargetMode)if(_offset==0&&this.compositionValue.length==1)_offset=1;this.Api.Set_CursorPosInCompositeText(_offset); -this.unlockTarget()},lockTarget:function(){if(!this.IsLockTargetMode)return;if(-1!=this.LockerTargetTimer)clearTimeout(this.LockerTargetTimer);this.Api.asc_LockTargetUpdate(true);var oThis=this;this.LockerTargetTimer=setTimeout(function(){oThis.unlockTarget()},1E3)},unlockTarget:function(){if(!this.IsLockTargetMode)return;if(-1!=this.LockerTargetTimer)clearTimeout(this.LockerTargetTimer);this.LockerTargetTimer=-1;this.Api.asc_LockTargetUpdate(false)},clearLastCompositeText:function(){this.LastReplaceText= -[];this.IsLastReplaceFlag=false},apiCompositeStart:function(){},apiCompositeReplace:function(_value){if(this.Api.isLongAction())return false;if(!this.ApiIsComposition){this.Api.Begin_CompositeInput();this.clearLastCompositeText()}this.ApiIsComposition=true;if(this.IsLastReplaceFlag)if(_value.length==this.LastReplaceText.length){var isEqual=true;for(var nC=0;nC<_value.length;nC++)if(_value[nC]!=this.LastReplaceText[nC]){isEqual=false;break}if(isEqual)return}this.Api.Replace_CompositeText(_value);if(window.g_asc_plugins){this.keyPressInput= -String.fromCodePoint.apply(this,_value);window.g_asc_plugins.onPluginEvent("onInputHelperInput",{"text":this.keyPressInput})}this.LastReplaceText=_value.slice();this.IsLastReplaceFlag=true},apiCompositeEnd:function(){if(!this.ApiIsComposition)return;this.ApiIsComposition=false;this.Api.End_CompositeInput();this.clearLastCompositeText()},onCompositionStart:function(e){if(this.isSystem)return;this.IsComposition=true;this.keyPressOnUpCodes=[]},onCompositionUpdate:function(e){if(this.isSystem)return; -this.IsComposition=true;this.keyPressOnUpCodes=[];this.onInput(e,true)},onCompositionEnd:function(e){if(this.isSystem)return;this.IsComposition=false;this.onInput(e,true)},setInterfaceEnableKeyEvents:function(value){this.InterfaceEnableKeyEvents=value;if(true==this.InterfaceEnableKeyEvents){if(document.activeElement){var _id=document.activeElement.id;if(_id=="area_id"||window.g_asc_plugins&&window.g_asc_plugins.checkRunnedFrameId(_id))return}this.HtmlArea.focus()}},externalEndCompositeInput:function(){this.clear()}, -externalChangeFocus:function(){if(!this.IsComposition)return false;setTimeout(function(){window["AscCommon"].g_inputContext.clear()},10);return true},isCompositionProcess:function(){return this.IsComposition},preventVirtualKeyboard:function(e){if(this.isHardCheckKeyboard)return;if(AscCommon.AscBrowser.isAndroid){this.setReadOnlyWrapper(true);this.virtualKeyboardClickPrevent=true;this.virtualKeyboardClickTimeout=setTimeout(function(){window["AscCommon"].g_inputContext.setReadOnlyWrapper(false);window["AscCommon"].g_inputContext.virtualKeyboardClickTimeout= --1},1)}},enableVirtualKeyboard:function(){if(this.isHardCheckKeyboard)return;if(AscCommon.AscBrowser.isAndroid){if(-1!=this.virtualKeyboardClickTimeout){clearTimeout(this.virtualKeyboardClickTimeout);this.virtualKeyboardClickTimeout=-1}this.setReadOnlyWrapper(false);this.virtualKeyboardClickPrevent=false}},preventVirtualKeyboard_Hard:function(){this.setReadOnlyWrapper(true)},enableVirtualKeyboard_Hard:function(){this.setReadOnlyWrapper(false)}};function _getAttirbute(_elem,_attr,_depth){var _elemTest= -_elem;for(var _level=0;_elemTest&&_level<_depth;++_level,_elemTest=_elemTest.parentNode){var _res=_elemTest.getAttribute?_elemTest.getAttribute(_attr):null;if(null!=_res)return _res}return null}function _getElementKeyboardDown(_elem,_depth){var _elemTest=_elem;for(var _level=0;_elemTest&&_level<_depth;++_level,_elemTest=_elemTest.parentNode){var _res=_elemTest.getAttribute?_elemTest.getAttribute("oo_editor_keyboard"):null;if(null!=_res)return _elemTest}return null}function _getDefaultKeyboardInput(_elem, -_depth){var _elemTest=_elem;for(var _level=0;_elemTest&&_level<_depth;++_level,_elemTest=_elemTest.parentNode){var _name=" "+_elemTest.className+" ";if(_name.indexOf(" dropdown-menu")>-1||_name.indexOf(" dropdown-toggle ")>-1||_name.indexOf(" dropdown-submenu ")>-1||_name.indexOf(" canfocused ")>-1)return"true"}return null}window["AscCommon"]=window["AscCommon"]||{};window["AscCommon"].CTextInput=CTextInput;window["AscCommon"].InitBrowserInputContext=function(api,target_id,parent_id){if(window["AscCommon"].g_inputContext)return; -window["AscCommon"].g_inputContext=new CTextInput(api);window["AscCommon"].g_inputContext.init(target_id,parent_id);window["AscCommon"].g_clipboardBase.Init(api);window["AscCommon"].g_clipboardBase.inputContext=window["AscCommon"].g_inputContext;if(window["AscCommon"].TextBoxInputMode===true)window["AscCommon"].g_inputContext.systemInputEnable(true);document.addEventListener("focus",function(e){var t=window["AscCommon"].g_inputContext;var _oldNativeFE=t.nativeFocusElement;t.nativeFocusElement=e.target; -if(t.IsComposition){t.apiCompositeEnd();t.externalEndCompositeInput()}if(!t.isSystem&&!t.isNoClearOnFocus)t.clear(true);t.isNoClearOnFocus=false;var _nativeFocusElementNoRemoveOnElementFocus=t.nativeFocusElementNoRemoveOnElementFocus;t.nativeFocusElementNoRemoveOnElementFocus=false;if(t.InterfaceEnableKeyEvents==false){t.nativeFocusElement=null;return}if(t.nativeFocusElement&&t.nativeFocusElement.id==t.HtmlArea.id){t.Api.asc_enableKeyEvents(true,true);if(_nativeFocusElementNoRemoveOnElementFocus)t.nativeFocusElement= -_oldNativeFE;else t.nativeFocusElement=null;return}if(t.nativeFocusElement&&t.nativeFocusElement.id==window["AscCommon"].g_clipboardBase.CommonDivId){t.nativeFocusElement=null;return}t.nativeFocusElementNoRemoveOnElementFocus=false;var _isElementEditable=false;if(t.nativeFocusElement){var _name=t.nativeFocusElement.nodeName;if(_name)_name=_name.toUpperCase();if("INPUT"==_name||"TEXTAREA"==_name)_isElementEditable=true;else if("DIV"==_name)if(t.nativeFocusElement.getAttribute("contenteditable")=="true")_isElementEditable= -true}if("IFRAME"==_name){t.Api.asc_enableKeyEvents(false,true);t.nativeFocusElement=null;return}var _oo_editor_input=_getAttirbute(t.nativeFocusElement,"oo_editor_input",3);var _oo_editor_keyboard=_getAttirbute(t.nativeFocusElement,"oo_editor_keyboard",3);if(!_oo_editor_input&&!_oo_editor_keyboard)_oo_editor_input=_getDefaultKeyboardInput(t.nativeFocusElement,3);if(_oo_editor_keyboard=="true")_oo_editor_input=undefined;if(_oo_editor_input=="true"){t.Api.asc_enableKeyEvents(false,true);t.nativeFocusElement= -null;return}if(_isElementEditable&&_oo_editor_input!="false"){t.Api.asc_enableKeyEvents(false,true);t.nativeFocusElement=null;return}if(_oo_editor_keyboard!="true")t.nativeFocusElement=null;var _elem=t.nativeFocusElement;t.nativeFocusElementNoRemoveOnElementFocus=true;AscCommon.AscBrowser.isMozilla?setTimeout(function(){t.HtmlArea.focus()},0):t.HtmlArea.focus();t.nativeFocusElement=_elem;t.Api.asc_enableKeyEvents(true,true)},true);if(!api.isMobileVersion&&!api.isEmbedVersion)window["AscCommon"].g_inputContext.HtmlArea.focus()}; -window["SetInputDebugMode"]=function(){if(!window["AscCommon"].g_inputContext)return;window["AscCommon"].g_inputContext.debugInputEnable(true);window["AscCommon"].g_inputContext.show()}})(window);"use strict";(function(window,undefined){function COleSize(w,h){this.w=w;this.h=h}COleSize.prototype.Write_ToBinary=function(Writer){Writer.WriteLong(this.w);Writer.WriteLong(this.h)};COleSize.prototype.Read_FromBinary=function(Reader){this.w=Reader.GetLong();this.h=Reader.GetLong()};AscDFH.changesFactory[AscDFH.historyitem_ImageShapeSetData]= -AscDFH.CChangesDrawingsString;AscDFH.changesFactory[AscDFH.historyitem_ImageShapeSetApplicationId]=AscDFH.CChangesDrawingsString;AscDFH.changesFactory[AscDFH.historyitem_ImageShapeSetPixSizes]=AscDFH.CChangesDrawingsObjectNoId;AscDFH.changesFactory[AscDFH.historyitem_ImageShapeSetObjectFile]=AscDFH.CChangesDrawingsString;AscDFH.changesFactory[AscDFH.historyitem_ImageShapeSetOleType]=AscDFH.CChangesDrawingsLong;AscDFH.drawingsConstructorsMap[AscDFH.historyitem_ChartStyleEntryDefRPr]=AscCommonWord.CTextPr; -function CChangesOleObjectBinary(Class,Old,New,Color){AscDFH.CChangesBaseProperty.call(this,Class,Old,New,Color)}CChangesOleObjectBinary.prototype=Object.create(AscDFH.CChangesBaseProperty.prototype);CChangesOleObjectBinary.prototype.Type=AscDFH.historyitem_ImageShapeSetBinaryData;CChangesOleObjectBinary.prototype.private_SetValue=function(Value){this.Class.m_aBinaryData=Value};CChangesOleObjectBinary.prototype.WriteToBinary=function(Writer){Writer.WriteBool(this.New!==null);if(this.New!==null){Writer.WriteLong(this.New.length); -Writer.WriteBuffer(this.New,0,this.New.length)}};CChangesOleObjectBinary.prototype.ReadFromBinary=function(Reader){if(Reader.GetBool()){var length=Reader.GetLong();this.New=Reader.GetBuffer(length)}};AscDFH.changesFactory[AscDFH.historyitem_ImageShapeSetBinaryData]=CChangesOleObjectBinary;AscDFH.drawingsChangesMap[AscDFH.historyitem_ImageShapeSetData]=function(oClass,value){oClass.m_sData=value};AscDFH.drawingsChangesMap[AscDFH.historyitem_ImageShapeSetApplicationId]=function(oClass,value){oClass.m_sApplicationId= -value};AscDFH.drawingsChangesMap[AscDFH.historyitem_ImageShapeSetPixSizes]=function(oClass,value){if(value){oClass.m_nPixWidth=value.w;oClass.m_nPixHeight=value.h}};AscDFH.drawingsConstructorsMap[AscDFH.historyitem_ImageShapeSetPixSizes]=COleSize;AscDFH.drawingsChangesMap[AscDFH.historyitem_ImageShapeSetObjectFile]=function(oClass,value){oClass.m_sObjectFile=value};AscDFH.drawingsChangesMap[AscDFH.historyitem_ImageShapeSetOleType]=function(oClass,value){oClass.m_nOleType=value};function COleObject(){AscFormat.CImageShape.call(this); -this.m_sData=null;this.m_sApplicationId=null;this.m_nPixWidth=null;this.m_nPixHeight=null;this.m_fDefaultSizeX=null;this.m_fDefaultSizeY=null;this.m_sObjectFile=null;this.m_nOleType=null;this.m_aBinaryData=null}COleObject.prototype=Object.create(AscFormat.CImageShape.prototype);COleObject.prototype.constructor=COleObject;COleObject.prototype.getObjectType=function(){return AscDFH.historyitem_type_OleObject};COleObject.prototype.setData=function(sData){AscCommon.History.Add(new AscDFH.CChangesDrawingsString(this, -AscDFH.historyitem_ImageShapeSetData,this.m_sData,sData));this.m_sData=sData};COleObject.prototype.setApplicationId=function(sApplicationId){AscCommon.History.Add(new AscDFH.CChangesDrawingsString(this,AscDFH.historyitem_ImageShapeSetApplicationId,this.m_sApplicationId,sApplicationId));this.m_sApplicationId=sApplicationId};COleObject.prototype.setPixSizes=function(nPixWidth,nPixHeight){AscCommon.History.Add(new AscDFH.CChangesDrawingsObjectNoId(this,AscDFH.historyitem_ImageShapeSetPixSizes,new COleSize(this.m_nPixWidth, -this.m_nPixHeight),new COleSize(nPixWidth,nPixHeight)));this.m_nPixWidth=nPixWidth;this.m_nPixHeight=nPixHeight};COleObject.prototype.setObjectFile=function(sObjectFile){AscCommon.History.Add(new AscDFH.CChangesDrawingsString(this,AscDFH.historyitem_ImageShapeSetObjectFile,this.m_sObjectFile,sObjectFile));this.m_sObjectFile=sObjectFile};COleObject.prototype.setOleType=function(nOleType){AscCommon.History.Add(new AscDFH.CChangesDrawingsLong(this,AscDFH.historyitem_ImageShapeSetOleType,this.m_nOleType, -nOleType));this.m_nOleType=nOleType};COleObject.prototype.setBinaryData=function(aBinaryData){AscCommon.History.Add(new CChangesOleObjectBinary(this,this.m_aBinaryData,aBinaryData,false));this.m_aBinaryData=aBinaryData};COleObject.prototype.canRotate=function(){return false};COleObject.prototype.copy=function(){var copy=new COleObject;if(this.nvPicPr)copy.setNvPicPr(this.nvPicPr.createDuplicate());if(this.spPr){copy.setSpPr(this.spPr.createDuplicate());copy.spPr.setParent(copy)}if(this.blipFill)copy.setBlipFill(this.blipFill.createDuplicate()); -if(this.style)copy.setStyle(this.style.createDuplicate());copy.setBDeleted(this.bDeleted);copy.setData(this.m_sData);copy.setApplicationId(this.m_sApplicationId);copy.setPixSizes(this.m_nPixWidth,this.m_nPixHeight);copy.setObjectFile(this.m_sObjectFile);copy.setOleType(this.m_nOleType);if(this.m_aBinaryData!==null)copy.setBinaryData(this.m_aBinaryData.slice(0,this.m_aBinaryData.length));if(this.macro!==null)copy.setMacro(this.macro);if(this.textLink!==null)copy.setTextLink(this.textLink);copy.cachedImage= -this.getBase64Img();copy.cachedPixH=this.cachedPixH;copy.cachedPixW=this.cachedPixW;return copy};COleObject.prototype.handleUpdateExtents=function(){if(!AscFormat.isRealNumber(this.m_fDefaultSizeX)||!AscFormat.isRealNumber(this.m_fDefaultSizeY))if(this.spPr&&this.spPr.xfrm&&AscFormat.isRealNumber(this.spPr.xfrm.extX)&&AscFormat.isRealNumber(this.spPr.xfrm.extY)&&this.spPr.xfrm.extX>0&&this.spPr.xfrm.extY>0){this.m_fDefaultSizeX=this.spPr.xfrm.extX;this.m_fDefaultSizeY=this.spPr.xfrm.extY}AscFormat.CImageShape.prototype.handleUpdateExtents.call(this, +var _text_format=this.ClosureParams.getData("text/plain");var _internal=this.ClosureParams.getData("text/x-custom");if(_internal&&_internal!=""&&_internal.indexOf("asc_internalData2;")==0){this.Api.asc_PasteData(AscCommon.c_oAscClipboardDataFormat.Internal,_internal.substr("asc_internalData2;".length),null,_text_format);g_clipboardBase.Paste_End();return false}var _html_format=this.ClosureParams.getData("text/html");_html_format=_html_format.replace(/]+>/g,"");if(!_html_format){this.PasteFlag= +false;g_clipboardBase.Paste_End();return false}if(_html_format&&_html_format!=""){var nIndex=_html_format.indexOf("");if(-1!=nIndex)_html_format=_html_format.substring(0,nIndex+"".length);this.CommonIframe_PasteStart(_html_format,_text_format);return false}if(_text_format&&_text_format!=""){this.Api.asc_PasteData(AscCommon.c_oAscClipboardDataFormat.Text,_text_format);g_clipboardBase.Paste_End();return false}var items=_clipboard.items;if(null!=items&&0!=items.length){g_clipboardBase.PasteImagesBody= +"";g_clipboardBase.PasteImagesCount=items.length;g_clipboardBase.PasteImagesCounter=0;for(var i=0;i';if(g_clipboardBase.PasteImagesCounter==g_clipboardBase.PasteImagesCount){g_clipboardBase.CommonIframe_PasteStart(""+g_clipboardBase.PasteImagesBody+ +"");g_clipboardBase.PasteImagesBody="";g_clipboardBase.PasteImagesCounter=0;g_clipboardBase.PasteImagesCount=0}};reader.onabort=reader.onerror=function(e){g_clipboardBase.PasteImagesCounter++;if(g_clipboardBase.PasteImagesCounter==g_clipboardBase.PasteImagesCount){g_clipboardBase.CommonIframe_PasteStart(""+g_clipboardBase.PasteImagesBody+"");g_clipboardBase.PasteImagesBody="";g_clipboardBase.PasteImagesCounter=0;g_clipboardBase.PasteImagesCount=0}};try{reader.readAsDataURL(blob)}catch(err){g_clipboardBase.PasteImagesCounter++}}else g_clipboardBase.PasteImagesCounter++; +if(g_clipboardBase.PasteImagesCounter==g_clipboardBase.PasteImagesCount)g_clipboardBase.Paste_End();return false}}g_clipboardBase.Paste_End();return false},_private_onbeforepaste:function(e,isAttackEmulate){this._console_log("onbeforepaste");if(!this.Api.asc_IsFocus(true))return;{this.CommonDiv=this.CommonDiv_Check();this.CommonDiv_Start();this.CommonDiv.focus();this.StartFocus();this.CommonDiv_Select();return}return false},_private_onbeforecopy_select:function(){if(AscBrowser.isIE){this._console_log("onbeforecopy_select"); +this.CommonDiv=this.CommonDiv_Check();this.CommonDiv_Start();this.CommonDiv.innerHTML=" ";this.CommonDiv.focus();this.StartFocus();this.CommonDiv_Select()}},_private_onbeforecopy:function(e,isAttackEmulate){this._console_log("onbeforecopy");if(!this.Api.asc_IsFocus(true))return;{this.CommonDiv=this.CommonDiv_Check();this.CommonDiv_Start();this.CommonDiv.innerHTML=" ";this.CommonDiv.focus();this.StartFocus();this.CommonDiv_Select()}return false},Init:function(_api){this.Api= +_api;window["AscCommon"].g_specialPasteHelper.Init(_api);this.ClosureParams.getData=function(type){var _clipboard=this._e&&this._e.clipboardData?this._e.clipboardData:window.clipboardData;if(!_clipboard||!_clipboard.getData)return null;var _type=type;if(AscBrowser.isIE&&(type=="text"||type=="text/plain"))_type="Text";try{return _clipboard.getData(_type)}catch(e){}return null};this.ClosureParams.setData=function(type,_data){var _clipboard=this._e&&this._e.clipboardData?this._e.clipboardData:window.clipboardData; +if(!_clipboard||!_clipboard.setData)return null;var _type=type;if(AscBrowser.isIE&&(type=="text"||type=="text/plain"))_type="Text";try{_clipboard.setData(_type,_data)}catch(e){}};if(!AscBrowser.isIE){document.oncopy=function(e){return g_clipboardBase._private_oncopy(e)};document.oncut=function(e){return g_clipboardBase._private_oncut(e)};document.onpaste=function(e){return g_clipboardBase._private_onpaste(e)};document["onbeforecopy"]=function(e){return g_clipboardBase._private_onbeforecopy(e)};document["onbeforecut"]= +function(e){return g_clipboardBase._private_onbeforecopy(e)};document["onbeforepaste"]=function(e){return g_clipboardBase._private_onbeforepaste(e)}}else{document.addEventListener("copy",function(e){return g_clipboardBase._private_oncopy(e)});document.addEventListener("cut",function(e){return g_clipboardBase._private_oncut(e)});document.addEventListener("paste",function(e){return g_clipboardBase._private_onpaste(e)});document.addEventListener("beforepaste",function(e){return g_clipboardBase._private_onbeforepaste(e)}); +document.addEventListener("beforecopy",function(e){return g_clipboardBase._private_onbeforecopy(e)});document.addEventListener("beforecut",function(e){return g_clipboardBase._private_onbeforecopy(e)})}if(this.IsCopyCutOnlyInEditable||this.IsPasteOnlyInEditable)document.onkeydown=function(e){if(!g_clipboardBase.Api.asc_IsFocus(true)||g_clipboardBase.Api.isLongAction())return;var isAltGr=AscCommon.getAltGr(e);if(isAltGr)return;var isCtrl=e.ctrlKey===true||e.metaKey===true;var isShift=e.shiftKey;var keyCode= +e.keyCode;if(g_clipboardBase.IsCopyCutOnlyInEditable){var bIsBeforeCopyCutEmulate=false;var _cut=false;if(isCtrl&&!isShift&&(keyCode==67||keyCode==88))bIsBeforeCopyCutEmulate=true;if(!isCtrl&&isShift&&keyCode==45){bIsBeforeCopyCutEmulate=true;_cut=true}if(bIsBeforeCopyCutEmulate){g_clipboardBase._console_log("emulate_beforecopycut");var isEmulate=false;try{isEmulate=_cut?document.execCommand("beforecut"):document.execCommand("beforecopy")}catch(err){}g_clipboardBase._private_onbeforecopy(undefined, +!isEmulate)}}if(g_clipboardBase.IsPasteOnlyInEditable){var bIsBeforePasteEmulate=false;if(isCtrl&&!isShift&&keyCode==86)bIsBeforePasteEmulate=true;if(!isCtrl&&isShift&&keyCode==45)bIsBeforePasteEmulate=true;if(bIsBeforePasteEmulate){g_clipboardBase._console_log("emulate_beforepaste");var isEmulate=false;try{isEmulate=document.execCommand("beforepaste")}catch(err$9){}g_clipboardBase._private_onbeforepaste(undefined,!isEmulate)}}};if(AscBrowser.isSafari&&false){this.CommonDiv=this.CommonDiv_Check(); +setInterval(function(){if(g_clipboardBase.Api.asc_IsFocus(true))g_clipboardBase.CommonDiv.focus()},100)}},IsWorking:function(){return this.CopyFlag||this.PasteFlag?true:false},StartFocus:function(){this.EndFocus(false);this.CopyPasteFocus=true;this.CopyPasteFocusTimer=setTimeout(function(){g_clipboardBase.EndFocus()},1E3)},EndFocus:function(isFocusToEditor){this.CopyPasteFocus=false;if(-1!=this.CopyPasteFocusTimer){clearTimeout(this.CopyPasteFocusTimer);this.CopyPasteFocusTimer=-1;if(false!==isFocusToEditor&& +null!=this.inputContext)if(this.inputContext.HtmlArea)this.inputContext.HtmlArea.focus()}},IsFocus:function(){return this.CopyPasteFocus},CommonDiv_Check:function(){var ElemToSelect=document.getElementById(this.CommonDivId);if(!ElemToSelect){ElemToSelect=document.createElement("div");ElemToSelect.id=this.CommonDivId;ElemToSelect.className=this.CommonDivClassName;ElemToSelect.style.position="fixed";ElemToSelect.style.left="0px";ElemToSelect.style.top="-100px";ElemToSelect.style.width="10000px";ElemToSelect.style.height= +"100px";ElemToSelect.style.overflow="hidden";ElemToSelect.style.zIndex=-1E3;ElemToSelect.style.MozUserSelect="text";ElemToSelect.style.fontFamily="onlyofficeDefaultFont";ElemToSelect.style.fontSize="11pt";ElemToSelect.style.color="black";ElemToSelect.style["-khtml-user-select"]="text";ElemToSelect.style["-o-user-select"]="text";ElemToSelect.style["user-select"]="text";ElemToSelect.style["-webkit-user-select"]="text";ElemToSelect.setAttribute("contentEditable",this.isCopyOutEnabled());var _parent= +""==this.CommonDivIdParent?document.body:document.getElementById(this.CommonDivIdParent);_parent.appendChild(ElemToSelect)}else ElemToSelect.setAttribute("contentEditable",this.isCopyOutEnabled());return ElemToSelect},CommonDiv_Select:function(){var ElemToSelect=this.CommonDiv;if(window.getSelection){var selection=window.getSelection();var rangeToSelect=document.createRange();var is_gecko=AscBrowser.isGecko;if(is_gecko){ElemToSelect.appendChild(document.createTextNode("\u00a0"));ElemToSelect.insertBefore(document.createTextNode("\u00a0"), +ElemToSelect.firstChild);rangeToSelect.setStartAfter(ElemToSelect.firstChild);rangeToSelect.setEndBefore(ElemToSelect.lastChild)}else{var aChildNodes=ElemToSelect.childNodes;if(aChildNodes.length==1){var elem=aChildNodes[0];var wrap=document.createElement("b");wrap.setAttribute("style","font-weight:normal; background-color: transparent; color: transparent;");elem=ElemToSelect.removeChild(elem);wrap.appendChild(elem);ElemToSelect.appendChild(wrap)}rangeToSelect.selectNodeContents(ElemToSelect)}selection.removeAllRanges(); +selection.addRange(rangeToSelect)}else if(document.body.createTextRange){var rangeToSelect=document.body.createTextRange();rangeToSelect.moveToElementText(ElemToSelect);rangeToSelect.select()}},CommonDiv_Start:function(){this.ClosureParams.overflowBody=document.body.style.overflow;document.body.style.overflow="hidden";this.ClosureParams.backgroundcolorBody=document.body.style["background-color"];document.body.style["background-color"]="transparent";var ElemToSelect=this.CommonDiv;ElemToSelect.style.display= +"block";while(ElemToSelect.hasChildNodes())ElemToSelect.removeChild(ElemToSelect.lastChild);document.body.style.MozUserSelect="text";delete document.body.style["-khtml-user-select"];delete document.body.style["-o-user-select"];delete document.body.style["user-select"];document.body.style["-webkit-user-select"]="text";ElemToSelect.style.MozUserSelect="all"},CommonDiv_End:function(){var ElemToSelect=this.CommonDiv;if(ElemToSelect){ElemToSelect.style.display=AscBrowser.isSafari?"block":"none";ElemToSelect.style.MozUserSelect= +"none"}document.body.style.MozUserSelect="none";document.body.style["-khtml-user-select"]="none";document.body.style["-o-user-select"]="none";document.body.style["user-select"]="none";document.body.style["-webkit-user-select"]="none";document.body.style["background-color"]=this.ClosureParams.backgroundcolorBody;document.body.style.overflow=this.ClosureParams.overflowBody;this.CopyFlag=false;this.bCut=false;this.EndFocus()},CommonDiv_Copy:function(){this.CopyFlag=true;this.CommonDiv=this.CommonDiv_Check(); +this.CommonDiv_Start();this.ClosureParams.isDivCopy=true;this.DivOnCopyHtmlPresent=false;this.DivOnCopyText="";this.LastCopyBinary=null;this.checkCopy(AscCommon.c_oAscClipboardDataFormat.Text|AscCommon.c_oAscClipboardDataFormat.Html|AscCommon.c_oAscClipboardDataFormat.Internal);this.ClosureParams.isDivCopy=false;if(!this.DivOnCopyHtmlPresent&&this.DivOnCopyText!="")this.CommonDiv.innerHTML=this.DivOnCopyText;this.DivOnCopyHtmlPresent=false;this.DivOnCopyText="";this.CommonDiv_Select();window.setTimeout(function(){g_clipboardBase.CommonDiv_End()}, +0)},CommonDiv_Execute_CopyCut:function(){if(this.IsCopyCutOnlyInEditable)this._private_onbeforecopy(undefined,true)},CommonIframe_PasteStart:function(_html_data,text_data){var ifr=document.getElementById(this.CommonIframeId);if(!ifr){ifr=document.createElement("iframe");ifr.name=this.CommonIframeId;ifr.id=this.CommonIframeId;ifr.style.position="absolute";ifr.style.top="-100px";ifr.style.left="0px";ifr.style.width="10000px";ifr.style.height="100px";ifr.style.overflow="hidden";ifr.style.zIndex=-1E3; +ifr.setAttribute("sandbox","allow-same-origin");document.body.appendChild(ifr);this.CommonIframe=ifr}else ifr.style.width="10000px";var frameWindow=window.frames[this.CommonIframeId];if(frameWindow){frameWindow.document.open();frameWindow.document.write(_html_data);frameWindow.document.close();if(null!=frameWindow.document&&null!=frameWindow.document.body){ifr.style.display="block";this.pastedFrom=definePastedFrom(frameWindow.document);this.Api.asc_PasteData(AscCommon.c_oAscClipboardDataFormat.HtmlElement, +frameWindow.document.body,ifr,text_data)}}ifr.style.width="100px";g_clipboardBase.Paste_End()},CommonIframe_PasteEnd:function(){if(this.CommonIframe&&this.CommonIframe.style.display!="none"){this.CommonIframe.blur();this.CommonIframe.style.display="none"}},Paste_End:function(){this.CommonIframe_PasteEnd();this.Api.decrementCounterLongAction();this.PasteFlag=false;this.EndFocus();if(this.needClearBuffer){this.ClearBuffer();this.needClearBuffer=false}},pushData:function(_format,_data){if(null==this.LastCopyBinary)this.LastCopyBinary= +[];this.LastCopyBinary.push({type:_format,data:_data});if(this.ClosureParams.isDivCopy===true){if(!this.isCopyOutEnabled())return;if(_format==AscCommon.c_oAscClipboardDataFormat.Html){this.CommonDiv.innerHTML=_data;this.DivOnCopyHtmlPresent=true}if(_format==AscCommon.c_oAscClipboardDataFormat.Text)this.DivOnCopyText=_data;return}var _data_format="";switch(_format){case AscCommon.c_oAscClipboardDataFormat.Html:_data_format="text/html";break;case AscCommon.c_oAscClipboardDataFormat.Text:_data_format= +"text/plain";break;case AscCommon.c_oAscClipboardDataFormat.Internal:_data_format="text/x-custom";break;default:break}if(_data_format!=""&&_data!==null&&this.isCopyOutEnabled())if(_data_format=="text/x-custom")this.ClosureParams.setData(_data_format,"asc_internalData2;"+_data);else this.ClosureParams.setData(_data_format,_data)},Button_Copy:function(){if(this.inputContext){if(this.inputContext.isHardCheckKeyboard)this.inputContext.enableVirtualKeyboard_Hard();this.inputContext.HtmlArea.focus()}this.Api.asc_enableKeyEvents(true, +true);this.CommonDiv_Execute_CopyCut();var _ret=false;try{_ret=document.execCommand("copy")}catch(err){_ret=false}if(!_ret){this.LastCopyBinary=null;this.checkCopy(AscCommon.c_oAscClipboardDataFormat.Text|AscCommon.c_oAscClipboardDataFormat.Html|AscCommon.c_oAscClipboardDataFormat.Internal)}return _ret},Button_Cut:function(){if(this.inputContext){if(this.inputContext.isHardCheckKeyboard)this.inputContext.enableVirtualKeyboard_Hard();this.inputContext.HtmlArea.focus()}this.Api.asc_enableKeyEvents(true, +true);this.CommonDiv_Execute_CopyCut();var _ret=false;try{_ret=document.execCommand("cut")}catch(err){_ret=false}if(!_ret){this.LastCopyBinary=null;this.bCut=true;this.checkCopy(AscCommon.c_oAscClipboardDataFormat.Text|AscCommon.c_oAscClipboardDataFormat.Html|AscCommon.c_oAscClipboardDataFormat.Internal);this.Api.asc_SelectionCut();this.bCut=false}return _ret},Button_Paste:function(){if(this.inputContext){if(this.inputContext.isHardCheckKeyboard)this.inputContext.enableVirtualKeyboard_Hard();this.inputContext.HtmlArea.focus()}this.Api.asc_enableKeyEvents(true, +true);var _ret=false;try{_ret=document.execCommand("paste")}catch(err){_ret=false}if(!_ret&&null!=this.LastCopyBinary){var _data=null;var _isInternal=false;for(var i=0;i0)this.Api.asc_PasteData(this.LastCopyBinary[0].type,this.LastCopyBinary[0].data)}return _ret}, +ClearBuffer:function(){if(-1!=this.clearBufferTimerId)clearTimeout(this.clearBufferTimerId);this.clearBufferTimerId=setTimeout(function(){if(AscCommon.g_clipboardBase)AscCommon.g_clipboardBase.clearBufferTimerId=-1},500);this.Button_Copy()},isCopyOutEnabled:function(){if(this.Api&&this.Api.isCopyOutEnabled)return this.Api.isCopyOutEnabled();return true}};function definePastedFrom(doc){if(!doc)return null;var res=null;var metaTags=doc.getElementsByTagName("meta");for(var i=0;i>1)+"px;top:"+-this.HtmlAreaOffset+"px;";_style+="background:transparent;border:none;position:absolute;text-shadow:0 0 0 #000;outline:none;color:transparent;width:"+ +this.HtmlAreaWidth+"px;height:50px;";_style+="overflow:hidden;padding:0px;margin:0px;font-family:arial;resize:none;font-weight:normal;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;";_style+="touch-action: none;-webkit-touch-callout: none;color:transparent;caret-color:transparent;";_style+=AscCommon.AscBrowser.isAppleDevices?"font-size:0px;":"font-size:8px;";this.HtmlArea.setAttribute("style",_style);this.HtmlArea.setAttribute("spellcheck",false);this.HtmlArea.setAttribute("autocapitalize", +"none");this.HtmlArea.setAttribute("autocomplete","off");this.HtmlArea.setAttribute("autocorrect","off");this.HtmlDiv.appendChild(this.HtmlArea);if(true){var oHtmlDivScrollable=document.createElement("div");oHtmlDivScrollable.id="area_id_main";oHtmlDivScrollable.setAttribute("style","background:transparent;border:none;position:absolute;padding:0px;margin:0px;z-index:0;pointer-events:none;");var parentStyle=getComputedStyle(oHtmlParent);oHtmlDivScrollable.style.left=parentStyle.left;oHtmlDivScrollable.style.top= +parentStyle.top;oHtmlDivScrollable.style.width=parentStyle.width;oHtmlDivScrollable.style.height=parentStyle.height;oHtmlDivScrollable.style.overflow="hidden";oHtmlDivScrollable.appendChild(this.HtmlDiv);oHtmlParent.parentNode.appendChild(oHtmlDivScrollable)}else oHtmlParent.appendChild(this.HtmlDiv);var oThis=this;this.HtmlArea["onkeydown"]=function(e){if(AscCommon.AscBrowser.isSafariMacOs){var cmdButton=e.ctrlKey||e.metaKey?true:false;var buttonCode=e.keyCode==67||e.keyCode==88||e.keyCode==86;if(cmdButton&& +buttonCode)oThis.IsDisableKeyPress=true;else oThis.IsDisableKeyPress=false}return oThis.onKeyDown(e)};this.HtmlArea["onkeypress"]=function(e){if(oThis.IsDisableKeyPress==true){oThis.IsDisableKeyPress=false;var cmdButton=e.ctrlKey||e.metaKey?true:false;if(cmdButton)return}return oThis.onKeyPress(e)};this.HtmlArea["onkeyup"]=function(e){oThis.IsDisableKeyPress=false;return oThis.onKeyUp(e)};this.HtmlArea.addEventListener("input",function(e){return oThis.onInput(e)},false);this.HtmlArea.addEventListener("compositionstart", +function(e){return oThis.onCompositionStart(e)},false);this.HtmlArea.addEventListener("compositionupdate",function(e){return oThis.onCompositionUpdate(e)},false);this.HtmlArea.addEventListener("compositionend",function(e){return oThis.onCompositionEnd(e)},false);this.show();this.Api.Input_UpdatePos();if(AscCommon.AscBrowser.isAndroid)this.HtmlArea.onclick=function(e){var _this=AscCommon.g_inputContext;if(-1!=_this.virtualKeyboardClickTimeout){clearTimeout(_this.virtualKeyboardClickTimeout);_this.virtualKeyboardClickTimeout= +-1}_this.apiCompositeEnd();if(!_this.virtualKeyboardClickPrevent)return;_this.setReadOnlyWrapper(true);_this.virtualKeyboardClickPrevent=false;AscCommon.stopEvent(e);_this.virtualKeyboardClickTimeout=setTimeout(function(){_this.setReadOnlyWrapper(false);_this.virtualKeyboardClickTimeout=-1},1);return false}},onResize:function(_editorContainerId){var _elem=document.getElementById("area_id_main");var _elemSrc=document.getElementById(_editorContainerId);if(!_elem||!_elemSrc)return;if(AscCommon.AscBrowser.isChrome){var rectObject= +_elemSrc.getBoundingClientRect();this.FixedPosCheckElementX=rectObject.left;this.FixedPosCheckElementY=rectObject.top}var _width=_elemSrc.style.width;if((null==_width||""==_width)&&window.getComputedStyle){var _s=window.getComputedStyle(_elemSrc);_elem.style.left=_s.left;_elem.style.top=_s.top;_elem.style.width=_s.width;_elem.style.height=_s.height}else{_elem.style.left=_elemSrc.style.left;_elem.style.top=_elemSrc.style.top;_elem.style.width=_width;_elem.style.height=_elemSrc.style.height}if(this.Api.isMobileVersion){var _elem1= +document.getElementById("area_id_parent");var _elem2=document.getElementById("area_id");_elem1.parentNode.style.pointerEvents="";_elem1.style.left="0px";_elem1.style.top="-1000px";_elem1.style.right="0px";_elem1.style.bottom="-100px";_elem1.style.width="auto";_elem1.style.height="auto";_elem2.style.left="0px";_elem2.style.top="0px";_elem2.style.right="0px";_elem2.style.bottom="0px";_elem2.style.width="100%";_elem2.style.height="100%";if(AscCommon.AscBrowser.isIE){document.body.style["msTouchAction"]= +"none";document.body.style["touchAction"]="none"}}var _editorSdk=document.getElementById("editor_sdk");this.editorSdkW=_editorSdk.clientWidth;this.editorSdkH=_editorSdk.clientHeight},checkFocus:function(){if(this.Api.asc_IsFocus()&&!AscCommon.g_clipboardBase.IsFocus()&&!AscCommon.g_clipboardBase.IsWorking())if(document.activeElement!=this.HtmlArea)this.HtmlArea.focus()},move:function(x,y){if(this.Api.isMobileVersion)return;var oTarget=document.getElementById(this.TargetId);if(!oTarget)return;var xPos= +x?x:parseInt(oTarget.style.left);var yPos=(y?y:parseInt(oTarget.style.top))+parseInt(oTarget.style.height);if(AscCommon.AscBrowser.isSafari&&AscCommon.AscBrowser.isMobile)xPos=-100;if(!this.isDebug&&!this.isSystem){this.HtmlDiv.style.left=xPos+this.FixedPosCheckElementX+"px";this.HtmlDiv.style.top=yPos+this.FixedPosCheckElementY+this.TargetOffsetY+this.HtmlAreaOffset+"px";this.HtmlArea.scrollTop=this.HtmlArea.scrollHeight}else this.debugCalculatePlace(xPos+this.FixedPosCheckElementX,yPos+this.FixedPosCheckElementY+ +this.TargetOffsetY);if(window.g_asc_plugins)window.g_asc_plugins.onPluginEvent("onTargetPositionChanged")},emulateKeyDownApi:function(code){var _e={altKey:false,ctrlKey:false,shiftKey:false,target:null,charCode:0,which:code,keyCode:code,code:"",preventDefault:function(){},stopPropagation:function(){}};this.Api.onKeyDown(_e);this.Api.onKeyUp(_e)},clear:function(isFromFocus){if(!this.TextArea_Not_ContentEditableDiv)this.HtmlArea.innerHTML="";else this.HtmlArea.value="";if(isFromFocus!==true)this.HtmlArea.focus(); +this.TextBeforeComposition="";this.Text="";this.Target=0;this.CompositionStart=0;this.CompositionEnd=0;this.IsComposition=false;this.keyPressInput="";if(window.g_asc_plugins)window.g_asc_plugins.onPluginEvent("onInputHelperClear")},getAreaValue:function(){return this.TextArea_Not_ContentEditableDiv?this.HtmlArea.value:this.HtmlArea.innerText},setReadOnly:function(isLock){if(isLock)this.ReadOnlyCounter++;else this.ReadOnlyCounter--;this.setReadOnlyWrapper(0>=this.ReadOnlyCounter?false:true)},setReadOnlyWrapper:function(val){this.HtmlArea.readOnly= +this.Api.isViewMode?true:val},show:function(){if(this.isDebug||this.isSystem){this.log("ti: show");document.getElementById("area_id_main").style.zIndex=10;this.HtmlArea.style.top="0px";this.HtmlArea.style.width="100%";this.HtmlArea.style.height="100%";this.HtmlArea.style.background="#FFFFFF";this.HtmlArea.style.color="black";this.HtmlDiv.style.zIndex=90;this.HtmlDiv.style.border="2px solid #4363A4";this.isShow=true}},unshow:function(isAttack){if(this.isDebug||this.isSystem||true==isAttack){this.log("ti: unshow"); +document.getElementById("area_id_main").style.zIndex=0;this.HtmlArea.style.top=-this.HtmlAreaOffset+"px";this.HtmlArea.style.width="1000px";this.HtmlArea.style.height="50px";this.HtmlArea.style.background="transparent";this.HtmlArea.style.color="transparent";this.HtmlDiv.style.zIndex=0;this.HtmlDiv.style.border="none";this.isShow=false}},debugCalculatePlace:function(x,y){var _left=x;var _top=y;if(undefined==_left)_left=parseInt(this.HtmlDiv.style.left);if(undefined==_top)_top=parseInt(this.HtmlDiv.style.top); +var _r_max=this.editorSdkW;var _b_max=this.editorSdkH;_r_max-=60;if(_r_max-_left>50)this.debugTexBoxMaxW=_r_max-_left;else{_left=_r_max-50;this.debugTexBoxMaxW=50}_b_max-=40;if(_b_max-_top>50)this.debugTexBoxMaxH=_b_max-_top;else{_top=_b_max-50;this.debugTexBoxMaxH=50}if(AscCommon.AscBrowser.isSafari&&AscCommon.AscBrowser.isMobile)_left=-100;this.HtmlDiv.style.left=_left+"px";this.HtmlDiv.style.top=_top+"px";var _height=22;var _t=this.getAreaValue();if(0!=_t.length){var _editorSdk=document.getElementById("editor_sdk"); +var _p=document.createElement("p");_p.style.zIndex="-1";_p.style.position="absolute";_p.style.fontFamily="arial";_p.style.fontSize="12pt";_p.style.left="0px";_p.style.width=this.debugTexBoxMaxW+"px";_editorSdk.appendChild(_p);_t=_t.replace(/ /g," ");_p.innerHTML=""+_t+"";var _width=_p.firstChild.offsetWidth;_width=Math.min(_width+20,this.debugTexBoxMaxW);if(AscCommon.AscBrowser.isIE)_width+=10;var area=document.createElement("textarea");area.style.zIndex="-1";area.id="area2_id"; +area.rows=1;area.setAttribute("style","font-family:arial;font-size:12pt;position:absolute;resize:none;padding:0px;margin:0px;font-weight:normal;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;");area.style.overflow="hidden";area.style.width=_width+"px";_editorSdk.appendChild(area);area.value=this.getAreaValue();_height=area.clientHeight;if(area.scrollHeight>_height)_height=area.scrollHeight;_editorSdk.removeChild(_p);_editorSdk.removeChild(area)}if(_height>this.debugTexBoxMaxH)_height= +this.debugTexBoxMaxH;this.HtmlDiv.style.width=_width+"px";this.HtmlDiv.style.height=_height+"px";var oldZindex=parseInt(this.HtmlDiv.style.zIndex);var newZindex=oldZindex==90?"89":"90";this.HtmlDiv.style.zIndex=newZindex},onInput:function(e,isFromCompositionUpdate){if(this.Api.isLongAction()||this.Api.isViewMode){AscCommon.stopEvent(e);return false}if(this.isSystem){if(!this.isShow)this.show();this.debugCalculatePlace(undefined,undefined);return}if(this.isKeyPressOnUp&&this.keyPressOnUpCodes.length> +0){if(!this.TextArea_Not_ContentEditableDiv)this.HtmlArea.innerHTML="";else this.HtmlArea.value="";this.TextBeforeComposition="";this.Text="";AscCommon.stopEvent(e);return false}this.log("ti: onInput");this.Text=this.getAreaValue();this.Text=this.Text.split(" ").join(" ");var codes=[];if(this.IsComposition||this.ApiIsComposition){var ieStart=-1;var ieEnd=-1;if(true){var target=e.target;if(target["msGetInputContext"]){var ctx=target["msGetInputContext"]();if(ctx){ieStart=ctx["compositionStartOffset"]; +ieEnd=ctx["compositionEndOffset"]}}}this.CompositionEnd=this.Text.length;this.CompositionStart=this.TextBeforeComposition.length;var textReplace=this.Text.substr(this.CompositionStart);var iter;for(iter=textReplace.getUnicodeIterator();iter.check();iter.next())codes.push(iter.value());var isAsync=AscFonts.FontPickerByCharacter.checkTextLight(codes,true);if(!isAsync){if(ieStart>this.CompositionStart){textReplace=textReplace.substr(0,ieStart-this.CompositionStart);codes=[];for(iter=textReplace.getUnicodeIterator();iter.check();iter.next())codes.push(iter.value()); +this.apiCompositeReplace(codes);this.apiCompositeEnd();this.TextBeforeComposition=this.Text.substr(0,ieStart);this.apiCompositeStart();this.CompositionStart=ieStart;codes=[];textReplace=this.Text.substr(this.CompositionStart);for(iter=textReplace.getUnicodeIterator();iter.check();iter.next())codes.push(iter.value());this.apiCompositeReplace(codes)}else this.apiCompositeReplace(codes);if(!this.IsComposition){this.apiCompositeEnd();this.TextBeforeComposition=this.Text}}else{AscFonts.FontPickerByCharacter.loadFonts(this, +function(){this.apiCompositeReplace(codes);this.apiCompositeEnd();this.clear();this.setReadOnly(false)});AscCommon.stopEvent(e);this.setReadOnly(true);return false}}else{var textToApi=this.Text.substr(this.TextBeforeComposition.length);for(var iter=textToApi.getUnicodeIterator();iter.check();iter.next())codes.push(iter.value());if(codes.length>0)this.apiInputText(codes);this.TextBeforeComposition=this.Text}if(!this.IsComposition)if(this.Text.length>0){var _lastCode=this.Text.charCodeAt(this.Text.length- +1);if(_lastCode==12290||_lastCode==46){AscCommon.stopEvent(e);if(AscCommon.AscBrowser.isIE&&!AscCommon.AscBrowser.isIeEdge)setTimeout(function(){window["AscCommon"].g_inputContext.clear();window["AscCommon"].g_inputContext.HtmlArea.focus()},0);else this.clear();return false}}},emulateNativeKeyDown:function(e,target){var oEvent=document.createEvent("KeyboardEvent");Object.defineProperty(oEvent,"keyCode",{get:function(){return this.keyCodeVal}});Object.defineProperty(oEvent,"which",{get:function(){return this.keyCodeVal}}); +Object.defineProperty(oEvent,"shiftKey",{get:function(){return this.shiftKeyVal}});Object.defineProperty(oEvent,"altKey",{get:function(){return this.altKeyVal}});Object.defineProperty(oEvent,"metaKey",{get:function(){return this.metaKeyVal}});Object.defineProperty(oEvent,"ctrlKey",{get:function(){return this.ctrlKeyVal}});if(AscCommon.AscBrowser.isIE)oEvent.preventDefault=function(){try{Object.defineProperty(this,"defaultPrevented",{get:function(){return true}})}catch(err){}};var k=e.keyCode;if(oEvent.initKeyboardEvent)oEvent.initKeyboardEvent("keydown", +true,true,window,false,false,false,false,k,k);else oEvent.initKeyEvent("keydown",true,true,window,false,false,false,false,k,0);oEvent.keyCodeVal=k;oEvent.shiftKeyVal=e.shiftKey;oEvent.altKeyVal=e.altKey;oEvent.metaKeyVal=e.metaKey;oEvent.ctrlKeyVal=e.ctrlKey;var _elem=target?target:_getElementKeyboardDown(this.nativeFocusElement,3);_elem.dispatchEvent(oEvent);return oEvent.defaultPrevented},isSpaceSymbol:function(e){if(e.keyCode==32)return true;if(e.keyCode==229&&(e.code=="space"||e.code=="Space"|| +e.key=="Spacebar"))return true;return false},systemInputEnable:function(isEnabled){if(this.isSystem==isEnabled)return;this.isSystem=isEnabled;this.HtmlArea.style.left=this.isSystem?"0px":"-"+(this.HtmlAreaWidth>>1)+"px";this.clear();if(this.isShow)this.unshow(true);if(this.Api.WordControl&&this.Api.WordControl.m_oLogicDocument&&this.Api.WordControl.m_oLogicDocument.Document_UpdateSelectionState)this.Api.WordControl.m_oLogicDocument.Document_UpdateSelectionState()},debugInputEnable:function(isEnabled){if(this.isDebug== +isEnabled)return;this.isDebug=isEnabled;this.HtmlArea.style.left=this.isDebug?"0px":"-"+(this.HtmlAreaWidth>>1)+"px"},apiInputText:function(codes){var isAsync=AscFonts.FontPickerByCharacter.checkTextLight(codes,true);if(!isAsync){this.apiCompositeStart();this.apiCompositeReplace(codes);this.apiCompositeEnd()}else{AscFonts.FontPickerByCharacter.loadFonts(this,function(){this.apiCompositeStart();this.apiCompositeReplace(codes);this.apiCompositeEnd();this.setReadOnly(false)});this.setReadOnly(true); +return false}},onKeyDown:function(e){if(this.Api.isLongAction()){AscCommon.stopEvent(e);return false}if(this.isInputHelpersPresent)switch(e.keyCode){case 9:case 13:case 38:case 40:case 33:case 34:case 35:case 36:case 27:{window.g_asc_plugins.onPluginEvent2("onKeyDown",{"keyCode":e.keyCode},this.isInputHelpers);AscCommon.stopEvent(e);return false}case 32:{if(window.g_asc_plugins)window.g_asc_plugins.onPluginEvent("onInputHelperInput",{"text":this.keyPressInput})}default:break}else if(32==e.keyCode); +if(this.isSystem&&this.isShow){if(e.keyCode==13){var text=this.getAreaValue();var codes=[];for(var iter=text.getUnicodeIterator();iter.check();iter.next())codes.push(iter.value());this.apiInputText(codes);this.clear();this.unshow();AscCommon.stopEvent(e);return false}else if(e.keyCode==27){this.clear();this.unshow();AscCommon.stopEvent(e);return false}return}if(null!=this.nativeFocusElement)if(this.emulateNativeKeyDown(e)){e.preventDefault();return false}var _code=e.keyCode;if(_code!=8&&_code!=46)this.KeyDownFlag= +true;AscCommon.check_KeyboardEvent(e);var arrCodes=this.Api.getAddedTextOnKeyDown(AscCommon.global_keyboardEvent);var isAsync=AscFonts.FontPickerByCharacter.checkTextLight(arrCodes,true);if(isAsync){AscFonts.FontPickerByCharacter.loadFonts(this,function(){this.onKeyDown(e);this.onKeyUp(e);this.setReadOnly(false)});AscCommon.stopEvent(e);this.setReadOnly(true);return false}var ret=this.Api.onKeyDown(e);switch(e.keyCode){case 8:{var oldKeyPressInput=this.keyPressInput;this.clear();if(oldKeyPressInput.length> +1){this.keyPressInput=oldKeyPressInput.substr(0,oldKeyPressInput.length-1);if(window.g_asc_plugins)window.g_asc_plugins.onPluginEvent("onInputHelperInput",{"text":this.keyPressInput})}return false}case 9:case 13:case 37:case 38:case 39:case 40:case 33:case 34:case 35:case 36:{this.clear();return false}case 46:case 45:{if(!AscCommon.global_keyboardEvent.CtrlKey&&!AscCommon.global_keyboardEvent.ShiftKey){this.clear();return false}}default:break}if(e.keyCode==32&&AscCommon.global_keyboardEvent.CtrlKey&& +!AscCommon.global_keyboardEvent.ShiftKey)if(window.g_asc_plugins)window.g_asc_plugins.onPluginEvent("onClick");return ret},onKeyPress:function(e){if(this.Api.isLongAction()||!this.Api.asc_IsFocus()||this.Api.isViewMode){AscCommon.stopEvent(e);return false}if(this.isSystem)return;if(this.KeyDownFlag)this.KeyPressFlag=true;if(this.IsComposition)return;if(e.which==13&&e.keyCode==13||e.which==10&&e.keyCode==10){AscCommon.stopEvent(e);return false}var c=e.which||e.keyCode;var isAsync=c>=32?AscFonts.FontPickerByCharacter.checkTextLight([c], +true):false;if(isAsync){AscFonts.FontPickerByCharacter.loadFonts(this,function(){this.apiCompositeStart();this.apiCompositeReplace([c]);this.apiCompositeEnd();this.setReadOnly(false)});AscCommon.stopEvent(e);this.setReadOnly(true);return false}if(this.isKeyPressOnUp){var isSaveCode=true;switch(e.which){case 46:{isSaveCode=false;break}default:break}if(isSaveCode){if(this.isKeyPressOnUpStackedMode)this.keyPressOnUpCodes.push({which:e.which,charCode:e.charCode,keyCode:e.keyCode,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey, +metaKey:e.metaKey,altKey:e.altKey,preventDefault:function(){}});return}}var ret=this.Api.onKeyPress(e);switch(e.which){case 46:{AscCommon.stopEvent(e);this.clear();return false}default:break}this.keyPressInput+=String.fromCharCode(e.which);if(window.g_asc_plugins)window.g_asc_plugins.onPluginEvent("onInputHelperInput",{"text":this.keyPressInput});AscCommon.stopEvent(e);return ret},onKeyUp:function(e){if(this.Api.isLongAction()){AscCommon.stopEvent(e);return false}if(this.isSystem&&this.isShow)return; +if(this.isKeyPressOnUp&&this.keyPressOnUpCodes.length>0){this.isKeyPressOnUp=false;for(var i=0;i0){var range= +sel.getRangeAt(0);_offset=range.endOffset}}return _offset},checkTargetPosition:function(isCorrect){var _offset=this.getAreaPos();if(false!==isCorrect){var _value=this.getAreaValue();_offset-=_value.length-this.compositionValue.length}if(!this.IsLockTargetMode)if(_offset==0&&this.compositionValue.length==1)_offset=1;this.Api.Set_CursorPosInCompositeText(_offset);this.unlockTarget()},lockTarget:function(){if(!this.IsLockTargetMode)return;if(-1!=this.LockerTargetTimer)clearTimeout(this.LockerTargetTimer); +this.Api.asc_LockTargetUpdate(true);var oThis=this;this.LockerTargetTimer=setTimeout(function(){oThis.unlockTarget()},1E3)},unlockTarget:function(){if(!this.IsLockTargetMode)return;if(-1!=this.LockerTargetTimer)clearTimeout(this.LockerTargetTimer);this.LockerTargetTimer=-1;this.Api.asc_LockTargetUpdate(false)},clearLastCompositeText:function(){this.LastReplaceText=[];this.IsLastReplaceFlag=false},apiCompositeStart:function(){},apiCompositeReplace:function(_value){if(this.Api.isLongAction())return false; +if(!this.ApiIsComposition){this.Api.Begin_CompositeInput();this.clearLastCompositeText()}this.ApiIsComposition=true;if(this.IsLastReplaceFlag)if(_value.length==this.LastReplaceText.length){var isEqual=true;for(var nC=0;nC<_value.length;nC++)if(_value[nC]!=this.LastReplaceText[nC]){isEqual=false;break}if(isEqual)return}this.Api.Replace_CompositeText(_value);if(window.g_asc_plugins){this.keyPressInput=String.fromCodePoint.apply(this,_value);window.g_asc_plugins.onPluginEvent("onInputHelperInput",{"text":this.keyPressInput})}this.LastReplaceText= +_value.slice();this.IsLastReplaceFlag=true},apiCompositeEnd:function(){if(!this.ApiIsComposition)return;this.ApiIsComposition=false;this.Api.End_CompositeInput();this.clearLastCompositeText()},onCompositionStart:function(e){if(this.isSystem)return;this.IsComposition=true;this.keyPressOnUpCodes=[]},onCompositionUpdate:function(e){if(this.isSystem)return;this.IsComposition=true;this.keyPressOnUpCodes=[];this.onInput(e,true)},onCompositionEnd:function(e){if(this.isSystem)return;this.IsComposition=false; +this.onInput(e,true)},setInterfaceEnableKeyEvents:function(value){this.InterfaceEnableKeyEvents=value;if(true==this.InterfaceEnableKeyEvents){if(document.activeElement){var _id=document.activeElement.id;if(_id=="area_id"||window.g_asc_plugins&&window.g_asc_plugins.checkRunnedFrameId(_id))return}this.HtmlArea.focus()}},externalEndCompositeInput:function(){this.clear()},externalChangeFocus:function(){if(!this.IsComposition)return false;setTimeout(function(){window["AscCommon"].g_inputContext.clear()}, +10);return true},isCompositionProcess:function(){return this.IsComposition},preventVirtualKeyboard:function(e){if(this.isHardCheckKeyboard)return;if(AscCommon.AscBrowser.isAndroid){this.setReadOnlyWrapper(true);this.virtualKeyboardClickPrevent=true;this.virtualKeyboardClickTimeout=setTimeout(function(){window["AscCommon"].g_inputContext.setReadOnlyWrapper(false);window["AscCommon"].g_inputContext.virtualKeyboardClickTimeout=-1},1)}},enableVirtualKeyboard:function(){if(this.isHardCheckKeyboard)return; +if(AscCommon.AscBrowser.isAndroid){if(-1!=this.virtualKeyboardClickTimeout){clearTimeout(this.virtualKeyboardClickTimeout);this.virtualKeyboardClickTimeout=-1}this.setReadOnlyWrapper(false);this.virtualKeyboardClickPrevent=false}},preventVirtualKeyboard_Hard:function(){this.setReadOnlyWrapper(true)},enableVirtualKeyboard_Hard:function(){this.setReadOnlyWrapper(false)}};function _getAttirbute(_elem,_attr,_depth){var _elemTest=_elem;for(var _level=0;_elemTest&&_level<_depth;++_level,_elemTest=_elemTest.parentNode){var _res= +_elemTest.getAttribute?_elemTest.getAttribute(_attr):null;if(null!=_res)return _res}return null}function _getElementKeyboardDown(_elem,_depth){var _elemTest=_elem;for(var _level=0;_elemTest&&_level<_depth;++_level,_elemTest=_elemTest.parentNode){var _res=_elemTest.getAttribute?_elemTest.getAttribute("oo_editor_keyboard"):null;if(null!=_res)return _elemTest}return null}function _getDefaultKeyboardInput(_elem,_depth){var _elemTest=_elem;for(var _level=0;_elemTest&&_level<_depth;++_level,_elemTest=_elemTest.parentNode){var _name= +" "+_elemTest.className+" ";if(_name.indexOf(" dropdown-menu")>-1||_name.indexOf(" dropdown-toggle ")>-1||_name.indexOf(" dropdown-submenu ")>-1||_name.indexOf(" canfocused ")>-1)return"true"}return null}window["AscCommon"]=window["AscCommon"]||{};window["AscCommon"].CTextInput=CTextInput;window["AscCommon"].InitBrowserInputContext=function(api,target_id,parent_id){if(window["AscCommon"].g_inputContext)return;window["AscCommon"].g_inputContext=new CTextInput(api);window["AscCommon"].g_inputContext.init(target_id, +parent_id);window["AscCommon"].g_clipboardBase.Init(api);window["AscCommon"].g_clipboardBase.inputContext=window["AscCommon"].g_inputContext;if(window["AscCommon"].TextBoxInputMode===true)window["AscCommon"].g_inputContext.systemInputEnable(true);document.addEventListener("focus",function(e){var t=window["AscCommon"].g_inputContext;var _oldNativeFE=t.nativeFocusElement;t.nativeFocusElement=e.target;if(t.IsComposition){t.apiCompositeEnd();t.externalEndCompositeInput()}if(!t.isSystem&&!t.isNoClearOnFocus)t.clear(true); +t.isNoClearOnFocus=false;var _nativeFocusElementNoRemoveOnElementFocus=t.nativeFocusElementNoRemoveOnElementFocus;t.nativeFocusElementNoRemoveOnElementFocus=false;if(t.InterfaceEnableKeyEvents==false){t.nativeFocusElement=null;return}if(t.nativeFocusElement&&t.nativeFocusElement.id==t.HtmlArea.id){t.Api.asc_enableKeyEvents(true,true);if(_nativeFocusElementNoRemoveOnElementFocus)t.nativeFocusElement=_oldNativeFE;else t.nativeFocusElement=null;return}if(t.nativeFocusElement&&t.nativeFocusElement.id== +window["AscCommon"].g_clipboardBase.CommonDivId){t.nativeFocusElement=null;return}t.nativeFocusElementNoRemoveOnElementFocus=false;var _isElementEditable=false;if(t.nativeFocusElement){var _name=t.nativeFocusElement.nodeName;if(_name)_name=_name.toUpperCase();if("INPUT"==_name||"TEXTAREA"==_name)_isElementEditable=true;else if("DIV"==_name)if(t.nativeFocusElement.getAttribute("contenteditable")=="true")_isElementEditable=true}if("IFRAME"==_name){t.Api.asc_enableKeyEvents(false,true);t.nativeFocusElement= +null;return}var _oo_editor_input=_getAttirbute(t.nativeFocusElement,"oo_editor_input",3);var _oo_editor_keyboard=_getAttirbute(t.nativeFocusElement,"oo_editor_keyboard",3);if(!_oo_editor_input&&!_oo_editor_keyboard)_oo_editor_input=_getDefaultKeyboardInput(t.nativeFocusElement,3);if(_oo_editor_keyboard=="true")_oo_editor_input=undefined;if(_oo_editor_input=="true"){t.Api.asc_enableKeyEvents(false,true);t.nativeFocusElement=null;return}if(_isElementEditable&&_oo_editor_input!="false"){t.Api.asc_enableKeyEvents(false, +true);t.nativeFocusElement=null;return}if(_oo_editor_keyboard!="true")t.nativeFocusElement=null;var _elem=t.nativeFocusElement;t.nativeFocusElementNoRemoveOnElementFocus=true;AscCommon.AscBrowser.isMozilla?setTimeout(function(){t.HtmlArea.focus()},0):t.HtmlArea.focus();t.nativeFocusElement=_elem;t.Api.asc_enableKeyEvents(true,true)},true);if(!api.isMobileVersion&&!api.isEmbedVersion)window["AscCommon"].g_inputContext.HtmlArea.focus()};window["SetInputDebugMode"]=function(){if(!window["AscCommon"].g_inputContext)return; +window["AscCommon"].g_inputContext.debugInputEnable(true);window["AscCommon"].g_inputContext.show()}})(window);"use strict";(function(window,undefined){function COleSize(w,h){this.w=w;this.h=h}COleSize.prototype.Write_ToBinary=function(Writer){Writer.WriteLong(this.w);Writer.WriteLong(this.h)};COleSize.prototype.Read_FromBinary=function(Reader){this.w=Reader.GetLong();this.h=Reader.GetLong()};AscDFH.changesFactory[AscDFH.historyitem_ImageShapeSetData]=AscDFH.CChangesDrawingsString;AscDFH.changesFactory[AscDFH.historyitem_ImageShapeSetApplicationId]= +AscDFH.CChangesDrawingsString;AscDFH.changesFactory[AscDFH.historyitem_ImageShapeSetPixSizes]=AscDFH.CChangesDrawingsObjectNoId;AscDFH.changesFactory[AscDFH.historyitem_ImageShapeSetObjectFile]=AscDFH.CChangesDrawingsString;AscDFH.changesFactory[AscDFH.historyitem_ImageShapeSetOleType]=AscDFH.CChangesDrawingsLong;AscDFH.drawingsConstructorsMap[AscDFH.historyitem_ChartStyleEntryDefRPr]=AscCommonWord.CTextPr;function CChangesOleObjectBinary(Class,Old,New,Color){AscDFH.CChangesBaseProperty.call(this, +Class,Old,New,Color)}CChangesOleObjectBinary.prototype=Object.create(AscDFH.CChangesBaseProperty.prototype);CChangesOleObjectBinary.prototype.Type=AscDFH.historyitem_ImageShapeSetBinaryData;CChangesOleObjectBinary.prototype.private_SetValue=function(Value){this.Class.m_aBinaryData=Value};CChangesOleObjectBinary.prototype.WriteToBinary=function(Writer){Writer.WriteBool(this.New!==null);if(this.New!==null){Writer.WriteLong(this.New.length);Writer.WriteBuffer(this.New,0,this.New.length)}};CChangesOleObjectBinary.prototype.ReadFromBinary= +function(Reader){if(Reader.GetBool()){var length=Reader.GetLong();this.New=Reader.GetBuffer(length)}};AscDFH.changesFactory[AscDFH.historyitem_ImageShapeSetBinaryData]=CChangesOleObjectBinary;AscDFH.drawingsChangesMap[AscDFH.historyitem_ImageShapeSetData]=function(oClass,value){oClass.m_sData=value};AscDFH.drawingsChangesMap[AscDFH.historyitem_ImageShapeSetApplicationId]=function(oClass,value){oClass.m_sApplicationId=value};AscDFH.drawingsChangesMap[AscDFH.historyitem_ImageShapeSetPixSizes]=function(oClass, +value){if(value){oClass.m_nPixWidth=value.w;oClass.m_nPixHeight=value.h}};AscDFH.drawingsConstructorsMap[AscDFH.historyitem_ImageShapeSetPixSizes]=COleSize;AscDFH.drawingsChangesMap[AscDFH.historyitem_ImageShapeSetObjectFile]=function(oClass,value){oClass.m_sObjectFile=value};AscDFH.drawingsChangesMap[AscDFH.historyitem_ImageShapeSetOleType]=function(oClass,value){oClass.m_nOleType=value};function COleObject(){AscFormat.CImageShape.call(this);this.m_sData=null;this.m_sApplicationId=null;this.m_nPixWidth= +null;this.m_nPixHeight=null;this.m_fDefaultSizeX=null;this.m_fDefaultSizeY=null;this.m_sObjectFile=null;this.m_nOleType=null;this.m_aBinaryData=null}COleObject.prototype=Object.create(AscFormat.CImageShape.prototype);COleObject.prototype.constructor=COleObject;COleObject.prototype.getObjectType=function(){return AscDFH.historyitem_type_OleObject};COleObject.prototype.setData=function(sData){AscCommon.History.Add(new AscDFH.CChangesDrawingsString(this,AscDFH.historyitem_ImageShapeSetData,this.m_sData, +sData));this.m_sData=sData};COleObject.prototype.setApplicationId=function(sApplicationId){AscCommon.History.Add(new AscDFH.CChangesDrawingsString(this,AscDFH.historyitem_ImageShapeSetApplicationId,this.m_sApplicationId,sApplicationId));this.m_sApplicationId=sApplicationId};COleObject.prototype.setPixSizes=function(nPixWidth,nPixHeight){AscCommon.History.Add(new AscDFH.CChangesDrawingsObjectNoId(this,AscDFH.historyitem_ImageShapeSetPixSizes,new COleSize(this.m_nPixWidth,this.m_nPixHeight),new COleSize(nPixWidth, +nPixHeight)));this.m_nPixWidth=nPixWidth;this.m_nPixHeight=nPixHeight};COleObject.prototype.setObjectFile=function(sObjectFile){AscCommon.History.Add(new AscDFH.CChangesDrawingsString(this,AscDFH.historyitem_ImageShapeSetObjectFile,this.m_sObjectFile,sObjectFile));this.m_sObjectFile=sObjectFile};COleObject.prototype.setOleType=function(nOleType){AscCommon.History.Add(new AscDFH.CChangesDrawingsLong(this,AscDFH.historyitem_ImageShapeSetOleType,this.m_nOleType,nOleType));this.m_nOleType=nOleType};COleObject.prototype.setBinaryData= +function(aBinaryData){AscCommon.History.Add(new CChangesOleObjectBinary(this,this.m_aBinaryData,aBinaryData,false));this.m_aBinaryData=aBinaryData};COleObject.prototype.canRotate=function(){return false};COleObject.prototype.copy=function(){var copy=new COleObject;if(this.nvPicPr)copy.setNvPicPr(this.nvPicPr.createDuplicate());if(this.spPr){copy.setSpPr(this.spPr.createDuplicate());copy.spPr.setParent(copy)}if(this.blipFill)copy.setBlipFill(this.blipFill.createDuplicate());if(this.style)copy.setStyle(this.style.createDuplicate()); +copy.setBDeleted(this.bDeleted);copy.setData(this.m_sData);copy.setApplicationId(this.m_sApplicationId);copy.setPixSizes(this.m_nPixWidth,this.m_nPixHeight);copy.setObjectFile(this.m_sObjectFile);copy.setOleType(this.m_nOleType);if(this.m_aBinaryData!==null)copy.setBinaryData(this.m_aBinaryData.slice(0,this.m_aBinaryData.length));if(this.macro!==null)copy.setMacro(this.macro);if(this.textLink!==null)copy.setTextLink(this.textLink);copy.cachedImage=this.getBase64Img();copy.cachedPixH=this.cachedPixH; +copy.cachedPixW=this.cachedPixW;return copy};COleObject.prototype.handleUpdateExtents=function(){if(!AscFormat.isRealNumber(this.m_fDefaultSizeX)||!AscFormat.isRealNumber(this.m_fDefaultSizeY))if(this.spPr&&this.spPr.xfrm&&AscFormat.isRealNumber(this.spPr.xfrm.extX)&&AscFormat.isRealNumber(this.spPr.xfrm.extY)&&this.spPr.xfrm.extX>0&&this.spPr.xfrm.extY>0){this.m_fDefaultSizeX=this.spPr.xfrm.extX;this.m_fDefaultSizeY=this.spPr.xfrm.extY}AscFormat.CImageShape.prototype.handleUpdateExtents.call(this, [])};COleObject.prototype.checkTypeCorrect=function(){var bCorrectData=false;if(this.m_sData)bCorrectData=true;else if(this.m_sObjectFile)bCorrectData=true;if(!bCorrectData)return false;if(this.m_sApplicationId===null)return false;return true};window["AscFormat"]=window["AscFormat"]||{};window["AscFormat"].COleObject=COleObject})(window);"use strict";(function(window,undefined){function CDrawingDocContent(Parent,DrawingDocument,X,Y,XLimit,YLimit){CDocumentContent.call(this,Parent,DrawingDocument, X,Y,XLimit,YLimit,false,false,true);this.FullRecalc=new CDocumentRecalculateState;this.AllFields=[]}CDrawingDocContent.prototype=Object.create(CDocumentContent.prototype);CDrawingDocContent.prototype.constructor=CDrawingDocContent;CDrawingDocContent.prototype.CalculateAllFields=function(){var aParagraphs=this.Content;this.AllFields.length=0;for(var i=0;i