/*! For license information please see mergeConflictMain.js.LICENSE.txt */ (()=>{var e={3577:(e,t,a)=>{"use strict";function n(e){return e.toLowerCase()}function i(e){if(e&&"object"==typeof e){const t=e;if("function"==typeof t.rawHeaders&&"function"==typeof t.clone&&"function"==typeof t.get&&"function"==typeof t.set&&"function"==typeof t.contains&&"function"==typeof t.remove&&"function"==typeof t.headersArray&&"function"==typeof t.headerValues&&"function"==typeof t.headerNames&&"function"==typeof t.toJson)return!0}return!1}a.r(t),a.d(t,{AccessTokenRefresher:()=>Dn,ApiKeyCredentials:()=>Ln,BaseRequestPolicy:()=>Yt,BasicAuthenticationCredentials:()=>Rn,Constants:()=>xa,DefaultHttpClient:()=>$t,ExpiringAccessTokenCache:()=>On,HttpHeaders:()=>o,HttpPipelineLogLevel:()=>Kt,MapperType:()=>H,QueryCollectionFormat:()=>Ua,RequestPolicyOptions:()=>Qt,RestError:()=>Te,RetryMode:()=>Ta,Serializer:()=>P,ServiceClient:()=>En,TopicCredentials:()=>Mn,URLBuilder:()=>ne,URLQuery:()=>ae,WebResource:()=>G,XML_ATTRKEY:()=>p,XML_CHARKEY:()=>c,applyMixins:()=>A,bearerTokenAuthenticationPolicy:()=>qa,createPipelineFromOptions:()=>Sn,createSpanFunction:()=>Nn,delay:()=>ka,deserializationPolicy:()=>na,deserializeResponseBody:()=>pa,disableResponseDecompressionPolicy:()=>Fa,encodeUri:()=>_,executePromisesSequentially:()=>S,exponentialRetryPolicy:()=>Ea,flattenResponse:()=>In,generateClientRequestIdPolicy:()=>Ha,generateUuid:()=>T,getDefaultProxySettings:()=>Xa,getDefaultUserAgentValue:()=>La,isDuration:()=>N,isNode:()=>w,isTokenCredential:()=>Da,isValidUuid:()=>E,keepAlivePolicy:()=>la,logPolicy:()=>Aa,operationOptionsToRequestOptionsBase:()=>Wt,parseXML:()=>aa,promiseToCallback:()=>j,promiseToServiceCallback:()=>C,proxyPolicy:()=>Ja,redirectPolicy:()=>ha,serializeObject:()=>B,signingPolicy:()=>nn,stringifyXML:()=>ta,stripRequest:()=>k,stripResponse:()=>x,systemErrorRetryPolicy:()=>rn,throttlingRetryPolicy:()=>ln,tracingPolicy:()=>xn,userAgentPolicy:()=>Ma});class o{constructor(e){if(this._headersMap={},e)for(const t in e)this.set(t,e[t])}set(e,t){this._headersMap[n(e)]={name:e,value:t.toString()}}get(e){const t=this._headersMap[n(e)];return t?t.value:void 0}contains(e){return!!this._headersMap[n(e)]}remove(e){const t=this.contains(e);return delete this._headersMap[n(e)],t}rawHeaders(){return this.toJson({preserveCase:!0})}headersArray(){const e=[];for(const t in this._headersMap)e.push(this._headersMap[t]);return e}headerNames(){const e=[],t=this.headersArray();for(let a=0;ad.length-16&&(u().randomFillSync(d),m=0),d.slice(m,m+=16)}const f=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,v=[];for(let e=0;e<256;++e)v.push((e+256).toString(16).substr(1));const g=function(e,t=0){const a=(v[e[t+0]]+v[e[t+1]]+v[e[t+2]]+v[e[t+3]]+"-"+v[e[t+4]]+v[e[t+5]]+"-"+v[e[t+6]]+v[e[t+7]]+"-"+v[e[t+8]]+v[e[t+9]]+"-"+v[e[t+10]]+v[e[t+11]]+v[e[t+12]]+v[e[t+13]]+v[e[t+14]]+v[e[t+15]]).toLowerCase();if(!function(e){return"string"==typeof e&&f.test(e)}(a))throw TypeError("Stringified UUID is invalid");return a},y=function(e,t,a){const n=(e=e||{}).random||(e.rng||h)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){a=a||0;for(let e=0;e<16;++e)t[a+e]=n[e];return t}return g(n)},b=/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i,w="undefined"!=typeof process&&!!process.version&&!!process.versions&&!!process.versions.node;function _(e){return encodeURIComponent(e).replace(/!/g,"%21").replace(/"/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}function x(e){const t={};return t.body=e.bodyAsText,t.headers=e.headers,t.status=e.status,t}function k(e){const t=e.clone();return t.headers&&t.headers.remove("authorization"),t}function E(e){return b.test(e)}function T(){return y()}function S(e,t){let a=Promise.resolve(t);return e.forEach((e=>{a=a.then(e)})),a}function j(e){if("function"!=typeof e.then)throw new Error("The provided input is not a Promise.");return t=>{e.then((e=>t(void 0,e))).catch((e=>{t(e)}))}}function C(e){if("function"!=typeof e.then)throw new Error("The provided input is not a Promise.");return t=>{e.then((e=>process.nextTick(t,void 0,e.parsedBody,e.request,e))).catch((e=>{process.nextTick(t,e)}))}}function A(e,t){const a=e;t.forEach((e=>{Object.getOwnPropertyNames(e.prototype).forEach((t=>{a.prototype[t]=e.prototype[t]}))}))}const I=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function N(e){return I.test(e)}function O(e,t,a){return e&&t?e.split(t).join(a||""):e}function D(e){return process.env[e]?process.env[e]:process.env[e.toLowerCase()]?process.env[e.toLowerCase()]:void 0}class P{constructor(e={},t){this.modelMappers=e,this.isXML=t}validateConstraints(e,t,a){const n=(e,n)=>{throw new Error(`"${a}" with value "${t}" should satisfy the constraint "${e}": ${n}.`)};if(e.constraints&&null!=t){const a=t,{ExclusiveMaximum:i,ExclusiveMinimum:o,InclusiveMaximum:r,InclusiveMinimum:s,MaxItems:p,MaxLength:c,MinItems:l,MinLength:u,MultipleOf:d,Pattern:m,UniqueItems:h}=e.constraints;null!=i&&a>=i&&n("ExclusiveMaximum",i),null!=o&&a<=o&&n("ExclusiveMinimum",o),null!=r&&a>r&&n("InclusiveMaximum",r),null!=s&&ap&&n("MaxItems",p),null!=c&&f.length>c&&n("MaxLength",c),null!=l&&f.lengtha.indexOf(e)!==t))&&n("UniqueItems",h)}}serialize(e,t,a,n={}){var i,o,s;const l={rootName:null!==(i=n.rootName)&&void 0!==i?i:"",includeRoot:null!==(o=n.includeRoot)&&void 0!==o&&o,xmlCharKey:null!==(s=n.xmlCharKey)&&void 0!==s?s:c};let u={};const d=e.type.name;a||(a=e.serializedName),null!==d.match(/^Sequence$/i)&&(u=[]),e.isConstant&&(t=e.defaultValue);const{required:m,nullable:h}=e;if(m&&h&&void 0===t)throw new Error(`${a} cannot be undefined.`);if(m&&!h&&null==t)throw new Error(`${a} cannot be null or undefined.`);if(!m&&!1===h&&null===t)throw new Error(`${a} cannot be null.`);return null==t||null!==d.match(/^any$/i)?u=t:null!==d.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/i)?u=function(e,t,a){if(null!=a)if(null!==e.match(/^Number$/i)){if("number"!=typeof a)throw new Error(`${t} with value ${a} must be of type number.`)}else if(null!==e.match(/^String$/i)){if("string"!=typeof a.valueOf())throw new Error(`${t} with value "${a}" must be of type string.`)}else if(null!==e.match(/^Uuid$/i)){if("string"!=typeof a.valueOf()||!E(a))throw new Error(`${t} with value "${a}" must be of type string and a valid uuid.`)}else if(null!==e.match(/^Boolean$/i)){if("boolean"!=typeof a)throw new Error(`${t} with value ${a} must be of type boolean.`)}else if(null!==e.match(/^Stream$/i)){const e=typeof a;if(!("string"===e||"function"===e||a instanceof ArrayBuffer||ArrayBuffer.isView(a)||("function"==typeof Blob||"object"==typeof Blob)&&a instanceof Blob))throw new Error(`${t} must be a string, Blob, ArrayBuffer, ArrayBufferView, or a function returning NodeJS.ReadableStream.`)}return a}(d,a,t):null!==d.match(/^Enum$/i)?u=function(e,t,a){if(!t)throw new Error(`Please provide a set of allowedValues to validate ${e} as an Enum Type.`);if(!t.some((e=>"string"==typeof e.valueOf()?e.toLowerCase()===a.toLowerCase():e===a)))throw new Error(`${a} is not a valid value for ${e}. The valid values are: ${JSON.stringify(t)}.`);return a}(a,e.type.allowedValues,t):null!==d.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/i)?u=function(e,t,a){if(null!=t)if(null!==e.match(/^Date$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(`${a} must be an instanceof Date or a string in ISO8601 format.`);t=t instanceof Date?t.toISOString().substring(0,10):new Date(t).toISOString().substring(0,10)}else if(null!==e.match(/^DateTime$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(`${a} must be an instanceof Date or a string in ISO8601 format.`);t=t instanceof Date?t.toISOString():new Date(t).toISOString()}else if(null!==e.match(/^DateTimeRfc1123$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(`${a} must be an instanceof Date or a string in RFC-1123 format.`);t=t instanceof Date?t.toUTCString():new Date(t).toUTCString()}else if(null!==e.match(/^UnixTime$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(`${a} must be an instanceof Date or a string in RFC-1123/ISO8601 format for it to be serialized in UnixTime/Epoch format.`);t=function(e){if(e)return"string"==typeof e.valueOf()&&(e=new Date(e)),Math.floor(e.getTime()/1e3)}(t)}else if(null!==e.match(/^TimeSpan$/i)&&!N(t))throw new Error(`${a} must be a string in ISO 8601 format. Instead was "${t}".`);return t}(d,t,a):null!==d.match(/^ByteArray$/i)?u=function(e,t){let a="";if(null!=t){if(!(t instanceof Uint8Array))throw new Error(`${e} must be of type Uint8Array.`);a=r(t)}return a}(a,t):null!==d.match(/^Base64Url$/i)?u=function(e,t){let a="";if(null!=t){if(!(t instanceof Uint8Array))throw new Error(`${e} must be of type Uint8Array.`);a=function(e){if(e){if(!(e instanceof Uint8Array))throw new Error("Please provide an input of type Uint8Array for converting to Base64Url.");return function(e,t){let a=e.length;for(;a-1>=0&&"="===e[a-1];)--a;return e.substr(0,a)}(r(e)).replace(/\+/g,"-").replace(/\//g,"_")}}(t)||""}return a}(a,t):null!==d.match(/^Sequence$/i)?u=function(e,t,a,n,i,o){if(!Array.isArray(a))throw new Error(`${n} must be of type Array.`);const r=t.type.element;if(!r||"object"!=typeof r)throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${n}.`);const s=[];for(let t=0;te!==i))&&(r[i]=e.serialize(c,a[i],n+'["'+i+'"]',o))}return r}return a}(this,e,t,a,Boolean(this.isXML),l)),u}deserialize(e,t,a,n={}){var i,o,r;const l={rootName:null!==(i=n.rootName)&&void 0!==i?i:"",includeRoot:null!==(o=n.includeRoot)&&void 0!==o&&o,xmlCharKey:null!==(r=n.xmlCharKey)&&void 0!==r?r:c};if(null==t)return this.isXML&&"Sequence"===e.type.name&&!e.xmlIsWrapped&&(t=[]),void 0!==e.defaultValue&&(t=e.defaultValue),t;let u;const d=e.type.name;if(a||(a=e.serializedName),null!==d.match(/^Composite$/i))u=function(e,t,a,n,i){var o,r;const s=null!==(o=i.xmlCharKey)&&void 0!==o?o:c;q(e,t)&&(t=V(e,t,a,"serializedName"));const l=M(e,t,n);let u={};const d=[];for(const o of Object.keys(l)){const c=l[o],m=R(l[o].serializedName);d.push(m[0]);const{serializedName:h,xmlName:f,xmlElementName:v}=c;let g=n;""!==h&&void 0!==h&&(g=n+"."+h);const y=c.headerCollectionPrefix;if(y){const t={};for(const n of Object.keys(a))n.startsWith(y)&&(t[n.substring(y.length)]=e.deserialize(c.type.value,a[n],g,i)),d.push(n);u[o]=t}else if(e.isXML)if(c.xmlIsAttribute&&a[p])u[o]=e.deserialize(c,a[p][f],g,i);else if(c.xmlIsMsText)void 0!==a[s]?u[o]=a[s]:"string"==typeof a&&(u[o]=a);else{const t=v||f||h;if(c.xmlIsWrapped){const t=a[f],n=null!==(r=null==t?void 0:t[v])&&void 0!==r?r:[];u[o]=e.deserialize(c,n,g,i)}else{const n=a[t];u[o]=e.deserialize(c,n,g,i)}}else{let n,r=a;for(const e of m){if(!r)break;r=r[e]}n=r;const s=t.type.polymorphicDiscriminator;let p;if(s&&o===s.clientName&&null==n&&(n=t.serializedName),Array.isArray(a[o])&&""===l[o].serializedName){n=a[o];const t=e.deserialize(c,n,g,i);for(const[e,a]of Object.entries(u))Object.prototype.hasOwnProperty.call(t,e)||(t[e]=a);u=t}else void 0===n&&void 0===c.defaultValue||(p=e.deserialize(c,n,g,i),u[o]=p)}}const m=t.type.additionalProperties;if(m){const t=e=>{for(const t in l)if(R(l[t].serializedName)[0]===e)return!1;return!0};for(const o in a)t(o)&&(u[o]=e.deserialize(m,a[o],n+'["'+o+'"]',i))}else if(a)for(const e of Object.keys(a))void 0!==u[e]||d.includes(e)||U(e,i)||(u[e]=a[e]);return u}(this,e,t,a,l);else{if(this.isXML){const e=l.xmlCharKey,a=t;null!=a[p]&&null!=a[e]&&(t=a[e])}null!==d.match(/^Number$/i)?(u=parseFloat(t),isNaN(u)&&(u=t)):null!==d.match(/^Boolean$/i)?u="true"===t||"false"!==t&&t:null!==d.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/i)?u=t:null!==d.match(/^(Date|DateTime|DateTimeRfc1123)$/i)?u=new Date(t):null!==d.match(/^UnixTime$/i)?u=function(e){if(e)return new Date(1e3*e)}(t):null!==d.match(/^ByteArray$/i)?u=s(t):null!==d.match(/^Base64Url$/i)?u=function(e){if(e){if(e&&"string"!=typeof e.valueOf())throw new Error("Please provide an input of type string for converting to Uint8Array");return s(e=e.replace(/-/g,"+").replace(/_/g,"/"))}}(t):null!==d.match(/^Sequence$/i)?u=function(e,t,a,n,i){const o=t.type.element;if(!o||"object"!=typeof o)throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${n}`);if(a){Array.isArray(a)||(a=[a]);const t=[];for(let r=0;r-1&&a.splice(n,1)}dispatchEvent(e){throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes.")}}function J(e){if(e.aborted)return;e.onabort&&e.onabort.call(e);const t=Y.get(e);t&&t.slice().forEach((t=>{t.call(e,{type:"abort"})})),Q.set(e,!0)}class Z extends Error{constructor(e){super(e),this.name="AbortError"}}class ee{constructor(e){if(this._signal=new X,e){Array.isArray(e)||(e=arguments);for(const t of e)t.aborted?this.abort():t.addEventListener("abort",(()=>{this.abort()}))}}get signal(){return this._signal}abort(){J(this._signal)}static timeout(e){const t=new X,a=setTimeout(J,e,t);return"function"==typeof a.unref&&a.unref(),t}}var te=a(6149);class ae{constructor(){this._rawQuery={}}any(){return Object.keys(this._rawQuery).length>0}keys(){return Object.keys(this._rawQuery)}set(e,t){const a=t;if(e)if(null!=a){const t=Array.isArray(a)?a:a.toString();this._rawQuery[e]=t}else delete this._rawQuery[e]}get(e){return e?this._rawQuery[e]:void 0}toString(){let e="";for(const t in this._rawQuery){e&&(e+="&");const a=this._rawQuery[t];if(Array.isArray(a)){const n=[];for(const e of a)n.push(`${t}=${e}`);e+=n.join("&")}else e+=`${t}=${a}`}return e}static parse(e){const t=new ae;if(e){e.startsWith("?")&&(e=e.substring(1));let a="ParameterName",n="",i="";for(let o=0;ofunction(e){const t=e.charCodeAt(0);return 48<=t&&t<=57||65<=t&&t<=90||97<=t&&t<=122}(e)))}(e);e._currentToken=ie.scheme(t),re(e)?e._currentState="HOST":e._currentState="DONE"}(this);break;case"SCHEME_OR_HOST":!function(e){const t=ue(e,":","/","?");re(e)?":"===se(e)?"://"===ce(e,3)?(e._currentToken=ie.scheme(t),e._currentState="HOST"):(e._currentToken=ie.host(t),e._currentState="PORT"):(e._currentToken=ie.host(t),"/"===se(e)?e._currentState="PATH":e._currentState="QUERY"):(e._currentToken=ie.host(t),e._currentState="DONE")}(this);break;case"HOST":!function(e){"://"===ce(e,3)&&pe(e,3);const t=ue(e,":","/","?");e._currentToken=ie.host(t),re(e)?":"===se(e)?e._currentState="PORT":"/"===se(e)?e._currentState="PATH":e._currentState="QUERY":e._currentState="DONE"}(this);break;case"PORT":!function(e){":"===se(e)&&pe(e);const t=ue(e,"/","?");e._currentToken=ie.port(t),re(e)?"/"===se(e)?e._currentState="PATH":e._currentState="QUERY":e._currentState="DONE"}(this);break;case"PATH":!function(e){const t=ue(e,"?");e._currentToken=ie.path(t),re(e)?e._currentState="QUERY":e._currentState="DONE"}(this);break;case"QUERY":!function(e){"?"===se(e)&&pe(e);const t=function(e){let t="";return e._currentIndex-1===t.indexOf(e)))}function de(e){return"https"===(ne.parse(e).getScheme()||"").toLowerCase()}function me(e,t,a){return e&&t?te.httpsOverHttps(a):e&&!t?te.httpsOverHttp(a):!e&&t?te.httpOverHttps(a):te.httpOverHttp(a)}var he=a(2413),fe=a(6882),ve=a.n(fe);const ge="REDACTED",ye=["x-ms-client-request-id","x-ms-return-client-request-id","x-ms-useragent","x-ms-correlation-request-id","x-ms-request-id","client-request-id","ms-cv","return-client-request-id","traceparent","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Origin","Accept","Accept-Encoding","Cache-Control","Connection","Content-Length","Content-Type","Date","ETag","Expires","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","Last-Modified","Pragma","Request-Id","Retry-After","Server","Transfer-Encoding","User-Agent","WWW-Authenticate"],be=["api-version"];class we{constructor({allowedHeaderNames:e=[],allowedQueryParameters:t=[]}={}){e=Array.isArray(e)?ye.concat(e):ye,t=Array.isArray(t)?be.concat(t):be,this.allowedHeaderNames=new Set(e.map((e=>e.toLowerCase()))),this.allowedQueryParameters=new Set(t.map((e=>e.toLowerCase())))}sanitize(e){const t=new Set;return JSON.stringify(e,((e,a)=>{if(a instanceof Error)return Object.assign(Object.assign({},a),{name:a.name,message:a.message});if("_headersMap"===e)return this.sanitizeHeaders(a);if("url"===e)return this.sanitizeUrl(a);if("query"===e)return this.sanitizeQuery(a);if("body"!==e&&"response"!==e&&"operationSpec"!==e){if(Array.isArray(a)||!("object"!=typeof(n=a)||null===n||Array.isArray(n)||n instanceof RegExp||n instanceof Date)){if(t.has(a))return"[Circular]";t.add(a)}var n;return a}}),2)}sanitizeHeaders(e){return this.sanitizeObject(e,this.allowedHeaderNames,((e,t)=>e[t].value))}sanitizeQuery(e){return this.sanitizeObject(e,this.allowedQueryParameters,((e,t)=>e[t]))}sanitizeObject(e,t,a){if("object"!=typeof e||null===e)return e;const n={};for(const i of Object.keys(e))t.has(i.toLowerCase())?n[i]=a(e,i):n[i]=ge;return n}sanitizeUrl(e){if("string"!=typeof e||null===e)return e;const t=ne.parse(e),a=t.getQuery();if(!a)return e;const n=ae.parse(a);for(const e of n.keys())this.allowedQueryParameters.has(e.toLowerCase())||n.set(e,ge);return t.setQuery(n.toString()),t.toString()}}var _e=a(1669),xe=a.n(_e);const ke=_e.inspect.custom,Ee=new we;class Te extends Error{constructor(e,t,a,n,i){super(e),this.name="RestError",this.code=t,this.statusCode=a,this.request=n,this.response=i,Object.setPrototypeOf(this,Te.prototype)}[ke](){return`RestError: ${this.message} \n ${Ee.sanitize(this)}`}}Te.REQUEST_SEND_ERROR="REQUEST_SEND_ERROR",Te.PARSE_ERROR="PARSE_ERROR";var Se=a(2087);const je="undefined"!=typeof process&&process.env&&process.env.DEBUG||void 0;let Ce,Ae=[],Ie=[];const Ne=[];je&&De(je);const Oe=Object.assign((e=>Re(e)),{enable:De,enabled:Pe,disable:function(){const e=Ce||"";return De(""),e},log:function(e,...t){process.stderr.write(`${xe().format(e,...t)}${Se.EOL}`)}});function De(e){Ce=e,Ae=[],Ie=[];const t=/\*/g,a=e.split(",").map((e=>e.trim().replace(t,".*?")));for(const e of a)e.startsWith("-")?Ie.push(new RegExp(`^${e.substr(1)}$`)):Ae.push(new RegExp(`^${e}$`));for(const e of Ne)e.enabled=Pe(e.namespace)}function Pe(e){if(e.endsWith("*"))return!0;for(const t of Ie)if(t.test(e))return!1;for(const t of Ae)if(t.test(e))return!0;return!1}function Re(e){const t=Object.assign((function(...a){t.enabled&&(a.length>0&&(a[0]=`${e} ${a[0]}`),t.log(...a))}),{enabled:Pe(e),destroy:Le,log:Oe.log,namespace:e,extend:Me});return Ne.push(t),t}function Le(){const e=Ne.indexOf(this);return e>=0&&(Ne.splice(e,1),!0)}function Me(e){const t=Re(`${this.namespace}:${e}`);return t.log=this.log,t}const ze=Oe,Ue=new Set,Ve="undefined"!=typeof process&&process.env&&process.env.AZURE_LOG_LEVEL||void 0;let qe;const Fe=ze("azure");Fe.log=(...e)=>{ze.log(...e)};const Be=["verbose","info","warning","error"];Ve&&(We(Ve)?function(e){if(e&&!We(e))throw new Error(`Unknown log level '${e}'. Acceptable values: ${Be.join(",")}`);qe=e;const t=[];for(const e of Ue)Ke(e)&&t.push(e.namespace);ze.enable(t.join(","))}(Ve):console.error(`AZURE_LOG_LEVEL set to unknown log level '${Ve}'; logging is not enabled. Acceptable values: ${Be.join(", ")}.`));const He={verbose:400,info:300,warning:200,error:100};function Ge(e,t){t.log=(...t)=>{e.log(...t)}}function $e(e,t){const a=Object.assign(e.extend(t),{level:t});if(Ge(e,a),Ke(a)){const e=ze.disable();ze.enable(e+","+a.namespace)}return Ue.add(a),a}function Ke(e){return!!(qe&&He[e.level]<=He[qe])}function We(e){return Be.includes(e)}const Ye=function(e){const t=Fe.extend("core-http");return Ge(Fe,t),{error:$e(t,"error"),warning:$e(t,"warning"),info:$e(t,"info"),verbose:$e(t,"verbose")}}();var Qe=a(8835),Xe=a(7347),Je=a(8761);const Ze=he.Readable,et=Symbol("buffer"),tt=Symbol("type");class at{constructor(){this[tt]="";const e=arguments[0],t=arguments[1],a=[];let n=0;if(e){const t=e,i=Number(t.length);for(let e=0;e1&&void 0!==arguments[1]?arguments[1]:{},n=a.size;let i=void 0===n?0:n;var o=a.timeout;let r=void 0===o?0:o;null==e?e=null:ct(e)?e=Buffer.from(e.toString()):lt(e)||Buffer.isBuffer(e)||("[object ArrayBuffer]"===Object.prototype.toString.call(e)?e=Buffer.from(e):ArrayBuffer.isView(e)?e=Buffer.from(e.buffer,e.byteOffset,e.byteLength):e instanceof he||(e=Buffer.from(String(e)))),this[ot]={body:e,disturbed:!1,error:null},this.size=i,this.timeout=r,e instanceof he&&e.on("error",(function(e){const a="AbortError"===e.name?e:new nt(`Invalid response body while trying to fetch ${t.url}: ${e.message}`,"system",e);t[ot].error=a}))}function pt(){var e=this;if(this[ot].disturbed)return st.Promise.reject(new TypeError(`body used already for: ${this.url}`));if(this[ot].disturbed=!0,this[ot].error)return st.Promise.reject(this[ot].error);let t=this.body;if(null===t)return st.Promise.resolve(Buffer.alloc(0));if(lt(t)&&(t=t.stream()),Buffer.isBuffer(t))return st.Promise.resolve(t);if(!(t instanceof he))return st.Promise.resolve(Buffer.alloc(0));let a=[],n=0,i=!1;return new st.Promise((function(o,r){let s;e.timeout&&(s=setTimeout((function(){i=!0,r(new nt(`Response timeout while trying to fetch ${e.url} (over ${e.timeout}ms)`,"body-timeout"))}),e.timeout)),t.on("error",(function(t){"AbortError"===t.name?(i=!0,r(t)):r(new nt(`Invalid response body while trying to fetch ${e.url}: ${t.message}`,"system",t))})),t.on("data",(function(t){if(!i&&null!==t){if(e.size&&n+t.length>e.size)return i=!0,void r(new nt(`content size at ${e.url} over limit: ${e.size}`,"max-size"));n+=t.length,a.push(t)}})),t.on("end",(function(){if(!i){clearTimeout(s);try{o(Buffer.concat(a,n))}catch(t){r(new nt(`Could not create Buffer from response body for ${e.url}: ${t.message}`,"system",t))}}}))}))}function ct(e){return"object"==typeof e&&"function"==typeof e.append&&"function"==typeof e.delete&&"function"==typeof e.get&&"function"==typeof e.getAll&&"function"==typeof e.has&&"function"==typeof e.set&&("URLSearchParams"===e.constructor.name||"[object URLSearchParams]"===Object.prototype.toString.call(e)||"function"==typeof e.sort)}function lt(e){return"object"==typeof e&&"function"==typeof e.arrayBuffer&&"string"==typeof e.type&&"function"==typeof e.stream&&"function"==typeof e.constructor&&"string"==typeof e.constructor.name&&/^(Blob|File)$/.test(e.constructor.name)&&/^(Blob|File)$/.test(e[Symbol.toStringTag])}function ut(e){let t,a,n=e.body;if(e.bodyUsed)throw new Error("cannot clone body after it is used");return n instanceof he&&"function"!=typeof n.getBoundary&&(t=new rt,a=new rt,n.pipe(t),n.pipe(a),e[ot].body=t,n=a),n}function dt(e){return null===e?null:"string"==typeof e?"text/plain;charset=UTF-8":ct(e)?"application/x-www-form-urlencoded;charset=UTF-8":lt(e)?e.type||null:Buffer.isBuffer(e)||"[object ArrayBuffer]"===Object.prototype.toString.call(e)||ArrayBuffer.isView(e)?null:"function"==typeof e.getBoundary?`multipart/form-data;boundary=${e.getBoundary()}`:e instanceof he?null:"text/plain;charset=UTF-8"}function mt(e){const t=e.body;return null===t?0:lt(t)?t.size:Buffer.isBuffer(t)?t.length:t&&"function"==typeof t.getLengthSync&&(t._lengthRetrievers&&0==t._lengthRetrievers.length||t.hasKnownLength&&t.hasKnownLength())?t.getLengthSync():null}st.prototype={get body(){return this[ot].body},get bodyUsed(){return this[ot].disturbed},arrayBuffer(){return pt.call(this).then((function(e){return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}))},blob(){let e=this.headers&&this.headers.get("content-type")||"";return pt.call(this).then((function(t){return Object.assign(new at([],{type:e.toLowerCase()}),{[et]:t})}))},json(){var e=this;return pt.call(this).then((function(t){try{return JSON.parse(t.toString())}catch(t){return st.Promise.reject(new nt(`invalid json response body at ${e.url} reason: ${t.message}`,"invalid-json"))}}))},text(){return pt.call(this).then((function(e){return e.toString()}))},buffer(){return pt.call(this)},textConverted(){var e=this;return pt.call(this).then((function(t){return function(e,t){if("function"!=typeof it)throw new Error("The package `encoding` must be installed to use the textConverted() function");const a=t.get("content-type");let n,i,o="utf-8";return a&&(n=/charset=([^;]*)/i.exec(a)),i=e.slice(0,1024).toString(),!n&&i&&(n=/0&&void 0!==arguments[0]?arguments[0]:void 0;if(this[bt]=Object.create(null),e instanceof wt){const t=e.raw(),a=Object.keys(t);for(const e of a)for(const a of t[e])this.append(e,a)}else if(null==e);else{if("object"!=typeof e)throw new TypeError("Provided initializer must be an object");{const t=e[Symbol.iterator];if(null!=t){if("function"!=typeof t)throw new TypeError("Header pairs must be iterable");const a=[];for(const t of e){if("object"!=typeof t||"function"!=typeof t[Symbol.iterator])throw new TypeError("Each header pair must be iterable");a.push(Array.from(t))}for(const e of a){if(2!==e.length)throw new TypeError("Each header pair must be a name/value tuple");this.append(e[0],e[1])}}else for(const t of Object.keys(e)){const a=e[t];this.append(t,a)}}}}get(e){vt(e=`${e}`);const t=yt(this[bt],e);return void 0===t?null:this[bt][t].join(", ")}forEach(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,a=_t(this),n=0;for(;n1&&void 0!==arguments[1]?arguments[1]:"key+value";const a=Object.keys(e[bt]).sort();return a.map("key"===t?function(e){return e.toLowerCase()}:"value"===t?function(t){return e[bt][t].join(", ")}:function(t){return[t.toLowerCase(),e[bt][t].join(", ")]})}wt.prototype.entries=wt.prototype[Symbol.iterator],Object.defineProperty(wt.prototype,Symbol.toStringTag,{value:"Headers",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(wt.prototype,{get:{enumerable:!0},forEach:{enumerable:!0},set:{enumerable:!0},append:{enumerable:!0},has:{enumerable:!0},delete:{enumerable:!0},keys:{enumerable:!0},values:{enumerable:!0},entries:{enumerable:!0}});const xt=Symbol("internal");function kt(e,t){const a=Object.create(Et);return a[xt]={target:e,kind:t,index:0},a}const Et=Object.setPrototypeOf({next(){if(!this||Object.getPrototypeOf(this)!==Et)throw new TypeError("Value of `this` is not a HeadersIterator");var e=this[xt];const t=e.target,a=e.kind,n=e.index,i=_t(t,a);return n>=i.length?{value:void 0,done:!0}:(this[xt].index=n+1,{value:i[n],done:!1})}},Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));function Tt(e){const t=Object.assign({__proto__:null},e[bt]),a=yt(e[bt],"Host");return void 0!==a&&(t[a]=t[a][0]),t}Object.defineProperty(Et,Symbol.toStringTag,{value:"HeadersIterator",writable:!1,enumerable:!1,configurable:!0});const St=Symbol("Response internals"),jt=$.STATUS_CODES;class Ct{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};st.call(this,e,t);const a=t.status||200,n=new wt(t.headers);if(null!=e&&!n.has("Content-Type")){const t=dt(e);t&&n.append("Content-Type",t)}this[St]={url:t.url,status:a,statusText:t.statusText||jt[a],headers:n,counter:t.counter}}get url(){return this[St].url||""}get status(){return this[St].status}get ok(){return this[St].status>=200&&this[St].status<300}get redirected(){return this[St].counter>0}get statusText(){return this[St].statusText}get headers(){return this[St].headers}clone(){return new Ct(ut(this),{url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected})}}st.mixIn(Ct.prototype),Object.defineProperties(Ct.prototype,{url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}}),Object.defineProperty(Ct.prototype,Symbol.toStringTag,{value:"Response",writable:!1,enumerable:!1,configurable:!0});const At=Symbol("Request internals"),It=Qe.URL||Xe.URL,Nt=Qe.parse,Ot=Qe.format;function Dt(e){return/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(e)&&(e=new It(e).toString()),Nt(e)}const Pt="destroy"in he.Readable.prototype;function Rt(e){return"object"==typeof e&&"object"==typeof e[At]}class Lt{constructor(e){let t,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Rt(e)?t=Dt(e.url):(t=e&&e.href?Dt(e.href):Dt(`${e}`),e={});let n=a.method||e.method||"GET";if(n=n.toUpperCase(),(null!=a.body||Rt(e)&&null!==e.body)&&("GET"===n||"HEAD"===n))throw new TypeError("Request with GET/HEAD method cannot have body");let i=null!=a.body?a.body:Rt(e)&&null!==e.body?ut(e):null;st.call(this,i,{timeout:a.timeout||e.timeout||0,size:a.size||e.size||0});const o=new wt(a.headers||e.headers||{});if(null!=i&&!o.has("Content-Type")){const e=dt(i);e&&o.append("Content-Type",e)}let r=Rt(e)?e.signal:null;if("signal"in a&&(r=a.signal),null!=r&&!function(e){const t=e&&"object"==typeof e&&Object.getPrototypeOf(e);return!(!t||"AbortSignal"!==t.constructor.name)}(r))throw new TypeError("Expected signal to be an instanceof AbortSignal");this[At]={method:n,redirect:a.redirect||e.redirect||"follow",headers:o,parsedURL:t,signal:r},this.follow=void 0!==a.follow?a.follow:void 0!==e.follow?e.follow:20,this.compress=void 0!==a.compress?a.compress:void 0===e.compress||e.compress,this.counter=a.counter||e.counter||0,this.agent=a.agent||e.agent}get method(){return this[At].method}get url(){return Ot(this[At].parsedURL)}get headers(){return this[At].headers}get redirect(){return this[At].redirect}get signal(){return this[At].signal}clone(){return new Lt(this)}}function Mt(e){Error.call(this,e),this.type="aborted",this.message=e,Error.captureStackTrace(this,this.constructor)}st.mixIn(Lt.prototype),Object.defineProperty(Lt.prototype,Symbol.toStringTag,{value:"Request",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(Lt.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0}}),Mt.prototype=Object.create(Error.prototype),Mt.prototype.constructor=Mt,Mt.prototype.name="AbortError";const zt=Qe.URL||Xe.URL,Ut=he.PassThrough;function Vt(e,t){if(!Vt.Promise)throw new Error("native promise missing, set fetch.Promise to your favorite alternative");return st.Promise=Vt.Promise,new Vt.Promise((function(a,n){const i=new Lt(e,t),o=function(e){const t=e[At].parsedURL,a=new wt(e[At].headers);if(a.has("Accept")||a.set("Accept","*/*"),!t.protocol||!t.hostname)throw new TypeError("Only absolute URLs are supported");if(!/^https?:$/.test(t.protocol))throw new TypeError("Only HTTP(S) protocols are supported");if(e.signal&&e.body instanceof he.Readable&&!Pt)throw new Error("Cancellation of streamed requests with AbortSignal is not supported in node < 8");let n=null;if(null==e.body&&/^(POST|PUT)$/i.test(e.method)&&(n="0"),null!=e.body){const t=mt(e);"number"==typeof t&&(n=String(t))}n&&a.set("Content-Length",n),a.has("User-Agent")||a.set("User-Agent","node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"),e.compress&&!a.has("Accept-Encoding")&&a.set("Accept-Encoding","gzip,deflate");let i=e.agent;return"function"==typeof i&&(i=i(t)),a.has("Connection")||i||a.set("Connection","close"),Object.assign({},t,{method:e.method,headers:Tt(a),agent:i})}(i),r=("https:"===o.protocol?K:$).request,s=i.signal;let p=null;const c=function(){let e=new Mt("The user aborted a request.");n(e),i.body&&i.body instanceof he.Readable&&i.body.destroy(e),p&&p.body&&p.body.emit("error",e)};if(s&&s.aborted)return void c();const l=function(){c(),m()},u=r(o);let d;function m(){u.abort(),s&&s.removeEventListener("abort",l),clearTimeout(d)}s&&s.addEventListener("abort",l),i.timeout&&u.once("socket",(function(e){d=setTimeout((function(){n(new nt(`network timeout at: ${i.url}`,"request-timeout")),m()}),i.timeout)})),u.on("error",(function(e){n(new nt(`request to ${i.url} failed, reason: ${e.message}`,"system",e)),m()})),u.on("response",(function(e){clearTimeout(d);const t=function(e){const t=new wt;for(const a of Object.keys(e))if(!ht.test(a))if(Array.isArray(e[a]))for(const n of e[a])ft.test(n)||(void 0===t[bt][a]?t[bt][a]=[n]:t[bt][a].push(n));else ft.test(e[a])||(t[bt][a]=[e[a]]);return t}(e.headers);if(Vt.isRedirect(e.statusCode)){const o=t.get("Location");let r=null;try{r=null===o?null:new zt(o,i.url).toString()}catch(e){if("manual"!==i.redirect)return n(new nt(`uri requested responds with an invalid redirect URL: ${o}`,"invalid-redirect")),void m()}switch(i.redirect){case"error":return n(new nt(`uri requested responds with a redirect, redirect mode is set to error: ${i.url}`,"no-redirect")),void m();case"manual":if(null!==r)try{t.set("Location",r)}catch(e){n(e)}break;case"follow":if(null===r)break;if(i.counter>=i.follow)return n(new nt(`maximum redirect reached at: ${i.url}`,"max-redirect")),void m();const o={headers:new wt(i.headers),follow:i.follow,counter:i.counter+1,agent:i.agent,compress:i.compress,method:i.method,body:i.body,signal:i.signal,timeout:i.timeout,size:i.size};if(!function(e,t){const a=new zt(t).hostname,n=new zt(e).hostname;return a===n||"."===a[a.length-n.length-1]&&a.endsWith(n)}(i.url,r))for(const e of["authorization","www-authenticate","cookie","cookie2"])o.headers.delete(e);return 303!==e.statusCode&&i.body&&null===mt(i)?(n(new nt("Cannot follow redirect with body being a readable stream","unsupported-redirect")),void m()):(303!==e.statusCode&&(301!==e.statusCode&&302!==e.statusCode||"POST"!==i.method)||(o.method="GET",o.body=void 0,o.headers.delete("content-length")),a(Vt(new Lt(r,o))),void m())}}e.once("end",(function(){s&&s.removeEventListener("abort",l)}));let o=e.pipe(new Ut);const r={url:i.url,status:e.statusCode,statusText:e.statusMessage,headers:t,size:i.size,timeout:i.timeout,counter:i.counter},c=t.get("Content-Encoding");if(!i.compress||"HEAD"===i.method||null===c||204===e.statusCode||304===e.statusCode)return p=new Ct(o,r),void a(p);const u={flush:Je.Z_SYNC_FLUSH,finishFlush:Je.Z_SYNC_FLUSH};if("gzip"==c||"x-gzip"==c)return o=o.pipe(Je.createGunzip(u)),p=new Ct(o,r),void a(p);if("deflate"!=c&&"x-deflate"!=c){if("br"==c&&"function"==typeof Je.createBrotliDecompress)return o=o.pipe(Je.createBrotliDecompress()),p=new Ct(o,r),void a(p);p=new Ct(o,r),a(p)}else e.pipe(new Ut).once("data",(function(e){o=8==(15&e[0])?o.pipe(Je.createInflate()):o.pipe(Je.createInflateRaw()),p=new Ct(o,r),a(p)}))})),function(e,t){const a=t.body;null===a?e.end():lt(a)?a.stream().pipe(e):Buffer.isBuffer(a)?(e.write(a),e.end()):a.pipe(e)}(u,i)}))}Vt.isRedirect=function(e){return 301===e||302===e||303===e||307===e||308===e},Vt.Promise=global.Promise;const qt=Vt;function Ft(e,t){return e?t.httpsAgent:t.httpAgent}class Bt extends he.Transform{constructor(e){super(),this.progressCallback=e,this.loadedBytes=0}_transform(e,t,a){this.push(e),this.loadedBytes+=e.length,this.progressCallback({loadedBytes:this.loadedBytes}),a(void 0)}}function Ht(e){return e&&"function"==typeof e.pipe}function Gt(e,t){return new Promise((a=>{e.once("close",(()=>{null==t||t.abort(),a()})),e.once("end",a),e.once("error",a)}))}class $t{constructor(){this.proxyAgentMap=new Map,this.keepAliveAgents={},this.cookieJar=new W.US(void 0,{looseMode:!0})}async sendRequest(e){var t;if(!e&&"object"!=typeof e)throw new Error("'httpRequest' (WebResourceLike) cannot be null or undefined and must be of type object.");const a=new ee;let n;if(e.abortSignal){if(e.abortSignal.aborted)throw new Z("The operation was aborted.");n=e=>{"abort"===e.type&&a.abort()},e.abortSignal.addEventListener("abort",n)}if(e.timeout&&setTimeout((()=>{a.abort()}),e.timeout),e.formData){const t=e.formData,a=new(ve()),n=(e,t)=>{"function"==typeof t&&(t=t()),t&&Object.prototype.hasOwnProperty.call(t,"value")&&Object.prototype.hasOwnProperty.call(t,"options")?a.append(e,t.value,t.options):a.append(e,t)};for(const e of Object.keys(t)){const a=t[e];if(Array.isArray(a))for(let t=0;t{t.set(a,e)})),t}(r.headers),l=(null===(t=e.streamResponseStatusCodes)||void 0===t?void 0:t.has(r.status))||e.streamResponseBody;p={headers:c,request:e,status:r.status,readableStreamBody:l?r.body:void 0,bodyAsText:l?void 0:await r.text()};const u=e.onDownloadProgress;if(u){const e=r.body||void 0;if(Ht(e)){const t=new Bt(u);e.pipe(t),p.readableStreamBody=t}else{const e=parseInt(c.get("Content-Length"))||void 0;e&&u({loadedBytes:e})}}return await this.processRequest(p),p}catch(t){const a=t;if("ENOTFOUND"===a.code)throw new Te(a.message,Te.REQUEST_SEND_ERROR,void 0,e);if("aborted"===a.type)throw new Z("The operation was aborted.");throw a}finally{if(e.abortSignal&&n){let t=Promise.resolve();Ht(i)&&(t=Gt(i));let o=Promise.resolve();Ht(null==p?void 0:p.readableStreamBody)&&(o=Gt(p.readableStreamBody,a)),Promise.all([t,o]).then((()=>{var t;null===(t=e.abortSignal)||void 0===t||t.removeEventListener("abort",n)})).catch((e=>{Ye.warning("Error when cleaning up abortListener on httpRequest",e)}))}}}getOrCreateAgent(e){var t;const a=de(e.url);if(e.proxySettings){const{host:n,port:i,username:o,password:r}=e.proxySettings,s=`${n}:${i}:${o}:${r}`,p=null!==(t=this.proxyAgentMap.get(s))&&void 0!==t?t:{};let c=Ft(a,p);if(c)return c;const l=function(e,t,a){const n=ne.parse(t.host).getHost();if(!n)throw new Error("Expecting a non-empty host in proxy settings.");if(!(0<=(i=t.port)&&i<=65535))throw new Error("Expecting a valid port number in the range of [0, 65535] in proxy settings.");var i;const o={proxy:{host:n,port:t.port,headers:a&&a.rawHeaders()||{}}};t.username&&t.password?o.proxy.proxyAuth=`${t.username}:${t.password}`:t.username&&(o.proxy.proxyAuth=`${t.username}`);const r=de(e);return{isHttps:r,agent:me(r,de(t.host),o)}}(e.url,e.proxySettings,e.headers);return c=l.agent,l.isHttps?p.httpsAgent=l.agent:p.httpAgent=l.agent,this.proxyAgentMap.set(s,p),c}if(e.keepAlive){let t=Ft(a,this.keepAliveAgents);if(t)return t;const n={keepAlive:e.keepAlive};return t=a?this.keepAliveAgents.httpsAgent=new K.Agent(n):this.keepAliveAgents.httpAgent=new $.Agent(n),t}return a?K.globalAgent:$.globalAgent}async fetch(e,t){return qt(e,t)}async prepareRequest(e){const t={};if(this.cookieJar&&!e.headers.get("Cookie")){const t=await new Promise(((t,a)=>{this.cookieJar.getCookieString(e.url,((e,n)=>{e?a(e):t(n)}))}));e.headers.set("Cookie",t)}return t.agent=this.getOrCreateAgent(e),t.compress=e.decompressResponse,t}async processRequest(e){if(this.cookieJar){const t=e.headers.get("Set-Cookie");void 0!==t&&await new Promise(((a,n)=>{this.cookieJar.setCookie(t,e.request.url,{ignoreError:!0},(e=>{e?n(e):a()}))}))}}}var Kt;function Wt(e){const{requestOptions:t,tracingOptions:a}=e;let n=function(e,t){var a={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i{e?n.parseString(e,((e,n)=>{e?a(e):t(n)})):a(new Error("Document is empty"))}))}function na(e,t){return{create:(a,n)=>new sa(a,n,e,t)}}ea.explicitArray=!1,ea.renderOpts={pretty:!1};const ia=["application/json","text/json"],oa=["application/xml","application/atom+xml"],ra={expectedContentTypes:{json:ia,xml:oa}};class sa extends Yt{constructor(e,t,a,n={}){var i;super(e,t),this.jsonContentTypes=a&&a.json||ia,this.xmlContentTypes=a&&a.xml||oa,this.xmlCharKey=null!==(i=n.xmlCharKey)&&void 0!==i?i:c}async sendRequest(e){return this._nextPolicy.sendRequest(e).then((e=>pa(this.jsonContentTypes,this.xmlContentTypes,e,{xmlCharKey:this.xmlCharKey})))}}function pa(e,t,a,n={}){var i,o,r;const s={rootName:null!==(i=n.rootName)&&void 0!==i?i:"",includeRoot:null!==(o=n.includeRoot)&&void 0!==o&&o,xmlCharKey:null!==(r=n.xmlCharKey)&&void 0!==r?r:c};return function(e,t,a,n){var i;const o=e=>{const t=`Error "${e}" occurred while parsing the response body - ${a.bodyAsText}.`,n=e.code||Te.PARSE_ERROR,i=new Te(t,n,a.status,a.request,a);return Promise.reject(i)};if(!(null===(i=a.request.streamResponseStatusCodes)||void 0===i?void 0:i.has(a.status))&&!a.request.streamResponseBody&&a.bodyAsText){const i=a.bodyAsText,r=a.headers.get("Content-Type")||"",s=r?r.split(";").map((e=>e.toLowerCase())):[];if(0===s.length||s.some((t=>-1!==e.indexOf(t))))return new Promise((e=>{a.parsedBody=JSON.parse(i),e(a)})).catch(o);if(s.some((e=>-1!==t.indexOf(e))))return aa(i,n).then((e=>(a.parsedBody=e,a))).catch(o)}return Promise.resolve(a)}(e,t,a,s).then((e=>{if(!function(e){const t=e.request.shouldDeserialize;let a;return a=void 0===t||("boolean"==typeof t?t:t(e)),a}(e))return e;const t=e.request.operationSpec;if(!t||!t.responses)return e;const i=function(e){let t;const a=e.request,n=a.operationSpec;if(n){const i=a.operationResponseGetter;t=i?i(n,e):n.responses[e.status]}return t}(e),{error:o,shouldReturnResponse:r}=function(e,t,a){var n;const i=200<=e.status&&e.status<300;if(function(e){const t=Object.keys(e.responses);return 0===t.length||1===t.length&&"default"===t[0]}(t)?i:a){if(!a)return{error:null,shouldReturnResponse:!1};if(!a.isError)return{error:null,shouldReturnResponse:!1}}const o=null!=a?a:t.responses.default,r=(null===(n=e.request.streamResponseStatusCodes)||void 0===n?void 0:n.has(e.status))||e.request.streamResponseBody?`Unexpected status code: ${e.status}`:e.bodyAsText,s=new Te(r,void 0,e.status,e.request,e);if(!o)throw s;const p=o.bodyMapper,c=o.headersMapper;try{if(e.parsedBody){const a=e.parsedBody;let n;if(p){let e=a;t.isXML&&p.type.name===H.Sequence&&(e="object"==typeof a?a[p.xmlElementName]:[]),n=t.serializer.deserialize(p,e,"error.response.parsedBody")}const i=a.error||n||a;s.code=i.code,i.message&&(s.message=i.message),p&&(s.response.parsedBody=n)}e.headers&&c&&(s.response.parsedHeaders=t.serializer.deserialize(c,e.headers.toJson(),"operationRes.parsedHeaders"))}catch(t){s.message=`Error "${t.message}" occurred in deserializing the responseBody - "${e.bodyAsText}" for the default response.`}return{error:s,shouldReturnResponse:!1}}(e,t,i);if(o)throw o;if(r)return e;if(i){if(i.bodyMapper){let a=e.parsedBody;t.isXML&&i.bodyMapper.type.name===H.Sequence&&(a="object"==typeof a?a[i.bodyMapper.xmlElementName]:[]);try{e.parsedBody=t.serializer.deserialize(i.bodyMapper,a,"operationRes.parsedBody",n)}catch(t){throw new Te(`Error ${t} occurred in deserializing the responseBody - ${e.bodyAsText}`,void 0,e.status,e.request,e)}}else"HEAD"===t.httpMethod&&(e.parsedBody=a.status>=200&&a.status<300);i.headersMapper&&(e.parsedHeaders=t.serializer.deserialize(i.headersMapper,e.headers.toJson(),"operationRes.parsedHeaders",n))}return e}))}const ca={enable:!0};function la(e){return{create:(t,a)=>new ua(t,a,e||ca)}}class ua extends Yt{constructor(e,t,a){super(e,t),this.keepAliveOptions=a}async sendRequest(e){return e.keepAlive=this.keepAliveOptions.enable,this._nextPolicy.sendRequest(e)}}const da=["GET","HEAD"],ma={handleRedirects:!0,maxRetries:20};function ha(e=20){return{create:(t,a)=>new fa(t,a,e)}}class fa extends Yt{constructor(e,t,a=20){super(e,t),this.maxRetries=a}sendRequest(e){return this._nextPolicy.sendRequest(e).then((e=>va(this,e,0)))}}function va(e,t,a){const{request:n,status:i}=t,o=t.headers.get("location");if(o&&(300===i||301===i&&da.includes(n.method)||302===i&&da.includes(n.method)||303===i&&"POST"===n.method||307===i)&&(!e.maxRetries||ava(e,t,a+1)))}return Promise.resolve(t)}const ga=3e4,ya=9e4;function ba(e){return"number"==typeof e}function wa(e,t,a,n,i){return!!t(n,i)&&a.retryCount{let i,o;const r=()=>{var e;return n(new Z(null!==(e=null==t?void 0:t.abortErrorMsg)&&void 0!==e?e:"The operation was aborted."))},s=()=>{(null==t?void 0:t.abortSignal)&&o&&t.abortSignal.removeEventListener("abort",o)};if(o=()=>(null!=i&&clearTimeout(i),s(),r()),(null==t?void 0:t.abortSignal)&&t.abortSignal.aborted)return r();i=setTimeout((()=>{s(),a()}),e),(null==t?void 0:t.abortSignal)&&t.abortSignal.addEventListener("abort",o)}))}function Ea(e,t,a){return{create:(n,i)=>new ja(n,i,e,t,a)}}var Ta;!function(e){e[e.Exponential=0]="Exponential"}(Ta||(Ta={}));const Sa={maxRetries:3,retryDelayInMs:ga,maxRetryDelayInMs:ya};class ja extends Yt{constructor(e,t,a,n,i){super(e,t),this.retryCount=ba(a)?a:3,this.retryInterval=ba(n)?n:ga,this.maxRetryInterval=ba(i)?i:ya}sendRequest(e){return this._nextPolicy.sendRequest(e.clone()).then((t=>Ca(this,e,t))).catch((t=>Ca(this,e,t.response,void 0,t)))}}async function Ca(e,t,a,n,i){n=_a({retryInterval:e.retryInterval,minRetryInterval:0,maxRetryInterval:e.maxRetryInterval},n,i);const o=t.abortSignal&&t.abortSignal.aborted;if(o||!wa(e.retryCount,(function(e){const t=null==e?void 0:e.status;return!(503===t&&(null==a?void 0:a.headers.get(xa.HeaderConstants.RETRY_AFTER))||void 0===t||t<500&&408!==t||501===t||505===t)}),n,a)){if(o||i||!a)throw n.error||new Te("Failed to send the request.",Te.REQUEST_SEND_ERROR,a&&a.status,a&&a.request,a);return a}Ye.info(`Retrying request in ${n.retryInterval}`);try{await ka(n.retryInterval);const a=await e._nextPolicy.sendRequest(t.clone());return Ca(e,t,a,n)}catch(i){return Ca(e,t,a,n,i)}}function Aa(e={}){return{create:(t,a)=>new Ia(t,a,e)}}class Ia extends Yt{constructor(e,t,{logger:a=Ye.info,allowedHeaderNames:n=[],allowedQueryParameters:i=[]}={}){super(e,t),this.logger=a,this.sanitizer=new we({allowedHeaderNames:n,allowedQueryParameters:i})}get allowedHeaderNames(){return this.sanitizer.allowedHeaderNames}set allowedHeaderNames(e){this.sanitizer.allowedHeaderNames=e}get allowedQueryParameters(){return this.sanitizer.allowedQueryParameters}set allowedQueryParameters(e){this.sanitizer.allowedQueryParameters=e}sendRequest(e){return this.logger.enabled?(this.logRequest(e),this._nextPolicy.sendRequest(e).then((e=>this.logResponse(e)))):this._nextPolicy.sendRequest(e)}logRequest(e){this.logger(`Request: ${this.sanitizer.sanitize(e)}`)}logResponse(e){return this.logger(`Response status code: ${e.status}`),this.logger(`Headers: ${this.sanitizer.sanitize(e.headers)}`),e}}function Na(e){return Oa(e.parameterPath,e.mapper)}function Oa(e,t){let a;return a="string"==typeof e?e:Array.isArray(e)?e.join("."):t.serializedName,a}function Da(e){const t=e;return t&&"function"==typeof t.getToken&&(void 0===t.signRequest||t.getToken.length>0)}function Pa(){return xa.HeaderConstants.USER_AGENT}const Ra=Pa;function La(){const e=[{key:"core-http",value:xa.coreHttpVersion}],t=[{key:"Node",value:process.version},{key:"OS",value:`(${Se.arch()}-${Se.type()}-${Se.release()})`}];return function(e,t=" ",a="/"){return e.map((e=>{const t=e.value?`${a}${e.value}`:"";return`${e.key}${t}`})).join(t)}(e.concat(t))}function Ma(e){const t=e&&void 0!==e.key&&null!==e.key?e.key:Pa(),a=e&&void 0!==e.value&&null!==e.value?e.value:La();return{create:(e,n)=>new za(e,n,t,a)}}class za extends Yt{constructor(e,t,a,n){super(e,t),this._nextPolicy=e,this._options=t,this.headerKey=a,this.headerValue=n}sendRequest(e){return this.addUserAgentHeader(e),this._nextPolicy.sendRequest(e)}addUserAgentHeader(e){e.headers||(e.headers=new o),!e.headers.get(this.headerKey)&&this.headerValue&&e.headers.set(this.headerKey,this.headerValue)}}var Ua;!function(e){e.Csv=",",e.Ssv=" ",e.Tsv="\t",e.Pipes="|",e.Multi="Multi"}(Ua||(Ua={}));const Va={forcedRefreshWindowInMs:1e3,retryIntervalInMs:3e3,refreshWindowInMs:12e4};function qa(e,t){const a=function(e,t,a){let n=null,i=null;const o=Object.assign(Object.assign({},Va),a),r={get isRefreshing(){return null!==n},get shouldRefresh(){var e;return!r.isRefreshing&&(null!==(e=null==i?void 0:i.expiresOnTimestamp)&&void 0!==e?e:0)-o.refreshWindowInMse.getToken(t,a)),o.retryIntervalInMs,null!==(s=null==i?void 0:i.expiresOnTimestamp)&&void 0!==s?s:Date.now()).then((e=>(n=null,i=e,i))).catch((e=>{throw n=null,i=null,e}))),n}return async e=>r.mustRefresh?s(e):(r.shouldRefresh&&s(e),i)}(e,t);class n extends Yt{constructor(e,t){super(e,t)}async sendRequest(e){if(!e.url.toLowerCase().startsWith("https://"))throw new Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.");const{token:t}=await a({abortSignal:e.abortSignal,tracingOptions:{tracingContext:e.tracingContext}});return e.headers.set(xa.HeaderConstants.AUTHORIZATION,`Bearer ${t}`),this._nextPolicy.sendRequest(e)}}return{create:(e,t)=>new n(e,t)}}function Fa(){return{create:(e,t)=>new Ba(e,t)}}class Ba extends Yt{constructor(e,t){super(e,t)}async sendRequest(e){return e.decompressResponse=!1,this._nextPolicy.sendRequest(e)}}function Ha(e="x-ms-client-request-id"){return{create:(t,a)=>new Ga(t,a,e)}}class Ga extends Yt{constructor(e,t,a){super(e,t),this._requestIdHeaderName=a}sendRequest(e){return e.headers.contains(this._requestIdHeaderName)||e.headers.set(this._requestIdHeaderName,e.requestId),this._nextPolicy.sendRequest(e)}}let $a;class Ka extends Yt{constructor(e,t){super(e,t)}async sendRequest(e){if("string"==typeof e.body&&e.body.startsWith("[")){const t=JSON.parse(e.body);Array.isArray(t)&&(e.body=t.map((e=>JSON.stringify(e)+"\n")).join(""))}return this._nextPolicy.sendRequest(e)}}const Wa=[];let Ya=!1;const Qa=new Map;function Xa(e){if(!e&&!(e=function(){if(!process)return;const e=D(xa.HTTPS_PROXY),t=D(xa.ALL_PROXY),a=D(xa.HTTP_PROXY);return e||t||a}()))return;const{username:t,password:a,urlWithoutAuth:n}=function(e){const t=e.indexOf("@");if(-1===t)return{urlWithoutAuth:e};const a=e.indexOf("://"),n=-1!==a?a+3:0,i=e.substring(n,t),o=i.indexOf(":"),r=-1!==o;return{username:r?i.substring(0,o):i,password:r?i.substring(o+1):void 0,urlWithoutAuth:e.substring(0,n)+e.substring(t+1)}}(e),i=ne.parse(n);return{host:(i.getScheme()?i.getScheme()+"://":"")+i.getHost(),port:Number.parseInt(i.getPort()||"80"),username:t,password:a}}function Ja(e,t){return e||(e=Xa()),Ya||Wa.push(...function(){const e=D(xa.NO_PROXY);return Ya=!0,e?e.split(",").map((e=>e.trim())).filter((e=>e.length)):[]}()),{create:(a,n)=>new Za(a,n,e,null==t?void 0:t.customNoProxyList)}}class Za extends Yt{constructor(e,t,a,n){super(e,t),this.proxySettings=a,this.customNoProxyList=n}sendRequest(e){var t;return e.proxySettings||function(e,t,a){if(0===t.length)return!1;const n=ne.parse(e).getHost();if(null==a?void 0:a.has(n))return a.get(n);let i=!1;for(const e of t)"."===e[0]?(n.endsWith(e)||n.length===e.length-1&&n===e.slice(1))&&(i=!0):n===e&&(i=!0);return null==a||a.set(n,i),i}(e.url,null!==(t=this.customNoProxyList)&&void 0!==t?t:Wa,this.customNoProxyList?void 0:Qa)||(e.proxySettings=this.proxySettings),this._nextPolicy.sendRequest(e)}}class en extends Yt{constructor(e,t,a=30){super(e,t),this._retryTimeout=a}sendRequest(e){return this._nextPolicy.sendRequest(e.clone()).then((t=>function(e,t,a){if(409===a.status){const n=function(e){let t,a;if(e){try{a=JSON.parse(e)}catch(e){}if(a&&a.error&&a.error.message&&a.error.code&&"MissingSubscriptionRegistration"===a.error.code){const e=a.error.message.match(/.*'(.*)'/i);e&&(t=e.pop())}}return t}(a.bodyAsText);if(n){const i=function(e){let t;const a=e.match(/.*\/subscriptions\/[a-f0-9-]+\//gi);if(!a||!a[0])throw new Error(`Unable to extract subscriptionId from the given url - ${e}.`);return t=a[0],t}(t.url);return async function(e,t,a,n){const i=`${t}providers/${a}/register?api-version=2016-02-01`,o=`${t}providers/${a}?api-version=2016-02-01`,r=tn(n);if(r.method="POST",r.url=i,200!==(await e._nextPolicy.sendRequest(r)).status)throw new Error(`Autoregistration of ${a} failed. Please try registering manually.`);return an(e,o,n)}(e,i,n,t).catch((()=>!1)).then((n=>n?(t.headers.set("x-ms-client-request-id",T()),e._nextPolicy.sendRequest(t.clone())):a))}}return Promise.resolve(a)}(this,e,t)))}}function tn(e,t=!1){const a=e.clone();return t&&(a.url=e.url),a.headers.set("x-ms-client-request-id",T()),a.headers.set("Content-Type","application/json; charset=utf-8"),a}async function an(e,t,a){const n=tn(a);n.url=t,n.method="GET";const i=await e._nextPolicy.sendRequest(n),o=i.parsedBody;return!(!i.parsedBody||!o.registrationState||"Registered"!==o.registrationState)||(await ka(1e3*e._retryTimeout),an(e,t,a))}function nn(e){return{create:(t,a)=>new on(t,a,e)}}class on extends Yt{constructor(e,t,a){super(e,t),this.authenticationProvider=a}signRequest(e){return this.authenticationProvider.signRequest(e)}sendRequest(e){return this.signRequest(e).then((e=>this._nextPolicy.sendRequest(e)))}}function rn(e,t,a,n){return{create:(i,o)=>new sn(i,o,e,t,a,n)}}class sn extends Yt{constructor(e,t,a,n,i,o){super(e,t),this.retryCount=ba(a)?a:3,this.retryInterval=ba(n)?n:ga,this.minRetryInterval=ba(i)?i:3e3,this.maxRetryInterval=ba(o)?o:ya}sendRequest(e){return this._nextPolicy.sendRequest(e.clone()).catch((t=>pn(this,e,t.response,t)))}}async function pn(e,t,a,n,i){if(i=_a(e,i,n),!wa(e.retryCount,(function(e,t){return!(!t||!t.code||"ETIMEDOUT"!==t.code&&"ESOCKETTIMEDOUT"!==t.code&&"ECONNREFUSED"!==t.code&&"ECONNRESET"!==t.code&&"ENOENT"!==t.code)}),i,a,n))return n?Promise.reject(i.error):a;try{return await ka(i.retryInterval),e._nextPolicy.sendRequest(t.clone())}catch(n){return pn(e,t,a,n,i)}}const cn=xa.HttpConstants.StatusCodes;function ln(){return{create:(e,t)=>new dn(e,t)}}const un="The operation was aborted.";class dn extends Yt{constructor(e,t,a){super(e,t),this.numberOfRetries=0,this._handleResponse=a||this._defaultResponseHandler}async sendRequest(e){const t=await this._nextPolicy.sendRequest(e.clone());return t.status!==cn.TooManyRequests&&t.status!==cn.ServiceUnavailable?t:this._handleResponse(e,t)}async _defaultResponseHandler(e,t){var a;const n=t.headers.get(xa.HeaderConstants.RETRY_AFTER);if(n){const t=dn.parseRetryAfterHeader(n);if(t){if(this.numberOfRetries+=1,await ka(t,{abortSignal:e.abortSignal,abortErrorMsg:un}),null===(a=e.abortSignal)||void 0===a?void 0:a.aborted)throw new Z(un);return this.numberOfRetries<3?this.sendRequest(e):this._nextPolicy.sendRequest(e)}}return t}static parseRetryAfterHeader(e){const t=Number(e);return Number.isNaN(t)?dn.parseDateRetryAfterHeader(e):1e3*t}static parseDateRetryAfterHeader(e){try{const t=Date.now(),a=Date.parse(e)-t;return Number.isNaN(a)?void 0:a}catch(e){return}}}var mn,hn=a(2210),fn=a(6339);function vn(e,t){return hn.g.setSpan(e,t)}!function(e){e[e.INTERNAL=0]="INTERNAL",e[e.SERVER=1]="SERVER",e[e.CLIENT=2]="CLIENT",e[e.PRODUCER=3]="PRODUCER",e[e.CONSUMER=4]="CONSUMER"}(mn||(mn={}));const gn=fn.D;var yn;!function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"}(yn||(yn={}));var bn=a(7007);function wn(e){return function(t,a){const n=hn.g.getTracer("azure/core-tracing",undefined);const i=(null==a?void 0:a.tracingOptions)||{},o=Object.assign({kind:mn.INTERNAL},i.spanOptions),r=e.packagePrefix?`${e.packagePrefix}.${t}`:t;let s;s=function(){var e;if("undefined"==typeof process)return!1;const t=null===(e=process.env.AZURE_TRACING_DISABLED)||void 0===e?void 0:e.toLowerCase();return"false"!==t&&"0"!==t&&Boolean(t)}()?hn.g.wrapSpanContext(bn.Rr):n.startSpan(r,o,i.tracingContext),e.namespace&&s.setAttribute("az.namespace",e.namespace);let p=i.spanOptions||{};s.isRecording()&&e.namespace&&(p=Object.assign(Object.assign({},i.spanOptions),{attributes:Object.assign(Object.assign({},o.attributes),{"az.namespace":e.namespace})}));const c=Object.assign(Object.assign({},i),{spanOptions:p,tracingContext:vn(i.tracingContext||gn.active(),s)});return{span:s,updatedOptions:Object.assign(Object.assign({},a),{tracingOptions:c})}}}const _n=wn({packagePrefix:"",namespace:""});function xn(e={}){return{create:(t,a)=>new kn(t,a,e)}}class kn extends Yt{constructor(e,t,a){super(e,t),this.userAgent=a.userAgent}async sendRequest(e){if(!e.tracingContext)return this._nextPolicy.sendRequest(e);const t=this.tryCreateSpan(e);if(!t)return this._nextPolicy.sendRequest(e);try{const a=await this._nextPolicy.sendRequest(e);return this.tryProcessResponse(t,a),a}catch(e){throw this.tryProcessError(t,e),e}}tryCreateSpan(e){var t;try{const{span:a}=_n(`HTTP ${e.method}`,{tracingOptions:{spanOptions:Object.assign(Object.assign({},e.spanOptions),{kind:mn.CLIENT}),tracingContext:e.tracingContext}});if(!a.isRecording())return void a.end();const n=null===(t=e.tracingContext)||void 0===t?void 0:t.getValue(Symbol.for("az.namespace"));"string"==typeof n&&a.setAttribute("az.namespace",n),a.setAttributes({"http.method":e.method,"http.url":e.url,requestId:e.requestId}),this.userAgent&&a.setAttribute("http.user_agent",this.userAgent);const i=a.spanContext(),o=function(e){const t=[];if(e.traceId||t.push("traceId"),e.spanId||t.push("spanId"),t.length)return;const a=(e.traceFlags||0).toString(16),n=1===a.length?`0${a}`:a;return`00-${e.traceId}-${e.spanId}-${n}`}(i);if(o&&function(e){return hn.g.isSpanContextValid(e)}(i)){e.headers.set("traceparent",o);const t=i.traceState&&i.traceState.serialize();t&&e.headers.set("tracestate",t)}return a}catch(e){return void Ye.warning(`Skipping creating a tracing span due to an error: ${e.message}`)}}tryProcessError(e,t){try{e.setStatus({code:yn.ERROR,message:t.message}),t.statusCode&&e.setAttribute("http.status_code",t.statusCode),e.end()}catch(e){Ye.warning(`Skipping tracing span processing due to an error: ${e.message}`)}}tryProcessResponse(e,t){try{e.setAttribute("http.status_code",t.status);const a=t.headers.get("x-ms-request-id");a&&e.setAttribute("serviceRequestId",a),e.setStatus({code:yn.OK}),e.end()}catch(e){Ye.warning(`Skipping tracing span processing due to an error: ${e.message}`)}}}class En{constructor(e,t){let a;if(t||(t={}),this._withCredentials=t.withCredentials||!1,this._httpClient=t.httpClient||($a||($a=new $t),$a),this._requestPolicyOptions=new Qt(t.httpPipelineLogger),Array.isArray(t.requestPolicyFactories))Ye.info("ServiceClient: using custom request policies"),a=t.requestPolicyFactories;else{let n;if(Da(e))Ye.info("ServiceClient: creating bearer token authentication policy from provided credentials"),n=(()=>{let a;const n=this,i=t;return{create(t,o){const r=function(e,t){if(null==e?void 0:e.credentialScopes){const t=e.credentialScopes;return Array.isArray(t)?t.map((e=>new URL(e).toString())):new URL(t).toString()}if(t)return`${t}/.default`}(i,n.baseUri);if(!r)throw new Error("When using credential, the ServiceClient must contain a baseUri or a credentialScopes in ServiceClientOptions. Unable to create a bearerTokenAuthenticationPolicy");return null==a&&(a=qa(e,r)),a.create(t,o)}}})();else if(e&&"function"==typeof e.signRequest)Ye.info("ServiceClient: creating signing policy from provided credentials"),n=nn(e);else if(null!=e)throw new Error("The credentials argument must implement the TokenCredential interface");if(Ye.info("ServiceClient: using default request policies"),a=function(e,t){const a=[];t.generateClientRequestIdHeader&&a.push(Ha(t.clientRequestIdHeaderName)),e&&a.push(e);const n=Tn(t.userAgentHeaderName,Ra),i=Tn(t.userAgent,La);return n&&i&&a.push(Ma({key:n,value:i})),a.push(ha()),a.push(function(e=30){return{create:(t,a)=>new en(t,a,e)}}(t.rpRegistrationRetryTimeout)),t.noRetryPolicy||(a.push(Ea()),a.push(rn()),a.push(ln())),a.push(na(t.deserializationContentTypes)),w&&a.push(Ja(t.proxySettings)),a.push(Aa({logger:Ye.info})),a}(n,t),t.requestPolicyFactories){const e=t.requestPolicyFactories(a);e&&(a=e)}}this._requestPolicyFactories=a}sendRequest(e){if(null==e||"object"!=typeof e)throw new Error("options cannot be null or undefined and it must be of type object.");let t;try{!function(e){if(e&&"object"==typeof e){const t=e;if("string"==typeof t.url&&"string"==typeof t.method&&"object"==typeof t.headers&&i(t.headers)&&"function"==typeof t.validateRequestProperties&&"function"==typeof t.prepare&&"function"==typeof t.clone)return!0}return!1}(e)?(t=new G,t=t.prepare(e)):(e.validateRequestProperties(),t=e)}catch(e){return Promise.reject(e)}let a=this._httpClient;if(this._requestPolicyFactories&&this._requestPolicyFactories.length>0)for(let e=this._requestPolicyFactories.length-1;e>=0;--e)a=this._requestPolicyFactories[e].create(a,this._requestPolicyOptions);return a.sendRequest(t)}async sendOperationRequest(e,t,a){var n;"function"==typeof e.options&&(a=e.options,e.options=void 0);const i=null===(n=e.options)||void 0===n?void 0:n.serializerOptions,o=new G;let r;try{const a=t.baseUrl||this.baseUri;if(!a)throw new Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a baseUri string property that contains the base URL to use.");o.method=t.httpMethod,o.operationSpec=t;const n=ne.parse(a);if(t.path&&n.appendPath(t.path),t.urlParameters&&t.urlParameters.length>0)for(const a of t.urlParameters){let o=jn(this,e,a,t.serializer);o=t.serializer.serialize(a.mapper,o,Na(a),i),a.skipEncoding||(o=encodeURIComponent(o)),n.replaceAll(`{${a.mapper.serializedName||Na(a)}}`,o)}if(t.queryParameters&&t.queryParameters.length>0)for(const a of t.queryParameters){let o=jn(this,e,a,t.serializer);if(null!=o){if(o=t.serializer.serialize(a.mapper,o,Na(a),i),void 0!==a.collectionFormat&&null!==a.collectionFormat)if(a.collectionFormat===Ua.Multi){if(0===o.length)continue;for(const e in o){const t=o[e];o[e]=null==t?"":t.toString()}}else a.collectionFormat!==Ua.Ssv&&a.collectionFormat!==Ua.Tsv||(o=o.join(a.collectionFormat));if(!a.skipEncoding)if(Array.isArray(o))for(const e in o)void 0!==o[e]&&null!==o[e]&&(o[e]=encodeURIComponent(o[e]));else o=encodeURIComponent(o);void 0!==a.collectionFormat&&null!==a.collectionFormat&&a.collectionFormat!==Ua.Multi&&a.collectionFormat!==Ua.Ssv&&a.collectionFormat!==Ua.Tsv&&(o=o.join(a.collectionFormat)),n.setQueryParameter(a.mapper.serializedName||Na(a),o)}}o.url=n.toString();const s=t.contentType||this.requestContentType;if(s&&t.requestBody&&o.headers.set("Content-Type",s),t.headerParameters)for(const a of t.headerParameters){let n=jn(this,e,a,t.serializer);if(null!=n){n=t.serializer.serialize(a.mapper,n,Na(a),i);const e=a.mapper.headerCollectionPrefix;if(e)for(const t of Object.keys(n))o.headers.set(e+t,n[t]);else o.headers.set(a.mapper.serializedName||Na(a),n)}}const l=e.options;if(l){if(l.customHeaders)for(const e in l.customHeaders)o.headers.set(e,l.customHeaders[e]);l.abortSignal&&(o.abortSignal=l.abortSignal),l.timeout&&(o.timeout=l.timeout),l.onUploadProgress&&(o.onUploadProgress=l.onUploadProgress),l.onDownloadProgress&&(o.onDownloadProgress=l.onDownloadProgress),l.spanOptions&&(o.spanOptions=l.spanOptions),l.tracingContext&&(o.tracingContext=l.tracingContext),void 0!==l.shouldDeserialize&&null!==l.shouldDeserialize&&(o.shouldDeserialize=l.shouldDeserialize)}let u,d;o.withCredentials=this._withCredentials,function(e,t,a,n){var i,o,r,s,l,u;const d=null!==(o=null===(i=a.options)||void 0===i?void 0:i.serializerOptions)&&void 0!==o?o:{},m={rootName:null!==(r=d.rootName)&&void 0!==r?r:"",includeRoot:null!==(s=d.includeRoot)&&void 0!==s&&s,xmlCharKey:null!==(l=d.xmlCharKey)&&void 0!==l?l:c},h=d.xmlCharKey;if(n.requestBody&&n.requestBody.mapper){t.body=jn(e,a,n.requestBody,n.serializer);const i=n.requestBody.mapper,{required:o,xmlName:r,xmlElementName:s,serializedName:c,xmlNamespace:l,xmlNamespacePrefix:d}=i,f=i.type.name;try{if(void 0!==t.body&&null!==t.body||o){const e=Na(n.requestBody);t.body=n.serializer.serialize(i,t.body,e,m);const a=f===H.Stream;if(n.isXML){const e=d?`xmlns:${d}`:"xmlns",n=function(e,t,a,n,i){if(e&&!["Composite","Sequence","Dictionary"].includes(a)){const a={};return a[i.xmlCharKey]=n,a[p]={[t]:e},a}return n}(l,e,f,t.body,m);f===H.Sequence?t.body=ta(function(e,t,a,n){if(Array.isArray(e)||(e=[e]),!a||!n)return{[t]:e};const i={[t]:e};return i[p]={[a]:n},i}(n,s||r||c,e,l),{rootName:r||c,xmlCharKey:h}):a||(t.body=ta(n,{rootName:r||c,xmlCharKey:h}))}else{if(f===H.String&&((null===(u=n.contentType)||void 0===u?void 0:u.match("text/plain"))||"text"===n.mediaType))return;a||(t.body=JSON.stringify(t.body))}}}catch(e){throw new Error(`Error "${e.message}" occurred in serializing the payload - ${JSON.stringify(c,void 0," ")}.`)}}else if(n.formDataParameters&&n.formDataParameters.length>0){t.formData={};for(const i of n.formDataParameters){const o=jn(e,a,i,n.serializer);if(null!=o){const e=i.mapper.serializedName||Na(i);t.formData[e]=n.serializer.serialize(i.mapper,o,Na(i),m)}}}}(this,o,e,t),void 0===o.streamResponseStatusCodes&&(o.streamResponseStatusCodes=function(e){const t=new Set;for(const a in e.responses){const n=e.responses[a];n.bodyMapper&&n.bodyMapper.type.name===H.Stream&&t.add(Number(a))}return t}(t));try{u=await this.sendRequest(o)}catch(e){d=e}d?(d.response&&(d.details=In(d.response,t.responses[d.statusCode]||t.responses.default)),r=Promise.reject(d)):r=Promise.resolve(In(u,t.responses[u.status]))}catch(e){r=Promise.reject(e)}const s=a;return s&&r.then((e=>s(null,e._response.parsedBody,e._response.request,e._response))).catch((e=>s(e))),r}}function Tn(e,t){let a;return"string"==typeof e?a=e:(a=t(),"function"==typeof e&&(a=e(a))),a}function Sn(e,t){const a=[];let n;if(e.sendStreamingJson&&a.push({create:(e,t)=>new Ka(e,t)}),e.userAgentOptions&&e.userAgentOptions.userAgentPrefix){const t=[];t.push(e.userAgentOptions.userAgentPrefix);const a=La();-1===t.indexOf(a)&&t.push(a),n=t.join(" ")}const i=Object.assign(Object.assign({},ca),e.keepAliveOptions),o=Object.assign(Object.assign({},Sa),e.retryOptions),r=Object.assign(Object.assign({},ma),e.redirectOptions);w&&a.push(Ja(e.proxyOptions));const s=Object.assign(Object.assign({},ra),e.deserializationOptions),p=Object.assign({},e.loggingOptions);return a.push(xn({userAgent:n}),la(i),Ma({value:n}),Ha(),na(s.expectedContentTypes),ln(),rn(),Ea(o.maxRetries,o.retryDelayInMs,o.maxRetryDelayInMs)),r.handleRedirects&&a.push(ha(r.maxRetries)),t&&a.push(t),a.push(Aa(p)),w&&!1===e.decompressResponse&&a.push(Fa()),{httpClient:e.httpClient,requestPolicyFactories:a}}function jn(e,t,a,n){return Cn(e,t,a.parameterPath,a.mapper,n)}function Cn(e,t,a,n,i){var o;let r;"string"==typeof a&&(a=[a]);const s=null===(o=t.options)||void 0===o?void 0:o.serializerOptions;if(Array.isArray(a)){if(a.length>0){if(n.isConstant)r=n.defaultValue;else{let i=An(t,a);i.propertyFound||(i=An(e,a));let o=!1;i.propertyFound||(o=n.required||"options"===a[0]&&2===a.length),r=o?n.defaultValue:i.propertyValue}const o=Oa(a,n);i.serialize(n,r,o,s)}}else{n.required&&(r={});for(const o in a){const p=n.type.modelProperties[o],c=a[o],l=Cn(e,t,c,p,i),u=Oa(c,p);i.serialize(p,l,u,s),null!=l&&(r||(r={}),r[o]=l)}}return r}function An(e,t){const a={propertyFound:!1};let n=0;for(;nObject.defineProperty(t,"_response",{value:e});if(n){const t=n.type.name;if("Stream"===t)return i(Object.assign(Object.assign({},a),{blobBody:e.blobBody,readableStreamBody:e.readableStreamBody}));const o="Composite"===t&&n.type.modelProperties||{},r=Object.keys(o).some((e=>""===o[e].serializedName));if("Sequence"===t||r){const t=[...e.parsedBody||[]];for(const a of Object.keys(o))o[a].serializedName&&(t[a]=e.parsedBody[a]);if(a)for(const e of Object.keys(a))t[e]=a[e];return i(t),t}if("Composite"===t||"Dictionary"===t)return i(Object.assign(Object.assign({},a),e.parsedBody))}return n||"HEAD"===e.request.method||"object"!=typeof(o=e.parsedBody)&&"function"!=typeof o||null===o?i(Object.assign(Object.assign({},a),{body:e.parsedBody})):i(Object.assign(Object.assign({},a),e.parsedBody));var o}function Nn(e){return wn(e)}class On{constructor(e=12e4){this.cachedToken=void 0,this.tokenRefreshBufferMs=e}setCachedToken(e){this.cachedToken=e}getCachedToken(){return this.cachedToken&&Date.now()+this.tokenRefreshBufferMs>=this.cachedToken.expiresOnTimestamp&&(this.cachedToken=void 0),this.cachedToken}}class Dn{constructor(e,t,a=3e4){this.credential=e,this.scopes=t,this.requiredMillisecondsBeforeNewRefresh=a,this.lastCalled=0}isReady(){return!this.lastCalled||Date.now()-this.lastCalled>this.requiredMillisecondsBeforeNewRefresh}async getToken(e){this.lastCalled=Date.now();const t=await this.credential.getToken(this.scopes,e);return this.promise=void 0,t||void 0}refresh(e){return this.promise||(this.promise=this.getToken(e)),this.promise}}const Pn=xa.HeaderConstants;class Rn{constructor(e,t,a="Basic"){if(this.authorizationScheme="Basic",null==e||"string"!=typeof e.valueOf())throw new Error("userName cannot be null or undefined and must be of type string.");if(null==t||"string"!=typeof t.valueOf())throw new Error("password cannot be null or undefined and must be of type string.");this.userName=e,this.password=t,this.authorizationScheme=a}signRequest(e){const t=`${this.userName}:${this.password}`,a=`${this.authorizationScheme} ${n=t,Buffer.from(n).toString("base64")}`;var n;return e.headers||(e.headers=new o),e.headers.set(Pn.AUTHORIZATION,a),Promise.resolve(e)}}class Ln{constructor(e){if(!e||e&&!e.inHeader&&!e.inQuery)throw new Error('options cannot be null or undefined. Either "inHeader" or "inQuery" property of the options object needs to be provided.');this.inHeader=e.inHeader,this.inQuery=e.inQuery}signRequest(e){if(!e)return Promise.reject(new Error('webResource cannot be null or undefined and must be of type "object".'));if(this.inHeader){e.headers||(e.headers=new o);for(const t in this.inHeader)e.headers.set(t,this.inHeader[t])}if(this.inQuery){if(!e.url)return Promise.reject(new Error("url cannot be null in the request object."));e.url.indexOf("?")<0&&(e.url+="?");for(const t in this.inQuery)e.url.endsWith("?")||(e.url+="&"),e.url+=`${t}=${this.inQuery[t]}`}return Promise.resolve(e)}}class Mn extends Ln{constructor(e){if(!e||e&&"string"!=typeof e)throw new Error("topicKey cannot be null or undefined and must be of type string.");super({inHeader:{"aeg-sas-key":e}})}}},7164:(e,t,a)=>{"use strict";a.r(t),a.d(t,{AppInsightsCore:()=>B,BaseCore:()=>H,BaseTelemetryPlugin:()=>A.i,CoreUtils:()=>F.Tr,DiagnosticLogger:()=>v.AQ,ESPromise:()=>K,ESPromiseScheduler:()=>Z,EventHelper:()=>ne.zB,EventLatency:()=>l,EventPersistence:()=>d,EventPropertyType:()=>u,EventsDiscardedReason:()=>ae.h,FullVersionString:()=>F.vs,InternalAppInsightsCore:()=>V,InternalBaseCore:()=>M,LoggingSeverity:()=>s,MinChannelPriorty:()=>te,NotificationManager:()=>U,PerfEvent:()=>g.zn,PerfManager:()=>g.Jk,ProcessTelemetryContext:()=>x.Vi,TraceLevel:()=>m,Undefined:()=>re.jA,Utils:()=>F.cQ,ValueKind:()=>c,ValueSanitizer:()=>ee,Version:()=>F.Gf,_ExtendedInternalMessageId:()=>h,_InternalLogMessage:()=>v.lQ,_InternalMessageId:()=>p,__getRegisteredEvents:()=>ie.um,_logInternalMessage:()=>v.L4,_throwInternal:()=>v.kP,_warnToConsole:()=>v.jV,addEventHandler:()=>ie.Ib,addEventListeners:()=>ie.yw,addPageHideEventListener:()=>ie.TJ,addPageShowEventListener:()=>ie.nD,addPageUnloadEventListener:()=>ie.c9,areCookiesSupported:()=>S.p7,arrForEach:()=>r.tO,arrIndexOf:()=>r.UA,arrMap:()=>r.Mr,arrReduce:()=>r.Xz,attachEvent:()=>ie.pZ,cookieAvailable:()=>S.p7,createCookieMgr:()=>S.Nz,createEnumStyle:()=>o.By,createGuid:()=>F.cm,createProcessTelemetryContext:()=>x.CD,createTraceParent:()=>se.SU,createUniqueNamespace:()=>j.J,createUnloadHandlerContainer:()=>N.Y,dateNow:()=>r.m6,deleteCookie:()=>F.kT,detachEvent:()=>ie.pD,disableCookies:()=>F.oF,disallowsSameSiteNone:()=>S.UY,doPerf:()=>g.Lm,dumpObj:()=>y.eU,eventOff:()=>ie.QY,eventOn:()=>ie.XO,extend:()=>F.l7,findW3cTraceParent:()=>se.lq,formatTraceParent:()=>se.aR,generateW3CId:()=>ne.DO,getCommonSchemaMetaData:()=>F.Vv,getConsole:()=>y.dr,getCookie:()=>F.ej,getCookieValue:()=>F.Do,getCrypto:()=>y.MX,getDocument:()=>y.Me,getExceptionName:()=>r.jj,getFieldValueType:()=>F.Sy,getGlobal:()=>w.Rd,getGlobalInst:()=>y.a8,getHistory:()=>y.s1,getIEVersion:()=>y.sA,getISOString:()=>r.Y6,getJSON:()=>y.xA,getLocation:()=>y.k$,getMsCrypto:()=>y.gz,getNavigator:()=>y.jW,getPerformance:()=>y.r,getSetValue:()=>r.qK,getTenantId:()=>F.jM,getTime:()=>F.hK,getWindow:()=>y.Jj,hasDocument:()=>y.Nv,hasHistory:()=>y.fE,hasJSON:()=>y.nS,hasNavigator:()=>y.d6,hasOwnProperty:()=>r.nr,hasWindow:()=>y.Ym,isArray:()=>r.kJ,isArrayValid:()=>F.JT,isBeaconsSupported:()=>y.MF,isBoolean:()=>r.jn,isChromium:()=>F.mJ,isDate:()=>r.J_,isDocumentObjectAvailable:()=>F.x9,isError:()=>r.VZ,isFetchSupported:()=>y.JO,isFunction:()=>r.mf,isIE:()=>y.w1,isLatency:()=>F.r7,isNotTruthy:()=>r.F,isNullOrUndefined:()=>r.le,isNumber:()=>r.hj,isObject:()=>r.Kn,isReactNative:()=>y.b$,isSampledFlag:()=>se.Pn,isString:()=>r.HD,isTruthy:()=>r.fQ,isTypeof:()=>r.Ym,isUint8ArrayAvailable:()=>F.IZ,isUndefined:()=>r.o8,isValidSpanId:()=>se.Lc,isValidTraceId:()=>se.jN,isValidTraceParent:()=>se.J6,isValueAssigned:()=>F.Sn,isValueKind:()=>F.oS,isWindowObjectAvailable:()=>F.dH,isXhrSupported:()=>y.Z3,mergeEvtNamespace:()=>ie.jU,newGuid:()=>ne.GW,newId:()=>oe.pZ,normalizeJsName:()=>r.Gf,objCreate:()=>w.pu,objDefineAccessors:()=>r.l_,objForEachKey:()=>r.rW,objFreeze:()=>r.FL,objKeys:()=>r.FY,objSeal:()=>r.Xi,openXhr:()=>F.ot,optimizeObject:()=>r.Ax,parseTraceParent:()=>se.j_,perfNow:()=>ne.Jj,proxyAssign:()=>r.cf,proxyFunctionAs:()=>r.Oi,proxyFunctions:()=>r.Vb,random32:()=>oe._l,randomValue:()=>oe.az,removeEventHandler:()=>ie.C1,removeEventListeners:()=>ie.nJ,removePageHideEventListener:()=>ie.C9,removePageShowEventListener:()=>ie.Yl,removePageUnloadEventListener:()=>ie.JA,safeGetCookieMgr:()=>S.JP,safeGetLogger:()=>v.vH,sanitizeProperty:()=>F.yj,setCookie:()=>F.d8,setEnableEnvMocks:()=>y.dI,setProcessTelemetryTimings:()=>F.if,setValue:()=>r.sO,strContains:()=>r._Q,strEndsWith:()=>r.Id,strFunction:()=>re.cb,strObject:()=>re.fK,strPrototype:()=>re.hB,strStartsWith:()=>r.xe,strTrim:()=>r.nd,strUndefined:()=>re.jA,throwError:()=>r._y,toISOString:()=>r.Y6,useXDomainRequest:()=>y.cp});var n,i=a(7421),o=a(951),r=a(4869),s=(0,o.By)({CRITICAL:1,WARNING:2}),p=(0,o.By)(((n={}).BrowserDoesNotSupportLocalStorage=0,n.BrowserCannotReadLocalStorage=1,n.BrowserCannotReadSessionStorage=2,n.BrowserCannotWriteLocalStorage=3,n.BrowserCannotWriteSessionStorage=4,n.BrowserFailedRemovalFromLocalStorage=5,n.BrowserFailedRemovalFromSessionStorage=6,n.CannotSendEmptyTelemetry=7,n.ClientPerformanceMathError=8,n.ErrorParsingAISessionCookie=9,n.ErrorPVCalc=10,n.ExceptionWhileLoggingError=11,n.FailedAddingTelemetryToBuffer=12,n.FailedMonitorAjaxAbort=13,n.FailedMonitorAjaxDur=14,n.FailedMonitorAjaxOpen=15,n.FailedMonitorAjaxRSC=16,n.FailedMonitorAjaxSend=17,n.FailedMonitorAjaxGetCorrelationHeader=18,n.FailedToAddHandlerForOnBeforeUnload=19,n.FailedToSendQueuedTelemetry=20,n.FailedToReportDataLoss=21,n.FlushFailed=22,n.MessageLimitPerPVExceeded=23,n.MissingRequiredFieldSpecification=24,n.NavigationTimingNotSupported=25,n.OnError=26,n.SessionRenewalDateIsZero=27,n.SenderNotInitialized=28,n.StartTrackEventFailed=29,n.StopTrackEventFailed=30,n.StartTrackFailed=31,n.StopTrackFailed=32,n.TelemetrySampledAndNotSent=33,n.TrackEventFailed=34,n.TrackExceptionFailed=35,n.TrackMetricFailed=36,n.TrackPVFailed=37,n.TrackPVFailedCalc=38,n.TrackTraceFailed=39,n.TransmissionFailed=40,n.FailedToSetStorageBuffer=41,n.FailedToRestoreStorageBuffer=42,n.InvalidBackendResponse=43,n.FailedToFixDepricatedValues=44,n.InvalidDurationValue=45,n.TelemetryEnvelopeInvalid=46,n.CreateEnvelopeError=47,n.CannotSerializeObject=48,n.CannotSerializeObjectNonSerializable=49,n.CircularReferenceDetected=50,n.ClearAuthContextFailed=51,n.ExceptionTruncated=52,n.IllegalCharsInName=53,n.ItemNotInArray=54,n.MaxAjaxPerPVExceeded=55,n.MessageTruncated=56,n.NameTooLong=57,n.SampleRateOutOfRange=58,n.SetAuthContextFailed=59,n.SetAuthContextFailedAccountName=60,n.StringValueTooLong=61,n.StartCalledMoreThanOnce=62,n.StopCalledWithoutStart=63,n.TelemetryInitializerFailed=64,n.TrackArgumentsNotSpecified=65,n.UrlTooLong=66,n.SessionStorageBufferFull=67,n.CannotAccessCookie=68,n.IdTooLong=69,n.InvalidEvent=70,n.FailedMonitorAjaxSetRequestHeader=71,n.SendBrowserInfoOnUserInit=72,n.PluginException=73,n.NotificationException=74,n.SnippetScriptLoadFailure=99,n.InvalidInstrumentationKey=100,n.CannotParseAiBlobValue=101,n.InvalidContentBlob=102,n.TrackPageActionEventFailed=103,n.FailedAddingCustomDefinedRequestContext=104,n.InMemoryStorageBufferFull=105,n.InstrumentationKeyDeprecation=106,n)),c=(0,o.By)({NotSet:0,Pii_DistinguishedName:1,Pii_GenericData:2,Pii_IPV4Address:3,Pii_IPv6Address:4,Pii_MailSubject:5,Pii_PhoneNumber:6,Pii_QueryString:7,Pii_SipAddress:8,Pii_SmtpAddress:9,Pii_Identity:10,Pii_Uri:11,Pii_Fqdn:12,Pii_IPV4AddressLegacy:13,CustomerContent_GenericContent:32}),l=(0,o.By)({Normal:1,CostDeferred:2,RealTime:3,Immediate:4}),u=(0,o.By)({Unspecified:0,String:1,Int32:2,UInt32:3,Int64:4,UInt64:5,Double:6,Bool:7,Guid:8,DateTime:9}),d=(0,o.By)({Normal:1,Critical:2}),m=(0,o.By)({NONE:0,ERROR:1,WARNING:2,INFORMATION:3}),h=(0,r.FL)((0,i.uc)((0,i.uc)({},p),(0,o.By)({AuthHandShakeError:501,AuthRedirectFail:502,BrowserCannotReadLocalStorage:503,BrowserCannotWriteLocalStorage:504,BrowserDoesNotSupportLocalStorage:505,CannotParseBiBlobValue:506,CannotParseDataAttribute:507,CVPluginNotAvailable:508,DroppedEvent:509,ErrorParsingAISessionCookie:510,ErrorProvidedChannels:511,FailedToGetCookies:512,FailedToInitializeCorrelationVector:513,FailedToInitializeSDK:514,InvalidContentBlob:515,InvalidCorrelationValue:516,SessionRenewalDateIsZero:517,SendPostOnCompleteFailure:518,PostResponseHandler:519,SDKNotInitialized:520}))),f=a(9141),v=a(9339),g=a(1782),y=a(9251),b=a(8145),w=a(175),_=a(6335),x=a(1030),k=a(9031),E=500;function T(e,t,a){t&&(0,r.kJ)(t)&&t[b.R5]>0&&(t=t.sort((function(e,t){return e[_.yi]-t[_.yi]})),(0,r.tO)(t,(function(e){e[_.yi]E&&i[b.MW](e)})),T(n,i,a)}return n}(h,i,e)),m){var o=(0,r.UA)(i,m);-1!==o&&i[b.cb](o,1),-1!==(o=(0,r.UA)(d,m))&&d[b.cb](o,1),m._setQueue(y)}else m=function(e,t){function a(){return(0,x.CD)(null,t[b.TC],t,null)}function n(e,t,a,n){var i=e?e[b.R5]+1:1;function o(){0==--i&&(n&&n(),n=null)}i>0&&(0,r.tO)(e,(function(e){if(e&&e.queue[b.R5]>0){var n=e.chain,r=t[b.zV](n);r[b.Fc](o),a(r)}else i--})),o()}var i=!1;return{identifier:"ChannelControllerPlugin",priority:E,initialize:function(t,a,n,o){i=!0,(0,r.tO)(e,(function(e){e&&e.queue[b.R5]>0&&(0,k.bP)((0,x.CD)(e.chain,t,a),n)}))},isInitialized:function(){return i},processTelemetry:function(t,i){n(e,i||a(),(function(e){e[b.uL](t)}),(function(){i[b.uL](t)}))},update:function(t,a){var i=a||{reason:0};return n(e,t,(function(e){e[b.uL](i)}),(function(){t[b.uL](i)})),!0},pause:function(){n(e,a(),(function(e){e.iterate((function(e){e.pause&&e.pause()}))}),null)},resume:function(){n(e,a(),(function(e){e.iterate((function(e){e.resume&&e.resume()}))}),null)},teardown:function(t,a){var o=a||{reason:0,isAsync:!1};return n(e,t,(function(e){e[b.uL](o)}),(function(){t[b.uL](o),i=!1})),!0},getChannel:function(t){var a=null;return e&&e[b.R5]>0&&(0,r.tO)(e,(function(e){if(e&&e.queue[b.R5]>0&&((0,r.tO)(e.queue,(function(e){if(e[b.pZ]===t)return a=e,-1})),a))return-1})),a},flush:function(t,i,o,r){var s=1,p=!1,c=null;function l(){s--,p&&0===s&&(c&&(clearTimeout(c),c=null),i&&i(p),i=null)}return r=r||5e3,n(e,a(),(function(e){e.iterate((function(e){if(e[b.kL]){s++;var a=!1;e[b.kL](t,(function(){a=!0,l()}),o)||a||(t&&null==c?c=setTimeout((function(){c=null,l()}),r):l())}}))}),(function(){p=!0,l()})),!0},_setQueue:function(t){e=t}}}(y,e);i[b.MW](m),d[b.MW](m),e[b.iC]=(0,k.AA)(i),m[b.VL](t,e,i),(0,k.bP)(H(),i),e[b.iC]=(0,r.FL)((0,k.AA)(d||[])).slice(),a&&function(t){var a=(0,x.xy)(K(),e);e._updateHook&&!0===e._updateHook(a,t)||a[b.uL](t)}(a)}function $(t){var a,n=null,i=null;return(0,r.tO)(e[b.iC],(function(e){if(e[b.pZ]===t&&e!==m&&e!==M)return i=e,-1})),!i&&m&&(i=m.getChannel(t)),i&&((a={plugin:i})[b.$h]=function(e){(0,k.OY)(i)[_.mE]=!e},a.isEnabled=function(){var e=(0,k.OY)(i);return!e[b.fi]&&!e[_.mE]},a.remove=function(e,t){var a;void 0===e&&(e=!0);var n=[i],o=((a={reason:1})[b.d]=e,a);W(n,o,(function(e){e&&G({reason:32,removed:n}),t&&t(e)}))},n=a),n}function K(){if(!l){var a=(d||[]).slice();-1===(0,r.UA)(a,M)&&a[b.MW](M),l=(0,x.jV)((0,k.AA)(a),t,e)}return l}function W(a,n,i){if(a&&a[b.R5]>0){var o=(0,x.jV)(a,t,e),s=(0,x.Bt)(o,e);s[b.Fc]((function(){var e=!1,t=[];(0,r.tO)(u,(function(n,i){L(n,a)?e=!0:t[b.MW](n)})),u=t;var n=[];h&&((0,r.tO)(h,(function(t,i){var o=[];(0,r.tO)(t,(function(t){L(t,a)?e=!0:o[b.MW](t)})),n[b.MW](o)})),h=n),i&&i(e)})),s[b.uL](n)}else i(!1)}function Y(){var a=e[b.eZ]?e[b.eZ].queue:[];a&&((0,r.tO)(a,(function(a){var n,i=((n={})[b.I]=z||"InternalMessageId: "+a[b.Gc],n.iKey=(0,r.v4)(t[b.p$]),n.time=(0,r.Y6)(new Date),n.baseType=v.lQ.dataType,n.baseData={message:a[b.gU]},n);e.track(i)})),a[b.R5]=0)}function Q(e,t,a,n){return m?m[b.kL](e,t,a||6,n):(t&&t(!1),!0)}function X(t){var a=e[b.eZ];a?(0,v.kP)(a,2,73,t):(0,r._y)(t)}f(),e[b.yl]=function(){return a},e[b.VL]=function(n,s,c,l){var d,m;A&&(0,r._y)(D),e[b.yl]()&&(0,r._y)("Core should not be initialized more than once"),t=n||{},e[b.TC]=t,(0,r.le)(n[b.p$])&&(0,r._y)("Please provide instrumentation key"),o=l,e._notificationManager=l,!0===(m=(0,r.v4)(t.disableDbgExt))&&q&&(o[b.n7](q),q=null),o&&!q&&!0!==m&&(q=(0,C.p)(t),o[b.g](q)),!(d=(0,r.v4)(t.enablePerfMgr))&&p&&(p=null),d&&(0,r.qK)(t,_.DN,R),(0,r.qK)(t,_.Zh,{}).NotificationManager=o,c&&(e[b.eZ]=c);var f=(0,r.qK)(t,_.js,[]);(u=[])[b.MW].apply(u,(0,i.$h)((0,i.$h)([],s,!1),f,!1)),h=(0,r.qK)(t,_.Z,[]),G(null),y&&0!==y[b.R5]||(0,r._y)("No "+_.Z+" available"),a=!0,e.releaseQueue()},e.getTransmissionControls=function(){var e=[];return y&&(0,r.tO)(y,(function(t){e[b.MW](t.queue)})),(0,r.FL)(e)},e.track=function(a){a.iKey=a.iKey||t[b.p$],a[b.Z_]=a[b.Z_]||(0,r.Y6)(new Date),a.ver=a.ver||"4.0",!A&&e[b.yl]()?H()[b.uL](a):n[b.MW](a)},e[b.SD]=H,e[b.tb]=function(){return o||(o=function(){var e;return(0,w.pu)(((e={})[b.g]=function(e){},e[b.n7]=function(e){},e[_.uC]=function(e){},e[_.$F]=function(e,t){},e[_.f_]=function(e,t){},e))}(),e._notificationManager=o),o},e[b.g]=function(e){o&&o[b.g](e)},e[b.n7]=function(e){o&&o[b.n7](e)},e.getCookieMgr=function(){return c||(c=(0,S.Nz)(t,e[b.eZ])),c},e.setCookieMgr=function(e){c=e},e[_.kl]=function(){if(!s&&!p&&(0,r.v4)(t.enablePerfMgr)){var a=(0,r.v4)(t[_.DN]);(0,r.mf)(a)&&(p=a(e,e[b.tb]()))}return s||p||(0,g.j5)()},e.setPerfMgr=function(e){s=e},e.eventCnt=function(){return n[b.R5]},e.releaseQueue=function(){if(a&&n[b.R5]>0){var e=n;n=[],(0,r.tO)(e,(function(e){H()[b.uL](e)}))}},e.pollInternalLogs=function(e){z=e||null;var a=(0,r.v4)(t.diagnosticLogInterval);return a&&a>0||(a=1e4),B&&clearInterval(B),B=setInterval((function(){Y()}),a)},e[b.LS]=function(){B&&(clearInterval(B),B=0,Y())},(0,r.Vb)(e,(function(){return M}),["addTelemetryInitializer"]),e.unload=function(t,n,i){var o;void 0===t&&(t=!0),a||(0,r._y)("SDK is not initialized"),A&&(0,r._y)(D);var s=((o={reason:50})[b.d]=t,o.flushComplete=!1,o),p=(0,x.Bt)(K(),e);function c(t){s.flushComplete=t,A=!0,V.run(p,s),e[b.LS](),p[b.uL](s)}p[b.Fc]((function(){f(),n&&n(s)}),e),Q(t,c,6,i)||c(!1)},e[b.TO]=$,e.addPlugin=function(e,t,a,n){if(!e)return n&&n(!1),void X(O);var i=$(e[b.pZ]);if(i&&!t)return n&&n(!1),void X("Plugin ["+e[b.pZ]+"] is already loaded!");var o={reason:16};function r(t){u[b.MW](e),o.added=[e],G(o),n&&n(!0)}if(i){var s=[i.plugin];W(s,{reason:2,isAsync:!!a},(function(e){e?(o.removed=s,o.reason|=32,r()):n&&n(!1)}))}else r()},e.evtNamespace=function(){return U},e[b.kL]=Q,e.getTraceCtx=function(e){return F||(F=(0,k.Yn)()),F},e.setTraceCtx=function(e){F=e||null},(0,r.Oi)(e,"addUnloadCb",(function(){return V}),"add")}))}return e.__ieDyn=1,e}();function z(e,t,a,n){(0,r.tO)(e,(function(e){if(e&&e[t])if(a)setTimeout((function(){return n(e)}),0);else try{n(e)}catch(e){}}))}var U=function(){function e(t){this.listeners=[];var a=!!(t||{}).perfEvtsSendAll;(0,f.Z)(e,this,(function(e){e[b.g]=function(t){e.listeners[b.MW](t)},e[b.n7]=function(t){for(var a=(0,r.UA)(e[b.dE],t);a>-1;)e.listeners[b.cb](a,1),a=(0,r.UA)(e[b.dE],t)},e[_.uC]=function(t){z(e[b.dE],_.uC,!0,(function(e){e[_.uC](t)}))},e[_.$F]=function(t,a){z(e[b.dE],_.$F,!0,(function(e){e[_.$F](t,a)}))},e[_.f_]=function(t,a){z(e[b.dE],_.f_,a,(function(e){e[_.f_](t,a)}))},e[_.C$]=function(t){t&&(!a&&t[b.PL]()||z(e[b.dE],_.C$,!1,(function(e){t[b.d]?setTimeout((function(){return e[_.C$](t)}),0):e[_.C$](t)})))}}))}return e.__ieDyn=1,e}(),V=function(e){function t(){var a=e.call(this)||this;return(0,f.Z)(t,a,(function(e,t){function a(t){var a=e[b.tb]();a&&a[_.$F]([t],2)}e[b.VL]=function(e,a,n,i){t[b.VL](e,a,n||new v.AQ(e),i||new U(e))},e.track=function(n){(0,g.Lm)(e[_.kl](),(function(){return"AppInsightsCore:track"}),(function(){null===n&&(a(n),(0,r._y)("Invalid telemetry item")),function(e){(0,r.le)(e[b.I])&&(a(e),(0,r._y)("telemetry name required"))}(n),t.track(n)}),(function(){return{item:n}}),!n.sync)}})),a}return(0,i.ne)(t,e),t.__ieDyn=1,t}(M),q=a(1539),F=a(5705);const B=function(e){function t(){var a=e.call(this)||this;return a.pluginVersionStringArr=[],(0,f.Z)(t,a,(function(e,t){e.logger&&e.logger.queue||(e.logger=new v.AQ({loggingLevelConsole:1})),e.initialize=function(a,n,i,o){(0,g.Lm)(e,(function(){return"AppInsightsCore.initialize"}),(function(){var s=e.pluginVersionStringArr;if(a){a.endpointUrl||(a.endpointUrl=q.YT);var p=a.propertyStorageOverride;!p||p.getProperty&&p.setProperty||(0,r._y)("Invalid property storage override passed."),a.channels&&(0,r.tO)(a.channels,(function(e){e&&(0,r.tO)(e,(function(e){if(e.identifier&&e.version){var t=e.identifier+"="+e.version;s.push(t)}}))}))}e.getWParam=function(){return"undefined"!=typeof document||a.enableWParam?0:-1},n&&(0,r.tO)(n,(function(e){if(e&&e.identifier&&e.version){var t=e.identifier+"="+e.version;s.push(t)}})),e.pluginVersionString=s.join(";"),e.pluginVersionStringArr=s;try{t.initialize(a,n,i,o),e.pollInternalLogs("InternalLog")}catch(t){var c=e.logger,l=(0,y.eU)(t);-1!==l.indexOf("channels")&&(l+="\n - Channels must be provided through config.channels only!"),(0,v.kP)(c,1,514,"SDK Initialization Failed - no telemetry will be sent: "+l)}}),(function(){return{config:a,extensions:n,logger:i,notificationManager:o}}))},e.track=function(a){(0,g.Lm)(e,(function(){return"AppInsightsCore.track"}),(function(){var n=a;if(n){n.timings=n.timings||{},n.timings.trackStart=(0,F.hK)(),(0,F.r7)(n.latency)||(n.latency=1);var i=n.ext=n.ext||{};i.sdk=i.sdk||{},i.sdk.ver=F.vs;var o=n.baseData=n.baseData||{};o[q.o6]=o[q.o6]||{};var r=o[q.o6];r[q.p8]=r[q.p8]||e.pluginVersionString||q.qS}t.track(n)}),(function(){return{item:a}}),!a.sync)}})),a}return(0,i.ne)(t,e),t.__ieDyn=1,t}(V),H=function(e){function t(){var a=e.call(this)||this;return(0,f.Z)(t,a,(function(e,t){e.initialize=function(a,n,i,o){a&&!a.endpointUrl&&(a.endpointUrl=q.YT),e.getWParam=function(){return F.x9||a.enableWParam?0:-1};try{t.initialize(a,n,i,o)}catch(t){(0,v.kP)(e.logger,1,514,"Initialization Failed: "+(0,y.eU)(t)+"\n - Note: Channels must be provided through config.channels only")}},e.track=function(e){var a=e;if(a){var n=a.ext=a.ext||{};n.sdk=n.sdk||{},n.sdk.ver=F.vs}t.track(a)}})),a}return(0,i.ne)(t,e),t.__ieDyn=1,t}(M);var G=r.mf;function $(e,t,a){return function(n){e[t]=n,a()}}const K=function(){function e(t){var a=0,n=null,i=[];function o(){if(i.length>0){var e=i.slice();i=[],setTimeout((function(){for(var t=0,a=e.length;t")+"."+W;function o(e){var t=(0,w.Rd)();t&&t.QUnit&&console&&console.log("ESPromiseScheduler["+i+"] "+e)}function r(e){(0,v.jV)(a,"ESPromiseScheduler["+i+"] "+e)}W++,(0,f.Z)(e,this,(function(e){var t=null,a=0;function s(e,t){for(var a=0;a0){for(var p=0;p{"use strict";a.d(t,{qS:()=>n,YT:()=>i,p8:()=>o,o6:()=>r});var n="",i="https://browser.events.data.microsoft.com/OneCollector/1.0/",o="version",r="properties"},5705:(e,t,a)=>{"use strict";a.d(t,{Gf:()=>m,vs:()=>h,x9:()=>y,dH:()=>b,Sn:()=>w,jM:()=>_,IZ:()=>x,r7:()=>k,yj:()=>E,Vv:()=>T,oF:()=>S,d8:()=>j,kT:()=>C,ej:()=>A,Do:()=>I,cm:()=>N,l7:()=>O,hK:()=>D,oS:()=>P,JT:()=>R,if:()=>L,Sy:()=>M,cQ:()=>z,Tr:()=>U,mJ:()=>V,ot:()=>q});var n,i=a(9251),o=a(4869),r=a(8140),s=a(8956),p=a(1550),c=a(7954),l=a(9406),u=a(175),d=a(1539),m="3.2.8",h="1DS-Web-JS-"+m,f="withCredentials",v=((n={})[0]=0,n[2]=6,n[1]=1,n[3]=7,n[4098]=6,n[4097]=1,n[4099]=7,n),g=null,y=Boolean((0,i.Me)()),b=Boolean((0,i.Jj)());function w(e){return!(e===d.qS||(0,o.le)(e))}function _(e){if(e){var t=e.indexOf("-");if(t>-1)return e.substring(0,t)}return d.qS}function x(){return null===g&&(g=!(0,o.o8)(Uint8Array)&&!function(){var e=(0,i.jW)();if(!(0,o.o8)(e)&&e.userAgent){var t=e.userAgent.toLowerCase();if((t.indexOf("safari")>=0||t.indexOf("firefox")>=0)&&t.indexOf("chrome")<0)return!0}return!1}()&&!(0,i.b$)()),g}function k(e){return!!(e&&(0,o.hj)(e)&&e>=1&&e<=4)}function E(e,t,a){if(!t&&!w(t)||"string"!=typeof e)return null;var n=typeof t;if("string"===n||"number"===n||"boolean"===n||(0,o.kJ)(t))t={value:t};else if("object"!==n||p.CY.call(t,"value")){if((0,o.le)(t.value)||t.value===d.qS||!(0,o.HD)(t.value)&&!(0,o.hj)(t.value)&&!(0,o.jn)(t.value)&&!(0,o.kJ)(t.value))return null}else t={value:a?JSON.stringify(t):t};if((0,o.kJ)(t.value)&&!R(t.value))return null;if(!(0,o.le)(t.kind)){if((0,o.kJ)(t.value)||!P(t.kind))return null;t.value=t.value.toString()}return t}function T(e,t,a){var n=-1;if(!(0,o.o8)(e))if(t>0&&(32===t?n=8192:t<=13&&(n=t<<5)),function(e){return e>=0&&e<=9}(a))-1===n&&(n=0),n|=a;else{var i=v[M(e)]||-1;-1!==n&&-1!==i?n|=i:6===i&&(n=i)}return n}function S(){(0,r.JP)(null).setEnabled(!1)}function j(e,t,a){(0,r.p7)(null)&&(0,r.JP)(null).set(e,t,86400*a,null,"/")}function C(e){(0,r.p7)(null)&&(0,r.JP)(null).del(e)}function A(e){return(0,r.p7)(null)?I((0,r.JP)(null),e):d.qS}function I(e,t,a){var n;return void 0===a&&(a=!0),e&&(n=e.get(t),a&&n&&decodeURIComponent&&(n=decodeURIComponent(n))),n||d.qS}function N(e){void 0===e&&(e="D");var t=(0,s.GW)();return"B"===e?t="{"+t+"}":"P"===e?t="("+t+")":"N"===e&&(t=t.replace(/-/g,d.qS)),t}function O(e,t,a,n,i){var r={},s=!1,c=0,l=arguments.length,u=Object[p.hB],d=arguments;for("[object Boolean]"===u.toString.call(d[0])&&(s=d[0],c++);c0&&e<=13||32===e}function R(e){return e.length>0}function L(e,t){var a=e;a.timings=a.timings||{},a.timings.processTelemetryStart=a.timings.processTelemetryStart||{},a.timings.processTelemetryStart[t]=D()}function M(e){var t=0;if(null!=e){var a=typeof e;"string"===a?t=1:"number"===a?t=2:"boolean"===a?t=3:a===p.fK&&(t=4,(0,o.kJ)(e)?(t=4096,e.length>0&&(t|=M(e[0]))):p.CY.call(e,"value")&&(t=8192|M(e.value)))}return t}var z={Version:m,FullVersionString:h,strUndefined:p.jA,strObject:p.fK,Undefined:p.jA,arrForEach:o.tO,arrIndexOf:o.UA,arrMap:o.Mr,arrReduce:o.Xz,objKeys:o.FY,toISOString:o.Y6,isReactNative:i.b$,isString:o.HD,isNumber:o.hj,isBoolean:o.jn,isFunction:o.mf,isArray:o.kJ,isObject:o.Kn,strTrim:o.nd,isDocumentObjectAvailable:y,isWindowObjectAvailable:b,isValueAssigned:w,getTenantId:_,isBeaconsSupported:i.MF,isUint8ArrayAvailable:x,isLatency:k,sanitizeProperty:E,getISOString:o.Y6,useXDomainRequest:i.cp,getCommonSchemaMetaData:T,cookieAvailable:r.p7,disallowsSameSiteNone:r.UY,setCookie:j,deleteCookie:C,getCookie:A,createGuid:N,extend:O,getTime:D,isValueKind:P,isArrayValid:R,objDefineAccessors:o.l_,addPageUnloadEventListener:c.c9,setProcessTelemetryTimings:L,addEventHandler:c.Ib,getFieldValueType:M,strEndsWith:o.Id,objForEachKey:o.rW},U={_canUseCookies:void 0,isTypeof:o.Ym,isUndefined:o.o8,isNullOrUndefined:o.le,hasOwnProperty:o.nr,isFunction:o.mf,isObject:o.Kn,isDate:o.J_,isArray:o.kJ,isError:o.VZ,isString:o.HD,isNumber:o.hj,isBoolean:o.jn,toISOString:o.Y6,arrForEach:o.tO,arrIndexOf:o.UA,arrMap:o.Mr,arrReduce:o.Xz,strTrim:o.nd,objCreate:u.pu,objKeys:o.FY,objDefineAccessors:o.l_,addEventHandler:c.Ib,dateNow:o.m6,isIE:i.w1,disableCookies:S,newGuid:s.GW,perfNow:s.Jj,newId:l.pZ,randomValue:l.az,random32:l._l,mwcRandomSeed:l.CN,mwcRandom32:l.F6,generateW3CId:s.DO};function V(){return!!(0,i.a8)("chrome")}function q(e,t,a,n,i,o){function r(e,t,a){try{e[t]=a}catch(e){}}void 0===n&&(n=!1),void 0===i&&(i=!1);var s=new XMLHttpRequest;return n&&r(s,"Microsoft_ApplicationInsights_BypassAjaxInstrumentation",n),a&&r(s,f,a),s.open(e,t,!i),a&&r(s,f,a),!i&&o&&r(s,"timeout",o),s}},1488:(e,t,a)=>{"use strict";a.r(t),a.d(t,{BE_PROFILE:()=>v,NRT_PROFILE:()=>f,PostChannel:()=>ne,RT_PROFILE:()=>h});var n=a(7421),i=a(9141),o=a(1782),r=a(7954),s=a(7624),p=a(5705),c=a(4869),l=a(9251),u=a(8452),d=a(9339),m=a(7951),h="REAL_TIME",f="NEAR_REAL_TIME",v="BEST_EFFORT",g="",y="POST",b="drop",w="requeue",_="application/x-json-stream",x="content-type",k="client-version",E="client-id",T="time-delta-to-apply-millis",S="upload-time",j="apikey",C="AuthMsaDeviceTicket",A="AuthXToken";function I(e){var t=(e.ext||{}).intweb;return t&&(0,p.Sn)(t.msfpc)?t.msfpc:null}function N(e){for(var t=null,a=0;null===t&&a(0,c.m6)()||(delete a[n],!1)}}))}return e.__ieDyn=1,e}();var R=a(1550);function L(e){var t,a=Math.floor(1200*Math.random())+2400;return t=Math.pow(2,e)*a,Math.min(t,6e5)}var M,z=2e6,U=Math.min(z,65e3),V=/\./,q=function(){function e(t,a,n,r){var s="baseData",l=!!r,u=a,d={};(0,i.Z)(e,this,(function(e){function a(e,t,i,o,r,s,m){(0,c.rW)(e,(function(e,h){var f=null;if(h||(0,p.Sn)(h)){var v=i,g=e,y=r,b=t;if(l&&!o&&V.test(e)){var w=e.split("."),_=w.length;if(_>1){y&&(y=y.slice());for(var x=0;x<_-1;x++){var k=w[x];b=b[k]=b[k]||{},v+="."+k,y&&y.push(k)}g=w[_-1]}}if(f=o&&function(e,t){var a=d[e];return void 0===a&&(e.length>=7&&(a=(0,c.xe)(e,"ext.metadata")||(0,c.xe)(e,"ext.web")),d[e]=a),a}(v)||!u||!u.handleField(v,g)?(0,p.yj)(g,h,n):u.value(v,g,h,n)){var E=f.value;if(b[g]=E,s&&s(y,g,f),m&&"object"==typeof E&&!(0,c.kJ)(E)){var T=y;T&&(T=T.slice()).push(g),a(h,E,v+"."+g,o,T,s,m)}}}}))}e.createPayload=function(e,t,a,n,i,o){return{apiKeys:[],payloadBlob:g,overflow:null,sizeExceed:[],failedEvts:[],batches:[],numEvents:0,retryCnt:e,isTeardown:t,isSync:a,isBeacon:n,sendType:o,sendReason:i}},e.appendPayload=function(a,n,i){var r=a&&n&&!a.overflow;return r&&(0,o.Lm)(t,(function(){return"Serializer:appendPayload"}),(function(){for(var t=n.events(),o=a.payloadBlob,r=a.numEvents,s=!1,p=[],l=[],u=a.isBeacon,d=u?65e3:3984588,m=u?U:z,h=0,f=0;h=i){a.overflow=n.split(h);break}var g=e.getEventBlob(v);if(g&&g.length<=m){var y=g.length;if(o.length+y>d){a.overflow=n.split(h);break}o&&(o+="\n"),o+=g,++f>20&&(o.substr(0,1),f=0),s=!0,r++}else g?p.push(v):l.push(v),t.splice(h,1),h--}h++}if(p&&p.length>0&&a.sizeExceed.push(O.create(n.iKey(),p)),l&&l.length>0&&a.failedEvts.push(O.create(n.iKey(),l)),s){a.batches.push(n),a.payloadBlob=o,a.numEvents=r;var b=n.iKey();-1===(0,c.UA)(a.apiKeys,b)&&a.apiKeys.push(b)}}),(function(){return{payload:a,theBatch:{iKey:n.iKey(),evts:n.events()},max:i}})),r},e.getEventBlob=function(e){try{return(0,o.Lm)(t,(function(){return"Serializer.getEventBlob"}),(function(){var t={};t.name=e.name,t.time=e.time,t.ver=e.ver,t.iKey="o:"+(0,p.jM)(e.iKey);var n={},i=e.ext;i&&(t.ext=n,(0,c.rW)(i,(function(e,t){a(t,n[e]={},"ext."+e,!0,null,null,!0)})));var o=t.data={};o.baseType=e.baseType;var r=o.baseData={};return a(e.baseData,r,s,!1,[s],(function(e,t,a){F(n,e,t,a)}),!0),a(e.data,o,"data",!1,[],(function(e,t,a){F(n,e,t,a)}),!0),JSON.stringify(t)}),(function(){return{item:e}}))}catch(e){return null}}}))}return e.__ieDyn=1,e}();function F(e,t,a,n){if(n&&e){var i=(0,p.Vv)(n.value,n.kind,n.propertyType);if(i>-1){var o=e.metadata;o||(o=e.metadata={f:{}});var r=o.f;if(r||(r=o.f={}),t)for(var s=0;s0)for(var i=t.toLowerCase(),o=0;o0&&(n&&G[t]?(e.hdrs[G[t]]=a,e.useHdrs=!0):e.url+="&"+t+"="+a)}function X(e,t){return t&&((0,c.hj)(t)?e=[t].concat(e):(0,c.kJ)(t)&&(e=t.concat(e))),e}K(C,C,!1),K(k,k),K(E,"Client-Id"),K(j,j),K(T,T),K(S,S),K(A,A);var J=function(){function e(t,a,n,r,s){this._responseHandlers=[];var u,m,h,f,v,w,C,A,I,N,O="?cors=true&"+x.toLowerCase()+"="+_,M=new P,z=!1,U=new D,V=!1,F=0,G=!0,K=[],J={},Z=[],ee=null,te=!1,ae=!1,ne=!1;(0,i.Z)(e,this,(function(e){var i=!0;function D(e,t){for(var a=0,n=null,i=0;null==n&&i0&&(l.headers=e.headers),fetch(o,l).then((function(e){var a={},n=g,i=e.headers;i&&i.forEach((function(e,t){a[t]=e})),e.body&&e.text().then((function(e){n=e})),p||(p=!0,re(t,e.status,a,n),ye(n))})).catch((function(e){p||(p=!0,re(t,0,{}))})),r&&!p&&(p=!0,re(t,200,{})),!p&&e.timeout>0&&s.set((function(){p||(p=!0,re(t,500,{}))}),e.timeout)}function oe(e,t,a){var n=e.urlString;function o(e,t,a){if(!e[a]&&t&&t.getResponseHeader){var n=t.getResponseHeader(a);n&&(e[a]=(0,c.nd)(n))}return e}function r(e,a){re(t,e.status,function(e){var t={};return e.getAllResponseHeaders?t=function(e){var t={};if((0,c.HD)(e)){var a=(0,c.nd)(e).split(/[\r\n]+/);(0,c.tO)(a,(function(e){if(e){var a=e.indexOf(": ");if(-1!==a){var n=(0,c.nd)(e.substring(0,a)).toLowerCase(),i=(0,c.nd)(e.substring(a+1));t[n]=i}else t[(0,c.nd)(e)]=1}}))}return t}(e.getAllResponseHeaders()):(t=o(t,e,"time-delta-millis"),t=o(t,e,"kill-duration"),t=o(t,e,"kill-duration-seconds")),t}(e),a)}a&&e.disableXhrSync&&(a=!1);var s=(0,p.ot)(y,n,i,!0,a,e.timeout);(0,c.rW)(e.headers,(function(e,t){s.setRequestHeader(e,t)})),s.onload=function(){var e=W(s);r(s,e),ye(e)},s.onerror=function(){r(s)},s.ontimeout=function(){r(s)},s.send(e.data)}function re(e,t,a,n){try{e(t,a,n)}catch(e){(0,d.kP)(m,2,518,(0,l.eU)(e))}}function se(e,t,a){var n=200,i=e._thePayload,o=e.urlString+(N?B:g);try{var r=(0,l.jW)();if(!r.sendBeacon(o,e.data))if(i){var s=[];(0,c.tO)(i.batches,(function(e){if(s&&e&&e.count()>0){for(var t=e.events(),a=0;a0&&!z&&h[t]&&ee&&(n=0!==t||le()&&(a>0||U.allowRequestSending())),n}function me(e){var t={};return e&&(0,c.tO)(e,(function(e,a){t[a]={iKey:e.iKey(),evts:e.events()}})),t}function he(e,a,n,i,r){if(e&&0!==e.length)if(z)be(e,1,i);else{i=ce(i);try{var s=e,c=0!==i;(0,o.Lm)(f,(function(){return"HttpManager:_sendBatches"}),(function(o){o&&(e=e.slice(0));for(var s=[],l=null,u=(0,p.hK)(),d=h[i]||(c?h[1]:h[0]),m=d&&d._transport,f=I&&(ae||pe(i)||3===m||d._isSync&&2===m);de(e,i,a);){var v=e.shift();v&&v.count()>0&&(M.isTenantKilled(v.iKey())?s.push(v):(l=l||ee.createPayload(a,n,c,f,r,i),ee.appendPayload(l,v,t)?null!==l.overflow&&(e=[l.overflow].concat(e),l.overflow=null,ve(l,u,(0,p.hK)(),r),u=(0,p.hK)(),l=null):(ve(l,u,(0,p.hK)(),r),u=(0,p.hK)(),e=[v].concat(e),l=null)))}l&&ve(l,u,(0,p.hK)(),r),e.length>0&&(Z=e.concat(Z)),be(s,8004,i)}),(function(){return{batches:me(s),retryCount:a,isTeardown:n,isSynchronous:c,sendReason:r,useSendBeacon:pe(i),sendType:i}}),!c)}catch(e){(0,d.kP)(m,2,48,"Unexpected Exception sending batch: "+(0,l.eU)(e))}}}function fe(e,t,a){e[t]=e[t]||{},e[t][u.identifier]=a}function ve(t,a,i,r){if(t&&t.payloadBlob&&t.payloadBlob.length>0){var s=!!e.sendHook,v=h[t.sendType];!pe(t.sendType)&&t.isBeacon&&2===t.sendReason&&(v=h[2]||h[3]||v);var y=ne;(t.isBeacon||3===v._transport)&&(y=!1);var b=function(e,t){var a={url:O,hdrs:{},useHdrs:!1};t?(a.hdrs=(0,p.l7)(a.hdrs,J),a.useHdrs=(0,c.FY)(a.hdrs).length>0):(0,c.rW)(J,(function(e,t){$[e]?Q(a,$[e],t,!1):(a.hdrs[e]=t,a.useHdrs=!0)})),Q(a,E,"NO_AUTH",t),Q(a,k,p.vs,t);var n=g;(0,c.tO)(e.apiKeys,(function(e){n.length>0&&(n+=","),n+=e})),Q(a,j,n,t),Q(a,S,(0,c.m6)().toString(),t);var i=function(e){for(var t=0;t=0&&(a.url+="&w="+o)}for(var r=0;r0?E.sendAttempt++:E.sendAttempt=1}be(t.batches,1e3+(r||0),t.sendType,!0);var S={data:t.payloadBlob,urlString:b.url,headers:b.hdrs,_thePayload:t,_sendReason:r,timeout:w,disableXhrSync:C,disableFetchKeepAlive:A};y&&(Y(S.headers,"cache-control")||(S.headers["cache-control"]="no-cache, no-store"),Y(S.headers,x)||(S.headers["content-type"]=_));var j=null;v&&(j=function(a){U.firstRequestSent();var i=function(a,i){!function(t,a,i,o){var r,s=9e3,l=null,d=!1,m=!1;try{var h=!0;if(typeof t!==R.jA){if(a){U.setClockSkew(a["time-delta-millis"]);var f=a["kill-duration"]||a["kill-duration-seconds"];(0,c.tO)(M.setKillSwitchTenants(a["kill-tokens"],f),(function(e){(0,c.tO)(i.batches,(function(t){if(t.iKey()===e){l=l||[];var a=t.split(0);i.numEvents-=a.count(),l.push(a)}}))}))}if(200==t||204==t)return void(s=200);((r=t)>=300&&r<500&&408!=r&&429!=r||501==r||505==r||i.numEvents<=0)&&(h=!1),s=9e3+t%1e3}if(h){s=100;var v=i.retryCnt;0===i.sendType&&(v0&&function(e,t){te&&(0,c.tO)(e,(function(e){fe(e.timings=e.timings||{},"sendEventCompleted",t)}))}(e.events(),t)}))}}(t.batches)),be(t.batches,a,t.sendType,!0)}finally{0===t.sendType&&(F--,5!==n&&e.sendQueuedRequests(t.sendType,n))}}(i,s,o,m)),be(l,8004,i.sendType)}}(a,i,t,r)},o=t.isTeardown||t.isSync;try{v.sendPOST(a,i,o),e.sendListener&&e.sendListener(S,a,o,t.isBeacon)}catch(e){(0,d.jV)(m,"Unexpected exception sending payload. Ex:"+(0,l.eU)(e)),re(i,0,{})}}),(0,o.Lm)(f,(function(){return"HttpManager:_doPayloadSend.sender"}),(function(){if(j)if(0===t.sendType&&F++,s&&!t.isBeacon&&3!==v._transport){var a={data:S.data,urlString:S.urlString,headers:(0,p.l7)({},S.headers),timeout:S.timeout,disableXhrSync:S.disableXhrSync,disableFetchKeepAlive:S.disableFetchKeepAlive},n=!1;(0,o.Lm)(f,(function(){return"HttpManager:_doPayloadSend.sendHook"}),(function(){try{e.sendHook(a,(function(e){n=!0,G||e._thePayload||(e._thePayload=e._thePayload||S._thePayload,e._sendReason=e._sendReason||S._sendReason),j(e)}),t.isSync||t.isTeardown)}catch(e){n||j(S)}}))}else j(S)}))}),(function(){return{thePayload:t,serializationStart:a,serializationCompleted:i,sendReason:r}}),t.isSync)}t.sizeExceed&&t.sizeExceed.length>0&&be(t.sizeExceed,8003,t.sendType),t.failedEvts&&t.failedEvts.length>0&&be(t.failedEvts,8002,t.sendType)}function ge(e,t,a){t?e():s.set(e,a)}function ye(t){var a=e._responseHandlers;try{for(var n=0;n0&&r){var i=r[(c=t,l=H[c],(0,p.Sn)(l)||(l="oth",c>=9e3&&c<=9999?l="rspFail":c>=8e3&&c<=8999?l=b:c>=1e3&&c<=1999&&(l="send")),l)];if(i){var s=0!==a;(0,o.Lm)(f,(function(){return"HttpManager:_sendBatchesNotification"}),(function(){ge((function(){try{i.call(r,e,t,s,a)}catch(e){(0,d.kP)(m,1,74,"send request notification failed: "+e)}}),n||s,0)}),(function(){return{batches:me(e),reason:t,isSync:s,sendSync:n,sendType:a}}),!s)}}var c,l}e.initialize=function(e,t,a,n,o){var r;o||(o={}),O=e+O,ne=!!(0,c.o8)(o.avoidOptions)||!o.avoidOptions,f=t,v=t.getCookieMgr(),te=!f.config.disableEventTimings;var s=!!f.config.enableCompoundKey;m=(u=a).diagLog();var p=o.valueSanitizer,g=o.stringifyObjects;(0,c.o8)(o.enableCompoundKey)||(s=!!o.enableCompoundKey),w=o.xhrTimeout,C=!!o.disableXhrSync,A=!!o.disableFetchKeepAlive,N=!1!==o.addNoResponse,V=!(0,l.b$)(),ee=new q(f,p,g,s),(0,c.le)(o.useSendBeacon)||(V=!!o.useSendBeacon);var y=n,b=o.alwaysUseXhrOverride?n:null,_=o.alwaysUseXhrOverride?n:null,x=[3,2];if(!n){G=!1;var k=(0,l.k$)();k&&k.protocol&&"file:"===k.protocol.toLowerCase()&&(i=!1);var E=[];(0,l.b$)()?(E=[2,1],x=[2,1,3]):E=[1,2,3],(n=D(E=X(E,o.transports),!1))||(0,d.jV)(m,"No available transport to send events"),y=D(E,!0)}b||(b=D(x=X(x,o.unloadTransports),!0)),I=!G&&(V&&(0,l.MF)()||!A&&(0,l.JO)(!0)),(r={})[0]=n,r[1]=y||D([1,2,3],!0),r[2]=b||y||D([1],!0),r[3]=_||D([2,3],!0)||y||D([1],!0),h=r},e._getDbgPlgTargets=function(){return[h[0],M,ee,h]},e.addQueryStringParameter=function(e,t){for(var a=0;a0){if(M.isTenantKilled(e.iKey()))return!1;Z.push(e)}return!0},e.teardown=function(){Z.length>0&&he(ue(),0,!0,2,2)},e.pause=function(){z=!0},e.resume=function(){z=!1,e.sendQueuedRequests(0,4)},e.sendSynchronousBatch=function(e,t,a){e&&e.count()>0&&((0,c.le)(t)&&(t=1),ae&&(t=ce(t),a=2),he([e],0,!1,t,a||0))}}))}return e.__ieDyn=1,e}();function Z(e,t){for(var a=[],n=2;n0){var o=i.split(0,n),r=o.count();if(r>0)return 4===a?j-=r:I-=r,he(ae,[o],u.h.QueueFull),!0}a++}return re(),!1}(e.iKey,e.latency,r,s)&&(o=!oe(e,t))}o&&me(ae,[e],u.h.QueueFull)}function K(e,t,a){var n=se(e,t,a);return g.sendQueuedRequests(t,a),n}function W(){return I>0}function Y(){if(q>=0&&se(q,0,w)&&g.sendQueuedRequests(0,w),j>0&&!M&&!S){var e=D[P][2];e>=0&&(M=X((function(){M=null,K(4,0,1),Y()}),e))}var t=D[P][1];!R&&!T&&t>=0&&!S&&(W()?R=X((function(){R=null,K(0===U?3:1,0,1),U++,U%=2,Y()}),t):U=0)}function Q(){a=null,k=!1,E=[],T=null,S=!1,j=0,A=500,I=0,N=1e4,D={},P=h,R=null,M=null,z=0,U=0,m=null,V={},y=void 0,b=0,q=-1,w=null,F=!0,B=!1,H=6,G=2,_=null,x=te(),g=new J(500,2,1,{requeue:ue,send:fe,sent:ve,drop:ge,rspFail:ye,oth:be},x),le(),V[4]={batches:[],iKeyMap:{}},V[3]={batches:[],iKeyMap:{}},V[2]={batches:[],iKeyMap:{}},V[1]={batches:[],iKeyMap:{}},we()}function X(e,t){0===t&&z&&(t=1);var a=1e3;return z&&(a=L(z-1)),x.set(e,t*a)}function Z(){return null!==R&&(x.clear(R),R=null,U=0,!0)}function ee(e,t){Z(),T&&(x.clear(T),T=null),S||K(1,e,t)}function ne(e,t,a){var n=V[t];n||(n=V[t=1]);var i=n.iKeyMap[e];return!i&&a&&(i=O.create(e),n.batches.push(i),n.iKeyMap[e]=i),i}function ie(t,a){g.canSendRequest()&&!z&&(y>0&&I>y&&(a=!0),a&&null==T&&e.flush(t,null,20))}function oe(e,t){F&&(e=(0,c.Ax)(e));var a=e.latency,n=ne(e.iKey,a,!0);return!!n.addEvent(e)&&(4!==a?(I++,t&&0===e.sendAttempt&&ie(!e.sync,b>0&&n.count()>=b)):j++,!0)}function re(){for(var e=0,t=0,a=function(a){var n=V[a];n&&n.batches&&(0,c.tO)(n.batches,(function(n){4===a?e+=n.count():t+=n.count()}))},n=1;n<=4;n++)a(n);I=t,j=e}function se(t,a,n){var i=!1,r=0===a;return!r||g.canSendRequest()?(0,o.Lm)(e.core,(function(){return"PostChannel._queueBatches"}),(function(){for(var e=[],a=4;a>=t;){var n=V[a];n&&n.batches&&n.batches.length>0&&((0,c.tO)(n.batches,(function(t){g.addBatch(t)?i=i||t&&t.count()>0:e=e.concat(t.events()),4===a?j-=t.count():I-=t.count()})),n.batches=[],n.iKeyMap={}),a--}e.length>0&&me(ae,e,u.h.KillSwitch),i&&q>=t&&(q=-1,w=0)}),(function(){return{latency:t,sendType:a,sendReason:n}}),!r):(q=q>=0?Math.min(q,t):t,w=Math.max(w,n)),i}function pe(e,t){K(1,0,t),re(),ce((function(){e&&e(),E.length>0?T=X((function(){T=null,pe(E.shift(),t)}),0):(T=null,Y())}))}function ce(e){g.isCompletelyIdle()?e():T=X((function(){T=null,ce(e)}),.25)}function le(){(D={})[h]=[2,1,0],D[f]=[6,3,0],D[v]=[18,9,0]}function ue(t,a){var n=[],i=H;B&&(i=G),(0,c.tO)(t,(function(t){t&&t.count()>0&&(0,c.tO)(t.events(),(function(t){t&&(t.sync&&(t.latency=4,t.sync=!1),t.sendAttempt0&&me(ae,n,u.h.NonRetryableStatus),B&&ee(2,2)}function de(t,a){var n=e._notificationManager||{},i=n[t];if(i)try{i.apply(n,a)}catch(a){(0,d.kP)(e.diagLog(),1,74,t+" notification failed: "+a)}}function me(e,t){for(var a=[],n=2;n0&&de(e,[t].concat(a))}function he(e,t){for(var a=[],n=2;n0&&(0,c.tO)(t,(function(t){t&&t.count()>0&&de(e,[t.events()].concat(a))}))}function fe(e,t,a){e&&e.length>0&&de("eventsSendRequest",[t>=1e3&&t<=1999?t-1e3:0,!0!==a])}function ve(e,t){he("eventsSent",e,t),Y()}function ge(e,t){he(ae,e,t>=8e3&&t<=8999?t-8e3:u.h.Unknown)}function ye(e){he(ae,e,u.h.NonRetryableStatus),Y()}function be(e,t){he(ae,e,u.h.Unknown),Y()}function we(){b=a&&a.disableAutoBatchFlushLimit?0:Math.max(1500,N/6)}Q(),e._getDbgPlgTargets=function(){return[g]},e.initialize=function(l,u,d){(0,o.Lm)(u,(function(){return"PostChannel:initialize"}),(function(){var o=u;t.initialize(l,u,d);try{u.addUnloadCb,_=(0,r.jU)((0,s.J)(e.identifier),u.evtNamespace&&u.evtNamespace());var h=e._getTelCtx();l.extensionConfig[e.identifier]=l.extensionConfig[e.identifier]||{},a=h.getExtCfg(e.identifier),x=te(a.setTimeoutOverride,a.clearTimeoutOverride),F=!a.disableOptimizeObj&&(0,p.mJ)(),function(e){var t=e.getWParam;e.getWParam=function(){var e=0;return a.ignoreMc1Ms0CookieProcessing&&(e|=2),e|t()}}(o),a.eventsLimitInMem>0&&(N=a.eventsLimitInMem),a.immediateEventLimit>0&&(A=a.immediateEventLimit),a.autoFlushEventsLimit>0&&(y=a.autoFlushEventsLimit),(0,c.hj)(a.maxEventRetryAttempts)&&(H=a.maxEventRetryAttempts),(0,c.hj)(a.maxUnloadEventRetryAttempts)&&(G=a.maxUnloadEventRetryAttempts),we(),a.httpXHROverride&&a.httpXHROverride.sendPOST&&(m=a.httpXHROverride),(0,p.Sn)(l.anonCookieName)&&g.addQueryStringParameter("anoncknm",l.anonCookieName),g.sendHook=a.payloadPreprocessor,g.sendListener=a.payloadListener;var f=a.overrideEndpointUrl?a.overrideEndpointUrl:l.endpointUrl;e._notificationManager=u.getNotifyMgr(),g.initialize(f,e.core,e,m,a);var v=l.disablePageUnloadEvents||[];(0,r.c9)(n,v,_),(0,r.TJ)(n,v,_),(0,r.nD)(i,l.disablePageShowEvents,_)}catch(t){throw e.setInitialized(!1),t}}),(function(){return{coreConfig:l,core:u,extensions:d}}))},e.processTelemetry=function(t,n){(0,p.if)(t,e.identifier);var i=(n=e._getTelCtx(n)).getExtCfg(e.identifier),o=!!a.disableTelemetry;i&&(o=o||!!i.disableTelemetry);var r=t;o||k||(a.overrideInstrumentationKey&&(r.iKey=a.overrideInstrumentationKey),i&&i.overrideInstrumentationKey&&(r.iKey=i.overrideInstrumentationKey),$(r,!0),B?ee(2,2):Y()),e.processNext(r,n)},e._doTeardown=function(e,t){ee(2,2),k=!0,g.teardown(),(0,r.JA)(null,_),(0,r.C9)(null,_),(0,r.Yl)(null,_),Q()},e.setEventQueueLimits=function(e,t){N=e>0?e:1e4,y=t>0?t:0,we();var a=I>e;if(!a&&b>0)for(var n=1;!a&&n<=3;n++){var i=V[n];i&&i.batches&&(0,c.tO)(i.batches,(function(e){e&&e.count()>=b&&(a=!0)}))}ie(!0,a)},e.pause=function(){Z(),S=!0,g.pause()},e.resume=function(){S=!1,g.resume(),Y()},e.addResponseHandler=function(e){g._responseHandlers.push(e)},e._loadTransmitProfiles=function(e){Z(),le(),P=h,Y(),(0,c.rW)(e,(function(e,t){var a=t.length;if(a>=2){var n=a>2?t[2]:0;if(t.splice(0,a-2),t[1]<0&&(t[0]=-1),t[1]>0&&t[0]>0){var i=t[0]/t[1];t[0]=Math.ceil(i)*t[1]}n>=0&&t[1]>=0&&n>t[1]&&(n=t[1]),t.push(n),D[e]=t}}))},e.flush=function(e,t,a){if(void 0===e&&(e=!0),!S)if(a=a||1,e)null==T?(Z(),se(1,0,a),T=X((function(){T=null,pe(t,a)}),0)):E.push(t);else{var n=Z();K(1,1,a),null!=t&&t(),n&&Y()}},e.setMsaAuthTicket=function(e){g.addHeader(C,e)},e.hasEvents=W,e._setTransmitProfile=function(e){P!==e&&void 0!==D[e]&&(Z(),P=e,Y())},e._backOffTransmission=function(){z<4&&(z++,Z(),Y())},e._clearBackOff=function(){z&&(z=0,Z(),Y())},(0,c.l_)(e,"_setTimeoutOverride",(function(){return x.set}),(function(e){x=te(e,x.clear)})),(0,c.l_)(e,"_clearTimeoutOverride",(function(){return x.clear}),(function(e){x=te(x.set,e)}))})),n}return(0,n.ne)(t,e),t.__ieDyn=1,t}(m.i)},951:(e,t,a)=>{"use strict";a.d(t,{By:()=>i});var n=a(4869);function i(e){var t={};return(0,n.rW)(e,(function(e,a){t[e]=a,t[a]=e})),(0,n._A)(t)}},8452:(e,t,a)=>{"use strict";a.d(t,{h:()=>n});var n=(0,a(951).By)({Unknown:0,NonRetryableStatus:1,InvalidEvent:2,SizeLimitExceeded:3,KillSwitch:4,QueueFull:5})},7951:(e,t,a)=>{"use strict";a.d(t,{i:()=>c});var n=a(9141),i=a(8145),o=a(4869),r=a(6335),s=a(1030),p=a(8593),c=function(){function e(){var t,a,c,l,u,d=this;function m(e){void 0===e&&(e=null);var t=e;if(!t){var n=a||(0,s.CD)(null,{},d[r.oV]);t=c&&c.getPlugin?n[i.zV](null,c.getPlugin):n[i.zV](null,c)}return t}function h(e,t,n){e&&(0,o.sO)(e,r.Zh,[],null,o.le),!n&&t&&(n=t[i.SD]()[i.W2]());var p=c;c&&c.getPlugin&&(p=c.getPlugin()),d[r.oV]=t,a=(0,s.CD)(n,e,t,p)}function f(){t=!1,d[r.oV]=null,a=null,c=null,u=[],l=(0,p.Y)()}f(),(0,n.Z)(e,d,(function(e){e[i.VL]=function(e,a,n,i){h(e,a,i),t=!0},e[i.fi]=function(t,a){var n,p=e[r.oV];if(p&&(!t||p===t[r.oV]())){var d,m=!1,h=t||(0,s.Bt)(null,p,c&&c.getPlugin?c.getPlugin():c),v=a||((n={reason:0})[i.d]=!1,n);return e[i.F3]&&!0===e[i.F3](h,v,g)?d=!0:g(),d}function g(){if(!m){m=!0,l.run(h,a);var e=u;u=[],(0,o.tO)(e,(function(e){e.rm()})),!0===d&&h[i.uL](v),f()}}},e[i.Tu]=function(t,a){var n=e[r.oV];if(n&&(!t||n===t[r.oV]())){var o,p=!1,l=t||(0,s.xy)(null,n,c&&c.getPlugin?c.getPlugin():c),u=a||{reason:0};return e._doUpdate&&!0===e._doUpdate(l,u,d)?o=!0:d(),o}function d(){p||(p=!0,h(l.getCfg(),l.core(),l[i.W2]()))}},e._addHook=function(e){e&&((0,o.kJ)(e)?u=u.concat(e):u[i.MW](e))},(0,o.Oi)(e,"_addUnloadCb",(function(){return l}),"add")})),d[i.mc]=function(e){return m(e)[i.mc]()},d[i.yl]=function(){return t},d.setInitialized=function(e){t=e},d[i.Jd]=function(e){c=e},d[i.uL]=function(e,t){t?t[i.uL](e):c&&(0,o.mf)(c[r.hL])&&c[r.hL](e,null)},d._getTelCtx=m}return e.__ieDyn=1,e}()},8140:(e,t,a)=>{"use strict";a.d(t,{kj:()=>v,JP:()=>b,Nz:()=>w,p7:()=>_,UY:()=>j});var n=a(8145),i=a(9339),o=a(9251),r=a(4869),s=a(6335),p="toGMTString",c="toUTCString",l=null,u=null,d=null,m=(0,o.Me)(),h={},f={};function v(e,t){var a=w._ckMgr||f._ckMgr;return a||(a=w._ckMgr=w(e,t),f._ckMgr=a),a}function g(e){return!e||e.isEnabled()}function y(e,t){return!!(t&&e&&(0,r.kJ)(e.ignoreCookies))&&-1!==e.ignoreCookies[n.ou](t)}function b(e,t){var a;if(e)a=e.getCookieMgr();else if(t){var i=t[n.Lk];a=i._ckMgr?i._ckMgr:w(t)}return a||(a=v(t,(e||{})[n.eZ])),a}function w(e,t){var a,i=function(e){var t=e[n.Lk]=e[n.Lk]||{};if((0,r.sO)(t,"domain",e.cookieDomain,r.BX,r.le),(0,r.sO)(t,"path",e.cookiePath||"/",null,r.le),(0,r.le)(t.enabled)){var a=void 0;(0,r.o8)(e.isCookieUseDisabled)||(a=!e.isCookieUseDisabled),(0,r.o8)(e.disableCookiesUsage)||(a=!e.disableCookiesUsage),t.enabled=a}return t}(e||f),l=i.path||"/",d=i.domain,m=!1!==i.enabled,h=((a={isEnabled:function(){var e=m&&_(t),a=f._ckMgr;return e&&a&&h!==a&&(e=g(a)),e}})[n.$h]=function(e){m=!1!==e},a.set=function(e,t,a,m,f){var v=!1;if(g(h)&&!function(e,t){return!!(t&&e&&(0,r.kJ)(e.blockedCookies)&&-1!==e.blockedCookies[n.ou](t))||y(e,t)}(i,e)){var b={},w=(0,r.nd)(t||s.qS),_=w[n.ou](";");if(-1!==_&&(w=(0,r.nd)(t[n.zc](0,_)),b=x(t[n.zc](_+1))),(0,r.sO)(b,"domain",m||d,r.fQ,r.o8),!(0,r.le)(a)){var T=(0,o.w1)();if((0,r.o8)(b.expires)){var C=(0,r.m6)()+1e3*a;if(C>0){var A=new Date;A.setTime(C),(0,r.sO)(b,"expires",k(A,T?p:c)||k(A,T?p:c)||s.qS,r.fQ)}}T||(0,r.sO)(b,"max-age",s.qS+a,null,r.o8)}var I=(0,o.k$)();I&&"https:"===I.protocol&&((0,r.sO)(b,"secure",null,null,r.o8),null===u&&(u=!j(((0,o.jW)()||{})[n.qV])),u&&(0,r.sO)(b,"SameSite","None",null,r.o8)),(0,r.sO)(b,"path",f||l,null,r.o8),(i.setCookie||S)(e,E(w,b)),v=!0}return v},a.get=function(e){var t=s.qS;return g(h)&&!y(i,e)&&(t=(i.getCookie||T)(e)),t},a.del=function(e,t){var a=!1;return g(h)&&(a=h.purge(e,t)),a},a.purge=function(e,a){var n,r=!1;if(_(t)){var p=((n={}).path=a||"/",n.expires="Thu, 01 Jan 1970 00:00:01 GMT",n);(0,o.w1)()||(p["max-age"]="0"),(i.delCookie||S)(e,E(s.qS,p)),r=!0}return r},a);return h._ckMgr=h,h}function _(e){if(null===l){l=!1;try{l=void 0!==(m||{}).cookie}catch(t){(0,i.kP)(e,2,68,"Cannot access document.cookie - "+(0,r.jj)(t),{exception:(0,o.eU)(t)})}}return l}function x(e){var t={};if(e&&e[n.R5]){var a=(0,r.nd)(e)[n.w6](";");(0,r.tO)(a,(function(e){if(e=(0,r.nd)(e||s.qS)){var a=e[n.ou]("=");-1===a?t[e]=null:t[(0,r.nd)(e[n.zc](0,a))]=(0,r.nd)(e[n.zc](a+1))}}))}return t}function k(e,t){return(0,r.mf)(e[t])?e[t]():null}function E(e,t){var a=e||s.qS;return(0,r.rW)(t,(function(e,t){a+="; "+e+((0,r.le)(t)?s.qS:"="+t)})),a}function T(e){var t=s.qS;if(m){var a=m.cookie||s.qS;d!==a&&(h=x(a),d=a),t=(0,r.nd)(h[e]||s.qS)}return t}function S(e,t){m&&(m.cookie=e+"="+t)}function j(e){return!(!(0,r.HD)(e)||!(0,r._Q)(e,"CPU iPhone OS 12")&&!(0,r._Q)(e,"iPad; CPU OS 12")&&!((0,r._Q)(e,"Macintosh; Intel Mac OS X 10_14")&&(0,r._Q)(e,"Version/")&&(0,r._Q)(e,"Safari"))&&(!(0,r._Q)(e,"Macintosh; Intel Mac OS X 10_14")||!(0,r.Id)(e,"AppleWebKit/605.1.15 (KHTML, like Gecko)"))&&!(0,r._Q)(e,"Chrome/5")&&!(0,r._Q)(e,"Chrome/6")&&(!(0,r._Q)(e,"UnrealEngine")||(0,r._Q)(e,"Chrome"))&&!(0,r._Q)(e,"UCBrowser/12")&&!(0,r._Q)(e,"UCBrowser/11"))}},8956:(e,t,a)=>{"use strict";a.d(t,{GW:()=>m,Jj:()=>h,DO:()=>f,zB:()=>g});var n,i=a(175),o=a(8145),r=a(8140),s=a(9251),p=a(7954),c=a(4869),l=a(6335),u=a(9406),d=null;function m(){var e=f();return e[o.zc](0,8)+"-"+e[o.zc](8,12)+"-"+e[o.zc](12,16)+"-"+e[o.zc](16,20)+"-"+e[o.zc](20)}function h(){var e=(0,s.r)();return e&&e.now?e.now():(0,c.m6)()}function f(){for(var e,t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],a=l.qS,n=0;n<4;n++)a+=t[15&(e=(0,u._l)())]+t[e>>4&15]+t[e>>8&15]+t[e>>12&15]+t[e>>16&15]+t[e>>20&15]+t[e>>24&15]+t[e>>28&15];var i=t[8+(3&(0,u._l)())|0];return a[o.Jn](0,8)+a[o.Jn](9,4)+"4"+a[o.Jn](13,3)+i+a[o.Jn](16,3)+a[o.Jn](19,12)}var v={_canUseCookies:void 0,isTypeof:c.Ym,isUndefined:c.o8,isNullOrUndefined:c.le,hasOwnProperty:c.nr,isFunction:c.mf,isObject:c.Kn,isDate:c.J_,isArray:c.kJ,isError:c.VZ,isString:c.HD,isNumber:c.hj,isBoolean:c.jn,toISOString:c.Y6,arrForEach:c.tO,arrIndexOf:c.UA,arrMap:c.Mr,arrReduce:c.Xz,strTrim:c.nd,objCreate:i.pu,objKeys:c.FY,objDefineAccessors:c.l_,addEventHandler:p.Ib,dateNow:c.m6,isIE:s.w1,disableCookies:function(){var e,t,a,i;(a=(0,r.kj)(e,t),i=v._canUseCookies,null===d&&(d=[],n=i,(0,c.l_)(v,"_canUseCookies",(function(){return n}),(function(e){n=e,(0,c.tO)(d,(function(t){t[o.$h](e)}))}))),-1===(0,c.UA)(d,a)&&d[o.MW](a),(0,c.jn)(i)&&a[o.$h](i),(0,c.jn)(n)&&a[o.$h](n),a)[o.$h](!1)},newGuid:m,perfNow:h,newId:u.pZ,randomValue:u.az,random32:u._l,mwcRandomSeed:u.CN,mwcRandom32:u.F6,generateW3CId:f},g={Attach:p.pZ,AttachEvent:p.pZ,Detach:p.pD,DetachEvent:p.pD}},7624:(e,t,a)=>{"use strict";a.d(t,{J:()=>d,K:()=>m});var n=a(1550),i=a(8145),o=a(4869),r=a(6335),s=a(9406),p=n.RJ,c="."+(0,s.pZ)(6),l=0;function u(e){return 1===e[i.xv]||9===e[i.xv]||!+e[i.xv]}function d(e,t){return void 0===t&&(t=!1),(0,o.Gf)(e+l+++(t?".2.8.9":r.qS)+c)}function m(e){var t={id:d("_aiData-"+(e||r.qS)+".2.8.9"),accept:function(e){return u(e)},get:function(e,a,n,i){var r=e[t.id];return r?r[(0,o.Gf)(a)]:(i&&((r=function(e,t){var a=t[e.id];if(!a){a={};try{u(t)&&(function(e,t,a){if(p)try{return p(e,t,{value:a,enumerable:!1,configurable:!0}),!0}catch(e){}return!1}(t,e.id,a)||(t[e.id]=a))}catch(e){}}return a}(t,e))[(0,o.Gf)(a)]=n),n)},kill:function(e,t){if(e&&e[t])try{delete e[t]}catch(e){}}};return t}},8341:(e,t,a)=>{"use strict";a.d(t,{j:()=>c,p:()=>l});var n,i=a(8145),o=a(9251),r=["eventsSent","eventsDiscarded","eventsSendRequest","perfEvent"],s=null;function p(e,t){return function(){var a=arguments,n=c(t);if(n){var o=n.listener;o&&o[e]&&o[e][i.ZV](o,a)}}}function c(e){var t,a=s;return a||!0===e.disableDbgExt||(a=s||((t=(0,o.a8)("Microsoft"))&&(s=t.ApplicationInsights),s)),a?a.ChromeDbgExt:null}function l(e){if(!n){n={};for(var t=0;t{"use strict";a.d(t,{lQ:()=>u,vH:()=>d,AQ:()=>m,kP:()=>f,jV:()=>v,L4:()=>g});var n=a(9141),i=a(8145),o=a(8341),r=a(9251),s=a(4869),p=a(6335);function c(e){return e?'"'+e[i.i7](/\"/g,p.qS)+'"':p.qS}function l(e,t){var a=(0,r.dr)();if(a){var n="log";a[e]&&(n=e),(0,s.mf)(a[n])&&a[n](t)}}var u=function(){function e(e,t,a,n){void 0===a&&(a=!1);var o=this;o[i.Gc]=e,o[i.gU]=(a?"AI: ":"AI (Internal): ")+e;var s=p.qS;(0,r.nS)()&&(s=(0,r.xA)().stringify(n));var l=(t?" message:"+c(t):p.qS)+(n?" props:"+c(s):p.qS);o[i.gU]+=l}return e.dataType="MessageData",e}();function d(e,t){return(e||{})[i.eZ]||new m(t)}var m=function(){function e(t){this.identifier="DiagnosticLogger",this.queue=[];var a,c,d,m,h=0,f={};(0,n.Z)(e,this,(function(e){function n(t,a){if(!(h>=d)){var n=!0,o="AITR_"+a[i.Gc];if(f[o]?n=!1:f[o]=!0,n&&(t<=c&&(e.queue[i.MW](a),h++,v(1===t?"error":"warn",a)),h===d)){var r="Internal events throttle limit per PageView reached for this app.",s=new u(23,r,!1);e.queue[i.MW](s),1===t?e[p.ys](r):e[p.cL](r)}}}function v(e,a){var n=(0,o.j)(t||{});n&&n[i.mc]&&n[i.mc](e,a)}!function(e){a=(0,s.v4)(e.loggingLevelConsole,0),c=(0,s.v4)(e.loggingLevelTelemetry,1),d=(0,s.v4)(e.maxMessageLimit,25),m=(0,s.v4)(e[i.Fr],!1)}(t||{}),e.consoleLoggingLevel=function(){return a},e.telemetryLoggingLevel=function(){return c},e.maxInternalMessageLimit=function(){return d},e[i.Fr]=function(){return m},e.throwInternal=function(t,o,c,l,d){void 0===d&&(d=!1);var h=new u(o,c,d,l);if(m)throw(0,r.eU)(h);var g=1===t?p.ys:p.cL;if((0,s.o8)(h[i.gU]))v("throw"+(1===t?"Critical":"Warning"),h);else{if(d){var y=+h[i.Gc];!f[y]&&a>=t&&(e[g](h[i.gU]),f[y]=!0)}else a>=t&&e[g](h[i.gU]);n(t,h)}},e[p.cL]=function(e){l("warn",e),v("warning",e)},e[p.ys]=function(e){l("error",e),v("error",e)},e.resetInternalMessageCount=function(){h=0,f={}},e[i.jk]=n}))}return e.__ieDyn=1,e}();function h(e){return e||new m}function f(e,t,a,n,i,o){void 0===o&&(o=!1),h(e).throwInternal(t,a,n,i,o)}function v(e,t){h(e)[p.cL](t)}function g(e,t,a){h(e)[i.jk](t,a)}},9251:(e,t,a)=>{"use strict";a.d(t,{dI:()=>b,a8:()=>w,Ym:()=>_,Jj:()=>x,Nv:()=>k,Me:()=>E,d6:()=>T,jW:()=>S,fE:()=>j,s1:()=>C,k$:()=>A,dr:()=>I,r:()=>N,nS:()=>O,xA:()=>D,MX:()=>P,gz:()=>R,b$:()=>L,w1:()=>M,sA:()=>z,eU:()=>U,MF:()=>V,JO:()=>q,cp:()=>F,Z3:()=>B,ed:()=>G,pI:()=>$});var n=a(1550),i=a(175),o=a(8145),r=a(4869),s=a(6335),p="window",c="JSON",l="msie",u="trident/",d="XMLHttpRequest",m=null,h=null,f=!1,v=null,g=null;function y(e,t){var a=!1;if(e){try{if(!(a=t in e)){var i=e[n.hB];i&&(a=t in i)}}catch(e){}if(!a)try{var o=new e;a=!(0,r.o8)(o[t])}catch(e){}}return a}function b(e){f=e}function w(e){var t=(0,i.Rd)();return t&&t[e]?t[e]:e===p&&_()?window:null}function _(){return Boolean(typeof window===n.fK&&window)}function x(){return _()?window:w(p)}function k(){return Boolean(typeof document===n.fK&&document)}function E(){return k()?document:w("document")}function T(){return Boolean(typeof navigator===n.fK&&navigator)}function S(){return T()?navigator:w("navigator")}function j(){return Boolean(typeof history===n.fK&&history)}function C(){return j()?history:w("history")}function A(e){if(e&&f){var t=w("__mockLocation");if(t)return t}return typeof location===n.fK&&location?location:w("location")}function I(){return typeof console!==n.jA?console:w("console")}function N(){return w("performance")}function O(){return Boolean(typeof JSON===n.fK&&JSON||null!==w(c))}function D(){return O()?JSON||w(c):null}function P(){return w("crypto")}function R(){return w("msCrypto")}function L(){var e=S();return!(!e||!e.product)&&"ReactNative"===e.product}function M(){var e=S();if(e&&(e[o.qV]!==h||null===m)){var t=((h=e[o.qV])||s.qS)[o.T1]();m=(0,r._Q)(t,l)||(0,r._Q)(t,u)}return m}function z(e){if(void 0===e&&(e=null),!e){var t=S()||{};e=t?(t[o.qV]||s.qS)[o.T1]():s.qS}var a=(e||s.qS)[o.T1]();if((0,r._Q)(a,l)){var n=E()||{};return Math.max(parseInt(a[o.w6](l)[1]),n.documentMode||0)}if((0,r._Q)(a,u)){var i=parseInt(a[o.w6](u)[1]);if(i)return i+4}return null}function U(e){var t=Object[n.hB].toString[o._S](e),a=s.qS;return"[object Error]"===t?a="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e[o.I]+"'":O()&&(a=D().stringify(e)),t+a}function V(){return null===g&&(g=T()&&Boolean(S().sendBeacon)),g}function q(e){var t=!1;try{t=!!w("fetch");var a=w("Request");t&&e&&a&&(t=y(a,"keepalive"))}catch(e){}return t}function F(){return null===v&&(v=typeof XDomainRequest!==n.jA)&&B()&&(v=v&&!y(w(d),"withCredentials")),v}function B(){var e=!1;try{e=!!w(d)}catch(e){}return e}function H(e,t){if(e)for(var a=0;a0?n[0]:{}).serverTiming,e).description}return t}},7954:(e,t,a)=>{"use strict";a.d(t,{um:()=>k,jU:()=>j,XO:()=>C,QY:()=>A,pZ:()=>I,pD:()=>N,Ib:()=>O,C1:()=>D,yw:()=>R,nJ:()=>L,c9:()=>M,JA:()=>z,TJ:()=>U,C9:()=>V,nD:()=>q,Yl:()=>F});var n=a(8145),i=a(7624),o=a(9251),r=a(4869),s=a(6335),p="events",c="visibilitychange",l="pagehide",u="pageshow",d="unload",m="beforeunload",h=(0,i.J)("aiEvtPageHide"),f=(0,i.J)("aiEvtPageShow"),v=/\.[\.]+/g,g=/[\.]+$/,y=1,b=(0,i.K)("events"),w=/^([^.]*)(?:\.(.+)|)/;function _(e){return e&&e[n.i7]?e[n.i7](/^[\s\.]+|(?=[\s\.])[\.\s]+$/g,s.qS):e}function x(e,t){var a;if(t){var i=s.qS;(0,r.kJ)(t)?(i=s.qS,(0,r.tO)(t,(function(e){(e=_(e))&&("."!==e[0]&&(e="."+e),i+=e)}))):i=_(t),i&&("."!==i[0]&&(i="."+i),e=(e||s.qS)+i)}var o=w.exec(e||s.qS)||[];return(a={})[n.P6]=o[1],a.ns=(o[2]||s.qS).replace(v,".").replace(g,s.qS)[n.w6](".").sort().join("."),a}function k(e,t,a){var i=[],o=b.get(e,p,{},!1),c=x(t,a);return(0,r.rW)(o,(function(e,t){(0,r.tO)(t,(function(e){var t;c[n.P6]&&c[n.P6]!==e.evtName[n.P6]||c.ns&&c.ns!=c.ns||i[n.MW](((t={})[n.I]=e.evtName[n.P6]+(e.evtName.ns?"."+e.evtName.ns:s.qS),t.handler=e[n.Kn],t))}))})),i}function E(e,t,a){void 0===a&&(a=!0);var n=b.get(e,p,{},a),i=n[t];return i||(i=n[t]=[]),i}function T(e,t,a,i){e&&t&&t[n.P6]&&(e.removeEventListener?e.removeEventListener(t[n.P6],a,i):e.detachEvent&&e.detachEvent("on"+t[n.P6],a))}function S(e,t,a,i){for(var o=t[n.R5];o--;){var r=t[o];r&&(a.ns&&a.ns!==r.evtName.ns||i&&!i(r)||(T(e,r.evtName,r[n.Kn],r.capture),t[n.cb](o,1)))}}function j(e,t){return t?x("xx",(0,r.kJ)(t)?[e].concat(t):[e,t]).ns[n.w6]("."):e}function C(e,t,a,i,o){var r;void 0===o&&(o=!1);var s=!1;if(e)try{var p=x(t,i);if((s=function(e,t,a,i){var o=!1;return e&&t&&t[n.P6]&&a&&(e.addEventListener?(e.addEventListener(t[n.P6],a,i),o=!0):e.attachEvent&&(e.attachEvent("on"+t[n.P6],a),o=!0)),o}(e,p,a,o))&&b.accept(e)){var c=((r={guid:y++,evtName:p})[n.Kn]=a,r.capture=o,r);E(e,p.type)[n.MW](c)}}catch(e){}return s}function A(e,t,a,i,o){if(void 0===o&&(o=!1),e)try{var s=x(t,i),c=!1;!function(e,t,a){if(t[n.P6])S(e,E(e,t[n.P6]),t,a);else{var i=b.get(e,p,{});(0,r.rW)(i,(function(n,i){S(e,i,t,a)})),0===(0,r.FY)(i)[n.R5]&&b.kill(e,p)}}(e,s,(function(e){return!((!s.ns||a)&&e[n.Kn]!==a||(c=!0,0))})),c||T(e,s,a,o)}catch(e){}}function I(e,t,a,n){return void 0===n&&(n=!1),C(e,t,a,null,n)}function N(e,t,a,n){void 0===n&&(n=!1),A(e,t,a,null,n)}function O(e,t,a){var n=!1,i=(0,o.Jj)();i&&(n=C(i,e,t,a),n=C(i.body,e,t,a)||n);var r=(0,o.Me)();return r&&(n=C(r,e,t,a)||n),n}function D(e,t,a){var n=(0,o.Jj)();n&&(A(n,e,t,a),A(n.body,e,t,a));var i=(0,o.Me)();i&&A(i,e,t,a)}function P(e,t,a,i){var o=!1;return t&&e&&e[n.R5]>0&&(0,r.tO)(e,(function(e){e&&(a&&-1!==(0,r.UA)(a,e)||(o=O(e,t,i)||o))})),o}function R(e,t,a,i){var o=!1;return t&&e&&(0,r.kJ)(e)&&!(o=P(e,t,a,i))&&a&&a[n.R5]>0&&(o=P(e,t,null,i)),o}function L(e,t,a){e&&(0,r.kJ)(e)&&(0,r.tO)(e,(function(e){e&&D(e,t,a)}))}function M(e,t,a){return R([m,d,l],e,t,a)}function z(e,t){L([m,d,l],e,t)}function U(e,t,a){var n=j(h,a),i=P([l],e,t,n);return t&&-1!==(0,r.UA)(t,c)||(i=P([c],(function(t){var a=(0,o.Me)();e&&a&&"hidden"===a.visibilityState&&e(t)}),t,n)||i),!i&&t&&(i=U(e,null,a)),i}function V(e,t){var a=j(h,t);L([l],e,a),L([c],null,a)}function q(e,t,a){var n=j(f,a),i=P([u],e,t,n);return!(i=P([c],(function(t){var a=(0,o.Me)();e&&a&&"visible"===a.visibilityState&&e(t)}),t,n)||i)&&t&&(i=q(e,null,a)),i}function F(e,t){var a=j(f,t);L([u],e,a),L([c],null,a)}},4869:(e,t,a)=>{"use strict";a.d(t,{Ym:()=>E,o8:()=>T,le:()=>S,BX:()=>j,nr:()=>C,Kn:()=>A,mf:()=>I,Gf:()=>N,rW:()=>O,Id:()=>D,xe:()=>P,_Q:()=>R,J_:()=>L,kJ:()=>M,VZ:()=>z,HD:()=>U,hj:()=>V,jn:()=>q,Y6:()=>B,tO:()=>H,UA:()=>G,Mr:()=>$,Xz:()=>K,nd:()=>W,FY:()=>X,l_:()=>J,_A:()=>ee,FL:()=>te,Xi:()=>ae,m6:()=>ne,jj:()=>ie,sO:()=>oe,qK:()=>re,v4:()=>se,F:()=>pe,fQ:()=>ce,_y:()=>le,cf:()=>de,Oi:()=>me,Vb:()=>he,Ax:()=>fe,mm:()=>ve});var n=a(1550),i=a(175),o=a(8145),r=a(6335),s=n.RJ,p=n.Pw.freeze,c=n.Pw.seal,l=n.Pw.keys,u=String[n.hB],d=u.trim,m=u.endsWith,h=u.startsWith,f=Date[n.hB].toISOString,v=Array.isArray,g=n.V4.toString,y=n.CY.toString,b=y[o._S](n.Pw),w=/-([a-z])/g,_=/([^\w\d_$])/g,x=/^(\d+[\w\d_$])/,k=Object.getPrototypeOf;function E(e,t){return typeof e===t}function T(e){return void 0===e||typeof e===n.jA}function S(e){return null===e||T(e)}function j(e){return!S(e)}function C(e,t){return!(!e||!n.CY[o._S](e,t))}function A(e){return!(!e||typeof e!==n.fK)}function I(e){return!(!e||typeof e!==n.cb)}function N(e){var t=e;return t&&U(t)&&(t=(t=(t=t[o.i7](w,(function(e,t){return t.toUpperCase()})))[o.i7](_,"_"))[o.i7](x,(function(e,t){return"_"+t}))),t}function O(e,t){if(e)for(var a in e)n.CY[o._S](e,a)&&t[o._S](e,a,e[a])}function D(e,t){var a=!1;return e&&t&&!(a=e===t)&&(a=m?e.endsWith(t):function(e,t){var a=!1,n=t?t[o.R5]:0,i=e?e[o.R5]:0;if(n&&i&&i>=n&&!(a=e===t)){for(var r=i-1,s=n-1;s>=0;s--){if(e[r]!=t[s])return!1;r--}a=!0}return a}(e,t)),a}function P(e,t){var a=!1;return e&&t&&!(a=e===t)&&(a=h?e.startsWith(t):function(e,t){var a=!1,n=t?t[o.R5]:0;if(e&&n&&e[o.R5]>=n&&!(a=e===t)){for(var i=0;i=0?i:n-Math.abs(i),0);r=3)n=arguments[2];else{for(;r0&&q(c)&&(u=c,c=p[d]||{},d++),A(c)||(c={});d{"use strict";a.d(t,{qS:()=>n,Z:()=>i,oV:()=>o,DN:()=>r,mE:()=>s,Zh:()=>p,js:()=>c,hL:()=>l,yi:()=>u,uC:()=>d,$F:()=>m,f_:()=>h,C$:()=>f,ys:()=>v,cL:()=>g,kl:()=>y});var n="",i="channels",o="core",r="createPerfMgr",s="disabled",p="extensionConfig",c="extensions",l="processTelemetry",u="priority",d="eventsSent",m="eventsDiscarded",h="eventsSendRequest",f="perfEvent",v="errorToConsole",g="warnToConsole",y="getPerfMgr"},1782:(e,t,a)=>{"use strict";a.d(t,{zn:()=>s,Jk:()=>p,Lm:()=>l,j5:()=>u});var n=a(9141),i=a(8145),o=a(4869),r=a(6335),s=function(){function e(t,a,n){var r,s=this,p=!1;s.start=(0,o.m6)(),s[i.I]=t,s[i.d]=n,s[i.PL]=function(){return!1},(0,o.mf)(a)&&(p=(0,o.l_)(s,"payload",(function(){return!r&&(0,o.mf)(a)&&(r=a(),a=null),r}))),s[i.T]=function(t){return t?t===e.ParentContextKey||t===e.ChildrenContextKey?s[t]:(s.ctx||{})[t]:null},s[i.wu]=function(t,a){t&&(t===e.ParentContextKey?(s[t]||(s[i.PL]=function(){return!0}),s[t]=a):t===e.ChildrenContextKey?s[t]=a:(s.ctx=s.ctx||{})[t]=a)},s[i.Km]=function(){var t=0,n=s[i.T](e.ChildrenContextKey);if((0,o.kJ)(n))for(var r=0;r{"use strict";a.d(t,{CD:()=>d,Bt:()=>m,xy:()=>h,jV:()=>f,Vi:()=>v});var n=a(8145),i=a(9339),o=a(9251),r=a(4869),s=a(6335),p=a(1782),c=a(9031),l=0;function u(e,t,a,p){var c=null,l=[];null!==p&&(c=p?function(e,t,a){for(;e;){if(e[n.TO]()===a)return e;e=e[n.W2]()}return f([a],t[n.TC]||{},t)}(e,a,p):e);var u={_next:function(){var e=c;if(c=e?e[n.W2]():null,!e){var t=l;t&&t[n.R5]>0&&((0,r.tO)(t,(function(e){try{e.func[n._S](e.self,e.args)}catch(e){(0,i.kP)(a[n.eZ],2,73,"Unexpected Exception during onComplete - "+(0,o.eU)(e))}})),l=[])}return e},ctx:{core:function(){return a},diagLog:function(){return(0,i.vH)(a,t)},getCfg:function(){return t},getExtCfg:d,getConfig:function(e,a,n){void 0===n&&(n=!1);var i,o=d(e,null);return o&&!(0,r.le)(o[a])?i=o[a]:t&&!(0,r.le)(t[a])&&(i=t[a]),(0,r.le)(i)?n:i},hasNext:function(){return!!c},getNext:function(){return c},setNext:function(e){c=e},iterate:function(e){for(var t;t=u._next();){var a=t[n.TO]();a&&e(a)}},onComplete:function(e,t){for(var a=[],i=2;i0){var v=null;(0,r.tO)(e,(function(e){if(h||u!==e||(h=!0),h&&e&&(0,r.mf)(e[s.hL])){var f=function(e,t,a){var u,m=null,h=(0,r.mf)(e[s.hL]),f=(0,r.mf)(e[n.Jd]),v={getPlugin:function(){return e},getNext:function(){return m},processTelemetry:function(i,o){g(o=o||function(){var n;return e&&(0,r.mf)(e._getTelCtx)&&(n=e._getTelCtx()),n||(n=d(v,t,a)),n}(),(function(t){if(!e||!h)return!1;var a=(0,c.OY)(e);return!a[n.fi]&&!a[s.mE]&&(f&&e[n.Jd](m),e[s.hL](i,t),!0)}),"processTelemetry",(function(){return{item:i}}),!i.sync)||o[n.uL](i)},unload:function(t,a){g(t,(function(){var i=!1;if(e){var o=(0,c.OY)(e),r=e[s.oV]||o[s.oV];!e||r&&r!==t.core()||o[n.fi]||(o[s.oV]=null,o[n.fi]=!0,o[n.yl]=!1,e[n.fi]&&!0===e[n.fi](t,a)&&(i=!0))}return i}),"unload",(function(){}),a[n.d])||t[n.uL](a)},update:function(t,a){g(t,(function(){var i=!1;if(e){var o=(0,c.OY)(e),r=e[s.oV]||o[s.oV];!e||r&&r!==t.core()||o[n.fi]||e[n.Tu]&&!0===e[n.Tu](t,a)&&(i=!0)}return i}),"update",(function(){}),!1)||t[n.uL](a)},_id:u=e?e[n.pZ]+"-"+e[s.yi]+"-"+l++:"Unknown-0-"+l++,_setNext:function(e){m=e}};function g(t,a,r,c,l){var d=!1,h=e?e[n.pZ]:"TelemetryPluginChain",f=t._hasRun;return f||(f=t._hasRun={}),t.setNext(m),e&&(0,p.Lm)(t[s.oV](),(function(){return h+":"+r}),(function(){f[u]=!0;try{var e=m?m._id:s.qS;e&&(f[e]=!1),d=a(t)}catch(e){var p=!m||f[m._id];p&&(d=!0),m&&p||(0,i.kP)(t[n.mc](),1,73,"Plugin ["+h+"] failed during "+r+" - "+(0,o.eU)(e)+", run flags: "+(0,o.eU)(f))}}),c,l),d}return(0,r.FL)(v)}(e,t,a);m||(m=f),v&&v._setNext(f),v=f}}))}return u&&!m?f([u],t,a):m}var v=function(e,t,a,n){var i=d(e,t,a,n);(0,r.Vb)(this,i,(0,r.FY)(i))}},9406:(e,t,a)=>{"use strict";a.d(t,{az:()=>h,_l:()=>f,CN:()=>v,F6:()=>g,pZ:()=>y});var n=a(8145),i=a(9251),o=a(4869),r=a(6335),s=4294967296,p=4294967295,c=!1,l=123456789,u=987654321;function d(e){e<0&&(e>>>=0),l=123456789+e&p,u=987654321-e&p,c=!0}function m(){try{var e=2147483647&(0,o.m6)();d((Math.random()*s^e)+e)}catch(e){}}function h(e){return e>0?Math.floor(f()/p*(e+1))>>>0:0}function f(e){var t=0,a=(0,i.MX)()||(0,i.gz)();return a&&a.getRandomValues&&(t=a.getRandomValues(new Uint32Array(1))[0]&p),0===t&&(0,i.w1)()&&(c||m(),t=g()&p),0===t&&(t=Math.floor(s*Math.random()|0)),e||(t>>>=0),t}function v(e){e?d(e):m()}function g(e){var t=((u=36969*(65535&u)+(u>>16)&p)<<16)+(65535&(l=18e3*(65535&l)+(l>>16)&p))>>>0&p|0;return e||(t>>>=0),t}function y(e){void 0===e&&(e=22);for(var t=f()>>>0,a=0,i=r.qS;i[n.R5]>>=6,5===a&&(t=(f()<<2&4294967295|3&t)>>>0,a=0);return i}},9031:(e,t,a)=>{"use strict";a.d(t,{OY:()=>c,bP:()=>l,AA:()=>u,Yn:()=>d});var n=a(8145),i=a(7624),o=a(4869),r=a(6335),s=a(6207),p=(0,i.K)("plugin");function c(e){return p.get(e,"state",{},!0)}function l(e,t){for(var a,i=[],s=null,p=e[n.W2]();p;){var l=p[n.TO]();l&&(s&&(0,o.mf)(s[n.Jd])&&(0,o.mf)(l[r.hL])&&s[n.Jd](l),((0,o.mf)(l[n.yl])?l[n.yl]():(a=c(l))[n.yl])||i[n.MW](l),s=l,p=p[n.W2]())}(0,o.tO)(i,(function(i){var o=e[r.oV]();i[n.VL](e.getCfg(),o,t,e[n.W2]()),a=c(i),i[r.oV]||a[r.oV]||(a[r.oV]=o),a[n.yl]=!0,delete a[n.fi]}))}function u(e){return e.sort((function(e,t){var a=0;if(t){var n=(0,o.mf)(t[r.hL]);(0,o.mf)(e[r.hL])?a=n?e[r.yi]-t[r.yi]:1:n&&(a=-1)}else a=e?1:-1;return a}))}function d(e){var t={};return{getName:function(){return t[n.I]},setName:function(a){e&&e.setName(a),t[n.I]=a},getTraceId:function(){return t[n.nY]},setTraceId:function(a){e&&e.setTraceId(a),(0,s.jN)(a)&&(t[n.nY]=a)},getSpanId:function(){return t[n._d]},setSpanId:function(a){e&&e.setSpanId(a),(0,s.Lc)(a)&&(t[n._d]=a)},getTraceFlags:function(){return t[n.T0]},setTraceFlags:function(a){e&&e.setTraceFlags(a),t[n.T0]=a}}}},8593:(e,t,a)=>{"use strict";a.d(t,{Y:()=>s});var n=a(8145),i=a(9339),o=a(9251),r=a(4869);function s(){var e=[];return{add:function(t){t&&e[n.MW](t)},run:function(t,a){(0,r.tO)(e,(function(e){try{e(t,a)}catch(e){(0,i.kP)(t[n.mc](),2,73,"Unexpected error calling unload handler - "+(0,o.eU)(e))}})),e=[]}}}},6207:(e,t,a)=>{"use strict";a.d(t,{SU:()=>f,j_:()=>v,jN:()=>g,Lc:()=>y,J6:()=>b,Pn:()=>w,aR:()=>_,lq:()=>x});var n=a(8145),i=a(8956),o=a(9251),r=a(4869),s=/^([\da-f]{2})-([\da-f]{32})-([\da-f]{16})-([\da-f]{2})(-[^\s]*)?$/,p="00",c="ff",l="00000000000000000000000000000000",u="0000000000000000";function d(e,t,a){return!(!e||e[n.R5]!==t||e===a||!e.match(/^[\da-f]*$/))}function m(e,t,a){return d(e,t)?e:a}function h(e){(isNaN(e)||e<0||e>255)&&(e=1);for(var t=e.toString(16);t[n.R5]<2;)t="0"+t;return t}function f(e,t,a,o){var r;return(r={})[n.PA]=d(o,2,c)?o:p,r[n.nY]=g(e)?e:(0,i.DO)(),r.spanId=y(t)?t:(0,i.DO)()[n.Jn](0,16),r.traceFlags=a>=0&&a<=255?a:1,r}function v(e){var t;if(!e)return null;if((0,r.kJ)(e)&&(e=e[0]||""),!e||!(0,r.HD)(e)||e[n.R5]>8192)return null;var a=s.exec((0,r.nd)(e));return a&&a[1]!==c&&a[2]!==l&&a[3]!==u?((t={})[n.PA]=a[1],t[n.nY]=a[2],t[n._d]=a[3],t[n.T0]=parseInt(a[4],16),t):null}function g(e){return d(e,32,l)}function y(e){return d(e,16,u)}function b(e){return!!(e&&d(e[n.PA],2,c)&&d(e[n.nY],32,l)&&d(e[n._d],16,u)&&d(h(e[n.T0]),2))}function w(e){return!!b(e)&&1==(1&e[n.T0])}function _(e){if(e){var t=h(e[n.T0]);d(t,2)||(t="01");var a=e[n.PA]||p;return"00"!==a&&"ff"!==a&&(a=p),"".concat(a,"-").concat(m(e.traceId,32,l),"-").concat(m(e.spanId,16,u),"-").concat(t)}return""}function x(){var e="traceparent",t=v((0,o.ed)(e));return t||(t=v((0,o.pI)(e))),t}},8145:(e,t,a)=>{"use strict";a.d(t,{VL:()=>n,I:()=>i,tb:()=>o,pZ:()=>r,MW:()=>s,yl:()=>p,TC:()=>c,p$:()=>l,eZ:()=>u,R5:()=>d,Z_:()=>m,uL:()=>h,SD:()=>f,g:()=>v,n7:()=>g,LS:()=>y,Fc:()=>b,TO:()=>w,kL:()=>_,iC:()=>x,cb:()=>k,fi:()=>E,Gc:()=>T,gU:()=>S,d:()=>j,F3:()=>C,Tu:()=>A,W2:()=>I,mc:()=>N,Jd:()=>O,zV:()=>D,Lk:()=>P,ou:()=>R,zc:()=>L,qV:()=>M,w6:()=>z,$h:()=>U,Jn:()=>V,xv:()=>q,ZV:()=>F,i7:()=>B,Fr:()=>H,jk:()=>G,T1:()=>$,_S:()=>K,P6:()=>W,Kn:()=>Y,dE:()=>Q,PL:()=>X,T:()=>J,wu:()=>Z,Km:()=>ee,nY:()=>te,_d:()=>ae,T0:()=>ne,PA:()=>ie});var n="initialize",i="name",o="getNotifyMgr",r="identifier",s="push",p="isInitialized",c="config",l="instrumentationKey",u="logger",d="length",m="time",h="processNext",f="getProcessTelContext",v="addNotificationListener",g="removeNotificationListener",y="stopPollingInternalLogs",b="onComplete",w="getPlugin",_="flush",x="_extensions",k="splice",E="teardown",T="messageId",S="message",j="isAsync",C="_doTeardown",A="update",I="getNext",N="diagLog",O="setNextPlugin",D="createNew",P="cookieCfg",R="indexOf",L="substring",M="userAgent",z="split",U="setEnabled",V="substr",q="nodeType",F="apply",B="replace",H="enableDebugExceptions",G="logInternalMessage",$="toLowerCase",K="call",W="type",Y="handler",Q="listeners",X="isChildEvt",J="getCtx",Z="setCtx",ee="complete",te="traceId",ae="spanId",ne="traceFlags",ie="version"},1550:(e,t,a)=>{"use strict";a.d(t,{cb:()=>n,fK:()=>i,jA:()=>o,hB:()=>r,bO:()=>s,Pw:()=>p,V4:()=>c,rl:()=>l,yu:()=>u,RJ:()=>d,CY:()=>m});var n="function",i="object",o="undefined",r="prototype",s="hasOwnProperty",p=Object,c=p[r],l=p.assign,u=p.create,d=p.defineProperty,m=c[s]},175:(e,t,a)=>{"use strict";a.d(t,{Rd:()=>o,ZU:()=>r,pu:()=>s});var n=a(1550),i=null;function o(e){void 0===e&&(e=!0);var t=!1===e?null:i;return t||(typeof globalThis!==n.jA&&(t=globalThis),t||typeof self===n.jA||(t=self),t||typeof window===n.jA||(t=window),t||typeof global===n.jA||(t=global),i=t),t}function r(e){throw new TypeError(e)}function s(e){var t=n.yu;if(t)return t(e);if(null==e)return{};var a=typeof e;function i(){}return a!==n.fK&&a!==n.cb&&r("Object prototype may only be an Object:"+e),i[n.hB]=e,new i}},7421:(e,t,a)=>{"use strict";a.d(t,{uc:()=>o,ne:()=>s,$h:()=>p});var n=a(1550),i=a(175),o=(((0,i.Rd)()||{}).Symbol,((0,i.Rd)()||{}).Reflect,n.rl||function(e){for(var t,a=1,i=arguments.length;a{"use strict";a.r(t),a.d(t,{webSnippet:()=>n});var n='!function(T,l,y){var S=T.location,k="script",D="instrumentationKey",C="ingestionendpoint",I="disableExceptionTracking",E="ai.device.",b="toLowerCase",w="crossOrigin",N="POST",e="appInsightsSDK",t=y.name||"appInsights";(y.name||T[e])&&(T[e]=t);var n=T[t]||function(d){var g=!1,f=!1,m={initialize:!0,queue:[],sv:"5",version:2,config:d};function v(e,t){var n={},a="Browser";return n[E+"id"]=a[b](),n[E+"type"]=a,n["ai.operation.name"]=S&&S.pathname||"_unknown_",n["ai.internal.sdkVersion"]="javascript:snippet_"+(m.sv||m.version),{time:function(){var e=new Date;function t(e){var t=""+e;return 1===t.length&&(t="0"+t),t}return e.getUTCFullYear()+"-"+t(1+e.getUTCMonth())+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+((e.getUTCMilliseconds()/1e3).toFixed(3)+"").slice(2,5)+"Z"}(),iKey:e,name:"Microsoft.ApplicationInsights."+e.replace(/-/g,"")+"."+t,sampleRate:100,tags:n,data:{baseData:{ver:2}}}}var h=d.url||y.src;if(h){function a(e){var t,n,a,i,r,o,s,c,u,p,l;g=!0,m.queue=[],f||(f=!0,t=h,s=function(){var e={},t=d.connectionString;if(t)for(var n=t.split(";"),a=0;a{"use strict";var n;a.d(t,{Z:()=>S});var i,o="undefined",r="prototype",s="function",p="_dynClass",c="_unknown_",l=Object,u=l.getPrototypeOf,d=l.getOwnPropertyNames,m=(typeof globalThis!==o&&(i=globalThis),i||typeof self===o||(i=self),i||typeof window===o||(i=window),i||typeof global===o||(i=global),i||{}),h=m.__dynProto$Gbl||(m.__dynProto$Gbl={o:(n={},n.setInstFuncs=!0,n.useBaseInst=!0,n),n:1e3});function f(e,t){return e&&l.prototype.hasOwnProperty.call(e,t)}function v(e){return e&&(e===l.prototype||e===Array.prototype)}function g(e){return v(e)||e===Function.prototype}function y(e){var t;if(e){if(u)return u(e);var a=e.__proto__||e.prototype||(e.constructor?e.constructor.prototype:null);t=e._dyn__proto__||a,f(e,"_dyn__proto__")||(delete e._dynInstProto,t=e._dyn__proto__=e._dynInstProto||e._dyn__proto__,e._dynInstProto=a)}return t}function b(e,t){var a=[];if(d)a=d(e);else for(var n in e)"string"==typeof n&&f(e,n)&&a.push(n);if(a&&a.length>0)for(var i=0;i=0;a--)if(e[a]===t)return!0;return!1}function k(e,t,a,n){var i=null;if(e&&f(a,p)){var o=e._dynInstFuncs||{};if((i=(o[a._dynClass]||{})[t])||_("Missing ["+t+"] "+s),!i._dynInstChk&&!1!==o._dynInstChk){for(var r=!f(e,t),c=y(e),l=[];r&&c&&!g(c)&&!x(l,c);){var u=c[t];if(u){r=u===n;break}l.push(c),c=y(c)}try{r&&(e[t]=i),i._dynInstChk=1}catch(e){o._dynInstChk=!1}}}return i}function E(e,t,a){var n=t[e];return n===a&&(n=y(t)[e]),typeof n!==s&&_("["+e+"] is not a "+s),n}function T(e,t){return f(e,r)?e.name||t||c:((e||{}).constructor||{}).name||t||c}function S(e,t,a,n){f(e,r)||_("theClass is an invalid class definition.");var i=e.prototype;(function(e,t){if(u){for(var a=[],n=y(t);n&&!g(n)&&!x(a,n);){if(n===e)return!0;a.push(n),n=y(n)}return!1}return!0})(i,t)||_("["+T(e)+"] not in hierarchy of ["+T(t)+"]");var o=null;f(i,p)?o=i._dynClass:(o="_dynCls$"+T(e,"_")+"$"+h.n,h.n++,i._dynClass=o);var s=S._dfOpts,c=!!s.useBaseInst;c&&n&&void 0!==n.useBaseInst&&(c=!!n.useBaseInst);var l=function(e){var t={};return b(e,(function(a){!t[a]&&w(e,a,!1)&&(t[a]=e[a])})),t}(t);a(t,function(e,t,a,n){function i(e,t,a){var i=t[a];if(i._isDynProxy&&n){var o=e._dynInstFuncs||{};!1!==o._dynInstChk&&(i=(o[t._dynClass]||{})[a]||i)}return function(){return i.apply(e,arguments)}}var o={};b(a,(function(e){o[e]=i(t,a,e)}));for(var r=y(e),s=[];r&&!g(r)&&!x(s,r);)b(r,(function(e){!o[e]&&w(r,e,!u)&&(o[e]=i(t,r,e))})),s.push(r),r=y(r);return o}(i,t,l,c));var d=!!u&&!!s.setInstFuncs;d&&n&&(d=!!n.setInstFuncs),function(e,t,a,n,i){if(!v(e)){var o=a._dynInstFuncs=a._dynInstFuncs||{},r=o[t]=o[t]||{};!1!==o._dynInstChk&&(o._dynInstChk=!!i),b(a,(function(t){w(a,t,!1)&&a[t]!==n[t]&&(r[t]=a[t],delete a[t],(!f(e,t)||e[t]&&!e[t]._isDynProxy)&&(e[t]=function(e,t){var a=function(){return(k(this,t,e,a)||E(t,e,a)).apply(this,arguments)};return a._isDynProxy=1,a}(e,t)))}))}}(i,o,t,l,!1!==d)}S._dfOpts=h.o},7150:(e,t,a)=>{"use strict";a.d(t,{c:()=>m});var n=a(5834),i=function(e,t){var a="function"==typeof Symbol&&e[Symbol.iterator];if(!a)return e;var n,i,o=a.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)r.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(a=o.return)&&a.call(o)}finally{if(i)throw i.error}}return r},o=function(e,t,a){if(a||2===arguments.length)for(var n,i=0,o=t.length;i0)&&!(n=o.next()).done;)r.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(a=o.return)&&a.call(o)}finally{if(i)throw i.error}}return r},l=function(e,t,a){if(a||2===arguments.length)for(var n,i=0,o=t.length;i{"use strict";a.d(t,{G:()=>c});var n=a(658),i=function(){function e(e){this._namespace=e.namespace||"DiagComponentLogger"}return e.prototype.debug=function(){for(var e=[],t=0;t0)&&!(n=o.next()).done;)r.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(a=o.return)&&a.call(o)}finally{if(i)throw i.error}}return r}(a),!1))}var r=a(6740),s=function(e,t){var a="function"==typeof Symbol&&e[Symbol.iterator];if(!a)return e;var n,i,o=a.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)r.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(a=o.return)&&a.call(o)}finally{if(i)throw i.error}}return r},p=function(e,t,a){if(a||2===arguments.length)for(var n,i=0,o=t.length;i=n?i.bind(t):function(){}}return er.n.ALL&&(e=r.n.ALL),t=t||{},{error:a("error",r.n.ERROR),warn:a("warn",r.n.WARN),info:a("info",r.n.INFO),debug:a("debug",r.n.DEBUG),verbose:a("verbose",r.n.VERBOSE)}}(null!==(o=a.logLevel)&&void 0!==o?o:r.n.INFO,e);if(c&&!a.suppressOverrideMessage){var u=null!==(s=(new Error).stack)&&void 0!==s?s:"";c.warn("Current logger will be overwritten from "+u),l.warn("Current logger will overwrite one already registered from "+u)}return(0,n.TG)("diag",l,t,!0)},t.disable=function(){(0,n.J_)("diag",t)},t.createComponentLogger=function(e){return new i(e)},t.verbose=e("verbose"),t.debug=e("debug"),t.info=e("info"),t.warn=e("warn"),t.error=e("error")}return e.instance=function(){return this._instance||(this._instance=new e),this._instance},e}()},2599:(e,t,a)=>{"use strict";a.d(t,{u:()=>c,H:()=>p});var n=a(5774),i=function(e){var t="function"==typeof Symbol&&Symbol.iterator,a=t&&e[t],n=0;if(a)return a.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=function(){function e(e){this._entries=e?new Map(e):new Map}return e.prototype.getEntry=function(e){var t=this._entries.get(e);if(t)return Object.assign({},t)},e.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map((function(e){var t=function(e,t){var a="function"==typeof Symbol&&e[Symbol.iterator];if(!a)return e;var n,i,o=a.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)r.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(a=o.return)&&a.call(o)}finally{if(i)throw i.error}}return r}(e,2);return[t[0],t[1]]}))},e.prototype.setEntry=function(t,a){var n=new e(this._entries);return n._entries.set(t,a),n},e.prototype.removeEntry=function(t){var a=new e(this._entries);return a._entries.delete(t),a},e.prototype.removeEntries=function(){for(var t,a,n=[],o=0;o{"use strict";a.d(t,{D:()=>n});var n=a(7150).c.getInstance()},5834:(e,t,a)=>{"use strict";function n(e){return Symbol.for(e)}a.d(t,{Y:()=>n,I:()=>i});var i=new function e(t){var a=this;a._currentContext=t?new Map(t):new Map,a.getValue=function(e){return a._currentContext.get(e)},a.setValue=function(t,n){var i=new e(a._currentContext);return i._currentContext.set(t,n),i},a.deleteValue=function(t){var n=new e(a._currentContext);return n._currentContext.delete(t),n}}},928:(e,t,a)=>{"use strict";a.d(t,{K:()=>n});var n=a(5774).G.instance()},6740:(e,t,a)=>{"use strict";var n;a.d(t,{n:()=>n}),function(e){e[e.NONE=0]="NONE",e[e.ERROR=30]="ERROR",e[e.WARN=50]="WARN",e[e.INFO=60]="INFO",e[e.DEBUG=70]="DEBUG",e[e.VERBOSE=80]="VERBOSE",e[e.ALL=9999]="ALL"}(n||(n={}))},4284:(e,t,a)=>{"use strict";a.r(t),a.d(t,{DiagConsoleLogger:()=>p,DiagLogLevel:()=>c.n,INVALID_SPANID:()=>q.fQ,INVALID_SPAN_CONTEXT:()=>q.Rr,INVALID_TRACEID:()=>q.AE,ProxyTracer:()=>A.T,ProxyTracerProvider:()=>I.K,ROOT_CONTEXT:()=>r.I,SamplingDecision:()=>N.U,SpanKind:()=>O.M,SpanStatusCode:()=>D.Q,TraceFlags:()=>P.r,ValueType:()=>i,baggageEntryMetadataFromString:()=>o.u,context:()=>F.D,createContextKey:()=>r.Y,createNoopMeter:()=>j,createTraceState:()=>U,default:()=>X,defaultTextMapGetter:()=>C.r,defaultTextMapSetter:()=>C.M,diag:()=>B.K,isSpanContextValid:()=>V.BM,isValidSpanId:()=>V.Lc,isValidTraceId:()=>V.jN,metrics:()=>W,propagation:()=>Y.u,trace:()=>Q.g});var n,i,o=a(2599),r=a(5834),s=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],p=function(){function e(e){return function(){for(var t=[],a=0;a512||(this._internalState=e.split(",").reverse().reduce((function(e,t){var a=t.trim(),n=a.indexOf("=");if(-1!==n){var i=a.slice(0,n),o=a.slice(n+1,t.length);(function(e){return R.test(e)})(i)&&function(e){return L.test(e)&&!M.test(e)}(o)&&e.set(i,o)}return e}),new Map),this._internalState.size>32&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,32))))},e.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},e.prototype._clone=function(){var t=new e;return t._internalState=new Map(this._internalState),t},e}();function U(e){return new z(e)}var V=a(7228),q=a(7007),F=a(6339),B=a(928),H=new(function(){function e(){}return e.prototype.getMeter=function(e,t,a){return w},e}()),G=a(658),$=a(5774),K="metrics",W=function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalMeterProvider=function(e){return(0,G.TG)(K,e,$.G.instance())},e.prototype.getMeterProvider=function(){return(0,G.Rd)(K)||H},e.prototype.getMeter=function(e,t,a){return this.getMeterProvider().getMeter(e,t,a)},e.prototype.disable=function(){(0,G.J_)(K,$.G.instance())},e}().getInstance(),Y=a(8303),Q=a(2210);const X={context:F.D,diag:B.K,metrics:W,propagation:Y.u,trace:Q.g}},658:(e,t,a)=>{"use strict";a.d(t,{Rd:()=>u,TG:()=>l,J_:()=>d});var n="object"==typeof globalThis?globalThis:global,i="1.3.0",o=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/,r=function(e){var t=new Set([e]),a=new Set,n=e.match(o);if(!n)return function(){return!1};var i=+n[1],r=+n[2],s=+n[3];if(null!=n[4])return function(t){return t===e};function p(e){return a.add(e),!1}function c(e){return t.add(e),!0}return function(e){if(t.has(e))return!0;if(a.has(e))return!1;var n=e.match(o);if(!n)return p(e);var l=+n[1],u=+n[2],d=+n[3];return null!=n[4]||i!==l?p(e):0===i?r===u&&s<=d?c(e):p(e):r<=u?c(e):p(e)}}(i),s=i.split(".")[0],p=Symbol.for("opentelemetry.js.api."+s),c=n;function l(e,t,a,n){var o;void 0===n&&(n=!1);var r=c[p]=null!==(o=c[p])&&void 0!==o?o:{version:i};if(!n&&r[e]){var s=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+e);return a.error(s.stack||s.message),!1}return r.version!==i?(s=new Error("@opentelemetry/api: All API registration versions must match"),a.error(s.stack||s.message),!1):(r[e]=t,a.debug("@opentelemetry/api: Registered a global for "+e+" v1.3.0."),!0)}function u(e){var t,a,n=null===(t=c[p])||void 0===t?void 0:t.version;if(n&&r(n))return null===(a=c[p])||void 0===a?void 0:a[e]}function d(e,t){t.debug("@opentelemetry/api: Unregistering a global for "+e+" v1.3.0.");var a=c[p];a&&delete a[e]}},8303:(e,t,a)=>{"use strict";a.d(t,{u:()=>h});var n=a(658),i=function(){function e(){}return e.prototype.inject=function(e,t){},e.prototype.extract=function(e,t){return e},e.prototype.fields=function(){return[]},e}(),o=a(7008),r=(0,a(5834).Y)("OpenTelemetry Baggage Key");function s(e){return e.getValue(r)||void 0}function p(e,t){return e.setValue(r,t)}function c(e){return e.deleteValue(r)}var l=a(2599),u=a(5774),d="propagation",m=new i,h=function(){function e(){this.createBaggage=l.H,this.getBaggage=s,this.setBaggage=p,this.deleteBaggage=c}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalPropagator=function(e){return(0,n.TG)(d,e,u.G.instance())},e.prototype.inject=function(e,t,a){return void 0===a&&(a=o.M),this._getGlobalPropagator().inject(e,t,a)},e.prototype.extract=function(e,t,a){return void 0===a&&(a=o.r),this._getGlobalPropagator().extract(e,t,a)},e.prototype.fields=function(){return this._getGlobalPropagator().fields()},e.prototype.disable=function(){(0,n.J_)(d,u.G.instance())},e.prototype._getGlobalPropagator=function(){return(0,n.Rd)(d)||m},e}().getInstance()},7008:(e,t,a)=>{"use strict";a.d(t,{r:()=>n,M:()=>i});var n={get:function(e,t){if(null!=e)return e[t]},keys:function(e){return null==e?[]:Object.keys(e)}},i={set:function(e,t,a){null!=e&&(e[t]=a)}}},2210:(e,t,a)=>{"use strict";a.d(t,{g:()=>c});var n=a(658),i=a(2009),o=a(7228),r=a(3557),s=a(5774),p="trace",c=function(){function e(){this._proxyTracerProvider=new i.K,this.wrapSpanContext=o.kw,this.isSpanContextValid=o.BM,this.deleteSpan=r.TW,this.getSpan=r.Br,this.getActiveSpan=r.HN,this.getSpanContext=r.A3,this.setSpan=r.WZ,this.setSpanContext=r.G3}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalTracerProvider=function(e){var t=(0,n.TG)(p,this._proxyTracerProvider,s.G.instance());return t&&this._proxyTracerProvider.setDelegate(e),t},e.prototype.getTracerProvider=function(){return(0,n.Rd)(p)||this._proxyTracerProvider},e.prototype.getTracer=function(e,t){return this.getTracerProvider().getTracer(e,t)},e.prototype.disable=function(){(0,n.J_)(p,s.G.instance()),this._proxyTracerProvider=new i.K},e}().getInstance()},7817:(e,t,a)=>{"use strict";a.d(t,{s:()=>i});var n=a(7007),i=function(){function e(e){void 0===e&&(e=n.Rr),this._spanContext=e}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(e,t){return this},e.prototype.setAttributes=function(e){return this},e.prototype.addEvent=function(e,t){return this},e.prototype.setStatus=function(e){return this},e.prototype.updateName=function(e){return this},e.prototype.end=function(e){},e.prototype.isRecording=function(){return!1},e.prototype.recordException=function(e,t){},e}()},9127:(e,t,a)=>{"use strict";a.d(t,{E:()=>p});var n=a(7150),i=a(3557),o=a(7817),r=a(7228),s=n.c.getInstance(),p=function(){function e(){}return e.prototype.startSpan=function(e,t,a){if(Boolean(null==t?void 0:t.root))return new o.s;var n,s=a&&(0,i.A3)(a);return"object"==typeof(n=s)&&"string"==typeof n.spanId&&"string"==typeof n.traceId&&"number"==typeof n.traceFlags&&(0,r.BM)(s)?new o.s(s):new o.s},e.prototype.startActiveSpan=function(e,t,a,n){var o,r,p;if(!(arguments.length<2)){2===arguments.length?p=t:3===arguments.length?(o=t,p=a):(o=t,r=a,p=n);var c=null!=r?r:s.active(),l=this.startSpan(e,o,c),u=(0,i.WZ)(c,l);return s.with(u,p,void 0,l)}},e}()},9953:(e,t,a)=>{"use strict";a.d(t,{T:()=>i});var n=new(a(9127).E),i=function(){function e(e,t,a,n){this._provider=e,this.name=t,this.version=a,this.options=n}return e.prototype.startSpan=function(e,t,a){return this._getTracer().startSpan(e,t,a)},e.prototype.startActiveSpan=function(e,t,a,n){var i=this._getTracer();return Reflect.apply(i.startActiveSpan,i,arguments)},e.prototype._getTracer=function(){if(this._delegate)return this._delegate;var e=this._provider.getDelegateTracer(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):n},e}()},2009:(e,t,a)=>{"use strict";a.d(t,{K:()=>r});var n=a(9953),i=a(9127),o=new(function(){function e(){}return e.prototype.getTracer=function(e,t,a){return new i.E},e}()),r=function(){function e(){}return e.prototype.getTracer=function(e,t,a){var i;return null!==(i=this.getDelegateTracer(e,t,a))&&void 0!==i?i:new n.T(this,e,t,a)},e.prototype.getDelegate=function(){var e;return null!==(e=this._delegate)&&void 0!==e?e:o},e.prototype.setDelegate=function(e){this._delegate=e},e.prototype.getDelegateTracer=function(e,t,a){var n;return null===(n=this._delegate)||void 0===n?void 0:n.getTracer(e,t,a)},e}()},1227:(e,t,a)=>{"use strict";var n;a.d(t,{U:()=>n}),function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"}(n||(n={}))},3557:(e,t,a)=>{"use strict";a.d(t,{Br:()=>s,HN:()=>p,WZ:()=>c,TW:()=>l,G3:()=>u,A3:()=>d});var n=a(5834),i=a(7817),o=a(7150),r=(0,n.Y)("OpenTelemetry Context Key SPAN");function s(e){return e.getValue(r)||void 0}function p(){return s(o.c.getInstance().active())}function c(e,t){return e.setValue(r,t)}function l(e){return e.deleteValue(r)}function u(e,t){return c(e,new i.s(t))}function d(e){var t;return null===(t=s(e))||void 0===t?void 0:t.spanContext()}},7007:(e,t,a)=>{"use strict";a.d(t,{fQ:()=>i,AE:()=>o,Rr:()=>r});var n=a(8726),i="0000000000000000",o="00000000000000000000000000000000",r={traceId:o,spanId:i,traceFlags:n.r.NONE}},87:(e,t,a)=>{"use strict";var n;a.d(t,{M:()=>n}),function(e){e[e.INTERNAL=0]="INTERNAL",e[e.SERVER=1]="SERVER",e[e.CLIENT=2]="CLIENT",e[e.PRODUCER=3]="PRODUCER",e[e.CONSUMER=4]="CONSUMER"}(n||(n={}))},7228:(e,t,a)=>{"use strict";a.d(t,{jN:()=>s,Lc:()=>p,BM:()=>c,kw:()=>l});var n=a(7007),i=a(7817),o=/^([0-9a-f]{32})$/i,r=/^[0-9a-f]{16}$/i;function s(e){return o.test(e)&&e!==n.AE}function p(e){return r.test(e)&&e!==n.fQ}function c(e){return s(e.traceId)&&p(e.spanId)}function l(e){return new i.s(e)}},1820:(e,t,a)=>{"use strict";var n;a.d(t,{Q:()=>n}),function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"}(n||(n={}))},8726:(e,t,a)=>{"use strict";var n;a.d(t,{r:()=>n}),function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"}(n||(n={}))},3420:(e,t,a)=>{"use strict";var n;a.d(t,{I:()=>n}),function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"}(n||(n={}))},3250:(e,t,a)=>{"use strict";a.d(t,{Vo:()=>n,bO:()=>i,bU:()=>o,WM:()=>r,Cx:()=>s,ef:()=>p,H3:()=>c});var n="=",i=";",o=",",r="baggage",s=180,p=4096,c=8192},926:(e,t,a)=>{"use strict";a.d(t,{a:()=>s});var n=a(8303),i=a(8397),o=a(3250),r=a(315),s=function(){function e(){}return e.prototype.inject=function(e,t,a){var s=n.u.getBaggage(e);if(s&&!(0,i.Ll)(e)){var p=(0,r.getKeyPairs)(s).filter((function(e){return e.length<=o.ef})).slice(0,o.Cx),c=(0,r.serializeKeyPairs)(p);c.length>0&&a.set(t,o.WM,c)}},e.prototype.extract=function(e,t,a){var i=a.get(t,o.WM),s=Array.isArray(i)?i.join(o.bU):i;if(!s)return e;var p={};return 0===s.length?e:(s.split(o.bU).forEach((function(e){var t=(0,r.parsePairKeyValue)(e);if(t){var a={value:t.value};t.metadata&&(a.metadata=t.metadata),p[t.key]=a}})),0===Object.entries(p).length?e:n.u.setBaggage(e,n.u.createBaggage(p)))},e.prototype.fields=function(){return[o.WM]},e}()},315:(e,t,a)=>{"use strict";a.r(t),a.d(t,{serializeKeyPairs:()=>o,getKeyPairs:()=>r,parsePairKeyValue:()=>s,parseKeyPairsIntoRecord:()=>p});var n=a(2599),i=a(3250);function o(e){return e.reduce((function(e,t){var a=""+e+(""!==e?i.bU:"")+t;return a.length>i.H3?e:a}),"")}function r(e){return e.getAllEntries().map((function(e){var t=function(e,t){var a="function"==typeof Symbol&&e[Symbol.iterator];if(!a)return e;var n,i,o=a.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)r.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(a=o.return)&&a.call(o)}finally{if(i)throw i.error}}return r}(e,2),a=t[0],n=t[1],o=encodeURIComponent(a)+"="+encodeURIComponent(n.value);return void 0!==n.metadata&&(o+=i.bO+n.metadata.toString()),o}))}function s(e){var t=e.split(i.bO);if(!(t.length<=0)){var a=t.shift();if(a){var o=a.split(i.Vo);if(2===o.length){var r,s=decodeURIComponent(o[0].trim()),p=decodeURIComponent(o[1].trim());return t.length>0&&(r=(0,n.u)(t.join(i.bO))),{key:s,value:p,metadata:r}}}}}function p(e){return"string"!=typeof e||0===e.length?{}:e.split(i.bU).map((function(e){return s(e)})).filter((function(e){return void 0!==e&&e.value.length>0})).reduce((function(e,t){return e[t.key]=t.value,e}),{})}},551:(e,t,a)=>{"use strict";a.d(t,{FT:()=>r,sy:()=>s,Do:()=>p});var n=a(928),i=function(e){var t="function"==typeof Symbol&&Symbol.iterator,a=t&&e[t],n=0;if(a)return a.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=function(e,t){var a="function"==typeof Symbol&&e[Symbol.iterator];if(!a)return e;var n,i,o=a.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)r.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(a=o.return)&&a.call(o)}finally{if(i)throw i.error}}return r};function r(e){var t,a,r={};if("object"!=typeof e||null==e)return r;try{for(var c=i(Object.entries(e)),l=c.next();!l.done;l=c.next()){var u=o(l.value,2),d=u[0],m=u[1];s(d)?p(m)?Array.isArray(m)?r[d]=m.slice():r[d]=m:n.K.warn("Invalid attribute value set for key: "+d):n.K.warn("Invalid attribute key: "+d)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(a=c.return)&&a.call(c)}finally{if(t)throw t.error}}return r}function s(e){return"string"==typeof e&&e.length>0}function p(e){return null==e||(Array.isArray(e)?function(e){var t,a,n;try{for(var o=i(e),r=o.next();!r.done;r=o.next()){var s=r.value;if(null!=s){if(!n){if(c(s)){n=typeof s;continue}return!1}if(typeof s!==n)return!1}}}catch(e){t={error:e}}finally{try{r&&!r.done&&(a=o.return)&&a.call(o)}finally{if(t)throw t.error}}return!0}(e):c(e))}function c(e){switch(typeof e){case"number":case"boolean":case"string":return!0}return!1}},6220:(e,t,a)=>{"use strict";a.d(t,{c:()=>i,L:()=>o});var n=(0,a(6470).x)();function i(e){n=e}function o(e){try{n(e)}catch(e){}}},6470:(e,t,a)=>{"use strict";a.d(t,{x:()=>i});var n=a(928);function i(){return function(e){n.K.error(function(e){return"string"==typeof e?e:JSON.stringify(function(e){for(var t={},a=e;null!==a;)Object.getOwnPropertyNames(a).forEach((function(e){if(!t[e]){var n=a[e];n&&(t[e]=String(n))}})),a=Object.getPrototypeOf(a);return t}(e))}(e))}}},7664:(e,t,a)=>{"use strict";a.d(t,{Jt:()=>s,aE:()=>p,J3:()=>c,Us:()=>l,PW:()=>u,KO:()=>d,ji:()=>m,Dt:()=>h,X_:()=>f});var n=a(9471),i=Math.pow(10,9);function o(e){var t=e/1e3,a=Math.trunc(t);return[a,Number((t-a).toFixed(9))*i]}function r(){var e=n.t.timeOrigin;if("number"!=typeof e){var t=n.t;e=t.timing&&t.timing.fetchStart}return e}function s(e){var t=o(r()),a=o("number"==typeof e?e:n.t.now()),s=t[0]+a[0],p=t[1]+a[1];return p>i&&(p-=i,s+=1),[s,p]}function p(e){if(h(e))return e;if("number"==typeof e)return e{"use strict";a.r(t),a.d(t,{AlwaysOffSampler:()=>O,AlwaysOnSampler:()=>D,AnchoredClock:()=>i,BindOnceFuture:()=>K.q,CompositePropagator:()=>T.Y,DEFAULT_ATTRIBUTE_COUNT_LIMIT:()=>q.qG,DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT:()=>q.KR,DEFAULT_ENVIRONMENT:()=>q.J9,ExportResultCode:()=>c.I,ParentBasedSampler:()=>M,RPCType:()=>_,RandomIdGenerator:()=>y,SDK_INFO:()=>k.m,TRACE_PARENT_HEADER:()=>S.FX,TRACE_STATE_HEADER:()=>S.C3,TraceIdRatioBasedSampler:()=>z,TraceState:()=>V.n,TracesSamplerValues:()=>B.J,VERSION:()=>l.q,W3CBaggagePropagator:()=>n.a,W3CTraceContextPropagator:()=>S.jf,_globalThis:()=>m,baggageUtils:()=>u,deleteRPCMetadata:()=>A,getEnv:()=>d.d,getEnvWithoutDefaults:()=>q.vU,getRPCMetadata:()=>I,globalErrorHandler:()=>r.L,hexToBase64:()=>g,hrTime:()=>p.Jt,hrTimeDuration:()=>p.J3,hrTimeToMicroseconds:()=>p.ji,hrTimeToMilliseconds:()=>p.KO,hrTimeToNanoseconds:()=>p.PW,hrTimeToTimeStamp:()=>p.Us,internal:()=>Y,isAttributeKey:()=>o.sy,isAttributeValue:()=>o.Do,isTimeInput:()=>p.X_,isTimeInputHrTime:()=>p.Dt,isTracingSuppressed:()=>U.Ll,isUrlIgnored:()=>G,isWrapped:()=>$,loggingErrorHandler:()=>s.x,merge:()=>F.T,otperformance:()=>x.t,parseEnvironment:()=>q.Ds,parseTraceParent:()=>S.j_,sanitizeAttributes:()=>o.FT,setGlobalErrorHandler:()=>r.c,setRPCMetadata:()=>C,suppressTracing:()=>U.hE,timeInputToHrTime:()=>p.aE,unrefTimer:()=>E.g,unsuppressTracing:()=>U.yy,urlMatches:()=>H});var n=a(926),i=function(){function e(e,t){this._monotonicClock=t,this._epochMillis=e.now(),this._performanceMillis=t.now()}return e.prototype.now=function(){var e=this._monotonicClock.now()-this._performanceMillis;return this._epochMillis+e},e}(),o=a(551),r=a(6220),s=a(6470),p=a(7664),c=a(3420),l=a(8923),u=a(315),d=a(4241),m="object"==typeof globalThis?globalThis:global;function h(e){return e>=48&&e<=57?e-48:e>=97&&e<=102?e-87:e-55}var f=Buffer.alloc(8),v=Buffer.alloc(16);function g(e){var t;t=16===e.length?f:32===e.length?v:Buffer.alloc(e.length/2);for(var a=0,n=0;n>>0,4*t);for(t=0;t0);t++)t===e-1&&(b[e-1]=1);return b.toString("hex",0,e)}}var _,x=a(9471),k=a(3290),E=a(2140),T=a(3135),S=a(9588),j=(0,a(5834).Y)("OpenTelemetry SDK Context Key RPC_METADATA");function C(e,t){return e.setValue(j,t)}function A(e){return e.deleteValue(j)}function I(e){return e.getValue(j)}!function(e){e.HTTP="http"}(_||(_={}));var N=a(1227),O=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:N.U.NOT_RECORD}},e.prototype.toString=function(){return"AlwaysOffSampler"},e}(),D=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:N.U.RECORD_AND_SAMPLED}},e.prototype.toString=function(){return"AlwaysOnSampler"},e}(),P=a(2210),R=a(7228),L=a(8726),M=function(){function e(e){var t,a,n,i;this._root=e.root,this._root||((0,r.L)(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new D),this._remoteParentSampled=null!==(t=e.remoteParentSampled)&&void 0!==t?t:new D,this._remoteParentNotSampled=null!==(a=e.remoteParentNotSampled)&&void 0!==a?a:new O,this._localParentSampled=null!==(n=e.localParentSampled)&&void 0!==n?n:new D,this._localParentNotSampled=null!==(i=e.localParentNotSampled)&&void 0!==i?i:new O}return e.prototype.shouldSample=function(e,t,a,n,i,o){var r=P.g.getSpanContext(e);return r&&(0,R.BM)(r)?r.isRemote?r.traceFlags&L.r.SAMPLED?this._remoteParentSampled.shouldSample(e,t,a,n,i,o):this._remoteParentNotSampled.shouldSample(e,t,a,n,i,o):r.traceFlags&L.r.SAMPLED?this._localParentSampled.shouldSample(e,t,a,n,i,o):this._localParentNotSampled.shouldSample(e,t,a,n,i,o):this._root.shouldSample(e,t,a,n,i,o)},e.prototype.toString=function(){return"ParentBased{root="+this._root.toString()+", remoteParentSampled="+this._remoteParentSampled.toString()+", remoteParentNotSampled="+this._remoteParentNotSampled.toString()+", localParentSampled="+this._localParentSampled.toString()+", localParentNotSampled="+this._localParentNotSampled.toString()+"}"},e}(),z=function(){function e(e){void 0===e&&(e=0),this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(4294967295*this._ratio)}return e.prototype.shouldSample=function(e,t){return{decision:(0,R.jN)(t)&&this._accumulate(t)=1?1:e<=0?0:e},e.prototype._accumulate=function(e){for(var t=0,a=0;a>>0}return t},e}(),U=a(8397),V=a(9598),q=a(450),F=a(9009),B=a(9290);function H(e,t){return"string"==typeof t?e===t:!!e.match(t)}function G(e,t){var a,n;if(!t)return!1;try{for(var i=function(e){var t="function"==typeof Symbol&&Symbol.iterator,a=t&&e[t],n=0;if(a)return a.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(t),o=i.next();!o.done;o=i.next())if(H(e,o.value))return!0}catch(e){a={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}return!1}function $(e){return"function"==typeof e&&"function"==typeof e.__original&&"function"==typeof e.__unwrap&&!0===e.__wrapped}var K=a(1399),W=a(6339),Y={_export:function(e,t){return new Promise((function(a){W.D.with((0,U.hE)(W.D.active()),(function(){e.export(t,(function(e){a(e)}))}))}))}}},4241:(e,t,a)=>{"use strict";a.d(t,{d:()=>o});var n=a(2087),i=a(450);function o(){var e=(0,i.Ds)(process.env);return Object.assign({HOSTNAME:n.hostname()},i.J9,e)}},9471:(e,t,a)=>{"use strict";a.d(t,{t:()=>n});var n=require("perf_hooks").performance},3290:(e,t,a)=>{"use strict";a.d(t,{m:()=>r});var n,i=a(8923),o=a(5364),r=((n={})[o.R9.TELEMETRY_SDK_NAME]="opentelemetry",n[o.R9.PROCESS_RUNTIME_NAME]="node",n[o.R9.TELEMETRY_SDK_LANGUAGE]=o.Te.NODEJS,n[o.R9.TELEMETRY_SDK_VERSION]=i.q,n)},2140:(e,t,a)=>{"use strict";function n(e){e.unref()}a.d(t,{g:()=>n})},3135:(e,t,a)=>{"use strict";a.d(t,{Y:()=>i});var n=a(928),i=function(){function e(e){var t;void 0===e&&(e={}),this._propagators=null!==(t=e.propagators)&&void 0!==t?t:[],this._fields=Array.from(new Set(this._propagators.map((function(e){return"function"==typeof e.fields?e.fields():[]})).reduce((function(e,t){return e.concat(t)}),[])))}return e.prototype.inject=function(e,t,a){var i,o;try{for(var r=function(e){var t="function"==typeof Symbol&&Symbol.iterator,a=t&&e[t],n=0;if(a)return a.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(this._propagators),s=r.next();!s.done;s=r.next()){var p=s.value;try{p.inject(e,t,a)}catch(e){n.K.warn("Failed to inject with "+p.constructor.name+". Err: "+e.message)}}}catch(e){i={error:e}}finally{try{s&&!s.done&&(o=r.return)&&o.call(r)}finally{if(i)throw i.error}}},e.prototype.extract=function(e,t,a){return this._propagators.reduce((function(e,i){try{return i.extract(e,t,a)}catch(e){n.K.warn("Failed to inject with "+i.constructor.name+". Err: "+e.message)}return e}),e)},e.prototype.fields=function(){return this._fields.slice()},e}()},9598:(e,t,a)=>{"use strict";a.d(t,{n:()=>r});var n=new RegExp("^(?:[a-z][_0-9a-z-*/]{0,255}|[a-z0-9][_0-9a-z-*/]{0,240}@[a-z][_0-9a-z-*/]{0,13})$"),i=/^[ -~]{0,255}[!-~]$/,o=/,|=/,r=function(){function e(e){this._internalState=new Map,e&&this._parse(e)}return e.prototype.set=function(e,t){var a=this._clone();return a._internalState.has(e)&&a._internalState.delete(e),a._internalState.set(e,t),a},e.prototype.unset=function(e){var t=this._clone();return t._internalState.delete(e),t},e.prototype.get=function(e){return this._internalState.get(e)},e.prototype.serialize=function(){var e=this;return this._keys().reduce((function(t,a){return t.push(a+"="+e.get(a)),t}),[]).join(",")},e.prototype._parse=function(e){e.length>512||(this._internalState=e.split(",").reverse().reduce((function(e,t){var a=t.trim(),r=a.indexOf("=");if(-1!==r){var s=a.slice(0,r),p=a.slice(r+1,t.length);(function(e){return n.test(e)})(s)&&function(e){return i.test(e)&&!o.test(e)}(p)&&e.set(s,p)}return e}),new Map),this._internalState.size>32&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,32))))},e.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},e.prototype._clone=function(){var t=new e;return t._internalState=new Map(this._internalState),t},e}()},9588:(e,t,a)=>{"use strict";a.d(t,{FX:()=>p,C3:()=>c,j_:()=>u,jf:()=>d});var n=a(2210),i=a(7228),o=a(8726),r=a(8397),s=a(9598),p="traceparent",c="tracestate",l=new RegExp("^\\s?((?!ff)[\\da-f]{2})-((?![0]{32})[\\da-f]{32})-((?![0]{16})[\\da-f]{16})-([\\da-f]{2})(-.*)?\\s?$");function u(e){var t=l.exec(e);return t?"00"===t[1]&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}:null}var d=function(){function e(){}return e.prototype.inject=function(e,t,a){var s=n.g.getSpanContext(e);if(s&&!(0,r.Ll)(e)&&(0,i.BM)(s)){var l="00-"+s.traceId+"-"+s.spanId+"-0"+Number(s.traceFlags||o.r.NONE).toString(16);a.set(t,p,l),s.traceState&&a.set(t,c,s.traceState.serialize())}},e.prototype.extract=function(e,t,a){var i=a.get(t,p);if(!i)return e;var o=Array.isArray(i)?i[0]:i;if("string"!=typeof o)return e;var r=u(o);if(!r)return e;r.isRemote=!0;var l=a.get(t,c);if(l){var d=Array.isArray(l)?l.join(","):l;r.traceState=new s.n("string"==typeof d?d:void 0)}return n.g.setSpanContext(e,r)},e.prototype.fields=function(){return[p,c]},e}()},8397:(e,t,a)=>{"use strict";a.d(t,{hE:()=>i,yy:()=>o,Ll:()=>r});var n=(0,a(5834).Y)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function i(e){return e.setValue(n,!0)}function o(e){return e.deleteValue(n)}function r(e){return!0===e.getValue(n)}},1399:(e,t,a)=>{"use strict";a.d(t,{q:()=>r});var n=function(){function e(){var e=this;this._promise=new Promise((function(t,a){e._resolve=t,e._reject=a}))}return Object.defineProperty(e.prototype,"promise",{get:function(){return this._promise},enumerable:!1,configurable:!0}),e.prototype.resolve=function(e){this._resolve(e)},e.prototype.reject=function(e){this._reject(e)},e}(),i=function(e,t){var a="function"==typeof Symbol&&e[Symbol.iterator];if(!a)return e;var n,i,o=a.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)r.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(a=o.return)&&a.call(o)}finally{if(i)throw i.error}}return r},o=function(e,t,a){if(a||2===arguments.length)for(var n,i=0,o=t.length;i{"use strict";a.d(t,{qG:()=>u,KR:()=>l,J9:()=>d,vU:()=>y,Ds:()=>g});var n=a(6740),i=a(9290),o="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof global?global:{},r=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT","OTEL_EXPORTER_OTLP_TIMEOUT","OTEL_EXPORTER_OTLP_TRACES_TIMEOUT","OTEL_EXPORTER_OTLP_METRICS_TIMEOUT","OTEL_EXPORTER_JAEGER_AGENT_PORT"];function s(e){return r.indexOf(e)>-1}var p=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function c(e){return p.indexOf(e)>-1}var l=1/0,u=128,d={CONTAINER_NAME:"",ECS_CONTAINER_METADATA_URI_V4:"",ECS_CONTAINER_METADATA_URI:"",HOSTNAME:"",KUBERNETES_SERVICE_HOST:"",NAMESPACE:"",OTEL_BSP_EXPORT_TIMEOUT:3e4,OTEL_BSP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BSP_MAX_QUEUE_SIZE:2048,OTEL_BSP_SCHEDULE_DELAY:5e3,OTEL_EXPORTER_JAEGER_AGENT_HOST:"",OTEL_EXPORTER_JAEGER_AGENT_PORT:6832,OTEL_EXPORTER_JAEGER_ENDPOINT:"",OTEL_EXPORTER_JAEGER_PASSWORD:"",OTEL_EXPORTER_JAEGER_USER:"",OTEL_EXPORTER_OTLP_ENDPOINT:"",OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:"",OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:"",OTEL_EXPORTER_OTLP_HEADERS:"",OTEL_EXPORTER_OTLP_TRACES_HEADERS:"",OTEL_EXPORTER_OTLP_METRICS_HEADERS:"",OTEL_EXPORTER_OTLP_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_TRACES_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_METRICS_TIMEOUT:1e4,OTEL_EXPORTER_ZIPKIN_ENDPOINT:"http://localhost:9411/api/v2/spans",OTEL_LOG_LEVEL:n.n.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:l,OTEL_ATTRIBUTE_COUNT_LIMIT:u,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:l,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:u,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_TRACES_EXPORTER:"otlp",OTEL_TRACES_SAMPLER:i.J.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative"};function m(e,t,a,n,i){if(void 0===n&&(n=-1/0),void 0===i&&(i=1/0),void 0!==a[e]){var o=Number(a[e]);isNaN(o)||(t[e]=oi?i:o)}}function h(e,t,a,n){void 0===n&&(n=",");var i=a[e];"string"==typeof i&&(t[e]=i.split(n).map((function(e){return e.trim()})))}var f={ALL:n.n.ALL,VERBOSE:n.n.VERBOSE,DEBUG:n.n.DEBUG,INFO:n.n.INFO,WARN:n.n.WARN,ERROR:n.n.ERROR,NONE:n.n.NONE};function v(e,t,a){var n=a[e];if("string"==typeof n){var i=f[n.toUpperCase()];null!=i&&(t[e]=i)}}function g(e){var t={};for(var a in d){var n=a;switch(n){case"OTEL_LOG_LEVEL":v(n,t,e);break;default:if(s(n))m(n,t,e);else if(c(n))h(n,t,e);else{var i=e[n];null!=i&&(t[n]=String(i))}}}return t}function y(){return"undefined"!=typeof process?g(process.env):g(o)}},9009:(e,t,a)=>{"use strict";a.d(t,{T:()=>m});var n,i,o=Function.prototype.toString,r=o.call(Object),s=(n=Object.getPrototypeOf,i=Object,function(e){return n(i(e))}),p=Object.prototype,c=p.hasOwnProperty,l=Symbol?Symbol.toStringTag:void 0,u=p.toString;function d(e){if(!function(e){return null!=e&&"object"==typeof e}(e)||"[object Object]"!==function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":l&&l in Object(e)?function(e){var t=c.call(e,l),a=e[l],n=!1;try{e[l]=void 0,n=!0}catch(e){}var i=u.call(e);return n&&(t?e[l]=a:delete e[l]),i}(e):function(e){return u.call(e)}(e)}(e))return!1;var t=s(e);if(null===t)return!0;var a=c.call(t,"constructor")&&t.constructor;return"function"==typeof a&&a instanceof a&&o.call(a)===r}function m(){for(var e=[],t=0;t0;)a=f(a,e.shift(),0,n);return a}function h(e){return g(e)?e.slice():e}function f(e,t,a,n){var i;if(void 0===a&&(a=0),!(a>20)){if(a++,w(e)||w(t)||y(t))i=h(t);else if(g(e)){if(i=e.slice(),g(t))for(var o=0,r=t.length;o{"use strict";var n;a.d(t,{J:()=>n}),function(e){e.AlwaysOff="always_off",e.AlwaysOn="always_on",e.ParentBasedAlwaysOff="parentbased_always_off",e.ParentBasedAlwaysOn="parentbased_always_on",e.ParentBasedTraceIdRatio="parentbased_traceidratio",e.TraceIdRatio="traceidratio"}(n||(n={}))},8923:(e,t,a)=>{"use strict";a.d(t,{q:()=>n});var n="1.8.0"},2506:(e,t,a)=>{"use strict";a.r(t),a.d(t,{AlwaysOffSampler:()=>_,AlwaysOnSampler:()=>x,BasicTracerProvider:()=>ae,BatchSpanProcessor:()=>te,ConsoleSpanExporter:()=>ne,ForceFlushState:()=>M,InMemorySpanExporter:()=>ie,NoopSpanProcessor:()=>Y,ParentBasedSampler:()=>T,RandomIdGenerator:()=>D,SamplingDecision:()=>n,SimpleSpanProcessor:()=>re,Span:()=>y,TraceIdRatioBasedSampler:()=>S,Tracer:()=>z});var n,i=a(6339),o=a(2210),r=a(928),s=a(7007),p=a(87),c=a(1227),l=a(8726),u=a(8397),d=a(551),m=a(1820),h=a(9471),f=a(7664),v=a(3108),g=function(e,t){var a="function"==typeof Symbol&&e[Symbol.iterator];if(!a)return e;var n,i,o=a.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)r.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(a=o.return)&&a.call(o)}finally{if(i)throw i.error}}return r},y=function(){function e(e,t,a,n,i,o,r,s,p){void 0===r&&(r=[]),void 0===p&&(p=h.t),this.attributes={},this.links=[],this.events=[],this.status={code:m.Q.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this._clock=p,this.name=a,this._spanContext=n,this.parentSpanId=o,this.kind=i,this.links=r,this.startTime=(0,f.aE)(null!=s?s:p.now()),this.resource=e.resource,this.instrumentationLibrary=e.instrumentationLibrary,this._spanLimits=e.getSpanLimits(),this._spanProcessor=e.getActiveSpanProcessor(),this._spanProcessor.onStart(this,t),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(e,t){return null==t||this._isSpanEnded()?this:0===e.length?(r.K.warn("Invalid attribute key: "+e),this):(0,d.Do)(t)?(Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)||(this.attributes[e]=this._truncateToSize(t)),this):(r.K.warn("Invalid attribute value set for key: "+e),this)},e.prototype.setAttributes=function(e){var t,a;try{for(var n=function(e){var t="function"==typeof Symbol&&Symbol.iterator,a=t&&e[t],n=0;if(a)return a.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(Object.entries(e)),i=n.next();!i.done;i=n.next()){var o=g(i.value,2),r=o[0],s=o[1];this.setAttribute(r,s)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(a=n.return)&&a.call(n)}finally{if(t)throw t.error}}return this},e.prototype.addEvent=function(e,t,a){if(this._isSpanEnded())return this;if(0===this._spanLimits.eventCountLimit)return r.K.warn("No events allowed."),this;this.events.length>=this._spanLimits.eventCountLimit&&(r.K.warn("Dropping extra events."),this.events.shift()),(0,f.X_)(t)&&(void 0===a&&(a=t),t=void 0),void 0===a&&(a=this._clock.now());var n=(0,d.FT)(t);return this.events.push({name:e,attributes:n,time:(0,f.aE)(a)}),this},e.prototype.setStatus=function(e){return this._isSpanEnded()||(this.status=e),this},e.prototype.updateName=function(e){return this._isSpanEnded()||(this.name=e),this},e.prototype.end=function(e){this._isSpanEnded()?r.K.error("You can only call end() on a span once."):(this._ended=!0,this.endTime=(0,f.aE)(null!=e?e:this._clock.now()),this._duration=(0,f.J3)(this.startTime,this.endTime),this._duration[0]<0&&(r.K.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._spanProcessor.onEnd(this))},e.prototype.isRecording=function(){return!1===this._ended},e.prototype.recordException=function(e,t){void 0===t&&(t=this._clock.now());var a={};"string"==typeof e?a[v.og.EXCEPTION_MESSAGE]=e:e&&(e.code?a[v.og.EXCEPTION_TYPE]=e.code.toString():e.name&&(a[v.og.EXCEPTION_TYPE]=e.name),e.message&&(a[v.og.EXCEPTION_MESSAGE]=e.message),e.stack&&(a[v.og.EXCEPTION_STACKTRACE]=e.stack)),a[v.og.EXCEPTION_TYPE]||a[v.og.EXCEPTION_MESSAGE]?this.addEvent("exception",a,t):r.K.warn("Failed to record an exception "+e)},Object.defineProperty(e.prototype,"duration",{get:function(){return this._duration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ended",{get:function(){return this._ended},enumerable:!1,configurable:!0}),e.prototype._isSpanEnded=function(){return this._ended&&r.K.warn("Can not execute the operation on ended Span {traceId: "+this._spanContext.traceId+", spanId: "+this._spanContext.spanId+"}"),this._ended},e.prototype._truncateToLimitUtil=function(e,t){return e.length<=t?e:e.substr(0,t)},e.prototype._truncateToSize=function(e){var t=this,a=this._attributeValueLengthLimit;return a<=0?(r.K.warn("Attribute value limit must be positive, got "+a),e):"string"==typeof e?this._truncateToLimitUtil(e,a):Array.isArray(e)?e.map((function(e){return"string"==typeof e?t._truncateToLimitUtil(e,a):e})):e},e}(),b=a(4241),w=a(9290);!function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"}(n||(n={}));var _=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:n.NOT_RECORD}},e.prototype.toString=function(){return"AlwaysOffSampler"},e}(),x=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:n.RECORD_AND_SAMPLED}},e.prototype.toString=function(){return"AlwaysOnSampler"},e}(),k=a(7228),E=a(6220),T=function(){function e(e){var t,a,n,i;this._root=e.root,this._root||((0,E.L)(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new x),this._remoteParentSampled=null!==(t=e.remoteParentSampled)&&void 0!==t?t:new x,this._remoteParentNotSampled=null!==(a=e.remoteParentNotSampled)&&void 0!==a?a:new _,this._localParentSampled=null!==(n=e.localParentSampled)&&void 0!==n?n:new x,this._localParentNotSampled=null!==(i=e.localParentNotSampled)&&void 0!==i?i:new _}return e.prototype.shouldSample=function(e,t,a,n,i,r){var s=o.g.getSpanContext(e);return s&&(0,k.BM)(s)?s.isRemote?s.traceFlags&l.r.SAMPLED?this._remoteParentSampled.shouldSample(e,t,a,n,i,r):this._remoteParentNotSampled.shouldSample(e,t,a,n,i,r):s.traceFlags&l.r.SAMPLED?this._localParentSampled.shouldSample(e,t,a,n,i,r):this._localParentNotSampled.shouldSample(e,t,a,n,i,r):this._root.shouldSample(e,t,a,n,i,r)},e.prototype.toString=function(){return"ParentBased{root="+this._root.toString()+", remoteParentSampled="+this._remoteParentSampled.toString()+", remoteParentNotSampled="+this._remoteParentNotSampled.toString()+", localParentSampled="+this._localParentSampled.toString()+", localParentNotSampled="+this._localParentNotSampled.toString()+"}"},e}(),S=function(){function e(e){void 0===e&&(e=0),this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(4294967295*this._ratio)}return e.prototype.shouldSample=function(e,t){return{decision:(0,k.jN)(t)&&this._accumulate(t)=1?1:e<=0?0:e},e.prototype._accumulate=function(e){for(var t=0,a=0;a>>0}return t},e}(),j=(0,b.d)(),C=w.J.AlwaysOn;function A(){return{sampler:I(j),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:(0,b.d)().OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,b.d)().OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:(0,b.d)().OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,b.d)().OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:(0,b.d)().OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:(0,b.d)().OTEL_SPAN_EVENT_COUNT_LIMIT}}}function I(e){switch(void 0===e&&(e=(0,b.d)()),e.OTEL_TRACES_SAMPLER){case w.J.AlwaysOn:return new x;case w.J.AlwaysOff:return new _;case w.J.ParentBasedAlwaysOn:return new T({root:new x});case w.J.ParentBasedAlwaysOff:return new T({root:new _});case w.J.TraceIdRatio:return new S(N(e));case w.J.ParentBasedTraceIdRatio:return new T({root:new S(N(e))});default:return r.K.error('OTEL_TRACES_SAMPLER value "'+e.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+C+'".'),new x}}function N(e){if(void 0===e.OTEL_TRACES_SAMPLER_ARG||""===e.OTEL_TRACES_SAMPLER_ARG)return r.K.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to 1."),1;var t=Number(e.OTEL_TRACES_SAMPLER_ARG);return isNaN(t)?(r.K.error("OTEL_TRACES_SAMPLER_ARG="+e.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to 1."),1):t<0||t>1?(r.K.error("OTEL_TRACES_SAMPLER_ARG="+e.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to 1."),1):t}var O=a(450),D=function(){this.generateTraceId=R(16),this.generateSpanId=R(8)},P=Buffer.allocUnsafe(16);function R(e){return function(){for(var t=0;t>>0,4*t);for(t=0;t0);t++)t===e-1&&(P[e-1]=1);return P.toString("hex",0,e)}}var L,M,z=function(){function e(e,t,a){this._tracerProvider=a;var n,i,o,r,s=(n=t,i={sampler:I()},o=A(),(r=Object.assign({},o,i,n)).generalLimits=Object.assign({},o.generalLimits,n.generalLimits||{}),r.spanLimits=Object.assign({},o.spanLimits,n.spanLimits||{}),r);this._sampler=s.sampler,this._generalLimits=s.generalLimits,this._spanLimits=s.spanLimits,this._idGenerator=t.idGenerator||new D,this.resource=a.resource,this.instrumentationLibrary=e}return e.prototype.startSpan=function(e,t,a){var n,m;void 0===t&&(t={}),void 0===a&&(a=i.D.active()),t.root&&(a=o.g.deleteSpan(a));var h=o.g.getSpan(a);if((0,u.Ll)(a))return r.K.debug("Instrumentation suppressed, returning Noop Span"),o.g.wrapSpanContext(s.Rr);var f,v,g,b=null==h?void 0:h.spanContext(),w=this._idGenerator.generateSpanId();b&&o.g.isSpanContextValid(b)?(f=b.traceId,v=b.traceState,g=b.spanId):f=this._idGenerator.generateTraceId();var _=null!==(n=t.kind)&&void 0!==n?n:p.M.INTERNAL,x=(null!==(m=t.links)&&void 0!==m?m:[]).map((function(e){return{context:e.context,attributes:(0,d.FT)(e.attributes)}})),k=(0,d.FT)(t.attributes),E=this._sampler.shouldSample(a,f,e,_,k,x),T={traceId:f,spanId:w,traceFlags:E.decision===c.U.RECORD_AND_SAMPLED?l.r.SAMPLED:l.r.NONE,traceState:v};if(E.decision===c.U.NOT_RECORD)return r.K.debug("Recording is off, propagating context in a non-recording span"),o.g.wrapSpanContext(T);var S=new y(this,a,e,T,_,g,x,t.startTime),j=(0,d.FT)(Object.assign(k,E.attributes));return S.setAttributes(j),S},e.prototype.startActiveSpan=function(e,t,a,n){var r,s,p;if(!(arguments.length<2)){2===arguments.length?p=t:3===arguments.length?(r=t,p=a):(r=t,s=a,p=n);var c=null!=s?s:i.D.active(),l=this.startSpan(e,r,c),u=o.g.setSpan(c,l);return i.D.with(u,p,void 0,l)}},e.prototype.getGeneralLimits=function(){return this._generalLimits},e.prototype.getSpanLimits=function(){return this._spanLimits},e.prototype.getActiveSpanProcessor=function(){return this._tracerProvider.getActiveSpanProcessor()},e}(),U=a(8303),V=a(9009),q=a(3135),F=a(9588),B=a(926),H=a(5364),G=a(3290),$=function(){function e(e){this.attributes=e}return e.empty=function(){return e.EMPTY},e.default=function(){var t;return new e(((t={})[H.R9.SERVICE_NAME]="unknown_service:"+process.argv0,t[H.R9.TELEMETRY_SDK_LANGUAGE]=G.m[H.R9.TELEMETRY_SDK_LANGUAGE],t[H.R9.TELEMETRY_SDK_NAME]=G.m[H.R9.TELEMETRY_SDK_NAME],t[H.R9.TELEMETRY_SDK_VERSION]=G.m[H.R9.TELEMETRY_SDK_VERSION],t))},e.prototype.merge=function(t){return t&&Object.keys(t.attributes).length?new e(Object.assign({},this.attributes,t.attributes)):this},e.EMPTY=new e({}),e}(),K=function(e){var t="function"==typeof Symbol&&Symbol.iterator,a=t&&e[t],n=0;if(a)return a.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},W=function(){function e(e){this._spanProcessors=e}return e.prototype.forceFlush=function(){var e,t,a=[];try{for(var n=K(this._spanProcessors),i=n.next();!i.done;i=n.next()){var o=i.value;a.push(o.forceFlush())}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return new Promise((function(e){Promise.all(a).then((function(){e()})).catch((function(t){(0,E.L)(t||new Error("MultiSpanProcessor: forceFlush failed")),e()}))}))},e.prototype.onStart=function(e,t){var a,n;try{for(var i=K(this._spanProcessors),o=i.next();!o.done;o=i.next())o.value.onStart(e,t)}catch(e){a={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}},e.prototype.onEnd=function(e){var t,a;try{for(var n=K(this._spanProcessors),i=n.next();!i.done;i=n.next())i.value.onEnd(e)}catch(e){t={error:e}}finally{try{i&&!i.done&&(a=n.return)&&a.call(n)}finally{if(t)throw t.error}}},e.prototype.shutdown=function(){var e,t,a=[];try{for(var n=K(this._spanProcessors),i=n.next();!i.done;i=n.next()){var o=i.value;a.push(o.shutdown())}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return new Promise((function(e,t){Promise.all(a).then((function(){e()}),t)}))},e}(),Y=function(){function e(){}return e.prototype.onStart=function(e,t){},e.prototype.onEnd=function(e){},e.prototype.shutdown=function(){return Promise.resolve()},e.prototype.forceFlush=function(){return Promise.resolve()},e}(),Q=a(1399),X=a(3420),J=a(2140),Z=function(){function e(e,t){this._exporter=e,this._finishedSpans=[];var a=(0,b.d)();this._maxExportBatchSize="number"==typeof(null==t?void 0:t.maxExportBatchSize)?t.maxExportBatchSize:a.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize="number"==typeof(null==t?void 0:t.maxQueueSize)?t.maxQueueSize:a.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis="number"==typeof(null==t?void 0:t.scheduledDelayMillis)?t.scheduledDelayMillis:a.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis="number"==typeof(null==t?void 0:t.exportTimeoutMillis)?t.exportTimeoutMillis:a.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new Q.q(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(r.K.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}return e.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},e.prototype.onStart=function(e,t){},e.prototype.onEnd=function(e){this._shutdownOnce.isCalled||0!=(e.spanContext().traceFlags&l.r.SAMPLED)&&this._addToBuffer(e)},e.prototype.shutdown=function(){return this._shutdownOnce.call()},e.prototype._shutdown=function(){var e=this;return Promise.resolve().then((function(){return e.onShutdown()})).then((function(){return e._flushAll()})).then((function(){return e._exporter.shutdown()}))},e.prototype._addToBuffer=function(e){this._finishedSpans.length>=this._maxQueueSize||(this._finishedSpans.push(e),this._maybeStartTimer())},e.prototype._flushAll=function(){var e=this;return new Promise((function(t,a){for(var n=[],i=0,o=Math.ceil(e._finishedSpans.length/e._maxExportBatchSize);i0&&(e._clearTimer(),e._maybeStartTimer())})).catch((function(e){(0,E.L)(e)}))}),this._scheduledDelayMillis),(0,J.g)(this._timer))},e.prototype._clearTimer=function(){void 0!==this._timer&&(clearTimeout(this._timer),this._timer=void 0)},e}(),ee=(L=function(e,t){return(L=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function a(){this.constructor=e}L(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}),te=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ee(t,e),t.prototype.onShutdown=function(){},t}(Z);!function(e){e[e.resolved=0]="resolved",e[e.timeout=1]="timeout",e[e.error=2]="error",e[e.unresolved=3]="unresolved"}(M||(M={}));var ae=function(){function e(e){var t;void 0===e&&(e={}),this._registeredSpanProcessors=[],this._tracers=new Map;var a=(0,V.T)({},A(),function(e){var t,a,n,i,o,r,s,p,c,l,u,d,m=Object.assign({},e.spanLimits),h=(0,O.vU)();return m.attributeCountLimit=null!==(r=null!==(o=null!==(i=null!==(a=null===(t=e.spanLimits)||void 0===t?void 0:t.attributeCountLimit)&&void 0!==a?a:null===(n=e.generalLimits)||void 0===n?void 0:n.attributeCountLimit)&&void 0!==i?i:h.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)&&void 0!==o?o:h.OTEL_ATTRIBUTE_COUNT_LIMIT)&&void 0!==r?r:O.qG,m.attributeValueLengthLimit=null!==(d=null!==(u=null!==(l=null!==(p=null===(s=e.spanLimits)||void 0===s?void 0:s.attributeValueLengthLimit)&&void 0!==p?p:null===(c=e.generalLimits)||void 0===c?void 0:c.attributeValueLengthLimit)&&void 0!==l?l:h.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)&&void 0!==u?u:h.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)&&void 0!==d?d:O.KR,Object.assign({},e,{spanLimits:m})}(e));this.resource=null!==(t=a.resource)&&void 0!==t?t:$.empty(),this.resource=$.default().merge(this.resource),this._config=Object.assign({},a,{resource:this.resource});var n=this._buildExporterFromEnv();if(void 0!==n){var i=new te(n);this.activeSpanProcessor=i}else this.activeSpanProcessor=new Y}return e.prototype.getTracer=function(e,t,a){var n=e+"@"+(t||"")+":"+((null==a?void 0:a.schemaUrl)||"");return this._tracers.has(n)||this._tracers.set(n,new z({name:e,version:t,schemaUrl:null==a?void 0:a.schemaUrl},this._config,this)),this._tracers.get(n)},e.prototype.addSpanProcessor=function(e){0===this._registeredSpanProcessors.length&&this.activeSpanProcessor.shutdown().catch((function(e){return r.K.error("Error while trying to shutdown current span processor",e)})),this._registeredSpanProcessors.push(e),this.activeSpanProcessor=new W(this._registeredSpanProcessors)},e.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},e.prototype.register=function(e){void 0===e&&(e={}),o.g.setGlobalTracerProvider(this),void 0===e.propagator&&(e.propagator=this._buildPropagatorFromEnv()),e.contextManager&&i.D.setGlobalContextManager(e.contextManager),e.propagator&&U.u.setGlobalPropagator(e.propagator)},e.prototype.forceFlush=function(){var e=this._config.forceFlushTimeoutMillis,t=this._registeredSpanProcessors.map((function(t){return new Promise((function(a){var n,i=setTimeout((function(){a(new Error("Span processor did not completed within timeout period of "+e+" ms")),n=M.timeout}),e);t.forceFlush().then((function(){clearTimeout(i),n!==M.timeout&&(n=M.resolved,a(n))})).catch((function(e){clearTimeout(i),n=M.error,a(e)}))}))}));return new Promise((function(e,a){Promise.all(t).then((function(t){var n=t.filter((function(e){return e!==M.resolved}));n.length>0?a(n):e()})).catch((function(e){return a([e])}))}))},e.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},e.prototype._getPropagator=function(e){var t;return null===(t=this.constructor._registeredPropagators.get(e))||void 0===t?void 0:t()},e.prototype._getSpanExporter=function(e){var t;return null===(t=this.constructor._registeredExporters.get(e))||void 0===t?void 0:t()},e.prototype._buildPropagatorFromEnv=function(){var e=this,t=Array.from(new Set((0,b.d)().OTEL_PROPAGATORS)),a=t.map((function(t){var a=e._getPropagator(t);return a||r.K.warn('Propagator "'+t+'" requested through environment variable is unavailable.'),a})).reduce((function(e,t){return t&&e.push(t),e}),[]);return 0===a.length?void 0:1===t.length?a[0]:new q.Y({propagators:a})},e.prototype._buildExporterFromEnv=function(){var e=(0,b.d)().OTEL_TRACES_EXPORTER;if("none"!==e){var t=this._getSpanExporter(e);return t||r.K.error('Exporter "'+e+'" requested through environment variable is unavailable.'),t}},e._registeredPropagators=new Map([["tracecontext",function(){return new F.jf}],["baggage",function(){return new B.a}]]),e._registeredExporters=new Map,e}(),ne=function(){function e(){}return e.prototype.export=function(e,t){return this._sendSpans(e,t)},e.prototype.shutdown=function(){return this._sendSpans([]),Promise.resolve()},e.prototype._exportInfo=function(e){return{traceId:e.spanContext().traceId,parentId:e.parentSpanId,name:e.name,id:e.spanContext().spanId,kind:e.kind,timestamp:(0,f.ji)(e.startTime),duration:(0,f.ji)(e.duration),attributes:e.attributes,status:e.status,events:e.events,links:e.links}},e.prototype._sendSpans=function(e,t){var a,n;try{for(var i=function(e){var t="function"==typeof Symbol&&Symbol.iterator,a=t&&e[t],n=0;if(a)return a.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),o=i.next();!o.done;o=i.next()){var r=o.value;console.dir(this._exportInfo(r),{depth:3})}}catch(e){a={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}if(t)return t({code:X.I.SUCCESS})},e}(),ie=function(){function e(){this._finishedSpans=[],this._stopped=!1}return e.prototype.export=function(e,t){var a;if(this._stopped)return t({code:X.I.FAILED,error:new Error("Exporter has been stopped")});(a=this._finishedSpans).push.apply(a,function(e,t,a){if(a||2===arguments.length)for(var n,i=0,o=t.length;i0)&&!(n=o.next()).done;)r.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(a=o.return)&&a.call(o)}finally{if(i)throw i.error}}return r}(e),!1)),setTimeout((function(){return t({code:X.I.SUCCESS})}),0)},e.prototype.shutdown=function(){return this._stopped=!0,this._finishedSpans=[],Promise.resolve()},e.prototype.reset=function(){this._finishedSpans=[]},e.prototype.getFinishedSpans=function(){return this._finishedSpans},e}(),oe=a(6237),re=function(){function e(e){this._exporter=e,this._shutdownOnce=new Q.q(this._shutdown,this)}return e.prototype.forceFlush=function(){return Promise.resolve()},e.prototype.onStart=function(e,t){},e.prototype.onEnd=function(e){this._shutdownOnce.isCalled||0!=(e.spanContext().traceFlags&l.r.SAMPLED)&&oe.internal._export(this._exporter,[e]).then((function(e){var t;e.code!==X.I.SUCCESS&&(0,E.L)(null!==(t=e.error)&&void 0!==t?t:new Error("SimpleSpanProcessor: span export failed (status "+e+")"))})).catch((function(e){(0,E.L)(e)}))},e.prototype.shutdown=function(){return this._shutdownOnce.call()},e.prototype._shutdown=function(){return this._exporter.shutdown()},e}()},7480:(e,t,a)=>{"use strict";a.r(t),a.d(t,{AwsEcsLaunchtypeValues:()=>i._t,CloudPlatformValues:()=>i.CY,CloudProviderValues:()=>i.LH,DbCassandraConsistencyLevelValues:()=>n.xM,DbSystemValues:()=>n.fL,FaasDocumentOperationValues:()=>n.ZI,FaasInvokedProviderValues:()=>n.o0,FaasTriggerValues:()=>n.iD,HostArchValues:()=>i.IV,HttpFlavorValues:()=>n.Yi,MessageTypeValues:()=>n._J,MessagingDestinationKindValues:()=>n.y8,MessagingOperationValues:()=>n.jU,NetHostConnectionSubtypeValues:()=>n.oP,NetHostConnectionTypeValues:()=>n.ZM,NetTransportValues:()=>n.Di,OsTypeValues:()=>i.er,RpcGrpcStatusCodeValues:()=>n.yG,SemanticAttributes:()=>n.og,SemanticResourceAttributes:()=>i.R9,TelemetrySdkLanguageValues:()=>i.Te});var n=a(3108),i=a(5364)},5364:(e,t,a)=>{"use strict";a.d(t,{R9:()=>n,LH:()=>i,CY:()=>o,_t:()=>r,IV:()=>s,er:()=>p,Te:()=>c});var n={CLOUD_PROVIDER:"cloud.provider",CLOUD_ACCOUNT_ID:"cloud.account.id",CLOUD_REGION:"cloud.region",CLOUD_AVAILABILITY_ZONE:"cloud.availability_zone",CLOUD_PLATFORM:"cloud.platform",AWS_ECS_CONTAINER_ARN:"aws.ecs.container.arn",AWS_ECS_CLUSTER_ARN:"aws.ecs.cluster.arn",AWS_ECS_LAUNCHTYPE:"aws.ecs.launchtype",AWS_ECS_TASK_ARN:"aws.ecs.task.arn",AWS_ECS_TASK_FAMILY:"aws.ecs.task.family",AWS_ECS_TASK_REVISION:"aws.ecs.task.revision",AWS_EKS_CLUSTER_ARN:"aws.eks.cluster.arn",AWS_LOG_GROUP_NAMES:"aws.log.group.names",AWS_LOG_GROUP_ARNS:"aws.log.group.arns",AWS_LOG_STREAM_NAMES:"aws.log.stream.names",AWS_LOG_STREAM_ARNS:"aws.log.stream.arns",CONTAINER_NAME:"container.name",CONTAINER_ID:"container.id",CONTAINER_RUNTIME:"container.runtime",CONTAINER_IMAGE_NAME:"container.image.name",CONTAINER_IMAGE_TAG:"container.image.tag",DEPLOYMENT_ENVIRONMENT:"deployment.environment",DEVICE_ID:"device.id",DEVICE_MODEL_IDENTIFIER:"device.model.identifier",DEVICE_MODEL_NAME:"device.model.name",FAAS_NAME:"faas.name",FAAS_ID:"faas.id",FAAS_VERSION:"faas.version",FAAS_INSTANCE:"faas.instance",FAAS_MAX_MEMORY:"faas.max_memory",HOST_ID:"host.id",HOST_NAME:"host.name",HOST_TYPE:"host.type",HOST_ARCH:"host.arch",HOST_IMAGE_NAME:"host.image.name",HOST_IMAGE_ID:"host.image.id",HOST_IMAGE_VERSION:"host.image.version",K8S_CLUSTER_NAME:"k8s.cluster.name",K8S_NODE_NAME:"k8s.node.name",K8S_NODE_UID:"k8s.node.uid",K8S_NAMESPACE_NAME:"k8s.namespace.name",K8S_POD_UID:"k8s.pod.uid",K8S_POD_NAME:"k8s.pod.name",K8S_CONTAINER_NAME:"k8s.container.name",K8S_REPLICASET_UID:"k8s.replicaset.uid",K8S_REPLICASET_NAME:"k8s.replicaset.name",K8S_DEPLOYMENT_UID:"k8s.deployment.uid",K8S_DEPLOYMENT_NAME:"k8s.deployment.name",K8S_STATEFULSET_UID:"k8s.statefulset.uid",K8S_STATEFULSET_NAME:"k8s.statefulset.name",K8S_DAEMONSET_UID:"k8s.daemonset.uid",K8S_DAEMONSET_NAME:"k8s.daemonset.name",K8S_JOB_UID:"k8s.job.uid",K8S_JOB_NAME:"k8s.job.name",K8S_CRONJOB_UID:"k8s.cronjob.uid",K8S_CRONJOB_NAME:"k8s.cronjob.name",OS_TYPE:"os.type",OS_DESCRIPTION:"os.description",OS_NAME:"os.name",OS_VERSION:"os.version",PROCESS_PID:"process.pid",PROCESS_EXECUTABLE_NAME:"process.executable.name",PROCESS_EXECUTABLE_PATH:"process.executable.path",PROCESS_COMMAND:"process.command",PROCESS_COMMAND_LINE:"process.command_line",PROCESS_COMMAND_ARGS:"process.command_args",PROCESS_OWNER:"process.owner",PROCESS_RUNTIME_NAME:"process.runtime.name",PROCESS_RUNTIME_VERSION:"process.runtime.version",PROCESS_RUNTIME_DESCRIPTION:"process.runtime.description",SERVICE_NAME:"service.name",SERVICE_NAMESPACE:"service.namespace",SERVICE_INSTANCE_ID:"service.instance.id",SERVICE_VERSION:"service.version",TELEMETRY_SDK_NAME:"telemetry.sdk.name",TELEMETRY_SDK_LANGUAGE:"telemetry.sdk.language",TELEMETRY_SDK_VERSION:"telemetry.sdk.version",TELEMETRY_AUTO_VERSION:"telemetry.auto.version",WEBENGINE_NAME:"webengine.name",WEBENGINE_VERSION:"webengine.version",WEBENGINE_DESCRIPTION:"webengine.description"},i={ALIBABA_CLOUD:"alibaba_cloud",AWS:"aws",AZURE:"azure",GCP:"gcp"},o={ALIBABA_CLOUD_ECS:"alibaba_cloud_ecs",ALIBABA_CLOUD_FC:"alibaba_cloud_fc",AWS_EC2:"aws_ec2",AWS_ECS:"aws_ecs",AWS_EKS:"aws_eks",AWS_LAMBDA:"aws_lambda",AWS_ELASTIC_BEANSTALK:"aws_elastic_beanstalk",AZURE_VM:"azure_vm",AZURE_CONTAINER_INSTANCES:"azure_container_instances",AZURE_AKS:"azure_aks",AZURE_FUNCTIONS:"azure_functions",AZURE_APP_SERVICE:"azure_app_service",GCP_COMPUTE_ENGINE:"gcp_compute_engine",GCP_CLOUD_RUN:"gcp_cloud_run",GCP_KUBERNETES_ENGINE:"gcp_kubernetes_engine",GCP_CLOUD_FUNCTIONS:"gcp_cloud_functions",GCP_APP_ENGINE:"gcp_app_engine"},r={EC2:"ec2",FARGATE:"fargate"},s={AMD64:"amd64",ARM32:"arm32",ARM64:"arm64",IA64:"ia64",PPC32:"ppc32",PPC64:"ppc64",X86:"x86"},p={WINDOWS:"windows",LINUX:"linux",DARWIN:"darwin",FREEBSD:"freebsd",NETBSD:"netbsd",OPENBSD:"openbsd",DRAGONFLYBSD:"dragonflybsd",HPUX:"hpux",AIX:"aix",SOLARIS:"solaris",Z_OS:"z_os"},c={CPP:"cpp",DOTNET:"dotnet",ERLANG:"erlang",GO:"go",JAVA:"java",NODEJS:"nodejs",PHP:"php",PYTHON:"python",RUBY:"ruby",WEBJS:"webjs"}},3108:(e,t,a)=>{"use strict";a.d(t,{og:()=>n,fL:()=>i,xM:()=>o,iD:()=>r,ZI:()=>s,o0:()=>p,Di:()=>c,ZM:()=>l,oP:()=>u,Yi:()=>d,y8:()=>m,jU:()=>h,yG:()=>f,_J:()=>v});var n={AWS_LAMBDA_INVOKED_ARN:"aws.lambda.invoked_arn",DB_SYSTEM:"db.system",DB_CONNECTION_STRING:"db.connection_string",DB_USER:"db.user",DB_JDBC_DRIVER_CLASSNAME:"db.jdbc.driver_classname",DB_NAME:"db.name",DB_STATEMENT:"db.statement",DB_OPERATION:"db.operation",DB_MSSQL_INSTANCE_NAME:"db.mssql.instance_name",DB_CASSANDRA_KEYSPACE:"db.cassandra.keyspace",DB_CASSANDRA_PAGE_SIZE:"db.cassandra.page_size",DB_CASSANDRA_CONSISTENCY_LEVEL:"db.cassandra.consistency_level",DB_CASSANDRA_TABLE:"db.cassandra.table",DB_CASSANDRA_IDEMPOTENCE:"db.cassandra.idempotence",DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:"db.cassandra.speculative_execution_count",DB_CASSANDRA_COORDINATOR_ID:"db.cassandra.coordinator.id",DB_CASSANDRA_COORDINATOR_DC:"db.cassandra.coordinator.dc",DB_HBASE_NAMESPACE:"db.hbase.namespace",DB_REDIS_DATABASE_INDEX:"db.redis.database_index",DB_MONGODB_COLLECTION:"db.mongodb.collection",DB_SQL_TABLE:"db.sql.table",EXCEPTION_TYPE:"exception.type",EXCEPTION_MESSAGE:"exception.message",EXCEPTION_STACKTRACE:"exception.stacktrace",EXCEPTION_ESCAPED:"exception.escaped",FAAS_TRIGGER:"faas.trigger",FAAS_EXECUTION:"faas.execution",FAAS_DOCUMENT_COLLECTION:"faas.document.collection",FAAS_DOCUMENT_OPERATION:"faas.document.operation",FAAS_DOCUMENT_TIME:"faas.document.time",FAAS_DOCUMENT_NAME:"faas.document.name",FAAS_TIME:"faas.time",FAAS_CRON:"faas.cron",FAAS_COLDSTART:"faas.coldstart",FAAS_INVOKED_NAME:"faas.invoked_name",FAAS_INVOKED_PROVIDER:"faas.invoked_provider",FAAS_INVOKED_REGION:"faas.invoked_region",NET_TRANSPORT:"net.transport",NET_PEER_IP:"net.peer.ip",NET_PEER_PORT:"net.peer.port",NET_PEER_NAME:"net.peer.name",NET_HOST_IP:"net.host.ip",NET_HOST_PORT:"net.host.port",NET_HOST_NAME:"net.host.name",NET_HOST_CONNECTION_TYPE:"net.host.connection.type",NET_HOST_CONNECTION_SUBTYPE:"net.host.connection.subtype",NET_HOST_CARRIER_NAME:"net.host.carrier.name",NET_HOST_CARRIER_MCC:"net.host.carrier.mcc",NET_HOST_CARRIER_MNC:"net.host.carrier.mnc",NET_HOST_CARRIER_ICC:"net.host.carrier.icc",PEER_SERVICE:"peer.service",ENDUSER_ID:"enduser.id",ENDUSER_ROLE:"enduser.role",ENDUSER_SCOPE:"enduser.scope",THREAD_ID:"thread.id",THREAD_NAME:"thread.name",CODE_FUNCTION:"code.function",CODE_NAMESPACE:"code.namespace",CODE_FILEPATH:"code.filepath",CODE_LINENO:"code.lineno",HTTP_METHOD:"http.method",HTTP_URL:"http.url",HTTP_TARGET:"http.target",HTTP_HOST:"http.host",HTTP_SCHEME:"http.scheme",HTTP_STATUS_CODE:"http.status_code",HTTP_FLAVOR:"http.flavor",HTTP_USER_AGENT:"http.user_agent",HTTP_REQUEST_CONTENT_LENGTH:"http.request_content_length",HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:"http.request_content_length_uncompressed",HTTP_RESPONSE_CONTENT_LENGTH:"http.response_content_length",HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:"http.response_content_length_uncompressed",HTTP_SERVER_NAME:"http.server_name",HTTP_ROUTE:"http.route",HTTP_CLIENT_IP:"http.client_ip",AWS_DYNAMODB_TABLE_NAMES:"aws.dynamodb.table_names",AWS_DYNAMODB_CONSUMED_CAPACITY:"aws.dynamodb.consumed_capacity",AWS_DYNAMODB_ITEM_COLLECTION_METRICS:"aws.dynamodb.item_collection_metrics",AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:"aws.dynamodb.provisioned_read_capacity",AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:"aws.dynamodb.provisioned_write_capacity",AWS_DYNAMODB_CONSISTENT_READ:"aws.dynamodb.consistent_read",AWS_DYNAMODB_PROJECTION:"aws.dynamodb.projection",AWS_DYNAMODB_LIMIT:"aws.dynamodb.limit",AWS_DYNAMODB_ATTRIBUTES_TO_GET:"aws.dynamodb.attributes_to_get",AWS_DYNAMODB_INDEX_NAME:"aws.dynamodb.index_name",AWS_DYNAMODB_SELECT:"aws.dynamodb.select",AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:"aws.dynamodb.global_secondary_indexes",AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:"aws.dynamodb.local_secondary_indexes",AWS_DYNAMODB_EXCLUSIVE_START_TABLE:"aws.dynamodb.exclusive_start_table",AWS_DYNAMODB_TABLE_COUNT:"aws.dynamodb.table_count",AWS_DYNAMODB_SCAN_FORWARD:"aws.dynamodb.scan_forward",AWS_DYNAMODB_SEGMENT:"aws.dynamodb.segment",AWS_DYNAMODB_TOTAL_SEGMENTS:"aws.dynamodb.total_segments",AWS_DYNAMODB_COUNT:"aws.dynamodb.count",AWS_DYNAMODB_SCANNED_COUNT:"aws.dynamodb.scanned_count",AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:"aws.dynamodb.attribute_definitions",AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:"aws.dynamodb.global_secondary_index_updates",MESSAGING_SYSTEM:"messaging.system",MESSAGING_DESTINATION:"messaging.destination",MESSAGING_DESTINATION_KIND:"messaging.destination_kind",MESSAGING_TEMP_DESTINATION:"messaging.temp_destination",MESSAGING_PROTOCOL:"messaging.protocol",MESSAGING_PROTOCOL_VERSION:"messaging.protocol_version",MESSAGING_URL:"messaging.url",MESSAGING_MESSAGE_ID:"messaging.message_id",MESSAGING_CONVERSATION_ID:"messaging.conversation_id",MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:"messaging.message_payload_size_bytes",MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:"messaging.message_payload_compressed_size_bytes",MESSAGING_OPERATION:"messaging.operation",MESSAGING_CONSUMER_ID:"messaging.consumer_id",MESSAGING_RABBITMQ_ROUTING_KEY:"messaging.rabbitmq.routing_key",MESSAGING_KAFKA_MESSAGE_KEY:"messaging.kafka.message_key",MESSAGING_KAFKA_CONSUMER_GROUP:"messaging.kafka.consumer_group",MESSAGING_KAFKA_CLIENT_ID:"messaging.kafka.client_id",MESSAGING_KAFKA_PARTITION:"messaging.kafka.partition",MESSAGING_KAFKA_TOMBSTONE:"messaging.kafka.tombstone",RPC_SYSTEM:"rpc.system",RPC_SERVICE:"rpc.service",RPC_METHOD:"rpc.method",RPC_GRPC_STATUS_CODE:"rpc.grpc.status_code",RPC_JSONRPC_VERSION:"rpc.jsonrpc.version",RPC_JSONRPC_REQUEST_ID:"rpc.jsonrpc.request_id",RPC_JSONRPC_ERROR_CODE:"rpc.jsonrpc.error_code",RPC_JSONRPC_ERROR_MESSAGE:"rpc.jsonrpc.error_message",MESSAGE_TYPE:"message.type",MESSAGE_ID:"message.id",MESSAGE_COMPRESSED_SIZE:"message.compressed_size",MESSAGE_UNCOMPRESSED_SIZE:"message.uncompressed_size"},i={OTHER_SQL:"other_sql",MSSQL:"mssql",MYSQL:"mysql",ORACLE:"oracle",DB2:"db2",POSTGRESQL:"postgresql",REDSHIFT:"redshift",HIVE:"hive",CLOUDSCAPE:"cloudscape",HSQLDB:"hsqldb",PROGRESS:"progress",MAXDB:"maxdb",HANADB:"hanadb",INGRES:"ingres",FIRSTSQL:"firstsql",EDB:"edb",CACHE:"cache",ADABAS:"adabas",FIREBIRD:"firebird",DERBY:"derby",FILEMAKER:"filemaker",INFORMIX:"informix",INSTANTDB:"instantdb",INTERBASE:"interbase",MARIADB:"mariadb",NETEZZA:"netezza",PERVASIVE:"pervasive",POINTBASE:"pointbase",SQLITE:"sqlite",SYBASE:"sybase",TERADATA:"teradata",VERTICA:"vertica",H2:"h2",COLDFUSION:"coldfusion",CASSANDRA:"cassandra",HBASE:"hbase",MONGODB:"mongodb",REDIS:"redis",COUCHBASE:"couchbase",COUCHDB:"couchdb",COSMOSDB:"cosmosdb",DYNAMODB:"dynamodb",NEO4J:"neo4j",GEODE:"geode",ELASTICSEARCH:"elasticsearch",MEMCACHED:"memcached",COCKROACHDB:"cockroachdb"},o={ALL:"all",EACH_QUORUM:"each_quorum",QUORUM:"quorum",LOCAL_QUORUM:"local_quorum",ONE:"one",TWO:"two",THREE:"three",LOCAL_ONE:"local_one",ANY:"any",SERIAL:"serial",LOCAL_SERIAL:"local_serial"},r={DATASOURCE:"datasource",HTTP:"http",PUBSUB:"pubsub",TIMER:"timer",OTHER:"other"},s={INSERT:"insert",EDIT:"edit",DELETE:"delete"},p={ALIBABA_CLOUD:"alibaba_cloud",AWS:"aws",AZURE:"azure",GCP:"gcp"},c={IP_TCP:"ip_tcp",IP_UDP:"ip_udp",IP:"ip",UNIX:"unix",PIPE:"pipe",INPROC:"inproc",OTHER:"other"},l={WIFI:"wifi",WIRED:"wired",CELL:"cell",UNAVAILABLE:"unavailable",UNKNOWN:"unknown"},u={GPRS:"gprs",EDGE:"edge",UMTS:"umts",CDMA:"cdma",EVDO_0:"evdo_0",EVDO_A:"evdo_a",CDMA2000_1XRTT:"cdma2000_1xrtt",HSDPA:"hsdpa",HSUPA:"hsupa",HSPA:"hspa",IDEN:"iden",EVDO_B:"evdo_b",LTE:"lte",EHRPD:"ehrpd",HSPAP:"hspap",GSM:"gsm",TD_SCDMA:"td_scdma",IWLAN:"iwlan",NR:"nr",NRNSA:"nrnsa",LTE_CA:"lte_ca"},d={HTTP_1_0:"1.0",HTTP_1_1:"1.1",HTTP_2_0:"2.0",SPDY:"SPDY",QUIC:"QUIC"},m={QUEUE:"queue",TOPIC:"topic"},h={RECEIVE:"receive",PROCESS:"process"},f={OK:0,CANCELLED:1,UNKNOWN:2,INVALID_ARGUMENT:3,DEADLINE_EXCEEDED:4,NOT_FOUND:5,ALREADY_EXISTS:6,PERMISSION_DENIED:7,RESOURCE_EXHAUSTED:8,FAILED_PRECONDITION:9,ABORTED:10,OUT_OF_RANGE:11,UNIMPLEMENTED:12,INTERNAL:13,UNAVAILABLE:14,DATA_LOSS:15,UNAUTHENTICATED:16},v={SENT:"SENT",RECEIVED:"RECEIVED"}},725:function(e,t,a){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,a,n){void 0===n&&(n=a);var i=Object.getOwnPropertyDescriptor(t,a);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[a]}}),Object.defineProperty(e,n,i)}:function(e,t,a,n){void 0===n&&(n=a),e[n]=t[a]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)"default"!==a&&Object.prototype.hasOwnProperty.call(e,a)&&n(t,e,a);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.oneDataSystemClientFactory=void 0,t.oneDataSystemClientFactory=async(e,t,n)=>{const i=await(async(e,t,n)=>{const i=await Promise.resolve().then((()=>o(a(7164)))),r=await Promise.resolve().then((()=>o(a(1488)))),s=new i.AppInsightsCore,p=new r.PostChannel,c={instrumentationKey:e,endpointUrl:"https://mobile.events.data.microsoft.com/OneCollector/1.0",loggingLevelTelemetry:0,loggingLevelConsole:0,disableCookiesUsage:!0,disableDbgExt:!0,disableInstrumentationKeyValidation:!0,channels:[[p]]};if(n){c.extensionConfig={};const e={alwaysUseXhrOverride:!0,httpXHROverride:n};c.extensionConfig[p.identifier]=e}const l=t.workspace.getConfiguration("telemetry").get("internalTesting");return s.initialize(c,[]),s.addTelemetryInitializer((e=>{l&&(e.ext=e.ext??{},e.ext.utc=e.ext.utc??{},e.ext.utc.flags=8462029)})),s})(e,t,n);return{logEvent:(e,t)=>{try{i?.track({name:e,baseData:{name:e,properties:t?.properties,measurements:t?.measurements}})}catch(e){throw new Error("Failed to log event to app insights!\n"+e.message)}},flush:async()=>{try{i?.unload()}catch(e){throw new Error("Failed to flush app insights!\n"+e.message)}}}}},9911:(e,t)=>{"use strict";var a;Object.defineProperty(t,"__esModule",{value:!0}),t.BaseTelemetryAppender=void 0,function(e){e[e.NOT_INSTANTIATED=0]="NOT_INSTANTIATED",e[e.INSTANTIATING=1]="INSTANTIATING",e[e.INSTANTIATED=2]="INSTANTIATED"}(a||(a={})),t.BaseTelemetryAppender=class{constructor(e,t,n){this.osShim=n,this._instantiationStatus=a.NOT_INSTANTIATED,this._eventQueue=[],this._exceptionQueue=[],this.ignoreBuiltInCommonProperties=!1,this._clientFactory=t,this._key=e}get additionalCommonProperties(){return{"common.os":this.osShim.platform,"common.nodeArch":this.osShim.architecture,"common.platformversion":(this.osShim.release||"").replace(/^(\d+)(\.\d+)?(\.\d+)?(.*)/,"$1$2$3"),"common.telemetryclientversion":"0.7.1-preview"}}logEvent(e,t){this._telemetryClient?this._telemetryClient.logEvent(e,t):this._instantiationStatus!==a.INSTANTIATED&&this._eventQueue.push({eventName:e,data:t})}logException(e,t){this._telemetryClient||this._instantiationStatus!==a.INSTANTIATED&&this._exceptionQueue.push({exception:e,data:t})}async flush(){this._telemetryClient&&(await this._telemetryClient.flush(),this._telemetryClient=void 0)}_flushQueues(){this._eventQueue.forEach((({eventName:e,data:t})=>this.logEvent(e,t))),this._eventQueue=[],this._exceptionQueue.forEach((({exception:e,data:t})=>this.logException(e,t))),this._exceptionQueue=[]}instantiateAppender(){this._instantiationStatus===a.NOT_INSTANTIATED&&(this._instantiationStatus=a.INSTANTIATING,this._clientFactory(this._key).then((e=>{this._telemetryClient=e,this._instantiationStatus=a.INSTANTIATED,this._flushQueues()})).catch((e=>{console.error(e),this._instantiationStatus=a.INSTANTIATED})))}}},3456:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseTelemetryReporter=void 0,t.BaseTelemetryReporter=class{constructor(e,t){this.telemetryAppender=e,this.vscodeAPI=t,this.userOptIn=!1,this.errorOptIn=!1,this.disposables=[],this.telemetryLogger=this.vscodeAPI.env.createTelemetryLogger(this.telemetryAppender),this.updateUserOptIn(),this.telemetryLogger.onDidChangeEnableStates((()=>{this.updateUserOptIn()}))}updateUserOptIn(){this.errorOptIn=this.telemetryLogger.isErrorsEnabled,this.userOptIn=this.telemetryLogger.isUsageEnabled,(this.telemetryLogger.isErrorsEnabled||this.telemetryLogger.isUsageEnabled)&&this.telemetryAppender.instantiateAppender()}get telemetryLevel(){return this.errorOptIn&&this.userOptIn?"all":this.errorOptIn?"error":"off"}internalSendTelemetryEvent(e,t,a,n){n?this.telemetryAppender.logEvent(e,{properties:t,measurements:a}):this.telemetryLogger.logUsage(e,{properties:t,measurements:a})}sendTelemetryEvent(e,t,a){this.internalSendTelemetryEvent(e,t,a,!1)}sendDangerousTelemetryEvent(e,t,a){this.telemetryAppender.instantiateAppender(),this.internalSendTelemetryEvent(e,t,a,!0)}internalSendTelemetryErrorEvent(e,t,a,n){n?this.telemetryAppender.logEvent(e,{properties:t,measurements:a}):this.telemetryLogger.logError(e,{properties:t,measurements:a})}sendTelemetryErrorEvent(e,t,a){this.internalSendTelemetryErrorEvent(e,t,a,!1)}sendDangerousTelemetryErrorEvent(e,t,a){this.telemetryAppender.instantiateAppender(),this.internalSendTelemetryErrorEvent(e,t,a,!0)}internalSendTelemetryException(e,t,a,n){n?this.telemetryAppender.logException(e,{properties:t,measurements:a}):this.telemetryLogger.logError(e,{properties:t,measurements:a})}sendTelemetryException(e,t,a){this.internalSendTelemetryException(e,t,a,!1)}sendDangerousTelemetryException(e,t,a){this.telemetryAppender.instantiateAppender(),this.internalSendTelemetryException(e,t,a,!0)}dispose(){return this.telemetryLogger.dispose(),Promise.all(this.disposables.map((e=>e.dispose())))}}},5888:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TelemetryUtil=void 0;class a{static applyReplacements(e,t){for(const a of Object.keys(e))for(const n of t)n.lookup.test(a)&&(void 0!==n.replacementString?e[a]=n.replacementString:delete e[a])}static shouldUseOneDataSystemSDK(e){return 74===e.length&&"-"===e[32]&&"-"===e[41]&&"-"===e[46]&&"-"===e[51]&&"-"===e[56]&&"-"===e[69]}static getInstance(){return a._instance||(a._instance=new a),a._instance}}t.TelemetryUtil=a},2291:function(e,t,a){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,a,n){void 0===n&&(n=a);var i=Object.getOwnPropertyDescriptor(t,a);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[a]}}),Object.defineProperty(e,n,i)}:function(e,t,a,n){void 0===n&&(n=a),e[n]=t[a]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)"default"!==a&&Object.prototype.hasOwnProperty.call(e,a)&&n(t,e,a);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const r=o(a(2087)),s=o(a(7549)),p=o(a(7211)),c=a(3456),l=a(9911),u=a(5888),d=a(725);class m extends c.BaseTelemetryReporter{constructor(e,t){let n=e=>(async(e,t)=>{let n;try{process.env.APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL="1";const t=await Promise.resolve().then((()=>o(a(9574))));t.defaultClient?(n=new t.TelemetryClient(e),n.channel.setUseDiskRetryCaching(!0)):(t.setup(e).setAutoCollectRequests(!1).setAutoCollectPerformance(!1).setAutoCollectExceptions(!1).setAutoCollectDependencies(!1).setAutoDependencyCorrelation(!1).setAutoCollectConsole(!1).setAutoCollectHeartbeat(!1).setUseDiskRetryCaching(!0).start(),n=t.defaultClient),s&&s.env&&(n.context.tags[n.context.keys.userId]=s.env.machineId,n.context.tags[n.context.keys.sessionId]=s.env.sessionId,n.context.tags[n.context.keys.cloudRole]=s.env.appName,n.context.tags[n.context.keys.cloudRoleInstance]=s.env.appName)}catch(e){return Promise.reject("Failed to initialize app insights!\n"+e.message)}return t?.length&&function(e,t){e.addTelemetryProcessor((e=>(Array.isArray(e.tags)?e.tags.forEach((e=>u.TelemetryUtil.applyReplacements(e,t))):e.tags&&u.TelemetryUtil.applyReplacements(e.tags,t),e.data.baseData&&u.TelemetryUtil.applyReplacements(e.data.baseData,t),!0)))}(n,t),{logEvent:(e,t)=>{try{n?.trackEvent({name:e,properties:t?.properties,measurements:t?.measurements})}catch(e){throw new Error("Failed to log event to app insights!\n"+e.message)}},flush:async()=>{try{n?.flush()}catch(e){throw new Error("Failed to flush app insights!\n"+e.message)}}}})(e,t);u.TelemetryUtil.shouldUseOneDataSystemSDK(e)&&(n=e=>(0,d.oneDataSystemClientFactory)(e,s,{sendPOST:(e,t)=>{const a={method:"POST",headers:{...e.headers,"Content-Type":"application/json","Content-Length":Buffer.byteLength(e.data)}};try{const n=p.request(e.urlString,a,(e=>{e.on("data",(function(a){t(e.statusCode??200,e.headers,a.toString())})),e.on("error",(function(){t(0,{})}))}));n.write(e.data),n.end()}catch{t(0,{})}}}));const i=new l.BaseTelemetryAppender(e,n,{release:r.release(),platform:r.platform(),architecture:r.arch()});if(e&&0===e.indexOf("AIF-"))throw new Error("AIF keys are no longer supported. Please switch to 1DS keys for 1st party extensions");super(i,s)}}t.default=m},699:function(e,t,a){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,a=1,n=arguments.length;a{"use strict";var n=a(7396),i=function(){function e(t){if(e.INSTANCE)throw new Error("Console logging adapter tracking should be configured from the applicationInsights object");this._client=t,e.INSTANCE=this}return e.prototype.enable=function(e,t){n.IsInitialized&&(a(4309).wp(e&&t,this._client),a(5823).wp(e,this._client),a(454).wp(e,this._client))},e.prototype.isInitialized=function(){return this._isInitialized},e.prototype.dispose=function(){e.INSTANCE=null,this.enable(!1,!1)},e._methodNames=["debug","info","log","warn","error"],e}();e.exports=i},894:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CorrelationContextManager=void 0;var n=a(5282),i=a(7396),o=a(8090),r=a(6333),s=a(6694),p=a(5740),c=function(){function e(){}return e.getCurrentContext=function(){if(!e.enabled)return null;var t=e.session.get(e.CONTEXT_NAME);return void 0===t?null:t},e.generateContextObject=function(e,t,a,n,i,o){return t=t||e,this.enabled?{operation:{name:a,id:e,parentId:t,traceparent:i,tracestate:o},customProperties:new l(n)}:null},e.spanToContextObject=function(t,a,n){var i=new o;return i.traceId=t.traceId,i.spanId=t.spanId,i.traceFlag=o.formatOpenTelemetryTraceFlags(t.traceFlags)||o.DEFAULT_TRACE_FLAG,i.parentId=a,e.generateContextObject(i.traceId,i.parentId,n,null,i)},e.runWithContext=function(t,a){var i;if(e.enabled)try{return e.session.bind(a,((i={})[e.CONTEXT_NAME]=t,i))()}catch(e){n.warn("Error binding to session context",p.dumpObj(e))}return a()},e.wrapEmitter=function(t){if(e.enabled)try{e.session.bindEmitter(t)}catch(e){n.warn("Error binding to session context",p.dumpObj(e))}},e.wrapCallback=function(t,a){var i;if(e.enabled)try{return e.session.bind(t,a?((i={})[e.CONTEXT_NAME]=a,i):void 0)}catch(e){n.warn("Error binding to session context",p.dumpObj(e))}return t},e.enable=function(t){this.enabled||(this.isNodeVersionCompatible()?(e.hasEverEnabled||(this.forceClsHooked=t,this.hasEverEnabled=!0,void 0===this.cls&&(!0===e.forceClsHooked||void 0===e.forceClsHooked&&e.shouldUseClsHooked()?this.cls=a(9562):this.cls=a(3057)),e.session=this.cls.createNamespace("AI-CLS-Session"),i.registerContextPreservation((function(t){try{return e.session.bind(t)}catch(e){n.warn("Error binding to session context",p.dumpObj(e))}}))),this.enabled=!0):this.enabled=!1)},e.startOperation=function(t,a){var i=t&&t.traceContext||null,p=t&&t.spanContext?t:null,c=t&&t.traceId?t:null,l=t&&t.headers;if(p)return this.spanToContextObject(p.spanContext(),p.parentSpanId,p.name);if(c)return this.spanToContextObject(c,"|"+c.traceId+"."+c.spanId+".","string"==typeof a?a:"");if(i){var u=null,d=null;a.headers&&(a.headers.traceparent?u=new o(a.headers.traceparent):a.headers["request-id"]&&(u=new o(null,a.headers["request-id"])),a.headers.tracestate&&(d=new r(a.headers.tracestate))),u||(u=new o(i.traceparent)),d||(d=new r(i.tracestate));var m="object"==typeof a?new s(a):null;return e.generateContextObject(u.traceId,u.parentId,"string"==typeof a?a:m.getOperationName({}),m&&m.getCorrelationContextHeader()||void 0,u,d)}return l?(u=new o(l.traceparent?l.traceparent.toString():null),d=new r(l.tracestate?l.tracestate.toString():null),m=new s(t),e.generateContextObject(u.traceId,u.parentId,m.getOperationName({}),m.getCorrelationContextHeader(),u,d)):(n.warn("startOperation was called with invalid arguments",arguments),null)},e.disable=function(){this.enabled=!1},e.reset=function(){e.hasEverEnabled&&(e.session=null,e.session=this.cls.createNamespace("AI-CLS-Session"))},e.isNodeVersionCompatible=function(){var e=process.versions.node.split(".");return parseInt(e[0])>3||parseInt(e[0])>2&&parseInt(e[1])>2},e.shouldUseClsHooked=function(){var e=process.versions.node.split(".");return parseInt(e[0])>8||parseInt(e[0])>=8&&parseInt(e[1])>=2},e.canUseClsHooked=function(){var e=process.versions.node.split("."),t=parseInt(e[0])>8||parseInt(e[0])>=8&&parseInt(e[1])>=0,a=parseInt(e[0])<8||parseInt(e[0])<=8&&parseInt(e[1])<2,n=parseInt(e[0])>4||parseInt(e[0])>=4&&parseInt(e[1])>=7;return!(t&&a)&&n},e.enabled=!1,e.hasEverEnabled=!1,e.forceClsHooked=void 0,e.CONTEXT_NAME="ApplicationInsights-Context",e}();t.CorrelationContextManager=c;var l=function(){function e(e){this.props=[],this.addHeaderData(e)}return e.prototype.addHeaderData=function(e){var t=e?e.split(", "):[];this.props=t.map((function(e){var t=e.split("=");return{key:t[0],value:t[1]}})).concat(this.props)},e.prototype.serializeToHeader=function(){return this.props.map((function(e){return e.key+"="+e.value})).join(", ")},e.prototype.getProperty=function(e){for(var t=0;t0&&e.forEach((function(e){var a=e.name;if(void 0!==a){var n=e.value;switch(typeof n){case"function":case"object":break;case"string":t+=" "+a+': "'+n+'",\r\n';break;default:t+=" "+a+": "+n+",\r\n"}}}))}catch(e){this._isEnabled=!1,r.info("Parse client web instrumentation error. Web Instrumentation is disabled")}return t},e.prototype._initialize=function(){this._isInitialized=!0;var t=n.createServer,a=i.createServer,o=this._isEnabled;n.createServer=function(a){var n=a;return n&&(a=function(t,a){var i=a.write,p="GET"==t.method;a.write=function(t,n,c){try{if(o&&p){var l=s.getContentEncodingFromHeaders(a),u=void 0;if("string"==typeof n&&(u=n),null==l)e.INSTANCE.ValidateInjection(a,t)&&(arguments[0]=e.INSTANCE.InjectWebSnippet(a,t,void 0,u));else if(l.length){var d=l[0];arguments[0]=e.INSTANCE.InjectWebSnippet(a,t,d)}}}catch(e){r.warn("Inject snippet error: "+e)}return i.apply(a,arguments)};var c=a.end;return a.end=function(t,n,i){if(o&&p)try{if(o&&p){var l=s.getContentEncodingFromHeaders(a),u=void 0;if("string"==typeof n&&(u=n),null==l)e.INSTANCE.ValidateInjection(a,t)&&(arguments[0]=e.INSTANCE.InjectWebSnippet(a,t,void 0,u));else if(l.length){var d=l[0];arguments[0]=e.INSTANCE.InjectWebSnippet(a,t,d)}}}catch(e){r.warn("Inject snipet error: "+e)}return c.apply(a,arguments)},n(t,a)}),t(a)},i.createServer=function(t,n){var i=n;if(i)return a(t,n=function(t,a){var n="GET"==t.method,p=a.write,c=a.end;return a.write=function(t,i,c){try{if(o&&n){var l=s.getContentEncodingFromHeaders(a),u=void 0;if("string"==typeof i&&(u=i),null==l)e.INSTANCE.ValidateInjection(a,t)&&(arguments[0]=this.InjectWebSnippet(a,t,void 0,u));else if(l.length){var d=l[0];arguments[0]=e.INSTANCE.InjectWebSnippet(a,t,d)}}}catch(e){r.warn("Inject snippet error: "+e)}return p.apply(a,arguments)},a.end=function(t,i,p){try{if(o&&n){var l=s.getContentEncodingFromHeaders(a),u=void 0;if("string"==typeof i&&(u=i),null==l)e.INSTANCE.ValidateInjection(a,t)&&(arguments[0]=e.INSTANCE.InjectWebSnippet(a,t,void 0,u));else if(l.length){var d=l[0];arguments[0]=e.INSTANCE.InjectWebSnippet(a,t,d)}}}catch(e){r.warn("Inject snippet error: "+e)}return c.apply(a,arguments)},i(t,a)})}},e.prototype.ValidateInjection=function(t,a){try{if(!t||!a||200!=t.statusCode)return!1;if(!s.isContentTypeHeaderHtml(t))return!1;var n=a.slice().toString();if(n.indexOf("")>=0&&n.indexOf("")>=0&&n.indexOf(e._aiUrl)<0&&n.indexOf(e._aiDeprecatedUrl)<0)return!0}catch(e){r.info("validate injections error: "+e)}return!1},e.prototype.InjectWebSnippet=function(t,a,n,i){try{if(n)t.removeHeader("Content-Length"),a=this._getInjectedCompressBuffer(t,a,n),t.setHeader("Content-Length",a.length);else{var o=a.toString(),p=o.indexOf("");if(p<0)return a;var c=s.insertSnippetByIndex(p,o,e._snippet);if("string"==typeof a)t.removeHeader("Content-Length"),a=c,t.setHeader("Content-Length",Buffer.byteLength(a));else if(Buffer.isBuffer(a)){var l=i||"utf8";if(s.isBufferType(a,l)){t.removeHeader("Content-Length");var u=Buffer.from(c).toString(l);a=Buffer.from(u,l),t.setHeader("Content-Length",a.length)}}}}catch(e){r.warn("Failed to inject web snippet and change content-lenght headers. Exception:"+e)}return a},e.prototype._getInjectedCompressBuffer=function(e,t,a){try{switch(a){case s.contentEncodingMethod.GZIP:var n=o.gunzipSync(t);if(this.ValidateInjection(e,n)){var i=this.InjectWebSnippet(e,n);t=o.gzipSync(i)}break;case s.contentEncodingMethod.DEFLATE:var p=o.inflateSync(t);if(this.ValidateInjection(e,p)){var c=this.InjectWebSnippet(e,p);t=o.deflateSync(c)}break;case s.contentEncodingMethod.BR:var l=s.getBrotliDecompressSync(o),u=s.getBrotliCompressSync(o);if(l&&u){var d=l(t);this.ValidateInjection(e,d)&&(t=u(this.InjectWebSnippet(e,d)));break}}}catch(e){r.info("get web injection compress buffer error: "+e)}return t},e.prototype.dispose=function(){e.INSTANCE=null,this.enable(!1),this._isInitialized=!1},e}();e.exports=d},211:function(e,t,a){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,a=1,n=arguments.length;a{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.spanToTelemetryContract=void 0;var n=a(8835),i=a(4284),o=a(7480),r=a(3580),s=a(211),p=a(5740);function c(e){if(e.attributes[o.SemanticAttributes.HTTP_METHOD]){var t=e.attributes[o.SemanticAttributes.HTTP_URL];if(t)return String(t);var a=e.attributes[o.SemanticAttributes.HTTP_SCHEME],n=e.attributes[o.SemanticAttributes.HTTP_TARGET];if(a&&n){var i=e.attributes[o.SemanticAttributes.HTTP_HOST];if(i)return a+"://"+i+n;var r=e.attributes[o.SemanticAttributes.NET_PEER_PORT];if(r){var s=e.attributes[o.SemanticAttributes.NET_PEER_NAME];if(s)return a+"://"+s+":"+r+n;var p=e.attributes[o.SemanticAttributes.NET_PEER_IP];if(p)return a+"://"+p+":"+r+n}}}return""}function l(e){var t=e.attributes[o.SemanticAttributes.PEER_SERVICE],a=e.attributes[o.SemanticAttributes.HTTP_HOST],n=e.attributes[o.SemanticAttributes.HTTP_URL],i=e.attributes[o.SemanticAttributes.NET_PEER_NAME],r=e.attributes[o.SemanticAttributes.NET_PEER_IP];return t?String(t):a?String(a):n?String(n):i?String(i):r?String(r):""}t.spanToTelemetryContract=function(e){var t;switch(e.kind){case i.SpanKind.CLIENT:case i.SpanKind.PRODUCER:case i.SpanKind.INTERNAL:t=function(e){var t={name:e.name,success:e.status.code!=i.SpanStatusCode.ERROR,resultCode:"0",duration:0,data:"",dependencyTypeName:""};e.kind===i.SpanKind.PRODUCER&&(t.dependencyTypeName=r.DependencyTypeName.QueueMessage),e.kind===i.SpanKind.INTERNAL&&e.parentSpanId&&(t.dependencyTypeName=r.DependencyTypeName.InProc);var a=e.attributes[o.SemanticAttributes.HTTP_METHOD],s=e.attributes[o.SemanticAttributes.DB_SYSTEM],p=e.attributes[o.SemanticAttributes.RPC_SYSTEM];if(a){t.dependencyTypeName=r.DependencyTypeName.Http;var u=e.attributes[o.SemanticAttributes.HTTP_URL];if(u){var d="";try{d=new n.URL(String(u)).pathname}catch(e){}t.name=a+" "+d}t.data=c(e);var m=e.attributes[o.SemanticAttributes.HTTP_STATUS_CODE];if(m&&(t.resultCode=String(m)),b=l(e)){try{var h=new RegExp(/(https?)(:\/\/.*)(:\d+)(\S*)/).exec(b);if(null!=h){var f=h[1],v=h[3];("https"==f&&":443"==v||"http"==f&&":80"==v)&&(b=h[1]+h[2]+h[4])}}catch(e){}t.target=""+b}}else if(s){String(s)===o.DbSystemValues.MYSQL?t.dependencyTypeName="mysql":String(s)===o.DbSystemValues.POSTGRESQL?t.dependencyTypeName="postgresql":String(s)===o.DbSystemValues.MONGODB?t.dependencyTypeName="mongodb":String(s)===o.DbSystemValues.REDIS?t.dependencyTypeName="redis":function(e){return e===o.DbSystemValues.DB2||e===o.DbSystemValues.DERBY||e===o.DbSystemValues.MARIADB||e===o.DbSystemValues.MSSQL||e===o.DbSystemValues.ORACLE||e===o.DbSystemValues.SQLITE||e===o.DbSystemValues.OTHER_SQL||e===o.DbSystemValues.HSQLDB||e===o.DbSystemValues.H2}(String(s))?t.dependencyTypeName="SQL":t.dependencyTypeName=String(s);var g=e.attributes[o.SemanticAttributes.DB_STATEMENT],y=e.attributes[o.SemanticAttributes.DB_OPERATION];g?t.data=String(g):y&&(t.data=String(y));var b=l(e),w=e.attributes[o.SemanticAttributes.DB_NAME];t.target=b?w?b+"|"+w:""+b:w?""+w:""+s}else if(p){t.dependencyTypeName=r.DependencyTypeName.Grpc;var _=e.attributes[o.SemanticAttributes.RPC_GRPC_STATUS_CODE];_&&(t.resultCode=String(_)),(b=l(e))?t.target=""+b:p&&(t.target=String(p))}return t}(e);break;case i.SpanKind.SERVER:case i.SpanKind.CONSUMER:t=function(e){var t={name:e.name,success:e.status.code!=i.SpanStatusCode.ERROR,resultCode:"0",duration:0,url:"",source:void 0},a=e.attributes[o.SemanticAttributes.HTTP_METHOD],r=e.attributes[o.SemanticAttributes.RPC_GRPC_STATUS_CODE];if(a){if(e.kind==i.SpanKind.SERVER){var s=e.attributes[o.SemanticAttributes.HTTP_ROUTE],p=e.attributes[o.SemanticAttributes.HTTP_URL];if(s)t.name=a+" "+s;else if(p)try{var l=new n.URL(String(p));t.name=a+" "+l.pathname}catch(e){}}t.url=c(e);var u=e.attributes[o.SemanticAttributes.HTTP_STATUS_CODE];u&&(t.resultCode=String(u))}else r&&(t.resultCode=String(r));return t}(e)}var a=""+(e.spanContext?e.spanContext():e.context()).spanId,u=Math.round(1e3*e.duration[0]+e.duration[1]/1e6);return t.id=a,t.duration=u,t.properties=function(e){for(var t={},a=0,n=Object.keys(e.attributes);a0&&(t["_MS.links"]=p.stringify(o)),t}(e),e.attributes[r.AzNamespace]&&(e.kind===i.SpanKind.INTERNAL&&(t.dependencyTypeName=r.DependencyTypeName.InProc+" | "+e.attributes[r.AzNamespace]),e.attributes[r.AzNamespace]===r.MicrosoftEventHub&&s.parseEventHubSpan(e,t)),t}},9879:(e,t,a)=>{"use strict";t.wp=t.qP=void 0;var n=a(4284),i=a(3580),o=a(4953),r=a(5946),s=a(699),p=[];t.qP=function(e){try{var t=e.data,a=r.spanToTelemetryContract(t);s.AsyncScopeManager.with(t,(function(){p.forEach((function(e){t.kind===n.SpanKind.SERVER||t.kind===n.SpanKind.CONSUMER?e.trackRequest(a):t.kind!==n.SpanKind.CLIENT&&t.kind!==n.SpanKind.INTERNAL&&t.kind!==n.SpanKind.PRODUCER||e.trackDependency(a)}))}))}catch(e){}},t.wp=function(e,a){if(e){if(p.find((function(e){return e==a})))return;0===p.length&&o.channel.subscribe("azure-coretracing",t.qP,o.trueFilter,(function(e,t){var n=a.getStatsbeat();n&&n.addInstrumentation(i.StatsbeatInstrumentation.AZURE_CORE_TRACING)})),p.push(a)}else 0===(p=p.filter((function(e){return e!=a}))).length&&o.channel.unsubscribe("azure-coretracing",t.qP)}},5823:(e,t,a)=>{"use strict";t.wp=void 0;var n=a(5290),i=a(3580),o=a(4953),r=[],s={10:n.SeverityLevel.Verbose,20:n.SeverityLevel.Verbose,30:n.SeverityLevel.Information,40:n.SeverityLevel.Warning,50:n.SeverityLevel.Error,60:n.SeverityLevel.Critical},p=function(e){var t=e.data.result;r.forEach((function(a){try{var n=JSON.parse(t);if(n.err){var i=new Error(n.err.message);return i.name=n.err.name,i.stack=n.err.stack,void a.trackException({exception:i})}}catch(e){}var o=s[e.data.level];a.trackTrace({message:t,severity:o})}))};t.wp=function(e,t){if(e){if(r.find((function(e){return e==t})))return;0===r.length&&o.channel.subscribe("bunyan",p,o.trueFilter,(function(e,a){var n=t.getStatsbeat();n&&n.addInstrumentation(i.StatsbeatInstrumentation.BUNYAN)})),r.push(t)}else 0===(r=r.filter((function(e){return e!=t}))).length&&o.channel.unsubscribe("bunyan",p)}},4309:(e,t,a)=>{"use strict";t.wp=void 0;var n=a(5290),i=a(3580),o=a(4953),r=[],s=function(e){var t=e.data.message;r.forEach((function(a){t instanceof Error?a.trackException({exception:t}):(t.lastIndexOf("\n")==t.length-1&&(t=t.substring(0,t.length-1)),a.trackTrace({message:t,severity:e.data.stderr?n.SeverityLevel.Warning:n.SeverityLevel.Information}))}))};t.wp=function(e,t){if(e){if(r.find((function(e){return e==t})))return;0===r.length&&o.channel.subscribe("console",s,o.trueFilter,(function(e,a){var n=t.getStatsbeat();n&&n.addInstrumentation(i.StatsbeatInstrumentation.CONSOLE)})),r.push(t)}else 0===(r=r.filter((function(e){return e!=t}))).length&&o.channel.unsubscribe("console",s)}},7396:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerContextPreservation=t.IsInitialized=void 0;var n=a(5282),i=a(3063);t.IsInitialized=!i.JsonConfig.getInstance().noDiagnosticChannel;var o="DiagnosticChannel";if(t.IsInitialized){var r=a(4106),s=i.JsonConfig.getInstance().noPatchModules.split(","),p={bunyan:r.bunyan,console:r.console,mongodb:r.mongodb,mongodbCore:r.mongodbCore,mysql:r.mysql,redis:r.redis,pg:r.pg,pgPool:r.pgPool,winston:r.winston,azuresdk:r.azuresdk};for(var c in p)-1===s.indexOf(c)&&(p[c].enable(),n.info(o,"Subscribed to "+c+" events"));s.length>0&&n.info(o,"Some modules will not be patched",s)}else n.info(o,"Not subscribing to dependency autocollection because APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL was set");t.registerContextPreservation=function(e){t.IsInitialized&&a(4953).channel.addContextPreservation(e)}},7886:(e,t,a)=>{"use strict";t.wp=t.qP=void 0;var n=a(3580),i=a(4953),o=[];t.qP=function(e){"ismaster"!==e.data.event.commandName&&o.forEach((function(t){var a=e.data.startedData&&e.data.startedData.databaseName||"Unknown database";t.trackDependency({target:a,data:e.data.event.commandName,name:e.data.event.commandName,duration:e.data.event.duration,success:e.data.succeeded,resultCode:e.data.succeeded?"0":"1",time:e.data.startedData.time,dependencyTypeName:"mongodb"})}))},t.wp=function(e,a){if(e){if(o.find((function(e){return e==a})))return;0===o.length&&i.channel.subscribe("mongodb",t.qP,i.trueFilter,(function(e,t){var i=a.getStatsbeat();i&&i.addInstrumentation(n.StatsbeatInstrumentation.MONGODB)})),o.push(a)}else 0===(o=o.filter((function(e){return e!=a}))).length&&i.channel.unsubscribe("mongodb",t.qP)}},4777:(e,t,a)=>{"use strict";t.wp=t.qP=void 0;var n=a(3580),i=a(4953),o=[];t.qP=function(e){o.forEach((function(t){var a=e.data.query||{},n=a.sql||"Unknown query",i=!e.data.err,o=(a._connection||{}).config||{},r=o.socketPath?o.socketPath:(o.host||"localhost")+":"+o.port;t.trackDependency({target:r,data:n,name:n,duration:e.data.duration,success:i,resultCode:i?"0":"1",time:e.data.time,dependencyTypeName:"mysql"})}))},t.wp=function(e,a){if(e){if(o.find((function(e){return e==a})))return;0===o.length&&i.channel.subscribe("mysql",t.qP,i.trueFilter,(function(e,t){var i=a.getStatsbeat();i&&i.addInstrumentation(n.StatsbeatInstrumentation.MYSQL)})),o.push(a)}else 0===(o=o.filter((function(e){return e!=a}))).length&&i.channel.unsubscribe("mysql",t.qP)}},9843:(e,t,a)=>{"use strict";t.wp=t.qP=void 0;var n=a(3580),i=a(4953),o=[];t.qP=function(e){o.forEach((function(t){var a=e.data.query,n=a.preparable&&a.preparable.text||a.plan||a.text||"unknown query",i=!e.data.error,o=e.data.database.host+":"+e.data.database.port;t.trackDependency({target:o,data:n,name:n,duration:e.data.duration,success:i,resultCode:i?"0":"1",time:e.data.time,dependencyTypeName:"postgres"})}))},t.wp=function(e,a){if(e){if(o.find((function(e){return e==a})))return;0===o.length&&i.channel.subscribe("postgres",t.qP,i.trueFilter,(function(e,t){var i=a.getStatsbeat();i&&i.addInstrumentation(n.StatsbeatInstrumentation.POSTGRES)})),o.push(a)}else 0===(o=o.filter((function(e){return e!=a}))).length&&i.channel.unsubscribe("postgres",t.qP)}},5071:(e,t,a)=>{"use strict";t.wp=t.qP=void 0;var n=a(3580),i=a(4953),o=[];t.qP=function(e){o.forEach((function(t){"info"!==e.data.commandObj.command&&t.trackDependency({target:e.data.address,name:e.data.commandObj.command,data:e.data.commandObj.command,duration:e.data.duration,success:!e.data.err,resultCode:e.data.err?"1":"0",time:e.data.time,dependencyTypeName:"redis"})}))},t.wp=function(e,a){if(e){if(o.find((function(e){return e==a})))return;0===o.length&&i.channel.subscribe("redis",t.qP,i.trueFilter,(function(e,t){var i=a.getStatsbeat();i&&i.addInstrumentation(n.StatsbeatInstrumentation.REDIS)})),o.push(a)}else 0===(o=o.filter((function(e){return e!=a}))).length&&i.channel.unsubscribe("redis",t.qP)}},454:(e,t,a)=>{"use strict";t.wp=void 0;var n=a(3580),i=a(5290),o=a(4953),r=[],s={syslog:function(e){var t={emerg:i.SeverityLevel.Critical,alert:i.SeverityLevel.Critical,crit:i.SeverityLevel.Critical,error:i.SeverityLevel.Error,warning:i.SeverityLevel.Warning,notice:i.SeverityLevel.Information,info:i.SeverityLevel.Information,debug:i.SeverityLevel.Verbose};return void 0===t[e]?i.SeverityLevel.Information:t[e]},npm:function(e){var t={error:i.SeverityLevel.Error,warn:i.SeverityLevel.Warning,info:i.SeverityLevel.Information,verbose:i.SeverityLevel.Verbose,debug:i.SeverityLevel.Verbose,silly:i.SeverityLevel.Verbose};return void 0===t[e]?i.SeverityLevel.Information:t[e]},unknown:function(e){return i.SeverityLevel.Information}},p=function(e){var t=e.data.message;r.forEach((function(a){if(t instanceof Error)a.trackException({exception:t,properties:e.data.meta});else{var n=s[e.data.levelKind](e.data.level);a.trackTrace({message:t,severity:n,properties:e.data.meta})}}))};t.wp=function(e,t){if(e){if(r.find((function(e){return e==t})))return;0===r.length&&o.channel.subscribe("winston",p,o.trueFilter,(function(e,a){var i=t.getStatsbeat();i&&i.addInstrumentation(n.StatsbeatInstrumentation.WINSTON)})),r.push(t)}else 0===(r=r.filter((function(e){return e!=t}))).length&&o.channel.unsubscribe("winston",p)}},3580:(e,t)=>{"use strict";var a,n,i,o,r,s,p,c;Object.defineProperty(t,"__esModule",{value:!0}),t.WEB_INSTRUMENTATION_DEPRECATED_SOURCE=t.WEB_INSTRUMENTATION_DEFAULT_SOURCE=t.TIME_SINCE_ENQUEUED=t.ENQUEUED_TIME=t.MessageBusDestination=t.MicrosoftEventHub=t.AzNamespace=t.StatsbeatNetworkCategory=t.StatsbeatFeatureType=t.StatsbeatInstrumentation=t.StatsbeatFeature=t.StatsbeatCounter=t.StatsbeatAttach=t.StatsbeatResourceProvider=t.StatsbeatTelemetryName=t.HeartBeatMetricName=t.DependencyTypeName=t.TelemetryTypeStringToQuickPulseDocumentType=t.TelemetryTypeStringToQuickPulseType=t.QuickPulseType=t.QuickPulseDocumentType=t.PerformanceToQuickPulseCounter=t.MetricId=t.PerformanceCounter=t.QuickPulseCounter=t.DEFAULT_LIVEMETRICS_HOST=t.DEFAULT_LIVEMETRICS_ENDPOINT=t.DEFAULT_BREEZE_ENDPOINT=t.APPLICATION_INSIGHTS_SDK_VERSION=void 0,t.APPLICATION_INSIGHTS_SDK_VERSION="2.3.6",t.DEFAULT_BREEZE_ENDPOINT="https://dc.services.visualstudio.com",t.DEFAULT_LIVEMETRICS_ENDPOINT="https://rt.services.visualstudio.com",t.DEFAULT_LIVEMETRICS_HOST="rt.services.visualstudio.com",function(e){e.COMMITTED_BYTES="\\Memory\\Committed Bytes",e.PROCESSOR_TIME="\\Processor(_Total)\\% Processor Time",e.REQUEST_RATE="\\ApplicationInsights\\Requests/Sec",e.REQUEST_FAILURE_RATE="\\ApplicationInsights\\Requests Failed/Sec",e.REQUEST_DURATION="\\ApplicationInsights\\Request Duration",e.DEPENDENCY_RATE="\\ApplicationInsights\\Dependency Calls/Sec",e.DEPENDENCY_FAILURE_RATE="\\ApplicationInsights\\Dependency Calls Failed/Sec",e.DEPENDENCY_DURATION="\\ApplicationInsights\\Dependency Call Duration",e.EXCEPTION_RATE="\\ApplicationInsights\\Exceptions/Sec"}(n=t.QuickPulseCounter||(t.QuickPulseCounter={})),function(e){e.PRIVATE_BYTES="\\Process(??APP_WIN32_PROC??)\\Private Bytes",e.AVAILABLE_BYTES="\\Memory\\Available Bytes",e.PROCESSOR_TIME="\\Processor(_Total)\\% Processor Time",e.PROCESS_TIME="\\Process(??APP_WIN32_PROC??)\\% Processor Time",e.REQUEST_RATE="\\ASP.NET Applications(??APP_W3SVC_PROC??)\\Requests/Sec",e.REQUEST_DURATION="\\ASP.NET Applications(??APP_W3SVC_PROC??)\\Request Execution Time"}(i=t.PerformanceCounter||(t.PerformanceCounter={})),(c=t.MetricId||(t.MetricId={})).REQUESTS_DURATION="requests/duration",c.DEPENDENCIES_DURATION="dependencies/duration",c.EXCEPTIONS_COUNT="exceptions/count",c.TRACES_COUNT="traces/count",t.PerformanceToQuickPulseCounter=((a={})[i.PROCESSOR_TIME]=n.PROCESSOR_TIME,a[i.REQUEST_RATE]=n.REQUEST_RATE,a[i.REQUEST_DURATION]=n.REQUEST_DURATION,a[n.COMMITTED_BYTES]=n.COMMITTED_BYTES,a[n.REQUEST_FAILURE_RATE]=n.REQUEST_FAILURE_RATE,a[n.DEPENDENCY_RATE]=n.DEPENDENCY_RATE,a[n.DEPENDENCY_FAILURE_RATE]=n.DEPENDENCY_FAILURE_RATE,a[n.DEPENDENCY_DURATION]=n.DEPENDENCY_DURATION,a[n.EXCEPTION_RATE]=n.EXCEPTION_RATE,a),t.QuickPulseDocumentType={Event:"Event",Exception:"Exception",Trace:"Trace",Metric:"Metric",Request:"Request",Dependency:"RemoteDependency",Availability:"Availability",PageView:"PageView"},t.QuickPulseType={Event:"EventTelemetryDocument",Exception:"ExceptionTelemetryDocument",Trace:"TraceTelemetryDocument",Metric:"MetricTelemetryDocument",Request:"RequestTelemetryDocument",Dependency:"DependencyTelemetryDocument",Availability:"AvailabilityTelemetryDocument",PageView:"PageViewTelemetryDocument"},t.TelemetryTypeStringToQuickPulseType={EventData:t.QuickPulseType.Event,ExceptionData:t.QuickPulseType.Exception,MessageData:t.QuickPulseType.Trace,MetricData:t.QuickPulseType.Metric,RequestData:t.QuickPulseType.Request,RemoteDependencyData:t.QuickPulseType.Dependency,AvailabilityData:t.QuickPulseType.Availability,PageViewData:t.QuickPulseType.PageView},t.TelemetryTypeStringToQuickPulseDocumentType={EventData:t.QuickPulseDocumentType.Event,ExceptionData:t.QuickPulseDocumentType.Exception,MessageData:t.QuickPulseDocumentType.Trace,MetricData:t.QuickPulseDocumentType.Metric,RequestData:t.QuickPulseDocumentType.Request,RemoteDependencyData:t.QuickPulseDocumentType.Dependency,AvailabilityData:t.QuickPulseDocumentType.Availability,PageViewData:t.QuickPulseDocumentType.PageView},t.DependencyTypeName={Grpc:"GRPC",Http:"HTTP",InProc:"InProc",Sql:"SQL",QueueMessage:"Queue Message"},t.HeartBeatMetricName="HeartBeat",t.StatsbeatTelemetryName="Statsbeat",t.StatsbeatResourceProvider={appsvc:"appsvc",functions:"functions",vm:"vm",unknown:"unknown"},t.StatsbeatAttach={codeless:"codeless",sdk:"sdk"},t.StatsbeatCounter={REQUEST_SUCCESS:"Request Success Count",REQUEST_FAILURE:"Request Failure Count",REQUEST_DURATION:"Request Duration",RETRY_COUNT:"Retry Count",THROTTLE_COUNT:"Throttle Count",EXCEPTION_COUNT:"Exception Count",ATTACH:"Attach",FEATURE:"Feature"},(p=t.StatsbeatFeature||(t.StatsbeatFeature={}))[p.NONE=0]="NONE",p[p.DISK_RETRY=1]="DISK_RETRY",p[p.AAD_HANDLING=2]="AAD_HANDLING",p[p.WEB_SNIPPET=4]="WEB_SNIPPET",(s=t.StatsbeatInstrumentation||(t.StatsbeatInstrumentation={}))[s.NONE=0]="NONE",s[s.AZURE_CORE_TRACING=1]="AZURE_CORE_TRACING",s[s.MONGODB=2]="MONGODB",s[s.MYSQL=4]="MYSQL",s[s.REDIS=8]="REDIS",s[s.POSTGRES=16]="POSTGRES",s[s.BUNYAN=32]="BUNYAN",s[s.WINSTON=64]="WINSTON",s[s.CONSOLE=128]="CONSOLE",(r=t.StatsbeatFeatureType||(t.StatsbeatFeatureType={}))[r.Feature=0]="Feature",r[r.Instrumentation=1]="Instrumentation",(o=t.StatsbeatNetworkCategory||(t.StatsbeatNetworkCategory={}))[o.Breeze=0]="Breeze",o[o.Quickpulse=1]="Quickpulse",t.AzNamespace="az.namespace",t.MicrosoftEventHub="Microsoft.EventHub",t.MessageBusDestination="message_bus.destination",t.ENQUEUED_TIME="enqueuedTime",t.TIME_SINCE_ENQUEUED="timeSinceEnqueued",t.WEB_INSTRUMENTATION_DEFAULT_SOURCE="https://js.monitor.azure.com/scripts/b/ai",t.WEB_INSTRUMENTATION_DEPRECATED_SOURCE="https://az416426.vo.msecnd.net/scripts/b/ai"},9382:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.domainSupportsProperties=t.RemoteDependencyDataConstants=void 0;var n=a(9958),i=function(){function e(){}return e.TYPE_HTTP="Http",e.TYPE_AI="Http (tracked component)",e}();t.RemoteDependencyDataConstants=i,t.domainSupportsProperties=function(e){return"properties"in e||e instanceof n.EventData||e instanceof n.ExceptionData||e instanceof n.MessageData||e instanceof n.MetricData||e instanceof n.PageViewData||e instanceof n.RemoteDependencyData||e instanceof n.RequestData}},7220:function(e,t,a){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])})(e,t)},function(e,t){function a(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}),o=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return i(t,e),t}(a(8934));e.exports=o},4101:e=>{"use strict";e.exports=function(){}},9871:e=>{"use strict";e.exports=function(){this.applicationVersion="ai.application.ver",this.deviceId="ai.device.id",this.deviceLocale="ai.device.locale",this.deviceModel="ai.device.model",this.deviceOEMName="ai.device.oemName",this.deviceOSVersion="ai.device.osVersion",this.deviceType="ai.device.type",this.locationIp="ai.location.ip",this.operationId="ai.operation.id",this.operationName="ai.operation.name",this.operationParentId="ai.operation.parentId",this.operationSyntheticSource="ai.operation.syntheticSource",this.operationCorrelationVector="ai.operation.correlationVector",this.sessionId="ai.session.id",this.sessionIsFirst="ai.session.isFirst",this.userAccountId="ai.user.accountId",this.userId="ai.user.id",this.userAuthUserId="ai.user.authUserId",this.cloudRole="ai.cloud.role",this.cloudRoleInstance="ai.cloud.roleInstance",this.internalSdkVersion="ai.internal.sdkVersion",this.internalAgentVersion="ai.internal.agentVersion",this.internalNodeName="ai.internal.nodeName"}},320:function(e,t,a){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])})(e,t)},function(e,t){function a(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}),o=function(e){function t(){return e.call(this)||this}return i(t,e),t}(a(4101));e.exports=o},8602:(e,t,a)=>{"use strict";var n=a(495);e.exports=function(){this.kind=n.Measurement}},495:e=>{"use strict";var t;!function(e){e[e.Measurement=0]="Measurement",e[e.Aggregation=1]="Aggregation"}(t||(t={})),e.exports=t},8934:e=>{"use strict";e.exports=function(){}},7300:e=>{"use strict";e.exports=function(){this.ver=1,this.sampleRate=100,this.tags={}}},4526:function(e,t,a){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])})(e,t)},function(e,t){function a(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}),o=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return i(t,e),t}(a(8934));e.exports=o},935:function(e,t,a){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])})(e,t)},function(e,t){function a(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}),o=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.exceptions=[],t.properties={},t.measurements={},t}return i(t,e),t}(a(8934));e.exports=o},8082:e=>{"use strict";e.exports=function(){this.hasFullStack=!0,this.parsedStack=[]}},901:function(e,t,a){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])})(e,t)},function(e,t){function a(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}),o=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t}return i(t,e),t}(a(8934));e.exports=o},3092:function(e,t,a){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])})(e,t)},function(e,t){function a(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}),o=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.metrics=[],t.properties={},t}return i(t,e),t}(a(8934));e.exports=o},6279:function(e,t,a){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])})(e,t)},function(e,t){function a(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}),o=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return i(t,e),t}(a(4526));e.exports=o},6290:function(e,t,a){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])})(e,t)},function(e,t){function a(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}),o=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.success=!0,t.properties={},t.measurements={},t}return i(t,e),t}(a(8934));e.exports=o},7339:function(e,t,a){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])})(e,t)},function(e,t){function a(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}),o=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return i(t,e),t}(a(8934));e.exports=o},9697:e=>{"use strict";var t;!function(e){e[e.Verbose=0]="Verbose",e[e.Information=1]="Information",e[e.Warning=2]="Warning",e[e.Error=3]="Error",e[e.Critical=4]="Critical"}(t||(t={})),e.exports=t},6376:e=>{"use strict";e.exports=function(){}},9958:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AvailabilityData=a(7220),t.Base=a(4101),t.ContextTagKeys=a(9871),t.Data=a(320),t.DataPoint=a(8602),t.DataPointType=a(495),t.Domain=a(8934),t.Envelope=a(7300),t.EventData=a(4526),t.ExceptionData=a(935),t.ExceptionDetails=a(8082),t.MessageData=a(901),t.MetricData=a(3092),t.PageViewData=a(6279),t.RemoteDependencyData=a(6290),t.RequestData=a(7339),t.SeverityLevel=a(9697),t.StackFrame=a(6376)},6522:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},532:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4429:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8937:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9003:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5323:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9477:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6647:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5977:function(e,t,a){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,a,n){void 0===n&&(n=a),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[a]}})}:function(e,t,a,n){void 0===n&&(n=a),e[n]=t[a]}),i=this&&this.__exportStar||function(e,t){for(var a in e)"default"===a||Object.prototype.hasOwnProperty.call(t,a)||n(t,e,a)};Object.defineProperty(t,"__esModule",{value:!0}),i(a(9477),t),i(a(4429),t),i(a(532),t),i(a(9003),t),i(a(5323),t),i(a(6522),t),i(a(6647),t),i(a(8937),t)},3382:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1727:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6375:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8010:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2637:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4381:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1143:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2166:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4013:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2334:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8836:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5481:(e,t)=>{"use strict";var a;Object.defineProperty(t,"__esModule",{value:!0}),t.TelemetryType=t.TelemetryTypeString=t.baseTypeToTelemetryType=t.telemetryTypeToBaseType=void 0,t.telemetryTypeToBaseType=function(e){switch(e){case a.Event:return"EventData";case a.Exception:return"ExceptionData";case a.Trace:return"MessageData";case a.Metric:return"MetricData";case a.Request:return"RequestData";case a.Dependency:return"RemoteDependencyData";case a.Availability:return"AvailabilityData";case a.PageView:return"PageViewData"}},t.baseTypeToTelemetryType=function(e){switch(e){case"EventData":return a.Event;case"ExceptionData":return a.Exception;case"MessageData":return a.Trace;case"MetricData":return a.Metric;case"RequestData":return a.Request;case"RemoteDependencyData":return a.Dependency;case"AvailabilityData":return a.Availability;case"PageViewData":return a.PageView}},t.TelemetryTypeString={Event:"EventData",Exception:"ExceptionData",Trace:"MessageData",Metric:"MetricData",Request:"RequestData",Dependency:"RemoteDependencyData",Availability:"AvailabilityData",PageView:"PageViewData"},function(e){e[e.Event=0]="Event",e[e.Exception=1]="Exception",e[e.Trace=2]="Trace",e[e.Metric=3]="Metric",e[e.Request=4]="Request",e[e.Dependency=5]="Dependency",e[e.Availability=6]="Availability",e[e.PageView=7]="PageView"}(a=t.TelemetryType||(t.TelemetryType={}))},5539:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2626:function(e,t,a){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,a,n){void 0===n&&(n=a),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[a]}})}:function(e,t,a,n){void 0===n&&(n=a),e[n]=t[a]}),i=this&&this.__exportStar||function(e,t){for(var a in e)"default"===a||Object.prototype.hasOwnProperty.call(t,a)||n(t,e,a)};Object.defineProperty(t,"__esModule",{value:!0}),i(a(1727),t),i(a(8010),t),i(a(2637),t),i(a(4381),t),i(a(2334),t),i(a(5539),t),i(a(8836),t),i(a(1143),t),i(a(2166),t),i(a(3382),t),i(a(4013),t),i(a(6375),t),i(a(5481),t)},5290:function(e,t,a){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,a,n){void 0===n&&(n=a),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[a]}})}:function(e,t,a,n){void 0===n&&(n=a),e[n]=t[a]}),i=this&&this.__exportStar||function(e,t){for(var a in e)"default"===a||Object.prototype.hasOwnProperty.call(t,a)||n(t,e,a)};Object.defineProperty(t,"__esModule",{value:!0}),i(a(9382),t),i(a(9958),t),i(a(2626),t),i(a(5977),t)},521:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AggregatedMetricCounter=void 0;t.AggregatedMetricCounter=function(e){this.dimensions=e,this.totalCount=0,this.lastTotalCount=0,this.intervalExecutionTime=0,this.lastTime=+new Date,this.lastIntervalExecutionTime=0}},7535:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PreaggregatedMetricPropertyNames=void 0,t.PreaggregatedMetricPropertyNames={cloudRoleInstance:"cloud/roleInstance",cloudRoleName:"cloud/roleName",operationSynthetic:"operation/synthetic",requestSuccess:"Request.Success",requestResultCode:"request/resultCode",dependencyType:"Dependency.Type",dependencyTarget:"dependency/target",dependencySuccess:"Dependency.Success",dependencyResultCode:"dependency/resultCode",traceSeverityLevel:"trace/severityLevel"}},287:function(e,t,a){"use strict";var n=this&&this.__awaiter||function(e,t,a,n){return new(a||(a=Promise))((function(i,o){function r(e){try{p(n.next(e))}catch(e){o(e)}}function s(e){try{p(n.throw(e))}catch(e){o(e)}}function p(e){var t;e.done?i(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(r,s)}p((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var a,n,i,o,r={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(a)throw new TypeError("Generator is already executing.");for(;r;)try{if(a=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return r.label++,{value:o[1],done:!1};case 5:r.label++,n=o[1],o=[0];continue;case 7:o=r.ops.pop(),r.trys.pop();continue;default:if(!((i=(i=r.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){r=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AzureVirtualMachine=void 0;var n=a(5282),i=a(5740),o=a(8723),r=function(){function e(){}return e.getAzureComputeMetadata=function(t,a){var r,s=this,p={},c=((r={method:"GET"})[o.disableCollectionRequestOption]=!0,r.headers={Metadata:"True"},r),l=i.makeRequest(t,"http://169.254.169.254/metadata/instance/compute?api-version=2017-12-01&format=json",c,(function(t){if(200===t.statusCode){p.isVM=!0;var i="";t.on("data",(function(e){i+=e})),t.on("end",(function(){try{var t=JSON.parse(i);p.id=t.vmId||"",p.subscriptionId=t.subscriptionId||"",p.osType=t.osType||""}catch(t){n.info(e.TAG,t)}a(p)}))}else a(p)}),!1,!1);l&&(setTimeout((function(){s._requestTimedOut=!0,l.abort()}),e.HTTP_TIMEOUT),l.on("error",(function(t){s._requestTimedOut&&t&&(t.name="telemetry timeout",t.message="telemetry request timed out"),t&&t.message&&t.message.indexOf("UNREACH")>-1?p.isVM=!1:n.info(e.TAG,t),a(p)})),l.end())},e.HTTP_TIMEOUT=2500,e.TAG="AzureVirtualMachine",e}();t.AzureVirtualMachine=r},3504:(e,t,a)=>{"use strict";var n=a(5282),i=a(5740),o=function(){function e(e,t,a,n){this._buffer=[],this._lastSend=0,this._isDisabled=e,this._getBatchSize=t,this._getBatchIntervalMs=a,this._sender=n}return e.prototype.setUseDiskRetryCaching=function(e,t,a){this._sender.setDiskRetryMode(e,t,a)},e.prototype.send=function(e){var t=this;this._isDisabled()||(e?(this._buffer.push(e),this._buffer.length>=this._getBatchSize()?this.triggerSend(!1):!this._timeoutHandle&&this._buffer.length>0&&(this._timeoutHandle=setTimeout((function(){t._timeoutHandle=null,t.triggerSend(!1)}),this._getBatchIntervalMs()))):n.warn("Cannot send null/undefined telemetry"))},e.prototype.triggerSend=function(e,t){var a=this._buffer.length<1;a||(e||i.isNodeExit?(this._sender.saveOnCrash(this._buffer),"function"==typeof t&&t("data saved on crash")):this._sender.send(this._buffer,t)),this._lastSend=+new Date,this._buffer=[],clearTimeout(this._timeoutHandle),this._timeoutHandle=null,a&&"function"==typeof t&&t("no data to send")},e}();e.exports=o},9253:(e,t,a)=>{"use strict";var n=a(9962),i=a(5158),o=a(5282),r=a(3580),s=a(8835),p=a(3063),c=function(){function e(t){var a=this;this._endpointBase=r.DEFAULT_BREEZE_ENDPOINT,this._mergeConfig();var n=this._connectionString,o=i.parse(t),p=i.parse(n),c=!o.instrumentationkey&&Object.keys(o).length>0?null:t,l=this._instrumentationKey;this.instrumentationKey=o.instrumentationkey||c||p.instrumentationkey||l;var u=""+(this.endpointUrl||o.ingestionendpoint||p.ingestionendpoint||this._endpointBase);u.endsWith("/")&&(u=u.slice(0,-1)),this.endpointUrl=u+"/v2.1/track",this.maxBatchSize=this.maxBatchSize||250,this.maxBatchIntervalMs=this.maxBatchIntervalMs||15e3,this.disableAppInsights=this.disableAppInsights||!1,this.samplingPercentage=this.samplingPercentage||100,this.correlationIdRetryIntervalMs=this.correlationIdRetryIntervalMs||3e4,this.enableWebInstrumentation=this.enableWebInstrumentation||this.enableAutoWebSnippetInjection||!1,this.webInstrumentationConfig=this.webInstrumentationConfig||null,this.enableAutoWebSnippetInjection=this.enableWebInstrumentation,this.correlationHeaderExcludedDomains=this.correlationHeaderExcludedDomains||["*.core.windows.net","*.core.chinacloudapi.cn","*.core.cloudapi.de","*.core.usgovcloudapi.net","*.core.microsoft.scloud","*.core.eaglex.ic.gov"],this._setCorrelationId=function(e){return a.correlationId=e},this.ignoreLegacyHeaders=this.ignoreLegacyHeaders||!1,this.profileQueryEndpoint=o.ingestionendpoint||p.ingestionendpoint||process.env[e.ENV_profileQueryEndpoint]||this._endpointBase,this.quickPulseHost=this.quickPulseHost||o.liveendpoint||p.liveendpoint||process.env[e.ENV_quickPulseHost]||r.DEFAULT_LIVEMETRICS_HOST,this.webInstrumentationConnectionString=this.webInstrumentationConnectionString||this._webInstrumentationConnectionString||"",this.webSnippetConnectionString=this.webInstrumentationConnectionString,this.quickPulseHost.match(/^https?:\/\//)&&(this.quickPulseHost=new s.URL(this.quickPulseHost).host)}return Object.defineProperty(e.prototype,"profileQueryEndpoint",{get:function(){return this._profileQueryEndpoint},set:function(e){n.cancelCorrelationIdQuery(this,this._setCorrelationId),this._profileQueryEndpoint=e,this.correlationId=n.correlationIdPrefix,n.queryCorrelationId(this,this._setCorrelationId)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"instrumentationKey",{get:function(){return this._instrumentationKey},set:function(t){e._validateInstrumentationKey(t)||o.warn("An invalid instrumentation key was provided. There may be resulting telemetry loss",this.instrumentationKey),this._instrumentationKey=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"webSnippetConnectionString",{get:function(){return this._webInstrumentationConnectionString},set:function(e){this._webInstrumentationConnectionString=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"webInstrumentationConnectionString",{get:function(){return this._webInstrumentationConnectionString},set:function(e){this._webInstrumentationConnectionString=e},enumerable:!1,configurable:!0}),e.prototype._mergeConfig=function(){var e=p.JsonConfig.getInstance();this._connectionString=e.connectionString,this._instrumentationKey=e.instrumentationKey,this.correlationHeaderExcludedDomains=e.correlationHeaderExcludedDomains,this.correlationIdRetryIntervalMs=e.correlationIdRetryIntervalMs,this.disableAllExtendedMetrics=e.disableAllExtendedMetrics,this.disableAppInsights=e.disableAppInsights,this.disableStatsbeat=e.disableStatsbeat,this.distributedTracingMode=e.distributedTracingMode,this.enableAutoCollectConsole=e.enableAutoCollectConsole,this.enableAutoCollectDependencies=e.enableAutoCollectDependencies,this.enableAutoCollectExceptions=e.enableAutoCollectExceptions,this.enableAutoCollectExtendedMetrics=e.enableAutoCollectExtendedMetrics,this.enableAutoCollectExternalLoggers=e.enableAutoCollectExternalLoggers,this.enableAutoCollectHeartbeat=e.enableAutoCollectHeartbeat,this.enableAutoCollectPerformance=e.enableAutoCollectPerformance,this.enableAutoCollectPreAggregatedMetrics=e.enableAutoCollectPreAggregatedMetrics,this.enableAutoCollectRequests=e.enableAutoCollectRequests,this.enableAutoDependencyCorrelation=e.enableAutoDependencyCorrelation,this.enableInternalDebugLogging=e.enableInternalDebugLogging,this.enableInternalWarningLogging=e.enableInternalWarningLogging,this.enableResendInterval=e.enableResendInterval,this.enableMaxBytesOnDisk=e.enableMaxBytesOnDisk,this.enableSendLiveMetrics=e.enableSendLiveMetrics,this.enableUseAsyncHooks=e.enableUseAsyncHooks,this.enableUseDiskRetryCaching=e.enableUseDiskRetryCaching,this.endpointUrl=e.endpointUrl,this.extendedMetricDisablers=e.extendedMetricDisablers,this.ignoreLegacyHeaders=e.ignoreLegacyHeaders,this.maxBatchIntervalMs=e.maxBatchIntervalMs,this.maxBatchSize=e.maxBatchSize,this.proxyHttpUrl=e.proxyHttpUrl,this.proxyHttpsUrl=e.proxyHttpsUrl,this.quickPulseHost=e.quickPulseHost,this.samplingPercentage=e.samplingPercentage,this.enableWebInstrumentation=e.enableWebInstrumentation,this._webInstrumentationConnectionString=e.webInstrumentationConnectionString,this.webInstrumentationConfig=e.webInstrumentationConfig,this.webInstrumentationSrc=e.webInstrumentationSrc},e._validateInstrumentationKey=function(e){return new RegExp("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$").test(e)},e.ENV_azurePrefix="APPSETTING_",e.ENV_iKey="APPINSIGHTS_INSTRUMENTATIONKEY",e.legacy_ENV_iKey="APPINSIGHTS_INSTRUMENTATION_KEY",e.ENV_profileQueryEndpoint="APPINSIGHTS_PROFILE_QUERY_ENDPOINT",e.ENV_quickPulseHost="APPINSIGHTS_QUICKPULSE_HOST",e}();e.exports=c},5158:(e,t,a)=>{"use strict";var n=a(3580),i=function(){function e(){}return e.parse=function(t){if(!t)return{};var a=t.split(e._FIELDS_SEPARATOR).reduce((function(t,a){var n=a.split(e._FIELD_KEY_VALUE_SEPARATOR);if(2===n.length){var i=n[0].toLowerCase(),o=n[1];t[i]=o}return t}),{});if(Object.keys(a).length>0){if(a.endpointsuffix){var i=a.location?a.location+".":"";a.ingestionendpoint=a.ingestionendpoint||"https://"+i+"dc."+a.endpointsuffix,a.liveendpoint=a.liveendpoint||"https://"+i+"live."+a.endpointsuffix}a.ingestionendpoint=a.ingestionendpoint||n.DEFAULT_BREEZE_ENDPOINT,a.liveendpoint=a.liveendpoint||n.DEFAULT_LIVEMETRICS_ENDPOINT}return a},e.isIkeyValid=function(e){return!(!e||""==e)&&new RegExp("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$").test(e)},e._FIELDS_SEPARATOR=";",e._FIELD_KEY_VALUE_SEPARATOR="=",e}();e.exports=i},4470:(e,t,a)=>{"use strict";var n=a(2087),i=a(5747),o=a(5622),r=a(5290),s=a(3580),p=a(5282),c=function(){function e(e){this.keys=new r.ContextTagKeys,this.tags={},this._loadApplicationContext(e),this._loadDeviceContext(),this._loadInternalContext()}return e.prototype._loadApplicationContext=function(t){if(t=t||o.resolve(__dirname,"../../../../package.json"),!e.appVersion[t]){e.appVersion[t]="unknown";try{var a=JSON.parse(i.readFileSync(t,"utf8"));a&&"string"==typeof a.version&&(e.appVersion[t]=a.version)}catch(e){p.info("unable to read app version: ",e)}}this.tags[this.keys.applicationVersion]=e.appVersion[t]},e.prototype._loadDeviceContext=function(){this.tags[this.keys.deviceId]="",this.tags[this.keys.cloudRoleInstance]=n&&n.hostname(),this.tags[this.keys.deviceOSVersion]=n&&n.type()+" "+n.release(),this.tags[this.keys.cloudRole]=e.DefaultRoleName,this.tags["ai.device.osArchitecture"]=n&&n.arch(),this.tags["ai.device.osPlatform"]=n&&n.platform()},e.prototype._loadInternalContext=function(){e.sdkVersion=s.APPLICATION_INSIGHTS_SDK_VERSION,this.tags[this.keys.internalSdkVersion]="node:"+e.sdkVersion},e.DefaultRoleName="Web",e.appVersion={},e.sdkVersion=null,e}();e.exports=c},9962:(e,t,a)=>{"use strict";var n=a(5740),i=a(5282),o=function(){function e(){}return e.queryCorrelationId=function(t,a){var o=this,r=t.profileQueryEndpoint+"/api/profiles/"+t.instrumentationKey+"/appId";if(e.completedLookups.hasOwnProperty(r))a(e.completedLookups[r]);else if(e.pendingLookups[r])e.pendingLookups[r].push(a);else{e.pendingLookups[r]=[a];var s=function(){if(e.pendingLookups[r]){var a={method:"GET",disableAppInsightsAutoCollection:!0};i.info(e.TAG,a);var s=n.makeRequest(t,r,a,(function(t){if(200===t.statusCode){var a="";t.setEncoding("utf-8"),t.on("data",(function(e){a+=e})),t.on("end",(function(){i.info(e.TAG,a);var t=e.correlationIdPrefix+a;e.completedLookups[r]=t,e.pendingLookups[r]&&e.pendingLookups[r].forEach((function(e){return e(t)})),delete e.pendingLookups[r]}))}else{if(!(t.statusCode>=400&&t.statusCode<500))return;e.completedLookups[r]=void 0,delete e.pendingLookups[r]}e._handle&&(clearTimeout(e._handle),e._handle=void 0)}),!0,!1);s&&(s.setTimeout(e.HTTP_TIMEOUT,(function(){o._requestTimedOut=!0,s.abort()})),s.on("error",(function(t){o._requestTimedOut&&(t.name="telemetry timeout",t.message="telemetry request timed out"),i.warn(e.TAG,t),o._handle&&(clearTimeout(e._handle),e._handle=void 0)})),s.end())}};e._handle||(e._handle=setTimeout(s,t.correlationIdRetryIntervalMs),e._handle.unref()),setImmediate(s)}},e.cancelCorrelationIdQuery=function(t,a){var n=t.profileQueryEndpoint+"/api/profiles/"+t.instrumentationKey+"/appId",i=e.pendingLookups[n];i&&(e.pendingLookups[n]=i.filter((function(e){return e!=a})),0==e.pendingLookups[n].length&&delete e.pendingLookups[n])},e.generateRequestId=function(t){if(t){"."!==(t="|"==t[0]?t:"|"+t)[t.length-1]&&(t+=".");var a=(e.currentRootId++).toString(16);return e.appendSuffix(t,a,"_")}return e.generateRootId()},e.getRootId=function(e){var t=e.indexOf(".");t<0&&(t=e.length);var a="|"===e[0]?1:0;return e.substring(a,t)},e.generateRootId=function(){return"|"+n.w3cTraceId()+"."},e.appendSuffix=function(t,a,i){if(t.length+a.lengtho)for(;o>1;--o){var r=t[o-1];if("."===r||"_"===r)break}if(o<=1)return e.generateRootId();for(a=n.randomu32().toString(16);a.length<8;)a="0"+a;return t.substring(0,o)+a+"#"},e.TAG="CorrelationIdManager",e.correlationIdPrefix="cid-v1:",e.w3cEnabled=!0,e.HTTP_TIMEOUT=2500,e.pendingLookups={},e.completedLookups={},e.requestIdMaxLength=1024,e.currentRootId=n.randomu32(),e}();e.exports=o},9813:(e,t,a)=>{"use strict";var n=a(5290),i=a(5740),o=a(894),r=function(){function e(){}return e.createEnvelope=function(t,a,o,r,s){var p=null;switch(a){case n.TelemetryType.Trace:p=e.createTraceData(t);break;case n.TelemetryType.Dependency:p=e.createDependencyData(t);break;case n.TelemetryType.Event:p=e.createEventData(t);break;case n.TelemetryType.Exception:p=e.createExceptionData(t);break;case n.TelemetryType.Request:p=e.createRequestData(t);break;case n.TelemetryType.Metric:p=e.createMetricData(t);break;case n.TelemetryType.Availability:p=e.createAvailabilityData(t);break;case n.TelemetryType.PageView:p=e.createPageViewData(t)}if(p&&p.baseData&&n.domainSupportsProperties(p.baseData)){if(o)if(p.baseData.properties)for(var c in o)p.baseData.properties[c]||(p.baseData.properties[c]=o[c]);else p.baseData.properties=o;p.baseData.properties&&(p.baseData.properties=i.validateStringMap(p.baseData.properties))}var l=s&&s.instrumentationKey||"",u=new n.Envelope;return u.data=p,u.iKey=l,u.name="Microsoft.ApplicationInsights."+l.replace(/-/g,"")+"."+p.baseType.substr(0,p.baseType.length-4),u.tags=this.getTags(r,t.tagOverrides),u.time=(new Date).toISOString(),u.ver=1,u.sampleRate=s?s.samplingPercentage:100,a===n.TelemetryType.Metric&&(u.sampleRate=100),u},e.createTraceData=function(e){var t=new n.MessageData;t.message=e.message,t.properties=e.properties,isNaN(e.severity)?t.severityLevel=n.SeverityLevel.Information:t.severityLevel=e.severity;var a=new n.Data;return a.baseType=n.telemetryTypeToBaseType(n.TelemetryType.Trace),a.baseData=t,a},e.createDependencyData=function(e){var t=new n.RemoteDependencyData;"string"==typeof e.name&&(t.name=e.name.length>1024?e.name.slice(0,1021)+"...":e.name),t.data=e.data,t.target=e.target,t.duration=i.msToTimeSpan(e.duration),t.success=e.success,t.type=e.dependencyTypeName,t.properties=e.properties,t.resultCode=e.resultCode?e.resultCode.toString():"0",e.id?t.id=e.id:t.id=i.w3cTraceId();var a=new n.Data;return a.baseType=n.telemetryTypeToBaseType(n.TelemetryType.Dependency),a.baseData=t,a},e.createEventData=function(e){var t=new n.EventData;t.name=e.name,t.properties=e.properties,t.measurements=e.measurements;var a=new n.Data;return a.baseType=n.telemetryTypeToBaseType(n.TelemetryType.Event),a.baseData=t,a},e.createExceptionData=function(e){var t=new n.ExceptionData;t.properties=e.properties,isNaN(e.severity)?t.severityLevel=n.SeverityLevel.Error:t.severityLevel=e.severity,t.measurements=e.measurements,t.exceptions=[];var a=e.exception.stack,o=new n.ExceptionDetails;o.message=e.exception.message,o.typeName=e.exception.name,o.parsedStack=this.parseStack(a),o.hasFullStack=i.isArray(o.parsedStack)&&o.parsedStack.length>0,t.exceptions.push(o);var r=new n.Data;return r.baseType=n.telemetryTypeToBaseType(n.TelemetryType.Exception),r.baseData=t,r},e.createRequestData=function(e){var t=new n.RequestData;e.id?t.id=e.id:t.id=i.w3cTraceId(),t.name=e.name,t.url=e.url,t.source=e.source,t.duration=i.msToTimeSpan(e.duration),t.responseCode=e.resultCode?e.resultCode.toString():"0",t.success=e.success,t.properties=e.properties,t.measurements=e.measurements;var a=new n.Data;return a.baseType=n.telemetryTypeToBaseType(n.TelemetryType.Request),a.baseData=t,a},e.createMetricData=function(e){var t=new n.MetricData;t.metrics=[];var a=new n.DataPoint;a.count=isNaN(e.count)?1:e.count,a.kind=n.DataPointType.Aggregation,a.max=isNaN(e.max)?e.value:e.max,a.min=isNaN(e.min)?e.value:e.min,a.name=e.name,a.stdDev=isNaN(e.stdDev)?0:e.stdDev,a.value=e.value,a.ns=e.namespace,t.metrics.push(a),t.properties=e.properties;var i=new n.Data;return i.baseType=n.telemetryTypeToBaseType(n.TelemetryType.Metric),i.baseData=t,i},e.createAvailabilityData=function(e){var t=new n.AvailabilityData;e.id?t.id=e.id:t.id=i.w3cTraceId(),t.name=e.name,t.duration=i.msToTimeSpan(e.duration),t.success=e.success,t.runLocation=e.runLocation,t.message=e.message,t.measurements=e.measurements,t.properties=e.properties;var a=new n.Data;return a.baseType=n.telemetryTypeToBaseType(n.TelemetryType.Availability),a.baseData=t,a},e.createPageViewData=function(e){var t=new n.PageViewData;t.name=e.name,t.duration=i.msToTimeSpan(e.duration),t.url=e.url,t.measurements=e.measurements,t.properties=e.properties;var a=new n.Data;return a.baseType=n.telemetryTypeToBaseType(n.TelemetryType.PageView),a.baseData=t,a},e.getTags=function(e,t){var a=o.CorrelationContextManager.getCurrentContext(),n={};if(e&&e.tags)for(var i in e.tags)n[i]=e.tags[i];if(t)for(var i in t)n[i]=t[i];return a&&(n[e.keys.operationId]=n[e.keys.operationId]||a.operation.id,n[e.keys.operationName]=n[e.keys.operationName]||a.operation.name,n[e.keys.operationParentId]=n[e.keys.operationParentId]||a.operation.parentId),n},e.parseStack=function(e){var t=void 0;if("string"==typeof e){var a=e.split("\n");t=[];for(var n=0,i=0,o=0;o<=a.length;o++){var r=a[o];if(s.regex.test(r)){var p=new s(a[o],n++);i+=p.sizeInBytes,t.push(p)}}if(i>32768)for(var c=0,l=t.length-1,u=0,d=c,m=l;c32768){var h=m-d+1;t.splice(d,h);break}d=c,m=l,c++,l--}}return t},e}(),s=function(){function e(t,a){this.sizeInBytes=0,this.level=a,this.method="",this.assembly=i.trim(t);var n=t.match(e.regex);n&&n.length>=5&&(this.method=i.trim(n[2])||this.method,this.fileName=i.trim(n[4])||"",this.line=parseInt(n[5])||0),this.sizeInBytes+=this.method.length,this.sizeInBytes+=this.fileName.length,this.sizeInBytes+=this.assembly.length,this.sizeInBytes+=e.baseSize,this.sizeInBytes+=this.level.toString().length,this.sizeInBytes+=this.line.toString().length}return e.regex=/^(\s+at)?(.*?)(\@|\s\(|\s)([^\(\n]+):(\d+):(\d+)(\)?)$/,e.baseSize=58,e}();e.exports=r},2640:function(e,t,a){"use strict";var n=this&&this.__awaiter||function(e,t,a,n){return new(a||(a=Promise))((function(i,o){function r(e){try{p(n.next(e))}catch(e){o(e)}}function s(e){try{p(n.throw(e))}catch(e){o(e)}}function p(e){var t;e.done?i(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(r,s)}p((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var a,n,i,o,r={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(a)throw new TypeError("Generator is already executing.");for(;r;)try{if(a=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return r.label++,{value:o[1],done:!1};case 5:r.label++,n=o[1],o=[0];continue;case 7:o=r.ops.pop(),r.trys.pop();continue;default:if(!((i=(i=r.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){r=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){r=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3370:function(e,t,a){"use strict";var n=this&&this.__awaiter||function(e,t,a,n){return new(a||(a=Promise))((function(i,o){function r(e){try{p(n.next(e))}catch(e){o(e)}}function s(e){try{p(n.throw(e))}catch(e){o(e)}}function p(e){var t;e.done?i(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(r,s)}p((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var a,n,i,o,r={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(a)throw new TypeError("Generator is already executing.");for(;r;)try{if(a=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return r.label++,{value:o[1],done:!1};case 5:r.label++,n=o[1],o=[0];continue;case 7:o=r.ops.pop(),r.trys.pop();continue;default:if(!((i=(i=r.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){r=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]this.maxSizeBytes?[4,this._createBackupFile(t)]:[3,14];case 13:return i.sent(),[3,16];case 14:return[4,c.appendFileAsync(this._fileFullPath,t)];case 15:i.sent(),i.label=16;case 16:return[3,18];case 17:return o=i.sent(),console.log(this.TAG,"Failed to create backup file: "+(o&&o.message)),[3,18];case 18:return[2]}}))}))},e.prototype._createBackupFile=function(e){return n(this,void 0,void 0,(function(){var t,a,n;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,4,5]),[4,c.readFileAsync(this._fileFullPath)];case 1:return t=i.sent(),a=p.join(this._tempDir,(new Date).getTime()+"."+this._logFileName),[4,c.writeFileAsync(a,t)];case 2:return i.sent(),[3,5];case 3:return n=i.sent(),console.log("Failed to generate backup log file",n),[3,5];case 4:return c.writeFileAsync(this._fileFullPath,e),[7];case 5:return[2]}}))}))},e.prototype._fileCleanupTask=function(){return n(this,void 0,void 0,(function(){var e,t,a,n,o,r=this;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,6,,7]),[4,c.readdirAsync(this._tempDir)];case 1:(e=(e=i.sent()).filter((function(e){return p.basename(e).indexOf(r._backUpNameFormat)>-1}))).sort((function(e,t){var a=new Date(parseInt(e.split(r._backUpNameFormat)[0])),n=new Date(parseInt(t.split(r._backUpNameFormat)[0]));return a=n?1:void 0})),t=e.length,a=0,i.label=2;case 2:return a{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JsonConfig=void 0;var n=a(5747),i=a(5622),o=a(5282),r="APPINSIGHTS_INSTRUMENTATIONKEY",s=function(){function e(){this.connectionString=process.env.APPLICATIONINSIGHTS_CONNECTION_STRING,this.instrumentationKey=process.env[r]||process.env["APPSETTING_"+r]||process.env.APPINSIGHTS_INSTRUMENTATION_KEY||process.env.APPSETTING_APPINSIGHTS_INSTRUMENTATION_KEY,!this.connectionString&&this.instrumentationKey&&o.warn("APPINSIGHTS_INSTRUMENTATIONKEY is in path of deprecation, please use APPLICATIONINSIGHTS_CONNECTION_STRING env variable to setup the SDK."),this.disableAllExtendedMetrics=!!process.env.APPLICATION_INSIGHTS_DISABLE_ALL_EXTENDED_METRICS,this.extendedMetricDisablers=process.env.APPLICATION_INSIGHTS_DISABLE_EXTENDED_METRIC,this.proxyHttpUrl=process.env.http_proxy,this.proxyHttpsUrl=process.env.https_proxy,this.noDiagnosticChannel=!!process.env.APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL,this.disableStatsbeat=!!process.env.APPLICATION_INSIGHTS_NO_STATSBEAT,this.noHttpAgentKeepAlive=!!process.env.APPLICATION_INSIGHTS_NO_HTTP_AGENT_KEEP_ALIVE,this.noPatchModules=process.env.APPLICATION_INSIGHTS_NO_PATCH_MODULES||"",this.enableWebInstrumentation=!!process.env.APPLICATIONINSIGHTS_WEB_INSTRUMENTATION_ENABLED||!!process.env.APPLICATIONINSIGHTS_WEB_SNIPPET_ENABLED,this.webInstrumentationSrc=process.env.APPLICATIONINSIGHTS_WEB_INSTRUMENTATION_SOURCE||"",this.webInstrumentationConnectionString=process.env.APPLICATIONINSIGHTS_WEB_INSTRUMENTATION_CONNECTION_STRING||process.env.APPLICATIONINSIGHTS_WEB_SNIPPET_CONNECTION_STRING||"",this.enableAutoWebSnippetInjection=this.enableWebInstrumentation,this.webSnippetConnectionString=this.webInstrumentationConnectionString,this._loadJsonFile()}return e.getInstance=function(){return e._instance||(e._instance=new e),e._instance},e.prototype._loadJsonFile=function(){var e=i.join(__dirname,"../../"),t=i.join(e,"applicationinsights.json"),a=process.env.APPLICATIONINSIGHTS_CONFIGURATION_FILE;a&&(t=i.isAbsolute(a)?a:i.join(e,a));try{var r=JSON.parse(n.readFileSync(t,"utf8"));null!=r.disableStatsbeat&&(this.disableStatsbeat=r.disableStatsbeat),null!=r.disableAllExtendedMetrics&&(this.disableAllExtendedMetrics=r.disableStatsbeat),null!=r.noDiagnosticChannel&&(this.noDiagnosticChannel=r.noDiagnosticChannel),null!=r.noHttpAgentKeepAlive&&(this.noHttpAgentKeepAlive=r.noHttpAgentKeepAlive),null!=r.connectionString&&(this.connectionString=r.connectionString),null!=r.extendedMetricDisablers&&(this.extendedMetricDisablers=r.extendedMetricDisablers),null!=r.noDiagnosticChannel&&(this.noDiagnosticChannel=r.noDiagnosticChannel),null!=r.proxyHttpUrl&&(this.proxyHttpUrl=r.proxyHttpUrl),null!=r.proxyHttpsUrl&&(this.proxyHttpsUrl=r.proxyHttpsUrl),null!=r.proxyHttpsUrl&&(this.proxyHttpsUrl=r.proxyHttpsUrl),null!=r.noPatchModules&&(this.noPatchModules=r.noPatchModules),null!=r.enableAutoWebSnippetInjection&&(this.enableWebInstrumentation=r.enableAutoWebSnippetInjection,this.enableAutoWebSnippetInjection=this.enableWebInstrumentation),null!=r.enableWebInstrumentation&&(this.enableWebInstrumentation=r.enableWebInstrumentation,this.enableAutoWebSnippetInjection=this.enableWebInstrumentation),null!=r.webSnippetConnectionString&&(this.webInstrumentationConnectionString=r.webSnippetConnectionString,this.webSnippetConnectionString=this.webInstrumentationConnectionString),null!=r.webInstrumentationConnectionString&&(this.webInstrumentationConnectionString=r.webInstrumentationConnectionString,this.webSnippetConnectionString=this.webInstrumentationConnectionString),null!=r.webInstrumentationConfig&&(this.webInstrumentationConfig=r.webInstrumentationConfig),null!=r.webInstrumentationSrc&&(this.webInstrumentationSrc=r.webInstrumentationSrc),this.endpointUrl=r.endpointUrl,this.maxBatchSize=r.maxBatchSize,this.maxBatchIntervalMs=r.maxBatchIntervalMs,this.disableAppInsights=r.disableAppInsights,this.samplingPercentage=r.samplingPercentage,this.correlationIdRetryIntervalMs=r.correlationIdRetryIntervalMs,this.correlationHeaderExcludedDomains=r.correlationHeaderExcludedDomains,this.ignoreLegacyHeaders=r.ignoreLegacyHeaders,this.distributedTracingMode=r.distributedTracingMode,this.enableAutoCollectExternalLoggers=r.enableAutoCollectExternalLoggers,this.enableAutoCollectConsole=r.enableAutoCollectConsole,this.enableAutoCollectExceptions=r.enableAutoCollectExceptions,this.enableAutoCollectPerformance=r.enableAutoCollectPerformance,this.enableAutoCollectExtendedMetrics=r.enableAutoCollectExtendedMetrics,this.enableAutoCollectPreAggregatedMetrics=r.enableAutoCollectPreAggregatedMetrics,this.enableAutoCollectHeartbeat=r.enableAutoCollectHeartbeat,this.enableAutoCollectRequests=r.enableAutoCollectRequests,this.enableAutoCollectDependencies=r.enableAutoCollectDependencies,this.enableAutoDependencyCorrelation=r.enableAutoDependencyCorrelation,this.enableUseAsyncHooks=r.enableUseAsyncHooks,this.enableUseDiskRetryCaching=r.enableUseDiskRetryCaching,this.enableResendInterval=r.enableResendInterval,this.enableMaxBytesOnDisk=r.enableMaxBytesOnDisk,this.enableInternalDebugLogging=r.enableInternalDebugLogging,this.enableInternalWarningLogging=r.enableInternalWarningLogging,this.enableSendLiveMetrics=r.enableSendLiveMetrics,this.quickPulseHost=r.quickPulseHost}catch(e){o.info("Missing or invalid JSON config file: ",e)}},e}();t.JsonConfig=s},5282:(e,t,a)=>{"use strict";var n=a(3370),i=function(){function e(){}return e.info=function(e){for(var t=[],a=1;a{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getResourceProvider=t.getOsPrefix=t.isFunctionApp=t.isWebApp=t.isLinux=t.isWindows=void 0,t.isWindows=function(){return"win32"===process.platform},t.isLinux=function(){return"linux"===process.platform},t.isWebApp=function(){return!!process.env.WEBSITE_SITE_NAME},t.isFunctionApp=function(){return!!process.env.FUNCTIONS_WORKER_RUNTIME},t.getOsPrefix=function(){return t.isWindows()?"w":t.isLinux()?"l":"u"},t.getResourceProvider=function(){return t.isWebApp()?"a":t.isFunctionApp()?"f":"u"}},7148:function(e,t,a){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,a=1,n=arguments.length;a0?t:null,InstrumentationKey:a.instrumentationKey||"",Metrics:e.length>0?e:null,InvariantVersion:1,Timestamp:"/Date("+Date.now()+")/",Version:n.tags[n.keys.internalSdkVersion],StreamId:c,MachineName:o,Instance:r,RoleName:s}},e.createQuickPulseMetric=function(e){return{Name:e.name,Value:e.value,Weight:e.count||1}},e.telemetryEnvelopeToQuickPulseDocument=function(t){switch(t.data.baseType){case o.TelemetryTypeString.Event:return e.createQuickPulseEventDocument(t);case o.TelemetryTypeString.Exception:return e.createQuickPulseExceptionDocument(t);case o.TelemetryTypeString.Trace:return e.createQuickPulseTraceDocument(t);case o.TelemetryTypeString.Dependency:return e.createQuickPulseDependencyDocument(t);case o.TelemetryTypeString.Request:return e.createQuickPulseRequestDocument(t)}return null},e.createQuickPulseEventDocument=function(t){var a=e.createQuickPulseDocument(t),i=t.data.baseData.name;return n(n({},a),{Name:i})},e.createQuickPulseTraceDocument=function(t){var a=e.createQuickPulseDocument(t),i=t.data.baseData.severityLevel||0;return n(n({},a),{Message:t.data.baseData.message,SeverityLevel:o.SeverityLevel[i]})},e.createQuickPulseExceptionDocument=function(t){var a=e.createQuickPulseDocument(t),i=t.data.baseData.exceptions,o="",r="",s="";return i&&i.length>0&&(i[0].parsedStack&&i[0].parsedStack.length>0?i[0].parsedStack.forEach((function(e){o+=e.assembly+"\n"})):i[0].stack&&i[0].stack.length>0&&(o=i[0].stack),r=i[0].message,s=i[0].typeName),n(n({},a),{Exception:o,ExceptionMessage:r,ExceptionType:s})},e.createQuickPulseRequestDocument=function(t){var a=e.createQuickPulseDocument(t),i=t.data.baseData;return n(n({},a),{Name:i.name,Success:i.success,Duration:i.duration,ResponseCode:i.responseCode,OperationName:i.name})},e.createQuickPulseDependencyDocument=function(t){var a=e.createQuickPulseDocument(t),i=t.data.baseData;return n(n({},a),{Name:i.name,Target:i.target,Success:i.success,Duration:i.duration,ResultCode:i.resultCode,CommandName:i.data,OperationName:a.OperationId,DependencyTypeName:i.type})},e.createQuickPulseDocument=function(t){var a,n;return t.data.baseType?(n=r.TelemetryTypeStringToQuickPulseType[t.data.baseType],a=r.TelemetryTypeStringToQuickPulseDocumentType[t.data.baseType]):p.warn("Document type invalid; not sending live metric document",t.data.baseType),{DocumentType:a,__type:n,OperationId:t.tags[e.keys.operationId],Version:"1.0",Properties:e.aggregateProperties(t)}},e.aggregateProperties=function(e){var t=[],a=e.data.baseData.measurements||{};for(var n in a)if(a.hasOwnProperty(n)){var i={key:n,value:a[n]};t.push(i)}var o=e.data.baseData.properties||{};for(var n in o)o.hasOwnProperty(n)&&(i={key:n,value:o[n]},t.push(i));return t},e.keys=new o.ContextTagKeys,e}();e.exports=l},9184:function(e,t,a){"use strict";var n=this&&this.__awaiter||function(e,t,a,n){return new(a||(a=Promise))((function(i,o){function r(e){try{p(n.next(e))}catch(e){o(e)}}function s(e){try{p(n.throw(e))}catch(e){o(e)}}function p(e){var t;e.done?i(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(r,s)}p((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var a,n,i,o,r={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(a)throw new TypeError("Generator is already executing.");for(;r;)try{if(a=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return r.label++,{value:o[1],done:!1};case 5:r.label++,n=o[1],o=[0];continue;case 7:o=r.ops.pop(),r.trys.pop();continue;default:if(!((i=(i=r.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){r=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0?a:this._config.quickPulseHost,w.method="POST",w.path="/QuickPulseService.svc/"+h+"?ikey="+this._config.instrumentationKey,w.headers=((_={Expect:"100-continue"})["x-ms-qps-transmission-time"]=p.getTransmissionTime(),_["Content-Type"]="application/json",_["Content-Length"]=Buffer.byteLength(n),_),v=w,f&&f.length>0&&f.forEach((function(e){return v.headers[e.name]=e.value})),"post"!==h)return[3,4];if(!(g=this._getAuthorizationHandler?this._getAuthorizationHandler(this._config):null))return[3,4];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,g.addAuthorizationHeader(v)];case 2:return i.sent(),[3,4];case 3:return y=i.sent(),s.info(e.TAG,"Failed to get AAD bearer token for the Application. Error:",y),[2];case 4:return this._config.httpsAgent?v.agent=this._config.httpsAgent:v.agent=c.tlsRestrictedAgent,(b=o.request(v,(function(e){if(200==e.statusCode){var t="true"===e.headers["x-ms-qps-subscribed"],a=null;try{a=e.headers[d]?new l.URL(e.headers[d].toString()).host:null}catch(e){x._onError("Failed to parse redirect header from QuickPulse: "+c.dumpObj(e))}var n=e.headers[u]?parseInt(e.headers[u].toString()):null;x._consecutiveErrors=0,m(t,e,a,n)}else x._onError("StatusCode:"+e.statusCode+" StatusMessage:"+e.statusMessage),m()}))).on("error",(function(e){x._onError(e),m()})),b.write(n),b.end(),[2]}}))}))},e.prototype._onError=function(t){this._consecutiveErrors++;var a="Transient error connecting to the Live Metrics endpoint. This packet will not appear in your Live Metrics Stream. Error:";this._consecutiveErrors%e.MAX_QPS_FAILURES_BEFORE_WARN==0?(a="Live Metrics endpoint could not be reached "+this._consecutiveErrors+" consecutive times. Most recent error:",s.warn(e.TAG,a,t)):s.info(e.TAG,a,t)},e.TAG="QuickPulseSender",e.MAX_QPS_FAILURES_BEFORE_WARN=25,e}();e.exports=m},3668:function(e,t,a){"use strict";var n=this&&this.__awaiter||function(e,t,a,n){return new(a||(a=Promise))((function(i,o){function r(e){try{p(n.next(e))}catch(e){o(e)}}function s(e){try{p(n.throw(e))}catch(e){o(e)}}function p(e){var t;e.done?i(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(r,s)}p((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var a,n,i,o,r={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(a)throw new TypeError("Generator is already executing.");for(;r;)try{if(a=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return r.label++,{value:o[1],done:!1};case 5:r.label++,n=o[1],o=[0];continue;case 7:o=r.ops.pop(),r.trys.pop();continue;default:if(!((i=(i=r.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){r=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0?this._pollingIntervalHint:e.PING_INTERVAL,o=this._isCollectingData?e.POST_INTERVAL:n,this._isCollectingData&&Date.now()-this._lastSuccessTime>=e.MAX_POST_WAIT_TIME&&!this._lastSendSucceeded?(this._isCollectingData=!1,o=e.FALLBACK_INTERVAL):!this._isCollectingData&&Date.now()-this._lastSuccessTime>=e.MAX_PING_WAIT_TIME&&!this._lastSendSucceeded&&(o=e.FALLBACK_INTERVAL),this._lastSendSucceeded=null,this._handle=setTimeout(this._goQuickPulse.bind(this),o),this._handle.unref(),[2]}}))}))},e.prototype._ping=function(e){this._sender.ping(e,this._redirectedHost,this._quickPulseDone.bind(this))},e.prototype._post=function(e){return n(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this._sender.post(e,this._redirectedHost,this._quickPulseDone.bind(this))];case 1:return t.sent(),[2]}}))}))},e.prototype._quickPulseDone=function(e,t,a,n){null!=e?(this._isCollectingData!==e&&(o.info("Live Metrics sending data",e),this.enableCollectors(e)),this._isCollectingData=e,a&&a.length>0&&(this._redirectedHost=a,o.info("Redirecting endpoint to: ",a)),n&&n>0&&(this._pollingIntervalHint=n),t&&t.statusCode<300&&t.statusCode>=200?(this._lastSuccessTime=Date.now(),this._lastSendSucceeded=!0):this._lastSendSucceeded=!1):this._lastSendSucceeded=!1},e.MAX_POST_WAIT_TIME=2e4,e.MAX_PING_WAIT_TIME=6e4,e.FALLBACK_INTERVAL=6e4,e.PING_INTERVAL=5e3,e.POST_INTERVAL=1e3,e}();e.exports=l},3751:e=>{"use strict";e.exports={getTransmissionTime:function(){return 1e4*(Date.now()+621355968e5)}}},9036:e=>{"use strict";e.exports={requestContextHeader:"request-context",requestContextSourceKey:"appId",requestContextTargetKey:"appId",requestIdHeader:"request-id",parentIdHeader:"x-ms-request-id",rootIdHeader:"x-ms-request-root-id",correlationContextHeader:"correlation-context",traceparentHeader:"traceparent",traceStateHeader:"tracestate"}},2588:function(e,t,a){"use strict";var n=this&&this.__awaiter||function(e,t,a,n){return new(a||(a=Promise))((function(i,o){function r(e){try{p(n.next(e))}catch(e){o(e)}}function s(e){try{p(n.throw(e))}catch(e){o(e)}}function p(e){var t;e.done?i(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(r,s)}p((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var a,n,i,o,r={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(a)throw new TypeError("Generator is already executing.");for(;r;)try{if(a=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return r.label++,{value:o[1],done:!1};case 5:r.label++,n=o[1],o=[0];continue;case 7:o=r.ops.pop(),r.trys.pop();continue;default:if(!((i=(i=r.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){r=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=0&&(this._resendInterval=Math.floor(a)),"number"==typeof n&&n>=0&&(this._maxBytesOnDisk=Math.floor(n)),t&&!f.FileAccessControl.OS_PROVIDES_FILE_PROTECTION&&(this._enableDiskRetryMode=!1,this._logWarn("Ignoring request to enable disk retry mode. Sufficient file protection capabilities were not detected.")),this._enableDiskRetryMode?(this._statsbeat&&this._statsbeat.addFeature(c.StatsbeatFeature.DISK_RETRY),this._fileCleanupTimer||(this._fileCleanupTimer=setTimeout((function(){i._fileCleanupTask()}),e.CLEANUP_TIMEOUT),this._fileCleanupTimer.unref())):(this._statsbeat&&this._statsbeat.removeFeature(c.StatsbeatFeature.DISK_RETRY),this._fileCleanupTimer&&clearTimeout(this._fileCleanupTimer))},e.prototype.send=function(t,a){return n(this,void 0,void 0,(function(){var n,o,r,s,u,h,f,g,y=this;return i(this,(function(i){switch(i.label){case 0:if(!t)return[3,5];if(n=this._redirectedHost||this._config.endpointUrl,o=new m.URL(n).hostname,r={method:"POST",withCredentials:!1,headers:{"Content-Type":"application/x-json-stream"}},!(s=this._getAuthorizationHandler?this._getAuthorizationHandler(this._config):null))return[3,4];this._statsbeat&&this._statsbeat.addFeature(c.StatsbeatFeature.AAD_HANDLING),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,s.addAuthorizationHeader(r)];case 2:return i.sent(),[3,4];case 3:return u=i.sent(),h="Failed to get AAD bearer token for the Application.",this._enableDiskRetryMode&&(h+="This batch of telemetry items will be retried. ",this._storeToDisk(t)),h+="Error:"+u.toString(),this._logWarn(h),"function"==typeof a&&a(h),[2];case 4:f="",t.forEach((function(e){var t=d.stringify(e);"string"==typeof t&&(f+=t+"\n")})),f.length>0&&(f=f.substring(0,f.length-1)),g=Buffer.from?Buffer.from(f):new Buffer(f),p.gzip(g,(function(i,s){var p=s;i?(y._logWarn(d.dumpObj(i)),p=g,r.headers["Content-Length"]=g.length.toString()):(r.headers["Content-Encoding"]="gzip",r.headers["Content-Length"]=s.length.toString()),y._logInfo(d.dumpObj(r)),r[l.disableCollectionRequestOption]=!0;var u=+new Date,m=d.makeRequest(y._config,n,r,(function(e){e.setEncoding("utf-8");var n="";e.on("data",(function(e){n+=e})),e.on("end",(function(){var i=+new Date-u;if(y._numConsecutiveFailures=0,y._isStatsbeatSender&&!y._statsbeatHasReachedIngestionAtLeastOnce&&(v.includes(e.statusCode)?y._statsbeatHasReachedIngestionAtLeastOnce=!0:y._statsbeatFailedToIngest()),y._statsbeat&&(402==e.statusCode||439==e.statusCode?y._statsbeat.countThrottle(c.StatsbeatNetworkCategory.Breeze,o,e.statusCode):y._statsbeat.countRequest(c.StatsbeatNetworkCategory.Breeze,o,i,200===e.statusCode,e.statusCode)),y._enableDiskRetryMode)if(200===e.statusCode)y._resendTimer||(y._resendTimer=setTimeout((function(){y._resendTimer=null,y._sendFirstFileOnDisk()}),y._resendInterval),y._resendTimer.unref());else if(y._isRetriable(e.statusCode))try{y._statsbeat&&y._statsbeat.countRetry(c.StatsbeatNetworkCategory.Breeze,o,e.statusCode);var r=JSON.parse(n),s=[];r.errors&&(r.errors.forEach((function(e){429!=e.statusCode&&500!=e.statusCode&&503!=e.statusCode||s.push(t[e.index])})),s.length>0&&y._storeToDisk(s))}catch(e){y._storeToDisk(t)}if(307===e.statusCode||308===e.statusCode)if(y._numConsecutiveRedirects++,y._numConsecutiveRedirects<10){var p=e.headers.location?e.headers.location.toString():null;p&&(y._redirectedHost=p,y.send(t,a))}else y._statsbeat&&y._statsbeat.countException(c.StatsbeatNetworkCategory.Breeze,o,{name:"Circular Redirect",message:"Error sending telemetry because of circular redirects."}),"function"==typeof a&&a("Error sending telemetry because of circular redirects.");else y._numConsecutiveRedirects=0,"function"==typeof a&&a(n),y._logInfo(n),"function"==typeof y._onSuccess&&y._onSuccess(n)}))}));m.setTimeout(e.HTTP_TIMEOUT,(function(){y._requestTimedOut=!0,m.abort()})),m.on("error",(function(n){if(y._isStatsbeatSender&&!y._statsbeatHasReachedIngestionAtLeastOnce&&y._statsbeatFailedToIngest(),y._numConsecutiveFailures++,y._statsbeat&&y._statsbeat.countException(c.StatsbeatNetworkCategory.Breeze,o,n),!y._enableDiskRetryMode||y._numConsecutiveFailures>0&&y._numConsecutiveFailures%e.MAX_CONNECTION_FAILURES_BEFORE_WARN==0){var i="Ingestion endpoint could not be reached. This batch of telemetry items has been lost. Use Disk Retry Caching to enable resending of failed telemetry. Error:";y._enableDiskRetryMode&&(i="Ingestion endpoint could not be reached "+y._numConsecutiveFailures+" consecutive times. There may be resulting telemetry loss. Most recent error:"),y._logWarn(i,d.dumpObj(n))}else i="Transient failure to reach ingestion endpoint. This batch of telemetry items will be retried. Error:",y._logInfo(i,d.dumpObj(n));y._onErrorHelper(n),"function"==typeof a&&(n?(y._requestTimedOut&&(n.name="telemetry timeout",n.message="telemetry request timed out"),a(d.dumpObj(n))):a("Error sending telemetry")),y._enableDiskRetryMode&&y._storeToDisk(t)})),m.write(p),m.end()})),i.label=5;case 5:return[2]}}))}))},e.prototype.saveOnCrash=function(e){this._enableDiskRetryMode&&this._storeToDiskSync(d.stringify(e))},e.prototype._isRetriable=function(e){return 206===e||401===e||403===e||408===e||429===e||500===e||502===e||503===e||504===e},e.prototype._logInfo=function(t){for(var a=[],n=1;n=3&&this._shutdownStatsbeat())},e.prototype._storeToDisk=function(e){return n(this,void 0,void 0,(function(){var t,a,n,o,r,p,c;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),this._logInfo("Checking existence of data storage directory: "+this._tempDir),[4,u.confirmDirExists(this._tempDir)];case 1:return i.sent(),[3,3];case 2:return t=i.sent(),this._logWarn("Failed to create folder to put telemetry: "+d.dumpObj(t)),this._onErrorHelper(t),[2];case 3:return i.trys.push([3,5,,6]),[4,f.FileAccessControl.applyACLRules(this._tempDir)];case 4:return i.sent(),[3,6];case 5:return a=i.sent(),this._logWarn("Failed to apply file access control to folder: "+d.dumpObj(a)),this._onErrorHelper(a),[2];case 6:return i.trys.push([6,8,,9]),[4,u.getShallowDirectorySize(this._tempDir)];case 7:return(n=i.sent())>this._maxBytesOnDisk?(this._logWarn("Not saving data due to max size limit being met. Directory size in bytes is: "+n),[2]):[3,9];case 8:return o=i.sent(),this._logWarn("Failed to read directory for retriable telemetry: "+d.dumpObj(o)),this._onErrorHelper(o),[2];case 9:return i.trys.push([9,11,,12]),r=(new Date).getTime()+".ai.json",p=s.join(this._tempDir,r),this._logInfo("saving data to disk at: "+p),[4,u.writeFileAsync(p,d.stringify(e),{mode:384})];case 10:return i.sent(),[3,12];case 11:return c=i.sent(),this._logWarn("Failed to persist telemetry to disk: "+d.dumpObj(c)),this._onErrorHelper(c),[2];case 12:return[2]}}))}))},e.prototype._storeToDiskSync=function(e){try{this._logInfo("Checking existence of data storage directory: "+this._tempDir),o.existsSync(this._tempDir)||o.mkdirSync(this._tempDir),f.FileAccessControl.applyACLRulesSync(this._tempDir);var t=u.getShallowDirectorySizeSync(this._tempDir);if(t>this._maxBytesOnDisk)return void this._logInfo("Not saving data due to max size limit being met. Directory size in bytes is: "+t);var a=(new Date).getTime()+".ai.json",n=s.join(this._tempDir,a);this._logInfo("saving data before crash to disk at: "+n),o.writeFileSync(n,e,{mode:384})}catch(e){this._logWarn("Error while saving data to disk: "+d.dumpObj(e)),this._onErrorHelper(e)}},e.prototype._sendFirstFileOnDisk=function(){return n(this,void 0,void 0,(function(){var e,t,a,n,o,r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,6,,7]),[4,u.readdirAsync(this._tempDir)];case 1:return(e=(e=i.sent()).filter((function(e){return s.basename(e).indexOf(".ai.json")>-1}))).length>0?(t=e[0],a=s.join(this._tempDir,t),[4,u.readFileAsync(a)]):[3,5];case 2:return n=i.sent(),[4,u.unlinkAsync(a)];case 3:return i.sent(),o=JSON.parse(n.toString()),[4,this.send(o)];case 4:i.sent(),i.label=5;case 5:return[3,7];case 6:return r=i.sent(),this._onErrorHelper(r),[3,7];case 7:return[2]}}))}))},e.prototype._onErrorHelper=function(e){"function"==typeof this._onError&&this._onError(e)},e.prototype._fileCleanupTask=function(){return n(this,void 0,void 0,(function(){var t,a,n,o,r,p=this;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,6,,7]),[4,u.readdirAsync(this._tempDir)];case 1:if(!((t=(t=i.sent()).filter((function(e){return s.basename(e).indexOf(".ai.json")>-1}))).length>0))return[3,5];a=0,i.label=2;case 2:return an?(o=s.join(this._tempDir,t[a]),[4,u.unlinkAsync(o).catch((function(e){p._onErrorHelper(e)}))]):[3,4]):[3,5];case 3:i.sent(),i.label=4;case 4:return a++,[3,2];case 5:return[3,7];case 6:return"ENOENT"!=(r=i.sent()).code&&this._onErrorHelper(r),[3,7];case 7:return[2]}}))}))},e.TAG="Sender",e.WAIT_BETWEEN_RESEND=6e4,e.MAX_BYTES_ON_DISK=52428800,e.MAX_CONNECTION_FAILURES_BEFORE_WARN=5,e.CLEANUP_TIMEOUT=36e5,e.FILE_RETEMPTION_PERIOD=6048e5,e.TEMPDIR_PREFIX="appInsights-node",e.HTTP_TIMEOUT=2e4,e}();e.exports=g},2570:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isContentTypeHeaderHtml=t.insertSnippetByIndex=t.getContentEncodingFromHeaders=t.isSupportedContentEncoding=t.findBufferEncodingType=t.isBufferType=t.getBrotliDecompressSync=t.getBrotliDecompressAsync=t.getBrotliCompressSync=t.getBrotliCompressAsync=t.inflateAsync=t.deflateAsync=t.gunzipAsync=t.gzipAsync=t.isBrotliSupperted=t.bufferEncodingTypes=t.contentEncodingMethod=void 0;var n,i=a(8761),o=a(1669);!function(e){e.GZIP="gzip",e.DEFLATE="deflate",e.BR="br"}(n=t.contentEncodingMethod||(t.contentEncodingMethod={})),t.bufferEncodingTypes=["utf8","utf16le","latin1","base64","hex","ascii","binary","ucs2"],t.isBrotliSupperted=function(){var e=process.versions.node.split(".")[0];return parseInt(e)>=10},t.gzipAsync=o.promisify(i.gzip),t.gunzipAsync=o.promisify(i.gunzip),t.deflateAsync=o.promisify(i.deflate),t.inflateAsync=o.promisify(i.inflate),t.getBrotliCompressAsync=function(e){return t.isBrotliSupperted()&&"function"==typeof e.brotliCompress?o.promisify(e.brotliCompress):null},t.getBrotliCompressSync=function(e){return t.isBrotliSupperted()&&"function"==typeof e.brotliCompressSync?e.brotliCompressSync:null},t.getBrotliDecompressAsync=function(e){return t.isBrotliSupperted()&&"function"==typeof e.brotliDecompress?o.promisify(e.brotliDecompress):null},t.getBrotliDecompressSync=function(e){return t.isBrotliSupperted()&&"function"==typeof e.brotliDecompressSync?e.brotliDecompressSync:null},t.isBufferType=function(e,t){var a=t||"utf8",n=!1;return Buffer.isEncoding(a)&&(n=Buffer.from(e.toString(a),a).toJSON().data.toString()===e.toJSON().data.toString()),n},t.findBufferEncodingType=function(e){var a=null;for(var n in t.bufferEncodingTypes){var i=t.bufferEncodingTypes[n];if(Buffer.isEncoding(i)&&t.isBufferType(e,i)){a=i;break}}return a},t.isSupportedContentEncoding=function(e){var t=null;switch(e){case"gzip":t=n.GZIP;break;case"br":t=n.BR;break;case"deflate":t=n.DEFLATE}return t},t.getContentEncodingFromHeaders=function(e){var a=[],n=e.getHeader("Content-Encoding");if(!n)return null;if("string"==typeof n){var i=t.isSupportedContentEncoding(n);i&&a.push(i)}return a},t.insertSnippetByIndex=function(e,t,a){return e<0?null:t.substring(0,e)+'