var WV=WV||{};(function(n){function u(){if("webVitals"in _w&&(!("isInit"in n)||!n.isInit)&&typeof sj_evt!="undefined"&&typeof sj_be!="undefined"){var t=_w.webVitals;n.onFCP=i(t.onFCP);n.onLCP=i(t.onLCP);n.onCLS=i(t.onCLS);n.onINP=i(t.onINP);n.metrics={};n.isMetricsFrozen=!1;n.isLogged=!1;sj_evt.bind("onP1",f,!0);sj_evt.bind("ajax.requestSent",h)}}function f(){if(!n.isInit){n.onFCP(e);n.onLCP(t);n.onCLS(t);n.onINP(t);n.isInit=!0}}function e(i){n.isFCPCalledOnce||(n.isFCPCalledOnce=!0,sb_st(function(){sj_be(_d,"visibilitychange",o);sj_be(_w,"pagehide",s)},0),t(i))}function o(){"visibilityState"in _d&&_d.visibilityState==="hidden"&&r()}function s(){r()}function h(){r();l()}function c(){n.isLogged=!1;n.metrics={}}function t(t){var r=!1,i;switch(t.name){case"FCP":i=parseInt(t.value);break;case"LCP":i=parseInt(t.value);break;case"INP":i=parseInt(t.value);(_G===null||_G===void 0?void 0:_G.INPLoggingDisabled)===!0&&(r=!0);break;case"CLS":i=parseFloat(t.value).toFixed(4)}r||n.metrics[t.name]==i||(n.metrics[t.name]=i,n.isLogged=!1)}function r(){!n.isLogged&&!n.isMetricsFrozen&&Object.keys(n.metrics).length>0&&(a(),c())}function l(){n.isMetricsFrozen=!0}function a(){var t='{ "T": "CI.WebVitals", "FID": "CI", "Name": "WV", "P":'+JSON.stringify(n.metrics)+"}";v(t);n.isLogged=!0}function v(t){var u,i;if("Log2"in _w&&Log2.LogEvent&&JSON)Log2.LogEvent("ClientInst",JSON.parse(t),null,null,null,null,null,null);else{var r=y(),f="<E><T>Event.ClientInst<\/T><IG>"+_G.IG+"<\/IG><TS>"+r+"<\/TS><D><![CDATA[["+t.replace("]\]>","]]]\]><![CDATA[>")+"]]\]><\/D><\/E>",e="<ClientInstRequest><Events>"+f+"<\/Events><STS>"+r+"<\/STS><\/ClientInstRequest>";_G.DirectLogPost!=null?_w.directLogPost("Event.ClientInst",_G.IG,r,"["+t.replace("]\]>","]]]\]><![CDATA[>")+"]",2):(u="/fd/ls/lsp.aspx",i=sj_gx(),i.open("POST",u,!0),i.setRequestHeader("Content-Type","text/xml"),i.send(e))}}function y(){var n=_w.performance&&performance.now&&performance.timing;return n?p(performance.now()+performance.timing.navigationStart):(new Date).getTime()}function p(n){return n<-1?-1:parseInt(n)}function i(n){return typeof n=="function"?n:function(){}}u()})(WV)