@kubesense/kubesense-browser-rum 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bundle/kubesense-rum.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var t,e,n={75(t,e,n){function r(t,e){for(let n=t.length-1;n>=0;n-=1){const r=t[n];if(e(r,n,t))return r}}function o(t){return Object.values(t)}function i(t){return Object.entries(t)}n.d(e,{KQ:()=>o,Uk:()=>r,WP:()=>i})},166(t,e,n){function r(t){return null===t?"null":Array.isArray(t)?"array":typeof t}n.d(e,{P:()=>r})},187(t,e,n){function r(t){return{...t}}function o(t,e){return Object.keys(t).some(n=>t[n]===e)}function i(t){return 0===Object.keys(t).length}function s(t,e){const n={};for(const r of Object.keys(t))n[r]=e(t[r]);return n}n.d(e,{LG:()=>s,RI:()=>i,Rj:()=>o,yG:()=>r})},188(t,e,n){n.d(e,{Aq:()=>s,R9:()=>r,q7:()=>c,sr:()=>a});var r,o=n(187);!function(t){t.TRACK_INTAKE_REQUESTS="track_intake_requests",t.USE_TREE_WALKER_FOR_ACTION_NAME="use_tree_walker_for_action_name",t.FEATURE_OPERATION_VITAL="feature_operation_vital",t.SHORT_SESSION_INVESTIGATION="short_session_investigation",t.AVOID_FETCH_KEEPALIVE="avoid_fetch_keepalive"}(r||(r={}));const i=new Set;function s(t){Array.isArray(t)&&t.filter(t=>(0,o.Rj)(r,t)).forEach(t=>{i.add(t)})}function a(t){return i.has(t)}function c(){return i}},197(t,e,n){n.d(e,{l:()=>s,q:()=>i});var r=n(315),o=n(586);function i(t,e,n,r,o){return s(t,e,[n],r,o)}function s(t,e,n,i,{once:s,capture:a,passive:c}={}){const u=(0,r.dm)(e=>{(e.isTrusted||e.__kubesenseIsTrusted||t.allowUntrustedEvents)&&(s&&p(),i(e))}),l=c?{capture:a,passive:c}:a,d=window.EventTarget&&e instanceof EventTarget?window.EventTarget.prototype:e,f=(0,o.W)(d,"addEventListener");function p(){const t=(0,o.W)(d,"removeEventListener");n.forEach(n=>t.call(e,n,u,l))}return n.forEach(t=>f.call(e,t,u,l)),{stop:p}}},215(t,e,n){n.d(e,{X2:()=>V,eT:()=>pr,o:()=>fr,$m:()=>ur,NT:()=>lr,Wd:()=>dr,bb:()=>O,wP:()=>Ci,wI:()=>Fn,W3:()=>Xe,PJ:()=>gr,dT:()=>yr,$4:()=>Wn,Gn:()=>Io,zL:()=>Oo,dx:()=>Ai,rf:()=>Sr,pB:()=>Lo,wR:()=>jn,g1:()=>Po,XS:()=>Bn,p_:()=>qn,$5:()=>Te,AB:()=>Ke,jR:()=>vr,ei:()=>Cn,ap:()=>_r,Ie:()=>br,rJ:()=>Ti});var r=n(275);const o={GRANTED:"granted",NOT_GRANTED:"not-granted"};var i=n(801),s=n(749),a=n(511),c=n(433),u=n(945),l=n(314);function d(){return new r.cP(t=>{const e=(e,n)=>{const r=(0,u.As)({stackTrace:n,originalError:e,startClocks:(0,s.M8)(),nonErrorPrefix:"Uncaught",source:l.g.SOURCE,handling:"unhandled"});t.notify(r)},{stop:n}=(r=e,(0,i.H)((0,c.VZ)(),"onerror",({parameters:[t,e,n,o,i]})=>{let s;(0,u.bJ)(i)||(s=(0,a.h)(t,e,n,o)),r(null!=i?i:t,s)}));var r;const{stop:o}=function(t){return(0,i.H)((0,c.VZ)(),"onunhandledrejection",({parameters:[e]})=>{t(e.reason||"Empty reason")})}(e);return()=>{n(),o()}})}var f=n(452);function p(){let t="",e=0;return{isAsync:!1,get isEmpty(){return!t},write(n,r){const o=(0,f.WW)(n);e+=o,t+=n,r&&r(o)},finish(t){t(this.finishSync())},finishSync(){const n={output:t,outputBytesCount:e,rawBytesCount:e,pendingData:""};return t="",e=0,n},estimateEncodedBytesCount(t){return t.length}}}var m=n(315),h=n(534),g=n(322),v=n(995),y=n(468),b=n(520);function _(t,e,n,r){return(0,m.dm)((...o)=>(r&&(0,h.Q6)({feature:r}),t()[e][n](...o)))}const w="userContext",k="globalContext",S="accountContext",E="getContext",x="setContext",T="setContextProperty",A="removeContextProperty",C="clearContext";var R=n(875);function I(t,e){e.silentMultipleInit||R.Vy.error(t+" is already initialized.")}const O={ACTION:"action",ERROR:"error",LONG_TASK:"long_task",VIEW:"view",RESOURCE:"resource",VITAL:"vital"},N="initial_load",P="route_change",L="bf_cache",V={CLICK:"click",CUSTOM:"custom"},M="error_click",U="dead_click",$="duration";var D=n(188);function z(t){return t?(parseInt(t,10)^16*Math.random()>>parseInt(t,10)/4).toString(16):"10000000-1000-4000-8000-100000000000".replace(/[018]/g,z)}const B=/([\w-]+)\s*=\s*([^;]+)/g;function q(t,e){for(B.lastIndex=0;;){const n=B.exec(t);if(!n)break;if(n[1]===e)return n[2]}}function j(t,e,n=""){const r=t.charCodeAt(e-1),o=r>=55296&&r<=56319?e+1:e;return t.length<=o?t:`${t.slice(0,o)}${n}`}function F({vitalsByName:t,vitalsByReference:e},n,r={}){const o={name:n,startClocks:(0,s.M8)(),...r},i={__kubesense_vital_reference:!0};return t.set(n,o),e.set(i,o),i}function W(t,{vitalsByName:e,vitalsByReference:n},r,o={}){const i="string"==typeof r?e.get(r):n.get(r);i&&(t(function(t,e,n,r){var o;return{name:t.name,type:$,startClocks:e,duration:(0,s.vk)(e.timeStamp,r.timeStamp),context:(0,v.kg)(t.context,n.context),description:null!==(o=n.description)&&void 0!==o?o:t.description}}(i,i.startClocks,o,(0,s.M8)())),"string"==typeof r?e.delete(r):n.delete(r))}function G(t){const{startClocks:e,type:n,name:r,description:o,context:i}=t,a={id:z(),type:n,name:r,description:o,...n===$?{duration:(0,s.Zj)(t.duration)}:{step_type:t.stepType,operation_key:t.operationKey,failure_reason:t.failureReason}};return{rawRumEvent:{date:e.timeStamp,vital:a,type:O.VITAL,context:i},startTime:e.relative,duration:n===$?t.duration:void 0,domainContext:{}}}function Z(t,e,n){if(t)for(const r of t){const t=r[e];t&&t(n)}}function H(t,e){const n=t.indexOf(e);n>=0&&t.splice(n,1)}function K(t){return Array.isArray(t)&&t.length>0}var J=n(197),Y=n(187);const Q=[];function X(t,e,n,r){const o=function(t,e){return`_kubesense_c_${t}_${e}`}(n,r);Q.push((0,J.q)(t,window,"storage",({key:t})=>{o===t&&e.setContext(s())})),e.changeObservable.subscribe(function(){localStorage.setItem(o,JSON.stringify(e.getContext()))});const i=(0,v.kg)(s(),e.getContext());function s(){const t=localStorage.getItem(o);return t?JSON.parse(t):{}}(0,Y.RI)(i)||e.setContext(i)}var tt=n(166);function et(t,e,n){const r={...t};for(const[t,{required:o,type:i}]of Object.entries(e))"string"!==i||nt(r[t])||(r[t]=r[t]+""),o&&nt(r[t])&&R.Vy.warn(`The property ${t} of ${n} is required; context will not be sent to the intake.`);return r}function nt(t){return null==t||""===t}function rt(t="",{propertiesConfig:e={}}={}){let n={};const o=new r.cP,i={getContext:()=>(0,v.Go)(n),setContext(r){!function(t){const e="object"===(0,tt.P)(t);return e||R.Vy.error("Unsupported context:",t),e}(r)?i.clearContext():n=(0,b.a)(et(r,e,t)),o.notify()},setContextProperty(r,i){n=(0,b.a)(et({...n,[r]:i},e,t)),o.notify()},removeContextProperty(r){delete n[r],et(n,e,t),o.notify()},clearContext(){n={},o.notify()},changeObservable:o};return i}function ot(){return rt("global context")}var it=n(339),st=n(636);const at=1/0,ct=s.iW;let ut=null;const lt=new Set;function dt({expireDelay:t,maxEntries:e}){let n=[];ut||(ut=(0,st.yb)(()=>{lt.forEach(t=>t())},ct));const r=()=>{const e=(0,s.$S)()-t;for(;n.length>0&&n[n.length-1].endTime<e;)n.pop()};return lt.add(r),{add(t,r){const o={value:t,startTime:r,endTime:at,remove(){H(n,o)},close(t){o.endTime=t}};return e&&n.length>=e&&n.pop(),n.unshift(o),o},find(t=1/0,e={returnInactive:!1}){for(const r of n)if(r.startTime<=t){if(e.returnInactive||t<=r.endTime)return r.value;break}},closeActive(t){const e=n[0];e&&e.endTime===at&&e.close(t)},findAll(t=1/0,e=0){const r=(0,s.Gw)(t,e);return n.filter(e=>e.startTime<=r&&t<=e.endTime).map(t=>t.value)},reset(){n=[]},stop(){lt.delete(r),0===lt.size&&ut&&((0,st.vG)(ut),ut=null)}}}const ft=4*s.MA,pt=15*s.iW,mt=s.$H,ht="cookie",gt="local-storage";function vt(t){return"_kubesense_session_user_"+t}function yt(t,e){try{const n=vt(t);e?localStorage.setItem(n,e):localStorage.removeItem(n)}catch(t){}}function bt(){return rt("user",{propertiesConfig:{id:{type:"string"},name:{type:"string"},email:{type:"string"}}})}function _t(){return rt("account",{propertiesConfig:{id:{type:"string",required:!0},name:{type:"string"}}})}var wt=n(362),kt=n(474),St=n(877),Et=n(295);let xt;const Tt=[];function At({responseBodyAction:t}={}){return t&&Tt.push(t),xt||(xt=new r.cP(t=>{if(!c.J2.fetch)return;const{stop:e}=(0,i.H)(c.J2,"fetch",e=>function({parameters:t,onPostCall:e,handlingStack:n},r){const[o,i]=t;let a=i&&i.method;void 0===a&&o instanceof Request&&(a=o.method);const c=void 0!==a?(a+"").toUpperCase():"GET",u=o instanceof Request?o.url:(0,St.l2)(o+""),l={state:"start",init:i,input:o,method:c,startClocks:(0,s.M8)(),url:u,handlingStack:n};r.notify(l),t[0]=l.input,t[1]=l.init,e(t=>{(async function(t,e,n){var r,o;const i=n;let s;i.state="resolve";try{s=await e}catch(e){return i.status=0,i.isAborted=(null===(o=null===(r=i.init)||void 0===r?void 0:r.signal)||void 0===o?void 0:o.aborted)||e instanceof DOMException&&e.code===DOMException.ABORT_ERR,i.error=e,void t.notify(i)}i.response=s,i.status=s.status,i.responseType=s.type,i.isAborted=!1;const a=Tt.reduce((t,e)=>Math.max(t,e(i)),0);if(0!==a){const t=(0,Et.i)(s);if(t&&t.body)try{const e=await async function(t,e){const n=t.getReader(),r=[];for(;;){const t=await n.read();if(t.done)break;e.collectStreamBody&&r.push(t.value)}return n.cancel().catch(kt.l),e.collectStreamBody?(0,f.wh)(r):void 0}(t.body,{collectStreamBody:2===a});i.responseBody=e&&(new TextDecoder).decode(e)}catch(t){}}t.notify(i)})(r,t,l).catch(m.Dx)})}(e,t),{computeHandlingStack:!0});return e})),xt}function Ct(t,e,n=0,r){const o=new Date;o.setTime(o.getTime()+n);const i="expires="+o.toUTCString(),s=r&&r.crossSite?"none":"strict",a=r&&r.domain?";domain="+r.domain:"",c=r&&r.secure?";secure":"",u=r&&r.partitioned?";partitioned":"";document.cookie=`${t}=${e};${i};path=/;samesite=${s}${a}${c}${u}`}function Rt(t){return q(document.cookie,t)}let It,Ot;function Nt(t){return It||(It=function(t){const e=new Map;for(B.lastIndex=0;;){const n=B.exec(t);if(!n)break;e.set(n[1],n[2])}return e}(document.cookie)),It.get(t)}function Pt(t,e){Ct(t,"",0,e)}function Lt(t=location.hostname,e=document.referrer){if(void 0===Ot){const n=function(t,e){try{return t||(0,St.c$)(e).hostname}catch(t){}}(t,e);if(n){const t="dd_site_test_"+z(),e="test",r=n.split(".");let o=r.pop();for(;r.length&&!Rt(t);)o=`${r.pop()}.${o}`,Ct(t,e,s.OY,{domain:o});Pt(t,{domain:o}),Ot=o}}return Ot}function Vt(){return!(c.Wq||!c.J2._KUBESENSE_SYNTHETICS_INJECTS_RUM&&!Nt("kubesense-synthetics-injects-rum"))}function Mt(){const t=window._KUBESENSE_SYNTHETICS_PUBLIC_ID||Nt("kubesense-synthetics-public-id");return"string"==typeof t?t:void 0}function Ut(){const t=window._KUBESENSE_SYNTHETICS_RESULT_ID||Nt("kubesense-synthetics-result-id");return"string"==typeof t?t:void 0}function $t(){return!(!Mt()||!Ut())}var Dt=n(262),zt=n(713),Bt=n(760);const qt="_kubesense_s";var jt=n(75);const Ft=/^([a-zA-Z]+)=([a-z0-9-]+)$/;function Wt(t,e){const n={isExpired:"1"};return e.trackAnonymousUser&&(null==t?void 0:t.anonymousId)&&(n.anonymousId=null==t?void 0:t.anonymousId),n}function Gt(t){return(0,Y.RI)(t)}function Zt(t){return!Gt(t)}function Ht(t){return void 0!==t.isExpired||!((void 0===(e=t).created||(0,s.x3)()-Number(e.created)<ft)&&(void 0===e.expire||(0,s.x3)()<Number(e.expire)));var e}function Kt(t){t.expire=(0,s.x3)()+pt+""}function Jt(t){return(0,jt.WP)(t).map(([t,e])=>"anonymousId"===t?"aid="+e:`${t}=${e}`).join("&")}function Yt(t){const e={};return function(t){return!!t&&(-1!==t.indexOf("&")||Ft.test(t))}(t)&&t.split("&").forEach(t=>{const n=Ft.exec(t);if(null!==n){const[,t,r]=n;"aid"===t?e.anonymousId=r:e[t]=r}}),e}function Qt(t){const e=function(t){const e={};if(e.secure=!!t.useSecureSessionCookie||!!t.usePartitionedCrossSiteSessionCookie,e.crossSite=!!t.usePartitionedCrossSiteSessionCookie,e.partitioned=!!t.usePartitionedCrossSiteSessionCookie,t.trackSessionAcrossSubdomains){const t=Lt();if(!t)return;e.domain=t}return e}(t);return e&&function(t){if(void 0===document.cookie||null===document.cookie)return!1;try{const e="kubesense_cookie_test_"+z(),n="test";Ct(e,n,s.iW,t);const r=Rt(e)===n;return Pt(e,t),r}catch(t){return R.Vy.error(t),!1}}(e)?{type:ht,cookieOptions:e}:void 0}function Xt(t,e,n,r){let o=Jt(n);e.betaEncodeCookieOptions&&(o=Jt({...n,...(0,Y.RI)(n)?{}:{c:ee(t)}})),Ct(qt,o,e.trackAnonymousUser?mt:r,t)}function te(t,e){return e.betaEncodeCookieOptions?function(t){const e=(r=qt,function(t){const e=new Map;for(B.lastIndex=0;;){const n=B.exec(t);if(!n)break;{const t=n[1],r=n[2];e.has(t)?e.get(t).push(r):e.set(t,[r])}}return e}(document.cookie).get(r)||[]),n=ee(t);var r;let o;for(const t of e.reverse())if(o=Yt(t),o.c===n)break;return null==o||delete o.c,null!=o?o:{}}(t):Yt(Rt(qt))}function ee(t){let e=0;return e|=0,e|=(t.domain?t.domain.split(".").length-1:0)<<1,e|=t.crossSite?1:0,e.toString(16)}function ne(){try{const t=z(),e="_kubesense_test_"+t;localStorage.setItem(e,t);const n=localStorage.getItem(e);return localStorage.removeItem(e),t===n?{type:gt}:void 0}catch(t){return}}function re(t){localStorage.setItem(qt,Jt(t))}function oe(){return Yt(localStorage.getItem(qt))}const ie=s.OY,se=[];let ae;function ce(t,e,n=0){var r;const{isLockEnabled:o,persistSession:i,expireSession:a}=e,c=t=>i({...t,lock:l}),u=()=>{const{lock:t,...n}=e.retrieveSession();return{session:n,lock:t&&!de(t)?t:void 0}};if(ae||(ae=t),t!==ae)return void se.push(t);if(o&&n>=100)return void le(e);let l,d=u();if(o){if(d.lock)return void ue(t,e,n);if(l=z()+"--"+(0,s.nx)(),c(d.session),d=u(),d.lock!==l)return void ue(t,e,n)}let f=t.process(d.session);if(o&&(d=u(),d.lock!==l))ue(t,e,n);else{if(f&&(Ht(f)?a(f):(Kt(f),o?c(f):i(f))),o&&(!f||!Ht(f))){if(d=u(),d.lock!==l)return void ue(t,e,n);i(d.session),f=d.session}null===(r=t.after)||void 0===r||r.call(t,f||d.session),le(e)}}function ue(t,e,n){(0,st.wg)(()=>{ce(t,e,n+1)},10)}function le(t){ae=void 0;const e=se.shift();e&&ce(e,t)}function de(t){const[,e]=t.split("--");return!e||(0,s.vk)(Number(e),(0,s.nx)())>ie}const fe=s.OY;function pe(t){switch(t.sessionPersistence){case ht:return Qt(t);case gt:return ne();case void 0:{let e=Qt(t);return!e&&t.allowFallbackToLocalStorage&&(e=ne()),e}default:R.Vy.error(`Invalid session persistence '${t.sessionPersistence+""}'`)}}function me(t){const e=(0,tt.P)(t);return"string"===e||"function"===e||t instanceof RegExp}function he(t,e,n=!1){return t.some(t=>{try{if("function"==typeof t)return t(e);if(t instanceof RegExp)return t.test(e);if("string"==typeof t)return n?e.startsWith(t):t===e}catch(t){R.Vy.error(t)}return!1})}const ge=["chrome-extension://","moz-extension://"];function ve(t){return ge.some(e=>t.includes(e))}function ye(t,e,n){const r=function(t,e){const n="/rum/api/v1/"+e,r=t.proxy;if("string"==typeof r){const t=(0,St.l2)(r);return e=>`${t}?kubesense-forward=${encodeURIComponent(`${n}?${e}`)}`}if("function"==typeof r)return t=>r({path:n,parameters:t});const o=t.kubesenseRumEndpoint;return t=>`https://${o}${n}?${t}`}(t,e);return{build(o,i){const a=function({clientToken:t,internalAnalyticsSubdomain:e,source:n="browser"},r,o,{retry:i,encoding:a},c=[]){const u=["ksource="+n,"kubesense-api-key="+t,"kubesense-evp-origin-version="+encodeURIComponent("1.3.0"),"kubesense-evp-origin=browser","kubesense-request-id="+z()].concat(c);return a&&u.push("kubesense-evp-encoding="+a),"rum"===r&&(u.push("batch_time="+(0,s.nx)(),"_kubesense.api="+o),i&&u.push("_kubesense.retry_count="+i.count,"_kubesense.retry_after="+i.lastFailureStatus)),e&&u.reverse(),u.join("&")}(t,e,o,i,n);return r(a)},trackType:e}}var be=n(858);function _e(t){const e=t.kubesenseRumEndpoint||be.TU,n=function(t){return"flutter"===t||"unity"===t?t:"browser"}(t.source),r=function(t){return{logsEndpointBuilder:ye(t,"logs"),rumEndpointBuilder:ye(t,"rum"),profilingEndpointBuilder:ye(t,"profile"),sessionReplayEndpointBuilder:ye(t,"replay"),exposuresEndpointBuilder:ye(t,"exposures"),flagEvaluationEndpointBuilder:ye(t,"flagevaluation")}}({...t,kubesenseRumEndpoint:e,source:n}),o=function(t){if(!t.replica)return;const e={...t,kubesenseRumEndpoint:be.TU,clientToken:t.replica.clientToken};return{logsEndpointBuilder:ye(e,"logs"),rumEndpointBuilder:ye(e,"rum",["application.id="+t.replica.applicationId])}}({...t,kubesenseRumEndpoint:e,source:n});return{replica:o,kubesenseRumEndpoint:e,source:n,...r}}const we={ALLOW:"allow",MASK:"mask",MASK_USER_INPUT:"mask-user-input",MASK_UNLESS_ALLOWLISTED:"mask-unless-allowlisted"},ke={ALL:"all",SAMPLED:"sampled"};function Se(t,e){return null==t||"string"==typeof t||(R.Vy.error(e+" must be defined as a string"),!1)}function Ee(t,e){return!(void 0!==t&&!(0,zt.fp)(t)&&(R.Vy.error(e+" Sample Rate should be a number between 0 and 100"),1))}const xe=new Map;function Te(t,e){if(100===e)return!0;if(0===e)return!1;const n=xe.get(e);if(n&&t===n.sessionId)return n.decision;let r;return r=window.BigInt?function(t,e){const n=BigInt("1111111111111111111"),r=BigInt("0x10000000000000000");return Number(t*n%r)<=e/100*Number(r)}(BigInt("0x"+t.split("-")[4]),e):(0,zt.ic)(e),xe.set(e,{sessionId:t,decision:r}),r}function Ae(){return Ce(63)}function Ce(t){const e=crypto.getRandomValues(new Uint32Array(2));return 63===t&&(e[e.length-1]>>>=1),{toString(t=10){let n=e[1],r=e[0],o="";do{const e=n%t*4294967296+r;n=Math.floor(n/t),r=Math.floor(e/t),o=(e%t).toString(t)+o}while(n||r);return o}}}function Re(t){return t.toString(16).padStart(16,"0")}function Ie(t){0!==t.status||t.isAborted||(t.traceId=void 0,t.spanId=void 0,t.traceSampled=void 0)}function Oe(t,e,n,r,o,i){const s=n.findTrackedSession();if(!s)return;const a=t.allowedTracingUrls.find(t=>he([t.match],e.url,!0));if(!a)return;const c=Te(s.id,t.traceSampleRate);(c||t.traceContextInjection===ke.ALL)&&(e.traceSampled=c,e.traceId=Ce(64),e.spanId=Ae(),i(function(t,e,n,r,o,i,s,a){const c={};if(o.forEach(r=>{switch(r){case"kubesense":Object.assign(c,{"x-kubesense-origin":"rum","x-kubesense-parent-id":e.toString(),"x-kubesense-sampling-priority":n?"1":"0","x-kubesense-trace-id":t.toString()});break;case"tracecontext":Object.assign(c,{traceparent:`00-0000000000000000${Re(t)}-${Re(e)}-0${n?"1":"0"}`,tracestate:`dd=s:${n?"1":"0"};o:rum`});break;case"b3":Object.assign(c,{b3:`${Re(t)}-${Re(e)}-${n?"1":"0"}`});break;case"b3multi":Object.assign(c,{"X-B3-TraceId":Re(t),"X-B3-SpanId":Re(e),"X-B3-Sampled":n?"1":"0"})}}),a.propagateTraceBaggage){const t={"session.id":r},e=i.getContext().id;"string"==typeof e&&(t["user.id"]=e);const n=s.getContext().id;"string"==typeof n&&(t["account.id"]=n);const o=Object.entries(t).map(([t,e])=>`${t}=${encodeURIComponent(e)}`).join(",");o&&(c.baggage=o)}return c}(e.traceId,e.spanId,e.traceSampled,s.id,a.propagatorTypes,r,o,t)))}const Ne=["tracecontext","kubesense"];function Pe(t){const e=new Set;return K(t.allowedTracingUrls)&&t.allowedTracingUrls.forEach(t=>{me(t)?Ne.forEach(t=>e.add(t)):"object"===(0,tt.P)(t)&&Array.isArray(t.propagatorTypes)&&t.propagatorTypes.forEach(t=>e.add(t))}),Array.from(e)}function Le(t){return K(t)&&t.some(t=>"object"==typeof t&&"trackResponseErrors"in t&&!!t.trackResponseErrors)}const Ve=/[a-zA-Z_$]/,Me=/[a-zA-Z0-9_$]/,Ue=/[0-9]/,$e=/[a-fA-F0-9]/,De={0:()=>!1,1:()=>!1,2:t=>Ve.test(t),3:t=>Me.test(t),4:t=>"."===t,5:t=>"["===t,6:t=>"]"===t,7:t=>Ue.test(t),8:t=>"'\"".includes(t),9:(t,e)=>t===e.quote,10:()=>!0,11:t=>"\\"===t,12:(t,e)=>void 0===e.escapeSequence?(e.quote+"/\\bfnrtu").includes(t):!!(e.escapeSequence.startsWith("u")&&e.escapeSequence.length<5)&&$e.test(t)},ze={0:[2,5],1:[],2:[3,4,5,1],3:[3,4,5,1],4:[2],5:[8,7],6:[4,5,1],7:[7,6],8:[11,9,10],9:[6],10:[11,9,10],11:[12],12:[12,11,9,10]},Be=[2,3,7,10],qe=[4,5,6];function je(t){return"\"'/\\bfnrt".includes(t)||t.startsWith("u")&&5===t.length}const Fe={'"':'"',"'":"'","/":"/","\\":"\\",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"};function We(t){return t.startsWith("u")?String.fromCharCode(parseInt(t.slice(1),16)):Fe[t]}const Ge=["applicationId","service","env","version","sessionSampleRate","sessionReplaySampleRate","defaultPrivacyLevel","enablePrivacyForActionName","traceSampleRate","trackSessionAcrossSubdomains","allowedTracingUrls","allowedTrackingOrigins"];function Ze(t){try{return RegExp(t)}catch(e){R.Vy.error(`Invalid regex in the remote configuration: '${t}'`)}}function He(t,e,n){t.changeObservable.subscribe(()=>{const r=t.getContext();n.add(t=>t[e].setContext(r))})}function Ke(t,e,n,i={}){const a=function(t){const e=new r.cP;return{tryToInit(e){t||(t=e)},update(n){t=n,e.notify()},isGranted:()=>t===o.GRANTED,observable:e}}(),u={vitalsByName:new Map,vitalsByReference:new WeakMap},l=function(t=d){const e=new r.dX(500),n=t().subscribe(t=>{e.notify({type:0,error:t})});return{observable:e,stop(){n.unsubscribe()}}}().observable;let f=function({ignoreInitIfSyntheticsWillInjectRum:t=!0,startDeflateWorker:e},n,r,i){const a=function(){const t=[];return{add(e){t.push(e)>500&&t.splice(0,1)},remove(e){H(t,e)},drain(e){t.forEach(t=>t(e)),t.length=0}}}(),u=ot();He(u,k,a);const l=bt();He(l,w,a);const d=_t();let f,p,g,v;He(d,S,a);const y=n.observable.subscribe(E),_={};function E(){if(!g||!v||!n.isGranted())return;let t;if(y.unsubscribe(),v.trackViewsManually){if(!f)return;a.remove(f.callback),t=f.options}const e=i(v,p,t);a.drain(e)}function x(t,r){const i=(0,wt.d0)();if(i&&(t=function(t){var e,n;return{...t,applicationId:"00000000-aaaa-0000-aaaa-000000000000",clientToken:"empty",sessionSampleRate:100,defaultPrivacyLevel:null!==(e=t.defaultPrivacyLevel)&&void 0!==e?e:null===(n=(0,wt.Y9)())||void 0===n?void 0:n.getPrivacyLevel()}}(t)),g=t,(0,h.Rr)(function(t){var e;const n={session_sample_rate:(r=t).sessionSampleRate,telemetry_sample_rate:r.telemetrySampleRate,telemetry_configuration_sample_rate:r.telemetryConfigurationSampleRate,telemetry_usage_sample_rate:r.telemetryUsageSampleRate,use_before_send:!!r.beforeSend,use_partitioned_cross_site_session_cookie:r.usePartitionedCrossSiteSessionCookie,use_secure_session_cookie:r.useSecureSessionCookie,use_proxy:!!r.proxy,silent_multiple_init:r.silentMultipleInit,track_session_across_subdomains:r.trackSessionAcrossSubdomains,track_anonymous_user:r.trackAnonymousUser,session_persistence:r.sessionPersistence,allow_fallback_to_local_storage:!!r.allowFallbackToLocalStorage,store_contexts_across_pages:!!r.storeContextsAcrossPages,allow_untrusted_events:!!r.allowUntrustedEvents,tracking_consent:r.trackingConsent,use_allowed_tracking_origins:Array.isArray(r.allowedTrackingOrigins),beta_encode_cookie_options:r.betaEncodeCookieOptions,source:r.source,sdk_version:r.sdkVersion,variant:r.variant};var r,o;return{session_replay_sample_rate:t.sessionReplaySampleRate,start_session_replay_recording_manually:t.startSessionReplayRecordingManually,trace_sample_rate:t.traceSampleRate,trace_context_injection:t.traceContextInjection,propagate_trace_baggage:t.propagateTraceBaggage,action_name_attribute:t.actionNameAttribute,use_allowed_tracing_urls:K(t.allowedTracingUrls),use_allowed_graph_ql_urls:K(t.allowedGraphQlUrls),use_track_graph_ql_payload:(o=t.allowedGraphQlUrls,K(o)&&o.some(t=>"object"==typeof t&&"trackPayload"in t&&!!t.trackPayload)),use_track_graph_ql_response_errors:Le(t.allowedGraphQlUrls),selected_tracing_propagators:Pe(t),default_privacy_level:t.defaultPrivacyLevel,enable_privacy_for_action_name:t.enablePrivacyForActionName,use_excluded_activity_urls:K(t.excludedActivityUrls),use_worker_url:!!t.workerUrl,compress_intake_requests:t.compressIntakeRequests,track_views_manually:t.trackViewsManually,track_user_interactions:t.trackUserInteractions,track_resources:t.trackResources,track_long_task:t.trackLongTasks,track_bfcache_views:t.trackBfcacheViews,track_early_requests:t.trackEarlyRequests,plugins:null===(e=t.plugins)||void 0===e?void 0:e.map(t=>{var e;return{name:t.name,...null===(e=t.getConfigurationTelemetry)||void 0===e?void 0:e.call(t)}}),track_feature_flags_for_events:t.trackFeatureFlagsForEvents,remote_configuration_id:t.remoteConfigurationId,profiling_sample_rate:t.profilingSampleRate,use_remote_configuration_proxy:!!t.remoteConfigurationProxy,...n}}(t)),v)return void I("KUBESENSE_SDK",t);const s=function(t,e){var n,r,i,s,a,u,l,d;if(void 0===t.trackFeatureFlagsForEvents||Array.isArray(t.trackFeatureFlagsForEvents)||R.Vy.warn("trackFeatureFlagsForEvents should be an array"),!t.applicationId)return void R.Vy.error("Application ID is not configured, no RUM data will be collected.");if(!Ee(t.sessionReplaySampleRate,"Session Replay")||!Ee(t.traceSampleRate,"Trace"))return;if(void 0!==t.excludedActivityUrls&&!Array.isArray(t.excludedActivityUrls))return void R.Vy.error("Excluded Activity Urls should be an array");const f=function(t){if(void 0===t.allowedTracingUrls)return[];if(!Array.isArray(t.allowedTracingUrls))return void R.Vy.error("Allowed Tracing URLs should be an array");if(0!==t.allowedTracingUrls.length&&void 0===t.service)return void R.Vy.error("Service needs to be configured when tracing is enabled");const e=[];return t.allowedTracingUrls.forEach(t=>{me(t)?e.push({match:t,propagatorTypes:Ne}):function(t){const e=t;return"object"===(0,tt.P)(e)&&me(e.match)&&Array.isArray(e.propagatorTypes)}(t)?e.push(t):R.Vy.warn("Allowed Tracing Urls parameters should be a string, RegExp, function, or an object. Ignoring parameter",t)}),e}(t);if(!f)return;const p=function(t,e){var n,r,i,s,a,u,l,d,f,p;if(t&&t.clientToken)if(void 0===t.allowedTrackingOrigins||Array.isArray(t.allowedTrackingOrigins)){if(Ee(t.sessionSampleRate,"Session")&&Ee(t.telemetrySampleRate,"Telemetry")&&Ee(t.telemetryConfigurationSampleRate,"Telemetry Configuration")&&Ee(t.telemetryUsageSampleRate,"Telemetry Usage")&&Se(t.version,"Version")&&Se(t.env,"Env")&&Se(t.service,"Service")&&function(t,e,n=("undefined"!=typeof location?location.origin:"")){const r=t.allowedTrackingOrigins;if(!r)return!function(t,e=""){return!ve(t)&&ve(e.split("\n").filter(t=>{const e=t.trim();return e.length&&/^at\s+|@/.test(e)})[1]||"")}(n,e)||(R.Vy.error("Running the Browser SDK in a Web extension content script is forbidden unless the `allowedTrackingOrigins` option is provided."),!1);const o=he(r,n);return o||R.Vy.error("SDK initialized on a non-allowed domain."),o}(t,null!=e?e:"")){if(void 0===t.trackingConsent||(0,Y.Rj)(o,t.trackingConsent))return{beforeSend:t.beforeSend&&(0,Dt.y)(t.beforeSend,"beforeSend threw an error:"),sessionStoreStrategyType:c.Wq?void 0:pe(t),sessionSampleRate:null!==(n=t.sessionSampleRate)&&void 0!==n?n:100,telemetrySampleRate:null!==(r=t.telemetrySampleRate)&&void 0!==r?r:20,telemetryConfigurationSampleRate:null!==(i=t.telemetryConfigurationSampleRate)&&void 0!==i?i:5,telemetryUsageSampleRate:null!==(s=t.telemetryUsageSampleRate)&&void 0!==s?s:5,service:null!==(a=t.service)&&void 0!==a?a:void 0,env:null!==(u=t.env)&&void 0!==u?u:void 0,version:null!==(l=t.version)&&void 0!==l?l:void 0,datacenter:null!==(d=t.datacenter)&&void 0!==d?d:void 0,silentMultipleInit:!!t.silentMultipleInit,allowUntrustedEvents:!!t.allowUntrustedEvents,trackingConsent:null!==(f=t.trackingConsent)&&void 0!==f?f:o.GRANTED,trackAnonymousUser:null===(p=t.trackAnonymousUser)||void 0===p||p,storeContextsAcrossPages:!!t.storeContextsAcrossPages,betaEncodeCookieOptions:!!t.betaEncodeCookieOptions,variant:t.variant,sdkVersion:t.sdkVersion,..._e(t)};R.Vy.error('Tracking Consent should be either "granted" or "not-granted"')}}else R.Vy.error("Allowed Tracking Origins must be an array");else R.Vy.error("Client Token is not configured, we will not send any data.")}(t,e),m=function(t){if(!t.allowedGraphQlUrls)return[];if(!Array.isArray(t.allowedGraphQlUrls))return R.Vy.warn("allowedGraphQlUrls should be an array"),[];const e=[];return t.allowedGraphQlUrls.forEach(t=>{me(t)?e.push({match:t,trackPayload:!1,trackResponseErrors:!1}):t&&"object"==typeof t&&"match"in t&&me(t.match)&&e.push({match:t.match,trackPayload:!!t.trackPayload,trackResponseErrors:!!t.trackResponseErrors})}),e}(t);if(!p)return;const h=null!==(n=t.sessionReplaySampleRate)&&void 0!==n?n:0;return{applicationId:t.applicationId,actionNameAttribute:t.actionNameAttribute,sessionReplaySampleRate:h,startSessionReplayRecordingManually:void 0!==t.startSessionReplayRecordingManually?!!t.startSessionReplayRecordingManually:0===h,traceSampleRate:null!==(r=t.traceSampleRate)&&void 0!==r?r:100,rulePsr:(0,zt.Et)(t.traceSampleRate)?t.traceSampleRate/100:void 0,allowedTracingUrls:f,excludedActivityUrls:null!==(i=t.excludedActivityUrls)&&void 0!==i?i:[],workerUrl:t.workerUrl,compressIntakeRequests:!!t.compressIntakeRequests,trackUserInteractions:!(null!==(s=t.trackUserInteractions)&&void 0!==s&&!s),trackViewsManually:!!t.trackViewsManually,trackResources:!(null!==(a=t.trackResources)&&void 0!==a&&!a),trackLongTasks:!(null!==(u=t.trackLongTasks)&&void 0!==u&&!u),trackBfcacheViews:!!t.trackBfcacheViews,trackEarlyRequests:!!t.trackEarlyRequests,subdomain:t.subdomain,defaultPrivacyLevel:(0,Y.Rj)(we,t.defaultPrivacyLevel)?t.defaultPrivacyLevel:we.MASK,enablePrivacyForActionName:!!t.enablePrivacyForActionName,traceContextInjection:(0,Y.Rj)(ke,t.traceContextInjection)?t.traceContextInjection:ke.SAMPLED,plugins:t.plugins||[],trackFeatureFlagsForEvents:t.trackFeatureFlagsForEvents||[],profilingSampleRate:null!==(l=t.profilingSampleRate)&&void 0!==l?l:0,propagateTraceBaggage:!!t.propagateTraceBaggage,allowedGraphQlUrls:m,firstPartyDomains:null!==(d=t.firstPartyDomains)&&void 0!==d?d:[],...p}}(t,r);s&&(i||s.sessionStoreStrategyType?s.compressIntakeRequests&&!i&&e&&(p=e(s,"Kubsesense RUM",kt.l),!p)||(v=s,At().subscribe(kt.l),n.tryToInit(s.trackingConsent),E()):R.Vy.warn("No storage available for session. We will not send any data."))}const T=t=>{a.add(e=>e.addDurationVital(t))};return{init(e,n,r){e?((0,D.Aq)(e.enableExperimentalFeatures),g=e,t&&Vt()||(Z(e.plugins,"onInit",{initConfiguration:e,publicApi:n}),e.remoteConfigurationId?async function(t,e){let n;const r=function(){const t={fetch:{}};return{get:()=>t,increment(e,n){t[e]||(t[e]={}),t[e][n]||(t[e][n]=0),t[e][n]=t[e][n]+1}}}(),o=await async function(t){let e;try{e=await fetch(function(t){return t.remoteConfigurationProxy?t.remoteConfigurationProxy:`https://sdk-configuration.${function(t,e){const{kubesenseRumEndpoint:n,internalAnalyticsSubdomain:r}=e;return n}(0,t)}/v1/${encodeURIComponent(t.remoteConfigurationId)}.json`}(t))}catch(t){e=void 0}if(!e||!e.ok)return{ok:!1,error:Error("Error fetching the remote configuration.")};const n=await e.json();return n.rum?{ok:!0,value:n.rum}:{ok:!1,error:Error("No remote configuration for RUM.")}}(t);return o.ok?(r.increment("fetch","success"),n=function(t,e,n,r){const o={...t};return Ge.forEach(t=>{t in e&&(o[t]=i(e[t]))}),Object.keys(n).forEach(t=>{var r;void 0!==e[t]&&(r=n[t],e[t].forEach(({key:t,value:e})=>{r.setContextProperty(t,i(e))}))}),o;function i(t){if(Array.isArray(t))return t.map(i);if(function(t){return"object"==typeof t&&null!==t}(t)){if("rcSerializedType"in t){const e=t.rcSerializedType;switch(e){case"string":return t.value;case"regex":return Ze(t.value);case"dynamic":return function(t){const e=t.strategy;let n;switch(e){case"cookie":n=function({name:t}){const e=Rt(t);return r.increment("cookie",void 0!==e?"success":"missing"),e}(t);break;case"dom":n=function({selector:t,attribute:e}){let n;try{n=document.querySelector(t)}catch(e){return R.Vy.error(`Invalid selector in the remote configuration: '${t}'`),void r.increment("dom","failure")}if(!n)return void r.increment("dom","missing");if(function(t,e){return"password"===t.getAttribute("type")&&"value"===e}(n,e))return R.Vy.error(`Forbidden element selected by the remote configuration: '${t}'`),void r.increment("dom","failure");const o=void 0!==e?n.getAttribute(e):n.textContent;if(null!==o)return r.increment("dom","success"),o;r.increment("dom","missing")}(t);break;case"js":n=function({path:t}){let e=window;const n=function(t){const e=[];let n,r=0;const o={quote:void 0,escapeSequence:void 0};let i="";for(const s of t){if(n=ze[r].find(t=>De[t](s,o)),!n)return[];if(void 0!==o.escapeSequence&&12!==n){if(!je(o.escapeSequence))return[];i+=We(o.escapeSequence),o.escapeSequence=void 0}Be.includes(n)?i+=s:qe.includes(n)&&""!==i?(e.push(i),i=""):12===n?o.escapeSequence=o.escapeSequence?`${o.escapeSequence}${s}`:s:8===n?o.quote=s:9===n&&(o.quote=void 0),r=n}return ze[r].includes(1)?(""!==i&&e.push(i),e):[]}(t);if(0===n.length)return R.Vy.error(`Invalid JSON path in the remote configuration: '${t}'`),void r.increment("js","failure");for(const o of n){if(!(o in e))return void r.increment("js","missing");try{e=e[o]}catch(e){return R.Vy.error(`Error accessing: '${t}'`,e),void r.increment("js","failure")}}return r.increment("js","success"),e}(t);break;default:return void R.Vy.error(`Unsupported remote configuration: "strategy": "${e}"`)}const o=t.extractor;return void 0!==o&&"string"==typeof n?function(t,e){const n=Ze(t.value);if(void 0===n)return;const r=n.exec(e);if(null===r)return;const[o,i]=r;return i||o}(o,n):n}(t);default:return void R.Vy.error(`Unsupported remote configuration: "rcSerializedType": "${e}"`)}}return(0,Y.LG)(t,i)}return t}}(t,o.value,e,r)):(r.increment("fetch","failure"),R.Vy.error(o.error)),(0,h.Gk)("remote configuration metrics",{metrics:r.get()}),n}(e,{user:l,context:u}).then(t=>{t&&x(t,r)}).catch(m.Dx):x(e,r))):R.Vy.error("Missing configuration")},get initConfiguration(){return g},getInternalContext:kt.l,stopSession:kt.l,addTiming(t,e=(0,s.nx)()){a.add(n=>n.addTiming(t,e))},startView(t,e=(0,s.M8)()){const n=n=>{n.startView(t,e)};a.add(n),f||(f={options:t,callback:n},E())},setViewName(t){a.add(e=>e.setViewName(t))},setViewContext(t){a.add(e=>e.setViewContext(t))},setViewContextProperty(t,e){a.add(n=>n.setViewContextProperty(t,e))},getViewContext(){return _},globalContext:u,userContext:l,accountContext:d,addAction(t){a.add(e=>e.addAction(t))},addError(t){a.add(e=>e.addError(t))},addFeatureFlagEvaluation(t,e){a.add(n=>n.addFeatureFlagEvaluation(t,e))},startDurationVital:(t,e)=>F(r,t,e),stopDurationVital(t,e){W(T,r,t,e)},addDurationVital:T,addOperationStepVital(t,e,n,r){a.add(o=>o.addOperationStepVital((0,b.a)(t),e,(0,b.a)(n),(0,b.a)(r)))}}}(i,a,u,(r,o,s)=>{const c=o&&i.createDeflateEncoder?t=>i.createDeflateEncoder(r,o,t):p,d=t(r,e,n,s,c,a,u,l,i.sdkName);return e.onRumStart(d.lifeCycle,r,d.session,d.viewHistory,o,d.telemetry),n.onRumStart(d.lifeCycle,d.hooks,r,d.session,d.viewHistory,d.longTaskContexts,c),f=function(t,e){return{init(t){I("KUBESENSE_SDK",t)},initConfiguration:t.initConfiguration,...e}}(f,d),Z(r.plugins,"onRumStart",{strategy:f,addEvent:d.addEvent}),d});const O=()=>f,N=(0,m.dm)(t=>{const e="object"==typeof t?t:{name:t};f.startView(e),(0,h.Q6)({feature:"start-view"})}),P=(0,g.m)({init(t){const e=Error().stack;(0,m.um)(()=>f.init(t,P,e))},setTrackingConsent:(0,m.dm)(t=>{a.update(t),(0,h.Q6)({feature:"set-tracking-consent",tracking_consent:t})}),setViewName:(0,m.dm)(t=>{f.setViewName(t),(0,h.Q6)({feature:"set-view-name"})}),setViewContext:(0,m.dm)(t=>{f.setViewContext(t),(0,h.Q6)({feature:"set-view-context"})}),setViewContextProperty:(0,m.dm)((t,e)=>{f.setViewContextProperty(t,e),(0,h.Q6)({feature:"set-view-context-property"})}),getViewContext:(0,m.dm)(()=>((0,h.Q6)({feature:"set-view-context-property"}),f.getViewContext())),getInternalContext:(0,m.dm)(t=>f.getInternalContext(t)),getInitConfiguration:(0,m.dm)(()=>(0,v.Go)(f.initConfiguration)),addAction(t,e){const n=(0,y.uC)("action");(0,m.um)(()=>{f.addAction({name:(0,b.a)(t),context:(0,b.a)(e),startClocks:(0,s.M8)(),type:V.CUSTOM,handlingStack:n}),(0,h.Q6)({feature:"add-action"})})},addError(t,e){const n=(0,y.uC)("error");(0,m.um)(()=>{f.addError({error:t,handlingStack:n,context:(0,b.a)(e),startClocks:(0,s.M8)()}),(0,h.Q6)({feature:"add-error"})})},addTiming:(0,m.dm)((t,e)=>{f.addTiming((0,b.a)(t),e)}),setGlobalContext:_(O,k,x,"set-global-context"),getGlobalContext:_(O,k,E,"get-global-context"),setGlobalContextProperty:_(O,k,T,"set-global-context-property"),removeGlobalContextProperty:_(O,k,A,"remove-global-context-property"),clearGlobalContext:_(O,k,C,"clear-global-context"),setUser:_(O,w,x,"set-user"),getUser:_(O,w,E,"get-user"),setUserProperty:_(O,w,T,"set-user-property"),removeUserProperty:_(O,w,A,"remove-user-property"),clearUser:_(O,w,C,"clear-user"),setAccount:_(O,S,x,"set-account"),getAccount:_(O,S,E,"get-account"),setAccountProperty:_(O,S,T,"set-account-property"),removeAccountProperty:_(O,S,A,"remove-account-property"),clearAccount:_(O,S,C,"clear-account"),startView:N,stopSession:(0,m.dm)(()=>{f.stopSession(),(0,h.Q6)({feature:"stop-session"})}),addFeatureFlagEvaluation:(0,m.dm)((t,e)=>{f.addFeatureFlagEvaluation((0,b.a)(t),(0,b.a)(e)),(0,h.Q6)({feature:"add-feature-flag-evaluation"})}),getSessionReplayLink:(0,m.dm)(()=>e.getSessionReplayLink()),startSessionReplayRecording:(0,m.dm)(t=>{e.start(t),(0,h.Q6)({feature:"start-session-replay-recording",force:t&&t.force})}),stopSessionReplayRecording:(0,m.dm)(()=>e.stop()),addDurationVital:(0,m.dm)((t,e)=>{(0,h.Q6)({feature:"add-duration-vital"}),f.addDurationVital({name:(0,b.a)(t),type:$,startClocks:(0,s.jR)(e.startTime),duration:e.duration,context:(0,b.a)(e&&e.context),description:(0,b.a)(e&&e.description)})}),startDurationVital:(0,m.dm)((t,e)=>((0,h.Q6)({feature:"start-duration-vital"}),f.startDurationVital((0,b.a)(t),{context:(0,b.a)(e&&e.context),description:(0,b.a)(e&&e.description)}))),stopDurationVital:(0,m.dm)((t,e)=>{(0,h.Q6)({feature:"stop-duration-vital"}),f.stopDurationVital("string"==typeof t?(0,b.a)(t):t,{context:(0,b.a)(e&&e.context),description:(0,b.a)(e&&e.description)})}),startFeatureOperation:(0,m.dm)((t,e)=>{(0,h.Q6)({feature:"add-operation-step-vital",action_type:"start"}),f.addOperationStepVital(t,"start",e)}),succeedFeatureOperation:(0,m.dm)((t,e)=>{(0,h.Q6)({feature:"add-operation-step-vital",action_type:"succeed"}),f.addOperationStepVital(t,"end",e)}),failFeatureOperation:(0,m.dm)((t,e,n)=>{(0,h.Q6)({feature:"add-operation-step-vital",action_type:"fail"}),f.addOperationStepVital(t,"end",n,e)})});return P}var Je=n(769),Ye=n(887),Qe=n(586);function Xe(){let t;const e=window;if(e.Zone&&(t=(0,Qe.W)(e,"MutationObserver"),e.MutationObserver&&t===e.MutationObserver)){const n=new e.MutationObserver(kt.l),r=(0,Qe.W)(n,"originalInstance");t=r&&r.constructor}return t||(t=e.MutationObserver),t}const tn=class{constructor(){this.callbacks={}}notify(t,e){const n=this.callbacks[t];n&&n.forEach(t=>t(e))}subscribe(t,e){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e),{unsubscribe:()=>{this.callbacks[t]=this.callbacks[t].filter(t=>e!==t)}}}},en=ft;let nn;const rn=new WeakMap;function on({target:t,parameters:[e,n]}){rn.set(t,{state:"open",method:(e+"").toUpperCase(),url:(0,St.l2)(n+"")})}function sn({target:t}){const e=rn.get(t);e&&(e.isAborted=!0)}const an="xhr",cn="fetch",un="other",ln=cn,dn=an,fn="initial_document",pn=[["document",t=>fn===t],[an,t=>"xmlhttprequest"===t],[cn,t=>"fetch"===t],["beacon",t=>"beacon"===t],["css",(t,e)=>/\.css$/i.test(e)],["js",(t,e)=>/\.js$/i.test(e)],["image",(t,e)=>["image","img","icon"].includes(t)||null!==/\.(gif|jpg|jpeg|tiff|png|svg|ico)$/i.exec(e)],["font",(t,e)=>null!==/\.(woff|eot|woff2|ttf)$/i.exec(e)],["media",(t,e)=>["audio","video"].includes(t)||null!==/\.(mp3|mp4)$/i.exec(e)]];function mn(t){const e=t.name;if(!(0,St.AY)(e))return un;const n=(0,St.L2)(e);for(const[e,r]of pn)if(r(t.initiatorType,n))return e;return un}function hn(...t){for(let e=1;e<t.length;e+=1)if(t[e-1]>t[e])return!1;return!0}function gn(t){return"xmlhttprequest"===t.initiatorType||"fetch"===t.initiatorType}function vn(t){if(!bn(t))return;const{startTime:e,fetchStart:n,workerStart:r,redirectStart:o,redirectEnd:i,domainLookupStart:s,domainLookupEnd:a,connectStart:c,secureConnectionStart:u,connectEnd:l,requestStart:d,responseStart:f,responseEnd:p}=t,m={download:_n(e,f,p),first_byte:_n(e,d,f)};return 0<r&&r<n&&(m.worker=_n(e,r,n)),n<l&&(m.connect=_n(e,c,l),c<=u&&u<=l&&(m.ssl=_n(e,u,l))),n<a&&(m.dns=_n(e,s,a)),e<i&&(m.redirect=_n(e,o,i)),m}function yn(t){return t.duration>=0}function bn(t){const e=hn(t.startTime,t.fetchStart,t.domainLookupStart,t.domainLookupEnd,t.connectStart,t.connectEnd,t.requestStart,t.responseStart,t.responseEnd),n=!function(t){return t.redirectEnd>t.startTime}(t)||hn(t.startTime,t.redirectStart,t.redirectEnd,t.fetchStart);return e&&n}function _n(t,e,n){if(t<=e&&e<=n)return{duration:(0,s.Zj)((0,s.vk)(e,n)),start:(0,s.Zj)((0,s.vk)(t,e))}}function wn(t){return""===t.nextHopProtocol?void 0:t.nextHopProtocol}function kn(t){return""===t.deliveryType?"other":t.deliveryType}function Sn(t){const{encodedBodySize:e,decodedBodySize:n,transferSize:r}=t;return bn(t)||(null!=n?n:0)>0||(null!=e?e:0)>0?{size:n,encoded_body_size:e,decoded_body_size:n,transfer_size:r}:{size:void 0,encoded_body_size:void 0,decoded_body_size:void 0,transfer_size:void 0}}function En(t){return t&&(!function(t){return be.Ih.every(e=>t.includes(e))}(t)||(0,D.sr)(D.R9.TRACK_INTAKE_REQUESTS))}const xn=[{domains:["google-analytics.com","analytics.google.com"],name:"Google Analytics",type:"analytics"},{domains:["segment.com","segment.io","cdn.segment.com"],name:"Segment",type:"analytics"},{domains:["amplitude.com"],name:"Amplitude",type:"analytics"},{domains:["mixpanel.com"],name:"Mixpanel",type:"analytics"},{domains:["hotjar.com"],name:"Hotjar",type:"analytics"},{domains:["fullstory.com"],name:"FullStory",type:"analytics"},{domains:["heap.io"],name:"Heap",type:"analytics"},{domains:["googletagmanager.com"],name:"Google Tag Manager",type:"tag-manager"},{domains:["tealiumiq.com"],name:"Tealium",type:"tag-manager"},{domains:["cloudfront.net"],name:"Amazon CloudFront",type:"cdn"},{domains:["fastly.net"],name:"Fastly",type:"cdn"},{domains:["akamaiedge.net","akamaistream.net","akamai.net"],name:"Akamai",type:"cdn"},{domains:["jsdelivr.net"],name:"jsDelivr",type:"cdn"},{domains:["unpkg.com"],name:"unpkg",type:"cdn"},{domains:["bootstrapcdn.com"],name:"Bootstrap CDN",type:"cdn"},{domains:["doubleclick.net"],name:"Google DoubleClick",type:"advertising"},{domains:["googlesyndication.com"],name:"Google AdSense",type:"advertising"},{domains:["adnxs.com"],name:"AppNexus",type:"advertising"},{domains:["criteo.com","criteo.net"],name:"Criteo",type:"advertising"},{domains:["facebook.com","fbcdn.net","connect.facebook.net"],name:"Facebook",type:"social"},{domains:["twitter.com","twimg.com","platform.twitter.com"],name:"Twitter",type:"social"},{domains:["linkedin.com"],name:"LinkedIn",type:"social"},{domains:["instagram.com","cdninstagram.com"],name:"Instagram",type:"social"},{domains:["pinterest.com"],name:"Pinterest",type:"social"},{domains:["youtube.com","youtu.be","ytimg.com","googlevideo.com"],name:"YouTube",type:"video"},{domains:["vimeo.com","vimeocdn.com"],name:"Vimeo",type:"video"},{domains:["wistia.com"],name:"Wistia",type:"video"},{domains:["hubspot.com","hs-scripts.com","hsforms.com"],name:"HubSpot",type:"marketing"},{domains:["marketo.com","mktoresp.com"],name:"Marketo",type:"marketing"},{domains:["mailchimp.com"],name:"Mailchimp",type:"marketing"},{domains:["intercom.io","intercomcdn.com"],name:"Intercom",type:"customer-success"},{domains:["zendesk.com","zdassets.com"],name:"Zendesk",type:"customer-success"},{domains:["stripe.com","js.stripe.com"],name:"Stripe",type:"utility"},{domains:["code.jquery.com"],name:"jQuery",type:"utility"},{domains:["recaptcha.net"],name:"reCAPTCHA",type:"utility"}];function Tn(t,e=[]){if(!(0,St.AY)(t))return;let n;try{n=(0,St.c$)(t).hostname}catch(t){return}if(n){if(n===location.hostname||e.length>0&&he(e,n))return{domain:n,type:"first party"};for(const t of xn)for(const e of t.domains)if(n===e||n.endsWith("."+e))return{domain:n,name:t.name,type:t.type};return{domain:n,type:"other"}}}const An=/data:(.+)?(;base64)?,/g;function Cn(t,e=24e3){if(t.length<=e||!t.startsWith("data:"))return t;const n=t.substring(0,100).match(An);return n?n[0]+"[...]":t}const Rn=32*f._m;function In(t,e){return e.allowedGraphQlUrls.find(e=>he([e.match],t))}let On=1;function Nn(){const t=On;return On+=1,t}function Pn(t){return(0,zt.Et)(t)&&t<0?void 0:t}function Ln({lifeCycle:t,isChildEvent:e,onChange:n=kt.l}){const r={errorCount:0,longTaskCount:0,resourceCount:0,actionCount:0,frustrationCount:0},o=t.subscribe(13,t=>{var o;if("view"!==t.type&&"vital"!==t.type&&e(t))switch(t.type){case O.ERROR:r.errorCount+=1,n();break;case O.ACTION:r.actionCount+=1,t.action.frustration&&(r.frustrationCount+=t.action.frustration.type.length),n();break;case O.LONG_TASK:r.longTaskCount+=1,n();break;case O.RESOURCE:(null===(o=t._kubesense)||void 0===o?void 0:o.discarded)||(r.resourceCount+=1,n())}});return{stop(){o.unsubscribe()},eventCounts:r}}var Vn;function Mn(t,e){return new r.cP(n=>{if(!window.PerformanceObserver)return;const r=t=>{const e=function(t){return t.filter(t=>!function(t){return!(t.entryType!==Vn.RESOURCE||En(t.name)&&yn(t))}(t))}(t);e.length>0&&n.notify(e)};let o,i=!0;const a=new PerformanceObserver((0,m.dm)(t=>{i?o=(0,st.wg)(()=>r(t.getEntries())):r(t.getEntries())}));try{a.observe(e)}catch(t){if([Vn.RESOURCE,Vn.NAVIGATION,Vn.LONG_TASK,Vn.PAINT].includes(e.type)){e.buffered&&(o=(0,st.wg)(()=>r(performance.getEntriesByType(e.type))));try{a.observe({entryTypes:[e.type]})}catch(t){return}}}let c;return i=!1,function(t){!Un&&void 0!==window.performance&&"getEntries"in performance&&"addEventListener"in performance&&(Un=(0,J.q)(t,performance,"resourcetimingbufferfull",()=>{performance.clearResourceTimings()}))}(t),$n(Vn.FIRST_INPUT)||e.type!==Vn.FIRST_INPUT||({stop:c}=function(t){const e=(0,s.x3)();let n=!1;const{stop:o}=(0,J.l)(t,window,["click","mousedown","keydown","touchstart","pointerdown"],e=>{if(!e.cancelable)return;const n={entryType:"first-input",processingStart:(0,s.$S)(),processingEnd:(0,s.$S)(),startTime:e.timeStamp,duration:0,name:"",cancelable:!1,target:null,toJSON(){return{}}};"pointerdown"===e.type?function(t,e){(0,J.l)(t,window,["pointerup","pointercancel"],t=>{"pointerup"===t.type&&i(e)},{once:!0})}(t,n):i(n)},{passive:!0,capture:!0});return{stop:o};function i(t){if(!n){n=!0,o();const i=t.processingStart-t.startTime;i>=0&&i<(0,s.x3)()-e&&(t=>{r([t])})(t)}}}(t)),()=>{a.disconnect(),c&&c(),(0,st.DJ)(o)}})}let Un;function $n(t){return window.PerformanceObserver&&void 0!==PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes(t)}function Dn(t){return t.nodeType===Node.TEXT_NODE}function zn(t){return t.nodeType===Node.ELEMENT_NODE}function Bn(t){return zn(t)&&!!t.shadowRoot}function qn(t){const e=t;return!!e.host&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&zn(e.host)}function jn(t){return t.childNodes.length>0||Bn(t)}function Fn(t,e){let n=t.firstChild;for(;n;)e(n),n=n.nextSibling;Bn(t)&&e(t.shadowRoot)}function Wn(t){return qn(t)?t.host:t.parentNode}!function(t){t.EVENT="event",t.FIRST_INPUT="first-input",t.LARGEST_CONTENTFUL_PAINT="largest-contentful-paint",t.LAYOUT_SHIFT="layout-shift",t.LONG_TASK="longtask",t.LONG_ANIMATION_FRAME="long-animation-frame",t.NAVIGATION="navigation",t.PAINT="paint",t.RESOURCE="resource",t.VISIBILITY_STATE="visibility-state"}(Vn||(Vn={}));const Gn="data-kubesense-excluded-activity-mutations";function Zn(t,e,n,o,i,a){const c=function(t,e,n,o){return new r.cP(r=>{const i=[];let s,a=0;return i.push(e.subscribe(t=>{t.every(Kn)||c()}),n.subscribe(c),Mn(o,{type:Vn.RESOURCE}).subscribe(t=>{t.some(t=>!Hn(o,t.name))&&c()}),t.subscribe(7,t=>{Hn(o,t.url)||(void 0===s&&(s=t.requestIndex),a+=1,c())}),t.subscribe(8,t=>{Hn(o,t.url)||void 0===s||t.requestIndex<s||(a-=1,c())})),()=>{i.forEach(t=>t.unsubscribe())};function c(){r.notify({isBusy:a>0})}})}(t,e,n,o);return function(t,e,n){let r,o=!1;const i=(0,st.wg)((0,m.dm)(()=>l({hadActivity:!1})),100),a=void 0!==n?(0,st.wg)((0,m.dm)(()=>l({hadActivity:!0,end:(0,s.nx)()})),n):void 0,c=t.subscribe(({isBusy:t})=>{(0,st.DJ)(i),(0,st.DJ)(r);const e=(0,s.nx)();t||(r=(0,st.wg)((0,m.dm)(()=>l({hadActivity:!0,end:e})),100))}),u=()=>{o=!0,(0,st.DJ)(i),(0,st.DJ)(r),(0,st.DJ)(a),c.unsubscribe()};function l(t){o||(u(),e(t))}return{stop:u}}(c,i,a)}function Hn(t,e){return he(t.excludedActivityUrls,e)}function Kn(t){const e="characterData"===t.type?t.target.parentElement:t.target;return!!(e&&zn(e)&&e.matches(`[${Gn}], [${Gn}] *`))}const Jn="data-kubesense-action-name",Yn="Masked Element",Qn=[Jn,"data-testid","data-test","data-qa","data-cy","data-test-id","data-qa-id","data-testing","data-component","data-element","data-source-file"],Xn=[rr,function(t){if(t.id&&!nr(t.id))return"#"+CSS.escape(t.id)}],tr=[rr,function(t){if("BODY"===t.tagName)return;const e=t.classList;for(let n=0;n<e.length;n+=1){const r=e[n];if(!nr(r))return`${CSS.escape(t.tagName)}.${CSS.escape(r)}`}},function(t){return CSS.escape(t.tagName)}];function er(t,e){if(!t.isConnected)return;let n,r=t;for(;r&&"HTML"!==r.nodeName;){const t=ir(r,Xn,sr,e,n);if(t)return t;n=ir(r,tr,ar,e,n)||cr(or(r),n),r=r.parentElement}return n}function nr(t){return/[0-9]/.test(t)}function rr(t,e){if(e){const t=n(e);if(t)return t}for(const t of Qn){const e=n(t);if(e)return e}function n(e){if(t.hasAttribute(e))return`${CSS.escape(t.tagName)}[${e}="${CSS.escape(t.getAttribute(e))}"]`}}function or(t){let e=t.parentElement.firstElementChild,n=1;for(;e&&e!==t;)e.tagName===t.tagName&&(n+=1),e=e.nextElementSibling;return`${CSS.escape(t.tagName)}:nth-of-type(${n})`}function ir(t,e,n,r,o){for(const i of e){const e=i(t,r);if(e&&n(t,e,o))return cr(e,o)}}function sr(t,e,n){return 1===t.ownerDocument.querySelectorAll(cr(e,n)).length}function ar(t,e,n){let r;if(void 0===n)r=t=>t.matches(e);else{const t=cr(e+":scope",n);r=e=>null!==e.querySelector(t)}let o=t.parentElement.firstElementChild;for(;o;){if(o!==t&&r(o))return!1;o=o.nextElementSibling}return!0}function cr(t,e){return e?`${t}>${e}`:t}const ur={IGNORE:"ignore",HIDDEN:"hidden",ALLOW:we.ALLOW,MASK:we.MASK,MASK_USER_INPUT:we.MASK_USER_INPUT,MASK_UNLESS_ALLOWLISTED:we.MASK_UNLESS_ALLOWLISTED},lr="data-kubesense-privacy",dr="hidden",fr="***",pr="data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",mr={INPUT:!0,OUTPUT:!0,TEXTAREA:!0,SELECT:!0,OPTION:!0,DATALIST:!0,OPTGROUP:!0};function hr(t){return`[${lr}="${t}"], .kubesense-privacy-${t}`}function gr(t,e,n){if(n&&n.has(t))return n.get(t);const r=Wn(t),o=r?gr(r,e,n):e,i=vr(yr(t),o);return n&&n.set(t,i),i}function vr(t,e){switch(e){case ur.HIDDEN:case ur.IGNORE:return e}switch(t){case ur.ALLOW:case ur.MASK:case ur.MASK_USER_INPUT:case ur.MASK_UNLESS_ALLOWLISTED:case ur.HIDDEN:case ur.IGNORE:return t;default:return e}}function yr(t){if(zn(t)){if("BASE"===t.tagName)return ur.ALLOW;if("INPUT"===t.tagName){const e=t;if("password"===e.type||"email"===e.type||"tel"===e.type)return ur.MASK;if("hidden"===e.type)return ur.MASK;const n=e.getAttribute("autocomplete");if(n&&(n.startsWith("cc-")||n.endsWith("-password")))return ur.MASK}return t.matches(hr(ur.HIDDEN))?ur.HIDDEN:t.matches(hr(ur.MASK))?ur.MASK:t.matches(hr(ur.MASK_UNLESS_ALLOWLISTED))?ur.MASK_UNLESS_ALLOWLISTED:t.matches(hr(ur.MASK_USER_INPUT))?ur.MASK_USER_INPUT:t.matches(hr(ur.ALLOW))?ur.ALLOW:function(t){if("SCRIPT"===t.nodeName)return!0;if("LINK"===t.nodeName){const t=e("rel");return/preload|prefetch/i.test(t)&&"script"===e("as")||"shortcut icon"===t||"icon"===t}if("META"===t.nodeName){const n=e("name"),r=e("rel"),o=e("property");return/^msapplication-tile(image|color)$/.test(n)||"application-name"===n||"icon"===r||"apple-touch-icon"===r||"shortcut icon"===r||"keywords"===n||"description"===n||/^(og|twitter|fb):/.test(o)||/^(og|twitter):/.test(n)||"pinterest"===n||"robots"===n||"googlebot"===n||"bingbot"===n||t.hasAttribute("http-equiv")||"author"===n||"generator"===n||"framework"===n||"publisher"===n||"progid"===n||/^article:/.test(o)||/^product:/.test(o)||"google-site-verification"===n||"yandex-verification"===n||"csrf-token"===n||"p:domain_verify"===n||"verify-v1"===n||"verification"===n||"shopify-checkout-api-token"===n}function e(e){return(t.getAttribute(e)||"").toLowerCase()}return!1}(t)?ur.IGNORE:void 0}}function br(t,e){switch(e){case ur.MASK:case ur.HIDDEN:case ur.IGNORE:return!0;case ur.MASK_UNLESS_ALLOWLISTED:return Dn(t)?!!wr(t.parentNode)||!Er(t.textContent||""):wr(t);case ur.MASK_USER_INPUT:return Dn(t)?wr(t.parentNode):wr(t);default:return!1}}function _r(t,e,n,r,o){if(r!==ur.MASK&&r!==ur.MASK_UNLESS_ALLOWLISTED)return!1;if(e===lr||Qn.includes(e)||e===o.actionNameAttribute)return!1;switch(e){case"title":case"alt":case"placeholder":case"aria-label":case"name":return!0}return"A"===t&&"href"===e||"IFRAME"===t&&"srcdoc"===e||!(!n||!e.startsWith("data-"))||!("IMG"!==t&&"SOURCE"!==t||"src"!==e&&"srcset"!==e)}function wr(t){if(!t||t.nodeType!==t.ELEMENT_NODE)return!1;const e=t;if("INPUT"===e.tagName)switch(e.type){case"button":case"color":case"reset":case"submit":return!1}return!!mr[e.tagName]}const kr=t=>t.replace(/\S/g,"x");function Sr(t,e){var n;const r=null===(n=t.parentElement)||void 0===n?void 0:n.tagName;let o=t.textContent||"";if("HEAD"===r&&!o.trim())return;const i=e;if("SCRIPT"===r)o=fr;else if(i===ur.HIDDEN)o=fr;else if(br(t,i))if("DATALIST"===r||"SELECT"===r||"OPTGROUP"===r){if(!o.trim())return}else o="OPTION"===r?fr:i===ur.MASK_UNLESS_ALLOWLISTED?xr(o):kr(o);return o}function Er(t){var e;return!t||!t.trim()||(null===(e=window.$KUBESENSE_ALLOW)||void 0===e?void 0:e.has(t.toLocaleLowerCase()))||!1}function xr(t,e){return Er(t)?t:e||kr(t)}const Tr=s.OY;function Ar(t,e){const n=t.closest(`[${e}]`);if(n)return Nr(Or(n.getAttribute(e).trim()))}const Cr=[(t,e,n)=>{if("labels"in t&&t.labels&&t.labels.length>0)return Lr(t.labels[0],e,n)},t=>{if("INPUT"===t.nodeName){const e=t,n=e.getAttribute("type");if("button"===n||"submit"===n||"reset"===n)return{name:e.value,nameSource:"text_content"}}},(t,e,n)=>{if("BUTTON"===t.nodeName||"LABEL"===t.nodeName||"button"===t.getAttribute("role"))return Lr(t,e,n)},(t,e,n)=>Pr(t,"aria-label",e,n),(t,e,n)=>{const r=t.getAttribute("aria-labelledby");if(r)return{name:r.split(/\s+/).map(e=>function(t,e){return t.ownerDocument?t.ownerDocument.getElementById(e):null}(t,e)).filter(t=>!!t).map(t=>Vr(t,e,n)).join(" "),nameSource:"text_content"}},(t,e,n)=>Pr(t,"alt",e,n),(t,e,n)=>Pr(t,"name",e,n),(t,e,n)=>Pr(t,"title",e,n),(t,e,n)=>Pr(t,"placeholder",e,n),(t,e,n)=>{if("options"in t&&t.options.length>0)return Lr(t.options[0],e,n)}],Rr=[(t,e,n)=>Lr(t,e,n)];function Ir(t,e,n,r){let o=t,i=0;for(;i<=10&&o&&"BODY"!==o.nodeName&&"HTML"!==o.nodeName&&"HEAD"!==o.nodeName;){for(const t of e){const e=t(o,n,r);if(e){const{name:t,nameSource:n}=e,r=t&&t.trim();if(r)return{name:Nr(Or(r)),nameSource:n}}}if("FORM"===o.nodeName)break;o=o.parentElement,i+=1}}function Or(t){return t.replace(/\s+/g," ")}function Nr(t){return t.length>100?j(t,100)+" [...]":t}function Pr(t,e,n,r){const{enablePrivacyForActionName:o,defaultPrivacyLevel:i}=n;let s=t.getAttribute(e);if(s&&o){const o=gr(t,i,r);_r(t.tagName,e,s,o,n)&&(s=xr(s,Yn))}else s||(s="");return{name:s,nameSource:"standard_attribute"}}function Lr(t,e,n){return{name:Vr(t,e,n)||"",nameSource:"text_content"}}function Vr(t,e,n){if(t.isContentEditable)return;const{enablePrivacyForActionName:r,actionNameAttribute:o,defaultPrivacyLevel:i}=e;if((0,D.sr)(D.R9.USE_TREE_WALKER_FOR_ACTION_NAME))return function(t,e,n,r,o){const i=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,function(t){const i=gr(t,r,o);if(n&&i&&br(t,i))return NodeFilter.FILTER_REJECT;if(zn(t)){if(t.hasAttribute(Jn)||e&&t.hasAttribute(e))return NodeFilter.FILTER_REJECT;const n=getComputedStyle(t);if("visible"!==n.visibility||"none"===n.display||n.contentVisibility&&"visible"!==n.contentVisibility)return NodeFilter.FILTER_REJECT}return NodeFilter.FILTER_ACCEPT});let s="";for(;i.nextNode();){const t=i.currentNode;zn(t)?("BR"===t.nodeName||"P"===t.nodeName||["block","flex","grid","list-item","table","table-caption"].includes(getComputedStyle(t).display))&&(s+=" "):s+=t.textContent||""}return s.replace(/\s+/g," ").trim()}(t,o,r,i,n);if("innerText"in t){let e=t.innerText;const n=n=>{const r=t.querySelectorAll(n);for(let t=0;t<r.length;t+=1){const n=r[t];if("innerText"in n){const t=n.innerText;t&&t.trim().length>0&&(e=e.replace(t,""))}}};return n(`[${Jn}]`),o&&n(`[${o}]`),r&&n(`${hr(ur.HIDDEN)}, ${hr(ur.MASK)}`),e}return t.textContent}function Mr(){const t=window.getSelection();return!t||t.isCollapsed}function Ur(t){return t.target instanceof Element&&!1!==t.isPrimary}function $r(t){if(t.hasPageActivity||t.getUserActivity().input||t.getUserActivity().scroll)return!1;let e=t.event.target;return"LABEL"===e.tagName&&e.hasAttribute("for")&&(e=document.getElementById(e.getAttribute("for"))),!e||!e.matches('input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="range"]),textarea,select,[contenteditable],[contenteditable] *,canvas,a[href],a[href] *')}const Dr=10*s.OY,zr=new Map;function Br(t,e){zr.set(t,e),zr.forEach((t,e)=>{(0,s.vk)(e,(0,s.$S)())>Dr&&zr.delete(e)})}const qr=5*s.iW;function jr(t,e,n,o){const i=dt({expireDelay:qr}),a=new r.cP;let c;t.subscribe(10,()=>{i.reset()}),t.subscribe(5,f),t.subscribe(11,t=>{t.reason===Ye.y5.UNLOADING&&f()});const{stop:u}=function(t,{onPointerDown:e,onPointerUp:n}){let r,o,i={selection:!1,input:!1,scroll:!1};const s=[(0,J.q)(t,window,"pointerdown",t=>{Ur(t)&&(r=Mr(),i={selection:!1,input:!1,scroll:!1},o=e(t))},{capture:!0}),(0,J.q)(t,window,"selectionchange",()=>{r&&Mr()||(i.selection=!0)},{capture:!0}),(0,J.q)(t,window,"scroll",()=>{i.scroll=!0},{capture:!0,passive:!0}),(0,J.q)(t,window,"pointerup",t=>{if(Ur(t)&&o){const e=i;n(o,t,()=>e),o=void 0}},{capture:!0}),(0,J.q)(t,window,"input",()=>{i.input=!0},{capture:!0})];return{stop(){s.forEach(t=>t.stop())}}}(o,{onPointerDown:r=>function(t,e,n,r,o){let i;if(i=t.enablePrivacyForActionName?gr(r.target,t.defaultPrivacyLevel):ur.ALLOW,i===ur.HIDDEN)return;const s=function(t,e,n){const r=t.target.getBoundingClientRect(),o=er(t.target,n.actionNameAttribute);o&&Br(t.timeStamp,o);const{name:i,nameSource:s}=function(t,e,n=ur.ALLOW){const r=new Map,{actionNameAttribute:o}=e,i=Ar(t,Jn)||o&&Ar(t,o);return i?{name:i,nameSource:"custom_attribute"}:n===ur.MASK?{name:Yn,nameSource:"mask_placeholder"}:Ir(t,Cr,e,r)||Ir(t,Rr,e,r)||{name:"",nameSource:"blank"}}(t.target,n,e);return{type:V.CLICK,target:{width:Math.round(r.width),height:Math.round(r.height),selector:o},position:{x:Math.round(t.clientX-r.left),y:Math.round(t.clientY-r.top)},name:i,nameSource:s}}(r,i,t);let a=!1;return Zn(e,n,o,t,t=>{a=t.hadActivity},100),{clickActionBase:s,hadActivityOnPointerDown:()=>a}}(o,t,e,r,n),onPointerUp({clickActionBase:r,hadActivityOnPointerDown:s},c,u){!function(t,e,n,r,o,i,s,a,c,u,l){var d;const f=Fr(e,o,u,a,c);s(f);const p=null===(d=null==a?void 0:a.target)||void 0===d?void 0:d.selector;p&&Br(c.timeStamp,p);const{stop:m}=Zn(e,n,r,t,t=>{t.hadActivity&&t.end<f.startClocks.timeStamp?f.discard():t.hadActivity?f.stop(t.end):l()?f.stop(f.startClocks.timeStamp):f.stop()},Dr),h=e.subscribe(5,({endClocks:t})=>{f.stop(t.timeStamp)}),g=i.subscribe(()=>{f.stop()});f.stopObservable.subscribe(()=>{h.unsubscribe(),m(),g.unsubscribe()})}(o,t,e,n,i,a,d,r,c,u,s)}}),l={findActionId:t=>i.findAll(t)};return{stop(){f(),a.notify(),u()},actionContexts:l};function d(t){if(!c||!c.tryAppend(t)){const e=t.clone();c=function(t){const n=[];let r,o=0;function i(t){t.stopObservable.subscribe(a),n.push(t),(0,st.DJ)(r),r=(0,st.wg)(u,Tr)}function a(){1===o&&n.every(t=>t.isStopped())&&(o=2,function(t,e){const{isRage:n}=function(t,e){if(function(t){if(t.some(t=>t.getUserActivity().selection||t.getUserActivity().scroll))return!1;for(let e=0;e<t.length-2;e+=1)if(t[e+3-1].event.timeStamp-t[e].event.timeStamp<=s.OY)return!0;return!1}(t))return e.addFrustration("rage_click"),t.some($r)&&e.addFrustration(U),e.hasError&&e.addFrustration(M),{isRage:!0};const n=t.some(t=>t.getUserActivity().selection);return t.forEach(t=>{t.hasError&&t.addFrustration(M),$r(t)&&!n&&t.addFrustration(U)}),{isRage:!1}}(t,e);n?(t.forEach(t=>t.discard()),e.stop((0,s.nx)()),e.validate(t.map(t=>t.event))):(e.discard(),t.forEach(t=>t.validate()))}(n,e),c=void 0)}function u(){(0,st.DJ)(r),0===o&&(o=1,a())}return i(t),{tryAppend(t){return 0===o&&(n.length>0&&(e=n[n.length-1].event,r=t.event,!(e.target===r.target&&(s=e,a=r,Math.sqrt(Math.pow(s.clientX-a.clientX,2)+Math.pow(s.clientY-a.clientY,2))<=100)&&e.timeStamp-r.timeStamp<=Tr))?(u(),!1):(i(t),!0));var e,r,s,a},stop(){u()}}}(t)}}function f(){c&&c.stop()}}function Fr(t,e,n,o,i){const a=z(),c=(0,s.FR)(i.timeStamp),u=e.add(a,c.relative),l=Ln({lifeCycle:t,isChildEvent:t=>void 0!==t.action&&(Array.isArray(t.action.id)?t.action.id.includes(a):t.action.id===a)});let d,f=0;const p=[],m=new r.cP;function h(t){0===f&&(d=t,f=1,d?u.close((0,s.gs)(d)):u.remove(),l.stop(),m.notify())}return{event:i,stop:h,stopObservable:m,get hasError(){return l.eventCounts.errorCount>0},get hasPageActivity(){return void 0!==d},getUserActivity:n,addFrustration(t){p.push(t)},startClocks:c,isStopped:()=>1===f||2===f,clone:()=>Fr(t,e,n,o,i),validate(e){if(h(),1!==f)return;const{resourceCount:n,errorCount:r,longTaskCount:u}=l.eventCounts,m={duration:d&&(0,s.vk)(c.timeStamp,d),startClocks:c,id:a,frustrationTypes:p,counts:{resourceCount:n,errorCount:r,longTaskCount:u},events:null!=e?e:[i],event:i,...o};t.notify(0,m),f=2},discard(){h(),f=2}}}function Wr(t){const e=Gr(t)?{action:{id:t.id,loading_time:Pn((0,s.Zj)(t.duration)),frustration:{type:t.frustrationTypes},error:{count:t.counts.errorCount},long_task:{count:t.counts.longTaskCount},resource:{count:t.counts.resourceCount}},_kubesense:{action:{target:t.target,position:t.position,name_source:t.nameSource}}}:{context:t.context},n=(0,v.kg)({action:{id:z(),target:{name:t.name},type:t.type},date:t.startClocks.timeStamp,type:O.ACTION},e),r=Gr(t)?t.duration:void 0,o=Gr(t)?{events:t.events}:{handlingStack:t.handlingStack};return{rawRumEvent:n,duration:r,startTime:t.startClocks.relative,domainContext:o}}function Gr(t){return t.type!==V.CUSTOM}var Zr=n(416);let Hr={};const Kr="csp_violation";function Jr(t){return{startClocks:(0,s.M8)(),source:l.g.REPORT,handling:"unhandled",...t}}function Yr(t,e,n,r,o){return n?(0,y.Yn)({name:t,message:e,stack:[{func:"?",url:n,line:null!=r?r:void 0,column:null!=o?o:void 0}]}):void 0}var Qr=n(981);const Xr=s.OY,to=new WeakSet;function eo(t){return(0,s.Gw)(t.startTime,t.duration)}var no=n(846);const ro=2*s.iW;function oo(t){const e=function(t){const e=t.querySelector("meta[name=kubesense-trace-id]"),n=t.querySelector("meta[name=kubesense-trace-time]");return io(e&&e.content,n&&n.content)}(t)||function(t){const e=function(t){for(let e=0;e<t.childNodes.length;e+=1){const n=so(t.childNodes[e]);if(n)return n}if(t.body)for(let e=t.body.childNodes.length-1;e>=0;e-=1){const n=t.body.childNodes[e],r=so(n);if(r)return r;if(!Dn(n))break}}(t);if(e)return io(q(e,"trace-id"),q(e,"trace-time"))}(t);if(e&&!(e.traceTime<=(0,s.x3)()-ro))return e.traceId}function io(t,e){const n=e&&Number(e);if(t&&n)return{traceId:t,traceTime:n}}function so(t){if(t&&function(t){return t.nodeType===Node.COMMENT_NODE}(t)){const e=/^\s*KUBESENSE;(.*?)\s*$/.exec(t.data);if(e)return e[1]}}function ao(){if($n(Vn.NAVIGATION)){const t=performance.getEntriesByType(Vn.NAVIGATION)[0];if(t)return t}const t=function(){const t={},e=performance.timing;for(const n in e)if((0,zt.Et)(e[n])){const r=n,o=e[r];t[r]=0===o?0:(0,s.gs)(o)}return t}(),e={entryType:Vn.NAVIGATION,initiatorType:"navigation",name:window.location.href,startTime:0,duration:t.loadEventEnd,decodedBodySize:0,encodedBodySize:0,transferSize:0,workerStart:0,toJSON:()=>({...e,toJSON:void 0}),...t};return e}function co(t,e,n=ao){(0,no.H)(t,"interactive",()=>{const t=n(),r=Object.assign(t.toJSON(),{entryType:Vn.RESOURCE,initiatorType:fn,duration:t.responseEnd,traceId:oo(document),toJSON:()=>({...r,toJSON:void 0})});e(r)})}function uo(t,e,n,r=function(){const t=[];function e(e){let r;if(e.didTimeout){const t=performance.now();r=()=>30-(performance.now()-t)}else r=e.timeRemaining.bind(e);for(;r()>0&&t.length;)t.shift()();t.length&&n()}function n(){(0,Qr.BB)(e,{timeout:Xr})}return{push(e){1===t.push(e)&&n()},stop(){t.length=0}}}(),o=co){let i;const a=e.trackEarlyRequests;a?i=function(t){const e=new Set,n=t.subscribe(8,t=>{e.add(t),e.size>1e3&&((0,h.A2)("Too many requests"),e.delete(e.values().next().value))});return{getMatchingRequest(t){let n,r=1/0;for(const o of e){const e=t.startTime-o.startClocks.relative;0<=e&&e<r&&o.url===t.name&&(r=Math.abs(e),n=o)}return n&&e.delete(n),n},stop(){n.unsubscribe()}}}(t):t.subscribe(8,t=>{u(()=>function(t,e,n){const r=function(t){if(!performance||!("getEntriesByName"in performance))return;const e=performance.getEntriesByName(t.url,"resource");if(!e.length||!("toJSON"in e[0]))return;const n=e.filter(t=>!to.has(t)).filter(t=>yn(t)).filter(e=>{return n=e,r=t.startClocks.relative,o=eo({startTime:t.startClocks.relative,duration:t.duration}),n.startTime>=r-1&&eo(n)<=(0,s.Gw)(o,1);var n,r,o});return 1===n.length?(to.add(n[0]),n[0].toJSON()):void 0}(t);return fo(r,t,n,e)}(t,e,n))});const c=Mn(e,{type:Vn.RESOURCE,buffered:!0}).subscribe(t=>{for(const r of t)!a&&gn(r)||u(()=>lo(r,e,n,i))});function u(e){r.push(()=>{const n=e();n&&t.notify(12,n)})}return o(e,t=>{u(()=>lo(t,e,n,i))}),{stop(){r.stop(),c.unsubscribe()}}}function lo(t,e,n,r){return fo(t,gn(t)&&r?r.getMatchingRequest(t):void 0,n,e)}function fo(t,e,n,r){if(!t&&!e)return;const o=e?function(t,e){if(t.traceSampled&&t.traceId&&t.spanId)return{_kubesense:{span_id:t.spanId.toString(),trace_id:t.traceId.toString(),rule_psr:e.rulePsr}}}(e,r):function(t,e){if(t.traceId)return{_kubesense:{trace_id:t.traceId,span_id:Ae().toString(),rule_psr:e.rulePsr}}}(t,r);if(!r.trackResources&&!o)return;const i=t?(0,s.FR)(t.startTime):e.startClocks,a=t?function(t){const{duration:e,startTime:n,responseEnd:r}=t;return 0===e&&n<r?(0,s.vk)(n,r):e}(t):function(t,e,n){return t.wasInPageStateDuringPeriod("frozen",e.relative,n)?void 0:n}(n,i,e.duration),c=e&&function(t,e){const n=In(t.url,e);if(n)return function(t,e){const n=function(t,e=!1){if(!t||"string"!=typeof t)return;let n,r,o;try{n=JSON.parse(t)}catch(i){return}if(!n)return;if(n.query){const t=n.query.trim();r=null===(i=t.match(/^\s*(query|mutation|subscription)\b/i))||void 0===i?void 0:i[1],e&&(o=j(t,Rn,"..."))}var i;const s=n.operationName;let a;return n.variables&&(a=JSON.stringify(n.variables)),{operationType:r,operationName:s,variables:a,payload:o}}(t.requestBody,e.trackPayload);if(n){if(e.trackResponseErrors&&t.responseBody){const e=function(t){let e;try{e=JSON.parse(t)}catch(t){return}if(!e||"object"!=typeof e)return;const n=e;return K(n.errors)?n.errors.map(t=>{var e;return{message:t.message,path:t.path,locations:t.locations,code:null===(e=t.extensions)||void 0===e?void 0:e.code}}):void 0}(t.responseBody);e&&(n.error_count=e.length,n.errors=e)}return n}}(t,n)}(e,r),u=(0,v.kg)({date:i.timeStamp,resource:{id:z(),duration:(0,s.Zj)(a),type:e?e.type===dn?an:cn:mn(t),method:e?e.method:void 0,status_code:e?e.status:(l=t.responseStatus,0===l?void 0:l),url:e?Cn(e.url):t.name,protocol:t&&wn(t),delivery_type:t&&kn(t),provider:Tn(e?e.url:t.name,r.firstPartyDomains),graphql:c},type:O.RESOURCE,_kubesense:{discarded:!r.trackResources}},o,t&&function(t){const{renderBlockingStatus:e}=t;return{resource:{render_blocking_status:e,...Sn(t),...vn(t)}}}(t));var l;return{startTime:i.relative,duration:a,rawRumEvent:u,domainContext:po(t,e)}}function po(t,e){if(e){const n={performanceEntry:t,isAborted:e.isAborted,handlingStack:e.handlingStack};return e.type===dn?{xhr:e.xhr,...n}:{requestInput:e.input,requestInit:e.init,response:e.response,error:e.error,...n}}return{performanceEntry:t}}function mo(){try{return(new Intl.DateTimeFormat).resolvedOptions().timeZone}catch(t){return}}const ho=10*s.iW,go=10*s.iW;function vo(t,e,n=window){if("hidden"===document.visibilityState)return{timeStamp:0,stop:kt.l};if($n(Vn.VISIBILITY_STATE)){const t=performance.getEntriesByType(Vn.VISIBILITY_STATE).filter(t=>"hidden"===t.name).find(t=>t.startTime>=e.relative);if(t)return{timeStamp:t.startTime,stop:kt.l}}let r=1/0;const{stop:o}=(0,J.l)(t,n,["pagehide","visibilitychange"],t=>{"pagehide"!==t.type&&"hidden"!==document.visibilityState||(r=t.timeStamp,o())},{capture:!0});return{get timeStamp(){return r},stop:o}}const yo=(t,e)=>t*e,bo=t=>yo(t.previousRect.width,t.previousRect.height)+yo(t.currentRect.width,t.currentRect.height)-((t,e)=>{const n=Math.max(t.left,e.left),r=Math.max(t.top,e.top),o=Math.min(t.right,e.right),i=Math.min(t.bottom,e.bottom);return n>=o||r>=i?0:yo(o-n,i-r)})(t.previousRect,t.currentRect);function _o(t){let e;for(const n of t)if(n.node&&zn(n.node)){const t=bo(n);(!e||bo(e)<t)&&(e=n)}return e}function wo({x:t,y:e,width:n,height:r}){return{x:t,y:e,width:n,height:r}}const ko=5*s.OY,So=s.OY;let Eo,xo=0,To=1/0,Ao=0;const Co=()=>Eo?xo:window.performance.interactionCount||0,Ro=1*s.iW;function Io(){let t;const e=window.visualViewport;return t=e?e.pageLeft-e.offsetLeft:void 0!==window.scrollX?window.scrollX:window.pageXOffset||0,Math.round(t)}function Oo(){let t;const e=window.visualViewport;return t=e?e.pageTop-e.offsetTop:void 0!==window.scrollY?window.scrollY:window.pageYOffset||0,Math.round(t)}let No;function Po(t){return No||(No=function(t){return new r.cP(e=>{const{throttled:n}=(0,kt.n)(()=>{e.notify(Lo())},200);return(0,J.q)(t,window,"resize",n,{capture:!0,passive:!0}).stop})}(t)),No}function Lo(){const t=window.visualViewport;return t?{width:Number(t.width*t.scale),height:Number(t.height*t.scale)}:{width:Number(window.innerWidth||0),height:Number(window.innerHeight||0)}}const Vo=s.OY,Mo=5*s.iW,Uo=5*s.iW;function $o(t){const e=t.indexOf("?");return e<0?t:t.slice(0,e)}function Do({cumulativeLayoutShift:t,interactionToNextPaint:e},{firstContentfulPaint:n,firstInput:r,largestContentfulPaint:o}){return{cls:t&&{score:t.value,timestamp:(0,s.Zj)(t.time),target_selector:t.targetSelector,previous_rect:t.previousRect,current_rect:t.currentRect},fcp:n&&{timestamp:(0,s.Zj)(n)},fid:r&&{duration:(0,s.Zj)(r.delay),timestamp:(0,s.Zj)(r.time),target_selector:r.targetSelector},inp:e&&{duration:(0,s.Zj)(e.value),timestamp:(0,s.Zj)(e.time),target_selector:e.targetSelector},lcp:o&&{timestamp:(0,s.Zj)(o.value),target_selector:o.targetSelector,resource_url:o.resourceUrl}}}const zo=s.iW,Bo=ft;let qo=[];async function jo(){let t;return t="cookieStore"in window?await window.cookieStore.getAll(qt):document.cookie.split(/\s*;\s*/).filter(t=>t.startsWith(qt)),{count:t.length,domain:Lt()||"undefined",...t}}var Fo=n(725),Wo=n(723),Go=n(673);const Zo=ft;function Ho(t){return Object.prototype.hasOwnProperty.call(history,t)?history:History.prototype}const Ko=ft,Jo=10*s.OY;let Yo,Qo;function Xo(){0!==Yo.batchCount&&((0,h.Gk)("Customer data measures",Yo),ei())}function ti(t,e){t.sum+=e,t.min=Math.min(t.min,e),t.max=Math.max(t.max,e)}function ei(){Yo={batchCount:0,batchBytesCount:{min:1/0,max:0,sum:0},batchMessagesCount:{min:1/0,max:0,sum:0}}}const ni=ft;function ri(t,e,n){if(0!==t.length)return t.slice(-n).reverse().map(({state:t,startTime:n})=>({state:t,start:(0,s.Zj)((0,s.vk)(e,n))}))}function oi(){return"hidden"===document.visibilityState?"hidden":document.hasFocus()?"active":"passive"}const ii=s.OY;function si(t,e){const n=q(document.cookie,t),r=(0,st.yb)(()=>{const r=q(document.cookie,t);r!==n&&e(r)},ii);return()=>{(0,st.vG)(r)}}const ai="kubesense-ci-visibility-test-execution-id",ci=ft;function ui(t,e,n){const r={date:e.timeStamp,type:O.LONG_TASK,_kubesense:{discarded:!1}};return t.entryType===Vn.LONG_TASK?{...r,long_task:{id:n,entry_type:"long-task",duration:(0,s.Zj)(t.duration)}}:{...r,long_task:{id:n,entry_type:"long-animation-frame",duration:(0,s.Zj)(t.duration),blocking_duration:(0,s.Zj)(t.blockingDuration),first_ui_event_timestamp:(0,s.Zj)(t.firstUIEventTimestamp),render_start:(0,s.Zj)(t.renderStart),style_and_layout_start:(0,s.Zj)(t.styleAndLayoutStart),start_time:(0,s.Zj)(t.startTime),scripts:t.scripts.map(t=>({duration:(0,s.Zj)(t.duration),pause_duration:(0,s.Zj)(t.pauseDuration),forced_style_and_layout_duration:(0,s.Zj)(t.forcedStyleAndLayoutDuration),start_time:(0,s.Zj)(t.startTime),execution_start:(0,s.Zj)(t.executionStart),source_url:t.sourceURL,source_function_name:t.sourceFunctionName,source_char_position:t.sourceCharPosition,invoker:t.invoker,invoker_type:t.invokerType,window_attribution:t.windowAttribution}))}}}function li(t,e,n=3e3){let r=0,o=!1;return{isLimitReached(){if(0===r&&(0,st.wg)(()=>{r=0},s.iW),r+=1,r<=n||o)return o=!1,!1;if(r===n+1){o=!0;try{e({message:`Reached max number of ${t}s by minute: ${n}`,source:l.g.AGENT,startClocks:(0,s.M8)()})}finally{o=!1}}return!0}}}var di=n(485);function fi(t,e,n){const r=(0,v.Go)(t),o=n(r);return(0,jt.WP)(e).forEach(([e,n])=>pi(t,r,e.split(/\.|(?=\[\])/),n)),o}function pi(t,e,n,r){const[o,...i]=n;if("[]"!==o){if(mi(t)&&mi(e))return i.length>0?pi(t[o],e[o],i,r):void function(t,e,n,r){const o=(0,tt.P)(n);o===r?t[e]=(0,b.a)(n):"object"!==r||"undefined"!==o&&"null"!==o||(t[e]={})}(t,o,e[o],r)}else Array.isArray(t)&&Array.isArray(e)&&t.forEach((t,n)=>pi(t,e[n],i,r))}function mi(t){return"object"===(0,tt.P)(t)}const hi={"view.name":"string","view.url":"string","view.referrer":"string"},gi={context:"object"},vi={service:"string",version:"string"};let yi;var bi=n(489);const _i={"Microsoft Edge":1,"Google Chrome":2,Chromium:3,Opera:4,Brave:5};function wi(t){var e;if(!t||0===t.length)return;let n,r=Number.MAX_SAFE_INTEGER;for(const o of t){if(!o.brand||0===o.brand.indexOf("Not"))continue;const t=null!==(e=_i[o.brand])&&void 0!==e?e:99;t<r&&(n=o,r=t)}return null!=n?n:t.find(t=>t.brand&&0!==t.brand.indexOf("Not"))}function ki(t){const e=t.indexOf(".");return e>=0?t.slice(0,e):t}function Si(){const t=c.J2.navigator;return null==t?void 0:t.userAgentData}const Ei=it.XP,xi=[O.ACTION,O.ERROR,O.LONG_TASK,O.RESOURCE,O.VITAL];function Ti(t,e,n,o,c,d,f,p,g){const _=[],w=new tn,k=Ei();w.subscribe(13,t=>(0,Je.b)("rum",t));const S=t=>{w.notify(14,{error:t}),(0,h.A2)("Error reported to customer",{"error.message":t.message})},E=(0,Ye._T)(t),x=E.subscribe(t=>{w.notify(11,t)});_.push(()=>x.unsubscribe());const T=(0,h.a5)("kubesense-browser-rum-sdk",t,k,S,E,c);_.push(T.stop);const A=(0,wt.d0)()?function(){const t={id:"00000000-aaaa-0000-aaaa-000000000000",sessionReplay:(0,wt.Ww)("records")?1:0};return{findTrackedSession(){return t},expire:kt.l,expireObservable:new r.cP,setForcedReplay:kt.l}}():function(t,e,n){const o=function(t,e,n,o){const i=new r.cP,a=new r.cP,c=function(t,e,n,o,i=function(t,e){return t.type===ht?function(t,e){const n={isLockEnabled:(0,Bt.F2)(),persistSession(n){return Xt(e,t,n,pt)},retrieveSession(){return te(e,t)},expireSession(n){return Xt(e,t,Wt(n,t),ft)}};return function(t){if(!Nt(qt)){const e=Nt("_kubesense"),n=Nt("_kubesense_r"),r=Nt("_kubesense_l"),o={};e&&(o.id=e),r&&/^[01]$/.test(r)&&(o.logs=r),n&&/^[012]$/.test(n)&&(o.rum=n),Zt(o)&&(Kt(o),t.persistSession(o))}}(n),n}(e,t.cookieOptions):function(t){return{isLockEnabled:!1,persistSession:re,retrieveSession:oe,expireSession(e){return function(t,e){re(Wt(t,e))}(e,t)}}}(e)}(t,e)){const a=new r.cP,c=new r.cP,u=new r.cP,l=(0,st.yb)(function(){ce({process:t=>Ht(t)?Wt(t,e):void 0,after:m},i)},fe);let d;h();const{throttled:f,cancel:p}=(0,kt.n)(()=>{ce({process(t){if(Gt(t))return;const e=m(t);return function(t){if(Gt(t))return!1;const e=o(t[n]);t[n]=e,delete t.isExpired,"0"===e||t.id||(t.id=z(),t.created=(0,s.x3)()+"")}(e),e},after(t){Zt(t)&&!g()&&function(t){d=t,a.notify()}(t),d=t}},i)},fe);function m(t){return Ht(t)&&(t.anonymousId=z(),t=Wt(t,e)),g()&&(function(t){return d.id!==t.id||d[n]!==t[n]}(t)?(d=Wt(d,e),c.notify()):(u.notify({previousState:d,newState:t}),d=t)),t}function h(){ce({process(t){if(Gt(t))return Wt(t,e)},after(t){d=t}},i)}function g(){return void 0!==(null==d?void 0:d[n])}return{expandOrRenewSession:f,expandSession(){const t=i.retrieveSession();Ht(t)?ce({process:t=>Ht(t)?Wt(t,e):void 0,after:m},i):m(t)},getSession:()=>d,renewObservable:a,expireObservable:c,sessionStateUpdateObservable:u,restartSession:h,expire(t){p(),!1===t&&d&&delete d.anonymousId,i.expireSession(d),m(Wt(d,e))},stop(){(0,st.vG)(l)},updateSessionState(t){ce({process:e=>({...e,...t}),after:m},i)}}}(t.sessionStoreStrategyType,t,e,n);qo.push(()=>c.stop());const u=dt({expireDelay:Bo});if(qo.push(()=>u.stop()),c.renewObservable.subscribe(()=>{u.add(l(),(0,s.$S)()),i.notify()}),c.expireObservable.subscribe(()=>{a.notify(),u.closeActive((0,s.$S)())}),c.expandOrRenewSession(),u.add(l(),(0,s.Oc)().relative),(0,D.sr)(D.R9.SHORT_SESSION_INVESTIGATION)){const e=c.getSession();e&&function(t,e){if(!window.cookieStore||!e.created)return;const n=Number(e.created),r=(0,s.x3)(),{stop:o}=(0,J.q)(t,cookieStore,"change",function(t){const i=(0,jt.Uk)(t.changed,t=>t.name===qt);if(!i)return;const a=(0,s.x3)()-n;if(a>14*s.iW)o();else{const t=Yt(i.value);if(t.id&&t.id!==e.id){o();const n=(0,s.x3)()-r;jo().then(r=>{(0,h.A2)("Session cookie changed",{time:n,session_age:a,old:e,new:t,cookie:r})}).catch(m.Dx)}}});qo.push(o)}(t,e)}function l(){const n=c.getSession();return n?{id:n.id,trackingType:n[e],isReplayForced:!!n.forcedReplay,anonymousId:n.anonymousId}:(async function(t){const e=t.sessionStoreStrategyType;if(!e)return;let n,r;e.type===ht?(n=te(e.cookieOptions,t),r={cookie:await jo(),currentDomain:`${window.location.protocol}//${window.location.hostname}`}):n=oe(),(0,h.A2)("Unexpected session state",{sessionStoreStrategyType:e.type,session:n,isSyntheticsTest:$t(),createdTimestamp:null==n?void 0:n.created,expireTimestamp:null==n?void 0:n.expire,...r})}(t).catch(()=>{}),{id:"invalid",trackingType:"0",isReplayForced:!1,anonymousId:void 0})}return o.observable.subscribe(()=>{o.isGranted()?c.expandOrRenewSession():c.expire(!1)}),function(t){const{stop:e}=(0,J.l)(t,window,["click","touchstart","keydown","scroll"],()=>{o.isGranted()&&c.expandOrRenewSession()},{capture:!0,passive:!0});qo.push(e)}(t),function(t){const e=()=>{"visible"===document.visibilityState&&c.expandSession()},{stop:n}=(0,J.q)(t,document,"visibilitychange",e);qo.push(n);const r=(0,st.yb)(e,zo);qo.push(()=>{(0,st.vG)(r)})}(t),function(t){const{stop:e}=(0,J.q)(t,window,"resume",()=>c.restartSession(),{capture:!0});qo.push(e)}(t),{findSession(t,e){return u.find(t,e)},renewObservable:i,expireObservable:a,sessionStateUpdateObservable:c.sessionStateUpdateObservable,expire:c.expire,updateSessionState:c.updateSessionState}}(t,"rum",e=>function(t,e){return"0"===(n=e)||"1"===n||"2"===n?e:(0,zt.ic)(t.sessionSampleRate)?(0,zt.ic)(t.sessionReplaySampleRate)?"1":"2":"0";var n}(t,e),n);return o.expireObservable.subscribe(()=>{e.notify(9)}),o.renewObservable.subscribe(()=>{e.notify(10)}),o.sessionStateUpdateObservable.subscribe(({previousState:t,newState:e})=>{if(!t.forcedReplay&&e.forcedReplay){const t=o.findSession();t&&(t.isReplayForced=!0)}}),{findTrackedSession(t){const e=o.findSession(t);if(e&&"0"!==e.trackingType)return{id:e.id,sessionReplay:"1"===e.trackingType?1:e.isReplayForced?2:0,anonymousId:e.anonymousId}},expire:o.expire,expireObservable:o.expireObservable,setForcedReplay(){return o.updateSessionState({forcedReplay:"1"})}}}(t,w,d);if((0,wt.d0)())!function(t){const e=(0,wt.Y9)();t.subscribe(13,t=>{e.send("rum",t)})}(w);else{const e=function(t,e,n,r,o,i){const s=[t.rumEndpointBuilder];t.replica&&s.push(t.replica.rumEndpointBuilder);const a=(0,Fo.sA)(s,n),c=(0,Wo.X)({encoder:i(2),request:a,flushController:(0,Go.tO)({pageMayExitObservable:r,sessionExpireObservable:o})});return r.subscribe(()=>{a.sendQueuedOnExit()}),e.subscribe(13,t=>{t.type===O.VIEW?c.upsert(t,t.view.id):c.add(t)}),c}(t,w,S,E,A.expireObservable,c);_.push(()=>e.stop()),function(t,e,n){t.metricsEnabled&&(ei(),Qo=!1,e.subscribe(13,()=>{Qo=!0}),n.subscribe(({bytesCount:t,messagesCount:e})=>{Qo&&(Qo=!1,Yo.batchCount+=1,ti(Yo.batchBytesCount,t),ti(Yo.batchMessagesCount,e))}),(0,st.yb)(Xo,Jo))}(T,w,e.flushController.flushObservable)}!function(t,e){t.register(1,()=>e.isGranted()?it.$O:it.ug)}(k,d);const{stop:C}=function(t,e){if(!e.metricsEnabled)return{stop:kt.l};const{unsubscribe:n}=t.subscribe(4,({initialViewMetrics:t})=>{var e,r;t.largestContentfulPaint&&t.navigationTimings&&((0,h.Gk)("Initial view metrics",{metrics:(e=t.largestContentfulPaint,r=t.navigationTimings,{lcp:{value:e.value},navigation:{domComplete:r.domComplete,domContentLoaded:r.domContentLoaded,domInteractive:r.domInteractive,firstByte:r.firstByte,loadEvent:r.loadEvent}})}),n())});return{stop:n}}(w,T);_.push(C);const{stop:I,...V}=function(t,e,n,o,c,d,f,p,h,g){const _=[],w=function(){const t=Xe();return new r.cP(e=>{if(!t)return;const n=new t((0,m.dm)(t=>e.notify(t)));return n.observe(document,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),()=>n.disconnect()})}(),k=function(t,e){let n=(0,Y.yG)(e);return new r.cP(r=>{const{stop:o}=function(t,e){const{stop:n}=(0,i.H)(Ho("pushState"),"pushState",({onPostCall:t})=>{t(e)}),{stop:r}=(0,i.H)(Ho("replaceState"),"replaceState",({onPostCall:t})=>{t(e)}),{stop:o}=(0,J.q)(t,window,"popstate",e);return{stop(){n(),r(),o()}}}(t,a),{stop:s}=function(t,e){return(0,J.q)(t,window,"hashchange",e)}(t,a);function a(){if(n.href===e.href)return;const t=(0,Y.yG)(e);r.notify({newLocation:t,oldLocation:n}),n=t}return()=>{o(),s()}})}(n,location),{observable:S,stop:E}=function(){const t=new r.cP,{stop:e}=(0,i.H)(window,"open",()=>t.notify());return{observable:t,stop:e}}();_.push(E),function(t,e,n){t.register(0,({eventType:t})=>{const r=e.source;return{type:t,_kubesense:{format_version:2,drift:(0,s.TP)(),configuration:{session_sample_rate:(0,zt.LI)(e.sessionSampleRate,3),session_replay_sample_rate:(0,zt.LI)(e.sessionReplaySampleRate,3),profiling_sample_rate:(0,zt.LI)(e.profilingSampleRate,3),trace_sample_rate:(0,zt.LI)(e.traceSampleRate,3),beta_encode_cookie_options:e.betaEncodeCookieOptions},browser_sdk_version:(0,wt.d0)()?"1.3.0":void 0,sdk_name:n},application:{id:e.applicationId},date:(0,s.nx)(),source:r}}),t.register(1,()=>({application:{id:e.applicationId}}))}(e,n,h);const x=function(t,e,n=500){const r=dt({expireDelay:ni,maxEntries:4e3});let o;$n(Vn.VISIBILITY_STATE)&&performance.getEntriesByType(Vn.VISIBILITY_STATE).forEach(t=>{a("hidden"===t.name?"hidden":"active",t.startTime)}),a(oi(),(0,s.$S)());const{stop:i}=(0,J.l)(e,window,["pageshow","focus","blur","visibilitychange","resume","freeze","pagehide"],t=>{a(function(t){return"freeze"===t.type?"frozen":"pagehide"===t.type?t.persisted?"frozen":"terminated":oi()}(t),t.timeStamp)},{capture:!0});function a(t,e=(0,s.$S)()){t!==o&&(o=t,r.closeActive(e),r.add({state:o,startTime:e},e))}function c(t,e,n){return r.findAll(e,n).some(e=>e.state===t)}return t.register(0,({startTime:t,duration:e=0,eventType:o})=>o===O.VIEW?{type:o,_kubesense:{page_states:ri(r.findAll(t,e),t,n)}}:o===O.ACTION||o===O.ERROR?{type:o,view:{in_foreground:c("active",t,0)}}:it.$O),{wasInPageStateDuringPeriod:c,addPageState:a,stop(){i(),r.stop()}}}(e,n);_.push(()=>x.stop());const T=function(t){const e=dt({expireDelay:en});return t.subscribe(1,t=>{e.add(function(t){return{service:t.service,version:t.version,context:t.context,id:t.id,name:t.name,startClocks:t.startClocks}}(t),t.startClocks.relative)}),t.subscribe(6,({endClocks:t})=>{e.closeActive(t.relative)}),t.subscribe(3,t=>{const n=e.find(t.startClocks.relative);n&&(t.name&&(n.name=t.name),t.context&&(n.context=t.context),n.sessionIsActive=t.sessionIsActive)}),t.subscribe(10,()=>{e.reset()}),{findView(t){return e.find(t)},stop(){e.stop()}}}(t);_.push(()=>T.stop());const A=function(t,e,n,r){const o=dt({expireDelay:Zo});let i;t.subscribe(1,({startClocks:t})=>{const e=r.href;o.add(c({url:e,referrer:i||document.referrer}),t.relative),i=e}),t.subscribe(6,({endClocks:t})=>{o.closeActive(t.relative)});const a=n.subscribe(({newLocation:t})=>{const e=o.find();if(e){const n=(0,s.$S)();o.closeActive(n),o.add(c({url:t.href,referrer:e.referrer}),n)}});function c({url:t,referrer:e}){return{url:t,referrer:e}}return e.register(0,({startTime:t,eventType:e})=>{const n=o.find(t);return n?{type:e,view:{url:n.url,referrer:n.referrer}}:it.ug}),{findUrl(t){return o.find(t)},stop(){a.unsubscribe(),o.stop()}}}(t,e,k,location);_.push(()=>A.stop());const C=function(t,e,n){const r=dt({expireDelay:Ko});return t.subscribe(1,({startClocks:t})=>{r.add({},t.relative)}),t.subscribe(6,({endClocks:t})=>{r.closeActive(t.relative)}),e.register(0,({startTime:t,eventType:e})=>{if(!n.trackFeatureFlagsForEvents.concat([O.VIEW,O.ERROR]).includes(e))return it.$O;const o=r.find(t);return!o||(0,Y.RI)(o)?it.$O:{type:e,feature_flags:o}}),{addFeatureFlagEvaluation(t,e){const n=r.find();n&&(n[t]=e)}}}(t,e,n);(function(t,e,n,r){t.register(0,({eventType:t,startTime:o})=>{const i=e.findTrackedSession(o),s=r.findView(o);if(!i||!s)return it.ug;let a,c,u;return t===O.VIEW?(a=!!n.getReplayStats(s.id)||void 0,c=1===i.sessionReplay,u=!!s.sessionIsActive&&void 0):a=!!n.isRecording()||void 0,{type:t,session:{id:i.id,type:"user",has_replay:a,sampled_for_replay:c,is_active:u}}}),t.register(1,({startTime:t})=>{const n=e.findTrackedSession(t);return n?{session:{id:n.id}}:it.$O})})(e,o,c,T),function(t){t.register(0,({eventType:t})=>({type:t,connectivity:(0,bi.q)()}))}(e),function(t){let e=function(){const t=Si();if(!t)return;const e=wi(t.brands);return e?{browser:{name:e.brand,version:e.version}}:void 0}();(function(){const t=Si();return t&&"function"==typeof t.getHighEntropyValues?t.getHighEntropyValues(["fullVersionList","platformVersion","model","architecture","bitness"]).then(e=>{var n,r;const o={},i=null!==(n=wi(e.fullVersionList))&&void 0!==n?n:wi(t.brands);i&&(o.browser={name:i.brand,version:i.version});const s=null!==(r=e.platformVersion)&&void 0!==r?r:"",a=t.platform||e.platform||"";s&&a&&(o.os={name:a,version:s,version_major:ki(s)});const c=e.model||"",u=e.architecture||"";return(c||u||t.mobile)&&(o.device={type:t.mobile?"mobile":"desktop",model:c||void 0,architecture:u||void 0}),o}).catch(()=>{}):Promise.resolve(void 0)})().then(t=>{t&&(e=t)}),t.register(0,({eventType:t})=>e?{type:t,...e.browser&&{browser:e.browser},...e.os&&{os:e.os},...e.device&&{device:e.device}}:{type:t})}(e);const I=function(t,e){const n=ot();return e.storeContextsAcrossPages&&X(e,n,"rum",2),t.register(0,()=>({context:n.getContext()})),n}(e,n),V=function(t,e,n,r){const o=bt();if(e.storeContextsAcrossPages&&X(e,o,r,1),n.expire){const t=o.getContext().id,e=function(t){try{return localStorage.getItem(vt(t))||void 0}catch(t){return}}(r),i=void 0!==t?t+"":void 0;void 0!==e&&void 0!==i&&e!==i&&n.expire(),yt(r,null!=i?i:e);let s=null!=i?i:e;o.changeObservable.subscribe(()=>{const t=o.getContext().id,e=void 0!==t?t+"":void 0;e!==s&&(n.expire(),yt(r,e)),s=e})}const i=dt({expireDelay:ft});return i.add(o.getContext(),(0,s.Oc)().relative),o.changeObservable.subscribe(()=>{const t=(0,s.$S)();i.closeActive(t),i.add(o.getContext(),t)}),t.register(0,({eventType:t,startTime:r})=>{const s=i.find(r),a=s?(0,v.Go)(s):o.getContext(),c=n.findTrackedSession(r);return c&&c.anonymousId&&!a.anonymous_id&&e.trackAnonymousUser&&(a.anonymous_id=c.anonymousId),(0,Y.RI)(a)?it.$O:{type:t,usr:a}}),t.register(1,({startTime:t})=>{var e;return{anonymous_id:null===(e=n.findTrackedSession(t))||void 0===e?void 0:e.anonymousId}}),o}(e,n,o,"rum"),M=function(t,e){const n=_t();return e.storeContextsAcrossPages&&X(e,n,"rum",4),t.register(0,()=>{const t=n.getContext();return(0,Y.RI)(t)||!t.id?it.$O:{account:t}}),n}(e,n),U=function(t,e,n,r,o){const{unsubscribe:i}=t.subscribe(0,e=>{t.notify(12,Wr(e))});e.register(0,({startTime:t,eventType:e})=>{if(e!==O.ERROR&&e!==O.RESOURCE&&e!==O.LONG_TASK)return it.$O;const n=s.findActionId(t);return n?{type:e,action:{id:n}}:it.$O}),e.register(1,({startTime:t})=>({action:{id:s.findActionId(t)}}));let s={findActionId:kt.l},a=kt.l;return o.trackUserInteractions&&({actionContexts:s,stop:a}=jr(t,n,r,o)),{addAction(e){t.notify(12,Wr(e))},actionContexts:s,stop(){i(),a()}}}(t,e,w,S,n);_.push(U.stop);const $=function(t){return{addEvent(e,n,r,o){xi.includes(n.type)&&t.notify(12,{startTime:e,rawRumEvent:n,domainContext:r,duration:o})}}}(t),B=function(t,e){let n;const r=requestAnimationFrame((0,m.dm)(()=>{n=Lo()})),o=Po(e).subscribe(t=>{n=t}).unsubscribe;return t.register(0,({eventType:t})=>({type:t,display:n?{viewport:n}:void 0})),{stop(){o(),r&&cancelAnimationFrame(r)}}}(e,n);_.push(B.stop);const q=function(t,e,n=function(t,e){const n=window.cookieStore?function(t){return(e,n)=>(0,J.q)(t,window.cookieStore,"change",t=>{const r=t.changed.find(t=>t.name===e)||t.deleted.find(t=>t.name===e);r&&n(r.value)}).stop}(t):si;return new r.cP(t=>n(e,e=>t.notify(e)))}(t,ai)){var o;let i=Nt(ai)||(null===(o=window.Cypress)||void 0===o?void 0:o.env("traceId"));const s=n.subscribe(t=>{i=t});return e.register(0,({eventType:t})=>"string"!=typeof i?it.$O:{type:t,session:{type:"ci_test"},ci_test:{test_execution_id:i}}),{stop(){s.unsubscribe()}}}(n,e);_.push(q.stop),function(t){t.register(0,({eventType:t})=>$t()?{type:t,session:{type:"synthetics"},synthetics:{test_id:Mt(),result_id:Ut(),injected:Vt()}}:it.$O)}(e),function(t,e,n,r,o){yi={[O.VIEW]:{"view.performance.lcp.resource_url":"string",...gi,...hi,...vi},[O.ERROR]:{"error.message":"string","error.stack":"string","error.resource.url":"string","error.fingerprint":"string",...gi,...hi,...vi},[O.RESOURCE]:{"resource.url":"string","resource.graphql.variables":"string",...gi,...hi,...vi},[O.ACTION]:{"action.target.name":"string",...gi,...hi,...vi},[O.LONG_TASK]:{"long_task.scripts[].source_url":"string","long_task.scripts[].invoker":"string",...gi,...hi,...vi},[O.VITAL]:{...gi,...hi,...vi}};const i={[O.ERROR]:li(O.ERROR,r,o),[O.ACTION]:li(O.ACTION,r,o),[O.VITAL]:li(O.VITAL,r,o)};e.subscribe(12,({startTime:r,duration:o,rawRumEvent:s,domainContext:a})=>{const c=n.triggerHook(0,{eventType:s.type,startTime:r,duration:o});if(c===it.ug)return;const u=(0,v.kg)(c,s,{ddtags:(0,di.m5)(t).join(",")});(function(t,e,n,r){var o;if(e){const r=fi(t,yi[t.type],t=>e(t,n));if(!1===r&&t.type!==O.VIEW)return!1;!1===r&&R.Vy.warn("Can't dismiss view events using beforeSend!")}return!(null===(o=r[t.type])||void 0===o?void 0:o.isLimitReached())})(u,t.beforeSend,a,i)&&((0,Y.RI)(u.context)&&delete u.context,e.notify(13,u))})}(n,t,e,g);const{addTiming:Z,startView:H,setViewName:K,setViewContext:Q,setViewContextProperty:tt,getViewContext:et,stop:nt}=function(t,e,n,o,i,a,c,u,l,d){return t.subscribe(4,e=>t.notify(12,function(t,e,n){var r,o,i,a,c,u,l,d,f,p,m,h,g,v,y,b,_,w;const k=n.getReplayStats(t.id),S=null===(o=null===(r=t.commonViewMetrics)||void 0===r?void 0:r.cumulativeLayoutShift)||void 0===o?void 0:o.devicePixelRatio,E={_kubesense:{document_version:t.documentVersion,replay_stats:k,cls:S?{device_pixel_ratio:S}:void 0,configuration:{start_session_replay_recording_manually:e.startSessionReplayRecordingManually}},date:t.startClocks.timeStamp,type:O.VIEW,view:{action:{count:t.eventCounts.actionCount},frustration:{count:t.eventCounts.frustrationCount},cumulative_layout_shift:null===(i=t.commonViewMetrics.cumulativeLayoutShift)||void 0===i?void 0:i.value,cumulative_layout_shift_time:(0,s.Zj)(null===(a=t.commonViewMetrics.cumulativeLayoutShift)||void 0===a?void 0:a.time),cumulative_layout_shift_target_selector:null===(c=t.commonViewMetrics.cumulativeLayoutShift)||void 0===c?void 0:c.targetSelector,first_byte:(0,s.Zj)(null===(u=t.initialViewMetrics.navigationTimings)||void 0===u?void 0:u.firstByte),dom_complete:(0,s.Zj)(null===(l=t.initialViewMetrics.navigationTimings)||void 0===l?void 0:l.domComplete),dom_content_loaded:(0,s.Zj)(null===(d=t.initialViewMetrics.navigationTimings)||void 0===d?void 0:d.domContentLoaded),dom_interactive:(0,s.Zj)(null===(f=t.initialViewMetrics.navigationTimings)||void 0===f?void 0:f.domInteractive),error:{count:t.eventCounts.errorCount},first_contentful_paint:(0,s.Zj)(t.initialViewMetrics.firstContentfulPaint),first_input_delay:(0,s.Zj)(null===(p=t.initialViewMetrics.firstInput)||void 0===p?void 0:p.delay),first_input_time:(0,s.Zj)(null===(m=t.initialViewMetrics.firstInput)||void 0===m?void 0:m.time),first_input_target_selector:null===(h=t.initialViewMetrics.firstInput)||void 0===h?void 0:h.targetSelector,interaction_to_next_paint:(0,s.Zj)(null===(g=t.commonViewMetrics.interactionToNextPaint)||void 0===g?void 0:g.value),interaction_to_next_paint_time:(0,s.Zj)(null===(v=t.commonViewMetrics.interactionToNextPaint)||void 0===v?void 0:v.time),interaction_to_next_paint_target_selector:null===(y=t.commonViewMetrics.interactionToNextPaint)||void 0===y?void 0:y.targetSelector,is_active:t.isActive,name:t.name,largest_contentful_paint:(0,s.Zj)(null===(b=t.initialViewMetrics.largestContentfulPaint)||void 0===b?void 0:b.value),largest_contentful_paint_target_selector:null===(_=t.initialViewMetrics.largestContentfulPaint)||void 0===_?void 0:_.targetSelector,load_event:(0,s.Zj)(null===(w=t.initialViewMetrics.navigationTimings)||void 0===w?void 0:w.loadEvent),loading_time:Pn((0,s.Zj)(t.commonViewMetrics.loadingTime)),loading_type:t.loadingType,long_task:{count:t.eventCounts.longTaskCount},performance:Do(t.commonViewMetrics,t.initialViewMetrics),resource:{count:t.eventCounts.resourceCount},time_spent:(0,s.Zj)(t.duration)},display:t.commonViewMetrics.scroll?{scroll:{max_depth:t.commonViewMetrics.scroll.maxDepth,max_depth_scroll_top:t.commonViewMetrics.scroll.maxDepthScrollTop,max_scroll_height:t.commonViewMetrics.scroll.maxScrollHeight,max_scroll_height_time:(0,s.Zj)(t.commonViewMetrics.scroll.maxScrollHeightTime)}}:void 0,privacy:{replay_level:e.defaultPrivacyLevel},device:{locale:navigator.language,locales:navigator.languages,time_zone:mo()}};return(0,Y.RI)(t.customTimings)||(E.view.custom_timings=(0,Y.LG)(t.customTimings,s.Zj)),{rawRumEvent:E,startTime:t.startClocks.relative,duration:t.duration,domainContext:{location:t.location}}}(e,n,u))),e.register(0,({startTime:t,eventType:e})=>{const n=l.findView(t);return n?{type:e,service:n.service,version:n.version,context:n.context,view:{id:n.id,name:n.name}}:it.ug}),e.register(1,({startTime:t})=>{var e;return{view:{id:null===(e=l.findView(t))||void 0===e?void 0:e.id}}}),function(t,e,n,o,i,a,c,u){const l=new Set;let d,f,p=h(N,(0,s.Oc)(),u);function h(a,c,u){const d=function(t,e,n,o,i,a,c=(0,s.M8)(),u){const l=z(),d=new r.cP,f={};let p,h=0;const g=(0,Y.yG)(i),v=rt();let y=!0,b=null==u?void 0:u.name;const _=(null==u?void 0:u.service)||o.service,w=(null==u?void 0:u.version)||o.version,k=null==u?void 0:u.context;k&&v.setContext(k);const S={id:l,name:b,startClocks:c,service:_,version:w,context:k};t.notify(1,S),t.notify(2,S);const{throttled:E,cancel:x}=(0,kt.n)(j,3e3,{leading:!1}),{setLoadEvent:T,setViewEnd:A,stop:C,stopINPTracking:I,getCommonViewMetrics:O}=function(t,e,n,o,i,a,c){const u={},{stop:l,setLoadEvent:d}=function(t,e,n,r,o,a){let c=o===N,l=!0;const d=[],f=vo(r,a);function p(){if(!l&&!c&&d.length>0){const e=Math.max(...d);e<f.timeStamp-a.relative&&(t=e,u.loadingTime=t,i())}var t}const{stop:m}=Zn(t,e,n,r,t=>{l&&(l=!1,t.hadActivity&&d.push((0,s.vk)(a.timeStamp,t.end)),p())});return{stop(){m(),f.stop()},setLoadEvent(t){c&&(c=!1,d.push(t),p())}}}(t,e,n,o,a,c),{stop:f}=function(t,e,n,o=function(t,e=Vo){return new r.cP(n=>{if(window.ResizeObserver){const r=(0,kt.n)(function(){n.notify(function(){const t=Oo(),{height:e}=Lo();return{scrollHeight:Math.round((document.scrollingElement||document.documentElement).scrollHeight),scrollDepth:Math.round(e+t),scrollTop:t}}())},e,{leading:!1,trailing:!0}),o=document.scrollingElement||document.documentElement,i=new ResizeObserver((0,m.dm)(r.throttled));o&&i.observe(o);const s=(0,J.q)(t,window,"scroll",r.throttled,{passive:!0});return()=>{r.cancel(),i.disconnect(),s.stop()}}})}(t)){let i=0,a=0,c=0;const u=o.subscribe(({scrollDepth:t,scrollTop:r,scrollHeight:o})=>{let u=!1;if(t>i&&(i=t,u=!0),o>a){a=o;const t=(0,s.$S)();c=(0,s.vk)(e.relative,t),u=!0}u&&n({maxDepth:Math.min(i,a),maxDepthScrollTop:r,maxScrollHeight:a,maxScrollHeightTime:c})});return{stop(){return u.unsubscribe()}}}(o,c,t=>{u.scroll=t}),{stop:p}=function(t,e,n){if(!$n(Vn.LAYOUT_SHIFT)||!("WeakRef"in window))return{stop:kt.l};let r,o=0;n({value:0});const i=function(){let t,e,n=0,r=0;return{update(o){let i;return void 0===t||o.startTime-e>=So||o.startTime-t>=ko?(t=e=o.startTime,r=n=o.value,i=!0):(n+=o.value,e=o.startTime,i=o.value>r,i&&(r=o.value)),{cumulatedValue:n,isMaxValue:i}}}}(),a=Mn(t,{type:Vn.LAYOUT_SHIFT,buffered:!0}).subscribe(a=>{var c;for(const u of a){if(u.hadRecentInput||u.startTime<e)continue;const{cumulatedValue:a,isMaxValue:l}=i.update(u);if(l){const t=_o(u.sources);r={target:(null==t?void 0:t.node)?new WeakRef(t.node):void 0,time:(0,s.vk)(e,u.startTime),previousRect:null==t?void 0:t.previousRect,currentRect:null==t?void 0:t.currentRect,devicePixelRatio:window.devicePixelRatio}}if(a>o){o=a;const e=null===(c=null==r?void 0:r.target)||void 0===c?void 0:c.deref();n({value:(0,zt.LI)(o,4),targetSelector:e&&er(e,t.actionNameAttribute),time:null==r?void 0:r.time,previousRect:(null==r?void 0:r.previousRect)?wo(r.previousRect):void 0,currentRect:(null==r?void 0:r.currentRect)?wo(r.currentRect):void 0,devicePixelRatio:null==r?void 0:r.devicePixelRatio})}}});return{stop(){a.unsubscribe()}}}(o,c.relative,t=>{u.cumulativeLayoutShift=t,i()}),{stop:h,getInteractionToNextPaint:g,setViewEnd:v}=function(t,e,n){if(!($n(Vn.EVENT)&&window.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype))return{getInteractionToNextPaint(){},setViewEnd:kt.l,stop:kt.l};const{getViewInteractionCount:r,stopViewInteractionCount:o}=function(t){"interactionCount"in performance||Eo||(Eo=new window.PerformanceObserver((0,m.dm)(t=>{t.getEntries().forEach(t=>{const e=t;e.interactionId&&(To=Math.min(To,e.interactionId),Ao=Math.max(Ao,e.interactionId),xo=(Ao-To)/7+1)})})),Eo.observe({type:"event",buffered:!0,durationThreshold:0}));const e=t===N?0:Co();let n={stopped:!1};function r(){return Co()-e}return{getViewInteractionCount(){return n.stopped?n.interactionCount:r()},stopViewInteractionCount(){n={stopped:!0,interactionCount:r()}}}}(n);let i=1/0;const a=function(t){const e=[];function n(){e.sort((t,e)=>e.duration-t.duration).splice(10)}return{process(t){const r=e.findIndex(e=>t.interactionId===e.interactionId),o=e[e.length-1];-1!==r?t.duration>e[r].duration&&(e[r]=t,n()):(e.length<10||t.duration>o.duration)&&(e.push(t),n())},estimateP98Interaction(){const n=Math.min(e.length-1,Math.floor(t()/50));return e[n]}}}(r);let c,u,l=-1;function d(n){for(const t of n)t.interactionId&&t.startTime>=e&&t.startTime<=i&&a.process(t);const r=a.estimateP98Interaction();r&&r.duration!==l&&(l=r.duration,u=(0,s.vk)(e,r.startTime),c=function(t){const e=zr.get(t);return zr.delete(t),e}(r.startTime),!c&&r.target&&zn(r.target)&&(c=er(r.target,t.actionNameAttribute)))}const f=Mn(t,{type:Vn.FIRST_INPUT,buffered:!0}).subscribe(d),p=Mn(t,{type:Vn.EVENT,durationThreshold:40,buffered:!0}).subscribe(d);return{getInteractionToNextPaint(){return l>=0?{value:Math.min(l,Ro),targetSelector:c,time:u}:r()?{value:0}:void 0},setViewEnd(t){i=t,o()},stop(){p.unsubscribe(),f.unsubscribe()}}}(o,c.relative,a);return{stop(){l(),p(),f()},stopINPTracking:h,setLoadEvent:d,setViewEnd:v,getCommonViewMetrics:()=>(u.interactionToNextPaint=g(),u)}}(t,e,n,o,q,a,c),{stop:P,initialViewMetrics:V}=a===N?function(t,e,n,r){const o={},{stop:i}=function(t,e,n=ao){return function(t,e){let n;const{stop:r}=(0,no.H)(t,"complete",()=>{n=(0,st.wg)(()=>e())});return{stop(){r(),(0,st.DJ)(n)}}}(t,()=>{const t=n();(function(t){return t.loadEventEnd<=0})(t)||e(function(t){return{domComplete:t.domComplete,domContentLoaded:t.domContentLoadedEventEnd,domInteractive:t.domInteractive,loadEvent:t.loadEventEnd,firstByte:t.responseStart>0&&t.responseStart<=(0,s.$S)()?t.responseStart:void 0}}(t))})}(t,t=>{n(t.loadEvent),o.navigationTimings=t,r()}),a=vo(t,e),{stop:c}=function(t,e){return{stop:Mn(t,{type:Vn.PAINT,buffered:!0}).subscribe(t=>{const n=t.find(t=>"first-contentful-paint"===t.name&&t.startTime<e.timeStamp&&t.startTime<ho);var i;n&&(i=n.startTime,o.firstContentfulPaint=i,r())}).unsubscribe}}(t,a),{stop:u}=function(t,e,n){let i=1/0;const{stop:s}=(0,J.l)(t,n,["pointerdown","keydown"],t=>{i=t.timeStamp},{capture:!0,once:!0});let a=0;const c=Mn(t,{type:Vn.LARGEST_CONTENTFUL_PAINT,buffered:!0}).subscribe(n=>{const s=(0,jt.Uk)(n,t=>t.entryType===Vn.LARGEST_CONTENTFUL_PAINT&&t.startTime<i&&t.startTime<e.timeStamp&&t.startTime<go&&t.size>a);if(s){let e;s.element&&(e=er(s.element,t.actionNameAttribute)),c={value:s.startTime,targetSelector:e,resourceUrl:(u=s,""===u.url?void 0:u.url)},o.largestContentfulPaint=c,r(),a=s.size}var c,u});return{stop(){s(),c.unsubscribe()}}}(t,a,window),{stop:l}=function(t,e){const n=Mn(t,{type:Vn.FIRST_INPUT,buffered:!0}).subscribe(n=>{const i=n.find(t=>t.startTime<e.timeStamp);if(i){const e=(0,s.vk)(i.startTime,i.processingStart);let n;i.target&&zn(i.target)&&(n=er(i.target,t.actionNameAttribute)),a={delay:e>=0?e:0,time:i.startTime,targetSelector:n},o.firstInput=a,r()}var a});return{stop(){n.unsubscribe()}}}(t,a);return{stop(){i(),c(),u(),l(),a.stop()},initialViewMetrics:o}}(o,c,T,q):{stop:kt.l,initialViewMetrics:{}};a===L&&function(t,e,n){var r,o;r=t.relative,o=t=>{e.firstContentfulPaint=t,e.largestContentfulPaint={value:t},n()},requestAnimationFrame(()=>{requestAnimationFrame(()=>{o((0,s.vk)(r,(0,s.$S)()))})})}(c,V,q);const{stop:M,eventCounts:U}=function(t,e,n){const{stop:r,eventCounts:o}=Ln({lifeCycle:t,isChildEvent:t=>t.view.id===e,onChange:n});return{stop:r,eventCounts:o}}(t,l,q),$=(0,st.yb)(j,Mo),D=t.subscribe(11,t=>{t.reason===Ye.y5.UNLOADING&&j(!0)});function B(){t.notify(3,{id:l,name:b,context:v.getContext(),startClocks:c,sessionIsActive:y})}function q(){B(),E()}function j(e=!1){x(),B(),h+=1;const n=void 0===p?(0,s.nx)():p.timeStamp;t.notify(4,{customTimings:f,documentVersion:h,id:l,name:b,service:_,version:w,context:v.getContext(),loadingType:a,location:g,startClocks:c,commonViewMetrics:O(),initialViewMetrics:V,duration:(0,s.vk)(c.timeStamp,n),isActive:!e&&void 0===p,sessionIsActive:y,eventCounts:U})}return j(),v.changeObservable.subscribe(q),{get name(){return b},service:_,version:w,contextManager:v,stopObservable:d,end(e={}){var n,r;p||(p=null!==(n=e.endClocks)&&void 0!==n?n:(0,s.M8)(),y=null===(r=e.sessionIsActive)||void 0===r||r,t.notify(5,{endClocks:p}),t.notify(6,{endClocks:p}),(0,st.vG)($),A(p.relative),C(),D.unsubscribe(),j(),(0,st.wg)(()=>{this.stop()},Uo))},stop(){P(),M(),I(),d.notify()},addTiming(t,e){if(p)return;const n=(0,s.pu)(e)?e:(0,s.vk)(c.timeStamp,e);f[function(t){const e=t.replace(/[^a-zA-Z0-9-_.@$]/g,"_");return e!==t&&R.Vy.warn(`Invalid timing name: ${t}, sanitized to: ${e}`),e}(t)]=n,q()},setViewName(t){b=t,j()}}}(e,n,o,i,t,a,c,u);return l.add(d),d.stopObservable.subscribe(()=>{l.delete(d)}),d}return e.subscribe(10,()=>{p=h(P,void 0,{name:p.name,service:p.service,version:p.version,context:p.contextManager.getContext()})}),e.subscribe(9,()=>{p.end({sessionIsActive:!1})}),c&&(f=function(t){return t.subscribe(({oldLocation:t,newLocation:e})=>{var n,r;r=e,((n=t).pathname!==r.pathname||!function(t){const e=t.substring(1);return""!==e&&!!document.getElementById(e)}(r.hash)&&$o(r.hash)!==$o(n.hash))&&(p.end(),p=h(P))})}(a),i.trackBfcacheViews&&(d=function(t){const{stop:e}=(0,J.q)(t,window,"pageshow",t=>{t.persisted&&(t=>{p.end();const e=(0,s.FR)(t.timeStamp);p=h(L,e,void 0)})(t)},{capture:!0});return e}(i))),{addTiming(t,e=(0,s.nx)()){p.addTiming(t,e)},startView(t,e){p.end({endClocks:e}),p=h(P,e,t)},setViewContext(t){p.contextManager.setContext(t)},setViewContextProperty(t,e){p.contextManager.setContextProperty(t,e)},setViewName(t){p.setViewName(t)},getViewContext(){return p.contextManager.getContext()},stop(){f&&f.unsubscribe(),d&&d(),p.end(),l.forEach(t=>t.stop())}}}(o,t,i,a,n,c,!n.trackViewsManually,d)}(t,e,n,location,w,S,k,c,T,d);_.push(nt);const{stop:at}=uo(t,n,x);_.push(at);const{stop:ct,longTaskContexts:ut}=function(t,e){const n=dt({expireDelay:ci}),r=$n(Vn.LONG_ANIMATION_FRAME)?Vn.LONG_ANIMATION_FRAME:Vn.LONG_TASK,o=Mn(e,{type:r,buffered:!0}).subscribe(o=>{for(const i of o){if(!e.trackLongTasks)break;const o=(0,s.FR)(i.startTime),a=z(),c=ui(i,o,a);t.notify(12,{rawRumEvent:c,startTime:o.relative,duration:i.duration,domainContext:{performanceEntry:i}}),n.add({id:a,startClocks:o,duration:i.duration,entryType:r},o.relative),n.closeActive((0,s.Gw)(o.relative,i.duration))}}),i={findLongTasks(t){return n.findAll(t)}};return{stop(){o.unsubscribe(),n.stop()},longTaskContexts:i}}(t,n);_.push(ct);const{addError:lt}=function(t,e,n){const o=new r.cP;return n.subscribe(t=>{0===t.type&&o.notify(t.error)}),function(t){(function(t){const e=t.map(t=>(Hr[t]||(Hr[t]=function(t){return new r.cP(e=>{const n=R.JZ[t];return R.JZ[t]=(...r)=>{n.apply(console,r);const o=(0,y.uC)("console error");(0,m.um)(()=>{e.notify(function(t,e,n){const r=t.map(t=>function(t){return"string"==typeof t?(0,b.a)(t):(0,u.bJ)(t)?(0,y.NR)((0,a.T)(t)):(0,Zr.s)((0,b.a)(t),void 0,2)}(t)).join(" ");if(e===R.bP.error){const o=t.find(u.bJ),i=(0,u.As)({originalError:o,handlingStack:n,startClocks:(0,s.M8)(),source:l.g.CONSOLE,handling:"handled",nonErrorPrefix:"Provided",useFallbackStack:!1});return i.message=r,{api:e,message:r,handlingStack:n,error:i}}return{api:e,message:r,error:void 0,handlingStack:n}}(r,t,o))})},()=>{R.JZ[t]=n}})}(t)),Hr[t]));return(0,r.Fx)(...e)})([R.bP.error]).subscribe(e=>t.notify(e.error))}(o),function(t,e){(function(t,e){const n=[];e.includes(Kr)&&n.push(function(t){return new r.cP(e=>{const{stop:n}=(0,J.q)(t,document,"securitypolicyviolation",t=>{e.notify(function(t){const e=`'${t.blockedURI}' blocked by '${t.effectiveDirective}' directive`;return Jr({type:t.effectiveDirective,message:`${Kr}: ${e}`,originalError:t,csp:{disposition:t.disposition},stack:Yr(t.effectiveDirective,t.originalPolicy?`${e} of the policy "${j(t.originalPolicy,100,"...")}"`:"no policy",t.sourceFile,t.lineNumber,t.columnNumber)})}(t))});return n})}(t));const o=e.filter(t=>t!==Kr);return o.length&&n.push(function(t){return new r.cP(e=>{if(!window.ReportingObserver)return;const n=(0,m.dm)((t,n)=>t.forEach(t=>e.notify(function(t){const{type:e,body:n}=t;return Jr({type:n.id,message:`${e}: ${n.message}`,originalError:t,stack:Yr(n.id,n.message,n.sourceFile,n.lineNumber,n.columnNumber)})}(t)))),r=new window.ReportingObserver(n,{types:t,buffered:!0});return r.observe(),()=>{r.disconnect()}})}(o)),(0,r.Fx)(...n)})(t,[Kr,"intervention"]).subscribe(t=>e.notify(t))}(e,o),o.subscribe(e=>t.notify(14,{error:e})),function(t){return t.subscribe(14,({error:e})=>{t.notify(12,function(t){const e={date:t.startClocks.timeStamp,error:{id:z(),message:t.message,source:t.source,stack:t.stack,handling_stack:t.handlingStack,component_stack:t.componentStack,type:t.type,handling:t.handling,causes:t.causes,source_type:"browser",fingerprint:t.fingerprint,csp:t.csp},_kubesense:{discarded:!1},type:O.ERROR,context:t.context},n={error:t.originalError,handlingStack:t.handlingStack};return{rawRumEvent:e,startTime:t.startClocks.relative,domainContext:n}}(e))}),{addError({error:e,handlingStack:n,componentStack:r,startClocks:o,context:i}){const s=(0,u.As)({originalError:e,handlingStack:n,componentStack:r,startClocks:o,nonErrorPrefix:"Provided",source:l.g.CUSTOM,handling:"handled"});s.context=(0,v.kg)(s.context,i),t.notify(14,{error:s})}}}(t)}(t,n,p);!function(t,e,n,o,a){const c=function(t,e,n,r){return{clearTracingIfNeeded:Ie,traceFetch:o=>Oe(t,o,e,n,r,t=>{var e;if(o.input instanceof Request&&!(null===(e=o.init)||void 0===e?void 0:e.headers))o.input=new Request(o.input),Object.keys(t).forEach(e=>{o.input.headers.append(e,t[e])});else{o.init=(0,Y.yG)(o.init);const e=[];o.init.headers instanceof Headers?o.init.headers.forEach((t,n)=>{e.push([n,t])}):Array.isArray(o.init.headers)?o.init.headers.forEach(t=>{e.push(t)}):o.init.headers&&Object.keys(o.init.headers).forEach(t=>{e.push([t,o.init.headers[t]])}),o.init.headers=e.concat((0,jt.WP)(t))}}),traceXhr:(o,i)=>Oe(t,o,e,n,r,t=>{Object.keys(t).forEach(e=>{i.setRequestHeader(e,t[e])})})}}(e,n,o,a);!function(t,e,n){(function(t){return nn||(nn=function(t){return new r.cP(e=>{const{stop:n}=(0,i.H)(XMLHttpRequest.prototype,"open",on),{stop:r}=(0,i.H)(XMLHttpRequest.prototype,"send",n=>{!function({target:t,parameters:[e],handlingStack:n},r,o){const a=rn.get(t);if(!a)return;const c=a;c.state="start",c.startClocks=(0,s.M8)(),c.isAborted=!1,c.xhr=t,c.handlingStack=n,c.requestBody=e;let u=!1;const{stop:l}=(0,i.H)(t,"onreadystatechange",()=>{t.readyState===XMLHttpRequest.DONE&&d()}),d=()=>{if(f(),l(),u)return;u=!0;const e=a;e.state="complete",e.duration=(0,s.vk)(c.startClocks.timeStamp,(0,s.nx)()),e.status=t.status,"string"==typeof t.response&&(e.responseBody=t.response),o.notify((0,Y.yG)(e))},{stop:f}=(0,J.q)(r,t,"loadend",d);o.notify(c)}(n,t,e)},{computeHandlingStack:!0}),{stop:o}=(0,i.H)(XMLHttpRequest.prototype,"abort",sn);return()=>{n(),r(),o()}})}(t)),nn})(e).subscribe(e=>{const r=e;if(En(r.url))switch(r.state){case"start":n.traceXhr(r,r.xhr),r.requestIndex=Nn(),t.notify(7,{requestIndex:r.requestIndex,url:r.url});break;case"complete":n.clearTracingIfNeeded(r),t.notify(8,{duration:r.duration,method:r.method,requestIndex:r.requestIndex,spanId:r.spanId,startClocks:r.startClocks,status:r.status,traceId:r.traceId,traceSampled:r.traceSampled,type:dn,url:r.url,xhr:r.xhr,isAborted:r.isAborted,handlingStack:r.handlingStack,requestBody:r.requestBody,responseBody:r.responseBody})}})}(t,e,c),function(t,e,n){At({responseBodyAction(t){var n;return(null===(n=In(t.url,e))||void 0===n?void 0:n.trackResponseErrors)?2:1}}).subscribe(e=>{var r;const o=e;if(En(o.url))switch(o.state){case"start":n.traceFetch(o),o.requestIndex=Nn(),t.notify(7,{requestIndex:o.requestIndex,url:o.url});break;case"resolve":n.clearTracingIfNeeded(o),t.notify(8,{duration:(0,s.vk)(o.startClocks.timeStamp,(0,s.nx)()),method:o.method,requestIndex:o.requestIndex,responseType:o.responseType,spanId:o.spanId,startClocks:o.startClocks,status:o.status,traceId:o.traceId,traceSampled:o.traceSampled,type:ln,url:o.url,response:o.response,init:o.init,input:o.input,isAborted:o.isAborted,handlingStack:o.handlingStack,requestBody:null===(r=o.init)||void 0===r?void 0:r.body,responseBody:o.responseBody})}})}(t,e,c)}(t,n,o,V,M);const pt=function(t,e,n){function r(n){(function(t){return!e.wasInPageStateDuringPeriod("frozen",t.startClocks.relative,t.duration)})(n)&&t.notify(12,G(n))}return{addOperationStepVital(e,n,r,o){if(!(0,D.sr)(D.R9.FEATURE_OPERATION_VITAL))return;const{operationKey:i,context:a,description:c}=r||{},u={name:e,type:"operation_step",operationKey:i,failureReason:o,stepType:n,startClocks:(0,s.M8)(),context:(0,b.a)(a),description:c};t.notify(12,G(u))},addDurationVital:r,startDurationVital(t,e={}){return F(n,t,e)},stopDurationVital(t,e={}){W(r,n,t,e)}}}(t,x,f),mt=function(t,e,n,r,o){return{get(i){const s=n.findView(i),a=o.findUrl(i),c=e.findTrackedSession(i);if(c&&s&&a){const e=r.findActionId(i);return{application_id:t,session_id:c.id,user_action:e?{id:e}:void 0,view:{id:s.id,name:s.name,referrer:a.referrer,url:a.url}}}}}}(n.applicationId,o,T,U.actionContexts,A);return{addAction:U.addAction,addEvent:$.addEvent,addError:lt,addTiming:Z,addFeatureFlagEvaluation:C.addFeatureFlagEvaluation,startView:H,setViewContext:Q,setViewContextProperty:tt,getViewContext:et,setViewName:K,viewHistory:T,getInternalContext:mt.get,startDurationVital:pt.startDurationVital,stopDurationVital:pt.stopDurationVital,addDurationVital:pt.addDurationVital,addOperationStepVital:pt.addOperationStepVital,globalContext:I,userContext:V,accountContext:M,longTaskContexts:ut,stop:()=>_.forEach(t=>t())}}(w,k,t,A,e,o,f,p,g,S);return _.push(I),p.unbuffer(),_.push(()=>n.stop()),{...V,lifeCycle:w,session:A,stopSession:()=>A.expire(),telemetry:T,stop(){_.forEach(t=>t())},hooks:k}}function Ai(t,{session:e,viewContext:n,errorType:r}){const o=e?e.id:"no-session-id",i=[];return void 0!==r&&i.push("error-type="+r),n&&(i.push("seed="+n.id),i.push("from="+n.startClocks.timeStamp)),`${function(t){const e=t.kubesenseRumEndpoint,n=t.subdomain;return`https://${n?n+".":""}${e}`}(t)}${"/rum/replay/sessions/"+o}?${i.join("&")}`}function Ci(t,e,n,r){const o=(0,Fo.sA)([t.profilingEndpointBuilder],t=>{e.notify(14,{error:t}),(0,h.A2)("Error reported to customer",{"error.message":t.message})}),i=n(r);return{async send({event:t,...e}){const n=new FormData,r=(0,Zr.s)(t);if(!r)throw Error("Failed to serialize event");n.append("event",new Blob([r],{type:"application/json"}),"event.json");let s=r.length;for(const[t,r]of(0,jt.WP)(e)){const e=(0,Zr.s)(r);if(!e)throw Error("Failed to serialize attachment");const o=await Ri(i,e);s+=o.outputBytesCount,n.append(t,new Blob([o.output]),t)}o.send({data:n,bytesCount:s})}}}function Ri(t,e){return new Promise(n=>{t.write(e),t.finish(t=>{n(t)})})}},262(t,e,n){n.d(e,{y:()=>o});var r=n(875);function o(t,e){return(...n)=>{try{return t(...n)}catch(t){r.Vy.error(e,t)}}}},275(t,e,n){n.d(e,{dX:()=>c,cP:()=>s,Fx:()=>a});var r=n(315),o=n(433);function i(t){var e;const n=null===(e=o.J2.queueMicrotask)||void 0===e?void 0:e.bind(o.J2);"function"==typeof n?n((0,r.dm)(t)):Promise.resolve().then((0,r.dm)(t))}class s{constructor(t){this.onFirstSubscribe=t,this.observers=[]}subscribe(t){return this.addObserver(t),{unsubscribe:()=>this.removeObserver(t)}}notify(t){this.observers.forEach(e=>e(t))}addObserver(t){this.observers.push(t),1===this.observers.length&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe(this)||void 0)}removeObserver(t){this.observers=this.observers.filter(e=>t!==e),!this.observers.length&&this.onLastUnsubscribe&&this.onLastUnsubscribe()}}function a(...t){return new s(e=>{const n=t.map(t=>t.subscribe(t=>e.notify(t)));return()=>n.forEach(t=>t.unsubscribe())})}class c extends s{constructor(t){super(),this.maxBufferSize=t,this.buffer=[]}notify(t){this.buffer.push(t),this.buffer.length>this.maxBufferSize&&this.buffer.shift(),super.notify(t)}subscribe(t){let e=!1;const n={unsubscribe:()=>{e=!0,this.removeObserver(t)}};return i(()=>{for(const n of this.buffer){if(e)return;t(n)}e||this.addObserver(t)}),n}unbuffer(){i(()=>{this.maxBufferSize=this.buffer.length=0})}}},295(t,e,n){function r(t){return t>=500}function o(t){try{return t.clone()}catch(t){return}}n.d(e,{G:()=>r,i:()=>o})},300(t,e,n){let r;function o(t){return u(t).segments_count}function i(t){u(t).segments_count+=1}function s(t){u(t).records_count+=1}function a(t,e){u(t).segments_total_raw_size+=e}function c(t){return null==r?void 0:r.get(t)}function u(t){let e;return r||(r=new Map),r.has(t)?e=r.get(t):(e={records_count:0,segments_count:0,segments_total_raw_size:0},r.set(t,e),r.size>1e3&&function(){if(!r)return;const t=r.keys().next().value;t&&r.delete(t)}()),e}n.d(e,{$1:()=>s,H5:()=>i,K_:()=>o,L7:()=>a,lv:()=>c})},314(t,e,n){n.d(e,{g:()=>r});const r={AGENT:"agent",CONSOLE:"console",CUSTOM:"custom",LOGGER:"logger",NETWORK:"network",SOURCE:"source",REPORT:"report"}},315(t,e,n){n.d(e,{Bd:()=>s,Dx:()=>l,dm:()=>c,oO:()=>d,pM:()=>a,um:()=>u});var r=n(875);let o,i=!1;function s(t){o=t}function a(t){i=t}function c(t){return function(...e){return u(t,this,e)}}function u(t,e,n){try{return t.apply(e,n)}catch(t){l(t)}}function l(t){if(d(t),o)try{o(t)}catch(t){d(t)}}function d(...t){i&&r.Vy.error("[MONITOR]",...t)}},322(t,e,n){n.d(e,{Z:()=>a,m:()=>s});var r=n(262),o=n(315),i=n(875);function s(t){const e={version:"1.3.0",onReady(t){t()},...t};return Object.defineProperty(e,"_setDebug",{get(){return o.pM},enumerable:!1}),e}function a(t,e,n){const o=t[e];o&&!o.q&&o.version&&i.Vy.warn("SDK is loaded more than once. This is unsupported and might have unexpected behavior."),t[e]=n,o&&o.q&&o.q.forEach(t=>(0,r.y)(t,"onReady callback threw an error:")())}},339(t,e,n){n.d(e,{$O:()=>i,XP:()=>s,ug:()=>o});var r=n(995);const o="DISCARDED",i="SKIPPED";function s(){const t={};return{register(e,n){return t[e]||(t[e]=[]),t[e].push(n),{unregister(){t[e]=t[e].filter(t=>t!==n)}}},triggerHook(e,n){const s=t[e]||[],a=[];for(const t of s){const e=t(n);if(e===o)return o;e!==i&&a.push(e)}return(0,r.kg)(...a)}}}},362(t,e,n){n.d(e,{Ww:()=>i,Y9:()=>o,d0:()=>s});var r=n(433);function o(){const t=(0,r.VZ)().KubsesenseEventBridge;if(t)return{getCapabilities(){var e;return JSON.parse((null===(e=t.getCapabilities)||void 0===e?void 0:e.call(t))||"[]")},getPrivacyLevel(){var e;return null===(e=t.getPrivacyLevel)||void 0===e?void 0:e.call(t)},getAllowedWebViewHosts(){return JSON.parse(t.getAllowedWebViewHosts())},send(e,n,r){const o=r?{id:r}:void 0;t.send(JSON.stringify({eventType:e,event:n,view:o}))}}}function i(t){const e=o();return!!e&&e.getCapabilities().includes(t)}function s(t){var e;void 0===t&&(t=null===(e=(0,r.VZ)().location)||void 0===e?void 0:e.hostname);const n=o();return!!n&&n.getAllowedWebViewHosts().some(e=>t===e||t.endsWith("."+e))}},416(t,e,n){n.d(e,{M:()=>i,s:()=>o});var r=n(474);function o(t,e,n){if("object"!=typeof t||null===t)return JSON.stringify(t);const r=i(Object.prototype),o=i(Array.prototype),s=i(Object.getPrototypeOf(t)),a=i(t);try{return JSON.stringify(t,e,n)}catch(t){return"<error: unable to serialize object>"}finally{r(),o(),s(),a()}}function i(t){const e=t,n=e.toJSON;return n?(delete e.toJSON,()=>{e.toJSON=n}):r.l}},433(t,e,n){function r(){if("object"==typeof globalThis)return globalThis;Object.defineProperty(Object.prototype,"_kubesense_temp_",{get(){return this},configurable:!0});let t=_kubesense_temp_;return delete Object.prototype._kubesense_temp_,"object"!=typeof t&&(t="object"==typeof self?self:"object"==typeof window?window:{}),t}n.d(e,{J2:()=>o,VZ:()=>r,Wq:()=>i});const o=r(),i="WorkerGlobalScope"in o},452(t,e,n){n.d(e,{WW:()=>s,_m:()=>r,iH:()=>o,wh:()=>a});const r=1024,o=1024*r,i=/[^\u0000-\u007F]/;function s(t){return i.test(t)?void 0!==window.TextEncoder?(new TextEncoder).encode(t).length:new Blob([t]).size:t.length}function a(t){if(1===t.length)return t[0];const e=t.reduce((t,e)=>t+e.length,0),n=new Uint8Array(e);let r=0;for(const e of t)n.set(e,r),r+=e.length;return n}},468(t,e,n){n.d(e,{NR:()=>a,Yn:()=>s,uC:()=>i});var r=n(315),o=n(511);function i(t){const e=Error(t);let n;return e.name="HandlingStack",(0,r.um)(()=>{const t=(0,o.T)(e);t.stack=t.stack.slice(2),n=s(t)}),n}function s(t){let e=a(t);return t.stack.forEach(t=>{const n="?"===t.func?"<anonymous>":t.func,r=t.args&&t.args.length>0?`(${t.args.join(", ")})`:"",o=t.line?":"+t.line:"",i=t.line&&t.column?":"+t.column:"";e+=`\n at ${n}${r} @ ${t.url}${o}${i}`}),e}function a(t){return`${t.name||"Error"}: ${t.message}`}},474(t,e,n){n.d(e,{l:()=>i,n:()=>o});var r=n(636);function o(t,e,n){const o=!n||void 0===n.leading||n.leading,i=!n||void 0===n.trailing||n.trailing;let s,a,c=!1;return{throttled(...n){c?s=n:(o?t(...n):s=n,c=!0,a=(0,r.wg)(()=>{i&&s&&t(...s),c=!1,s=void 0},e))},cancel(){(0,r.DJ)(a),c=!1,s=void 0}}}function i(){}},485(t,e,n){n.d(e,{m5:()=>o});var r=n(875);function o(t){const{env:e,service:n,version:r,datacenter:o,sdkVersion:s,variant:a}=t,c=[i("sdk_version",null!=s?s:"1.3.0")];return e&&c.push(i("env",e)),n&&c.push(i("service",n)),r&&c.push(i("version",r)),o&&c.push(i("datacenter",o)),a&&c.push(i("variant",a)),c}function i(t,e){const n=e?`${t}:${e}`:t;return(n.length>200||function(t){return!!function(){try{return RegExp("[\\p{Ll}]","u"),!0}catch(t){return!1}}()&&RegExp("[^\\p{Ll}\\p{Lo}0-9_:./-]","u").test(t)}(n))&&r.Vy.warn(`Tag ${n} doesn't meet tag requirements and will be sanitized. ${r.xG} ${r.fH}/getting_started/tagging/#defining-tags`),function(t){return t.replace(/,/g,"_")}(n)}},489(t,e,n){n.d(e,{q:()=>o});var r=n(433);function o(){var t;const e=r.J2.navigator;return{status:e.onLine?"connected":"not_connected",interfaces:e.connection&&e.connection.type?[e.connection.type]:["unknown"],effective_type:null===(t=e.connection)||void 0===t?void 0:t.effectiveType}}},511(t,e,n){n.d(e,{T:()=>o,h:()=>m});const r="?";function o(t){var e,n;const o=[];let i=p(t,"stack");const s=t+"";if(i&&i.startsWith(s)&&(i=i.slice(s.length)),i&&i.split("\n").forEach(t=>{const e=function(t){const e=a.exec(t);if(!e)return;const n=e[2]&&0===e[2].indexOf("native"),o=e[2]&&0===e[2].indexOf("eval"),i=c.exec(e[2]);return o&&i&&(e[2]=i[1],e[3]=i[2],e[4]=i[3]),{args:n?[e[2]]:[],column:e[4]?+e[4]:void 0,func:e[1]||r,line:e[3]?+e[3]:void 0,url:n?void 0:e[2]}}(t)||function(t){const e=u.exec(t);if(e)return{args:[],column:e[3]?+e[3]:void 0,func:r,line:e[2]?+e[2]:void 0,url:e[1]}}(t)||function(t){const e=l.exec(t);if(e)return{args:[],column:e[4]?+e[4]:void 0,func:e[1]||r,line:+e[3],url:e[2]}}(t)||function(t){const e=d.exec(t);if(!e)return;const n=e[3]&&e[3].indexOf(" > eval")>-1,o=f.exec(e[3]);return n&&o&&(e[3]=o[1],e[4]=o[2],e[5]=void 0),{args:e[2]?e[2].split(","):[],column:e[5]?+e[5]:void 0,func:e[1]||r,line:e[4]?+e[4]:void 0,url:e[3]}}(t);e&&(!e.func&&e.line&&(e.func=r),o.push(e))}),o.length>0&&function(){if(void 0!==v)return v;const[t,e]=[class extends Error{constructor(){super(),this.name="Error"}},Error].map(t=>new t);return v=g(Object.getPrototypeOf(t))&&e.stack!==t.stack,v}()&&t instanceof Error){const i=[];let s=t;for(;(s=Object.getPrototypeOf(s))&&g(s);){const t=(null===(e=s.constructor)||void 0===e?void 0:e.name)||r;i.push(t)}for(let t=i.length-1;t>=0&&(null===(n=o[0])||void 0===n?void 0:n.func)===i[t];t--)o.shift()}return{message:p(t,"message"),name:p(t,"name"),stack:o}}const i="((?:file|https?|blob|chrome-extension|electron|native|eval|webpack|snippet|<anonymous>|\\w+\\.|\\/).*?)",s="(?::(\\d+))",a=RegExp(`^\\s*at (.*?) ?\\(${i}${s}?${s}?\\)?\\s*$`,"i"),c=RegExp(`\\((\\S*)${s}${s}\\)`),u=RegExp(`^\\s*at ?${i}${s}?${s}??\\s*$`,"i"),l=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,d=/^\s*(.*?)(?:\((.*?)\))?(?:(?:(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle|\[wasm code\])(?::(\d+))?(?::(\d+))?)|@)\s*$/i,f=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function p(t,e){if("object"!=typeof t||!t||!(e in t))return;const n=t[e];return"string"==typeof n?n:void 0}function m(t,e,n,r){if(void 0===e)return;const{name:o,message:i}=function(t){let e,n;return"[object String]"==={}.toString.call(t)&&([,e,n]=h.exec(t)),{name:e,message:n}}(t);return{name:o,message:i,stack:[{url:e,column:r,line:n}]}}const h=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\s\S]*)$/;function g(t){return(t.constructor+"").startsWith("class ")}let v},520(t,e,n){n.d(e,{a:()=>a});var r=n(875),o=n(452),i=n(416);const s=220*o._m;function a(t,e=s){const n=(0,i.M)(Object.prototype),r=(0,i.M)(Array.prototype),o=[],a=new WeakMap,u=c(t,"$",void 0,o,a),d=JSON.stringify(u);let f=d?d.length:0;if(!(f>e)){for(;o.length>0&&f<e;){const n=o.shift();let r=0;if(Array.isArray(n.source))for(let i=0;i<n.source.length;i++){const s=c(n.source[i],n.path,i,o,a);if(f+=void 0!==s?JSON.stringify(s).length:4,f+=r,r=1,f>e){l(e,"truncated",t);break}n.target[i]=s}else for(const i in n.source)if(Object.prototype.hasOwnProperty.call(n.source,i)){const s=c(n.source[i],n.path,i,o,a);if(void 0!==s&&(f+=JSON.stringify(s).length+r+i.length+3,r=1),f>e){l(e,"truncated",t);break}n.target[i]=s}}return n(),r(),u}l(e,"discarded",t)}function c(t,e,n,r,o){const i=function(t){const e=t;if(e&&"function"==typeof e.toJSON)try{return e.toJSON()}catch(t){}return t}(t);if(!i||"object"!=typeof i)return"bigint"==typeof(s=i)?"[BigInt] "+s.toString():"function"==typeof s?"[Function] "+(s.name||"unknown"):"symbol"==typeof s?"[Symbol] "+(s.description||s.toString()):s;var s;const a=u(i);if("[Object]"!==a&&"[Array]"!==a&&"[Error]"!==a)return a;const c=t;if(o.has(c))return`[Reference seen at ${o.get(c)}]`;const l=void 0!==n?`${e}.${n}`:e,d=Array.isArray(i)?[]:{};return o.set(c,l),r.push({source:i,target:d,path:l}),d}function u(t){try{if(t instanceof Event)return{type:(e=t).type,isTrusted:e.isTrusted,currentTarget:e.currentTarget?u(e.currentTarget):null,target:e.target?u(e.target):null};if(t instanceof RegExp)return"[RegExp] "+t.toString();const n=Object.prototype.toString.call(t).match(/\[object (.*)\]/);if(n&&n[1])return`[${n[1]}]`}catch(t){}var e;return"[Unserializable]"}function l(t,e,n){r.Vy.warn(`The data provided has been ${e} as it is over the limit of ${t} characters:`,n)}},534(t,e,n){n.d(e,{Rr:()=>L,A2:()=>N,VJ:()=>P,Gk:()=>V,Q6:()=>M,a5:()=>O});var r=n(875),o=n(945),i=n(468),s=n(188),a=n(485),c=n(858),u=n(275),l=n(749),d=n(315),f=n(769),p=n(713),m=n(416),h=n(995),g=n(511),v=n(489),y=n(362),b=n(723),_=n(725),w=n(673),k=n(339),S=n(433);const E="log",x="configuration",T="usage",A=["https://rum.kubesense.ai","https://rum.tyke.ai","https://d3uc069fcn7uxw.cloudfront.net","https://d20xtzwzcl0ceb.cloudfront.net","http://localhost","<anonymous>"],C=[c.Bb];let R;function I(){return R||(R=new u.dX(100)),R}function O(t,e,n,r,o,i){const g=new u.cP,{stop:A}=function(t,e,n,r,o){const i=[];if((0,y.d0)()){const t=(0,y.Y9)(),e=o.subscribe(e=>t.send("internal_telemetry",e));i.push(e.unsubscribe)}else{const s=[t.rumEndpointBuilder];t.replica&&function(t){return t.kubesenseRumEndpoint===c.Bb}(t)&&s.push(t.replica.rumEndpointBuilder);const a=(0,b.X)({encoder:r(4),request:(0,_.sA)(s,e),flushController:(0,w.tO)({pageMayExitObservable:n,sessionExpireObservable:new u.cP})});i.push(a.stop);const l=o.subscribe(a.add);i.push(l.unsubscribe)}return{stop:()=>i.forEach(t=>t())}}(e,r,o,i,g),{enabled:R,metricsEnabled:O}=function(t,e,n,r,o=1,i=15){const c={},u=!C.includes(e.kubesenseRumEndpoint)&&(0,p.ic)(e.telemetrySampleRate),g={[E]:u,[x]:u&&(0,p.ic)(e.telemetryConfigurationSampleRate),[T]:u&&(0,p.ic)(e.telemetryUsageSampleRate),metric:u&&(0,p.ic)(o)},y={is_local_file:"file:"===(null===(_=S.J2.location)||void 0===_?void 0:_.protocol),is_worker:S.Wq},b=I();var _;return b.subscribe(({rawEvent:o,metricName:u})=>{if(u&&!g.metric||!g[o.type])return;const d=u||o.status||o.type;let p=c[d];if(p||(p=c[d]=new Set),p.size>=i)return;const b=(0,m.s)(o);if(p.has(b))return;const _=n.triggerHook(1,{startTime:(0,l.M8)().relative});if(_===k.ug)return;const w=function(t,n,r,o){const i={type:"telemetry",date:(0,l.M8)().timeStamp,service:n,version:"1.3.0",source:"browser",_kubesense:{format_version:2},telemetry:(0,h.kg)(r,{runtime_env:o,connectivity:(0,v.q)(),sdk_setup:"npm"}),ktags:(0,a.m5)(e).join(","),experimental_features:Array.from((0,s.q7)())};return(0,h.kg)(i,t)}(_,t,o,y);r.notify(w),(0,f.b)("telemetry",w),p.add(b)}),b.unbuffer(),(0,d.Bd)(P),{enabled:u,metricsEnabled:g.metric}}(t,e,n,g);return{stop:A,enabled:R,metricsEnabled:O}}function N(t,e){(0,d.oO)(r.bP.debug,t,e),I().notify({rawEvent:{type:E,message:t,status:"debug",...e}})}function P(t,e){I().notify({rawEvent:{type:E,status:"error",...U(t),...e}})}function L(t){I().notify({rawEvent:{type:x,configuration:t}})}function V(t,e){I().notify({rawEvent:{type:E,message:t,status:"debug",...e},metricName:t})}function M(t){I().notify({rawEvent:{type:T,usage:t}})}function U(t){if((0,o.bJ)(t)){const e=(0,g.T)(t);return{error:{kind:e.name,stack:(0,i.Yn)($(e))},message:e.message}}return{error:{stack:o.e6},message:"Uncaught "+(0,m.s)(t)}}function $(t){return t.stack=t.stack.filter(t=>!t.url||A.some(e=>t.url.startsWith(e))),t}},586(t,e,n){n.d(e,{W:()=>o});var r=n(433);function o(t,e){const n=(0,r.VZ)();let o;return n.Zone&&"function"==typeof n.Zone.__symbol__&&(o=t[n.Zone.__symbol__(e)]),o||(o=t[e]),o}},636(t,e,n){n.d(e,{DJ:()=>a,vG:()=>u,wg:()=>s,yb:()=>c});var r=n(586),o=n(315),i=n(433);function s(t,e){return(0,r.W)((0,i.VZ)(),"setTimeout")((0,o.dm)(t),e)}function a(t){(0,r.W)((0,i.VZ)(),"clearTimeout")(t)}function c(t,e){return(0,r.W)((0,i.VZ)(),"setInterval")((0,o.dm)(t),e)}function u(t){(0,r.W)((0,i.VZ)(),"clearInterval")(t)}},673(t,e,n){n.d(e,{tO:()=>l});var r=n(433),o=n(275),i=n(636),s=n(749),a=n(725);const c=30*s.OY,u=r.Wq?1:50;function l({pageMayExitObservable:t,sessionExpireObservable:e}){const n=t.subscribe(t=>p(t.reason)),r=e.subscribe(()=>p("session_expire")),s=new o.cP(()=>()=>{n.unsubscribe(),r.unsubscribe()});let l,d=0,f=0;function p(t){if(0===f)return;const e=f,n=d;f=0,d=0,m(),s.notify({reason:t,messagesCount:e,bytesCount:n})}function m(){(0,i.DJ)(l),l=void 0}return{flushObservable:s,get messagesCount(){return f},notifyBeforeAddMessage(t){d+t>=a.AK&&p("bytes_limit"),f+=1,d+=t,void 0===l&&(l=(0,i.wg)(()=>{p("duration_limit")},c))},notifyAfterAddMessage(t=0){d+=t,f>=u?p("messages_limit"):d>=a.AK&&p("bytes_limit")},notifyAfterRemoveMessage(t){d-=t,f-=1,0===f&&m()}}}},713(t,e,n){function r(t){return 0!==t&&100*Math.random()<=t}function o(t,e){return+t.toFixed(e)}function i(t){return s(t)&&t>=0&&t<=100}function s(t){return"number"==typeof t}n.d(e,{Et:()=>s,LI:()=>o,fp:()=>i,ic:()=>r})},723(t,e,n){n.d(e,{X:()=>u});var r=n(875),o=n(75),i=n(887),s=n(416),a=n(452);const c=256*a._m;function u({encoder:t,request:e,flushController:n}){let u={};const d=n.flushObservable.subscribe(n=>function(n){const r=(0,o.KQ)(u).join("\n");u={};const s=(0,i.Kp)(n.reason),c=s?e.sendOnExit:e.send;if(s&&t.isAsync){const e=t.finishSync();e.outputBytesCount&&c(l(e));const n=[e.pendingData,r].filter(Boolean).join("\n");n&&c({data:n,bytesCount:(0,a.WW)(n)})}else r&&t.write(t.isEmpty?r:"\n"+r),t.finish(t=>{c(l(t))})}(n));function f(e,o){const i=(0,s.s)(e),l=t.estimateEncodedBytesCount(i);l>=c?r.Vy.warn(`Discarded a message whose size was bigger than the maximum allowed size ${c/a._m}KiB. ${r.xG} ${r.Xs}/#technical-limitations`):(function(t){return void 0!==t&&void 0!==u[t]}(o)&&function(e){const r=u[e];delete u[e];const o=t.estimateEncodedBytesCount(r);n.notifyAfterRemoveMessage(o)}(o),function(e,r,o){n.notifyBeforeAddMessage(r),void 0!==o?(u[o]=e,n.notifyAfterAddMessage()):t.write(t.isEmpty?e:"\n"+e,t=>{n.notifyAfterAddMessage(t-r)})}(i,l,o))}return{flushController:n,add:f,upsert:f,stop:d.unsubscribe}}function l(t){let e;return e="string"==typeof t.output?t.output:new Blob([t.output],{type:"text/plain"}),{data:e,bytesCount:t.outputBytesCount,encoding:t.encoding}}},725(t,e,n){n.d(e,{AK:()=>_,sA:()=>w});var r=n(315),o=n(188),i=n(275),s=n(452),a=n(636),c=n(749),u=n(295),l=n(314);const d=80*s._m,f=20*s.iH,p=c.iW,m=c.OY;function h(t,e,n,r,o,i){0===e.transportStatus&&0===e.queuedPayloads.size()&&e.bandwidthMonitor.canHandle(t)?v(t,e,n,i,{onSuccess:()=>y(0,e,n,r,o,i),onFailure(){e.queuedPayloads.enqueue(t)||i.notify({type:"queue-full",bandwidth:e.bandwidthMonitor.stats(),payload:t}),g(e,n,r,o,i)}}):e.queuedPayloads.enqueue(t)||i.notify({type:"queue-full",bandwidth:e.bandwidthMonitor.stats(),payload:t})}function g(t,e,n,r,o){2===t.transportStatus&&(0,a.wg)(()=>{v(t.queuedPayloads.first(),t,e,o,{onSuccess(){t.queuedPayloads.dequeue(),t.currentBackoffTime=m,y(1,t,e,n,r,o)},onFailure(){t.currentBackoffTime=Math.min(p,2*t.currentBackoffTime),g(t,e,n,r,o)}})},t.currentBackoffTime)}function v(t,e,n,r,{onSuccess:o,onFailure:i}){e.bandwidthMonitor.add(t),n(t,n=>{e.bandwidthMonitor.remove(t),function(t){return"opaque"!==t.type&&(0===t.status&&!navigator.onLine||408===t.status||429===t.status||(0,u.G)(t.status))}(n)?(e.transportStatus=e.bandwidthMonitor.ongoingRequestCount>0?1:2,t.retry={count:t.retry?t.retry.count+1:1,lastFailureStatus:n.status},r.notify({type:"failure",bandwidth:e.bandwidthMonitor.stats(),payload:t}),i()):(e.transportStatus=0,r.notify({type:"success",bandwidth:e.bandwidthMonitor.stats(),payload:t}),o())})}function y(t,e,n,r,o,i){0===t&&e.queuedPayloads.isFull()&&!e.queueFullReported&&(o({message:`Reached max ${r} events size queued for upload: ${f/s.iH}MiB`,source:l.g.AGENT,startClocks:(0,c.M8)()}),e.queueFullReported=!0);const a=e.queuedPayloads;for(e.queuedPayloads=b();a.size()>0;)h(a.dequeue(),e,n,r,o,i)}function b(){const t=[];return{bytesCount:0,enqueue(e){return!this.isFull()&&(t.push(e),this.bytesCount+=e.bytesCount,!0)},first(){return t[0]},dequeue(){const e=t.shift();return e&&(this.bytesCount-=e.bytesCount),e},size(){return t.length},isFull(){return this.bytesCount>=f}}}const _=16*s._m;function w(t,e,n=_){const r=new i.cP,s={transportStatus:0,currentBackoffTime:m,bandwidthMonitor:{ongoingRequestCount:0,ongoingByteCount:0,canHandle(t){return 0===this.ongoingRequestCount||this.ongoingByteCount+t.bytesCount<=d&&this.ongoingRequestCount<32},add(t){this.ongoingRequestCount+=1,this.ongoingByteCount+=t.bytesCount},remove(t){this.ongoingRequestCount-=1,this.ongoingByteCount-=t.bytesCount},stats(){return{ongoingByteCount:this.ongoingByteCount,ongoingRequestCount:this.ongoingRequestCount}}},queuedPayloads:b(),queueFullReported:!1};return{observable:r,send(i){for(const a of t)h(i,s,(t,e)=>{(0,o.sr)(o.R9.AVOID_FETCH_KEEPALIVE)?x(a,t,e):E(a,n,t,e)},a.trackType,e,r)},sendOnExit(e){for(const r of t)k(r,n,e)},sendQueuedOnExit(){let e;for(;void 0!==(e=s.queuedPayloads.dequeue());)for(const r of t)k(r,n,e)}}}function k(t,e,n){if(navigator.sendBeacon&&n.bytesCount<e)try{const e=t.build("beacon",n);if(navigator.sendBeacon(e,n.data))return}catch(t){!function(t){S||(S=!0,(0,r.Dx)(t))}(t)}x(t,n)}let S=!1;function E(t,e,n,o){if(function(){try{return window.Request&&"keepalive"in new Request("http://a")}catch(t){return!1}}()&&n.bytesCount<e){const e=t.build("fetch-keepalive",n);fetch(e,{method:"POST",body:n.data,keepalive:!0,mode:"cors"}).then((0,r.dm)(t=>null==o?void 0:o({status:t.status,type:t.type}))).catch((0,r.dm)(()=>x(t,n,o)))}else x(t,n,o)}function x(t,e,n){const o=t.build("fetch",e);fetch(o,{method:"POST",body:e.data,mode:"cors"}).then((0,r.dm)(t=>null==n?void 0:n({status:t.status,type:t.type}))).catch((0,r.dm)(()=>null==n?void 0:n({status:0})))}},749(t,e,n){n.d(e,{$H:()=>a,$S:()=>h,FR:()=>c,Gw:()=>b,M8:()=>g,MA:()=>s,OY:()=>o,Oc:()=>v,TP:()=>d,Zj:()=>f,gs:()=>_,iW:()=>i,jR:()=>u,nx:()=>m,pu:()=>w,vk:()=>y,x3:()=>p});var r=n(713);const o=1e3,i=60*o,s=60*i,a=24*s*365;function c(t){return{relative:t,timeStamp:l(t)}}function u(t){return{relative:_(t),timeStamp:t}}function l(t){const e=p()-performance.now();return e>S()?Math.round(b(e,t)):function(t){return Math.round(b(S(),t))}(t)}function d(){return Math.round(p()-b(S(),performance.now()))}function f(t){return(0,r.Et)(t)?(0,r.LI)(1e6*t,0):t}function p(){return(new Date).getTime()}function m(){return p()}function h(){return performance.now()}function g(){return{relative:h(),timeStamp:m()}}function v(){return{relative:0,timeStamp:S()}}function y(t,e){return e-t}function b(t,e){return t+e}function _(t){return t-S()}function w(t){return t<a}let k;function S(){var t,e;return void 0===k&&(k=null!==(e=null===(t=performance.timing)||void 0===t?void 0:t.navigationStart)&&void 0!==e?e:performance.timeOrigin),k}},760(t,e,n){function r(){return 0===s()}function o(){return 1===s()}let i;function s(){return null!=i?i:i=function(t=window){var e;const n=t.navigator.userAgent;return t.chrome||/HeadlessChrome/.test(n)?0:0===(null===(e=t.navigator.vendor)||void 0===e?void 0:e.indexOf("Apple"))||/safari/i.test(n)&&!/chrome|android/i.test(n)?1:2}()}n.d(e,{F2:()=>r,nr:()=>o})},769(t,e,n){n.d(e,{b:()=>o});var r=n(433);function o(t,e){const n=r.J2.__kubesenseBrowserSdkExtensionCallback;n&&n({type:t,payload:e})}},801(t,e,n){n.d(e,{H:()=>a,t:()=>c});var r=n(636),o=n(315),i=n(474),s=n(468);function a(t,e,n,{computeHandlingStack:r}={}){let a=t[e];if("function"!=typeof a){if(!(e in t)||"string"!=typeof e||!e.startsWith("on"))return{stop:i.l};a=i.l}let c=!1;const u=function(){if(c)return a.apply(this,arguments);const t=Array.from(arguments);let e;(0,o.um)(n,null,[{target:this,parameters:t,onPostCall(t){e=t},handlingStack:r?(0,s.uC)("instrumented method"):void 0}]);const i=a.apply(this,t);return e&&(0,o.um)(e,null,[i]),i};return t[e]=u,{stop(){c=!0,t[e]===u&&(t[e]=a)}}}function c(t,e,n){const o=Object.getOwnPropertyDescriptor(t,e);if(!o||!o.set||!o.configurable)return{stop:i.l};const s=i.l;let a=(t,e)=>{(0,r.wg)(()=>{a!==s&&n(t,e)},0)};const c=function(t){o.set.call(this,t),a(this,t)};return Object.defineProperty(t,e,{set:c}),{stop(){var n;(null===(n=Object.getOwnPropertyDescriptor(t,e))||void 0===n?void 0:n.set)===c&&Object.defineProperty(t,e,o),a=s}}}},846(t,e,n){n.d(e,{H:()=>i,N:()=>s});var r=n(474),o=n(197);function i(t,e,n){if(document.readyState===e||"complete"===document.readyState)return n(),{stop:r.l};const i="complete"===e?"load":"DOMContentLoaded";return(0,o.q)(t,window,i,n,{once:!0})}function s(t,e){return new Promise(n=>{i(t,e,n)})}},858(t,e,n){n.d(e,{Bb:()=>r,Ih:()=>i,TU:()=>o});const r="rum.tyke.ai",o="us2.kubesense.ai",i=["ksource","kubesense-api-key","kubesense-request-id"]},875(t,e,n){n.d(e,{JZ:()=>o,Vy:()=>a,Xs:()=>u,bP:()=>r,fH:()=>c,xG:()=>l});const r={log:"log",debug:"debug",info:"info",warn:"warn",error:"error"},o=console,i={};Object.keys(r).forEach(t=>{i[t]=o[t]});const s="Kubsesense Browser SDK:",a={debug:i.debug.bind(o,s),log:i.log.bind(o,s),info:i.info.bind(o,s),warn:i.warn.bind(o,s),error:i.error.bind(o,s)},c="https://docs.kubesense.ai",u=c+"/rum/browser/troubleshooting",l="More details:"},877(t,e,n){n.d(e,{AY:()=>i,L2:()=>s,c$:()=>a,l2:()=>o});var r=n(433);function o(t){return a(t,location.href).href}function i(t){try{return!!a(t)}catch(t){return!1}}function s(t){const e=a(t).pathname;return"/"===e[0]?e:"/"+e}function a(t,e){const{URL:n}=function(){if(!c){let t,e;try{t=document.createElement("iframe"),t.style.display="none",document.body.appendChild(t),e=t.contentWindow}catch(t){e=r.J2}c={URL:e.URL},null==t||t.remove()}return c}();try{return void 0!==e?new n(t,e):new n(t)}catch(t){throw Error("Failed to construct URL: "+t)}}let c},887(t,e,n){n.d(e,{Kp:()=>c,_T:()=>a,y5:()=>s});var r=n(275),o=n(75),i=n(197);const s={HIDDEN:"visibility_hidden",UNLOADING:"before_unload",PAGEHIDE:"page_hide",FROZEN:"page_frozen"};function a(t){return new r.cP(e=>{const{stop:n}=(0,i.l)(t,window,["visibilitychange","freeze"],t=>{"visibilitychange"===t.type&&"hidden"===document.visibilityState?e.notify({reason:s.HIDDEN}):"freeze"===t.type&&e.notify({reason:s.FROZEN})},{capture:!0}),r=(0,i.q)(t,window,"beforeunload",()=>{e.notify({reason:s.UNLOADING})}).stop;return()=>{n(),r()}})}function c(t){return(0,o.KQ)(s).includes(t)}},945(t,e,n){n.d(e,{As:()=>u,bJ:()=>p,e6:()=>a});var r=n(520),o=n(416),i=n(511),s=n(468);const a="No stack, consider using an instance of Error";function c({originalError:t,stackTrace:e,source:n,useFallbackStack:r=!0,nonErrorPrefix:o}){const c=p(t);return!e&&c&&(e=(0,i.T)(t)),{source:n,type:e?e.name:void 0,message:l(e,c,o,t),stack:e?(0,s.Yn)(e):r?a:void 0}}function u({stackTrace:t,originalError:e,handlingStack:n,componentStack:r,startClocks:o,nonErrorPrefix:i,useFallbackStack:s=!0,source:a,handling:u}){return{startClocks:o,handling:u,handlingStack:n,componentStack:r,originalError:e,...c({originalError:e,stackTrace:t,source:a,useFallbackStack:s,nonErrorPrefix:i}),causes:p(e)?m(e,a):void 0,fingerprint:d(e),context:f(e)}}function l(t,e,n,i){return(null==t?void 0:t.message)&&(null==t?void 0:t.name)?t.message:e?"Empty message":n?`${n} ${(0,o.s)((0,r.a)(i))}`:(0,o.s)((0,r.a)(i))}function d(t){return p(t)&&"kubesense_fingerprint"in t?t.kubesense_fingerprint+"":void 0}function f(t){if(null!==t&&"object"==typeof t&&"kubesense_context"in t)return t.kubesense_context}function p(t){return t instanceof Error||"[object Error]"===Object.prototype.toString.call(t)}function m(t,e){const n=[];let r=t.cause;for(;null!=r&&n.length<10;){const t=c({originalError:r,source:e,useFallbackStack:!1});n.push(t),r=p(r)?r.cause:void 0}return n.length?n:void 0}},981(t,e,n){n.d(e,{BB:()=>s});var r=n(636),o=n(315),i=n(749);function s(t,e){if(window.requestIdleCallback&&window.cancelIdleCallback){const n=window.requestIdleCallback((0,o.dm)(t),e);return()=>window.cancelIdleCallback(n)}return function(t){const e=(0,i.x3)(),n=(0,r.wg)(()=>{t({didTimeout:!1,timeRemaining:()=>Math.max(0,a-((0,i.x3)()-e))})},0);return()=>(0,r.DJ)(n)}(t)}const a=50},995(t,e,n){n.d(e,{Go:()=>i,kg:()=>s});var r=n(166);function o(t,e,n=function(){if("undefined"!=typeof WeakSet){const t=new WeakSet;return{hasAlreadyBeenSeen(e){const n=t.has(e);return n||t.add(e),n}}}const t=[];return{hasAlreadyBeenSeen(e){const n=t.indexOf(e)>=0;return n||t.push(e),n}}}()){if(void 0===e)return t;if("object"!=typeof e||null===e)return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const t=e.flags||(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.sticky?"y":"")+(e.unicode?"u":"");return RegExp(e.source,t)}if(n.hasAlreadyBeenSeen(e))return;if(Array.isArray(e)){const r=Array.isArray(t)?t:[];for(let t=0;t<e.length;++t)r[t]=o(r[t],e[t],n);return r}const i="object"===(0,r.P)(t)?t:{};for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(i[t]=o(i[t],e[t],n));return i}function i(t){return o(void 0,t)}function s(...t){let e;for(const n of t)null!=n&&(e=o(e,n));return e}}},r={};function o(t){var e=r[t];if(void 0!==e)return e.exports;var i=r[t]={exports:{}};return n[t](i,i.exports,o),i.exports}o.m=n,o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.f={},o.e=t=>Promise.all(Object.keys(o.f).reduce((e,n)=>(o.f[n](t,e),e),[])),o.u=t=>"chunks/"+t+"-"+{recorder:"9ae532a18bac5f4280da",profiler:"b64730a2109c3ddbc539"}[t]+"-kubesense-rum.js",o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),t={},e="@kubesense/kubesense-browser-rum:",o.l=(n,r,i,s)=>{if(t[n])t[n].push(r);else{var a,c;if(void 0!==i)for(var u=document.getElementsByTagName("script"),l=0;l<u.length;l++){var d=u[l];if(d.getAttribute("src")==n||d.getAttribute("data-webpack")==e+i){a=d;break}}a||(c=!0,(a=document.createElement("script")).charset="utf-8",o.nc&&a.setAttribute("nonce",o.nc),a.setAttribute("data-webpack",e+i),a.src=n),t[n]=[r];var f=(e,r)=>{a.onerror=a.onload=null,clearTimeout(p);var o=t[n];if(delete t[n],a.parentNode&&a.parentNode.removeChild(a),o&&o.forEach(t=>t(r)),e)return e(r)},p=setTimeout(f.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=f.bind(null,a.onerror),a.onload=f.bind(null,a.onload),c&&document.head.appendChild(a)}},(()=>{var t;o.g.importScripts&&(t=o.g.location+"");var e=o.g.document;if(!t&&e&&(e.currentScript&&"SCRIPT"===e.currentScript.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!t||!/^http(s?):/.test(t));)t=n[r--].src}if(!t)throw Error("Automatic publicPath is not supported in this browser");t=t.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=t})(),(()=>{var t={main:0};o.f.j=(e,n)=>{var r=o.o(t,e)?t[e]:void 0;if(0!==r)if(r)n.push(r[2]);else{var i=new Promise((n,o)=>r=t[e]=[n,o]);n.push(r[2]=i);var s=o.p+o.u(e),a=Error();o.l(s,n=>{if(o.o(t,e)&&(0!==(r=t[e])&&(t[e]=void 0),r)){var i=n&&("load"===n.type?"missing":n.type),s=n&&n.target&&n.target.src;a.message="Loading chunk "+e+" failed.\n("+i+": "+s+")",a.name="ChunkLoadError",a.type=i,a.request=s,r[1](a)}},"chunk-"+e,e)}};var e=(e,n)=>{var r,i,[s,a,c]=n,u=0;if(s.some(e=>0!==t[e])){for(r in a)o.o(a,r)&&(o.m[r]=a[r]);c&&c(o)}for(e&&e(n);u<s.length;u++)i=s[u],o.o(t,i)&&t[i]&&t[i][0](),t[i]=0},n=self.webpackChunk_kubesense_kubesense_browser_rum=self.webpackChunk_kubesense_kubesense_browser_rum||[];n.forEach(e.bind(null,0)),n.push=e.bind(null,n.push.bind(n))})();var i=o(322),s=o(433),a=o(215),c=o(362),u=o(474),l=o(300),d=o(197),f=o(452);function p(t,e,n){let r,o=0,i=[],s=!0,a=0;const c=[],{stop:u}=(0,d.q)(t,e,"message",({data:t})=>{if("wrote"!==t.type||t.streamId!==n)return;const e=c[0];e&&(e.id===t.id?(c.shift(),o+=t.additionalBytesCount,i.push(t.result),r=t.trailer,e.writeCallback?e.writeCallback(t.result.byteLength):e.finishCallback&&e.finishCallback()):e.id<t.id&&u())});function l(){const t=0===i.length?new Uint8Array(0):(0,f.wh)(i.concat(r)),e={rawBytesCount:o,output:t,outputBytesCount:t.byteLength,encoding:"deflate"};return o=0,i=[],e}function p(){s||(e.postMessage({action:"reset",streamId:n}),s=!0)}return{isAsync:!0,get isEmpty(){return s},write(t,r){e.postMessage({action:"write",id:a,data:t,streamId:n}),c.push({id:a,writeCallback:r,data:t}),s=!1,a+=1},finish(t){p(),c.length?(c.forEach(t=>{delete t.writeCallback}),c[c.length-1].finishCallback=()=>t(l())):t(l())},finishSync(){p();const t=c.map(t=>t.data).join("");return c.length=0,{...l(),pendingData:t}},estimateEncodedBytesCount(t){return t.length/8},stop(){u()}}}var m=o(749),h=o(636),g=o(875),v=o(534);function y({configuredUrl:t,error:e,source:n,scriptType:r}){if(g.Vy.error(`${n} failed to start: an error occurred while initializing the ${r}:`,e),e instanceof Event||e instanceof Error&&((o=e.message).includes("Content Security Policy")||o.includes("requires 'TrustedScriptURL'"))){let e;e=t?`Please make sure the ${r} URL ${t} is correct and CSP is correctly configured.`:"Please make sure CSP is correctly configured.",g.Vy.error(`${e} See documentation at ${g.fH}/integrations/content_security_policy_logs/#use-csp-with-real-user-monitoring-and-session-replay`)}else"worker"===r&&(0,v.VJ)(e);var o}const b=30*m.OY;function _(t){return new Worker(t.workerUrl||URL.createObjectURL(new Blob(['(()=>{function t(t){if(1===t.length)return t[0];const e=t.reduce((t,e)=>t+e.length,0),a=new Uint8Array(e);let n=0;for(const e of t)a.set(e,n),n+=e.length;return a}function e(t){for(var e=t.length;--e>=0;)t[e]=0}var a=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),n=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),r=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),i=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=Array(576);e(s);var h=Array(60);e(h);var l=Array(512);e(l);var _=Array(256);e(_);var o=Array(29);e(o);var d,u,f,c=Array(30);function p(t,e,a,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=n,this.max_length=r,this.has_stree=t&&t.length}function g(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(c);var v=function(t){return t<256?l[t]:l[256+(t>>>7)]},w=function(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},m=function(t,e,a){t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,w(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},b=function(t,e,a){m(t,a[2*e],a[2*e+1])},y=function(t,e){var a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},z=function(t,e,a){var n,r,i=Array(16),s=0;for(n=1;n<=15;n++)i[n]=s=s+a[n-1]<<1;for(r=0;r<=e;r++){var h=t[2*r+1];0!==h&&(t[2*r]=y(i[h]++,h))}},k=function(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},x=function(t){t.bi_valid>8?w(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},A=function(t,e,a,n){var r=2*e,i=2*a;return t[r]<t[i]||t[r]===t[i]&&n[e]<=n[a]},U=function(t,e,a){for(var n=t.heap[a],r=a<<1;r<=t.heap_len&&(r<t.heap_len&&A(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!A(e,n,t.heap[r],t.depth));)t.heap[a]=t.heap[r],a=r,r<<=1;t.heap[a]=n},B=function(t,e,r){var i,s,h,l,d=0;if(0!==t.last_lit)do{i=t.pending_buf[t.d_buf+2*d]<<8|t.pending_buf[t.d_buf+2*d+1],s=t.pending_buf[t.l_buf+d],d++,0===i?b(t,s,e):(h=_[s],b(t,h+256+1,e),0!==(l=a[h])&&(s-=o[h],m(t,s,l)),i--,h=v(i),b(t,h,r),0!==(l=n[h])&&(i-=c[h],m(t,i,l)))}while(d<t.last_lit);b(t,256,e)},I=function(t,e){var a,n,r,i=e.dyn_tree,s=e.stat_desc.static_tree,h=e.stat_desc.has_stree,l=e.stat_desc.elems,_=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<l;a++)0!==i[2*a]?(t.heap[++t.heap_len]=_=a,t.depth[a]=0):i[2*a+1]=0;for(;t.heap_len<2;)i[2*(r=t.heap[++t.heap_len]=_<2?++_:0)]=1,t.depth[r]=0,t.opt_len--,h&&(t.static_len-=s[2*r+1]);for(e.max_code=_,a=t.heap_len>>1;a>=1;a--)U(t,i,a);r=l;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],U(t,i,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,i[2*r]=i[2*a]+i[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,i[2*a+1]=i[2*n+1]=r,t.heap[1]=r++,U(t,i,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,r,i,s,h,l=e.dyn_tree,_=e.max_code,o=e.stat_desc.static_tree,d=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,c=e.stat_desc.max_length,p=0;for(i=0;i<=15;i++)t.bl_count[i]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<573;a++)(i=l[2*l[2*(n=t.heap[a])+1]+1]+1)>c&&(i=c,p++),l[2*n+1]=i,n>_||(t.bl_count[i]++,s=0,n>=f&&(s=u[n-f]),h=l[2*n],t.opt_len+=h*(i+s),d&&(t.static_len+=h*(o[2*n+1]+s)));if(0!==p){do{for(i=c-1;0===t.bl_count[i];)i--;t.bl_count[i]--,t.bl_count[i+1]+=2,t.bl_count[c]--,p-=2}while(p>0);for(i=c;0!==i;i--)for(n=t.bl_count[i];0!==n;)(r=t.heap[--a])>_||(l[2*r+1]!==i&&(t.opt_len+=(i-l[2*r+1])*l[2*r],l[2*r+1]=i),n--)}}(t,e),z(i,_,t.bl_count)},E=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)r=s,s=e[2*(n+1)+1],++h<l&&r===s||(h<_?t.bl_tree[2*r]+=h:0!==r?(r!==i&&t.bl_tree[2*r]++,t.bl_tree[32]++):h<=10?t.bl_tree[34]++:t.bl_tree[36]++,h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4))},C=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),n=0;n<=a;n++)if(r=s,s=e[2*(n+1)+1],!(++h<l&&r===s)){if(h<_)do{b(t,r,t.bl_tree)}while(0!==--h);else 0!==r?(r!==i&&(b(t,r,t.bl_tree),h--),b(t,16,t.bl_tree),m(t,h-3,2)):h<=10?(b(t,17,t.bl_tree),m(t,h-3,3)):(b(t,18,t.bl_tree),m(t,h-11,7));h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4)}},D=!1,M=function(t,e,a,n){m(t,0+(n?1:0),3),function(t,e,a){x(t),w(t,a),w(t,~a),t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a}(t,e,a)},j=M,L=function(t,e,a,n){for(var r=65535&t,i=t>>>16&65535,s=0;0!==a;){a-=s=a>2e3?2e3:a;do{i=i+(r=r+e[n++]|0)|0}while(--s);r%=65521,i%=65521}return r|i<<16},S=new Uint32Array(function(){for(var t,e=[],a=0;a<256;a++){t=a;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}()),T=function(t,e,a,n){var r=S,i=n+a;t^=-1;for(var s=n;s<i;s++)t=t>>>8^r[255&(t^e[s])];return-1^t},O={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},q=j,F=function(t,e,a){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(_[a]+256+1)]++,t.dyn_dtree[2*v(e)]++),t.last_lit===t.lit_bufsize-1},G=-2,H=258,J=262,K=103,N=113,P=666,Q=function(t,e){return t.msg=O[e],e},R=function(t){return(t<<1)-(t>4?9:0)},V=function(t){for(var e=t.length;--e>=0;)t[e]=0},W=function(t,e,a){return(e<<t.hash_shift^a)&t.hash_mask},X=function(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},Y=function(t,e){(function(t,e,a,n){var r,l,_=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),I(t,t.l_desc),I(t,t.d_desc),_=function(t){var e;for(E(t,t.dyn_ltree,t.l_desc.max_code),E(t,t.dyn_dtree,t.d_desc.max_code),I(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*i[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),r=t.opt_len+3+7>>>3,(l=t.static_len+3+7>>>3)<=r&&(r=l)):r=l=a+5,a+4<=r&&-1!==e?M(t,e,a,n):4===t.strategy||l===r?(m(t,2+(n?1:0),3),B(t,s,h)):(m(t,4+(n?1:0),3),function(t,e,a,n){var r;for(m(t,e-257,5),m(t,a-1,5),m(t,n-4,4),r=0;r<n;r++)m(t,t.bl_tree[2*i[r]+1],3);C(t,t.dyn_ltree,e-1),C(t,t.dyn_dtree,a-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,_+1),B(t,t.dyn_ltree,t.dyn_dtree)),k(t),n&&x(t)})(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,X(t.strm)},Z=function(t,e){t.pending_buf[t.pending++]=e},$=function(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},tt=function(t,e,a,n){var r=t.avail_in;return r>n&&(r=n),0===r?0:(t.avail_in-=r,e.set(t.input.subarray(t.next_in,t.next_in+r),a),1===t.state.wrap?t.adler=L(t.adler,e,r,a):2===t.state.wrap&&(t.adler=T(t.adler,e,r,a)),t.next_in+=r,t.total_in+=r,r)},et=function(t,e){var a,n,r=t.max_chain_length,i=t.strstart,s=t.prev_length,h=t.nice_match,l=t.strstart>t.w_size-J?t.strstart-(t.w_size-J):0,_=t.window,o=t.w_mask,d=t.prev,u=t.strstart+H,f=_[i+s-1],c=_[i+s];t.prev_length>=t.good_match&&(r>>=2),h>t.lookahead&&(h=t.lookahead);do{if(_[(a=e)+s]===c&&_[a+s-1]===f&&_[a]===_[i]&&_[++a]===_[i+1]){i+=2,a++;do{}while(_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&i<u);if(n=H-(u-i),i=u-H,n>s){if(t.match_start=e,s=n,n>=h)break;f=_[i+s-1],c=_[i+s]}}}while((e=d[e&o])>l&&0!==--r);return s<=t.lookahead?s:t.lookahead},at=function(t){var e,a,n,r,i,s=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=s+(s-J)){t.window.set(t.window.subarray(s,s+s),0),t.match_start-=s,t.strstart-=s,t.block_start-=s,e=a=t.hash_size;do{n=t.head[--e],t.head[e]=n>=s?n-s:0}while(--a);e=a=s;do{n=t.prev[--e],t.prev[e]=n>=s?n-s:0}while(--a);r+=s}if(0===t.strm.avail_in)break;if(a=tt(t.strm,t.window,t.strstart+t.lookahead,r),t.lookahead+=a,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=W(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=W(t,t.ins_h,t.window[i+3-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<J&&0!==t.strm.avail_in)},nt=function(t,e){for(var a,n;;){if(t.lookahead<J){if(at(t),t.lookahead<J&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-J&&(t.match_length=et(t,a)),t.match_length>=3)if(n=F(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!==--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=W(t,t.ins_h,t.window[t.strstart+1]);else n=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2},rt=function(t,e){for(var a,n,r;;){if(t.lookahead<J){if(at(t),t.lookahead<J&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-J&&(t.match_length=et(t,a),t.match_length<=5&&(1===t.strategy||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-3,n=F(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!==--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(Y(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=F(t,0,t.window[t.strstart-1]))&&Y(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=F(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2};function it(t,e,a,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=n,this.func=r}var st=[new it(0,0,0,0,function(t,e){var a=65535;for(a>t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(at(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+a;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,Y(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-J&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(Y(t,!1),t.strm.avail_out),1)}),new it(4,4,8,4,nt),new it(4,5,16,8,nt),new it(4,6,32,32,nt),new it(4,4,16,16,rt),new it(8,16,32,32,rt),new it(8,16,128,128,rt),new it(8,32,128,256,rt),new it(32,128,258,1024,rt),new it(32,258,258,4096,rt)];function ht(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),V(this.dyn_ltree),V(this.dyn_dtree),V(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),V(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),V(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}for(var lt=function(t){var e,i=function(t){if(!t||!t.state)return Q(t,G);t.total_in=t.total_out=0,t.data_type=2;var e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:N,t.adler=2===e.wrap?0:1,e.last_flush=0,function(t){D||(function(){var t,e,i,g,v,w=Array(16);for(i=0,g=0;g<28;g++)for(o[g]=i,t=0;t<1<<a[g];t++)_[i++]=g;for(_[i-1]=g,v=0,g=0;g<16;g++)for(c[g]=v,t=0;t<1<<n[g];t++)l[v++]=g;for(v>>=7;g<30;g++)for(c[g]=v<<7,t=0;t<1<<n[g]-7;t++)l[256+v++]=g;for(e=0;e<=15;e++)w[e]=0;for(t=0;t<=143;)s[2*t+1]=8,t++,w[8]++;for(;t<=255;)s[2*t+1]=9,t++,w[9]++;for(;t<=279;)s[2*t+1]=7,t++,w[7]++;for(;t<=287;)s[2*t+1]=8,t++,w[8]++;for(z(s,287,w),t=0;t<30;t++)h[2*t+1]=5,h[2*t]=y(t,5);d=new p(s,a,257,286,15),u=new p(h,n,0,30,15),f=new p([],r,0,19,7)}(),D=!0),t.l_desc=new g(t.dyn_ltree,d),t.d_desc=new g(t.dyn_dtree,u),t.bl_desc=new g(t.bl_tree,f),t.bi_buf=0,t.bi_valid=0,k(t)}(e),0}(t);return 0===i&&((e=t.state).window_size=2*e.w_size,V(e.head),e.max_lazy_match=st[e.level].max_lazy,e.good_match=st[e.level].good_length,e.nice_match=st[e.level].nice_length,e.max_chain_length=st[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),i},_t=function(t,e){var a,n;if(!t||!t.state||e>5||e<0)return t?Q(t,G):G;var r=t.state;if(!t.output||!t.input&&0!==t.avail_in||r.status===P&&4!==e)return Q(t,0===t.avail_out?-5:G);r.strm=t;var i=r.last_flush;if(r.last_flush=e,42===r.status)if(2===r.wrap)t.adler=0,Z(r,31),Z(r,139),Z(r,8),r.gzhead?(Z(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),Z(r,255&r.gzhead.time),Z(r,r.gzhead.time>>8&255),Z(r,r.gzhead.time>>16&255),Z(r,r.gzhead.time>>24&255),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(Z(r,255&r.gzhead.extra.length),Z(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=T(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,3),r.status=N);else{var h=8+(r.w_bits-8<<4)<<8;h|=(r.strategy>=2||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(h|=32),h+=31-h%31,r.status=N,$(r,h),0!==r.strstart&&($(r,t.adler>>>16),$(r,65535&t.adler)),t.adler=1}if(69===r.status)if(r.gzhead.extra){for(a=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending!==r.pending_buf_size));)Z(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,Z(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,Z(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.status=K)}else r.status=K;if(r.status===K&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&X(t),r.pending+2<=r.pending_buf_size&&(Z(r,255&t.adler),Z(r,t.adler>>8&255),t.adler=0,r.status=N)):r.status=N),0!==r.pending){if(X(t),0===t.avail_out)return r.last_flush=-1,0}else if(0===t.avail_in&&R(e)<=R(i)&&4!==e)return Q(t,-5);if(r.status===P&&0!==t.avail_in)return Q(t,-5);if(0!==t.avail_in||0!==r.lookahead||0!==e&&r.status!==P){var l=2===r.strategy?function(t,e){for(var a;;){if(0===t.lookahead&&(at(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):3===r.strategy?function(t,e){for(var a,n,r,i,s=t.window;;){if(t.lookahead<=H){if(at(t),t.lookahead<=H&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=s[r=t.strstart-1])===s[++r]&&n===s[++r]&&n===s[++r]){i=t.strstart+H;do{}while(n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&r<i);t.match_length=H-(i-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=F(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):st[r.level].func(r,e);if(3!==l&&4!==l||(r.status=P),1===l||3===l)return 0===t.avail_out&&(r.last_flush=-1),0;if(2===l&&(1===e?function(t){m(t,2,3),b(t,256,s),function(t){16===t.bi_valid?(w(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}(r):5!==e&&(q(r,0,0,!1),3===e&&(V(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),X(t),0===t.avail_out))return r.last_flush=-1,0}return 4!==e?0:r.wrap<=0?1:(2===r.wrap?(Z(r,255&t.adler),Z(r,t.adler>>8&255),Z(r,t.adler>>16&255),Z(r,t.adler>>24&255),Z(r,255&t.total_in),Z(r,t.total_in>>8&255),Z(r,t.total_in>>16&255),Z(r,t.total_in>>24&255)):($(r,t.adler>>>16),$(r,65535&t.adler)),X(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?0:1)},ot=function(t){if(!t||!t.state)return G;var e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&e!==K&&e!==N&&e!==P?Q(t,G):(t.state=null,e===N?Q(t,-3):0)},dt=new Uint8Array(256),ut=0;ut<256;ut++)dt[ut]=ut>=252?6:ut>=248?5:ut>=240?4:ut>=224?3:ut>=192?2:1;dt[254]=dt[254]=1;var ft=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},ct=Object.prototype.toString;function pt(){this.options={level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0};var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ft,this.strm.avail_out=0;var e,a,n=function(t,e,a,n,r,i){if(!t)return G;var s=1;if(-1===e&&(e=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),r<1||r>9||8!==a||n<8||n>15||e<0||e>9||i<0||i>4)return Q(t,G);8===n&&(n=9);var h=new ht;return t.state=h,h.strm=t,h.wrap=s,h.gzhead=null,h.w_bits=n,h.w_size=1<<h.w_bits,h.w_mask=h.w_size-1,h.hash_bits=r+7,h.hash_size=1<<h.hash_bits,h.hash_mask=h.hash_size-1,h.hash_shift=~~((h.hash_bits+3-1)/3),h.window=new Uint8Array(2*h.w_size),h.head=new Uint16Array(h.hash_size),h.prev=new Uint16Array(h.w_size),h.lit_bufsize=1<<r+6,h.pending_buf_size=4*h.lit_bufsize,h.pending_buf=new Uint8Array(h.pending_buf_size),h.d_buf=1*h.lit_bufsize,h.l_buf=3*h.lit_bufsize,h.level=e,h.strategy=i,h.method=a,lt(t)}(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==n)throw Error(O[n]);if(t.header&&(e=this.strm,a=t.header,e&&e.state&&(2!==e.state.wrap||(e.state.gzhead=a))),t.dictionary){var r;if(r="[object ArrayBuffer]"===ct.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(n=function(t,e){var a=e.length;if(!t||!t.state)return G;var n=t.state,r=n.wrap;if(2===r||1===r&&42!==n.status||n.lookahead)return G;if(1===r&&(t.adler=L(t.adler,e,a,0)),n.wrap=0,a>=n.w_size){0===r&&(V(n.head),n.strstart=0,n.block_start=0,n.insert=0);var i=new Uint8Array(n.w_size);i.set(e.subarray(a-n.w_size,a),0),e=i,a=n.w_size}var s=t.avail_in,h=t.next_in,l=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,at(n);n.lookahead>=3;){var _=n.strstart,o=n.lookahead-2;do{n.ins_h=W(n,n.ins_h,n.window[_+3-1]),n.prev[_&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=_,_++}while(--o);n.strstart=_,n.lookahead=2,at(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=h,t.input=l,t.avail_in=s,n.wrap=r,0}(this.strm,r)))throw Error(O[n]);this._dict_set=!0}}function gt(t,e,a){try{t.postMessage({type:"errored",error:e,streamId:a})}catch(n){t.postMessage({type:"errored",error:e+"",streamId:a})}}function vt(t){const e=t.strm.adler;return new Uint8Array([3,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e])}pt.prototype.push=function(t,e){var a,n,r=this.strm,i=this.options.chunkSize;if(this.ended)return!1;for(n=e===~~e?e:!0===e?4:0,"[object ArrayBuffer]"===ct.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),(2===n||3===n)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(1===(a=_t(r,n)))return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),a=ot(this.strm),this.onEnd(a),this.ended=!0,0===a;if(0!==r.avail_out){if(n>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},pt.prototype.onData=function(t){this.chunks.push(t)},pt.prototype.onEnd=function(t){0===t&&(this.result=function(t){for(var e=0,a=0,n=t.length;a<n;a++)e+=t[a].length;for(var r=new Uint8Array(e),i=0,s=0,h=t.length;i<h;i++){var l=t[i];r.set(l,s),s+=l.length}return r}(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},function(e=self){try{const a=new Map;e.addEventListener("message",n=>{try{const r=function(e,a){switch(a.action){case"init":return{type:"initialized",version:"1.3.0"};case"write":{let n=e.get(a.streamId);n||(n=new pt,e.set(a.streamId,n));const r=n.chunks.length,i=function(t){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,a,n,r,i,s=t.length,h=0;for(r=0;r<s;r++)a=t.charCodeAt(r),55296==(64512&a)&&r+1<s&&(n=t.charCodeAt(r+1),56320==(64512&n)&&(a=65536+(a-55296<<10)+(n-56320),r++)),h+=a<128?1:a<2048?2:a<65536?3:4;for(e=new Uint8Array(h),i=0,r=0;i<h;r++)a=t.charCodeAt(r),55296==(64512&a)&&r+1<s&&(n=t.charCodeAt(r+1),56320==(64512&n)&&(a=65536+(a-55296<<10)+(n-56320),r++)),a<128?e[i++]=a:a<2048?(e[i++]=192|a>>>6,e[i++]=128|63&a):a<65536?(e[i++]=224|a>>>12,e[i++]=128|a>>>6&63,e[i++]=128|63&a):(e[i++]=240|a>>>18,e[i++]=128|a>>>12&63,e[i++]=128|a>>>6&63,e[i++]=128|63&a);return e}(a.data);return n.push(i,2),{type:"wrote",id:a.id,streamId:a.streamId,result:t(n.chunks.slice(r)),trailer:vt(n),additionalBytesCount:i.length}}case"reset":e.delete(a.streamId)}}(a,n.data);r&&e.postMessage(r)}catch(t){gt(e,t,n.data&&"streamId"in n.data?n.data.streamId:void 0)}})}catch(t){gt(e,t)}}()})();'])))}let w={status:0};function k(t,e,n,r=_){switch(0===w.status&&function(t,e,n=_){try{const r=n(t),{stop:o}=(0,d.q)(t,r,"error",n=>{E(t,e,n)}),{stop:i}=(0,d.q)(t,r,"message",({data:n})=>{var r;"errored"===n.type?E(t,e,n.error,n.streamId):"initialized"===n.type&&(r=n.version,1===w.status&&(w={status:3,worker:w.worker,stop:w.stop,version:r}))});r.postMessage({action:"init"}),(0,h.wg)(()=>function(t){1===w.status&&(g.Vy.error(t+" failed to start: a timeout occurred while initializing the Worker"),w.initializationFailureCallbacks.forEach(t=>t()),w={status:2})}(e),b),w={status:1,worker:r,stop(){o(),i()},initializationFailureCallbacks:[]}}catch(n){E(t,e,n)}}(t,e,r),w.status){case 1:return w.initializationFailureCallbacks.push(n),w.worker;case 3:return w.worker}}function S(){return w.status}function E(t,e,n,r){1===w.status||0===w.status?(y({configuredUrl:t.workerUrl,error:n,source:e,scriptType:"worker"}),1===w.status&&w.initializationFailureCallbacks.forEach(t=>t()),w={status:2}):(0,v.VJ)(n,{worker_version:3===w.status&&w.version,stream_id:r})}function x(){return"function"==typeof Array.from&&"function"==typeof CSSSupportsRule&&"function"==typeof URL.createObjectURL&&"forEach"in NodeList.prototype}var T=o(275),A=o(846),C=o(315);async function R(t,e,n){try{return await n}finally{t.notify(e)}}async function I(){return(await o.e("recorder").then(o.bind(o,814))).startRecording}var O=o(339);async function N(t=P){try{return await t()}catch(t){y({error:t,source:"Profiler",scriptType:"module"})}}async function P(){return(await o.e("profiler").then(o.bind(o,437))).createRumProfiler}const L=function(t){if((0,c.d0)()&&!(0,c.Ww)("records")||!x())return{start:u.l,stop:u.l,getReplayStats(){},onRumStart:u.l,isRecording:()=>!1,getSessionReplayLink(){}};let{strategy:e,shouldStartImmediately:n}=function(){let t=0;return{strategy:{start(){t=1},stop(){t=2},isRecording(){return!1},getSessionReplayLink:u.l},shouldStartImmediately:e=>1===t||0===t&&!e.startSessionReplayRecordingManually}}();return{start:t=>e.start(t),stop:()=>e.stop(),getSessionReplayLink:()=>e.getSessionReplayLink(),onRumStart(r,o,i,s,c,l){let d;e=function(t,e,n,r,o,i,s){let c,l=0;e.subscribe(9,()=>{2!==l&&3!==l||(h(),l=1)}),e.subscribe(10,()=>{1===l&&p()});const d=new T.cP;!function(t,e){if(!t.metricsEnabled)return{stop:u.l};let n,r,o;const{unsubscribe:i}=e.subscribe(t=>{switch(t.type){case"start":n={forced:t.forced,timestamp:(0,m.nx)()},r=void 0,o=void 0;break;case"document-ready":n&&(r=(0,m.vk)(n.timestamp,(0,m.nx)()));break;case"recorder-settled":n&&(o=(0,m.vk)(n.timestamp,(0,m.nx)()));break;case"aborted":case"deflate-encoder-load-failed":case"recorder-load-failed":case"succeeded":i(),n&&(0,v.Gk)("Recorder init metrics",{metrics:(e=n.forced,s=o,a=(0,m.vk)(n.timestamp,(0,m.nx)()),c=t.type,u=r,{forced:e,loadRecorderModuleDuration:s,recorderInitDuration:a,result:c,waitForDocReadyDuration:u})})}var e,s,a,c,u})}(s,d);const f=async a=>{d.notify({type:"start",forced:a});const[u]=await Promise.all([R(d,{type:"recorder-settled"},o()),R(d,{type:"document-ready"},(0,A.N)(t,"interactive"))]);if(2!==l)return void d.notify({type:"aborted"});if(!u)return l=0,void d.notify({type:"recorder-load-failed"});const f=i();if(!f)return l=0,void d.notify({type:"deflate-encoder-load-failed"});({stop:c}=u(e,t,n,r,f,s)),l=3,d.notify({type:"succeeded"})};function p(t){const e=n.findTrackedSession();if(function(t,e){return!t||0===t.sessionReplay&&(!e||!e.force)}(e,t))return void(l=1);if(function(t){return 2===t||3===t}(l))return;l=2;const r=function(t,e){return e&&e.force&&0===t.sessionReplay}(e,t)||!1;f(r).catch(C.Dx),r&&n.setForcedReplay()}function h(){3===l&&(null==c||c()),l=0}return{start:p,stop:h,getSessionReplayLink:()=>function(t,e,n,r){const o=e.findTrackedSession(),i=function(t,e){return x()?t?0===t.sessionReplay?"incorrect-session-plan":e?void 0:"replay-not-started":"rum-not-tracked":"browser-not-supported"}(o,r),s=n.findView();return(0,a.dx)(t,{viewContext:s,errorType:i,session:o})}(t,n,r,0!==l),isRecording(){return 3===l}}}(o,r,i,s,t,function(){return d||(null!=c||(c=k(o,"Kubsesense Session Replay",()=>{e.stop()},void 0)),c&&(d=p(o,c,1))),d},l),n(o)&&e.start()},isRecording:()=>3===S()&&e.isRecording(),getReplayStats:t=>3===S()?(0,l.lv)(t):void 0}}(async function(t=I){try{return await t()}catch(t){y({error:t,source:"Recorder",scriptType:"module"})}}),V=function(){let t;return{onRumStart(e,n,r,o,i,c,u){const l=o.findTrackedSession();if(!l)return;if(!(0,a.$5)(l.id,r.profilingSampleRate))return;const d=function(t){let e={status:"starting"};return t.register(0,({eventType:t})=>t!==a.bb.VIEW&&t!==a.bb.LONG_TASK?O.$O:{type:t,_kubesense:{profiling:e}}),{get(){return e},set(t){e=t}}}(n);void 0!==(0,s.VZ)().Profiler?N().then(n=>{if(!n)return(0,v.A2)("[KUBESENSE_SDK] Failed to lazy load the RUM Profiler"),void d.set({status:"error",error_reason:"failed-to-lazy-load"});t=n(r,e,o,d,c,u,i,void 0),t.start()}).catch(C.Dx):d.set({status:"error",error_reason:"not-supported-by-browser"})},stop(){null==t||t.stop().catch(C.Dx)}}}(),M=(0,a.AB)(a.rJ,L,V,{startDeflateWorker:k,createDeflateEncoder:p,sdkName:"rum"});(0,i.Z)((0,s.VZ)(),"KUBESENSE_SDK",M)})();
|
|
1
|
+
(()=>{var t,e,n={75(t,e,n){function r(t,e){for(let n=t.length-1;n>=0;n-=1){const r=t[n];if(e(r,n,t))return r}}function o(t){return Object.values(t)}function i(t){return Object.entries(t)}n.d(e,{KQ:()=>o,Uk:()=>r,WP:()=>i})},166(t,e,n){function r(t){return null===t?"null":Array.isArray(t)?"array":typeof t}n.d(e,{P:()=>r})},187(t,e,n){function r(t){return{...t}}function o(t,e){return Object.keys(t).some(n=>t[n]===e)}function i(t){return 0===Object.keys(t).length}function s(t,e){const n={};for(const r of Object.keys(t))n[r]=e(t[r]);return n}n.d(e,{LG:()=>s,RI:()=>i,Rj:()=>o,yG:()=>r})},188(t,e,n){n.d(e,{Aq:()=>s,R9:()=>r,q7:()=>c,sr:()=>a});var r,o=n(187);!function(t){t.TRACK_INTAKE_REQUESTS="track_intake_requests",t.USE_TREE_WALKER_FOR_ACTION_NAME="use_tree_walker_for_action_name",t.FEATURE_OPERATION_VITAL="feature_operation_vital",t.SHORT_SESSION_INVESTIGATION="short_session_investigation",t.AVOID_FETCH_KEEPALIVE="avoid_fetch_keepalive"}(r||(r={}));const i=new Set;function s(t){Array.isArray(t)&&t.filter(t=>(0,o.Rj)(r,t)).forEach(t=>{i.add(t)})}function a(t){return i.has(t)}function c(){return i}},197(t,e,n){n.d(e,{l:()=>s,q:()=>i});var r=n(315),o=n(586);function i(t,e,n,r,o){return s(t,e,[n],r,o)}function s(t,e,n,i,{once:s,capture:a,passive:c}={}){const u=(0,r.dm)(e=>{(e.isTrusted||e.__kubesenseIsTrusted||t.allowUntrustedEvents)&&(s&&p(),i(e))}),l=c?{capture:a,passive:c}:a,d=window.EventTarget&&e instanceof EventTarget?window.EventTarget.prototype:e,f=(0,o.W)(d,"addEventListener");function p(){const t=(0,o.W)(d,"removeEventListener");n.forEach(n=>t.call(e,n,u,l))}return n.forEach(t=>f.call(e,t,u,l)),{stop:p}}},215(t,e,n){n.d(e,{X2:()=>V,eT:()=>pr,o:()=>fr,$m:()=>ur,NT:()=>lr,Wd:()=>dr,bb:()=>O,wP:()=>Ci,wI:()=>Fn,W3:()=>Xe,PJ:()=>gr,dT:()=>yr,$4:()=>Wn,Gn:()=>Io,zL:()=>Oo,dx:()=>Ai,rf:()=>Sr,pB:()=>Lo,wR:()=>jn,g1:()=>Po,XS:()=>Bn,p_:()=>qn,$5:()=>Te,AB:()=>Ke,jR:()=>vr,ei:()=>Cn,ap:()=>_r,Ie:()=>br,rJ:()=>Ti});var r=n(275);const o={GRANTED:"granted",NOT_GRANTED:"not-granted"};var i=n(801),s=n(749),a=n(511),c=n(433),u=n(945),l=n(314);function d(){return new r.cP(t=>{const e=(e,n)=>{const r=(0,u.As)({stackTrace:n,originalError:e,startClocks:(0,s.M8)(),nonErrorPrefix:"Uncaught",source:l.g.SOURCE,handling:"unhandled"});t.notify(r)},{stop:n}=(r=e,(0,i.H)((0,c.VZ)(),"onerror",({parameters:[t,e,n,o,i]})=>{let s;(0,u.bJ)(i)||(s=(0,a.h)(t,e,n,o)),r(null!=i?i:t,s)}));var r;const{stop:o}=function(t){return(0,i.H)((0,c.VZ)(),"onunhandledrejection",({parameters:[e]})=>{t(e.reason||"Empty reason")})}(e);return()=>{n(),o()}})}var f=n(452);function p(){let t="",e=0;return{isAsync:!1,get isEmpty(){return!t},write(n,r){const o=(0,f.WW)(n);e+=o,t+=n,r&&r(o)},finish(t){t(this.finishSync())},finishSync(){const n={output:t,outputBytesCount:e,rawBytesCount:e,pendingData:""};return t="",e=0,n},estimateEncodedBytesCount(t){return t.length}}}var m=n(315),h=n(534),g=n(322),v=n(995),y=n(468),b=n(520);function _(t,e,n,r){return(0,m.dm)((...o)=>(r&&(0,h.Q6)({feature:r}),t()[e][n](...o)))}const w="userContext",k="globalContext",S="accountContext",E="getContext",x="setContext",T="setContextProperty",A="removeContextProperty",C="clearContext";var R=n(875);function I(t,e){e.silentMultipleInit||R.Vy.error(t+" is already initialized.")}const O={ACTION:"action",ERROR:"error",LONG_TASK:"long_task",VIEW:"view",RESOURCE:"resource",VITAL:"vital"},N="initial_load",P="route_change",L="bf_cache",V={CLICK:"click",CUSTOM:"custom"},M="error_click",U="dead_click",$="duration";var D=n(188);function z(t){return t?(parseInt(t,10)^16*Math.random()>>parseInt(t,10)/4).toString(16):"10000000-1000-4000-8000-100000000000".replace(/[018]/g,z)}const B=/([\w-]+)\s*=\s*([^;]+)/g;function q(t,e){for(B.lastIndex=0;;){const n=B.exec(t);if(!n)break;if(n[1]===e)return n[2]}}function j(t,e,n=""){const r=t.charCodeAt(e-1),o=r>=55296&&r<=56319?e+1:e;return t.length<=o?t:`${t.slice(0,o)}${n}`}function F({vitalsByName:t,vitalsByReference:e},n,r={}){const o={name:n,startClocks:(0,s.M8)(),...r},i={__kubesense_vital_reference:!0};return t.set(n,o),e.set(i,o),i}function W(t,{vitalsByName:e,vitalsByReference:n},r,o={}){const i="string"==typeof r?e.get(r):n.get(r);i&&(t(function(t,e,n,r){var o;return{name:t.name,type:$,startClocks:e,duration:(0,s.vk)(e.timeStamp,r.timeStamp),context:(0,v.kg)(t.context,n.context),description:null!==(o=n.description)&&void 0!==o?o:t.description}}(i,i.startClocks,o,(0,s.M8)())),"string"==typeof r?e.delete(r):n.delete(r))}function G(t){const{startClocks:e,type:n,name:r,description:o,context:i}=t,a={id:z(),type:n,name:r,description:o,...n===$?{duration:(0,s.Zj)(t.duration)}:{step_type:t.stepType,operation_key:t.operationKey,failure_reason:t.failureReason}};return{rawRumEvent:{date:e.timeStamp,vital:a,type:O.VITAL,context:i},startTime:e.relative,duration:n===$?t.duration:void 0,domainContext:{}}}function Z(t,e,n){if(t)for(const r of t){const t=r[e];t&&t(n)}}function H(t,e){const n=t.indexOf(e);n>=0&&t.splice(n,1)}function K(t){return Array.isArray(t)&&t.length>0}var J=n(197),Y=n(187);const Q=[];function X(t,e,n,r){const o=function(t,e){return`_kubesense_c_${t}_${e}`}(n,r);Q.push((0,J.q)(t,window,"storage",({key:t})=>{o===t&&e.setContext(s())})),e.changeObservable.subscribe(function(){localStorage.setItem(o,JSON.stringify(e.getContext()))});const i=(0,v.kg)(s(),e.getContext());function s(){const t=localStorage.getItem(o);return t?JSON.parse(t):{}}(0,Y.RI)(i)||e.setContext(i)}var tt=n(166);function et(t,e,n){const r={...t};for(const[t,{required:o,type:i}]of Object.entries(e))"string"!==i||nt(r[t])||(r[t]=r[t]+""),o&&nt(r[t])&&R.Vy.warn(`The property ${t} of ${n} is required; context will not be sent to the intake.`);return r}function nt(t){return null==t||""===t}function rt(t="",{propertiesConfig:e={}}={}){let n={};const o=new r.cP,i={getContext:()=>(0,v.Go)(n),setContext(r){!function(t){const e="object"===(0,tt.P)(t);return e||R.Vy.error("Unsupported context:",t),e}(r)?i.clearContext():n=(0,b.a)(et(r,e,t)),o.notify()},setContextProperty(r,i){n=(0,b.a)(et({...n,[r]:i},e,t)),o.notify()},removeContextProperty(r){delete n[r],et(n,e,t),o.notify()},clearContext(){n={},o.notify()},changeObservable:o};return i}function ot(){return rt("global context")}var it=n(339),st=n(636);const at=1/0,ct=s.iW;let ut=null;const lt=new Set;function dt({expireDelay:t,maxEntries:e}){let n=[];ut||(ut=(0,st.yb)(()=>{lt.forEach(t=>t())},ct));const r=()=>{const e=(0,s.$S)()-t;for(;n.length>0&&n[n.length-1].endTime<e;)n.pop()};return lt.add(r),{add(t,r){const o={value:t,startTime:r,endTime:at,remove(){H(n,o)},close(t){o.endTime=t}};return e&&n.length>=e&&n.pop(),n.unshift(o),o},find(t=1/0,e={returnInactive:!1}){for(const r of n)if(r.startTime<=t){if(e.returnInactive||t<=r.endTime)return r.value;break}},closeActive(t){const e=n[0];e&&e.endTime===at&&e.close(t)},findAll(t=1/0,e=0){const r=(0,s.Gw)(t,e);return n.filter(e=>e.startTime<=r&&t<=e.endTime).map(t=>t.value)},reset(){n=[]},stop(){lt.delete(r),0===lt.size&&ut&&((0,st.vG)(ut),ut=null)}}}const ft=4*s.MA,pt=15*s.iW,mt=s.$H,ht="cookie",gt="local-storage";function vt(t){return"_kubesense_session_user_"+t}function yt(t,e){try{const n=vt(t);e?localStorage.setItem(n,e):localStorage.removeItem(n)}catch(t){}}function bt(){return rt("user",{propertiesConfig:{id:{type:"string"},name:{type:"string"},email:{type:"string"}}})}function _t(){return rt("account",{propertiesConfig:{id:{type:"string",required:!0},name:{type:"string"}}})}var wt=n(362),kt=n(474),St=n(877),Et=n(295);let xt;const Tt=[];function At({responseBodyAction:t}={}){return t&&Tt.push(t),xt||(xt=new r.cP(t=>{if(!c.J2.fetch)return;const{stop:e}=(0,i.H)(c.J2,"fetch",e=>function({parameters:t,onPostCall:e,handlingStack:n},r){const[o,i]=t;let a=i&&i.method;void 0===a&&o instanceof Request&&(a=o.method);const c=void 0!==a?(a+"").toUpperCase():"GET",u=o instanceof Request?o.url:(0,St.l2)(o+""),l={state:"start",init:i,input:o,method:c,startClocks:(0,s.M8)(),url:u,handlingStack:n};r.notify(l),t[0]=l.input,t[1]=l.init,e(t=>{(async function(t,e,n){var r,o;const i=n;let s;i.state="resolve";try{s=await e}catch(e){return i.status=0,i.isAborted=(null===(o=null===(r=i.init)||void 0===r?void 0:r.signal)||void 0===o?void 0:o.aborted)||e instanceof DOMException&&e.code===DOMException.ABORT_ERR,i.error=e,void t.notify(i)}i.response=s,i.status=s.status,i.responseType=s.type,i.isAborted=!1;const a=Tt.reduce((t,e)=>Math.max(t,e(i)),0);if(0!==a){const t=(0,Et.i)(s);if(t&&t.body)try{const e=await async function(t,e){const n=t.getReader(),r=[];for(;;){const t=await n.read();if(t.done)break;e.collectStreamBody&&r.push(t.value)}return n.cancel().catch(kt.l),e.collectStreamBody?(0,f.wh)(r):void 0}(t.body,{collectStreamBody:2===a});i.responseBody=e&&(new TextDecoder).decode(e)}catch(t){}}t.notify(i)})(r,t,l).catch(m.Dx)})}(e,t),{computeHandlingStack:!0});return e})),xt}function Ct(t,e,n=0,r){const o=new Date;o.setTime(o.getTime()+n);const i="expires="+o.toUTCString(),s=r&&r.crossSite?"none":"strict",a=r&&r.domain?";domain="+r.domain:"",c=r&&r.secure?";secure":"",u=r&&r.partitioned?";partitioned":"";document.cookie=`${t}=${e};${i};path=/;samesite=${s}${a}${c}${u}`}function Rt(t){return q(document.cookie,t)}let It,Ot;function Nt(t){return It||(It=function(t){const e=new Map;for(B.lastIndex=0;;){const n=B.exec(t);if(!n)break;e.set(n[1],n[2])}return e}(document.cookie)),It.get(t)}function Pt(t,e){Ct(t,"",0,e)}function Lt(t=location.hostname,e=document.referrer){if(void 0===Ot){const n=function(t,e){try{return t||(0,St.c$)(e).hostname}catch(t){}}(t,e);if(n){const t="dd_site_test_"+z(),e="test",r=n.split(".");let o=r.pop();for(;r.length&&!Rt(t);)o=`${r.pop()}.${o}`,Ct(t,e,s.OY,{domain:o});Pt(t,{domain:o}),Ot=o}}return Ot}function Vt(){return!(c.Wq||!c.J2._KUBESENSE_SYNTHETICS_INJECTS_RUM&&!Nt("kubesense-synthetics-injects-rum"))}function Mt(){const t=window._KUBESENSE_SYNTHETICS_PUBLIC_ID||Nt("kubesense-synthetics-public-id");return"string"==typeof t?t:void 0}function Ut(){const t=window._KUBESENSE_SYNTHETICS_RESULT_ID||Nt("kubesense-synthetics-result-id");return"string"==typeof t?t:void 0}function $t(){return!(!Mt()||!Ut())}var Dt=n(262),zt=n(713),Bt=n(760);const qt="_kubesense_s";var jt=n(75);const Ft=/^([a-zA-Z]+)=([a-z0-9-]+)$/;function Wt(t,e){const n={isExpired:"1"};return e.trackAnonymousUser&&(null==t?void 0:t.anonymousId)&&(n.anonymousId=null==t?void 0:t.anonymousId),n}function Gt(t){return(0,Y.RI)(t)}function Zt(t){return!Gt(t)}function Ht(t){return void 0!==t.isExpired||!((void 0===(e=t).created||(0,s.x3)()-Number(e.created)<ft)&&(void 0===e.expire||(0,s.x3)()<Number(e.expire)));var e}function Kt(t){t.expire=(0,s.x3)()+pt+""}function Jt(t){return(0,jt.WP)(t).map(([t,e])=>"anonymousId"===t?"aid="+e:`${t}=${e}`).join("&")}function Yt(t){const e={};return function(t){return!!t&&(-1!==t.indexOf("&")||Ft.test(t))}(t)&&t.split("&").forEach(t=>{const n=Ft.exec(t);if(null!==n){const[,t,r]=n;"aid"===t?e.anonymousId=r:e[t]=r}}),e}function Qt(t){const e=function(t){const e={};if(e.secure=!!t.useSecureSessionCookie||!!t.usePartitionedCrossSiteSessionCookie,e.crossSite=!!t.usePartitionedCrossSiteSessionCookie,e.partitioned=!!t.usePartitionedCrossSiteSessionCookie,t.trackSessionAcrossSubdomains){const t=Lt();if(!t)return;e.domain=t}return e}(t);return e&&function(t){if(void 0===document.cookie||null===document.cookie)return!1;try{const e="kubesense_cookie_test_"+z(),n="test";Ct(e,n,s.iW,t);const r=Rt(e)===n;return Pt(e,t),r}catch(t){return R.Vy.error(t),!1}}(e)?{type:ht,cookieOptions:e}:void 0}function Xt(t,e,n,r){let o=Jt(n);e.betaEncodeCookieOptions&&(o=Jt({...n,...(0,Y.RI)(n)?{}:{c:ee(t)}})),Ct(qt,o,e.trackAnonymousUser?mt:r,t)}function te(t,e){return e.betaEncodeCookieOptions?function(t){const e=(r=qt,function(t){const e=new Map;for(B.lastIndex=0;;){const n=B.exec(t);if(!n)break;{const t=n[1],r=n[2];e.has(t)?e.get(t).push(r):e.set(t,[r])}}return e}(document.cookie).get(r)||[]),n=ee(t);var r;let o;for(const t of e.reverse())if(o=Yt(t),o.c===n)break;return null==o||delete o.c,null!=o?o:{}}(t):Yt(Rt(qt))}function ee(t){let e=0;return e|=0,e|=(t.domain?t.domain.split(".").length-1:0)<<1,e|=t.crossSite?1:0,e.toString(16)}function ne(){try{const t=z(),e="_kubesense_test_"+t;localStorage.setItem(e,t);const n=localStorage.getItem(e);return localStorage.removeItem(e),t===n?{type:gt}:void 0}catch(t){return}}function re(t){localStorage.setItem(qt,Jt(t))}function oe(){return Yt(localStorage.getItem(qt))}const ie=s.OY,se=[];let ae;function ce(t,e,n=0){var r;const{isLockEnabled:o,persistSession:i,expireSession:a}=e,c=t=>i({...t,lock:l}),u=()=>{const{lock:t,...n}=e.retrieveSession();return{session:n,lock:t&&!de(t)?t:void 0}};if(ae||(ae=t),t!==ae)return void se.push(t);if(o&&n>=100)return void le(e);let l,d=u();if(o){if(d.lock)return void ue(t,e,n);if(l=z()+"--"+(0,s.nx)(),c(d.session),d=u(),d.lock!==l)return void ue(t,e,n)}let f=t.process(d.session);if(o&&(d=u(),d.lock!==l))ue(t,e,n);else{if(f&&(Ht(f)?a(f):(Kt(f),o?c(f):i(f))),o&&(!f||!Ht(f))){if(d=u(),d.lock!==l)return void ue(t,e,n);i(d.session),f=d.session}null===(r=t.after)||void 0===r||r.call(t,f||d.session),le(e)}}function ue(t,e,n){(0,st.wg)(()=>{ce(t,e,n+1)},10)}function le(t){ae=void 0;const e=se.shift();e&&ce(e,t)}function de(t){const[,e]=t.split("--");return!e||(0,s.vk)(Number(e),(0,s.nx)())>ie}const fe=s.OY;function pe(t){switch(t.sessionPersistence){case ht:return Qt(t);case gt:return ne();case void 0:{let e=Qt(t);return!e&&t.allowFallbackToLocalStorage&&(e=ne()),e}default:R.Vy.error(`Invalid session persistence '${t.sessionPersistence+""}'`)}}function me(t){const e=(0,tt.P)(t);return"string"===e||"function"===e||t instanceof RegExp}function he(t,e,n=!1){return t.some(t=>{try{if("function"==typeof t)return t(e);if(t instanceof RegExp)return t.test(e);if("string"==typeof t)return n?e.startsWith(t):t===e}catch(t){R.Vy.error(t)}return!1})}const ge=["chrome-extension://","moz-extension://"];function ve(t){return ge.some(e=>t.includes(e))}function ye(t,e,n){const r=function(t,e){const n="/rum/api/v1/"+e,r=t.proxy;if("string"==typeof r){const t=(0,St.l2)(r);return e=>`${t}?kubesense-forward=${encodeURIComponent(`${n}?${e}`)}`}if("function"==typeof r)return t=>r({path:n,parameters:t});const o=t.kubesenseRumEndpoint;return t=>`https://${o}${n}?${t}`}(t,e);return{build(o,i){const a=function({clientToken:t,internalAnalyticsSubdomain:e,source:n="browser"},r,o,{retry:i,encoding:a},c=[]){const u=["ksource="+n,"kubesense-api-key="+t,"kubesense-evp-origin-version="+encodeURIComponent("1.4.0"),"kubesense-evp-origin=browser","kubesense-request-id="+z()].concat(c);return a&&u.push("kubesense-evp-encoding="+a),"rum"===r&&(u.push("batch_time="+(0,s.nx)(),"_kubesense.api="+o),i&&u.push("_kubesense.retry_count="+i.count,"_kubesense.retry_after="+i.lastFailureStatus)),e&&u.reverse(),u.join("&")}(t,e,o,i,n);return r(a)},trackType:e}}var be=n(858);function _e(t){const e=t.kubesenseRumEndpoint||be.TU,n=function(t){return"flutter"===t||"unity"===t?t:"browser"}(t.source),r=function(t){return{logsEndpointBuilder:ye(t,"logs"),rumEndpointBuilder:ye(t,"rum"),profilingEndpointBuilder:ye(t,"profile"),sessionReplayEndpointBuilder:ye(t,"replay"),exposuresEndpointBuilder:ye(t,"exposures"),flagEvaluationEndpointBuilder:ye(t,"flagevaluation")}}({...t,kubesenseRumEndpoint:e,source:n}),o=function(t){if(!t.replica)return;const e={...t,kubesenseRumEndpoint:be.TU,clientToken:t.replica.clientToken};return{logsEndpointBuilder:ye(e,"logs"),rumEndpointBuilder:ye(e,"rum",["application.id="+t.replica.applicationId])}}({...t,kubesenseRumEndpoint:e,source:n});return{replica:o,kubesenseRumEndpoint:e,source:n,...r}}const we={ALLOW:"allow",MASK:"mask",MASK_USER_INPUT:"mask-user-input",MASK_UNLESS_ALLOWLISTED:"mask-unless-allowlisted"},ke={ALL:"all",SAMPLED:"sampled"};function Se(t,e){return null==t||"string"==typeof t||(R.Vy.error(e+" must be defined as a string"),!1)}function Ee(t,e){return!(void 0!==t&&!(0,zt.fp)(t)&&(R.Vy.error(e+" Sample Rate should be a number between 0 and 100"),1))}const xe=new Map;function Te(t,e){if(100===e)return!0;if(0===e)return!1;const n=xe.get(e);if(n&&t===n.sessionId)return n.decision;let r;return r=window.BigInt?function(t,e){const n=BigInt("1111111111111111111"),r=BigInt("0x10000000000000000");return Number(t*n%r)<=e/100*Number(r)}(BigInt("0x"+t.split("-")[4]),e):(0,zt.ic)(e),xe.set(e,{sessionId:t,decision:r}),r}function Ae(){return Ce(63)}function Ce(t){const e=crypto.getRandomValues(new Uint32Array(2));return 63===t&&(e[e.length-1]>>>=1),{toString(t=10){let n=e[1],r=e[0],o="";do{const e=n%t*4294967296+r;n=Math.floor(n/t),r=Math.floor(e/t),o=(e%t).toString(t)+o}while(n||r);return o}}}function Re(t){return t.toString(16).padStart(16,"0")}function Ie(t){0!==t.status||t.isAborted||(t.traceId=void 0,t.spanId=void 0,t.traceSampled=void 0)}function Oe(t,e,n,r,o,i){const s=n.findTrackedSession();if(!s)return;const a=t.allowedTracingUrls.find(t=>he([t.match],e.url,!0));if(!a)return;const c=Te(s.id,t.traceSampleRate);(c||t.traceContextInjection===ke.ALL)&&(e.traceSampled=c,e.traceId=Ce(64),e.spanId=Ae(),i(function(t,e,n,r,o,i,s,a){const c={};if(o.forEach(r=>{switch(r){case"kubesense":Object.assign(c,{"x-kubesense-origin":"rum","x-kubesense-parent-id":e.toString(),"x-kubesense-sampling-priority":n?"1":"0","x-kubesense-trace-id":t.toString()});break;case"tracecontext":Object.assign(c,{traceparent:`00-0000000000000000${Re(t)}-${Re(e)}-0${n?"1":"0"}`,tracestate:`dd=s:${n?"1":"0"};o:rum`});break;case"b3":Object.assign(c,{b3:`${Re(t)}-${Re(e)}-${n?"1":"0"}`});break;case"b3multi":Object.assign(c,{"X-B3-TraceId":Re(t),"X-B3-SpanId":Re(e),"X-B3-Sampled":n?"1":"0"})}}),a.propagateTraceBaggage){const t={"session.id":r},e=i.getContext().id;"string"==typeof e&&(t["user.id"]=e);const n=s.getContext().id;"string"==typeof n&&(t["account.id"]=n);const o=Object.entries(t).map(([t,e])=>`${t}=${encodeURIComponent(e)}`).join(",");o&&(c.baggage=o)}return c}(e.traceId,e.spanId,e.traceSampled,s.id,a.propagatorTypes,r,o,t)))}const Ne=["tracecontext","kubesense"];function Pe(t){const e=new Set;return K(t.allowedTracingUrls)&&t.allowedTracingUrls.forEach(t=>{me(t)?Ne.forEach(t=>e.add(t)):"object"===(0,tt.P)(t)&&Array.isArray(t.propagatorTypes)&&t.propagatorTypes.forEach(t=>e.add(t))}),Array.from(e)}function Le(t){return K(t)&&t.some(t=>"object"==typeof t&&"trackResponseErrors"in t&&!!t.trackResponseErrors)}const Ve=/[a-zA-Z_$]/,Me=/[a-zA-Z0-9_$]/,Ue=/[0-9]/,$e=/[a-fA-F0-9]/,De={0:()=>!1,1:()=>!1,2:t=>Ve.test(t),3:t=>Me.test(t),4:t=>"."===t,5:t=>"["===t,6:t=>"]"===t,7:t=>Ue.test(t),8:t=>"'\"".includes(t),9:(t,e)=>t===e.quote,10:()=>!0,11:t=>"\\"===t,12:(t,e)=>void 0===e.escapeSequence?(e.quote+"/\\bfnrtu").includes(t):!!(e.escapeSequence.startsWith("u")&&e.escapeSequence.length<5)&&$e.test(t)},ze={0:[2,5],1:[],2:[3,4,5,1],3:[3,4,5,1],4:[2],5:[8,7],6:[4,5,1],7:[7,6],8:[11,9,10],9:[6],10:[11,9,10],11:[12],12:[12,11,9,10]},Be=[2,3,7,10],qe=[4,5,6];function je(t){return"\"'/\\bfnrt".includes(t)||t.startsWith("u")&&5===t.length}const Fe={'"':'"',"'":"'","/":"/","\\":"\\",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"};function We(t){return t.startsWith("u")?String.fromCharCode(parseInt(t.slice(1),16)):Fe[t]}const Ge=["applicationId","service","env","version","sessionSampleRate","sessionReplaySampleRate","defaultPrivacyLevel","enablePrivacyForActionName","traceSampleRate","trackSessionAcrossSubdomains","allowedTracingUrls","allowedTrackingOrigins"];function Ze(t){try{return RegExp(t)}catch(e){R.Vy.error(`Invalid regex in the remote configuration: '${t}'`)}}function He(t,e,n){t.changeObservable.subscribe(()=>{const r=t.getContext();n.add(t=>t[e].setContext(r))})}function Ke(t,e,n,i={}){const a=function(t){const e=new r.cP;return{tryToInit(e){t||(t=e)},update(n){t=n,e.notify()},isGranted:()=>t===o.GRANTED,observable:e}}(),u={vitalsByName:new Map,vitalsByReference:new WeakMap},l=function(t=d){const e=new r.dX(500),n=t().subscribe(t=>{e.notify({type:0,error:t})});return{observable:e,stop(){n.unsubscribe()}}}().observable;let f=function({ignoreInitIfSyntheticsWillInjectRum:t=!0,startDeflateWorker:e},n,r,i){const a=function(){const t=[];return{add(e){t.push(e)>500&&t.splice(0,1)},remove(e){H(t,e)},drain(e){t.forEach(t=>t(e)),t.length=0}}}(),u=ot();He(u,k,a);const l=bt();He(l,w,a);const d=_t();let f,p,g,v;He(d,S,a);const y=n.observable.subscribe(E),_={};function E(){if(!g||!v||!n.isGranted())return;let t;if(y.unsubscribe(),v.trackViewsManually){if(!f)return;a.remove(f.callback),t=f.options}const e=i(v,p,t);a.drain(e)}function x(t,r){const i=(0,wt.d0)();if(i&&(t=function(t){var e,n;return{...t,applicationId:"00000000-aaaa-0000-aaaa-000000000000",clientToken:"empty",sessionSampleRate:100,defaultPrivacyLevel:null!==(e=t.defaultPrivacyLevel)&&void 0!==e?e:null===(n=(0,wt.Y9)())||void 0===n?void 0:n.getPrivacyLevel()}}(t)),g=t,(0,h.Rr)(function(t){var e;const n={session_sample_rate:(r=t).sessionSampleRate,telemetry_sample_rate:r.telemetrySampleRate,telemetry_configuration_sample_rate:r.telemetryConfigurationSampleRate,telemetry_usage_sample_rate:r.telemetryUsageSampleRate,use_before_send:!!r.beforeSend,use_partitioned_cross_site_session_cookie:r.usePartitionedCrossSiteSessionCookie,use_secure_session_cookie:r.useSecureSessionCookie,use_proxy:!!r.proxy,silent_multiple_init:r.silentMultipleInit,track_session_across_subdomains:r.trackSessionAcrossSubdomains,track_anonymous_user:r.trackAnonymousUser,session_persistence:r.sessionPersistence,allow_fallback_to_local_storage:!!r.allowFallbackToLocalStorage,store_contexts_across_pages:!!r.storeContextsAcrossPages,allow_untrusted_events:!!r.allowUntrustedEvents,tracking_consent:r.trackingConsent,use_allowed_tracking_origins:Array.isArray(r.allowedTrackingOrigins),beta_encode_cookie_options:r.betaEncodeCookieOptions,source:r.source,sdk_version:r.sdkVersion,variant:r.variant};var r,o;return{session_replay_sample_rate:t.sessionReplaySampleRate,start_session_replay_recording_manually:t.startSessionReplayRecordingManually,trace_sample_rate:t.traceSampleRate,trace_context_injection:t.traceContextInjection,propagate_trace_baggage:t.propagateTraceBaggage,action_name_attribute:t.actionNameAttribute,use_allowed_tracing_urls:K(t.allowedTracingUrls),use_allowed_graph_ql_urls:K(t.allowedGraphQlUrls),use_track_graph_ql_payload:(o=t.allowedGraphQlUrls,K(o)&&o.some(t=>"object"==typeof t&&"trackPayload"in t&&!!t.trackPayload)),use_track_graph_ql_response_errors:Le(t.allowedGraphQlUrls),selected_tracing_propagators:Pe(t),default_privacy_level:t.defaultPrivacyLevel,enable_privacy_for_action_name:t.enablePrivacyForActionName,use_excluded_activity_urls:K(t.excludedActivityUrls),use_worker_url:!!t.workerUrl,compress_intake_requests:t.compressIntakeRequests,track_views_manually:t.trackViewsManually,track_user_interactions:t.trackUserInteractions,track_resources:t.trackResources,track_long_task:t.trackLongTasks,track_bfcache_views:t.trackBfcacheViews,track_early_requests:t.trackEarlyRequests,plugins:null===(e=t.plugins)||void 0===e?void 0:e.map(t=>{var e;return{name:t.name,...null===(e=t.getConfigurationTelemetry)||void 0===e?void 0:e.call(t)}}),track_feature_flags_for_events:t.trackFeatureFlagsForEvents,remote_configuration_id:t.remoteConfigurationId,profiling_sample_rate:t.profilingSampleRate,use_remote_configuration_proxy:!!t.remoteConfigurationProxy,...n}}(t)),v)return void I("KUBESENSE_SDK",t);const s=function(t,e){var n,r,i,s,a,u,l,d;if(void 0===t.trackFeatureFlagsForEvents||Array.isArray(t.trackFeatureFlagsForEvents)||R.Vy.warn("trackFeatureFlagsForEvents should be an array"),!t.applicationId)return void R.Vy.error("Application ID is not configured, no RUM data will be collected.");if(!Ee(t.sessionReplaySampleRate,"Session Replay")||!Ee(t.traceSampleRate,"Trace"))return;if(void 0!==t.excludedActivityUrls&&!Array.isArray(t.excludedActivityUrls))return void R.Vy.error("Excluded Activity Urls should be an array");const f=function(t){if(void 0===t.allowedTracingUrls)return[];if(!Array.isArray(t.allowedTracingUrls))return void R.Vy.error("Allowed Tracing URLs should be an array");if(0!==t.allowedTracingUrls.length&&void 0===t.service)return void R.Vy.error("Service needs to be configured when tracing is enabled");const e=[];return t.allowedTracingUrls.forEach(t=>{me(t)?e.push({match:t,propagatorTypes:Ne}):function(t){const e=t;return"object"===(0,tt.P)(e)&&me(e.match)&&Array.isArray(e.propagatorTypes)}(t)?e.push(t):R.Vy.warn("Allowed Tracing Urls parameters should be a string, RegExp, function, or an object. Ignoring parameter",t)}),e}(t);if(!f)return;const p=function(t,e){var n,r,i,s,a,u,l,d,f,p;if(t&&t.clientToken)if(void 0===t.allowedTrackingOrigins||Array.isArray(t.allowedTrackingOrigins)){if(Ee(t.sessionSampleRate,"Session")&&Ee(t.telemetrySampleRate,"Telemetry")&&Ee(t.telemetryConfigurationSampleRate,"Telemetry Configuration")&&Ee(t.telemetryUsageSampleRate,"Telemetry Usage")&&Se(t.version,"Version")&&Se(t.env,"Env")&&Se(t.service,"Service")&&function(t,e,n=("undefined"!=typeof location?location.origin:"")){const r=t.allowedTrackingOrigins;if(!r)return!function(t,e=""){return!ve(t)&&ve(e.split("\n").filter(t=>{const e=t.trim();return e.length&&/^at\s+|@/.test(e)})[1]||"")}(n,e)||(R.Vy.error("Running the Browser SDK in a Web extension content script is forbidden unless the `allowedTrackingOrigins` option is provided."),!1);const o=he(r,n);return o||R.Vy.error("SDK initialized on a non-allowed domain."),o}(t,null!=e?e:"")){if(void 0===t.trackingConsent||(0,Y.Rj)(o,t.trackingConsent))return{beforeSend:t.beforeSend&&(0,Dt.y)(t.beforeSend,"beforeSend threw an error:"),sessionStoreStrategyType:c.Wq?void 0:pe(t),sessionSampleRate:null!==(n=t.sessionSampleRate)&&void 0!==n?n:100,telemetrySampleRate:null!==(r=t.telemetrySampleRate)&&void 0!==r?r:20,telemetryConfigurationSampleRate:null!==(i=t.telemetryConfigurationSampleRate)&&void 0!==i?i:5,telemetryUsageSampleRate:null!==(s=t.telemetryUsageSampleRate)&&void 0!==s?s:5,service:null!==(a=t.service)&&void 0!==a?a:void 0,env:null!==(u=t.env)&&void 0!==u?u:void 0,version:null!==(l=t.version)&&void 0!==l?l:void 0,datacenter:null!==(d=t.datacenter)&&void 0!==d?d:void 0,silentMultipleInit:!!t.silentMultipleInit,allowUntrustedEvents:!!t.allowUntrustedEvents,trackingConsent:null!==(f=t.trackingConsent)&&void 0!==f?f:o.GRANTED,trackAnonymousUser:null===(p=t.trackAnonymousUser)||void 0===p||p,storeContextsAcrossPages:!!t.storeContextsAcrossPages,betaEncodeCookieOptions:!!t.betaEncodeCookieOptions,variant:t.variant,sdkVersion:t.sdkVersion,..._e(t)};R.Vy.error('Tracking Consent should be either "granted" or "not-granted"')}}else R.Vy.error("Allowed Tracking Origins must be an array");else R.Vy.error("Client Token is not configured, we will not send any data.")}(t,e),m=function(t){if(!t.allowedGraphQlUrls)return[];if(!Array.isArray(t.allowedGraphQlUrls))return R.Vy.warn("allowedGraphQlUrls should be an array"),[];const e=[];return t.allowedGraphQlUrls.forEach(t=>{me(t)?e.push({match:t,trackPayload:!1,trackResponseErrors:!1}):t&&"object"==typeof t&&"match"in t&&me(t.match)&&e.push({match:t.match,trackPayload:!!t.trackPayload,trackResponseErrors:!!t.trackResponseErrors})}),e}(t);if(!p)return;const h=null!==(n=t.sessionReplaySampleRate)&&void 0!==n?n:0;return{applicationId:t.applicationId,actionNameAttribute:t.actionNameAttribute,sessionReplaySampleRate:h,startSessionReplayRecordingManually:void 0!==t.startSessionReplayRecordingManually?!!t.startSessionReplayRecordingManually:0===h,traceSampleRate:null!==(r=t.traceSampleRate)&&void 0!==r?r:100,rulePsr:(0,zt.Et)(t.traceSampleRate)?t.traceSampleRate/100:void 0,allowedTracingUrls:f,excludedActivityUrls:null!==(i=t.excludedActivityUrls)&&void 0!==i?i:[],workerUrl:t.workerUrl,compressIntakeRequests:!!t.compressIntakeRequests,trackUserInteractions:!(null!==(s=t.trackUserInteractions)&&void 0!==s&&!s),trackViewsManually:!!t.trackViewsManually,trackResources:!(null!==(a=t.trackResources)&&void 0!==a&&!a),trackLongTasks:!(null!==(u=t.trackLongTasks)&&void 0!==u&&!u),trackBfcacheViews:!!t.trackBfcacheViews,trackEarlyRequests:!!t.trackEarlyRequests,subdomain:t.subdomain,defaultPrivacyLevel:(0,Y.Rj)(we,t.defaultPrivacyLevel)?t.defaultPrivacyLevel:we.MASK,enablePrivacyForActionName:!!t.enablePrivacyForActionName,traceContextInjection:(0,Y.Rj)(ke,t.traceContextInjection)?t.traceContextInjection:ke.SAMPLED,plugins:t.plugins||[],trackFeatureFlagsForEvents:t.trackFeatureFlagsForEvents||[],profilingSampleRate:null!==(l=t.profilingSampleRate)&&void 0!==l?l:0,propagateTraceBaggage:!!t.propagateTraceBaggage,allowedGraphQlUrls:m,firstPartyDomains:null!==(d=t.firstPartyDomains)&&void 0!==d?d:[],...p}}(t,r);s&&(i||s.sessionStoreStrategyType?s.compressIntakeRequests&&!i&&e&&(p=e(s,"Kubsesense RUM",kt.l),!p)||(v=s,At().subscribe(kt.l),n.tryToInit(s.trackingConsent),E()):R.Vy.warn("No storage available for session. We will not send any data."))}const T=t=>{a.add(e=>e.addDurationVital(t))};return{init(e,n,r){e?((0,D.Aq)(e.enableExperimentalFeatures),g=e,t&&Vt()||(Z(e.plugins,"onInit",{initConfiguration:e,publicApi:n}),e.remoteConfigurationId?async function(t,e){let n;const r=function(){const t={fetch:{}};return{get:()=>t,increment(e,n){t[e]||(t[e]={}),t[e][n]||(t[e][n]=0),t[e][n]=t[e][n]+1}}}(),o=await async function(t){let e;try{e=await fetch(function(t){return t.remoteConfigurationProxy?t.remoteConfigurationProxy:`https://sdk-configuration.${function(t,e){const{kubesenseRumEndpoint:n,internalAnalyticsSubdomain:r}=e;return n}(0,t)}/v1/${encodeURIComponent(t.remoteConfigurationId)}.json`}(t))}catch(t){e=void 0}if(!e||!e.ok)return{ok:!1,error:Error("Error fetching the remote configuration.")};const n=await e.json();return n.rum?{ok:!0,value:n.rum}:{ok:!1,error:Error("No remote configuration for RUM.")}}(t);return o.ok?(r.increment("fetch","success"),n=function(t,e,n,r){const o={...t};return Ge.forEach(t=>{t in e&&(o[t]=i(e[t]))}),Object.keys(n).forEach(t=>{var r;void 0!==e[t]&&(r=n[t],e[t].forEach(({key:t,value:e})=>{r.setContextProperty(t,i(e))}))}),o;function i(t){if(Array.isArray(t))return t.map(i);if(function(t){return"object"==typeof t&&null!==t}(t)){if("rcSerializedType"in t){const e=t.rcSerializedType;switch(e){case"string":return t.value;case"regex":return Ze(t.value);case"dynamic":return function(t){const e=t.strategy;let n;switch(e){case"cookie":n=function({name:t}){const e=Rt(t);return r.increment("cookie",void 0!==e?"success":"missing"),e}(t);break;case"dom":n=function({selector:t,attribute:e}){let n;try{n=document.querySelector(t)}catch(e){return R.Vy.error(`Invalid selector in the remote configuration: '${t}'`),void r.increment("dom","failure")}if(!n)return void r.increment("dom","missing");if(function(t,e){return"password"===t.getAttribute("type")&&"value"===e}(n,e))return R.Vy.error(`Forbidden element selected by the remote configuration: '${t}'`),void r.increment("dom","failure");const o=void 0!==e?n.getAttribute(e):n.textContent;if(null!==o)return r.increment("dom","success"),o;r.increment("dom","missing")}(t);break;case"js":n=function({path:t}){let e=window;const n=function(t){const e=[];let n,r=0;const o={quote:void 0,escapeSequence:void 0};let i="";for(const s of t){if(n=ze[r].find(t=>De[t](s,o)),!n)return[];if(void 0!==o.escapeSequence&&12!==n){if(!je(o.escapeSequence))return[];i+=We(o.escapeSequence),o.escapeSequence=void 0}Be.includes(n)?i+=s:qe.includes(n)&&""!==i?(e.push(i),i=""):12===n?o.escapeSequence=o.escapeSequence?`${o.escapeSequence}${s}`:s:8===n?o.quote=s:9===n&&(o.quote=void 0),r=n}return ze[r].includes(1)?(""!==i&&e.push(i),e):[]}(t);if(0===n.length)return R.Vy.error(`Invalid JSON path in the remote configuration: '${t}'`),void r.increment("js","failure");for(const o of n){if(!(o in e))return void r.increment("js","missing");try{e=e[o]}catch(e){return R.Vy.error(`Error accessing: '${t}'`,e),void r.increment("js","failure")}}return r.increment("js","success"),e}(t);break;default:return void R.Vy.error(`Unsupported remote configuration: "strategy": "${e}"`)}const o=t.extractor;return void 0!==o&&"string"==typeof n?function(t,e){const n=Ze(t.value);if(void 0===n)return;const r=n.exec(e);if(null===r)return;const[o,i]=r;return i||o}(o,n):n}(t);default:return void R.Vy.error(`Unsupported remote configuration: "rcSerializedType": "${e}"`)}}return(0,Y.LG)(t,i)}return t}}(t,o.value,e,r)):(r.increment("fetch","failure"),R.Vy.error(o.error)),(0,h.Gk)("remote configuration metrics",{metrics:r.get()}),n}(e,{user:l,context:u}).then(t=>{t&&x(t,r)}).catch(m.Dx):x(e,r))):R.Vy.error("Missing configuration")},get initConfiguration(){return g},getInternalContext:kt.l,stopSession:kt.l,addTiming(t,e=(0,s.nx)()){a.add(n=>n.addTiming(t,e))},startView(t,e=(0,s.M8)()){const n=n=>{n.startView(t,e)};a.add(n),f||(f={options:t,callback:n},E())},setViewName(t){a.add(e=>e.setViewName(t))},setViewContext(t){a.add(e=>e.setViewContext(t))},setViewContextProperty(t,e){a.add(n=>n.setViewContextProperty(t,e))},getViewContext(){return _},globalContext:u,userContext:l,accountContext:d,addAction(t){a.add(e=>e.addAction(t))},addError(t){a.add(e=>e.addError(t))},addFeatureFlagEvaluation(t,e){a.add(n=>n.addFeatureFlagEvaluation(t,e))},startDurationVital:(t,e)=>F(r,t,e),stopDurationVital(t,e){W(T,r,t,e)},addDurationVital:T,addOperationStepVital(t,e,n,r){a.add(o=>o.addOperationStepVital((0,b.a)(t),e,(0,b.a)(n),(0,b.a)(r)))}}}(i,a,u,(r,o,s)=>{const c=o&&i.createDeflateEncoder?t=>i.createDeflateEncoder(r,o,t):p,d=t(r,e,n,s,c,a,u,l,i.sdkName);return e.onRumStart(d.lifeCycle,r,d.session,d.viewHistory,o,d.telemetry),n.onRumStart(d.lifeCycle,d.hooks,r,d.session,d.viewHistory,d.longTaskContexts,c),f=function(t,e){return{init(t){I("KUBESENSE_SDK",t)},initConfiguration:t.initConfiguration,...e}}(f,d),Z(r.plugins,"onRumStart",{strategy:f,addEvent:d.addEvent}),d});const O=()=>f,N=(0,m.dm)(t=>{const e="object"==typeof t?t:{name:t};f.startView(e),(0,h.Q6)({feature:"start-view"})}),P=(0,g.m)({init(t){const e=Error().stack;(0,m.um)(()=>f.init(t,P,e))},setTrackingConsent:(0,m.dm)(t=>{a.update(t),(0,h.Q6)({feature:"set-tracking-consent",tracking_consent:t})}),setViewName:(0,m.dm)(t=>{f.setViewName(t),(0,h.Q6)({feature:"set-view-name"})}),setViewContext:(0,m.dm)(t=>{f.setViewContext(t),(0,h.Q6)({feature:"set-view-context"})}),setViewContextProperty:(0,m.dm)((t,e)=>{f.setViewContextProperty(t,e),(0,h.Q6)({feature:"set-view-context-property"})}),getViewContext:(0,m.dm)(()=>((0,h.Q6)({feature:"set-view-context-property"}),f.getViewContext())),getInternalContext:(0,m.dm)(t=>f.getInternalContext(t)),getInitConfiguration:(0,m.dm)(()=>(0,v.Go)(f.initConfiguration)),addAction(t,e){const n=(0,y.uC)("action");(0,m.um)(()=>{f.addAction({name:(0,b.a)(t),context:(0,b.a)(e),startClocks:(0,s.M8)(),type:V.CUSTOM,handlingStack:n}),(0,h.Q6)({feature:"add-action"})})},addError(t,e){const n=(0,y.uC)("error");(0,m.um)(()=>{f.addError({error:t,handlingStack:n,context:(0,b.a)(e),startClocks:(0,s.M8)()}),(0,h.Q6)({feature:"add-error"})})},addTiming:(0,m.dm)((t,e)=>{f.addTiming((0,b.a)(t),e)}),setGlobalContext:_(O,k,x,"set-global-context"),getGlobalContext:_(O,k,E,"get-global-context"),setGlobalContextProperty:_(O,k,T,"set-global-context-property"),removeGlobalContextProperty:_(O,k,A,"remove-global-context-property"),clearGlobalContext:_(O,k,C,"clear-global-context"),setUser:_(O,w,x,"set-user"),getUser:_(O,w,E,"get-user"),setUserProperty:_(O,w,T,"set-user-property"),removeUserProperty:_(O,w,A,"remove-user-property"),clearUser:_(O,w,C,"clear-user"),setAccount:_(O,S,x,"set-account"),getAccount:_(O,S,E,"get-account"),setAccountProperty:_(O,S,T,"set-account-property"),removeAccountProperty:_(O,S,A,"remove-account-property"),clearAccount:_(O,S,C,"clear-account"),startView:N,stopSession:(0,m.dm)(()=>{f.stopSession(),(0,h.Q6)({feature:"stop-session"})}),addFeatureFlagEvaluation:(0,m.dm)((t,e)=>{f.addFeatureFlagEvaluation((0,b.a)(t),(0,b.a)(e)),(0,h.Q6)({feature:"add-feature-flag-evaluation"})}),getSessionReplayLink:(0,m.dm)(()=>e.getSessionReplayLink()),startSessionReplayRecording:(0,m.dm)(t=>{e.start(t),(0,h.Q6)({feature:"start-session-replay-recording",force:t&&t.force})}),stopSessionReplayRecording:(0,m.dm)(()=>e.stop()),addDurationVital:(0,m.dm)((t,e)=>{(0,h.Q6)({feature:"add-duration-vital"}),f.addDurationVital({name:(0,b.a)(t),type:$,startClocks:(0,s.jR)(e.startTime),duration:e.duration,context:(0,b.a)(e&&e.context),description:(0,b.a)(e&&e.description)})}),startDurationVital:(0,m.dm)((t,e)=>((0,h.Q6)({feature:"start-duration-vital"}),f.startDurationVital((0,b.a)(t),{context:(0,b.a)(e&&e.context),description:(0,b.a)(e&&e.description)}))),stopDurationVital:(0,m.dm)((t,e)=>{(0,h.Q6)({feature:"stop-duration-vital"}),f.stopDurationVital("string"==typeof t?(0,b.a)(t):t,{context:(0,b.a)(e&&e.context),description:(0,b.a)(e&&e.description)})}),startFeatureOperation:(0,m.dm)((t,e)=>{(0,h.Q6)({feature:"add-operation-step-vital",action_type:"start"}),f.addOperationStepVital(t,"start",e)}),succeedFeatureOperation:(0,m.dm)((t,e)=>{(0,h.Q6)({feature:"add-operation-step-vital",action_type:"succeed"}),f.addOperationStepVital(t,"end",e)}),failFeatureOperation:(0,m.dm)((t,e,n)=>{(0,h.Q6)({feature:"add-operation-step-vital",action_type:"fail"}),f.addOperationStepVital(t,"end",n,e)})});return P}var Je=n(769),Ye=n(887),Qe=n(586);function Xe(){let t;const e=window;if(e.Zone&&(t=(0,Qe.W)(e,"MutationObserver"),e.MutationObserver&&t===e.MutationObserver)){const n=new e.MutationObserver(kt.l),r=(0,Qe.W)(n,"originalInstance");t=r&&r.constructor}return t||(t=e.MutationObserver),t}const tn=class{constructor(){this.callbacks={}}notify(t,e){const n=this.callbacks[t];n&&n.forEach(t=>t(e))}subscribe(t,e){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e),{unsubscribe:()=>{this.callbacks[t]=this.callbacks[t].filter(t=>e!==t)}}}},en=ft;let nn;const rn=new WeakMap;function on({target:t,parameters:[e,n]}){rn.set(t,{state:"open",method:(e+"").toUpperCase(),url:(0,St.l2)(n+"")})}function sn({target:t}){const e=rn.get(t);e&&(e.isAborted=!0)}const an="xhr",cn="fetch",un="other",ln=cn,dn=an,fn="initial_document",pn=[["document",t=>fn===t],[an,t=>"xmlhttprequest"===t],[cn,t=>"fetch"===t],["beacon",t=>"beacon"===t],["css",(t,e)=>/\.css$/i.test(e)],["js",(t,e)=>/\.js$/i.test(e)],["image",(t,e)=>["image","img","icon"].includes(t)||null!==/\.(gif|jpg|jpeg|tiff|png|svg|ico)$/i.exec(e)],["font",(t,e)=>null!==/\.(woff|eot|woff2|ttf)$/i.exec(e)],["media",(t,e)=>["audio","video"].includes(t)||null!==/\.(mp3|mp4)$/i.exec(e)]];function mn(t){const e=t.name;if(!(0,St.AY)(e))return un;const n=(0,St.L2)(e);for(const[e,r]of pn)if(r(t.initiatorType,n))return e;return un}function hn(...t){for(let e=1;e<t.length;e+=1)if(t[e-1]>t[e])return!1;return!0}function gn(t){return"xmlhttprequest"===t.initiatorType||"fetch"===t.initiatorType}function vn(t){if(!bn(t))return;const{startTime:e,fetchStart:n,workerStart:r,redirectStart:o,redirectEnd:i,domainLookupStart:s,domainLookupEnd:a,connectStart:c,secureConnectionStart:u,connectEnd:l,requestStart:d,responseStart:f,responseEnd:p}=t,m={download:_n(e,f,p),first_byte:_n(e,d,f)};return 0<r&&r<n&&(m.worker=_n(e,r,n)),n<l&&(m.connect=_n(e,c,l),c<=u&&u<=l&&(m.ssl=_n(e,u,l))),n<a&&(m.dns=_n(e,s,a)),e<i&&(m.redirect=_n(e,o,i)),m}function yn(t){return t.duration>=0}function bn(t){const e=hn(t.startTime,t.fetchStart,t.domainLookupStart,t.domainLookupEnd,t.connectStart,t.connectEnd,t.requestStart,t.responseStart,t.responseEnd),n=!function(t){return t.redirectEnd>t.startTime}(t)||hn(t.startTime,t.redirectStart,t.redirectEnd,t.fetchStart);return e&&n}function _n(t,e,n){if(t<=e&&e<=n)return{duration:(0,s.Zj)((0,s.vk)(e,n)),start:(0,s.Zj)((0,s.vk)(t,e))}}function wn(t){return""===t.nextHopProtocol?void 0:t.nextHopProtocol}function kn(t){return""===t.deliveryType?"other":t.deliveryType}function Sn(t){const{encodedBodySize:e,decodedBodySize:n,transferSize:r}=t;return bn(t)||(null!=n?n:0)>0||(null!=e?e:0)>0?{size:n,encoded_body_size:e,decoded_body_size:n,transfer_size:r}:{size:void 0,encoded_body_size:void 0,decoded_body_size:void 0,transfer_size:void 0}}function En(t){return t&&(!function(t){return be.Ih.every(e=>t.includes(e))}(t)||(0,D.sr)(D.R9.TRACK_INTAKE_REQUESTS))}const xn=[{domains:["google-analytics.com","analytics.google.com"],name:"Google Analytics",type:"analytics"},{domains:["segment.com","segment.io","cdn.segment.com"],name:"Segment",type:"analytics"},{domains:["amplitude.com"],name:"Amplitude",type:"analytics"},{domains:["mixpanel.com"],name:"Mixpanel",type:"analytics"},{domains:["hotjar.com"],name:"Hotjar",type:"analytics"},{domains:["fullstory.com"],name:"FullStory",type:"analytics"},{domains:["heap.io"],name:"Heap",type:"analytics"},{domains:["googletagmanager.com"],name:"Google Tag Manager",type:"tag-manager"},{domains:["tealiumiq.com"],name:"Tealium",type:"tag-manager"},{domains:["cloudfront.net"],name:"Amazon CloudFront",type:"cdn"},{domains:["fastly.net"],name:"Fastly",type:"cdn"},{domains:["akamaiedge.net","akamaistream.net","akamai.net"],name:"Akamai",type:"cdn"},{domains:["jsdelivr.net"],name:"jsDelivr",type:"cdn"},{domains:["unpkg.com"],name:"unpkg",type:"cdn"},{domains:["bootstrapcdn.com"],name:"Bootstrap CDN",type:"cdn"},{domains:["doubleclick.net"],name:"Google DoubleClick",type:"advertising"},{domains:["googlesyndication.com"],name:"Google AdSense",type:"advertising"},{domains:["adnxs.com"],name:"AppNexus",type:"advertising"},{domains:["criteo.com","criteo.net"],name:"Criteo",type:"advertising"},{domains:["facebook.com","fbcdn.net","connect.facebook.net"],name:"Facebook",type:"social"},{domains:["twitter.com","twimg.com","platform.twitter.com"],name:"Twitter",type:"social"},{domains:["linkedin.com"],name:"LinkedIn",type:"social"},{domains:["instagram.com","cdninstagram.com"],name:"Instagram",type:"social"},{domains:["pinterest.com"],name:"Pinterest",type:"social"},{domains:["youtube.com","youtu.be","ytimg.com","googlevideo.com"],name:"YouTube",type:"video"},{domains:["vimeo.com","vimeocdn.com"],name:"Vimeo",type:"video"},{domains:["wistia.com"],name:"Wistia",type:"video"},{domains:["hubspot.com","hs-scripts.com","hsforms.com"],name:"HubSpot",type:"marketing"},{domains:["marketo.com","mktoresp.com"],name:"Marketo",type:"marketing"},{domains:["mailchimp.com"],name:"Mailchimp",type:"marketing"},{domains:["intercom.io","intercomcdn.com"],name:"Intercom",type:"customer-success"},{domains:["zendesk.com","zdassets.com"],name:"Zendesk",type:"customer-success"},{domains:["stripe.com","js.stripe.com"],name:"Stripe",type:"utility"},{domains:["code.jquery.com"],name:"jQuery",type:"utility"},{domains:["recaptcha.net"],name:"reCAPTCHA",type:"utility"}];function Tn(t,e=[]){if(!(0,St.AY)(t))return;let n;try{n=(0,St.c$)(t).hostname}catch(t){return}if(n){if(n===location.hostname||e.length>0&&he(e,n))return{domain:n,type:"first party"};for(const t of xn)for(const e of t.domains)if(n===e||n.endsWith("."+e))return{domain:n,name:t.name,type:t.type};return{domain:n,type:"other"}}}const An=/data:(.+)?(;base64)?,/g;function Cn(t,e=24e3){if(t.length<=e||!t.startsWith("data:"))return t;const n=t.substring(0,100).match(An);return n?n[0]+"[...]":t}const Rn=32*f._m;function In(t,e){return e.allowedGraphQlUrls.find(e=>he([e.match],t))}let On=1;function Nn(){const t=On;return On+=1,t}function Pn(t){return(0,zt.Et)(t)&&t<0?void 0:t}function Ln({lifeCycle:t,isChildEvent:e,onChange:n=kt.l}){const r={errorCount:0,longTaskCount:0,resourceCount:0,actionCount:0,frustrationCount:0},o=t.subscribe(13,t=>{var o;if("view"!==t.type&&"vital"!==t.type&&e(t))switch(t.type){case O.ERROR:r.errorCount+=1,n();break;case O.ACTION:r.actionCount+=1,t.action.frustration&&(r.frustrationCount+=t.action.frustration.type.length),n();break;case O.LONG_TASK:r.longTaskCount+=1,n();break;case O.RESOURCE:(null===(o=t._kubesense)||void 0===o?void 0:o.discarded)||(r.resourceCount+=1,n())}});return{stop(){o.unsubscribe()},eventCounts:r}}var Vn;function Mn(t,e){return new r.cP(n=>{if(!window.PerformanceObserver)return;const r=t=>{const e=function(t){return t.filter(t=>!function(t){return!(t.entryType!==Vn.RESOURCE||En(t.name)&&yn(t))}(t))}(t);e.length>0&&n.notify(e)};let o,i=!0;const a=new PerformanceObserver((0,m.dm)(t=>{i?o=(0,st.wg)(()=>r(t.getEntries())):r(t.getEntries())}));try{a.observe(e)}catch(t){if([Vn.RESOURCE,Vn.NAVIGATION,Vn.LONG_TASK,Vn.PAINT].includes(e.type)){e.buffered&&(o=(0,st.wg)(()=>r(performance.getEntriesByType(e.type))));try{a.observe({entryTypes:[e.type]})}catch(t){return}}}let c;return i=!1,function(t){!Un&&void 0!==window.performance&&"getEntries"in performance&&"addEventListener"in performance&&(Un=(0,J.q)(t,performance,"resourcetimingbufferfull",()=>{performance.clearResourceTimings()}))}(t),$n(Vn.FIRST_INPUT)||e.type!==Vn.FIRST_INPUT||({stop:c}=function(t){const e=(0,s.x3)();let n=!1;const{stop:o}=(0,J.l)(t,window,["click","mousedown","keydown","touchstart","pointerdown"],e=>{if(!e.cancelable)return;const n={entryType:"first-input",processingStart:(0,s.$S)(),processingEnd:(0,s.$S)(),startTime:e.timeStamp,duration:0,name:"",cancelable:!1,target:null,toJSON(){return{}}};"pointerdown"===e.type?function(t,e){(0,J.l)(t,window,["pointerup","pointercancel"],t=>{"pointerup"===t.type&&i(e)},{once:!0})}(t,n):i(n)},{passive:!0,capture:!0});return{stop:o};function i(t){if(!n){n=!0,o();const i=t.processingStart-t.startTime;i>=0&&i<(0,s.x3)()-e&&(t=>{r([t])})(t)}}}(t)),()=>{a.disconnect(),c&&c(),(0,st.DJ)(o)}})}let Un;function $n(t){return window.PerformanceObserver&&void 0!==PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes(t)}function Dn(t){return t.nodeType===Node.TEXT_NODE}function zn(t){return t.nodeType===Node.ELEMENT_NODE}function Bn(t){return zn(t)&&!!t.shadowRoot}function qn(t){const e=t;return!!e.host&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&zn(e.host)}function jn(t){return t.childNodes.length>0||Bn(t)}function Fn(t,e){let n=t.firstChild;for(;n;)e(n),n=n.nextSibling;Bn(t)&&e(t.shadowRoot)}function Wn(t){return qn(t)?t.host:t.parentNode}!function(t){t.EVENT="event",t.FIRST_INPUT="first-input",t.LARGEST_CONTENTFUL_PAINT="largest-contentful-paint",t.LAYOUT_SHIFT="layout-shift",t.LONG_TASK="longtask",t.LONG_ANIMATION_FRAME="long-animation-frame",t.NAVIGATION="navigation",t.PAINT="paint",t.RESOURCE="resource",t.VISIBILITY_STATE="visibility-state"}(Vn||(Vn={}));const Gn="data-kubesense-excluded-activity-mutations";function Zn(t,e,n,o,i,a){const c=function(t,e,n,o){return new r.cP(r=>{const i=[];let s,a=0;return i.push(e.subscribe(t=>{t.every(Kn)||c()}),n.subscribe(c),Mn(o,{type:Vn.RESOURCE}).subscribe(t=>{t.some(t=>!Hn(o,t.name))&&c()}),t.subscribe(7,t=>{Hn(o,t.url)||(void 0===s&&(s=t.requestIndex),a+=1,c())}),t.subscribe(8,t=>{Hn(o,t.url)||void 0===s||t.requestIndex<s||(a-=1,c())})),()=>{i.forEach(t=>t.unsubscribe())};function c(){r.notify({isBusy:a>0})}})}(t,e,n,o);return function(t,e,n){let r,o=!1;const i=(0,st.wg)((0,m.dm)(()=>l({hadActivity:!1})),100),a=void 0!==n?(0,st.wg)((0,m.dm)(()=>l({hadActivity:!0,end:(0,s.nx)()})),n):void 0,c=t.subscribe(({isBusy:t})=>{(0,st.DJ)(i),(0,st.DJ)(r);const e=(0,s.nx)();t||(r=(0,st.wg)((0,m.dm)(()=>l({hadActivity:!0,end:e})),100))}),u=()=>{o=!0,(0,st.DJ)(i),(0,st.DJ)(r),(0,st.DJ)(a),c.unsubscribe()};function l(t){o||(u(),e(t))}return{stop:u}}(c,i,a)}function Hn(t,e){return he(t.excludedActivityUrls,e)}function Kn(t){const e="characterData"===t.type?t.target.parentElement:t.target;return!!(e&&zn(e)&&e.matches(`[${Gn}], [${Gn}] *`))}const Jn="data-kubesense-action-name",Yn="Masked Element",Qn=[Jn,"data-testid","data-test","data-qa","data-cy","data-test-id","data-qa-id","data-testing","data-component","data-element","data-source-file"],Xn=[rr,function(t){if(t.id&&!nr(t.id))return"#"+CSS.escape(t.id)}],tr=[rr,function(t){if("BODY"===t.tagName)return;const e=t.classList;for(let n=0;n<e.length;n+=1){const r=e[n];if(!nr(r))return`${CSS.escape(t.tagName)}.${CSS.escape(r)}`}},function(t){return CSS.escape(t.tagName)}];function er(t,e){if(!t.isConnected)return;let n,r=t;for(;r&&"HTML"!==r.nodeName;){const t=ir(r,Xn,sr,e,n);if(t)return t;n=ir(r,tr,ar,e,n)||cr(or(r),n),r=r.parentElement}return n}function nr(t){return/[0-9]/.test(t)}function rr(t,e){if(e){const t=n(e);if(t)return t}for(const t of Qn){const e=n(t);if(e)return e}function n(e){if(t.hasAttribute(e))return`${CSS.escape(t.tagName)}[${e}="${CSS.escape(t.getAttribute(e))}"]`}}function or(t){let e=t.parentElement.firstElementChild,n=1;for(;e&&e!==t;)e.tagName===t.tagName&&(n+=1),e=e.nextElementSibling;return`${CSS.escape(t.tagName)}:nth-of-type(${n})`}function ir(t,e,n,r,o){for(const i of e){const e=i(t,r);if(e&&n(t,e,o))return cr(e,o)}}function sr(t,e,n){return 1===t.ownerDocument.querySelectorAll(cr(e,n)).length}function ar(t,e,n){let r;if(void 0===n)r=t=>t.matches(e);else{const t=cr(e+":scope",n);r=e=>null!==e.querySelector(t)}let o=t.parentElement.firstElementChild;for(;o;){if(o!==t&&r(o))return!1;o=o.nextElementSibling}return!0}function cr(t,e){return e?`${t}>${e}`:t}const ur={IGNORE:"ignore",HIDDEN:"hidden",ALLOW:we.ALLOW,MASK:we.MASK,MASK_USER_INPUT:we.MASK_USER_INPUT,MASK_UNLESS_ALLOWLISTED:we.MASK_UNLESS_ALLOWLISTED},lr="data-kubesense-privacy",dr="hidden",fr="***",pr="data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",mr={INPUT:!0,OUTPUT:!0,TEXTAREA:!0,SELECT:!0,OPTION:!0,DATALIST:!0,OPTGROUP:!0};function hr(t){return`[${lr}="${t}"], .kubesense-privacy-${t}`}function gr(t,e,n){if(n&&n.has(t))return n.get(t);const r=Wn(t),o=r?gr(r,e,n):e,i=vr(yr(t),o);return n&&n.set(t,i),i}function vr(t,e){switch(e){case ur.HIDDEN:case ur.IGNORE:return e}switch(t){case ur.ALLOW:case ur.MASK:case ur.MASK_USER_INPUT:case ur.MASK_UNLESS_ALLOWLISTED:case ur.HIDDEN:case ur.IGNORE:return t;default:return e}}function yr(t){if(zn(t)){if("BASE"===t.tagName)return ur.ALLOW;if("INPUT"===t.tagName){const e=t;if("password"===e.type||"email"===e.type||"tel"===e.type)return ur.MASK;if("hidden"===e.type)return ur.MASK;const n=e.getAttribute("autocomplete");if(n&&(n.startsWith("cc-")||n.endsWith("-password")))return ur.MASK}return t.matches(hr(ur.HIDDEN))?ur.HIDDEN:t.matches(hr(ur.MASK))?ur.MASK:t.matches(hr(ur.MASK_UNLESS_ALLOWLISTED))?ur.MASK_UNLESS_ALLOWLISTED:t.matches(hr(ur.MASK_USER_INPUT))?ur.MASK_USER_INPUT:t.matches(hr(ur.ALLOW))?ur.ALLOW:function(t){if("SCRIPT"===t.nodeName)return!0;if("LINK"===t.nodeName){const t=e("rel");return/preload|prefetch/i.test(t)&&"script"===e("as")||"shortcut icon"===t||"icon"===t}if("META"===t.nodeName){const n=e("name"),r=e("rel"),o=e("property");return/^msapplication-tile(image|color)$/.test(n)||"application-name"===n||"icon"===r||"apple-touch-icon"===r||"shortcut icon"===r||"keywords"===n||"description"===n||/^(og|twitter|fb):/.test(o)||/^(og|twitter):/.test(n)||"pinterest"===n||"robots"===n||"googlebot"===n||"bingbot"===n||t.hasAttribute("http-equiv")||"author"===n||"generator"===n||"framework"===n||"publisher"===n||"progid"===n||/^article:/.test(o)||/^product:/.test(o)||"google-site-verification"===n||"yandex-verification"===n||"csrf-token"===n||"p:domain_verify"===n||"verify-v1"===n||"verification"===n||"shopify-checkout-api-token"===n}function e(e){return(t.getAttribute(e)||"").toLowerCase()}return!1}(t)?ur.IGNORE:void 0}}function br(t,e){switch(e){case ur.MASK:case ur.HIDDEN:case ur.IGNORE:return!0;case ur.MASK_UNLESS_ALLOWLISTED:return Dn(t)?!!wr(t.parentNode)||!Er(t.textContent||""):wr(t);case ur.MASK_USER_INPUT:return Dn(t)?wr(t.parentNode):wr(t);default:return!1}}function _r(t,e,n,r,o){if(r!==ur.MASK&&r!==ur.MASK_UNLESS_ALLOWLISTED)return!1;if(e===lr||Qn.includes(e)||e===o.actionNameAttribute)return!1;switch(e){case"title":case"alt":case"placeholder":case"aria-label":case"name":return!0}return"A"===t&&"href"===e||"IFRAME"===t&&"srcdoc"===e||!(!n||!e.startsWith("data-"))||!("IMG"!==t&&"SOURCE"!==t||"src"!==e&&"srcset"!==e)}function wr(t){if(!t||t.nodeType!==t.ELEMENT_NODE)return!1;const e=t;if("INPUT"===e.tagName)switch(e.type){case"button":case"color":case"reset":case"submit":return!1}return!!mr[e.tagName]}const kr=t=>t.replace(/\S/g,"x");function Sr(t,e){var n;const r=null===(n=t.parentElement)||void 0===n?void 0:n.tagName;let o=t.textContent||"";if("HEAD"===r&&!o.trim())return;const i=e;if("SCRIPT"===r)o=fr;else if(i===ur.HIDDEN)o=fr;else if(br(t,i))if("DATALIST"===r||"SELECT"===r||"OPTGROUP"===r){if(!o.trim())return}else o="OPTION"===r?fr:i===ur.MASK_UNLESS_ALLOWLISTED?xr(o):kr(o);return o}function Er(t){var e;return!t||!t.trim()||(null===(e=window.$KUBESENSE_ALLOW)||void 0===e?void 0:e.has(t.toLocaleLowerCase()))||!1}function xr(t,e){return Er(t)?t:e||kr(t)}const Tr=s.OY;function Ar(t,e){const n=t.closest(`[${e}]`);if(n)return Nr(Or(n.getAttribute(e).trim()))}const Cr=[(t,e,n)=>{if("labels"in t&&t.labels&&t.labels.length>0)return Lr(t.labels[0],e,n)},t=>{if("INPUT"===t.nodeName){const e=t,n=e.getAttribute("type");if("button"===n||"submit"===n||"reset"===n)return{name:e.value,nameSource:"text_content"}}},(t,e,n)=>{if("BUTTON"===t.nodeName||"LABEL"===t.nodeName||"button"===t.getAttribute("role"))return Lr(t,e,n)},(t,e,n)=>Pr(t,"aria-label",e,n),(t,e,n)=>{const r=t.getAttribute("aria-labelledby");if(r)return{name:r.split(/\s+/).map(e=>function(t,e){return t.ownerDocument?t.ownerDocument.getElementById(e):null}(t,e)).filter(t=>!!t).map(t=>Vr(t,e,n)).join(" "),nameSource:"text_content"}},(t,e,n)=>Pr(t,"alt",e,n),(t,e,n)=>Pr(t,"name",e,n),(t,e,n)=>Pr(t,"title",e,n),(t,e,n)=>Pr(t,"placeholder",e,n),(t,e,n)=>{if("options"in t&&t.options.length>0)return Lr(t.options[0],e,n)}],Rr=[(t,e,n)=>Lr(t,e,n)];function Ir(t,e,n,r){let o=t,i=0;for(;i<=10&&o&&"BODY"!==o.nodeName&&"HTML"!==o.nodeName&&"HEAD"!==o.nodeName;){for(const t of e){const e=t(o,n,r);if(e){const{name:t,nameSource:n}=e,r=t&&t.trim();if(r)return{name:Nr(Or(r)),nameSource:n}}}if("FORM"===o.nodeName)break;o=o.parentElement,i+=1}}function Or(t){return t.replace(/\s+/g," ")}function Nr(t){return t.length>100?j(t,100)+" [...]":t}function Pr(t,e,n,r){const{enablePrivacyForActionName:o,defaultPrivacyLevel:i}=n;let s=t.getAttribute(e);if(s&&o){const o=gr(t,i,r);_r(t.tagName,e,s,o,n)&&(s=xr(s,Yn))}else s||(s="");return{name:s,nameSource:"standard_attribute"}}function Lr(t,e,n){return{name:Vr(t,e,n)||"",nameSource:"text_content"}}function Vr(t,e,n){if(t.isContentEditable)return;const{enablePrivacyForActionName:r,actionNameAttribute:o,defaultPrivacyLevel:i}=e;if((0,D.sr)(D.R9.USE_TREE_WALKER_FOR_ACTION_NAME))return function(t,e,n,r,o){const i=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,function(t){const i=gr(t,r,o);if(n&&i&&br(t,i))return NodeFilter.FILTER_REJECT;if(zn(t)){if(t.hasAttribute(Jn)||e&&t.hasAttribute(e))return NodeFilter.FILTER_REJECT;const n=getComputedStyle(t);if("visible"!==n.visibility||"none"===n.display||n.contentVisibility&&"visible"!==n.contentVisibility)return NodeFilter.FILTER_REJECT}return NodeFilter.FILTER_ACCEPT});let s="";for(;i.nextNode();){const t=i.currentNode;zn(t)?("BR"===t.nodeName||"P"===t.nodeName||["block","flex","grid","list-item","table","table-caption"].includes(getComputedStyle(t).display))&&(s+=" "):s+=t.textContent||""}return s.replace(/\s+/g," ").trim()}(t,o,r,i,n);if("innerText"in t){let e=t.innerText;const n=n=>{const r=t.querySelectorAll(n);for(let t=0;t<r.length;t+=1){const n=r[t];if("innerText"in n){const t=n.innerText;t&&t.trim().length>0&&(e=e.replace(t,""))}}};return n(`[${Jn}]`),o&&n(`[${o}]`),r&&n(`${hr(ur.HIDDEN)}, ${hr(ur.MASK)}`),e}return t.textContent}function Mr(){const t=window.getSelection();return!t||t.isCollapsed}function Ur(t){return t.target instanceof Element&&!1!==t.isPrimary}function $r(t){if(t.hasPageActivity||t.getUserActivity().input||t.getUserActivity().scroll)return!1;let e=t.event.target;return"LABEL"===e.tagName&&e.hasAttribute("for")&&(e=document.getElementById(e.getAttribute("for"))),!e||!e.matches('input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="range"]),textarea,select,[contenteditable],[contenteditable] *,canvas,a[href],a[href] *')}const Dr=10*s.OY,zr=new Map;function Br(t,e){zr.set(t,e),zr.forEach((t,e)=>{(0,s.vk)(e,(0,s.$S)())>Dr&&zr.delete(e)})}const qr=5*s.iW;function jr(t,e,n,o){const i=dt({expireDelay:qr}),a=new r.cP;let c;t.subscribe(10,()=>{i.reset()}),t.subscribe(5,f),t.subscribe(11,t=>{t.reason===Ye.y5.UNLOADING&&f()});const{stop:u}=function(t,{onPointerDown:e,onPointerUp:n}){let r,o,i={selection:!1,input:!1,scroll:!1};const s=[(0,J.q)(t,window,"pointerdown",t=>{Ur(t)&&(r=Mr(),i={selection:!1,input:!1,scroll:!1},o=e(t))},{capture:!0}),(0,J.q)(t,window,"selectionchange",()=>{r&&Mr()||(i.selection=!0)},{capture:!0}),(0,J.q)(t,window,"scroll",()=>{i.scroll=!0},{capture:!0,passive:!0}),(0,J.q)(t,window,"pointerup",t=>{if(Ur(t)&&o){const e=i;n(o,t,()=>e),o=void 0}},{capture:!0}),(0,J.q)(t,window,"input",()=>{i.input=!0},{capture:!0})];return{stop(){s.forEach(t=>t.stop())}}}(o,{onPointerDown:r=>function(t,e,n,r,o){let i;if(i=t.enablePrivacyForActionName?gr(r.target,t.defaultPrivacyLevel):ur.ALLOW,i===ur.HIDDEN)return;const s=function(t,e,n){const r=t.target.getBoundingClientRect(),o=er(t.target,n.actionNameAttribute);o&&Br(t.timeStamp,o);const{name:i,nameSource:s}=function(t,e,n=ur.ALLOW){const r=new Map,{actionNameAttribute:o}=e,i=Ar(t,Jn)||o&&Ar(t,o);return i?{name:i,nameSource:"custom_attribute"}:n===ur.MASK?{name:Yn,nameSource:"mask_placeholder"}:Ir(t,Cr,e,r)||Ir(t,Rr,e,r)||{name:"",nameSource:"blank"}}(t.target,n,e);return{type:V.CLICK,target:{width:Math.round(r.width),height:Math.round(r.height),selector:o},position:{x:Math.round(t.clientX-r.left),y:Math.round(t.clientY-r.top)},name:i,nameSource:s}}(r,i,t);let a=!1;return Zn(e,n,o,t,t=>{a=t.hadActivity},100),{clickActionBase:s,hadActivityOnPointerDown:()=>a}}(o,t,e,r,n),onPointerUp({clickActionBase:r,hadActivityOnPointerDown:s},c,u){!function(t,e,n,r,o,i,s,a,c,u,l){var d;const f=Fr(e,o,u,a,c);s(f);const p=null===(d=null==a?void 0:a.target)||void 0===d?void 0:d.selector;p&&Br(c.timeStamp,p);const{stop:m}=Zn(e,n,r,t,t=>{t.hadActivity&&t.end<f.startClocks.timeStamp?f.discard():t.hadActivity?f.stop(t.end):l()?f.stop(f.startClocks.timeStamp):f.stop()},Dr),h=e.subscribe(5,({endClocks:t})=>{f.stop(t.timeStamp)}),g=i.subscribe(()=>{f.stop()});f.stopObservable.subscribe(()=>{h.unsubscribe(),m(),g.unsubscribe()})}(o,t,e,n,i,a,d,r,c,u,s)}}),l={findActionId:t=>i.findAll(t)};return{stop(){f(),a.notify(),u()},actionContexts:l};function d(t){if(!c||!c.tryAppend(t)){const e=t.clone();c=function(t){const n=[];let r,o=0;function i(t){t.stopObservable.subscribe(a),n.push(t),(0,st.DJ)(r),r=(0,st.wg)(u,Tr)}function a(){1===o&&n.every(t=>t.isStopped())&&(o=2,function(t,e){const{isRage:n}=function(t,e){if(function(t){if(t.some(t=>t.getUserActivity().selection||t.getUserActivity().scroll))return!1;for(let e=0;e<t.length-2;e+=1)if(t[e+3-1].event.timeStamp-t[e].event.timeStamp<=s.OY)return!0;return!1}(t))return e.addFrustration("rage_click"),t.some($r)&&e.addFrustration(U),e.hasError&&e.addFrustration(M),{isRage:!0};const n=t.some(t=>t.getUserActivity().selection);return t.forEach(t=>{t.hasError&&t.addFrustration(M),$r(t)&&!n&&t.addFrustration(U)}),{isRage:!1}}(t,e);n?(t.forEach(t=>t.discard()),e.stop((0,s.nx)()),e.validate(t.map(t=>t.event))):(e.discard(),t.forEach(t=>t.validate()))}(n,e),c=void 0)}function u(){(0,st.DJ)(r),0===o&&(o=1,a())}return i(t),{tryAppend(t){return 0===o&&(n.length>0&&(e=n[n.length-1].event,r=t.event,!(e.target===r.target&&(s=e,a=r,Math.sqrt(Math.pow(s.clientX-a.clientX,2)+Math.pow(s.clientY-a.clientY,2))<=100)&&e.timeStamp-r.timeStamp<=Tr))?(u(),!1):(i(t),!0));var e,r,s,a},stop(){u()}}}(t)}}function f(){c&&c.stop()}}function Fr(t,e,n,o,i){const a=z(),c=(0,s.FR)(i.timeStamp),u=e.add(a,c.relative),l=Ln({lifeCycle:t,isChildEvent:t=>void 0!==t.action&&(Array.isArray(t.action.id)?t.action.id.includes(a):t.action.id===a)});let d,f=0;const p=[],m=new r.cP;function h(t){0===f&&(d=t,f=1,d?u.close((0,s.gs)(d)):u.remove(),l.stop(),m.notify())}return{event:i,stop:h,stopObservable:m,get hasError(){return l.eventCounts.errorCount>0},get hasPageActivity(){return void 0!==d},getUserActivity:n,addFrustration(t){p.push(t)},startClocks:c,isStopped:()=>1===f||2===f,clone:()=>Fr(t,e,n,o,i),validate(e){if(h(),1!==f)return;const{resourceCount:n,errorCount:r,longTaskCount:u}=l.eventCounts,m={duration:d&&(0,s.vk)(c.timeStamp,d),startClocks:c,id:a,frustrationTypes:p,counts:{resourceCount:n,errorCount:r,longTaskCount:u},events:null!=e?e:[i],event:i,...o};t.notify(0,m),f=2},discard(){h(),f=2}}}function Wr(t){const e=Gr(t)?{action:{id:t.id,loading_time:Pn((0,s.Zj)(t.duration)),frustration:{type:t.frustrationTypes},error:{count:t.counts.errorCount},long_task:{count:t.counts.longTaskCount},resource:{count:t.counts.resourceCount}},_kubesense:{action:{target:t.target,position:t.position,name_source:t.nameSource}}}:{context:t.context},n=(0,v.kg)({action:{id:z(),target:{name:t.name},type:t.type},date:t.startClocks.timeStamp,type:O.ACTION},e),r=Gr(t)?t.duration:void 0,o=Gr(t)?{events:t.events}:{handlingStack:t.handlingStack};return{rawRumEvent:n,duration:r,startTime:t.startClocks.relative,domainContext:o}}function Gr(t){return t.type!==V.CUSTOM}var Zr=n(416);let Hr={};const Kr="csp_violation";function Jr(t){return{startClocks:(0,s.M8)(),source:l.g.REPORT,handling:"unhandled",...t}}function Yr(t,e,n,r,o){return n?(0,y.Yn)({name:t,message:e,stack:[{func:"?",url:n,line:null!=r?r:void 0,column:null!=o?o:void 0}]}):void 0}var Qr=n(981);const Xr=s.OY,to=new WeakSet;function eo(t){return(0,s.Gw)(t.startTime,t.duration)}var no=n(846);const ro=2*s.iW;function oo(t){const e=function(t){const e=t.querySelector("meta[name=kubesense-trace-id]"),n=t.querySelector("meta[name=kubesense-trace-time]");return io(e&&e.content,n&&n.content)}(t)||function(t){const e=function(t){for(let e=0;e<t.childNodes.length;e+=1){const n=so(t.childNodes[e]);if(n)return n}if(t.body)for(let e=t.body.childNodes.length-1;e>=0;e-=1){const n=t.body.childNodes[e],r=so(n);if(r)return r;if(!Dn(n))break}}(t);if(e)return io(q(e,"trace-id"),q(e,"trace-time"))}(t);if(e&&!(e.traceTime<=(0,s.x3)()-ro))return e.traceId}function io(t,e){const n=e&&Number(e);if(t&&n)return{traceId:t,traceTime:n}}function so(t){if(t&&function(t){return t.nodeType===Node.COMMENT_NODE}(t)){const e=/^\s*KUBESENSE;(.*?)\s*$/.exec(t.data);if(e)return e[1]}}function ao(){if($n(Vn.NAVIGATION)){const t=performance.getEntriesByType(Vn.NAVIGATION)[0];if(t)return t}const t=function(){const t={},e=performance.timing;for(const n in e)if((0,zt.Et)(e[n])){const r=n,o=e[r];t[r]=0===o?0:(0,s.gs)(o)}return t}(),e={entryType:Vn.NAVIGATION,initiatorType:"navigation",name:window.location.href,startTime:0,duration:t.loadEventEnd,decodedBodySize:0,encodedBodySize:0,transferSize:0,workerStart:0,toJSON:()=>({...e,toJSON:void 0}),...t};return e}function co(t,e,n=ao){(0,no.H)(t,"interactive",()=>{const t=n(),r=Object.assign(t.toJSON(),{entryType:Vn.RESOURCE,initiatorType:fn,duration:t.responseEnd,traceId:oo(document),toJSON:()=>({...r,toJSON:void 0})});e(r)})}function uo(t,e,n,r=function(){const t=[];function e(e){let r;if(e.didTimeout){const t=performance.now();r=()=>30-(performance.now()-t)}else r=e.timeRemaining.bind(e);for(;r()>0&&t.length;)t.shift()();t.length&&n()}function n(){(0,Qr.BB)(e,{timeout:Xr})}return{push(e){1===t.push(e)&&n()},stop(){t.length=0}}}(),o=co){let i;const a=e.trackEarlyRequests;a?i=function(t){const e=new Set,n=t.subscribe(8,t=>{e.add(t),e.size>1e3&&((0,h.A2)("Too many requests"),e.delete(e.values().next().value))});return{getMatchingRequest(t){let n,r=1/0;for(const o of e){const e=t.startTime-o.startClocks.relative;0<=e&&e<r&&o.url===t.name&&(r=Math.abs(e),n=o)}return n&&e.delete(n),n},stop(){n.unsubscribe()}}}(t):t.subscribe(8,t=>{u(()=>function(t,e,n){const r=function(t){if(!performance||!("getEntriesByName"in performance))return;const e=performance.getEntriesByName(t.url,"resource");if(!e.length||!("toJSON"in e[0]))return;const n=e.filter(t=>!to.has(t)).filter(t=>yn(t)).filter(e=>{return n=e,r=t.startClocks.relative,o=eo({startTime:t.startClocks.relative,duration:t.duration}),n.startTime>=r-1&&eo(n)<=(0,s.Gw)(o,1);var n,r,o});return 1===n.length?(to.add(n[0]),n[0].toJSON()):void 0}(t);return fo(r,t,n,e)}(t,e,n))});const c=Mn(e,{type:Vn.RESOURCE,buffered:!0}).subscribe(t=>{for(const r of t)!a&&gn(r)||u(()=>lo(r,e,n,i))});function u(e){r.push(()=>{const n=e();n&&t.notify(12,n)})}return o(e,t=>{u(()=>lo(t,e,n,i))}),{stop(){r.stop(),c.unsubscribe()}}}function lo(t,e,n,r){return fo(t,gn(t)&&r?r.getMatchingRequest(t):void 0,n,e)}function fo(t,e,n,r){if(!t&&!e)return;const o=e?function(t,e){if(t.traceSampled&&t.traceId&&t.spanId)return{_kubesense:{span_id:t.spanId.toString(),trace_id:t.traceId.toString(),rule_psr:e.rulePsr}}}(e,r):function(t,e){if(t.traceId)return{_kubesense:{trace_id:t.traceId,span_id:Ae().toString(),rule_psr:e.rulePsr}}}(t,r);if(!r.trackResources&&!o)return;const i=t?(0,s.FR)(t.startTime):e.startClocks,a=t?function(t){const{duration:e,startTime:n,responseEnd:r}=t;return 0===e&&n<r?(0,s.vk)(n,r):e}(t):function(t,e,n){return t.wasInPageStateDuringPeriod("frozen",e.relative,n)?void 0:n}(n,i,e.duration),c=e&&function(t,e){const n=In(t.url,e);if(n)return function(t,e){const n=function(t,e=!1){if(!t||"string"!=typeof t)return;let n,r,o;try{n=JSON.parse(t)}catch(i){return}if(!n)return;if(n.query){const t=n.query.trim();r=null===(i=t.match(/^\s*(query|mutation|subscription)\b/i))||void 0===i?void 0:i[1],e&&(o=j(t,Rn,"..."))}var i;const s=n.operationName;let a;return n.variables&&(a=JSON.stringify(n.variables)),{operationType:r,operationName:s,variables:a,payload:o}}(t.requestBody,e.trackPayload);if(n){if(e.trackResponseErrors&&t.responseBody){const e=function(t){let e;try{e=JSON.parse(t)}catch(t){return}if(!e||"object"!=typeof e)return;const n=e;return K(n.errors)?n.errors.map(t=>{var e;return{message:t.message,path:t.path,locations:t.locations,code:null===(e=t.extensions)||void 0===e?void 0:e.code}}):void 0}(t.responseBody);e&&(n.error_count=e.length,n.errors=e)}return n}}(t,n)}(e,r),u=(0,v.kg)({date:i.timeStamp,resource:{id:z(),duration:(0,s.Zj)(a),type:e?e.type===dn?an:cn:mn(t),method:e?e.method:void 0,status_code:e?e.status:(l=t.responseStatus,0===l?void 0:l),url:e?Cn(e.url):t.name,protocol:t&&wn(t),delivery_type:t&&kn(t),provider:Tn(e?e.url:t.name,r.firstPartyDomains),graphql:c},type:O.RESOURCE,_kubesense:{discarded:!r.trackResources}},o,t&&function(t){const{renderBlockingStatus:e}=t;return{resource:{render_blocking_status:e,...Sn(t),...vn(t)}}}(t));var l;return{startTime:i.relative,duration:a,rawRumEvent:u,domainContext:po(t,e)}}function po(t,e){if(e){const n={performanceEntry:t,isAborted:e.isAborted,handlingStack:e.handlingStack};return e.type===dn?{xhr:e.xhr,...n}:{requestInput:e.input,requestInit:e.init,response:e.response,error:e.error,...n}}return{performanceEntry:t}}function mo(){try{return(new Intl.DateTimeFormat).resolvedOptions().timeZone}catch(t){return}}const ho=10*s.iW,go=10*s.iW;function vo(t,e,n=window){if("hidden"===document.visibilityState)return{timeStamp:0,stop:kt.l};if($n(Vn.VISIBILITY_STATE)){const t=performance.getEntriesByType(Vn.VISIBILITY_STATE).filter(t=>"hidden"===t.name).find(t=>t.startTime>=e.relative);if(t)return{timeStamp:t.startTime,stop:kt.l}}let r=1/0;const{stop:o}=(0,J.l)(t,n,["pagehide","visibilitychange"],t=>{"pagehide"!==t.type&&"hidden"!==document.visibilityState||(r=t.timeStamp,o())},{capture:!0});return{get timeStamp(){return r},stop:o}}const yo=(t,e)=>t*e,bo=t=>yo(t.previousRect.width,t.previousRect.height)+yo(t.currentRect.width,t.currentRect.height)-((t,e)=>{const n=Math.max(t.left,e.left),r=Math.max(t.top,e.top),o=Math.min(t.right,e.right),i=Math.min(t.bottom,e.bottom);return n>=o||r>=i?0:yo(o-n,i-r)})(t.previousRect,t.currentRect);function _o(t){let e;for(const n of t)if(n.node&&zn(n.node)){const t=bo(n);(!e||bo(e)<t)&&(e=n)}return e}function wo({x:t,y:e,width:n,height:r}){return{x:t,y:e,width:n,height:r}}const ko=5*s.OY,So=s.OY;let Eo,xo=0,To=1/0,Ao=0;const Co=()=>Eo?xo:window.performance.interactionCount||0,Ro=1*s.iW;function Io(){let t;const e=window.visualViewport;return t=e?e.pageLeft-e.offsetLeft:void 0!==window.scrollX?window.scrollX:window.pageXOffset||0,Math.round(t)}function Oo(){let t;const e=window.visualViewport;return t=e?e.pageTop-e.offsetTop:void 0!==window.scrollY?window.scrollY:window.pageYOffset||0,Math.round(t)}let No;function Po(t){return No||(No=function(t){return new r.cP(e=>{const{throttled:n}=(0,kt.n)(()=>{e.notify(Lo())},200);return(0,J.q)(t,window,"resize",n,{capture:!0,passive:!0}).stop})}(t)),No}function Lo(){const t=window.visualViewport;return t?{width:Number(t.width*t.scale),height:Number(t.height*t.scale)}:{width:Number(window.innerWidth||0),height:Number(window.innerHeight||0)}}const Vo=s.OY,Mo=5*s.iW,Uo=5*s.iW;function $o(t){const e=t.indexOf("?");return e<0?t:t.slice(0,e)}function Do({cumulativeLayoutShift:t,interactionToNextPaint:e},{firstContentfulPaint:n,firstInput:r,largestContentfulPaint:o}){return{cls:t&&{score:t.value,timestamp:(0,s.Zj)(t.time),target_selector:t.targetSelector,previous_rect:t.previousRect,current_rect:t.currentRect},fcp:n&&{timestamp:(0,s.Zj)(n)},fid:r&&{duration:(0,s.Zj)(r.delay),timestamp:(0,s.Zj)(r.time),target_selector:r.targetSelector},inp:e&&{duration:(0,s.Zj)(e.value),timestamp:(0,s.Zj)(e.time),target_selector:e.targetSelector},lcp:o&&{timestamp:(0,s.Zj)(o.value),target_selector:o.targetSelector,resource_url:o.resourceUrl}}}const zo=s.iW,Bo=ft;let qo=[];async function jo(){let t;return t="cookieStore"in window?await window.cookieStore.getAll(qt):document.cookie.split(/\s*;\s*/).filter(t=>t.startsWith(qt)),{count:t.length,domain:Lt()||"undefined",...t}}var Fo=n(725),Wo=n(723),Go=n(673);const Zo=ft;function Ho(t){return Object.prototype.hasOwnProperty.call(history,t)?history:History.prototype}const Ko=ft,Jo=10*s.OY;let Yo,Qo;function Xo(){0!==Yo.batchCount&&((0,h.Gk)("Customer data measures",Yo),ei())}function ti(t,e){t.sum+=e,t.min=Math.min(t.min,e),t.max=Math.max(t.max,e)}function ei(){Yo={batchCount:0,batchBytesCount:{min:1/0,max:0,sum:0},batchMessagesCount:{min:1/0,max:0,sum:0}}}const ni=ft;function ri(t,e,n){if(0!==t.length)return t.slice(-n).reverse().map(({state:t,startTime:n})=>({state:t,start:(0,s.Zj)((0,s.vk)(e,n))}))}function oi(){return"hidden"===document.visibilityState?"hidden":document.hasFocus()?"active":"passive"}const ii=s.OY;function si(t,e){const n=q(document.cookie,t),r=(0,st.yb)(()=>{const r=q(document.cookie,t);r!==n&&e(r)},ii);return()=>{(0,st.vG)(r)}}const ai="kubesense-ci-visibility-test-execution-id",ci=ft;function ui(t,e,n){const r={date:e.timeStamp,type:O.LONG_TASK,_kubesense:{discarded:!1}};return t.entryType===Vn.LONG_TASK?{...r,long_task:{id:n,entry_type:"long-task",duration:(0,s.Zj)(t.duration)}}:{...r,long_task:{id:n,entry_type:"long-animation-frame",duration:(0,s.Zj)(t.duration),blocking_duration:(0,s.Zj)(t.blockingDuration),first_ui_event_timestamp:(0,s.Zj)(t.firstUIEventTimestamp),render_start:(0,s.Zj)(t.renderStart),style_and_layout_start:(0,s.Zj)(t.styleAndLayoutStart),start_time:(0,s.Zj)(t.startTime),scripts:t.scripts.map(t=>({duration:(0,s.Zj)(t.duration),pause_duration:(0,s.Zj)(t.pauseDuration),forced_style_and_layout_duration:(0,s.Zj)(t.forcedStyleAndLayoutDuration),start_time:(0,s.Zj)(t.startTime),execution_start:(0,s.Zj)(t.executionStart),source_url:t.sourceURL,source_function_name:t.sourceFunctionName,source_char_position:t.sourceCharPosition,invoker:t.invoker,invoker_type:t.invokerType,window_attribution:t.windowAttribution}))}}}function li(t,e,n=3e3){let r=0,o=!1;return{isLimitReached(){if(0===r&&(0,st.wg)(()=>{r=0},s.iW),r+=1,r<=n||o)return o=!1,!1;if(r===n+1){o=!0;try{e({message:`Reached max number of ${t}s by minute: ${n}`,source:l.g.AGENT,startClocks:(0,s.M8)()})}finally{o=!1}}return!0}}}var di=n(485);function fi(t,e,n){const r=(0,v.Go)(t),o=n(r);return(0,jt.WP)(e).forEach(([e,n])=>pi(t,r,e.split(/\.|(?=\[\])/),n)),o}function pi(t,e,n,r){const[o,...i]=n;if("[]"!==o){if(mi(t)&&mi(e))return i.length>0?pi(t[o],e[o],i,r):void function(t,e,n,r){const o=(0,tt.P)(n);o===r?t[e]=(0,b.a)(n):"object"!==r||"undefined"!==o&&"null"!==o||(t[e]={})}(t,o,e[o],r)}else Array.isArray(t)&&Array.isArray(e)&&t.forEach((t,n)=>pi(t,e[n],i,r))}function mi(t){return"object"===(0,tt.P)(t)}const hi={"view.name":"string","view.url":"string","view.referrer":"string"},gi={context:"object"},vi={service:"string",version:"string"};let yi;var bi=n(489);const _i={"Microsoft Edge":1,"Google Chrome":2,Chromium:3,Opera:4,Brave:5};function wi(t){var e;if(!t||0===t.length)return;let n,r=Number.MAX_SAFE_INTEGER;for(const o of t){if(!o.brand||0===o.brand.indexOf("Not"))continue;const t=null!==(e=_i[o.brand])&&void 0!==e?e:99;t<r&&(n=o,r=t)}return null!=n?n:t.find(t=>t.brand&&0!==t.brand.indexOf("Not"))}function ki(t){const e=t.indexOf(".");return e>=0?t.slice(0,e):t}function Si(){const t=c.J2.navigator;return null==t?void 0:t.userAgentData}const Ei=it.XP,xi=[O.ACTION,O.ERROR,O.LONG_TASK,O.RESOURCE,O.VITAL];function Ti(t,e,n,o,c,d,f,p,g){const _=[],w=new tn,k=Ei();w.subscribe(13,t=>(0,Je.b)("rum",t));const S=t=>{w.notify(14,{error:t}),(0,h.A2)("Error reported to customer",{"error.message":t.message})},E=(0,Ye._T)(t),x=E.subscribe(t=>{w.notify(11,t)});_.push(()=>x.unsubscribe());const T=(0,h.a5)("kubesense-browser-rum-sdk",t,k,S,E,c);_.push(T.stop);const A=(0,wt.d0)()?function(){const t={id:"00000000-aaaa-0000-aaaa-000000000000",sessionReplay:(0,wt.Ww)("records")?1:0};return{findTrackedSession(){return t},expire:kt.l,expireObservable:new r.cP,setForcedReplay:kt.l}}():function(t,e,n){const o=function(t,e,n,o){const i=new r.cP,a=new r.cP,c=function(t,e,n,o,i=function(t,e){return t.type===ht?function(t,e){const n={isLockEnabled:(0,Bt.F2)(),persistSession(n){return Xt(e,t,n,pt)},retrieveSession(){return te(e,t)},expireSession(n){return Xt(e,t,Wt(n,t),ft)}};return function(t){if(!Nt(qt)){const e=Nt("_kubesense"),n=Nt("_kubesense_r"),r=Nt("_kubesense_l"),o={};e&&(o.id=e),r&&/^[01]$/.test(r)&&(o.logs=r),n&&/^[012]$/.test(n)&&(o.rum=n),Zt(o)&&(Kt(o),t.persistSession(o))}}(n),n}(e,t.cookieOptions):function(t){return{isLockEnabled:!1,persistSession:re,retrieveSession:oe,expireSession(e){return function(t,e){re(Wt(t,e))}(e,t)}}}(e)}(t,e)){const a=new r.cP,c=new r.cP,u=new r.cP,l=(0,st.yb)(function(){ce({process:t=>Ht(t)?Wt(t,e):void 0,after:m},i)},fe);let d;h();const{throttled:f,cancel:p}=(0,kt.n)(()=>{ce({process(t){if(Gt(t))return;const e=m(t);return function(t){if(Gt(t))return!1;const e=o(t[n]);t[n]=e,delete t.isExpired,"0"===e||t.id||(t.id=z(),t.created=(0,s.x3)()+"")}(e),e},after(t){Zt(t)&&!g()&&function(t){d=t,a.notify()}(t),d=t}},i)},fe);function m(t){return Ht(t)&&(t.anonymousId=z(),t=Wt(t,e)),g()&&(function(t){return d.id!==t.id||d[n]!==t[n]}(t)?(d=Wt(d,e),c.notify()):(u.notify({previousState:d,newState:t}),d=t)),t}function h(){ce({process(t){if(Gt(t))return Wt(t,e)},after(t){d=t}},i)}function g(){return void 0!==(null==d?void 0:d[n])}return{expandOrRenewSession:f,expandSession(){const t=i.retrieveSession();Ht(t)?ce({process:t=>Ht(t)?Wt(t,e):void 0,after:m},i):m(t)},getSession:()=>d,renewObservable:a,expireObservable:c,sessionStateUpdateObservable:u,restartSession:h,expire(t){p(),!1===t&&d&&delete d.anonymousId,i.expireSession(d),m(Wt(d,e))},stop(){(0,st.vG)(l)},updateSessionState(t){ce({process:e=>({...e,...t}),after:m},i)}}}(t.sessionStoreStrategyType,t,e,n);qo.push(()=>c.stop());const u=dt({expireDelay:Bo});if(qo.push(()=>u.stop()),c.renewObservable.subscribe(()=>{u.add(l(),(0,s.$S)()),i.notify()}),c.expireObservable.subscribe(()=>{a.notify(),u.closeActive((0,s.$S)())}),c.expandOrRenewSession(),u.add(l(),(0,s.Oc)().relative),(0,D.sr)(D.R9.SHORT_SESSION_INVESTIGATION)){const e=c.getSession();e&&function(t,e){if(!window.cookieStore||!e.created)return;const n=Number(e.created),r=(0,s.x3)(),{stop:o}=(0,J.q)(t,cookieStore,"change",function(t){const i=(0,jt.Uk)(t.changed,t=>t.name===qt);if(!i)return;const a=(0,s.x3)()-n;if(a>14*s.iW)o();else{const t=Yt(i.value);if(t.id&&t.id!==e.id){o();const n=(0,s.x3)()-r;jo().then(r=>{(0,h.A2)("Session cookie changed",{time:n,session_age:a,old:e,new:t,cookie:r})}).catch(m.Dx)}}});qo.push(o)}(t,e)}function l(){const n=c.getSession();return n?{id:n.id,trackingType:n[e],isReplayForced:!!n.forcedReplay,anonymousId:n.anonymousId}:(async function(t){const e=t.sessionStoreStrategyType;if(!e)return;let n,r;e.type===ht?(n=te(e.cookieOptions,t),r={cookie:await jo(),currentDomain:`${window.location.protocol}//${window.location.hostname}`}):n=oe(),(0,h.A2)("Unexpected session state",{sessionStoreStrategyType:e.type,session:n,isSyntheticsTest:$t(),createdTimestamp:null==n?void 0:n.created,expireTimestamp:null==n?void 0:n.expire,...r})}(t).catch(()=>{}),{id:"invalid",trackingType:"0",isReplayForced:!1,anonymousId:void 0})}return o.observable.subscribe(()=>{o.isGranted()?c.expandOrRenewSession():c.expire(!1)}),function(t){const{stop:e}=(0,J.l)(t,window,["click","touchstart","keydown","scroll"],()=>{o.isGranted()&&c.expandOrRenewSession()},{capture:!0,passive:!0});qo.push(e)}(t),function(t){const e=()=>{"visible"===document.visibilityState&&c.expandSession()},{stop:n}=(0,J.q)(t,document,"visibilitychange",e);qo.push(n);const r=(0,st.yb)(e,zo);qo.push(()=>{(0,st.vG)(r)})}(t),function(t){const{stop:e}=(0,J.q)(t,window,"resume",()=>c.restartSession(),{capture:!0});qo.push(e)}(t),{findSession(t,e){return u.find(t,e)},renewObservable:i,expireObservable:a,sessionStateUpdateObservable:c.sessionStateUpdateObservable,expire:c.expire,updateSessionState:c.updateSessionState}}(t,"rum",e=>function(t,e){return"0"===(n=e)||"1"===n||"2"===n?e:(0,zt.ic)(t.sessionSampleRate)?(0,zt.ic)(t.sessionReplaySampleRate)?"1":"2":"0";var n}(t,e),n);return o.expireObservable.subscribe(()=>{e.notify(9)}),o.renewObservable.subscribe(()=>{e.notify(10)}),o.sessionStateUpdateObservable.subscribe(({previousState:t,newState:e})=>{if(!t.forcedReplay&&e.forcedReplay){const t=o.findSession();t&&(t.isReplayForced=!0)}}),{findTrackedSession(t){const e=o.findSession(t);if(e&&"0"!==e.trackingType)return{id:e.id,sessionReplay:"1"===e.trackingType?1:e.isReplayForced?2:0,anonymousId:e.anonymousId}},expire:o.expire,expireObservable:o.expireObservable,setForcedReplay(){return o.updateSessionState({forcedReplay:"1"})}}}(t,w,d);if((0,wt.d0)())!function(t){const e=(0,wt.Y9)();t.subscribe(13,t=>{e.send("rum",t)})}(w);else{const e=function(t,e,n,r,o,i){const s=[t.rumEndpointBuilder];t.replica&&s.push(t.replica.rumEndpointBuilder);const a=(0,Fo.sA)(s,n),c=(0,Wo.X)({encoder:i(2),request:a,flushController:(0,Go.tO)({pageMayExitObservable:r,sessionExpireObservable:o})});return r.subscribe(()=>{a.sendQueuedOnExit()}),e.subscribe(13,t=>{t.type===O.VIEW?c.upsert(t,t.view.id):c.add(t)}),c}(t,w,S,E,A.expireObservable,c);_.push(()=>e.stop()),function(t,e,n){t.metricsEnabled&&(ei(),Qo=!1,e.subscribe(13,()=>{Qo=!0}),n.subscribe(({bytesCount:t,messagesCount:e})=>{Qo&&(Qo=!1,Yo.batchCount+=1,ti(Yo.batchBytesCount,t),ti(Yo.batchMessagesCount,e))}),(0,st.yb)(Xo,Jo))}(T,w,e.flushController.flushObservable)}!function(t,e){t.register(1,()=>e.isGranted()?it.$O:it.ug)}(k,d);const{stop:C}=function(t,e){if(!e.metricsEnabled)return{stop:kt.l};const{unsubscribe:n}=t.subscribe(4,({initialViewMetrics:t})=>{var e,r;t.largestContentfulPaint&&t.navigationTimings&&((0,h.Gk)("Initial view metrics",{metrics:(e=t.largestContentfulPaint,r=t.navigationTimings,{lcp:{value:e.value},navigation:{domComplete:r.domComplete,domContentLoaded:r.domContentLoaded,domInteractive:r.domInteractive,firstByte:r.firstByte,loadEvent:r.loadEvent}})}),n())});return{stop:n}}(w,T);_.push(C);const{stop:I,...V}=function(t,e,n,o,c,d,f,p,h,g){const _=[],w=function(){const t=Xe();return new r.cP(e=>{if(!t)return;const n=new t((0,m.dm)(t=>e.notify(t)));return n.observe(document,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),()=>n.disconnect()})}(),k=function(t,e){let n=(0,Y.yG)(e);return new r.cP(r=>{const{stop:o}=function(t,e){const{stop:n}=(0,i.H)(Ho("pushState"),"pushState",({onPostCall:t})=>{t(e)}),{stop:r}=(0,i.H)(Ho("replaceState"),"replaceState",({onPostCall:t})=>{t(e)}),{stop:o}=(0,J.q)(t,window,"popstate",e);return{stop(){n(),r(),o()}}}(t,a),{stop:s}=function(t,e){return(0,J.q)(t,window,"hashchange",e)}(t,a);function a(){if(n.href===e.href)return;const t=(0,Y.yG)(e);r.notify({newLocation:t,oldLocation:n}),n=t}return()=>{o(),s()}})}(n,location),{observable:S,stop:E}=function(){const t=new r.cP,{stop:e}=(0,i.H)(window,"open",()=>t.notify());return{observable:t,stop:e}}();_.push(E),function(t,e,n){t.register(0,({eventType:t})=>{const r=e.source;return{type:t,_kubesense:{format_version:2,drift:(0,s.TP)(),configuration:{session_sample_rate:(0,zt.LI)(e.sessionSampleRate,3),session_replay_sample_rate:(0,zt.LI)(e.sessionReplaySampleRate,3),profiling_sample_rate:(0,zt.LI)(e.profilingSampleRate,3),trace_sample_rate:(0,zt.LI)(e.traceSampleRate,3),beta_encode_cookie_options:e.betaEncodeCookieOptions},browser_sdk_version:(0,wt.d0)()?"1.4.0":void 0,sdk_name:n},application:{id:e.applicationId},date:(0,s.nx)(),source:r}}),t.register(1,()=>({application:{id:e.applicationId}}))}(e,n,h);const x=function(t,e,n=500){const r=dt({expireDelay:ni,maxEntries:4e3});let o;$n(Vn.VISIBILITY_STATE)&&performance.getEntriesByType(Vn.VISIBILITY_STATE).forEach(t=>{a("hidden"===t.name?"hidden":"active",t.startTime)}),a(oi(),(0,s.$S)());const{stop:i}=(0,J.l)(e,window,["pageshow","focus","blur","visibilitychange","resume","freeze","pagehide"],t=>{a(function(t){return"freeze"===t.type?"frozen":"pagehide"===t.type?t.persisted?"frozen":"terminated":oi()}(t),t.timeStamp)},{capture:!0});function a(t,e=(0,s.$S)()){t!==o&&(o=t,r.closeActive(e),r.add({state:o,startTime:e},e))}function c(t,e,n){return r.findAll(e,n).some(e=>e.state===t)}return t.register(0,({startTime:t,duration:e=0,eventType:o})=>o===O.VIEW?{type:o,_kubesense:{page_states:ri(r.findAll(t,e),t,n)}}:o===O.ACTION||o===O.ERROR?{type:o,view:{in_foreground:c("active",t,0)}}:it.$O),{wasInPageStateDuringPeriod:c,addPageState:a,stop(){i(),r.stop()}}}(e,n);_.push(()=>x.stop());const T=function(t){const e=dt({expireDelay:en});return t.subscribe(1,t=>{e.add(function(t){return{service:t.service,version:t.version,context:t.context,id:t.id,name:t.name,startClocks:t.startClocks}}(t),t.startClocks.relative)}),t.subscribe(6,({endClocks:t})=>{e.closeActive(t.relative)}),t.subscribe(3,t=>{const n=e.find(t.startClocks.relative);n&&(t.name&&(n.name=t.name),t.context&&(n.context=t.context),n.sessionIsActive=t.sessionIsActive)}),t.subscribe(10,()=>{e.reset()}),{findView(t){return e.find(t)},stop(){e.stop()}}}(t);_.push(()=>T.stop());const A=function(t,e,n,r){const o=dt({expireDelay:Zo});let i;t.subscribe(1,({startClocks:t})=>{const e=r.href;o.add(c({url:e,referrer:i||document.referrer}),t.relative),i=e}),t.subscribe(6,({endClocks:t})=>{o.closeActive(t.relative)});const a=n.subscribe(({newLocation:t})=>{const e=o.find();if(e){const n=(0,s.$S)();o.closeActive(n),o.add(c({url:t.href,referrer:e.referrer}),n)}});function c({url:t,referrer:e}){return{url:t,referrer:e}}return e.register(0,({startTime:t,eventType:e})=>{const n=o.find(t);return n?{type:e,view:{url:n.url,referrer:n.referrer}}:it.ug}),{findUrl(t){return o.find(t)},stop(){a.unsubscribe(),o.stop()}}}(t,e,k,location);_.push(()=>A.stop());const C=function(t,e,n){const r=dt({expireDelay:Ko});return t.subscribe(1,({startClocks:t})=>{r.add({},t.relative)}),t.subscribe(6,({endClocks:t})=>{r.closeActive(t.relative)}),e.register(0,({startTime:t,eventType:e})=>{if(!n.trackFeatureFlagsForEvents.concat([O.VIEW,O.ERROR]).includes(e))return it.$O;const o=r.find(t);return!o||(0,Y.RI)(o)?it.$O:{type:e,feature_flags:o}}),{addFeatureFlagEvaluation(t,e){const n=r.find();n&&(n[t]=e)}}}(t,e,n);(function(t,e,n,r){t.register(0,({eventType:t,startTime:o})=>{const i=e.findTrackedSession(o),s=r.findView(o);if(!i||!s)return it.ug;let a,c,u;return t===O.VIEW?(a=!!n.getReplayStats(s.id)||void 0,c=1===i.sessionReplay,u=!!s.sessionIsActive&&void 0):a=!!n.isRecording()||void 0,{type:t,session:{id:i.id,type:"user",has_replay:a,sampled_for_replay:c,is_active:u}}}),t.register(1,({startTime:t})=>{const n=e.findTrackedSession(t);return n?{session:{id:n.id}}:it.$O})})(e,o,c,T),function(t){t.register(0,({eventType:t})=>({type:t,connectivity:(0,bi.q)()}))}(e),function(t){let e=function(){const t=Si();if(!t)return;const e=wi(t.brands);return e?{browser:{name:e.brand,version:e.version}}:void 0}();(function(){const t=Si();return t&&"function"==typeof t.getHighEntropyValues?t.getHighEntropyValues(["fullVersionList","platformVersion","model","architecture","bitness"]).then(e=>{var n,r;const o={},i=null!==(n=wi(e.fullVersionList))&&void 0!==n?n:wi(t.brands);i&&(o.browser={name:i.brand,version:i.version});const s=null!==(r=e.platformVersion)&&void 0!==r?r:"",a=t.platform||e.platform||"";s&&a&&(o.os={name:a,version:s,version_major:ki(s)});const c=e.model||"",u=e.architecture||"";return(c||u||t.mobile)&&(o.device={type:t.mobile?"mobile":"desktop",model:c||void 0,architecture:u||void 0}),o}).catch(()=>{}):Promise.resolve(void 0)})().then(t=>{t&&(e=t)}),t.register(0,({eventType:t})=>e?{type:t,...e.browser&&{browser:e.browser},...e.os&&{os:e.os},...e.device&&{device:e.device}}:{type:t})}(e);const I=function(t,e){const n=ot();return e.storeContextsAcrossPages&&X(e,n,"rum",2),t.register(0,()=>({context:n.getContext()})),n}(e,n),V=function(t,e,n,r){const o=bt();if(e.storeContextsAcrossPages&&X(e,o,r,1),n.expire){const t=o.getContext().id,e=function(t){try{return localStorage.getItem(vt(t))||void 0}catch(t){return}}(r),i=void 0!==t?t+"":void 0;void 0!==e&&void 0!==i&&e!==i&&n.expire(),yt(r,null!=i?i:e);let s=null!=i?i:e;o.changeObservable.subscribe(()=>{const t=o.getContext().id,e=void 0!==t?t+"":void 0;e!==s&&(n.expire(),yt(r,e)),s=e})}const i=dt({expireDelay:ft});return i.add(o.getContext(),(0,s.Oc)().relative),o.changeObservable.subscribe(()=>{const t=(0,s.$S)();i.closeActive(t),i.add(o.getContext(),t)}),t.register(0,({eventType:t,startTime:r})=>{const s=i.find(r),a=s?(0,v.Go)(s):o.getContext(),c=n.findTrackedSession(r);return c&&c.anonymousId&&!a.anonymous_id&&e.trackAnonymousUser&&(a.anonymous_id=c.anonymousId),(0,Y.RI)(a)?it.$O:{type:t,usr:a}}),t.register(1,({startTime:t})=>{var e;return{anonymous_id:null===(e=n.findTrackedSession(t))||void 0===e?void 0:e.anonymousId}}),o}(e,n,o,"rum"),M=function(t,e){const n=_t();return e.storeContextsAcrossPages&&X(e,n,"rum",4),t.register(0,()=>{const t=n.getContext();return(0,Y.RI)(t)||!t.id?it.$O:{account:t}}),n}(e,n),U=function(t,e,n,r,o){const{unsubscribe:i}=t.subscribe(0,e=>{t.notify(12,Wr(e))});e.register(0,({startTime:t,eventType:e})=>{if(e!==O.ERROR&&e!==O.RESOURCE&&e!==O.LONG_TASK)return it.$O;const n=s.findActionId(t);return n?{type:e,action:{id:n}}:it.$O}),e.register(1,({startTime:t})=>({action:{id:s.findActionId(t)}}));let s={findActionId:kt.l},a=kt.l;return o.trackUserInteractions&&({actionContexts:s,stop:a}=jr(t,n,r,o)),{addAction(e){t.notify(12,Wr(e))},actionContexts:s,stop(){i(),a()}}}(t,e,w,S,n);_.push(U.stop);const $=function(t){return{addEvent(e,n,r,o){xi.includes(n.type)&&t.notify(12,{startTime:e,rawRumEvent:n,domainContext:r,duration:o})}}}(t),B=function(t,e){let n;const r=requestAnimationFrame((0,m.dm)(()=>{n=Lo()})),o=Po(e).subscribe(t=>{n=t}).unsubscribe;return t.register(0,({eventType:t})=>({type:t,display:n?{viewport:n}:void 0})),{stop(){o(),r&&cancelAnimationFrame(r)}}}(e,n);_.push(B.stop);const q=function(t,e,n=function(t,e){const n=window.cookieStore?function(t){return(e,n)=>(0,J.q)(t,window.cookieStore,"change",t=>{const r=t.changed.find(t=>t.name===e)||t.deleted.find(t=>t.name===e);r&&n(r.value)}).stop}(t):si;return new r.cP(t=>n(e,e=>t.notify(e)))}(t,ai)){var o;let i=Nt(ai)||(null===(o=window.Cypress)||void 0===o?void 0:o.env("traceId"));const s=n.subscribe(t=>{i=t});return e.register(0,({eventType:t})=>"string"!=typeof i?it.$O:{type:t,session:{type:"ci_test"},ci_test:{test_execution_id:i}}),{stop(){s.unsubscribe()}}}(n,e);_.push(q.stop),function(t){t.register(0,({eventType:t})=>$t()?{type:t,session:{type:"synthetics"},synthetics:{test_id:Mt(),result_id:Ut(),injected:Vt()}}:it.$O)}(e),function(t,e,n,r,o){yi={[O.VIEW]:{"view.performance.lcp.resource_url":"string",...gi,...hi,...vi},[O.ERROR]:{"error.message":"string","error.stack":"string","error.resource.url":"string","error.fingerprint":"string",...gi,...hi,...vi},[O.RESOURCE]:{"resource.url":"string","resource.graphql.variables":"string",...gi,...hi,...vi},[O.ACTION]:{"action.target.name":"string",...gi,...hi,...vi},[O.LONG_TASK]:{"long_task.scripts[].source_url":"string","long_task.scripts[].invoker":"string",...gi,...hi,...vi},[O.VITAL]:{...gi,...hi,...vi}};const i={[O.ERROR]:li(O.ERROR,r,o),[O.ACTION]:li(O.ACTION,r,o),[O.VITAL]:li(O.VITAL,r,o)};e.subscribe(12,({startTime:r,duration:o,rawRumEvent:s,domainContext:a})=>{const c=n.triggerHook(0,{eventType:s.type,startTime:r,duration:o});if(c===it.ug)return;const u=(0,v.kg)(c,s,{ddtags:(0,di.m5)(t).join(",")});(function(t,e,n,r){var o;if(e){const r=fi(t,yi[t.type],t=>e(t,n));if(!1===r&&t.type!==O.VIEW)return!1;!1===r&&R.Vy.warn("Can't dismiss view events using beforeSend!")}return!(null===(o=r[t.type])||void 0===o?void 0:o.isLimitReached())})(u,t.beforeSend,a,i)&&((0,Y.RI)(u.context)&&delete u.context,e.notify(13,u))})}(n,t,e,g);const{addTiming:Z,startView:H,setViewName:K,setViewContext:Q,setViewContextProperty:tt,getViewContext:et,stop:nt}=function(t,e,n,o,i,a,c,u,l,d){return t.subscribe(4,e=>t.notify(12,function(t,e,n){var r,o,i,a,c,u,l,d,f,p,m,h,g,v,y,b,_,w;const k=n.getReplayStats(t.id),S=null===(o=null===(r=t.commonViewMetrics)||void 0===r?void 0:r.cumulativeLayoutShift)||void 0===o?void 0:o.devicePixelRatio,E={_kubesense:{document_version:t.documentVersion,replay_stats:k,cls:S?{device_pixel_ratio:S}:void 0,configuration:{start_session_replay_recording_manually:e.startSessionReplayRecordingManually}},date:t.startClocks.timeStamp,type:O.VIEW,view:{action:{count:t.eventCounts.actionCount},frustration:{count:t.eventCounts.frustrationCount},cumulative_layout_shift:null===(i=t.commonViewMetrics.cumulativeLayoutShift)||void 0===i?void 0:i.value,cumulative_layout_shift_time:(0,s.Zj)(null===(a=t.commonViewMetrics.cumulativeLayoutShift)||void 0===a?void 0:a.time),cumulative_layout_shift_target_selector:null===(c=t.commonViewMetrics.cumulativeLayoutShift)||void 0===c?void 0:c.targetSelector,first_byte:(0,s.Zj)(null===(u=t.initialViewMetrics.navigationTimings)||void 0===u?void 0:u.firstByte),dom_complete:(0,s.Zj)(null===(l=t.initialViewMetrics.navigationTimings)||void 0===l?void 0:l.domComplete),dom_content_loaded:(0,s.Zj)(null===(d=t.initialViewMetrics.navigationTimings)||void 0===d?void 0:d.domContentLoaded),dom_interactive:(0,s.Zj)(null===(f=t.initialViewMetrics.navigationTimings)||void 0===f?void 0:f.domInteractive),error:{count:t.eventCounts.errorCount},first_contentful_paint:(0,s.Zj)(t.initialViewMetrics.firstContentfulPaint),first_input_delay:(0,s.Zj)(null===(p=t.initialViewMetrics.firstInput)||void 0===p?void 0:p.delay),first_input_time:(0,s.Zj)(null===(m=t.initialViewMetrics.firstInput)||void 0===m?void 0:m.time),first_input_target_selector:null===(h=t.initialViewMetrics.firstInput)||void 0===h?void 0:h.targetSelector,interaction_to_next_paint:(0,s.Zj)(null===(g=t.commonViewMetrics.interactionToNextPaint)||void 0===g?void 0:g.value),interaction_to_next_paint_time:(0,s.Zj)(null===(v=t.commonViewMetrics.interactionToNextPaint)||void 0===v?void 0:v.time),interaction_to_next_paint_target_selector:null===(y=t.commonViewMetrics.interactionToNextPaint)||void 0===y?void 0:y.targetSelector,is_active:t.isActive,name:t.name,largest_contentful_paint:(0,s.Zj)(null===(b=t.initialViewMetrics.largestContentfulPaint)||void 0===b?void 0:b.value),largest_contentful_paint_target_selector:null===(_=t.initialViewMetrics.largestContentfulPaint)||void 0===_?void 0:_.targetSelector,load_event:(0,s.Zj)(null===(w=t.initialViewMetrics.navigationTimings)||void 0===w?void 0:w.loadEvent),loading_time:Pn((0,s.Zj)(t.commonViewMetrics.loadingTime)),loading_type:t.loadingType,long_task:{count:t.eventCounts.longTaskCount},performance:Do(t.commonViewMetrics,t.initialViewMetrics),resource:{count:t.eventCounts.resourceCount},time_spent:(0,s.Zj)(t.duration)},display:t.commonViewMetrics.scroll?{scroll:{max_depth:t.commonViewMetrics.scroll.maxDepth,max_depth_scroll_top:t.commonViewMetrics.scroll.maxDepthScrollTop,max_scroll_height:t.commonViewMetrics.scroll.maxScrollHeight,max_scroll_height_time:(0,s.Zj)(t.commonViewMetrics.scroll.maxScrollHeightTime)}}:void 0,privacy:{replay_level:e.defaultPrivacyLevel},device:{locale:navigator.language,locales:navigator.languages,time_zone:mo()}};return(0,Y.RI)(t.customTimings)||(E.view.custom_timings=(0,Y.LG)(t.customTimings,s.Zj)),{rawRumEvent:E,startTime:t.startClocks.relative,duration:t.duration,domainContext:{location:t.location}}}(e,n,u))),e.register(0,({startTime:t,eventType:e})=>{const n=l.findView(t);return n?{type:e,service:n.service,version:n.version,context:n.context,view:{id:n.id,name:n.name}}:it.ug}),e.register(1,({startTime:t})=>{var e;return{view:{id:null===(e=l.findView(t))||void 0===e?void 0:e.id}}}),function(t,e,n,o,i,a,c,u){const l=new Set;let d,f,p=h(N,(0,s.Oc)(),u);function h(a,c,u){const d=function(t,e,n,o,i,a,c=(0,s.M8)(),u){const l=z(),d=new r.cP,f={};let p,h=0;const g=(0,Y.yG)(i),v=rt();let y=!0,b=null==u?void 0:u.name;const _=(null==u?void 0:u.service)||o.service,w=(null==u?void 0:u.version)||o.version,k=null==u?void 0:u.context;k&&v.setContext(k);const S={id:l,name:b,startClocks:c,service:_,version:w,context:k};t.notify(1,S),t.notify(2,S);const{throttled:E,cancel:x}=(0,kt.n)(j,3e3,{leading:!1}),{setLoadEvent:T,setViewEnd:A,stop:C,stopINPTracking:I,getCommonViewMetrics:O}=function(t,e,n,o,i,a,c){const u={},{stop:l,setLoadEvent:d}=function(t,e,n,r,o,a){let c=o===N,l=!0;const d=[],f=vo(r,a);function p(){if(!l&&!c&&d.length>0){const e=Math.max(...d);e<f.timeStamp-a.relative&&(t=e,u.loadingTime=t,i())}var t}const{stop:m}=Zn(t,e,n,r,t=>{l&&(l=!1,t.hadActivity&&d.push((0,s.vk)(a.timeStamp,t.end)),p())});return{stop(){m(),f.stop()},setLoadEvent(t){c&&(c=!1,d.push(t),p())}}}(t,e,n,o,a,c),{stop:f}=function(t,e,n,o=function(t,e=Vo){return new r.cP(n=>{if(window.ResizeObserver){const r=(0,kt.n)(function(){n.notify(function(){const t=Oo(),{height:e}=Lo();return{scrollHeight:Math.round((document.scrollingElement||document.documentElement).scrollHeight),scrollDepth:Math.round(e+t),scrollTop:t}}())},e,{leading:!1,trailing:!0}),o=document.scrollingElement||document.documentElement,i=new ResizeObserver((0,m.dm)(r.throttled));o&&i.observe(o);const s=(0,J.q)(t,window,"scroll",r.throttled,{passive:!0});return()=>{r.cancel(),i.disconnect(),s.stop()}}})}(t)){let i=0,a=0,c=0;const u=o.subscribe(({scrollDepth:t,scrollTop:r,scrollHeight:o})=>{let u=!1;if(t>i&&(i=t,u=!0),o>a){a=o;const t=(0,s.$S)();c=(0,s.vk)(e.relative,t),u=!0}u&&n({maxDepth:Math.min(i,a),maxDepthScrollTop:r,maxScrollHeight:a,maxScrollHeightTime:c})});return{stop(){return u.unsubscribe()}}}(o,c,t=>{u.scroll=t}),{stop:p}=function(t,e,n){if(!$n(Vn.LAYOUT_SHIFT)||!("WeakRef"in window))return{stop:kt.l};let r,o=0;n({value:0});const i=function(){let t,e,n=0,r=0;return{update(o){let i;return void 0===t||o.startTime-e>=So||o.startTime-t>=ko?(t=e=o.startTime,r=n=o.value,i=!0):(n+=o.value,e=o.startTime,i=o.value>r,i&&(r=o.value)),{cumulatedValue:n,isMaxValue:i}}}}(),a=Mn(t,{type:Vn.LAYOUT_SHIFT,buffered:!0}).subscribe(a=>{var c;for(const u of a){if(u.hadRecentInput||u.startTime<e)continue;const{cumulatedValue:a,isMaxValue:l}=i.update(u);if(l){const t=_o(u.sources);r={target:(null==t?void 0:t.node)?new WeakRef(t.node):void 0,time:(0,s.vk)(e,u.startTime),previousRect:null==t?void 0:t.previousRect,currentRect:null==t?void 0:t.currentRect,devicePixelRatio:window.devicePixelRatio}}if(a>o){o=a;const e=null===(c=null==r?void 0:r.target)||void 0===c?void 0:c.deref();n({value:(0,zt.LI)(o,4),targetSelector:e&&er(e,t.actionNameAttribute),time:null==r?void 0:r.time,previousRect:(null==r?void 0:r.previousRect)?wo(r.previousRect):void 0,currentRect:(null==r?void 0:r.currentRect)?wo(r.currentRect):void 0,devicePixelRatio:null==r?void 0:r.devicePixelRatio})}}});return{stop(){a.unsubscribe()}}}(o,c.relative,t=>{u.cumulativeLayoutShift=t,i()}),{stop:h,getInteractionToNextPaint:g,setViewEnd:v}=function(t,e,n){if(!($n(Vn.EVENT)&&window.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype))return{getInteractionToNextPaint(){},setViewEnd:kt.l,stop:kt.l};const{getViewInteractionCount:r,stopViewInteractionCount:o}=function(t){"interactionCount"in performance||Eo||(Eo=new window.PerformanceObserver((0,m.dm)(t=>{t.getEntries().forEach(t=>{const e=t;e.interactionId&&(To=Math.min(To,e.interactionId),Ao=Math.max(Ao,e.interactionId),xo=(Ao-To)/7+1)})})),Eo.observe({type:"event",buffered:!0,durationThreshold:0}));const e=t===N?0:Co();let n={stopped:!1};function r(){return Co()-e}return{getViewInteractionCount(){return n.stopped?n.interactionCount:r()},stopViewInteractionCount(){n={stopped:!0,interactionCount:r()}}}}(n);let i=1/0;const a=function(t){const e=[];function n(){e.sort((t,e)=>e.duration-t.duration).splice(10)}return{process(t){const r=e.findIndex(e=>t.interactionId===e.interactionId),o=e[e.length-1];-1!==r?t.duration>e[r].duration&&(e[r]=t,n()):(e.length<10||t.duration>o.duration)&&(e.push(t),n())},estimateP98Interaction(){const n=Math.min(e.length-1,Math.floor(t()/50));return e[n]}}}(r);let c,u,l=-1;function d(n){for(const t of n)t.interactionId&&t.startTime>=e&&t.startTime<=i&&a.process(t);const r=a.estimateP98Interaction();r&&r.duration!==l&&(l=r.duration,u=(0,s.vk)(e,r.startTime),c=function(t){const e=zr.get(t);return zr.delete(t),e}(r.startTime),!c&&r.target&&zn(r.target)&&(c=er(r.target,t.actionNameAttribute)))}const f=Mn(t,{type:Vn.FIRST_INPUT,buffered:!0}).subscribe(d),p=Mn(t,{type:Vn.EVENT,durationThreshold:40,buffered:!0}).subscribe(d);return{getInteractionToNextPaint(){return l>=0?{value:Math.min(l,Ro),targetSelector:c,time:u}:r()?{value:0}:void 0},setViewEnd(t){i=t,o()},stop(){p.unsubscribe(),f.unsubscribe()}}}(o,c.relative,a);return{stop(){l(),p(),f()},stopINPTracking:h,setLoadEvent:d,setViewEnd:v,getCommonViewMetrics:()=>(u.interactionToNextPaint=g(),u)}}(t,e,n,o,q,a,c),{stop:P,initialViewMetrics:V}=a===N?function(t,e,n,r){const o={},{stop:i}=function(t,e,n=ao){return function(t,e){let n;const{stop:r}=(0,no.H)(t,"complete",()=>{n=(0,st.wg)(()=>e())});return{stop(){r(),(0,st.DJ)(n)}}}(t,()=>{const t=n();(function(t){return t.loadEventEnd<=0})(t)||e(function(t){return{domComplete:t.domComplete,domContentLoaded:t.domContentLoadedEventEnd,domInteractive:t.domInteractive,loadEvent:t.loadEventEnd,firstByte:t.responseStart>0&&t.responseStart<=(0,s.$S)()?t.responseStart:void 0}}(t))})}(t,t=>{n(t.loadEvent),o.navigationTimings=t,r()}),a=vo(t,e),{stop:c}=function(t,e){return{stop:Mn(t,{type:Vn.PAINT,buffered:!0}).subscribe(t=>{const n=t.find(t=>"first-contentful-paint"===t.name&&t.startTime<e.timeStamp&&t.startTime<ho);var i;n&&(i=n.startTime,o.firstContentfulPaint=i,r())}).unsubscribe}}(t,a),{stop:u}=function(t,e,n){let i=1/0;const{stop:s}=(0,J.l)(t,n,["pointerdown","keydown"],t=>{i=t.timeStamp},{capture:!0,once:!0});let a=0;const c=Mn(t,{type:Vn.LARGEST_CONTENTFUL_PAINT,buffered:!0}).subscribe(n=>{const s=(0,jt.Uk)(n,t=>t.entryType===Vn.LARGEST_CONTENTFUL_PAINT&&t.startTime<i&&t.startTime<e.timeStamp&&t.startTime<go&&t.size>a);if(s){let e;s.element&&(e=er(s.element,t.actionNameAttribute)),c={value:s.startTime,targetSelector:e,resourceUrl:(u=s,""===u.url?void 0:u.url)},o.largestContentfulPaint=c,r(),a=s.size}var c,u});return{stop(){s(),c.unsubscribe()}}}(t,a,window),{stop:l}=function(t,e){const n=Mn(t,{type:Vn.FIRST_INPUT,buffered:!0}).subscribe(n=>{const i=n.find(t=>t.startTime<e.timeStamp);if(i){const e=(0,s.vk)(i.startTime,i.processingStart);let n;i.target&&zn(i.target)&&(n=er(i.target,t.actionNameAttribute)),a={delay:e>=0?e:0,time:i.startTime,targetSelector:n},o.firstInput=a,r()}var a});return{stop(){n.unsubscribe()}}}(t,a);return{stop(){i(),c(),u(),l(),a.stop()},initialViewMetrics:o}}(o,c,T,q):{stop:kt.l,initialViewMetrics:{}};a===L&&function(t,e,n){var r,o;r=t.relative,o=t=>{e.firstContentfulPaint=t,e.largestContentfulPaint={value:t},n()},requestAnimationFrame(()=>{requestAnimationFrame(()=>{o((0,s.vk)(r,(0,s.$S)()))})})}(c,V,q);const{stop:M,eventCounts:U}=function(t,e,n){const{stop:r,eventCounts:o}=Ln({lifeCycle:t,isChildEvent:t=>t.view.id===e,onChange:n});return{stop:r,eventCounts:o}}(t,l,q),$=(0,st.yb)(j,Mo),D=t.subscribe(11,t=>{t.reason===Ye.y5.UNLOADING&&j(!0)});function B(){t.notify(3,{id:l,name:b,context:v.getContext(),startClocks:c,sessionIsActive:y})}function q(){B(),E()}function j(e=!1){x(),B(),h+=1;const n=void 0===p?(0,s.nx)():p.timeStamp;t.notify(4,{customTimings:f,documentVersion:h,id:l,name:b,service:_,version:w,context:v.getContext(),loadingType:a,location:g,startClocks:c,commonViewMetrics:O(),initialViewMetrics:V,duration:(0,s.vk)(c.timeStamp,n),isActive:!e&&void 0===p,sessionIsActive:y,eventCounts:U})}return j(),v.changeObservable.subscribe(q),{get name(){return b},service:_,version:w,contextManager:v,stopObservable:d,end(e={}){var n,r;p||(p=null!==(n=e.endClocks)&&void 0!==n?n:(0,s.M8)(),y=null===(r=e.sessionIsActive)||void 0===r||r,t.notify(5,{endClocks:p}),t.notify(6,{endClocks:p}),(0,st.vG)($),A(p.relative),C(),D.unsubscribe(),j(),(0,st.wg)(()=>{this.stop()},Uo))},stop(){P(),M(),I(),d.notify()},addTiming(t,e){if(p)return;const n=(0,s.pu)(e)?e:(0,s.vk)(c.timeStamp,e);f[function(t){const e=t.replace(/[^a-zA-Z0-9-_.@$]/g,"_");return e!==t&&R.Vy.warn(`Invalid timing name: ${t}, sanitized to: ${e}`),e}(t)]=n,q()},setViewName(t){b=t,j()}}}(e,n,o,i,t,a,c,u);return l.add(d),d.stopObservable.subscribe(()=>{l.delete(d)}),d}return e.subscribe(10,()=>{p=h(P,void 0,{name:p.name,service:p.service,version:p.version,context:p.contextManager.getContext()})}),e.subscribe(9,()=>{p.end({sessionIsActive:!1})}),c&&(f=function(t){return t.subscribe(({oldLocation:t,newLocation:e})=>{var n,r;r=e,((n=t).pathname!==r.pathname||!function(t){const e=t.substring(1);return""!==e&&!!document.getElementById(e)}(r.hash)&&$o(r.hash)!==$o(n.hash))&&(p.end(),p=h(P))})}(a),i.trackBfcacheViews&&(d=function(t){const{stop:e}=(0,J.q)(t,window,"pageshow",t=>{t.persisted&&(t=>{p.end();const e=(0,s.FR)(t.timeStamp);p=h(L,e,void 0)})(t)},{capture:!0});return e}(i))),{addTiming(t,e=(0,s.nx)()){p.addTiming(t,e)},startView(t,e){p.end({endClocks:e}),p=h(P,e,t)},setViewContext(t){p.contextManager.setContext(t)},setViewContextProperty(t,e){p.contextManager.setContextProperty(t,e)},setViewName(t){p.setViewName(t)},getViewContext(){return p.contextManager.getContext()},stop(){f&&f.unsubscribe(),d&&d(),p.end(),l.forEach(t=>t.stop())}}}(o,t,i,a,n,c,!n.trackViewsManually,d)}(t,e,n,location,w,S,k,c,T,d);_.push(nt);const{stop:at}=uo(t,n,x);_.push(at);const{stop:ct,longTaskContexts:ut}=function(t,e){const n=dt({expireDelay:ci}),r=$n(Vn.LONG_ANIMATION_FRAME)?Vn.LONG_ANIMATION_FRAME:Vn.LONG_TASK,o=Mn(e,{type:r,buffered:!0}).subscribe(o=>{for(const i of o){if(!e.trackLongTasks)break;const o=(0,s.FR)(i.startTime),a=z(),c=ui(i,o,a);t.notify(12,{rawRumEvent:c,startTime:o.relative,duration:i.duration,domainContext:{performanceEntry:i}}),n.add({id:a,startClocks:o,duration:i.duration,entryType:r},o.relative),n.closeActive((0,s.Gw)(o.relative,i.duration))}}),i={findLongTasks(t){return n.findAll(t)}};return{stop(){o.unsubscribe(),n.stop()},longTaskContexts:i}}(t,n);_.push(ct);const{addError:lt}=function(t,e,n){const o=new r.cP;return n.subscribe(t=>{0===t.type&&o.notify(t.error)}),function(t){(function(t){const e=t.map(t=>(Hr[t]||(Hr[t]=function(t){return new r.cP(e=>{const n=R.JZ[t];return R.JZ[t]=(...r)=>{n.apply(console,r);const o=(0,y.uC)("console error");(0,m.um)(()=>{e.notify(function(t,e,n){const r=t.map(t=>function(t){return"string"==typeof t?(0,b.a)(t):(0,u.bJ)(t)?(0,y.NR)((0,a.T)(t)):(0,Zr.s)((0,b.a)(t),void 0,2)}(t)).join(" ");if(e===R.bP.error){const o=t.find(u.bJ),i=(0,u.As)({originalError:o,handlingStack:n,startClocks:(0,s.M8)(),source:l.g.CONSOLE,handling:"handled",nonErrorPrefix:"Provided",useFallbackStack:!1});return i.message=r,{api:e,message:r,handlingStack:n,error:i}}return{api:e,message:r,error:void 0,handlingStack:n}}(r,t,o))})},()=>{R.JZ[t]=n}})}(t)),Hr[t]));return(0,r.Fx)(...e)})([R.bP.error]).subscribe(e=>t.notify(e.error))}(o),function(t,e){(function(t,e){const n=[];e.includes(Kr)&&n.push(function(t){return new r.cP(e=>{const{stop:n}=(0,J.q)(t,document,"securitypolicyviolation",t=>{e.notify(function(t){const e=`'${t.blockedURI}' blocked by '${t.effectiveDirective}' directive`;return Jr({type:t.effectiveDirective,message:`${Kr}: ${e}`,originalError:t,csp:{disposition:t.disposition},stack:Yr(t.effectiveDirective,t.originalPolicy?`${e} of the policy "${j(t.originalPolicy,100,"...")}"`:"no policy",t.sourceFile,t.lineNumber,t.columnNumber)})}(t))});return n})}(t));const o=e.filter(t=>t!==Kr);return o.length&&n.push(function(t){return new r.cP(e=>{if(!window.ReportingObserver)return;const n=(0,m.dm)((t,n)=>t.forEach(t=>e.notify(function(t){const{type:e,body:n}=t;return Jr({type:n.id,message:`${e}: ${n.message}`,originalError:t,stack:Yr(n.id,n.message,n.sourceFile,n.lineNumber,n.columnNumber)})}(t)))),r=new window.ReportingObserver(n,{types:t,buffered:!0});return r.observe(),()=>{r.disconnect()}})}(o)),(0,r.Fx)(...n)})(t,[Kr,"intervention"]).subscribe(t=>e.notify(t))}(e,o),o.subscribe(e=>t.notify(14,{error:e})),function(t){return t.subscribe(14,({error:e})=>{t.notify(12,function(t){const e={date:t.startClocks.timeStamp,error:{id:z(),message:t.message,source:t.source,stack:t.stack,handling_stack:t.handlingStack,component_stack:t.componentStack,type:t.type,handling:t.handling,causes:t.causes,source_type:"browser",fingerprint:t.fingerprint,csp:t.csp},_kubesense:{discarded:!1},type:O.ERROR,context:t.context},n={error:t.originalError,handlingStack:t.handlingStack};return{rawRumEvent:e,startTime:t.startClocks.relative,domainContext:n}}(e))}),{addError({error:e,handlingStack:n,componentStack:r,startClocks:o,context:i}){const s=(0,u.As)({originalError:e,handlingStack:n,componentStack:r,startClocks:o,nonErrorPrefix:"Provided",source:l.g.CUSTOM,handling:"handled"});s.context=(0,v.kg)(s.context,i),t.notify(14,{error:s})}}}(t)}(t,n,p);!function(t,e,n,o,a){const c=function(t,e,n,r){return{clearTracingIfNeeded:Ie,traceFetch:o=>Oe(t,o,e,n,r,t=>{var e;if(o.input instanceof Request&&!(null===(e=o.init)||void 0===e?void 0:e.headers))o.input=new Request(o.input),Object.keys(t).forEach(e=>{o.input.headers.append(e,t[e])});else{o.init=(0,Y.yG)(o.init);const e=[];o.init.headers instanceof Headers?o.init.headers.forEach((t,n)=>{e.push([n,t])}):Array.isArray(o.init.headers)?o.init.headers.forEach(t=>{e.push(t)}):o.init.headers&&Object.keys(o.init.headers).forEach(t=>{e.push([t,o.init.headers[t]])}),o.init.headers=e.concat((0,jt.WP)(t))}}),traceXhr:(o,i)=>Oe(t,o,e,n,r,t=>{Object.keys(t).forEach(e=>{i.setRequestHeader(e,t[e])})})}}(e,n,o,a);!function(t,e,n){(function(t){return nn||(nn=function(t){return new r.cP(e=>{const{stop:n}=(0,i.H)(XMLHttpRequest.prototype,"open",on),{stop:r}=(0,i.H)(XMLHttpRequest.prototype,"send",n=>{!function({target:t,parameters:[e],handlingStack:n},r,o){const a=rn.get(t);if(!a)return;const c=a;c.state="start",c.startClocks=(0,s.M8)(),c.isAborted=!1,c.xhr=t,c.handlingStack=n,c.requestBody=e;let u=!1;const{stop:l}=(0,i.H)(t,"onreadystatechange",()=>{t.readyState===XMLHttpRequest.DONE&&d()}),d=()=>{if(f(),l(),u)return;u=!0;const e=a;e.state="complete",e.duration=(0,s.vk)(c.startClocks.timeStamp,(0,s.nx)()),e.status=t.status,"string"==typeof t.response&&(e.responseBody=t.response),o.notify((0,Y.yG)(e))},{stop:f}=(0,J.q)(r,t,"loadend",d);o.notify(c)}(n,t,e)},{computeHandlingStack:!0}),{stop:o}=(0,i.H)(XMLHttpRequest.prototype,"abort",sn);return()=>{n(),r(),o()}})}(t)),nn})(e).subscribe(e=>{const r=e;if(En(r.url))switch(r.state){case"start":n.traceXhr(r,r.xhr),r.requestIndex=Nn(),t.notify(7,{requestIndex:r.requestIndex,url:r.url});break;case"complete":n.clearTracingIfNeeded(r),t.notify(8,{duration:r.duration,method:r.method,requestIndex:r.requestIndex,spanId:r.spanId,startClocks:r.startClocks,status:r.status,traceId:r.traceId,traceSampled:r.traceSampled,type:dn,url:r.url,xhr:r.xhr,isAborted:r.isAborted,handlingStack:r.handlingStack,requestBody:r.requestBody,responseBody:r.responseBody})}})}(t,e,c),function(t,e,n){At({responseBodyAction(t){var n;return(null===(n=In(t.url,e))||void 0===n?void 0:n.trackResponseErrors)?2:1}}).subscribe(e=>{var r;const o=e;if(En(o.url))switch(o.state){case"start":n.traceFetch(o),o.requestIndex=Nn(),t.notify(7,{requestIndex:o.requestIndex,url:o.url});break;case"resolve":n.clearTracingIfNeeded(o),t.notify(8,{duration:(0,s.vk)(o.startClocks.timeStamp,(0,s.nx)()),method:o.method,requestIndex:o.requestIndex,responseType:o.responseType,spanId:o.spanId,startClocks:o.startClocks,status:o.status,traceId:o.traceId,traceSampled:o.traceSampled,type:ln,url:o.url,response:o.response,init:o.init,input:o.input,isAborted:o.isAborted,handlingStack:o.handlingStack,requestBody:null===(r=o.init)||void 0===r?void 0:r.body,responseBody:o.responseBody})}})}(t,e,c)}(t,n,o,V,M);const pt=function(t,e,n){function r(n){(function(t){return!e.wasInPageStateDuringPeriod("frozen",t.startClocks.relative,t.duration)})(n)&&t.notify(12,G(n))}return{addOperationStepVital(e,n,r,o){if(!(0,D.sr)(D.R9.FEATURE_OPERATION_VITAL))return;const{operationKey:i,context:a,description:c}=r||{},u={name:e,type:"operation_step",operationKey:i,failureReason:o,stepType:n,startClocks:(0,s.M8)(),context:(0,b.a)(a),description:c};t.notify(12,G(u))},addDurationVital:r,startDurationVital(t,e={}){return F(n,t,e)},stopDurationVital(t,e={}){W(r,n,t,e)}}}(t,x,f),mt=function(t,e,n,r,o){return{get(i){const s=n.findView(i),a=o.findUrl(i),c=e.findTrackedSession(i);if(c&&s&&a){const e=r.findActionId(i);return{application_id:t,session_id:c.id,user_action:e?{id:e}:void 0,view:{id:s.id,name:s.name,referrer:a.referrer,url:a.url}}}}}}(n.applicationId,o,T,U.actionContexts,A);return{addAction:U.addAction,addEvent:$.addEvent,addError:lt,addTiming:Z,addFeatureFlagEvaluation:C.addFeatureFlagEvaluation,startView:H,setViewContext:Q,setViewContextProperty:tt,getViewContext:et,setViewName:K,viewHistory:T,getInternalContext:mt.get,startDurationVital:pt.startDurationVital,stopDurationVital:pt.stopDurationVital,addDurationVital:pt.addDurationVital,addOperationStepVital:pt.addOperationStepVital,globalContext:I,userContext:V,accountContext:M,longTaskContexts:ut,stop:()=>_.forEach(t=>t())}}(w,k,t,A,e,o,f,p,g,S);return _.push(I),p.unbuffer(),_.push(()=>n.stop()),{...V,lifeCycle:w,session:A,stopSession:()=>A.expire(),telemetry:T,stop(){_.forEach(t=>t())},hooks:k}}function Ai(t,{session:e,viewContext:n,errorType:r}){const o=e?e.id:"no-session-id",i=[];return void 0!==r&&i.push("error-type="+r),n&&(i.push("seed="+n.id),i.push("from="+n.startClocks.timeStamp)),`${function(t){const e=t.kubesenseRumEndpoint,n=t.subdomain;return`https://${n?n+".":""}${e}`}(t)}${"/rum/replay/sessions/"+o}?${i.join("&")}`}function Ci(t,e,n,r){const o=(0,Fo.sA)([t.profilingEndpointBuilder],t=>{e.notify(14,{error:t}),(0,h.A2)("Error reported to customer",{"error.message":t.message})}),i=n(r);return{async send({event:t,...e}){const n=new FormData,r=(0,Zr.s)(t);if(!r)throw Error("Failed to serialize event");n.append("event",new Blob([r],{type:"application/json"}),"event.json");let s=r.length;for(const[t,r]of(0,jt.WP)(e)){const e=(0,Zr.s)(r);if(!e)throw Error("Failed to serialize attachment");const o=await Ri(i,e);s+=o.outputBytesCount,n.append(t,new Blob([o.output]),t)}o.send({data:n,bytesCount:s})}}}function Ri(t,e){return new Promise(n=>{t.write(e),t.finish(t=>{n(t)})})}},262(t,e,n){n.d(e,{y:()=>o});var r=n(875);function o(t,e){return(...n)=>{try{return t(...n)}catch(t){r.Vy.error(e,t)}}}},275(t,e,n){n.d(e,{dX:()=>c,cP:()=>s,Fx:()=>a});var r=n(315),o=n(433);function i(t){var e;const n=null===(e=o.J2.queueMicrotask)||void 0===e?void 0:e.bind(o.J2);"function"==typeof n?n((0,r.dm)(t)):Promise.resolve().then((0,r.dm)(t))}class s{constructor(t){this.onFirstSubscribe=t,this.observers=[]}subscribe(t){return this.addObserver(t),{unsubscribe:()=>this.removeObserver(t)}}notify(t){this.observers.forEach(e=>e(t))}addObserver(t){this.observers.push(t),1===this.observers.length&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe(this)||void 0)}removeObserver(t){this.observers=this.observers.filter(e=>t!==e),!this.observers.length&&this.onLastUnsubscribe&&this.onLastUnsubscribe()}}function a(...t){return new s(e=>{const n=t.map(t=>t.subscribe(t=>e.notify(t)));return()=>n.forEach(t=>t.unsubscribe())})}class c extends s{constructor(t){super(),this.maxBufferSize=t,this.buffer=[]}notify(t){this.buffer.push(t),this.buffer.length>this.maxBufferSize&&this.buffer.shift(),super.notify(t)}subscribe(t){let e=!1;const n={unsubscribe:()=>{e=!0,this.removeObserver(t)}};return i(()=>{for(const n of this.buffer){if(e)return;t(n)}e||this.addObserver(t)}),n}unbuffer(){i(()=>{this.maxBufferSize=this.buffer.length=0})}}},295(t,e,n){function r(t){return t>=500}function o(t){try{return t.clone()}catch(t){return}}n.d(e,{G:()=>r,i:()=>o})},300(t,e,n){let r;function o(t){return u(t).segments_count}function i(t){u(t).segments_count+=1}function s(t){u(t).records_count+=1}function a(t,e){u(t).segments_total_raw_size+=e}function c(t){return null==r?void 0:r.get(t)}function u(t){let e;return r||(r=new Map),r.has(t)?e=r.get(t):(e={records_count:0,segments_count:0,segments_total_raw_size:0},r.set(t,e),r.size>1e3&&function(){if(!r)return;const t=r.keys().next().value;t&&r.delete(t)}()),e}n.d(e,{$1:()=>s,H5:()=>i,K_:()=>o,L7:()=>a,lv:()=>c})},314(t,e,n){n.d(e,{g:()=>r});const r={AGENT:"agent",CONSOLE:"console",CUSTOM:"custom",LOGGER:"logger",NETWORK:"network",SOURCE:"source",REPORT:"report"}},315(t,e,n){n.d(e,{Bd:()=>s,Dx:()=>l,dm:()=>c,oO:()=>d,pM:()=>a,um:()=>u});var r=n(875);let o,i=!1;function s(t){o=t}function a(t){i=t}function c(t){return function(...e){return u(t,this,e)}}function u(t,e,n){try{return t.apply(e,n)}catch(t){l(t)}}function l(t){if(d(t),o)try{o(t)}catch(t){d(t)}}function d(...t){i&&r.Vy.error("[MONITOR]",...t)}},322(t,e,n){n.d(e,{Z:()=>a,m:()=>s});var r=n(262),o=n(315),i=n(875);function s(t){const e={version:"1.4.0",onReady(t){t()},...t};return Object.defineProperty(e,"_setDebug",{get(){return o.pM},enumerable:!1}),e}function a(t,e,n){const o=t[e];o&&!o.q&&o.version&&i.Vy.warn("SDK is loaded more than once. This is unsupported and might have unexpected behavior."),t[e]=n,o&&o.q&&o.q.forEach(t=>(0,r.y)(t,"onReady callback threw an error:")())}},339(t,e,n){n.d(e,{$O:()=>i,XP:()=>s,ug:()=>o});var r=n(995);const o="DISCARDED",i="SKIPPED";function s(){const t={};return{register(e,n){return t[e]||(t[e]=[]),t[e].push(n),{unregister(){t[e]=t[e].filter(t=>t!==n)}}},triggerHook(e,n){const s=t[e]||[],a=[];for(const t of s){const e=t(n);if(e===o)return o;e!==i&&a.push(e)}return(0,r.kg)(...a)}}}},362(t,e,n){n.d(e,{Ww:()=>i,Y9:()=>o,d0:()=>s});var r=n(433);function o(){const t=(0,r.VZ)().KubsesenseEventBridge;if(t)return{getCapabilities(){var e;return JSON.parse((null===(e=t.getCapabilities)||void 0===e?void 0:e.call(t))||"[]")},getPrivacyLevel(){var e;return null===(e=t.getPrivacyLevel)||void 0===e?void 0:e.call(t)},getAllowedWebViewHosts(){return JSON.parse(t.getAllowedWebViewHosts())},send(e,n,r){const o=r?{id:r}:void 0;t.send(JSON.stringify({eventType:e,event:n,view:o}))}}}function i(t){const e=o();return!!e&&e.getCapabilities().includes(t)}function s(t){var e;void 0===t&&(t=null===(e=(0,r.VZ)().location)||void 0===e?void 0:e.hostname);const n=o();return!!n&&n.getAllowedWebViewHosts().some(e=>t===e||t.endsWith("."+e))}},416(t,e,n){n.d(e,{M:()=>i,s:()=>o});var r=n(474);function o(t,e,n){if("object"!=typeof t||null===t)return JSON.stringify(t);const r=i(Object.prototype),o=i(Array.prototype),s=i(Object.getPrototypeOf(t)),a=i(t);try{return JSON.stringify(t,e,n)}catch(t){return"<error: unable to serialize object>"}finally{r(),o(),s(),a()}}function i(t){const e=t,n=e.toJSON;return n?(delete e.toJSON,()=>{e.toJSON=n}):r.l}},433(t,e,n){function r(){if("object"==typeof globalThis)return globalThis;Object.defineProperty(Object.prototype,"_kubesense_temp_",{get(){return this},configurable:!0});let t=_kubesense_temp_;return delete Object.prototype._kubesense_temp_,"object"!=typeof t&&(t="object"==typeof self?self:"object"==typeof window?window:{}),t}n.d(e,{J2:()=>o,VZ:()=>r,Wq:()=>i});const o=r(),i="WorkerGlobalScope"in o},452(t,e,n){n.d(e,{WW:()=>s,_m:()=>r,iH:()=>o,wh:()=>a});const r=1024,o=1024*r,i=/[^\u0000-\u007F]/;function s(t){return i.test(t)?void 0!==window.TextEncoder?(new TextEncoder).encode(t).length:new Blob([t]).size:t.length}function a(t){if(1===t.length)return t[0];const e=t.reduce((t,e)=>t+e.length,0),n=new Uint8Array(e);let r=0;for(const e of t)n.set(e,r),r+=e.length;return n}},468(t,e,n){n.d(e,{NR:()=>a,Yn:()=>s,uC:()=>i});var r=n(315),o=n(511);function i(t){const e=Error(t);let n;return e.name="HandlingStack",(0,r.um)(()=>{const t=(0,o.T)(e);t.stack=t.stack.slice(2),n=s(t)}),n}function s(t){let e=a(t);return t.stack.forEach(t=>{const n="?"===t.func?"<anonymous>":t.func,r=t.args&&t.args.length>0?`(${t.args.join(", ")})`:"",o=t.line?":"+t.line:"",i=t.line&&t.column?":"+t.column:"";e+=`\n at ${n}${r} @ ${t.url}${o}${i}`}),e}function a(t){return`${t.name||"Error"}: ${t.message}`}},474(t,e,n){n.d(e,{l:()=>i,n:()=>o});var r=n(636);function o(t,e,n){const o=!n||void 0===n.leading||n.leading,i=!n||void 0===n.trailing||n.trailing;let s,a,c=!1;return{throttled(...n){c?s=n:(o?t(...n):s=n,c=!0,a=(0,r.wg)(()=>{i&&s&&t(...s),c=!1,s=void 0},e))},cancel(){(0,r.DJ)(a),c=!1,s=void 0}}}function i(){}},485(t,e,n){n.d(e,{m5:()=>o});var r=n(875);function o(t){const{env:e,service:n,version:r,datacenter:o,sdkVersion:s,variant:a}=t,c=[i("sdk_version",null!=s?s:"1.4.0")];return e&&c.push(i("env",e)),n&&c.push(i("service",n)),r&&c.push(i("version",r)),o&&c.push(i("datacenter",o)),a&&c.push(i("variant",a)),c}function i(t,e){const n=e?`${t}:${e}`:t;return(n.length>200||function(t){return!!function(){try{return RegExp("[\\p{Ll}]","u"),!0}catch(t){return!1}}()&&RegExp("[^\\p{Ll}\\p{Lo}0-9_:./-]","u").test(t)}(n))&&r.Vy.warn(`Tag ${n} doesn't meet tag requirements and will be sanitized. ${r.xG} ${r.fH}/getting_started/tagging/#defining-tags`),function(t){return t.replace(/,/g,"_")}(n)}},489(t,e,n){n.d(e,{q:()=>o});var r=n(433);function o(){var t;const e=r.J2.navigator;return{status:e.onLine?"connected":"not_connected",interfaces:e.connection&&e.connection.type?[e.connection.type]:["unknown"],effective_type:null===(t=e.connection)||void 0===t?void 0:t.effectiveType}}},511(t,e,n){n.d(e,{T:()=>o,h:()=>m});const r="?";function o(t){var e,n;const o=[];let i=p(t,"stack");const s=t+"";if(i&&i.startsWith(s)&&(i=i.slice(s.length)),i&&i.split("\n").forEach(t=>{const e=function(t){const e=a.exec(t);if(!e)return;const n=e[2]&&0===e[2].indexOf("native"),o=e[2]&&0===e[2].indexOf("eval"),i=c.exec(e[2]);return o&&i&&(e[2]=i[1],e[3]=i[2],e[4]=i[3]),{args:n?[e[2]]:[],column:e[4]?+e[4]:void 0,func:e[1]||r,line:e[3]?+e[3]:void 0,url:n?void 0:e[2]}}(t)||function(t){const e=u.exec(t);if(e)return{args:[],column:e[3]?+e[3]:void 0,func:r,line:e[2]?+e[2]:void 0,url:e[1]}}(t)||function(t){const e=l.exec(t);if(e)return{args:[],column:e[4]?+e[4]:void 0,func:e[1]||r,line:+e[3],url:e[2]}}(t)||function(t){const e=d.exec(t);if(!e)return;const n=e[3]&&e[3].indexOf(" > eval")>-1,o=f.exec(e[3]);return n&&o&&(e[3]=o[1],e[4]=o[2],e[5]=void 0),{args:e[2]?e[2].split(","):[],column:e[5]?+e[5]:void 0,func:e[1]||r,line:e[4]?+e[4]:void 0,url:e[3]}}(t);e&&(!e.func&&e.line&&(e.func=r),o.push(e))}),o.length>0&&function(){if(void 0!==v)return v;const[t,e]=[class extends Error{constructor(){super(),this.name="Error"}},Error].map(t=>new t);return v=g(Object.getPrototypeOf(t))&&e.stack!==t.stack,v}()&&t instanceof Error){const i=[];let s=t;for(;(s=Object.getPrototypeOf(s))&&g(s);){const t=(null===(e=s.constructor)||void 0===e?void 0:e.name)||r;i.push(t)}for(let t=i.length-1;t>=0&&(null===(n=o[0])||void 0===n?void 0:n.func)===i[t];t--)o.shift()}return{message:p(t,"message"),name:p(t,"name"),stack:o}}const i="((?:file|https?|blob|chrome-extension|electron|native|eval|webpack|snippet|<anonymous>|\\w+\\.|\\/).*?)",s="(?::(\\d+))",a=RegExp(`^\\s*at (.*?) ?\\(${i}${s}?${s}?\\)?\\s*$`,"i"),c=RegExp(`\\((\\S*)${s}${s}\\)`),u=RegExp(`^\\s*at ?${i}${s}?${s}??\\s*$`,"i"),l=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,d=/^\s*(.*?)(?:\((.*?)\))?(?:(?:(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle|\[wasm code\])(?::(\d+))?(?::(\d+))?)|@)\s*$/i,f=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function p(t,e){if("object"!=typeof t||!t||!(e in t))return;const n=t[e];return"string"==typeof n?n:void 0}function m(t,e,n,r){if(void 0===e)return;const{name:o,message:i}=function(t){let e,n;return"[object String]"==={}.toString.call(t)&&([,e,n]=h.exec(t)),{name:e,message:n}}(t);return{name:o,message:i,stack:[{url:e,column:r,line:n}]}}const h=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\s\S]*)$/;function g(t){return(t.constructor+"").startsWith("class ")}let v},520(t,e,n){n.d(e,{a:()=>a});var r=n(875),o=n(452),i=n(416);const s=220*o._m;function a(t,e=s){const n=(0,i.M)(Object.prototype),r=(0,i.M)(Array.prototype),o=[],a=new WeakMap,u=c(t,"$",void 0,o,a),d=JSON.stringify(u);let f=d?d.length:0;if(!(f>e)){for(;o.length>0&&f<e;){const n=o.shift();let r=0;if(Array.isArray(n.source))for(let i=0;i<n.source.length;i++){const s=c(n.source[i],n.path,i,o,a);if(f+=void 0!==s?JSON.stringify(s).length:4,f+=r,r=1,f>e){l(e,"truncated",t);break}n.target[i]=s}else for(const i in n.source)if(Object.prototype.hasOwnProperty.call(n.source,i)){const s=c(n.source[i],n.path,i,o,a);if(void 0!==s&&(f+=JSON.stringify(s).length+r+i.length+3,r=1),f>e){l(e,"truncated",t);break}n.target[i]=s}}return n(),r(),u}l(e,"discarded",t)}function c(t,e,n,r,o){const i=function(t){const e=t;if(e&&"function"==typeof e.toJSON)try{return e.toJSON()}catch(t){}return t}(t);if(!i||"object"!=typeof i)return"bigint"==typeof(s=i)?"[BigInt] "+s.toString():"function"==typeof s?"[Function] "+(s.name||"unknown"):"symbol"==typeof s?"[Symbol] "+(s.description||s.toString()):s;var s;const a=u(i);if("[Object]"!==a&&"[Array]"!==a&&"[Error]"!==a)return a;const c=t;if(o.has(c))return`[Reference seen at ${o.get(c)}]`;const l=void 0!==n?`${e}.${n}`:e,d=Array.isArray(i)?[]:{};return o.set(c,l),r.push({source:i,target:d,path:l}),d}function u(t){try{if(t instanceof Event)return{type:(e=t).type,isTrusted:e.isTrusted,currentTarget:e.currentTarget?u(e.currentTarget):null,target:e.target?u(e.target):null};if(t instanceof RegExp)return"[RegExp] "+t.toString();const n=Object.prototype.toString.call(t).match(/\[object (.*)\]/);if(n&&n[1])return`[${n[1]}]`}catch(t){}var e;return"[Unserializable]"}function l(t,e,n){r.Vy.warn(`The data provided has been ${e} as it is over the limit of ${t} characters:`,n)}},534(t,e,n){n.d(e,{Rr:()=>L,A2:()=>N,VJ:()=>P,Gk:()=>V,Q6:()=>M,a5:()=>O});var r=n(875),o=n(945),i=n(468),s=n(188),a=n(485),c=n(858),u=n(275),l=n(749),d=n(315),f=n(769),p=n(713),m=n(416),h=n(995),g=n(511),v=n(489),y=n(362),b=n(723),_=n(725),w=n(673),k=n(339),S=n(433);const E="log",x="configuration",T="usage",A=["https://rum.kubesense.ai","https://rum.tyke.ai","https://d3uc069fcn7uxw.cloudfront.net","https://d20xtzwzcl0ceb.cloudfront.net","http://localhost","<anonymous>"],C=[c.Bb];let R;function I(){return R||(R=new u.dX(100)),R}function O(t,e,n,r,o,i){const g=new u.cP,{stop:A}=function(t,e,n,r,o){const i=[];if((0,y.d0)()){const t=(0,y.Y9)(),e=o.subscribe(e=>t.send("internal_telemetry",e));i.push(e.unsubscribe)}else{const s=[t.rumEndpointBuilder];t.replica&&function(t){return t.kubesenseRumEndpoint===c.Bb}(t)&&s.push(t.replica.rumEndpointBuilder);const a=(0,b.X)({encoder:r(4),request:(0,_.sA)(s,e),flushController:(0,w.tO)({pageMayExitObservable:n,sessionExpireObservable:new u.cP})});i.push(a.stop);const l=o.subscribe(a.add);i.push(l.unsubscribe)}return{stop:()=>i.forEach(t=>t())}}(e,r,o,i,g),{enabled:R,metricsEnabled:O}=function(t,e,n,r,o=1,i=15){const c={},u=!C.includes(e.kubesenseRumEndpoint)&&(0,p.ic)(e.telemetrySampleRate),g={[E]:u,[x]:u&&(0,p.ic)(e.telemetryConfigurationSampleRate),[T]:u&&(0,p.ic)(e.telemetryUsageSampleRate),metric:u&&(0,p.ic)(o)},y={is_local_file:"file:"===(null===(_=S.J2.location)||void 0===_?void 0:_.protocol),is_worker:S.Wq},b=I();var _;return b.subscribe(({rawEvent:o,metricName:u})=>{if(u&&!g.metric||!g[o.type])return;const d=u||o.status||o.type;let p=c[d];if(p||(p=c[d]=new Set),p.size>=i)return;const b=(0,m.s)(o);if(p.has(b))return;const _=n.triggerHook(1,{startTime:(0,l.M8)().relative});if(_===k.ug)return;const w=function(t,n,r,o){const i={type:"telemetry",date:(0,l.M8)().timeStamp,service:n,version:"1.4.0",source:"browser",_kubesense:{format_version:2},telemetry:(0,h.kg)(r,{runtime_env:o,connectivity:(0,v.q)(),sdk_setup:"npm"}),ktags:(0,a.m5)(e).join(","),experimental_features:Array.from((0,s.q7)())};return(0,h.kg)(i,t)}(_,t,o,y);r.notify(w),(0,f.b)("telemetry",w),p.add(b)}),b.unbuffer(),(0,d.Bd)(P),{enabled:u,metricsEnabled:g.metric}}(t,e,n,g);return{stop:A,enabled:R,metricsEnabled:O}}function N(t,e){(0,d.oO)(r.bP.debug,t,e),I().notify({rawEvent:{type:E,message:t,status:"debug",...e}})}function P(t,e){I().notify({rawEvent:{type:E,status:"error",...U(t),...e}})}function L(t){I().notify({rawEvent:{type:x,configuration:t}})}function V(t,e){I().notify({rawEvent:{type:E,message:t,status:"debug",...e},metricName:t})}function M(t){I().notify({rawEvent:{type:T,usage:t}})}function U(t){if((0,o.bJ)(t)){const e=(0,g.T)(t);return{error:{kind:e.name,stack:(0,i.Yn)($(e))},message:e.message}}return{error:{stack:o.e6},message:"Uncaught "+(0,m.s)(t)}}function $(t){return t.stack=t.stack.filter(t=>!t.url||A.some(e=>t.url.startsWith(e))),t}},586(t,e,n){n.d(e,{W:()=>o});var r=n(433);function o(t,e){const n=(0,r.VZ)();let o;return n.Zone&&"function"==typeof n.Zone.__symbol__&&(o=t[n.Zone.__symbol__(e)]),o||(o=t[e]),o}},636(t,e,n){n.d(e,{DJ:()=>a,vG:()=>u,wg:()=>s,yb:()=>c});var r=n(586),o=n(315),i=n(433);function s(t,e){return(0,r.W)((0,i.VZ)(),"setTimeout")((0,o.dm)(t),e)}function a(t){(0,r.W)((0,i.VZ)(),"clearTimeout")(t)}function c(t,e){return(0,r.W)((0,i.VZ)(),"setInterval")((0,o.dm)(t),e)}function u(t){(0,r.W)((0,i.VZ)(),"clearInterval")(t)}},673(t,e,n){n.d(e,{tO:()=>l});var r=n(433),o=n(275),i=n(636),s=n(749),a=n(725);const c=30*s.OY,u=r.Wq?1:50;function l({pageMayExitObservable:t,sessionExpireObservable:e}){const n=t.subscribe(t=>p(t.reason)),r=e.subscribe(()=>p("session_expire")),s=new o.cP(()=>()=>{n.unsubscribe(),r.unsubscribe()});let l,d=0,f=0;function p(t){if(0===f)return;const e=f,n=d;f=0,d=0,m(),s.notify({reason:t,messagesCount:e,bytesCount:n})}function m(){(0,i.DJ)(l),l=void 0}return{flushObservable:s,get messagesCount(){return f},notifyBeforeAddMessage(t){d+t>=a.AK&&p("bytes_limit"),f+=1,d+=t,void 0===l&&(l=(0,i.wg)(()=>{p("duration_limit")},c))},notifyAfterAddMessage(t=0){d+=t,f>=u?p("messages_limit"):d>=a.AK&&p("bytes_limit")},notifyAfterRemoveMessage(t){d-=t,f-=1,0===f&&m()}}}},713(t,e,n){function r(t){return 0!==t&&100*Math.random()<=t}function o(t,e){return+t.toFixed(e)}function i(t){return s(t)&&t>=0&&t<=100}function s(t){return"number"==typeof t}n.d(e,{Et:()=>s,LI:()=>o,fp:()=>i,ic:()=>r})},723(t,e,n){n.d(e,{X:()=>u});var r=n(875),o=n(75),i=n(887),s=n(416),a=n(452);const c=256*a._m;function u({encoder:t,request:e,flushController:n}){let u={};const d=n.flushObservable.subscribe(n=>function(n){const r=(0,o.KQ)(u).join("\n");u={};const s=(0,i.Kp)(n.reason),c=s?e.sendOnExit:e.send;if(s&&t.isAsync){const e=t.finishSync();e.outputBytesCount&&c(l(e));const n=[e.pendingData,r].filter(Boolean).join("\n");n&&c({data:n,bytesCount:(0,a.WW)(n)})}else r&&t.write(t.isEmpty?r:"\n"+r),t.finish(t=>{c(l(t))})}(n));function f(e,o){const i=(0,s.s)(e),l=t.estimateEncodedBytesCount(i);l>=c?r.Vy.warn(`Discarded a message whose size was bigger than the maximum allowed size ${c/a._m}KiB. ${r.xG} ${r.Xs}/#technical-limitations`):(function(t){return void 0!==t&&void 0!==u[t]}(o)&&function(e){const r=u[e];delete u[e];const o=t.estimateEncodedBytesCount(r);n.notifyAfterRemoveMessage(o)}(o),function(e,r,o){n.notifyBeforeAddMessage(r),void 0!==o?(u[o]=e,n.notifyAfterAddMessage()):t.write(t.isEmpty?e:"\n"+e,t=>{n.notifyAfterAddMessage(t-r)})}(i,l,o))}return{flushController:n,add:f,upsert:f,stop:d.unsubscribe}}function l(t){let e;return e="string"==typeof t.output?t.output:new Blob([t.output],{type:"text/plain"}),{data:e,bytesCount:t.outputBytesCount,encoding:t.encoding}}},725(t,e,n){n.d(e,{AK:()=>_,sA:()=>w});var r=n(315),o=n(188),i=n(275),s=n(452),a=n(636),c=n(749),u=n(295),l=n(314);const d=80*s._m,f=20*s.iH,p=c.iW,m=c.OY;function h(t,e,n,r,o,i){0===e.transportStatus&&0===e.queuedPayloads.size()&&e.bandwidthMonitor.canHandle(t)?v(t,e,n,i,{onSuccess:()=>y(0,e,n,r,o,i),onFailure(){e.queuedPayloads.enqueue(t)||i.notify({type:"queue-full",bandwidth:e.bandwidthMonitor.stats(),payload:t}),g(e,n,r,o,i)}}):e.queuedPayloads.enqueue(t)||i.notify({type:"queue-full",bandwidth:e.bandwidthMonitor.stats(),payload:t})}function g(t,e,n,r,o){2===t.transportStatus&&(0,a.wg)(()=>{v(t.queuedPayloads.first(),t,e,o,{onSuccess(){t.queuedPayloads.dequeue(),t.currentBackoffTime=m,y(1,t,e,n,r,o)},onFailure(){t.currentBackoffTime=Math.min(p,2*t.currentBackoffTime),g(t,e,n,r,o)}})},t.currentBackoffTime)}function v(t,e,n,r,{onSuccess:o,onFailure:i}){e.bandwidthMonitor.add(t),n(t,n=>{e.bandwidthMonitor.remove(t),function(t){return"opaque"!==t.type&&(0===t.status&&!navigator.onLine||408===t.status||429===t.status||(0,u.G)(t.status))}(n)?(e.transportStatus=e.bandwidthMonitor.ongoingRequestCount>0?1:2,t.retry={count:t.retry?t.retry.count+1:1,lastFailureStatus:n.status},r.notify({type:"failure",bandwidth:e.bandwidthMonitor.stats(),payload:t}),i()):(e.transportStatus=0,r.notify({type:"success",bandwidth:e.bandwidthMonitor.stats(),payload:t}),o())})}function y(t,e,n,r,o,i){0===t&&e.queuedPayloads.isFull()&&!e.queueFullReported&&(o({message:`Reached max ${r} events size queued for upload: ${f/s.iH}MiB`,source:l.g.AGENT,startClocks:(0,c.M8)()}),e.queueFullReported=!0);const a=e.queuedPayloads;for(e.queuedPayloads=b();a.size()>0;)h(a.dequeue(),e,n,r,o,i)}function b(){const t=[];return{bytesCount:0,enqueue(e){return!this.isFull()&&(t.push(e),this.bytesCount+=e.bytesCount,!0)},first(){return t[0]},dequeue(){const e=t.shift();return e&&(this.bytesCount-=e.bytesCount),e},size(){return t.length},isFull(){return this.bytesCount>=f}}}const _=16*s._m;function w(t,e,n=_){const r=new i.cP,s={transportStatus:0,currentBackoffTime:m,bandwidthMonitor:{ongoingRequestCount:0,ongoingByteCount:0,canHandle(t){return 0===this.ongoingRequestCount||this.ongoingByteCount+t.bytesCount<=d&&this.ongoingRequestCount<32},add(t){this.ongoingRequestCount+=1,this.ongoingByteCount+=t.bytesCount},remove(t){this.ongoingRequestCount-=1,this.ongoingByteCount-=t.bytesCount},stats(){return{ongoingByteCount:this.ongoingByteCount,ongoingRequestCount:this.ongoingRequestCount}}},queuedPayloads:b(),queueFullReported:!1};return{observable:r,send(i){for(const a of t)h(i,s,(t,e)=>{(0,o.sr)(o.R9.AVOID_FETCH_KEEPALIVE)?x(a,t,e):E(a,n,t,e)},a.trackType,e,r)},sendOnExit(e){for(const r of t)k(r,n,e)},sendQueuedOnExit(){let e;for(;void 0!==(e=s.queuedPayloads.dequeue());)for(const r of t)k(r,n,e)}}}function k(t,e,n){if(navigator.sendBeacon&&n.bytesCount<e)try{const e=t.build("beacon",n);if(navigator.sendBeacon(e,n.data))return}catch(t){!function(t){S||(S=!0,(0,r.Dx)(t))}(t)}x(t,n)}let S=!1;function E(t,e,n,o){if(function(){try{return window.Request&&"keepalive"in new Request("http://a")}catch(t){return!1}}()&&n.bytesCount<e){const e=t.build("fetch-keepalive",n);fetch(e,{method:"POST",body:n.data,keepalive:!0,mode:"cors"}).then((0,r.dm)(t=>null==o?void 0:o({status:t.status,type:t.type}))).catch((0,r.dm)(()=>x(t,n,o)))}else x(t,n,o)}function x(t,e,n){const o=t.build("fetch",e);fetch(o,{method:"POST",body:e.data,mode:"cors"}).then((0,r.dm)(t=>null==n?void 0:n({status:t.status,type:t.type}))).catch((0,r.dm)(()=>null==n?void 0:n({status:0})))}},749(t,e,n){n.d(e,{$H:()=>a,$S:()=>h,FR:()=>c,Gw:()=>b,M8:()=>g,MA:()=>s,OY:()=>o,Oc:()=>v,TP:()=>d,Zj:()=>f,gs:()=>_,iW:()=>i,jR:()=>u,nx:()=>m,pu:()=>w,vk:()=>y,x3:()=>p});var r=n(713);const o=1e3,i=60*o,s=60*i,a=24*s*365;function c(t){return{relative:t,timeStamp:l(t)}}function u(t){return{relative:_(t),timeStamp:t}}function l(t){const e=p()-performance.now();return e>S()?Math.round(b(e,t)):function(t){return Math.round(b(S(),t))}(t)}function d(){return Math.round(p()-b(S(),performance.now()))}function f(t){return(0,r.Et)(t)?(0,r.LI)(1e6*t,0):t}function p(){return(new Date).getTime()}function m(){return p()}function h(){return performance.now()}function g(){return{relative:h(),timeStamp:m()}}function v(){return{relative:0,timeStamp:S()}}function y(t,e){return e-t}function b(t,e){return t+e}function _(t){return t-S()}function w(t){return t<a}let k;function S(){var t,e;return void 0===k&&(k=null!==(e=null===(t=performance.timing)||void 0===t?void 0:t.navigationStart)&&void 0!==e?e:performance.timeOrigin),k}},760(t,e,n){function r(){return 0===s()}function o(){return 1===s()}let i;function s(){return null!=i?i:i=function(t=window){var e;const n=t.navigator.userAgent;return t.chrome||/HeadlessChrome/.test(n)?0:0===(null===(e=t.navigator.vendor)||void 0===e?void 0:e.indexOf("Apple"))||/safari/i.test(n)&&!/chrome|android/i.test(n)?1:2}()}n.d(e,{F2:()=>r,nr:()=>o})},769(t,e,n){n.d(e,{b:()=>o});var r=n(433);function o(t,e){const n=r.J2.__kubesenseBrowserSdkExtensionCallback;n&&n({type:t,payload:e})}},801(t,e,n){n.d(e,{H:()=>a,t:()=>c});var r=n(636),o=n(315),i=n(474),s=n(468);function a(t,e,n,{computeHandlingStack:r}={}){let a=t[e];if("function"!=typeof a){if(!(e in t)||"string"!=typeof e||!e.startsWith("on"))return{stop:i.l};a=i.l}let c=!1;const u=function(){if(c)return a.apply(this,arguments);const t=Array.from(arguments);let e;(0,o.um)(n,null,[{target:this,parameters:t,onPostCall(t){e=t},handlingStack:r?(0,s.uC)("instrumented method"):void 0}]);const i=a.apply(this,t);return e&&(0,o.um)(e,null,[i]),i};return t[e]=u,{stop(){c=!0,t[e]===u&&(t[e]=a)}}}function c(t,e,n){const o=Object.getOwnPropertyDescriptor(t,e);if(!o||!o.set||!o.configurable)return{stop:i.l};const s=i.l;let a=(t,e)=>{(0,r.wg)(()=>{a!==s&&n(t,e)},0)};const c=function(t){o.set.call(this,t),a(this,t)};return Object.defineProperty(t,e,{set:c}),{stop(){var n;(null===(n=Object.getOwnPropertyDescriptor(t,e))||void 0===n?void 0:n.set)===c&&Object.defineProperty(t,e,o),a=s}}}},846(t,e,n){n.d(e,{H:()=>i,N:()=>s});var r=n(474),o=n(197);function i(t,e,n){if(document.readyState===e||"complete"===document.readyState)return n(),{stop:r.l};const i="complete"===e?"load":"DOMContentLoaded";return(0,o.q)(t,window,i,n,{once:!0})}function s(t,e){return new Promise(n=>{i(t,e,n)})}},858(t,e,n){n.d(e,{Bb:()=>r,Ih:()=>i,TU:()=>o});const r="rum.tyke.ai",o="us2.kubesense.ai",i=["ksource","kubesense-api-key","kubesense-request-id"]},875(t,e,n){n.d(e,{JZ:()=>o,Vy:()=>a,Xs:()=>u,bP:()=>r,fH:()=>c,xG:()=>l});const r={log:"log",debug:"debug",info:"info",warn:"warn",error:"error"},o=console,i={};Object.keys(r).forEach(t=>{i[t]=o[t]});const s="Kubsesense Browser SDK:",a={debug:i.debug.bind(o,s),log:i.log.bind(o,s),info:i.info.bind(o,s),warn:i.warn.bind(o,s),error:i.error.bind(o,s)},c="https://docs.kubesense.ai",u=c+"/rum/browser/troubleshooting",l="More details:"},877(t,e,n){n.d(e,{AY:()=>i,L2:()=>s,c$:()=>a,l2:()=>o});var r=n(433);function o(t){return a(t,location.href).href}function i(t){try{return!!a(t)}catch(t){return!1}}function s(t){const e=a(t).pathname;return"/"===e[0]?e:"/"+e}function a(t,e){const{URL:n}=function(){if(!c){let t,e;try{t=document.createElement("iframe"),t.style.display="none",document.body.appendChild(t),e=t.contentWindow}catch(t){e=r.J2}c={URL:e.URL},null==t||t.remove()}return c}();try{return void 0!==e?new n(t,e):new n(t)}catch(t){throw Error("Failed to construct URL: "+t)}}let c},887(t,e,n){n.d(e,{Kp:()=>c,_T:()=>a,y5:()=>s});var r=n(275),o=n(75),i=n(197);const s={HIDDEN:"visibility_hidden",UNLOADING:"before_unload",PAGEHIDE:"page_hide",FROZEN:"page_frozen"};function a(t){return new r.cP(e=>{const{stop:n}=(0,i.l)(t,window,["visibilitychange","freeze"],t=>{"visibilitychange"===t.type&&"hidden"===document.visibilityState?e.notify({reason:s.HIDDEN}):"freeze"===t.type&&e.notify({reason:s.FROZEN})},{capture:!0}),r=(0,i.q)(t,window,"beforeunload",()=>{e.notify({reason:s.UNLOADING})}).stop;return()=>{n(),r()}})}function c(t){return(0,o.KQ)(s).includes(t)}},945(t,e,n){n.d(e,{As:()=>u,bJ:()=>p,e6:()=>a});var r=n(520),o=n(416),i=n(511),s=n(468);const a="No stack, consider using an instance of Error";function c({originalError:t,stackTrace:e,source:n,useFallbackStack:r=!0,nonErrorPrefix:o}){const c=p(t);return!e&&c&&(e=(0,i.T)(t)),{source:n,type:e?e.name:void 0,message:l(e,c,o,t),stack:e?(0,s.Yn)(e):r?a:void 0}}function u({stackTrace:t,originalError:e,handlingStack:n,componentStack:r,startClocks:o,nonErrorPrefix:i,useFallbackStack:s=!0,source:a,handling:u}){return{startClocks:o,handling:u,handlingStack:n,componentStack:r,originalError:e,...c({originalError:e,stackTrace:t,source:a,useFallbackStack:s,nonErrorPrefix:i}),causes:p(e)?m(e,a):void 0,fingerprint:d(e),context:f(e)}}function l(t,e,n,i){return(null==t?void 0:t.message)&&(null==t?void 0:t.name)?t.message:e?"Empty message":n?`${n} ${(0,o.s)((0,r.a)(i))}`:(0,o.s)((0,r.a)(i))}function d(t){return p(t)&&"kubesense_fingerprint"in t?t.kubesense_fingerprint+"":void 0}function f(t){if(null!==t&&"object"==typeof t&&"kubesense_context"in t)return t.kubesense_context}function p(t){return t instanceof Error||"[object Error]"===Object.prototype.toString.call(t)}function m(t,e){const n=[];let r=t.cause;for(;null!=r&&n.length<10;){const t=c({originalError:r,source:e,useFallbackStack:!1});n.push(t),r=p(r)?r.cause:void 0}return n.length?n:void 0}},981(t,e,n){n.d(e,{BB:()=>s});var r=n(636),o=n(315),i=n(749);function s(t,e){if(window.requestIdleCallback&&window.cancelIdleCallback){const n=window.requestIdleCallback((0,o.dm)(t),e);return()=>window.cancelIdleCallback(n)}return function(t){const e=(0,i.x3)(),n=(0,r.wg)(()=>{t({didTimeout:!1,timeRemaining:()=>Math.max(0,a-((0,i.x3)()-e))})},0);return()=>(0,r.DJ)(n)}(t)}const a=50},995(t,e,n){n.d(e,{Go:()=>i,kg:()=>s});var r=n(166);function o(t,e,n=function(){if("undefined"!=typeof WeakSet){const t=new WeakSet;return{hasAlreadyBeenSeen(e){const n=t.has(e);return n||t.add(e),n}}}const t=[];return{hasAlreadyBeenSeen(e){const n=t.indexOf(e)>=0;return n||t.push(e),n}}}()){if(void 0===e)return t;if("object"!=typeof e||null===e)return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const t=e.flags||(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.sticky?"y":"")+(e.unicode?"u":"");return RegExp(e.source,t)}if(n.hasAlreadyBeenSeen(e))return;if(Array.isArray(e)){const r=Array.isArray(t)?t:[];for(let t=0;t<e.length;++t)r[t]=o(r[t],e[t],n);return r}const i="object"===(0,r.P)(t)?t:{};for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(i[t]=o(i[t],e[t],n));return i}function i(t){return o(void 0,t)}function s(...t){let e;for(const n of t)null!=n&&(e=o(e,n));return e}}},r={};function o(t){var e=r[t];if(void 0!==e)return e.exports;var i=r[t]={exports:{}};return n[t](i,i.exports,o),i.exports}o.m=n,o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.f={},o.e=t=>Promise.all(Object.keys(o.f).reduce((e,n)=>(o.f[n](t,e),e),[])),o.u=t=>"chunks/"+t+"-"+{recorder:"9ae532a18bac5f4280da",profiler:"b64730a2109c3ddbc539"}[t]+"-kubesense-rum.js",o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),t={},e="@kubesense/kubesense-browser-rum:",o.l=(n,r,i,s)=>{if(t[n])t[n].push(r);else{var a,c;if(void 0!==i)for(var u=document.getElementsByTagName("script"),l=0;l<u.length;l++){var d=u[l];if(d.getAttribute("src")==n||d.getAttribute("data-webpack")==e+i){a=d;break}}a||(c=!0,(a=document.createElement("script")).charset="utf-8",o.nc&&a.setAttribute("nonce",o.nc),a.setAttribute("data-webpack",e+i),a.src=n),t[n]=[r];var f=(e,r)=>{a.onerror=a.onload=null,clearTimeout(p);var o=t[n];if(delete t[n],a.parentNode&&a.parentNode.removeChild(a),o&&o.forEach(t=>t(r)),e)return e(r)},p=setTimeout(f.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=f.bind(null,a.onerror),a.onload=f.bind(null,a.onload),c&&document.head.appendChild(a)}},(()=>{var t;o.g.importScripts&&(t=o.g.location+"");var e=o.g.document;if(!t&&e&&(e.currentScript&&"SCRIPT"===e.currentScript.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!t||!/^http(s?):/.test(t));)t=n[r--].src}if(!t)throw Error("Automatic publicPath is not supported in this browser");t=t.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=t})(),(()=>{var t={main:0};o.f.j=(e,n)=>{var r=o.o(t,e)?t[e]:void 0;if(0!==r)if(r)n.push(r[2]);else{var i=new Promise((n,o)=>r=t[e]=[n,o]);n.push(r[2]=i);var s=o.p+o.u(e),a=Error();o.l(s,n=>{if(o.o(t,e)&&(0!==(r=t[e])&&(t[e]=void 0),r)){var i=n&&("load"===n.type?"missing":n.type),s=n&&n.target&&n.target.src;a.message="Loading chunk "+e+" failed.\n("+i+": "+s+")",a.name="ChunkLoadError",a.type=i,a.request=s,r[1](a)}},"chunk-"+e,e)}};var e=(e,n)=>{var r,i,[s,a,c]=n,u=0;if(s.some(e=>0!==t[e])){for(r in a)o.o(a,r)&&(o.m[r]=a[r]);c&&c(o)}for(e&&e(n);u<s.length;u++)i=s[u],o.o(t,i)&&t[i]&&t[i][0](),t[i]=0},n=self.webpackChunk_kubesense_kubesense_browser_rum=self.webpackChunk_kubesense_kubesense_browser_rum||[];n.forEach(e.bind(null,0)),n.push=e.bind(null,n.push.bind(n))})();var i=o(322),s=o(433),a=o(215),c=o(362),u=o(474),l=o(300),d=o(197),f=o(452);function p(t,e,n){let r,o=0,i=[],s=!0,a=0;const c=[],{stop:u}=(0,d.q)(t,e,"message",({data:t})=>{if("wrote"!==t.type||t.streamId!==n)return;const e=c[0];e&&(e.id===t.id?(c.shift(),o+=t.additionalBytesCount,i.push(t.result),r=t.trailer,e.writeCallback?e.writeCallback(t.result.byteLength):e.finishCallback&&e.finishCallback()):e.id<t.id&&u())});function l(){const t=0===i.length?new Uint8Array(0):(0,f.wh)(i.concat(r)),e={rawBytesCount:o,output:t,outputBytesCount:t.byteLength,encoding:"deflate"};return o=0,i=[],e}function p(){s||(e.postMessage({action:"reset",streamId:n}),s=!0)}return{isAsync:!0,get isEmpty(){return s},write(t,r){e.postMessage({action:"write",id:a,data:t,streamId:n}),c.push({id:a,writeCallback:r,data:t}),s=!1,a+=1},finish(t){p(),c.length?(c.forEach(t=>{delete t.writeCallback}),c[c.length-1].finishCallback=()=>t(l())):t(l())},finishSync(){p();const t=c.map(t=>t.data).join("");return c.length=0,{...l(),pendingData:t}},estimateEncodedBytesCount(t){return t.length/8},stop(){u()}}}var m=o(749),h=o(636),g=o(875),v=o(534);function y({configuredUrl:t,error:e,source:n,scriptType:r}){if(g.Vy.error(`${n} failed to start: an error occurred while initializing the ${r}:`,e),e instanceof Event||e instanceof Error&&((o=e.message).includes("Content Security Policy")||o.includes("requires 'TrustedScriptURL'"))){let e;e=t?`Please make sure the ${r} URL ${t} is correct and CSP is correctly configured.`:"Please make sure CSP is correctly configured.",g.Vy.error(`${e} See documentation at ${g.fH}/integrations/content_security_policy_logs/#use-csp-with-real-user-monitoring-and-session-replay`)}else"worker"===r&&(0,v.VJ)(e);var o}const b=30*m.OY;function _(t){return new Worker(t.workerUrl||URL.createObjectURL(new Blob(['(()=>{function t(t){if(1===t.length)return t[0];const e=t.reduce((t,e)=>t+e.length,0),a=new Uint8Array(e);let n=0;for(const e of t)a.set(e,n),n+=e.length;return a}function e(t){for(var e=t.length;--e>=0;)t[e]=0}var a=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),n=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),r=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),i=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=Array(576);e(s);var h=Array(60);e(h);var l=Array(512);e(l);var _=Array(256);e(_);var o=Array(29);e(o);var d,u,f,c=Array(30);function p(t,e,a,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=n,this.max_length=r,this.has_stree=t&&t.length}function g(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(c);var v=function(t){return t<256?l[t]:l[256+(t>>>7)]},w=function(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},m=function(t,e,a){t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,w(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},b=function(t,e,a){m(t,a[2*e],a[2*e+1])},y=function(t,e){var a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},z=function(t,e,a){var n,r,i=Array(16),s=0;for(n=1;n<=15;n++)i[n]=s=s+a[n-1]<<1;for(r=0;r<=e;r++){var h=t[2*r+1];0!==h&&(t[2*r]=y(i[h]++,h))}},k=function(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},x=function(t){t.bi_valid>8?w(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},A=function(t,e,a,n){var r=2*e,i=2*a;return t[r]<t[i]||t[r]===t[i]&&n[e]<=n[a]},U=function(t,e,a){for(var n=t.heap[a],r=a<<1;r<=t.heap_len&&(r<t.heap_len&&A(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!A(e,n,t.heap[r],t.depth));)t.heap[a]=t.heap[r],a=r,r<<=1;t.heap[a]=n},B=function(t,e,r){var i,s,h,l,d=0;if(0!==t.last_lit)do{i=t.pending_buf[t.d_buf+2*d]<<8|t.pending_buf[t.d_buf+2*d+1],s=t.pending_buf[t.l_buf+d],d++,0===i?b(t,s,e):(h=_[s],b(t,h+256+1,e),0!==(l=a[h])&&(s-=o[h],m(t,s,l)),i--,h=v(i),b(t,h,r),0!==(l=n[h])&&(i-=c[h],m(t,i,l)))}while(d<t.last_lit);b(t,256,e)},I=function(t,e){var a,n,r,i=e.dyn_tree,s=e.stat_desc.static_tree,h=e.stat_desc.has_stree,l=e.stat_desc.elems,_=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<l;a++)0!==i[2*a]?(t.heap[++t.heap_len]=_=a,t.depth[a]=0):i[2*a+1]=0;for(;t.heap_len<2;)i[2*(r=t.heap[++t.heap_len]=_<2?++_:0)]=1,t.depth[r]=0,t.opt_len--,h&&(t.static_len-=s[2*r+1]);for(e.max_code=_,a=t.heap_len>>1;a>=1;a--)U(t,i,a);r=l;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],U(t,i,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,i[2*r]=i[2*a]+i[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,i[2*a+1]=i[2*n+1]=r,t.heap[1]=r++,U(t,i,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,r,i,s,h,l=e.dyn_tree,_=e.max_code,o=e.stat_desc.static_tree,d=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,c=e.stat_desc.max_length,p=0;for(i=0;i<=15;i++)t.bl_count[i]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<573;a++)(i=l[2*l[2*(n=t.heap[a])+1]+1]+1)>c&&(i=c,p++),l[2*n+1]=i,n>_||(t.bl_count[i]++,s=0,n>=f&&(s=u[n-f]),h=l[2*n],t.opt_len+=h*(i+s),d&&(t.static_len+=h*(o[2*n+1]+s)));if(0!==p){do{for(i=c-1;0===t.bl_count[i];)i--;t.bl_count[i]--,t.bl_count[i+1]+=2,t.bl_count[c]--,p-=2}while(p>0);for(i=c;0!==i;i--)for(n=t.bl_count[i];0!==n;)(r=t.heap[--a])>_||(l[2*r+1]!==i&&(t.opt_len+=(i-l[2*r+1])*l[2*r],l[2*r+1]=i),n--)}}(t,e),z(i,_,t.bl_count)},E=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)r=s,s=e[2*(n+1)+1],++h<l&&r===s||(h<_?t.bl_tree[2*r]+=h:0!==r?(r!==i&&t.bl_tree[2*r]++,t.bl_tree[32]++):h<=10?t.bl_tree[34]++:t.bl_tree[36]++,h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4))},C=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),n=0;n<=a;n++)if(r=s,s=e[2*(n+1)+1],!(++h<l&&r===s)){if(h<_)do{b(t,r,t.bl_tree)}while(0!==--h);else 0!==r?(r!==i&&(b(t,r,t.bl_tree),h--),b(t,16,t.bl_tree),m(t,h-3,2)):h<=10?(b(t,17,t.bl_tree),m(t,h-3,3)):(b(t,18,t.bl_tree),m(t,h-11,7));h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4)}},D=!1,M=function(t,e,a,n){m(t,0+(n?1:0),3),function(t,e,a){x(t),w(t,a),w(t,~a),t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a}(t,e,a)},j=M,L=function(t,e,a,n){for(var r=65535&t,i=t>>>16&65535,s=0;0!==a;){a-=s=a>2e3?2e3:a;do{i=i+(r=r+e[n++]|0)|0}while(--s);r%=65521,i%=65521}return r|i<<16},S=new Uint32Array(function(){for(var t,e=[],a=0;a<256;a++){t=a;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}()),T=function(t,e,a,n){var r=S,i=n+a;t^=-1;for(var s=n;s<i;s++)t=t>>>8^r[255&(t^e[s])];return-1^t},O={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},q=j,F=function(t,e,a){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(_[a]+256+1)]++,t.dyn_dtree[2*v(e)]++),t.last_lit===t.lit_bufsize-1},G=-2,H=258,J=262,K=103,N=113,P=666,Q=function(t,e){return t.msg=O[e],e},R=function(t){return(t<<1)-(t>4?9:0)},V=function(t){for(var e=t.length;--e>=0;)t[e]=0},W=function(t,e,a){return(e<<t.hash_shift^a)&t.hash_mask},X=function(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},Y=function(t,e){(function(t,e,a,n){var r,l,_=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),I(t,t.l_desc),I(t,t.d_desc),_=function(t){var e;for(E(t,t.dyn_ltree,t.l_desc.max_code),E(t,t.dyn_dtree,t.d_desc.max_code),I(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*i[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),r=t.opt_len+3+7>>>3,(l=t.static_len+3+7>>>3)<=r&&(r=l)):r=l=a+5,a+4<=r&&-1!==e?M(t,e,a,n):4===t.strategy||l===r?(m(t,2+(n?1:0),3),B(t,s,h)):(m(t,4+(n?1:0),3),function(t,e,a,n){var r;for(m(t,e-257,5),m(t,a-1,5),m(t,n-4,4),r=0;r<n;r++)m(t,t.bl_tree[2*i[r]+1],3);C(t,t.dyn_ltree,e-1),C(t,t.dyn_dtree,a-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,_+1),B(t,t.dyn_ltree,t.dyn_dtree)),k(t),n&&x(t)})(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,X(t.strm)},Z=function(t,e){t.pending_buf[t.pending++]=e},$=function(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},tt=function(t,e,a,n){var r=t.avail_in;return r>n&&(r=n),0===r?0:(t.avail_in-=r,e.set(t.input.subarray(t.next_in,t.next_in+r),a),1===t.state.wrap?t.adler=L(t.adler,e,r,a):2===t.state.wrap&&(t.adler=T(t.adler,e,r,a)),t.next_in+=r,t.total_in+=r,r)},et=function(t,e){var a,n,r=t.max_chain_length,i=t.strstart,s=t.prev_length,h=t.nice_match,l=t.strstart>t.w_size-J?t.strstart-(t.w_size-J):0,_=t.window,o=t.w_mask,d=t.prev,u=t.strstart+H,f=_[i+s-1],c=_[i+s];t.prev_length>=t.good_match&&(r>>=2),h>t.lookahead&&(h=t.lookahead);do{if(_[(a=e)+s]===c&&_[a+s-1]===f&&_[a]===_[i]&&_[++a]===_[i+1]){i+=2,a++;do{}while(_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&i<u);if(n=H-(u-i),i=u-H,n>s){if(t.match_start=e,s=n,n>=h)break;f=_[i+s-1],c=_[i+s]}}}while((e=d[e&o])>l&&0!==--r);return s<=t.lookahead?s:t.lookahead},at=function(t){var e,a,n,r,i,s=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=s+(s-J)){t.window.set(t.window.subarray(s,s+s),0),t.match_start-=s,t.strstart-=s,t.block_start-=s,e=a=t.hash_size;do{n=t.head[--e],t.head[e]=n>=s?n-s:0}while(--a);e=a=s;do{n=t.prev[--e],t.prev[e]=n>=s?n-s:0}while(--a);r+=s}if(0===t.strm.avail_in)break;if(a=tt(t.strm,t.window,t.strstart+t.lookahead,r),t.lookahead+=a,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=W(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=W(t,t.ins_h,t.window[i+3-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<J&&0!==t.strm.avail_in)},nt=function(t,e){for(var a,n;;){if(t.lookahead<J){if(at(t),t.lookahead<J&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-J&&(t.match_length=et(t,a)),t.match_length>=3)if(n=F(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!==--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=W(t,t.ins_h,t.window[t.strstart+1]);else n=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2},rt=function(t,e){for(var a,n,r;;){if(t.lookahead<J){if(at(t),t.lookahead<J&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-J&&(t.match_length=et(t,a),t.match_length<=5&&(1===t.strategy||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-3,n=F(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!==--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(Y(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=F(t,0,t.window[t.strstart-1]))&&Y(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=F(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2};function it(t,e,a,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=n,this.func=r}var st=[new it(0,0,0,0,function(t,e){var a=65535;for(a>t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(at(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+a;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,Y(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-J&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(Y(t,!1),t.strm.avail_out),1)}),new it(4,4,8,4,nt),new it(4,5,16,8,nt),new it(4,6,32,32,nt),new it(4,4,16,16,rt),new it(8,16,32,32,rt),new it(8,16,128,128,rt),new it(8,32,128,256,rt),new it(32,128,258,1024,rt),new it(32,258,258,4096,rt)];function ht(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),V(this.dyn_ltree),V(this.dyn_dtree),V(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),V(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),V(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}for(var lt=function(t){var e,i=function(t){if(!t||!t.state)return Q(t,G);t.total_in=t.total_out=0,t.data_type=2;var e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:N,t.adler=2===e.wrap?0:1,e.last_flush=0,function(t){D||(function(){var t,e,i,g,v,w=Array(16);for(i=0,g=0;g<28;g++)for(o[g]=i,t=0;t<1<<a[g];t++)_[i++]=g;for(_[i-1]=g,v=0,g=0;g<16;g++)for(c[g]=v,t=0;t<1<<n[g];t++)l[v++]=g;for(v>>=7;g<30;g++)for(c[g]=v<<7,t=0;t<1<<n[g]-7;t++)l[256+v++]=g;for(e=0;e<=15;e++)w[e]=0;for(t=0;t<=143;)s[2*t+1]=8,t++,w[8]++;for(;t<=255;)s[2*t+1]=9,t++,w[9]++;for(;t<=279;)s[2*t+1]=7,t++,w[7]++;for(;t<=287;)s[2*t+1]=8,t++,w[8]++;for(z(s,287,w),t=0;t<30;t++)h[2*t+1]=5,h[2*t]=y(t,5);d=new p(s,a,257,286,15),u=new p(h,n,0,30,15),f=new p([],r,0,19,7)}(),D=!0),t.l_desc=new g(t.dyn_ltree,d),t.d_desc=new g(t.dyn_dtree,u),t.bl_desc=new g(t.bl_tree,f),t.bi_buf=0,t.bi_valid=0,k(t)}(e),0}(t);return 0===i&&((e=t.state).window_size=2*e.w_size,V(e.head),e.max_lazy_match=st[e.level].max_lazy,e.good_match=st[e.level].good_length,e.nice_match=st[e.level].nice_length,e.max_chain_length=st[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),i},_t=function(t,e){var a,n;if(!t||!t.state||e>5||e<0)return t?Q(t,G):G;var r=t.state;if(!t.output||!t.input&&0!==t.avail_in||r.status===P&&4!==e)return Q(t,0===t.avail_out?-5:G);r.strm=t;var i=r.last_flush;if(r.last_flush=e,42===r.status)if(2===r.wrap)t.adler=0,Z(r,31),Z(r,139),Z(r,8),r.gzhead?(Z(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),Z(r,255&r.gzhead.time),Z(r,r.gzhead.time>>8&255),Z(r,r.gzhead.time>>16&255),Z(r,r.gzhead.time>>24&255),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(Z(r,255&r.gzhead.extra.length),Z(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=T(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,3),r.status=N);else{var h=8+(r.w_bits-8<<4)<<8;h|=(r.strategy>=2||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(h|=32),h+=31-h%31,r.status=N,$(r,h),0!==r.strstart&&($(r,t.adler>>>16),$(r,65535&t.adler)),t.adler=1}if(69===r.status)if(r.gzhead.extra){for(a=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending!==r.pending_buf_size));)Z(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,Z(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,Z(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.status=K)}else r.status=K;if(r.status===K&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&X(t),r.pending+2<=r.pending_buf_size&&(Z(r,255&t.adler),Z(r,t.adler>>8&255),t.adler=0,r.status=N)):r.status=N),0!==r.pending){if(X(t),0===t.avail_out)return r.last_flush=-1,0}else if(0===t.avail_in&&R(e)<=R(i)&&4!==e)return Q(t,-5);if(r.status===P&&0!==t.avail_in)return Q(t,-5);if(0!==t.avail_in||0!==r.lookahead||0!==e&&r.status!==P){var l=2===r.strategy?function(t,e){for(var a;;){if(0===t.lookahead&&(at(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):3===r.strategy?function(t,e){for(var a,n,r,i,s=t.window;;){if(t.lookahead<=H){if(at(t),t.lookahead<=H&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=s[r=t.strstart-1])===s[++r]&&n===s[++r]&&n===s[++r]){i=t.strstart+H;do{}while(n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&r<i);t.match_length=H-(i-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=F(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):st[r.level].func(r,e);if(3!==l&&4!==l||(r.status=P),1===l||3===l)return 0===t.avail_out&&(r.last_flush=-1),0;if(2===l&&(1===e?function(t){m(t,2,3),b(t,256,s),function(t){16===t.bi_valid?(w(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}(r):5!==e&&(q(r,0,0,!1),3===e&&(V(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),X(t),0===t.avail_out))return r.last_flush=-1,0}return 4!==e?0:r.wrap<=0?1:(2===r.wrap?(Z(r,255&t.adler),Z(r,t.adler>>8&255),Z(r,t.adler>>16&255),Z(r,t.adler>>24&255),Z(r,255&t.total_in),Z(r,t.total_in>>8&255),Z(r,t.total_in>>16&255),Z(r,t.total_in>>24&255)):($(r,t.adler>>>16),$(r,65535&t.adler)),X(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?0:1)},ot=function(t){if(!t||!t.state)return G;var e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&e!==K&&e!==N&&e!==P?Q(t,G):(t.state=null,e===N?Q(t,-3):0)},dt=new Uint8Array(256),ut=0;ut<256;ut++)dt[ut]=ut>=252?6:ut>=248?5:ut>=240?4:ut>=224?3:ut>=192?2:1;dt[254]=dt[254]=1;var ft=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},ct=Object.prototype.toString;function pt(){this.options={level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0};var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ft,this.strm.avail_out=0;var e,a,n=function(t,e,a,n,r,i){if(!t)return G;var s=1;if(-1===e&&(e=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),r<1||r>9||8!==a||n<8||n>15||e<0||e>9||i<0||i>4)return Q(t,G);8===n&&(n=9);var h=new ht;return t.state=h,h.strm=t,h.wrap=s,h.gzhead=null,h.w_bits=n,h.w_size=1<<h.w_bits,h.w_mask=h.w_size-1,h.hash_bits=r+7,h.hash_size=1<<h.hash_bits,h.hash_mask=h.hash_size-1,h.hash_shift=~~((h.hash_bits+3-1)/3),h.window=new Uint8Array(2*h.w_size),h.head=new Uint16Array(h.hash_size),h.prev=new Uint16Array(h.w_size),h.lit_bufsize=1<<r+6,h.pending_buf_size=4*h.lit_bufsize,h.pending_buf=new Uint8Array(h.pending_buf_size),h.d_buf=1*h.lit_bufsize,h.l_buf=3*h.lit_bufsize,h.level=e,h.strategy=i,h.method=a,lt(t)}(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==n)throw Error(O[n]);if(t.header&&(e=this.strm,a=t.header,e&&e.state&&(2!==e.state.wrap||(e.state.gzhead=a))),t.dictionary){var r;if(r="[object ArrayBuffer]"===ct.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(n=function(t,e){var a=e.length;if(!t||!t.state)return G;var n=t.state,r=n.wrap;if(2===r||1===r&&42!==n.status||n.lookahead)return G;if(1===r&&(t.adler=L(t.adler,e,a,0)),n.wrap=0,a>=n.w_size){0===r&&(V(n.head),n.strstart=0,n.block_start=0,n.insert=0);var i=new Uint8Array(n.w_size);i.set(e.subarray(a-n.w_size,a),0),e=i,a=n.w_size}var s=t.avail_in,h=t.next_in,l=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,at(n);n.lookahead>=3;){var _=n.strstart,o=n.lookahead-2;do{n.ins_h=W(n,n.ins_h,n.window[_+3-1]),n.prev[_&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=_,_++}while(--o);n.strstart=_,n.lookahead=2,at(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=h,t.input=l,t.avail_in=s,n.wrap=r,0}(this.strm,r)))throw Error(O[n]);this._dict_set=!0}}function gt(t,e,a){try{t.postMessage({type:"errored",error:e,streamId:a})}catch(n){t.postMessage({type:"errored",error:e+"",streamId:a})}}function vt(t){const e=t.strm.adler;return new Uint8Array([3,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e])}pt.prototype.push=function(t,e){var a,n,r=this.strm,i=this.options.chunkSize;if(this.ended)return!1;for(n=e===~~e?e:!0===e?4:0,"[object ArrayBuffer]"===ct.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),(2===n||3===n)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(1===(a=_t(r,n)))return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),a=ot(this.strm),this.onEnd(a),this.ended=!0,0===a;if(0!==r.avail_out){if(n>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},pt.prototype.onData=function(t){this.chunks.push(t)},pt.prototype.onEnd=function(t){0===t&&(this.result=function(t){for(var e=0,a=0,n=t.length;a<n;a++)e+=t[a].length;for(var r=new Uint8Array(e),i=0,s=0,h=t.length;i<h;i++){var l=t[i];r.set(l,s),s+=l.length}return r}(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},function(e=self){try{const a=new Map;e.addEventListener("message",n=>{try{const r=function(e,a){switch(a.action){case"init":return{type:"initialized",version:"1.4.0"};case"write":{let n=e.get(a.streamId);n||(n=new pt,e.set(a.streamId,n));const r=n.chunks.length,i=function(t){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,a,n,r,i,s=t.length,h=0;for(r=0;r<s;r++)a=t.charCodeAt(r),55296==(64512&a)&&r+1<s&&(n=t.charCodeAt(r+1),56320==(64512&n)&&(a=65536+(a-55296<<10)+(n-56320),r++)),h+=a<128?1:a<2048?2:a<65536?3:4;for(e=new Uint8Array(h),i=0,r=0;i<h;r++)a=t.charCodeAt(r),55296==(64512&a)&&r+1<s&&(n=t.charCodeAt(r+1),56320==(64512&n)&&(a=65536+(a-55296<<10)+(n-56320),r++)),a<128?e[i++]=a:a<2048?(e[i++]=192|a>>>6,e[i++]=128|63&a):a<65536?(e[i++]=224|a>>>12,e[i++]=128|a>>>6&63,e[i++]=128|63&a):(e[i++]=240|a>>>18,e[i++]=128|a>>>12&63,e[i++]=128|a>>>6&63,e[i++]=128|63&a);return e}(a.data);return n.push(i,2),{type:"wrote",id:a.id,streamId:a.streamId,result:t(n.chunks.slice(r)),trailer:vt(n),additionalBytesCount:i.length}}case"reset":e.delete(a.streamId)}}(a,n.data);r&&e.postMessage(r)}catch(t){gt(e,t,n.data&&"streamId"in n.data?n.data.streamId:void 0)}})}catch(t){gt(e,t)}}()})();'])))}let w={status:0};function k(t,e,n,r=_){switch(0===w.status&&function(t,e,n=_){try{const r=n(t),{stop:o}=(0,d.q)(t,r,"error",n=>{E(t,e,n)}),{stop:i}=(0,d.q)(t,r,"message",({data:n})=>{var r;"errored"===n.type?E(t,e,n.error,n.streamId):"initialized"===n.type&&(r=n.version,1===w.status&&(w={status:3,worker:w.worker,stop:w.stop,version:r}))});r.postMessage({action:"init"}),(0,h.wg)(()=>function(t){1===w.status&&(g.Vy.error(t+" failed to start: a timeout occurred while initializing the Worker"),w.initializationFailureCallbacks.forEach(t=>t()),w={status:2})}(e),b),w={status:1,worker:r,stop(){o(),i()},initializationFailureCallbacks:[]}}catch(n){E(t,e,n)}}(t,e,r),w.status){case 1:return w.initializationFailureCallbacks.push(n),w.worker;case 3:return w.worker}}function S(){return w.status}function E(t,e,n,r){1===w.status||0===w.status?(y({configuredUrl:t.workerUrl,error:n,source:e,scriptType:"worker"}),1===w.status&&w.initializationFailureCallbacks.forEach(t=>t()),w={status:2}):(0,v.VJ)(n,{worker_version:3===w.status&&w.version,stream_id:r})}function x(){return"function"==typeof Array.from&&"function"==typeof CSSSupportsRule&&"function"==typeof URL.createObjectURL&&"forEach"in NodeList.prototype}var T=o(275),A=o(846),C=o(315);async function R(t,e,n){try{return await n}finally{t.notify(e)}}async function I(){return(await o.e("recorder").then(o.bind(o,814))).startRecording}var O=o(339);async function N(t=P){try{return await t()}catch(t){y({error:t,source:"Profiler",scriptType:"module"})}}async function P(){return(await o.e("profiler").then(o.bind(o,437))).createRumProfiler}const L=function(t){if((0,c.d0)()&&!(0,c.Ww)("records")||!x())return{start:u.l,stop:u.l,getReplayStats(){},onRumStart:u.l,isRecording:()=>!1,getSessionReplayLink(){}};let{strategy:e,shouldStartImmediately:n}=function(){let t=0;return{strategy:{start(){t=1},stop(){t=2},isRecording(){return!1},getSessionReplayLink:u.l},shouldStartImmediately:e=>1===t||0===t&&!e.startSessionReplayRecordingManually}}();return{start:t=>e.start(t),stop:()=>e.stop(),getSessionReplayLink:()=>e.getSessionReplayLink(),onRumStart(r,o,i,s,c,l){let d;e=function(t,e,n,r,o,i,s){let c,l=0;e.subscribe(9,()=>{2!==l&&3!==l||(h(),l=1)}),e.subscribe(10,()=>{1===l&&p()});const d=new T.cP;!function(t,e){if(!t.metricsEnabled)return{stop:u.l};let n,r,o;const{unsubscribe:i}=e.subscribe(t=>{switch(t.type){case"start":n={forced:t.forced,timestamp:(0,m.nx)()},r=void 0,o=void 0;break;case"document-ready":n&&(r=(0,m.vk)(n.timestamp,(0,m.nx)()));break;case"recorder-settled":n&&(o=(0,m.vk)(n.timestamp,(0,m.nx)()));break;case"aborted":case"deflate-encoder-load-failed":case"recorder-load-failed":case"succeeded":i(),n&&(0,v.Gk)("Recorder init metrics",{metrics:(e=n.forced,s=o,a=(0,m.vk)(n.timestamp,(0,m.nx)()),c=t.type,u=r,{forced:e,loadRecorderModuleDuration:s,recorderInitDuration:a,result:c,waitForDocReadyDuration:u})})}var e,s,a,c,u})}(s,d);const f=async a=>{d.notify({type:"start",forced:a});const[u]=await Promise.all([R(d,{type:"recorder-settled"},o()),R(d,{type:"document-ready"},(0,A.N)(t,"interactive"))]);if(2!==l)return void d.notify({type:"aborted"});if(!u)return l=0,void d.notify({type:"recorder-load-failed"});const f=i();if(!f)return l=0,void d.notify({type:"deflate-encoder-load-failed"});({stop:c}=u(e,t,n,r,f,s)),l=3,d.notify({type:"succeeded"})};function p(t){const e=n.findTrackedSession();if(function(t,e){return!t||0===t.sessionReplay&&(!e||!e.force)}(e,t))return void(l=1);if(function(t){return 2===t||3===t}(l))return;l=2;const r=function(t,e){return e&&e.force&&0===t.sessionReplay}(e,t)||!1;f(r).catch(C.Dx),r&&n.setForcedReplay()}function h(){3===l&&(null==c||c()),l=0}return{start:p,stop:h,getSessionReplayLink:()=>function(t,e,n,r){const o=e.findTrackedSession(),i=function(t,e){return x()?t?0===t.sessionReplay?"incorrect-session-plan":e?void 0:"replay-not-started":"rum-not-tracked":"browser-not-supported"}(o,r),s=n.findView();return(0,a.dx)(t,{viewContext:s,errorType:i,session:o})}(t,n,r,0!==l),isRecording(){return 3===l}}}(o,r,i,s,t,function(){return d||(null!=c||(c=k(o,"Kubsesense Session Replay",()=>{e.stop()},void 0)),c&&(d=p(o,c,1))),d},l),n(o)&&e.start()},isRecording:()=>3===S()&&e.isRecording(),getReplayStats:t=>3===S()?(0,l.lv)(t):void 0}}(async function(t=I){try{return await t()}catch(t){y({error:t,source:"Recorder",scriptType:"module"})}}),V=function(){let t;return{onRumStart(e,n,r,o,i,c,u){const l=o.findTrackedSession();if(!l)return;if(!(0,a.$5)(l.id,r.profilingSampleRate))return;const d=function(t){let e={status:"starting"};return t.register(0,({eventType:t})=>t!==a.bb.VIEW&&t!==a.bb.LONG_TASK?O.$O:{type:t,_kubesense:{profiling:e}}),{get(){return e},set(t){e=t}}}(n);void 0!==(0,s.VZ)().Profiler?N().then(n=>{if(!n)return(0,v.A2)("[KUBESENSE_SDK] Failed to lazy load the RUM Profiler"),void d.set({status:"error",error_reason:"failed-to-lazy-load"});t=n(r,e,o,d,c,u,i,void 0),t.start()}).catch(C.Dx):d.set({status:"error",error_reason:"not-supported-by-browser"})},stop(){null==t||t.stop().catch(C.Dx)}}}(),M=(0,a.AB)(a.rJ,L,V,{startDeflateWorker:k,createDeflateEncoder:p,sdkName:"rum"});(0,i.Z)((0,s.VZ)(),"KUBESENSE_SDK",M)})();
|