@microsoft/applicationinsights-channel-js 2.8.0-nightly.2204-04 → 2.8.0-nightly.2204-05
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/applicationinsights-channel-js.integrity.json +9 -9
- package/browser/applicationinsights-channel-js.js +323 -313
- package/browser/applicationinsights-channel-js.js.map +1 -1
- package/browser/applicationinsights-channel-js.min.js +2 -2
- package/browser/applicationinsights-channel-js.min.js.map +1 -1
- package/dist/applicationinsights-channel-js.d.ts +1 -1
- package/dist/applicationinsights-channel-js.js +323 -313
- package/dist/applicationinsights-channel-js.js.map +1 -1
- package/dist/applicationinsights-channel-js.min.js +2 -2
- package/dist/applicationinsights-channel-js.min.js.map +1 -1
- package/dist/applicationinsights-channel-js.rollup.d.ts +1 -1
- package/dist-esm/EnvelopeCreator.js +5 -5
- package/dist-esm/EnvelopeCreator.js.map +1 -1
- package/dist-esm/Interfaces.js +1 -1
- package/dist-esm/Offline.js +1 -1
- package/dist-esm/SendBuffer.js +7 -7
- package/dist-esm/SendBuffer.js.map +1 -1
- package/dist-esm/Sender.js +24 -24
- package/dist-esm/Sender.js.map +1 -1
- package/dist-esm/Serializer.js +10 -10
- package/dist-esm/Serializer.js.map +1 -1
- package/dist-esm/TelemetryProcessors/Sample.js +1 -1
- package/dist-esm/TelemetryProcessors/SamplingScoreGenerators/HashCodeScoreGenerator.js +1 -1
- package/dist-esm/TelemetryProcessors/SamplingScoreGenerators/SamplingScoreGenerator.js +1 -1
- package/dist-esm/applicationinsights-channel-js.js +1 -1
- package/package.json +3 -3
- package/src/EnvelopeCreator.ts +7 -7
- package/src/SendBuffer.ts +14 -14
- package/src/Sender.ts +36 -36
- package/src/Serializer.ts +13 -13
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Application Insights JavaScript SDK - Channel, 2.8.0-nightly.2204-
|
|
2
|
+
* Application Insights JavaScript SDK - Channel, 2.8.0-nightly.2204-05
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
|
-
var e=this,n=function(_){"use strict";var w="function",N="object",A="undefined",o="prototype",R="hasOwnProperty",t=Object,F=t[o],L=t.assign,E=t.create,M=t.defineProperty,D=F[R],H=null;function G(e){return void 0===e&&(e=!0),H&&e||(typeof globalThis!==A&&globalThis&&(H=globalThis),typeof self!==A&&self&&(H=self),typeof window!==A&&window&&(H=window),typeof global!==A&&global&&(H=global)),H}function X(e){throw new TypeError(e)}(G()||{}).Symbol,(G()||{}).Reflect;var f=L||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var i in n=arguments[t])F[R].call(n,i)&&(e[i]=n[i]);return e},Y=function(e,n){return(Y=t.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)n[R](t)&&(e[t]=n[t])})(e,n)};function J(e,n){function t(){this.constructor=e}typeof n!==w&&null!==n&&X("Class extends value "+n+" is not a constructor or null"),Y(e,n),e[o]=null===n?function(e){if(E)return E(e);if(null==e)return{};var n=typeof e;function t(){}return n!==N&&n!==w&&X("Object prototype may only be an Object:"+e),t[o]=e,new t}(n):(t[o]=n[o],new t)}var Z="constructor",g="prototype",$="function",Q="_dynInstFuncs",ee="_isDynProxy",ne="_dynClass",te="_dynInstChk",re=te,ie="_dfOpts",oe="_unknown_",ae="__proto__",se="useBaseInst",ue="setInstFuncs",ce=Object,le=ce.getPrototypeOf,fe=0;function m(e,n){return e&&ce[g].hasOwnProperty.call(e,n)}function de(e){return e&&(e===ce[g]||e===Array[g])}function pe(e){return de(e)||e===Function[g]}function ge(e){if(e){if(le)return le(e);e=e[ae]||e[g]||(e[Z]?e[Z][g]:null);if(e)return e}return null}function me(e,n){var t=[],r=ce.getOwnPropertyNames;if(r)t=r(e);else for(var i in e)"string"==typeof i&&m(e,i)&&t.push(i);if(t&&0<t.length)for(var o=0;o<t.length;o++)n(t[o])}function ve(e,n,t){return n!==Z&&typeof e[n]===$&&(t||m(e,n))}function he(e){throw new TypeError("DynamicProto: "+e)}function ye(e,n){for(var t=e.length-1;0<=t;t--)if(e[t]===n)return 1}function Ie(e,n){return m(e,g)?e.name||n||oe:((e||{})[Z]||{}).name||n||oe}function v(e,r,n,t){m(e,g)||he("theClass is an invalid class definition.");var i,o,a,s,u,c,l=e[g],f=(function(e){if(le)for(var n=[],t=ge(r);t&&!pe(t)&&!ye(n,t);){if(t===e)return 1;n.push(t),t=ge(t)}}(l)||he("["+Ie(e)+"] is not in class hierarchy of ["+Ie(r)+"]"),null),e=(m(l,ne)?f=l[ne]:(f="_dynCls$"+Ie(e,"_")+"$"+fe,fe++,l[ne]=f),v[ie]),d=!!e[se],p=(d&&t&&t[se]!==undefined&&(d=!!t[se]),o={},me(i=r,function(e){!o[e]&&ve(i,e,!1)&&(o[e]=i[e])}),o),d=(n(r,function(e,n,t,o){function r(e,n,t){var r,i=n[t];return i[ee]&&o&&!1!==(r=e[Q]||{})[re]&&(i=(r[n[ne]]||{})[t]||i),function(){return i.apply(e,arguments)}}for(var i={},a=(me(t,function(e){i[e]=r(n,t,e)}),ge(e)),s=[];a&&!pe(a)&&!ye(s,a);)me(a,function(e){!i[e]&&ve(a,e,!le)&&(i[e]=r(n,a,e))}),s.push(a),a=ge(a);return i}(l,r,p,d)),!!le&&!!e[ue]);a=l,n=f,s=r,u=p,e=!1!==(d=d&&t?!!t[ue]:d),de(a)||(l=s[Q]=s[Q]||{},c=l[n]=l[n]||{},!1!==l[re]&&(l[re]=!!e),me(s,function(e){var t,r,i;ve(s,e,!1)&&s[e]!==u[e]&&(c[e]=s[e],delete s[e],m(a,e)&&(!a[e]||a[e][ee])||(a[e]=(t=a,r=e,(i=function(){var e,n;return(function(e,n,t,r){var i=null;if(e&&m(t,ne)){var o=e[Q]||{};if((i=(o[t[ne]]||{})[n])||he("Missing ["+n+"] "+$),!i[te]&&!1!==o[re]){for(var a=!m(e,n),s=ge(e),u=[];a&&s&&!pe(s)&&!ye(u,s);){var c=s[n];if(c){a=c===r;break}u.push(s),s=ge(s)}try{a&&(e[n]=i),i[te]=1}catch(l){o[re]=!1}}}return i}(this,r,t,i)||(typeof(n=(n=t[e=r])===i?ge(t)[e]:n)!==$&&he("["+e+"] is not a "+$),n)).apply(this,arguments)})[ee]=1,i)))}))}v[ie]={setInstFuncs:!0,useBaseInst:!0};var k="",Se="isInitialized",Ce="teardown",Te="core",xe="update",be="disabled",_e="_doTeardown",we="toISOString",Ne="indexOf",Ae="trim",Re="toString",Fe="constructor",Le=M,e=t.freeze,Ee=t.keys,Me=String[o][Ae],De=Date[o][we],n=Array.isArray,ke=F[Re],Be=D[Re],Pe=Be.call(t),Ue=/-([a-z])/g,Oe=/([^\w\d_$])/g,ze=/^(\d+[\w\d_$])/,je=Object.getPrototypeOf;function Ke(e){return e===undefined||typeof e===A}function B(e){return null===e||Ke(e)}function qe(e){return!(!e||typeof e!==N)}function p(e){return!(!e||typeof e!==w)}function Ve(e){var n=e;return e&&h(e)?(n=(n=e.replace(Ue,function(e,n){return n.toUpperCase()})).replace(Oe,"_")).replace(ze,function(e,n){return"_"+n}):n}function P(e,n){if(e)for(var t in e)D.call(e,t)&&n.call(e,t,e[t])}function We(e,n){return!(!e||!n||!~e.indexOf(n))}var U=n||function(e){return!(!e||"[object Array]"!==ke.call(e))};function He(e){return e&&"[object Error]"===ke.call(e)}function h(e){return"string"==typeof e}function Ge(e){return e&&"object"==typeof e&&(!(e=(je||function(e){if(e){if(je)return je(e);e=e.__proto__||e[o]||e[Fe];if(e)return e}return null})(e))||typeof(e=e[Fe]&&D.call(e,Fe)?e[Fe]:e)===w&&Be.call(e)===Pe)}function Xe(e){if(e){if(De)return e[we]();var n;return e&&e.getUTCFullYear?(n=function(e){e=""+e;return 1===e.length?"0"+e:e},e.getUTCFullYear()+"-"+n(1+e.getUTCMonth())+"-"+n(e.getUTCDate())+"T"+n(e.getUTCHours())+":"+n(e.getUTCMinutes())+":"+n(e.getUTCSeconds())+"."+(e.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"):void 0}}function O(e,n,t){var r=e.length;try{for(var i=0;i<r&&!(i in e&&-1===n.call(t||e,e[i],i,e));i++);}catch(o){}}function Ye(e,n,t){if(e){if(e.map)return e.map(n,t);var r=e.length,i=t||e,o=Array(r);try{for(var a=0;a<r;a++)a in e&&(o[a]=n.call(i,e[a],e))}catch(s){}}return o}function Je(e){return e&&(Me&&e[Ae]?e[Ae]():e.replace?e.replace(/^\s+|\s+$/g,""):e)}var Ze=!{toString:null}.propertyIsEnumerable("toString"),$e=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];function Qe(e){var n=typeof e;if(n===w||n===N&&null!==e||X("objKeys called on non-object"),!Ze&&Ee)return Ee(e);var t,r=[];for(t in e)e&&D.call(e,t)&&r.push(t);if(Ze)for(var i=$e.length,o=0;o<i;o++)e&&D.call(e,$e[o])&&r.push($e[o]);return r}var en=e||function(e){return e};function nn(){var e=Date;return e.now?e.now():(new e).getTime()}function z(e){return He(e)?e.name:k}function tn(e,n,t,r,i){var o=t;!e||(o=e[n])===t||i&&!i(o)||r&&!r(t)||(e[n]=o=t)}function rn(e){return!!e}function on(e){var t={};return P(e,function(e,n){if(t[e]=n,!Ke(t[n]))throw Error("["+n+"] exists for "+e);t[n]=e}),en(t)}function an(e){return e&&L?t(L({},e)):e}var sn="window",un="navigator",cn="JSON",ln="msie",fn="trident/",dn="XMLHttpRequest",pn=null,gn=null,mn=null,vn=null;function hn(e,n){var t,r=!1;if(e){try{(r=n in e)||(t=e[o])&&(r=n in t)}catch(i){}if(!r)try{r=!Ke((new e)[n])}catch(i){}}return r}function c(e){var n=G();return n&&n[e]?n[e]:e===sn&&yn()?window:null}function yn(){return typeof window===N&&window}function In(){return yn()?window:c(sn)}function Sn(){return typeof document===N&&document?document:c("document")}function Cn(){return!(typeof navigator!==N||!navigator)}function Tn(){return Cn()?navigator:c(un)}function xn(){return typeof JSON===N&&JSON||null!==c(cn)}function j(){return xn()?JSON||c(cn):null}function K(e){var n=Object[o].toString.call(e),t=k;return"[object Error]"===n?t="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":xn()&&(t=j().stringify(e)),n+t}function bn(){return vn=null===vn?Cn()&&!!Tn().sendBeacon:vn}function _n(e){var n=!1;try{var n=!!c("fetch"),t=c("Request");n&&e&&t&&(n=hn(t,"keepalive"))}catch(r){}return n}function wn(){return mn=null===mn&&(mn=typeof XDomainRequest!==A)&&Nn()?mn&&!hn(c(dn),"withCredentials"):mn}function Nn(){var e=!1;try{e=!!c(dn)}catch(n){}return e}var An=null;function Rn(e){return e?'"'+e.replace(/\"/g,k)+'"':k}function Fn(e,n){var t,r=typeof console!==A?console:c("console");r&&(t="log",p(r[t=r[e]?e:t])&&r[t](n))}En.dataType="MessageData";var Ln=En;function En(e,n,t,r){void 0===t&&(t=!1),this.messageId=e,this.message=(t?"AI: ":"AI (Internal): ")+e;t=k,xn()&&(t=j().stringify(r)),e=(n?" message:"+Rn(n):k)+(r?" props:"+Rn(t):k);this.message+=e}function Mn(e,n){return(e||{}).logger||new Dn(n)}var Dn=function oi(i){this.identifier="DiagnosticLogger",this.queue=[];var s=0,u={};v(oi,this,function(o){function e(e,n){e=i[e];return B(e)?n:e}function a(e,n){var t,r=(t=(t=An)||!0===i.disableDbgExt?t:An||(r=c("Microsoft"),An=r?r.ApplicationInsights:An))?t.ChromeDbgExt:null;r&&r.diagLog&&r.diagLog(e,n)}B(i)&&(i={}),o.consoleLoggingLevel=function(){return e("loggingLevelConsole",0)},o.telemetryLoggingLevel=function(){return e("loggingLevelTelemetry",1)},o.maxInternalMessageLimit=function(){return e("maxMessageLimit",25)},o.enableDebugExceptions=function(){return e("enableDebugExceptions",!1)},o.throwInternal=function(e,n,t,r,i){n=new Ln(n,t,i=void 0!==i&&i,r);if(o.enableDebugExceptions())throw n;t=1===e?"errorToConsole":"warnToConsole";Ke(n.message)?a("throw"+(1===e?"Critical":"Warning"),n):(r=o.consoleLoggingLevel(),i?(i=+n.messageId,!u[i]&&e<=r&&(o[t](n.message),u[i]=!0)):e<=r&&o[t](n.message),o.logInternalMessage(e,n))},o.warnToConsole=function(e){Fn("warn",e),a("warning",e)},o.errorToConsole=function(e){Fn("error",e),a("error",e)},o.resetInternalMessageCount=function(){s=0,u={}},o.logInternalMessage=function(e,n){var t,r;s>=o.maxInternalMessageLimit()||(r=!0,t="AITR_"+n.messageId,u[t]?r=!1:u[t]=!0,r&&(e<=o.telemetryLoggingLevel()&&(o.queue.push(n),s++,a(1===e?"error":"warn",n)),s===o.maxInternalMessageLimit()&&(r=new Ln(23,t="Internal events throttle limit per PageView reached for this app.",!1),o.queue.push(r),1===e?o.errorToConsole(t):o.warnToConsole(t))))}})};function q(e,n,t,r,i,o){void 0===o&&(o=!1),(e||new Dn).throwInternal(n,t,r,i,o)}s.ParentContextKey="parent",s.ChildrenContextKey="childEvts";var kn=s;function s(e,i,n){var r,o=this,a=!1;o.start=nn(),o.name=e,o.isAsync=n,o.isChildEvt=function(){return!1},p(i)&&(a=function(e){if(Le)try{var n={enumerable:!0,configurable:!0,get:function(){return!r&&p(i)&&(r=i(),i=null),r}};return Le(e,"payload",n),!0}catch(t){}return!1}(o)),o.getCtx=function(e){return e?(e===s.ParentContextKey||e===s.ChildrenContextKey?o:o.ctx||{})[e]:null},o.setCtx=function(e,n){e&&(e===s.ParentContextKey?(o[e]||(o.isChildEvt=function(){return!0}),o[e]=n):e===s.ChildrenContextKey?o[e]=n:(o.ctx=o.ctx||{})[e]=n)},o.complete=function(){var e=0,n=o.getCtx(s.ChildrenContextKey);if(U(n))for(var t=0;t<n.length;t++){var r=n[t];r&&(e+=r.time)}o.time=nn()-o.start,o.exTime=o.time-e,o.complete=function(){},!a&&p(i)&&(o.payload=i())}}var Bn="CoreUtils.doPerf";function Pn(e,n,t,r,i){if(e)if(e=p(e.getPerfMgr)?e.getPerfMgr():e){var o,a=void 0,s=e.getCtx(Bn);try{if(a=e.create(n(),r,i))return s&&a.setCtx&&(a.setCtx(kn.ParentContextKey,s),s.getCtx&&s.setCtx&&((o=s.getCtx(kn.ChildrenContextKey))||(o=[],s.setCtx(kn.ChildrenContextKey,o)),o.push(a))),e.setCtx(Bn,a),t(a)}catch(u){a&&a.setCtx&&a.setCtx("exception",u)}finally{a&&e.fire(a),e.setCtx(Bn,s)}}t()}var Un=4294967296,On=4294967295,zn=!1,jn=123456789,Kn=987654321;function qn(e){var n,t=0,r=c("crypto")||c("msCrypto");if(0===(t=r&&r.getRandomValues?r.getRandomValues(new Uint32Array(1))[0]&On:t)&&(!(r=Tn())||r.userAgent===gn&&null!==pn||(r=((gn=r.userAgent)||k).toLowerCase(),pn=We(r,ln)||We(r,fn)),pn)){if(!zn)try{var i=2147483647&nn();(n=(Math.random()*Un^i)+i)<0&&(n>>>=0),jn=123456789+n&On,Kn=987654321-n&On,zn=!0}catch(o){}r=((Kn=36969*(65535&Kn)+(Kn>>16)&On)<<16)+(65535&(jn=18e3*(65535&jn)+(jn>>16)&On))>>>0&On|0,t=(r>>>=0)&On}return 0===t&&(t=Math.floor(Un*Math.random()|0)),e||(t>>>=0),t}var Vn=M,Wn="2.8.0-nightly.2204-04",Hn="."+function(e){void 0===e&&(e=22);for(var n=qn()>>>0,t=0,r=k;r.length<e;)r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[0|63&n]||"",n>>>=6,5==++t&&(n=(qn()<<2&4294967295|3&n)>>>0,t=0);return r}(6),Gn=0;function Xn(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType}function Yn(e,n){return Ve(e+Gn+++((n=void 0!==n&&n)?"."+Wn:"")+Hn)}function Jn(e){var o={id:Yn("_aiData-"+(e||"")+"."+Wn),accept:Xn,get:function(e,n,t,r){var i=e[o.id];return i?i[Ve(n)]:(r&&((i=function(e,n){var t=n[e.id];if(!t){t={};try{Xn(n)&&!function(e,n,t){if(Vn)try{return Vn(e,n,{value:t,enumerable:!1,configurable:!0}),1}catch(r){}}(n,e.id,t)&&(n[e.id]=t)}catch(r){}}return t}(o,e))[Ve(n)]=t),t)},kill:function(e,n){if(e&&e[n])try{delete e[n]}catch(t){}}};return o}var Zn=Jn("plugin");function $n(e){return Zn.get(e,"state",{},!0)}var Qn="TelemetryPluginChain",et="_hasRun",nt="_getTelCtx",tt=0;function rt(e,a,t,n){var r=null,i=[],o=(null!==n&&(r=n?function(e,n,t,r){for(;e;){if(e.getPlugin()===r)return e;e=e.getNext()}return ot([r],n,t)}(e,a,t,n):e),{_next:function(){var e,n=r;return r=n?n.getNext():null,n||(e=i)&&0<e.length&&(O(e,function(e){try{e.func.call(e.self,e.args)}catch(n){q(t.logger,2,73,"Unexpected Exception during onComplete - "+K(n))}}),i=[]),n},ctx:{core:function(){return t},diagLog:function(){return Mn(t,a)},getCfg:function(){return a},getExtCfg:s,getConfig:function(e,n,t){void 0===t&&(t=!1);var r,e=s(e,null);return e&&!B(e[n])?r=e[n]:a&&!B(a[n])&&(r=a[n]),B(r)?t:r},hasNext:function(){return!!r},getNext:function(){return r},setNext:function(e){r=e},iterate:function(e){for(;n=o._next();){var n=n.getPlugin();n&&e(n)}},onComplete:function(e,n){for(var t=[],r=2;r<arguments.length;r++)t[r-2]=arguments[r];e&&i.push({func:e,self:Ke(n)?o.ctx:n,args:t})}}});function s(e,n,t){var r,i,o;return void 0===n&&(n={}),void 0===t&&(t=0),(r=a&&(i=a.extensionConfig)&&e?i[e]:r)?qe(n)&&0!==t&&(o=function d(){var e=arguments,n=e[0]||{},t=e.length,r=!1,i=1;for(0<t&&"boolean"==typeof n&&(r=n,n=e[i]||{},i++),qe(n)||(n={});i<t;i++){var o,a,s,u,c=e[i],l=U(c),f=qe(c);for(o in c)(l&&o in c||f&&D.call(c,o))&&(a=c[o],s=void 0,r&&a&&((s=U(a))||Ge(a))&&(u=n[o],s?U(u)||(u=[]):Ge(u)||(u={}),a=d(r,u,a)),a!==undefined&&(n[o]=a))}return n}(!0,n,r),a&&2===t&&P(n,function(e){var n;B(o[e])&&!B(n=a[e])&&(o[e]=n)})):r=n,r}return o}function it(e,t,r,n){var i=rt(e,t,r,n),o=i.ctx;return o.processNext=function(e){var n=i._next();return n&&n.processTelemetry(e,o),!n},o.createNew=function(e,n){return it((e=U(e=void 0===e?null:e)?ot(e,t,r,n):e)||o.getNext(),t,r,n)},o}function ot(e,n,t,r){var i,o=null,a=!r;return U(e)&&0<e.length&&(i=null,O(e,function(e){(a=!a&&r===e||a)&&e&&p(e.processTelemetry)&&(e=at(e,n,t),o=o||e,i&&i._setNext(e),i=e)})),r&&!o?ot([r],n,t):o}function at(u,r,i){var c=null,o=p(u.processTelemetry),a=p(u.setNextPlugin),l=u?u.identifier+"-"+u.priority+"-"+tt++:"Unknown-0-"+tt++,s={getPlugin:function(){return u},getNext:function(){return c},processTelemetry:function(t,e){var n;f(e=e||(n=(n=u&&p(u[nt])?u[nt]():n)||it(s,r,i)),function(e){if(!u||!o)return!1;var n=$n(u);return!n[Ce]&&!n[be]&&(a&&u.setNextPlugin(c),u.processTelemetry(t,e),!0)},"processTelemetry",function(){return{item:t}},!t.sync)||e.processNext(t)},unload:function(r,i){f(r,function(){var e,n,t=!1;return u&&(e=$n(u),n=u[Te]||e.core,!u||n&&n!==r[Te]()||e[Ce]||(e[Te]=null,e[Ce]=!0,e[Se]=!1,u[Ce]&&!0===u[Ce](r,i)&&(t=!0))),t},"unload",function(){},i.isAsync)||r.processNext(i)},update:function(r,i){f(r,function(){var e,n,t=!1;return u&&(e=$n(u),n=u[Te]||e.core,!u||n&&n!==r[Te]()||e[Ce]||u[xe]&&!0===u[xe](r,i)&&(t=!0)),t},"update",function(){},!1)||r.processNext(i)},_id:l,_setNext:function(e){c=e}};function f(t,r,i,e,n){var o=!1,a=u?u.identifier:Qn,s=(s=t[et])||(t[et]={});return t.setNext(c),u&&Pn(t[Te](),function(){return a+":"+i},function(){s[l]=!0;try{var e=c?c._id:k;e&&(s[e]=!1),o=r(t)}catch(n){e=!c||s[c._id];e&&(o=!0),c&&e||q(t.diagLog(),1,73,"Plugin ["+u.identifier+"] failed during "+i+" - "+K(n)+", run flags: "+K(s))}},e,n),o}return en(s)}function st(){var n=[];return{add:function(e){e&&n.push(e)},run:function(t,r){O(n,function(e){try{e(t,r)}catch(n){q(t.diagLog(),2,73,"Unexpected error calling unload handler - "+K(n))}}),n=[]}}}var y="getPlugin",Re=function ai(){var o,i,c,l,f,a=this;function n(e){var n,e=e=void 0===e?null:e;return e||(n=i||it(null,{},a.core),e=c&&c[y]?n.createNew(null,c[y]):n.createNew(null,c)),e}function s(e,n,t){e&&tn(e,"extensionConfig",[],null,B),!t&&n&&(t=n.getProcessTelContext().getNext());var r=c;c&&c[y]&&(r=c[y]()),a.core=n,i=it(t,e,n,r)}function d(){o=!1,a.core=null,c=i=null,f=[],l=st()}d(),v(ai,a,function(u){var e,n,t,r,i;u.initialize=function(e,n,t,r){s(e,n,r),o=!0},u.teardown=function(e,n){var t,r,i,o;if(u.core&&(!e||u.core===e.core()))return r=!1,i=e||function s(e,t,r,n){var i=rt(e,t,r,n),o=i.ctx;return o.processNext=function(e){var n=i._next();return n&&n.unload(o,e),!n},o.createNew=function(e,n){return s((e=U(e=void 0===e?null:e)?ot(e,t,r,n):e)||o.getNext(),t,r,n)},o}(null,{},u.core,c&&c[y]?c[y]():c),o=n||{reason:0,isAsync:!1},u[_e]&&!0===u[_e](i,o,a)?t=!0:a(),t;function a(){r||(r=!0,l.run(i,n),O(f,function(e){e.rm()}),f=[],!0===t&&i.processNext(o),d())}},u.update=function(e,n){var t,r,i;if(u.core&&(!e||u.core===e.core()))return r=!1,i=e||function a(e,t,r,n){var i=rt(e,t,r,n).ctx;return i.processNext=function(n){return i.iterate(function(e){p(e[xe])&&e[xe](i,n)})},i.createNew=function(e,n){return a((e=U(e=void 0===e?null:e)?ot(e,t,r,n):e)||i.getNext(),t,r,n)},i}(null,{},u.core,c&&c[y]?c[y]():c),u._doUpdate&&!0===u._doUpdate(i,n||{reason:0},o)?t=!0:o(),t;function o(){r||(r=!0,s(i.getCfg(),i.core(),i.getNext()))}},u._addHook=function(e){e&&(U(e)?f=f.concat(e):f.push(e))},e="_addUnloadCb",n=function(){return l},void 0===t&&(t=!0),u&&n&&(t||Ke(u[e]))&&(u[e]=(i=r=null,p(t=n)?r=t:i=t,function(){var e=arguments;if(i=r?r():i)return i.add.apply(i,e)}))}),a.diagLog=function(e){return n(e).diagLog()},a[Se]=function(){return o},a.setInitialized=function(e){o=e},a.setNextPlugin=function(e){c=e},a.processNext=function(e,n){n?n.processNext(e):c&&p(c.processTelemetry)&&c.processTelemetry(e,null)},a._getTelCtx=n},ut="attachEvent",ct="addEventListener",lt="detachEvent",ft="removeEventListener",dt="events",pt=(Yn("aiEvtPageHide"),Yn("aiEvtPageShow"),/\.[\.]+/g),gt=/[\.]+$/,mt=1,vt=Jn("events"),ht=/^([^.]*)(?:\.(.+)|)/;function yt(e){return e&&e.replace?e.replace(/^\s*\.*|\.*\s*$/g,""):e}function It(e,n){n&&(t="",U(n)?(t="",O(n,function(e){(e=yt(e))&&("."!==e[0]&&(e="."+e),t+=e)})):t=yt(n),t&&(e=(e||"")+(t="."!==t[0]?"."+t:t)));var t,n=ht.exec(e||"")||[];return{type:n[1],ns:(n[2]||"").replace(pt,".").replace(gt,"").split(".").sort().join(".")}}function St(e,n,t){e=vt.get(e,dt,{},t=void 0===t||t);return e[n]||(e[n]=[])}function Ct(e,n,t,r){e&&n&&n.type&&(e[ft]?e[ft](n.type,t,r):e[lt]&&e[lt]("on"+n.type,t))}function Tt(e,n,t,r){for(var i=n.length;i--;){var o=n[i];!o||t.ns&&t.ns!==o.evtName.ns||r&&!r(o)||(Ct(e,o.evtName,o.handler,o.capture),n.splice(i,1))}}function xt(e,n){return n?It("xx",U(n)?[e].concat(n):[e,n]).ns.split("."):e}function bt(e,n,t,r,i){void 0===i&&(i=!1);var o,a=!1;if(e)try{var s,u=It(n,r),c=u,l=t,f=i,d=!1;(o=e)&&c&&c.type&&l&&(o[ct]?(o[ct](c.type,l,f),d=!0):o[ut]&&(o[ut]("on"+c.type,l),d=!0)),(a=d)&&vt.accept(e)&&(s={guid:mt++,evtName:u,handler:t,capture:i},St(e,u.type).push(s))}catch(p){}return a}var V=on({CRITICAL:1,WARNING:2}),W=on({BrowserDoesNotSupportLocalStorage:0,BrowserCannotReadLocalStorage:1,BrowserCannotReadSessionStorage:2,BrowserCannotWriteLocalStorage:3,BrowserCannotWriteSessionStorage:4,BrowserFailedRemovalFromLocalStorage:5,BrowserFailedRemovalFromSessionStorage:6,CannotSendEmptyTelemetry:7,ClientPerformanceMathError:8,ErrorParsingAISessionCookie:9,ErrorPVCalc:10,ExceptionWhileLoggingError:11,FailedAddingTelemetryToBuffer:12,FailedMonitorAjaxAbort:13,FailedMonitorAjaxDur:14,FailedMonitorAjaxOpen:15,FailedMonitorAjaxRSC:16,FailedMonitorAjaxSend:17,FailedMonitorAjaxGetCorrelationHeader:18,FailedToAddHandlerForOnBeforeUnload:19,FailedToSendQueuedTelemetry:20,FailedToReportDataLoss:21,FlushFailed:22,MessageLimitPerPVExceeded:23,MissingRequiredFieldSpecification:24,NavigationTimingNotSupported:25,OnError:26,SessionRenewalDateIsZero:27,SenderNotInitialized:28,StartTrackEventFailed:29,StopTrackEventFailed:30,StartTrackFailed:31,StopTrackFailed:32,TelemetrySampledAndNotSent:33,TrackEventFailed:34,TrackExceptionFailed:35,TrackMetricFailed:36,TrackPVFailed:37,TrackPVFailedCalc:38,TrackTraceFailed:39,TransmissionFailed:40,FailedToSetStorageBuffer:41,FailedToRestoreStorageBuffer:42,InvalidBackendResponse:43,FailedToFixDepricatedValues:44,InvalidDurationValue:45,TelemetryEnvelopeInvalid:46,CreateEnvelopeError:47,CannotSerializeObject:48,CannotSerializeObjectNonSerializable:49,CircularReferenceDetected:50,ClearAuthContextFailed:51,ExceptionTruncated:52,IllegalCharsInName:53,ItemNotInArray:54,MaxAjaxPerPVExceeded:55,MessageTruncated:56,NameTooLong:57,SampleRateOutOfRange:58,SetAuthContextFailed:59,SetAuthContextFailedAccountName:60,StringValueTooLong:61,StartCalledMoreThanOnce:62,StopCalledWithoutStart:63,TelemetryInitializerFailed:64,TrackArgumentsNotSpecified:65,UrlTooLong:66,SessionStorageBufferFull:67,CannotAccessCookie:68,IdTooLong:69,InvalidEvent:70,FailedMonitorAjaxSetRequestHeader:71,SendBrowserInfoOnUserInit:72,PluginException:73,NotificationException:74,SnippetScriptLoadFailure:99,InvalidInstrumentationKey:100,CannotParseAiBlobValue:101,InvalidContentBlob:102,TrackPageActionEventFailed:103,FailedAddingCustomDefinedRequestContext:104,InMemoryStorageBufferFull:105});function _t(e,n,t){var r,i,o=n.length,a=(e=e,(n=n)&&150<(n=Je(n.toString())).length&&(i=n.substring(0,150),q(e,2,W.NameTooLong,"name is too long. It has been truncated to 150 characters.",{name:n},!0)),i||n);if(a.length!==o){for(var s=0,u=a;t[u]!==undefined;)s++,u=a.substring(0,147)+(r=void 0,(r="00"+s).substr(r.length-3));a=u}return a}function I(e,n,t){var r;return void 0===t&&(t=1024),n&&(t=t||1024,(n=Je(n)).toString().length>t&&(r=n.toString().substring(0,t),q(e,2,W.StringValueTooLong,"string value is too long. It has been truncated to "+t+" characters.",{value:n},!0))),r||n}function wt(e,n){return Ft(e,n,2048,W.UrlTooLong)}function Nt(e,n){var t;return n&&32768<n.length&&(t=n.substring(0,32768),q(e,2,W.MessageTruncated,"message is too long, it has been truncated to 32768 characters.",{message:n},!0)),t||n}function At(r,e){var i;return e&&(i={},P(e,function(e,n){if(qe(n)&&xn())try{n=j().stringify(n)}catch(t){q(r,2,W.CannotSerializeObjectNonSerializable,"custom property is not valid",{exception:t},!0)}n=I(r,n,8192),e=_t(r,e,i),i[e]=n}),e=i),e}function Rt(t,e){var r;return e&&(r={},P(e,function(e,n){e=_t(t,e,r),r[e]=n}),e=r),e}function Ft(e,n,t,r){var i;return n&&(n=Je(n)).length>t&&(i=n.substring(0,t),q(e,2,r,"input is too long, it has been truncated to "+t+" characters.",{data:n},!0)),i||n}var Lt="";function Et(e){var n=Lt+Math.floor((e=Math.round(e=isNaN(e)||e<0?0:e))/1e3)%60,t=Lt+Math.floor(e/6e4)%60,r=Lt+Math.floor(e/36e5)%24,i=Math.floor(e/864e5),e=1===(e=Lt+e%1e3).length?"00"+e:2===e.length?"0"+e:e,n=n.length<2?"0"+n:n,t=t.length<2?"0"+t:t,r=r.length<2?"0"+r:r;return(0<i?i+".":Lt)+r+":"+t+":"+n+"."+e}var Mt="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",Dt="sampleRate",kt="ProcessLegacy",Bt="http.method",l="not_specified",Pt=on({LocalStorage:0,SessionStorage:1}),Ut=(on({AI:0,AI_AND_W3C:1,W3C:2}),undefined);function Ot(e){try{if(B(G()))return null;var n=new Date,t=c(e===Pt.LocalStorage?"localStorage":"sessionStorage"),r=(t.setItem(n.toString(),n.toString()),t.getItem(n.toString())!==n.toString());if(t.removeItem(n.toString()),!r)return t}catch(i){}return null}function zt(){return jt()?Ot(Pt.SessionStorage):null}function jt(e){return Ut=e||Ut===undefined?!!Ot(Pt.SessionStorage):Ut}function Kt(e,n){var t=zt();if(null!==t)try{return t.getItem(n)}catch(r){Ut=!1,q(e,2,W.BrowserCannotReadSessionStorage,"Browser failed read of session storage. "+z(r),{exception:K(r)})}return null}function qt(e,n,t){var r=zt();if(null!==r)try{r.setItem(n,t)}catch(i){Ut=!1,q(e,2,W.BrowserCannotWriteSessionStorage,"Browser failed write to session storage. "+z(i),{exception:K(i)})}}var Vt=Sn()||{},Wt=0,Ht=[null,null,null,null,null];var Gt=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"];function Xt(e){return~Gt.indexOf(e.toLowerCase())}var Yt=function(e,n,t){var r=this,i=this;i.ver=1,i.sampleRate=100,i.tags={},i.name=I(e,t)||l,i.data=n,i.time=Xe(new Date),i.aiDataContract={time:1,iKey:1,name:1,sampleRate:function(){return 100===r.sampleRate?4:1},tags:1,data:1}},Jt=(Zt.envelopeType="Microsoft.ApplicationInsights.{0}.Event",Zt.dataType="EventData",Zt);function Zt(e,n,t,r){this.aiDataContract={ver:1,name:1,properties:0,measurements:0},this.ver=2,this.name=I(e,n)||l,this.properties=At(e,t),this.measurements=Rt(e,r)}var $t="error",u="stack",Qt="stackDetails",er="errorSrc",nr="message",tr="description";function rr(e,n){var t=e;return t&&!h(t)&&(JSON&&JSON.stringify?(t=JSON.stringify(e),!n||t&&"{}"!==t||(t=p(e.toString)?e.toString():""+e)):t=e+" - (Missing JSON.stringify)"),t||""}function ir(e,n){var t=e;return e&&((t=t&&!h(t)&&(e[nr]||e[tr])||t)&&!h(t)&&(t=rr(t,!0)),e.filename&&(t=t+" @"+(e.filename||"")+":"+(e.lineno||"?")+":"+(e.colno||"?"))),(n&&"String"!==n&&"Object"!==n&&"Error"!==n&&!~(t||"").indexOf(n)?n+": "+t:t)||""}function or(e){return e&&e.src&&h(e.src)&&e.obj&&U(e.obj)}function ar(e){var e=e||"",n=(e=h(e)?e:h(e[u])?e[u]:""+e).split("\n");return{src:e,obj:n}}function sr(e){var n,t=null;if(e)try{e[u]?t=ar(e[u]):e[$t]&&e[$t][u]?t=ar(e[$t][u]):e.exception&&e.exception[u]?t=ar(e.exception[u]):or(e)?t=e:or(e[Qt])?t=e[Qt]:window&&window.opera&&e[nr]?t=function(e){for(var n=[],t=e.split("\n"),r=0;r<t.length;r++){var i=t[r];t[r+1]&&(i+="@"+t[r+1],r++),n.push(i)}return{src:e,obj:n}}(e.message):h(e)?t=ar(e):(n=e[nr]||e[tr]||"",h(e[er])&&(n&&(n+="\n"),n+=" from "+e[er]),n&&(t=ar(n)))}catch(r){t=ar(r)}return t||{src:"",obj:null}}function ur(e){var n="";if(e&&!(n=e.typeName||e.name||""))try{var t=/function (.{1,200})\(/.exec(e.constructor.toString()),n=t&&1<t.length?t[1]:""}catch(r){}return n}function cr(e){if(e)try{var n,t;if(!h(e))return n=ur(e),(t=rr(e,!1))&&"{}"!==t||(e[$t]&&(n=ur(e=e[$t])),t=rr(e,!0)),t.indexOf(n)&&"String"!==n?n+":"+t:t}catch(r){}return""+(e||"")}a.CreateAutoException=function(e,n,t,r,i,o,a,s){var u=ur(i||o||e);return{message:ir(e,u),url:n,lineNumber:t,columnNumber:r,error:cr(i||o||e),evt:cr(o||e),typeName:u,stackDetails:sr(a||i||o),errorSrc:s}},a.CreateFromInterface=function(n,e,t,r){var i=e.exceptions&&Ye(e.exceptions,function(e){return fr.CreateFromInterface(n,e)});return new a(n,f(f({},e),{exceptions:i}),t,r)},a.prototype.toInterface=function(){var e=this,n=e.exceptions,t=e.properties,r=e.measurements,i=e.severityLevel,o=e.problemGroup,a=e.id,e=e.isManual;return{ver:"4.0",exceptions:n instanceof Array&&Ye(n,function(e){return e.toInterface()})||undefined,severityLevel:i,properties:t,measurements:r,problemGroup:o,id:a,isManual:e}},a.CreateSimpleException=function(e,n,t,r,i,o){return{exceptions:[{hasFullStack:!0,message:e,stack:i,typeName:n}]}},a.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",a.dataType="ExceptionData",a.formatError=cr;var lr=a;function a(e,n,t,r,i,o){this.aiDataContract={ver:1,exceptions:1,severityLevel:0,properties:0,measurements:0};var a=this;a.ver=2,function(e){try{if(qe(e))return"ver"in e&&"exceptions"in e&&"properties"in e}catch(n){}}(n)?(a.exceptions=n.exceptions||[],a.properties=n.properties,a.measurements=n.measurements,n.severityLevel&&(a.severityLevel=n.severityLevel),n.id&&(a.id=n.id),n.problemGroup&&(a.problemGroup=n.problemGroup),B(n.isManual)||(a.isManual=n.isManual)):(a.exceptions=[new fr(e,n,t=t||{})],a.properties=At(e,t),a.measurements=Rt(e,r),i&&(a.severityLevel=i),o&&(a.id=o))}dr.prototype.toInterface=function(){var e=this,n=e.parsedStack instanceof Array&&Ye(e.parsedStack,function(e){return e.toInterface()});return{id:e.id,outerId:e.outerId,typeName:e.typeName,message:e.message,hasFullStack:e.hasFullStack,stack:e[u],parsedStack:n||undefined}},dr.CreateFromInterface=function(e,n){var t=n.parsedStack instanceof Array&&Ye(n.parsedStack,function(e){return pr.CreateFromInterface(e)})||n.parsedStack;return new dr(e,f(f({},n),{parsedStack:t}))};var fr=dr;function dr(e,n,t){this.aiDataContract={id:0,outerId:0,typeName:1,message:1,hasFullStack:0,stack:0,parsedStack:2};var c,r,i,o,a,s=this;!function(e){try{if(qe(e))return"hasFullStack"in e&&"typeName"in e}catch(n){}}(n)?(r=(o=n)&&o.evt,He(o)||(o=o[$t]||r||o),s.typeName=I(e,ur(o))||l,s.message=Nt(e,ir(n||o,s.typeName))||l,c=n[Qt]||sr(n),s.parsedStack=function(){var e=c.obj;if(e&&0<e.length){var n=[],t=0,r=0;if(O(e,function(e){var e=e.toString();pr.regex.test(e)&&(e=new pr(e,t++),r+=e.sizeInBytes,n.push(e))}),32768<r)for(var i=0,o=n.length-1,a=0,s=i,u=o;i<o;){if(32768<(a+=n[i].sizeInBytes+n[o].sizeInBytes)){n.splice(s,u-s+1);break}s=i,u=o,i++,o--}}return n}(),s[u]=(r=e,a="",(o=c)&&(o.obj?O(o.obj,function(e){a+=e+"\n"}):a=o.src||""),(e=a)&&32768<(o=""+e).length&&(i=o.substring(0,32768),q(r,2,W.ExceptionTruncated,"exception is too long, it has been truncated to 32768 characters.",{exception:e},!0)),i||e),s.hasFullStack=U(s.parsedStack)&&0<s.parsedStack.length,t&&(t.typeName=t.typeName||s.typeName)):(s.typeName=n.typeName,s.message=n.message,s[u]=n[u],s.parsedStack=n.parsedStack||[],s.hasFullStack=n.hasFullStack)}gr.CreateFromInterface=function(e){return new gr(e,null)},gr.prototype.toInterface=function(){var e=this;return{level:e.level,method:e.method,assembly:e.assembly,fileName:e.fileName,line:e.line}},gr.regex=/^([\s]+at)?[\s]{0,50}([^\@\()]+?)[\s]{0,50}(\@|\()([^\(\n]+):([0-9]+):([0-9]+)(\)?)$/,gr.baseSize=58;var pr=gr;function gr(e,n){this.aiDataContract={level:1,method:1,assembly:0,fileName:0,line:0};var t,r=this;r.sizeInBytes=0,"string"==typeof e?(t=e,r.level=n,r.method="<no_method>",r.assembly=Je(t),r.fileName="",r.line=0,(n=t.match(gr.regex))&&5<=n.length&&(r.method=Je(n[2])||r.method,r.fileName=Je(n[4]),r.line=parseInt(n[5])||0)):(r.level=e.level,r.method=e.method,r.assembly=e.assembly,r.fileName=e.fileName,r.line=e.line,r.sizeInBytes=0),r.sizeInBytes+=r.method.length,r.sizeInBytes+=r.fileName.length,r.sizeInBytes+=r.assembly.length,r.sizeInBytes+=gr.baseSize,r.sizeInBytes+=r.level.toString().length,r.sizeInBytes+=r.line.toString().length}var mr=function(){this.aiDataContract={name:1,kind:0,value:1,count:0,min:0,max:0,stdDev:0},this.kind=0},vr=(hr.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",hr.dataType="MetricData",hr);function hr(e,n,t,r,i,o,a,s,u){this.aiDataContract={ver:1,metrics:1,properties:0},this.ver=2;var c=new mr;c.count=0<r?r:undefined,c.max=isNaN(o)||null===o?undefined:o,c.min=isNaN(i)||null===i?undefined:i,c.name=I(e,n)||l,c.value=t,c.stdDev=isNaN(a)||null===a?undefined:a,this.metrics=[c],this.properties=At(e,s),this.measurements=Rt(e,u)}Ir.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",Ir.dataType="PageviewData";var yr=Ir;function Ir(e,n,t,r,i,o,a){this.aiDataContract={ver:1,name:0,url:0,duration:0,properties:0,measurements:0,id:0};var s=this;s.ver=2,s.id=a&&Ft(e,a,128,W.IdTooLong).toString(),s.url=wt(e,t),s.name=I(e,n)||l,isNaN(r)||(s.duration=Et(r)),s.properties=At(e,i),s.measurements=Rt(e,o)}Cr.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",Cr.dataType="RemoteDependencyData";var Sr=Cr;function Cr(e,n,t,r,i,o,a,s,u,c,l,f){void 0===u&&(u="Ajax"),this.aiDataContract={id:1,ver:1,name:0,resultCode:0,duration:0,success:0,data:0,target:0,type:0,properties:0,measurements:0,kind:0,value:0,count:0,min:0,max:0,stdDev:0,dependencyKind:0,dependencySource:0,commandName:0,dependencyTypeName:0};var d,p,g,m=this,t=(m.ver=2,m.id=n,m.duration=Et(i),m.success=o,m.resultCode=a+"",m.type=I(e,u),n=e,i=s,u=a=o=r,a=(s=t)&&0<s.length?(d=s,g=(t=Ht)[p=Wt],Vt.createElement?t[p]||(g=t[p]=Vt.createElement("a")):g={host:function(){e=null,d&&null!=(t=d.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i))&&2<t.length&&h(t[2])&&0<t[2].length&&(e=t[2]||"",2<t.length&&(n=(t[1]||"").toLowerCase(),t=t[3]||"",e+=t="http"==n&&":80"===t||"https"==n&&":443"===t?"":t));var e,n=e||"";if(n){var t=n.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i);if(null!=t&&3<t.length&&h(t[2])&&0<t[2].length)return t[2]+(t[3]||"")}return n}()},g.href=d,++p>=t.length&&(p=0),Wt=p,p=(t=g).host,a||(null!=t.pathname?("/"!=((g=0===t.pathname.length?"/":t.pathname)[0]||"")&&(g="/"+g),u=t.pathname,I(n,i?i+" "+g:g)):I(n,s))):p=o,{target:p,name:a,data:u});m.data=wt(e,r)||t.data,m.target=I(e,t.target),c&&(m.target="".concat(m.target," | ").concat(c)),m.name=I(e,t.name),m.properties=At(e,l),m.measurements=Rt(e,f)}xr.envelopeType="Microsoft.ApplicationInsights.{0}.Message",xr.dataType="MessageData";var Tr=xr;function xr(e,n,t,r,i){this.aiDataContract={ver:1,message:1,severityLevel:0,properties:0};var o=this;o.ver=2,o.message=Nt(e,n=n||l),o.properties=At(e,r),o.measurements=Rt(e,i),t&&(o.severityLevel=t)}_r.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",_r.dataType="PageviewPerformanceData";var br=_r;function _r(e,n,t,r,i,o,a){this.aiDataContract={ver:1,name:0,url:0,duration:0,perfTotal:0,networkConnect:0,sentRequest:0,receivedResponse:0,domProcessing:0,properties:0,measurements:0};var s=this;s.ver=2,s.url=wt(e,t),s.name=I(e,n)||l,s.properties=At(e,i),s.measurements=Rt(e,o),a&&(s.domProcessing=a.domProcessing,s.duration=a.duration,s.networkConnect=a.networkConnect,s.perfTotal=a.perfTotal,s.receivedResponse=a.receivedResponse,s.sentRequest=a.sentRequest)}var wr=function(e,n){this.aiDataContract={baseType:1,baseData:1},this.baseType=e,this.baseData=n};function Nr(e){var n="ai."+e+".";return function(e){return n+e}}var Ar,Rr,n=Nr("application"),e=Nr("device"),M=Nr("location"),r=Nr("operation"),Fr=Nr("session"),i=Nr("user"),d=Nr("cloud"),Lr=Nr("internal"),Er=(Rr={applicationVersion:n("ver"),applicationBuild:n("build"),applicationTypeId:n("typeId"),applicationId:n("applicationId"),applicationLayer:n("layer"),deviceId:e("id"),deviceIp:e("ip"),deviceLanguage:e("language"),deviceLocale:e("locale"),deviceModel:e("model"),deviceFriendlyName:e("friendlyName"),deviceNetwork:e("network"),deviceNetworkName:e("networkName"),deviceOEMName:e("oemName"),deviceOS:e("os"),deviceOSVersion:e("osVersion"),deviceRoleInstance:e("roleInstance"),deviceRoleName:e("roleName"),deviceScreenResolution:e("screenResolution"),deviceType:e("type"),deviceMachineName:e("machineName"),deviceVMName:e("vmName"),deviceBrowser:e("browser"),deviceBrowserVersion:e("browserVersion"),locationIp:M("ip"),locationCountry:M("country"),locationProvince:M("province"),locationCity:M("city"),operationId:r("id"),operationName:r("name"),operationParentId:r("parentId"),operationRootId:r("rootId"),operationSyntheticSource:r("syntheticSource"),operationCorrelationVector:r("correlationVector"),sessionId:Fr("id"),sessionIsFirst:Fr("isFirst"),sessionIsNew:Fr("isNew"),userAccountAcquisitionDate:i("accountAcquisitionDate"),userAccountId:i("accountId"),userAgent:i("userAgent"),userId:i("id"),userStoreRegion:i("storeRegion"),userAuthUserId:i("authUserId"),userAnonymousUserAcquisitionDate:i("anonUserAcquisitionDate"),userAuthenticatedUserAcquisitionDate:i("authUserAcquisitionDate"),cloudName:d("name"),cloudRole:d("role"),cloudRoleVer:d("roleVer"),cloudRoleInstance:d("roleInstance"),cloudEnvironment:d("environment"),cloudLocation:d("location"),cloudDeploymentUnit:d("deploymentUnit"),internalNodeName:Lr("nodeName"),internalSdkVersion:Lr("sdkVersion"),internalAgentVersion:Lr("agentVersion"),internalSnippet:Lr("snippet"),internalSdkSrc:Lr("sdkSrc")},J(Mr,Ar=function(){var t=this;P(Rr,function(e,n){t[e]=n})}),Mr);function Mr(){return Ar.call(this)||this}var Dr,S=new Er,n=function si(t,r){var i=[],o=!1;this._get=function(){return i},this._set=function(e){return i=e},v(si,this,function(n){n.enqueue=function(e){n.count()>=r.eventsLimitInMem()?o||(t.throwInternal(V.WARNING,W.InMemoryStorageBufferFull,"Maximum in-memory buffer size reached: "+n.count(),!0),o=!0):i.push(e)},n.count=function(){return i.length},n.size=function(){for(var e=i.length,n=0;n<i.length;n++)e+=i[n].length;return r.emitLineDelimitedJson()||(e+=2),e},n.clear=function(){o=!(i=[])},n.getItems=function(){return i.slice(0)},n.batchPayloads=function(e){return e&&0<e.length?r.emitLineDelimitedJson()?e.join("\n"):"["+e.join(",")+"]":null}})},kr=(J(Br,Dr=n),Br);function Br(e,n){e=Dr.call(this,e,n)||this;return v(Br,e,function(e,n){e.markAsSent=function(e){n.clear()},e.clearSent=function(e){}}),e}J(C,Pr=n),C.BUFFER_KEY="AI_buffer",C.SENT_BUFFER_KEY="AI_sentBuffer",C.MAX_BUFFER_SIZE=2e3;var Pr,Ur=C;function C(s,u){var e=Pr.call(this,s,u)||this,c=!1;return v(C,e,function(t,n){var e=o(C.BUFFER_KEY),r=o(C.SENT_BUFFER_KEY),r=t._set(e.concat(r));function i(n,e){var t=[];return O(e,function(e){p(e)||-1!==function(e,n){if(e){if(e[Ne])return e[Ne](n,void 0);var t=e.length;try{for(var r=0;r<t;r++)if(r in e&&e[r]===n)return r}catch(i){}}return-1}(n,e)||t.push(e)}),t}function o(e){try{var e=u.namePrefix&&u.namePrefix()?u.namePrefix()+"_"+e:e,n=Kt(s,e);if(n){var t=j().parse(n);if((t=h(t)?j().parse(t):t)&&U(t))return t}}catch(r){s.throwInternal(V.CRITICAL,W.FailedToRestoreStorageBuffer," storage key: "+e+", "+z(r),{exception:K(r)})}return[]}function a(e,n){try{var e=u.namePrefix&&u.namePrefix()?u.namePrefix()+"_"+e:e,t=JSON.stringify(n);qt(s,e,t)}catch(r){qt(s,e,JSON.stringify([])),s.throwInternal(V.WARNING,W.FailedToSetStorageBuffer," storage key: "+e+", "+z(r)+". Buffer cleared",{exception:K(r)})}}r.length>C.MAX_BUFFER_SIZE&&(r.length=C.MAX_BUFFER_SIZE),a(C.SENT_BUFFER_KEY,[]),a(C.BUFFER_KEY,r),t.enqueue=function(e){t.count()>=C.MAX_BUFFER_SIZE?c||(s.throwInternal(V.WARNING,W.SessionStorageBufferFull,"Maximum buffer size reached: "+t.count(),!0),c=!0):(n.enqueue(e),a(C.BUFFER_KEY,t._get()))},t.clear=function(){n.clear(),a(C.BUFFER_KEY,t._get()),a(C.SENT_BUFFER_KEY,[]),c=!1},t.markAsSent=function(e){a(C.BUFFER_KEY,t._set(i(e,t._get())));var n=o(C.SENT_BUFFER_KEY);n instanceof Array&&e instanceof Array&&((n=n.concat(e)).length>C.MAX_BUFFER_SIZE&&(s.throwInternal(V.CRITICAL,W.SessionStorageBufferFull,"Sent buffer reached its maximum size: "+n.length,!0),n.length=C.MAX_BUFFER_SIZE),a(C.SENT_BUFFER_KEY,n))},t.clearSent=function(e){e=i(e,o(C.SENT_BUFFER_KEY));a(C.SENT_BUFFER_KEY,e)}}),e}var Or="baseType",T="baseData",x="properties",zr="true";function b(e,n,t){tn(e,n,t,rn)}function jr(e,t,r){B(e)||P(e,function(e,n){"number"==typeof n?r[e]=n:h(n)?t[e]=n:xn()&&(t[e]=j().stringify(n))})}function Kr(t,r){B(t)||P(t,function(e,n){t[e]=n||r})}function qr(e,n,t,r){for(var r=new Yt(e,r,n),n=(b(r,"sampleRate",t[Dt]),(t[T]||{}).startTime&&(r.time=Xe(t[T].startTime)),r.iKey=t.iKey,t.iKey.replace(/-/g,"")),n=(r.name=r.name.replace("{0}",n),e),e=t,i=r,o=i.tags=i.tags||{},a=e.ext=e.ext||{},s=e.tags=e.tags||[],u=a.user,u=(u&&(b(o,S.userAuthUserId,u.authId),b(o,S.userId,u.id||u.localId)),a.app),u=(u&&b(o,S.sessionId,u.sesId),a.device),u=(u&&(b(o,S.deviceId,u.id||u.localId),b(o,S.deviceType,u.deviceClass),b(o,S.deviceIp,u.ip),b(o,S.deviceModel,u.model),b(o,S.deviceType,u.deviceType)),e.ext.web),e=(u&&(b(o,S.deviceLanguage,u.browserLang),b(o,S.deviceBrowserVersion,u.browserVer),b(o,S.deviceBrowser,u.browser),b(e=(e=(e=i.data=i.data||{})[T]=e[T]||{})[x]=e[x]||{},"domain",u.domain),b(e,"isManual",u.isManual?zr:null),b(e,"screenRes",u.screenRes),b(e,"userConsent",u.userConsent?zr:null)),a.os),u=(e&&b(o,S.deviceOS,e.name),a.trace),c=(u&&(b(o,S.operationParentId,u.parentID),b(o,S.operationName,I(n,u.name)),b(o,S.operationId,u.traceID)),{}),l=s.length-1;0<=l;l--)P(s[l],function(e,n){c[e]=n}),s.splice(l,1);P(s,function(e,n){c[e]=n});e=f(f({},o),c);return e[S.internalSdkVersion]||(e[S.internalSdkVersion]="javascript:".concat(Wr.Version)),i.tags=an(e),t.tags=t.tags||[],an(r)}function Vr(e,n){B(n[T])&&e.throwInternal(V.CRITICAL,W.TelemetryEnvelopeInvalid,"telemetryItem.baseData cannot be null.")}var Wr={Version:"2.8.0-nightly.2204-04"};function Hr(e,n,t){Vr(e,n);var r={},i={},t=(n[Or]!==Jt.dataType&&(r.baseTypeSource=n[Or]),n[Or]===Jt.dataType?(r=n[T][x]||{},i=n[T].measurements||{}):n[T]&&jr(n[T],r,i),jr(n.data,r,i),B(t)||Kr(r,t),n[T].name),t=new Jt(e,t,r,i),r=new wr(Jt.dataType,t);return qr(e,Jt.envelopeType,n,r)}var Gr=function ui(f){v(ui,this,function(e){function c(a,s){var e="__aiCircularRefCheck",u={};if(!a)return f.throwInternal(V.CRITICAL,W.CannotSerializeObject,"cannot serialize object because it is null or undefined",{name:s},!0),u;if(a[e])return f.throwInternal(V.WARNING,W.CircularReferenceDetected,"Circular reference detected while serializing object",{name:s},!0),u;if(a.aiDataContract)return a[e]=!0,P(a.aiDataContract,function(e,n){var t=p(n)?1&n():1&n,r=p(n)?4&n():4&n,n=2&n,i=a[e]!==undefined,o=qe(a[e])&&null!==a[e];!t||i||n?r||(t=o?(n?l:c)(a[e],e):a[e])!==undefined&&(u[e]=t):f.throwInternal(V.CRITICAL,W.MissingRequiredFieldSpecification,"Missing required field specification. The field is required but not present on source",{field:e,name:s})}),delete a[e],u;if("measurements"===s)u=t(a,"number",s);else if("properties"===s)u=t(a,"string",s);else if("tags"===s)u=t(a,"string",s);else if(U(a))u=l(a,s);else{f.throwInternal(V.WARNING,W.CannotSerializeObjectNonSerializable,"Attempting to serialize an object which does not implement ISerializable",{name:s},!0);try{j().stringify(a),u=a}catch(n){f.throwInternal(V.CRITICAL,W.CannotSerializeObject,n&&p(n.toString)?n.toString():"Error serializing object",null,!0)}}return u}function l(e,n){if(e)if(U(e))for(var t=[],r=0;r<e.length;r++){var i=c(e[r],n+"["+r+"]");t.push(i)}else f.throwInternal(V.CRITICAL,W.ItemNotInArray,"This field was specified as an array in the contract but the item is not an array.\r\n",{name:n},!0);return t}function t(e,t,r){var i;return e&&(i={},P(e,function(e,n){"string"===t?n===undefined?i[e]="undefined":null===n?i[e]="null":n.toString?i[e]=n.toString():i[e]="invalid field: toString() is not defined.":"number"===t?n===undefined?i[e]="undefined":i[e]=null===n?"null":isNaN(n=parseFloat(n))?"NaN":n:(i[e]="invalid field: "+r+" is of unknown type.",f.throwInternal(V.CRITICAL,i[e],null,!0))})),i}e.serialize=function(e){e=c(e,"root");try{return j().stringify(e)}catch(n){f.throwInternal(V.CRITICAL,W.CannotSerializeObject,n&&p(n.toString)?n.toString():"Error serializing object",null,!0)}}})};function Xr(e,n){var t,r,i=void 0;if(void 0===i&&(i=!1),e)try{var o=It(null,n),a=!1,s=e,u=function(e){return!(!o.ns&&null!==e.handler)&&(a=!0)};(t=o).type?Tt(s,St(s,t.type),t,u):(P(r=vt.get(s,dt,{}),function(e,n){Tt(s,n,t,u)}),0===Qe(r).length&&vt.kill(s,dt)),a||Ct(e,o,null,i)}catch(c){}}Jr.prototype.getHashCodeScore=function(e){return this.getHashCode(e)/Jr.INT_MAX_VALUE*100},Jr.prototype.getHashCode=function(e){if(""===e)return 0;for(;e.length<8;)e=e.concat(e);for(var n=5381,t=0;t<e.length;++t)n=(n<<5)+n+e.charCodeAt(t),n&=n;return Math.abs(n)},Jr.INT_MAX_VALUE=2147483647;var Yr=Jr;function Jr(){}var Zr=function(){var n=new Yr,t=new Er;this.getSamplingScore=function(e){return e.tags&&e.tags[t.userId]?n.getHashCodeScore(e.tags[t.userId]):e.ext&&e.ext.user&&e.ext.user.id?n.getHashCodeScore(e.ext.user.id):e.tags&&e.tags[t.operationId]?n.getHashCodeScore(e.tags[t.operationId]):e.ext&&e.ext.telemetryTrace&&e.ext.telemetryTrace.traceID?n.getHashCodeScore(e.ext.telemetryTrace.traceID):100*Math.random()}},$r=(Qr.prototype.isSampledIn=function(e){var n=this.sampleRate;return null===n||n===undefined||100<=n||e.baseType===vr.dataType||this.samplingScoreGenerator.getSamplingScore(e)<n},Qr);function Qr(e,n){this.INT_MAX_VALUE=2147483647;n=n||Mn(null);(100<e||e<0)&&(n.throwInternal(V.WARNING,W.SampleRateOutOfRange,"Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.",{samplingRate:e},!0),e=100),this.sampleRate=e,this.samplingScoreGenerator=new Zr}function ei(e){try{return e.responseText}catch(n){}return null}function ni(){return{endpointUrl:function(){return"https://dc.services.visualstudio.com/v2/track"},emitLineDelimitedJson:function(){return!1},maxBatchInterval:function(){return 15e3},maxBatchSizeInBytes:function(){return 102400},disableTelemetry:function(){return!1},enableSessionStorageBuffer:function(){return!0},isRetryDisabled:function(){return!1},isBeaconApiDisabled:function(){return!0},disableXhr:function(){return!1},onunloadDisableFetch:function(){return!1},onunloadDisableBeacon:function(){return!1},instrumentationKey:function(){return undefined},namePrefix:function(){return undefined},samplingPercentage:function(){return 100},customHeaders:function(){return undefined},convertUndefined:function(){return undefined},eventsLimitInMem:function(){return 1e4}}}(e={})[Jt.dataType]=Hr,e[Tr.dataType]=function(e,n,t){Vr(e,n);var r=n[T].message,i=n[T].severityLevel,o=n[T][x]||{},a=n[T].measurements||{},t=(jr(n.data,o,a),B(t)||Kr(o,t),new Tr(e,r,i,o,a)),r=new wr(Tr.dataType,t);return qr(e,Tr.envelopeType,n,r)},e[yr.dataType]=function(e,n,t){Vr(e,n);var r,i="duration",o=n[T],i=(B(o)||B(o[x])||B(o[x][i])?B(n.data)||B(n.data[i])||(r=n.data[i],delete n.data[i]):(r=o[x][i],delete o[x][i]),n[T]),o=(((n.ext||{}).trace||{}).traceID&&(a=n.ext.trace.traceID),i.id||a),a=i.name,s=i.uri,u=i[x]||{},c=i.measurements||{},i=(B(i.refUri)||(u.refUri=i.refUri),B(i.pageType)||(u.pageType=i.pageType),B(i.isLoggedIn)||(u.isLoggedIn=i.isLoggedIn.toString()),B(i[x])||P(i[x],function(e,n){u[e]=n}),jr(n.data,u,c),B(t)||Kr(u,t),new yr(e,a,s,r,u,c,o)),t=new wr(yr.dataType,i);return qr(e,yr.envelopeType,n,t)},e[br.dataType]=function(e,n,t){Vr(e,n);var r=n[T],i=r.name,o=r.uri||r.url,a=r[x]||{},s=r.measurements||{},t=(jr(n.data,a,s),B(t)||Kr(a,t),new br(e,i,o,undefined,a,s,r)),i=new wr(br.dataType,t);return qr(e,br.envelopeType,n,i)},e[lr.dataType]=function(e,n,t){Vr(e,n);var r=n[T].measurements||{},i=n[T][x]||{},t=(jr(n.data,i,r),B(t)||Kr(i,t),n[T]),t=lr.CreateFromInterface(e,t,i,r),i=new wr(lr.dataType,t);return qr(e,lr.envelopeType,n,i)},e[vr.dataType]=function(e,n,t){Vr(e,n);var r=n[T],i=r[x]||{},o=r.measurements||{},t=(jr(n.data,i,o),B(t)||Kr(i,t),new vr(e,r.name,r.average,r.sampleCount,r.min,r.max,r.stdDev,i,o)),r=new wr(vr.dataType,t);return qr(e,vr.envelopeType,n,r)},e[Sr.dataType]=function(e,n,t){Vr(e,n);var r=n[T].measurements||{},i=n[T][x]||{},t=(jr(n.data,i,r),B(t)||Kr(i,t),n[T]);if(B(t))return e.warnToConsole("Invalid input for dependency data"),null;var o=t[x]&&t[x][Bt]?t[x][Bt]:"GET",o=new Sr(e,t.id,t.target,t.name,t.duration,t.success,t.responseCode,o,t.type,t.correlationContext,i,r),t=new wr(Sr.dataType,o);return qr(e,Sr.envelopeType,n,t)};var ti,ri=e,M=(J(ii,ti=Re),ii.constructEnvelope=function(e,n,t,r){e=n===e.iKey||B(n)?e:f(f({},e),{iKey:n});return(ri[e.baseType]||Hr)(t,e,r)},ii);function ii(){var x,b,_,r,w,N,A,R,F,L,E,M=ti.call(this)||this,D=(M.priority=1001,M.identifier="AppInsightsChannelPlugin",M._senderConfig=ni(),0);return v(ii,M,function(c,a){function l(e,n,t,r,i,o){var a=null;c._appId||(a=g(o))&&a.appId&&(c._appId=a.appId),(e<200||300<=e)&&0!==e?(301!==e&&307!==e&&308!==e||s(t))&&!c._senderConfig.isRetryDisabled()&&y(e)?(m(n),q(c.diagLog(),V.WARNING,W.TransmissionFailed,". Response code "+e+". Will retry to send "+n.length+" items.")):c._onError(n,i):L&&!L.isOnline()?c._senderConfig.isRetryDisabled()||(m(n,10),q(c.diagLog(),V.WARNING,W.TransmissionFailed,". Offline - Response Code: ".concat(e,". Offline status: ").concat(!L.isOnline(),". Will retry to send ").concat(n.length," items."))):(s(t),206===e?(a=a||g(o))&&!c._senderConfig.isRetryDisabled()?c._onPartialSuccess(n,a):c._onError(n,i):(x=0,c._onSuccess(n,r)))}function s(e){return!(10<=N)&&!B(e)&&""!==e&&e!==c._senderConfig.endpointUrl()&&(c._senderConfig.endpointUrl=function(){return e},++N,1)}function n(e,n){F?F(e,!1):u(e)}function o(e){var n=Tn(),t=c._buffer,r=c._senderConfig.endpointUrl(),i=c._buffer.batchPayloads(e),i=new Blob([i],{type:"text/plain;charset=UTF-8"}),r=n.sendBeacon(r,i);return r&&(t.markAsSent(e),c._onSuccess(e,e.length)),r}function u(e,n){if(U(e)&&0<e.length&&!o(e)){for(var t=[],r=0;r<e.length;r++){var i=e[r];o([i])||t.push(i)}0<t.length&&(R&&R(t,!0),q(c.diagLog(),V.WARNING,W.TransmissionFailed,". Failed to send telemetry with Beacon API, retried with normal sender."))}}function f(n,e){var t=new XMLHttpRequest,r=c._senderConfig.endpointUrl();try{t[Mt]=!0}catch(i){}t.open("POST",r,e),t.setRequestHeader("Content-type","application/json"),Xt(r)&&t.setRequestHeader("Sdk-Context","appId"),O(Qe(A),function(e){t.setRequestHeader(e,A[e])}),t.onreadystatechange=function(){return c._xhrReadyStateChange(t,n,n.length)},t.onerror=function(e){return c._onError(n,I(t),e)};e=c._buffer.batchPayloads(n);t.send(e),c._buffer.markAsSent(n)}function d(e,n){if(U(e)){for(var t=e.length,r=0;r<e.length;r++)t+=e[r].length;D+t<=65e3?i(e,!1):bn()?u(e):(R&&R(e,!0),q(c.diagLog(),V.WARNING,W.TransmissionFailed,". Failed to send telemetry with Beacon API, retried with xhrSender."))}}function p(e,n){i(e,!0)}function i(t,r){var e=c._senderConfig.endpointUrl(),n=c._buffer.batchPayloads(t),i=new Blob([n],{type:"application/json"}),o=new Headers,a=n.length,n=!1,s=!1,e=(Xt(e)&&o.append("Sdk-Context","appId"),O(Qe(A),function(e){o.append(e,A[e])}),(i={method:"POST",headers:o,body:i})[Mt]=!0,r||(n=i.keepalive=!0,D+=a),new Request(e,i));try{e[Mt]=!0}catch(u){}c._buffer.markAsSent(t);try{fetch(e).then(function(n){r||(D-=a,a=0),s||(s=!0,n.ok?n.text().then(function(e){l(n.status,t,n.url,t.length,n.statusText,e)}):c._onError(t,n.statusText))})["catch"](function(e){r||(D-=a,a=0),s||(s=!0,c._onError(t,e.message))})}catch(u){s||c._onError(t,K(u))}n&&!s&&(s=!0,c._onSuccess(t,t.length))}function g(e){try{if(e&&""!==e){var n=j().parse(e);if(n&&n.itemsReceived&&n.itemsReceived>=n.itemsAccepted&&n.itemsReceived-n.itemsAccepted===n.errors.length)return n}}catch(t){q(c.diagLog(),V.CRITICAL,W.InvalidBackendResponse,"Cannot parse the response. "+z(t),{response:e})}return null}function m(e,n){if(void 0===n&&(n=1),e&&0!==e.length){var t=c._buffer;t.clearSent(e),x++;for(var r=0,i=e;r<i.length;r++){var o=i[r];t.enqueue(o)}n=x<=1?10:(e=1+Math.floor((Math.pow(2,x)-1)/2*Math.random()*10),Math.max(Math.min(e*=n,3600),10)),e=nn()+1e3*n;b=e,v()}}function v(){var e;r||_||(e=b?Math.max(0,b-nn()):0,e=Math.max(c._senderConfig.maxBatchInterval(),e),r=setTimeout(function(){r=null,c.triggerSend(!0,null,1)},e))}function h(){clearTimeout(r),b=r=null}function y(e){return 408===e||429===e||500===e||503===e}function I(e,n){return e?"XMLHttpRequest,Status:"+e.status+",Response:"+ei(e)||e.response||"":n}function S(n,e){var t=c._buffer,r=In(),i=new XDomainRequest,r=(i.onload=function(){return c._xdrOnLoad(i,n)},i.onerror=function(e){return c._onError(n,C(i),e)},r&&r.location&&r.location.protocol||"");if(c._senderConfig.endpointUrl().lastIndexOf(r,0))return q(c.diagLog(),V.WARNING,W.TransmissionFailed,". Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol."),void t.clear();r=c._senderConfig.endpointUrl().replace(/^(https?:)/,""),i.open("POST",r),r=t.batchPayloads(n);i.send(r),t.markAsSent(n)}function C(e,n){return e?"XDomainRequest,Response:"+ei(e)||"":n}function T(e,n){var t="getNotifyMgr",t=c.core[t]?c.core[t]():c.core._notificationManager;if(t&&t.eventsSendRequest)try{t.eventsSendRequest(e,n)}catch(r){q(c.diagLog(),V.CRITICAL,W.NotificationException,"send request notification failed: "+z(r),{exception:K(r)})}}function t(){c._sender=null,c._buffer=null,c._appId=null,c._sample=null,_=!(A={}),D=N=x=0,E=F=R=w=r=b=L=null}t(),c.pause=function(){h(),_=!0},c.resume=function(){_&&(_=!1,b=null,c._buffer.size()>c._senderConfig.maxBatchSizeInBytes()&&c.triggerSend(!0,null,10),v())},c.flush=function(e,n,t){if(void 0===e&&(e=!0),!_){h();try{c.triggerSend(e,null,t||1)}catch(r){q(c.diagLog(),V.CRITICAL,W.FlushFailed,"flush failed, telemetry will not be collected: "+z(r),{exception:K(r)})}}},c.onunloadFlush=function(){if(!_)if(!1!==c._senderConfig.onunloadDisableBeacon()&&!1!==c._senderConfig.isBeaconApiDisabled()||!bn())c.flush();else try{c.triggerSend(!0,n,2)}catch(e){q(c.diagLog(),V.CRITICAL,W.FailedToSendQueuedTelemetry,"failed to flush with beacon sender on page unload, telemetry will not be collected: "+z(e),{exception:K(e)})}},c.addHeader=function(e,n){A[e]=n},c.initialize=function(e,n,t,r){c.isInitialized()&&q(c.diagLog(),V.CRITICAL,W.SenderNotInitialized,"Sender is already initialized"),a.initialize(e,n,t,r);var i=c._getTelCtx(),o=c.identifier,t=(w=new Gr(n.logger),b=null,x=0,c._sender=null,N=0,c.diagLog()),r=(E=xt(Yn("Sender"),n.evtNamespace&&n.evtNamespace()),L=function(e){var n,t=Sn(),r=Tn(),i=!1,o=!0,a=xt(Yn("OfflineListener"),e);try{s(In())&&(i=!0),(i=!!(t&&(n=t.body||t).ononline&&s(n))||i)&&r&&!B(r.onLine)&&(o=r.onLine)}catch(l){i=!1}function s(e){var n=!1;return e&&(n=bt(e,"online",u,a))&&bt(e,"offline",c,a),n}function u(){o=!0}function c(){o=!1}return{isOnline:function(){var e=!0;return i?e=o:r&&!B(r.onLine)&&(e=r.onLine),e},isListening:function(){return i},unload:function(){var e=In();e&&i&&(Xr(e,a),t&&!Ke((e=t.body||t).ononline)&&Xr(e,a),i=!1)}}}(E),P(ni(),function(e,n){c._senderConfig[e]=function(){return i.getConfig(o,e,n())}}),c._buffer=new(c._senderConfig.enableSessionStorageBuffer()&&jt()?Ur:kr)(t,c._senderConfig),c._sample=new $r(c._senderConfig.samplingPercentage(),t),!B(e.disableInstrumentationKeyValidation)&&e.disableInstrumentationKeyValidation||/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/.test(e.instrumentationKey)||q(t,V.CRITICAL,W.InvalidInstrumentationKey,"Invalid Instrumentation key "+e.instrumentationKey),!Xt(c._senderConfig.endpointUrl())&&c._senderConfig.customHeaders()&&0<c._senderConfig.customHeaders().length&&O(c._senderConfig.customHeaders(),function(e){M.addHeader(e.header,e.value)}),c._senderConfig),n=null;!r.disableXhr()&&wn()?n=S:!r.disableXhr()&&Nn()&&(n=f),!n&&_n()&&(n=p),R=n||f,!r.isBeaconApiDisabled()&&bn()&&(n=u),c._sender=n||f,F=!r.onunloadDisableFetch()&&_n(!0)?d:bn()?u:!r.disableXhr()&&wn()?S:!r.disableXhr()&&Nn()?f:R},c.processTelemetry=function(e,t){t=c._getTelCtx(t);try{if(c._senderConfig.disableTelemetry())return;if(!e)return void q(t.diagLog(),V.CRITICAL,W.CannotSendEmptyTelemetry,"Cannot send empty telemetry");if(e.baseData&&!e.baseType)return void q(t.diagLog(),V.CRITICAL,W.InvalidEvent,"Cannot send telemetry without baseData and baseType");if(e.baseType||(e.baseType="EventData"),!c._sender)return void q(t.diagLog(),V.CRITICAL,W.SenderNotInitialized,"Sender was not initialized");if(!c._sample.isSampledIn(e))return void q(t.diagLog(),V.WARNING,W.TelemetrySampledAndNotSent,"Telemetry item was sampled out and not sent",{SampleRate:c._sample.sampleRate});e[Dt]=c._sample.sampleRate;var n=c._senderConfig.convertUndefined()||undefined,r=e.iKey||c._senderConfig.instrumentationKey(),i=ii.constructEnvelope(e,r,t.diagLog(),n);if(!i)return void q(t.diagLog(),V.CRITICAL,W.CreateEnvelopeError,"Unable to create an AppInsights envelope");var o=!1;if(e.tags&&e.tags[kt]&&(O(e.tags[kt],function(e){try{e&&!1===e(i)&&(o=!0,t.diagLog().warnToConsole("Telemetry processor check returns false"))}catch(n){q(t.diagLog(),V.CRITICAL,W.TelemetryInitializerFailed,"One of telemetry initializers failed, telemetry item will not be sent: "+z(n),{exception:K(n)},!0)}}),delete e.tags[kt]),o)return;var a=w.serialize(i),s=c._buffer;s.size()+a.length>c._senderConfig.maxBatchSizeInBytes()&&c.triggerSend(!0,null,10),s.enqueue(a),v()}catch(u){q(t.diagLog(),V.WARNING,W.FailedAddingTelemetryToBuffer,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+z(u),{exception:K(u)})}c.processNext(e,t)},c._xhrReadyStateChange=function(e,n,t){4===e.readyState&&l(e.status,n,e.responseURL,t,I(e),ei(e)||e.response)},c.triggerSend=function(e,n,t){if(void 0===e&&(e=!0),!_)try{var r,i=c._buffer;c._senderConfig.disableTelemetry()?i.clear():0<i.count()&&(r=i.getItems(),T(t||0,e),n?n.call(M,r,e):c._sender(r,e)),h()}catch(o){i=function(e){var n=((e=(e=void 0===e?null:e)?e:(n=Tn()||{})?(n.userAgent||k).toLowerCase():k)||k).toLowerCase();if(We(n,ln))return e=Sn()||{},Math.max(parseInt(n.split(ln)[1]),e.documentMode||0);if(We(n,fn)){e=parseInt(n.split(fn)[1]);if(e)return e+4}return null}();(!i||9<i)&&q(c.diagLog(),V.CRITICAL,W.TransmissionFailed,"Telemetry transmission failed, some telemetry will be lost: "+z(o),{exception:K(o)})}},c._doTeardown=function(e,n){c.onunloadFlush(),L.unload(),t()},c._onError=function(e,n,t){q(c.diagLog(),V.WARNING,W.OnError,"Failed to send telemetry.",{message:n}),c._buffer.clearSent(e)},c._onPartialSuccess=function(e,n){for(var t=[],r=[],i=0,o=n.errors.reverse();i<o.length;i++){var a=o[i],s=e.splice(a.index,1)[0];(y(a.statusCode)?r:t).push(s)}0<e.length&&c._onSuccess(e,n.itemsAccepted),0<t.length&&c._onError(t,I(null,["partial success",n.itemsAccepted,"of",n.itemsReceived].join(" "))),0<r.length&&(m(r),q(c.diagLog(),V.WARNING,W.TransmissionFailed,"Partial success. Delivered: "+e.length+", Failed: "+t.length+". Will retry to send "+r.length+" our of "+n.itemsReceived+" items"))},c._onSuccess=function(e,n){c._buffer.clearSent(e)},c._xdrOnLoad=function(e,n){var t=ei(e);!e||t+""!="200"&&""!==t?(t=g(t))&&t.itemsReceived&&t.itemsReceived>t.itemsAccepted&&!c._senderConfig.isRetryDisabled()?c._onPartialSuccess(n,t):c._onError(n,C(e)):(x=0,c._onSuccess(n,0))}}),M}_.Sender=M;r=_,Fr="__esModule",i={value:!0},d=Object.defineProperty;if(d)try{return void d(r,Fr,i)}catch(ci){}typeof i.value!==undefined&&(r[Fr]=i.value)};"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(((e="undefined"!=typeof globalThis?globalThis:e||self).Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights=e.Microsoft.ApplicationInsights||{}));
|
|
5
|
+
var e=this,n=function(N){"use strict";var E="function",F="object",A="undefined",o="prototype",R="hasOwnProperty",t=Object,L=t[o],M=t.assign,D=t.create,e=t.defineProperty,V=L[R],H=null;function X(e){return void 0===e&&(e=!0),H&&e||(typeof globalThis!==A&&globalThis&&(H=globalThis),typeof self!==A&&self&&(H=self),typeof window!==A&&window&&(H=window),typeof global!==A&&global&&(H=global)),H}function Y(e){throw new TypeError(e)}(X()||{}).Symbol,(X()||{}).Reflect;var f=M||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var i in n=arguments[t])L[R].call(n,i)&&(e[i]=n[i]);return e},J=function(e,n){return(J=t.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)n[R](t)&&(e[t]=n[t])})(e,n)};function W(e,n){function t(){this.constructor=e}typeof n!==E&&null!==n&&Y("Class extends value "+n+" is not a constructor or null"),J(e,n),e[o]=null===n?function(e){if(D)return D(e);if(null==e)return{};var n=typeof e;function t(){}return n!==F&&n!==E&&Y("Object prototype may only be an Object:"+e),t[o]=e,new t}(n):(t[o]=n[o],new t)}var k="",G="isInitialized",Z="teardown",$="core",Q="update",ee="disabled",ne="_doTeardown",te="toISOString",re="indexOf",ie="trim",oe="toString",ae="constructor",se=e,ue=t.freeze,ce=t.keys,le=String[o][ie],fe=Date[o][te],n=Array.isArray,de=L[oe],pe=V[oe],ge=pe.call(t),me=/-([a-z])/g,ve=/([^\w\d_$])/g,he=/^(\d+[\w\d_$])/,ye=Object.getPrototypeOf;function Se(e){return e===undefined||typeof e===A}function B(e){return null===e||Se(e)}function p(e){return!(!e||typeof e!==F)}function g(e){return!(!e||typeof e!==E)}function xe(e){var n=e;return e&&v(e)?(n=(n=e.replace(me,function(e,n){return n.toUpperCase()})).replace(ve,"_")).replace(he,function(e,n){return"_"+n}):n}function P(e,n){if(e)for(var t in e)V.call(e,t)&&n.call(e,t,e[t])}function Ce(e,n){return!(!e||!n||!~e.indexOf(n))}var U=n||function(e){return!(!e||"[object Array]"!==de.call(e))};function _e(e){return e&&"[object Error]"===de.call(e)}function v(e){return"string"==typeof e}function Ie(e){return e&&"object"==typeof e&&(!(e=(ye||function(e){if(e){if(ye)return ye(e);e=e.__proto__||e[o]||e[ae];if(e)return e}return null})(e))||typeof(e=e[ae]&&V.call(e,ae)?e[ae]:e)===E&&pe.call(e)===ge)}function be(e){if(e){if(fe)return e[te]();var n;return e&&e.getUTCFullYear?(n=function(e){e=""+e;return 1===e.length?"0"+e:e},e.getUTCFullYear()+"-"+n(1+e.getUTCMonth())+"-"+n(e.getUTCDate())+"T"+n(e.getUTCHours())+":"+n(e.getUTCMinutes())+":"+n(e.getUTCSeconds())+"."+(e.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"):void 0}}function O(e,n,t){var r=e.length;try{for(var i=0;i<r&&!(i in e&&-1===n.call(t||e,e[i],i,e));i++);}catch(o){}}function Te(e,n,t){if(e){if(e.map)return e.map(n,t);var r=e.length,i=t||e,o=Array(r);try{for(var a=0;a<r;a++)a in e&&(o[a]=n.call(i,e[a],e))}catch(s){}}return o}function we(e){return e&&(le&&e[ie]?e[ie]():e.replace?e.replace(/^\s+|\s+$/g,""):e)}var Ne=!{toString:null}.propertyIsEnumerable("toString"),Ee=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];function Fe(e){var n=typeof e;if(n===E||n===F&&null!==e||Y("objKeys called on non-object"),!Ne&&ce)return ce(e);var t,r=[];for(t in e)e&&V.call(e,t)&&r.push(t);if(Ne)for(var i=Ee.length,o=0;o<i;o++)e&&V.call(e,Ee[o])&&r.push(Ee[o]);return r}var Ae=ue||function(e){return e};function Re(){var e=Date;return e.now?e.now():(new e).getTime()}function j(e){return _e(e)?e.name:k}function Le(e,n,t,r,i){var o=t;!e||(o=e[n])===t||i&&!i(o)||r&&!r(t)||(e[n]=o=t)}function Me(e){return!!e}function De(e){return e&&M?t(M({},e)):e}function ke(e){var t={};return P(e,function(e,n){t[e]=n,t[n]=e}),e=t,ue&&P(e,function(e,n){(U(n)||p(n))&&ue(n)}),Ae(e)}var Be="constructor",m="prototype",Pe="function",Ue="_dynInstFuncs",Oe="_isDynProxy",je="_dynClass",ze="_dynInstChk",Ke=ze,qe="_dfOpts",Ve="_unknown_",He="__proto__",Xe="useBaseInst",Ye="setInstFuncs",Je=Object,We=Je.getPrototypeOf,Ge=0;function h(e,n){return e&&Je[m].hasOwnProperty.call(e,n)}function Ze(e){return e&&(e===Je[m]||e===Array[m])}function $e(e){return Ze(e)||e===Function[m]}function Qe(e){if(e){if(We)return We(e);e=e[He]||e[m]||(e[Be]?e[Be][m]:null);if(e)return e}return null}function en(e,n){var t=[],r=Je.getOwnPropertyNames;if(r)t=r(e);else for(var i in e)"string"==typeof i&&h(e,i)&&t.push(i);if(t&&0<t.length)for(var o=0;o<t.length;o++)n(t[o])}function nn(e,n,t){return n!==Be&&typeof e[n]===Pe&&(t||h(e,n))}function tn(e){throw new TypeError("DynamicProto: "+e)}function rn(e,n){for(var t=e.length-1;0<=t;t--)if(e[t]===n)return 1}function on(e,n){return h(e,m)?e.name||n||Ve:((e||{})[Be]||{}).name||n||Ve}function y(e,r,n,t){h(e,m)||tn("theClass is an invalid class definition.");var i,o,a,s,u,c,l=e[m],f=(function(e){if(We)for(var n=[],t=Qe(r);t&&!$e(t)&&!rn(n,t);){if(t===e)return 1;n.push(t),t=Qe(t)}}(l)||tn("["+on(e)+"] is not in class hierarchy of ["+on(r)+"]"),null),e=(h(l,je)?f=l[je]:(f="_dynCls$"+on(e,"_")+"$"+Ge,Ge++,l[je]=f),y[qe]),d=!!e[Xe],p=(d&&t&&t[Xe]!==undefined&&(d=!!t[Xe]),o={},en(i=r,function(e){!o[e]&&nn(i,e,!1)&&(o[e]=i[e])}),o),d=(n(r,function(e,n,t,o){function r(e,n,t){var r,i=n[t];return i[Oe]&&o&&!1!==(r=e[Ue]||{})[Ke]&&(i=(r[n[je]]||{})[t]||i),function(){return i.apply(e,arguments)}}for(var i={},a=(en(t,function(e){i[e]=r(n,t,e)}),Qe(e)),s=[];a&&!$e(a)&&!rn(s,a);)en(a,function(e){!i[e]&&nn(a,e,!We)&&(i[e]=r(n,a,e))}),s.push(a),a=Qe(a);return i}(l,r,p,d)),!!We&&!!e[Ye]);a=l,n=f,s=r,u=p,e=!1!==(d=d&&t?!!t[Ye]:d),Ze(a)||(l=s[Ue]=s[Ue]||{},c=l[n]=l[n]||{},!1!==l[Ke]&&(l[Ke]=!!e),en(s,function(e){var t,r,i;nn(s,e,!1)&&s[e]!==u[e]&&(c[e]=s[e],delete s[e],h(a,e)&&(!a[e]||a[e][Oe])||(a[e]=(t=a,r=e,(i=function(){var e,n;return(function(e,n,t,r){var i=null;if(e&&h(t,je)){var o=e[Ue]||{};if((i=(o[t[je]]||{})[n])||tn("Missing ["+n+"] "+Pe),!i[ze]&&!1!==o[Ke]){for(var a=!h(e,n),s=Qe(e),u=[];a&&s&&!$e(s)&&!rn(u,s);){var c=s[n];if(c){a=c===r;break}u.push(s),s=Qe(s)}try{a&&(e[n]=i),i[ze]=1}catch(l){o[Ke]=!1}}}return i}(this,r,t,i)||(typeof(n=(n=t[e=r])===i?Qe(t)[e]:n)!==Pe&&tn("["+e+"] is not a "+Pe),n)).apply(this,arguments)})[Oe]=1,i)))}))}y[qe]={setInstFuncs:!0,useBaseInst:!0};var an="window",sn="navigator",un="console",cn="JSON",ln="msie",fn="trident/",dn="XMLHttpRequest",pn=null,gn=null,mn=null,vn=null;function hn(e,n){var t,r=!1;if(e){try{(r=n in e)||(t=e[o])&&(r=n in t)}catch(i){}if(!r)try{r=!Se((new e)[n])}catch(i){}}return r}function c(e){var n=X();return n&&n[e]?n[e]:e===an&&yn()?window:null}function yn(){return typeof window===F&&window}function Sn(){return yn()?window:c(an)}function xn(){return typeof document===F&&document?document:c("document")}function Cn(){return!(typeof navigator!==F||!navigator)}function _n(){return Cn()?navigator:c(sn)}function In(){return typeof JSON===F&&JSON||null!==c(cn)}function z(){return In()?JSON||c(cn):null}function K(e){var n=Object[o].toString.call(e),t=k;return"[object Error]"===n?t="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":In()&&(t=z().stringify(e)),n+t}function bn(){return vn=null===vn?Cn()&&!!_n().sendBeacon:vn}function Tn(e){var n=!1;try{var n=!!c("fetch"),t=c("Request");n&&e&&t&&(n=hn(t,"keepalive"))}catch(r){}return n}function wn(){return mn=null===mn&&(mn=typeof XDomainRequest!==A)&&Nn()?mn&&!hn(c(dn),"withCredentials"):mn}function Nn(){var e=!1;try{e=!!c(dn)}catch(n){}return e}var En=null;function Fn(e){return e?'"'+e.replace(/\"/g,k)+'"':k}function An(e,n){var t,r=typeof console!==A?console:c(un);r&&(t="log",g(r[t=r[e]?e:t])&&r[t](n))}Ln.dataType="MessageData";var Rn=Ln;function Ln(e,n,t,r){void 0===t&&(t=!1),this.messageId=e,this.message=(t?"AI: ":"AI (Internal): ")+e;t=k,In()&&(t=z().stringify(r)),e=(n?" message:"+Fn(n):k)+(r?" props:"+Fn(t):k);this.message+=e}function Mn(e,n){return(e||{}).logger||new Dn(n)}var Dn=function ui(i){this.identifier="DiagnosticLogger",this.queue=[];var s=0,u={};y(ui,this,function(o){function e(e,n){e=i[e];return B(e)?n:e}function a(e,n){var t,r=(t=(t=En)||!0===i.disableDbgExt?t:En||(r=c("Microsoft"),En=r?r.ApplicationInsights:En))?t.ChromeDbgExt:null;r&&r.diagLog&&r.diagLog(e,n)}B(i)&&(i={}),o.consoleLoggingLevel=function(){return e("loggingLevelConsole",0)},o.telemetryLoggingLevel=function(){return e("loggingLevelTelemetry",1)},o.maxInternalMessageLimit=function(){return e("maxMessageLimit",25)},o.enableDebugExceptions=function(){return e("enableDebugExceptions",!1)},o.throwInternal=function(e,n,t,r,i){n=new Rn(n,t,i=void 0!==i&&i,r);if(o.enableDebugExceptions())throw n;t=1===e?"errorToConsole":"warnToConsole";Se(n.message)?a("throw"+(1===e?"Critical":"Warning"),n):(r=o.consoleLoggingLevel(),i?(i=+n.messageId,!u[i]&&e<=r&&(o[t](n.message),u[i]=!0)):e<=r&&o[t](n.message),o.logInternalMessage(e,n))},o.warnToConsole=function(e){An("warn",e),a("warning",e)},o.errorToConsole=function(e){An("error",e),a("error",e)},o.resetInternalMessageCount=function(){s=0,u={}},o.logInternalMessage=function(e,n){var t,r;s>=o.maxInternalMessageLimit()||(r=!0,t="AITR_"+n.messageId,u[t]?r=!1:u[t]=!0,r&&(e<=o.telemetryLoggingLevel()&&(o.queue.push(n),s++,a(1===e?"error":"warn",n)),s===o.maxInternalMessageLimit()&&(r=new Rn(23,t="Internal events throttle limit per PageView reached for this app.",!1),o.queue.push(r),1===e?o.errorToConsole(t):o.warnToConsole(t))))}})};function q(e,n,t,r,i,o){void 0===o&&(o=!1),(e||new Dn).throwInternal(n,t,r,i,o)}function kn(e,n){(e||new Dn).warnToConsole(n)}s.ParentContextKey="parent",s.ChildrenContextKey="childEvts";var Bn=s;function s(e,i,n){var r,o=this,a=!1;o.start=Re(),o.name=e,o.isAsync=n,o.isChildEvt=function(){return!1},g(i)&&(a=function(e){if(se)try{var n={enumerable:!0,configurable:!0,get:function(){return!r&&g(i)&&(r=i(),i=null),r}};return se(e,"payload",n),!0}catch(t){}return!1}(o)),o.getCtx=function(e){return e?(e===s.ParentContextKey||e===s.ChildrenContextKey?o:o.ctx||{})[e]:null},o.setCtx=function(e,n){e&&(e===s.ParentContextKey?(o[e]||(o.isChildEvt=function(){return!0}),o[e]=n):e===s.ChildrenContextKey?o[e]=n:(o.ctx=o.ctx||{})[e]=n)},o.complete=function(){var e=0,n=o.getCtx(s.ChildrenContextKey);if(U(n))for(var t=0;t<n.length;t++){var r=n[t];r&&(e+=r.time)}o.time=Re()-o.start,o.exTime=o.time-e,o.complete=function(){},!a&&g(i)&&(o.payload=i())}}var Pn="CoreUtils.doPerf";function Un(e,n,t,r,i){if(e)if(e=g(e.getPerfMgr)?e.getPerfMgr():e){var o,a=void 0,s=e.getCtx(Pn);try{if(a=e.create(n(),r,i))return s&&a.setCtx&&(a.setCtx(Bn.ParentContextKey,s),s.getCtx&&s.setCtx&&((o=s.getCtx(Bn.ChildrenContextKey))||(o=[],s.setCtx(Bn.ChildrenContextKey,o)),o.push(a))),e.setCtx(Pn,a),t(a)}catch(u){a&&a.setCtx&&a.setCtx("exception",u)}finally{a&&e.fire(a),e.setCtx(Pn,s)}}t()}var On=4294967296,jn=4294967295,zn=!1,Kn=123456789,qn=987654321;function Vn(e){var n,t=0,r=c("crypto")||c("msCrypto");if(0===(t=r&&r.getRandomValues?r.getRandomValues(new Uint32Array(1))[0]&jn:t)&&(!(r=_n())||r.userAgent===gn&&null!==pn||(r=((gn=r.userAgent)||k).toLowerCase(),pn=Ce(r,ln)||Ce(r,fn)),pn)){if(!zn)try{var i=2147483647&Re();(n=(Math.random()*On^i)+i)<0&&(n>>>=0),Kn=123456789+n&jn,qn=987654321-n&jn,zn=!0}catch(o){}r=((qn=36969*(65535&qn)+(qn>>16)&jn)<<16)+(65535&(Kn=18e3*(65535&Kn)+(Kn>>16)&jn))>>>0&jn|0,t=(r>>>=0)&jn}return 0===t&&(t=Math.floor(On*Math.random()|0)),e||(t>>>=0),t}var Hn=e,Xn="2.8.0-nightly.2204-05",Yn="."+function(e){void 0===e&&(e=22);for(var n=Vn()>>>0,t=0,r=k;r.length<e;)r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[0|63&n]||"",n>>>=6,5==++t&&(n=(Vn()<<2&4294967295|3&n)>>>0,t=0);return r}(6),Jn=0;function Wn(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType}function Gn(e,n){return xe(e+Jn+++((n=void 0!==n&&n)?"."+Xn:"")+Yn)}function Zn(e){var o={id:Gn("_aiData-"+(e||"")+"."+Xn),accept:Wn,get:function(e,n,t,r){var i=e[o.id];return i?i[xe(n)]:(r&&((i=function(e,n){var t=n[e.id];if(!t){t={};try{Wn(n)&&!function(e,n,t){if(Hn)try{return Hn(e,n,{value:t,enumerable:!1,configurable:!0}),1}catch(r){}}(n,e.id,t)&&(n[e.id]=t)}catch(r){}}return t}(o,e))[xe(n)]=t),t)},kill:function(e,n){if(e&&e[n])try{delete e[n]}catch(t){}}};return o}var $n=Zn("plugin");function Qn(e){return $n.get(e,"state",{},!0)}var et="TelemetryPluginChain",nt="_hasRun",tt="_getTelCtx",rt=0;function it(e,a,t,n){var r=null,i=[],o=(null!==n&&(r=n?function(e,n,t,r){for(;e;){if(e.getPlugin()===r)return e;e=e.getNext()}return at([r],n,t)}(e,a,t,n):e),{_next:function(){var e,n=r;return r=n?n.getNext():null,n||(e=i)&&0<e.length&&(O(e,function(e){try{e.func.call(e.self,e.args)}catch(n){q(t.logger,2,73,"Unexpected Exception during onComplete - "+K(n))}}),i=[]),n},ctx:{core:function(){return t},diagLog:function(){return Mn(t,a)},getCfg:function(){return a},getExtCfg:s,getConfig:function(e,n,t){void 0===t&&(t=!1);var r,e=s(e,null);return e&&!B(e[n])?r=e[n]:a&&!B(a[n])&&(r=a[n]),B(r)?t:r},hasNext:function(){return!!r},getNext:function(){return r},setNext:function(e){r=e},iterate:function(e){for(;n=o._next();){var n=n.getPlugin();n&&e(n)}},onComplete:function(e,n){for(var t=[],r=2;r<arguments.length;r++)t[r-2]=arguments[r];e&&i.push({func:e,self:Se(n)?o.ctx:n,args:t})}}});function s(e,n,t){var r,i,o;return void 0===n&&(n={}),void 0===t&&(t=0),(r=a&&(i=a.extensionConfig)&&e?i[e]:r)?p(n)&&0!==t&&(o=function d(){var e=arguments,n=e[0]||{},t=e.length,r=!1,i=1;for(0<t&&"boolean"==typeof n&&(r=n,n=e[i]||{},i++),p(n)||(n={});i<t;i++){var o,a,s,u,c=e[i],l=U(c),f=p(c);for(o in c)(l&&o in c||f&&V.call(c,o))&&(a=c[o],s=void 0,r&&a&&((s=U(a))||Ie(a))&&(u=n[o],s?U(u)||(u=[]):Ie(u)||(u={}),a=d(r,u,a)),a!==undefined&&(n[o]=a))}return n}(!0,n,r),a&&2===t&&P(n,function(e){var n;B(o[e])&&!B(n=a[e])&&(o[e]=n)})):r=n,r}return o}function ot(e,t,r,n){var i=it(e,t,r,n),o=i.ctx;return o.processNext=function(e){var n=i._next();return n&&n.processTelemetry(e,o),!n},o.createNew=function(e,n){return ot((e=U(e=void 0===e?null:e)?at(e,t,r,n):e)||o.getNext(),t,r,n)},o}function at(e,n,t,r){var i,o=null,a=!r;return U(e)&&0<e.length&&(i=null,O(e,function(e){(a=!a&&r===e||a)&&e&&g(e.processTelemetry)&&(e=st(e,n,t),o=o||e,i&&i._setNext(e),i=e)})),r&&!o?at([r],n,t):o}function st(u,r,i){var c=null,o=g(u.processTelemetry),a=g(u.setNextPlugin),l=u?u.identifier+"-"+u.priority+"-"+rt++:"Unknown-0-"+rt++,s={getPlugin:function(){return u},getNext:function(){return c},processTelemetry:function(t,e){var n;f(e=e||(n=(n=u&&g(u[tt])?u[tt]():n)||ot(s,r,i)),function(e){if(!u||!o)return!1;var n=Qn(u);return!n[Z]&&!n[ee]&&(a&&u.setNextPlugin(c),u.processTelemetry(t,e),!0)},"processTelemetry",function(){return{item:t}},!t.sync)||e.processNext(t)},unload:function(r,i){f(r,function(){var e,n,t=!1;return u&&(e=Qn(u),n=u[$]||e.core,!u||n&&n!==r[$]()||e[Z]||(e[$]=null,e[Z]=!0,e[G]=!1,u[Z]&&!0===u[Z](r,i)&&(t=!0))),t},"unload",function(){},i.isAsync)||r.processNext(i)},update:function(r,i){f(r,function(){var e,n,t=!1;return u&&(e=Qn(u),n=u[$]||e.core,!u||n&&n!==r[$]()||e[Z]||u[Q]&&!0===u[Q](r,i)&&(t=!0)),t},"update",function(){},!1)||r.processNext(i)},_id:l,_setNext:function(e){c=e}};function f(t,r,i,e,n){var o=!1,a=u?u.identifier:et,s=(s=t[nt])||(t[nt]={});return t.setNext(c),u&&Un(t[$](),function(){return a+":"+i},function(){s[l]=!0;try{var e=c?c._id:k;e&&(s[e]=!1),o=r(t)}catch(n){e=!c||s[c._id];e&&(o=!0),c&&e||q(t.diagLog(),1,73,"Plugin ["+u.identifier+"] failed during "+i+" - "+K(n)+", run flags: "+K(s))}},e,n),o}return Ae(s)}function ut(){var n=[];return{add:function(e){e&&n.push(e)},run:function(t,r){O(n,function(e){try{e(t,r)}catch(n){q(t.diagLog(),2,73,"Unexpected error calling unload handler - "+K(n))}}),n=[]}}}var S="getPlugin",oe=function ci(){var o,i,c,l,f,a=this;function n(e){var n,e=e=void 0===e?null:e;return e||(n=i||ot(null,{},a.core),e=c&&c[S]?n.createNew(null,c[S]):n.createNew(null,c)),e}function s(e,n,t){e&&Le(e,"extensionConfig",[],null,B),!t&&n&&(t=n.getProcessTelContext().getNext());var r=c;c&&c[S]&&(r=c[S]()),a.core=n,i=ot(t,e,n,r)}function d(){o=!1,a.core=null,c=i=null,f=[],l=ut()}d(),y(ci,a,function(u){var e,n,t,r,i;u.initialize=function(e,n,t,r){s(e,n,r),o=!0},u.teardown=function(e,n){var t,r,i,o;if(u.core&&(!e||u.core===e.core()))return r=!1,i=e||function s(e,t,r,n){var i=it(e,t,r,n),o=i.ctx;return o.processNext=function(e){var n=i._next();return n&&n.unload(o,e),!n},o.createNew=function(e,n){return s((e=U(e=void 0===e?null:e)?at(e,t,r,n):e)||o.getNext(),t,r,n)},o}(null,{},u.core,c&&c[S]?c[S]():c),o=n||{reason:0,isAsync:!1},u[ne]&&!0===u[ne](i,o,a)?t=!0:a(),t;function a(){r||(r=!0,l.run(i,n),O(f,function(e){e.rm()}),f=[],!0===t&&i.processNext(o),d())}},u.update=function(e,n){var t,r,i;if(u.core&&(!e||u.core===e.core()))return r=!1,i=e||function a(e,t,r,n){var i=it(e,t,r,n).ctx;return i.processNext=function(n){return i.iterate(function(e){g(e[Q])&&e[Q](i,n)})},i.createNew=function(e,n){return a((e=U(e=void 0===e?null:e)?at(e,t,r,n):e)||i.getNext(),t,r,n)},i}(null,{},u.core,c&&c[S]?c[S]():c),u._doUpdate&&!0===u._doUpdate(i,n||{reason:0},o)?t=!0:o(),t;function o(){r||(r=!0,s(i.getCfg(),i.core(),i.getNext()))}},u._addHook=function(e){e&&(U(e)?f=f.concat(e):f.push(e))},t="_addUnloadCb",n=function(){return l},(e=u)&&n&&(e[t]=(i=r=null,g(t=n)?r=t:i=t,function(){var e=arguments;if(i=r?r():i)return i.add.apply(i,e)}))}),a.diagLog=function(e){return n(e).diagLog()},a[G]=function(){return o},a.setInitialized=function(e){o=e},a.setNextPlugin=function(e){c=e},a.processNext=function(e,n){n?n.processNext(e):c&&g(c.processTelemetry)&&c.processTelemetry(e,null)},a._getTelCtx=n},ct="attachEvent",lt="addEventListener",ft="detachEvent",dt="removeEventListener",pt="events",gt=(Gn("aiEvtPageHide"),Gn("aiEvtPageShow"),/\.[\.]+/g),mt=/[\.]+$/,vt=1,ht=Zn("events"),yt=/^([^.]*)(?:\.(.+)|)/;function St(e){return e&&e.replace?e.replace(/^\s*\.*|\.*\s*$/g,""):e}function xt(e,n){n&&(t="",U(n)?(t="",O(n,function(e){(e=St(e))&&("."!==e[0]&&(e="."+e),t+=e)})):t=St(n),t&&(e=(e||"")+(t="."!==t[0]?"."+t:t)));var t,n=yt.exec(e||"")||[];return{type:n[1],ns:(n[2]||"").replace(gt,".").replace(mt,"").split(".").sort().join(".")}}function Ct(e,n,t){e=ht.get(e,pt,{},t=void 0===t||t);return e[n]||(e[n]=[])}function _t(e,n,t,r){e&&n&&n.type&&(e[dt]?e[dt](n.type,t,r):e[ft]&&e[ft]("on"+n.type,t))}function It(e,n,t,r){for(var i=n.length;i--;){var o=n[i];!o||t.ns&&t.ns!==o.evtName.ns||r&&!r(o)||(_t(e,o.evtName,o.handler,o.capture),n.splice(i,1))}}function bt(e,n){return n?xt("xx",U(n)?[e].concat(n):[e,n]).ns.split("."):e}function Tt(e,n,t,r,i){void 0===i&&(i=!1);var o,a=!1;if(e)try{var s,u=xt(n,r),c=u,l=t,f=i,d=!1;(o=e)&&c&&c.type&&l&&(o[lt]?(o[lt](c.type,l,f),d=!0):o[ct]&&(o[ct]("on"+c.type,l),d=!0)),(a=d)&&ht.accept(e)&&(s={guid:vt++,evtName:u,handler:t,capture:i},Ct(e,u.type).push(s))}catch(p){}return a}var wt=ke({CRITICAL:1,WARNING:2}),Nt=ke({BrowserDoesNotSupportLocalStorage:0,BrowserCannotReadLocalStorage:1,BrowserCannotReadSessionStorage:2,BrowserCannotWriteLocalStorage:3,BrowserCannotWriteSessionStorage:4,BrowserFailedRemovalFromLocalStorage:5,BrowserFailedRemovalFromSessionStorage:6,CannotSendEmptyTelemetry:7,ClientPerformanceMathError:8,ErrorParsingAISessionCookie:9,ErrorPVCalc:10,ExceptionWhileLoggingError:11,FailedAddingTelemetryToBuffer:12,FailedMonitorAjaxAbort:13,FailedMonitorAjaxDur:14,FailedMonitorAjaxOpen:15,FailedMonitorAjaxRSC:16,FailedMonitorAjaxSend:17,FailedMonitorAjaxGetCorrelationHeader:18,FailedToAddHandlerForOnBeforeUnload:19,FailedToSendQueuedTelemetry:20,FailedToReportDataLoss:21,FlushFailed:22,MessageLimitPerPVExceeded:23,MissingRequiredFieldSpecification:24,NavigationTimingNotSupported:25,OnError:26,SessionRenewalDateIsZero:27,SenderNotInitialized:28,StartTrackEventFailed:29,StopTrackEventFailed:30,StartTrackFailed:31,StopTrackFailed:32,TelemetrySampledAndNotSent:33,TrackEventFailed:34,TrackExceptionFailed:35,TrackMetricFailed:36,TrackPVFailed:37,TrackPVFailedCalc:38,TrackTraceFailed:39,TransmissionFailed:40,FailedToSetStorageBuffer:41,FailedToRestoreStorageBuffer:42,InvalidBackendResponse:43,FailedToFixDepricatedValues:44,InvalidDurationValue:45,TelemetryEnvelopeInvalid:46,CreateEnvelopeError:47,CannotSerializeObject:48,CannotSerializeObjectNonSerializable:49,CircularReferenceDetected:50,ClearAuthContextFailed:51,ExceptionTruncated:52,IllegalCharsInName:53,ItemNotInArray:54,MaxAjaxPerPVExceeded:55,MessageTruncated:56,NameTooLong:57,SampleRateOutOfRange:58,SetAuthContextFailed:59,SetAuthContextFailedAccountName:60,StringValueTooLong:61,StartCalledMoreThanOnce:62,StopCalledWithoutStart:63,TelemetryInitializerFailed:64,TrackArgumentsNotSpecified:65,UrlTooLong:66,SessionStorageBufferFull:67,CannotAccessCookie:68,IdTooLong:69,InvalidEvent:70,FailedMonitorAjaxSetRequestHeader:71,SendBrowserInfoOnUserInit:72,PluginException:73,NotificationException:74,SnippetScriptLoadFailure:99,InvalidInstrumentationKey:100,CannotParseAiBlobValue:101,InvalidContentBlob:102,TrackPageActionEventFailed:103,FailedAddingCustomDefinedRequestContext:104,InMemoryStorageBufferFull:105});function Et(e,n,t){var r,i,o=n.length,a=(e=e,(n=n)&&150<(n=we(n.toString())).length&&(i=n.substring(0,150),q(e,2,57,"name is too long. It has been truncated to 150 characters.",{name:n},!0)),i||n);if(a.length!==o){for(var s=0,u=a;t[u]!==undefined;)s++,u=a.substring(0,147)+(r=void 0,(r="00"+s).substr(r.length-3));a=u}return a}function x(e,n,t){var r;return void 0===t&&(t=1024),n&&(t=t||1024,(n=we(n)).toString().length>t&&(r=n.toString().substring(0,t),q(e,2,61,"string value is too long. It has been truncated to "+t+" characters.",{value:n},!0))),r||n}function Ft(e,n){return Mt(e,n,2048,66)}function At(e,n){var t;return n&&32768<n.length&&(t=n.substring(0,32768),q(e,2,56,"message is too long, it has been truncated to 32768 characters.",{message:n},!0)),t||n}function Rt(r,e){var i;return e&&(i={},P(e,function(e,n){if(p(n)&&In())try{n=z().stringify(n)}catch(t){q(r,2,49,"custom property is not valid",{exception:t},!0)}n=x(r,n,8192),e=Et(r,e,i),i[e]=n}),e=i),e}function Lt(t,e){var r;return e&&(r={},P(e,function(e,n){e=Et(t,e,r),r[e]=n}),e=r),e}function Mt(e,n,t,r){var i;return n&&(n=we(n)).length>t&&(i=n.substring(0,t),q(e,2,r,"input is too long, it has been truncated to "+t+" characters.",{data:n},!0)),i||n}var Dt="";function kt(e){var n=Dt+Math.floor((e=Math.round(e=isNaN(e)||e<0?0:e))/1e3)%60,t=Dt+Math.floor(e/6e4)%60,r=Dt+Math.floor(e/36e5)%24,i=Math.floor(e/864e5),e=1===(e=Dt+e%1e3).length?"00"+e:2===e.length?"0"+e:e,n=n.length<2?"0"+n:n,t=t.length<2?"0"+t:t,r=r.length<2?"0"+r:r;return(0<i?i+".":Dt)+r+":"+t+":"+n+"."+e}var Bt="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",Pt="sampleRate",Ut="ProcessLegacy",Ot="http.method",l="not_specified",jt=ke({LocalStorage:0,SessionStorage:1}),zt=(ke({AI:0,AI_AND_W3C:1,W3C:2}),undefined);function Kt(e){try{if(B(X()))return null;var n=new Date,t=c(e===jt.LocalStorage?"localStorage":"sessionStorage"),r=(t.setItem(n.toString(),n.toString()),t.getItem(n.toString())!==n.toString());if(t.removeItem(n.toString()),!r)return t}catch(i){}return null}function qt(){return Vt()?Kt(jt.SessionStorage):null}function Vt(e){return zt=e||zt===undefined?!!Kt(jt.SessionStorage):zt}function Ht(e,n){var t=qt();if(null!==t)try{return t.getItem(n)}catch(r){zt=!1,q(e,2,2,"Browser failed read of session storage. "+j(r),{exception:K(r)})}return null}function Xt(e,n,t){var r=qt();if(null!==r)try{r.setItem(n,t)}catch(i){zt=!1,q(e,2,4,"Browser failed write to session storage. "+j(i),{exception:K(i)})}}var Yt=xn()||{},Jt=0,Wt=[null,null,null,null,null];var Gt=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"];function Zt(e){return~Gt.indexOf(e.toLowerCase())}var $t=function(e,n,t){var r=this,i=this;i.ver=1,i.sampleRate=100,i.tags={},i.name=x(e,t)||l,i.data=n,i.time=be(new Date),i.aiDataContract={time:1,iKey:1,name:1,sampleRate:function(){return 100===r.sampleRate?4:1},tags:1,data:1}},Qt=(er.envelopeType="Microsoft.ApplicationInsights.{0}.Event",er.dataType="EventData",er);function er(e,n,t,r){this.aiDataContract={ver:1,name:1,properties:0,measurements:0},this.ver=2,this.name=x(e,n)||l,this.properties=Rt(e,t),this.measurements=Lt(e,r)}var nr="error",u="stack",tr="stackDetails",rr="errorSrc",ir="message",or="description";function ar(e,n){var t=e;return t&&!v(t)&&(JSON&&JSON.stringify?(t=JSON.stringify(e),!n||t&&"{}"!==t||(t=g(e.toString)?e.toString():""+e)):t=e+" - (Missing JSON.stringify)"),t||""}function sr(e,n){var t=e;return e&&((t=t&&!v(t)&&(e[ir]||e[or])||t)&&!v(t)&&(t=ar(t,!0)),e.filename&&(t=t+" @"+(e.filename||"")+":"+(e.lineno||"?")+":"+(e.colno||"?"))),(n&&"String"!==n&&"Object"!==n&&"Error"!==n&&!~(t||"").indexOf(n)?n+": "+t:t)||""}function ur(e){return e&&e.src&&v(e.src)&&e.obj&&U(e.obj)}function cr(e){var e=e||"",n=(e=v(e)?e:v(e[u])?e[u]:""+e).split("\n");return{src:e,obj:n}}function lr(e){var n,t=null;if(e)try{e[u]?t=cr(e[u]):e[nr]&&e[nr][u]?t=cr(e[nr][u]):e.exception&&e.exception[u]?t=cr(e.exception[u]):ur(e)?t=e:ur(e[tr])?t=e[tr]:window&&window.opera&&e[ir]?t=function(e){for(var n=[],t=e.split("\n"),r=0;r<t.length;r++){var i=t[r];t[r+1]&&(i+="@"+t[r+1],r++),n.push(i)}return{src:e,obj:n}}(e.message):v(e)?t=cr(e):(n=e[ir]||e[or]||"",v(e[rr])&&(n&&(n+="\n"),n+=" from "+e[rr]),n&&(t=cr(n)))}catch(r){t=cr(r)}return t||{src:"",obj:null}}function fr(e){var n="";if(e&&!(n=e.typeName||e.name||""))try{var t=/function (.{1,200})\(/.exec(e.constructor.toString()),n=t&&1<t.length?t[1]:""}catch(r){}return n}function dr(e){if(e)try{var n,t;if(!v(e))return n=fr(e),(t=ar(e,!1))&&"{}"!==t||(e[nr]&&(n=fr(e=e[nr])),t=ar(e,!0)),t.indexOf(n)&&"String"!==n?n+":"+t:t}catch(r){}return""+(e||"")}a.CreateAutoException=function(e,n,t,r,i,o,a,s){var u=fr(i||o||e);return{message:sr(e,u),url:n,lineNumber:t,columnNumber:r,error:dr(i||o||e),evt:dr(o||e),typeName:u,stackDetails:lr(a||i||o),errorSrc:s}},a.CreateFromInterface=function(n,e,t,r){var i=e.exceptions&&Te(e.exceptions,function(e){return gr.CreateFromInterface(n,e)});return new a(n,f(f({},e),{exceptions:i}),t,r)},a.prototype.toInterface=function(){var e=this,n=e.exceptions,t=e.properties,r=e.measurements,i=e.severityLevel,o=e.problemGroup,a=e.id,e=e.isManual;return{ver:"4.0",exceptions:n instanceof Array&&Te(n,function(e){return e.toInterface()})||undefined,severityLevel:i,properties:t,measurements:r,problemGroup:o,id:a,isManual:e}},a.CreateSimpleException=function(e,n,t,r,i,o){return{exceptions:[{hasFullStack:!0,message:e,stack:i,typeName:n}]}},a.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",a.dataType="ExceptionData",a.formatError=dr;var pr=a;function a(e,n,t,r,i,o){this.aiDataContract={ver:1,exceptions:1,severityLevel:0,properties:0,measurements:0};var a=this;a.ver=2,function(e){try{if(p(e))return"ver"in e&&"exceptions"in e&&"properties"in e}catch(n){}}(n)?(a.exceptions=n.exceptions||[],a.properties=n.properties,a.measurements=n.measurements,n.severityLevel&&(a.severityLevel=n.severityLevel),n.id&&(a.id=n.id),n.problemGroup&&(a.problemGroup=n.problemGroup),B(n.isManual)||(a.isManual=n.isManual)):(a.exceptions=[new gr(e,n,t=t||{})],a.properties=Rt(e,t),a.measurements=Lt(e,r),i&&(a.severityLevel=i),o&&(a.id=o))}mr.prototype.toInterface=function(){var e=this,n=e.parsedStack instanceof Array&&Te(e.parsedStack,function(e){return e.toInterface()});return{id:e.id,outerId:e.outerId,typeName:e.typeName,message:e.message,hasFullStack:e.hasFullStack,stack:e[u],parsedStack:n||undefined}},mr.CreateFromInterface=function(e,n){var t=n.parsedStack instanceof Array&&Te(n.parsedStack,function(e){return vr.CreateFromInterface(e)})||n.parsedStack;return new mr(e,f(f({},n),{parsedStack:t}))};var gr=mr;function mr(e,n,t){this.aiDataContract={id:0,outerId:0,typeName:1,message:1,hasFullStack:0,stack:0,parsedStack:2};var c,r,i,o,a,s=this;!function(e){try{if(p(e))return"hasFullStack"in e&&"typeName"in e}catch(n){}}(n)?(r=(o=n)&&o.evt,_e(o)||(o=o[nr]||r||o),s.typeName=x(e,fr(o))||l,s.message=At(e,sr(n||o,s.typeName))||l,c=n[tr]||lr(n),s.parsedStack=function(){var e=c.obj;if(e&&0<e.length){var n=[],t=0,r=0;if(O(e,function(e){var e=e.toString();vr.regex.test(e)&&(e=new vr(e,t++),r+=e.sizeInBytes,n.push(e))}),32768<r)for(var i=0,o=n.length-1,a=0,s=i,u=o;i<o;){if(32768<(a+=n[i].sizeInBytes+n[o].sizeInBytes)){n.splice(s,u-s+1);break}s=i,u=o,i++,o--}}return n}(),s[u]=(r=e,a="",(o=c)&&(o.obj?O(o.obj,function(e){a+=e+"\n"}):a=o.src||""),(e=a)&&32768<(o=""+e).length&&(i=o.substring(0,32768),q(r,2,52,"exception is too long, it has been truncated to 32768 characters.",{exception:e},!0)),i||e),s.hasFullStack=U(s.parsedStack)&&0<s.parsedStack.length,t&&(t.typeName=t.typeName||s.typeName)):(s.typeName=n.typeName,s.message=n.message,s[u]=n[u],s.parsedStack=n.parsedStack||[],s.hasFullStack=n.hasFullStack)}i.CreateFromInterface=function(e){return new i(e,null)},i.prototype.toInterface=function(){var e=this;return{level:e.level,method:e.method,assembly:e.assembly,fileName:e.fileName,line:e.line}},i.regex=/^([\s]+at)?[\s]{0,50}([^\@\()]+?)[\s]{0,50}(\@|\()([^\(\n]+):([0-9]+):([0-9]+)(\)?)$/,i.baseSize=58;var vr=i;function i(e,n){this.aiDataContract={level:1,method:1,assembly:0,fileName:0,line:0};var t,r=this;r.sizeInBytes=0,"string"==typeof e?(t=e,r.level=n,r.method="<no_method>",r.assembly=we(t),r.fileName="",r.line=0,(n=t.match(i.regex))&&5<=n.length&&(r.method=we(n[2])||r.method,r.fileName=we(n[4]),r.line=parseInt(n[5])||0)):(r.level=e.level,r.method=e.method,r.assembly=e.assembly,r.fileName=e.fileName,r.line=e.line,r.sizeInBytes=0),r.sizeInBytes+=r.method.length,r.sizeInBytes+=r.fileName.length,r.sizeInBytes+=r.assembly.length,r.sizeInBytes+=i.baseSize,r.sizeInBytes+=r.level.toString().length,r.sizeInBytes+=r.line.toString().length}var hr=function(){this.aiDataContract={name:1,kind:0,value:1,count:0,min:0,max:0,stdDev:0},this.kind=0},yr=(Sr.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",Sr.dataType="MetricData",Sr);function Sr(e,n,t,r,i,o,a,s,u){this.aiDataContract={ver:1,metrics:1,properties:0},this.ver=2;var c=new hr;c.count=0<r?r:undefined,c.max=isNaN(o)||null===o?undefined:o,c.min=isNaN(i)||null===i?undefined:i,c.name=x(e,n)||l,c.value=t,c.stdDev=isNaN(a)||null===a?undefined:a,this.metrics=[c],this.properties=Rt(e,s),this.measurements=Lt(e,u)}Cr.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",Cr.dataType="PageviewData";var xr=Cr;function Cr(e,n,t,r,i,o,a){this.aiDataContract={ver:1,name:0,url:0,duration:0,properties:0,measurements:0,id:0};var s=this;s.ver=2,s.id=a&&Mt(e,a,128,69).toString(),s.url=Ft(e,t),s.name=x(e,n)||l,isNaN(r)||(s.duration=kt(r)),s.properties=Rt(e,i),s.measurements=Lt(e,o)}Ir.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",Ir.dataType="RemoteDependencyData";var _r=Ir;function Ir(e,n,t,r,i,o,a,s,u,c,l,f){void 0===u&&(u="Ajax"),this.aiDataContract={id:1,ver:1,name:0,resultCode:0,duration:0,success:0,data:0,target:0,type:0,properties:0,measurements:0,kind:0,value:0,count:0,min:0,max:0,stdDev:0,dependencyKind:0,dependencySource:0,commandName:0,dependencyTypeName:0};var d,p,g,m=this,t=(m.ver=2,m.id=n,m.duration=kt(i),m.success=o,m.resultCode=a+"",m.type=x(e,u),n=e,i=s,u=a=o=r,a=(s=t)&&0<s.length?(d=s,g=(t=Wt)[p=Jt],Yt.createElement?t[p]||(g=t[p]=Yt.createElement("a")):g={host:function(){e=null,d&&null!=(t=d.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i))&&2<t.length&&v(t[2])&&0<t[2].length&&(e=t[2]||"",2<t.length&&(n=(t[1]||"").toLowerCase(),t=t[3]||"",e+=t="http"==n&&":80"===t||"https"==n&&":443"===t?"":t));var e,n=e||"";if(n){var t=n.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i);if(null!=t&&3<t.length&&v(t[2])&&0<t[2].length)return t[2]+(t[3]||"")}return n}()},g.href=d,++p>=t.length&&(p=0),Jt=p,p=(t=g).host,a||(null!=t.pathname?("/"!=((g=0===t.pathname.length?"/":t.pathname)[0]||"")&&(g="/"+g),u=t.pathname,x(n,i?i+" "+g:g)):x(n,s))):p=o,{target:p,name:a,data:u});m.data=Ft(e,r)||t.data,m.target=x(e,t.target),c&&(m.target="".concat(m.target," | ").concat(c)),m.name=x(e,t.name),m.properties=Rt(e,l),m.measurements=Lt(e,f)}Tr.envelopeType="Microsoft.ApplicationInsights.{0}.Message",Tr.dataType="MessageData";var br=Tr;function Tr(e,n,t,r,i){this.aiDataContract={ver:1,message:1,severityLevel:0,properties:0};var o=this;o.ver=2,o.message=At(e,n=n||l),o.properties=Rt(e,r),o.measurements=Lt(e,i),t&&(o.severityLevel=t)}Nr.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",Nr.dataType="PageviewPerformanceData";var wr=Nr;function Nr(e,n,t,r,i,o,a){this.aiDataContract={ver:1,name:0,url:0,duration:0,perfTotal:0,networkConnect:0,sentRequest:0,receivedResponse:0,domProcessing:0,properties:0,measurements:0};var s=this;s.ver=2,s.url=Ft(e,t),s.name=x(e,n)||l,s.properties=Rt(e,i),s.measurements=Lt(e,o),a&&(s.domProcessing=a.domProcessing,s.duration=a.duration,s.networkConnect=a.networkConnect,s.perfTotal=a.perfTotal,s.receivedResponse=a.receivedResponse,s.sentRequest=a.sentRequest)}var Er=function(e,n){this.aiDataContract={baseType:1,baseData:1},this.baseType=e,this.baseData=n};function Fr(e){var n="ai."+e+".";return function(e){return n+e}}var Ar,Rr,n=Fr("application"),e=Fr("device"),Lr=Fr("location"),r=Fr("operation"),Mr=Fr("session"),d=Fr("user"),C=Fr("cloud"),Dr=Fr("internal"),kr=(Rr={applicationVersion:n("ver"),applicationBuild:n("build"),applicationTypeId:n("typeId"),applicationId:n("applicationId"),applicationLayer:n("layer"),deviceId:e("id"),deviceIp:e("ip"),deviceLanguage:e("language"),deviceLocale:e("locale"),deviceModel:e("model"),deviceFriendlyName:e("friendlyName"),deviceNetwork:e("network"),deviceNetworkName:e("networkName"),deviceOEMName:e("oemName"),deviceOS:e("os"),deviceOSVersion:e("osVersion"),deviceRoleInstance:e("roleInstance"),deviceRoleName:e("roleName"),deviceScreenResolution:e("screenResolution"),deviceType:e("type"),deviceMachineName:e("machineName"),deviceVMName:e("vmName"),deviceBrowser:e("browser"),deviceBrowserVersion:e("browserVersion"),locationIp:Lr("ip"),locationCountry:Lr("country"),locationProvince:Lr("province"),locationCity:Lr("city"),operationId:r("id"),operationName:r("name"),operationParentId:r("parentId"),operationRootId:r("rootId"),operationSyntheticSource:r("syntheticSource"),operationCorrelationVector:r("correlationVector"),sessionId:Mr("id"),sessionIsFirst:Mr("isFirst"),sessionIsNew:Mr("isNew"),userAccountAcquisitionDate:d("accountAcquisitionDate"),userAccountId:d("accountId"),userAgent:d("userAgent"),userId:d("id"),userStoreRegion:d("storeRegion"),userAuthUserId:d("authUserId"),userAnonymousUserAcquisitionDate:d("anonUserAcquisitionDate"),userAuthenticatedUserAcquisitionDate:d("authUserAcquisitionDate"),cloudName:C("name"),cloudRole:C("role"),cloudRoleVer:C("roleVer"),cloudRoleInstance:C("roleInstance"),cloudEnvironment:C("environment"),cloudLocation:C("location"),cloudDeploymentUnit:C("deploymentUnit"),internalNodeName:Dr("nodeName"),internalSdkVersion:Dr("sdkVersion"),internalAgentVersion:Dr("agentVersion"),internalSnippet:Dr("snippet"),internalSdkSrc:Dr("sdkSrc")},W(Br,Ar=function(){var t=this;P(Rr,function(e,n){t[e]=n})}),Br);function Br(){return Ar.call(this)||this}var Pr,_=new kr,n=function li(t,r){var i=[],o=!1;this._get=function(){return i},this._set=function(e){return i=e},y(li,this,function(n){n.enqueue=function(e){n.count()>=r.eventsLimitInMem()?o||(q(t,2,105,"Maximum in-memory buffer size reached: "+n.count(),!0),o=!0):i.push(e)},n.count=function(){return i.length},n.size=function(){for(var e=i.length,n=0;n<i.length;n++)e+=i[n].length;return r.emitLineDelimitedJson()||(e+=2),e},n.clear=function(){o=!(i=[])},n.getItems=function(){return i.slice(0)},n.batchPayloads=function(e){return e&&0<e.length?r.emitLineDelimitedJson()?e.join("\n"):"["+e.join(",")+"]":null}})},Ur=(W(Or,Pr=n),Or);function Or(e,n){e=Pr.call(this,e,n)||this;return y(Or,e,function(e,n){e.markAsSent=function(e){n.clear()},e.clearSent=function(e){}}),e}W(I,jr=n),I.BUFFER_KEY="AI_buffer",I.SENT_BUFFER_KEY="AI_sentBuffer",I.MAX_BUFFER_SIZE=2e3;var jr,zr=I;function I(s,u){var e=jr.call(this,s,u)||this,c=!1;return y(I,e,function(t,n){var e=o(I.BUFFER_KEY),r=o(I.SENT_BUFFER_KEY),r=t._set(e.concat(r));function i(n,e){var t=[];return O(e,function(e){g(e)||-1!==function(e,n){if(e){if(e[re])return e[re](n,void 0);var t=e.length;try{for(var r=0;r<t;r++)if(r in e&&e[r]===n)return r}catch(i){}}return-1}(n,e)||t.push(e)}),t}function o(e){try{var e=u.namePrefix&&u.namePrefix()?u.namePrefix()+"_"+e:e,n=Ht(s,e);if(n){var t=z().parse(n);if((t=v(t)?z().parse(t):t)&&U(t))return t}}catch(r){q(s,1,42," storage key: "+e+", "+j(r),{exception:K(r)})}return[]}function a(e,n){try{var e=u.namePrefix&&u.namePrefix()?u.namePrefix()+"_"+e:e,t=JSON.stringify(n);Xt(s,e,t)}catch(r){Xt(s,e,JSON.stringify([])),q(s,2,41," storage key: "+e+", "+j(r)+". Buffer cleared",{exception:K(r)})}}r.length>I.MAX_BUFFER_SIZE&&(r.length=I.MAX_BUFFER_SIZE),a(I.SENT_BUFFER_KEY,[]),a(I.BUFFER_KEY,r),t.enqueue=function(e){t.count()>=I.MAX_BUFFER_SIZE?c||(q(s,2,67,"Maximum buffer size reached: "+t.count(),!0),c=!0):(n.enqueue(e),a(I.BUFFER_KEY,t._get()))},t.clear=function(){n.clear(),a(I.BUFFER_KEY,t._get()),a(I.SENT_BUFFER_KEY,[]),c=!1},t.markAsSent=function(e){a(I.BUFFER_KEY,t._set(i(e,t._get())));var n=o(I.SENT_BUFFER_KEY);n instanceof Array&&e instanceof Array&&((n=n.concat(e)).length>I.MAX_BUFFER_SIZE&&(q(s,1,67,"Sent buffer reached its maximum size: "+n.length,!0),n.length=I.MAX_BUFFER_SIZE),a(I.SENT_BUFFER_KEY,n))},t.clearSent=function(e){e=i(e,o(I.SENT_BUFFER_KEY));a(I.SENT_BUFFER_KEY,e)}}),e}var Kr="baseType",b="baseData",T="properties",qr="true";function w(e,n,t){Le(e,n,t,Me)}function Vr(e,t,r){B(e)||P(e,function(e,n){"number"==typeof n?r[e]=n:v(n)?t[e]=n:In()&&(t[e]=z().stringify(n))})}function Hr(t,r){B(t)||P(t,function(e,n){t[e]=n||r})}function Xr(e,n,t,r){for(var r=new $t(e,r,n),n=(w(r,"sampleRate",t[Pt]),(t[b]||{}).startTime&&(r.time=be(t[b].startTime)),r.iKey=t.iKey,t.iKey.replace(/-/g,"")),n=(r.name=r.name.replace("{0}",n),e),e=t,i=r,o=i.tags=i.tags||{},a=e.ext=e.ext||{},s=e.tags=e.tags||[],u=a.user,u=(u&&(w(o,_.userAuthUserId,u.authId),w(o,_.userId,u.id||u.localId)),a.app),u=(u&&w(o,_.sessionId,u.sesId),a.device),u=(u&&(w(o,_.deviceId,u.id||u.localId),w(o,_.deviceType,u.deviceClass),w(o,_.deviceIp,u.ip),w(o,_.deviceModel,u.model),w(o,_.deviceType,u.deviceType)),e.ext.web),e=(u&&(w(o,_.deviceLanguage,u.browserLang),w(o,_.deviceBrowserVersion,u.browserVer),w(o,_.deviceBrowser,u.browser),w(e=(e=(e=i.data=i.data||{})[b]=e[b]||{})[T]=e[T]||{},"domain",u.domain),w(e,"isManual",u.isManual?qr:null),w(e,"screenRes",u.screenRes),w(e,"userConsent",u.userConsent?qr:null)),a.os),u=(e&&w(o,_.deviceOS,e.name),a.trace),c=(u&&(w(o,_.operationParentId,u.parentID),w(o,_.operationName,x(n,u.name)),w(o,_.operationId,u.traceID)),{}),l=s.length-1;0<=l;l--)P(s[l],function(e,n){c[e]=n}),s.splice(l,1);P(s,function(e,n){c[e]=n});e=f(f({},o),c);return e[_.internalSdkVersion]||(e[_.internalSdkVersion]="javascript:".concat(Jr.Version)),i.tags=De(e),t.tags=t.tags||[],De(r)}function Yr(e,n){B(n[b])&&q(e,1,46,"telemetryItem.baseData cannot be null.")}var Jr={Version:"2.8.0-nightly.2204-05"};function Wr(e,n,t){Yr(e,n);var r={},i={},t=(n[Kr]!==Qt.dataType&&(r.baseTypeSource=n[Kr]),n[Kr]===Qt.dataType?(r=n[b][T]||{},i=n[b].measurements||{}):n[b]&&Vr(n[b],r,i),Vr(n.data,r,i),B(t)||Hr(r,t),n[b].name),t=new Qt(e,t,r,i),r=new Er(Qt.dataType,t);return Xr(e,Qt.envelopeType,n,r)}var Gr=function fi(f){y(fi,this,function(e){function c(a,s){var e="__aiCircularRefCheck",u={};if(!a)return q(f,1,48,"cannot serialize object because it is null or undefined",{name:s},!0),u;if(a[e])return q(f,2,50,"Circular reference detected while serializing object",{name:s},!0),u;if(a.aiDataContract)return a[e]=!0,P(a.aiDataContract,function(e,n){var t=g(n)?1&n():1&n,r=g(n)?4&n():4&n,n=2&n,i=a[e]!==undefined,o=p(a[e])&&null!==a[e];!t||i||n?r||(t=o?(n?l:c)(a[e],e):a[e])!==undefined&&(u[e]=t):q(f,1,24,"Missing required field specification. The field is required but not present on source",{field:e,name:s})}),delete a[e],u;if("measurements"===s)u=t(a,"number",s);else if("properties"===s)u=t(a,"string",s);else if("tags"===s)u=t(a,"string",s);else if(U(a))u=l(a,s);else{q(f,2,49,"Attempting to serialize an object which does not implement ISerializable",{name:s},!0);try{z().stringify(a),u=a}catch(n){q(f,1,48,n&&g(n.toString)?n.toString():"Error serializing object",null,!0)}}return u}function l(e,n){if(e)if(U(e))for(var t=[],r=0;r<e.length;r++){var i=c(e[r],n+"["+r+"]");t.push(i)}else q(f,1,54,"This field was specified as an array in the contract but the item is not an array.\r\n",{name:n},!0);return t}function t(e,t,r){var i;return e&&(i={},P(e,function(e,n){"string"===t?n===undefined?i[e]="undefined":null===n?i[e]="null":n.toString?i[e]=n.toString():i[e]="invalid field: toString() is not defined.":"number"===t?n===undefined?i[e]="undefined":i[e]=null===n?"null":isNaN(n=parseFloat(n))?"NaN":n:(i[e]="invalid field: "+r+" is of unknown type.",q(f,1,i[e],null,!0))})),i}e.serialize=function(e){e=c(e,"root");try{return z().stringify(e)}catch(n){q(f,1,48,n&&g(n.toString)?n.toString():"Error serializing object",null,!0)}}})};function Zr(e,n){var t,r,i=void 0;if(void 0===i&&(i=!1),e)try{var o=xt(null,n),a=!1,s=e,u=function(e){return!(!o.ns&&null!==e.handler)&&(a=!0)};(t=o).type?It(s,Ct(s,t.type),t,u):(P(r=ht.get(s,pt,{}),function(e,n){It(s,n,t,u)}),0===Fe(r).length&&ht.kill(s,pt)),a||_t(e,o,null,i)}catch(c){}}Qr.prototype.getHashCodeScore=function(e){return this.getHashCode(e)/Qr.INT_MAX_VALUE*100},Qr.prototype.getHashCode=function(e){if(""===e)return 0;for(;e.length<8;)e=e.concat(e);for(var n=5381,t=0;t<e.length;++t)n=(n<<5)+n+e.charCodeAt(t),n&=n;return Math.abs(n)},Qr.INT_MAX_VALUE=2147483647;var $r=Qr;function Qr(){}var ei=function(){var n=new $r,t=new kr;this.getSamplingScore=function(e){return e.tags&&e.tags[t.userId]?n.getHashCodeScore(e.tags[t.userId]):e.ext&&e.ext.user&&e.ext.user.id?n.getHashCodeScore(e.ext.user.id):e.tags&&e.tags[t.operationId]?n.getHashCodeScore(e.tags[t.operationId]):e.ext&&e.ext.telemetryTrace&&e.ext.telemetryTrace.traceID?n.getHashCodeScore(e.ext.telemetryTrace.traceID):100*Math.random()}},ni=(ti.prototype.isSampledIn=function(e){var n=this.sampleRate;return null===n||n===undefined||100<=n||e.baseType===yr.dataType||this.samplingScoreGenerator.getSamplingScore(e)<n},ti);function ti(e,n){this.INT_MAX_VALUE=2147483647;n=n||Mn(null);(100<e||e<0)&&(n.throwInternal(wt.WARNING,Nt.SampleRateOutOfRange,"Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.",{samplingRate:e},!0),e=100),this.sampleRate=e,this.samplingScoreGenerator=new ei}function ri(e){try{return e.responseText}catch(n){}return null}function ii(){return{endpointUrl:function(){return"https://dc.services.visualstudio.com/v2/track"},emitLineDelimitedJson:function(){return!1},maxBatchInterval:function(){return 15e3},maxBatchSizeInBytes:function(){return 102400},disableTelemetry:function(){return!1},enableSessionStorageBuffer:function(){return!0},isRetryDisabled:function(){return!1},isBeaconApiDisabled:function(){return!0},disableXhr:function(){return!1},onunloadDisableFetch:function(){return!1},onunloadDisableBeacon:function(){return!1},instrumentationKey:function(){return undefined},namePrefix:function(){return undefined},samplingPercentage:function(){return 100},customHeaders:function(){return undefined},convertUndefined:function(){return undefined},eventsLimitInMem:function(){return 1e4}}}(e={})[Qt.dataType]=Wr,e[br.dataType]=function(e,n,t){Yr(e,n);var r=n[b].message,i=n[b].severityLevel,o=n[b][T]||{},a=n[b].measurements||{},t=(Vr(n.data,o,a),B(t)||Hr(o,t),new br(e,r,i,o,a)),r=new Er(br.dataType,t);return Xr(e,br.envelopeType,n,r)},e[xr.dataType]=function(e,n,t){Yr(e,n);var r,i="duration",o=n[b],i=(B(o)||B(o[T])||B(o[T][i])?B(n.data)||B(n.data[i])||(r=n.data[i],delete n.data[i]):(r=o[T][i],delete o[T][i]),n[b]),o=(((n.ext||{}).trace||{}).traceID&&(a=n.ext.trace.traceID),i.id||a),a=i.name,s=i.uri,u=i[T]||{},c=i.measurements||{},i=(B(i.refUri)||(u.refUri=i.refUri),B(i.pageType)||(u.pageType=i.pageType),B(i.isLoggedIn)||(u.isLoggedIn=i.isLoggedIn.toString()),B(i[T])||P(i[T],function(e,n){u[e]=n}),Vr(n.data,u,c),B(t)||Hr(u,t),new xr(e,a,s,r,u,c,o)),t=new Er(xr.dataType,i);return Xr(e,xr.envelopeType,n,t)},e[wr.dataType]=function(e,n,t){Yr(e,n);var r=n[b],i=r.name,o=r.uri||r.url,a=r[T]||{},s=r.measurements||{},t=(Vr(n.data,a,s),B(t)||Hr(a,t),new wr(e,i,o,undefined,a,s,r)),i=new Er(wr.dataType,t);return Xr(e,wr.envelopeType,n,i)},e[pr.dataType]=function(e,n,t){Yr(e,n);var r=n[b].measurements||{},i=n[b][T]||{},t=(Vr(n.data,i,r),B(t)||Hr(i,t),n[b]),t=pr.CreateFromInterface(e,t,i,r),i=new Er(pr.dataType,t);return Xr(e,pr.envelopeType,n,i)},e[yr.dataType]=function(e,n,t){Yr(e,n);var r=n[b],i=r[T]||{},o=r.measurements||{},t=(Vr(n.data,i,o),B(t)||Hr(i,t),new yr(e,r.name,r.average,r.sampleCount,r.min,r.max,r.stdDev,i,o)),r=new Er(yr.dataType,t);return Xr(e,yr.envelopeType,n,r)},e[_r.dataType]=function(e,n,t){Yr(e,n);var r=n[b].measurements||{},i=n[b][T]||{},t=(Vr(n.data,i,r),B(t)||Hr(i,t),n[b]);if(B(t))return kn(e,"Invalid input for dependency data"),null;var o=t[T]&&t[T][Ot]?t[T][Ot]:"GET",o=new _r(e,t.id,t.target,t.name,t.duration,t.success,t.responseCode,o,t.type,t.correlationContext,i,r),t=new Er(_r.dataType,o);return Xr(e,_r.envelopeType,n,t)};var oi,ai=e,Lr=(W(si,oi=oe),si.constructEnvelope=function(e,n,t,r){e=n===e.iKey||B(n)?e:f(f({},e),{iKey:n});return(ai[e.baseType]||Wr)(t,e,r)},si);function si(){var I,b,T,r,w,N,E,F,A,R,L,M=oi.call(this)||this,D=(M.priority=1001,M.identifier="AppInsightsChannelPlugin",M._senderConfig=ii(),0);return y(si,M,function(c,a){function l(e,n,t,r,i,o){var a=null;c._appId||(a=g(o))&&a.appId&&(c._appId=a.appId),(e<200||300<=e)&&0!==e?(301!==e&&307!==e&&308!==e||s(t))&&!c._senderConfig.isRetryDisabled()&&y(e)?(m(n),q(c.diagLog(),2,40,". Response code "+e+". Will retry to send "+n.length+" items.")):c._onError(n,i):R&&!R.isOnline()?c._senderConfig.isRetryDisabled()||(m(n,10),q(c.diagLog(),2,40,". Offline - Response Code: ".concat(e,". Offline status: ").concat(!R.isOnline(),". Will retry to send ").concat(n.length," items."))):(s(t),206===e?(a=a||g(o))&&!c._senderConfig.isRetryDisabled()?c._onPartialSuccess(n,a):c._onError(n,i):(I=0,c._onSuccess(n,r)))}function s(e){return!(10<=N)&&!B(e)&&""!==e&&e!==c._senderConfig.endpointUrl()&&(c._senderConfig.endpointUrl=function(){return e},++N,1)}function n(e,n){A?A(e,!1):u(e)}function o(e){var n=_n(),t=c._buffer,r=c._senderConfig.endpointUrl(),i=c._buffer.batchPayloads(e),i=new Blob([i],{type:"text/plain;charset=UTF-8"}),r=n.sendBeacon(r,i);return r&&(t.markAsSent(e),c._onSuccess(e,e.length)),r}function u(e,n){if(U(e)&&0<e.length&&!o(e)){for(var t=[],r=0;r<e.length;r++){var i=e[r];o([i])||t.push(i)}0<t.length&&(F&&F(t,!0),q(c.diagLog(),2,40,". Failed to send telemetry with Beacon API, retried with normal sender."))}}function f(n,e){var t=new XMLHttpRequest,r=c._senderConfig.endpointUrl();try{t[Bt]=!0}catch(i){}t.open("POST",r,e),t.setRequestHeader("Content-type","application/json"),Zt(r)&&t.setRequestHeader("Sdk-Context","appId"),O(Fe(E),function(e){t.setRequestHeader(e,E[e])}),t.onreadystatechange=function(){return c._xhrReadyStateChange(t,n,n.length)},t.onerror=function(e){return c._onError(n,S(t),e)};e=c._buffer.batchPayloads(n);t.send(e),c._buffer.markAsSent(n)}function d(e,n){if(U(e)){for(var t=e.length,r=0;r<e.length;r++)t+=e[r].length;D+t<=65e3?i(e,!1):bn()?u(e):(F&&F(e,!0),q(c.diagLog(),2,40,". Failed to send telemetry with Beacon API, retried with xhrSender."))}}function p(e,n){i(e,!0)}function i(t,r){var e=c._senderConfig.endpointUrl(),n=c._buffer.batchPayloads(t),i=new Blob([n],{type:"application/json"}),o=new Headers,a=n.length,n=!1,s=!1,e=(Zt(e)&&o.append("Sdk-Context","appId"),O(Fe(E),function(e){o.append(e,E[e])}),(i={method:"POST",headers:o,body:i})[Bt]=!0,r||(n=i.keepalive=!0,D+=a),new Request(e,i));try{e[Bt]=!0}catch(u){}c._buffer.markAsSent(t);try{fetch(e).then(function(n){r||(D-=a,a=0),s||(s=!0,n.ok?n.text().then(function(e){l(n.status,t,n.url,t.length,n.statusText,e)}):c._onError(t,n.statusText))})["catch"](function(e){r||(D-=a,a=0),s||(s=!0,c._onError(t,e.message))})}catch(u){s||c._onError(t,K(u))}n&&!s&&(s=!0,c._onSuccess(t,t.length))}function g(e){try{if(e&&""!==e){var n=z().parse(e);if(n&&n.itemsReceived&&n.itemsReceived>=n.itemsAccepted&&n.itemsReceived-n.itemsAccepted===n.errors.length)return n}}catch(t){q(c.diagLog(),1,43,"Cannot parse the response. "+j(t),{response:e})}return null}function m(e,n){if(void 0===n&&(n=1),e&&0!==e.length){var t=c._buffer;t.clearSent(e),I++;for(var r=0,i=e;r<i.length;r++){var o=i[r];t.enqueue(o)}n=I<=1?10:(e=1+Math.floor((Math.pow(2,I)-1)/2*Math.random()*10),Math.max(Math.min(e*=n,3600),10)),e=Re()+1e3*n;b=e,v()}}function v(){var e;r||T||(e=b?Math.max(0,b-Re()):0,e=Math.max(c._senderConfig.maxBatchInterval(),e),r=setTimeout(function(){r=null,c.triggerSend(!0,null,1)},e))}function h(){clearTimeout(r),b=r=null}function y(e){return 408===e||429===e||500===e||503===e}function S(e,n){return e?"XMLHttpRequest,Status:"+e.status+",Response:"+ri(e)||e.response||"":n}function x(n,e){var t=c._buffer,r=Sn(),i=new XDomainRequest,r=(i.onload=function(){return c._xdrOnLoad(i,n)},i.onerror=function(e){return c._onError(n,C(i),e)},r&&r.location&&r.location.protocol||"");if(c._senderConfig.endpointUrl().lastIndexOf(r,0))return q(c.diagLog(),2,40,". Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol."),void t.clear();r=c._senderConfig.endpointUrl().replace(/^(https?:)/,""),i.open("POST",r),r=t.batchPayloads(n);i.send(r),t.markAsSent(n)}function C(e,n){return e?"XDomainRequest,Response:"+ri(e)||"":n}function _(e,n){var t="getNotifyMgr",t=c.core[t]?c.core[t]():c.core._notificationManager;if(t&&t.eventsSendRequest)try{t.eventsSendRequest(e,n)}catch(r){q(c.diagLog(),1,74,"send request notification failed: "+j(r),{exception:K(r)})}}function t(){c._sender=null,c._buffer=null,c._appId=null,c._sample=null,T=!(E={}),D=N=I=0,L=A=F=w=r=b=R=null}t(),c.pause=function(){h(),T=!0},c.resume=function(){T&&(T=!1,b=null,c._buffer.size()>c._senderConfig.maxBatchSizeInBytes()&&c.triggerSend(!0,null,10),v())},c.flush=function(e,n,t){if(void 0===e&&(e=!0),!T){h();try{c.triggerSend(e,null,t||1)}catch(r){q(c.diagLog(),1,22,"flush failed, telemetry will not be collected: "+j(r),{exception:K(r)})}}},c.onunloadFlush=function(){if(!T)if(!1!==c._senderConfig.onunloadDisableBeacon()&&!1!==c._senderConfig.isBeaconApiDisabled()||!bn())c.flush();else try{c.triggerSend(!0,n,2)}catch(e){q(c.diagLog(),1,20,"failed to flush with beacon sender on page unload, telemetry will not be collected: "+j(e),{exception:K(e)})}},c.addHeader=function(e,n){E[e]=n},c.initialize=function(e,n,t,r){c.isInitialized()&&q(c.diagLog(),1,28,"Sender is already initialized"),a.initialize(e,n,t,r);var i=c._getTelCtx(),o=c.identifier,t=(w=new Gr(n.logger),b=null,I=0,c._sender=null,N=0,c.diagLog()),r=(L=bt(Gn("Sender"),n.evtNamespace&&n.evtNamespace()),R=function(e){var n,t=xn(),r=_n(),i=!1,o=!0,a=bt(Gn("OfflineListener"),e);try{s(Sn())&&(i=!0),(i=!!(t&&(n=t.body||t).ononline&&s(n))||i)&&r&&!B(r.onLine)&&(o=r.onLine)}catch(l){i=!1}function s(e){var n=!1;return e&&(n=Tt(e,"online",u,a))&&Tt(e,"offline",c,a),n}function u(){o=!0}function c(){o=!1}return{isOnline:function(){var e=!0;return i?e=o:r&&!B(r.onLine)&&(e=r.onLine),e},isListening:function(){return i},unload:function(){var e=Sn();e&&i&&(Zr(e,a),t&&!Se((e=t.body||t).ononline)&&Zr(e,a),i=!1)}}}(L),P(ii(),function(e,n){c._senderConfig[e]=function(){return i.getConfig(o,e,n())}}),c._buffer=new(c._senderConfig.enableSessionStorageBuffer()&&Vt()?zr:Ur)(t,c._senderConfig),c._sample=new ni(c._senderConfig.samplingPercentage(),t),!B(e.disableInstrumentationKeyValidation)&&e.disableInstrumentationKeyValidation||/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/.test(e.instrumentationKey)||q(t,1,100,"Invalid Instrumentation key "+e.instrumentationKey),!Zt(c._senderConfig.endpointUrl())&&c._senderConfig.customHeaders()&&0<c._senderConfig.customHeaders().length&&O(c._senderConfig.customHeaders(),function(e){M.addHeader(e.header,e.value)}),c._senderConfig),n=null;!r.disableXhr()&&wn()?n=x:!r.disableXhr()&&Nn()&&(n=f),!n&&Tn()&&(n=p),F=n||f,!r.isBeaconApiDisabled()&&bn()&&(n=u),c._sender=n||f,A=!r.onunloadDisableFetch()&&Tn(!0)?d:bn()?u:!r.disableXhr()&&wn()?x:!r.disableXhr()&&Nn()?f:F},c.processTelemetry=function(e,t){t=c._getTelCtx(t);try{if(c._senderConfig.disableTelemetry())return;if(!e)return void q(t.diagLog(),1,7,"Cannot send empty telemetry");if(e.baseData&&!e.baseType)return void q(t.diagLog(),1,70,"Cannot send telemetry without baseData and baseType");if(e.baseType||(e.baseType="EventData"),!c._sender)return void q(t.diagLog(),1,28,"Sender was not initialized");if(!c._sample.isSampledIn(e))return void q(t.diagLog(),2,33,"Telemetry item was sampled out and not sent",{SampleRate:c._sample.sampleRate});e[Pt]=c._sample.sampleRate;var n=c._senderConfig.convertUndefined()||undefined,r=e.iKey||c._senderConfig.instrumentationKey(),i=si.constructEnvelope(e,r,t.diagLog(),n);if(!i)return void q(t.diagLog(),1,47,"Unable to create an AppInsights envelope");var o=!1;if(e.tags&&e.tags[Ut]&&(O(e.tags[Ut],function(e){try{e&&!1===e(i)&&(o=!0,kn(t.diagLog(),"Telemetry processor check returns false"))}catch(n){q(t.diagLog(),1,64,"One of telemetry initializers failed, telemetry item will not be sent: "+j(n),{exception:K(n)},!0)}}),delete e.tags[Ut]),o)return;var a=w.serialize(i),s=c._buffer;s.size()+a.length>c._senderConfig.maxBatchSizeInBytes()&&c.triggerSend(!0,null,10),s.enqueue(a),v()}catch(u){q(t.diagLog(),2,12,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+j(u),{exception:K(u)})}c.processNext(e,t)},c._xhrReadyStateChange=function(e,n,t){4===e.readyState&&l(e.status,n,e.responseURL,t,S(e),ri(e)||e.response)},c.triggerSend=function(e,n,t){if(void 0===e&&(e=!0),!T)try{var r,i=c._buffer;c._senderConfig.disableTelemetry()?i.clear():0<i.count()&&(r=i.getItems(),_(t||0,e),n?n.call(M,r,e):c._sender(r,e)),h()}catch(o){i=function(e){var n=((e=(e=void 0===e?null:e)?e:(n=_n()||{})?(n.userAgent||k).toLowerCase():k)||k).toLowerCase();if(Ce(n,ln))return e=xn()||{},Math.max(parseInt(n.split(ln)[1]),e.documentMode||0);if(Ce(n,fn)){e=parseInt(n.split(fn)[1]);if(e)return e+4}return null}();(!i||9<i)&&q(c.diagLog(),1,40,"Telemetry transmission failed, some telemetry will be lost: "+j(o),{exception:K(o)})}},c._doTeardown=function(e,n){c.onunloadFlush(),R.unload(),t()},c._onError=function(e,n,t){q(c.diagLog(),2,26,"Failed to send telemetry.",{message:n}),c._buffer.clearSent(e)},c._onPartialSuccess=function(e,n){for(var t=[],r=[],i=0,o=n.errors.reverse();i<o.length;i++){var a=o[i],s=e.splice(a.index,1)[0];(y(a.statusCode)?r:t).push(s)}0<e.length&&c._onSuccess(e,n.itemsAccepted),0<t.length&&c._onError(t,S(null,["partial success",n.itemsAccepted,"of",n.itemsReceived].join(" "))),0<r.length&&(m(r),q(c.diagLog(),2,40,"Partial success. Delivered: "+e.length+", Failed: "+t.length+". Will retry to send "+r.length+" our of "+n.itemsReceived+" items"))},c._onSuccess=function(e,n){c._buffer.clearSent(e)},c._xdrOnLoad=function(e,n){var t=ri(e);!e||t+""!="200"&&""!==t?(t=g(t))&&t.itemsReceived&&t.itemsReceived>t.itemsAccepted&&!c._senderConfig.isRetryDisabled()?c._onPartialSuccess(n,t):c._onError(n,C(e)):(I=0,c._onSuccess(n,0))}}),M}N.Sender=Lr;r=N,Mr="__esModule",d={value:!0},C=Object.defineProperty;if(C)try{return void C(r,Mr,d)}catch(di){}typeof d.value!==undefined&&(r[Mr]=d.value)};"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(((e="undefined"!=typeof globalThis?globalThis:e||self).Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights=e.Microsoft.ApplicationInsights||{}));
|
|
6
6
|
//# sourceMappingURL=applicationinsights-channel-js.min.js.map
|