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.Ids=[];this.data=[]}init(t,i,r){var u=$(".select2_"+i.FormPropertyId);n.Forms.Controls.select2.Instance().loadControlSettings(u,null).then(function(){r!=null&&r()});$(".select2_"+i.FormPropertyId).on("select2:select",function(){var n=$(".select2_"+i.FormPropertyId).val().toString().replace(/,/g,"|");$("#hdnselect2_"+i.FormPropertyId).val(n)});$(".select2_"+i.FormPropertyId).on("select2:unselect",function(){$("#hdnselect2_"+i.FormPropertyId).val(0);var n=$(".select2_"+i.FormPropertyId).val().toString().replace(/,/g,"|");$("#hdnselect2_"+i.FormPropertyId).val(n)})}loadControl(t,i){var r,u,f,h;n.Forms.Controls.select2.Instance().data=[];n.Forms.Controls.select2.Instance().Ids=[];var e=i.IsRequired!=!0?"hidden":"",o=i.IsRequired!=!0?"":"required",s=$("#hf_"+$("#hfLayout_InstalledPageId").val()+"_StageId").val();i.StagesForRequired!=null&&i.StagesForRequired!=""&&(r=i.StagesForRequired.split("|"),e=r.find(n=>n==s)?"":"hidden",o=r.find(n=>n==s)?"required":"");u=!1;i.ControlJsonText!=""&&i.ControlJsonText!=null&&i.ControlJsonText!=undefined&&(f=JSON.parse(i.ControlJsonText),f.IsTagSelect==!0&&(u=!0));const{helpTooltipHtml:c,helpTextHtml:l}=n.Platform.Forms.Components.FormViewer.Instance().getControlHelpHtml(i);h='