@microsoft/applicationinsights-channel-js 2.8.4 → 2.8.5-nightly.2206-04
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 +10 -5
- 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.api.json +52 -23
- package/dist/applicationinsights-channel-js.d.ts +1 -1
- package/dist/applicationinsights-channel-js.js +10 -5
- 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 +2 -2
- 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 +11 -1
- package/dist-esm/SendBuffer.js.map +1 -1
- package/dist-esm/Sender.js +1 -1
- package/dist-esm/Serializer.js +6 -1
- 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 +57 -54
- package/src/EnvelopeCreator.ts +1 -1
- package/types/tsdoc-metadata.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Application Insights JavaScript SDK - Channel, 2.8.
|
|
2
|
+
* Application Insights JavaScript SDK - Channel, 2.8.5-nightly.2206-04
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
|
-
var e=this,n=function(N){"use strict";var E="function",L="object",R="undefined",o="prototype",A="hasOwnProperty",t=Object,D=t[o],M=t.assign,k=t.create,e=t.defineProperty,H=D[A],V=null;function X(e){return void 0===e&&(e=!0),V&&e||(typeof globalThis!==R&&globalThis&&(V=globalThis),typeof self!==R&&self&&(V=self),typeof window!==R&&window&&(V=window),typeof global!==R&&global&&(V=global)),V}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])D[A].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[A](t)&&(e[t]=n[t])})(e,n)};function G(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(k)return k(e);if(null==e)return{};var n=typeof e;function t(){}return n!==L&&n!==E&&Y("Object prototype may only be an Object:"+e),t[o]=e,new t}(n):(t[o]=n[o],new t)}var F="",$="isInitialized",Z="teardown",W="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=D[oe],pe=H[oe],ge=pe.call(t),me=/-([a-z])/g,ve=/([^\w\d_$])/g,he=/^(\d+[\w\d_$])/,ye=Object.getPrototypeOf;function xe(e){return e===undefined||typeof e===R}function P(e){return null===e||xe(e)}function p(e){return!(!e||typeof e!==L)}function g(e){return!(!e||typeof e!==E)}function _e(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 U(e,n){if(e)for(var t in e)H.call(e,t)&&n.call(e,t,e[t])}function be(e,n){return!(!e||!n||!~e.indexOf(n))}var B=n||function(e){return!(!e||"[object Array]"!==de.call(e))};function Ce(e){return e&&"[object Error]"===de.call(e)}function v(e){return"string"==typeof e}function Se(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]&&H.call(e,ae)?e[ae]:e)===E&&pe.call(e)===ge)}function Ie(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 we(e,n,t){if(e){if(e[re])return e[re](n,t);var r=e.length,t=t||0;try{for(var i=Math.max(0<=t?t:r-Math.abs(t),0);i<r;i++)if(i in e&&e[i]===n)return i}catch(o){}}return-1}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 Ne(e){return e&&(le&&e[ie]?e[ie]():e.replace?e.replace(/^\s+|\s+$/g,""):e)}var Ee=!{toString:null}.propertyIsEnumerable("toString"),Le=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];function Re(e){var n=typeof e;if(n===E||n===L&&null!==e||Y("objKeys called on non-object"),!Ee&&ce)return ce(e);var t,r=[];for(t in e)e&&H.call(e,t)&&r.push(t);if(Ee)for(var i=Le.length,o=0;o<i;o++)e&&H.call(e,Le[o])&&r.push(Le[o]);return r}function Ae(e){return ue&&U(e,function(e,n){(B(n)||p(n))&&ue(n)}),De(e)}var De=ue||function(e){return e};function Me(){var e=Date;return e.now?e.now():(new e).getTime()}function q(e){return Ce(e)?e.name:F}function ke(e,n,t,r,i){var o=t;!e||(o=e[n])===t||i&&!i(o)||r&&!r(t)||(e[n]=o=t)}function Fe(e){return!!e}function Pe(e){return e&&M?t(M({},e)):e}function Ue(e){var t={};return U(e,function(e,n){t[e]=n,t[n]=e}),Ae(t)}var Be="constructor",m="prototype",Oe="function",qe="_dynInstFuncs",ze="_isDynProxy",Ke="_dynClass",je="_dynInstChk",He=je,Ve="_dfOpts",Xe="_unknown_",Ye="__proto__",Je="_dyn"+Ye,Ge="_dynInstProto",$e="useBaseInst",Ze="setInstFuncs",We=Object,Qe=We.getPrototypeOf,en=We.getOwnPropertyNames,nn=0;function h(e,n){return e&&We[m].hasOwnProperty.call(e,n)}function tn(e){return e&&(e===We[m]||e===Array[m])}function rn(e){return tn(e)||e===Function[m]}function on(e){if(e){if(Qe)return Qe(e);var n=e[Ye]||e[m]||(e[Be]?e[Be][m]:null),t=e[Je]||n;h(e,Je)||(delete e[Ge],t=e[Je]=e[Ge]||e[Je],e[Ge]=n)}return t}function an(e,n){var t=[];if(en)t=en(e);else for(var r in e)"string"==typeof r&&h(e,r)&&t.push(r);if(t&&0<t.length)for(var i=0;i<t.length;i++)n(t[i])}function sn(e,n,t){return n!==Be&&typeof e[n]===Oe&&(t||h(e,n))}function un(e){throw new TypeError("DynamicProto: "+e)}function cn(e,n){for(var t=e.length-1;0<=t;t--)if(e[t]===n)return 1}function ln(e,n){return h(e,m)?e.name||n||Xe:((e||{})[Be]||{}).name||n||Xe}function y(e,r,n,t){h(e,m)||un("theClass is an invalid class definition.");var i,o,a,s,u,c,l=e[m],f=(function(e){if(!Qe)return 1;for(var n=[],t=on(r);t&&!rn(t)&&!cn(n,t);){if(t===e)return 1;n.push(t),t=on(t)}}(l)||un("["+ln(e)+"] is not in class hierarchy of ["+ln(r)+"]"),null),e=(h(l,Ke)?f=l[Ke]:(f="_dynCls$"+ln(e,"_")+"$"+nn,nn++,l[Ke]=f),y[Ve]),d=!!e[$e],p=(d&&t&&t[$e]!==undefined&&(d=!!t[$e]),o={},an(i=r,function(e){!o[e]&&sn(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[ze]&&o&&!1!==(r=e[qe]||{})[He]&&(i=(r[n[Ke]]||{})[t]||i),function(){return i.apply(e,arguments)}}for(var i={},a=(an(t,function(e){i[e]=r(n,t,e)}),on(e)),s=[];a&&!rn(a)&&!cn(s,a);)an(a,function(e){!i[e]&&sn(a,e,!Qe)&&(i[e]=r(n,a,e))}),s.push(a),a=on(a);return i}(l,r,p,d)),!!Qe&&!!e[Ze]);a=l,n=f,s=r,u=p,e=!1!==(d=d&&t?!!t[Ze]:d),tn(a)||(l=s[qe]=s[qe]||{},c=l[n]=l[n]||{},!1!==l[He]&&(l[He]=!!e),an(s,function(e){var t,r,i;sn(s,e,!1)&&s[e]!==u[e]&&(c[e]=s[e],delete s[e],h(a,e)&&(!a[e]||a[e][ze])||(a[e]=(t=a,r=e,(i=function(){var e,n;return(function(e,n,t,r){var i=null;if(e&&h(t,Ke)){var o=e[qe]||{};if((i=(o[t[Ke]]||{})[n])||un("Missing ["+n+"] "+Oe),!i[je]&&!1!==o[He]){for(var a=!h(e,n),s=on(e),u=[];a&&s&&!rn(s)&&!cn(u,s);){var c=s[n];if(c){a=c===r;break}u.push(s),s=on(s)}try{a&&(e[n]=i),i[je]=1}catch(l){o[He]=!1}}}return i}(this,r,t,i)||(typeof(n=(n=t[e=r])===i?on(t)[e]:n)!==Oe&&un("["+e+"] is not a "+Oe),n)).apply(this,arguments)})[ze]=1,i)))}))}y[Ve]={setInstFuncs:!0,useBaseInst:!0};var fn="window",dn="navigator",pn="console",gn="JSON",mn="msie",vn="trident/",hn="XMLHttpRequest",yn=null,xn=null,_n=null,bn=null;function Cn(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=!xe((new e)[n])}catch(i){}}return r}function c(e){var n=X();return n&&n[e]?n[e]:e===fn&&Sn()?window:null}function Sn(){return typeof window===L&&window}function In(){return Sn()?window:c(fn)}function wn(){return typeof document===L&&document?document:c("document")}function Tn(){return!(typeof navigator!==L||!navigator)}function Nn(){return Tn()?navigator:c(dn)}function En(){return typeof JSON===L&&JSON||null!==c(gn)}function z(){return En()?JSON||c(gn):null}function K(e){var n=Object[o].toString.call(e),t=F;return"[object Error]"===n?t="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":En()&&(t=z().stringify(e)),n+t}function Ln(){return bn=null===bn?Tn()&&!!Nn().sendBeacon:bn}function Rn(e){var n=!1;try{var n=!!c("fetch"),t=c("Request");n&&e&&t&&(n=Cn(t,"keepalive"))}catch(r){}return n}function An(){return _n=null===_n&&(_n=typeof XDomainRequest!==R)&&Dn()?_n&&!Cn(c(hn),"withCredentials"):_n}function Dn(){var e=!1;try{e=!!c(hn)}catch(n){}return e}var Mn=null;function kn(e){return e?'"'+e.replace(/\"/g,F)+'"':F}function Fn(e,n){var t,r=typeof console!==R?console:c(pn);r&&(t="log",g(r[t=r[e]?e:t])&&r[t](n))}Un.dataType="MessageData";var Pn=Un;function Un(e,n,t,r){void 0===t&&(t=!1),this.messageId=e,this.message=(t?"AI: ":"AI (Internal): ")+e;t=F,En()&&(t=z().stringify(r)),e=(n?" message:"+kn(n):F)+(r?" props:"+kn(t):F);this.message+=e}function Bn(e,n){return(e||{}).logger||new On(n)}var On=function di(i){this.identifier="DiagnosticLogger",this.queue=[];var s=0,u={};y(di,this,function(o){function e(e,n){e=i[e];return P(e)?n:e}function a(e,n){var t,r=(t=(t=Mn)||!0===i.disableDbgExt?t:Mn||(r=c("Microsoft"),Mn=r?r.ApplicationInsights:Mn))?t.ChromeDbgExt:null;r&&r.diagLog&&r.diagLog(e,n)}P(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 Pn(n,t,i=void 0!==i&&i,r);if(o.enableDebugExceptions())throw K(n);t=1===e?"errorToConsole":"warnToConsole";xe(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 Pn(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 j(e,n,t,r,i,o){void 0===o&&(o=!1),(e||new On).throwInternal(n,t,r,i,o)}function qn(e,n){(e||new On).warnToConsole(n)}s.ParentContextKey="parent",s.ChildrenContextKey="childEvts";var zn=s;function s(e,i,n){var r,o=this,a=!1;o.start=Me(),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(B(n))for(var t=0;t<n.length;t++){var r=n[t];r&&(e+=r.time)}o.time=Me()-o.start,o.exTime=o.time-e,o.complete=function(){},!a&&g(i)&&(o.payload=i())}}var Kn="CoreUtils.doPerf";function jn(e,n,t,r,i){if(e)if(e=g(e.getPerfMgr)?e.getPerfMgr():e){var o,a=void 0,s=e.getCtx(Kn);try{if(a=e.create(n(),r,i))return s&&a.setCtx&&(a.setCtx(zn.ParentContextKey,s),s.getCtx&&s.setCtx&&((o=s.getCtx(zn.ChildrenContextKey))||(o=[],s.setCtx(zn.ChildrenContextKey,o)),o.push(a))),e.setCtx(Kn,a),t(a)}catch(u){a&&a.setCtx&&a.setCtx("exception",u)}finally{a&&e.fire(a),e.setCtx(Kn,s)}}t()}var Hn=4294967296,Vn=4294967295,Xn=!1,Yn=123456789,Jn=987654321;function Gn(e){var n,t=0,r=c("crypto")||c("msCrypto");if(0===(t=r&&r.getRandomValues?r.getRandomValues(new Uint32Array(1))[0]&Vn:t)&&(!(r=Nn())||r.userAgent===xn&&null!==yn||(r=((xn=r.userAgent)||F).toLowerCase(),yn=be(r,mn)||be(r,vn)),yn)){if(!Xn)try{var i=2147483647&Me();(n=(Math.random()*Hn^i)+i)<0&&(n>>>=0),Yn=123456789+n&Vn,Jn=987654321-n&Vn,Xn=!0}catch(o){}r=((Jn=36969*(65535&Jn)+(Jn>>16)&Vn)<<16)+(65535&(Yn=18e3*(65535&Yn)+(Yn>>16)&Vn))>>>0&Vn|0,t=(r>>>=0)&Vn}return 0===t&&(t=Math.floor(Hn*Math.random()|0)),e||(t>>>=0),t}var $n=e,Zn="."+function(e){void 0===e&&(e=22);for(var n=Gn()>>>0,t=0,r=F;r.length<e;)r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[0|63&n]||"",n>>>=6,5==++t&&(n=(Gn()<<2&4294967295|3&n)>>>0,t=0);return r}(6),Wn=0;function Qn(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType}function et(e,n){return _e(e+Wn+++((n=void 0!==n&&n)?".2.8.4":"")+Zn)}function nt(e){var o={id:et("_aiData-"+(e||"")+".2.8.4"),accept:Qn,get:function(e,n,t,r){var i=e[o.id];return i?i[_e(n)]:(r&&((i=function(e,n){var t=n[e.id];if(!t){t={};try{Qn(n)&&!function(e,n,t){if($n)try{return $n(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))[_e(n)]=t),t)},kill:function(e,n){if(e&&e[n])try{delete e[n]}catch(t){}}};return o}var tt="attachEvent",rt="addEventListener",it="detachEvent",ot="removeEventListener",at="events",st=(et("aiEvtPageHide"),et("aiEvtPageShow"),/\.[\.]+/g),ut=/[\.]+$/,ct=1,lt=nt("events"),ft=/^([^.]*)(?:\.(.+)|)/;function dt(e){return e&&e.replace?e.replace(/^\s*\.*|\.*\s*$/g,""):e}function pt(e,n){n&&(t="",B(n)?(t="",O(n,function(e){(e=dt(e))&&("."!==e[0]&&(e="."+e),t+=e)})):t=dt(n),t&&(e=(e||"")+(t="."!==t[0]?"."+t:t)));var t,n=ft.exec(e||"")||[];return{type:n[1],ns:(n[2]||"").replace(st,".").replace(ut,"").split(".").sort().join(".")}}function gt(e,n,t){e=lt.get(e,at,{},t=void 0===t||t);return e[n]||(e[n]=[])}function mt(e,n,t,r){e&&n&&n.type&&(e[ot]?e[ot](n.type,t,r):e[it]&&e[it]("on"+n.type,t))}function vt(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)||(mt(e,o.evtName,o.handler,o.capture),n.splice(i,1))}}function ht(e,n){return n?pt("xx",B(n)?[e].concat(n):[e,n]).ns.split("."):e}function yt(e,n,t,r,i){void 0===i&&(i=!1);var o,a=!1;if(e)try{var s,u=pt(n,r),c=u,l=t,f=i,d=!1;(o=e)&&c&&c.type&&l&&(o[rt]?(o[rt](c.type,l,f),d=!0):o[tt]&&(o[tt]("on"+c.type,l),d=!0)),(a=d)&<.accept(e)&&(s={guid:ct++,evtName:u,handler:t,capture:i},gt(e,u.type).push(s))}catch(p){}return a}var xt=nt("plugin");function _t(e){return xt.get(e,"state",{},!0)}var bt="TelemetryPluginChain",Ct="_hasRun",St="_getTelCtx",It=0;function wt(e,a,t,n){var r=null,i=[],o=(null!==n&&(r=n?function(e,n,t){for(;e;){if(e.getPlugin()===t)return e;e=e.getNext()}return Nt([t],n.config||{},n)}(e,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){j(t.logger,2,73,"Unexpected Exception during onComplete - "+K(n))}}),i=[]),n},ctx:{core:function(){return t},diagLog:function(){return Bn(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&&!P(e[n])?r=e[n]:a&&!P(a[n])&&(r=a[n]),P(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:xe(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=B(c),f=p(c);for(o in c)(l&&o in c||f&&H.call(c,o))&&(a=c[o],s=void 0,r&&a&&((s=B(a))||Se(a))&&(u=n[o],s?B(u)||(u=[]):Se(u)||(u={}),a=d(r,u,a)),a!==undefined&&(n[o]=a))}return n}(!0,n,r),a&&2===t&&U(n,function(e){var n;P(o[e])&&!P(n=a[e])&&(o[e]=n)}),r=o):r=n,r}return o}function Tt(e,t,r,n){var i=wt(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 Tt((e=B(e=void 0===e?null:e)?Nt(e,t,r,n):e)||o.getNext(),t,r,n)},o}function Nt(e,n,t,r){var i,o=null,a=!r;return B(e)&&0<e.length&&(i=null,O(e,function(e){(a=!a&&r===e||a)&&e&&g(e.processTelemetry)&&(e=Et(e,n,t),o=o||e,i&&i._setNext(e),i=e)})),r&&!o?Nt([r],n,t):o}function Et(u,r,i){var c=null,o=g(u.processTelemetry),a=g(u.setNextPlugin),l=u?u.identifier+"-"+u.priority+"-"+It++:"Unknown-0-"+It++,s={getPlugin:function(){return u},getNext:function(){return c},processTelemetry:function(t,e){var n;f(e=e||(n=(n=u&&g(u[St])?u[St]():n)||Tt(s,r,i)),function(e){if(!u||!o)return!1;var n=_t(u);return!n.teardown&&!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=_t(u),n=u[W]||e.core,!u||n&&n!==r[W]()||e[Z]||(e[W]=null,e[Z]=!0,e[$]=!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=_t(u),n=u[W]||e.core,!u||n&&n!==r[W]()||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:bt,s=(s=t[Ct])||(t[Ct]={});return t.setNext(c),u&&jn(t[W](),function(){return a+":"+i},function(){s[l]=!0;try{var e=c?c._id:F;e&&(s[e]=!1),o=r(t)}catch(n){e=!c||s[c._id];e&&(o=!0),c&&e||j(t.diagLog(),1,73,"Plugin ["+a+"] failed during "+i+" - "+K(n)+", run flags: "+K(s))}},e,n),o}return De(s)}function Lt(){var n=[];return{add:function(e){e&&n.push(e)},run:function(t,r){O(n,function(e){try{e(t,r)}catch(n){j(t.diagLog(),2,73,"Unexpected error calling unload handler - "+K(n))}}),n=[]}}}var Rt,x="getPlugin",oe=function pi(){var o,i,l,f,d,a=this;function n(e){var n,e=e=void 0===e?null:e;return e||(n=i||Tt(null,{},a.core),e=l&&l[x]?n.createNew(null,l[x]):n.createNew(null,l)),e}function u(e,n,t){e&&ke(e,"extensionConfig",[],null,P),!t&&n&&(t=n.getProcessTelContext().getNext());var r=l;l&&l[x]&&(r=l[x]()),a.core=n,i=Tt(t,e,n,r)}function p(){o=!1,a.core=null,l=i=null,d=[],f=Lt()}p(),y(pi,a,function(c){var e,n,t,r,i;c.initialize=function(e,n,t,r){u(e,n,r),o=!0},c.teardown=function(e,n){var t,r,i,o,a=c.core;if(a&&(!e||a===e.core()))return r=!1,i=e||function u(e,t,n){var r=t.config||{},i=wt(e,r,t,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 u((e=B(e=void 0===e?null:e)?Nt(e,r,t,n):e)||o.getNext(),t,n)},o}(null,a,l&&l[x]?l[x]():l),o=n||{reason:0,isAsync:!1},c[ne]&&!0===c[ne](i,o,s)?t=!0:s(),t;function s(){r||(r=!0,f.run(i,n),O(d,function(e){e.rm()}),d=[],!0===t&&i.processNext(o),p())}},c.update=function(e,n){var t,r,i,o=c.core;if(o&&(!e||o===e.core()))return r=!1,i=e||function s(e,t,n){var r=t.config||{},i=wt(e,r,t,n).ctx;return i.processNext=function(n){return i.iterate(function(e){g(e.update)&&e.update(i,n)})},i.createNew=function(e,n){return s((e=B(e=void 0===e?null:e)?Nt(e,r,t,n):e)||i.getNext(),t,n)},i}(null,o,l&&l[x]?l[x]():l),c._doUpdate&&!0===c._doUpdate(i,n||{reason:0},a)?t=!0:a(),t;function a(){r||(r=!0,u(i.getCfg(),i.core(),i.getNext()))}},c._addHook=function(e){e&&(B(e)?d=d.concat(e):d.push(e))},t="_addUnloadCb",n=function(){return f},(e=c)&&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[$]=function(){return o},a.setInitialized=function(e){o=e},a.setNextPlugin=function(e){l=e},a.processNext=function(e,n){n?n.processNext(e):l&&g(l.processTelemetry)&&l.processTelemetry(e,null)},a._getTelCtx=n},At=(Rt={},U({requestContextHeader:[0,"Request-Context"],requestContextTargetKey:[1,"appId"],requestContextAppIdFormat:[2,"appId=cid-v1:"],requestIdHeader:[3,"Request-Id"],traceParentHeader:[4,"traceparent"],traceStateHeader:[5,"tracestate"],sdkContextHeader:[6,"Sdk-Context"],sdkContextHeaderAppIdRequest:[7,"appId"],requestContextHeaderLowerCase:[8,"request-context"]},function(e,n){Rt[e]=n[1],Rt[n[0]]=n[1]}),Ae(Rt));function Dt(e,n,t){var r,i,o=n.length,a=(e=e,(n=n)&&150<(n=Ne(n.toString())).length&&(i=n.substring(0,150),j(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 _(e,n,t){var r;return void 0===t&&(t=1024),n&&(t=t||1024,(n=Ne(n)).toString().length>t&&(r=n.toString().substring(0,t),j(e,2,61,"string value is too long. It has been truncated to "+t+" characters.",{value:n},!0))),r||n}function Mt(e,n){return Ut(e,n,2048,66)}function kt(e,n){var t;return n&&32768<n.length&&(t=n.substring(0,32768),j(e,2,56,"message is too long, it has been truncated to 32768 characters.",{message:n},!0)),t||n}function Ft(r,e){var i;return e&&(i={},U(e,function(e,n){if(p(n)&&En())try{n=z().stringify(n)}catch(t){j(r,2,49,"custom property is not valid",{exception:t},!0)}n=_(r,n,8192),e=Dt(r,e,i),i[e]=n}),e=i),e}function Pt(t,e){var r;return e&&(r={},U(e,function(e,n){e=Dt(t,e,r),r[e]=n}),e=r),e}function Ut(e,n,t,r){var i;return n&&(n=Ne(n)).length>t&&(i=n.substring(0,t),j(e,2,r,"input is too long, it has been truncated to "+t+" characters.",{data:n},!0)),i||n}var Bt="";function Ot(e){var n=Bt+Math.floor((e=Math.round(e=isNaN(e)||e<0?0:e))/1e3)%60,t=Bt+Math.floor(e/6e4)%60,r=Bt+Math.floor(e/36e5)%24,i=Math.floor(e/864e5),e=1===(e=Bt+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+".":Bt)+r+":"+t+":"+n+"."+e}var qt="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",zt="sampleRate",Kt="ProcessLegacy",jt="http.method",l="not_specified",Ht=Ue({LocalStorage:0,SessionStorage:1}),Vt=(Ue({AI:0,AI_AND_W3C:1,W3C:2}),undefined);function Xt(e){try{if(P(X()))return null;var n=(new Date).toString(),t=c(e===Ht.LocalStorage?"localStorage":"sessionStorage"),r=(t.setItem(n,n),t.getItem(n)!==n);if(t.removeItem(n),!r)return t}catch(i){}return null}function Yt(){return Jt()?Xt(Ht.SessionStorage):null}function Jt(e){return Vt=e||Vt===undefined?!!Xt(Ht.SessionStorage):Vt}function Gt(e,n){var t=Yt();if(null!==t)try{return t.getItem(n)}catch(r){Vt=!1,j(e,2,2,"Browser failed read of session storage. "+q(r),{exception:K(r)})}return null}function $t(e,n,t){var r=Yt();if(null!==r)try{r.setItem(n,t)}catch(i){Vt=!1,j(e,2,4,"Browser failed write to session storage. "+q(i),{exception:K(i)})}}var Zt=wn()||{},Wt=0,Qt=[null,null,null,null,null];var er=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"];function nr(e){return-1!==we(er,e.toLowerCase())}var tr=function(e,n,t){var r=this,i=this;i.ver=1,i.sampleRate=100,i.tags={},i.name=_(e,t)||l,i.data=n,i.time=Ie(new Date),i.aiDataContract={time:1,iKey:1,name:1,sampleRate:function(){return 100===r.sampleRate?4:1},tags:1,data:1}},rr=(ir.envelopeType="Microsoft.ApplicationInsights.{0}.Event",ir.dataType="EventData",ir);function ir(e,n,t,r){this.aiDataContract={ver:1,name:1,properties:0,measurements:0},this.ver=2,this.name=_(e,n)||l,this.properties=Ft(e,t),this.measurements=Pt(e,r)}var or="error",u="stack",ar="stackDetails",sr="errorSrc",ur="message",cr="description";function lr(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 fr(e,n){var t=e;return e&&((t=t&&!v(t)&&(e[ur]||e[cr])||t)&&!v(t)&&(t=lr(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 dr(e){return e&&e.src&&v(e.src)&&e.obj&&B(e.obj)}function pr(e){var e=e||"",n=(e=v(e)?e:v(e[u])?e[u]:""+e).split("\n");return{src:e,obj:n}}function gr(e){var n,t=null;if(e)try{e[u]?t=pr(e[u]):e[or]&&e[or][u]?t=pr(e[or][u]):e.exception&&e.exception[u]?t=pr(e.exception[u]):dr(e)?t=e:dr(e[ar])?t=e[ar]:window&&window.opera&&e[ur]?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=pr(e):(n=e[ur]||e[cr]||"",v(e[sr])&&(n&&(n+="\n"),n+=" from "+e[sr]),n&&(t=pr(n)))}catch(r){t=pr(r)}return t||{src:"",obj:null}}function mr(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 vr(e){if(e)try{var n,t;if(!v(e))return n=mr(e),(t=lr(e,!1))&&"{}"!==t||(e[or]&&(n=mr(e=e[or])),t=lr(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=mr(i||o||e);return{message:fr(e,u),url:n,lineNumber:t,columnNumber:r,error:vr(i||o||e),evt:vr(o||e),typeName:u,stackDetails:gr(a||i||o),errorSrc:s}},a.CreateFromInterface=function(n,e,t,r){var i=e.exceptions&&Te(e.exceptions,function(e){return yr.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=vr;var hr=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),P(n.isManual)||(a.isManual=n.isManual)):(a.exceptions=[new yr(e,n,t=t||{})],a.properties=Ft(e,t),a.measurements=Pt(e,r),i&&(a.severityLevel=i),o&&(a.id=o))}xr.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}},xr.CreateFromInterface=function(e,n){var t=n.parsedStack instanceof Array&&Te(n.parsedStack,function(e){return _r.CreateFromInterface(e)})||n.parsedStack;return new xr(e,f(f({},n),{parsedStack:t}))};var yr=xr;function xr(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,Ce(o)||(o=o[or]||r||o),s.typeName=_(e,mr(o))||l,s.message=kt(e,fr(n||o,s.typeName))||l,c=n[ar]||gr(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();_r.regex.test(e)&&(e=new _r(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),j(r,2,52,"exception is too long, it has been truncated to 32768 characters.",{exception:e},!0)),i||e),s.hasFullStack=B(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 _r=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=Ne(t),r.fileName="",r.line=0,(n=t.match(i.regex))&&5<=n.length&&(r.method=Ne(n[2])||r.method,r.fileName=Ne(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 br=function(){this.aiDataContract={name:1,kind:0,value:1,count:0,min:0,max:0,stdDev:0},this.kind=0},Cr=(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 br;c.count=0<r?r:undefined,c.max=isNaN(o)||null===o?undefined:o,c.min=isNaN(i)||null===i?undefined:i,c.name=_(e,n)||l,c.value=t,c.stdDev=isNaN(a)||null===a?undefined:a,this.metrics=[c],this.properties=Ft(e,s),this.measurements=Pt(e,u)}wr.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",wr.dataType="PageviewData";var Ir=wr;function wr(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&&Ut(e,a,128,69).toString(),s.url=Mt(e,t),s.name=_(e,n)||l,isNaN(r)||(s.duration=Ot(r)),s.properties=Ft(e,i),s.measurements=Pt(e,o)}Nr.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",Nr.dataType="RemoteDependencyData";var Tr=Nr;function Nr(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=Ot(i),m.success=o,m.resultCode=a+"",m.type=_(e,u),n=e,i=s,u=a=o=r,a=(s=t)&&0<s.length?(d=s,g=(t=Qt)[p=Wt],Zt.createElement?t[p]||(g=t[p]=Zt.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),Wt=p,p=(t=g).host,a||(null!=t.pathname?("/"!=((g=0===t.pathname.length?"/":t.pathname)[0]||"")&&(g="/"+g),u=t.pathname,_(n,i?i+" "+g:g)):_(n,s))):p=o,{target:p,name:a,data:u});m.data=Mt(e,r)||t.data,m.target=_(e,t.target),c&&(m.target="".concat(m.target," | ").concat(c)),m.name=_(e,t.name),m.properties=Ft(e,l),m.measurements=Pt(e,f)}Lr.envelopeType="Microsoft.ApplicationInsights.{0}.Message",Lr.dataType="MessageData";var Er=Lr;function Lr(e,n,t,r,i){this.aiDataContract={ver:1,message:1,severityLevel:0,properties:0};var o=this;o.ver=2,o.message=kt(e,n=n||l),o.properties=Ft(e,r),o.measurements=Pt(e,i),t&&(o.severityLevel=t)}Ar.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",Ar.dataType="PageviewPerformanceData";var Rr=Ar;function Ar(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=Mt(e,t),s.name=_(e,n)||l,s.properties=Ft(e,i),s.measurements=Pt(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 Dr=function(e,n){this.aiDataContract={baseType:1,baseData:1},this.baseType=e,this.baseData=n};function Mr(e){var n="ai."+e+".";return function(e){return n+e}}var kr,Fr,n=Mr("application"),e=Mr("device"),Pr=Mr("location"),r=Mr("operation"),Ur=Mr("session"),d=Mr("user"),b=Mr("cloud"),Br=Mr("internal"),Or=(Fr={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:Pr("ip"),locationCountry:Pr("country"),locationProvince:Pr("province"),locationCity:Pr("city"),operationId:r("id"),operationName:r("name"),operationParentId:r("parentId"),operationRootId:r("rootId"),operationSyntheticSource:r("syntheticSource"),operationCorrelationVector:r("correlationVector"),sessionId:Ur("id"),sessionIsFirst:Ur("isFirst"),sessionIsNew:Ur("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:b("name"),cloudRole:b("role"),cloudRoleVer:b("roleVer"),cloudRoleInstance:b("roleInstance"),cloudEnvironment:b("environment"),cloudLocation:b("location"),cloudDeploymentUnit:b("deploymentUnit"),internalNodeName:Br("nodeName"),internalSdkVersion:Br("sdkVersion"),internalAgentVersion:Br("agentVersion"),internalSnippet:Br("snippet"),internalSdkSrc:Br("sdkSrc")},G(qr,kr=function(){var t=this;U(Fr,function(e,n){t[e]=n})}),qr);function qr(){return kr.call(this)||this}var zr,C=new Or,n=function gi(t,r){var i=[],o=!1;this._get=function(){return i},this._set=function(e){return i=e},y(gi,this,function(n){n.enqueue=function(e){n.count()>=r.eventsLimitInMem()?o||(j(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}})},Kr=(G(jr,zr=n),jr);function jr(e,n){e=zr.call(this,e,n)||this;return y(jr,e,function(e,n){e.markAsSent=function(e){n.clear()},e.clearSent=function(e){}}),e}G(S,Hr=n),S.BUFFER_KEY="AI_buffer",S.SENT_BUFFER_KEY="AI_sentBuffer",S.MAX_BUFFER_SIZE=2e3;var Hr,Vr=S;function S(s,u){var e=Hr.call(this,s,u)||this,c=!1;return y(S,e,function(t,n){var e=o(S.BUFFER_KEY),r=o(S.SENT_BUFFER_KEY),r=t._set(e.concat(r));function i(n,e){var t=[];return O(e,function(e){g(e)||-1!==we(n,e)||t.push(e)}),t}function o(e){try{var e=u.namePrefix&&u.namePrefix()?u.namePrefix()+"_"+e:e,n=Gt(s,e);if(n){var t=z().parse(n);if((t=v(t)?z().parse(t):t)&&B(t))return t}}catch(r){j(s,1,42," storage key: "+e+", "+q(r),{exception:K(r)})}return[]}function a(e,n){try{var e=u.namePrefix&&u.namePrefix()?u.namePrefix()+"_"+e:e,t=JSON.stringify(n);$t(s,e,t)}catch(r){$t(s,e,JSON.stringify([])),j(s,2,41," storage key: "+e+", "+q(r)+". Buffer cleared",{exception:K(r)})}}r.length>S.MAX_BUFFER_SIZE&&(r.length=S.MAX_BUFFER_SIZE),a(S.SENT_BUFFER_KEY,[]),a(S.BUFFER_KEY,r),t.enqueue=function(e){t.count()>=S.MAX_BUFFER_SIZE?c||(j(s,2,67,"Maximum buffer size reached: "+t.count(),!0),c=!0):(n.enqueue(e),a(S.BUFFER_KEY,t._get()))},t.clear=function(){n.clear(),a(S.BUFFER_KEY,t._get()),a(S.SENT_BUFFER_KEY,[]),c=!1},t.markAsSent=function(e){a(S.BUFFER_KEY,t._set(i(e,t._get())));var n=o(S.SENT_BUFFER_KEY);n instanceof Array&&e instanceof Array&&((n=n.concat(e)).length>S.MAX_BUFFER_SIZE&&(j(s,1,67,"Sent buffer reached its maximum size: "+n.length,!0),n.length=S.MAX_BUFFER_SIZE),a(S.SENT_BUFFER_KEY,n))},t.clearSent=function(e){e=i(e,o(S.SENT_BUFFER_KEY));a(S.SENT_BUFFER_KEY,e)}}),e}var Xr="baseType",I="baseData",w="properties",Yr="true";function T(e,n,t){ke(e,n,t,Fe)}function Jr(e,t,r){P(e)||U(e,function(e,n){"number"==typeof n?r[e]=n:v(n)?t[e]=n:En()&&(t[e]=z().stringify(n))})}function Gr(t,r){P(t)||U(t,function(e,n){t[e]=n||r})}function $r(e,n,t,r){for(var r=new tr(e,r,n),n=(T(r,"sampleRate",t[zt]),(t[I]||{}).startTime&&(r.time=Ie(t[I].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&&(T(o,C.userAuthUserId,u.authId),T(o,C.userId,u.id||u.localId)),a.app),u=(u&&T(o,C.sessionId,u.sesId),a.device),u=(u&&(T(o,C.deviceId,u.id||u.localId),T(o,C.deviceType,u.deviceClass),T(o,C.deviceIp,u.ip),T(o,C.deviceModel,u.model),T(o,C.deviceType,u.deviceType)),e.ext.web),e=(u&&(T(o,C.deviceLanguage,u.browserLang),T(o,C.deviceBrowserVersion,u.browserVer),T(o,C.deviceBrowser,u.browser),T(e=(e=(e=i.data=i.data||{})[I]=e[I]||{})[w]=e[w]||{},"domain",u.domain),T(e,"isManual",u.isManual?Yr:null),T(e,"screenRes",u.screenRes),T(e,"userConsent",u.userConsent?Yr:null)),a.os),u=(e&&T(o,C.deviceOS,e.name),a.trace),c=(u&&(T(o,C.operationParentId,u.parentID),T(o,C.operationName,_(n,u.name)),T(o,C.operationId,u.traceID)),{}),l=s.length-1;0<=l;l--)U(s[l],function(e,n){c[e]=n}),s.splice(l,1);U(s,function(e,n){c[e]=n});e=f(f({},o),c);return e[C.internalSdkVersion]||(e[C.internalSdkVersion]="javascript:".concat(Wr.Version)),i.tags=Pe(e),t.tags=t.tags||[],Pe(r)}function Zr(e,n){P(n[I])&&j(e,1,46,"telemetryItem.baseData cannot be null.")}var Wr={Version:"2.8.4"};function Qr(e,n,t){Zr(e,n);var r={},i={},t=(n[Xr]!==rr.dataType&&(r.baseTypeSource=n[Xr]),n[Xr]===rr.dataType?(r=n[I][w]||{},i=n[I].measurements||{}):n[I]&&Jr(n[I],r,i),Jr(n.data,r,i),P(t)||Gr(r,t),n[I].name),t=new rr(e,t,r,i),r=new Dr(rr.dataType,t);return $r(e,rr.envelopeType,n,r)}var ei=function mi(f){y(mi,this,function(e){function c(a,s){var e="__aiCircularRefCheck",u={};if(!a)return j(f,1,48,"cannot serialize object because it is null or undefined",{name:s},!0),u;if(a[e])return j(f,2,50,"Circular reference detected while serializing object",{name:s},!0),u;if(a.aiDataContract)return a[e]=!0,U(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):j(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(B(a))u=l(a,s);else{j(f,2,49,"Attempting to serialize an object which does not implement ISerializable",{name:s},!0);try{z().stringify(a),u=a}catch(n){j(f,1,48,n&&g(n.toString)?n.toString():"Error serializing object",null,!0)}}return u}function l(e,n){if(e)if(B(e))for(var t=[],r=0;r<e.length;r++){var i=c(e[r],n+"["+r+"]");t.push(i)}else j(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={},U(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.",j(f,1,i[e],null,!0))})),i}e.serialize=function(e){e=c(e,"root");try{return z().stringify(e)}catch(n){j(f,1,48,n&&g(n.toString)?n.toString():"Error serializing object",null,!0)}}})};function ni(e,n){var t,r,i=void 0;if(void 0===i&&(i=!1),e)try{var o=pt(null,n),a=!1,s=e,u=function(e){return!(!o.ns&&null!==e.handler)&&(a=!0)};(t=o).type?vt(s,gt(s,t.type),t,u):(U(r=lt.get(s,at,{}),function(e,n){vt(s,n,t,u)}),0===Re(r).length&<.kill(s,at)),a||mt(e,o,null,i)}catch(c){}}ri.prototype.getHashCodeScore=function(e){return this.getHashCode(e)/ri.INT_MAX_VALUE*100},ri.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)},ri.INT_MAX_VALUE=2147483647;var ti=ri;function ri(){}var ii=function(){var n=new ti,t=new Or;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()}},oi=(ai.prototype.isSampledIn=function(e){var n=this.sampleRate;return null===n||n===undefined||100<=n||e.baseType===Cr.dataType||this.samplingScoreGenerator.getSamplingScore(e)<n},ai);function ai(e,n){this.INT_MAX_VALUE=2147483647;n=n||Bn(null);(100<e||e<0)&&(n.throwInternal(2,58,"Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.",{samplingRate:e},!0),e=100),this.sampleRate=e,this.samplingScoreGenerator=new ii}function si(e){try{return e.responseText}catch(n){}return null}function ui(){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={})[rr.dataType]=Qr,e[Er.dataType]=function(e,n,t){Zr(e,n);var r=n[I].message,i=n[I].severityLevel,o=n[I][w]||{},a=n[I].measurements||{},t=(Jr(n.data,o,a),P(t)||Gr(o,t),new Er(e,r,i,o,a)),r=new Dr(Er.dataType,t);return $r(e,Er.envelopeType,n,r)},e[Ir.dataType]=function(e,n,t){Zr(e,n);var r,i="duration",o=n[I],i=(P(o)||P(o[w])||P(o[w][i])?P(n.data)||P(n.data[i])||(r=n.data[i],delete n.data[i]):(r=o[w][i],delete o[w][i]),n[I]),o=(((n.ext||{}).trace||{}).traceID&&(a=n.ext.trace.traceID),i.id||a),a=i.name,s=i.uri,u=i[w]||{},c=i.measurements||{},i=(P(i.refUri)||(u.refUri=i.refUri),P(i.pageType)||(u.pageType=i.pageType),P(i.isLoggedIn)||(u.isLoggedIn=i.isLoggedIn.toString()),P(i[w])||U(i[w],function(e,n){u[e]=n}),Jr(n.data,u,c),P(t)||Gr(u,t),new Ir(e,a,s,r,u,c,o)),t=new Dr(Ir.dataType,i);return $r(e,Ir.envelopeType,n,t)},e[Rr.dataType]=function(e,n,t){Zr(e,n);var r=n[I],i=r.name,o=r.uri||r.url,a=r[w]||{},s=r.measurements||{},t=(Jr(n.data,a,s),P(t)||Gr(a,t),new Rr(e,i,o,undefined,a,s,r)),i=new Dr(Rr.dataType,t);return $r(e,Rr.envelopeType,n,i)},e[hr.dataType]=function(e,n,t){Zr(e,n);var r=n[I].measurements||{},i=n[I][w]||{},t=(Jr(n.data,i,r),P(t)||Gr(i,t),n[I]),t=hr.CreateFromInterface(e,t,i,r),i=new Dr(hr.dataType,t);return $r(e,hr.envelopeType,n,i)},e[Cr.dataType]=function(e,n,t){Zr(e,n);var r=n[I],i=r[w]||{},o=r.measurements||{},t=(Jr(n.data,i,o),P(t)||Gr(i,t),new Cr(e,r.name,r.average,r.sampleCount,r.min,r.max,r.stdDev,i,o)),r=new Dr(Cr.dataType,t);return $r(e,Cr.envelopeType,n,r)},e[Tr.dataType]=function(e,n,t){Zr(e,n);var r=n[I].measurements||{},i=n[I][w]||{},t=(Jr(n.data,i,r),P(t)||Gr(i,t),n[I]);if(P(t))return qn(e,"Invalid input for dependency data"),null;var o=t[w]&&t[w][jt]?t[w][jt]:"GET",o=new Tr(e,t.id,t.target,t.name,t.duration,t.success,t.responseCode,o,t.type,t.correlationContext,i,r),t=new Dr(Tr.dataType,o);return $r(e,Tr.envelopeType,n,t)};var ci,li=e,Pr=(G(fi,ci=oe),fi.constructEnvelope=function(e,n,t,r){e=n===e.iKey||P(n)?e:f(f({},e),{iKey:n});return(li[e.baseType]||Qr)(t,e,r)},fi);function fi(){var S,I,w,r,T,N,E,L,R,A,D,M=ci.call(this)||this,k=(M.priority=1001,M.identifier="AppInsightsChannelPlugin",M._senderConfig=ui(),0);return y(fi,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),j(c.diagLog(),2,40,". Response code "+e+". Will retry to send "+n.length+" items.")):c._onError(n,i):A&&!A.isOnline()?c._senderConfig.isRetryDisabled()||(m(n,10),j(c.diagLog(),2,40,". Offline - Response Code: ".concat(e,". Offline status: ").concat(!A.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):(S=0,c._onSuccess(n,r)))}function s(e){return!(10<=N)&&!P(e)&&""!==e&&e!==c._senderConfig.endpointUrl()&&(c._senderConfig.endpointUrl=function(){return e},++N,1)}function n(e,n){R?R(e,!1):u(e)}function o(e){var n=Nn(),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(B(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&&(L&&L(t,!0),j(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[qt]=!0}catch(i){}t.open("POST",r,e),t.setRequestHeader("Content-type","application/json"),nr(r)&&t.setRequestHeader(At.sdkContextHeader,At.sdkContextHeaderAppIdRequest),O(Re(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,x(t),e)};e=c._buffer.batchPayloads(n);t.send(e),c._buffer.markAsSent(n)}function d(e,n){if(B(e)){for(var t=e.length,r=0;r<e.length;r++)t+=e[r].length;k+t<=65e3?i(e,!1):Ln()?u(e):(L&&L(e,!0),j(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=(nr(e)&&o.append(At.sdkContextHeader,At.sdkContextHeaderAppIdRequest),O(Re(E),function(e){o.append(e,E[e])}),(i={method:"POST",headers:o,body:i})[qt]=!0,r||(n=i.keepalive=!0,k+=a),new Request(e,i));try{e[qt]=!0}catch(u){}c._buffer.markAsSent(t);try{fetch(e).then(function(n){r||(k-=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||(k-=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){j(c.diagLog(),1,43,"Cannot parse the response. "+q(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),S++;for(var r=0,i=e;r<i.length;r++){var o=i[r];t.enqueue(o)}n=S<=1?10:(e=1+Math.floor((Math.pow(2,S)-1)/2*Math.random()*10),Math.max(Math.min(e*=n,3600),10)),e=Me()+1e3*n;I=e,v()}}function v(){var e;r||w||(e=I?Math.max(0,I-Me()):0,e=Math.max(c._senderConfig.maxBatchInterval(),e),r=setTimeout(function(){r=null,c.triggerSend(!0,null,1)},e))}function h(){clearTimeout(r),I=r=null}function y(e){return 408===e||429===e||500===e||503===e}function x(e,n){return e?"XMLHttpRequest,Status:"+e.status+",Response:"+si(e)||e.response||"":n}function _(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,b(i),e)},r&&r.location&&r.location.protocol||"");if(c._senderConfig.endpointUrl().lastIndexOf(r,0))return j(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 b(e,n){return e?"XDomainRequest,Response:"+si(e)||"":n}function C(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){j(c.diagLog(),1,74,"send request notification failed: "+q(r),{exception:K(r)})}}function t(){c._sender=null,c._buffer=null,c._appId=null,c._sample=null,w=!(E={}),k=N=S=0,D=R=L=T=r=I=A=null}t(),c.pause=function(){h(),w=!0},c.resume=function(){w&&(w=!1,I=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),!w){h();try{c.triggerSend(e,null,t||1)}catch(r){j(c.diagLog(),1,22,"flush failed, telemetry will not be collected: "+q(r),{exception:K(r)})}}},c.onunloadFlush=function(){if(!w)if(!1!==c._senderConfig.onunloadDisableBeacon()&&!1!==c._senderConfig.isBeaconApiDisabled()||!Ln())c.flush();else try{c.triggerSend(!0,n,2)}catch(e){j(c.diagLog(),1,20,"failed to flush with beacon sender on page unload, telemetry will not be collected: "+q(e),{exception:K(e)})}},c.addHeader=function(e,n){E[e]=n},c.initialize=function(e,n,t,r){c.isInitialized()&&j(c.diagLog(),1,28,"Sender is already initialized"),a.initialize(e,n,t,r);var i=c._getTelCtx(),o=c.identifier,t=(T=new ei(n.logger),I=null,S=0,c._sender=null,N=0,c.diagLog()),r=(D=ht(et("Sender"),n.evtNamespace&&n.evtNamespace()),A=function(e){var n,t=wn(),r=Nn(),i=!1,o=!0,a=ht(et("OfflineListener"),e);try{s(In())&&(i=!0),(i=!!(t&&(n=t.body||t).ononline&&s(n))||i)&&r&&!P(r.onLine)&&(o=r.onLine)}catch(l){i=!1}function s(e){var n=!1;return e&&(n=yt(e,"online",u,a))&&yt(e,"offline",c,a),n}function u(){o=!0}function c(){o=!1}return{isOnline:function(){var e=!0;return i?e=o:r&&!P(r.onLine)&&(e=r.onLine),e},isListening:function(){return i},unload:function(){var e=In();e&&i&&(ni(e,a),t&&!xe((e=t.body||t).ononline)&&ni(e,a),i=!1)}}}(D),U(ui(),function(e,n){c._senderConfig[e]=function(){return i.getConfig(o,e,n())}}),c._buffer=new(c._senderConfig.enableSessionStorageBuffer()&&Jt()?Vr:Kr)(t,c._senderConfig),c._sample=new oi(c._senderConfig.samplingPercentage(),t),!P(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)||j(t,1,100,"Invalid Instrumentation key "+e.instrumentationKey),!nr(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()&&An()?n=_:!r.disableXhr()&&Dn()&&(n=f),!n&&Rn()&&(n=p),L=n||f,!r.isBeaconApiDisabled()&&Ln()&&(n=u),c._sender=n||f,R=!r.onunloadDisableFetch()&&Rn(!0)?d:Ln()?u:!r.disableXhr()&&An()?_:!r.disableXhr()&&Dn()?f:L},c.processTelemetry=function(e,t){t=c._getTelCtx(t);try{if(c._senderConfig.disableTelemetry())return;if(!e)return void j(t.diagLog(),1,7,"Cannot send empty telemetry");if(e.baseData&&!e.baseType)return void j(t.diagLog(),1,70,"Cannot send telemetry without baseData and baseType");if(e.baseType||(e.baseType="EventData"),!c._sender)return void j(t.diagLog(),1,28,"Sender was not initialized");if(!c._sample.isSampledIn(e))return void j(t.diagLog(),2,33,"Telemetry item was sampled out and not sent",{SampleRate:c._sample.sampleRate});e[zt]=c._sample.sampleRate;var n=c._senderConfig.convertUndefined()||undefined,r=e.iKey||c._senderConfig.instrumentationKey(),i=fi.constructEnvelope(e,r,t.diagLog(),n);if(!i)return void j(t.diagLog(),1,47,"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,qn(t.diagLog(),"Telemetry processor check returns false"))}catch(n){j(t.diagLog(),1,64,"One of telemetry initializers failed, telemetry item will not be sent: "+q(n),{exception:K(n)},!0)}}),delete e.tags[Kt]),o)return;var a=T.serialize(i),s=c._buffer;s.size()+a.length>c._senderConfig.maxBatchSizeInBytes()&&c.triggerSend(!0,null,10),s.enqueue(a),v()}catch(u){j(t.diagLog(),2,12,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+q(u),{exception:K(u)})}c.processNext(e,t)},c._xhrReadyStateChange=function(e,n,t){4===e.readyState&&l(e.status,n,e.responseURL,t,x(e),si(e)||e.response)},c.triggerSend=function(e,n,t){if(void 0===e&&(e=!0),!w)try{var r,i=c._buffer;c._senderConfig.disableTelemetry()?i.clear():0<i.count()&&(r=i.getItems(),C(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=Nn()||{})?(n.userAgent||F).toLowerCase():F)||F).toLowerCase();if(be(n,mn))return e=wn()||{},Math.max(parseInt(n.split(mn)[1]),e.documentMode||0);if(be(n,vn)){e=parseInt(n.split(vn)[1]);if(e)return e+4}return null}();(!i||9<i)&&j(c.diagLog(),1,40,"Telemetry transmission failed, some telemetry will be lost: "+q(o),{exception:K(o)})}},c._doTeardown=function(e,n){c.onunloadFlush(),A.unload(),t()},c._onError=function(e,n,t){j(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,x(null,["partial success",n.itemsAccepted,"of",n.itemsReceived].join(" "))),0<r.length&&(m(r),j(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=si(e);!e||t+""!="200"&&""!==t?(t=g(t))&&t.itemsReceived&&t.itemsReceived>t.itemsAccepted&&!c._senderConfig.isRetryDisabled()?c._onPartialSuccess(n,t):c._onError(n,b(e)):(S=0,c._onSuccess(n,0))}}),M}N.Sender=Pr;r=N,Ur="__esModule",d={value:!0},b=Object.defineProperty;if(b)try{return void b(r,Ur,d)}catch(vi){}typeof d.value!==undefined&&(r[Ur]=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||{}));
|
|
5
|
+
var e=this,n=function(N){"use strict";var E="function",L="object",R="undefined",o="prototype",A="hasOwnProperty",t=Object,D=t[o],M=t.assign,k=t.create,e=t.defineProperty,H=D[A],V=null;function X(e){return void 0===e&&(e=!0),V&&e||(typeof globalThis!==R&&globalThis&&(V=globalThis),typeof self!==R&&self&&(V=self),typeof window!==R&&window&&(V=window),typeof global!==R&&global&&(V=global)),V}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])D[A].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[A](t)&&(e[t]=n[t])})(e,n)};function G(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(k)return k(e);if(null==e)return{};var n=typeof e;function t(){}return n!==L&&n!==E&&Y("Object prototype may only be an Object:"+e),t[o]=e,new t}(n):(t[o]=n[o],new t)}var F="",$="isInitialized",Z="teardown",W="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=D[oe],pe=H[oe],ge=pe.call(t),ve=/-([a-z])/g,me=/([^\w\d_$])/g,he=/^(\d+[\w\d_$])/,ye=Object.getPrototypeOf;function _e(e){return e===undefined||typeof e===R}function P(e){return null===e||_e(e)}function p(e){return!(!e||typeof e!==L)}function g(e){return!(!e||typeof e!==E)}function xe(e){var n=e;return e&&m(e)?(n=(n=e.replace(ve,function(e,n){return n.toUpperCase()})).replace(me,"_")).replace(he,function(e,n){return"_"+n}):n}function U(e,n){if(e)for(var t in e)H.call(e,t)&&n.call(e,t,e[t])}function be(e,n){return!(!e||!n||!~e.indexOf(n))}var B=n||function(e){return!(!e||"[object Array]"!==de.call(e))};function Ce(e){return e&&"[object Error]"===de.call(e)}function m(e){return"string"==typeof e}function Se(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]&&H.call(e,ae)?e[ae]:e)===E&&pe.call(e)===ge)}function Ie(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 we(e,n,t){if(e){if(e[re])return e[re](n,t);var r=e.length,t=t||0;try{for(var i=Math.max(0<=t?t:r-Math.abs(t),0);i<r;i++)if(i in e&&e[i]===n)return i}catch(o){}}return-1}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 Ne(e){return e&&(le&&e[ie]?e[ie]():e.replace?e.replace(/^\s+|\s+$/g,""):e)}var Ee=!{toString:null}.propertyIsEnumerable("toString"),Le=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];function Re(e){var n=typeof e;if(n===E||n===L&&null!==e||Y("objKeys called on non-object"),!Ee&&ce)return ce(e);var t,r=[];for(t in e)e&&H.call(e,t)&&r.push(t);if(Ee)for(var i=Le.length,o=0;o<i;o++)e&&H.call(e,Le[o])&&r.push(Le[o]);return r}function Ae(e){return ue&&U(e,function(e,n){(B(n)||p(n))&&ue(n)}),De(e)}var De=ue||function(e){return e};function Me(){var e=Date;return e.now?e.now():(new e).getTime()}function q(e){return Ce(e)?e.name:F}function ke(e,n,t,r,i){var o=t;!e||(o=e[n])===t||i&&!i(o)||r&&!r(t)||(e[n]=o=t)}function Fe(e){return!!e}function Pe(e){return e&&M?t(M({},e)):e}function Ue(e){var t={};return U(e,function(e,n){t[e]=n,t[n]=e}),Ae(t)}var Be="constructor",v="prototype",Oe="function",qe="_dynInstFuncs",ze="_isDynProxy",Ke="_dynClass",je="_dynInstChk",He=je,Ve="_dfOpts",Xe="_unknown_",Ye="__proto__",Je="_dyn"+Ye,Ge="_dynInstProto",$e="useBaseInst",Ze="setInstFuncs",We=Object,Qe=We.getPrototypeOf,en=We.getOwnPropertyNames,nn=0;function h(e,n){return e&&We[v].hasOwnProperty.call(e,n)}function tn(e){return e&&(e===We[v]||e===Array[v])}function rn(e){return tn(e)||e===Function[v]}function on(e){if(e){if(Qe)return Qe(e);var n=e[Ye]||e[v]||(e[Be]?e[Be][v]:null),t=e[Je]||n;h(e,Je)||(delete e[Ge],t=e[Je]=e[Ge]||e[Je],e[Ge]=n)}return t}function an(e,n){var t=[];if(en)t=en(e);else for(var r in e)"string"==typeof r&&h(e,r)&&t.push(r);if(t&&0<t.length)for(var i=0;i<t.length;i++)n(t[i])}function sn(e,n,t){return n!==Be&&typeof e[n]===Oe&&(t||h(e,n))}function un(e){throw new TypeError("DynamicProto: "+e)}function cn(e,n){for(var t=e.length-1;0<=t;t--)if(e[t]===n)return 1}function ln(e,n){return h(e,v)?e.name||n||Xe:((e||{})[Be]||{}).name||n||Xe}function y(e,r,n,t){h(e,v)||un("theClass is an invalid class definition.");var i,o,a,s,u,c,l=e[v],f=(function(e){if(!Qe)return 1;for(var n=[],t=on(r);t&&!rn(t)&&!cn(n,t);){if(t===e)return 1;n.push(t),t=on(t)}}(l)||un("["+ln(e)+"] is not in class hierarchy of ["+ln(r)+"]"),null),e=(h(l,Ke)?f=l[Ke]:(f="_dynCls$"+ln(e,"_")+"$"+nn,nn++,l[Ke]=f),y[Ve]),d=!!e[$e],p=(d&&t&&t[$e]!==undefined&&(d=!!t[$e]),o={},an(i=r,function(e){!o[e]&&sn(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[ze]&&o&&!1!==(r=e[qe]||{})[He]&&(i=(r[n[Ke]]||{})[t]||i),function(){return i.apply(e,arguments)}}for(var i={},a=(an(t,function(e){i[e]=r(n,t,e)}),on(e)),s=[];a&&!rn(a)&&!cn(s,a);)an(a,function(e){!i[e]&&sn(a,e,!Qe)&&(i[e]=r(n,a,e))}),s.push(a),a=on(a);return i}(l,r,p,d)),!!Qe&&!!e[Ze]);a=l,n=f,s=r,u=p,e=!1!==(d=d&&t?!!t[Ze]:d),tn(a)||(l=s[qe]=s[qe]||{},c=l[n]=l[n]||{},!1!==l[He]&&(l[He]=!!e),an(s,function(e){var t,r,i;sn(s,e,!1)&&s[e]!==u[e]&&(c[e]=s[e],delete s[e],h(a,e)&&(!a[e]||a[e][ze])||(a[e]=(t=a,r=e,(i=function(){var e,n;return(function(e,n,t,r){var i=null;if(e&&h(t,Ke)){var o=e[qe]||{};if((i=(o[t[Ke]]||{})[n])||un("Missing ["+n+"] "+Oe),!i[je]&&!1!==o[He]){for(var a=!h(e,n),s=on(e),u=[];a&&s&&!rn(s)&&!cn(u,s);){var c=s[n];if(c){a=c===r;break}u.push(s),s=on(s)}try{a&&(e[n]=i),i[je]=1}catch(l){o[He]=!1}}}return i}(this,r,t,i)||(typeof(n=(n=t[e=r])===i?on(t)[e]:n)!==Oe&&un("["+e+"] is not a "+Oe),n)).apply(this,arguments)})[ze]=1,i)))}))}y[Ve]={setInstFuncs:!0,useBaseInst:!0};var fn="window",dn="navigator",pn="console",gn="JSON",vn="msie",mn="trident/",hn="XMLHttpRequest",yn=null,_n=null,xn=null,bn=null;function Cn(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=!_e((new e)[n])}catch(i){}}return r}function c(e){var n=X();return n&&n[e]?n[e]:e===fn&&Sn()?window:null}function Sn(){return typeof window===L&&window}function In(){return Sn()?window:c(fn)}function wn(){return typeof document===L&&document?document:c("document")}function Tn(){return!(typeof navigator!==L||!navigator)}function Nn(){return Tn()?navigator:c(dn)}function En(){return typeof JSON===L&&JSON||null!==c(gn)}function z(){return En()?JSON||c(gn):null}function K(e){var n=Object[o].toString.call(e),t=F;return"[object Error]"===n?t="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":En()&&(t=z().stringify(e)),n+t}function Ln(){return bn=null===bn?Tn()&&!!Nn().sendBeacon:bn}function Rn(e){var n=!1;try{var n=!!c("fetch"),t=c("Request");n&&e&&t&&(n=Cn(t,"keepalive"))}catch(r){}return n}function An(){return xn=null===xn&&(xn=typeof XDomainRequest!==R)&&Dn()?xn&&!Cn(c(hn),"withCredentials"):xn}function Dn(){var e=!1;try{e=!!c(hn)}catch(n){}return e}var Mn=null;function kn(e){return e?'"'+e.replace(/\"/g,F)+'"':F}function Fn(e,n){var t,r=typeof console!==R?console:c(pn);r&&(t="log",g(r[t=r[e]?e:t])&&r[t](n))}Un.dataType="MessageData";var Pn=Un;function Un(e,n,t,r){void 0===t&&(t=!1),this.messageId=e,this.message=(t?"AI: ":"AI (Internal): ")+e;t=F,En()&&(t=z().stringify(r)),e=(n?" message:"+kn(n):F)+(r?" props:"+kn(t):F);this.message+=e}function Bn(e,n){return(e||{}).logger||new On(n)}qn.__ieDyn=1;var On=qn;function qn(i){this.identifier="DiagnosticLogger",this.queue=[];var s=0,u={};y(qn,this,function(o){function e(e,n){e=i[e];return P(e)?n:e}function a(e,n){var t,r=(t=(t=Mn)||!0===i.disableDbgExt?t:Mn||(r=c("Microsoft"),Mn=r?r.ApplicationInsights:Mn))?t.ChromeDbgExt:null;r&&r.diagLog&&r.diagLog(e,n)}P(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 Pn(n,t,i=void 0!==i&&i,r);if(o.enableDebugExceptions())throw K(n);t=1===e?"errorToConsole":"warnToConsole";_e(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 Pn(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 j(e,n,t,r,i,o){void 0===o&&(o=!1),(e||new On).throwInternal(n,t,r,i,o)}function zn(e,n){(e||new On).warnToConsole(n)}s.ParentContextKey="parent",s.ChildrenContextKey="childEvts";var Kn=s;function s(e,i,n){var r,o=this,a=!1;o.start=Me(),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(B(n))for(var t=0;t<n.length;t++){var r=n[t];r&&(e+=r.time)}o.time=Me()-o.start,o.exTime=o.time-e,o.complete=function(){},!a&&g(i)&&(o.payload=i())}}var jn="CoreUtils.doPerf";function Hn(e,n,t,r,i){if(e)if(e=g(e.getPerfMgr)?e.getPerfMgr():e){var o,a=void 0,s=e.getCtx(jn);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(jn,a),t(a)}catch(u){a&&a.setCtx&&a.setCtx("exception",u)}finally{a&&e.fire(a),e.setCtx(jn,s)}}t()}var Vn=4294967296,Xn=4294967295,Yn=!1,Jn=123456789,Gn=987654321;function $n(e){var n,t=0,r=c("crypto")||c("msCrypto");if(0===(t=r&&r.getRandomValues?r.getRandomValues(new Uint32Array(1))[0]&Xn:t)&&(!(r=Nn())||r.userAgent===_n&&null!==yn||(r=((_n=r.userAgent)||F).toLowerCase(),yn=be(r,vn)||be(r,mn)),yn)){if(!Yn)try{var i=2147483647&Me();(n=(Math.random()*Vn^i)+i)<0&&(n>>>=0),Jn=123456789+n&Xn,Gn=987654321-n&Xn,Yn=!0}catch(o){}r=((Gn=36969*(65535&Gn)+(Gn>>16)&Xn)<<16)+(65535&(Jn=18e3*(65535&Jn)+(Jn>>16)&Xn))>>>0&Xn|0,t=(r>>>=0)&Xn}return 0===t&&(t=Math.floor(Vn*Math.random()|0)),e||(t>>>=0),t}var Zn=e,Wn="2.8.5-nightly.2206-04",Qn="."+function(e){void 0===e&&(e=22);for(var n=$n()>>>0,t=0,r=F;r.length<e;)r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[0|63&n]||"",n>>>=6,5==++t&&(n=($n()<<2&4294967295|3&n)>>>0,t=0);return r}(6),et=0;function nt(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType}function tt(e,n){return xe(e+et+++((n=void 0!==n&&n)?"."+Wn:"")+Qn)}function rt(e){var o={id:tt("_aiData-"+(e||"")+"."+Wn),accept:nt,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{nt(n)&&!function(e,n,t){if(Zn)try{return Zn(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 it="attachEvent",ot="addEventListener",at="detachEvent",st="removeEventListener",ut="events",ct=(tt("aiEvtPageHide"),tt("aiEvtPageShow"),/\.[\.]+/g),lt=/[\.]+$/,ft=1,dt=rt("events"),pt=/^([^.]*)(?:\.(.+)|)/;function gt(e){return e&&e.replace?e.replace(/^\s*\.*|\.*\s*$/g,""):e}function vt(e,n){n&&(t="",B(n)?(t="",O(n,function(e){(e=gt(e))&&("."!==e[0]&&(e="."+e),t+=e)})):t=gt(n),t&&(e=(e||"")+(t="."!==t[0]?"."+t:t)));var t,n=pt.exec(e||"")||[];return{type:n[1],ns:(n[2]||"").replace(ct,".").replace(lt,"").split(".").sort().join(".")}}function mt(e,n,t){e=dt.get(e,ut,{},t=void 0===t||t);return e[n]||(e[n]=[])}function ht(e,n,t,r){e&&n&&n.type&&(e[st]?e[st](n.type,t,r):e[at]&&e[at]("on"+n.type,t))}function yt(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)||(ht(e,o.evtName,o.handler,o.capture),n.splice(i,1))}}function _t(e,n){return n?vt("xx",B(n)?[e].concat(n):[e,n]).ns.split("."):e}function xt(e,n,t,r,i){void 0===i&&(i=!1);var o,a=!1;if(e)try{var s,u=vt(n,r),c=u,l=t,f=i,d=!1;(o=e)&&c&&c.type&&l&&(o[ot]?(o[ot](c.type,l,f),d=!0):o[it]&&(o[it]("on"+c.type,l),d=!0)),(a=d)&&dt.accept(e)&&(s={guid:ft++,evtName:u,handler:t,capture:i},mt(e,u.type).push(s))}catch(p){}return a}var bt=rt("plugin");function Ct(e){return bt.get(e,"state",{},!0)}var St="TelemetryPluginChain",It="_hasRun",wt="_getTelCtx",Tt=0;function Nt(e,a,t,n){var r=null,i=[],o=(null!==n&&(r=n?function(e,n,t){for(;e;){if(e.getPlugin()===t)return e;e=e.getNext()}return Lt([t],n.config||{},n)}(e,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){j(t.logger,2,73,"Unexpected Exception during onComplete - "+K(n))}}),i=[]),n},ctx:{core:function(){return t},diagLog:function(){return Bn(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&&!P(e[n])?r=e[n]:a&&!P(a[n])&&(r=a[n]),P(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:_e(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=B(c),f=p(c);for(o in c)(l&&o in c||f&&H.call(c,o))&&(a=c[o],s=void 0,r&&a&&((s=B(a))||Se(a))&&(u=n[o],s?B(u)||(u=[]):Se(u)||(u={}),a=d(r,u,a)),a!==undefined&&(n[o]=a))}return n}(!0,n,r),a&&2===t&&U(n,function(e){var n;P(o[e])&&!P(n=a[e])&&(o[e]=n)}),r=o):r=n,r}return o}function Et(e,t,r,n){var i=Nt(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 Et((e=B(e=void 0===e?null:e)?Lt(e,t,r,n):e)||o.getNext(),t,r,n)},o}function Lt(e,n,t,r){var i,o=null,a=!r;return B(e)&&0<e.length&&(i=null,O(e,function(e){(a=!a&&r===e||a)&&e&&g(e.processTelemetry)&&(e=Rt(e,n,t),o=o||e,i&&i._setNext(e),i=e)})),r&&!o?Lt([r],n,t):o}function Rt(u,r,i){var c=null,o=g(u.processTelemetry),a=g(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&&g(u[wt])?u[wt]():n)||Et(s,r,i)),function(e){if(!u||!o)return!1;var n=Ct(u);return!n.teardown&&!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=Ct(u),n=u[W]||e.core,!u||n&&n!==r[W]()||e[Z]||(e[W]=null,e[Z]=!0,e[$]=!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=Ct(u),n=u[W]||e.core,!u||n&&n!==r[W]()||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:St,s=(s=t[It])||(t[It]={});return t.setNext(c),u&&Hn(t[W](),function(){return a+":"+i},function(){s[l]=!0;try{var e=c?c._id:F;e&&(s[e]=!1),o=r(t)}catch(n){e=!c||s[c._id];e&&(o=!0),c&&e||j(t.diagLog(),1,73,"Plugin ["+a+"] failed during "+i+" - "+K(n)+", run flags: "+K(s))}},e,n),o}return De(s)}function At(){var n=[];return{add:function(e){e&&n.push(e)},run:function(t,r){O(n,function(e){try{e(t,r)}catch(n){j(t.diagLog(),2,73,"Unexpected error calling unload handler - "+K(n))}}),n=[]}}}var _="getPlugin",oe=(Dt.__ieDyn=1,Dt);function Dt(){var o,i,l,f,d,a=this;function n(e){var n,e=e=void 0===e?null:e;return e||(n=i||Et(null,{},a.core),e=l&&l[_]?n.createNew(null,l[_]):n.createNew(null,l)),e}function u(e,n,t){e&&ke(e,"extensionConfig",[],null,P),!t&&n&&(t=n.getProcessTelContext().getNext());var r=l;l&&l[_]&&(r=l[_]()),a.core=n,i=Et(t,e,n,r)}function p(){o=!1,a.core=null,l=i=null,d=[],f=At()}p(),y(Dt,a,function(c){var e,n,t,r,i;c.initialize=function(e,n,t,r){u(e,n,r),o=!0},c.teardown=function(e,n){var t,r,i,o,a=c.core;if(a&&(!e||a===e.core()))return r=!1,i=e||function u(e,t,n){var r=t.config||{},i=Nt(e,r,t,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 u((e=B(e=void 0===e?null:e)?Lt(e,r,t,n):e)||o.getNext(),t,n)},o}(null,a,l&&l[_]?l[_]():l),o=n||{reason:0,isAsync:!1},c[ne]&&!0===c[ne](i,o,s)?t=!0:s(),t;function s(){r||(r=!0,f.run(i,n),O(d,function(e){e.rm()}),d=[],!0===t&&i.processNext(o),p())}},c.update=function(e,n){var t,r,i,o=c.core;if(o&&(!e||o===e.core()))return r=!1,i=e||function s(e,t,n){var r=t.config||{},i=Nt(e,r,t,n).ctx;return i.processNext=function(n){return i.iterate(function(e){g(e.update)&&e.update(i,n)})},i.createNew=function(e,n){return s((e=B(e=void 0===e?null:e)?Lt(e,r,t,n):e)||i.getNext(),t,n)},i}(null,o,l&&l[_]?l[_]():l),c._doUpdate&&!0===c._doUpdate(i,n||{reason:0},a)?t=!0:a(),t;function a(){r||(r=!0,u(i.getCfg(),i.core(),i.getNext()))}},c._addHook=function(e){e&&(B(e)?d=d.concat(e):d.push(e))},t="_addUnloadCb",n=function(){return f},(e=c)&&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[$]=function(){return o},a.setInitialized=function(e){o=e},a.setNextPlugin=function(e){l=e},a.processNext=function(e,n){n?n.processNext(e):l&&g(l.processTelemetry)&&l.processTelemetry(e,null)},a._getTelCtx=n}Mt={},U({requestContextHeader:[0,"Request-Context"],requestContextTargetKey:[1,"appId"],requestContextAppIdFormat:[2,"appId=cid-v1:"],requestIdHeader:[3,"Request-Id"],traceParentHeader:[4,"traceparent"],traceStateHeader:[5,"tracestate"],sdkContextHeader:[6,"Sdk-Context"],sdkContextHeaderAppIdRequest:[7,"appId"],requestContextHeaderLowerCase:[8,"request-context"]},function(e,n){Mt[e]=n[1],Mt[n[0]]=n[1]});var Mt,kt=Ae(Mt);function Ft(e,n,t){var r,i,o=n.length,a=(e=e,(n=n)&&150<(n=Ne(n.toString())).length&&(i=n.substring(0,150),j(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=Ne(n)).toString().length>t&&(r=n.toString().substring(0,t),j(e,2,61,"string value is too long. It has been truncated to "+t+" characters.",{value:n},!0))),r||n}function Pt(e,n){return qt(e,n,2048,66)}function Ut(e,n){var t;return n&&32768<n.length&&(t=n.substring(0,32768),j(e,2,56,"message is too long, it has been truncated to 32768 characters.",{message:n},!0)),t||n}function Bt(r,e){var i;return e&&(i={},U(e,function(e,n){if(p(n)&&En())try{n=z().stringify(n)}catch(t){j(r,2,49,"custom property is not valid",{exception:t},!0)}n=x(r,n,8192),e=Ft(r,e,i),i[e]=n}),e=i),e}function Ot(t,e){var r;return e&&(r={},U(e,function(e,n){e=Ft(t,e,r),r[e]=n}),e=r),e}function qt(e,n,t,r){var i;return n&&(n=Ne(n)).length>t&&(i=n.substring(0,t),j(e,2,r,"input is too long, it has been truncated to "+t+" characters.",{data:n},!0)),i||n}var zt="";function Kt(e){var n=zt+Math.floor((e=Math.round(e=isNaN(e)||e<0?0:e))/1e3)%60,t=zt+Math.floor(e/6e4)%60,r=zt+Math.floor(e/36e5)%24,i=Math.floor(e/864e5),e=1===(e=zt+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+".":zt)+r+":"+t+":"+n+"."+e}var jt="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",Ht="sampleRate",Vt="ProcessLegacy",Xt="http.method",l="not_specified",Yt=Ue({LocalStorage:0,SessionStorage:1}),Jt=(Ue({AI:0,AI_AND_W3C:1,W3C:2}),undefined);function Gt(e){try{if(P(X()))return null;var n=(new Date).toString(),t=c(e===Yt.LocalStorage?"localStorage":"sessionStorage"),r=(t.setItem(n,n),t.getItem(n)!==n);if(t.removeItem(n),!r)return t}catch(i){}return null}function $t(){return Zt()?Gt(Yt.SessionStorage):null}function Zt(e){return Jt=e||Jt===undefined?!!Gt(Yt.SessionStorage):Jt}function Wt(e,n){var t=$t();if(null!==t)try{return t.getItem(n)}catch(r){Jt=!1,j(e,2,2,"Browser failed read of session storage. "+q(r),{exception:K(r)})}return null}function Qt(e,n,t){var r=$t();if(null!==r)try{r.setItem(n,t)}catch(i){Jt=!1,j(e,2,4,"Browser failed write to session storage. "+q(i),{exception:K(i)})}}var er=wn()||{},nr=0,tr=[null,null,null,null,null];var rr=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"];function ir(e){return-1!==we(rr,e.toLowerCase())}var or=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=Ie(new Date),i.aiDataContract={time:1,iKey:1,name:1,sampleRate:function(){return 100===r.sampleRate?4:1},tags:1,data:1}},ar=(sr.envelopeType="Microsoft.ApplicationInsights.{0}.Event",sr.dataType="EventData",sr);function sr(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=Bt(e,t),this.measurements=Ot(e,r)}var ur="error",u="stack",cr="stackDetails",lr="errorSrc",fr="message",dr="description";function pr(e,n){var t=e;return t&&!m(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 gr(e,n){var t=e;return e&&((t=t&&!m(t)&&(e[fr]||e[dr])||t)&&!m(t)&&(t=pr(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 vr(e){return e&&e.src&&m(e.src)&&e.obj&&B(e.obj)}function mr(e){var e=e||"",n=(e=m(e)?e:m(e[u])?e[u]:""+e).split("\n");return{src:e,obj:n}}function hr(e){var n,t=null;if(e)try{e[u]?t=mr(e[u]):e[ur]&&e[ur][u]?t=mr(e[ur][u]):e.exception&&e.exception[u]?t=mr(e.exception[u]):vr(e)?t=e:vr(e[cr])?t=e[cr]:window&&window.opera&&e[fr]?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):m(e)?t=mr(e):(n=e[fr]||e[dr]||"",m(e[lr])&&(n&&(n+="\n"),n+=" from "+e[lr]),n&&(t=mr(n)))}catch(r){t=mr(r)}return t||{src:"",obj:null}}function yr(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 _r(e){if(e)try{var n,t;if(!m(e))return n=yr(e),(t=pr(e,!1))&&"{}"!==t||(e[ur]&&(n=yr(e=e[ur])),t=pr(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=yr(i||o||e);return{message:gr(e,u),url:n,lineNumber:t,columnNumber:r,error:_r(i||o||e),evt:_r(o||e),typeName:u,stackDetails:hr(a||i||o),errorSrc:s}},a.CreateFromInterface=function(n,e,t,r){var i=e.exceptions&&Te(e.exceptions,function(e){return br.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=_r;var xr=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),P(n.isManual)||(a.isManual=n.isManual)):(a.exceptions=[new br(e,n,t=t||{})],a.properties=Bt(e,t),a.measurements=Ot(e,r),i&&(a.severityLevel=i),o&&(a.id=o))}Cr.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}},Cr.CreateFromInterface=function(e,n){var t=n.parsedStack instanceof Array&&Te(n.parsedStack,function(e){return Sr.CreateFromInterface(e)})||n.parsedStack;return new Cr(e,f(f({},n),{parsedStack:t}))};var br=Cr;function Cr(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,Ce(o)||(o=o[ur]||r||o),s.typeName=x(e,yr(o))||l,s.message=Ut(e,gr(n||o,s.typeName))||l,c=n[cr]||hr(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();Sr.regex.test(e)&&(e=new Sr(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),j(r,2,52,"exception is too long, it has been truncated to 32768 characters.",{exception:e},!0)),i||e),s.hasFullStack=B(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 Sr=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=Ne(t),r.fileName="",r.line=0,(n=t.match(i.regex))&&5<=n.length&&(r.method=Ne(n[2])||r.method,r.fileName=Ne(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 Ir=function(){this.aiDataContract={name:1,kind:0,value:1,count:0,min:0,max:0,stdDev:0},this.kind=0},wr=(Tr.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",Tr.dataType="MetricData",Tr);function Tr(e,n,t,r,i,o,a,s,u){this.aiDataContract={ver:1,metrics:1,properties:0},this.ver=2;var c=new Ir;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=Bt(e,s),this.measurements=Ot(e,u)}Er.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",Er.dataType="PageviewData";var Nr=Er;function Er(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&&qt(e,a,128,69).toString(),s.url=Pt(e,t),s.name=x(e,n)||l,isNaN(r)||(s.duration=Kt(r)),s.properties=Bt(e,i),s.measurements=Ot(e,o)}Rr.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",Rr.dataType="RemoteDependencyData";var Lr=Rr;function Rr(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,v=this,t=(v.ver=2,v.id=n,v.duration=Kt(i),v.success=o,v.resultCode=a+"",v.type=x(e,u),n=e,i=s,u=a=o=r,a=(s=t)&&0<s.length?(d=s,g=(t=tr)[p=nr],er.createElement?t[p]||(g=t[p]=er.createElement("a")):g={host:function(){e=null,d&&null!=(t=d.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i))&&2<t.length&&m(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&&m(t[2])&&0<t[2].length)return t[2]+(t[3]||"")}return n}()},g.href=d,++p>=t.length&&(p=0),nr=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});v.data=Pt(e,r)||t.data,v.target=x(e,t.target),c&&(v.target="".concat(v.target," | ").concat(c)),v.name=x(e,t.name),v.properties=Bt(e,l),v.measurements=Ot(e,f)}Dr.envelopeType="Microsoft.ApplicationInsights.{0}.Message",Dr.dataType="MessageData";var Ar=Dr;function Dr(e,n,t,r,i){this.aiDataContract={ver:1,message:1,severityLevel:0,properties:0};var o=this;o.ver=2,o.message=Ut(e,n=n||l),o.properties=Bt(e,r),o.measurements=Ot(e,i),t&&(o.severityLevel=t)}kr.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",kr.dataType="PageviewPerformanceData";var Mr=kr;function kr(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=Pt(e,t),s.name=x(e,n)||l,s.properties=Bt(e,i),s.measurements=Ot(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 Fr=function(e,n){this.aiDataContract={baseType:1,baseData:1},this.baseType=e,this.baseData=n};function Pr(e){var n="ai."+e+".";return function(e){return n+e}}var Ur,Br,n=Pr("application"),e=Pr("device"),Or=Pr("location"),r=Pr("operation"),qr=Pr("session"),d=Pr("user"),b=Pr("cloud"),zr=Pr("internal"),Kr=(Br={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:Or("ip"),locationCountry:Or("country"),locationProvince:Or("province"),locationCity:Or("city"),operationId:r("id"),operationName:r("name"),operationParentId:r("parentId"),operationRootId:r("rootId"),operationSyntheticSource:r("syntheticSource"),operationCorrelationVector:r("correlationVector"),sessionId:qr("id"),sessionIsFirst:qr("isFirst"),sessionIsNew:qr("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:b("name"),cloudRole:b("role"),cloudRoleVer:b("roleVer"),cloudRoleInstance:b("roleInstance"),cloudEnvironment:b("environment"),cloudLocation:b("location"),cloudDeploymentUnit:b("deploymentUnit"),internalNodeName:zr("nodeName"),internalSdkVersion:zr("sdkVersion"),internalAgentVersion:zr("agentVersion"),internalSnippet:zr("snippet"),internalSdkSrc:zr("sdkSrc")},G(jr,Ur=function(){var t=this;U(Br,function(e,n){t[e]=n})}),jr);function jr(){return Ur.call(this)||this}var C=new Kr,n=(Hr.__ieDyn=1,Hr);function Hr(t,r){var i=[],o=!1;this._get=function(){return i},this._set=function(e){return i=e},y(Hr,this,function(n){n.enqueue=function(e){n.count()>=r.eventsLimitInMem()?o||(j(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}})}G(Yr,Vr=n),Yr.__ieDyn=1;var Vr,Xr=Yr;function Yr(e,n){e=Vr.call(this,e,n)||this;return y(Yr,e,function(e,n){e.markAsSent=function(e){n.clear()},e.clearSent=function(e){}}),e}G(S,Jr=n),S.BUFFER_KEY="AI_buffer",S.SENT_BUFFER_KEY="AI_sentBuffer",S.MAX_BUFFER_SIZE=2e3;var Jr,Gr=S;function S(s,u){var e=Jr.call(this,s,u)||this,c=!1;return y(S,e,function(t,n){var e=o(S.BUFFER_KEY),r=o(S.SENT_BUFFER_KEY),r=t._set(e.concat(r));function i(n,e){var t=[];return O(e,function(e){g(e)||-1!==we(n,e)||t.push(e)}),t}function o(e){try{var e=u.namePrefix&&u.namePrefix()?u.namePrefix()+"_"+e:e,n=Wt(s,e);if(n){var t=z().parse(n);if((t=m(t)?z().parse(t):t)&&B(t))return t}}catch(r){j(s,1,42," storage key: "+e+", "+q(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([])),j(s,2,41," storage key: "+e+", "+q(r)+". Buffer cleared",{exception:K(r)})}}r.length>S.MAX_BUFFER_SIZE&&(r.length=S.MAX_BUFFER_SIZE),a(S.SENT_BUFFER_KEY,[]),a(S.BUFFER_KEY,r),t.enqueue=function(e){t.count()>=S.MAX_BUFFER_SIZE?c||(j(s,2,67,"Maximum buffer size reached: "+t.count(),!0),c=!0):(n.enqueue(e),a(S.BUFFER_KEY,t._get()))},t.clear=function(){n.clear(),a(S.BUFFER_KEY,t._get()),a(S.SENT_BUFFER_KEY,[]),c=!1},t.markAsSent=function(e){a(S.BUFFER_KEY,t._set(i(e,t._get())));var n=o(S.SENT_BUFFER_KEY);n instanceof Array&&e instanceof Array&&((n=n.concat(e)).length>S.MAX_BUFFER_SIZE&&(j(s,1,67,"Sent buffer reached its maximum size: "+n.length,!0),n.length=S.MAX_BUFFER_SIZE),a(S.SENT_BUFFER_KEY,n))},t.clearSent=function(e){e=i(e,o(S.SENT_BUFFER_KEY));a(S.SENT_BUFFER_KEY,e)}}),e}var $r="baseType",I="baseData",w="properties",Zr="true";function T(e,n,t){ke(e,n,t,Fe)}function Wr(e,t,r){P(e)||U(e,function(e,n){"number"==typeof n?r[e]=n:m(n)?t[e]=n:En()&&(t[e]=z().stringify(n))})}function Qr(t,r){P(t)||U(t,function(e,n){t[e]=n||r})}function ei(e,n,t,r){for(var r=new or(e,r,n),n=(T(r,"sampleRate",t[Ht]),(t[I]||{}).startTime&&(r.time=Ie(t[I].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&&(T(o,C.userAuthUserId,u.authId),T(o,C.userId,u.id||u.localId)),a.app),u=(u&&T(o,C.sessionId,u.sesId),a.device),u=(u&&(T(o,C.deviceId,u.id||u.localId),T(o,C.deviceType,u.deviceClass),T(o,C.deviceIp,u.ip),T(o,C.deviceModel,u.model),T(o,C.deviceType,u.deviceType)),e.ext.web),e=(u&&(T(o,C.deviceLanguage,u.browserLang),T(o,C.deviceBrowserVersion,u.browserVer),T(o,C.deviceBrowser,u.browser),T(e=(e=(e=i.data=i.data||{})[I]=e[I]||{})[w]=e[w]||{},"domain",u.domain),T(e,"isManual",u.isManual?Zr:null),T(e,"screenRes",u.screenRes),T(e,"userConsent",u.userConsent?Zr:null)),a.os),u=(e&&T(o,C.deviceOS,e.name),a.trace),c=(u&&(T(o,C.operationParentId,u.parentID),T(o,C.operationName,x(n,u.name)),T(o,C.operationId,u.traceID)),{}),l=s.length-1;0<=l;l--)U(s[l],function(e,n){c[e]=n}),s.splice(l,1);U(s,function(e,n){c[e]=n});e=f(f({},o),c);return e[C.internalSdkVersion]||(e[C.internalSdkVersion]="javascript:".concat(ti.Version)),i.tags=Pe(e),t.tags=t.tags||[],Pe(r)}function ni(e,n){P(n[I])&&j(e,1,46,"telemetryItem.baseData cannot be null.")}var ti={Version:"2.8.5-nightly.2206-04"};function ri(e,n,t){ni(e,n);var r={},i={},t=(n[$r]!==ar.dataType&&(r.baseTypeSource=n[$r]),n[$r]===ar.dataType?(r=n[I][w]||{},i=n[I].measurements||{}):n[I]&&Wr(n[I],r,i),Wr(n.data,r,i),P(t)||Qr(r,t),n[I].name),t=new ar(e,t,r,i),r=new Fr(ar.dataType,t);return ei(e,ar.envelopeType,n,r)}oi.__ieDyn=1;var ii=oi;function oi(f){y(oi,this,function(e){function c(a,s){var e="__aiCircularRefCheck",u={};if(!a)return j(f,1,48,"cannot serialize object because it is null or undefined",{name:s},!0),u;if(a[e])return j(f,2,50,"Circular reference detected while serializing object",{name:s},!0),u;if(a.aiDataContract)return a[e]=!0,U(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):j(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(B(a))u=l(a,s);else{j(f,2,49,"Attempting to serialize an object which does not implement ISerializable",{name:s},!0);try{z().stringify(a),u=a}catch(n){j(f,1,48,n&&g(n.toString)?n.toString():"Error serializing object",null,!0)}}return u}function l(e,n){if(e)if(B(e))for(var t=[],r=0;r<e.length;r++){var i=c(e[r],n+"["+r+"]");t.push(i)}else j(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={},U(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.",j(f,1,i[e],null,!0))})),i}e.serialize=function(e){e=c(e,"root");try{return z().stringify(e)}catch(n){j(f,1,48,n&&g(n.toString)?n.toString():"Error serializing object",null,!0)}}})}function ai(e,n){var t,r,i=void 0;if(void 0===i&&(i=!1),e)try{var o=vt(null,n),a=!1,s=e,u=function(e){return!(!o.ns&&null!==e.handler)&&(a=!0)};(t=o).type?yt(s,mt(s,t.type),t,u):(U(r=dt.get(s,ut,{}),function(e,n){yt(s,n,t,u)}),0===Re(r).length&&dt.kill(s,ut)),a||ht(e,o,null,i)}catch(c){}}ui.prototype.getHashCodeScore=function(e){return this.getHashCode(e)/ui.INT_MAX_VALUE*100},ui.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)},ui.INT_MAX_VALUE=2147483647;var si=ui;function ui(){}var ci=function(){var n=new si,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()}},li=(fi.prototype.isSampledIn=function(e){var n=this.sampleRate;return null===n||n===undefined||100<=n||e.baseType===wr.dataType||this.samplingScoreGenerator.getSamplingScore(e)<n},fi);function fi(e,n){this.INT_MAX_VALUE=2147483647;n=n||Bn(null);(100<e||e<0)&&(n.throwInternal(2,58,"Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.",{samplingRate:e},!0),e=100),this.sampleRate=e,this.samplingScoreGenerator=new ci}function di(e){try{return e.responseText}catch(n){}return null}function pi(){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={})[ar.dataType]=ri,e[Ar.dataType]=function(e,n,t){ni(e,n);var r=n[I].message,i=n[I].severityLevel,o=n[I][w]||{},a=n[I].measurements||{},t=(Wr(n.data,o,a),P(t)||Qr(o,t),new Ar(e,r,i,o,a)),r=new Fr(Ar.dataType,t);return ei(e,Ar.envelopeType,n,r)},e[Nr.dataType]=function(e,n,t){ni(e,n);var r,i="duration",o=n[I],i=(P(o)||P(o[w])||P(o[w][i])?P(n.data)||P(n.data[i])||(r=n.data[i],delete n.data[i]):(r=o[w][i],delete o[w][i]),n[I]),o=(((n.ext||{}).trace||{}).traceID&&(a=n.ext.trace.traceID),i.id||a),a=i.name,s=i.uri,u=i[w]||{},c=i.measurements||{},i=(P(i.refUri)||(u.refUri=i.refUri),P(i.pageType)||(u.pageType=i.pageType),P(i.isLoggedIn)||(u.isLoggedIn=i.isLoggedIn.toString()),P(i[w])||U(i[w],function(e,n){u[e]=n}),Wr(n.data,u,c),P(t)||Qr(u,t),new Nr(e,a,s,r,u,c,o)),t=new Fr(Nr.dataType,i);return ei(e,Nr.envelopeType,n,t)},e[Mr.dataType]=function(e,n,t){ni(e,n);var r=n[I],i=r.name,o=r.uri||r.url,a=r[w]||{},s=r.measurements||{},t=(Wr(n.data,a,s),P(t)||Qr(a,t),new Mr(e,i,o,undefined,a,s,r)),i=new Fr(Mr.dataType,t);return ei(e,Mr.envelopeType,n,i)},e[xr.dataType]=function(e,n,t){ni(e,n);var r=n[I].measurements||{},i=n[I][w]||{},t=(Wr(n.data,i,r),P(t)||Qr(i,t),n[I]),t=xr.CreateFromInterface(e,t,i,r),i=new Fr(xr.dataType,t);return ei(e,xr.envelopeType,n,i)},e[wr.dataType]=function(e,n,t){ni(e,n);var r=n[I],i=r[w]||{},o=r.measurements||{},t=(Wr(n.data,i,o),P(t)||Qr(i,t),new wr(e,r.name,r.average,r.sampleCount,r.min,r.max,r.stdDev,i,o)),r=new Fr(wr.dataType,t);return ei(e,wr.envelopeType,n,r)},e[Lr.dataType]=function(e,n,t){ni(e,n);var r=n[I].measurements||{},i=n[I][w]||{},t=(Wr(n.data,i,r),P(t)||Qr(i,t),n[I]);if(P(t))return zn(e,"Invalid input for dependency data"),null;var o=t[w]&&t[w][Xt]?t[w][Xt]:"GET",o=new Lr(e,t.id,t.target,t.name,t.duration,t.success,t.responseCode,o,t.type,t.correlationContext,i,r),t=new Fr(Lr.dataType,o);return ei(e,Lr.envelopeType,n,t)};var gi,vi=e,Or=(G(mi,gi=oe),mi.constructEnvelope=function(e,n,t,r){e=n===e.iKey||P(n)?e:f(f({},e),{iKey:n});return(vi[e.baseType]||ri)(t,e,r)},mi);function mi(){var S,I,w,r,T,N,E,L,R,A,D,M=gi.call(this)||this,k=(M.priority=1001,M.identifier="AppInsightsChannelPlugin",M._senderConfig=pi(),0);return y(mi,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)?(v(n),j(c.diagLog(),2,40,". Response code "+e+". Will retry to send "+n.length+" items.")):c._onError(n,i):A&&!A.isOnline()?c._senderConfig.isRetryDisabled()||(v(n,10),j(c.diagLog(),2,40,". Offline - Response Code: ".concat(e,". Offline status: ").concat(!A.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):(S=0,c._onSuccess(n,r)))}function s(e){return!(10<=N)&&!P(e)&&""!==e&&e!==c._senderConfig.endpointUrl()&&(c._senderConfig.endpointUrl=function(){return e},++N,1)}function n(e,n){R?R(e,!1):u(e)}function o(e){var n=Nn(),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(B(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&&(L&&L(t,!0),j(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[jt]=!0}catch(i){}t.open("POST",r,e),t.setRequestHeader("Content-type","application/json"),ir(r)&&t.setRequestHeader(kt.sdkContextHeader,kt.sdkContextHeaderAppIdRequest),O(Re(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,_(t),e)};e=c._buffer.batchPayloads(n);t.send(e),c._buffer.markAsSent(n)}function d(e,n){if(B(e)){for(var t=e.length,r=0;r<e.length;r++)t+=e[r].length;k+t<=65e3?i(e,!1):Ln()?u(e):(L&&L(e,!0),j(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=(ir(e)&&o.append(kt.sdkContextHeader,kt.sdkContextHeaderAppIdRequest),O(Re(E),function(e){o.append(e,E[e])}),(i={method:"POST",headers:o,body:i})[jt]=!0,r||(n=i.keepalive=!0,k+=a),new Request(e,i));try{e[jt]=!0}catch(u){}c._buffer.markAsSent(t);try{fetch(e).then(function(n){r||(k-=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||(k-=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){j(c.diagLog(),1,43,"Cannot parse the response. "+q(t),{response:e})}return null}function v(e,n){if(void 0===n&&(n=1),e&&0!==e.length){var t=c._buffer;t.clearSent(e),S++;for(var r=0,i=e;r<i.length;r++){var o=i[r];t.enqueue(o)}n=S<=1?10:(e=1+Math.floor((Math.pow(2,S)-1)/2*Math.random()*10),Math.max(Math.min(e*=n,3600),10)),e=Me()+1e3*n;I=e,m()}}function m(){var e;r||w||(e=I?Math.max(0,I-Me()):0,e=Math.max(c._senderConfig.maxBatchInterval(),e),r=setTimeout(function(){r=null,c.triggerSend(!0,null,1)},e))}function h(){clearTimeout(r),I=r=null}function y(e){return 408===e||429===e||500===e||503===e}function _(e,n){return e?"XMLHttpRequest,Status:"+e.status+",Response:"+di(e)||e.response||"":n}function x(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,b(i),e)},r&&r.location&&r.location.protocol||"");if(c._senderConfig.endpointUrl().lastIndexOf(r,0))return j(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 b(e,n){return e?"XDomainRequest,Response:"+di(e)||"":n}function C(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){j(c.diagLog(),1,74,"send request notification failed: "+q(r),{exception:K(r)})}}function t(){c._sender=null,c._buffer=null,c._appId=null,c._sample=null,w=!(E={}),k=N=S=0,D=R=L=T=r=I=A=null}t(),c.pause=function(){h(),w=!0},c.resume=function(){w&&(w=!1,I=null,c._buffer.size()>c._senderConfig.maxBatchSizeInBytes()&&c.triggerSend(!0,null,10),m())},c.flush=function(e,n,t){if(void 0===e&&(e=!0),!w){h();try{c.triggerSend(e,null,t||1)}catch(r){j(c.diagLog(),1,22,"flush failed, telemetry will not be collected: "+q(r),{exception:K(r)})}}},c.onunloadFlush=function(){if(!w)if(!1!==c._senderConfig.onunloadDisableBeacon()&&!1!==c._senderConfig.isBeaconApiDisabled()||!Ln())c.flush();else try{c.triggerSend(!0,n,2)}catch(e){j(c.diagLog(),1,20,"failed to flush with beacon sender on page unload, telemetry will not be collected: "+q(e),{exception:K(e)})}},c.addHeader=function(e,n){E[e]=n},c.initialize=function(e,n,t,r){c.isInitialized()&&j(c.diagLog(),1,28,"Sender is already initialized"),a.initialize(e,n,t,r);var i=c._getTelCtx(),o=c.identifier,t=(T=new ii(n.logger),I=null,S=0,c._sender=null,N=0,c.diagLog()),r=(D=_t(tt("Sender"),n.evtNamespace&&n.evtNamespace()),A=function(e){var n,t=wn(),r=Nn(),i=!1,o=!0,a=_t(tt("OfflineListener"),e);try{s(In())&&(i=!0),(i=!!(t&&(n=t.body||t).ononline&&s(n))||i)&&r&&!P(r.onLine)&&(o=r.onLine)}catch(l){i=!1}function s(e){var n=!1;return e&&(n=xt(e,"online",u,a))&&xt(e,"offline",c,a),n}function u(){o=!0}function c(){o=!1}return{isOnline:function(){var e=!0;return i?e=o:r&&!P(r.onLine)&&(e=r.onLine),e},isListening:function(){return i},unload:function(){var e=In();e&&i&&(ai(e,a),t&&!_e((e=t.body||t).ononline)&&ai(e,a),i=!1)}}}(D),U(pi(),function(e,n){c._senderConfig[e]=function(){return i.getConfig(o,e,n())}}),c._buffer=new(c._senderConfig.enableSessionStorageBuffer()&&Zt()?Gr:Xr)(t,c._senderConfig),c._sample=new li(c._senderConfig.samplingPercentage(),t),!P(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)||j(t,1,100,"Invalid Instrumentation key "+e.instrumentationKey),!ir(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()&&An()?n=x:!r.disableXhr()&&Dn()&&(n=f),!n&&Rn()&&(n=p),L=n||f,!r.isBeaconApiDisabled()&&Ln()&&(n=u),c._sender=n||f,R=!r.onunloadDisableFetch()&&Rn(!0)?d:Ln()?u:!r.disableXhr()&&An()?x:!r.disableXhr()&&Dn()?f:L},c.processTelemetry=function(e,t){t=c._getTelCtx(t);try{if(c._senderConfig.disableTelemetry())return;if(!e)return void j(t.diagLog(),1,7,"Cannot send empty telemetry");if(e.baseData&&!e.baseType)return void j(t.diagLog(),1,70,"Cannot send telemetry without baseData and baseType");if(e.baseType||(e.baseType="EventData"),!c._sender)return void j(t.diagLog(),1,28,"Sender was not initialized");if(!c._sample.isSampledIn(e))return void j(t.diagLog(),2,33,"Telemetry item was sampled out and not sent",{SampleRate:c._sample.sampleRate});e[Ht]=c._sample.sampleRate;var n=c._senderConfig.convertUndefined()||undefined,r=e.iKey||c._senderConfig.instrumentationKey(),i=mi.constructEnvelope(e,r,t.diagLog(),n);if(!i)return void j(t.diagLog(),1,47,"Unable to create an AppInsights envelope");var o=!1;if(e.tags&&e.tags[Vt]&&(O(e.tags[Vt],function(e){try{e&&!1===e(i)&&(o=!0,zn(t.diagLog(),"Telemetry processor check returns false"))}catch(n){j(t.diagLog(),1,64,"One of telemetry initializers failed, telemetry item will not be sent: "+q(n),{exception:K(n)},!0)}}),delete e.tags[Vt]),o)return;var a=T.serialize(i),s=c._buffer;s.size()+a.length>c._senderConfig.maxBatchSizeInBytes()&&c.triggerSend(!0,null,10),s.enqueue(a),m()}catch(u){j(t.diagLog(),2,12,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+q(u),{exception:K(u)})}c.processNext(e,t)},c._xhrReadyStateChange=function(e,n,t){4===e.readyState&&l(e.status,n,e.responseURL,t,_(e),di(e)||e.response)},c.triggerSend=function(e,n,t){if(void 0===e&&(e=!0),!w)try{var r,i=c._buffer;c._senderConfig.disableTelemetry()?i.clear():0<i.count()&&(r=i.getItems(),C(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=Nn()||{})?(n.userAgent||F).toLowerCase():F)||F).toLowerCase();if(be(n,vn))return e=wn()||{},Math.max(parseInt(n.split(vn)[1]),e.documentMode||0);if(be(n,mn)){e=parseInt(n.split(mn)[1]);if(e)return e+4}return null}();(!i||9<i)&&j(c.diagLog(),1,40,"Telemetry transmission failed, some telemetry will be lost: "+q(o),{exception:K(o)})}},c._doTeardown=function(e,n){c.onunloadFlush(),A.unload(),t()},c._onError=function(e,n,t){j(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,_(null,["partial success",n.itemsAccepted,"of",n.itemsReceived].join(" "))),0<r.length&&(v(r),j(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=di(e);!e||t+""!="200"&&""!==t?(t=g(t))&&t.itemsReceived&&t.itemsReceived>t.itemsAccepted&&!c._senderConfig.isRetryDisabled()?c._onPartialSuccess(n,t):c._onError(n,b(e)):(S=0,c._onSuccess(n,0))}}),M}N.Sender=Or;r=N,qr="__esModule",d={value:!0},b=Object.defineProperty;if(b)try{return void b(r,qr,d)}catch(hi){}typeof d.value!==undefined&&(r[qr]=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
|