"use strict";(self.webpackChunkserver_side_rendering=self.webpackChunkserver_side_rendering||[]).push([[7425],{67425:(e,t,r)=>{r.r(t),r.d(t,{EUMModule:()=>Q});var i=r(73753),n=r(44382),a=r(59288),s=r(14805),o=r(57826);let c=(()=>{class e{constructor(e,t,r,i){this.siteConfigService=e,this.analyticsService=t,this.firstTimeVisitorService=r,this.router=i}calculatePageTransactionName(e){let t=this.removeTerritory(e);return t=this.removeParamsButOverlay(t),t=this.processIfHomePage(t),t=this.replaceSlashes(t),t}removeTerritory(e){const t=this.siteConfigService.getSiteConfig().urlPrefix;return t?e.replace(`/${t}`,""):e}removeParamsButOverlay(e){const t=e.split("?")[0].split("(")[0],r=this.router.parseUrl(e).queryParams.overlay;return r?`${t}?overlay=${r}`:t}processIfHomePage(e){return"/"!==e?e.replace("/",""):"home/"+(this.firstTimeVisitorService.isFirstTime?"ftv":"logged"===this.analyticsService.getPageLoginStatus()?"logged":"unlogged")}replaceSlashes(e){return e.split("/").join(":")}}return e.ɵfac=function(t){return new(t||e)(o["ɵɵinject"](n.r),o["ɵɵinject"](a.y),o["ɵɵinject"](s.HV),o["ɵɵinject"](i.Router))},e.ɵprov=o["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})();var u=r(31264),g=r(89428);let l=(()=>{class e{constructor(e,t,r,i){this.siteConfigService=e,this.cookieStorageService=t,this.windowService=r,this.loadNameCalculator=i}buildConfig(e){return{serviceName:this.getServiceName(),serverUrl:this.getServerUrl(),capturePageLoad:this.getCapturePageLoad(),sendPageLoadTransaction:this.getSendPageLoadTransaction(),pageLoadTransactionName:this.getPageLoadTransactionName(e),queueLimit:this.getQueueLimit(),flushInterval:this.getFlushInterval(),transactionDurationThreshold:this.getTransactionDurationThreshold(),distributedTracingOrigins:this.getDistributedTracingOrigins(),logLevel:this.getLogLevel(),transactionSampleRate:+(this.getSamplingRate()/100).toFixed(2),disableInstrumentations:this.getDisableInstrumentations()}}getServiceName(){const{brandCode:e,territory:t}=this.siteConfigService.getSiteConfig();return[e,t].filter((e=>!!e)).join(" ")+" Site"}getServerUrl(){return this.siteConfigService.getSiteConfig().apmUri}getSamplingRate(){return this.siteConfigService.getSiteConfig().apmSamplingRate}getPageLoadTransactionName(e){return this.loadNameCalculator.calculatePageTransactionName(e)}getLogLevel(){return this.cookieStorageService.get("apmRumLogLevel")||"error"}getQueueLimit(){return 1}getFlushInterval(){return 100}getTransactionDurationThreshold(){return 9e5}getDistributedTracingOrigins(){return[`${this.windowService.window().location.protocol}//${this.siteConfigService.getSiteConfigProp("serviceDomain")}`]}getSendPageLoadTransaction(){return!0}getCapturePageLoad(){return!0}getDisableInstrumentations(){return this.siteConfigService.getSiteConfig().apmDisableInstrumentations}}return e.ɵfac=function(t){return new(t||e)(o["ɵɵinject"](n.r),o["ɵɵinject"](g.G),o["ɵɵinject"](u.u),o["ɵɵinject"](c))},e.ɵprov=o["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})();var h=r(8239),v=r(42998),d=r(22057);let m=(()=>{class e{constructor(e,t){this.router=e,this.nameCalculator=t,this.subscribeToRouterEvents=()=>{this.router.events.pipe((0,v.filter)((e=>e instanceof i.NavigationStart))).subscribe((e=>this.navigationStartedUrl=e.url))},this.subscribeToRouterEvents()}build(e){return{"page-load":{marks:{renderTime:e}},"route-change":{calculateName:()=>this.nameCalculator.calculatePageTransactionName(this.navigationStartedUrl)}}}}return e.ɵfac=function(t){return new(t||e)(o["ɵɵinject"](i.Router),o["ɵɵinject"](c))},e.ɵprov=o["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})();var p=r(18517);let f=(()=>{class e{constructor(e,t,r,i,n,a){this.siteConfigService=e,this.languageService=t,this.analyticsService=r,this.channelTypeService=i,this.apmAgentConfigurationService=n,this.extendedItemsBuilder=a}buildApiConfig(e,t){var r=this;return(0,h.Z)((function*(){return{apmAgentConfig:r.apmAgentConfigurationService.buildConfig(e),globalLabels:yield r.getGlobalLabels(),transactionExtendedItems:r.extendedItemsBuilder.build(t)}}))()}getGlobalLabels(){var e=this;return(0,h.Z)((function*(){const{brandCode:t,territory:r}=e.siteConfigService.getSiteConfig();return{brand_code:t,territory:r,language:yield e.getCurrentLanguage(),login_status:e.analyticsService.getPageLoginStatus(),channel_type:e.getChannelType()}}))()}getLoginStatus(){return this.analyticsService.getPageLoginStatus()}getCurrentLanguage(){return this.languageService.getLanguage().pipe((0,v.first)()).toPromise()}getChannelType(){return this.channelTypeService.getChannelType()}}return e.ɵfac=function(t){return new(t||e)(o["ɵɵinject"](n.r),o["ɵɵinject"](d.T),o["ɵɵinject"](a.y),o["ɵɵinject"](p.x),o["ɵɵinject"](l),o["ɵɵinject"](m))},e.ɵprov=o["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})();var S=r(64762),b=r(32711),y=r(5923),C=r(82802),T=r(56727),L=r(69125),j=r(76162);const I="schedule",E="invoke",P="clear",R=x("xhrTask"),X=x("xhrListener"),k=x("xhrScheduled"),w=x("xhrIgnore"),N=x("xhrSync"),_=x("xhrURL"),H=x("xhrMethod");function M(e,t,r){let i=e;for(;i&&!i.hasOwnProperty(t);)i=Object.getPrototypeOf(i);!i&&e[t]&&(i=e);const n=x(t);let a;if(i&&!(a=i[n])&&(a=i[n]=i[t],!(s=i&&Object.getOwnPropertyDescriptor(i,t))||!1!==s.writable&&("function"!=typeof s.get||void 0!==s.set))){const e=r(a,n,t);i[t]=function(){return e(this,arguments)},o=a,i[t][x("OriginalDelegate")]=o}var s,o;return a}function x(e){return"__apm_symbol__"+e}var F=r(9714);const D="apmMonitoringServices";let O=(()=>{class e{constructor(e,t,r){this.iFrameXHRService=e,this.siteConfigService=t,this.cookieStorageService=r,this.isXhrInstrumentationEnabled()&&this.iFrameXHRService.getIFrameXMLHttpRequest()&&this.initXhrInstrumentation()}initXhrInstrumentation(){this.patchXMLHttpRequest((function(e,t){j.tu.serviceFactory.getService("TransactionService").getCurrentTransaction()&&j.tu.serviceFactory.getService("PerformanceMonitoring").getXHRSub(e,t)}))}isXhrInstrumentationEnabled(){return this.isXhrInstrumentationFeatureEnable()||this.isXhrInstrumentationCookieEnabled()}isXhrInstrumentationFeatureEnable(){return this.siteConfigService.getSiteConfigProp(D)}isXhrInstrumentationCookieEnabled(){return"true"===this.cookieStorageService.get(D)}patchXMLHttpRequest(e){const t=this.iFrameXHRService.getIFrameXMLHttpRequest().prototype;let r=t.addEventListener,i=t.removeEventListener;if(!r){const e=window.XMLHttpRequestEventTarget;if(e){const t=e.prototype;r=t.addEventListener,i=t.removeEventListener}}const n="readystatechange";function a(t){t.state=E,t.ignore||e(E,t)}const s=M(t,"open",(()=>function(e,t){return e[H]=t[0],e[_]=t[1],e[N]=!1===t[2],s.apply(e,t)})),o=M(t,"send",(()=>function(t,s){const c={source:"xmlhttprequest",state:"",type:"macroTask",ignore:t[w],data:{target:t,method:t[H],sync:t[N],url:t[_],args:s,aborted:!1}};let u=function(t){XMLHttpRequest[k]=!1,t.state=I,t.ignore||e(I,t);const s=t.data,c=s.target,u=c[X];r||(r=c.addEventListener,i=c.removeEventListener),u&&i.call(c,n,u);const g=c[X]=()=>{c.readyState===c.DONE&&!s.aborted&&XMLHttpRequest[k]&&t.state===I&&a(t)};r.call(c,n,g),c[R]||(c[R]=t);let l=o.apply(c,s.args);return XMLHttpRequest[k]=!0,l}(c);return t[N]&&a(c),u})),c=M(t,"abort",(()=>function(t,r){const i=t[R];if(i&&"string"==typeof i.type){if(i.data&&i.data.aborted)return;!function(t){t.state=P,e(P,t),t.data.aborted=!0}(i)}return c.apply(t,r)}))}}return e.ɵfac=function(t){return new(t||e)(o["ɵɵinject"](F.P),o["ɵɵinject"](n.r),o["ɵɵinject"](g.G))},e.ɵprov=o["ɵɵdefineInjectable"]({token:e,factory:e.ɵfac}),e})(),U=class{constructor(e,t,r,i,n){var a=this;this.pageEventsService=e,this.customEventsService=t,this.eumConfigurationService=r,this.appState=i,this.eumXhrInstrumentationService=n,this.pageEventsService.getEvents(1).pipe((0,v.take)(1)).subscribe(function(){var e=(0,h.Z)((function*(e){const t=yield a.eumConfigurationService.buildApiConfig(e.renderedURL,e.duration);yield L.Q.init(t),a.reactToGlobalChanges()}));return function(t){return e.apply(this,arguments)}}()),this.handlePageNavigationEvents(),this.handleCustomEvents()}handlePageNavigationEvents(){this.pageEventsService.getEvents(2).subscribe((e=>{const t=L.Q.createTransaction(e.eventName,"page-navigation").setTimestamp(e.timestamp).setStartTimestamp(e.startTimestamp).end(e.endTimestamp);L.Q.submitTransaction(t)}))}handleCustomEvents(){this.customEventsService.getEvents().subscribe((e=>{const t=L.Q.createTransaction(e.eventName,"custom").addLabels(e.labels?e.labels:{}).setTimestamp(e.timestamp).setStartTimestamp(e.startTimestamp).end(e.endTimestamp);L.Q.submitTransaction(t)}))}reactToGlobalChanges(){var e=this;return(0,h.Z)((function*(){(0,b.U5)((()=>e.appState.loginState),(()=>{const t=e.eumConfigurationService.getLoginStatus();L.Q.addLabels({login_status:t})}))}))()}};var q;U.ɵfac=function(e){return new(e||U)(o["ɵɵinject"](C.z),o["ɵɵinject"](y.V),o["ɵɵinject"](f),o["ɵɵinject"](T.X),o["ɵɵinject"](O))},U.ɵprov=o["ɵɵdefineInjectable"]({token:U,factory:U.ɵfac}),U=(0,S.__decorate)([(q="EUMService",function(e){e.serviceId=q}),(0,S.__metadata)("design:paramtypes",[C.z,y.V,f,T.X,O])],U);let Q=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=o["ɵɵdefineNgModule"]({type:e}),e.ɵinj=o["ɵɵdefineInjector"]({providers:[c,l,f,m,U,O]}),e})()}}]);