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(i){let r;(function(i){class r extends t.Core.BaseComponent{cssFiles(){return[]}jsFiles(){return["platform/automation/managers/rulemanager.js","platform/core/enums/rowstatus.js","platform/automation/enums/schedulertype.js","platform/automation/enums/ruletype.js"]}html(){return`
`}load(t,i){var f=this,u;$("#btnCloseRuleScheduler").click(function(){$("#"+i).modal("hide");$("#"+i).remove()});$("#btnSaveRuleScheduler").click(function(){let u=n.Platform.Forms.Components.FormViewer.Instance().requiredFieldValidation("frmUnibase_RuleScheduler");if(u==!1)return MessageHelper.Instance().showError("Mandatory fields are missing","Validate_RuleScheduler"),!1;r.Instance().SaveRuleScheduler(t,i)});u=_appsettings.server_url()+"/apis/v4/unibase/platform/followers/reports_followersauto";AutoCompleteHelper.getHelper().Create("#txtAutoComplete_Users","#hf_Autocomplete_Users",u,function(n){var t=n});$("#date_StartDate").daterangepicker({autoUpdateInput:!1,timePicker:!0,timePicker24Hour:!0,locale:{format:"DD/MM/YYYY HH:mm"},singleDatePicker:!0,showDropdowns:!0,minYear:1901,maxDate:new Date(2050,11,31)});$("#date_EndDate").daterangepicker({autoUpdateInput:!1,timePicker:!0,timePicker24Hour:!0,locale:{format:"DD/MM/YYYY HH:mm"},singleDatePicker:!0,showDropdowns:!0,minYear:1901,maxDate:new Date(2050,11,31)});$("#date_StartDate").on("apply.daterangepicker",function(){$("#div_StartDate").addClass("floating-label-form-group-with-value")});$("#date_EndDate").on("apply.daterangepicker",function(){$("#div_EndDate").addClass("floating-label-form-group-with-value")});t!=""&&n.Platform.Automation.Components.ActiveRules.Instance().EditRuleScheduler(t)}init(n){this.render(n);this.loadJsFiles()}render(n){return __awaiter(this,void 0,void 0,function*(){$("."+n).empty();let t=``;return yield $("."+n).append(t)})}loadJsFiles(){var t=n.Platform.Automation.Components.ActiveRules.Instance().jsFiles();n.Platform.Helpers.FileCacheHelper.Instance().loadJsFiles(t,function(){let t="";if(n.Themes.Providers.Detail_Settings.Instance().InputParameters.length>0)for(let i of n.Themes.Providers.Detail_Settings.Instance().InputParameters)i.Key==="hf_"+n.Themes.Providers.DetailHelper.installedAppId+"_ruleid"&&(t=i.Value.toString());Number(t)!=0&&n.Platform.Automation.Components.ActiveRules.Instance().GetActiveRules(Number(t))})}GetActiveRules(t){n.Platform.Automation.Managers.RuleManager.Instance().getActiveRules(t).then(function(t){if(t.length>0){$(".ActiveRuleslist_body").html('