});`,status:200}}return null}})}T.default=P,Object.defineProperty(T,"__esModule",{value:!0})}),LWR.define("webruntime/o11yHook/v/1_66_319-244_0",["exports","lwr/loaderLegacy/v/0_9_0","@app/basePath/v/1","@app/apiBasePath/v/1","@salesforce/i18n/lang/v/1","webruntime/dispatcher/v/1","@app/o11yConfiguration/v/1","@app/o11yGuestToken/v/1","@app/isDesignMode/v/1","@app/isMobileAppMode/v/1","@app/isPreviewMode/v/1","@app/versionKey/v/1","@salesforce/site/Id/v/1"],function(T,V,ue,ne,ce,Y,P,C,N,j,_,_e,oe){"use strict";function S(u){return u&&typeof u=="object"&&"default"in u?u:{default:u}}var ie=S(ue),st=S(ne),ve=S(ce),Q=S(Y),ze=S(P),Te=S(C),Le=S(N),dr=S(j),W=S(_),Me=S(_e),B=S(oe);function at(u,t){var r=Object.keys(u);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(u);t&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(u,s).enumerable})),r.push.apply(r,i)}return r}function ke(u){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?at(Object(r),!0).forEach(function(i){ni(u,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(u,Object.getOwnPropertyDescriptors(r)):at(Object(r)).forEach(function(i){Object.defineProperty(u,i,Object.getOwnPropertyDescriptor(r,i))})}return u}function ni(u,t,r){return t=K(t),t in u?Object.defineProperty(u,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):u[t]=r,u}function K(u){var t=Ut(u,"string");return typeof t=="symbol"?t:String(t)}function Ut(u,t){if(typeof u!="object"||u===null)return u;var r=u[Symbol.toPrimitive];if(r!==void 0){var i=r.call(u,t||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(u)}const xt={};var ii=Object.freeze({__proto__:null,_o11y:xt});class L{constructor(t){if(this._lazyMap=new Map,t!==void 0){if(typeof t=="number"&&t>0){this._maxSize=Math.ceil(t);return}throw new Error("maxSize must be a positive number")}}get maxSize(){return this._maxSize}get size(){return this._lazyMap.size}push(t,r){let i=this._lazyMap.get(t);if(!i){if(this.maxSize!==void 0&&this.size===this.maxSize)return!1;i=new Array,this._lazyMap.set(t,i)}return i.push(r),!0}getMessages(t,r){const i=this._lazyMap.get(t);return r&&this._lazyMap.has(t)&&this._lazyMap.set(t,[]),i||[]}getAllMessages(t){const r=new Map;for(const[i,s]of this._lazyMap.entries())s.length&&r.set(i,this.getMessages(i,t));return r}extractMessages(t){return this.getMessages(t,!0)}extractAllMessages(){return this.getAllMessages(!0)}get totalItemCount(){let t=0;for(const r of this._lazyMap.values())t+=r.length;return t}}class vt{constructor(){this.notImplemented="Method not implemented.";const t=typeof performance!="undefined";t?performance.timeOrigin?this._timeOrigin=performance.timeOrigin:this._timeOrigin=Date.now():this._timeOrigin=Date.now();const r=this._timeOrigin;t&&typeof performance.now=="function"?(this.perfNow=performance.now.bind(performance),this.time=()=>{const i=this.perfNow();return{tsNow:r+i,perfNow:i,timeOrigin:r}}):(this.perfNow=()=>Date.now()-r,this.time=()=>{const i=this.perfNow();return{tsNow:Date.now(),perfNow:i,timeOrigin:r}})}get isProduction(){return vt._isProduction}markProduction(){vt._isProduction=!0}_checkArgument(t,r){if(typeof r=="string")return typeof t===r;if(typeof r=="function")return t instanceof r;if(Array.isArray(r))return r.some(i=>this._checkArgument(t,i));throw new Error(`Invalid argKind ${r}`)}requireArgument(t,r,i){let s=t==null||t==="";const l=i!==void 0;if(!s&&l&&(s=!this._checkArgument(t,i)),s)throw new Error(`${r} argument is required${l?" and must be of a supported type.":"."}`)}requireArgumentIfDefined(t,r,i){if(t===void 0)return!1;if(t===null||t===""||!this._checkArgument(t,i))throw new Error(`${r} argument, if defined, must be of a supported type.`);return!0}checkForDenyListedValues(t,r,i){if(i.some(s=>t===s))throw new Error(`The value ${t} isn't allowed for ${r} argument.`)}checkForReservedCharacters(t,r,i){if(t&&i.some(s=>t.indexOf(s)>=0))throw new Error(`The argument ${r} isn't allowed to contain characters from ['${i.join(", ")}']. Received: ${t}.`)}generateUniqueId(t=16){const r=[],i="0123456789abcdef";if(!(t===void 0||t>0))throw new Error('If specified, the argument "length" must be a positive integer');for(let s=0;s<t;s++){const l=Math.floor(Math.random()*16);r.push(i[l])}return r.join("")}getXpath(t){function r(l){const c=l.localName;for(;l.nextElementSibling;)if(l=l.nextElementSibling,l.localName===c)return!0;return!1}function i(l,c){return l?i(l.previousElementSibling,c||l.localName)+(l.localName===c?1:0):1}function s(l){if(!l||l.nodeType!==1)return[""];const c=i(l)>1||r(l)?`${l.localName.toLowerCase()}[${i(l)}]`:l.localName.toLowerCase();return[...s(l.parentNode),c]}return s(t).join("/")}getAge(t){return t-this._timeOrigin}getConnectionType(){var t;let r;if(typeof navigator!="undefined"){const i=navigator;r=(t=i==null?void 0:i.connection)===null||t===void 0?void 0:t.effectiveType}return r}clone(t){return JSON.parse(JSON.stringify(t))}definedValueOrDefault(t,r){return t!==void 0?t:r}getGlobal(){if(typeof globalThis=="object")return globalThis;if(typeof self=="object")return self;throw new Error("Unable to locate globalThis or self")}getIsBeaconSupported(){var t;const r=this.getGlobal();return typeof((t=r.navigator)===null||t===void 0?void 0:t.sendBeacon)=="function"&&typeof r.Blob=="function"}estimateObjectSize(t){const r=new Set,i=[t];let s=0;for(;i.length;){const l=i.pop();if(typeof l=="boolean")s+=4;else if(typeof l=="string")s+=l.length*2;else if(typeof l=="number")s+=8;else if(l instanceof Uint8Array||l instanceof Uint8ClampedArray||l instanceof Uint16Array||l instanceof Uint32Array||l instanceof Int8Array||l instanceof Int16Array||l instanceof Int32Array||l instanceof Float32Array||l instanceof Float64Array)s+=l.byteLength;else if(typeof l=="object"){const c=l;if(!r.has(c)){r.add(c);for(const f in c)i.push(c[f])}}}return s}noProdThrow(t){if(!h.isProduction)throw t}}vt._isProduction=!1;const h=Object.freeze(new vt);class Ye{constructor(t){this._errorCounter=t,this._safeCatchMode=!1}tryCatch(t){try{t()}catch(r){this._prodSafeCatch(r)}}tryCatchReturn(t,r){try{return h.requireArgument(r,"noopValue"),t()}catch(i){return this._prodSafeCatch(i),r}}_prodSafeCatch(t){let r;try{if(r=!h.isProduction,r)throw t;if(this._safeCatchMode)throw this._safeCatchMode=!1,new Error("Internal error in prodSafeCatch.");if(this._safeCatchMode=!0,this._errorCounter&&this._errorCounter.increment(),!(t instanceof Error)){const i=t&&t.message||(typeof t.toString=="function"?t.toString():"");t=new Error(i)}this._safeCatchMode=!1}catch(i){if(r)throw i;if(i&&console&&typeof console.error=="function")try{console.error(i)}catch(s){}this._safeCatchMode=!1}}}class oi{getSchemaId(t){return`${t.namespace}.${t.name}`}isInternal(t){return(t==null?void 0:t.namespace)==="sf.instrumentation"}makePayload(t,r,i=!0){if(!i||t!==void 0&&r!==void 0)return{schema:t,payload:r}}checkSchema(t){h.requireArgument(t,"schema","object"),h.requireArgument(t.namespace,"schema.namespace","string"),h.requireArgument(t.name,"schema.name","string"),h.requireArgument(t.pbjsSchema,"schema.pbjsSchema","object");const r=t.namespace.split(".");if(r.length!==2)throw new Error(`Schema "${this.getSchemaId(t)}" must have a namespace of the form "domain.feature".`);return{domain:r[0],feature:r[1],message:t.name}}_getAnyNestedObject(t,r){return r.reduce((i,s)=>{const l=i.nested;if(l){const c=l[s];if(c)return c}throw new Error(`Cannot locate ${r.join(".")} in schema with ID ${this.getSchemaId(t)}`)},t.pbjsSchema)}getTypes(t){const r=this.checkSchema(t),s=this._getAnyNestedObject(t,[r.domain,r.feature]).nested;if(!s)throw new Error(`Cannot parse schema with ID ${this.getSchemaId(t)}`);return s}getType(t,r){h.requireArgument(r,"messageName","string");const s=this.getTypes(t)[r];if(!s)throw new Error(`Cannot locate message ${r} in schema with ID ${this.getSchemaId(t)}`);return s}getOptions(t,r,i){i&&h.requireArgument(r,"messageName","string");const s=this.checkSchema(t);if(!r)return this._getAnyNestedObject(t,[s.domain,s.feature]).options;const l=this.getType(t,r);if(!i)return l.options;const c=l.fields[i];if(!c){const f=this.getSchemaId(t);throw new Error(`Cannot locate field ${i} in message ${r} in schema with ID ${f}`)}return c.options}}const H=new oi;var bt=Object.freeze({__proto__:null,LazyMapToList:L,PublicSafety:Ye,schemaUtil:H,utility:h});const si={namespace:"sf.instrumentation",name:"Activity",pbjsSchema:{nested:{sf:{nested:{instrumentation:{nested:{Activity:{reserved:[[5,5],[7,7]],fields:{duration:{id:3,type:"double"},stopReason:{id:6,type:"string"},isRoot:{id:8,type:"bool"},timerOverridden:{id:12,type:"uint32"},name:{options:{"(meta.max_length)":25},id:2,type:"string"},isSampled:{id:11,type:"bool"},preRootId:{id:9,type:"string"},id:{id:1,type:"string"},userPayload:{id:4,type:"Payload"},errorCount:{id:10,type:"uint32"},parentId:{id:13,type:"string"}}},Payload:{fields:{payload:{id:2,type:"bytes"},schemaName:{id:1,type:"string"}}}}}}}}}},ai={namespace:"sf.instrumentation",name:"Error",pbjsSchema:{nested:{sf:{nested:{instrumentation:{nested:{Error:{reserved:[[5,5],[7,7]],fields:{activityId:{id:6,type:"string"},stack:{id:3,type:"string"},name:{id:1,type:"string"},message:{options:{"(meta.max_length)":200},id:2,type:"string"},userPayload:{id:4,type:"Payload"}}},Payload:{fields:{payload:{id:2,type:"bytes"},schemaName:{id:1,type:"string"}}}}}}}}}},li={namespace:"sf.instrumentation",name:"IdleDetectorReport",pbjsSchema:{nested:{sf:{nested:{instrumentation:{nested:{IdleDetectorReport:{fields:{listenerCount:{id:3,type:"uint32"},busyTasks:{rule:"repeated",id:5,type:"string"},busyDurations:{rule:"repeated",id:6,type:"double"},pollableCount:{id:4,type:"uint32"},pollCounts:{rule:"repeated",id:8,type:"double"},logThreshold:{id:2,type:"double"},maxDuration:{id:1,type:"double"},pollables:{rule:"repeated",id:7,type:"string"}}}}}}}}}},ui={namespace:"sf.instrumentation",name:"InstrumentedEvent",pbjsSchema:{nested:{sf:{nested:{instrumentation:{nested:{MouseEvent:{fields:{cancelable:{id:5,type:"bool"},ctrlKey:{id:9,type:"bool"},type:{id:25,type:"string"},button:{id:3,type:"uint32"},offsetX:{id:17,type:"uint32"},eventPhase:{id:12,type:"uint32"},shiftKey:{id:23,type:"bool"},offsetY:{id:18,type:"uint32"},composed:{id:8,type:"bool"},altKey:{id:1,type:"bool"},isTrusted:{id:13,type:"bool"},buttons:{id:4,type:"uint32"},movementY:{id:16,type:"uint32"},clientY:{id:7,type:"uint32"},clientX:{id:6,type:"uint32"},movementX:{id:15,type:"uint32"},defaultPrevented:{id:10,type:"bool"},metaKey:{id:14,type:"bool"},timeStamp:{id:24,type:"double"},bubbles:{id:2,type:"bool"},detail:{id:11,type:"int64"},pageY:{id:20,type:"uint32"},pageX:{id:19,type:"uint32"},screenX:{id:21,type:"uint32"},screenY:{id:22,type:"uint32"}}},InstrumentedEvent:{oneofs:{event:{oneof:["mouseEvent"]}},reserved:[[4,4],"xpath",[6,6],[8,8]],fields:{mouseEvent:{id:7,type:"MouseEvent"},auto:{id:3,type:"bool"},parentComponent:{id:2,type:"string"},ownerComponent:{id:1,type:"string"},userPayload:{id:5,type:"Payload"},simplePath:{id:9,type:"string"}}},Payload:{fields:{payload:{id:2,type:"bytes"},schemaName:{id:1,type:"string"}}}}}}}}}},y={namespace:"sf.instrumentation",name:"Simple",pbjsSchema:{nested:{sf:{nested:{instrumentation:{nested:{Simple:{fields:{text:{options:{"(meta.max_length)":25},id:1,type:"string"}}}}}}}}}};class w{get isBusy(){return this._isOk?this._busyCount>0:void 0}constructor(t,r,i,s){this.name=t,this._doneCallback=i,this._overDoneCallback=s,this._busyCount=0,this._isOk=!0,this._busyCount=r}add(){this._isOk&&(this._busyCount+=1)}done(){this._isOk&&(this._busyCount>0?(this._busyCount-=1,this._busyCount||this._doneCallback()):(this._isOk=!1,this._overDoneCallback()))}}const De=300;class $e{constructor(t){this._taskers=new Map,this._listeners=new Set,this._busyCheckers=new Map,this._logThreshold=De,this._endedTasks=new Array,this._pollableReport=new Array,h.requireArgumentIfDefined(t==null?void 0:t.logThreshold,"options.logThreshold","number")&&(this._logThreshold=t.logThreshold),h.requireArgumentIfDefined(t==null?void 0:t.reportListener,"options.reportListener","function")&&(this._reportListener=t.reportListener),h.requireArgumentIfDefined(t==null?void 0:t.errorListener,"options.errorListener","function")&&(this._errorListener=t.errorListener)}requestIdleDetectedCallback(t){h.requireArgument(t,"callback","function"),this._listeners.size===0&&(this._firstCallbackTime=h.time().perfNow),this._listeners.add(t),this._checkIfLoaded()}_reportTaskEnded(t){if(this._listeners.size){const r=Object.assign({},this._taskers.get(t));this._endedTasks.push(r)}}declareNotifierTaskSingle(t){h.requireArgument(t,"name","string");const r=this._addTasker(t,1);return{get isBusy(){return r.isBusy},done:()=>{r.done(),this._taskers.delete(r)}}}declareNotifierTaskMulti(t,r=0){if(h.requireArgument(t,"name","string"),r!==void 0&&(h.requireArgument(r,"existingBusyCount","number"),!Number.isInteger(r)||r<0))throw new Error("existingBusyCount accepts only non-negative integers");const i=this._addTasker(t,r);return{get isBusy(){return i.isBusy},add:()=>{if(!i.isBusy){const l=this._taskers.get(i);l.start=h.time().perfNow,l.end=void 0}i.add()},done:i.done.bind(i)}}declarePollableTaskMulti(t,r){h.requireArgument(t,"name","string"),h.requireArgument(r,"isBusyChecker","function"),this._busyCheckers.set(r,t)}_addTasker(t,r){const i=new w(t,r,()=>{this._taskers.get(i).end=h.time().perfNow,this._reportTaskEnded(i),this._checkIfLoaded()},()=>{var s;(s=this._errorListener)===null||s===void 0||s.call(this,`Overdone: ${i.name}`),h.noProdThrow(`Tasker '${i.name}' is done too many times.`)});return this._taskers.set(i,{name:t,start:r>0?h.time().perfNow:void 0,end:void 0}),i}_areAllNotifiersIdle(){return!Array.from(this._taskers.keys()).some(t=>t.isBusy)}_getFirstBusyPollable(){const t=Array.from(this._busyCheckers).find(r=>{var i;const s=r[0],l=r[1];try{return s()}catch(c){return(i=this._errorListener)===null||i===void 0||i.call(this,c,`BusyChecker ${l}`),h.noProdThrow(c),!1}});return t?t[1]:void 0}_checkIfLoaded(){!this._listeners.size||(this._timerCheckQueued&&clearTimeout(this._timerCheckQueued),this._areAllNotifiersIdle()&&(this._timerCheckQueued=setTimeout(()=>{this._timerCheckQueued=setTimeout(()=>{this._doubleCheck()},40)},0)))}_doubleCheck(){if(this._timerCheckQueued=void 0,this._areAllNotifiersIdle()){const t=this._getFirstBusyPollable();if(t!==void 0)this._addToPollableReport(t),this._timerCheckQueued=setTimeout(()=>{this._doubleCheck()},15);else{const r=h.time().perfNow-this._firstCallbackTime,i=Array.from(this._listeners.values());this._listeners.clear(),this._firstCallbackTime=void 0;const s=this._endedTasks.splice(0),l=this._pollableReport.splice(0);this._notify(i,r,s,l)}}}_addToPollableReport(t){const r=this._pollableReport.length?this._pollableReport[this._pollableReport.length-1]:void 0;(r==null?void 0:r.name)===t?r.count+=1:this._pollableReport.push({name:t,count:1})}_notify(t,r,i,s){var l;if(r>=this._logThreshold&&this._reportListener){const f=this._getReport(r,t.length,i,s);this._reportListener(f)}t.reverse();const c=h.time().tsNow;for(const[f,g]of t.entries())try{g(c)}catch(p){(l=this._errorListener)===null||l===void 0||l.call(this,p,`Listener #${t.length-1-f}`),h.noProdThrow(p)}}getReport(){const t=h.time().perfNow,r=this._firstCallbackTime>0?t-this._firstCallbackTime:void 0,i=Array.from(this._taskers.entries()).filter(s=>s[0].isBusy).map(s=>({name:s[1].name,start:s[1].start,end:t}));return this._getReport(r,this._listeners.size,this._endedTasks.concat(i),this._pollableReport)}_getReport(t,r,i,s){const l=i.map(c=>({name:c.name,duration:c.end-c.start})).sort((c,f)=>f.duration-c.duration);return{logThreshold:this._logThreshold,maxDuration:t,listenerCount:r,pollableCount:this._busyCheckers.size,busyTasks:l.map(c=>c.name),busyDurations:l.map(c=>c.duration),pollables:s.map(c=>c.name),pollCounts:s.map(c=>c.count)}}}const be=32,hr=16,fr=16,tn="traceparent",Fe="b3",rn="X-B3-TraceId",lt="X-B3-SpanId",pr="X-B3-Sampled",nn="X-B3-ParentSpanId",mr="fetch",Bt="xhr_send";class b{constructor(t,r){this._instr=t,this._idleDetector=r,h.requireArgument(t,"_instr","object"),h.requireArgument(r,"_idleDetector","object")}static _getB3CompactFormat(t,r,i,s){let l=`${t}-${r}`;return(i!==void 0||s!==void 0)&&(l+=i?"-1":"-0",s!==void 0&&(l+=`-${s}`)),l}static _getW3CompactFormat(t,r,i){return`00-${t}-${r}-${i?"01":"00"}`}static _conformTextAsId(t,r){t=t.toLowerCase();const i=t.length;for(let s=0;s<i;s+=1){const l=t[s];if(!(l>="a"&&l<="f")&&!(l>="0"&&l<="9"))throw new Error(`The text '${t}' has an invalid character at index #${s}`)}return i>r?t.substr(i-r):i<r?t.padStart(r,"0"):t}static getHeaders(t,r,i,s){h.requireArgument(t,"traceId","string"),h.requireArgument(r,"spanId","string");const l=s==null?void 0:s.useB3Headers;t=this._conformTextAsId(t,(s==null?void 0:s.traceIdEffectiveLength)!==void 0?s.traceIdEffectiveLength:l?hr:be),r=this._conformTextAsId(r,fr);const c=s&&s.parentSpanId!==void 0&&this._conformTextAsId(s.parentSpanId,fr)||void 0,f={};return l?(s==null?void 0:s.useCompactHeader)?f[Fe]=this._getB3CompactFormat(t,r,i,c):(f[rn]=t,f[lt]=r,c!==void 0&&(f[nn]=c),i!==void 0&&(f[pr]=i?"1":"0")):f[tn]=this._getW3CompactFormat(t,r,i),f}_disableNetworkInstrumentation(){b._isNetworkInstrumentationEnabled&&(b._originalFetch&&(b._global.fetch=b._originalFetch,b._originalFetch=void 0),b._originalXhr&&(b._global.XMLHttpRequest=b._originalXhr,b._originalXhr=void 0),b._originalXhrOpen&&(b._global.XMLHttpRequest.prototype.open=b._originalXhrOpen,b._originalXhrOpen=void 0),b._originalXhrSend&&(b._global.XMLHttpRequest.prototype.send=b._originalXhrSend,b._originalXhrSend=void 0),b._isNetworkInstrumentationEnabled=!1)}_enableNetworkInstrumentation(t,r,i,s,l,c){typeof b._global.fetch=="function"&&(this._overrideFetch(t,r,i,s,l,c),b._isNetworkInstrumentationEnabled=!0),typeof b._global.XMLHttpRequest=="function"&&(this._overrideXhr(t,r,i,s,l,c),b._isNetworkInstrumentationEnabled=!0)}static _getTraceHeaders(t,r,i,s){let l=(t==null?void 0:t.getTraceHeaders(r))||{};if(typeof(r==null?void 0:r.headerProcessor)=="function")l=r.headerProcessor({method:i,url:s,defaultHeaders:l});else if(typeof window=="object"){let c;try{c=new URL(s)}catch(f){}c&&c.host!==window.location.host&&(l=void 0)}return l||{}}_overrideFetch(t,r,i,s,l,c){b._originalFetch=b._global.fetch;const f=async(g,p,...E)=>{let v;try{c==null||c.add();const A=p==null?void 0:p.o11y;if(!(A==null?void 0:A.skipInstr))v=t.startActivity(i||mr);else{b._reqIndex+=1;try{if(g instanceof URL)g.searchParams.append("o11y",b._reqIndex.toString());else if(typeof g=="string"){const O=new URL(g),X=`o11y=${b._reqIndex}`;O.search+=O.search.startsWith("?")?`&${X}`:X,g=O.toString()}}catch(O){}}if(p==null||delete p.o11y,s){let O=p==null?void 0:p.method,X=g==null?void 0:g.toString();g instanceof Request&&(O||(O=g.method),X=g.url);const ye=b._getTraceHeaders(v,l,O,X);!this._applyTraceHeaders(g,p,ye)&&p===void 0&&(p={headers:ye})}return await b._originalFetch.call(b._global,g,p,...E)}catch(A){throw r&&(v?v.error(A):t.error(A)),A}finally{v==null||v.stop(),c==null||c.done()}};b._global.fetch=f}_overrideXhr(t,r,i,s,l,c){b._originalXhr=b._global.XMLHttpRequest,b._originalXhrOpen=b._originalXhr.prototype.open,b._originalXhrSend=b._originalXhr.prototype.send,b._originalXhr.prototype.open=function(g,p,E,v,A){this._o11y={method:g,url:p==null?void 0:p.toString()},b._originalXhrOpen.call(this,g,p,E,v,A)},b._originalXhr.prototype.send=function(...g){let p;try{c==null||c.add();const E=this;if(E._o11y=E._o11y||{},E._o11y.activity=p=t.startActivity(i||Bt),s){const v=b._getTraceHeaders(p,l,E._o11y.method,E._o11y.url);Object.entries(v).forEach(A=>{E.setRequestHeader(A[0],A[1])})}b._originalXhrSend.call(this,...g)}catch(E){throw r&&(p?p.error(E):t.error(E)),p==null||p.stop(),c==null||c.done(),E}};const f=new Proxy(b._originalXhr,{construct(g){const p=new g;return p.addEventListener("load",()=>{var E,v;(v=(E=p._o11y)===null||E===void 0?void 0:E.activity)===null||v===void 0||v.stop(),c==null||c.done()}),p.addEventListener("error",E=>{var v;const A=new Error("XHR Network-Level Error"),O=(v=p._o11y)===null||v===void 0?void 0:v.activity;O?(r&&O.error(A),O.stop()):r&&t.error(A),c==null||c.done()}),p.addEventListener("abort",()=>{var E,v;(v=(E=p._o11y)===null||E===void 0?void 0:E.activity)===null||v===void 0||v.discard(),c==null||c.done()}),p}});b._global.XMLHttpRequest=f}networkInstrumentation(t){var r;if(h.requireArgument(t,"options",["boolean","object"]),this._disableNetworkInstrumentation(),t){const i=typeof t=="object"?t:{};let s;h.definedValueOrDefault(i.useTasker,!0)&&(s=(r=this._idleDetector)===null||r===void 0?void 0:r.declareNotifierTaskMulti("o11y network")),this._enableNetworkInstrumentation(h.definedValueOrDefault(i.instrumentation,this._instr),h.definedValueOrDefault(i.logErrors,!0),i.activityName,h.definedValueOrDefault(i.useTracing,!0),i.tracingHeadersOptions,s)}}resetRequestCounter(){b._reqIndex=0}_applyTraceHeaders(t,r,i){if((r==null?void 0:r.headers)!==void 0){if(r.headers instanceof Headers&&typeof r.headers.set=="function")return Object.entries(i).forEach(([s,l])=>{r.headers.set(s,l)}),!0;if(Array.isArray(r.headers))return Object.entries(i).forEach(s=>{r.headers.push(s)}),!0;if(typeof r.headers=="object")return r.headers=Object.assign(r.headers,i),!0}else{if(t instanceof Request&&t.headers instanceof Headers)return Object.entries(i).forEach(([s,l])=>{t.headers.set(s,l)}),!0;if(r)return r.headers=Object.assign({},i),!0}return!1}}b._global=h.getGlobal(),b._isNetworkInstrumentationEnabled=!1,b._reqIndex=0;var de;(function(u){u[u.none=0]="none",u[u.start=1]="start",u[u.stop=2]="stop",u[u.both=3]="both"})(de||(de={}));const gr="timedout",yr="terminated",_r="discarded",U={timedout:gr,terminated:yr,discarded:_r};class q{constructor(t,r,i,s,l,c,f){this._name=t,this._rootId=r,this._onStopped=i,this._onError=s,this._isSampled=f,this._errorCount=0,this._timerOverridden=de.none;const{tsNow:g,perfNow:p}=h.time();if(q._count+=1,this._id=c||h.generateUniqueId(),this._usePerf=typeof performance!="undefined"&&typeof performance.mark=="function"&&typeof performance.measure=="function",this._usePerf){this._perfName=`${this._name}__${q._count}`,this._perfId=`${this._name}__${this.id}`;try{performance.mark(this._perfId)}catch(E){this._usePerf=!1}}this._startTimestamp=g,this._startPerfTime=p,l>0&&(this._timer=setTimeout(()=>{this._stopReason=this._stopReason||U.timedout,this.stop()},l)),this._safety=new Ye}get id(){return this._id}getId(){return this.id}getRootId(){return this._rootId}get stopReason(){return this._stopReason}error(t,r,i){this._safety.tryCatch(()=>{this._errorCount+=1,typeof t=="string"&&(t=new Error(t)),this._onError(t,this._getDetail(r,i))})}stop(t,r,i){this._safety.tryCatch(()=>{if(h.requireArgumentIfDefined(t,"userSchemaOrText",["object","string"]),h.requireArgumentIfDefined(r,"userData","object"),i){const s=i.perfStartOverride,l=h.requireArgumentIfDefined(s,"options.perfStartOverride","number"),c=i.perfStopOverride,f=h.requireArgumentIfDefined(c,"options.perfStopOverride","number");if(l&&s<0)throw new Error("perfStartOverride, if defined, must be >= 0");if(f&&(c<0||c<(l?s:this._startPerfTime)))throw new Error("perfStopOverride, if defined, must be >= 0 and >= startTime")}this._stopInternal(t,r,i)})}_overrideTimer(t,r){t!==void 0&&(this._startTimestamp=Math.round(this._startTimestamp-(this._startPerfTime-t)),this._startPerfTime=t,this._setTimerOverride(de.start)),r!==void 0&&(this._stopPerfTime=r,this._setTimerOverride(de.stop))}_setTimerOverride(t){this._timerOverridden===de.both||this._timerOverridden===t||t===de.none||(this._timerOverridden=this._timerOverridden===de.none?t:de.both)}_stopInternal(t,r,i){const s=h.perfNow();if(this._usePerf)try{this._stopReason!==U.discarded&&performance.measure(this._perfName,this._perfId),performance.clearMarks(this._perfId),performance.clearMeasures(this._perfName)}catch(c){}if(this._timer&&(clearTimeout(this._timer),this._timer=void 0),this.isStopped)return;i&&this._overrideTimer(i.perfStartOverride,i.perfStopOverride),this._stopPerfTime=this._timerOverridden===de.none||this._timerOverridden===de.start?s:this._stopPerfTime;const l=this._getDetail(t,r);this._onStopped(l)}get isStopped(){return this._stopPerfTime!==void 0}discard(){this._safety.tryCatch(()=>{this._stopReason=this._stopReason||U.discarded,this.stop()})}terminate(t,r,i){this._safety.tryCatch(()=>{this._stopReason=this._stopReason||U.terminated,this.stop(t,r,i)})}getIsSampled(){return this._isSampled||!1}_getDetail(t,r){return{id:this._id,rootId:this._rootId,name:this._name,userSchemaOrText:t,userData:r,stopReason:this._stopReason,startTimestamp:this._startTimestamp,startPerfTime:this._startPerfTime,stopPerfTime:this._stopPerfTime,errorCount:this._errorCount,isSampled:this.getIsSampled(),timerOverridden:this._timerOverridden}}getTraceHeaders(t){const r=this.id,i=this._rootId||r;return b.getHeaders(i,r,this.getIsSampled(),t)}getStartTimestamp(){return this._startTimestamp}getStartPerfTime(){return this._startPerfTime}getStopPerfTime(){return this._stopPerfTime}}q._count=0;const He=new Array(16).fill(0).join("");class ci{getId(){return He}getRootId(){}error(){}stop(){}discard(){}terminate(){}getIsSampled(){return!1}getTraceHeaders(t){return{}}getStartTimestamp(){}getStartPerfTime(){}getStopPerfTime(){}}const on=Object.freeze(new ci);class sn{getInstrumentedEventData(t,r,i){var s;const l={ownerComponent:r.tagName,parentComponent:((s=r.parentElement)===null||s===void 0?void 0:s.tagName)||void 0,event:t,simplePath:h.getXpath(r)};return i&&(l.userPayload=H.makePayload(i.schema,i.payload,!0)),l}getMouseEventData(t){return{altKey:t.altKey,bubbles:t.bubbles,button:t.button,buttons:t.buttons,cancelable:t.cancelable,clientX:t.clientX,clientY:t.clientY,composed:t.composed,defaultPrevented:t.defaultPrevented,detail:t.detail,eventPhase:t.eventPhase,isTrusted:t.isTrusted,timeStamp:t.timeStamp,type:t.type,ctrlKey:t.ctrlKey,metaKey:t.metaKey,movementX:t.movementX,movementY:t.movementY,offsetX:t.offsetX,offsetY:t.offsetY,pageX:t.pageX,pageY:t.pageY,screenX:t.screenX,screenY:t.screenY,shiftKey:t.shiftKey}}}const vr=new sn,qt=1e4,br=1e4,wt=0,di=2147483647,ln=-2147483648,wr=4294967295,he=9223372036854776e3,un=-9223372036854776e3,cn=18446744073709552e3;class Er{constructor(t,r,i,s){this.errorCode=t,this.fields=r,this.expected=i,this.received=s}asMessage(t){const r=this.fields[0]+this.fields.slice(1).reduce((s,l)=>Number(l)>=0?`${s}[${l}]`:`${s}.${l}`,"");let i;switch(this.errorCode){case 1:i="Repeated field must be an array";break;case 2:i=`Expected type ${this.expected} but received type ${this.received}`;break;case 3:i="Value must be finite";break;case 4:i="Value is out of range for its type";break;case 5:i="Bytes array is malformed";break;case 6:i="Exceeded app limit for maximum string length";break;case 7:i="Exceeded app limit for item count";break;case 12:i="Value must be an integer";break;case 13:i="Values like null or undefined are not allowed for items in repeated fields";break;default:i=`Unknown error code: ${this.errorCode}`;break}return`Schema ${t} on field "${r}": ${i}`}}class dn{validate(t,r,i=!1){const s=H.checkSchema(t);h.requireArgument(r,"data","object");const l=H.getSchemaId(t),c=new Array,f=H.getTypes(t);if(this._validateFields(c,[],r,f[s.message],f,l),c.length&&!i)throw new Error(c[0].asMessage(l));return c}_validateFields(t,r,i,s,l,c){const f=s.oneofs||{},g=s.fields||{};for(const p in i){const E=i[p];if(E!=null){const v=(A,O,X)=>this._matchFieldTypes(t,[...r,p],E,A,l,c,p,O,X);f[p]?v(g[f[p].oneof[0]].type):g[p]&&v(g[p].type,g[p].rule==="repeated")}}}_matchFieldTypes(t,r,i,s,l,c,f,g,p){let E;if(g)Array.isArray(i)?(i.length>br&&(E=7),i.forEach((v,A)=>{this._matchFieldTypes(t,[...r,A.toString()],v,s,l,c,f,void 0,!0)})):E=1;else if(i==null||i===void 0)p&&(E=13);else{let v,A;switch(s){case"string":A="string",i.length>qt&&(E=6);break;case"bytes":A="object",i instanceof Uint8Array||(E=5);break;case"bool":A="boolean";break;case"uint32":A="number",v={min:wt,max:wr,isInt:!0,isItem:p};break;case"int32":case"sint32":case"fixed32":case"sfixed32":A="number",v={min:ln,max:di,isInt:!0,isItem:p};break;case"uint64":A="number",v={min:wt,max:cn,isInt:!0,isItem:p};break;case"fixed64":case"sfixed64":case"int64":case"sint64":A="number",v={min:un,max:he,isInt:!0,isItem:p};break;case"double":case"float":A="number",v={min:Number.NEGATIVE_INFINITY,max:Number.POSITIVE_INFINITY,isInt:!1,isItem:p};break;default:new Set(Object.keys(l)).has(s)&&(this._validateFields(t,r,i,l[s],l,c),A="object");break}typeof i!==A?t.push(new Er(2,r,s,typeof i)):v&&(v.isInt&&!Number.isFinite(i)?E=3:v.isInt&&!Number.isInteger(i)?E=12:!(!v.isInt&&Number.isNaN(i))&&!(i>=v.min&&i<=v.max)&&(E=4))}E&&t.push(new Er(E,r))}}const Tr=new dn;class hn{constructor(t,r,i,s,l){this._name=t,this._ownerName=r,this._ownerAppName=i,this._tags=s,this._buckets=l,this._values=new Array,this._createdOn=h.time().tsNow}getName(){return this._name}getCreatedOn(){return this._createdOn}getLastUpdatedOn(){return this._lastUpdatedOn}getData(){return this.values}getBuckets(){return this.buckets}get buckets(){return this._buckets.slice(0,this._buckets.length)}get values(){return this._values.slice(0,this._values.length)}record(t){if(typeof t=="number"){this._values.push(t),this._lastUpdatedOn=h.time().tsNow;return}throw new Error("BucketHistogram can only record numbers.")}reset(){this._lastUpdatedOn=void 0,this._values=[]}getOwnerName(){return this._ownerName}getOwnerAppName(){return this._ownerAppName}getTags(){return this._tags}}class fn{constructor(t,r,i,s){this._name=t,this._ownerName=r,this._ownerAppName=i,this._tags=s,this._value=0,this._createdOn=h.time().tsNow}getName(){return this._name}getCreatedOn(){return this._createdOn}getLastUpdatedOn(){return this._lastUpdatedOn}getData(){return this._value}increment(t=1){if(typeof t=="number"&&t>0){this._value+=Math.round(t),this._lastUpdatedOn=h.time().tsNow;return}throw new Error("UpCounter can only increment positive numbers.")}reset(){this._lastUpdatedOn=void 0,this._value=0}getOwnerName(){return this._ownerName}getOwnerAppName(){return this._ownerAppName}getTags(){return this._tags}}class pn{constructor(t,r,i,s){this._name=t,this._ownerName=r,this._ownerAppName=i,this._tags=s,this._values=new Array,this._createdOn=h.time().tsNow}getName(){return this._name}getCreatedOn(){return this._createdOn}getLastUpdatedOn(){return this._lastUpdatedOn}getData(){return this.values}get values(){return this._values.slice(0,this._values.length)}record(t){if(typeof t=="number"){this._values.push(t),this._lastUpdatedOn=h.time().tsNow;return}throw new Error("ValueRecorder can only record numbers.")}reset(){this._lastUpdatedOn=void 0,this._values=[]}getOwnerName(){return this._ownerName}getOwnerAppName(){return this._ownerAppName}getTags(){return this._tags}}class ge{constructor(t){if(this._map=new Map,typeof t=="number"&&t>0){this._maxSize=Math.ceil(t);return}throw new Error("maxSize must be a positive number")}get maxSize(){return this._maxSize}get(t){return this._map.get(t)}has(t){return this._map.has(t)}set(t,r){return this.has(t)||this._map.size<this.maxSize?(this._map.set(t,r),!0):!1}getElements(){return Array.from(this._map.values())}clear(){this._map.clear()}}const Gt=1e3,Se=500,Vt=500;var J;(function(u){u[u.Counter=0]="Counter",u[u.Percentile=1]="Percentile",u[u.BucketHistogram=2]="BucketHistogram"})(J||(J={}));class jt{constructor(t,r){this._ownerName=t,this._getOwnerAppName=r,this._upCounters=new ge(Gt),this._valueRecorders=new ge(Se),this._bucketHistograms=new ge(Vt)}incrementCounter(t,r,i=!1,s={}){this._tagError(s,i),this._upCounter(t,s).increment(r)}trackValue(t,r,i=!1,s={}){this._tagError(s,i),this._valueRecorder(t,s).record(r)}bucketValue(t,r,i,s=!1,l={}){this._tagError(l,s),this._bucketHistogram(t,l,i).record(r)}_bucketHistogram(t,r,i){const{key:s,sortedTags:l}=this._getKeyAndSortedTags(t,r,J.BucketHistogram);let c=this._bucketHistograms.get(s);if(!c&&(c=new hn(t,this._ownerName,this._getOwnerAppName(),l,i),!this._bucketHistograms.set(s,c)))throw new Error(`Max size of ${Vt} exceeded for BucketHistograms`);return c}_upCounter(t,r){const{key:i,sortedTags:s}=this._getKeyAndSortedTags(t,r,J.Counter);let l=this._upCounters.get(i);if(!l&&(l=new fn(t,this._ownerName,this._getOwnerAppName(),s),!this._upCounters.set(i,l)))throw new Error(`Max size of ${Gt} exceeded for UpCounters`);return l}_valueRecorder(t,r){const{key:i,sortedTags:s}=this._getKeyAndSortedTags(t,r,J.Percentile);let l=this._valueRecorders.get(i);if(!l&&(l=new pn(t,this._ownerName,this._getOwnerAppName(),s),!this._valueRecorders.set(i,l)))throw new Error(`Max size of ${Se} exceeded for ValueRecorders`);return l}getUpCounters(){return this._upCounters.getElements()}getValueRecorders(){return this._valueRecorders.getElements()}getBucketHistograms(){return this._bucketHistograms.getElements()}_tagError(t,r){t.status=r===!0?"error":"success"}_getKeyAndSortedTags(t,r,i){const s=Object.keys(r).sort().reduce((c,f)=>(c[f]=r[f],c),{});return{key:`${J[i]}:${t}${JSON.stringify(s)}`,sortedTags:s}}}class Qe{constructor(){this.isMock=!0}}const mn=void 0,Et=["`"],Sr={internalError:"o11y-error"},Ue=Object.freeze(Array.from(Object.values(Sr)));class ut{constructor(t,r){this._nextGen=t,this._name=r,this._onActivityStoppedCallback=this._handleActivityStop.bind(this),this._onActivityErrorCallback=this._handleActivityError.bind(this);for(const s of Et)if(this._name.indexOf(s)>=0)throw new Error(`Name cannot include the reserved character "${s}"`);this._safety=new Ye({increment:s=>this._incrementError(s)}),this._metrics=this._initMetrics();const i=H.getOptions(y,"Simple","text");this._simpleTextMaxLength=i?i["(meta.max_length)"]:qt}_initMetrics(){return new jt(this.name,()=>this._nextGen.appName||ut.defaultAppName)}_incrementError(t=1){this._metrics.incrementCounter(Sr.internalError,t,!1)}get name(){return this._name}_wrapUserPayload(t,r,i=!1){let s;return typeof t=="string"?(s=y,t?r={text:t.substring(0,this._simpleTextMaxLength)}:r=void 0):s=t,H.makePayload(s,r,i)}_getEffectiveRootId(t){var r,i;return(i=(r=t==null?void 0:t.instrumentationContext)===null||r===void 0?void 0:r.rootId)!==null&&i!==void 0?i:this._nextGen.getDefaultInstrumentationContext().rootId}log(t,r,i){this._safety.tryCatch(()=>{const s=h.time().tsNow;h.requireArgument(t,"userSchemaOrText",["object","string"]),h.requireArgumentIfDefined(r,"userData","object"),h.requireArgumentIfDefined(i,"options","object");const l=this._wrapUserPayload(t,r);(l==null?void 0:l.payload)&&this._logInternal(this.name,l.schema,l.payload,s,this._getEffectiveRootId(i))})}_logInternal(t,r,i,s,l){this._checkInputs(r,i);const c=this._getPayloadFromProvider(this._nextGen.appPayloadProvider),f=this._getPayloadFromProvider(this._nextGen.pagePayloadProvider);return this._nextGen.addLog(t,r,i,s,l,f,c)}error(t,r,i,s){return this._safety.tryCatch(()=>{h.requireArgumentIfDefined(r,"userSchemaOrText",["object","string"]),h.requireArgumentIfDefined(i,"userData","object"),h.requireArgumentIfDefined(s,"options","object");const l=this._getEffectiveRootId(s);this._errorInternal(t,r,i,void 0,l)})}_errorInternal(t,r,i,s,l){const c=h.time().tsNow;let f;if(t instanceof Error)f=t;else{let E;t==null||typeof t.toString!="function"?E="UNKNOWN":E=t.toString(),f=new Error(E)}const g=this._wrapUserPayload(r,i,!0),p={name:f.name,message:f.message,stack:f.stack,userPayload:g,activityId:s};return this._logInternal(this.name,ai,p,c,l)}startActivity(t,r){return this._safety.tryCatchReturn(()=>{var i;h.requireArgument(t,"name"),h.requireArgumentIfDefined(r,"options","object");let s;const l=(i=r==null?void 0:r.instrumentationContext)===null||i===void 0?void 0:i.rootId;return l?s={rootId:l,isRootActivitySampled:r.instrumentationContext.isRootActivitySampled}:s=this._nextGen.getDefaultInstrumentationContext(),new q(t,s.rootId,this._onActivityStoppedCallback,this._onActivityErrorCallback,mn,void 0,s.isRootActivitySampled)},on)}_getActivityData(t){const r=this._wrapUserPayload(t.userSchemaOrText,t.userData,!0);return{id:t.id,name:t.name,duration:t.stopPerfTime-t.startPerfTime,stopReason:t.stopReason,userPayload:r,errorCount:t.errorCount,isSampled:t.isSampled,timerOverridden:t.timerOverridden}}_handleActivityStop(t){if(t.stopReason===_r)return;const r=this._getActivityData(t);this._logActivity(r,t.startTimestamp,t.rootId)}_logActivity(t,r,i){this._logInternal(this.name,si,t,r,i)}_handleActivityError(t,r){this._errorInternal(t,r.userSchemaOrText,r.userData,r.id,r.rootId)}_getPayloadFromProvider(t){const r=(t==null?void 0:t.getPayload())||void 0;return r&&this._checkInputs(r.schema,r.payload),r}domEvent(t,r,i,s,l){this._safety.tryCatch(()=>{var c;const f=h.time().tsNow;h.requireArgument(t,"event",[Event,Qe]),h.requireArgument(r,"handledBy",[HTMLElement,"object"]);let g;r instanceof HTMLElement?g=r:(r=r,((c=r.template)===null||c===void 0?void 0:c.host)instanceof HTMLElement?g=r.template.host:h.requireArgument(void 0,"handledBy"));const p=this._wrapUserPayload(i,s,!0),E=this._getEffectiveRootId(l);switch(t.type){case"click":{const v=t,A=this._nextGen.getClickTracker();A&&A.markEventHandled(v);const O=vr.getMouseEventData(v),X=vr.getInstrumentedEventData(O,g,p);X.auto=l==null?void 0:l._auto,this._logInternal(this.name,ui,X,f,E);break}default:throw new Error(h.notImplemented)}})}incrementCounter(t,r=1,i=!1,s={}){this._safety.tryCatch(()=>{h.requireArgument(t,"operation","string"),h.checkForDenyListedValues(t,"operation",Ue),h.checkForReservedCharacters(t,"operation",Et),h.requireArgument(r,"increment","number"),h.requireArgument(i,"hasError","boolean"),h.requireArgument(s,"tags","object"),Object.entries(s).forEach(l=>{h.requireArgument(l[1],`Tag value for '${l[0]}'`,["string","number","boolean"])}),this._metrics.incrementCounter(t,r,i,s)})}trackValue(t,r,i=!1,s={}){this._safety.tryCatch(()=>{h.requireArgument(t,"operation","string"),h.checkForDenyListedValues(t,"operation",Ue),h.checkForReservedCharacters(t,"operation",Et),h.requireArgument(r,"value","number"),h.requireArgument(i,"hasError","boolean"),h.requireArgument(s,"tags","object"),Object.entries(s).forEach(l=>{h.requireArgument(l[1],`Tag value for '${l[0]}'`,["string","number","boolean"])}),this._metrics.trackValue(t,r,i,s)})}bucketValue(t,r,i=[],s=!1,l={}){this._safety.tryCatch(()=>{h.requireArgument(t,"operation","string"),h.checkForDenyListedValues(t,"operation",Ue),h.checkForReservedCharacters(t,"operation",Et),h.requireArgument(r,"value","number"),h.requireArgument(i,"buckets",Array),Object.entries(i).forEach(c=>{h.requireArgument(c[1],`Bucket value for '${c[0]}'`,"number")}),h.requireArgument(s,"hasError","boolean"),h.requireArgument(l,"tags","object"),Object.entries(l).forEach(c=>{h.requireArgument(c[1],`Tag value for '${c[0]}'`,["string","number","boolean"])}),this._metrics.bucketValue(t,r,i,s,l)})}_checkInputs(t,r){H.checkSchema(t),h.requireArgument(r,"data","object");let i,s;r.userPayload!==void 0&&H.isInternal(t)&&(s=r.userPayload,i=Tr.validate(s.schema,s.payload,!0),this._processValidationResults(H.getSchemaId(s.schema),s.payload,i),r.userPayload=void 0),i=Tr.validate(t,r,!0),this._processValidationResults(H.getSchemaId(t),r,i),s!==void 0&&(r.userPayload=s)}_processValidationResults(t,r,i){for(let s=0;s<i.length;s+=1){const l=i[s];if(l.errorCode==6||l.errorCode==7){const c=l.fields.length-1,f=this._traverseFields(r,l.fields.slice(0,c)),g=l.fields[c];l.errorCode==6?f[g]=f[g].substring(0,qt):f[g].splice(br)}else throw new Error(l.asMessage(t))}}_traverseFields(t,r){return r.length?this._traverseFields(t[r[0]],r.slice(1)):t}getUpCounters(){return this._metrics.getUpCounters().filter(t=>t.getLastUpdatedOn())}getValueRecorders(){return this._metrics.getValueRecorders().filter(t=>t.getLastUpdatedOn())}getBucketHistograms(){return this._metrics.getBucketHistograms().filter(t=>t.getLastUpdatedOn())}registerForLogPrompt(t){h.requireArgument(t,"listener","function"),this._nextGen.registerForLogPrompt(t)}activity(t,r,i){var s,l,c,f;const g=this.startActivity(t,i);try{return r(g)}catch(p){throw g.error(p,(s=i==null?void 0:i.errorPayload)===null||s===void 0?void 0:s.schema,(l=i==null?void 0:i.errorPayload)===null||l===void 0?void 0:l.payload),p}finally{g.stop((c=i==null?void 0:i.stopPayload)===null||c===void 0?void 0:c.schema,(f=i==null?void 0:i.stopPayload)===null||f===void 0?void 0:f.payload)}}async activityAsync(t,r,i){var s,l,c,f;const g=this.startActivity(t,i);try{return await r(g)}catch(p){throw g.error(p,(s=i==null?void 0:i.errorPayload)===null||s===void 0?void 0:s.schema,(l=i==null?void 0:i.errorPayload)===null||l===void 0?void 0:l.payload),p}finally{g.stop((c=i==null?void 0:i.stopPayload)===null||c===void 0?void 0:c.schema,(f=i==null?void 0:i.stopPayload)===null||f===void 0?void 0:f.payload)}}}ut.defaultAppName="APP_NOT_REGISTERED";class xe extends q{constructor(t,r,i,s,l){super(t,void 0,r,i,void 0,s||h.generateUniqueId(32),l)}get preRootId(){return this._preRootId}set preRootId(t){this._preRootId=t}_getDetail(t,r){const i=super._getDetail(t,r);return i.isRoot=!0,i.preRootId=this.preRootId,i}}const gn=new Array(32).fill(0).join("");class Nr{getId(){return gn}getRootId(){}error(){}stop(){}discard(){}terminate(){}getIsSampled(){return!1}getTraceHeaders(t){return{}}getStartTimestamp(){}getStartPerfTime(){}getStopPerfTime(){}}const yn=Object.freeze(new Nr);class _n extends ut{constructor(t,r,i){super(t,r);this._allowMulti=i,this._onRootActivityStoppedCallback=this._handleRootActivityStop.bind(this)}startRootActivity(t,r,i){return this._safety.tryCatchReturn(()=>{h.requireArgument(t,"name");const s=new xe(t,this._onRootActivityStoppedCallback,this._onActivityErrorCallback,r,i);if(!this._allowMulti){if(this._singleRootActivity&&!this._singleRootActivity.isStopped){const l=this._singleRootActivity.getId();this._singleRootActivity.terminate(),s.preRootId=l}this._singleRootActivity=s}return s},yn)}_handleRootActivityStop(t){if(t.stopReason===_r)return;const r=this._getActivityData(t);this._logActivity(r,t.startTimestamp),this._singleRootActivity=void 0}_getActivityData(t){const r=super._getActivityData(t);return r.isRoot=t.isRoot,r.preRootId=t.preRootId,r}getSingleRootActivityId(){var t;return(t=this._singleRootActivity)===null||t===void 0?void 0:t.getId()}isSingleRootActivitySampled(){var t;return(t=this._singleRootActivity)===null||t===void 0?void 0:t.getIsSampled()}_initMetrics(){return new jt(this.name,()=>this.name)}}const vn=5;class bn{constructor(t,r){this._instr=t,this._doc=r,this._isActive=!1,this._boundClickListener=this._clickListener.bind(this),h.requireArgument(t,"_instr"),h.requireArgument(r,"_doc")}activate(){this._isActive||(this._doc.addEventListener("click",this._boundClickListener,!0),this._isActive=!0)}deactivate(){this._isActive&&(this._doc.removeEventListener("click",this._boundClickListener,!0),this._isActive=!1)}markEventHandled(t){this._ignoredEvent=t}_clickListener(t){var r;let i=(r=t.composedPath)===null||r===void 0?void 0:r.call(t);(!i||!i.length)&&(i=t.path);const s=this._getClickableElement(i);s&&setTimeout(()=>{t!==this._ignoredEvent&&this._instr.domEvent(t,s,void 0,void 0,{_auto:!0})})}_getClickableElement(t){var r,i;const s=t?Math.min(t.length,vn):0;for(let l=0;l<s;l+=1){const c=t[l],f=(r=c.tagName)===null||r===void 0?void 0:r.toLowerCase();if(f==="a"||f==="button")return c;if(f==="input"){const g=c;if(((i=g.type)===null||i===void 0?void 0:i.toLowerCase())==="button")return g}}}}const ct=80,Wt="_CUT",Cr=ct-Wt.length;class Be{get pagePayloadProvider(){return this._pagePayloadProvider}set pagePayloadProvider(t){this._pagePayloadProvider=t}get appPayloadProvider(){return this._appPayloadProvider}set appPayloadProvider(t){this._appPayloadProvider=t}constructor(t){this._idleDetector=t,this._logCollectors=new Set,this._instruments=new Map,this._seqBySchema=new Map,this._sequence=0,this._forceDisabledLogCollectors=new Set,this._logCollectorFailures=new Map,this._isBufferingEnabled=!1,this._buffer=[],this._logCollectionListeners=new Set}registerApp(t,r){var i;if(h.requireArgument(t,"name","string"),this._appInstr)throw new Error("An app has already been registered with instrumentation.");if(this._instruments.get(t))throw new Error(`The instrumentation name ${t} is already taken`);this._clientSessionId=((i=r==null?void 0:r.clientSessionId)===null||i===void 0?void 0:i.toString())||h.generateUniqueId(),this._appInstr=new _n(this,t,r==null?void 0:r.allowMultipleRootActivities),this._instruments.set(t,this._appInstr),this._isBufferingEnabled=r==null?void 0:r.enableBuffering;const l=new b(this.getInstrumentation("Network"),this._idleDetector);return{log:this._appInstr.log.bind(this._appInstr),error:this._appInstr.error.bind(this._appInstr),startActivity:this._appInstr.startActivity.bind(this._appInstr),domEvent:this._appInstr.domEvent.bind(this._appInstr),incrementCounter:this._appInstr.incrementCounter.bind(this._appInstr),trackValue:this._appInstr.trackValue.bind(this._appInstr),bucketValue:this._appInstr.bucketValue.bind(this._appInstr),networkInstrumentation:l.networkInstrumentation.bind(l),registerForLogPrompt:this._appInstr.registerForLogPrompt.bind(this._appInstr),activity:this._appInstr.activity.bind(this._appInstr),activityAsync:this._appInstr.activityAsync.bind(this._appInstr),startRootActivity:this._appInstr.startRootActivity.bind(this._appInstr),registerLogCollector:this.registerLogCollector.bind(this),registerMetricsCollector:this.registerMetricsCollector.bind(this),activateClickTracker:this.activateClickTracker.bind(this),deactivateClickTracker:this.deactivateClickTracker.bind(this),disableBuffering:this.disableBuffering.bind(this),promptLogCollection:this.promptLogCollection.bind(this),getClientSessionId:this.getClientSessionId.bind(this)}}getInstrumentation(t){h.requireArgument(t,"name","string"),t.length>ct&&(t=t.substr(0,Cr)+Wt);let r=this._instruments.get(t);if(!r)r=new ut(this,t),this._instruments.set(t,r);else if(r===this._appInstr)throw new Error(`The instrumentation name ${t} is being used by the app.`);return r}get appName(){var t;return(t=this._appInstr)===null||t===void 0?void 0:t.name}addLog(t,r,i,s,l,c,f){this._sequence+=1;const g=H.isInternal(r)&&(i==null?void 0:i.userPayload)?i.userPayload.schema:r,p=H.getSchemaId(g);let E=this._seqBySchema.get(p)||0;E+=1,this._seqBySchema.set(p,E);const v={timestamp:s,rootId:l,sequence:this._sequence,schemaSequence:E,loggerName:t,pagePayload:c?h.clone(c):void 0,appPayload:f?h.clone(f):void 0,loggerAppName:this.appName,connectionType:h.getConnectionType(),clientSessionId:this._clientSessionId};this._isBufferingEnabled&&this._buffer.push({schema:r,data:h.clone(i),logMeta:v});const A=Array.from(this._logCollectors).filter(O=>{var X;return!this._forceDisabledLogCollectors.has(O)&&!((X=O.getIsCollectDisabled)===null||X===void 0?void 0:X.call(O))});if(A.length>0)for(const O of A){const X=h.clone(i);let ye=this._logCollectorFailures.get(O)||0;try{O.collect(r,X,v),ye>0&&this._logCollectorFailures.set(O,ye-1)}catch(Xe){ye+=1,ye>=Be._collectorFailureLimit?(this._forceDisabledLogCollectors.add(O),this._appInstr&&(typeof Xe=="string"||Xe instanceof Error)&&this._appInstr.error(Xe)):this._logCollectorFailures.set(O,ye)}}return this._sequence}getBuffer(){return this._buffer}disableBuffering(){this._isBufferingEnabled=!1,this._buffer=[]}getClickTracker(){return this._autoClickTracker}getDefaultInstrumentationContext(){var t,r;return{rootId:(t=this._appInstr)===null||t===void 0?void 0:t.getSingleRootActivityId(),isRootActivitySampled:(r=this._appInstr)===null||r===void 0?void 0:r.isSingleRootActivitySampled()}}activateClickTracker(){typeof document!="undefined"&&(this._autoClickTracker||(this._autoClickTracker=new bn(this._appInstr,document)),this._autoClickTracker.activate())}deactivateClickTracker(){this._autoClickTracker&&(this._autoClickTracker.deactivate(),this._autoClickTracker=void 0)}registerLogCollector(t,r){if(h.requireArgument(t,"collector"),!this._logCollectors.has(t)&&(this._logCollectors.add(t),this._logCollectorFailures.set(t,0),(!t.getIsCollectDisabled||!t.getIsCollectDisabled())&&r&&r.retroactive))for(const i of this._buffer)t.collect(i.schema,i.data,i.logMeta)}registerMetricsCollector(t){if(h.requireArgument(t,"collector"),this._metricsCollector)throw new Error("A metrics Collector is already registered.");this._metricsCollector=t,this._metricsCollector.receiveMetricsExtractors({getAllUpCounters:this._getAllUpCounters.bind(this),getAllValueRecorders:this._getAllValueRecorders.bind(this),getAllBucketHistograms:this._getAllBucketHistograms.bind(this)})}_getAllUpCounters(){return Array.from(this._instruments.values()).map(r=>r.getUpCounters()).reduce((r,i)=>r.concat(i),[])}_getAllValueRecorders(){return Array.from(this._instruments.values()).map(r=>r.getValueRecorders()).reduce((r,i)=>r.concat(i),[])}_getAllBucketHistograms(){return Array.from(this._instruments.values()).map(r=>r.getBucketHistograms()).reduce((r,i)=>r.concat(i),[])}registerForLogPrompt(t){this._logCollectionListeners.add(t)}promptLogCollection(t){for(const r of this._logCollectionListeners.keys())try{r(t)}catch(i){if(!h.isProduction)throw i}}getClientSessionId(){return this._clientSessionId}}Be._collectorFailureLimit=5;class Ar{get _lazyNextGen(){return this._nextgen||(this._nextgen=new Be(this._idleDetector)),this._nextgen}constructor(t){this._idleDetector=t,h.requireArgument(t,"_idleDetector")}registerInstrumentedApp(t,r){(!r||r.isProduction!==!1)&&h.markProduction();const i=this._lazyNextGen.registerApp(t,r);return r&&(this._nextgen.appPayloadProvider=r.appPayloadProvider,this._nextgen.pagePayloadProvider=r.pagePayloadProvider),i}getInstrumentation(t){return this._lazyNextGen.getInstrumentation(t)}}const Je=h.time.bind(h),Rr={Error:"Crimson",Activity:"CadetBlue",InstrumentedEvent:"DarkOliveGreen",O11ySample:"BlueViolet"},wn={Error:"white",Activity:"white",InstrumentedEvent:"white",O11ySample:"white"},Kt="black",Xt="Gainsboro";let En=class{constructor(t){t&&this._log("ConsoleCollector",t)}collect(t,r,i){let s,l,c;t.namespace==="sf.instrumentation"?(s=t.name,l=wn[t.name]||Kt,c=Rr[t.name]||Xt):s=H.getSchemaId(t),this._log(s,r,i,l,c)}_log(t,r,i,s=Kt,l=Xt){const c=`color:${s};background-color:${l}`;console.log(`%cO11Y%c ${t}`,"color:white;background-color:#FF6600;font-weight:bold",c,r||"",i||"")}};const Tn="244.9.0",Ze=new $e({logThreshold:300,reportListener:u=>{et==null||et.log(li,u)},errorListener:(u,t)=>{et==null||et.error(u,t)}}),dt=new Ar(Ze),Tt=dt.registerInstrumentedApp.bind(dt),St=dt.getInstrumentation.bind(dt),et=St("IdleDetector");var Ir=Object.freeze({__proto__:null,ConsoleCollector:En,_version:Tn,getInstrumentation:St,idleDetector:Ze,registerInstrumentedApp:Tt,time:Je});const Pr="244.39.0",Or={namespace:"sf.instrumentation",name:"WebVitals",pbjsSchema:{nested:{sf:{nested:{instrumentation:{nested:{WebVitals:{fields:{name:{id:1,type:"string"},delta:{id:3,type:"double"},value:{id:2,type:"double"}}}}}}}}}};var Ne,qe,Nt,Ce,G=function(u,t){return{name:u,value:t===void 0?-1:t,delta:0,entries:[],id:"v2-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12)}},ht=function(u,t){try{if(PerformanceObserver.supportedEntryTypes.includes(u)){if(u==="first-input"&&!("PerformanceEventTiming"in self))return;var r=new PerformanceObserver(function(i){return i.getEntries().map(t)});return r.observe({type:u,buffered:!0}),r}}catch(i){}},Ct=function(u,t){var r=function i(s){s.type!=="pagehide"&&document.visibilityState!=="hidden"||(u(s),t&&(removeEventListener("visibilitychange",i,!0),removeEventListener("pagehide",i,!0)))};addEventListener("visibilitychange",r,!0),addEventListener("pagehide",r,!0)},Ge=function(u){addEventListener("pageshow",function(t){t.persisted&&u(t)},!0)},Ae=function(u,t,r){var i;return function(s){t.value>=0&&(s||r)&&(t.delta=t.value-(i||0),(t.delta||i===void 0)&&(i=t.value,u(t)))}},ft=-1,Lr=function(){return document.visibilityState==="hidden"?0:1/0},Mr=function(){Ct(function(u){var t=u.timeStamp;ft=t},!0)},tt=function(){return ft<0&&(ft=Lr(),Mr(),Ge(function(){setTimeout(function(){ft=Lr(),Mr()},0)})),{get firstHiddenTime(){return ft}}},zt=function(u,t){var r,i=tt(),s=G("FCP"),l=function(g){g.name==="first-contentful-paint"&&(f&&f.disconnect(),g.startTime<i.firstHiddenTime&&(s.value=g.startTime,s.entries.push(g),r(!0)))},c=window.performance&&performance.getEntriesByName&&performance.getEntriesByName("first-contentful-paint")[0],f=c?null:ht("paint",l);(c||f)&&(r=Ae(u,s,t),c&&l(c),Ge(function(g){s=G("FCP"),r=Ae(u,s,t),requestAnimationFrame(function(){requestAnimationFrame(function(){s.value=performance.now()-g.timeStamp,r(!0)})})}))},kr=!1,Yt=-1,Sn=function(u,t){kr||(zt(function(p){Yt=p.value}),kr=!0);var r,i=function(p){Yt>-1&&u(p)},s=G("CLS",0),l=0,c=[],f=function(p){if(!p.hadRecentInput){var E=c[0],v=c[c.length-1];l&&p.startTime-v.startTime<1e3&&p.startTime-E.startTime<5e3?(l+=p.value,c.push(p)):(l=p.value,c=[p]),l>s.value&&(s.value=l,s.entries=c,r())}},g=ht("layout-shift",f);g&&(r=Ae(i,s,t),Ct(function(){g.takeRecords().map(f),r(!0)}),Ge(function(){l=0,Yt=-1,s=G("CLS",0),r=Ae(i,s,t)}))},pt={passive:!0,capture:!0},At=new Date,mt=function(u,t){Ne||(Ne=t,qe=u,Nt=new Date,Rt(removeEventListener),Nn())},Nn=function(){if(qe>=0&&qe<Nt-At){var u={entryType:"first-input",name:Ne.type,target:Ne.target,cancelable:Ne.cancelable,startTime:Ne.timeStamp,processingStart:Ne.timeStamp+qe};Ce.forEach(function(t){t(u)}),Ce=[]}},hi=function(u){if(u.cancelable){var t=(u.timeStamp>1e12?new Date:performance.now())-u.timeStamp;u.type=="pointerdown"?function(r,i){var s=function(){mt(r,i),c()},l=function(){c()},c=function(){removeEventListener("pointerup",s,pt),removeEventListener("pointercancel",l,pt)};addEventListener("pointerup",s,pt),addEventListener("pointercancel",l,pt)}(t,u):mt(t,u)}},Rt=function(u){["mousedown","keydown","touchstart","pointerdown"].forEach(function(t){return u(t,hi,pt)})},Qt=function(u,t){var r,i=tt(),s=G("FID"),l=function(f){f.startTime<i.firstHiddenTime&&(s.value=f.processingStart-f.startTime,s.entries.push(f),r(!0))},c=ht("first-input",l);r=Ae(u,s,t),c&&Ct(function(){c.takeRecords().map(l),c.disconnect()},!0),c&&Ge(function(){var f;s=G("FID"),r=Ae(u,s,t),Ce=[],qe=-1,Ne=null,Rt(addEventListener),f=l,Ce.push(f),Nn()})},rt={},Cn=function(u,t){var r,i=tt(),s=G("LCP"),l=function(g){var p=g.startTime;p<i.firstHiddenTime&&(s.value=p,s.entries.push(g),r())},c=ht("largest-contentful-paint",l);if(c){r=Ae(u,s,t);var f=function(){rt[s.id]||(c.takeRecords().map(l),c.disconnect(),rt[s.id]=!0,r(!0))};["keydown","click"].forEach(function(g){addEventListener(g,f,{once:!0,capture:!0})}),Ct(f,!0),Ge(function(g){s=G("LCP"),r=Ae(u,s,t),requestAnimationFrame(function(){requestAnimationFrame(function(){s.value=performance.now()-g.timeStamp,rt[s.id]=!0,r(!0)})})})}},It=function(u){var t,r=G("TTFB");t=function(){try{var i=performance.getEntriesByType("navigation")[0]||function(){var s=performance.timing,l={entryType:"navigation",startTime:0};for(var c in s)c!=="navigationStart"&&c!=="toJSON"&&(l[c]=Math.max(s[c]-s.navigationStart,0));return l}();if(r.value=r.delta=i.responseStart,r.value<0||r.value>performance.now())return;r.entries=[i],u(r)}catch(s){}},document.readyState==="complete"?setTimeout(t,0):addEventListener("load",function(){return setTimeout(t,0)})},se;(function(u){u[u.CLS=0]="CLS",u[u.FCP=1]="FCP",u[u.FID=2]="FID",u[u.LCP=3]="LCP",u[u.TBT=4]="TBT",u[u.TTFB=5]="TTFB"})(se||(se={}));const An=[se.CLS,se.FCP,se.FID,se.LCP,se.TTFB];class Rn{constructor(){this._isInitialized=!1,this._safety=new Ye,this._instr=St("WebVitals")}activate(t,r){this._safety.tryCatch(()=>{if(this._isInitialized)throw new Error("WebVitals is already activated.");h.requireArgumentIfDefined(r,"metrics",Array),this._isInitialized=!0;const i=new Set(r||An);if(i.delete(se.CLS)&&Sn(this._logHandler.bind(this)),i.delete(se.FCP)&&zt(this._activityHandler.bind(this)),i.delete(se.FID)&&Qt(this._logHandler.bind(this)),i.delete(se.LCP)&&Cn(this._activityHandler.bind(this)),i.delete(se.TTFB)&&It(this._activityHandler.bind(this)),i.size>0){const s=JSON.stringify(Array.from(i.keys()));this._instr.error(`Unsupported WebVital metrics: ${s}`)}})}_logHandler(t){this._instr.log(Or,{name:t.name,value:t.value,delta:t.delta})}_activityHandler(t){this._instr.startActivity(t.name).stop(void 0,void 0,{perfStartOverride:0,perfStopOverride:t.value})}}const In=new Rn;function Pn(u,t){if(!u)throw new Error(t)}const On={APEX_ACTION_ERROR:"APEX_ACTION_ERROR",FAILED_TO_LOAD_RESOURCE:"FAILED_TO_LOAD_RESOURCE",TOO_MANY_REQUESTS:"TOO_MANY_REQUESTS",UNKNOWN_ERROR:"UNKNOWN_ERROR"},Ln=["POST","PATCH","PUT","DELETE"],ee="X-SFDC-Request-Id",Dr="X-Salesforce-Too-Many-Requests",Pt="asGuest",ae="language",k="htmlEncode",{location:$r,navigator:fe}=globalThis;async function Jt(u,t={}){Pn(typeof u=="string","Valid path not provided for fetch request");const r=ke(ke({},t),{},{headers:ke({},t.headers),credentials:t.credentials||"same-origin"});t.credentials===null&&delete r.credentials;const i=r.isNonApiRequest===!0,s=r.asGuest===!0||await M(),l=r.basePath!==void 0?r.basePath:st.default,c=new URL(l+u,$r);if(!i){const p=c.searchParams;p.has(ae)||p.append(ae,ve.default),p.has(Pt)||p.append(Pt,s),p.has(k)||p.append(k,!1)}const f=r.headers["Content-Type"];f===null?delete r.headers["Content-Type"]:f?r.headers["Content-Type"]=f:t.body&&(r.headers["Content-Type"]="application/json; charset=utf-8"),r.headers[ee]=Mn(),await Hr(r);const g=await globalThis.fetch(c.toString(),r);return Fr(g)&&nt(),g}function nt(){document.dispatchEvent(new CustomEvent("client-error",{detail:{type:On.TOO_MANY_REQUESTS}}))}function Fr(u){return!!((u.status===503||u.status===429)&&u.headers.get(Dr))}async function Hr(u){if(u.method&&Ln.includes(u.method)){const{default:t}=await V.load("@app/user/v/1");u.headers["CSRF-Token"]=t.csrfToken}}async function Ur({path:u,payload:t,contentType:r}){const i=ie.default+u;fe&&fe.sendBeacon&&fe.sendBeacon(i,t)||await globalThis.fetch(u,{headers:{"Content-Type":r},basePath:ie.default,body:t,method:"POST",isNonApiRequest:!0})}function Mn(){return(Date.now()+kn()+Math.round(Math.random()*1e8)).substring(0,18)}function kn(){function u(){return Math.floor((1+Math.random())*65536).toString(16).substring(1)}return u()+u()}async function M(){const{default:u}=await V.load("@app/user/v/1");return u.isGuest}var le=Object.freeze({__proto__:null,fetch:Jt,sendBeacon:Ur});const Ve={namespace:"sf.clwr",name:"AppPayload",pbjsSchema:{nested:{sf:{nested:{clwr:{nested:{AppPayload:{fields:{visd:{id:1,type:"double"},isPreview:{id:4,type:"bool"},siteId:{id:6,type:"string"},isMobile:{id:3,type:"bool"},lang:{id:5,type:"string"},isDesign:{id:2,type:"bool"},vKey:{id:7,type:"string"}}}}}}}}}},Z={namespace:"sf.clwr",name:"Nav",pbjsSchema:{nested:{sf:{nested:{clwr:{nested:{Nav:{fields:{isIdleHit:{id:1,type:"bool"},isManual:{id:2,type:"bool"}}}}}}}}}},Zt={namespace:"sf.clwr",name:"NavTransition",pbjsSchema:{nested:{sf:{nested:{clwr:{nested:{NavTransition:{fields:{code:{id:4,type:"string"},isSsr:{id:3,type:"bool"},level:{id:5,type:"string"},nextUrl:{id:1,type:"string"},type:{id:2,type:"string"}}}}}}}}}},xr={namespace:"sf.clwr",name:"PagePayload",pbjsSchema:{nested:{sf:{nested:{clwr:{nested:{PagePayload:{fields:{isSsr:{id:3,type:"bool"},type:{id:2,type:"string"},url:{id:1,type:"string"}}}}}}}}}},te={namespace:"sf.clwr",name:"Root",pbjsSchema:{nested:{sf:{nested:{clwr:{nested:{Root:{fields:{sequence:{id:1,type:"uint32"},navCount:{id:2,type:"uint32"},clickCount:{id:3,type:"uint32"},isManual:{id:4,type:"bool"}}}}}}}}}},it=5e4,we=3e3,Re=300,Br="O11Y_ENDPOINT_NOT_CONFIGURED",qr=Math.random(),re={coreEnabled:!1,coreSamplingRate:0,coreRelativeEndpoint:"",falconEnabled:!1,falconSamplingRate:0,falconAbsoluteEndpoint:"",guestToken:"",traceSamplingRate:0},Ie=!0;Ie&&h.markProduction();let Ot,Lt;new Ye().tryCatch(()=>{const u=JSON.parse(ze.default);Object.keys(re).forEach(t=>{const r=u[t],i=typeof re[t];(i==="string"&&r===""||h.requireArgumentIfDefined(r,`srvConfig.${t}`,i))&&(re[t]=u[t])}),Ot=Dn(Te.default),re.guestToken=Ot.guestToken});function Gr(){return re}function ot(u,t){return u&&t!==""&&t!==Br}function Mt(u){return!Ie||u>0&&u>=qr}function er(){return!Lt&&ot(re.coreEnabled,re.coreRelativeEndpoint)&&Mt(re.coreSamplingRate)}function tr(){return ot(re.falconEnabled,re.falconAbsoluteEndpoint)&&Mt(re.falconSamplingRate)}function Dn(u){if(!u)throw new Error("o11yGuestToken not set");const t={},r=u.indexOf("|");return r>=0?(t.guestToken=u.substring(0,r),t.meta=JSON.parse(u.substring(r+1))):t.guestToken=u,t}function kt(){const u=re.coreRelativeEndpoint?.indexOf("services/data/");return u===0||u===1}function Vr(){const u=re.coreRelativeEndpoint||"";return kt()&&u.length>1&&u[0]!=="/"}async function jr(){if(Lt===void 0&&(Lt=!1,kt()&&!Ot.meta?.isGuestApiAccessEnabled)){const{default:u}=await V.load("@app/user/v/1");u.isGuest&&(Lt=!0)}}function $n(){const u=Math.random(),t=re.traceSamplingRate||0;return t>0&&t>=u}const Wr={perfStartOverride:0};let pe;class Fn{constructor(t){this._rootPayload={sequence:0,navCount:0,clickCount:0,isManual:!1},this._navPayload={isIdleHit:!1,isManual:!1},this._hadRootActivity=!1,this._hadNavActivity=!1,this._isFirstNavActivity=!0;const r=!1;pe=i=>r&&console.log(`O11YR ${i}`),pe("Started"),this._o11yApp=t,this._startRoot(),document.body.addEventListener("click",this._handleClick.bind(this),{capture:!0,passive:!0}),window.addEventListener("visibilitychange",this._handleVisibilityChange.bind(this))}_handleClick(){this._rootActivity?this._rootPayload.clickCount+=1:this._startRoot()}_handleVisibilityChange(){const t=document.visibilityState==="hidden";pe(t?"Hide":"Show"),t?(this._stopNavTransition(),this._stopNav(),this._stopRoot(!1)):(this._hadRootActivity&&this._startRoot(!0),this._hadNavActivity&&!this._navActivity&&this._startNav(this._navData,!0))}get _isFirstRootActivity(){return this._rootPayload.sequence===1}_startRoot(t=!1){this._rootActivity&&this._stopRoot(!1),this._rootPayload.clickCount=0,this._rootPayload.navCount=0,this._rootPayload.sequence+=1,this._rootPayload.isManual=t,this._rootActivity=this._o11yApp.startRootActivity("root",void 0,$n()),this._hadRootActivity=!0,pe(`Root Started ${this._rootActivity.getId()}`),Ze.requestIdleDetectedCallback(()=>{this._stopRoot(!0)})}_stopRoot(t){if(!!this._rootActivity){pe(`Root Stop ${t?"idle":"busy"} ${this._rootActivity.getId()}`);try{if(!this._isFirstRootActivity&&this._rootPayload.navCount===0&&Je().perfNow-this._rootActivity.getStartPerfTime()<Re){this._rootActivity.discard(),this._rootPayload.sequence-=1;return}const r=this._isFirstRootActivity?Wr:void 0;t?this._rootActivity.stop(te,this._rootPayload,r):this._rootActivity.terminate(te,this._rootPayload,r)}finally{this._rootActivity=void 0,this._hadRootActivity=!1}}}_startNav(t,r){this._stopNav(),this._navPayload.isIdleHit=!1,this._navPayload.isManual=r,this._rootPayload.navCount+=1,this._navData=t?{url:t.url,pageRef:t.pageRef,isSsr:t.isSsr}:void 0,this._navActivity=this._o11yApp.startActivity("navigation"),this._hadNavActivity=!0,pe(`Nav Started ${this._navActivity.getId()}`),Ze.requestIdleDetectedCallback(()=>{pe(`Nav Idle ${this._navActivity?.getId()}`),this._navPayload.isIdleHit=!0})}_stopNav(){if(this._navActivity){pe(`Nav Stop ${this._navActivity.getId()}`);try{const t=this._isFirstNavActivity?Wr:void 0;this._isFirstNavActivity=!1,this._navActivity.stop(Z,this._navPayload,t)}finally{this._navActivity=void 0}}}_startNavTransition(t){this._navTransitionActivity&&this._stopNavTransition(void 0,!0),this._navTransitionData=t,this._navTransitionActivity=this._o11yApp.startActivity("navigation transition"),pe(`Trans Started ${this._navTransitionActivity.getId()}`)}_stopNavTransition(t,r=!1){if(this._navTransitionActivity){pe(`Trans ${r?"Terminate":"Stop"} ${this._navTransitionActivity.getId()}`);try{if(t){const{code:s,message:l,level:c}=t,f=["Fatal","Error","Warning","Log"][c];this._navTransitionActivity.error(l,Zt,{code:s?.toString(),level:f})}const i=this._navTransitionData?{nextUrl:this._navTransitionData.url,type:this._navTransitionData.pageRef?.type,isSsr:this._navTransitionData.isSsr}:void 0;r?this._navTransitionActivity.terminate(Zt,i):this._navTransitionActivity.stop(Zt,i)}finally{this._navTransitionActivity=void 0,this._navTransitionData=void 0}}}preNavigate(t){this._startNavTransition({url:t.next.url,pageRef:t.next.route.pageReference,isSsr:t.next.routeDefinition?.bootstrap?.ssr})}postNavigate(t){this._stopNavTransition(),this._startNav({url:t.url,pageRef:t.route.pageReference,isSsr:t.routeDefinition?.bootstrap?.ssr},!1)}errorNavigate(t){pe(`Err level ${t?.level}: ${t?.code}`),this._stopNavTransition(t)}getCurrentPageData(){if(this._navData){const{pageRef:t,url:r,isSsr:i}=this._navData;return{url:r,type:t?.type,isSsr:i}}}}class Dt{constructor(){this._totalVisibleDuration=0,this._isVisible=document?.visibilityState==="visible",this._isVisible&&(this._lastVisibleTime=0),window?.addEventListener("visibilitychange",this._handleVisibilityChange.bind(this))}_handleVisibilityChange(){if(document.visibilityState==="hidden"){if(this._isVisible=!1,this._lastVisibleTime!==void 0){const t=Je().perfNow;this._totalVisibleDuration+=t-this._lastVisibleTime,this._lastVisibleTime=t}}else this._isVisible=!0,this._lastVisibleTime=Je().perfNow}getPayload(){const t=this._isVisible&&this._lastVisibleTime!==void 0?Je().perfNow-this._lastVisibleTime:0,r={isDesign:Le.default,isMobile:dr.default,isPreview:W.default,lang:ve.default,siteId:B.default,vKey:Me.default,visd:this._totalVisibleDuration+t};return{schema:Ve,payload:r}}}class rr{linkWithRouterSupport(t){this._routingSupport=t}getPayload(){if(this._routingSupport){const t=this._routingSupport.getCurrentPageData();if(t)return{schema:xr,payload:t}}}}const{ConsoleCollector:je,idleDetector:gt,registerInstrumentedApp:We,_version:Kr}=Ir,Hn="lwr_experience";let Ke,$t;const D=xt;D.clientVersion=Kr,D.schemaVersion=Pr;const Ee=`${Kr}:${Pr}`,Pe=Jt;globalThis.LWR?.define&&(globalThis.LWR.define("o11y/shared",[],()=>bt),globalThis.LWR.define("o11y/client",[],()=>Ir),globalThis.LWR.define("transport",[],()=>le),globalThis.LWR.define("webruntime/o11y",[],()=>ii));async function Xr(u){const t=!0;try{if(typeof window=="undefined"){D.isUnavailable=!0;return}const r=gt.declareNotifierTaskMulti("o11y LWR module fetch");D.willUpload=er()||tr();const i=new Dt,s=new rr;D.app=We(Hn,{isProduction:t,enableBuffering:!0,appPayloadProvider:i,pagePayloadProvider:s}),Q.default?.(c=>{c.id==="lwr.loader.module.fetch"&&(c.phase===0?r.add():r.done())}),D.app.networkInstrumentation({tracingHeadersOptions:{useB3Headers:!0}}),In.activate(),D.routingSupport=new Fn(D.app),s.linkWithRouterSupport(D.routingSupport);let l=!1;if(D.initConsole=c=>{if(!l&&D.app){const f=new je;D.app.registerLogCollector(f,c),l=!0}},t||(D.initConsole(),D.app.log(`o11y ${Ee}`)),D.upload=nr,D.willUpload){if(await xn(),await jr(),D.willUpload=er()||tr(),!D.willUpload)return;await Bn(D.app,{appName:u.appMetadata.bootstrapModule,sdkVersion:`o11y ${Ee}`}),Un(),await nr(!0)}}catch(r){if(!t)throw r;try{console?.error("Failed to start o11y",r)}catch{}}finally{try{D.app?.disableBuffering()}catch{}}}function Un(){window.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&nr(!0)})}async function xn(){const u=t=>{let r=!1;setTimeout(()=>{r||(r=!0,t())},we),gt.requestIdleDetectedCallback(()=>{r||(r=!0,t())})};return new Promise(t=>{document.readyState==="complete"?u(t):window.addEventListener("load",()=>u(t))})}async function Bn(u,t){const[r,i]=await Promise.all([V.load("o11y/simple_collector/v/244_9_0"),V.load("o11y/collectors/v/244_9_0")]);$t=(i.default||i).encodeCoreEnvelopeContentsRaw,Ke=new(r.default||r).SimpleCollector({environment:t}),u.registerLogCollector(Ke,{retroactive:!0}),u.registerMetricsCollector(Ke)}function nr(u=!1){const t=[],r=er(),i=tr();if(Ke?.hasData&&(r||i)&&(u||Ke.estimatedByteSize>=it)){const s=Ke.getRawContentsOfCoreEnvelope(),l=$t(s);r&&t.push(qn(l)),i&&t.push(Gn(l))}return Promise.allSettled(t)}function qn(u){const t=String.fromCharCode,r=[];for(let c=0,f=u.length;c<f;c++)r.push(t(u[c]));const i=window.btoa(r.join("")),s={method:"POST",body:JSON.stringify({base64Env:i}),keepalive:!0,isNonApiRequest:!kt(),o11y:{skipInstr:!0}};let l=Gr().coreRelativeEndpoint;return Vr()?l[0]!=="/"&&(l=`/${l}`):s.basePath=ie.default,Pe(l,s)}function Gn(u){const t=Gr(),r={method:"POST",body:u,headers:{"x-sfdc-o11y-token":t.guestToken||"","Content-Type":"application/octet-stream"},keepalive:!0,o11y:{skipInstr:!0}};return fetch(t.falconAbsoluteEndpoint,r)}T.default=Xr,Object.defineProperty(T,"__esModule",{value:!0})}),LWR.define("webruntime/hook/v/1_66_319-244_0",["exports"],function(T){"use strict";var V=["@app/apexApiBasePath","@app/apiBasePath","@app/authenticationCookieName","@app/basePath","@app/guestUuidCookieName","@app/isDesignMode","@app/isPreviewMode","@app/isMobileAppMode","@app/loginPath","@app/o11yGuestToken","@app/o11yConfiguration","@app/routes","@app/extraRouteParams","@app/uiBasePath","@app/versionKey","@app/viewToThemeLayoutMap","@app/views","@salesforce/community/basePath","@salesforce/i18n/lang","@salesforce/site/Id","@salesforce/webstore/Id","webruntime/dispatcher"],ue=["@salesforce/cssvars/customProperties","aura-instrumentation","aura-storage","aura","instrumentation/service","instrumentation/utility","lightning/configProvider","lightning/navigation","transport","webruntime/transport","logger","assert","o11y/shared","o11y/client","webruntime/o11y","webruntime_navigation/link","webruntime/expressions","webruntime/routerContainer","webruntime/componentContainer","webruntime/slotContainer","webruntime/visibilityContainer","webruntime/routingService","webruntime/overrides","webruntimedesign/componentWrapper","webruntimedesign/regionWrapper","webruntimedesign/dropRegion","webruntimedesign/componentService","webruntimedesign/designComponent","mobileruntime/hybridAppManager","wire-service","@salesforce/client/formFactor"];const ne=["webruntimedesign/componentWrapper","webruntimedesign/regionWrapper","webruntimedesign/dropRegion","webruntimedesign/componentService","webruntimedesign/designComponent"];function ce(Y){Y.addLoaderPlugin({resolveModule:async P=>{const[C]=P.split("/v/");return C==="webruntime/transport"?"transport":C&&(ue.includes(C)||ne.includes(C)||V.includes(C))?C:C==="@salesforce/loader"?"lwr/loaderLegacy/v/0_9_0":null}})}T.default=ce,Object.defineProperty(T,"__esModule",{value:!0})}),LWR.define("@lwc/synthetic-shadow/v/2_41_4",function(){"use strict";function T(e,n){if(!e)throw new Error(`Invariant Violation: ${n}`)}function V(e,n){if(!e)throw new Error(`Assert Violation: ${n}`)}function ue(e,n){if(e)throw new Error(`Assert Violation: ${n}`)}function ne(e){throw new Error(e)}var ce=Object.freeze({__proto__:null,fail:ne,invariant:T,isFalse:ue,isTrue:V});const{assign:Y,create:P,defineProperties:C,defineProperty:N,freeze:j,getOwnPropertyDescriptor:_,getOwnPropertyNames:_e,getPrototypeOf:oe,hasOwnProperty:S,isFrozen:ie,keys:st,seal:ve,setPrototypeOf:Q}=Object,{isArray:ze}=Array,{concat:Te,copyWithin:Le,fill:dr,filter:W,find:Me,indexOf:B,join:at,map:ke,pop:ni,push:K,reduce:Ut,reverse:xt,shift:ii,slice:L,some:vt,sort:h,splice:Ye,unshift:oi,forEach:H}=Array.prototype,{charCodeAt:bt,replace:si,split:ai,slice:li,toLowerCase:ui}=String.prototype;function y(e){return e===void 0}function w(e){return e===null}function De(e){return e===!0}function $e(e){return e===!1}function be(e){return typeof e=="function"}function hr(e){return typeof e=="object"}const fr={}.toString;function tn(e){return e&&e.toString?ze(e)?at.call(ke.call(e,tn),","):e.toString():typeof e=="object"?fr.call(e):e+""}const Fe=typeof globalThis=="object"?globalThis:window,rn="$isNativeShadowRootDefined$",lt="$shadowResolver$",pr="$$ShadowResolverKey$$",nn="$shadowStaticNode$",mr="$shadowStaticNodeKey$",Bt="$shadowToken$",b="$$ShadowTokenKey$$",de="$$lwc-synthetic-mode",gr="$nativeGetElementById$",yr="$nativeQuerySelectorAll$",_r=(()=>Symbol("x").toString()==="Symbol(x)")();Fe.lwcRuntimeFlags||Object.defineProperty(Fe,"lwcRuntimeFlags",{value:P(null)});const U=Node,q=U.prototype,{DOCUMENT_POSITION_CONTAINED_BY:He,DOCUMENT_POSITION_CONTAINS:ci,DOCUMENT_POSITION_PRECEDING:on,DOCUMENT_POSITION_FOLLOWING:sn,ELEMENT_NODE:an,TEXT_NODE:vr,CDATA_SECTION_NODE:qt,PROCESSING_INSTRUCTION_NODE:br,COMMENT_NODE:wt,DOCUMENT_FRAGMENT_NODE:di}=U,{appendChild:ln,cloneNode:wr,compareDocumentPosition:he,insertBefore:un,removeChild:cn,replaceChild:Er,hasChildNodes:dn}=q,{contains:Tr}=HTMLElement.prototype,hn=_(q,"firstChild").get,fn=_(q,"lastChild").get,pn=_(q,"textContent").get,ge=_(q,"parentNode").get,Gt=_(q,"ownerDocument").get,Se=S.call(q,"parentElement")?_(q,"parentElement").get:_(HTMLElement.prototype,"parentElement").get,Vt=_(q,"textContent").set,J=S.call(q,"childNodes")?_(q,"childNodes").get:_(HTMLElement.prototype,"childNodes").get,jt=S.call(q,"isConnected")?_(q,"isConnected").get:function(){const e=Gt.call(this);return e===null||(he.call(e,this)&He)!=0},{getAttribute:Qe,getBoundingClientRect:mn,getElementsByTagName:Et,getElementsByTagNameNS:Sr,hasAttribute:Ue,querySelector:ut,querySelectorAll:xe,removeAttribute:gn,setAttribute:Nr}=Element.prototype,yn=S.call(Element.prototype,"attachShadow")?Element.prototype.attachShadow:()=>{throw new TypeError("attachShadow() is not supported in current browser. Load the @lwc/synthetic-shadow polyfill and use Lightning Web Components")},_n=_(Element.prototype,"childElementCount").get,vn=_(Element.prototype,"firstElementChild").get,bn=_(Element.prototype,"lastElementChild").get,ct=_(HTMLElement.prototype,"innerText"),Wt=ct?ct.get:null,Cr=ct?ct.set:null,Be=_(HTMLElement.prototype,"outerText"),Ar=Be?Be.get:null,Je=Be?Be.set:null,Rr=S.call(Element.prototype,"innerHTML")?_(Element.prototype,"innerHTML"):_(HTMLElement.prototype,"innerHTML"),wn=Rr.get,Kt=Rr.set,Xt=S.call(Element.prototype,"outerHTML")?_(Element.prototype,"outerHTML"):_(HTMLElement.prototype,"outerHTML"),En=Xt.get,Tn=Xt.set,Ze=_(Element.prototype,"tagName").get,dt=_(HTMLElement.prototype,"tabIndex"),Tt=dt.get,St=dt.set,et=S.call(Element.prototype,"matches")?Element.prototype.matches:Element.prototype.msMatchesSelector,Ir=S.call(Element.prototype,"children")?_(Element.prototype,"children").get:_(HTMLElement.prototype,"children").get,{getElementsByClassName:Pr}=HTMLElement.prototype,Or=S.call(Element.prototype,"shadowRoot")?_(Element.prototype,"shadowRoot").get:()=>null,Ne=S.call(Element.prototype,"assignedSlot")?_(Element.prototype,"assignedSlot").get:()=>null;let qe,Nt;typeof HTMLSlotElement!="undefined"?(qe=HTMLSlotElement.prototype.assignedNodes,Nt=HTMLSlotElement.prototype.assignedElements):(qe=()=>{throw new TypeError("assignedNodes() is not supported in current browser. Load the @lwc/synthetic-shadow polyfill to start using <slot> elements in your Lightning Web Component's template")},Nt=()=>{throw new TypeError("assignedElements() is not supported in current browser. Load the @lwc/synthetic-shadow polyfill to start using <slot> elements in your Lightning Web Component's template")});const Ce=_(Event.prototype,"target").get,G=_(Event.prototype,"currentTarget").get,ht=_(FocusEvent.prototype,"relatedTarget").get,Ct=S.call(Event.prototype,"composedPath")?Event.prototype.composedPath:()=>[],Ge=_(Document.prototype,"activeElement").get,Ae=S.call(Document.prototype,"elementFromPoint")?Document.prototype.elementFromPoint:Document.prototype.msElementFromPoint,ft=S.call(Document.prototype,"elementsFromPoint")?Document.prototype.elementsFromPoint:Document.prototype.msElementsFromPoint,Lr=_(Document.prototype,"defaultView").get,{createComment:Mr,querySelectorAll:tt,getElementById:zt,getElementsByClassName:kr,getElementsByTagName:Yt,getElementsByTagNameNS:Sn}=Document.prototype,{getElementsByName:pt}=HTMLDocument.prototype,{addEventListener:At,removeEventListener:mt,getComputedStyle:Nn,getSelection:hi}=window,Rt=MutationObserver,Qt=Rt.prototype.observe;let rt=null;typeof ShadowRoot!="undefined"&&(rt=ShadowRoot);const Cn=!w(rt),It=w(rt)?()=>!1:e=>e instanceof rt;function se(){return typeof HTMLSlotElement=="undefined"}const{createElement:An}=Document.prototype,Rn=115,In=108,Pn=111,On=116;function Ln(){class e{}Q(e,HTMLElement.constructor),Q(e.prototype,HTMLElement.prototype),Window.prototype.HTMLSlotElement=e,N(Document.prototype,"createElement",{value:function(n,o){const a=An.apply(this,L.call(arguments));return n.length===4&&bt.call(n,0)===Rn&&bt.call(n,1)===In&&bt.call(n,2)===Pn&&bt.call(n,3)===On&&Q(a,e.prototype),a}})}se()&&Ln();function ee(e){const n=Gt.call(e);return n===null?e:n}function Dr(e){const n=ee(e),o=Lr.call(n);if(o===null)throw new TypeError;return o}let Pt;function ae(e){if(y(Pt)){const n=ee(e);Pt=n.body&&Qe.call(n.body,"data-global-patching-bypass")==="temporary-bypass"}return De(Pt)}function k(e){const n=e.length,o=[];if(n>0)for(let a=0;a<n;a++)o[a]=e[a];return o}const $r=typeof EventTarget!="undefined"?EventTarget.prototype:U.prototype,{addEventListener:fe,dispatchEvent:Jt,removeEventListener:nt}=$r,Fr="$$HostElementKey$$",Hr="$$ShadowedNodeKey$$";function Ur(e,n,o){const a=e;{const{value:d}=o;a[n]=d}}function Mn(e,n){Ur(e,Fr,{value:n,configurable:!0})}function kn(e,n){Ur(e,Hr,{value:n})}function M(e){return e[Fr]}function le(e){let n=e,o;for(;!w(n);){if(o=M(n),!y(o))return o;if(n=ge.call(n),!w(n)&&it(n))return}}function Ve(e){return e[Hr]}function Z(e){return!y(M(e))}function Zt(e){let n=Se.call(e);for(;!w(n)&&we(n);)e=n,n=Se.call(e);return e}function xr(e,n){const o=Ve(e);let a=n instanceof Element?n:Se.call(n);for(;!w(a)&&a!==e;){const d=le(a),m=Se.call(a);if(d===o)return we(a);if(m===e)return!1;if(!w(m)&&le(m)!==d)if(we(m)){if(a=te(Zt(m)),!w(a)){if(a===e)return!0;if(le(a)===o)return!0}}else return!1;else a=m}return!1}function te(e){if(!(e instanceof U))return null;const n=le(e);if(y(n))return null;let o=e;for(;!w(o)&&Ve(o)!==n;)o=ge.call(o);return w(o)?null:o}function it(e){return we(e)&&Z(e)}function we(e){return e instanceof HTMLSlotElement}function Re(e,n){const o=le(n);if(y(o)){const a=ge.call(n);return!(!w(a)&&it(a))}return Ve(e)===o}function Br(e){const n=x(e);return Ie(n,k(J.call(n)))}function qr(e,n){const o=[];for(let a=0,d=n.length;a<d;a+=1){const m=n[a];!Re(e,m)&&xr(e,m)&&K.call(o,m)}return o}function re(e,n){for(let o=0,a=n.length;o<a;o+=1){const d=n[o];if(!Re(e,d)&&xr(e,d))return d}return null}function Ie(e,n){const o=[];for(let a=0,d=n.length;a<d;a+=1){const m=n[a];Re(e,m)&&K.call(o,m)}return o}function Ot(e,n){for(let o=0,a=n.length;o<a;o+=1)if(Re(e,n[o]))return n[o];return null}function Lt(e,n){const o=x(e),a=k(xe.call(o,n));return Ot(o,a)}function Gr(e,n){const o=x(e),a=xe.call(o,n);return Ie(o,k(a))}function ot(e){if(!F(e)&&!we(e)){const n=J.call(e);return k(n)}if(F(e)){const n=k(xe.call(e,"slot")),o=_t(Oe(e));return Ut.call(n,(a,d)=>(o===_t(d)&&K.apply(a,Mt(d)),a),[])}else{const n=k(J.call(e)),o=_t(e);return W.call(n,a=>o===_t(a))}}function Mt(e){const n=te(e);if(w(n))return[];const o=k(J.call(e));return W.call(o,a=>!Z(a)||!Re(n,a))}function er(e){let n="";const o=ot(e);for(let a=0,d=o.length;a<d;a+=1)n+=Dt(o[a]);return n}const tr=/[&\u00A0"]/g,Dn=/[&\u00A0<>]/g,{replace:kt,toLowerCase:Vr}=String.prototype;function jr(e){switch(e){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";case"\xA0":return" ";default:return""}}function $n(e){return kt.call(e,tr,jr)}function Wr(e){return kt.call(e,Dn,jr)}const pe=new Set(["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"]),Fn=new Set(["STYLE","SCRIPT","XMP","IFRAME","NOEMBED","NOFRAMES","PLAINTEXT","NOSCRIPT"]);function Dt(e){switch(e.nodeType){case an:{const{attributes:n}=e,o=Ze.call(e);let a="<"+Vr.call(o);for(let d=0,m;m=n[d];d++)a+=" "+m.name+'="'+$n(m.value)+'"';return a+=">",pe.has(o)?a:a+er(e)+"</"+Vr.call(o)+">"}case vr:{const{data:n,parentNode:o}=e;return o instanceof Element&&Fn.has(Ze.call(o))?n:Wr(n)}case qt:return`<!CDATA[[${e.data}]]>`;case br:return`<?${e.target} ${e.data}?>`;case wt:return`<!--${e.data}-->`;default:return""}}function rr(e){switch(e.nodeType){case an:{const n=ot(e);let o="";for(let a=0,d=n.length;a<d;a+=1){const m=n[a];m.nodeType!==wt&&(o+=rr(m))}return o}default:return e.nodeValue}}const je=new WeakMap;function gt(){throw new TypeError("Illegal constructor")}gt.prototype=P(NodeList.prototype,{constructor:{writable:!0,configurable:!0,value:gt},item:{writable:!0,enumerable:!0,configurable:!0,value(e){return this[e]}},length:{enumerable:!0,configurable:!0,get(){return je.get(this).length}},forEach:{writable:!0,enumerable:!0,configurable:!0,value(e,n){H.call(je.get(this),e,n)}},entries:{writable:!0,enumerable:!0,configurable:!0,value(){return ke.call(je.get(this),(e,n)=>[n,e])}},keys:{writable:!0,enumerable:!0,configurable:!0,value(){return ke.call(je.get(this),(e,n)=>n)}},values:{writable:!0,enumerable:!0,configurable:!0,value(){return je.get(this)}},[Symbol.iterator]:{writable:!0,configurable:!0,value(){let e=0;return{next:()=>{const n=je.get(this);return e<n.length?{value:n[e++],done:!1}:{done:!0}}}}},[Symbol.toStringTag]:{configurable:!0,get(){return"NodeList"}},toString:{writable:!0,configurable:!0,value(){return"[object NodeList]"}}}),Q(gt,NodeList);function We(e){const n=P(gt.prototype);return je.set(n,e),H.call(e,(o,a)=>{N(n,a,{value:o,enumerable:!0,configurable:!0})}),n}function Kr(e){var n;const o=[];let a=e.getRootNode();for(;!y(a);)o.push(a),a=(n=a.host)===null||n===void 0?void 0:n.getRootNode();return o}const Hn=(e,n)=>{let o;for(;!y(o=e.host);){const a=o.getRootNode();if(a===n)return o;e=a}};function Ke(e,n,o,a){const d=ft.call(n,o,a),m=[],R=Kr(e);if(!w(d))for(let I=0;I<d.length;I++){const $=d[I];if(it($))continue;const z=$.getRootNode();if(B.call(R,z)!==-1){K.call(m,$);continue}const me=Hn(z,R[0]);!y(me)&&B.call(d,me)===-1&&B.call(m,me)===-1&&K.call(m,me)}return m}const $t=new WeakMap;function D(){throw new TypeError("Illegal constructor")}D.prototype=P(HTMLCollection.prototype,{constructor:{writable:!0,configurable:!0,value:D},item:{writable:!0,enumerable:!0,configurable:!0,value(e){return this[e]}},length:{enumerable:!0,configurable:!0,get(){return $t.get(this).length}},namedItem:{writable:!0,enumerable:!0,configurable:!0,value(e){if(e==="")return null;const n=$t.get(this);for(let o=0,a=n.length;o<a;o++){const d=n[a];if(e===Qe.call(d,"id")||e===Qe.call(d,"name"))return d}return null}},[Symbol.toStringTag]:{configurable:!0,get(){return"HTMLCollection"}},toString:{writable:!0,configurable:!0,value(){return"[object HTMLCollection]"}}}),Q(D,HTMLCollection);function Ee(e){const n=P(D.prototype);return $t.set(n,e),H.call(e,(o,a)=>{N(n,a,{value:o,enumerable:!0,configurable:!0})}),n}function Pe(e){return it(e)||F(e)}function Xr(e,n){const o=te(e);if(n===o)return Oe(o);if(n instanceof Element){if(le(e)===le(n))return n;if(!w(o)&&we(n)){const a=te(n);if(!w(a)&&Re(o,a))return a}}return null}function Un(){return v(this).length>0}function xn(){return v(this)[0]||null}function Bn(){const e=v(this);return e[e.length-1]||null}function nr(){return rr(this)}function qn(e){Vt.call(this,e)}function Gn(){const e=ge.call(this);return w(e)?e:Xr(this,e)}function u(){const e=ge.call(this);if(w(e))return null;const n=Xr(this,e);return n instanceof Element?n:null}function t(e){return this===e?0:this.getRootNode()===e?10:M(this)!==M(e)?35:he.call(this,e)}function r(e){return e==null||M(this)!==M(e)?!1:(he.call(this,e)&He)!=0}function i(e){const n=wr.call(this,!1);if(!e)return n;const o=v(this);for(let a=0,d=o.length;a<d;a+=1)n.appendChild(o[a].cloneNode(!0));return n}function s(){if(F(this)){const e=te(this),n=w(e)?[]:Ie(e,ot(this));return We(n)}return J.call(this)}const l=U.prototype.getRootNode,c=y(l)?function(){let e=this,n;for(;!w(n=ge.call(e));)e=n;return e}:l;function f(e){const n=te(e);return w(n)?c.call(e):Oe(n)}function g(e){const n=y(e)?!1:!!e.composed;return De(n)?c.call(this,e):f(this)}C(U.prototype,{firstChild:{get(){return Pe(this)?xn.call(this):hn.call(this)},enumerable:!0,configurable:!0},lastChild:{get(){return Pe(this)?Bn.call(this):fn.call(this)},enumerable:!0,configurable:!0},textContent:{get(){return Z(this)||F(this)?nr.call(this):pn.call(this)},set:qn,enumerable:!0,configurable:!0},parentNode:{get(){if(Z(this))return Gn.call(this);const e=ge.call(this);return!w(e)&&it(e)?te(e):e},enumerable:!0,configurable:!0},parentElement:{get(){if(Z(this))return u.call(this);const e=Se.call(this);return!w(e)&&it(e)?te(e):e},enumerable:!0,configurable:!0},childNodes:{get(){return Pe(this)?s.call(this):J.call(this)},enumerable:!0,configurable:!0},hasChildNodes:{value(){return Pe(this)?Un.call(this):dn.call(this)},enumerable:!0,writable:!0,configurable:!0},compareDocumentPosition:{value(e){return ae(this)?he.call(this,e):t.call(this,e)},enumerable:!0,writable:!0,configurable:!0},contains:{value(e){return this===e?!0:e==null?!1:Z(this)||F(this)?r.call(this,e):Tr.call(this,e)},enumerable:!0,writable:!0,configurable:!0},cloneNode:{value(e){return Z(this)||F(this)?i.call(this,e):wr.call(this,e)},enumerable:!0,writable:!0,configurable:!0},getRootNode:{value:g,enumerable:!0,configurable:!0,writable:!0},isConnected:{enumerable:!0,configurable:!0,get(){return jt.call(this)}}});let p=!1;function E(){return!p}const v=function(e){return e.childNodes};S.call(HTMLElement.prototype,"contains")&&N(HTMLElement.prototype,"contains",_(U.prototype,"contains")),S.call(HTMLElement.prototype,"parentElement")&&N(HTMLElement.prototype,"parentElement",_(U.prototype,"parentElement"));const A=new WeakMap,O=new WeakMap;function X(e){return be(e)||hr(e)&&!w(e)&&be(e.handleEvent)}function ye(e,n,o){if(n===o)return!0;let a=O.get(e);return y(a)&&(a=e.composedPath(),O.set(e,a)),a.includes(o)}function Xe(e){if(!X(e))return e;let n=A.get(e);return y(n)&&(n=function(o){const a=G.call(o),d=jn(o);if(!!ye(o,d,a))return be(e)?e.call(this,o):e.handleEvent&&e.handleEvent(o)},A.set(e,n)),n}const ir=new WeakMap,fi=new WeakMap;function Vn(e){let n=fi.get(e);return y(n)&&(n=P(null),fi.set(e,n)),n}function jn(e){var n;return(n=zr.get(e))!==null&&n!==void 0?n:Ce.call(e)}const pi=new WeakMap;function mi(e){if(!be(e))throw new TypeError;let n=pi.get(e);return y(n)&&(n=function(o){let a=G.call(o);It(a)||(a=Oe(a));const d=jn(o);ye(o,d,a)&&e.call(a,o)},n.placement=1,pi.set(e,n)),n}const gi=new WeakMap;function yi(e){if(!be(e))throw new TypeError;let n=gi.get(e);return y(n)&&(n=function(o){const a=G.call(o),d=jn(o);ye(o,d,a)&&e.call(a,o)},n.placement=0,gi.set(e,n)),n}function _i(e){let n=!1,o=!1;const{type:a,stopImmediatePropagation:d,stopPropagation:m}=e,R=G.call(e),$=Vn(R)[a];N(e,"stopImmediatePropagation",{value(){n=!0,d.call(e)},writable:!0,enumerable:!0,configurable:!0}),N(e,"stopPropagation",{value(){o=!0,m.call(e)},writable:!0,enumerable:!0,configurable:!0});const z=L.call($);function me(cs){H.call(z,ri=>{$e(n)&&ri.placement===cs&&B.call($,ri)!==-1&&ri.call(void 0,e)})}ir.set(e,1),me(1),$e(n)&&$e(o)&&(ir.set(e,0),me(0)),ir.set(e,2)}function vi(e,n,o){const a=Vn(e);let d=a[n];y(d)&&(d=a[n]=[]),B.call(d,o)===-1&&(d.length===0&&fe.call(e,n,_i),K.call(d,o))}function bi(e,n,o){const a=Vn(e);let d,m;!y(m=a[n])&&(d=B.call(m,o))!==-1&&(Ye.call(m,d,1),m.length===0&&nt.call(e,n,_i))}function Qi(e,n,o){if(be(n)){const a=yi(n);vi(this,e,a)}}function Ji(e,n,o){if(be(n)){const a=yi(n);bi(this,e,a)}}function Zi(e,n,o,a){if(be(o)){const d=x(e),m=mi(o);vi(d,n,m)}}function eo(e,n,o,a){if(be(o)){const d=x(e),m=mi(o);bi(d,n,m)}}const yt=new WeakMap,{createDocumentFragment:to}=document;function ro(e){return yt.has(e)}function or(e){const n=yt.get(e);if(y(n))throw new TypeError;return n}N(U.prototype,lt,{set(e){y(e)||(this[pr]=e,Mn(this,e.nodeKey))},get(){return this[pr]},configurable:!0,enumerable:!0}),N(Fe,rn,{value:Cn}),y(Fe[gr])&&N(Fe,gr,{value:zt,configurable:!0}),y(Fe[yr])&&N(Fe,yr,{value:tt,configurable:!0});function _t(e){return e[lt]}function wi(e,n){e[lt]=n}function sr(e){return or(e).delegatesFocus}function x(e){return or(e).host}function Oe(e){return or(e).shadowRoot}function F(e){const n=yt.get(e);return!y(n)&&e===n.host}function Wn(e){const n=yt.get(e);return!y(n)&&e===n.shadowRoot}let no=0;function io(e,n){if(yt.has(e))throw new Error("Failed to execute 'attachShadow' on 'Element': Shadow root cannot be created on a host which already hosts a shadow tree.");const{mode:o,delegatesFocus:a}=n,d=ee(e),m=to.call(d),R={mode:o,delegatesFocus:!!a,host:e,shadowRoot:m};yt.set(m,R),yt.set(e,R);const I=()=>m,$=I.nodeKey=no++;return kn(e,$),wi(m,I),Q(m,Ft.prototype),m}const Ei={constructor:{writable:!0,configurable:!0,value:Ft},toString:{writable:!0,configurable:!0,value(){return"[object ShadowRoot]"}},synthetic:{writable:!1,enumerable:!1,configurable:!1,value:!0}},oo={activeElement:{enumerable:!0,configurable:!0,get(){const e=x(this),n=ee(e),o=Ge.call(n);if(w(o))return o;if((he.call(e,o)&He)==0)return null;let a=o;for(;!Re(e,a);)a=Se.call(a);return we(a)?null:a}},delegatesFocus:{configurable:!0,get(){return or(this).delegatesFocus}},elementFromPoint:{writable:!0,enumerable:!0,configurable:!0,value(e,n){const o=x(this),a=ee(o);return Ti(this,a,e,n)}},elementsFromPoint:{writable:!0,enumerable:!0,configurable:!0,value(e,n){const o=x(this),a=ee(o);return Ke(this,a,e,n)}},getSelection:{writable:!0,enumerable:!0,configurable:!0,value(){throw new Error('Disallowed method "getSelection" on ShadowRoot.')}},host:{enumerable:!0,configurable:!0,get(){return x(this)}},mode:{configurable:!0,get(){return or(this).mode}},styleSheets:{enumerable:!0,configurable:!0,get(){throw new Error}}},zr=new WeakMap;Y(Ei,{insertBefore:{writable:!0,enumerable:!0,configurable:!0,value(e,n){return un.call(x(this),e,n),e}},removeChild:{writable:!0,enumerable:!0,configurable:!0,value(e){return cn.call(x(this),e),e}},appendChild:{writable:!0,enumerable:!0,configurable:!0,value(e){return ln.call(x(this),e),e}},replaceChild:{writable:!0,enumerable:!0,configurable:!0,value(e,n){return Er.call(x(this),e,n),n}},addEventListener:{writable:!0,enumerable:!0,configurable:!0,value(e,n,o){Zi(this,e,n)}},dispatchEvent:{writable:!0,enumerable:!0,configurable:!0,value(e){return zr.set(e,this),Jt.apply(x(this),arguments)}},removeEventListener:{writable:!0,enumerable:!0,configurable:!0,value(e,n,o){eo(this,e,n)}},baseURI:{enumerable:!0,configurable:!0,get(){return x(this).baseURI}},childNodes:{enumerable:!0,configurable:!0,get(){return We(Br(this))}},cloneNode:{writable:!0,enumerable:!0,configurable:!0,value(){throw new Error('Disallowed method "cloneNode" on ShadowRoot.')}},compareDocumentPosition:{writable:!0,enumerable:!0,configurable:!0,value(e){const n=x(this);return this===e?0:this.contains(e)?20:he.call(n,e)&He?37:35}},contains:{writable:!0,enumerable:!0,configurable:!0,value(e){if(this===e)return!0;const n=x(this);return(he.call(n,e)&He)!=0&&Re(n,e)}},firstChild:{enumerable:!0,configurable:!0,get(){return v(this)[0]||null}},lastChild:{enumerable:!0,configurable:!0,get(){const e=v(this);return e[e.length-1]||null}},hasChildNodes:{writable:!0,enumerable:!0,configurable:!0,value(){return v(this).length>0}},isConnected:{enumerable:!0,configurable:!0,get(){return jt.call(x(this))}},nextSibling:{enumerable:!0,configurable:!0,get(){return null}},previousSibling:{enumerable:!0,configurable:!0,get(){return null}},nodeName:{enumerable:!0,configurable:!0,get(){return"#document-fragment"}},nodeType:{enumerable:!0,configurable:!0,get(){return 11}},nodeValue:{enumerable:!0,configurable:!0,get(){return null}},ownerDocument:{enumerable:!0,configurable:!0,get(){return x(this).ownerDocument}},parentElement:{enumerable:!0,configurable:!0,get(){return null}},parentNode:{enumerable:!0,configurable:!0,get(){return null}},textContent:{enumerable:!0,configurable:!0,get(){const e=v(this);let n="";for(let o=0,a=e.length;o<a;o+=1){const d=e[o];d.nodeType!==wt&&(n+=rr(d))}return n},set(e){const n=x(this);Vt.call(n,e)}},getRootNode:{writable:!0,enumerable:!0,configurable:!0,value(e){return!y(e)&&De(e.composed)?x(this).getRootNode(e):this}}},{childElementCount:{enumerable:!0,configurable:!0,get(){return this.children.length}},children:{enumerable:!0,configurable:!0,get(){return Ee(W.call(Br(this),e=>e instanceof Element))}},firstElementChild:{enumerable:!0,configurable:!0,get(){return this.children[0]||null}},lastElementChild:{enumerable:!0,configurable:!0,get(){const{children:e}=this;return e.item(e.length-1)||null}},getElementById:{writable:!0,enumerable:!0,configurable:!0,value(){throw new Error('Disallowed method "getElementById" on ShadowRoot.')}},querySelector:{writable:!0,enumerable:!0,configurable:!0,value(e){return Lt(this,e)}},querySelectorAll:{writable:!0,enumerable:!0,configurable:!0,value(e){return We(Gr(this,e))}}},{innerHTML:{enumerable:!0,configurable:!0,get(){const e=v(this);let n="";for(let o=0,a=e.length;o<a;o+=1)n+=Dt(e[o]);return n},set(e){const n=x(this);Kt.call(n,e)}}},oo);function Ft(){throw new TypeError("Illegal constructor")}Ft.prototype=P(DocumentFragment.prototype,Ei),N(Ft,Symbol.hasInstance,{value:function(e){return hr(e)&&!w(e)&&(It(e)||oe(e)===Ft.prototype)}});function ps(e){const n=Oe(e);let o=n.$$placeholder$$;if(!y(o))return o;const a=ee(e);return o=n.$$placeholder$$=Mr.call(a,""),C(o,{childNodes:{get(){return n.childNodes},enumerable:!0,configurable:!0},tagName:{get(){return`#shadow-root (${n.mode})`},enumerable:!0,configurable:!0}}),o}function Ht(e,n){const o=[];let a;if(e instanceof Window)a=e;else if(e instanceof U)a=e.getRootNode();else return o;let d=e;for(;!w(d);)if(o.push(d),d instanceof Element||d instanceof Text){const R=d.assignedSlot;w(R)?d=d.parentNode:d=R}else(Wn(d)||It(d))&&(n||d!==a)?d=d.host:d instanceof U?d=d.parentNode:d=null;let m;return e instanceof Window?m=e.document:m=ee(e),o[o.length-1]===m&&o.push(window),o}/**
|