@microsoft/applicationinsights-channel-js 2.8.0-beta.2203-13 → 2.8.0-beta.2203-14

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