/home/ivoiecob/email.hirewise-va.com/static/js/OfficeDocumentEditor.app.91206c748062ec6bed29.min.js
"use strict";(self.webpackChunkafterlogic_aurora_platform=self.webpackChunkafterlogic_aurora_platform||[]).push([[5747],{"2MaX":(t,e,i)=>{var o=i("a7T2"),s=i("p09A"),n=i("69av");function a(){n.call(this),this.fCallback=null,this.filename=s.observable(""),this.filename.focus=s.observable(!1),this.filename.error=s.observable(""),this.sExtension="",this.filename.subscribe(function(){this.filename.error("")},this)}o.extendOwn(a.prototype,n.prototype),a.prototype.PopupTemplate="OfficeDocumentEditor_CreateDocumentPopup",a.prototype.onOpen=function(t,e,i){this.filename(t),this.filename.focus(!0),this.filename.error(""),this.sExtension=e,this.fCallback=i},a.prototype.create=function(){if(this.filename.error(""),o.isFunction(this.fCallback)){var t=this.fCallback(this.filename(),this.sExtension);t?this.filename.error(""+t):this.closePopup()}else this.closePopup()},t.exports=new a},"4nRx":(t,e,i)=>{var o=i("M4cL"),s=i("p09A"),n=i("uQaC"),a=i("LKDt"),r=i("8QQh"),l=i("Z9uT"),h=i("5D2l"),c=i("PMEU"),u=h.run("FilesWebclient","getFileConstructor"),p=i("2MaX");function d(t,e){this.storageType=s.isObservable(t)?t:s.observable(""),this.currentPath=s.isObservable(e)?e:s.observable(""),this.allowCreateItems=s.computed(function(){return this.storageType()!==Enums.FileStorageType.Encrypted&&this.storageType()!==Enums.FileStorageType.Shared},this),this.createDocumentCommand=n.createCommand(this,this.createDocument,this.allowCreateItems),this.createSpreadSheetCommand=n.createCommand(this,this.createSpreadSheet,this.allowCreateItems),this.createPresentationCommand=n.createCommand(this,this.createPresentation,this.allowCreateItems)}d.prototype.ViewTemplate="OfficeDocumentEditor_AddFileButtonView",d.prototype.createDocument=function(){c.showPopup(p,[a.i18n("OFFICEDOCUMENTEDITOR/LABEL_BLANK_DOCUMENT_NAME"),"docx",this.createDocumentWithName.bind(this)])},d.prototype.createDocumentWithName=function(t,e){return t=o.trim(t),n.validateFileOrFolderName(t)?(r.send("OfficeDocumentEditor","CreateBlankDocument",{Type:this.storageType(),Path:this.currentPath(),FileName:t+"."+e},this.onCreateBlankDocumentResponse,this),""):a.i18n("FILESWEBCLIENT/ERROR_INVALID_FILE_NAME")},d.prototype.onCreateBlankDocumentResponse=function(t){if(t&&t.Result){var e=new u(t.Result);e.path()===this.currentPath()&&e.storageType()===this.storageType()&&h.run("FilesWebclient","addFileToCurrentFolder",[e]),h.run("FilesWebclient","refresh"),e.executeAction("edit")}else l.showErrorByCode(t)},d.prototype.createSpreadSheet=function(){c.showPopup(p,[a.i18n("OFFICEDOCUMENTEDITOR/LABEL_BLANK_SPREADSHEET_NAME"),"xlsx",this.createDocumentWithName.bind(this)])},d.prototype.createPresentation=function(){c.showPopup(p,[a.i18n("OFFICEDOCUMENTEDITOR/LABEL_BLANK_PRESENTATION_NAME"),"pptx",this.createDocumentWithName.bind(this)])},t.exports=d},"73GV":(t,e,i)=>{var o,s,n=i("LKDt"),a=i("PMEU"),r=i("Rjyw"),l=i("KIwC"),h={getDownloadLink:function(t,e,i){return e.length>0?"?/Download/"+t+"/DownloadFile/"+e+"/"+(i?"0/"+i:""):""},getIframeWrappwer:function(t,e){return"?/Raw/Iframe/"+t+"/"+window.encodeURIComponent(e)+"/"}};h.thumbQueue=(o={},s={},function(t,e){e?!(t in s)||s[t]>0?(t in s||(s[t]=2,o[t]=[]),s[t]--,e(t)):o[t].push({imageSrc:t,imageSrcObserver:e}):o[t]&&o[t].length&&(o[t][0].imageSrcObserver(o[t][0].imageSrc),o[t].shift())}),h.showErrorIfAttachmentSizeLimit=function(t,e){var i=n.i18n("COREWEBCLIENT/ERROR_UPLOAD_SIZE_DETAILED",{FILENAME:t,MAXSIZE:n.getFriendlySize(l.AttachmentSizeLimit)});return l.AttachmentSizeLimit>0&&e>l.AttachmentSizeLimit&&(a.showPopup(r,[i]),!0)},t.exports=h},G0wi:(t,e,i)=>{var o=i("a7T2"),s=i("sdEb"),n=i("ERH9"),a=i("3cxN"),r=i("8QQh"),l=i("Z9uT"),h=i("5D2l"),c=i("PMEU"),u=i("zVyH"),p=h.run("FilesWebclient","getFileConstructor"),d=i("nMjd"),m={},b={},f=0,E={};function v(t,e){r.send("OfficeDocumentEditor","ConvertDocument",{Type:this.storageType(),Path:this.path(),FileName:this.fileName()},function(i){if(o.isFunction(e)&&e(!1),i&&i.Result){var s=new p(i.Result);h.run("FilesWebclient","refresh"),s.executeAction("edit"),o.isFunction(t)&&t()}else l.showErrorByCode(i)},this)}E.view=function(){var t=null,e=a.getAppPath()+this.getActionUrl("view")+"/"+s().unix();n.isNonEmptyString(e)&&"#"!==e&&(t=u.open(e,e,!1))&&t.focus()},E.edit=function(){if(m[this.fullPath()]&&!m[this.fullPath()].Win.closed)m[this.fullPath()].Win.focus();else{var t=null,e=this.getActionUrl("edit");n.isNonEmptyString(e)&&"#"!==e&&("convert"===e||(e=a.getAppPath()+e+"/"+s().unix(),(t=u.open(e,e,!1))&&(function(t,e){var i=t.fullPath();m[i]={Win:e,File:t},clearInterval(f),f=setInterval(function(){o.each(m,function(t,e){t.Win.closed&&(b[e]=s(),delete m[e])}),o.isEmpty(m)&&clearInterval(f)},500)}(this,t),t.focus())))}},E.convert=function(){c.showPopup(d,[v.bind(this),E.view.bind(this)])},t.exports=E},HGC9:(t,e,i)=>{t.exports=function(t){var e=i("a7T2"),o=i("M4cL"),s=i("p09A"),n=i("LKDt"),a=i("ERH9"),r=i("yU9o"),l=i("LIBG"),h=i("4nRx"),c=i("G0wi"),u=i("aSuo"),p=s.observable(null),d=function(t,e){var i=t();if(i){if(i[e]){var o=i[e];o.canExecute()&&o()}}else if(s.isObservable(p))var n=p.subscribe(function(t){if(t&&t[e]){var i=t[e];i.canExecute()&&i()}n.dispose()})};return r.isUserNormalOrTenant()?{start:function(i){var s=t.OfficeDocumentEditor?t.OfficeDocumentEditor.ExtensionsToView:[];s=s.map(function(t){return a.pString(t).toLowerCase()}),l.addViewExtensions(s),r.subscribeEvent("FilesWebclient::ConstructView::after",function(t){if("CFilesView"===t.Name){var i=t.View;i&&e.isFunction(i.registerCreateButtonsController)&&(p(new h(i.storageType,i.currentPath)),i.registerCreateButtonsController(p()))}}),r.subscribeEvent("FilesWebclient::ParseFile::after",function(t){var e=t[0],i=(t[1],a.pString(e.extension()).toLowerCase());e.hasAction("view")&&e.oActionsData.view&&-1!==o.inArray(i,s)&&(delete e.oActionsData.view.HandlerName,e.oActionsData.view.Handler=c.view.bind(e)),e.hasAction("convert")&&(e.removeAction("convert"),e.oActionsData.convert&&(e.actions.unshift("convert"),e.oActionsData.convert.Text=n.i18n("OFFICEDOCUMENTEDITOR/ACTION_EDIT_FILE"),e.oActionsData.convert.Handler=c.convert.bind(e)),e.hasAction("view")&&(e.removeAction("view"),e.actions.push("view"))),e.hasAction("edit")&&(e.removeAction("edit"),e.oActionsData.edit&&(e.actions.unshift("edit"),e.oActionsData.edit.Text=n.i18n("OFFICEDOCUMENTEDITOR/ACTION_EDIT_FILE"),e.oActionsData.edit.Handler=c.edit.bind(e)),e.hasAction("view")&&(e.removeAction("view"),e.actions.push("view")))}),r.broadcastEvent("RegisterNewItemElement",{title:n.i18n("OFFICEDOCUMENTEDITOR/ACTION_CREATE_DOCUMENT"),handler:function(){window.location.hash.startsWith("#"+u.HashModuleName)||(window.location.hash=u.HashModuleName),d(p,"createDocumentCommand")},className:"item_document",order:5,column:2}),r.broadcastEvent("RegisterNewItemElement",{title:n.i18n("OFFICEDOCUMENTEDITOR/ACTION_CREATE_SPREADSHEET"),handler:function(){window.location.hash.startsWith("#"+u.HashModuleName)||(window.location.hash=u.HashModuleName),d(p,"createSpreadSheetCommand")},className:"item_spreadsheet",order:5,column:2}),r.broadcastEvent("RegisterNewItemElement",{title:n.i18n("OFFICEDOCUMENTEDITOR/ACTION_CREATE_PRESENTATION"),handler:function(){window.location.hash.startsWith("#"+u.HashModuleName)||(window.location.hash=u.HashModuleName),d(p,"createPresentationCommand")},className:"item_presentation",order:5,column:2})}}:null}},LIBG:(t,e,i)=>{var o=i("a7T2"),s=i("M4cL"),n=i("p09A"),a=i("sdEb"),r=i("yU9o"),l=i("73GV"),h=i("LKDt"),c=i("ERH9"),u=i("3cxN"),p=i("uQaC"),d=i("zVyH"),m=["image/jpeg","image/jpg","image/png","image/gif","text/html","text/plain","text/css","text/rfc822-headers","message/delivery-status","application/x-httpd-php","application/javascript"],b=[];function f(){this.id=n.observable(""),this.index=n.observable(0),this.fileName=n.observable(""),this.tempName=n.observable(""),this.extension=n.observable(""),this.fileName.subscribe(function(t){this.id(t),this.extension(p.getFileExtension(t))},this),this.displayName=n.computed(function(){return this.fileName()},this),this.size=n.observable(0),this.friendlySize=n.computed(function(){return this.size()>0?h.getFriendlySize(this.size()):""},this),this.hash=n.observable(""),this.thumbUrlInQueue=n.observable(""),this.thumbUrlInQueueSubscribtion=this.thumbUrlInQueue.subscribe(function(){this.getInThumbQueue()},this),this.thumbnailSrc=n.observable(""),this.thumbnailLoaded=n.observable(!1),this.mimeType=n.observable(""),this.uploadUid=n.observable(""),this.uploaded=n.observable(!1),this.uploadError=n.observable(!1),this.downloading=n.observable(!1),this.bHasHtmlEmbed=!1,this.otherTemplates=n.observableArray([]),this.visibleCancelButton=n.observable(!0),this.cancelButtonTooltip=h.i18n("COREWEBCLIENT/ACTION_CANCEL"),this.statusText=n.observable(""),this.statusTooltip=n.computed(function(){return this.uploadError()?this.statusText():""},this),this.progressPercent=n.observable(0),this.visibleProgress=n.observable(!1),this.uploadStarted=n.observable(!1),this.uploadStarted.subscribe(function(){this.uploadStarted()?(this.uploaded(!1),this.visibleProgress(!0),this.progressPercent(20)):(this.progressPercent(100),this.visibleProgress(!1),this.uploaded(!0))},this),this.downloading.subscribe(function(){this.downloading()?this.visibleProgress(!0):(this.visibleProgress(!1),this.progressPercent(0))},this),this.allowDrag=n.observable(!1),this.allowUpload=n.observable(!1),this.allowPublicLink=n.observable(!1),this.bIsSecure=n.observable(!1),this.sHeaderText="",this.oActionsData={view:{Text:h.i18n("COREWEBCLIENT/ACTION_VIEW_FILE"),HandlerName:"viewFile"},download:{Text:h.i18n("COREWEBCLIENT/ACTION_DOWNLOAD_FILE"),HandlerName:"downloadFile",Tooltip:n.computed(function(){var t=h.i18n("COREWEBCLIENT/INFO_CLICK_TO_DOWNLOAD_FILE",{FILENAME:this.fileName(),SIZE:this.friendlySize()});return""===this.friendlySize()&&(t=t.replace(" ()","")),t},this)}},this.allowActions=n.observable(!0),this.iconAction=n.observable("download"),this.cssClasses=n.computed(function(){return this.getCommonClasses().join(" ")},this),this.actions=n.observableArray([]),this.firstAction=n.computed(function(){return this.actions().length>1?this.actions()[0]:""},this),this.secondAction=n.computed(function(){return 1===this.actions().length?this.actions()[0]:this.actions().length>1?this.actions()[1]:""},this),this.subFiles=n.observableArray([]),this.subFilesExpanded=n.observable(!1),this.sUploadSubFolder="",this.bIsHidden=!1}navigator.pdfViewerEnabled&&(m.push("application/pdf"),m.push("application/x-pdf")),f.prototype.addAction=function(t,e,i){e?this.actions.unshift(t):this.actions.push(t),this.actions(o.compact(this.actions())),i&&(this.oActionsData[t]=i)},f.prototype.removeAction=function(t){this.actions(o.without(this.actions(),t))},f.prototype.getMainAction=function(){return this.actions()[0]},f.prototype.hasAction=function(t){return-1!==o.indexOf(this.actions(),t)},f.prototype.getActionText=function(t){return this.hasAction(t)&&this.oActionsData[t]&&("string"==typeof this.oActionsData[t].Text||o.isFunction(this.oActionsData[t].Text))?o.isFunction(this.oActionsData[t].Text)?this.oActionsData[t].Text():this.oActionsData[t].Text:""},f.prototype.getActionUrl=function(t){return this.hasAction(t)&&this.oActionsData[t]&&this.oActionsData[t].Url||""},f.prototype.executeAction=function(t){var e=this.hasAction(t)&&this.oActionsData[t];e&&(o.isFunction(e.Handler)?e.Handler():"string"==typeof e.HandlerName&&o.isFunction(this[e.HandlerName])&&this[e.HandlerName]())},f.prototype.getTooltip=function(t){var e=this.hasAction(t)&&this.oActionsData[t]?this.oActionsData[t].Tooltip:"";return"string"==typeof e?e:o.isFunction(e)?e():""},f.prototype.getCommonClasses=function(){var t=[];return(this.allowUpload()&&!this.uploaded()||this.downloading())&&t.push("incomplete"),this.uploadError()?t.push("fail"):t.push("success"),t},f.prototype.parse=function(t){this.fileName(c.pString(t.FileName)),this.tempName(c.pString(t.TempName)),""===this.tempName()&&this.tempName(this.fileName()),this.mimeType(c.pString(t.MimeType)),this.size(t.EstimatedSize?c.pInt(t.EstimatedSize):c.pInt(t.SizeInBytes)),this.hash(c.pString(t.Hash)),this.parseActions(t),this.uploadUid(this.hash()),this.uploaded(!0),o.isFunction(this.additionalParse)&&this.additionalParse(t)},f.prototype.parseActions=function(t){this.thumbUrlInQueue(""!==c.pString(t.ThumbnailUrl)?c.pString(t.ThumbnailUrl)+"/"+Math.random():""),this.commonParseActions(t),this.commonExcludeActions()},f.prototype.commonExcludeActions=function(){this.isViewSupported()||this.removeAction("view")},f.prototype.commonParseActions=function(t){o.each(t.Actions,function(t,e){this.oActionsData[e]||(this.oActionsData[e]={}),this.oActionsData[e].Url=c.pString(t.url),this.actions.push(e)},this)},f.addViewExtensions=function(t){o.isArray(t)&&(b=o.union(b,t))},f.prototype.isViewSupported=function(){return-1!==s.inArray(this.mimeType(),m)||-1!==s.inArray(c.pString(this.extension()).toLowerCase(),b)},f.prototype.getInThumbQueue=function(){""===this.thumbUrlInQueue()||this.linked&&(!this.linked||this.linked())||l.thumbQueue(this.thumbUrlInQueue(),this.thumbnailSrc)},f.prototype.downloadFile=function(t){var e=this.getActionUrl("download"),i={File:this,CancelDownload:!1};e.length>0&&"#"!==e&&(t||r.broadcastEvent("AbstractFileModel::FileDownload::before",i),i.CancelDownload||(o.isFunction(i.CustomDownloadHandler)?i.CustomDownloadHandler():(e+="/"+a().unix(),u.downloadByUrl(e,"eml"===this.extension()))))},f.prototype.viewFile=function(t,e){p.calmEvent(e),this.viewCommonFile()},f.prototype.viewCommonFile=function(t){var e=null,i=null;c.isNonEmptyString(t)||(t=u.getAppPath()+this.getActionUrl("view")),t.length>0&&"#"!==t&&(i={sUrl:t+="/"+a().unix(),index:this.index(),hash:this.hash(),continueView:!0},r.broadcastEvent("AbstractFileModel::FileView::before",i),i.continueView&&(e=d.open(i.sUrl,i.sUrl,!1))&&e.focus())},f.prototype.eventDragStart=function(t,e){var i=e.originalEvent||e;return t&&i&&i.dataTransfer&&i.dataTransfer.setData&&i.dataTransfer.setData("DownloadURL",this.generateTransferDownloadUrl()),!0},f.prototype.generateTransferDownloadUrl=function(){var t=this.getActionUrl("download");return"http"!==t.substr(0,4)&&(t=u.getAppPath()+t),this.mimeType()+":"+this.fileName()+":"+t},f.prototype.onUploadSelect=function(t,e,i){i||(this.fileName(c.pString(e.FileName)),this.mimeType(c.pString(e.Type)),this.size(c.pInt(e.Size))),this.uploadUid(t),this.uploaded(!1),this.statusText(""),this.progressPercent(0),this.visibleProgress(!1),this.sUploadSubFolder=c.pString(e.Folder),this.bIsHidden=""!==this.sUploadSubFolder},f.prototype.onUploadStart=function(){this.visibleProgress(!0)},f.prototype.onUploadProgress=function(t,e){e>0&&(this.progressPercent(Math.ceil(t/e*100)),this.visibleProgress(!0))},f.prototype.onDownloadProgress=function(t,e){e>0&&(this.progressPercent(Math.ceil(t/e*100)),this.visibleProgress(this.progressPercent()<100))},f.prototype.onUploadComplete=function(t,e,i){var o=!(e&&i&&!i.ErrorCode&&i.Result&&!i.Result.Error),s=i&&i.ErrorCode&&i.ErrorCode===Enums.Errors.CanNotUploadFileLimit?h.i18n("COREWEBCLIENT/ERROR_UPLOAD_SIZE"):h.i18n("COREWEBCLIENT/ERROR_UPLOAD_UNKNOWN");this.progressPercent(0),this.visibleProgress(!1),this.uploaded(!0),this.uploadError(o),this.statusText(o?s:h.i18n("COREWEBCLIENT/REPORT_UPLOAD_COMPLETE")),o||(this.fillDataAfterUploadComplete(i,t),setTimeout(function(t){return function(){t.statusText("")}}(this),3e3))},f.prototype.fillDataAfterUploadComplete=function(t,e){},f.prototype.onImageLoad=function(t,e){""===this.thumbUrlInQueue()||this.thumbnailLoaded()||(this.thumbnailLoaded(!0),l.thumbQueue(this.thumbUrlInQueue()))},f.prototype.stopDownloading=function(){this.downloading(!1)},f.prototype.startDownloading=function(){this.downloading(!0)},t.exports=f},aSuo:(t,e,i)=>{var o=i("a7T2"),s=i("ERH9");t.exports={ServerModuleName:"Files",CorporateServerModuleName:"CorporateFiles",PersonalServerModuleName:"PersonalFiles",HashModuleName:"files",Storages:[],EnableUploadSizeLimit:!1,PublicFolderName:"",PublicHash:"",UploadSizeLimitMb:0,UserSpaceLimitMb:0,TenantSpaceLimitMb:0,CorporateSpaceLimitMb:0,AllowTrash:!1,AllowFavorites:!1,EditFileNameWithoutExtension:!1,ShowCommonSettings:!0,ShowFilesApps:!0,BottomLeftCornerLinks:[],CustomTabTitle:"",ShowPersonalFilesAdminSection:!1,ShowCorporateFilesAdminSection:!1,PublicLinksEnabled:!0,Sorting:{Allow:!1},init:function(t){var e=t[this.ServerModuleName],i=t[this.CorporateServerModuleName],n=t.FilesWebclient;o.isEmpty(e)||(this.Storages=s.pArray(e.Storages,this.Storages),this.EnableUploadSizeLimit=s.pBool(e.EnableUploadSizeLimit,this.EnableUploadSizeLimit),this.PublicFolderName=s.pString(e.PublicFolderName,this.PublicFolderName),this.PublicHash=s.pString(e.PublicHash,this.PublicHash),this.UploadSizeLimitMb=s.pNonNegativeInt(e.UploadSizeLimitMb,this.UploadSizeLimitMb),this.UserSpaceLimitMb=s.pNonNegativeInt(e.UserSpaceLimitMb,this.UserSpaceLimitMb),this.TenantSpaceLimitMb=s.pNonNegativeInt(e.TenantSpaceLimitMb,this.TenantSpaceLimitMb),this.AllowTrash=s.pBool(e.AllowTrash,this.AllowTrash),this.AllowFavorites=s.pBool(e.AllowFavorites,this.AllowFavorites)),this.ShowPersonalFilesAdminSection=!0,o.isEmpty(i)||(this.ShowCorporateFilesAdminSection=!0,this.CorporateSpaceLimitMb=s.pNonNegativeInt(i.SpaceLimitMb,this.CorporateSpaceLimitMb)),o.isEmpty(n)||(this.EditFileNameWithoutExtension=s.pBool(n.EditFileNameWithoutExtension,this.EditFileNameWithoutExtension),this.ShowCommonSettings=s.pBool(n.ShowCommonSettings,this.ShowCommonSettings),this.ShowFilesApps=s.pBool(n.ShowFilesApps,this.ShowFilesApps),this.BottomLeftCornerLinks=s.pArray(n.BottomLeftCornerLinks,this.BottomLeftCornerLinks),this.PublicLinksEnabled=s.pBool(n.PublicLinksEnabled,this.PublicLinksEnabled),this.Sorting=this.getSortConfig(s.pObject(n.FilesSortBy)),this.CustomTabTitle=s.pString(n.CustomTabTitle,this.CustomTabTitle))},updateAdmin:function(t,e){this.EnableUploadSizeLimit=t,this.UploadSizeLimitMb=e},updateAdminPersonal:function(t){this.PersonalSpaceLimitMb=t},updateAdminCorporate:function(t){this.CorporateSpaceLimitMb=t},getSortConfig:function(t){return{Allow:s.pBool(null==t?void 0:t.Allow),DisplayOptions:(null==t?void 0:t.DisplayOptions)||[],DefaultSortBy:s.pEnum(Enums.FilesSortField[null==t?void 0:t.DefaultSortBy],Enums.FilesSortField,Enums.FilesSortField.Filename),DefaultSortOrder:s.pEnum(Enums.SortOrder[null==t?void 0:t.DefaultSortOrder],Enums.SortOrder,Enums.SortOrder.Desc)}}}},nMjd:(t,e,i)=>{var o=i("a7T2"),s=i("p09A"),n=i("69av");function a(){n.call(this),this.convertInProgress=s.observable(!1),this.fConvertCallback=null,this.fViewCallback=null}o.extendOwn(a.prototype,n.prototype),a.prototype.PopupTemplate="OfficeDocumentEditor_ConvertPopup",a.prototype.onOpen=function(t,e){this.convertInProgress(!1),this.fConvertCallback=t,this.fViewCallback=e},a.prototype.convert=function(){o.isFunction(this.fConvertCallback)&&(this.convertInProgress(!0),this.fConvertCallback(this.closePopup.bind(this),this.convertInProgress))},a.prototype.view=function(){o.isFunction(this.fViewCallback)&&this.fViewCallback(),this.closePopup()},a.prototype.cancelPopup=function(){this.closePopup()},t.exports=new a}}]);