var __awaiter=this&&this.__awaiter||function(n,t,i,r){function u(n){return n instanceof i?n:new i(function(t){t(n)})}return new(i||(i=Promise))(function(i,f){function o(n){try{e(r.next(n))}catch(t){f(t)}}function s(n){try{e(r["throw"](n))}catch(t){f(t)}}function e(n){n.done?i(n.value):u(n.value).then(o,s)}e((r=r.apply(n,t||[])).next())})},Unibase;(function(n){let t;(function(t){let i;(function(t){class i{constructor(){this.fileData=[]}jsFiles(){return["apps/communications/ai/components/resumeparsingmanager.js"]}init(n,t,i){var r=this,u=$(".bizgaze_FormErrorMessages:visible").attr("id");$("#img_"+t.FormPropertyId).val()==""&&(r.fileData[n]=[]);$("#browse_"+t.FormPropertyId).click(function(){$("#img_"+t.FormPropertyId).click()});r.loadControlSettings(t.ControlJsonText,t.FormPropertyId);$("#img_"+n).change(function(){var f,e,i,o;$("#editFileName_"+n).addClass("hidden");$("#editFileName_"+n).hasClass("hidden")||r.fileData[n]==[]||(f={FileId:1,FilePath:r.fileData[n].FilePath},r.fileData[n]=f);$("#img_"+n).removeAttr("style");e=$("#img_"+n).get(0);i=e.files;i[0].type.match("image.*")?(r.selectImageFile(i[0],t.DocPropertyName,n,null),o={Files:i[0]},r.getBase64(o).then(function(t){var i=null;r.fileData[n].FilePath!=null&&(i=r.fileData[n].FilePath);r.fileData[n]=t;r.fileData[n].FilePath=i})):($("#img_"+n).val(""),MessageHelper.Instance().showError("Please Select Image File.",u))});i!=null&&i()}selectImageFile(t,i,r,u){var o=this,h,e,c;$("#fileCount").addClass("hidden");var s="",f="";t!=null?(h=URL.createObjectURL(t),s=h,f=t.name,$("#requiredImgInput_"+r).val(f),o.fileHtml(f,r,i,s)):(f=i,$("#requiredImgInput_"+r).val(f),i="",e="",c="apis/v4/Documents/GetFile?path="+u,n.Platform.Analytics.Managers.ReportManager.Instance().dataHelper().getAsync(c).then(function(n){e="data:image/png;base64,"+n.file}).then(function(){o.fileHtml(f,r,i,e)}))}fileHtml(n,t,i,r){var u,f;n.length>15&&(u=n.substr(n.lastIndexOf(".")),n=n.substr(0,15)+"..."+u);f='