var __awaiter,Unibase;(function(n){let t;(function(t){let i;(function(t){let i;(function(t){let i;(function(t){class i extends n.Platform.Core.BaseComponent{_load(t,i){var f,e,o;let s=this,h=n.Themes.Providers.DashboardHelper.Instance().replaceWidgetParameterValues(t[0].WidgetParameters,t[0].InstalledAppId),r="",u="";f=n.Platform.Membership.Infos.Identity.currentUser.fromDate;e=n.Platform.Membership.Infos.Identity.currentUser.toDate;f!=null&&e!=null?(r=f.toString(),u=e.toString()):(r=n.Platform.Helpers.DateTimeHelper.Instance().formatLocalDateformat(new Date(n.Platform.Helpers.DateTimeHelper.Instance().currentDate()),"YYYY/MM/DD"),u=n.Platform.Helpers.DateTimeHelper.Instance().formatLocalDateformat(new Date(n.Platform.Helpers.DateTimeHelper.Instance().currentDate()),"YYYY/MM/DD"));o={WidgetId:t[0].WidgetId,PortletWidgetId:t[0].PortletWidgetId,InstalledAppId:t[0].InstalledAppId,InputParameters:h,FromDate:r,ToDate:u};s.loadResponseData(t[0].PortletWidgetId,i,o)}loadResponseData(t,i,r,u){let f=this;f.inputParameters=r.InputParameters;n.Platform.Widgets.Managers.WidgetManager.Instance().getKpiWidgetData(r).then(function(e){u==undefined?n.Platform.Widgets.Managers.WidgetManager.Instance().getPortletWidget(t).then(function(n){f.loadData(t,i,r,!1,e,n)}):u!=0?n.Platform.Widgets.Managers.WidgetManager.Instance().getPortletWidget(u).then(function(n){f.loadData(t,i,r,!1,e,n)}):f.loadData(t,i,r,!1,e)})}loadData(t,i,r,u,f,e){let b=this,y,p,l=[],o="."+i,v=f.result,s=[],h;var k=eval(f.result.Js);let c=[],a=[],w=[];if(w=f.result.Selected_Columns_Labels.split(","),e!=undefined?e.result.PortletWidgetCss!=null&&e.result.PortletWidgetCss!=""?(f.result.CssProperty=e.result.PortletWidgetCss,h=JSON.parse(e.result.PortletWidgetCss),f.result.KpiHeight=e.result.PortletWidgetHeight):(f.result.CssProperty=f.result.CssProperty,h=JSON.parse(f.result.CssProperty),f.result.KpiHeight=f.result.KpiHeight):(f.result.CssProperty=f.result.CssProperty,h=JSON.parse(f.result.CssProperty),f.result.KpiHeight=f.result.KpiHeight),k._styling(t,o,f),v!=null){if(y=JSON.parse(f.result.Data),p=v.Selected_Columns,p!=null){l=p.split(",");for(let n=0;nINR<\/span>'),c[r]=="percent"&&(i=n.Core.Helpers.NumberHelper.Instance().roundNumber(s[r],0)+"%<\/span>",$(o).find(".kpivalue_"+t+'[role="progressbar"][data-valueBind="Value-'+u+'"]').css("width",n.Core.Helpers.NumberHelper.Instance().roundNumber(s[r],0)+"%").html("")));a[r]!=""&&a[r]!=null&&a[r]!=undefined&&a[r]=="true"&&(i=n.Core.Helpers.NumberHelper.Instance().format(s[r],2,""));$(o).find('[data-valueBind="Value-'+u+'"]').html(i);$(o).find('[data-valueLabelBind="Value-'+u+'"]').text(w[r]);$(o).find(".kpivalue_"+t+'[role="progressbar"][data-valueBind="Value-'+u+'"]').html("")}v.LinkReportId!=0&&v.LinkReportId!=null?h[0].KPI_LinkReportLabelName!=undefined&&h[0].KPI_LinkReportLabelName!=null&&h[0].KPI_LinkReportLabelName!=""&&$(o).find(".LinkReport_"+t+"").html(''+h[0].KPI_LinkReportLabelName+"<\/span>"):$(o).find('[data-LinkReport="LinkReport"]').addClass("hidden");f.result.AppConfigurations!=null&&f.result.AppConfigurations!="[]"&&f.result.AppConfigurations!=""&&f.result.AppConfigurations!=undefined&&b.appConfiguration(t,o,f);$(o).ready(function(){eval(f.result.StaticJsPath.replace(/`/g,""))});$(o).siblings(".line-loader").remove();$(o).removeClass("hidden")}}linkReport(t,i){var r=this;n.Platform.Widgets.Managers.WidgetManager.Instance().getKPIWidget(t).then(function(t){var r=t.result,u;if(r!=null){let t="div_kpireport_"+i;u=n.Platform.Analytics.Components.ReportViewer.Instance();n.Platform.Helpers.NavigationHelper.Instance().popup(r.LinkReportId,t,u,null,n.Platform.Helpers.Size.ExtraLarge)}})}appConfiguration(n,t,i){var r,e,o;let s=this;if(i.result.AppConfigurations.length!=0){var f="",h=["primary","success","warning","danger","info","light","secondary","dark"],u=i.result.AppConfigurations;for(r=0;r
`;$("#_bizgaze_modal").append(t);$("#sessionsModal").modal();$(`#newAccountFormCloseBtns`).off().click(function(){g.navigationHelper.closePopUp()})}})}$(i).siblings(".line-loader").remove();$(i).removeClass("hidden")}static Instance(){return(this.instance===null||this.instance===undefined)&&(this.instance=new i),this.instance}}t.SingleData=i})(i=t.DetailWidgets||(t.DetailWidgets={}))})(i=t.Compact||(t.Compact={}))})(t=n.Themes||(n.Themes={}))}(Unibase||(Unibase={})),function(n){let t;(function(t){let i;(function(t){let i;(function(t){class i extends n.Platform.Core.BaseComponent{jsFiles(){return["platform/widgets/managers/interfaces/iwidgetmanager.js","platform/widgets/managers/widgetmanager.js","platform/core/helpers/propertyhelper/propertyhelper.js","platform/core/helpers/token/tokenhelper.js"]}cssFiles(){return[]}html(n){var t=n[0].WidgetName;return n[0].PortletWidgetId==22501?'
'+t+'<\/span>
<\/div><\/div>