"+this.criticalErrorExtText,n.callback=function(t){"ok"==t&&Common.NotificationCenter.trigger("goback",!0)}),t==Asc.c_oAscError.ID.DataEncrypted&&(this.api.asc_coAuthoringDisconnect(),Common.NotificationCenter.trigger("api:disconnect"))):(Common.Gateway.reportWarning(t,n.msg),n.title=this.notcriticalErrorTitle,n.iconCls="warn",n.buttons=["ok"],n.callback=_.bind(function(e){if(t==Asc.c_oAscError.ID.Warning&&"ok"==e&&this.appOptions.canDownload)Common.UI.Menu.Manager.hideAll(),this.appOptions.isDesktopApp&&this.appOptions.isOffline?this.api.asc_DownloadAs():this.getApplication().getController("LeftMenu").leftMenu.showMenu("file:saveas");else if(t==Asc.c_oAscError.ID.SplitCellMaxRows||t==Asc.c_oAscError.ID.SplitCellMaxCols||t==Asc.c_oAscError.ID.SplitCellRowsDivider){var i=this;setTimeout(function(){new Common.Views.InsertTableDialog({split:!0,handler:function(t,e){"ok"==t&&i.api&&i.api.SplitCell(e.columns,e.rows),i.onEditComplete()}}).show()},10)}else t==Asc.c_oAscError.ID.EditingError&&(this.disableEditing(!0),Common.NotificationCenter.trigger("api:disconnect",!0));this._state.lostEditingRights=!1,this.onEditComplete()},this)),t!==Asc.c_oAscError.ID.ForceSaveTimeout&&Common.UI.alert(n),Common.component.Analytics.trackEvent("Internal Error",t.toString())},onCoAuthoringDisconnect:function(){this.getApplication().getController("Viewport").getView("Viewport").setMode({isDisconnected:!0}),t.setCanRename(!1),this.appOptions.canRename=!1,this._state.isDisconnected=!0
-},showTips:function(t){function e(){var e=t.shift();e&&(e+="\n"+i.textCloseTip,n.setTitle(e),n.show())}var i=this;if(t.length){"object"!=typeof t&&(t=[t]),this.tooltip||(this.tooltip=new Common.UI.Tooltip({owner:this.getApplication().getController("Toolbar").getView("Toolbar"),hideonclick:!0,placement:"bottom",cls:"main-info",offset:30}));var n=this.tooltip;n.on("tooltip:hide",function(){setTimeout(e,300)}),e()}},updateWindowTitle:function(e){var i=this.api.isDocumentModified();if(this._state.isDocModified!==i||e){var n=this.defaultTitleText;t&&!_.isEmpty(t.getDocumentCaption())&&(n=t.getDocumentCaption()+" - "+n),i&&(clearTimeout(this._state.timerCaption),_.isUndefined(n)||(n="* "+n)),window.document.title!=n&&(window.document.title=n),Common.Gateway.setDocumentModified(i),i&&(!this._state.fastCoauth||this._state.usersCount<2)&&this.getApplication().getController("Statusbar").setStatusCaption("",!0),this._state.isDocModified=i}},onDocumentChanged:function(){},onDocumentModifiedChanged:function(){var t=this.api.asc_isDocumentCanSave();this._state.isDocModified!==t&&Common.Gateway.setDocumentModified(this.api.isDocumentModified()),this.updateWindowTitle();var e=this.getApplication().getController("Toolbar").getView("Toolbar");if(e&&e.btnCollabChanges){var i=e.btnCollabChanges.$icon.hasClass("btn-synch"),n=this.appOptions.forcesave,o=!t&&!i&&!n||this._state.isDisconnected||this._state.fastCoauth&&this._state.usersCount>1&&!n;e.btnSave.setDisabled(o)}},onDocumentCanSaveChanged:function(t){var e=this.getApplication().getController("Toolbar").getView("Toolbar");if(e){var i=e.btnCollabChanges.$icon.hasClass("btn-synch"),n=this.appOptions.forcesave,o=!t&&!i&&!n||this._state.isDisconnected||this._state.fastCoauth&&this._state.usersCount>1&&!n;e.btnSave.setDisabled(o)}},onContextMenu:function(t){var e=t.target.getAttribute("data-can-copy"),i=t.target instanceof HTMLInputElement||t.target instanceof HTMLTextAreaElement;if(i&&"false"===e||!i&&"true"!==e)return t.stopPropagation(),t.preventDefault(),!1},onBeforeUnload:function(){if(Common.localStorage.save(),this.api.isDocumentModified()){var t=this;return this.api.asc_stopSaving(),this.continueSavingTimer=window.setTimeout(function(){t.api.asc_continueSaving()},500),this.leavePageText}},onUnload:function(){this.continueSavingTimer&&clearTimeout(this.continueSavingTimer)},hidePreloader:function(){var t;this._state.customizationDone||(this._state.customizationDone=!0,this.appOptions.customization&&(this.appOptions.isDesktopApp?this.appOptions.customization.about=!1:this.appOptions.canBrandingExt||(this.appOptions.customization.about=!0)),Common.Utils.applyCustomization(this.appOptions.customization,e),this.appOptions.canBrandingExt&&(Common.Utils.applyCustomization(this.appOptions.customization,i),t=this.getApplication().getController("Common.Controllers.Plugins").applyUICustomization())),Common.NotificationCenter.trigger("layout:changed","main"),(t||new Promise(function(t,e){t()})).then(function(){$("#loading-mask").hide().remove(),Common.Controllers.Desktop.process("preloader:hide")})},onDownloadUrl:function(t){this._state.isFromGatewayDownloadAs&&Common.Gateway.downloadAs(t),this._state.isFromGatewayDownloadAs=!1},onUpdateVersion:function(t){var e=this;e.needToUpdateVersion=!0,e.onLongActionEnd(Asc.c_oAscAsyncActionType.BlockInteraction,-256),Common.UI.error({msg:this.errorUpdateVersion,callback:function(){_.defer(function(){Common.Gateway.updateVersion(),t&&t.call(e),e.onLongActionBegin(Asc.c_oAscAsyncActionType.BlockInteraction,-256)})}})},onServerVersion:function(t){return!1},fillUserStore:function(t){if(!_.isEmpty(t)){var e=this.getCommonStoreUsersStore();e&&e.add(t)}},onCollaborativeChanges:function(){this._state.hasCollaborativeChanges||(this._state.hasCollaborativeChanges=!0,this.appOptions.isEdit&&this.getApplication().getController("Statusbar").setStatusCaption(this.txtNeedSynchronize,!0))},synchronizeChanges:function(){this.getApplication().getController("Statusbar").setStatusCaption(""),this.getApplication().getController("DocumentHolder").getView("DocumentHolder").hideTips(),this.getApplication().getController("Toolbar").getView("Toolbar").synchronizeChanges(),this._state.hasCollaborativeChanges=!1},initNames:function(){this.shapeGroupNames=[this.txtBasicShapes,this.txtFiguredArrows,this.txtMath,this.txtCharts,this.txtStarsRibbons,this.txtCallouts,this.txtButtons,this.txtRectangles,this.txtLines],this.layoutNames=[this.txtSldLtTBlank,this.txtSldLtTChart,this.txtSldLtTChartAndTx,this.txtSldLtTClipArtAndTx,this.txtSldLtTClipArtAndVertTx,this.txtSldLtTCust,this.txtSldLtTDgm,this.txtSldLtTFourObj,this.txtSldLtTMediaAndTx,this.txtSldLtTObj,this.txtSldLtTObjAndTwoObj,this.txtSldLtTObjAndTx,this.txtSldLtTObjOnly,this.txtSldLtTObjOverTx,this.txtSldLtTObjTx,this.txtSldLtTPicTx,this.txtSldLtTSecHead,this.txtSldLtTTbl,this.txtSldLtTTitle,this.txtSldLtTTitleOnly,this.txtSldLtTTwoColTx,this.txtSldLtTTwoObj,this.txtSldLtTTwoObjAndObj,this.txtSldLtTTwoObjAndTx,this.txtSldLtTTwoObjOverTx,this.txtSldLtTTwoTxTwoObj,this.txtSldLtTTx,this.txtSldLtTTxAndChart,this.txtSldLtTTxAndClipArt,this.txtSldLtTTxAndMedia,this.txtSldLtTTxAndObj,this.txtSldLtTTxAndTwoObj,this.txtSldLtTTxOverObj,this.txtSldLtTVertTitleAndTx,this.txtSldLtTVertTitleAndTxOverChart,this.txtSldLtTVertTx]},onInsertTable:function(){this.getApplication().getController("RightMenu").onInsertTable()},onInsertImage:function(){this.getApplication().getController("RightMenu").onInsertImage()},onInsertChart:function(){this.getApplication().getController("RightMenu").onInsertChart()},onInsertShape:function(){this.getApplication().getController("RightMenu").onInsertShape()},onInsertTextArt:function(){this.getApplication().getController("RightMenu").onInsertTextArt()},unitsChanged:function(t){var e=Common.localStorage.getItem("pe-settings-unit");e=null!==e?parseInt(e):Common.Utils.Metric.getDefaultMetric(),Common.Utils.Metric.setCurrentMetric(e),Common.Utils.InternalSettings.set("pe-settings-unit",e),this.api.asc_SetDocumentUnits(e==Common.Utils.Metric.c_MetricUnits.inch?Asc.c_oAscDocumentUnits.Inch:e==Common.Utils.Metric.c_MetricUnits.pt?Asc.c_oAscDocumentUnits.Point:Asc.c_oAscDocumentUnits.Millimeter),this.getApplication().getController("RightMenu").updateMetricUnit()},updateThemeColors:function(){var t=this;setTimeout(function(){t.getApplication().getController("RightMenu").UpdateThemeColors()},50),setTimeout(function(){t.getApplication().getController("Toolbar").updateThemeColors()},50)},onSendThemeColors:function(t,e){if(Common.Utils.ThemeColor.setColors(t,e),window.styles_loaded){this.updateThemeColors();var i=this;setTimeout(function(){i.fillTextArt(i.api.asc_getTextArtPreviews())},1)}},onFocusObject:function(t){var e=this.getApplication().getController("RightMenu");e&&e.onFocusObject.call(e,t)},_onChangeObjectLock:function(){var t=this.api.getSelectedElements();this.onFocusObject(t),this.getApplication().getController("Toolbar")._onFocusObject(t)},onThumbnailsShow:function(t){this.isThumbnailsShow=t},fillAutoShapes:function(t,e){if(!_.isEmpty(e)&&!_.isEmpty(t)&&e.length==t.length){var i=this,n=[];_.each(t,function(t,o){var s=new Backbone.Collection([],{model:PE.Models.ShapeModel}),a=e[o].length>18?7:6,l=35*Math.ceil(e[o].length/a)+3,r=30*a;_.each(e[o],function(t,e){s.add({data:{shapeType:t.Type},tip:i["txtShape_"+t.Type]||i.textShape+" "+(e+1),allowSelected:!0,selected:!1})}),n.push({groupName:i.shapeGroupNames[o],groupStore:s,groupWidth:r,groupHeight:l})}),this.getCollection("ShapeGroups").reset(n)}},fillLayoutsStore:function(t){var e=this;if(!_.isEmpty(t)){var i=this.getCollection("SlideLayouts");if(i){var n=[];_.each(t,function(t){var i=t.get_Name();n.push({imageUrl:t.get_Image(),title:""!==i?i:e.layoutNames[t.getType()],itemWidth:t.get_Width(),itemHeight:t.get_Height(),data:{type:t.getType(),idx:t.getIndex()},allowSelected:!0,selected:!1})}),i.reset(n)}}},fillTextArt:function(t){if(!_.isEmpty(t)){var e=this,i=[],n=this.getCollection("Common.Collections.TextArt");_.each(t,function(t,e){i.push({imageUrl:t,data:e,allowSelected:!0,selected:!1})}),n.reset(i),setTimeout(function(){e.getApplication().getController("RightMenu").fillTextArt()},50)}},loadLanguages:function(t){var e,i=[],n=Common.util.LanguageInfo.getLanguages();for(var o in n)n.hasOwnProperty(o)&&(e=n[o],e[2]&&i.push({displayValue:e[1],value:e[0],code:parseInt(o),spellcheck:_.indexOf(t,o)>-1}));i.sort(function(t,e){return t.valuee.value?1:0}),this.languages=i,window.styles_loaded&&this.setLanguages()},setLanguages:function(){(!this.languages||this.languages.length<1)&&this.loadLanguages([]),this.languages&&this.languages.length>0&&(this.getApplication().getController("DocumentHolder").getView("DocumentHolder").setLanguages(this.languages),this.getApplication().getController("Statusbar").setLanguages(this.languages),this.getApplication().getController("Common.Controllers.ReviewChanges").setLanguages(this.languages))},onTryUndoInFastCollaborative:function(){window.localStorage.getBool("pe-hide-try-undoredo")||Common.UI.info({width:500,msg:this.textTryUndoRedo,iconCls:"info",buttons:["custom","cancel"],primary:"custom",customButtonText:this.textStrict,dontshow:!0,callback:_.bind(function(t,e){e&&window.localStorage.setItem("pe-hide-try-undoredo",1),"custom"==t&&(Common.localStorage.setItem("pe-settings-coauthmode",0),this.api.asc_SetFastCollaborative(!1),Common.Utils.InternalSettings.set("pe-settings-coauthmode",!1),this.getApplication().getController("Common.Controllers.ReviewChanges").applySettings(),this._state.fastCoauth=!1),this.onEditComplete()},this)})},onAuthParticipantsChanged:function(t){var e=0;_.each(t,function(t){t.asc_getView()||e++}),this._state.usersCount=e},applySettings:function(){if(this.appOptions.isEdit&&!this.appOptions.isOffline&&this.appOptions.canCoAuthoring){var t=this._state.fastCoauth;this._state.fastCoauth=Common.localStorage.getBool("pe-settings-coauthmode",!0),this._state.fastCoauth&&!t&&this.synchronizeChanges()}this.appOptions.canForcesave&&(this.appOptions.forcesave=Common.localStorage.getBool("pe-settings-forcesave",this.appOptions.canForcesave),Common.Utils.InternalSettings.set("pe-settings-forcesave",this.appOptions.forcesave),this.api.asc_setIsForceSaveOnUserSave(this.appOptions.forcesave))},onDocumentName:function(e){t.setDocumentCaption(e),this.updateWindowTitle(!0)},onMeta:function(e){t.setDocumentCaption(e.title),this.updateWindowTitle(!0),this.document.title=e.title;var i=this.getApplication().getController("LeftMenu").getView("LeftMenu").getMenu("file");i.loadDocument({doc:this.document}),i.panels.info.updateInfo(this.document),Common.Gateway.metaChange(e)},onPrint:function(){this.appOptions.canPrint&&!this.isModalShowed&&(this.api&&this.api.asc_Print(new Asc.asc_CDownloadOptions(null,Common.Utils.isChrome||Common.Utils.isSafari||Common.Utils.isOpera)),Common.component.Analytics.trackEvent("Print"))},onPrintUrl:function(t){if(this.iframePrint&&(this.iframePrint.parentNode.removeChild(this.iframePrint),this.iframePrint=null),!this.iframePrint){var e=this;this.iframePrint=document.createElement("iframe"),this.iframePrint.id="id-print-frame",this.iframePrint.style.display="none",this.iframePrint.style.visibility="hidden",this.iframePrint.style.position="fixed",this.iframePrint.style.right="0",this.iframePrint.style.bottom="0",document.body.appendChild(this.iframePrint),this.iframePrint.onload=function(){try{e.iframePrint.contentWindow.focus(),e.iframePrint.contentWindow.print(),e.iframePrint.contentWindow.blur(),window.focus()}catch(t){e.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.PDF))}}}t&&(this.iframePrint.src=t)},onAdvancedOptions:function(t,e){if(!this._state.openDlg){var i=this;t==Asc.c_oAscAdvancedOptionsID.DRM&&(i._state.openDlg=new Common.Views.OpenDialog({title:Common.Views.OpenDialog.prototype.txtTitleProtected,closeFile:i.appOptions.canRequestClose,type:Common.Utils.importTextType.DRM,warning:!(i.appOptions.isDesktopApp&&i.appOptions.isOffline),validatePwd:!!i._state.isDRM,handler:function(e,n){i.isShowOpenDialog=!1,"ok"==e?i.api&&(i.api.asc_setAdvancedOptions(t,new Asc.asc_CDRMAdvancedOptions(n)),i.loadMask&&i.loadMask.show()):(Common.Gateway.requestClose(),Common.Controllers.Desktop.requestClose()),i._state.openDlg=null}}),i._state.isDRM=!0),i._state.openDlg&&(this.isShowOpenDialog=!0,this.loadMask&&this.loadMask.hide(),this.onLongActionEnd(Asc.c_oAscAsyncActionType.BlockInteraction,-256),i._state.openDlg.show())}},leavePageText:"You have unsaved changes in this document. Click 'Stay on this Page' then 'Save' to save them. Click 'Leave this Page' to discard all the unsaved changes.",criticalErrorTitle:"Error",notcriticalErrorTitle:"Warning",errorDefaultMessage:"Error code: %1",criticalErrorExtText:'Press "OK" to to back to document list.',openTitleText:"Opening Document",openTextText:"Opening document...",loadFontsTitleText:"Loading Data",loadFontsTextText:"Loading data...",loadImagesTitleText:"Loading Images",loadImagesTextText:"Loading images...",loadFontTitleText:"Loading Data",loadFontTextText:"Loading data...",loadImageTitleText:"Loading Image",loadImageTextText:"Loading image...",downloadTitleText:"Downloading Document",downloadTextText:"Downloading document...",printTitleText:"Printing Document",printTextText:"Printing document...",uploadImageTitleText:"Uploading Image",uploadImageTextText:"Uploading image...",uploadImageSizeMessage:"Maximium image size limit exceeded.",uploadImageExtMessage:"Unknown image format.",uploadImageFileCountMessage:"No images uploaded.",reloadButtonText:"Reload Page",unknownErrorText:"Unknown error.",convertationTimeoutText:"Convertation timeout exceeded.",downloadErrorText:"Download failed.",unsupportedBrowserErrorText:"Your browser is not supported.",splitMaxRowsErrorText:"The number of rows must be less than %1",splitMaxColsErrorText:"The number of columns must be less than %1",splitDividerErrorText:"The number of rows must be a divisor of %1",requestEditFailedTitleText:"Access denied",requestEditFailedMessageText:"Someone is editing this document right now. Please try again later.",txtSldLtTBlank:"Blank",txtSldLtTChart:"Chart",txtSldLtTChartAndTx:"Chart and Text",txtSldLtTClipArtAndTx:"Clip Art and Text",txtSldLtTClipArtAndVertTx:"Clip Art and Vertical Text",txtSldLtTCust:"Custom",txtSldLtTDgm:"Diagram",txtSldLtTFourObj:"Four Objects",txtSldLtTMediaAndTx:"Media and Text",txtSldLtTObj:"Title and Object",txtSldLtTObjAndTwoObj:"Object and Two Object",txtSldLtTObjAndTx:"Object and Text",txtSldLtTObjOnly:"Object",txtSldLtTObjOverTx:"Object over Text",txtSldLtTObjTx:"Title, Object, and Caption",txtSldLtTPicTx:"Picture and Caption",txtSldLtTSecHead:"Section Header",txtSldLtTTbl:"Table",txtSldLtTTitle:"Title",txtSldLtTTitleOnly:"Title Only",txtSldLtTTwoColTx:"Two Column Text",txtSldLtTTwoObj:"Two Objects",txtSldLtTTwoObjAndObj:"Two Objects and Object",txtSldLtTTwoObjAndTx:"Two Objects and Text",txtSldLtTTwoObjOverTx:"Two Objects over Text",txtSldLtTTwoTxTwoObj:"Two Text and Two Objects",txtSldLtTTx:"Text",txtSldLtTTxAndChart:"Text and Chart",txtSldLtTTxAndClipArt:"Text and Clip Art",txtSldLtTTxAndMedia:"Text and Media",txtSldLtTTxAndObj:"Text and Object",txtSldLtTTxAndTwoObj:"Text and Two Objects",txtSldLtTTxOverObj:"Text over Object",txtSldLtTVertTitleAndTx:"Vertical Title and Text",txtSldLtTVertTitleAndTxOverChart:"Vertical Title and Text Over Chart",txtSldLtTVertTx:"Vertical Text",textLoadingDocument:"Loading presentation",warnBrowserZoom:"Your browser's current zoom setting is not fully supported. Please reset to the default zoom by pressing Ctrl+0.",warnBrowserIE9:"The application has low capabilities on IE9. Use IE10 or higher",loadThemeTitleText:"Loading Theme",loadThemeTextText:"Loading theme...",txtBasicShapes:"Basic Shapes",txtFiguredArrows:"Figured Arrows",txtMath:"Math",txtCharts:"Charts",txtStarsRibbons:"Stars & Ribbons",txtCallouts:"Callouts",txtButtons:"Buttons",txtRectangles:"Rectangles",txtLines:"Lines",errorKeyEncrypt:"Unknown key descriptor",errorKeyExpire:"Key descriptor expired",errorUsersExceed:"Count of users was exceed",txtEditingMode:"Set editing mode...",errorCoAuthoringDisconnect:"Server connection lost. You can't edit anymore.",errorFilePassProtect:"The file is password protected and cannot be opened.",textAnonymous:"Anonymous",txtNeedSynchronize:"You have an updates",applyChangesTitleText:"Loading Data",applyChangesTextText:"Loading data...",savePreparingText:"Preparing to save",savePreparingTitle:"Preparing to save. Please wait...",loadingDocumentTitleText:"Loading presentation",loadingDocumentTextText:"Loading presentation...",warnProcessRightsChange:"You have been denied the right to edit the file.",errorProcessSaveResult:"Saving is failed.",textCloseTip:"Click to close the tip.",textShape:"Shape",errorStockChart:"Incorrect row order. To build a stock chart place the data on the sheet in the following order: opening price, max price, min price, closing price.",errorDataRange:"Incorrect data range.",errorDatabaseConnection:"External error. Database connection error. Please, contact support.",errorUpdateVersion:"The file version has been changed. The page will be reloaded.",errorUserDrop:"The file cannot be accessed right now.",txtDiagramTitle:"Chart Title",txtXAxis:"X Axis",txtYAxis:"Y Axis",txtSeries:"Seria",txtArt:"Your text here",errorConnectToServer:' The document could not be saved. Please check connection settings or contact your administrator. When you click the \'OK\' button, you will be prompted to download the document.
Find more information about connecting Document Server here',textTryUndoRedo:"The Undo/Redo functions are disabled for the Fast co-editing mode. Click the 'Strict mode' button to switch to the Strict co-editing mode to edit the file without other users interference and send your changes only after you save them. You can switch between the co-editing modes using the editor Advanced settings.",textStrict:"Strict mode",textBuyNow:"Visit website",textNoLicenseTitle:"%1 open source version",textContactUs:"Contact sales",errorViewerDisconnect:"Connection is lost. You can still view the document, but will not be able to download or print until the connection is restored.",warnLicenseExp:"Your license has expired. Please update your license and refresh the page.",titleLicenseExp:"License expired",openErrorText:"An error has occurred while opening the file",saveErrorText:"An error has occurred while saving the file",errorToken:"The document security token is not correctly formed. Please contact your Document Server administrator.",errorTokenExpire:"The document security token has expired. Please contact your Document Server administrator.",errorSessionAbsolute:"The document editing session has expired. Please reload the page.",errorSessionIdle:"The document has not been edited for quite a long time. Please reload the page.",errorSessionToken:"The connection to the server has been interrupted. Please reload the page.",errorAccessDeny:"You are trying to perform an action you do not have rights for. Please contact your Document Server administrator.",titleServerVersion:"Editor updated",errorServerVersion:"The editor version has been updated. The page will be reloaded to apply the changes.",errorBadImageUrl:"Image url is incorrect",txtSlideText:"Slide text",txtClipArt:"Clip Art",txtDiagram:"SmartArt",txtDateTime:"Date and time",txtFooter:"Footer",txtHeader:"Header",txtMedia:"Media",txtPicture:"Picture",txtImage:"Image",txtSlideNumber:"Slide number",txtSlideSubtitle:"Slide subtitle",txtSlideTitle:"Slide title",textChangesSaved:"All changes saved",saveTitleText:"Saving Document",saveTextText:"Saving document...",txtLoading:"Loading...",txtAddNotes:"Click to add notes",errorForceSave:"An error occurred while saving the file. Please use the 'Download as' option to save the file to your computer hard drive or try again later.",txtAddFirstSlide:"Click to add first slide",txtTheme_blank:"Blank",txtTheme_pixel:"Pixel",txtTheme_classic:"Classic",txtTheme_official:"Official",txtTheme_green:"Green",txtTheme_lines:"Lines",txtTheme_office:"Office",txtTheme_safari:"Safari",txtTheme_dotted:"Dotted",txtTheme_corner:"Corner",txtTheme_turtle:"Turtle",warnNoLicense:"This version of %1 editors has certain limitations for concurrent connections to the document server. If you need more please consider purchasing a commercial license.",warnNoLicenseUsers:"This version of %1 editors has certain limitations for concurrent users. If you need more please consider purchasing a commercial license.",warnLicenseExceeded:"The number of concurrent connections to the document server has been exceeded and the document will be opened for viewing only. Please contact your administrator for more information.",warnLicenseUsersExceeded:"The number of concurrent users has been exceeded and the document will be opened for viewing only. Please contact your administrator for more information.",errorDataEncrypted:"Encrypted changes have been received, they cannot be deciphered.",textClose:"Close",textPaidFeature:"Paid feature",scriptLoadError:"The connection is too slow, some of the components could not be loaded. Please reload the page.",errorEditingSaveas:"An error occurred during the work with the document. Use the 'Save as...' option to save the file backup copy to your computer hard drive.",errorEditingDownloadas:"An error occurred during the work with the document. Use the 'Download as...' option to save the file backup copy to your computer hard drive.",txtShape_textRect:"Text Box",txtShape_rect:"Rectangle",txtShape_ellipse:"Ellipse",txtShape_triangle:"Triangle",txtShape_rtTriangle:"Right Triangle",txtShape_parallelogram:"Parallelogram",txtShape_trapezoid:"Trapezoid",txtShape_diamond:"Diamond",txtShape_pentagon:"Pentagon",txtShape_hexagon:"Hexagon",txtShape_heptagon:"Heptagon",txtShape_octagon:"Octagon",txtShape_decagon:"Decagon",txtShape_dodecagon:"Dodecagon",txtShape_pie:"Pie",txtShape_chord:"Chord",txtShape_teardrop:"Teardrop",txtShape_frame:"Frame",txtShape_halfFrame:"Half Frame",txtShape_corner:"Corner",txtShape_diagStripe:"Diagonal Stripe",txtShape_plus:"Plus",txtShape_plaque:"Sign",txtShape_can:"Can",txtShape_cube:"Cube",txtShape_bevel:"Bevel",txtShape_donut:"Donut",txtShape_noSmoking:'"No" Symbol',txtShape_blockArc:"Block Arc",txtShape_foldedCorner:"Folded Corner",txtShape_smileyFace:"Smiley Face",txtShape_heart:"Heart",txtShape_lightningBolt:"Lightning Bolt",txtShape_sun:"Sun",txtShape_moon:"Moon",txtShape_cloud:"Cloud",txtShape_arc:"Arc",txtShape_bracePair:"Double Brace",txtShape_leftBracket:"Left Bracket",txtShape_rightBracket:"Right Bracket",txtShape_leftBrace:"Left Brace",txtShape_rightBrace:"Right Brace",txtShape_rightArrow:"Right Arrow",txtShape_leftArrow:"Left Arrow",txtShape_upArrow:"Up Arrow",txtShape_downArrow:"Down Arrow",txtShape_leftRightArrow:"Left Right Arrow",txtShape_upDownArrow:"Up Down Arrow",txtShape_quadArrow:"Quad Arrow",txtShape_leftRightUpArrow:"Left Right Up Arrow",txtShape_bentArrow:"Bent Arrow",txtShape_uturnArrow:"U-Turn Arrow",txtShape_leftUpArrow:"Left Up Arrow",txtShape_bentUpArrow:"Bent Up Arrow",txtShape_curvedRightArrow:"Curved Right Arrow",txtShape_curvedLeftArrow:"Curved Left Arrow",txtShape_curvedUpArrow:"Curved Up Arrow",txtShape_curvedDownArrow:"Curved Down Arrow",txtShape_stripedRightArrow:"Striped Right Arrow",txtShape_notchedRightArrow:"Notched Right Arrow",txtShape_homePlate:"Pentagon",txtShape_chevron:"Chevron",txtShape_rightArrowCallout:"Right Arrow Callout",txtShape_downArrowCallout:"Down Arrow Callout",txtShape_leftArrowCallout:"Left Arrow Callout",txtShape_upArrowCallout:"Up Arrow Callout",txtShape_leftRightArrowCallout:"Left Right Arrow Callout",txtShape_quadArrowCallout:"Quad Arrow Callout",txtShape_circularArrow:"Circular Arrow",txtShape_mathPlus:"Plus",txtShape_mathMinus:"Minus",txtShape_mathMultiply:"Multiply",txtShape_mathDivide:"Division",txtShape_mathEqual:"Equal",txtShape_mathNotEqual:"Not Equal",txtShape_flowChartProcess:"Flowchart: Process",txtShape_flowChartAlternateProcess:"Flowchart: Alternate Process",txtShape_flowChartDecision:"Flowchart: Decision",txtShape_flowChartInputOutput:"Flowchart: Data",txtShape_flowChartPredefinedProcess:"Flowchart: Predefined Process",txtShape_flowChartInternalStorage:"Flowchart: Internal Storage",txtShape_flowChartDocument:"Flowchart: Document",txtShape_flowChartMultidocument:"Flowchart: Multidocument ",txtShape_flowChartTerminator:"Flowchart: Terminator",txtShape_flowChartPreparation:"Flowchart: Preparation",txtShape_flowChartManualInput:"Flowchart: Manual Input",txtShape_flowChartManualOperation:"Flowchart: Manual Operation",txtShape_flowChartConnector:"Flowchart: Connector",txtShape_flowChartOffpageConnector:"Flowchart: Off-page Connector",txtShape_flowChartPunchedCard:"Flowchart: Card",txtShape_flowChartPunchedTape:"Flowchart: Punched Tape",txtShape_flowChartSummingJunction:"Flowchart: Summing Junction",txtShape_flowChartOr:"Flowchart: Or",txtShape_flowChartCollate:"Flowchart: Collate",txtShape_flowChartSort:"Flowchart: Sort",txtShape_flowChartExtract:"Flowchart: Extract",txtShape_flowChartMerge:"Flowchart: Merge",txtShape_flowChartOnlineStorage:"Flowchart: Stored Data",txtShape_flowChartDelay:"Flowchart: Delay",txtShape_flowChartMagneticTape:"Flowchart: Sequential Access Storage",txtShape_flowChartMagneticDisk:"Flowchart: Magnetic Disk",txtShape_flowChartMagneticDrum:"Flowchart: Direct Access Storage",txtShape_flowChartDisplay:"Flowchart: Display",txtShape_irregularSeal1:"Explosion 1",txtShape_irregularSeal2:"Explosion 2",txtShape_star4:"4-Point Star",txtShape_star5:"5-Point Star",txtShape_star6:"6-Point Star",txtShape_star7:"7-Point Star",txtShape_star8:"8-Point Star",txtShape_star10:"10-Point Star",txtShape_star12:"12-Point Star",txtShape_star16:"16-Point Star",txtShape_star24:"24-Point Star",txtShape_star32:"32-Point Star",txtShape_ribbon2:"Up Ribbon",txtShape_ribbon:"Down Ribbon",txtShape_ellipseRibbon2:"Curved Up Ribbon",txtShape_ellipseRibbon:"Curved Down Ribbon",txtShape_verticalScroll:"Vertical Scroll",txtShape_horizontalScroll:"Horizontal Scroll",txtShape_wave:"Wave",txtShape_doubleWave:"Double Wave",txtShape_wedgeRectCallout:"Rectangular Callout",txtShape_wedgeRoundRectCallout:"Rounded Rectangular Callout",txtShape_wedgeEllipseCallout:"Oval Callout",txtShape_cloudCallout:"Cloud Callout",txtShape_borderCallout1:"Line Callout 1",txtShape_borderCallout2:"Line Callout 2",txtShape_borderCallout3:"Line Callout 3",txtShape_accentCallout1:"Line Callout 1 (Accent Bar)",txtShape_accentCallout2:"Line Callout 2 (Accent Bar)",txtShape_accentCallout3:"Line Callout 3 (Accent Bar)",txtShape_callout1:"Line Callout 1 (No Border)",txtShape_callout2:"Line Callout 2 (No Border)",txtShape_callout3:"Line Callout 3 (No Border)",txtShape_accentBorderCallout1:"Line Callout 1 (Border and Accent Bar)",txtShape_accentBorderCallout2:"Line Callout 2 (Border and Accent Bar)",txtShape_accentBorderCallout3:"Line Callout 3 (Border and Accent Bar)",txtShape_actionButtonBackPrevious:"Back or Previous Button",txtShape_actionButtonForwardNext:"Forward or Next Button",txtShape_actionButtonBeginning:"Beginning Button",txtShape_actionButtonEnd:"End Button",txtShape_actionButtonHome:"Home Button",txtShape_actionButtonInformation:"Information Button",txtShape_actionButtonReturn:"Return Button",txtShape_actionButtonMovie:"Movie Button",txtShape_actionButtonDocument:"Document Button",txtShape_actionButtonSound:"Sound Button",txtShape_actionButtonHelp:"Help Button",txtShape_actionButtonBlank:"Blank Button",txtShape_roundRect:"Round Corner Rectangle",txtShape_snip1Rect:"Snip Single Corner Rectangle",txtShape_snip2SameRect:"Snip Same Side Corner Rectangle",txtShape_snip2DiagRect:"Snip Diagonal Corner Rectangle",txtShape_snipRoundRect:"Snip and Round Single Corner Rectangle",txtShape_round1Rect:"Round Single Corner Rectangle",txtShape_round2SameRect:"Round Same Side Corner Rectangle",txtShape_round2DiagRect:"Round Diagonal Corner Rectangle",txtShape_line:"Line",txtShape_lineWithArrow:"Arrow",txtShape_lineWithTwoArrows:"Double Arrow",txtShape_bentConnector5:"Elbow Connector",txtShape_bentConnector5WithArrow:"Elbow Arrow Connector",txtShape_bentConnector5WithTwoArrows:"Elbow Double-Arrow Connector",txtShape_curvedConnector3:"Curved Connector",txtShape_curvedConnector3WithArrow:"Curved Arrow Connector",txtShape_curvedConnector3WithTwoArrows:"Curved Double-Arrow Connector",txtShape_spline:"Curve",txtShape_polyline1:"Scribble",txtShape_polyline2:"Freeform",errorEmailClient:"No email client could be found",textCustomLoader:"Please note that according to the terms of the license you are not entitled to change the loader. Please contact our Sales Department to get a quote.",waitText:"Please, wait..."}}(),PE.Controllers.Main||{}))}),define("common/main/lib/view/DocumentAccessDialog",["common/main/lib/component/Window","common/main/lib/component/LoadMask"],function(){"use strict";Common.Views.DocumentAccessDialog=Common.UI.Window.extend(_.extend({initialize:function(t){var e={};_.extend(e,{title:this.textTitle,width:600,height:536,header:!0},t),this.template=[''].join(""),e.tpl=_.template(this.template)(e),this.settingsurl=t.settingsurl||"",Common.UI.Window.prototype.initialize.call(this,e)},render:function(){Common.UI.Window.prototype.render.call(this),this.$window.find("> .body").css({height:"auto",overflow:"hidden"});var t=document.createElement("iframe");t.width="100%",t.height=500,t.align="top",t.frameBorder=0,t.scrolling="no",t.onload=_.bind(this._onLoad,this),$("#id-sharing-placeholder").append(t),this.loadMask=new Common.UI.LoadMask({owner:$("#id-sharing-placeholder")}),this.loadMask.setTitle(this.textLoading),this.loadMask.show(),t.src=this.settingsurl;var e=this;this._eventfunc=function(t){e._onWindowMessage(t)},this._bindWindowEvents.call(this),this.on("close",function(t){e._unbindWindowEvents()})},_bindWindowEvents:function(){window.addEventListener?window.addEventListener("message",this._eventfunc,!1):window.attachEvent&&window.attachEvent("onmessage",this._eventfunc)},_unbindWindowEvents:function(){window.removeEventListener?window.removeEventListener("message",this._eventfunc):window.detachEvent&&window.detachEvent("onmessage",this._eventfunc)},_onWindowMessage:function(t){if(t&&window.JSON)try{this._onMessage.call(this,window.JSON.parse(t.data))}catch(t){}},_onMessage:function(t){t&&"onlyoffice"==t.Referer&&(t.needUpdate&&this.trigger("accessrights",this,t.sharingSettings),Common.NotificationCenter.trigger("window:close",this))},_onLoad:function(){this.loadMask&&this.loadMask.hide()},textTitle:"Sharing Settings",textLoading:"Loading"},Common.Views.DocumentAccessDialog||{}))}),define("presentationeditor/main/app/view/FileMenuPanels",["common/main/lib/view/DocumentAccessDialog","common/main/lib/component/CheckBox"],function(){"use strict";!PE.Views.FileMenuPanels&&(PE.Views.FileMenuPanels={}),PE.Views.FileMenuPanels.ViewSaveAs=Common.UI.BaseView.extend({el:"#panel-saveas",menu:void 0,formats:[[{name:"PPTX",imgCls:"pptx",type:Asc.c_oAscFileType.PPTX},{name:"PDF",imgCls:"pdf",type:Asc.c_oAscFileType.PDF},{name:"ODP",imgCls:"odp",type:Asc.c_oAscFileType.ODP}],[{name:"POTX",imgCls:"potx",type:Asc.c_oAscFileType.POTX},{name:"PDFA",imgCls:"pdfa",type:Asc.c_oAscFileType.PDFA},{name:"OTP",imgCls:"otp",type:Asc.c_oAscFileType.OTP}]],template:_.template(["
","<% _.each(rows, function(row) { %>","
","<% _.each(row, function(item) { %>",'
","<% }) %>","
","<% }) %>","
"].join("")),initialize:function(t){Common.UI.BaseView.prototype.initialize.call(this,arguments),this.menu=t.menu},render:function(){return $(this.el).html(this.template({
+},showTips:function(t){function e(){var e=t.shift();e&&(e+="\n"+i.textCloseTip,n.setTitle(e),n.show())}var i=this;if(t.length){"object"!=typeof t&&(t=[t]),this.tooltip||(this.tooltip=new Common.UI.Tooltip({owner:this.getApplication().getController("Toolbar").getView("Toolbar"),hideonclick:!0,placement:"bottom",cls:"main-info",offset:30}));var n=this.tooltip;n.on("tooltip:hide",function(){setTimeout(e,300)}),e()}},updateWindowTitle:function(e){var i=this.api.isDocumentModified();if(this._state.isDocModified!==i||e){var n=this.defaultTitleText;t&&!_.isEmpty(t.getDocumentCaption())&&(n=t.getDocumentCaption()+" - "+n),i&&(clearTimeout(this._state.timerCaption),_.isUndefined(n)||(n="* "+n)),window.document.title!=n&&(window.document.title=n),Common.Gateway.setDocumentModified(i),i&&(!this._state.fastCoauth||this._state.usersCount<2)&&this.getApplication().getController("Statusbar").setStatusCaption("",!0),this._state.isDocModified=i}},onDocumentChanged:function(){},onDocumentModifiedChanged:function(){var t=this.api.asc_isDocumentCanSave();this._state.isDocModified!==t&&Common.Gateway.setDocumentModified(this.api.isDocumentModified()),this.updateWindowTitle();var e=this.getApplication().getController("Toolbar").getView("Toolbar");if(e&&e.btnCollabChanges){var i=e.btnCollabChanges.$icon.hasClass("btn-synch"),n=this.appOptions.forcesave,o=!t&&!i&&!n||this._state.isDisconnected||this._state.fastCoauth&&this._state.usersCount>1&&!n;e.btnSave.setDisabled(o)}},onDocumentCanSaveChanged:function(t){var e=this.getApplication().getController("Toolbar").getView("Toolbar");if(e){var i=e.btnCollabChanges.$icon.hasClass("btn-synch"),n=this.appOptions.forcesave,o=!t&&!i&&!n||this._state.isDisconnected||this._state.fastCoauth&&this._state.usersCount>1&&!n;e.btnSave.setDisabled(o)}},onContextMenu:function(t){var e=t.target.getAttribute("data-can-copy"),i=t.target instanceof HTMLInputElement||t.target instanceof HTMLTextAreaElement;if(i&&"false"===e||!i&&"true"!==e)return t.stopPropagation(),t.preventDefault(),!1},onBeforeUnload:function(){if(Common.localStorage.save(),this.api.isDocumentModified()){var t=this;return this.api.asc_stopSaving(),this.continueSavingTimer=window.setTimeout(function(){t.api.asc_continueSaving()},500),this.leavePageText}},onUnload:function(){this.continueSavingTimer&&clearTimeout(this.continueSavingTimer)},hidePreloader:function(){var t;this._state.customizationDone||(this._state.customizationDone=!0,this.appOptions.customization&&(this.appOptions.isDesktopApp?this.appOptions.customization.about=!1:this.appOptions.canBrandingExt||(this.appOptions.customization.about=!0)),Common.Utils.applyCustomization(this.appOptions.customization,e),this.appOptions.canBrandingExt&&(Common.Utils.applyCustomization(this.appOptions.customization,i),t=this.getApplication().getController("Common.Controllers.Plugins").applyUICustomization())),Common.NotificationCenter.trigger("layout:changed","main"),(t||new Promise(function(t,e){t()})).then(function(){$("#loading-mask").hide().remove(),Common.Controllers.Desktop.process("preloader:hide")})},onDownloadUrl:function(t){this._state.isFromGatewayDownloadAs&&Common.Gateway.downloadAs(t),this._state.isFromGatewayDownloadAs=!1},onUpdateVersion:function(t){var e=this;e.needToUpdateVersion=!0,e.onLongActionEnd(Asc.c_oAscAsyncActionType.BlockInteraction,-256),Common.UI.error({msg:this.errorUpdateVersion,callback:function(){_.defer(function(){Common.Gateway.updateVersion(),t&&t.call(e),e.onLongActionBegin(Asc.c_oAscAsyncActionType.BlockInteraction,-256)})}})},onServerVersion:function(t){return!1},fillUserStore:function(t){if(!_.isEmpty(t)){var e=this.getCommonStoreUsersStore();e&&e.add(t)}},onCollaborativeChanges:function(){this._state.hasCollaborativeChanges||(this._state.hasCollaborativeChanges=!0,this.appOptions.isEdit&&this.getApplication().getController("Statusbar").setStatusCaption(this.txtNeedSynchronize,!0))},synchronizeChanges:function(){this.getApplication().getController("Statusbar").setStatusCaption(""),this.getApplication().getController("DocumentHolder").getView("DocumentHolder").hideTips(),this.getApplication().getController("Toolbar").getView("Toolbar").synchronizeChanges(),this._state.hasCollaborativeChanges=!1},initNames:function(){this.shapeGroupNames=[this.txtBasicShapes,this.txtFiguredArrows,this.txtMath,this.txtCharts,this.txtStarsRibbons,this.txtCallouts,this.txtButtons,this.txtRectangles,this.txtLines],this.layoutNames=[this.txtSldLtTBlank,this.txtSldLtTChart,this.txtSldLtTChartAndTx,this.txtSldLtTClipArtAndTx,this.txtSldLtTClipArtAndVertTx,this.txtSldLtTCust,this.txtSldLtTDgm,this.txtSldLtTFourObj,this.txtSldLtTMediaAndTx,this.txtSldLtTObj,this.txtSldLtTObjAndTwoObj,this.txtSldLtTObjAndTx,this.txtSldLtTObjOnly,this.txtSldLtTObjOverTx,this.txtSldLtTObjTx,this.txtSldLtTPicTx,this.txtSldLtTSecHead,this.txtSldLtTTbl,this.txtSldLtTTitle,this.txtSldLtTTitleOnly,this.txtSldLtTTwoColTx,this.txtSldLtTTwoObj,this.txtSldLtTTwoObjAndObj,this.txtSldLtTTwoObjAndTx,this.txtSldLtTTwoObjOverTx,this.txtSldLtTTwoTxTwoObj,this.txtSldLtTTx,this.txtSldLtTTxAndChart,this.txtSldLtTTxAndClipArt,this.txtSldLtTTxAndMedia,this.txtSldLtTTxAndObj,this.txtSldLtTTxAndTwoObj,this.txtSldLtTTxOverObj,this.txtSldLtTVertTitleAndTx,this.txtSldLtTVertTitleAndTxOverChart,this.txtSldLtTVertTx]},onInsertTable:function(){this.getApplication().getController("RightMenu").onInsertTable()},onInsertImage:function(){this.getApplication().getController("RightMenu").onInsertImage()},onInsertChart:function(){this.getApplication().getController("RightMenu").onInsertChart()},onInsertShape:function(){this.getApplication().getController("RightMenu").onInsertShape()},onInsertTextArt:function(){this.getApplication().getController("RightMenu").onInsertTextArt()},unitsChanged:function(t){var e=Common.localStorage.getItem("pe-settings-unit");e=null!==e?parseInt(e):Common.Utils.Metric.getDefaultMetric(),Common.Utils.Metric.setCurrentMetric(e),Common.Utils.InternalSettings.set("pe-settings-unit",e),this.api.asc_SetDocumentUnits(e==Common.Utils.Metric.c_MetricUnits.inch?Asc.c_oAscDocumentUnits.Inch:e==Common.Utils.Metric.c_MetricUnits.pt?Asc.c_oAscDocumentUnits.Point:Asc.c_oAscDocumentUnits.Millimeter),this.getApplication().getController("RightMenu").updateMetricUnit()},updateThemeColors:function(){var t=this;setTimeout(function(){t.getApplication().getController("RightMenu").UpdateThemeColors()},50),setTimeout(function(){t.getApplication().getController("Toolbar").updateThemeColors()},50)},onSendThemeColors:function(t,e){if(Common.Utils.ThemeColor.setColors(t,e),window.styles_loaded){this.updateThemeColors();var i=this;setTimeout(function(){i.fillTextArt(i.api.asc_getTextArtPreviews())},1)}},onFocusObject:function(t){var e=this.getApplication().getController("RightMenu");e&&e.onFocusObject.call(e,t)},_onChangeObjectLock:function(){var t=this.api.getSelectedElements();this.onFocusObject(t),this.getApplication().getController("Toolbar")._onFocusObject(t)},onThumbnailsShow:function(t){this.isThumbnailsShow=t},fillAutoShapes:function(t,e){if(!_.isEmpty(e)&&!_.isEmpty(t)&&e.length==t.length){var i=this,n=[];_.each(t,function(t,o){var s=new Backbone.Collection([],{model:PE.Models.ShapeModel}),a=e[o].length>18?7:6,l=35*Math.ceil(e[o].length/a)+3,r=30*a;_.each(e[o],function(t,e){s.add({data:{shapeType:t.Type},tip:i["txtShape_"+t.Type]||i.textShape+" "+(e+1),allowSelected:!0,selected:!1})}),n.push({groupName:i.shapeGroupNames[o],groupStore:s,groupWidth:r,groupHeight:l})}),this.getCollection("ShapeGroups").reset(n)}},fillLayoutsStore:function(t){var e=this;if(!_.isEmpty(t)){var i=this.getCollection("SlideLayouts");if(i){var n=[];_.each(t,function(t){var i=t.get_Name();n.push({imageUrl:t.get_Image(),title:""!==i?i:e.layoutNames[t.getType()],itemWidth:t.get_Width(),itemHeight:t.get_Height(),data:{type:t.getType(),idx:t.getIndex()},allowSelected:!0,selected:!1})}),i.reset(n)}}},fillTextArt:function(t){if(!_.isEmpty(t)){var e=this,i=[],n=this.getCollection("Common.Collections.TextArt");_.each(t,function(t,e){i.push({imageUrl:t,data:e,allowSelected:!0,selected:!1})}),n.reset(i),setTimeout(function(){e.getApplication().getController("RightMenu").fillTextArt()},50)}},loadLanguages:function(t){var e,i=[],n=Common.util.LanguageInfo.getLanguages();for(var o in n)n.hasOwnProperty(o)&&(e=n[o],e[2]&&i.push({displayValue:e[1],value:e[0],code:parseInt(o),spellcheck:_.indexOf(t,o)>-1}));i.sort(function(t,e){return t.valuee.value?1:0}),this.languages=i,window.styles_loaded&&this.setLanguages()},setLanguages:function(){(!this.languages||this.languages.length<1)&&this.loadLanguages([]),this.languages&&this.languages.length>0&&(this.getApplication().getController("DocumentHolder").getView("DocumentHolder").setLanguages(this.languages),this.getApplication().getController("Statusbar").setLanguages(this.languages),this.getApplication().getController("Common.Controllers.ReviewChanges").setLanguages(this.languages))},onTryUndoInFastCollaborative:function(){Common.localStorage.getBool("pe-hide-try-undoredo")||Common.UI.info({width:500,msg:this.textTryUndoRedo,iconCls:"info",buttons:["custom","cancel"],primary:"custom",customButtonText:this.textStrict,dontshow:!0,callback:_.bind(function(t,e){e&&Common.localStorage.setItem("pe-hide-try-undoredo",1),"custom"==t&&(Common.localStorage.setItem("pe-settings-coauthmode",0),this.api.asc_SetFastCollaborative(!1),Common.Utils.InternalSettings.set("pe-settings-coauthmode",!1),this.getApplication().getController("Common.Controllers.ReviewChanges").applySettings(),this._state.fastCoauth=!1),this.onEditComplete()},this)})},onAuthParticipantsChanged:function(t){var e=0;_.each(t,function(t){t.asc_getView()||e++}),this._state.usersCount=e},applySettings:function(){if(this.appOptions.isEdit&&!this.appOptions.isOffline&&this.appOptions.canCoAuthoring){var t=this._state.fastCoauth;this._state.fastCoauth=Common.localStorage.getBool("pe-settings-coauthmode",!0),this._state.fastCoauth&&!t&&this.synchronizeChanges()}this.appOptions.canForcesave&&(this.appOptions.forcesave=Common.localStorage.getBool("pe-settings-forcesave",this.appOptions.canForcesave),Common.Utils.InternalSettings.set("pe-settings-forcesave",this.appOptions.forcesave),this.api.asc_setIsForceSaveOnUserSave(this.appOptions.forcesave))},onDocumentName:function(e){t.setDocumentCaption(e),this.updateWindowTitle(!0)},onMeta:function(e){t.setDocumentCaption(e.title),this.updateWindowTitle(!0),this.document.title=e.title;var i=this.getApplication().getController("LeftMenu").getView("LeftMenu").getMenu("file");i.loadDocument({doc:this.document}),i.panels.info.updateInfo(this.document),Common.Gateway.metaChange(e)},onPrint:function(){this.appOptions.canPrint&&!this.isModalShowed&&(this.api&&this.api.asc_Print(new Asc.asc_CDownloadOptions(null,Common.Utils.isChrome||Common.Utils.isSafari||Common.Utils.isOpera)),Common.component.Analytics.trackEvent("Print"))},onPrintUrl:function(t){if(this.iframePrint&&(this.iframePrint.parentNode.removeChild(this.iframePrint),this.iframePrint=null),!this.iframePrint){var e=this;this.iframePrint=document.createElement("iframe"),this.iframePrint.id="id-print-frame",this.iframePrint.style.display="none",this.iframePrint.style.visibility="hidden",this.iframePrint.style.position="fixed",this.iframePrint.style.right="0",this.iframePrint.style.bottom="0",document.body.appendChild(this.iframePrint),this.iframePrint.onload=function(){try{e.iframePrint.contentWindow.focus(),e.iframePrint.contentWindow.print(),e.iframePrint.contentWindow.blur(),window.focus()}catch(t){e.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.PDF))}}}t&&(this.iframePrint.src=t)},onAdvancedOptions:function(t,e){if(!this._state.openDlg){var i=this;t==Asc.c_oAscAdvancedOptionsID.DRM&&(i._state.openDlg=new Common.Views.OpenDialog({title:Common.Views.OpenDialog.prototype.txtTitleProtected,closeFile:i.appOptions.canRequestClose,type:Common.Utils.importTextType.DRM,warning:!(i.appOptions.isDesktopApp&&i.appOptions.isOffline),validatePwd:!!i._state.isDRM,handler:function(e,n){i.isShowOpenDialog=!1,"ok"==e?i.api&&(i.api.asc_setAdvancedOptions(t,new Asc.asc_CDRMAdvancedOptions(n)),i.loadMask&&i.loadMask.show()):(Common.Gateway.requestClose(),Common.Controllers.Desktop.requestClose()),i._state.openDlg=null}}),i._state.isDRM=!0),i._state.openDlg&&(this.isShowOpenDialog=!0,this.loadMask&&this.loadMask.hide(),this.onLongActionEnd(Asc.c_oAscAsyncActionType.BlockInteraction,-256),i._state.openDlg.show())}},leavePageText:"You have unsaved changes in this document. Click 'Stay on this Page' then 'Save' to save them. Click 'Leave this Page' to discard all the unsaved changes.",criticalErrorTitle:"Error",notcriticalErrorTitle:"Warning",errorDefaultMessage:"Error code: %1",criticalErrorExtText:'Press "OK" to to back to document list.',openTitleText:"Opening Document",openTextText:"Opening document...",loadFontsTitleText:"Loading Data",loadFontsTextText:"Loading data...",loadImagesTitleText:"Loading Images",loadImagesTextText:"Loading images...",loadFontTitleText:"Loading Data",loadFontTextText:"Loading data...",loadImageTitleText:"Loading Image",loadImageTextText:"Loading image...",downloadTitleText:"Downloading Document",downloadTextText:"Downloading document...",printTitleText:"Printing Document",printTextText:"Printing document...",uploadImageTitleText:"Uploading Image",uploadImageTextText:"Uploading image...",uploadImageSizeMessage:"Maximium image size limit exceeded.",uploadImageExtMessage:"Unknown image format.",uploadImageFileCountMessage:"No images uploaded.",reloadButtonText:"Reload Page",unknownErrorText:"Unknown error.",convertationTimeoutText:"Convertation timeout exceeded.",downloadErrorText:"Download failed.",unsupportedBrowserErrorText:"Your browser is not supported.",splitMaxRowsErrorText:"The number of rows must be less than %1",splitMaxColsErrorText:"The number of columns must be less than %1",splitDividerErrorText:"The number of rows must be a divisor of %1",requestEditFailedTitleText:"Access denied",requestEditFailedMessageText:"Someone is editing this document right now. Please try again later.",txtSldLtTBlank:"Blank",txtSldLtTChart:"Chart",txtSldLtTChartAndTx:"Chart and Text",txtSldLtTClipArtAndTx:"Clip Art and Text",txtSldLtTClipArtAndVertTx:"Clip Art and Vertical Text",txtSldLtTCust:"Custom",txtSldLtTDgm:"Diagram",txtSldLtTFourObj:"Four Objects",txtSldLtTMediaAndTx:"Media and Text",txtSldLtTObj:"Title and Object",txtSldLtTObjAndTwoObj:"Object and Two Object",txtSldLtTObjAndTx:"Object and Text",txtSldLtTObjOnly:"Object",txtSldLtTObjOverTx:"Object over Text",txtSldLtTObjTx:"Title, Object, and Caption",txtSldLtTPicTx:"Picture and Caption",txtSldLtTSecHead:"Section Header",txtSldLtTTbl:"Table",txtSldLtTTitle:"Title",txtSldLtTTitleOnly:"Title Only",txtSldLtTTwoColTx:"Two Column Text",txtSldLtTTwoObj:"Two Objects",txtSldLtTTwoObjAndObj:"Two Objects and Object",txtSldLtTTwoObjAndTx:"Two Objects and Text",txtSldLtTTwoObjOverTx:"Two Objects over Text",txtSldLtTTwoTxTwoObj:"Two Text and Two Objects",txtSldLtTTx:"Text",txtSldLtTTxAndChart:"Text and Chart",txtSldLtTTxAndClipArt:"Text and Clip Art",txtSldLtTTxAndMedia:"Text and Media",txtSldLtTTxAndObj:"Text and Object",txtSldLtTTxAndTwoObj:"Text and Two Objects",txtSldLtTTxOverObj:"Text over Object",txtSldLtTVertTitleAndTx:"Vertical Title and Text",txtSldLtTVertTitleAndTxOverChart:"Vertical Title and Text Over Chart",txtSldLtTVertTx:"Vertical Text",textLoadingDocument:"Loading presentation",warnBrowserZoom:"Your browser's current zoom setting is not fully supported. Please reset to the default zoom by pressing Ctrl+0.",warnBrowserIE9:"The application has low capabilities on IE9. Use IE10 or higher",loadThemeTitleText:"Loading Theme",loadThemeTextText:"Loading theme...",txtBasicShapes:"Basic Shapes",txtFiguredArrows:"Figured Arrows",txtMath:"Math",txtCharts:"Charts",txtStarsRibbons:"Stars & Ribbons",txtCallouts:"Callouts",txtButtons:"Buttons",txtRectangles:"Rectangles",txtLines:"Lines",errorKeyEncrypt:"Unknown key descriptor",errorKeyExpire:"Key descriptor expired",errorUsersExceed:"Count of users was exceed",txtEditingMode:"Set editing mode...",errorCoAuthoringDisconnect:"Server connection lost. You can't edit anymore.",errorFilePassProtect:"The file is password protected and cannot be opened.",textAnonymous:"Anonymous",txtNeedSynchronize:"You have an updates",applyChangesTitleText:"Loading Data",applyChangesTextText:"Loading data...",savePreparingText:"Preparing to save",savePreparingTitle:"Preparing to save. Please wait...",loadingDocumentTitleText:"Loading presentation",loadingDocumentTextText:"Loading presentation...",warnProcessRightsChange:"You have been denied the right to edit the file.",errorProcessSaveResult:"Saving is failed.",textCloseTip:"Click to close the tip.",textShape:"Shape",errorStockChart:"Incorrect row order. To build a stock chart place the data on the sheet in the following order: opening price, max price, min price, closing price.",errorDataRange:"Incorrect data range.",errorDatabaseConnection:"External error. Database connection error. Please, contact support.",errorUpdateVersion:"The file version has been changed. The page will be reloaded.",errorUserDrop:"The file cannot be accessed right now.",txtDiagramTitle:"Chart Title",txtXAxis:"X Axis",txtYAxis:"Y Axis",txtSeries:"Seria",txtArt:"Your text here",errorConnectToServer:' The document could not be saved. Please check connection settings or contact your administrator. When you click the \'OK\' button, you will be prompted to download the document.
Find more information about connecting Document Server here',textTryUndoRedo:"The Undo/Redo functions are disabled for the Fast co-editing mode. Click the 'Strict mode' button to switch to the Strict co-editing mode to edit the file without other users interference and send your changes only after you save them. You can switch between the co-editing modes using the editor Advanced settings.",textStrict:"Strict mode",textBuyNow:"Visit website",textNoLicenseTitle:"%1 open source version",textContactUs:"Contact sales",errorViewerDisconnect:"Connection is lost. You can still view the document, but will not be able to download or print until the connection is restored.",warnLicenseExp:"Your license has expired. Please update your license and refresh the page.",titleLicenseExp:"License expired",openErrorText:"An error has occurred while opening the file",saveErrorText:"An error has occurred while saving the file",errorToken:"The document security token is not correctly formed. Please contact your Document Server administrator.",errorTokenExpire:"The document security token has expired. Please contact your Document Server administrator.",errorSessionAbsolute:"The document editing session has expired. Please reload the page.",errorSessionIdle:"The document has not been edited for quite a long time. Please reload the page.",errorSessionToken:"The connection to the server has been interrupted. Please reload the page.",errorAccessDeny:"You are trying to perform an action you do not have rights for. Please contact your Document Server administrator.",titleServerVersion:"Editor updated",errorServerVersion:"The editor version has been updated. The page will be reloaded to apply the changes.",errorBadImageUrl:"Image url is incorrect",txtSlideText:"Slide text",txtClipArt:"Clip Art",txtDiagram:"SmartArt",txtDateTime:"Date and time",txtFooter:"Footer",txtHeader:"Header",txtMedia:"Media",txtPicture:"Picture",txtImage:"Image",txtSlideNumber:"Slide number",txtSlideSubtitle:"Slide subtitle",txtSlideTitle:"Slide title",textChangesSaved:"All changes saved",saveTitleText:"Saving Document",saveTextText:"Saving document...",txtLoading:"Loading...",txtAddNotes:"Click to add notes",errorForceSave:"An error occurred while saving the file. Please use the 'Download as' option to save the file to your computer hard drive or try again later.",txtAddFirstSlide:"Click to add first slide",txtTheme_blank:"Blank",txtTheme_pixel:"Pixel",txtTheme_classic:"Classic",txtTheme_official:"Official",txtTheme_green:"Green",txtTheme_lines:"Lines",txtTheme_office:"Office",txtTheme_safari:"Safari",txtTheme_dotted:"Dotted",txtTheme_corner:"Corner",txtTheme_turtle:"Turtle",warnNoLicense:"This version of %1 editors has certain limitations for concurrent connections to the document server. If you need more please consider purchasing a commercial license.",warnNoLicenseUsers:"This version of %1 editors has certain limitations for concurrent users. If you need more please consider purchasing a commercial license.",warnLicenseExceeded:"The number of concurrent connections to the document server has been exceeded and the document will be opened for viewing only. Please contact your administrator for more information.",warnLicenseUsersExceeded:"The number of concurrent users has been exceeded and the document will be opened for viewing only. Please contact your administrator for more information.",errorDataEncrypted:"Encrypted changes have been received, they cannot be deciphered.",textClose:"Close",textPaidFeature:"Paid feature",scriptLoadError:"The connection is too slow, some of the components could not be loaded. Please reload the page.",errorEditingSaveas:"An error occurred during the work with the document. Use the 'Save as...' option to save the file backup copy to your computer hard drive.",errorEditingDownloadas:"An error occurred during the work with the document. Use the 'Download as...' option to save the file backup copy to your computer hard drive.",txtShape_textRect:"Text Box",txtShape_rect:"Rectangle",txtShape_ellipse:"Ellipse",txtShape_triangle:"Triangle",txtShape_rtTriangle:"Right Triangle",txtShape_parallelogram:"Parallelogram",txtShape_trapezoid:"Trapezoid",txtShape_diamond:"Diamond",txtShape_pentagon:"Pentagon",txtShape_hexagon:"Hexagon",txtShape_heptagon:"Heptagon",txtShape_octagon:"Octagon",txtShape_decagon:"Decagon",txtShape_dodecagon:"Dodecagon",txtShape_pie:"Pie",txtShape_chord:"Chord",txtShape_teardrop:"Teardrop",txtShape_frame:"Frame",txtShape_halfFrame:"Half Frame",txtShape_corner:"Corner",txtShape_diagStripe:"Diagonal Stripe",txtShape_plus:"Plus",txtShape_plaque:"Sign",txtShape_can:"Can",txtShape_cube:"Cube",txtShape_bevel:"Bevel",txtShape_donut:"Donut",txtShape_noSmoking:'"No" Symbol',txtShape_blockArc:"Block Arc",txtShape_foldedCorner:"Folded Corner",txtShape_smileyFace:"Smiley Face",txtShape_heart:"Heart",txtShape_lightningBolt:"Lightning Bolt",txtShape_sun:"Sun",txtShape_moon:"Moon",txtShape_cloud:"Cloud",txtShape_arc:"Arc",txtShape_bracePair:"Double Brace",txtShape_leftBracket:"Left Bracket",txtShape_rightBracket:"Right Bracket",txtShape_leftBrace:"Left Brace",txtShape_rightBrace:"Right Brace",txtShape_rightArrow:"Right Arrow",txtShape_leftArrow:"Left Arrow",txtShape_upArrow:"Up Arrow",txtShape_downArrow:"Down Arrow",txtShape_leftRightArrow:"Left Right Arrow",txtShape_upDownArrow:"Up Down Arrow",txtShape_quadArrow:"Quad Arrow",txtShape_leftRightUpArrow:"Left Right Up Arrow",txtShape_bentArrow:"Bent Arrow",txtShape_uturnArrow:"U-Turn Arrow",txtShape_leftUpArrow:"Left Up Arrow",txtShape_bentUpArrow:"Bent Up Arrow",txtShape_curvedRightArrow:"Curved Right Arrow",txtShape_curvedLeftArrow:"Curved Left Arrow",txtShape_curvedUpArrow:"Curved Up Arrow",txtShape_curvedDownArrow:"Curved Down Arrow",txtShape_stripedRightArrow:"Striped Right Arrow",txtShape_notchedRightArrow:"Notched Right Arrow",txtShape_homePlate:"Pentagon",txtShape_chevron:"Chevron",txtShape_rightArrowCallout:"Right Arrow Callout",txtShape_downArrowCallout:"Down Arrow Callout",txtShape_leftArrowCallout:"Left Arrow Callout",txtShape_upArrowCallout:"Up Arrow Callout",txtShape_leftRightArrowCallout:"Left Right Arrow Callout",txtShape_quadArrowCallout:"Quad Arrow Callout",txtShape_circularArrow:"Circular Arrow",txtShape_mathPlus:"Plus",txtShape_mathMinus:"Minus",txtShape_mathMultiply:"Multiply",txtShape_mathDivide:"Division",txtShape_mathEqual:"Equal",txtShape_mathNotEqual:"Not Equal",txtShape_flowChartProcess:"Flowchart: Process",txtShape_flowChartAlternateProcess:"Flowchart: Alternate Process",txtShape_flowChartDecision:"Flowchart: Decision",txtShape_flowChartInputOutput:"Flowchart: Data",txtShape_flowChartPredefinedProcess:"Flowchart: Predefined Process",txtShape_flowChartInternalStorage:"Flowchart: Internal Storage",txtShape_flowChartDocument:"Flowchart: Document",txtShape_flowChartMultidocument:"Flowchart: Multidocument ",txtShape_flowChartTerminator:"Flowchart: Terminator",txtShape_flowChartPreparation:"Flowchart: Preparation",txtShape_flowChartManualInput:"Flowchart: Manual Input",txtShape_flowChartManualOperation:"Flowchart: Manual Operation",txtShape_flowChartConnector:"Flowchart: Connector",txtShape_flowChartOffpageConnector:"Flowchart: Off-page Connector",txtShape_flowChartPunchedCard:"Flowchart: Card",txtShape_flowChartPunchedTape:"Flowchart: Punched Tape",txtShape_flowChartSummingJunction:"Flowchart: Summing Junction",txtShape_flowChartOr:"Flowchart: Or",txtShape_flowChartCollate:"Flowchart: Collate",txtShape_flowChartSort:"Flowchart: Sort",txtShape_flowChartExtract:"Flowchart: Extract",txtShape_flowChartMerge:"Flowchart: Merge",txtShape_flowChartOnlineStorage:"Flowchart: Stored Data",txtShape_flowChartDelay:"Flowchart: Delay",txtShape_flowChartMagneticTape:"Flowchart: Sequential Access Storage",txtShape_flowChartMagneticDisk:"Flowchart: Magnetic Disk",txtShape_flowChartMagneticDrum:"Flowchart: Direct Access Storage",txtShape_flowChartDisplay:"Flowchart: Display",txtShape_irregularSeal1:"Explosion 1",txtShape_irregularSeal2:"Explosion 2",txtShape_star4:"4-Point Star",txtShape_star5:"5-Point Star",txtShape_star6:"6-Point Star",txtShape_star7:"7-Point Star",txtShape_star8:"8-Point Star",txtShape_star10:"10-Point Star",txtShape_star12:"12-Point Star",txtShape_star16:"16-Point Star",txtShape_star24:"24-Point Star",txtShape_star32:"32-Point Star",txtShape_ribbon2:"Up Ribbon",txtShape_ribbon:"Down Ribbon",txtShape_ellipseRibbon2:"Curved Up Ribbon",txtShape_ellipseRibbon:"Curved Down Ribbon",txtShape_verticalScroll:"Vertical Scroll",txtShape_horizontalScroll:"Horizontal Scroll",txtShape_wave:"Wave",txtShape_doubleWave:"Double Wave",txtShape_wedgeRectCallout:"Rectangular Callout",txtShape_wedgeRoundRectCallout:"Rounded Rectangular Callout",txtShape_wedgeEllipseCallout:"Oval Callout",txtShape_cloudCallout:"Cloud Callout",txtShape_borderCallout1:"Line Callout 1",txtShape_borderCallout2:"Line Callout 2",txtShape_borderCallout3:"Line Callout 3",txtShape_accentCallout1:"Line Callout 1 (Accent Bar)",txtShape_accentCallout2:"Line Callout 2 (Accent Bar)",txtShape_accentCallout3:"Line Callout 3 (Accent Bar)",txtShape_callout1:"Line Callout 1 (No Border)",txtShape_callout2:"Line Callout 2 (No Border)",txtShape_callout3:"Line Callout 3 (No Border)",txtShape_accentBorderCallout1:"Line Callout 1 (Border and Accent Bar)",txtShape_accentBorderCallout2:"Line Callout 2 (Border and Accent Bar)",txtShape_accentBorderCallout3:"Line Callout 3 (Border and Accent Bar)",txtShape_actionButtonBackPrevious:"Back or Previous Button",txtShape_actionButtonForwardNext:"Forward or Next Button",txtShape_actionButtonBeginning:"Beginning Button",txtShape_actionButtonEnd:"End Button",txtShape_actionButtonHome:"Home Button",txtShape_actionButtonInformation:"Information Button",txtShape_actionButtonReturn:"Return Button",txtShape_actionButtonMovie:"Movie Button",txtShape_actionButtonDocument:"Document Button",txtShape_actionButtonSound:"Sound Button",txtShape_actionButtonHelp:"Help Button",txtShape_actionButtonBlank:"Blank Button",txtShape_roundRect:"Round Corner Rectangle",txtShape_snip1Rect:"Snip Single Corner Rectangle",txtShape_snip2SameRect:"Snip Same Side Corner Rectangle",txtShape_snip2DiagRect:"Snip Diagonal Corner Rectangle",txtShape_snipRoundRect:"Snip and Round Single Corner Rectangle",txtShape_round1Rect:"Round Single Corner Rectangle",txtShape_round2SameRect:"Round Same Side Corner Rectangle",txtShape_round2DiagRect:"Round Diagonal Corner Rectangle",txtShape_line:"Line",txtShape_lineWithArrow:"Arrow",txtShape_lineWithTwoArrows:"Double Arrow",txtShape_bentConnector5:"Elbow Connector",txtShape_bentConnector5WithArrow:"Elbow Arrow Connector",txtShape_bentConnector5WithTwoArrows:"Elbow Double-Arrow Connector",txtShape_curvedConnector3:"Curved Connector",txtShape_curvedConnector3WithArrow:"Curved Arrow Connector",txtShape_curvedConnector3WithTwoArrows:"Curved Double-Arrow Connector",txtShape_spline:"Curve",txtShape_polyline1:"Scribble",txtShape_polyline2:"Freeform",errorEmailClient:"No email client could be found",textCustomLoader:"Please note that according to the terms of the license you are not entitled to change the loader. Please contact our Sales Department to get a quote.",waitText:"Please, wait..."}}(),PE.Controllers.Main||{}))}),define("common/main/lib/view/DocumentAccessDialog",["common/main/lib/component/Window","common/main/lib/component/LoadMask"],function(){"use strict";Common.Views.DocumentAccessDialog=Common.UI.Window.extend(_.extend({initialize:function(t){var e={};_.extend(e,{title:this.textTitle,width:600,height:536,header:!0},t),this.template=[''].join(""),e.tpl=_.template(this.template)(e),this.settingsurl=t.settingsurl||"",Common.UI.Window.prototype.initialize.call(this,e)},render:function(){Common.UI.Window.prototype.render.call(this),this.$window.find("> .body").css({height:"auto",overflow:"hidden"});var t=document.createElement("iframe");t.width="100%",t.height=500,t.align="top",t.frameBorder=0,t.scrolling="no",t.onload=_.bind(this._onLoad,this),$("#id-sharing-placeholder").append(t),this.loadMask=new Common.UI.LoadMask({owner:$("#id-sharing-placeholder")}),this.loadMask.setTitle(this.textLoading),this.loadMask.show(),t.src=this.settingsurl;var e=this;this._eventfunc=function(t){e._onWindowMessage(t)},this._bindWindowEvents.call(this),this.on("close",function(t){e._unbindWindowEvents()})},_bindWindowEvents:function(){window.addEventListener?window.addEventListener("message",this._eventfunc,!1):window.attachEvent&&window.attachEvent("onmessage",this._eventfunc)},_unbindWindowEvents:function(){window.removeEventListener?window.removeEventListener("message",this._eventfunc):window.detachEvent&&window.detachEvent("onmessage",this._eventfunc)},_onWindowMessage:function(t){if(t&&window.JSON)try{this._onMessage.call(this,window.JSON.parse(t.data))}catch(t){}},_onMessage:function(t){t&&"onlyoffice"==t.Referer&&(t.needUpdate&&this.trigger("accessrights",this,t.sharingSettings),Common.NotificationCenter.trigger("window:close",this))},_onLoad:function(){this.loadMask&&this.loadMask.hide()},textTitle:"Sharing Settings",textLoading:"Loading"},Common.Views.DocumentAccessDialog||{}))}),define("presentationeditor/main/app/view/FileMenuPanels",["common/main/lib/view/DocumentAccessDialog","common/main/lib/component/CheckBox"],function(){"use strict";!PE.Views.FileMenuPanels&&(PE.Views.FileMenuPanels={}),PE.Views.FileMenuPanels.ViewSaveAs=Common.UI.BaseView.extend({el:"#panel-saveas",menu:void 0,formats:[[{name:"PPTX",imgCls:"pptx",type:Asc.c_oAscFileType.PPTX},{name:"PDF",imgCls:"pdf",type:Asc.c_oAscFileType.PDF},{name:"ODP",imgCls:"odp",type:Asc.c_oAscFileType.ODP}],[{name:"POTX",imgCls:"potx",type:Asc.c_oAscFileType.POTX},{name:"PDFA",imgCls:"pdfa",type:Asc.c_oAscFileType.PDFA},{name:"OTP",imgCls:"otp",type:Asc.c_oAscFileType.OTP}]],template:_.template(["
"].join("")),initialize:function(t){Common.UI.BaseView.prototype.initialize.call(this,arguments),this.menu=t.menu},render:function(){return $(this.el).html(this.template({scope:this})),this.chSpell=new Common.UI.CheckBox({el:$("#fms-chb-spell-check"),labelText:this.strSpellCheckMode}),this.chInputMode=new Common.UI.CheckBox({el:$("#fms-chb-input-mode"),labelText:this.strInputMode}),this.cmbZoom=new Common.UI.ComboBox({el:$("#fms-cmb-zoom"),style:"width: 160px;",editable:!1,cls:"input-group-nr",menuStyle:"max-height: 210px;",data:[{value:-1,displayValue:this.txtFitSlide},{value:-2,displayValue:this.txtFitWidth},{value:50,displayValue:"50%"},{value:60,displayValue:"60%"},{value:70,displayValue:"70%"},{value:80,displayValue:"80%"},{value:90,displayValue:"90%"},{value:100,displayValue:"100%"},{value:110,displayValue:"110%"},{value:120,displayValue:"120%"},{value:150,displayValue:"150%"},{value:175,displayValue:"175%"},{value:200,displayValue:"200%"}]}),this.cmbCoAuthMode=new Common.UI.ComboBox({el:$("#fms-cmb-coauth-mode"),style:"width: 160px;",editable:!1,cls:"input-group-nr",data:[{value:1,displayValue:this.strFast,descValue:this.strCoAuthModeDescFast},{value:0,displayValue:this.strStrict,descValue:this.strCoAuthModeDescStrict}]}).on("selected",_.bind(function(t,e){1==e.value&&"checked"!==this.chAutosave.getValue()&&this.chAutosave.setValue(1),this.lblCoAuthMode.text(e.descValue)},this)),this.lblCoAuthMode=$("#fms-lbl-coauth-mode"),this.chAutosave=new Common.UI.CheckBox({el:$("#fms-chb-autosave"),labelText:this.strAutosave}).on("change",_.bind(function(t,e,i,n){"checked"!==t.getValue()&&this.cmbCoAuthMode.getValue()&&(this.cmbCoAuthMode.setValue(0),this.lblCoAuthMode.text(this.strCoAuthModeDescStrict))},this)),this.lblAutosave=$("#fms-lbl-autosave"),this.chForcesave=new Common.UI.CheckBox({el:$("#fms-chb-forcesave"),labelText:this.strForcesave}),this.chAlignGuides=new Common.UI.CheckBox({el:$("#fms-chb-align-guides"),labelText:this.strAlignGuides}),this.cmbFontRender=new Common.UI.ComboBox({el:$("#fms-cmb-font-render"),style:"width: 160px;",editable:!1,cls:"input-group-nr",data:[{value:Asc.c_oAscFontRenderingModeType.hintingAndSubpixeling,displayValue:this.txtWin},{value:Asc.c_oAscFontRenderingModeType.noHinting,displayValue:this.txtMac},{value:Asc.c_oAscFontRenderingModeType.hinting,displayValue:this.txtNative}]}),this.cmbUnit=new Common.UI.ComboBox({el:$("#fms-cmb-unit"),style:"width: 160px;",editable:!1,cls:"input-group-nr",data:[{value:Common.Utils.Metric.c_MetricUnits.cm,displayValue:this.txtCm},{value:Common.Utils.Metric.c_MetricUnits.pt,displayValue:this.txtPt},{value:Common.Utils.Metric.c_MetricUnits.inch,displayValue:this.txtInch}]}),this.btnApply=new Common.UI.Button({el:"#fms-btn-apply"}),this.btnApply.on("click",_.bind(this.applySettings,this)),_.isUndefined(this.scroller)&&(this.scroller=new Common.UI.Scroller({el:$(this.el),suppressScrollX:!0})),this},show:function(){Common.UI.BaseView.prototype.show.call(this,arguments),this.updateSettings()},setMode:function(t){this.mode=t,$("tr.edit",this.el)[t.isEdit?"show":"hide"](),$("tr.autosave",this.el)[t.isEdit?"show":"hide"](),this.mode.isDesktopApp&&this.mode.isOffline&&(this.chAutosave.setCaption(this.strAutoRecover),this.lblAutosave.text(this.textAutoRecover)),$("tr.forcesave",this.el)[t.canForcesave?"show":"hide"](),$("tr.coauth.changes",this.el)[t.isEdit&&!t.isOffline&&t.canCoAuthoring?"show":"hide"]()},updateSettings:function(){this.chSpell.setValue(Common.Utils.InternalSettings.get("pe-settings-spellcheck")),this.chInputMode.setValue(Common.Utils.InternalSettings.get("pe-settings-inputmode"));var t=Common.Utils.InternalSettings.get("pe-settings-zoom");t=null!==t?parseInt(t):this.mode.customization&&this.mode.customization.zoom?parseInt(this.mode.customization.zoom):-1;var e=this.cmbZoom.store.findWhere({value:t});this.cmbZoom.setValue(e?parseInt(e.get("value")):t>0?t+"%":100);var i=Common.Utils.InternalSettings.get("pe-settings-coauthmode");e=this.cmbCoAuthMode.store.findWhere({value:i?1:0}),this.cmbCoAuthMode.setValue(e?e.get("value"):1),this.lblCoAuthMode.text(e?e.get("descValue"):this.strCoAuthModeDescFast),t=Common.Utils.InternalSettings.get("pe-settings-fontrender"),e=this.cmbFontRender.store.findWhere({value:parseInt(t)}),this.cmbFontRender.setValue(e?e.get("value"):window.devicePixelRatio>1?Asc.c_oAscFontRenderingModeType.noHinting:Asc.c_oAscFontRenderingModeType.hintingAndSubpixeling),t=Common.Utils.InternalSettings.get("pe-settings-unit"),e=this.cmbUnit.store.findWhere({value:t}),this.cmbUnit.setValue(e?parseInt(e.get("value")):Common.Utils.Metric.getDefaultMetric()),this._oldUnits=this.cmbUnit.getValue(),t=Common.Utils.InternalSettings.get("pe-settings-autosave"),this.chAutosave.setValue(1==t),this.mode.canForcesave&&this.chForcesave.setValue(Common.Utils.InternalSettings.get("pe-settings-forcesave")),this.chAlignGuides.setValue(Common.Utils.InternalSettings.get("pe-settings-showsnaplines"))},applySettings:function(){Common.localStorage.setItem("pe-settings-spellcheck",this.chSpell.isChecked()?1:0),Common.localStorage.setItem("pe-settings-inputmode",this.chInputMode.isChecked()?1:0),Common.localStorage.setItem("pe-settings-zoom",this.cmbZoom.getValue()),Common.Utils.InternalSettings.set("pe-settings-zoom",Common.localStorage.getItem("pe-settings-zoom")),this.mode.isEdit&&!this.mode.isOffline&&this.mode.canCoAuthoring&&Common.localStorage.setItem("pe-settings-coauthmode",this.cmbCoAuthMode.getValue()),Common.localStorage.setItem("pe-settings-fontrender",this.cmbFontRender.getValue()),Common.localStorage.setItem("pe-settings-unit",this.cmbUnit.getValue()),Common.localStorage.setItem("pe-settings-autosave",this.chAutosave.isChecked()?1:0),this.mode.canForcesave&&Common.localStorage.setItem("pe-settings-forcesave",this.chForcesave.isChecked()?1:0),Common.Utils.InternalSettings.set("pe-settings-showsnaplines",this.chAlignGuides.isChecked()),Common.localStorage.save(),this.menu&&(this.menu.fireEvent("settings:apply",[this.menu]),this._oldUnits!==this.cmbUnit.getValue()&&Common.NotificationCenter.trigger("settings:unitschanged",this))},strInputMode:"Turn on hieroglyphs",strZoom:"Default Zoom Value",okButtonText:"Apply",txtFitSlide:"Fit to Slide",txtInput:"Alternate Input",txtWin:"as Windows",txtMac:"as OS X",txtNative:"Native",strFontRender:"Font Hinting",strUnit:"Unit of Measurement",txtCm:"Centimeter",txtPt:"Point",textAutoSave:"Autosave",strAutosave:"Turn on autosave",strShowChanges:"Realtime Collaboration Changes",txtAll:"View All",txtLast:"View Last",textAlignGuides:"Alignment Guides",strAlignGuides:"Turn on alignment guides",strCoAuthMode:"Co-editing mode",strCoAuthModeDescFast:"Other users will see your changes at once",strCoAuthModeDescStrict:"You will need to accept changes before you can see them",strFast:"Fast",strStrict:"Strict",textAutoRecover:"Autorecover",strAutoRecover:"Turn on autorecover",txtInch:"Inch",txtFitWidth:"Fit to Width",textForceSave:"Save to Server",strForcesave:"Always save to server (otherwise save to server on document close)",txtSpellCheck:"Spell Checking",strSpellCheckMode:"Turn on spell checking option"},PE.Views.FileMenuPanels.Settings||{})),PE.Views.FileMenuPanels.RecentFiles=Common.UI.BaseView.extend({el:"#panel-recentfiles",menu:void 0,template:_.template([''].join("")),initialize:function(t){Common.UI.BaseView.prototype.initialize.call(this,arguments),this.menu=t.menu,this.recent=t.recent},render:function(){return $(this.el).html(this.template()),this.viewRecentPicker=new Common.UI.DataView({el:$("#id-recent-view"),store:new Common.UI.DataViewStore(this.recent),itemTemplate:_.template(['
"].join("")),initialize:function(t){Common.UI.BaseView.prototype.initialize.call(this,arguments),this.menu=t.menu},render:function(){return $(this.el).html(this.template({scope:this,docs:this.options[0].docs})),_.isUndefined(this.scroller)&&(this.scroller=new Common.UI.Scroller({el:$(this.el),suppressScrollX:!0})),this},_onBlankDocument:function(){this.menu&&this.menu.fireEvent("create:new",[this.menu,"blank"])},_onDocumentTemplate:function(t){this.menu&&this.menu.fireEvent("create:new",[this.menu,t.currentTarget.attributes.template.value])},fromBlankText:"From Blank",newDocumentText:"New Presentation",newDescriptionText:"Create a new blank presentation which you will be able to style and format after it is created during the editing. Or choose one of the templates to start a document of a certain type or purpose where some styles have already been pre-applied.",fromTemplateText:"From Template",noTemplatesText:"There are no templates"},PE.Views.FileMenuPanels.CreateNew||{})),PE.Views.FileMenuPanels.DocumentInfo=Common.UI.BaseView.extend(_.extend({el:"#panel-info",menu:void 0,initialize:function(t){Common.UI.BaseView.prototype.initialize.call(this,arguments),this.rendered=!1,this.template=_.template(['
"].join("")),this.menu=t.menu},render:function(){return $(this.el).html(this.template()),this.cntRights=$("#id-info-rights"),this.btnEditRights=new Common.UI.Button({el:"#id-info-btn-edit"}),this.btnEditRights.on("click",_.bind(this.changeAccessRights,this)),this.rendered=!0,this.updateInfo(this.doc),_.isUndefined(this.scroller)&&(this.scroller=new Common.UI.Scroller({el:$(this.el),suppressScrollX:!0})),Common.NotificationCenter.on("collaboration:sharing",_.bind(this.changeAccessRights,this)),Common.NotificationCenter.on("collaboration:sharingdeny",_.bind(this.onLostEditRights,this)),this},show:function(){Common.UI.BaseView.prototype.show.call(this,arguments)},hide:function(){Common.UI.BaseView.prototype.hide.call(this,arguments)},updateInfo:function(t){this.doc=t,this.rendered&&(t=t||{},t.info?(t.info.sharingSettings&&this.cntRights.html(this.templateRights({users:t.info.sharingSettings})),this._ShowHideInfoItem("rights",void 0!==t.info.sharingSettings&&null!==t.info.sharingSettings&&t.info.sharingSettings.length>0),this._ShowHideInfoItem("edit-rights",!!this.sharingSettingsUrl&&this.sharingSettingsUrl.length&&!0!==this._readonlyRights)):this._ShowHideDocInfo(!1))},_ShowHideInfoItem:function(t,e){$("tr."+t,this.el)[e?"show":"hide"]()},_ShowHideDocInfo:function(t){this._ShowHideInfoItem("rights",t),this._ShowHideInfoItem("edit-rights",t)},setMode:function(t){return this.sharingSettingsUrl=t.sharingSettingsUrl,!!this.sharingSettingsUrl&&this.sharingSettingsUrl.length&&Common.Gateway.on("showsharingsettings",_.bind(this.changeAccessRights,this)),!!this.sharingSettingsUrl&&this.sharingSettingsUrl.length&&Common.Gateway.on("setsharingsettings",_.bind(this.setSharingSettings,this)),this},changeAccessRights:function(t,e,i){if(!this._docAccessDlg&&!this._readonlyRights){var n=this;n._docAccessDlg=new Common.Views.DocumentAccessDialog({settingsurl:this.sharingSettingsUrl}),n._docAccessDlg.on("accessrights",function(t,e){n.updateSharingSettings(e)}).on("close",function(t){n._docAccessDlg=void 0}),n._docAccessDlg.show()}},setSharingSettings:function(t){t&&this.updateSharingSettings(t.sharingSettings)},updateSharingSettings:function(t){this.doc.info.sharingSettings=t,this._ShowHideInfoItem("rights",void 0!==this.doc.info.sharingSettings&&null!==this.doc.info.sharingSettings&&this.doc.info.sharingSettings.length>0),this.cntRights.html(this.templateRights({users:this.doc.info.sharingSettings})),Common.NotificationCenter.trigger("mentions:clearusers",this)},onLostEditRights:function(){this._readonlyRights=!0,this.rendered&&this._ShowHideInfoItem("edit-rights",!1)},txtRights:"Persons who have rights",txtBtnAccessRights:"Change access rights"},PE.Views.FileMenuPanels.DocumentRights||{})),PE.Views.FileMenuPanels.Help=Common.UI.BaseView.extend({el:"#panel-help",menu:void 0,template:_.template(['
','','',"
"].join("")),initialize:function(t){Common.UI.BaseView.prototype.initialize.call(this,arguments),this.menu=t.menu,this.urlPref="resources/help/en/",this.en_data=[{src:"ProgramInterface/ProgramInterface.htm",name:"Introducing Presentation Editor user interface",headername:"Program Interface"},{src:"ProgramInterface/FileTab.htm",name:"File tab"},{src:"ProgramInterface/HomeTab.htm",name:"Home Tab"},{src:"ProgramInterface/InsertTab.htm",name:"Insert tab"},{src:"ProgramInterface/PluginsTab.htm",name:"Plugins tab"},{src:"UsageInstructions/OpenCreateNew.htm",name:"Create a new presentation or open an existing one",headername:"Basic operations"},{src:"UsageInstructions/CopyPasteUndoRedo.htm",name:"Copy/paste data, undo/redo your actions"},{src:"UsageInstructions/ManageSlides.htm",name:"Manage slides",headername:"Working with slides"},{src:"UsageInstructions/SetSlideParameters.htm",name:"Set slide parameters"},{src:"UsageInstructions/ApplyTransitions.htm",name:"Apply transitions"},{src:"UsageInstructions/PreviewPresentation.htm",name:"Preview your presentation"},{src:"UsageInstructions/InsertText.htm",name:"Insert and format your text",headername:"Text formatting"},{src:"UsageInstructions/AddHyperlinks.htm",name:"Add hyperlinks"},{src:"UsageInstructions/CreateLists.htm",name:"Create lists"},{src:"UsageInstructions/CopyClearFormatting.htm",name:"Copy/clear formatting"},{src:"UsageInstructions/InsertAutoshapes.htm",name:"Insert and format autoshapes",headername:"Operations on objects"},{src:"UsageInstructions/InsertImages.htm",name:"Insert and adjust images"},{src:"UsageInstructions/InsertCharts.htm",name:"Insert and edit charts"},{src:"UsageInstructions/InsertTables.htm",name:"Insert and format tables"},{src:"UsageInstructions/FillObjectsSelectColor.htm",name:"Fill objects and select colors"},{src:"UsageInstructions/ManipulateObjects.htm",name:"Manipulate objects on a slide"},{src:"UsageInstructions/AlignArrangeObjects.htm",name:"Align and arrange objects on a slide"},{src:"UsageInstructions/InsertEquation.htm",name:"Insert equations",headername:"Math equations"},{src:"HelpfulHints/CollaborativeEditing.htm",name:"Collaborative presentation editing",headername:"Presentation co-editing"},{src:"UsageInstructions/ViewPresentationInfo.htm",name:"View presentation information",headername:"Tools and settings"},{src:"UsageInstructions/SavePrintDownload.htm",name:"Save/print/download your presentation"},{src:"HelpfulHints/AdvancedSettings.htm",name:"Advanced settings of Presentation Editor"},{src:"HelpfulHints/Navigation.htm",name:"View settings and navigation tools"},{src:"HelpfulHints/Search.htm",name:"Search function"},{src:"HelpfulHints/SpellChecking.htm",name:"Spell-checking"},{src:"HelpfulHints/About.htm",name:"About Presentation Editor",headername:"Helpful hints"},{src:"HelpfulHints/SupportedFormats.htm",name:"Supported formats of electronic presentations"},{src:"HelpfulHints/KeyboardShortcuts.htm",name:"Keyboard shortcuts"}],Common.Utils.isIE&&(window.onhelp=function(){return!1})},render:function(){var t=this;return $(this.el).html(this.template()),this.viewHelpPicker=new Common.UI.DataView({el:$("#id-help-contents"),store:new Common.UI.DataViewStore([]),keyMoveDirection:"vertical",itemTemplate:_.template(['
"].join(""))},render:function(){$(this.el).html(this.template({scope:this}));var t=PE.getController("Common.Controllers.Protection").getView();return this.btnAddPwd=t.getButton("add-password"),this.btnAddPwd.render(this.$el.find("#fms-btn-add-pwd")),this.btnAddPwd.on("click",_.bind(this.closeMenu,this)),this.btnChangePwd=t.getButton("change-password"),this.btnChangePwd.render(this.$el.find("#fms-btn-change-pwd")),this.btnChangePwd.on("click",_.bind(this.closeMenu,this)),this.btnDeletePwd=t.getButton("del-password"),this.btnDeletePwd.render(this.$el.find("#fms-btn-delete-pwd")),this.btnDeletePwd.on("click",_.bind(this.closeMenu,this)),this.cntPassword=$("#id-fms-password"),this.cntPasswordView=$("#id-fms-view-pwd"),this.btnAddInvisibleSign=t.getButton("signature"),this.btnAddInvisibleSign.render(this.$el.find("#fms-btn-invisible-sign")),this.btnAddInvisibleSign.on("click",_.bind(this.closeMenu,this)),this.cntSignature=$("#id-fms-signature"),this.cntSignatureView=$("#id-fms-signature-view"),_.isUndefined(this.scroller)&&(this.scroller=new Common.UI.Scroller({el:$(this.el),suppressScrollX:!0})),this.$el.on("click",".signature-edit-link",_.bind(this.onEdit,this)),this.$el.on("click",".signature-view-link",_.bind(this.onView,this)),this},show:function(){Common.UI.BaseView.prototype.show.call(this,arguments),this.updateSignatures(),this.updateEncrypt()},setMode:function(t){this.mode=t,this.cntSignature.toggleClass("hidden",!this.mode.isSignatureSupport),this.cntPassword.toggleClass("hidden",!this.mode.isPasswordSupport)},setApi:function(t){return this.api=t,this},closeMenu:function(){this.menu&&this.menu.hide()},onEdit:function(){this.menu&&this.menu.hide();var t=this;Common.UI.warning({title:this.notcriticalErrorTitle,msg:this.txtEditWarning,buttons:["ok","cancel"],primary:"ok",callback:function(e){"ok"==e&&t.api.asc_RemoveAllSignatures()}})},onView:function(){this.menu&&this.menu.hide(),PE.getController("RightMenu").rightmenu.SetActivePane(Common.Utils.documentSettingsType.Signature,!0)},updateSignatures:function(){var t=this.api.asc_getSignatures(),e=!1,i=!1;_.each(t,function(t,n){0==t.asc_getValid()?e=!0:i=!0});var n=i?this.txtSignedInvalid:e?this.txtSigned:"";this.cntSignatureView.html(this.templateSignature({tipText:n,hasSigned:e||i}))},updateEncrypt:function(){this.cntPasswordView.toggleClass("hidden",this.btnAddPwd.isVisible())},strProtect:"Protect Presentation",strSignature:"With Signature",txtView:"View signatures",txtEdit:"Edit presentation",txtSigned:"Valid signatures has been added to the presentation. The presentation is protected from editing.",txtSignedInvalid:"Some of the digital signatures in presentation are invalid or could not be verified. The presentation is protected from editing.",notcriticalErrorTitle:"Warning",txtEditWarning:"Editing will remove the signatures from the presentation. Are you sure you want to continue?",strEncrypt:"With Password",txtEncrypted:"This presentation has been protected by password"},PE.Views.FileMenuPanels.ProtectDoc||{}))}),void 0===Common)var Common={};if(Common.Models=Common.Models||{},define("common/main/lib/model/Comment",["underscore","backbone","common/main/lib/component/BaseView"],function(t,e){"use strict";Common.Models.Comment=e.Model.extend({defaults:{uid:0,guid:"",userid:0,username:"Guest",usercolor:null,date:void 0,quote:"",comment:"",resolved:!1,lock:!1,lockuserid:"",unattached:!1,id:Common.UI.getId(),time:0,showReply:!1,showReplyInPopover:!1,editText:!1,editTextInPopover:!1,last:void 0,replys:[],hideAddReply:!1,scope:null,hide:!1,hint:!1,dummy:void 0,editable:!0}}),Common.Models.Reply=e.Model.extend({defaults:{time:0,userid:0,username:"Guest",usercolor:null,reply:"",date:void 0,id:Common.UI.getId(),editText:!1,editTextInPopover:!1,scope:null,editable:!0}})}),void 0===Common)var Common={};if(Common.Collections=Common.Collections||{},define("common/main/lib/collection/Comments",["underscore","backbone","common/main/lib/model/Comment"],function(t,e){"use strict";Common.Collections.Comments=e.Collection.extend({model:Common.Models.Comment,groups:null,clearEditing:function(){this.each(function(t){t.set("editText",!1),t.set("editTextInPopover",!1),t.set("showReply",!1),t.set("showReplyInPopover",!1),t.set("hideAddReply",!1)})},getCommentsReplysCount:function(t){var e=0;return this.each(function(i){i.get("userid")==t&&e++;var n=i.get("replys");n&&n.length>0&&n.forEach(function(i){i.get("userid")==t&&e++})}),e}})}),define("text!common/main/lib/template/CommentsPopover.template",[],function(){return'
Find more information about connecting Document Server here',errorLockedWorksheetRename:"The sheet cannot be renamed at the moment as it is being renamed by another user",textTryUndoRedo:"The Undo/Redo functions are disabled for the Fast co-editing mode. Click the 'Strict mode' button to switch to the Strict co-editing mode to edit the file without other users interference and send your changes only after you save them. You can switch between the co-editing modes using the editor Advanced settings.",textStrict:"Strict mode",errorOpenWarning:"The length of one of the formulas in the file exceeded the allowed number of characters and it was removed.",errorFrmlWrongReferences:"The function refers to a sheet that does not exist. Please check the data and try again.",textBuyNow:"Visit website",textNoLicenseTitle:"%1 open source version",textContactUs:"Contact sales",
+(this.appOptions.isEditMailMerge||this.appOptions.isEditDiagram)&&(i.hide(),t.getController("LeftMenu").getView("LeftMenu").hide(),$(window).mouseup(function(t){Common.Gateway.internalMessage("processMouse",{event:"mouse:up"})}).mousemove($.proxy(function(t){this.isDiagramDrag&&Common.Gateway.internalMessage("processMouse",{event:"mouse:move",pagex:t.pageX*Common.Utils.zoom(),pagey:t.pageY*Common.Utils.zoom()})},this))),!this.appOptions.isEditMailMerge&&!this.appOptions.isEditDiagram){this.api.asc_registerCallback("asc_onSendThemeColors",_.bind(this.onSendThemeColors,this)),this.api.asc_registerCallback("asc_onDownloadUrl",_.bind(this.onDownloadUrl,this)),this.api.asc_registerCallback("asc_onDocumentModifiedChanged",_.bind(this.onDocumentModifiedChanged,this));var n=t.getController("Print");n&&this.api&&n.setApi(this.api)}var o=this.getApplication().getController("CellEditor");o&&o.setApi(this.api).setMode(this.appOptions)},applyModeEditorElements:function(t){var e=this.getApplication().getController("Common.Controllers.Comments");if(e&&(e.setMode(this.appOptions),e.setConfig({config:this.editorConfig,sdkviewname:"#ws-canvas-outer",hintmode:!0},this.api)),this.appOptions.isEdit){var i=this,n=this.getApplication(),o=n.getController("Toolbar"),s=n.getController("Statusbar"),a=n.getController("RightMenu"),l=n.getController("Common.Controllers.Fonts"),r=n.getController("Common.Controllers.ReviewChanges");l&&l.setApi(i.api),o&&o.setApi(i.api),a&&a.setApi(i.api),r.setMode(i.appOptions).setConfig({config:i.editorConfig},i.api),i.appOptions.canProtect&&n.getController("Common.Controllers.Protection").setMode(i.appOptions).setConfig({config:i.editorConfig},i.api),s&&s.getView("Statusbar").changeViewMode(!0),i.appOptions.isEditMailMerge||i.appOptions.isEditDiagram||i.appOptions.isOffline||n.getController("PivotTable").setMode(i.appOptions).setConfig({config:i.editorConfig},i.api);this.getApplication().getController("Viewport").getView("Viewport").applyEditorMode(),a.getView("RightMenu").setMode(i.appOptions).setApi(i.api),this.toolbarView=o.getView("Toolbar");var c=Common.localStorage.getItem("sse-settings-unit");if(c=null!==c?parseInt(c):Common.Utils.Metric.getDefaultMetric(),Common.Utils.Metric.setCurrentMetric(c),Common.Utils.InternalSettings.set("sse-settings-unit",c),i.appOptions.isEditMailMerge||i.appOptions.isEditDiagram)a.getView("RightMenu").hide();else{var h={};JSON.parse(Common.localStorage.getItem("sse-hidden-formula"))&&(h.formula=!0),n.getController("Toolbar").hideElements(h)}i.api.asc_registerCallback("asc_onAuthParticipantsChanged",_.bind(i.onAuthParticipantsChanged,i)),i.api.asc_registerCallback("asc_onParticipantsChanged",_.bind(i.onAuthParticipantsChanged,i)),i.appOptions.isEditDiagram&&i.api.asc_registerCallback("asc_onSelectionChanged",_.bind(i.onSelectionChanged,i)),i.api.asc_setFilteringMode&&i.api.asc_setFilteringMode(i.appOptions.canModifyFilter),i.stackLongActions.exist({id:-255,type:Asc.c_oAscAsyncActionType.BlockInteraction})?i.onLongActionEnd(Asc.c_oAscAsyncActionType.BlockInteraction,-255):this._isDocReady||(Common.NotificationCenter.trigger("app:face",this.appOptions),i.hidePreloader(),i.onLongActionBegin(Asc.c_oAscAsyncActionType.BlockInteraction,-256)),window.onbeforeunload=_.bind(i.onBeforeUnload,i),window.onunload=_.bind(i.onUnload,i)}},onExternalMessage:function(t){t&&t.msg&&(t.msg=t.msg.toString(),this.showTips([t.msg.charAt(0).toUpperCase()+t.msg.substring(1)]),Common.component.Analytics.trackEvent("External Error"))},onError:function(t,e,i){if(t==Asc.c_oAscError.ID.LoadingScriptError)return this.showTips([this.scriptLoadError]),void(this.tooltip&&this.tooltip.getBSTip().$tip.css("z-index",1e4));this.hidePreloader(),this.onLongActionEnd(Asc.c_oAscAsyncActionType.BlockInteraction,-256);var n={closable:!0};switch(t){case Asc.c_oAscError.ID.Unknown:n.msg=this.unknownErrorText;break;case Asc.c_oAscError.ID.ConvertationTimeout:n.msg=this.convertationTimeoutText;break;case Asc.c_oAscError.ID.ConvertationOpenError:n.msg=this.openErrorText;break;case Asc.c_oAscError.ID.ConvertationSaveError:n.msg=this.saveErrorText;break;case Asc.c_oAscError.ID.DownloadError:n.msg=this.downloadErrorText;break;case Asc.c_oAscError.ID.UplImageSize:n.msg=this.uploadImageSizeMessage;break;case Asc.c_oAscError.ID.UplImageExt:n.msg=this.uploadImageExtMessage;break;case Asc.c_oAscError.ID.UplImageFileCount:n.msg=this.uploadImageFileCountMessage;break;case Asc.c_oAscError.ID.PastInMergeAreaError:n.msg=this.pastInMergeAreaError;break;case Asc.c_oAscError.ID.FrmlWrongCountParentheses:n.msg=this.errorWrongBracketsCount;break;case Asc.c_oAscError.ID.FrmlWrongOperator:n.msg=this.errorWrongOperator;break;case Asc.c_oAscError.ID.FrmlWrongMaxArgument:n.msg=this.errorCountArgExceed;break;case Asc.c_oAscError.ID.FrmlWrongCountArgument:n.msg=this.errorCountArg;break;case Asc.c_oAscError.ID.FrmlWrongFunctionName:n.msg=this.errorFormulaName;break;case Asc.c_oAscError.ID.FrmlAnotherParsingError:n.msg=this.errorFormulaParsing;break;case Asc.c_oAscError.ID.FrmlWrongArgumentRange:n.msg=this.errorArgsRange;break;case Asc.c_oAscError.ID.FrmlOperandExpected:n.msg=this.errorOperandExpected;break;case Asc.c_oAscError.ID.FrmlWrongReferences:n.msg=this.errorFrmlWrongReferences;break;case Asc.c_oAscError.ID.UnexpectedGuid:n.msg=this.errorUnexpectedGuid;break;case Asc.c_oAscError.ID.Database:n.msg=this.errorDatabaseConnection;break;case Asc.c_oAscError.ID.FileRequest:n.msg=this.errorFileRequest;break;case Asc.c_oAscError.ID.FileVKey:n.msg=this.errorFileVKey;break;case Asc.c_oAscError.ID.StockChartError:n.msg=this.errorStockChart;break;case Asc.c_oAscError.ID.DataRangeError:n.msg=this.errorDataRange;break;case Asc.c_oAscError.ID.MaxDataPointsError:n.msg=this.errorMaxPoints;break;case Asc.c_oAscError.ID.VKeyEncrypt:n.msg=this.errorToken;break;case Asc.c_oAscError.ID.KeyExpire:n.msg=this.errorTokenExpire;break;case Asc.c_oAscError.ID.UserCountExceed:n.msg=this.errorUsersExceed;break;case Asc.c_oAscError.ID.CannotMoveRange:n.msg=this.errorMoveRange;break;case Asc.c_oAscError.ID.UplImageUrl:n.msg=this.errorBadImageUrl;break;case Asc.c_oAscError.ID.CoAuthoringDisconnect:n.msg=this.errorViewerDisconnect;break;case Asc.c_oAscError.ID.ConvertationPassword:n.msg=this.errorFilePassProtect;break;case Asc.c_oAscError.ID.AutoFilterDataRangeError:n.msg=this.errorAutoFilterDataRange;break;case Asc.c_oAscError.ID.AutoFilterChangeFormatTableError:n.msg=this.errorAutoFilterChangeFormatTable;break;case Asc.c_oAscError.ID.AutoFilterChangeError:n.msg=this.errorAutoFilterChange;break;case Asc.c_oAscError.ID.AutoFilterMoveToHiddenRangeError:n.msg=this.errorAutoFilterHiddenRange;break;case Asc.c_oAscError.ID.CannotFillRange:n.msg=this.errorFillRange;break;case Asc.c_oAscError.ID.UserDrop:if(this._state.lostEditingRights)return void(this._state.lostEditingRights=!1);this._state.lostEditingRights=!0,n.msg=this.errorUserDrop,Common.NotificationCenter.trigger("collaboration:sharingdeny");break;case Asc.c_oAscError.ID.InvalidReferenceOrName:n.msg=this.errorInvalidRef;break;case Asc.c_oAscError.ID.LockCreateDefName:n.msg=this.errorCreateDefName;break;case Asc.c_oAscError.ID.PasteMaxRangeError:n.msg=this.errorPasteMaxRange;break;case Asc.c_oAscError.ID.LockedAllError:n.msg=this.errorLockedAll;break;case Asc.c_oAscError.ID.Warning:n.msg=this.errorConnectToServer.replace("%1","https://api.onlyoffice.com/editors/callback"),n.closable=!1;break;case Asc.c_oAscError.ID.LockedWorksheetRename:n.msg=this.errorLockedWorksheetRename;break;case Asc.c_oAscError.ID.OpenWarning:n.msg=this.errorOpenWarning;break;case Asc.c_oAscError.ID.CopyMultiselectAreaError:n.msg=this.errorCopyMultiselectArea;break;case Asc.c_oAscError.ID.PrintMaxPagesCount:n.msg=this.errorPrintMaxPagesCount;break;case Asc.c_oAscError.ID.SessionAbsolute:n.msg=this.errorSessionAbsolute;break;case Asc.c_oAscError.ID.SessionIdle:n.msg=this.errorSessionIdle;break;case Asc.c_oAscError.ID.SessionToken:n.msg=this.errorSessionToken;break;case Asc.c_oAscError.ID.AccessDeny:n.msg=this.errorAccessDeny;break;case Asc.c_oAscError.ID.LockedCellPivot:n.msg=this.errorLockedCellPivot;break;case Asc.c_oAscError.ID.ForceSaveButton:n.msg=this.errorForceSave;break;case Asc.c_oAscError.ID.ForceSaveTimeout:n.msg=this.errorForceSave,console.warn(n.msg);break;case Asc.c_oAscError.ID.DataEncrypted:n.msg=this.errorDataEncrypted;break;case Asc.c_oAscError.ID.EditingError:n.msg=this.appOptions.isDesktopApp&&this.appOptions.isOffline?this.errorEditingSaveas:this.errorEditingDownloadas;break;case Asc.c_oAscError.ID.CannotChangeFormulaArray:n.msg=this.errorChangeArray;break;case Asc.c_oAscError.ID.MultiCellsInTablesFormulaArray:n.msg=this.errorMultiCellFormula;break;case Asc.c_oAscError.ID.MailToClientMissing:n.msg=this.errorEmailClient;break;case Asc.c_oAscError.ID.NoDataToParse:n.msg=this.errorNoDataToParse;break;case Asc.c_oAscError.ID.CannotUngroupError:n.msg=this.errorCannotUngroup;break;case Asc.c_oAscError.ID.FrmlMaxTextLength:n.msg=this.errorFrmlMaxTextLength;break;case Asc.c_oAscError.ID.DataValidate:var o=i?i.asc_getErrorStyle():void 0;void 0!==o&&(n.iconCls=o==Asc.c_oAscEDataValidationErrorStyle.Stop?"error":o==Asc.c_oAscEDataValidationErrorStyle.Information?"info":"warn"),i&&i.asc_getErrorTitle()&&(n.title=i.asc_getErrorTitle()),n.buttons=["ok","cancel"],n.msg=i&&i.asc_getError()?i.asc_getError():this.errorDataValidate,n.maxwidth=600;break;default:n.msg="string"==typeof t?t:this.errorDefaultMessage.replace("%1",t)}e==Asc.c_oAscError.Level.Critical?(Common.Gateway.reportError(t,n.msg),n.title=this.criticalErrorTitle,n.iconCls="error",n.closable=!1,this.appOptions.canBackToFolder&&!this.appOptions.isDesktopApp&&"string"!=typeof t&&(n.msg+="
"+this.criticalErrorExtText,n.callback=function(t){"ok"==t&&Common.NotificationCenter.trigger("goback",!0)}),t==Asc.c_oAscError.ID.DataEncrypted&&(this.api.asc_coAuthoringDisconnect(),Common.NotificationCenter.trigger("api:disconnect"))):(Common.Gateway.reportWarning(t,n.msg),n.title=n.title||this.notcriticalErrorTitle,n.iconCls=n.iconCls||"warn",n.buttons=n.buttons||["ok"],n.callback=_.bind(function(e){t==Asc.c_oAscError.ID.Warning&&"ok"==e&&this.appOptions.canDownload?(Common.UI.Menu.Manager.hideAll(),this.appOptions.isDesktopApp&&this.appOptions.isOffline?this.api.asc_DownloadAs():this.getApplication().getController("LeftMenu").leftMenu.showMenu("file:saveas")):t==Asc.c_oAscError.ID.EditingError?(this.disableEditing(!0),Common.NotificationCenter.trigger("api:disconnect",!0)):t==Asc.c_oAscError.ID.DataValidate&&"ok"!==e&&this.api.asc_closeCellEditor(!0),this._state.lostEditingRights=!1,this.onEditComplete()},this)),$(".asc-window.modal.alert:visible").length<1&&t!==Asc.c_oAscError.ID.ForceSaveTimeout&&(Common.UI.alert(n),Common.component.Analytics.trackEvent("Internal Error",t.toString()))},onCoAuthoringDisconnect:function(){this.getApplication().getController("Viewport").getView("Viewport").setMode({isDisconnected:!0}),this.getApplication().getController("Viewport").getView("Common.Views.Header").setCanRename(!1),this.appOptions.canRename=!1,this._state.isDisconnected=!0},showTips:function(t){function e(){var e=t.shift();e&&(e+="\n"+i.textCloseTip,n.setTitle(e),n.show())}var i=this;if(t.length){"object"!=typeof t&&(t=[t]),this.tooltip||(this.tooltip=new Common.UI.Tooltip({owner:this.getApplication().getController("Toolbar").getView("Toolbar"),hideonclick:!0,placement:"bottom",cls:"main-info",offset:30}));var n=this.tooltip;n.on("tooltip:hide",function(){setTimeout(e,300)}),e()}},updateWindowTitle:function(t,e){if(this._state.isDocModified!==t||e){if(this.headerView){var i=this.defaultTitleText;if(_.isEmpty(this.headerView.getDocumentCaption())||(i=this.headerView.getDocumentCaption()+" - "+i),t)clearTimeout(this._state.timerCaption),_.isUndefined(i)||(i="* "+i,this.headerView.setDocumentCaption(this.headerView.getDocumentCaption(),!0));else if(this._state.fastCoauth&&this._state.usersCount>1){var n=this;this._state.timerCaption=setTimeout(function(){n.headerView.setDocumentCaption(n.headerView.getDocumentCaption(),!1)},500)}else this.headerView.setDocumentCaption(this.headerView.getDocumentCaption(),!1);window.document.title!=i&&(window.document.title=i)}Common.Gateway.setDocumentModified(t),this._state.isDocModified=t}},onDocumentChanged:function(){},onDocumentModifiedChanged:function(t){if(this.updateWindowTitle(t),Common.Gateway.setDocumentModified(t),this.toolbarView&&this.toolbarView.btnCollabChanges&&this.api){var e=this.toolbarView.btnCollabChanges.$icon.hasClass("btn-synch"),i=this.appOptions.forcesave,n=this.api.asc_isDocumentCanSave(),o=!n&&!e&&!i||this._state.isDisconnected||this._state.fastCoauth&&this._state.usersCount>1&&!i;this.toolbarView.btnSave.setDisabled(o)}},onDocumentCanSaveChanged:function(t){if(this.toolbarView&&this.toolbarView.btnCollabChanges){var e=this.toolbarView.btnCollabChanges.$icon.hasClass("btn-synch"),i=this.appOptions.forcesave,n=!t&&!e&&!i||this._state.isDisconnected||this._state.fastCoauth&&this._state.usersCount>1&&!i;this.toolbarView.btnSave.setDisabled(n)}},onBeforeUnload:function(){if(Common.localStorage.save(),!1!==this.permissions.edit&&"view"!==this.editorConfig.mode&&"editdiagram"!==this.editorConfig.mode&&"editmerge"!==this.editorConfig.mode&&this.api.asc_isDocumentModified()){var t=this;return this.api.asc_stopSaving(),this.continueSavingTimer=window.setTimeout(function(){t.api.asc_continueSaving()},500),this.leavePageText}},onUnload:function(){this.continueSavingTimer&&clearTimeout(this.continueSavingTimer)},hidePreloader:function(){var i;this._state.customizationDone||(this._state.customizationDone=!0,this.appOptions.customization&&(this.appOptions.isDesktopApp?this.appOptions.customization.about=!1:this.appOptions.canBrandingExt||(this.appOptions.customization.about=!0)),Common.Utils.applyCustomization(this.appOptions.customization,t),this.appOptions.canBrandingExt&&(Common.Utils.applyCustomization(this.appOptions.customization,e),i=this.getApplication().getController("Common.Controllers.Plugins").applyUICustomization())),this.stackLongActions.pop({id:-254,type:Asc.c_oAscAsyncActionType.BlockInteraction}),Common.NotificationCenter.trigger("layout:changed","main"),(i||new Promise(function(t,e){t()})).then(function(){$("#loading-mask").hide().remove(),Common.Controllers.Desktop.process("preloader:hide")})},onDownloadUrl:function(t){this._state.isFromGatewayDownloadAs&&Common.Gateway.downloadAs(t),this._state.isFromGatewayDownloadAs=!1},onDownloadCancel:function(){this._state.isFromGatewayDownloadAs=!1},onUpdateVersion:function(t){var e=this;e.needToUpdateVersion=!0,e.onLongActionEnd(Asc.c_oAscAsyncActionType.BlockInteraction,-256),Common.UI.error({msg:this.errorUpdateVersion,callback:function(){_.defer(function(){Common.Gateway.updateVersion(),t&&t.call(e),e.onLongActionBegin(Asc.c_oAscAsyncActionType.BlockInteraction,-256)})}})},onServerVersion:function(t){return!1},onAdvancedOptions:function(t,e,i,n){if(!this._state.openDlg){var o=this;t==Asc.c_oAscAdvancedOptionsID.CSV?o._state.openDlg=new Common.Views.OpenDialog({title:Common.Views.OpenDialog.prototype.txtTitle.replace("%1","CSV"),closable:2==i,type:Common.Utils.importTextType.CSV,preview:e.asc_getData(),codepages:e.asc_getCodePages(),settings:e.asc_getRecommendedSettings(),api:o.api,handler:function(e,s,a,l){o.isShowOpenDialog=!1,"ok"==e&&o&&o.api&&(2==i?(n&&n.asc_setAdvancedOptions(new Asc.asc_CTextOptions(s,a,l)),o.api.asc_DownloadAs(n)):o.api.asc_setAdvancedOptions(t,new Asc.asc_CTextOptions(s,a,l)),o.loadMask&&o.loadMask.show()),o._state.openDlg=null}}):t==Asc.c_oAscAdvancedOptionsID.DRM&&(o._state.openDlg=new Common.Views.OpenDialog({title:Common.Views.OpenDialog.prototype.txtTitleProtected,closeFile:o.appOptions.canRequestClose,type:Common.Utils.importTextType.DRM,warning:!(o.appOptions.isDesktopApp&&o.appOptions.isOffline),validatePwd:!!o._state.isDRM,handler:function(e,i){o.isShowOpenDialog=!1,"ok"==e?o&&o.api&&(o.api.asc_setAdvancedOptions(t,new Asc.asc_CDRMAdvancedOptions(i)),o.loadMask&&o.loadMask.show()):(Common.Gateway.requestClose(),Common.Controllers.Desktop.requestClose()),o._state.openDlg=null}}),o._state.isDRM=!0),o._state.openDlg&&(this.isShowOpenDialog=!0,this.loadMask&&this.loadMask.hide(),this.onLongActionEnd(Asc.c_oAscAsyncActionType.BlockInteraction,-256),o._state.openDlg.show())}},onActiveSheetChanged:function(t){this.appOptions.isEditMailMerge||this.appOptions.isEditDiagram||!window.editor_elements_prepared||(this.application.getController("Statusbar").selectTab(t),this.appOptions.canViewComments&&!this.dontCloseDummyComment&&Common.NotificationCenter.trigger("comments:updatefilter",["doc","sheet"+this.api.asc_getWorksheetId(t)],!1))},onConfirmAction:function(t,e){var i=this;t==Asc.c_oAscConfirm.ConfirmReplaceRange?Common.UI.warning({title:this.notcriticalErrorTitle,msg:this.confirmMoveCellRange,buttons:["yes","no"],primary:"yes",callback:_.bind(function(t){e&&e("yes"===t),"yes"==t&&i.onEditComplete(i.application.getController("DocumentHolder").getView("DocumentHolder"))},this)}):t==Asc.c_oAscConfirm.ConfirmPutMergeRange&&Common.UI.warning({closable:!1,title:this.notcriticalErrorTitle,msg:this.confirmPutMergeRange,buttons:["ok"],primary:"ok",callback:_.bind(function(t){e&&e(),i.onEditComplete(i.application.getController("DocumentHolder").getView("DocumentHolder"))},this)})},initNames:function(){this.shapeGroupNames=[this.txtBasicShapes,this.txtFiguredArrows,this.txtMath,this.txtCharts,this.txtStarsRibbons,this.txtCallouts,this.txtButtons,this.txtRectangles,this.txtLines]},fillAutoShapes:function(t,e){if(!_.isEmpty(e)&&!_.isEmpty(t)&&e.length==t.length){var i=this,n=[],o=this.getCollection("ShapeGroups");o.reset();t.length;_.each(t,function(t,o){var s=new Backbone.Collection([],{model:SSE.Models.ShapeModel}),a=e[o].length>18?7:6,l=35*Math.ceil(e[o].length/a)+3,r=30*a;_.each(e[o],function(t,e){s.add({data:{shapeType:t.Type},tip:i["txtShape_"+t.Type]||i.textShape+" "+(e+1),allowSelected:!0,selected:!1})}),n.push({groupName:i.shapeGroupNames[o],groupStore:s,groupWidth:r,groupHeight:l})}),o.add(n),setTimeout(function(){i.getApplication().getController("Toolbar").fillAutoShapes()},50)}},fillTextArt:function(t){if(!_.isEmpty(t)){var e=this,i=[],n=this.getCollection("Common.Collections.TextArt");_.each(t,function(t,e){i.push({imageUrl:t,data:e,allowSelected:!0,selected:!1})}),n.reset(i),setTimeout(function(){e.getApplication().getController("Toolbar").fillTextArt()},50),setTimeout(function(){e.getApplication().getController("RightMenu").fillTextArt()},50)}},updateThemeColors:function(){var t=this;setTimeout(function(){t.getApplication().getController("RightMenu").UpdateThemeColors()},50),setTimeout(function(){t.getApplication().getController("Toolbar").updateThemeColors()},50),setTimeout(function(){t.getApplication().getController("Statusbar").updateThemeColors()},50)},onSendThemeColors:function(t,e){if(Common.Utils.ThemeColor.setColors(t,e),window.styles_loaded&&!this.appOptions.isEditMailMerge&&!this.appOptions.isEditDiagram){this.updateThemeColors();var i=this;setTimeout(function(){i.fillTextArt(i.api.asc_getTextArtPreviews())},1)}},loadLanguages:function(t){this.languages=t,window.styles_loaded&&this.setLanguages()},setLanguages:function(){this.getApplication().getController("Spellcheck").setLanguages(this.languages)},onInternalCommand:function(t){if(t)switch(t.command){case"setChartData":this.setChartData(t.data);break;case"getChartData":this.getChartData();break;case"clearChartData":this.clearChartData();break;case"setMergeData":this.setMergeData(t.data);break;case"getMergeData":this.getMergeData();break;case"setAppDisabled":void 0!==this.isAppDisabled||t.data||(Common.NotificationCenter.trigger("layout:changed","main"),this.loadMask&&this.loadMask.isVisible()&&this.loadMask.updatePosition()),this.isAppDisabled=t.data;break;case"queryClose":0===$("body .asc-window:visible").length?(this.isFrameClosed=!0,this.api.asc_closeCellEditor(),Common.UI.Menu.Manager.hideAll(),Common.Gateway.internalMessage("canClose",{mr:t.data.mr,answer:!0})):Common.Gateway.internalMessage("canClose",{answer:!1});break;case"window:drag":this.isDiagramDrag=t.data;break;case"processmouse":this.onProcessMouse(t.data)}},setChartData:function(t){"object"==typeof t&&this.api&&(this.api.asc_addChartDrawingObject(t),this.isFrameClosed=!1)},getChartData:function(){if(this.api){var t=this.api.asc_getWordChartObject();"object"==typeof t&&Common.Gateway.internalMessage("chartData",{data:t})}},clearChartData:function(){this.api&&this.api.asc_closeCellEditor()},setMergeData:function(t){"object"==typeof t&&this.api&&(this.api.asc_setData(t),this.isFrameClosed=!1)},getMergeData:function(){if(this.api){var t=this.api.asc_getData();"object"==typeof t&&Common.Gateway.internalMessage("mergeData",{data:t})}},unitsChanged:function(t){var e=Common.localStorage.getItem("sse-settings-unit");e=null!==e?parseInt(e):Common.Utils.Metric.getDefaultMetric(),Common.Utils.Metric.setCurrentMetric(e),Common.Utils.InternalSettings.set("sse-settings-unit",e),this.getApplication().getController("RightMenu").updateMetricUnit(),this.getApplication().getController("Print").getView("MainSettingsPrint").updateMetricUnit(),this.getApplication().getController("Toolbar").getView("Toolbar").updateMetricUnit()},_compareActionStrong:function(t,e){return t.id===e.id&&t.type===e.type},_compareActionWeak:function(t,e){return t.type===e.type},onContextMenu:function(t){var e=t.target.getAttribute("data-can-copy"),i=t.target instanceof HTMLInputElement||t.target instanceof HTMLTextAreaElement;if(i&&"false"===e||!i&&"true"!==e)return t.stopPropagation(),t.preventDefault(),!1},onNamedRangeLocked:function(){$(".asc-window.modal.alert:visible").length<1&&Common.UI.alert({msg:this.errorCreateDefName,title:this.notcriticalErrorTitle,iconCls:"warn",buttons:["ok"],callback:_.bind(function(t){this.onEditComplete()},this)})},onTryUndoInFastCollaborative:function(){var t=Common.localStorage.getItem("sse-hide-try-undoredo");t&&1==parseInt(t)||Common.UI.info({width:500,msg:this.textTryUndoRedo,iconCls:"info",buttons:["custom","cancel"],primary:"custom",customButtonText:this.textStrict,dontshow:!0,callback:_.bind(function(t,e){e&&Common.localStorage.setItem("sse-hide-try-undoredo",1),"custom"==t&&(Common.localStorage.setItem("sse-settings-coauthmode",0),this.api.asc_SetFastCollaborative(!1),Common.Utils.InternalSettings.set("sse-settings-coauthmode",!1),this.getApplication().getController("Common.Controllers.ReviewChanges").applySettings(),this._state.fastCoauth=!1),this.onEditComplete()},this)})},onAuthParticipantsChanged:function(t){var e=0;_.each(t,function(t){t.asc_getView()||e++}),this._state.usersCount=e},applySettings:function(){if(this.appOptions.isEdit&&!this.appOptions.isOffline&&this.appOptions.canCoAuthoring){var t=Common.localStorage.getItem("sse-settings-coauthmode"),e=this._state.fastCoauth;this._state.fastCoauth=null===t||1==parseInt(t),this._state.fastCoauth&&!e&&this.toolbarView.synchronizeChanges()}this.appOptions.canForcesave&&(this.appOptions.forcesave=Common.localStorage.getBool("sse-settings-forcesave",this.appOptions.canForcesave),Common.Utils.InternalSettings.set("sse-settings-forcesave",this.appOptions.forcesave),this.api.asc_setIsForceSaveOnUserSave(this.appOptions.forcesave))},onDocumentName:function(t){this.headerView.setDocumentCaption(t),this.updateWindowTitle(this.api.asc_isDocumentModified(),!0)},onMeta:function(t){var e=this.getApplication(),i=e.getController("LeftMenu").getView("LeftMenu").getMenu("file");e.getController("Viewport").getView("Common.Views.Header").setDocumentCaption(t.title),this.updateWindowTitle(this.api.asc_isDocumentModified(),!0),this.appOptions.spreadsheet.title=t.title,i.loadDocument({doc:this.appOptions.spreadsheet}),i.panels.info.updateInfo(this.appOptions.spreadsheet),Common.Gateway.metaChange(t)},onPrint:function(){this.appOptions.canPrint&&!this.isModalShowed&&Common.NotificationCenter.trigger("print",this)},onPrintUrl:function(t){if(this.iframePrint&&(this.iframePrint.parentNode.removeChild(this.iframePrint),this.iframePrint=null),!this.iframePrint){var e=this;this.iframePrint=document.createElement("iframe"),this.iframePrint.id="id-print-frame",this.iframePrint.style.display="none",this.iframePrint.style.visibility="hidden",this.iframePrint.style.position="fixed",this.iframePrint.style.right="0",this.iframePrint.style.bottom="0",document.body.appendChild(this.iframePrint),this.iframePrint.onload=function(){try{e.iframePrint.contentWindow.focus(),e.iframePrint.contentWindow.print(),e.iframePrint.contentWindow.blur(),window.focus()}catch(i){var t=new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.PDF);t.asc_setAdvancedOptions(e.getApplication().getController("Print").getPrintParams()),e.api.asc_DownloadAs(t)}}}t&&(this.iframePrint.src=t)},leavePageText:"You have unsaved changes in this document. Click 'Stay on this Page' then 'Save' to save them. Click 'Leave this Page' to discard all the unsaved changes.",criticalErrorTitle:"Error",notcriticalErrorTitle:"Warning",errorDefaultMessage:"Error code: %1",criticalErrorExtText:'Press "OK" to to back to document list.',openTitleText:"Opening Document",openTextText:"Opening document...",saveTitleText:"Saving Document",saveTextText:"Saving document...",loadFontsTitleText:"Loading Data",loadFontsTextText:"Loading data...",loadImagesTitleText:"Loading Images",loadImagesTextText:"Loading images...",loadFontTitleText:"Loading Data",loadFontTextText:"Loading data...",loadImageTitleText:"Loading Image",loadImageTextText:"Loading image...",downloadTitleText:"Downloading Document",downloadTextText:"Downloading document...",printTitleText:"Printing Document",printTextText:"Printing document...",uploadImageTitleText:"Uploading Image",uploadImageTextText:"Uploading image...",savePreparingText:"Preparing to save",savePreparingTitle:"Preparing to save. Please wait...",loadingDocumentTitleText:"Loading spreadsheet",uploadImageSizeMessage:"Maximium image size limit exceeded.",uploadImageExtMessage:"Unknown image format.",uploadImageFileCountMessage:"No images uploaded.",reloadButtonText:"Reload Page",unknownErrorText:"Unknown error.",convertationTimeoutText:"Convertation timeout exceeded.",downloadErrorText:"Download failed.",unsupportedBrowserErrorText:"Your browser is not supported.",requestEditFailedTitleText:"Access denied",requestEditFailedMessageText:"Someone is editing this document right now. Please try again later.",warnBrowserZoom:"Your browser's current zoom setting is not fully supported. Please reset to the default zoom by pressing Ctrl+0.",warnBrowserIE9:"The application has low capabilities on IE9. Use IE10 or higher",pastInMergeAreaError:"Cannot change part of a merged cell",titleRecalcFormulas:"Calculating formulas...",textRecalcFormulas:"Calculating formulas...",textPleaseWait:"It's working hard. Please wait...",errorWrongBracketsCount:"Found an error in the formula entered. Wrong cout of brackets.",errorWrongOperator:"An error in the entered formula. Wrong operator is used. Please correct the error or use the Esc button to cancel the formula editing.",errorCountArgExceed:"Found an error in the formula entered. Count of arguments exceeded.",errorCountArg:"Found an error in the formula entered. Invalid number of arguments.",errorFormulaName:"Found an error in the formula entered. Incorrect formula name.",errorFormulaParsing:"Internal error while the formula parsing.",errorArgsRange:"Found an error in the formula entered. Incorrect arguments range.",errorUnexpectedGuid:"External error. Unexpected Guid. Please, contact support.",errorDatabaseConnection:"External error. Database connection error. Please, contact support.",errorFileRequest:"External error. File Request. Please, contact support.",errorFileVKey:"External error. Incorrect securety key. Please, contact support.",errorStockChart:"Incorrect row order. To build a stock chart place the data on the sheet in the following order: opening price, max price, min price, closing price.",errorDataRange:"Incorrect data range.",errorOperandExpected:"The entered function syntax is not correct. Please check if you are missing one of the parentheses - '(' or ')'.",errorKeyEncrypt:"Unknown key descriptor",errorKeyExpire:"Key descriptor expired",errorUsersExceed:"Count of users was exceed",errorMoveRange:"Cann't change a part of merged cell",errorBadImageUrl:"Image url is incorrect",errorCoAuthoringDisconnect:"Server connection lost. You can't edit anymore.",errorFilePassProtect:"The file is password protected and cannot be opened.",errorLockedAll:"The operation could not be done as the sheet has been locked by another user.",txtEditingMode:"Set editing mode...",textLoadingDocument:"Loading spreadsheet",textConfirm:"Confirmation",confirmMoveCellRange:"The destination cell's range can contain data. Continue the operation?",textYes:"Yes",textNo:"No",textAnonymous:"Anonymous",txtBasicShapes:"Basic Shapes",txtFiguredArrows:"Figured Arrows",txtMath:"Math",txtCharts:"Charts",txtStarsRibbons:"Stars & Ribbons",txtCallouts:"Callouts",txtButtons:"Buttons",txtRectangles:"Rectangles",txtLines:"Lines",txtDiagramTitle:"Chart Title",txtXAxis:"X Axis",txtYAxis:"Y Axis",txtSeries:"Seria",warnProcessRightsChange:"You have been denied the right to edit the file.",errorProcessSaveResult:"Saving is failed.",errorAutoFilterDataRange:"The operation could not be done for the selected range of cells. Select a uniform data range inside or outside the table and try again.",errorAutoFilterChangeFormatTable:"The operation could not be done for the selected cells as you cannot move a part of the table. Select another data range so that the whole table was shifted and try again.",errorAutoFilterHiddenRange:"The operation cannot be performed because the area contains filtered cells. Please unhide the filtered elements and try again.",errorAutoFilterChange:"The operation is not allowed, as it is attempting to shift cells in a table on your worksheet.",textCloseTip:"Click to close the tip.",textShape:"Shape",errorFillRange:"Could not fill the selected range of cells. All the merged cells need to be the same size.",errorUpdateVersion:"The file version has been changed. The page will be reloaded.",errorUserDrop:"The file cannot be accessed right now.",txtArt:"Your text here",errorInvalidRef:"Enter a correct name for the selection or a valid reference to go to.",errorCreateDefName:"The existing named ranges cannot be edited and the new ones cannot be created at the moment as some of them are being edited.",errorPasteMaxRange:"The copy and paste area does not match. Please select an area with the same size or click the first cell in a row to paste the copied cells.",errorConnectToServer:' The document could not be saved. Please check connection settings or contact your administrator. When you click the \'OK\' button, you will be prompted to download the document.
Find more information about connecting Document Server here',errorLockedWorksheetRename:"The sheet cannot be renamed at the moment as it is being renamed by another user",textTryUndoRedo:"The Undo/Redo functions are disabled for the Fast co-editing mode. Click the 'Strict mode' button to switch to the Strict co-editing mode to edit the file without other users interference and send your changes only after you save them. You can switch between the co-editing modes using the editor Advanced settings.",textStrict:"Strict mode",errorOpenWarning:"The length of one of the formulas in the file exceeded the allowed number of characters and it was removed.",errorFrmlWrongReferences:"The function refers to a sheet that does not exist. Please check the data and try again.",textBuyNow:"Visit website",textNoLicenseTitle:"%1 open source version",textContactUs:"Contact sales",
confirmPutMergeRange:"The source data contains merged cells. They will be unmerged before they are pasted into the table.",errorViewerDisconnect:"Connection is lost. You can still view the document, but will not be able to download or print until the connection is restored.",warnLicenseExp:"Your license has expired. Please update your license and refresh the page.",titleLicenseExp:"License expired",openErrorText:"An error has occurred while opening the file",saveErrorText:"An error has occurred while saving the file",errorCopyMultiselectArea:"This command cannot be used with multiple selections. Select a single range and try again.",errorPrintMaxPagesCount:"Unfortunately, it’s not possible to print more than 1500 pages at once in the current version of the program. This restriction will be eliminated in upcoming releases.",errorToken:"The document security token is not correctly formed. Please contact your Document Server administrator.",errorTokenExpire:"The document security token has expired. Please contact your Document Server administrator.",errorSessionAbsolute:"The document editing session has expired. Please reload the page.",errorSessionIdle:"The document has not been edited for quite a long time. Please reload the page.",errorSessionToken:"The connection to the server has been interrupted. Please reload the page.",errorAccessDeny:"You are trying to perform an action you do not have rights for. Please contact your Document Server administrator.",titleServerVersion:"Editor updated",errorServerVersion:"The editor version has been updated. The page will be reloaded to apply the changes.",errorLockedCellPivot:"You cannot change data inside a pivot table.",txtAccent:"Accent",txtStyle_Normal:"Normal",txtStyle_Heading_1:"Heading 1",txtStyle_Heading_2:"Heading 2",txtStyle_Heading_3:"Heading 3",txtStyle_Heading_4:"Heading 4",txtStyle_Title:"Title",txtStyle_Neutral:"Neutral",txtStyle_Bad:"Bad",txtStyle_Good:"Good",txtStyle_Input:"Input",txtStyle_Output:"Output",txtStyle_Calculation:"Calculation",txtStyle_Check_Cell:"Check Cell",txtStyle_Explanatory_Text:"Explanatory Text",txtStyle_Note:"Note",txtStyle_Linked_Cell:"Linked Cell",txtStyle_Warning_Text:"Warning Text",txtStyle_Total:"Total",txtStyle_Currency:"Currency",txtStyle_Percent:"Percent",txtStyle_Comma:"Comma",errorForceSave:"An error occurred while saving the file. Please use the 'Download as' option to save the file to your computer hard drive or try again later.",errorMaxPoints:"The maximum number of points in series per chart is 4096.",warnNoLicense:"This version of %1 editors has certain limitations for concurrent connections to the document server. If you need more please consider purchasing a commercial license.",warnNoLicenseUsers:"This version of %1 Editors has certain limitations for concurrent users. If you need more please consider purchasing a commercial license.",warnLicenseExceeded:"The number of concurrent connections to the document server has been exceeded and the document will be opened for viewing only. Please contact your administrator for more information.",warnLicenseUsersExceeded:"The number of concurrent users has been exceeded and the document will be opened for viewing only. Please contact your administrator for more information.",errorDataEncrypted:"Encrypted changes have been received, they cannot be deciphered.",textClose:"Close",textPaidFeature:"Paid feature",scriptLoadError:"The connection is too slow, some of the components could not be loaded. Please reload the page.",errorEditingSaveas:"An error occurred during the work with the document. Use the 'Save as...' option to save the file backup copy to your computer hard drive.",errorEditingDownloadas:"An error occurred during the work with the document. Use the 'Download as...' option to save the file backup copy to your computer hard drive.",txtShape_textRect:"Text Box",txtShape_rect:"Rectangle",txtShape_ellipse:"Ellipse",txtShape_triangle:"Triangle",txtShape_rtTriangle:"Right Triangle",txtShape_parallelogram:"Parallelogram",txtShape_trapezoid:"Trapezoid",txtShape_diamond:"Diamond",txtShape_pentagon:"Pentagon",txtShape_hexagon:"Hexagon",txtShape_heptagon:"Heptagon",txtShape_octagon:"Octagon",txtShape_decagon:"Decagon",txtShape_dodecagon:"Dodecagon",txtShape_pie:"Pie",txtShape_chord:"Chord",txtShape_teardrop:"Teardrop",txtShape_frame:"Frame",txtShape_halfFrame:"Half Frame",txtShape_corner:"Corner",txtShape_diagStripe:"Diagonal Stripe",txtShape_plus:"Plus",txtShape_plaque:"Sign",txtShape_can:"Can",txtShape_cube:"Cube",txtShape_bevel:"Bevel",txtShape_donut:"Donut",txtShape_noSmoking:'"No" Symbol',txtShape_blockArc:"Block Arc",txtShape_foldedCorner:"Folded Corner",txtShape_smileyFace:"Smiley Face",txtShape_heart:"Heart",txtShape_lightningBolt:"Lightning Bolt",txtShape_sun:"Sun",txtShape_moon:"Moon",txtShape_cloud:"Cloud",txtShape_arc:"Arc",txtShape_bracePair:"Double Brace",txtShape_leftBracket:"Left Bracket",txtShape_rightBracket:"Right Bracket",txtShape_leftBrace:"Left Brace",txtShape_rightBrace:"Right Brace",txtShape_rightArrow:"Right Arrow",txtShape_leftArrow:"Left Arrow",txtShape_upArrow:"Up Arrow",txtShape_downArrow:"Down Arrow",txtShape_leftRightArrow:"Left Right Arrow",txtShape_upDownArrow:"Up Down Arrow",txtShape_quadArrow:"Quad Arrow",txtShape_leftRightUpArrow:"Left Right Up Arrow",txtShape_bentArrow:"Bent Arrow",txtShape_uturnArrow:"U-Turn Arrow",txtShape_leftUpArrow:"Left Up Arrow",txtShape_bentUpArrow:"Bent Up Arrow",txtShape_curvedRightArrow:"Curved Right Arrow",txtShape_curvedLeftArrow:"Curved Left Arrow",txtShape_curvedUpArrow:"Curved Up Arrow",txtShape_curvedDownArrow:"Curved Down Arrow",txtShape_stripedRightArrow:"Striped Right Arrow",txtShape_notchedRightArrow:"Notched Right Arrow",txtShape_homePlate:"Pentagon",txtShape_chevron:"Chevron",txtShape_rightArrowCallout:"Right Arrow Callout",txtShape_downArrowCallout:"Down Arrow Callout",txtShape_leftArrowCallout:"Left Arrow Callout",txtShape_upArrowCallout:"Up Arrow Callout",txtShape_leftRightArrowCallout:"Left Right Arrow Callout",txtShape_quadArrowCallout:"Quad Arrow Callout",txtShape_circularArrow:"Circular Arrow",txtShape_mathPlus:"Plus",txtShape_mathMinus:"Minus",txtShape_mathMultiply:"Multiply",txtShape_mathDivide:"Division",txtShape_mathEqual:"Equal",txtShape_mathNotEqual:"Not Equal",txtShape_flowChartProcess:"Flowchart: Process",txtShape_flowChartAlternateProcess:"Flowchart: Alternate Process",txtShape_flowChartDecision:"Flowchart: Decision",txtShape_flowChartInputOutput:"Flowchart: Data",txtShape_flowChartPredefinedProcess:"Flowchart: Predefined Process",txtShape_flowChartInternalStorage:"Flowchart: Internal Storage",txtShape_flowChartDocument:"Flowchart: Document",txtShape_flowChartMultidocument:"Flowchart: Multidocument ",txtShape_flowChartTerminator:"Flowchart: Terminator",txtShape_flowChartPreparation:"Flowchart: Preparation",txtShape_flowChartManualInput:"Flowchart: Manual Input",txtShape_flowChartManualOperation:"Flowchart: Manual Operation",txtShape_flowChartConnector:"Flowchart: Connector",txtShape_flowChartOffpageConnector:"Flowchart: Off-page Connector",txtShape_flowChartPunchedCard:"Flowchart: Card",txtShape_flowChartPunchedTape:"Flowchart: Punched Tape",txtShape_flowChartSummingJunction:"Flowchart: Summing Junction",txtShape_flowChartOr:"Flowchart: Or",txtShape_flowChartCollate:"Flowchart: Collate",txtShape_flowChartSort:"Flowchart: Sort",txtShape_flowChartExtract:"Flowchart: Extract",txtShape_flowChartMerge:"Flowchart: Merge",txtShape_flowChartOnlineStorage:"Flowchart: Stored Data",txtShape_flowChartDelay:"Flowchart: Delay",txtShape_flowChartMagneticTape:"Flowchart: Sequential Access Storage",txtShape_flowChartMagneticDisk:"Flowchart: Magnetic Disk",txtShape_flowChartMagneticDrum:"Flowchart: Direct Access Storage",txtShape_flowChartDisplay:"Flowchart: Display",txtShape_irregularSeal1:"Explosion 1",txtShape_irregularSeal2:"Explosion 2",txtShape_star4:"4-Point Star",txtShape_star5:"5-Point Star",txtShape_star6:"6-Point Star",txtShape_star7:"7-Point Star",txtShape_star8:"8-Point Star",txtShape_star10:"10-Point Star",txtShape_star12:"12-Point Star",txtShape_star16:"16-Point Star",txtShape_star24:"24-Point Star",txtShape_star32:"32-Point Star",txtShape_ribbon2:"Up Ribbon",txtShape_ribbon:"Down Ribbon",txtShape_ellipseRibbon2:"Curved Up Ribbon",txtShape_ellipseRibbon:"Curved Down Ribbon",txtShape_verticalScroll:"Vertical Scroll",txtShape_horizontalScroll:"Horizontal Scroll",txtShape_wave:"Wave",txtShape_doubleWave:"Double Wave",txtShape_wedgeRectCallout:"Rectangular Callout",txtShape_wedgeRoundRectCallout:"Rounded Rectangular Callout",txtShape_wedgeEllipseCallout:"Oval Callout",txtShape_cloudCallout:"Cloud Callout",txtShape_borderCallout1:"Line Callout 1",txtShape_borderCallout2:"Line Callout 2",txtShape_borderCallout3:"Line Callout 3",txtShape_accentCallout1:"Line Callout 1 (Accent Bar)",txtShape_accentCallout2:"Line Callout 2 (Accent Bar)",txtShape_accentCallout3:"Line Callout 3 (Accent Bar)",txtShape_callout1:"Line Callout 1 (No Border)",txtShape_callout2:"Line Callout 2 (No Border)",txtShape_callout3:"Line Callout 3 (No Border)",txtShape_accentBorderCallout1:"Line Callout 1 (Border and Accent Bar)",txtShape_accentBorderCallout2:"Line Callout 2 (Border and Accent Bar)",txtShape_accentBorderCallout3:"Line Callout 3 (Border and Accent Bar)",txtShape_actionButtonBackPrevious:"Back or Previous Button",txtShape_actionButtonForwardNext:"Forward or Next Button",txtShape_actionButtonBeginning:"Beginning Button",txtShape_actionButtonEnd:"End Button",txtShape_actionButtonHome:"Home Button",txtShape_actionButtonInformation:"Information Button",txtShape_actionButtonReturn:"Return Button",txtShape_actionButtonMovie:"Movie Button",txtShape_actionButtonDocument:"Document Button",txtShape_actionButtonSound:"Sound Button",txtShape_actionButtonHelp:"Help Button",txtShape_actionButtonBlank:"Blank Button",txtShape_roundRect:"Round Corner Rectangle",txtShape_snip1Rect:"Snip Single Corner Rectangle",txtShape_snip2SameRect:"Snip Same Side Corner Rectangle",txtShape_snip2DiagRect:"Snip Diagonal Corner Rectangle",txtShape_snipRoundRect:"Snip and Round Single Corner Rectangle",txtShape_round1Rect:"Round Single Corner Rectangle",txtShape_round2SameRect:"Round Same Side Corner Rectangle",txtShape_round2DiagRect:"Round Diagonal Corner Rectangle",txtShape_line:"Line",txtShape_lineWithArrow:"Arrow",txtShape_lineWithTwoArrows:"Double Arrow",txtShape_bentConnector5:"Elbow Connector",txtShape_bentConnector5WithArrow:"Elbow Arrow Connector",txtShape_bentConnector5WithTwoArrows:"Elbow Double-Arrow Connector",txtShape_curvedConnector3:"Curved Connector",txtShape_curvedConnector3WithArrow:"Curved Arrow Connector",txtShape_curvedConnector3WithTwoArrows:"Curved Double-Arrow Connector",txtShape_spline:"Curve",txtShape_polyline1:"Scribble",txtShape_polyline2:"Freeform",errorChangeArray:"You cannot change part of an array.",errorMultiCellFormula:"Multi-cell array formulas are not allowed in tables.",errorEmailClient:"No email client could be found",txtPrintArea:"Print_Area",txtTable:"Table",textCustomLoader:"Please note that according to the terms of the license you are not entitled to change the loader. Please contact our Sales Department to get a quote.",errorNoDataToParse:"No data was selected to parse.",errorCannotUngroup:"Cannot ungroup. To start an outline, select the detail rows or columns and group them.",errorFrmlMaxTextLength:"Text values in formulas are limited to 255 characters. Use the CONCATENATE function or concatenation operator (&)",waitText:"Please, wait...",errorDataValidate:"The value you entered is not valid. A user has restricted values that can be entered into this cell.",txtConfidential:"Confidential",txtPreparedBy:"Prepared by",txtPage:"Page",txtPageOf:"Page %1 of %2",txtPages:"Pages",txtDate:"Date",txtTime:"Time",txtTab:"Tab",txtFile:"File"}}(),SSE.Controllers.Main||{}))}),define("common/main/lib/view/DocumentAccessDialog",["common/main/lib/component/Window","common/main/lib/component/LoadMask"],function(){"use strict";Common.Views.DocumentAccessDialog=Common.UI.Window.extend(_.extend({initialize:function(t){var e={};_.extend(e,{title:this.textTitle,width:600,height:536,header:!0},t),this.template=[''].join(""),e.tpl=_.template(this.template)(e),this.settingsurl=t.settingsurl||"",Common.UI.Window.prototype.initialize.call(this,e)},render:function(){Common.UI.Window.prototype.render.call(this),this.$window.find("> .body").css({height:"auto",overflow:"hidden"});var t=document.createElement("iframe");t.width="100%",t.height=500,t.align="top",t.frameBorder=0,t.scrolling="no",t.onload=_.bind(this._onLoad,this),$("#id-sharing-placeholder").append(t),this.loadMask=new Common.UI.LoadMask({owner:$("#id-sharing-placeholder")}),this.loadMask.setTitle(this.textLoading),this.loadMask.show(),t.src=this.settingsurl;var e=this;this._eventfunc=function(t){e._onWindowMessage(t)},this._bindWindowEvents.call(this),this.on("close",function(t){e._unbindWindowEvents()})},_bindWindowEvents:function(){window.addEventListener?window.addEventListener("message",this._eventfunc,!1):window.attachEvent&&window.attachEvent("onmessage",this._eventfunc)},_unbindWindowEvents:function(){window.removeEventListener?window.removeEventListener("message",this._eventfunc):window.detachEvent&&window.detachEvent("onmessage",this._eventfunc)},_onWindowMessage:function(t){if(t&&window.JSON)try{this._onMessage.call(this,window.JSON.parse(t.data))}catch(t){}},_onMessage:function(t){t&&"onlyoffice"==t.Referer&&(t.needUpdate&&this.trigger("accessrights",this,t.sharingSettings),Common.NotificationCenter.trigger("window:close",this))},_onLoad:function(){this.loadMask&&this.loadMask.hide()},textTitle:"Sharing Settings",textLoading:"Loading"},Common.Views.DocumentAccessDialog||{}))}),define("spreadsheeteditor/main/app/view/FileMenuPanels",["common/main/lib/view/DocumentAccessDialog"],function(){"use strict";!SSE.Views.FileMenuPanels&&(SSE.Views.FileMenuPanels={}),SSE.Views.FileMenuPanels.ViewSaveAs=Common.UI.BaseView.extend({el:"#panel-saveas",menu:void 0,formats:[[{name:"XLSX",imgCls:"xlsx",type:Asc.c_oAscFileType.XLSX},{name:"PDF",imgCls:"pdf",type:Asc.c_oAscFileType.PDF},{name:"ODS",imgCls:"ods",type:Asc.c_oAscFileType.ODS},{name:"CSV",imgCls:"csv",type:Asc.c_oAscFileType.CSV}],[{name:"XLTX",imgCls:"xltx",type:Asc.c_oAscFileType.XLTX},{name:"PDFA",imgCls:"pdfa",type:Asc.c_oAscFileType.PDFA},{name:"OTS",imgCls:"ots",type:Asc.c_oAscFileType.OTS}]],template:_.template(["
",""].join(""))}).on("selected",_.bind(function(t,e){this.updateRegionalExample(e.value)},this)),this.cmbRegSettings.scroller&&this.cmbRegSettings.scroller.update({alwaysVisibleY:!0}),this.btnApply=new Common.UI.Button({el:"#fms-btn-apply"}),this.btnApply.on("click",_.bind(this.applySettings,this)),_.isUndefined(this.scroller)&&(this.scroller=new Common.UI.Scroller({el:$(this.el),suppressScrollX:!0})),this},show:function(){Common.UI.BaseView.prototype.show.call(this,arguments),this.updateSettings()},setMode:function(t){this.mode=t,$("tr.edit",this.el)[t.isEdit?"show":"hide"](),$("tr.autosave",this.el)[t.isEdit?"show":"hide"](),this.mode.isDesktopApp&&this.mode.isOffline&&(this.chAutosave.setCaption(this.strAutoRecover),this.lblAutosave.text(this.textAutoRecover)),$("tr.forcesave",this.el)[t.canForcesave?"show":"hide"](),$("tr.comments",this.el)[t.canCoAuthoring?"show":"hide"](),$("tr.coauth.changes",this.el)[t.isEdit&&!t.isOffline&&t.canCoAuthoring?"show":"hide"]()},setApi:function(t){this.api=t},updateSettings:function(){var t=Common.Utils.InternalSettings.get("sse-settings-zoom");t=null!==t?parseInt(t):this.mode.customization&&this.mode.customization.zoom?parseInt(this.mode.customization.zoom):100;var e=this.cmbZoom.store.findWhere({value:t});this.cmbZoom.setValue(e?parseInt(e.get("value")):t>0?t+"%":100),this.chLiveComment.setValue(Common.Utils.InternalSettings.get("sse-settings-livecomment")),this.chResolvedComment.setValue(Common.Utils.InternalSettings.get("sse-settings-resolvedcomment")),this.chR1C1Style.setValue(Common.Utils.InternalSettings.get("sse-settings-r1c1"));var i=Common.Utils.InternalSettings.get("sse-settings-coauthmode");e=this.cmbCoAuthMode.store.findWhere({value:i?1:0}),this.cmbCoAuthMode.setValue(e?e.get("value"):1),this.lblCoAuthMode.text(e?e.get("descValue"):this.strCoAuthModeDescFast),t=Common.Utils.InternalSettings.get("sse-settings-fontrender"),e=this.cmbFontRender.store.findWhere({value:parseInt(t)}),this.cmbFontRender.setValue(e?e.get("value"):window.devicePixelRatio>1?Asc.c_oAscFontRenderingModeType.noHinting:Asc.c_oAscFontRenderingModeType.hintingAndSubpixeling),t=Common.Utils.InternalSettings.get("sse-settings-unit"),e=this.cmbUnit.store.findWhere({value:t}),this.cmbUnit.setValue(e?parseInt(e.get("value")):Common.Utils.Metric.getDefaultMetric()),this._oldUnits=this.cmbUnit.getValue(),t=Common.Utils.InternalSettings.get("sse-settings-autosave"),this.chAutosave.setValue(1==t),this.mode.canForcesave&&this.chForcesave.setValue(Common.Utils.InternalSettings.get("sse-settings-forcesave")),t=Common.Utils.InternalSettings.get("sse-settings-func-locale"),e=this.cmbFuncLocale.store.findWhere({value:t}),!e&&t&&(e=this.cmbFuncLocale.store.findWhere({value:t.split(/[\-\_]/)[0]})),this.cmbFuncLocale.setValue(e?e.get("value"):"en"),this.updateFuncExample(e?e.get("exampleValue"):this.txtExampleEn),t=this.api.asc_getLocale(),t?(e=this.cmbRegSettings.store.findWhere({value:t}),this.cmbRegSettings.setValue(e?e.get("value"):Common.util.LanguageInfo.getLocalLanguageName(t)[1]),e&&(t=this.cmbRegSettings.getValue())):(t=this.mode.lang?parseInt(Common.util.LanguageInfo.getLocalLanguageCode(this.mode.lang)):1033,this.cmbRegSettings.setValue(Common.util.LanguageInfo.getLocalLanguageName(t)[1])),this.updateRegionalExample(t)},applySettings:function(){Common.localStorage.setItem("sse-settings-zoom",this.cmbZoom.getValue()),Common.Utils.InternalSettings.set("sse-settings-zoom",Common.localStorage.getItem("sse-settings-zoom")),Common.localStorage.setItem("sse-settings-livecomment",this.chLiveComment.isChecked()?1:0),Common.localStorage.setItem("sse-settings-resolvedcomment",this.chResolvedComment.isChecked()?1:0),this.mode.isEdit&&!this.mode.isOffline&&this.mode.canCoAuthoring&&Common.localStorage.setItem("sse-settings-coauthmode",this.cmbCoAuthMode.getValue()),Common.localStorage.setItem("sse-settings-r1c1",this.chR1C1Style.isChecked()?1:0),Common.localStorage.setItem("sse-settings-fontrender",this.cmbFontRender.getValue()),Common.localStorage.setItem("sse-settings-unit",this.cmbUnit.getValue()),Common.localStorage.setItem("sse-settings-autosave",this.chAutosave.isChecked()?1:0),this.mode.canForcesave&&Common.localStorage.setItem("sse-settings-forcesave",this.chForcesave.isChecked()?1:0),Common.localStorage.setItem("sse-settings-func-locale",this.cmbFuncLocale.getValue()),this.cmbRegSettings.getSelectedRecord()&&Common.localStorage.setItem("sse-settings-reg-settings",this.cmbRegSettings.getValue()),Common.localStorage.save(),this.menu&&(this.menu.fireEvent("settings:apply",[this.menu]),this._oldUnits!==this.cmbUnit.getValue()&&Common.NotificationCenter.trigger("settings:unitschanged",this))},updateRegionalExample:function(t){if(this.api){var e="";if(t){var i=new Asc.asc_CFormatCellsInfo;i.asc_setType(Asc.c_oAscNumFormatType.None),i.asc_setSymbol(t);var n=this.api.asc_getFormatCells(i);e=this.api.asc_getLocaleExample(n[4],1000.01,t),e=e+" "+this.api.asc_getLocaleExample(n[5],Asc.cDate().getExcelDateWithTime(),t),e=e+" "+this.api.asc_getLocaleExample(n[6],Asc.cDate().getExcelDateWithTime(),t)}$("#fms-lbl-reg-settings").text(_.isEmpty(e)?"":this.strRegSettingsEx+e)}var o=this.cmbRegSettings.$el.find(".input-icon"),s=o.attr("lang"),a=Common.util.LanguageInfo.getLocalLanguageName(t)[0];s&&o.removeClass(s),o.addClass(a).attr("lang",a)},updateFuncExample:function(t){$("#fms-lbl-func-locale").text(_.isEmpty(t)?"":this.strRegSettingsEx+t)},strLiveComment:"Turn on option",strZoom:"Default Zoom Value",okButtonText:"Apply",txtLiveComment:"Live Commenting",txtWin:"as Windows",txtMac:"as OS X",txtNative:"Native",strFontRender:"Font Hinting",strUnit:"Unit of Measurement",txtCm:"Centimeter",txtPt:"Point",strAutosave:"Turn on autosave",textAutoSave:"Autosave",txtEn:"English",txtDe:"Deutsch",txtRu:"Russian",txtPl:"Polish",txtEs:"Spanish",txtFr:"French",txtIt:"Italian",txtExampleEn:" SUM; MIN; MAX; COUNT",txtExampleDe:" SUMME; MIN; MAX; ANZAHL",txtExampleRu:" СУММ; МИН; МАКС; СЧЁТ",txtExamplePl:" SUMA; MIN; MAX; ILE.LICZB",txtExampleEs:" SUMA; MIN; MAX; CALCULAR",txtExampleFr:" SOMME; MIN; MAX; NB",txtExampleIt:" SOMMA; MIN; MAX; CONTA.NUMERI",strFuncLocale:"Formula Language",strFuncLocaleEx:"Example: SUM; MIN; MAX; COUNT",strRegSettings:"Regional Settings",strRegSettingsEx:"Example: ",strCoAuthMode:"Co-editing mode",strCoAuthModeDescFast:"Other users will see your changes at once",strCoAuthModeDescStrict:"You will need to accept changes before you can see them",strFast:"Fast",strStrict:"Strict",textAutoRecover:"Autorecover",strAutoRecover:"Turn on autorecover",txtInch:"Inch",textForceSave:"Save to Server",strForcesave:"Always save to server (otherwise save to server on document close)",strResolvedComment:"Turn on display of the resolved comments",textRefStyle:"Reference Style",strR1C1:"Turn on R1C1 style"},SSE.Views.FileMenuPanels.MainSettingsGeneral||{})),SSE.Views.FileMenuPanels.RecentFiles=Common.UI.BaseView.extend({el:"#panel-recentfiles",menu:void 0,template:_.template([''].join("")),initialize:function(t){Common.UI.BaseView.prototype.initialize.call(this,arguments),this.menu=t.menu,this.recent=t.recent},render:function(){return $(this.el).html(this.template()),this.viewRecentPicker=new Common.UI.DataView({el:$("#id-recent-view"),store:new Common.UI.DataViewStore(this.recent),itemTemplate:_.template(['
"].join("")),initialize:function(t){Common.UI.BaseView.prototype.initialize.call(this,arguments),this.menu=t.menu},render:function(){return $(this.el).html(this.template({scope:this,docs:this.options[0].docs})),_.isUndefined(this.scroller)&&(this.scroller=new Common.UI.Scroller({el:$(this.el),suppressScrollX:!0})),this},_onBlankDocument:function(){this.menu&&this.menu.fireEvent("create:new",[this.menu,"blank"])},_onDocumentTemplate:function(t){this.menu&&this.menu.fireEvent("create:new",[this.menu,t.currentTarget.attributes.template.value])},fromBlankText:"From Blank",newDocumentText:"New Spreadsheet",newDescriptionText:"Create a new blank text document which you will be able to style and format after it is created during the editing. Or choose one of the templates to start a document of a certain type or purpose where some styles have already been pre-applied.",fromTemplateText:"From Template"},SSE.Views.FileMenuPanels.CreateNew||{})),SSE.Views.FileMenuPanels.DocumentInfo=Common.UI.BaseView.extend(_.extend({el:"#panel-info",menu:void 0,initialize:function(t){Common.UI.BaseView.prototype.initialize.call(this,arguments),this.rendered=!1,this.template=_.template(['
"].join("")),this.menu=t.menu},render:function(){return $(this.el).html(this.template()),this.cntRights=$("#id-info-rights"),this.btnEditRights=new Common.UI.Button({el:"#id-info-btn-edit"}),this.btnEditRights.on("click",_.bind(this.changeAccessRights,this)),this.rendered=!0,this.updateInfo(this.doc),_.isUndefined(this.scroller)&&(this.scroller=new Common.UI.Scroller({el:$(this.el),suppressScrollX:!0})),Common.NotificationCenter.on("collaboration:sharing",_.bind(this.changeAccessRights,this)),Common.NotificationCenter.on("collaboration:sharingdeny",_.bind(this.onLostEditRights,this)),this},show:function(){Common.UI.BaseView.prototype.show.call(this,arguments)},hide:function(){Common.UI.BaseView.prototype.hide.call(this,arguments)},updateInfo:function(t){this.doc=t,this.rendered&&(t=t||{},t.info?(t.info.sharingSettings&&this.cntRights.html(this.templateRights({users:t.info.sharingSettings})),this._ShowHideInfoItem("rights",void 0!==t.info.sharingSettings&&null!==t.info.sharingSettings&&t.info.sharingSettings.length>0),this._ShowHideInfoItem("edit-rights",!!this.sharingSettingsUrl&&this.sharingSettingsUrl.length&&!0!==this._readonlyRights)):this._ShowHideDocInfo(!1))},_ShowHideInfoItem:function(t,e){$("tr."+t,this.el)[e?"show":"hide"]()},_ShowHideDocInfo:function(t){this._ShowHideInfoItem("rights",t),this._ShowHideInfoItem("edit-rights",t)},setMode:function(t){return this.sharingSettingsUrl=t.sharingSettingsUrl,!!this.sharingSettingsUrl&&this.sharingSettingsUrl.length&&Common.Gateway.on("showsharingsettings",_.bind(this.changeAccessRights,this)),!!this.sharingSettingsUrl&&this.sharingSettingsUrl.length&&Common.Gateway.on("setsharingsettings",_.bind(this.setSharingSettings,this)),this},changeAccessRights:function(t,e,i){if(!this._docAccessDlg&&!this._readonlyRights){var n=this;n._docAccessDlg=new Common.Views.DocumentAccessDialog({settingsurl:this.sharingSettingsUrl}),n._docAccessDlg.on("accessrights",function(t,e){n.updateSharingSettings(e)}).on("close",function(t){n._docAccessDlg=void 0}),n._docAccessDlg.show()}},setSharingSettings:function(t){t&&this.updateSharingSettings(t.sharingSettings)},updateSharingSettings:function(t){this.doc.info.sharingSettings=t,this._ShowHideInfoItem("rights",void 0!==this.doc.info.sharingSettings&&null!==this.doc.info.sharingSettings&&this.doc.info.sharingSettings.length>0),this.cntRights.html(this.templateRights({users:this.doc.info.sharingSettings})),Common.NotificationCenter.trigger("mentions:clearusers",this)},onLostEditRights:function(){this._readonlyRights=!0,this.rendered&&this._ShowHideInfoItem("edit-rights",!1)},txtRights:"Persons who have rights",txtBtnAccessRights:"Change access rights"},SSE.Views.FileMenuPanels.DocumentRights||{})),SSE.Views.FileMenuPanels.Help=Common.UI.BaseView.extend({el:"#panel-help",menu:void 0,template:_.template(['
','','',"
"].join("")),initialize:function(t){Common.UI.BaseView.prototype.initialize.call(this,arguments),this.menu=t.menu,this.urlPref="resources/help/en/",this.en_data=[{src:"ProgramInterface/ProgramInterface.htm",name:"Introducing Spreadsheet Editor user interface",headername:"Program Interface"},{src:"ProgramInterface/FileTab.htm",name:"File tab"},{src:"ProgramInterface/HomeTab.htm",name:"Home Tab"},{src:"ProgramInterface/InsertTab.htm",name:"Insert tab"},{src:"ProgramInterface/PluginsTab.htm",name:"Plugins tab"},{src:"UsageInstructions/OpenCreateNew.htm",name:"Create a new spreadsheet or open an existing one",headername:"Basic operations"},{src:"UsageInstructions/CopyPasteData.htm",name:"Cut/copy/paste data"},{src:"UsageInstructions/UndoRedo.htm",name:"Undo/redo your actions"},{src:"UsageInstructions/ManageSheets.htm",name:"Manage sheets",headername:"Operations with sheets"},{src:"UsageInstructions/FontTypeSizeStyle.htm",name:"Set font type, size, style, and colors",headername:"Cell text formatting"},{src:"UsageInstructions/AddHyperlinks.htm",name:"Add hyperlinks"},{src:"UsageInstructions/ClearFormatting.htm",name:"Clear text, format in a cell, copy cell format"},{src:"UsageInstructions/AddBorders.htm",name:"Add borders",headername:"Editing cell properties"},{src:"UsageInstructions/AlignText.htm",name:"Align data in cells"},{src:"UsageInstructions/MergeCells.htm",name:"Merge cells"},{src:"UsageInstructions/ChangeNumberFormat.htm",name:"Change number format"},{src:"UsageInstructions/InsertDeleteCells.htm",name:"Manage cells, rows, and columns",headername:"Editing rows/columns"},{src:"UsageInstructions/SortData.htm",name:"Sort and filter data"},{src:"UsageInstructions/InsertFunction.htm",name:"Insert function",headername:"Work with functions"},{src:"UsageInstructions/UseNamedRanges.htm",name:"Use named ranges"},{src:"UsageInstructions/InsertImages.htm",name:"Insert images",headername:"Operations on objects"},{src:"UsageInstructions/InsertChart.htm",name:"Insert chart"},{src:"UsageInstructions/InsertAutoshapes.htm",name:"Insert and format autoshapes"},{src:"UsageInstructions/InsertTextObjects.htm",name:"Insert text objects"},{src:"UsageInstructions/ManipulateObjects.htm",name:"Manipulate objects"},{src:"UsageInstructions/InsertEquation.htm",name:"Insert equations",headername:"Math equations"},{src:"HelpfulHints/CollaborativeEditing.htm",name:"Collaborative spreadsheet editing",headername:"Spreadsheet co-editing"},{src:"UsageInstructions/ViewDocInfo.htm",name:"View file information",headername:"Tools and settings"},{src:"UsageInstructions/SavePrintDownload.htm",name:"Save/print/download your spreadsheet"},{src:"HelpfulHints/AdvancedSettings.htm",name:"Advanced settings of Spreadsheet Editor"},{src:"HelpfulHints/Navigation.htm",name:"View settings and navigation tools"},{src:"HelpfulHints/Search.htm",name:"Search and replace functions"},{src:"HelpfulHints/About.htm",name:"About Spreadsheet Editor",headername:"Helpful hints"},{src:"HelpfulHints/SupportedFormats.htm",name:"Supported formats of spreadsheets"},{src:"HelpfulHints/KeyboardShortcuts.htm",name:"Keyboard shortcuts"}],Common.Utils.isIE&&(window.onhelp=function(){return!1})},render:function(){var t=this;return $(this.el).html(this.template()),this.viewHelpPicker=new Common.UI.DataView({el:$("#id-help-contents"),store:new Common.UI.DataViewStore([]),keyMoveDirection:"vertical",itemTemplate:_.template(['
":"")+s),this.cntSignatureView.html(this.templateSignature({tipText:s,hasSigned:n||o,hasRequested:i}))},updateEncrypt:function(){this.cntPasswordView.toggleClass("hidden",this.btnAddPwd.isVisible())},strProtect:"Protect Workbook",strSignature:"With Signature",txtView:"View signatures",txtEdit:"Edit workbook",txtSigned:"Valid signatures has been added to the workbook. The workbook is protected from editing.",txtSignedInvalid:"Some of the digital signatures in workbook are invalid or could not be verified. The workbook is protected from editing.",txtRequestedSignatures:"This workbook needs to be signed.",notcriticalErrorTitle:"Warning",txtEditWarning:"Editing will remove the signatures from the workbook. Are you sure you want to continue?",strEncrypt:"With Password",txtEncrypted:"This workbook has been protected by password"},SSE.Views.FileMenuPanels.ProtectDoc||{}))}),define("text!spreadsheeteditor/main/app/template/PrintSettings.template",[],function(){return'