PageSourceSearch

https://panel.sadad.qa/main-esnext.3d3ae27ec1a529d80e09.js

js sadad.qa collected 2026-10-01 14:13:25 UTC 407,864 bytes, 1 lines download raw bytes

1(self.webpackChunkcuba=self.webpackChunkcuba||[]).push([["main"],{98255:function(e){function t(e){return Promise.resolve().then(function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t})}t.keys=function(){return[]},t.resolve=t,t.id=98255,e.exports=t},27624:function(e,t,r){"use strict";r.d(t,{b:function(){return i}});var n=r(35366);let i=(()=>{class e{constructor(e){this._el=e}onKeyDown(e){if(8!=e.keyCode){if(e?.srcElement&&e.srcElement?.maxLength===e.srcElement?.value?.length){e.preventDefault();let t=e.srcElement.nextElementSibling;for(;;){if(!t)return;if(t.type===e.srcElement.type)return void t.focus();t=t.nextElementSibling}}}else e?.srcElement&&(e.srcElement.value="",this.handlePreviousFocusCustom(e?.srcElement))}handlePreviousFocusCustom(e){const t=e?.previousElementSibling||e?.previousSibling;t&&"function"==typeof t?.focus&&t.focus()}}return e.\u0275fac=function(t){return new(t||e)(n.Y36(n.SBq))},e.\u0275dir=n.lG2({type:e,selectors:[["","autoFocusMaxLength",""]],hostBindings:function(e,t){1&e&&n.NdJ("keyup",function(e){return t.onKeyDown(e)})}}),e})()},89749:function(e,t,r){"use strict";r.d(t,{M:function(){return i}});var n=r(35366);let i=(()=>{class e{constructor(){}updateUrl(){this.src=this.default}load(){this.className="image-loaded"}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=n.lG2({type:e,selectors:[["img","default",""]],hostVars:3,hostBindings:function(e,t){1&e&&n.NdJ("error",function(){return t.updateUrl()})("load",function(){return t.load()}),2&e&&(n.Ikx("src",t.src,n.LSH),n.Tol(t.className))},inputs:{src:"src",default:"default"}}),e})()},32309:function(e,t,r){"use strict";r.d(t,{p:function(){return a}});var n=r(35366),i=r(31041);let a=(()=>{class e{constructor(e,t){this._el=e,this.control=t,this.allowNegative=!1,this.allowZero=!0,this.allowDecimal=!1,this.inputIntegerOnly=!1}onKeyDown(e){const t=this._el.nativeElement.value;this.inputIntegerOnly||(this._el.nativeElement.value=this.allowZero?Math.abs(t)<0?null:t.replace(this.allowDecimal?/[^0-9,.]*/g:/[^0-9]*/g,""):Math.abs(t)<=0?null:t.replace(this.allowNegative?/[^0-9-]*/g:this.allowDecimal?/[^0-9,.]*/g:/[^0-9]*/g,""),this.allowDecimal&&(this._el.nativeElement.value.match(/\./g)||[]).length>1&&(this._el.nativeElement.value=parseFloat(this._el.nativeElement.value).toString()),"NaN"==this._el.nativeElement.value&&(this._el.nativeElement.value=""),t!==this._el.nativeElement.value&&e.stopPropagation(),this.control.control.setValue(this._el.nativeElement.value),this._el.nativeElement.focus())}}return e.\u0275fac=function(t){return new(t||e)(n.Y36(n.SBq),n.Y36(i.a5))},e.\u0275dir=n.lG2({type:e,selectors:[["input","numbersOnly",""]],hostBindings:function(e,t){1&e&&n.NdJ("input",function(e){return t.onKeyDown(e)})},inputs:{allowNegative:"allowNegative",allowZero:"allowZero",allowDecimal:"allowDecimal",inputIntegerOnly:"inputIntegerOnly"}}),e})()},67136:function(e,t,r){"use strict";function n(){if("undefined"==typeof window||!window.location)return!1;const e=String(window.location.hostname||"").toLowerCase();return"localhost"===e||"127.0.0.1"===e||"[::1]"===e||"::1"===e}function i(e){const t="string"==typeof e?e:String(e?.message||e||"");return/NetworkError|network error|interrupted connection|unreachable host|network-request-failed/i.test(t)||/Load failed/i.test(t)||/Failed to fetch/i.test(t)||/importScripts/i.test(t)}function a(e){const t="string"==typeof e?e:String(e?.message||e||"");return/postEvent/i.test(t)||/Method not found/i.test(t)}function s(e){const t="string"==typeof e?e:String(e?.message||e||"");return/disableWebkitEnterFullscreen/i.test(t)}function o(e){const t="string"==typeof e?e:String(e?.message||e||"");return/Java object is gone/i.test(t)||/sendDataToNative/i.test(t)}function l(e){const t="string"==typeof e?e:String(e?.message||e?.stack||e||""),r=/Java object is gone|sendDataToNative|sendBeforeUnloadMessage|postEvent|disableWebkitEnterFullscreen|Method not found|Extension context invalidated|Receiving end does not exist|webkit\.messageHandlers|WebViewJavascriptBridge|NotReadableError|The I\/O read operation failed|I\/O read operation failed/i.test(t),n=/iabjs:\/\/|chrome-extension:\/\/|moz-extension:\/\/|safari-extension:\/\/|safari-web-extension:\/\/|ms-browser-extension:\/\/|android_asset|applewebdata:\/\//i.test(t);return r||n}function c(e){if(!e)return!1;const t=e?.status??e?.rejection?.status??e?.ngOriginalError?.status;if(0===t||502===t||503===t||504===t||429===t)return!0;const r="string"==typeof e?e:String(e?.message||e?.stack||e?.reason||e?.code||e||"");
1return/network error|interrupted connection|unreachable host|network-request-failed|NetworkError|Load failed|Failed to fetch|importScripts|connection was lost|connection appears to be offline|ERR_INTERNET_DISCONNECTED|ERR_CONNECTION_|ERR_NAME_NOT_RESOLVED|ERR_NETWORK_CHANGED|ERR_ABORTED|ERR_EMPTY_RESPONSE|:\s*0 Unknown Error|blocked by CORS policy/i.test(r)||l(e)}r.d(t,{xl:function(){return n},Y$:function(){return i},_m:function(){return a},mI:function(){return s},Op:function(){return o},U$:function(){return l},VA:function(){return c}})},50243:function(e,t,r){"use strict";r.d(t,{aQ:function(){return m},L6:function(){return $},QI:function(){return v},A8:function(){return b},bP:function(){return d},tk:function(){return P},fB:function(){return y},U$:function(){return A.U$},Op:function(){return A.Op},xl:function(){return A.xl},Pw:function(){return A.VA},Y$:function(){return A.Y$},Fd:function(){return f},IX:function(){return E}});var n=r(42693),i=r(32041),a=r(90343),s=r(51816),o=r(99597),l=r(35366),c=r(98109);let d=(()=>{class e{constructor(e){this._authSer=e,this.cache=new Map}intercept(e,t){if(e.clone({headers:e.headers.append("ngsw-bypass","true")}),/\.(svg|cur|jpg|jpeg|png|apng|webp|avif|gif|otf|ttf|woff|woff2|pdf)$/i.test(e.url)||(e=e.clone({setHeaders:{"ngsw-bypass":"true"}})),e.url.indexOf("getstaticpageproducts")>-1||e.url.indexOf("getstaticpageproductimages")>-1)return t.handle(e);let r=this._authSer.currentUserValue,l=r?.token;if(this._authSer?.appDeveloperValue,e.url.indexOf("sandbox_api-v1")>-1)return r&&r?.token&&(e=e.clone({setHeaders:{accesstoken:`${r?.token}`}})),t.handle(e);if(r&&l){let t=l;e.headers.get("accesstoken")||(e=e.clone({setHeaders:{Authorization:`${t}`}}))}if(e.url.includes("containers/api-business/download")){const r=this.cache.get(e.url);return r?(0,i.of)(r.clone()):t.handle(e).pipe((0,a.b)(t=>{t instanceof n.Zn&&(this.cache.set(e.url,t.clone()),this._authSer.bussCache.next(this.cache))}),(0,s.K)(e=>{throw e}),(0,o.x)(()=>{}))}return t.handle(e)}}return e.\u0275fac=function(t){return new(t||e)(l.LFG(c.$h))},e.\u0275prov=l.Yz7({token:e,factory:e.\u0275fac}),e})();var u=r(16304),p=r(89647),h=r(54391),g=r(34115);let m=(()=>{class e{constructor(e,t,r){this.authenticationService=e,this.router=t,this.toastr=r}intercept(e,t){var r=this;const o=t?.handle(e);return o?o.pipe((0,a.b)(function(){var t=(0,u.Z)(function*(t){if(t instanceof n.Zn&&t?.body?.error){const n=t.body.error;if(401===n.statusCode||499===n.statusCode)r.authenticationService.isSessExpInProg.getValue()||(e?.url?.includes("users/login")||e?.url?.includes("odooips/proxyCheck")||r.authenticationService.isSessExpInProg.next(!0),r.authenticationService.currentUserValue?yield r.authenticationService.clearUserDataNavLogin():yield r.authenticationService.navLogin());else if(403==n.statusCode)r.toastr.error("Bad Request");else{if(404===n.status||400===n.status)return(0,p._)(n);499==n.status&&r.router.navigate(["/maintenance"])}}});return function(e){return t.apply(this,arguments)}}()),(0,s.K)(e=>(0,p._)(e))):(0,i.of)({})}}return e.\u0275fac=function(t){return new(t||e)(l.LFG(c.$h),l.LFG(h.F0),l.LFG(g.o))},e.\u0275prov=l.Yz7({token:e,factory:e.\u0275fac}),e})();function f(e){return t=>{const r=t.controls[e];if(!r.errors&&r.value)return 0===(r.value||"").trim().length?void r.setErrors({badValue:!0}):void r.setErrors(null)}}function v(e){return t=>t.value&&isFinite(parseFloat(t.value))?parseFloat(t.value)>e?null:{greaterThan:!0}:null}var _=r(14951),S=r(71178);let b=(()=>{class e{constructor(e,t,r,n){this._authSer=e,this.spinnerSadad=t,this.router=r,this.injector=n,this.cache=new Map,this.skipErrorAPIList=["containers/fetchDocumentOcr","api/log-request","odooips/proxyCheck","users/login","banks/findOne","containers/api-businesslogo/download","userbusinesses/genGatewayCredentials","userbusinesses/toggleGatewayMode","/merchantshopifies/","assets/i18n","firebase/events"],this.spinnerNames=["appCompLoader","editprodloader","createprodloader","otpLoader","docLoader","headerspinner","otpLoader"],this.lastNetworkToastAt=0,this.currLang=localStorage.getItem("selectedLang")}intercept(e,t){const r=e.body;this.currLang=localStorage.getItem("selectedLang");const n=t?.handle(e);return n?e?.url?n.pipe((0,a.b)(e=>{}),(0,s.K)(t=>{const n=this.injector.get(c.$P),i=this.swallowUnhandledNetworkError(t,n);if(i)return i;let a="",s=!1,o=!1,l=!0;if(l=this.isShowToastError(t,r,l,e),t){const e=t?.error?.error||t;401===e?.statusCode||401===e?.status||401===t?.status||499===e?.statusCode||499===t?.status?this._authSer.isSessExpInProg.getValue()||(t?.url?.includes("users/login")||t?.url?.includes("odooips/proxyCheck")||this._authSer.isSessExpInProg.next(!0),this._authSer.currentUserValue?this._authSer.clearUserDataNavLogin():this._authSer.navLogin(),a=`4xx - ${e.statusCode}`,s=!0,o=!0):403==e.statusCode?(l&&n.disTransErrMsg("Bad Request"),a=`4xx - ${e.statusCode}`,s=!0,o=!0):404===e?.status||400===e?.status?(a=`4xx - ${e.status}`,s=!0,o=!0):499==t?.status?(a=`4xx - ${t.status}`,s=!0,this.router.navigate(["/maintenance"]),o=!0):(e?.statusCode||e?.status)>=400&&(e?.statusCode||e?.status)<500?(a=`4xx - ${e?.statusCode}`,s=!0,o=!0):(e?.statusCode||e?.status)>=500?(a=`5xx - ${e?.statusCode}`,o=!0):(a=`xxx - ${e?.statusCode||"xxx"}`,o=!0)}if(o){a||(a="5xx - gatewayTimeoutErrLog");let e="Error!";const i=n?.handleServiceUnavailableError(t);if(i)e=i;else if(n?.checkNetConnErr(t))e="INTERNET_CONNECTIVITY_ERROR";else if("application/json"==t?.error?.type&&"function"==typeof t?.error?.text){const e=l;l=!1,t?.error?.text().then(r=>{try{const i=JSON.parse(r),a=i?.error?.message||i?.message;a&&e&&n.disDynmcTransErrMsg({resErrMsg:a,position:this.getErrToastrPosition(t)})}catch(i){}})}else e=("ar"===this.currLang?t?.error?.error?.message_ar||t?.error?.message_ar||t?.message||t?.error?.error?.message||t?.error?.message||t?.message:t?.error?.error?.message||t?.error?.message||t?.message)||"Error!";this.hideAllLoaders(l);let s=this.getLogData(r,t);if(t?.status||0==t?.status||t?.message){let i=t?.url||"";JSON.stringify(r).includes('"name":"notificationreceivers"')||t?.url?.includes("/notificationreceivers")?i="notificationreceivers":l&&n.disDynmcTransErrMsg({resErrMsg:e,position:this.getErrToastrPosition(t)}),t?.url?.includes("api/log-request")||n?.checkNetConnErr(t)||this._authSer.writeErrorLog(s,a,i).then(e=>{})}else l&&n.disDynmcTransErrMsg({resErrMsg:e,position:this.getErrToastrPosition(t)})}else this.hideAllLoaders(l);return 401===t?.status||401===t?.error?.error?.statusCode||401===t?.error?.error?.status?_.E:(0,p._)(()=>t)}
1),(0,o.x)(()=>{})):n:(0,i.of)({})}swallowUnhandledNetworkError(e,t){if(0!==e?.status)return null;this.hideAllLoaders(!0);const r=e?.error instanceof ProgressEvent&&"abort"===e.error.type,n=e?.url?.includes("api/log-request")||e?.url?.includes("assets/i18n");return r||n||this.showNetworkUnreachableToast(t,e),_.E}showNetworkUnreachableToast(e,t){const r=Date.now();if(r-this.lastNetworkToastAt<8e3)return;this.lastNetworkToastAt=r;let n="UNABLE_TO_CONNECT_SERVER_NETWORK_VPN";e?.checkNetConnErr(t)&&(n="INTERNET_CONNECTIVITY_ERROR"),e.disDynmcTransErrMsg({resErrMsg:n,duration:6e3,position:""})}isShowToastError(e,t,r,n){return this.skipErrorAPIList.some(t=>e?.url?.includes(t))&&(r=!1,e?.url?.includes("users/login")&&!t?.signinForSignup&&(r=!0)),n.url.endsWith("/withdrawalrequests")&&"post"==n.method.toLowerCase()&&"e0001"==e.error.error.error_code&&(r=!1),r}isErrorLogAllowed(){return!1}getErrToastrPosition(e){try{return new URL(e?.url).pathname.endsWith("/reporthistories")?"end":""}catch(t){return""}}hideAllLoaders(e){e&&(this.spinnerSadad.hide(),this.spinnerNames.forEach(e=>{this.spinnerSadad.hide(e)}))}getLogData(e,t){let r=JSON.stringify(e);return["users/login","users/resetPwd","users/createSubMerchant"].some(e=>t?.url?.includes(e))&&(r=""),{requestBody:r,errResponse:JSON.stringify(t)}}}return e.\u0275fac=function(t){return new(t||e)(l.LFG(c.$h),l.LFG(S.t2),l.LFG(h.F0),l.LFG(l.zs3))},e.\u0275prov=l.Yz7({token:e,factory:e.\u0275fac}),e})();function y(e){return t=>{const r=t.value;return r&&r&&r<e?{minlimit:!0}:null}}var w=r(22805);let I=null;function T(){return I||(I=w.PhoneNumberUtil.getInstance()),I}function E(e){return t=>{const r=t?.value;if(null==r||""===String(r).trim())return null;try{const t=T().parse(String(r),e);return T().isValidNumberForRegion(t,e)?null:{invalidPhone:!0}}catch{return{invalidPhone:!0}}}}r(54616);var A=r(67136);let $=(()=>{class e{handleError(e){if(this.isChunkOrSyntaxLoadErrorVal(e)||this.isPostEventBridgeErrorVal(e)||this.isDisableWebkitEnterFullscreenErrorVal(e)||this.isJavaObjectGoneErrorVal(e)||(0,A.U$)(e)||(0,A.VA)(e)){if(this.isChunkOrSyntaxLoadErrorVal(e)){console.warn("ChunkLoadError detected due to new deployment asset hashes. Reloading page...");const e=sessionStorage.getItem("chunk_error_reload"),t=Date.now();if(!e||t-parseInt(e,10)>1e4)return sessionStorage.setItem("chunk_error_reload",t.toString()),void window.location.reload()}}else console.error("Unhandled Application Error:",e)}isChunkOrSyntaxLoadErrorVal(e){const t=e?.message||e?.toString()||"";return/Loading chunk [\d]+ failed|Failed to fetch dynamically imported module|Importing a module script failed|Unexpected token/i.test(t)}isPostEventBridgeErrorVal(e){const t=e?.message||e?.toString()||"";return/postEvent/i.test(t)||/Method not found/i.test(t)}isDisableWebkitEnterFullscreenErrorVal(e){const t=e?.message||e?.toString()||"";return/disableWebkitEnterFullscreen/i.test(t)}isJavaObjectGoneErrorVal(e){const t=e?.message||e?.toString()||"";return/Java object is gone/i.test(t)||/sendDataToNative/i.test(t)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=l.Yz7({token:e,factory:e.\u0275fac}),e})();const C={"E-100":{code:"E-100",i18nKey:"OTP_VERIFICATION_FAILED_TRY_AGAIN"},"E-101":{code:"E-101",i18nKey:"OTP_VERIFICATION_FAILED_TRY_AGAIN"},"E-102":{code:"E-102",i18nKey:"OTP_VERIFICATION_FAILED_TRY_AGAIN"},"E-103":{code:"E-103",i18nKey:"OTP_VERIFICATION_FAILED_TRY_AGAIN"}};function P({errCodeVal:e="E-100",customBaseKeyVal:t="",translateServiceParamVal:r=null}={}){const n=t||(C?.[e]||C?.["E-100"])?.i18nKey||"OTP_VERIFICATION_FAILED_TRY_AGAIN";if(r?.instant)try{const t=r.instant(n);if(t&&t!==n)return`${t} (Code: ${e})`}catch(i){}return`${n} (Code: ${e})`}},54616:function(e,t,r){"use strict";r.d(t,{sz:function(){return i},_H:function(){return a},dq:function(){return o},ml:function(){return l},i4:function(){return c},Y:function(){return d}});var n=r(29609);function i(){const e=new Intl.DateTimeFormat("en-CA",{timeZone:"Asia/Qatar",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).formatToParts(new Date),t=t=>e.find(e=>e.type===t)?.value??"",r=t("year"),n=t("month"),i=t("day");let a=t("hour");"24"===a&&(a="00");const s=`${r}-${n}-${i}`,o=`${a}:${t("minute")}:${t("second")}`;return{date:s,time:o,dateTime:`${s} ${o}`}}function a(e,t="YYYY-MM-DD"){return!!e&&n(e,t).format("YYYY-MM-DD")===i().date}function s(e,t="YYYY-MM-DD",r="23:59:59"){if(!e)return"";const s=n(e,t).format("YYYY-MM-DD");return a(s,"YYYY-MM-DD")?`${s} ${i().time}`:`${s} ${r}`}function o(e){const[t,r=""]=e.split("/"),n=r||t;return e.includes(":")?{startDateTime:t.trim(),endDateTime:n.trim()}:{startDateTime:`${t} 00:00:00`,endDateTime:s(n)}}function l(){return`00:00:00-${i().time}`}function c(e="00:00:00",t=!0){return`${e}-${t?i().time:"23:59:59"}`}function d(e,t){return new Date(`03/21/1989 ${e}`).getTime()<=new Date(`03/21/1989 ${t}`).getTime()?e:t}},25160:function(e,t,r){"use strict";function n(e){return!0===e||1===e||"string"==typeof e&&["1","true","yes"].includes(e.trim().toLowerCase())}function i(e){return 1===e?.shipping_and_delivery_enable_disable}function a(e){return!!e&&n(void 0!==e.admin_shipping_allowed?e.admin_shipping_allowed:e.is_shipping_enabled)}function s(e){return`/dashboard/${"pos"===e?"pos":"online-payment"}-default`}function o(e){return n(e?.global_allow_delivery_promotion)}function l(e){return n(e?.global_allow_international)}function c(e){return n(e?.delivery_promotion?.enabled)}function d(e){const t=Number(e?.shipping_rate);return!Number.isNaN(t)&&t>0}function u(e,t,r){return null===function(e,t,r){return r?function(e,t){const r=e?.global_allowed_methods;return!!r?.length&&r.includes(t)}(e,t)?a(e)?i(e)?null:"merchant_off":"admin_locked":"global_method":"permission"}(e,t,r)}function p(e,t,r){return u(e,t,r)}function h(e,t,r){return!!(t&&u(e,"invoice",t)&&o(e)&&c(e)&&r)}function g(e,t,r){return!!(u(e,"invoice",t)&&r&&d(e))}function m(e,t,r,n){return!!(g(e,t,r)&&h(e,t,r)&&n)}function f(e,t,r,n){return!!(u(e,r,t)&&n&&d(e))}function v(e,t,r){return u(e,t,r)}function _(e){return!i(e)||!o(e)}function S(e){return!i(e)||!l(e)}function b(e){const t={...e};return t.isShipping=!1,delete t.pickup_source_address_loc_id,delete t.package_weight,delete t.product_type,t}function y(e,t,r,n){const i={...e},a=!!i.isShipping,s=!!n?.preserveExistingShipping,o=!!n?.preserveExistingDeliveryPromotion;if(!u(t,"invoice",r)&&!s){const e=b(i);return e.isDeliveryPromotion=!1,e}const l=h(t,r,a);return l||o?o&&!l||(i.isDeliveryPromotion=!(!a||!i.isDeliveryPromotion)):i.isDeliveryPromotion=!1,a||s?i:b(i)}function w(e,t,r,n){return!(!h(e,t,r)||!n)}function I(e,t,r,n){return{showSection:u(e,"invoice",t),showDeliveryPromotion:h(e,t,r),showDeliveryPromotionPolicy:w(e,t,r,n),showInvoiceShippingCost:g(e,t,r),isPromotionAppliedToTotal:m(e,t,r,n)}}function T(e,t,r,n=!1){const i={...e};return(u(t,"store_link",r)||n)&&i.isShipping?i:b(i)}function E(e,t,r,n,i){return!!i&&!u(t,r,n)&&(function(e,t){e.get("isS
1hipping")?.setValue(!1,{emitEvent:!1}),e.get("pickup_source_address_loc_id")?.setValue(null,{emitEvent:!1}),e.get("package_weight")?.setValue("",{emitEvent:!1}),e.get("product_type")?.setValue(null,{emitEvent:!1}),"invoice"===t&&e.get("isDeliveryPromotion")?.setValue(!1,{emitEvent:!1})}(e,r),!0)}function A(e,t,r){const a=n(e?.isShipping),s=n(e?.isDeliveryPromotion),l=function(e){if(!e)return null;if("string"==typeof e)try{const t=JSON.parse(e);return t&&"object"==typeof t?t:null}catch{return null}return"object"==typeof e?e:null}(e?.shipping_settings_snapshot);let d,u;return l?(d=t&&n(l.shipping_enabled),u=t&&n(l.delivery_promotion_enabled)&&a,u&&[1,2].includes(e?.invoicestatusId)&&(u=i(r)&&o(r)&&c(r))):(d=t&&a,u=t&&s),{showShippingRow:d,showPromotionRow:u,showShippingDetails:d&&a,storedShipping:a,storedPromotion:s}}r.d(t,{wt:function(){return n},Ti:function(){return a},yR:function(){return s},sm:function(){return o},r:function(){return l},_O:function(){return u},vg:function(){return p},W2:function(){return f},AU:function(){return v},yu:function(){return _},g3:function(){return S},WZ:function(){return y},Rr:function(){return I},Rt:function(){return T},_k:function(){return E},LL:function(){return A}})},7491:function(e,t,r){"use strict";r.d(t,{ql:function(){return p},Ex:function(){return f},r2:function(){return h},A:function(){return v},IR:function(){return m},Uw:function(){return i},AS:function(){return _},Kd:function(){return b},EO:function(){return d},aC:function(){return g},yG:function(){return w}});var n=r(35366);let i=(()=>{class e{transform(e,t){if(!e||"string"!=typeof e)return"";let r=6;t&&"number"==typeof t&&(r=t);let n="*".repeat(r);return e.length<=r?n:n+e.substring(e.length-r)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=n.Yjl({name:"hideChar",type:e,pure:!0}),e})();var a=r(97425),s=r(82391),o=r(42693);let l=(()=>{class e{constructor(e){this.http=e}get(e){return new s.y(t=>{let r=null;return this.http.get(e,{responseType:"blob"}).subscribe(e=>{r=URL.createObjectURL(e),t.next(r)},e=>{t.error(e)}),()=>{r&&(URL.revokeObjectURL(r),r=null)}})}}return e.\u0275fac=function(t){return new(t||e)(n.LFG(o.eN))},e.\u0275prov=n.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var c=r(99624);let d=(()=>{class e{constructor(e,t,r){this._ref=e,this.urlHelperService=t,this.sanitizer=r,this._latestValue=null,this._latestReturnedValue=null,this._subscription=null,this._obj=null,this._result=new a.X(null),this.result=this._result.asObservable(),this._internalSubscription=null}ngOnDestroy(){this._subscription&&this._dispose()}transform(e){let t=this.internalTransform(e);return this.asyncTrasnform(t)}internalTransform(e){return e?(this.previousUrl!==e&&(this.previousUrl=e,this._internalSubscription=this.urlHelperService.get(e).subscribe(e=>{let t=this.sanitizer.bypassSecurityTrustUrl(e);this._result.next(t)},e=>{})),this.result):this.result}asyncTrasnform(e){return this._obj?e!==this._obj?(this._dispose(),this.asyncTrasnform(e)):this._latestValue===this._latestReturnedValue?this._latestReturnedValue:(this._latestReturnedValue=this._latestValue,n.qW0.wrap(this._latestValue)):(e&&this._subscribe(e),this._latestReturnedValue=this._latestValue,this._latestValue)}_subscribe(e){var t=this;this._obj=e,this._subscription=e.subscribe({next:function(r){return t._updateLatestValue(e,r)},error:e=>{throw e}})}_dispose(){this._subscription.unsubscribe(),this._internalSubscription&&this._internalSubscription.unsubscribe(),this._internalSubscription=null,this._latestValue=null,this._latestReturnedValue=null,this._subscription=null,this._obj=null}_updateLatestValue(e,t){e===this._obj&&(this._latestValue=t,this._ref.markForCheck())}}return e.\u0275fac=function(t){return new(t||e)(n.Y36(n.sBO,16),n.Y36(l,16),n.Y36(c.H7,16))},e.\u0275pipe=n.Yjl({name:"secure",type:e,pure:!1}),e})();var u=r(61116);let p=(()=>{class e{transform(e,t,r){return 0===e?t&&"z_dec"==t?"0.00":"0":e?`${e=Number.isInteger(e)?(0,u.uf)(e,"ar"):(0,u.uf)(e,"ar","1.2-2")}`:r?"":"0"}}return e.\u0275fac=function(t){return new(t||e)}
1,e.\u0275pipe=n.Yjl({name:"formatAmount",type:e,pure:!0}),e})(),h=(()=>{class e{transform(e,t,r){return e?e=e.includes("T")&&e.includes("Z")?(0,u.p6)(e,"d MMM y, H:mm:ss","en","+000"):(0,u.p6)(e,t&&"date_only"==t?r||"d MMM y":"d MMM y, H:mm:ss","en"):"NA"}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=n.Yjl({name:"formatDate",type:e,pure:!0}),e})(),g=(()=>{class e{transform(e,t){return 0===e?0:e||"NA"}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=n.Yjl({name:"zeroValue",type:e,pure:!0}),e})(),m=(()=>{class e{transform(e,t){if(e){if("master"==e&&(e+=" Card"),e.includes(",")){let t=[];return e.split(",").forEach(e=>{let r=(e=e.toLowerCase()).substr(0,1).toUpperCase()+e.substr(1);"Mastercard"==r&&(r="Master Card"),t.push(r)}),t.join().replace(",",", ")}return e}return"NA"}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=n.Yjl({name:"formatPayMethod",type:e,pure:!0}),e})(),f=(()=>{class e{transform(e,t){return e?("debit"!=e&&"credit"!=e&&"DEBIT"!=e&&"CREDIT"!=e||(e+=" Card"),e.includes(",")?e.replace(",",", "):e):"NA"}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=n.Yjl({name:"formatCardType",type:e,pure:!0}),e})(),v=(()=>{class e{transform(e,t){return e&&"wpos-3 x"===e?.toLowerCase()?"WPOS-3":e}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=n.Yjl({name:"formatDeviceType",type:e,pure:!0}),e})(),_=(()=>{class e{transform(e,t,r){return"string"!=typeof e||void 0===t||void 0===r?e:e.replaceAll(t,r)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=n.Yjl({name:"replace",type:e,pure:!0}),e})();var S=r(35379);let b=(()=>{class e{transform(e,t,r,n){if("tmode"==n)return[3,4,5].includes(t?.id)?r:t?.name;if("pmeth"==n){let e=S.kO,t="";return t="SADAD PAY"==r?"assets/images/pos-panel/payment-methods/sadad-pay.svg":"APPLE PAY"==r?"assets/images/pos-panel/payment-methods/apple-pay.svg":"GOOGLE PAY"==r?"assets/images/pos-panel/payment-methods/google-pay.svg":this.getSdSerPayLogoPath(r,e),t}}getSdSerPayLogoPath(e,t){let r=t?.[e]?.svg||(e?.toUpperCase?t?.[e?.toUpperCase()]?.svg:void 0);return r?`assets/images/pos-panel/payment-method/${r}.svg`:""}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=n.Yjl({name:"sdSerTraxMode",type:e,pure:!0}),e})();var y=r(60649);let w=(()=>{class e{constructor(e){this.translate=e}transform(e,t){if(!e||"string"!=typeof e||!e?.trim?.())return e||"";let r="";try{r=this.translate?.instant?.(`${e}`)||e}catch(n){r=e}return"string"==typeof r&&(r=r.replace("dynamic_field_a",t)),r}}return e.\u0275fac=function(t){return new(t||e)(n.Y36(y.sK,16))},e.\u0275pipe=n.Yjl({name:"tooltipDynTrans",type:e,pure:!1}),e})()},17188:function(e,t,r){"use strict";r.d(t,{B:function(){return l}});var n=r(35366),i=r(529),a=r(91681),s=r(42693),o=r(52105);let l=(()=>{class e{constructor(e,t){this.http=e,this._authService=t,this.profileUpdate=new n.vpe,this.containerMap={banks:"api-banks",businessDoc:"api-business",privacyDoc:"privacy-policy"}}getBankDetails(e){return this.http.get(`${this._authService.updSNAEnvURL("v5")}userbanks?filter[where][userId]=${e}&filter[include]=bank`)}getBankTransactionDetails(e,t){var r={name:"withdrawalrequests",method:"GET"};return r.data=`filter[where][userId]=${1===this._authService.currentUserValue.roleId?this._authService.currentUserValue.id:this._authService.currentUserValue.mainMerchantId}&filter[where][userbankId]=${e}&filter[skip]=0&filter[limit]=10`,this.http.get(`${this._authService.updSNAEnvURL("v6")}${r.name}?${r.data}`)}createBank(e){var t={name:"userbanks",method:"POST"};return t.data=e,this.http.post(`${this._authService.updSNAEnvURL("v5")}${t.name}`,t.data)}deleteBank(e){var t={};return t.name=`userbanks/${e}`,t.method="DELETE",this.http.delete(`${this._authService.updSNAEnvURL("v5")}${t.name}`)}uploadAuthorizationLetter(e){let t=e.name.lastIndexOf(".");const r=new FormData;return r.append("file",e,e.name.slice(0,t).replaceAll(".","_")+e.name.slice(t,e.name.length)),this.http.post(`${this._authService.updSNAEnvURL("v6")}upload_image/api-banks`,r)}getBusinessDetail(e){var t={name:"userbusinesses",method:"GET"};return t.data=`filter[where][userId]=${e}&filter[include]=businessmedia&filter[include]=businesstypes`,this.http.get(`${this._authService.updSNAEnvURL("v5")}${t.name}?${t.data}`)}editBusinessInfo(e,t){return this.http.patch(`${this._authService.updSNAEnvURL("v5")}userbusinesses/${t}`,e).pipe((0,a.U)(e=>(this.profileUpdate.emit(),this._authService.getVerifications(),e)))}addBusinessInfo(e){const t={name:"userbusinesses",method:"POST",data:e};return this.http.post(`${this._authService.updSNAEnvURL("v5")}${t.name}`,t.data).pipe((0,a.U)(e=>(this.profileUpdate.emit(),e)))}uploadBusinessFiles(e){let t=e.name.lastIndexOf(".");const r=new FormData;return r.append("file",e,e.name.slice(0,t).replaceAll(".","_")+e.name.slice(t,e.name.length)),this.http.post(`${this._authService.updSNAEnvURL("v6")}upload_image/api-business`,r)}uploadBusinessLogo(e,t){const r=new FormData;let n=t.lastIndexOf(".");return r.append("file",e,t.slice(0,n).replaceAll(".","_")+t.slice(n,t.length)),this.http.post(`${this._authService.updSNAEnvURL("v6")}upload_image/api-businesslogo`,r)}
1sendOtpForPersonalDetails(e=this._authService.currentUserValue.cellnumber){const t={name:"userbusinesses/sendotp",method:"POST",data:{newCellnumber:e}};return this.http.post(`${this._authService.updSNAEnvURL("v5")}${t.name}`,t.data)}getNotificationDetails(e){return this.http.get(`${this._authService.updSNAEnvURL("v6")}/usermetapreferences?filter[where][userId]=${e}`)}updateNotification(e,t){return this.http.post(`${this._authService.updSNAEnvURL("v6")}/usermetapreferences/update?where[userId]=${t}`,e)}changePrimaryBank(e,t){var r={};return r.name=`userbanks/${e}`,r.method="PATCH",r.data={primary:t},this.http.patch(`${this._authService.updSNAEnvURL("v5")}${r.name}`,r.data)}download(e,t=1){return 1===t?this.http.get(`${this._authService.updSNAEnvURL("v5")}containers/api-banks/download/${e}`,{observe:"response",responseType:"blob"}).pipe((0,a.U)(e=>new Blob([e?.body]))):this.http.get(`${this._authService.updSNAEnvURL("v5")}containers/api-business/download/${e}`,{observe:"response",responseType:"blob"}).pipe((0,a.U)(e=>new Blob([e?.body])))}downloadOpen(e,t=1,r=""){this.requestUrl=`${this._authService.updSNAEnvURL("v5")}containers/api-business/download/${e}`;let n="application/pdf";return r&&"pdf"!=r&&(n=`image/${r}`),this.http.get(this.requestUrl,{responseType:"blob",observe:"response"}).pipe((0,a.U)(e=>new Blob([e?.body],{type:n})))}getBankId(e){var t={method:"GET",name:"banks"};return t.data=`filter[where][ibannumber]=${e}`,this.http.get(`${this._authService.updSNAEnvURL("v5")}${t.name}?${t.data}`)}reverificationOfBankDetails(e,t){var r={};return r.name=`userbanks/${t}`,r.method="PATCH",r.data=e,this.http.patch(`${this._authService.updSNAEnvURL("v5")}${r.name}`,r.data)}getImage(e){return this.http.get(e,{responseType:"blob"})}getEncrypetedCode(e){var t={};return t.id=e,this.http.post(`${i.N.encryptUrl}`,JSON.stringify(t))}getEncrypetedCodeNormal(e){var t={};return t.id=e,this.http.post(`${i.N.encryptUrlNormal}`,JSON.stringify(t))}getCounter(){return this.http.get(`${this._authService.updSNAEnvURL("v5")}users/myAccountCounters`)}getImageConfidence(e){const t=new FormData;return t.append("file",e,e.name),this.http.post(`${i.N.ocrAPIUrl}api/containers/fetchImageConfidence`,t)}getDocumentOCR(e,t){const r=(new s.WM).set("type",t.toString()),n=new FormData;return n.append("file",e,e.name),this.http.post(`${i.N.ocrAPIUrl}api/containers/fetchDocumentOcr`,n,{headers:r})}getFraudDetection(e){const t=new FormData;return t.append("file",e,e.name),this.http.post(`${i.N.ocrAPIUrl}api/containers/identityDocumentProofing`,t)}getBankLogo(e){var t={name:"banks/findOne",method:"GET"};return t.data=`filter[where][ibannumber]=${e}`,this.http.get(`${this._authService.updSNAEnvURL("v5")}${t.name}?${t.data}`)}upateBusinessProfile(e){return this.http.patch(`${i.N.apiUrlv7}userbusinesses/update_profile`,e).pipe((0,a.U)(e=>(this.profileUpdate.emit(),this._authService.getVerifications(),e)))}callAcceptPrivacyPolicy(e){var t={name:"users/privacy-policy/accept"};return t.data=e,this.http.put(`${i.N.apiUrlv7}${t.name}`,t.data)}downloadContainerFile(e,t=""){return this.http.get(`${i.N.apiUrlv7}containers/${this.containerMap[t]}/download/${e}`,{observe:"response",responseType:"blob"}).pipe((0,a.U)(e=>new Blob([e?.body])))}}return e.\u0275fac=function(t){return new(t||e)(n.LFG(s.eN),n.LFG(o.$))},e.\u0275prov=n.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},52105:function(e,t,r){"use strict";r.d(t,{$:function(){return y}});var n=r(16304),i=r(35366),a=r(97425),s=r(49234),o=r(32041),l=r(9153),c=r(91681),d=r(69056),u=r(69568),p=r(51816);class h{}var g=r(529),m=r(65595),f=r(63908),v=r(50243),_=r(42693),S=r(34115),b=r(54391);let y=(()=>{class e{constructor(e,t,r,n){this.http=e,this._toster=t,this.injector=r,this.router=n,this.onBankVerificationFailed=new i.vpe,this.onBussinessVerificatonFailed=new i.vpe,this.vpnCheckCall=new i.vpe,this.vpnEventEmitter=new i.vpe,this.docExpiryNotiEveEmit=new i.vpe,this.isVpnProxy=new a.X(!1),this.bussCache=new a.X(new Map),this.sideBarEventEmiter=new i.vpe,this.isSessExpInProg=new a.X(!1),this.currIpAdd="",this.currentUserSubject=ne
1w a.X(this.getData("currentUser")),this.currentUser=this.currentUserSubject.asObservable(),this.appDeveloperSubject=new a.X(this.getData("tempData")),this.appDeveloper=this.appDeveloperSubject.asObservable(),this.LoginUserSubject=new a.X(this.getData("loginUser")),this.LoginUser=this.LoginUserSubject.asObservable()}get bussCacheValue(){return this.bussCache.value}get currentUserValue(){return this.currentUserSubject.value}get loginUserValue(){return this.LoginUserSubject.value}get appDeveloperValue(){return this.appDeveloperSubject.value}getLoginPayloadDataObj(e="",t="",r=!1){return 1==r?{signinForSignup:!0}:{cellnumber:e,password:t,signinForSignup:r||!1}}login(e="",t="",r=!1){1==r&&(localStorage.removeItem("currentUser"),this.currentUserSubject.next(null),this.currentUserSubject.complete());const n={name:"users/login",method:"POST",data:this.getLoginPayloadDataObj(e,t,r)};return this.http.post(`${g.N.apiUrlv7}${n.name}`,n.data).pipe((0,c.U)(e=>{if(e&&e.id){let t=new h;if(t.token=e.id,1==r){let t=this.getData("tempData");t?(t.appDevToken=e.id,localStorage.setItem("tempData",this.encrypt(JSON.stringify(t))),this.appDeveloperSubject.next(e.id)):(localStorage.setItem("tempData",this.encrypt(JSON.stringify({appDevToken:e.id}))),this.appDeveloperSubject.next(e.id))}this.currentUserSubject.next(t)}return e},(0,d.q)(1)))}clearUserData(){var e=this;return(0,n.Z)(function*(){return new Promise((t,r)=>{e.currentUserSubject.next(null),localStorage.removeItem("currentUser"),t()})})()}clearLoginUserData(){var e=this;return(0,n.Z)(function*(){return new Promise((t,r)=>{e.LoginUserSubject.next(null),localStorage.removeItem("loginUser"),t()})})()}clearUserDataNavLogin(){var e=this;return(0,n.Z)(function*(){return new Promise((t,r)=>{e.resetAuthUserSession(),setTimeout(()=>{e.router.navigate(["/auth/login"])},450),t()})})()}resetAuthUserSession(){localStorage.removeItem("currentUser"),this.currentUserSubject.next(null),localStorage.removeItem("loginUser"),this.LoginUserSubject.next(null),localStorage.removeItem("sadad_dyn_session_key"),sessionStorage.removeItem("sadad_dyn_session_key")}navLogin(){var e=this;return(0,n.Z)(function*(){setTimeout(()=>{e.router.navigate(["/auth/login"])},450)})()}findOne(e){return this.http.post(`${g.N.fastifyUrlv6}`,JSON.stringify({name:"users/findOne",method:"GET",data:`filter[where][cellnumber]=${e}`,decrypt:!0,apiVer:"v7"})).pipe((0,c.U)(e=>e&&!e?.error?this.safeDecryptFastifyData(e?.data,this.loginUserValue?.fastifyEncryptionKey):e,(0,d.q)(1)))}verifyOtp(e,t){let r={name:"usermetaauths/verify",method:"POST",data:{otp:e,userId:t},f_encrypt:!0,apiVer:"v6"};return r=this.updSNAEnvData(r,"v6"),this.http.post(`${g.N.fastifyUrlv6}`,JSON.stringify(r)).pipe((0,c.U)(e=>e?.error?e?.error:e=this.safeDecryptFastifyData(e?.data)))}saveAuthCurrentUser(e){var t=this;return(0,n.Z)(function*(){if(!e)return;t.safeSetVerifiedUserFlagStateVal(e,!0),localStorage.removeItem("currentUser");let r=e;r&&(r.token=t.currentUserSubject.getValue()?.token),t.currentUserSubject.next(null),t.currentUserSubject.complete(),t.setDataWthoutPromise("currentUser",r),t.currentUserSubject=new a.X(yield t.getData("currentUser")),t.currentUser=t.currentUserSubject.asObservable(),t.currentUserSubject.next(r),t.logFirebaseLoginEvent(r);const n=(0,s.H)(5e3);(yield t.getMetaPrefData()).pipe((0,u.R)(n)).subscribe(e=>{t.safeAssignUserMetaPrefFieldsVal(t.currentUserValue,e),t.currentUserValue&&(t.setData("currentUser",t.currentUserValue),t.currentUserSubject.next(t.currentUserValue))})})()}logFirebaseLoginEvent(e){try{this.injector.get(f.$)?.logPanelEvent("Login_event","LoginComponent",{SadadId:(1==e?.roleId?e?.SadadId:e?.mainMerchantSadadId||e?.SadadId)||void 0})}catch(t){console.error("logFirebaseLoginEvent error in AuthenticationService:",t)}}getMetaPrefData(){var e=this;return(0,n.Z)(function*(){const t=`filter[where][userId]=${e.currentUserValue?.
1id}&filter[fields][previouslogindatetime]=true&filter[fields][isallowedtomangeprivatepublicaccess]=true&filter[fields][isallowedtoaddsubmerchant]=true`;return e.http.get(`${e.updSNAEnvURL("v6")}usermetapreferences?${t}`)})()}getMetaPrefData_Direct(){const e=`filter[where][userId]=${this.currentUserValue?.id}&filter[fields][previouslogindatetime]=true&filter[fields][isallowedtomangeprivatepublicaccess]=true&filter[fields][isallowedtoaddsubmerchant]=true`;return this.http.get(`${this.updSNAEnvURL("v6")}usermetapreferences?${e}`)}setData(e,t){return Promise.resolve().then(()=>{localStorage.setItem(e,this.encrypt(JSON.stringify(t)))})}setDataWthoutPromise(e,t){localStorage.setItem(e,this.encrypt(JSON.stringify(t)))}getData(e){let t=localStorage.getItem(e);if(t)try{let e=this.decrypt(t);if(e)return JSON.parse(e)}catch(r){return null}return null}decrypt(e){if(!e)return"";try{let t=this.getDynamicLocalStorageSessionKey();return m.AES.decrypt(e,t)?.toString(m.enc.Utf8)||""}catch(t){return""}}encrypt(e){let t=this.getDynamicLocalStorageSessionKey();return m.AES.encrypt(e,t)?.toString()}logout(){return this.http.post(`${this.updSNAEnvURL("v5")}users/logout`,{}).pipe((0,c.U)(e=>(localStorage.removeItem("currentUser"),this.currentUserSubject.next(null),localStorage.removeItem("loginUser"),this.LoginUserSubject.next(null),this._toster.dismissAllAlert(),this.router.navigate(["/auth/login"],{replaceUrl:!0}),e||{})),(0,p.K)(e=>(0,o.of)(e||{})))}restPasswordRequest(e){const t={name:"users/reset",method:"POST",data:e};return this.http.post(`${g.N.apiUrlv7}${t.name}`,t.data)}resetPasswordVerifyOtp(e){const t={name:"users/verifyResetPassword",method:"POST",data:e};return this.http.post(`${g.N.apiUrlv7}${t.name}`,t.data).pipe((0,c.U)(e=>{if(e?.error)return e;{let t=new h;return t.token=e?.accessToken,this.currentUserSubject.next(t),e}}))}resetPasswordNew(e){const t={name:"users/resetPwd",method:"POST",data:e};return this.http.post(`${g.N.apiUrlv7}${t.name}`,t.data).pipe((0,c.U)(e=>(e&&!e?.error&&this.currentUserSubject.next(null),e)))}resndOTP(e){const t=`type=${e}`;return this.http.get(`${this.updSNAEnvURL("v5")}usermetaauths/resendotp?${t}`)}getBalance(){var e=this;return(0,n.Z)(function*(){let t=e.currentUserValue;var r={name:"usermetapersonals",method:"GET",apiVer:"v6"};return r.data=`filter[where][userId]=${1===e.currentUserValue.roleId?e.currentUserValue.id:e.currentUserValue.mainMerchantId}`,e.http.get(`${e.updSNAEnvURL("v6")}${r.name}?${r.data}`).subscribe(function(){var r=(0,n.Z)(function*(r){r?.error?e._toster.error(r?.error?.message||"Error!"):(t.fund=r?.[0]?.totalavailablefunds,e.currentUserSubject.next(t),yield e.setData("currentUser",t))});return function(e){return r.apply(this,arguments)}}())})()}getIPAddress(){var e=this;return(0,n.Z)(function*(){try{let t=yield e.getIpAddress_fastifypatch();return"preprod"==g.N.envType?{ip:"2402:a00:404:1bf1:74e5:4e3c:7bfc:d2f5"}:{ip:t}}catch(t){console.log("getIPAddress e:",t)}})()}getIpAddress_fastifypatch(){var e=this;return(0,n.Z)(function*(){const t=`${g.N.fastifyDomain}/api/ip-request`,r={key1:Date.now()},n={method:"POST",headers:{"ngsw-bypass":"true"},body:JSON.stringify(r)};try{const r=yield fetch(t,n);if(r.ok){let t=yield r.text();return t=JSON.parse(t),t?.ip&&(e.currIpAdd=t?.ip),t?.ip}{let n="";try{n=yield r.text(),n=JSON.parse(n)}catch(i){console.log("ip get err res else json parse error.",i)}const a={status:r?.status,statusText:r?.statusText,headers:JSON.stringify(r.headers),body:JSON.stringify(r.body),url:JSON.stringify(r.url),res:n};return 504==r?.status?(console.log("call api to store error log of 504 Gateway Timeout : ",r.status),console.log("Gateway Timeout Request Body:",a),e.writeErrorLog(J
1SON.stringify(a),"gatewayTimeoutErrLog-IPAddElse",t).then(e=>{console.log("writeErrorLog entry done successfully!")})):e.writeErrorLog(JSON.stringify(a),"getIpAddressErrLog-IPAddElse",t).then(e=>{console.log("writeErrorLog entry done successfully!")}),"error"}}catch(i){return i?.message&&i.message.includes("Request failed with status: 504")?(console.log("call api to store error log of 504 Gateway Timeout : ",i?.message),console.log("Gateway Timeout Request Body:",i.toString()),e.writeErrorLog(i.toString(),"gatewayTimeoutErrLog-IPAddCatch",t).then(e=>{console.log("writeErrorLog entry done successfully!")})):(console.error("Error:",i),e.writeErrorLog(i.toString(),"getIpAddressErrLog-IPAddCatch",t).then(e=>{console.log("writeErrorLog entry done successfully!")})),"error"}})()}callVPNProxy(e,t=!1){var r=this;return(0,n.Z)(function*(){var n={};let i=localStorage.getItem("currUserMob");n.name=t&&i?`odooips/proxyCheck?ipaddress=${e}&currUserMobValue=${i}`:`odooips/proxyCheck?ipaddress=${e}`,n.method="GET",n.data="";let a=yield(0,l.n)(r.http.get(`${g.N.apiUrlv7}${n.name}`));
1return("error"==a?.status||a?.error)&&r.writeErrorLog(JSON.stringify(a),"proxyCheckErrLog",n.name).then(e=>{console.log("writeErrorLog entry done successfully!")}),a.clientIP=e,a})()}getVerifications(){var e=this;return(0,n.Z)(function*(){let t=e.currentUserValue;t?.userbankstatusId?(t.bankVerified=t.userbankstatusId,1!=t.bankVerified&&e.onBankVerificationFailed.emit(!0),e.currentUserSubject.next(t)):(t.bankVerified=6,e.currentUserSubject.next(t),e.onBankVerificationFailed.emit(!0)),t?.userbusinessstatusId?(t.businessVerified=t.userbusinessstatusId,[1,3,4,6].includes(t.userbusinessstatusId)?!1!==t?.isVerifiedUser&&e.safeSetVerifiedUserFlagStateVal(t,!0):e.safeSetVerifiedUserFlagStateVal(t,!1),e.setData("currentUser",t),e.currentUserSubject.next(t),1!==t.userbusinessstatusId&&e.onBussinessVerificatonFailed.emit("true"),!1!==t?.isVerifiedUser&&e.safeSetVerifiedUserFlagStateVal(t,!0)):(e.onBussinessVerificatonFailed.emit("true"),e.safeSetVerifiedUserFlagStateVal(t,!1))})()}findByEmail(e){const t=`where[email]=${e}&where[agreement]=true `;return this.http.get(`${this.updSNAEnvURL("v6")}users/count?${t}`).pipe((0,c.U)(e=>e,(0,d.q)(1)))}findByPhone(e){const t=`where[cellnumber]=${e}&where[agreement]=true `;return this.http.get(`${this.updSNAEnvURL("v6")}users/count?${t}`).pipe((0,c.U)(e=>e,(0,d.q)(1)))}findByCRNumber(e){const t=`userbusinesses/checkCrNumber?merchantregisterationnumber=${e}`;return this.http.get(`${this.updSNAEnvURL("v5")}${t}`).pipe((0,c.U)(e=>e,(0,d.q)(1)))}getProductList(e,t="created",r="DESC",n=null){return this.encryptUrl({token:g.N.staticAPIToken,merchantid:e,isdisplayinpanel:1,order:[t+" "+r]},n)}encryptUrl(e,t=null){let r={text:e};return t&&(r.skipVPNCheck=t),this.http.post(`${g.N.encryptUrlNormal}`,r).pipe((0,c.U)(e=>e.key))}encryptData(e){return this.http.post(`${g.N.apiUrlv7}products/getstaticpageproducts`,{data:e,skipVPNCheck:"1"}).pipe((0,c.U)(e=>e))}createEncryptedText(e){return this.http.post(`${g.N.encryptUrl}`,e)}updateCurrentUser(e,t){var r=this;return(0,n.Z)(function*(){let n=r.currentUserValue;n[e]=t,r.currentUserSubject.next(n),r.currentUserSubject.complete(),yield r.setData("currentUser",n)})()}updateLoginUser(e,t){var r=this;return(0,n.Z)(function*(){if(void 0!==t){let n=r.loginUserValue||{};n[e]=t,r.LoginUserSubject.next(n),r.LoginUserSubject.complete(),yield r.setData("loginUser",n)}})()}changeCurrentUser(e){var t=this;return(0,n.Z)(function*(){let r=e;r?.parentmerchantId&&(r.isSwitchChild=!0),t.currentUserSubject.next(r),t.currentUserSubject.complete(),yield t.setData("currentUser",r);const i=(0,s.H)(5e3);var a;t.getMetaPrefData_Direct().pipe((0,u.R)(i)).subscribe({next:e=>{e?.error?t._toster.error(e?.error?.message):(t.safeAssignUserMetaPrefFieldsVal(r,e),r&&(t.currentUserSubject.next(r),t.currentUserSubject.complete(),t.setDataWthoutPromise("currentUser",r)),window.location.href="/dashboard/pos-default")},error:(a=(0,n.Z)(function*(e){t._toster.error(e?.error?.error?.message||e?.error?.message)}),function(e){return a.apply(this,arguments)})}),t.getVerifications()})()}writeErrorLog(e,t="",r=""){var i=this;return(0,n.Z)(function*(){return yield i.safeWriteErrorLogCustom(e,t,r)})()}safeWriteErrorLogCustom(e,t="",r=""){var i=this;return(0,n.Z)(function*(){try{let n=localStorage.getItem("currUserMob");const a={type:`${t}`,url:`${r}`,merId:`${i.currentUserValue?.SadadId||n||""}`,logData:e,ipAdd:i.currIpAdd};return yield(0,l.n)(i.http.post(`${g.N.logFastifyUrl}`,JSON.stringify(a)).pipe((0,p.K)(()=>(0,o.of)(null))))}catch(n){return null}})()}safeAssignUserMetaPrefFieldsVal(e,t){if(e&&t){let r=Array.isArray(t)?t[0]:t;r&&(r?.previouslogindatetime&&(e.previouslogindatetime=r?.previouslogindatetime),void 0!==r?.isallowedtomangeprivatepublicaccess&&(e.isallowedtomangeprivatepublicaccess=r?.isallowedtomangeprivatepublicaccess),void 0!==r?.isallowedtoaddsubmerchant&&(e.isallowedtoaddsubmerchant=r?.isallowedtoaddsubmerchant))}}updSNAEnvURL(e){let t,r=`def-${e}`;return t=g.N.apiUrlv7,r=`${r} + ${t}`,t}updSNAEnvData(e,t){let r=`def-${t}`;return e.apiVer="v7",r=`${r} + ${e}`,e}getMultiTabDynamicSessionKeyVal(){return localStorage?.removeItem("sadad_dyn_session_key"),sessionStorage?.removeItem("sadad_dyn_session_key"),btoa(window?.location?.host+"_sadad_dyn_key")}getDynamicLocalStorageSessionKey(){return this.getMultiTabDynamicSessionKeyVal()}isAuthLoginPagePathCheck(){const e=window?.location?.pathname||"",t=window?.location?.href||"",r=this.router?.url||"";return e?.includes("/auth/login")||"/auth"===e||"/"===e||t?.includes("/auth/login")||r?.includes("/auth/login")||"/auth"===r||"/"===r}checkAndRedirectLoggedInUserSession(){let e=this.getData("currentUser");if(e&&(e?.isVerifiedUser||e?.SadadId||e?.cellnumber||e?.id&&e?.roleId)&&this.isAuthLoginPagePathCheck()){this.currentUserSubject.next(e);const t=localStorage?.getItem("serType")||"pos";return this.router?.navigate([`/dashboard/${t}-default`]),!0}return!1}checkAlreadyLoggedInBeforeSubmit(){let e=this.getData("currentUser");if(e&&(e?.isVerifiedUser||e?.SadadId||e?.cellnumber||e?.id&&e?.roleId)){this.currentUserSubject.next(e);const t=localStorage?.getItem("serType")||"pos";return this.router?.navigate([`/dashboard/${t}-default`]),!0}return!1}getFastifyPayloadEncryptionKey(){return this.loginUserValue?.fastifyEncryptionKey}
1postFeatureFlag(e){return this.http.post(`${g.N.apiUrlv7}feature-flags`,{flag:e})}getFeatureFlag(e){let t="";return t=Array.isArray(e)?e.map(e=>`flag=${e}`).join("&"):`flag=${e}`,this.http.get(`${g.N.apiUrlv7}feature-flags?${t}`)}getUserProfile(){return this.http.get(`${g.N.apiUrlv7}users/get_profile`)}safeDecryptFastifyData(e,t){if(!e)return e;const r=t||this.getFastifyPayloadEncryptionKey();let n=null;try{n=this.injector?.get(f.$)}catch(i){}if(!r)return this.handleDecryptFailError({errCodeVal:"E-101",commonHelperServiceVal:n});try{const t=m.AES.decrypt(e,r)?.toString(m.enc.Utf8);return t?JSON.parse(t):this.handleDecryptFailError({errCodeVal:"E-102",commonHelperServiceVal:n})}catch(a){return this.handleDecryptFailError({errCodeVal:"E-103",commonHelperServiceVal:n,logErrVal:a})}}handleDecryptFailError({errCodeVal:e,commonHelperServiceVal:t,logErrVal:r=null}){const n=(0,v.tk)({errCodeVal:e});return r?console.error("safeDecryptFastifyData error:",r,n):console.warn("safeDecryptFastifyData:",n),t&&t.disTransErrMsg(n),{statusCode:400,errCode:e,message:n,error:{message:n,statusCode:400,errCode:e}}}safeSetVerifiedUserFlagStateVal(e,t=!0){return e&&"object"==typeof e&&(e.isVerifiedUser=t),e}}return e.\u0275fac=function(t){return new(t||e)(i.LFG(_.eN),i.LFG(S.o),i.LFG(i.zs3),i.LFG(b.F0))},e.\u0275prov=i.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},63908:function(e,t,r){"use strict";r.d(t,{$:function(){return S}});var n=r(16304),i=r(35366),a=r(42693),s=r(529),o=r(91681),l=r(51816),c=r(32041),d=r(29609),u=r(35379),p=r(82051),h=r(52105),g=r(34115),m=r(60649),f=r(54391),v=r(17444),_=r(99624);let S=(()=>{class e{constructor(e,t,r,n,a,s,o){this._authService=e,this.toastr=t,this.http=r,this.translate=n,this.router=a,this._snackBar=s,this.sanitizer=o,this.onInstanceRTLSelection=new i.vpe,this.ipRegex=/^(?:(?:^|(?<=\s))(?:[0-9]{1,3}\.){3}[0-9]{1,3}|(?:(?:(?:[0-9a-fA-F]){1,4}:){7}(?:[0-9a-fA-F]){1,4}))(?=$|(?=\s))/,this.baseURL=window.location.origin,this.getTranslate(),this.translate.onLangChange.subscribe(e=>{this.getTranslate()})}getTranslate(){this.translate.get(["ERROR","SUCCESS","OK","FILE_TOO_LARGE_MAX_SIZE"]).subscribe(e=>{this.language_text=e})}disTransErrMsg(e,{okmsg:t="OK",duration:r=3e3,position:n=""}={}){const i=this.handleServiceUnavailableError(e);if(i?e=i:this.checkNetConnErr(e)&&(e="INTERNET_CONNECTIVITY_ERROR"),e){let t=this.getSafeInstantTranslationKeyVal(e);this.toastr.error(t||`${this.getLangTextSafeCustom("ERROR","ERROR","\u062e\u0637\u0623")}!`,this.getLangTextSafeCustom("OK","OK","\u062d\u0633\u0646\u0627\u064b"),r,n)}else this.toastr.error(e||`${this.getLangTextSafeCustom("ERROR","ERROR","\u062e\u0637\u0623")}!`,this.getLangTextSafeCustom("OK","OK","\u062d\u0633\u0646\u0627\u064b"),r,n)}disTransSuccMsg(e,t="OK",r=3e3,n="",i={}){let a=this.getSafeInstantTranslationKeyVal(t)||"OK";if(e){const t=this.getSafeInstantTranslationKeyVal(e,i||{});this.toastr.success(t||`${this.getLangTextSafeCustom("SUCCESS","SUCCESS","\u0646\u0627\u062c\u062d\u0629")}!`,this.getLangTextSafeCustom("OK","OK","\u062d\u0633\u0646\u0627\u064b"),r,n)}else this.toastr.success(e||`${this.getLangTextSafeCustom("SUCCESS","SUCCESS","\u0646\u0627\u062c\u062d\u0629")}!`,a,r,n)}disDynmcTransSuccMsg({resSuccMsg:e,okmsg:t="OK",duration:r=3e3,dynText:n=null,actType:i="",position:a=""}){let s=this.getSafeInstantTranslationKeyVal(t)||"OK";if(e){let t="";t=n?this.getSafeInstantTranslationKeyVal(e,n):this.getSafeInstantTranslationKeyVal(e),this.toastr.success(t||`${this.getLangTextSafeCustom("SUCCESS","SUCCESS","\u0646\u0627\u062c\u062d\u0629")}!`,s,r,i,a)}else this.toastr.success(e||`${this.getLangTextSafeCustom("SUCCESS","SUCCESS","\u0646\u0627\u062c\u062d\u0629")}!`,s,r,i,a)}disDynmcTransErrMsg({resErrMsg:e,okmsg:t="OK",duration:r=3e3,dynText:n=null,position:i=""}){const a=this.handleServiceUnavailableError(e);if(a?e=a:this.checkNetConnErr(e)&&(e="INTERNET_CONNECTIVITY_ERROR"),e){let t=this.getSafeInstantTranslationKeyVal(e);if(n&&t)for(const[e,r]of Object.entries(n))t=t.replace(e,`${r??""}`);this.toastr.error(t||`${this.getLangTextSafeCustom("ERROR","ERROR","\u062e\u0637\u0623")}!`,this.getLangTextSafeCustom("OK","OK","\u062d\u0633\u0646\u0627\u064b"),r,i)}else this.toastr.error(e||`${this.getLangTextSafeCustom("ERROR","ERROR","\u062e\u0637\u0623")}!`,this.getLangTextSafeCustom("OK","OK","\u062d\u0633\u0646\u0627\u064b"),r,i)}disTransAPIErrMsg(e){let t=this.getCurrLang(),r=e?.error?.message||e?.error?.error?.message||e?.message,n=e?.error?.arabicMessage||e?.error?.error?.arabicMessage||e?.arabicMessage;"ar"==t&&n?this.toastr.error(n,this.getLangTextSafeCustom("OK","OK","\u062d\u0633\u0646\u0627\u064b")):this.disTransErrMsg(r)}createFastifyPostData(e){let t={};if(-1!==e.indexOf("?")){let r=[];const n=e.split("?")[0];t.name=n;const i=e.split("?")[1].replace(/filter/g,"");
1i&&i.split("&").forEach(e=>r.push({key:e.split("=")[0],value:e.split("=")[1]})),t.filters=r}return t}setCustomerDetails(e){let t,r="",n="",i="";return e.senderId&&e.senderId?.id===this._authService.currentUserValue.id?t=e.receiverId:e.receiverId&&e.receiverId?.id===this._authService.currentUserValue.id&&(t=e.senderId),t?(r=t?.name||"",n=t?.cellnumber||"",i=t?.email||""):(n=e.guestuser?.cellnumber||"",i=e.guestuser?.email||"",r="guest"),e.customerName=r,e.customerMob=n,e.customerEmail=i,e}setCustomerDetailsPayments(e){let t,r="",n="",i="",a=this._authService.currentUserValue;return e.senderId&&e.senderId?.id===(1==a.roleId?a.id:a.mainMerchantId)?t=e.receiverId:e.receiverId&&e.receiverId?.id===(1==a.roleId?a.id:a.mainMerchantId)&&(t=e.senderId),e?.invoice?(r=e?.invoice?.clientname||"",n=e?.invoice?.cellno||"",i=e?.invoice?.emailaddress||""):t?(r=t?.name||"",n=t?.cellnumber||"",i=t?.email||""):(r="guest",n=e.guestuser?.cellnumber||"",i=e.guestuser?.email||""),e.customerName=r,e.customerMob=n,e.customerEmail=i,e}setCustomerDetailsPayments_backup(e){let t,r="",n="",i="";return e.senderId&&e.senderId?.id===this._authService.currentUserValue.id?t=e.receiverId:e.receiverId&&e.receiverId?.id===this._authService.currentUserValue.id&&(t=e.senderId),t?(r=t?.name||"",n=t?.cellnumber||"",i=t?.email||""):e?.invoice?(r=e?.invoice?.clientname||"",n=e?.invoice?.cellno||"",i=e?.invoice?.emailaddress||""):(r="guest",n=e.guestuser?.cellnumber||"",i=e.guestuser?.email||""),e.customerName=r,e.customerMob=n,e.customerEmail=i,e}setPayMethodLogo(e){let t=e.nativeElement.querySelectorAll(".payMethodSelect .ng-option-label");const r=["Visa","Master Card","AMEX","JCB","UPI","Sadad Pay","Apple Pay","Google Pay","Token","Himyan"],n=["\u0641\u064a\u0632\u0627","\u0645\u0627\u0633\u062a\u0631\u0643\u0627\u0631\u062f","\u0627\u0645\u0631\u064a\u0643\u0627\u0646 \u0627\u0643\u0633\u0628\u0631\u0633","JCB","UPI","\u0645\u062d\u0641\u0638\u0629 \u0633\u062f\u0627\u062f","\u0627\u0628\u0644 \u0628\u0627\u064a","\u062c\u0648\u062c\u0644 \u0628\u0627\u064a","\u0631\u0645\u0632","\u0647\u0645\u064a\u0627\u0646"];t.forEach(e=>{let t=e.innerText;if(n.includes(t)){let e=n.indexOf(t);-1!=e&&(t=r[e])}t=t.toLowerCase().replace(" ","-");let i=20,a=50;"visa"==t?i=13:"upi"==t?i=16:"amex"==t?i=26:"apple-pay"==t?i=14:"himyan"==t&&(a=53),e.innerHTML=`<img width="${a}" height="${i}" src="assets/images/pos-panel/payment-methods/${t}.svg"> ${e.innerHTML}`})}getLimits(e){const t={name:"usercommissions/userMinMaxSetting",method:"POST",data:{userId:`${1===this._authService.currentUserValue.roleId?this._authService.currentUserValue.id:this._authService.currentUserValue.mainMerchantId}`,id:e}};return this.http.post(`${this._authService.updSNAEnvURL("v5")}${t.name}`,t.data).pipe((0,o.U)(e=>null!=e.value?e.value:"0"))}isInYearRange(e){const t=new Date(e.split("/")[0]),r=new Date(e.split("/")[1]),n=Math.abs(r.getTime()-t.getTime());return!(Math.ceil(n/864e5)>365)}convertDateParaToFilterdata(e,t,r="YYYY-MM-DD",n=!1){let i,a;return"today"==e?(i=d().startOf("day").format(r),t.date=i+"/"):"yesterday"==e?(i=d().subtract(1,"days").startOf("day").format(r),t.date=i+"/"):"week"==e?(i=d().subtract(6,"days").startOf("day").format(r),a=d().endOf("day").format(r),t.date=i+"/"+a):"month"==e?(i=d().subtract(1,"month").startOf("day").format(r),a=d().endOf("day").format(r),t.date=i+"/"+a):"year"==e?(i=d().subtract(1,"year").startOf("day").format(r),a=d().endOf("day").format(r),t.date=i+"/"+a):"6_month"==e?(i=d().subtract(6,"months").startOf("day").format(r),a=d().endOf("day").format(r),t.date=i+"/"+a):(e.includes("/")&&(i=e.split("/")[0],a=e.split("/")[1],n&&(i=d(i).format(r),a&&(a=d(a).format(r)))),t.date=e),[t,i,a]}decodeHtmlEntity(e){return(new DOMParser).parseFromString(e,"text/html").documentElement.textContent}formatBytes(e,t=2){if(0===e)return"0 Bytes";const r=t<0?0:t,n=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,n)).toFixed(r))+" "+["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][n]}checkPDFValidation(e){let t=e.name.split(".")[e.name.split(".").length-1];if(["application/pdf"].includes(e.type)&&"pdf"==t.toLowerCase()){if(!(e.size>26214400))return!0;this.disTransErrMsg("PDF_TOO_LARGE_MAX_26MB")}else this.disTransErrMsg("JPED_JPG_PNG_ALLOWED");return!1}checkPDFImageValidation(e,t="JPEG_JPG_PNG_PDF_ALLOWED",r="all",n=30485760,i=30){let a,s,o=e.name.split(".")[e.name.split(".").length-1];if("img"==r?(a=["image/jpg","image/jpeg","image/png","image/JPG","image/JPEG"],s=["jpeg","png","jpg"]):"pdf"==r?(a=["application/pdf"],s=["pdf"]):(a=["image/jpg","image/jpeg","image/png","image/JPG","image/JPEG","application/pdf"],s=["pdf","jpeg","png","jpg"]),a.includes(e.type)&&s.includes(o)){if(!(e.size>n))return!0;this.disTransErrMsg(this.language_text.FILE_TOO_LARGE_MAX_SIZE.replace("dynamic_field_a",i))}else this.disTransErrMsg(t);return!1}getNgSelectItemsTrans(e,t){return this.safeGetNgSelectItemsTransCustom(e,t)}safeGetNgSelectItemsTransCustom(e,t){if(!e||!Array.isArray(e))return Array.isArray(e)?JSON.parse(JSON.stringify(e)):[];if(!t||"object"!=typeof t)return JSON.parse(JSON.stringify(e));try{const r=JSON.parse(JSON.stringify(e));
1return r.forEach(e=>{const r=e?.code;e&&r&&"string"==typeof r&&t?.[r]&&(e.label=t?.[r])}),r}catch(r){return Array.isArray(e)?e:[]}}bankMapLogo(e){switch(e){case"QNBA":return"assets/images/bank/qnb.png";case"ABQQ":return"assets/images/bank/ahlibank.png";case"KLJI":return"assets/images/bank/akcb.png";case"CBQA":return"assets/images/bank/cbq-bank.png";case"DOHB":return"assets/images/bank/doha-bank.png";case"MAFR":return"assets/images/bank/mar.png";case"QISB":return"assets/images/bank/qib.png";case"QIIB":return"assets/images/bank/qiib.png";case"UNIL":return"assets/images/bank/unil.jpeg";case"IBOQ":return"assets/images/bank/QISB.jpeg";case"BRWA":return"assets/images/bank/BRWA.png";case"MSHQ":return"assets/images/bank/MSHQ.png";case"BBME":return"assets/images/bank/HSBCQA.png";case"BSIR":return"assets/images/bank/BSIR.png";case"ARAB":return"assets/images/bank/BADEA.png";default:return""}}getCurrLang(){let e=this.translate.getDefaultLang(),t=localStorage.getItem("selectedLang");return["en","ar"].includes(t)||localStorage.setItem("selectedLang",e),localStorage.getItem("selectedLang")?e=localStorage.getItem("selectedLang"):(localStorage.setItem("selectedLang",e),e=this.translate.getDefaultLang()),this.translate.setDefaultLang(e),e}getMerchantUserNameList(){return this.http.get(`${this._authService.updSNAEnvURL("v5")}users/getsubuserNames`)}isDateExpired(e,t){let r=d(),n=d(e,t);return console.log("[isDateExpired] now dtobj :",r,n),r>n}getFileBlob(e){return this.http.get(`${e}`,{observe:"response",responseType:"blob"}).pipe((0,o.U)(e=>new Blob([e.body])))}logFirebaseEvent(e,t){console.log("logFirebaseEvent call:",e,t),this.trackGa4CustomEvent(e,t),console.log("logFirebaseEvent done:",e,t)}trackGa4CustomEvent(e,t,r){try{"undefined"!=typeof window&&window?.gtag&&window?.gtag("event",e,{component:t,...r||{}})}catch(n){}}logPanelEvent(e,t,r){const n=(s.N.apiUrlv7||"").replace(/\/?$/,"/");this.http.post(`${n}firebase/events`,{event_name:e,component:t,params:r||{}}).pipe((0,l.K)(e=>(0,c.of)(null))).subscribe()}convertRelativeUriToFile(e,t,r){return(0,n.Z)(function*(){r=r||`image/${e.split(".")[e.split(".").length-1]}`;const n=yield fetch(e),i=yield n.arrayBuffer();return new File([i],t,{type:r})})()}getDiffDays(e){const t=d(e).startOf("day"),r=d().startOf("day");return t.diff(r,"days")}redirectToRoute(e){this.router.navigateByUrl(e)}checkOneYearValidation(e){const[t,r]=e.split("/");let n=!1;if(r){const e=new Date(t),i=new Date(r),a=new Date(e);a.setFullYear(a.getFullYear()+1),i>a&&(this.disTransErrMsg("DATE_RANGE_NOT_MORE_THAN_YEAR"),n=!0)}return n}getMonthRange(e){const t=new Date,r=new Date;r.setDate(r.getDate()-e);const n=e=>`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`;return`${n(r)}/${n(t)}`}updateDownRprtIds(e,t=[]){console.log("updateDownRprtIds start:",this._authService?.loginUserValue?.downRprtIds);let r=this._authService?.loginUserValue?.downRprtIds||[];"add"===e?t.forEach(e=>{e&&!r.includes(e)&&r.push(e)}):"remove"===e?t.length>0&&(r=r.filter(e=>!t.includes(e))):"removeAll"===e&&(r=[]),this._authService.updateLoginUser("downRprtIds",r),console.log("updateDownRprtIds end:",this._authService?.loginUserValue?.downRprtIds)}updateReqDeliveryPollIds(e,t=[]){console.log("updateReqDeliveryPollIds start:",this._authService?.loginUserValue?.reqDeliveryPollIds);let r=this._authService?.loginUserValue?.reqDeliveryPollIds||[];"add"===e?t.forEach(e=>{e&&!r.includes(e)&&r.push(e)}):"remove"===e?t.length>0&&(r=r.filter(e=>!t.includes(e))):"removeAll"===e&&(r=[]),this._authService.updateLoginUser("reqDeliveryPollIds",r),console.log("updateReqDeliveryPollIds end:",this._authService?.loginUserValue?.reqDeliveryPollIds)}updateDownStmtIds(e,t=[]){let r=this._authService?.loginUserValue?.downStmtIds||[];"add"===e?t.forEach(e=>{e&&!r.includes(e)&&r.push(e)}):"remove"===e?t.length>0&&(r=r.filter(e=>!t.includes(e))):"removeAll"===e&&(r=[]),this._authService.updateLoginUser("downStmtIds",r)}detectFileType(e){return e.length<4?"unknown":37===e[0]&&80===e[1]&&68===e[2]&&70===e[3]?"pdf":137===e[0]&&80===e[1]&&78===e[2]&&71===e[3]?"png":80===e[0]&&75===e[1]?"xlsx":"csv"}getFileTypeFromBlob(e){var t=this;return(0,n.Z)(function*(){const r=yield e.arrayBuffer(),n=new Uint8Array(r);return t.detectFileType(n)})()}toNumberOrNull(e){if(null==e)return null;if("string"==typeof e){const t=e.trim();if(!t)return null;const r=Number(t);return Number.isFinite(r)?r:null}return"number"==typeof e&&Number.isFinite(e)?e:null}getRedirectURL(e,t){return`${u.He[e].replace("VALUE_1",t)}`}addBrowserInfo(e){const t=navigator.userAgent,r=`Web Panel, ${navigator.platform}`;return e instanceof FormData?(e.append("browser_info",t),e.append("device_name",r),e):{...e,browser_info:t,device_name:r}}saveFile({filePath:e,blobRes:t,clean:r=!1}){let n=e.split("/").pop()||"";r&&(n=n.replace(/^\d+_/,"").replace(/_\d+$/,"").replace(/\.[^/.]+$/,"")),n=n.replace(/\.[^/.]+$/,"");const i=e.split(".").pop()||"";(0,p.saveAs)(t,`${n}.${i}`)}getLangTextSafeCustom(e,t="",r=""){if(this.language_text?.[e])return this.language_text[e];if("ar"===this.getCurrLang()){if(r)return r;if("OK"===e)return"\u062d\u0633\u0646\u0627\u064b";if("ERROR"===e)return"\u062e\u0637\u0623";if("SUCCESS"===e)return"\u0646\u0627\u062c\u062d\u0629"}return t||("OK"===e?"OK":"ERROR"===e?"ERROR":"SUCCESS"===e?"SUCCESS":e||"")}createFileObjectUrl({blob:e,sanitize:t=!1}){const r=URL.createObjectURL(e);return t?this.sanitizer.bypassSecurityTrustResourceUrl(r):r}getSafeInstantTranslationKeyVal(e,t){if(!e||"string"!=typeof e||!e?.trim?.())return"string"==typeof e?e:"";try{return this.getTranslatedMessageWithCodeSuffix(e,t)||this.translate?.instant?.(e,t||{})||e}catch(r){return e}}getTranslatedMessageWithCodeSuffix(e,t){const r=e.match(/\s*\(Code:\s*([A-Z0-9-]+)\)/i);if(r){const n=e.replace(/\s*\(Code:\s*[A-Z0-9-]+\)/i,"").trim(),i=r[0];return`${this.translate?.instant?.(n,t||{})||n}${i}`}return null}
1toggleRowAndChevron(e,t,r="up-chevron.png",n="down-chevron.png"){try{e?.target?.parentElement?.parentElement?.parentElement?.nextSibling?.classList&&e.target.parentElement.parentElement.parentElement.nextSibling.classList.toggle("d-none"),t?.src&&(t.src=-1===t.src.indexOf(n)?t.src.replace(r,n):t.src.replace(n,r))}catch(i){}}checkNetConnErr(e){return"undefined"!=typeof window&&!1===window?.navigator?.onLine||0===e?.status||0==e?.status||"HttpErrorResponse"===e?.name&&(0===e?.status||"Unknown Error"===e?.statusText)}handleServiceUnavailableError(e){if(!e)return null;const t="string"==typeof e?e:e?.error?.message||e?.error||e?.message||"",r=e?.error,n=503===e?.status||502===e?.status||504===e?.status||503===e?.error?.status||503===e?.error?.statusCode,i="string"==typeof r&&(r?.includes?.("503 Service Temporarily Unavailable")||r?.includes?.("503 Service")||r?.includes?.("<html>")||r?.includes?.("<head>")),a="string"==typeof t&&(t?.includes?.("503 Service Temporarily Unavailable")||t?.includes?.("503 Service")||t?.includes?.("Service Temporarily Unavailable")||t?.includes?.("Http failure response")&&t?.includes?.("503")||t?.includes?.("<html>"));return n||i||a?"SERVICE_TEMPORARILY_UNAVAILABLE":null}generateIdempotencyKey(){return`${this._authService?.currentUserValue?.SadadId||this._authService?.currentUserValue?.
1id}-${Date.now()}-${"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}`}buildHttpHeaderOptions(e){let t={};if(e){let r=new a.WM,n=!1;Object.keys(e).forEach(t=>{e[t]&&(r=r.set(t,e[t]),n=!0)}),n&&(t.headers=r)}return t}handleDownloadReceiptError(e){var t=this;return(0,n.Z)(function*(){let r="";try{if(e?.error&&"function"==typeof e?.error?.text){const t=yield e?.error?.text();if(t&&!t.trim().startsWith("<")){const e=JSON.parse(t);r=e?.error?.message||e?.message||""}}else if("string"==typeof e?.error&&!e?.error?.trim().startsWith("<")){const t=JSON.parse(e?.error);r=t?.error?.message||t?.message||""}}catch(n){}r||(r=e?.error?.error?.message||e?.error?.message||e?.message||"INTERNAL_SERVER_ERROR"),t.disTransErrMsg(r)})()}}return e.\u0275fac=function(t){return new(t||e)(i.LFG(h.$),i.LFG(g.o),i.LFG(a.eN),i.LFG(m.sK),i.LFG(f.F0),i.LFG(v.ux),i.LFG(_.H7))},e.\u0275prov=i.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},73006:function(e,t,r){"use strict";r.d(t,{q:function(){return i}});var n=r(35366);let i=(()=>{class e{patternValidator(){return e=>e.value?new RegExp("^[\u0621-\u064a-A-Za-z0-9&()_/. ]*$").test(e.value)?null:{invalidChars:!0}:null}MatchPassword(e,t){return r=>{const n=r.controls[e],i=r.controls[t];return n&&i?i.errors&&!i.errors.passwordMismatch?null:void i.setErrors(n.value!==i.value?{passwordMismatch:!0}:null):null}}userNameValidator(e){return new Promise(t=>{setTimeout(()=>{this.validateUserName(e.value)?t({userNameNotAvailable:!0}):t(null)},1e3)})}validateUserName(e){return["ankit","admin","user","superuser"].indexOf(e)>-1}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=n.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},98109:function(e,t,r){"use strict";r.d(t,{BR:function(){return I.B},$h:function(){return n.$},yS:function(){return R},p4:function(){return k},$P:function(){return i.$},qy:function(){return L.q},sp:function(){return c},Nc:function(){return q},r6:function(){return m},q:function(){return _.q},oZ:function(){return D},X5:function(){return Z},gq:function(){return U},O0:function(){return S.O},Ce:function(){return w},Yx:function(){return f.Y},M5:function(){return y},rM:function(){return N},kg:function(){return J},Ay:function(){return V},RC:function(){return T.R},KP:function(){return v.K},Nk:function(){return H},br:function(){return Y},xh:function(){return O}});var n=r(52105),i=r(63908),a=r(529),s=r(29609),o=r(35366),l=r(42693);let c=(()=>{class e{constructor(e,t){this.http=e,this._authService=t,this.getId()}
1getId(){return this.id=this._authService?.currentUserValue?.id,this.id}getDashboardData(e="",t="",r=!1){this.getId(),"/"==e&&(e="");var n={};let i=a.N.apiUrl;if(n.name="transactions/allTxnCounters","allTxnCounters"==t?(n.name="transactions/allTxnCounters",i=a.N.apiUrlv7):"sourceWiseCounters"==t?(n.name="transactions/sourceWiseCounters",i=a.N.apiUrlv7):"splineChart"==t?(n.name="transactions/fetchTxnByCountByAmount",i=a.N.apiUrlv7):"barChart"==t?r?(n.name="terminals/terminalBatchBarChart",i=this._authService.updSNAEnvURL("v5")):(n.name="transactions/fetchTypeWiseAmount",i=a.N.apiUrlv7):"pieChart"==t?(n.name="transactions/cardTypePieChart",i=a.N.apiUrlv7):"payMethodChart"==t&&(n.name="transactions/paymentMethodChart",i=a.N.apiUrlv7),n.method="GET",e)if(e.includes("/")){let t=e.split("/");n.data=""!=t[1]?`filter[date]=custom&filter[between]=["${t[0]} 00:00:00", "${t[1]} 23:59:59"]`:`filter[date]=custom&filter[between]=["${t[0]} 00:00:00", "${t[0]} 23:59:59"]`}else n.data=`filter[date]=${e}`;else n.data=`${e}`;return r&&(n.data="barChart"!=t?`${n.data}&isPosTransaction=true`:n.data.replaceAll("date","datefilter")),this.http.get(`${i}${n.name}?${n.data}`)}getPOSTerminalLocations(){return this.getId(),this.http.get(`${this._authService.updSNAEnvURL("v5")}terminals/mapLocation`)}getDateFormat(e,t="chart"){let r,n,i,a=" - ",o="D MMM'YY";return"batchreport"==t&&(o="DD MMM YYYY"),"batchsummryLabel"==t&&(o="DD-MM-YYYY",a=" to "),"today"==e?r=s().startOf("day").format(o):"yesterday"==e?r=s().subtract(1,"days").startOf("day").format(o):"week"==e?(n=s().subtract(6,"days").startOf("day").format(o),i=s().endOf("day").format(o),r=n+a+i):"month"==e?(n=s().subtract(1,"month").startOf("day").format(o),i=s().endOf("day").format(o),r=n+a+i):"6_month"==e?(n=s().subtract(6,"months").startOf("day").format(o),i=s().endOf("day").format(o),r=n+a+i):"year"==e?(n=s().subtract(1,"year").startOf("day").format(o),i=s().endOf("day").format(o),r=n+a+i):e.includes("/")&&(r=s(e.split("/")[0],"YYYY-MM-DD").format(o),e.split("/")[1]&&(r=r+a+s(e.split("/")[1],"YYYY-MM-DD").format(o))),r}}return e.\u0275fac=function(t){return new(t||e)(o.LFG(l.eN),o.LFG(n.$))},e.\u0275prov=o.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();r(17884);var d=r(16304),u=r(9153),p=r(69056),h=r(32041),g=r(51816);let m=(()=>{class e{constructor(e,t){this.http=e,this._authService=t}getMerchantHeaderDetails(){this.getId();const e=this._authService?.currentUserValue;return{sadadMerchantId:e?.SadadId,sadadMainMerchantId:e?.mainMerchantSadadId,merchantName:1==e?.roleId?e?.name:e?.username,roleId:e?.roleId}}getPartnerPinNumber(){this.getId();const e=`filter[where][userId]=${this._authService?.currentUserValue?.
1id}&filter[fields][servicepin]=true`;return this.http.get(`${this._authService.updSNAEnvURL("v5")}usermetaauths?${e}`).pipe((0,g.K)(e=>this.handleSafeServicePinError_Header(e)))}getServicePin(){var e=this;return(0,d.Z)(function*(){e.getId();const t=`filter[where][userId]=${e._authService?.currentUserValue?.id}&filter[fields][servicepin]=true`;return yield(0,u.n)(e.http.get(`${e._authService.updSNAEnvURL("v5")}usermetaauths?${t}`).pipe((0,p.q)(1),(0,g.K)(t=>e.handleSafeServicePinError_Header(t))))})()}getPartnerLastLogin(){this.getId();const e=`filter[where][userId]=${this._authService?.currentUserValue?.id}&filter[fields][previouslogindatetime]=true&filter[fields][isallowedtomangeprivatepublicaccess]=true`;return this.http.get(`${this._authService.updSNAEnvURL("v6")}usermetapreferences?${e}`)}getId(){}handleSafeServicePinError_Header(e){return(0,h.of)({error:e,statusCode:e?.status||e?.statusCode||403})}}return e.\u0275fac=function(t){return new(t||e)(o.LFG(l.eN),o.LFG(n.$))},e.\u0275prov=o.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var f=r(58858),v=r(27463),_=r(59642),S=r(6707),b=r(91681);let y=(()=>{class e{constructor(e,t){this.http=e,this._authService=t}uploadImage(e,t=""){const r=new FormData;let n=t||e.name,i=n.lastIndexOf(".");return r.append("file",e,n.slice(0,i).replaceAll(".","_")+n.slice(i,n.length)),this.http.post(`${this._authService.updSNAEnvURL("v6")}upload_image/api-product`,r).pipe((0,b.U)(e=>e),(0,g.K)(e=>(0,h.of)(e)))}addProject(e){var t={name:"products",method:"POST"};return t.data=e,e.image&&(t.data.productmedia=[{name:e.image}]),delete e.image,t.data.merchantId=[14,16].includes(this._authService.currentUserValue.roleId)?this._authService.currentUserValue.mainMerchantId:this._authService.currentUserValue.id,t.data.createdby=[14,16].includes(this._authService.currentUserValue.roleId)?this._authService.currentUserValue.id:this._authService.currentUserValue.mainMerchantId,this.http.post(`${a.N.apiUrlv7}${t.name}`,t.data)}editProductInfo(e,t){var r={};return r.name=`products/${t}`,r.method="PATCH",r.data=e,this.http.patch(`${a.N.apiUrlv7}${r.name}`,r.data)}getProductListUpdated_(e=10,t=0,r="",n=-1,i="",s="",o){let l="created DESC";var c={};let d=`{"merchantId":${1===this._authService.currentUserValue.roleId?this._authService.currentUserValue.id:this._authService.currentUserValue.mainMerchantId}},{"isRecurringProduct":"0"}`,u="";if(s&&""!=s){let e,t;if("today"==s||"yesterday"==s||"week"==s||"month"==s||"year"==s)u=`,"date":"${s}"`;else{let r=s.split("/");""!=r[1]?(e=`${r[0]} 00:00:00`,t=`${r[1]} 23:59:59`):(e=`${r[0]} 00:00:00`,t=`${r[0]} 23:59:59`),u=`,"date":"custom", "between":["${e}", "${t}"]`}}o.prodName&&(d=`${d},{"name":"${o.prodName.trim()}"}`),2==o.prodAmount.length&&(d=`${d},{"price":{"between":[${o.prodAmount[0]},${o.prodAmount[1]}]}}`),o.inStock&&(d=`${d},{"or":[{"totalavailablequantity":{"gt":"0"}},{"isUnlimited":true}]}
1`),o.outOfStock&&(d=`${d},{"totalavailablequantity":{"lt":"1"}},{"isUnlimited":"0"}`),-1!=o.merUser&&null!=o.merUser&&(d=`${d},{"createdby":"${o.merUser}"}`),-1!=o.shippingEnabledType&&null!=o.shippingEnabledType&&(d=`${d},{"isShipping":"${o.shippingEnabledType}"}`),o.sortByDate&&(l="created DESC"),o.sortByPrice&&(l="price DESC"),o.sortByAvQty&&(l="totalavailablequantity DESC"),o.sortProdView&&(l="viewcount DESC"),o.sortName&&(l="name DESC");let p=`"and":[${d}]`;return c.name="products",c.method="GET",c.data=`filter={"where":{${p}},"skip": ${t},"limit": ${e},"order": ["${l}"],"include":"productmedia"${u}}`,this.http.get(`${a.N.apiUrlv7}${c.name}?${c.data}`)}getDataCount_(e="",t){var r={};let n=`{"merchantId":${1===this._authService.currentUserValue.roleId?this._authService.currentUserValue.id:this._authService.currentUserValue.mainMerchantId}},{"isRecurringProduct":"0"}`,i="";if(e&&""!=e){let t,r;if("today"==e||"yesterday"==e||"week"==e||"month"==e||"year"==e)i=`,"date":"${e}"`;else{let n=e.split("/");""!=n[1]?(t=`${n[0]} 00:00:00`,r=`${n[1]} 23:59:59`):(t=`${n[0]} 00:00:00`,r=`${n[0]} 23:59:59`),i=`,"date":"custom", "between":["${t}", "${r}"]`}}t.prodName&&(n=`${n},{"name":"${t.prodName.trim()}"}`),2==t.prodAmount.length&&(n=`${n},{"price":{"between":[${t.prodAmount[0]},${t.prodAmount[1]}]}}`),t.inStock&&(n=`${n},{"or":[{"totalavailablequantity":{"gt":"0"}},{"isUnlimited":true}]}`),t.outOfStock&&(n=`${n},{"totalavailablequantity":{"lt":"1"}},{"isUnlimited":"0"}`),-1!=t.merUser&&null!=t.merUser&&(n=`${n},{"createdby" : ${t.merUser}}`),-1!=t.shippingEnabledType&&null!=t.shippingEnabledType&&(n=`${n},{"isShipping" : ${t.shippingEnabledType}}`);let s=`"and":[${n}]`;return r.name="products/count",r.method="GET",r.data=`where={${s}${i}}`,this.http.get(`${a.N.apiUrlv7}${r.name}?${r.data}`)}getCount(e="",t=-1,r="",n="",i){var s={name:"products/counts",method:"GET"};if(s.name+="?where[price][between][0]=0&where[price][between][1]=20000",n&&""!=n)if("today"==n||"yesterday"==n||"week"==n||"month"==n||"year"==n)s.name=`${s.name}&where[date]=${n}`;else{let e=n.split("/");s.name=""!=e[1]?`${s.name}&where[date]=custom&where[between]=["${e[0]} 00:00:00", "${e[1]} 23:59:59"]`:`${s.name}&where[date]=custom&where[between]=["${e[0]} 00:00:00", "${e[0]} 23:59:59"]`}return this.http.get(`${a.N.apiUrlv7}${s.name}`)}deleteProduct(e){var t={};return t.name=`products/${e}`,t.method="DELETE",this.http.delete(`${this._authService.updSNAEnvURL("v5")}${t.name}`)}editProduct(e,t){var r={};return r.name=`products/${t}`,r.method="PATCH",r.data=e,this.http.patch(`${this._authService.updSNAEnvURL("v5")}${r.name}`,r.data)}exportProductsXLS(e,t=""){let r=this._authService.updSNAEnvURL("v5")+"products/xlsxexport?filter[include]=productmedia";return e.prodAmount&&2==e.prodAmount.length&&(r+=`&filter[where][price][lte]=${e.prodAmount[1]}&filter[where][price][gte]=${e.prodAmount[0]}`),e.sortByDate&&(r+="&filter[order]=created DESC"),t&&(r+=`&filter[where][id]=${t}`),this.http.get(`${r}`,{observe:"response",responseType:"blob"}).pipe((0,b.U)(e=>new Blob([e.body])))}exportProductsCSV(e,t=""){let r=this._authService.updSNAEnvURL("v5")+"products/xlsxexport?filter[include]=productmedia";return e.prodAmount&&2==e.prodAmount.length&&(r+=`&filter[where][price][lte]=${e.prodAmount[1]}&filter[where][price][gte]=${e.prodAmount[0]}`),e.sortByDate&&(r+="&filter[order]=created DESC"),t&&(r+=`&filter[where][id]=${t}`),this.http.get(`${r}`,{observe:"response",responseType:"blob"}).pipe((0,b.U)(e=>new Blob([e.body])))}exportProductsPDF(e,t=""){let r=this._authService.updSNAEnvURL("v5")+"products/pdfexport?filter[include]=productmedia";return e.prodAmount&&2==e.prodAmount.length&&(r+=`&filter[where][price][lte]=${e.prodAmount[1]}&filter[where][price][gte]=${e.prodAmount[0]}`),e.sortByDate&&(r+="&filter[order]=created DESC"),t&&(r+=`&filter[where][id]=${t}`),this.http.get(`${r}`,{observe:"response",responseType:"blob"}).pipe((0,b.U)(e=>new Blob([e.body])))}}return e.\u0275fac=function(t){return new(t||e)(o.LFG(l.eN),o.LFG(n.$))},e.\u0275prov=o.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),w=(()=>{class e{constructor(e,t){this.http=e,this._authService=t,this.OBProductId=new o.vpe,this.OBOrderId=new o.vpe}changeOrderStatus(e){var t={};return t.name=`orders/${e}`,t.method="PATCH",t.data={orderstatusId:2},this.http.patch(`${this._authService.updSNAEnvURL("v5")}${t.name}`,t.data)}getAllOrderList(e=0,t=10,r="date",n=!0,i="",a="",s="",o=-1,l="",c=""){var d={name:"orders",method:"GET",data:""};const u=this._authService?.currentUserValue;if(d.name+=14===u?.roleId||16===u?.roleId?`?filter[where][vendorId]=${u?.mainMerchantId}`:`?filter[where][vendorId]=${u?.id}`,i&&""!=i)if("today"==i||"yesterday"==i||"week"==i||"month"==i||"year"==i)d.name=`${d.name}&filter[where][dateFilter]=${i}`;else{let e=i.split("/");d.name=""!=e[1]?`${d.name}&filter[where][dateFilter]=custom&filter[where][between]=["${e[0]} 00:00:00", "${e[1]} 23:59:59"]`:`${d.name}&filter[where][dateFilter]=custom&filter[where][between]=["${e[0]} 00:00:00", "${e[0]} 23:59:59"]`}return a&&(d.name=`${d.name}&filter[where][transactionNumber]=${a}`),s&&(d.name=`${d.name}&filter[where][orderno][like]=%${s}%`),o&&-1!=o&&(d.name=`${d.name}&filter[where][orderstatusId]=${o}`),l&&(d.name=`${d.name}&filter[where][buyerName]=${l}`),c&&(d.name=`${d.name}
1&filter[where][productname]=${c}`),d.name=`${d.name}&filter[include][0]=transaction&filter[include][1]=customerId&filter[include][2]=orderstatus&filter[skip]=${e}&filter[limit]=${t}&filter[order]=created DESC`,this.http.get(`${this._authService.updSNAEnvURL("v5")}${d.name}`)}getDataCount(e="date",t=!0,r="",n="",i="",a=-1,s="",o=""){var l={};const c=this._authService?.currentUserValue;if(l.name=`orders/count?where[vendorId]=${1===c?.roleId?c?.id:c?.mainMerchantId}`,l.method="GET",l.data="",r&&""!=r)if("today"==r||"yesterday"==r||"week"==r||"month"==r||"year"==r)l.name=`${l.name}&[where][dateFilter]=${r}`;else{let e=r.split("/");l.name=""!=e[1]?`${l.name}&[where][dateFilter]=custom&[where][between]=["${e[0]} 00:00:00", "${e[1]} 23:59:59"]`:`${l.name}&[where][dateFilter]=custom&[where][between]=["${e[0]} 00:00:00", "${e[0]} 23:59:59"]`}return n&&(l.name=`${l.name}&[where][transactionNumber]=${n}`),i&&(l.name=`${l.name}&[where][orderno][like]=%${i}%`),a&&-1!=a&&(l.name=`${l.name}&[where][orderstatusId]=${a}`),s&&(l.name=`${l.name}&[where][buyerName]=${s}`),o&&(l.name=`${l.name}&[where][productname]=${o}`),this.http.get(`${this._authService.updSNAEnvURL("v5")}${l.name}`)}getTypeCount(e="",t,r,n,i,a){var s={name:"orders/counts",method:"GET",data:""};const o=this._authService?.currentUserValue;if(s.name+=14===o?.roleId||16===o?.roleId?`?where[vendorId]=${o?.mainMerchantId}`:`?where[vendorId]=${o?.id}`,e&&""!=e)if("today"==e||"yesterday"==e||"week"==e||"month"==e||"year"==e)s.name=`${s.name}&where[dateFilter]=${e}`;else{let t=e.split("/");s.name=""!=t[1]?`${s.name}&where[dateFilter]=custom&where[between]=["${t[0]} 00:00:00", "${t[1]} 23:59:59"]`:`${s.name}&where[dateFilter]=custom&where[between]=["${t[0]} 00:00:00", "${t[0]} 23:59:59"]`}return this.http.get(`${this._authService.updSNAEnvURL("v5")}${s.name}`)}setOBProductId(e){this.OBProductId.emit(e)}setObOrderId(e){this.OBOrderId.emit(e)}}return e.\u0275fac=function(t){return new(t||e)(o.LFG(l.eN),o.LFG(n.$))},e.\u0275prov=o.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var I=r(17188),T=r(35637),E=r(97425),A=r(89666),$=r(54616),C=r(82051),P=r(34115),x=r(60649);let N=(()=>{class e{constructor(e,t,r,n,i){this.http=e,this._authService=t,this._commonHelperService=r,this._snackbarService=n,this.translate=i,this.id=0,this.MAP_REPORT_TYPE_ID={settlement:6,store_order:5,transaction:3,invoice:1,subscription:-1,terminal:8,device:-1,pos_transaction:9},this.MAP_REPORT_ID_TYPE={1:{code:"INV_PAYMENTS_DETAILS",label:"Invoice Payments Details"},3:{code:"TRAX_DETAILS",label:"Transactions Details"},5:{code:"STORE_ORDERS_DETAILS",label:"Store Orders Details"},6:{code:"SETTLEMENT_DETAILS",label:"Settlement Details"},8:{code:"POS_TERMINAL_DETAILS",label:"POS Terminals Details"},9:{code:"POS_TRAX_DETAILS",label:"POS Transactions Details"}},this.MAP_REPORTFORMAT_ID={pdf:1,xlsx:2,csv:3},this.dupKafkaReportSubj=new E.X(null),this.dupKafkaReport$=this.dupKafkaReportSubj.asObservable(),this.statementPollSubj=new A.x,this.statementPoll$=this.statementPollSubj.asObservable(),this.reportToastDisplayTime=5e3,this.MAP_REPORT_API={settlement:"reporthistories/settlementReports",store_order:"reporthistories/orderReports",transaction:"reporthistories/transactionDetailsReport",invoice:"reporthistories/invoiceReports",subscription:"reporthistories/sub
1scriptionDetailsReports",terminal:"reporthistories/posTerminalSummaryReport",device:"reporthistories/posDeviceSummaryReport",pos_transaction:"reporthistories/posTransactionDetailReport"},this.apiV7URLs=["reporthistories/settlementReports","reporthistories/orderReports","reporthistories/transactionDetailsReport","reporthistories/invoiceReports","reporthistories/subscriptionDetailsReports","reporthistories/posTransactionDetailReport","reporthistories/posTerminalSummaryReport"],this.getRoleId(),this.getMerEmail(),this.getTranslate(),this.translate.onLangChange.subscribe(e=>{this.getTranslate()})}getTranslate(){this.translate.get(["POS_TRAX_DETAILS","POS_TERMINAL_DETAILS","TRAX_DETAILS","INV_PAYMENTS_DETAILS","SETTLEMENT_DETAILS","STORE_ORDERS_DETAILS"]).subscribe(e=>{this.language_text=e})}getReportTransName(e){return this.language_text?.[e]||e}getId(){return this.id=this._authService?.currentUserValue?.id,this.id}getRoleId(){return this.roleId=this._authService?.currentUserValue?.roleId,this.roleId}getMerEmail(){return this.merEmail=this._authService?.currentUserValue?.email,this.merEmail}getReportListing({skip:e=0,limit:t=5,reportType:r="",date:n="",wRequestStatus:i=-1,payoutStatus:s=-1,transactionId:o="",orderNumber:l="",buyerName:c="",productItemName:d="",orderStatus:u=-1,terminalId:p="",authNumber:h="",cusEmailId:g="",cusName:m="",rrn:f="",traxStatus:v=-1,quickSelect:_=-1,traxType:S="",traxSource:b="",integSource:y=-1,paymentMethod:w="",cardType:I="",authStatus:T=-1,traxId:E="",invoiceNumber:A="",status:C=-1,invCreatedSource:P=-1,cusMob:x="",terminalLocation:N="",disStatus:O=-1,deviceStatus:U=-1,deviceType:L=-1,refundStatus:M=-1,cardEntry:D=-1,bankID:R=-1,subscriptionId:Z="",subscriberName:k="",subscriptionPaidStatus:q="",subsFrequency:V=-1,terminalStatus:F=-1,deviceId:Y="",deviceDeviceType:H="",merUser:j=-1,integType:J=-1,terminalName:B="",devSerialNumber:W="",deviceModal:G="",liveDeviceStatus:Q="",mulTerminal:K="",batchNumber:z="",withType:X=""}){let ee=a.N.apiUrl;this.getId(),this.getRoleId();var te={};if(te.name=`${this.MAP_REPORT_API[r]}`,this.apiV7URLs.includes(te.name)&&(ee=this._authService.updSNAEnvURL("v5")),te.method="GET",te.data=`filter[skip]=${e}&filter[limit]=${t}&filter[order]=created DESC`,""!=n){n.split("/");const{startDateTime:e,endDateTime:t}=(0,$.dq)(n);te.data=`${te.data}&filter[where][created][between][0]=${e}&filter[where][created][between][1]=${t}`}return"settlement"==r?te.data=this.setSettDetailFilter(te.data,i,s,R,j,X):"store_order"==r?te.data=this.setOrderDetailFilter(te.data,o,l,c,d,u):"transaction"==r?te.data=this.setTraxDetailFilter(te.data,o,p,h,g,m,f,v,_,S,b,y,w,I,T,J,z):"invoice"==r?te.data=this.setInvoiceDetailFilter(te.data,E,A,C,P,m,x,g,j):"subscription"==r?te.data=this.setSubscriptionDetailFilter(te.data,E,Z,k,q,V):"terminal"==r?te.data=this.setTerminalDetailFilter(te.data,p,B,N,F,I,w,G,Q,W):"device"==r?te.data=this.setDeviceDetailFilter(te.data,Y,p,H,U,I,w):"pos_transaction"==r&&(te.data=this.setPOSTransactionDetailFilter(te.data,o,p,N,f,v,O,U,L,M,w,I,D,S,K,z)),this.http.get(`${ee}${te.name}?${te.data}`)}downloadReport({reportType:e="",reportFormat:t="csv",date:r="",wRequestStatus:n=-1,payoutStatus:i=-1,transactionId:s="",orderNumber:o="",buyerName:l="",productItemName:c="",orderStatus:d=-1,terminalId:u="",authNumber:p="",cusEmailId:h="",cusName:g="",rrn:m="",traxStatus:f=-1,quickSelect:v=-1,traxType:_="",traxSource:S="",integSource:y=-1,paymentMethod:w="",cardType:I="",authStatus:T=-1,traxId:E="",invoiceNumber:A="",status:C=-1,invCreatedSource:P=-1,cusMob:x="",terminalLocation:N="",disStatus:O=-1,deviceStatus:U=-1,deviceType:L=-1,refundStatus:M=-1,cardEntry:D=-1,bankID:R=-1,subscriptionId:Z="",subscriberName:k="",subscriptionPaidStatus:q="",subsFrequency:V=-1,terminalStatus:F=-1,deviceId:Y="",deviceDeviceType:H="",merUser:j=-1,integType:J=-1,terminalName:B="",devSerialNumber:W="",deviceModal:G="",liveDeviceStatus:Q="",mulTerminal:K="",batchNumber:z="",withType:X=""}){this.getId();let ee=`${a.N.apiUrl}${this.MAP_REPORT_API[e]}`;if(""!=r){r.split("/");const{startDateTime:e,endDateTime:t}=(0,$.dq)(r);ee=`${ee}?filter[where][created][between][0]=${e}&filter[where][created][between][1]=${t}`}return ee=`${ee}&filter[order]=created DESC`,t&&(ee="csv"==t?`${ee}&isCsv=true`:"pdf"==t?`${ee}&isPdf=true`:`${ee}&isExcel=true`),"settlement"==e?ee=this.setSettDetailFilter(ee,n,i,R,j,X):"store_order"==e?ee=this.setOrderDetailFilter(ee,s,o,l,c,d):"transaction"==e?ee=this.setTraxDetailFilter(ee,s,u,p,h,g,m,f,v,_,S,y,w,I,T,J,z):"invoice"==e?ee=this.setInvoiceDetailFilter(ee,E,A,C,P,g,x,h,j):"subscription"==e?ee=this.setSubscriptionDetailFilter(ee,E,Z,k,q,V):"terminal"==e?ee=this.setTerminalDetailFilter(ee,u,B,N,F,I,w,G,Q,W):"device"==e?ee=this.setDeviceDetailFilter(ee,Y,u,H,U,I,w):"pos_transaction"==e&&(ee=this.setPOSTransactionDetailFilter(ee,s,u,N,m,f,O,U,L,M,w,I,D,_,K,z)),this.http.get(ee,{observe:"response",responseType:"blob"}).pipe((0,b.U)(e=>new Blob([e.body])))}sendReport({reportType:e="",reportFormat:t="csv",date:r="",wRequestStatus:n=-1,payoutStatus:i=-1,transactionId:s="",orderNumber:o="",buyerName:l="",productItemName:c="",orderStatus:d=-1,terminalId:u="",authNumber:p="",cusEmailId:h="",cusName:g="",rrn:m
1="",traxStatus:f=-1,quickSelect:v=-1,traxType:_="",traxSource:S="",integSource:b=-1,paymentMethod:y="",cardType:w="",authStatus:I=-1,traxId:T="",invoiceNumber:E="",status:A=-1,invCreatedSource:C=-1,cusMob:P="",terminalLocation:x="",disStatus:N=-1,deviceStatus:O=-1,deviceType:U=-1,refundStatus:L=-1,cardEntry:M=-1,bankID:D=-1,subscriptionId:R="",subscriberName:Z="",subscriptionPaidStatus:k="",subsFrequency:q=-1,terminalStatus:V=-1,deviceId:F="",deviceDeviceType:Y="",merUser:H=-1,integType:j=-1,terminalName:J="",devSerialNumber:B="",deviceModal:W="",liveDeviceStatus:G="",mulTerminal:Q="",batchNumber:K="",withType:z=""}){this.getId();var X={};if(X.name=`${this.MAP_REPORT_API[e]}`,X.method="GET",""!=r){r.split("/");const{startDateTime:e,endDateTime:t}=(0,$.dq)(r);X.data=`filter[where][created][between][0]=${e}&filter[where][created][between][1]=${t}`}return X.data=`${X.data}&filter[order]=created DESC`,t&&(X.data="csv"==t?`${X.data}&isCsv=true`:"pdf"==t?`${X.data}&isPdf=true`:`${X.data}&isExcel=true`),"settlement"==e?X.data=this.setSettDetailFilter(X.data,n,i,D,H,z):"store_order"==e?X.data=this.setOrderDetailFilter(X.data,s,o,l,c,d):"transaction"==e?X.data=this.setTraxDetailFilter(X.data,s,u,p,h,g,m,f,v,_,S,b,y,w,I,j,K):"invoice"==e?X.data=this.setInvoiceDetailFilter(X.data,T,E,A,C,g,P,h,H):"subscription"==e?X.data=this.setSubscriptionDetailFilter(X.data,T,R,Z,k,q):"terminal"==e?X.data=this.setTerminalDetailFilter(X.data,u,J,x,V,w,y,W,G,B):"device"==e?X.data=this.setDeviceDetailFilter(X.data,F,u,Y,O,w,y):"pos_transaction"==e&&(X.data=this.setPOSTransactionDetailFilter(X.data,s,u,x,m,f,N,O,U,L,y,w,M,_,Q,K)),X.data=`${X.data}&isEmail=true`,this.http.get(`${a.N.apiUrl}${X.name}?${X.data}`)}setSettDetailFilterKafka(e,t,r,n,i,a){let s={where:{}};return-1!==t&&(s.where.withdrawalrequeststatusId=1===t?{inq:[t,5]}:{inq:[t]}),-1!==r&&(s.where.payoutstatus=r),-1!==n&&(s.where.userbankId=n),-1!==i&&(s.where.createdby=i),""!==a&&(s.where.withdrawaltype=a),console.log("setSettDetailFilterKafka filters:",s),s}setSettDetailFilter(e,t,r,n,i,a){return-1!=t&&(e=1==t?`${e}&filter[where][withdrawalrequeststatusId][inq][0]=${t}&filter[where][withdrawalrequeststatusId][inq][1]=5`:`${e}&filter[where][withdrawalrequeststatusId][inq][0]=${t}`),-1!=r&&(e=`${e}&filter[where][payoutstatus]=${r}`),-1!=n&&(e=`${e}&filter[where][userbankId]=${n}`),-1!=i&&(e=`${e}&filter[where][createdby]=${i}`),""!=a&&(e=`${e}&filter[where][withdrawaltype]=${a}`),e}setOrderDetailFilterKafka(e,t,r,n,i,a){let s={where:{}};return""!==t&&(s.where.transactionId=t),""!==r&&(s.where.orderno={like:`%${r}%`}),""!==n&&(s.where.buyername=n),""!==i&&(s.where.productname=i),-1!==a&&(s.where.orderstatusId=a),console.log("setOrderDetailFilterKafka filters:",s),s}setOrderDetailFilter(e,t,r,n,i,a){return""!=t&&(e=`${e}&filter[where][transactionId]=${t}`),""!=r&&(e=`${e}&filter[where][orderno][like]=%${r}%`),""!=n&&(e=`${e}&filter[where][buyername]=${n}`),""!=i&&(e=`${e}&filter[where][productname]=${i}`),-1!=a&&(e=`${e}&filter[where][orderstatusId]=${a}`),e}setTraxDetailFilterKafka(e,t,r,n,i,a,s,o,l,c,d,u,p,h,g,m,f){let v={where:{}};return v.where.transferType="receive",""!==n&&(v.where.authNumber=n),""!==h&&(v.where.cardtype=h),""!==p&&("HIMYAN"===p?v.where.cardtype=p:v.where.paymentmethod=p),""!==s&&(v.where.rrn=s),""!==t&&(v.where.invoicenumber={like:`%${t}%`}),-1!==o&&(c&&o?"dispute"===c?v.where.disputestatusId=o:("refund"===c||"payments"===c)&&(v.where.transactionstatusId=o):v.where.transactionstatusId=o,c=""),""!==c&&(v.where.transactionType=c),""!==d&&(v.where.transactionSource=d),""!==a&&(v.where.customerName=a),-1!==m&&(v.where.transactionentityId=m),""!==f&&(v.where.batch_id=f),console.log("setTraxDetailFilterKafkafilters:",v),v}setTraxDetailFilter(e,t,r,n,i,a,s,o,l,c,d,u,p,h,g,m,f){return e=`${e}&[filter][where][transferType]=receive`,""!=n&&(e=`${e}&filter[where][authNumber]=${n}`),""!=h&&(e=`${e}&filter[where][cardtype]=${h}`),""!=p&&(e="HIMYAN"==p?`${e}&filter[where][cardtype]=${p}`:`${e}&filter[where][paymentmethod]=${p}`),""!=s&&(e=`${e}&filter[where][rrn]=${s}`),""!=t&&(e=`${e}&filter[where][invoicenumber][like]=%${t}%`),-1!=o&&(c&&o?"dispute"==c?e=`${e}&filter[where][disputestatusId]=${o}`:("refund"==c||"payments"==c)&&(e=`${e}&filter[where][transactionstatusId]=${o}`):e=`${e}&filter[where][transactionstatusId]=${o}`,c=""),""!=c&&(e=`${e}&filter[where][transactionType]=${c}`),""!=d&&(e=`${e}&filter[where][transactionSource]=${d}`),""!=a&&(e=`${e}&filter[where][customerName]=${a}`),-1!=m&&(e=`${e}&filter[where][transactionentityId]=${m}`),""!=f&&(e=`${e}&filter[where][batch_id]=${f}`),e}setInvoiceDetailFilterKafka(e,t,r,n,i,a,s,o,l){let c={where:{}};return""!==t&&(c.where.transactionId=t),""!==r&&(c.where.invoiceno={like:`%${r}%`}),-1!==n&&(c.where.invoicestatusId=n),-1!==i&&(c.where.sourceofinvoice=i),""!==a&&(c.where.clientname={like:`%${a}%`}),""!==s&&(c.where.cellno={like:`%${s}%`}),""!==o&&(c.where.emailaddress={like:`%${o}%`}),-1!==l&&(c.where.createdby=l),console.log("setInvoiceDetailFilterKafka filters:",c),c}setInvoiceDetailFilter(e,t,r,n,i,a,s,o,l){return""!=t&&(e=`${e}&filter[where][transactionId]=${t}`),""!=r&&(e=`${e}&filter[where][invoiceno][like]=%${r}%`),-1!=n&&(e=`${e}&filter[where][invoicestatusId]=${n}`),-1!=i&&(e=`${e}&filter[where][sourceofinvoice]=${i}`),""!=a&&(e=`${e}&filter[where][clientname][like]=%${a}%`),""!=s&&(e=`${e}&filter[where][cellno][like]=%${s}%`),""!=o&&(e=`${e}&filter[where][emailaddress][like]=%${o}%`),-1!=l&&(e=`${e}&filter[where][createdby]=${l}`),e}setSubscriptionDetailFilterKafka(e,t,r,n,i,a){let s={where:{}};return""!==t&&(s.where.transactionId=t),""!==r&&(s.where.subscriptionno={like:`%${r}%`}),""!==n&&(s.where.subscriberName=n),""!==i&&(s.where.subscriptionPaidStatus=i),-1!==a&&(s.where.subscriptionFrequency=a),console.log("setSubscriptionDetailFilterKafka filters:",s),s}setSubscriptionDetailFilter(e,t,r,n,i,a){return""!=t&&(e=`${e}&filter[where][transactionId]=${t}`),""!=r&&(e=`${e}&filter[where][subscriptionno][like]=%${r}%`),""!=n&&(e=`${e}&filter[where][subscriberName]=${n}`),""!=i&&(e=`${e}&filter[where][subscriptionPaidStatus]=${i}`),-1!=a&&(e=`${e}&filter[where][subscriptionFrequency]=${a}
1`),e}setTerminalDetailFilterKafka(e,t,r,n,i,a,s,o,l,c){let d={where:{}};return""!==t&&(d.where.terminalId={like:`%${t}%`}),""!==r&&(d.where.terminalName=r),""!==n&&(d.where.location=n),-1!==i&&(d.where.is_active=i),""!==a&&(d.where.card_type=a),""!==s&&(d.where.payment_method=s),""!==o&&(d.where.deviceType=o),""!==l&&(d.where.is_online=l),""!==c&&(d.where.deviceSerialNo=c),console.log("setTerminalDetailFilterKafka filters:",d),d}setTerminalDetailFilter(e,t,r,n,i,a,s,o,l,c){return""!=t&&(e=`${e}&filter[where][terminalId][like]=%${t}%`),""!=r&&(e=`${e}&filter[where][terminalName]=${r}`),""!=n&&(e=`${e}&filter[where][location]=${n}`),-1!=i&&(e=`${e}&filter[where][is_active]=${i}`),""!=a&&(e=`${e}&filter[where][card_type]=${a}`),""!=s&&(e=`${e}&filter[where][payment_method]=${s}`),""!=o&&(e=`${e}&filter[where][deviceType]=${o}`),""!=l&&(e=`${e}&filter[where][is_online]=${l}`),""!=c&&(e=`${e}&filter[where][deviceSerialNo]=${c}`),e}setDeviceDetailFilterKafka(e,t,r,n,i,a,s){let o={where:{}};return""!==t&&(o.where.deviceId={like:`%${t}%`}),""!==r&&(o.where.terminalId=r),""!==n&&(o.where.devicetype=n),-1!==i&&(o.where.terminalStatus=i),""!==a&&(o.where.card_type=a),""!==s&&(o.where.payment_method=s),console.log("setDeviceDetailFilterKafka filters:",o),o}setDeviceDetailFilter(e,t,r,n,i,a,s){return""!=t&&(e=`${e}&filter[where][deviceId][like]=%${t}%`),""!=r&&(e=`${e}&filter[where][terminalId]=${r}`),""!=n&&(e=`${e}&filter[where][devicetype]=${n}`),-1!=i&&(e=`${e}&filter[where][terminalStatus]=${i}`),""!=a&&(e=`${e}&filter[where][card_type]=${a}`),""!=s&&(e=`${e}&filter[where][payment_method]=${s}`),e}setPOSTransactionDetailFilterKafka(e,t,r,n,i,a,s,o,l,c,d,u,p,h,g,m,f){let v={where:{}};if(""!==t&&(v.where.invoicenumber={like:`%${t}%`}),""!==r&&(v.where.tid={like:`%${r}%`}),""!==n&&(v.where.terminalLocation=n),""!==i&&(v.where.rrn={like:`%${i}%`}),-1!==a&&(v.where.transactionstatus=a),-1!==s&&(v.where.disputestatusId=s),-1!==o&&(v.where.devicestatus=o),-1!==l&&(v.where.devicetypeId=l),-1!==c&&(v.where.refundstatusId=c),""!==d&&(v.where.network=d),""!==u&&("wallet"===u?v.where.transactionmodeId=6:v.where.card_payment_type=u),""!==p&&(v.where.card_type=p),""!==h&&
1(v.where.transaction_type=h),""!==g){let e=g.split(",");v.where.tid={inq:e}}return""!==m&&(v.where.batch_id=m),-1!==f&&(v.where.is_tip_included=f),console.log("setPOSTransactionDetailFilterKafka filters:",v),v}setPOSTransactionDetailFilter(e,t,r,n,i,a,s,o,l,c,d,u,p,h,g,m){return""!=t&&(e=`${e}&filter[where][invoicenumber][like]=%${t}%`),""!=r&&(e=`${e}&filter[where][tid][like]=%${r}%`),""!=n&&(e=`${e}&filter[where][terminalLocation]=${n}`),""!=i&&(e=`${e}&filter[where][rrn][like]=%${i}%`),-1!=a&&(e=`${e}&filter[where][transactionstatus]=${a}`),-1!=s&&(e=`${e}&filter[where][disputestatusId]=${s}`),-1!=o&&(e=`${e}&filter[where][devicestatus]=${o}`),-1!=l&&(e=`${e}&filter[where][devicetypeId]=${l}`),-1!=c&&(e=`${e}&filter[where][refundstatusId]=${c}`),""!=d&&(e=`${e}&filter[where][network]=${d}`),""!=u&&(e="wallet"==u?`${e}&filter[where][transactionmodeId]=6`:`${e}&filter[where][card_payment_type]=${u}`),""!=p&&(e=`${e}&filter[where][card_type]=${p}`),""!=h&&(e=`${e}&filter[where][transaction_type]=${h}`),""!=g&&g.split(",").forEach((t,r)=>{e=`${e}&filter[where][tid][inq][${r}]=${t}`}),""!=m&&(e=`${e}&filter[where][batch_id]=${m}`),e}getDownloadHisListing(e,t,r="",n=-1,i=-1,a=!1){this.getId(),"/"==r&&(r="");var s={name:"reporthistories",method:"GET"};if(s.data=`filter[include][0]=user&filter[include][1]=reporttype&filter[include][2]=createdby&filter[skip]=${e}&filter[limit]=${t}&filter[where][ispos]=${a}&filter[order]=created DESC`,r){let e=r.split("/");s.data=""!=e[1]?`${s.data}&filter[where][created][between][0]=${e[0]} 00:00:00&filter[where][created][between][1]=${e[1]} 23:59:59`:`${s.data}&filter[where][created][between][0]=${e[0]} 00:00:00&filter[where][created][between][1]=${e[0]} 23:59:59`}return-1!=n&&(s.data=`${s.data}&filter[where][createdby]=${n}`),-1!=i&&(s.data=`${s.data}&filter[where][reporttypeId]=${i}`),this.http.get(`${this._authService.updSNAEnvURL("v5")}${s.name}?${s.data}`)}getDownloadHisCount(e,t,r="",n=-1,i=-1,a=!1){this.getId(),"/"==r&&(r="");var s={name:"reporthistories/count",method:"GET"};if(s.data=`where[ispos]=${a}`,r){let e=r.split("/");s.data=""!=e[1]?`${s.data}&where[created][between][0]=${e[0]} 00:00:00&where[created][between][1]=${e[1]} 23:59:59`:`${s.data}&where[created][between][0]=${e[0]} 00:00:00&where[created][between][1]=${e[0]} 23:59:59`}return-1!=n&&(s.data=`${s.data}&where[createdby]=${n}`),-1!=i&&(s.data=`${s.data}&where[reporttypeId]=${i}`),this.http.get(`${this._authService.updSNAEnvURL("v5")}${s.name}?${s.data}`)}getReportDateFormat(e){let t;if(e.includes("/")){const r=e.split("/")[0].split(" ")[0],n=e.split("/")[1]?e.split("/")[1].split(" ")[0]:"";t=s(r,"YYYY-MM-DD").format("DD MMM YYYY"),n&&(t=t+" - "+s(n,"YYYY-MM-DD").format("DD MMM YYYY"))}return t}sendRprtDownloadKafkaReq({reportType:e="",reportFormat:t="csv",date:r="",wRequestStatus:n=-1,payoutStatus:i=-1,transactionId:s="",orderNumber:o="",buyerName:l="",productItemName:c="",orderStatus:d=-1,terminalId:u="",authNumber:p="",cusEmailId:h="",cusName:g="",rrn:m="",traxStatus:f=-1,quickSelect:v=-1,traxType:_="",traxSource:S="",integSource:b=-1,paymentMethod:y="",cardType:w="",authStatus:I=-1,traxId:T="",invoiceNumber:E="",status:A=-1,invCreatedSource:C=-1,cusMob:P="",terminalLocation:x="",disStatus:N=-1,deviceStatus:O=-1,deviceType:U=-1,refundStatus:L=-1,cardEntry:M=-1,bankID:D=-1,subscriptionId:R="",subscriberName:Z="",subscriptionPaidStatus:k="",subsFrequency:q=-1,terminalStatus:V=-1,deviceId:F="",deviceDeviceType:Y="",merUser:H=-1,integType:j=-1,terminalName:J="",devSerialNumber:B="",deviceModal:W="",liveDeviceStatus:G="",mulTerminal:Q="",batchNumber:K="",withType:z="",tipEnabledType:X=-1,KafkaDeliveryOpt:ee=2}){this.getId();let te,re={report_type:this.MAP_REPORT_TYPE_ID[e],delivery_option:ee,format:this.MAP_REPORTFORMAT_ID[t],device_type:2,date_filter:"custom",date_from:"",date_to:""},ne=`${a.N.apiUrl}${this.MAP_REPORT_API[e]}`;if(""!=r){r.split("/");const{startDateTime:e,endDateTime:t}=(0,$.dq)(r);re.date_from=e,re.date_to=t,ne=`${ne}?filter[where][created][between][0]=${e}&filter[where][created][between][1]=${t}`}ne=`${ne}&filter[order]=created DESC`,t&&(ne="csv"==t?`${ne}&isCsv=true`:"pdf"==t?`${ne}&isPdf=true`:`${ne}&isExcel=true`),"settlement"==e?te=this.setSettDetailFilterKafka(ne,n,i,D,H,z):"store_order"==e?te=this.setOrderDetailFilterKafka(ne,s,o,l,c,d):"transaction"==e?te=this.setTraxDetailFilterKafka(ne,s,u,p,h,g,m,f,v,_,S,b,y,w,I,j,K):"invoice"==e?te=this.setInvoiceDetailFilterKafka(ne,T,E,A,C,g,P,h,H):"subscription"==e?te=this.setSubscriptionDetailFilterKafka(ne,T,R,Z,k,q):"terminal"==e?te=this.setTerminalDetailFilterKafka(ne,u,J,x,V,w,y,W,G,B):"device"==e?te=this.setDeviceDetailFilterKafka(ne,F,u,Y,O,w,y):"pos_transaction"==e&&(te=this.setPOSTransactionDetailFilterKafka(ne,s,u,x,m,f,N,O,U,L,y,w,M,_,Q,K,X)),re.filters=te,console.log("params.filters",re.filters);var ie={name:"reporthistories",method:"POST"};return ie.data=re,this.http.post(`${a.N.apiUrlv7}${ie.name}`,ie.data)}getDownReqStatus(e=null,t=null){let r=`${a.N.apiUrlv7}reporthistories/bulkPollStatus`,n=[];if(e?.length){const t=Array.isArray(e)?e.join(","):e;n.push(`request_ids=${t}`)}if(t?.length){const e=Array.isArray(t)?t.join(","):t;n.push(`statement_request_ids=${e}`)}return n.length>0&&(r=`${r}?${n.join("&")}`),this.http.get(r)}downloadKafkaReport(e){var t={};return t.name=`reporthistories/downloadLink/${e}`,t.method="GET",this.http.get(`${a.N.apiUrlv7}
1${t.name}`,{observe:"response",responseType:"blob"}).pipe((0,b.U)(e=>new Blob([e.body])))}openDupKafReportModal(e){this.dupKafkaReportSubj.next(e)}clearDupKafkaReport(){this.dupKafkaReportSubj.next(null)}getKafkaReportName(e,t){var r=this;return(0,d.Z)(function*(){const n=r.MAP_REPORT_ID_TYPE[t]?.label,i=yield r._commonHelperService.getFileTypeFromBlob(e),a=`${n} Report ${Date.now()}.${i}`;return(0,C.saveAs)(e,a),console.log("getKafkaReportName:",a),a})()}handleReportBulkPoll(e,t=!1){if(e?.count){let r,n=[],i=0,a=0;if(e.data.forEach(e=>{!e?.report_request_id||2!==e?.status&&3!==e?.status||n?.length||(n.push(e?.report_request_id),r=e,2===e?.status?i++:3===e?.status&&a++)}),n?.length){this._snackbarService.triggerNotificationVisibility(!1,!0);let e="",a="";1===n?.length&&(e=1===i?1==r?.delivery_option?"REPORT_READY":"REPORT_SENT_EMAIL":1==r?.delivery_option?"REPORT_GENERATION_FAILED":"REPORT_EMAIL_FAILED",a=1===i?"VIEW_DOWN":"OK"),this._commonHelperService.disDynmcTransSuccMsg({resSuccMsg:e,okmsg:a,duration:this.reportToastDisplayTime,dynText:{reportName:this.getReportTransName(this.MAP_REPORT_ID_TYPE[r?.report_type]?.code),email:this.getMerEmail()},actType:"reportDown",position:"end"}),t&&this._commonHelperService.updateDownRprtIds("remove",n)}}console.log("callDownReptIdsPolling res:",e)}getMonthName(e){const t=Number(e||0)-1;if(t>=0&&t<12){const e=new Date(2e3,t,1),n="en";try{return new Intl.DateTimeFormat(n,{month:"long"}).format(e)}catch(r){return["January","February","March","April","May","June","July","August","September","October","November","December"][t]}}return""}handleStatementBulkPoll(e,t=!1){if(e?.statement&&e.statement.length>0){let r=[];e.statement.forEach(e=>{if(e?.statement_request_id&&("completed"===e?.status_label||"failed"===e?.status_label||"empty"===e?.status_label))if(r.push(e?.statement_request_id),"completed"===e?.status_label){const t=this.getMonthName(e?.month),r=e?.year?String(e.year):"";this._commonHelperService.disDynmcTransSuccMsg({resSuccMsg:"YOUR_STATEMENT_READY_TO_DOWNLOAD",okmsg:"VIEW_DOWN",duration:this.reportToastDisplayTime,dynText:{month:t,year:r},actType:"balStatementDown"})}else this._commonHelperService.disTransErrMsg(e?.message||this.translate.instant("STATEMENT_GENERATION_FAILED_TRY_AGAIN"))}),t&&r.length>0&&this._commonHelperService.updateDownStmtIds("remove",r),this.statementPollSubj.next(e)}}getReportDownloadHistory(e,t,r="",n=-1,i=-1,s=!1){this.getId(),"/"==r&&(r="");var o={name:"reporthistories/list",method:"GET"};if(o.data=`filter[offset]=${e}&filter[limit]=${t}`,r){let e=r.split("/");o.data=""!=e[1]?`${o.data}&filter[where][requested_at][gte]=${e[0]} 00:00:00&filter[where][requested_at][lte]=${e[1]} 23:59:59`:`${o.data}&filter[where][requested_at][gte]=${e[0]} 00:00:00&filter[where][requested_at][lte]=${e[0]} 23:59:59`}return-1!=n&&(o.data=`${o.data}&filter[merchant_id]=${n}`),o.data=-1!=i?`${o.data}&filter[where][report_type]=${i}`:s?`${o.data}&filter[where][report_type]=6,8,9`:`${o.data}&filter[where][report_type]=1,3,5,6`,this.http.get(`${a.N.apiUrlv7}${o.name}?${o.data}`)}resendReportEmail(e=null){var t={name:"reporthistories/resendReportEmail",method:"POST"};return t.data={request_id:e},this.http.post(`${a.N.apiUrlv7}${t.name}`,t.data)}}return e.\u0275fac=function(t){return new(t||e)(o.LFG(l.eN),o.LFG(n.$),o.LFG(i.$),o.LFG(P.o),o.LFG(x.sK))},e.\u0275prov=o.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),O=(()=>{class e{constructor(e,t){this.http=e,this._authService=t}setIds(){}createUser(e){this.setIds(),e.mainMerchantId=this._authService?.currentUserValue?.
1id,e.agreement=1;var t={name:"users/createsubuser",method:"POST"};return t.data=e,this.http.post(`${this._authService.updSNAEnvURL("v6")}${t.name}`,t.data)}getUserList(){return this.http.get(`${this._authService.updSNAEnvURL("v6")}users/getsubusers`)}editUser(e,t){e.id=t,this.setIds();var r={name:"users/editsubuser",method:"POST"};return r.data=e,this.http.post(`${this._authService.updSNAEnvURL("v6")}${r.name}`,r.data)}toggleUser(e){var t={name:"usermetaauths/blocksubuser",method:"POST"};return t.data=e,this.http.post(`${this._authService.updSNAEnvURL("v5")}${t.name}`,t.data)}updateReminderDays(e,t){this.setIds();var r={};return r.name=`usermetapreferences/${t}`,r.method="PATCH",r.data=e,this.http.patch(`${this._authService.updSNAEnvURL("v5")}${r.name}`,r.data)}updatePayment(e,t){this.setIds();var r={};return r.name=`usermetapreferences/${t}`,r.method="PATCH",r.data=e,this.http.patch(`${this._authService.updSNAEnvURL("v5")}${r.name}`,r.data)}getNotificationDetails(){this.setIds();var e={name:"usermetapreferences",method:"GET",apiVer:"v6"};return e.data=`filter[where][userId]=${this._authService?.currentUserValue?.
1id}`,this.http.get(`${this._authService.updSNAEnvURL("v6")}${e.name}?${e.data}`)}deleteSubUser(e){var t={};return t.name=`users/deletesubuser/${e}`,t.method="DELETE",t.apiVer="v6",this.http.delete(`${this._authService.updSNAEnvURL("v6")}${t.name}`)}}return e.\u0275fac=function(t){return new(t||e)(o.LFG(l.eN),o.LFG(n.$))},e.\u0275prov=o.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),U=(()=>{class e{constructor(e,t,r){this.http=e,this._authService=t,this._snackbarService=r,this.shipOrdersRefreshSubject=new A.x,this.shipOrdersRefresh$=this.shipOrdersRefreshSubject.asObservable(),this.getId()}getId(){return this.id=this._authService?.currentUserValue?.id,this.id}refreshHoverList(){this._snackbarService.triggerNotificationVisibility(!1,!0)}requestShipOrdersRefresh(){this.shipOrdersRefreshSubject.next()}subscribe(e){this.getId();var t={name:"usermetaauths/subscribe",method:"POST"};return t.data=e,this.http.post(`${this._authService.updSNAEnvURL("v5")}${t.name}`,t.data)}getNotifications(e=0,t=10,r=-1){this.getId();
1const n=this._authService?.currentUserValue?.id;if(!n)return(0,h.of)(null);var i={name:"notificationreceivers",method:"GET"};return i.data=`filter[where][notificationreceiverId]=${n}&filter[include]=notification&filter[order]=created DESC&filter[skip]=${e}&filter[limit]=${t}`,-1!=r&&(i.data=`${i.data}&filter[where][notificationentityId]=${r}`),this.http.get(`${a.N.apiUrlv7}${i.name}?${i.data}`).pipe((0,g.K)(()=>(0,h.of)(null)))}markSingleNotificationAsRead(e){this.getId();var t={};return t.name=`notificationreceivers/${e}`,t.method="PATCH",t.data={isread:1},this.http.patch(`${a.N.apiUrlv7}${t.name}`,t.data)}markAllNotificationAsRead(){this.getId();const e=this._authService?.currentUserValue?.id;if(!e)return(0,h.of)(null);var t={};return t.name=`notificationreceivers/update?where[notificationreceiverId]=${e}&where[isread]=0`,t.method="POST",t.data={isread:1},this.http.post(`${a.N.apiUrlv7}${t.name}`,t.data)}}return e.\u0275fac=function(t){return new(t||e)(o.LFG(l.eN),o.LFG(n.$),o.LFG(P.o))},e.\u0275prov=o.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var L=r(73006),M=r(54391);let D=(()=>{class e{constructor(e,t){this._auth=e,this.router=t}checkAndRedirectResolverLoggedInUser(){return this._auth?.checkAndRedirectLoggedInUserSession()?this._auth?.currentUserValue||this._auth?.getData("currentUser"):null}resolve(){let e=this.checkAndRedirectResolverLoggedInUser();return e&&"/auth/signup"!==window.location.pathname?(0,h.of)(e):this._auth?.currentUserValue&&"/auth/signup"!==window.location.pathname?(0,h.of)(this._auth?.currentUserValue):this.executeLoginResolverStreamCustom()}executeLoginResolverStreamCustom(){return this._auth&&"function"==typeof this._auth?.login?this._auth.login("","",!0).pipe((0,p.q)(1),(0,b.U)(e=>(this._auth?.isSessExpInProg?.next(!1),e)),(0,g.K)(e=>(0,h.of)({error:!0,data:null}))):(0,h.of)({error:!0,data:null})}}return e.\u0275fac=function(t){return new(t||e)(o.LFG(n.$),o.LFG(M.F0))},e.\u0275prov=o.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),R=(()=>{class e{constructor(e,t,r){this.http=e,this._authService=t,this._commonHelperService=r,this.getId()}
1getId(){return this.id=this._authService?.currentUserValue?.id,this.id}getCounters(e="",t="",r="",n=""){this.getId();var i={name:"statements/balanceCounters",method:"GET",apiVer:"v6"};if(e&&""!=e)if("today"==e||"yesterday"==e||"week"==e||"month"==e||"year"==e)i.name=`${i.name}?filter[date]=${e}`;else{let t=e.split("/");i.name=""!=t[1]?`${i.name}?filter[date]=custom&filter[between]=["${t[0]} 00:00:00", "${t[1]} 23:59:59"]`:`${i.name}?filter[date]=custom&filter[between]=["${t[0]} 00:00:00", "${t[0]} 23:59:59"]`}return t&&(i.name=`${i.name}&filter[txnSource]=${encodeURIComponent(t)}`),r&&(i.name="1"==r?`${i.name}&filter[paymentIn]=true`:`${i.name}&filter[paymentOut]=true`),n&&(i.name=`${i.name}&filter[transactionId]=${n}`),this.http.get(`${this._authService.updSNAEnvURL("v6")}${i.name}`)}getCurrentMonthCounters(e="",t="",r="",n=""){this.getId();var i={name:"statements/currentMonthBalanceCounters",method:"GET",apiVer:"v7"};if(e&&""!=e)if("today"==e||"yesterday"==e||"week"==e||"month"==e||"year"==e)i.name=`${i.name}?filter[date]=${e}`;else{let t=e.split("/");i.name=""!=t[1]?`${i.name}?filter[date]=custom&filter[between]=["${t[0]} 00:00:00", "${t[1]} 23:59:59"]`:`${i.name}?filter[date]=custom&filter[between]=["${t[0]} 00:00:00", "${t[0]} 23:59:59"]`}return t&&(i.name=`${i.name}&filter[txnSource]=${encodeURIComponent(t)}`),r&&(i.name="1"==r?`${i.name}&filter[paymentIn]=true`:`${i.name}&filter[paymentOut]=true`),n&&(i.name=`${i.name}&filter[transactionId]=${n}`),this.http.get(`${a.N.apiUrlv7}${i.name}`)}getAllBalStatementsList(e=0,t=10,r="",n="",i="",a=""){var s={};if(s.name=`statements/balanceStatement?filter[skip]=${e}&filter[limit]=${t}`,s.method="GET",s.apiVer="v6",s.data="",r&&""!=r)if("today"==r||"yesterday"==r||"week"==r||"month"==r||"year"==r)s.name=`${s.name}&filter[date]=${r}`;else{let e=r.split("/");s.name=""!=e[1]?`${s.name}&filter[date]=custom&filter[between]=["${e[0]} 00:00:00", "${e[1]} 23:59:59"]`:`${s.name}&filter[date]=custom&filter[between]=["${e[0]} 00:00:00", "${e[0]} 23:59:59"]`}n&&(s.name=`${s.name}&filter[txnSource]=${encodeURIComponent(n)}`),i&&(s.name="1"==i?`${s.name}&filter[paymentIn]=true`:`${s.name}&filter[paymentOut]=true`),a&&(s.name=`${s.name}&filter[transactionId]=${a}`);const o=(new Date).toISOString();return s.timestamp=`${o}`,this.http.get(`${this._authService.updSNAEnvURL("v6")}${s.name}`)}getCurrentMonthBalStatementsList(e=0,t=10,r="",n="",i="",s=""){var o={};if(o.name=`statements/currentMonthBalanceStatement?filter[skip]=${e}&filter[limit]=${t}`,o.method="GET",o.apiVer="v7",o.data="",r&&""!=r)if("today"==r||"yesterday"==r||"week"==r||"month"==r||"year"==r)o.name=`${o.name}&filter[date]=${r}`;else{let e=r.split("/");o.name=""!=e[1]?`${o.name}&filter[date]=custom&filter[between]=["${e[0]} 00:00:00", "${e[1]} 23:59:59"]`:`${o.name}&filter[date]=custom&filter[between]=["${e[0]} 00:00:00", "${e[0]} 23:59:59"]`}n&&(o.name=`${o.name}&filter[txnSource]=${n}`),i&&(o.name="1"==i?`${o.name}&filter[paymentIn]=true`:`${o.name}&filter[paymentOut]=true`),s&&(o.name=`${o.name}&filter[transactionId]=${s}`);const l=(new Date).toISOString();return o.timestamp=`${l}`,this.http.get(`${a.N.apiUrlv7}${o.name}`)}requestStatement(e={}){return this.http.post(`${a.N.apiUrlv7}statements/statementRequests`,e)}pollStatementRequests(e=[]){return this.http.get(`${a.N.apiUrlv7}statements/statementRequests/poll?request_ids=${e.join(",")}`)}getStatementArchive(e){return this.http.get(`${a.N.apiUrlv7}statements/statementRequests/archive?year=${e}`)}downloadStatementFile(e,t="excel",r=""){return this.http.get(`${a.N.apiUrlv7}statements/statementRequests/download/${e}?format=${t}`,{observe:"response",responseType:"blob"}).pipe((0,b.U)(e=>{const n=e.headers.get("content-disposition")||"",i="pdf"===t?"pdf":"xlsx";return{blob:new Blob([e.body]),filename:this.getDownloadFilename(n,r||`statement.${i}`)}}))}getDownloadFilename(e,t){const r=/filename\*=UTF-8''([^;]+)/i.exec(e);if(r&&r[1])return decodeURIComponent(r[1].replace(/"/g,""));const n=/filename="?([^"]+)"?/i.exec(e);return n&&n[1]?n[1].replace(/;$/,""):t}
1exportProductsPDF(e="",t="",r="",n="",i=""){let a=this._authService.updSNAEnvURL("v6")+`statements/balanceStatement?filter[${n}]=true`;if(e&&""!=e)if("today"==e||"yesterday"==e||"week"==e||"month"==e||"year"==e)a=`${a}&filter[date]=${e}`;else{let t=e.split("/");a=""!=t[1]?`${a}&filter[date]=custom&filter[between]=["${t[0]} 00:00:00", "${t[1]} 23:59:59"]`:`${a}&filter[date]=custom&filter[between]=["${t[0]} 00:00:00", "${t[0]} 23:59:59"]`}return t&&(a=`${a}&filter[txnSource]=${encodeURIComponent(t)}`),r&&(a="1"==r?`${a}&filter[paymentIn]=true`:`${a}&filter[paymentOut]=true`),i&&(a=`${a}&filter[transactionId]=${i}`),this.http.get(`${a}`,{observe:"response",responseType:"blob"}).pipe((0,b.U)(e=>new Blob([e.body])))}buildStatementDownloadName(e=null,t="excel",r=null){const n="pdf"===t?"pdf":"xlsx",i=["January","February","March","April","May","June","July","August","September","October","November","December"],a=new Date,s=Number(e?.month||a.getMonth()+1),o=Number(e?.isCurrent?a.getFullYear():r||a.getFullYear()),l=i[Math.max(0,Math.min(11,s-1))]||i[a.getMonth()];return this.generateAccountStatementFileName(l,o,n)}downloadAndSaveStatement(e,t="excel",r=null,n=null){let i="";r&&r?.file_name&&(i=r?.file_name,i=`${i}.${"pdf"===t?"pdf":"xlsx"}`);const a=i||this.buildStatementDownloadName(r,t,n);return this.downloadStatementFile(e,t,a).pipe((0,b.U)(e=>(e?.blob&&(0,C.saveAs)(e.blob,i||e.filename||a),this._commonHelperService.disDynmcTransSuccMsg({resSuccMsg:"STATEMENT_READY_TO_DOWNLOAD"}),e)))}generateAccountStatementFileName(e,t,r){return`AcctStatement_${e?.substring(0,3)||""}${String(t||"")?.slice(-2)||""}_${Date.now()}.${r}`}}return e.\u0275fac=function(t){return new(t||e)(o.LFG(l.eN),o.LFG(n.$),o.LFG(i.$))},e.\u0275prov=o.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),Z=(()=>{class e{constructor(e,t){this.http=e,this._authService=t}
1getId(){return this.id=this._authService?.currentUserValue?.id,this.id}getMerchantSetting(){return this.getId(),this.http.get(`${this._authService.updSNAEnvURL("v5")}settings?filter[where][key][inq][0]=allowed_countries&filter[where][key][inq][1]=geofencing&filter[where][key][inq][2]=proxy_checker&filter[fields][0]=key&filter[fields][1]=value`)}getSubMerchantsListing(){return this.getId(),this.http.get(`${this._authService.updSNAEnvURL("v5")}users/submerchantList`)}getCountryFromLatLong(e,t){return this.http.get(`${a.N.googleMapAPIURL}/json?latlng=${e},${t}&result_type=country&key=${this._authService?.currentUserValue?.clientConfig?.googleMapAPIKey}`)}sendOtp(e,t={}){let r="";"unlink_merchant"==e?r="usermetaauths/resendotp?type=unlinkmerchantotp":"link_merchant"==e?r=`usermetaauths/resendotp?type=linkmerchantotp&linkMerchantSadadId=${t.merSadadId}`:"create_merchant"==e&&(r="usermetaauths/resendotp?type=createsubmerchantotp");const n=r;return this.http.get(`${this._authService.updSNAEnvURL("v5")}${n}`)}unlinkMerchant(e){const t={name:"users/unlinkChildMerchant",method:"POST",data:e};return this.http.post(`${this._authService.updSNAEnvURL("v5")}${t.name}`,t.data)}linkMerchant(e){this.getId();const t={name:"usermetaauths/verify",method:"POST",data:{linkmerchantotp:e.otp,userId:this.id,SadadId:e.merSadadId}};return this.http.post(`${this._authService.updSNAEnvURL("v5")}${t.name}`,t.data)}uploadSignature(e){let t=e.name.lastIndexOf(".");const r=new FormData;return r.append("file",e,e.name.slice(0,t).replaceAll(".","_")+e.name.slice(t,e.name.length)),this.http.post(`${this._authService.updSNAEnvURL("v6")}upload_image/api-signature`,r)}createMerchant(e){this.getId();const t={name:"users/createSubMerchant",method:"POST",data:e};return this.http.post(`${this._authService.updSNAEnvURL("v5")}${t.name}`,t.data)}switchToChildMerchant(e){this.getId();const t={name:"users/switchChildMerchant",method:"POST",data:{SadadId:e}};return this.http.post(`${this._authService.updSNAEnvURL("v5")}${t.name}`,t.data)}setMerchantAsDefault(e){const t={name:"users/markSubmerchantDefault",method:"POST",data:e};return this.http.post(`${this._authService.updSNAEnvURL("v5")}${t.name}`,t.data)}}return e.\u0275fac=function(t){return new(t||e)(o.LFG(l.eN),o.LFG(n.$))},e.\u0275prov=o.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),k=(()=>{class e{constructor(e,t){this.http=e,this._authService=t,this.getId()}
1getId(){return this.id=this._authService?.currentUserValue?.id,this.id}getBatchSummaryListing(e,t,r=""){this.getId(),"/"==r&&(r="");var n={name:"terminals/terminalBatchSummary",method:"GET"};if(n.data=`filter[skip]=${e}&filter[limit]=${t}&filter[count]=true`,r)if(r.includes("/")){let e=r.split("/");n.data=""!=e[1]?r.includes(":")?`${n.data}&filter[date]=custom&filter[between]=["${e[0]}", "${e[1]}"]`:`${n.data}&filter[date]=custom&filter[between]=["${e[0]} 00:00:00", "${e[1]} 23:59:59"]`:`${n.data}&filter[date]=custom&filter[between]=["${e[0]} 00:00:00", "${e[0]} 23:59:59"]`}else n.data=`${n.data}&filter[date]=${r}`;return this.http.get(`${this._authService.updSNAEnvURL("v5")}${n.name}?${n.data}`)}downloadSendReport(e="",t="",r="",n=!1){this.getId();let i=`${this._authService.updSNAEnvURL("v5")}`;if(i=`${i}reporthistories/terminalBatch?filter[order]=created DESC&isExcel=true`,"email"==e&&(i=`${i}&filter[isEmail]=true`),"/"==t&&(t=""),t)if(t.includes("/")){let e=t.split("/");i=""!=e[1]?t.includes(":")?`${i}&filter[date]=custom&filter[between]=["${e[0]}", "${e[1]}"]`:`${i}&filter[date]=custom&filter[between]=["${e[0]} 00:00:00", "${e[1]} 23:59:59"]`:`${i}&filter[date]=custom&filter[between]=["${e[0]} 00:00:00", "${e[0]} 23:59:59"]`}else i=`${i}&filter[date]=${t}`;return r&&(i=`${i}&filter[terminalId]=${r}`),this.http.get(i,{observe:"response",responseType:"blob"}).pipe((0,b.U)(e=>new Blob([e.body])))}}return e.\u0275fac=function(t){return new(t||e)(o.LFG(l.eN),o.LFG(n.$))},e.\u0275prov=o.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),q=(()=>{class e{constructor(e){this._paymentServiceTypeServices=e}resolve(){"online-payment"!=this._paymentServiceTypeServices?.paymentService?.value&&this._paymentServiceTypeServices.changeServiceType("online-payment")}}return e.\u0275fac=function(t){return new(t||e)(o.LFG(f.Y))},e.\u0275prov=o.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),V=(()=>{class e{constructor(e,t){this.http=e,this._authenticationService=t,this.mapSdSerLogoIdUrl={}}getId(){}getAPIUrl(){return a.N.apiUrlv6}getSadadServices(){return this.http.get(`${a.N.apiUrlv6}sadadservices/listing?filter[order]=id%20ASC&filter[where][type]=1&filter[include][0][service_details]=frequency_details&filter[include][1][service_purchase_details]=purchase_frequency_details&filter[order]=is_most_purchased%20DESC&filter[where][status]=1`)}getSadadSerSubscriptions(){return this.http.get(`${this.getAPIUrl()}sadadservices/purchasedlist?filter[skip]=0&filter[limit]=10000&filter[order]=id%20DESC&filter[include][0]=sadad_services&filter[include][1]=billing_cycle&filter[include][2]=transactionmode`)}getBillingInvoices(e=0,t=10,r="",n=-1,i="",s="",o="",l="en"){var c={};if(c.name=`sadadservices/invoicelist?filter[skip]=${e}&filter[limit]=${t}&filter[order]=id%20DESC`,""!=r){let e=r.split("/");c.name=""!=e[1]?`${c.name}&filter[start_date]=${e[0]}&filter[end_date]=${e[1]}`:`${c.name}&filter[start_date]=${e[0]}&filter[end_date]=${e[0]}`}return-1!=n&&(c.name=`${c.name}&where[invoicestatusId]=${n}`),""!=i&&(c.name="ar"==l?`${c.name}&filter[service_name_ar]=${i}`:`${c.name}&filter[service_name]=${i}`),""!=s&&(c.name=`${c.name}&where[invoiceno]=${s}`),""!=o&&(c.name=`${c.name}&filter[order_number]=${o}`),this.http.get(`${a.N.apiUrlv6}${c.name}`)}downloadBillingInvoice(e,t){return this.http.get(`${a.N.apiUrlv6}sadadservices/singleInvoicePdfExport?filter[where][language]=${t}&filter[where][invoiceno]=${e}`,{observe:"response",responseType:"blob"}).pipe((0,b.U)(e=>new Blob([e.body])))}exportProductsPDF(e="",t=-1,r="",n="",i="",a="",s="en"){let o=this.getAPIUrl()+`sadadservices/exports?exp
1orts[${a}]=1&filter[order]=id%20DESC`;if(""!=e){let t=e.split("/");o=""!=t[1]?`${o}&filter[start_date]=${t[0]}&filter[end_date]=${t[1]}`:`${o}&filter[start_date]=${t[0]}&filter[end_date]=${t[0]}`}return-1!=t&&(o=`${o}&where[invoicestatusId]=${t}`),""!=r&&(o="ar"==s?`${o}&filter[service_name_ar]=${r}`:`${o}&filter[service_name]=${r}`),""!=n&&(o=`${o}&where[invoiceno]=${n}`),""!=i&&(o=`${o}&filter[order_number]=${i}`),this.http.get(`${o}`,{observe:"response",responseType:"blob"}).pipe((0,b.U)(e=>new Blob([e.body])))}purchaseServiceAPI(e){var t={};return t.data=e,t.name="sadadservices/purchaseservice",this.http.post(`${a.N.apiUrlv6}${t.name}`,t.data)}getTraxInfoAPI(e){var t={name:"sadadservices/purchaseservicecallback"};return t.data={transaction_id:e},this.http.post(`${this.getAPIUrl()}${t.name}`,t.data)}cancelSdSerSubsAPI(e){var t={};return t.data=e,t.name="sadadservices/cancelservice",this.http.patch(`${a.N.apiUrlv6}${t.name}`,t.data)}getTermsCond(){return this.http.get(`${a.N.apiUrlv6}sadadservices/termsconditions`)}getSdSerLogo(e=""){this.getId();let t=`${this._authenticationService.updSNAEnvURL("v5")}containers/api-businesslogo/download/${e}`;try{return this.http.get(t,{observe:"response",responseType:"blob"}).pipe((0,b.U)(e=>new Blob([e.body])))}catch(r){console.log("Logo download errro : "+r)}}}return e.\u0275fac=function(t){return new(t||e)(o.LFG(l.eN),o.LFG(n.$))},e.\u0275prov=o.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var F=r(71178);let Y=(()=>{class e{constructor(e){this.spinner=e,this.spinnerCount=0}showSpinner(){this.spinnerCount++,1===this.spinnerCount&&this.spinner.show()}hideSpinner(){this.spinnerCount>0&&(this.spinnerCount--,0===this.spinnerCount&&this.spinner.hide())}resetSpinner(){this.spinnerCount=0}}return e.\u0275fac=function(t){return new(t||e)(o.LFG(F.t2))},e.\u0275prov=o.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),H=(()=>{class e{constructor(e,t){this.http=e,this._authenticationService=t,this.orderCountsSubject=new E.X({pendingCount:0,totalCount:0}),this.orderCounts$=this.orderCountsSubject.asObservable(),this.shipSettingsSubject=new E.X(null),this.shipSettings$=this.shipSettingsSubject.asObservable()}getId(){}getShippingSettings(e){return this.http.get(`${a.N.apiUrlv7}shipping_delivery/settings${e?`?type=${e}`:""}`).pipe((0,b.U)(e=>(e?.data&&this.setShipSettings(e.data),e)))}getShippingTnC(){return this.http.get(`${a.N.apiUrlv7}shipping_delivery/get-terms-and-conditions`)}submitShippingTnC(e){var t={};return t.data=e,t.name="shipping_delivery/accept-terms-and-conditions",this.http.post(`${a.N.apiUrlv7}${t.name}`,t.data)}updateShippingSettings(e){var t={};return t.data=e,t.name="shipping_delivery/settings",this.http.post(`${a.N.apiUrlv7}${t.name}`,t.data)}setShipSettings(e){this.shipSettingsSubject.next(e)}getShipSettingsSnapshot(){return this.shipSettingsSubject.value}getInternationalRates(){return this.http.get(`${a.N.apiUrlv7}shipping_delivery/international_rates?filter[skip]=0&filter[limit]=1000`)}getPickupLocations(){return this.http.get(`${a.N.apiUrlv7}shipping_delivery/pickup-sources?filter[skip]=0&filter[limit]=1000`)}getShippingZones(){return this.http.get(`${a.N.apiUrlv7}shipping_delivery/zones`)}createPickupLocation(e,t=!1,r=null){var n={};n.data=e,n.name=t?`shipping_delivery/pickup-sources/${r}`:"shipping_delivery/pickup-sources";const i=`${a.N.apiUrlv7}${n.name}`;return t?this.http.patch(i,n.data):this.http.post(i,n.data)}updatePickupLocation(e,t){var r={};return r.name=`shipping_delivery/pickup-sources/${e}`,this.http.patch(`${a.N.apiUrlv7}${r.name}`,r.data)}deletePickupLocation(e,t=null){var r={};let n=`shipping_delivery/pickup-sources/${e}`;return t&&(n=`${n}?set_default_loc_id=${t}`),r.name=n,this.http.delete(`${a.N.apiUrlv7}${r.name}`,r.data)}setDefaultPickupLocation(e){var t={};return t.data=e,t.name="shipping_delivery/pickup-sources/set-default",this.http.post(`${a.N.apiUrlv7}${t.name}`,t.data)}getShippingOrders(e=0,t=10,r="",n="",i="",s="",o="",l="",c=-1,d=-1,u=-1,p=-1,h="",g=""){var m={};return m.name=g?"shipping_delivery/order-listing?filter[skip]=0&filter[limit]=1000000":`shipping_delivery/order-listing?filter[skip]=${e}&filter[limit]=${t}`,this.appendOrderListingDateFilter(m,r),""!=n&&(m.name=`${m.name}&filter[where][shipping_number]=${encodeURIComponent(n)}`),""!=h&&(m.name=`${m.name}&filter[where][transaction_number]=${encodeURIComponent(h)}`),""!=i&&(m.name=`${m.name}&filter[where][customer_name]=${i}`),""!=s&&(m.name=`${m.name}&filter[where][customer_mobile]=${s}`),""!=o&&(m.name=`${m.name}&filter[where][tracking_id]=${o}`),""!=l&&(m.name=`${m.name}&filter[where][product_type]=${l}`),-1!=c&&(m.name=`${m.name}&filter[where][delivery_status]=${c}`),-1!=d&&(m.name=`${m.name}&filter[where][is_domestic]=${d}`),-1!=u&&(m.name=`${m.name}&filter[where][transaction_source]=${u}`),-1!==p&&null!==p&&(m.name=`${m.name}&filter[where][is_delivery_promotion_applied]=${!0===p?1:0}`),g&&(m.name=`${m.name}&${g}=true`),g?this.http.get(`${a.N.apiUrlv7}${m.name}`,{observe:"response",responseType:"blob"}).pipe((0,b.U)(e=>new Blob([e.body]))):this.http.get(`${a.N.apiUrlv7}${m.name}`)}getShippingOrdersCounts(e=""){var t={name:"shipping_delivery/order-listing/kpis"};return this.appendOrderListingDateFilter(t,e,!0),this.http.get(`${a.N.apiUrlv7}
1${t.name}`)}appendOrderListingDateFilter(e,t,r=!1){if(!t)return;const n=r&&!e.name.includes("?")?"?":"&";if("today"==t||"yesterday"==t||"week"==t||"month"==t||"year"==t)return void(e.name=`${e.name}${n}filter[date]=${t}`);const i=t.split("/");e.name=""!=i[1]?`${e.name}${n}filter[date]=custom&filter[between]=["${i[0]} 00:00:00", "${i[1]} 23:59:59"]`:`${e.name}${n}filter[date]=custom&filter[between]=["${i[0]} 00:00:00", "${i[0]} 23:59:59"]`}getShippingPendingOrderCount(){return this.http.get(`${a.N.apiUrlv7}shipping_delivery/ready-for-pickup/pending-count`)}getShipTrackingByOrder(e){var t={};return t.name=`shipping_delivery/shipment-history?shipment_id=${e}`,this.http.get(`${a.N.apiUrlv7}${t.name}`)}exportOrderReceipt(e){let t=`${a.N.apiUrlv7}shipping_delivery/delivery-addresses-export?shipping_number=${e}`;try{return this.http.get(t,{observe:"response",responseType:"blob"}).pipe((0,b.U)(e=>new Blob([e.body])))}catch(r){console.log("export pdf : "+r)}}exportDeliveryLabel(e){const t=`${a.N.apiUrlv7}shipping_delivery/delivery-label-pdf?shipping_number=${encodeURIComponent(e)}`;return this.http.get(t,{observe:"response",responseType:"blob"}).pipe((0,b.U)(e=>new Blob([e.body],{type:"application/pdf"})))}setReadyForPickup(e){var t={};return t.data=e,t.name="shipping_delivery/ready-for-pickup",this.http.patch(`${a.N.apiUrlv7}${t.name}`,t.data)}cancelShippingOrderAPI(e){var t={};return t.data=e,t.name="transactions/cancleShippingOrder",this.http.post(`${a.N.apiUrlv7}${t.name}`,t.data)}calculateShipping(e,t){var r={};return r.name=`shipping_delivery/shipping/calculate?weight=${e}&country_code=${t}`,this.http.get(`${a.N.apiUrlv7}${r.name}`)}updateOrderCounts(e){const t=this.orderCountsSubject.value||{};this.orderCountsSubject.next({pendingCount:void 0!==e?.pendingCount?e.pendingCount:t.pendingCount,totalCount:void 0!==e?.totalCount?e.totalCount:t.totalCount})}getProductTypes(e=0,t=""){var r={};return r.name=`shipping_delivery/hs_codes?filter[skip]=${e}&filter[limit]=10&filter[order]=description ASC`,t&&(r.name=`${r.name}&search=${t}`),this.http.get(`${a.N.apiUrlv7}${r.name}`)}callValidateBalance(e){var t={};return t.data=e,t.name="shipping_delivery/request-delivery/validate-balance",this.http.post(`${a.N.apiUrlv7}${t.name}`,t.data)}getUniqueKeyReqDelivery(){return`req-delivery-${this._authenticationService?.currentUserValue?.SadadId}-${Date.now()}`}callReqDeliverySubmit(e){var t={};return t.data=e,t.name="shipping_delivery/request-delivery/submit",this.http.post(`${a.N.apiUrlv7}${t.name}`,t.data)}callReqDeliveryPollStatus(e=null){let t=`${a.N.apiUrlv7}shipping_delivery/request-delivery/poll-status`;return e?.length&&(t=`${t}?request_ids=${Array.isArray(e)?e.join(","):e}`),this.http.get(t)}callReqDeliveryCancel(e){var t={};return t.data=e,t.name="shipping_delivery/request-delivery/cancel",this.http.post(`${a.N.apiUrlv7}${t.name}`,t.data)}}return e.\u0275fac=function(t){return new(t||e)(o.LFG(l.eN),o.LFG(n.$))},e.\u0275prov=o.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var j=r(59938);let J=(()=>{class e{constructor(e,t,r,n,i){this._authService=e,this._commonHelperService=t,this._notificationService=r,this._shippingService=n,this.router=i,this.toastDisplayTime=5e3,this.suppressTerminalToastIds=new Set}startAfterModal(e){const t=(e?.transaction_id||"").toString().trim();t&&this._authService?.currentUserValue&&(this.suppressTerminalToastIds.delete(t),this._commonHelperService.updateReqDeliveryPollIds("add",[t]))}noteSubmitTerminal(e){const t=(e?.transaction_id||"").toString().trim();t&&(this.suppressTerminalToastIds.add(t),this._commonHelperService.updateReqDeliveryPollIds("remove",[t])),this._notificationService.refreshHoverList()}pollIfNeeded(){if(!this._authService?.currentUserValue||!this._authService?.loginUserValue)return;const e=this._authService?.loginUserValue?.reqDeliveryPollIds||[];e?.length&&this._shippingService.callReqDeliveryPollStatus(e).subscribe({next:e=>{this._authService?.currentUserValue&&this.handleBulkPoll(e)},error:()=>{}})}handleBulkPoll(e){if(!this._authService?.currentUserValue)return;const t=Array.isArray(e?.data)?e.data:[],r=[];
1t.forEach(e=>{const t=(e?.transaction_id||"").toString(),n=(e?.status||"").toString();if(t&&n&&"pending"!==n)if("success"===n){if(r.push(t),this.suppressTerminalToastIds.has(t))return void this.suppressTerminalToastIds.delete(t);this.showConfirmedToast(),this.afterPollTerminal()}else if("retry_available"===n||"failed"===n){if(r.push(t),this.suppressTerminalToastIds.has(t))return void this.suppressTerminalToastIds.delete(t);const e=this._commonHelperService.getSafeInstantTranslationKeyVal("REQ_DELIVERY_ORDER_NOT_PLACED");this._commonHelperService.toastr.error(e||"REQ_DELIVERY_ORDER_NOT_PLACED","",this.toastDisplayTime,"end"),this.afterPollTerminal()}else if("failed_refunded"===n){if(r.push(t),this.suppressTerminalToastIds.has(t))return void this.suppressTerminalToastIds.delete(t);const e=this._commonHelperService.getSafeInstantTranslationKeyVal("REQ_DELIVERY_ORDER_NOT_PLACED");this._commonHelperService.toastr.error(e||"REQ_DELIVERY_ORDER_NOT_PLACED","",this.toastDisplayTime,"end"),this.afterPollTerminal()}}),r.length&&this._commonHelperService.updateReqDeliveryPollIds("remove",r)}afterPollTerminal(){this._notificationService.refreshHoverList(),this.isOnShippingPage()&&this._notificationService.requestShipOrdersRefresh()}isOnShippingPage(){return(this.router?.url||"").toString().includes("/merchantpanel/shipping")}showConfirmedToast(){if(!this._authService?.currentUserValue)return;const e=this._commonHelperService.getSafeInstantTranslationKeyVal("REQ_DELIVERY_ORDER_CONFIRMED"),t=this._commonHelperService.getSafeInstantTranslationKeyVal("VIEW_DETAILS")||"VIEW_DETAILS";this._commonHelperService.toastr.success(e||"REQ_DELIVERY_ORDER_CONFIRMED",t,this.toastDisplayTime,"","end")?.onAction?.()?.subscribe?.(()=>{this._authService?.currentUserValue&&(this.isOnShippingPage()?this._notificationService.requestShipOrdersRefresh():this.router.navigateByUrl((0,j.o)("")))})}}return e.\u0275fac=function(t){return new(t||e)(o.LFG(n.$),o.LFG(i.$),o.LFG(U),o.LFG(H),o.LFG(M.F0))},e.\u0275prov=o.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},59642:function(e,t,r){"use strict";r.d(t,{q:function(){return d}});var n=r(529),i=r(91681),a=r(29609),s=r(35366),o=r(42693),l=r(52105),c=r(15940);let d=(()=>{class e{constructor(e,t,r){this.http=e,this._authService=t,this._dateFormater=r,this.getId()}getId(){}createInvoice(e){var t={};return t.data=e,t.name="invoices",t.method="POST",1===this._authService?.currentUserValue?.roleId?(t.data.invoicesenderId=this._authService?.currentUserValue?.
1id||0,t.data.createdby=this._authService?.currentUserValue?.id||0):(t.data.invoicesenderId=this._authService?.currentUserValue?.mainMerchantId||0,t.data.createdby=this._authService?.currentUserValue?.id||0),this.http.post(`${n.N.apiUrlv7}${t.name}`,t.data)}getInvoiceList(e=10,t=0,r="month",i="",a="",s="",o="",l="",c="",d="-1",u="-1",p="",h="",g=-1,m=-1,f=""){var v={name:"invoices/optimizeInvoicesList",method:"GET"};if(v.data=1===this._authService?.currentUserValue?.roleId?`filter[where][invoicesenderId]=${this._authService?.currentUserValue?.id||0}`:(this._authService?.currentUserValue?.roleId,`filter[where][invoicesenderId]=${this._authService?.currentUserValue?.mainMerchantId||0}`),""!=r)if("today"==r||"yesterday"==r||"week"==r||"month"==r||"year"==r)v.data=`${v.data}&filter[where][datefilter]=${r}`;else{let e=r.split("/");v.data=""!=e[1]?`${v.data}&filter[where][datefilter]=custom&filter[where][between]=["${e[0]} 00:00:00", "${e[1]} 23:59:59"]`:`${v.data}&filter[where][datefilter]=custom&filter[where][between]=["${e[0]} 00:00:00", "${e[0]} 23:59:59"]`}if(a&&(v.data=`${v.data}&filter[where][transactionId]=${a}`),s&&(v.data=`${v.data}&filter[where][invoiceno][like]=%${s}%`),""!=p&&(v.data=`${v.data}&filter[where][description]=${p}`),""!=h&&(v.data=`${v.data}&filter[where][description]=${h}`),"-1"!=i)switch(i){case"1":v.data=`${v.data}&filter[where][invoicestatusId]=1`;break;case"2":v.data=`${v.data}&filter[where][invoicestatusId]=2`;break;case"3":v.data=`${v.data}&filter[where][invoicestatusId]=3`;break;case"4":v.data=`${v.data}&filter[where][invoicestatusId]=4`;break;case"5":v.data=`${v.data}&filter[where][invoicestatusId]=5`}return o&&(v.data=o.includes(" ")?`${v.data}&filter[where][clientname]=${o}`:`${v.data}&filter[where][clientname][like]=%${o}%`),l&&(v.data=`${v.data}&filter[where][emailaddress][like]=%${l}%`),c&&(v.data=`${v.data}&filter[where][cellno][like]=%${c}%`),"-1"!=d&&(v.data=`${v.data}&filter[where][sourceofinvoice]=${d}`),"-1"!=u&&null!=u&&(v.data=`${v.data}&filter[where][is_terminal_invoice]=${u}`),-1!=g&&(v.data=`${v.data}&filter[where][createdby]=${g}`),-1!=m&&null!=m&&(v.data=`${v.data}&filter[where][isShipping]=${m}`),f&&(v.data=`${v.data}&filter[where][terminal_id]=${f}`),v.data=`${v.data}&filter[include][0]=invoicedetails&filter[include][1]=invoicesenderId&filter[include][2]=invoicestatus&filter[include][3]=invoicereceiverId&filter[include][4]=user&filter[where][isrentalplaninvoice]=0&filter[where][recurring_freq]=none&filter[where][subsinvoiceId]=0`,v.data=`${v.data}&filter[order]=created DESC&filter[skip]=${t}&filter[limit]=${e}`,this.http.get(`${n.N.apiUrlv7}${v.name}?${v.data}`)}getCount(e="month",t="",r="",i="",a="",s="",o="",l="",c="-1",d="",u="",p=""){var h={name:"invoices/counts",method:"GET",apiVer:"v6"};if(h.data=1===this._authService?.currentUserValue?.roleId?`where[invoicesenderId]=${this._authService?.currentUserValue?.
1id||0}`:`where[invoicesenderId]=${this._authService?.currentUserValue?.mainMerchantId||0}`,h.data=`${h.data}&where[isrentalplaninvoice]=0&where[recurring_freq]=none&where[subsinvoiceId]=0`,""!=e)if("today"==e||"yesterday"==e||"week"==e||"month"==e||"year"==e)h.data=`${h.data}&where[datefilter]=${e}`;else{let t=e.split("/");h.data=""!=t[1]?`${h.data}&where[datefilter]=custom&where[between]=["${t[0]} 00:00:00", "${t[1]} 23:59:59"]`:`${h.data}&where[datefilter]=custom&where[between]=["${t[0]} 00:00:00", "${t[0]} 23:59:59"]`}if(r&&(h.data=`${h.data}&where[transactionId]=${r}`),i&&(h.data=`${h.data}&where[invoiceno][like]=%${i}%`),"-1"!=t)switch(t){case"1":h.data=`${h.data}&where[invoicestatusId]=1`;break;case"2":h.data=`${h.data}&where[invoicestatusId]=2`;break;case"3":h.data=`${h.data}&where[invoicestatusId]=3`;break;case"4":h.data=`${h.data}&where[invoicestatusId]=4`;break;case"5":h.data=`${h.data}&where[invoicestatusId]=5`}a&&(h.data=a.includes(" ")?`${h.data}&where[clientname]=${a}`:`${h.data}&where[clientname][like]=%${a}%`),s&&(h.data=`${h.data}&where[emailaddress][like]=%${s}%`),o&&(h.data=`${h.data}&where[cellno][like]=%${o}%`),l&&"-1"!=l&&(h.data=`${h.data}&where[sourceofinvoice]=${l}`),"-1"!=c&&null!=c&&(h.data=`${h.data}&where[is_terminal_invoice]=${c}`),""!=d&&(h.data=`${h.data}&where[description]=${d}`),""!=u&&(h.data=`${h.data}&where[description]=${u}`),p&&(h.data=`${h.data}&where[terminal_id]=${p}`);const g=(new Date).toISOString();return h.timestamp=`${g}`,this.http.get(`${n.N.apiUrlv7}${h.name}?${h.data}`)}searchName(e){let t;t=1===this._authService?.currentUserValue?.roleId?this._authService?.currentUserValue?.
1id||0:this._authService?.currentUserValue?.mainMerchantId||0;var r={name:"invoices",method:"GET"};return r.data=`filter[where][invoicesenderId]=${t}&filter[where][cellno]=${e}&filter[skip]=0&filter[limit]=1&filter[fields][clientname]=true`,this.http.get(`${this._authService.updSNAEnvURL("v5")}${r.name}?${r.data}`)}productSearch(e){var t={name:"products",method:"GET"};return t.data=1==this._authService?.currentUserValue?.roleId?["filter[include]=productmedia",`filter[where][merchantId]=${this._authService?.currentUserValue?.id||0}`,'filter[where][price][gte]="1.0"&filter[where][isRecurringProduct]=0']:["filter[include]=productmedia",`filter[where][merchantId]=${this._authService?.currentUserValue?.mainMerchantId||0}`,`filter[where][createdby]=${this._authService?.currentUserValue?.mainMerchantId||0}`,'filter[where][price][gte]="1.0"&filter[where][isRecurringProduct]=0'],e.length>0&&t.data.push(`filter[where][name][like]=%${e}%`),t.data=t.data.join("&"),this.http.get(`${n.N.apiUrlv7}${t.name}?${t.data}`)}getInvoice(e){var t={};return t.name=`invoices/${e}`,t.method="GET",t.apiVer="v6",t.data="filter[include][0]=invoicedetails&filter[include][1]=invoicesenderId&filter[include][2]=invoicereceiverId&filter[where][isrentalplaninvoice]=0&filter[where][usermetadetailsid]=0&filter[where][subsinvoiceId]=0",this.http.get(`${n.N.apiUrlv7}${t.name}?${t.data}`)}isInternational(){var e={name:"usermetapreferences",method:"GET",apiVer:"v6"};return e.data=`filter[where][userId]=${1===this._authService?.currentUserValue?.roleId?this._authService?.currentUserValue?.
1id||0:this._authService?.currentUserValue?.mainMerchantId||0}`,this.http.get(`${this._authService.updSNAEnvURL("v6")}${e.name}?${e.data}`).pipe((0,i.U)(e=>!(!e.length||!e[0].isInternational)))}editInvoice(e,t){var r={};return r.name=`invoices/${t}`,r.method="PATCH",r.data=e,this.http.patch(`${n.N.apiUrlv7}${r.name}`,r.data)}deleteInvoice(e){var t={};return t.name=`invoices/${e}`,t.method="DELETE",this.http.delete(`${this._authService.updSNAEnvURL("v5")}${t.name}`)}invoiceShare(e){var t={name:"invoices/shareInvoice",method:"POST"};return t.data=e,this.http.post(`${this._authService.updSNAEnvURL("v5")}${t.name}`,t.data)}exportSingleInvoice(e,t){return this.http.get(`${this._authService.updSNAEnvURL("v5")}invoices/singleInvoicePdfExport?filter[where][language]=${t}&&filter[where][isDownloadZip]=false&filter[where][invoiceno]=${e}`,{observe:"response",responseType:"blob"}).pipe((0,i.U)(e=>new Blob([e.body])))}sendNotification(e){var t={};return t.name=`invoices/${e}/remind`,t.method="GET",this.http.get(`${this._authService.updSNAEnvURL("v5")}${t.name}`)}getDueDate(){const e=a();e.add(7,"days");const t={year:e.year(),month:e.month()+1,day:e.date()};return this._dateFormater.format(t)}}return e.\u0275fac=function(t){return new(t||e)(s.LFG(o.eN),s.LFG(l.$),s.LFG(c.NG))},e.\u0275prov=s.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},6707:function(e,t,r){"use strict";r.d(t,{O:function(){return d}});var n=r(35366),i=r(529),a=r(91681);function s({filterAndArrayData:e,transactionId:t="",transactionActId:r="",disputeTransactionId:n="",disputeId:i="",disputeRRN:a="",transaction_date:s="",traxAmount:o="",traxStatusId:l=-1,disStatusId:c=-1,paymentMethod:d="",cType:u=-1,traxSource:p=-1,disType:h=-1,terminalId:g="",cardEntryMethod:m="",cardNumber:f="",POScType:v="",traxType:_="",posRefActTraxId:S="",andRRN:b="",deviceSerialNumber:y="",OPRefActTraxId:w="",mulTerminal:I="",batchNumber:T="",tipEnabledType:E=-1,shippingEnabledType:A=-1,custTraxRef:$="",custPaidAmt:C=""}){return""!=s&&(e=function(e,t){let r=t.split("/");return""!=r[1]?`${e},{"created":{"between":["${r[0]} 00:00:00","${r[1]} 23:59:59"]}}`:`${e},{"created":{"between":["${r[0]} 00:00:00","${r[0]} 23:59:59"]}}`}(e,s)),""!=r&&(e=`${e},{"invoicenumber":"${r.trim()}"}`),""!=t&&(e=`${e},{"invoicenumber":"${t.trim()}"}`),""!=n&&(e=`${e},{"transactionId":"${n.trim()}"}`),""!=i&&(e=`${e},{"disputeId":"${i.trim()}"}`),""!=o&&(e=`${e},{"amount":"${o}"}`),-1!=l&&(e=`${e},{"transactionstatusId":"${l}"}`),-1!=c&&(e=`${e},{"disputestatusId":"${c}"}`),""!=d&&(e=`${e},{"cardtype":"${d.trim()}"}`),-1!=u&&(e=3==u?`${e},{"transactionmodeId": { "inq": [3,4,5] }}`:`${e},{"transactionmodeId":"${u}"}`),-1!=p&&(e=79==p?`${e},{"transactionentityId": { "inq": [7,9] }}`:`${e},{"transactionentityId":"${p}"}`),-1!=h&&(e=`${e},{"disputetypeId":"${h}"}`),""!=a&&(e=`${e},{"rrn":"${a.trim()}"}`),""!=g&&(e=`${e},{"terminalId":"${g.trim()}"}`),""!=m&&(e=`${e},{"cardEntry":"${m.trim()}"}`),""!=f&&(e=`${e},{"card_Number":"${f.trim()}"}`),""!=v&&(e="wallet"==v?`${e},{"transactionmodeId":"6"}`:`${e},{"card_type":"${v.trim()}"}`),""!=_&&(e=`${e},{"transaction_type":"${_.trim()}"}`),""!=S&&(e=`${e},{"actualTxnId":"${S.trim()}"}`),""!=w&&(e=`${e},{"actualTxnId":"${w.trim()}"}`),""!=b&&(e=`${e},{"rrn":"${b.trim()}"}`),""!=y&&(e=`${e},{"deviceSerialNo":"${y.trim()}"}`),""!=I&&(e=`${e},{"terminalId":"${I.trim()}"}`),""!=T&&(e=`${e},{"batch_id":"${T.trim()}"}`),-1!=E&&(e=`${e},{"is_tip_included":"${E}"}`),-1!=A&&(e=`${e},{"isShipping":"${A}"}`),""!=$&&(e=`${e},{"parentTransactionNumber":"${$}"}`),""!=C&&(e=`${e},{"customerPaidAmount":"${C}"}`),e}function o({filterWhereData:e,authNumber:t="",cusName:r="",cusEmailId:n="",cusMob:i="",rrn:a=""}){return""!=t&&(e=`${e},"authorizationnumber":"${t.trim()}"`),""!=r&&(e=`${e},"name":"${r.trim()}"`),""!=n&&(e=`${e},"email":"${n.trim()}"`),""!=i&&(e=`${e},"cellnumber":"${i.trim()}"`),""!=a&&(e=`${e},"transactionrrnnumber":"${a.trim()}"`),e}var l=r(42693),c=r(52105);let d=(()=>{class e{constructor(e,t){this.http=e,this._authService=t,this.paymentId=new n.vpe,this.refundID=new n.vpe,this.disputeID=new n.vpe,this.isOninitGetDataPayment=!0,this.isOninitGetDataRefund=!0,this.isOninitGetDataDispute=!0,this.isOninitGetDataPOSRENTAL=!0,this.getId()}getId(){}getPaymentListing({skip:e=0,limit:t=5,transaction_date:r="",transactionId:n="",authNumber:a="",traxAmount:l="",traxStatusId:c=-1,cusName:d="",cusEmailId:u="",cusM
1ob:p="",rrn:h="",deviceSerialNumber:g="",andRRN:m="",paymentMethod:f="",cType:v=-1,traxSource:_=-1,terminalId:S="",cardEntryMethod:b="",cardNumber:y="",POScType:w="",traxType:I="",mulTerminal:T="",isPos:E=!1,batchNumber:A="",tipEnabledType:$=-1,shippingEnabledType:C=-1,custTraxRef:P="",custPaidAmt:x=""}){this.getId();var N={};let O=`{"or":[${E?`{"senderId":${1===this._authService?.currentUserValue?.roleId?this._authService?.currentUserValue?.id:this._authService?.currentUserValue?.mainMerchantId}},`:""}{"receiverId":${1===this._authService?.currentUserValue?.roleId?this._authService?.currentUserValue?.id:this._authService?.currentUserValue?.mainMerchantId}}]}`;E?(O=`${O}, {"transactionentityId": { "eq": [17] }}`,N.includeData='{"relation":"senderId"},{"relation":"receiverId"},{"relation":"guestuser"},{"relation":"transactionentity"},{"relation":"transactionmode"},{"relation":"transactionstatus"},{"relation":"dispute"},{"relation":"postransaction","scope":{"include":{"relation":"terminal","scope":{"include":{"relation":"posdevice"}}}}}'):(O=`${O},{"transactionentityId":{"inq": [1,2,3,5,6,7,8,9,12]}}`,N.includeData='"senderId", "receiverId", "guestuser", "transactionentity", "transactionmode", "transactionstatus", "postransaction", "dispute"'),-1==c&&(O=`${O},{"transactionstatusId":{"inq":[1,2,3,6]}}`),O=s({filterAndArrayData:O,transactionId:n,transaction_date:r,traxAmount:l,traxStatusId:c,paymentMethod:f,cType:v,traxSource:_,cardEntryMethod:b,terminalId:S,cardNumber:y,POScType:w,traxType:I,andRRN:m,deviceSerialNumber:g,mulTerminal:T,batchNumber:A,tipEnabledType:$,shippingEnabledType:C,custTraxRef:P,custPaidAmt:x});let U=`"and":[${O}]`;return U=o({filterWhereData:U,authNumber:a,cusName:d,cusEmailId:u,cusMob:p,rrn:h}),N.name="transactions/optimizeTransactionsList",N.method="GET",N.data=`filter={"where":{${U}},"skip": ${e},"limit": ${t},"order": "created DESC","include": [${N.includeData}]}`,this.http.get(`${i.N.apiUrlv7}${N.name}?${N.data}`)}exportPaymentPdf(e,t=!1){this.getId();let r=`${i.N.apiUrlv7}transactions/downloadReceipt?transactionId=${e}`;r=t?`${r}&isPOS=true`:`${r}&isPOS=false`;try{return this.http.get(r,{observe:"response",responseType:"blob"}).pipe((0,a.U)(e=>new Blob([e.body])))}catch(n){console.log("export pdf : "+n)}}getRefundListing({skip:e=0,limit:t=5,transaction_date:r="",transactionActId:n="",transactionId:a="",traxAmount:l="",traxStatusId:c=-1,cusName:d="",cusEmailId:u="",cusMob:p="",rrn:h="",paymentMethod:g="",cType:m=-1,terminalId:f="",POScType:v="",cardEntryMethod:_="",posRefActTraxId:S="",andRRN:b="",OPRefActTraxId:y="",mulTerminal:w="",isPos:I=!1}){this.getId();var T={};let E=`{"or":[{"senderId":${1===this._authService?.currentUserValue?.roleId?this._authService?.currentUserValue?.
1id:this._authService?.currentUserValue?.mainMerchantId}}${I?`,{"receiverId":${1===this._authService?.currentUserValue?.roleId?this._authService?.currentUserValue?.id:this._authService?.currentUserValue?.mainMerchantId}}`:""}]}`;I?(E=`${E}, {"transactionentityId":  17 }, {"is_reversed":true}`,T.includeData='{"relation":"senderId"},{"relation":"receiverId"},{"relation":"guestuser"},{"relation":"transactionentity"},{"relation":"transactionmode"},{"relation":"transactionstatus"},{"relation":"dispute"},{"relation":"postransaction","scope":{"include":{"relation":"terminal","scope":{"include":{"relation":"posdevice"}}}}}'):(n||(E=`${E},{"transactionentityId":{"neq":[17]}},{"transactionstatusId":{"inq":[4,5,7]}}`),T.includeData='"senderId", "receiverId", "guestuser", "transactionentity", "transactionmode", "transactionstatus", "dispute"'),E=s({filterAndArrayData:E,transactionId:a,transactionActId:n,transaction_date:r,traxAmount:l,traxStatusId:c,paymentMethod:g,cType:m,terminalId:f,cardEntryMethod:_,POScType:v,posRefActTraxId:S,andRRN:b,OPRefActTraxId:y,mulTerminal:w});let A=`"and":[${E}]`;return A=o({filterWhereData:A,cusName:d,cusEmailId:u,cusMob:p,rrn:h}),T.name="transactions/optimizeTransactionsList",T.method="GET",T.data=`filter={"where":{${A}},"skip": ${e},"limit": ${t},"order": "created DESC","include": [${T.includeData}]}`,this.http.get(`${i.N.apiUrlv7}${T.name}?${T.data}`)}getDisputeListing({skip:e=0,limit:t=5,transaction_date:r="",disputeTransactionId:n="",disputeId:i="",terminalId:a="",disStatusId:l=-1,traxStatusId:c=-1,cusName:d="",cusEmailId:u="",cusMob:p="",disputeRRN:h="",rrn:g="",disType:m=-1,mulTerminal:f="",isPos:v=!1}){this.getId();var _={};let S=`{"or":[${v?`{"senderId":${1===this._authService?.currentUserValue?.roleId?this._authService?.currentUserValue?.
1id:this._authService?.currentUserValue?.mainMerchantId}},`:""}{"receiverId":${1===this._authService?.currentUserValue?.roleId?this._authService?.currentUserValue?.id:this._authService?.currentUserValue?.mainMerchantId}}]}`;v?(S=`${S}, {"isPOS":true}`,_.includeData='["senderId","receiverId","transaction"],"include":[{"relation":"disputestatus","fields":["name"]},{"relation":"disputetype","fields":["name"]},{"relation":"senderId"},{"relation":"receiverId"},{"relation":"transaction","scope":{"include":{"relation":"postransaction","scope":{"include":{"relation":"terminal","scope":{"include":{"relation":"posdevice"}}}}}}}]'):(_.includeData='["senderId","receiverId","transaction", "disputestatus", "disputetype"]',S=`${S}, {"isPOS":false}`),S=s({filterAndArrayData:S,transaction_date:r,disputeTransactionId:n,disputeId:i,terminalId:a,disStatusId:l,traxStatusId:c,disType:m,disputeRRN:h,mulTerminal:f});let b=`"and":[${S}]`;return b=o({filterWhereData:b,cusName:d,cusEmailId:u,cusMob:p,rrn:g}),_.name="disputes",_.method="GET",_.data=`filter={"where":{${b}},"skip":"${e}","limit":"${t}","order":"created DESC","include":${_.includeData}}`,this.http.get(`${this._authService.updSNAEnvURL("v5")}${_.name}?${_.data}`)}getDisputeCount({transaction_date:e="",disputeTransactionId:t="",disputeId:r="",terminalId:n="",disStatusId:i=-1,traxStatusId:a=-1,cusName:l="",cusEmailId:c="",cusMob:d="",rrn:u="",disputeRRN:p="",disType:h=-1,mulTerminal:g="",isPos:m=!1}){this.getId();var f={};let v=`{"or":[${m?`{"senderId":${1===this._authService?.currentUserValue?.roleId?this._authService?.currentUserValue?.
1id:this._authService?.currentUserValue?.mainMerchantId}},`:""}{"receiverId":${1===this._authService?.currentUserValue?.roleId?this._authService?.currentUserValue?.id:this._authService?.currentUserValue?.mainMerchantId}}]}`;v=m?`${v}, {"isPOS":true}`:`${v}, {"isPOS":false}`,v=s({filterAndArrayData:v,transaction_date:e,disputeTransactionId:t,disputeId:r,terminalId:n,disStatusId:i,traxStatusId:a,disType:h,disputeRRN:p,mulTerminal:g});let _=`"and":[${v}]`;return _=o({filterWhereData:_,cusName:l,cusEmailId:c,cusMob:d,rrn:u}),f.name="disputes/count",f.method="GET",f.data=`where={ ${_} }`,this.http.get(`${this._authService.updSNAEnvURL("v5")}${f.name}?${f.data}`)}traxRefundRequest(e,t,r,n,i,a=null,s=null){this.getId();var o={};o.name=3==e?"transactions/sadadRefund":"transactions/debitCreditRefundRequest",o.method="POST";let l={};return l.transactionnumber=t,l.transaction_note=n,i&&(l.isPartialRefund=!0,l.amount=r),l.created=a,l.transactionentityId=s,o.data=l,this.http.post(`${this._authService.updSNAEnvURL("v5")}${o.name}`,o.data)}setPaymentId(e){this.paymentId.emit(e)}setRefundId(e){this.refundID.emit(e)}setDisputeId(e){this.disputeID.emit(e)}getPaymentListingTestEnv(e=0,t=5,r,n,a,s){let o=`filter[limit]=${t}&filter[skip]=${e}&filter[include][0]=guestuser&filter[include][1]=transactionentity&filter[where][receiverId]=${n}&filter[order]=created DESC`;if(r){let e=r.split("/");o+=""!=e[1]?`&filter[where][dateFilter]=custom&filter[where][between]=["${e[0]} 00:00:00", "${e[1]} 23:59:59"]`:`&filter[where][dateFilter]=custom&filter[where][between]=["${e[0]} 00:00:00", "${e[0]} 23:59:59"]`}s.transactionId&&(o+=`&filter[where][invoicenumber][like]=%${s.transactionId}%`),s.transactionAmount&&(o+=`&filter[where][amount]=${s.transactionAmount}`),o+=s.traxStatusId&&s.traxStatusId>0?`&filter[where][transactionstatusId]=${s.traxStatusId}`:"&filter[where][transactionstatusId][inq][0]=3&filter[where][transactionstatusId][inq][1]=1&filter[where][transactionstatusId][inq][2]=2",s.paymentMethod&&(o+=`&filter[where][payment_method]=${s.paymentMethod.toLowerCase()}`),s.cType&&s.cType>0&&(o+=3==s.cType?"&filter[where][transactionmodeId][inq][0]=3&filter[where][transactionmodeId][inq][1]=4&filter[where][transactionmodeId][inq][2]=5":`&filter[where][transactionmodeId]=${s.cType}`);var c={name:"transactions/sandboxTxn",method:"GET"};c.data=o;const d=(new l.WM).set("accesstoken",this._authService?.currentUserValue?.token);return this.http.get(`${i.N.sandboxUrl}${c.name}?${c.data}`,{headers:d})}getRefundListingTestEnv(e=0,t=5,r,n,a,s){let o="";if(o=`filter[limit]=${t}&filter[skip]=${e}&filter[include][0]=guestuser&filter[include][1]=transactionmode&filter[where][senderId]=${n}&filter[order]=created DESC`,r){let e=r.split("/");o+=""!=e[1]?`&filter[where][dateFilter]=custom&filter[where][between]=["${e[0]} 00:00:00", "${e[1]} 23:59:59"]`:`&filter[where][dateFilter]=custom&filter[where][between]=["${e[0]} 00:00:00", "${e[0]} 23:59:59"]`}s.refundId&&(o+=`&filter[where][invoicenumber][like]=%${s.refundId}%`),s.refundAmount&&(o+=`&filter[where][amount]=${s.refundAmount}`),o+=s.reStatus&&s.reStatus>0?`&filter[where][transactionstatusId]=${s.reStatus}`:"&filter[where][transactionstatusId][inq][0]=4&filter[where][transactionstatusId][inq][1]=5",s.paymentMethod&&(o+=`&filter[where][payment_method]=${s.paymentMethod.toLowerCase()}`),s.cType&&s.cType>0&&(o+=`&filter[where][transactionmodeId]=${s.cType}`);var c={name:"transactions/sandboxTxn",method:"GET"};c.data=o;const d=(new l.WM).set("accesstoken",this._authService?.currentUserValue?.token);return this.http.get(`${i.N.sandboxUrl}${c.name}?${c.data}`,{headers:d})}getRefundTestEnv(e){var t={name:"transactions/debitCreditRefundRequest",method:"POST"};t.data={transactionnumber:e};const r=(new l.WM).set("accesstoken",this._authService?.currentUserValue?.token);return this.http.post(`${i.N.sandboxUrl}${t.name}`,t.data,{headers:r})}getRefundCountTest({transaction_date:e="",transactionId:t="",transactionActId:r="",traxAmount:n="",traxStatusId:a=-1,cusName:l="",cusEmailId:c="",cusMob:d="",rrn:u="",paymentMethod:p="",cType:h=-1,terminalId:g="",POScType:m="",cardEntryMethod:f="",isPos:v=!1}){this.getId();var _={};let S=`{ "or": \n                                [ \n                                    { "senderId": ${1===this._authService?.currentUserValue?.roleId?this._authService?.currentUserValue?.
1id:this._authService?.currentUserValue?.mainMerchantId}}, \n                                    { "receiverId": ${1===this._authService?.currentUserValue?.roleId?this._authService?.currentUserValue?.id:this._authService?.currentUserValue?.mainMerchantId}} \n                                ] \n                              }`;v?S=`${S}, {"transactionentityId":  17 }, {"is_reversed":true}`:r||(S=`${S},\n                              {"transactionentityId": { "neq": [ 17 ]}},\n                              { "transactionstatusId": { "inq": [4,5,7] } }`),S=s({filterAndArrayData:S,transactionId:t,transactionActId:r,transaction_date:e,traxAmount:n,traxStatusId:a,paymentMethod:p,cType:h,terminalId:g,cardEntryMethod:f,POScType:m});let b=`"and": [ \n                            ${S}\n                          ]`;return b=o({filterWhereData:b,cusName:l,cusEmailId:c,cusMob:d,rrn:u}),_.name="transactions/count",_.method="GET",_.data=`where={ ${b} }`,this.http.get(`${i.N.apiUrlv7}${_.name}?${_.data}`)}traxRefundRequestTest(e,t,r,n,a){this.getId();var s={};let o={};o.transactionnumber=t,o.transaction_note=n,a&&(o.isPartialRefund=!0,o.amount=r),s.name=3==e?"transactions/sadadRefund":"transactions/debitCreditRefundRequest",s.method="POST",s.data=o;const c=(new l.WM).set("accesstoken",this._authService?.currentUserValue?.token);return this.http.post(`${i.N.sandboxUrl}${s.name}`,s.data,{headers:c})}getPOSRentals(e,t,r="",n=-1,i="",a="",s="",o="",l="",c=""){this.getId(),"/"==r&&(r="");var d={name:"invoices/getPOSRentalInvoice",method:"GET"};if(d.data=`filter[skip]=${e}&filter[limit]=${t}&filter[order]=created DESC`,r)if(r.includes("/")){let e=r.split("/");d.data=""!=e[1]?`${d.data}&filter[where][date]=custom&filter[where][between][0]=${e[0]} 00:00:00&filter[where][between][1]=${e[1]} 23:59:59`:`${d.data}&filter[where][date]=custom&filter[where][between][0]=${e[0]} 00:00:00&filter[where][between][1]=${e[0]} 23:59:59`}else d.data=`${d.data}&filter[created]=${r}`;return-1!=n&&(d.data=`${d.data}&filter[where][invoicestatusId]=${n}`),i&&(d.data=`${d.data}&filter[where][invoiceno][like]=%${i.trim()}%`),a&&(d.data=`${d.data}&filter[where][grossamount]=${a}`),s&&(d.data=`${d.data}&filter[where][rentalAmount]=${s}`),o&&(d.data=`${d.data}&filter[where][deviceSerialNo]=${o.trim()}`),l&&(d.data=`${d.data}&filter[where][terminalId]=${l.trim()}
1`),c&&(d.data=`${d.data}&filter[where][terminalId]=[${c.trim()}]`),this.http.get(`${this._authService.updSNAEnvURL("v5")}${d.name}?${d.data}`)}getAllTerminalListing(){this.getId();return this.http.get(`${this._authService.updSNAEnvURL("v5")}terminals?filter[skip]=0&filter[limit]=100000&filter[order][0]=is_active DESC&filter[order][1]=is_online ASC&filter[include]=posdevice`)}checkTransactionExpansion(e,t,r,n){return!!n&&((r&&!Array.isArray(r)&&Array.isArray(r.rows)?r.rows:r)?.some(e=>e?.invoicenumber===n||e?.invoiceno===n)?e?.invoicenumber===n||e?.invoiceno===n:0===t)}}return e.\u0275fac=function(t){return new(t||e)(n.LFG(l.eN),n.LFG(c.$))},e.\u0275prov=n.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},58858:function(e,t,r){"use strict";r.d(t,{Y:function(){return a}});var n=r(97425),i=r(35366);let a=(()=>{class e{constructor(){this.serviceType="online-payment",this.environmentType="live",localStorage.getItem("traxEnvType")?this.environmentType=localStorage.getItem("traxEnvType"):localStorage.setItem("traxEnvType",this.environmentType),localStorage.getItem("serType")?this.serviceType=localStorage.getItem("serType"):localStorage.setItem("serType",this.serviceType),this.paymentService=new n.X(this.serviceType),this.environmentService=new n.X(this.environmentType)}changeServiceType(e){this.serviceType=e,localStorage.setItem("serType",e),this.paymentService.next(e)}changeEnvironmentType(e){this.environmentType=e,localStorage.setItem("traxEnvType",e),this.environmentService.next(e)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=i.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},35637:function(e,t,r){"use strict";r.d(t,{R:function(){return s}});var n=r(35366),i=r(42693),a=r(52105);let s=(()=>{class e{constructor(e,t){this.http=e,this._authService=t}getWebhookSetting(){this.getId();const e=`filter[where][userId]=${1===this._authService?.currentUserValue?.roleId?this._authService?.currentUserValue?.
1id:this._authService?.currentUserValue?.mainMerchantId}&filter[fields][0]=webhook&filter[fields][1]=webhookAlertEmail&filter[fields][2]=webhookURL&filter[fields][4]=id`;return this.http.get(`${this._authService.updSNAEnvURL("v6")}usermetapreferences?${e}`)}errorTesting(){return this.http.get("http://localhost:3001/api/error-test")}SetWebhookSetting(e,t){this.getId();var r={};return r.name=`usermetapreferences/${t}`,r.method="PATCH",r.data=e,this.http.patch(`${this._authService.updSNAEnvURL("v5")}${r.name}`,r.data)}getLiveTestSetting(){return this.getId(),this.http.get(`${this._authService.updSNAEnvURL("v5")}userbusinesses/getGatewayCred`)}genKeySaveWeb(e="",t="",r="key",n="",i=""){this.getId();var a={name:"userbusinesses/genGatewayCredentials",method:"POST"};let s={};return s[t]=e,"key"==r?s.isGenerate=!0:s[i]=n,a.data=s,this.http.post(`${this._authService.updSNAEnvURL("v5")}${a.name}`,a.data)}ToogleKeyModes(e,t){var r={name:"userbusinesses/toggleGatewayMode",method:"PATCH"};return r.data="test"==t?{isTestEnabled:`${e}`}:{isLiveEnabled:`${e}`},this.http.patch(`${this._authService.updSNAEnvURL("v5")}${r.name}`,r.data)}getNotificationSetting(){const e=`filter[where][userId]=${this._authService?.currentUserValue?.
1id}&filter[fields][0]=id&filter[fields][1]=isEmailNotificationEnabled&filter[fields][2]=isSMSNotificationEnabled&filter[fields][3]=transactionMailingList&filter[fields][4]=transactionPush&filter[fields][5]=settlementMailingList&filter[fields][6]=settlementPush&filter[fields][7]=refundMailingList&filter[fields][8]=refundPush&filter[fields][9]=disputeMailingList&filter[fields][10]=disputePush&filter[fields][11]=supportMailingList&filter[fields][12]=supportPush&filter[fields][13]=isArabic&filter[fields][14]=receiveotpvia&filter[fields][15]=userId&filter[fields][16]=shareInvoiceVia`;return this.http.get(`${this._authService.updSNAEnvURL("v6")}usermetapreferences?${e}`)}patchNotificationSettings(e,t){const r={name:`usermetapreferences/${t}`,method:"PATCH",data:e};return this.http.patch(`${this._authService.updSNAEnvURL("v5")}${r.name}`,r.data)}getCustomizeCheckoutSettings(){this.getId();const e=`filter[where][userId]=${1===this._authService?.currentUserValue?.roleId?this._authService?.currentUserValue?.id:this._authService?.currentUserValue?.mainMerchantId}`;return this.http.get(`${this._authService.updSNAEnvURL("v5")}userthemes?${e}`)}postCustomizeCheckoutSettings(e){this.getId();var t={name:"userthemes",method:"POST"};return t.data=e,this.http.post(`${this._authService.updSNAEnvURL("v5")}${t.name}`,t.data)}patchCustomizeCheckoutSettings(e,t){this.getId();var r={};return r.name=`userthemes/${t}`,r.method="PATCH",r.data=e,this.http.patch(`${this._authService.updSNAEnvURL("v5")}${r.name}`,r.data)}getLogoIdName(){this.getId();const e=`filter[where][userId]=${1===this._authService?.currentUserValue?.roleId?this._authService?.currentUserValue?.
1id:this._authService?.currentUserValue?.mainMerchantId}&filter[fields]=logo&filter[fields]=id`;return this.http.get(`${this._authService.updSNAEnvURL("v5")}userbusinesses?${e}`)}uploadCompanyLogo(e,t){const r=new FormData;return r.append("file",e,t),this.http.post(`${this._authService.updSNAEnvURL("v6")}upload_image/api-businesslogo`,r)}changeLogoName(e,t){this.getId();var r={};return r.name=`userbusinesses/${t}`,r.method="PATCH",r.data=e,this.http.patch(`${this._authService.updSNAEnvURL("v5")}${r.name}`,r.data)}getCustCheckoutAdminSettingFromService(){this.getId();const e=`filter[where][userId]=${1===this._authService.currentUserValue.roleId?this._authService.currentUserValue.id:this._authService.currentUserValue.mainMerchantId}&filter[fields][1]=isallowedtochangetheme`;return this.http.get(`${this._authService.updSNAEnvURL("v6")}usermetapreferences?${e}`)}getId(){}getPOSWebhookSetting(){this.getId();const e=`filter[where][userId]=${1===this._authService.currentUserValue.roleId?this._authService.currentUserValue.id:this._authService.currentUserValue.mainMerchantId}&filter[fields][0]=pos_webhook&filter[fields][1]=pos_webhookAlertEmail&filter[fields][2]=pos_webhookURL&filter[fields][4]=id&filter[fields][5]=userId`;return this.http.get(`${this._authService.updSNAEnvURL("v6")}usermetapreferences?${e}`)}SetPOSWebhookSetting(e,t){this.getId();var r={};return r.name=`usermetapreferences/${t}`,r.method="PATCH",r.data=e,this.http.patch(`${this._authService.updSNAEnvURL("v5")}${r.name}`,r.data)}}return e.\u0275fac=function(t){return new(t||e)(n.LFG(i.eN),n.LFG(a.$))},e.\u0275prov=n.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},27463:function(e,t,r){"use strict";r.d(t,{K:function(){return c}});var n=r(35366),i=r(529),a=r(91681),s=r(42693),o=r(52105),l=r(63908);let c=(()=>{class e{constructor(e,t,r){this.http=e,this._authService=t,this._commonHelperService=r,this.payOut=new n.vpe,this.withID=new n.vpe,this.isOninitGetDataWithdrawal=!0,this.isOninitGetDataPayout=!0,this.getId()}getId(){}getWithdrawalRequestsListing(e=0,t=5,r="",n="",i="",a=-1,s="",o=-1,l=-1){this.getId();var c={name:"withdrawalrequests",method:"GET"};if(c.data=`filter[include][0][userbank]=bank&filter[include][1][payout]=payoutstatus&filter[include][2]=withdrawalrequeststatus&filter[include][3]=user&filter[include][4]=createdby&filter[where][userId]=${1===this._authService?.currentUserValue?.roleId?this._authService?.currentUserValue?.
1id:this._authService?.currentUserValue?.mainMerchantId}&filter[order]=created DESC&filter[skip]=${e}&filter[limit]=${t}`,""!=r){let e=r.split("/");c.data=""!=e[1]?`${c.data}&filter[where][created][between][0]=${e[0]} 00:00:00&filter[where][created][between][1]=${e[1]} 23:59:59`:`${c.data}&filter[where][created][between][0]=${e[0]} 00:00:00&filter[where][created][between][1]=${e[0]} 23:59:59`}return""!=n&&(c.data=`${c.data}&filter[where][amount]=${n}`),""!=i&&(c.data=`${c.data}&filter[where][withdrawnumber]=${i}`),-1!=a&&(c.data=1==a?`${c.data}&filter[where][withdrawalrequeststatusId][inq][0]=${a}&filter[where][withdrawalrequeststatusId][inq][1]=5`:`${c.data}&filter[where][withdrawalrequeststatusId][inq][0]=${a}`),-1!=o&&(c.data+=`&filter[where][createdby]=${o}`),s&&(c.data+=`&filter[where][withdrawaltype]=${s}`),-1!=l&&(c.data+=`&filter[where][is_express]=${l}`),this.http.get(`${this._authService.updSNAEnvURL("v6")}${c.name}?${c.data}`)}getBankList(){this.getId();var e={name:"userbanks",method:"GET"};return e.data=`filter[where][userId]=${1===this._authService?.currentUserValue?.roleId?this._authService?.currentUserValue?.
1id:this._authService?.currentUserValue?.mainMerchantId}&filter[include]=bank`,this.http.get(`${this._authService.updSNAEnvURL("v5")}${e.name}?${e.data}`)}getPayOutListing(e=0,t=5,r="",n="",i="",a=-1,s="",o=""){this.getId();var l={name:"payouts",method:"GET"};if(l.data=`filter[where][userId]=${1===this._authService?.currentUserValue?.roleId?this._authService?.currentUserValue?.id:this._authService?.currentUserValue?.mainMerchantId}`,""!=r){let e=r.split("/");l.data=""!=e[1]?`${l.data}&filter[where][payoutDateTime][between][0]=${e[0]} 00:00:00&filter[where][payoutDateTime][between][1]=${e[1]} 23:59:59`:`${l.data}&filter[where][payoutDateTime][between][0]=${e[0]} 00:00:00&filter[where][payoutDateTime][between][1]=${e[0]} 23:59:59`}return""!=n&&(l.data=`${l.data}&filter[where][payoutAmount]=${n}`),""!=i&&(l.data=`${l.data}&filter[where][payoutId]=${i}`),l.data=-1!=a?`${l.data}&filter[where][payoutstatusId]=${a}`:`${l.data}&filter[where][payoutstatusId][inq][0]=3&filter[where][payoutstatusId][inq][1]=4`,""!=s&&(l.data=`${l.data}&filter[where][userbankId]=${s}`),""!=o&&(l.data=`${l.data}&filter[where][bankreferenceno][like]=%${o}%`),l.data=`${l.data}&filter[include][0][withdrawalrequest][userbank]=bank&filter[include][1]=payoutstatus&filter[order]=payoutDateTime DESC&filter[skip]=${e}&filter[limit]=${t}`,this.http.get(`${this._authService.updSNAEnvURL("v5")}${l.name}?${l.data}`)}getPayOutCount(e="",t="",r="",n=-1,i="",a=""){this.getId();var s={name:"payouts/count",method:"GET"};if(s.data=`where[userId]=${1===this._authService?.currentUserValue?.roleId?this._authService?.currentUserValue?.
1id:this._authService?.currentUserValue?.mainMerchantId}`,""!=e){let t=e.split("/");s.data=""!=t[1]?`${s.data}&where[created][between][0]=${t[0]} 00:00:00&where[created][between][1]=${t[1]} 23:59:59`:`${s.data}&where[created][between][0]=${t[0]} 00:00:00&where[created][between][1]=${t[0]} 23:59:59`}return""!=t&&(s.data=`${s.data}&where[payoutAmount]=${t}`),""!=r&&(s.data=`${s.data}&where[payoutId]=${r}`),s.data=-1!=n?`${s.data}&where[payoutstatusId]=${n}`:`${s.data}&where[payoutstatusId][inq][0]=3&where[payoutstatusId][inq][1]=4`,""!=i&&(s.data=`${s.data}&where[userbankId]=${i}`),""!=a&&(s.data=`${s.data}&filter[where][bankreferenceno][like]=%${a}%`),this.http.get(`${this._authService.updSNAEnvURL("v5")}${s.name}?${s.data}`)}getAvailableFund(){this.getId();var e={name:"usermetapersonals",method:"GET",apiVer:"v6"};return e.data=`filter[where][userId]=${1===this._authService?.currentUserValue?.roleId?this._authService?.currentUserValue?.id:this._authService?.currentUserValue?.mainMerchantId}`,this.http.get(`${this._authService.updSNAEnvURL("v6")}${e.name}?${e.data}`)}createWithdrawRequest(e,t,r,n=1){this.getId();var i={name:"withdrawalrequests",method:"POST"};let a={};return a.amount=e,a.request_note="Withdraw request from partner panel",a.createdby=this._authService?.currentUserValue?.
1id,a.userId=1==this._authService?.currentUserValue?.roleId?this._authService?.currentUserValue?.id:this._authService?.currentUserValue?.mainMerchantId,a.userbankId=t,a.is_express=n,i.data=a,this.http.post(`${this._authService.updSNAEnvURL("v6")}${i.name}`,i.data,this.getIdempotencyHeaderOptions(r))}getIdempotencyHeaderOptions(e){return this._commonHelperService?.buildHttpHeaderOptions(e?{"Idempotency-Key":e}:null)}deleteWithdrawal(e,t){var r={};return r.name=`withdrawalrequests/${e}`,r.method="PATCH",r.data=t,this.http.patch(`${this._authService.updSNAEnvURL("v6")}${r.name}`,r.data)}setPayOutId(e){this.payOut.emit(e)}setWithId(e){this.withID.emit(e)}configureAutoWithdraw(e){var t={name:"usermetapersonals/auto-withdrawal",method:"PATCH",apiVer:"v6"};return t.data={frequency:e},this.http.patch(`${this._authService.updSNAEnvURL("v6")}${t.name}`,t.data)}agreeWithTC(){return this.http.patch(`${this._authService.updSNAEnvURL("v5")}usermetapersonals/agreeAutoWithdrawalTC`,"")}getDefaultWithdrawalGeneralAdminSetting_Service(){this.getId();return this.http.get(`${this._authService.updSNAEnvURL("v5")}settings?filter[where][key]=is_default_auto_settlement_enabled`)}getDefaultWithdrawalMerchantAdminSetting_Service(){this.getId();var e={data:""};return e.name=`usermetapreferences?filter[where][userId]=${1===this._authService?.currentUserValue?.roleId?this._authService?.currentUserValue?.
1id:this._authService?.currentUserValue?.mainMerchantId}`,e.method="GET",e.apiVer="v6",this.http.get(`${this._authService.updSNAEnvURL("v6")}${e.name}`)}getSettlementBatchListing(e=0,t=10,r="",n=""){var i={};if(i.name=`transactions/merchantTransactionBatch?filter[merchant_id]=${1===this._authService?.currentUserValue?.roleId?this._authService?.currentUserValue?.id:this._authService?.currentUserValue?.mainMerchantId}&filter[batch_status]=1&filter[skip]=${e}&filter[limit]=${t}`,i.method="GET",i.data="",""!=r){let e=r.split("/");i.name=""!=e[1]?`${i.name}&filter[batch_createdat][0]=${e[0]} 00:00:00&filter[batch_createdat][1]=${e[1]} 23:59:59`:`${i.name}&filter[batch_createdat][0]=${e[0]} 00:00:00&filter[batch_createdat][1]=${e[0]} 23:59:59`}return n&&(i.name=`${i.name}&filter[batch_id]=${n}`),this.http.get(`${this._authService.updSNAEnvURL("v5")}${i.name}`)}downloadReport(e="",t=null){this.getId();let r=`${i.N.apiUrl}reporthistories/transactionDetailsReport`;return(t&&"POS"==t||e.startsWith("PB")||e.startsWith("SPOS")||e.startsWith("POS"))&&(r=`${i.N.apiUrl}reporthistories/posTransactionDetailReport`),r=`${r}?filter[where][batch_id]=${e}&filter[where][isBatch]=1`,r=`${r}&isExcel=true`,this.http.get(r,{observe:"response",responseType:"blob"}).pipe((0,a.U)(e=>new Blob([e.body])))}sendReport(e="",t=null){this.getId();var r={method:"GET",name:"reporthistories/transactionDetailsReport"};return(t&&"POS"==t||e.startsWith("PB")||e.startsWith("SPOS")||e.startsWith("POS"))&&(r.name="reporthistories/posTransactionDetailReport"),r.name=`${r.name}?filter[where][batch_id]=${e}&filter[where][isBatch]=1&isExcel=true&isEmail=true`,r.data="",this.http.get(`${i.N.apiUrl}${r.name}`)}}return e.\u0275fac=function(t){return new(t||e)(n.LFG(s.eN),n.LFG(o.$),n.LFG(l.$))},e.\u0275prov=n.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},17884:function(e,t,r){"use strict";r.d(t,{z:function(){return s}});var n=r(35366),i=r(42693),a=r(52105);let s=(()=>{class e{constructor(e,t){this.http=e,this._authService=t,this.getId()}
1getId(){return this.id=this._authService?.currentUserValue?.id,this.id}getTerminalListing(e,t,r="",n="",i="",a="",s="",o="",l="",c="",d="",u=""){this.getId(),"/"==r&&(r="");var p={name:"terminals",method:"GET"};if(p.data=`filter[skip]=${e}&filter[limit]=${t}&filter[order][0]=is_active DESC&filter[order][1]=is_online DESC&filter[include][1]=rentalPlan&filter[include][2]=rentalDetail&filter[include][3]=posdevice&filter[include][4][terminaldevicehistory]=devicetype`,r)if(r.includes("/")){let e=r.split("/");p.data=""!=e[1]?`${p.data}&filter[where][activated][between][0]=${e[0]} 00:00:00&filter[where][activated][between][1]=${e[1]} 23:59:59`:`${p.data}&filter[where][activated][between][0]=${e[0]} 00:00:00&filter[where][activated][between][1]=${e[0]} 23:59:59`}else p.data=`${p.data}&filter[activated]=${r}`;return n&&(p.data=`${p.data}&filter[where][terminalId]=${n}`),i&&(p.data=`${p.data}&filter[where][name]=${i}`),l&&(p.data=l.includes(" ")?`${p.data}&filter[where][location]=${l}`:`${p.data}&filter[where][location][like]=%${l}%`),c&&(p.data=`${p.data}
1&filter[where][deviceSerialNo]=${c}`),a&&(p.data=`${p.data}&filter[where][is_active]=${a}`),s&&(p.data=`${p.data}&filter[where][payment_method]=${s}`),o&&(p.data=`${p.data}&filter[where][card_type]=${o}`),d&&(p.data=`${p.data}&filter[where][devicetypeId]=${d}`),u&&(p.data=`${p.data}&filter[where][is_online]=${u}`),this.http.get(`${this._authService.updSNAEnvURL("v5")}${p.name}?${p.data}`)}getTerminalCount(e,t,r="",n="",i="",a="",s="",o="",l="",c="",d="",u=""){this.getId(),"/"==r&&(r="");var p={name:"terminals/count",method:"GET",data:""};if(r)if(r.includes("/")){let e=r.split("/");p.data=""!=e[1]?`${p.data}where[activated][between][0]=${e[0]} 00:00:00&where[activated][between][1]=${e[1]} 23:59:59`:`${p.data}where[activated][between][0]=${e[0]} 00:00:00&where[activated][between][1]=${e[0]} 23:59:59`}else p.data=`${p.data}filter[activated]=${r}`;n&&(p.data=`${p.data}&where[terminalId]=${n}`),i&&(p.data=`${p.data}&where[name]=${i}`),l&&(p.data=l.includes(" ")?`${p.data}&where[location]=${l}`:`${p.data}&where[location][like]=%${l}%`),c&&(p.data=`${p.data}&where[deviceSerialNo]=${c}`),a&&(p.data=`${p.data}&where[is_active]=${a}`),s&&(p.data=`${p.data}&where[payment_method]=${s}`),o&&(p.data=`${p.data}&where[card_type]=${o}`),d&&(p.data=`${p.data}&where[devicetypeId]=${d}`),u&&(p.data=`${p.data}&where[is_online]=${u}`);let h=this.formatTerminalCountQueryPath(p?.name,p?.data);return this.http.get(`${this._authService.updSNAEnvURL("v5")}${h}`)}editTerminalName(e,t){var r={};return r.name=`terminals/${t}`,r.method="PATCH",r.data={name:e},this.http.patch(`${this._authService.updSNAEnvURL("v5")}${r.name}`,r.data)}formatTerminalCountQueryPath(e,t){let r=t?.trim();return r?(r.startsWith("&")&&(r=r.substring(1)),`${e}?${r}`):e}}return e.\u0275fac=function(t){return new(t||e)(n.LFG(i.eN),n.LFG(a.$))},e.\u0275prov=n.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},38582:function(e,t,r){"use strict";r.d(t,{b9:function(){return Ln},pA:function(){return On}});var n=r(99624),i=r(35366),a=r(54391),s=r(23298),o=r(60649),l=r(42693),c=r(26136),d=r(75425),u=r(16304),p=r(31041),h=r(90273),g=r(529),m=r(15940),f=r(69568),v=r(69056),_=r(89666),S=r(56916),b=(r(9781),r(50243)),y=r(98109),w=r(71178),I=r(8500),T=r(22106),E=r(48436),A=r(61116),$=r(33398);const C=["dataPrivacyPolicyModal"],P=["pdfContainer"];function x(e,t){if(1&e){const e=i.EpF();i.TgZ(0,"a",18),i.NdJ("click",function(){return i.CHM(e),i.oxw(2).onPolicyDownloadPreview()}),i._UZ(1,"img",19),i.qZA()}}const N=function(e){return{minorDate:e}};function O(e,t){if(1&e&&(i.TgZ(0,"div",20),i.TgZ(1,"p"),i._uU(2),i.ALo(3,"translate"),i.ALo(4,"date"),i.qZA(),i.qZA()),2&e){const e=i.oxw(2);i.xp6(2),i.Oqu(i.xi3(3,1,"PRIVACY_POLICY_ACCEPT_DEADLINE_DYNAMIC",i.VKq(7,N,i.xi3(4,4,null==e.policyDataObj?null:e.policyDataObj.force_update_date,"dd MMM''yy"))))}}function U(e,t){if(1&e){const e=i.EpF();i.TgZ(0,"button",21),i.NdJ("click",function(){return i.CHM(e),i.oxw(2).onPolicyLater()}),i._uU(1),i.ALo(2,"translate"),i.qZA()}2&e&&(i.xp6(1),i.Oqu(i.lcZ(2,1,"MAYBE_LATER")))}function L(e,t){if(1&e){const e=i.EpF();i.TgZ(0,"div",1),i.TgZ(1,"div",2),i.TgZ(2,"div",3),i.TgZ(3,"h6",4),i._uU(4),i.ALo(5,"translate"),i.qZA(),i.TgZ(6,"p",5),i._uU(7),i.ALo(8,"translate"),i._uU(9),i.qZA(),i.qZA(),i.TgZ(10,"div",6),i.YNc(11,x,2,0,"a",7),i.TgZ(12,"a",8),i._UZ(13,"img",9),i.qZA(),i.qZA(),i.qZA(),i.TgZ(14,"div",10),i.TgZ(15,"div",11),i.TgZ(16,"div",12),i.TgZ(17,"pdf-viewer",13),i.NdJ("pageRendered",function(t){return i.CHM(e),i.oxw().onPageRendered(t)})("pagesLoaded",function(t){return i.CHM(e),i.oxw().onPagesLoaded(t)}),i.qZA(),i.qZA(),i.YNc(18,O,5,9,"div",14),i.qZA(),i.qZA(),i.TgZ(19,"div",15),i.YNc(20,U,3,3,"button",16),i.TgZ(21,"button",17),i.NdJ("click",function(){return i.CHM(e),i.oxw().onAcceptTerms()}),i._uU(22),i.ALo(23,"translate"),i.qZA(),i.qZA(),i.qZA()}if(2&e){const e=i.oxw();i.xp6(4),i.Oqu(i.lcZ(5,21,"PRIVACY_POLICY_UPDATE")),i.xp6(3),i.hij(" ",i.lcZ(8,23,"VER_NUMBER")," : "),i.xp6(2),i.hij(" ",null==e.policyDataObj?null:e.policyDataObj.version_code," "),i.xp6(2),i.Q6J("ngIf",null==e.policyDataObj?null:e.policyDataObj.all_privacy_url),i.xp6(1),i.Q6J("href",null==e.policyDataObj?null:e.policyDataObj.site_url,
1i.LSH),i.xp6(5),i.Q6J("src",e.privacyPreviewUrl)("rotation",0)("original-size",!1)("show-all",!0)("fit-to-page",!1)("zoom",1)("zoom-scale","page-width")("stick-to-page",!1)("render-text",!0)("external-link-target","_blank")("autoresize",!0)("show-borders",!1),i.xp6(1),i.Q6J("ngIf",e.isMinor),i.xp6(2),i.Q6J("ngIf",e.isMinor),i.xp6(1),i.Q6J("disabled",e.isAcceptDisabled),i.xp6(1),i.Oqu(i.lcZ(23,25,"ACCEPT_TERMS"))}}let M=(()=>{class e{constructor(e,t,r,n,a){this.modalService=e,this._authenticationService=t,this._commonHelperService=r,this._spinnerControlService=n,this._accountService=a,this._distroyed$=new _.x,this.isAcceptDisabled=!0,this.totalPages=0,this.renderedPages=new Set,this.currentPage=0,this.policyAction=new i.vpe}ngOnInit(){setTimeout(()=>{this.isAcceptDisabled=!1},3e4)}ngAfterViewInit(){this.policyDataObj=this._authenticationService?.loginUserValue?.privacyUpdateObj,this.isMinor="minor"==this.policyDataObj?.changes_type?.toLowerCase()&&!this.policyDataObj?.force_update_today,this.openDataPrivacyPolicy(),this.onPolicyDownloadPreview(!0),setTimeout(()=>{const e=document.querySelector(".ng2-pdf-viewer-container");e?e.addEventListener("scroll",()=>{e.scrollTop+e.clientHeight>=e.scrollHeight-5&&(console.log("\u2705 Reached bottom (REAL scroll)"),this.isAcceptDisabled=!1)}):console.log("\u274c inner container not found")},1e3)}onScroll(e){const t=e.target;t.scrollHeight-t.scrollTop<=t.clientHeight+5&&(this.isAcceptDisabled=!1)}onPageRendered(e){this.currentPage=e.pageNumber}onPagesLoaded(e){this.totalPages=e.pagesCount}openDataPrivacyPolicy(){console.log("openDataPrivacyPolicy:",this.policyDataObj),this.modalService.open(this.dataPrivacyPolicyModalTempRef,{centered:!0,size:"sm",backdrop:"static",windowClass:"modal-cattwo"})}onPolicyDownloadPreview(e=!1){var t,r,n=this;this._spinnerControlService.showSpinner(),this._accountService.downloadContainerFile(e?this.policyDataObj.current_changes_privacy_url:this.policyDataObj.all_privacy_url,"privacyDoc").pipe((0,f.R)(this._distroyed$)).subscribe({next:(r=(0,u.Z)(function*(t){e?(n.privacyPreviewUrl=n._commonHelperService.createFileObjectUrl({blob:t,sanitize:!1}),console.log("onPolicyDownloadPreview this.privacyPreviewUrl:",n.privacyPreviewUrl)):n._commonHelperService.saveFile({filePath:n.policyDataObj.all_privacy_url,blobRes:t}
1),n._spinnerControlService.hideSpinner()}),function(e){return r.apply(this,arguments)}),error:(t=(0,u.Z)(function*(e){const t=JSON.parse(yield e.error.text())?.error?.message;n._spinnerControlService.hideSpinner(),n._commonHelperService.disTransErrMsg(t)}),function(e){return t.apply(this,arguments)})})}onPolicyLater(){this.modalService.dismissAll(),this.policyAction.emit("later")}onAcceptTerms(){var e=this;this._spinnerControlService.showSpinner();let t={is_accepted:!0,privacy_policy_version_id:this.policyDataObj?.privacy_policy_version_id};var r;t=this._commonHelperService.addBrowserInfo(t),this._accountService.callAcceptPrivacyPolicy(t).pipe((0,f.R)(this._distroyed$)).subscribe({next:e=>{e.error?this._commonHelperService.disTransErrMsg(e?.error?.message):(this.modalService.dismissAll(),this.policyAction.emit("accepted"))},error:(r=(0,u.Z)(function*(t){e._spinnerControlService.hideSpinner()}),function(e){return r.apply(this,arguments)}),complete:()=>{}})}ngOnDestroy(){this.modalService.dismissAll(),this._spinnerControlService.resetSpinner(),this._distroyed$.next(null),this._distroyed$.complete()}}return e.\u0275fac=function(t){return new(t||e)(i.Y36(m.FF),i.Y36(y.$h),i.Y36(y.$P),i.Y36(y.br),i.Y36(y.BR))},e.\u0275cmp=i.Xpm({type:e,selectors:[["app-privacy-policy"]],viewQuery:function(e,t){if(1&e&&(i.Gf(C,5),i.Gf(P,5)),2&e){let e;i.iGM(e=i.CRH())&&(t.dataPrivacyPolicyModalTempRef=e.first),i.iGM(e=i.CRH())&&(t.pdfContainer=e.first)}},outputs:{policyAction:"policyAction"},features:[i._Bn([m.NM,m.FF])],decls:2,vars:0,consts:[["dataPrivacyPolicyModal",""],[1,"data-privacy-wrap"],[1,"cattwo-header","d-flex","justify-content-between"],[1,"privacy-policy-title"],[1,"pp-main-title","text-left"],[1,"version-number"],[1,"data-p-action"],["href","javascript:void(0)",3,"click",4,"ngIf"],["target","_blank","rel","noopener noreferrer",3,"href"],["src","../../../../../assets/images/pos-panel/invoice-icon/eye.svg"],[1,"modal-body","p-0"],[1,"cate-popup-body","px-0"],[1,"cate-inner-title"],[2,"width","100%","height","600px",3,"src","rotation","original-size","show-all","fit-to-page","zoom","zoom-scale","stick-to-page","render-text","external-link-target","autoresize","show-borders","pageRendered","pagesLoaded"],["class","privacy-notes",4,"ngIf"],[1,"withdbutton-group"],["class","btn outline-btn","type","button",3,"click",4,"ngIf"],["type","button",1,"btn","confirm-btn",3,"disabled","click"],["href","javascript:void(0)",3,"click"],["src","../../../../../assets/images/pos-panel/invoice-icon/download_batch.svg"],[1,"privacy-notes"],["type","button",1,"btn","outline-btn",3,"click"]],template:function(e,t){1&e&&i.YNc(0,L,24,27,"ng-template",null,0,i.W1O)},directives:[A.O5,$.rQ],pipes:[o.X$,A.uU],styles:[".data-privacy-wrap[_ngcontent-%COMP%]   .data-p-action[_ngcontent-%COMP%]{display:flex;grid-gap:8px;gap:8px}.data-privacy-wrap[_ngcontent-%COMP%]   .data-p-action[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{display:inline-block;height:22px;width:22px;outline:0}.data-privacy-wrap[_ngcontent-%COMP%]   .withdbutton-group[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:10px;gap:10px}.data-privacy-wrap[_ngcontent-%COMP%]   .withdbutton-group[_ngcontent-%COMP%]   .confirm-btn[_ngcontent-%COMP%], .data-privacy-wrap[_ngcontent-%COMP%]   .withdbutton-group[_ngcontent-%COMP%]   .outline-btn[_ngcontent-%COMP%]{width:100%!important;max-width:100%!important}.data-privacy-wrap[_ngcontent-%COMP%]   .privacy-notes[_ngcontent-%COMP%]{padding:10px;background:#fff5eb;position:absolute;width:100%;bottom:0}.data-privacy-wrap[_ngcontent-%COMP%]   .privacy-notes[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-family:Open Sans,sans-serif;font-style:normal;font-weight:700;font-size:14px;line-height:20px;text-align:center;letter-spacing:-.005em;color:#b46b26;margin-bottom:0}.data-privacy-wrap[_ngcontent-%COMP%]   .pp-main-title[_ngcontent-%COMP%]{margin-bottom:5px!important}.data-privacy-wrap[_ngcontent-%COMP%]   .version-number[_ngcontent-%COMP%]{color:#324c6a}  .ng2-pdf-viewer-container::-webkit-scrollbar-track{box-shadow:inset 0 0 6px #f8fafc;-webkit-box-shadow:inset 0 0 6px #f8fafc}  .ng2-pdf-viewer-container::-webkit-scrollbar,   .ng2-pdf-viewer-container::-webkit-scrollbar-thumb{background-color:#b8bfca;width:6px;border-radius:26px}  .ng2-pdf-viewer-container::-webkit-scrollbar-thumb{background-color:#97a2b1}  .modal-cattwo .modal-dialog{max-width:650px;position:relative}"]}),e})();
1var D=r(32309),R=r(27624),Z=r(77972),k=r(94720);const q=["otp1"],V=["eleLoginEmail"],F=["doc_expiry_notification"];function Y(e,t){if(1&e){const e=i.EpF();i.TgZ(0,"app-privacy-policy",18),i.NdJ("policyAction",function(t){return i.CHM(e),i.oxw().handlePolicyAction(t)}),i.qZA()}}function H(e,t){if(1&e){const e=i.EpF();i.ynx(0),i.TgZ(1,"a",19),i._UZ(2,"img",20),i.qZA(),i.TgZ(3,"a",21),i.NdJ("click",function(){return i.CHM(e),i.oxw().changeLangSettings("ar")}),i._UZ(4,"img",22),i.qZA(),i.BQk()}}function j(e,t){if(1&e){const e=i.EpF();i.ynx(0),i.TgZ(1,"a",19),i._UZ(2,"img",23),i.qZA(),i.TgZ(3,"a",21),i.NdJ("click",function(){return i.CHM(e),i.oxw().changeLangSettings("en")}),i._UZ(4,"img",24),i.qZA(),i.BQk()}}function J(e,t){1&e&&(i.TgZ(0,"a"),i._UZ(1,"img",38),i.qZA())}function B(e,t){1&e&&(i.TgZ(0,"a"),i._UZ(1,"img",39),i.qZA())}function W(e,t){1&e&&(i.TgZ(0,"span",40),i._uU(1),i.ALo(2,"translate"),i.qZA()),2&e&&(i.xp6(1),i.Oqu(i.lcZ(2,1,"PROVIDE_VALID_PHONE_PASSWORD")))}function G(e,t){1&e&&(i.TgZ(0,"span",40),i._uU(1),i.ALo(2,"translate"),i.qZA()),2&e&&(i.xp6(1),i.Oqu(i.lcZ(2,1,"PLS_PROVIDE_VALID_OTP")))}function Q(e,t){1&e&&(i.TgZ(0,"span",40),i._uU(1),i.ALo(2,"translate"),i.qZA()),2&e&&(i.xp6(1),i.Oqu(i.lcZ(2,1,"NOT_REG_AS_PARTNER_USER_CONTACT_ADMIN")))}function K(e,t){if(1&e&&(i.TgZ(0,"span",40),i._uU(1),i.ALo(2,"translate"),i.qZA()),2&e){const e=i.oxw(2);i.xp6(1),i.Oqu(i.lcZ(2,1,e.errorMessage))}}const z=function(){return["/auth/reset-pass"]};function X(e,t){if(1&e){const e=i.EpF();i.TgZ(0,"div"),i.TgZ(1,"div",25),i._UZ(2,"img",26),i.TgZ(3,"input",27,28),i.NdJ("keyup.enter",function(){return i.CHM(e),i.oxw().handleLogin()}),i.ALo(5,"translate"),i.qZA(),i.qZA(),i.TgZ(6,"div",29),i._UZ(7,"img",30),i.TgZ(8,"input",31,32),i.NdJ("keyup.enter",function(){return i.CHM(e),i.oxw().handleLogin()}),i.ALo(10,"translate"),i.qZA(),i.TgZ(11,"span",33),i.NdJ("click",function(){i.CHM(e);const t=i.MAs(9);return i.oxw().togglePasswordOne(t)}),i.YNc(12,J,2,0,"a",8),i.YNc(13,B,2,0,"a",8),i.qZA(),i.qZA(),i.YNc(14,W,3,3,"span",34),i.YNc(15,G,3,3,"span",34),i.YNc(16,Q,3,3,"span",34),i.YNc(17,K,3,3,"span",34),i.TgZ(18,"div",35),i.TgZ(19,"a",36),i._uU(20),i.ALo(21,"translate"),i.qZA(),i.TgZ(22,"button",37),i.NdJ("click",function(){return i.CHM(e),i.oxw().handleLogin()}),i.TgZ(23,"span"),i._uU(24),i.ALo(25,"translate"),i.qZA(),i.qZA(),i.qZA(),i.qZA()}if(2&e){const e=i.oxw();i.xp6(3),i.s9C("placeholder",i.lcZ(5,16,"MOB_NUM")),i.xp6(5),i.s9C("placeholder",i.lcZ(10,18,"PASSWORD")),i.xp6(3),i.ekj("div-disabled",e.isVPNDisabled),i.xp6(1),i.Q6J("ngIf",e._showPassword1),i.xp6(1),i.Q6J("ngIf",!e._showPassword1),i.xp6(1),i.Q6J("ngIf",1==e.error),i.xp6(1),i.Q6J("ngIf",2==e.error),i.xp6(1),i.Q6J("ngIf",3==e.error),i.xp6(1),i.Q6J("ngIf",4==e.error),i.xp6(2),i.ekj("div-disabled",e.isVPNDisabled),i.Q6J("routerLink",i.DdM(24,z)),i.xp6(1),i.Oqu(i.lcZ(21,20,"FORGOT_PASSWORD")),i.xp6(2),i.Q6J("disabled",e.submit||e.isVPNDisabled),i.xp6(2),i.Oqu(i.lcZ(25,22,"LOGIN"))}}function ee(e,t){if(1&e){const e=i.EpF();i.TgZ(0,"p",56),i.NdJ("click",function(){return i.CHM(e),i.oxw(2).resendOTP(1)}),i._uU(1),i.ALo(2,"translate"),i.qZA()}2&e&&(i.xp6(1),i.hij(" ",i.lcZ(2,1,"RESEND_OTP"),""))}function te(e,t){if(1&e&&(i.TgZ(0,"p",57),i.TgZ(1,"span",58),i._uU(2),i.ALo(3,"translate"),i.ALo(4,"translate"),i.qZA(),i.qZA()),2&e){const e=i.oxw(2);i.xp6(2),i.lnq("",i.lcZ(3,3,"OTP_VALID_UPTO")," ",e.time," ",i.lcZ(4,5,"SECONDS"),"")}}function re(e,t){if(1&e){const e=i.EpF();i.TgZ(0,"div",41),i.TgZ(1,"h5",42),i._uU(2),i.ALo(3,"translate"),i.qZA(),i.TgZ(4,"p",43),i._uU(5),i.ALo(6,"translate"),i.ALo(7,"translate"),i.qZA(),i.TgZ(8,"div",44),i.TgZ(9,"input",45,46),i.NdJ("keypress",function(){return i.CHM(e),i.oxw().otpError=0}),i.qZA(),i.TgZ(11,"input",47),i.NdJ("keypress",function(){return i.CHM(e),i.oxw().otpError=0}),i.qZA(),i.TgZ(12,"input",48),i.NdJ("keypress",function(){return i.CHM(e),i.oxw().otpError=0}),i.qZA(),i.TgZ(13,"input",49),i.NdJ("keypress",function(){return i.CHM(e),i.oxw().otpError=0}),i.qZA(),i.TgZ(14,"input",50),i.NdJ("keypress",function(){return i.CHM(e),i.oxw().otpError=0}),i.qZA(),i.TgZ(15,"input",51),i.NdJ("keypress",function(){return i.CHM(e),i.oxw().otpError=0})("keyup",function(){return i.CHM(e),i.oxw().handleOTPauth()}),i.qZA(),i.qZA(),i.TgZ(16,"div"),i.YNc(17,ee,3,3,"p",52),i.YNc(18,te,5,7,"p",53),i.qZA(),i.TgZ(19,"p",54),i._uU(20),i.ALo(21,"translate"),i.TgZ(22,"a",55),i.NdJ("
1click",function(){return i.CHM(e),i.oxw().goBack()}),i._uU(23),i.ALo(24,"translate"),i.qZA(),i.qZA(),i.qZA()}if(2&e){const e=i.oxw();i.xp6(2),i.Oqu(i.lcZ(3,8,"LOGIN_WITH_MOB_NUM")),i.xp6(3),i.lnq("",i.lcZ(6,10,"SEND_OTP_TO_YOUR_NUM")," ",e.dummyNo," ",i.lcZ(7,12,"ENTER_OTP_IN_SPACE_TO_CONFIRM_IDENTITY"),""),i.xp6(12),i.Q6J("ngIf",!e.loginPage&&!e.showContDown),i.xp6(1),i.Q6J("ngIf",!e.loginPage&&e.showContDown),i.xp6(2),i.hij("",i.lcZ(21,14,"DO_YOU_WANT_TO")," "),i.xp6(3),i.hij(" ",i.lcZ(24,16,"BACK_TO_LOGIN")," ")}}function ne(e,t){if(1&e&&(i.ynx(0),i._uU(1),i.BQk()),2&e){const e=i.oxw(2);i.xp6(1),i.hij(" ",e.loginResponse.promtDocMessageAr," ")}}function ie(e,t){if(1&e&&i._uU(0),2&e){const e=i.oxw(2);i.hij(" ",e.loginResponse.promtDocMessageEn," ")}}const ae=function(){return["/merchantpanel/myaccounts"]};function se(e,t){if(1&e&&(i.TgZ(0,"div",59),i.TgZ(1,"h6"),i._uU(2),i.ALo(3,"translate"),i.qZA(),i.TgZ(4,"button",60),i.NdJ("click",function(){return t.$implicit.close(0)}),i._UZ(5,"img",61),i.qZA(),i.qZA(),i.TgZ(6,"div",62),i.TgZ(7,"div",63),i.TgZ(8,"div",64),i._UZ(9,"img",65),i.qZA(),i.TgZ(10,"div",66),i.TgZ(11,"p",67),i.YNc(12,ne,2,1,"ng-container",68),i.YNc(13,ie,1,1,"ng-template",null,69,i.W1O),i.qZA(),i.qZA(),i.qZA(),i.TgZ(15,"div",70),i.TgZ(16,"a",71),i.TgZ(17,"button",72),i.NdJ("click",function(){return t.$implicit.close(0)}),i._uU(18),i.ALo(19,"translate"),i.qZA(),i.qZA(),i.TgZ(20,"button",73),i.NdJ("click",function(){return t.$implicit.close(0)}),i._uU(21),i.ALo(22,"translate"),i.qZA(),i.qZA(),i.qZA()),2&e){const e=i.MAs(14),t=i.oxw();i.xp6(2),i.Oqu(i.lcZ(3,6,"Attention")),i.xp6(10),i.Q6J("ngIf","ar"==t.currLang)("ngIfElse",e),i.xp6(4),i.Q6J("routerLink",i.DdM(12,ae)),i.xp6(2),i.hij(" ",i.lcZ(19,8,"UPDATE")," "),i.xp6(3),i.hij(" ",i.lcZ(22,10,"CANCEL"),"")}}let oe=(()=>{class e{constructor(e,t,r,n,i,a,s,o,l,c,d){this.fb=e,this._authenticationService=t,this.router=r,this._commonHelperService=n,this._paymentServiceTypeServices=i,this.spinnerSadad=a,this.translate=s,this.layout=o,this._permissionService=l,this.modalService=c,this._reportService=d,this.isVPNDisabled=!1,this.timerConfig={leftTime:60,format:"'OTP Valid Up To' \uff1as"},this.show=!1,this._showPassword1=!1,this.loginPage=!0,this.submit=!1,this.showContDown=!0,this.ishandOTPCall=!1,this.isVPNproxy=!1,this.error=0,this.time=60,this.currLang="",this.allowDocExpiryPrompt=!1,this._distroyed$=new _.x,this.isShowPrivacyPolicy=!1,this.isVPNDisabled=!0,this._authenticationService.vpnCheckCall.emit("1"),this._authenticationService.isVpnProxy.subscribe(e=>{this.isVPNproxy=this.loginPage=e});let u=localStorage.getItem("selectedLang");u?(this.currLang=u,this.translate.use(u),this.setLangSettings(u)):(this.currLang=g.N.defaultLang,this.translate.use(g.N.defaultLang),localStorage.setItem("selectedLang",g.N.defaultLang),this.setLangSettings(g.N.defaultLang)),this._authenticationService.currentUserValue&&this._authenticationService.currentUserValue.id&&this.router.navigate([`/dashboard/${this._paymentServiceTypeServices.serviceType}-default`]),this.checkFocusRedirect(),this.loginForm=this.fb.group({email:["",[p.kI.required]],password:["",p.kI.required],otp1:["",[p.kI.required]],otp2:["",[p.kI.required]],otp3:["",[p.kI.required]],otp4:["",[p.kI.required]],otp5:["",[p.kI.required]],otp6:["",[p.kI.required]]}),this.loginForm.disable(),this._authenticationService.vpnEventEmitter.pipe((0,f.R)(this._distroyed$)).subscribe(e=>{"appEnaLoginFormEvent"==e&&this.enableLoginForm()})}checkFocusRedirect(){this.checkAndRedirectLoggedInUserSession(),this.windowFocusEventListenerRef=()=>{this.loginPage&&this._authenticationService?.isAuthLoginPagePathCheck()&&this.checkAndRedirectLoggedInUserSession()},this.windowStorageEventListenerRef=e=>{"currentUser"===e?.key&&e?.newValue&&this.loginPage&&this.checkAndRedirectLoggedInUserSession()},window.addEventListener("focus",this.windowFocusEventListenerRef),window.addEventListener("storage",this.windowStorageEventListenerRef)}ngOnInit(){this.loginPage=!0,this.spinnerSadad.hide(),this.currYear=(new Date).getFullYear(),this.allowDocExpiryPrompt=this._permissionService.hasFuncPermission("login","DOC_EXPIRY_PROMPT")}ngAfterViewInit(){setTimeout(()=>{this.eleLoginEmail?.nativeElement?.focus()},0),this._authenticationService.vpnEventEmitter.emit("vpnInitEvent"),this.checkAndRedirectLoggedInUserSession()}
1checkAndRedirectLoggedInUserSession(){return this._authenticationService?.checkAndRedirectLoggedInUserSession()}checkAlreadyLoggedInBeforeSubmit(){return!!this._authenticationService?.checkAlreadyLoggedInBeforeSubmit()&&(this.spinnerSadad?.hide(),!0)}openDocExpirtyNotificationModal(e){this.modalService.hasOpenModals()||this.modalService.open(e,{windowClass:"modal-cattwo",backdrop:"static",size:"md",centered:!0}).result.then(e=>{},e=>{})}changeLangSettings(e){this._authenticationService.vpnCheckCall.emit("1"),this.currLang=e,this.translate.use(e),this.layout.changeLayoutType("en"==e?"ltr":"rtl"),localStorage.setItem("selectedLang",e)}setLangSettings(e){this.layout.changeLayoutType("en"==e?"ltr":"rtl")}goBack(){var e=this;return(0,u.Z)(function*(){e._authenticationService.vpnCheckCall.emit("1"),e.error=0,e.loginPage=!0,e.otp1?.nativeElement?.blur(),setTimeout(()=>{e.eleLoginEmail?.nativeElement?.focus()},0),e.submit=!1,yield e._authenticationService.clearUserData(),e.loginForm.controls.email.reset(),e.loginForm.controls.password.reset(),e._authenticationService.login("","",!0).subscribe(t=>{e.formReset()})})()}formReset(){this.error=0,this.loginForm.reset({email:"",password:"",otp1:"",otp2:"",otp3:"",otp4:"",otp5:"",otp6:""},{emitEvent:!1})}togglePasswordOne(e){this._showPassword1=!this._showPassword1,e.setAttribute("type",this._showPassword1?"text":"password")}editNumber(e){let t="X";for(let r=0;r<e.length-3;r++)t+="X";return e.charAt(0)+t+e.charAt(e.length-1)}handleOTPauth(){if(this.checkAlreadyLoggedInBeforeSubmit())this.ishandOTPCall=!1;else if(this._authenticationService.vpnCheckCall.emit("otpauth"),0==this.ishandOTPCall)if(this.ishandOTPCall=!0,this.loginForm.controls.otp1.value&&this.loginForm.controls.otp2.value&&this.loginForm.controls.otp3.value&&this.loginForm.controls.otp4.value&&this.loginForm.controls.otp5.value&&this.loginForm.controls.otp6.value){this.error=0;const e=this.loginForm.controls.otp1.value+this.loginForm.controls.otp2.value+this.loginForm.controls.otp3.value+this.loginForm.controls.otp4.value+this.loginForm.controls.otp5.value+this.loginForm.controls.otp6.value;if(e.length<6)return void(this.ishandOTPCall=!1);this.loginForm.controls.otp1.setErrors({invalid:!1}),this.spinnerSadad.show(),this._authenticationService.verifyOtp(e,this._userId).subscribe(e=>{this.handleOTPauthResult=e;const t=e?.statusCode||e?.error?.statusCode;if(t||e?.error){if([400,429].includes(t)||e?.error)return this.error=2,this.spinnerSadad.hide(),this._commonHelperService.disTransErrMsg(e?.message||e?.error?.message||"Error!"),void(this.ishandOTPCall=!1);if([401].includes(t))return void this.handleOTPAuthError(e)}else this._authenticationService?.loginUserValue?.privacyUpdateObj&&!this._authenticationService?.loginUserValue?.privacyUpdateObj?.is_accepted?(this.isShowPrivacyPolicy=!0,this.openPrivacyPolicyPopup(e)):this.handleOTPSuccRes(e)},e=>{this.handleOTPAuthError(e)})}else this.ishandOTPCall=!1}handleOTPAuthError(e){this.spinnerSadad.hide(),this.error=2,this.ishandOTPCall=!1;const t=this.formatUserFriendlyErrMsg(("ar"===this.currLang?e?.message_ar||e?.error?.message_ar||e?.error?.error?.message_ar||e?.message||e?.error?.message:e?.message||e?.error?.message||e?.error?.error?.message)||"Error!");this._commonHelperService.disTransErrMsg(t);const r=e?.statusCode||e?.error?.statusCode||e?.error?.error?.statusCode||e?.status;401!==r&&499!==r||this.goBack()}handleOTPauthSuccess(e){this.processDynamicFirebaseUserAuth(e),e?.cellnumber,setTimeout(()=>{this._authenticationService?.currentUserValue?(1!=this._authenticationService?.currentUserValue?.roleId&&16!=this._authenticationService?.currentUserValue?.roleId||this._authenticationService.getVerifications(),this.router.navigate([`/dashboard/${this._paymentServiceTypeServices.serviceType}-default`]),this.spinnerSadad.hide(),this.ishandOTPCall=!1,this.loginResponse&&this.loginResponse?.isDocExpired&&(this.allowDocExpiryPrompt=this._permissionService.hasFuncPermission("login","DOC_EXPIRY_PROMPT"),this.allowDocExpiryPrompt&&this._authenticationService.docExpiryNotiEveEmit.pipe((0,v.q)(1)).subscribe(e=>{this.openDocExpirtyNotificationModal(this.doc_expiry_notification)}))):this.spinnerSadad.hide(),setTimeout(()=>{this.displayReadyToDownloadReport()},2e3)},2e3),this.ishandOTPCall=!1,this.submit=!1}handleOTPSuccRes(e){e?(this.spinnerSadad.show(),this._authenticationService.saveAuthCurrentUser(e),this.handleOTPauthSuccess(e)):this.spinnerSadad?.hide()}openPrivacyPolicyPopup(e){this.modalService.dismissAll(),this.spinnerSadad.hide()}handlePolicyAction(e){console.log("Privacy policy action:",e),this.isShowPrivacyPolicy=!1,this.handleOTPSuccRes(this.handleOTPauthResult)}displayReadyToDownloadReport(){var e;this._reportService.getDownReqStatus().pipe((0,f.R)(this._distroyed$)).subscribe({next:e=>{e?.error?this._commonHelperService.disTransErrMsg(e?.error?.message):(this._reportService.handleReportBulkPoll(e,!1),this._reportService.handleStatementBulkPoll(e,!1),e?.report_request_ids&&e?.report_request_ids?.length&&(console.log("displayReadyToDownloadReport:",e?.report_request_ids),this._commonHelperService.updateDownRprtIds("add",e?.report_request_ids)),e?.statement_request_ids&&e?.statement_request_ids?.length&&(console.log("displayReadyToDownloadStatement:",e?.statement_request_ids),this._commonHelperService.updateDownStmtIds("add",e?.statement_request_ids)))},error:(e=(0,u.Z)(function*(e){}),function(t){return e.apply(this,arguments)})})}handleLogin(){if(!this.checkAlreadyLoggedInBeforeSubmit()){if(this._authenticationService.vpnCheckCall.emit("1"),localStorage.setItem("currUserMob",this.loginForm.controls.email.value),this.spinnerSadad.show(),this.showContDown=!0,this.error=0,this.loginForm.controls.email.errors||this.loginForm.controls.password.errors)return this.error=1,void this.spinnerSadad.hide();
1this.submit=!0,this._authenticationService.currentUserValue?.id?(localStorage.setItem("currUserMob",this.loginForm.controls.email.value),this.processUserLogin()):this._authenticationService.login("","",!0).subscribe(e=>{e?.error?(this.spinnerSadad.hide(),this._commonHelperService.disTransErrMsg(e?.error?.message?e?.error?.message:e?.error)):this.processUserLogin()},e=>{this.submit=!1,this.enableLoginForm(),this._commonHelperService.disTransErrMsg(e?.error?.error?.message||e?.error?.message||e?.message),this.spinnerSadad.hide()})}}callFindOne(){this.processUserLogin()}processUserLogin(){this._authenticationService.login(this.loginForm.controls.email.value,this.loginForm.controls.password.value,!1).subscribe(e=>{if(e?.error)return 404==e?.error?.statusCode?(this.error=3,void this.spinnerSadad.hide()):499==e?.error?.statusCode?(this._commonHelperService.disTransErrMsg(e?.error?.message),this.submit=!1,void this.spinnerSadad.hide()):429==e?.error?.statusCode?(this.spinnerSadad.hide(),this._commonHelperService.disTransErrMsg("Too many attempts"==e?.error?.message?"REACHED_MAX_LOGIN_TRY_AFTER_30_SEC_OR_RESET_PWD":e?.error?.message),void(this.submit=!1)):(this.error=1,this.submit=!1,void this.spinnerSadad.hide());if(e?.blocked&&!e?.requestfordeleteaccount)return this.errorMessage="User is seems to be deactivated.",this.error=4,this.submit=!1,void this.spinnerSadad.hide();if(e?.blockedByAdmin)return this.errorMessage="Access permission is denied by admin.",this.error=4,this.submit=!1,void this.spinnerSadad.hide();if("basic"==e?.type)return this.errorMessage="You don't have sufficiant permissions to access Merchant Panel",this.error=4,this.submit=!1,void this.spinnerSadad.hide();if(1!==e?.roleId&&16!==e?.roleId&&17!==e?.roleId&&14!==e?.roleId)return this.submit=!1,e?.error&&e?.error?.message?this._commonHelperService.disTransErrMsg(e?.error?.message):this.error=1,void this.spinnerSadad.hide();{let t=this._permissionService.getAllowedServiceType(e?.roleId);this._paymentServiceTypeServices.changeServiceType(t),this.dummyNo=this.editNumber(this.loginForm.controls.email.value),this.startTimer(),this._userId=e?.userId,this.loginPage=!1,this.isVPNproxy=!1,this.eleLoginEmail&&this.eleLoginEmail.nativeElement.blur(),setTimeout(()=>{this.otp1&&this.otp1.nativeElement.focus()},0),this.submit=!1,this.spinnerSadad.hide(),this.loginResponse=e,this.setLoginUserData(e),localStorage.setItem("currUserMob",this.loginForm.controls.email.value)}},e=>{this.handleLoginErrMsg(e)})}handleLoginErrMsg(e){let t=e?.error?.error||e?.error||e;if(t){if(404==t?.statusCode)this.error=3,this.spinnerSadad.hide();else if(403==t?.statusCode&&"e043"==t?.error_code)this.handleAccountClosedErr(t);else if(499==t?.statusCode){let e="ar"==this.currLang&&t?.message_ar||t?.message;this._commonHelperService.disTransErrMsg(e),this.error=4,this.errorMessage=e,this.submit=!1,this.spinnerSadad.hide()}else 429==t?.statusCode?(this.spinnerSadad.hide(),this._commonHelperService.disTransErrMsg("Too many attempts"==t?.message?"REACHED_MAX_LOGIN_TRY_AFTER_30_SEC_OR_RESET_PWD":t?.message),this.submit=!1):(this.error=1,this.submit=!1);this.spinnerSadad.hide()}}handleAccountClosedErr(e){this._commonHelperService.disTransErrMsg("ACCT_CLOSED_NO_ACCESSED"),this.error=4,this.errorMessage="ACCT_CLOSED_NO_ACCESSED",this.submit=!1,this.spinnerSadad.hide()}setLoginUserData(e){this._authenticationService.setDataWthoutPromise("loginUser",{}),this._authenticationService.updateLoginUser("password",this.loginForm.controls.password.value),this._authenticationService.updateLoginUser("isSubmerchantEnabled",e.isSubmerchantEnabled),this._authenticationService.updateLoginUser("maxqty",e?.maxqty&&parseInt(e?.maxqty)?parseInt(e?.maxqty):999999999999999),this._authenticationService.updateLoginUser("isSNAMerchant",e?.sna_merchant_prod||!1),this._authenticationService.updateLoginUser("registered_date",e?.registered_date),this._authenticationService.updateLoginUser("privacyUpdateObj",e?.privacy_update||null),this._authenticationService.updateLoginUser("dynamicDateRange",this.updateDynamicDateRangeUser(e)),this._authenticationService.updateLoginUser("blocked",e?.blocked),this._authenticationService.updateLoginUser("requestfordeleteaccount",e?.requestfordeleteaccount),this._authenticationService.updateLoginUser("blockedByAdmin",e?.blockedByAdmin),this._authenticationService.updateLoginUser("type",e?.type),this._authenticationService.updateLoginUser("roleId",e?.roleId),this._authenticationService.updateLoginUser("posactivated",e?.posactivated),this._authenticationService.updateLoginUser("isSubUserPublicAccess",e?.isSubUserPublicAccess),this._authenticationService.updateLoginUser("fastifyEncryptionKey",e?.fastifyEncryptionKey),this._authenticationService.updateLoginUser("has_invoice_terminal",e?.has_invoice_terminal)}updateDynamicDateRangeUser(e){let t=e?.filter_start_date;if(!t){const e=new Date;e.setFullYear(e.getFullYear()-1),t=`${e.getFullYear()}
1-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}return t}resendOTP(){this.loginForm.controls.otp1.reset(),this.loginForm.controls.otp2.reset(),this.loginForm.controls.otp3.reset(),this.loginForm.controls.otp4.reset(),this.loginForm.controls.otp5.reset(),this.loginForm.controls.otp6.reset(),this._authenticationService.resndOTP("login").subscribe(e=>{},e=>{}),this.showContDown=!0,this.startTimer()}startTimer(){this.time=60,this.subsc=(0,h.F)(1e3).subscribe(e=>{this.time=this.time-1,this.time<0&&(this.showContDown=!1,this.subsc.unsubscribe())})}enableLoginForm(){this.loginForm&&(this.loginForm.enable(),this.isVPNDisabled=!1)}ngOnDestroy(){this.loginPage=!1,this.windowFocusEventListenerRef&&window.removeEventListener("focus",this.windowFocusEventListenerRef),this.windowStorageEventListenerRef&&window.removeEventListener("storage",this.windowStorageEventListenerRef),this.modalService.dismissAll(),this._distroyed$.next(null),this._distroyed$.complete(),this.subsc&&this.subsc.unsubscribe()}formatUserFriendlyErrMsg(e){const t="string"==typeof e?e:String(e?.message||e||"");return!t||/words|undefined|null|JSON|TypeError|SyntaxError|Http failure/i.test(t)?(0,b.tk)({errCodeVal:"E-100"}):t}processDynamicFirebaseUserAuth(e){try{const t=e?.SadadId||e?.sadadId||e?.id||this.loginResponse?.SadadId||this.loginResponse?.sadadId||this._authenticationService?.currentUserValue?.SadadId,r=e?.firebaseConfig||e?.clientConfig?.firebaseconfig||e?.clientConfig?.firebaseConfig||this.loginResponse?.firebaseConfig||this.loginResponse?.clientConfig?.firebaseconfig||this.loginResponse?.clientConfig?.firebaseConfig||this._authenticationService?.currentUserValue?.firebaseConfig;if(!t||!r)return;const n=`${t}@sadadmp.qa`;S&&!S.apps.length&&S.initializeApp(r);const i=S.auth();i&&i.fetchSignInMethodsForEmail(n).then(e=>{e&&e?.length>0?i.signInWithEmailAndPassword(n,"sadadqa"):i.createUserWithEmailAndPassword(n,"sadadqa")}).catch(e=>{console.error("processDynamicFirebaseUserAuth auth error:",e?.message||e)})}catch(t){console.error("processDynamicFirebaseUserAuth exception:",t?.message||t)}}}return e.\u0275fac=function(t){return new(t||e)(i.Y36(p.qu),i.Y36(y.$h),i.Y36(a.F0),i.Y36(y.$P),i.Y36(y.Yx),i.Y36(w.t2),i.Y36(o.sK),i.Y36(I.P),i.Y36(T.$),i.Y36(m.FF),i.Y36(y.rM))},e.\u0275cmp=i.Xpm({type:e,selectors:[["app-login"]],viewQuery:function(e,t){if(1&e&&(i.Gf(q,5),i.Gf(V,5),i.Gf(F,5)),2&e){let e;i.iGM(e=i.CRH())&&(t.otp1=e.first),i.iGM(e=i.CRH())&&(t.eleLoginEmail=e.first),i.iGM(e=i.CRH())&&(t.doc_expiry_notification=e.first)}},features:[i._Bn([m.NM,m.FF])],decls:31,vars:16,consts:[["bdColor","rgba(0, 0, 0, 0.8)","size","medium","color","#fff","type","ball-circus",3,"fullScreen"],[1,"d-none"],[3,"policyAction",4,"ngIf"],[1,"container-fluid"],[1,"row"],[1,"col-12","p-0"],[1,"login-card"],[1,"login-lang-selection"],[4,"ngIf"],[1,"logo"],["src","assets/images/logo/sadad-login-logo.svg","alt","looginpage",1,"img-fluid","for-light"],[1,"login-main","mb-3"],[1,"theme-form",3,"formGroup"],["class","otp",4,"ngIf"],[1,"language-s-wrapper"],[1,"mt-4","d-flex","align-items-center","justify-content-center","position-relative"],[1,"text-center","text-white","lgn-copyright","mb-0"],["doc_expiry_notification",""],[3,"policyAction"],["href","javascript:void(0);",1,""],["src","assets/images/language-selection/en-active.svg","alt","looginpage",1,"img-fluid"],["href","javascript:void(0);",1,"",3,"click"],["src","assets/images/language-selection/ar-inactive.svg","alt","looginpage",1,"img-fluid"],["src","assets/images/language-selection/ar-active.svg","alt","looginpage",1,"img-fluid"],["src","assets/images/language-selection/en-inactive.svg","alt","looginpage",1,"img-fluid"],[1,"form-group","mb-4"],["src","assets/images/login/user.svg","alt","",1,"img-fluid","login-icon"],["type"," ","required","","numbersOnly","","formControlName","email",1,"form-control","no-autofill-bkg",3,"placeholder","keyup.enter"],["eleLoginEmail",""],[1,"form-group","mb-2"],["src","assets/images/login/password.svg","alt","",1,"img-fluid","login-icon"],["type","password","formControlName","password","required","",1,"form-control","no-autofill-bkg","pr-5",3,"placeholder","keyup.enter"],["pass",""],[3,"click"],["class","text-white mb-3 d-block text-left lgn-err",4,"ngIf"],[1,"form-group","mb-0","pt-3"],[1,"link","d-block","text-right","mb-4","mt-4",3,"routerLink"],["type","button",1,"btn","btn-primary","btn-block","login-btn",3,"disabled","click"],["src","assets/images/login/open_eye.svg","alt","",1,"img-fluid","eye-icon"],["src","assets/images/login/closeeye.svg","alt","",1,"img-fluid","eye-icon"],[1,"text-white","mb-3","d-block","text-left","lgn-err"],[1,"otp"],[1,"text-center","text-white","mb-2","font-weight-bold"],[1,"text-center","text-white"],["dir","ltr",1,"form-group","mb-4"],["type","text","numbersOnly","","autoF
1ocusMaxLength","","maxlength","1","size","1","formControlName","otp1","name","otp1","autocomplete","off",1,"form-control",3,"keypress"],["otp1",""],["type","text","numbersOnly","","autoFocusMaxLength","","maxlength","1","size","1","formControlName","otp2","name","otp2","autocomplete","nope",1,"form-control",3,"keypress"],["type","text","numbersOnly","","autoFocusMaxLength","","maxlength","1","size","1","formControlName","otp3","name","otp3","autocomplete","nope",1,"form-control",3,"keypress"],["type","text","numbersOnly","","autoFocusMaxLength","","maxlength","1","size","1","formControlName","otp4","name","otp4","autocomplete","nope",1,"form-control",3,"keypress"],["type","text","numbersOnly","","autoFocusMaxLength","","maxlength","1","size","1","formControlName","otp5","name","otp5","autocomplete","nope",1,"form-control",3,"keypress"],["type","text","numbersOnly","","autoFocusMaxLength","","maxlength","1","size","1","formControlName","otp6","name","otp6","autocomplete","nope",1,"form-control","lastpiner",3,"keypress","keyup"],["class","resend-otp text-white font-weight-bold text-center  m-0 cursor mb-0 pointer",3,"click",4,"ngIf"],["class","resend-otp text-center mt-1","style","margin-top:.50rem",4,"ngIf"],[1,"mt-4","mb-0"],[1,"ml-2","text-white","pointer",3,"click"],[1,"resend-otp","text-white","font-weight-bold","text-center","m-0","cursor","mb-0","pointer",3,"click"],[1,"resend-otp","text-center","mt-1",2,"margin-top",".50rem"],["id","time"],[1,"cattwo-header"],["type","button","aria-label","Close",1,"cattwo-close",3,"click"],["src","assets/images/pos-panel/popup-close.svg"],[1,"modal-body","p-0"],[1,"cate-popup-body"],[1,"exclamation_icon"],["src","assets/images/login/exclamation_mark.svg","alt","exclamation_mark",1,"img-fluid"],[1,"cattwo-content"],[1,"text-center","mb-0"],[4,"ngIf","ngIfElse"],["docExpElBlk",""],[1,"withdbutton-group"],[3,"routerLink"],["type","button",1,"btn","outline-btn","cancel","mr-3",3,"click"],["type","button",1,"btn","confirm-btn",3,"click"]],template:function(e,t){1&e&&(i.TgZ(0,"ngx-spinner",0),i._UZ(1,"app-sadad-loader"),i.qZA(),i.ynx(2,1),i.YNc(3,Y,1,0,"app-privacy-policy",2),i.BQk(),i.TgZ(4,"div",3),i.TgZ(5,"div",4),i.TgZ(6,"div",5),i.TgZ(7,"div",6),i.TgZ(8,"div",7),i.YNc(9,H,5,0,"ng-container",8),i.YNc(10,j,5,0,"ng-container",8),i.qZA(),i.TgZ(11,"div"),i.TgZ(12,"div"),i.TgZ(13,"a",9),i._UZ(14,"img",10),i.qZA(),i.qZA(),i.TgZ(15,"div",11),i.TgZ(16,"h4"),i._uU(17),i.ALo(18,"translate"),i.qZA(),i.TgZ(19,"form",12),i.YNc(20,X,26,25,"div",8),i.YNc(21,re,25,18,"div",13),i.qZA(),i.qZA(),i.TgZ(22,"div",14),i.TgZ(23,"div",15),i.TgZ(24,"div"),i.TgZ(25,"p",16),i.TgZ(26,"em"),i._uU(27),i.ALo(28,"translate"),i.qZA(),i.qZA(),i.qZA(),i.qZA(),i.qZA(),i.qZA(),i.qZA(),i.qZA(),i.qZA(),i.qZA(),i.YNc(29,se,23,13,"ng-template",null,17,i.W1O)),2&e&&(i.Q6J("fullScreen",!0),i.xp6(3),i.Q6J("ngIf",t.isShowPrivacyPolicy),i.xp6(5),i.ekj("div-disabled",t.isVPNDisabled),i.xp6(1),i.Q6J("ngIf","en"==t.currLang),i.xp6(1),i.Q6J("ngIf","ar"==t.currLang),i.xp6(7),i.hij(" ",i.lcZ(18,12,"MERCHANT_PANEL")," "),i.xp6(2),i.Q6J("formGroup",t.loginForm),i.xp6(1),i.Q6J("ngIf",t.loginPage),i.xp6(1),i.Q6J("ngIf",!t.loginPage),i.xp6(6),i.AsE("",i.lcZ(28,14,"COPYRIGHT")," SADAD @",t.currYear,""))},directives:[w.Ro,E.T,A.O5,p._Y,p.JL,p.sg,M,D.p,p.Fj,p.Q7,p.JJ,p.u,Z.mh,a.yS,k.Lv,R.b,p.nD],pipes:[o.X$],styles:['.loader--text[_ngcontent-%COMP%]{top:200%;left:0;right:0;margin:auto}.loader--text[_ngcontent-%COMP%]:after{content:"Loading";font-weight:700;-webkit-animation-name:loading-text;animation-name:loading-text;-webkit-animation-duration:3s;animation-duration:3s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.pointer[_ngcontent-%COMP%]{cursor:pointer}.exclamation_icon[_ngcontent-%COMP%]{height:64px;width:64px;margin:auto auto 30px}.exclamation_icon[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{height:100%;width:100%}@-webkit-keyframes loader{15%{transform:translateX(0)}45%{transform:translateX(230px)}65%{transform:translateX(230px)}95%{transform:translateX(0)}}@keyframes loader{15%{transform:translateX(0)}45%{transform:translateX(230px)}65%{transform:translateX(230px)}95%{transform:translateX(0)}}@-webkit-keyframes loading-text{0%{content:"Loading"}25%{content:"Loading."}50%{content:"Loading.."}75%{content:"Loading..."}}@keyframes loading-text{0%{content:"Loading"}25%{content:"Loading."}50%{content:"Loading.."}75%{content:"Loading..."}}.login-card[_ngcontent-%COMP%]   .login-main[_ngcontent-%COMP%]   .theme-form[_ngcontent-%COMP%]{position:relative}.login-card[_ngcontent-%COMP%]   .login-main[_ngcontent-%COMP%]   .theme-form[_ngcontent-%COMP%]   .otp[_ngcontent-%COMP%]   .form-group[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.login-card[_ngcontent-%COMP%]   .login-main[_ngcontent-%COMP%]   .theme-form[_ngcontent-%COMP%]   .otp[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{border-radius:6px;padding:7px;height:43px;text-align:center;margin:5px}.login-card[_ngcontent-%COMP%]   .login-main[_ngcontent-%COMP%]   .theme-form[_ngcontent-%COMP%]   .lgn-err[_ngcontent-%COMP%]{position:absolute}input[_ngcontent-%COMP%]::-ms-clear, input[_ngcontent-%COMP%]::-ms-reveal{display:none}']}),e})();var le=r(94544),ce=r(99713);const de=(0,ce.X$)("fadeInAnimation",[(0,ce.eR)("* => *",[(0,ce.oB)({position:"relative"}),(0,ce.IO)(":enter, :leave",[(0,ce.oB)({position:"absolute",top:0,left:0,width:"100%"})]),(0,ce.IO)(":enter",[(0,ce.oB)({opacity:"0"})],{optional:!0}),(0,ce.IO)(":leave",(0,ce.pV)(),{optional:!0}),(0,ce.ru)([(0,ce.IO)(":leave",[(0,ce.jt)(".2s ease-in-out",(0,ce.oB)({opacity:"0"}))],{optional:!0}),(0,ce.IO)(":enter",[(0,ce.jt)(".2s ease-in-out",(0,ce.oB)({opacity:"1"}))],{delay:300,optional:!0})]),(0,ce.IO)(":enter",(0,ce.pV)(),{optional:!0})])]);var ue=r(54803),pe=r(77818);let he=(()=>{class e{constructor(e,t,r){this._auth=e,this._commonHelperService=t,this._header=r,this._distroyed$=new _.x}ngOnInit(){this.getMerchantHeaderDetails(),this.initLastLoginDateDetails()}getLastLogin(){let e=this.resolveUserLastLoginDateVal(this._auth?.currentUserValue);e&&(this.lastLoggedIn=e)}getMerchantHeaderDetails(){const e=this._header.getMerchantHeaderDetails();this.merchantName=e.merchantName,this.roleName=1==e.roleId?"MERCHANT_ADMIN_USER":14==e.roleId?"SALES_SUB_USER":16==e.roleId?"FINANCE_SUB_USER":17==e.roleId?"API_SUB_USER":""}signOut(){this._auth.logout().pipe((0,f.R)(this._distroyed$)).subscribe(e=>{})}resolveUserLastLoginDateVal(e){return e?.modified||e?.previouslogindatetime||""}initLastLoginDateDetails(){this.lastLoggedIn=this.resolveUserLastLoginDateVal(this._auth?.currentUserValue),this.getLastLogin(),this._auth?.currentUser?.pipe((0,f.R)(this._distroyed$)).subscribe(e=>{let t=this.resolveUserLastLoginDateVal(e);t&&(this.lastLoggedIn=t)})}ngOnDestroy(){this._distroyed$.next(null),this._distroyed$.complete()}}return e.\u0275fac=function(t){return new(t||e)(i.Y36(y.$h),i.Y36(y.$P),i.Y36(y.r6))},e.\u0275cmp=i.Xpm({type:e,selectors:[["app-my-account"]],decls:11,vars:4,consts:[[1,"media","profile-media","custom-header"],[1,"avatars"],[1,"avatar"],["src","assets/images/pos-panel/header/user.svg","alt","#",1,"img-40","rounded-circle"],[1,"profile-dropdown","on
1hover-show-div","sadad-profile","p-3"],[1,"puser-content"],[1,"mb-2"],[1,"mb-0"]],template:function(e,t){1&e&&(i.TgZ(0,"div",0),i.TgZ(1,"div",1),i.TgZ(2,"div",2),i._UZ(3,"img",3),i.qZA(),i.qZA(),i.qZA(),i.TgZ(4,"ul",4),i.TgZ(5,"div",5),i.TgZ(6,"span",6),i._uU(7),i.qZA(),i.TgZ(8,"p",7),i._uU(9),i.ALo(10,"translate"),i.qZA(),i.qZA(),i.qZA()),2&e&&(i.xp6(7),i.Oqu(t.merchantName),i.xp6(2),i.Oqu(i.lcZ(10,2,t.roleName)))},pipes:[o.X$],styles:[".custom-header[_ngcontent-%COMP%]   .avatars[_ngcontent-%COMP%]   .avatar[_ngcontent-%COMP%]   .status[_ngcontent-%COMP%]{background-color:#e06f85;height:12px;width:12px;top:1px;right:-2px;border:0}.custom-header[_ngcontent-%COMP%]   .media-body[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-size:16px;font-weight:700!important;color:#324c6a}@media screen and (max-width:1440px){.custom-header[_ngcontent-%COMP%]   .media-body[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-size:14px}}.custom-header[_ngcontent-%COMP%]   .media-body[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-size:12px;font-weight:600!important;color:#324c6a!important}@media screen and (max-width:1440px){.custom-header[_ngcontent-%COMP%]   .media-body[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-size:13px}}.sadad-profile[_ngcontent-%COMP%]   .s-profile-list[_ngcontent-%COMP%]   .s-profile-name[_ngcontent-%COMP%]   h6[_ngcontent-%COMP%]{font-size:13px;color:#324c6a;margin-bottom:0;margin-top:5px;font-weight:600}.puser-content[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-size:15px;font-weight:700;color:#324c6a}.puser-content[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:#324c6a}"]}),e})();var ge=r(14391),me=r(89749),fe=r(82051),ve=r(59938),_e=r(34115),Se=r(7491);const be=["scrollContainer"];function ye(e,t){if(1&e){const e=i.EpF();i.TgZ(0,"button",19),i.NdJ("click",function(){i.CHM(e);const t=i.oxw().$implicit;return i.oxw().onReportKafkaDownload(t)}),i._uU(1),i.ALo(2,"translate"),i.qZA()}2&e&&(i.xp6(1),i.hij(" ",i.lcZ(2,1,"Download Report")," "))}function we(e,t){if(1&e){const e=i.EpF();i.TgZ(0,"div",20),i.TgZ(1,"button",19),i.NdJ("click",function(){i.CHM(e);const t=i.oxw().$implicit;return i.oxw().onReqDeliveryNotifDownload(t)}),i._uU(2),i.ALo(3,"translate"),i.qZA(),i.TgZ(4,"button",19),i.NdJ("click",function(){i.CHM(e);const t=i.oxw().$implicit;return i.oxw().onReqDeliveryNotifView(t)}),i._uU(5),i.ALo(6,"translate"),i.qZA(),i.qZA()}2&e&&(i.xp6(2),i.hij(" ",i.lcZ(3,2,"DOWNLOAD_LABEL")," "),i.xp6(3),i.hij(" ",i.lcZ(6,4,"VIEW")," "))}function Ie(e,t){1&e&&i.GkF(0)}function Te(e,t){1&e&&i.GkF(0)}function Ee(e,t){if(1&e){const e=i.EpF();i.TgZ(0,"div",20),i.TgZ(1,"button",21),i.NdJ("click",function(){i.CHM(e);const t=i.oxw().$implicit;return i.oxw().onReportKafkaDownload(t,"excel")}),i.TgZ(2,"span",22),i.YNc(3,Ie,1,0,"ng-container",23),i.qZA(),i._uU(4," Excel "),i.qZA(),i.TgZ(5,"button",24),i.NdJ("click",function(){i.CHM(e);const t=i.oxw().$implicit;return i.oxw().onReportKafkaDownload(t,"pdf")}),i.TgZ(6,"span",22),i.YNc(7,Te,1,0,"ng-container",23),i.qZA(),i._uU(8," PDF "),i.qZA(),i.qZA()}if(2&e){i.oxw(2);const e=i.MAs(17),t=i.MAs(19);i.xp6(3),i.Q6J("ngTemplateOutlet",e),i.xp6(4),i.Q6J("ngTemplateOutlet",t)}}const Ae=function(e){return{"unread-notif":e}};function $e(e,t){if(1&e){const e=i.EpF();i.ynx(0),i.TgZ(1,"div",15),i.NdJ("click",function(){const t=i.CHM(e).$implicit;return i.oxw().markAsRead(t)}),i.TgZ(2,"h6"),i._uU(3),i.qZA(),i.TgZ(4,"span",16),i._uU(5),i.ALo(6,"formatDate"),i.qZA(),i.YNc(7,ye,3,3,"button",17),i.YNc(8,we,7,6,"div",18),i.YNc(9,Ee,9,2,"div",18),i.qZA(),i.BQk()}if(2&e){const e=t.$implicit,r=i.oxw();i.xp6(1),i.Q6J("ngClass",i.VKq(8,Ae,!(null!=e&&e.isread))),i.xp6(2),i.Oqu(null==e||null==e.notification?null:e.notification.textmessage),i.xp6(2),i.Oqu(i.lcZ(6,6,null==e?null:e.created)),i.xp6(2),i.Q6J("ngIf",101==(null==e||null==e.notification?null:e.notification.entity_id)&&(null==e?null:e.action_id)),i.xp6(1),i.Q6J("ngIf",r.isReqDeliveryPanelNotif(e)&&r.isReqDeliveryNotifDownloadable(e)),i.xp6(1),i.Q6J("ngIf",102==(null==e||null==e.notification?null:e.notification.entity_id)&&(null==e?null:e.action_id))}}function Ce(e,t){1&e&&i.GkF(0)}function Pe(e,t){if(1&e&&(i.ynx(0),i.TgZ(1,"div",25),i.TgZ(2,"div",26),i.TgZ(3,"div",27),i.TgZ(4,"span"),i.YNc(5,Ce,1,0,"ng-container",23),i.qZA(),i.qZA(),i.TgZ(6,"div",28),i._uU(7),i.ALo(8,"translate"),i.qZA(),i.qZA(),i.qZA(),i.BQk()),2&e){i.oxw();const e=i.MAs(15);i.xp6(5),i.Q6J("ngTemplateOutlet",e),i.xp6(2),i.Oqu(i.lcZ(8,2,"NO_NOTIF_FOUND"))}}const xe=function(){return["/merchantpanel/notifications"]};function Ne(e,t){1&e&&(i.TgZ(0,"button",29),i._uU(1),i.ALo(2,"translate"),i.qZA()),2&e&&(i.Q6J("routerLink",i.DdM(4,xe)),i.xp6(1),i.hij(" ",i.lcZ(2,2,"ALL_NOTIFICATIONS")," "))}function Oe(e,t){1&e&&(i.O4$(),i.TgZ(0,"svg",30),i._UZ(1,"path",31),i._UZ(2,"path",32),i.qZA())}function Ue(e,t){1&e&&(i.O4$(),i.TgZ(0,"svg",33),i._UZ(1,"path",34),i.qZA())}function Le(e,t){1&e&&(i.O4$(),i.TgZ(0,"svg",33),i._UZ(1,"path",35),i.qZA())}const Me=function(e){return{show:e}};let De=(()=>{class e{constructor(e,t,r,n,i,a,s,o,l){this._notificationService=e,this._commonHelperService=t,this._snackbarService=r,this.el=n,this._reportService=i,this._spinCtrlServ=a,this._balStatementService=s,this._shippingService=o,this.router=l,this._distroyed$=new _.x,this.openNotification=!1,this.limit=5,this.skip=0,this.showLoader=!1,this.showDropdown=!1}ngOnInit(){this.getNotifications(),this.subscription=(0,h.F)(12e4).pipe((0,f.R)(this._distroyed$)).subscribe(()=>{this.getNotifications(!0)}),this._snackbarService.showNotification$.pipe((0,f.R)(this._distroyed$)).subscribe(({isVisible:e,isApiCall:t})=>{console.log("notification ts file showNotification:",e),e?this.getNotifications(!0,e):t&&this.getNotifications(!0)})}onClickOutside(e){!this.el.nativeElement.contains(e.target)&&this.showDropdown&&(this.showDropdown=!1)}scrollToTop(){this.scrollContainer&&(this.scrollContainer.nativeElement.scrollTop=0)}toggleNotification(){this.showDropdown=!this.showDropdown}getNotifications(e=!1,t=!1){t&&this._spinCtrlServ.showSpinner(),this._notificationService.getNotifications(this.skip,this.limit).pipe((0,f.R)(this._distroyed$)).subscribe(e=>{e?.error?this._commonHelperService.disTransErrMsg(e?.error?.message):e&&(this.notifications=e),this.showLoader=!1,t&&(this.showDropdown=!0,this._spinCtrlServ.hideSpinner()),setTimeout(()=>{this.scrollToTop()})},()=>{this.showLoader=!1,t&&this._spinCtrlServ.hideSpinner()})}onScrollDown(e){this.showLoader=!0,this.limit=this.limit+this.limit,this.getNotifications(),console.log("onScrollDown called")}markAsRead(e){console.log("mark as read called!"),0==e.isread&&(e.isread=!0,this._notificationService.markSingleNotificationAsRead(e?.id).pipe((0,f.R)(this._distroyed$)).subscribe(e=>{e?.error&&this._commonHelperService.disTransErrMsg(e?.error?.message)}))}onReportKafkaDownload(e,t=""){var r=this;return(0,u.Z)(function*(){var n,i;console.log("Notification component onReportKafkaDownload start :",e),102!=e?.notification?.entity_id?(r._spinCtrlServ.showSpinner(),r._reportService.downloadKafkaReport(e?.action_id).pipe((0,f.R)(r._distroyed$)).subscribe({next:(i=(0,u.Z)(function*(t){yield r._reportService.getKafkaReportName(t,e?.report_type),r._spinCtrlServ.hideSpinner(),r._commonHelperService.logFirebaseEvent("RPT_KAFKA_DW_NOTIFICATION","NotificationComponent")}),function(e){return i.apply(this,arguments)}),error:(n=(0,u.Z)(function*(e){const t=JSON.parse(yield e.error.text())?.error?.message;r._spinCtrlServ.hideSpinner(),r._commonHelperService.disTransErrMsg(t)}),function(e){return n.apply(this,arguments)})})):r.downloadStatementFromNotification(e,t)})()}downloadStatementFromNotification(e,t){this._spinCtrlServ.showSpinner(),this._balStatementService.downloadAndSaveStatement
1(e?.action_id,t,e).pipe((0,f.R)(this._distroyed$)).subscribe({next:e=>{this._spinCtrlServ.hideSpinner(),this._commonHelperService.logFirebaseEvent("BAL_STMT_DW_NOTIFICATION","AllNotificationComponent")},error:e=>{this._spinCtrlServ.hideSpinner(),this._commonHelperService.disTransErrMsg(e?.error?.error?.message||e?.error?.message||"Statement file is not ready to download.")}})}isReqDeliveryPanelNotif(e){const t=(e?.action_id||"").toString().trim();return 14===Number(e?.notification?.notificationentityId)&&!!t}isReqDeliveryNotifDownloadable(e){return(e?.action_id||"").toString().trim().toUpperCase().startsWith("SA")}onReqDeliveryNotifDownload(e){const t=(e?.action_id||"").toString().trim();t&&(this._spinCtrlServ.showSpinner(),this._shippingService.exportDeliveryLabel(t).pipe((0,f.R)(this._distroyed$)).subscribe({next:e=>{(0,fe.saveAs)(e,`Label-${t}.pdf`),this._spinCtrlServ.hideSpinner()},error:()=>{this._spinCtrlServ.hideSpinner()}}))}onReqDeliveryNotifView(e){const t=(e?.action_id||"").toString().trim();t.toUpperCase().startsWith("SA")&&this.router.navigateByUrl((0,ve.o)("",{shipId:t||void 0}))}ngOnDestroy(){this.subscription.unsubscribe(),this._distroyed$.next(null),this._distroyed$.complete()}}return e.\u0275fac=function(t){return new(t||e)(i.Y36(y.gq),i.Y36(y.$P),i.Y36(_e.o),i.Y36(i.SBq),i.Y36(y.rM),i.Y36(y.br),i.Y36(y.yS),i.Y36(y.Nk),i.Y36(a.F0))},e.\u0275cmp=i.Xpm({type:e,selectors:[["app-notification"]],viewQuery:function(e,t){if(1&e&&i.Gf(be,5),2&e){let e;i.iGM(e=i.CRH())&&(t.scrollContainer=e.first)}},hostBindings:function(e,t){1&e&&i.NdJ("click",function(e){return t.onClickOutside(e)},!1,i.evT)},decls:20,vars:9,consts:[[1,"notification-box","custom-header"],[1,"avatars"],[1,"avatar"],["src","assets/images/pos-panel/header/bell.svg","alt","#",1,"img-40","rounded-circle"],[1,"status","status-40"],[1,"notification-dropdown","onhover-show-div",3,"ngClass"],[1,"notification-title"],[1,"custom-scrollbar"],["scrollContainer",""],[4,"ngFor","ngForOf"],[4,"ngIf"],["class","notification-title",3,"routerLink",4,"ngIf"],["noNotificationIcon",""],["excelIcon",""],["pdfIcon",""],[1,"notification-box",3,"ngClass","click"],["dir","ltr"],["type","button","class","btn download-report-btn",3,"click",4,"ngIf"],["class","report-download-buttons",4,"ngIf"],["type","button",1,"btn","download-report-btn",3,"click"],[1,"report-download-buttons"],["type","button",1,"btn","excel-btn",3,"click"],[1,"icon"],[4,"ngTemplateOutlet"],["type","button",1,"btn","pdf-btn",3,"click"],[1,"no-record-notification"],[1,"text-center","no-record-found"],[1,"text-center"],[1,"no-record-txt"],[1,"notification-title",3,"routerLink"],["width","48","height","48","viewBox","0 0 48 48","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M35.5878 16.078C36.5706 17.7881 37.1551 19.6069 37.249 21.5437C37.3243 23.0924 37.2211 24.6495 37.2942 26.1985C37.3479 27.33 37.4924 28.4685 37.7219 29.5779C37.9094 30.4831 38.4582 31.2068 39.2835 31.7168C40.795 32.6507 41.2869 33.8459 40.8434 35.3757C40.4012 36.8999 39.024 37.9777 37.4316 37.9897C34.9101 38.0082 32.3887 37.9963 29.8675 37.997C29.6736 37.997 29.4801 37.997 29.3036 37.997C28.2363 40.7069 26.6948 41.9015 24.3563 41.8615C22.2198 41.8251 20.6055 40.4887 19.7332 37.9981C17.7542 37.9981 15.7568 37.989 13.7601 38.0128C13.5595 38.0156 13.3257 38.1848 13.1679 38.3382C12.0816 39.3944 11.013 40.4687 9.93514 41.534C9.38635 42.0763 8.89053 42.1435 8.4611 41.7449C8.02567 41.341 8.07864 40.7696 8.62426 40.2284C18.7808 30.1503 28.9387 20.0742 39.0988 9.99918C39.625 9.47723 40.1674 9.42819 40.582 9.83979C40.9889 10.244 40.9306 10.7877 40.4072 11.3072C38.811 12.8923 37.2098 14.4732 35.5878 16.078ZM34.3299 17.6837C28.1 23.8571 21.8761 30.0245 15.6932 36.1523C15.6784 36.1509 15.7822 36.1646 15.8867 36.1646C22.9734 36.1656 30.06 36.167 37.147 36.1604C37.4242 36.16 37.7187 36.1222 37.9755 36.0252C38.6115 35.7852 38.9936 35.3063 39.1112 34.6401C39.215 34.0495 38.9314 33.6403 38.4342 33.3611C36.6014 32.3295 35.7775 30.6505 35.6147 28.68C35.4476 26.6658 35.4653 24.6358 35.4321 22.6121C35.4031 20.8449 35.0977 19.1497 34.3299 17.6837ZM21.7903 38.0128C22.111 39.2395 23.4374 40.1342 24.6748 40.0288C25.8476 39.9282 27.2267 38.9624 27.1698 38.0128C25.3942 38.0128 23.6172 38.0128 21.7903 38.0128Z","fill","#7E0E45"],["fill-rule","evenodd","clip-rule","evenodd","d","M13.6308 24.4537C13.4179 26.2871 13.4596 28.1553 13.1304 29.9681C12.8663 31.4201 11.9728 32.5365 10.6693 33.3149C9.72573 33.8785 9.63179 34.7476 10.3674 35.5855C10.5094 35.747 10.758 35.9159 10.7576 36.0809C10.7576 36.4371 10.7421 36.9444 10.5207 37.109C10.2671 37.2975 9.66781 37.3451 9.41884 37.1717C7.85263 36.0812 7.29889 33.2802 9.23979 32.0895C11.1581 30.9132 11.6144 29.167 11.7044 27.1979C11.7768 25.6055 11.7309 24.007 11.7302 22.4107C11.7284 16.8949 15.0999 12.2022 20.3749 10.4269C20.8591 10.264 21.0395 10.0741 21.0551 9.54098C21.1112 7.64971 22.319 6.28598 24.0667 6.03271C25.6675 5.80081 27.2821 6.82299 27.7956 8.42632C27.9121 8.78994 27.9863 9.18998 27.9658 9.56726C27.939 10.064 28.1668 10.2237 28.5987 10.3628C30.2952 10.91 31.7911 11.8099 33.1006 13.0125C33.7024 13.5649 33.7924 14.0683 33.3697 14.5135C32.9456 14.9594 32.4529 14.9209 31.8409 14.3632C26.0486 9.08769 16.8155 11.674 14.2559 18.5826C13.5493 20.4904 13.544 22.4657 13.6308 24.4537C13.6863 24.46 13.5754 24.4474 13.6308 24.4537ZM26.0436 9.734C26.1853 8.9749 25.8946 8.44349 25.2815 8.08128C24.7027 7.73938 24.1151 7.78983 23.5811 8.17901C23.0549 8.56294 22.8222 9.07823 22.9815 9.73365C24.0074 9.734 24.9959 9.734 26.0436 9.734Z","fill","#7E0E45"],["width","13","height","13","viewBox","0 0 13 13","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M7.58333 1.08334V3.25C7.58333 3.53732 7.69747 3.81287 7.90063 4.01604C8.1038 4.2192 8.37935 4.33334 8.66667 4.33334H10.8333M4.33333 7.04167H5.41667M7.58333 7.04167H8.66667M4.33333 9.20834H5.41667M7.58333 9.20834H8.66667M8.125 1.08334H3.25C2.96268 1.08334 2.68713 1.19747 2.48397 1.40064C2.2808 1.6038 2.16667 1.87935 2.16667 2.16667V10.8333C2.16667 11.1207 2.2808 11.3962 2.48397 11.5994C2.68713 11.8025 2.96268 11.9167 3.25 11.9167H9.75C10.0373 11.9167 10.3129 11.8025 10.516 11.5994C10.7192 11.3962 10.8333 11.1207 10.8333 10.8333V3.79167L8.125 1.08334Z","stroke","#00A63E","stroke-width","1.08333","stroke-linecap","round","stroke-linejoin","round"],["d","M7.58333 1.08334V3.25C7.58333 3.53732 7.69747 3.81287 7.90064 4.01604C8.1038 4.2192 8.37935 4.33334 8.66667 4.33334H10.8333M5.41667 4.875H4.33333M8.66667 7.04167H4.33333M8.66667 9.20834H4.33333M8.125 1.08334H3.25C2.96268 1.08334 2.68713 1.19747 2.48397 1.40064C2.2808 1.6038 2.16667 1.87935 2.16667 2.16667V10.8333C2.16667 11.1207 2.2808 11.3962 2.48397 11.5994C2.68713 11.8025 2.96268 11.9167 3.25 11.9167H9.75C10.0373 11.9167 10.3129 11.8025 10.516 11.5994C10.7192 11.3962 10.8333 11.1207 10.8333 10.8333V3.79167L8.125 1.08334Z","stroke","#FB2C36","stroke-width","1.08333","stroke-linecap","round","stroke-linejoin","round"]],template:function(e,t){1&e&&(i.TgZ(0,"div",0),i.TgZ(1,"div",1),i.TgZ(2,"div",2),i._UZ(3,"img",3),i._UZ(4,"div",4),i.qZA(),i.qZA(),i.qZA(),i.TgZ(5,"ul",5),i.TgZ(6,"h5",6),i._uU(7),i.ALo(8,"translate"),i.qZA(),i.TgZ(9,"li",7,8),i.YNc(11,$e,10,10,"ng-container",9),i.YNc(12,Pe,9,4,"ng-container",10),i.qZA(),i.YNc(13,Ne,3,5,"button",11),i.qZA(),i.YNc(14,Oe,3,0,"ng-template",null,12,i.W1O),i.YNc(16,Ue,2,0,"ng-template",null,13,i.W1O),i.YNc(18,Le,2,0,"ng-template",null,14,i.W1O)),2&e&&(i.xp6(5),i.Q6J("ngClass",i.VKq(7,Me,t.showDropdown)),i.xp6(2),i.Oqu(i.lcZ(8,5,"NOTIFICATION")),i.xp6(4),i.Q6J("ngForOf",t.n
1otifications),i.xp6(1),i.Q6J("ngIf",t.notifications&&0==(null==t.notifications?null:t.notifications.length)),i.xp6(1),i.Q6J("ngIf",(null==t.notifications?null:t.notifications.length)>0))},directives:[A.mk,A.sg,A.O5,A.tP,a.rH],pipes:[o.X$,Se.r2],styles:[".custom-header[_ngcontent-%COMP%]   .avatars[_ngcontent-%COMP%]   .avatar[_ngcontent-%COMP%]   .status[_ngcontent-%COMP%]{background-color:#e06f85;height:18px;width:18px;top:0;color:#fff!important;padding-top:2px;font-size:9px;right:3px;border:0;text-align:center}.custom-header[_ngcontent-%COMP%]   .media-body[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-size:16px;font-weight:700!important;color:#324c6a}.custom-header[_ngcontent-%COMP%]   .media-body[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-size:12px;font-weight:600!important;color:#324c6a!important}.search-results[_ngcontent-%COMP%]{height:21rem;overflow:scroll}.no-record-notification[_ngcontent-%COMP%]:hover{background-color:transparent}.no-record-notification[_ngcontent-%COMP%]   .no-record-found[_ngcontent-%COMP%]{display:flex;flex-direction:column;position:absolute;left:50%;transform:translate(-50%,-50%);top:50%;margin-top:0}.no-record-notification[_ngcontent-%COMP%]   .no-record-found[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{height:100%;width:auto}.no-record-notification[_ngcontent-%COMP%]   .no-record-found[_ngcontent-%COMP%]   .no-record-txt[_ngcontent-%COMP%]{font-size:14px}  .s-notification-wrapper .notification-switch{flex-basis:85px}  .page-wrapper .page-header .header-wrapper .nav-right .notification-dropdown button{padding:8px 16px!important}  .notification-box .download-report-btn{padding:8px 16px!important;height:36px;border:1px solid #8e1b3e!important;border-radius:10px!important;font-family:Open Sans,sans-serif;font-style:normal;font-weight:400;font-size:12px;line-height:20px;letter-spacing:-.005em;color:#8e1b3e;width:-webkit-max-content!important;width:-moz-max-content!important;width:max-content!important;display:block;margin-top:15px}.report-download-buttons[_ngcontent-%COMP%]{grid-gap:16px;gap:16px;display:flex;align-items:center;grid-gap:10px;gap:10px}.report-download-buttons[_ngcontent-%COMP%]   .excel-btn[_ngcontent-%COMP%], .report-download-buttons[_ngcontent-%COMP%]   .pdf-btn[_ngcontent-%COMP%]{padding:8px 16px!important;height:36px;border:1px solid #4a5565!important;border-radius:10px!important;font-family:Open Sans,sans-serif;font-style:normal;font-weight:400;font-size:12px;line-height:20px;letter-spacing:-.005em;color:#4a5565;width:-webkit-max-content!important;width:-moz-max-content!important;width:max-content!important;display:flex;align-items:center;margin-top:15px}"]}),e})();const Re=["mobHeaderMenu"];function Ze(e,t){if(1&e&&(i.TgZ(0,"span"),i._uU(1),i.qZA()),2&e){const e=i.oxw();i.xp6(1),i.hij("",e.sadadMerchantId," ")}}function ke(e,t){if(1&e&&(i.TgZ(0,"span"),i._uU(1),i.qZA()),2&e){const e=i.oxw();i.xp6(1),i.hij("",e.sadadMainMerchantId," ")}}function qe(e,t){if(1&e){const e=i.EpF();i.TgZ(0,"div",37),i.TgZ(1,"div",38),i.TgZ(2,"div",39),i.TgZ(3,"ng-select",40),i.NdJ("ngModelChange",function(t){return i.CHM(e),i.oxw().pType=t})("change",function(t){return i.CHM(e),i.oxw().changeServiceType(t)}),i.ALo(4,"translate"),i.qZA(),i.qZA(),i.qZA(),i.qZA()}if(2&e){const e=i.oxw();i.xp6(3),i.s9C("placeholder",i.lcZ(4,5,"ONLINE_PAYMENT")),i.Q6J("items",e.projectType)("searchable",!1)("clearable",!1)("ngModel",e.pType)}}function Ve(e,t){1&e&&(i.TgZ(0,"li",58),i.TgZ(1,"p"),i._uU(2),i.ALo(3,"translate"),i.qZA(),i.qZA()),2&e&&(i.xp6(2),i.Oqu(i.lcZ(3,1,"Switch to another Account")))}function Fe(e,t){1&e&&i._UZ(0,"img",71)}function Ye(e,t){1&e&&i._UZ(0,"img",72)}const He=function(e){return{"primary-merchant-text":e}};function je(e,t){if(1&e&&(i.TgZ(0,"a",73),i.TgZ(1,"p",74),i._uU(2,"Primary"),i.qZA(),i.qZA()),2&e){const e=i.oxw().$implicit;i.Q6J("ngClass",i.VKq(1,He,!(null!=e&&e.parentmerchantId)))}}function Je(e,t){1&e&&i._UZ(0,"img",75)}function Be(e,t){1&e&&i._UZ(0,"img",76)}const We=function(){return[2,3]},Ge=function(e){return{"primary-merchant-favourite":e}};function Qe(e,t){if(1&e){const e=i.EpF();
1i.ynx(0),i.TgZ(1,"div",61),i.NdJ("click",function(t){const r=i.CHM(e).$implicit;return i.oxw(4).switchToMerchant(t,null==r?null:r.SadadId)}),i.TgZ(2,"div",49),i.TgZ(3,"div",62),i._UZ(4,"img",51),i.ALo(5,"secure"),i.TgZ(6,"span",63),i.YNc(7,Fe,1,0,"img",64),i.YNc(8,Ye,1,0,"img",65),i.qZA(),i.qZA(),i.TgZ(9,"div",66),i.TgZ(10,"h6"),i._uU(11),i.qZA(),i.TgZ(12,"span"),i._uU(13),i.ALo(14,"translate"),i.qZA(),i.YNc(15,je,3,3,"a",67),i.TgZ(16,"a",68),i.NdJ("click",function(t){const r=i.CHM(e).$implicit;return i.oxw(4).setDefaultMerchant(t,null==r?null:r.SadadId),t.stopPropagation()}),i.ALo(17,"translate"),i.YNc(18,Je,1,0,"img",69),i.YNc(19,Be,1,0,"img",70),i.qZA(),i.qZA(),i.qZA(),i.qZA(),i.BQk()}if(2&e){const e=t.$implicit,r=i.oxw(4);i.xp6(4),i.Q6J("src",i.lcZ(5,12,e.profilepic),i.LSH),i.xp6(3),i.Q6J("ngIf",!(null!=e&&e.parentmerchantId)),i.xp6(1),i.Q6J("ngIf",i.DdM(18,We).includes(null==e?null:e.userbusinessstatusId)),i.xp6(3),i.Oqu(null==e?null:e.name),i.xp6(2),i.AsE("",i.lcZ(14,14,"SADAD ID")," : ",null==e?null:e.SadadId,""),i.xp6(2),i.Q6J("ngIf",!(null!=e&&e.parentmerchantId)),i.xp6(1),i.s9C("ngbTooltip",i.lcZ(17,16,"Set as Default")),i.Q6J("ngClass",i.VKq(19,Ge,!(null!=e&&e.parentmerchantId)))("placement","ar"==r.currLang?"right":"left"),i.xp6(2),i.Q6J("ngIf",!(null!=e&&e.submerchantDefault)),i.xp6(1),i.Q6J("ngIf",null==e?null:e.submerchantDefault)}}function Ke(e,t){if(1&e&&(i.TgZ(0,"li",59),i.YNc(1,Qe,20,21,"ng-container",60),i.qZA()),2&e){const e=i.oxw(3);i.xp6(1),i.Q6J("ngForOf",e.merchants)}}function ze(e,t){if(1&e&&(i.ynx(0),i.TgZ(1,"li",46),i.TgZ(2,"div",47),i._uU(3),i.ALo(4,"translate"),i.qZA(),i.TgZ(5,"div",48),i.TgZ(6,"div",49),i.TgZ(7,"div",50),i._UZ(8,"img",51),i.ALo(9,"secure"),i.qZA(),i.TgZ(10,"div",52),i.TgZ(11,"h6"),i._uU(12),i.qZA(),i.TgZ(13,"span"),i._uU(14),i.ALo(15,"translate"),i.qZA(),i.qZA(),i.qZA(),i.TgZ(16,"div",53),i.TgZ(17,"a",54),i._UZ(18,"img",55),i.qZA(),i.qZA(),i.qZA(),i.qZA(),i.YNc(19,Ve,4,3,"li",56),i.YNc(20,Ke,2,1,"li",57),i.BQk()),2&e){const e=i.oxw(2);i.xp6(3),i.hij(" ",i.lcZ(4,7,"Default")," "),i.xp6(5),i.Q6J("src",i.lcZ(9,9,e.defaultMerchant.profilepic),i.LSH),i.xp6(4),i.Oqu(null==e.defaultMerchant?null:e.defaultMerchant.name),i.xp6(2),i.AsE("",i.lcZ(15,11,"SADAD ID")," : ",null==e.defaultMerchant?null:e.defaultMerchant.SadadId,""),i.xp6(5),i.Q6J("ngIf",e.merchants&&e.allowManageMerchants),i.xp6(1),i.Q6J("ngIf",e.merchants&&e.allowManageMerchants)}}function Xe(e,t){1&e&&(i.TgZ(0,"li"),i._uU(1),i.ALo(2,"translate"),i.qZA()),2&e&&(i.xp6(1),i.hij(" ",i.lcZ(2,1,"NO_REC_FOUND")," "))}function et(e,t){if(1&e&&i.YNc(0,Xe,3,3,"li",15),2&e){const e=i.oxw(2);i.Q6J("ngIf",0==e.merchants.length)}}function tt(e,t){if(1&e&&(i.TgZ(0,"li",41),i.TgZ(1,"a",26),i._UZ(2,"img",42),i.qZA(),i.TgZ(3,"ul",43),i.YNc(4,ze,21,13,"ng-container",44),i.YNc(5,et,1,1,"ng-template",null,45,i.W1O),i.qZA(),i.qZA()),2&e){const e=i.MAs(6),t=i.oxw();i.xp6(4),i.Q6J("ngIf",t.defaultMerchant)("ngIfElse",e)}}const rt=function(e){return{"live-terminal-main":e}},nt=function(){return["/merchantpanel/pos-terminal-maps"]};function it(e,t){if(1&e&&(i.TgZ(0,"li",77),i.TgZ(1,"div",78),i._UZ(2,"img",79),i.qZA(),i.TgZ(3,"p",80),i._uU(4),i.ALo(5,"translate"),i.qZA(),i.TgZ(6,"a",81),i._UZ(7,"img",82),i.qZA(),i.qZA()),2&e){const e=i.oxw();i.Q6J("ngClass",i.VKq(5,rt,!e.allowTransfer&&e.showServiceTypeSelection)),i.xp6(4),i.Oqu(i.lcZ(5,3,"LIVE_TERMINAL")),i.xp6(2),i.Q6J("routerLink",i.DdM(7,nt))}}function at(e,t){1&e&&i._UZ(0,"img",83)}function st(e,t){1&e&&i._UZ(0,"img",84)}function ot(e,t){1&e&&(i.TgZ(0,"li",85),i._UZ(1,"app-notification"),i.qZA())}let lt=(()=>{class e{constructor(e,t,r,n,i,a,s,o,l,c,d,u,p){this.layout=e,this.modalService=t,this.navServices=r,this._router=n,this._paymentServiceTypeServices=i,this._authService=a,this._header=s,this.permissionService=o,this.translate=l,this._commonHelperService=c,this._merchantManagementService=d,this.spinnerSadad=u,this.document=p,this.pinNumber="123456",this.maskedPinNumber="",this.dark="dark-only"==this.layout.config.settings.layout_version,this.isProdEnv=g.N.production,this.isLocalEnv=g.N.local,this.projectType=[{value:"online-payment",label:"Online Payment",code:"ONLINE_PAYMENT"},{value:"pos",label:"POS",code:"POS"}],this.disable=!1,this.hidePinNumber=!0,this.pTypeCode="ONLINE_PAYMENT",this.pType="Online Payment",this.serviceType="online-payment",this._distroyed$=new _.x,this.showServiceTypeSelection=!1,this.showTerminalMaps=!1,this.allowNotifi=!1,this.showRtl=!1,this.parentMerchant={},this.allowManageMerchants=!1,this.currLang="ar",this.isMobHead=!1,this.selectedLang=this.translate.getDefaultLang(),this.getTranslate(),this.translate.onLangChange.subscribe(e=>{this.getTranslate(),this.currLang=e.lang}),this.currLang=this.translate.getDefaultLang()}ngOnInit(){this._paymentServiceTypeServices.paymentService.subscribe(e=>{this.serviceType=e,this.pTypeCode="online-payment"==this.serviceType?"ONLINE_PAYMENT":"POS",this.getTranslate()}),this.elem=document.documentElement,"pos"===this._paymentServiceTypeServices.serviceType&&(this.pType="POS",this.pTypeCode="POS",this.getTranslate()),"online-payment"===this._paymentServiceTypeServices.serviceType&&(this.pType="Online Payment",this.pTypeCode="ONLINE_PAYMENT",this.getTranslate()),this._authService.getBalance(),this.getPinNumber(),this.getMerchantHeaderDetails(),this.showServiceTypeSelection=this.permissionService.hasRoutePermission("service_type_change"),this.showTerminalMaps=this.permissionService.hasRoutePermission("pos-terminal-maps"),this.allowNotifi=this.permissionService.hasFuncPermission("header","NOTIFICATIONS"),this.allowManageMerchants=this.permissionService.hasFuncPermission("header","MANAGE_MERCHANTS");let e=this.translate.getDefaultLang(),t=localStorage.getItem("selectedLang");["en","ar"].includes(t)||localStorage.setItem("selectedLang",e),localStorage.getItem("selectedLang")?e=localStorage.getItem("selectedLang"):(localStorage.setItem("selectedLang",e),e=this.translate.getDefaultLang()),this.translate.setDefaultLang(e),this.setLangSettings("ar"==e?"en":"ar"),this.allowManageMerchants&&this.get
1SubMerchants(),this.userInfo=this._authService?.currentUserValue,this.initLastLoginDateDetails()}ngAfterViewInit(){window.location.href.includes("/auth/login")||this._authService.vpnEventEmitter.emit("vpnInitEvent")}handleScroll(){const e=window.pageYOffset;this.isMobHead=e>=this.elementPosition}getLastLogin(){let e=this.resolveUserLastLoginDateVal(this._authService?.currentUserValue);e&&(this.lastLoggedIn=e)}getTranslate(){this.translate.get(["ONLINE_PAYMENT","POS"]).subscribe(e=>{this.language_text=e;let t=[{value:"online-payment",label:"Online Payment",code:"ONLINE_PAYMENT"},{value:"pos",label:"POS",code:"POS"}];t[0].label=e[t[0].code],t[1].label=e[t[1].code],this.projectType=t,this.pType=e[this.pTypeCode]})}getPinNumber(){this._header.getPartnerPinNumber().pipe((0,f.R)(this._distroyed$)).subscribe({next:e=>{e?.error||(this.pinNumber=e?.[0]?.servicepin),!this.maskedPinNumber&&this.pinNumber&&Array(this.pinNumber?.length||0).fill(0).map((e,t)=>this.maskedPinNumber+="\u2022")},error:e=>{}})}getMerchantHeaderDetails(){const e=this._header.getMerchantHeaderDetails();this.sadadMerchantId=e.sadadMerchantId,this.sadadMainMerchantId=e.sadadMainMerchantId,this.merchantName=e.merchantName,this.roleId=e.roleId}sidebarToggle(){this.navServices.collapseSidebar=!this.navServices.collapseSidebar,this.navServices.megaMenu=!1,this.navServices.levelMenu=!1}togglePasswordOne(e){this.hidePinNumber=!this.hidePinNumber}changeServiceType(e){this._router.navigate(17==this._authService?.currentUserValue?.roleId&&"pos"==e?.value?["/merchantpanel/pos-settings"]:["dashboard",`${e.value}-default`],{queryParams:{highMenu:"1"}}),this._paymentServiceTypeServices.changeServiceType(e.value)}changeLang(){this.setLangSettings(this.selectedLang),this.translate.use(this.selectedLang),localStorage.setItem("selectedLang",this.selectedLang)}setLangSettings(e){"en"==e?(this.selectedLang="ar",this.layout.changeLayoutType("rtl")):(this.selectedLang="en",this.layout.changeLayoutType("ltr"))}openTransferOTP(e){this.modalService.open(e,{centered:!0,size:"md"})}signOut(){this._authService.logout().pipe((0,f.R)(this._distroyed$)).subscribe(e=>{})}getSubMerchants(){var e,t=this;this.defaultMerchant=null,this.subMerchants=[],this.merchants=[],this._merchantManagementService.getSubMerchantsListing().pipe((0,f.R)(this._distroyed$)).subscribe({next:e=>{e?.error?this._commonHelperService.disTransErrMsg(e?.error?.message):e?.length&&(this.merchants=e,e.map((e,t)=>{e.profilepic=e?.profilepic?`${this._authService.updSNAEnvURL("v5")}containers/api-businesslogo/download/${e.profilepic}`:"assets/images/placeholder/sadad_rounded_logo.png",e.userbusinessstatusId=e.userbusinesses&&e.userbusinesses.length?e.userbusinesses[0]?.userbusinessstatusId:2}
1),this.merchants.forEach(e=>{e?.submerchantDefault&&(this.defaultMerchant=e)}),this.defaultMerchant||this.merchants.forEach(e=>{e?.parentmerchantId||2==e?.linkmerchantverificationstatusId||(this.defaultMerchant=e)}),this.merchants=this.merchants.filter(e=>2!=e?.linkmerchantverificationstatusId))},error:(e=(0,u.Z)(function*(e){t._commonHelperService.disTransErrMsg(e?.error?.error?.message||e?.error?.message)}),function(t){return e.apply(this,arguments)})})}switchToMerchant(e,t){var r=this;return(0,u.Z)(function*(){var e;r.spinnerSadad.show("headerspinner"),r._merchantManagementService.switchToChildMerchant(t).pipe((0,f.R)(r._distroyed$)).subscribe({next:e=>{e?.error?(r.spinnerSadad.hide("headerspinner"),r._commonHelperService.disTransErrMsg(e?.error?.message)):(console.log(e),e?.userInfo&&e?.id&&(e.userInfo.token=e?.id,r.getProfile(e.userInfo)))},error:(e=(0,u.Z)(function*(e){r.spinnerSadad.hide("headerspinner"),r._commonHelperService.disTransErrMsg(e?.error?.error?.message||e?.error?.message)}),function(t){return e.apply(this,arguments)})})})()}getProfile(e){var t=this;return(0,u.Z)(function*(){var r;t.spinnerSadad.show("headerspinner"),t._authService.getUserProfile().pipe((0,f.R)(t._distroyed$)).subscribe({next:r=>{r?.error?(t.spinnerSadad.hide("headerspinner"),t._commonHelperService.disTransErrMsg(r?.error?.message)):(r?.clientConfig&&(e.clientConfig=r?.clientConfig),e&&(t._authService.changeCurrentUser(e),t.spinnerSadad.hide("headerspinner")))},error:(r=(0,u.Z)(function*(e){t.spinnerSadad.hide("headerspinner"),t._commonHelperService.disTransErrMsg(e?.error?.error?.message||e?.error?.message)}),function(e){return r.apply(this,arguments)})})})()}isAllowToSwitchMerchants(){return!!this?.userInfo?.isSwitchChild||!!this?.userInfo?.isallowedtoaddsubmerchant||!!this._authService?.loginUserValue?.isSubmerchantEnabled}setDefaultMerchant(e,t){var r,n=this;this.spinnerSadad.show("headerspinner"),this._merchantManagementService.setMerchantAsDefault({SadadId:t,submerchantDefault:1}).pipe((0,f.R)(this._distroyed$)).subscribe({next:e=>{e?.error?(this.spinnerSadad.hide("headerspinner"),this._commonHelperService.disTransErrMsg(e?.error?.message)):(this.spinnerSadad.hide("headerspinner"),this._commonHelperService.disTransSuccMsg("Merchant has been set as default."),this.getSubMerchants())},error:(r=(0,u.Z)(function*(e){n.spinnerSadad.hide("headerspinner"),n._commonHelperService.disTransErrMsg(e?.error?.error?.message||e?.error?.message)}),function(e){return r.apply(this,arguments)})})}resolveUserLastLoginDateVal(e){return e?.modified||e?.previouslogindatetime||""}initLastLoginDateDetails(){this.lastLoggedIn=this.resolveUserLastLoginDateVal(this._authService?.currentUserValue),this.getLastLogin(),this._authService?.currentUser?.pipe((0,f.R)(this._distroyed$)).subscribe(e=>{let t=this.resolveUserLastLoginDateVal(e);t&&(this.lastLoggedIn=t)})}ngOnDestroy(){this._distroyed$.next(null),this._distroyed$.complete()}}return e.\u0275fac=function(t){return new(t||e)(i.Y36(I.P),i.Y36(m.FF),i.Y36(ue.t),i.Y36(a.F0),i.Y36(y.Yx),i.Y36(y.$h),i.Y36(y.r6),i.Y36(T.$),i.Y36(o.sK),i.Y36(y.$P),i.Y36(y.X5),i.Y36(w.t2),i.Y36(A.K0))},e.\u0275cmp=i.Xpm({type:e,selectors:[["app-header"]],viewQuery:function(e,t){if(1&e&&i.Gf(Re,5),2&e){let e;i.iGM(e=i.CRH())&&(t.mobHeaderEle=e.first)}},hostBindings:function(e,t){1&e&&i.NdJ("scroll",function(e){return t.handleScroll(e)},!1,i.Jf7)},decls:77,vars:47,consts:[["bdColor","rgba(0, 0, 0, 0.8)","size","medium","color","#fff","type","ball-circus","name","headerspinner",3,"fullScreen"],[1,"page-header","n-main-header"],[1,"header-wrapper","subuser-header-wrap","row","m-0"],[1,"hmerchant-name-wrapper","w-100"],[1,"d-flex","align-items-center","justify-content-between","w-100"],[1,"headermerchat_name"],[1,"header_last_login"],[1,"mb-0"],["dir","ltr"],[1,"header-logo-wrapper"],[1,"toggle-sidebar",3,"click"],[1,"status_toggle","middle",3,"icon"],[1,"left-header","col","horizontal-wrapper","pl-0","desk-view-left-header"],[1,"marchant_details"],[1,"d-flex","align-items-center"],[4,"ngIf"],[1,"hiddenicon",3,"click"],[3,"hidden"],["data-feather","eye"],["data-feather","eye-off"],["class","pos-selection col-2",4,"ngIf"],[1,"nav-right","n-nav-menu","col-5","pull-right","right-header","p-0","header-menu"],[1,"nav-menus"],["class","nav-menu-items profile-nav onhover-dropdown merchant-switch mr-5",4,"ngIf"],["class","nav-menu-items",3,"ngClass",4,"ngIf"],[1,"nav-menu-items",3,"click"],["href","javascript:void(0)",1,"text-dark"],["class","img-fluid","src","assets/images/pos-panel/header/ar-language.svg","alt","",4,"ngIf"],["class","img-fluid","src","assets/images/pos-panel/header/en-language.svg","alt","",4,"ngIf"],["class","nav-menu-items onhover-dropdown d-none d-sm-block d-md-block",4,"ngIf"],[1,"profile-nav","onhover-dropdown","p-0","nav-menu-items","cursor-pointer","d-mobile-none"],[1,"nav-menu-items","ml-5","mr-0","signout-wrapper"],["href","javascript:void(0)","tooltipClass","mycustom-tooltip",1,"text-dark",3,"ngbTooltip","placement","click"],["src","assets/images/pos-panel/header/logout.svg","alt","",1,"img-fluid"],[1,"mob-view-left-header"],["mobHeaderMenu",""],[1,"left-header","col","horizontal-wrapper","pl-0"],[1,"pos-selection","col-2"],[1,"header-dropdown"],[1,"c-filter-dropdown","n-h-custom-dropdown"],[1,"js-example-placeholder-multiple",3,"items","searchable","placeholder","clearable","ngModel","ngModelChange","change"],[1,"nav-menu-items","profile-nav","onhover-dropdown","merchant-switch","mr-5"],["src","assets/images/pos-panel/header/merchant-transfer.svg","alt","",1,"img-fluid"],[1,"merchant-profile","onhover-show-div","d-block"],[4,"ngIf","ngIfElse"],["mmelseBlock",""],[1,"merchant-main"],[1,"def-merchant-title"],[1,"d-flex","align-items-center","justify-content-between","login-merchant"],[1,"d-flex","align-center","w-100"],[1,"merchant-avatar","mr-2"],["default","assets/images/placeholder/sadad_rounded_logo.png",1,"merchant-profile-pic",3,"src"],[1,"merchant-details"],[1,"merchant-favourite"],["href","#"],["src","assets/images/pos-panel/merchant-favourite.svg"],["class","another-ac-title",4,"ngIf"],["class","merchant-list-box",4,"ngIf"],[1,"another-ac-title"],[1,"merchant-list-box"],[4,"ngFor","ngForOf"],[1,"d-flex","align-items-center","justify-content-between","merchant-inner-list",3,"click"],[1,"merchant-avatar","mr-2","position-relative"],[1,"merchant-status"],["src","assets/images/pos-panel/primary-status.svg",4,"ngIf"],["src","assets/images/pos-panel/red-status.svg",4,"ngIf"],[1,"merchant-list-details","position-relative"],["href","javascript:void(0)","class","merchant-list-favourite",3,"ngClass",4,"ngIf"],["href","javascript:void(0)","tooltipClass","mycustom-tooltip",1,"merchant-list-favourite",3,"ngbTooltip","ngClass","placement","click"],["src","assets/images/pos-panel/outline-star.svg",4,"ngIf"],["src","assets/images/pos-panel/filled-star.svg",4,"ngIf"],["src","assets/images/pos-panel/primary-status.svg"],["src","assets/images/pos-panel/red-status.svg"],["href","javascript:void(0)",1,"merchant-list-favourite",3,"ngClass"],[1,"merchant-primary-text","mb-0","merchant-primary-text"],["src","assets/images/pos-panel/outline-star.svg"],["src","assets/images/pos-panel/filled-star.svg"],[1,"nav-menu-items",3,"ngClass"],[1,"live-trml-anmtr"],["src","assets/images/pos-panel/live-trmnl.gif"],[1,"live-trmnl"],[1,"text-dark",3,"routerLink"],["tooltipClass","my-custom-class","src","assets/images/pos-panel/header/map-icon.png","alt","",1,"img-fluid"],["src","assets/images/pos-panel/header/ar-language.svg","alt","",1,"img-fluid"],["src","assets/images/pos-panel/header/en-language.svg","alt","",1,"img-fluid"],[1,"nav-menu-items","onhover-dropdown","d-none","d-sm-block","d-md-block"]],template:function(e,t){1&e&&(i.TgZ(0,"ngx-spinner",0),i._UZ(1,"app-sadad-loader"),i.qZA(),i.TgZ(2,"div",1),i.TgZ(3,"div",2),i.TgZ(4,"div",3),i.TgZ(5,"div",4),i.TgZ(6,"div",5),i.TgZ(7,"h6"),i._uU(8),i.qZA(),i.qZA(),i.TgZ(9,"div",6),i.TgZ(10,"p",7),i._uU(11),i.ALo(12,"translate"),i.TgZ(13,"span",8),i._uU(14),i.ALo(15,"formatDate"),i.qZA(),i.qZA(),i.qZA(),i.qZA(),i.qZA(),i.TgZ(16,"div",9),i.TgZ(17,"div",10),i.NdJ("
1click",function(){return t.sidebarToggle()}),i._UZ(18,"app-feather-icons",11),i.qZA(),i.qZA(),i.TgZ(19,"div",12),i.TgZ(20,"div",13),i.TgZ(21,"div",14),i.TgZ(22,"div"),i.TgZ(23,"p",7),i._uU(24),i.ALo(25,"translate"),i.YNc(26,Ze,2,1,"span",15),i.YNc(27,ke,2,1,"span",15),i.qZA(),i.TgZ(28,"p",7),i._uU(29),i.ALo(30,"translate"),i.TgZ(31,"span",16),i.NdJ("click",function(e){return t.togglePasswordOne(e)}),i.TgZ(32,"span",17),i._uU(33),i._UZ(34,"i",18),i.qZA(),i.TgZ(35,"span",17),i._uU(36),i._UZ(37,"i",19),i.qZA(),i.qZA(),i.qZA(),i.qZA(),i.qZA(),i.qZA(),i.qZA(),i.YNc(38,qe,5,7,"div",20),i.TgZ(39,"div",21),i.TgZ(40,"ul",22),i.YNc(41,tt,7,2,"li",23),i.YNc(42,it,8,8,"li",24),i.TgZ(43,"li",25),i.NdJ("click",function(){return t.changeLang()}),i.TgZ(44,"a",26),i.YNc(45,at,1,0,"img",27),i.YNc(46,st,1,0,"img",28),i.qZA(),i.qZA(),i.YNc(47,ot,2,0,"li",29),i.TgZ(48,"li",30),i._UZ(49,"app-my-account"),i.qZA(),i.TgZ(50,"li",31),i.TgZ(51,"a",32),i.NdJ("click",function(){return t.signOut()}),i.ALo(52,"translate"),i._UZ(53,"img",33),i.qZA(),i.qZA(),i.qZA(),i.qZA(),i.qZA(),i.TgZ(54,"div",34,35),i.TgZ(56,"div",36),i.TgZ(57,"div",13),i.TgZ(58,"h6"),i._uU(59),i.qZA(),i.TgZ(60,"div",14),i.TgZ(61,"div"),i.TgZ(62,"p",7),i._uU(63),i.ALo(64,"translate"),i.TgZ(65,"span"),i._uU(66),i.qZA(),i.qZA(),i.TgZ(67,"p",7),i._uU(68),i.ALo(69,"translate"),i.TgZ(70,"span",16),i.NdJ("click",function(e){return t.togglePasswordOne(e)}),i.TgZ(71,"span",17),i._uU(72),i._UZ(73,"i",18),i.qZA(),i.TgZ(74,"span",17),i._uU(75),i._UZ(76,"i",19),i.qZA(),i.qZA(),i.qZA(),i.qZA(),i.qZA(),i.qZA(),i.qZA(),i.qZA(),i.qZA()),2&e&&(i.Q6J("fullScreen",!0),i.xp6(2),i.ekj("close_icon",t.navServices.collapseSidebar),i.xp6(6),i.Oqu(t.merchantName),i.xp6(3),i.hij("",i.lcZ(12,33,"Last Login Date"),": "),i.xp6(3),i.Oqu(i.lcZ(15,35,t.lastLoggedIn)),i.xp6(4),i.Q6J("icon","align-center"),i.xp6(6),i.hij(" ",i.lcZ(25,37,"SADAD_MER_ID"),": "),i.xp6(2),i.Q6J("ngIf",1==t.roleId),i.xp6(1),i.Q6J("ngIf",1!=t.roleId),i.xp6(2),i.hij(" ",i.lcZ(30,39,"SPRT_PIN_NUM"),": "),i.xp6(3),i.Q6J("hidden",t.hidePinNumber),i.xp6(1),i.hij("",t.pinNumber," "),i.xp6(2),i.Q6J("hidden",!t.hidePinNumber),i.xp6(1),i.hij("",t.maskedPinNumber," "),i.xp6(2),i.Q6J("ngIf",t.showServiceTypeSelection),i.xp6(3),i.Q6J("ngIf",t.isAllowToSwitchMerchants()&&(null==t.merchants?null:t.merchants.length)>1),i.xp6(1),i.Q6J("ngIf","pos"==t.serviceType&&t.showTerminalMaps),i.xp6(3),i.Q6J("ngIf","en"==t.selectedLang),i.xp6(1),i.Q6J("ngIf","ar"==t.selectedLang),i.xp6(1),i.Q6J("ngIf",t.allowNotifi),i.xp6(4),i.s9C("ngbTooltip",i.lcZ(52,41,"Signout")),i.Q6J("placement","top auto"),i.xp6(3),i.ekj("mob-header",t.isMobHead),i.xp6(5),i.Oqu(t.merchantName),i.xp6(4),i.hij(" ",i.lcZ(64,43,"SADAD_MER_ID"),": "),i.xp6(3),i.hij("",t.sadadMerchantId," "),i.xp6(2),i.hij(" ",i.lcZ(69,45,"SPRT_PIN_NUM"),": "),i.xp6(3),i.Q6J("hidden",t.hidePinNumber),i.xp6(1),i.hij("",t.pinNumber," "),i.xp6(2),i.Q6J("hidden",!t.hidePinNumber),i.xp6(1),i.hij("",t.maskedPinNumber," "))},directives:[w.Ro,E.T,pe.A,A.O5,he,m._L,ge.w9,p.JJ,p.On,Z.mh,me.M,A.sg,A.mk,a.yS,De],pipes:[o.X$,Se.r2,Se.EO],styles:[".mob-header[_ngcontent-%COMP%]{position:fixed;top:0;overflow:hidden;z-index:10;display:none}.headermerchat_name[_ngcontent-%COMP%]   h6[_ngcontent-%COMP%]{color:#324c6a;font-size:20px;line-height:30px;font-weight:700;margin-bottom:0}.header_last_login[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:#324c6a;font-size:11px;line-height:30px;font-weight:400}.marchant_details[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:#324c6a;font-weight:500;font-size:18px;letter-spacing:normal}.marchant_details[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{color:#96273b;font-weight:400}.marchant_details[_ngcontent-%COMP%]   .header-hidden-btn[_ngcontent-%COMP%]{background:#7e0e45;border-radius:22px;padding:8px 15px;color:#fff;margin-right:10px;font-size:12px}.login-merchant[_ngcontent-%COMP%]{margin-bottom:15px;padding-bottom:15px;border-bottom:1px solid hsla(0,0%,44%,.24)}.login-merchant[_ngcontent-%COMP%]   .merchant-avatar[_ngcontent-%COMP%]{height:36px;width:36px;position:relative;display:block;background-color:#fff;border-radius:50%}
1.login-merchant[_ngcontent-%COMP%]   .merchant-avatar[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{border-radius:50%;height:100%;width:100%;position:absolute;left:0;top:0}.login-merchant[_ngcontent-%COMP%]   .merchant-details[_ngcontent-%COMP%]   h6[_ngcontent-%COMP%]{color:#121212;font-size:15px;font-weight:700;margin-bottom:0;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:200px}.login-merchant[_ngcontent-%COMP%]   .merchant-details[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{margin-bottom:0;color:#7e0e45;font-weight:600;line-height:19px;font-size:12px;letter-spacing:.17px}.login-merchant[_ngcontent-%COMP%]   .merchant-favourite[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{display:inline!important}.another-ac-title[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:#000!important;margin-bottom:0;padding-bottom:22px;font-size:12px!important;font-weight:500!important;line-height:14px}.merchant-list-box[_ngcontent-%COMP%]{height:450px;overflow:auto}.merchant-list-box[_ngcontent-%COMP%]   .merchant-inner-list[_ngcontent-%COMP%]{border:1px solid #e0dbda;border-radius:12px;padding:7px 13px;margin-bottom:7px;cursor:pointer}.merchant-list-box[_ngcontent-%COMP%]   .merchant-inner-list[_ngcontent-%COMP%]   .merchant-list-details[_ngcontent-%COMP%]{width:100%}.merchant-list-box[_ngcontent-%COMP%]   .merchant-inner-list[_ngcontent-%COMP%]   .merchant-list-details[_ngcontent-%COMP%]   h6[_ngcontent-%COMP%]{margin-bottom:0;color:#000;font-weight:600;line-height:17px;font-size:14px}.merchant-list-box[_ngcontent-%COMP%]   .merchant-inner-list[_ngcontent-%COMP%]   .merchant-list-details[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{color:#000;font-size:12px;font-weight:600;line-height:15px;margin-bottom:0;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;width:calc(100% - 10px);opacity:.5}.merchant-list-box[_ngcontent-%COMP%]   .merchant-inner-list[_ngcontent-%COMP%]   .merchant-list-details[_ngcontent-%COMP%]   .merchant-list-favourite[_ngcontent-%COMP%]{position:absolute;right:0;display:inline-block;height:auto;width:auto;line-height:20px}.merchant-list-box[_ngcontent-%COMP%]   .merchant-inner-list[_ngcontent-%COMP%]   .merchant-list-details[_ngcontent-%COMP%]   .merchant-list-favourite[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{height:100%;width:140%}.merchant-list-box[_ngcontent-%COMP%]   .merchant-inner-list[_ngcontent-%COMP%]   .merchant-list-details[_ngcontent-%COMP%]   .merchant-list-favourite[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:#000!important;font-size:10px!important;font-weight:400;letter-spacing:.14px;line-height:22px}.merchant-status[_ngcontent-%COMP%]{position:absolute;bottom:-2px;right:2px}.def-merchant-title[_ngcontent-%COMP%]{color:#7e0e45;font-weight:700;margin-bottom:10px}.merchant-switch[_ngcontent-%COMP%]:hover{box-shadow:0 3px 6px rgba(126,0,0,.5);border-radius:50%}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#7e0e45;border:3px solid transparent;background-clip:content-box;border-radius:17px}[_ngcontent-%COMP%]::-webkit-scrollbar{background:transparent;width:13px!important;height:13px!important}.header-menu[_ngcontent-%COMP%]   .nav-menu-items[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:#324c6a;height:40px;width:40px;display:flex;justify-content:center;border-radius:50px;text-align:center;align-items:center}.header-menu[_ngcontent-%COMP%]   .status[_ngcontent-%COMP%]{background-color:#e06f85;height:12px;width:12px;top:1px;right:0;border:0;border-radius:50%;position:absolute;z-index:1}.header-menu[_ngcontent-%COMP%]   .nav-menus[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{padding:0;margin-right:10px}.pos-selection[_ngcontent-%COMP%]{position:absolute;left:50%;transform:translate(-50%,23%)}@media screen and (max-width:991px){.pos-selection[_ngcontent-%COMP%]{transform:translate(-50%)}}.pos-selection[_ngcontent-%COMP%]   .header-dropdown[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{position:absolute;top:50%;right:60px;z-index:111;transform:translateY(-50%)}.pos-selection[_ngcontent-%COMP%]   .header-dropdown[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{font-size:24px}.pos-selection[_ngcontent-%COMP%]   .header-dropdown[_ngcontent-%COMP%]   select[_ngcontent-%COMP%]::-ms-expand{display:none}.pos-selection[_ngcontent-%COMP%]   .header-dropdown[_ngcontent-%COMP%]   .custom-select[_ngcontent-%COMP%]{width:calc(100% - 60px);outline:0;box-shadow:0 3px 6px #00000029;border:1px solid #66788f6b;border-radius:27px;height:40px;color:#324c6a;font-size:13px;margin:0;font-weight:700;padding:.375rem 25px .375rem 20px;background:#fff!important;-moz-appearance:none;-webkit-appearance:none;appearance:none}.live-trmnl[_ngcontent-%COMP%], .my-custom-class[_ngcontent-%COMP%]{white-space:nowrap}.live-trmnl[_ngcontent-%COMP%]{color:#cd0d52;font-size:11px;text-align:center;font-weight:700;position:absolute;top:-20px;left:-26px}.header-transfer[_ngcontent-%COMP%]   .transfer-btn[_ngcontent-%COMP%]{font-size:14px;background-color:#7e0e45!important;color:#fff;font-weight:400;border-radius:50px;padding:7px 15px;display:inline-block;border-color:rgba(115,102,255,.1)!important}.header-transfer[_ngcontent-%COMP%]   .transfer-btn[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{margin-right:10px}.header-transfer[_ngcontent-%COMP%]   .transfer-btn[_ngcontent-%COMP%]:hover{background-color:#b43070!important;transition:.6s;color:#fff!important}.header-transfer[_ngcontent-%COMP%]   .transfer-btn[_ngcontent-%COMP%]:active{background:#b43070!important;background:linear-gradient(90deg,#b43070,#e863a3 28%,#e863a3 66%,#b43070)!important;color:#fff!important}.t-available-balance[_ngcontent-%COMP%]   h5[_ngcontent-%COMP%]{font-size:18px;color:#324c6a;font-weight:600}.transaction-wrapper[_ngcontent-%COMP%]   .create-u-input[_ngcontent-%COMP%]{height:48px!important}.otptransfer-form[_ngcontent-%COMP%]   h6[_ngcontent-%COMP%]{font-size:16px;color:#7e0e45}.otptransfer-form[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-size:14px}.otptransfer-form[_ngcontent-%COMP%]   .form-group[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.otptransfer-form[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{border-radius:6px;padding:7px;height:43px;text-align:center;margin:5px;box-shadow:none;outline:0}.otptransfer-form[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]:focus{box-shadow:none;outline:0;border-color:#ced4da}.otptransfer-form[_ngcontent-%COMP%]   .otp-transaction-input[_ngcontent-%COMP%]{width:75%;margin:0 auto}.otptransfer-form[_ngcontent-%COMP%]   h5[_ngcontent-%COMP%]{color:#7e0e45;font-size:14px}.d-mobile-none[_ngcontent-%COMP%]{display:block}@media screen and (max-width:576px){.header-wrapper.subuser-header-wrap[_ngcontent-%COMP%]{height:66px!important}.hmerchant-name-wrapper[_ngcontent-%COMP%]{display:none}.d-mobile-none[_ngcontent-%COMP%]{display:none!important}}@media screen and (max-width:375px){.pos-selection[_ngcontent-%COMP%]{left:-5%!important}}.merchant-profile-pic[_ngcontent-%COMP%]{width:36px;height:36px;border-radius:50%}.merchant-profile-pic[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{height:100%;width:100%;border-radius:50%;-o-object-fit:inherit;object-fit:inherit}.merchant-primary-text[_ngcontent-%COMP%]{margin-left:-75px}.primary-merchant-text[_ngcontent-%COMP%]{right:10px!important}@media screen and (min-width:280px) and (max-width:320px){.pos-selection[_ngcontent-%COMP%]{left:-21%!important}.pos-selection[_ngcontent-%COMP%]   .c-filter-dropdown[_ngcontent-%COMP%]{width:90px}}",".my-custom-class[_ngcontent-%COMP%]{white-space:nowrap}"]}),e})();var ct=r(25160),dt=r(58858);function ut(e,t){if(1&e&&(i.TgZ(0,"div"),i.TgZ(1,"h6",32),i._uU(2),i.ALo(3,"translate"),i.qZA(),i.TgZ(4,"p",33),i._uU(5),i.ALo(6,"translate"),i.qZA(),i.qZA()),2&e){const e=i.oxw().$implicit;i.xp6(2),i.Oqu(i.lcZ(3,2,e.headTitle1)),i.xp6(3),i.Oqu(i.lcZ(6,4,e.headTitle2))}}function pt(e,t){if(1&e&&(i.TgZ(0,"label"),i._uU(1),i.qZA()),2&e){const e=i.oxw().$implicit;i.Gre("badge badge-",e.badgeType,""),i.xp6(1),i.Oqu(e.badgeValue)}}function ht(e,t){1&e&&i._UZ(0,"img",53)}function gt(e,t){1&e&&i._UZ(0,"img",54)}function mt(e,t){1&e&&i._UZ(0,"img",55)}function ft(e,t){1&e&&i._UZ(0,"img",56)}
1function vt(e,t){1&e&&i._UZ(0,"img",57)}function _t(e,t){1&e&&i._UZ(0,"img",58)}function St(e,t){1&e&&i._UZ(0,"img",59)}function bt(e,t){1&e&&i._UZ(0,"img",60)}function yt(e,t){1&e&&i._UZ(0,"img",61)}function wt(e,t){1&e&&i._UZ(0,"img",62)}function It(e,t){1&e&&i._UZ(0,"img",63)}function Tt(e,t){1&e&&i._UZ(0,"img",63)}function Et(e,t){1&e&&i._UZ(0,"img",64)}function At(e,t){1&e&&i._UZ(0,"img",65)}function $t(e,t){1&e&&i._UZ(0,"img",66)}function Ct(e,t){1&e&&i._UZ(0,"img",67)}function Pt(e,t){1&e&&i._UZ(0,"img",68)}function xt(e,t){1&e&&i._UZ(0,"img",69)}function Nt(e,t){if(1&e&&i._UZ(0,"i"),2&e){const e=i.oxw(2).$implicit;i.Gre("fa fa-angle-",e.active?"down":"right"," pull-right")}}const Ot=function(e){return{active:e}};function Ut(e,t){if(1&e){const e=i.EpF();i.TgZ(0,"a",34),i.NdJ("click",function(){i.CHM(e);const t=i.oxw().$implicit;return i.oxw().toggletNavActive(t)}),i.YNc(1,ht,1,0,"img",35),i.YNc(2,gt,1,0,"img",36),i.YNc(3,mt,1,0,"img",37),i.YNc(4,ft,1,0,"img",38),i.YNc(5,vt,1,0,"img",39),i.YNc(6,_t,1,0,"img",40),i.YNc(7,St,1,0,"img",41),i.YNc(8,bt,1,0,"img",42),i.YNc(9,yt,1,0,"img",43),i.YNc(10,wt,1,0,"img",44),i.YNc(11,It,1,0,"img",45),i.YNc(12,Tt,1,0,"img",45),i.YNc(13,Et,1,0,"img",46),i.YNc(14,At,1,0,"img",47),i.YNc(15,$t,1,0,"img",48),i.YNc(16,Ct,1,0,"img",49),i.YNc(17,Pt,1,0,"img",50),i.YNc(18,xt,1,0,"img",51),i.TgZ(19,"span"),i._uU(20),i.ALo(21,"translate"),i.qZA(),i.TgZ(22,"div",52),i.YNc(23,Nt,1,3,"i",26),i.qZA(),i.qZA()}if(2&e){const e=i.oxw().$implicit,t=i.oxw();i.ekj("link-nav",!e.children),i.Q6J("ngClass",i.VKq(25,Ot,e.active)),i.xp6(1),i.Q6J("ngIf","Transactions"==e.title),i.xp6(1),i.Q6J("ngIf","Settlement"==e.title),i.xp6(1),i.Q6J("ngIf","Balance Statement"==e.title),i.xp6(1),i.Q6J("ngIf","Invoices"==e.title),i.xp6(1),i.Q6J("ngIf","Sadad Services"==e.title),i.xp6(1),i.Q6J("ngIf","Basicstore"==e.title),i.xp6(1),i.Q6J("ngIf","Subscriptions"==e.title),i.xp6(1),i.Q6J("ngIf","Terminals"==e.title),i.xp6(1),i.Q6J("ngIf","Devices"==e.title),i.xp6(1),i.Q6J("ngIf","Reports"==e.title),i.xp6(1),i.Q6J("ngIf","Payment Gateway"==e.title),i.xp6(1),i.Q6J("ngIf","Settings"==e.title),i.xp6(1),i.Q6J("ngIf","SadadVas"==e.title),i.xp6(1),i.Q6J("ngIf","Manage Users"==e.title),i.xp6(1),i.Q6J("ngIf","Manage Merchants"==e.title&&(null==t.userInfo?null:t.userInfo.isallowedtoaddsubmerchant)),i.xp6(1),i.Q6J("ngIf","Batch Summary"==e.title),i.xp6(1),i.Q6J("ngIf","My Account"==e.title),i.xp6(1),i.Q6J("ngIf","Shipping"==e.title),i.xp6(2),i.Oqu(i.lcZ(21,23,e.title)),i.xp6(3),i.Q6J("ngIf",e.children)}}function Lt(e,t){if(1&e){const e=i.EpF();i.TgZ(0,"div",93),i.NdJ("click",function(t){i.CHM(e);const r=i.oxw(2).$implicit;return i.oxw().newBadgeClick(t,r)}),i._uU(1),i.ALo(2,"translate"),i.qZA()}2&e&&(i.xp6(1),i.Oqu(i.lcZ(2,1,"NEW")))}function Mt(e,t){if(1&e&&(i.TgZ(0,"span",94),i._uU(1),i.qZA()),2&e){i.oxw();const e=i.MAs(27),t=i.oxw(2);i.Q6J("ngbTooltip",e)("placement","ar"==t.currLang?"left":"right"),i.xp6(1),i.Oqu(t.pendOrdrCount)}}function Dt(e,t){if(1&e&&(i.TgZ(0,"div",95),i._uU(1),i.ALo(2,"translate"),i.qZA(),i.TgZ(3,"div",96),i._uU(4),i.ALo(5,"translate"),i.qZA()),2&e){const e=i.oxw(3);i.xp6(1),i.AsE("",e.pendOrdrCount," ",i.lcZ(2,3,"ORDER_PENDING"),""),i.xp6(3),i.Oqu(i.lcZ(5,5,"ORDERS_REQUIRE_ACTION"))}}function Rt(e,t){if(1&e&&i._UZ(0,"i"),2&e){const e=i.oxw(2).$implicit;i.Gre("fa fa-angle-",e.active?"down":"right"," pull-right")}}const Zt=function(e){return[e]},kt=function(e,t){return{active:e,"div-disabled":t}},qt=function(e){return{"d-none":e}},Vt=function(e){return{"shipping-menu":e}};function Ft(e,t){if(1&e){const e=i.EpF();i.TgZ(0,"a",70),i.NdJ("click",function(t){i.CHM(e);const r=i.oxw().$implicit;return i.oxw().menuChange(t,r)}),i.TgZ(1,"img",71),i.NdJ("load",function(){return i.CHM(e),i.oxw(2).onImageLoaded("homeIL")}),i.qZA(),i.TgZ(2,"img",72),i.NdJ("load",function(){return i.CHM(e),i.oxw(2).onImageLoaded("traxIL")}),i.qZA(),i.TgZ(3,"img",73),i.NdJ("load",function(){return i.CHM(e),i.oxw(2).onImageLoaded("settIL")}),i.qZA(),i.TgZ(4,"img",74),i.NdJ("load",function(){return i.CHM(e),i.oxw(2).onImageLoaded("balStaIL")}),i.qZA(),i.TgZ(5,"img",75),i.NdJ("load",function(){return i.CHM(e),i.oxw(2).onImageLoaded("invIL")}),i.qZA(),i.TgZ(6,"img",76),i.NdJ("load",function(){return i.CHM(e),i.oxw(2).onImageLoaded("sdSerIL")}),i.qZA(),i.TgZ(7,"img",77),i.NdJ("load",function(){return i.CHM(e),i.oxw(2).onImageLoaded("bsIL")}),i.qZA(),i.TgZ(8,"img",78),i.NdJ("load",function(){return i.CHM(e),i.oxw(2).onImageLoaded("subIL")}),i.qZA(),i.TgZ(9,"img",79),i.NdJ("load",function(){return i.CHM(e),i.oxw(2).onImageLoaded("mawIL")}),i.qZA(),i.TgZ(10,"img",80),i.NdJ("load",function(){return i.CHM(e),i.oxw(2).onImageLoaded("terIL")}),i.qZA(),i.TgZ(11,"img",81),i.NdJ("load",function(){return i.CHM(e),i.oxw(2).onImageLoaded("devIL")}),i.qZA(),i.TgZ(12,"img",82),i.NdJ("load",function(){return i.CHM(e),i.oxw(2).onImageLoaded("repIL")}),i.qZA(),i.TgZ(13,"img",83),i.NdJ("load",function(){return i.CHM(e),i.oxw(2).onImageLoaded("pgIL")}),i.qZA(),i.TgZ(14,"img",83),i.NdJ("load",function(){return i.CHM(e),i.oxw(2).onImageLoaded("settiIL")}),i.qZA(),i.TgZ(15,"img",84),i.NdJ("load",function(){return i.CHM(e),i.oxw(2).onImageLoaded("svgsIL")}),i.qZA(),i.TgZ(16,"img",85),i.NdJ("load",function(){return i.CHM(e),i.oxw(2).onImageLoaded("manUsrIL")}),i.qZA(),i.TgZ(17,"img",86),i.NdJ("load",function(){return i.CHM(e),i.oxw(2).onImageLoaded("manMerIL")}),i.qZA(),i.TgZ(18,"img",87),i.NdJ("load",function(){return i.CHM(e),i.oxw(2).onImageLoaded("batSmryIL")}),i.qZA(),i.TgZ(19,"img",88),i.NdJ("load",function(){return i.CHM(e),i.oxw(2).onImageLoaded("myacIL")}),i.qZA(),i.TgZ(20,"img",89),i.NdJ("load",function(){return i.CHM(e),i.oxw(2).onImageLoaded("shipIL")}),i.qZA(),i.YNc(21,Lt,3,3,"div",90),i.TgZ(22,"span",24),i._uU(23),i.ALo(24,"translate"),i.YNc(25,Mt,2,3,"span",91),i.qZA(),i.YNc(26,Dt,6,7,"ng-template",null,92,i.W1O),i.TgZ(28,"div",52),i.YNc(29,Rt,1,3,"i",26),i.qZA(),i.qZA()}if(2&e){const e=i.oxw().$implicit,t=i.oxw();i.ekj("link-nav",!e.children),i.Q6J("routerLink",e.type?i.VKq(52,Zt,e.path):null)("queryParams",t.getMenuQueryParams(e))("ngClass",i.WLB(54,kt,e.active,t.isShippingMenuDisabled(e))),i.xp6(1),i.Q6J("ngClass",i.VKq(57,qt,"Home"!=e.title))("src",t.homeIL?t.homeSvg:t.loadSvg,i.LSH),i.xp6(1),i.Q6J("ngClass",i.VKq(59,qt,"Transactions"!=e.title))("src",t.traxIL?t.traxSvg:t.loadSvg,i.LSH),i.xp6(1),i.Q6J("ngClass",i.VKq(61,qt,"Settlement"!=e.title))("src",t.settIL?t.settSvg:t.loadSvg,i.LSH),i.xp6(1),i.Q6J("ngClass",i.VKq(63,qt,"Balance Statement"!=e.title))("src",t.settIL?t.balStatSvg:t.loadSvg,i.LSH),i.xp6(1),i.Q6J("ngClass",i.VKq(65,qt,"Invoices"!=e.title))("src",t.invIL?t.invSvg:t.loadSvg,i.LSH),i.xp6(1),i.Q6J("ngClass",i.VKq(67,qt,"Sadad Services"!=e.title))("src",t.sdSerIL?t.sdSerSvg:t.loadSvg,i.LSH),i.xp6(1),i.Q6J("ngClass",i.VKq(69,qt,"Basicstore"!=e.title))("src",t.bsIL?t.bsSvg:t.loadSvg,i.LSH),i.xp6(1),i.Q6J("ngClass",i.VKq(71,qt,"Subscriptions"!=e.title))("src",t.subIL?t.subSvg:t.loadSvg,i.LSH),i.xp6(1),i.Q6J("ngClass",i.VKq(73,qt,"Mawaid"!=e.title))("src",t.mawIL?t.mawSvg:t.loadSvg,i.LSH),i.xp6(1),i.Q6J("ngClass",i.VKq(75,qt,"Terminals"!=e.title))("src",t.terIL?t.terSvg:t.loadSvg,i.LSH),i.xp6(1),i.Q6J("ngClass",i.VKq(77,qt,"Devices"!=e.title))("src",t.devIL?t.devSvg:t.loadSvg,i.LSH),i.xp6(1),i.Q6J("ngClass",i.VKq(79,qt,"Reports"!=e.title))("src",t.repIL?t.repSvg:t.loadSvg,i.LSH),i.xp6(1),i.Q6J("ngClass",i.VKq(81,qt,"Payment Gateway"!=e.title))("src",t.pgIL?t.pgSvg:t.loadSvg,i.LSH),i.xp6(1),i.Q6J("ngClass",i.VKq(83,qt,"Settings"!=e.title))("src",t.settiIL?t.settiSvg:t.loadSvg,i.LSH),i.xp6(1),i.Q6J("ngClass",i.VKq(85,qt,"SadadVas"!=e.title))("src",t.svgsIL?t.svasSvg:t.loadSvg,i.LSH),i.xp6(1),i.Q6J("ngClass",i.VKq(87,qt,"Manage Users"!=e.title))("src",t.manUsrIL?t.manUsrSvg:t.loadSvg,i.LSH),i.xp6(1),i.Q6J("ngClass",i.VKq(89,qt,"Manage Merchants"!=e.title))("src",t.manMerIL?t.manMerSvg:t.loadSvg,i.LSH),i.xp6(1),i.Q6J("ngClass",i.VKq(91,qt,"Batch Summary"!=e.title))("src",t.batSmr
1yIL?t.batSmrySvg:t.loadSvg,i.LSH),i.xp6(1),i.Q6J("ngClass",i.VKq(93,qt,"My Account"!=e.title))("src",t.myacIL?t.myAccSvg:t.loadSvg,i.LSH),i.xp6(1),i.Q6J("ngClass",i.VKq(95,qt,"Shipping"!=e.title))("src",t.shipIL?t.shipSvg:t.loadSvg,i.LSH),i.xp6(1),i.Q6J("ngIf",t.isNewBadgeVisible(e)),i.xp6(1),i.Q6J("ngClass",i.VKq(97,Vt,"Shipping"===e.title)),i.xp6(1),i.hij("",i.lcZ(24,50,e.title)," "),i.xp6(2),i.Q6J("ngIf","Shipping"===e.title&&t.pendOrdrCount&&t.adminShippingAllowed),i.xp6(4),i.Q6J("ngIf",e.children)}}function Yt(e,t){if(1&e&&i._UZ(0,"i"),2&e){const e=i.oxw(2).$implicit;i.Gre("fa fa-angle-",e.active?"down":"right"," pull-right")}}function Ht(e,t){if(1&e&&(i.TgZ(0,"a",97),i._UZ(1,"app-feather-icons",12),i.TgZ(2,"span"),i._uU(3),i.ALo(4,"translate"),i.qZA(),i.TgZ(5,"div",52),i.YNc(6,Yt,1,3,"i",26),i.qZA(),i.qZA()),2&e){const e=i.oxw().$implicit;i.ekj("link-nav",!e.children),i.s9C("href",e.type?e.path:null,i.LSH),i.Q6J("ngClass",i.VKq(9,Ot,e.active)),i.xp6(1),i.Q6J("icon",e.icon),i.xp6(2),i.Oqu(i.lcZ(4,7,e.title)),i.xp6(3),i.Q6J("ngIf",e.children)}}function jt(e,t){if(1&e&&i._UZ(0,"i"),2&e){const e=i.oxw(2).$implicit;i.Gre("fa fa-angle-",e.active?"down":"right"," pull-right")}}function Jt(e,t){if(1&e&&(i.TgZ(0,"a",98),i._UZ(1,"app-feather-icons",12),i.TgZ(2,"span"),i._uU(3),i.qZA(),i.TgZ(4,"div",52),i.YNc(5,jt,1,3,"i",26),i.qZA(),i.qZA()),2&e){const e=i.oxw().$implicit;i.ekj("link-nav",!e.children),i.s9C("href",e.type?e.path:null,i.LSH),i.Q6J("ngClass",i.VKq(7,Ot,e.active)),i.xp6(1),i.Q6J("icon",e.icon),i.xp6(2),i.Oqu(e.title),i.xp6(2),i.Q6J("ngIf",e.children)}}function Bt(e,t){if(1&e&&i._UZ(0,"i"),2&e){const e=i.oxw(2).$implicit;i.Gre("fa fa-angle-",e.active?"down":"right"," pull-right")}}function Wt(e,t){if(1&e){const e=i.EpF();i.TgZ(0,"a",106),i.NdJ("click",function(){i.CHM(e);const t=i.oxw().$implicit;return i.oxw(3).toggletNavActive(t)}),i.TgZ(1,"span"),i._uU(2),i.ALo(3,"translate"),i.qZA(),i.TgZ(4,"div",52),i.YNc(5,Bt,1,3,"i",26),i.qZA(),i.qZA()}if(2&e){const e=i.oxw().$implicit;i.xp6(2),i.hij(" ",i.lcZ(3,2,e.title),""),i.xp6(3),i.Q6J("ngIf",e.children)}}function Gt(e,t){1&e&&i._UZ(0,"i",109)}const Qt=function(){return{exact:!0}};function Kt(e,t){if(1&e&&(i.TgZ(0,"a",107),i.TgZ(1,"span"),i._uU(2),i.ALo(3,"translate"),i.qZA(),i.YNc(4,Gt,1,0,"i",108),i.qZA()),2&e){const e=i.oxw().$implicit;i.Q6J("routerLink",e.type?i.VKq(6,Zt,e.path):null)("routerLinkActiveOptions",i.DdM(8,Qt)),i.xp6(2),i.Oqu(i.lcZ(3,4,e.title)),i.xp6(2),i.Q6J("ngIf",e.children)}}function zt(e,t){1&e&&i._UZ(0,"i",109)}function Xt(e,t){if(1&e&&(i.TgZ(0,"a",110),i.TgZ(1,"span"),i._uU(2),i.ALo(3,"translate"),i.qZA(),i.YNc(4,zt,1,0,"i",108),i.qZA()),2&e){const e=i.oxw().$implicit;i.s9C("href",e.type?e.path:null,i.LSH),i.Q6J("routerLinkActiveOptions",i.DdM(6,Qt)),i.xp6(2),i.Oqu(i.lcZ(3,4,e.title)),i.xp6(2),i.Q6J("ngIf",e.children)}}function er(e,t){1&e&&i._UZ(0,"i",109)}function tr(e,t){if(1&e&&(i.TgZ(0,"a",111),i.TgZ(1,"span"),i._uU(2),i.ALo(3,"translate"),i.qZA(),i.YNc(4,er,1,0,"i",108),i.qZA()),2&e){const e=i.oxw().$implicit;i.s9C("href",e.type?e.path:null,i.LSH),i.xp6(2),i.Oqu(i.lcZ(3,3,e.title)),i.xp6(2),i.Q6J("ngIf",e.children)}}function rr(e,t){if(1&e&&(i.TgZ(0,"a",116),i.TgZ(1,"span"),i._uU(2),i.ALo(3,"translate"),i.qZA(),i.qZA()),2&e){const e=i.oxw().$implicit;i.Q6J("routerLink",e.type?i.VKq(5,Zt,e.path):null)("routerLinkActiveOptions",i.DdM(7,Qt)),i.xp6(2),i.hij(" ",i.lcZ(3,3,e.title),"")}}function nr(e,t){if(1&e&&(i.TgZ(0,"a",117),i.TgZ(1,"span"),i._uU(2),i.ALo(3,"translate"),i.qZA(),i.qZA()),2&e){const e=i.oxw().$implicit;i.s9C("href",e.type?e.path:null,i.LSH),i.Q6J("routerLinkActiveOptions",i.DdM(5,Qt)),i.xp6(2),i.Oqu(i.lcZ(3,3,e.title))}}function ir(e,t){if(1&e&&(i.TgZ(0,"a",118),i.TgZ(1,"span"),i._uU(2),i.ALo(3,"translate"),i.qZA(),i.qZA()),2&e){const e=i.oxw().$implicit;i.s9C("href",e.type?e.path:null,i.LSH),i.xp6(2),i.Oqu(i.lcZ(3,2,e.title))}}function ar(e,t){if(1&e&&(i.TgZ(0,"li",24),i.YNc(1,rr,4,8,"a",113),i.YNc(2,nr,4,6,"a",114),i.YNc(3,ir,4,4,"a",115),i.qZA()),2&e){const e=t.$implicit;i.Q6J("ngClass",i.VKq(4,Ot,e.active)),i.xp6(1),i.Q6J("ngIf","link"===e.type),i.xp6(1),i.Q6J("ngIf","extLink"===e.type),i.xp6(1),i.Q6J("ngIf","extTabLink"===e.type)}}const sr=function(e,t){return{"menu-open":e,"menu-close":t}};function or(e,t){if(1&e&&(i.TgZ(0,"ul",112),i.YNc(1,ar,4,6,"li",100),i.qZA()),2&e){const e=i.oxw().$implicit;i.Udp("display",e.active?"block":"none"),i.Q6J("ngClass",i.VKq(5,Ot,e.active))("ngClass",i.WLB(7,sr,e.active,!e.active)),i.xp6(1),i.Q6J("ngForOf",e.children)}}function lr(e,t){if(1&e&&(i.TgZ(0,"li",24),i.YNc(1,Wt,6,4,"a",101),i.YNc(2,Kt,5,9,"a",102),i.YNc(3,Xt,5,7,"a",103),i.YNc(4,tr,5,5,"a",104),i.YNc(5,or,2,10,"ul",105),i.qZA()),2&e){const e=t.$implicit;i.Q6J("ngClass",i.VKq(6,Ot,e.active)),i.xp6(1),i.Q6J("ngIf","sub"===e.type),i.xp6(1),i.Q6J("ngIf","link"===e.type),i.xp6(1),i.Q6J("ngIf","extLink"===e.type),i.xp6(1),i.Q6J("ngIf","extTabLink"===e.type),i.xp6(1),i.Q6J("ngIf",e.children)}}function cr(e,t){if(1&e&&(i.TgZ(0,"ul",99),i.YNc(1,lr,6,8,"li",100),i.qZA()),2&e){const e=i.oxw().$implicit;i.Udp("display",e.active?"block":"none"),i.Q6J("ngClass",i.VKq(5,Ot,e.active))("ngClass",i.WLB(7,sr,e.active,!e.active)),i.xp6(1),i.Q6J("ngForOf",e.children)}}function dr(e,t){if(1&e&&(i.TgZ(0,"li",24),i.YNc(1,ut,7,6,"div",25),i.YNc(2,pt,2,4,"label",26),i.YNc(3,Ut,24,27,"a",27),i.YNc(4,Ft,30,99,"a",28),i.YNc(5,Ht,7,11,"a",29),i.YNc(6,Jt,6,9,"a",30),i.YNc(7,cr,2,10,"ul",31),i.qZA()),2&e){const e=t.$implicit,r=i.oxw();i.Tol(e.headTitle1?"sidebar-main-title":"sidebar-list"),i.Q6J("ngClass",i.VKq(10,Ot,e.active)),i.xp6(1),i.Q6J("ngIf",e.headTitle1),i.xp6(1),i.Q6J("ngIf",e.badgeType&&e.badgeValue),i.xp6(1),i.Q6J("ngIf","sub"===e.type),i.xp6(1),i.Q6J("ngIf","link"===e.type&&(e.serviceType==r.serviceType||"common"==e.serviceType)),i.xp6(1),i.Q6J("ngIf","extLink"===e.type),i.xp6(1),i.Q6J("ngIf","extTabLink"===e.type),i.xp6(1),i.Q6J("ngIf",e.children)}}const ur=function(e){return{marginLeft:e}};let pr=(()=>{class e{constructor(e,t,r,n,i,s,o,l,c,d){this.router=e,this.navServices=t,this._paymentServiceTypeService=r,this.layout=n,this.permissionService=i,this._authenticationService=s,this._shippingService=o,this._commonHelperService=l,this._spinCtrlServ=c,this.translate=d,this.serviceType="online-payment",this.isProdEnv=g.N.production,this.margin=0,this.width=window.innerWidth,this.leftArrowNone=!0,this.rightArrowNone=!1,this.ImageLoading=!1,this.homeIL=!1,this.traxIL=!1,this.settIL=!1,this.balStaIL=!1,this.invIL=!1,this.sdSerIL=!1,this.bsIL=!1,this.subIL=!1,this.mawIL=!1,this.terIL=!1,this.devIL=!1,this.repIL=!1,this.pgIL=!1,this.settiIL=!1,this.svgsIL=!1,this.manUsrIL=!1,this.manMerIL=!1,this.batSmryIL=!1,this.myacIL=!1,this.shipIL=!1,this.manUsrSvg="assets/images/pos-panel/sidebar/manage-users.svg",this.manMerSvg="assets/images/pos-panel/sidebar/manage-merchants.svg",this.batSmrySvg="assets/images/pos-panel/sidebar/batch-summary.svg",this.myAccSvg="assets/images/pos-panel/sidebar/myaccounts.svg",this.homeSvg="assets/images/pos-panel/sidebar/home.svg",this.traxSvg="assets/images/pos-panel/sidebar/transactions.svg",this.settSvg="assets/images/pos-panel/sidebar/settlement.svg",this.balStatSvg="assets/images/pos-panel/sidebar/balance-statement.svg",this.invSvg="assets/images/pos-panel/sidebar/invoice.svg",this.sdSerSvg="assets/images/pos-panel/sidebar/sdservices.svg",this.bsSvg="assets/images/pos-panel/sidebar/basicstore.svg",this.subSvg="assets/images/pos-panel/sidebar/subscription.svg",this.mawSvg="assets/images/pos-panel/sidebar/mawaid.svg",this.terSvg="assets/images/pos-panel/sidebar/terminal.svg",this.devSvg="assets/images/pos-panel/sidebar/devices.svg",this.repSvg="assets/images/pos-panel/sidebar/reports.svg",this.pgSvg="assets/images/pos-panel/sidebar/settings.svg",this.settiSvg="assets/images/pos-panel/sidebar/settings.svg",this.svasSvg="assets/images/pos-panel/sidebar/sadadvas.svg",this.loadSvg="assets/images/pos-panel/sidebar/menu-loader-icon.svg",this.shipSvg="assets/images/pos-panel/sidebar/shipping.svg",this._distroyed$=new _.x,this.selectedLang="",this.adminShippingAllowed=!1,this.featureFlagsCount={balance_statement_click:0,shipping_click:0},this.newBadgeConfigs=[{title:"Balance Statement",flag:"balance_statement_click"},{title:"Shipping",flag:"shipping_click"}],this.isFeatureFlagsLoaded=!1,this.translate.onLangChange.subscribe(e=>{this.currLang=e.lang,this.getTranslate()}),this.navServices.items.subscribe(e=>{let t=[];
1e.forEach(e=>{let r=!0;"Manage Merchants"==e.title&&(r=this._authenticationService?.currentUserValue?.isallowedtoaddsubmerchant),r&&this.permissionService.hasMenuPermission(e.title)&&t.push(e)}),this.menuItems=e,this.menuItems=t,this.router.events.subscribe(t=>{t instanceof a.m2&&e.filter(e=>{if(t.url=t.url.replace("?highMenu=1",""),e.path===t.url&&this.setNavActive(e),!e.children)return!1;e.children.filter(e=>{if(e.path===t.url&&this.setNavActive(e),!e.children)return!1;e.children.filter(e=>{e.path===t.url&&this.setNavActive(e)})})})})}),this.orderCountsSubscription=this._shippingService.orderCounts$.subscribe(e=>{this.pendOrdrCount=e?.pendingCount||0,this.totalOrdrCount=e?.totalCount||0}),this.getFeatureFlags(["balance_statement_click","shipping_click"])}getTranslate(){this.selectedLang=this.translate?.currentLang||this.translate?.defaultLang}ngOnInit(){this._paymentServiceTypeService.paymentService.subscribe(e=>{this.serviceType=e,"online-payment"==this.serviceType&&this.loadShippingPendingOrderCount()}),this.userInfo=this._authenticationService.currentUserValue,this.refreshAdminShippingAllowed()}refreshAdminShippingAllowed(){const e=this.adminShippingAllowed;if(this.adminShippingAllowed=(0,ct.wt)(this._authenticationService.currentUserValue?.
1is_shipping_enabled),!this.adminShippingAllowed)return this.pendOrdrCount=0,void(this.totalOrdrCount=0);e||"online-payment"!=this.serviceType||this.loadShippingPendingOrderCount()}isShippingMenuDisabled(e){return"Shipping"===e?.title&&!this.adminShippingAllowed}ngAfterViewInit(){setTimeout(()=>{const e=document.querySelector(".sidebar-list .active img:not(.d-none)");this.safeUpdateActiveSidebarIconVal(e)},100)}onResize(e){this.width=e.target.innerWidth-500}onImageLoaded(e,t){this[e]=!0}sidebarToggle(){this.navServices.collapseSidebar=!this.navServices.collapseSidebar,this._authenticationService.sideBarEventEmiter.emit(this.navServices.collapseSidebar)}setNavActive(e){this.menuItems.filter(t=>{t!==e&&(t.active=!1),t.children&&t.children.includes(e)&&(t.active=!0),t.children&&t.children.filter(r=>{r.children&&r.children.includes(e)&&(t.active=!0,r.active=!0)})})}toggletNavActive(e){e.active||this.menuItems.forEach(t=>{if(this.menuItems.includes(e)&&(t.active=!1),!t.children)return!1;t.children.forEach(r=>{t.children.includes(e)&&(r.active=!1)})}),e.active=!e.active,this.handleFeatureFlagClick(e)}scrollToLeft(){this.margin>=-this.width?(this.margin=0,this.leftArrowNone=!0,this.rightArrowNone=!1):(this.margin+=this.width,this.rightArrowNone=!1)}scrollToRight(){this.margin<=-3051?(this.margin=-3464,this.leftArrowNone=!1,this.rightArrowNone=!0):(this.margin+=-this.width,this.leftArrowNone=!1)}safeUpdateActiveSidebarIconVal(e){if(e?.src&&e?.alt){const t=e?.alt;e.src.includes(`${t}-active`)||(e.src=e.src.replace(t,`${t}-active`))}}safeResetInactiveSidebarIconsVal(e){e?.forEach(e=>{e?.src&&e?.alt&&(e.src=e.src.replace(`${e?.alt}-active`,e?.alt))})}menuChange(e,t){let r=document.querySelectorAll("a.sidebar-item img");this.safeResetInactiveSidebarIconsVal(r);let n=e?.currentTarget?.querySelector("img:not(.d-none)");if(n?.src&&n?.alt){let e=n?.alt;n.src=n.src.replace(e,e+"-active")}t&&this.handleFeatureFlagClick(t)}loadShippingPendingOrderCount(){var e,t=this;this.adminShippingAllowed&&(this._spinCtrlServ.showSpinner(),this._shippingService.getShippingPendingOrderCount().pipe((0,f.R)(this._distroyed$)).subscribe({next:e=>{e?.error?this._commonHelperService.disTransErrMsg(e?.error?.message):this._shippingService.updateOrderCounts({pendingCount:e?.data?.pending_ready_for_pickup_count,totalCount:e?.data?.total_order_count}),this._spinCtrlServ.hideSpinner()},error:(e=(0,u.Z)(function*(e){t._spinCtrlServ.hideSpinner()}),function(t){return e.apply(this,arguments)})}))}getMenuQueryParams(e){return"Shipping"===e?.title&&this.totalOrdrCount?{tab:"orders"}:null}getFeatureFlagKey(e){return this.newBadgeConfigs.find(t=>t?.title===e)?.flag||null}shouldShowNewBadge(e){if(!e)return!1;const t=this.getFeatureFlagKey(e?.title);if(!t)return!1;const r=this.featureFlagsCount?.[t];return void 0!==r&&r<=4}handleFeatureFlagClick(e){if(e&&this.shouldShowNewBadge(e)){const t=this.getFeatureFlagKey(e?.title);t&&this.postFeatureFlag(t)}}getFeatureFlags(e){this._authenticationService.getFeatureFlag(e).pipe((0,f.R)(this._distroyed$)).subscribe({next:e=>{this.handleFeatureFlagsResponse(e)},error:e=>{}})}postFeatureFlag(e){this._authenticationService.postFeatureFlag(e).pipe((0,f.R)(this._distroyed$)).subscribe({next:t=>{console.log("postFeatureFlag success response:",t),this.getFeatureFlags([e])},error:e=>{console.error("postFeatureFlag error response:",e)}})}newBadgeClick(e,t){e.stopPropagation(),e.preventDefault();const r=this.getFeatureFlagKey(t?.title);r&&(console.log("newBadgeClick triggered for flag:",r),this.postFeatureFlag(r))}handleFeatureFlagsResponse(e){e&&(this.featureFlagsCount={balance_statement_click:void 0!==e?.balance_statement_click?e?.balance_statement_click:this.featureFlagsCount?.balance_statement_click,shipping_click:void 0!==e?.shipping_click?e?.shipping_click:this.featureFlagsCount?.shipping_click},this.isFeatureFlagsLoaded=!0)}isNewBadgeVisible(e){return!!e&&this.isFeatureFlagsLoaded&&this.shouldShowNewBadge(e)}ngOnDestroy(){this.orderCountsSubscription&&this.orderCountsSubscription.unsubscribe(),this._distroyed$.next(null),this._distroyed$.complete()}}return e.\u0275fac=function(t){return new(t||e)(i.Y36(a.F0),i.Y36(ue.t),i.Y36(dt.Y),i.Y36(I.P),i.Y36(T.$),i.Y36(y.$h),i.Y36(y.Nk),i.Y36(y.$P),i.Y36(y.br),i.Y36(o.sK))},e.\u0275cmp=i.Xpm({type:e,selectors:[["app-sidebar"]],hostBindings:function(e,t){1&e&&i.NdJ("resize",function(e){return t.onResize(e)},!1,i.Jf7)},decls:29,vars:10,consts:[[1,"logo-wrapper","text-center"],["routerLink","/",1,"sidebar-logo"],["src","assets/images/logo/sadad-login-logo.svg","alt","",1,"img-fluid","for-light"],[1,"back-btn",3,"click"],[1,"fa","fa-angle-left"],[1,"toggle-sidebar"],[1,"open-side-btn",3,"click"],[1,"icon-angle-left"],[1,"logo-icon-wrapper","text-center"],["href","javascript:void(0)",1,"sidebar-logo-close"],[1,"sidebar-main"],["
1id","left-arrow",1,"left-arrow",3,"click"],[3,"icon"],["id","sidebar-menu",3,"ngStyle"],[1,"sidebar-links","custom-scrollbar"],[1,"back-btn"],["href","javascript:void(0)"],["src","assets/images/logo/logo-icon.png","alt","",1,"img-fluid"],[1,"mobile-back","text-right",3,"click"],["aria-hidden","true",1,"fa","fa-angle-right","pl-2"],[3,"class","ngClass",4,"ngFor","ngForOf"],["id","right-arrow",1,"right-arrow",3,"click"],[1,"close-toggle-sidebar"],[1,"close-side-btn",3,"click"],[3,"ngClass"],[4,"ngIf"],[3,"class",4,"ngIf"],["href","javascript:void(0)","class","sidebar-link sidebar-title",3,"link-nav","ngClass","click",4,"ngIf"],["routerLinkActive","active","class","sidebar-link sidebar-title sidebar-item",3,"routerLink","queryParams","link-nav","ngClass","click",4,"ngIf"],["class","sidebar-link sidebar-title",3,"href","link-nav","ngClass",4,"ngIf"],["target","_blank","class","sidebar-link sidebar-title",3,"href","link-nav","ngClass",4,"ngIf"],["class","sidebar-submenu",3,"ngClass","display",4,"ngIf"],[1,"lan-1"],[1,"lan-2"],["href","javascript:void(0)",1,"sidebar-link","sidebar-title",3,"ngClass","click"],["src","assets/images/pos-panel/sidebar/transactions.svg","alt","",4,"ngIf"],["src","assets/images/pos-panel/sidebar/settlement.svg","alt","",4,"ngIf"],["src","assets/images/pos-panel/sidebar/balance-statement.svg","alt","",4,"ngIf"],["src","assets/images/pos-panel/sidebar/invoice.svg","alt","",4,"ngIf"],["src","assets/images/pos-panel/sidebar/sdservices.svg","alt","",4,"ngIf"],["src","assets/images/pos-panel/sidebar/basicstore.svg","alt","",4,"ngIf"],["src","assets/images/pos-panel/sidebar/subscription.svg","alt","",4,"ngIf"],["src","assets/images/pos-panel/sidebar/terminal.svg","alt","",4,"ngIf"],["src","assets/images/pos-panel/sidebar/devices.svg","alt","",4,"ngIf"],["src","assets/images/pos-panel/sidebar/reports.svg","alt","",4,"ngIf"],["src","assets/images/pos-panel/sidebar/settings.svg","alt","",4,"ngIf"],["src","assets/images/pos-panel/sidebar/sadadvas.svg","alt","",4,"ngIf"],["src","assets/images/pos-panel/sidebar/manage-users.svg","alt","",4,"ngIf"],["src","assets/images/pos-panel/sidebar/manage-merchants.svg","alt","",4,"ngIf"],["src","assets/images/pos-panel/sidebar/batch-summary.svg","alt","",4,"ngIf"],["src","assets/images/pos-panel/sidebar/myaccounts.svg","alt","",4,"ngIf"],["src","assets/images/pos-panel/sidebar/shipping.svg","alt","",4,"ngIf"],[1,"according-menu"],["src","assets/images/pos-panel/sidebar/transactions.svg","alt",""],["src","assets/images/pos-panel/sidebar/settlement.svg","alt",""],["src","assets/images/pos-panel/sidebar/balance-statement.svg","alt",""],["src","assets/images/pos-panel/sidebar/invoice.svg","alt",""],["src","assets/images/pos-panel/sidebar/sdservices.svg","alt",""],["src","assets/images/pos-panel/sidebar/basicstore.svg","alt",""],["src","assets/images/pos-panel/sidebar/subscription.svg","alt",""],["src","assets/images/pos-panel/sidebar/terminal.svg","alt",""],["src","assets/images/pos-panel/sidebar/devices.svg","alt",""],["src","assets/images/pos-panel/sidebar/reports.svg","alt",""],["src","assets/images/pos-panel/sidebar/settings.svg","alt",""],["src","assets/images/pos-panel/sidebar/sadadvas.svg","alt",""],["src","assets/images/pos-panel/sidebar/manage-users.svg","alt",""],["src","assets/images/pos-panel/sidebar/manage-merchants.svg","alt",""],["src","assets/images/pos-panel/sidebar/batch-summary.svg","alt",""],["src","assets/images/pos-panel/sidebar/myaccounts.svg","alt",""],["src","assets/images/pos-panel/sidebar/shipping.svg","alt",""],["routerLinkActive","active",1,"sidebar-link","sidebar-title","sidebar-item",3,"routerLink","queryParams","ngClass","click"],["src","assets/images/pos-panel/sidebar/menu-loader-icon.svg","alt","home",3,"ngClass","src","load"],["src","assets/images/pos-panel/sidebar/menu-loader-icon.svg","alt","transactions",3,"ngClass","src","load"],["src","assets/images/pos-panel/sidebar/menu-loader-icon.svg","alt","settlement",3,"ngClass","src","load"],["src","assets/images/pos-panel/sidebar/menu-loader-icon.svg","alt","balance-statement",3,"ngClass","src","load"],["src","assets/images/pos-panel/sidebar/menu-loader-icon.svg","alt","invoice",3,"ngClass","src","load"],["src","assets/images/pos-panel/sidebar/menu-loader-icon.svg","alt","sdservices",3,"ngClass","src","load"],["src","assets/images/pos-panel/sidebar/menu-loader-icon.svg","alt","basicstore",3,"ngClass","src","load"],["src","assets/images/pos-panel/sidebar/menu-loader-icon.svg","alt","subscription",3,"ngClass","src","load"],["src","assets/images/pos-panel/sidebar/menu-loader-icon.svg","alt","mawaid",3,"ngClass","src","load"],["src","assets/images/pos-panel/sidebar/menu-loader-icon.svg","alt","terminal",3,"ngClass","src","load"],["src","assets/images/pos-panel/sidebar/menu-loader-icon.svg","alt","devices",3,"ngClass","src","load"],["src","assets/images/pos-panel/sidebar/menu-loader-icon.svg","alt","reports",3,"ngClass","src","load"],["src","assets/images/pos-panel/sidebar/menu-loader-icon.svg","alt","settings",3,"ngClass","src","load"],["src","assets/images/pos-panel/sidebar/menu-loader-icon.svg","alt","sadadvas",3,"ngClass","src","load"],["src","assets/images/pos-panel/sidebar/menu-loader-icon.svg","alt","manage-users",3,"ngClass","src","load"],["src","assets/images/pos-panel/sidebar/menu-loader-icon.svg","alt","manage-merchants",3,"ngClass","src","load"],["src","assets/images/pos-panel/sidebar/menu-loader-icon.svg","alt","batch-summary",3,"ngClass","src","load"],["src","assets/images/pos-panel/sidebar/menu-loader-icon.svg","alt","myaccounts",3,"ngClass","src","load"],["src","assets/images/pos-panel/sidebar/menu-loader-icon.svg","alt","shipping",3,"ngClass","src","load"],["class","new-badge badge badge-primary",3,"click",4,"ngIf"],["class","shipping-pending-count","tooltipClass","mycustom-tooltip","container","body",3,"ngbTooltip","placement",4,"ngIf"],["shippingTooltip",""],[1,"new-badge","badge","badge-primary",3,"click"],["tooltipClass","mycustom-tooltip","container","body",1,"shipping-pending-count",3,"ngbTooltip","placement"],[1,"tooltip-title"],[1,"tooltip-desc"],[1,"sidebar-link","sidebar-title",3,"href","ngClass"],["target","_blank",1,"sidebar-link","sidebar-title",3,"href","ngClass"],[1,"sidebar-submenu",3,"ngClass"],[3,"ngClass",4,"ngFor","ngForOf"],["class","submenu-title","href","javascript:void(0)",3,"click",4,"ngIf"],["class","submenu-title","routerLinkActive","active",3,"routerLink","routerLinkActiveOptions",4,"ngIf"],["class","submenu-title","routerLinkActive","active",3,"href","routerLinkActiveOptions",4,"ngIf"],["class","submenu-title","target","_blank",3,"href",4,"ngIf"],["class","nav-sub-childmenu submenu-content",3,"ngClass","display",4,"ngIf"],["href","javascript:void(0)",1,"submenu-title",3,"click"],["routerLinkActive","active",1,"submenu-title",3,"routerLink","routerLinkActiveOptions"],["class","fa fa-angle-down pull-right",4,"ngIf"],[1,"fa","fa-angle-down","pull-right"],["routerLinkActive","active",1,"submenu-title",3,"href","routerLinkActiveOptions"],["target","_blank",1,"submenu-title",3,"href"],[1,"nav-sub-childmenu","submenu-content",3,"ngClass"],["routerLinkActive","active",3,"routerLink","routerLinkActiveOptions",4,"ngIf"],["routerLinkActive","active",3,"href","routerLinkActiveOptions",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],["routerLinkActive","active",3,"routerLink","routerLinkActiveOptions"],["routerLinkActive","active",3,"href","routerLinkActiveOptions"],["target","_blank",3,"href"]],template:function(e,t){1&e&&(i.TgZ(0,"div",0),i.TgZ(1,"a",1),i._UZ(2,"img",2),i.qZA(),i.TgZ(3,"div",3),i.NdJ("
1click",function(){return t.sidebarToggle()}),i._UZ(4,"i",4),i.qZA(),i.TgZ(5,"div",5),i.TgZ(6,"a",6),i.NdJ("click",function(){return t.sidebarToggle()}),i._UZ(7,"i",7),i.qZA(),i.qZA(),i.qZA(),i.TgZ(8,"div",8),i.TgZ(9,"a",9),i._UZ(10,"img",2),i.qZA(),i.qZA(),i.TgZ(11,"nav",10),i.TgZ(12,"div",11),i.NdJ("click",function(){return t.scrollToLeft()}),i._UZ(13,"app-feather-icons",12),i.qZA(),i.TgZ(14,"div",13),i.TgZ(15,"ul",14),i.TgZ(16,"li",15),i.TgZ(17,"a",16),i._UZ(18,"img",17),i.qZA(),i.TgZ(19,"div",18),i.NdJ("click",function(){return t.sidebarToggle()}),i.TgZ(20,"span"),i._uU(21,"Back"),i.qZA(),i._UZ(22,"i",19),i.qZA(),i.qZA(),i.YNc(23,dr,8,12,"li",20),i.qZA(),i.qZA(),i.TgZ(24,"div",21),i.NdJ("click",function(){return t.scrollToRight()}),i._UZ(25,"app-feather-icons",12),i.qZA(),i.TgZ(26,"div",22),i.TgZ(27,"a",23),i.NdJ("click",function(){return t.sidebarToggle()}),i._UZ(28,"i",7),i.qZA(),i.qZA(),i.qZA()),2&e&&(i.xp6(12),i.ekj("d-none",t.leftArrowNone),i.xp6(1),i.Q6J("icon","arrow-left"),i.xp6(1),i.Q6J("ngStyle",i.VKq(8,ur,t.margin+"px")),i.xp6(9),i.Q6J("ngForOf",t.menuItems),i.xp6(1),i.ekj("d-none",t.rightArrowNone),i.xp6(1),i.Q6J("icon","arrow-right"))},directives:[a.yS,pe.A,A.PC,A.sg,A.mk,A.O5,a.Od,m._L],pipes:[o.X$],styles:[".sidebar-logo{height:92px;width:92px;border:3px solid #fff;border-radius:50%;display:flex;justify-content:center;align-items:center;margin:0 auto}.sidebar-logo img{height:50px}.sidebar-logo-close{height:62px;width:62px;border:3px solid #fff;border-radius:50%;display:flex;justify-content:center;align-items:center;margin:0 auto}.sidebar-logo-close img{height:30px}.open-side-btn{height:120px;width:20px;background:transparent linear-gradient(180deg,#fff,#d9dfeb) 0 0;border-radius:32px 0 0 32px;color:#600337;display:flex;justify-content:center;align-items:center;top:50%;transform:translateY(-50%);position:relative}.open-side-btn:hover{color:#600337}.close-side-btn{background-color:#7e0e45;height:120px;width:20px;border-radius:0 32px 32px 0;color:#600337;display:none;justify-content:center;align-items:center;top:50%;transform:translateY(-50%);position:relative}.close-side-btn i{color:#fff;transform:rotate(180deg)}.page-wrapper.compact-wrapper .page-body-wrapper div.sidebar-wrapper.close_icon .close-side-btn{display:flex}.sidebar-list .active span{font-weight:600}.shipping-menu{display:inline-flex;align-items:center;grid-gap:8px;gap:8px}.shipping-pending-count{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;padding:0 6px;border-radius:50px;background-color:#ffc828;color:#8e1b3e;font-family:Open Sans,sans-serif;font-size:11px;font-weight:700;line-height:1;flex-shrink:0;cursor:default;direction:ltr;unicode-bidi:-webkit-isolate;unicode-bidi:-moz-isolate;unicode-bidi:isolate}.tooltip-title{font-weight:600}.tooltip-desc,.tooltip-title{font-family:Open Sans,sans-serif;font-style:normal;font-size:12px;line-height:18px;letter-spacing:-.01em;color:#324c6a}.tooltip-desc{font-weight:400}.new-badge.badge.badge-primary{background-color:#fff!important;color:#7e0e45;top:50%!important;right:-40px!important;left:auto;transform:translateY(-50%)}.page-wrapper.compact-wrapper .page-body-wrapper div.sidebar-wrapper.close_icon:hover .badge.new-badge{opacity:0;display:none}html[dir=rtl] .page-wrapper.compact-wrapper .page-body-wrapper .sidebar-wrapper .sidebar-main .sidebar-links>li .badge.new-badge{right:auto!important;left:0!important}"],encapsulation:2}),e})(),hr=(()=>{class e{constructor(e,t,r){this.route=e,this.navServices=t,this.layout=r,this.route.queryParams.subscribe(e=>{this.layout.config.settings.layout=e.layout?e.layout:this.layout.config.settings.layout})}ngAfterViewInit(){setTimeout(()=>{le.replace()})}getRouterOutletState(e){return e.isActivated?e.activatedRoute:""}get layoutClass(){switch(this.layout.config.settings.layout){case"Dubai":return"compact-wrapper";case"London":return"only-body";case"Seoul":return"compact-wrapper modern-type";case"LosAngeles":return this.navServices.horizontal?"horizontal-wrapper material-type":"compact-wrapper material-type";case"Paris":return"compact-wrapper dark-sidebar";case"Tokyo":return"compact-sidebar";case"Madrid":return"compact-wrapper color-sidebar";case"Moscow":return"compact-sidebar compact-small";
1case"NewYork":return"compact-wrapper box-layout";case"Singapore":return this.navServices.horizontal?"horizontal-wrapper enterprice-type":"compact-wrapper enterprice-type";case"Rome":return"compact-sidebar compact-small material-icon";case"Barcelona":return this.navServices.horizontal?"horizontal-wrapper enterprice-type advance-layout":"compact-wrapper enterprice-type advance-layout"}}ngOnInit(){}}return e.\u0275fac=function(t){return new(t||e)(i.Y36(a.gz),i.Y36(ue.t),i.Y36(I.P))},e.\u0275cmp=i.Xpm({type:e,selectors:[["app-content"]],decls:11,vars:8,consts:[[3,"ngClass"],["id","canvas-bookmark",1,"page-wrapper",3,"ngClass"],[1,"normal-res-view"],[1,"page-body-wrapper"],[1,"sidebar-wrapper"],[1,"page-body","p-0"],["o","outlet"],[1,"bg-overlay1"]],template:function(e,t){if(1&e&&(i.TgZ(0,"div",0),i.TgZ(1,"div",1),i._UZ(2,"app-header",2),i.TgZ(3,"div",3),i.TgZ(4,"div",4),i._UZ(5,"app-sidebar"),i.qZA(),i.TgZ(6,"div",5),i.TgZ(7,"main"),i._UZ(8,"router-outlet",null,6),i.qZA(),i.qZA(),i.qZA(),i.qZA(),i.qZA(),i._UZ(10,"div",7)),2&e){const e=i.MAs(9);i.Tol(t.layout.config.settings.layout_version),i.Q6J("ngClass",t.layout.config.settings.layout_type),i.xp6(1),i.Q6J("ngClass",t.layoutClass),i.xp6(3),i.ekj("close_icon",t.navServices.collapseSidebar),i.uIk("sidebar-layout",t.layout.config.settings.sidebar_type),i.xp6(3),i.Q6J("@fadeInAnimation",t.getRouterOutletState(e))}},directives:[A.mk,lt,pr,a.lC],styles:[""],data:{animation:[de]}}),e})();var gr=r(28627),mr=r(15119);function fr(e,t){if(1&e){const e=i.EpF();i.TgZ(0,"button",22),i.NdJ("click",function(){return i.CHM(e),i.oxw().markAllAsRead()}),i._uU(1),i.ALo(2,"translate"),i.qZA()}2&e&&(i.xp6(1),i.hij(" ",i.lcZ(2,1,"MARK_ALL_AS_READ")," "))}function vr(e,t){if(1&e){const e=i.EpF();
1i.TgZ(0,"button",28),i.NdJ("click",function(){i.CHM(e);const t=i.oxw().$implicit;return i.oxw().onReportKafkaDownload(t)}),i._uU(1),i.ALo(2,"translate"),i.qZA()}2&e&&(i.xp6(1),i.hij(" ",i.lcZ(2,1,"Download Report")," "))}function _r(e,t){if(1&e){const e=i.EpF();i.TgZ(0,"div",29),i.TgZ(1,"button",28),i.NdJ("click",function(){i.CHM(e);const t=i.oxw().$implicit;return i.oxw().onReqDeliveryNotifDownload(t)}),i._uU(2),i.ALo(3,"translate"),i.qZA(),i.TgZ(4,"button",28),i.NdJ("click",function(){i.CHM(e);const t=i.oxw().$implicit;return i.oxw().onReqDeliveryNotifView(t)}),i._uU(5),i.ALo(6,"translate"),i.qZA(),i.qZA()}2&e&&(i.xp6(2),i.hij(" ",i.lcZ(3,2,"DOWNLOAD_LABEL")," "),i.xp6(3),i.hij(" ",i.lcZ(6,4,"VIEW")," "))}function Sr(e,t){1&e&&i.GkF(0)}function br(e,t){1&e&&i.GkF(0)}function yr(e,t){if(1&e){const e=i.EpF();i.TgZ(0,"div",29),i.TgZ(1,"button",30),i.NdJ("click",function(){i.CHM(e);const t=i.oxw().$implicit;return i.oxw().onReportKafkaDownload(t,"excel")}),i.TgZ(2,"span",31),i.YNc(3,Sr,1,0,"ng-container",32),i.qZA(),i._uU(4," Excel "),i.qZA(),i.TgZ(5,"button",33),i.NdJ("click",function(){i.CHM(e);const t=i.oxw().$implicit;return i.oxw().onReportKafkaDownload(t,"pdf")}),i.TgZ(6,"span",31),i.YNc(7,br,1,0,"ng-container",32),i.qZA(),i._uU(8," PDF "),i.qZA(),i.qZA()}if(2&e){i.oxw(2);const e=i.MAs(26),t=i.MAs(28);i.xp6(3),i.Q6J("ngTemplateOutlet",e),i.xp6(4),i.Q6J("ngTemplateOutlet",t)}}const wr=function(e){return{"unread-notif":e}};function Ir(e,t){if(1&e){const e=i.EpF();i.ynx(0),i.TgZ(1,"div",23),i.NdJ("click",function(){const t=i.CHM(e).$implicit;return i.oxw().markAsRead(t)}),i.TgZ(2,"div",24),i._uU(3),i.qZA(),i.YNc(4,vr,3,3,"button",25),i.YNc(5,_r,7,6,"div",26),i.YNc(6,yr,9,2,"div",26),i.TgZ(7,"div",27),i._uU(8),i.ALo(9,"formatDate"),i.qZA(),i.qZA(),i.BQk()}if(2&e){const e=t.$implicit,r=i.oxw();i.xp6(1),i.Q6J("ngClass",i.VKq(8,wr,!(null!=e&&e.isread))),i.xp6(2),i.hij(" ",null==e||null==e.notification?null:e.notification.textmessage," "),i.xp6(1),i.Q6J("ngIf",101==(null==e||null==e.notification?null:e.notification.entity_id)&&(null==e?null:e.action_id)),i.xp6(1),i.Q6J("ngIf",r.isReqDeliveryPanelNotif(e)&&r.isReqDeliveryNotifDownloadable(e)),i.xp6(1),i.Q6J("ngIf",102==(null==e||null==e.notification?null:e.notification.entity_id)&&(null==e?null:e.action_id)),i.xp6(2),i.hij(" ",i.lcZ(9,6,null==e?null:e.created)," ")}}function Tr(e,t){1&e&&i.GkF(0)}function Er(e,t){if(1&e&&(i.ynx(0),i.TgZ(1,"div",34),i.TgZ(2,"div",35),i.TgZ(3,"div",36),i.TgZ(4,"span"),i.YNc(5,Tr,1,0,"ng-container",32),i.qZA(),i.qZA(),i.TgZ(6,"div",37),i._uU(7),i.ALo(8,"translate"),i.qZA(),i.qZA(),i.qZA(),i.BQk()),2&e){i.oxw();const e=i.MAs(24);i.xp6(5),i.Q6J("ngTemplateOutlet",e),i.xp6(2),i.Oqu(i.lcZ(8,2,"NO_NOTIF_FOUND"))}}function Ar(e,t){1&e&&(i.TgZ(0,"div",38),i._UZ(1,"app-sadad-loader"),i.qZA())}function $r(e,t){1&e&&(i.O4$(),i.TgZ(0,"svg",39),i._UZ(1,"path",40),i._UZ(2,"path",41),i.qZA())}function Cr(e,t){1&e&&(i.O4$(),i.TgZ(0,"svg",42),i._UZ(1,"path",43),i.qZA())}function Pr(e,t){1&e&&(i.O4$(),i.TgZ(0,"svg",42),i._UZ(1,"path",44),i.qZA())}let xr=(()=>{class e{constructor(e,t,r,n,i,a,s,o){this._notificationService=e,this._commonHelperService=t,this.spinnerSadad=r,this._reportService=n,this._balStatementService=i,this._shippingService=a,this.router=s,this.translate=o,this.limit=30,this.skip=0,this.showLoader=!1,this._distroyed$=new _.x,this.notiTypes=[{value:"-1",label:"All",code:"ALL"},{value:"1",label:"Invoices",code:"Invoices"},{value:"2",label:"Transactions",code:"Transactions"},{value:"6",label:"Settlements",code:"SETTLEMENTS"},{value:"8",label:"Reports",code:"Reports"},{value:"7",label:"Orders",code:"ORDERS"},{value:"4",label:"Bank Accounts",code:"BANK_ACCOUNTS"},{value:"5",label:"Business Updates",code:"BUSINESS_UPDATES"}],this.notiType="-1",this.getTranslate(),this.translate.onLangChange.pipe((0,f.R)(this._distroyed$)).subscribe(e=>{this.getTranslate()})}ngOnInit(){this.spinnerSadad.show(),this.getNotifications()}getTranslate(){this.translate.get(["Invoices","Transactions","SETTLEMENTS","Reports","ORDERS","BANK_ACCOUNTS","BUSINESS_UPDATES","ALL"]).pipe((0,f.R)(this._distroyed$)).subscribe(e=>{this.language_text=e,this.notiTypes=this._commonHelperService.getNgSelectItemsTrans(this.notiTypes,this.language_text)})}getNotifications(e=!1){e&&(this.spinnerSadad.show(),this.skip=0),this._notificationService.getNotifications(this.skip,this.limit,this.notiType).pipe((0,f.R)(this._distroyed$)).subscribe({next:t=>{t?.error?(this.spinnerSadad.hide(),this._commonHelperService.disTransErrMsg(t?.error?.message)):(this.notifications&&!e?Array.isArray(t)&&this.notifications.push(...t):this.notifications=Array.isArray(t)?t:[],this.spinnerSadad.hide()),this.showLoader=!1},error:e=>{this.spinnerSadad.hide(),this.showLoader=!1}})}onNotiTypeChange(e){this.getNotifications(!0)}onScrollDown(e){this.showLoader=!0,this.skip=this.skip+this.limit,this.getNotifications()}markAsRead(e){console.log("mark as read called!"),0==e.isread&&(e.isread=!0,this._notificationService.markSingleNotificationAsRead(e?.id).pipe((0,f.R)(this._distroyed$)).subscribe(e=>{e?.error&&this._commonHelperService.disTransErrMsg(e?.error?.message)}))}markAllAsRead(){this.spinnerSadad.show(),this._notificationService.markAllNotificationAsRead().pipe((0,f.R)(this._distroyed$)).subscribe(e=>{e?.error?(this.spinnerSadad.hide(),this._commonHelperService.disTransErrMsg(e?.error?.message)):(this.skip=0,this.notifications=[],this.getNotifications())})}onReportKafkaDownload(e,t=""){var r=this;return(0,u.Z)(function*(){var n,i;console.log("Notification component onReportKafkaDownload start :",e),102!=e?.notification?.entity_id?(r.spinnerSadad.show(),r._reportService.downloadKafkaReport(e?.action_id).pipe((0,f.R)(r._distroyed$)).subscribe({next:(i=(0,u.Z)(function*(t){yield r._reportService.getKafkaReportName(t,e?.report_type),r.spinnerSadad.hide(),r._commonHelperService.logFirebaseEvent("RPT_KAFKA_DW_NOTIFICATION","AllNotificationComponent")}),function(e){return i.apply(this,arguments)}),error:(n=(0,u.Z)(function*(e){const t=JSON.parse(yield e.error.text())?.error?.message;r.spinnerSadad.hide(),r._commonHelperService.disTransErrMsg(t)}),function(e){return n.apply(this,arguments)})})):r.downloadStatementFromNotification(e,t)})()}downloadStatementFromNotification(e,t){this.spinnerSadad.show(),this._balStatementService.downloadAndSaveStatement
1(e?.action_id,t,e).pipe((0,f.R)(this._distroyed$)).subscribe({next:e=>{this.spinnerSadad.hide(),this._commonHelperService.logFirebaseEvent("BAL_STMT_DW_NOTIFICATION","AllNotificationComponent")},error:e=>{this.spinnerSadad.hide(),this._commonHelperService.disTransErrMsg(e?.error?.error?.message||e?.error?.message||"Statement file is not ready to download.")}})}isReqDeliveryPanelNotif(e){const t=(e?.action_id||"").toString().trim();return 14===Number(e?.notification?.notificationentityId)&&!!t}isReqDeliveryNotifDownloadable(e){return(e?.action_id||"").toString().trim().toUpperCase().startsWith("SA")}onReqDeliveryNotifDownload(e){const t=(e?.action_id||"").toString().trim();t&&(this.spinnerSadad.show(),this._shippingService.exportDeliveryLabel(t).pipe((0,f.R)(this._distroyed$)).subscribe({next:e=>{(0,fe.saveAs)(e,`Label-${t}.pdf`),this.spinnerSadad.hide()},error:()=>{this.spinnerSadad.hide()}}))}onReqDeliveryNotifView(e){const t=(e?.action_id||"").toString().trim();t.toUpperCase().startsWith("SA")&&this.router.navigateByUrl((0,ve.o)("",{shipId:t||void 0}))}ngOnDestroy(){this._distroyed$.next(null),this._distroyed$.complete()}}return e.\u0275fac=function(t){return new(t||e)(i.Y36(y.gq),i.Y36(y.$P),i.Y36(w.t2),i.Y36(y.rM),i.Y36(y.yS),i.Y36(y.Nk),i.Y36(a.F0),i.Y36(o.sK))},e.\u0275cmp=i.Xpm({type:e,selectors:[["app-all-notifications"]],decls:29,vars:16,consts:[["bdColor","rgba(0, 0, 0, 0.8)","size","medium","color","#fff","type","ball-circus",3,"fullScreen"],[1,"top-header-tab","settlement-wrap","n-notification-main"],["_ngcontent-ngc-c306","",1,"sticky-header","close_taskbar"],["_ngcontent-ngc-c306",""],[1,"container-fluid","p-20","pt-0","pb-0"],[1,"tab-content","tab-pane","all-notif-mob-view"],[1,"col-12","mb-4","p-0"],[1,"card","pr-1","pt-1","pb-1"],[1,"d-flex","justify-content-between","align-items-center"],[1,"col-xl-2","col-lg-6","col-md-3","col-sm-12","mb-4"],[1,"c-filter-dropdown"],["bindLabel","label","bindValue","value",1,"js-example-placeholder-multiple",3,"items","searchable","placeholder","clearable","ngModel","ngModelChange","change"],[1,"col-xl-3","col-lg-6","col-md-4","col-sm-12","mb-4"],[1,"read-unrd-lbl"],["type","button","class","btn mark-all-btn",3,"click",4,"ngIf"],["infinite-scroll","",1,"card-body","all-notif-bg","custom-scrollbar",3,"scrollWindow","scrolled"],[4,"ngFor","ngForOf"],[4,"ngIf"],["class","notf-load",4,"ngIf"],["noNotificationIcon",""],["excelIcon",""],["pdfIcon",""],["type","button",1,"btn","mark-all-btn",3,"click"],[1,"unread-notif",3,"ngClass","click"],[1,"notif-content"],["type","button","class","btn download-report-btn",3,"click",4,"ngIf"],["class","report-download-buttons",4,"ngIf"],["dir","ltr",1,"notif-tm"],["type","button",1,"btn","download-report-btn",3,"click"],[1,"report-download-buttons"],["type","button",1,"btn","excel-btn",3,"click"],[1,"icon"],[4,"ngTemplateOutlet"],["type","button",1,"btn","pdf-btn",3,"click"],[1,"no-record-notification"],[1,"text-center","no-record-found"],[1,"text-center"],[1,"no-record-txt"],[1,"notf-load"],["width","80","height","80","viewBox","0 0 80 80","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M63.0116 23.7158C65.007 27.2311 66.1937 30.9697 66.3844 34.951C66.5371 38.1344 66.3278 41.335 66.4762 44.5192C66.5852 46.845 66.8784 49.1852 67.3445 51.4656C67.7252 53.3263 68.8394 54.8139 70.515 55.8623C73.5838 57.782 74.5825 60.2389 73.682 63.3834C72.7843 66.5164 69.988 68.732 66.7551 68.7565C61.6357 68.7947 56.5164 68.7702 51.3977 68.7716C51.0041 68.7716 50.6112 68.7716 50.2527 68.7716C48.0859 74.3421 44.9562 76.7975 40.2082 76.7154C35.8704 76.6405 32.593 73.8935 30.822 68.7738C26.804 68.7738 22.7486 68.7551 18.6947 68.804C18.2875 68.8098 17.8128 69.1576 17.4923 69.473C15.2868 71.644 13.1172 73.8524 10.9289 76.0421C9.81472 77.1568 8.80805 77.295 7.93618 76.4756C7.05212 75.6454 7.15967 74.4709 8.26743 73.3584C28.8883 52.6422 49.512 31.9303 70.14 11.2205C71.2084 10.1476 72.3097 10.0468 73.1514 10.8929C73.9774 11.7239 73.8591 12.8414 72.7965 13.9092C69.5557 17.1675 66.3048 20.4172 63.0116 23.7158ZM60.4577 27.0166C47.8091 39.7063 35.1728 52.3837 22.6196 64.9798C22.5895 64.9769 22.8003 65.005 23.0125 65.005C37.4005 65.0071 51.7885 65.01 66.1772 64.9963C66.74 64.9956 67.338 64.9179 67.8593 64.7184C69.1506 64.2252 69.9264 63.2408 70.1651 61.8713C70.3759 
160.6572 69.8002 59.8162 68.7906 59.2423C65.0694 57.1217 63.3967 53.6705 63.0661 49.6201C62.727 45.4797 62.7628 41.307 62.6954 37.1472C62.6367 33.5144 62.0164 30.03 60.4577 27.0166ZM34.9985 68.804C35.6496 71.3257 38.3426 73.1647 40.855 72.948C43.2361 72.7414 46.036 70.7561 45.9206 68.804C42.3155 68.804 38.7076 68.804 34.9985 68.804Z","fill","#7E0E45"],["fill-rule","evenodd","clip-rule","evenodd","d","M18.4323 40.9325C18 44.7013 18.0846 48.5414 17.4163 52.2678C16.88 55.2524 15.066 57.5473 12.4196 59.1473C10.5037 60.3058 10.313 62.0923 11.8065 63.8147C12.0948 64.1467 12.5995 64.4937 12.5988 64.8329C12.5988 65.5652 12.5673 66.6078 12.1177 66.9463C11.6029 67.3337 10.3862 67.4316 9.88068 67.0752C6.70079 64.8336 5.57654 59.076 9.51716 56.6285C13.4119 54.2105 14.3383 50.621 14.5211 46.5735C14.6681 43.3001 14.5749 40.0144 14.5734 36.7331C14.5698 25.395 21.415 15.749 32.1248 12.0997C33.1078 11.7649 33.4742 11.3746 33.5058 10.2787C33.6198 6.39106 36.0719 3.58785 39.6203 3.06725C42.8705 2.59056 46.1486 4.69171 47.1911 7.98744C47.4277 8.73487 47.5783 9.55718 47.5367 10.3327C47.4822 11.3537 47.9446 11.6821 48.8215 11.968C52.266 13.0927 55.3032 14.9425 57.9618 17.4145C59.1836 18.5501 59.3664 19.5848 58.5082 20.5C57.6471 21.4166 56.6468 21.3374 55.4043 20.1911C43.6441 9.34692 24.8982 14.6632 19.7014 28.8643C18.2667 32.7857 18.2559 36.8462 18.4323 40.9325C18.5449 40.9455 18.3197 40.9196 18.4323 40.9325ZM43.6341 10.6754C43.9216 9.11506 43.3315 8.02273 42.0868 7.27818C40.9116 6.5754 39.7185 6.67909 38.6344 7.47908C37.5661 8.26827 37.0936 9.32748 37.417 10.6747C39.4998 10.6754 41.5067 10.6754 43.6341 10.6754Z","fill","#7E0E45"],["width","13","height","13","viewBox","0 0 13 13","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M7.58333 1.08334V3.25C7.58333 3.53732 7.69747 3.81287 7.90063 4.01604C8.1038 4.2192 8.37935 4.33334 8.66667 4.33334H10.8333M4.33333 7.04167H5.41667M7.58333 7.04167H8.66667M4.33333 9.20834H5.41667M7.58333 9.20834H8.66667M8.125 1.08334H3.25C2.96268 1.08334 2.68713 1.19747 2.48397 1.40064C2.2808 1.6038 2.16667 1.87935 2.16667 2.16667V10.8333C2.16667 11.1207 2.2808 11.3962 2.48397 11.5994C2.68713 11.8025 2.96268 11.9167 3.25 11.9167H9.75C10.0373 11.9167 10.3129 11.8025 10.516 11.5994C10.7192 11.3962 10.8333 11.1207 10.8333 10.8333V3.79167L8.125 1.08334Z","stroke","#00A63E","stroke-width","1.08333","stroke-linecap","round","stroke-linejoin","round"],["d","M7.58333 1.08334V3.25C7.58333 3.53732 7.69747 3.81287 7.90064 4.01604C8.1038 4.2192 8.37935 4.33334 8.66667 4.33334H10.8333M5.41667 4.875H4.33333M8.66667 7.04167H4.33333M8.66667 9.20834H4.33333M8.125 1.08334H3.25C2.96268 1.08334 2.68713 1.19747 2.48397 1.40064C2.2808 1.6038 2.16667 1.87935 2.16667 2.16667V10.8333C2.16667 11.1207 2.2808 11.3962 2.48397 11.5994C2.68713 11.8025 2.96268 11.9167 3.25 11.9167H9.75C10.0373 11.9167 10.3129 11.8025 10.516 11.5994C10.7192 11.3962 10.8333 11.1207 10.8333 10.8333V3.79167L8.125 1.08334Z","stroke","#FB2C36","stroke-width","1.08333","stroke-linecap","round","stroke-linejoin","round"]],template:function(e,t){1&e&&(i.TgZ(0,"ngx-spinner",0),i._UZ(1,"app-sadad-loader"),i.qZA(),i.TgZ(2,"div",1),i.TgZ(3,"div",2),i.TgZ(4,"h5",3),i._uU(5),i.ALo(6,"translate"),i.qZA(),i.qZA(),i.TgZ(7,"div",4),i.TgZ(8,"div",5),i.TgZ(9,"div",6),i.TgZ(10,"div",7),i.TgZ(11,"div",8),i.TgZ(12,"div",9),i.TgZ(13,"div",10),i.TgZ(14,"ng-select",11),i.NdJ("ngModelChange",function(e){return t.notiType=e})("change",function(e){return t.onNotiTypeChange(e)}),i.ALo(15,"translate"),i.qZA(),i.qZA(),i.qZA(),i.TgZ(16,"div",12),i.TgZ(17,"div",13),i.YNc(18,fr,3,3,"button",14),i.qZA(),i.qZA(),i.qZA(),i.TgZ(19,"div",15),i.NdJ("scrolled",function(e){return t.onScrollDown(e)}),i.YNc(20,Ir,10,10,"ng-container",16),i.YNc(21,Er,9,4,"ng-container",17),i.qZA(),i.YNc(22,Ar,2,0,"div",18),i.qZA(),i.qZA(),i.qZA(),i.qZA(),i.qZA(),i.YNc(23,$r,3,0,"ng-template",null,19,i.W1O),i.YNc(25,Cr,2,0,"ng-template",null,20,i.W1O),i.YNc(27,Pr,2,0,"ng-template",null,21,i.W1O)),2&e&&(i.Q6J("fullScreen",!0),i.xp6(5),i.hij(" ",i.lcZ(6,12,"NOTIFICATIONS")," "),i.xp6(9),i.s9C("placeholder",i.lcZ(15,14,"ALL")),i.Q6J("items",t.notiTypes)("searchable",!1)("clearable",!1)("ngModel",t.notiType),i.xp6(4),i.Q6J("ngIf",(null==t.notifications?null:t.notifications.length)>0),i.xp6(1),i.Q6J("scrollWindow",!1),i.xp6(1),i.Q6J("ngForOf",t.n
1otifications),i.xp6(1),i.Q6J("ngIf",t.notifications&&0==(null==t.notifications?null:t.notifications.length)),i.xp6(1),i.Q6J("ngIf",t.showLoader))},directives:[w.Ro,E.T,ge.w9,p.JJ,p.On,Z.mh,A.O5,mr.R,A.sg,A.mk,A.tP],pipes:[o.X$,Se.r2],styles:[".page-wrapper[_ngcontent-%COMP%]   .page-header[_ngcontent-%COMP%]   .header-wrapper[_ngcontent-%COMP%]   .nav-right[_ngcontent-%COMP%]   .notification-dropdown[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{padding:8px 16px!important}.all-notif-bg[_ngcontent-%COMP%]   .download-report-btn[_ngcontent-%COMP%]{height:36px;border:1px solid #8e1b3e!important;border-radius:10px!important;font-family:Open Sans,sans-serif;font-style:normal;font-weight:400;font-size:12px;line-height:20px;letter-spacing:-.005em;color:#8e1b3e;display:flex;margin-top:0;align-items:center;justify-content:center;flex:none}  html[dir=rtl] .notif-content{text-align:right!important}.no-record-notification[_ngcontent-%COMP%]:hover{background-color:transparent}.no-record-notification[_ngcontent-%COMP%]   .no-record-found[_ngcontent-%COMP%]{display:flex;flex-direction:column;position:absolute;left:50%;transform:translate(-50%,-50%);top:50%;margin-top:0}.read-unrd-lbl[_ngcontent-%COMP%]{right:16px}.read-unrd-lbl[_ngcontent-%COMP%]   .mark-all-btn[_ngcontent-%COMP%]{font-size:13px;color:#fff;font-weight:600;background-color:#7e0e45;padding:12px 30px;border-radius:24px;cursor:pointer;margin-top:10px!important}.report-download-buttons[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:10px;gap:10px}.report-download-buttons[_ngcontent-%COMP%]   .excel-btn[_ngcontent-%COMP%], .report-download-buttons[_ngcontent-%COMP%]   .pdf-btn[_ngcontent-%COMP%]{padding:8px 16px!important;height:36px;border:1px solid #4a5565!important;border-radius:10px!important;font-family:Open Sans,sans-serif;font-style:normal;font-weight:400;font-size:12px;line-height:20px;letter-spacing:-.005em;color:#4a5565;width:-webkit-max-content!important;width:-moz-max-content!important;width:max-content!important;display:flex;align-items:center;margin-top:15px;grid-gap:5px;gap:5px}.report-download-buttons[_ngcontent-%COMP%]   .excel-btn[_ngcontent-%COMP%]   span[_ngcontent-%COMP%], .report-download-buttons[_ngcontent-%COMP%]   .pdf-btn[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{display:inline-flex}"]}),e})();var Nr=r(14324),Or=r(49234),Ur=r(90066);const Lr=["AgmMap"];function Mr(e,t){1&e&&(i.TgZ(0,"strong"),i._uU(1),i.ALo(2,"translate"),i.qZA()),2&e&&(i.xp6(1),i.Oqu(i.lcZ(2,1,"ONLINE")))}function Dr(e,t){1&e&&(i.TgZ(0,"strong"),i._uU(1),i.ALo(2,"translate"),i.qZA()),2&e&&(i.xp6(1),i.Oqu(i.lcZ(2,1,"OFFLINE")))}const Rr=function(){return{width:60,height:70}},Zr=function(e,t){return{url:e,scaledSize:t}};function kr(e,t){if(1&e){const e=i.EpF();i.TgZ(0,"agm-marker",13),i.NdJ("markerClick",function(){i.CHM(e);const t=i.MAs(2);return i.oxw().clickedMarker(t)}),i.TgZ(1,"agm-info-window",null,14),i.TgZ(3,"strong"),i._uU(4),i.qZA(),i._UZ(5,"br"),i.YNc(6,Mr,3,3,"strong",15),i.YNc(7,Dr,3,3,"strong",15),i.qZA(),i.qZA()}if(2&e){const e=t.$implicit;i.Q6J("latitude",e.latitude)("longitude",e.longitude)("iconUrl",i.WLB(10,Zr,e.markerIcon,i.DdM(9,Rr)))("agmFitBounds",!0)("draggable",!1)("agmFitBounds",!0),i.xp6(4),i.Oqu(e.name),i.xp6(2),i.Q6J("ngIf",e.is_online),i.xp6(1),i.Q6J("ngIf",!e.is_online)}}const qr=[{path:"dashboard/online-payment-default",loadChildren:()=>Promise.all([r.e("default-src_app_components_bonus-ui_base_base_module_ts-src_app_components_bonus-ui_base_date-9da172"),r.e("default-node_modules_ng-apexcharts___ivy_ngcc___fesm2015_ng-apexcharts_js-node_modules_ng2-ch-5742f9"),r.e("src_app_components_opdashboard_opdashboard_module_ts")]).then(r.bind(r,88364)).then(e=>e.OpdashboardModule),canActivate:[gr.n],data:{preload:!0},resolve:{dataList:y.Nc}},{path:"dashboard/pos-default",loadChildren:()=>Promise.all([r.e("default-src_app_components_bonus-ui_base_base_module_ts-src_app_components_bonus-ui_base_date-9da172"),r.e("default-node_modules_ng-apexcharts___ivy_ngcc___fesm2015_ng-apexcharts_js-node_modules_ng2-ch-5742f9"),r.e("src_app_components_posdashboard_posdashboard_module_ts")]).then(r.bind(r,73443)).then(e=>e.PosdashboardModule),canActivate:[gr.n],data:{preload:!0}},{path:"merchantpanel/settlement",loadChildren:()=>Promise.all([r.e("default-src_app_components_bonus-ui_base_base_module_ts-src_app_components_bonus-ui_base_date-9da172"),r.e("src_app_components_settlement_settlement_module_ts")]).then(r.bind(r,14438)).then(e=>
1e.SettlementModule),canActivate:[gr.n],data:{preload:!0,delay:2e3}},{path:"merchantpanel/invoice",loadChildren:()=>Promise.all([r.e("default-src_app_components_bonus-ui_base_base_module_ts-src_app_components_bonus-ui_base_date-9da172"),r.e("default-src_app__directives_input-no-leading-space_ts-src_app__directives_one-decimal-only_di-15f3ba"),r.e("src_app_components_invoice_invoice_module_ts")]).then(r.bind(r,34482)).then(e=>e.InvoiceModule),canActivate:[gr.n],data:{preload:!0,delay:2e3}},{path:"merchantpanel/sadad-services",loadChildren:()=>Promise.all([r.e("default-src_app_components_bonus-ui_base_base_module_ts-src_app_components_bonus-ui_base_date-9da172"),r.e("src_app_components_sadadservices_sadadservices_module_ts")]).then(r.bind(r,39168)).then(e=>e.SadadservicesModule),canActivate:[gr.n]},{path:"merchantpanel/online-payment-transactions",loadChildren:()=>Promise.all([r.e("default-src_app_components_bonus-ui_base_base_module_ts-src_app_components_bonus-ui_base_date-9da172"),r.e("default-node_modules_angular_material___ivy_ngcc___fesm2015_slide-toggle_js"),r.e("common"),r.e("src_app_components_optransactions_optransactions_module_ts")]).then(r.bind(r,11055)).then(e=>e.OPtransactionsModule),canActivate:[gr.n],data:{preload:!0,delay:3e3}},{path:"merchantpanel/pos-transactions",loadChildren:()=>Promise.all([r.e("default-src_app_components_bonus-ui_base_base_module_ts-src_app_components_bonus-ui_base_date-9da172"),r.e("common"),r.e("src_app_components_postransactions_postransactions_module_ts")]).then(r.bind(r,15385)).then(e=>e.POStransactionsModule),canActivate:[gr.n],data:{preload:!0,delay:3e3}},{path:"merchantpanel/pos-batch-summary",loadChildren:()=>Promise.all([r.e("default-src_app_components_bonus-ui_base_base_module_ts-src_app_components_bonus-ui_base_date-9da172"),r.e("src_app_components_batchsummary_batchsummary_module_ts")]).then(r.bind(r,69968)).then(e=>e.BatchsummaryModule),canActivate:[gr.n],data:{preload:!0,delay:3e3}},{path:"merchantpanel/balance-statement",loadChildren:()=>Promise.all([r.e("common"),r.e("src_app_components_balancestatement_balancestatement_module_ts")]).then(r.bind(r,22811)).then(e=>e.BalancestatementModule),canActivate:[gr.n],data:{preload:!0,delay:3e3}},{path:"merchantpanel/online-payment-settings",loadChildren:()=>Promise.all([r.e("default-node_modules_angular_material___ivy_ngcc___fesm2015_slide-toggle_js"),r.e("src_app_components_opsettings_opsettings_module_ts")]).then(r.bind(r,4288)).then(e=>e.OPsettingsModule),canActivate:[gr.n],data:{preload:!0,delay:3e3},resolve:{dataList:y.Nc}},{path:"merchantpanel/basicstore",loadChildren:()=>Promise.all([r.e("default-src_app_components_bonus-ui_base_base_module_ts-src_app_components_bonus-ui_base_date-9da172"),r.e("src_app_components_basicstore_basicstore_module_ts")]).then(r.bind(r,88718)).then(e=>e.BasicstoreModule),canActivate:[gr.n],data:{preload:!0,delay:3e3}},{path:"merchantpanel/online-payment-reports",loadChildren:()=>Promise.all([r.e("default-src_app_components_bonus-ui_base_base_module_ts-src_app_components_bonus-ui_base_date-9da172"),r.e("default-src_app_components_opreports_opreports_module_ts")]).then(r.bind(r,89203)).then(e=>e.OPReportsModule),canActivate:[gr.n],data:{preload:!0,delay:3e3}},{path:"merchantpanel/myaccounts",loadChildren:()=>Promise.all([r.e("default-node_modules_angular-file___ivy_ngcc___fesm2015_angular-file_js-src_app__directives_i-154fd4"),r.e("src_app_components_myaccount_myaccount_module_ts")]).then(r.bind(r,34599)).then(e=>
1e.MyAccountModule),canActivate:[gr.n],data:{preload:!0,delay:4e3}},{path:"merchantpanel/pos-settings",loadChildren:()=>Promise.all([r.e("default-node_modules_angular_material___ivy_ngcc___fesm2015_slide-toggle_js"),r.e("src_app_components_possettings_possettings_module_ts")]).then(r.bind(r,79326)).then(e=>e.POSsettingsModule),canActivate:[gr.n],data:{preload:!0,delay:3e3}},{path:"merchantpanel/pos-reports",loadChildren:()=>Promise.all([r.e("default-src_app_components_bonus-ui_base_base_module_ts-src_app_components_bonus-ui_base_date-9da172"),r.e("default-src_app_components_opreports_opreports_module_ts"),r.e("common"),r.e("src_app_components_posreports_posreports_module_ts")]).then(r.bind(r,72122)).then(e=>e.POSreportsModule),canActivate:[gr.n],data:{preload:!0,delay:3e3}},{path:"merchantpanel/pos-terminals",loadChildren:()=>Promise.all([r.e("default-src_app_components_bonus-ui_base_base_module_ts-src_app_components_bonus-ui_base_date-9da172"),r.e("src_app_components_terminal_terminal_module_ts")]).then(r.bind(r,96926)).then(e=>e.TerminalModule),canActivate:[gr.n],data:{preload:!0,delay:2e3}},{path:"merchantpanel/sadadvas",loadChildren:()=>r.e("src_app_components_sadadvas_sadadvas_module_ts").then(r.bind(r,97230)).then(e=>e.SadadvasModule),canActivate:[gr.n]},{path:"merchantpanel/manage-users",loadChildren:()=>Promise.all([r.e("default-src_app_components_bonus-ui_base_base_module_ts-src_app_components_bonus-ui_base_date-9da172"),r.e("default-node_modules_angular_material___ivy_ngcc___fesm2015_slide-toggle_js"),r.e("src_app_components_manageusers_manageusers_module_ts")]).then(r.bind(r,4235)).then(e=>e.ManageusersModule),canActivate:[gr.n],data:{preload:!0,delay:3e3}},{path:"merchantpanel/manage-merchants",loadChildren:()=>Promise.all([r.e("default-node_modules_angular-file___ivy_ngcc___fesm2015_angular-file_js-src_app__directives_i-154fd4"),r.e("src_app_components_managemerchants_managemerchants_module_ts")]).then(r.bind(r,94699)).then(e=>e.ManagemerchantsModule),canActivate:[gr.n],data:{preload:!0,delay:3e3}},{path:"merchantpanel/notifications",component:xr,data:{preload:!0}},{path:"merchantpanel/pos-terminal-maps",component:(()=>{class e{constructor(e,t,r){this._dashboard=e,this.spinnerSadad=t,this._commonHelperService=r,this._distroyed$=new _.x,this.lat_m2=25.2842534,this.lng_m2=51.3719078,this.zoom_m2=10,this.previous_info_window=null,this.infoWindowOpened=null,this.markers=[],this.refreshInterval$=(0,Or.H)(0,12e4).pipe((0,f.R)(this._distroyed$),(0,Nr.w)(()=>this.getTerminalLocations())),this._commonHelperService.logFirebaseEvent("POS_TerminalsMap","TerminalMapComponent")}ngOnInit(){this.spinnerSadad.show(),this.getTerminalLocations(),this.refreshInterval$.pipe((0,f.R)(this._distroyed$)).subscribe()}ngAfterViewInit(){}setZoom(){setTimeout(()=>{},500)}getTerminalLocations(){return this._dashboard.getPOSTerminalLocations().pipe((0,f.R)(this._distroyed$)).subscribe(e=>{if(e.error)this._commonHelperService.disTransErrMsg(e?.error?.message),this.spinnerSadad.hide();else if(e.length){let t=0,r=0;e.map(e=>{e.latitude&&e.longitude&&(e.markerIcon=e.is_online?"assets/images/google-map/terminal-marker-active.svg":"assets/images/google-map/terminal-marker-inactive.svg",this.markers.push(e),t+=e.latitude,r+=e.longitude)}),this.lat_m2=t/e.length,this.lng_m2=r/e.length,this.setZoom()}this.spinnerSadad.hide(),this.markers.length||this._commonHelperService.disTransErrMsg("No Terminals found!")}),""}clickedMarker(e){null==this.previous_info_window?this.previous_info_window=e:(this.infoWindowOpened=e,this.previous_info_window.close()),this.previous_info_window=e}mapClicked(e){null!=this.previous_info_window&&this.previous_info_window.close()}ngOnDestroy(){this._distroyed$.next(null),this._distroyed$.complete()}}return e.\u0275fac=function(t){return new(t||e)(i.Y36(y.sp),i.Y36(w.t2),i.Y36(y.$P))},e.\u0275cmp=i.Xpm({type:e,selectors:[["app-terminal-map"]],viewQuery:function(e,t){if(1&e&&i.Gf(Lr,5),2&e){let e;i.iGM(e=i.CRH())&&(t.agmMap=e.first)}},decls:17,vars:12,consts:[["bdColor","rgba(0, 0, 0, 0.8)","size","medium","color","#fff","type","ball-circus",3,"fullScreen"],[1,"top-header-tab","settlement-wrap","trml-loc-box"],[1,"sticky-header","close_taskbar"],[1,"tab-content","cust-map-padng"],[1,"container-fluid","p-20"],[1,"col-12","p-0","mb-4"],[1,"card","h-100"],[1,"card-body","cust-map-frm-bg"],[1,"custom-map"],[1,"map-js-height"],[3,"longitude","latitude","fitBounds","disableDefaultUI","zoomControl","zoom","maxZoom","mapClick"],["AgmMap",""],[3,"latitude","longitude","iconUrl","label","agmFitBounds","draggable","markerClick",4,"ngFor","ngForOf"],[3,"latitude","longitude","iconUrl","label","agmFitBounds","draggable","markerClick"],["infoWindow",""],[4,"ngIf"]],template:function(e,t){1&e&&(i.TgZ(0,"ngx-spinner",0),i._UZ(1,"app-sadad-loader"),i.qZA(),i.TgZ(2,"div",1),i.TgZ(3,"div",2),i.TgZ(4,"h5"),i._uU(5),i.ALo(6,"translate"),i.qZA(),i.qZA(),i.TgZ(7,"div",3),i.TgZ(8,"div",4),i.TgZ(9,"div",5),i.TgZ(10,"div",6),i.TgZ(11,"div",7),i.TgZ(12,"div",8),i.TgZ(13,"div",9),i.TgZ(14,"agm-map",10,11),i.NdJ("mapClick",function(e){return t.mapClicked(e)}),i.YNc(16,kr,8,13,"agm-marker",12),i.qZA(),i.qZA(),i.qZA(),i.qZA(),i.qZA(),i.qZA(),i.qZA(),i.qZA(),i.qZA()),2&e&&(i.Q6J("fullScreen",!0),i.xp6(5),i.Oqu(i.lcZ(6,10,"Live Terminals locations in Qatar")),i.xp6(9),i.Q6J("longitude",t.lng_m2)("latitude",t.lat_m2)("fitBounds",t.markers.length>1)("disableDefaultUI",!1)("zoomControl",!0)("zoom",t.zoom_m2)("maxZoom",18),i.xp6(2),i.Q6J("ngForOf",t.markers))},directives:[w.Ro,E.T,Ur.SA,A.sg,Ur.pt,Ur.NC,Ur.d,A.O5],pipes:[o.X$],styles:[""]}),e})(),canActivate:[gr.n],data:{preload:!0}},{path:"merchantpanel/shipping",loadChildren:()=>Promise.all([r.e("default-src_app_components_bonus-ui_base_base_module_ts-src_app_components_bonus-ui_base_date-9da172"),r.e("default-src_app__directives_input-no-leading-space_ts-src_app__directives_one-decimal-only_di-15f3ba"),r.e("common"),r.e("src_app_components_shipping_shipping_module_ts")]).then(r.bind(r,88712)).then(e=>
1e.ShippingModule),canActivate:[gr.n],data:{preload:!0,delay:3e3}}];var Vr=r(52105);function Fr(e,t){if(1&e&&(i.TgZ(0,"p",4),i._uU(1),i.qZA()),2&e){const e=i.oxw();i.xp6(1),i.Oqu(e.msg)}}let Yr=(()=>{class e{constructor(){this.passwordStrength=new i.vpe,this.msg="",this.colors=["darkred","orangered","orange","yellowgreen"]}static checkStrength(e){let t=0;const r=[/[a-z]+/.test(e),/[A-Z]+/.test(e),/[0-9]+/.test(e),/[$-/:-?{-~!"^_@`\[\]]/g.test(e)];let n=0;for(const i of r)n+=!0===i?1:0;return t+=2*e.length+(e.length>=10?1:0),t+=10*n,t=e.length<=8?Math.min(t,10):t,t=1===n?Math.min(t,10):t,t=2===n?Math.min(t,20):t,t=3===n?Math.min(t,30):t,t=4===n?Math.min(t,40):t,t}ngOnChanges(t){const r=t.passwordToVerify.currentValue;if(this.setBarColors(4,"#DDD"),r){const t=this.getColor(e.checkStrength(r));this.setBarColors(t.idx,t.col);const n=e.checkStrength(r);switch(this.passwordStrength.emit(40===n),t.idx){case 1:this.msg="Poor";break;case 2:this.msg="Not Good";break;case 3:this.msg="Average";break;case 4:this.msg="Good"}}else this.msg=""}getColor(e){let t=0;return t=e<=10?0:e<=20?1:e<=30?2:e<=40?3:4,{idx:t+1,col:this.colors[t]}}setBarColors(e,t){for(let r=0;r<e;r++)this["bar"+r]=t}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Xpm({type:e,selectors:[["strength-checker"]],inputs:{passwordToVerify:"passwordToVerify",barLabel:"barLabel"},outputs:{passwordStrength:"passwordStrength"},features:[i.TTD],decls:9,vars:10,consts:[[1,"strength"],[1,"strengthBar"],[1,"point"],["class","alert alert-info",4,"ngIf"],[1,"alert","alert-info"]],template:function(e,t){1&e&&(i.TgZ(0,"div",0),i._uU(1),i.TgZ(2,"ul",1),i._UZ(3,"li",2),i._UZ(4,"li",2),i._UZ(5,"li",2),i._UZ(6,"li",2),i.qZA(),i._UZ(7,"br"),i.YNc(8,Fr,2,1,"p",3),i.qZA()),2&e&&(i.xp6(1),i.hij("",t.barLabel,"\xa0 "),i.xp6(2),i.Udp("background",t.bar0),i.xp6(1),i.Udp("background",t.bar1),i.xp6(1),i.Udp("background",t.bar2),i.xp6(1),i.Udp("background",t.bar3),i.xp6(2),i.Q6J("ngIf",t.msg))},directives:[A.O5],styles:[".strengthBar[_ngcontent-%COMP%]{display:inline;list-style:none;margin:0;padding:0;vertical-align:2px}.point[_ngcontent-%COMP%]:last-of-type{margin:0!important}.point[_ngcontent-%COMP%]{background:#ddd;border-radius:2px;display:inline-block;height:5px;margin-right:3px;width:62px}","@media screen and (max-width:576px){.point[_ngcontent-%COMP%]{Width:50px}}"]}),e})();const Hr=["otp1"],jr=["eleLoginEmail"],Jr=["pass_one"];function Br(e,t){if(1&e){const e=i.EpF();i.ynx(0),i.TgZ(1,"a",15),i._UZ(2,"img",16),i.qZA(),i.TgZ(3,"a",17),i.NdJ("click",function(){return i.CHM(e),i.oxw().changeLangSettings("ar")}),i._UZ(4,"img",18),i.qZA(),i.BQk()}}function Wr(e,t){if(1&e){const e=i.EpF();i.ynx(0),i.TgZ(1,"a",15),i._UZ(2,"img",19),i.qZA(),i.TgZ(3,"a",17),i.NdJ("click",function(){return i.CHM(e),i.oxw().changeLangSettings("en")}),i._UZ(4,"img",20),i.qZA(),i.BQk()}}function Gr(e,t){if(1&e&&(i.TgZ(0,"span",30),i._uU(1),i.ALo(2,"translate"),i.qZA()),2&e){const e=i.oxw(2);i.xp6(1),i.Oqu(i.lcZ(2,1,e.errorMessage))}}function Qr(e,t){if(1&e){const e=i.EpF();i.TgZ(0,"div"),i.TgZ(1,"h5",21),i._uU(2),i.ALo(3,"translate"),i.qZA(),i.TgZ(4,"div",22),i._UZ(5,"img",23),i.TgZ(6,"input",24,25),i.NdJ("keyup.enter",function(){return i.CHM(e),i.oxw().resetPasswordOTPSend()}),i.ALo(8,"translate"),i.qZA(),i.qZA(),i.YNc(9,Gr,3,3,"span",26),i.TgZ(10,"button",27),i.NdJ("click",function(){return i.CHM(e),i.oxw().resetPasswordOTPSend()}),i.TgZ(11,"span"),i._uU(12),i.ALo(13,"translate"),i.qZA(),i.qZA(),i.TgZ(14,"p",28),i._uU(15),i.ALo(16,"translate"),i.TgZ(17,"a",29),i._uU(18),i.ALo(19,"translate"),i.qZA(),i.qZA(),i.qZA()}if(2&e){const e=i.oxw();i.xp6(2),i.hij(" ",i.lcZ(3,7,"RESET_PASSWORD")," "),i.xp6(4),i.s9C("placeholder",i.lcZ(8,9,"ENTER_MOB_NUM")),i.xp6(3),i.Q6J("ngIf",e.errorFlag),i.xp6(3),i.hij(" ",i.lcZ(13,11,"CONTINUE")," "),i.xp6(3),i.hij(" ",i.lcZ(16,13,"ALREADY_HAVE_PWD")," "),i.xp6(2),i.Q6J("routerLink","/auth/login"),i.xp6(1),i.hij(" ",i.lcZ(19,15,"LOGIN")," ")}}function Kr(e,t){if(1&e){const e=i.EpF();i.TgZ(0,"p",45),i.NdJ("click",function(){return i.CHM(e),i.oxw(2).resendOTP()}),i._uU(1),i.ALo(2,"translate"),i.qZA()}2&e&&(i.xp6(1),i.hij(" ",i.lcZ(2,1,"RESEND_OTP")," "))}function zr(e,t){if(1&e&&(i.TgZ(0,"p",46),i.TgZ(1,"span",47),i._uU(2),i.ALo(3,"translate"),i.ALo(4,"translate"),i.qZA(),i.qZA()),2&e){const e=i.oxw(2);i.xp6(2),i.lnq(" ",i.lcZ(3,3,"OTP_VALID_UPTO")," ",e.time," ",i.lcZ(4,5,"SECONDS")," ")}}function Xr(e,t){if(1&e){const e=i.EpF();i.TgZ(0,"div"),i.TgZ(1,"div",31),i.TgZ(2,"h5",32),i._uU(3),i.ALo(4,"translate"),i._UZ(5,"br"),i._uU(6),i.ALo(7,"translate"),i.qZA(),i.TgZ(8,"p",33),i._uU(9),i.ALo(10,"translate"),i.ALo(11,"translate"),i.qZA(),i.TgZ(12,"div",34),i.TgZ(13,"input",35,36),i.NdJ("keypress",function(){return i.CHM(e),i.oxw().otpError=0})("keyup",function(){return i.CHM(e),i.oxw().handleOTPauth()}),i.qZA(),i.TgZ(15,"input",37),i.NdJ("keypress",function(){return i.CHM(e),i.oxw().otpError=0})("keyup",function(){return i.CHM(e),i.oxw().handleOTPauth()}),i.qZA(),i.TgZ(16,"input",38),i.NdJ("keypress",function(){return i.CHM(e),i.oxw().otpError=0})("keyup",function(){return i.CHM(e),i.oxw().handleOTPauth()}),i.qZA(),i.TgZ(17,"input",39),i.NdJ("keypress",function(){return i.CHM(e),i.oxw().otpError=0})("keyup",function(){return i.CHM(e),i.oxw().handleOTPauth()}),i.qZA(),i.TgZ(18,"input",40),i.NdJ("keypress",function(){return i.CHM(e),i.oxw().otpError=0})("keyup",function(){return i.CHM(e),i.oxw().handleOTPauth()}),i.qZA(),i.TgZ(19,"input",41),i.NdJ("keypress",function(){return i.CHM(e),i.oxw().otpError=0})("keyup",function(){return i.CHM(e),i.oxw().handleOTPauth()}),i.qZA(),i.qZA(),i.TgZ(20,"div"),i.YNc(21,Kr,3,3,"p",42),i.YNc(22,zr,5,7,"p",43),i.qZA(),i.TgZ(23,"p",28),i._uU(24),i.ALo(25,"translate"),i.TgZ(26,"a",44),i._uU(27),i.ALo(28,"translate"),i.qZA(),i.qZA(),i.qZA(),i.qZA()}if(2&e){const e=i.oxw();i.xp6(3),i.hij(" ",i.lcZ(4,10,"RESET_PASSWORD"),""),i.xp6(3),i.hij(" ",i.lcZ(7,12,"ENTER_OTP")," "),i.xp6(3),i.lnq(" ",i.lcZ(10,14,"SEND_OTP_TO_YOUR_NUM")," ",e.dummyNo," ",i.lcZ(11,16,"ENTER_OTP_IN_SPACE_TO_CONFIRM_IDENTITY")," "),i.xp6(12),i.Q6J("ngIf",!e.showContDown),i.xp6(1),i.Q6J("ngIf",e.showContDown),i.xp6(2),i.hij(" ",i.lcZ(25,18,"DO_WANT_TO_GO")," "),i.xp6(2),i.Q6J("routerLink","/auth/login"),i.xp6(1),i.hij(" ",i.lcZ(28,20,"BACK_TO_LOGIN")," ")}}function en(e,t){1&e&&(i.TgZ(0,"a"),i._UZ(1,"img",66),i.qZA())}function tn(e,t){1&e&&(i.TgZ(0,"a"),i._UZ(1,"img",67),i.qZA())}function rn(e,t){1&e&&(i.TgZ(0,"a"),i._UZ(1,"img",66),i.qZA())}function nn(e,t){1&e&&(i.TgZ(0,"a"),i._UZ(1,"img",67),i.qZA())}function an(e,t){if(1&e&&(i.TgZ(0,"span",68),i._uU(1),i.ALo(2,"translate"),i.qZA()),2&e){const e=i.oxw(2);i.xp6(1),i.hij(" ",i.lcZ(2,1,e.errorMessage),"")}}function sn(e,t){if(1&e){const e=i.EpF();i.TgZ(0,"div",48),i._UZ(1,"app-feather-icons"),i.TgZ(2,"div",49),i.TgZ(3,"h5",50),i._uU(4),i.ALo(5,"translate"),i.qZA(),i.qZA(),i.TgZ(6,"div",51),i.TgZ(7,"label",52),i._uU(8),i.ALo(9,"translate"),i.qZA(),i._UZ(10,"img",53),i.TgZ(11,"div",54),i.TgZ(12,"span",55),i.NdJ("
1click",function(){i.CHM(e);const t=i.MAs(16);return i.oxw().togglePasswordOne(t,"_showPassword1")}),i.YNc(13,en,2,0,"a",7),i.YNc(14,tn,2,0,"a",7),i.qZA(),i.qZA(),i._UZ(15,"input",56,57),i.ALo(17,"translate"),i.TgZ(18,"strength-checker",58),i.NdJ("passwordStrength",function(t){return i.CHM(e),i.oxw().handleCounterEvent(t)}),i.qZA(),i.qZA(),i.TgZ(19,"div",51),i.TgZ(20,"label",52),i._uU(21),i.ALo(22,"translate"),i.qZA(),i._UZ(23,"img",59),i.TgZ(24,"div",60),i.TgZ(25,"span",55),i.NdJ("click",function(){i.CHM(e);const t=i.MAs(29);return i.oxw().togglePasswordOne(t,"_showPassword2")}),i.YNc(26,rn,2,0,"a",7),i.YNc(27,nn,2,0,"a",7),i.qZA(),i.qZA(),i._UZ(28,"input",61,62),i.ALo(30,"translate"),i.qZA(),i.YNc(31,an,3,3,"span",63),i.TgZ(32,"div",64),i.TgZ(33,"button",65),i.NdJ("click",function(){return i.CHM(e),i.oxw().sendrequest()}),i._uU(34),i.ALo(35,"translate"),i.qZA(),i.qZA(),i.qZA()}if(2&e){const e=i.oxw();i.xp6(4),i.Oqu(i.lcZ(5,13,"RESET_YOUR_PWD")),i.xp6(4),i.hij(" ",i.lcZ(9,15,"NEW_PASSWORD")," "),i.xp6(5),i.Q6J("ngIf",e._showPassword1),i.xp6(1),i.Q6J("ngIf",!e._showPassword1),i.xp6(1),i.s9C("placeholder",i.lcZ(17,17,"ENTER_NEW_PWD")),i.xp6(3),i.Q6J("passwordToVerify",e.forgetForm.value.password),i.xp6(3),i.Oqu(i.lcZ(22,19,"RETYPE_PWD")),i.xp6(5),i.Q6J("ngIf",e._showPassword2),i.xp6(1),i.Q6J("ngIf",!e._showPassword2),i.xp6(1),i.s9C("placeholder",i.lcZ(30,21,"ENTER_CONFIRM_PWD")),i.xp6(3),i.Q6J("ngIf",e.errorFlag),i.xp6(2),i.Q6J("disabled",e.submited),i.xp6(1),i.hij(" ",i.lcZ(35,23,"DONE")," ")}}let on=(()=>{class e{constructor(e,t,r,n,i,a,s,o){this.fb=e,this._authenticationService=t,this.changeDetector=r,this.router=n,this.spinnerSadad=i,this.translate=a,this.layout=s,this._commonHelperService=o,this.show=!1,this.stage=0,this.errorFlag=!1,this.errorMessage="",this.showContDown=!0,this.submited=!1,this._showPassword1=!1,this._showPassword2=!1,this.time=60,this.currLang="";let l=localStorage.getItem("selectedLang");l?(this.currLang=l,this.translate.use(l),this.setLangSettings(l)):(this.currLang=g.N.defaultLang,this.translate.use(g.N.defaultLang),localStorage.setItem("selectedLang",g.N.defaultLang),this.setLangSettings(g.N.defaultLang))}ngOnInit(){this.forgetForm=this.fb.group({phone:["",[p.kI.required]],password:["",p.kI.required],password2:["",p.kI.required],otp1:["",[p.kI.required]],otp2:["",[p.kI.required]],otp3:["",[p.kI.required]],otp4:["",[p.kI.required]],otp5:["",[p.kI.required]],otp6:["",[p.kI.required]]}
1),this._authenticationService.currentUserValue?.id?this.router.navigate(["/dashboard/online-payment-default"]):this._authenticationService.login("","",!0).subscribe(e=>{}),this.errorFlag=!1,this.errorMessage="",this.forgetForm.controls.phone.valueChanges.subscribe(e=>{this.errorFlag=!1,this.errorMessage=""}),this.forgetForm.controls.password.valueChanges.subscribe(e=>{this.r.password.value&&(this.forgetForm.controls.password?.errors?.pattern?(this.errorFlag=!0,this.errorMessage="FORGET_PASSWORD_LENGTH_REQ_CHAR_VALIDATION"):(this.errorFlag=!1,this.errorMessage="")),!this.errorMessage&&this.r.password.value&&this.r.password2.value&&(this.r.password.value!=this.r.password2.value?(this.errorFlag=!0,this.errorMessage="NEW_PWD_RETYPE_PWD_MUST_MATCH"):(this.errorFlag=!1,this.errorMessage="")),this.r.password.value||this.r.password2.value||(this.errorFlag=!1,this.errorMessage="")}),this.forgetForm.controls.password2.valueChanges.subscribe(e=>{this.r.password2.value&&(this.forgetForm.controls.password2?.errors?.pattern||this.forgetForm.controls.password?.errors?.pattern?(this.errorFlag=!0,this.errorMessage="FORGET_PASSWORD_LENGTH_REQ_CHAR_VALIDATION"):(this.errorFlag=!1,this.errorMessage="")),this.r.password.value&&this.r.password2.value&&!this.forgetForm.controls.password?.errors?.pattern&&(this.r.password.value!=this.r.password2.value?(this.errorFlag=!0,this.errorMessage="NEW_PWD_RETYPE_PWD_MUST_MATCH"):(this.errorFlag=!1,this.errorMessage="")),this.r.password.value||this.r.password2.value||(this.errorFlag=!1,this.errorMessage="")})}ngAfterViewInit(){setTimeout(()=>{this.eleLoginEmail?.nativeElement?.focus()},0),this._authenticationService.vpnEventEmitter.emit("vpnInitEvent")}setLangSettings(e){"en"==e?(this.layout.changeLayoutType("ltr"),console.log("forget pwd changeLayoutType: ltr")):(this.layout.changeLayoutType("rtl"),console.log("forget pwd changeLayoutType: rtl"))}changeLangSettings(e){this.currLang=e,this.translate.use(e),this.layout.changeLayoutType("en"==e?"ltr":"rtl"),localStorage.setItem("selectedLang",e)}get r(){return this.forgetForm.controls}startTimer(){this.time=60,this.subsc=(0,h.F)(1e3).subscribe(e=>{this.time=this.time-1,this.time<0&&(this.showContDown=!1,this.subsc.unsubscribe())})}resendOTP(){this.errorMessage="",this.forgetForm.controls.otp1.reset(),this.forgetForm.controls.otp2.reset(),this.forgetForm.controls.otp3.reset(),this.forgetForm.controls.otp4.reset(),this.forgetForm.controls.otp5.reset(),this.forgetForm.controls.otp6.reset(),this._authenticationService.restPasswordRequest({cellnumber:this.r.phone.value}).subscribe(e=>{e?.error&&this._commonHelperService.disTransErrMsg(e?.error?.message)}),this.showContDown=!0,this.startTimer()}showPassword(){this.show=!this.show}sendrequest(){if(!this.forgetForm.controls.password.errors&&!this.forgetForm.controls.password2.errors){if(this.r.password.value!=this.r.password2.value)return this.errorFlag=!0,void(this.errorMessage="NEW_PWD_RETYPE_PWD_MUST_MATCH");this.submited=!0,this._authenticationService.resetPasswordNew({newPassword:this.r.password.value}).subscribe(e=>{e&&"success"===e.result?(this._commonHelperService.disTransSuccMsg("PWD_CHANGED_SUCC_PLS_LOGIN"),this.router.navigate(["/auth/login"])):(this.errorFlag=!0,this.errorMessage=e.error?.message||"PWD_RESET_FAILED"),this.submited=!1},e=>{this.errorFlag=!0,this.submited=!1,this._commonHelperService.disTransErrMsg(e?.error?.error?.message||e?.error?.message||e?.message)})}}handleOTPauth(){if(this.r.otp1.value&&this.r.otp2.value&&this.r.otp3.value&&this.r.otp4.value&&this.r.otp5.value&&this.r.otp6.value){const e={cellnumber:this.r.phone.value,forgotpasswordotp:this.r.otp1.value+this.r.otp2.value+this.r.otp3.value+this.r.otp4.value+this.r.otp5.value+this.r.otp6.value};if(e.forgotpasswordotp.length<6)return this.errorFlag=!0,void(this.errorMessage="Please enter a valid OTP");this.submited=!0,this.spinnerSadad.show(),this._authenticationService.resetPasswordVerifyOtp(e).subscribe(e=>{this.spinnerSadad.hide(),e.error?(this.errorFlag=!0,this.errorMessage=e.error?.message?e.error?.message:"Please enter a valid OTP",this._commonHelperService.disTransErrMsg(this.errorMessage)):(this.stage=2,this.otp1?.nativeElement?.blur(),this.changeDetector.detectChanges(),setTimeout(()=>{this.pass_one?.nativeElement?.focus()},0),this.errorFlag=!1,this.errorMessage=""),this.submited=!1},e=>{this._commonHelperService.disTransErrMsg(e?.error?.error?.message||e?.error?.message||e?.message)})}}resetPasswordOTPSend(){if(this._authenticationService.vpnCheckCall.emit("1"),this.spinnerSadad.show(),this.forgetForm.controls.phone.invalid)return this.errorFlag=!0,this.errorMessage="INVALID_PHONE_NUM",void this.spinnerSadad.hide();const e=this.forgetForm.controls.phone.value;e.length>=8&&e.length<=10?(this.submited=!0,this._authenticationService.restPasswordRequest({cellnumber:this.r.phone.value}).subscribe(e=>{if(!this.handleResetPasswordErrorResponse(e))return 1!==e?.roleId&&16!==e?.roleId&&17!==e?.roleId&&14!==e?.roleId?(this.errorFlag=!0,this.submited=!1,e?.error&&e?.error?.message?this._commonHelperService.disTransErrMsg(e?.error?.message):this.errorMessage="PLS_ENTER_CORRECT_MER_PHONE_MUM",void this.spinnerSadad.hide()):(this.errorFlag=!1,this.errorMessage="",this.dummyNo=this.editNumber(this.forgetForm.controls.phone.value),this.stage=1,this.eleLoginEmail?.nativeElement?.blur(),this.changeDetector.detectChanges(),setTimeout(()=>{this.otp1?.nativeElement?.focus()},0),this.changeDetector.detectChanges(),this.startTimer(),this.showContDown=!0,this.submited=!1,void this.spinnerSadad.hide())},e=>{this.handleResetPasswordErrorResponse(e?.error?.error||e?.error||e)||(this.errorFlag=!0,this.submited=!1,this.errorMessage="PLS_ENTER_CORRECT_MER_PHONE_MUM",this.spinnerSadad.hide())})):(this.errorFlag=!0,this.errorMessage="INVALID_PHONE_NUM",this.spinnerSadad.hide())}editNumber(e){let t="X";for(let r=0;r<e.length-3;r++)t+="X";return e.charAt(0)+t+e.charAt(e.length-1)}handleCounterEvent(e){"done"==e.action&&(this.showContDown=!1)}togglePasswordOne(e,t){this[t]=!this[t],e.setAttribute("type",this[t]?"text":"password")}handleResetPasswordErrorResponse(e){return e?.error?499==e?.error?.statusCode?(this._commonHelperService.disTransErrMsg(e?.error?.message),this.submited=!1,this.spinnerSadad.hide(),!0):(this.submited=!1,this.spinnerSadad.hide(),this._commonHelperService.disTransErrMsg(e?.error?.message),!0):e?.blocked?(this.errorFlag=!0,this.errorMessage="USER_DEACTIVATED",this.submited=!1,this.spinnerSadad.hide(),!0):e?.blockedByAdmin?(this.errorFlag=!0,this.errorMessage="ACCESS_PERMI_DENIED_BY_ADMIN",this.submited=!1,this.spinnerSadad.hide(),!0):"basic"==e?.type&&(this.errorFlag=!0,this.errorMessage="DONT_HAVE_SUFF_PERMISSION_TO_ACCESS_MER_PANEL",this.submited=!1,this.spinnerSadad.hide(),!0)}ngOnDestroy(){this.subsc?.unsubscribe()}}return e.\u0275fac=function(t){return new(t||e)(i.Y36(p.qu),i.Y36(Vr.$),i.Y36(i.sBO),i.Y36(a.F0),i.Y36(w.t2),i.Y36(o.sK),i.Y36(I.P),i.Y36(y.$P))},e.\u0275cmp=i.Xpm({type:e,selectors:[["app-forget-password"]],viewQuery:function(e,t){if(1&e&&(i.Gf(Hr,5),i.Gf(jr,5),i.Gf(Jr,5)),2&e){let e;i.iGM(e=i.CRH())&&(t.otp1=e.first),i.iGM(e=i.CRH())&&(t.eleLoginEmail=e.first),i.iGM(e=i.CRH())&&(t.pass_one=e.first)}},decls:22,vars:7,consts:[["bdColor","rgba(0, 0, 0, 0.8)","size","medium","color","#fff","type","ball-circus",3,"fullScreen"],[1,"page-wrapper"],[1,"container-fluid"],[1,"row"],[1,"col-12","p-0"],[1,"login-card"],[1,"login-lang-selection"],[4,"ngIf"],[1,"logo"],["src","assets/images/logo/sadad-login-logo.svg","alt","looginpage",1,"img-fluid","for-light"],[1,"login-main"],[1,"theme-form","text-center",3,"formGroup"],["class","new-psw-box",4,"ngIf"],[1,"language-s-wrapper"],[1,"mt-5","d-flex","align-items-center","justify-content-center","position-relative"],["href","javascript:void(0);",1,""],["src","assets/images/language-selection/en-active.svg","alt","looginpage",1,"img-fluid"],["href","javascript:void(0);",1,"",3,"click"],["src","assets/images/language-selection/ar-inactive.svg","alt","looginpage",1,"img-fluid"],["src","assets/images/language-selection/ar-active.svg","alt","looginpage",1,"img-fluid"],["src","assets/images/language-selection/en-inactive.svg","alt","looginpage",1,"img-fluid"],[1,"text-center","text-white","mb-4"],[1,"form-group","mb-2"],["src","assets/images/login/user.svg","alt","",1,"img-fluid","login-icon"],["type","text","required","","numbersOnly","","formControlName","phone",1,"form-control","no-autofill-bkg",3,"placeholder","keyup.enter"],["eleLoginEmail",""],["class","text-white mb-3 d-block text-left",4,"ngIf"],["type","button",1,"btn","btn-primary","btn-block","login-btn","mt-4",3,"click"],[1,"mt-4","mb-0"],[1,"ml-2","text-white",3,"routerLink"],[1,"text-white","mb-3","d-block","text-left"],[1,"otp"],[1,"text-center","text-white","mb-2","font-weight-bold"],[1,"text-center","text-white"],["dir","ltr",1,"form-group","mb-3"],["type","text","numbersOnly","","autoF
1ocusMaxLength","","maxlength","1","size","1","formControlName","otp1","name","otp1","autocomplete","off",1,"form-control",3,"keypress","keyup"],["otp1",""],["type","text","numbersOnly","","autoFocusMaxLength","","maxlength","1","size","1","formControlName","otp2","name","otp2","autocomplete","nope",1,"form-control",3,"keypress","keyup"],["type","text","numbersOnly","","autoFocusMaxLength","","maxlength","1","size","1","formControlName","otp3","name","otp3","autocomplete","nope",1,"form-control",3,"keypress","keyup"],["type","text","numbersOnly","","autoFocusMaxLength","","maxlength","1","size","1","formControlName","otp4","name","otp4","autocomplete","nope",1,"form-control",3,"keypress","keyup"],["type","text","numbersOnly","","autoFocusMaxLength","","maxlength","1","size","1","formControlName","otp5","name","otp5","autocomplete","nope",1,"form-control",3,"keypress","keyup"],["type","text","numbersOnly","","autoFocusMaxLength","","maxlength","1","size","1","formControlName","otp6","name","otp6","autocomplete","nope",1,"form-control","lastpiner",3,"keypress","keyup"],["class","resend-otp text-white font-weight-bold text-center m-0 cursor mb-0 pointer",3,"click",4,"ngIf"],["class","resend-otp text-center mt-1","style","margin-top: 0.5rem",4,"ngIf"],[1,"ml-2","text-white","pointer",3,"routerLink"],[1,"resend-otp","text-white","font-weight-bold","text-center","m-0","cursor","mb-0","pointer",3,"click"],[1,"resend-otp","text-center","mt-1",2,"margin-top","0.5rem"],["id","time"],[1,"new-psw-box"],[2,"text-align","center"],[1,"text-white","mb-3"],[1,"form-group"],[1,"col-form-label","text-white"],["src","assets/images/login/password.svg","alt","",1,"img-fluid","login-icon"],[1,"rtypr-psw-icon"],[3,"click"],["formControlName","password","type","password","name","login[password]","required","","pattern","(?=.*\\d)(?=.*[a-z])(?=.*[A-Z])((?=.*\\W)|(?=.*_))^[^ ]{8,}",1,"form-control",3,"placeholder"],["pass_one",""],["barLabel","",3,"passwordToVerify","passwordStrength"],["src","assets/images/login/password.svg","alt","",1,"img-fluid","retyp-login-icon","login-icon"],[1,"rtypr-psw-icon","rtypr-psw-icon2"],["formControlName","password2","type","password","pattern","(?=.*\\d)(?=.*[a-z])(?=.*[A-Z])((?=.*\\W)|(?=.*_))^[^ ]{8,}","name","login[password]","required","",1,"form-control",3,"placeholder"],["pass_two",""],["class","new-error-text mb-3 d-block text-left",4,"ngIf"],[1,"form-group","mb-0"],[1,"btn","btn-primary","btn-block","login-btn","mt-4",3,"disabled","click"],["src","assets/images/login/open_eye.svg","alt","",1,"img-fluid","eye-icon"],["src","assets/images/login/closeeye.svg","alt","",1,"img-fluid","eye-icon"],[1,"new-error-text","mb-3","d-block","text-left"]],template:function(e,t){1&e&&(i.TgZ(0,"ngx-spinner",0),i._UZ(1,"app-sadad-loader"),i.qZA(),i._UZ(2,"app-feather-icons"),i.TgZ(3,"div",1),i.TgZ(4,"div",2),i.TgZ(5,"div",3),i.TgZ(6,"div",4),i.TgZ(7,"div",5),i.TgZ(8,"div",6),i.YNc(9,Br,5,0,"ng-container",7),i.YNc(10,Wr,5,0,"ng-container",7),i.qZA(),i.TgZ(11,"div"),i.TgZ(12,"div"),i.TgZ(13,"a",8),i._UZ(14,"img",9),i.qZA(),i.qZA(),i.TgZ(15,"div",10),i.TgZ(16,"form",11),i.YNc(17,Qr,20,17,"div",7),i.YNc(18,Xr,29,22,"div",7),i.YNc(19,sn,36,25,"div",12),i.qZA(),i.qZA(),i.TgZ(20,"div",13),i._UZ(21,"div",14),i.qZA(),i.qZA(),i.qZA(),i.qZA(),i.qZA(),i.qZA(),i.qZA()),2&e&&(i.Q6J("fullScreen",!0),i.xp6(9),i.Q6J("ngIf","en"==t.currLang),i.xp6(1),i.Q6J("ngIf","ar"==t.currLang),i.xp6(6),i.Q6J("formGroup",t.forgetForm),i.xp6(1),i.Q6J("ngIf",0==t.stage),i.xp6(1),i.Q6J("ngIf",1==t.stage),i.xp6(1),i.Q6J("ngIf",2==t.stage))},directives:[w.Ro,E.T,pe.A,A.O5,p._Y,p.JL,p.sg,D.p,p.Fj,p.Q7,p.JJ,p.u,Z.mh,a.yS,k.Lv,R.b,p.nD,p.c5,Yr],pipes:[o.X$],styles:[".login-card[_ngcontent-%COMP%]   .login-main[_ngcontent-%COMP%]   .theme-form[_ngcontent-%COMP%]{position:relative}.login-card[_ngcontent-%COMP%]   .login-main[_ngcontent-%COMP%]   .theme-form[_ngcontent-%COMP%]   .lgn-err[_ngcontent-%COMP%]{position:absolute;width:100%;top:-35px}.login-card[_ngcontent-%COMP%]   .pointer[_ngcontent-%COMP%]{cursor:pointer}.login-card[_ngcontent-%COMP%]   .login-main[_ngcontent-%COMP%]   .theme-form[_ngcontent-%COMP%]   .otp[_ngcontent-%COMP%]   .form-group[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.login-card[_ngcontent-%COMP%]   .login-main[_ngcontent-%COMP%]   .theme-form[_ngcontent-%COMP%]   .otp[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{border-radius:6px;padding:7px;height:43px;text-align:center;margin:5px}.new-psw-box[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]{font-size:16px;font-weight:400;text-align:left;width:100%;padding-left:25px}@media screen and (max-width:576px){.new-psw-box[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]{padding-left:17px;font-size:14px}}.new-psw-box[_ngcontent-%COMP%]   .form-group[_ngcontent-%COMP%]   .login-icon[_ngcontent-%COMP%]{top:56%!important}@media screen and (max-width:576px){.new-psw-box[_ngcontent-%COMP%]   .form-group[_ngcontent-%COMP%]   .login-icon[_ngcontent-%COMP%]{left:12px}}.new-psw-box[_ngcontent-%COMP%]   .form-group[_ngcontent-%COMP%]   .retyp-login-icon[_ngcontent-%COMP%]{top:69%!important}.new-error-text[_ngcontent-%COMP%]{color:#fee999}"]}),e})(),ln=(()=>{class e{constructor(e,t,r){this.router=e,this.authenticationService=t,this._header=r}canActivate(e,t){return this.authenticationService.currentUserValue?this._header.getServicePin().then(e=>401!==e?.error?.statusCode&&499!==e?.error?.statusCode||(this.router.navigate(["/auth/login"],{queryParams:{returnUrl:t.url}}),!1)).catch(e=>{let t=e?.error?.error?.statusCode||e?.statusCode;return 401!==t&&499!==t}):(this.router.navigate(["/auth/login"],{queryParams:{returnUrl:t.url}}),!1)}}return e.\u0275fac=function(t){return new(t||e)(i.LFG(a.F0),i.LFG(y.$h),i.LFG(y.r6))},e.\u0275prov=i.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();const cn=[{path:"",redirectTo:"dashboard/online-payment-default",pathMatch:"full"},{path:"auth/login",component:oe,resolve:{dataList:y.oZ}},{path:"auth/reset-pass",component:on},{path:"",component:hr,children:qr,canActivate:[ln]},{path:"",component:(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Xpm({type:e,selectors:[["app-blank-layout"]],decls:1,vars:0,template:function(e,t){1&e&&i._UZ(0,"router-outlet")},directives:[a.lC],encapsulation:2}),e})(),children:[{path:"c59b/:id",loadChildren:()=>r.e("src_app_components_apps_e-commerce_e-commerce_module_ts").then(r.bind(r,39674)).then(e=>e.ECommerceModule),data:{preload:!0,delay:2e3}}]},{path:"**",redirectTo:"dashboard/online-payment-default"}];let dn=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=i.oAB({type:e}),e.\u0275inj=i.cJS({imports:[[[a.Bz.forRoot(cn,{anchorScrolling:"enabled",scrollPositionRestoration:"enabled",relativeLinkResolution:"legacy",onSameUrlNavigation:"reload"})]],a.Bz]}),e})();var un=r(52320),pn=r(32375),hn=r(58868),gn=r(80260);const mn=function(e){return{display:e}};let fn=(()=>{class e{constructor(e){this.viewScroller=e,this.show=!1}ngOnInit(){}onWindowScroll(){let e=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;this.show=e>600}tapToTop(){this.viewScroller.scrollToPosition([0,0])}}return e.\u0275fac=function(t){return new(t||e)(i.Y36(A.EM))},e.\u0275cmp=i.Xpm({type:e,selectors:[["app-tap-to-top"]],hostBindings:function(e,t){1&e&&i.NdJ("scroll",function(){return t.onWindowScroll()},!1,i.Jf7)},decls:2,vars:4,consts:[[1,"tap-top",3,"ngStyle","click"],[3,"icon"]],template:function(e,t){1&e&&(i.TgZ(0,"div",0),i.NdJ("
1click",function(){return t.tapToTop()}),i._UZ(1,"app-feather-icons",1),i.qZA()),2&e&&(i.Q6J("ngStyle",i.VKq(2,mn,t.show?"block":"none")),i.xp6(1),i.Q6J("icon","chevrons-up"))},directives:[A.PC,pe.A],styles:[""]}),e})();const vn=["vpn_error_alert"],_n=function(){return["/auth/login"]};function Sn(e,t){if(1&e){const e=i.EpF();i.TgZ(0,"div",4),i.TgZ(1,"h6"),i._uU(2),i.ALo(3,"translate"),i.qZA(),i.qZA(),i.TgZ(4,"div",5),i.TgZ(5,"div",6),i.TgZ(6,"div",7),i._UZ(7,"img",8),i.qZA(),i.TgZ(8,"div",9),i.TgZ(9,"p",10),i._uU(10),i.ALo(11,"translate"),i._UZ(12,"br"),i._uU(13),i.ALo(14,"translate"),i.qZA(),i.qZA(),i.qZA(),i.TgZ(15,"div",11),i.TgZ(16,"a",12),i.TgZ(17,"button",13),i.NdJ("click",function(){return i.CHM(e),i.oxw().closeVPNRetry()}),i._uU(18),i.ALo(19,"translate"),i.qZA(),i.qZA(),i.qZA(),i.qZA()}2&e&&(i.xp6(2),i.Oqu(i.lcZ(3,5,"Attention")),i.xp6(8),i.hij(" ",i.lcZ(11,7,"VPN_CONN_DETECTED"),"! "),i.xp6(3),i.hij(" ",i.lcZ(14,9,"VPN_POPUP_ALERT_MSG"),". "),i.xp6(3),i.Q6J("routerLink",i.DdM(13,_n)),i.xp6(2),i.hij(" ",i.lcZ(19,11,"CLOSE_VPN_RETRY")," "))}let bn=(()=>{class e{constructor(e,t,r,n,i,a,s,o,l,c,d,u,p,h){this.platformId=e,this._layoutService=t,this._paymentServiceTypeService=r,this.modalService=i,this._authSer=a,this.router=s,this.cookieService=o,this.spinnerSadad=l,this._commonHelperService=c,this._reportService=d,this._reqDeliveryPollService=u,this._snackbarService=p,this._swUpdate=h,this.testedIPs={},this._distroyed$=new _.x,this.isVPNInitEventCall=!1,this.cachemoduletesting="",this.hasPendingSwUpdate=!1,(0,A.NF)(this.platformId)&&n.addLangs(["en","de","es","fr","pt","cn","ae"]);let g=n.getDefaultLang(),m=localStorage.getItem("selectedLang");["en","ar"].includes(m)||localStorage.setItem("selectedLang",g),localStorage.getItem("selectedLang")?g=localStorage.getItem("selectedLang"):(localStorage.setItem("selectedLang",g),g=n.getDefaultLang()),n.setDefaultLang(g),n.use(g),this._layoutService.selectedLang=g,this.getCookie("testedIPsCk")&&(this.testedIPs=JSON.parse(this.getCookie("testedIPsCk"))),this.callDownReptIdsPolling()}ngOnInit(){this.changeServiceType(),this.initAutoSwUpdateCheck(),this.initGa4RouteTracking(),window.addEventListener("pageshow",e=>{e.persisted?(console.log("This page was restored from the bfcache."),window.location.reload()):console.log("This page was loaded normally.")}),this.startReprtIdsStatusPolling()}changeServiceType(){this.router.events.pipe((0,hn.h)(e=>e instanceof a.OD),(0,f.R)(this._distroyed$)).subscribe(e=>{const t=e?.url||"";t.includes("pos-transactions")||t.includes("pos-reports")||t.includes("pos-settings")||t.includes("pos-default")?"pos"!==this._paymentServiceTypeService?.serviceType&&this._paymentServiceTypeService?.changeServiceType("pos"):(t.includes("online-payment-transactions")||t.includes("online-payment-reports")||t.includes("online-payment-settings")||t.includes("online-payment-default"))&&"online-payment"!==this._paymentServiceTypeService?.serviceType&&this._paymentServiceTypeService?.changeServiceType("online-payment")})}ngAfterViewInit(){this._authSer.vpnEventEmitter.pipe((0,f.R)(this._distroyed$)).subscribe(e=>{this.isVPNInitEventCall||"vpnInitEvent"!=e||(this.isVPNInitEventCall=!0,this.callVPNAPIs("",!0),this.intervalId=setInterval(()=>{this.callVPNAPIs("interval")},1e4),this._authSer.vpnCheckCall.pipe((0,f.R)(this._distroyed$)).subscribe(e=>{e&&("reset-pwd"==e?this.callVPNAPIs(e,!0):this.callVPNAPIs(e))}))}),this.cachemoduletesting="testing",this.router.events.pipe((0,hn.h)(e=>e instanceof a.m2)).subscribe(e=>{(e.url.includes("curDateSel")||e.url.includes("highMenu"))&&setTimeout(()=>{document.querySelectorAll("a.sidebar-item img").forEach(function(e){e?.src&&e?.alt&&(e.src=e.src.replace(e.alt+"-active",e.alt))});const e=document.querySelector(".sidebar-list .active img:not(.d-none)");e?.src&&e?.alt&&(e.src=e.src.replace(e.alt,e.alt+"-active"))},100)})}callVPNAPIs(e="",t=!1){this.testedIPs=this.getCookie("testedIPsCk")?JSON.parse(this.getCookie("testedIPsCk")):{},document.getElementsByClassName("vpnerror-popup-main").length||(!window.location.href.includes("/auth/login")&&!window.location.href.includes("/auth/reset-pass")&&window.location.pathname.replace("/","")||this.modReff||t&&this.spinnerSadad.show("appCompLoader"),this._authSer.getIPAddress().then(r=>{if(r?.ip&&"undefined"!=r?.ip&&"null"!=r?.ip&&"error"!=r?.ip)if(Object.keys(this.testedIPs).includes(r?.ip)){let n=JSON.stringify(r)+"-- VPN found from cookie";"yes"==this.testedIPs[r.ip]?window.location.href.includes("/auth/login")?"otpauth"==e?this._authSer.logout().pipe((0,f.R)(this._distroyed$)).subscribe(e=>{this.router.navigate(["/auth/login"]),this._authSer.writeErrorLog(n,"vpnErrLog").then(e=>{}),setTimeout(()=>{this.openVpnErrorAlert(this.vpnErrorAlert),this.enableLoginForm()},2e3)}):(this.openVpnErrorAlert(this.vpnErrorAlert),this._authSer.writeErrorLog(n,"vpnErrLog").then(e=>{}),this._authSer.isVpnProxy.next(!0),this.enableLoginForm()):this._authSer.logout().pipe((0,f.R)(this._distroyed$)).subscribe(e=>{this.router.navigate(["/auth/login"]),this._authSer.writeErrorLog(n,"vpnErrLog").then(e=>{}),this._authSer.isVpnProxy.next(!0),setTimeout(()=>{this.openVpnErrorAlert(this.vpnErrorAlert),this.enableLoginForm()},2e3)}):(t&&this.spinnerSadad.hide("appCompLoader"),this.enableLoginForm())}else this._authSer.callVPNProxy(r?.ip,!0).then(e=>{let r=e.clientIP;"string"==typeof e.result&&"string"==typeof(e=JSON.parse(e.result))&&(e=JSON.parse(e.replaceAll("'",'"'))),"ok"==e?.
1status?"yes"==e[r]?.proxy||"yes"==e[r]?.vpn?(this.testedIPs[r]="yes",this.setCookie("testedIPsCk",JSON.stringify(this.testedIPs)),this._authSer.logout().pipe((0,f.R)(this._distroyed$)).subscribe(t=>{window.location.href.includes("/auth/login")||this.router.navigate(["/auth/login"]),this._authSer.writeErrorLog(e,"vpnErrLog").then(e=>{}),this._authSer.isVpnProxy.next(!0),setTimeout(()=>{this.openVpnErrorAlert(this.vpnErrorAlert),this.enableLoginForm()},2e3)})):(this.enableLoginForm(),t&&this.spinnerSadad.hide("appCompLoader"),this.testedIPs[r]="no",this.setCookie("testedIPsCk",JSON.stringify(this.testedIPs))):(("error"==e?.status||e?.error)&&this.spinnerSadad.hide("appCompLoader"),this.enableLoginForm())}).catch(e=>{this.spinnerSadad.hide("appCompLoader"),this.enableLoginForm(),this.testedIPs[r.ip]="no",this.setCookie("testedIPsCk",JSON.stringify(this.testedIPs),new Date((new Date).getTime()+9e4))});else"error"!=r?.ip?(this.spinnerSadad.hide("appCompLoader"),this.enableLoginForm(),this._authSer.writeErrorLog(`Invalid ip found from fastify - ${r?.ip}`,"vpnErrLog","api/ip-request").then(e=>{console.log("writeErrorLog entry done successfully!")})):(this.spinnerSadad.hide("appCompLoader"),this.enableLoginForm())}).catch(e=>{this.spinnerSadad.hide("appCompLoader"),this.enableLoginForm()}))}enableLoginForm(){window.location.href.includes("/auth/login")&&this._authSer.vpnEventEmitter.emit("appEnaLoginFormEvent")}openVpnErrorAlert(e){this.spinnerSadad.hide("appCompLoader"),this.modalService.hasOpenModals()||(this.modReff=this.modalService.open(e,{windowClass:"modal-cattwo",keyboard:!1,backdrop:"static",size:"md",centered:!0}),this.modReff.result.then(e=>{},e=>{}))}closeVPNRetry(){this.modalService.dismissAll(),this.spinnerSadad.show("appCompLoader")}setCookie(e,t,r=null){const n=r||(new Date).setDate((new Date).getDate()+1);this.cookieService.set(e,t,n,"/","",!0,"Strict")}getCookie(e){return this.cookieService.get(e)}startReprtIdsStatusPolling(){this.pollingRprtIdsIntervalId=setInterval(()=>{this.callDownReptIdsPolling()},this._reportService.reportToastDisplayTime)}callDownReptIdsPolling(){const e=this._authSer?.loginUserValue?.downRprtIds,t=this._authSer?.loginUserValue?.downStmtIds,r=e&&e?.length,n=t&&t?.length;var i;(r||n)&&this._authSer?.currentUserValue&&this._reportService.getDownReqStatus(e,t).pipe((0,f.R)(this._distroyed$)).subscribe({next:e=>{e?.error?this._commonHelperService.disTransErrMsg(e?.error?.message):(r&&this._reportService.handleReportBulkPoll(e,!0),n&&this._reportService.handleStatementBulkPoll(e,!0))},error:(i=(0,u.Z)(function*(e){}),function(e){return i.apply(this,arguments)})}),this._reqDeliveryPollService.pollIfNeeded()}initAutoSwUpdateCheck(){this._swUpdate?.isEnabled&&(this._swUpdate.available.pipe((0,f.R)(this._distroyed$)).subscribe(()=>{console.log("New app version available via Service Worker. Updating and reloading..."),this._swUpdate.activateUpdate().then(()=>{window.location.reload()})}),this._swUpdate.unrecoverable?.pipe((0,f.R)(this._distroyed$)).subscribe(e=>{console.warn("Service worker in unrecoverable state:",e.reason),window.location.reload()}),(0,h.F)(3e5).pipe((0,f.R)(this._distroyed$)).subscribe(()=>{this._swUpdate.checkForUpdate().catch(e=>console.error("Error checking for SW update:",e))}),"undefined"!=typeof document&&document.addEventListener("visibilitychange",()=>{"visible"===document.visibilityState&&this._swUpdate.checkForUpdate().catch(e=>console.error("Error checking for SW update on tab focus:",e))}),this._swUpdate.checkForUpdate().catch(e=>console.error("Initial SW update check error:",e)))}initGa4RouteTracking(){try{this.router?.events?.pipe((0,hn.h)(e=>e instanceof a.m2),(0,f.R)(this._distroyed$))?.subscribe(e=>{"undefined"!=typeof window&&window?.gtag&&window?.gtag("event","page_view",{page_path:e?.urlAfterRedirects||e?.url,page_title:"undefined"!=typeof document?document?.title:""})})}catch(e){}}ngOnDestroy(){console.log("app destroy...."),this.modalService.dismissAll(),this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null),this._distroyed$.next(null),this._distroyed$.complete(),this.pollingRprtIdsIntervalId&&clearInterval(this.pollingRprtIdsIntervalId)}}return e.\u0275fac=function(t){return new(t||e)(i.Y36(i.Lbi),i.Y36(I.P),i.Y36(dt.Y),i.Y36(o.sK),i.Y36(m.FF),i.Y36(y.$h),i.Y36(a.F0),i.Y36(pn.N),i.Y36(w.t2),i.Y36(y.$P),i.Y36(y.rM),i.Y36(y.kg),i.Y36(_e.o),i.Y36(gn.yO))},e.\u0275cmp=i.Xpm({type:e,selectors:[["app-root"]],viewQuery:function(e,t){if(1&e&&i.Gf(vn,5),2&e){let e;i.iGM(e=i.CRH())&&(t.vpnErrorAlert=e.first)}},features:[i._Bn([m.NM,m.FF])],decls:8,vars:1,consts:[["name","appCompLoader","bdColor","rgba(0, 0, 0, 0.8)","size","medium","color","#fff","type","ball-circus",3,"fullScreen"],[1,"d-none"],["src","assets/images/pos-panel/sidebar/menu-loader-icon.svg"],["vpn_error_alert",""],[1,"cattwo-header"],[1,"modal-body","p-0"],[1,"cate-popup-body"],[1,"exclamation_icon"],["src","assets/images/login/exclamation_mark.svg","alt","exclamation_mark",1,"img-fluid"],[1,"cattwo-content"],[1,"text-center","mb-0"],[1,"withdbutton-group"],[1,"close-vpn-btn",3,"routerLink"],["type","button",1,"btn","outline-btn","cancel",3,"click"]],template:function(e,t){1&e&&(i._UZ(0,"app-tap-to-top"),i._UZ(1,"router-outlet"),i.TgZ(2,"ngx-spinner",0),i._UZ(3,"app-sadad-loader"),i.qZA(),i.TgZ(4,"div",1),i._UZ(5,"img",2),i.qZA(),i.YNc(6,Sn,20,14,"
1ng-template",null,3,i.W1O)),2&e&&(i.xp6(2),i.Q6J("fullScreen",!0))},directives:[fn,a.lC,w.Ro,E.T,a.yS],pipes:[o.X$],styles:[".exclamation_icon[_ngcontent-%COMP%]{height:64px;width:64px;margin:auto auto 30px}.exclamation_icon[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{height:100%;width:100%}  .modal-cattwo .withdbutton-group>a:focus{outline:0}  .modal-cattwo .withdbutton-group .close-vpn-btn .outline-btn{width:210px;max-width:220px}"]}),e})();var yn=r(17444),wn=r(37986),In=r.n(wn),Tn=r(82249),En=r.n(Tn),An=r(32041),$n=r(91681),Cn=r(51816),Pn=r(65595);class xn{constructor(e){this.http=e}getTranslation(e){return this.http.get(`./assets/i18n/${e}.enc?v=${g.N.panelVersion}`,{responseType:"text"}).pipe((0,$n.U)(e=>this.handleDecryptionProcessSadadI18n(e)),(0,Cn.K)(e=>this.handleFallbackErrorSadadI18n(e)))}handleDecryptionProcessSadadI18n(e){try{if(!e)return{};const t=Pn.AES.decrypt(e,g.N.i18nKey||"")?.toString(Pn.enc.Utf8);return t?JSON.parse(t):{}}catch(t){return{}}}handleFallbackErrorSadadI18n(e){return(0,An.of)({})}}function Nn(e){return new xn(e)}function On(e){return new xn(e)}function Un(){const e=s.v$({showDialog:!1});return{handleError(t){if((0,b.xl)?.())return void console.error?.(t);if(function(e){const t=e?.rejection??e?.ngOriginalError??e;if(t instanceof l.UA&&(0===t?.status||503===t?.status||502===t?.status||504===t?.status||429===t?.status))return!0;const r=String(t?.message||e?.message||"");return/:\s*0 Unknown Error/.test(r)||/blocked by CORS policy/i.test(r)||(0,b.Y$)(r)||function(e){let t=e?.status??e?.error?.status??e?.statusCode,r=String(e?.message||e?.error?.message||e?.statusText||"");return 503===t||502===t||504===t||429===t||r?.includes?.("503")||r?.includes?.("429")||r?.includes?.("Service Temporarily Unavailable")}(t)||(0,b.Op)(r)||(0,b.U$)(r)||(0,b.Pw)(t)||(0,b.Pw)(e)}(t))return;let r=t?.rejection??t?.ngOriginalError??t;(r instanceof l.UA||r?.headers&&r?.status)&&(r=new Error(`HTTP ${r?.status} Failure (${r?.url}): ${r?.message||r?.statusText}`)),e.handleError(r)}}}(0,A.qS)(In()),(0,A.qS)(En());let Ln=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=i.oAB({type:e,bootstrap:[bn]}),e.\u0275inj=i.cJS({providers:[{provide:i.qLn,useClass:b.L6},{provide:l.TP,useClass:b.bP,multi:!0},{provide:l.TP,useClass:b.aQ,multi:!0},{provide:l.TP,useClass:b.A8,multi:!0},{provide:i.soG,useValue:"ar"},{provide:i.soG,useValue:"en"},pn.N,ln,gr.n,{provide:i.qLn,useValue:Un()},{provide:s.aN,deps:[a.F0]},{provide:i.ip1,useFactory:()=>()=>{},deps:[s.aN],multi:!0}],imports:[[n.b2,c.PW,d.m,dn,l.JF,ge.A0,yn.ZX,un.Rh.forRoot(),o.aw.forRoot({loader:{provide:o.Zw,useFactory:Nn,deps:[l.eN]},defaultLanguage:g.N.defaultLang}),gn.Wr.register("ngsw-worker.js",{enabled:g.N.production,registrationStrategy:"registerWhenStable:30000"}),w.ef,$.xC]]}),e})()},77818:function(e,t,r){"use strict";r.d(t,{A:function(){return a}});var n=r(94544),i=r(35366);let a=(()=>{class e{constructor(){}ngOnInit(){setTimeout(()=>{n.replace()})}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Xpm({type:e,selectors:[["app-feather-icons"]],inputs:{icon:"icon"},decls:1,vars:1,template:function(e,t){1&e&&i._UZ(0,"i"),2&e&&i.uIk("data-feather",t.icon)},styles:[""]}),e})()},48436:function(e,t,r){"use strict";r.d(t,{T:function(){return i}});var n=r(35366);let i=(()=>{class e{constructor(){}ngOnInit(){}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=n.Xpm({type:e,selectors:[["app-sadad-loader"]],decls:8,vars:0,consts:[["version","1.1","id","L3","xmlns","http://www.w3.org/2000/svg",0,"xmlns","xlink","http://www.w3.org/1999/xlink","x","0px","y","0px","viewBox","0 0 100 100","enable-background","new 0 0 0 0",0,"xml","space","preserve",1,"iu"],["fill","none","stroke","#F2C6CA","stroke-width","4","cx","50","cy","50","r","44",2,"opacity","1"],["fill","#F2C6CA","stroke","#F2C6CA","stroke-width","3","cx","8","cy","54","r","6"],["attributeName","transform","dur","2s","type","rotate","from","0","to","360","repeatCount","indefinite"],["xmlns","http://www.w3.org/2000/svg","width","50","height","50","viewBox","0 0 45.59 55",1,"sadad"],["transform","translate(-1096.134 -842.5)"],["d","M287.773,285.983q-5.992,4.047-5.991,11.82A15.362,15.362,0,0,0,283,304a14.037,14.037,0,0,0,3.117,4.615,19.836,19.836,0,0,0,4.776,3.28,35.133,35.133,0,0,0,5.506,2.266q2.083.641,4.7,1.283l.224-3.692,12.806,8.469-13.736,6.856.27-4.463a31.354,31.354,0,0,1-5.523-.763,29.571,29.571,0,0,1-5.263-1.618q-1.781-.809-4.453-2.347l-5.02,11.98q.162.081,2.065,1.254a41.033,41.033,0,0,0,4.047,2.187,31.621,31.621,0,0,0,6.518,1.943,41.4,41.4,0,0,0,4.451.688h9.348a31.719,31.719,0,0,0,6.32-1.376,18.456,18.456,0,0,0,8.3-5.547,14.141,14.141,0,0,0,3.4-9.592,14.624,14.624,0,0,0-.89-5.143,16.815,16.815,0,0,0-2.105-4.047,13.485,13.485,0,0,0-3.36-3.117,34.439,34.439,0,0,0-3.846-2.308,28.821,28.821,0,0,0-4.331-1.659q-2.632-.809-4.048-1.174c-.642-.165-1.43-.35-2.358-.553l-.125,4.289-13.068-8.058,13.515-7.288-.147,5.061a36.212,36.212,0,0,1,6.8,1.084,21.911,21.911,0,0,1,6.761,2.672l5.181-11.9a39.27,39.27,0,0,0-20.32-5.344q-8.744,0-14.734,4.049","transform","translate(816.372 561.066)","fill","#F2C6CA"],["d","M306.862,336.434h-9.4l-.025,0a42.087,42.087,0,0,1-4.5-.7,32.218,32.218,0,0,1-6.627-1.98,41.729,41.729,0,0,1-4.1-2.214c-1.243-.765-1.925-1.18-2.027-1.233l-.418-.209.182-.431,5.239-12.5.491.283c1.76,1.013,3.244,1.8,4.41,2.325a29.233,29.233,0,0,0,5.169,1.586,31.012,31.012,0,0,0,5.436.75l.5.026-.249,4.1,12.186-6.083-11.361-7.514-.208,3.425-.582-.143c-1.758-.431-3.35-.865-4.732-1.29a35.809,35.809,0,0,1-5.584-2.3,20.417,20.417,0,0,1-4.9-3.365,14.6,14.6,0,0,1-3.23-4.777,15.928,15.928,0,0,1-1.255-6.392c0-5.335,2.09-9.451,6.211-12.234a23.057,23.057,0,0,1,6.826-3.1,30.975,30.975,0,0,1,8.188-1.03,42.625,42.625,0,0,1,10.834,1.353,38.447,38.447,0,0,1,9.741,4.061l.381.225-5.6,12.859-.5-.338a21.55,21.55,0,0,0-6.6-2.6,35.882,35.882,0,0,0-6.7-1.07l-.486-.028.136-4.682-11.991,6.465,11.594,7.149.117-4.026.589.129c.936.205,1.735.393,2.376.558.944.242,2.275.628,4.07,1.18a29.445,29.445,0,0,1,4.407,1.69,35.092,35.
1092,0,0,1,3.9,2.341,14.045,14.045,0,0,1,3.482,3.235,17.385,17.385,0,0,1,2.17,4.167,15.19,15.19,0,0,1,.921,5.318,14.688,14.688,0,0,1-3.522,9.919,19.03,19.03,0,0,1-8.519,5.694,32.366,32.366,0,0,1-6.42,1.4Zm-9.351-1H306.8A31.35,31.35,0,0,0,313,334.083a18.043,18.043,0,0,0,8.077-5.4,13.716,13.716,0,0,0,3.278-9.264,14.193,14.193,0,0,0-.858-4.968,16.394,16.394,0,0,0-2.04-3.926,13.058,13.058,0,0,0-3.237-3,34.1,34.1,0,0,0-3.789-2.274,28.471,28.471,0,0,0-4.254-1.629c-1.78-.547-3.1-.929-4.025-1.167-.491-.126-1.078-.266-1.752-.418l-.133,4.549-14.543-8.967,15.04-8.11-.158,5.444a37.435,37.435,0,0,1,6.405,1.067,24.4,24.4,0,0,1,6.413,2.421l4.77-10.956a39.019,39.019,0,0,0-19.684-5.053c-5.7,0-10.564,1.333-14.454,3.963-3.83,2.586-5.771,6.424-5.771,11.406a14.937,14.937,0,0,0,1.173,5.993,13.605,13.605,0,0,0,3,4.453,19.424,19.424,0,0,0,4.656,3.2,34.809,34.809,0,0,0,5.426,2.234c1.21.373,2.585.752,4.095,1.131l.24-3.957,14.251,9.425-15.285,7.63.292-4.827a31.772,31.772,0,0,1-5.107-.746,30.15,30.15,0,0,1-5.356-1.65c-1.084-.493-2.429-1.194-4-2.088l-4.632,11.055c.291.176.8.485,1.7,1.039a40.726,40.726,0,0,0,4,2.161,31.313,31.313,0,0,0,6.408,1.906A41.079,41.079,0,0,0,297.511,335.434Z","transform","translate(816.372 561.066)","fill","rgba(0,0,0,0)"]],template:function(e,t){1&e&&(n.O4$(),n.TgZ(0,"svg",0),n._UZ(1,"circle",1),n.TgZ(2,"circle",2),n._UZ(3,"animateTransform",3),n.qZA(),n.qZA(),n.TgZ(4,"svg",4),n.TgZ(5,"g",5),n._UZ(6,"path",6),n._UZ(7,"path",7),n.qZA(),n.qZA())},styles:["@import url(https://fonts.googleapis.com/css?family=Comfortaa:400,700,300);svg[_ngcontent-%COMP%]{width:100px;height:100px;margin:20px;display:inline-block}.sadad[_ngcontent-%COMP%]{width:50px;height:50px;margin-left:-95px;position:absolute;top:23px}"]}),e})()},35379:function(e,t,r){"use strict";r.d(t,{SV:function(){return n},kp:function(){return i},E1:function(){return a},PC:function(){return s},cV:function(){return o},NI:function(){return l},RV:function(){return c},LM:function(){return d},_w:function(){return u},HA:function(){return p},iA:function(){return h},M9:function(){return g},kO:function(){return m},Tl:function(){return f},He:function(){return v},nZ:function(){return _},AN:function(){return S}});const n={1:"INVOICE",2:"SUBSCRIPTION",3:"ADD_FUNDS",4:"WITHDRAWAL",5:"WALLET_TRANSFER",6:"STORE_LINK",7:"PG_API",8:"QR_TRANSFER",9:"PG_API",10:"AJAX_TRAX",11:"SUBSCRIPTION",12:"MAWAID",13:"REWARD",14:"REWARD_ADD_FUNDS",15:"PARTNER_REWARD",16:"MANUAL_SERVICE_CHARGE",17:"POS_TRAX",23:"SHIPPING_SERVICE_DELIVERY",24:"SHIPPING_SERVICE_PROMOTION"}
1,i={"Shipping Service - Delivery":"SHIPPING_SERVICE_DELIVERY","Shipping Service - Promotion":"SHIPPING_SERVICE_PROMOTION","Shipping Service - RTS":"SHIP_SERVICE_RTS","SHIPPING DELIVERY":"SHIPPING_SERVICE_DELIVERY","SHIPPING PROMOTION":"SHIPPING_SERVICE_PROMOTION","SHIPPING RTS":"SHIP_SERVICE_RTS"},a={1:"Credit Card",2:"Debit Card",3:"Sadad Wallet"},s={REFUND:"REFUNDED",PENDING:"REQUESTED",REJECTED:"REJECTED"},o={REFUND:"REFUNDED",PENDING:"REQUESTED",REJECTED:"REJECTED"},l={1:"In-progress",2:"Failed",3:"Success",4:"Refunded",5:"Pending",6:"OnHold",7:"Rejected"},c={1:"INPROGRESS",2:"FAILED",3:"SUCCESS",4:"REFUNDED",5:"REQUESTED",6:"ONHOLD",7:"REJECTED"},d=[{value:"VISA",label:"Visa",code:"VISA"},{value:"MASTERCARD",label:"Master Card",code:"MASTERCARD"},{value:"HIMYAN",label:"Himyan",code:"HIMYAN"},{value:"AMERICAN EXPRESS",label:"AMEX",code:"AMEX"},{value:"JCB",label:"JCB",code:"JCB"},{value:"UPI",label:"UPI",code:"UPI"},{value:"SADAD PAY",label:"Sadad Pay",code:"SADAD_PAY"},{value:"APPLE PAY",label:"Apple Pay",code:"APPLE_PAY"},{value:"GOOGLE PAY",label:"Google Pay",code:"GOOGLE_PAY"}],u=[{value:"VISA",label:"Visa",code:"VISA"},{value:"MASTERCARD",label:"Master Card",code:"MASTERCARD"},{value:"HIMYAN",label:"Himyan",code:"HIMYAN"},{value:"AMERICAN EXPRESS",label:"AMEX",code:"AMEX"},{value:"SADAD PAY",label:"Sadad Pay",code:"SADAD_PAY"},{value:"APPLE PAY",label:"Apple Pay",code:"APPLE_PAY"},{value:"GOOGLE PAY",label:"Google Pay",code:"GOOGLE_PAY"}],p=[{value:"VISA",label:"Visa",code:"VISA"},{value:"MASTERCARD",label:"Master Card",code:"MASTERCARD"},{value:"Sadad Pay",label:"Sadad Pay",code:"SADAD_PAY"},{value:"Google Pay",label:"Google Pay",code:"GOOGLE_PAY"},{value:"Apple Pay",label:"Apple Pay",code:"APPLE_PAY"}],h=[{value:"visa",label:"Visa",code:"VISA"},{value:"master",label:"Master Card",code:"MASTERCARD"},{value:"amex",label:"AMEX",code:"AMEX"},{value:"jcb",label:"JCB",code:"JCB"},{value:"upi",label:"UPI",code:"UPI"}],g=[{value:"VISA",label:"Visa",code:"VISA"},{value:"MASTERCARD",label:"Master Card",code:"MASTERCARD"},{value:"naps",label:"NAPS",code:"NAPS"},{value:"HIMYAN",label:"Himyan",code:"HIMYAN"},{value:"TOKEN",label:"Token",code:"Token"},{value:"AMERICAN EXPRESS",label:"AMEX",code:"AMEX"},{value:"JCB",label:"JCB",code:"JCB"},{value:"UPI",label:"UPI",code:"UPI"}],m={VISA:{class:"visa",svg:"visa"},MASTERCARD:{class:"mc",svg:"mastercard"},"AMERICAN EXPRESS":{class:"amex",svg:"amex"},UPI:{class:"samsungpay",svg:"upi"},JCB:{class:"jcb",svg:"jcb"},"APPLE PAY":{class:"applepay",svg:"apple_pay"},"GOOGLE PAY":{class:"gpay",svg:"google-pay"},"SADAD PAY":{class:"sadadpay",svg:"sadadpay"},NAPS:{class:"naps",svg:"naps"},TOKEN:{class:"token",svg:"token"},HIMYAN:{class:"samsungpay",svg:"himyan"}},f=30,v={"op-live-payments":"merchantpanel/online-payment-transactions?tab=tab1&id=VALUE_1&isTest=live"},_=/[A-Za-z0-9 ]/,S=/^[A-Za-z ]*$/},59938:function(e,t,r){"use strict";r.d(t,{go:function(){return n},Xn:function(){return i},P3:function(){return a},o:function(){return o},i7:function(){return l}});const n="Shipping Service - Delivery",i="Shipping Service - Promotion",a="Shipping Service - RTS";function s(e){return encodeURIComponent(e)}function o(e,t={}){const r=[`${e}/merchantpanel/shipping`],n=[`tab=${s(t.tab||"orders")}`];return t.shipId&&n.push(`shipId=${s(t.shipId)}`),t.transactionId&&n.push(`transactionId=${s(t.transactionId)}`),r.push(`?${n.join("&")}`),r.join("")}function l(e,t={}){const r=[`${e}/merchantpanel/online-payment-transactions`],n=[`tab=${s(t.tab||"tab1")}`,`isTest=${s(t.isTest||"live")}`];return t.id&&n.push(`id=${s(t.id)}`),r.push(`?${n.join("&")}`),r.join("")}},28627:function(e,t,r){"use strict";r.d(t,{n:function(){return l}});var n=r(25160),i=r(35366),a=r(54391),s=r(22106),o=r(98109);let l=(()=>{class e{constructor(e,t,r,n){this.router=e,this.permissionService=t,this._authSer=r,this._paymentServiceTypeService=n}canActivate(e,t){let r;const i="/dashboard/pos-default";let a=i,s=this._authSer.currentUserValue;return!!this.isUserAuthenticated(s)&&(r=this.permissionService.hasRoutePermission(e?.url[1]?e.url[1].path:e.url[0].path),a=1!=s?.roleId&&s?.isSubUserPublicAccess?{14:i,16:i,17:i}[s?.roleId]:{14:i,16:"/merchantpanel/invoice",17:"/merchantpanel/online-payment-settings"}[s?.roleId],r||this.router.navigate([a]),"manage-merchants"!=e?.url[1]?.path||this._authSer?.currentUserValue?.
1isallowedtoaddsubmerchant||(console.log("path:",e?.url[1]?.path),this.router.navigate(["/dashboard/pos-default"])),"shipping"==e?.url[1]?.path?!!r&&((0,n.wt)(this._authSer?.currentUserValue?.is_shipping_enabled)?r:(this.router.navigate([(0,n.yR)(this._paymentServiceTypeService.serviceType)]),!1)):r)}isUserAuthenticated(e){return!(!e||!e?.roleId)||(this.router.navigate(["/auth/login"]),!1)}}return e.\u0275fac=function(t){return new(t||e)(i.LFG(a.F0),i.LFG(s.$),i.LFG(o.$h),i.LFG(o.Yx))},e.\u0275prov=i.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},8500:function(e,t,r){"use strict";r.d(t,{P:function(){return i}});var n=r(35366);let i=(()=>{class e{constructor(){this.config={settings:{layout:"Dubai",layout_type:"rtl",layout_version:"light-only",sidebar_type:"default-sidebar"},color:{primary_color:"#7366ff",secondary_color:"#f73164"}},this.selectedLang="",this.setRTLsettings(this.config.settings.layout_type),document.documentElement.style.setProperty("--theme-deafult",this.config.color.primary_color),document.documentElement.style.setProperty("--theme-secondary",this.config.color.secondary_color)}changeLayoutType(e){this.config.settings.layout_type=e,this.setRTLsettings(e)}setRTLsettings(e){document.getElementsByTagName("html")[0].setAttribute("dir",this.config.settings.layout_type)}getLayoutType(){return this.config?.settings?.layout_type||""}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=n.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},54803:function(e,t,r){"use strict";r.d(t,{t:function(){return p}});var n=r(89666),i=r(97425),a=r(65960),s=r(5057),o=r(69568),l=r(529),c=r(35366),d=r(54391),u=r(58858);let p=(()=>{class e{constructor(e,t){this.router=e,this._paymentServiceTypeService=t,this.serviceType=this._paymentServiceTypeService.serviceType,this.unsubscriber=new n.x,this.screenWidth=new i.X(window.innerWidth),this.isProdEnv=l.N.production,this.isLocalEnv=l.N.local,this.search=!1,this.language=!1,this.megaMenu=!1,this.levelMenu=!1,this.megaMenuColapse=window.innerWidth<1199,this.collapseSidebar=window.innerWidth<991,this.horizontal=!(window.innerWidth<991),this.fullScreen=!1,this.MENUITEMS=[{path:`/dashboard/${this.serviceType}-default`,title:"Home",icon:"home",type:"link",serviceType:"common"},{path:`/merchantpanel/${this.serviceType}-transactions`,title:"Transactions",icon:"bell",type:"link",serviceType:"common"},{path:"/merchantpanel/settlement",title:"Settlement",icon:"bell",type:"link",serviceType:"common"},{path:"/merchantpanel/balance-statement",title:"Balance Statement",icon:"bell",type:"link",serviceType:"common"},{path:"/merchantpanel/invoice",title:"Invoices",icon:"bell",type:"link",serviceType:"online-payment"},{path:`/merchantpanel/${this.serviceType}-settings`,title:"Payment Gateway",icon:"bell",type:"link",serviceType:"online-payment"},{path:`/merchantpanel/${this.serviceType}-terminals`,title:"Terminals",icon:"bell",type:"link",serviceType:"pos"},{path:"/merchantpanel/pos-batch-summary",title:"Batch Summary",icon:"bell",type:"link",serviceType:"pos"},{path:`/merchantpanel/${this.serviceType}-reports`,title:"Reports",icon:"bell",type:"link",serviceType:"common"},{path:"/merchantpanel/sadad-services",title:"Sadad Services",icon:"bell",type:"link",serviceType:"online-payment"},{path:`/merchantpanel/${this.serviceType}-settings`,title:"Settings",icon:"bell",type:"link",serviceType:"pos"},{path:"/merchantpanel/shipping",title:"Shipping",icon:"bell",type:"link",serviceType:"online-payment"},{path:"/merchantpanel/manage-users",title:"Manage Users",icon:"bell",type:"link",serviceType:"common"},{path:"/merchantpanel/manage-merchants",title:"Manage Merchants",icon:"bell",type:"link",serviceType:"common"},{path:"/merchantpanel/myaccounts",title:"My Account",icon:"bell",type:"link",serviceType:"common"}],this.items=new i.X(this.MENUITEMS),this.setScreenWidth(window.innerWidth),(0,a.R)(window,"resize").pipe((0,s.b)(1e3),(0,o.R)(this.unsubscriber)).subscribe(e=>{this.setScreenWidth(e.target.innerWidth),e.target.innerWidth<991&&(this.collapseSidebar=!0,this.megaMenu=!1,this.levelMenu=!1),e.target.innerWidth<1199&&(this.megaMenuColapse=!0)}),window.innerWidth<991&&this.router.events.subscribe(e=>{this.collapseSidebar=!0,this.megaMenu=!1,this.levelMenu=!1}),this._paymentServiceTypeService.paymentService.subscribe(e=>{this.serviceType=e,this.items.next(this.getMENUITEMS(this.serviceType))})}ngOnInit(){this.isProdEnv||(this.MENUITEMS=this.MENUITEMS.concat([{path:"/merchantpanel/subscription",title:"Subscriptions",icon:"bell",type:"link",serviceType:"online-payment"},{path:"/merchantpanel/mawaid",title:"Mawaid",icon:"bell",type:"link",serviceType:"online-payment"}]))}ngOnDestroy(){this.unsubscriber.next(null),this.unsubscriber.complete()}setScreenWidth(e){this.screenWidth.next(e)}getMENUITEMS(e){return this.MENUITEMS=[{path:`/dashboard/${e}-default`,title:"Home",icon:"home",type:"link",serviceType:"common"},{path:`/merchantpanel/${this.serviceType}-transactions`,title:"Transactions",icon:"bell",type:"link",serviceType:"common"},{path:"/merchantpanel/settlement",title:"Settlement",icon:"bell",type:"link",serviceType:"common"},{path:"/merchantpanel/balance-statement",title:"Balance Statement",icon:"bell",type:"link",serviceType:"common"},{path:"/merchantpanel/invoice",title:"Invoices",icon:"bell",type:"link",serviceType:"online-payment"},{path:`/merchantpanel/${this.serviceType}-settings`,title:"Payment Gateway",icon:"bell",type:"link",serviceType:"online-payment"},{path:"/merchantpanel/basicstore",title:"Basicstore",icon:"bell",type:"link",serviceType:"online-payment"},{path:`/merchantpanel/${this.serviceType}-terminals`,title:"Terminals",icon:"bell",type:"link",serviceType:"pos"},{path:"/merchantpanel/pos-batch-summary",title:"Batch Summary",icon:"bell",type:"link",serviceType:"pos"},{path:`/merchantpanel/${this.serviceType}-reports`,title:"Reports",icon:"bell",type:"link",serviceType:"common"},{path:`/merchantpanel/${this.serviceType}-settings`,title:"Settings",icon:"bell",type:"link",serviceType:"pos"},{path:"/merchantpanel/shipping",title:"Shipping",icon:"bell",type:"link",serviceType:"online-payment"},{path:"/merchantpanel/sadad-services",title:"Sadad Services",icon:"bell",type:"link",serviceType:"online-payment"},{path:"/merchantpanel/sadadvas",title:"SadadVas",icon:"bell",type:"link",serviceType:"online-payment"},{path:"/merchantpanel/manage-users",title:"Manage Users",icon:"bell",type:"link",serviceType:"common"},{path:"/merchantpanel/manage-merchants",title:"Manage Merchants",icon:"bell",type:"link",serviceType:"common"},{path:"/merchantpanel/myaccounts",title:"My Account",icon:"bell",type:"link",serviceType:"common"}],this.isProdEnv||(this.MENUITEMS.splice(7,0,{path:"/merchantpanel/subscription",title:"Subscriptions",icon:"bell",type:"link",serviceType:"online-payment"}),this.MENUITEMS.splice(8,0,{path:"/merchantpanel/mawaid",title:"Mawaid",icon:"bell",type:"link",serviceType:"online-payment"})),this.MENUITEMS}}return e.\u0275fac=function(t){return new(t||e)(c.LFG(d.F0),c.LFG(u.Y))},e.\u0275prov=c.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},22106:function(e,t,r){"use strict";r.d(t,{$:function(){return s}});var n=r(529),i=r(35366),a=r(98109);let s=(()=>{class e{constructor(e,t){this.authenticationService=e,this._paymentServiceTypeService=t,this.allowedMerchantsOPSdSer=n.N.sdSerUsersMerIds,this.permissions={API_SUB_USER:{"online-payment-default":["VIEW","PAY_COUNT"],"online-payment-transactions":["VIEW","PRODUCT_REFUND","SANDBOX_REFUND","DISPUTE"],"pos-transactions":["VIEW"],"online-payment-settings":["VIEW","EDIT","CONFIGURE_API","CA_LIVE","WEBHOOK"],"show-environment-change":["EDIT"],header:["NOTIFICATIONS"],service_type_change:["EDIT"],"pos-settings":["VIEW"]},API_SUB_USER_PROD_PUB:{"online-payment-default":["VIEW"],"online-payment-transactions":["VIEW","SANDBOX_REFUND"],"online-payment-settings":["VIEW","EDIT","CONFIGURE_API","CA_LIVE","WEBHOOK","CUSTOMIZE_CHECKOUT"],"show-environment-change":["EDIT"],service_type_change:["EDIT"],"pos-settings":["VIEW"]},API_SUB_USER_PROD_PRI:{"online-payment-settings":["VIEW","EDIT","CONFIGURE_API","WEBHOOK"],service_type_change:["EDIT"],"pos-settings":["VIEW"]},API_SUB_USER_DEV_PUB:{"online-payment-default":["VIEW"],"online-payment-transactions":["VIEW","SANDBOX_REFUND"],"online-payment-settings":["VIEW","EDIT","CONFIGURE_API","CA_LIVE","WEBHOOK","CUSTOMIZE_CHECKOUT"],"show-environment-change":["EDIT"],service_type_change:["EDIT"],"pos-settings":["VIEW"]},API_SUB_USER_DEV_PRI:{"online-payment-settings":["VIEW","EDIT","CONFIGURE_API","WEBHOOK"],service_type_change:["EDIT"],"pos-settings":["VIEW"]},API_SUB_USER_PROD:{"pos-transactions":["VIEW"],"online-payment-settings":["VIEW","EDIT","CONFIGURE_API","CA_LIVE","WEBHOOK"],"show-environment-change":["EDIT"],header:["NOTIFICATIONS"],service_type_change:["EDIT"],"pos-settings":["VIEW"]},FINANCE_SUB_USER:{"online-payment-default":["VIEW","EXPORT_DATA","PAY_COUNT"],"pos-default":["VIEW"],invoice:["VIEW"],basicstore:["VIEW","PRODUCT_CREATE","ECOMM_LINK","EXPORT","DELETE_PRODUCT","MARK_AS_DELIVERED","EDIT_PROD","SHOWHIDE_PROD"],settlement:["VIEW","CANCEL_REQUEST","SETT_BATCH"],"online-payment-transactions":["VIEW","PRODUCT_DOWNLOAD","PRODUCT_REFUND","SANDBOX_REFUND","DISPUTE"],"pos-transactions":["VIEW"],subscription:["VIEW","PLAN_CREATE","PLAN_EDIT","PLAN_EXPORT","PLAN_ACT_INACT"],"pos-terminals":["VIEW"],"pos-devices":["VIEW"],"online-payment-reports":["VIEW","DOWNLOAD_HISTORY"],"pos-reports":["VIEW","DOWNLOAD_HISTORY"],service_type_change:["EDIT"],"pos-terminal-maps":["VIEW"],mawaid:["VIEW"],header:["NOTIFICATIONS"],"pos-batch-summary":["full"]},FINANCE_SUB_USER_DEV_PUB:{"online-payment-default":["VIEW","EXPORT_DATA","PAY_COUNT","LIVE_TRAX_BAL"],"pos-default":["VIEW","LIVE_TRAX_BAL"],invoice:["VIEW"],basicstore:["VIEW","PRODUCT_CREATE","ECOMM_LINK","EXPORT","DELETE_PRODUCT","MARK_AS_DELIVERED","EDIT_PROD","SHOWHIDE_PROD"],settlement:["VIEW","CANCEL_REQUEST","WITHDRAW_FUNDS","SETT_BATCH"],"online-payment-transactions":["VIEW","PRODUCT_DOWNLOAD","PRODUCT_REFUND","DISPUTE"],"pos-transactions":["VIEW","POS_RENTAL"],subscription:["VIEW","PLAN_EXPORT"],"pos-terminals":["VIEW"],"pos-devices":["VIEW"],"online-payment-reports":["VIEW","DOWNLOAD_HISTORY","SUB_USR_FILTER"],"pos-reports":["VIEW","DOWNLOAD_HISTORY","SUB_USR_FILTER"],myaccounts:["VIEW","UPLOAD_BUSINESS_DOC","BANK_DETAIL","BI_MSGS","BI_INFO","BI_PROFILE_PIC","BI_QRCODE"],service_type_change:["EDIT"],"pos-terminal-maps":["VIEW"],header:["NOTIFICATIONS"],"balance-statement":["VIEW"],"pos-batch-summary":["full"]},FINANCE_SUB_USER_DEV_PRI:{"online-payment-default":["VIEW","EXPORT_DATA","PAY_COUNT","LIVE_TRAX_BAL"],"online-payment-transactions":["VIEW","PRODUCT_DOWNLOAD","DISPUTE"],settlement:["VIEW","SETT_BATCH"],"balance-statement":["VIEW"],invoice:["VIEW"],basicstore:["VIEW","PRODUCT_CREATE","ECOMM_LINK","EXPORT","DELETE_PRODUCT","MARK_AS_DELIVERED","EDIT_PROD","SHOWHIDE_PROD"],subscription:["VIEW","PLAN_EXPORT"],"online-payment-reports":["VIEW","DOWNLOAD_HISTORY"],myaccounts:["BI_QRCODE"],service_type_change:["EDIT"],"pos-default":["VIEW","LIVE_TRAX_BAL"],"pos-terminal-maps":["VIEW"],"pos-transactions":["VIEW","POS_RENTAL"],"pos-terminals":["VIEW"],"pos-devices":["VIEW"],"pos-reports":["VIEW","DOWNLOAD_HISTORY"],"pos-batch-summary":["full"],header:["NOTIFICATIONS"]},FINANCE_SUB_USER_PROD_PUB:{"online-payment-default":["VIEW","EXPORT_DATA","PAY_COUNT","LIVE_TRAX_BAL"],"pos-default":["VIEW","LIVE_TRAX_BAL"],invoice:["VIEW"],basicstore:["VIEW","PRODUCT_CREATE","ECOMM_LINK","EXPORT","DELETE_PRODUCT","MARK_AS_DELIVERED","EDIT_PROD","SHOWHIDE_PROD"],settlement:["VIEW","CANCEL_REQUEST","WITHDRAW_FUNDS","SETT_BATCH"],"online-payment-transactions":["VIEW","PRODUCT_DOWNLOAD","PRODUCT_REFUND","DISPUTE"],"pos-transactions":["VIEW","POS_RENTAL"],subscription:["VIEW","PLAN_EXPORT"],"pos-terminals":["VIEW"],"pos-devices":["VIEW"],"online-payment-reports":["VIEW","DOWNLOAD_HISTORY","SUB_USR_FILTER"],"pos-reports":["VIEW","DOWNLOAD_HISTORY","SUB_USR_FILTER"],myaccounts:["VIEW","UPLOAD_BUSINESS_DOC","BANK_DETAIL","BI_MSGS","BI_INFO","BI_PROFILE_PIC","BI_QRCODE"],service_type_change:["EDIT"],"pos-terminal-maps":["VIEW"],header:["NOTIFICATIONS"],"balance-statement":["VIEW"],"pos-batch-summary":["full"]},FINANCE_SUB_USER_PROD_PRI:{"online-payment-default":["VIEW","EXPORT_DATA","PAY_COUNT","LIVE_TRAX_BAL"],"online-payment-transactions":["VIEW","PRODUCT_DOWNLOAD","DISPUTE"],settlement:["VIEW","SETT_BATCH"],"balance-statement":["VIEW"],invoice:["VIEW"],basicstore:["VIEW","PRODUCT_CREATE","ECOMM_LINK","EXPORT","DELETE_PRODUCT","MARK_AS_DELIVERED","EDIT_PROD","SHOWHIDE_PROD"],subscription:["VIEW","PLAN_EXPORT"],"online-payment-reports":["VIEW","DOWNLOAD_HISTORY"],myaccounts:["BI_QRCODE"],service_type_change:["EDIT"],"pos-default":["VIEW","LIVE_TRAX_BAL"],"pos-terminal-maps":["VIEW"],"pos-transactions":["VIEW","POS_RENTAL"],"pos-terminals":["VIEW"],"pos-devices":["VIEW"],"pos-reports":["VIEW","DOWNLOAD_HISTORY"],"pos-batch-summary":["full"],header:["NOTIFICATIONS"]},SALES_SUB_USER:{"online-payment-default":["VIEW","PAY_COUNT"],"pos-default":["VIEW"],invoice:["VIEW"],basicstore:["VIEW","PRODUCT_CREATE","ECOMM_LINK","EXPORT"],"online-payment-transactions":["VIEW","DISPUTE","SANDBOX_REFUND"],"pos-transactions":["VIEW"],subscription:["VIEW","PLAN_CREATE","PLAN_EDIT","PLAN_EXPORT","PLAN_ACT_INACT"],"pos-terminals":["VIEW"],"pos-devices":["VIEW"],service_type_change:["EDIT"],"pos-terminal-maps":["VIEW"],mawaid:["VIEW"],header:["NOTIFICATIONS"]},SALES_SUB_USER_DEV_PUB:{"online-payment-default":["VIEW"],invoice:["VIEW"],basicstore:["VIEW","PRODUCT_CREATE","ECOMM_LINK","EXPORT","DELETE_PRODUCT","EDIT_PROD","SHOWHIDE_PROD","MARK_AS_DELIVERED"],"online-payment-transactions":["VIEW","PRODUCT_DOWNLOAD"],"pos-transactions":["VIEW"],subscription:["VIEW","PLAN_CREATE","PLAN_EDIT","PLAN_DELETE","PLAN_EXPORT","PLAN_ACT_INACT"],"pos-terminal-maps":["VIEW"],myaccounts:["BI_QRCODE"]},SALES_SUB_USER_DEV_PRI:{"online-payment-default":["VIEW"],invoice:["VIEW"],basicstore:["VIEW","PRODUCT_CREATE","ECOMM_LINK","EXPORT","DELETE_PRODUCT","EDIT_PROD","SHOWHIDE_PROD","MARK_AS_DELIVERED"],"online-payment-transactions":["VIEW","PRODUCT_DOWNLOAD"],"pos-transactions":["VIEW"],subscription:["VIEW","PLAN_CREATE","PLAN_EDIT","PLAN_DELETE","PLAN_EXPORT","PLAN_ACT_INACT"],"pos-terminal-maps":["VIEW"],myaccounts:["BI_QRCODE"]},SALES_SUB_USER_PROD_PUB:{"online-payment-default":["VIEW"],invoice:["VIEW"],basicstore:["VIEW","PRODUCT_CREATE","ECOMM_LINK","EXPORT","DELETE_PRODUCT","EDIT_PROD","SHOWHIDE_PROD","MARK_AS_DELIVERED"],"online-payment-transactions":["VIEW","PRODUCT_DOWNLOAD"],"pos-transactions":["VIEW"],subscription:["VIEW","PLAN_CREATE","PLAN_EDIT","PLAN_DELETE","PLAN_EXPORT","PLAN_ACT_INACT"],"pos-terminal-maps":["VIEW"],myaccounts:["BI_QRCODE"]},SALES_SUB_USER_PROD_PRI:{"online-payment-default":["VIEW"],invoice:["VIEW"],basicstore:["VIEW","PRODUCT_CREATE","ECOMM_LINK","EXPORT","DELETE_PRODUCT","EDIT_PROD","SHOWHIDE_PROD","MARK_AS_DELIVERED"],"online-payment-transactions":["VIEW","PRODUCT_DOWNLOAD"],"pos-transactions":["VIEW"],subscription:["VIEW","PLAN_CREATE","PLAN_EDIT","PLAN_DELETE","PLAN_EXPORT","PLAN_ACT_INACT"],"pos-terminal-maps":["VIEW"],myaccounts:["BI_QRCODE"]},SALES_SUB_USER_PROD:{"pos-default":["VIEW"],invoice:["VIEW"],basicstore:["VIEW","PRODUCT_CREATE","ECOMM_LINK","EXPORT"],"pos-transactions":["VIEW"],subscription:["VIEW","PLAN_CREATE","PLAN_EDIT","PLAN_EXPORT","PLAN_ACT_INACT"],"pos-terminals":["VIEW"],"pos-devices":["VIEW"],service_type_change:["EDIT"],"pos-terminal-maps":["VIEW"],mawaid:["VIEW"],header:["NOTIFICATIONS"]},MERCHANT_ADMIN_USER:{"online-payment-default":["VIEW","EXPORT_DATA","COMPARE_SALES","PAY_
1COUNT","LIVE_TRAX_BAL"],"pos-default":["VIEW","LIVE_TRAX_BAL"],invoice:["VIEW","DELETE","SHIPPING"],basicstore:["VIEW","PRODUCT_CREATE","ECOMM_LINK","EXPORT","DELETE_PRODUCT","MARK_AS_DELIVERED","EDIT_PROD","SHOWHIDE_PROD","SHIPPING"],settlement:["VIEW","CANCEL_REQUEST","WITHDRAW_FUNDS","SETT_BATCH"],"balance-statement":["VIEW"],"online-payment-transactions":["VIEW","PRODUCT_DOWNLOAD","PRODUCT_REFUND","SANDBOX_REFUND","SANDBOX_TRAX","DISPUTE"],"pos-transactions":["VIEW","POS_RENTAL"],subscription:["VIEW","PLAN_CREATE","PLAN_EDIT","PLAN_DELETE","PLAN_EXPORT","PLAN_ACT_INACT"],"pos-terminals":["VIEW","EDIT"],"pos-devices":["VIEW"],"online-payment-reports":["VIEW","DOWNLOAD_HISTORY","SEND_EMAIL","SUB_USR_FILTER"],"pos-reports":["VIEW","DOWNLOAD_HISTORY","SEND_EMAIL","SUB_USR_FILTER"],myaccounts:["VIEW","EDIT","UPLOAD_BUSINESS_DOC","BANK_DETAIL","BI_MSGS","BI_INFO","BI_PROFILE_PIC","BI_QRCODE"],"pos-settings":["VIEW"],"online-payment-settings":["VIEW","EDIT","CONFIGURE_API","CA_LIVE","NOTIFICATIONS","WEBHOOK","CUSTOMIZE_CHECKOUT","MANAGE_USERS","ADVANCED_SETTINGS"],"manage-users":["VIEW","EDIT"],"manage-merchants":["VIEW","EDIT"],service_type_change:["EDIT"],"show-environment-change":["EDIT"],"pos-terminal-maps":["VIEW"],mawaid:["VIEW"],header:["TRANSFER","NOTIFICATIONS","MANAGE_MERCHANTS"],"show-transfer":["EDIT"],"subuser-filter":["full"],"pos-batch-summary":["full"],login:["DOC_EXPIRY_PROMPT"],"sadad-services":["full"],shipping:["full"]}},this._paymentServiceTypeService.paymentService.subscribe(e=>{this.serviceType=e})}hasRoutePermission(e){const t=this.getValidUserRoleId();if(!t)return!1;const r=this.getUser(t);return!!(r&&this.permissions?.[r]&&e in this.permissions[r])}setSdSerPermiUserWise(){const e=this.authenticationService?.currentUserValue?.SadadId;e&&this.allowedMerchantsOPSdSer.includes(e)?this.permissions.MERCHANT_ADMIN_USER["sadad-services"]=["full"]:delete this.permissions.MERCHANT_ADMIN_USER["sadad-services"]}hasMenuPermission(e){const t=this.getValidUserRoleId();if(!t)return!1;const r=this.getUser(t);return!!(r&&this.permissions?.[r]&&this.getPath(e)in this.permissions[r])}hasFuncPermission(e,t){const r=this.getValidUserRoleId();if(!r)return!1;const n=this.getUser(r);return!!(n&&this.permissions?.[n]&&this.permissions[n][e]&&this.permissions[n][e].includes(t))}getUser(e){if(n.N.production)if(1!=this.authenticationService.currentUserValue.roleId&&this.authenticationService.currentUserValue.isSubUserPublicAccess)switch(e){case 1:return"MERCHANT_ADMIN_USER";case 17:return"API_SUB_USER_PROD_PUB";case 16:return"FINANCE_SUB_USER_PROD_PUB";case 14:return"SALES_SUB_USER_PROD_PUB";default:return 0}else switch(e){case 1:return"MERCHANT_ADMIN_USER";case 17:return"API_SUB_USER_PROD_PRI";case 16:return"FINANCE_SUB_USER_PROD_PRI";case 14:return"SALES_SUB_USER_PROD_PRI";default:return 0}else if(1!=this.authenticationService.currentUserValue.roleId&&this.authenticationService.currentUserValue.isSubUserPublicAccess)switch(e){case 1:return"MERCHANT_ADMIN_USER";case 17:return"API_SUB_USER_DEV_PUB";case 16:return"FINANCE_SUB_USER_DEV_PUB";case 14:return"SALES_SUB_USER_DEV_PUB";default:return 0}else switch(e){case 1:return"MERCHANT_ADMIN_USER";case 17:return"API_SUB_USER_DEV_PRI";case 16:return"FINANCE_SUB_USER_DEV_PRI";case 14:return"SALES_SUB_USER_DEV_PRI";default:return 0}}getAllowedServiceType(e){if(1!=this.authenticationService.currentUserValue.roleId&&this.authenticationService.currentUserValue.isSubUserPublicAccess)switch(e){case 1:return"pos";case 17:return"online-payment";case 16:return"pos";case 14:default:return"online-payment"}else switch(e){case 1:return"pos";case 17:case 16:case 14:default:return"online-payment"}}getPath(e){switch(e){case"Home":return"pos"==this.serviceType?"pos-default":"online-payment-default";case"Transactions":return"pos"==this.serviceType?"pos-transactions":"online-payment-transactions";case"Settlement":return"settlement";case"Balance Statement":return"balance-statement";case"Invoices":return"invoice";case"Sadad Services":return"sadad-services";case"Manage Users":return"manage-users";case"Manage Merchants":return"manage-merchants";case"Basicstore":return"basicstore";case"Subscriptions":return"subscription";case"Terminals":return"pos-terminals";case"Devices":return"pos-devices";case"Reports":return"pos"==this.serviceType?"pos-reports":"online-payment-reports";case"Settings":return"pos-settings";case"Payment Gateway":return"online-payment-settings";case"SadadVas":return"sadadvas";case"My Account":return"myaccounts";case"Mawaid":return"mawaid";case"Batch Summary":return"pos-batch-summary";case"Shipping":return"shipping"}}getMenu(e){switch(e){case"online-payment-default":case"pos-default":return"Home";case"online-payment-transactions":case"pos-transactions":return"Transactions";
1case"settlement":return"Settlement";case"balance-statement":return"Balance Statement";case"invoice":return"Invoices";case"sadad-services":return"Sadad Services";case"manage-users":return"Manage Users";case"manage-merchants":return"Manage Merchants";case"basicstore":return"Basicstore";case"subscription":return"Subscriptions";case"pos-terminals":return"Terminals";case"pos-devices":return"Devices";case"online-payment-reports":case"pos-reports":return"Reports";case"pos-settings":return"Settings";case"online-payment-settings":return"Payment Gateway";case"sadadvas":return"SadadVas";case"myaccounts":return"My Account";case"mawaid":return"Mawaid";case"pos-batch-summary":return"Batch Summary";case"shipping":return"Shipping"}}hasSubMenuPermission(e,t){const r=this.getPath(e),n=this.getValidUserRoleId();if(!n)return!1;const i=this.getUser(n);return!!(i&&this.permissions?.[i]&&this.permissions[i][r]&&this.permissions[i][r].includes(t))}getValidUserRoleId(){return this.authenticationService?.currentUserValue?.roleId}}return e.\u0275fac=function(t){return new(t||e)(i.LFG(a.$h),i.LFG(a.Yx))},e.\u0275prov=i.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},34115:function(e,t,r){"use strict";r.d(t,{o:function(){return o}});var n=r(97425),i=r(35366),a=r(17444),s=r(8500);let o=(()=>{class e{constructor(e,t){this._snackBar=e,this._layoutService=t,this.showNotificationSubject=ne
1w n.X({isVisible:!1,isApiCall:!1}),this.showNotification$=this.showNotificationSubject.asObservable()}error(e,t="OK",r=3e3,n=""){const i=this.buildSnackBarConfig(["snackbar-error"],r,n);return this._snackBar.open(e,t,i)}success(e,t="OK",r=3e3,n="",i=""){const a=this.buildSnackBarConfig(["snackbar-success"],r,i),s=this._snackBar.open(e,t,a);return"reportDown"!=n&&"balStatementDown"!=n||(s.onAction().subscribe(()=>{console.log("success ok alert called....",t),this.triggerNotificationVisibility(!0,!1)}),s.afterDismissed().subscribe(e=>{console.log("Snackbar dismissed, reason:",e),!1===e.dismissedByAction?(console.log("Snackbar closed automatically"),this.triggerNotificationVisibility(!1,!0)):console.log("Snackbar closed by action")})),s}triggerNotificationVisibility(e,t){this.showNotificationSubject.next({isVisible:e,isApiCall:t})}dismissAllAlert(){this._snackBar.dismiss(),this.triggerNotificationVisibility(!1,!1)}buildSnackBarConfig(e,t,r=""){const n=[...e],i={panelClass:n,duration:t,verticalPosition:"top"};r&&(i.horizontalPosition=r,n.push("position-offset-snackbar"));const a=this._layoutService.getLayoutType();return a&&(i.direction=a),i}}return e.\u0275fac=function(t){return new(t||e)(i.LFG(a.ux),i.LFG(s.P))},e.\u0275prov=i.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},75425:function(e,t,r){"use strict";r.d(t,{J:function(){return w},m:function(){return I}});var n=r(61116),i=r(54391),a=r(31041),s=r(15940),o=r(60649),l=r(8500),c=r(54803),d=r(34115),u=r(14391),p=r(77972),h=r(15119),g=r(72142),m=r(77579),f=r(81073),v=r(71178),_=r(90066),S=r(29937),b=r(98109),y=r(35366);function w(e){return{apiKey:e?.currentUserValue?.clientConfig?.googleMapAPIKey||""}}let I=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=y.oAB({type:e}),e.\u0275inj=y.cJS({providers:[c.t,l.P,d.o,{provide:_.hF,useFactory:w,deps:[b.$h]}],imports:[[n.ez,i.Bz,a.u5,a.UX,s.IJ,o.aw,u.A0,p.J7,h.X,f.QG,m.Q,g.K.withConfig({debug:!0}),_.su.forRoot(),v.ef,S.ZQ.forRoot()],s.IJ,a.u5,a.UX,o.aw,f.QG,p.J7,h.X,m.Q,g.K,u.A0,v.ef]}),e})()},529:function(e,t,r){"use strict";r.d(t,{N:function(){return n}});const n={production:!0,local:!1,apiUrl:"https://fastjs.sadad.qa/api-v5/",apiUrl_bk:"https://fastpy-v7-v2.sadad.qa/api-v7/",apiUrlv6:"https://fastpy.sadad.qa/api-v6/",apiUrlv6_bk:"https://fastpy-v7-v2.sadad.qa/api-v7/",apiUrlv7:"https://fastpy-v7-v2.sadad.qa/api-v7/",fastifyDomain:"https://secureapi-v2.sadad.qa",fastifyUrl:"https://secureapi-v2.sadad.qa/api/data-request",encryptUrl:"https://secureapi-v2.sadad.qa/api/qr-request",encryptUrlNormal:"https://secureapi-v2.sadad.qa/api/encrypt-request",sandboxFastifyUrl:"https://secureapi-v2.sadad.qa/api/sandbox-request",logFastifyUrl:"https://secureapi-v2.sadad.qa/api/log-request",locale:"IST",phone_length:10,phone_match_digit:[3,5,7,6,9,8],copy_url:"https://d.sadad.qa/",sandboxUrl:"https://sandbox3.sadadqa.com/sandbox_api-v1/",staticAPIToken:"S4hbkbXbxTsdwfn00oEw3TdrHUe6VmIeZ941vRczNGSzbI6u3EdpmCWDA0uF",emommerceUrl:"https://e.sadad.qa/",downloadUrl:"https://e.sadad.qa/",defaultLang:"en",i18nKey:"8fDdsw#535xEDDDD!pQ7@vN2$zR6",ocrAPIUrl:"https://gapi.sadadqatar.com/",createMerchantAllowedCountries:"QA",googleMapAPIURL:"https://maps.googleapis.com/maps/api/geocode",fastifyUrlv6:"https://secureapi-v2.sadad.qa/api/data-request",envType:"prod",sdSerUsersMerIds:["9288463","7782182","6647430","6361998"],panelVersion:"5.7.5",sentryDsn:"https://[email protected]/56"}},75809:function(e,t,r){"use strict";var n=r(99624),i=r(35366),a=r(23298),s=r(47620),o=r(38582),l=r(67136),c=r(529);c.N.sentryDsn&&!(0,l.xl)()&&a.S1({dsn:c.N.sentryDsn,environment:c.N.envType||"development",integrations:[new s.gE({tracingOrigins:["localhost",/^https:\/\/.*\.sadadqa\.com/,/^https:\/\/.*\.sadad\.qa/],routingInstrumentation:a.$q})],tracesSampleRate:1,ignoreErrors:[/Http failure response for .*:\s*0 Unknown Error/,/blocked by CORS policy/i,/NetworkError/i,/Load failed/i,/Failed to fetch/i,/importScripts/i,/postEvent/i,/Method not found/i,/disableWebkitEnterFullscreen/i,/Java object is gone/i,/sendDataToNative/i,/sendBeforeUnloadMessage/i,/iabjs:\/\//i,/Extension context invalidated/i,/chrome-extension:\/\//i,/moz-extension:\/\//i,/safari-extension:\/\//i,/A network error \(such as timeout, interrupted connection or unreachable host\)/i,/interrupted connection/i,/unreachable host/i,/network-request-failed/i,/ERR_INTERNET_DISCONNECTED/i,/ERR_CONNECTION_/i,/NotReadableError/i,/The I\/O read operation failed/i,/Cannot set properties of undefined \(setting 'isVerifiedUser'\)/i],beforeSend:(e,t)=>(0,l.xl)()||function(e,t){const r=t?.originalException;if(r&&"object"==typeof r&&0===r?.status)return!0;const n=e?.exception?.values?.[0]?.value||e?.message||"";return/:\s*0 Unknown Error/i.test(n)||/blocked by CORS policy/i.test(n)||(0,l.Y$)(n)||(0,l._m)(n)||(0,l.mI)(n)||(0,l.Op)(n)||(0,l.U$)(n)||(0,l.VA)(r)||(0,l.VA)(n)}(e,t)?null:e}),c.N.production&&(0,i.G48)(),n.q6().bootstrapModule(o.b9).catch(e=>console.error(e))},46700:function(e,t,r){var n={"./af":90776,"./af.js":90776,"./ar":67634,"./ar-dz":42758,"./ar-dz.js":42758,"./ar-kw":64980,"./ar-kw.js":64980,"./ar-ly":9602,"./ar-ly.js":9602,"./ar-ma":52500,"./ar-ma.js":52500,"./ar-sa":36909,"./ar-sa.js":36909,"./ar-tn":92735,"./ar-tn.js":92735,"./ar.js":67634,"./az":27798,"./az.js":27798,"./be":29949,"./be.js":29949,"./bg":44590,"./bg.js":44590,"./bm":15938,"./bm.js":15938,"./bn":60595,"./bn-bd":51942,"./bn-bd.js":51942,"./bn.js":60595,"./bo":4756,"./bo.js":4756,"./br":17277,"./br.js":17277,"./bs":4166,"./bs.js":4166,"./ca":13943,"./ca.js":13943,"./cs":53474,"./cs.js":53474,"./cv":92218,"./cv.js":92218,"./cy":21061,"./cy.js":21061,"./da":82743,"./da.js":82743,"./de":31899,"./de-at":28580,"./de-at.js":28580,"./de-ch":3264,"./de-ch.js":3264,"./de.js":31899,"./dv":98784,"./dv.js":98784,"./el":54654,"./el.js":54654,"./en-au":56277,"./en-au.js":56277,"./en-ca":76896,"./en-ca.js":76896,"./en-gb":71609,"./en-gb.js":71609,"./en-ie":24557,"./en-ie.js":24557,"./en-il":15836,"./en-il.js":15836,"./en-in":30262,"./en-in.js":30262,"./en-nz":43586,"./en-nz.js":43586,"./en-sg":38965,"./en-sg.js":38965,"./eo":62777,"./eo.js":62777,"./es":63357,"./es-do":3128,"./es-do.js":3128,"./es-mx":69179,"./es-mx.js":69179,"./es-us":83256,"./es-us.js":83256,"./es.js":63357,"./et":2654,"./et.js":2654,"./eu":57287,"./eu.js":57287,"./fa":73875,"./fa.js":73875,"./fi":73431,"./fi.js":73431,"./fil":39606,"./fil.js":39606,"./fo":41781,"./fo.js":41781,"./fr":61717,"./fr-ca":11539,"./fr-ca.js":11539,"./fr-ch":19847,"./fr-ch.js":19847,"./fr.js":61717,"./fy":42250,"./fy.js":42250,"./ga":47665,"./ga.js":47665,"./gd":85214,"./gd.js":85214,"./gl":36154,"./gl.js":36154,"./gom-deva":68222,"./gom-deva.js":68222,"./gom-latn":18518,"./gom-latn.js":18518,"./gu":89221,"./gu.js":89221,"./he":64743,"./he.js":64743,"./hi":77339,"./hi.js":77339,"./hr":13224,"./hr.js":13224,"./hu":50856,"./hu.js":50856,"./hy-am":76855,"./hy-am.js":76855,"./id":2190,"./id.js":2190,"./is":53887,"./is.js":53887,"./it":19270,"./it-ch":85890,"./it-ch.js":85890,"./it.js":19270,"./ja":46595,"./ja.js":46595,"./jv":93081,"./jv.js":93081,"./ka":27477,"./ka.js":27477,"./kk":13978,"./kk.js":13978,"./km":19205,"./km.js":19205,"./kn":60025,"./kn.js":60025,"./ko":50427,"./ko.js":50427,"./ku":79089,"./ku.js":79089,"./ky":19314,"./ky.js":19314,"./lb":23136,"./lb.js":23136,"./lo":29115,"./lo.js":29115,"./lt":27087,"./lt.js":27087,"./lv":95683,"./lv.js":95683,"./me":79454,"./me.js":79454,"./mi":35507,"./mi.js":35507,"./mk":98466,"./mk.js":98466,"./ml":82933,"./ml.js":82933,"./mn":19477,"./mn.js":19477,"./mr":43597,"./mr.js":43597,"./ms":85529,"./ms-my":99965,"./ms-my.js":99965,"./ms.js":85529,"./mt":30259,"./mt.js":30259,"./my":88061,"./my.js":88061,"./nb":72618,"./nb.js":72618,"./ne":28452,"./ne.js":28452,"./nl":1885,"./nl-be":60413,"./nl-be.js":60413,"./nl.js":1885,"./nn":45107,"./nn.js":45107,"./oc-lnc":71763,"./oc-lnc.js":71763,"./pa-in":702,"./pa-in.js":702,"./pl":31711,"./pl.js":31711,"./pt":10594,"./pt-br":58238,"./pt-br.js":58238,"./pt.js":10594,"./ro":74681,"./ro.js":74681,"./ru":16201,"./ru.js":16201,"./sd":62912,"./sd.js":62912,"./se":6002,"./se.js":6002,"./si":67942,"./si.js":67942,"./sk":25577,"./sk.js":25577,"./sl":41775,"./sl.js":41775,"./sq":36823,"./sq.js":36823,"./sr":59038,"./sr-cyrl":83848,"./sr-cyrl.js":83848,"./sr.js":59038,"./ss":96173,"./ss.js":96173,"./sv":5788,"./sv.js":5788,"./sw":76882,"./sw.js":76882,"./ta":82678,"./ta.js":82678,"./te":82797,"./te.js":82797,"./tet":52447,"./tet.js":52447,"./tg":31335,"./tg.js":31335,"./th":68667,"./th.js":68667,"./tk":9222,"./tk.js":9222,"./tl-ph":99914,"./tl-ph.js":99914,"./tlh":71389,"./tlh.js":71389,"./tr":3578,"./tr.js":3578,"./tzl":36969,"./tzl.js":36969,"./tzm":76509,"./tzm-latn":690,"./tzm-latn.js":690,"./tzm.js":76509,"./ug-cn":20055,"./ug-cn.js":20055,"./uk":22452,"./uk.js":22452,"./ur":91151,"./ur.js":91151,"./uz":31555,"./uz-latn":46547,"./uz-latn.js":46547,"./uz.js":31555,"./vi":16541,"./vi.js":16541,"./x-pseudo":42401,"./x-pseudo.js":42401,"./yo":2341,"./yo.js":2341,"./zh-cn":80619,"./zh-cn.js":80619,"./zh-hk":67058,"./zh-hk.js":67058,"./zh-mo":89141,"./zh-mo.js":89141,"./zh-tw":22782,"./zh-tw.js":22782};function i(e){var t=a(e);return r(t)}function a(e){if(!r.o(n,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return n[e]}i.keys=function(){return Object.keys(n)},i.resolve=a,e.exports=i,i.id=46700},14601:function(){},32767:function(){},28251:function(){},57677:function(){},1543:function(){},87324:function(){}},function(e){"use strict";e.O(0,["vendor"],function(){return e(e.s=75809)}),e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.