var __awaiter=this&&this.__awaiter||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value)})}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())})},Bizgaze;(function(Bizgaze){let Apps;(function(Apps){let Transact;(function(Transact){let Controls;(function(Controls){class EstimateItems extends Unibase.Platform.Core.BaseComponent{constructor(){super(...arguments);this._estimate=Bizgaze.Apps.Transact.Controls.Estimate.Instance();this.g_ValidFocItems=[];this.g_SelectedItems=[];this.g_AppliedOffers=[];this.g_LoadedItems=[];this.g_PurPlanData=[];this.g_UOMs=[];this.g_ItemsUnitPrice_New=[];this.g_AppliedTaxGroups=[];this.g_PageIndex=0;this.g_PriceTypeId=1;this.g_IsEnablePieces=!1;this.g_IsEnablePacks=!1;this.g_IsEnablePiecePrice=!1;this.g_IsEnableCompositePrice=!1;this.g_IsEnableCompositePiecePrice=!1;this.g_BodyWidth=$("body").width();this.g_IsExcise=!1;this.g_PacksFocus=!0;this.g_PiecesFocus=!1;this.g_OfferApplyDate=new Date;this.g_FromContinueShopping=!1;this.g_FromWidget=!1;this.g_IsFilterApplied=!1;this.g_VisibleContainerId="";this.g_ContainerId="";this.g_TagArray=[];this.g_IsShowManagePrice=!0}init(formpropertyid,prop){let instance=this;instance.fileCacheHelper.loadJsFile("apps/transact/enums/enum.js",function(){instance.loadControlSettings(prop.ControlJsonText,prop.FormPropertyId);instance.loadPropertySettings(prop.PropertySettings,prop.FormPropertyId)})}loadControl(containerid){let instance=this;instance.g_ContainerId=containerid;instance.g_VisibleContainerId=Unibase.Platform.Helpers.NavigationHelper.ModalContainerIds[Unibase.Platform.Helpers.NavigationHelper.ModalContainerIds.length-1];instance._estimate.g_EstimateTypeId=Number($(".hdn_estimatetypeid").val());let html='