@combeenation/custom-code-sdk 0.0.1-alpha3 โ 0.0.1-alpha5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.cjs.js +10 -10
- package/dist/bundle.es.js +5114 -5032
- package/dist/index.d.ts +55 -24
- package/package.json +1 -1
package/dist/bundle.cjs.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
"use strict";var P_=Object.defineProperty;var Zp=t=>{throw TypeError(t)};var D_=(t,e,n)=>e in t?P_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Ct=(t,e,n)=>D_(t,typeof e!="symbol"?e+"":e,n),Yp=(t,e,n)=>e.has(t)||Zp("Cannot "+n);var Le=(t,e,n)=>(Yp(t,e,"read from private field"),n?n.call(t):e.get(t)),sr=(t,e,n)=>e.has(t)?Zp("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),ar=(t,e,n,r)=>(Yp(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const I=require("zod"),dm="0.0.1-alpha3";var pr;class R_{constructor(e){Ct(this,"id");Ct(this,"sdkBridgeVersion","v1");sr(this,pr);var r,i;this.id=e;const n=(i=(r=window.Cbn)==null?void 0:r.getCustomCodeSdkBridge)==null?void 0:i.call(r,this.sdkBridgeVersion);if(ar(this,pr,n==null?void 0:n.getButtonSdkBridge(this.id)),!Le(this,pr))throw new Error(`Cannot access API for Button "${this.id}".`)}onRendered(e){var n;return((n=Le(this,pr))==null?void 0:n.addOnRenderedCallback(e))??{unsubscribe:()=>{}}}onClick(e){var n;return((n=Le(this,pr))==null?void 0:n.addOnClickCallback(e))??{unsubscribe:()=>{}}}async setVisible(e){var n;await((n=Le(this,pr))==null?void 0:n.setVisible(e))}setText(e){var n;(n=Le(this,pr))==null||n.setText(e)}}pr=new WeakMap;var Bi;class A_{constructor(e){Ct(this,"id");Ct(this,"sdkBridgeVersion","v1");sr(this,Bi);var r,i;this.id=e;const n=(i=(r=window.Cbn)==null?void 0:r.getCustomCodeSdkBridge)==null?void 0:i.call(r,this.sdkBridgeVersion);if(ar(this,Bi,n==null?void 0:n.getCheckboxSdkBridge(this.id)),!Le(this,Bi))throw new Error(`Cannot access API for Checkbox "${this.id}".`)}onRendered(e){var n;return((n=Le(this,Bi))==null?void 0:n.addOnRenderedCallback(e))??{unsubscribe:()=>{}}}async setVisible(e){var n;await((n=Le(this,Bi))==null?void 0:n.setVisible(e))}}Bi=new WeakMap;var Ki;class M_{constructor(e){Ct(this,"id");Ct(this,"sdkBridgeVersion","v1");sr(this,Ki);var r,i;this.id=e;const n=(i=(r=window.Cbn)==null?void 0:r.getCustomCodeSdkBridge)==null?void 0:i.call(r,this.sdkBridgeVersion);if(ar(this,Ki,n==null?void 0:n.getCollapsibleSdkBridge(this.id)),!Le(this,Ki))throw new Error(`Cannot access API for Collapsible "${this.id}".`)}onRendered(e){var n;return((n=Le(this,Ki))==null?void 0:n.addOnRenderedCallback(e))??{unsubscribe:()=>{}}}async setVisible(e){var n;await((n=Le(this,Ki))==null?void 0:n.setVisible(e))}}Ki=new WeakMap;var gr;class z_{constructor(e){Ct(this,"id");Ct(this,"sdkBridgeVersion","v1");sr(this,gr);var r,i;this.id=e;const n=(i=(r=window.Cbn)==null?void 0:r.getCustomCodeSdkBridge)==null?void 0:i.call(r,this.sdkBridgeVersion);if(ar(this,gr,n==null?void 0:n.getCustomCtrlSdkBridge(this.id)),!Le(this,gr))throw new Error(`Cannot access API for Custom Control "${this.id}".`)}set renderFn(e){var n;(n=Le(this,gr))==null||n.setRenderFn(e)}async render(){var e;await((e=Le(this,gr))==null?void 0:e.render())}getElement(){var n;return(n=Le(this,gr))==null?void 0:n.getElement()}async setVisible(e){var n;await((n=Le(this,gr))==null?void 0:n.setVisible(e))}}gr=new WeakMap;var Xi;class U_{constructor(e){Ct(this,"id");Ct(this,"sdkBridgeVersion","v1");sr(this,Xi);var r,i;this.id=e;const n=(i=(r=window.Cbn)==null?void 0:r.getCustomCodeSdkBridge)==null?void 0:i.call(r,this.sdkBridgeVersion);if(ar(this,Xi,n==null?void 0:n.getDataviewSdkBridge(this.id)),!Le(this,Xi))throw new Error(`Cannot access API for Dataview "${this.id}".`)}onRendered(e){var n;return((n=Le(this,Xi))==null?void 0:n.addOnRenderedCallback(e))??{unsubscribe:()=>{}}}async setVisible(e){var n;await((n=Le(this,Xi))==null?void 0:n.setVisible(e))}}Xi=new WeakMap;var Ji;class N_{constructor(e){Ct(this,"id");Ct(this,"sdkBridgeVersion","v1");sr(this,Ji);var r,i;this.id=e;const n=(i=(r=window.Cbn)==null?void 0:r.getCustomCodeSdkBridge)==null?void 0:i.call(r,this.sdkBridgeVersion);if(ar(this,Ji,n==null?void 0:n.getInputSdkBridge(this.id)),!Le(this,Ji))throw new Error(`Cannot access API for Input "${this.id}".`)}onRendered(e){var n;return((n=Le(this,Ji))==null?void 0:n.addOnRenderedCallback(e))??{unsubscribe:()=>{}}}async setVisible(e){var n;await((n=Le(this,Ji))==null?void 0:n.setVisible(e))}}Ji=new WeakMap;var Gi;class $_{constructor(e){Ct(this,"id");Ct(this,"sdkBridgeVersion","v1");sr(this,Gi);var r,i;this.id=e;const n=(i=(r=window.Cbn)==null?void 0:r.getCustomCodeSdkBridge)==null?void 0:i.call(r,this.sdkBridgeVersion);if(ar(this,Gi,n==null?void 0:n.getPanelSdkBridge(this.id)),!Le(this,Gi))throw new Error(`Cannot access API for Panel "${this.id}".`)}onRendered(e){var n;return((n=Le(this,Gi))==null?void 0:n.addOnRenderedCallback(e))??{unsubscribe:()=>{}}}async setVisible(e){var n;await((n=Le(this,Gi))==null?void 0:n.setVisible(e))}}Gi=new WeakMap;var ei;class L_{constructor(e){Ct(this,"id");Ct(this,"sdkBridgeVersion","v1");sr(this,ei);var r,i;this.id=e;const n=(i=(r=window.Cbn)==null?void 0:r.getCustomCodeSdkBridge)==null?void 0:i.call(r,this.sdkBridgeVersion);if(ar(this,ei,n==null?void 0:n.getTextSdkBridge(this.id)),!Le(this,ei))throw new Error(`Cannot access API for Text "${this.id}".`)}onRendered(e){var n;return((n=Le(this,ei))==null?void 0:n.addOnRenderedCallback(e))??{unsubscribe:()=>{}}}async setVisible(e){var n;await((n=Le(this,ei))==null?void 0:n.setVisible(e))}setText(e){var n;(n=Le(this,ei))==null||n.setText(e)}}ei=new WeakMap;const ku=[];function hm(t,e){if(ku.length>=1)throw new Error("Only 1 `ConfiguratorClient` can be created at a time.");ku.push({client:t,internals:e})}function eg(){const t=ku[0];if(!t)throw new Error("Operation not possible as no `ConfiguratorClient` has been registered yet.");return t.client}function Gc(){const t=ku[0];if(!t)throw new Error("Operation not possible as no `ConfiguratorClient` has been registered yet.");return t.internals}function j_(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Bl={exports:{}},tg;function O_(){return tg||(tg=1,(function(t){var e=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(c,u,l){this.fn=c,this.context=u,this.once=l||!1}function o(c,u,l,f,m){if(typeof l!="function")throw new TypeError("The listener must be a function");var d=new i(l,f||c,m),h=n?n+u:u;return c._events[h]?c._events[h].fn?c._events[h]=[c._events[h],d]:c._events[h].push(d):(c._events[h]=d,c._eventsCount++),c}function s(c,u){--c._eventsCount===0?c._events=new r:delete c._events[u]}function a(){this._events=new r,this._eventsCount=0}a.prototype.eventNames=function(){var u=[],l,f;if(this._eventsCount===0)return u;for(f in l=this._events)e.call(l,f)&&u.push(n?f.slice(1):f);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(l)):u},a.prototype.listeners=function(u){var l=n?n+u:u,f=this._events[l];if(!f)return[];if(f.fn)return[f.fn];for(var m=0,d=f.length,h=new Array(d);m<d;m++)h[m]=f[m].fn;return h},a.prototype.listenerCount=function(u){var l=n?n+u:u,f=this._events[l];return f?f.fn?1:f.length:0},a.prototype.emit=function(u,l,f,m,d,h){var g=n?n+u:u;if(!this._events[g])return!1;var p=this._events[g],v=arguments.length,_,P;if(p.fn){switch(p.once&&this.removeListener(u,p.fn,void 0,!0),v){case 1:return p.fn.call(p.context),!0;case 2:return p.fn.call(p.context,l),!0;case 3:return p.fn.call(p.context,l,f),!0;case 4:return p.fn.call(p.context,l,f,m),!0;case 5:return p.fn.call(p.context,l,f,m,d),!0;case 6:return p.fn.call(p.context,l,f,m,d,h),!0}for(P=1,_=new Array(v-1);P<v;P++)_[P-1]=arguments[P];p.fn.apply(p.context,_)}else{var x=p.length,R;for(P=0;P<x;P++)switch(p[P].once&&this.removeListener(u,p[P].fn,void 0,!0),v){case 1:p[P].fn.call(p[P].context);break;case 2:p[P].fn.call(p[P].context,l);break;case 3:p[P].fn.call(p[P].context,l,f);break;case 4:p[P].fn.call(p[P].context,l,f,m);break;default:if(!_)for(R=1,_=new Array(v-1);R<v;R++)_[R-1]=arguments[R];p[P].fn.apply(p[P].context,_)}}return!0},a.prototype.on=function(u,l,f){return o(this,u,l,f,!1)},a.prototype.once=function(u,l,f){return o(this,u,l,f,!0)},a.prototype.removeListener=function(u,l,f,m){var d=n?n+u:u;if(!this._events[d])return this;if(!l)return s(this,d),this;var h=this._events[d];if(h.fn)h.fn===l&&(!m||h.once)&&(!f||h.context===f)&&s(this,d);else{for(var g=0,p=[],v=h.length;g<v;g++)(h[g].fn!==l||m&&!h[g].once||f&&h[g].context!==f)&&p.push(h[g]);p.length?this._events[d]=p.length===1?p[0]:p:s(this,d)}return this},a.prototype.removeAllListeners=function(u){var l;return u?(l=n?n+u:u,this._events[l]&&s(this,l)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,t.exports=a})(Bl)),Bl.exports}var F_=O_();const wl=j_(F_);class Qi extends Error{constructor(e,n){const r=new.target.prototype;super(`${e}: Status code '${n}'`),this.statusCode=n,this.__proto__=r}}class Zh extends Error{constructor(e="A timeout occurred."){const n=new.target.prototype;super(e),this.__proto__=n}}class xn extends Error{constructor(e="An abort occurred."){const n=new.target.prototype;super(e),this.__proto__=n}}class W_ extends Error{constructor(e,n){const r=new.target.prototype;super(e),this.transport=n,this.errorType="UnsupportedTransportError",this.__proto__=r}}class V_ extends Error{constructor(e,n){const r=new.target.prototype;super(e),this.transport=n,this.errorType="DisabledTransportError",this.__proto__=r}}class H_ extends Error{constructor(e,n){const r=new.target.prototype;super(e),this.transport=n,this.errorType="FailedToStartTransportError",this.__proto__=r}}class ng extends Error{constructor(e){const n=new.target.prototype;super(e),this.errorType="FailedToNegotiateWithServerError",this.__proto__=n}}class q_ extends Error{constructor(e,n){const r=new.target.prototype;super(e),this.innerErrors=n,this.__proto__=r}}class pm{constructor(e,n,r){this.statusCode=e,this.statusText=n,this.content=r}}class Cl{get(e,n){return this.send({...n,method:"GET",url:e})}post(e,n){return this.send({...n,method:"POST",url:e})}delete(e,n){return this.send({...n,method:"DELETE",url:e})}getCookieString(e){return""}}var N;(function(t){t[t.Trace=0]="Trace",t[t.Debug=1]="Debug",t[t.Information=2]="Information",t[t.Warning=3]="Warning",t[t.Error=4]="Error",t[t.Critical=5]="Critical",t[t.None=6]="None"})(N||(N={}));class Wa{constructor(){}log(e,n){}}Wa.instance=new Wa;const B_="10.0.0";class ht{static isRequired(e,n){if(e==null)throw new Error(`The '${n}' argument is required.`)}static isNotEmpty(e,n){if(!e||e.match(/^\s*$/))throw new Error(`The '${n}' argument should not be empty.`)}static isIn(e,n,r){if(!(e in n))throw new Error(`Unknown ${r} value: ${e}.`)}}class nt{static get isBrowser(){return!nt.isNode&&typeof window=="object"&&typeof window.document=="object"}static get isWebWorker(){return!nt.isNode&&typeof self=="object"&&"importScripts"in self}static get isReactNative(){return!nt.isNode&&typeof window=="object"&&typeof window.document>"u"}static get isNode(){return typeof process<"u"&&process.release&&process.release.name==="node"}}function Va(t,e){let n="";return uo(t)?(n=`Binary data of length ${t.byteLength}`,e&&(n+=`. Content: '${K_(t)}'`)):typeof t=="string"&&(n=`String data of length ${t.length}`,e&&(n+=`. Content: '${t}'`)),n}function K_(t){const e=new Uint8Array(t);let n="";return e.forEach(r=>{const i=r<16?"0":"";n+=`0x${i}${r.toString(16)} `}),n.substring(0,n.length-1)}function uo(t){return t&&typeof ArrayBuffer<"u"&&(t instanceof ArrayBuffer||t.constructor&&t.constructor.name==="ArrayBuffer")}async function gm(t,e,n,r,i,o){const s={},[a,c]=As();s[a]=c,t.log(N.Trace,`(${e} transport) sending data. ${Va(i,o.logMessageContent)}.`);const u=uo(i)?"arraybuffer":"text",l=await n.post(r,{content:i,headers:{...s,...o.headers},responseType:u,timeout:o.timeout,withCredentials:o.withCredentials});t.log(N.Trace,`(${e} transport) request complete. Response status: ${l.statusCode}.`)}function X_(t){return t===void 0?new Iu(N.Information):t===null?Wa.instance:t.log!==void 0?t:new Iu(t)}class J_{constructor(e,n){this._subject=e,this._observer=n}dispose(){const e=this._subject.observers.indexOf(this._observer);e>-1&&this._subject.observers.splice(e,1),this._subject.observers.length===0&&this._subject.cancelCallback&&this._subject.cancelCallback().catch(n=>{})}}class Iu{constructor(e){this._minLevel=e,this.out=console}log(e,n){if(e>=this._minLevel){const r=`[${new Date().toISOString()}] ${N[e]}: ${n}`;switch(e){case N.Critical:case N.Error:this.out.error(r);break;case N.Warning:this.out.warn(r);break;case N.Information:this.out.info(r);break;default:this.out.log(r);break}}}}function As(){let t="X-SignalR-User-Agent";return nt.isNode&&(t="User-Agent"),[t,G_(B_,Q_(),Y_(),Z_())]}function G_(t,e,n,r){let i="Microsoft SignalR/";const o=t.split(".");return i+=`${o[0]}.${o[1]}`,i+=` (${t}; `,e&&e!==""?i+=`${e}; `:i+="Unknown OS; ",i+=`${n}`,r?i+=`; ${r}`:i+="; Unknown Runtime Version",i+=")",i}function Q_(){if(nt.isNode)switch(process.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return process.platform}else return""}function Z_(){if(nt.isNode)return process.versions.node}function Y_(){return nt.isNode?"NodeJS":"Browser"}function Kl(t){return t.stack?t.stack:t.message?t.message:`${t}`}function e0(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("could not find global")}class t0 extends Cl{constructor(e){if(super(),this._logger=e,typeof fetch>"u"||nt.isNode){const n=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._jar=new(n("tough-cookie")).CookieJar,typeof fetch>"u"?this._fetchType=n("node-fetch"):this._fetchType=fetch,this._fetchType=n("fetch-cookie")(this._fetchType,this._jar)}else this._fetchType=fetch.bind(e0());if(typeof AbortController>"u"){const n=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._abortControllerType=n("abort-controller")}else this._abortControllerType=AbortController}async send(e){if(e.abortSignal&&e.abortSignal.aborted)throw new xn;if(!e.method)throw new Error("No method defined.");if(!e.url)throw new Error("No url defined.");const n=new this._abortControllerType;let r;e.abortSignal&&(e.abortSignal.onabort=()=>{n.abort(),r=new xn});let i=null;if(e.timeout){const c=e.timeout;i=setTimeout(()=>{n.abort(),this._logger.log(N.Warning,"Timeout from HTTP request."),r=new Zh},c)}e.content===""&&(e.content=void 0),e.content&&(e.headers=e.headers||{},uo(e.content)?e.headers["Content-Type"]="application/octet-stream":e.headers["Content-Type"]="text/plain;charset=UTF-8");let o;try{o=await this._fetchType(e.url,{body:e.content,cache:"no-cache",credentials:e.withCredentials===!0?"include":"same-origin",headers:{"X-Requested-With":"XMLHttpRequest",...e.headers},method:e.method,mode:"cors",redirect:"follow",signal:n.signal})}catch(c){throw r||(this._logger.log(N.Warning,`Error from HTTP request. ${c}.`),c)}finally{i&&clearTimeout(i),e.abortSignal&&(e.abortSignal.onabort=null)}if(!o.ok){const c=await rg(o,"text");throw new Qi(c||o.statusText,o.status)}const a=await rg(o,e.responseType);return new pm(o.status,o.statusText,a)}getCookieString(e){let n="";return nt.isNode&&this._jar&&this._jar.getCookies(e,(r,i)=>n=i.join("; ")),n}}function rg(t,e){let n;switch(e){case"arraybuffer":n=t.arrayBuffer();break;case"text":n=t.text();break;case"blob":case"document":case"json":throw new Error(`${e} is not supported.`);default:n=t.text();break}return n}class n0 extends Cl{constructor(e){super(),this._logger=e}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new xn):e.method?e.url?new Promise((n,r)=>{const i=new XMLHttpRequest;i.open(e.method,e.url,!0),i.withCredentials=e.withCredentials===void 0?!0:e.withCredentials,i.setRequestHeader("X-Requested-With","XMLHttpRequest"),e.content===""&&(e.content=void 0),e.content&&(uo(e.content)?i.setRequestHeader("Content-Type","application/octet-stream"):i.setRequestHeader("Content-Type","text/plain;charset=UTF-8"));const o=e.headers;o&&Object.keys(o).forEach(s=>{i.setRequestHeader(s,o[s])}),e.responseType&&(i.responseType=e.responseType),e.abortSignal&&(e.abortSignal.onabort=()=>{i.abort(),r(new xn)}),e.timeout&&(i.timeout=e.timeout),i.onload=()=>{e.abortSignal&&(e.abortSignal.onabort=null),i.status>=200&&i.status<300?n(new pm(i.status,i.statusText,i.response||i.responseText)):r(new Qi(i.response||i.responseText||i.statusText,i.status))},i.onerror=()=>{this._logger.log(N.Warning,`Error from HTTP request. ${i.status}: ${i.statusText}.`),r(new Qi(i.statusText,i.status))},i.ontimeout=()=>{this._logger.log(N.Warning,"Timeout from HTTP request."),r(new Zh)},i.send(e.content)}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}}class r0 extends Cl{constructor(e){if(super(),typeof fetch<"u"||nt.isNode)this._httpClient=new t0(e);else if(typeof XMLHttpRequest<"u")this._httpClient=new n0(e);else throw new Error("No usable HttpClient found.")}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new xn):e.method?e.url?this._httpClient.send(e):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}getCookieString(e){return this._httpClient.getCookieString(e)}}class rn{static write(e){return`${e}${rn.RecordSeparator}`}static parse(e){if(e[e.length-1]!==rn.RecordSeparator)throw new Error("Message is incomplete.");const n=e.split(rn.RecordSeparator);return n.pop(),n}}rn.RecordSeparatorCode=30;rn.RecordSeparator=String.fromCharCode(rn.RecordSeparatorCode);class i0{writeHandshakeRequest(e){return rn.write(JSON.stringify(e))}parseHandshakeResponse(e){let n,r;if(uo(e)){const a=new Uint8Array(e),c=a.indexOf(rn.RecordSeparatorCode);if(c===-1)throw new Error("Message is incomplete.");const u=c+1;n=String.fromCharCode.apply(null,Array.prototype.slice.call(a.slice(0,u))),r=a.byteLength>u?a.slice(u).buffer:null}else{const a=e,c=a.indexOf(rn.RecordSeparator);if(c===-1)throw new Error("Message is incomplete.");const u=c+1;n=a.substring(0,u),r=a.length>u?a.substring(u):null}const i=rn.parse(n),o=JSON.parse(i[0]);if(o.type)throw new Error("Expected a handshake response from the server.");return[r,o]}}var Se;(function(t){t[t.Invocation=1]="Invocation",t[t.StreamItem=2]="StreamItem",t[t.Completion=3]="Completion",t[t.StreamInvocation=4]="StreamInvocation",t[t.CancelInvocation=5]="CancelInvocation",t[t.Ping=6]="Ping",t[t.Close=7]="Close",t[t.Ack=8]="Ack",t[t.Sequence=9]="Sequence"})(Se||(Se={}));class o0{constructor(){this.observers=[]}next(e){for(const n of this.observers)n.next(e)}error(e){for(const n of this.observers)n.error&&n.error(e)}complete(){for(const e of this.observers)e.complete&&e.complete()}subscribe(e){return this.observers.push(e),new J_(this,e)}}class s0{constructor(e,n,r){this._bufferSize=1e5,this._messages=[],this._totalMessageCount=0,this._waitForSequenceMessage=!1,this._nextReceivingSequenceId=1,this._latestReceivedSequenceId=0,this._bufferedByteCount=0,this._reconnectInProgress=!1,this._protocol=e,this._connection=n,this._bufferSize=r}async _send(e){const n=this._protocol.writeMessage(e);let r=Promise.resolve();if(this._isInvocationMessage(e)){this._totalMessageCount++;let i=()=>{},o=()=>{};uo(n)?this._bufferedByteCount+=n.byteLength:this._bufferedByteCount+=n.length,this._bufferedByteCount>=this._bufferSize&&(r=new Promise((s,a)=>{i=s,o=a})),this._messages.push(new a0(n,this._totalMessageCount,i,o))}try{this._reconnectInProgress||await this._connection.send(n)}catch{this._disconnected()}await r}_ack(e){let n=-1;for(let r=0;r<this._messages.length;r++){const i=this._messages[r];if(i._id<=e.sequenceId)n=r,uo(i._message)?this._bufferedByteCount-=i._message.byteLength:this._bufferedByteCount-=i._message.length,i._resolver();else if(this._bufferedByteCount<this._bufferSize)i._resolver();else break}n!==-1&&(this._messages=this._messages.slice(n+1))}_shouldProcessMessage(e){if(this._waitForSequenceMessage)return e.type!==Se.Sequence?!1:(this._waitForSequenceMessage=!1,!0);if(!this._isInvocationMessage(e))return!0;const n=this._nextReceivingSequenceId;return this._nextReceivingSequenceId++,n<=this._latestReceivedSequenceId?(n===this._latestReceivedSequenceId&&this._ackTimer(),!1):(this._latestReceivedSequenceId=n,this._ackTimer(),!0)}_resetSequence(e){if(e.sequenceId>this._nextReceivingSequenceId){this._connection.stop(new Error("Sequence ID greater than amount of messages we've received."));return}this._nextReceivingSequenceId=e.sequenceId}_disconnected(){this._reconnectInProgress=!0,this._waitForSequenceMessage=!0}async _resend(){const e=this._messages.length!==0?this._messages[0]._id:this._totalMessageCount+1;await this._connection.send(this._protocol.writeMessage({type:Se.Sequence,sequenceId:e}));const n=this._messages;for(const r of n)await this._connection.send(r._message);this._reconnectInProgress=!1}_dispose(e){e??(e=new Error("Unable to reconnect to server."));for(const n of this._messages)n._rejector(e)}_isInvocationMessage(e){switch(e.type){case Se.Invocation:case Se.StreamItem:case Se.Completion:case Se.StreamInvocation:case Se.CancelInvocation:return!0;case Se.Close:case Se.Sequence:case Se.Ping:case Se.Ack:return!1}}_ackTimer(){this._ackTimerHandle===void 0&&(this._ackTimerHandle=setTimeout(async()=>{try{this._reconnectInProgress||await this._connection.send(this._protocol.writeMessage({type:Se.Ack,sequenceId:this._latestReceivedSequenceId}))}catch{}clearTimeout(this._ackTimerHandle),this._ackTimerHandle=void 0},1e3))}}class a0{constructor(e,n,r,i){this._message=e,this._id=n,this._resolver=r,this._rejector=i}}const c0=30*1e3,u0=15*1e3,l0=1e5;var Xe;(function(t){t.Disconnected="Disconnected",t.Connecting="Connecting",t.Connected="Connected",t.Disconnecting="Disconnecting",t.Reconnecting="Reconnecting"})(Xe||(Xe={}));class Yh{static create(e,n,r,i,o,s,a){return new Yh(e,n,r,i,o,s,a)}constructor(e,n,r,i,o,s,a){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.log(N.Warning,"The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://learn.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")},ht.isRequired(e,"connection"),ht.isRequired(n,"logger"),ht.isRequired(r,"protocol"),this.serverTimeoutInMilliseconds=o??c0,this.keepAliveIntervalInMilliseconds=s??u0,this._statefulReconnectBufferSize=a??l0,this._logger=n,this._protocol=r,this.connection=e,this._reconnectPolicy=i,this._handshakeProtocol=new i0,this.connection.onreceive=c=>this._processIncomingData(c),this.connection.onclose=c=>this._connectionClosed(c),this._callbacks={},this._methods={},this._closedCallbacks=[],this._reconnectingCallbacks=[],this._reconnectedCallbacks=[],this._invocationId=0,this._receivedHandshakeResponse=!1,this._connectionState=Xe.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:Se.Ping})}get state(){return this._connectionState}get connectionId(){return this.connection&&this.connection.connectionId||null}get baseUrl(){return this.connection.baseUrl||""}set baseUrl(e){if(this._connectionState!==Xe.Disconnected&&this._connectionState!==Xe.Reconnecting)throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!e)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=e}start(){return this._startPromise=this._startWithStateTransitions(),this._startPromise}async _startWithStateTransitions(){if(this._connectionState!==Xe.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));this._connectionState=Xe.Connecting,this._logger.log(N.Debug,"Starting HubConnection.");try{await this._startInternal(),nt.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener),this._connectionState=Xe.Connected,this._connectionStarted=!0,this._logger.log(N.Debug,"HubConnection connected successfully.")}catch(e){return this._connectionState=Xe.Disconnected,this._logger.log(N.Debug,`HubConnection failed to start successfully because of error '${e}'.`),Promise.reject(e)}}async _startInternal(){this._stopDuringStartError=void 0,this._receivedHandshakeResponse=!1;const e=new Promise((n,r)=>{this._handshakeResolver=n,this._handshakeRejecter=r});await this.connection.start(this._protocol.transferFormat);try{let n=this._protocol.version;this.connection.features.reconnect||(n=1);const r={protocol:this._protocol.name,version:n};if(this._logger.log(N.Debug,"Sending handshake request."),await this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(r)),this._logger.log(N.Information,`Using HubProtocol '${this._protocol.name}'.`),this._cleanupTimeout(),this._resetTimeoutPeriod(),this._resetKeepAliveInterval(),await e,this._stopDuringStartError)throw this._stopDuringStartError;(this.connection.features.reconnect||!1)&&(this._messageBuffer=new s0(this._protocol,this.connection,this._statefulReconnectBufferSize),this.connection.features.disconnected=this._messageBuffer._disconnected.bind(this._messageBuffer),this.connection.features.resend=()=>{if(this._messageBuffer)return this._messageBuffer._resend()}),this.connection.features.inherentKeepAlive||await this._sendMessage(this._cachedPingMessage)}catch(n){throw this._logger.log(N.Debug,`Hub handshake failed with error '${n}' during start(). Stopping HubConnection.`),this._cleanupTimeout(),this._cleanupPingTimer(),await this.connection.stop(n),n}}async stop(){const e=this._startPromise;this.connection.features.reconnect=!1,this._stopPromise=this._stopInternal(),await this._stopPromise;try{await e}catch{}}_stopInternal(e){if(this._connectionState===Xe.Disconnected)return this._logger.log(N.Debug,`Call to HubConnection.stop(${e}) ignored because it is already in the disconnected state.`),Promise.resolve();if(this._connectionState===Xe.Disconnecting)return this._logger.log(N.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;const n=this._connectionState;return this._connectionState=Xe.Disconnecting,this._logger.log(N.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(N.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(n===Xe.Connected&&this._sendCloseMessage(),this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=e||new xn("The connection was stopped before the hub handshake could complete."),this.connection.stop(e))}async _sendCloseMessage(){try{await this._sendWithProtocol(this._createCloseMessage())}catch{}}stream(e,...n){const[r,i]=this._replaceStreamingParams(n),o=this._createStreamInvocation(e,n,i);let s;const a=new o0;return a.cancelCallback=()=>{const c=this._createCancelInvocation(o.invocationId);return delete this._callbacks[o.invocationId],s.then(()=>this._sendWithProtocol(c))},this._callbacks[o.invocationId]=(c,u)=>{if(u){a.error(u);return}else c&&(c.type===Se.Completion?c.error?a.error(new Error(c.error)):a.complete():a.next(c.item))},s=this._sendWithProtocol(o).catch(c=>{a.error(c),delete this._callbacks[o.invocationId]}),this._launchStreams(r,s),a}_sendMessage(e){return this._resetKeepAliveInterval(),this.connection.send(e)}_sendWithProtocol(e){return this._messageBuffer?this._messageBuffer._send(e):this._sendMessage(this._protocol.writeMessage(e))}send(e,...n){const[r,i]=this._replaceStreamingParams(n),o=this._sendWithProtocol(this._createInvocation(e,n,!0,i));return this._launchStreams(r,o),o}invoke(e,...n){const[r,i]=this._replaceStreamingParams(n),o=this._createInvocation(e,n,!1,i);return new Promise((a,c)=>{this._callbacks[o.invocationId]=(l,f)=>{if(f){c(f);return}else l&&(l.type===Se.Completion?l.error?c(new Error(l.error)):a(l.result):c(new Error(`Unexpected message type: ${l.type}`)))};const u=this._sendWithProtocol(o).catch(l=>{c(l),delete this._callbacks[o.invocationId]});this._launchStreams(r,u)})}on(e,n){!e||!n||(e=e.toLowerCase(),this._methods[e]||(this._methods[e]=[]),this._methods[e].indexOf(n)===-1&&this._methods[e].push(n))}off(e,n){if(!e)return;e=e.toLowerCase();const r=this._methods[e];if(r)if(n){const i=r.indexOf(n);i!==-1&&(r.splice(i,1),r.length===0&&delete this._methods[e])}else delete this._methods[e]}onclose(e){e&&this._closedCallbacks.push(e)}onreconnecting(e){e&&this._reconnectingCallbacks.push(e)}onreconnected(e){e&&this._reconnectedCallbacks.push(e)}_processIncomingData(e){if(this._cleanupTimeout(),this._receivedHandshakeResponse||(e=this._processHandshakeResponse(e),this._receivedHandshakeResponse=!0),e){const n=this._protocol.parseMessages(e,this._logger);for(const r of n)if(!(this._messageBuffer&&!this._messageBuffer._shouldProcessMessage(r)))switch(r.type){case Se.Invocation:this._invokeClientMethod(r).catch(i=>{this._logger.log(N.Error,`Invoke client method threw error: ${Kl(i)}`)});break;case Se.StreamItem:case Se.Completion:{const i=this._callbacks[r.invocationId];if(i){r.type===Se.Completion&&delete this._callbacks[r.invocationId];try{i(r)}catch(o){this._logger.log(N.Error,`Stream callback threw error: ${Kl(o)}`)}}break}case Se.Ping:break;case Se.Close:{this._logger.log(N.Information,"Close message received from server.");const i=r.error?new Error("Server returned an error on close: "+r.error):void 0;r.allowReconnect===!0?this.connection.stop(i):this._stopPromise=this._stopInternal(i);break}case Se.Ack:this._messageBuffer&&this._messageBuffer._ack(r);break;case Se.Sequence:this._messageBuffer&&this._messageBuffer._resetSequence(r);break;default:this._logger.log(N.Warning,`Invalid message type: ${r.type}.`);break}}this._resetTimeoutPeriod()}_processHandshakeResponse(e){let n,r;try{[r,n]=this._handshakeProtocol.parseHandshakeResponse(e)}catch(i){const o="Error parsing handshake response: "+i;this._logger.log(N.Error,o);const s=new Error(o);throw this._handshakeRejecter(s),s}if(n.error){const i="Server returned handshake error: "+n.error;this._logger.log(N.Error,i);const o=new Error(i);throw this._handshakeRejecter(o),o}else this._logger.log(N.Debug,"Server handshake complete.");return this._handshakeResolver(),r}_resetKeepAliveInterval(){this.connection.features.inherentKeepAlive||(this._nextKeepAlive=new Date().getTime()+this.keepAliveIntervalInMilliseconds,this._cleanupPingTimer())}_resetTimeoutPeriod(){if(!this.connection.features||!this.connection.features.inherentKeepAlive){this._timeoutHandle=setTimeout(()=>this.serverTimeout(),this.serverTimeoutInMilliseconds);let e=this._nextKeepAlive-new Date().getTime();if(e<0){this._connectionState===Xe.Connected&&this._trySendPingMessage();return}this._pingServerHandle===void 0&&(e<0&&(e=0),this._pingServerHandle=setTimeout(async()=>{this._connectionState===Xe.Connected&&await this._trySendPingMessage()},e))}}serverTimeout(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))}async _invokeClientMethod(e){const n=e.target.toLowerCase(),r=this._methods[n];if(!r){this._logger.log(N.Warning,`No client method with the name '${n}' found.`),e.invocationId&&(this._logger.log(N.Warning,`No result given for '${n}' method and invocation ID '${e.invocationId}'.`),await this._sendWithProtocol(this._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null)));return}const i=r.slice(),o=!!e.invocationId;let s,a,c;for(const u of i)try{const l=s;s=await u.apply(this,e.arguments),o&&s&&l&&(this._logger.log(N.Error,`Multiple results provided for '${n}'. Sending error to server.`),c=this._createCompletionMessage(e.invocationId,"Client provided multiple results.",null)),a=void 0}catch(l){a=l,this._logger.log(N.Error,`A callback for the method '${n}' threw error '${l}'.`)}c?await this._sendWithProtocol(c):o?(a?c=this._createCompletionMessage(e.invocationId,`${a}`,null):s!==void 0?c=this._createCompletionMessage(e.invocationId,null,s):(this._logger.log(N.Warning,`No result given for '${n}' method and invocation ID '${e.invocationId}'.`),c=this._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null)),await this._sendWithProtocol(c)):s&&this._logger.log(N.Error,`Result given for '${n}' method but server is not expecting a result.`)}_connectionClosed(e){this._logger.log(N.Debug,`HubConnection.connectionClosed(${e}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||e||new xn("The underlying connection was closed before the hub handshake could complete."),this._handshakeResolver&&this._handshakeResolver(),this._cancelCallbacksWithError(e||new Error("Invocation canceled due to the underlying connection being closed.")),this._cleanupTimeout(),this._cleanupPingTimer(),this._connectionState===Xe.Disconnecting?this._completeClose(e):this._connectionState===Xe.Connected&&this._reconnectPolicy?this._reconnect(e):this._connectionState===Xe.Connected&&this._completeClose(e)}_completeClose(e){if(this._connectionStarted){this._connectionState=Xe.Disconnected,this._connectionStarted=!1,this._messageBuffer&&(this._messageBuffer._dispose(e??new Error("Connection closed.")),this._messageBuffer=void 0),nt.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach(n=>n.apply(this,[e]))}catch(n){this._logger.log(N.Error,`An onclose callback called with error '${e}' threw error '${n}'.`)}}}async _reconnect(e){const n=Date.now();let r=0,i=e!==void 0?e:new Error("Attempting to reconnect due to a unknown error."),o=this._getNextRetryDelay(r,0,i);if(o===null){this._logger.log(N.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),this._completeClose(e);return}if(this._connectionState=Xe.Reconnecting,e?this._logger.log(N.Information,`Connection reconnecting because of error '${e}'.`):this._logger.log(N.Information,"Connection reconnecting."),this._reconnectingCallbacks.length!==0){try{this._reconnectingCallbacks.forEach(s=>s.apply(this,[e]))}catch(s){this._logger.log(N.Error,`An onreconnecting callback called with error '${e}' threw error '${s}'.`)}if(this._connectionState!==Xe.Reconnecting){this._logger.log(N.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.");return}}for(;o!==null;){if(this._logger.log(N.Information,`Reconnect attempt number ${r+1} will start in ${o} ms.`),await new Promise(s=>{this._reconnectDelayHandle=setTimeout(s,o)}),this._reconnectDelayHandle=void 0,this._connectionState!==Xe.Reconnecting){this._logger.log(N.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");return}try{if(await this._startInternal(),this._connectionState=Xe.Connected,this._logger.log(N.Information,"HubConnection reconnected successfully."),this._reconnectedCallbacks.length!==0)try{this._reconnectedCallbacks.forEach(s=>s.apply(this,[this.connection.connectionId]))}catch(s){this._logger.log(N.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${s}'.`)}return}catch(s){if(this._logger.log(N.Information,`Reconnect attempt failed because of error '${s}'.`),this._connectionState!==Xe.Reconnecting){this._logger.log(N.Debug,`Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`),this._connectionState===Xe.Disconnecting&&this._completeClose();return}r++,i=s instanceof Error?s:new Error(s.toString()),o=this._getNextRetryDelay(r,Date.now()-n,i)}}this._logger.log(N.Information,`Reconnect retries have been exhausted after ${Date.now()-n} ms and ${r} failed attempts. Connection disconnecting.`),this._completeClose()}_getNextRetryDelay(e,n,r){try{return this._reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:n,previousRetryCount:e,retryReason:r})}catch(i){return this._logger.log(N.Error,`IRetryPolicy.nextRetryDelayInMilliseconds(${e}, ${n}) threw error '${i}'.`),null}}_cancelCallbacksWithError(e){const n=this._callbacks;this._callbacks={},Object.keys(n).forEach(r=>{const i=n[r];try{i(null,e)}catch(o){this._logger.log(N.Error,`Stream 'error' callback called with '${e}' threw error: ${Kl(o)}`)}})}_cleanupPingTimer(){this._pingServerHandle&&(clearTimeout(this._pingServerHandle),this._pingServerHandle=void 0)}_cleanupTimeout(){this._timeoutHandle&&clearTimeout(this._timeoutHandle)}_createInvocation(e,n,r,i){if(r)return i.length!==0?{target:e,arguments:n,streamIds:i,type:Se.Invocation}:{target:e,arguments:n,type:Se.Invocation};{const o=this._invocationId;return this._invocationId++,i.length!==0?{target:e,arguments:n,invocationId:o.toString(),streamIds:i,type:Se.Invocation}:{target:e,arguments:n,invocationId:o.toString(),type:Se.Invocation}}}_launchStreams(e,n){if(e.length!==0){n||(n=Promise.resolve());for(const r in e)e[r].subscribe({complete:()=>{n=n.then(()=>this._sendWithProtocol(this._createCompletionMessage(r)))},error:i=>{let o;i instanceof Error?o=i.message:i&&i.toString?o=i.toString():o="Unknown error",n=n.then(()=>this._sendWithProtocol(this._createCompletionMessage(r,o)))},next:i=>{n=n.then(()=>this._sendWithProtocol(this._createStreamItemMessage(r,i)))}})}}_replaceStreamingParams(e){const n=[],r=[];for(let i=0;i<e.length;i++){const o=e[i];if(this._isObservable(o)){const s=this._invocationId;this._invocationId++,n[s]=o,r.push(s.toString()),e.splice(i,1)}}return[n,r]}_isObservable(e){return e&&e.subscribe&&typeof e.subscribe=="function"}_createStreamInvocation(e,n,r){const i=this._invocationId;return this._invocationId++,r.length!==0?{target:e,arguments:n,invocationId:i.toString(),streamIds:r,type:Se.StreamInvocation}:{target:e,arguments:n,invocationId:i.toString(),type:Se.StreamInvocation}}_createCancelInvocation(e){return{invocationId:e,type:Se.CancelInvocation}}_createStreamItemMessage(e,n){return{invocationId:e,item:n,type:Se.StreamItem}}_createCompletionMessage(e,n,r){return n?{error:n,invocationId:e,type:Se.Completion}:{invocationId:e,result:r,type:Se.Completion}}_createCloseMessage(){return{type:Se.Close}}async _trySendPingMessage(){try{await this._sendMessage(this._cachedPingMessage)}catch{this._cleanupPingTimer()}}}const f0=[0,2e3,1e4,3e4,null];class ig{constructor(e){this._retryDelays=e!==void 0?[...e,null]:f0}nextRetryDelayInMilliseconds(e){return this._retryDelays[e.previousRetryCount]}}class Zi{}Zi.Authorization="Authorization";Zi.Cookie="Cookie";class d0 extends Cl{constructor(e,n){super(),this._innerClient=e,this._accessTokenFactory=n}async send(e){let n=!0;this._accessTokenFactory&&(!this._accessToken||e.url&&e.url.indexOf("/negotiate?")>0)&&(n=!1,this._accessToken=await this._accessTokenFactory()),this._setAuthorizationHeader(e);const r=await this._innerClient.send(e);return n&&r.statusCode===401&&this._accessTokenFactory?(this._accessToken=await this._accessTokenFactory(),this._setAuthorizationHeader(e),await this._innerClient.send(e)):r}_setAuthorizationHeader(e){e.headers||(e.headers={}),this._accessToken?e.headers[Zi.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&e.headers[Zi.Authorization]&&delete e.headers[Zi.Authorization]}getCookieString(e){return this._innerClient.getCookieString(e)}}var lt;(function(t){t[t.None=0]="None",t[t.WebSockets=1]="WebSockets",t[t.ServerSentEvents=2]="ServerSentEvents",t[t.LongPolling=4]="LongPolling"})(lt||(lt={}));var Rt;(function(t){t[t.Text=1]="Text",t[t.Binary=2]="Binary"})(Rt||(Rt={}));let h0=class{constructor(){this._isAborted=!1,this.onabort=null}abort(){this._isAborted||(this._isAborted=!0,this.onabort&&this.onabort())}get signal(){return this}get aborted(){return this._isAborted}};class og{get pollAborted(){return this._pollAbort.aborted}constructor(e,n,r){this._httpClient=e,this._logger=n,this._pollAbort=new h0,this._options=r,this._running=!1,this.onreceive=null,this.onclose=null}async connect(e,n){if(ht.isRequired(e,"url"),ht.isRequired(n,"transferFormat"),ht.isIn(n,Rt,"transferFormat"),this._url=e,this._logger.log(N.Trace,"(LongPolling transport) Connecting."),n===Rt.Binary&&typeof XMLHttpRequest<"u"&&typeof new XMLHttpRequest().responseType!="string")throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");const[r,i]=As(),o={[r]:i,...this._options.headers},s={abortSignal:this._pollAbort.signal,headers:o,timeout:1e5,withCredentials:this._options.withCredentials};n===Rt.Binary&&(s.responseType="arraybuffer");const a=`${e}&_=${Date.now()}`;this._logger.log(N.Trace,`(LongPolling transport) polling: ${a}.`);const c=await this._httpClient.get(a,s);c.statusCode!==200?(this._logger.log(N.Error,`(LongPolling transport) Unexpected response code: ${c.statusCode}.`),this._closeError=new Qi(c.statusText||"",c.statusCode),this._running=!1):this._running=!0,this._receiving=this._poll(this._url,s)}async _poll(e,n){try{for(;this._running;)try{const r=`${e}&_=${Date.now()}`;this._logger.log(N.Trace,`(LongPolling transport) polling: ${r}.`);const i=await this._httpClient.get(r,n);i.statusCode===204?(this._logger.log(N.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):i.statusCode!==200?(this._logger.log(N.Error,`(LongPolling transport) Unexpected response code: ${i.statusCode}.`),this._closeError=new Qi(i.statusText||"",i.statusCode),this._running=!1):i.content?(this._logger.log(N.Trace,`(LongPolling transport) data received. ${Va(i.content,this._options.logMessageContent)}.`),this.onreceive&&this.onreceive(i.content)):this._logger.log(N.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(r){this._running?r instanceof Zh?this._logger.log(N.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=r,this._running=!1):this._logger.log(N.Trace,`(LongPolling transport) Poll errored after shutdown: ${r.message}`)}}finally{this._logger.log(N.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose()}}async send(e){return this._running?gm(this._logger,"LongPolling",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}async stop(){this._logger.log(N.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();try{await this._receiving,this._logger.log(N.Trace,`(LongPolling transport) sending DELETE request to ${this._url}.`);const e={},[n,r]=As();e[n]=r;const i={headers:{...e,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials};let o;try{await this._httpClient.delete(this._url,i)}catch(s){o=s}o?o instanceof Qi&&(o.statusCode===404?this._logger.log(N.Trace,"(LongPolling transport) A 404 response was returned from sending a DELETE request."):this._logger.log(N.Trace,`(LongPolling transport) Error sending a DELETE request: ${o}`)):this._logger.log(N.Trace,"(LongPolling transport) DELETE request accepted.")}finally{this._logger.log(N.Trace,"(LongPolling transport) Stop finished."),this._raiseOnClose()}}_raiseOnClose(){if(this.onclose){let e="(LongPolling transport) Firing onclose event.";this._closeError&&(e+=" Error: "+this._closeError),this._logger.log(N.Trace,e),this.onclose(this._closeError)}}}class p0{constructor(e,n,r,i){this._httpClient=e,this._accessToken=n,this._logger=r,this._options=i,this.onreceive=null,this.onclose=null}async connect(e,n){return ht.isRequired(e,"url"),ht.isRequired(n,"transferFormat"),ht.isIn(n,Rt,"transferFormat"),this._logger.log(N.Trace,"(SSE transport) Connecting."),this._url=e,this._accessToken&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(this._accessToken)}`),new Promise((r,i)=>{let o=!1;if(n!==Rt.Text){i(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"));return}let s;if(nt.isBrowser||nt.isWebWorker)s=new this._options.EventSource(e,{withCredentials:this._options.withCredentials});else{const a=this._httpClient.getCookieString(e),c={};c.Cookie=a;const[u,l]=As();c[u]=l,s=new this._options.EventSource(e,{withCredentials:this._options.withCredentials,headers:{...c,...this._options.headers}})}try{s.onmessage=a=>{if(this.onreceive)try{this._logger.log(N.Trace,`(SSE transport) data received. ${Va(a.data,this._options.logMessageContent)}.`),this.onreceive(a.data)}catch(c){this._close(c);return}},s.onerror=a=>{o?this._close():i(new Error("EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled."))},s.onopen=()=>{this._logger.log(N.Information,`SSE connected to ${this._url}`),this._eventSource=s,o=!0,r()}}catch(a){i(a);return}})}async send(e){return this._eventSource?gm(this._logger,"SSE",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}stop(){return this._close(),Promise.resolve()}_close(e){this._eventSource&&(this._eventSource.close(),this._eventSource=void 0,this.onclose&&this.onclose(e))}}class g0{constructor(e,n,r,i,o,s){this._logger=r,this._accessTokenFactory=n,this._logMessageContent=i,this._webSocketConstructor=o,this._httpClient=e,this.onreceive=null,this.onclose=null,this._headers=s}async connect(e,n){ht.isRequired(e,"url"),ht.isRequired(n,"transferFormat"),ht.isIn(n,Rt,"transferFormat"),this._logger.log(N.Trace,"(WebSockets transport) Connecting.");let r;return this._accessTokenFactory&&(r=await this._accessTokenFactory()),new Promise((i,o)=>{e=e.replace(/^http/,"ws");let s;const a=this._httpClient.getCookieString(e);let c=!1;if(nt.isNode||nt.isReactNative){const u={},[l,f]=As();u[l]=f,r&&(u[Zi.Authorization]=`Bearer ${r}`),a&&(u[Zi.Cookie]=a),s=new this._webSocketConstructor(e,void 0,{headers:{...u,...this._headers}})}else r&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(r)}`);s||(s=new this._webSocketConstructor(e)),n===Rt.Binary&&(s.binaryType="arraybuffer"),s.onopen=u=>{this._logger.log(N.Information,`WebSocket connected to ${e}.`),this._webSocket=s,c=!0,i()},s.onerror=u=>{let l=null;typeof ErrorEvent<"u"&&u instanceof ErrorEvent?l=u.error:l="There was an error with the transport",this._logger.log(N.Information,`(WebSockets transport) ${l}.`)},s.onmessage=u=>{if(this._logger.log(N.Trace,`(WebSockets transport) data received. ${Va(u.data,this._logMessageContent)}.`),this.onreceive)try{this.onreceive(u.data)}catch(l){this._close(l);return}},s.onclose=u=>{if(c)this._close(u);else{let l=null;typeof ErrorEvent<"u"&&u instanceof ErrorEvent?l=u.error:l="WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.",o(new Error(l))}}})}send(e){return this._webSocket&&this._webSocket.readyState===this._webSocketConstructor.OPEN?(this._logger.log(N.Trace,`(WebSockets transport) sending data. ${Va(e,this._logMessageContent)}.`),this._webSocket.send(e),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")}stop(){return this._webSocket&&this._close(void 0),Promise.resolve()}_close(e){this._webSocket&&(this._webSocket.onclose=()=>{},this._webSocket.onmessage=()=>{},this._webSocket.onerror=()=>{},this._webSocket.close(),this._webSocket=void 0),this._logger.log(N.Trace,"(WebSockets transport) socket closed."),this.onclose&&(this._isCloseEvent(e)&&(e.wasClean===!1||e.code!==1e3)?this.onclose(new Error(`WebSocket closed with status code: ${e.code} (${e.reason||"no reason given"}).`)):e instanceof Error?this.onclose(e):this.onclose())}_isCloseEvent(e){return e&&typeof e.wasClean=="boolean"&&typeof e.code=="number"}}const sg=100;class v0{constructor(e,n={}){if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,ht.isRequired(e,"url"),this._logger=X_(n.logger),this.baseUrl=this._resolveUrl(e),n=n||{},n.logMessageContent=n.logMessageContent===void 0?!1:n.logMessageContent,typeof n.withCredentials=="boolean"||n.withCredentials===void 0)n.withCredentials=n.withCredentials===void 0?!0:n.withCredentials;else throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");n.timeout=n.timeout===void 0?100*1e3:n.timeout;let r=null,i=null;if(nt.isNode&&typeof require<"u"){const o=typeof __webpack_require__=="function"?__non_webpack_require__:require;r=o("ws"),i=o("eventsource")}!nt.isNode&&typeof WebSocket<"u"&&!n.WebSocket?n.WebSocket=WebSocket:nt.isNode&&!n.WebSocket&&r&&(n.WebSocket=r),!nt.isNode&&typeof EventSource<"u"&&!n.EventSource?n.EventSource=EventSource:nt.isNode&&!n.EventSource&&typeof i<"u"&&(n.EventSource=i),this._httpClient=new d0(n.httpClient||new r0(this._logger),n.accessTokenFactory),this._connectionState="Disconnected",this._connectionStarted=!1,this._options=n,this.onreceive=null,this.onclose=null}async start(e){if(e=e||Rt.Binary,ht.isIn(e,Rt,"transferFormat"),this._logger.log(N.Debug,`Starting connection with transfer format '${Rt[e]}'.`),this._connectionState!=="Disconnected")return Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."));if(this._connectionState="Connecting",this._startInternalPromise=this._startInternal(e),await this._startInternalPromise,this._connectionState==="Disconnecting"){const n="Failed to start the HttpConnection before stop() was called.";return this._logger.log(N.Error,n),await this._stopPromise,Promise.reject(new xn(n))}else if(this._connectionState!=="Connected"){const n="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";return this._logger.log(N.Error,n),Promise.reject(new xn(n))}this._connectionStarted=!0}send(e){return this._connectionState!=="Connected"?Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")):(this._sendQueue||(this._sendQueue=new ep(this.transport)),this._sendQueue.send(e))}async stop(e){if(this._connectionState==="Disconnected")return this._logger.log(N.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnected state.`),Promise.resolve();if(this._connectionState==="Disconnecting")return this._logger.log(N.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;this._connectionState="Disconnecting",this._stopPromise=new Promise(n=>{this._stopPromiseResolver=n}),await this._stopInternal(e),await this._stopPromise}async _stopInternal(e){this._stopError=e;try{await this._startInternalPromise}catch{}if(this.transport){try{await this.transport.stop()}catch(n){this._logger.log(N.Error,`HttpConnection.transport.stop() threw error '${n}'.`),this._stopConnection()}this.transport=void 0}else this._logger.log(N.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.")}async _startInternal(e){let n=this.baseUrl;this._accessTokenFactory=this._options.accessTokenFactory,this._httpClient._accessTokenFactory=this._accessTokenFactory;try{if(this._options.skipNegotiation)if(this._options.transport===lt.WebSockets)this.transport=this._constructTransport(lt.WebSockets),await this._startTransport(n,e);else throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");else{let r=null,i=0;do{if(r=await this._getNegotiationResponse(n),this._connectionState==="Disconnecting"||this._connectionState==="Disconnected")throw new xn("The connection was stopped during negotiation.");if(r.error)throw new Error(r.error);if(r.ProtocolVersion)throw new Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.");if(r.url&&(n=r.url),r.accessToken){const o=r.accessToken;this._accessTokenFactory=()=>o,this._httpClient._accessToken=o,this._httpClient._accessTokenFactory=void 0}i++}while(r.url&&i<sg);if(i===sg&&r.url)throw new Error("Negotiate redirection limit exceeded.");await this._createTransport(n,this._options.transport,r,e)}this.transport instanceof og&&(this.features.inherentKeepAlive=!0),this._connectionState==="Connecting"&&(this._logger.log(N.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected")}catch(r){return this._logger.log(N.Error,"Failed to start the connection: "+r),this._connectionState="Disconnected",this.transport=void 0,this._stopPromiseResolver(),Promise.reject(r)}}async _getNegotiationResponse(e){const n={},[r,i]=As();n[r]=i;const o=this._resolveNegotiateUrl(e);this._logger.log(N.Debug,`Sending negotiation request: ${o}.`);try{const s=await this._httpClient.post(o,{content:"",headers:{...n,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials});if(s.statusCode!==200)return Promise.reject(new Error(`Unexpected status code returned from negotiate '${s.statusCode}'`));const a=JSON.parse(s.content);return(!a.negotiateVersion||a.negotiateVersion<1)&&(a.connectionToken=a.connectionId),a.useStatefulReconnect&&this._options._useStatefulReconnect!==!0?Promise.reject(new ng("Client didn't negotiate Stateful Reconnect but the server did.")):a}catch(s){let a="Failed to complete negotiation with the server: "+s;return s instanceof Qi&&s.statusCode===404&&(a=a+" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(N.Error,a),Promise.reject(new ng(a))}}_createConnectUrl(e,n){return n?e+(e.indexOf("?")===-1?"?":"&")+`id=${n}`:e}async _createTransport(e,n,r,i){let o=this._createConnectUrl(e,r.connectionToken);if(this._isITransport(n)){this._logger.log(N.Debug,"Connection was provided an instance of ITransport, using that directly."),this.transport=n,await this._startTransport(o,i),this.connectionId=r.connectionId;return}const s=[],a=r.availableTransports||[];let c=r;for(const u of a){const l=this._resolveTransportOrError(u,n,i,(c==null?void 0:c.useStatefulReconnect)===!0);if(l instanceof Error)s.push(`${u.transport} failed:`),s.push(l);else if(this._isITransport(l)){if(this.transport=l,!c){try{c=await this._getNegotiationResponse(e)}catch(f){return Promise.reject(f)}o=this._createConnectUrl(e,c.connectionToken)}try{await this._startTransport(o,i),this.connectionId=c.connectionId;return}catch(f){if(this._logger.log(N.Error,`Failed to start the transport '${u.transport}': ${f}`),c=void 0,s.push(new H_(`${u.transport} failed: ${f}`,lt[u.transport])),this._connectionState!=="Connecting"){const m="Failed to select transport before stop() was called.";return this._logger.log(N.Debug,m),Promise.reject(new xn(m))}}}}return s.length>0?Promise.reject(new q_(`Unable to connect to the server with any of the available transports. ${s.join(" ")}`,s)):Promise.reject(new Error("None of the transports supported by the client are supported by the server."))}_constructTransport(e){switch(e){case lt.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new g0(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case lt.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new p0(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case lt.LongPolling:return new og(this._httpClient,this._logger,this._options);default:throw new Error(`Unknown transport: ${e}.`)}}_startTransport(e,n){return this.transport.onreceive=this.onreceive,this.features.reconnect?this.transport.onclose=async r=>{let i=!1;if(this.features.reconnect)try{this.features.disconnected(),await this.transport.connect(e,n),await this.features.resend()}catch{i=!0}else{this._stopConnection(r);return}i&&this._stopConnection(r)}:this.transport.onclose=r=>this._stopConnection(r),this.transport.connect(e,n)}_resolveTransportOrError(e,n,r,i){const o=lt[e.transport];if(o==null)return this._logger.log(N.Debug,`Skipping transport '${e.transport}' because it is not supported by this client.`),new Error(`Skipping transport '${e.transport}' because it is not supported by this client.`);if(m0(n,o))if(e.transferFormats.map(a=>Rt[a]).indexOf(r)>=0){if(o===lt.WebSockets&&!this._options.WebSocket||o===lt.ServerSentEvents&&!this._options.EventSource)return this._logger.log(N.Debug,`Skipping transport '${lt[o]}' because it is not supported in your environment.'`),new W_(`'${lt[o]}' is not supported in your environment.`,o);this._logger.log(N.Debug,`Selecting transport '${lt[o]}'.`);try{return this.features.reconnect=o===lt.WebSockets?i:void 0,this._constructTransport(o)}catch(a){return a}}else return this._logger.log(N.Debug,`Skipping transport '${lt[o]}' because it does not support the requested transfer format '${Rt[r]}'.`),new Error(`'${lt[o]}' does not support ${Rt[r]}.`);else return this._logger.log(N.Debug,`Skipping transport '${lt[o]}' because it was disabled by the client.`),new V_(`'${lt[o]}' is disabled by the client.`,o)}_isITransport(e){return e&&typeof e=="object"&&"connect"in e}_stopConnection(e){if(this._logger.log(N.Debug,`HttpConnection.stopConnection(${e}) called while in state ${this._connectionState}.`),this.transport=void 0,e=this._stopError||e,this._stopError=void 0,this._connectionState==="Disconnected"){this._logger.log(N.Debug,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is already in the disconnected state.`);return}if(this._connectionState==="Connecting")throw this._logger.log(N.Warning,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is still in the connecting state.`),new Error(`HttpConnection.stopConnection(${e}) was called while the connection is still in the connecting state.`);if(this._connectionState==="Disconnecting"&&this._stopPromiseResolver(),e?this._logger.log(N.Error,`Connection disconnected with error '${e}'.`):this._logger.log(N.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch(n=>{this._logger.log(N.Error,`TransportSendQueue.stop() threw error '${n}'.`)}),this._sendQueue=void 0),this.connectionId=void 0,this._connectionState="Disconnected",this._connectionStarted){this._connectionStarted=!1;try{this.onclose&&this.onclose(e)}catch(n){this._logger.log(N.Error,`HttpConnection.onclose(${e}) threw error '${n}'.`)}}}_resolveUrl(e){if(e.lastIndexOf("https://",0)===0||e.lastIndexOf("http://",0)===0)return e;if(!nt.isBrowser)throw new Error(`Cannot resolve '${e}'.`);const n=window.document.createElement("a");return n.href=e,this._logger.log(N.Information,`Normalizing '${e}' to '${n.href}'.`),n.href}_resolveNegotiateUrl(e){const n=new URL(e);n.pathname.endsWith("/")?n.pathname+="negotiate":n.pathname+="/negotiate";const r=new URLSearchParams(n.searchParams);return r.has("negotiateVersion")||r.append("negotiateVersion",this._negotiateVersion.toString()),r.has("useStatefulReconnect")?r.get("useStatefulReconnect")==="true"&&(this._options._useStatefulReconnect=!0):this._options._useStatefulReconnect===!0&&r.append("useStatefulReconnect","true"),n.search=r.toString(),n.toString()}}function m0(t,e){return!t||(e&t)!==0}class ep{constructor(e){this._transport=e,this._buffer=[],this._executing=!0,this._sendBufferedData=new Sc,this._transportResult=new Sc,this._sendLoopPromise=this._sendLoop()}send(e){return this._bufferData(e),this._transportResult||(this._transportResult=new Sc),this._transportResult.promise}stop(){return this._executing=!1,this._sendBufferedData.resolve(),this._sendLoopPromise}_bufferData(e){if(this._buffer.length&&typeof this._buffer[0]!=typeof e)throw new Error(`Expected data to be of type ${typeof this._buffer} but was of type ${typeof e}`);this._buffer.push(e),this._sendBufferedData.resolve()}async _sendLoop(){for(;;){if(await this._sendBufferedData.promise,!this._executing){this._transportResult&&this._transportResult.reject("Connection stopped.");break}this._sendBufferedData=new Sc;const e=this._transportResult;this._transportResult=void 0;const n=typeof this._buffer[0]=="string"?this._buffer.join(""):ep._concatBuffers(this._buffer);this._buffer.length=0;try{await this._transport.send(n),e.resolve()}catch(r){e.reject(r)}}}static _concatBuffers(e){const n=e.map(o=>o.byteLength).reduce((o,s)=>o+s),r=new Uint8Array(n);let i=0;for(const o of e)r.set(new Uint8Array(o),i),i+=o.byteLength;return r.buffer}}class Sc{constructor(){this.promise=new Promise((e,n)=>[this._resolver,this._rejecter]=[e,n])}resolve(){this._resolver()}reject(e){this._rejecter(e)}}const y0="json";class b0{constructor(){this.name=y0,this.version=2,this.transferFormat=Rt.Text}parseMessages(e,n){if(typeof e!="string")throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!e)return[];n===null&&(n=Wa.instance);const r=rn.parse(e),i=[];for(const o of r){const s=JSON.parse(o);if(typeof s.type!="number")throw new Error("Invalid payload.");switch(s.type){case Se.Invocation:this._isInvocationMessage(s);break;case Se.StreamItem:this._isStreamItemMessage(s);break;case Se.Completion:this._isCompletionMessage(s);break;case Se.Ping:break;case Se.Close:break;case Se.Ack:this._isAckMessage(s);break;case Se.Sequence:this._isSequenceMessage(s);break;default:n.log(N.Information,"Unknown message type '"+s.type+"' ignored.");continue}i.push(s)}return i}writeMessage(e){return rn.write(JSON.stringify(e))}_isInvocationMessage(e){this._assertNotEmptyString(e.target,"Invalid payload for Invocation message."),e.invocationId!==void 0&&this._assertNotEmptyString(e.invocationId,"Invalid payload for Invocation message.")}_isStreamItemMessage(e){if(this._assertNotEmptyString(e.invocationId,"Invalid payload for StreamItem message."),e.item===void 0)throw new Error("Invalid payload for StreamItem message.")}_isCompletionMessage(e){if(e.result&&e.error)throw new Error("Invalid payload for Completion message.");!e.result&&e.error&&this._assertNotEmptyString(e.error,"Invalid payload for Completion message."),this._assertNotEmptyString(e.invocationId,"Invalid payload for Completion message.")}_isAckMessage(e){if(typeof e.sequenceId!="number")throw new Error("Invalid SequenceId for Ack message.")}_isSequenceMessage(e){if(typeof e.sequenceId!="number")throw new Error("Invalid SequenceId for Sequence message.")}_assertNotEmptyString(e,n){if(typeof e!="string"||e==="")throw new Error(n)}}const _0={trace:N.Trace,debug:N.Debug,info:N.Information,information:N.Information,warn:N.Warning,warning:N.Warning,error:N.Error,critical:N.Critical,none:N.None};function w0(t){const e=_0[t.toLowerCase()];if(typeof e<"u")return e;throw new Error(`Unknown log level: ${t}`)}class C0{configureLogging(e){if(ht.isRequired(e,"logging"),S0(e))this.logger=e;else if(typeof e=="string"){const n=w0(e);this.logger=new Iu(n)}else this.logger=new Iu(e);return this}withUrl(e,n){return ht.isRequired(e,"url"),ht.isNotEmpty(e,"url"),this.url=e,typeof n=="object"?this.httpConnectionOptions={...this.httpConnectionOptions,...n}:this.httpConnectionOptions={...this.httpConnectionOptions,transport:n},this}withHubProtocol(e){return ht.isRequired(e,"protocol"),this.protocol=e,this}withAutomaticReconnect(e){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return e?Array.isArray(e)?this.reconnectPolicy=new ig(e):this.reconnectPolicy=e:this.reconnectPolicy=new ig,this}withServerTimeout(e){return ht.isRequired(e,"milliseconds"),this._serverTimeoutInMilliseconds=e,this}withKeepAliveInterval(e){return ht.isRequired(e,"milliseconds"),this._keepAliveIntervalInMilliseconds=e,this}withStatefulReconnect(e){return this.httpConnectionOptions===void 0&&(this.httpConnectionOptions={}),this.httpConnectionOptions._useStatefulReconnect=!0,this._statefulReconnectBufferSize=e==null?void 0:e.bufferSize,this}build(){const e=this.httpConnectionOptions||{};if(e.logger===void 0&&(e.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");const n=new v0(this.url,e);return Yh.create(n,this.logger||Wa.instance,this.protocol||new b0,this.reconnectPolicy,this._serverTimeoutInMilliseconds,this._keepAliveIntervalInMilliseconds,this._statefulReconnectBufferSize)}}function S0(t){return t.log!==void 0}const ag=t=>{if(typeof t=="object"&&t!==null){if(typeof Object.getPrototypeOf=="function"){const e=Object.getPrototypeOf(t);return e===Object.prototype||e===null}return Object.prototype.toString.call(t)==="[object Object]"}return!1},Wn=(...t)=>t.reduce((e,n)=>{if(Array.isArray(n))throw new TypeError("Arguments provided to ts-deepmerge must be objects, not arrays.");return Object.keys(n).forEach(r=>{["__proto__","constructor","prototype"].includes(r)||(Array.isArray(e[r])&&Array.isArray(n[r])?e[r]=Wn.options.mergeArrays?Wn.options.uniqueArrayItems?Array.from(new Set(e[r].concat(n[r]))):[...e[r],...n[r]]:n[r]:ag(e[r])&&ag(n[r])?e[r]=Wn(e[r],n[r]):e[r]=n[r]===void 0?Wn.options.allowUndefinedOverrides?n[r]:e[r]:n[r])}),e},{}),Cd={allowUndefinedOverrides:!0,mergeArrays:!0,uniqueArrayItems:!0};Wn.options=Cd;Wn.withOptions=(t,...e)=>{Wn.options=Object.assign(Object.assign({},Cd),t);const n=Wn(...e);return Wn.options=Cd,n};var k0=Object.defineProperty,vm=t=>{throw TypeError(t)},I0=(t,e,n)=>e in t?k0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,lo=(t,e,n)=>I0(t,typeof e!="symbol"?e+"":e,n),tp=(t,e,n)=>e.has(t)||vm("Cannot "+n),C=(t,e,n)=>(tp(t,e,"read from private field"),n?n.call(t):e.get(t)),fe=(t,e,n)=>e.has(t)?vm("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),Ae=(t,e,n,r)=>(tp(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),on=(t,e,n)=>(tp(t,e,"access private method"),n),T0=(t,e,n,r)=>({set _(i){Ae(t,e,i,n)},get _(){return C(t,e,r)}});const E0="0.0.2-alpha6",gs={Text:"Text",Number:"Number",Logic:"Logic"},sn={ValueComponent:"ValueComponent",TableComponent:"TableComponent",RecordComponent:"RecordComponent",ResourceComponent:"ResourceComponent",GraphicComponent:"GraphicComponent",CheckoutComponent:"CheckoutComponent"},x0=t=>Object.values(sn).includes(t),P0=[sn.GraphicComponent,sn.CheckoutComponent,sn.ResourceComponent,sn.RecordComponent],br={ValueEditor:"ValueEditor",TableEditor:"TableEditor",Fiber:"Fiber",FiberEditor:"FiberEditor"},D0=I.z.enum([br.ValueEditor,br.TableEditor,br.Fiber,br.FiberEditor]),cg={Fiber:"fiber"},cr={CtrlFibers:"CtrlFibers"};function Qc(t){try{return[null,t()]}catch(e){if(e instanceof Error)return[e,null];throw e}}async function vs(t){try{return[null,await t]}catch(e){if(e instanceof Error)return[e,null];throw e}}function Sl(t){return Qc(()=>JSON.parse(t))}const Mr=t=>typeof t=="string",R0=t=>t===void 0||t==null||t===""||kt(t)&&t.length===0,kt=t=>Array.isArray(t),_r=t=>Object.prototype.toString.call(t)==="[object Object]",Sd=async t=>new Promise(e=>setTimeout(e,t)),A0=I.z.string(),M0=I.z.enum([gs.Text,gs.Number,gs.Logic]),z0=t=>M0.safeParse(t).success,mm=I.z.string(),U0=t=>mm.safeParse(t).success,N0=I.z.custom(t=>Mr(t)&&t.toLowerCase()===t),Os=t=>(t==null?void 0:t.toLowerCase())??"",ym=I.z.string(),$0=I.z.custom(t=>Mr(t)?new RegExp(`^${sn.ValueComponent}<.*>$`).test(t):!1),L0=I.z.custom(t=>Mr(t)?new RegExp(`^${sn.RecordComponent}<.*>$`).test(t):!1),j0=I.z.custom(t=>Mr(t)?new RegExp(`^${sn.ResourceComponent}<.*>$`).test(t):!1),O0=I.z.custom(t=>Mr(t)?new RegExp(`^${sn.TableComponent}<.*>$`).test(t):!1),bm=I.z.union([$0,O0,L0,j0,I.z.literal(sn.GraphicComponent),I.z.literal(sn.CheckoutComponent)]),ug=I.z.union([I.z.string(),I.z.number(),I.z.boolean()]),_m=I.z.union([ug,I.z.array(ug),I.z.object({}),I.z.unknown()]),np=I.z.object({$typ:I.z.literal("Error"),Id:I.z.string(),Message:I.z.string(),route:I.z.unknown().optional()}),lg=t=>np.safeParse(t).success,wm=np.or(_m),kd=new Map;function F0(t){const e=Os(t.name);kd.has(e)||kd.set(e,t)}function Cm(t){const e=Os(t);return kd.get(e)}class rp{constructor(e,n){lo(this,"name"),lo(this,"zodType"),this.name=e,this.zodType=n,F0(this)}async getValue(){return await eg().getCmpValue(this.name)}async setInput(e){const n=Os(this.name);await Gc().setCmpInput(n,e,this.zodType)}onValueChanged(e,n=!1,r){eg().onCmpValueChanged(this.name,e,r,n)}}const W0=I.z.number().transform(t=>t*1e3).pipe(I.z.coerce.date());function Sm(t){return t._def.typeName===I.z.ZodFirstPartyTypeKind.ZodArray}function km(t){return t._def.typeName===I.z.ZodFirstPartyTypeKind.ZodObject}function V0(t){const[,e]=Sl(t.description??"{}");return e?e.elementity:!1}const Im={green:"#36D792",yellow:"#D19A66",red:"red"};function Tm(t,e){return t&&e?`[${t}.${e}]`:t?`[${t}]`:e?`[${e}]`:""}function Je(t,e,n="",r,i="green"){const o=Tm(t,e),s=Im[i]??"inherit";console.log(`%c${o}%c ${n}`,`color: ${s}`,"color: inherit",r)}function Ye(t,e,n="",r,i="green"){const o=Tm(t,e),s=Im[i]??"inherit";console.error(`%c${o}%c ${n}`,`color: ${s}`,"color: inherit",r)}const H0=t=>_r(t)&&Object.values(t).every(e=>_r(e)&&"$key"in e&&"$idx"in e&&"definition"in e),Em=[{open:"List<",openReplace:"[",closeReplace:"]"},{open:"Table<",openReplace:"[",closeReplace:"]"},{open:`${sn.ValueComponent}<`,openReplace:`"${sn.ValueComponent}<`,closeReplace:'>"',preventInnerParsing:!0,allowInnerParsingOnRootLevel:!0},{open:"RecordComponent<",openReplace:'"RecordComponent<',closeReplace:'>"',preventInnerParsing:!0,allowInnerParsingOnRootLevel:!0},{open:"TableComponent<",openReplace:'"TableComponent<',closeReplace:'>"',preventInnerParsing:!0,allowInnerParsingOnRootLevel:!0},{open:"ResourceComponent<",openReplace:'"ResourceComponent<',closeReplace:'>"',preventInnerParsing:!0},{open:"ComposedVisual<",openReplace:'"ComposedVisual<',closeReplace:'>"',preventInnerParsing:!0},{open:"DynamicVisual<",openReplace:'"DynamicVisual<',closeReplace:'>"',preventInnerParsing:!0},{open:"Map<",openReplace:'"Map<',closeReplace:'>"',preventInnerParsing:!0},{open:"DataSource<",openReplace:'"DataSource<',closeReplace:'>"',preventInnerParsing:!0},{open:"Resource<",openReplace:"{",closeReplace:"}"},{open:"Record<{",openReplace:"{",closeReplace:""}];function q0(t){let e=1;for(let n=0;n<t.length;n++)if(t[n]==="<"?e++:t[n]===">"&&e--,e===0)return n;return-1}function xm(t){const e=[",","}",">"],n=/=|,|<|{|}|]/,r="!!TYPEPLACEHOLDER!!";if(t.indexOf("=")===-1)return'"'+t+'"';let i="",o=!1,s=0,a=t||"";for(;a.length>0;){const c=Em.find(u=>a.indexOf(u.open)===0);if(e.includes(a[0]))i+=a[0],a=a.slice(1);else if(c){a=a.slice(c.open.length);const u=q0(a),l=c.preventInnerParsing?a.substring(0,u):xm(a.substring(0,u)),f=c.openReplace+l+c.closeReplace;i=i.length>0?i.replace(r,f):f,a=a.slice(u+1),o=!1}else if(o){const u=a.search(n);u>0?(i=i.replace(r,'"'+a.substring(0,u)+'"')+a[u],a=a.slice(u+1)):(Ye("HiveUtils","_parseHiveTypeToJsonStr","Fallback: Full remaining string appended. Possible parsing issue!",{errorName:"Hive type to JSON - parsing issue",jsonObj:{typeDefinition:t}}),i+=a,a=""),o=!1}else{const u=a.indexOf("="),l=a.substring(0,u).trim();i+=`"${l}":{ "$key": "${l}", "$idx": ${s}, "definition": ${r} }`,s++,a=a.slice(u+1),o=!0}}return i}function Id(t,e,n,r=n){if(!_r(t)&&!kt(t))return t;const i=Sm(e);if(kt(t)&&i)return[Id(t[0],e.element,n,r)];if(kt(t)||i)return Ye("HiveUtils","_recursiveHiveSchemaMapping","Type mismatch because either the schema or the type expects an array!",{cmpName:n,propertyPath:r,hive:t,zod:JSON.stringify(e)}),t;if(!km(e))return Ye("HiveUtils","_recursiveHiveSchemaMapping","Generated schema doesn't match the retrieved component type!",{cmpName:n,propertyPath:r,hive:t,zod:JSON.stringify(e)}),t;const o=Object.keys(e.shape).reduce((a,c)=>(a[c.toLowerCase()]=c,a),{}),s={};return Object.values(t).forEach(function(a){const c=a.$key.toLowerCase(),u=o[c];if(u){const l=e.shape[u];s[u]=a,s[u].$key=u,delete o[c];const f=r+"."+u,m=Id(a.definition,l,u,f);s[u].definition=m}else s[a.$key]=a}),s}function fg(t){const e=t.match(/^(\w+)<.+>/),n=e&&2>=e.length?e[1]:t;if(!x0(n))throw Ye("HiveUtils","getBaseHiveType","Unknown base type found!",{type:t,baseType:n}),new Error(`Unknown base component type found: ${JSON.stringify({type:t,baseType:n})}`);return n}function Pm(t,e){const n=(t||"").match(new RegExp("<(.+)>"));return n&&2>=n.length?n[1]:""}function B0(t){const e=t.indexOf("=")>-1,n=e&&Em.find(i=>t.indexOf(i.open)===0),r=n&&n.preventInnerParsing&&!n.allowInnerParsingOnRootLevel;return e&&!r}function K0(t,e,n){const r=Pm(t)||t;let i=Dm(r);if(t.startsWith("TableComponent<")&&(i=[i]),!i){Ye("HiveUtils","parseAndMapSchema","Schema parsing not successful",{jsonObj:{type:r,fullType:t}});return}return i=Id(i,e,n),i}function Zc(t,e,n){const r=kt(e),i=r&&kt(t)&&(_r(e[0])||kt(e[0]));if(R0(t)||r&&!i)return t;if(i)return t.map(s=>Zc(s,e[0]));const o={};return Object.values(e.$key!==void 0?e.definition:e).forEach(function(s){const a=s.definition,c=t&&t[s.$idx];let u;kt(a)&&_r(a[0])?(u=c==null?void 0:c.map(l=>Zc(l,a[0])),JSON.stringify(a)):!kt(a)&&_r(a)?(u=Zc(c,a),JSON.stringify(a)):u=c,o[s.$key]=u}),o}function Dm(t){const e=t.replace(/Resource<\w+>/g,"Text"),n=xm(e),[r,i]=Sl(n);return r&&Ye("HiveUtils","parseHiveTypeToSchema","Schema parsing resulted in an invalid JSON",{jsonObj:{typeDefinition:t,parsed:n},exc:r}),r?void 0:i}const X0={[gs.Text]:I.z.string(),[gs.Number]:I.z.number(),[gs.Logic]:I.z.boolean()};function J0(t){const e=Dm(t),n=r=>{const i=kt(r),o=i?r[0]:r,s=H0(o)?I.z.object(Object.values(o).reduce((a,c)=>(a[c.$key]=n(c.definition),a),{})):X0[o];return s?i?I.z.array(s):s:(Ye("HiveUtils","parseHiveTypeToZodSchema","Unknown simple Hive type",{typeDefinition:t,schema:JSON.stringify(r)}),I.z.unknown())};return e?n(e):(Ye("HiveUtils","parseHiveTypeToZodSchema","Schema is undefined",{typeDefinition:t}),I.z.unknown())}class Td extends Error{constructor(e){super(e),this.name="ConversionError"}}function G0(t,e,n){const r=n.safeParse(e);if(!r.success)throw new Td(r.error.message);const i=function(o,s){if(V0(o))return s;const a=km(o),c=Sm(o);if(a&&_r(s)){const u=o.shape;return Object.keys(u).reduce(function(l,f){const m=i(u[f],s[f]);return l.push(m),l},[])}else return c&&kt(s)?s.map(function(u){return i(o.element,u)}):s};return i(n,e)}function Rm(t){return kt(t)?Rm(t[0]):_r(t)}const dg=Symbol("UnknownCmpType");function Q0(t,e){if(t==null)return;const{success:n,error:r}=e.safeParse(t);if(!n)throw Ye("CmpUtils","_assertCmpValueValid","Parser error:",r),new Error("Value received for component doesn't match its zod schema")}function Z0(t,e,n){return K0(t,e,n)}function Y0(t,e,n,r){const i=B0(e),o=i?Z0(e,n,r):void 0;return i&&o?Zc(t,o):t}function ew(t,e,n){const r=Cm(t);if(!r)throw new Error("Component does not exist in the component definitions.");const i=r instanceof rp?Y0(n,e,r.zodType,t):dg;if(i===dg)throw new Error("Component has unknown type.");return i&&Q0(i,r.zodType),i}var Vr,Ko;class tw{constructor(){fe(this,Vr,new Map),fe(this,Ko,new Map)}updateCmp(e,n,r){const i=C(this,Vr).get(e)??{value:n,freshProperties:new Set};i.value=n,i.freshProperties.add("Value"),r&&C(this,Ko).set(e,{property:"Value",lazy:!1,isInitialSubscription:!0}),C(this,Vr).set(e,i)}markCmpPropertiesAsStale(e,n){const r=C(this,Vr).get(e);r&&n.forEach(i=>r.freshProperties.delete(i))}markAllCmpPropertiesAsStale(){for(const e of C(this,Vr).values())e.freshProperties.clear()}async subscribeToCmpUpdates(e,n,r=!1){Je("CmpsStore","subscribeToCmpUpdates","",{cmpName:e,property:n,lazy:r});const i=C(this,Ko).get(e);(!i||i.lazy===!0&&r===!1)&&(C(this,Ko).set(e,{property:n,lazy:r,isInitialSubscription:!1}),await Gc().subscribeToCmpUpdates(e,n,r))}async resubscribeToCmpUpdates(){const e=Gc(),n=Array.from(C(this,Ko)).filter(([,r])=>!r.isInitialSubscription).map(([r,{property:i,lazy:o}])=>e.subscribeToCmpUpdates(r,i,o));await Promise.all(n)}async getCmpValue(e){Je("CmpsStore","getCmpValue","",{name:e});const n=C(this,Vr).get(e);if(n!=null&&n.freshProperties.has("Value"))return n.value;const r=Os(e);await Gc().fetchCmpPropertyValue([{name:r,property:"Value"}]);const i=C(this,Vr).get(e);return structuredClone(i==null?void 0:i.value)}}Vr=new WeakMap,Ko=new WeakMap;function hg(t){return t instanceof rp}function nw(t){const e=t.split("-");return{companyName:e[0],distributorName:e.length>1?e[1]:""}}function Am(t){const{pathname:e}=new URL(t),n=new RegExp("^/(cfgr|preview|staging)/","i"),r=new RegExp("/$"),i=e.replace(n,"").replace(r,"").split("/");if(i.length<2)return;let o,s,a,c,u,l;const f=e.toLowerCase(),m=f.startsWith("/preview/"),d=f.startsWith("/staging/");m||d?(l=i[2],a=i[3],o=i[4]==="copy"?"copy":"edit",c=i[5],s=m?"preview":"staging",u=!1):f.startsWith("/cfgr/")&&(a=i[2]==="copy"?void 0:i[2],c=void 0,i[3]==="edit"?(o="edit",c=i[4]):o="copy",s="cfgr",u=i[i.length-1]!=="copy"||i[i.length-1]==="copy"&&a===void 0);const h=nw(i[0]);return{tenant:i[0],companyName:h.companyName,planName:i[1],planVersion:l||void 0,cfgnId:a||void 0,startAction:o,authToken:c||void 0,cfgrMode:s,isPresetCopy:u}}function rw(t){const e=new RegExp("^/|/$","g"),n=new URL(t).pathname.replace(e,"").split("/"),r=["cfgr","preview","staging"];return n.length>=2&&r.includes(n[0].toLowerCase())}var Mm=(t=>(t[t.NotActivated=0]="NotActivated",t[t.Activated=1]="Activated",t[t.Deactivated=2]="Deactivated",t[t.MarkedForDeletion=3]="MarkedForDeletion",t))(Mm||{});const iw=I.z.object({mailNotifications:I.z.object({quoteAssignment:I.z.boolean(),insightsAssignment:I.z.boolean()})});I.z.object({id:I.z.string(),firstname:I.z.string(),lastname:I.z.string(),email:I.z.string(),isCbnAdmin:I.z.boolean().optional(),isSuperAdmin:I.z.boolean().optional(),state:I.z.nativeEnum(Mm),avatarUrl:I.z.string().nullable().optional(),settings:iw});const pg={local:void 0,session:void 0};function gg(t=!1){var e;(e=ow(t).storage)==null||e.clear()}function ow(t=!1){const e="CbnStorageTestKey",n="CbnStorageTestValue",r=t?"session":"local",i=pg[r];if(i!==void 0)return i;const o={storage:t?window.sessionStorage:window.localStorage,writeable:!1,readable:!1};if(o.storage){try{o.storage.setItem(e,n),o.writeable=!0}catch{}try{const s=o.storage.getItem(e);o.readable=o.writeable?s===n:!0}catch{}o.writeable&&o.storage.removeItem(e)}return pg[r]=o,o}const sw="/login",aw="redirectTo";function cw(t){gg(),gg(!0);const e=encodeURIComponent(window.location.pathname+window.location.search);window.location.href=`${sw}?${aw}=${e}`}var zm="function",Um="object",ip="undefined",Bn="prototype",op=Object,uw=op[Bn];/*! https://github.com/nevware21/ts-utils v0.12.6 */function Jt(t,e){return t||e}function it(t,e){return t[e]}var Ut=void 0,mt=null,sp="",kl="function",lc="object",wr="prototype",Tu="__proto__",ji="undefined",Eu="constructor",ap="Symbol",ms="length",xu="name",Tt="call",fc="toString",cp="getOwnPropertyDescriptor",Ot=Jt(Object),up=it(Ot,wr),Nm=Jt(String),bo=it(Nm,wr),dc=Jt(Math),$m=Jt(Array),Il=it($m,wr),xr=it(Il,"slice"),vg="_polyfill",mg="__nw21$polytype__";function rt(t,e){try{return{v:t.apply(this,e)}}catch(n){return{e:n}}}function lw(t,e,n){var r=rt(t,n);return r.e?e:r.v}var Xl;function Tl(t){return function(e){return typeof e===t}}function Lm(t){var e="[object "+t+"]";return function(n){return!!(n&&fw(n)===e)}}function fw(t){return up[fc].call(t)}function Ze(t){return typeof t===ji||t===ji}function dw(t){return t===Ut}function B(t){return t===mt||Ze(t)}function lp(t){return t===mt||t===Ut}function hw(t){return!!t||t!==Ut}function pw(t){return!Xl&&(Xl=["string","number","boolean",ji,"symbol","bigint"]),t!==lc&&Xl.indexOf(t)!==-1}var de=Tl("string"),pe=Tl(kl);function Xt(t){return!t&&B(t)?!1:!!t&&typeof t===lc}var we=it($m,"isArray"),gw=Lm("Date"),hc=Tl("number"),jm=Tl("boolean"),fp=Lm("Error");function fi(t){return!!(t&&t.then&&pe(t.then))}function Pu(t){return!(!t||lw(function(){return!(t&&0+t)},!t))}function dp(){}function vw(){return!1}var $t=Jt(Nm),mw="[object Error]";function te(t,e){var n=sp,r=up[fc][Tt](t);r===mw&&(t={stack:$t(t.stack),message:$t(t.message),name:$t(t.name)});try{n=JSON.stringify(t,mt,e?typeof e=="number"?e:4:Ut),n=(n?n.replace(/"(\w+)"\s*:\s{0,1}/g,"$1: "):mt)||$t(t)}catch(i){n=" - "+te(i,e)}return r+": "+n}function Yt(t){throw new Error(t)}function tr(t){throw new TypeError(t)}function El(t){lp(t)&&tr("Cannot convert undefined or null to object")}function yw(t){de(t)||tr("'"+te(t)+"' is not a string")}function gn(t,e){return!!t&&up.hasOwnProperty[Tt](t,e)}var bw=Jt(it(Ot,cp),dp),ii=Jt(it(Ot,"hasOwn"),_w);function _w(t,e){return El(t),gn(t,e)||!!bw(t,e)}function Pe(t,e,n){if(t&&(Xt(t)||pe(t))){for(var r in t)if(ii(t,r)&&e[Tt](t,r,t[r])===-1)break}}function ee(t,e,n){if(t)for(var r=t[ms]>>>0,i=0;i<r&&!(i in t&&e[Tt](t,t[i],i,t)===-1);i++);}var _o=xl;function xl(t,e,n){var r=e?e[t]:mt;return function(i){var o=(i?i[t]:mt)||r;if(o||n){var s=arguments;return(o||n).apply(i,o?xr[Tt](s,1):s)}tr('"'+$t(t)+'" not defined for '+te(i))}}function ww(t){return function(e){return e[t]}}var Cw=Jt(it(Ot,cp),dp),kc={e:"enumerable",c:"configurable",v:"value",w:"writable",g:"get",s:"set"};function Om(t){var e={};if(e[kc.c]=!0,e[kc.e]=!0,t.l){e.get=function(){return t.l.v};var n=Cw(t.l,"v");n&&n.set&&(e.set=function(r){t.l.v=r})}return Pe(t,function(r,i){e[kc[r]]=dw(i)?e[kc[r]]:i}),e}var Gn=it(Ot,"defineProperty"),Sw=it(Ot,"defineProperties");function kw(t,e,n,r,i,o){var s={e:o,c:i};return n&&(s.g=n),Gn(t,e,Om(s))}function Re(t,e,n){return Gn(t,e,Om(n))}function Fm(t,e,n,r,i){var o={};return Pe(t,function(s,a){Du(o,s,e?a:s),Du(o,a,s)}),r?r(o):o}function Du(t,e,n,r){Gn(t,e,{value:n,enumerable:!0,writable:!1})}var Iw=Jt(it(Ot,"isFrozen"),vw),Wm=it(Ot,"freeze");function Tw(t){return t}function Ew(t){return El(t),t[Tu]||mt}var Ed=it(Ot,"assign"),Cr=it(Ot,"keys");function Vm(t,e){if((we(t)||Xt(t)||pe(t))&&!Iw(t)){for(var n=0;n<e.length;n++)if(e[n]===t)return t;e.push(t),Pe(t,function(r,i){Vm(i,e)}),Dn(t)}return t}function Fs(t){return Wm?Vm(t,[]):t}var Dn=Jt(Wm,Tw),xd=Jt(it(Ot,"getPrototypeOf"),Ew);function xw(t){return Fm(t,1,0,Dn)}function Pw(t){return Fm(t,0,0,Dn)}function Dw(t){var e={};return Pe(t,function(n,r){Du(e,n,r[1]),Du(e,r[0],r[1])}),Dn(e)}function Rw(t){return Dw(t)}var Hm=Pw({asyncIterator:0,hasInstance:1,isConcatSpreadable:2,iterator:3,match:4,matchAll:5,replace:6,search:7,species:8,split:9,toPrimitive:10,toStringTag:11,unscopables:12}),yg="__tsUtils$gblCfg",Jl;function qm(){var t;return typeof globalThis!==ji&&(t=globalThis),!t&&typeof self!==ji&&(t=self),!t&&typeof window!==ji&&(t=window),!t&&typeof global!==ji&&(t=global),t}function Pl(){if(!Jl){var t=rt(qm).v||{};Jl=t[yg]=t[yg]||{}}return Jl}var Bm=it(dc,"min"),Ma=it(dc,"max"),bg=_o("slice",bo),Bt=_o("substring",bo),Gr=xl("substr",bo,Aw);function Aw(t,e,n){return El(t),n<0?sp:(e=e||0,e<0&&(e=Ma(e+t[ms],0)),Ze(n)?bg(t,e):bg(t,e,e+n))}function Ru(t,e){return Bt(t,0,e)}function Mw(t,e){return t&&(rt(function(){t[vg]=!0,t[mg]=e}),rt(Re,[t,vg,{v:!0,w:!1,e:!1}]),rt(Re,[t,mg,{v:e,w:!1,e:!1}])),t}var Pr=Jt(it(Ot,"create"),zw);function zw(t,e){var n=null;function r(){}if(lp(t))n={};else{var i=typeof t;i!==lc&&i!==kl&&tr("Prototype must be an Object or function: "+te(t)),r[wr]=t,rt(function(){r[Tu]=t}),n=new r}return e&&rt(Sw,[n,e]),n}function Rn(){return(Date.now||Uw)()}function Uw(){return new Date().getTime()}function Oi(t,e,n){return t.apply(e,n)}var pt;function pi(){pt=Pl()}function Km(t,e){var n={};return!pt&&pi(),n.b=pt.lzy,Gn(n,"v",{configurable:!0,get:function(){var r=Oi(t,null,e);return pt.lzy||Gn(n,"v",{value:r}),n.b=pt.lzy,r}}),n}var Nw=it(dc,"random"),$w=Km(function(){for(var t=Rn().toString(36).slice(2);t.length<16;)t+=Nw().toString(36).slice(2);return t=t.substring(0,16),t}),_g="_urid",Lw="$nw21sym",Gl,jw=0;function Ow(){if(!Gl){var t=Pl();Gl=t.gblSym=t.gblSym||{k:{},s:{}}}return Gl}var Ic;function hp(t){var e="_"+jw+++"_"+$w.v,n=ap+"("+t+")";function r(o,s){Re(i,o,{v:s,e:!1,w:!1})}var i=Pr(null);return r("description",$t(t)),r(fc,function(){return n+Lw+e}),r("valueOf",function(){return i}),r("v",n),r("_uid",e),Mw(i,"symbol")}function Fw(t){var e=Ow();if(!ii(e.k,t)){var n=hp(t),r=Cr(e.s).length;n[_g]=function(){return r+"_"+n[fc]()},e.k[t]=n,e.s[n[_g]()]=$t(t)}return e.k[t]}function Ww(t){!Ic&&(Ic={});var e,n=Hm[t];return n&&(e=Ic[n]=Ic[n]||hp(ap+"."+n)),e}function bn(t){return Gn({toJSON:function(){return t}},"v",{value:t})}var Xm="window",za;function Ws(t,e){var n;return function(){return!pt&&pi(),(!n||pt.lzy)&&(n=bn(rt(t,e).v)),n.v}}function pn(t){return!pt&&pi(),(!za||t===!1||pt.lzy)&&(za=bn(rt(qm).v||mt)),za.v}function tt(t,e){var n;if(!za||e===!1?n=pn(e):n=za.v,n&&n[t])return n[t];if(t===Xm)try{return window}catch{}return mt}function Jm(){return!!It()}var It=Ws(tt,["document"]);function Dl(){return!!cn()}var cn=Ws(tt,[Xm]);function Vw(){return!!nr()}var nr=Ws(tt,["navigator"]);function Hw(){return!!Gm()}var Gm=Ws(tt,["history"]),qw=Ws(function(){return!!rt(function(){return process&&(process.versions||{}).node}).v}),Qm=Ws(function(){return!!rt(function(){return self&&self instanceof WorkerGlobalScope}).v}),Ms,Ql;function Rl(){return Ms=bn(rt(tt,[ap]).v),Ms}function Bw(t){var e=(pt.lzy?0:Ms)||Rl();return e.v?e.v[t]:Ut}function Kw(){return!!Xw()}function Xw(){return!pt&&pi(),((pt.lzy?0:Ms)||Rl()).v}function pp(t,e){var n=Hm[t];!pt&&pi();var r=(pt.lzy?0:Ms)||Rl();return r.v?r.v[n||t]:Ww(t)}function Ks(t,e){!pt&&pi();var n=(pt.lzy?0:Ms)||Rl();return n.v?n.v(t):hp(t)}function gp(t){return!pt&&pi(),Ql=(pt.lzy?0:Ql)||bn(rt(Bw,["for"]).v),(Ql.v||Fw)(t)}function Pd(t){return!!t&&pe(t.next)}function Zm(t){return!lp(t)&&pe(t[pp(3)])}var Tc;function vp(t,e,n){if(t&&(Pd(t)||(!Tc&&(Tc=bn(pp(3))),t=t[Tc.v]?t[Tc.v]():mt),Pd(t))){var r=Ut,i=Ut;try{for(var o=0;!(i=t.next()).done&&e[Tt](n||t,i.value,o,t)!==-1;)o++}catch(s){r={e:s},t.throw&&(i=mt,t.throw(r))}finally{try{i&&!i.done&&t.return&&t.return(i)}finally{if(r)throw r.e}}}}function as(t,e){return!Ze(e)&&t&&(we(e)?Oi(t.push,t,e):Pd(e)||Zm(e)?vp(e,function(n){t.push(n)}):t.push(e)),t}var At=_o("indexOf",Il),Ha=_o("map",Il);function Al(t,e,n){return((t?t.slice:mt)||xr).apply(t,xr[Tt](arguments,1))}var Jw=_o("reduce",Il),Zl,Ym=Jt(it(Ot,"setPrototypeOf"),Gw);function Gw(t,e){var n;return!Zl&&(Zl=bn((n={},n[Tu]=[],n instanceof Array))),Zl.v?t[Tu]=e:Pe(e,function(r,i){return t[r]=i}),t}function Qw(t,e,n){rt(Re,[e,xu,{v:t,c:!0,e:!1}]),e=Ym(e,n);function r(){this[Eu]=e,rt(Re,[this,xu,{v:t,c:!0,e:!1}])}return e[wr]=n===mt?Pr(n):(r[wr]=n[wr],new r),e}function wg(t,e){e&&(t[xu]=e)}function ey(t,e,n){var r=Error,i=r[wr][xu],o=Error.captureStackTrace;return Qw(t,function(){var s=this,a=arguments;try{rt(wg,[r,t]);var c=Oi(r,s,xr[Tt](a))||s;if(c!==s){var u=xd(s);u!==xd(c)&&Ym(c,u)}return o&&o(c,s[Eu]),e&&e(c,a),c}finally{rt(wg,[r,i])}},r)}var Yl;function Zw(t){throw Yl||(Yl=ey("UnsupportedError")),new Yl(t)}function Yw(t){return function(e){return El(e),e&&e.replace&&(e=e.replace(t,sp)),e}}var eC=Yw(/^\s+|(?=\s)\s+$/g),Ve=xl("trim",bo,eC),an=it(dc,"floor"),ef,tf,nf;function Lt(t){if(!t||typeof t!==lc)return!1;nf||(nf=Dl()?cn():!0);var e=!1;if(t!==nf){tf||(ef=Function[wr][fc],tf=ef[Tt](Ot));try{var n=xd(t);e=!n,e||(gn(n,Eu)&&(n=n[Eu]),e=!!(n&&typeof n===kl&&ef[Tt](n)===tf))}catch{}}return e}function tC(t){return t.value&&ny(t),!0}var Cg=[oC,ny,aC,sC];function nC(t,e,n,r){var i;return ee(t,function(o){if(o.k===e)return i=o,-1}),i||(i={k:e,v:e},t.push(i),r(i)),i.v}function mp(t,e,n,r){var i=n.handler,o=n.path?r?n.path.concat(r):n.path:[],s={handler:n.handler,src:n.src,path:o},a=typeof e,c=!1,u=e===mt;u||(e&&a===lc?c=Lt(e):u=pw(a));var l={type:a,isPrim:u,isPlain:c,value:e,result:e,path:o,origin:n.src,copy:function(f,m){return mp(t,f,m?s:n,m)},copyTo:function(f,m){return ty(t,f,m,s)}};return l.isPrim?i&&i[Tt](n,l)?l.result:e:nC(t,e,o,function(f){Re(l,"result",{g:function(){return f.v},s:function(h){f.v=h}});for(var m=0,d=i;!(d||(m<Cg.length?Cg[m++]:tC))[Tt](n,l);)d=mt})}function ty(t,e,n,r){if(!B(n))for(var i in n)e[i]=mp(t,n[i],r,i);return e}function rC(t,e,n){var r={handler:n,src:e,path:[]};return ty([],t,e,r)}function iC(t,e){var n={handler:e,src:t};return mp([],t,n)}function oC(t){var e=t.value;if(we(e)){var n=t.result=[];return n.length=e.length,t.copyTo(n,e),!0}return!1}function sC(t){var e=t.value;return gw(e)?(t.result=new Date(e.getTime()),!0):!1}function aC(t){return t.type===kl}function ny(t){var e=t.value;if(e&&t.isPlain){var n=t.result={};return t.copyTo(n,e),!0}return!1}function ry(t,e){return ee(e,function(n){rC(t,n)}),t}function Sg(t,e,n,r,i,o,s){return ry(iC(t)||{},xr[Tt](arguments))}function cC(t,e,n,r,i,o,s){return ry(t||{},xr[Tt](arguments))}var iy=_o("split",bo);function oy(t,e,n){if(t&&e){var r=iy(e,"."),i=r.pop();ee(r,function(o){B(t[o])&&(t[o]={}),t=t[o]}),t[i]=n}}var uC=ww(ms),rf;function Dr(){return!pt&&pi(),(!rf||pt.lzy)&&(rf=bn(rt(tt,["performance"]).v)),rf.v}var sy=it(dc,"round"),lC=Jt(it(Ot,cp),dp),ay=xl("endsWith",bo,fC);function fC(t,e,n){yw(t);var r=de(e)?e:$t(e),i=!Ze(n)&&n<t[ms]?n:t[ms];return Bt(t,i-r[ms],i)===r}var st=_o("indexOf",bo),of="ref",sf="unref",af="hasRef",dC="enabled";function hC(t,e,n){var r=!0,i=t?e(mt):mt,o;function s(){return r=!1,i&&i[sf]&&i[sf](),o}function a(){i&&n(i),i=mt}function c(){return i=e(i),r||s(),o}function u(l){!l&&i&&a(),l&&!i&&c()}return o={cancel:a,refresh:c},o[af]=function(){return i&&i[af]?i[af]():r},o[of]=function(){return r=!0,i&&i[of]&&i[of](),o},o[sf]=s,o=Gn(o,dC,{get:function(){return!!i},set:u}),{h:o,dn:function(){i=mt}}}var pC,gC;function vC(t){var e=pe(t)?t:pC;if(!e){var n=Pl().tmOut||[];we(n)&&n.length>0&&pe(n[0])&&(e=n[0])}return e||setTimeout}function mC(t){var e=pe(t)?t:gC;if(!e){var n=Pl().tmOut||[];we(n)&&n.length>1&&pe(n[1])&&(e=n[1])}return e||clearTimeout}function cy(t,e,n){var r=we(e),i=r?e.length:0,o=vC(i>0?e[0]:r?Ut:e),s=mC(i>1?e[1]:Ut),a=n[0];n[0]=function(){c.dn(),Oi(a,Ut,xr[Tt](arguments))};var c=hC(t,function(u){if(u){if(u.refresh)return u.refresh(),u;Oi(s,Ut,[u])}return Oi(o,Ut,n)},function(u){Oi(s,Ut,[u])});return c.h}function vn(t,e){return cy(!0,Ut,xr[Tt](arguments))}function yC(t,e){return cy(!1,Ut,xr[Tt](arguments))}(pn()||{}).Symbol;(pn()||{}).Reflect;var uy="hasOwnProperty",bC=function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)uw[uy].call(e,i)&&(t[i]=e[i])}return t},jt=Ed||bC,Dd=function(t,e){return Dd=op.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)r[uy](i)&&(n[i]=r[i])},Dd(t,e)};function rr(t,e){typeof e!==zm&&e!==null&&tr("Class extends value "+String(e)+" is not a constructor or null"),Dd(t,e);function n(){this.constructor=t}t[Bn]=e===null?Pr(e):(n[Bn]=e[Bn],new n)}function kg(t,e){for(var n=0,r=e.length,i=t.length;n<r;n++,i++)t[i]=e[n];return t}var Ec,Au="constructor",Rr="prototype",Mu="function",zu="_dynInstFuncs",Rd="_isDynProxy",ys="_dynClass",_C="_dynCls$",Ad="_dynInstChk",qa=Ad,ly="_dfOpts",Ig="_unknown_",yp="__proto__",xc="_dyn"+yp,Tg="__dynProto$Gbl",cf="_dynInstProto",Yc="useBaseInst",Md="setInstFuncs",bp=Object,Ba=bp.getPrototypeOf,Eg=bp.getOwnPropertyNames,xg=pn(),zd=xg[Tg]||(xg[Tg]={o:(Ec={},Ec[Md]=!0,Ec[Yc]=!0,Ec),n:1e3});function eu(t){return t&&(t===bp[Rr]||t===Array[Rr])}function _p(t){return eu(t)||t===Function[Rr]}function fo(t){var e;if(t){if(Ba)return Ba(t);var n=t[yp]||t[Rr]||(t[Au]?t[Au][Rr]:null);e=t[xc]||n,gn(t,xc)||(delete t[cf],e=t[xc]=t[cf]||t[xc],t[cf]=n)}return e}function Uu(t,e){var n=[];if(Eg)n=Eg(t);else for(var r in t)typeof r=="string"&&gn(t,r)&&n.push(r);if(n&&n.length>0)for(var i=0;i<n.length;i++)e(n[i])}function wp(t,e,n){return e!==Au&&typeof t[e]===Mu&&(n||gn(t,e))&&e!==yp&&e!==Rr}function Nu(t){tr("DynamicProto: "+t)}function wC(t){var e=Pr(null);return Uu(t,function(n){!e[n]&&wp(t,n,!1)&&(e[n]=t[n])}),e}function Cp(t,e){for(var n=t.length-1;n>=0;n--)if(t[n]===e)return!0;return!1}function CC(t,e,n,r){function i(c,u,l){var f=u[l];if(f[Rd]&&r){var m=c[zu]||{};m[qa]!==!1&&(f=(m[u[ys]]||{})[l]||f)}return function(){return f.apply(c,arguments)}}var o=Pr(null);Uu(n,function(c){o[c]=i(e,n,c)});for(var s=fo(t),a=[];s&&!_p(s)&&!Cp(a,s);)Uu(s,function(c){!o[c]&&wp(s,c,!Ba)&&(o[c]=i(e,s,c))}),a.push(s),s=fo(s);return o}function SC(t,e,n,r){var i=null;if(t&&gn(n,ys)){var o=t[zu]||Pr(null);if(i=(o[n[ys]]||Pr(null))[e],i||Nu("Missing ["+e+"] "+Mu),!i[Ad]&&o[qa]!==!1){for(var s=!gn(t,e),a=fo(t),c=[];s&&a&&!_p(a)&&!Cp(c,a);){var u=a[e];if(u){s=u===r;break}c.push(a),a=fo(a)}try{s&&(t[e]=i),i[Ad]=1}catch{o[qa]=!1}}}return i}function kC(t,e,n){var r=e[t];return r===n&&(r=fo(e)[t]),typeof r!==Mu&&Nu("["+t+"] is not a "+Mu),r}function IC(t,e,n,r,i){function o(c,u){var l=function(){var f=SC(this,u,c,l)||kC(u,c,l);return f.apply(this,arguments)};return l[Rd]=1,l}if(!eu(t)){var s=n[zu]=n[zu]||Pr(null);if(!eu(s)){var a=s[e]=s[e]||Pr(null);s[qa]!==!1&&(s[qa]=!!i),eu(a)||Uu(n,function(c){wp(n,c,!1)&&n[c]!==r[c]&&(a[c]=n[c],delete n[c],(!gn(t,c)||t[c]&&!t[c][Rd])&&(t[c]=o(t,c)))})}}}function TC(t,e){if(Ba){for(var n=[],r=fo(e);r&&!_p(r)&&!Cp(n,r);){if(r===t)return!0;n.push(r),r=fo(r)}return!1}return!0}function uf(t,e){return gn(t,Rr)?t.name||e||Ig:((t||{})[Au]||{}).name||e||Ig}function He(t,e,n,r){gn(t,Rr)||Nu("theClass is an invalid class definition.");var i=t[Rr];TC(i,e)||Nu("["+uf(t)+"] not in hierarchy of ["+uf(e)+"]");var o=null;gn(i,ys)?o=i[ys]:(o=_C+uf(t,"_")+"$"+zd.n,zd.n++,i[ys]=o);var s=He[ly],a=!!s[Yc];a&&r&&r[Yc]!==void 0&&(a=!!r[Yc]);var c=wC(e),u=CC(i,e,c,a);n(e,u);var l=!!Ba&&!!s[Md];l&&r&&(l=!!r[Md]),IC(i,o,e,c,l!==!1)}He[ly]=zd.o;var Sp=xw,EC=Rw,Kr=Sp({NONE:0,PENDING:3,INACTIVE:1,ACTIVE:2}),zs="toLowerCase",he="length",$u="warnToConsole",pc="throwInternal",Yi="watch",ho="apply",Ee="push",wo="splice",ft="logger",Ui="cancel",gc="initialize",Qr="identifier",Lu="removeNotificationListener",ju="addNotificationListener",Vn="isInitialized",Pc="getNotifyMgr",Ka="getPlugin",po="name",Nt="processNext",fy="getProcessTelContext",Fi="value",cs="enabled",Pg="stopPollingInternalLogs",go="unload",Dc="onComplete",Ud="version",dy="loggingLevelConsole",vo="createNew",hr="teardown",Ou="messageId",eo="message",Sr="diagLog",Fu="_doTeardown",Xa="update",Kn="getNext",Ja="setNextPlugin",Nd="userAgent",mo="split",to="replace",$d="substring",hy="indexOf",oi="type",Dg="evtName",fr="status",Rg="getAllResponseHeaders",Ld="isChildEvt",wn="data",bs="getCtx",jn="setCtx",Ag="itemsReceived",Rc="headers",Xs="urlString",zo="timeout",jd="traceFlags",lf="getAttribute",ff;function xC(t,e){ff||(ff=ey("AggregationError",function(r,i){i[he]>1&&(r.errors=i[1])}));var n=t;throw ee(e,function(r,i){n+=`
|
|
2
|
-
`.concat(i," > ").concat(te(r))}),new
|
|
1
|
+
"use strict";var j_=Object.defineProperty;var cg=t=>{throw TypeError(t)};var L_=(t,e,n)=>e in t?j_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var ar=(t,e,n)=>L_(t,typeof e!="symbol"?e+"":e,n),ug=(t,e,n)=>e.has(t)||cg("Cannot "+n);var xe=(t,e,n)=>(ug(t,e,"read from private field"),n?n.call(t):e.get(t)),wt=(t,e,n)=>e.has(t)?cg("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),cr=(t,e,n,r)=>(ug(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("zod"),wm="0.0.1-alpha5";var Sl,gr;class W_{constructor(e){ar(this,"id");wt(this,Sl,"v1");wt(this,gr);var r,i;this.id=e;const n=(i=(r=window.Cbn)==null?void 0:r.getCustomCodeSdkBridge)==null?void 0:i.call(r,xe(this,Sl));if(cr(this,gr,n==null?void 0:n.getButtonSdkBridge(this.id)),!xe(this,gr))throw new Error(`Cannot access API for Button "${this.id}".`)}onRendered(e){var n;return((n=xe(this,gr))==null?void 0:n.addOnRenderedCallback(e))??{unsubscribe:()=>{}}}onClick(e){var n;return((n=xe(this,gr))==null?void 0:n.addOnClickCallback(e))??{unsubscribe:()=>{}}}async setVisible(e){var n;await((n=xe(this,gr))==null?void 0:n.setVisible(e))}setText(e){var n;(n=xe(this,gr))==null||n.setText(e)}}Sl=new WeakMap,gr=new WeakMap;var Il,Bi;class V_{constructor(e){ar(this,"id");wt(this,Il,"v1");wt(this,Bi);var r,i;this.id=e;const n=(i=(r=window.Cbn)==null?void 0:r.getCustomCodeSdkBridge)==null?void 0:i.call(r,xe(this,Il));if(cr(this,Bi,n==null?void 0:n.getCheckboxSdkBridge(this.id)),!xe(this,Bi))throw new Error(`Cannot access API for Checkbox "${this.id}".`)}onRendered(e){var n;return((n=xe(this,Bi))==null?void 0:n.addOnRenderedCallback(e))??{unsubscribe:()=>{}}}async setVisible(e){var n;await((n=xe(this,Bi))==null?void 0:n.setVisible(e))}}Il=new WeakMap,Bi=new WeakMap;var kl,Ki;class q_{constructor(e){ar(this,"id");wt(this,kl,"v1");wt(this,Ki);var r,i;this.id=e;const n=(i=(r=window.Cbn)==null?void 0:r.getCustomCodeSdkBridge)==null?void 0:i.call(r,xe(this,kl));if(cr(this,Ki,n==null?void 0:n.getCollapsibleSdkBridge(this.id)),!xe(this,Ki))throw new Error(`Cannot access API for Collapsible "${this.id}".`)}onRendered(e){var n;return((n=xe(this,Ki))==null?void 0:n.addOnRenderedCallback(e))??{unsubscribe:()=>{}}}async setVisible(e){var n;await((n=xe(this,Ki))==null?void 0:n.setVisible(e))}}kl=new WeakMap,Ki=new WeakMap;var Tl,vr;class H_{constructor(e){ar(this,"id");wt(this,Tl,"v1");wt(this,vr);var r,i;this.id=e;const n=(i=(r=window.Cbn)==null?void 0:r.getCustomCodeSdkBridge)==null?void 0:i.call(r,xe(this,Tl));if(cr(this,vr,n==null?void 0:n.getCustomCtrlSdkBridge(this.id)),!xe(this,vr))throw new Error(`Cannot access API for Custom Control "${this.id}".`)}set renderFn(e){var n;(n=xe(this,vr))==null||n.setRenderFn(e)}async render(e){var n;typeof e=="function"&&(this.renderFn=e),await((n=xe(this,vr))==null?void 0:n.render())}getElement(){var n;return(n=xe(this,vr))==null?void 0:n.getElement()}async setVisible(e){var n;await((n=xe(this,vr))==null?void 0:n.setVisible(e))}}Tl=new WeakMap,vr=new WeakMap;var El,Xi;class B_{constructor(e){ar(this,"id");wt(this,El,"v1");wt(this,Xi);var r,i;this.id=e;const n=(i=(r=window.Cbn)==null?void 0:r.getCustomCodeSdkBridge)==null?void 0:i.call(r,xe(this,El));if(cr(this,Xi,n==null?void 0:n.getDataviewSdkBridge(this.id)),!xe(this,Xi))throw new Error(`Cannot access API for Dataview "${this.id}".`)}onRendered(e){var n;return((n=xe(this,Xi))==null?void 0:n.addOnRenderedCallback(e))??{unsubscribe:()=>{}}}async setVisible(e){var n;await((n=xe(this,Xi))==null?void 0:n.setVisible(e))}}El=new WeakMap,Xi=new WeakMap;var xl,Gi;class K_{constructor(e){ar(this,"id");wt(this,xl,"v1");wt(this,Gi);var r,i;this.id=e;const n=(i=(r=window.Cbn)==null?void 0:r.getCustomCodeSdkBridge)==null?void 0:i.call(r,xe(this,xl));if(cr(this,Gi,n==null?void 0:n.getInputSdkBridge(this.id)),!xe(this,Gi))throw new Error(`Cannot access API for Input "${this.id}".`)}onRendered(e){var n;return((n=xe(this,Gi))==null?void 0:n.addOnRenderedCallback(e))??{unsubscribe:()=>{}}}async setVisible(e){var n;await((n=xe(this,Gi))==null?void 0:n.setVisible(e))}}xl=new WeakMap,Gi=new WeakMap;var Pl,Ji;class X_{constructor(e){ar(this,"id");wt(this,Pl,"v1");wt(this,Ji);var r,i;this.id=e;const n=(i=(r=window.Cbn)==null?void 0:r.getCustomCodeSdkBridge)==null?void 0:i.call(r,xe(this,Pl));if(cr(this,Ji,n==null?void 0:n.getPanelSdkBridge(this.id)),!xe(this,Ji))throw new Error(`Cannot access API for Panel "${this.id}".`)}onRendered(e){var n;return((n=xe(this,Ji))==null?void 0:n.addOnRenderedCallback(e))??{unsubscribe:()=>{}}}async setVisible(e){var n;await((n=xe(this,Ji))==null?void 0:n.setVisible(e))}}Pl=new WeakMap,Ji=new WeakMap;var Dl,ei;class G_{constructor(e){ar(this,"id");wt(this,Dl,"v1");wt(this,ei);var r,i;this.id=e;const n=(i=(r=window.Cbn)==null?void 0:r.getCustomCodeSdkBridge)==null?void 0:i.call(r,xe(this,Dl));if(cr(this,ei,n==null?void 0:n.getTextSdkBridge(this.id)),!xe(this,ei))throw new Error(`Cannot access API for Text "${this.id}".`)}onRendered(e){var n;return((n=xe(this,ei))==null?void 0:n.addOnRenderedCallback(e))??{unsubscribe:()=>{}}}async setVisible(e){var n;await((n=xe(this,ei))==null?void 0:n.setVisible(e))}setText(e){var n;(n=xe(this,ei))==null||n.setText(e)}}Dl=new WeakMap,ei=new WeakMap;const Tu=[];function Sm(t,e){if(Tu.length>=1)throw new Error("Only 1 `ConfiguratorClient` can be created at a time.");Tu.push({client:t,internals:e})}function lg(){const t=Tu[0];if(!t)throw new Error("Operation not possible as no `ConfiguratorClient` has been registered yet.");return t.client}function Yc(){const t=Tu[0];if(!t)throw new Error("Operation not possible as no `ConfiguratorClient` has been registered yet.");return t.internals}function J_(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var nf={exports:{}},fg;function Q_(){return fg||(fg=1,(function(t){var e=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(c,u,l){this.fn=c,this.context=u,this.once=l||!1}function o(c,u,l,f,m){if(typeof l!="function")throw new TypeError("The listener must be a function");var d=new i(l,f||c,m),h=n?n+u:u;return c._events[h]?c._events[h].fn?c._events[h]=[c._events[h],d]:c._events[h].push(d):(c._events[h]=d,c._eventsCount++),c}function s(c,u){--c._eventsCount===0?c._events=new r:delete c._events[u]}function a(){this._events=new r,this._eventsCount=0}a.prototype.eventNames=function(){var u=[],l,f;if(this._eventsCount===0)return u;for(f in l=this._events)e.call(l,f)&&u.push(n?f.slice(1):f);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(l)):u},a.prototype.listeners=function(u){var l=n?n+u:u,f=this._events[l];if(!f)return[];if(f.fn)return[f.fn];for(var m=0,d=f.length,h=new Array(d);m<d;m++)h[m]=f[m].fn;return h},a.prototype.listenerCount=function(u){var l=n?n+u:u,f=this._events[l];return f?f.fn?1:f.length:0},a.prototype.emit=function(u,l,f,m,d,h){var g=n?n+u:u;if(!this._events[g])return!1;var p=this._events[g],v=arguments.length,_,P;if(p.fn){switch(p.once&&this.removeListener(u,p.fn,void 0,!0),v){case 1:return p.fn.call(p.context),!0;case 2:return p.fn.call(p.context,l),!0;case 3:return p.fn.call(p.context,l,f),!0;case 4:return p.fn.call(p.context,l,f,m),!0;case 5:return p.fn.call(p.context,l,f,m,d),!0;case 6:return p.fn.call(p.context,l,f,m,d,h),!0}for(P=1,_=new Array(v-1);P<v;P++)_[P-1]=arguments[P];p.fn.apply(p.context,_)}else{var x=p.length,R;for(P=0;P<x;P++)switch(p[P].once&&this.removeListener(u,p[P].fn,void 0,!0),v){case 1:p[P].fn.call(p[P].context);break;case 2:p[P].fn.call(p[P].context,l);break;case 3:p[P].fn.call(p[P].context,l,f);break;case 4:p[P].fn.call(p[P].context,l,f,m);break;default:if(!_)for(R=1,_=new Array(v-1);R<v;R++)_[R-1]=arguments[R];p[P].fn.apply(p[P].context,_)}}return!0},a.prototype.on=function(u,l,f){return o(this,u,l,f,!1)},a.prototype.once=function(u,l,f){return o(this,u,l,f,!0)},a.prototype.removeListener=function(u,l,f,m){var d=n?n+u:u;if(!this._events[d])return this;if(!l)return s(this,d),this;var h=this._events[d];if(h.fn)h.fn===l&&(!m||h.once)&&(!f||h.context===f)&&s(this,d);else{for(var g=0,p=[],v=h.length;g<v;g++)(h[g].fn!==l||m&&!h[g].once||f&&h[g].context!==f)&&p.push(h[g]);p.length?this._events[d]=p.length===1?p[0]:p:s(this,d)}return this},a.prototype.removeAllListeners=function(u){var l;return u?(l=n?n+u:u,this._events[l]&&s(this,l)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,t.exports=a})(nf)),nf.exports}var Z_=Q_();const Rl=J_(Z_);class Qi extends Error{constructor(e,n){const r=new.target.prototype;super(`${e}: Status code '${n}'`),this.statusCode=n,this.__proto__=r}}class cp extends Error{constructor(e="A timeout occurred."){const n=new.target.prototype;super(e),this.__proto__=n}}class Pn extends Error{constructor(e="An abort occurred."){const n=new.target.prototype;super(e),this.__proto__=n}}class Y_ extends Error{constructor(e,n){const r=new.target.prototype;super(e),this.transport=n,this.errorType="UnsupportedTransportError",this.__proto__=r}}class e0 extends Error{constructor(e,n){const r=new.target.prototype;super(e),this.transport=n,this.errorType="DisabledTransportError",this.__proto__=r}}class t0 extends Error{constructor(e,n){const r=new.target.prototype;super(e),this.transport=n,this.errorType="FailedToStartTransportError",this.__proto__=r}}class dg extends Error{constructor(e){const n=new.target.prototype;super(e),this.errorType="FailedToNegotiateWithServerError",this.__proto__=n}}class n0 extends Error{constructor(e,n){const r=new.target.prototype;super(e),this.innerErrors=n,this.__proto__=r}}class Im{constructor(e,n,r){this.statusCode=e,this.statusText=n,this.content=r}}class Al{get(e,n){return this.send({...n,method:"GET",url:e})}post(e,n){return this.send({...n,method:"POST",url:e})}delete(e,n){return this.send({...n,method:"DELETE",url:e})}getCookieString(e){return""}}var N;(function(t){t[t.Trace=0]="Trace",t[t.Debug=1]="Debug",t[t.Information=2]="Information",t[t.Warning=3]="Warning",t[t.Error=4]="Error",t[t.Critical=5]="Critical",t[t.None=6]="None"})(N||(N={}));class Va{constructor(){}log(e,n){}}Va.instance=new Va;const r0="10.0.0";class ht{static isRequired(e,n){if(e==null)throw new Error(`The '${n}' argument is required.`)}static isNotEmpty(e,n){if(!e||e.match(/^\s*$/))throw new Error(`The '${n}' argument should not be empty.`)}static isIn(e,n,r){if(!(e in n))throw new Error(`Unknown ${r} value: ${e}.`)}}class rt{static get isBrowser(){return!rt.isNode&&typeof window=="object"&&typeof window.document=="object"}static get isWebWorker(){return!rt.isNode&&typeof self=="object"&&"importScripts"in self}static get isReactNative(){return!rt.isNode&&typeof window=="object"&&typeof window.document>"u"}static get isNode(){return typeof process<"u"&&process.release&&process.release.name==="node"}}function qa(t,e){let n="";return uo(t)?(n=`Binary data of length ${t.byteLength}`,e&&(n+=`. Content: '${i0(t)}'`)):typeof t=="string"&&(n=`String data of length ${t.length}`,e&&(n+=`. Content: '${t}'`)),n}function i0(t){const e=new Uint8Array(t);let n="";return e.forEach(r=>{const i=r<16?"0":"";n+=`0x${i}${r.toString(16)} `}),n.substring(0,n.length-1)}function uo(t){return t&&typeof ArrayBuffer<"u"&&(t instanceof ArrayBuffer||t.constructor&&t.constructor.name==="ArrayBuffer")}async function km(t,e,n,r,i,o){const s={},[a,c]=Ms();s[a]=c,t.log(N.Trace,`(${e} transport) sending data. ${qa(i,o.logMessageContent)}.`);const u=uo(i)?"arraybuffer":"text",l=await n.post(r,{content:i,headers:{...s,...o.headers},responseType:u,timeout:o.timeout,withCredentials:o.withCredentials});t.log(N.Trace,`(${e} transport) request complete. Response status: ${l.statusCode}.`)}function o0(t){return t===void 0?new Eu(N.Information):t===null?Va.instance:t.log!==void 0?t:new Eu(t)}class s0{constructor(e,n){this._subject=e,this._observer=n}dispose(){const e=this._subject.observers.indexOf(this._observer);e>-1&&this._subject.observers.splice(e,1),this._subject.observers.length===0&&this._subject.cancelCallback&&this._subject.cancelCallback().catch(n=>{})}}class Eu{constructor(e){this._minLevel=e,this.out=console}log(e,n){if(e>=this._minLevel){const r=`[${new Date().toISOString()}] ${N[e]}: ${n}`;switch(e){case N.Critical:case N.Error:this.out.error(r);break;case N.Warning:this.out.warn(r);break;case N.Information:this.out.info(r);break;default:this.out.log(r);break}}}}function Ms(){let t="X-SignalR-User-Agent";return rt.isNode&&(t="User-Agent"),[t,a0(r0,c0(),l0(),u0())]}function a0(t,e,n,r){let i="Microsoft SignalR/";const o=t.split(".");return i+=`${o[0]}.${o[1]}`,i+=` (${t}; `,e&&e!==""?i+=`${e}; `:i+="Unknown OS; ",i+=`${n}`,r?i+=`; ${r}`:i+="; Unknown Runtime Version",i+=")",i}function c0(){if(rt.isNode)switch(process.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return process.platform}else return""}function u0(){if(rt.isNode)return process.versions.node}function l0(){return rt.isNode?"NodeJS":"Browser"}function rf(t){return t.stack?t.stack:t.message?t.message:`${t}`}function f0(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("could not find global")}class d0 extends Al{constructor(e){if(super(),this._logger=e,typeof fetch>"u"||rt.isNode){const n=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._jar=new(n("tough-cookie")).CookieJar,typeof fetch>"u"?this._fetchType=n("node-fetch"):this._fetchType=fetch,this._fetchType=n("fetch-cookie")(this._fetchType,this._jar)}else this._fetchType=fetch.bind(f0());if(typeof AbortController>"u"){const n=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._abortControllerType=n("abort-controller")}else this._abortControllerType=AbortController}async send(e){if(e.abortSignal&&e.abortSignal.aborted)throw new Pn;if(!e.method)throw new Error("No method defined.");if(!e.url)throw new Error("No url defined.");const n=new this._abortControllerType;let r;e.abortSignal&&(e.abortSignal.onabort=()=>{n.abort(),r=new Pn});let i=null;if(e.timeout){const c=e.timeout;i=setTimeout(()=>{n.abort(),this._logger.log(N.Warning,"Timeout from HTTP request."),r=new cp},c)}e.content===""&&(e.content=void 0),e.content&&(e.headers=e.headers||{},uo(e.content)?e.headers["Content-Type"]="application/octet-stream":e.headers["Content-Type"]="text/plain;charset=UTF-8");let o;try{o=await this._fetchType(e.url,{body:e.content,cache:"no-cache",credentials:e.withCredentials===!0?"include":"same-origin",headers:{"X-Requested-With":"XMLHttpRequest",...e.headers},method:e.method,mode:"cors",redirect:"follow",signal:n.signal})}catch(c){throw r||(this._logger.log(N.Warning,`Error from HTTP request. ${c}.`),c)}finally{i&&clearTimeout(i),e.abortSignal&&(e.abortSignal.onabort=null)}if(!o.ok){const c=await hg(o,"text");throw new Qi(c||o.statusText,o.status)}const a=await hg(o,e.responseType);return new Im(o.status,o.statusText,a)}getCookieString(e){let n="";return rt.isNode&&this._jar&&this._jar.getCookies(e,(r,i)=>n=i.join("; ")),n}}function hg(t,e){let n;switch(e){case"arraybuffer":n=t.arrayBuffer();break;case"text":n=t.text();break;case"blob":case"document":case"json":throw new Error(`${e} is not supported.`);default:n=t.text();break}return n}class h0 extends Al{constructor(e){super(),this._logger=e}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new Pn):e.method?e.url?new Promise((n,r)=>{const i=new XMLHttpRequest;i.open(e.method,e.url,!0),i.withCredentials=e.withCredentials===void 0?!0:e.withCredentials,i.setRequestHeader("X-Requested-With","XMLHttpRequest"),e.content===""&&(e.content=void 0),e.content&&(uo(e.content)?i.setRequestHeader("Content-Type","application/octet-stream"):i.setRequestHeader("Content-Type","text/plain;charset=UTF-8"));const o=e.headers;o&&Object.keys(o).forEach(s=>{i.setRequestHeader(s,o[s])}),e.responseType&&(i.responseType=e.responseType),e.abortSignal&&(e.abortSignal.onabort=()=>{i.abort(),r(new Pn)}),e.timeout&&(i.timeout=e.timeout),i.onload=()=>{e.abortSignal&&(e.abortSignal.onabort=null),i.status>=200&&i.status<300?n(new Im(i.status,i.statusText,i.response||i.responseText)):r(new Qi(i.response||i.responseText||i.statusText,i.status))},i.onerror=()=>{this._logger.log(N.Warning,`Error from HTTP request. ${i.status}: ${i.statusText}.`),r(new Qi(i.statusText,i.status))},i.ontimeout=()=>{this._logger.log(N.Warning,"Timeout from HTTP request."),r(new cp)},i.send(e.content)}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}}class p0 extends Al{constructor(e){if(super(),typeof fetch<"u"||rt.isNode)this._httpClient=new d0(e);else if(typeof XMLHttpRequest<"u")this._httpClient=new h0(e);else throw new Error("No usable HttpClient found.")}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new Pn):e.method?e.url?this._httpClient.send(e):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}getCookieString(e){return this._httpClient.getCookieString(e)}}class rn{static write(e){return`${e}${rn.RecordSeparator}`}static parse(e){if(e[e.length-1]!==rn.RecordSeparator)throw new Error("Message is incomplete.");const n=e.split(rn.RecordSeparator);return n.pop(),n}}rn.RecordSeparatorCode=30;rn.RecordSeparator=String.fromCharCode(rn.RecordSeparatorCode);class g0{writeHandshakeRequest(e){return rn.write(JSON.stringify(e))}parseHandshakeResponse(e){let n,r;if(uo(e)){const a=new Uint8Array(e),c=a.indexOf(rn.RecordSeparatorCode);if(c===-1)throw new Error("Message is incomplete.");const u=c+1;n=String.fromCharCode.apply(null,Array.prototype.slice.call(a.slice(0,u))),r=a.byteLength>u?a.slice(u).buffer:null}else{const a=e,c=a.indexOf(rn.RecordSeparator);if(c===-1)throw new Error("Message is incomplete.");const u=c+1;n=a.substring(0,u),r=a.length>u?a.substring(u):null}const i=rn.parse(n),o=JSON.parse(i[0]);if(o.type)throw new Error("Expected a handshake response from the server.");return[r,o]}}var Se;(function(t){t[t.Invocation=1]="Invocation",t[t.StreamItem=2]="StreamItem",t[t.Completion=3]="Completion",t[t.StreamInvocation=4]="StreamInvocation",t[t.CancelInvocation=5]="CancelInvocation",t[t.Ping=6]="Ping",t[t.Close=7]="Close",t[t.Ack=8]="Ack",t[t.Sequence=9]="Sequence"})(Se||(Se={}));class v0{constructor(){this.observers=[]}next(e){for(const n of this.observers)n.next(e)}error(e){for(const n of this.observers)n.error&&n.error(e)}complete(){for(const e of this.observers)e.complete&&e.complete()}subscribe(e){return this.observers.push(e),new s0(this,e)}}class m0{constructor(e,n,r){this._bufferSize=1e5,this._messages=[],this._totalMessageCount=0,this._waitForSequenceMessage=!1,this._nextReceivingSequenceId=1,this._latestReceivedSequenceId=0,this._bufferedByteCount=0,this._reconnectInProgress=!1,this._protocol=e,this._connection=n,this._bufferSize=r}async _send(e){const n=this._protocol.writeMessage(e);let r=Promise.resolve();if(this._isInvocationMessage(e)){this._totalMessageCount++;let i=()=>{},o=()=>{};uo(n)?this._bufferedByteCount+=n.byteLength:this._bufferedByteCount+=n.length,this._bufferedByteCount>=this._bufferSize&&(r=new Promise((s,a)=>{i=s,o=a})),this._messages.push(new y0(n,this._totalMessageCount,i,o))}try{this._reconnectInProgress||await this._connection.send(n)}catch{this._disconnected()}await r}_ack(e){let n=-1;for(let r=0;r<this._messages.length;r++){const i=this._messages[r];if(i._id<=e.sequenceId)n=r,uo(i._message)?this._bufferedByteCount-=i._message.byteLength:this._bufferedByteCount-=i._message.length,i._resolver();else if(this._bufferedByteCount<this._bufferSize)i._resolver();else break}n!==-1&&(this._messages=this._messages.slice(n+1))}_shouldProcessMessage(e){if(this._waitForSequenceMessage)return e.type!==Se.Sequence?!1:(this._waitForSequenceMessage=!1,!0);if(!this._isInvocationMessage(e))return!0;const n=this._nextReceivingSequenceId;return this._nextReceivingSequenceId++,n<=this._latestReceivedSequenceId?(n===this._latestReceivedSequenceId&&this._ackTimer(),!1):(this._latestReceivedSequenceId=n,this._ackTimer(),!0)}_resetSequence(e){if(e.sequenceId>this._nextReceivingSequenceId){this._connection.stop(new Error("Sequence ID greater than amount of messages we've received."));return}this._nextReceivingSequenceId=e.sequenceId}_disconnected(){this._reconnectInProgress=!0,this._waitForSequenceMessage=!0}async _resend(){const e=this._messages.length!==0?this._messages[0]._id:this._totalMessageCount+1;await this._connection.send(this._protocol.writeMessage({type:Se.Sequence,sequenceId:e}));const n=this._messages;for(const r of n)await this._connection.send(r._message);this._reconnectInProgress=!1}_dispose(e){e??(e=new Error("Unable to reconnect to server."));for(const n of this._messages)n._rejector(e)}_isInvocationMessage(e){switch(e.type){case Se.Invocation:case Se.StreamItem:case Se.Completion:case Se.StreamInvocation:case Se.CancelInvocation:return!0;case Se.Close:case Se.Sequence:case Se.Ping:case Se.Ack:return!1}}_ackTimer(){this._ackTimerHandle===void 0&&(this._ackTimerHandle=setTimeout(async()=>{try{this._reconnectInProgress||await this._connection.send(this._protocol.writeMessage({type:Se.Ack,sequenceId:this._latestReceivedSequenceId}))}catch{}clearTimeout(this._ackTimerHandle),this._ackTimerHandle=void 0},1e3))}}class y0{constructor(e,n,r,i){this._message=e,this._id=n,this._resolver=r,this._rejector=i}}const b0=30*1e3,_0=15*1e3,C0=1e5;var Ge;(function(t){t.Disconnected="Disconnected",t.Connecting="Connecting",t.Connected="Connected",t.Disconnecting="Disconnecting",t.Reconnecting="Reconnecting"})(Ge||(Ge={}));class up{static create(e,n,r,i,o,s,a){return new up(e,n,r,i,o,s,a)}constructor(e,n,r,i,o,s,a){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.log(N.Warning,"The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://learn.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")},ht.isRequired(e,"connection"),ht.isRequired(n,"logger"),ht.isRequired(r,"protocol"),this.serverTimeoutInMilliseconds=o??b0,this.keepAliveIntervalInMilliseconds=s??_0,this._statefulReconnectBufferSize=a??C0,this._logger=n,this._protocol=r,this.connection=e,this._reconnectPolicy=i,this._handshakeProtocol=new g0,this.connection.onreceive=c=>this._processIncomingData(c),this.connection.onclose=c=>this._connectionClosed(c),this._callbacks={},this._methods={},this._closedCallbacks=[],this._reconnectingCallbacks=[],this._reconnectedCallbacks=[],this._invocationId=0,this._receivedHandshakeResponse=!1,this._connectionState=Ge.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:Se.Ping})}get state(){return this._connectionState}get connectionId(){return this.connection&&this.connection.connectionId||null}get baseUrl(){return this.connection.baseUrl||""}set baseUrl(e){if(this._connectionState!==Ge.Disconnected&&this._connectionState!==Ge.Reconnecting)throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!e)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=e}start(){return this._startPromise=this._startWithStateTransitions(),this._startPromise}async _startWithStateTransitions(){if(this._connectionState!==Ge.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));this._connectionState=Ge.Connecting,this._logger.log(N.Debug,"Starting HubConnection.");try{await this._startInternal(),rt.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener),this._connectionState=Ge.Connected,this._connectionStarted=!0,this._logger.log(N.Debug,"HubConnection connected successfully.")}catch(e){return this._connectionState=Ge.Disconnected,this._logger.log(N.Debug,`HubConnection failed to start successfully because of error '${e}'.`),Promise.reject(e)}}async _startInternal(){this._stopDuringStartError=void 0,this._receivedHandshakeResponse=!1;const e=new Promise((n,r)=>{this._handshakeResolver=n,this._handshakeRejecter=r});await this.connection.start(this._protocol.transferFormat);try{let n=this._protocol.version;this.connection.features.reconnect||(n=1);const r={protocol:this._protocol.name,version:n};if(this._logger.log(N.Debug,"Sending handshake request."),await this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(r)),this._logger.log(N.Information,`Using HubProtocol '${this._protocol.name}'.`),this._cleanupTimeout(),this._resetTimeoutPeriod(),this._resetKeepAliveInterval(),await e,this._stopDuringStartError)throw this._stopDuringStartError;(this.connection.features.reconnect||!1)&&(this._messageBuffer=new m0(this._protocol,this.connection,this._statefulReconnectBufferSize),this.connection.features.disconnected=this._messageBuffer._disconnected.bind(this._messageBuffer),this.connection.features.resend=()=>{if(this._messageBuffer)return this._messageBuffer._resend()}),this.connection.features.inherentKeepAlive||await this._sendMessage(this._cachedPingMessage)}catch(n){throw this._logger.log(N.Debug,`Hub handshake failed with error '${n}' during start(). Stopping HubConnection.`),this._cleanupTimeout(),this._cleanupPingTimer(),await this.connection.stop(n),n}}async stop(){const e=this._startPromise;this.connection.features.reconnect=!1,this._stopPromise=this._stopInternal(),await this._stopPromise;try{await e}catch{}}_stopInternal(e){if(this._connectionState===Ge.Disconnected)return this._logger.log(N.Debug,`Call to HubConnection.stop(${e}) ignored because it is already in the disconnected state.`),Promise.resolve();if(this._connectionState===Ge.Disconnecting)return this._logger.log(N.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;const n=this._connectionState;return this._connectionState=Ge.Disconnecting,this._logger.log(N.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(N.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(n===Ge.Connected&&this._sendCloseMessage(),this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=e||new Pn("The connection was stopped before the hub handshake could complete."),this.connection.stop(e))}async _sendCloseMessage(){try{await this._sendWithProtocol(this._createCloseMessage())}catch{}}stream(e,...n){const[r,i]=this._replaceStreamingParams(n),o=this._createStreamInvocation(e,n,i);let s;const a=new v0;return a.cancelCallback=()=>{const c=this._createCancelInvocation(o.invocationId);return delete this._callbacks[o.invocationId],s.then(()=>this._sendWithProtocol(c))},this._callbacks[o.invocationId]=(c,u)=>{if(u){a.error(u);return}else c&&(c.type===Se.Completion?c.error?a.error(new Error(c.error)):a.complete():a.next(c.item))},s=this._sendWithProtocol(o).catch(c=>{a.error(c),delete this._callbacks[o.invocationId]}),this._launchStreams(r,s),a}_sendMessage(e){return this._resetKeepAliveInterval(),this.connection.send(e)}_sendWithProtocol(e){return this._messageBuffer?this._messageBuffer._send(e):this._sendMessage(this._protocol.writeMessage(e))}send(e,...n){const[r,i]=this._replaceStreamingParams(n),o=this._sendWithProtocol(this._createInvocation(e,n,!0,i));return this._launchStreams(r,o),o}invoke(e,...n){const[r,i]=this._replaceStreamingParams(n),o=this._createInvocation(e,n,!1,i);return new Promise((a,c)=>{this._callbacks[o.invocationId]=(l,f)=>{if(f){c(f);return}else l&&(l.type===Se.Completion?l.error?c(new Error(l.error)):a(l.result):c(new Error(`Unexpected message type: ${l.type}`)))};const u=this._sendWithProtocol(o).catch(l=>{c(l),delete this._callbacks[o.invocationId]});this._launchStreams(r,u)})}on(e,n){!e||!n||(e=e.toLowerCase(),this._methods[e]||(this._methods[e]=[]),this._methods[e].indexOf(n)===-1&&this._methods[e].push(n))}off(e,n){if(!e)return;e=e.toLowerCase();const r=this._methods[e];if(r)if(n){const i=r.indexOf(n);i!==-1&&(r.splice(i,1),r.length===0&&delete this._methods[e])}else delete this._methods[e]}onclose(e){e&&this._closedCallbacks.push(e)}onreconnecting(e){e&&this._reconnectingCallbacks.push(e)}onreconnected(e){e&&this._reconnectedCallbacks.push(e)}_processIncomingData(e){if(this._cleanupTimeout(),this._receivedHandshakeResponse||(e=this._processHandshakeResponse(e),this._receivedHandshakeResponse=!0),e){const n=this._protocol.parseMessages(e,this._logger);for(const r of n)if(!(this._messageBuffer&&!this._messageBuffer._shouldProcessMessage(r)))switch(r.type){case Se.Invocation:this._invokeClientMethod(r).catch(i=>{this._logger.log(N.Error,`Invoke client method threw error: ${rf(i)}`)});break;case Se.StreamItem:case Se.Completion:{const i=this._callbacks[r.invocationId];if(i){r.type===Se.Completion&&delete this._callbacks[r.invocationId];try{i(r)}catch(o){this._logger.log(N.Error,`Stream callback threw error: ${rf(o)}`)}}break}case Se.Ping:break;case Se.Close:{this._logger.log(N.Information,"Close message received from server.");const i=r.error?new Error("Server returned an error on close: "+r.error):void 0;r.allowReconnect===!0?this.connection.stop(i):this._stopPromise=this._stopInternal(i);break}case Se.Ack:this._messageBuffer&&this._messageBuffer._ack(r);break;case Se.Sequence:this._messageBuffer&&this._messageBuffer._resetSequence(r);break;default:this._logger.log(N.Warning,`Invalid message type: ${r.type}.`);break}}this._resetTimeoutPeriod()}_processHandshakeResponse(e){let n,r;try{[r,n]=this._handshakeProtocol.parseHandshakeResponse(e)}catch(i){const o="Error parsing handshake response: "+i;this._logger.log(N.Error,o);const s=new Error(o);throw this._handshakeRejecter(s),s}if(n.error){const i="Server returned handshake error: "+n.error;this._logger.log(N.Error,i);const o=new Error(i);throw this._handshakeRejecter(o),o}else this._logger.log(N.Debug,"Server handshake complete.");return this._handshakeResolver(),r}_resetKeepAliveInterval(){this.connection.features.inherentKeepAlive||(this._nextKeepAlive=new Date().getTime()+this.keepAliveIntervalInMilliseconds,this._cleanupPingTimer())}_resetTimeoutPeriod(){if(!this.connection.features||!this.connection.features.inherentKeepAlive){this._timeoutHandle=setTimeout(()=>this.serverTimeout(),this.serverTimeoutInMilliseconds);let e=this._nextKeepAlive-new Date().getTime();if(e<0){this._connectionState===Ge.Connected&&this._trySendPingMessage();return}this._pingServerHandle===void 0&&(e<0&&(e=0),this._pingServerHandle=setTimeout(async()=>{this._connectionState===Ge.Connected&&await this._trySendPingMessage()},e))}}serverTimeout(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))}async _invokeClientMethod(e){const n=e.target.toLowerCase(),r=this._methods[n];if(!r){this._logger.log(N.Warning,`No client method with the name '${n}' found.`),e.invocationId&&(this._logger.log(N.Warning,`No result given for '${n}' method and invocation ID '${e.invocationId}'.`),await this._sendWithProtocol(this._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null)));return}const i=r.slice(),o=!!e.invocationId;let s,a,c;for(const u of i)try{const l=s;s=await u.apply(this,e.arguments),o&&s&&l&&(this._logger.log(N.Error,`Multiple results provided for '${n}'. Sending error to server.`),c=this._createCompletionMessage(e.invocationId,"Client provided multiple results.",null)),a=void 0}catch(l){a=l,this._logger.log(N.Error,`A callback for the method '${n}' threw error '${l}'.`)}c?await this._sendWithProtocol(c):o?(a?c=this._createCompletionMessage(e.invocationId,`${a}`,null):s!==void 0?c=this._createCompletionMessage(e.invocationId,null,s):(this._logger.log(N.Warning,`No result given for '${n}' method and invocation ID '${e.invocationId}'.`),c=this._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null)),await this._sendWithProtocol(c)):s&&this._logger.log(N.Error,`Result given for '${n}' method but server is not expecting a result.`)}_connectionClosed(e){this._logger.log(N.Debug,`HubConnection.connectionClosed(${e}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||e||new Pn("The underlying connection was closed before the hub handshake could complete."),this._handshakeResolver&&this._handshakeResolver(),this._cancelCallbacksWithError(e||new Error("Invocation canceled due to the underlying connection being closed.")),this._cleanupTimeout(),this._cleanupPingTimer(),this._connectionState===Ge.Disconnecting?this._completeClose(e):this._connectionState===Ge.Connected&&this._reconnectPolicy?this._reconnect(e):this._connectionState===Ge.Connected&&this._completeClose(e)}_completeClose(e){if(this._connectionStarted){this._connectionState=Ge.Disconnected,this._connectionStarted=!1,this._messageBuffer&&(this._messageBuffer._dispose(e??new Error("Connection closed.")),this._messageBuffer=void 0),rt.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach(n=>n.apply(this,[e]))}catch(n){this._logger.log(N.Error,`An onclose callback called with error '${e}' threw error '${n}'.`)}}}async _reconnect(e){const n=Date.now();let r=0,i=e!==void 0?e:new Error("Attempting to reconnect due to a unknown error."),o=this._getNextRetryDelay(r,0,i);if(o===null){this._logger.log(N.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),this._completeClose(e);return}if(this._connectionState=Ge.Reconnecting,e?this._logger.log(N.Information,`Connection reconnecting because of error '${e}'.`):this._logger.log(N.Information,"Connection reconnecting."),this._reconnectingCallbacks.length!==0){try{this._reconnectingCallbacks.forEach(s=>s.apply(this,[e]))}catch(s){this._logger.log(N.Error,`An onreconnecting callback called with error '${e}' threw error '${s}'.`)}if(this._connectionState!==Ge.Reconnecting){this._logger.log(N.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.");return}}for(;o!==null;){if(this._logger.log(N.Information,`Reconnect attempt number ${r+1} will start in ${o} ms.`),await new Promise(s=>{this._reconnectDelayHandle=setTimeout(s,o)}),this._reconnectDelayHandle=void 0,this._connectionState!==Ge.Reconnecting){this._logger.log(N.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");return}try{if(await this._startInternal(),this._connectionState=Ge.Connected,this._logger.log(N.Information,"HubConnection reconnected successfully."),this._reconnectedCallbacks.length!==0)try{this._reconnectedCallbacks.forEach(s=>s.apply(this,[this.connection.connectionId]))}catch(s){this._logger.log(N.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${s}'.`)}return}catch(s){if(this._logger.log(N.Information,`Reconnect attempt failed because of error '${s}'.`),this._connectionState!==Ge.Reconnecting){this._logger.log(N.Debug,`Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`),this._connectionState===Ge.Disconnecting&&this._completeClose();return}r++,i=s instanceof Error?s:new Error(s.toString()),o=this._getNextRetryDelay(r,Date.now()-n,i)}}this._logger.log(N.Information,`Reconnect retries have been exhausted after ${Date.now()-n} ms and ${r} failed attempts. Connection disconnecting.`),this._completeClose()}_getNextRetryDelay(e,n,r){try{return this._reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:n,previousRetryCount:e,retryReason:r})}catch(i){return this._logger.log(N.Error,`IRetryPolicy.nextRetryDelayInMilliseconds(${e}, ${n}) threw error '${i}'.`),null}}_cancelCallbacksWithError(e){const n=this._callbacks;this._callbacks={},Object.keys(n).forEach(r=>{const i=n[r];try{i(null,e)}catch(o){this._logger.log(N.Error,`Stream 'error' callback called with '${e}' threw error: ${rf(o)}`)}})}_cleanupPingTimer(){this._pingServerHandle&&(clearTimeout(this._pingServerHandle),this._pingServerHandle=void 0)}_cleanupTimeout(){this._timeoutHandle&&clearTimeout(this._timeoutHandle)}_createInvocation(e,n,r,i){if(r)return i.length!==0?{target:e,arguments:n,streamIds:i,type:Se.Invocation}:{target:e,arguments:n,type:Se.Invocation};{const o=this._invocationId;return this._invocationId++,i.length!==0?{target:e,arguments:n,invocationId:o.toString(),streamIds:i,type:Se.Invocation}:{target:e,arguments:n,invocationId:o.toString(),type:Se.Invocation}}}_launchStreams(e,n){if(e.length!==0){n||(n=Promise.resolve());for(const r in e)e[r].subscribe({complete:()=>{n=n.then(()=>this._sendWithProtocol(this._createCompletionMessage(r)))},error:i=>{let o;i instanceof Error?o=i.message:i&&i.toString?o=i.toString():o="Unknown error",n=n.then(()=>this._sendWithProtocol(this._createCompletionMessage(r,o)))},next:i=>{n=n.then(()=>this._sendWithProtocol(this._createStreamItemMessage(r,i)))}})}}_replaceStreamingParams(e){const n=[],r=[];for(let i=0;i<e.length;i++){const o=e[i];if(this._isObservable(o)){const s=this._invocationId;this._invocationId++,n[s]=o,r.push(s.toString()),e.splice(i,1)}}return[n,r]}_isObservable(e){return e&&e.subscribe&&typeof e.subscribe=="function"}_createStreamInvocation(e,n,r){const i=this._invocationId;return this._invocationId++,r.length!==0?{target:e,arguments:n,invocationId:i.toString(),streamIds:r,type:Se.StreamInvocation}:{target:e,arguments:n,invocationId:i.toString(),type:Se.StreamInvocation}}_createCancelInvocation(e){return{invocationId:e,type:Se.CancelInvocation}}_createStreamItemMessage(e,n){return{invocationId:e,item:n,type:Se.StreamItem}}_createCompletionMessage(e,n,r){return n?{error:n,invocationId:e,type:Se.Completion}:{invocationId:e,result:r,type:Se.Completion}}_createCloseMessage(){return{type:Se.Close}}async _trySendPingMessage(){try{await this._sendMessage(this._cachedPingMessage)}catch{this._cleanupPingTimer()}}}const w0=[0,2e3,1e4,3e4,null];class pg{constructor(e){this._retryDelays=e!==void 0?[...e,null]:w0}nextRetryDelayInMilliseconds(e){return this._retryDelays[e.previousRetryCount]}}class Zi{}Zi.Authorization="Authorization";Zi.Cookie="Cookie";class S0 extends Al{constructor(e,n){super(),this._innerClient=e,this._accessTokenFactory=n}async send(e){let n=!0;this._accessTokenFactory&&(!this._accessToken||e.url&&e.url.indexOf("/negotiate?")>0)&&(n=!1,this._accessToken=await this._accessTokenFactory()),this._setAuthorizationHeader(e);const r=await this._innerClient.send(e);return n&&r.statusCode===401&&this._accessTokenFactory?(this._accessToken=await this._accessTokenFactory(),this._setAuthorizationHeader(e),await this._innerClient.send(e)):r}_setAuthorizationHeader(e){e.headers||(e.headers={}),this._accessToken?e.headers[Zi.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&e.headers[Zi.Authorization]&&delete e.headers[Zi.Authorization]}getCookieString(e){return this._innerClient.getCookieString(e)}}var lt;(function(t){t[t.None=0]="None",t[t.WebSockets=1]="WebSockets",t[t.ServerSentEvents=2]="ServerSentEvents",t[t.LongPolling=4]="LongPolling"})(lt||(lt={}));var Rt;(function(t){t[t.Text=1]="Text",t[t.Binary=2]="Binary"})(Rt||(Rt={}));let I0=class{constructor(){this._isAborted=!1,this.onabort=null}abort(){this._isAborted||(this._isAborted=!0,this.onabort&&this.onabort())}get signal(){return this}get aborted(){return this._isAborted}};class gg{get pollAborted(){return this._pollAbort.aborted}constructor(e,n,r){this._httpClient=e,this._logger=n,this._pollAbort=new I0,this._options=r,this._running=!1,this.onreceive=null,this.onclose=null}async connect(e,n){if(ht.isRequired(e,"url"),ht.isRequired(n,"transferFormat"),ht.isIn(n,Rt,"transferFormat"),this._url=e,this._logger.log(N.Trace,"(LongPolling transport) Connecting."),n===Rt.Binary&&typeof XMLHttpRequest<"u"&&typeof new XMLHttpRequest().responseType!="string")throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");const[r,i]=Ms(),o={[r]:i,...this._options.headers},s={abortSignal:this._pollAbort.signal,headers:o,timeout:1e5,withCredentials:this._options.withCredentials};n===Rt.Binary&&(s.responseType="arraybuffer");const a=`${e}&_=${Date.now()}`;this._logger.log(N.Trace,`(LongPolling transport) polling: ${a}.`);const c=await this._httpClient.get(a,s);c.statusCode!==200?(this._logger.log(N.Error,`(LongPolling transport) Unexpected response code: ${c.statusCode}.`),this._closeError=new Qi(c.statusText||"",c.statusCode),this._running=!1):this._running=!0,this._receiving=this._poll(this._url,s)}async _poll(e,n){try{for(;this._running;)try{const r=`${e}&_=${Date.now()}`;this._logger.log(N.Trace,`(LongPolling transport) polling: ${r}.`);const i=await this._httpClient.get(r,n);i.statusCode===204?(this._logger.log(N.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):i.statusCode!==200?(this._logger.log(N.Error,`(LongPolling transport) Unexpected response code: ${i.statusCode}.`),this._closeError=new Qi(i.statusText||"",i.statusCode),this._running=!1):i.content?(this._logger.log(N.Trace,`(LongPolling transport) data received. ${qa(i.content,this._options.logMessageContent)}.`),this.onreceive&&this.onreceive(i.content)):this._logger.log(N.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(r){this._running?r instanceof cp?this._logger.log(N.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=r,this._running=!1):this._logger.log(N.Trace,`(LongPolling transport) Poll errored after shutdown: ${r.message}`)}}finally{this._logger.log(N.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose()}}async send(e){return this._running?km(this._logger,"LongPolling",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}async stop(){this._logger.log(N.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();try{await this._receiving,this._logger.log(N.Trace,`(LongPolling transport) sending DELETE request to ${this._url}.`);const e={},[n,r]=Ms();e[n]=r;const i={headers:{...e,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials};let o;try{await this._httpClient.delete(this._url,i)}catch(s){o=s}o?o instanceof Qi&&(o.statusCode===404?this._logger.log(N.Trace,"(LongPolling transport) A 404 response was returned from sending a DELETE request."):this._logger.log(N.Trace,`(LongPolling transport) Error sending a DELETE request: ${o}`)):this._logger.log(N.Trace,"(LongPolling transport) DELETE request accepted.")}finally{this._logger.log(N.Trace,"(LongPolling transport) Stop finished."),this._raiseOnClose()}}_raiseOnClose(){if(this.onclose){let e="(LongPolling transport) Firing onclose event.";this._closeError&&(e+=" Error: "+this._closeError),this._logger.log(N.Trace,e),this.onclose(this._closeError)}}}class k0{constructor(e,n,r,i){this._httpClient=e,this._accessToken=n,this._logger=r,this._options=i,this.onreceive=null,this.onclose=null}async connect(e,n){return ht.isRequired(e,"url"),ht.isRequired(n,"transferFormat"),ht.isIn(n,Rt,"transferFormat"),this._logger.log(N.Trace,"(SSE transport) Connecting."),this._url=e,this._accessToken&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(this._accessToken)}`),new Promise((r,i)=>{let o=!1;if(n!==Rt.Text){i(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"));return}let s;if(rt.isBrowser||rt.isWebWorker)s=new this._options.EventSource(e,{withCredentials:this._options.withCredentials});else{const a=this._httpClient.getCookieString(e),c={};c.Cookie=a;const[u,l]=Ms();c[u]=l,s=new this._options.EventSource(e,{withCredentials:this._options.withCredentials,headers:{...c,...this._options.headers}})}try{s.onmessage=a=>{if(this.onreceive)try{this._logger.log(N.Trace,`(SSE transport) data received. ${qa(a.data,this._options.logMessageContent)}.`),this.onreceive(a.data)}catch(c){this._close(c);return}},s.onerror=a=>{o?this._close():i(new Error("EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled."))},s.onopen=()=>{this._logger.log(N.Information,`SSE connected to ${this._url}`),this._eventSource=s,o=!0,r()}}catch(a){i(a);return}})}async send(e){return this._eventSource?km(this._logger,"SSE",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}stop(){return this._close(),Promise.resolve()}_close(e){this._eventSource&&(this._eventSource.close(),this._eventSource=void 0,this.onclose&&this.onclose(e))}}class T0{constructor(e,n,r,i,o,s){this._logger=r,this._accessTokenFactory=n,this._logMessageContent=i,this._webSocketConstructor=o,this._httpClient=e,this.onreceive=null,this.onclose=null,this._headers=s}async connect(e,n){ht.isRequired(e,"url"),ht.isRequired(n,"transferFormat"),ht.isIn(n,Rt,"transferFormat"),this._logger.log(N.Trace,"(WebSockets transport) Connecting.");let r;return this._accessTokenFactory&&(r=await this._accessTokenFactory()),new Promise((i,o)=>{e=e.replace(/^http/,"ws");let s;const a=this._httpClient.getCookieString(e);let c=!1;if(rt.isNode||rt.isReactNative){const u={},[l,f]=Ms();u[l]=f,r&&(u[Zi.Authorization]=`Bearer ${r}`),a&&(u[Zi.Cookie]=a),s=new this._webSocketConstructor(e,void 0,{headers:{...u,...this._headers}})}else r&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(r)}`);s||(s=new this._webSocketConstructor(e)),n===Rt.Binary&&(s.binaryType="arraybuffer"),s.onopen=u=>{this._logger.log(N.Information,`WebSocket connected to ${e}.`),this._webSocket=s,c=!0,i()},s.onerror=u=>{let l=null;typeof ErrorEvent<"u"&&u instanceof ErrorEvent?l=u.error:l="There was an error with the transport",this._logger.log(N.Information,`(WebSockets transport) ${l}.`)},s.onmessage=u=>{if(this._logger.log(N.Trace,`(WebSockets transport) data received. ${qa(u.data,this._logMessageContent)}.`),this.onreceive)try{this.onreceive(u.data)}catch(l){this._close(l);return}},s.onclose=u=>{if(c)this._close(u);else{let l=null;typeof ErrorEvent<"u"&&u instanceof ErrorEvent?l=u.error:l="WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.",o(new Error(l))}}})}send(e){return this._webSocket&&this._webSocket.readyState===this._webSocketConstructor.OPEN?(this._logger.log(N.Trace,`(WebSockets transport) sending data. ${qa(e,this._logMessageContent)}.`),this._webSocket.send(e),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")}stop(){return this._webSocket&&this._close(void 0),Promise.resolve()}_close(e){this._webSocket&&(this._webSocket.onclose=()=>{},this._webSocket.onmessage=()=>{},this._webSocket.onerror=()=>{},this._webSocket.close(),this._webSocket=void 0),this._logger.log(N.Trace,"(WebSockets transport) socket closed."),this.onclose&&(this._isCloseEvent(e)&&(e.wasClean===!1||e.code!==1e3)?this.onclose(new Error(`WebSocket closed with status code: ${e.code} (${e.reason||"no reason given"}).`)):e instanceof Error?this.onclose(e):this.onclose())}_isCloseEvent(e){return e&&typeof e.wasClean=="boolean"&&typeof e.code=="number"}}const vg=100;class E0{constructor(e,n={}){if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,ht.isRequired(e,"url"),this._logger=o0(n.logger),this.baseUrl=this._resolveUrl(e),n=n||{},n.logMessageContent=n.logMessageContent===void 0?!1:n.logMessageContent,typeof n.withCredentials=="boolean"||n.withCredentials===void 0)n.withCredentials=n.withCredentials===void 0?!0:n.withCredentials;else throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");n.timeout=n.timeout===void 0?100*1e3:n.timeout;let r=null,i=null;if(rt.isNode&&typeof require<"u"){const o=typeof __webpack_require__=="function"?__non_webpack_require__:require;r=o("ws"),i=o("eventsource")}!rt.isNode&&typeof WebSocket<"u"&&!n.WebSocket?n.WebSocket=WebSocket:rt.isNode&&!n.WebSocket&&r&&(n.WebSocket=r),!rt.isNode&&typeof EventSource<"u"&&!n.EventSource?n.EventSource=EventSource:rt.isNode&&!n.EventSource&&typeof i<"u"&&(n.EventSource=i),this._httpClient=new S0(n.httpClient||new p0(this._logger),n.accessTokenFactory),this._connectionState="Disconnected",this._connectionStarted=!1,this._options=n,this.onreceive=null,this.onclose=null}async start(e){if(e=e||Rt.Binary,ht.isIn(e,Rt,"transferFormat"),this._logger.log(N.Debug,`Starting connection with transfer format '${Rt[e]}'.`),this._connectionState!=="Disconnected")return Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."));if(this._connectionState="Connecting",this._startInternalPromise=this._startInternal(e),await this._startInternalPromise,this._connectionState==="Disconnecting"){const n="Failed to start the HttpConnection before stop() was called.";return this._logger.log(N.Error,n),await this._stopPromise,Promise.reject(new Pn(n))}else if(this._connectionState!=="Connected"){const n="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";return this._logger.log(N.Error,n),Promise.reject(new Pn(n))}this._connectionStarted=!0}send(e){return this._connectionState!=="Connected"?Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")):(this._sendQueue||(this._sendQueue=new lp(this.transport)),this._sendQueue.send(e))}async stop(e){if(this._connectionState==="Disconnected")return this._logger.log(N.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnected state.`),Promise.resolve();if(this._connectionState==="Disconnecting")return this._logger.log(N.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;this._connectionState="Disconnecting",this._stopPromise=new Promise(n=>{this._stopPromiseResolver=n}),await this._stopInternal(e),await this._stopPromise}async _stopInternal(e){this._stopError=e;try{await this._startInternalPromise}catch{}if(this.transport){try{await this.transport.stop()}catch(n){this._logger.log(N.Error,`HttpConnection.transport.stop() threw error '${n}'.`),this._stopConnection()}this.transport=void 0}else this._logger.log(N.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.")}async _startInternal(e){let n=this.baseUrl;this._accessTokenFactory=this._options.accessTokenFactory,this._httpClient._accessTokenFactory=this._accessTokenFactory;try{if(this._options.skipNegotiation)if(this._options.transport===lt.WebSockets)this.transport=this._constructTransport(lt.WebSockets),await this._startTransport(n,e);else throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");else{let r=null,i=0;do{if(r=await this._getNegotiationResponse(n),this._connectionState==="Disconnecting"||this._connectionState==="Disconnected")throw new Pn("The connection was stopped during negotiation.");if(r.error)throw new Error(r.error);if(r.ProtocolVersion)throw new Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.");if(r.url&&(n=r.url),r.accessToken){const o=r.accessToken;this._accessTokenFactory=()=>o,this._httpClient._accessToken=o,this._httpClient._accessTokenFactory=void 0}i++}while(r.url&&i<vg);if(i===vg&&r.url)throw new Error("Negotiate redirection limit exceeded.");await this._createTransport(n,this._options.transport,r,e)}this.transport instanceof gg&&(this.features.inherentKeepAlive=!0),this._connectionState==="Connecting"&&(this._logger.log(N.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected")}catch(r){return this._logger.log(N.Error,"Failed to start the connection: "+r),this._connectionState="Disconnected",this.transport=void 0,this._stopPromiseResolver(),Promise.reject(r)}}async _getNegotiationResponse(e){const n={},[r,i]=Ms();n[r]=i;const o=this._resolveNegotiateUrl(e);this._logger.log(N.Debug,`Sending negotiation request: ${o}.`);try{const s=await this._httpClient.post(o,{content:"",headers:{...n,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials});if(s.statusCode!==200)return Promise.reject(new Error(`Unexpected status code returned from negotiate '${s.statusCode}'`));const a=JSON.parse(s.content);return(!a.negotiateVersion||a.negotiateVersion<1)&&(a.connectionToken=a.connectionId),a.useStatefulReconnect&&this._options._useStatefulReconnect!==!0?Promise.reject(new dg("Client didn't negotiate Stateful Reconnect but the server did.")):a}catch(s){let a="Failed to complete negotiation with the server: "+s;return s instanceof Qi&&s.statusCode===404&&(a=a+" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(N.Error,a),Promise.reject(new dg(a))}}_createConnectUrl(e,n){return n?e+(e.indexOf("?")===-1?"?":"&")+`id=${n}`:e}async _createTransport(e,n,r,i){let o=this._createConnectUrl(e,r.connectionToken);if(this._isITransport(n)){this._logger.log(N.Debug,"Connection was provided an instance of ITransport, using that directly."),this.transport=n,await this._startTransport(o,i),this.connectionId=r.connectionId;return}const s=[],a=r.availableTransports||[];let c=r;for(const u of a){const l=this._resolveTransportOrError(u,n,i,(c==null?void 0:c.useStatefulReconnect)===!0);if(l instanceof Error)s.push(`${u.transport} failed:`),s.push(l);else if(this._isITransport(l)){if(this.transport=l,!c){try{c=await this._getNegotiationResponse(e)}catch(f){return Promise.reject(f)}o=this._createConnectUrl(e,c.connectionToken)}try{await this._startTransport(o,i),this.connectionId=c.connectionId;return}catch(f){if(this._logger.log(N.Error,`Failed to start the transport '${u.transport}': ${f}`),c=void 0,s.push(new t0(`${u.transport} failed: ${f}`,lt[u.transport])),this._connectionState!=="Connecting"){const m="Failed to select transport before stop() was called.";return this._logger.log(N.Debug,m),Promise.reject(new Pn(m))}}}}return s.length>0?Promise.reject(new n0(`Unable to connect to the server with any of the available transports. ${s.join(" ")}`,s)):Promise.reject(new Error("None of the transports supported by the client are supported by the server."))}_constructTransport(e){switch(e){case lt.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new T0(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case lt.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new k0(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case lt.LongPolling:return new gg(this._httpClient,this._logger,this._options);default:throw new Error(`Unknown transport: ${e}.`)}}_startTransport(e,n){return this.transport.onreceive=this.onreceive,this.features.reconnect?this.transport.onclose=async r=>{let i=!1;if(this.features.reconnect)try{this.features.disconnected(),await this.transport.connect(e,n),await this.features.resend()}catch{i=!0}else{this._stopConnection(r);return}i&&this._stopConnection(r)}:this.transport.onclose=r=>this._stopConnection(r),this.transport.connect(e,n)}_resolveTransportOrError(e,n,r,i){const o=lt[e.transport];if(o==null)return this._logger.log(N.Debug,`Skipping transport '${e.transport}' because it is not supported by this client.`),new Error(`Skipping transport '${e.transport}' because it is not supported by this client.`);if(x0(n,o))if(e.transferFormats.map(a=>Rt[a]).indexOf(r)>=0){if(o===lt.WebSockets&&!this._options.WebSocket||o===lt.ServerSentEvents&&!this._options.EventSource)return this._logger.log(N.Debug,`Skipping transport '${lt[o]}' because it is not supported in your environment.'`),new Y_(`'${lt[o]}' is not supported in your environment.`,o);this._logger.log(N.Debug,`Selecting transport '${lt[o]}'.`);try{return this.features.reconnect=o===lt.WebSockets?i:void 0,this._constructTransport(o)}catch(a){return a}}else return this._logger.log(N.Debug,`Skipping transport '${lt[o]}' because it does not support the requested transfer format '${Rt[r]}'.`),new Error(`'${lt[o]}' does not support ${Rt[r]}.`);else return this._logger.log(N.Debug,`Skipping transport '${lt[o]}' because it was disabled by the client.`),new e0(`'${lt[o]}' is disabled by the client.`,o)}_isITransport(e){return e&&typeof e=="object"&&"connect"in e}_stopConnection(e){if(this._logger.log(N.Debug,`HttpConnection.stopConnection(${e}) called while in state ${this._connectionState}.`),this.transport=void 0,e=this._stopError||e,this._stopError=void 0,this._connectionState==="Disconnected"){this._logger.log(N.Debug,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is already in the disconnected state.`);return}if(this._connectionState==="Connecting")throw this._logger.log(N.Warning,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is still in the connecting state.`),new Error(`HttpConnection.stopConnection(${e}) was called while the connection is still in the connecting state.`);if(this._connectionState==="Disconnecting"&&this._stopPromiseResolver(),e?this._logger.log(N.Error,`Connection disconnected with error '${e}'.`):this._logger.log(N.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch(n=>{this._logger.log(N.Error,`TransportSendQueue.stop() threw error '${n}'.`)}),this._sendQueue=void 0),this.connectionId=void 0,this._connectionState="Disconnected",this._connectionStarted){this._connectionStarted=!1;try{this.onclose&&this.onclose(e)}catch(n){this._logger.log(N.Error,`HttpConnection.onclose(${e}) threw error '${n}'.`)}}}_resolveUrl(e){if(e.lastIndexOf("https://",0)===0||e.lastIndexOf("http://",0)===0)return e;if(!rt.isBrowser)throw new Error(`Cannot resolve '${e}'.`);const n=window.document.createElement("a");return n.href=e,this._logger.log(N.Information,`Normalizing '${e}' to '${n.href}'.`),n.href}_resolveNegotiateUrl(e){const n=new URL(e);n.pathname.endsWith("/")?n.pathname+="negotiate":n.pathname+="/negotiate";const r=new URLSearchParams(n.searchParams);return r.has("negotiateVersion")||r.append("negotiateVersion",this._negotiateVersion.toString()),r.has("useStatefulReconnect")?r.get("useStatefulReconnect")==="true"&&(this._options._useStatefulReconnect=!0):this._options._useStatefulReconnect===!0&&r.append("useStatefulReconnect","true"),n.search=r.toString(),n.toString()}}function x0(t,e){return!t||(e&t)!==0}class lp{constructor(e){this._transport=e,this._buffer=[],this._executing=!0,this._sendBufferedData=new kc,this._transportResult=new kc,this._sendLoopPromise=this._sendLoop()}send(e){return this._bufferData(e),this._transportResult||(this._transportResult=new kc),this._transportResult.promise}stop(){return this._executing=!1,this._sendBufferedData.resolve(),this._sendLoopPromise}_bufferData(e){if(this._buffer.length&&typeof this._buffer[0]!=typeof e)throw new Error(`Expected data to be of type ${typeof this._buffer} but was of type ${typeof e}`);this._buffer.push(e),this._sendBufferedData.resolve()}async _sendLoop(){for(;;){if(await this._sendBufferedData.promise,!this._executing){this._transportResult&&this._transportResult.reject("Connection stopped.");break}this._sendBufferedData=new kc;const e=this._transportResult;this._transportResult=void 0;const n=typeof this._buffer[0]=="string"?this._buffer.join(""):lp._concatBuffers(this._buffer);this._buffer.length=0;try{await this._transport.send(n),e.resolve()}catch(r){e.reject(r)}}}static _concatBuffers(e){const n=e.map(o=>o.byteLength).reduce((o,s)=>o+s),r=new Uint8Array(n);let i=0;for(const o of e)r.set(new Uint8Array(o),i),i+=o.byteLength;return r.buffer}}class kc{constructor(){this.promise=new Promise((e,n)=>[this._resolver,this._rejecter]=[e,n])}resolve(){this._resolver()}reject(e){this._rejecter(e)}}const P0="json";class D0{constructor(){this.name=P0,this.version=2,this.transferFormat=Rt.Text}parseMessages(e,n){if(typeof e!="string")throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!e)return[];n===null&&(n=Va.instance);const r=rn.parse(e),i=[];for(const o of r){const s=JSON.parse(o);if(typeof s.type!="number")throw new Error("Invalid payload.");switch(s.type){case Se.Invocation:this._isInvocationMessage(s);break;case Se.StreamItem:this._isStreamItemMessage(s);break;case Se.Completion:this._isCompletionMessage(s);break;case Se.Ping:break;case Se.Close:break;case Se.Ack:this._isAckMessage(s);break;case Se.Sequence:this._isSequenceMessage(s);break;default:n.log(N.Information,"Unknown message type '"+s.type+"' ignored.");continue}i.push(s)}return i}writeMessage(e){return rn.write(JSON.stringify(e))}_isInvocationMessage(e){this._assertNotEmptyString(e.target,"Invalid payload for Invocation message."),e.invocationId!==void 0&&this._assertNotEmptyString(e.invocationId,"Invalid payload for Invocation message.")}_isStreamItemMessage(e){if(this._assertNotEmptyString(e.invocationId,"Invalid payload for StreamItem message."),e.item===void 0)throw new Error("Invalid payload for StreamItem message.")}_isCompletionMessage(e){if(e.result&&e.error)throw new Error("Invalid payload for Completion message.");!e.result&&e.error&&this._assertNotEmptyString(e.error,"Invalid payload for Completion message."),this._assertNotEmptyString(e.invocationId,"Invalid payload for Completion message.")}_isAckMessage(e){if(typeof e.sequenceId!="number")throw new Error("Invalid SequenceId for Ack message.")}_isSequenceMessage(e){if(typeof e.sequenceId!="number")throw new Error("Invalid SequenceId for Sequence message.")}_assertNotEmptyString(e,n){if(typeof e!="string"||e==="")throw new Error(n)}}const R0={trace:N.Trace,debug:N.Debug,info:N.Information,information:N.Information,warn:N.Warning,warning:N.Warning,error:N.Error,critical:N.Critical,none:N.None};function A0(t){const e=R0[t.toLowerCase()];if(typeof e<"u")return e;throw new Error(`Unknown log level: ${t}`)}class M0{configureLogging(e){if(ht.isRequired(e,"logging"),z0(e))this.logger=e;else if(typeof e=="string"){const n=A0(e);this.logger=new Eu(n)}else this.logger=new Eu(e);return this}withUrl(e,n){return ht.isRequired(e,"url"),ht.isNotEmpty(e,"url"),this.url=e,typeof n=="object"?this.httpConnectionOptions={...this.httpConnectionOptions,...n}:this.httpConnectionOptions={...this.httpConnectionOptions,transport:n},this}withHubProtocol(e){return ht.isRequired(e,"protocol"),this.protocol=e,this}withAutomaticReconnect(e){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return e?Array.isArray(e)?this.reconnectPolicy=new pg(e):this.reconnectPolicy=e:this.reconnectPolicy=new pg,this}withServerTimeout(e){return ht.isRequired(e,"milliseconds"),this._serverTimeoutInMilliseconds=e,this}withKeepAliveInterval(e){return ht.isRequired(e,"milliseconds"),this._keepAliveIntervalInMilliseconds=e,this}withStatefulReconnect(e){return this.httpConnectionOptions===void 0&&(this.httpConnectionOptions={}),this.httpConnectionOptions._useStatefulReconnect=!0,this._statefulReconnectBufferSize=e==null?void 0:e.bufferSize,this}build(){const e=this.httpConnectionOptions||{};if(e.logger===void 0&&(e.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");const n=new E0(this.url,e);return up.create(n,this.logger||Va.instance,this.protocol||new D0,this.reconnectPolicy,this._serverTimeoutInMilliseconds,this._keepAliveIntervalInMilliseconds,this._statefulReconnectBufferSize)}}function z0(t){return t.log!==void 0}const mg=t=>{if(typeof t=="object"&&t!==null){if(typeof Object.getPrototypeOf=="function"){const e=Object.getPrototypeOf(t);return e===Object.prototype||e===null}return Object.prototype.toString.call(t)==="[object Object]"}return!1},Vn=(...t)=>t.reduce((e,n)=>{if(Array.isArray(n))throw new TypeError("Arguments provided to ts-deepmerge must be objects, not arrays.");return Object.keys(n).forEach(r=>{["__proto__","constructor","prototype"].includes(r)||(Array.isArray(e[r])&&Array.isArray(n[r])?e[r]=Vn.options.mergeArrays?Vn.options.uniqueArrayItems?Array.from(new Set(e[r].concat(n[r]))):[...e[r],...n[r]]:n[r]:mg(e[r])&&mg(n[r])?e[r]=Vn(e[r],n[r]):e[r]=n[r]===void 0?Vn.options.allowUndefinedOverrides?n[r]:e[r]:n[r])}),e},{}),Ad={allowUndefinedOverrides:!0,mergeArrays:!0,uniqueArrayItems:!0};Vn.options=Ad;Vn.withOptions=(t,...e)=>{Vn.options=Object.assign(Object.assign({},Ad),t);const n=Vn(...e);return Vn.options=Ad,n};var U0=Object.defineProperty,Tm=t=>{throw TypeError(t)},N0=(t,e,n)=>e in t?U0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,lo=(t,e,n)=>N0(t,typeof e!="symbol"?e+"":e,n),fp=(t,e,n)=>e.has(t)||Tm("Cannot "+n),w=(t,e,n)=>(fp(t,e,"read from private field"),n?n.call(t):e.get(t)),le=(t,e,n)=>e.has(t)?Tm("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),Me=(t,e,n,r)=>(fp(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),on=(t,e,n)=>(fp(t,e,"access private method"),n),$0=(t,e,n,r)=>({set _(i){Me(t,e,i,n)},get _(){return w(t,e,r)}});const O0="0.0.2-alpha6",vs={Text:"Text",Number:"Number",Logic:"Logic"},sn={ValueComponent:"ValueComponent",TableComponent:"TableComponent",RecordComponent:"RecordComponent",ResourceComponent:"ResourceComponent",GraphicComponent:"GraphicComponent",CheckoutComponent:"CheckoutComponent"},F0=t=>Object.values(sn).includes(t),j0=[sn.GraphicComponent,sn.CheckoutComponent,sn.ResourceComponent,sn.RecordComponent],gn={ValueEditor:"ValueEditor",TableEditor:"TableEditor",Fiber:"Fiber",FiberEditor:"FiberEditor",CfgrField:"CfgrField"},L0=k.z.enum([gn.ValueEditor,gn.TableEditor,gn.Fiber,gn.FiberEditor,gn.CfgrField]),Tc={Fiber:"fiber",CfgrField:"cfgrField"},ur={CtrlFibers:"CtrlFibers"};function eu(t){try{return[null,t()]}catch(e){if(e instanceof Error)return[e,null];throw e}}async function ms(t){try{return[null,await t]}catch(e){if(e instanceof Error)return[e,null];throw e}}function Ml(t){return eu(()=>JSON.parse(t))}const Mr=t=>typeof t=="string",W0=t=>t===void 0||t==null||t===""||It(t)&&t.length===0,It=t=>Array.isArray(t),_r=t=>Object.prototype.toString.call(t)==="[object Object]",Md=async t=>new Promise(e=>setTimeout(e,t)),Em=k.z.string(),V0=k.z.enum([vs.Text,vs.Number,vs.Logic]),q0=t=>V0.safeParse(t).success,xm=k.z.string(),H0=t=>xm.safeParse(t).success,B0=k.z.custom(t=>Mr(t)&&t.toLowerCase()===t),Ls=t=>(t==null?void 0:t.toLowerCase())??"",Pm=k.z.string(),K0=k.z.custom(t=>Mr(t)?new RegExp(`^${sn.ValueComponent}<.*>$`).test(t):!1),X0=k.z.custom(t=>Mr(t)?new RegExp(`^${sn.RecordComponent}<.*>$`).test(t):!1),G0=k.z.custom(t=>Mr(t)?new RegExp(`^${sn.ResourceComponent}<.*>$`).test(t):!1),J0=k.z.custom(t=>Mr(t)?new RegExp(`^${sn.TableComponent}<.*>$`).test(t):!1),Dm=k.z.union([K0,J0,X0,G0,k.z.literal(sn.GraphicComponent),k.z.literal(sn.CheckoutComponent)]),yg=k.z.union([k.z.string(),k.z.number(),k.z.boolean()]),Rm=k.z.union([yg,k.z.array(yg),k.z.object({}),k.z.unknown()]),dp=k.z.object({$typ:k.z.literal("Error"),Id:k.z.string(),Message:k.z.string(),route:k.z.unknown().optional()}),bg=t=>dp.safeParse(t).success,Am=dp.or(Rm),zd=new Map;function Q0(t){const e=Ls(t.name);zd.has(e)||zd.set(e,t)}function Mm(t){const e=Ls(t);return zd.get(e)}class hp{constructor(e,n){lo(this,"name"),lo(this,"zodType"),this.name=e,this.zodType=n,Q0(this)}async getValue(){return await lg().getCmpValue(this.name)}async setInput(e){const n=Ls(this.name);await Yc().setCmpInput(n,e,this.zodType)}onValueChanged(e,n=!1,r){lg().onCmpValueChanged(this.name,e,r,n)}}const Z0=k.z.number().transform(t=>t*1e3).pipe(k.z.coerce.date());function zm(t){return t._def.typeName===k.z.ZodFirstPartyTypeKind.ZodArray}function Um(t){return t._def.typeName===k.z.ZodFirstPartyTypeKind.ZodObject}function Y0(t){const[,e]=Ml(t.description??"{}");return e?e.elementity:!1}const Nm={green:"#36D792",yellow:"#D19A66",red:"red"};function $m(t,e){return t&&e?`[${t}.${e}]`:t?`[${t}]`:e?`[${e}]`:""}function Je(t,e,n="",r,i="green"){const o=$m(t,e),s=Nm[i]??"inherit";console.log(`%c${o}%c ${n}`,`color: ${s}`,"color: inherit",r)}function et(t,e,n="",r,i="green"){const o=$m(t,e),s=Nm[i]??"inherit";console.error(`%c${o}%c ${n}`,`color: ${s}`,"color: inherit",r)}const eC=t=>_r(t)&&Object.values(t).every(e=>_r(e)&&"$key"in e&&"$idx"in e&&"definition"in e),Om=[{open:"List<",openReplace:"[",closeReplace:"]"},{open:"Table<",openReplace:"[",closeReplace:"]"},{open:`${sn.ValueComponent}<`,openReplace:`"${sn.ValueComponent}<`,closeReplace:'>"',preventInnerParsing:!0,allowInnerParsingOnRootLevel:!0},{open:"RecordComponent<",openReplace:'"RecordComponent<',closeReplace:'>"',preventInnerParsing:!0,allowInnerParsingOnRootLevel:!0},{open:"TableComponent<",openReplace:'"TableComponent<',closeReplace:'>"',preventInnerParsing:!0,allowInnerParsingOnRootLevel:!0},{open:"ResourceComponent<",openReplace:'"ResourceComponent<',closeReplace:'>"',preventInnerParsing:!0},{open:"ComposedVisual<",openReplace:'"ComposedVisual<',closeReplace:'>"',preventInnerParsing:!0},{open:"DynamicVisual<",openReplace:'"DynamicVisual<',closeReplace:'>"',preventInnerParsing:!0},{open:"Map<",openReplace:'"Map<',closeReplace:'>"',preventInnerParsing:!0},{open:"DataSource<",openReplace:'"DataSource<',closeReplace:'>"',preventInnerParsing:!0},{open:"Resource<",openReplace:"{",closeReplace:"}"},{open:"Record<{",openReplace:"{",closeReplace:""}];function tC(t){let e=1;for(let n=0;n<t.length;n++)if(t[n]==="<"?e++:t[n]===">"&&e--,e===0)return n;return-1}function Fm(t){const e=[",","}",">"],n=/=|,|<|{|}|]/,r="!!TYPEPLACEHOLDER!!";if(t.indexOf("=")===-1)return'"'+t+'"';let i="",o=!1,s=0,a=t||"";for(;a.length>0;){const c=Om.find(u=>a.indexOf(u.open)===0);if(e.includes(a[0]))i+=a[0],a=a.slice(1);else if(c){a=a.slice(c.open.length);const u=tC(a),l=c.preventInnerParsing?a.substring(0,u):Fm(a.substring(0,u)),f=c.openReplace+l+c.closeReplace;i=i.length>0?i.replace(r,f):f,a=a.slice(u+1),o=!1}else if(o){const u=a.search(n);u>0?(i=i.replace(r,'"'+a.substring(0,u)+'"')+a[u],a=a.slice(u+1)):(et("HiveUtils","_parseHiveTypeToJsonStr","Fallback: Full remaining string appended. Possible parsing issue!",{errorName:"Hive type to JSON - parsing issue",jsonObj:{typeDefinition:t}}),i+=a,a=""),o=!1}else{const u=a.indexOf("="),l=a.substring(0,u).trim();i+=`"${l}":{ "$key": "${l}", "$idx": ${s}, "definition": ${r} }`,s++,a=a.slice(u+1),o=!0}}return i}function Ud(t,e,n,r=n){if(!_r(t)&&!It(t))return t;const i=zm(e);if(It(t)&&i)return[Ud(t[0],e.element,n,r)];if(It(t)||i)return et("HiveUtils","_recursiveHiveSchemaMapping","Type mismatch because either the schema or the type expects an array!",{cmpName:n,propertyPath:r,hive:t,zod:JSON.stringify(e)}),t;if(!Um(e))return et("HiveUtils","_recursiveHiveSchemaMapping","Generated schema doesn't match the retrieved component type!",{cmpName:n,propertyPath:r,hive:t,zod:JSON.stringify(e)}),t;const o=Object.keys(e.shape).reduce((a,c)=>(a[c.toLowerCase()]=c,a),{}),s={};return Object.values(t).forEach(function(a){const c=a.$key.toLowerCase(),u=o[c];if(u){const l=e.shape[u];s[u]=a,s[u].$key=u,delete o[c];const f=r+"."+u,m=Ud(a.definition,l,u,f);s[u].definition=m}else s[a.$key]=a}),s}function _g(t){const e=t.match(/^(\w+)<.+>/),n=e&&2>=e.length?e[1]:t;if(!F0(n))throw et("HiveUtils","getBaseHiveType","Unknown base type found!",{type:t,baseType:n}),new Error(`Unknown base component type found: ${JSON.stringify({type:t,baseType:n})}`);return n}function jm(t,e){const n=(t||"").match(new RegExp("<(.+)>"));return n&&2>=n.length?n[1]:""}function nC(t){const e=t.indexOf("=")>-1,n=e&&Om.find(i=>t.indexOf(i.open)===0),r=n&&n.preventInnerParsing&&!n.allowInnerParsingOnRootLevel;return e&&!r}function rC(t,e,n){const r=jm(t)||t;let i=Lm(r);if(t.startsWith("TableComponent<")&&(i=[i]),!i){et("HiveUtils","parseAndMapSchema","Schema parsing not successful",{jsonObj:{type:r,fullType:t}});return}return i=Ud(i,e,n),i}function tu(t,e,n){const r=It(e),i=r&&It(t)&&(_r(e[0])||It(e[0]));if(W0(t)||r&&!i)return t;if(i)return t.map(s=>tu(s,e[0]));const o={};return Object.values(e.$key!==void 0?e.definition:e).forEach(function(s){const a=s.definition,c=t&&t[s.$idx];let u;It(a)&&_r(a[0])?(u=c==null?void 0:c.map(l=>tu(l,a[0])),JSON.stringify(a)):!It(a)&&_r(a)?(u=tu(c,a),JSON.stringify(a)):u=c,o[s.$key]=u}),o}function Lm(t){const e=t.replace(/Resource<\w+>/g,"Text"),n=Fm(e),[r,i]=Ml(n);return r&&et("HiveUtils","parseHiveTypeToSchema","Schema parsing resulted in an invalid JSON",{jsonObj:{typeDefinition:t,parsed:n},exc:r}),r?void 0:i}const iC={[vs.Text]:k.z.string(),[vs.Number]:k.z.number(),[vs.Logic]:k.z.boolean()};function oC(t){const e=Lm(t),n=r=>{const i=It(r),o=i?r[0]:r,s=eC(o)?k.z.object(Object.values(o).reduce((a,c)=>(a[c.$key]=n(c.definition),a),{})):iC[o];return s?i?k.z.array(s):s:(et("HiveUtils","parseHiveTypeToZodSchema","Unknown simple Hive type",{typeDefinition:t,schema:JSON.stringify(r)}),k.z.unknown())};return e?n(e):(et("HiveUtils","parseHiveTypeToZodSchema","Schema is undefined",{typeDefinition:t}),k.z.unknown())}class Nd extends Error{constructor(e){super(e),this.name="ConversionError"}}function sC(t,e,n){const r=n.safeParse(e);if(!r.success)throw new Nd(r.error.message);const i=function(o,s){if(Y0(o))return s;const a=Um(o),c=zm(o);if(a&&_r(s)){const u=o.shape;return Object.keys(u).reduce(function(l,f){const m=i(u[f],s[f]);return l.push(m),l},[])}else return c&&It(s)?s.map(function(u){return i(o.element,u)}):s};return i(n,e)}function Wm(t){return It(t)?Wm(t[0]):_r(t)}const Cg=Symbol("UnknownCmpType");function aC(t,e){if(t==null)return;const{success:n,error:r}=e.safeParse(t);if(!n)throw et("CmpUtils","_assertCmpValueValid","Parser error:",r),new Error("Value received for component doesn't match its zod schema")}function cC(t,e,n){return rC(t,e,n)}function uC(t,e,n,r){const i=nC(e),o=i?cC(e,n,r):void 0;return i&&o?tu(t,o):t}function lC(t,e,n){const r=Mm(t);if(!r)throw new Error("Component does not exist in the component definitions.");const i=r instanceof hp?uC(n,e,r.zodType,t):Cg;if(i===Cg)throw new Error("Component has unknown type.");return i&&aC(i,r.zodType),i}var Vr,Ko;class fC{constructor(){le(this,Vr,new Map),le(this,Ko,new Map)}updateCmp(e,n,r){const i=w(this,Vr).get(e)??{value:n,freshProperties:new Set};i.value=n,i.freshProperties.add("Value"),r&&w(this,Ko).set(e,{property:"Value",lazy:!1,isInitialSubscription:!0}),w(this,Vr).set(e,i)}markCmpPropertiesAsStale(e,n){const r=w(this,Vr).get(e);r&&n.forEach(i=>r.freshProperties.delete(i))}markAllCmpPropertiesAsStale(){for(const e of w(this,Vr).values())e.freshProperties.clear()}async subscribeToCmpUpdates(e,n,r=!1){Je("CmpsStore","subscribeToCmpUpdates","",{cmpName:e,property:n,lazy:r});const i=w(this,Ko).get(e);(!i||i.lazy===!0&&r===!1)&&(w(this,Ko).set(e,{property:n,lazy:r,isInitialSubscription:!1}),await Yc().subscribeToCmpUpdates(e,n,r))}async resubscribeToCmpUpdates(){const e=Yc(),n=Array.from(w(this,Ko)).filter(([,r])=>!r.isInitialSubscription).map(([r,{property:i,lazy:o}])=>e.subscribeToCmpUpdates(r,i,o));await Promise.all(n)}async getCmpValue(e){Je("CmpsStore","getCmpValue","",{name:e});const n=w(this,Vr).get(e);if(n!=null&&n.freshProperties.has("Value"))return n.value;const r=Ls(e);await Yc().fetchCmpPropertyValue([{name:r,property:"Value"}]);const i=w(this,Vr).get(e);return structuredClone(i==null?void 0:i.value)}}Vr=new WeakMap,Ko=new WeakMap;function wg(t){return t instanceof hp}function dC(t){const e=t.split("-");return{companyName:e[0],distributorName:e.length>1?e[1]:""}}function Vm(t){const{pathname:e}=new URL(t),n=new RegExp("^/(cfgr|preview|staging)/","i"),r=new RegExp("/$"),i=e.replace(n,"").replace(r,"").split("/");if(i.length<2)return;let o,s,a,c,u,l;const f=e.toLowerCase(),m=f.startsWith("/preview/"),d=f.startsWith("/staging/");m||d?(l=i[2],a=i[3],o=i[4]==="copy"?"copy":"edit",c=i[5],s=m?"preview":"staging",u=!1):f.startsWith("/cfgr/")&&(a=i[2]==="copy"?void 0:i[2],c=void 0,i[3]==="edit"?(o="edit",c=i[4]):o="copy",s="cfgr",u=i[i.length-1]!=="copy"||i[i.length-1]==="copy"&&a===void 0);const h=dC(i[0]);return{tenant:i[0],companyName:h.companyName,planName:i[1],planVersion:l||void 0,cfgnId:a||void 0,startAction:o,authToken:c||void 0,cfgrMode:s,isPresetCopy:u}}function Sg(t){const e=new RegExp("^/|/$","g"),n=new URL(t).pathname.replace(e,"").split("/"),r=["cfgr","preview","staging"];return n.length>=2&&r.includes(n[0].toLowerCase())}var qm=(t=>(t[t.NotActivated=0]="NotActivated",t[t.Activated=1]="Activated",t[t.Deactivated=2]="Deactivated",t[t.MarkedForDeletion=3]="MarkedForDeletion",t))(qm||{});const hC=k.z.object({mailNotifications:k.z.object({quoteAssignment:k.z.boolean(),insightsAssignment:k.z.boolean()})});k.z.object({id:k.z.string(),firstname:k.z.string(),lastname:k.z.string(),email:k.z.string(),isCbnAdmin:k.z.boolean().optional(),isSuperAdmin:k.z.boolean().optional(),state:k.z.nativeEnum(qm),avatarUrl:k.z.string().nullable().optional(),settings:hC});const Ig={local:void 0,session:void 0};function kg(t=!1){var e;(e=pC(t).storage)==null||e.clear()}function pC(t=!1){const e="CbnStorageTestKey",n="CbnStorageTestValue",r=t?"session":"local",i=Ig[r];if(i!==void 0)return i;const o={storage:t?window.sessionStorage:window.localStorage,writeable:!1,readable:!1};if(o.storage){try{o.storage.setItem(e,n),o.writeable=!0}catch{}try{const s=o.storage.getItem(e);o.readable=o.writeable?s===n:!0}catch{}o.writeable&&o.storage.removeItem(e)}return Ig[r]=o,o}const gC="/login",vC="redirectTo";function mC(t){kg(),kg(!0);const e=encodeURIComponent(window.location.pathname+window.location.search);window.location.href=`${gC}?${vC}=${e}`}var Hm="function",Bm="object",pp="undefined",Kn="prototype",gp=Object,yC=gp[Kn];/*! https://github.com/nevware21/ts-utils v0.12.6 */function Gt(t,e){return t||e}function ot(t,e){return t[e]}var Ut=void 0,mt=null,vp="",zl="function",dc="object",Cr="prototype",xu="__proto__",Fi="undefined",Pu="constructor",mp="Symbol",ys="length",Du="name",Tt="call",hc="toString",yp="getOwnPropertyDescriptor",jt=Gt(Object),bp=ot(jt,Cr),Km=Gt(String),bo=ot(Km,Cr),pc=Gt(Math),Xm=Gt(Array),Ul=ot(Xm,Cr),xr=ot(Ul,"slice"),Tg="_polyfill",Eg="__nw21$polytype__";function it(t,e){try{return{v:t.apply(this,e)}}catch(n){return{e:n}}}function bC(t,e,n){var r=it(t,n);return r.e?e:r.v}var of;function Nl(t){return function(e){return typeof e===t}}function Gm(t){var e="[object "+t+"]";return function(n){return!!(n&&_C(n)===e)}}function _C(t){return bp[hc].call(t)}function Ye(t){return typeof t===Fi||t===Fi}function CC(t){return t===Ut}function K(t){return t===mt||Ye(t)}function _p(t){return t===mt||t===Ut}function wC(t){return!!t||t!==Ut}function SC(t){return!of&&(of=["string","number","boolean",Fi,"symbol","bigint"]),t!==dc&&of.indexOf(t)!==-1}var de=Nl("string"),pe=Nl(zl);function Xt(t){return!t&&K(t)?!1:!!t&&typeof t===dc}var Ce=ot(Xm,"isArray"),IC=Gm("Date"),gc=Nl("number"),Jm=Nl("boolean"),Cp=Gm("Error");function fi(t){return!!(t&&t.then&&pe(t.then))}function Ru(t){return!(!t||bC(function(){return!(t&&0+t)},!t))}function wp(){}function kC(){return!1}var $t=Gt(Km),TC="[object Error]";function te(t,e){var n=vp,r=bp[hc][Tt](t);r===TC&&(t={stack:$t(t.stack),message:$t(t.message),name:$t(t.name)});try{n=JSON.stringify(t,mt,e?typeof e=="number"?e:4:Ut),n=(n?n.replace(/"(\w+)"\s*:\s{0,1}/g,"$1: "):mt)||$t(t)}catch(i){n=" - "+te(i,e)}return r+": "+n}function Yt(t){throw new Error(t)}function nr(t){throw new TypeError(t)}function $l(t){_p(t)&&nr("Cannot convert undefined or null to object")}function EC(t){de(t)||nr("'"+te(t)+"' is not a string")}function mn(t,e){return!!t&&bp.hasOwnProperty[Tt](t,e)}var xC=Gt(ot(jt,yp),wp),ii=Gt(ot(jt,"hasOwn"),PC);function PC(t,e){return $l(t),mn(t,e)||!!xC(t,e)}function De(t,e,n){if(t&&(Xt(t)||pe(t))){for(var r in t)if(ii(t,r)&&e[Tt](t,r,t[r])===-1)break}}function ee(t,e,n){if(t)for(var r=t[ys]>>>0,i=0;i<r&&!(i in t&&e[Tt](t,t[i],i,t)===-1);i++);}var _o=Ol;function Ol(t,e,n){var r=e?e[t]:mt;return function(i){var o=(i?i[t]:mt)||r;if(o||n){var s=arguments;return(o||n).apply(i,o?xr[Tt](s,1):s)}nr('"'+$t(t)+'" not defined for '+te(i))}}function DC(t){return function(e){return e[t]}}var RC=Gt(ot(jt,yp),wp),Ec={e:"enumerable",c:"configurable",v:"value",w:"writable",g:"get",s:"set"};function Qm(t){var e={};if(e[Ec.c]=!0,e[Ec.e]=!0,t.l){e.get=function(){return t.l.v};var n=RC(t.l,"v");n&&n.set&&(e.set=function(r){t.l.v=r})}return De(t,function(r,i){e[Ec[r]]=CC(i)?e[Ec[r]]:i}),e}var Qn=ot(jt,"defineProperty"),AC=ot(jt,"defineProperties");function MC(t,e,n,r,i,o){var s={e:o,c:i};return n&&(s.g=n),Qn(t,e,Qm(s))}function Ae(t,e,n){return Qn(t,e,Qm(n))}function Zm(t,e,n,r,i){var o={};return De(t,function(s,a){Au(o,s,e?a:s),Au(o,a,s)}),r?r(o):o}function Au(t,e,n,r){Qn(t,e,{value:n,enumerable:!0,writable:!1})}var zC=Gt(ot(jt,"isFrozen"),kC),Ym=ot(jt,"freeze");function UC(t){return t}function NC(t){return $l(t),t[xu]||mt}var $d=ot(jt,"assign"),wr=ot(jt,"keys");function ey(t,e){if((Ce(t)||Xt(t)||pe(t))&&!zC(t)){for(var n=0;n<e.length;n++)if(e[n]===t)return t;e.push(t),De(t,function(r,i){ey(i,e)}),Rn(t)}return t}function Ws(t){return Ym?ey(t,[]):t}var Rn=Gt(Ym,UC),Od=Gt(ot(jt,"getPrototypeOf"),NC);function $C(t){return Zm(t,1,0,Rn)}function OC(t){return Zm(t,0,0,Rn)}function FC(t){var e={};return De(t,function(n,r){Au(e,n,r[1]),Au(e,r[0],r[1])}),Rn(e)}function jC(t){return FC(t)}var ty=OC({asyncIterator:0,hasInstance:1,isConcatSpreadable:2,iterator:3,match:4,matchAll:5,replace:6,search:7,species:8,split:9,toPrimitive:10,toStringTag:11,unscopables:12}),xg="__tsUtils$gblCfg",sf;function ny(){var t;return typeof globalThis!==Fi&&(t=globalThis),!t&&typeof self!==Fi&&(t=self),!t&&typeof window!==Fi&&(t=window),!t&&typeof global!==Fi&&(t=global),t}function Fl(){if(!sf){var t=it(ny).v||{};sf=t[xg]=t[xg]||{}}return sf}var ry=ot(pc,"min"),za=ot(pc,"max"),Pg=_o("slice",bo),Bt=_o("substring",bo),Jr=Ol("substr",bo,LC);function LC(t,e,n){return $l(t),n<0?vp:(e=e||0,e<0&&(e=za(e+t[ys],0)),Ye(n)?Pg(t,e):Pg(t,e,e+n))}function Mu(t,e){return Bt(t,0,e)}function WC(t,e){return t&&(it(function(){t[Tg]=!0,t[Eg]=e}),it(Ae,[t,Tg,{v:!0,w:!1,e:!1}]),it(Ae,[t,Eg,{v:e,w:!1,e:!1}])),t}var Pr=Gt(ot(jt,"create"),VC);function VC(t,e){var n=null;function r(){}if(_p(t))n={};else{var i=typeof t;i!==dc&&i!==zl&&nr("Prototype must be an Object or function: "+te(t)),r[Cr]=t,it(function(){r[xu]=t}),n=new r}return e&&it(AC,[n,e]),n}function An(){return(Date.now||qC)()}function qC(){return new Date().getTime()}function ji(t,e,n){return t.apply(e,n)}var pt;function pi(){pt=Fl()}function iy(t,e){var n={};return!pt&&pi(),n.b=pt.lzy,Qn(n,"v",{configurable:!0,get:function(){var r=ji(t,null,e);return pt.lzy||Qn(n,"v",{value:r}),n.b=pt.lzy,r}}),n}var HC=ot(pc,"random"),BC=iy(function(){for(var t=An().toString(36).slice(2);t.length<16;)t+=HC().toString(36).slice(2);return t=t.substring(0,16),t}),Dg="_urid",KC="$nw21sym",af,XC=0;function GC(){if(!af){var t=Fl();af=t.gblSym=t.gblSym||{k:{},s:{}}}return af}var xc;function Sp(t){var e="_"+XC+++"_"+BC.v,n=mp+"("+t+")";function r(o,s){Ae(i,o,{v:s,e:!1,w:!1})}var i=Pr(null);return r("description",$t(t)),r(hc,function(){return n+KC+e}),r("valueOf",function(){return i}),r("v",n),r("_uid",e),WC(i,"symbol")}function JC(t){var e=GC();if(!ii(e.k,t)){var n=Sp(t),r=wr(e.s).length;n[Dg]=function(){return r+"_"+n[hc]()},e.k[t]=n,e.s[n[Dg]()]=$t(t)}return e.k[t]}function QC(t){!xc&&(xc={});var e,n=ty[t];return n&&(e=xc[n]=xc[n]||Sp(mp+"."+n)),e}function Cn(t){return Qn({toJSON:function(){return t}},"v",{value:t})}var oy="window",Ua;function Vs(t,e){var n;return function(){return!pt&&pi(),(!n||pt.lzy)&&(n=Cn(it(t,e).v)),n.v}}function vn(t){return!pt&&pi(),(!Ua||t===!1||pt.lzy)&&(Ua=Cn(it(ny).v||mt)),Ua.v}function nt(t,e){var n;if(!Ua||e===!1?n=vn(e):n=Ua.v,n&&n[t])return n[t];if(t===oy)try{return window}catch{}return mt}function sy(){return!!kt()}var kt=Vs(nt,["document"]);function jl(){return!!cn()}var cn=Vs(nt,[oy]);function ZC(){return!!rr()}var rr=Vs(nt,["navigator"]);function YC(){return!!ay()}var ay=Vs(nt,["history"]),ew=Vs(function(){return!!it(function(){return process&&(process.versions||{}).node}).v}),cy=Vs(function(){return!!it(function(){return self&&self instanceof WorkerGlobalScope}).v}),zs,cf;function Ll(){return zs=Cn(it(nt,[mp]).v),zs}function tw(t){var e=(pt.lzy?0:zs)||Ll();return e.v?e.v[t]:Ut}function nw(){return!!rw()}function rw(){return!pt&&pi(),((pt.lzy?0:zs)||Ll()).v}function Ip(t,e){var n=ty[t];!pt&&pi();var r=(pt.lzy?0:zs)||Ll();return r.v?r.v[n||t]:QC(t)}function Xs(t,e){!pt&&pi();var n=(pt.lzy?0:zs)||Ll();return n.v?n.v(t):Sp(t)}function kp(t){return!pt&&pi(),cf=(pt.lzy?0:cf)||Cn(it(tw,["for"]).v),(cf.v||JC)(t)}function Fd(t){return!!t&&pe(t.next)}function uy(t){return!_p(t)&&pe(t[Ip(3)])}var Pc;function Tp(t,e,n){if(t&&(Fd(t)||(!Pc&&(Pc=Cn(Ip(3))),t=t[Pc.v]?t[Pc.v]():mt),Fd(t))){var r=Ut,i=Ut;try{for(var o=0;!(i=t.next()).done&&e[Tt](n||t,i.value,o,t)!==-1;)o++}catch(s){r={e:s},t.throw&&(i=mt,t.throw(r))}finally{try{i&&!i.done&&t.return&&t.return(i)}finally{if(r)throw r.e}}}}function cs(t,e){return!Ye(e)&&t&&(Ce(e)?ji(t.push,t,e):Fd(e)||uy(e)?Tp(e,function(n){t.push(n)}):t.push(e)),t}var At=_o("indexOf",Ul),Ha=_o("map",Ul);function Wl(t,e,n){return((t?t.slice:mt)||xr).apply(t,xr[Tt](arguments,1))}var iw=_o("reduce",Ul),uf,ly=Gt(ot(jt,"setPrototypeOf"),ow);function ow(t,e){var n;return!uf&&(uf=Cn((n={},n[xu]=[],n instanceof Array))),uf.v?t[xu]=e:De(e,function(r,i){return t[r]=i}),t}function sw(t,e,n){it(Ae,[e,Du,{v:t,c:!0,e:!1}]),e=ly(e,n);function r(){this[Pu]=e,it(Ae,[this,Du,{v:t,c:!0,e:!1}])}return e[Cr]=n===mt?Pr(n):(r[Cr]=n[Cr],new r),e}function Rg(t,e){e&&(t[Du]=e)}function fy(t,e,n){var r=Error,i=r[Cr][Du],o=Error.captureStackTrace;return sw(t,function(){var s=this,a=arguments;try{it(Rg,[r,t]);var c=ji(r,s,xr[Tt](a))||s;if(c!==s){var u=Od(s);u!==Od(c)&&ly(c,u)}return o&&o(c,s[Pu]),e&&e(c,a),c}finally{it(Rg,[r,i])}},r)}var lf;function aw(t){throw lf||(lf=fy("UnsupportedError")),new lf(t)}function cw(t){return function(e){return $l(e),e&&e.replace&&(e=e.replace(t,vp)),e}}var uw=cw(/^\s+|(?=\s)\s+$/g),Ve=Ol("trim",bo,uw),an=ot(pc,"floor"),ff,df,hf;function Ot(t){if(!t||typeof t!==dc)return!1;hf||(hf=jl()?cn():!0);var e=!1;if(t!==hf){df||(ff=Function[Cr][hc],df=ff[Tt](jt));try{var n=Od(t);e=!n,e||(mn(n,Pu)&&(n=n[Pu]),e=!!(n&&typeof n===zl&&ff[Tt](n)===df))}catch{}}return e}function lw(t){return t.value&&hy(t),!0}var Ag=[pw,hy,vw,gw];function fw(t,e,n,r){var i;return ee(t,function(o){if(o.k===e)return i=o,-1}),i||(i={k:e,v:e},t.push(i),r(i)),i.v}function Ep(t,e,n,r){var i=n.handler,o=n.path?r?n.path.concat(r):n.path:[],s={handler:n.handler,src:n.src,path:o},a=typeof e,c=!1,u=e===mt;u||(e&&a===dc?c=Ot(e):u=SC(a));var l={type:a,isPrim:u,isPlain:c,value:e,result:e,path:o,origin:n.src,copy:function(f,m){return Ep(t,f,m?s:n,m)},copyTo:function(f,m){return dy(t,f,m,s)}};return l.isPrim?i&&i[Tt](n,l)?l.result:e:fw(t,e,o,function(f){Ae(l,"result",{g:function(){return f.v},s:function(h){f.v=h}});for(var m=0,d=i;!(d||(m<Ag.length?Ag[m++]:lw))[Tt](n,l);)d=mt})}function dy(t,e,n,r){if(!K(n))for(var i in n)e[i]=Ep(t,n[i],r,i);return e}function dw(t,e,n){var r={handler:n,src:e,path:[]};return dy([],t,e,r)}function hw(t,e){var n={handler:e,src:t};return Ep([],t,n)}function pw(t){var e=t.value;if(Ce(e)){var n=t.result=[];return n.length=e.length,t.copyTo(n,e),!0}return!1}function gw(t){var e=t.value;return IC(e)?(t.result=new Date(e.getTime()),!0):!1}function vw(t){return t.type===zl}function hy(t){var e=t.value;if(e&&t.isPlain){var n=t.result={};return t.copyTo(n,e),!0}return!1}function py(t,e){return ee(e,function(n){dw(t,n)}),t}function Mg(t,e,n,r,i,o,s){return py(hw(t)||{},xr[Tt](arguments))}function mw(t,e,n,r,i,o,s){return py(t||{},xr[Tt](arguments))}var gy=_o("split",bo);function vy(t,e,n){if(t&&e){var r=gy(e,"."),i=r.pop();ee(r,function(o){K(t[o])&&(t[o]={}),t=t[o]}),t[i]=n}}var yw=DC(ys),pf;function Dr(){return!pt&&pi(),(!pf||pt.lzy)&&(pf=Cn(it(nt,["performance"]).v)),pf.v}var my=ot(pc,"round"),bw=Gt(ot(jt,yp),wp),yy=Ol("endsWith",bo,_w);function _w(t,e,n){EC(t);var r=de(e)?e:$t(e),i=!Ye(n)&&n<t[ys]?n:t[ys];return Bt(t,i-r[ys],i)===r}var at=_o("indexOf",bo),gf="ref",vf="unref",mf="hasRef",Cw="enabled";function ww(t,e,n){var r=!0,i=t?e(mt):mt,o;function s(){return r=!1,i&&i[vf]&&i[vf](),o}function a(){i&&n(i),i=mt}function c(){return i=e(i),r||s(),o}function u(l){!l&&i&&a(),l&&!i&&c()}return o={cancel:a,refresh:c},o[mf]=function(){return i&&i[mf]?i[mf]():r},o[gf]=function(){return r=!0,i&&i[gf]&&i[gf](),o},o[vf]=s,o=Qn(o,Cw,{get:function(){return!!i},set:u}),{h:o,dn:function(){i=mt}}}var Sw,Iw;function kw(t){var e=pe(t)?t:Sw;if(!e){var n=Fl().tmOut||[];Ce(n)&&n.length>0&&pe(n[0])&&(e=n[0])}return e||setTimeout}function Tw(t){var e=pe(t)?t:Iw;if(!e){var n=Fl().tmOut||[];Ce(n)&&n.length>1&&pe(n[1])&&(e=n[1])}return e||clearTimeout}function by(t,e,n){var r=Ce(e),i=r?e.length:0,o=kw(i>0?e[0]:r?Ut:e),s=Tw(i>1?e[1]:Ut),a=n[0];n[0]=function(){c.dn(),ji(a,Ut,xr[Tt](arguments))};var c=ww(t,function(u){if(u){if(u.refresh)return u.refresh(),u;ji(s,Ut,[u])}return ji(o,Ut,n)},function(u){ji(s,Ut,[u])});return c.h}function yn(t,e){return by(!0,Ut,xr[Tt](arguments))}function Ew(t,e){return by(!1,Ut,xr[Tt](arguments))}(vn()||{}).Symbol;(vn()||{}).Reflect;var _y="hasOwnProperty",xw=function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)yC[_y].call(e,i)&&(t[i]=e[i])}return t},Ft=$d||xw,jd=function(t,e){return jd=gp.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)r[_y](i)&&(n[i]=r[i])},jd(t,e)};function ir(t,e){typeof e!==Hm&&e!==null&&nr("Class extends value "+String(e)+" is not a constructor or null"),jd(t,e);function n(){this.constructor=t}t[Kn]=e===null?Pr(e):(n[Kn]=e[Kn],new n)}function zg(t,e){for(var n=0,r=e.length,i=t.length;n<r;n++,i++)t[i]=e[n];return t}var Dc,zu="constructor",Rr="prototype",Uu="function",Nu="_dynInstFuncs",Ld="_isDynProxy",bs="_dynClass",Pw="_dynCls$",Wd="_dynInstChk",Ba=Wd,Cy="_dfOpts",Ug="_unknown_",xp="__proto__",Rc="_dyn"+xp,Ng="__dynProto$Gbl",yf="_dynInstProto",nu="useBaseInst",Vd="setInstFuncs",Pp=Object,Ka=Pp.getPrototypeOf,$g=Pp.getOwnPropertyNames,Og=vn(),qd=Og[Ng]||(Og[Ng]={o:(Dc={},Dc[Vd]=!0,Dc[nu]=!0,Dc),n:1e3});function ru(t){return t&&(t===Pp[Rr]||t===Array[Rr])}function Dp(t){return ru(t)||t===Function[Rr]}function fo(t){var e;if(t){if(Ka)return Ka(t);var n=t[xp]||t[Rr]||(t[zu]?t[zu][Rr]:null);e=t[Rc]||n,mn(t,Rc)||(delete t[yf],e=t[Rc]=t[yf]||t[Rc],t[yf]=n)}return e}function $u(t,e){var n=[];if($g)n=$g(t);else for(var r in t)typeof r=="string"&&mn(t,r)&&n.push(r);if(n&&n.length>0)for(var i=0;i<n.length;i++)e(n[i])}function Rp(t,e,n){return e!==zu&&typeof t[e]===Uu&&(n||mn(t,e))&&e!==xp&&e!==Rr}function Ou(t){nr("DynamicProto: "+t)}function Dw(t){var e=Pr(null);return $u(t,function(n){!e[n]&&Rp(t,n,!1)&&(e[n]=t[n])}),e}function Ap(t,e){for(var n=t.length-1;n>=0;n--)if(t[n]===e)return!0;return!1}function Rw(t,e,n,r){function i(c,u,l){var f=u[l];if(f[Ld]&&r){var m=c[Nu]||{};m[Ba]!==!1&&(f=(m[u[bs]]||{})[l]||f)}return function(){return f.apply(c,arguments)}}var o=Pr(null);$u(n,function(c){o[c]=i(e,n,c)});for(var s=fo(t),a=[];s&&!Dp(s)&&!Ap(a,s);)$u(s,function(c){!o[c]&&Rp(s,c,!Ka)&&(o[c]=i(e,s,c))}),a.push(s),s=fo(s);return o}function Aw(t,e,n,r){var i=null;if(t&&mn(n,bs)){var o=t[Nu]||Pr(null);if(i=(o[n[bs]]||Pr(null))[e],i||Ou("Missing ["+e+"] "+Uu),!i[Wd]&&o[Ba]!==!1){for(var s=!mn(t,e),a=fo(t),c=[];s&&a&&!Dp(a)&&!Ap(c,a);){var u=a[e];if(u){s=u===r;break}c.push(a),a=fo(a)}try{s&&(t[e]=i),i[Wd]=1}catch{o[Ba]=!1}}}return i}function Mw(t,e,n){var r=e[t];return r===n&&(r=fo(e)[t]),typeof r!==Uu&&Ou("["+t+"] is not a "+Uu),r}function zw(t,e,n,r,i){function o(c,u){var l=function(){var f=Aw(this,u,c,l)||Mw(u,c,l);return f.apply(this,arguments)};return l[Ld]=1,l}if(!ru(t)){var s=n[Nu]=n[Nu]||Pr(null);if(!ru(s)){var a=s[e]=s[e]||Pr(null);s[Ba]!==!1&&(s[Ba]=!!i),ru(a)||$u(n,function(c){Rp(n,c,!1)&&n[c]!==r[c]&&(a[c]=n[c],delete n[c],(!mn(t,c)||t[c]&&!t[c][Ld])&&(t[c]=o(t,c)))})}}}function Uw(t,e){if(Ka){for(var n=[],r=fo(e);r&&!Dp(r)&&!Ap(n,r);){if(r===t)return!0;n.push(r),r=fo(r)}return!1}return!0}function bf(t,e){return mn(t,Rr)?t.name||e||Ug:((t||{})[zu]||{}).name||e||Ug}function qe(t,e,n,r){mn(t,Rr)||Ou("theClass is an invalid class definition.");var i=t[Rr];Uw(i,e)||Ou("["+bf(t)+"] not in hierarchy of ["+bf(e)+"]");var o=null;mn(i,bs)?o=i[bs]:(o=Pw+bf(t,"_")+"$"+qd.n,qd.n++,i[bs]=o);var s=qe[Cy],a=!!s[nu];a&&r&&r[nu]!==void 0&&(a=!!r[nu]);var c=Dw(e),u=Rw(i,e,c,a);n(e,u);var l=!!Ka&&!!s[Vd];l&&r&&(l=!!r[Vd]),zw(i,o,e,c,l!==!1)}qe[Cy]=qd.o;var Mp=$C,Nw=jC,Kr=Mp({NONE:0,PENDING:3,INACTIVE:1,ACTIVE:2}),Us="toLowerCase",he="length",Fu="warnToConsole",vc="throwInternal",Yi="watch",ho="apply",Ee="push",Co="splice",ft="logger",Ui="cancel",mc="initialize",Qr="identifier",ju="removeNotificationListener",Lu="addNotificationListener",qn="isInitialized",Ac="getNotifyMgr",Xa="getPlugin",po="name",Nt="processNext",wy="getProcessTelContext",Li="value",us="enabled",Fg="stopPollingInternalLogs",go="unload",Mc="onComplete",Hd="version",Sy="loggingLevelConsole",vo="createNew",pr="teardown",Wu="messageId",eo="message",Sr="diagLog",Vu="_doTeardown",Ga="update",Xn="getNext",Ja="setNextPlugin",Bd="userAgent",mo="split",to="replace",Kd="substring",Iy="indexOf",oi="type",jg="evtName",dr="status",Lg="getAllResponseHeaders",Xd="isChildEvt",Sn="data",_s="getCtx",jn="setCtx",Wg="itemsReceived",zc="headers",Gs="urlString",zo="timeout",Gd="traceFlags",_f="getAttribute",Cf;function $w(t,e){Cf||(Cf=fy("AggregationError",function(r,i){i[he]>1&&(r.errors=i[1])}));var n=t;throw ee(e,function(r,i){n+=`
|
|
2
|
+
`.concat(i," > ").concat(te(r))}),new Cf(n,e||[])}/*!
|
|
3
3
|
* NevWare21 Solutions LLC - ts-async, 0.5.5
|
|
4
4
|
* https://github.com/nevware21/ts-async
|
|
5
5
|
* Copyright (c) NevWare21 Solutions LLC and contributors. All rights reserved.
|
|
6
6
|
* Licensed under the MIT license.
|
|
7
|
-
*/var Wu="Promise",kp="rejected";function Kt(t,e){return Ip(t,function(n){return e?e({status:"fulfilled",rejected:!1,value:n}):n},function(n){return e?e({status:kp,rejected:!0,reason:n}):n})}function Ip(t,e,n,r){var i=t;try{if(fi(t))(e||n)&&(i=t.then(e,n));else try{e&&(i=e(t))}catch(o){if(n)i=n(o);else throw o}}finally{}return i}var py=["pending","resolving","resolved",kp],Mg="dispatchEvent",Ac;function PC(t){var e;return t&&t.createEvent&&(e=t.createEvent("Event")),!!e&&e.initEvent}function DC(t,e,n,r){var i=It();!Ac&&(Ac=bn(!!rt(PC,[i]).v));var o=Ac.v?i.createEvent("Event"):r?new Event(e):{};if(n&&n(o),Ac.v&&o.initEvent(e,!1,!0),o&&t[Mg])t[Mg](o);else{var s=t["on"+e];if(s)s(o);else{var a=tt("console");a&&(a.error||a.log)(e,te(o))}}}var gy="unhandledRejection",RC=gy.toLowerCase(),zg=[],AC=0,MC=10,df;function Ug(t){return pe(t)?t.toString():te(t)}function vy(t,e,n){var r=Al(arguments,3),i=0,o=!1,s,a=[],c=AC++,u=!1,l=null,f;function m(x,R){try{zg.push(c),u=!0,l&&l.cancel(),l=null;var H=t(function(A,k){a.push(function(){try{var O=i===2?x:R,j=Ze(O)?s:pe(O)?O(s):O;fi(j)?j.then(A,k):O?A(j):i===3?k(j):A(j)}catch(K){k(K)}}),o&&p()},r);return H}finally{zg.pop()}}function d(x){return m(void 0,x)}function h(x){var R=x,H=x;return pe(x)&&(R=function(A){return x&&x(),A},H=function(A){throw x&&x(),A}),m(R,H)}function g(){return py[i]}function p(){if(a.length>0){var x=a.slice();a=[],u=!0,l&&l.cancel(),l=null,e(x)}}function v(x,R){return function(H){if(i===R){if(x===2&&fi(H)){i=1,H.then(v(2,1),v(3,1));return}i=x,o=!0,s=H,p(),!u&&x===3&&!l&&(l=vn(_,MC))}}}function _(){if(!u)if(u=!0,qw())process.emit(gy,s,f);else{var x=cn()||pn();!df&&(df=bn(rt(tt,[Wu+"RejectionEvent"]).v)),DC(x,RC,function(R){return Re(R,"promise",{g:function(){return f}}),R.reason=s,R},!!df.v)}}f={then:m,catch:d,finally:h},Gn(f,"state",{get:g}),Kw()&&(f[pp(11)]="IPromise");function P(){return"IPromise "+g()+(o?" - "+Ug(s):"")}return f.toString=P,(function(){pe(n)||tr(Wu+": executor is not a function - "+Ug(n));var x=v(3,0);try{n.call(f,v(2,0),x)}catch(R){x(R)}})(),f}function zC(t){return function(e){var n=Al(arguments,1);return t(function(r,i){try{var o=[],s=1;vp(e,function(a,c){a&&(s++,Ip(a,function(u){o[c]=u,--s===0&&r(o)},i))}),s--,s===0&&r(o)}catch(a){i(a)}},n)}}function UC(t){return bn(function(e){var n=Al(arguments,1);return t(function(r,i){var o=[],s=1;function a(c,u){s++,Kt(c,function(l){l.rejected?o[u]={status:kp,reason:l.reason}:o[u]={status:"fulfilled",value:l.value},--s===0&&r(o)})}try{we(e)?ee(e,a):Zm(e)?vp(e,a):tr("Input is not an iterable"),s--,s===0&&r(o)}catch(c){i(c)}},n)})}function my(t){ee(t,function(e){try{e()}catch{}})}function NC(t){var e=hc(t)?t:0;return function(n){vn(function(){my(n)},e)}}function yy(t,e){return vy(yy,NC(e),t,e)}var hf;function $C(t,e){!hf&&(hf=bn(rt(tt,[Wu]).v||null));var n=hf.v;if(!n)return yy(t);pe(t)||tr(Wu+": executor is not a function - "+te(t));var r=0;function i(){return py[r]}var o=new n(function(s,a){function c(l){r=2,s(l)}function u(l){r=3,a(l)}t(c,u)});return Gn(o,"state",{get:i}),o}var pf;function Ga(t){return vy(Ga,my,t)}function LC(t,e){return!pf&&(pf=UC(Ga)),pf.v(t,e)}var gf;function Qn(t,e){return!gf&&(gf=bn($C)),gf.v.call(this,t,e)}var jC=zC(Qn),Fn=void 0,De="",Xo="channels",yt="core",Od="createPerfMgr",Fd="disabled",_s="extensionConfig",Jo="extensions",Zn="processTelemetry",Vu="priority",tu="eventsSent",Ua="eventsDiscarded",nu="eventsSendRequest",Wi="perfEvent",vf="offlineEventsStored",mf="offlineBatchSent",yf="offlineBatchDrop",Hu="getPerfMgr",Wd="domain",bf="path",OC="Not dynamic - ",FC="REDACTED",Ng=["sig","Signature","AWSAccessKeyId","X-Goog-Signature"],WC="getPrototypeOf",VC=/-([a-z])/g,HC=/([^\w\d_$])/g,qC=/^(\d+[\w\d_$])/,BC=Object[WC];function no(t){return!B(t)}function qu(t){var e=t;return e&&de(e)&&(e=e[to](VC,function(n,r){return r.toUpperCase()}),e=e[to](HC,"_"),e=e[to](qC,function(n,r){return"_"+r})),e}function Dt(t,e){return t&&e?st(t,e)!==-1:!1}function Us(t){return t&&t.toISOString()||""}function Ne(t){return fp(t)?t[po]:De}function We(t,e,n,r,i){var o=n;return t&&(o=t[e],o!==n&&(!i||i(o))&&(!r||r(n))&&(o=n,t[e]=o)),o}function zt(t,e,n){var r;return t?(r=t[e],!r&&B(r)&&(r=Ze(n)?{}:n,t[e]=r)):r=Ze(n)?{}:n,r}function by(t,e){var n=null,r=null;return pe(t)?n=t:r=t,function(){var i=arguments;if(n&&(r=n()),r)return r[e][ho](r,i)}}function KC(t,e,n){if(t&&e&&Xt(t)&&Xt(e)){var r=function(o){if(de(o)){var s=e[o];pe(s)?(!n||n(o,!0,e,t))&&(t[o]=by(e,o)):(!n||n(o,!1,e,t))&&(ii(t,o)&&delete t[o],Re(t,o,{g:function(){return e[o]},s:function(a){e[o]=a}}))}};for(var i in e)r(i)}return t}function Bu(t,e,n,r,i){t&&e&&n&&(t[e]=by(n,r))}function us(t,e,n,r){return t&&e&&Xt(t)&&we(n)&&ee(n,function(i){de(i)&&Bu(t,i,e,i)}),t}function XC(t){return(function(){function e(){var n=this;t&&Pe(t,function(r,i){n[r]=i})}return e})()}function _y(t){return t&&Ed&&(t=op(Ed({},t))),t}function wy(t,e,n,r,i,o){var s=arguments,a=s[0]||{},c=s[he],u=!1,l=1;for(c>0&&jm(a)&&(u=a,a=s[l]||{},l++),Xt(a)||(a={});l<c;l++){var f=s[l],m=we(f),d=Xt(f);for(var h in f){var g=m&&h in f||d&&ii(f,h);if(g){var p=f[h],v=void 0;if(u&&p&&((v=we(p))||Lt(p))){var _=a[h];v?we(_)||(_=[]):Lt(_)||(_={}),p=wy(u,_,p)}p!==void 0&&(a[h]=p)}}}return a}function ru(t,e,n){var r=e&&e.featureOptIn&&e.featureOptIn[t];if(t&&r){var i=r.mode;if(i===3)return!0;if(i===2)return!1}return n}function Ku(t){try{return t.responseText}catch{}return null}function Cy(t,e){return t?"XDomainRequest,Response:"+Ku(t)||"":e}function Xu(t,e){return t?"XMLHttpRequest,Status:"+t[fr]+",Response:"+Ku(t)||t.response||"":e}function $g(t,e){return e&&(hc(e)?t=[e].concat(t):we(e)&&(t=e.concat(t))),t}var JC="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",Lg="withCredentials",GC="timeout";function QC(t,e,n,r,i,o){i===void 0&&(i=!1);function s(c,u,l){try{c[u]=l}catch{}}var a=new XMLHttpRequest;return s(a,JC,r),n&&s(a,Lg,n),a.open(t,e,!i),n&&s(a,Lg,n),!i&&o&&s(a,GC,o),a}function ZC(t){var e={};if(de(t)){var n=Ve(t)[mo](/[\r\n]+/);ee(n,function(r){if(r){var i=r[hy](": ");if(i!==-1){var o=Ve(r.substring(0,i))[zs](),s=Ve(r[$d](i+1));e[o]=s}else e[Ve(r)]=1}})}return e}function _f(t,e,n){if(!t[n]&&e&&e.getResponseHeader){var r=e.getResponseHeader(n);r&&(t[n]=Ve(r))}return t}var YC="kill-duration",eS="kill-duration-seconds",tS="time-delta-millis";function wf(t,e){var n={};return t[Rg]?n=ZC(t[Rg]()):e&&(n=_f(n,t,tS),n=_f(n,t,YC),n=_f(n,t,eS)),n}var nS="documentMode",rS="location",iS="console",Sy="JSON",oS="crypto",sS="msCrypto",aS="ReactNative",Vd="msie",Hd="trident/",ky="XMLHttpRequest",Cf=null,Sf=null,Uo=null,kf=null;function Iy(t,e){var n=!1;if(t){try{if(n=e in t,!n){var r=t[Bn];r&&(n=e in r)}}catch{}if(!n)try{var i=new t;n=!Ze(i[e])}catch{}}return n}function Hn(t){return typeof location===Um&&location?location:tt(rS)}function cS(){return typeof console!==ip?console:tt(iS)}function vc(){return!!(typeof JSON===Um&&JSON||tt(Sy)!==null)}function An(){return vc()?JSON||tt(Sy):null}function uS(){return tt(oS)}function lS(){return tt(sS)}function fS(){var t=nr();return t&&t.product?t.product===aS:!1}function qd(){var t=nr();if(t&&(t[Nd]!==Sf||Cf===null)){Sf=t[Nd];var e=(Sf||De)[zs]();Cf=Dt(e,Vd)||Dt(e,Hd)}return Cf}function Ty(t){if(t===void 0&&(t=null),!t){var e=nr()||{};t=e?(e.userAgent||De)[zs]():De}var n=(t||De)[zs]();if(Dt(n,Vd)){var r=It()||{};return Ma(parseInt(n[mo](Vd)[1]),r[nS]||0)}else if(Dt(n,Hd)){var i=parseInt(n[mo](Hd)[1]);if(i)return i+4}return null}function va(t){return(kf===null||t===!1)&&(kf=Vw()&&!!nr().sendBeacon),kf}function Tp(t){var e=!1;try{e=!!tt("fetch");var n=tt("Request");e&&t&&n&&(e=Iy(n,"keepalive"))}catch{}return e}function dS(){return Uo===null&&(Uo=typeof XDomainRequest!==ip,Uo&&Ml()&&(Uo=Uo&&!Iy(tt(ky),"withCredentials"))),Uo}function Ml(){var t=!1;try{var e=tt(ky);t=!!e}catch{}return t}function hS(t,e){return t&&t.dispatchEvent&&e?(t.dispatchEvent(e),!0):!1}function pS(t,e){var n=null,r={detail:e||null};if(pe(CustomEvent))n=new CustomEvent(t,r);else{var i=It();i&&i.createEvent&&(n=i.createEvent("CustomEvent"),n.initCustomEvent(t,!0,!0,r))}return n}function gS(t,e,n){var r=pn();if(r&&r.CustomEvent)try{var i={cfg:e||null,customDetails:n||null};return hS(r,pS(t,i))}catch{}return!1}function vS(t){return t.replace(/^([a-zA-Z][a-zA-Z0-9+.-]*:\/\/)([^:@]{1,200}):([^@]{1,200})@(.*)$/,"$1REDACTED:REDACTED@$4")}function mS(t,e){var n,r=st(t,"?");if(r===-1)return t;e&&e.redactQueryParams?n=Ng.concat(e.redactQueryParams):n=Ng;var i=Bt(t,0,r+1),o=Bt(t,r+1),s=De,a=st(o,"#");a!==-1&&(s=Bt(o,a),o=Bt(o,0,a));for(var c=!1,u=0;u<n[he];u++){var l=n[u]+"=";if(st(o,l)!==-1){c=!0;break}}if(!c)return t;var f=[],m=!1;if(o&&o[he])for(var d=o[mo]("&"),u=0;u<d[he];u++){var h=d[u];if(h){var g=st(h,"=");if(g===-1)f[Ee](h);else{var p=h[$d](0,g),v=h[$d](g+1);if(v===De)f[Ee](h);else{for(var _=!1,P=0;P<n[he];P++)if(p===n[P]){_=!0,m=!0;break}_?f[Ee](p+"="+FC):f[Ee](h)}}}}return m?i+f.join("&")+s:t}function vr(t,e){if(!t||!de(t)||t[hy](" ")!==-1)return t;var n=e&&e.redactUrls===!1;if(n)return t;var r=st(t,"@")!==-1,i=st(t,"?")!==-1;if(!r&&!i)return t;try{var o=t;return r&&(o=vS(t)),i&&(o=mS(o,e)),o}catch{return t}}var Ey=4294967296,si=4294967295,xy=123456789,Py=987654321,Dy=!1,ma=xy,ya=Py;function yS(t){t<0&&(t>>>=0),ma=xy+t&si,ya=Py-t&si,Dy=!0}function bS(){try{var t=Rn()&2147483647;yS((Math.random()*Ey^t)+t)}catch{}}function _S(t){return an(Qa()/si*(t+1))>>>0}function Qa(t){var e=0,n=uS()||lS();return n&&n.getRandomValues&&(e=n.getRandomValues(new Uint32Array(1))[0]&si),e===0&&qd()&&(Dy||bS(),e=wS()&si),e===0&&(e=an(Ey*Math.random()|0)),e>>>=0,e}function wS(t){ya=36969*(ya&65535)+(ya>>16)&si,ma=18e3*(ma&65535)+(ma>>16)&si;var e=(ya<<16)+(ma&65535)>>>0&si|0;return e>>>=0,e}function Ep(t){t===void 0&&(t=22);for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=Qa()>>>0,r=0,i=De;i[he]<t;)r++,i+=e.charAt(n&63),n>>>=6,r===5&&(n=(Qa()<<2&4294967295|n&3)>>>0,r=0);return i}var Ry="3.3.11",CS="."+Ep(6),SS=0;function Ay(t){return t.nodeType===1||t.nodeType===9||!+t.nodeType}function kS(t,e){var n=e[t.id];if(!n){n={};try{Ay(e)&&Re(e,t.id,{e:!1,v:n})}catch{}}return n}function mn(t,e){return e===void 0&&(e=!1),qu(t+SS+++(e?"."+Ry:De)+CS)}function My(t){var e={id:mn("_aiData-"+(t||De)+"."+Ry),accept:function(n){return Ay(n)},get:function(n,r,i,o){var s=n[e.id];return s?s[qu(r)]:(o&&(s=kS(e,n),s[qu(r)]=i),i)},kill:function(n,r){if(n&&n[r])try{delete n[r]}catch{}}};return e}function iu(t){return t&&Xt(t)&&!we(t)&&(t.isVal||t.fb||ii(t,"v")||ii(t,"mrg")||ii(t,"ref")||t.set)}function zy(t,e,n){var r,i=n.dfVal||hw;if(e&&n.fb){var o=n.fb;we(o)||(o=[o]);for(var s=0;s<o[he];s++){var a=o[s],c=e[a];if(i(c)?r=c:t&&(c=t.cfg[a],i(c)&&(r=c),t.set(t.cfg,$t(a),c)),i(r))break}}return!i(r)&&i(n.v)&&(r=n.v),r}function Bd(t,e,n){var r=n;if(n&&iu(n)&&(r=zy(t,e,n)),r){iu(r)&&(r=Bd(t,e,r));var i;we(r)?(i=[],i[he]=r[he]):Lt(r)&&(i={}),i&&(Pe(r,function(o,s){s&&iu(s)&&(s=Bd(t,e,s)),i[o]=s}),r=i)}return r}function xp(t,e,n,r){var i,o,s,a=r,c,u,l,f;iu(a)?(i=a.isVal,o=a.set,l=a.rdOnly,f=a.blkVal,c=a.mrg,u=a.ref,!u&&Ze(u)&&(u=!!c),s=zy(t,e,a)):s=r,f&&t.blkVal(e,n);var m,d=!0,h=e[n];(h||!B(h))&&(m=h,d=!1,i&&m!==s&&!i(m)&&(m=s,d=!0),o&&(m=o(m,s,e),d=m===s)),d?s?m=Bd(t,e,s):m=s:(Lt(m)||we(s))&&c&&s&&(Lt(s)||we(s))&&Pe(s,function(g,p){xp(t,m,g,p)}),t.set(e,n,m),u&&t.ref(e,n),l&&t.rdOnly(e,n)}var di=gp("[[ai_dynCfg_1]]"),Uy=gp("[[ai_blkDynCfg_1]]"),IS=gp("[[ai_frcDynCfg_1]]");function Ny(t){if(t){var e;if(we(t)?(e=[],e[he]=t[he]):Lt(t)&&(e={}),e)return Pe(t,function(n,r){e[n]=Ny(r)}),e}return t}function TS(t){if(t){var e=t[di]||t;if(e.cfg&&(e.cfg===t||e.cfg[di]===e))return e}return null}function ES(t){if(t&&(Lt(t)||we(t)))try{t[Uy]=!0}catch{}return t}function If(t,e,n){var r=!1;return n&&!t[e.blkVal]&&(r=n[IS],!r&&!n[Uy]&&(r=Lt(n)||we(n))),r}function $y(t){tr("InvalidAccess:"+t)}var xS=["push","pop","shift","unshift","splice"],Za=function(t,e,n,r){t&&t[pc](3,108,"".concat(n," [").concat(e,"] failed - ")+te(r))};function PS(t,e,n){we(e)&&ee(xS,function(r){var i=e[r];e[r]=function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var a=i[ho](this,o);return Gu(t,e,n,"Patching"),a}})}function Ju(t,e){var n=lC(t,e);return n&&n.get}function DS(t,e,n,r){var i={n,h:[],trk:function(u){u&&u.fn&&(At(i.h,u)===-1&&i.h[Ee](u),t.trk(u,i))},clr:function(u){var l=At(i.h,u);l!==-1&&i.h[wo](l,1)}},o=!0,s=!1;function a(){o&&(s=s||If(a,t,r),r&&!r[di]&&s&&(r=Gu(t,r,n,"Converting")),o=!1);var u=t.act;return u&&i.trk(u),r}a[t.prop]={chng:function(){t.add(i)}};function c(u){if(r!==u){a[t.ro]&&!t.upd&&$y("["+n+"] is read-only:"+te(e)),o&&(s=s||If(a,t,r),o=!1);var l=s&&a[t.rf];if(s)if(l){Pe(r,function(m){r[m]=u?u[m]:Fn});try{Pe(u,function(m,d){zl(t,r,m,d)}),u=r}catch(m){Za((t.hdlr||{})[ft],n,"Assigning",m),s=!1}}else r&&r[di]&&Pe(r,function(m){var d=Ju(r,m);if(d){var h=d[t.prop];h&&h.chng()}});if(u!==r){var f=u&&If(a,t,u);!l&&f&&(u=Gu(t,u,n,"Converting")),r=u,s=f}t.add(i)}}Re(e,i.n,{g:a,s:c})}function zl(t,e,n,r){if(e){var i=Ju(e,n),o=i&&!!i[t.prop];o?e[n]=r:DS(t,e,n,r)}return e}function Tf(t,e,n,r){if(e){var i=Ju(e,n),o=i&&!!i[t.prop],s=r&&r[0],a=r&&r[1],c=r&&r[2];if(!o){if(c)try{ES(e)}catch(u){Za((t.hdlr||{})[ft],n,"Blocking",u)}try{zl(t,e,n,e[n]),i=Ju(e,n)}catch(u){Za((t.hdlr||{})[ft],n,"State",u)}}s&&(i[t.rf]=s),a&&(i[t.ro]=a),c&&(i[t.blkVal]=!0)}return e}function Gu(t,e,n,r){try{Pe(e,function(i,o){zl(t,e,i,o)}),e[di]||(Gn(e,di,{get:function(){return t.hdlr}}),PS(t,e,n))}catch(i){Za((t.hdlr||{})[ft],n,r,i)}return e}var Js="[[ai_",Gs="]]";function RS(t){var e=Ks(Js+"get"+t.uid+Gs),n=Ks(Js+"ro"+t.uid+Gs),r=Ks(Js+"rf"+t.uid+Gs),i=Ks(Js+"blkVal"+t.uid+Gs),o=Ks(Js+"dtl"+t.uid+Gs),s=null,a=null,c;function u(d,h){var g=c.act;try{c.act=d,d&&d[o]&&(ee(d[o],function(v){v.clr(d)}),d[o]=[]),h({cfg:t.cfg,set:t.set.bind(t),setDf:t.setDf.bind(t),ref:t.ref.bind(t),rdOnly:t.rdOnly.bind(t)})}catch(v){var p=t[ft];throw p&&p[pc](1,107,te(v)),v}finally{c.act=g||null}}function l(){if(s){var d=s;s=null,a&&a[Ui](),a=null;var h=[];if(ee(d,function(g){if(g&&(g[o]&&(ee(g[o],function(p){p.clr(g)}),g[o]=null),g.fn))try{u(g,g.fn)}catch(p){h[Ee](p)}}),s)try{l()}catch(g){h[Ee](g)}h[he]>0&&xC("Watcher error(s): ",h)}}function f(d){if(d&&d.h[he]>0){s||(s=[]),a||(a=vn(function(){a=null,l()},0));for(var h=0;h<d.h[he];h++){var g=d.h[h];g&&At(s,g)===-1&&s[Ee](g)}}}function m(d,h){if(d){var g=d[o]=d[o]||[];At(g,h)===-1&&g[Ee](h)}}return c={prop:e,ro:n,rf:r,blkVal:i,hdlr:t,add:f,notify:l,use:u,trk:m},c}function AS(t,e){var n={fn:e,rm:function(){n.fn=null,t=null,e=null}};return Re(n,"toJSON",{v:function(){return"WatcherHandler"+(n.fn?"":"[X]")}}),t.use(n,e),n}function MS(t,e,n){var r=TS(e);if(r)return r;var i=mn("dyncfg",!0),o=e&&n!==!1?e:Ny(e),s;function a(){s.notify()}function c(p,v,_){try{p=zl(s,p,v,_)}catch(P){Za(t,v,"Setting value",P)}return p[v]}function u(p){return AS(s,p)}function l(p,v){s.use(null,function(_){var P=s.upd;try{Ze(v)||(s.upd=v),p(_)}finally{s.upd=P}})}function f(p,v){var _;return Tf(s,p,v,(_={},_[0]=!0,_))[v]}function m(p,v){var _;return Tf(s,p,v,(_={},_[1]=!0,_))[v]}function d(p,v){var _;return Tf(s,p,v,(_={},_[2]=!0,_))[v]}function h(p,v){return v&&Pe(v,function(_,P){xp(g,p,_,P)}),p}var g={uid:null,cfg:o,logger:t,notify:a,set:c,setDf:h,watch:u,ref:f,rdOnly:m,blkVal:d,_block:l};return Re(g,"uid",{c:!1,e:!1,w:!1,v:i}),s=RS(g),Gu(s,o,"config","Creating"),g}function zS(t,e){t?(t[$u](e),t[pc](2,108,e)):$y(e)}function yn(t,e,n,r){var i=MS(n,t||{},r);return e&&i.setDf(i.cfg,e),i}function at(t,e,n){var r=t[di]||t;return r.cfg&&(r.cfg===t||r.cfg[di]===r)?r[Yi](e):(zS(n,OC+te(t)),yn(t,null,n)[Yi](e))}function ls(t,e){if(t&&t[go])return t[go](e)}function Ly(t,e,n){var r;return n||(r=Qn(function(i){n=i})),t&&uC(t)>0?Kt(ls(t[0],e),function(){Ly(Al(t,1),e,n)}):n(),r}var US=500,jg="Microsoft_ApplicationInsights_BypassAjaxInstrumentation";function NS(t,e,n){return!t&&B(t)?e:jm(t)?t:$t(t)[zs]()==="true"}function kn(t){return{mrg:!0,v:t}}function Og(t,e){return{set:t,v:e}}function Qu(t,e,n){return{fb:n,isVal:t,v:e}}function dt(t,e){return{fb:e,set:NS,v:!!t}}function $S(t){return{isVal:de,v:$t(De)}}var Ef=[tu,Ua,nu,Wi],Zu=null,Mc;function LS(t,e){return function(){var n=arguments,r=jy(e);if(r){var i=r.listener;i&&i[t]&&i[t][ho](i,n)}}}function jS(){var t=tt("Microsoft");return t&&(Zu=t.ApplicationInsights),Zu}function jy(t){var e=Zu;return!e&&t.disableDbgExt!==!0&&(e=Zu||jS()),e?e.ChromeDbgExt:null}function OS(t){if(!Mc){Mc={};for(var e=0;e<Ef[he];e++)Mc[Ef[e]]=LS(Ef[e],t)}return Mc}var No,Oy="warnToConsole",FS="AI (Internal): ",WS="AI: ",VS="AITR_",HS={loggingLevelConsole:0,loggingLevelTelemetry:1,maxMessageLimit:25,enableDebug:!1},qS=(No={},No[0]=null,No[1]="errorToConsole",No[2]=Oy,No[3]="debugToConsole",No);function Fg(t){return t?'"'+t[to](/\"/g,De)+'"':De}function xf(t,e){var n=cS();if(n){var r="log";n[t]&&(r=t),pe(n[r])&&n[r](e)}}var Ya=(function(){function t(e,n,r,i){r===void 0&&(r=!1);var o=this;o[Ou]=e,o[eo]=(r?WS:FS)+e;var s=De;vc()&&(s=An().stringify(i));var a=(n?" message:"+Fg(n):De)+(i?" props:"+Fg(s):De);o[eo]+=a}return t.dataType="MessageData",t})();function Co(t,e){return(t||{})[ft]||new Yu(e)}var Yu=(function(){function t(e){this.identifier="DiagnosticLogger",this.queue=[];var n=0,r={},i,o,s,a,c;He(t,this,function(u){c=f(e||{}),u.consoleLoggingLevel=function(){return i},u[pc]=function(h,g,p,v,_){_===void 0&&(_=!1);var P=new Ya(g,p,_,v);if(a)throw te(P);var x=qS[h]||Oy;if(Ze(P[eo]))d("throw"+(h===1?"Critical":"Warning"),P);else{if(_){var R=+P[Ou];!r[R]&&i>=h&&(u[x](P[eo]),r[R]=!0)}else i>=h&&u[x](P[eo]);l(h,P)}},u.debugToConsole=function(h){xf("debug",h),d("warning",h)},u[$u]=function(h){xf("warn",h),d("warning",h)},u.errorToConsole=function(h){xf("error",h),d("error",h)},u.resetInternalMessageCount=function(){n=0,r={}},u.logInternalMessage=l,u[go]=function(h){c&&c.rm(),c=null};function l(h,g){if(!m()){var p=!0,v=VS+g[Ou];if(r[v]?p=!1:r[v]=!0,p&&(h<=o&&(u.queue[Ee](g),n++,d(h===1?"error":"warn",g)),n===s)){var _="Internal events throttle limit per PageView reached for this app.",P=new Ya(23,_,!1);u.queue[Ee](P),h===1?u.errorToConsole(_):u[$u](_)}}}function f(h){return at(yn(h,HS,u).cfg,function(g){var p=g.cfg;i=p[dy],o=p.loggingLevelTelemetry,s=p.maxMessageLimit,a=p.enableDebug})}function m(){return n>=s}function d(h,g){var p=jy(e||{});p&&p[Sr]&&p[Sr](h,g)}})}return t.__ieDyn=1,t})();function Pp(t){return t||new Yu}function G(t,e,n,r,i,o){o===void 0&&(o=!1),Pp(t)[pc](e,n,r,i,o)}function ro(t,e){Pp(t)[$u](e)}function BS(t,e,n){Pp(t).logInternalMessage(e,n)}var Pf,Ur,Wg="toGMTString",Vg="toUTCString",Dp="cookie",Df="expires",Hg="isCookieUseDisabled",ec="disableCookiesUsage",fs="_ckMgr",zc=null,Rf=null,qg=null,Xn,Bg={},el={},KS=(Pf={cookieCfg:kn((Ur={},Ur[Wd]={fb:"cookieDomain",dfVal:no},Ur.path={fb:"cookiePath",dfVal:no},Ur.enabled=Fn,Ur.ignoreCookies=Fn,Ur.blockedCookies=Fn,Ur.disableCookieDefer=!1,Ur)),cookieDomain:Fn,cookiePath:Fn},Pf[ec]=Fn,Pf);function Rp(){!Xn&&(Xn=Km(function(){return It()}))}function XS(t,e){var n=ou[fs]||el[fs];return n||(n=ou[fs]=ou(t,e),el[fs]=n),n}function Uc(t){return t?t.isEnabled():!0}function Fy(t,e){return e&&t&&we(t.ignoreCookies)?At(t.ignoreCookies,e)!==-1:!1}function Kg(t,e){return e&&t&&we(t.blockedCookies)&&At(t.blockedCookies,e)!==-1?!0:Fy(t,e)}function Xg(t,e){var n=e[cs];if(B(n)){var r=void 0;Ze(t[Hg])||(r=!t[Hg]),Ze(t[ec])||(r=!t[ec]),n=r}return n}function Ul(t,e){var n;return t&&(n=t.getCookieMgr()),n||(n=XS(e,(t||{})[ft])),n}function ou(t,e){var n,r,i,o,s,a,c,u,l=[];function f(p){var v,_=(v={},v[bf]=p||"/",v[Df]="Thu, 01 Jan 1970 00:00:01 GMT",v);return qd()||(_["max-age"]="0"),Gg(De,_)}function m(p,v,_,P){var x={},R=Ve(p||De),H=st(R,";");if(H!==-1&&(R=Ve(Ru(p,H)),x=Wy(Bt(p,H+1))),We(x,Wd,_||i,Pu,Ze),!B(v)){var A=qd();if(Ze(x[Df])){var k=Rn(),O=k+v*1e3;if(O>0){var j=new Date;j.setTime(O),We(x,Df,Jg(j,A?Wg:Vg)||Jg(j,A?Wg:Vg)||De,Pu)}}A||We(x,"max-age",De+v,null,Ze)}var K=Hn();return K&&K.protocol==="https:"&&(We(x,"secure",null,null,Ze),Rf===null&&(Rf=!GS((nr()||{})[Nd])),Rf&&We(x,"SameSite","None",null,Ze)),We(x,bf,P||r,null,Ze),Gg(R,x)}function d(p){if(l)for(var v=l[he]-1;v>=0;v--)l[v].n===p&&l[wo](v,1)}function h(){Af(e)&&l&&(ee(l,function(p){Kg(n,p.n)||(p.o===0?c(p.n,p.v):p.o===1&&u(p.n,p.v))}),l=[])}t=yn(t||el,null,e).cfg,o=at(t,function(p){p.setDf(p.cfg,KS),n=p.ref(p.cfg,"cookieCfg"),r=n[bf]||"/",i=n[Wd],n.disableCookieDefer?l=null:l===null&&(l=[]);var v=s;s=Xg(t,n)!==!1,a=n.getCookie||JS,c=n.setCookie||Qg,u=n.delCookie||Qg,!v&&s&&l&&h()},e);var g={isEnabled:function(){var p=Xg(t,n)!==!1&&s&&Af(e),v=el[fs];return p&&v&&g!==v&&(p=Uc(v)),p},setEnabled:function(p){n[cs]=p,Ze(t[ec])||(t[ec]=!p)},set:function(p,v,_,P,x){var R=!1,H=Kg(n,p);if(!H){var A=m(v,_,P,x);Uc(g)?(c(p,A),R=!0):l&&(d(p),l[Ee]({n:p,o:0,v:A}),R=!0)}return R},get:function(p){var v=De,_=Fy(n,p);if(!_){if(Uc(g))v=a(p);else if(l)for(var P=l[he]-1;P>=0;P--){var x=l[P];if(x.n===p){if(x.o===0){var R=x.v,H=st(R,";");v=Ve(H!==-1?Ru(R,H):R)}break}}}return v},del:function(p,v){var _=!1;return Uc(g)?_=g.purge(p,v):l&&(d(p),l[Ee]({n:p,o:1,v:f(v)}),_=!0),_},purge:function(p,v){var _=!1;return Af(e)&&(u(p,f(v)),_=!0),_},unload:function(p){o&&o.rm(),o=null,l=null}};return g[fs]=g,g}function Af(t){if(zc===null){zc=!1,!Xn&&Rp();try{var e=Xn.v||{};zc=e[Dp]!==void 0}catch(n){G(t,2,68,"Cannot access document.cookie - "+Ne(n),{exception:te(n)})}}return zc}function Wy(t){var e={};if(t&&t[he]){var n=Ve(t)[mo](";");ee(n,function(r){if(r=Ve(r||De),r){var i=st(r,"=");i===-1?e[r]=null:e[Ve(Ru(r,i))]=Ve(Bt(r,i+1))}})}return e}function Jg(t,e){return pe(t[e])?t[e]():null}function Gg(t,e){var n=t||De;return Pe(e,function(r,i){n+="; "+r+(B(i)?De:"="+i)}),n}function JS(t){var e=De;if(!Xn&&Rp(),Xn.v){var n=Xn.v[Dp]||De;qg!==n&&(Bg=Wy(n),qg=n),e=Ve(Bg[t]||De)}return e}function Qg(t,e){!Xn&&Rp(),Xn.v&&(Xn.v[Dp]=t+"="+e)}function GS(t){return de(t)?!!(Dt(t,"CPU iPhone OS 12")||Dt(t,"iPad; CPU OS 12")||Dt(t,"Macintosh; Intel Mac OS X 10_14")&&Dt(t,"Version/")&&Dt(t,"Safari")||Dt(t,"Macintosh; Intel Mac OS X 10_14")&&ay(t,"AppleWebKit/605.1.15 (KHTML, like Gecko)")||Dt(t,"Chrome/5")||Dt(t,"Chrome/6")||Dt(t,"UnrealEngine")&&!Dt(t,"Chrome")||Dt(t,"UCBrowser/12")||Dt(t,"UCBrowser/11")):!1}var QS={perfEvtsSendAll:!1};function ZS(t){t.h=null;var e=t.cb;t.cb=[],ee(e,function(n){rt(n.fn,[n.arg])})}function Nr(t,e,n,r){ee(t,function(i){i&&i[e]&&(n?(n.cb[Ee]({fn:r,arg:i}),n.h=n.h||vn(ZS,0,n)):rt(r,[i]))})}var YS=(function(){function t(e){this.listeners=[];var n,r,i=[],o={h:null,cb:[]},s=yn(e,QS);r=s[Yi](function(a){n=!!a.cfg.perfEvtsSendAll}),He(t,this,function(a){Re(a,"listeners",{g:function(){return i}}),a[ju]=function(c){i[Ee](c)},a[Lu]=function(c){for(var u=At(i,c);u>-1;)i[wo](u,1),u=At(i,c)},a[tu]=function(c){Nr(i,tu,o,function(u){u[tu](c)})},a[Ua]=function(c,u,l){Nr(i,Ua,o,function(f){f[Ua](c,u,l)})},a[nu]=function(c,u){Nr(i,nu,u?o:null,function(l){l[nu](c,u)})},a[Wi]=function(c){c&&(n||!c[Ld]())&&Nr(i,Wi,null,function(u){c.isAsync?vn(function(){return u[Wi](c)},0):u[Wi](c)})},a[vf]=function(c){c&&c[he]&&Nr(i,vf,o,function(u){u[vf](c)})},a[mf]=function(c){c&&c[wn]&&Nr(i,mf,o,function(u){u[mf](c)})},a[yf]=function(c,u){if(c>0){var l=u||0;Nr(i,yf,o,function(f){f[yf](c,l)})}},a[go]=function(c){var u=function(){r&&r.rm(),r=null,i=[],o.h&&o.h[Ui](),o.h=null,o.cb=[]},l;if(Nr(i,"unload",null,function(f){var m=f[go](c);m&&(l||(l=[]),l[Ee](m))}),l)return Qn(function(f){return Kt(jC(l),function(){u(),f()})});u()}})}return t.__ieDyn=1,t})(),ws="ctx",Kd="ParentContextKey",Na="ChildrenContextKey",ek=null,su=(function(){function t(e,n,r){var i=this;if(i.start=Rn(),i[po]=e,i.isAsync=r,i[Ld]=function(){return!1},pe(n)){var o;Re(i,"payload",{g:function(){return!o&&pe(n)&&(o=n(),n=null),o}})}i[bs]=function(s){return s?s===t[Kd]||s===t[Na]?i[s]:(i[ws]||{})[s]:null},i[jn]=function(s,a){if(s)if(s===t[Kd])i[s]||(i[Ld]=function(){return!0}),i[s]=a;else if(s===t[Na])i[s]=a;else{var c=i[ws]=i[ws]||{};c[s]=a}},i.complete=function(){var s=0,a=i[bs](t[Na]);if(we(a))for(var c=0;c<a[he];c++){var u=a[c];u&&(s+=u.time)}i.time=Rn()-i.start,i.exTime=i.time-s,i.complete=function(){}}}return t.ParentContextKey="parent",t.ChildrenContextKey="childEvts",t})(),tk=(function(){function t(e){this.ctx={},He(t,this,function(n){n.create=function(r,i,o){return new su(r,i,o)},n.fire=function(r){r&&(r.complete(),e&&pe(e[Wi])&&e[Wi](r))},n[jn]=function(r,i){if(r){var o=n[ws]=n[ws]||{};o[r]=i}},n[bs]=function(r){return(n[ws]||{})[r]}})}return t.__ieDyn=1,t})(),Mf="CoreUtils.doPerf";function tl(t,e,n,r,i){if(t){var o=t;if(o[Hu]&&(o=o[Hu]()),o){var s=void 0,a=o[bs](Mf);try{if(s=o.create(e(),r,i),s){if(a&&s[jn]&&(s[jn](su[Kd],a),a[bs]&&a[jn])){var c=a[bs](su[Na]);c||(c=[],a[jn](su[Na],c)),c[Ee](s)}return o[jn](Mf,s),n(s)}}catch(u){s&&s[jn]&&s[jn]("exception",u)}finally{s&&o.fire(s),o[jn](Mf,a)}}}return n()}function nk(){return ek}function ti(){for(var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],e=De,n,r=0;r<4;r++)n=Qa(),e+=t[n&15]+t[n>>4&15]+t[n>>8&15]+t[n>>12&15]+t[n>>16&15]+t[n>>20&15]+t[n>>24&15]+t[n>>28&15];var i=t[8+(Qa()&3)|0];return Gr(e,0,8)+Gr(e,9,4)+"4"+Gr(e,13,3)+i+Gr(e,16,3)+Gr(e,19,12)}var Xd="00",rk="ff",Vy="00000000000000000000000000000000",Hy="0000000000000000";function mc(t,e,n){return t&&t[he]===e&&t!==n?!!t.match(/^[\da-f]*$/i):!1}function Zg(t,e,n){return mc(t,e)?t:n}function ik(t){(isNaN(t)||t<0||t>255)&&(t=1);for(var e=t.toString(16);e[he]<2;)e="0"+e;return e}function Yg(t,e,n,r){return{version:mc(r,2,rk)?r:Xd,traceId:Ap(t)?t:ti(),spanId:Mp(e)?e:Ru(ti(),16),traceFlags:n>=0&&n<=255?n:1}}function Ap(t){return mc(t,32,Vy)}function Mp(t){return mc(t,16,Hy)}function ev(t){if(t){var e=ik(t[jd]);mc(e,2)||(e="01");var n=t[Ud]||Xd;return n!=="00"&&n!=="ff"&&(n=Xd),"".concat(n.toLowerCase(),"-").concat(Zg(t.traceId,32,Vy).toLowerCase(),"-").concat(Zg(t.spanId,16,Hy).toLowerCase(),"-").concat(e.toLowerCase())}return""}function ok(t){var e=t.getElementsByTagName("script"),n=[];return ee(e,function(r){var i=r[lf]("src");if(i){var o=r[lf]("crossorigin"),s=r.hasAttribute("async")===!0,a=r.hasAttribute("defer")===!0,c=r[lf]("referrerpolicy"),u={url:i};o&&(u.crossOrigin=o),s&&(u.async=s),a&&(u.defer=a),c&&(u.referrerPolicy=c),n[Ee](u)}}),n}var sk=My("plugin");function io(t){return sk.get(t,"state",{},!0)}function tv(t,e){for(var n=[],r=null,i=t[Kn](),o;i;){var s=i[Ka]();if(s){r&&r[Ja]&&s[Zn]&&r[Ja](s),o=io(s);var a=!!o[Vn];s[Vn]&&(a=s[Vn]()),a||n[Ee](s),r=s,i=i[Kn]()}}ee(n,function(c){var u=t[yt]();c[gc](t.getCfg(),u,e,t[Kn]()),o=io(c),!c[yt]&&!o[yt]&&(o[yt]=u),o[Vn]=!0,delete o[hr]})}function zf(t){return t.sort(function(e,n){var r=0;if(n){var i=n[Zn];e[Zn]?r=i?e[Vu]-n[Vu]:1:i&&(r=-1)}else r=e?1:-1;return r})}function ak(t){var e={};return{getName:function(){return e[po]},setName:function(n){e[po]=n},getTraceId:function(){return e.traceId},setTraceId:function(n){Ap(n)&&(e.traceId=n)},getSpanId:function(){return e.spanId},setSpanId:function(n){Mp(n)&&(e.spanId=n)},getTraceFlags:function(){return e[jd]},setTraceFlags:function(n){e[jd]=n}}}var ck="TelemetryPluginChain",nv="_hasRun",rv="_getTelCtx",iv=0;function uk(t,e,n){for(;t;){if(t[Ka]()===n)return t;t=t[Kn]()}return yo([n],e.config||{},e)}function zp(t,e,n,r){var i=null,o=[];e||(e=yn({},null,n[ft])),r!==null&&(i=r?uk(t,n,r):t);var s={_next:c,ctx:{core:function(){return n},diagLog:function(){return Co(n,e.cfg)},getCfg:function(){return e.cfg},getExtCfg:l,getConfig:f,hasNext:function(){return!!i},getNext:function(){return i},setNext:function(d){i=d},iterate:m,onComplete:a}};function a(d,h){for(var g=[],p=2;p<arguments.length;p++)g[p-2]=arguments[p];d&&o[Ee]({func:d,self:Ze(h)?s.ctx:h,args:g})}function c(){var d=i;if(i=d?d[Kn]():null,!d){var h=o;h&&h[he]>0&&(ee(h,function(g){try{g.func.call(g.self,g.args)}catch(p){G(n[ft],2,73,"Unexpected Exception during onComplete - "+te(p))}}),o=[])}return d}function u(d,h){var g=null,p=e.cfg;if(p&&d){var v=p[_s];!v&&h&&(v={}),p[_s]=v,v=e.ref(p,_s),v&&(g=v[d],!g&&h&&(g={}),v[d]=g,g=e.ref(v,d))}return g}function l(d,h){var g=u(d,!0);return h&&Pe(h,function(p,v){if(B(g[p])){var _=e.cfg[p];(_||!B(_))&&(g[p]=_)}xp(e,g,p,v)}),e.setDf(g,h)}function f(d,h,g){g===void 0&&(g=!1);var p,v=u(d,!1),_=e.cfg;return v&&(v[h]||!B(v[h]))?p=v[h]:(_[h]||!B(_[h]))&&(p=_[h]),p||!B(p)?p:g}function m(d){for(var h;h=s._next();){var g=h[Ka]();g&&d(g)}}return s}function Mn(t,e,n,r){var i=yn(e),o=zp(t,i,n,r),s=o.ctx;function a(u){var l=o._next();return l&&l[Zn](u,s),!l}function c(u,l){return u===void 0&&(u=null),we(u)&&(u=yo(u,i.cfg,n,l)),Mn(u||s[Kn](),i.cfg,n,l)}return s[Nt]=a,s[vo]=c,s}function nl(t,e,n){var r=yn(e.config),i=zp(t,r,e,n),o=i.ctx;function s(c){var u=i._next();return u&&u[go](o,c),!u}function a(c,u){return c===void 0&&(c=null),we(c)&&(c=yo(c,r.cfg,e,u)),nl(c||o[Kn](),e,u)}return o[Nt]=s,o[vo]=a,o}function Up(t,e,n){var r=yn(e.config),i=zp(t,r,e,n),o=i.ctx;function s(c){return o.iterate(function(u){pe(u[Xa])&&u[Xa](o,c)})}function a(c,u){return c===void 0&&(c=null),we(c)&&(c=yo(c,r.cfg,e,u)),Up(c||o[Kn](),e,u)}return o[Nt]=s,o[vo]=a,o}function yo(t,e,n,r){var i=null,o=!r;if(we(t)&&t[he]>0){var s=null;ee(t,function(a){if(!o&&r===a&&(o=!0),o&&a&&pe(a[Zn])){var c=lk(a,e,n);i||(i=c),s&&s._setNext(c),s=c}})}return r&&!i?yo([r],e,n):i}function lk(t,e,n){var r=null,i=pe(t[Zn]),o=pe(t[Ja]),s;t?s=t[Qr]+"-"+t[Vu]+"-"+iv++:s="Unknown-0-"+iv++;var a={getPlugin:function(){return t},getNext:function(){return r},processTelemetry:l,unload:f,update:m,_id:s,_setNext:function(d){r=d}};function c(){var d;return t&&pe(t[rv])&&(d=t[rv]()),d||(d=Mn(a,e,n)),d}function u(d,h,g,p,v){var _=!1,P=t?t[Qr]:ck,x=d[nv];return x||(x=d[nv]={}),d.setNext(r),t&&tl(d[yt](),function(){return P+":"+g},function(){x[s]=!0;try{var R=r?r._id:De;R&&(x[R]=!1),_=h(d)}catch(A){var H=r?x[r._id]:!0;H&&(_=!0),(!r||!H)&&G(d[Sr](),1,73,"Plugin ["+P+"] failed during "+g+" - "+te(A)+", run flags: "+te(x))}},p,v),_}function l(d,h){h=h||c();function g(p){if(!t||!i)return!1;var v=io(t);return v[hr]||v[Fd]?!1:(o&&t[Ja](r),t[Zn](d,p),!0)}u(h,g,"processTelemetry",function(){return{item:d}},!d.sync)||h[Nt](d)}function f(d,h){function g(){var p=!1;if(t){var v=io(t),_=t[yt]||v[yt];t&&(!_||_===d.core())&&!v[hr]&&(v[yt]=null,v[hr]=!0,v[Vn]=!1,t[hr]&&t[hr](d,h)===!0&&(p=!0))}return p}u(d,g,"unload",function(){},h.isAsync)||d[Nt](h)}function m(d,h){function g(){var p=!1;if(t){var v=io(t),_=t[yt]||v[yt];t&&(!_||_===d.core())&&!v[hr]&&t[Xa]&&t[Xa](d,h)===!0&&(p=!0)}return p}u(d,g,"update",function(){},!1)||d[Nt](h)}return Dn(a)}function qy(){var t=[];function e(r){r&&t[Ee](r)}function n(r,i){ee(t,function(o){try{o(r,i)}catch(s){G(r[Sr](),2,73,"Unexpected error calling unload handler - "+te(s))}}),t=[]}return{add:e,run:n}}function By(){var t=[];function e(r){var i=t;t=[],ee(i,function(o){try{(o.rm||o.remove).call(o)}catch(s){G(r,2,73,"Unloading:"+te(s))}})}function n(r){r&&as(t,r)}return{run:e,add:n}}var Uf,$r="getPlugin",fk=(Uf={},Uf[_s]={isVal:no,v:{}},Uf),So=(function(){function t(){var e=this,n,r,i,o,s;u(),He(t,e,function(l){l[gc]=function(f,m,d,h){c(f,m,h),n=!0},l[hr]=function(f,m){var d=l[yt];if(!d||f&&d!==f[yt]())return;var h,g=!1,p=f||nl(null,d,i&&i[$r]?i[$r]():i),v=m||{reason:0,isAsync:!1};function _(){g||(g=!0,o.run(p,m),s.run(p[Sr]()),h===!0&&p[Nt](v),u())}return!l[Fu]||l[Fu](p,v,_)!==!0?_():h=!0,h},l[Xa]=function(f,m){var d=l[yt];if(!d||f&&d!==f[yt]())return;var h,g=!1,p=f||Up(null,d,i&&i[$r]?i[$r]():i),v=m||{reason:0};function _(){g||(g=!0,c(p.getCfg(),p.core(),p[Kn]()))}return!l._doUpdate||l._doUpdate(p,v,_)!==!0?_():h=!0,h},Bu(l,"_addUnloadCb",function(){return o},"add"),Bu(l,"_addHook",function(){return s},"add"),Re(l,"_unloadHooks",{g:function(){return s}})}),e[Sr]=function(l){return a(l)[Sr]()},e[Vn]=function(){return n},e.setInitialized=function(l){n=l},e[Ja]=function(l){i=l},e[Nt]=function(l,f){f?f[Nt](l):i&&pe(i[Zn])&&i[Zn](l,null)},e._getTelCtx=a;function a(l){l===void 0&&(l=null);var f=l;if(!f){var m=r||Mn(null,{},e[yt]);i&&i[$r]?f=m[vo](null,i[$r]):f=m[vo](null,i)}return f}function c(l,f,m){yn(l,fk,Co(f)),!m&&f&&(m=f[fy]()[Kn]());var d=i;i&&i[$r]&&(d=i[$r]()),e[yt]=f,r=Mn(m,l,f,d)}function u(){n=!1,e[yt]=null,r=null,i=null,s=By(),o=qy()}}return t.__ieDyn=1,t})();function dk(t,e,n){var r={id:e,fn:n};as(t,r);var i={remove:function(){ee(t,function(o,s){if(o.id===r.id)return t[wo](s,1),-1})}};return i}function hk(t,e,n){for(var r=!1,i=t[he],o=0;o<i;++o){var s=t[o];if(s)try{if(s.fn[ho](null,[e])===!1){r=!0;break}}catch(a){G(n,2,64,"Telemetry initializer failed: "+Ne(a),{exception:te(a)},!0)}}return!r}var pk=(function(t){rr(e,t);function e(){var n=t.call(this)||this;n.identifier="TelemetryInitializerPlugin",n.priority=199;var r,i;o(),He(e,n,function(s,a){s.addTelemetryInitializer=function(c){return dk(i,r++,c)},s[Zn]=function(c,u){hk(i,c,u?u[Sr]():s[Sr]())&&s[Nt](c,u)},s[Fu]=function(){o()}});function o(){r=0,i=[]}return n}return e.__ieDyn=1,e})(So),Lr,Ky="Plugins must provide initialize method",gk="_notificationManager",ov="SDK is still unloading...",vk="SDK is not initialized",mk=100,yk=5e4,Nf=Fs((Lr={cookieCfg:{}},Lr[Jo]={rdOnly:!0,ref:!0,v:[]},Lr[Xo]={rdOnly:!0,ref:!0,v:[]},Lr[_s]={ref:!0,v:{}},Lr[Od]=Fn,Lr.loggingLevelConsole=0,Lr.diagnosticLogInterval=Fn,Lr));function bk(t,e){return new tk(e)}function _k(t,e,n){var r=[],i=[],o={};return ee(n,function(s){(B(s)||B(s[gc]))&&Yt(Ky);var a=s[Vu],c=s[Qr];s&&a&&(B(o[a])?o[a]=c:ro(t,"Two extensions have same priority #"+a+" - "+o[a]+", "+c)),!a||a<e?r[Ee](s):i[Ee](s)}),{core:r,channels:i}}function sv(t,e){var n=!1;return ee(e,function(r){if(r===t)return n=!0,-1}),n}function Jd(t,e,n,r){n&&Pe(n,function(i,o){r&&Lt(o)&&Lt(e[i])&&Jd(t,e[i],o,r),r&&Lt(o)&&Lt(e[i])?Jd(t,e[i],o,r):t.set(e,i,o)})}function av(t,e){var n=null,r=-1;return ee(t,function(i,o){if(i.w===e)return n=i,r=o,-1}),{i:r,l:n}}function wk(t,e){var n=av(t,e).l;return n||(n={w:e,rm:function(){var r=av(t,e);r.i!==-1&&t[wo](r.i,1)}},t[Ee](n)),n}function Ck(t,e,n){ee(e,function(r){var i=at(t,r.w,n);delete r.w,r.rm=function(){i.rm()}})}function Sk(t,e,n,r){return e.add(t[Yi](function(i){var o=i.cfg.disableDbgExt;o===!0&&r&&(n[Lu](r),r=null),n&&!r&&o!==!0&&(r=OS(i.cfg),n[ju](r))})),r}function kk(t){return Re({rm:function(){t.rm()}},"toJSON",{v:function(){return"aicore::onCfgChange<"+JSON.stringify(t)+">"}})}var Ik=(function(){function t(){var e,n,r,i,o,s,a,c,u,l,f,m,d,h,g,p,v,_,P,x,R,H,A,k,O,j,K,re,se,b,E,q,M;He(t,this,function(D){U(),D._getDbgPlgTargets=function(){return[A,i]},D[Vn]=function(){return n},D.activeStatus=function(){return j},D._setPendingStatus=function(){j=3},D[gc]=function($,Z,ue,ne){d&&Yt(ov),D[Vn]()&&Yt("Core cannot be initialized more than once"),e=yn($,Nf,ue||D[ft],!1),$=e.cfg,un(e[Yi](function(W){var F=W.cfg;re=F.initInMemoMaxSize||mk,ce(F);var X=W.ref(W.cfg,_s);Pe(X,function(ie){W.ref(X,ie)})})),o=ne,P=Sk(e,_,o&&D[Pc](),P),Oe(),D[ft]=ue;var S=$[Jo];if(l=[],l[Ee].apply(l,kg(kg([],Z,!1),S)),f=$[Xo],Y(null),(!m||m[he]===0)&&Yt("No "+Xo+" available"),f&&f[he]>1){var z=D[Ka]("TeeChannelController");(!z||!z.plugin)&&G(r,1,28,"TeeChannel required")}Ck($,H,r),H=null,n=!0,j===Kr.ACTIVE&&V()},D.getChannels=function(){var $=[];return m&&ee(m,function(Z){$[Ee](Z)}),Dn($)},D.track=function($){tl(D[Hu](),function(){return"AppInsightsCore:track"},function(){$===null&&(ir($),Yt("Invalid telemetry item")),!$[po]&&B($[po])&&(ir($),Yt("telemetry name required")),$.iKey=$.iKey||R,$.time=$.time||Us(new Date),$.ver=$.ver||"4.0",!d&&D[Vn]()&&j===Kr.ACTIVE?J()[Nt]($):j!==Kr.INACTIVE&&i[he]<=re&&i[Ee]($)},function(){return{item:$}},!$.sync)},D[fy]=J,D[Pc]=function(){return o||(o=new YS(e.cfg),D[gk]=o),o},D[ju]=function($){D.getNotifyMgr()[ju]($)},D[Lu]=function($){o&&o[Lu]($)},D.getCookieMgr=function(){return c||(c=ou(e.cfg,D[ft])),c},D.setCookieMgr=function($){c!==$&&(ls(c,!1),c=$)},D[Hu]=function(){return s||a||nk()},D.setPerfMgr=function($){s=$},D.eventCnt=function(){return i[he]},D.releaseQueue=function(){if(n&&i[he]>0){var $=i;i=[],j===2?ee($,function(Z){Z.iKey=Z.iKey||R,J()[Nt](Z)}):G(r,2,20,"core init status is not active")}},D.pollInternalLogs=function($){return g=$||null,M=!1,E&&E[Ui](),w(!0)};function ce($){var Z=$.instrumentationKey,ue=$.endpointUrl;if(j!==3){if(B(Z)){R=null,j=Kr.INACTIVE;var ne="Please provide instrumentation key";n?(G(r,1,100,ne),V()):Yt(ne);return}var S=[];fi(Z)?(S[Ee](Z),R=null):R=Z,fi(ue)?(S[Ee](ue),K=null):K=ue,S[he]?me($,S):oe()}}function me($,Z){se=!1,j=3;var ue=no($.initTimeOut)?$.initTimeOut:yk,ne=LC(Z);b&&b[Ui](),b=vn(function(){b=null,se||oe()},ue),Kt(ne,function(S){try{if(se)return;if(!S.rejected){var z=S[Fi];if(z&&z[he]){var W=z[0];if(R=W&&W[Fi],z[he]>1){var F=z[1];K=F&&F[Fi]}}R&&($.instrumentationKey=R,$.endpointUrl=K)}oe()}catch{se||oe()}})}function oe(){se=!0,B(R)?(j=Kr.INACTIVE,G(r,1,112,"ikey can't be resolved from promises")):j=Kr.ACTIVE,V()}function V(){n&&(D.releaseQueue(),D.pollInternalLogs())}function w($){if((!E||!E[cs])&&!M){var Z=$||r&&r.queue[he]>0;Z&&(q||(q=!0,un(e[Yi](function(ue){var ne=ue.cfg.diagnosticLogInterval;(!ne||!(ne>0))&&(ne=1e4);var S=!1;E&&(S=E[cs],E[Ui]()),E=yC(Ue,ne),E.unref(),E[cs]=S}))),E[cs]=!0)}return E}D[Pg]=function(){M=!0,E&&E[Ui](),Ue()},us(D,function(){return h},["addTelemetryInitializer"]),D[go]=function($,Z,ue){$===void 0&&($=!0),n||Yt(vk),d&&Yt(ov);var ne={reason:50,isAsync:$,flushComplete:!1},S;$&&!Z&&(S=Qn(function(F){Z=F}));var z=nl(Ie(),D);z[Dc](function(){_.run(D[ft]),Ly([c,o,r],$,function(){U(),Z&&Z(ne)})},D);function W(F){ne.flushComplete=F,d=!0,v.run(z,ne),D[Pg](),z[Nt](ne)}return Ue(),Et($,W,6,ue),S},D[Ka]=_e,D.addPlugin=function($,Z,ue,ne){if(!$){ne&&ne(!1),xt(Ky);return}var S=_e($[Qr]);if(S&&!Z){ne&&ne(!1),xt("Plugin ["+$[Qr]+"] is already loaded!");return}var z={reason:16};function W(ie){l[Ee]($),z.added=[$],Y(z),ne&&ne(!0)}if(S){var F=[S.plugin],X={reason:2,isAsync:!!ue};Te(F,X,function(ie){ie?(z.removed=F,z.reason|=32,W()):ne&&ne(!1)})}else W()},D.updateCfg=function($,Z){Z===void 0&&(Z=!0);var ue;if(D[Vn]()){ue={reason:1,cfg:e.cfg,oldCfg:Sg({},e.cfg),newConfig:Sg({},$),merge:Z},$=ue.newConfig;var ne=e.cfg;$[Jo]=ne[Jo],$[Xo]=ne[Xo]}e._block(function(S){var z=S.cfg;Jd(S,z,$,Z),Z||Pe(z,function(W){ii($,W)||S.set(z,W,Fn)}),S.setDf(z,Nf)},!0),e.notify(),ue&&Fe(ue)},D.evtNamespace=function(){return p},D.flush=Et,D.getTraceCtx=function($){return x||(x=ak()),x},D.setTraceCtx=function($){x=$||null},D.addUnloadHook=un,Bu(D,"addUnloadCb",function(){return v},"add"),D.onCfgChange=function($){var Z;return n?Z=at(e.cfg,$,D[ft]):Z=wk(H,$),kk(Z)},D.getWParam=function(){return Jm()||e.cfg.enableWParam?0:-1};function y(){var $={};k=[];var Z=function(ue){ue&&ee(ue,function(ne){if(ne[Qr]&&ne[Ud]&&!$[ne.identifier]){var S=ne[Qr]+"="+ne[Ud];k[Ee](S),$[ne.identifier]=ne}})};Z(m),f&&ee(f,function(ue){Z(ue)}),Z(l)}function U(){n=!1,e=yn({},Nf,D[ft]),e.cfg[dy]=1,Re(D,"config",{g:function(){return e.cfg},s:function(Z){D.updateCfg(Z,!1)}}),Re(D,"pluginVersionStringArr",{g:function(){return k||y(),k}}),Re(D,"pluginVersionString",{g:function(){return O||(k||y(),O=k.join(";")),O||De}}),Re(D,"logger",{g:function(){return r||(r=new Yu(e.cfg),e[ft]=r),r},s:function(Z){e[ft]=Z,r!==Z&&(ls(r,!1),r=Z)}}),D[ft]=new Yu(e.cfg),A=[];var $=D.config[Jo]||[];$.splice(0,$[he]),as($,A),h=new pk,i=[],ls(o,!1),o=null,s=null,a=null,ls(c,!1),c=null,u=null,l=[],f=null,m=null,d=!1,g=null,p=mn("AIBaseCore",!0),v=qy(),x=null,R=null,_=By(),H=[],O=null,k=null,M=!1,E=null,q=!1,j=0,K=null,re=null,se=!1,b=null}function J(){var $=Mn(Ie(),e.cfg,D);return $[Dc](w),$}function Y($){var Z=_k(D[ft],US,l);u=null,O=null,k=null,m=(f||[])[0]||[],m=zf(as(m,Z[Xo]));var ue=as(zf(Z[yt]),m);A=Dn(ue);var ne=D.config[Jo]||[];ne.splice(0,ne[he]),as(ne,A);var S=J();m&&m[he]>0&&tv(S[vo](m),ue),tv(S,ue),$&&Fe($)}function _e($){var Z=null,ue=null,ne=[];return ee(A,function(S){if(S[Qr]===$&&S!==h)return ue=S,-1;S.getChannel&&ne[Ee](S)}),!ue&&ne[he]>0&&ee(ne,function(S){if(ue=S.getChannel($),!ue)return-1}),ue&&(Z={plugin:ue,setEnabled:function(S){io(ue)[Fd]=!S},isEnabled:function(){var S=io(ue);return!S[hr]&&!S[Fd]},remove:function(S,z){S===void 0&&(S=!0);var W=[ue],F={reason:1,isAsync:S};Te(W,F,function(X){X&&Y({reason:32,removed:W}),z&&z(X)})}}),Z}function Ie(){if(!u){var $=(A||[]).slice();At($,h)===-1&&$[Ee](h),u=yo(zf($),e.cfg,D)}return u}function Te($,Z,ue){if($&&$[he]>0){var ne=yo($,e.cfg,D),S=nl(ne,D);S[Dc](function(){var z=!1,W=[];ee(l,function(X,ie){sv(X,$)?z=!0:W[Ee](X)}),l=W,O=null,k=null;var F=[];f&&(ee(f,function(X,ie){var le=[];ee(X,function(ke){sv(ke,$)?z=!0:le[Ee](ke)}),F[Ee](le)}),f=F),ue&&ue(z),w()}),S[Nt](Z)}else ue(!1)}function Ue(){if(r&&r.queue){var $=r.queue.slice(0);r.queue[he]=0,ee($,function(Z){var ue={name:g||"InternalMessageId: "+Z[Ou],iKey:R,time:Us(new Date),baseType:Ya.dataType,baseData:{message:Z[eo]}};D.track(ue)})}}function Et($,Z,ue,ne){var S=1,z=!1,W=null;ne=ne||5e3;function F(){S--,z&&S===0&&(W&&W[Ui](),W=null,Z&&Z(z),Z=null)}if(m&&m[he]>0){var X=J()[vo](m);X.iterate(function(ie){if(ie.flush){S++;var le=!1;ie.flush($,function(){le=!0,F()},ue)||le||($&&W==null?W=vn(function(){W=null,F()},ne):F())}})}return z=!0,F(),!0}function Oe(){var $;un(e[Yi](function(Z){var ue=Z.cfg.enablePerfMgr;if(ue){var ne=Z.cfg[Od];($!==ne||!$)&&(ne||(ne=bk),zt(Z.cfg,Od,ne),$=ne,a=null),!s&&!a&&pe(ne)&&(a=ne(D,D[Pc]()))}else a=null,$=null}))}function Fe($){var Z=Up(Ie(),D);Z[Dc](w),(!D._updateHook||D._updateHook(Z,$)!==!0)&&Z[Nt]($)}function xt($){var Z=D[ft];Z?(G(Z,2,73,$),w()):Yt($)}function ir($){var Z=D[Pc]();Z&&Z[Ua]([$],2)}function un($){_.add($)}})}return t.__ieDyn=1,t})();function $f(t,e){try{if(t&&t!==""){var n=An().parse(t);if(n&&n[Ag]&&n[Ag]>=n.itemsAccepted&&n.itemsReceived-n.itemsAccepted===n.errors[he])return n}}catch(r){G(e,1,43,"Cannot parse the response. "+(r[po]||te(r)),{response:t})}return null}var _n="",Tk="NoResponseBody",cv="&"+Tk+"=true",Lf="POST",Ek=(function(){function t(){var e=0,n,r,i,o,s,a,c,u,l,f,m,d,h,g;He(t,this,function(p,v){var _=!0;se(),p[gc]=function(b,E){i=E,r&&G(i,1,28,"Sender is already initialized"),p.SetConfig(b),r=!0},p._getDbgPlgTargets=function(){return[r,o,a,n]},p.SetConfig=function(b){try{if(s=b.senderOnCompleteCallBack||{},a=!!b.disableCredentials,c=b.fetchCredentials,o=!!b.isOneDs,n=!!b.enableSendPromise,l=!!b.disableXhr,f=!!b.disableBeacon,m=!!b.disableBeaconSync,g=b.timeWrapper,h=!!b.addNoResponse,d=!!b.disableFetchKeepAlive,u={sendPOST:j},o||(_=!1),a){var E=Hn();E&&E.protocol&&E.protocol[zs]()==="file:"&&(_=!1)}return!0}catch{}return!1},p.getSyncFetchPayload=function(){return e},p.getSenderInst=function(b,E){return b&&b[he]?H(b,E):null},p.getFallbackInst=function(){return u},p[Fu]=function(b,E){se()},p.preparePayload=function(b,E,q,M){if(!E||M||!q[wn]){b(q);return}try{var D=tt("CompressionStream");if(!pe(D)){b(q);return}var ce=new ReadableStream({start:function(U){U.enqueue(de(q[wn])?new TextEncoder().encode(q[wn]):q[wn]),U.close()}}),me=ce.pipeThrough(new D("gzip")),oe=me.getReader(),V=[],w=0,y=!1;return Kt(oe.read(),function U(J){if(!y&&!J.rejected){var Y=J[Fi];if(!Y.done)return V[Ee](Y[Fi]),w+=Y.value[he],Kt(oe.read(),U);for(var _e=new Uint8Array(w),Ie=0,Te=0,Ue=V;Te<Ue.length;Te++){var Et=Ue[Te];_e.set(Et,Ie),Ie+=Et[he]}q[wn]=_e,q[Rc]["Content-Encoding"]="gzip",q._chunkCount=V[he]}y||(y=!0,b(q))}),oe}catch{b(q);return}};function P(b,E){A(E,200,{},b)}function x(b,E){G(i,2,26,"Failed to send telemetry.",{message:b}),A(E,400,{})}function R(b){x("No endpoint url is provided for the batch",b)}function H(b,E){for(var q=0,M=null,D=0;M==null&&D<b[he];)q=b[D],!l&&q===1?dS()?M=re:Ml()&&(M=j):q===2&&Tp(E)&&(!E||!d)?M=K:q===3&&va()&&(E?!m:!f)&&(M=O),D++;return M?{_transport:q,_isSync:E,sendPOST:M}:null}function A(b,E,q,M){try{b&&b(E,q,M)}catch{}}function k(b,E){var q=nr(),M=b[Xs];if(!M)return R(E),!0;M=b[Xs]+(h?cv:_n);var D=b[wn],ce=o?D:new Blob([D],{type:"text/plain;charset=UTF-8"}),me=q.sendBeacon(M,ce);return me}function O(b,E,q){var M=b[wn];try{if(M)if(k(b,E))P(_n,E);else{var D=s&&s.beaconOnRetry;D&&pe(D)?D(b,E,k):(u&&u.sendPOST(b,E,!0),G(i,2,40,". Failed to send telemetry with Beacon API, retried with normal sender."))}}catch(ce){o&&ro(i,"Failed to send telemetry using sendBeacon API. Ex:"+te(ce)),A(E,o?0:400,{},_n)}}function j(b,E,q){var M,D,ce,me=b[Rc]||{};!q&&n&&(M=Qn(function(y,U){D=y,ce=U})),o&&q&&b.disableXhrSync&&(q=!1);var oe=b[Xs];if(!oe){R(E),D&&D(!1);return}var V=QC(Lf,oe,_,!0,q,b[zo]);o||V.setRequestHeader("Content-type","application/json"),ee(Cr(me),function(y){V.setRequestHeader(y,me[y])}),V.onreadystatechange=function(){o||(w(V),V.readyState===4&&D&&D(!0))},V.onload=function(){o&&w(V)};function w(y){var U=s&&s.xhrOnComplete,J=U&&pe(U);if(J)U(y,E,b);else{var Y=Ku(y);A(E,y[fr],wf(y,o),Y)}}return V.onerror=function(y){A(E,o?V[fr]:400,wf(V,o),o?_n:Xu(V)),ce&&ce(y)},V.ontimeout=function(){A(E,o?V[fr]:500,wf(V,o),o?_n:Xu(V)),D&&D(!1)},V.send(b[wn]),M}function K(b,E,q){var M,D=b[Xs],ce=b[wn],me=o?ce:new Blob([ce],{type:"application/json"}),oe,V,w,y=new Headers,U=ce[he],J=!1,Y=!1,_e=b[Rc]||{},Ie=(M={method:Lf,body:me},M[jg]=!0,M);b.headers&&Cr(b.headers)[he]>0&&(ee(Cr(_e),function(Oe){y.append(Oe,_e[Oe])}),Ie[Rc]=y),c?Ie.credentials=c:_&&o&&(Ie.credentials="include"),q&&(Ie.keepalive=!0,e+=U,o?b._sendReason===2&&(J=!0,h&&(D+=cv)):J=!0);var Te=new Request(D,Ie);try{Te[jg]=!0}catch{}if(!q&&n&&(oe=Qn(function(Oe,Fe){V=Oe,w=Fe})),!D){R(E),V&&V(!1);return}function Ue(Oe,Fe){Fe?A(E,o?0:Fe,{},o?_n:Oe):A(E,o?0:400,{},o?_n:Oe)}function Et(Oe,Fe,xt){var ir=Oe[fr],un=s.fetchOnComplete;un&&pe(un)?un(Oe,E,xt||_n,Fe):A(E,ir,{},xt||_n)}try{Kt(fetch(o?D:Te,o?Ie:null),function(Oe){if(q&&(e-=U,U=0),!Y)if(Y=!0,Oe.rejected)Ue(Oe.reason&&Oe.reason[eo],499),w&&w(Oe.reason);else{var Fe=Oe[Fi];try{!o&&!Fe.ok?(Fe[fr]?Ue(Fe.statusText,Fe[fr]):Ue(Fe.statusText,499),V&&V(!1)):o&&!Fe.body?(Et(Fe,null,_n),V&&V(!0)):Kt(Fe.text(),function(xt){Et(Fe,b,xt[Fi]),V&&V(!0)})}catch(xt){Fe&&Fe[fr]?Ue(te(xt),Fe[fr]):Ue(te(xt),499),w&&w(xt)}}})}catch(Oe){Y||(Ue(te(Oe),499),w&&w(Oe))}return J&&!Y&&(Y=!0,A(E,200,{}),V&&V(!0)),o&&!Y&&b[zo]>0&&g&&g.set(function(){Y||(Y=!0,A(E,500,{}),V&&V(!0))},b[zo]),oe}function re(b,E,q){var M=cn(),D=new XDomainRequest,ce=b[wn];D.onload=function(){var y=Ku(D),U=s&&s.xdrOnComplete;U&&pe(U)?U(D,E,b):A(E,200,{},y)},D.onerror=function(){A(E,400,{},o?_n:Cy(D))},D.ontimeout=function(){A(E,500,{})},D.onprogress=function(){};var me=M&&M.location&&M.location.protocol||"",oe=b[Xs];if(!oe){R(E);return}if(!o&&oe.lastIndexOf(me,0)!==0){var V="Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol.";G(i,2,40,". "+V),x(V,E);return}var w=o?oe:oe[to](/^(https?:)/,"");D.open(Lf,w),b[zo]&&(D[zo]=b[zo]),D.send(ce),o&&q?g&&g.set(function(){D.send(ce)},0):D.send(ce)}function se(){e=0,r=!1,n=!1,i=null,o=null,s=null,a=null,c=null,u=null,l=!1,f=!1,m=!1,d=!1,h=!1,g=null}})}return t.__ieDyn=1,t})(),Xy="on",uv="attachEvent",lv="addEventListener",fv="detachEvent",dv="removeEventListener",Gd="events",Qd="visibilitychange",Nl="pagehide",Jy="unload",Gy="beforeunload",Qy=mn("aiEvtPageHide");mn("aiEvtPageShow");var xk=/\.[\.]+/g,Pk=/[\.]+$/,Dk=1,rl=My("events"),Rk=/^([^.]*)(?:\.(.+)|)/;function hv(t){return t&&t[to]?t[to](/^[\s\.]+|(?=[\s\.])[\.\s]+$/g,De):t}function Np(t,e){if(e){var n=De;we(e)?(n=De,ee(e,function(i){i=hv(i),i&&(i[0]!=="."&&(i="."+i),n+=i)})):n=hv(e),n&&(n[0]!=="."&&(n="."+n),t=(t||De)+n)}var r=Rk.exec(t||De)||[];return{type:r[1],ns:(r[2]||De).replace(xk,".").replace(Pk,De)[mo](".").sort().join(".")}}function Zy(t,e,n){n===void 0&&(n=!0);var r=rl.get(t,Gd,{},n),i=r[e];return i||(i=r[e]=[]),i}function Yy(t,e,n,r){t&&e&&e[oi]&&(t[dv]?t[dv](e[oi],n,r):t[fv]&&t[fv](Xy+e[oi],n))}function Ak(t,e,n,r){var i=!1;return t&&e&&e[oi]&&n&&(t[lv]?(t[lv](e[oi],n,r),i=!0):t[uv]&&(t[uv](Xy+e[oi],n),i=!0)),i}function pv(t,e,n,r){for(var i=e[he];i--;){var o=e[i];o&&(!n.ns||n.ns===o[Dg].ns)&&(!r||r(o))&&(Yy(t,o[Dg],o.handler,o.capture),e[wo](i,1))}}function Mk(t,e,n){if(e[oi])pv(t,Zy(t,e[oi]),e,n);else{var r=rl.get(t,Gd,{});Pe(r,function(i,o){pv(t,o,e,n)}),Cr(r)[he]===0&&rl.kill(t,Gd)}}function gi(t,e){var n;return e?(we(e)?n=[t].concat(e):n=[t,e],n=Np("xx",n).ns[mo](".")):n=t,n}function kr(t,e,n,r,i){i===void 0&&(i=!1);var o=!1;if(t)try{var s=Np(e,r);if(o=Ak(t,s,n,i),o&&rl.accept(t)){var a={guid:Dk++,evtName:s,handler:n,capture:i};Zy(t,s.type)[Ee](a)}}catch{}return o}function Cs(t,e,n,r,i){if(i===void 0&&(i=!1),t)try{var o=Np(e,r),s=!1;Mk(t,o,function(a){return o.ns&&!n||a.handler===n?(s=!0,!0):!1}),s||Yy(t,o,n,i)}catch{}}function zk(t,e,n){var r=!1,i=cn();i&&(r=kr(i,t,e,n),r=kr(i.body,t,e,n)||r);var o=It();return o&&(r=kr(o,t,e,n)||r),r}function Uk(t,e,n){var r=cn();r&&(Cs(r,t,e,n),Cs(r.body,t,e,n));var i=It();i&&Cs(i,t,e,n)}function il(t,e,n,r){var i=!1;return e&&t&&t[he]>0&&ee(t,function(o){o&&(!n||At(n,o)===-1)&&(i=zk(o,e,r)||i)}),i}function Nk(t,e,n,r){var i=!1;return e&&t&&we(t)&&(i=il(t,e,n,r),!i&&n&&n[he]>0&&(i=il(t,e,null,r))),i}function Zd(t,e,n){t&&we(t)&&ee(t,function(r){r&&Uk(r,e,n)})}function $k(t,e,n){return Nk([Gy,Jy,Nl],t,e,n)}function Lk(t,e){Zd([Gy,Jy,Nl],t,e)}function Yd(t,e,n){function r(s){var a=It();t&&a&&a.visibilityState==="hidden"&&t(s)}var i=gi(Qy,n),o=il([Nl],t,e,i);return(!e||At(e,Qd)===-1)&&(o=il([Qd],r,e,i)||o),!o&&e&&(o=Yd(t,null,n)),o}function jk(t,e){var n=gi(Qy,e);Zd([Nl],t,n),Zd([Qd],null,n)}var gv="_aiHooks",vv=["req","rsp","hkErr","fnErr"];function $p(t,e){if(t)for(var n=0;n<t[he]&&!e(t[n],n);n++);}function jf(t,e,n,r,i){i>=0&&i<=2&&$p(t,function(o,s){var a=o.cbks,c=a[vv[i]];if(c){e.ctx=function(){var f=r[s]=r[s]||{};return f};try{c[ho](e.inst,n)}catch(f){var u=e.err;try{var l=a[vv[2]];l&&(e.err=f,l[ho](e.inst,n))}catch{}finally{e.err=u}}}})}function Ok(t){return function(){var e=this,n=arguments,r=t.h,i={name:t.n,inst:e,ctx:null,set:c},o=[],s=a([i],n);i.evt=tt("event");function a(l,f){return $p(f,function(m){l[Ee](m)}),l}function c(l,f){n=a([],n),n[l]=f,s=a([i],n)}jf(r,i,s,o,0);var u=t.f;if(u)try{i.rslt=u[ho](e,n)}catch(l){throw i.err=l,jf(r,i,s,o,3),l}return jf(r,i,s,o,1),i.rslt}}function Lp(t,e,n,r){var i=null;return t&&(gn(t,e)?i=t:n&&(i=Lp(BC(t),e,r,!1))),i}function Fk(t,e,n){return t?eh(t[Bn],e,n,!1):null}function eb(t,e,n,r){var i=n&&n[gv];if(!i){i={i:0,n:e,f:n,h:[]};var o=Ok(i);o[gv]=i,t[e]=o}var s={id:i.i,cbks:r,rm:function(){var a=this.id;$p(i.h,function(c,u){if(c.id===a)return i.h[wo](u,1),1})}};return i.i++,i.h[Ee](s),s}function eh(t,e,n,r,i){if(r===void 0&&(r=!0),t&&e&&n){var o=Lp(t,e,r,i);if(o){var s=o[e];if(typeof s===zm)return eb(o,e,s,n)}}return null}function Nc(t,e,n,r,i){if(t&&e&&n){var o=Lp(t,e,r,i)||t;if(o)return eb(o,e,o[e],n)}return null}var Vi="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",tb="sampleRate",Of="ProcessLegacy",mv="http.method",jp="https://dc.services.visualstudio.com",Ss="/v2/track",Yn="not_specified",Ff="iKey",je=EC({requestContextHeader:[0,"Request-Context"],requestContextTargetKey:[1,"appId"],requestContextAppIdFormat:[2,"appId=cid-v1:"],requestIdHeader:[3,"Request-Id"],traceParentHeader:[4,"traceparent"],traceStateHeader:[5,"tracestate"],sdkContextHeader:[6,"Sdk-Context"],sdkContextHeaderAppIdRequest:[7,"appId"],requestContextHeaderLowerCase:[8,"request-context"]}),Ns="split",be="length",tc="toLowerCase",bi="ingestionendpoint",nc="toString",Op="removeItem",yc="message",Go="count",Wf="preTriggerDate",Vf="getUTCDate",ol="stringify",Hf="pathname",rc="match",yv="correlationHeaderExcludePatterns",er="name",qn="properties",Ir="measurements",au="sizeInBytes",cu="typeName",Qs="exceptions",ba="severityLevel",qf="problemGroup",ks="parsedStack",sl="hasFullStack",al="assembly",Tr="fileName",$s="line",$l="aiDataContract",cl="duration";function nb(t,e,n){var r=e[be],i=Wk(t,e);if(i[be]!==r){for(var o=0,s=i;n[s]!==void 0;)o++,s=Bt(i,0,147)+qk(o);i=s}return i}function Wk(t,e){var n;return e&&(e=Ve($t(e)),e[be]>150&&(n=Bt(e,0,150),G(t,2,57,"name is too long. It has been truncated to 150 characters.",{name:e},!0))),n||e}function gt(t,e,n){n===void 0&&(n=1024);var r;return e&&(n=n||1024,e=Ve($t(e)),e[be]>n&&(r=Bt(e,0,n),G(t,2,61,"string value is too long. It has been truncated to "+n+" characters.",{value:e},!0))),r||e}function Ll(t,e,n){return de(e)&&(e=vr(e,n)),ib(t,e,2048,66)}function rb(t,e){var n;return e&&e[be]>32768&&(n=Bt(e,0,32768),G(t,2,56,"message is too long, it has been truncated to 32768 characters.",{message:e},!0)),n||e}function Vk(t,e){var n;if(e){var r=""+e;r[be]>32768&&(n=Bt(r,0,32768),G(t,2,52,"exception is too long, it has been truncated to 32768 characters.",{exception:e},!0))}return n||e}function ko(t,e){if(e){var n={};Pe(e,function(r,i){if(Xt(i)&&vc())try{i=An()[ol](i)}catch(o){G(t,2,49,"custom property is not valid",{exception:o},!0)}i=gt(t,i,8192),r=nb(t,r,n),n[r]=i}),e=n}return e}function Io(t,e){if(e){var n={};Pe(e,function(r,i){r=nb(t,r,n),n[r]=i}),e=n}return e}function Hk(t,e){return e&&ib(t,e,128,69)[nc]()}function ib(t,e,n,r){var i;return e&&(e=Ve($t(e)),e[be]>n&&(i=Bt(e,0,n),G(t,2,r,"input is too long, it has been truncated to "+n+" characters.",{data:e},!0))),i||e}function qk(t){var e="00"+t;return Gr(e,e[be]-3)}var bv=It()||{},_v=0,Bk=[null,null,null,null,null];function Fp(t){var e=_v,n=Bk,r=n[e];return bv.createElement?n[e]||(r=n[e]=bv.createElement("a")):r={host:Jk(t)},r.href=t,e++,e>=n[be]&&(e=0),_v=e,r}function Kk(t){var e,n=Fp(t);return n&&(e=n.href),e}function Xk(t,e){return t?t.toUpperCase()+" "+e:e}function Jk(t,e){var n=ob(t)||"";if(n){var r=n[rc](/(www\d{0,5}\.)?([^\/:]{1,256})(:\d{1,20})?/i);if(r!=null&&r[be]>3&&de(r[2])&&r[2][be]>0)return r[2]+(r[3]||"")}return n}function ob(t,e){var n=null;if(t){var r=t[rc](/(\w{1,150}):\/\/([^\/:]{1,256})(:\d{1,20})?/i);if(r!=null&&r[be]>2&&de(r[2])&&r[2][be]>0&&(n=r[2]||"",r[be]>2)){var i=(r[1]||"")[tc](),o=r[3]||"";(i==="http"&&o===":80"||i==="https"&&o===":443")&&(o=""),n+=o}}return n}var Gk=[jp+Ss,"https://breeze.aimon.applicationinsights.io"+Ss,"https://dc-int.services.visualstudio.com"+Ss],Qk="cid-v1:";function th(t){return At(Gk,t[tc]())!==-1}function wv(t,e,n){if(!e||t&&t.disableCorrelationHeaders)return!1;if(t&&t[yv]){for(var r=0;r<t.correlationHeaderExcludePatterns[be];r++)if(t[yv][r].test(e))return!1}var i=Fp(e).host[tc]();if(i&&(st(i,":443")!==-1||st(i,":80")!==-1)&&(i=(ob(e)||"")[tc]()),(!t||!t.enableCorsCorrelation)&&i&&i!==n)return!1;var o=t&&t.correlationHeaderDomains;if(o){var s;if(ee(o,function(u){var l=new RegExp(u.toLowerCase().replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*"));s=s||l.test(i)}),!s)return!1}var a=t&&t.correlationHeaderExcludedDomains;if(!a||a[be]===0)return!0;for(var r=0;r<a[be];r++){var c=new RegExp(a[r].toLowerCase().replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*"));if(c.test(i))return!1}return i&&i[be]>0}function Cv(t){if(t){var e=Zk(t,je[1]);if(e&&e!==Qk)return e}}function Zk(t,e){if(t)for(var n=t[Ns](","),r=0;r<n[be];++r){var i=n[r][Ns]("=");if(i[be]===2&&i[0]===e)return i[1]}}function Yk(t,e,n,r){var i,o=r,s=r;if(e&&e[be]>0){var a=Fp(e);if(i=a.host,!o)if(a[Hf]!=null){var c=a.pathname[be]===0?"/":a[Hf];c.charAt(0)!=="/"&&(c="/"+c),s=a[Hf],o=gt(t,n?n+" "+c:c)}else o=gt(t,e)}else i=r,o=r;return{target:i,name:o,data:s}}function $c(){var t=Dr();if(t&&t.now&&t.timing){var e=t.now()+t.timing.navigationStart;if(e>0)return e}return Rn()}function Ht(t,e){var n=null;return t!==0&&e!==0&&!B(t)&&!B(e)&&(n=e-t),n}function Wp(t,e){var n=t||{};return{getName:function(){return n[er]},setName:function(r){e&&e.setName(r),n[er]=r},getTraceId:function(){return n.traceID},setTraceId:function(r){e&&e.setTraceId(r),Ap(r)&&(n.traceID=r)},getSpanId:function(){return n.parentID},setSpanId:function(r){e&&e.setSpanId(r),Mp(r)&&(n.parentID=r)},getTraceFlags:function(){return n.traceFlags},setTraceFlags:function(r){e&&e.setTraceFlags(r),n.traceFlags=r}}}var bc=Sp({LocalStorage:0,SessionStorage:1}),ai=void 0,ci=void 0,sb="";function Vp(){return Ol()?jl(bc.LocalStorage):null}function jl(t){try{if(B(pn()))return null;var e=new Date()[nc](),n=tt(t===bc.LocalStorage?"localStorage":"sessionStorage"),r=sb+e;n.setItem(r,e);var i=n.getItem(r)!==e;if(n[Op](r),!i)return n}catch{}return null}function Hp(){return ic()?jl(bc.SessionStorage):null}function eI(){ai=!1,ci=!1}function qp(t){sb=t||""}function tI(){ai=Ol(!0),ci=ic(!0)}function Ol(t){return(t||ai===void 0)&&(ai=!!jl(bc.LocalStorage)),ai}function ab(t,e){var n=Vp();if(n!==null)try{return n.getItem(e)}catch(r){ai=!1,G(t,2,1,"Browser failed read of local storage. "+Ne(r),{exception:te(r)})}return null}function cb(t,e,n){var r=Vp();if(r!==null)try{return r.setItem(e,n),!0}catch(i){ai=!1,G(t,2,3,"Browser failed write to local storage. "+Ne(i),{exception:te(i)})}return!1}function nI(t,e){var n=Vp();if(n!==null)try{return n[Op](e),!0}catch(r){ai=!1,G(t,2,5,"Browser failed removal of local storage item. "+Ne(r),{exception:te(r)})}return!1}function ic(t){return(t||ci===void 0)&&(ci=!!jl(bc.SessionStorage)),ci}function nh(t,e){var n=Hp();if(n!==null)try{return n.getItem(e)}catch(r){ci=!1,G(t,2,2,"Browser failed read of session storage. "+Ne(r),{exception:te(r)})}return null}function ub(t,e,n){var r=Hp();if(r!==null)try{return r.setItem(e,n),!0}catch(i){ci=!1,G(t,2,4,"Browser failed write to session storage. "+Ne(i),{exception:te(i)})}return!1}function lb(t,e){var n=Hp();if(n!==null)try{return n[Op](e),!0}catch(r){ci=!1,G(t,2,6,"Browser failed removal of session storage item. "+Ne(r),{exception:te(r)})}return!1}var rI="appInsightsThrottle",iI=(function(){function t(e,n){var r=this,i,o,s,a,c,u,l,f=!1,m=!1;h(),r._getDbgPlgTargets=function(){return[l]},r.getConfig=function(){return s},r.canThrottle=function(b){var E=K(b),q=g(b);return _(q,i,E)},r.isTriggered=function(b){return re(b)},r.isReady=function(){return f},r.flush=function(b){try{var E=se(b);if(E&&E[be]>0){var q=E.slice(0);return l[b]=[],ee(q,function(M){d(M.msgID,M[yc],M.severity,!1)}),!0}}catch{}return!1},r.flushAll=function(){try{if(l){var b=!0;return Pe(l,function(E){var q=r.flush(parseInt(E));b=b&&q}),b}}catch{}return!1},r.onReadyState=function(b,E){return E===void 0&&(E=!0),f=B(b)?!0:b,f&&E?r.flushAll():null},r.sendMessage=function(b,E,q){return d(b,E,q,!0)};function d(b,E,q,M){if(f){var D=j(b);if(!D)return;var ce=g(b),me=K(b),oe=_(ce,i,me),V=!1,w=0,y=re(b);try{oe&&!y?(w=Bm(ce.limit.maxSendNumber,me[Go]+1),me[Go]=0,V=!0,c[b]=!0,me[Wf]=new Date):(c[b]=oe,me[Go]+=1);var U=P(b);A(o,U,me);for(var J=0;J<w;J++)O(b,o,E,q)}catch{}return{isThrottled:V,throttleNum:w}}else if(M){var Y=se(b);Y.push({msgID:b,message:E,severity:q})}return null}function h(){o=Co(e),c={},a={},l={},s={},p(109),u=no(n)?n:"",e.addUnloadHook(at(e.config,function(b){var E=b.cfg;i=Ol();var q=E.throttleMgrCfg||{};Pe(q,function(M,D){p(parseInt(M),D)})}))}function g(b){return s[b]||s[109]}function p(b,E){var q,M;try{var D=E||{},ce={};ce.disabled=!!D.disabled;var me=D.interval||{};m=(me==null?void 0:me.daysOfMonth)&&(me==null?void 0:me.daysOfMonth[be])>0,ce.interval=v(me);var oe={samplingRate:((q=D.limit)===null||q===void 0?void 0:q.samplingRate)||100,maxSendNumber:((M=D.limit)===null||M===void 0?void 0:M.maxSendNumber)||1};ce.limit=oe,s[b]=ce}catch{}}function v(b){b=b||{};var E=b==null?void 0:b.monthInterval,q=b==null?void 0:b.dayInterval;return B(E)&&B(q)&&(b.monthInterval=3,m||(b.daysOfMonth=[28],m=!0)),b={monthInterval:b==null?void 0:b.monthInterval,dayInterval:b==null?void 0:b.dayInterval,daysOfMonth:b==null?void 0:b.daysOfMonth},b}function _(b,E,q){if(b&&!b.disabled&&E&&no(q)){var M=H(),D=q.date,ce=b.interval,me=1;if(ce!=null&&ce.monthInterval){var oe=(M.getUTCFullYear()-D.getUTCFullYear())*12+M.getUTCMonth()-D.getUTCMonth();me=k(ce.monthInterval,0,oe)}var V=1;if(m)V=At(ce.daysOfMonth,M[Vf]());else if(ce!=null&&ce.dayInterval){var w=an((M.getTime()-D.getTime())/864e5);V=k(ce.dayInterval,0,w)}return me>=0&&V>=0}return!1}function P(b,E){var q=no(E)?E:"";return b?rI+q+"-"+b:null}function x(b){try{if(b){var E=new Date;return b.getUTCFullYear()===E.getUTCFullYear()&&b.getUTCMonth()===E.getUTCMonth()&&b[Vf]()===E[Vf]()}}catch{}return!1}function R(b,E,q){try{var M={date:H(),count:0};if(b){var D=JSON.parse(b),ce={date:H(D.date)||M.date,count:D[Go]||M[Go],preTriggerDate:D.preTriggerDate?H(D[Wf]):void 0};return ce}else return A(E,q,M),M}catch{}return null}function H(b){try{if(b){var E=new Date(b);if(!isNaN(E.getDate()))return E}else return new Date}catch{}return null}function A(b,E,q){try{return cb(b,E,Ve(JSON[ol](q)))}catch{}return!1}function k(b,E,q){return b<=0?1:q>=E&&(q-E)%b==0?an((q-E)/b)+1:-1}function O(b,E,q,M){G(E,M||1,b,q)}function j(b){try{var E=g(b);return _S(1e6)<=E.limit.samplingRate}catch{}return!1}function K(b){try{var E=a[b];if(!E){var q=P(b,u);E=R(ab(o,q),o,q),a[b]=E}return a[b]}catch{}return null}function re(b){var E=c[b];if(B(E)){E=!1;var q=K(b);q&&(E=x(q[Wf])),c[b]=E}return c[b]}function se(b){return l=l||{},B(l[b])&&(l[b]=[]),l[b]}}return t})(),oI=";",sI="=";function fb(t){if(!t)return{};var e=t[Ns](oI),n=Jw(e,function(i,o){var s=o[Ns](sI);if(s[be]===2){var a=s[0][tc](),c=s[1];i[a]=c}return i},{});if(Cr(n)[be]>0){if(n.endpointsuffix){var r=n.location?n.location+".":"";n[bi]=n[bi]||"https://"+r+"dc."+n.endpointsuffix}n[bi]=n[bi]||jp,ay(n[bi],"/")&&(n[bi]=n[bi].slice(0,-1))}return n}var aI=(function(){function t(e,n,r){var i=this,o=this;o.ver=1,o.sampleRate=100,o.tags={},o[er]=gt(e,r)||Yn,o.data=n,o.time=Us(new Date),o[$l]={time:1,iKey:1,name:1,sampleRate:function(){return i.sampleRate===100?4:1},tags:1,data:1}}return t})(),mr=(function(){function t(e,n,r,i){this.aiDataContract={ver:1,name:1,properties:0,measurements:0};var o=this;o.ver=2,o[er]=gt(e,n)||Yn,o[qn]=ko(e,r),o[Ir]=Io(e,i)}return t.envelopeType="Microsoft.ApplicationInsights.{0}.Event",t.dataType="EventData",t})(),cI=58,uI=/^\s{0,50}(from\s|at\s|Line\s{1,5}\d{1,10}\s{1,5}of|\w{1,50}@\w{1,80}|[^\(\s\n]+:[0-9\?]+(?::[0-9\?]+)?)/,lI=/^(?:\s{0,50}at)?\s{0,50}([^\@\()\s]+)?\s{0,50}(?:\s|\@|\()\s{0,5}([^\(\s\n\]]+):([0-9\?]+):([0-9\?]+)\)?$/,fI=/^(?:\s{0,50}at)?\s{0,50}([^\@\()\s]+)?\s{0,50}(?:\s|\@|\()\s{0,5}([^\(\s\n\]]+):([0-9\?]+)\)?$/,dI=/^(?:\s{0,50}at)?\s{0,50}([^\@\()\s]+)?\s{0,50}(?:\s|\@|\()\s{0,5}([^\(\s\n\)\]]+)\)?$/,hI=/(?:^|\(|\s{0,10}[\w\)]+\@)?([^\(\n\s\]\)]+)(?:\:([0-9]+)(?:\:([0-9]+))?)?\)?(?:,|$)/,pI=/([^\(\s\n]+):([0-9]+):([0-9]+)$/,gI=/([^\(\s\n]+):([0-9]+)$/,Sv="<no_method>",Is="error",hn="stack",rh="stackDetails",kv="errorSrc",ih="message",db="description",Iv=[{re:lI,len:5,m:1,fn:2,ln:3,col:4},{chk:mI,pre:vI,re:fI,len:4,m:1,fn:2,ln:3},{re:dI,len:3,m:1,fn:2,hdl:Ev},{re:hI,len:2,fn:1,hdl:Ev}];function vI(t){return t.replace(/(\(anonymous\))/,"<anonymous>")}function mI(t){return st(t,"[native")<0}function oh(t,e){var n=t;return n&&!de(n)&&(JSON&&JSON[ol]?(n=JSON[ol](t),e&&(!n||n==="{}")&&(pe(t[nc])?n=t[nc]():n=""+t)):n=""+t+" - (Missing JSON.stringify)"),n||""}function hb(t,e){var n=t;return t&&(n&&!de(n)&&(n=t[ih]||t[db]||n),n&&!de(n)&&(n=oh(n,!0)),t.filename&&(n=n+" @"+(t.filename||"")+":"+(t.lineno||"?")+":"+(t.colno||"?"))),e&&e!=="String"&&e!=="Object"&&e!=="Error"&&st(n||"",e)===-1&&(n=e+": "+n),n||""}function yI(t){try{if(Xt(t))return"hasFullStack"in t&&"typeName"in t}catch{}return!1}function bI(t){try{if(Xt(t))return"ver"in t&&"exceptions"in t&&"properties"in t}catch{}return!1}function Tv(t){return t&&t.src&&de(t.src)&&t.obj&&we(t.obj)}function _i(t){var e=t||"";de(e)||(de(e[hn])?e=e[hn]:e=""+e);var n=e[Ns](`
|
|
8
|
-
`);return{src:e,obj:n}}function
|
|
9
|
-
`),r=0;r<n[be];r++){var i=n[r];n[r+1]&&(i+="@"+n[r+1],r++),e.push(i)}return{src:t,obj:e}}function
|
|
10
|
-
`),n+=" from "+t[
|
|
11
|
-
`):e=t.src||""),e}function CI(t){var e,n=t.obj;if(n&&n[be]>0){e=[];var r=0,i=!1,o=0;ee(n,function(g){if(i||TI(g)){var p=$t(g);i=!0;var v=EI(p,r);v&&(o+=v[au],e.push(v),r++)}});var s=32*1024;if(o>s)for(var a=0,c=e[be]-1,u=0,l=a,f=c;a<c;){var m=e[a][au],d=e[c][au];if(u+=m+d,u>s){var h=f-l+1;e.splice(l,h);break}l=a,f=c,a++,c--}}return e}function ul(t){var e="";if(t&&(e=t.typeName||t[er]||"",!e))try{var n=/function (.{1,200})\(/,r=n.exec(t.constructor[nc]());e=r&&r[be]>1?r[1]:""}catch{}return e}function Bf(t){if(t)try{if(!de(t)){var e=ul(t),n=oh(t,!1);return(!n||n==="{}")&&(t[Is]&&(t=t[Is],e=ul(t)),n=oh(t,!0)),st(n,e)!==0&&e!=="String"?e+":"+n:n}}catch{}return""+(t||"")}var qt=(function(){function t(e,n,r,i,o,s){this.aiDataContract={ver:1,exceptions:1,severityLevel:0,properties:0,measurements:0};var a=this;a.ver=2,bI(n)?(a[Qs]=n[Qs]||[],a[qn]=n[qn],a[Ir]=n[Ir],n[ba]&&(a[ba]=n[ba]),n.id&&(a.id=n.id,n[qn].id=n.id),n[qf]&&(a[qf]=n[qf]),B(n.isManual)||(a.isManual=n.isManual)):(r||(r={}),s&&(r.id=s),a[Qs]=[gb(e,n,r)],a[qn]=ko(e,r),a[Ir]=Io(e,i),o&&(a[ba]=o),s&&(a.id=s))}return t.CreateAutoException=function(e,n,r,i,o,s,a,c){var u=ul(o||s||e);return{message:hb(e,u),url:n,lineNumber:r,columnNumber:i,error:Bf(o||s||e),evt:Bf(s||e),typeName:u,stackDetails:pb(a||o||s),errorSrc:c}},t.CreateFromInterface=function(e,n,r,i){var o=n[Qs]&&Ha(n[Qs],function(a){return II(e,a)}),s=new t(e,jt(jt({},n),{exceptions:o}),r,i);return s},t.prototype.toInterface=function(){var e=this,n=e.exceptions,r=e.properties,i=e.measurements,o=e.severityLevel,s=e.problemGroup,a=e.id,c=e.isManual,u=n instanceof Array&&Ha(n,function(l){return l.toInterface()})||void 0;return{ver:"4.0",exceptions:u,severityLevel:o,properties:r,measurements:i,problemGroup:s,id:a,isManual:c}},t.CreateSimpleException=function(e,n,r,i,o,s){var a;return{exceptions:[(a={},a[sl]=!0,a.message=e,a.stack=o,a.typeName=n,a)]}},t.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",t.dataType="ExceptionData",t.formatError=Bf,t})(),SI=Dn({id:0,outerId:0,typeName:1,message:1,hasFullStack:0,stack:0,parsedStack:2});function kI(){var t=this,e=we(t[ks])&&Ha(t[ks],function(r){return PI(r)}),n={id:t.id,outerId:t.outerId,typeName:t[cu],message:t[yc],hasFullStack:t[sl],stack:t[hn],parsedStack:e||void 0};return n}function gb(t,e,n){var r,i,o,s,a,c,u,l;if(yI(e))s=e[cu],a=e[yc],u=e[hn],l=e[ks]||[],c=e[sl];else{var f=e,m=f&&f.evt;fp(f)||(f=f[Is]||m||f),s=gt(t,ul(f))||Yn,a=rb(t,hb(e||f,s))||Yn;var d=e[rh]||pb(e);l=CI(d),we(l)&&Ha(l,function(h){h[al]=gt(t,h[al]),h[Tr]=gt(t,h[Tr])}),u=Vk(t,wI(d)),c=we(l)&&l[be]>0,n&&(n[cu]=n[cu]||s)}return r={},r[$l]=SI,r.id=i,r.outerId=o,r.typeName=s,r.message=a,r[sl]=c,r.stack=u,r.parsedStack=l,r.toInterface=kI,r}function II(t,e){var n=we(e[ks])&&Ha(e[ks],function(i){return xI(i)})||e[ks],r=gb(t,jt(jt({},e),{parsedStack:n}));return r}function vb(t,e){var n=e[rc](pI);if(n&&n[be]>=4)t[Tr]=n[1],t[$s]=parseInt(n[2]);else{var r=e[rc](gI);r&&r[be]>=3?(t[Tr]=r[1],t[$s]=parseInt(r[2])):t[Tr]=e}}function Ev(t,e,n){var r=t[Tr];e.fn&&n&&n[be]>e.fn&&(e.ln&&n[be]>e.ln?(r=Ve(n[e.fn]||""),t[$s]=parseInt(Ve(n[e.ln]||""))||0):r=Ve(n[e.fn]||"")),r&&vb(t,r)}function TI(t){var e=!1;if(t&&de(t)){var n=Ve(t);n&&(e=uI.test(n))}return e}var mb=Dn({level:1,method:1,assembly:0,fileName:0,line:0});function EI(t,e){var n,r;if(t&&de(t)&&Ve(t)){r=(n={},n[$l]=mb,n.level=e,n.assembly=Ve(t),n.method=Sv,n.fileName="",n.line=0,n.sizeInBytes=0,n);for(var i=0;i<Iv[be];){var o=Iv[i];if(o.chk&&!o.chk(t))break;o.pre&&(t=o.pre(t));var s=t[rc](o.re);if(s&&s[be]>=o.len){o.m&&(r.method=Ve(s[o.m]||Sv)),o.hdl?o.hdl(r,o,s):o.fn&&(o.ln?(r[Tr]=Ve(s[o.fn]||""),r[$s]=parseInt(Ve(s[o.ln]||""))||0):vb(r,s[o.fn]||""));break}i++}}return yb(r)}function xI(t){var e,n=(e={},e[$l]=mb,e.level=t.level,e.method=t.method,e.assembly=t[al],e.fileName=t[Tr],e.line=t[$s],e.sizeInBytes=0,e);return yb(n)}function yb(t){var e=cI;return t&&(e+=t.method[be],e+=t.assembly[be],e+=t.fileName[be],e+=t.level.toString()[be],e+=t.line.toString()[be],t[au]=e),t}function PI(t){return{level:t.level,method:t.method,assembly:t[al],fileName:t[Tr],line:t[$s]}}var DI=(function(){function t(){this.aiDataContract={name:1,kind:0,value:1,count:0,min:0,max:0,stdDev:0},this.kind=0}return t})(),oo=(function(){function t(e,n,r,i,o,s,a,c,u){this.aiDataContract={ver:1,metrics:1,properties:0};var l=this;l.ver=2;var f=new DI;f[Go]=i>0?i:void 0,f.max=isNaN(s)||s===null?void 0:s,f.min=isNaN(o)||o===null?void 0:o,f[er]=gt(e,n)||Yn,f.value=r,f.stdDev=isNaN(a)||a===null?void 0:a,l.metrics=[f],l[qn]=ko(e,c),l[Ir]=Io(e,u)}return t.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",t.dataType="MetricData",t})(),Zs="";function Zr(t){(isNaN(t)||t<0)&&(t=0),t=sy(t);var e=Zs+t%1e3,n=Zs+an(t/1e3)%60,r=Zs+an(t/(1e3*60))%60,i=Zs+an(t/(1e3*60*60))%24,o=an(t/(1e3*60*60*24));return e=e[be]===1?"00"+e:e[be]===2?"0"+e:e,n=n[be]<2?"0"+n:n,r=r[be]<2?"0"+r:r,i=i[be]<2?"0"+i:i,(o>0?o+".":Zs)+i+":"+r+":"+n+"."+e}function RI(t,e,n,r,i){return!i&&de(t)&&(t==="Script error."||t==="Script error")}var ui=(function(){function t(e,n,r,i,o,s,a){this.aiDataContract={ver:1,name:0,url:0,duration:0,properties:0,measurements:0,id:0};var c=this;c.ver=2,c.id=Hk(e,a),c.url=Ll(e,r),c[er]=gt(e,n)||Yn,isNaN(i)||(c[cl]=Zr(i)),c[qn]=ko(e,o),c[Ir]=Io(e,s)}return t.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",t.dataType="PageviewData",t})(),so=(function(){function t(e,n,r,i,o,s,a,c,u,l,f,m){u===void 0&&(u="Ajax"),this.aiDataContract={id:1,ver:1,name:0,resultCode:0,duration:0,success:0,data:0,target:0,type:0,properties:0,measurements:0,kind:0,value:0,count:0,min:0,max:0,stdDev:0,dependencyKind:0,dependencySource:0,commandName:0,dependencyTypeName:0};var d=this;d.ver=2,d.id=n,d[cl]=Zr(o),d.success=s,d.resultCode=a+"",d.type=gt(e,u);var h=Yk(e,r,c,i);d.data=Ll(e,i)||h.data,d.target=gt(e,h.target),l&&(d.target="".concat(d.target," | ").concat(l)),d[er]=gt(e,h[er]),d[qn]=ko(e,f),d[Ir]=Io(e,m)}return t.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",t.dataType="RemoteDependencyData",t})(),Ts=(function(){function t(e,n,r,i,o){this.aiDataContract={ver:1,message:1,severityLevel:0,properties:0};var s=this;s.ver=2,n=n||Yn,s[yc]=rb(e,n),s[qn]=ko(e,i),s[Ir]=Io(e,o),r&&(s[ba]=r)}return t.envelopeType="Microsoft.ApplicationInsights.{0}.Message",t.dataType="MessageData",t})(),Es=(function(){function t(e,n,r,i,o,s,a){this.aiDataContract={ver:1,name:0,url:0,duration:0,perfTotal:0,networkConnect:0,sentRequest:0,receivedResponse:0,domProcessing:0,properties:0,measurements:0};var c=this;c.ver=2,c.url=Ll(e,r),c[er]=gt(e,n)||Yn,c[qn]=ko(e,o),c[Ir]=Io(e,s),a&&(c.domProcessing=a.domProcessing,c[cl]=a[cl],c.networkConnect=a.networkConnect,c.perfTotal=a.perfTotal,c.receivedResponse=a.receivedResponse,c.sentRequest=a.sentRequest)}return t.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",t.dataType="PageviewPerformanceData",t})(),To=(function(){function t(e,n){this.aiDataContract={baseType:1,baseData:1},this.baseType=e,this.baseData=n}return t})(),oc=Sp({Verbose:0,Information:1,Warning:2,Error:3,Critical:4});function vi(t){var e="ai."+t+".";return function(n){return e+n}}var Ys=vi("application"),vt=vi("device"),Lc=vi("location"),$o=vi("operation"),Kf=vi("session"),jr=vi("user"),wi=vi("cloud"),ea=vi("internal"),bb=(function(t){rr(e,t);function e(){return t.call(this)||this}return e})(XC({applicationVersion:Ys("ver"),applicationBuild:Ys("build"),applicationTypeId:Ys("typeId"),applicationId:Ys("applicationId"),applicationLayer:Ys("layer"),deviceId:vt("id"),deviceIp:vt("ip"),deviceLanguage:vt("language"),deviceLocale:vt("locale"),deviceModel:vt("model"),deviceFriendlyName:vt("friendlyName"),deviceNetwork:vt("network"),deviceNetworkName:vt("networkName"),deviceOEMName:vt("oemName"),deviceOS:vt("os"),deviceOSVersion:vt("osVersion"),deviceRoleInstance:vt("roleInstance"),deviceRoleName:vt("roleName"),deviceScreenResolution:vt("screenResolution"),deviceType:vt("type"),deviceMachineName:vt("machineName"),deviceVMName:vt("vmName"),deviceBrowser:vt("browser"),deviceBrowserVersion:vt("browserVersion"),locationIp:Lc("ip"),locationCountry:Lc("country"),locationProvince:Lc("province"),locationCity:Lc("city"),operationId:$o("id"),operationName:$o("name"),operationParentId:$o("parentId"),operationRootId:$o("rootId"),operationSyntheticSource:$o("syntheticSource"),operationCorrelationVector:$o("correlationVector"),sessionId:Kf("id"),sessionIsFirst:Kf("isFirst"),sessionIsNew:Kf("isNew"),userAccountAcquisitionDate:jr("accountAcquisitionDate"),userAccountId:jr("accountId"),userAgent:jr("userAgent"),userId:jr("id"),userStoreRegion:jr("storeRegion"),userAuthUserId:jr("authUserId"),userAnonymousUserAcquisitionDate:jr("anonUserAcquisitionDate"),userAuthenticatedUserAcquisitionDate:jr("authUserAcquisitionDate"),cloudName:wi("name"),cloudRole:wi("role"),cloudRoleVer:wi("roleVer"),cloudRoleInstance:wi("roleInstance"),cloudEnvironment:wi("environment"),cloudLocation:wi("location"),cloudDeploymentUnit:wi("deploymentUnit"),internalNodeName:ea("nodeName"),internalSdkVersion:ea("sdkVersion"),internalAgentVersion:ea("agentVersion"),internalSnippet:ea("snippet"),internalSdkSrc:ea("sdkSrc")}));function Hr(t,e,n,r,i,o){n=gt(r,n)||Yn,(B(t)||B(e)||B(n))&&Yt("Input doesn't contain all required fields");var s="";t[Ff]&&(s=t[Ff],delete t[Ff]);var a={name:n,time:Us(new Date),iKey:s,ext:o||{},tags:[],data:{},baseType:e,baseData:t};return B(i)||Pe(i,function(c,u){a.data[c]=u}),a}var Zt={UserExt:"user",DeviceExt:"device",TraceExt:"trace",WebExt:"web",AppExt:"app",OSExt:"os"},Ke=new bb;function ta(t){var e=null;if(pe(Event))e=new Event(t);else{var n=It();n&&n.createEvent&&(e=n.createEvent("Event"),e.initEvent(t,!0,!0))}return e}function xv(t,e){Cs(t,null,null,e)}function AI(t){var e=It(),n=nr(),r=!1,i=[],o=1;n&&!B(n.onLine)&&!n.onLine&&(o=2);var s=0,a=m(),c=gi(mn("OfflineListener"),t);try{if(l(cn())&&(r=!0),e){var u=e.body||e;u.ononline&&l(u)&&(r=!0)}}catch{r=!1}function l(P){var x=!1;return P&&(x=kr(P,"online",g,c),x&&kr(P,"offline",p,c)),x}function f(){return a}function m(){return!(s===2||o===2)}function d(){var P=m();a!==P&&(a=P,ee(i,function(x){var R={isOnline:a,rState:o,uState:s};try{x(R)}catch{}}))}function h(P){s=P,d()}function g(){o=1,d()}function p(){o=2,d()}function v(){var P=cn();if(P&&r){if(xv(P,c),e){var x=e.body||e;Ze(x.ononline)||xv(x,c)}r=!1}}function _(P){return i.push(P),{rm:function(){var x=i.indexOf(P);if(x>-1)return i.splice(x,1)}}}return{isOnline:f,isListening:function(){return r},unload:v,addListener:_,setOnlineState:h}}var Fl="AppInsightsPropertiesPlugin",_b="AppInsightsChannelPlugin",Bp="ApplicationInsightsAnalytics",MI=Fs({history:{blkVal:!0,v:void 0}}),zI=(function(t){rr(e,t);function e(){var n=t.call(this)||this;n.priority=185,n.identifier="ReactPlugin";var r,i,o,s,a;return He(e,n,function(c,u){l(),c.initialize=function(d,h,g,p){t.prototype.initialize.call(n,d,h,g,p),c._addHook(at(d,function(v){var _,P=c._getTelCtx();if(i=P.getExtCfg(n.identifier,MI),r=(_=h.getPlugin(Bp))===null||_===void 0?void 0:_.plugin,pe(o)&&(o(),o=null),i.history&&(m(i.history),!a)){var x={uri:i.history.location.pathname};c.trackPageView(x),a=!0}}))},c.getCookieMgr=function(){return Ul(c.core)},c.getAppInsights=f,c.processTelemetry=function(d,h){c.processNext(d,h)},c._doTeardown=function(d,h,g){pe(o)&&o(),s&&clearTimeout(s),l()},us(c,f,["trackMetric","trackPageView","trackEvent","trackException","trackTrace"]);function l(){r=null,i=null,o=null,s=null,a=!1}function f(){return r||G(c.diagLog(),1,64,"Analytics plugin is not available, React plugin telemetry will not be sent: "),r}function m(d){var h=function(g){var p=null;"location"in g?p=g.location:p=g,s=setTimeout(function(){s=null;var v={uri:p.pathname};c.trackPageView(v)},500)};o=d.listen(h)}kw(c,"_extensionConfig",function(){return i})}),n}return e.__ieDyn=1,e})(So),ll="toString",sh="isStorageUseDisabled",Lo="_addHook",ze="core",Or="dataType",Ci="envelopeType",Gt="diagLog",Si="track",uu="trackPageView",fn="config",ah="trackPreviousPageVisit",Ni="sendPageViewInternal",Xf="refUri",Ls="startTime",_a="properties",On="duration",ch="sendPageViewPerformanceInternal",Kp="populatePageViewPerformanceEvent",wa="href",Pv="sendExceptionInternal",na="error",Jf="lineNumber",Gf="columnNumber",Qf="CreateAutoException",jc="addTelemetryInitializer",UI="overridePageViewDuration",Zf="autoExceptionInstrumented",wb="autoTrackPageVisitTime",Cb="isBrowserLinkTrackingEnabled",sc="length",Sb="enableAutoRouteTracking",kb="enableUnhandledPromiseRejectionTracking",uh="autoUnhandledPromiseInstrumented",lh="getEntriesByType",Ib="isPerformanceTimingSupported",Tb="getPerformanceTiming",fl="navigationStart",fh="shouldCollectDuration",Eb="isPerformanceTimingDataReady",Ca="responseStart",NI="requestStart",lu="loadEventEnd",dh="responseEnd",fu="connectEnd",$I=(function(){function t(e,n,r,i){He(t,this,function(o){var s=null,a=[],c=!1,u=!1,l;r&&(l=r.logger);function f(h){r&&r.flush(h,function(){})}function m(){s||(s=vn((function(){s=null;var h=a.slice(0),g=!1;a=[],ee(h,function(p){p()?g=!0:a.push(p)}),a[sc]>0&&m(),g&&f(!0)}),100))}function d(h){a.push(h),m()}o[uu]=function(h,g){var p=h.name;if(B(p)||typeof p!="string"){var v=It();p=h.name=v&&v.title||""}var _=h.uri;if(B(_)||typeof _!="string"){var P=Hn();_=h.uri=P&&P[wa]||""}if(r&&r[fn]&&(_=h.uri=vr(h.uri,r[fn])),!u){var x=Dr(),R=x&&x[lh]&&x[lh]("navigation");if(R&&R[0]&&!Ze(x.timeOrigin)){var H=R[0].loadEventStart;h[Ls]=new Date(x.timeOrigin+H)}else{var A=(g||h[_a]||{})[On]||0;h[Ls]=new Date(new Date().getTime()-A)}u=!0}if(!i[Ib]()){e[Ni](h,g),f(!0),Qm()||G(l,2,25,"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.");return}var k=!1,O,j=i[Tb]()[fl];j>0&&(O=Ht(j,+new Date),i[fh](O)||(O=void 0));var K;!B(g)&&!B(g[On])&&(K=g[On]),(n||!isNaN(K))&&(isNaN(K)&&(g||(g={}),g[On]=O),e[Ni](h,g),f(!0),k=!0);var re=6e4;g||(g={}),d(function(){var se=!1;try{if(i[Eb]()){se=!0;var b={name:p,uri:_};i[Kp](b),!b.isValid&&!k?(g[On]=O,e[Ni](h,g)):(k||(g[On]=b.durationMs,e[Ni](h,g)),c||(e[ch](b,g),c=!0))}else j>0&&Ht(j,+new Date)>re&&(se=!0,k||(g[On]=re,e[Ni](h,g)))}catch(E){G(l,1,38,"trackPageView failed on page load calculation: "+Ne(E),{exception:te(E)})}return se})},o.teardown=function(h,g){if(s){s.cancel(),s=null;var p=a.slice(0);a=[],ee(p,function(v){v()})}}})}return t.__ieDyn=1,t})(),LI=36e5,Dv=["googlebot","adsbot-google","apis-google","mediapartners-google"];function xb(){var t=Dr();return t&&!!t.timing}function jI(){var t=Dr();return t&&t.getEntriesByType&&t.getEntriesByType("navigation")[sc]>0}function OI(){var t=Dr(),e=t?t.timing:0;return e&&e.domainLookupStart>0&&e[fl]>0&&e[Ca]>0&&e[NI]>0&&e[lu]>0&&e[dh]>0&&e[fu]>0&&e.domLoading>0}function Rv(){return xb()?Dr().timing:null}function FI(){return jI()?Dr()[lh]("navigation")[0]:null}function WI(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=nr()||{},r=n.userAgent,i=!1;if(r)for(var o=0;o<Dv[sc];o++)i=i||st(r.toLowerCase(),Dv[o])!==-1;if(i)return!1;for(var o=0;o<t[sc];o++)if(t[o]<0||t[o]>=LI)return!1;return!0}var VI=(function(){function t(e){var n=Co(e);He(t,this,function(r){r[Kp]=function(i){i.isValid=!1;var o=FI(),s=Rv(),a=0,c=0,u=0,l=0,f=0;(o||s)&&(o?(a=o[On],c=o[Ls]===0?o[fu]:Ht(o[Ls],o[fu]),u=Ht(o.requestStart,o[Ca]),l=Ht(o[Ca],o[dh]),f=Ht(o.responseEnd,o[lu])):(a=Ht(s[fl],s[lu]),c=Ht(s[fl],s[fu]),u=Ht(s.requestStart,s[Ca]),l=Ht(s[Ca],s[dh]),f=Ht(s.responseEnd,s[lu])),a===0?G(n,2,10,"error calculating page view performance.",{total:a,network:c,request:u,response:l,dom:f}):r[fh](a,c,u,l,f)?a<an(c)+an(u)+an(l)+an(f)?G(n,2,8,"client performance math error.",{total:a,network:c,request:u,response:l,dom:f}):(i.durationMs=a,i.perfTotal=i[On]=Zr(a),i.networkConnect=Zr(c),i.sentRequest=Zr(u),i.receivedResponse=Zr(l),i.domProcessing=Zr(f),i.isValid=!0):G(n,2,45,"Invalid page load duration value. Browser perf data won't be sent.",{total:a,network:c,request:u,response:l,dom:f}))},r[Tb]=Rv,r[Ib]=xb,r[Eb]=OI,r[fh]=WI})}return t.__ieDyn=1,t})(),HI=(function(){function t(e,n){var r="prevPageVisitData";He(t,this,function(i){i[ah]=function(a,c){try{var u=o(a,c);u&&n(u.pageName,u.pageUrl,u.pageVisitTime)}catch(l){ro(e,"Auto track page visit time failed, metric will not be collected: "+te(l))}};function o(a,c){var u=null;try{if(u=s(),ic()){nh(e,r)!=null&&Yt("Cannot call startPageVisit consecutively without first calling stopPageVisit");var l=An().stringify(new qI(a,c));ub(e,r,l)}}catch(f){ro(e,"Call to restart failed: "+te(f)),u=null}return u}function s(){var a=null;try{if(ic()){var c=Rn(),u=nh(e,r);u&&vc()&&(a=An().parse(u),a.pageVisitTime=c-a.pageVisitStartTime,lb(e,r))}}catch(l){ro(e,"Stop page visit timer failed: "+te(l)),a=null}return a}Re(i,"_logger",{g:function(){return e}}),Re(i,"pageVisitTimeTrackingHandler",{g:function(){return n}})})}return t.__ieDyn=1,t})(),qI=(function(){function t(e,n){this.pageVisitStartTime=Rn(),this.pageName=e,this.pageUrl=n}return t})(),Av=(function(){function t(e,n){var r=this,i={};r.start=function(o){typeof i[o]<"u"&&G(e,2,62,"start was called more than once for this event without calling stop.",{name:o,key:o},!0),i[o]=+new Date},r.stop=function(o,s,a,c){var u=i[o];if(isNaN(u))G(e,2,63,"stop was called without a corresponding start.",{name:o,key:o},!0);else{var l=+new Date,f=Ht(u,l);r.action(o,s,f,a,c)}delete i[o],i[o]=void 0}}return t})(),Mt,BI="event";function ra(t,e){t&&t.dispatchEvent&&e&&t.dispatchEvent(e)}function KI(t){if(t&&t.reason){var e=t.reason;return!de(e)&&pe(e[ll])?e[ll]():te(e)}return t||""}var Mv=6e4,XI=Fs((Mt={sessionRenewalMs:Og(zv,1800*1e3),sessionExpirationMs:Og(zv,1440*60*1e3),disableExceptionTracking:dt()},Mt[wb]=dt(),Mt[UI]=dt(),Mt[kb]=dt(),Mt[uh]=!1,Mt.samplingPercentage=Qu(JI,100),Mt[sh]=dt(),Mt[Cb]=dt(),Mt[Sb]=dt(),Mt.namePrefix=$S(),Mt.enableDebug=dt(),Mt.disableFlushOnBeforeUnload=dt(),Mt.disableFlushOnUnload=dt(!1,"disableFlushOnBeforeUnload"),Mt.expCfg=kn({inclScripts:!1,expLog:void 0,maxLogs:50}),Mt));function zv(t,e){return t=t||e,t<Mv&&(t=Mv),+t}function JI(t){return!isNaN(t)&&t>0&&t<=100}function GI(t){Ze(t[sh])||(t[sh]?eI():tI())}var QI=(function(t){rr(e,t);function e(){var n=t.call(this)||this;n.identifier=Bp,n.priority=180,n.autoRoutePVDelay=500;var r,i,o,s,a,c,u,l,f,m,d,h,g,p,v,_,P,x,R,H,A;return He(e,n,function(k,O){var j=O[Lo];V(),k.getCookieMgr=function(){return Ul(k[ze])},k.processTelemetry=function(w,y){k.processNext(w,y)},k.trackEvent=function(w,y){try{var U=Hr(w,mr[Or],mr[Ci],k[Gt](),y);k[ze][Si](U)}catch(J){oe(2,39,"trackTrace failed, trace will not be collected: "+Ne(J),{exception:te(J)})}},k.startTrackEvent=function(w){try{r.start(w)}catch(y){oe(1,29,"startTrackEvent failed, event will not be collected: "+Ne(y),{exception:te(y)})}},k.stopTrackEvent=function(w,y,U){try{r.stop(w,void 0,y,U)}catch(J){oe(1,30,"stopTrackEvent failed, event will not be collected: "+Ne(J),{exception:te(J)})}},k.trackTrace=function(w,y){try{var U=Hr(w,Ts[Or],Ts[Ci],k[Gt](),y);k[ze][Si](U)}catch(J){oe(2,39,"trackTrace failed, trace will not be collected: "+Ne(J),{exception:te(J)})}},k.trackMetric=function(w,y){try{var U=Hr(w,oo[Or],oo[Ci],k[Gt](),y);k[ze][Si](U)}catch(J){oe(1,36,"trackMetric failed, metric will not be collected: "+Ne(J),{exception:te(J)})}},k[uu]=function(w,y){try{var U=w||{};k[ze]&&k[ze][fn]&&(U.uri=vr(U.uri,k[ze][fn])),o[uu](U,jt(jt(jt({},U.properties),U.measurements),y)),_&&a[ah](U.name,U.uri)}catch(J){oe(1,37,"trackPageView failed, page view will not be collected: "+Ne(J),{exception:te(J)})}},k[Ni]=function(w,y,U){var J=It();if(J&&(w[Xf]=w[Xf]===void 0?J.referrer:w[Xf]),k[ze]&&k[ze][fn]&&(w.refUri=vr(w.refUri,k[ze][fn])),B(w[Ls])){var Y=(y||w[_a]||{})[On]||0;w[Ls]=new Date(new Date().getTime()-Y)}var _e=Hr(w,ui[Or],ui[Ci],k[Gt](),y,U);k[ze][Si](_e),K()},k[ch]=function(w,y,U){var J=Hr(w,Es[Or],Es[Ci],k[Gt](),y,U);k[ze][Si](J)},k.trackPageViewPerformance=function(w,y){var U=w||{};try{s[Kp](U),k[ch](U,y)}catch(J){oe(1,37,"trackPageViewPerformance failed, page view will not be collected: "+Ne(J),{exception:te(J)})}},k.startTrackPage=function(w){try{if(typeof w!="string"){var y=It();w=y&&y.title||""}i.start(w)}catch(U){oe(1,31,"startTrackPage failed, page view may not be collected: "+Ne(U),{exception:te(U)})}},k.stopTrackPage=function(w,y,U,J){try{if(typeof w!="string"){var Y=It();w=Y&&Y.title||""}if(typeof y!="string"){var _e=Hn();y=_e&&_e[wa]||""}k[ze]&&k[ze][fn]&&(y=vr(y,k[ze][fn])),i.stop(w,y,U,J),_&&a[ah](w,y)}catch(Ie){oe(1,32,"stopTrackPage failed, page view will not be collected: "+Ne(Ie),{exception:te(Ie)})}},k[Pv]=function(w,y,U){var J=w&&(w.exception||w[na])||fp(w)&&w||{name:w&&typeof w,message:w||Yn};w=w||{};var Y=new qt(k[Gt](),J,w[_a]||y,w.measurements,w.severityLevel,w.id).toInterface(),_e=It();if(_e&&P!=null&&P.inclScripts){var Ie=ok(_e);Y[_a].exceptionScripts=JSON.stringify(Ie)}if(P!=null&&P.expLog){var Te=P.expLog();Te&&Te.logs&&we(Te.logs)&&(Y[_a].exceptionLog=Te.logs.slice(0,P.maxLogs).join(`
|
|
12
|
-
`))}var Ue=Hr(Y,qt[Or],qt[Ci],k[Gt](),y,U);k[ze][Si](Ue)},k.trackException=function(w,y){w&&!w.exception&&w[na]&&(w.exception=w[na]);try{k[Pv](w,y)}catch(U){oe(1,35,"trackException failed, exception will not be collected: "+Ne(U),{exception:te(U)})}},k._onerror=function(w){var y=w&&w[na],U=w&&w.evt;try{if(!U){var J=cn();J&&(U=J[BI])}var Y=w&&w.url||(It()||{}).URL,_e=w.errorSrc||"window.onerror@"+Y+":"+(w[Jf]||0)+":"+(w[Gf]||0),Ie={errorSrc:_e,url:Y,lineNumber:w[Jf]||0,columnNumber:w[Gf]||0,message:w.message};RI(w.message,w.url,w.lineNumber,w.columnNumber,w[na])?E(qt[Qf]("Script error: The browser's same-origin policy prevents us from getting the details of this exception. Consider using the 'crossorigin' attribute.",Y,w[Jf]||0,w[Gf]||0,y,U,null,_e),Ie):(w.errorSrc||(w.errorSrc=_e),k.trackException({exception:w,severityLevel:3},Ie))}catch(Ue){var Te=y?y.name+", "+y.message:"null";oe(1,11,"_onError threw exception while logging error, error will not be collected: "+Ne(Ue),{exception:te(Ue),errorString:Te})}},k[jc]=function(w){if(k[ze])return k[ze][jc](w);c||(c=[]),c.push(w)},k.initialize=function(w,y,U,J){if(!k.isInitialized()){B(y)&&Yt("Error initializing"),O.initialize(w,y,U,J);try{H=gi(mn(k.identifier),y.evtNamespace&&y.evtNamespace()),c&&(ee(c,function(Y){y[jc](Y)}),c=null),re(w),s=new VI(k[ze]),o=new $I(k,v.overridePageViewDuration,k[ze],s),a=new HI(k[Gt](),function(Y,_e,Ie){return se(Y,_e,Ie)}),r=new Av(k[Gt](),"trackEvent"),r.action=function(Y,_e,Ie,Te,Ue){Te||(Te={}),Ue||(Ue={}),Te.duration=Ie[ll](),k.trackEvent({name:Y,properties:Te,measurements:Ue})},i=new Av(k[Gt](),"trackPageView"),i.action=function(Y,_e,Ie,Te,Ue){B(Te)&&(Te={}),Te.duration=Ie[ll]();var Et={name:Y,uri:_e,properties:Te,measurements:Ue};k[Ni](Et,Te)},Dl()&&(q(),M())}catch(Y){throw k.setInitialized(!1),Y}}},k._doTeardown=function(w,y){o&&o.teardown(w,y),Cs(window,null,null,H),V()},k._getDbgPlgTargets=function(){return[A,h]};function K(){if(k[ze]){var w=k[ze].getPlugin("AjaxDependencyPlugin");w&&w.plugin&&w.plugin.resetAjaxAttempts&&w.plugin.resetAjaxAttempts()}}function re(w){var y=k.identifier,U=k[ze];k[Lo](at(w,function(){var J=Mn(null,w,U);v=J.getExtCfg(y,XI),h=h||w[Zf]||v[Zf],P=v.expCfg,_=v[wb],w.storagePrefix&&qp(w.storagePrefix),GI(v),u=v[Cb],b()}))}function se(w,y,U){var J={PageName:w,PageUrl:y};k.trackMetric({name:"PageVisitTime",average:U,max:U,min:U,sampleCount:1},J)}function b(){if(!l&&u){var w=["/browserLinkSignalR/","/__browserLink/"],y=function(U){if(u&&U.baseType===so[Or]){var J=U.baseData;if(J){for(var Y=0;Y<w[sc];Y++)if(J.target&&st(J.target,w[Y])>=0)return!1}}return!0};k[Lo](k[jc](y)),l=!0}}function E(w,y){var U=Hr(w,qt[Or],qt[Ci],k[Gt](),y);k[ze][Si](U)}function q(){var w=cn(),y=Hn();k[Lo](at(v,function(){d=v.disableExceptionTracking,!d&&!h&&!v[Zf]&&(j(Nc(w,"onerror",{ns:H,rsp:function(U,J,Y,_e,Ie,Te){!d&&U.rslt!==!0&&k._onerror(qt[Qf](J,Y,_e,Ie,Te,U.evt))}},!1)),A++,h=!0)})),me(w,y)}function M(){var w=cn(),y=Hn();k[Lo](at(v,function(){if(f=v[Sb]===!0,w&&f&&!m&&Hw()){var U=Gm();pe(U.pushState)&&pe(U.replaceState)&&typeof Event!==ip&&ce(w,U,y)}}))}function D(){var w=null;if(k[ze]&&k[ze].getTraceCtx&&(w=k[ze].getTraceCtx(!1)),!w){var y=k[ze].getPlugin(Fl);if(y){var U=y.plugin.context;U&&(w=Wp(U.telemetryTrace))}}return w}function ce(w,y,U){if(m)return;var J=v.namePrefix||"";function Y(){f&&ra(w,ta(J+"locationchange"))}function _e(){if(R&&(x=R),R=U&&U[wa]||"",k[ze]&&k[ze][fn]&&(R=vr(R,k[ze][fn])),f){var Ie=D();if(Ie){Ie.setTraceId(ti());var Te="_unknown_";U&&U.pathname&&(Te=U.pathname+(U.hash||"")),Ie.setName(gt(k[Gt](),Te))}vn((function(Ue){k[uu]({refUri:Ue,properties:{duration:0}})}).bind(k,x),k.autoRoutePVDelay)}}j(Nc(y,"pushState",{ns:H,rsp:function(){f&&(ra(w,ta(J+"pushState")),ra(w,ta(J+"locationchange")))}},!0)),j(Nc(y,"replaceState",{ns:H,rsp:function(){f&&(ra(w,ta(J+"replaceState")),ra(w,ta(J+"locationchange")))}},!0)),kr(w,J+"popstate",Y,H),kr(w,J+"locationchange",_e,H),m=!0}function me(w,y){k[Lo](at(v,function(){g=v[kb]===!0,h=h||v[uh],g&&!p&&(j(Nc(w,"onunhandledrejection",{ns:H,rsp:function(U,J){g&&U.rslt!==!0&&k._onerror(qt[Qf](KI(J),y?y[wa]:"",0,0,J,U.evt))}},!1)),A++,v[uh]=p=!0)}))}function oe(w,y,U,J,Y){k[Gt]().throwInternal(w,y,U,J,Y)}function V(){r=null,i=null,o=null,s=null,a=null,c=null,u=!1,l=!1,f=!1,m=!1,d=!1,h=!1,g=!1,p=!1,_=!1,K();var w=Hn();x=w&&w[wa]||"",k[ze]&&k[ze][fn]&&(x=vr(x,k[ze][fn])),R=null,H=null,v=null,A=0,Re(k,"config",{g:function(){return v}})}Re(k,"_pageViewManager",{g:function(){return o}}),Re(k,"_pageViewPerformanceManager",{g:function(){return s}}),Re(k,"_pageVisitTimeManager",{g:function(){return a}}),Re(k,"_evtNamespace",{g:function(){return"."+H}})}),n}return e.Version="3.3.11",e})(So),du="featureOptIn",Pb="scheduleFetchTimeout";function Db(t,e,n,r){try{var i=n>r;i&&(t=null);var o=n==0?cC({},t):t;return o&&e&&!i&&Pe(o,function(s){var a=e[s];a&&(Xt(o[s])&&Xt(a)?o[s]=Db(o[s],a,++n,r):delete o[s])}),o}catch{}return t}var xs="featureOptIn.",Rb=".mode",Ab=".onCfg",Mb=".offCfg";function ZI(t,e,n){var r;if(!e||!e.enabled)return null;var i=(e[du]||{})[t]||{mode:1},o=i.mode,s=i.onCfg,a=i.offCfg,c=(n||{})[t]||{mode:2},u=c.mode,l=c.onCfg,f=c.offCfg,m=!!c.blockCdnCfg,d=xs+t+Rb,h=xs+t+Ab,g=xs+t+Mb,p=u,v=l,_=f;return m||(o===4||o===5?(p=o==4?3:2,v=s||l,_=a||f):o===2||u===2?(p=2,v=l||s,_=f||a):o===3?(p=3,v=l||s,_=f||a):o===1&&u===1&&(p=1)),r={},r[d]=p,r[h]=v,r[g]=_,r}function YI(t,e){try{if(!t||!t.enabled)return null;if(!t[du])return t.config;var n=t[du],r=t.config||{};return Pe(n,function(i){var o=ZI(i,t,e.config[du]);B(o)||(Pe(o,function(s,a){oy(r,s,a)}),eT(i,o,r))}),r}catch{}return null}function eT(t,e,n){var r=e[xs+t+Rb],i=e[xs+t+Ab],o=e[xs+t+Mb],s=null;r===3&&(s=i),r===2&&(s=o),s&&Pe(s,function(a,c){oy(n,a,c)})}var ia,tT="ai_cfgsync",Uv="GET",nT=18e5,jo=void 0,rT={instrumentationKey:!0,connectionString:!0,endpointUrl:!0},iT=Fs((ia={syncMode:1,blkCdnCfg:jo,customEvtName:jo,cfgUrl:jo,overrideSyncFn:jo,overrideFetchFn:jo,onCfgChangeReceive:jo},ia[Pb]=nT,ia.nonOverrideConfigs=rT,ia.enableAjax=!1,ia)),oT=(function(t){rr(e,t);function e(){var n=t.call(this)||this;n.priority=198,n.identifier="AppInsightsCfgSyncPlugin";var r,i,o,s,a,c,u,l,f,m,d,h,g,p,v,_,P=!1,x;return He(e,n,function(R,H){A(),R.initialize=function(V,w,y,U){H.initialize(V,w,y,U),s=gi(mn(R.identifier),w.evtNamespace&&w.evtNamespace()),k(V)},R.getCfg=function(){return i},R.pause=function(){P=!0,oe()},R.resume=function(){P=!1,me()},R.setCfg=function(V){return O(V)},R.sync=function(V){return K(V)},R.updateEventListenerName=function(V){return re(V)},R._doTeardown=function(V,w){j(),oe(),A()},R._getDbgPlgTargets=function(){return[l,u,o,f,g]};function A(){i=null,o=null,s=null,a=null,u=null,l=null,g=null,c=null,m=null,d=null,f=null,x=!1,v=null,_=null,h=null}function k(V){var w=R.identifier,y=R.core;R._addHook(at(V,function(){var U=Mn(null,V,y);r=U.getExtCfg(w,iT);var J=f;f=!!r.blkCdnCfg,x=!!r.enableAjax,!B(J)&&J!==f&&(!f&&a?p&&p(a,q,l):oe()),B(u)&&(u=r.syncMode===2),B(l)&&(l=r.syncMode===1);var Y=r.customEvtName||tT;o!==Y&&(u?re(Y):(j(),o=Y)),B(a)&&(a=r.cfgUrl),a||(i=V,l&&K())})),_=r.overrideSyncFn,v=r.overrideFetchFn,h=r.onCfgChangeReceive,g=r.nonOverrideConfigs,m=r[Pb],p=se(),d=0,a&&!f&&p&&p(a,q,l)}function O(V,w){if(V){if(i=V,w&&!P)return K();if(u&&!P)return R.core.updateCfg(V),!0}return!1}function j(){try{var V=pn();V&&Cs(V,null,null,s)}catch{}}function K(V){try{return _&&pe(_)?_(i,V):gS(o,i,V)}catch{}return!1}function re(V){try{return j(),V&&(o=V,D()),!0}catch{}return!1}function se(){var V=v;return B(V)&&(Tp()?V=b:Ml()&&(V=E)),V}function b(V,w,y){var U=pn(),J=U&&U.fetch||null;if(V&&J&&pe(J))try{var Y={method:Uv};x||(Y[Vi]=!0);var _e=new Request(V,Y);if(!x)try{_e[Vi]=!0}catch{}Kt(fetch(_e),function(Ie){var Te=Ie.value;Ie.rejected?M(w,400):Te.ok?Kt(Te.text(),function(Ue){M(w,Te.status,Ue.value,y)}):M(w,Te.status,null,y)})}catch{}}function E(V,w,y){try{var U=new XMLHttpRequest;x||(U[Vi]=!0),U.open(Uv,V),U.onreadystatechange=function(){U.readyState===XMLHttpRequest.DONE&&M(w,U.status,U.responseText,y)},U.onerror=function(){M(w,400)},U.ontimeout=function(){M(w,400)},U.send()}catch{}}function q(V,w,y){try{if(V>=200&&V<400&&w){d=0;var U=An();if(U){var J=U.parse(w),Y=YI(J,R.core),_e=Y&&Lt(Y)&&ce(Y);_e&&O(_e,y)}}else d++;d<3&&me()}catch{}}function M(V,w,y,U){try{V(w,y,U)}catch{}}function D(){if(u){var V=pn();if(V)try{kr(V,o,function(w){var y=w&&w.detail;if(h&&y)h(y);else{var U=y&&y.cfg,J=U&&Lt(U)&&ce(U);J&&O(J)}},s,!0)}catch{}}}function ce(V,w){var y=null;try{V&&(y=Db(V,g,0,5))}catch{}return y}function me(){!c&&m&&(c=vn(function(){c=null,p(a,q,l)},m),c.unref())}function oe(){c&&c.cancel(),c=null,d=0}R.processTelemetry=function(V,w){R.processNext(V,w)}}),n}return e.__ieDyn=1,e})(So),xi="duration",St="tags",Yf="deviceType",nn="data",Ar="name",ac="traceID",xe="length",cc="stringify",Eo="measurements",Jn="dataType",xo="envelopeType",Pi="toString",ao="enqueue",co="count",Er="push",hh="emitLineDelimitedJson",Ps="clear",dl="markAsSent",$a="clearSent",Xp="bufferOverride",oa="BUFFER_KEY",Fr="SENT_BUFFER_KEY",Qo="concat",sa="MAX_BUFFER_SIZE",aa="triggerSend",Pt="diagLog",ed="initialize",ca="_sender",ua="endpointUrl",Sa="instrumentationKey",ph="customHeaders",zb="maxBatchSizeInBytes",gh="onunloadDisableBeacon",vh="isBeaconApiDisabled",Ub="alwaysUseXhrOverride",Nb="enableSessionStorageBuffer",Nn="_buffer",$b="onunloadDisableFetch",Lb="disableSendBeaconSplit",Oc="getSenderInst",ki="_onError",td="_onPartialSuccess",Fc="_onSuccess",nd="itemsReceived",rd="itemsAccepted",id="baseType",hl="sampleRate",sT="getHashCodeScore",od="baseType",et="baseData",bt="properties",Nv="true";function ct(t,e,n){return We(t,e,n,Pu)}function aT(t,e,n){var r=n[St]=n[St]||{},i=e.ext=e.ext||{},o=e[St]=e[St]||[],s=i.user;s&&(ct(r,Ke.userAuthUserId,s.authId),ct(r,Ke.userId,s.id||s.localId));var a=i.app;a&&ct(r,Ke.sessionId,a.sesId);var c=i.device;c&&(ct(r,Ke.deviceId,c.id||c.localId),ct(r,Ke[Yf],c.deviceClass),ct(r,Ke.deviceIp,c.ip),ct(r,Ke.deviceModel,c.model),ct(r,Ke[Yf],c[Yf]));var u=e.ext.web;if(u){ct(r,Ke.deviceLanguage,u.browserLang),ct(r,Ke.deviceBrowserVersion,u.browserVer),ct(r,Ke.deviceBrowser,u.browser);var l=n[nn]=n[nn]||{},f=l[et]=l[et]||{},m=f[bt]=f[bt]||{};ct(m,"domain",u.domain),ct(m,"isManual",u.isManual?Nv:null),ct(m,"screenRes",u.screenRes),ct(m,"userConsent",u.userConsent?Nv:null)}var d=i.os;d&&(ct(r,Ke.deviceOS,d[Ar]),ct(r,Ke.deviceOSVersion,d.osVer));var h=i.trace;h&&(ct(r,Ke.operationParentId,h.parentID),ct(r,Ke.operationName,gt(t,h[Ar])),ct(r,Ke.operationId,h[ac]));for(var g={},p=o[xe]-1;p>=0;p--){var v=o[p];Pe(v,function(P,x){g[P]=x}),o.splice(p,1)}Pe(o,function(P,x){g[P]=x});var _=jt(jt({},r),g);_[Ke.internalSdkVersion]||(_[Ke.internalSdkVersion]=gt(t,"javascript:".concat(cT.Version),64)),n[St]=_y(_)}function hi(t,e,n){B(t)||Pe(t,function(r,i){hc(i)?n[r]=i:de(i)?e[r]=i:vc()&&(e[r]=An()[cc](i))})}function Po(t,e){B(t)||Pe(t,function(n,r){t[n]=r||e})}function Do(t,e,n,r){var i=new aI(t,r,e);ct(i,"sampleRate",n[tb]),(n[et]||{}).startTime&&(i.time=Us(n[et].startTime)),i.iKey=n.iKey;var o=n.iKey.replace(/-/g,"");return i[Ar]=i[Ar].replace("{0}",o),aT(t,n,i),n[St]=n[St]||[],_y(i)}function Ro(t,e){B(e[et])&&G(t,1,46,"telemetryItem.baseData cannot be null.")}var cT={Version:"3.3.11"};function uT(t,e,n){Ro(t,e);var r=e[et][Eo]||{},i=e[et][bt]||{};hi(e[nn],i,r),B(n)||Po(i,n);var o=e[et];if(B(o))return ro(t,"Invalid input for dependency data"),null;var s=o[bt]&&o[bt][mv]?o[bt][mv]:"GET",a=new so(t,o.id,o.target,o[Ar],o[xi],o.success,o.responseCode,s,o.type,o.correlationContext,i,r),c=new To(so[Jn],a);return Do(t,so[xo],e,c)}function jb(t,e,n){Ro(t,e);var r={},i={};e[od]!==mr[Jn]&&(r.baseTypeSource=e[od]),e[od]===mr[Jn]?(r=e[et][bt]||{},i=e[et][Eo]||{}):e[et]&&hi(e[et],r,i),hi(e[nn],r,i),B(n)||Po(r,n);var o=e[et][Ar],s=new mr(t,o,r,i),a=new To(mr[Jn],s);return Do(t,mr[xo],e,a)}function lT(t,e,n){Ro(t,e);var r=e[et][Eo]||{},i=e[et][bt]||{};hi(e[nn],i,r),B(n)||Po(i,n);var o=e[et],s=qt.CreateFromInterface(t,o,i,r),a=new To(qt[Jn],s);return Do(t,qt[xo],e,a)}function fT(t,e,n){Ro(t,e);var r=e[et],i=r[bt]||{},o=r[Eo]||{};hi(e[nn],i,o),B(n)||Po(i,n);var s=new oo(t,r[Ar],r.average,r.sampleCount,r.min,r.max,r.stdDev,i,o),a=new To(oo[Jn],s);return Do(t,oo[xo],e,a)}function dT(t,e,n){Ro(t,e);var r,i=e[et];!B(i)&&!B(i[bt])&&!B(i[bt][xi])?(r=i[bt][xi],delete i[bt][xi]):!B(e[nn])&&!B(e[nn][xi])&&(r=e[nn][xi],delete e[nn][xi]);var o=e[et],s;((e.ext||{}).trace||{})[ac]&&(s=e.ext.trace[ac]);var a=o.id||s,c=o[Ar],u=o.uri,l=o[bt]||{},f=o[Eo]||{};if(B(o.refUri)||(l.refUri=o.refUri),B(o.pageType)||(l.pageType=o.pageType),B(o.isLoggedIn)||(l.isLoggedIn=o.isLoggedIn[Pi]()),!B(o[bt])){var m=o[bt];Pe(m,function(g,p){l[g]=p})}hi(e[nn],l,f),B(n)||Po(l,n);var d=new ui(t,c,u,r,l,f,a),h=new To(ui[Jn],d);return Do(t,ui[xo],e,h)}function hT(t,e,n){Ro(t,e);var r=e[et],i=r[Ar],o=r.uri||r.url,s=r[bt]||{},a=r[Eo]||{};hi(e[nn],s,a),B(n)||Po(s,n);var c=new Es(t,i,o,void 0,s,a,r),u=new To(Es[Jn],c);return Do(t,Es[xo],e,u)}function pT(t,e,n){Ro(t,e);var r=e[et].message,i=e[et].severityLevel,o=e[et][bt]||{},s=e[et][Eo]||{};hi(e[nn],o,s),B(n)||Po(o,n);var a=new Ts(t,r,i,o,s),c=new To(Ts[Jn],a);return Do(t,Ts[xo],e,c)}var Ob=(function(){function t(e,n){var r=[],i=!1,o=n.maxRetryCnt;this._get=function(){return r},this._set=function(s){return r=s,r},He(t,this,function(s){s[ao]=function(a){if(s[co]()>=n.eventsLimitInMem){i||(G(e,2,105,"Maximum in-memory buffer size reached: "+s[co](),!0),i=!0);return}a.cnt=a.cnt||0,!(!B(o)&&a.cnt>o)&&r[Er](a)},s[co]=function(){return r[xe]},s.size=function(){for(var a=r[xe],c=0;c<r[xe];c++)a+=r[c].item[xe];return n[hh]||(a+=2),a},s[Ps]=function(){r=[],i=!1},s.getItems=function(){return r.slice(0)},s.batchPayloads=function(a){if(a&&a[xe]>0){var c=[];ee(a,function(l){c[Er](l.item)});var u=n[hh]?c.join(`
|
|
13
|
-
`):"["+c.join(",")+"]";return u}return null},s.createNew=function(a,c,u){var l=r.slice(0);a=a||e,c=c||{};var f=u?new
|
|
14
|
-
`,{name:a},!0);else{c=[];for(var u=0;u<s[xe];u++){var l=s[u],f=r(l,a+"["+u+"]");c[Er](f)}}return c}function o(s,a,c){var u;return s&&(u={},Pe(s,function(l,f){if(a==="string")f===void 0?u[l]="undefined":f===null?u[l]="null":f[Pi]?u[l]=f[Pi]():u[l]="invalid field: toString() is not defined.";else if(a==="number")if(f===void 0)u[l]="undefined";else if(f===null)u[l]="null";else{var m=parseFloat(f);u[l]=m}else u[l]="invalid field: "+c+" is of unknown type.",G(e,1,u[l],null,!0)})),u}})}return t.__ieDyn=1,t})(),mT=8,yT=(function(){function t(){}return t.prototype.getHashCodeScore=function(e){var n=this.getHashCode(e)/t.INT_MAX_VALUE;return n*100},t.prototype.getHashCode=function(e){if(e==="")return 0;for(;e[xe]<mT;)e=e[Qo](e);for(var n=5381,r=0;r<e[xe];++r)n=(n<<5)+n+e.charCodeAt(r),n=n&n;return Math.abs(n)},t.INT_MAX_VALUE=2147483647,t})(),bT=(function(){function t(){var e=this,n=new yT,r=new bb;e.getSamplingScore=function(i){var o=0;return i[St]&&i[St][r.userId]?o=n.getHashCodeScore(i[St][r.userId]):i.ext&&i.ext.user&&i.ext.user.id?o=n[sT](i.ext.user.id):i[St]&&i[St][r.operationId]?o=n.getHashCodeScore(i[St][r.operationId]):i.ext&&i.ext.telemetryTrace&&i.ext.telemetryTrace[ac]?o=n.getHashCodeScore(i.ext.telemetryTrace[ac]):o=Math.random()*100,o}}return t})(),_T=(function(){function t(e,n){this.INT_MAX_VALUE=2147483647;var r=n||Co(null);(e>100||e<0)&&(r.throwInternal(2,58,"Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.",{samplingRate:e},!0),e=100),this[hl]=e,this.samplingScoreGenerator=new bT}return t.prototype.isSampledIn=function(e){var n=this[hl],r=!1;return n==null||n>=100||e.baseType===oo[Jn]?!0:(r=this.samplingScoreGenerator.getSamplingScore(e)<n,r)},t})(),Be,ur,Sn=void 0,$v="",wT=65e3;function Lv(t){try{return t.responseText}catch{}return null}function CT(t){return t&&t.sendPOST}var jv=Fs((Be={endpointUrl:Qu(Pu,jp+Ss)},Be[hh]=dt(),Be.maxBatchInterval=15e3,Be[zb]=102400,Be.disableTelemetry=dt(),Be[Nb]=dt(!0),Be.isRetryDisabled=dt(),Be[vh]=dt(!0),Be[Lb]=dt(!0),Be.disableXhr=dt(),Be[$b]=dt(),Be[gh]=dt(),Be[Sa]=Sn,Be.namePrefix=Sn,Be.samplingPercentage=Qu(ST,100),Be[ph]=Sn,Be.convertUndefined=Sn,Be.eventsLimitInMem=1e4,Be[Xp]=!1,Be.httpXHROverride={isVal:CT,v:Sn},Be[Ub]=dt(),Be.transports=Sn,Be.retryCodes=Sn,Be.corsPolicy=Sn,Be.maxRetryCnt={isVal:hc,v:10},Be)),Ov="X-Set-Cross-Origin-Resource-Policy";function ST(t){return!isNaN(t)&&t>0&&t<=100}var kT=(ur={},ur[mr.dataType]=jb,ur[Ts.dataType]=pT,ur[ui.dataType]=dT,ur[Es.dataType]=hT,ur[qt.dataType]=lT,ur[oo.dataType]=fT,ur[so.dataType]=uT,ur),IT=(function(t){rr(e,t);function e(){var n=t.call(this)||this;n.priority=1001,n.identifier=_b;var r,i,o,s,a,c,u,l,f=0,m,d,h,g,p,v,_,P,x,R,H,A,k,O,j,K,re,se,b,E,q,M,D,ce,me,oe,V,w;return He(e,n,function(y,U){_c(),y.pause=function(){_t(),s=!0},y.resume=function(){s&&(s=!1,i=null,z(),qe())},y.flush=function(T,L,Q){if(T===void 0&&(T=!0),!s){_t();try{var ae=y[aa](T,null,Q||1);return Kt(ae,function(ge){return L?(L(!ge.rejected),!0):T?Qn(function(ve){ve(!ge.rejected)}):ae})}catch(ge){G(y[Pt](),1,22,"flush failed, telemetry will not be collected: "+Ne(ge),{exception:te(ge)})}}},y.onunloadFlush=function(){if(!s)if(_||E)try{return y[aa](!0,X,2)}catch(T){G(y[Pt](),1,20,"failed to flush with beacon sender on page unload, telemetry will not be collected: "+Ne(T),{exception:te(T)})}else y.flush(!1)},y.addHeader=function(T,L){l[T]=L},y[ed]=function(T,L,Q,ae){y.isInitialized()&&G(y[Pt](),1,28,"Sender is already initialized"),U[ed](T,L,Q,ae);var ge=y.identifier;c=new vT(L.logger),r=0,i=null,o=0,y[ca]=null,u=0;var ve=y[Pt]();h=gi(mn("Sender"),L.evtNamespace&&L.evtNamespace()),d=AI(h),y._addHook(at(T,function(Me){var Ge=Me.cfg;Ge.storagePrefix&&qp(Ge.storagePrefix);var Wt=Mn(null,Ge,L),Ce=Wt.getExtCfg(ge,jv),Hs=Ce[ua];if(g&&Hs===g){var or=Ge[ua];or&&or!==Hs&&(Ce[ua]=or)}var qs=tt("CompressionStream");w=ru("zipPayload",Ge,!1),pe(qs)||(w=!1);var mi=Ce.corsPolicy;mi?(mi==="same-origin"||mi==="same-site"||mi==="cross-origin")&&n.addHeader(Ov,mi):delete l[Ov],fi(Ce[Sa])&&(Ce[Sa]=Ge[Sa]),Re(y,"_senderConfig",{g:function(){return Ce}}),p!==Ce[ua]&&(g=p=Ce[ua]),L.activeStatus()===Kr.PENDING?y.pause():L.activeStatus()===Kr.ACTIVE&&y.resume(),R&&R!==Ce[ph]&&ee(R,function(wt){delete l[wt.header]}),v=Ce[zb],_=(Ce[gh]===!1||Ce[vh]===!1)&&va(),P=Ce[gh]===!1&&va(),x=Ce[vh]===!1&&va(),E=Ce[Ub],q=!!Ce.disableXhr,V=Ce.retryCodes;var Vl=Ce[Xp],Mo=!!Ce[Nb]&&(!!Vl||ic()),Gp=Ce.namePrefix,E_=Mo!==K||Mo&&se!==Gp||Mo&&re!==Vl;if(y[Nn]){if(E_)try{y[Nn]=y[Nn].createNew(ve,Ce,Mo)}catch(wt){G(y[Pt](),1,12,"failed to transfer telemetry to different buffer storage, telemetry will be lost: "+Ne(wt),{exception:te(wt)})}z()}else y[Nn]=Mo?new Fb(ve,Ce):new Jp(ve,Ce);se=Gp,K=Mo,re=Vl,M=!Ce[$b]&&Tp(!0),me=!!Ce[Lb],y._sample=new _T(Ce.samplingPercentage,ve),A=Ce[Sa],!fi(A)&&!Ao(A,Ge)&&G(ve,1,100,"Invalid Instrumentation key "+A),R=Ce[ph],de(g)&&!th(g)&&R&&R[xe]>0?ee(R,function(wt){n.addHeader(wt.header,wt.value)}):R=null,b=Ce.enableSendPromise;var Qp=Y();oe?oe.SetConfig(Qp):(oe=new Ek,oe[ed](Qp,ve));var wc=Ce.httpXHROverride,Cc=null,Bs=null,x_=$g([3,1,2],Ce.transports);Cc=oe&&oe[Oc](x_,!1);var Hl=oe&&oe.getFallbackInst();D=function(wt,yi){return ue(Hl,wt,yi)},ce=function(wt,yi){return ue(Hl,wt,yi,!1)},Cc=E?wc:Cc||wc||Hl,y[ca]=function(wt,yi){return ue(Cc,wt,yi)},M&&(m=ke);var ql=$g([3,1],Ce.unloadTransports);M||(ql=ql.filter(function(wt){return wt!==2})),Bs=oe&&oe[Oc](ql,!0),Bs=E?wc:Bs||wc,(E||Ce.unloadTransports||!m)&&Bs&&(m=function(wt,yi){return ue(Bs,wt,yi)}),m||(m=D),H=Ce.disableTelemetry,k=Ce.convertUndefined||Sn,O=Ce.isRetryDisabled,j=Ce.maxBatchInterval}))},y.processTelemetry=function(T,L){L=y._getTelCtx(L);var Q=L[Pt]();try{var ae=Oe(T,Q);if(!ae)return;var ge=Fe(T,Q);if(!ge)return;var ve=c.serialize(ge),Me=y[Nn];z(ve);var Ge={item:ve,cnt:0};Me[ao](Ge),qe()}catch(Wt){G(Q,2,12,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+Ne(Wt),{exception:te(Wt)})}y.processNext(T,L)},y.isCompletelyIdle=function(){return!s&&f===0&&y._buffer[co]()===0},y.getOfflineListener=function(){return d},y._xhrReadyStateChange=function(T,L,Q){if(!le(L))return _e(T,L,Q)},y[aa]=function(T,L,Q){T===void 0&&(T=!0);var ae;if(!s)try{var ge=y[Nn];if(H)ge[Ps]();else{if(ge[co]()>0){var ve=ge.getItems();Ft(Q||0,T),L?ae=L.call(y,ve,T):ae=y[ca](ve,T)}o=+new Date}_t()}catch(Ge){var Me=Ty();(!Me||Me>9)&&G(y[Pt](),1,40,"Telemetry transmission failed, some telemetry will be lost: "+Ne(Ge),{exception:te(Ge)})}return ae},y.getOfflineSupport=function(){return{getUrl:function(){return g},createPayload:un,serialize:xt,batch:ir,shouldProcess:function(T){return!!Oe(T)}}},y._doTeardown=function(T,L){y.onunloadFlush(),ls(d,!1),_c()},y[ki]=function(T,L,Q){if(!le(T))return Ie(T,L)},y[td]=function(T,L){if(!le(T))return Te(T,L)},y[Fc]=function(T,L){if(!le(T))return Ue(T)},y._xdrOnLoad=function(T,L){if(!le(L))return J(T,L)};function J(T,L){var Q=Lv(T);if(T&&(Q+""=="200"||Q===""))r=0,y[Fc](L,0);else{var ae=$f(Q);ae&&ae[nd]&&ae[nd]>ae[rd]&&!O?y[td](L,ae):y[ki](L,Cy(T))}}function Y(){try{var T={xdrOnComplete:function(Q,ae,ge){var ve=Et(ge);if(ve)return J(Q,ve)},fetchOnComplete:function(Q,ae,ge,ve){var Me=Et(ve);if(Me)return W(Q.status,Me,Q.url,Me[xe],Q.statusText,ge||"")},xhrOnComplete:function(Q,ae,ge){var ve=Et(ge);if(ve)return _e(Q,ve,ve[xe])},beaconOnRetry:function(Q,ae,ge){return ie(Q,ae,ge)}},L={enableSendPromise:b,isOneDs:!1,disableCredentials:!1,disableXhr:q,disableBeacon:!x,disableBeaconSync:!P,senderOnCompleteCallBack:T};return L}catch{}return null}function _e(T,L,Q){T.readyState===4&&W(T.status,L,T.responseURL,Q,Xu(T),Lv(T)||T.response)}function Ie(T,L,Q){G(y[Pt](),2,26,"Failed to send telemetry.",{message:L}),y._buffer&&y._buffer[$a](T)}function Te(T,L){for(var Q=[],ae=[],ge=L.errors.reverse(),ve=0,Me=ge;ve<Me.length;ve++){var Ge=Me[ve],Wt=T.splice(Ge.index,1)[0];zn(Ge.statusCode)?ae[Er](Wt):Q[Er](Wt)}T[xe]>0&&y[Fc](T,L[rd]),Q[xe]>0&&y[ki](Q,Xu(null,["partial success",L[rd],"of",L.itemsReceived].join(" "))),ae[xe]>0&&(ye(ae),G(y[Pt](),2,40,"Partial success. Delivered: "+T[xe]+", Failed: "+Q[xe]+". Will retry to send "+ae[xe]+" our of "+L[nd]+" items"))}function Ue(T,L){y._buffer&&y._buffer[$a](T)}function Et(T){try{if(T){var L=T,Q=L.oriPayload;return Q&&Q[xe]?Q:null}}catch{}return null}function Oe(T,L){if(H)return!1;if(!T)return L&&G(L,1,7,"Cannot send empty telemetry"),!1;if(T.baseData&&!T[id])return L&&G(L,1,70,"Cannot send telemetry without baseData and baseType"),!1;if(T[id]||(T[id]="EventData"),!y[ca])return L&&G(L,1,28,"Sender was not initialized"),!1;if($(T))T[tb]=y._sample[hl];else return L&&G(L,2,33,"Telemetry item was sampled out and not sent",{SampleRate:y._sample[hl]}),!1;return!0}function Fe(T,L){var Q=T.iKey||A,ae=e.constructEnvelope(T,Q,L,k);if(!ae){G(L,1,47,"Unable to create an AppInsights envelope");return}var ge=!1;if(T[St]&&T[St][Of]&&(ee(T[St][Of],function(ve){try{ve&&ve(ae)===!1&&(ge=!0,ro(L,"Telemetry processor check returns false"))}catch(Me){G(L,1,64,"One of telemetry initializers failed, telemetry item will not be sent: "+Ne(Me),{exception:te(Me)},!0)}}),delete T[St][Of]),!ge)return ae}function xt(T){var L=$v,Q=y[Pt]();try{var ae=Oe(T,Q),ge=null;ae&&(ge=Fe(T,Q)),ge&&(L=c.serialize(ge))}catch{}return L}function ir(T){var L=$v;return T&&T[xe]&&(L="["+T.join(",")+"]"),L}function un(T){var L=S();return{urlString:g,data:T,headers:L}}function $(T){return y._sample.isSampledIn(T)}function Z(T,L,Q,ae){L===200&&T?y._onSuccess(T,T[xe]):ae&&y[ki](T,ae)}function ue(T,L,Q,ae){ae===void 0&&(ae=!0);var ge=function(or,qs,mi){return Z(L,or,qs,mi)},ve=ne(L),Me=T&&T.sendPOST;if(Me&&ve){ae&&y._buffer[dl](L);var Ge,Wt=!1,Ce,Hs;return oe.preparePayload(function(or){Ge=Me(or,ge,!Q),Wt=!0,Ce&&Ip(Ge,Ce,Hs)},w,ve,!Q),Wt?Ge:Qn(function(or,qs){Ce=or,Hs=qs})}return null}function ne(T){if(we(T)&&T[xe]>0){var L=y[Nn].batchPayloads(T),Q=S(),ae={data:L,urlString:g,headers:Q,disableXhrSync:q,disableFetchKeepAlive:!M,oriPayload:T};return ae}return null}function S(){try{var T=l||{};return th(g)&&(T[je[6]]=je[7]),T}catch{}return null}function z(T){var L=T?T[xe]:0;return y[Nn].size()+L>v?((!d||d.isOnline())&&y[aa](!0,null,10),!0):!1}function W(T,L,Q,ae,ge,ve){var Me=null;if(y._appId||(Me=$f(ve),Me&&Me.appId&&(y._appId=Me.appId)),(T<200||T>=300)&&T!==0){if((T===301||T===307||T===308)&&!F(Q)){y[ki](L,ge);return}if(d&&!d.isOnline()){if(!O){var Ge=10;ye(L,Ge),G(y[Pt](),2,40,". Offline - Response Code: ".concat(T,". Offline status: ").concat(!d.isOnline(),". Will retry to send ").concat(L.length," items."))}return}!O&&zn(T)?(ye(L),G(y[Pt](),2,40,". Response code "+T+". Will retry to send "+L[xe]+" items.")):y[ki](L,ge)}else F(Q),T===206?(Me||(Me=$f(ve)),Me&&!O?y[td](L,Me):y[ki](L,ge)):(r=0,y[Fc](L,ae))}function F(T){return u>=10?!1:!B(T)&&T!==""&&T!==g?(g=T,++u,!0):!1}function X(T,L){if(m)m(T,!1);else{var Q=oe&&oe[Oc]([3],!0);return ue(Q,T,L)}}function ie(T,L,Q){var ae=T,ge=ae&&ae.oriPayload;if(me)ce&&ce(ge,!0),G(y[Pt](),2,40,". Failed to send telemetry with Beacon API, retried with normal sender.");else{for(var ve=[],Me=0;Me<ge[xe];Me++){var Ge=ge[Me],Wt=[Ge],Ce=ne(Wt);Q(Ce,L)?y._onSuccess(Wt,Wt[xe]):ve[Er](Ge)}ve[xe]>0&&(ce&&ce(ve,!0),G(y[Pt](),2,40,". Failed to send telemetry with Beacon API, retried with normal sender."))}}function le(T){try{if(T&&T[xe])return de(T[0])}catch{}return null}function ke(T,L){var Q=null;if(we(T)){for(var ae=T[xe],ge=0;ge<T[xe];ge++)ae+=T[ge].item[xe];var ve=oe.getSyncFetchPayload();ve+ae<=wT?Q=2:va()?Q=3:(Q=1,G(y[Pt](),2,40,". Failed to send telemetry with Beacon API, retried with xhrSender."));var Me=oe&&oe[Oc]([Q],!0);return ue(Me,T,L)}return null}function ye(T,L){if(L===void 0&&(L=1),!(!T||T[xe]===0)){var Q=y[Nn];Q[$a](T),r++;for(var ae=0,ge=T;ae<ge.length;ae++){var ve=ge[ae];ve.cnt=ve.cnt||0,ve.cnt++,Q[ao](ve)}$e(L),qe()}}function $e(T){var L=10,Q;if(r<=1)Q=L;else{var ae=(Math.pow(2,r)-1)/2,ge=an(Math.random()*ae*L)+1;ge=T*ge,Q=Ma(Bm(ge,3600),L)}var ve=Rn()+Q*1e3;i=ve}function qe(){if(!a&&!s){var T=i?Ma(0,i-Rn()):0,L=Ma(j,T);a=vn(function(){a=null,y[aa](!0,null,1)},L)}}function _t(){a&&a.cancel(),a=null,i=null}function zn(T){return B(V)?T===401||T===408||T===429||T===500||T===502||T===503||T===504:V[xe]&&V.indexOf(T)>-1}function Un(){var T="getNotifyMgr",L,Q=y.core;return Q&&(Q[T]?L=Q[T]():L=Q._notificationManager),L}function Ft(T,L){var Q=Un();if(Q&&Q.eventsSendRequest)try{Q.eventsSendRequest(T,L)}catch(ae){G(y[Pt](),1,74,"send request notification failed: "+Ne(ae),{exception:te(ae)})}}function Ao(T,L){var Q=L.disableInstrumentationKeyValidation,ae=B(Q)?!1:Q;if(ae)return!0;var ge="^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",ve=new RegExp(ge);return ve.test(T)}function _c(){y[ca]=null,y[Nn]=null,y._appId=null,y._sample=null,l={},d=null,r=0,i=null,o=null,s=!1,a=null,c=null,u=0,f=0,m=null,h=null,g=null,p=null,v=0,_=!1,R=null,H=!1,A=null,k=Sn,O=!1,K=null,se=Sn,q=!1,M=!1,me=!1,D=null,ce=null,oe=null,Re(y,"_senderConfig",{g:function(){return wy({},jv)}})}}),n}return e.constructEnvelope=function(n,r,i,o){var s;r!==n.iKey&&!B(r)?s=jt(jt({},n),{iKey:r}):s=n;var a=kT[s.baseType]||jb;return a(i,s,o)},e})(So),Fv="duration",js="properties",En="requestUrl",Hi="length",ni="traceID",ri="spanID",Pn="traceFlags",La="context",Ds="aborted",Wc="_addHook",Qt="core",sd="includeCorrelationHeaders",mh="getAbsoluteUrl",Ii="headers",dn="requestHeaders",ad="setRequestHeader",Wv="trackDependencyDataInternal",ds="startTime",Oo="toLowerCase",yh="enableRequestHeaderTracking",Wb="enableAjaxErrorStatusText",Vb="enableAjaxPerfTracking",Hb="maxAjaxCallsPerView",qb="excludeRequestFromAutoTrackingPatterns",bh="disableAjaxTracking",Bb="ajaxPerfLookupDelay",Kb="disableFetchTracking",Xb="enableResponseHeaderTracking",Tn="status",$i="statusText",pl="headerMap",qi="requestSentTime",_h="getTraceId",wh="getTraceFlags",Yr="method",Ch="errorStatusText",Jb="stateChangeAttached",Vv="responseText",ka="responseFinishedTime",Sh="CreateTrackItem",Hv="getAllResponseHeaders",kh="getPartAProps",gl="perfMark",Ih="perfTiming",Th="ajaxDiagnosticsMessage",Eh="correlationContext",cd="ajaxTotalDuration",ud="eventTraceCtx";function Gb(t,e,n){var r=0,i=t[e],o=t[n];return i&&o&&(r=Ht(i,o)),r}function Ti(t,e,n,r,i){var o=0,s=Gb(n,r,i);return s&&(o=qr(t,e,Zr(s))),o}function qr(t,e,n){var r="ajaxPerf",i=0;if(t&&e&&n){var o=t[r]=t[r]||{};o[e]=n,i=1}return i}function TT(t,e){var n=t[Ih],r=e[js]||{},i=0,o="name",s="Start",a="End",c="domainLookup",u="connect",l="redirect",f="request",m="response",d="startTime",h=c+s,g=c+a,p=u+s,v=u+a,_=f+s,P=f+a,x=m+s,R=m+a,H=l+s,A=l=a,k="transferSize",O="encodedBodySize",j="decodedBodySize",K="serverTiming";if(n){i|=Ti(r,l,n,H,A),i|=Ti(r,c,n,h,g),i|=Ti(r,u,n,p,v),i|=Ti(r,f,n,_,P),i|=Ti(r,m,n,x,R),i|=Ti(r,"networkConnect",n,d,v),i|=Ti(r,"sentRequest",n,_,R);var re=n[Fv];re||(re=Gb(n,d,R)||0),i|=qr(r,Fv,re),i|=qr(r,"perfTotal",re);var se=n[K];if(se){var b={};ee(se,function(E,q){var M=qu(E[o]||""+q),D=b[M]||{};Pe(E,function(ce,me){(ce!==o&&de(me)||hc(me))&&(D[ce]&&(me=D[ce]+";"+me),(me||!de(me))&&(D[ce]=me))}),b[M]=D}),i|=qr(r,K,b)}i|=qr(r,k,n[k]),i|=qr(r,O,n[O]),i|=qr(r,j,n[j])}else t[gl]&&(i|=qr(r,"missing",t.perfAttempts));i&&(e[js]=r)}var ET=(function(){function t(){var e=this;e.openDone=!1,e.setRequestHeaderDone=!1,e.sendDone=!1,e.abortDone=!1,e[Jb]=!1}return t})(),qv=(function(){function t(e,n,r,i){var o=this,s=r,a="responseText";o[gl]=null,o.completed=!1,o.requestHeadersSize=null,o[dn]=null,o.responseReceivingDuration=null,o.callbackDuration=null,o[cd]=null,o[Ds]=0,o.pageUrl=null,o[En]=null,o.requestSize=0,o[Yr]=null,o[Tn]=null,o[qi]=null,o.responseStartedTime=null,o[ka]=null,o.callbackFinishedTime=null,o.endTime=null,o.xhrMonitoringState=new ET,o.clientFailure=0,o[ni]=e,o[ri]=n,o[Pn]=i==null?void 0:i.getTraceFlags(),i?o[ud]={traceId:i[_h](),spanId:i.getSpanId(),traceFlags:i[wh]()}:o[ud]=null,He(t,o,function(c){c.getAbsoluteUrl=function(){return c[En]?Kk(c[En]):null},c.getPathName=function(){return c[En]?Ll(s,Xk(c[Yr],c[En])):null},c[Sh]=function(u,l,f){var m;if(c.ajaxTotalDuration=sy(Ht(c.requestSentTime,c.responseFinishedTime)*1e3)/1e3,c[cd]<0)return null;var d=(m={id:"|"+c[ni]+"."+c[ri],target:c[mh](),name:c.getPathName(),type:u,startTime:null,duration:c[cd],success:+c[Tn]>=200&&+c[Tn]<400,responseCode:+c[Tn]},m[js]={HttpMethod:c[Yr]},m),h=d[js];if(c[Ds]&&(h[Ds]=!0),c[qi]&&(d[ds]=new Date,d[ds].setTime(c[qi])),TT(c,d),l&&Cr(c.requestHeaders)[Hi]>0&&(h[dn]=c[dn]),f){var g=f();if(g){var p=g[Eh];if(p&&(d.correlationContext=p),g[pl]&&Cr(g.headerMap)[Hi]>0&&(h.responseHeaders=g[pl]),c[Ch])if(c[Tn]>=400){var v=g.type;(v===""||v==="text")&&(h.responseText=g.responseText?g[$i]+" - "+g[a]:g[$i]),v==="json"&&(h.responseText=g.response?g[$i]+" - "+JSON.stringify(g.response):g[$i])}else c[Tn]===0&&(h.responseText=g[$i]||"")}}return d},c[kh]=function(){var u=null,l=c[ud];if(l&&(l.traceId||l.spanId)){u={};var f=u[Zt.TraceExt]={traceID:l.traceId,parentID:l.spanId};B(l[Pn])||(f[Pn]=l[Pn])}return u}})}return t.__ieDyn=1,t})(),ot,ja="diagLog",li="_ajaxData",Li="fetch",la="Failed to monitor XMLHttpRequest",Qb=", monitoring data for this ajax call ",Fo=Qb+"may be incorrect.",Bv=Qb+"won't be sent.",Kv="Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",Xv="Failed to add custom defined request context as configured call back may missing a null check.",Jv="Failed to calculate the duration of the ",Gv=0;function xT(){var t=pn();return!t||B(t.Request)||B(t.Request[Bn])||B(t[Li])?null:t[Li]}function PT(t,e){var n,r=!1;if(Ml()){var i=XMLHttpRequest[Bn];r=!B(i)&&!B(i.open)&&!B(i.send)&&!B(i.abort)}var o=Ty();if(o&&o<9&&(r=!1),r)try{var s=new XMLHttpRequest,a={xh:[],i:(n={},n[e]={},n)};s[li]=a;var c=XMLHttpRequest[Bn].open;XMLHttpRequest[Bn].open=c}catch(u){r=!1,Oa(t,15,"Failed to enable XMLHttpRequest monitoring, extension is not supported",{exception:te(u)})}return r}var Zo=function(t,e){return t&&e&&t[li]?(t[li].i||{})[e]:null},DT=function(t,e,n){if(t){var r=(t[li]||{}).xh;r&&r.push({n:e,v:n})}},ld=function(t,e){var n=!1;if(t){var r=(t[li]||{}).xh;r&&ee(r,function(i){if(i.n===e)return n=!0,-1})}return n};function hu(t,e){var n="";try{var r=Zo(t,e);r&&r[En]&&(n+="(url: '"+r[En]+"')")}catch{}return n}function Oa(t,e,n,r,i){G(t[ja](),1,e,n,r,i)}function lr(t,e,n,r,i){G(t[ja](),2,e,n,r,i)}function fa(t,e,n){return function(r){var i;Oa(t,e,n,(i={},i[Th]=hu(r.inst,t._ajaxDataId),i.exception=te(r.err),i))}}function Wo(t,e){return t&&e?st(t,e):-1}function Qv(t,e,n){var r={id:e,fn:n};return t.push(r),{remove:function(){ee(t,function(i,o){if(i.id===r.id)return t.splice(o,1),-1})}}}function Zb(t,e,n,r){var i=!0;return ee(e,function(o,s){try{o.fn.call(null,n)===!1&&(i=!1)}catch(a){G(t&&t.logger,1,64,"Dependency "+r+" [#"+s+"] failed: "+Ne(a),{exception:te(a)},!0)}}),i}function RT(t,e,n,r,i,o){var s=t[Hi],a=!0;if(s>0){var c={core:e,xhr:r,input:i,init:o,traceId:n[ni],spanId:n[ri],traceFlags:n[Pn],context:n[La]||{},aborted:!!n[Ds]};a=Zb(e,t,c,"listener"),n[ni]=c.traceId,n[ri]=c.spanId,n[Pn]=c[Pn],n[La]=c[La]}return a}var Vc="*.blob.core.",AT=Dn([Vc+"windows.net",Vc+"chinacloudapi.cn",Vc+"cloudapi.de",Vc+"usgovcloudapi.net"]),MT=[/https:\/\/[^\/]*(\.pipe\.aria|aria\.pipe|events\.data|collector\.azure)\.[^\/]+\/(OneCollector\/1|Collector\/3)\.0/i],zT=Dn((ot={},ot[Hb]=500,ot[bh]=!1,ot[Kb]=!1,ot[qb]=void 0,ot.disableCorrelationHeaders=!1,ot.distributedTracingMode=1,ot.correlationHeaderExcludedDomains=AT,ot.correlationHeaderDomains=void 0,ot.correlationHeaderExcludePatterns=void 0,ot.appId=void 0,ot.enableCorsCorrelation=!1,ot[yh]=!1,ot[Xb]=!1,ot[Wb]=!1,ot[Vb]=!1,ot.maxAjaxPerfLookupAttempts=3,ot[Bb]=25,ot.ignoreHeaders=["Authorization","X-API-Key","WWW-Authenticate"],ot.addRequestContext=void 0,ot.addIntEndpoints=!0,ot)),UT=(function(t){rr(e,t);function e(){var n=t.call(this)||this;n.identifier=e.identifier,n.priority=120;var r,i,o,s,a,c,u,l,f,m,d,h,g,p,v,_,P,x,R,H,A,k,O,j,K,re,se,b,E,q;return He(e,n,function(M,D){var ce=D[Wc];me(),M.initialize=function(S,z,W,F){M.isInitialized()||(D.initialize(S,z,W,F),H=gi(mn("ajax"),z&&z.evtNamespace&&z.evtNamespace()),oe(S),J(),y(),V())},M._doTeardown=function(){me()},M.trackDependencyData=function(S,z){ne(j,M[Qt],null,S,z)},M.resetAjaxAttempts=function(){u=0},M[sd]=function(S,z,W,F){var X=M._currentWindowHost||o;if(RT(O,M[Qt],S,F,z,W)){if(z||z===""){if(wv(s,S[mh](),X)){W||(W={});var ie=new Headers(W[Ii]||(z instanceof Request?z[Ii]||{}:{}));if(m){var le="|"+S[ni]+"."+S[ri];ie.set(je[3],le),a&&(S[dn][je[3]]=le)}var ke=E||l&&l.appId();if(ke&&(ie.set(je[0],je[2]+ke),a&&(S[dn][je[0]]=je[2]+ke)),f){var ye=S[Pn];B(ye)&&(ye=1);var $e=ev(Yg(S[ni],S[ri],ye));ie.set(je[4],$e),a&&(S[dn][je[4]]=$e)}W[Ii]=ie}}else if(F&&wv(s,S[mh](),X)){if(m)if(ld(F,je[3]))lr(M,71,"Unable to set ["+je[3]+"] as it has already been set by another instance");else{var le="|"+S[ni]+"."+S[ri];F[ad](je[3],le),a&&(S[dn][je[3]]=le)}var ke=E||l&&l.appId();if(ke&&(ld(F,je[0])?lr(M,71,"Unable to set ["+je[0]+"] as it has already been set by another instance"):(F[ad](je[0],je[2]+ke),a&&(S[dn][je[0]]=je[2]+ke))),f){var ye=S[Pn];if(B(ye)&&(ye=1),ld(F,je[4]))lr(M,71,"Unable to set ["+je[4]+"] as it has already been set by another instance");else{var $e=ev(Yg(S[ni],S[ri],ye));F[ad](je[4],$e),a&&(S[dn][je[4]]=$e)}}}}return F||W},M[Wv]=function(S,z,W){if(g===-1||u<g){(b===2||b===1)&&typeof S.id=="string"&&S.id[S.id[Hi]-1]!=="."&&(S.id+="."),B(S[ds])&&(S[ds]=new Date);var F=Hr(S,so.dataType,so.envelopeType,M[ja](),z,W);M[Qt].track(F)}else u===g&&Oa(M,55,"Maximum ajax per page view limit reached, ajax monitoring is paused until the next trackPageView(). In order to increase the limit set the maxAjaxCallsPerView configuration parameter.",!0);++u},M.addDependencyListener=function(S){return Qv(O,k++,S)},M.addDependencyInitializer=function(S){return Qv(j,k++,S)};function me(){var S=Hn();r=!1,i=!1,q=!1,o=S&&S.host&&S.host[Oo](),s=null,a=!1,c=!1,u=0,l=null,f=!1,m=!1,d=null,h=!1,g=0,p=!1,v={},_=!1,P=!1,x=null,R=null,H=null,k=0,O=[],j=[],A=mn("ajaxData"),M._ajaxDataId=A,K=null,re=1,se=1,b=1,E=null}function oe(S){M[Wc](at(S,function(z){var W=z.cfg,F=Mn(null,W,M[Qt]);s=F.getExtCfg(e.identifier,zT),b=s.distributedTracingMode,a=s[yh],c=s[Wb],h=s[Vb],g=s[Hb],x=[].concat(s[qb]||[],s.addIntEndpoints!==!1?MT:[]),R=s.addRequestContext,m=b===0||b===1,f=b===1||b===2,h&&(d=A),_=!!s[bh],re=s.maxAjaxPerfLookupAttempts,se=s[Bb],K=s.ignoreHeaders,E=s.appId}))}function V(){var S=M[Qt].getPlugin(Fl);S&&(l=S.plugin[La])}function w(S){var z=!0;return(S||K)&&ee(K,(function(W){if(W[Oo]()===S[Oo]())return z=!1,-1})),z}function y(){var S=xT();if(S){var z=pn(),W=S.polyfill;M[Wc](at(s,function(){P=!!s[Kb],p=s[Xb],!P&&!r?(ce(eh(z,Li,{ns:H,req:function(F,X,ie){var le;if(!P&&r&&!Y(null,X,ie)&&!(W&&i)){var ke=F.ctx();le=un(X,ie);var ye=M[sd](le,X,ie);ye!==ie&&F.set(1,ye),ke.data=le}},rsp:function(F,X){if(!P){var ie=F.ctx().data;ie&&(F.rslt=F.rslt.then(function(le){return Z(F,(le||{})[Tn],X,le,ie,function(){var ke,ye=(ke={statusText:(le||{})[$i],headerMap:null},ke[Eh]=ue(le),ke);if(p&&le){var $e={};le.headers.forEach(function(qe,_t){w(_t)&&($e[_t]=qe)}),ye[pl]=$e}return ye}),le}).catch(function(le){throw Z(F,0,X,null,ie,null,{error:le.message||te(le)}),le}))}},hkErr:fa(M,15,"Failed to monitor Window.fetch"+Fo)},!0,Qm())),r=!0):W&&!q&&(ce(eh(z,Li,{ns:H,req:function(F,X,ie){Y(null,X,ie)}})),q=!0)})),W&&(z[Li].polyfill=W)}}function U(S,z,W){ce(Fk(S,z,W))}function J(){PT(M,A)&&M[Wc](at(s,function(){_=!!s[bh],a=s[yh],!_&&!i&&(U(XMLHttpRequest,"open",{ns:H,req:function(S,z,W,F){if(!_){var X=S.inst,ie=Zo(X,A);!Y(X,W)&&_e(X,ie,!0)&&((!ie||!ie.xhrMonitoringState.openDone)&&(ie=Te(X,z,W,F)),Ue(X,ie))}},hkErr:fa(M,15,la+".open"+Fo)}),U(XMLHttpRequest,"send",{ns:H,req:function(S,z){if(!_){var W=S.inst,F=Zo(W,A);_e(W,F)&&!F.xhrMonitoringState.sendDone&&(xt("xhr",F),F[qi]=$c(),M[sd](F,void 0,void 0,W),F.xhrMonitoringState.sendDone=!0)}},hkErr:fa(M,17,la+Fo)}),U(XMLHttpRequest,"abort",{ns:H,req:function(S){if(!_){var z=S.inst,W=Zo(z,A);_e(z,W)&&!W.xhrMonitoringState.abortDone&&(W[Ds]=1,W.xhrMonitoringState.abortDone=!0)}},hkErr:fa(M,13,la+".abort"+Fo)}),U(XMLHttpRequest,"setRequestHeader",{ns:H,req:function(S,z,W){if(!_){var F=S.inst,X=Zo(F,A);X&&_e(F,X)&&(DT(F,z,W),a&&w(z)&&(X[dn][z]=W))}},hkErr:fa(M,71,la+".setRequestHeader"+Fo)}),i=!0)}))}function Y(S,z,W){var F=!1,X=((de(z)?z:(z||{}).url||"")||"")[Oo]();if(ee(x,function(ke){var ye=ke;de(ke)&&(ye=new RegExp(ke)),F||(F=ye.test(X))}),F)return F;var ie=Wo(X,"?"),le=Wo(X,"#");return(ie===-1||le!==-1&&le<ie)&&(ie=le),ie!==-1&&(X=X.substring(0,ie)),B(S)?B(z)||(F=(typeof z=="object"?z[Vi]===!0:!1)||(W?W[Vi]===!0:!1)):F=S[Vi]===!0||X[Vi]===!0,!F&&X&&th(X)&&(F=!0),F?v[X]||(v[X]=1):v[X]&&(F=!0),F}function _e(S,z,W){var F=!0,X=i;return B(S)||(F=W===!0||!B(z)),X&&F}function Ie(){var S=null;return M[Qt]&&M[Qt].getTraceCtx&&(S=M[Qt].getTraceCtx(!1)),!S&&l&&l.telemetryTrace&&(S=Wp(l.telemetryTrace)),S}function Te(S,z,W,F){var X,ie=Ie(),le=ie&&ie[_h]()||ti(),ke=Gr(ti(),0,16),ye=S[li]=S[li]||{xh:[],i:{}},$e=ye.i=ye.i||{},qe=$e[A]=$e[A]||new qv(le,ke,M[ja](),(X=M.core)===null||X===void 0?void 0:X.getTraceCtx());return qe[Pn]=ie&&ie[wh](),qe[Yr]=z,qe[En]=W,qe.xhrMonitoringState.openDone=!0,qe[dn]={},qe.async=F,qe[Ch]=c,qe}function Ue(S,z){z.xhrMonitoringState[Jb]=kr(S,"readystatechange",function(){var W;try{S&&S.readyState===4&&_e(S,z)&&Oe(S)}catch(X){var F=te(X);(!F||Wo(F[Oo](),"c00c023f")===-1)&&Oa(M,16,la+" 'readystatechange' event handler"+Fo,(W={},W[Th]=hu(S,A),W.exception=F,W))}},H)}function Et(S){try{var z=S.responseType;if(z===""||z==="text")return S[Vv]}catch{}return null}function Oe(S){var z=Zo(S,A);z[ka]=$c(),z[Tn]=S[Tn];function W(F,X){var ie=X||{};ie.ajaxDiagnosticsMessage=hu(S,A),F&&(ie.exception=te(F)),lr(M,14,Jv+"ajax call"+Bv,ie)}ir("xmlhttprequest",z,function(){try{var F=z[Sh]("Ajax",a,function(){var ye,$e=(ye={statusText:S[$i],headerMap:null},ye[Eh]=Fe(S),ye.type=S.responseType,ye[Vv]=Et(S),ye.response=S.response,ye);if(p){var qe=S[Hv]();if(qe){var _t=Ve(qe).split(/[\r\n]+/),zn={};ee(_t,function(Un){var Ft=Un.split(": "),Ao=Ft.shift(),_c=Ft.join(": ");w(Ao)&&(zn[Ao]=_c)}),$e[pl]=zn}}return $e}),X=void 0;try{R&&(X=R({status:S[Tn],xhr:S}))}catch{lr(M,104,Xv)}if(F){X!==void 0&&(F[js]=jt(jt({},F.properties),X));var ie=z[kh]();ne(j,M[Qt],z,F,null,ie)}else W(null,{requestSentTime:z[qi],responseFinishedTime:z[ka]})}finally{try{var le=S[li]||{i:{}},ke=le.i||{};ke[A]&&(ke[A]=null)}catch{}}},function(F){W(F,null)})}function Fe(S){var z;try{var W=S[Hv]();if(W!==null){var F=Wo(W[Oo](),je[8]);if(F!==-1){var X=S.getResponseHeader(je[0]);return Cv(X)}}}catch(ie){lr(M,18,Kv,(z={},z[Th]=hu(S,A),z.exception=te(ie),z))}}function xt(S,z){if(z[En]&&d&&h){var W=Dr();if(W&&pe(W.mark)){Gv++;var F=d+S+"#"+Gv;W.mark(F);var X=W.getEntriesByName(F);X&&X[Hi]===1&&(z[gl]=X[0])}}}function ir(S,z,W,F){var X=z[gl],ie=Dr(),le=re,ke=se,ye=z[En],$e=0;(function qe(){try{if(ie&&X){$e++;for(var _t=null,zn=ie.getEntries(),Un=zn[Hi]-1;Un>=0;Un--){var Ft=zn[Un];if(Ft){if(Ft.entryType==="resource")Ft.initiatorType===S&&(Wo(Ft.name,ye)!==-1||Wo(ye,Ft.name)!==-1)&&(_t=Ft);else if(Ft.entryType==="mark"&&Ft.name===X.name){z[Ih]=_t;break}if(Ft[ds]<X[ds]-1e3)break}}}!X||z[Ih]||$e>=le||z.async===!1?(X&&pe(ie.clearMarks)&&ie.clearMarks(X.name),z.perfAttempts=$e,W()):vn(qe,ke)}catch(Ao){F(Ao)}})()}function un(S,z){var W,F=Ie(),X=F&&F[_h]()||ti(),ie=Gr(ti(),0,16),le=new qv(X,ie,M[ja](),(W=M.core)===null||W===void 0?void 0:W.getTraceCtx());le[Pn]=F&&F[wh](),le[qi]=$c(),le[Ch]=c;var ke;if(S instanceof Request?ke=(S||{}).url||"":ke=S,ke===""){var ye=Hn();ye&&ye.href&&(ke=iy(ye.href,"#")[0])}M[Qt]&&M[Qt].config&&(ke=vr(ke,M[Qt].config)),le[En]=ke;var $e="GET";z&&z[Yr]?$e=z[Yr]:S&&S instanceof Request&&($e=S[Yr]),le[Yr]=$e;var qe={};if(a){var _t=new Headers((z?z[Ii]:0)||(S instanceof Request?S[Ii]||{}:{}));_t.forEach(function(zn,Un){w(Un)&&(qe[Un]=zn)})}return le[dn]=qe,xt(Li,le),le}function $(S){var z="";try{B(S)||(typeof S=="string"?z+="(url: '".concat(S,"')"):z+="(url: '".concat(S.url,"')"))}catch(W){Oa(M,15,"Failed to grab failed fetch diagnostics message",{exception:te(W)})}return z}function Z(S,z,W,F,X,ie,le){if(!X)return;function ke(ye,$e,qe){var _t=qe||{};_t.fetchDiagnosticsMessage=$(W),$e&&(_t.exception=te($e)),lr(M,ye,Jv+"fetch call"+Bv,_t)}X[ka]=$c(),X[Tn]=z,ir(Li,X,function(){var ye=X[Sh]("Fetch",a,ie),$e;try{R&&($e=R({status:z,request:W,response:F}))}catch{lr(M,104,Xv)}if(ye){$e!==void 0&&(ye[js]=jt(jt({},ye.properties),$e));var qe=X[kh]();ne(j,M[Qt],X,ye,null,qe)}else ke(14,null,{requestSentTime:X[qi],responseFinishedTime:X[ka]})},function(ye){ke(18,ye,null)})}function ue(S){if(S&&S[Ii])try{var z=S[Ii].get(je[0]);return Cv(z)}catch(W){lr(M,18,Kv,{fetchDiagnosticsMessage:$(S),exception:te(W)})}}function ne(S,z,W,F,X,ie){var le=!0,ke=S[Hi];if(ke>0){var ye={item:F,properties:X,sysProperties:ie,context:W?W[La]:null,aborted:W?!!W[Ds]:!1};le=Zb(z,S,ye,"initializer")}le&&M[Wv](F,X,ie)}}),n}return e.prototype.processTelemetry=function(n,r){this.processNext(n,r)},e.prototype.addDependencyInitializer=function(n){return null},e.identifier="AjaxDependencyPlugin",e})(So),NT=(function(){function t(){}return t})(),$T=(function(){function t(){this.id="browser",this.deviceClass="Browser"}return t})(),LT="3.3.11",jT=(function(){function t(e,n){var r=this,i=at(e,function(){var o=e.sdkExtension;r.sdkVersion=(o?o+"_":"")+"javascript:"+LT});n&&n.add(i)}return t})(),OT=(function(){function t(){}return t})(),vl="session",ml="sessionManager",pu="isUserCookieSet",yl="isNewUser",fd="getTraceCtx",xh="telemetryTrace",Yb="applySessionContext",e_="applyApplicationContext",t_="applyOperationContext",n_="applyOperatingSystemContxt",r_="applyLocationContext",i_="applyInternalContext",gu="getSessionId",o_="sessionCookiePostfix",Di="automaticSession",Yo="accountId",es="authenticatedId",da="acquisitionDate",Hc="renewalDate",ha="cookieSeparator",dd="authUserCookieName",FT="ai_session",WT=864e5,VT=18e5,HT=6e4,s_=(function(){function t(){}return t})(),qT=(function(){function t(e,n,r){var i=this,o,s,a=Co(n),c=Ul(n),u,l;He(t,i,function(f){e||(e={});var m=at(e,function(_){u=e.sessionExpirationMs||WT,l=e.sessionRenewalMs||VT;var P=e[o_]||e.namePrefix||"";o=FT+P});r&&r.add(m),f[Di]=new s_,f.update=function(){var _=Rn(),P=!1,x=f[Di];if(x.id||(P=!d(x)),!P&&u>0){var R=_-x[da],H=_-x[Hc];P=R<0||H<0,P=P||R>u,P=P||H>l}P?g(_):(!s||_-s>HT)&&p(x,_)},f.backup=function(){var _=f[Di];v(_.id,_[da],_[Hc])};function d(_,P){var x=!1,R=c.get(o);if(R&&pe(R.split))x=h(_,R);else{var H=ab(a,o);H&&(x=h(_,H))}return x||!!_.id}function h(_,P){var x=!1,R=", session will be reset",H=P.split("|");if(H.length>=2)try{var A=+H[1]||0,k=+H[2]||0;isNaN(A)||A<=0?G(a,2,27,"AI session acquisition date is 0"+R):isNaN(k)||k<=0?G(a,2,27,"AI session renewal date is 0"+R):H[0]&&(_.id=H[0],_[da]=A,_[Hc]=k,x=!0)}catch(O){G(a,1,9,"Error parsing ai_session value ["+(P||"")+"]"+R+" - "+Ne(O),{exception:te(O)})}return x}function g(_){var P=e.getNewId||Ep;f[Di].id=P(e.idLength||22),f[Di][da]=_,p(f[Di],_),Ol()||G(a,2,0,"Browser does not support local storage. Session durations will be inaccurate.")}function p(_,P){var x=_[da];_[Hc]=P;var R=l,H=x+u-P,A=[_.id,x,P],k=0;H<R?k=H/1e3:k=R/1e3;var O=e.cookieDomain||null;c.set(o,A.join("|"),u>0?k:null,O),s=P}function v(_,P,x){cb(a,o,[_,P,x].join("|"))}})}return t.__ieDyn=1,t})(),BT=(function(){function t(e,n,r,i,o){var s=this;s.traceID=e||ti(),s.parentID=n;var a=Hn();!r&&a&&a.pathname&&(r=a.pathname,o&&(r=vr(r,o))),s.name=gt(i,r)}return t})();function Zv(t){return!(typeof t!="string"||!t||t.match(/,|;|=| |\|/))}var KT=(function(){function t(e,n,r){this.isNewUser=!1,this.isUserCookieSet=!1;var i=Co(n),o=Ul(n),s;He(t,this,function(a){Re(a,"config",{g:function(){return e}});var c=at(e,function(){var m=e.userCookiePostfix||"";s=t.userCookieName+m;var d=o.get(s);if(d){a[yl]=!1;var h=d.split(t[ha]);h.length>0&&(a.id=h[0],a[pu]=!!a.id)}if(!a.id){a.id=u();var g=l(a.id);f(g.join(t[ha]));var p=(e.namePrefix||"")+"ai_session";nI(i,p)}a[Yo]=e[Yo]||void 0;var v=o.get(t[dd]);if(v){v=decodeURI(v);var _=v.split(t[ha]);_[0]&&(a[es]=_[0]),_.length>1&&_[1]&&(a[Yo]=_[1])}});r&&r.add(c);function u(){var m=e||{},d=m.getNewId||Ep,h=d(m.idLength?e.idLength:22);return h}function l(m){var d=Us(new Date);a.accountAcquisitionDate=d,a[yl]=!0;var h=[m,d];return h}function f(m){var d=31536e3;a[pu]=o.set(s,m,d)}a.setAuthenticatedUserContext=function(m,d,h){h===void 0&&(h=!1);var g=!Zv(m)||d&&!Zv(d);if(g){G(i,2,60,"Setting auth user context failed. User auth/account id should be of type string, and not contain commas, semi-colons, equal signs, spaces, or vertical-bars.",!0);return}a[es]=m;var p=a[es];d&&(a[Yo]=d,p=[a[es],a.accountId].join(t[ha])),h&&o.set(t[dd],encodeURI(p))},a.clearAuthenticatedUserContext=function(){a[es]=null,a[Yo]=null,o.del(t[dd])},a.update=function(m){if(a.id!==m||!a[pu]){var d=m||u(),h=l(d);f(h.join(t[ha]))}}})}return t.cookieSeparator="|",t.userCookieName="ai_user",t.authUserCookieName="ai_authUser",t})(),qc="ext",Bc="tags";function Vo(t,e){t&&t[e]&&Cr(t[e]).length===0&&delete t[e]}function Yv(){return null}var XT=(function(){function t(e,n,r,i){var o=this,s=e.logger;He(t,this,function(a){if(a.appId=Yv,a[gu]=Yv,a.application=new NT,a.internal=new jT(n,i),Dl()){a[ml]=new qT(n,e,i),a.device=new $T,a.location=new OT,a.user=new KT(n,e,i);var c=void 0,u=void 0,l;r&&(c=r.getTraceId(),u=r.getSpanId(),l=r.getName()),a[xh]=new BT(c,u,l,s),a[vl]=new s_}a[gu]=function(){var f=a[vl],m=null;if(f&&de(f.id))m=f.id;else{var d=(a[ml]||{})[Di];m=d&&de(d.id)?d.id:null}return m},a[Yb]=function(f,m){We(zt(f.ext,Zt.AppExt),"sesId",a[gu](),de)},a[n_]=function(f,m){We(f.ext,Zt.OSExt,a.os)},a[e_]=function(f,m){var d=a.application;if(d){var h=zt(f,Bc);We(h,Ke.applicationVersion,d.ver,de),We(h,Ke.applicationBuild,d.build,de)}},a.applyDeviceContext=function(f,m){var d=a.device;if(d){var h=zt(zt(f,qc),Zt.DeviceExt);We(h,"localId",d.id,de),We(h,"ip",d.ip,de),We(h,"model",d.model,de),We(h,"deviceClass",d.deviceClass,de)}},a[i_]=function(f,m){var d=a.internal;if(d){var h=zt(f,Bc);We(h,Ke.internalAgentVersion,d.agentVersion,de),We(h,Ke.internalSdkVersion,gt(s,d.sdkVersion,64),de),(f.baseType===Ya.dataType||f.baseType===ui.dataType)&&(We(h,Ke.internalSnippet,d.snippetVer,de),We(h,Ke.internalSdkSrc,d.sdkSrc,de))}},a[r_]=function(f,m){var d=o.location;d&&We(zt(f,Bc,[]),Ke.locationIp,d.ip,de)},a[t_]=function(f,m){var d=a[xh];if(d){var h=zt(zt(f,qc),Zt.TraceExt,{traceID:void 0,parentID:void 0});We(h,"traceID",d.traceID,de,B),We(h,"name",d.name,de,B),We(h,"parentID",d.parentID,de,B)}},a.applyWebContext=function(f,m){var d=o.web;d&&We(zt(f,qc),Zt.WebExt,d)},a.applyUserContext=function(f,m){var d=a.user;if(d){var h=zt(f,Bc,[]);We(h,Ke.userAccountId,d[Yo],de);var g=zt(zt(f,qc),Zt.UserExt);We(g,"id",d.id,de),We(g,"authId",d[es],de)}},a.cleanUp=function(f,m){var d=f.ext;d&&(Vo(d,Zt.DeviceExt),Vo(d,Zt.UserExt),Vo(d,Zt.WebExt),Vo(d,Zt.OSExt),Vo(d,Zt.AppExt),Vo(d,Zt.TraceExt))}})}return t.__ieDyn=1,t})(),Wr,hd,Ho=null,JT=Fs((Wr={accountId:Ho,sessionRenewalMs:1800*1e3,samplingPercentage:100,sessionExpirationMs:1440*60*1e3,cookieDomain:Ho,sdkExtension:Ho,isBrowserLinkTrackingEnabled:!1,appId:Ho},Wr[gu]=Ho,Wr.namePrefix=hd,Wr[o_]=hd,Wr.userCookiePostfix=hd,Wr.idLength=22,Wr.getNewId=Ho,Wr)),GT=(function(t){rr(e,t);function e(){var n=t.call(this)||this;n.priority=110,n.identifier=Fl;var r,i,o,s,a;return He(e,n,function(c,u){l(),Re(c,"context",{g:function(){return s}}),c.initialize=function(d,h,g,p){u.initialize(d,h,g,p),f(d)},c.processTelemetry=function(d,h){if(!B(d)){h=c._getTelCtx(h),d.name===ui.envelopeType&&h.diagLog().resetInternalMessageCount();var g=s||{};g[vl]&&typeof s[vl].id!="string"&&g[ml]&&g[ml].update();var p=g.user;if(p&&!p[pu]&&p.update(g.user.id),m(d,h),p&&p[yl]&&(p[yl]=!1,!a)){var v=new Ya(72,(nr()||{}).userAgent||"");BS(h.diagLog(),1,v)}c.processNext(d,h)}},c._doTeardown=function(d,h){var g=(d||{}).core();if(g&&g[fd]){var p=g[fd](!1);p===i&&g.setTraceCtx(o)}l()};function l(){r=null,i=null,o=null,s=null,a=!0}function f(d){var h=c.identifier,g=c.core;c._addHook(at(d,function(){var p=Mn(null,d,g);d.storagePrefix&&qp(d.storagePrefix),a=d.disableUserInitMessage!==!1,r=p.getExtCfg(h,JT),c._extConfig=r})),o=g[fd](!1),s=new XT(g,r,o,c._unloadHooks),i=Wp(c.context[xh],o),g.setTraceCtx(i),c.context.appId=function(){var p=g.getPlugin(_b);return p?p.plugin._appId:null}}function m(d,h){zt(d,"tags",[]),zt(d,"ext",{});var g=c.context;g[Yb](d,h),g[e_](d,h),g.applyDeviceContext(d,h),g[t_](d,h),g.applyUserContext(d,h),g[n_](d,h),g.applyWebContext(d,h),g[r_](d,h),g[i_](d,h),g.cleanUp(d,h)}}),n}return e.__ieDyn=1,e})(So),a_="AuthenticatedUserContext",Vs="track",Ph="snippet",QT="getCookieMgr",ZT="startTrackPage",YT="stopTrackPage",pd="flush",e1="startTrackEvent",t1="stopTrackEvent",n1="addTelemetryInitializer",em="pollInternalLogs",gd="getPlugin",vd="evtNamespace",r1=Vs+"Event",i1=Vs+"Trace",o1=Vs+"Metric",s1=Vs+"PageView",a1=Vs+"Exception",c1=Vs+"DependencyData",u1="set"+a_,l1="clear"+a_,f1="https://js.monitor.azure.com/scripts/b/ai.config.1.cfg.json",bl="connectionString",md="version",Ei="queue",Ia="instrumentationKey",ts="userOverrideEndpointUrl",yd="endpointUrl",pa="onunloadFlush",ln="context",tm="addHousekeepingBeforeUnload",bd="sendMessage",d1="updateSnippetDefinitions",$n,qo,Bo,_d,ga,nm=[Ph,"dependencies","properties","_snippetVersion","appInsightsNew","getSKUDefaults"],c_="iKeyUsage",u_="CdnUsage",l_="SdkLoaderVer",h1="zipPayload",Kc=void 0,p1={samplingRate:100,maxSendNumber:1},g1={monthInterval:3,daysOfMonth:[28]},Xc={disabled:!0,limit:kn(p1),interval:kn(g1)},v1=($n={},$n[bl]=Kc,$n.endpointUrl=Kc,$n[Ia]=Kc,$n[ts]=Kc,$n.diagnosticLogInterval=Qu(m1,1e4),$n.featureOptIn=(qo={},qo[c_]={mode:3},qo[u_]={mode:2},qo[l_]={mode:2},qo[h1]={mode:1},qo),$n.throttleMgrCfg=kn((Bo={},Bo[109]=kn(Xc),Bo[106]=kn(Xc),Bo[111]=kn(Xc),Bo[110]=kn(Xc),Bo)),$n.extensionConfig=kn((_d={},_d.AppInsightsCfgSyncPlugin=kn({cfgUrl:f1,syncMode:2}),_d)),$n);function m1(t){return t&&t>0}function rm(t,e){return Ga(function(n,r){Kt(e,function(i){var o=i&&i.value,s=null;!i.rejected&&o&&(t[bl]=o,s=fb(o)),n(s)})})}var y1=(function(){function t(e){var n=this,r,i,o,s,a,c,u,l,f,m,d,h,g,p;He(t,this,function(v){x(),Re(v,"config",{g:function(){return l}}),ee(["pluginVersionStringArr","pluginVersionString"],function(A){Re(v,A,{g:function(){return u?u[A]:null}})}),s=""+(e.sv||e[md]||""),e[Ei]=e[Ei]||[],e[md]=e[md]||2;var _=yn(e.config||{},v1);l=_.cfg,f=new QI,Re(v,"appInsights",{g:function(){return f}}),i=new GT,r=new UT,o=new IT,u=new Ik,Re(v,"core",{g:function(){return u}}),H(at(_,function(){var A=l[bl];if(fi(A)){var k=Ga(function(re,se){Kt(rm(l,A),function(b){if(b.rejected)re(null);else{var E=l[Ia],q=b.value;E=q&&q.instrumentationkey||E,re(E)}})}),O=l[ts];B(O)&&(O=Ga(function(re,se){Kt(rm(l,A),function(b){if(b.rejected)re(null);else{var E=l[yd],q=b.value,M=q&&q.ingestionendpoint;E=M?M+Ss:E,re(E)}})})),l[Ia]=k,l[yd]=O}if(de(A)&&A){var j=fb(A),K=j.ingestionendpoint;l.endpointUrl=l[ts]?l[ts]:K+Ss,l[Ia]=j.instrumentationkey||l[Ia]}l.endpointUrl=l[ts]?l[ts]:l[yd]})),v[Ph]=e,v[pd]=function(A,k){A===void 0&&(A=!0);var O;return tl(u,function(){return"AISKU.flush"},function(){A&&!k&&(O=Qn(function(re){k=re}));var j=1,K=function(){j--,j===0&&k()};ee(u.getChannels(),function(re){re&&(j++,re[pd](A,K))}),K()},null,A),O},v[pa]=function(A){A===void 0&&(A=!0),ee(u.getChannels(),function(k){k[pa]?k[pa]():k[pd](A)})},v.loadAppInsights=function(A,k,O){A===void 0&&(A=!1),A&&Zw("Legacy Mode is no longer supported");function j(K){if(K){var re="";B(s)||(re+=s),v[ln]&&v[ln].internal&&(v[ln].internal.snippetVer=re||"-"),Pe(v,function(se,b){de(se)&&!pe(b)&&se&&se[0]!=="_"&&At(nm,se)===-1&&K[se]!==b&&(K[se]=b)})}}return tl(v.core,function(){return"AISKU.loadAppInsights"},function(){u.initialize(l,[o,i,r,f,m],k,O),Re(v,"context",{g:function(){return i[ln]}}),d||(d=new iI(u));var K=b1();K&&v[ln]&&(v[ln].internal.sdkSrc=K),j(v[Ph]),v.emptyQueue(),v[em](),v[tm](v),H(at(_,function(){var re=!1;l.throttleMgrCfg[109]&&(re=!l.throttleMgrCfg[109].disabled),!d.isReady()&&l.extensionConfig&&l.extensionConfig[m.identifier]&&re&&d.onReadyState(!0),!h&&!l[bl]&&ru(c_,l,!0)&&(d[bd](106,"See Instrumentation key support at aka.ms/IkeyMigrate"),h=!0),!g&&v[ln].internal.sdkSrc&&v[ln].internal.sdkSrc.indexOf("az416426")!=-1&&ru(u_,l,!0)&&(d[bd](110,"See Cdn support notice at aka.ms/JsActiveCdn"),g=!0),!p&&parseInt(s)<6&&ru(l_,l,!0)&&(d[bd](111,"An updated Sdk Loader is available, see aka.ms/SnippetVer"),p=!0)}))}),v},v[d1]=function(A){KC(A,v,function(k){return k&&At(nm,k)===-1})},v.emptyQueue=function(){try{if(we(v.snippet[Ei])){for(var A=v.snippet[Ei].length,k=0;k<A;k++){var O=v.snippet[Ei][k];O()}v.snippet[Ei]=void 0,delete v.snippet[Ei]}}catch(K){var j={};K&&pe(K.toString)&&(j.exception=K.toString())}},v[tm]=function(A){if(Dl()||Jm()){var k=function(){if(A[pa](!1),pe(v.core[gd])){var j=n.core[gd](Fl);if(j){var K=j.plugin;K&&K[ln]&&K[ln]._sessionManager&&K[ln]._sessionManager.backup()}}},O=!1;c||(c=gi(a,u[vd]&&u[vd]())),H(at(l,function(j){var K=j.cfg,re=A.appInsights,se=Mn(null,K,re.core),b=se.getExtCfg(re.identifier||Bp);R();var E=K.disablePageUnloadEvents;b.disableFlushOnBeforeUnload||($k(k,E,c)&&(O=!0),Yd(k,E,c)&&(O=!0),!O&&!fS()&&G(u.logger,1,19,"Could not add handler for beforeunload and pagehide")),!O&&!b.disableFlushOnUnload&&Yd(k,E,c)}))}},v.getSender=function(){return o},v.unload=function(A,k,O){var j=!1,K;A!==!1&&!k&&(K=Qn(function(se){k=se}));function re(se){j||(j=!0,x(),k&&k(se))}return v[pa](A),R(),u.unload&&u.unload(A,re,O),K},us(v,f,[QT,r1,s1,"trackPageViewPerformance",a1,"_onerror",i1,o1,ZT,YT,e1,t1]),us(v,P,[c1,"addDependencyListener","addDependencyInitializer"]),us(v,u,[n1,em,"stopPollingInternalLogs",gd,"addPlugin",vd,"addUnloadCb","getTraceCtx","updateCfg","onCfgChange"]),us(v,function(){var A=i[ln];return A?A.user:null},[u1,l1]);function P(){return r}function x(){a=mn("AISKU"),c=null,r=null,i=null,o=null,s=null,d=null,h=!1,g=!1,p=!1,m=new oT}function R(){c&&(Lk(null,c),jk(null,c))}function H(A){u.addUnloadHook(A)}})}return t.prototype.addDependencyInitializer=function(e){return null},t})();function b1(){if(ga)return ga;var t=null,e=!1,n=["://js.monitor.azure.com/","://az416426.vo.msecnd.net/"];try{var r=(document||{}).currentScript;r&&(t=r.src)}catch{}if(t){try{var i=t.toLowerCase();if(i){var o="";ee(n,function(s,a){if(st(i,s)!==-1)return o="cdn"+(a+1),st(i,"/scripts/")===-1&&(st(i,"/next/")!==-1?o+="-next":st(i,"/beta/")!==-1&&(o+="-beta")),ga=o+(e?".mod":""),-1})}}catch{}ga=t}return ga}const _1=["NotLoggedIn","LoginFailed"],w1=["ResizeObserver loop limit exceeded","ResizeObserver loop completed with undelivered notifications."];var im;const uc=((im=window.Cbn)==null?void 0:im.appInsightsConnectionString)??"",C1=new zI,zr=new y1({config:{enableResponseHeaderTracking:!0,connectionString:uc,enableAutoRouteTracking:!0,enableUnhandledPromiseRejectionTracking:!0,extensions:[C1],enableAjaxErrorStatusText:!0,disableCookiesUsage:!0}}),S1=()=>!!uc&&uc!=="InstrumentationKey=00000000-0000-0000-0000-000000000000",k1=t=>{var e,n,r,i,o;if((e=t.data)!=null&&e.message){const s=P1(t.data.message);if(w1.includes(s))return Ta.addLog(t.data.message,"Error",{sendToTracker:!1}),!1;if(s==="Network Error"&&!window.navigator.onLine||s.includes("status code 401")||s==="Uncaught SyntaxError: Unexpected token '<'"&&(n=t.data.errorSrc)!=null&&n.startsWith("window.onerror")&&(r=t.data.errorSrc)!=null&&r.endsWith(".chunk.js:1:1"))return!1;const a=L1((i=t.data)==null?void 0:i.message);if((o=a==null?void 0:a.Causes)!=null&&o.some(c=>_1.includes(c.Id)))return!1}},I1=t=>{var e;const n=(e=t.baseData)==null?void 0:e.exceptions;if(!n)return!0;if(n.some(r=>r.stack.includes("chrome-extension://")))return!1},T1=t=>{var e;const n=t.data??{};t.baseType===qt.dataType&&t.baseData&&(t.baseData.id=((e=t.baseData)==null?void 0:e.id)??f_(),n.errorGuid=t.baseData.id),t.data=n},E1=t=>{var e,n,r;const i=oc[(e=t.baseData)==null?void 0:e.severityLevel]??"Information";switch(t.baseType){case qt.dataType:{const o=t.baseData,s=oc[o.severityLevel];o.exceptions.forEach(a=>{Ta.addLog(a.message,s??i,{envelope:t,sendToTracker:!1});const c=t.data??{};if(c._cbnUserDialogPrevented!==!0&&c._cbnErrorBoundary!==!0){const u=c._cbnUserMsg??a.message;Ta._Internals.showErrorDialog({header:"Error",text:u,errorId:o.id})}})}break;case mr.dataType:Ta.addLog(`Event "${(n=t.baseData)==null?void 0:n.name}"`,i,{envelope:t,sendToTracker:!1});break;default:Ta.addLog(((r=t.baseData)==null?void 0:r.message)??t.name,i,{envelope:t,sendToTracker:!1});break}},x1=uc!==void 0&&uc.startsWith("InstrumentationKey=");x1?zr.loadAppInsights():console.warn("AppInsights not initialized! The connections string wasn't properly injected.");function P1(t){return t.replace("PromiseRejectionEvent: ","").replace("ErrorEvent: ","").replace("AxiosError: ","")}zr.trackPageView();zr.addTelemetryInitializer(I1);zr.addTelemetryInitializer(T1);zr.addTelemetryInitializer(k1);zr.addTelemetryInitializer(E1);zr.addTelemetryInitializer(S1);const D1=()=>Math.floor(Math.random()*999).toString().padStart(3,"0"),f_=()=>Date.now().toString()+D1(),R1=()=>new Date().toISOString().slice(11,23);function A1(){const t=(new Error().stack||"").replace(/(\r\n|\n|\r)/gm,"").split(/\s{2,10}at /gm);return t.shift(),t}const M1={Verbose:{emoji:"๐งพ",style:"color: grey;"},Information:{emoji:"๐",style:"color: #466FD5;"},Warning:{emoji:"โ ๏ธ",style:"color: #ebc334;"},Error:{emoji:"๐",style:"color: red;"},Critical:{emoji:"๐ฅ",style:"color: red;"}};function z1(t,e,n){var r,i,o,s;const a=M1[e],c=n!=null&&n.customProperties?" | data = %O":"",u=n!=null&&n.envelope?" | envelope = %O":"",l=e==="Critical"?"[Critical] ":"",f=[((s=(o=(i=(r=n==null?void 0:n.envelope)==null?void 0:r.baseData)==null?void 0:i.exceptions)==null?void 0:o[0])==null?void 0:s.parsedStack)??A1(),a.style];n!=null&&n.customProperties&&f.push(n.customProperties),n!=null&&n.envelope&&f.push(n.envelope),console.log(`%O ${a.emoji} %c[${R1()}] ${l}${t}${u}${c}`,...f)}function U1(t){if(!t)return;const e={};return(t==null?void 0:t.show)!=="dialog"&&(e._cbnUserDialogPrevented=!0),t!=null&&t.userMessage&&(e._cbnUserMsg=t.userMessage),e}function N1(t,e){const n=f_(),r={id:n,exception:t instanceof Error?t:new Error(t),severityLevel:e!=null&&e.isCritical?oc.Critical:oc.Error,properties:{title:t.toString(),...e==null?void 0:e.customProperties}};return zr.trackException(r,U1(e)),n}var ns,rs,Dh,d_;class $1{constructor(){fe(this,Dh),fe(this,ns),fe(this,rs,[]),lo(this,"_Internals",{subscribeUiListener:e=>{if(C(this,ns)){console.warn("Logger UI listener is already registered. Ensure that this only happens once!");return}Ae(this,ns,e),C(this,rs).forEach(n=>this._Internals.showErrorDialog(n)),Ae(this,rs,[])},showErrorDialog:e=>{C(this,ns)?C(this,ns).call(this,e):(C(this,rs).length===0&&on(this,Dh,d_).call(this),C(this,rs).push(e))}})}addLog(e,n="Information",r){(r==null?void 0:r.sendToTracker)!==!1?zr.trackTrace({message:e,severityLevel:oc[n],properties:r==null?void 0:r.customProperties}):z1(e,n,r)}reportError(e,n){return N1(e,n)}}ns=new WeakMap,rs=new WeakMap,Dh=new WeakSet,d_=async function(){};const Ta=new $1,h_=t=>typeof t=="object"&&t!==null&&t.$typ!==void 0&&t.Id!==void 0;function vu(t,e){return h_(t)?e?e.includes(t.Id):!0:!1}function L1(t){const e=t.replace(/^[^{]+/g,"");let n;try{n=JSON.parse(e)}catch{return}return vu(n)?n:void 0}function Ln(t){throw new Error(h_(t)?`${t.Id} - ${t.Message}`:"Unknown error")}const Rh="CmpEditor_",p_=I.z.custom(t=>Mr(t)&&t.startsWith(Rh)&&N0.safeParse(t.substring(Rh.length)).success),j1=t=>p_.safeParse(t).success,om=t=>`CmpEditor_${t}`,O1=t=>t.substring(Rh.length);function F1(t){const e=t.substring(t.indexOf("<")+1,t.lastIndexOf(">"));if(!U0(e))throw new Error(`Invalid input type: ${e}`);return e}const g_=I.z.string();I.z.array(g_);const W1=I.z.string(),V1=t=>t.split("."),H1=t=>{const e=V1(t);return e[e.length-1]},Wl=I.z.enum(["value","width","height","minWidth","maxWidth","minHeight","maxHeight","backgroundNormal","backgroundHover","backgroundPressed","border","borderRadius","font","color","captionText","captionWidth","errorMsg","description","flexGrow","flexWrap","opacity","gap","visible","enabled","tooltipText","rawHtml","wrapText","text","placeholder","dataEntries","dataTemplate","tooltipKey","collapsed","group"]),q1=I.z.record(Wl,wm),v_=I.z.lazy(()=>I.z.union([q1,I.z.record(v_)])),B1=I.z.record(Wl,ym),m_=I.z.lazy(()=>I.z.union([B1,I.z.record(m_)])),K1=I.z.object({Name:I.z.literal("Fiber"),$val:v_,$typ:m_.optional()}),X1=I.z.object({Fibers:I.z.record(Wl,I.z.object({$src:A0,$typ:ym})),Name:I.z.literal(br.FiberEditor),Pack:W1}),y_=t=>X1.safeParse(t).success;function mu(t,e){const n=[];for(const[r,i]of Object.entries(t))if(e&&r==="$val")n.push({ctrlId:e,values:i});else if(r!=="$val"){const o=mu(i,r);n.push(...o)}return n}const sm="CtrlFiberEditor_",J1=I.z.custom(t=>Mr(t)&&t.startsWith(sm)&&g_.safeParse(t.substring(sm.length)).success),b_=t=>J1.safeParse(t).success,am=t=>`CtrlFiberEditor_${t}`,G1=["NotLoggedIn","AuthenticationFailed","SessionTimedOut","CfgnSessionTimedOut","Unauthorized"];var Qe,Cn,Ri,yu,Ai,bu,Ah,Mi,zi;class Q1{constructor(e,n){fe(this,bu),fe(this,Qe),fe(this,Cn),fe(this,Ri,[]),fe(this,yu,async()=>{if(C(this,Ri).length===0)return;Je("WsConfiguratorClientInternals","#sendDeferredServerCallsAfterReconnect","Sending queued messages",C(this,Ri));const r=C(this,Ri).map(i=>this._callServer(...i));Ae(this,Ri,[]),await Promise.all(r)}),lo(this,"_callServer",async(r,i,o)=>{const s=C(this,Qe).connection;if(!s||C(this,Qe).state!=="connected"){Je("ConfiguratorClientInternals","_callServer","Not connected. Message queued to be sent later.",{method:r,args:i,options:o}),C(this,Ri).push([r,i,o]);const f=C(this,Qe).state==="connecting";return C(this,Qe).isInitialized&&!f&&C(this,Qe).restoreConnection(),null}const a=(o==null?void 0:o.requestId)??C(this,Qe).getNextRequestId();Je("ConfiguratorClientInternals",`_callServer, ID ${a}`,"",{method:r,args:i,options:o}),C(this,Qe).extendSessionLifetime();const c=o!=null&&o.requestId?[...i,o.requestId]:i,[u,l]=await vs(s.invoke(r,...c));return u?Ye("ConfiguratorClientInternals",`_callServer, ID ${a}`,"InvocationError:",u):l.error&&(vu(l.error,G1)&&cw(),Ye("ConfiguratorClientInternals",`_callServer, ID ${a}`,"Error in response:",l.error)),Je("ConfiguratorClientInternals",`_callServer, ID ${a}`,"Result:",l),l}),fe(this,Ai,[]),fe(this,Mi,[]),fe(this,zi,[]),Ae(this,Qe,e),C(this,Qe).onConnected(()=>C(this,yu).call(this)),C(this,Qe).onConnectionRestored(()=>C(this,yu).call(this)),Ae(this,Cn,n)}async setCmpInput(e,n,r){const[i]=await vs(on(this,bu,Ah).call(this,e,n,"change-cfgn-value",r));if(i instanceof Td)return i.message;if(i)throw i}async setCmpPresetInput(e,n,r,i){const o=!z0(r)&&Mr(n),[s,a]=o?Sl(n):[null,n];if(s)return s.message;const c=J0(r),[u]=await vs(on(this,bu,Ah).call(this,e,a,i,c));if(u instanceof Td)return u.message;if(u)throw u}async setCmpInputType(e,n){const r=await this._callServer("ChangeConfigurationValueType",[e,n],{isChunkable:!0});if(r!=null&&r.error){if(vu(r.error))return r.error.Message;throw new Error("Unknown error")}else return}async setCmpHiveRule(e,n,r){const i={name:e,changes:[{name:r?"Query":"Value",value:n}]};await this._callServer("SetCmpValue",[i],{isChunkable:!0})}async setCmpGroup(e,n){const r={name:e,changes:[{name:"Group",value:n}]};await this._callServer("SetCmpValue",[r])}async fetchCmpPropertyValue(e){let n=()=>{};const r=new Promise(i=>n=i);if(C(this,Mi).push({resolver:n,values:e}),await Sd(0),C(this,Mi).length){const i=C(this,Mi).map(a=>a.resolver),o=C(this,Mi).flatMap(({values:a})=>a.map(({name:c,property:u})=>({name:c,...u!=="Value"&&{property:[u]}})));Ae(this,Mi,[]);const s=C(this,Qe).getNextRequestId();this._callServer("GetCmpValue",[o],{requestId:s}),await C(this,Cn).awaitCspdUpdateResponse(s),i.forEach(a=>a())}return r}async subscribeToCmpUpdates(e,n,r=!1){let i=()=>{};const o=new Promise(s=>i=s);if(C(this,zi).push({resolver:i,values:{name:e,property:n,lazy:r}}),await Sd(0),C(this,zi).length){const s=C(this,zi).map(u=>u.resolver),a=C(this,zi).map(({values:{name:u,property:l,lazy:f}})=>({name:u,...l!=="Value"&&{property:[l]},...f===!0&&{lazy:f}}));Ae(this,zi,[]);const c=C(this,Qe).getNextRequestId();this._callServer("SubscribeCmpUpdate",[a],{requestId:c}),await C(this,Cn).awaitCspdUpdateResponse(c),s.forEach(u=>u())}return o}async requestCmpEditorCspd(e,n){const r=C(this,Qe).getNextRequestId(),i=om(e);this._callServer("RequestCspd",[[{slot:i,cspdId:n?br.TableEditor:br.ValueEditor,targetComponent:e,parameters:void 0}]],{requestId:r}),await C(this,Cn).awaitCspdUpdateResponse(r)}async releaseCmpEditorCspd(e){const n=e.map(r=>om(r));await this._callServer("ReleaseCspd",n)}async createCmp(e,n,r){const i=[e,n,r],o=await this._callServer("CreateComponent",i);o!=null&&o.error&&Ln(o.error)}async renameCmp(e,n){const r=[e,n],i=await this._callServer("RenameComponent",r);i!=null&&i.error&&Ln(i.error)}async renameCmpGroup(e,n){const r=[e,n],i=await this._callServer("RenameComponentGroup",r);i!=null&&i.error&&Ln(i.error)}async copyCmp(e,n){const r=[e,n],i=await this._callServer("CopyComponent",r);i!=null&&i.error&&Ln(i.error)}async deleteCmp(e){const n=[e],r=await this._callServer("DeleteComponent",n);r!=null&&r.error&&Ln(r.error)}async initiateCfgrFiles(e){const n=await this._callServer("InitiateCfgrFiles",[e]);return Je("ConfiguratorClientInternals","initiateCfgrFiles","After initiate",{payload:e,result:n}),n!=null&&n.error&&Ln(n.error),(n==null?void 0:n.value)??{}}async completeCfgrFiles(e){const n=C(this,Qe).getNextRequestId(),r=await this._callServer("CompleteCfgrFiles",[e],{requestId:n});return Je("ConfiguratorClientInternals","completeCfgrFiles","After complete",{payload:e,result:r}),r!=null&&r.error&&Ln(r.error),(r==null?void 0:r.value)??{}}async deleteCfgrFile(e,n){const r=C(this,Qe).getNextRequestId(),i=await this._callServer("DeleteCfgrFile",[e,n],{requestId:r});Je("ConfiguratorClientInternals","deleteCfgrFile","After complete",{payload:{type:e,fileName:n},result:i}),i!=null&&i.error&&Ln(i.error)}async initiateCfgnFiles(e){const n=await this._callServer("InitiateCfgnFiles",[e]);return Je("ConfiguratorClientInternals","initiateCfgnFiles","After initiate",{payload:e,result:n}),(n==null?void 0:n.value)??{}}async completeCfgnFiles(e){const n=C(this,Qe).getNextRequestId(),r=[this._callServer("CompleteCfgnFiles",[e],{requestId:n}),C(this,Cn).awaitCspdUpdateResponse(n)],[i]=await Promise.all(r);return Je("ConfiguratorClientInternals","completeCfgnFiles","After complete",{payload:e,result:i}),(i==null?void 0:i.value)??{}}async completeCfgnFileAndConvertToPdf(e,n,r){const i=C(this,Qe).getNextRequestId(),o=[this._callServer("CompleteCfgnFileAndConvertToPdf",[e,n,r],{requestId:i}),C(this,Cn).awaitCspdUpdateResponse(i)],[s]=await Promise.all(o);return Je("ConfiguratorClientInternals","completeCfgnFiles","After complete",{payload:{fileName:e,sasUri:n,pdfOptions:r},result:s}),s}async shareConfiguration(e){const n=C(this,Qe).getNextRequestId(),r=await this._callServer("ShareConfiguration",[e],{requestId:n});return r==null?void 0:r.value}async checkoutConfiguration(e){const n=C(this,Qe).getNextRequestId(),r=await this._callServer("Checkout",[e],{requestId:n});return r==null?void 0:r.value}async assignAssetBundleToCfgrDraft(e,n,r,i){const o=[e,n,r,i],s=await this._callServer("AssignAssetBundleToCfgrDraft",o);s!=null&&s.error&&Ln(s.error)}async unassignAssetBundleFromCfgrDraft(e){const n=[e],r=await this._callServer("UnassignAssetBundleFromCfgrDraft",n);r!=null&&r.error&&Ln(r.error)}async requestCtrlFiberCspd(){const e=C(this,Qe).getNextRequestId();this._callServer("RequestCspd",[[{slot:cg.Fiber,cspdId:br.Fiber,targetComponent:cr.CtrlFibers,parameters:void 0}]],{requestId:e}),await C(this,Cn).awaitCspdUpdateResponse(e)}async releaseCtrlFiberCspd(){await this._callServer("ReleaseCspd",[cg.Fiber])}async requestCtrlFiberEditorCspd(e,n){const r=C(this,Qe).getNextRequestId(),i=am(e);this._callServer("RequestCspd",[[{slot:i,cspdId:br.FiberEditor,targetComponent:`${cr.CtrlFibers}.${n}`,parameters:void 0}]],{requestId:r}),await C(this,Cn).awaitCspdUpdateResponse(r)}async releaseCtrlFiberEditorCspd(e){const n=e.map(r=>am(r));await this._callServer("ReleaseCspd",n)}async createOrChangeCtrlFiber(e,n,r,i){const o=`${cr.CtrlFibers}.${e}`;await this._callServer("CreateOrChangeFiber",[o,n,r,i])}async deleteCtrlFiber(e,n){const r=`${cr.CtrlFibers}.${e}`;await this._callServer("DeleteFiber",[r,n])}async deleteCtrlFiberPack(e){const n=`${cr.CtrlFibers}.${e}`;await this._callServer("DeleteFiberPack",[n])}async moveCtrlFiberPack(e,n){const r=`${cr.CtrlFibers}.${e}`,i=`${cr.CtrlFibers}.${n}`;await this._callServer("MoveFiberPack",[r,i])}async copyCtrlFiberPack(e,n,r){const i=`${cr.CtrlFibers}.${e}`,o=`${cr.CtrlFibers}.${n}`;await this._callServer("CopyFiberPack",[i,o,r])}async publishCfgr(e,n,r,i){const o=await this._callServer("Publish",[e,n,r,i]);if(vu(o==null?void 0:o.error))return o.error}}Qe=new WeakMap,Cn=new WeakMap,Ri=new WeakMap,yu=new WeakMap,Ai=new WeakMap,bu=new WeakSet,Ah=async function(t,e,n,r){let i=()=>{};const o=new Promise(s=>i=s);if(C(this,Ai).push({resolver:i,values:{name:t,value:e,zodType:r}}),await Sd(0),C(this,Ai).length){const s=C(this,Ai).map(m=>m.resolver),a=C(this,Ai).filter((m,d,h)=>h.findLastIndex(g=>g.values.name===m.values.name)<=d);Ae(this,Ai,[]);const c=a.map(({values:{name:m,value:d,zodType:h}})=>{const g=d!==void 0&&Rm(d)?G0(m,d,h):d;return{name:m,value:g}}),u=n==="change-preset-value",l=u?void 0:C(this,Qe).getNextRequestId(),f=u?"ChangePresetValue":"ChangeConfigurationValue";this._callServer(f,[c],{requestId:l,isChunkable:!0}),l&&await C(this,Cn).awaitCspdUpdateResponse(l),s.forEach(m=>m())}return o},Mi=new WeakMap,zi=new WeakMap;var __=(t=>(t[t.Fedl=1]="Fedl",t[t.Css=2]="Css",t[t.JavaScript=3]="JavaScript",t[t.CustomCodePack=4]="CustomCodePack",t[t.Fedl2=5]="Fedl2",t))(__||{}),Mh,is,Ea;class Z1{constructor(){fe(this,Mh,600*1e3-60*1e3),fe(this,is),fe(this,Ea),Ae(this,Ea,new wl)}onSessionLifeTimeReached(e){C(this,Ea).on("sessionLifeTimeReached",e)}restartSessionLifeTimer(){this.stopSessionLifeTimer(),Ae(this,is,window.setTimeout(()=>{C(this,Ea).emit("sessionLifeTimeReached")},C(this,Mh)))}stopSessionLifeTimer(){C(this,is)&&(window.clearTimeout(C(this,is)),Ae(this,is,void 0))}}Mh=new WeakMap,is=new WeakMap,Ea=new WeakMap;const Y1=I.z.enum(["edit","view"]),eE=t=>Y1.safeParse(t).success,tE="wss://portal.combeenation.com/signalR",nE={[N.Trace]:"Trace",[N.Debug]:"Debug",[N.Information]:"Information",[N.Warning]:"Warning",[N.Error]:"Error",[N.Critical]:"Critical",[N.None]:"None"},rE="userland",iE=I.z.enum(["theme","user",rE]),oE=I.z.object({lastEditedAt:I.z.number(),lastEditedBy:I.z.string(),size:I.z.number(),type:I.z.nativeEnum(__),url:I.z.string().url()}),sE=I.z.object({fedl:I.z.object({lastEditedAt:W0,lastEditedBy:I.z.string(),metadata:I.z.object({LayoutVersion:I.z.string()}),size:I.z.number(),url:I.z.string().url()}),customCode:I.z.record(I.z.string(),oE).optional(),css:I.z.record(iE,I.z.object({url:I.z.string().url()})).optional()}),aE=I.z.object({value:I.z.object({cfgrVersion:I.z.string(),draftName:I.z.string(),lastEditedAt:I.z.number(),lastEditedBy:I.z.string(),presetId:I.z.string(),published:I.z.object({isPublished:I.z.boolean(),version:I.z.string()}),files:sE})}),w_=I.z.object({value:I.z.object({cfgrVersion:I.z.string(),copyUrl:I.z.string(),editUrl:I.z.string(),newUrl:I.z.string()})}),cm=t=>w_.safeParse(t).success;var yr,en,zh,_l,tn,hs,Rs,Vt,Uh,C_,um,lm,_u;class cE{constructor(){fe(this,tn),fe(this,yr),fe(this,en),fe(this,zh,N.Warning),fe(this,_l,"not-initialized"),fe(this,Rs),fe(this,Vt),fe(this,Uh,0),lo(this,"getNextRequestId",()=>(++T0(this,Uh)._).toString()),Ae(this,yr,new Z1),C(this,yr).onSessionLifeTimeReached(()=>on(this,tn,C_).call(this)),Ae(this,en,new wl)}get state(){return C(this,_l)}get isInitialized(){return this.state!=="not-initialized"}get connection(){return C(this,Vt)}onConnected(e){C(this,en).on("connectionEstablished",e)}onConnectionClosed(e){C(this,en).on("connectionClosed",e)}onCspdUpdate(e){C(this,en).on("cspdUpdate",e)}onCspdUpdateParts(e){C(this,en).on("cspdUpdateParts",e)}onConnectionRestored(e){C(this,en).on("connectionRestored",e)}async connectEditor(e){return await on(this,tn,_u).call(this,e)}async connectCfgr(e){return await on(this,tn,_u).call(this,e)}async restoreConnection(){if(!C(this,Rs)){Ye("ConnectionManager","restoreConnection","There's no previous connection to restore. Create a connection with `client.connectEditor()` or `client.connectCfgr()` first.");return}C(this,yr).stopSessionLifeTimer();const[e]=await vs(this.closeConnection());e&&Ye("ConnectionManager","restoreConnection","Error closing connection",e),await on(this,tn,_u).call(this,C(this,Rs))&&C(this,en).emit("connectionRestored")}async closeConnection(){var e;Ae(this,tn,"disconnecting",hs);try{await((e=C(this,Vt))==null?void 0:e.stop())}catch{}Ae(this,tn,"disconnected",hs)}extendSessionLifetime(){C(this,yr).restartSessionLifeTimer()}}yr=new WeakMap,en=new WeakMap,zh=new WeakMap,_l=new WeakMap,tn=new WeakSet,hs=function(t){Ae(this,_l,t),Je("ConnectionManager","",`State changed to "${t}"`)},Rs=new WeakMap,Vt=new WeakMap,Uh=new WeakMap,C_=function(){Je("ConnectionManager","#onSessionLifeTimeReached","Session lifetime reached"),this.closeConnection()},um=function(t,e){if(t<C(this,zh))return;const n=nE[t];Je("ConnectionManager","#onConnectionLog",`[SignalR ${n}] ${e}`,{logLevel:t},"yellow")},lm=function(t){t?Ye("ConnectionManager","#handleConnectionClosed","Connection closed with error",t):this.state!=="disconnecting"?Ye("ConnectionManager","#handleConnectionClosed","Connection closed unexpectedly"):Je("ConnectionManager","#handleConnectionClosed","Connection closed"),Ae(this,Vt,void 0),Ae(this,tn,"disconnected",hs),C(this,yr).stopSessionLifeTimer(),C(this,en).emit("connectionClosed")},_u=async function(t){if(Je("ConnectionManager","connect","Connecting to configurator"),this.isInitialized&&this.state!=="disconnected"){Ye("ConnectionManager","connect",`Cannot connect whilst in state "${this.state}"`);return}Ae(this,tn,"connecting",hs),Ae(this,Rs,t),C(this,yr).stopSessionLifeTimer();const e=t.serverUrl??tE;Ae(this,Vt,new C0().withUrl(e,{transport:lt.WebSockets,skipNegotiation:!0}).configureLogging({log:on(this,tn,um).bind(this)}).build()),C(this,Vt).onclose(g=>on(this,tn,lm).call(this,g)),C(this,Vt).on("cspdUpdate",g=>{C(this,en).emit("cspdUpdate",g)}),C(this,Vt).on("cspdUpdateParts",(g,p,v,_)=>C(this,en).emit("cspdUpdateParts",g,p,v,_));const[n]=await vs(C(this,Vt).start());if(n){Ye("ConnectionManager","connect","Connecting to configurator failed",n),await this.closeConnection();return}Je("ConnectionManager","connect","WS connection established");const r=eE(t.mode),i=r?["",t.companyName,t.configuratorName,t.draftName,t.mode,"000"]:[t.mode,t.companyName,t.configuratorName,...t.mode==="preview"||t.mode==="staging"?[t.draftName]:[],...t.editCfgn?[t.editCfgn.cfgnId,"edit",t.editCfgn.authToken]:[]],o=this.getNextRequestId(),s=window.innerWidth,a=window.innerHeight,c={cbnInitialWindowWidth:s.toString(),cbnInitialWindowHeight:a.toString()},u={width:s,height:a,userAgent:navigator.userAgent},l=void 0,[f,m]=await vs(r?C(this,Vt).invoke("StartProductEditor",i,o,c,l):C(this,Vt).invoke("StartConfiguration",i,o,c,l,u)),d=r?aE.safeParse(m):w_.safeParse(m);if(f||!d.success){const g=f??d.error;Ye("ConnectionManager","connect",f?"Error starting configuration":"Error parsing start response",{error:g,startCfgnResponse:m}),await this.closeConnection();return}const h=cm(d.data)?Am(d.data.value.editUrl):{cfgnId:"not-used-in-editor",authToken:"not-used-in-editor"};if(!h||!h.cfgnId||!h.authToken)throw new Error("Error parsing edit URL from start response");if(Je("ConnectionManager","connect","Connection to configurator established",{startCfgnResponseParsed:d}),Ae(this,tn,"connected",hs),C(this,yr).restartSessionLifeTimer(),C(this,en).emit("connectionEstablished"),cm(d.data)){const{cfgnId:g,authToken:p}=h;return C(this,Rs).editCfgn={cfgnId:g,authToken:p},{connection:C(this,Vt),...d.data.value,cfgnId:g,authToken:p}}else return{connection:C(this,Vt),...d.data.value}};const uE=I.z.object({Name:D0,ComponentInfo:I.z.object({$nam:I.z.string(),$typ:bm}).optional(),Group:I.z.object({$val:I.z.string()}).optional(),Value:I.z.object({$val:wm,$inp:_m.optional(),$ipt:mm.optional(),$src:I.z.string().optional()}).optional(),Query:I.z.union([I.z.object({$val:I.z.union([I.z.literal("[DataSourceQuery]"),np]),$src:I.z.string()}),I.z.object({}).transform(()=>{})]).optional(),Archive:I.z.object({$val:I.z.boolean()}).optional()}),lE=I.z.record(p_,uE),fE=I.z.enum(["Value","Records"]),dE=I.z.object({Name:I.z.literal("ComponentList").or(I.z.literal("Configurator")),$val:I.z.record(I.z.string(),I.z.union([I.z.object({$typ:bm.optional(),$chg:I.z.array(fE).optional(),Value:I.z.any().optional(),Group:I.z.string().optional()}),I.z.string().array()]))}),hE=I.z.union([I.z.number(),I.z.array(I.z.number()),I.z.null()]),S_=I.z.lazy(()=>I.z.union([hE,I.z.record(S_)])),pE=I.z.record(Wl,I.z.union([I.z.number(),I.z.array(I.z.number()),I.z.null()])),k_=I.z.lazy(()=>I.z.union([pE,I.z.record(k_)])),gE=I.z.object({Name:I.z.literal("ConfiguratorInspector"),Errors:I.z.object({Cfgr:S_.optional(),Fibers:I.z.object({CtrlFibers:k_.optional()}).optional(),$val:I.z.array(I.z.object({Id:I.z.string(),Message:I.z.string(),route:I.z.any()}))})}),vE=I.z.object({number:I.z.number(),partialNumber:I.z.number().optional(),isPartial:I.z.boolean().optional(),request:I.z.string().optional(),west:dE.optional(),fiber:K1.optional(),inspector:gE.optional()}).passthrough().refine(t=>Object.keys(t).filter(b_).every(e=>y_(t[e]))),mE=t=>!isNaN(t.partialNumber??NaN);var ut,Fa,wu,Cu,os,xa,Su,Nh,$h,I_,Pa,Lh,dr,jh,Oh,Fh,ps,Wh,Xr,Vh,Hh,qh,Bh,Kh,Xh,ss;class yE{constructor(e,n){fe(this,$h),fe(this,ut),fe(this,Fa,!1),fe(this,wu,{}),fe(this,Cu,{}),fe(this,os),fe(this,xa,new Map),fe(this,Su,new Map),lo(this,"awaitCspdUpdateResponse",async r=>{const i=C(this,Su).get(r);if(i)return i;const o=new Promise(s=>C(this,xa).set(r,s));return C(this,Su).set(r,o),o}),fe(this,Nh,r=>{const i=C(this,xa).get(r);i&&(i(),C(this,xa).delete(r))}),fe(this,Pa,{}),fe(this,Lh,async(r,i,o,s)=>{Je("WsCspdUpdateHandler","#handleCspdUpdateParts","Received cspd update part",{msgId:r,partNr:i,totalParts:o,msgPart:s});const a=C(this,Pa)[r]??{messageParts:[],receivedPartsCnt:0,totalParts:o};if(a.receivedPartsCnt++,a.messageParts[i]=s,C(this,Pa)[r]=a,a.totalParts===a.receivedPartsCnt){delete C(this,Pa)[r];const c=a.messageParts.join("");Je("WsCspdUpdateHandler","#handleCspdUpdateParts","All cspd update parts received",{message:c}),C(this,ss).call(this,c)}}),fe(this,dr,{}),fe(this,jh,async r=>{Je("WsCspdUpdateHandler","#handleCspdUpdatePartial","",{data:r});const i=r.number;C(this,dr)[i]||(C(this,dr)[i]=[]),C(this,dr)[i][r.partialNumber]=r;const o=Object.values(C(this,dr)[i]).find(a=>!a.isPartial),s=C(this,dr)[i].filter(Boolean);if(o&&s.length===o.partialNumber+1&&s.every((a,c)=>a.partialNumber===c)){const a=Wn(...C(this,dr)[i]);delete a.partialNumber,delete a.isPartial,Je("WsCspdUpdateHandler","#handleCspdUpdatePartial","All partial parts received",{mergedData:a}),delete C(this,dr)[i],C(this,ss).call(this,a)}}),fe(this,Oh,2147483647),fe(this,Fh,-2147483648),fe(this,ps,0),fe(this,Wh,()=>{const r=C(this,ps);return C(this,Oh)===r?C(this,Fh):r+1}),fe(this,Xr,[]),fe(this,Vh,r=>{const[i,o]=Sl(r);if(i)return[i,null];const{error:s,data:a}=vE.safeParse(o);if(s)return[s,null];const c=(o&&typeof o=="object"?Object.entries(o):[]).reduce((m,[d,h])=>(j1(d)&&(m[d]=h),m),{}),{error:u,data:l}=lE.safeParse(c);if(u)return[u,null];const f={...a,...Object.keys(l).length&&{editorData:l}};return[null,{rawResponse:o,parsedResponse:f}]}),fe(this,Hh,r=>{const i=r.$del??[],o=Object.entries(r),{staleCmps:s,updatedCmps:a}=(o==null?void 0:o.reduce((c,[u,l])=>{if(kt(l))return c;const{$chg:f,$typ:m,Value:d,Group:h}=l;f&&c.staleCmps.push({name:u,changedCmpProperties:f});const g=Os(u);m&&(C(this,wu)[g]=m);const p=C(this,wu)[g],v=fg(p),_=P0.some(x=>v===x),P=f==null?void 0:f.includes("Value");if(!_&&!P){const[x,R]=Qc(()=>C(this,os).call(this,g,p,d));if(x){const H=x instanceof Error?x.message:"Unknown error",A={name:u,type:p,value:d,error:x};Ye("WsCspdUpdateHandler","#getCmpListDataFromCspdUpdate",`Failed to parse cmp value: ${H}`,A)}else c.updatedCmps.push({name:u,value:R,type:p,group:h})}return c},{staleCmps:[],updatedCmps:[]}))??{staleCmps:[],updatedCmps:[]};return{staleCmps:s,updatedCmps:a,deletedCmps:i}}),fe(this,qh,r=>Object.entries(r).map(([i,o])=>{const s=O1(i),{$typ:a}=o.ComponentInfo??{},{$inp:c,$ipt:u,$src:l,$val:f}=o.Value??{},{$src:m}=o.Query??{};a&&(C(this,Cu)[s]=a);const d=C(this,Cu)[s],h=lg(f)?f:void 0,[g,p]=h?[void 0,void 0]:Qc(()=>C(this,os).call(this,s,d,f));if(g){const O=g instanceof Error?g.message:"Unknown error",j={cmpId:s,cmpType:d,value:f};Ye("WsCspdUpdateHandler","#getCmpEditorDataFromCspdUpdate",`Failed to parse cmp editor value: ${O}`,j)}const v=fg(d),_=Pm(d),P=u||d&&F1(d),x=`${v}<${P}>`,[R,H]=Qc(()=>C(this,os).call(this,s,x,c));if(R){const O=R instanceof Error?R.message:"Unknown error",j={cmpId:s,cmpType:d,value:c};Ye("WsCspdUpdateHandler","#getCmpEditorDataFromCspdUpdate",`Failed to parse cmp editor input value: ${O}`,j)}const A=l??m??"",k=_r(H)||kt(H)?JSON.stringify(H):H;return{cmpId:s,value:p,error:h,input:k,inputType:P,source:A,type:_,baseType:v}})??[]),fe(this,Bh,r=>{const i=mu(r.$val),o=r.$typ?mu(r.$typ):[];return{updatedFibers:i.reduce((s,{ctrlId:a,values:c})=>(s[a]=Object.entries(c).map(([u,l])=>{var f;const m=u,d=(f=o.find(g=>g.ctrlId===a))==null?void 0:f.values[m],h=lg(l)?l:void 0;return{propertyName:m,type:d,value:h?void 0:l,error:h}}),s),{})}}),fe(this,Kh,r=>r.map(i=>{const o=H1(i.Pack),s=Object.entries(i.Fibers).map(([a,c])=>({propertyName:a,type:c.$typ,hiveRule:c.$src}));return{ctrlId:o,fibers:s}})),fe(this,Xh,r=>{var i;const o=v=>{if(typeof v=="number"||kt(v)||v===null)return v;const _=Object.keys(v).filter(x=>x!=="$err")[0],P=v[_];return o(P)},s={cmpsWithSourceErrors:[],cmpsWithCascadingErrors:[],cmpsWithResolvedErrors:[]},a=r.Errors.Cfgr,{cmpsWithSourceErrors:c,cmpsWithCascadingErrors:u,cmpsWithResolvedErrors:l}=a?Object.entries(a).reduce((v,[_,P])=>{const x=o(P);return typeof x=="number"?v.cmpsWithSourceErrors.push(_):kt(x)?v.cmpsWithCascadingErrors.push(_):x===null&&v.cmpsWithResolvedErrors.push(_),v},s):s,f={ctrlFibersWithSourceErrors:[],ctrlFibersWithCascadingErrors:[],ctrlFibersWithResolvedErrors:[]},m=(i=r.Errors.Fibers)==null?void 0:i.CtrlFibers,d=m&&mu(m),{ctrlFibersWithSourceErrors:h,ctrlFibersWithCascadingErrors:g,ctrlFibersWithResolvedErrors:p}=d?d.reduce((v,{ctrlId:_,values:P})=>(Object.entries(P).forEach(([x,R])=>{const H=x;typeof R=="number"?v.ctrlFibersWithSourceErrors.push({ctrlId:_,fiberName:H}):kt(R)?v.ctrlFibersWithCascadingErrors.push({ctrlId:_,fiberName:H}):R===null&&v.ctrlFibersWithResolvedErrors.push({ctrlId:_,fiberName:H})}),v),f):f;return{cmpsWithSourceErrors:c,cmpsWithCascadingErrors:u,cmpsWithResolvedErrors:l,ctrlFibersWithSourceErrors:h,ctrlFibersWithCascadingErrors:g,ctrlFibersWithResolvedErrors:p}}),fe(this,ss,r=>{var i;const[o,s]=Mr(r)?C(this,Vh).call(this,r):[null,{parsedResponse:r,rawResponse:r}];if(o){Ye("WsCspdUpdateHandler","#handleCspdUpdate","Failed to parse cspd update",{error:o,errorMsg:o.message,rawResponse:r});return}const{parsedResponse:a,rawResponse:c}=s;if(mE(a)){C(this,jh).call(this,a);return}const u=C(this,ps);if(a.number!==u){C(this,Xr).push(a),Je("WsCspdUpdateHandler","#handleCspdUpdate",`Waiting for msg number ${u}, received ${a.number}. Saving data for later processing.`,{rawResponse:c,parsedResponse:a,queue:C(this,Xr)});return}Je("WsCspdUpdateHandler",`#handleCspdUpdate, ID ${a.request}`,"",{rawResponse:c,parsedResponse:a});const l=!C(this,Fa);Ae(this,Fa,!0);const f=C(this,Wh).call(this);Ae(this,ps,f);const m=(i=a.west)==null?void 0:i.$val,{staleCmps:d,updatedCmps:h,deletedCmps:g}=m?C(this,Hh).call(this,m):{staleCmps:[],updatedCmps:[],deletedCmps:[]};C(this,ut).emit("cmpListCspdUpdateProcessed",{isFirstCspdUpdate:l,staleCmps:d,updatedCmps:h,deletedCmps:g});const p=a.editorData,v=p?C(this,qh).call(this,p):[];v.length&&C(this,ut).emit("cmpEditorCspdUpdateProcessed",v);const _=a.fiber,P=_&&C(this,Bh).call(this,_);P&&C(this,ut).emit("ctrlFiberCspdUpdateProcessed",P);const x=Object.entries(a).map(([O,j])=>b_(O)&&y_(j)?j:void 0).filter(O=>O!==void 0),R=x&&C(this,Kh).call(this,x);R&&C(this,ut).emit("ctrlFiberEditorCspdUpdateProcessed",R);const H=a.inspector,A=H&&C(this,Xh).call(this,H);A&&C(this,ut).emit("inspectorCspdUpdateProcessed",A),a.request&&C(this,Nh).call(this,a.request),C(this,ut).emit("cspdUpdateProcessed");const k=C(this,Xr).findIndex(O=>O.number===f);if(k>=0){const O=C(this,Xr)[k];C(this,Xr).splice(k,1),C(this,ss).call(this,O)}}),Ae(this,ut,new wl),Ae(this,os,n),e.onCspdUpdate(r=>C(this,ss).call(this,r)),e.onCspdUpdateParts((...r)=>C(this,Lh).call(this,...r)),e.onConnectionClosed(()=>on(this,$h,I_).call(this))}onCspdUpdateProcessed(e){return C(this,ut).on("cspdUpdateProcessed",e),{unsubscribe:()=>C(this,ut).off("cspdUpdateProcessed",e)}}onCmpListCspdUpdateProcessed(e){return C(this,ut).on("cmpListCspdUpdateProcessed",e),{unsubscribe:()=>C(this,ut).off("cmpListCspdUpdateProcessed",e)}}onCmpEditorCspdUpdateProcessed(e,n){const r=i=>{const o=i.find(s=>s.cmpId===e);o&&n(o)};return C(this,ut).on("cmpEditorCspdUpdateProcessed",r),{unsubscribe:()=>C(this,ut).off("cmpEditorCspdUpdateProcessed",r)}}onCtrlFiberCspdUpdateProcessed(e){return C(this,ut).on("ctrlFiberCspdUpdateProcessed",e),{unsubscribe:()=>C(this,ut).off("ctrlFiberCspdUpdateProcessed",e)}}onCtrlFiberEditorCspdUpdateProcessed(e,n){const r=i=>{const o=i.find(s=>s.ctrlId===e);o&&n(o)};return C(this,ut).on("ctrlFiberEditorCspdUpdateProcessed",r),{unsubscribe:()=>C(this,ut).off("ctrlFiberEditorCspdUpdateProcessed",r)}}onInspectorCspdUpdateProcessed(e){return C(this,ut).on("inspectorCspdUpdateProcessed",e),{unsubscribe:()=>C(this,ut).off("inspectorCspdUpdateProcessed",e)}}}ut=new WeakMap,Fa=new WeakMap,wu=new WeakMap,Cu=new WeakMap,os=new WeakMap,xa=new WeakMap,Su=new WeakMap,Nh=new WeakMap,$h=new WeakSet,I_=function(){Ae(this,Fa,!1),Ae(this,ps,0),Ae(this,Xr,[])},Pa=new WeakMap,Lh=new WeakMap,dr=new WeakMap,jh=new WeakMap,Oh=new WeakMap,Fh=new WeakMap,ps=new WeakMap,Wh=new WeakMap,Xr=new WeakMap,Vh=new WeakMap,Hh=new WeakMap,qh=new WeakMap,Bh=new WeakMap,Kh=new WeakMap,Xh=new WeakMap,ss=new WeakMap;var Br,Jr,Da,Ra,In,Jh,Aa,Gh,T_;class bE{constructor(){fe(this,Aa),fe(this,Br),fe(this,Jr),fe(this,Da),fe(this,Ra),fe(this,In),fe(this,Jh,async()=>{await C(this,In).resubscribeToCmpUpdates()});var e,n;const r=(n=(e=window.Cbn)==null?void 0:e.getCustomCodeSdkBridge)==null?void 0:n.call(e,"v1"),{connectionMgr:i,cspdUpdateHandler:o,cfgrClientInternals:s}=(r==null?void 0:r.getSharedCfgrClientCore())??{};Ae(this,Br,i??new cE),C(this,Br).onConnectionClosed(()=>C(this,In).markAllCmpPropertiesAsStale()),C(this,Br).onConnectionRestored(()=>C(this,Jh).call(this)),Ae(this,Jr,new wl),Ae(this,In,new tw),Ae(this,Da,o??new yE(C(this,Br),ew)),C(this,Da).onCmpListCspdUpdateProcessed(a=>on(this,Aa,T_).call(this,a)),Ae(this,Ra,s??new Q1(C(this,Br),C(this,Da))),hm(this,C(this,Ra))}onNewCfgnIdCreated(e){C(this,Jr).on("newCfgnIdCreated",e)}async connect(e){const n=window.location.href,r=rw(n)?Am(n):void 0,i=r?{serverUrl:e.serverUrl,mode:e.mode,companyName:r.companyName,configuratorName:r.planName,draftName:r.planVersion,...(r==null?void 0:r.cfgnId)&&(r==null?void 0:r.authToken)&&{editCfgn:{cfgnId:r.cfgnId,authToken:r.authToken}}}:e,o=await C(this,Br).connectCfgr(i);if(o&&(C(this,Jr).emit("newCfgnIdCreated",o.cfgnId,o.authToken),r)){const s=o.editUrl+window.location.search;window.history.replaceState({},"",s)}}async getCmpValue(e){return await C(this,In).getCmpValue(e)}async onCmpValueChanged(e,n,r,i=!1){await C(this,In).subscribeToCmpUpdates(e,"Value"),C(this,Jr).on("cmpsUpdated",o=>{o.find(s=>s===e)&&on(this,Aa,Gh).call(this,e,n,r)}),i&&on(this,Aa,Gh).call(this,e,n,r)}async onAnyCmpValueChanged(e,n,r=!1){n.length||Ye("ConfiguratorClient","onAnyCmpValueChanged","Please define at least one component!");const i=n.map(s=>C(this,In).subscribeToCmpUpdates(s.name,"Value",r));await Promise.all(i);const o=n.map(s=>s.name);C(this,Jr).on("cmpsUpdated",s=>{if(s.some(a=>o.includes(a))){const a=o.reduce((c,u)=>(c[u]=s.includes(u),c),{});e(a)}})}async setCmpInputs(e){const n=e.map(o=>({...o,cmp:Cm(o.name)})),r=n.filter(o=>!hg(o.cmp));if(r.length){Ye("ConfiguratorClient","setCmpInputs","The following components have not been registered with the `ConfiguratorClient` or are not supported by `setCmpInputs`. They will be ignored:",r);return}const i=n.filter(o=>hg(o.cmp)).map(o=>{const{zodType:s}=o.cmp,a=Os(o.name);return C(this,Ra).setCmpInput(a,o.value,s)});await Promise.all(i)}}Br=new WeakMap,Jr=new WeakMap,Da=new WeakMap,Ra=new WeakMap,In=new WeakMap,Jh=new WeakMap,Aa=new WeakSet,Gh=async function(t,e,n){const r=await C(this,In).getCmpValue(t);(typeof n!="function"||await n(r))&&e(r)},T_=function(t){const{isFirstCspdUpdate:e,staleCmps:n,updatedCmps:r}=t;if(n.forEach(({name:i,changedCmpProperties:o})=>{C(this,In).markCmpPropertiesAsStale(i,o)}),r.forEach(({name:i,value:o})=>{C(this,In).updateCmp(i,o,e)}),r.length){const i=r.map(o=>o.name);C(this,Jr).emit("cmpsUpdated",i)}},lo(bE,"version",E0);const _E="v1";console.log(`Loading custom code SDK v${dm}`);var Jc,fm;const wd=(fm=(Jc=window.Cbn)==null?void 0:Jc.getCustomCodeSdkBridge)==null?void 0:fm.call(Jc,"v1"),Qh=wd==null?void 0:wd.createCfgrClient(_E,hm);if(!Qh)throw new Error("Cannot create Configurator Client. Make sure to only use the `custom-code-sdk` inside a Combeenation Configurator.");const wE=Qh.onAnyCmpValueChanged.bind(Qh);exports.Button=R_;exports.Checkbox=A_;exports.Collapsible=M_;exports.CustomControl=z_;exports.Dataview=U_;exports.Input=N_;exports.Panel=$_;exports.Text=L_;exports.ValueComponent=rp;exports.onAnyCmpValueChanged=wE;exports.version=dm;
|
|
7
|
+
*/var qu="Promise",zp="rejected";function Kt(t,e){return Up(t,function(n){return e?e({status:"fulfilled",rejected:!1,value:n}):n},function(n){return e?e({status:zp,rejected:!0,reason:n}):n})}function Up(t,e,n,r){var i=t;try{if(fi(t))(e||n)&&(i=t.then(e,n));else try{e&&(i=e(t))}catch(o){if(n)i=n(o);else throw o}}finally{}return i}var ky=["pending","resolving","resolved",zp],Vg="dispatchEvent",Uc;function Ow(t){var e;return t&&t.createEvent&&(e=t.createEvent("Event")),!!e&&e.initEvent}function Fw(t,e,n,r){var i=kt();!Uc&&(Uc=Cn(!!it(Ow,[i]).v));var o=Uc.v?i.createEvent("Event"):r?new Event(e):{};if(n&&n(o),Uc.v&&o.initEvent(e,!1,!0),o&&t[Vg])t[Vg](o);else{var s=t["on"+e];if(s)s(o);else{var a=nt("console");a&&(a.error||a.log)(e,te(o))}}}var Ty="unhandledRejection",jw=Ty.toLowerCase(),qg=[],Lw=0,Ww=10,wf;function Hg(t){return pe(t)?t.toString():te(t)}function Ey(t,e,n){var r=Wl(arguments,3),i=0,o=!1,s,a=[],c=Lw++,u=!1,l=null,f;function m(x,R){try{qg.push(c),u=!0,l&&l.cancel(),l=null;var q=t(function(A,I){a.push(function(){try{var L=i===2?x:R,O=Ye(L)?s:pe(L)?L(s):L;fi(O)?O.then(A,I):L?A(O):i===3?I(O):A(O)}catch(H){I(H)}}),o&&p()},r);return q}finally{qg.pop()}}function d(x){return m(void 0,x)}function h(x){var R=x,q=x;return pe(x)&&(R=function(A){return x&&x(),A},q=function(A){throw x&&x(),A}),m(R,q)}function g(){return ky[i]}function p(){if(a.length>0){var x=a.slice();a=[],u=!0,l&&l.cancel(),l=null,e(x)}}function v(x,R){return function(q){if(i===R){if(x===2&&fi(q)){i=1,q.then(v(2,1),v(3,1));return}i=x,o=!0,s=q,p(),!u&&x===3&&!l&&(l=yn(_,Ww))}}}function _(){if(!u)if(u=!0,ew())process.emit(Ty,s,f);else{var x=cn()||vn();!wf&&(wf=Cn(it(nt,[qu+"RejectionEvent"]).v)),Fw(x,jw,function(R){return Ae(R,"promise",{g:function(){return f}}),R.reason=s,R},!!wf.v)}}f={then:m,catch:d,finally:h},Qn(f,"state",{get:g}),nw()&&(f[Ip(11)]="IPromise");function P(){return"IPromise "+g()+(o?" - "+Hg(s):"")}return f.toString=P,(function(){pe(n)||nr(qu+": executor is not a function - "+Hg(n));var x=v(3,0);try{n.call(f,v(2,0),x)}catch(R){x(R)}})(),f}function Vw(t){return function(e){var n=Wl(arguments,1);return t(function(r,i){try{var o=[],s=1;Tp(e,function(a,c){a&&(s++,Up(a,function(u){o[c]=u,--s===0&&r(o)},i))}),s--,s===0&&r(o)}catch(a){i(a)}},n)}}function qw(t){return Cn(function(e){var n=Wl(arguments,1);return t(function(r,i){var o=[],s=1;function a(c,u){s++,Kt(c,function(l){l.rejected?o[u]={status:zp,reason:l.reason}:o[u]={status:"fulfilled",value:l.value},--s===0&&r(o)})}try{Ce(e)?ee(e,a):uy(e)?Tp(e,a):nr("Input is not an iterable"),s--,s===0&&r(o)}catch(c){i(c)}},n)})}function xy(t){ee(t,function(e){try{e()}catch{}})}function Hw(t){var e=gc(t)?t:0;return function(n){yn(function(){xy(n)},e)}}function Py(t,e){return Ey(Py,Hw(e),t,e)}var Sf;function Bw(t,e){!Sf&&(Sf=Cn(it(nt,[qu]).v||null));var n=Sf.v;if(!n)return Py(t);pe(t)||nr(qu+": executor is not a function - "+te(t));var r=0;function i(){return ky[r]}var o=new n(function(s,a){function c(l){r=2,s(l)}function u(l){r=3,a(l)}t(c,u)});return Qn(o,"state",{get:i}),o}var If;function Qa(t){return Ey(Qa,xy,t)}function Kw(t,e){return!If&&(If=qw(Qa)),If.v(t,e)}var kf;function Zn(t,e){return!kf&&(kf=Cn(Bw)),kf.v.call(this,t,e)}var Xw=Vw(Zn),Wn=void 0,Re="",Xo="channels",yt="core",Jd="createPerfMgr",Qd="disabled",Cs="extensionConfig",Go="extensions",Yn="processTelemetry",Hu="priority",iu="eventsSent",Na="eventsDiscarded",ou="eventsSendRequest",Wi="perfEvent",Tf="offlineEventsStored",Ef="offlineBatchSent",xf="offlineBatchDrop",Bu="getPerfMgr",Zd="domain",Pf="path",Gw="Not dynamic - ",Jw="REDACTED",Bg=["sig","Signature","AWSAccessKeyId","X-Goog-Signature"],Qw="getPrototypeOf",Zw=/-([a-z])/g,Yw=/([^\w\d_$])/g,eS=/^(\d+[\w\d_$])/,tS=Object[Qw];function no(t){return!K(t)}function Ku(t){var e=t;return e&&de(e)&&(e=e[to](Zw,function(n,r){return r.toUpperCase()}),e=e[to](Yw,"_"),e=e[to](eS,function(n,r){return"_"+r})),e}function Dt(t,e){return t&&e?at(t,e)!==-1:!1}function Ns(t){return t&&t.toISOString()||""}function $e(t){return Cp(t)?t[po]:Re}function We(t,e,n,r,i){var o=n;return t&&(o=t[e],o!==n&&(!i||i(o))&&(!r||r(n))&&(o=n,t[e]=o)),o}function zt(t,e,n){var r;return t?(r=t[e],!r&&K(r)&&(r=Ye(n)?{}:n,t[e]=r)):r=Ye(n)?{}:n,r}function Dy(t,e){var n=null,r=null;return pe(t)?n=t:r=t,function(){var i=arguments;if(n&&(r=n()),r)return r[e][ho](r,i)}}function nS(t,e,n){if(t&&e&&Xt(t)&&Xt(e)){var r=function(o){if(de(o)){var s=e[o];pe(s)?(!n||n(o,!0,e,t))&&(t[o]=Dy(e,o)):(!n||n(o,!1,e,t))&&(ii(t,o)&&delete t[o],Ae(t,o,{g:function(){return e[o]},s:function(a){e[o]=a}}))}};for(var i in e)r(i)}return t}function Xu(t,e,n,r,i){t&&e&&n&&(t[e]=Dy(n,r))}function ls(t,e,n,r){return t&&e&&Xt(t)&&Ce(n)&&ee(n,function(i){de(i)&&Xu(t,i,e,i)}),t}function rS(t){return(function(){function e(){var n=this;t&&De(t,function(r,i){n[r]=i})}return e})()}function Ry(t){return t&&$d&&(t=gp($d({},t))),t}function Ay(t,e,n,r,i,o){var s=arguments,a=s[0]||{},c=s[he],u=!1,l=1;for(c>0&&Jm(a)&&(u=a,a=s[l]||{},l++),Xt(a)||(a={});l<c;l++){var f=s[l],m=Ce(f),d=Xt(f);for(var h in f){var g=m&&h in f||d&&ii(f,h);if(g){var p=f[h],v=void 0;if(u&&p&&((v=Ce(p))||Ot(p))){var _=a[h];v?Ce(_)||(_=[]):Ot(_)||(_={}),p=Ay(u,_,p)}p!==void 0&&(a[h]=p)}}}return a}function su(t,e,n){var r=e&&e.featureOptIn&&e.featureOptIn[t];if(t&&r){var i=r.mode;if(i===3)return!0;if(i===2)return!1}return n}function Gu(t){try{return t.responseText}catch{}return null}function My(t,e){return t?"XDomainRequest,Response:"+Gu(t)||"":e}function Ju(t,e){return t?"XMLHttpRequest,Status:"+t[dr]+",Response:"+Gu(t)||t.response||"":e}function Kg(t,e){return e&&(gc(e)?t=[e].concat(t):Ce(e)&&(t=e.concat(t))),t}var iS="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",Xg="withCredentials",oS="timeout";function sS(t,e,n,r,i,o){i===void 0&&(i=!1);function s(c,u,l){try{c[u]=l}catch{}}var a=new XMLHttpRequest;return s(a,iS,r),n&&s(a,Xg,n),a.open(t,e,!i),n&&s(a,Xg,n),!i&&o&&s(a,oS,o),a}function aS(t){var e={};if(de(t)){var n=Ve(t)[mo](/[\r\n]+/);ee(n,function(r){if(r){var i=r[Iy](": ");if(i!==-1){var o=Ve(r.substring(0,i))[Us](),s=Ve(r[Kd](i+1));e[o]=s}else e[Ve(r)]=1}})}return e}function Df(t,e,n){if(!t[n]&&e&&e.getResponseHeader){var r=e.getResponseHeader(n);r&&(t[n]=Ve(r))}return t}var cS="kill-duration",uS="kill-duration-seconds",lS="time-delta-millis";function Rf(t,e){var n={};return t[Lg]?n=aS(t[Lg]()):e&&(n=Df(n,t,lS),n=Df(n,t,cS),n=Df(n,t,uS)),n}var fS="documentMode",dS="location",hS="console",zy="JSON",pS="crypto",gS="msCrypto",vS="ReactNative",Yd="msie",eh="trident/",Uy="XMLHttpRequest",Af=null,Mf=null,Uo=null,zf=null;function Ny(t,e){var n=!1;if(t){try{if(n=e in t,!n){var r=t[Kn];r&&(n=e in r)}}catch{}if(!n)try{var i=new t;n=!Ye(i[e])}catch{}}return n}function Hn(t){return typeof location===Bm&&location?location:nt(dS)}function mS(){return typeof console!==pp?console:nt(hS)}function yc(){return!!(typeof JSON===Bm&&JSON||nt(zy)!==null)}function Mn(){return yc()?JSON||nt(zy):null}function yS(){return nt(pS)}function bS(){return nt(gS)}function _S(){var t=rr();return t&&t.product?t.product===vS:!1}function th(){var t=rr();if(t&&(t[Bd]!==Mf||Af===null)){Mf=t[Bd];var e=(Mf||Re)[Us]();Af=Dt(e,Yd)||Dt(e,eh)}return Af}function $y(t){if(t===void 0&&(t=null),!t){var e=rr()||{};t=e?(e.userAgent||Re)[Us]():Re}var n=(t||Re)[Us]();if(Dt(n,Yd)){var r=kt()||{};return za(parseInt(n[mo](Yd)[1]),r[fS]||0)}else if(Dt(n,eh)){var i=parseInt(n[mo](eh)[1]);if(i)return i+4}return null}function ma(t){return(zf===null||t===!1)&&(zf=ZC()&&!!rr().sendBeacon),zf}function Np(t){var e=!1;try{e=!!nt("fetch");var n=nt("Request");e&&t&&n&&(e=Ny(n,"keepalive"))}catch{}return e}function CS(){return Uo===null&&(Uo=typeof XDomainRequest!==pp,Uo&&Vl()&&(Uo=Uo&&!Ny(nt(Uy),"withCredentials"))),Uo}function Vl(){var t=!1;try{var e=nt(Uy);t=!!e}catch{}return t}function wS(t,e){return t&&t.dispatchEvent&&e?(t.dispatchEvent(e),!0):!1}function SS(t,e){var n=null,r={detail:e||null};if(pe(CustomEvent))n=new CustomEvent(t,r);else{var i=kt();i&&i.createEvent&&(n=i.createEvent("CustomEvent"),n.initCustomEvent(t,!0,!0,r))}return n}function IS(t,e,n){var r=vn();if(r&&r.CustomEvent)try{var i={cfg:e||null,customDetails:n||null};return wS(r,SS(t,i))}catch{}return!1}function kS(t){return t.replace(/^([a-zA-Z][a-zA-Z0-9+.-]*:\/\/)([^:@]{1,200}):([^@]{1,200})@(.*)$/,"$1REDACTED:REDACTED@$4")}function TS(t,e){var n,r=at(t,"?");if(r===-1)return t;e&&e.redactQueryParams?n=Bg.concat(e.redactQueryParams):n=Bg;var i=Bt(t,0,r+1),o=Bt(t,r+1),s=Re,a=at(o,"#");a!==-1&&(s=Bt(o,a),o=Bt(o,0,a));for(var c=!1,u=0;u<n[he];u++){var l=n[u]+"=";if(at(o,l)!==-1){c=!0;break}}if(!c)return t;var f=[],m=!1;if(o&&o[he])for(var d=o[mo]("&"),u=0;u<d[he];u++){var h=d[u];if(h){var g=at(h,"=");if(g===-1)f[Ee](h);else{var p=h[Kd](0,g),v=h[Kd](g+1);if(v===Re)f[Ee](h);else{for(var _=!1,P=0;P<n[he];P++)if(p===n[P]){_=!0,m=!0;break}_?f[Ee](p+"="+Jw):f[Ee](h)}}}}return m?i+f.join("&")+s:t}function mr(t,e){if(!t||!de(t)||t[Iy](" ")!==-1)return t;var n=e&&e.redactUrls===!1;if(n)return t;var r=at(t,"@")!==-1,i=at(t,"?")!==-1;if(!r&&!i)return t;try{var o=t;return r&&(o=kS(t)),i&&(o=TS(o,e)),o}catch{return t}}var Oy=4294967296,si=4294967295,Fy=123456789,jy=987654321,Ly=!1,ya=Fy,ba=jy;function ES(t){t<0&&(t>>>=0),ya=Fy+t&si,ba=jy-t&si,Ly=!0}function xS(){try{var t=An()&2147483647;ES((Math.random()*Oy^t)+t)}catch{}}function PS(t){return an(Za()/si*(t+1))>>>0}function Za(t){var e=0,n=yS()||bS();return n&&n.getRandomValues&&(e=n.getRandomValues(new Uint32Array(1))[0]&si),e===0&&th()&&(Ly||xS(),e=DS()&si),e===0&&(e=an(Oy*Math.random()|0)),e>>>=0,e}function DS(t){ba=36969*(ba&65535)+(ba>>16)&si,ya=18e3*(ya&65535)+(ya>>16)&si;var e=(ba<<16)+(ya&65535)>>>0&si|0;return e>>>=0,e}function $p(t){t===void 0&&(t=22);for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=Za()>>>0,r=0,i=Re;i[he]<t;)r++,i+=e.charAt(n&63),n>>>=6,r===5&&(n=(Za()<<2&4294967295|n&3)>>>0,r=0);return i}var Wy="3.3.11",RS="."+$p(6),AS=0;function Vy(t){return t.nodeType===1||t.nodeType===9||!+t.nodeType}function MS(t,e){var n=e[t.id];if(!n){n={};try{Vy(e)&&Ae(e,t.id,{e:!1,v:n})}catch{}}return n}function bn(t,e){return e===void 0&&(e=!1),Ku(t+AS+++(e?"."+Wy:Re)+RS)}function qy(t){var e={id:bn("_aiData-"+(t||Re)+"."+Wy),accept:function(n){return Vy(n)},get:function(n,r,i,o){var s=n[e.id];return s?s[Ku(r)]:(o&&(s=MS(e,n),s[Ku(r)]=i),i)},kill:function(n,r){if(n&&n[r])try{delete n[r]}catch{}}};return e}function au(t){return t&&Xt(t)&&!Ce(t)&&(t.isVal||t.fb||ii(t,"v")||ii(t,"mrg")||ii(t,"ref")||t.set)}function Hy(t,e,n){var r,i=n.dfVal||wC;if(e&&n.fb){var o=n.fb;Ce(o)||(o=[o]);for(var s=0;s<o[he];s++){var a=o[s],c=e[a];if(i(c)?r=c:t&&(c=t.cfg[a],i(c)&&(r=c),t.set(t.cfg,$t(a),c)),i(r))break}}return!i(r)&&i(n.v)&&(r=n.v),r}function nh(t,e,n){var r=n;if(n&&au(n)&&(r=Hy(t,e,n)),r){au(r)&&(r=nh(t,e,r));var i;Ce(r)?(i=[],i[he]=r[he]):Ot(r)&&(i={}),i&&(De(r,function(o,s){s&&au(s)&&(s=nh(t,e,s)),i[o]=s}),r=i)}return r}function Op(t,e,n,r){var i,o,s,a=r,c,u,l,f;au(a)?(i=a.isVal,o=a.set,l=a.rdOnly,f=a.blkVal,c=a.mrg,u=a.ref,!u&&Ye(u)&&(u=!!c),s=Hy(t,e,a)):s=r,f&&t.blkVal(e,n);var m,d=!0,h=e[n];(h||!K(h))&&(m=h,d=!1,i&&m!==s&&!i(m)&&(m=s,d=!0),o&&(m=o(m,s,e),d=m===s)),d?s?m=nh(t,e,s):m=s:(Ot(m)||Ce(s))&&c&&s&&(Ot(s)||Ce(s))&&De(s,function(g,p){Op(t,m,g,p)}),t.set(e,n,m),u&&t.ref(e,n),l&&t.rdOnly(e,n)}var di=kp("[[ai_dynCfg_1]]"),By=kp("[[ai_blkDynCfg_1]]"),zS=kp("[[ai_frcDynCfg_1]]");function Ky(t){if(t){var e;if(Ce(t)?(e=[],e[he]=t[he]):Ot(t)&&(e={}),e)return De(t,function(n,r){e[n]=Ky(r)}),e}return t}function US(t){if(t){var e=t[di]||t;if(e.cfg&&(e.cfg===t||e.cfg[di]===e))return e}return null}function NS(t){if(t&&(Ot(t)||Ce(t)))try{t[By]=!0}catch{}return t}function Uf(t,e,n){var r=!1;return n&&!t[e.blkVal]&&(r=n[zS],!r&&!n[By]&&(r=Ot(n)||Ce(n))),r}function Xy(t){nr("InvalidAccess:"+t)}var $S=["push","pop","shift","unshift","splice"],Ya=function(t,e,n,r){t&&t[vc](3,108,"".concat(n," [").concat(e,"] failed - ")+te(r))};function OS(t,e,n){Ce(e)&&ee($S,function(r){var i=e[r];e[r]=function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var a=i[ho](this,o);return Zu(t,e,n,"Patching"),a}})}function Qu(t,e){var n=bw(t,e);return n&&n.get}function FS(t,e,n,r){var i={n,h:[],trk:function(u){u&&u.fn&&(At(i.h,u)===-1&&i.h[Ee](u),t.trk(u,i))},clr:function(u){var l=At(i.h,u);l!==-1&&i.h[Co](l,1)}},o=!0,s=!1;function a(){o&&(s=s||Uf(a,t,r),r&&!r[di]&&s&&(r=Zu(t,r,n,"Converting")),o=!1);var u=t.act;return u&&i.trk(u),r}a[t.prop]={chng:function(){t.add(i)}};function c(u){if(r!==u){a[t.ro]&&!t.upd&&Xy("["+n+"] is read-only:"+te(e)),o&&(s=s||Uf(a,t,r),o=!1);var l=s&&a[t.rf];if(s)if(l){De(r,function(m){r[m]=u?u[m]:Wn});try{De(u,function(m,d){ql(t,r,m,d)}),u=r}catch(m){Ya((t.hdlr||{})[ft],n,"Assigning",m),s=!1}}else r&&r[di]&&De(r,function(m){var d=Qu(r,m);if(d){var h=d[t.prop];h&&h.chng()}});if(u!==r){var f=u&&Uf(a,t,u);!l&&f&&(u=Zu(t,u,n,"Converting")),r=u,s=f}t.add(i)}}Ae(e,i.n,{g:a,s:c})}function ql(t,e,n,r){if(e){var i=Qu(e,n),o=i&&!!i[t.prop];o?e[n]=r:FS(t,e,n,r)}return e}function Nf(t,e,n,r){if(e){var i=Qu(e,n),o=i&&!!i[t.prop],s=r&&r[0],a=r&&r[1],c=r&&r[2];if(!o){if(c)try{NS(e)}catch(u){Ya((t.hdlr||{})[ft],n,"Blocking",u)}try{ql(t,e,n,e[n]),i=Qu(e,n)}catch(u){Ya((t.hdlr||{})[ft],n,"State",u)}}s&&(i[t.rf]=s),a&&(i[t.ro]=a),c&&(i[t.blkVal]=!0)}return e}function Zu(t,e,n,r){try{De(e,function(i,o){ql(t,e,i,o)}),e[di]||(Qn(e,di,{get:function(){return t.hdlr}}),OS(t,e,n))}catch(i){Ya((t.hdlr||{})[ft],n,r,i)}return e}var Js="[[ai_",Qs="]]";function jS(t){var e=Xs(Js+"get"+t.uid+Qs),n=Xs(Js+"ro"+t.uid+Qs),r=Xs(Js+"rf"+t.uid+Qs),i=Xs(Js+"blkVal"+t.uid+Qs),o=Xs(Js+"dtl"+t.uid+Qs),s=null,a=null,c;function u(d,h){var g=c.act;try{c.act=d,d&&d[o]&&(ee(d[o],function(v){v.clr(d)}),d[o]=[]),h({cfg:t.cfg,set:t.set.bind(t),setDf:t.setDf.bind(t),ref:t.ref.bind(t),rdOnly:t.rdOnly.bind(t)})}catch(v){var p=t[ft];throw p&&p[vc](1,107,te(v)),v}finally{c.act=g||null}}function l(){if(s){var d=s;s=null,a&&a[Ui](),a=null;var h=[];if(ee(d,function(g){if(g&&(g[o]&&(ee(g[o],function(p){p.clr(g)}),g[o]=null),g.fn))try{u(g,g.fn)}catch(p){h[Ee](p)}}),s)try{l()}catch(g){h[Ee](g)}h[he]>0&&$w("Watcher error(s): ",h)}}function f(d){if(d&&d.h[he]>0){s||(s=[]),a||(a=yn(function(){a=null,l()},0));for(var h=0;h<d.h[he];h++){var g=d.h[h];g&&At(s,g)===-1&&s[Ee](g)}}}function m(d,h){if(d){var g=d[o]=d[o]||[];At(g,h)===-1&&g[Ee](h)}}return c={prop:e,ro:n,rf:r,blkVal:i,hdlr:t,add:f,notify:l,use:u,trk:m},c}function LS(t,e){var n={fn:e,rm:function(){n.fn=null,t=null,e=null}};return Ae(n,"toJSON",{v:function(){return"WatcherHandler"+(n.fn?"":"[X]")}}),t.use(n,e),n}function WS(t,e,n){var r=US(e);if(r)return r;var i=bn("dyncfg",!0),o=e&&n!==!1?e:Ky(e),s;function a(){s.notify()}function c(p,v,_){try{p=ql(s,p,v,_)}catch(P){Ya(t,v,"Setting value",P)}return p[v]}function u(p){return LS(s,p)}function l(p,v){s.use(null,function(_){var P=s.upd;try{Ye(v)||(s.upd=v),p(_)}finally{s.upd=P}})}function f(p,v){var _;return Nf(s,p,v,(_={},_[0]=!0,_))[v]}function m(p,v){var _;return Nf(s,p,v,(_={},_[1]=!0,_))[v]}function d(p,v){var _;return Nf(s,p,v,(_={},_[2]=!0,_))[v]}function h(p,v){return v&&De(v,function(_,P){Op(g,p,_,P)}),p}var g={uid:null,cfg:o,logger:t,notify:a,set:c,setDf:h,watch:u,ref:f,rdOnly:m,blkVal:d,_block:l};return Ae(g,"uid",{c:!1,e:!1,w:!1,v:i}),s=jS(g),Zu(s,o,"config","Creating"),g}function VS(t,e){t?(t[Fu](e),t[vc](2,108,e)):Xy(e)}function _n(t,e,n,r){var i=WS(n,t||{},r);return e&&i.setDf(i.cfg,e),i}function ct(t,e,n){var r=t[di]||t;return r.cfg&&(r.cfg===t||r.cfg[di]===r)?r[Yi](e):(VS(n,Gw+te(t)),_n(t,null,n)[Yi](e))}function fs(t,e){if(t&&t[go])return t[go](e)}function Gy(t,e,n){var r;return n||(r=Zn(function(i){n=i})),t&&yw(t)>0?Kt(fs(t[0],e),function(){Gy(Wl(t,1),e,n)}):n(),r}var qS=500,Gg="Microsoft_ApplicationInsights_BypassAjaxInstrumentation";function HS(t,e,n){return!t&&K(t)?e:Jm(t)?t:$t(t)[Us]()==="true"}function kn(t){return{mrg:!0,v:t}}function Jg(t,e){return{set:t,v:e}}function Yu(t,e,n){return{fb:n,isVal:t,v:e}}function dt(t,e){return{fb:e,set:HS,v:!!t}}function BS(t){return{isVal:de,v:$t(Re)}}var $f=[iu,Na,ou,Wi],el=null,Nc;function KS(t,e){return function(){var n=arguments,r=Jy(e);if(r){var i=r.listener;i&&i[t]&&i[t][ho](i,n)}}}function XS(){var t=nt("Microsoft");return t&&(el=t.ApplicationInsights),el}function Jy(t){var e=el;return!e&&t.disableDbgExt!==!0&&(e=el||XS()),e?e.ChromeDbgExt:null}function GS(t){if(!Nc){Nc={};for(var e=0;e<$f[he];e++)Nc[$f[e]]=KS($f[e],t)}return Nc}var No,Qy="warnToConsole",JS="AI (Internal): ",QS="AI: ",ZS="AITR_",YS={loggingLevelConsole:0,loggingLevelTelemetry:1,maxMessageLimit:25,enableDebug:!1},eI=(No={},No[0]=null,No[1]="errorToConsole",No[2]=Qy,No[3]="debugToConsole",No);function Qg(t){return t?'"'+t[to](/\"/g,Re)+'"':Re}function Of(t,e){var n=mS();if(n){var r="log";n[t]&&(r=t),pe(n[r])&&n[r](e)}}var ec=(function(){function t(e,n,r,i){r===void 0&&(r=!1);var o=this;o[Wu]=e,o[eo]=(r?QS:JS)+e;var s=Re;yc()&&(s=Mn().stringify(i));var a=(n?" message:"+Qg(n):Re)+(i?" props:"+Qg(s):Re);o[eo]+=a}return t.dataType="MessageData",t})();function wo(t,e){return(t||{})[ft]||new tl(e)}var tl=(function(){function t(e){this.identifier="DiagnosticLogger",this.queue=[];var n=0,r={},i,o,s,a,c;qe(t,this,function(u){c=f(e||{}),u.consoleLoggingLevel=function(){return i},u[vc]=function(h,g,p,v,_){_===void 0&&(_=!1);var P=new ec(g,p,_,v);if(a)throw te(P);var x=eI[h]||Qy;if(Ye(P[eo]))d("throw"+(h===1?"Critical":"Warning"),P);else{if(_){var R=+P[Wu];!r[R]&&i>=h&&(u[x](P[eo]),r[R]=!0)}else i>=h&&u[x](P[eo]);l(h,P)}},u.debugToConsole=function(h){Of("debug",h),d("warning",h)},u[Fu]=function(h){Of("warn",h),d("warning",h)},u.errorToConsole=function(h){Of("error",h),d("error",h)},u.resetInternalMessageCount=function(){n=0,r={}},u.logInternalMessage=l,u[go]=function(h){c&&c.rm(),c=null};function l(h,g){if(!m()){var p=!0,v=ZS+g[Wu];if(r[v]?p=!1:r[v]=!0,p&&(h<=o&&(u.queue[Ee](g),n++,d(h===1?"error":"warn",g)),n===s)){var _="Internal events throttle limit per PageView reached for this app.",P=new ec(23,_,!1);u.queue[Ee](P),h===1?u.errorToConsole(_):u[Fu](_)}}}function f(h){return ct(_n(h,YS,u).cfg,function(g){var p=g.cfg;i=p[Sy],o=p.loggingLevelTelemetry,s=p.maxMessageLimit,a=p.enableDebug})}function m(){return n>=s}function d(h,g){var p=Jy(e||{});p&&p[Sr]&&p[Sr](h,g)}})}return t.__ieDyn=1,t})();function Fp(t){return t||new tl}function J(t,e,n,r,i,o){o===void 0&&(o=!1),Fp(t)[vc](e,n,r,i,o)}function ro(t,e){Fp(t)[Fu](e)}function tI(t,e,n){Fp(t).logInternalMessage(e,n)}var Ff,Ur,Zg="toGMTString",Yg="toUTCString",jp="cookie",jf="expires",ev="isCookieUseDisabled",tc="disableCookiesUsage",ds="_ckMgr",$c=null,Lf=null,tv=null,Gn,nv={},nl={},nI=(Ff={cookieCfg:kn((Ur={},Ur[Zd]={fb:"cookieDomain",dfVal:no},Ur.path={fb:"cookiePath",dfVal:no},Ur.enabled=Wn,Ur.ignoreCookies=Wn,Ur.blockedCookies=Wn,Ur.disableCookieDefer=!1,Ur)),cookieDomain:Wn,cookiePath:Wn},Ff[tc]=Wn,Ff);function Lp(){!Gn&&(Gn=iy(function(){return kt()}))}function rI(t,e){var n=cu[ds]||nl[ds];return n||(n=cu[ds]=cu(t,e),nl[ds]=n),n}function Oc(t){return t?t.isEnabled():!0}function Zy(t,e){return e&&t&&Ce(t.ignoreCookies)?At(t.ignoreCookies,e)!==-1:!1}function rv(t,e){return e&&t&&Ce(t.blockedCookies)&&At(t.blockedCookies,e)!==-1?!0:Zy(t,e)}function iv(t,e){var n=e[us];if(K(n)){var r=void 0;Ye(t[ev])||(r=!t[ev]),Ye(t[tc])||(r=!t[tc]),n=r}return n}function Hl(t,e){var n;return t&&(n=t.getCookieMgr()),n||(n=rI(e,(t||{})[ft])),n}function cu(t,e){var n,r,i,o,s,a,c,u,l=[];function f(p){var v,_=(v={},v[Pf]=p||"/",v[jf]="Thu, 01 Jan 1970 00:00:01 GMT",v);return th()||(_["max-age"]="0"),sv(Re,_)}function m(p,v,_,P){var x={},R=Ve(p||Re),q=at(R,";");if(q!==-1&&(R=Ve(Mu(p,q)),x=Yy(Bt(p,q+1))),We(x,Zd,_||i,Ru,Ye),!K(v)){var A=th();if(Ye(x[jf])){var I=An(),L=I+v*1e3;if(L>0){var O=new Date;O.setTime(L),We(x,jf,ov(O,A?Zg:Yg)||ov(O,A?Zg:Yg)||Re,Ru)}}A||We(x,"max-age",Re+v,null,Ye)}var H=Hn();return H&&H.protocol==="https:"&&(We(x,"secure",null,null,Ye),Lf===null&&(Lf=!oI((rr()||{})[Bd])),Lf&&We(x,"SameSite","None",null,Ye)),We(x,Pf,P||r,null,Ye),sv(R,x)}function d(p){if(l)for(var v=l[he]-1;v>=0;v--)l[v].n===p&&l[Co](v,1)}function h(){Wf(e)&&l&&(ee(l,function(p){rv(n,p.n)||(p.o===0?c(p.n,p.v):p.o===1&&u(p.n,p.v))}),l=[])}t=_n(t||nl,null,e).cfg,o=ct(t,function(p){p.setDf(p.cfg,nI),n=p.ref(p.cfg,"cookieCfg"),r=n[Pf]||"/",i=n[Zd],n.disableCookieDefer?l=null:l===null&&(l=[]);var v=s;s=iv(t,n)!==!1,a=n.getCookie||iI,c=n.setCookie||av,u=n.delCookie||av,!v&&s&&l&&h()},e);var g={isEnabled:function(){var p=iv(t,n)!==!1&&s&&Wf(e),v=nl[ds];return p&&v&&g!==v&&(p=Oc(v)),p},setEnabled:function(p){n[us]=p,Ye(t[tc])||(t[tc]=!p)},set:function(p,v,_,P,x){var R=!1,q=rv(n,p);if(!q){var A=m(v,_,P,x);Oc(g)?(c(p,A),R=!0):l&&(d(p),l[Ee]({n:p,o:0,v:A}),R=!0)}return R},get:function(p){var v=Re,_=Zy(n,p);if(!_){if(Oc(g))v=a(p);else if(l)for(var P=l[he]-1;P>=0;P--){var x=l[P];if(x.n===p){if(x.o===0){var R=x.v,q=at(R,";");v=Ve(q!==-1?Mu(R,q):R)}break}}}return v},del:function(p,v){var _=!1;return Oc(g)?_=g.purge(p,v):l&&(d(p),l[Ee]({n:p,o:1,v:f(v)}),_=!0),_},purge:function(p,v){var _=!1;return Wf(e)&&(u(p,f(v)),_=!0),_},unload:function(p){o&&o.rm(),o=null,l=null}};return g[ds]=g,g}function Wf(t){if($c===null){$c=!1,!Gn&&Lp();try{var e=Gn.v||{};$c=e[jp]!==void 0}catch(n){J(t,2,68,"Cannot access document.cookie - "+$e(n),{exception:te(n)})}}return $c}function Yy(t){var e={};if(t&&t[he]){var n=Ve(t)[mo](";");ee(n,function(r){if(r=Ve(r||Re),r){var i=at(r,"=");i===-1?e[r]=null:e[Ve(Mu(r,i))]=Ve(Bt(r,i+1))}})}return e}function ov(t,e){return pe(t[e])?t[e]():null}function sv(t,e){var n=t||Re;return De(e,function(r,i){n+="; "+r+(K(i)?Re:"="+i)}),n}function iI(t){var e=Re;if(!Gn&&Lp(),Gn.v){var n=Gn.v[jp]||Re;tv!==n&&(nv=Yy(n),tv=n),e=Ve(nv[t]||Re)}return e}function av(t,e){!Gn&&Lp(),Gn.v&&(Gn.v[jp]=t+"="+e)}function oI(t){return de(t)?!!(Dt(t,"CPU iPhone OS 12")||Dt(t,"iPad; CPU OS 12")||Dt(t,"Macintosh; Intel Mac OS X 10_14")&&Dt(t,"Version/")&&Dt(t,"Safari")||Dt(t,"Macintosh; Intel Mac OS X 10_14")&&yy(t,"AppleWebKit/605.1.15 (KHTML, like Gecko)")||Dt(t,"Chrome/5")||Dt(t,"Chrome/6")||Dt(t,"UnrealEngine")&&!Dt(t,"Chrome")||Dt(t,"UCBrowser/12")||Dt(t,"UCBrowser/11")):!1}var sI={perfEvtsSendAll:!1};function aI(t){t.h=null;var e=t.cb;t.cb=[],ee(e,function(n){it(n.fn,[n.arg])})}function Nr(t,e,n,r){ee(t,function(i){i&&i[e]&&(n?(n.cb[Ee]({fn:r,arg:i}),n.h=n.h||yn(aI,0,n)):it(r,[i]))})}var cI=(function(){function t(e){this.listeners=[];var n,r,i=[],o={h:null,cb:[]},s=_n(e,sI);r=s[Yi](function(a){n=!!a.cfg.perfEvtsSendAll}),qe(t,this,function(a){Ae(a,"listeners",{g:function(){return i}}),a[Lu]=function(c){i[Ee](c)},a[ju]=function(c){for(var u=At(i,c);u>-1;)i[Co](u,1),u=At(i,c)},a[iu]=function(c){Nr(i,iu,o,function(u){u[iu](c)})},a[Na]=function(c,u,l){Nr(i,Na,o,function(f){f[Na](c,u,l)})},a[ou]=function(c,u){Nr(i,ou,u?o:null,function(l){l[ou](c,u)})},a[Wi]=function(c){c&&(n||!c[Xd]())&&Nr(i,Wi,null,function(u){c.isAsync?yn(function(){return u[Wi](c)},0):u[Wi](c)})},a[Tf]=function(c){c&&c[he]&&Nr(i,Tf,o,function(u){u[Tf](c)})},a[Ef]=function(c){c&&c[Sn]&&Nr(i,Ef,o,function(u){u[Ef](c)})},a[xf]=function(c,u){if(c>0){var l=u||0;Nr(i,xf,o,function(f){f[xf](c,l)})}},a[go]=function(c){var u=function(){r&&r.rm(),r=null,i=[],o.h&&o.h[Ui](),o.h=null,o.cb=[]},l;if(Nr(i,"unload",null,function(f){var m=f[go](c);m&&(l||(l=[]),l[Ee](m))}),l)return Zn(function(f){return Kt(Xw(l),function(){u(),f()})});u()}})}return t.__ieDyn=1,t})(),ws="ctx",rh="ParentContextKey",$a="ChildrenContextKey",uI=null,uu=(function(){function t(e,n,r){var i=this;if(i.start=An(),i[po]=e,i.isAsync=r,i[Xd]=function(){return!1},pe(n)){var o;Ae(i,"payload",{g:function(){return!o&&pe(n)&&(o=n(),n=null),o}})}i[_s]=function(s){return s?s===t[rh]||s===t[$a]?i[s]:(i[ws]||{})[s]:null},i[jn]=function(s,a){if(s)if(s===t[rh])i[s]||(i[Xd]=function(){return!0}),i[s]=a;else if(s===t[$a])i[s]=a;else{var c=i[ws]=i[ws]||{};c[s]=a}},i.complete=function(){var s=0,a=i[_s](t[$a]);if(Ce(a))for(var c=0;c<a[he];c++){var u=a[c];u&&(s+=u.time)}i.time=An()-i.start,i.exTime=i.time-s,i.complete=function(){}}}return t.ParentContextKey="parent",t.ChildrenContextKey="childEvts",t})(),lI=(function(){function t(e){this.ctx={},qe(t,this,function(n){n.create=function(r,i,o){return new uu(r,i,o)},n.fire=function(r){r&&(r.complete(),e&&pe(e[Wi])&&e[Wi](r))},n[jn]=function(r,i){if(r){var o=n[ws]=n[ws]||{};o[r]=i}},n[_s]=function(r){return(n[ws]||{})[r]}})}return t.__ieDyn=1,t})(),Vf="CoreUtils.doPerf";function rl(t,e,n,r,i){if(t){var o=t;if(o[Bu]&&(o=o[Bu]()),o){var s=void 0,a=o[_s](Vf);try{if(s=o.create(e(),r,i),s){if(a&&s[jn]&&(s[jn](uu[rh],a),a[_s]&&a[jn])){var c=a[_s](uu[$a]);c||(c=[],a[jn](uu[$a],c)),c[Ee](s)}return o[jn](Vf,s),n(s)}}catch(u){s&&s[jn]&&s[jn]("exception",u)}finally{s&&o.fire(s),o[jn](Vf,a)}}}return n()}function fI(){return uI}function ti(){for(var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],e=Re,n,r=0;r<4;r++)n=Za(),e+=t[n&15]+t[n>>4&15]+t[n>>8&15]+t[n>>12&15]+t[n>>16&15]+t[n>>20&15]+t[n>>24&15]+t[n>>28&15];var i=t[8+(Za()&3)|0];return Jr(e,0,8)+Jr(e,9,4)+"4"+Jr(e,13,3)+i+Jr(e,16,3)+Jr(e,19,12)}var ih="00",dI="ff",eb="00000000000000000000000000000000",tb="0000000000000000";function bc(t,e,n){return t&&t[he]===e&&t!==n?!!t.match(/^[\da-f]*$/i):!1}function cv(t,e,n){return bc(t,e)?t:n}function hI(t){(isNaN(t)||t<0||t>255)&&(t=1);for(var e=t.toString(16);e[he]<2;)e="0"+e;return e}function uv(t,e,n,r){return{version:bc(r,2,dI)?r:ih,traceId:Wp(t)?t:ti(),spanId:Vp(e)?e:Mu(ti(),16),traceFlags:n>=0&&n<=255?n:1}}function Wp(t){return bc(t,32,eb)}function Vp(t){return bc(t,16,tb)}function lv(t){if(t){var e=hI(t[Gd]);bc(e,2)||(e="01");var n=t[Hd]||ih;return n!=="00"&&n!=="ff"&&(n=ih),"".concat(n.toLowerCase(),"-").concat(cv(t.traceId,32,eb).toLowerCase(),"-").concat(cv(t.spanId,16,tb).toLowerCase(),"-").concat(e.toLowerCase())}return""}function pI(t){var e=t.getElementsByTagName("script"),n=[];return ee(e,function(r){var i=r[_f]("src");if(i){var o=r[_f]("crossorigin"),s=r.hasAttribute("async")===!0,a=r.hasAttribute("defer")===!0,c=r[_f]("referrerpolicy"),u={url:i};o&&(u.crossOrigin=o),s&&(u.async=s),a&&(u.defer=a),c&&(u.referrerPolicy=c),n[Ee](u)}}),n}var gI=qy("plugin");function io(t){return gI.get(t,"state",{},!0)}function fv(t,e){for(var n=[],r=null,i=t[Xn](),o;i;){var s=i[Xa]();if(s){r&&r[Ja]&&s[Yn]&&r[Ja](s),o=io(s);var a=!!o[qn];s[qn]&&(a=s[qn]()),a||n[Ee](s),r=s,i=i[Xn]()}}ee(n,function(c){var u=t[yt]();c[mc](t.getCfg(),u,e,t[Xn]()),o=io(c),!c[yt]&&!o[yt]&&(o[yt]=u),o[qn]=!0,delete o[pr]})}function qf(t){return t.sort(function(e,n){var r=0;if(n){var i=n[Yn];e[Yn]?r=i?e[Hu]-n[Hu]:1:i&&(r=-1)}else r=e?1:-1;return r})}function vI(t){var e={};return{getName:function(){return e[po]},setName:function(n){e[po]=n},getTraceId:function(){return e.traceId},setTraceId:function(n){Wp(n)&&(e.traceId=n)},getSpanId:function(){return e.spanId},setSpanId:function(n){Vp(n)&&(e.spanId=n)},getTraceFlags:function(){return e[Gd]},setTraceFlags:function(n){e[Gd]=n}}}var mI="TelemetryPluginChain",dv="_hasRun",hv="_getTelCtx",pv=0;function yI(t,e,n){for(;t;){if(t[Xa]()===n)return t;t=t[Xn]()}return yo([n],e.config||{},e)}function qp(t,e,n,r){var i=null,o=[];e||(e=_n({},null,n[ft])),r!==null&&(i=r?yI(t,n,r):t);var s={_next:c,ctx:{core:function(){return n},diagLog:function(){return wo(n,e.cfg)},getCfg:function(){return e.cfg},getExtCfg:l,getConfig:f,hasNext:function(){return!!i},getNext:function(){return i},setNext:function(d){i=d},iterate:m,onComplete:a}};function a(d,h){for(var g=[],p=2;p<arguments.length;p++)g[p-2]=arguments[p];d&&o[Ee]({func:d,self:Ye(h)?s.ctx:h,args:g})}function c(){var d=i;if(i=d?d[Xn]():null,!d){var h=o;h&&h[he]>0&&(ee(h,function(g){try{g.func.call(g.self,g.args)}catch(p){J(n[ft],2,73,"Unexpected Exception during onComplete - "+te(p))}}),o=[])}return d}function u(d,h){var g=null,p=e.cfg;if(p&&d){var v=p[Cs];!v&&h&&(v={}),p[Cs]=v,v=e.ref(p,Cs),v&&(g=v[d],!g&&h&&(g={}),v[d]=g,g=e.ref(v,d))}return g}function l(d,h){var g=u(d,!0);return h&&De(h,function(p,v){if(K(g[p])){var _=e.cfg[p];(_||!K(_))&&(g[p]=_)}Op(e,g,p,v)}),e.setDf(g,h)}function f(d,h,g){g===void 0&&(g=!1);var p,v=u(d,!1),_=e.cfg;return v&&(v[h]||!K(v[h]))?p=v[h]:(_[h]||!K(_[h]))&&(p=_[h]),p||!K(p)?p:g}function m(d){for(var h;h=s._next();){var g=h[Xa]();g&&d(g)}}return s}function zn(t,e,n,r){var i=_n(e),o=qp(t,i,n,r),s=o.ctx;function a(u){var l=o._next();return l&&l[Yn](u,s),!l}function c(u,l){return u===void 0&&(u=null),Ce(u)&&(u=yo(u,i.cfg,n,l)),zn(u||s[Xn](),i.cfg,n,l)}return s[Nt]=a,s[vo]=c,s}function il(t,e,n){var r=_n(e.config),i=qp(t,r,e,n),o=i.ctx;function s(c){var u=i._next();return u&&u[go](o,c),!u}function a(c,u){return c===void 0&&(c=null),Ce(c)&&(c=yo(c,r.cfg,e,u)),il(c||o[Xn](),e,u)}return o[Nt]=s,o[vo]=a,o}function Hp(t,e,n){var r=_n(e.config),i=qp(t,r,e,n),o=i.ctx;function s(c){return o.iterate(function(u){pe(u[Ga])&&u[Ga](o,c)})}function a(c,u){return c===void 0&&(c=null),Ce(c)&&(c=yo(c,r.cfg,e,u)),Hp(c||o[Xn](),e,u)}return o[Nt]=s,o[vo]=a,o}function yo(t,e,n,r){var i=null,o=!r;if(Ce(t)&&t[he]>0){var s=null;ee(t,function(a){if(!o&&r===a&&(o=!0),o&&a&&pe(a[Yn])){var c=bI(a,e,n);i||(i=c),s&&s._setNext(c),s=c}})}return r&&!i?yo([r],e,n):i}function bI(t,e,n){var r=null,i=pe(t[Yn]),o=pe(t[Ja]),s;t?s=t[Qr]+"-"+t[Hu]+"-"+pv++:s="Unknown-0-"+pv++;var a={getPlugin:function(){return t},getNext:function(){return r},processTelemetry:l,unload:f,update:m,_id:s,_setNext:function(d){r=d}};function c(){var d;return t&&pe(t[hv])&&(d=t[hv]()),d||(d=zn(a,e,n)),d}function u(d,h,g,p,v){var _=!1,P=t?t[Qr]:mI,x=d[dv];return x||(x=d[dv]={}),d.setNext(r),t&&rl(d[yt](),function(){return P+":"+g},function(){x[s]=!0;try{var R=r?r._id:Re;R&&(x[R]=!1),_=h(d)}catch(A){var q=r?x[r._id]:!0;q&&(_=!0),(!r||!q)&&J(d[Sr](),1,73,"Plugin ["+P+"] failed during "+g+" - "+te(A)+", run flags: "+te(x))}},p,v),_}function l(d,h){h=h||c();function g(p){if(!t||!i)return!1;var v=io(t);return v[pr]||v[Qd]?!1:(o&&t[Ja](r),t[Yn](d,p),!0)}u(h,g,"processTelemetry",function(){return{item:d}},!d.sync)||h[Nt](d)}function f(d,h){function g(){var p=!1;if(t){var v=io(t),_=t[yt]||v[yt];t&&(!_||_===d.core())&&!v[pr]&&(v[yt]=null,v[pr]=!0,v[qn]=!1,t[pr]&&t[pr](d,h)===!0&&(p=!0))}return p}u(d,g,"unload",function(){},h.isAsync)||d[Nt](h)}function m(d,h){function g(){var p=!1;if(t){var v=io(t),_=t[yt]||v[yt];t&&(!_||_===d.core())&&!v[pr]&&t[Ga]&&t[Ga](d,h)===!0&&(p=!0)}return p}u(d,g,"update",function(){},!1)||d[Nt](h)}return Rn(a)}function nb(){var t=[];function e(r){r&&t[Ee](r)}function n(r,i){ee(t,function(o){try{o(r,i)}catch(s){J(r[Sr](),2,73,"Unexpected error calling unload handler - "+te(s))}}),t=[]}return{add:e,run:n}}function rb(){var t=[];function e(r){var i=t;t=[],ee(i,function(o){try{(o.rm||o.remove).call(o)}catch(s){J(r,2,73,"Unloading:"+te(s))}})}function n(r){r&&cs(t,r)}return{run:e,add:n}}var Hf,$r="getPlugin",_I=(Hf={},Hf[Cs]={isVal:no,v:{}},Hf),So=(function(){function t(){var e=this,n,r,i,o,s;u(),qe(t,e,function(l){l[mc]=function(f,m,d,h){c(f,m,h),n=!0},l[pr]=function(f,m){var d=l[yt];if(!d||f&&d!==f[yt]())return;var h,g=!1,p=f||il(null,d,i&&i[$r]?i[$r]():i),v=m||{reason:0,isAsync:!1};function _(){g||(g=!0,o.run(p,m),s.run(p[Sr]()),h===!0&&p[Nt](v),u())}return!l[Vu]||l[Vu](p,v,_)!==!0?_():h=!0,h},l[Ga]=function(f,m){var d=l[yt];if(!d||f&&d!==f[yt]())return;var h,g=!1,p=f||Hp(null,d,i&&i[$r]?i[$r]():i),v=m||{reason:0};function _(){g||(g=!0,c(p.getCfg(),p.core(),p[Xn]()))}return!l._doUpdate||l._doUpdate(p,v,_)!==!0?_():h=!0,h},Xu(l,"_addUnloadCb",function(){return o},"add"),Xu(l,"_addHook",function(){return s},"add"),Ae(l,"_unloadHooks",{g:function(){return s}})}),e[Sr]=function(l){return a(l)[Sr]()},e[qn]=function(){return n},e.setInitialized=function(l){n=l},e[Ja]=function(l){i=l},e[Nt]=function(l,f){f?f[Nt](l):i&&pe(i[Yn])&&i[Yn](l,null)},e._getTelCtx=a;function a(l){l===void 0&&(l=null);var f=l;if(!f){var m=r||zn(null,{},e[yt]);i&&i[$r]?f=m[vo](null,i[$r]):f=m[vo](null,i)}return f}function c(l,f,m){_n(l,_I,wo(f)),!m&&f&&(m=f[wy]()[Xn]());var d=i;i&&i[$r]&&(d=i[$r]()),e[yt]=f,r=zn(m,l,f,d)}function u(){n=!1,e[yt]=null,r=null,i=null,s=rb(),o=nb()}}return t.__ieDyn=1,t})();function CI(t,e,n){var r={id:e,fn:n};cs(t,r);var i={remove:function(){ee(t,function(o,s){if(o.id===r.id)return t[Co](s,1),-1})}};return i}function wI(t,e,n){for(var r=!1,i=t[he],o=0;o<i;++o){var s=t[o];if(s)try{if(s.fn[ho](null,[e])===!1){r=!0;break}}catch(a){J(n,2,64,"Telemetry initializer failed: "+$e(a),{exception:te(a)},!0)}}return!r}var SI=(function(t){ir(e,t);function e(){var n=t.call(this)||this;n.identifier="TelemetryInitializerPlugin",n.priority=199;var r,i;o(),qe(e,n,function(s,a){s.addTelemetryInitializer=function(c){return CI(i,r++,c)},s[Yn]=function(c,u){wI(i,c,u?u[Sr]():s[Sr]())&&s[Nt](c,u)},s[Vu]=function(){o()}});function o(){r=0,i=[]}return n}return e.__ieDyn=1,e})(So),Or,ib="Plugins must provide initialize method",II="_notificationManager",gv="SDK is still unloading...",kI="SDK is not initialized",TI=100,EI=5e4,Bf=Ws((Or={cookieCfg:{}},Or[Go]={rdOnly:!0,ref:!0,v:[]},Or[Xo]={rdOnly:!0,ref:!0,v:[]},Or[Cs]={ref:!0,v:{}},Or[Jd]=Wn,Or.loggingLevelConsole=0,Or.diagnosticLogInterval=Wn,Or));function xI(t,e){return new lI(e)}function PI(t,e,n){var r=[],i=[],o={};return ee(n,function(s){(K(s)||K(s[mc]))&&Yt(ib);var a=s[Hu],c=s[Qr];s&&a&&(K(o[a])?o[a]=c:ro(t,"Two extensions have same priority #"+a+" - "+o[a]+", "+c)),!a||a<e?r[Ee](s):i[Ee](s)}),{core:r,channels:i}}function vv(t,e){var n=!1;return ee(e,function(r){if(r===t)return n=!0,-1}),n}function oh(t,e,n,r){n&&De(n,function(i,o){r&&Ot(o)&&Ot(e[i])&&oh(t,e[i],o,r),r&&Ot(o)&&Ot(e[i])?oh(t,e[i],o,r):t.set(e,i,o)})}function mv(t,e){var n=null,r=-1;return ee(t,function(i,o){if(i.w===e)return n=i,r=o,-1}),{i:r,l:n}}function DI(t,e){var n=mv(t,e).l;return n||(n={w:e,rm:function(){var r=mv(t,e);r.i!==-1&&t[Co](r.i,1)}},t[Ee](n)),n}function RI(t,e,n){ee(e,function(r){var i=ct(t,r.w,n);delete r.w,r.rm=function(){i.rm()}})}function AI(t,e,n,r){return e.add(t[Yi](function(i){var o=i.cfg.disableDbgExt;o===!0&&r&&(n[ju](r),r=null),n&&!r&&o!==!0&&(r=GS(i.cfg),n[Lu](r))})),r}function MI(t){return Ae({rm:function(){t.rm()}},"toJSON",{v:function(){return"aicore::onCfgChange<"+JSON.stringify(t)+">"}})}var zI=(function(){function t(){var e,n,r,i,o,s,a,c,u,l,f,m,d,h,g,p,v,_,P,x,R,q,A,I,L,O,H,ne,se,b,E,B,M;qe(t,this,function(D){U(),D._getDbgPlgTargets=function(){return[A,i]},D[qn]=function(){return n},D.activeStatus=function(){return O},D._setPendingStatus=function(){O=3},D[mc]=function($,Z,ue,re){d&&Yt(gv),D[qn]()&&Yt("Core cannot be initialized more than once"),e=_n($,Bf,ue||D[ft],!1),$=e.cfg,un(e[Yi](function(W){var j=W.cfg;ne=j.initInMemoMaxSize||TI,ce(j);var X=W.ref(W.cfg,Cs);De(X,function(ie){W.ref(X,ie)})})),o=re,P=AI(e,_,o&&D[Ac](),P),je(),D[ft]=ue;var S=$[Go];if(l=[],l[Ee].apply(l,zg(zg([],Z,!1),S)),f=$[Xo],Y(null),(!m||m[he]===0)&&Yt("No "+Xo+" available"),f&&f[he]>1){var z=D[Xa]("TeeChannelController");(!z||!z.plugin)&&J(r,1,28,"TeeChannel required")}RI($,q,r),q=null,n=!0,O===Kr.ACTIVE&&V()},D.getChannels=function(){var $=[];return m&&ee(m,function(Z){$[Ee](Z)}),Rn($)},D.track=function($){rl(D[Bu](),function(){return"AppInsightsCore:track"},function(){$===null&&(or($),Yt("Invalid telemetry item")),!$[po]&&K($[po])&&(or($),Yt("telemetry name required")),$.iKey=$.iKey||R,$.time=$.time||Ns(new Date),$.ver=$.ver||"4.0",!d&&D[qn]()&&O===Kr.ACTIVE?G()[Nt]($):O!==Kr.INACTIVE&&i[he]<=ne&&i[Ee]($)},function(){return{item:$}},!$.sync)},D[wy]=G,D[Ac]=function(){return o||(o=new cI(e.cfg),D[II]=o),o},D[Lu]=function($){D.getNotifyMgr()[Lu]($)},D[ju]=function($){o&&o[ju]($)},D.getCookieMgr=function(){return c||(c=cu(e.cfg,D[ft])),c},D.setCookieMgr=function($){c!==$&&(fs(c,!1),c=$)},D[Bu]=function(){return s||a||fI()},D.setPerfMgr=function($){s=$},D.eventCnt=function(){return i[he]},D.releaseQueue=function(){if(n&&i[he]>0){var $=i;i=[],O===2?ee($,function(Z){Z.iKey=Z.iKey||R,G()[Nt](Z)}):J(r,2,20,"core init status is not active")}},D.pollInternalLogs=function($){return g=$||null,M=!1,E&&E[Ui](),C(!0)};function ce($){var Z=$.instrumentationKey,ue=$.endpointUrl;if(O!==3){if(K(Z)){R=null,O=Kr.INACTIVE;var re="Please provide instrumentation key";n?(J(r,1,100,re),V()):Yt(re);return}var S=[];fi(Z)?(S[Ee](Z),R=null):R=Z,fi(ue)?(S[Ee](ue),H=null):H=ue,S[he]?me($,S):oe()}}function me($,Z){se=!1,O=3;var ue=no($.initTimeOut)?$.initTimeOut:EI,re=Kw(Z);b&&b[Ui](),b=yn(function(){b=null,se||oe()},ue),Kt(re,function(S){try{if(se)return;if(!S.rejected){var z=S[Li];if(z&&z[he]){var W=z[0];if(R=W&&W[Li],z[he]>1){var j=z[1];H=j&&j[Li]}}R&&($.instrumentationKey=R,$.endpointUrl=H)}oe()}catch{se||oe()}})}function oe(){se=!0,K(R)?(O=Kr.INACTIVE,J(r,1,112,"ikey can't be resolved from promises")):O=Kr.ACTIVE,V()}function V(){n&&(D.releaseQueue(),D.pollInternalLogs())}function C($){if((!E||!E[us])&&!M){var Z=$||r&&r.queue[he]>0;Z&&(B||(B=!0,un(e[Yi](function(ue){var re=ue.cfg.diagnosticLogInterval;(!re||!(re>0))&&(re=1e4);var S=!1;E&&(S=E[us],E[Ui]()),E=Ew(Ne,re),E.unref(),E[us]=S}))),E[us]=!0)}return E}D[Fg]=function(){M=!0,E&&E[Ui](),Ne()},ls(D,function(){return h},["addTelemetryInitializer"]),D[go]=function($,Z,ue){$===void 0&&($=!0),n||Yt(kI),d&&Yt(gv);var re={reason:50,isAsync:$,flushComplete:!1},S;$&&!Z&&(S=Zn(function(j){Z=j}));var z=il(ke(),D);z[Mc](function(){_.run(D[ft]),Gy([c,o,r],$,function(){U(),Z&&Z(re)})},D);function W(j){re.flushComplete=j,d=!0,v.run(z,re),D[Fg](),z[Nt](re)}return Ne(),Et($,W,6,ue),S},D[Xa]=_e,D.addPlugin=function($,Z,ue,re){if(!$){re&&re(!1),xt(ib);return}var S=_e($[Qr]);if(S&&!Z){re&&re(!1),xt("Plugin ["+$[Qr]+"] is already loaded!");return}var z={reason:16};function W(ie){l[Ee]($),z.added=[$],Y(z),re&&re(!0)}if(S){var j=[S.plugin],X={reason:2,isAsync:!!ue};Te(j,X,function(ie){ie?(z.removed=j,z.reason|=32,W()):re&&re(!1)})}else W()},D.updateCfg=function($,Z){Z===void 0&&(Z=!0);var ue;if(D[qn]()){ue={reason:1,cfg:e.cfg,oldCfg:Mg({},e.cfg),newConfig:Mg({},$),merge:Z},$=ue.newConfig;var re=e.cfg;$[Go]=re[Go],$[Xo]=re[Xo]}e._block(function(S){var z=S.cfg;oh(S,z,$,Z),Z||De(z,function(W){ii($,W)||S.set(z,W,Wn)}),S.setDf(z,Bf)},!0),e.notify(),ue&&Le(ue)},D.evtNamespace=function(){return p},D.flush=Et,D.getTraceCtx=function($){return x||(x=vI()),x},D.setTraceCtx=function($){x=$||null},D.addUnloadHook=un,Xu(D,"addUnloadCb",function(){return v},"add"),D.onCfgChange=function($){var Z;return n?Z=ct(e.cfg,$,D[ft]):Z=DI(q,$),MI(Z)},D.getWParam=function(){return sy()||e.cfg.enableWParam?0:-1};function y(){var $={};I=[];var Z=function(ue){ue&&ee(ue,function(re){if(re[Qr]&&re[Hd]&&!$[re.identifier]){var S=re[Qr]+"="+re[Hd];I[Ee](S),$[re.identifier]=re}})};Z(m),f&&ee(f,function(ue){Z(ue)}),Z(l)}function U(){n=!1,e=_n({},Bf,D[ft]),e.cfg[Sy]=1,Ae(D,"config",{g:function(){return e.cfg},s:function(Z){D.updateCfg(Z,!1)}}),Ae(D,"pluginVersionStringArr",{g:function(){return I||y(),I}}),Ae(D,"pluginVersionString",{g:function(){return L||(I||y(),L=I.join(";")),L||Re}}),Ae(D,"logger",{g:function(){return r||(r=new tl(e.cfg),e[ft]=r),r},s:function(Z){e[ft]=Z,r!==Z&&(fs(r,!1),r=Z)}}),D[ft]=new tl(e.cfg),A=[];var $=D.config[Go]||[];$.splice(0,$[he]),cs($,A),h=new SI,i=[],fs(o,!1),o=null,s=null,a=null,fs(c,!1),c=null,u=null,l=[],f=null,m=null,d=!1,g=null,p=bn("AIBaseCore",!0),v=nb(),x=null,R=null,_=rb(),q=[],L=null,I=null,M=!1,E=null,B=!1,O=0,H=null,ne=null,se=!1,b=null}function G(){var $=zn(ke(),e.cfg,D);return $[Mc](C),$}function Y($){var Z=PI(D[ft],qS,l);u=null,L=null,I=null,m=(f||[])[0]||[],m=qf(cs(m,Z[Xo]));var ue=cs(qf(Z[yt]),m);A=Rn(ue);var re=D.config[Go]||[];re.splice(0,re[he]),cs(re,A);var S=G();m&&m[he]>0&&fv(S[vo](m),ue),fv(S,ue),$&&Le($)}function _e($){var Z=null,ue=null,re=[];return ee(A,function(S){if(S[Qr]===$&&S!==h)return ue=S,-1;S.getChannel&&re[Ee](S)}),!ue&&re[he]>0&&ee(re,function(S){if(ue=S.getChannel($),!ue)return-1}),ue&&(Z={plugin:ue,setEnabled:function(S){io(ue)[Qd]=!S},isEnabled:function(){var S=io(ue);return!S[pr]&&!S[Qd]},remove:function(S,z){S===void 0&&(S=!0);var W=[ue],j={reason:1,isAsync:S};Te(W,j,function(X){X&&Y({reason:32,removed:W}),z&&z(X)})}}),Z}function ke(){if(!u){var $=(A||[]).slice();At($,h)===-1&&$[Ee](h),u=yo(qf($),e.cfg,D)}return u}function Te($,Z,ue){if($&&$[he]>0){var re=yo($,e.cfg,D),S=il(re,D);S[Mc](function(){var z=!1,W=[];ee(l,function(X,ie){vv(X,$)?z=!0:W[Ee](X)}),l=W,L=null,I=null;var j=[];f&&(ee(f,function(X,ie){var fe=[];ee(X,function(Ie){vv(Ie,$)?z=!0:fe[Ee](Ie)}),j[Ee](fe)}),f=j),ue&&ue(z),C()}),S[Nt](Z)}else ue(!1)}function Ne(){if(r&&r.queue){var $=r.queue.slice(0);r.queue[he]=0,ee($,function(Z){var ue={name:g||"InternalMessageId: "+Z[Wu],iKey:R,time:Ns(new Date),baseType:ec.dataType,baseData:{message:Z[eo]}};D.track(ue)})}}function Et($,Z,ue,re){var S=1,z=!1,W=null;re=re||5e3;function j(){S--,z&&S===0&&(W&&W[Ui](),W=null,Z&&Z(z),Z=null)}if(m&&m[he]>0){var X=G()[vo](m);X.iterate(function(ie){if(ie.flush){S++;var fe=!1;ie.flush($,function(){fe=!0,j()},ue)||fe||($&&W==null?W=yn(function(){W=null,j()},re):j())}})}return z=!0,j(),!0}function je(){var $;un(e[Yi](function(Z){var ue=Z.cfg.enablePerfMgr;if(ue){var re=Z.cfg[Jd];($!==re||!$)&&(re||(re=xI),zt(Z.cfg,Jd,re),$=re,a=null),!s&&!a&&pe(re)&&(a=re(D,D[Ac]()))}else a=null,$=null}))}function Le($){var Z=Hp(ke(),D);Z[Mc](C),(!D._updateHook||D._updateHook(Z,$)!==!0)&&Z[Nt]($)}function xt($){var Z=D[ft];Z?(J(Z,2,73,$),C()):Yt($)}function or($){var Z=D[Ac]();Z&&Z[Na]([$],2)}function un($){_.add($)}})}return t.__ieDyn=1,t})();function Kf(t,e){try{if(t&&t!==""){var n=Mn().parse(t);if(n&&n[Wg]&&n[Wg]>=n.itemsAccepted&&n.itemsReceived-n.itemsAccepted===n.errors[he])return n}}catch(r){J(e,1,43,"Cannot parse the response. "+(r[po]||te(r)),{response:t})}return null}var wn="",UI="NoResponseBody",yv="&"+UI+"=true",Xf="POST",NI=(function(){function t(){var e=0,n,r,i,o,s,a,c,u,l,f,m,d,h,g;qe(t,this,function(p,v){var _=!0;se(),p[mc]=function(b,E){i=E,r&&J(i,1,28,"Sender is already initialized"),p.SetConfig(b),r=!0},p._getDbgPlgTargets=function(){return[r,o,a,n]},p.SetConfig=function(b){try{if(s=b.senderOnCompleteCallBack||{},a=!!b.disableCredentials,c=b.fetchCredentials,o=!!b.isOneDs,n=!!b.enableSendPromise,l=!!b.disableXhr,f=!!b.disableBeacon,m=!!b.disableBeaconSync,g=b.timeWrapper,h=!!b.addNoResponse,d=!!b.disableFetchKeepAlive,u={sendPOST:O},o||(_=!1),a){var E=Hn();E&&E.protocol&&E.protocol[Us]()==="file:"&&(_=!1)}return!0}catch{}return!1},p.getSyncFetchPayload=function(){return e},p.getSenderInst=function(b,E){return b&&b[he]?q(b,E):null},p.getFallbackInst=function(){return u},p[Vu]=function(b,E){se()},p.preparePayload=function(b,E,B,M){if(!E||M||!B[Sn]){b(B);return}try{var D=nt("CompressionStream");if(!pe(D)){b(B);return}var ce=new ReadableStream({start:function(U){U.enqueue(de(B[Sn])?new TextEncoder().encode(B[Sn]):B[Sn]),U.close()}}),me=ce.pipeThrough(new D("gzip")),oe=me.getReader(),V=[],C=0,y=!1;return Kt(oe.read(),function U(G){if(!y&&!G.rejected){var Y=G[Li];if(!Y.done)return V[Ee](Y[Li]),C+=Y.value[he],Kt(oe.read(),U);for(var _e=new Uint8Array(C),ke=0,Te=0,Ne=V;Te<Ne.length;Te++){var Et=Ne[Te];_e.set(Et,ke),ke+=Et[he]}B[Sn]=_e,B[zc]["Content-Encoding"]="gzip",B._chunkCount=V[he]}y||(y=!0,b(B))}),oe}catch{b(B);return}};function P(b,E){A(E,200,{},b)}function x(b,E){J(i,2,26,"Failed to send telemetry.",{message:b}),A(E,400,{})}function R(b){x("No endpoint url is provided for the batch",b)}function q(b,E){for(var B=0,M=null,D=0;M==null&&D<b[he];)B=b[D],!l&&B===1?CS()?M=ne:Vl()&&(M=O):B===2&&Np(E)&&(!E||!d)?M=H:B===3&&ma()&&(E?!m:!f)&&(M=L),D++;return M?{_transport:B,_isSync:E,sendPOST:M}:null}function A(b,E,B,M){try{b&&b(E,B,M)}catch{}}function I(b,E){var B=rr(),M=b[Gs];if(!M)return R(E),!0;M=b[Gs]+(h?yv:wn);var D=b[Sn],ce=o?D:new Blob([D],{type:"text/plain;charset=UTF-8"}),me=B.sendBeacon(M,ce);return me}function L(b,E,B){var M=b[Sn];try{if(M)if(I(b,E))P(wn,E);else{var D=s&&s.beaconOnRetry;D&&pe(D)?D(b,E,I):(u&&u.sendPOST(b,E,!0),J(i,2,40,". Failed to send telemetry with Beacon API, retried with normal sender."))}}catch(ce){o&&ro(i,"Failed to send telemetry using sendBeacon API. Ex:"+te(ce)),A(E,o?0:400,{},wn)}}function O(b,E,B){var M,D,ce,me=b[zc]||{};!B&&n&&(M=Zn(function(y,U){D=y,ce=U})),o&&B&&b.disableXhrSync&&(B=!1);var oe=b[Gs];if(!oe){R(E),D&&D(!1);return}var V=sS(Xf,oe,_,!0,B,b[zo]);o||V.setRequestHeader("Content-type","application/json"),ee(wr(me),function(y){V.setRequestHeader(y,me[y])}),V.onreadystatechange=function(){o||(C(V),V.readyState===4&&D&&D(!0))},V.onload=function(){o&&C(V)};function C(y){var U=s&&s.xhrOnComplete,G=U&&pe(U);if(G)U(y,E,b);else{var Y=Gu(y);A(E,y[dr],Rf(y,o),Y)}}return V.onerror=function(y){A(E,o?V[dr]:400,Rf(V,o),o?wn:Ju(V)),ce&&ce(y)},V.ontimeout=function(){A(E,o?V[dr]:500,Rf(V,o),o?wn:Ju(V)),D&&D(!1)},V.send(b[Sn]),M}function H(b,E,B){var M,D=b[Gs],ce=b[Sn],me=o?ce:new Blob([ce],{type:"application/json"}),oe,V,C,y=new Headers,U=ce[he],G=!1,Y=!1,_e=b[zc]||{},ke=(M={method:Xf,body:me},M[Gg]=!0,M);b.headers&&wr(b.headers)[he]>0&&(ee(wr(_e),function(je){y.append(je,_e[je])}),ke[zc]=y),c?ke.credentials=c:_&&o&&(ke.credentials="include"),B&&(ke.keepalive=!0,e+=U,o?b._sendReason===2&&(G=!0,h&&(D+=yv)):G=!0);var Te=new Request(D,ke);try{Te[Gg]=!0}catch{}if(!B&&n&&(oe=Zn(function(je,Le){V=je,C=Le})),!D){R(E),V&&V(!1);return}function Ne(je,Le){Le?A(E,o?0:Le,{},o?wn:je):A(E,o?0:400,{},o?wn:je)}function Et(je,Le,xt){var or=je[dr],un=s.fetchOnComplete;un&&pe(un)?un(je,E,xt||wn,Le):A(E,or,{},xt||wn)}try{Kt(fetch(o?D:Te,o?ke:null),function(je){if(B&&(e-=U,U=0),!Y)if(Y=!0,je.rejected)Ne(je.reason&&je.reason[eo],499),C&&C(je.reason);else{var Le=je[Li];try{!o&&!Le.ok?(Le[dr]?Ne(Le.statusText,Le[dr]):Ne(Le.statusText,499),V&&V(!1)):o&&!Le.body?(Et(Le,null,wn),V&&V(!0)):Kt(Le.text(),function(xt){Et(Le,b,xt[Li]),V&&V(!0)})}catch(xt){Le&&Le[dr]?Ne(te(xt),Le[dr]):Ne(te(xt),499),C&&C(xt)}}})}catch(je){Y||(Ne(te(je),499),C&&C(je))}return G&&!Y&&(Y=!0,A(E,200,{}),V&&V(!0)),o&&!Y&&b[zo]>0&&g&&g.set(function(){Y||(Y=!0,A(E,500,{}),V&&V(!0))},b[zo]),oe}function ne(b,E,B){var M=cn(),D=new XDomainRequest,ce=b[Sn];D.onload=function(){var y=Gu(D),U=s&&s.xdrOnComplete;U&&pe(U)?U(D,E,b):A(E,200,{},y)},D.onerror=function(){A(E,400,{},o?wn:My(D))},D.ontimeout=function(){A(E,500,{})},D.onprogress=function(){};var me=M&&M.location&&M.location.protocol||"",oe=b[Gs];if(!oe){R(E);return}if(!o&&oe.lastIndexOf(me,0)!==0){var V="Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol.";J(i,2,40,". "+V),x(V,E);return}var C=o?oe:oe[to](/^(https?:)/,"");D.open(Xf,C),b[zo]&&(D[zo]=b[zo]),D.send(ce),o&&B?g&&g.set(function(){D.send(ce)},0):D.send(ce)}function se(){e=0,r=!1,n=!1,i=null,o=null,s=null,a=null,c=null,u=null,l=!1,f=!1,m=!1,d=!1,h=!1,g=null}})}return t.__ieDyn=1,t})(),ob="on",bv="attachEvent",_v="addEventListener",Cv="detachEvent",wv="removeEventListener",sh="events",ah="visibilitychange",Bl="pagehide",sb="unload",ab="beforeunload",cb=bn("aiEvtPageHide");bn("aiEvtPageShow");var $I=/\.[\.]+/g,OI=/[\.]+$/,FI=1,ol=qy("events"),jI=/^([^.]*)(?:\.(.+)|)/;function Sv(t){return t&&t[to]?t[to](/^[\s\.]+|(?=[\s\.])[\.\s]+$/g,Re):t}function Bp(t,e){if(e){var n=Re;Ce(e)?(n=Re,ee(e,function(i){i=Sv(i),i&&(i[0]!=="."&&(i="."+i),n+=i)})):n=Sv(e),n&&(n[0]!=="."&&(n="."+n),t=(t||Re)+n)}var r=jI.exec(t||Re)||[];return{type:r[1],ns:(r[2]||Re).replace($I,".").replace(OI,Re)[mo](".").sort().join(".")}}function ub(t,e,n){n===void 0&&(n=!0);var r=ol.get(t,sh,{},n),i=r[e];return i||(i=r[e]=[]),i}function lb(t,e,n,r){t&&e&&e[oi]&&(t[wv]?t[wv](e[oi],n,r):t[Cv]&&t[Cv](ob+e[oi],n))}function LI(t,e,n,r){var i=!1;return t&&e&&e[oi]&&n&&(t[_v]?(t[_v](e[oi],n,r),i=!0):t[bv]&&(t[bv](ob+e[oi],n),i=!0)),i}function Iv(t,e,n,r){for(var i=e[he];i--;){var o=e[i];o&&(!n.ns||n.ns===o[jg].ns)&&(!r||r(o))&&(lb(t,o[jg],o.handler,o.capture),e[Co](i,1))}}function WI(t,e,n){if(e[oi])Iv(t,ub(t,e[oi]),e,n);else{var r=ol.get(t,sh,{});De(r,function(i,o){Iv(t,o,e,n)}),wr(r)[he]===0&&ol.kill(t,sh)}}function gi(t,e){var n;return e?(Ce(e)?n=[t].concat(e):n=[t,e],n=Bp("xx",n).ns[mo](".")):n=t,n}function Ir(t,e,n,r,i){i===void 0&&(i=!1);var o=!1;if(t)try{var s=Bp(e,r);if(o=LI(t,s,n,i),o&&ol.accept(t)){var a={guid:FI++,evtName:s,handler:n,capture:i};ub(t,s.type)[Ee](a)}}catch{}return o}function Ss(t,e,n,r,i){if(i===void 0&&(i=!1),t)try{var o=Bp(e,r),s=!1;WI(t,o,function(a){return o.ns&&!n||a.handler===n?(s=!0,!0):!1}),s||lb(t,o,n,i)}catch{}}function VI(t,e,n){var r=!1,i=cn();i&&(r=Ir(i,t,e,n),r=Ir(i.body,t,e,n)||r);var o=kt();return o&&(r=Ir(o,t,e,n)||r),r}function qI(t,e,n){var r=cn();r&&(Ss(r,t,e,n),Ss(r.body,t,e,n));var i=kt();i&&Ss(i,t,e,n)}function sl(t,e,n,r){var i=!1;return e&&t&&t[he]>0&&ee(t,function(o){o&&(!n||At(n,o)===-1)&&(i=VI(o,e,r)||i)}),i}function HI(t,e,n,r){var i=!1;return e&&t&&Ce(t)&&(i=sl(t,e,n,r),!i&&n&&n[he]>0&&(i=sl(t,e,null,r))),i}function ch(t,e,n){t&&Ce(t)&&ee(t,function(r){r&&qI(r,e,n)})}function BI(t,e,n){return HI([ab,sb,Bl],t,e,n)}function KI(t,e){ch([ab,sb,Bl],t,e)}function uh(t,e,n){function r(s){var a=kt();t&&a&&a.visibilityState==="hidden"&&t(s)}var i=gi(cb,n),o=sl([Bl],t,e,i);return(!e||At(e,ah)===-1)&&(o=sl([ah],r,e,i)||o),!o&&e&&(o=uh(t,null,n)),o}function XI(t,e){var n=gi(cb,e);ch([Bl],t,n),ch([ah],null,n)}var kv="_aiHooks",Tv=["req","rsp","hkErr","fnErr"];function Kp(t,e){if(t)for(var n=0;n<t[he]&&!e(t[n],n);n++);}function Gf(t,e,n,r,i){i>=0&&i<=2&&Kp(t,function(o,s){var a=o.cbks,c=a[Tv[i]];if(c){e.ctx=function(){var f=r[s]=r[s]||{};return f};try{c[ho](e.inst,n)}catch(f){var u=e.err;try{var l=a[Tv[2]];l&&(e.err=f,l[ho](e.inst,n))}catch{}finally{e.err=u}}}})}function GI(t){return function(){var e=this,n=arguments,r=t.h,i={name:t.n,inst:e,ctx:null,set:c},o=[],s=a([i],n);i.evt=nt("event");function a(l,f){return Kp(f,function(m){l[Ee](m)}),l}function c(l,f){n=a([],n),n[l]=f,s=a([i],n)}Gf(r,i,s,o,0);var u=t.f;if(u)try{i.rslt=u[ho](e,n)}catch(l){throw i.err=l,Gf(r,i,s,o,3),l}return Gf(r,i,s,o,1),i.rslt}}function Xp(t,e,n,r){var i=null;return t&&(mn(t,e)?i=t:n&&(i=Xp(tS(t),e,r,!1))),i}function JI(t,e,n){return t?lh(t[Kn],e,n,!1):null}function fb(t,e,n,r){var i=n&&n[kv];if(!i){i={i:0,n:e,f:n,h:[]};var o=GI(i);o[kv]=i,t[e]=o}var s={id:i.i,cbks:r,rm:function(){var a=this.id;Kp(i.h,function(c,u){if(c.id===a)return i.h[Co](u,1),1})}};return i.i++,i.h[Ee](s),s}function lh(t,e,n,r,i){if(r===void 0&&(r=!0),t&&e&&n){var o=Xp(t,e,r,i);if(o){var s=o[e];if(typeof s===Hm)return fb(o,e,s,n)}}return null}function Fc(t,e,n,r,i){if(t&&e&&n){var o=Xp(t,e,r,i)||t;if(o)return fb(o,e,o[e],n)}return null}var Vi="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",db="sampleRate",Jf="ProcessLegacy",Ev="http.method",Gp="https://dc.services.visualstudio.com",Is="/v2/track",er="not_specified",Qf="iKey",Fe=Nw({requestContextHeader:[0,"Request-Context"],requestContextTargetKey:[1,"appId"],requestContextAppIdFormat:[2,"appId=cid-v1:"],requestIdHeader:[3,"Request-Id"],traceParentHeader:[4,"traceparent"],traceStateHeader:[5,"tracestate"],sdkContextHeader:[6,"Sdk-Context"],sdkContextHeaderAppIdRequest:[7,"appId"],requestContextHeaderLowerCase:[8,"request-context"]}),$s="split",be="length",nc="toLowerCase",bi="ingestionendpoint",rc="toString",Jp="removeItem",_c="message",Jo="count",Zf="preTriggerDate",Yf="getUTCDate",al="stringify",ed="pathname",ic="match",xv="correlationHeaderExcludePatterns",tr="name",Bn="properties",kr="measurements",lu="sizeInBytes",fu="typeName",Zs="exceptions",_a="severityLevel",td="problemGroup",ks="parsedStack",cl="hasFullStack",ul="assembly",Tr="fileName",Os="line",Kl="aiDataContract",ll="duration";function hb(t,e,n){var r=e[be],i=QI(t,e);if(i[be]!==r){for(var o=0,s=i;n[s]!==void 0;)o++,s=Bt(i,0,147)+ek(o);i=s}return i}function QI(t,e){var n;return e&&(e=Ve($t(e)),e[be]>150&&(n=Bt(e,0,150),J(t,2,57,"name is too long. It has been truncated to 150 characters.",{name:e},!0))),n||e}function gt(t,e,n){n===void 0&&(n=1024);var r;return e&&(n=n||1024,e=Ve($t(e)),e[be]>n&&(r=Bt(e,0,n),J(t,2,61,"string value is too long. It has been truncated to "+n+" characters.",{value:e},!0))),r||e}function Xl(t,e,n){return de(e)&&(e=mr(e,n)),gb(t,e,2048,66)}function pb(t,e){var n;return e&&e[be]>32768&&(n=Bt(e,0,32768),J(t,2,56,"message is too long, it has been truncated to 32768 characters.",{message:e},!0)),n||e}function ZI(t,e){var n;if(e){var r=""+e;r[be]>32768&&(n=Bt(r,0,32768),J(t,2,52,"exception is too long, it has been truncated to 32768 characters.",{exception:e},!0))}return n||e}function Io(t,e){if(e){var n={};De(e,function(r,i){if(Xt(i)&&yc())try{i=Mn()[al](i)}catch(o){J(t,2,49,"custom property is not valid",{exception:o},!0)}i=gt(t,i,8192),r=hb(t,r,n),n[r]=i}),e=n}return e}function ko(t,e){if(e){var n={};De(e,function(r,i){r=hb(t,r,n),n[r]=i}),e=n}return e}function YI(t,e){return e&&gb(t,e,128,69)[rc]()}function gb(t,e,n,r){var i;return e&&(e=Ve($t(e)),e[be]>n&&(i=Bt(e,0,n),J(t,2,r,"input is too long, it has been truncated to "+n+" characters.",{data:e},!0))),i||e}function ek(t){var e="00"+t;return Jr(e,e[be]-3)}var Pv=kt()||{},Dv=0,tk=[null,null,null,null,null];function Qp(t){var e=Dv,n=tk,r=n[e];return Pv.createElement?n[e]||(r=n[e]=Pv.createElement("a")):r={host:ik(t)},r.href=t,e++,e>=n[be]&&(e=0),Dv=e,r}function nk(t){var e,n=Qp(t);return n&&(e=n.href),e}function rk(t,e){return t?t.toUpperCase()+" "+e:e}function ik(t,e){var n=vb(t)||"";if(n){var r=n[ic](/(www\d{0,5}\.)?([^\/:]{1,256})(:\d{1,20})?/i);if(r!=null&&r[be]>3&&de(r[2])&&r[2][be]>0)return r[2]+(r[3]||"")}return n}function vb(t,e){var n=null;if(t){var r=t[ic](/(\w{1,150}):\/\/([^\/:]{1,256})(:\d{1,20})?/i);if(r!=null&&r[be]>2&&de(r[2])&&r[2][be]>0&&(n=r[2]||"",r[be]>2)){var i=(r[1]||"")[nc](),o=r[3]||"";(i==="http"&&o===":80"||i==="https"&&o===":443")&&(o=""),n+=o}}return n}var ok=[Gp+Is,"https://breeze.aimon.applicationinsights.io"+Is,"https://dc-int.services.visualstudio.com"+Is],sk="cid-v1:";function fh(t){return At(ok,t[nc]())!==-1}function Rv(t,e,n){if(!e||t&&t.disableCorrelationHeaders)return!1;if(t&&t[xv]){for(var r=0;r<t.correlationHeaderExcludePatterns[be];r++)if(t[xv][r].test(e))return!1}var i=Qp(e).host[nc]();if(i&&(at(i,":443")!==-1||at(i,":80")!==-1)&&(i=(vb(e)||"")[nc]()),(!t||!t.enableCorsCorrelation)&&i&&i!==n)return!1;var o=t&&t.correlationHeaderDomains;if(o){var s;if(ee(o,function(u){var l=new RegExp(u.toLowerCase().replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*"));s=s||l.test(i)}),!s)return!1}var a=t&&t.correlationHeaderExcludedDomains;if(!a||a[be]===0)return!0;for(var r=0;r<a[be];r++){var c=new RegExp(a[r].toLowerCase().replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*"));if(c.test(i))return!1}return i&&i[be]>0}function Av(t){if(t){var e=ak(t,Fe[1]);if(e&&e!==sk)return e}}function ak(t,e){if(t)for(var n=t[$s](","),r=0;r<n[be];++r){var i=n[r][$s]("=");if(i[be]===2&&i[0]===e)return i[1]}}function ck(t,e,n,r){var i,o=r,s=r;if(e&&e[be]>0){var a=Qp(e);if(i=a.host,!o)if(a[ed]!=null){var c=a.pathname[be]===0?"/":a[ed];c.charAt(0)!=="/"&&(c="/"+c),s=a[ed],o=gt(t,n?n+" "+c:c)}else o=gt(t,e)}else i=r,o=r;return{target:i,name:o,data:s}}function jc(){var t=Dr();if(t&&t.now&&t.timing){var e=t.now()+t.timing.navigationStart;if(e>0)return e}return An()}function qt(t,e){var n=null;return t!==0&&e!==0&&!K(t)&&!K(e)&&(n=e-t),n}function Zp(t,e){var n=t||{};return{getName:function(){return n[tr]},setName:function(r){e&&e.setName(r),n[tr]=r},getTraceId:function(){return n.traceID},setTraceId:function(r){e&&e.setTraceId(r),Wp(r)&&(n.traceID=r)},getSpanId:function(){return n.parentID},setSpanId:function(r){e&&e.setSpanId(r),Vp(r)&&(n.parentID=r)},getTraceFlags:function(){return n.traceFlags},setTraceFlags:function(r){e&&e.setTraceFlags(r),n.traceFlags=r}}}var Cc=Mp({LocalStorage:0,SessionStorage:1}),ai=void 0,ci=void 0,mb="";function Yp(){return Jl()?Gl(Cc.LocalStorage):null}function Gl(t){try{if(K(vn()))return null;var e=new Date()[rc](),n=nt(t===Cc.LocalStorage?"localStorage":"sessionStorage"),r=mb+e;n.setItem(r,e);var i=n.getItem(r)!==e;if(n[Jp](r),!i)return n}catch{}return null}function eg(){return oc()?Gl(Cc.SessionStorage):null}function uk(){ai=!1,ci=!1}function tg(t){mb=t||""}function lk(){ai=Jl(!0),ci=oc(!0)}function Jl(t){return(t||ai===void 0)&&(ai=!!Gl(Cc.LocalStorage)),ai}function yb(t,e){var n=Yp();if(n!==null)try{return n.getItem(e)}catch(r){ai=!1,J(t,2,1,"Browser failed read of local storage. "+$e(r),{exception:te(r)})}return null}function bb(t,e,n){var r=Yp();if(r!==null)try{return r.setItem(e,n),!0}catch(i){ai=!1,J(t,2,3,"Browser failed write to local storage. "+$e(i),{exception:te(i)})}return!1}function fk(t,e){var n=Yp();if(n!==null)try{return n[Jp](e),!0}catch(r){ai=!1,J(t,2,5,"Browser failed removal of local storage item. "+$e(r),{exception:te(r)})}return!1}function oc(t){return(t||ci===void 0)&&(ci=!!Gl(Cc.SessionStorage)),ci}function dh(t,e){var n=eg();if(n!==null)try{return n.getItem(e)}catch(r){ci=!1,J(t,2,2,"Browser failed read of session storage. "+$e(r),{exception:te(r)})}return null}function _b(t,e,n){var r=eg();if(r!==null)try{return r.setItem(e,n),!0}catch(i){ci=!1,J(t,2,4,"Browser failed write to session storage. "+$e(i),{exception:te(i)})}return!1}function Cb(t,e){var n=eg();if(n!==null)try{return n[Jp](e),!0}catch(r){ci=!1,J(t,2,6,"Browser failed removal of session storage item. "+$e(r),{exception:te(r)})}return!1}var dk="appInsightsThrottle",hk=(function(){function t(e,n){var r=this,i,o,s,a,c,u,l,f=!1,m=!1;h(),r._getDbgPlgTargets=function(){return[l]},r.getConfig=function(){return s},r.canThrottle=function(b){var E=H(b),B=g(b);return _(B,i,E)},r.isTriggered=function(b){return ne(b)},r.isReady=function(){return f},r.flush=function(b){try{var E=se(b);if(E&&E[be]>0){var B=E.slice(0);return l[b]=[],ee(B,function(M){d(M.msgID,M[_c],M.severity,!1)}),!0}}catch{}return!1},r.flushAll=function(){try{if(l){var b=!0;return De(l,function(E){var B=r.flush(parseInt(E));b=b&&B}),b}}catch{}return!1},r.onReadyState=function(b,E){return E===void 0&&(E=!0),f=K(b)?!0:b,f&&E?r.flushAll():null},r.sendMessage=function(b,E,B){return d(b,E,B,!0)};function d(b,E,B,M){if(f){var D=O(b);if(!D)return;var ce=g(b),me=H(b),oe=_(ce,i,me),V=!1,C=0,y=ne(b);try{oe&&!y?(C=ry(ce.limit.maxSendNumber,me[Jo]+1),me[Jo]=0,V=!0,c[b]=!0,me[Zf]=new Date):(c[b]=oe,me[Jo]+=1);var U=P(b);A(o,U,me);for(var G=0;G<C;G++)L(b,o,E,B)}catch{}return{isThrottled:V,throttleNum:C}}else if(M){var Y=se(b);Y.push({msgID:b,message:E,severity:B})}return null}function h(){o=wo(e),c={},a={},l={},s={},p(109),u=no(n)?n:"",e.addUnloadHook(ct(e.config,function(b){var E=b.cfg;i=Jl();var B=E.throttleMgrCfg||{};De(B,function(M,D){p(parseInt(M),D)})}))}function g(b){return s[b]||s[109]}function p(b,E){var B,M;try{var D=E||{},ce={};ce.disabled=!!D.disabled;var me=D.interval||{};m=(me==null?void 0:me.daysOfMonth)&&(me==null?void 0:me.daysOfMonth[be])>0,ce.interval=v(me);var oe={samplingRate:((B=D.limit)===null||B===void 0?void 0:B.samplingRate)||100,maxSendNumber:((M=D.limit)===null||M===void 0?void 0:M.maxSendNumber)||1};ce.limit=oe,s[b]=ce}catch{}}function v(b){b=b||{};var E=b==null?void 0:b.monthInterval,B=b==null?void 0:b.dayInterval;return K(E)&&K(B)&&(b.monthInterval=3,m||(b.daysOfMonth=[28],m=!0)),b={monthInterval:b==null?void 0:b.monthInterval,dayInterval:b==null?void 0:b.dayInterval,daysOfMonth:b==null?void 0:b.daysOfMonth},b}function _(b,E,B){if(b&&!b.disabled&&E&&no(B)){var M=q(),D=B.date,ce=b.interval,me=1;if(ce!=null&&ce.monthInterval){var oe=(M.getUTCFullYear()-D.getUTCFullYear())*12+M.getUTCMonth()-D.getUTCMonth();me=I(ce.monthInterval,0,oe)}var V=1;if(m)V=At(ce.daysOfMonth,M[Yf]());else if(ce!=null&&ce.dayInterval){var C=an((M.getTime()-D.getTime())/864e5);V=I(ce.dayInterval,0,C)}return me>=0&&V>=0}return!1}function P(b,E){var B=no(E)?E:"";return b?dk+B+"-"+b:null}function x(b){try{if(b){var E=new Date;return b.getUTCFullYear()===E.getUTCFullYear()&&b.getUTCMonth()===E.getUTCMonth()&&b[Yf]()===E[Yf]()}}catch{}return!1}function R(b,E,B){try{var M={date:q(),count:0};if(b){var D=JSON.parse(b),ce={date:q(D.date)||M.date,count:D[Jo]||M[Jo],preTriggerDate:D.preTriggerDate?q(D[Zf]):void 0};return ce}else return A(E,B,M),M}catch{}return null}function q(b){try{if(b){var E=new Date(b);if(!isNaN(E.getDate()))return E}else return new Date}catch{}return null}function A(b,E,B){try{return bb(b,E,Ve(JSON[al](B)))}catch{}return!1}function I(b,E,B){return b<=0?1:B>=E&&(B-E)%b==0?an((B-E)/b)+1:-1}function L(b,E,B,M){J(E,M||1,b,B)}function O(b){try{var E=g(b);return PS(1e6)<=E.limit.samplingRate}catch{}return!1}function H(b){try{var E=a[b];if(!E){var B=P(b,u);E=R(yb(o,B),o,B),a[b]=E}return a[b]}catch{}return null}function ne(b){var E=c[b];if(K(E)){E=!1;var B=H(b);B&&(E=x(B[Zf])),c[b]=E}return c[b]}function se(b){return l=l||{},K(l[b])&&(l[b]=[]),l[b]}}return t})(),pk=";",gk="=";function wb(t){if(!t)return{};var e=t[$s](pk),n=iw(e,function(i,o){var s=o[$s](gk);if(s[be]===2){var a=s[0][nc](),c=s[1];i[a]=c}return i},{});if(wr(n)[be]>0){if(n.endpointsuffix){var r=n.location?n.location+".":"";n[bi]=n[bi]||"https://"+r+"dc."+n.endpointsuffix}n[bi]=n[bi]||Gp,yy(n[bi],"/")&&(n[bi]=n[bi].slice(0,-1))}return n}var vk=(function(){function t(e,n,r){var i=this,o=this;o.ver=1,o.sampleRate=100,o.tags={},o[tr]=gt(e,r)||er,o.data=n,o.time=Ns(new Date),o[Kl]={time:1,iKey:1,name:1,sampleRate:function(){return i.sampleRate===100?4:1},tags:1,data:1}}return t})(),yr=(function(){function t(e,n,r,i){this.aiDataContract={ver:1,name:1,properties:0,measurements:0};var o=this;o.ver=2,o[tr]=gt(e,n)||er,o[Bn]=Io(e,r),o[kr]=ko(e,i)}return t.envelopeType="Microsoft.ApplicationInsights.{0}.Event",t.dataType="EventData",t})(),mk=58,yk=/^\s{0,50}(from\s|at\s|Line\s{1,5}\d{1,10}\s{1,5}of|\w{1,50}@\w{1,80}|[^\(\s\n]+:[0-9\?]+(?::[0-9\?]+)?)/,bk=/^(?:\s{0,50}at)?\s{0,50}([^\@\()\s]+)?\s{0,50}(?:\s|\@|\()\s{0,5}([^\(\s\n\]]+):([0-9\?]+):([0-9\?]+)\)?$/,_k=/^(?:\s{0,50}at)?\s{0,50}([^\@\()\s]+)?\s{0,50}(?:\s|\@|\()\s{0,5}([^\(\s\n\]]+):([0-9\?]+)\)?$/,Ck=/^(?:\s{0,50}at)?\s{0,50}([^\@\()\s]+)?\s{0,50}(?:\s|\@|\()\s{0,5}([^\(\s\n\)\]]+)\)?$/,wk=/(?:^|\(|\s{0,10}[\w\)]+\@)?([^\(\n\s\]\)]+)(?:\:([0-9]+)(?:\:([0-9]+))?)?\)?(?:,|$)/,Sk=/([^\(\s\n]+):([0-9]+):([0-9]+)$/,Ik=/([^\(\s\n]+):([0-9]+)$/,Mv="<no_method>",Ts="error",pn="stack",hh="stackDetails",zv="errorSrc",ph="message",Sb="description",Uv=[{re:bk,len:5,m:1,fn:2,ln:3,col:4},{chk:Tk,pre:kk,re:_k,len:4,m:1,fn:2,ln:3},{re:Ck,len:3,m:1,fn:2,hdl:$v},{re:wk,len:2,fn:1,hdl:$v}];function kk(t){return t.replace(/(\(anonymous\))/,"<anonymous>")}function Tk(t){return at(t,"[native")<0}function gh(t,e){var n=t;return n&&!de(n)&&(JSON&&JSON[al]?(n=JSON[al](t),e&&(!n||n==="{}")&&(pe(t[rc])?n=t[rc]():n=""+t)):n=""+t+" - (Missing JSON.stringify)"),n||""}function Ib(t,e){var n=t;return t&&(n&&!de(n)&&(n=t[ph]||t[Sb]||n),n&&!de(n)&&(n=gh(n,!0)),t.filename&&(n=n+" @"+(t.filename||"")+":"+(t.lineno||"?")+":"+(t.colno||"?"))),e&&e!=="String"&&e!=="Object"&&e!=="Error"&&at(n||"",e)===-1&&(n=e+": "+n),n||""}function Ek(t){try{if(Xt(t))return"hasFullStack"in t&&"typeName"in t}catch{}return!1}function xk(t){try{if(Xt(t))return"ver"in t&&"exceptions"in t&&"properties"in t}catch{}return!1}function Nv(t){return t&&t.src&&de(t.src)&&t.obj&&Ce(t.obj)}function _i(t){var e=t||"";de(e)||(de(e[pn])?e=e[pn]:e=""+e);var n=e[$s](`
|
|
8
|
+
`);return{src:e,obj:n}}function Pk(t){for(var e=[],n=t[$s](`
|
|
9
|
+
`),r=0;r<n[be];r++){var i=n[r];n[r+1]&&(i+="@"+n[r+1],r++),e.push(i)}return{src:t,obj:e}}function kb(t){var e=null;if(t)try{if(t[pn])e=_i(t[pn]);else if(t[Ts]&&t[Ts][pn])e=_i(t[Ts][pn]);else if(t.exception&&t.exception[pn])e=_i(t.exception[pn]);else if(Nv(t))e=t;else if(Nv(t[hh]))e=t[hh];else if(cn()&&cn().opera&&t[ph])e=Pk(t[_c]);else if(t.reason&&t.reason[pn])e=_i(t.reason[pn]);else if(de(t))e=_i(t);else{var n=t[ph]||t[Sb]||"";de(t[zv])&&(n&&(n+=`
|
|
10
|
+
`),n+=" from "+t[zv]),n&&(e=_i(n))}}catch(r){e=_i(r)}return e||{src:"",obj:null}}function Dk(t){var e="";return t&&(t.obj?e=t.obj.join(`
|
|
11
|
+
`):e=t.src||""),e}function Rk(t){var e,n=t.obj;if(n&&n[be]>0){e=[];var r=0,i=!1,o=0;ee(n,function(g){if(i||Uk(g)){var p=$t(g);i=!0;var v=Nk(p,r);v&&(o+=v[lu],e.push(v),r++)}});var s=32*1024;if(o>s)for(var a=0,c=e[be]-1,u=0,l=a,f=c;a<c;){var m=e[a][lu],d=e[c][lu];if(u+=m+d,u>s){var h=f-l+1;e.splice(l,h);break}l=a,f=c,a++,c--}}return e}function fl(t){var e="";if(t&&(e=t.typeName||t[tr]||"",!e))try{var n=/function (.{1,200})\(/,r=n.exec(t.constructor[rc]());e=r&&r[be]>1?r[1]:""}catch{}return e}function nd(t){if(t)try{if(!de(t)){var e=fl(t),n=gh(t,!1);return(!n||n==="{}")&&(t[Ts]&&(t=t[Ts],e=fl(t)),n=gh(t,!0)),at(n,e)!==0&&e!=="String"?e+":"+n:n}}catch{}return""+(t||"")}var Ht=(function(){function t(e,n,r,i,o,s){this.aiDataContract={ver:1,exceptions:1,severityLevel:0,properties:0,measurements:0};var a=this;a.ver=2,xk(n)?(a[Zs]=n[Zs]||[],a[Bn]=n[Bn],a[kr]=n[kr],n[_a]&&(a[_a]=n[_a]),n.id&&(a.id=n.id,n[Bn].id=n.id),n[td]&&(a[td]=n[td]),K(n.isManual)||(a.isManual=n.isManual)):(r||(r={}),s&&(r.id=s),a[Zs]=[Tb(e,n,r)],a[Bn]=Io(e,r),a[kr]=ko(e,i),o&&(a[_a]=o),s&&(a.id=s))}return t.CreateAutoException=function(e,n,r,i,o,s,a,c){var u=fl(o||s||e);return{message:Ib(e,u),url:n,lineNumber:r,columnNumber:i,error:nd(o||s||e),evt:nd(s||e),typeName:u,stackDetails:kb(a||o||s),errorSrc:c}},t.CreateFromInterface=function(e,n,r,i){var o=n[Zs]&&Ha(n[Zs],function(a){return zk(e,a)}),s=new t(e,Ft(Ft({},n),{exceptions:o}),r,i);return s},t.prototype.toInterface=function(){var e=this,n=e.exceptions,r=e.properties,i=e.measurements,o=e.severityLevel,s=e.problemGroup,a=e.id,c=e.isManual,u=n instanceof Array&&Ha(n,function(l){return l.toInterface()})||void 0;return{ver:"4.0",exceptions:u,severityLevel:o,properties:r,measurements:i,problemGroup:s,id:a,isManual:c}},t.CreateSimpleException=function(e,n,r,i,o,s){var a;return{exceptions:[(a={},a[cl]=!0,a.message=e,a.stack=o,a.typeName=n,a)]}},t.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",t.dataType="ExceptionData",t.formatError=nd,t})(),Ak=Rn({id:0,outerId:0,typeName:1,message:1,hasFullStack:0,stack:0,parsedStack:2});function Mk(){var t=this,e=Ce(t[ks])&&Ha(t[ks],function(r){return Ok(r)}),n={id:t.id,outerId:t.outerId,typeName:t[fu],message:t[_c],hasFullStack:t[cl],stack:t[pn],parsedStack:e||void 0};return n}function Tb(t,e,n){var r,i,o,s,a,c,u,l;if(Ek(e))s=e[fu],a=e[_c],u=e[pn],l=e[ks]||[],c=e[cl];else{var f=e,m=f&&f.evt;Cp(f)||(f=f[Ts]||m||f),s=gt(t,fl(f))||er,a=pb(t,Ib(e||f,s))||er;var d=e[hh]||kb(e);l=Rk(d),Ce(l)&&Ha(l,function(h){h[ul]=gt(t,h[ul]),h[Tr]=gt(t,h[Tr])}),u=ZI(t,Dk(d)),c=Ce(l)&&l[be]>0,n&&(n[fu]=n[fu]||s)}return r={},r[Kl]=Ak,r.id=i,r.outerId=o,r.typeName=s,r.message=a,r[cl]=c,r.stack=u,r.parsedStack=l,r.toInterface=Mk,r}function zk(t,e){var n=Ce(e[ks])&&Ha(e[ks],function(i){return $k(i)})||e[ks],r=Tb(t,Ft(Ft({},e),{parsedStack:n}));return r}function Eb(t,e){var n=e[ic](Sk);if(n&&n[be]>=4)t[Tr]=n[1],t[Os]=parseInt(n[2]);else{var r=e[ic](Ik);r&&r[be]>=3?(t[Tr]=r[1],t[Os]=parseInt(r[2])):t[Tr]=e}}function $v(t,e,n){var r=t[Tr];e.fn&&n&&n[be]>e.fn&&(e.ln&&n[be]>e.ln?(r=Ve(n[e.fn]||""),t[Os]=parseInt(Ve(n[e.ln]||""))||0):r=Ve(n[e.fn]||"")),r&&Eb(t,r)}function Uk(t){var e=!1;if(t&&de(t)){var n=Ve(t);n&&(e=yk.test(n))}return e}var xb=Rn({level:1,method:1,assembly:0,fileName:0,line:0});function Nk(t,e){var n,r;if(t&&de(t)&&Ve(t)){r=(n={},n[Kl]=xb,n.level=e,n.assembly=Ve(t),n.method=Mv,n.fileName="",n.line=0,n.sizeInBytes=0,n);for(var i=0;i<Uv[be];){var o=Uv[i];if(o.chk&&!o.chk(t))break;o.pre&&(t=o.pre(t));var s=t[ic](o.re);if(s&&s[be]>=o.len){o.m&&(r.method=Ve(s[o.m]||Mv)),o.hdl?o.hdl(r,o,s):o.fn&&(o.ln?(r[Tr]=Ve(s[o.fn]||""),r[Os]=parseInt(Ve(s[o.ln]||""))||0):Eb(r,s[o.fn]||""));break}i++}}return Pb(r)}function $k(t){var e,n=(e={},e[Kl]=xb,e.level=t.level,e.method=t.method,e.assembly=t[ul],e.fileName=t[Tr],e.line=t[Os],e.sizeInBytes=0,e);return Pb(n)}function Pb(t){var e=mk;return t&&(e+=t.method[be],e+=t.assembly[be],e+=t.fileName[be],e+=t.level.toString()[be],e+=t.line.toString()[be],t[lu]=e),t}function Ok(t){return{level:t.level,method:t.method,assembly:t[ul],fileName:t[Tr],line:t[Os]}}var Fk=(function(){function t(){this.aiDataContract={name:1,kind:0,value:1,count:0,min:0,max:0,stdDev:0},this.kind=0}return t})(),oo=(function(){function t(e,n,r,i,o,s,a,c,u){this.aiDataContract={ver:1,metrics:1,properties:0};var l=this;l.ver=2;var f=new Fk;f[Jo]=i>0?i:void 0,f.max=isNaN(s)||s===null?void 0:s,f.min=isNaN(o)||o===null?void 0:o,f[tr]=gt(e,n)||er,f.value=r,f.stdDev=isNaN(a)||a===null?void 0:a,l.metrics=[f],l[Bn]=Io(e,c),l[kr]=ko(e,u)}return t.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",t.dataType="MetricData",t})(),Ys="";function Zr(t){(isNaN(t)||t<0)&&(t=0),t=my(t);var e=Ys+t%1e3,n=Ys+an(t/1e3)%60,r=Ys+an(t/(1e3*60))%60,i=Ys+an(t/(1e3*60*60))%24,o=an(t/(1e3*60*60*24));return e=e[be]===1?"00"+e:e[be]===2?"0"+e:e,n=n[be]<2?"0"+n:n,r=r[be]<2?"0"+r:r,i=i[be]<2?"0"+i:i,(o>0?o+".":Ys)+i+":"+r+":"+n+"."+e}function jk(t,e,n,r,i){return!i&&de(t)&&(t==="Script error."||t==="Script error")}var ui=(function(){function t(e,n,r,i,o,s,a){this.aiDataContract={ver:1,name:0,url:0,duration:0,properties:0,measurements:0,id:0};var c=this;c.ver=2,c.id=YI(e,a),c.url=Xl(e,r),c[tr]=gt(e,n)||er,isNaN(i)||(c[ll]=Zr(i)),c[Bn]=Io(e,o),c[kr]=ko(e,s)}return t.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",t.dataType="PageviewData",t})(),so=(function(){function t(e,n,r,i,o,s,a,c,u,l,f,m){u===void 0&&(u="Ajax"),this.aiDataContract={id:1,ver:1,name:0,resultCode:0,duration:0,success:0,data:0,target:0,type:0,properties:0,measurements:0,kind:0,value:0,count:0,min:0,max:0,stdDev:0,dependencyKind:0,dependencySource:0,commandName:0,dependencyTypeName:0};var d=this;d.ver=2,d.id=n,d[ll]=Zr(o),d.success=s,d.resultCode=a+"",d.type=gt(e,u);var h=ck(e,r,c,i);d.data=Xl(e,i)||h.data,d.target=gt(e,h.target),l&&(d.target="".concat(d.target," | ").concat(l)),d[tr]=gt(e,h[tr]),d[Bn]=Io(e,f),d[kr]=ko(e,m)}return t.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",t.dataType="RemoteDependencyData",t})(),Es=(function(){function t(e,n,r,i,o){this.aiDataContract={ver:1,message:1,severityLevel:0,properties:0};var s=this;s.ver=2,n=n||er,s[_c]=pb(e,n),s[Bn]=Io(e,i),s[kr]=ko(e,o),r&&(s[_a]=r)}return t.envelopeType="Microsoft.ApplicationInsights.{0}.Message",t.dataType="MessageData",t})(),xs=(function(){function t(e,n,r,i,o,s,a){this.aiDataContract={ver:1,name:0,url:0,duration:0,perfTotal:0,networkConnect:0,sentRequest:0,receivedResponse:0,domProcessing:0,properties:0,measurements:0};var c=this;c.ver=2,c.url=Xl(e,r),c[tr]=gt(e,n)||er,c[Bn]=Io(e,o),c[kr]=ko(e,s),a&&(c.domProcessing=a.domProcessing,c[ll]=a[ll],c.networkConnect=a.networkConnect,c.perfTotal=a.perfTotal,c.receivedResponse=a.receivedResponse,c.sentRequest=a.sentRequest)}return t.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",t.dataType="PageviewPerformanceData",t})(),To=(function(){function t(e,n){this.aiDataContract={baseType:1,baseData:1},this.baseType=e,this.baseData=n}return t})(),sc=Mp({Verbose:0,Information:1,Warning:2,Error:3,Critical:4});function vi(t){var e="ai."+t+".";return function(n){return e+n}}var ea=vi("application"),vt=vi("device"),Lc=vi("location"),$o=vi("operation"),rd=vi("session"),Fr=vi("user"),Ci=vi("cloud"),ta=vi("internal"),Db=(function(t){ir(e,t);function e(){return t.call(this)||this}return e})(rS({applicationVersion:ea("ver"),applicationBuild:ea("build"),applicationTypeId:ea("typeId"),applicationId:ea("applicationId"),applicationLayer:ea("layer"),deviceId:vt("id"),deviceIp:vt("ip"),deviceLanguage:vt("language"),deviceLocale:vt("locale"),deviceModel:vt("model"),deviceFriendlyName:vt("friendlyName"),deviceNetwork:vt("network"),deviceNetworkName:vt("networkName"),deviceOEMName:vt("oemName"),deviceOS:vt("os"),deviceOSVersion:vt("osVersion"),deviceRoleInstance:vt("roleInstance"),deviceRoleName:vt("roleName"),deviceScreenResolution:vt("screenResolution"),deviceType:vt("type"),deviceMachineName:vt("machineName"),deviceVMName:vt("vmName"),deviceBrowser:vt("browser"),deviceBrowserVersion:vt("browserVersion"),locationIp:Lc("ip"),locationCountry:Lc("country"),locationProvince:Lc("province"),locationCity:Lc("city"),operationId:$o("id"),operationName:$o("name"),operationParentId:$o("parentId"),operationRootId:$o("rootId"),operationSyntheticSource:$o("syntheticSource"),operationCorrelationVector:$o("correlationVector"),sessionId:rd("id"),sessionIsFirst:rd("isFirst"),sessionIsNew:rd("isNew"),userAccountAcquisitionDate:Fr("accountAcquisitionDate"),userAccountId:Fr("accountId"),userAgent:Fr("userAgent"),userId:Fr("id"),userStoreRegion:Fr("storeRegion"),userAuthUserId:Fr("authUserId"),userAnonymousUserAcquisitionDate:Fr("anonUserAcquisitionDate"),userAuthenticatedUserAcquisitionDate:Fr("authUserAcquisitionDate"),cloudName:Ci("name"),cloudRole:Ci("role"),cloudRoleVer:Ci("roleVer"),cloudRoleInstance:Ci("roleInstance"),cloudEnvironment:Ci("environment"),cloudLocation:Ci("location"),cloudDeploymentUnit:Ci("deploymentUnit"),internalNodeName:ta("nodeName"),internalSdkVersion:ta("sdkVersion"),internalAgentVersion:ta("agentVersion"),internalSnippet:ta("snippet"),internalSdkSrc:ta("sdkSrc")}));function qr(t,e,n,r,i,o){n=gt(r,n)||er,(K(t)||K(e)||K(n))&&Yt("Input doesn't contain all required fields");var s="";t[Qf]&&(s=t[Qf],delete t[Qf]);var a={name:n,time:Ns(new Date),iKey:s,ext:o||{},tags:[],data:{},baseType:e,baseData:t};return K(i)||De(i,function(c,u){a.data[c]=u}),a}var Zt={UserExt:"user",DeviceExt:"device",TraceExt:"trace",WebExt:"web",AppExt:"app",OSExt:"os"},Xe=new Db;function na(t){var e=null;if(pe(Event))e=new Event(t);else{var n=kt();n&&n.createEvent&&(e=n.createEvent("Event"),e.initEvent(t,!0,!0))}return e}function Ov(t,e){Ss(t,null,null,e)}function Lk(t){var e=kt(),n=rr(),r=!1,i=[],o=1;n&&!K(n.onLine)&&!n.onLine&&(o=2);var s=0,a=m(),c=gi(bn("OfflineListener"),t);try{if(l(cn())&&(r=!0),e){var u=e.body||e;u.ononline&&l(u)&&(r=!0)}}catch{r=!1}function l(P){var x=!1;return P&&(x=Ir(P,"online",g,c),x&&Ir(P,"offline",p,c)),x}function f(){return a}function m(){return!(s===2||o===2)}function d(){var P=m();a!==P&&(a=P,ee(i,function(x){var R={isOnline:a,rState:o,uState:s};try{x(R)}catch{}}))}function h(P){s=P,d()}function g(){o=1,d()}function p(){o=2,d()}function v(){var P=cn();if(P&&r){if(Ov(P,c),e){var x=e.body||e;Ye(x.ononline)||Ov(x,c)}r=!1}}function _(P){return i.push(P),{rm:function(){var x=i.indexOf(P);if(x>-1)return i.splice(x,1)}}}return{isOnline:f,isListening:function(){return r},unload:v,addListener:_,setOnlineState:h}}var Ql="AppInsightsPropertiesPlugin",Rb="AppInsightsChannelPlugin",ng="ApplicationInsightsAnalytics",Wk=Ws({history:{blkVal:!0,v:void 0}}),Vk=(function(t){ir(e,t);function e(){var n=t.call(this)||this;n.priority=185,n.identifier="ReactPlugin";var r,i,o,s,a;return qe(e,n,function(c,u){l(),c.initialize=function(d,h,g,p){t.prototype.initialize.call(n,d,h,g,p),c._addHook(ct(d,function(v){var _,P=c._getTelCtx();if(i=P.getExtCfg(n.identifier,Wk),r=(_=h.getPlugin(ng))===null||_===void 0?void 0:_.plugin,pe(o)&&(o(),o=null),i.history&&(m(i.history),!a)){var x={uri:i.history.location.pathname};c.trackPageView(x),a=!0}}))},c.getCookieMgr=function(){return Hl(c.core)},c.getAppInsights=f,c.processTelemetry=function(d,h){c.processNext(d,h)},c._doTeardown=function(d,h,g){pe(o)&&o(),s&&clearTimeout(s),l()},ls(c,f,["trackMetric","trackPageView","trackEvent","trackException","trackTrace"]);function l(){r=null,i=null,o=null,s=null,a=!1}function f(){return r||J(c.diagLog(),1,64,"Analytics plugin is not available, React plugin telemetry will not be sent: "),r}function m(d){var h=function(g){var p=null;"location"in g?p=g.location:p=g,s=setTimeout(function(){s=null;var v={uri:p.pathname};c.trackPageView(v)},500)};o=d.listen(h)}MC(c,"_extensionConfig",function(){return i})}),n}return e.__ieDyn=1,e})(So),dl="toString",vh="isStorageUseDisabled",Oo="_addHook",Ue="core",jr="dataType",wi="envelopeType",Jt="diagLog",Si="track",du="trackPageView",fn="config",mh="trackPreviousPageVisit",Ni="sendPageViewInternal",id="refUri",Fs="startTime",Ca="properties",Ln="duration",yh="sendPageViewPerformanceInternal",rg="populatePageViewPerformanceEvent",wa="href",Fv="sendExceptionInternal",ra="error",od="lineNumber",sd="columnNumber",ad="CreateAutoException",Wc="addTelemetryInitializer",qk="overridePageViewDuration",cd="autoExceptionInstrumented",Ab="autoTrackPageVisitTime",Mb="isBrowserLinkTrackingEnabled",ac="length",zb="enableAutoRouteTracking",Ub="enableUnhandledPromiseRejectionTracking",bh="autoUnhandledPromiseInstrumented",_h="getEntriesByType",Nb="isPerformanceTimingSupported",$b="getPerformanceTiming",hl="navigationStart",Ch="shouldCollectDuration",Ob="isPerformanceTimingDataReady",Sa="responseStart",Hk="requestStart",hu="loadEventEnd",wh="responseEnd",pu="connectEnd",Bk=(function(){function t(e,n,r,i){qe(t,this,function(o){var s=null,a=[],c=!1,u=!1,l;r&&(l=r.logger);function f(h){r&&r.flush(h,function(){})}function m(){s||(s=yn((function(){s=null;var h=a.slice(0),g=!1;a=[],ee(h,function(p){p()?g=!0:a.push(p)}),a[ac]>0&&m(),g&&f(!0)}),100))}function d(h){a.push(h),m()}o[du]=function(h,g){var p=h.name;if(K(p)||typeof p!="string"){var v=kt();p=h.name=v&&v.title||""}var _=h.uri;if(K(_)||typeof _!="string"){var P=Hn();_=h.uri=P&&P[wa]||""}if(r&&r[fn]&&(_=h.uri=mr(h.uri,r[fn])),!u){var x=Dr(),R=x&&x[_h]&&x[_h]("navigation");if(R&&R[0]&&!Ye(x.timeOrigin)){var q=R[0].loadEventStart;h[Fs]=new Date(x.timeOrigin+q)}else{var A=(g||h[Ca]||{})[Ln]||0;h[Fs]=new Date(new Date().getTime()-A)}u=!0}if(!i[Nb]()){e[Ni](h,g),f(!0),cy()||J(l,2,25,"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.");return}var I=!1,L,O=i[$b]()[hl];O>0&&(L=qt(O,+new Date),i[Ch](L)||(L=void 0));var H;!K(g)&&!K(g[Ln])&&(H=g[Ln]),(n||!isNaN(H))&&(isNaN(H)&&(g||(g={}),g[Ln]=L),e[Ni](h,g),f(!0),I=!0);var ne=6e4;g||(g={}),d(function(){var se=!1;try{if(i[Ob]()){se=!0;var b={name:p,uri:_};i[rg](b),!b.isValid&&!I?(g[Ln]=L,e[Ni](h,g)):(I||(g[Ln]=b.durationMs,e[Ni](h,g)),c||(e[yh](b,g),c=!0))}else O>0&&qt(O,+new Date)>ne&&(se=!0,I||(g[Ln]=ne,e[Ni](h,g)))}catch(E){J(l,1,38,"trackPageView failed on page load calculation: "+$e(E),{exception:te(E)})}return se})},o.teardown=function(h,g){if(s){s.cancel(),s=null;var p=a.slice(0);a=[],ee(p,function(v){v()})}}})}return t.__ieDyn=1,t})(),Kk=36e5,jv=["googlebot","adsbot-google","apis-google","mediapartners-google"];function Fb(){var t=Dr();return t&&!!t.timing}function Xk(){var t=Dr();return t&&t.getEntriesByType&&t.getEntriesByType("navigation")[ac]>0}function Gk(){var t=Dr(),e=t?t.timing:0;return e&&e.domainLookupStart>0&&e[hl]>0&&e[Sa]>0&&e[Hk]>0&&e[hu]>0&&e[wh]>0&&e[pu]>0&&e.domLoading>0}function Lv(){return Fb()?Dr().timing:null}function Jk(){return Xk()?Dr()[_h]("navigation")[0]:null}function Qk(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=rr()||{},r=n.userAgent,i=!1;if(r)for(var o=0;o<jv[ac];o++)i=i||at(r.toLowerCase(),jv[o])!==-1;if(i)return!1;for(var o=0;o<t[ac];o++)if(t[o]<0||t[o]>=Kk)return!1;return!0}var Zk=(function(){function t(e){var n=wo(e);qe(t,this,function(r){r[rg]=function(i){i.isValid=!1;var o=Jk(),s=Lv(),a=0,c=0,u=0,l=0,f=0;(o||s)&&(o?(a=o[Ln],c=o[Fs]===0?o[pu]:qt(o[Fs],o[pu]),u=qt(o.requestStart,o[Sa]),l=qt(o[Sa],o[wh]),f=qt(o.responseEnd,o[hu])):(a=qt(s[hl],s[hu]),c=qt(s[hl],s[pu]),u=qt(s.requestStart,s[Sa]),l=qt(s[Sa],s[wh]),f=qt(s.responseEnd,s[hu])),a===0?J(n,2,10,"error calculating page view performance.",{total:a,network:c,request:u,response:l,dom:f}):r[Ch](a,c,u,l,f)?a<an(c)+an(u)+an(l)+an(f)?J(n,2,8,"client performance math error.",{total:a,network:c,request:u,response:l,dom:f}):(i.durationMs=a,i.perfTotal=i[Ln]=Zr(a),i.networkConnect=Zr(c),i.sentRequest=Zr(u),i.receivedResponse=Zr(l),i.domProcessing=Zr(f),i.isValid=!0):J(n,2,45,"Invalid page load duration value. Browser perf data won't be sent.",{total:a,network:c,request:u,response:l,dom:f}))},r[$b]=Lv,r[Nb]=Fb,r[Ob]=Gk,r[Ch]=Qk})}return t.__ieDyn=1,t})(),Yk=(function(){function t(e,n){var r="prevPageVisitData";qe(t,this,function(i){i[mh]=function(a,c){try{var u=o(a,c);u&&n(u.pageName,u.pageUrl,u.pageVisitTime)}catch(l){ro(e,"Auto track page visit time failed, metric will not be collected: "+te(l))}};function o(a,c){var u=null;try{if(u=s(),oc()){dh(e,r)!=null&&Yt("Cannot call startPageVisit consecutively without first calling stopPageVisit");var l=Mn().stringify(new eT(a,c));_b(e,r,l)}}catch(f){ro(e,"Call to restart failed: "+te(f)),u=null}return u}function s(){var a=null;try{if(oc()){var c=An(),u=dh(e,r);u&&yc()&&(a=Mn().parse(u),a.pageVisitTime=c-a.pageVisitStartTime,Cb(e,r))}}catch(l){ro(e,"Stop page visit timer failed: "+te(l)),a=null}return a}Ae(i,"_logger",{g:function(){return e}}),Ae(i,"pageVisitTimeTrackingHandler",{g:function(){return n}})})}return t.__ieDyn=1,t})(),eT=(function(){function t(e,n){this.pageVisitStartTime=An(),this.pageName=e,this.pageUrl=n}return t})(),Wv=(function(){function t(e,n){var r=this,i={};r.start=function(o){typeof i[o]<"u"&&J(e,2,62,"start was called more than once for this event without calling stop.",{name:o,key:o},!0),i[o]=+new Date},r.stop=function(o,s,a,c){var u=i[o];if(isNaN(u))J(e,2,63,"stop was called without a corresponding start.",{name:o,key:o},!0);else{var l=+new Date,f=qt(u,l);r.action(o,s,f,a,c)}delete i[o],i[o]=void 0}}return t})(),Mt,tT="event";function ia(t,e){t&&t.dispatchEvent&&e&&t.dispatchEvent(e)}function nT(t){if(t&&t.reason){var e=t.reason;return!de(e)&&pe(e[dl])?e[dl]():te(e)}return t||""}var Vv=6e4,rT=Ws((Mt={sessionRenewalMs:Jg(qv,1800*1e3),sessionExpirationMs:Jg(qv,1440*60*1e3),disableExceptionTracking:dt()},Mt[Ab]=dt(),Mt[qk]=dt(),Mt[Ub]=dt(),Mt[bh]=!1,Mt.samplingPercentage=Yu(iT,100),Mt[vh]=dt(),Mt[Mb]=dt(),Mt[zb]=dt(),Mt.namePrefix=BS(),Mt.enableDebug=dt(),Mt.disableFlushOnBeforeUnload=dt(),Mt.disableFlushOnUnload=dt(!1,"disableFlushOnBeforeUnload"),Mt.expCfg=kn({inclScripts:!1,expLog:void 0,maxLogs:50}),Mt));function qv(t,e){return t=t||e,t<Vv&&(t=Vv),+t}function iT(t){return!isNaN(t)&&t>0&&t<=100}function oT(t){Ye(t[vh])||(t[vh]?uk():lk())}var sT=(function(t){ir(e,t);function e(){var n=t.call(this)||this;n.identifier=ng,n.priority=180,n.autoRoutePVDelay=500;var r,i,o,s,a,c,u,l,f,m,d,h,g,p,v,_,P,x,R,q,A;return qe(e,n,function(I,L){var O=L[Oo];V(),I.getCookieMgr=function(){return Hl(I[Ue])},I.processTelemetry=function(C,y){I.processNext(C,y)},I.trackEvent=function(C,y){try{var U=qr(C,yr[jr],yr[wi],I[Jt](),y);I[Ue][Si](U)}catch(G){oe(2,39,"trackTrace failed, trace will not be collected: "+$e(G),{exception:te(G)})}},I.startTrackEvent=function(C){try{r.start(C)}catch(y){oe(1,29,"startTrackEvent failed, event will not be collected: "+$e(y),{exception:te(y)})}},I.stopTrackEvent=function(C,y,U){try{r.stop(C,void 0,y,U)}catch(G){oe(1,30,"stopTrackEvent failed, event will not be collected: "+$e(G),{exception:te(G)})}},I.trackTrace=function(C,y){try{var U=qr(C,Es[jr],Es[wi],I[Jt](),y);I[Ue][Si](U)}catch(G){oe(2,39,"trackTrace failed, trace will not be collected: "+$e(G),{exception:te(G)})}},I.trackMetric=function(C,y){try{var U=qr(C,oo[jr],oo[wi],I[Jt](),y);I[Ue][Si](U)}catch(G){oe(1,36,"trackMetric failed, metric will not be collected: "+$e(G),{exception:te(G)})}},I[du]=function(C,y){try{var U=C||{};I[Ue]&&I[Ue][fn]&&(U.uri=mr(U.uri,I[Ue][fn])),o[du](U,Ft(Ft(Ft({},U.properties),U.measurements),y)),_&&a[mh](U.name,U.uri)}catch(G){oe(1,37,"trackPageView failed, page view will not be collected: "+$e(G),{exception:te(G)})}},I[Ni]=function(C,y,U){var G=kt();if(G&&(C[id]=C[id]===void 0?G.referrer:C[id]),I[Ue]&&I[Ue][fn]&&(C.refUri=mr(C.refUri,I[Ue][fn])),K(C[Fs])){var Y=(y||C[Ca]||{})[Ln]||0;C[Fs]=new Date(new Date().getTime()-Y)}var _e=qr(C,ui[jr],ui[wi],I[Jt](),y,U);I[Ue][Si](_e),H()},I[yh]=function(C,y,U){var G=qr(C,xs[jr],xs[wi],I[Jt](),y,U);I[Ue][Si](G)},I.trackPageViewPerformance=function(C,y){var U=C||{};try{s[rg](U),I[yh](U,y)}catch(G){oe(1,37,"trackPageViewPerformance failed, page view will not be collected: "+$e(G),{exception:te(G)})}},I.startTrackPage=function(C){try{if(typeof C!="string"){var y=kt();C=y&&y.title||""}i.start(C)}catch(U){oe(1,31,"startTrackPage failed, page view may not be collected: "+$e(U),{exception:te(U)})}},I.stopTrackPage=function(C,y,U,G){try{if(typeof C!="string"){var Y=kt();C=Y&&Y.title||""}if(typeof y!="string"){var _e=Hn();y=_e&&_e[wa]||""}I[Ue]&&I[Ue][fn]&&(y=mr(y,I[Ue][fn])),i.stop(C,y,U,G),_&&a[mh](C,y)}catch(ke){oe(1,32,"stopTrackPage failed, page view will not be collected: "+$e(ke),{exception:te(ke)})}},I[Fv]=function(C,y,U){var G=C&&(C.exception||C[ra])||Cp(C)&&C||{name:C&&typeof C,message:C||er};C=C||{};var Y=new Ht(I[Jt](),G,C[Ca]||y,C.measurements,C.severityLevel,C.id).toInterface(),_e=kt();if(_e&&P!=null&&P.inclScripts){var ke=pI(_e);Y[Ca].exceptionScripts=JSON.stringify(ke)}if(P!=null&&P.expLog){var Te=P.expLog();Te&&Te.logs&&Ce(Te.logs)&&(Y[Ca].exceptionLog=Te.logs.slice(0,P.maxLogs).join(`
|
|
12
|
+
`))}var Ne=qr(Y,Ht[jr],Ht[wi],I[Jt](),y,U);I[Ue][Si](Ne)},I.trackException=function(C,y){C&&!C.exception&&C[ra]&&(C.exception=C[ra]);try{I[Fv](C,y)}catch(U){oe(1,35,"trackException failed, exception will not be collected: "+$e(U),{exception:te(U)})}},I._onerror=function(C){var y=C&&C[ra],U=C&&C.evt;try{if(!U){var G=cn();G&&(U=G[tT])}var Y=C&&C.url||(kt()||{}).URL,_e=C.errorSrc||"window.onerror@"+Y+":"+(C[od]||0)+":"+(C[sd]||0),ke={errorSrc:_e,url:Y,lineNumber:C[od]||0,columnNumber:C[sd]||0,message:C.message};jk(C.message,C.url,C.lineNumber,C.columnNumber,C[ra])?E(Ht[ad]("Script error: The browser's same-origin policy prevents us from getting the details of this exception. Consider using the 'crossorigin' attribute.",Y,C[od]||0,C[sd]||0,y,U,null,_e),ke):(C.errorSrc||(C.errorSrc=_e),I.trackException({exception:C,severityLevel:3},ke))}catch(Ne){var Te=y?y.name+", "+y.message:"null";oe(1,11,"_onError threw exception while logging error, error will not be collected: "+$e(Ne),{exception:te(Ne),errorString:Te})}},I[Wc]=function(C){if(I[Ue])return I[Ue][Wc](C);c||(c=[]),c.push(C)},I.initialize=function(C,y,U,G){if(!I.isInitialized()){K(y)&&Yt("Error initializing"),L.initialize(C,y,U,G);try{q=gi(bn(I.identifier),y.evtNamespace&&y.evtNamespace()),c&&(ee(c,function(Y){y[Wc](Y)}),c=null),ne(C),s=new Zk(I[Ue]),o=new Bk(I,v.overridePageViewDuration,I[Ue],s),a=new Yk(I[Jt](),function(Y,_e,ke){return se(Y,_e,ke)}),r=new Wv(I[Jt](),"trackEvent"),r.action=function(Y,_e,ke,Te,Ne){Te||(Te={}),Ne||(Ne={}),Te.duration=ke[dl](),I.trackEvent({name:Y,properties:Te,measurements:Ne})},i=new Wv(I[Jt](),"trackPageView"),i.action=function(Y,_e,ke,Te,Ne){K(Te)&&(Te={}),Te.duration=ke[dl]();var Et={name:Y,uri:_e,properties:Te,measurements:Ne};I[Ni](Et,Te)},jl()&&(B(),M())}catch(Y){throw I.setInitialized(!1),Y}}},I._doTeardown=function(C,y){o&&o.teardown(C,y),Ss(window,null,null,q),V()},I._getDbgPlgTargets=function(){return[A,h]};function H(){if(I[Ue]){var C=I[Ue].getPlugin("AjaxDependencyPlugin");C&&C.plugin&&C.plugin.resetAjaxAttempts&&C.plugin.resetAjaxAttempts()}}function ne(C){var y=I.identifier,U=I[Ue];I[Oo](ct(C,function(){var G=zn(null,C,U);v=G.getExtCfg(y,rT),h=h||C[cd]||v[cd],P=v.expCfg,_=v[Ab],C.storagePrefix&&tg(C.storagePrefix),oT(v),u=v[Mb],b()}))}function se(C,y,U){var G={PageName:C,PageUrl:y};I.trackMetric({name:"PageVisitTime",average:U,max:U,min:U,sampleCount:1},G)}function b(){if(!l&&u){var C=["/browserLinkSignalR/","/__browserLink/"],y=function(U){if(u&&U.baseType===so[jr]){var G=U.baseData;if(G){for(var Y=0;Y<C[ac];Y++)if(G.target&&at(G.target,C[Y])>=0)return!1}}return!0};I[Oo](I[Wc](y)),l=!0}}function E(C,y){var U=qr(C,Ht[jr],Ht[wi],I[Jt](),y);I[Ue][Si](U)}function B(){var C=cn(),y=Hn();I[Oo](ct(v,function(){d=v.disableExceptionTracking,!d&&!h&&!v[cd]&&(O(Fc(C,"onerror",{ns:q,rsp:function(U,G,Y,_e,ke,Te){!d&&U.rslt!==!0&&I._onerror(Ht[ad](G,Y,_e,ke,Te,U.evt))}},!1)),A++,h=!0)})),me(C,y)}function M(){var C=cn(),y=Hn();I[Oo](ct(v,function(){if(f=v[zb]===!0,C&&f&&!m&&YC()){var U=ay();pe(U.pushState)&&pe(U.replaceState)&&typeof Event!==pp&&ce(C,U,y)}}))}function D(){var C=null;if(I[Ue]&&I[Ue].getTraceCtx&&(C=I[Ue].getTraceCtx(!1)),!C){var y=I[Ue].getPlugin(Ql);if(y){var U=y.plugin.context;U&&(C=Zp(U.telemetryTrace))}}return C}function ce(C,y,U){if(m)return;var G=v.namePrefix||"";function Y(){f&&ia(C,na(G+"locationchange"))}function _e(){if(R&&(x=R),R=U&&U[wa]||"",I[Ue]&&I[Ue][fn]&&(R=mr(R,I[Ue][fn])),f){var ke=D();if(ke){ke.setTraceId(ti());var Te="_unknown_";U&&U.pathname&&(Te=U.pathname+(U.hash||"")),ke.setName(gt(I[Jt](),Te))}yn((function(Ne){I[du]({refUri:Ne,properties:{duration:0}})}).bind(I,x),I.autoRoutePVDelay)}}O(Fc(y,"pushState",{ns:q,rsp:function(){f&&(ia(C,na(G+"pushState")),ia(C,na(G+"locationchange")))}},!0)),O(Fc(y,"replaceState",{ns:q,rsp:function(){f&&(ia(C,na(G+"replaceState")),ia(C,na(G+"locationchange")))}},!0)),Ir(C,G+"popstate",Y,q),Ir(C,G+"locationchange",_e,q),m=!0}function me(C,y){I[Oo](ct(v,function(){g=v[Ub]===!0,h=h||v[bh],g&&!p&&(O(Fc(C,"onunhandledrejection",{ns:q,rsp:function(U,G){g&&U.rslt!==!0&&I._onerror(Ht[ad](nT(G),y?y[wa]:"",0,0,G,U.evt))}},!1)),A++,v[bh]=p=!0)}))}function oe(C,y,U,G,Y){I[Jt]().throwInternal(C,y,U,G,Y)}function V(){r=null,i=null,o=null,s=null,a=null,c=null,u=!1,l=!1,f=!1,m=!1,d=!1,h=!1,g=!1,p=!1,_=!1,H();var C=Hn();x=C&&C[wa]||"",I[Ue]&&I[Ue][fn]&&(x=mr(x,I[Ue][fn])),R=null,q=null,v=null,A=0,Ae(I,"config",{g:function(){return v}})}Ae(I,"_pageViewManager",{g:function(){return o}}),Ae(I,"_pageViewPerformanceManager",{g:function(){return s}}),Ae(I,"_pageVisitTimeManager",{g:function(){return a}}),Ae(I,"_evtNamespace",{g:function(){return"."+q}})}),n}return e.Version="3.3.11",e})(So),gu="featureOptIn",jb="scheduleFetchTimeout";function Lb(t,e,n,r){try{var i=n>r;i&&(t=null);var o=n==0?mw({},t):t;return o&&e&&!i&&De(o,function(s){var a=e[s];a&&(Xt(o[s])&&Xt(a)?o[s]=Lb(o[s],a,++n,r):delete o[s])}),o}catch{}return t}var Ps="featureOptIn.",Wb=".mode",Vb=".onCfg",qb=".offCfg";function aT(t,e,n){var r;if(!e||!e.enabled)return null;var i=(e[gu]||{})[t]||{mode:1},o=i.mode,s=i.onCfg,a=i.offCfg,c=(n||{})[t]||{mode:2},u=c.mode,l=c.onCfg,f=c.offCfg,m=!!c.blockCdnCfg,d=Ps+t+Wb,h=Ps+t+Vb,g=Ps+t+qb,p=u,v=l,_=f;return m||(o===4||o===5?(p=o==4?3:2,v=s||l,_=a||f):o===2||u===2?(p=2,v=l||s,_=f||a):o===3?(p=3,v=l||s,_=f||a):o===1&&u===1&&(p=1)),r={},r[d]=p,r[h]=v,r[g]=_,r}function cT(t,e){try{if(!t||!t.enabled)return null;if(!t[gu])return t.config;var n=t[gu],r=t.config||{};return De(n,function(i){var o=aT(i,t,e.config[gu]);K(o)||(De(o,function(s,a){vy(r,s,a)}),uT(i,o,r))}),r}catch{}return null}function uT(t,e,n){var r=e[Ps+t+Wb],i=e[Ps+t+Vb],o=e[Ps+t+qb],s=null;r===3&&(s=i),r===2&&(s=o),s&&De(s,function(a,c){vy(n,a,c)})}var oa,lT="ai_cfgsync",Hv="GET",fT=18e5,Fo=void 0,dT={instrumentationKey:!0,connectionString:!0,endpointUrl:!0},hT=Ws((oa={syncMode:1,blkCdnCfg:Fo,customEvtName:Fo,cfgUrl:Fo,overrideSyncFn:Fo,overrideFetchFn:Fo,onCfgChangeReceive:Fo},oa[jb]=fT,oa.nonOverrideConfigs=dT,oa.enableAjax=!1,oa)),pT=(function(t){ir(e,t);function e(){var n=t.call(this)||this;n.priority=198,n.identifier="AppInsightsCfgSyncPlugin";var r,i,o,s,a,c,u,l,f,m,d,h,g,p,v,_,P=!1,x;return qe(e,n,function(R,q){A(),R.initialize=function(V,C,y,U){q.initialize(V,C,y,U),s=gi(bn(R.identifier),C.evtNamespace&&C.evtNamespace()),I(V)},R.getCfg=function(){return i},R.pause=function(){P=!0,oe()},R.resume=function(){P=!1,me()},R.setCfg=function(V){return L(V)},R.sync=function(V){return H(V)},R.updateEventListenerName=function(V){return ne(V)},R._doTeardown=function(V,C){O(),oe(),A()},R._getDbgPlgTargets=function(){return[l,u,o,f,g]};function A(){i=null,o=null,s=null,a=null,u=null,l=null,g=null,c=null,m=null,d=null,f=null,x=!1,v=null,_=null,h=null}function I(V){var C=R.identifier,y=R.core;R._addHook(ct(V,function(){var U=zn(null,V,y);r=U.getExtCfg(C,hT);var G=f;f=!!r.blkCdnCfg,x=!!r.enableAjax,!K(G)&&G!==f&&(!f&&a?p&&p(a,B,l):oe()),K(u)&&(u=r.syncMode===2),K(l)&&(l=r.syncMode===1);var Y=r.customEvtName||lT;o!==Y&&(u?ne(Y):(O(),o=Y)),K(a)&&(a=r.cfgUrl),a||(i=V,l&&H())})),_=r.overrideSyncFn,v=r.overrideFetchFn,h=r.onCfgChangeReceive,g=r.nonOverrideConfigs,m=r[jb],p=se(),d=0,a&&!f&&p&&p(a,B,l)}function L(V,C){if(V){if(i=V,C&&!P)return H();if(u&&!P)return R.core.updateCfg(V),!0}return!1}function O(){try{var V=vn();V&&Ss(V,null,null,s)}catch{}}function H(V){try{return _&&pe(_)?_(i,V):IS(o,i,V)}catch{}return!1}function ne(V){try{return O(),V&&(o=V,D()),!0}catch{}return!1}function se(){var V=v;return K(V)&&(Np()?V=b:Vl()&&(V=E)),V}function b(V,C,y){var U=vn(),G=U&&U.fetch||null;if(V&&G&&pe(G))try{var Y={method:Hv};x||(Y[Vi]=!0);var _e=new Request(V,Y);if(!x)try{_e[Vi]=!0}catch{}Kt(fetch(_e),function(ke){var Te=ke.value;ke.rejected?M(C,400):Te.ok?Kt(Te.text(),function(Ne){M(C,Te.status,Ne.value,y)}):M(C,Te.status,null,y)})}catch{}}function E(V,C,y){try{var U=new XMLHttpRequest;x||(U[Vi]=!0),U.open(Hv,V),U.onreadystatechange=function(){U.readyState===XMLHttpRequest.DONE&&M(C,U.status,U.responseText,y)},U.onerror=function(){M(C,400)},U.ontimeout=function(){M(C,400)},U.send()}catch{}}function B(V,C,y){try{if(V>=200&&V<400&&C){d=0;var U=Mn();if(U){var G=U.parse(C),Y=cT(G,R.core),_e=Y&&Ot(Y)&&ce(Y);_e&&L(_e,y)}}else d++;d<3&&me()}catch{}}function M(V,C,y,U){try{V(C,y,U)}catch{}}function D(){if(u){var V=vn();if(V)try{Ir(V,o,function(C){var y=C&&C.detail;if(h&&y)h(y);else{var U=y&&y.cfg,G=U&&Ot(U)&&ce(U);G&&L(G)}},s,!0)}catch{}}}function ce(V,C){var y=null;try{V&&(y=Lb(V,g,0,5))}catch{}return y}function me(){!c&&m&&(c=yn(function(){c=null,p(a,B,l)},m),c.unref())}function oe(){c&&c.cancel(),c=null,d=0}R.processTelemetry=function(V,C){R.processNext(V,C)}}),n}return e.__ieDyn=1,e})(So),xi="duration",St="tags",ud="deviceType",nn="data",Ar="name",cc="traceID",Pe="length",uc="stringify",Eo="measurements",Jn="dataType",xo="envelopeType",Pi="toString",ao="enqueue",co="count",Er="push",Sh="emitLineDelimitedJson",Ds="clear",pl="markAsSent",Oa="clearSent",ig="bufferOverride",sa="BUFFER_KEY",Lr="SENT_BUFFER_KEY",Qo="concat",aa="MAX_BUFFER_SIZE",ca="triggerSend",Pt="diagLog",ld="initialize",ua="_sender",la="endpointUrl",Ia="instrumentationKey",Ih="customHeaders",Hb="maxBatchSizeInBytes",kh="onunloadDisableBeacon",Th="isBeaconApiDisabled",Bb="alwaysUseXhrOverride",Kb="enableSessionStorageBuffer",$n="_buffer",Xb="onunloadDisableFetch",Gb="disableSendBeaconSplit",Vc="getSenderInst",Ii="_onError",fd="_onPartialSuccess",qc="_onSuccess",dd="itemsReceived",hd="itemsAccepted",pd="baseType",gl="sampleRate",gT="getHashCodeScore",gd="baseType",tt="baseData",bt="properties",Bv="true";function ut(t,e,n){return We(t,e,n,Ru)}function vT(t,e,n){var r=n[St]=n[St]||{},i=e.ext=e.ext||{},o=e[St]=e[St]||[],s=i.user;s&&(ut(r,Xe.userAuthUserId,s.authId),ut(r,Xe.userId,s.id||s.localId));var a=i.app;a&&ut(r,Xe.sessionId,a.sesId);var c=i.device;c&&(ut(r,Xe.deviceId,c.id||c.localId),ut(r,Xe[ud],c.deviceClass),ut(r,Xe.deviceIp,c.ip),ut(r,Xe.deviceModel,c.model),ut(r,Xe[ud],c[ud]));var u=e.ext.web;if(u){ut(r,Xe.deviceLanguage,u.browserLang),ut(r,Xe.deviceBrowserVersion,u.browserVer),ut(r,Xe.deviceBrowser,u.browser);var l=n[nn]=n[nn]||{},f=l[tt]=l[tt]||{},m=f[bt]=f[bt]||{};ut(m,"domain",u.domain),ut(m,"isManual",u.isManual?Bv:null),ut(m,"screenRes",u.screenRes),ut(m,"userConsent",u.userConsent?Bv:null)}var d=i.os;d&&(ut(r,Xe.deviceOS,d[Ar]),ut(r,Xe.deviceOSVersion,d.osVer));var h=i.trace;h&&(ut(r,Xe.operationParentId,h.parentID),ut(r,Xe.operationName,gt(t,h[Ar])),ut(r,Xe.operationId,h[cc]));for(var g={},p=o[Pe]-1;p>=0;p--){var v=o[p];De(v,function(P,x){g[P]=x}),o.splice(p,1)}De(o,function(P,x){g[P]=x});var _=Ft(Ft({},r),g);_[Xe.internalSdkVersion]||(_[Xe.internalSdkVersion]=gt(t,"javascript:".concat(mT.Version),64)),n[St]=Ry(_)}function hi(t,e,n){K(t)||De(t,function(r,i){gc(i)?n[r]=i:de(i)?e[r]=i:yc()&&(e[r]=Mn()[uc](i))})}function Po(t,e){K(t)||De(t,function(n,r){t[n]=r||e})}function Do(t,e,n,r){var i=new vk(t,r,e);ut(i,"sampleRate",n[db]),(n[tt]||{}).startTime&&(i.time=Ns(n[tt].startTime)),i.iKey=n.iKey;var o=n.iKey.replace(/-/g,"");return i[Ar]=i[Ar].replace("{0}",o),vT(t,n,i),n[St]=n[St]||[],Ry(i)}function Ro(t,e){K(e[tt])&&J(t,1,46,"telemetryItem.baseData cannot be null.")}var mT={Version:"3.3.11"};function yT(t,e,n){Ro(t,e);var r=e[tt][Eo]||{},i=e[tt][bt]||{};hi(e[nn],i,r),K(n)||Po(i,n);var o=e[tt];if(K(o))return ro(t,"Invalid input for dependency data"),null;var s=o[bt]&&o[bt][Ev]?o[bt][Ev]:"GET",a=new so(t,o.id,o.target,o[Ar],o[xi],o.success,o.responseCode,s,o.type,o.correlationContext,i,r),c=new To(so[Jn],a);return Do(t,so[xo],e,c)}function Jb(t,e,n){Ro(t,e);var r={},i={};e[gd]!==yr[Jn]&&(r.baseTypeSource=e[gd]),e[gd]===yr[Jn]?(r=e[tt][bt]||{},i=e[tt][Eo]||{}):e[tt]&&hi(e[tt],r,i),hi(e[nn],r,i),K(n)||Po(r,n);var o=e[tt][Ar],s=new yr(t,o,r,i),a=new To(yr[Jn],s);return Do(t,yr[xo],e,a)}function bT(t,e,n){Ro(t,e);var r=e[tt][Eo]||{},i=e[tt][bt]||{};hi(e[nn],i,r),K(n)||Po(i,n);var o=e[tt],s=Ht.CreateFromInterface(t,o,i,r),a=new To(Ht[Jn],s);return Do(t,Ht[xo],e,a)}function _T(t,e,n){Ro(t,e);var r=e[tt],i=r[bt]||{},o=r[Eo]||{};hi(e[nn],i,o),K(n)||Po(i,n);var s=new oo(t,r[Ar],r.average,r.sampleCount,r.min,r.max,r.stdDev,i,o),a=new To(oo[Jn],s);return Do(t,oo[xo],e,a)}function CT(t,e,n){Ro(t,e);var r,i=e[tt];!K(i)&&!K(i[bt])&&!K(i[bt][xi])?(r=i[bt][xi],delete i[bt][xi]):!K(e[nn])&&!K(e[nn][xi])&&(r=e[nn][xi],delete e[nn][xi]);var o=e[tt],s;((e.ext||{}).trace||{})[cc]&&(s=e.ext.trace[cc]);var a=o.id||s,c=o[Ar],u=o.uri,l=o[bt]||{},f=o[Eo]||{};if(K(o.refUri)||(l.refUri=o.refUri),K(o.pageType)||(l.pageType=o.pageType),K(o.isLoggedIn)||(l.isLoggedIn=o.isLoggedIn[Pi]()),!K(o[bt])){var m=o[bt];De(m,function(g,p){l[g]=p})}hi(e[nn],l,f),K(n)||Po(l,n);var d=new ui(t,c,u,r,l,f,a),h=new To(ui[Jn],d);return Do(t,ui[xo],e,h)}function wT(t,e,n){Ro(t,e);var r=e[tt],i=r[Ar],o=r.uri||r.url,s=r[bt]||{},a=r[Eo]||{};hi(e[nn],s,a),K(n)||Po(s,n);var c=new xs(t,i,o,void 0,s,a,r),u=new To(xs[Jn],c);return Do(t,xs[xo],e,u)}function ST(t,e,n){Ro(t,e);var r=e[tt].message,i=e[tt].severityLevel,o=e[tt][bt]||{},s=e[tt][Eo]||{};hi(e[nn],o,s),K(n)||Po(o,n);var a=new Es(t,r,i,o,s),c=new To(Es[Jn],a);return Do(t,Es[xo],e,c)}var Qb=(function(){function t(e,n){var r=[],i=!1,o=n.maxRetryCnt;this._get=function(){return r},this._set=function(s){return r=s,r},qe(t,this,function(s){s[ao]=function(a){if(s[co]()>=n.eventsLimitInMem){i||(J(e,2,105,"Maximum in-memory buffer size reached: "+s[co](),!0),i=!0);return}a.cnt=a.cnt||0,!(!K(o)&&a.cnt>o)&&r[Er](a)},s[co]=function(){return r[Pe]},s.size=function(){for(var a=r[Pe],c=0;c<r[Pe];c++)a+=r[c].item[Pe];return n[Sh]||(a+=2),a},s[Ds]=function(){r=[],i=!1},s.getItems=function(){return r.slice(0)},s.batchPayloads=function(a){if(a&&a[Pe]>0){var c=[];ee(a,function(l){c[Er](l.item)});var u=n[Sh]?c.join(`
|
|
13
|
+
`):"["+c.join(",")+"]";return u}return null},s.createNew=function(a,c,u){var l=r.slice(0);a=a||e,c=c||{};var f=u?new Zb(a,c):new og(a,c);return ee(l,function(m){f[ao](m)}),f}})}return t.__ieDyn=1,t})(),og=(function(t){ir(e,t);function e(n,r){var i=t.call(this,n,r)||this;return qe(e,i,function(o,s){o[pl]=function(a){s[Ds]()},o[Oa]=function(a){}}),i}return e.__ieDyn=1,e})(Qb),IT=["AI_buffer","AI_sentBuffer"],Zb=(function(t){ir(e,t);function e(r,i){var o=t.call(this,r,i)||this,s=!1,a=i==null?void 0:i.namePrefix,c=i[ig]||{getItem:dh,setItem:_b},u=c.getItem,l=c.setItem,f=i.maxRetryCnt;return qe(e,o,function(m,d){var h=x(e[sa]),g=x(e[Lr]),p=A(),v=g[Qo](p),_=m._set(h[Qo](v));_[Pe]>e[aa]&&(_[Pe]=e[aa]),q(e[Lr],[]),q(e[sa],_),m[ao]=function(L){if(m[co]()>=e[aa]){s||(J(r,2,67,"Maximum buffer size reached: "+m[co](),!0),s=!0);return}L.cnt=L.cnt||0,!(!K(f)&&L.cnt>f)&&(d[ao](L),q(e[sa],m._get()))},m[Ds]=function(){d[Ds](),q(e[sa],m._get()),q(e[Lr],[]),s=!1},m[pl]=function(L){q(e[sa],m._set(P(L,m._get())));var O=x(e[Lr]);O instanceof Array&&L instanceof Array&&(O=O[Qo](L),O[Pe]>e[aa]&&(J(r,1,67,"Sent buffer reached its maximum size: "+O[Pe],!0),O[Pe]=e[aa]),q(e[Lr],O))},m[Oa]=function(L){var O=x(e[Lr]);O=P(L,O),q(e[Lr],O)},m.createNew=function(L,O,H){H=!!H;var ne=m._get().slice(0),se=x(e[Lr]).slice(0);L=L||r,O=O||{},m[Ds]();var b=H?new e(L,O):new og(L,O);return ee(ne,function(E){b[ao](E)}),H&&b[pl](se),b};function P(L,O){var H=[],ne=[];return ee(L,function(se){ne[Er](se.item)}),ee(O,function(se){!pe(se)&&At(ne,se.item)===-1&&H[Er](se)}),H}function x(L){var O=L;return O=a?a+"_"+O:O,R(O)}function R(L){try{var O=u(r,L);if(O){var H=Mn().parse(O);if(de(H)&&(H=Mn().parse(H)),H&&Ce(H))return H}}catch(ne){J(r,1,42," storage key: "+L+", "+$e(ne),{exception:te(ne)})}return[]}function q(L,O){var H=L;try{H=a?a+"_"+H:H;var ne=JSON[uc](O);l(r,H,ne)}catch(se){l(r,H,JSON[uc]([])),J(r,2,41," storage key: "+H+", "+$e(se)+". Buffer cleared",{exception:te(se)})}}function A(){var L=[];try{return ee(IT,function(O){var H=I(O);if(L=L[Qo](H),a){var ne=a+"_"+O,se=I(ne);L=L[Qo](se)}}),L}catch(O){J(r,2,41,"Transfer events from previous buffers: "+$e(O)+". previous Buffer items can not be removed",{exception:te(O)})}return[]}function I(L){try{var O=R(L),H=[];return ee(O,function(ne){var se={item:ne,cnt:0};H[Er](se)}),Cb(r,L),H}catch{}return[]}}),o}var n;return n=e,e.VERSION="_1",e.BUFFER_KEY="AI_buffer"+n.VERSION,e.SENT_BUFFER_KEY="AI_sentBuffer"+n.VERSION,e.MAX_BUFFER_SIZE=2e3,e})(Qb),kT=(function(){function t(e){qe(t,this,function(n){n.serialize=function(s){var a=r(s,"root");try{return Mn()[uc](a)}catch(c){J(e,1,48,c&&pe(c[Pi])?c[Pi]():"Error serializing object",null,!0)}};function r(s,a){var c="__aiCircularRefCheck",u={};if(!s)return J(e,1,48,"cannot serialize object because it is null or undefined",{name:a},!0),u;if(s[c])return J(e,2,50,"Circular reference detected while serializing object",{name:a},!0),u;if(!s.aiDataContract){if(a==="measurements")u=o(s,"number",a);else if(a==="properties")u=o(s,"string",a);else if(a==="tags")u=o(s,"string",a);else if(Ce(s))u=i(s,a);else{J(e,2,49,"Attempting to serialize an object which does not implement ISerializable",{name:a},!0);try{Mn()[uc](s),u=s}catch(l){J(e,1,48,l&&pe(l[Pi])?l[Pi]():"Error serializing object",null,!0)}}return u}return s[c]=!0,De(s.aiDataContract,function(l,f){var m=pe(f)?f()&1:f&1,d=pe(f)?f()&4:f&4,h=f&2,g=s[l]!==void 0,p=Xt(s[l])&&s[l]!==null;if(m&&!g&&!h)J(e,1,24,"Missing required field specification. The field is required but not present on source",{field:l,name:a});else if(!d){var v=void 0;p?h?v=i(s[l],l):v=r(s[l],l):v=s[l],v!==void 0&&(u[l]=v)}}),delete s[c],u}function i(s,a){var c;if(s)if(!Ce(s))J(e,1,54,`This field was specified as an array in the contract but the item is not an array.\r
|
|
14
|
+
`,{name:a},!0);else{c=[];for(var u=0;u<s[Pe];u++){var l=s[u],f=r(l,a+"["+u+"]");c[Er](f)}}return c}function o(s,a,c){var u;return s&&(u={},De(s,function(l,f){if(a==="string")f===void 0?u[l]="undefined":f===null?u[l]="null":f[Pi]?u[l]=f[Pi]():u[l]="invalid field: toString() is not defined.";else if(a==="number")if(f===void 0)u[l]="undefined";else if(f===null)u[l]="null";else{var m=parseFloat(f);u[l]=m}else u[l]="invalid field: "+c+" is of unknown type.",J(e,1,u[l],null,!0)})),u}})}return t.__ieDyn=1,t})(),TT=8,ET=(function(){function t(){}return t.prototype.getHashCodeScore=function(e){var n=this.getHashCode(e)/t.INT_MAX_VALUE;return n*100},t.prototype.getHashCode=function(e){if(e==="")return 0;for(;e[Pe]<TT;)e=e[Qo](e);for(var n=5381,r=0;r<e[Pe];++r)n=(n<<5)+n+e.charCodeAt(r),n=n&n;return Math.abs(n)},t.INT_MAX_VALUE=2147483647,t})(),xT=(function(){function t(){var e=this,n=new ET,r=new Db;e.getSamplingScore=function(i){var o=0;return i[St]&&i[St][r.userId]?o=n.getHashCodeScore(i[St][r.userId]):i.ext&&i.ext.user&&i.ext.user.id?o=n[gT](i.ext.user.id):i[St]&&i[St][r.operationId]?o=n.getHashCodeScore(i[St][r.operationId]):i.ext&&i.ext.telemetryTrace&&i.ext.telemetryTrace[cc]?o=n.getHashCodeScore(i.ext.telemetryTrace[cc]):o=Math.random()*100,o}}return t})(),PT=(function(){function t(e,n){this.INT_MAX_VALUE=2147483647;var r=n||wo(null);(e>100||e<0)&&(r.throwInternal(2,58,"Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.",{samplingRate:e},!0),e=100),this[gl]=e,this.samplingScoreGenerator=new xT}return t.prototype.isSampledIn=function(e){var n=this[gl],r=!1;return n==null||n>=100||e.baseType===oo[Jn]?!0:(r=this.samplingScoreGenerator.getSamplingScore(e)<n,r)},t})(),Be,lr,In=void 0,Kv="",DT=65e3;function Xv(t){try{return t.responseText}catch{}return null}function RT(t){return t&&t.sendPOST}var Gv=Ws((Be={endpointUrl:Yu(Ru,Gp+Is)},Be[Sh]=dt(),Be.maxBatchInterval=15e3,Be[Hb]=102400,Be.disableTelemetry=dt(),Be[Kb]=dt(!0),Be.isRetryDisabled=dt(),Be[Th]=dt(!0),Be[Gb]=dt(!0),Be.disableXhr=dt(),Be[Xb]=dt(),Be[kh]=dt(),Be[Ia]=In,Be.namePrefix=In,Be.samplingPercentage=Yu(AT,100),Be[Ih]=In,Be.convertUndefined=In,Be.eventsLimitInMem=1e4,Be[ig]=!1,Be.httpXHROverride={isVal:RT,v:In},Be[Bb]=dt(),Be.transports=In,Be.retryCodes=In,Be.corsPolicy=In,Be.maxRetryCnt={isVal:gc,v:10},Be)),Jv="X-Set-Cross-Origin-Resource-Policy";function AT(t){return!isNaN(t)&&t>0&&t<=100}var MT=(lr={},lr[yr.dataType]=Jb,lr[Es.dataType]=ST,lr[ui.dataType]=CT,lr[xs.dataType]=wT,lr[Ht.dataType]=bT,lr[oo.dataType]=_T,lr[so.dataType]=yT,lr),zT=(function(t){ir(e,t);function e(){var n=t.call(this)||this;n.priority=1001,n.identifier=Rb;var r,i,o,s,a,c,u,l,f=0,m,d,h,g,p,v,_,P,x,R,q,A,I,L,O,H,ne,se,b,E,B,M,D,ce,me,oe,V,C;return qe(e,n,function(y,U){wc(),y.pause=function(){_t(),s=!0},y.resume=function(){s&&(s=!1,i=null,z(),He())},y.flush=function(T,F,Q){if(T===void 0&&(T=!0),!s){_t();try{var ae=y[ca](T,null,Q||1);return Kt(ae,function(ge){return F?(F(!ge.rejected),!0):T?Zn(function(ve){ve(!ge.rejected)}):ae})}catch(ge){J(y[Pt](),1,22,"flush failed, telemetry will not be collected: "+$e(ge),{exception:te(ge)})}}},y.onunloadFlush=function(){if(!s)if(_||E)try{return y[ca](!0,X,2)}catch(T){J(y[Pt](),1,20,"failed to flush with beacon sender on page unload, telemetry will not be collected: "+$e(T),{exception:te(T)})}else y.flush(!1)},y.addHeader=function(T,F){l[T]=F},y[ld]=function(T,F,Q,ae){y.isInitialized()&&J(y[Pt](),1,28,"Sender is already initialized"),U[ld](T,F,Q,ae);var ge=y.identifier;c=new kT(F.logger),r=0,i=null,o=0,y[ua]=null,u=0;var ve=y[Pt]();h=gi(bn("Sender"),F.evtNamespace&&F.evtNamespace()),d=Lk(h),y._addHook(ct(T,function(ze){var Qe=ze.cfg;Qe.storagePrefix&&tg(Qe.storagePrefix);var Wt=zn(null,Qe,F),we=Wt.getExtCfg(ge,Gv),Hs=we[la];if(g&&Hs===g){var sr=Qe[la];sr&&sr!==Hs&&(we[la]=sr)}var Bs=nt("CompressionStream");C=su("zipPayload",Qe,!1),pe(Bs)||(C=!1);var mi=we.corsPolicy;mi?(mi==="same-origin"||mi==="same-site"||mi==="cross-origin")&&n.addHeader(Jv,mi):delete l[Jv],fi(we[Ia])&&(we[Ia]=Qe[Ia]),Ae(y,"_senderConfig",{g:function(){return we}}),p!==we[la]&&(g=p=we[la]),F.activeStatus()===Kr.PENDING?y.pause():F.activeStatus()===Kr.ACTIVE&&y.resume(),R&&R!==we[Ih]&&ee(R,function(Ct){delete l[Ct.header]}),v=we[Hb],_=(we[kh]===!1||we[Th]===!1)&&ma(),P=we[kh]===!1&&ma(),x=we[Th]===!1&&ma(),E=we[Bb],B=!!we.disableXhr,V=we.retryCodes;var Yl=we[ig],Mo=!!we[Kb]&&(!!Yl||oc()),sg=we.namePrefix,O_=Mo!==H||Mo&&se!==sg||Mo&&ne!==Yl;if(y[$n]){if(O_)try{y[$n]=y[$n].createNew(ve,we,Mo)}catch(Ct){J(y[Pt](),1,12,"failed to transfer telemetry to different buffer storage, telemetry will be lost: "+$e(Ct),{exception:te(Ct)})}z()}else y[$n]=Mo?new Zb(ve,we):new og(ve,we);se=sg,H=Mo,ne=Yl,M=!we[Xb]&&Np(!0),me=!!we[Gb],y._sample=new PT(we.samplingPercentage,ve),A=we[Ia],!fi(A)&&!Ao(A,Qe)&&J(ve,1,100,"Invalid Instrumentation key "+A),R=we[Ih],de(g)&&!fh(g)&&R&&R[Pe]>0?ee(R,function(Ct){n.addHeader(Ct.header,Ct.value)}):R=null,b=we.enableSendPromise;var ag=Y();oe?oe.SetConfig(ag):(oe=new NI,oe[ld](ag,ve));var Sc=we.httpXHROverride,Ic=null,Ks=null,F_=Kg([3,1,2],we.transports);Ic=oe&&oe[Vc](F_,!1);var ef=oe&&oe.getFallbackInst();D=function(Ct,yi){return ue(ef,Ct,yi)},ce=function(Ct,yi){return ue(ef,Ct,yi,!1)},Ic=E?Sc:Ic||Sc||ef,y[ua]=function(Ct,yi){return ue(Ic,Ct,yi)},M&&(m=Ie);var tf=Kg([3,1],we.unloadTransports);M||(tf=tf.filter(function(Ct){return Ct!==2})),Ks=oe&&oe[Vc](tf,!0),Ks=E?Sc:Ks||Sc,(E||we.unloadTransports||!m)&&Ks&&(m=function(Ct,yi){return ue(Ks,Ct,yi)}),m||(m=D),q=we.disableTelemetry,I=we.convertUndefined||In,L=we.isRetryDisabled,O=we.maxBatchInterval}))},y.processTelemetry=function(T,F){F=y._getTelCtx(F);var Q=F[Pt]();try{var ae=je(T,Q);if(!ae)return;var ge=Le(T,Q);if(!ge)return;var ve=c.serialize(ge),ze=y[$n];z(ve);var Qe={item:ve,cnt:0};ze[ao](Qe),He()}catch(Wt){J(Q,2,12,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+$e(Wt),{exception:te(Wt)})}y.processNext(T,F)},y.isCompletelyIdle=function(){return!s&&f===0&&y._buffer[co]()===0},y.getOfflineListener=function(){return d},y._xhrReadyStateChange=function(T,F,Q){if(!fe(F))return _e(T,F,Q)},y[ca]=function(T,F,Q){T===void 0&&(T=!0);var ae;if(!s)try{var ge=y[$n];if(q)ge[Ds]();else{if(ge[co]()>0){var ve=ge.getItems();Lt(Q||0,T),F?ae=F.call(y,ve,T):ae=y[ua](ve,T)}o=+new Date}_t()}catch(Qe){var ze=$y();(!ze||ze>9)&&J(y[Pt](),1,40,"Telemetry transmission failed, some telemetry will be lost: "+$e(Qe),{exception:te(Qe)})}return ae},y.getOfflineSupport=function(){return{getUrl:function(){return g},createPayload:un,serialize:xt,batch:or,shouldProcess:function(T){return!!je(T)}}},y._doTeardown=function(T,F){y.onunloadFlush(),fs(d,!1),wc()},y[Ii]=function(T,F,Q){if(!fe(T))return ke(T,F)},y[fd]=function(T,F){if(!fe(T))return Te(T,F)},y[qc]=function(T,F){if(!fe(T))return Ne(T)},y._xdrOnLoad=function(T,F){if(!fe(F))return G(T,F)};function G(T,F){var Q=Xv(T);if(T&&(Q+""=="200"||Q===""))r=0,y[qc](F,0);else{var ae=Kf(Q);ae&&ae[dd]&&ae[dd]>ae[hd]&&!L?y[fd](F,ae):y[Ii](F,My(T))}}function Y(){try{var T={xdrOnComplete:function(Q,ae,ge){var ve=Et(ge);if(ve)return G(Q,ve)},fetchOnComplete:function(Q,ae,ge,ve){var ze=Et(ve);if(ze)return W(Q.status,ze,Q.url,ze[Pe],Q.statusText,ge||"")},xhrOnComplete:function(Q,ae,ge){var ve=Et(ge);if(ve)return _e(Q,ve,ve[Pe])},beaconOnRetry:function(Q,ae,ge){return ie(Q,ae,ge)}},F={enableSendPromise:b,isOneDs:!1,disableCredentials:!1,disableXhr:B,disableBeacon:!x,disableBeaconSync:!P,senderOnCompleteCallBack:T};return F}catch{}return null}function _e(T,F,Q){T.readyState===4&&W(T.status,F,T.responseURL,Q,Ju(T),Xv(T)||T.response)}function ke(T,F,Q){J(y[Pt](),2,26,"Failed to send telemetry.",{message:F}),y._buffer&&y._buffer[Oa](T)}function Te(T,F){for(var Q=[],ae=[],ge=F.errors.reverse(),ve=0,ze=ge;ve<ze.length;ve++){var Qe=ze[ve],Wt=T.splice(Qe.index,1)[0];Un(Qe.statusCode)?ae[Er](Wt):Q[Er](Wt)}T[Pe]>0&&y[qc](T,F[hd]),Q[Pe]>0&&y[Ii](Q,Ju(null,["partial success",F[hd],"of",F.itemsReceived].join(" "))),ae[Pe]>0&&(ye(ae),J(y[Pt](),2,40,"Partial success. Delivered: "+T[Pe]+", Failed: "+Q[Pe]+". Will retry to send "+ae[Pe]+" our of "+F[dd]+" items"))}function Ne(T,F){y._buffer&&y._buffer[Oa](T)}function Et(T){try{if(T){var F=T,Q=F.oriPayload;return Q&&Q[Pe]?Q:null}}catch{}return null}function je(T,F){if(q)return!1;if(!T)return F&&J(F,1,7,"Cannot send empty telemetry"),!1;if(T.baseData&&!T[pd])return F&&J(F,1,70,"Cannot send telemetry without baseData and baseType"),!1;if(T[pd]||(T[pd]="EventData"),!y[ua])return F&&J(F,1,28,"Sender was not initialized"),!1;if($(T))T[db]=y._sample[gl];else return F&&J(F,2,33,"Telemetry item was sampled out and not sent",{SampleRate:y._sample[gl]}),!1;return!0}function Le(T,F){var Q=T.iKey||A,ae=e.constructEnvelope(T,Q,F,I);if(!ae){J(F,1,47,"Unable to create an AppInsights envelope");return}var ge=!1;if(T[St]&&T[St][Jf]&&(ee(T[St][Jf],function(ve){try{ve&&ve(ae)===!1&&(ge=!0,ro(F,"Telemetry processor check returns false"))}catch(ze){J(F,1,64,"One of telemetry initializers failed, telemetry item will not be sent: "+$e(ze),{exception:te(ze)},!0)}}),delete T[St][Jf]),!ge)return ae}function xt(T){var F=Kv,Q=y[Pt]();try{var ae=je(T,Q),ge=null;ae&&(ge=Le(T,Q)),ge&&(F=c.serialize(ge))}catch{}return F}function or(T){var F=Kv;return T&&T[Pe]&&(F="["+T.join(",")+"]"),F}function un(T){var F=S();return{urlString:g,data:T,headers:F}}function $(T){return y._sample.isSampledIn(T)}function Z(T,F,Q,ae){F===200&&T?y._onSuccess(T,T[Pe]):ae&&y[Ii](T,ae)}function ue(T,F,Q,ae){ae===void 0&&(ae=!0);var ge=function(sr,Bs,mi){return Z(F,sr,Bs,mi)},ve=re(F),ze=T&&T.sendPOST;if(ze&&ve){ae&&y._buffer[pl](F);var Qe,Wt=!1,we,Hs;return oe.preparePayload(function(sr){Qe=ze(sr,ge,!Q),Wt=!0,we&&Up(Qe,we,Hs)},C,ve,!Q),Wt?Qe:Zn(function(sr,Bs){we=sr,Hs=Bs})}return null}function re(T){if(Ce(T)&&T[Pe]>0){var F=y[$n].batchPayloads(T),Q=S(),ae={data:F,urlString:g,headers:Q,disableXhrSync:B,disableFetchKeepAlive:!M,oriPayload:T};return ae}return null}function S(){try{var T=l||{};return fh(g)&&(T[Fe[6]]=Fe[7]),T}catch{}return null}function z(T){var F=T?T[Pe]:0;return y[$n].size()+F>v?((!d||d.isOnline())&&y[ca](!0,null,10),!0):!1}function W(T,F,Q,ae,ge,ve){var ze=null;if(y._appId||(ze=Kf(ve),ze&&ze.appId&&(y._appId=ze.appId)),(T<200||T>=300)&&T!==0){if((T===301||T===307||T===308)&&!j(Q)){y[Ii](F,ge);return}if(d&&!d.isOnline()){if(!L){var Qe=10;ye(F,Qe),J(y[Pt](),2,40,". Offline - Response Code: ".concat(T,". Offline status: ").concat(!d.isOnline(),". Will retry to send ").concat(F.length," items."))}return}!L&&Un(T)?(ye(F),J(y[Pt](),2,40,". Response code "+T+". Will retry to send "+F[Pe]+" items.")):y[Ii](F,ge)}else j(Q),T===206?(ze||(ze=Kf(ve)),ze&&!L?y[fd](F,ze):y[Ii](F,ge)):(r=0,y[qc](F,ae))}function j(T){return u>=10?!1:!K(T)&&T!==""&&T!==g?(g=T,++u,!0):!1}function X(T,F){if(m)m(T,!1);else{var Q=oe&&oe[Vc]([3],!0);return ue(Q,T,F)}}function ie(T,F,Q){var ae=T,ge=ae&&ae.oriPayload;if(me)ce&&ce(ge,!0),J(y[Pt](),2,40,". Failed to send telemetry with Beacon API, retried with normal sender.");else{for(var ve=[],ze=0;ze<ge[Pe];ze++){var Qe=ge[ze],Wt=[Qe],we=re(Wt);Q(we,F)?y._onSuccess(Wt,Wt[Pe]):ve[Er](Qe)}ve[Pe]>0&&(ce&&ce(ve,!0),J(y[Pt](),2,40,". Failed to send telemetry with Beacon API, retried with normal sender."))}}function fe(T){try{if(T&&T[Pe])return de(T[0])}catch{}return null}function Ie(T,F){var Q=null;if(Ce(T)){for(var ae=T[Pe],ge=0;ge<T[Pe];ge++)ae+=T[ge].item[Pe];var ve=oe.getSyncFetchPayload();ve+ae<=DT?Q=2:ma()?Q=3:(Q=1,J(y[Pt](),2,40,". Failed to send telemetry with Beacon API, retried with xhrSender."));var ze=oe&&oe[Vc]([Q],!0);return ue(ze,T,F)}return null}function ye(T,F){if(F===void 0&&(F=1),!(!T||T[Pe]===0)){var Q=y[$n];Q[Oa](T),r++;for(var ae=0,ge=T;ae<ge.length;ae++){var ve=ge[ae];ve.cnt=ve.cnt||0,ve.cnt++,Q[ao](ve)}Oe(F),He()}}function Oe(T){var F=10,Q;if(r<=1)Q=F;else{var ae=(Math.pow(2,r)-1)/2,ge=an(Math.random()*ae*F)+1;ge=T*ge,Q=za(ry(ge,3600),F)}var ve=An()+Q*1e3;i=ve}function He(){if(!a&&!s){var T=i?za(0,i-An()):0,F=za(O,T);a=yn(function(){a=null,y[ca](!0,null,1)},F)}}function _t(){a&&a.cancel(),a=null,i=null}function Un(T){return K(V)?T===401||T===408||T===429||T===500||T===502||T===503||T===504:V[Pe]&&V.indexOf(T)>-1}function Nn(){var T="getNotifyMgr",F,Q=y.core;return Q&&(Q[T]?F=Q[T]():F=Q._notificationManager),F}function Lt(T,F){var Q=Nn();if(Q&&Q.eventsSendRequest)try{Q.eventsSendRequest(T,F)}catch(ae){J(y[Pt](),1,74,"send request notification failed: "+$e(ae),{exception:te(ae)})}}function Ao(T,F){var Q=F.disableInstrumentationKeyValidation,ae=K(Q)?!1:Q;if(ae)return!0;var ge="^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",ve=new RegExp(ge);return ve.test(T)}function wc(){y[ua]=null,y[$n]=null,y._appId=null,y._sample=null,l={},d=null,r=0,i=null,o=null,s=!1,a=null,c=null,u=0,f=0,m=null,h=null,g=null,p=null,v=0,_=!1,R=null,q=!1,A=null,I=In,L=!1,H=null,se=In,B=!1,M=!1,me=!1,D=null,ce=null,oe=null,Ae(y,"_senderConfig",{g:function(){return Ay({},Gv)}})}}),n}return e.constructEnvelope=function(n,r,i,o){var s;r!==n.iKey&&!K(r)?s=Ft(Ft({},n),{iKey:r}):s=n;var a=MT[s.baseType]||Jb;return a(i,s,o)},e})(So),Qv="duration",js="properties",xn="requestUrl",qi="length",ni="traceID",ri="spanID",Dn="traceFlags",Fa="context",Rs="aborted",Hc="_addHook",Qt="core",vd="includeCorrelationHeaders",Eh="getAbsoluteUrl",ki="headers",hn="requestHeaders",md="setRequestHeader",Zv="trackDependencyDataInternal",hs="startTime",jo="toLowerCase",xh="enableRequestHeaderTracking",Yb="enableAjaxErrorStatusText",e_="enableAjaxPerfTracking",t_="maxAjaxCallsPerView",n_="excludeRequestFromAutoTrackingPatterns",Ph="disableAjaxTracking",r_="ajaxPerfLookupDelay",i_="disableFetchTracking",o_="enableResponseHeaderTracking",En="status",$i="statusText",vl="headerMap",Hi="requestSentTime",Dh="getTraceId",Rh="getTraceFlags",Yr="method",Ah="errorStatusText",s_="stateChangeAttached",Yv="responseText",ka="responseFinishedTime",Mh="CreateTrackItem",em="getAllResponseHeaders",zh="getPartAProps",ml="perfMark",Uh="perfTiming",Nh="ajaxDiagnosticsMessage",$h="correlationContext",yd="ajaxTotalDuration",bd="eventTraceCtx";function a_(t,e,n){var r=0,i=t[e],o=t[n];return i&&o&&(r=qt(i,o)),r}function Ti(t,e,n,r,i){var o=0,s=a_(n,r,i);return s&&(o=Hr(t,e,Zr(s))),o}function Hr(t,e,n){var r="ajaxPerf",i=0;if(t&&e&&n){var o=t[r]=t[r]||{};o[e]=n,i=1}return i}function UT(t,e){var n=t[Uh],r=e[js]||{},i=0,o="name",s="Start",a="End",c="domainLookup",u="connect",l="redirect",f="request",m="response",d="startTime",h=c+s,g=c+a,p=u+s,v=u+a,_=f+s,P=f+a,x=m+s,R=m+a,q=l+s,A=l=a,I="transferSize",L="encodedBodySize",O="decodedBodySize",H="serverTiming";if(n){i|=Ti(r,l,n,q,A),i|=Ti(r,c,n,h,g),i|=Ti(r,u,n,p,v),i|=Ti(r,f,n,_,P),i|=Ti(r,m,n,x,R),i|=Ti(r,"networkConnect",n,d,v),i|=Ti(r,"sentRequest",n,_,R);var ne=n[Qv];ne||(ne=a_(n,d,R)||0),i|=Hr(r,Qv,ne),i|=Hr(r,"perfTotal",ne);var se=n[H];if(se){var b={};ee(se,function(E,B){var M=Ku(E[o]||""+B),D=b[M]||{};De(E,function(ce,me){(ce!==o&&de(me)||gc(me))&&(D[ce]&&(me=D[ce]+";"+me),(me||!de(me))&&(D[ce]=me))}),b[M]=D}),i|=Hr(r,H,b)}i|=Hr(r,I,n[I]),i|=Hr(r,L,n[L]),i|=Hr(r,O,n[O])}else t[ml]&&(i|=Hr(r,"missing",t.perfAttempts));i&&(e[js]=r)}var NT=(function(){function t(){var e=this;e.openDone=!1,e.setRequestHeaderDone=!1,e.sendDone=!1,e.abortDone=!1,e[s_]=!1}return t})(),tm=(function(){function t(e,n,r,i){var o=this,s=r,a="responseText";o[ml]=null,o.completed=!1,o.requestHeadersSize=null,o[hn]=null,o.responseReceivingDuration=null,o.callbackDuration=null,o[yd]=null,o[Rs]=0,o.pageUrl=null,o[xn]=null,o.requestSize=0,o[Yr]=null,o[En]=null,o[Hi]=null,o.responseStartedTime=null,o[ka]=null,o.callbackFinishedTime=null,o.endTime=null,o.xhrMonitoringState=new NT,o.clientFailure=0,o[ni]=e,o[ri]=n,o[Dn]=i==null?void 0:i.getTraceFlags(),i?o[bd]={traceId:i[Dh](),spanId:i.getSpanId(),traceFlags:i[Rh]()}:o[bd]=null,qe(t,o,function(c){c.getAbsoluteUrl=function(){return c[xn]?nk(c[xn]):null},c.getPathName=function(){return c[xn]?Xl(s,rk(c[Yr],c[xn])):null},c[Mh]=function(u,l,f){var m;if(c.ajaxTotalDuration=my(qt(c.requestSentTime,c.responseFinishedTime)*1e3)/1e3,c[yd]<0)return null;var d=(m={id:"|"+c[ni]+"."+c[ri],target:c[Eh](),name:c.getPathName(),type:u,startTime:null,duration:c[yd],success:+c[En]>=200&&+c[En]<400,responseCode:+c[En]},m[js]={HttpMethod:c[Yr]},m),h=d[js];if(c[Rs]&&(h[Rs]=!0),c[Hi]&&(d[hs]=new Date,d[hs].setTime(c[Hi])),UT(c,d),l&&wr(c.requestHeaders)[qi]>0&&(h[hn]=c[hn]),f){var g=f();if(g){var p=g[$h];if(p&&(d.correlationContext=p),g[vl]&&wr(g.headerMap)[qi]>0&&(h.responseHeaders=g[vl]),c[Ah])if(c[En]>=400){var v=g.type;(v===""||v==="text")&&(h.responseText=g.responseText?g[$i]+" - "+g[a]:g[$i]),v==="json"&&(h.responseText=g.response?g[$i]+" - "+JSON.stringify(g.response):g[$i])}else c[En]===0&&(h.responseText=g[$i]||"")}}return d},c[zh]=function(){var u=null,l=c[bd];if(l&&(l.traceId||l.spanId)){u={};var f=u[Zt.TraceExt]={traceID:l.traceId,parentID:l.spanId};K(l[Dn])||(f[Dn]=l[Dn])}return u}})}return t.__ieDyn=1,t})(),st,ja="diagLog",li="_ajaxData",Oi="fetch",fa="Failed to monitor XMLHttpRequest",c_=", monitoring data for this ajax call ",Lo=c_+"may be incorrect.",nm=c_+"won't be sent.",rm="Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",im="Failed to add custom defined request context as configured call back may missing a null check.",om="Failed to calculate the duration of the ",sm=0;function $T(){var t=vn();return!t||K(t.Request)||K(t.Request[Kn])||K(t[Oi])?null:t[Oi]}function OT(t,e){var n,r=!1;if(Vl()){var i=XMLHttpRequest[Kn];r=!K(i)&&!K(i.open)&&!K(i.send)&&!K(i.abort)}var o=$y();if(o&&o<9&&(r=!1),r)try{var s=new XMLHttpRequest,a={xh:[],i:(n={},n[e]={},n)};s[li]=a;var c=XMLHttpRequest[Kn].open;XMLHttpRequest[Kn].open=c}catch(u){r=!1,La(t,15,"Failed to enable XMLHttpRequest monitoring, extension is not supported",{exception:te(u)})}return r}var Zo=function(t,e){return t&&e&&t[li]?(t[li].i||{})[e]:null},FT=function(t,e,n){if(t){var r=(t[li]||{}).xh;r&&r.push({n:e,v:n})}},_d=function(t,e){var n=!1;if(t){var r=(t[li]||{}).xh;r&&ee(r,function(i){if(i.n===e)return n=!0,-1})}return n};function vu(t,e){var n="";try{var r=Zo(t,e);r&&r[xn]&&(n+="(url: '"+r[xn]+"')")}catch{}return n}function La(t,e,n,r,i){J(t[ja](),1,e,n,r,i)}function fr(t,e,n,r,i){J(t[ja](),2,e,n,r,i)}function da(t,e,n){return function(r){var i;La(t,e,n,(i={},i[Nh]=vu(r.inst,t._ajaxDataId),i.exception=te(r.err),i))}}function Wo(t,e){return t&&e?at(t,e):-1}function am(t,e,n){var r={id:e,fn:n};return t.push(r),{remove:function(){ee(t,function(i,o){if(i.id===r.id)return t.splice(o,1),-1})}}}function u_(t,e,n,r){var i=!0;return ee(e,function(o,s){try{o.fn.call(null,n)===!1&&(i=!1)}catch(a){J(t&&t.logger,1,64,"Dependency "+r+" [#"+s+"] failed: "+$e(a),{exception:te(a)},!0)}}),i}function jT(t,e,n,r,i,o){var s=t[qi],a=!0;if(s>0){var c={core:e,xhr:r,input:i,init:o,traceId:n[ni],spanId:n[ri],traceFlags:n[Dn],context:n[Fa]||{},aborted:!!n[Rs]};a=u_(e,t,c,"listener"),n[ni]=c.traceId,n[ri]=c.spanId,n[Dn]=c[Dn],n[Fa]=c[Fa]}return a}var Bc="*.blob.core.",LT=Rn([Bc+"windows.net",Bc+"chinacloudapi.cn",Bc+"cloudapi.de",Bc+"usgovcloudapi.net"]),WT=[/https:\/\/[^\/]*(\.pipe\.aria|aria\.pipe|events\.data|collector\.azure)\.[^\/]+\/(OneCollector\/1|Collector\/3)\.0/i],VT=Rn((st={},st[t_]=500,st[Ph]=!1,st[i_]=!1,st[n_]=void 0,st.disableCorrelationHeaders=!1,st.distributedTracingMode=1,st.correlationHeaderExcludedDomains=LT,st.correlationHeaderDomains=void 0,st.correlationHeaderExcludePatterns=void 0,st.appId=void 0,st.enableCorsCorrelation=!1,st[xh]=!1,st[o_]=!1,st[Yb]=!1,st[e_]=!1,st.maxAjaxPerfLookupAttempts=3,st[r_]=25,st.ignoreHeaders=["Authorization","X-API-Key","WWW-Authenticate"],st.addRequestContext=void 0,st.addIntEndpoints=!0,st)),qT=(function(t){ir(e,t);function e(){var n=t.call(this)||this;n.identifier=e.identifier,n.priority=120;var r,i,o,s,a,c,u,l,f,m,d,h,g,p,v,_,P,x,R,q,A,I,L,O,H,ne,se,b,E,B;return qe(e,n,function(M,D){var ce=D[Hc];me(),M.initialize=function(S,z,W,j){M.isInitialized()||(D.initialize(S,z,W,j),q=gi(bn("ajax"),z&&z.evtNamespace&&z.evtNamespace()),oe(S),G(),y(),V())},M._doTeardown=function(){me()},M.trackDependencyData=function(S,z){re(O,M[Qt],null,S,z)},M.resetAjaxAttempts=function(){u=0},M[vd]=function(S,z,W,j){var X=M._currentWindowHost||o;if(jT(L,M[Qt],S,j,z,W)){if(z||z===""){if(Rv(s,S[Eh](),X)){W||(W={});var ie=new Headers(W[ki]||(z instanceof Request?z[ki]||{}:{}));if(m){var fe="|"+S[ni]+"."+S[ri];ie.set(Fe[3],fe),a&&(S[hn][Fe[3]]=fe)}var Ie=E||l&&l.appId();if(Ie&&(ie.set(Fe[0],Fe[2]+Ie),a&&(S[hn][Fe[0]]=Fe[2]+Ie)),f){var ye=S[Dn];K(ye)&&(ye=1);var Oe=lv(uv(S[ni],S[ri],ye));ie.set(Fe[4],Oe),a&&(S[hn][Fe[4]]=Oe)}W[ki]=ie}}else if(j&&Rv(s,S[Eh](),X)){if(m)if(_d(j,Fe[3]))fr(M,71,"Unable to set ["+Fe[3]+"] as it has already been set by another instance");else{var fe="|"+S[ni]+"."+S[ri];j[md](Fe[3],fe),a&&(S[hn][Fe[3]]=fe)}var Ie=E||l&&l.appId();if(Ie&&(_d(j,Fe[0])?fr(M,71,"Unable to set ["+Fe[0]+"] as it has already been set by another instance"):(j[md](Fe[0],Fe[2]+Ie),a&&(S[hn][Fe[0]]=Fe[2]+Ie))),f){var ye=S[Dn];if(K(ye)&&(ye=1),_d(j,Fe[4]))fr(M,71,"Unable to set ["+Fe[4]+"] as it has already been set by another instance");else{var Oe=lv(uv(S[ni],S[ri],ye));j[md](Fe[4],Oe),a&&(S[hn][Fe[4]]=Oe)}}}}return j||W},M[Zv]=function(S,z,W){if(g===-1||u<g){(b===2||b===1)&&typeof S.id=="string"&&S.id[S.id[qi]-1]!=="."&&(S.id+="."),K(S[hs])&&(S[hs]=new Date);var j=qr(S,so.dataType,so.envelopeType,M[ja](),z,W);M[Qt].track(j)}else u===g&&La(M,55,"Maximum ajax per page view limit reached, ajax monitoring is paused until the next trackPageView(). In order to increase the limit set the maxAjaxCallsPerView configuration parameter.",!0);++u},M.addDependencyListener=function(S){return am(L,I++,S)},M.addDependencyInitializer=function(S){return am(O,I++,S)};function me(){var S=Hn();r=!1,i=!1,B=!1,o=S&&S.host&&S.host[jo](),s=null,a=!1,c=!1,u=0,l=null,f=!1,m=!1,d=null,h=!1,g=0,p=!1,v={},_=!1,P=!1,x=null,R=null,q=null,I=0,L=[],O=[],A=bn("ajaxData"),M._ajaxDataId=A,H=null,ne=1,se=1,b=1,E=null}function oe(S){M[Hc](ct(S,function(z){var W=z.cfg,j=zn(null,W,M[Qt]);s=j.getExtCfg(e.identifier,VT),b=s.distributedTracingMode,a=s[xh],c=s[Yb],h=s[e_],g=s[t_],x=[].concat(s[n_]||[],s.addIntEndpoints!==!1?WT:[]),R=s.addRequestContext,m=b===0||b===1,f=b===1||b===2,h&&(d=A),_=!!s[Ph],ne=s.maxAjaxPerfLookupAttempts,se=s[r_],H=s.ignoreHeaders,E=s.appId}))}function V(){var S=M[Qt].getPlugin(Ql);S&&(l=S.plugin[Fa])}function C(S){var z=!0;return(S||H)&&ee(H,(function(W){if(W[jo]()===S[jo]())return z=!1,-1})),z}function y(){var S=$T();if(S){var z=vn(),W=S.polyfill;M[Hc](ct(s,function(){P=!!s[i_],p=s[o_],!P&&!r?(ce(lh(z,Oi,{ns:q,req:function(j,X,ie){var fe;if(!P&&r&&!Y(null,X,ie)&&!(W&&i)){var Ie=j.ctx();fe=un(X,ie);var ye=M[vd](fe,X,ie);ye!==ie&&j.set(1,ye),Ie.data=fe}},rsp:function(j,X){if(!P){var ie=j.ctx().data;ie&&(j.rslt=j.rslt.then(function(fe){return Z(j,(fe||{})[En],X,fe,ie,function(){var Ie,ye=(Ie={statusText:(fe||{})[$i],headerMap:null},Ie[$h]=ue(fe),Ie);if(p&&fe){var Oe={};fe.headers.forEach(function(He,_t){C(_t)&&(Oe[_t]=He)}),ye[vl]=Oe}return ye}),fe}).catch(function(fe){throw Z(j,0,X,null,ie,null,{error:fe.message||te(fe)}),fe}))}},hkErr:da(M,15,"Failed to monitor Window.fetch"+Lo)},!0,cy())),r=!0):W&&!B&&(ce(lh(z,Oi,{ns:q,req:function(j,X,ie){Y(null,X,ie)}})),B=!0)})),W&&(z[Oi].polyfill=W)}}function U(S,z,W){ce(JI(S,z,W))}function G(){OT(M,A)&&M[Hc](ct(s,function(){_=!!s[Ph],a=s[xh],!_&&!i&&(U(XMLHttpRequest,"open",{ns:q,req:function(S,z,W,j){if(!_){var X=S.inst,ie=Zo(X,A);!Y(X,W)&&_e(X,ie,!0)&&((!ie||!ie.xhrMonitoringState.openDone)&&(ie=Te(X,z,W,j)),Ne(X,ie))}},hkErr:da(M,15,fa+".open"+Lo)}),U(XMLHttpRequest,"send",{ns:q,req:function(S,z){if(!_){var W=S.inst,j=Zo(W,A);_e(W,j)&&!j.xhrMonitoringState.sendDone&&(xt("xhr",j),j[Hi]=jc(),M[vd](j,void 0,void 0,W),j.xhrMonitoringState.sendDone=!0)}},hkErr:da(M,17,fa+Lo)}),U(XMLHttpRequest,"abort",{ns:q,req:function(S){if(!_){var z=S.inst,W=Zo(z,A);_e(z,W)&&!W.xhrMonitoringState.abortDone&&(W[Rs]=1,W.xhrMonitoringState.abortDone=!0)}},hkErr:da(M,13,fa+".abort"+Lo)}),U(XMLHttpRequest,"setRequestHeader",{ns:q,req:function(S,z,W){if(!_){var j=S.inst,X=Zo(j,A);X&&_e(j,X)&&(FT(j,z,W),a&&C(z)&&(X[hn][z]=W))}},hkErr:da(M,71,fa+".setRequestHeader"+Lo)}),i=!0)}))}function Y(S,z,W){var j=!1,X=((de(z)?z:(z||{}).url||"")||"")[jo]();if(ee(x,function(Ie){var ye=Ie;de(Ie)&&(ye=new RegExp(Ie)),j||(j=ye.test(X))}),j)return j;var ie=Wo(X,"?"),fe=Wo(X,"#");return(ie===-1||fe!==-1&&fe<ie)&&(ie=fe),ie!==-1&&(X=X.substring(0,ie)),K(S)?K(z)||(j=(typeof z=="object"?z[Vi]===!0:!1)||(W?W[Vi]===!0:!1)):j=S[Vi]===!0||X[Vi]===!0,!j&&X&&fh(X)&&(j=!0),j?v[X]||(v[X]=1):v[X]&&(j=!0),j}function _e(S,z,W){var j=!0,X=i;return K(S)||(j=W===!0||!K(z)),X&&j}function ke(){var S=null;return M[Qt]&&M[Qt].getTraceCtx&&(S=M[Qt].getTraceCtx(!1)),!S&&l&&l.telemetryTrace&&(S=Zp(l.telemetryTrace)),S}function Te(S,z,W,j){var X,ie=ke(),fe=ie&&ie[Dh]()||ti(),Ie=Jr(ti(),0,16),ye=S[li]=S[li]||{xh:[],i:{}},Oe=ye.i=ye.i||{},He=Oe[A]=Oe[A]||new tm(fe,Ie,M[ja](),(X=M.core)===null||X===void 0?void 0:X.getTraceCtx());return He[Dn]=ie&&ie[Rh](),He[Yr]=z,He[xn]=W,He.xhrMonitoringState.openDone=!0,He[hn]={},He.async=j,He[Ah]=c,He}function Ne(S,z){z.xhrMonitoringState[s_]=Ir(S,"readystatechange",function(){var W;try{S&&S.readyState===4&&_e(S,z)&&je(S)}catch(X){var j=te(X);(!j||Wo(j[jo](),"c00c023f")===-1)&&La(M,16,fa+" 'readystatechange' event handler"+Lo,(W={},W[Nh]=vu(S,A),W.exception=j,W))}},q)}function Et(S){try{var z=S.responseType;if(z===""||z==="text")return S[Yv]}catch{}return null}function je(S){var z=Zo(S,A);z[ka]=jc(),z[En]=S[En];function W(j,X){var ie=X||{};ie.ajaxDiagnosticsMessage=vu(S,A),j&&(ie.exception=te(j)),fr(M,14,om+"ajax call"+nm,ie)}or("xmlhttprequest",z,function(){try{var j=z[Mh]("Ajax",a,function(){var ye,Oe=(ye={statusText:S[$i],headerMap:null},ye[$h]=Le(S),ye.type=S.responseType,ye[Yv]=Et(S),ye.response=S.response,ye);if(p){var He=S[em]();if(He){var _t=Ve(He).split(/[\r\n]+/),Un={};ee(_t,function(Nn){var Lt=Nn.split(": "),Ao=Lt.shift(),wc=Lt.join(": ");C(Ao)&&(Un[Ao]=wc)}),Oe[vl]=Un}}return Oe}),X=void 0;try{R&&(X=R({status:S[En],xhr:S}))}catch{fr(M,104,im)}if(j){X!==void 0&&(j[js]=Ft(Ft({},j.properties),X));var ie=z[zh]();re(O,M[Qt],z,j,null,ie)}else W(null,{requestSentTime:z[Hi],responseFinishedTime:z[ka]})}finally{try{var fe=S[li]||{i:{}},Ie=fe.i||{};Ie[A]&&(Ie[A]=null)}catch{}}},function(j){W(j,null)})}function Le(S){var z;try{var W=S[em]();if(W!==null){var j=Wo(W[jo](),Fe[8]);if(j!==-1){var X=S.getResponseHeader(Fe[0]);return Av(X)}}}catch(ie){fr(M,18,rm,(z={},z[Nh]=vu(S,A),z.exception=te(ie),z))}}function xt(S,z){if(z[xn]&&d&&h){var W=Dr();if(W&&pe(W.mark)){sm++;var j=d+S+"#"+sm;W.mark(j);var X=W.getEntriesByName(j);X&&X[qi]===1&&(z[ml]=X[0])}}}function or(S,z,W,j){var X=z[ml],ie=Dr(),fe=ne,Ie=se,ye=z[xn],Oe=0;(function He(){try{if(ie&&X){Oe++;for(var _t=null,Un=ie.getEntries(),Nn=Un[qi]-1;Nn>=0;Nn--){var Lt=Un[Nn];if(Lt){if(Lt.entryType==="resource")Lt.initiatorType===S&&(Wo(Lt.name,ye)!==-1||Wo(ye,Lt.name)!==-1)&&(_t=Lt);else if(Lt.entryType==="mark"&&Lt.name===X.name){z[Uh]=_t;break}if(Lt[hs]<X[hs]-1e3)break}}}!X||z[Uh]||Oe>=fe||z.async===!1?(X&&pe(ie.clearMarks)&&ie.clearMarks(X.name),z.perfAttempts=Oe,W()):yn(He,Ie)}catch(Ao){j(Ao)}})()}function un(S,z){var W,j=ke(),X=j&&j[Dh]()||ti(),ie=Jr(ti(),0,16),fe=new tm(X,ie,M[ja](),(W=M.core)===null||W===void 0?void 0:W.getTraceCtx());fe[Dn]=j&&j[Rh](),fe[Hi]=jc(),fe[Ah]=c;var Ie;if(S instanceof Request?Ie=(S||{}).url||"":Ie=S,Ie===""){var ye=Hn();ye&&ye.href&&(Ie=gy(ye.href,"#")[0])}M[Qt]&&M[Qt].config&&(Ie=mr(Ie,M[Qt].config)),fe[xn]=Ie;var Oe="GET";z&&z[Yr]?Oe=z[Yr]:S&&S instanceof Request&&(Oe=S[Yr]),fe[Yr]=Oe;var He={};if(a){var _t=new Headers((z?z[ki]:0)||(S instanceof Request?S[ki]||{}:{}));_t.forEach(function(Un,Nn){C(Nn)&&(He[Nn]=Un)})}return fe[hn]=He,xt(Oi,fe),fe}function $(S){var z="";try{K(S)||(typeof S=="string"?z+="(url: '".concat(S,"')"):z+="(url: '".concat(S.url,"')"))}catch(W){La(M,15,"Failed to grab failed fetch diagnostics message",{exception:te(W)})}return z}function Z(S,z,W,j,X,ie,fe){if(!X)return;function Ie(ye,Oe,He){var _t=He||{};_t.fetchDiagnosticsMessage=$(W),Oe&&(_t.exception=te(Oe)),fr(M,ye,om+"fetch call"+nm,_t)}X[ka]=jc(),X[En]=z,or(Oi,X,function(){var ye=X[Mh]("Fetch",a,ie),Oe;try{R&&(Oe=R({status:z,request:W,response:j}))}catch{fr(M,104,im)}if(ye){Oe!==void 0&&(ye[js]=Ft(Ft({},ye.properties),Oe));var He=X[zh]();re(O,M[Qt],X,ye,null,He)}else Ie(14,null,{requestSentTime:X[Hi],responseFinishedTime:X[ka]})},function(ye){Ie(18,ye,null)})}function ue(S){if(S&&S[ki])try{var z=S[ki].get(Fe[0]);return Av(z)}catch(W){fr(M,18,rm,{fetchDiagnosticsMessage:$(S),exception:te(W)})}}function re(S,z,W,j,X,ie){var fe=!0,Ie=S[qi];if(Ie>0){var ye={item:j,properties:X,sysProperties:ie,context:W?W[Fa]:null,aborted:W?!!W[Rs]:!1};fe=u_(z,S,ye,"initializer")}fe&&M[Zv](j,X,ie)}}),n}return e.prototype.processTelemetry=function(n,r){this.processNext(n,r)},e.prototype.addDependencyInitializer=function(n){return null},e.identifier="AjaxDependencyPlugin",e})(So),HT=(function(){function t(){}return t})(),BT=(function(){function t(){this.id="browser",this.deviceClass="Browser"}return t})(),KT="3.3.11",XT=(function(){function t(e,n){var r=this,i=ct(e,function(){var o=e.sdkExtension;r.sdkVersion=(o?o+"_":"")+"javascript:"+KT});n&&n.add(i)}return t})(),GT=(function(){function t(){}return t})(),yl="session",bl="sessionManager",mu="isUserCookieSet",_l="isNewUser",Cd="getTraceCtx",Oh="telemetryTrace",l_="applySessionContext",f_="applyApplicationContext",d_="applyOperationContext",h_="applyOperatingSystemContxt",p_="applyLocationContext",g_="applyInternalContext",yu="getSessionId",v_="sessionCookiePostfix",Di="automaticSession",Yo="accountId",es="authenticatedId",ha="acquisitionDate",Kc="renewalDate",pa="cookieSeparator",wd="authUserCookieName",JT="ai_session",QT=864e5,ZT=18e5,YT=6e4,m_=(function(){function t(){}return t})(),e1=(function(){function t(e,n,r){var i=this,o,s,a=wo(n),c=Hl(n),u,l;qe(t,i,function(f){e||(e={});var m=ct(e,function(_){u=e.sessionExpirationMs||QT,l=e.sessionRenewalMs||ZT;var P=e[v_]||e.namePrefix||"";o=JT+P});r&&r.add(m),f[Di]=new m_,f.update=function(){var _=An(),P=!1,x=f[Di];if(x.id||(P=!d(x)),!P&&u>0){var R=_-x[ha],q=_-x[Kc];P=R<0||q<0,P=P||R>u,P=P||q>l}P?g(_):(!s||_-s>YT)&&p(x,_)},f.backup=function(){var _=f[Di];v(_.id,_[ha],_[Kc])};function d(_,P){var x=!1,R=c.get(o);if(R&&pe(R.split))x=h(_,R);else{var q=yb(a,o);q&&(x=h(_,q))}return x||!!_.id}function h(_,P){var x=!1,R=", session will be reset",q=P.split("|");if(q.length>=2)try{var A=+q[1]||0,I=+q[2]||0;isNaN(A)||A<=0?J(a,2,27,"AI session acquisition date is 0"+R):isNaN(I)||I<=0?J(a,2,27,"AI session renewal date is 0"+R):q[0]&&(_.id=q[0],_[ha]=A,_[Kc]=I,x=!0)}catch(L){J(a,1,9,"Error parsing ai_session value ["+(P||"")+"]"+R+" - "+$e(L),{exception:te(L)})}return x}function g(_){var P=e.getNewId||$p;f[Di].id=P(e.idLength||22),f[Di][ha]=_,p(f[Di],_),Jl()||J(a,2,0,"Browser does not support local storage. Session durations will be inaccurate.")}function p(_,P){var x=_[ha];_[Kc]=P;var R=l,q=x+u-P,A=[_.id,x,P],I=0;q<R?I=q/1e3:I=R/1e3;var L=e.cookieDomain||null;c.set(o,A.join("|"),u>0?I:null,L),s=P}function v(_,P,x){bb(a,o,[_,P,x].join("|"))}})}return t.__ieDyn=1,t})(),t1=(function(){function t(e,n,r,i,o){var s=this;s.traceID=e||ti(),s.parentID=n;var a=Hn();!r&&a&&a.pathname&&(r=a.pathname,o&&(r=mr(r,o))),s.name=gt(i,r)}return t})();function cm(t){return!(typeof t!="string"||!t||t.match(/,|;|=| |\|/))}var n1=(function(){function t(e,n,r){this.isNewUser=!1,this.isUserCookieSet=!1;var i=wo(n),o=Hl(n),s;qe(t,this,function(a){Ae(a,"config",{g:function(){return e}});var c=ct(e,function(){var m=e.userCookiePostfix||"";s=t.userCookieName+m;var d=o.get(s);if(d){a[_l]=!1;var h=d.split(t[pa]);h.length>0&&(a.id=h[0],a[mu]=!!a.id)}if(!a.id){a.id=u();var g=l(a.id);f(g.join(t[pa]));var p=(e.namePrefix||"")+"ai_session";fk(i,p)}a[Yo]=e[Yo]||void 0;var v=o.get(t[wd]);if(v){v=decodeURI(v);var _=v.split(t[pa]);_[0]&&(a[es]=_[0]),_.length>1&&_[1]&&(a[Yo]=_[1])}});r&&r.add(c);function u(){var m=e||{},d=m.getNewId||$p,h=d(m.idLength?e.idLength:22);return h}function l(m){var d=Ns(new Date);a.accountAcquisitionDate=d,a[_l]=!0;var h=[m,d];return h}function f(m){var d=31536e3;a[mu]=o.set(s,m,d)}a.setAuthenticatedUserContext=function(m,d,h){h===void 0&&(h=!1);var g=!cm(m)||d&&!cm(d);if(g){J(i,2,60,"Setting auth user context failed. User auth/account id should be of type string, and not contain commas, semi-colons, equal signs, spaces, or vertical-bars.",!0);return}a[es]=m;var p=a[es];d&&(a[Yo]=d,p=[a[es],a.accountId].join(t[pa])),h&&o.set(t[wd],encodeURI(p))},a.clearAuthenticatedUserContext=function(){a[es]=null,a[Yo]=null,o.del(t[wd])},a.update=function(m){if(a.id!==m||!a[mu]){var d=m||u(),h=l(d);f(h.join(t[pa]))}}})}return t.cookieSeparator="|",t.userCookieName="ai_user",t.authUserCookieName="ai_authUser",t})(),Xc="ext",Gc="tags";function Vo(t,e){t&&t[e]&&wr(t[e]).length===0&&delete t[e]}function um(){return null}var r1=(function(){function t(e,n,r,i){var o=this,s=e.logger;qe(t,this,function(a){if(a.appId=um,a[yu]=um,a.application=new HT,a.internal=new XT(n,i),jl()){a[bl]=new e1(n,e,i),a.device=new BT,a.location=new GT,a.user=new n1(n,e,i);var c=void 0,u=void 0,l;r&&(c=r.getTraceId(),u=r.getSpanId(),l=r.getName()),a[Oh]=new t1(c,u,l,s),a[yl]=new m_}a[yu]=function(){var f=a[yl],m=null;if(f&&de(f.id))m=f.id;else{var d=(a[bl]||{})[Di];m=d&&de(d.id)?d.id:null}return m},a[l_]=function(f,m){We(zt(f.ext,Zt.AppExt),"sesId",a[yu](),de)},a[h_]=function(f,m){We(f.ext,Zt.OSExt,a.os)},a[f_]=function(f,m){var d=a.application;if(d){var h=zt(f,Gc);We(h,Xe.applicationVersion,d.ver,de),We(h,Xe.applicationBuild,d.build,de)}},a.applyDeviceContext=function(f,m){var d=a.device;if(d){var h=zt(zt(f,Xc),Zt.DeviceExt);We(h,"localId",d.id,de),We(h,"ip",d.ip,de),We(h,"model",d.model,de),We(h,"deviceClass",d.deviceClass,de)}},a[g_]=function(f,m){var d=a.internal;if(d){var h=zt(f,Gc);We(h,Xe.internalAgentVersion,d.agentVersion,de),We(h,Xe.internalSdkVersion,gt(s,d.sdkVersion,64),de),(f.baseType===ec.dataType||f.baseType===ui.dataType)&&(We(h,Xe.internalSnippet,d.snippetVer,de),We(h,Xe.internalSdkSrc,d.sdkSrc,de))}},a[p_]=function(f,m){var d=o.location;d&&We(zt(f,Gc,[]),Xe.locationIp,d.ip,de)},a[d_]=function(f,m){var d=a[Oh];if(d){var h=zt(zt(f,Xc),Zt.TraceExt,{traceID:void 0,parentID:void 0});We(h,"traceID",d.traceID,de,K),We(h,"name",d.name,de,K),We(h,"parentID",d.parentID,de,K)}},a.applyWebContext=function(f,m){var d=o.web;d&&We(zt(f,Xc),Zt.WebExt,d)},a.applyUserContext=function(f,m){var d=a.user;if(d){var h=zt(f,Gc,[]);We(h,Xe.userAccountId,d[Yo],de);var g=zt(zt(f,Xc),Zt.UserExt);We(g,"id",d.id,de),We(g,"authId",d[es],de)}},a.cleanUp=function(f,m){var d=f.ext;d&&(Vo(d,Zt.DeviceExt),Vo(d,Zt.UserExt),Vo(d,Zt.WebExt),Vo(d,Zt.OSExt),Vo(d,Zt.AppExt),Vo(d,Zt.TraceExt))}})}return t.__ieDyn=1,t})(),Wr,Sd,qo=null,i1=Ws((Wr={accountId:qo,sessionRenewalMs:1800*1e3,samplingPercentage:100,sessionExpirationMs:1440*60*1e3,cookieDomain:qo,sdkExtension:qo,isBrowserLinkTrackingEnabled:!1,appId:qo},Wr[yu]=qo,Wr.namePrefix=Sd,Wr[v_]=Sd,Wr.userCookiePostfix=Sd,Wr.idLength=22,Wr.getNewId=qo,Wr)),o1=(function(t){ir(e,t);function e(){var n=t.call(this)||this;n.priority=110,n.identifier=Ql;var r,i,o,s,a;return qe(e,n,function(c,u){l(),Ae(c,"context",{g:function(){return s}}),c.initialize=function(d,h,g,p){u.initialize(d,h,g,p),f(d)},c.processTelemetry=function(d,h){if(!K(d)){h=c._getTelCtx(h),d.name===ui.envelopeType&&h.diagLog().resetInternalMessageCount();var g=s||{};g[yl]&&typeof s[yl].id!="string"&&g[bl]&&g[bl].update();var p=g.user;if(p&&!p[mu]&&p.update(g.user.id),m(d,h),p&&p[_l]&&(p[_l]=!1,!a)){var v=new ec(72,(rr()||{}).userAgent||"");tI(h.diagLog(),1,v)}c.processNext(d,h)}},c._doTeardown=function(d,h){var g=(d||{}).core();if(g&&g[Cd]){var p=g[Cd](!1);p===i&&g.setTraceCtx(o)}l()};function l(){r=null,i=null,o=null,s=null,a=!0}function f(d){var h=c.identifier,g=c.core;c._addHook(ct(d,function(){var p=zn(null,d,g);d.storagePrefix&&tg(d.storagePrefix),a=d.disableUserInitMessage!==!1,r=p.getExtCfg(h,i1),c._extConfig=r})),o=g[Cd](!1),s=new r1(g,r,o,c._unloadHooks),i=Zp(c.context[Oh],o),g.setTraceCtx(i),c.context.appId=function(){var p=g.getPlugin(Rb);return p?p.plugin._appId:null}}function m(d,h){zt(d,"tags",[]),zt(d,"ext",{});var g=c.context;g[l_](d,h),g[f_](d,h),g.applyDeviceContext(d,h),g[d_](d,h),g.applyUserContext(d,h),g[h_](d,h),g.applyWebContext(d,h),g[p_](d,h),g[g_](d,h),g.cleanUp(d,h)}}),n}return e.__ieDyn=1,e})(So),y_="AuthenticatedUserContext",qs="track",Fh="snippet",s1="getCookieMgr",a1="startTrackPage",c1="stopTrackPage",Id="flush",u1="startTrackEvent",l1="stopTrackEvent",f1="addTelemetryInitializer",lm="pollInternalLogs",kd="getPlugin",Td="evtNamespace",d1=qs+"Event",h1=qs+"Trace",p1=qs+"Metric",g1=qs+"PageView",v1=qs+"Exception",m1=qs+"DependencyData",y1="set"+y_,b1="clear"+y_,_1="https://js.monitor.azure.com/scripts/b/ai.config.1.cfg.json",Cl="connectionString",Ed="version",Ei="queue",Ta="instrumentationKey",ts="userOverrideEndpointUrl",xd="endpointUrl",ga="onunloadFlush",ln="context",fm="addHousekeepingBeforeUnload",Pd="sendMessage",C1="updateSnippetDefinitions",On,Ho,Bo,Dd,va,dm=[Fh,"dependencies","properties","_snippetVersion","appInsightsNew","getSKUDefaults"],b_="iKeyUsage",__="CdnUsage",C_="SdkLoaderVer",w1="zipPayload",Jc=void 0,S1={samplingRate:100,maxSendNumber:1},I1={monthInterval:3,daysOfMonth:[28]},Qc={disabled:!0,limit:kn(S1),interval:kn(I1)},k1=(On={},On[Cl]=Jc,On.endpointUrl=Jc,On[Ta]=Jc,On[ts]=Jc,On.diagnosticLogInterval=Yu(T1,1e4),On.featureOptIn=(Ho={},Ho[b_]={mode:3},Ho[__]={mode:2},Ho[C_]={mode:2},Ho[w1]={mode:1},Ho),On.throttleMgrCfg=kn((Bo={},Bo[109]=kn(Qc),Bo[106]=kn(Qc),Bo[111]=kn(Qc),Bo[110]=kn(Qc),Bo)),On.extensionConfig=kn((Dd={},Dd.AppInsightsCfgSyncPlugin=kn({cfgUrl:_1,syncMode:2}),Dd)),On);function T1(t){return t&&t>0}function hm(t,e){return Qa(function(n,r){Kt(e,function(i){var o=i&&i.value,s=null;!i.rejected&&o&&(t[Cl]=o,s=wb(o)),n(s)})})}var E1=(function(){function t(e){var n=this,r,i,o,s,a,c,u,l,f,m,d,h,g,p;qe(t,this,function(v){x(),Ae(v,"config",{g:function(){return l}}),ee(["pluginVersionStringArr","pluginVersionString"],function(A){Ae(v,A,{g:function(){return u?u[A]:null}})}),s=""+(e.sv||e[Ed]||""),e[Ei]=e[Ei]||[],e[Ed]=e[Ed]||2;var _=_n(e.config||{},k1);l=_.cfg,f=new sT,Ae(v,"appInsights",{g:function(){return f}}),i=new o1,r=new qT,o=new zT,u=new zI,Ae(v,"core",{g:function(){return u}}),q(ct(_,function(){var A=l[Cl];if(fi(A)){var I=Qa(function(ne,se){Kt(hm(l,A),function(b){if(b.rejected)ne(null);else{var E=l[Ta],B=b.value;E=B&&B.instrumentationkey||E,ne(E)}})}),L=l[ts];K(L)&&(L=Qa(function(ne,se){Kt(hm(l,A),function(b){if(b.rejected)ne(null);else{var E=l[xd],B=b.value,M=B&&B.ingestionendpoint;E=M?M+Is:E,ne(E)}})})),l[Ta]=I,l[xd]=L}if(de(A)&&A){var O=wb(A),H=O.ingestionendpoint;l.endpointUrl=l[ts]?l[ts]:H+Is,l[Ta]=O.instrumentationkey||l[Ta]}l.endpointUrl=l[ts]?l[ts]:l[xd]})),v[Fh]=e,v[Id]=function(A,I){A===void 0&&(A=!0);var L;return rl(u,function(){return"AISKU.flush"},function(){A&&!I&&(L=Zn(function(ne){I=ne}));var O=1,H=function(){O--,O===0&&I()};ee(u.getChannels(),function(ne){ne&&(O++,ne[Id](A,H))}),H()},null,A),L},v[ga]=function(A){A===void 0&&(A=!0),ee(u.getChannels(),function(I){I[ga]?I[ga]():I[Id](A)})},v.loadAppInsights=function(A,I,L){A===void 0&&(A=!1),A&&aw("Legacy Mode is no longer supported");function O(H){if(H){var ne="";K(s)||(ne+=s),v[ln]&&v[ln].internal&&(v[ln].internal.snippetVer=ne||"-"),De(v,function(se,b){de(se)&&!pe(b)&&se&&se[0]!=="_"&&At(dm,se)===-1&&H[se]!==b&&(H[se]=b)})}}return rl(v.core,function(){return"AISKU.loadAppInsights"},function(){u.initialize(l,[o,i,r,f,m],I,L),Ae(v,"context",{g:function(){return i[ln]}}),d||(d=new hk(u));var H=x1();H&&v[ln]&&(v[ln].internal.sdkSrc=H),O(v[Fh]),v.emptyQueue(),v[lm](),v[fm](v),q(ct(_,function(){var ne=!1;l.throttleMgrCfg[109]&&(ne=!l.throttleMgrCfg[109].disabled),!d.isReady()&&l.extensionConfig&&l.extensionConfig[m.identifier]&&ne&&d.onReadyState(!0),!h&&!l[Cl]&&su(b_,l,!0)&&(d[Pd](106,"See Instrumentation key support at aka.ms/IkeyMigrate"),h=!0),!g&&v[ln].internal.sdkSrc&&v[ln].internal.sdkSrc.indexOf("az416426")!=-1&&su(__,l,!0)&&(d[Pd](110,"See Cdn support notice at aka.ms/JsActiveCdn"),g=!0),!p&&parseInt(s)<6&&su(C_,l,!0)&&(d[Pd](111,"An updated Sdk Loader is available, see aka.ms/SnippetVer"),p=!0)}))}),v},v[C1]=function(A){nS(A,v,function(I){return I&&At(dm,I)===-1})},v.emptyQueue=function(){try{if(Ce(v.snippet[Ei])){for(var A=v.snippet[Ei].length,I=0;I<A;I++){var L=v.snippet[Ei][I];L()}v.snippet[Ei]=void 0,delete v.snippet[Ei]}}catch(H){var O={};H&&pe(H.toString)&&(O.exception=H.toString())}},v[fm]=function(A){if(jl()||sy()){var I=function(){if(A[ga](!1),pe(v.core[kd])){var O=n.core[kd](Ql);if(O){var H=O.plugin;H&&H[ln]&&H[ln]._sessionManager&&H[ln]._sessionManager.backup()}}},L=!1;c||(c=gi(a,u[Td]&&u[Td]())),q(ct(l,function(O){var H=O.cfg,ne=A.appInsights,se=zn(null,H,ne.core),b=se.getExtCfg(ne.identifier||ng);R();var E=H.disablePageUnloadEvents;b.disableFlushOnBeforeUnload||(BI(I,E,c)&&(L=!0),uh(I,E,c)&&(L=!0),!L&&!_S()&&J(u.logger,1,19,"Could not add handler for beforeunload and pagehide")),!L&&!b.disableFlushOnUnload&&uh(I,E,c)}))}},v.getSender=function(){return o},v.unload=function(A,I,L){var O=!1,H;A!==!1&&!I&&(H=Zn(function(se){I=se}));function ne(se){O||(O=!0,x(),I&&I(se))}return v[ga](A),R(),u.unload&&u.unload(A,ne,L),H},ls(v,f,[s1,d1,g1,"trackPageViewPerformance",v1,"_onerror",h1,p1,a1,c1,u1,l1]),ls(v,P,[m1,"addDependencyListener","addDependencyInitializer"]),ls(v,u,[f1,lm,"stopPollingInternalLogs",kd,"addPlugin",Td,"addUnloadCb","getTraceCtx","updateCfg","onCfgChange"]),ls(v,function(){var A=i[ln];return A?A.user:null},[y1,b1]);function P(){return r}function x(){a=bn("AISKU"),c=null,r=null,i=null,o=null,s=null,d=null,h=!1,g=!1,p=!1,m=new pT}function R(){c&&(KI(null,c),XI(null,c))}function q(A){u.addUnloadHook(A)}})}return t.prototype.addDependencyInitializer=function(e){return null},t})();function x1(){if(va)return va;var t=null,e=!1,n=["://js.monitor.azure.com/","://az416426.vo.msecnd.net/"];try{var r=(document||{}).currentScript;r&&(t=r.src)}catch{}if(t){try{var i=t.toLowerCase();if(i){var o="";ee(n,function(s,a){if(at(i,s)!==-1)return o="cdn"+(a+1),at(i,"/scripts/")===-1&&(at(i,"/next/")!==-1?o+="-next":at(i,"/beta/")!==-1&&(o+="-beta")),va=o+(e?".mod":""),-1})}}catch{}va=t}return va}const P1=["NotLoggedIn","LoginFailed"],D1=["ResizeObserver loop limit exceeded","ResizeObserver loop completed with undelivered notifications."];var pm;const lc=((pm=window.Cbn)==null?void 0:pm.appInsightsConnectionString)??"",R1=new Vk,zr=new E1({config:{enableResponseHeaderTracking:!0,connectionString:lc,enableAutoRouteTracking:!0,enableUnhandledPromiseRejectionTracking:!0,extensions:[R1],enableAjaxErrorStatusText:!0,disableCookiesUsage:!0}}),A1=()=>!!lc&&lc!=="InstrumentationKey=00000000-0000-0000-0000-000000000000",M1=t=>{var e,n,r,i,o;if((e=t.data)!=null&&e.message){const s=O1(t.data.message);if(D1.includes(s))return Ea.addLog(t.data.message,"Error",{sendToTracker:!1}),!1;if(s==="Network Error"&&!window.navigator.onLine||s.includes("status code 401")||s==="Uncaught SyntaxError: Unexpected token '<'"&&(n=t.data.errorSrc)!=null&&n.startsWith("window.onerror")&&(r=t.data.errorSrc)!=null&&r.endsWith(".chunk.js:1:1"))return!1;const a=K1((i=t.data)==null?void 0:i.message);if((o=a==null?void 0:a.Causes)!=null&&o.some(c=>P1.includes(c.Id)))return!1}},z1=t=>{var e;const n=(e=t.baseData)==null?void 0:e.exceptions;if(!n)return!0;if(n.some(r=>r.stack.includes("chrome-extension://")))return!1},U1=t=>{var e;const n=t.data??{};t.baseType===Ht.dataType&&t.baseData&&(t.baseData.id=((e=t.baseData)==null?void 0:e.id)??w_(),n.errorGuid=t.baseData.id),t.data=n},N1=t=>{var e,n,r;const i=sc[(e=t.baseData)==null?void 0:e.severityLevel]??"Information";switch(t.baseType){case Ht.dataType:{const o=t.baseData,s=sc[o.severityLevel];o.exceptions.forEach(a=>{Ea.addLog(a.message,s??i,{envelope:t,sendToTracker:!1});const c=t.data??{};if(c._cbnUserDialogPrevented!==!0&&c._cbnErrorBoundary!==!0){const u=c._cbnUserMsg??a.message;Ea._Internals.showErrorDialog({header:"Error",text:u,errorId:o.id})}})}break;case yr.dataType:Ea.addLog(`Event "${(n=t.baseData)==null?void 0:n.name}"`,i,{envelope:t,sendToTracker:!1});break;default:Ea.addLog(((r=t.baseData)==null?void 0:r.message)??t.name,i,{envelope:t,sendToTracker:!1});break}},$1=lc!==void 0&&lc.startsWith("InstrumentationKey=");$1?zr.loadAppInsights():console.warn("AppInsights not initialized! The connections string wasn't properly injected.");function O1(t){return t.replace("PromiseRejectionEvent: ","").replace("ErrorEvent: ","").replace("AxiosError: ","")}zr.trackPageView();zr.addTelemetryInitializer(z1);zr.addTelemetryInitializer(U1);zr.addTelemetryInitializer(M1);zr.addTelemetryInitializer(N1);zr.addTelemetryInitializer(A1);const F1=()=>Math.floor(Math.random()*999).toString().padStart(3,"0"),w_=()=>Date.now().toString()+F1(),j1=()=>new Date().toISOString().slice(11,23);function L1(){const t=(new Error().stack||"").replace(/(\r\n|\n|\r)/gm,"").split(/\s{2,10}at /gm);return t.shift(),t}const W1={Verbose:{emoji:"๐งพ",style:"color: grey;"},Information:{emoji:"๐",style:"color: #466FD5;"},Warning:{emoji:"โ ๏ธ",style:"color: #ebc334;"},Error:{emoji:"๐",style:"color: red;"},Critical:{emoji:"๐ฅ",style:"color: red;"}};function V1(t,e,n){var r,i,o,s;const a=W1[e],c=n!=null&&n.customProperties?" | data = %O":"",u=n!=null&&n.envelope?" | envelope = %O":"",l=e==="Critical"?"[Critical] ":"",f=[((s=(o=(i=(r=n==null?void 0:n.envelope)==null?void 0:r.baseData)==null?void 0:i.exceptions)==null?void 0:o[0])==null?void 0:s.parsedStack)??L1(),a.style];n!=null&&n.customProperties&&f.push(n.customProperties),n!=null&&n.envelope&&f.push(n.envelope),console.log(`%O ${a.emoji} %c[${j1()}] ${l}${t}${u}${c}`,...f)}function q1(t){if(!t)return;const e={};return(t==null?void 0:t.show)!=="dialog"&&(e._cbnUserDialogPrevented=!0),t!=null&&t.userMessage&&(e._cbnUserMsg=t.userMessage),e}function H1(t,e){const n=w_(),r={id:n,exception:t instanceof Error?t:new Error(t),severityLevel:e!=null&&e.isCritical?sc.Critical:sc.Error,properties:{title:t.toString(),...e==null?void 0:e.customProperties}};return zr.trackException(r,q1(e)),n}var ns,rs,jh,S_;class B1{constructor(){le(this,jh),le(this,ns),le(this,rs,[]),lo(this,"_Internals",{subscribeUiListener:e=>{if(w(this,ns)){console.warn("Logger UI listener is already registered. Ensure that this only happens once!");return}Me(this,ns,e),w(this,rs).forEach(n=>this._Internals.showErrorDialog(n)),Me(this,rs,[])},showErrorDialog:e=>{w(this,ns)?w(this,ns).call(this,e):(w(this,rs).length===0&&on(this,jh,S_).call(this),w(this,rs).push(e))}})}addLog(e,n="Information",r){(r==null?void 0:r.sendToTracker)!==!1?zr.trackTrace({message:e,severityLevel:sc[n],properties:r==null?void 0:r.customProperties}):V1(e,n,r)}reportError(e,n){return H1(e,n)}}ns=new WeakMap,rs=new WeakMap,jh=new WeakSet,S_=async function(){};const Ea=new B1,I_=t=>typeof t=="object"&&t!==null&&t.$typ!==void 0&&t.Id!==void 0;function xa(t,e){return I_(t)?e?e.includes(t.Id):!0:!1}function K1(t){const e=t.replace(/^[^{]+/g,"");let n;try{n=JSON.parse(e)}catch{return}return xa(n)?n:void 0}function Fn(t){throw new Error(I_(t)?`${t.Id} - ${t.Message}`:"Unknown error")}const Lh="CmpEditor_",k_=k.z.custom(t=>Mr(t)&&t.startsWith(Lh)&&B0.safeParse(t.substring(Lh.length)).success),X1=t=>k_.safeParse(t).success,gm=t=>`CmpEditor_${t}`,G1=t=>t.substring(Lh.length);function J1(t){const e=t.substring(t.indexOf("<")+1,t.lastIndexOf(">"));if(!H0(e))throw new Error(`Invalid input type: ${e}`);return e}const T_=k.z.string();k.z.array(T_);const Q1=k.z.string(),Z1=t=>t.split("."),Y1=t=>{const e=Z1(t);return e[e.length-1]},Zl=k.z.enum(["value","width","height","minWidth","maxWidth","minHeight","maxHeight","backgroundNormal","backgroundHover","backgroundPressed","border","borderRadius","font","color","captionText","captionWidth","errorMsg","description","flexGrow","flexWrap","opacity","gap","visible","enabled","tooltipText","rawHtml","wrapText","text","placeholder","dataEntries","dataTemplate","tooltipKey","collapsed","group"]),eE=k.z.record(Zl,Am),E_=k.z.lazy(()=>k.z.union([eE,k.z.record(E_)])),tE=k.z.record(Zl,Pm),x_=k.z.lazy(()=>k.z.union([tE,k.z.record(x_)])),nE=k.z.object({Name:k.z.literal("Fiber"),$val:E_,$typ:x_.optional()}),rE=k.z.object({Fibers:k.z.record(Zl,k.z.object({$src:Em,$typ:Pm})),Name:k.z.literal(gn.FiberEditor),Pack:Q1}),P_=t=>rE.safeParse(t).success;function bu(t,e){const n=[];for(const[r,i]of Object.entries(t))if(e&&r==="$val")n.push({ctrlId:e,values:i});else if(r!=="$val"){const o=bu(i,r);n.push(...o)}return n}const vm="CtrlFiberEditor_",iE=k.z.custom(t=>Mr(t)&&t.startsWith(vm)&&T_.safeParse(t.substring(vm.length)).success),D_=t=>iE.safeParse(t).success,mm=t=>`CtrlFiberEditor_${t}`,oE=["NotLoggedIn","AuthenticationFailed","SessionTimedOut","CfgnSessionTimedOut","Unauthorized"];var Ke,dn,Ri,_u,Ai,Cu,Wh,Mi,zi;class sE{constructor(e,n){le(this,Cu),le(this,Ke),le(this,dn),le(this,Ri,[]),le(this,_u,async()=>{if(w(this,Ri).length===0)return;Je("WsConfiguratorClientInternals","#sendDeferredServerCallsAfterReconnect","Sending queued messages",w(this,Ri));const r=w(this,Ri).map(i=>this._callServer(...i));Me(this,Ri,[]),await Promise.all(r)}),lo(this,"_callServer",async(r,i,o)=>{const s=w(this,Ke).connection;if(!s||w(this,Ke).state!=="connected"){Je("ConfiguratorClientInternals","_callServer","Not connected. Message queued to be sent later.",{method:r,args:i,options:o}),w(this,Ri).push([r,i,o]);const f=w(this,Ke).state==="connecting";return w(this,Ke).isInitialized&&!f&&w(this,Ke).restoreConnection(),null}const a=(o==null?void 0:o.requestId)??w(this,Ke).getNextRequestId();Je("ConfiguratorClientInternals",`_callServer, ID ${a}`,"",{method:r,args:i,options:o}),w(this,Ke).extendSessionLifetime();const c=o!=null&&o.requestId?[...i,o.requestId]:i,[u,l]=await ms(s.invoke(r,...c));return u?et("ConfiguratorClientInternals",`_callServer, ID ${a}`,"InvocationError:",u):l.error&&(xa(l.error,oE)&&mC(),et("ConfiguratorClientInternals",`_callServer, ID ${a}`,"Error in response:",l.error)),Je("ConfiguratorClientInternals",`_callServer, ID ${a}`,"Result:",l),l}),le(this,Ai,[]),le(this,Mi,[]),le(this,zi,[]),Me(this,Ke,e),w(this,Ke).onConnected(()=>w(this,_u).call(this)),w(this,Ke).onConnectionRestored(()=>w(this,_u).call(this)),Me(this,dn,n)}async setCmpInput(e,n,r){const[i]=await ms(on(this,Cu,Wh).call(this,e,n,"change-cfgn-value",r));if(i instanceof Nd)return i.message;if(i)throw i}async setCmpPresetInput(e,n,r,i){const o=!q0(r)&&Mr(n),[s,a]=o?Ml(n):[null,n];if(s)return s.message;const c=oC(r),[u]=await ms(on(this,Cu,Wh).call(this,e,a,i,c));if(u instanceof Nd)return u.message;if(u)throw u}async setCmpInputType(e,n){const r=await this._callServer("ChangeConfigurationValueType",[e,n],{isChunkable:!0});if(r!=null&&r.error){if(xa(r.error))return r.error.Message;throw new Error("Unknown error")}else return}async setCmpHiveRule(e,n,r){const i={name:e,changes:[{name:r?"Query":"Value",value:n}]};await this._callServer("SetCmpValue",[i],{isChunkable:!0})}async setCmpGroup(e,n){const r={name:e,changes:[{name:"Group",value:n}]};await this._callServer("SetCmpValue",[r])}async fetchCmpPropertyValue(e){let n=()=>{};const r=new Promise(i=>n=i);if(w(this,Mi).push({resolver:n,values:e}),await Md(0),w(this,Mi).length){const i=w(this,Mi).map(a=>a.resolver),o=w(this,Mi).flatMap(({values:a})=>a.map(({name:c,property:u})=>({name:c,...u!=="Value"&&{property:[u]}})));Me(this,Mi,[]);const s=w(this,Ke).getNextRequestId();this._callServer("GetCmpValue",[o],{requestId:s}),await w(this,dn).awaitCspdUpdateResponse(s),i.forEach(a=>a())}return r}async subscribeToCmpUpdates(e,n,r=!1){let i=()=>{};const o=new Promise(s=>i=s);if(w(this,zi).push({resolver:i,values:{name:e,property:n,lazy:r}}),await Md(0),w(this,zi).length){const s=w(this,zi).map(u=>u.resolver),a=w(this,zi).map(({values:{name:u,property:l,lazy:f}})=>({name:u,...l!=="Value"&&{property:[l]},...f===!0&&{lazy:f}}));Me(this,zi,[]);const c=w(this,Ke).getNextRequestId();this._callServer("SubscribeCmpUpdate",[a],{requestId:c}),await w(this,dn).awaitCspdUpdateResponse(c),s.forEach(u=>u())}return o}async requestCmpEditorCspd(e,n){const r=w(this,Ke).getNextRequestId(),i=gm(e);this._callServer("RequestCspd",[[{slot:i,cspdId:n?gn.TableEditor:gn.ValueEditor,targetComponent:e,parameters:void 0}]],{requestId:r}),await w(this,dn).awaitCspdUpdateResponse(r)}async releaseCmpEditorCspd(e){const n=e.map(r=>gm(r));await this._callServer("ReleaseCspd",n)}async createCmp(e,n,r){const i=[e,n,r],o=await this._callServer("CreateComponent",i);o!=null&&o.error&&Fn(o.error)}async renameCmp(e,n){const r=[e,n],i=await this._callServer("RenameComponent",r);i!=null&&i.error&&Fn(i.error)}async renameCmpGroup(e,n){const r=[e,n],i=await this._callServer("RenameComponentGroup",r);i!=null&&i.error&&Fn(i.error)}async copyCmp(e,n){const r=[e,n],i=await this._callServer("CopyComponent",r);i!=null&&i.error&&Fn(i.error)}async deleteCmp(e){const n=[e],r=await this._callServer("DeleteComponent",n);r!=null&&r.error&&Fn(r.error)}async initiateCfgrFiles(e){const n=await this._callServer("InitiateCfgrFiles",[e]);return Je("ConfiguratorClientInternals","initiateCfgrFiles","After initiate",{payload:e,result:n}),n!=null&&n.error&&Fn(n.error),(n==null?void 0:n.value)??{}}async completeCfgrFiles(e){const n=w(this,Ke).getNextRequestId(),r=await this._callServer("CompleteCfgrFiles",[e],{requestId:n});return Je("ConfiguratorClientInternals","completeCfgrFiles","After complete",{payload:e,result:r}),r!=null&&r.error&&Fn(r.error),(r==null?void 0:r.value)??{}}async deleteCfgrFile(e,n){const r=w(this,Ke).getNextRequestId(),i=await this._callServer("DeleteCfgrFile",[e,n],{requestId:r});Je("ConfiguratorClientInternals","deleteCfgrFile","After complete",{payload:{type:e,fileName:n},result:i}),i!=null&&i.error&&Fn(i.error)}async initiateCfgnFiles(e){const n=await this._callServer("InitiateCfgnFiles",[e]);return Je("ConfiguratorClientInternals","initiateCfgnFiles","After initiate",{payload:e,result:n}),(n==null?void 0:n.value)??{}}async completeCfgnFiles(e){const n=w(this,Ke).getNextRequestId(),r=[this._callServer("CompleteCfgnFiles",[e],{requestId:n}),w(this,dn).awaitCspdUpdateResponse(n)],[i]=await Promise.all(r);return Je("ConfiguratorClientInternals","completeCfgnFiles","After complete",{payload:e,result:i}),(i==null?void 0:i.value)??{}}async completeCfgnFileAndConvertToPdf(e,n,r){const i=w(this,Ke).getNextRequestId(),o=[this._callServer("CompleteCfgnFileAndConvertToPdf",[e,n,r],{requestId:i}),w(this,dn).awaitCspdUpdateResponse(i)],[s]=await Promise.all(o);return Je("ConfiguratorClientInternals","completeCfgnFiles","After complete",{payload:{fileName:e,sasUri:n,pdfOptions:r},result:s}),s}async shareConfiguration(e){const n=w(this,Ke).getNextRequestId(),r=await this._callServer("ShareConfiguration",[e],{requestId:n});return r==null?void 0:r.value}async checkoutConfiguration(e){const n=w(this,Ke).getNextRequestId(),r=await this._callServer("Checkout",[e],{requestId:n});return r==null?void 0:r.value}async finishConfiguration(e){const n=w(this,Ke).getNextRequestId(),r=await this._callServer("Finish",[e],{requestId:n});return r==null?void 0:r.value}async assignAssetBundleToCfgrDraft(e,n,r,i){const o=[e,n,r,i],s=await this._callServer("AssignAssetBundleToCfgrDraft",o);s!=null&&s.error&&Fn(s.error)}async unassignAssetBundleFromCfgrDraft(e){const n=[e],r=await this._callServer("UnassignAssetBundleFromCfgrDraft",n);r!=null&&r.error&&Fn(r.error)}async requestCtrlFiberCspd(){const e=w(this,Ke).getNextRequestId();this._callServer("RequestCspd",[[{slot:Tc.Fiber,cspdId:gn.Fiber,targetComponent:ur.CtrlFibers,parameters:void 0}]],{requestId:e}),await w(this,dn).awaitCspdUpdateResponse(e)}async releaseCtrlFiberCspd(){await this._callServer("ReleaseCspd",[Tc.Fiber])}async requestCtrlFiberEditorCspd(e,n){const r=w(this,Ke).getNextRequestId(),i=mm(e);this._callServer("RequestCspd",[[{slot:i,cspdId:gn.FiberEditor,targetComponent:`${ur.CtrlFibers}.${n}`,parameters:void 0}]],{requestId:r}),await w(this,dn).awaitCspdUpdateResponse(r)}async releaseCtrlFiberEditorCspd(e){const n=e.map(r=>mm(r));await this._callServer("ReleaseCspd",n)}async createOrChangeCtrlFiber(e,n,r,i){const o=`${ur.CtrlFibers}.${e}`;await this._callServer("CreateOrChangeFiber",[o,n,r,i])}async deleteCtrlFiber(e,n){const r=`${ur.CtrlFibers}.${e}`;await this._callServer("DeleteFiber",[r,n])}async deleteCtrlFiberPack(e){const n=`${ur.CtrlFibers}.${e}`;await this._callServer("DeleteFiberPack",[n])}async moveCtrlFiberPack(e,n){const r=`${ur.CtrlFibers}.${e}`,i=`${ur.CtrlFibers}.${n}`;await this._callServer("MoveFiberPack",[r,i])}async copyCtrlFiberPack(e,n,r){const i=`${ur.CtrlFibers}.${e}`,o=`${ur.CtrlFibers}.${n}`;await this._callServer("CopyFiberPack",[i,o,r])}async publishCfgr(e,n,r,i){const o=await this._callServer("Publish",[e,n,r,i]);if(xa(o==null?void 0:o.error))return o.error}async setCfgrValue(e,n){const r=await this._callServer("SetCfgrValue",[{name:e,value:n}]);if(xa(r==null?void 0:r.error))return r.error}async requestCfgrFieldCspd(){const e=w(this,Ke).getNextRequestId();this._callServer("RequestCspd",[[{slot:Tc.CfgrField,cspdId:gn.CfgrField,targetComponent:"FinishActions",parameters:void 0}]],{requestId:e}),await w(this,dn).awaitCspdUpdateResponse(e)}async releaseCfgrFieldCspd(){await this._callServer("ReleaseCspd",[Tc.CfgrField])}}Ke=new WeakMap,dn=new WeakMap,Ri=new WeakMap,_u=new WeakMap,Ai=new WeakMap,Cu=new WeakSet,Wh=async function(t,e,n,r){let i=()=>{};const o=new Promise(s=>i=s);if(w(this,Ai).push({resolver:i,values:{name:t,value:e,zodType:r}}),await Md(0),w(this,Ai).length){const s=w(this,Ai).map(m=>m.resolver),a=w(this,Ai).filter((m,d,h)=>h.findLastIndex(g=>g.values.name===m.values.name)<=d);Me(this,Ai,[]);const c=a.map(({values:{name:m,value:d,zodType:h}})=>{const g=d!==void 0&&Wm(d)?sC(m,d,h):d;return{name:m,value:g}}),u=n==="change-preset-value",l=u?void 0:w(this,Ke).getNextRequestId(),f=u?"ChangePresetValue":"ChangeConfigurationValue";this._callServer(f,[c],{requestId:l,isChunkable:!0}),l&&await w(this,dn).awaitCspdUpdateResponse(l),s.forEach(m=>m())}return o},Mi=new WeakMap,zi=new WeakMap;var R_=(t=>(t[t.Fedl=1]="Fedl",t[t.Css=2]="Css",t[t.JavaScript=3]="JavaScript",t[t.CustomCodePack=4]="CustomCodePack",t[t.Fedl2=5]="Fedl2",t))(R_||{}),Vh,is,Pa;class aE{constructor(){le(this,Vh,600*1e3-60*1e3),le(this,is),le(this,Pa),Me(this,Pa,new Rl)}onSessionLifeTimeReached(e){w(this,Pa).on("sessionLifeTimeReached",e)}restartSessionLifeTimer(){this.stopSessionLifeTimer(),Me(this,is,window.setTimeout(()=>{w(this,Pa).emit("sessionLifeTimeReached")},w(this,Vh)))}stopSessionLifeTimer(){w(this,is)&&(window.clearTimeout(w(this,is)),Me(this,is,void 0))}}Vh=new WeakMap,is=new WeakMap,Pa=new WeakMap;const cE=k.z.enum(["edit","view"]),uE=t=>cE.safeParse(t).success,lE="wss://portal.combeenation.com/signalR",fE={[N.Trace]:"Trace",[N.Debug]:"Debug",[N.Information]:"Information",[N.Warning]:"Warning",[N.Error]:"Error",[N.Critical]:"Critical",[N.None]:"None"},dE="userland",hE=k.z.enum(["theme","user",dE]),pE=k.z.object({lastEditedAt:k.z.number(),lastEditedBy:k.z.string(),size:k.z.number(),type:k.z.nativeEnum(R_),url:k.z.string().url()}),gE=k.z.object({fedl:k.z.object({lastEditedAt:Z0,lastEditedBy:k.z.string(),metadata:k.z.object({LayoutVersion:k.z.string()}),size:k.z.number(),url:k.z.string().url()}),customCode:k.z.record(k.z.string(),pE).optional(),css:k.z.record(hE,k.z.object({url:k.z.string().url()})).optional()}),vE=k.z.object({value:k.z.object({cfgrVersion:k.z.string(),draftName:k.z.string(),lastEditedAt:k.z.number(),lastEditedBy:k.z.string(),presetId:k.z.string(),published:k.z.object({isPublished:k.z.boolean(),version:k.z.string()}),files:gE})}),A_=k.z.object({value:k.z.object({cfgrVersion:k.z.string(),copyUrl:k.z.string(),editUrl:k.z.string(),newUrl:k.z.string()})}),ym=t=>A_.safeParse(t).success;var br,en,qh,wl,tn,ps,As,Vt,Hh,M_,bm,_m,wu;class mE{constructor(){le(this,tn),le(this,br),le(this,en),le(this,qh,N.Warning),le(this,wl,"not-initialized"),le(this,As),le(this,Vt),le(this,Hh,0),lo(this,"getNextRequestId",()=>(++$0(this,Hh)._).toString()),Me(this,br,new aE),w(this,br).onSessionLifeTimeReached(()=>on(this,tn,M_).call(this)),Me(this,en,new Rl)}get state(){return w(this,wl)}get isInitialized(){return this.state!=="not-initialized"}get connection(){return w(this,Vt)}onConnected(e){w(this,en).on("connectionEstablished",e)}onConnectionClosed(e){w(this,en).on("connectionClosed",e)}onCspdUpdate(e){w(this,en).on("cspdUpdate",e)}onCspdUpdateParts(e){w(this,en).on("cspdUpdateParts",e)}onConnectionRestored(e){w(this,en).on("connectionRestored",e)}async connectEditor(e){return await on(this,tn,wu).call(this,e)}async connectCfgr(e){return await on(this,tn,wu).call(this,e)}async restoreConnection(){if(!w(this,As)){et("ConnectionManager","restoreConnection","There's no previous connection to restore. Create a connection with `client.connectEditor()` or `client.connectCfgr()` first.");return}w(this,br).stopSessionLifeTimer();const[e]=await ms(this.closeConnection());e&&et("ConnectionManager","restoreConnection","Error closing connection",e),await on(this,tn,wu).call(this,w(this,As))&&w(this,en).emit("connectionRestored")}async closeConnection(){var e;Me(this,tn,"disconnecting",ps);try{await((e=w(this,Vt))==null?void 0:e.stop())}catch{}Me(this,tn,"disconnected",ps)}extendSessionLifetime(){w(this,br).restartSessionLifeTimer()}}br=new WeakMap,en=new WeakMap,qh=new WeakMap,wl=new WeakMap,tn=new WeakSet,ps=function(t){Me(this,wl,t),Je("ConnectionManager","",`State changed to "${t}"`)},As=new WeakMap,Vt=new WeakMap,Hh=new WeakMap,M_=function(){Je("ConnectionManager","#onSessionLifeTimeReached","Session lifetime reached"),this.closeConnection()},bm=function(t,e){if(t<w(this,qh))return;const n=fE[t];Je("ConnectionManager","#onConnectionLog",`[SignalR ${n}] ${e}`,{logLevel:t},"yellow")},_m=function(t){t?et("ConnectionManager","#handleConnectionClosed","Connection closed with error",t):this.state!=="disconnecting"?et("ConnectionManager","#handleConnectionClosed","Connection closed unexpectedly"):Je("ConnectionManager","#handleConnectionClosed","Connection closed"),Me(this,Vt,void 0),Me(this,tn,"disconnected",ps),w(this,br).stopSessionLifeTimer(),w(this,en).emit("connectionClosed")},wu=async function(t){if(Je("ConnectionManager","connect","Connecting to configurator"),this.isInitialized&&this.state!=="disconnected"){et("ConnectionManager","connect",`Cannot connect whilst in state "${this.state}"`);return}Me(this,tn,"connecting",ps),Me(this,As,t),w(this,br).stopSessionLifeTimer();const e=t.serverUrl??lE;Me(this,Vt,new M0().withUrl(e,{transport:lt.WebSockets,skipNegotiation:!0}).configureLogging({log:on(this,tn,bm).bind(this)}).build()),w(this,Vt).onclose(g=>on(this,tn,_m).call(this,g)),w(this,Vt).on("cspdUpdate",g=>{w(this,en).emit("cspdUpdate",g)}),w(this,Vt).on("cspdUpdateParts",(g,p,v,_)=>w(this,en).emit("cspdUpdateParts",g,p,v,_));const[n]=await ms(w(this,Vt).start());if(n){et("ConnectionManager","connect","Connecting to configurator failed",n),await this.closeConnection();return}Je("ConnectionManager","connect","WS connection established");const r=uE(t.mode),i=r?["",t.companyName,t.configuratorName,t.draftName,t.mode,"000"]:[t.mode,t.companyName,t.configuratorName,...t.mode==="preview"||t.mode==="staging"?[t.draftName]:[],...t.editCfgn?[t.editCfgn.cfgnId,"edit",t.editCfgn.authToken]:[]],o=this.getNextRequestId(),s=window.innerWidth,a=window.innerHeight,c={cbnInitialWindowWidth:s.toString(),cbnInitialWindowHeight:a.toString()},u={width:s,height:a,userAgent:navigator.userAgent},l=void 0,[f,m]=await ms(r?w(this,Vt).invoke("StartProductEditor",i,o,c,l):w(this,Vt).invoke("StartConfiguration",i,o,c,l,u)),d=r?vE.safeParse(m):A_.safeParse(m);if(f||!d.success){const g=f??d.error;et("ConnectionManager","connect",f?"Error starting configuration":"Error parsing start response",{error:g,startCfgnResponse:m}),await this.closeConnection();return}const h=ym(d.data)?Vm(d.data.value.editUrl):{cfgnId:"not-used-in-editor",authToken:"not-used-in-editor"};if(!h||!h.cfgnId||!h.authToken)throw new Error("Error parsing edit URL from start response");if(Je("ConnectionManager","connect","Connection to configurator established",{startCfgnResponseParsed:d}),Me(this,tn,"connected",ps),w(this,br).restartSessionLifeTimer(),w(this,en).emit("connectionEstablished"),ym(d.data)){const{cfgnId:g,authToken:p}=h;return w(this,As).editCfgn={cfgnId:g,authToken:p},{connection:w(this,Vt),...d.data.value,cfgnId:g,authToken:p}}else return{connection:w(this,Vt),...d.data.value}};const yE=k.z.object({Name:k.z.literal(gn.CfgrField),$val:k.z.unknown(),$inp:k.z.string().nullable(),$src:Em}),bE=k.z.object({Name:L0,ComponentInfo:k.z.object({$nam:k.z.string(),$typ:Dm}).optional(),Group:k.z.object({$val:k.z.string()}).optional(),Value:k.z.object({$val:Am,$inp:Rm.optional(),$ipt:xm.optional(),$src:k.z.string().optional()}).optional(),Query:k.z.union([k.z.object({$val:k.z.union([k.z.literal("[DataSourceQuery]"),dp]),$src:k.z.string()}),k.z.object({}).transform(()=>{})]).optional(),Archive:k.z.object({$val:k.z.boolean()}).optional()}),_E=k.z.record(k_,bE),CE=k.z.enum(["Value","Records"]),wE=k.z.object({Name:k.z.literal("ComponentList").or(k.z.literal("Configurator")),$val:k.z.record(k.z.string(),k.z.union([k.z.object({$typ:Dm.optional(),$chg:k.z.array(CE).optional(),Value:k.z.any().optional(),Group:k.z.string().optional()}),k.z.string().array()]))}),SE=k.z.union([k.z.number(),k.z.array(k.z.number()),k.z.null()]),z_=k.z.lazy(()=>k.z.union([SE,k.z.record(z_)])),IE=k.z.record(Zl,k.z.union([k.z.number(),k.z.array(k.z.number()),k.z.null()])),U_=k.z.lazy(()=>k.z.union([IE,k.z.record(U_)])),kE=k.z.object({Name:k.z.literal("ConfiguratorInspector"),Errors:k.z.object({Cfgr:z_.optional(),Fibers:k.z.object({CtrlFibers:U_.optional()}).optional(),$val:k.z.array(k.z.object({Id:k.z.string(),Message:k.z.string(),route:k.z.any()}))})}),TE=k.z.object({number:k.z.number(),partialNumber:k.z.number().optional(),isPartial:k.z.boolean().optional(),request:k.z.string().optional(),west:wE.optional(),fiber:nE.optional(),inspector:kE.optional(),cfgrField:yE.optional()}).passthrough().refine(t=>Object.keys(t).filter(D_).every(e=>P_(t[e]))),EE=t=>!isNaN(t.partialNumber??NaN);var Ze,Wa,Su,Iu,os,Da,ku,Bh,Kh,N_,Ra,Xh,hr,Gh,Jh,Qh,gs,Zh,Xr,Yh,ep,tp,np,rp,ip,op,ss;class xE{constructor(e,n){le(this,Kh),le(this,Ze),le(this,Wa,!1),le(this,Su,{}),le(this,Iu,{}),le(this,os),le(this,Da,new Map),le(this,ku,new Map),lo(this,"awaitCspdUpdateResponse",async r=>{const i=w(this,ku).get(r);if(i)return i;const o=new Promise(s=>w(this,Da).set(r,s));return w(this,ku).set(r,o),o}),le(this,Bh,r=>{const i=w(this,Da).get(r);i&&(i(),w(this,Da).delete(r))}),le(this,Ra,{}),le(this,Xh,async(r,i,o,s)=>{Je("WsCspdUpdateHandler","#handleCspdUpdateParts","Received cspd update part",{msgId:r,partNr:i,totalParts:o,msgPart:s});const a=w(this,Ra)[r]??{messageParts:[],receivedPartsCnt:0,totalParts:o};if(a.receivedPartsCnt++,a.messageParts[i]=s,w(this,Ra)[r]=a,a.totalParts===a.receivedPartsCnt){delete w(this,Ra)[r];const c=a.messageParts.join("");Je("WsCspdUpdateHandler","#handleCspdUpdateParts","All cspd update parts received",{message:c}),w(this,ss).call(this,c)}}),le(this,hr,{}),le(this,Gh,async r=>{Je("WsCspdUpdateHandler","#handleCspdUpdatePartial","",{data:r});const i=r.number;w(this,hr)[i]||(w(this,hr)[i]=[]),w(this,hr)[i][r.partialNumber]=r;const o=Object.values(w(this,hr)[i]).find(a=>!a.isPartial),s=w(this,hr)[i].filter(Boolean);if(o&&s.length===o.partialNumber+1&&s.every((a,c)=>a.partialNumber===c)){const a=Vn(...w(this,hr)[i]);delete a.partialNumber,delete a.isPartial,Je("WsCspdUpdateHandler","#handleCspdUpdatePartial","All partial parts received",{mergedData:a}),delete w(this,hr)[i],w(this,ss).call(this,a)}}),le(this,Jh,2147483647),le(this,Qh,-2147483648),le(this,gs,0),le(this,Zh,()=>{const r=w(this,gs);return w(this,Jh)===r?w(this,Qh):r+1}),le(this,Xr,[]),le(this,Yh,r=>{const[i,o]=Ml(r);if(i)return[i,null];const{error:s,data:a}=TE.safeParse(o);if(s)return[s,null];const c=(o&&typeof o=="object"?Object.entries(o):[]).reduce((m,[d,h])=>(X1(d)&&(m[d]=h),m),{}),{error:u,data:l}=_E.safeParse(c);if(u)return[u,null];const f={...a,...Object.keys(l).length&&{editorData:l}};return[null,{rawResponse:o,parsedResponse:f}]}),le(this,ep,r=>{const i=r.$del??[],o=Object.entries(r),{staleCmps:s,updatedCmps:a}=(o==null?void 0:o.reduce((c,[u,l])=>{if(It(l))return c;const{$chg:f,$typ:m,Value:d,Group:h}=l;f&&c.staleCmps.push({name:u,changedCmpProperties:f});const g=Ls(u);m&&(w(this,Su)[g]=m);const p=w(this,Su)[g],v=_g(p),_=j0.some(x=>v===x),P=f==null?void 0:f.includes("Value");if(!_&&!P){const[x,R]=eu(()=>w(this,os).call(this,g,p,d));if(x){const q=x instanceof Error?x.message:"Unknown error",A={name:u,type:p,value:d,error:x};et("WsCspdUpdateHandler","#getCmpListDataFromCspdUpdate",`Failed to parse cmp value: ${q}`,A)}else c.updatedCmps.push({name:u,value:R,type:p,group:h})}return c},{staleCmps:[],updatedCmps:[]}))??{staleCmps:[],updatedCmps:[]};return{staleCmps:s,updatedCmps:a,deletedCmps:i}}),le(this,tp,r=>Object.entries(r).map(([i,o])=>{const s=G1(i),{$typ:a}=o.ComponentInfo??{},{$inp:c,$ipt:u,$src:l,$val:f}=o.Value??{},{$src:m}=o.Query??{};a&&(w(this,Iu)[s]=a);const d=w(this,Iu)[s],h=bg(f)?f:void 0,[g,p]=h?[void 0,void 0]:eu(()=>w(this,os).call(this,s,d,f));if(g){const L=g instanceof Error?g.message:"Unknown error",O={cmpId:s,cmpType:d,value:f};et("WsCspdUpdateHandler","#getCmpEditorDataFromCspdUpdate",`Failed to parse cmp editor value: ${L}`,O)}const v=_g(d),_=jm(d),P=u||d&&J1(d),x=`${v}<${P}>`,[R,q]=eu(()=>w(this,os).call(this,s,x,c));if(R){const L=R instanceof Error?R.message:"Unknown error",O={cmpId:s,cmpType:d,value:c};et("WsCspdUpdateHandler","#getCmpEditorDataFromCspdUpdate",`Failed to parse cmp editor input value: ${L}`,O)}const A=l??m??"",I=_r(q)||It(q)?JSON.stringify(q):q;return{cmpId:s,value:p,error:h,input:I,inputType:P,source:A,type:_,baseType:v}})??[]),le(this,np,r=>{const i=bu(r.$val),o=r.$typ?bu(r.$typ):[];return{updatedFibers:i.reduce((s,{ctrlId:a,values:c})=>(s[a]=Object.entries(c).map(([u,l])=>{var f;const m=u,d=(f=o.find(g=>g.ctrlId===a))==null?void 0:f.values[m],h=bg(l)?l:void 0;return{propertyName:m,type:d,value:h?void 0:l,error:h}}),s),{})}}),le(this,rp,r=>r.map(i=>{const o=Y1(i.Pack),s=Object.entries(i.Fibers).map(([a,c])=>({propertyName:a,type:c.$typ,hiveRule:c.$src}));return{ctrlId:o,fibers:s}})),le(this,ip,r=>{var i;const o=v=>{if(typeof v=="number"||It(v)||v===null)return v;const _=Object.keys(v).filter(x=>x!=="$err")[0],P=v[_];return o(P)},s={cmpsWithSourceErrors:[],cmpsWithCascadingErrors:[],cmpsWithResolvedErrors:[]},a=r.Errors.Cfgr,{cmpsWithSourceErrors:c,cmpsWithCascadingErrors:u,cmpsWithResolvedErrors:l}=a?Object.entries(a).reduce((v,[_,P])=>{const x=o(P);return typeof x=="number"?v.cmpsWithSourceErrors.push(_):It(x)?v.cmpsWithCascadingErrors.push(_):x===null&&v.cmpsWithResolvedErrors.push(_),v},s):s,f={ctrlFibersWithSourceErrors:[],ctrlFibersWithCascadingErrors:[],ctrlFibersWithResolvedErrors:[]},m=(i=r.Errors.Fibers)==null?void 0:i.CtrlFibers,d=m&&bu(m),{ctrlFibersWithSourceErrors:h,ctrlFibersWithCascadingErrors:g,ctrlFibersWithResolvedErrors:p}=d?d.reduce((v,{ctrlId:_,values:P})=>(Object.entries(P).forEach(([x,R])=>{const q=x;typeof R=="number"?v.ctrlFibersWithSourceErrors.push({ctrlId:_,fiberName:q}):It(R)?v.ctrlFibersWithCascadingErrors.push({ctrlId:_,fiberName:q}):R===null&&v.ctrlFibersWithResolvedErrors.push({ctrlId:_,fiberName:q})}),v),f):f;return{cmpsWithSourceErrors:c,cmpsWithCascadingErrors:u,cmpsWithResolvedErrors:l,ctrlFibersWithSourceErrors:h,ctrlFibersWithCascadingErrors:g,ctrlFibersWithResolvedErrors:p}}),le(this,op,r=>{const i=r.$src,o=r.$val,s=r.$inp;return{source:i,value:o,input:s}}),le(this,ss,r=>{var i;const[o,s]=Mr(r)?w(this,Yh).call(this,r):[null,{parsedResponse:r,rawResponse:r}];if(o){et("WsCspdUpdateHandler","#handleCspdUpdate","Failed to parse cspd update",{error:o,errorMsg:o.message,rawResponse:r});return}const{parsedResponse:a,rawResponse:c}=s;if(EE(a)){w(this,Gh).call(this,a);return}const u=w(this,gs);if(a.number!==u){w(this,Xr).push(a),Je("WsCspdUpdateHandler","#handleCspdUpdate",`Waiting for msg number ${u}, received ${a.number}. Saving data for later processing.`,{rawResponse:c,parsedResponse:a,queue:w(this,Xr)});return}Je("WsCspdUpdateHandler",`#handleCspdUpdate, ID ${a.request}`,"",{rawResponse:c,parsedResponse:a});const l=!w(this,Wa);Me(this,Wa,!0);const f=w(this,Zh).call(this);Me(this,gs,f);const m=(i=a.west)==null?void 0:i.$val,{staleCmps:d,updatedCmps:h,deletedCmps:g}=m?w(this,ep).call(this,m):{staleCmps:[],updatedCmps:[],deletedCmps:[]};w(this,Ze).emit("cmpListCspdUpdateProcessed",{isFirstCspdUpdate:l,staleCmps:d,updatedCmps:h,deletedCmps:g});const p=a.editorData,v=p?w(this,tp).call(this,p):[];v.length&&w(this,Ze).emit("cmpEditorCspdUpdateProcessed",v);const _=a.fiber,P=_&&w(this,np).call(this,_);P&&w(this,Ze).emit("ctrlFiberCspdUpdateProcessed",P);const x=Object.entries(a).map(([H,ne])=>D_(H)&&P_(ne)?ne:void 0).filter(H=>H!==void 0),R=x&&w(this,rp).call(this,x);R&&w(this,Ze).emit("ctrlFiberEditorCspdUpdateProcessed",R);const q=a.inspector,A=q&&w(this,ip).call(this,q);A&&w(this,Ze).emit("inspectorCspdUpdateProcessed",A);const I=a.cfgrField,L=I&&w(this,op).call(this,I);L&&w(this,Ze).emit("cfgrFieldCspdUpdateProcessed",L),a.request&&w(this,Bh).call(this,a.request),w(this,Ze).emit("cspdUpdateProcessed");const O=w(this,Xr).findIndex(H=>H.number===f);if(O>=0){const H=w(this,Xr)[O];w(this,Xr).splice(O,1),w(this,ss).call(this,H)}}),Me(this,Ze,new Rl),Me(this,os,n),e.onCspdUpdate(r=>w(this,ss).call(this,r)),e.onCspdUpdateParts((...r)=>w(this,Xh).call(this,...r)),e.onConnectionClosed(()=>on(this,Kh,N_).call(this))}onCspdUpdateProcessed(e){return w(this,Ze).on("cspdUpdateProcessed",e),{unsubscribe:()=>w(this,Ze).off("cspdUpdateProcessed",e)}}onCmpListCspdUpdateProcessed(e){return w(this,Ze).on("cmpListCspdUpdateProcessed",e),{unsubscribe:()=>w(this,Ze).off("cmpListCspdUpdateProcessed",e)}}onCmpEditorCspdUpdateProcessed(e,n){const r=i=>{const o=i.find(s=>s.cmpId===e);o&&n(o)};return w(this,Ze).on("cmpEditorCspdUpdateProcessed",r),{unsubscribe:()=>w(this,Ze).off("cmpEditorCspdUpdateProcessed",r)}}onCtrlFiberCspdUpdateProcessed(e){return w(this,Ze).on("ctrlFiberCspdUpdateProcessed",e),{unsubscribe:()=>w(this,Ze).off("ctrlFiberCspdUpdateProcessed",e)}}onCtrlFiberEditorCspdUpdateProcessed(e,n){const r=i=>{const o=i.find(s=>s.ctrlId===e);o&&n(o)};return w(this,Ze).on("ctrlFiberEditorCspdUpdateProcessed",r),{unsubscribe:()=>w(this,Ze).off("ctrlFiberEditorCspdUpdateProcessed",r)}}onInspectorCspdUpdateProcessed(e){return w(this,Ze).on("inspectorCspdUpdateProcessed",e),{unsubscribe:()=>w(this,Ze).off("inspectorCspdUpdateProcessed",e)}}onCfgrFieldCspdUpdateProcessed(e){return w(this,Ze).on("cfgrFieldCspdUpdateProcessed",e),{unsubscribe:()=>w(this,Ze).off("cfgrFieldCspdUpdateProcessed",e)}}}Ze=new WeakMap,Wa=new WeakMap,Su=new WeakMap,Iu=new WeakMap,os=new WeakMap,Da=new WeakMap,ku=new WeakMap,Bh=new WeakMap,Kh=new WeakSet,N_=function(){Me(this,Wa,!1),Me(this,gs,0),Me(this,Xr,[])},Ra=new WeakMap,Xh=new WeakMap,hr=new WeakMap,Gh=new WeakMap,Jh=new WeakMap,Qh=new WeakMap,gs=new WeakMap,Zh=new WeakMap,Xr=new WeakMap,Yh=new WeakMap,ep=new WeakMap,tp=new WeakMap,np=new WeakMap,rp=new WeakMap,ip=new WeakMap,op=new WeakMap,ss=new WeakMap;var Br,Gr,Aa,as,Tn,sp,Ma,ap,$_;class PE{constructor(){le(this,Ma),le(this,Br),le(this,Gr),le(this,Aa),le(this,as),le(this,Tn),le(this,sp,async()=>{await w(this,Tn).resubscribeToCmpUpdates()});var e,n;const r=(n=(e=window.Cbn)==null?void 0:e.getCustomCodeSdkBridge)==null?void 0:n.call(e,"v1"),{connectionMgr:i,cspdUpdateHandler:o,cfgrClientInternals:s}=(r==null?void 0:r.getSharedCfgrClientCore())??{};Me(this,Br,i??new mE),w(this,Br).onConnectionClosed(()=>w(this,Tn).markAllCmpPropertiesAsStale()),w(this,Br).onConnectionRestored(()=>w(this,sp).call(this)),Me(this,Gr,new Rl),Me(this,Tn,new fC),Me(this,Aa,o??new xE(w(this,Br),lC)),w(this,Aa).onCmpListCspdUpdateProcessed(a=>on(this,Ma,$_).call(this,a)),Me(this,as,s??new sE(w(this,Br),w(this,Aa))),Sm(this,w(this,as))}onNewCfgnIdCreated(e){w(this,Gr).on("newCfgnIdCreated",e)}async connect(e){const n=window.location.href,r=Sg(n)?Vm(n):void 0,i=r?{serverUrl:e.serverUrl,mode:e.mode,companyName:r.companyName,configuratorName:r.planName,draftName:r.planVersion,...(r==null?void 0:r.cfgnId)&&(r==null?void 0:r.authToken)&&{editCfgn:{cfgnId:r.cfgnId,authToken:r.authToken}}}:e,o=await w(this,Br).connectCfgr(i);if(o&&(w(this,Gr).emit("newCfgnIdCreated",o.cfgnId,o.authToken),r)){const s=o.editUrl+window.location.search;window.history.replaceState({},"",s)}}async getCmpValue(e){return await w(this,Tn).getCmpValue(e)}async onCmpValueChanged(e,n,r,i=!1){await w(this,Tn).subscribeToCmpUpdates(e,"Value"),w(this,Gr).on("cmpsUpdated",o=>{o.find(s=>s===e)&&on(this,Ma,ap).call(this,e,n,r)}),i&&on(this,Ma,ap).call(this,e,n,r)}async onAnyCmpValueChanged(e,n,r=!1){n.length||et("ConfiguratorClient","onAnyCmpValueChanged","Please define at least one component!");const i=n.map(s=>w(this,Tn).subscribeToCmpUpdates(s.name,"Value",r));await Promise.all(i);const o=n.map(s=>s.name);w(this,Gr).on("cmpsUpdated",s=>{if(s.some(a=>o.includes(a))){const a=o.reduce((c,u)=>(c[u]=s.includes(u),c),{});e(a)}})}async setCmpInputs(e){const n=e.map(o=>({...o,cmp:Mm(o.name)})),r=n.filter(o=>!wg(o.cmp));if(r.length){et("ConfiguratorClient","setCmpInputs","The following components have not been registered with the `ConfiguratorClient` or are not supported by `setCmpInputs`. They will be ignored:",r);return}const i=n.filter(o=>wg(o.cmp)).map(o=>{const{zodType:s}=o.cmp,a=Ls(o.name);return w(this,as).setCmpInput(a,o.value,s)});await Promise.all(i)}async finishConfiguration(e){const n=await w(this,as).finishConfiguration(e);if(!n)throw new Error("Failed to finish configuration. No result returned from server.");const r=window.location.href;if(Sg(r)){const i=n.newEditCfgnUrl+window.location.search;window.history.replaceState({},"",i)}return n}}Br=new WeakMap,Gr=new WeakMap,Aa=new WeakMap,as=new WeakMap,Tn=new WeakMap,sp=new WeakMap,Ma=new WeakSet,ap=async function(t,e,n){const r=await w(this,Tn).getCmpValue(t);(typeof n!="function"||await n(r))&&e(r)},$_=function(t){const{isFirstCspdUpdate:e,staleCmps:n,updatedCmps:r}=t;if(n.forEach(({name:i,changedCmpProperties:o})=>{w(this,Tn).markCmpPropertiesAsStale(i,o)}),r.forEach(({name:i,value:o})=>{w(this,Tn).updateCmp(i,o,e)}),r.length){const i=r.map(o=>o.name);w(this,Gr).emit("cmpsUpdated",i)}},lo(PE,"version",O0);const DE="v1";console.log(`Loading custom code SDK v${wm}`);var Zc,Cm;const Rd=(Cm=(Zc=window.Cbn)==null?void 0:Zc.getCustomCodeSdkBridge)==null?void 0:Cm.call(Zc,"v1"),fc=Rd==null?void 0:Rd.createCfgrClient(DE,Sm);if(!fc)throw new Error("Cannot create Configurator Client. Make sure to only use the `custom-code-sdk` inside a Combeenation Configurator.");const RE=fc.onAnyCmpValueChanged.bind(fc),AE=fc.finishConfiguration.bind(fc);exports.Button=W_;exports.Checkbox=V_;exports.Collapsible=q_;exports.CustomControl=H_;exports.Dataview=B_;exports.Input=K_;exports.Panel=X_;exports.Text=G_;exports.ValueComponent=hp;exports.finishConfiguration=AE;exports.onAnyCmpValueChanged=RE;exports.version=wm;
|