//>>built
require({cache:{"url:mill/jssupport/jsApplication/controls/fileEditor/fileEditor.html":'\x3cdiv\x3e\x3cdiv class\x3d"fileEditorContainer" data-dojo-attach-point\x3d"fileEditorContainer"\x3e\x3cspan class\x3d"fileEditorAction fileEditorHidden icon-set-bin" data-dojo-attach-point\x3d"binNode" data-dojo-attach-event\x3d"onClick: reset"\x3e\x3c/span\x3e\x3ca target\x3d"_blank" class\x3d"fileEditorAction fileEditorIcon fileEditorHidden" data-dojo-attach-point\x3d"attachmentNode"\x3e\x3cspan class\x3d"icon-set-attachment"\x3e\x3c/span\x3e\x3c/a\x3e\x3cdiv class\x3d"fileEditorUploaderContainer" data-dojo-attach-point\x3d"uploaderContainerNode"\x3e\x3cdiv class\x3d"fileEditorUploaderLabel" data-dojo-type\x3d"office.TranslatableNode" data-dojo-props\x3d"display: \'inline\', text: \'Office.SelectFile\'" data-dojo-attach-point\x3d"labelWidget"\x3e\x3c/div\x3e\x3cdiv class\x3d"fileEditorUploader" data-dojo-type\x3d"mill.uploader" data-dojo-props\x3d"preventProgressText: true" data-dojo-attach-event\x3d"onChange: onChange, onUpload: onUpload, _prepareUpload: _prepareUpload, _setProgressText: _setProgressText" data-dojo-attach-point\x3d"focusNode, uploader"\x3e\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d"fileEditorConsoleItem small bold" data-testid\x3d"file-properties-text" data-dojo-type\x3d"office.TranslatableNode" data-dojo-attach-point\x3d"filePropertiesTextWidget"\x3e\x3c/div\x3e\x3cdiv class\x3d"fileEditorConsoleItem dim" data-dojo-type\x3d"office.TranslatableNode" data-dojo-attach-point\x3d"progressTextWidget"\x3e\x3c/div\x3e\x3c/div\x3e'}});
define("mill/jssupport/jsApplication/controls/fileEditor/FileEditor","dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/dom-class dijit/form/_FormWidget dijit/_WidgetsInTemplateMixin mill/mill mill/uploader dojo/i18n!mill/nls/resources dojo/text!mill/jssupport/jsApplication/controls/fileEditor/fileEditor.html mill/jssupport/base".split(" "),function(f,g,h,b,k,l,e,p,m,n,c){return e.registerAlias("app.view.FileEditor",f("mill.jssupport.jsApplication.controls.fileEditor.FileEditor",[k,l],{baseClass:"fileEditor",
templateString:n,maxSize:10,accept:"image/jpeg,application/pdf",extension:null,fileRemovable:null,uploader:null,file:null,fileName:null,fileReference:null,fileReferenceAnonymous:null,fileEditorContainer:null,binNode:null,attachmentNode:null,uploaderContainerNode:null,labelWidget:null,filePropertiesTextWidget:null,progressTextWidget:null,_setIdAttr:"domNode",_setDisabledAttr:"uploader",_setAcceptAttr:"uploader",_getFileAttr:function(){return function(){return this.uploader.fileInput.files[0]||null}}(),
_setFileReferenceAttr:function(){return function(a){this.fileReference=a;this.attachmentNode.setAttribute("href",this._getURI());this._initState()}}(),_getURI:function(){var a=this.fileReferenceAnonymous?window.app.anonymousHandler||(c?c.anonymousHandler:""):window.app.handler||(c?c.mainHandler:"");return encodeURI(this.fileReference?"/"+a+this.fileReference:"")},_hasFileReference:function(){return!!this.get("value")},_prepareUpload:function(){return function(){window.app.setControlValue(this,!0,
"disabled");b.add(this.fileEditorContainer,"fileEditorHidden")}}(),_setFilePropertiesText:function(a){this.filePropertiesTextWidget.set("text",a||"")},_setProgressText:function(a){this.progressTextWidget.set("text",m[a]||a||"")},_initState:function(){var a=this.get("file");this.labelWidget.set("text",a||this._hasFileReference()?"Office.SelectAnotherFile":"Office.SelectFile");b[a||this.fileRemovable&&this._hasFileReference()?"remove":"add"](this.binNode,"fileEditorHidden");b[this._hasFileReference()?
"remove":"add"](this.attachmentNode,"fileEditorHidden")},_getSize:function(){return e.formatSize(this.get("file").size)},onChange:function(){var a=this.get("file");this.set("fileName",a?a.name:null);this._initState();this._setFilePropertiesText(a?a.name+" ["+this._getSize().size+" "+this._getSize().unit+"]":"");this._setProgressText(null)},onUpload:function(){window.app.setControlValue(this,!1,"disabled");b.add(this.uploaderContainerNode,"fileEditorHidden")},validate:function(){var a=this.get("file"),
d=!this.required||this.disabled||this.required&&(!!a||this._hasFileReference());d?("Office.FileRequired"===this.filePropertiesTextWidget.get("text")&&this._setFilePropertiesText(""),!this.disabled&&a&&(a.size/1024/1024>this.maxSize?(this._setFilePropertiesText("Office.FileMaxSize1; ;"+this.maxSize.toString()+"; ;Office.FileMaxSize2"),d=!1):this.extension&&(a=a.name.toLowerCase().split(".").pop(),0>h.indexOf(this.extension.replace(/\s/gim,"").split(","),a)&&(this._setFilePropertiesText("\x3cspan class\x3d'red'\x3e;Office.FileExtensionError; ;"+
this.extension+"\x3c/span\x3e"),d=!1)))):this._hasBeenBlurred&&this._setFilePropertiesText("Office.FileRequired");return d},reset:function(){return function(a){null!==a&&g.isObject(a)&&this.disabled||(b.remove(this.fileEditorContainer,"fileEditorHidden"),b.remove(this.uploaderContainerNode,"fileEditorHidden"),this.uploader.fileInput.value=null,this.fileRemovable&&this.set("value",null),this.onChange())}}()}))});