@microsoft/applicationinsights-channel-js 2.7.5-nightly.2203-01 → 2.8.0-beta.2203-01

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.7.5-nightly.2203-01
2
+ * Application Insights JavaScript SDK - Channel, 2.8.0-beta.2203-01
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
- var e=this,t=function(_){"use strict";var R="function",A="object",L="undefined",a="prototype",F="hasOwnProperty",n=Object,E=n[a],K=n.assign,q=n.create,e=n.defineProperty,V=E[F],G=null;function W(e){return void 0===e&&(e=!0),G&&e||(typeof globalThis!==L&&globalThis&&(G=globalThis),typeof self!==L&&self&&(G=self),typeof window!==L&&window&&(G=window),typeof global!==L&&global&&(G=global)),G}function H(e){throw new TypeError(e)}(W()||{}).Symbol,(W()||{}).Reflect;var f=K||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])E[F].call(t,i)&&(e[i]=t[i]);return e},X=function(e,t){return(X=n.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t[F](n)&&(e[n]=t[n])})(e,t)};function t(e,t){function n(){this.constructor=e}typeof t!==R&&null!==t&&H("Class extends value "+t+" is not a constructor or null"),X(e,t),e[a]=null===t?function(e){if(q)return q(e);if(null==e)return{};var t=typeof e;function n(){}return t!==A&&t!==R&&H("Object prototype may only be an Object:"+e),n[a]=e,new n}(t):(n[a]=t[a],new n)}var Y="constructor",g="prototype",J="function",Z="_dynInstFuncs",$="_isDynProxy",Q="_dynClass",ee="_dynInstChk",te=ee,ne="_dfOpts",re="_unknown_",ie="__proto__",ae="useBaseInst",oe="setInstFuncs",se=Object,le=se.getPrototypeOf,ue=0;function m(e,t){return e&&se[g].hasOwnProperty.call(e,t)}function ce(e){return e&&(e===se[g]||e===Array[g])}function fe(e){return ce(e)||e===Function[g]}function de(e){if(e){if(le)return le(e);e=e[ie]||e[g]||(e[Y]?e[Y][g]:null);if(e)return e}return null}function pe(e,t){var n=[],r=se.getOwnPropertyNames;if(r)n=r(e);else for(var i in e)"string"==typeof i&&m(e,i)&&n.push(i);if(n&&0<n.length)for(var a=0;a<n.length;a++)t(n[a])}function ge(e,t,n){return t!==Y&&typeof e[t]===J&&(n||m(e,t))}function me(e){throw new TypeError("DynamicProto: "+e)}function he(e,t){for(var n=e.length-1;0<=n;n--)if(e[n]===t)return 1}function ve(e,t){return m(e,g)?e.name||t||re:((e||{})[Y]||{}).name||t||re}function h(e,r,t,n){m(e,g)||me("theClass is an invalid class definition.");var i,a,o,s,l,u,c=e[g],f=(function(e){if(le)for(var t=[],n=de(r);n&&!fe(n)&&!he(t,n);){if(n===e)return 1;t.push(n),n=de(n)}}(c)||me("["+ve(e)+"] is not in class hierarchy of ["+ve(r)+"]"),null),e=(m(c,Q)?f=c[Q]:(f="_dynCls$"+ve(e,"_")+"$"+ue,ue++,c[Q]=f),h[ne]),d=!!e[ae],p=(d&&n&&n[ae]!==undefined&&(d=!!n[ae]),a={},pe(i=r,function(e){!a[e]&&ge(i,e,!1)&&(a[e]=i[e])}),a),d=(t(r,function(e,t,n,a){function r(e,t,n){var r,i=t[n];return i[$]&&a&&!1!==(r=e[Z]||{})[te]&&(i=(r[t[Q]]||{})[n]||i),function(){return i.apply(e,arguments)}}for(var i={},o=(pe(n,function(e){i[e]=r(t,n,e)}),de(e)),s=[];o&&!fe(o)&&!he(s,o);)pe(o,function(e){!i[e]&&ge(o,e,!le)&&(i[e]=r(t,o,e))}),s.push(o),o=de(o);return i}(c,r,p,d)),!!le&&!!e[oe]);o=c,t=f,s=r,l=p,e=!1!==(d=d&&n?!!n[oe]:d),ce(o)||(c=s[Z]=s[Z]||{},u=c[t]=c[t]||{},!1!==c[te]&&(c[te]=!!e),pe(s,function(e){var n,r,i;ge(s,e,!1)&&s[e]!==l[e]&&(u[e]=s[e],delete s[e],m(o,e)&&(!o[e]||o[e][$])||(o[e]=(n=o,r=e,(i=function(){var e,t;return(function(e,t,n,r){var i=null;if(e&&m(n,Q)){var a=e[Z]||{};if((i=(a[n[Q]]||{})[t])||me("Missing ["+t+"] "+J),!i[ee]&&!1!==a[te]){for(var o=!m(e,t),s=de(e),l=[];o&&s&&!fe(s)&&!he(l,s);){var u=s[t];if(u){o=u===r;break}l.push(s),s=de(s)}try{o&&(e[t]=i),i[ee]=1}catch(c){a[te]=!1}}}return i}(this,r,n,i)||(typeof(t=(t=n[e=r])===i?de(n)[e]:t)!==J&&me("["+e+"] is not a "+J),t)).apply(this,arguments)})[$]=1,i)))}))}h[ne]={setInstFuncs:!0,useBaseInst:!0},(be=M=M||{})[be.CRITICAL=1]="CRITICAL",be[be.WARNING=2]="WARNING";var M,D={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},ye="on",Ie="attachEvent",Ce="addEventListener",Se="toISOString",Te="indexOf",we="trim",be="toString",xe=e,Ne=n.keys,_e=String[a][we],Re=Date[a][Se],e=Array.isArray,Ae=E[be];function Le(e){return e===undefined||typeof e===L}function B(e){return null===e||Le(e)}function Fe(e){return!(!e||typeof e!==A)}function d(e){return!(!e||typeof e!==R)}function Ee(e,t,n,r){void 0===r&&(r=!1);var i=!1;if(!B(e))try{B(e[Ce])?B(e[Ie])||(e[Ie](ye+t,n),i=!0):(e[Ce](t,n,r),i=!0)}catch(a){}return i}function k(e,t){if(e)for(var n in e)V.call(e,n)&&t.call(e,n,e[n])}function Me(e,t){return e&&t&&~e.indexOf(t)}V[be].call(n);var P=e||function(e){return!(!e||"[object Array]"!==Ae.call(e))};function De(e){return e&&"[object Error]"===Ae.call(e)}function v(e){return"string"==typeof e}function Be(e){if(e){if(Re)return e[Se]();var t;return e&&e.getUTCFullYear?(t=function(e){e=""+e;return 1===e.length?"0"+e:e},e.getUTCFullYear()+"-"+t(1+e.getUTCMonth())+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+(e.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"):void 0}}function O(e,t,n){var r=e.length;try{for(var i=0;i<r&&!(i in e&&-1===t.call(n||e,e[i],i,e));i++);}catch(a){}}function ke(e,t,n){if(e){if(e.map)return e.map(t,n);var r=e.length,i=n||e,a=Array(r);try{for(var o=0;o<r;o++)o in e&&(a[o]=t.call(i,e[o],e))}catch(s){}}return a}function Pe(e){return e&&(_e&&e[we]?e[we]():e.replace?e.replace(/^\s+|\s+$/g,""):e)}var Oe=!{toString:null}.propertyIsEnumerable("toString"),Ue=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];function ze(e){var t=typeof e;if(t===R||t===A&&null!==e||H("objKeys called on non-object"),!Oe&&Ne)return Ne(e);var n,r=[];for(n in e)e&&V.call(e,n)&&r.push(n);if(Oe)for(var i=Ue.length,a=0;a<i;a++)e&&V.call(e,Ue[a])&&r.push(Ue[a]);return r}function je(){var e=Date;return e.now?e.now():(new e).getTime()}function U(e){return De(e)?e.name:""}function Ke(e,t,n,r,i){var a=n;!e||(a=e[t])===n||i&&!i(a)||r&&!r(n)||(e[t]=a=n)}function qe(e){return!!e}function Ve(e){return e&&K?n(K({},e)):e}var Ge="window",We="navigator",He="JSON",Xe="trident/",Ye=null,Je=null;function Ze(e,t){var n,r=!1;if(e){try{(r=t in e)||(n=e[a])&&(r=t in n)}catch(i){}if(!r)try{r=!Le((new e)[t])}catch(i){}}return r}function u(e){var t=W();return t&&t[e]?t[e]:e===Ge&&$e()?window:null}function $e(){return typeof window===A&&window}function Qe(){return $e()?window:u(Ge)}function et(){return typeof document===A&&document?document:u("document")}function tt(){return!(typeof navigator!==A||!navigator)}function nt(){return tt()?navigator:u(We)}function rt(){return typeof JSON===A&&JSON||null!==u(He)}function z(){return rt()?JSON||u(He):null}function j(e){var t=Object[a].toString.call(e),n="";return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":rt()&&(n=z().stringify(e)),t+n}function it(){return Je=null===Je?tt()&&!!nt().sendBeacon:Je}function at(e){var t=!1;try{var t=!!u("fetch"),n=u("Request");t&&e&&n&&(t=Ze(n,"keepalive"))}catch(r){}return t}function ot(){return Ye=null===Ye&&(Ye="undefined"!=typeof XDomainRequest)&&st()?Ye&&!Ze(u("XMLHttpRequest"),"withCredentials"):Ye}function st(){var e=!1;try{e=!!u("XMLHttpRequest")}catch(t){}return e}var lt=null;function ut(e){return e?'"'+e.replace(/\"/g,"")+'"':""}function ct(e,t){var n,r=typeof console!==L?console:u("console");r&&(n="log",d(r[n=r[e]?e:n])&&r[n](t))}dt.dataType="MessageData";var ft=dt;function dt(e,t,n,r){void 0===n&&(n=!1),this.messageId=e,this.message=(n?"AI: ":"AI (Internal): ")+e;n="",rt()&&(n=z().stringify(r)),e=(t?" message:"+ut(t):"")+(r?" props:"+ut(n):"");this.message+=e}function pt(e,t){return(e||{}).logger||new gt(t)}var gt=function xr(i){this.identifier="DiagnosticLogger",this.queue=[];var s=0,l={};h(xr,this,function(a){function e(e,t){e=i[e];return B(e)?t:e}function o(e,t){var n,r=(n=(n=lt)||!0===i.disableDbgExt?n:lt||(r=u("Microsoft"),lt=r?r.ApplicationInsights:lt))?n.ChromeDbgExt:null;r&&r.diagLog&&r.diagLog(e,t)}B(i)&&(i={}),a.consoleLoggingLevel=function(){return e("loggingLevelConsole",0)},a.telemetryLoggingLevel=function(){return e("loggingLevelTelemetry",1)},a.maxInternalMessageLimit=function(){return e("maxMessageLimit",25)},a.enableDebugExceptions=function(){return e("enableDebugExceptions",!1)},a.throwInternal=function(e,t,n,r,i){t=new ft(t,n,i=void 0!==i&&i,r);if(a.enableDebugExceptions())throw t;n=e===M.CRITICAL?"errorToConsole":"warnToConsole";Le(t.message)?o("throw"+(e===M.CRITICAL?"Critical":"Warning"),t):(r=a.consoleLoggingLevel(),i?(i=+t.messageId,!l[i]&&e<=r&&(a[n](t.message),l[i]=!0)):e<=r&&a[n](t.message),a.logInternalMessage(e,t))},a.warnToConsole=function(e){ct("warn",e),o("warning",e)},a.errorToConsole=function(e){ct("error",e),o("error",e)},a.resetInternalMessageCount=function(){s=0,l={}},a.logInternalMessage=function(e,t){var n,r;s>=a.maxInternalMessageLimit()||(r=!0,n="AITR_"+t.messageId,l[n]?r=!1:l[n]=!0,r&&(e<=a.telemetryLoggingLevel()&&(a.queue.push(t),s++,o(e===M.CRITICAL?"error":"warn",t)),s===a.maxInternalMessageLimit()&&(r=new ft(D.MessageLimitPerPVExceeded,n="Internal events throttle limit per PageView reached for this app.",!1),a.queue.push(r),e===M.CRITICAL?a.errorToConsole(n):a.warnToConsole(n))))}})},mt=(s.ParentContextKey="parent",s.ChildrenContextKey="childEvts",s);function s(e,i,t){var r,a=this,o=!1;a.start=je(),a.name=e,a.isAsync=t,a.isChildEvt=function(){return!1},d(i)&&(o=function(e){if(xe)try{var t={enumerable:!0,configurable:!0,get:function(){return!r&&d(i)&&(r=i(),i=null),r}};return xe(e,"payload",t),!0}catch(n){}return!1}(a)),a.getCtx=function(e){return e?(e===s.ParentContextKey||e===s.ChildrenContextKey?a:a.ctx||{})[e]:null},a.setCtx=function(e,t){e&&(e===s.ParentContextKey?(a[e]||(a.isChildEvt=function(){return!0}),a[e]=t):e===s.ChildrenContextKey?a[e]=t:(a.ctx=a.ctx||{})[e]=t)},a.complete=function(){var e=0,t=a.getCtx(s.ChildrenContextKey);if(P(t))for(var n=0;n<t.length;n++){var r=t[n];r&&(e+=r.time)}a.time=je()-a.start,a.exTime=a.time-e,a.complete=function(){},!o&&d(i)&&(a.payload=i())}}var ht="CoreUtils.doPerf";function vt(e,t,n,r,i){if(e)if(e=d(e.getPerfMgr)?e.getPerfMgr():e){var a,o=void 0,s=e.getCtx(ht);try{if(o=e.create(t(),r,i))return s&&o.setCtx&&(o.setCtx(mt.ParentContextKey,s),s.getCtx&&s.setCtx&&((a=s.getCtx(mt.ChildrenContextKey))||(a=[],s.setCtx(mt.ChildrenContextKey,a)),a.push(o))),e.setCtx(ht,o),n(o)}catch(l){o&&o.setCtx&&o.setCtx("exception",l)}finally{o&&e.fire(o),e.setCtx(ht,s)}}n()}var yt=function(i,t){var a=this,o=null,s=d(i.processTelemetry),l=d(i.setNextPlugin);a._hasRun=!1,a.getPlugin=function(){return i},a.getNext=function(){return o},a.setNext=function(e){o=e},a.processTelemetry=function(n,r){r=r||t;var e=i?i.identifier:"TelemetryPluginChain";vt(r?r.core():null,function(){return e+":processTelemetry"},function(){if(i&&s){a._hasRun=!0;try{r.setNext(o),l&&i.setNextPlugin(o),o&&(o._hasRun=!1),i.processTelemetry(n,r)}catch(t){var e=o&&o._hasRun;o&&e||r.diagLog().throwInternal(M.CRITICAL,D.PluginException,"Plugin ["+i.identifier+"] failed during processTelemetry - "+j(t)),o&&!e&&o.processTelemetry(n,r)}}else o&&(a._hasRun=!0,o.processTelemetry(n,r))},function(){return{item:n}},!n.sync)}};function It(e,t){var n=[];if(e&&0<e.length)for(var r=null,i=0;i<e.length;i++){var a=e[i];a&&d(a.processTelemetry)&&(a=new yt(a,t),n.push(a),r&&r.setNext(a),r=a)}return 0<n.length?n[0]:null}var Ct=function Nr(e,i,n,t){var r,a,o,s,l=this,u=null;null!==t&&(e&&d(e.getPlugin)?u=function(e,t,n){var r=[],i=!n;if(e)for(;e;){var a=e.getPlugin();!i&&a!==n||(i=!0,r.push(a)),e=e.getNext()}return i||r.push(n),It(r,t)}(e,l,t||e.getPlugin()):t?(r=l,o=e,s=!1,(a=t)&&e&&(o=[],O(e,function(e){!s&&e!==a||(s=!0,o.push(e))})),a&&!s&&(o=o||[]).push(a),u=It(o,r)):Le(t)&&(u=It(e,l))),l.core=function(){return n},l.diagLog=function(){return pt(n,i)},l.getCfg=function(){return i},l.getExtCfg=function(e,t){var n,r;return void 0===t&&(t={}),(n=i&&(r=i.extensionConfig)&&e?r[e]:n)||t},l.getConfig=function(e,t,n){void 0===n&&(n=!1);var r,e=l.getExtCfg(e,null);return e&&!B(e[t])?r=e[t]:i&&!B(i[t])&&(r=i[t]),B(r)?n:r},l.hasNext=function(){return null!=u},l.getNext=function(){return u},l.setNext=function(e){u=e},l.processNext=function(e){var t=u;t&&(u=t.getNext(),t.processTelemetry(e,l))},l.createNew=function(e,t){return new Nr((e=void 0===e?null:e)||u,i,n,t)}},St="getPlugin",be=(Tt.prototype.initialize=function(e,t,n,r){this._baseTelInit(e,t,n,r)},Tt);function Tt(){var a=this,o=!1,s=null,l=null;a.core=null,a.diagLog=function(e){return a._getTelCtx(e).diagLog()},a.isInitialized=function(){return o},a.setInitialized=function(e){o=e},a.setNextPlugin=function(e){l=e},a.processNext=function(e,t){t?t.processNext(e):l&&d(l.processTelemetry)&&l.processTelemetry(e,null)},a._getTelCtx=function(e){var t,e=e=void 0===e?null:e;return e||(t=s||new Ct(null,{},a.core),e=l&&l[St]?t.createNew(null,l[St]):t.createNew(null,l)),e},a._baseTelInit=function(e,t,n,r){e&&Ke(e,"extensionConfig",[],null,B),!r&&t&&(r=t.getProcessTelContext().getNext());var i=l;l&&l[St]&&(i=l[St]()),a.core=t,s=new Ct(r,e,t,i),o=!0}}function wt(e,t,n){var r,i,a=t.length,o=(e=e,(t=t)&&150<(t=Pe(t.toString())).length&&(i=t.substring(0,150),e&&e.throwInternal(M.WARNING,D.NameTooLong,"name is too long. It has been truncated to 150 characters.",{name:t},!0)),i||t);if(o.length!==a){for(var s=0,l=o;n[l]!==undefined;)s++,l=o.substring(0,147)+(r=void 0,(r="00"+s).substr(r.length-3));o=l}return o}function y(e,t,n){var r;return void 0===n&&(n=1024),t&&(n=n||1024,(t=Pe(t)).toString().length>n&&(r=t.toString().substring(0,n),e&&e.throwInternal(M.WARNING,D.StringValueTooLong,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),r||t}function bt(e,t){return Rt(e,t,2048,D.UrlTooLong)}function xt(e,t){var n;return t&&32768<t.length&&(n=t.substring(0,32768),e&&e.throwInternal(M.WARNING,D.MessageTruncated,"message is too long, it has been truncated to 32768 characters.",{message:t},!0)),n||t}function Nt(r,e){var i;return e&&(i={},k(e,function(e,t){if(Fe(t)&&rt())try{t=z().stringify(t)}catch(n){r&&r.throwInternal(M.WARNING,D.CannotSerializeObjectNonSerializable,"custom property is not valid",{exception:n},!0)}t=y(r,t,8192),e=wt(r,e,i),i[e]=t}),e=i),e}function _t(n,e){var r;return e&&(r={},k(e,function(e,t){e=wt(n,e,r),r[e]=t}),e=r),e}function Rt(e,t,n,r){var i;return t&&(t=Pe(t)).length>n&&(i=t.substring(0,n),e&&e.throwInternal(M.WARNING,r,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),i||t}function At(e){var t=""+Math.floor((e=Math.round(e=isNaN(e)||e<0?0:e))/1e3)%60,n=""+Math.floor(e/6e4)%60,r=""+Math.floor(e/36e5)%24,i=Math.floor(e/864e5),e=1===(e=""+e%1e3).length?"00"+e:2===e.length?"0"+e:e,t=t.length<2?"0"+t:t,n=n.length<2?"0"+n:n;return(0<i?i+".":"")+(r=r.length<2?"0"+r:r)+":"+n+":"+t+"."+e}var Lt,Ft="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",Et="sampleRate",Mt="ProcessLegacy",Dt="http.method",p="not_specified",Bt=((e=Lt=Lt||{})[e.LocalStorage=0]="LocalStorage",e[e.SessionStorage=1]="SessionStorage",undefined);function kt(e){try{if(B(W()))return null;var t=new Date,n=u(e===Lt.LocalStorage?"localStorage":"sessionStorage"),r=(n.setItem(t.toString(),t.toString()),n.getItem(t.toString())!==t.toString());if(n.removeItem(t.toString()),!r)return n}catch(i){}return null}function Pt(){return Ot()?kt(Lt.SessionStorage):null}function Ot(){return Bt=Bt===undefined?!!kt(Lt.SessionStorage):Bt}function Ut(e,t){var n=Pt();if(null!==n)try{return n.getItem(t)}catch(r){Bt=!1,e.throwInternal(M.WARNING,D.BrowserCannotReadSessionStorage,"Browser failed read of session storage. "+U(r),{exception:j(r)})}return null}function zt(e,t,n){var r=Pt();if(null!==r)try{r.setItem(t,n)}catch(i){Bt=!1,e.throwInternal(M.WARNING,D.BrowserCannotWriteSessionStorage,"Browser failed write to session storage. "+U(i),{exception:j(i)})}}var jt=et()||{},Kt=0,qt=[null,null,null,null,null];var Vt=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"];function Gt(e){return~Vt.indexOf(e.toLowerCase())}t(Ht,Wt=function(){});var Wt,e=Ht;function Ht(){return Wt.call(this)||this}t(Jt,Xt=function(){this.ver=1,this.sampleRate=100,this.tags={}});var Xt,Yt=Jt;function Jt(e,t,n){var r=Xt.call(this)||this;return r.name=y(e,n)||p,r.data=t,r.time=Be(new Date),r.aiDataContract={time:1,iKey:1,name:1,sampleRate:function(){return 100===r.sampleRate?4:1},tags:1,data:1},r}var Zt,r=function(){this.ver=2,this.properties={},this.measurements={}},$t=(t(Qt,Zt=r),Qt.envelopeType="Microsoft.ApplicationInsights.{0}.Event",Qt.dataType="EventData",Qt);function Qt(e,t,n,r){var i=Zt.call(this)||this;return i.aiDataContract={ver:1,name:1,properties:0,measurements:0},i.name=y(e,t)||p,i.properties=Nt(e,n),i.measurements=_t(e,r),i}var en="error",l="stack",tn="stackDetails",nn="errorSrc",rn="message",an="description";function on(e,t){var n=e;return n&&!v(n)&&(JSON&&JSON.stringify?(n=JSON.stringify(e),!t||n&&"{}"!==n||(n=d(e.toString)?e.toString():""+e)):n=e+" - (Missing JSON.stringify)"),n||""}function sn(e,t){var n=e;return e&&((n=n&&!v(n)&&(e[rn]||e[an])||n)&&!v(n)&&(n=on(n,!0)),e.filename&&(n=n+" @"+(e.filename||"")+":"+(e.lineno||"?")+":"+(e.colno||"?"))),(t&&"String"!==t&&"Object"!==t&&"Error"!==t&&!~(n||"").indexOf(t)?t+": "+n:n)||""}function ln(e){return e&&e.src&&v(e.src)&&e.obj&&P(e.obj)}function un(e){var e=e||"",t=(e=v(e)?e:v(e[l])?e[l]:""+e).split("\n");return{src:e,obj:t}}function cn(e){var t,n=null;if(e)try{e[l]?n=un(e[l]):e[en]&&e[en][l]?n=un(e[en][l]):e.exception&&e.exception[l]?n=un(e.exception[l]):ln(e)?n=e:ln(e[tn])?n=e[tn]:window&&window.opera&&e[rn]?n=function(e){for(var t=[],n=e.split("\n"),r=0;r<n.length;r++){var i=n[r];n[r+1]&&(i+="@"+n[r+1],r++),t.push(i)}return{src:e,obj:t}}(e.message):v(e)?n=un(e):(t=e[rn]||e[an]||"",v(e[nn])&&(t&&(t+="\n"),t+=" from "+e[nn]),t&&(n=un(t)))}catch(r){n=un(r)}return n||{src:"",obj:null}}function fn(e){var t="";if(e&&!(t=e.typeName||e.name||""))try{var n=/function (.{1,200})\(/.exec(e.constructor.toString()),t=n&&1<n.length?n[1]:""}catch(r){}return t}function dn(e){if(e)try{var t,n;if(!v(e))return t=fn(e),(n=on(e,!1))&&"{}"!==n||(e[en]&&(t=fn(e=e[en])),n=on(e,!0)),n.indexOf(t)&&"String"!==t?t+":"+n:n}catch(r){}return""+(e||"")}t(o,pn=function(){this.ver=2,this.exceptions=[],this.properties={},this.measurements={}}),o.CreateAutoException=function(e,t,n,r,i,a,o,s){var l=fn(i||a||e);return{message:sn(e,l),url:t,lineNumber:n,columnNumber:r,error:dn(i||a||e),evt:dn(a||e),typeName:l,stackDetails:cn(o||i||a),errorSrc:s}},o.CreateFromInterface=function(t,e,n,r){var i=e.exceptions&&ke(e.exceptions,function(e){return hn.CreateFromInterface(t,e)});return new o(t,f(f({},e),{exceptions:i}),n,r)},o.prototype.toInterface=function(){var e=this,t=e.exceptions,n=e.properties,r=e.measurements,i=e.severityLevel,a=e.problemGroup,o=e.id,e=e.isManual;return{ver:"4.0",exceptions:t instanceof Array&&ke(t,function(e){return e.toInterface()})||undefined,severityLevel:i,properties:n,measurements:r,problemGroup:a,id:o,isManual:e}},o.CreateSimpleException=function(e,t,n,r,i,a){return{exceptions:[{hasFullStack:!0,message:e,stack:i,typeName:t}]}},o.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",o.dataType="ExceptionData",o.formatError=dn;var pn,gn=o;function o(e,t,n,r,i,a){var o=pn.call(this)||this;return o.aiDataContract={ver:1,exceptions:1,severityLevel:0,properties:0,measurements:0},function(e){try{if(Fe(e))return"ver"in e&&"exceptions"in e&&"properties"in e}catch(t){}}(t)?(o.exceptions=t.exceptions,o.properties=t.properties,o.measurements=t.measurements,t.severityLevel&&(o.severityLevel=t.severityLevel),t.id&&(o.id=t.id),t.problemGroup&&(o.problemGroup=t.problemGroup),o.ver=2,B(t.isManual)||(o.isManual=t.isManual)):(o.exceptions=[new hn(e,t,n=n||{})],o.properties=Nt(e,n),o.measurements=_t(e,r),i&&(o.severityLevel=i),a&&(o.id=a)),o}t(vn,mn=function(){this.hasFullStack=!0,this.parsedStack=[]}),vn.prototype.toInterface=function(){var e=this.parsedStack instanceof Array&&ke(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[l],parsedStack:e||undefined}},vn.CreateFromInterface=function(e,t){var n=t.parsedStack instanceof Array&&ke(t.parsedStack,function(e){return Cn.CreateFromInterface(e)})||t.parsedStack;return new vn(e,f(f({},t),{parsedStack:n}))};var mn,hn=vn;function vn(e,t,n){var u,r,i,a,o,s=mn.call(this)||this;return s.aiDataContract={id:0,outerId:0,typeName:1,message:1,hasFullStack:0,stack:0,parsedStack:2},function(e){try{if(Fe(e))return"hasFullStack"in e&&"typeName"in e}catch(t){}}(t)?(s.typeName=t.typeName,s.message=t.message,s[l]=t[l],s.parsedStack=t.parsedStack,s.hasFullStack=t.hasFullStack):(r=(a=t)&&a.evt,De(a)||(a=a[en]||r||a),s.typeName=y(e,fn(a))||p,s.message=xt(e,sn(t||a,s.typeName))||p,u=t[tn]||cn(t),s.parsedStack=function(){var e=u.obj;if(e&&0<e.length){var t=[],n=0,r=0;if(O(e,function(e){var e=e.toString();Cn.regex.test(e)&&(e=new Cn(e,n++),r+=e.sizeInBytes,t.push(e))}),32768<r)for(var i=0,a=t.length-1,o=0,s=i,l=a;i<a;){if(32768<(o+=t[i].sizeInBytes+t[a].sizeInBytes)){t.splice(s,l-s+1);break}s=i,l=a,i++,a--}}return t}(),s[l]=(r=e,o="",(a=u)&&(a.obj?O(a.obj,function(e){o+=e+"\n"}):o=a.src||""),(t=o)&&32768<(e=""+t).length&&(i=e.substring(0,32768),r&&r.throwInternal(M.WARNING,D.ExceptionTruncated,"exception is too long, it has been truncated to 32768 characters.",{exception:t},!0)),i||t),s.hasFullStack=P(s.parsedStack)&&0<s.parsedStack.length,n&&(n.typeName=n.typeName||s.typeName)),s}t(i,yn=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 yn,In,Cn=i;function i(e,t){var n,r=yn.call(this)||this;return r.sizeInBytes=0,r.aiDataContract={level:1,method:1,assembly:0,fileName:0,line:0},"string"==typeof e?(n=e,r.level=t,r.method="<no_method>",r.assembly=Pe(n),r.fileName="",r.line=0,(t=n.match(i.regex))&&5<=t.length&&(r.method=Pe(t[2])||r.method,r.fileName=Pe(t[4]),r.line=parseInt(t[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}In=0,t(wn,Sn=function(){this.kind=In});var Sn,Tn=wn;function wn(){var e=null!==Sn&&Sn.apply(this,arguments)||this;return e.aiDataContract={name:1,kind:0,value:1,count:0,min:0,max:0,stdDev:0},e}t(Nn,bn=function(){this.ver=2,this.metrics=[],this.properties={},this.measurements={}}),Nn.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",Nn.dataType="MetricData";var bn,xn=Nn;function Nn(e,t,n,r,i,a,o,s,l){var u=bn.call(this)||this,c=(u.aiDataContract={ver:1,metrics:1,properties:0},new Tn);return c.count=0<r?r:undefined,c.max=isNaN(a)||null===a?undefined:a,c.min=isNaN(i)||null===i?undefined:i,c.name=y(e,t)||p,c.value=n,c.stdDev=isNaN(o)||null===o?undefined:o,u.metrics=[c],u.properties=Nt(e,s),u.measurements=_t(e,l),u}t(Rn,_n=r);var _n,r=Rn;function Rn(){var e=_n.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}t(Fn,An=r),Fn.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",Fn.dataType="PageviewData";var An,Ln=Fn;function Fn(e,t,n,r,i,a,o){var s=An.call(this)||this;return s.aiDataContract={ver:1,name:0,url:0,duration:0,properties:0,measurements:0,id:0},s.id=o&&Rt(e,o,128,D.IdTooLong).toString(),s.url=bt(e,n),s.name=y(e,t)||p,isNaN(r)||(s.duration=At(r)),s.properties=Nt(e,i),s.measurements=_t(e,a),s}t(Dn,En=function(){this.ver=2,this.success=!0,this.properties={},this.measurements={}}),Dn.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",Dn.dataType="RemoteDependencyData";var En,Mn=Dn;function Dn(e,t,n,r,i,a,o,s,l,u,c,f){void 0===l&&(l="Ajax");var d,p,g,m=En.call(this)||this,n=(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=t,m.duration=At(i),m.success=a,m.resultCode=o+"",m.type=y(e,l),t=e,i=s,l=o=a=r,o=(s=n)&&0<s.length?(d=s,g=(n=qt)[p=Kt],jt.createElement?n[p]||(g=n[p]=jt.createElement("a")):g={host:function(){e=null,d&&null!=(n=d.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i))&&2<n.length&&v(n[2])&&0<n[2].length&&(e=n[2]||"",2<n.length&&(t=(n[1]||"").toLowerCase(),n=n[3]||"",e+=n="http"==t&&":80"===n||"https"==t&&":443"===n?"":n));var e,t=e||"";if(t){var n=t.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i);if(null!=n&&3<n.length&&v(n[2])&&0<n[2].length)return n[2]+(n[3]||"")}return t}()},g.href=d,++p>=n.length&&(p=0),Kt=p,p=(n=g).host,o||(null!=n.pathname?("/"!=((g=0===n.pathname.length?"/":n.pathname)[0]||"")&&(g="/"+g),l=n.pathname,y(t,i?i+" "+g:g)):y(t,s))):p=a,{target:p,name:o,data:l});return m.data=bt(e,r)||n.data,m.target=y(e,n.target),u&&(m.target="".concat(m.target," | ").concat(u)),m.name=y(e,n.name),m.properties=Nt(e,c),m.measurements=_t(e,f),m}t(On,Bn=function(){this.ver=2,this.properties={},this.measurements={}}),On.envelopeType="Microsoft.ApplicationInsights.{0}.Message",On.dataType="MessageData";var Bn,kn,Pn=On;function On(e,t,n,r,i){var a=Bn.call(this)||this;return a.aiDataContract={ver:1,message:1,severityLevel:0,properties:0},a.message=xt(e,t=t||p),a.properties=Nt(e,r),a.measurements=_t(e,i),n&&(a.severityLevel=n),a}function Un(){var e=kn.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}t(Un,kn=r),t(Kn,zn=Un),Kn.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",Kn.dataType="PageviewPerformanceData";var zn,jn=Kn;function Kn(e,t,n,r,i,a,o){var s=zn.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=bt(e,n),s.name=y(e,t)||p,s.properties=Nt(e,i),s.measurements=_t(e,a),o&&(s.domProcessing=o.domProcessing,s.duration=o.duration,s.networkConnect=o.networkConnect,s.perfTotal=o.perfTotal,s.receivedResponse=o.receivedResponse,s.sentRequest=o.sentRequest),s}t(Gn,qn=e);var qn,Vn=Gn;function Gn(e,t){var n=qn.call(this)||this;return n.aiDataContract={baseType:1,baseData:1},n.baseType=e,n.baseData=t,n}function c(e){var t="ai."+e+".";return function(e){return t+e}}var Wn,Hn,r=c("application"),e=c("device"),Xn=c("location"),I=c("operation"),Yn=c("session"),C=c("user"),S=c("cloud"),Jn=c("internal"),Zn=(Hn={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:Xn("ip"),locationCountry:Xn("country"),locationProvince:Xn("province"),locationCity:Xn("city"),operationId:I("id"),operationName:I("name"),operationParentId:I("parentId"),operationRootId:I("rootId"),operationSyntheticSource:I("syntheticSource"),operationCorrelationVector:I("correlationVector"),sessionId:Yn("id"),sessionIsFirst:Yn("isFirst"),sessionIsNew:Yn("isNew"),userAccountAcquisitionDate:C("accountAcquisitionDate"),userAccountId:C("accountId"),userAgent:C("userAgent"),userId:C("id"),userStoreRegion:C("storeRegion"),userAuthUserId:C("authUserId"),userAnonymousUserAcquisitionDate:C("anonUserAcquisitionDate"),userAuthenticatedUserAcquisitionDate:C("authUserAcquisitionDate"),cloudName:S("name"),cloudRole:S("role"),cloudRoleVer:S("roleVer"),cloudRoleInstance:S("roleInstance"),cloudEnvironment:S("environment"),cloudLocation:S("location"),cloudDeploymentUnit:S("deploymentUnit"),internalNodeName:Jn("nodeName"),internalSdkVersion:Jn("sdkVersion"),internalAgentVersion:Jn("agentVersion"),internalSnippet:Jn("snippet"),internalSdkSrc:Jn("sdkSrc")},t($n,Wn=function(){var n=this;k(Hn,function(e,t){n[e]=t})}),$n);function $n(){return Wn.call(this)||this}var Qn,T=new Zn,r=function _r(n,r){var i=[],a=!1;this._get=function(){return i},this._set=function(e){return i=e},h(_r,this,function(t){t.enqueue=function(e){t.count()>=r.eventsLimitInMem()?a||(n.throwInternal(M.WARNING,D.InMemoryStorageBufferFull,"Maximum in-memory buffer size reached: "+t.count(),!0),a=!0):i.push(e)},t.count=function(){return i.length},t.size=function(){for(var e=i.length,t=0;t<i.length;t++)e+=i[t].length;return r.emitLineDelimitedJson()||(e+=2),e},t.clear=function(){a=!(i=[])},t.getItems=function(){return i.slice(0)},t.batchPayloads=function(e){return e&&0<e.length?r.emitLineDelimitedJson()?e.join("\n"):"["+e.join(",")+"]":null}})},er=(t(tr,Qn=r),tr);function tr(e,t){e=Qn.call(this,e,t)||this;return h(tr,e,function(e,t){e.markAsSent=function(e){t.clear()},e.clearSent=function(e){}}),e}t(w,nr=r),w.BUFFER_KEY="AI_buffer",w.SENT_BUFFER_KEY="AI_sentBuffer",w.MAX_BUFFER_SIZE=2e3;var nr,rr=w;function w(s,l){var e=nr.call(this,s,l)||this,u=!1;return h(w,e,function(n,t){var e=a(w.BUFFER_KEY),r=a(w.SENT_BUFFER_KEY),r=n._set(e.concat(r));function i(t,e){var n=[];return O(e,function(e){d(e)||-1!==function(e,t){if(e){if(e[Te])return e[Te](t,void 0);var n=e.length;try{for(var r=0;r<n;r++)if(r in e&&e[r]===t)return r}catch(i){}}return-1}(t,e)||n.push(e)}),n}function a(e){try{var e=l.namePrefix&&l.namePrefix()?l.namePrefix()+"_"+e:e,t=Ut(s,e);if(t){var n=z().parse(t);if((n=v(n)?z().parse(n):n)&&P(n))return n}}catch(r){s.throwInternal(M.CRITICAL,D.FailedToRestoreStorageBuffer," storage key: "+e+", "+U(r),{exception:j(r)})}return[]}function o(e,t){try{var e=l.namePrefix&&l.namePrefix()?l.namePrefix()+"_"+e:e,n=JSON.stringify(t);zt(s,e,n)}catch(r){zt(s,e,JSON.stringify([])),s.throwInternal(M.WARNING,D.FailedToSetStorageBuffer," storage key: "+e+", "+U(r)+". Buffer cleared",{exception:j(r)})}}r.length>w.MAX_BUFFER_SIZE&&(r.length=w.MAX_BUFFER_SIZE),o(w.SENT_BUFFER_KEY,[]),o(w.BUFFER_KEY,r),n.enqueue=function(e){n.count()>=w.MAX_BUFFER_SIZE?u||(s.throwInternal(M.WARNING,D.SessionStorageBufferFull,"Maximum buffer size reached: "+n.count(),!0),u=!0):(t.enqueue(e),o(w.BUFFER_KEY,n._get()))},n.clear=function(){t.clear(),o(w.BUFFER_KEY,n._get()),o(w.SENT_BUFFER_KEY,[]),u=!1},n.markAsSent=function(e){o(w.BUFFER_KEY,n._set(i(e,n._get())));var t=a(w.SENT_BUFFER_KEY);t instanceof Array&&e instanceof Array&&((t=t.concat(e)).length>w.MAX_BUFFER_SIZE&&(s.throwInternal(M.CRITICAL,D.SessionStorageBufferFull,"Sent buffer reached its maximum size: "+t.length,!0),t.length=w.MAX_BUFFER_SIZE),o(w.SENT_BUFFER_KEY,t))},n.clearSent=function(e){e=i(e,a(w.SENT_BUFFER_KEY));o(w.SENT_BUFFER_KEY,e)}}),e}var ir="baseType",b="baseData",x="properties",ar="true";function N(e,t,n){Ke(e,t,n,qe)}function or(e,n,r){B(e)||k(e,function(e,t){"number"==typeof t?r[e]=t:v(t)?n[e]=t:rt()&&(n[e]=z().stringify(t))})}function sr(n,r){B(n)||k(n,function(e,t){n[e]=t||r})}function lr(e,t,n,r){for(var r=new Yt(e,r,t),t=(N(r,"sampleRate",n[Et]),(n[b]||{}).startTime&&(r.time=Be(n[b].startTime)),r.iKey=n.iKey,n.iKey.replace(/-/g,"")),t=(r.name=r.name.replace("{0}",t),e),e=n,i=r,a=i.tags=i.tags||{},o=e.ext=e.ext||{},s=e.tags=e.tags||[],l=o.user,l=(l&&(N(a,T.userAuthUserId,l.authId),N(a,T.userId,l.id||l.localId)),o.app),l=(l&&N(a,T.sessionId,l.sesId),o.device),l=(l&&(N(a,T.deviceId,l.id||l.localId),N(a,T.deviceType,l.deviceClass),N(a,T.deviceIp,l.ip),N(a,T.deviceModel,l.model),N(a,T.deviceType,l.deviceType)),e.ext.web),e=(l&&(N(a,T.deviceLanguage,l.browserLang),N(a,T.deviceBrowserVersion,l.browserVer),N(a,T.deviceBrowser,l.browser),N(e=(e=(e=i.data=i.data||{})[b]=e[b]||{})[x]=e[x]||{},"domain",l.domain),N(e,"isManual",l.isManual?ar:null),N(e,"screenRes",l.screenRes),N(e,"userConsent",l.userConsent?ar:null)),o.os),l=(e&&N(a,T.deviceOS,e.name),o.trace),u=(l&&(N(a,T.operationParentId,l.parentID),N(a,T.operationName,y(t,l.name)),N(a,T.operationId,l.traceID)),{}),c=s.length-1;0<=c;c--)k(s[c],function(e,t){u[e]=t}),s.splice(c,1);k(s,function(e,t){u[e]=t});e=f(f({},a),u);return e[T.internalSdkVersion]||(e[T.internalSdkVersion]="javascript:".concat(cr.Version)),i.tags=Ve(e),n.tags=n.tags||[],Ve(r)}function ur(e,t){B(t[b])&&e.throwInternal(M.CRITICAL,D.TelemetryEnvelopeInvalid,"telemetryItem.baseData cannot be null.")}var cr={Version:"2.7.5-nightly.2203-01"};function fr(e,t,n){ur(e,t);var r={},i={},n=(t[ir]!==$t.dataType&&(r.baseTypeSource=t[ir]),t[ir]===$t.dataType?(r=t[b][x]||{},i=t[b].measurements||{}):t[b]&&or(t[b],r,i),or(t.data,r,i),B(n)||sr(r,n),t[b].name),n=new $t(e,n,r,i),r=new Vn($t.dataType,n);return lr(e,$t.envelopeType,t,r)}var dr=function Rr(f){h(Rr,this,function(e){function u(o,s){var e="__aiCircularRefCheck",l={};if(!o)return f.throwInternal(M.CRITICAL,D.CannotSerializeObject,"cannot serialize object because it is null or undefined",{name:s},!0),l;if(o[e])return f.throwInternal(M.WARNING,D.CircularReferenceDetected,"Circular reference detected while serializing object",{name:s},!0),l;if(o.aiDataContract)return o[e]=!0,k(o.aiDataContract,function(e,t){var n=d(t)?1&t():1&t,r=d(t)?4&t():4&t,t=2&t,i=o[e]!==undefined,a=Fe(o[e])&&null!==o[e];!n||i||t?r||(n=a?(t?c:u)(o[e],e):o[e])!==undefined&&(l[e]=n):f.throwInternal(M.CRITICAL,D.MissingRequiredFieldSpecification,"Missing required field specification. The field is required but not present on source",{field:e,name:s})}),delete o[e],l;if("measurements"===s)l=n(o,"number",s);else if("properties"===s)l=n(o,"string",s);else if("tags"===s)l=n(o,"string",s);else if(P(o))l=c(o,s);else{f.throwInternal(M.WARNING,D.CannotSerializeObjectNonSerializable,"Attempting to serialize an object which does not implement ISerializable",{name:s},!0);try{z().stringify(o),l=o}catch(t){f.throwInternal(M.CRITICAL,D.CannotSerializeObject,t&&d(t.toString)?t.toString():"Error serializing object",null,!0)}}return l}function c(e,t){if(e)if(P(e))for(var n=[],r=0;r<e.length;r++){var i=u(e[r],t+"["+r+"]");n.push(i)}else f.throwInternal(M.CRITICAL,D.ItemNotInArray,"This field was specified as an array in the contract but the item is not an array.\r\n",{name:t},!0);return n}function n(e,n,r){var i;return e&&(i={},k(e,function(e,t){"string"===n?t===undefined?i[e]="undefined":null===t?i[e]="null":t.toString?i[e]=t.toString():i[e]="invalid field: toString() is not defined.":"number"===n?t===undefined?i[e]="undefined":i[e]=null===t?"null":isNaN(t=parseFloat(t))?"NaN":t:(i[e]="invalid field: "+r+" is of unknown type.",f.throwInternal(M.CRITICAL,i[e],null,!0))})),i}e.serialize=function(e){e=u(e,"root");try{return z().stringify(e)}catch(t){f.throwInternal(M.CRITICAL,D.CannotSerializeObject,t&&d(t.toString)?t.toString():"Error serializing object",null,!0)}}})};function pr(){var o=Qe(),s=et(),l=!1,u=!0;h(pr,this,function(e){try{var t,n;o&&Ee(o,"online",r)&&(Ee(o,"offline",i),l=!0),s&&!Le((t=s.body||s).ononline)&&(t.ononline=r,t.onoffline=i,l=!0),l&&(n=nt())&&!B(n.onLine)&&(u=n.onLine)}catch(a){l=!1}function r(){u=!0}function i(){u=!1}e.isListening=l,e.isOnline=function(){var e=!0,t=nt();return l?e=u:t&&!B(t.onLine)&&(e=t.onLine),e},e.isOffline=function(){return!e.isOnline()}})}var gr=pr.Offline=new pr,mr=(hr.prototype.getHashCodeScore=function(e){return this.getHashCode(e)/hr.INT_MAX_VALUE*100},hr.prototype.getHashCode=function(e){if(""===e)return 0;for(;e.length<8;)e=e.concat(e);for(var t=5381,n=0;n<e.length;++n)t=(t<<5)+t+e.charCodeAt(n),t&=t;return Math.abs(t)},hr.INT_MAX_VALUE=2147483647,hr);function hr(){}var vr=function(){var t=new mr,n=new Zn;this.getSamplingScore=function(e){return e.tags&&e.tags[n.userId]?t.getHashCodeScore(e.tags[n.userId]):e.ext&&e.ext.user&&e.ext.user.id?t.getHashCodeScore(e.ext.user.id):e.tags&&e.tags[n.operationId]?t.getHashCodeScore(e.tags[n.operationId]):e.ext&&e.ext.telemetryTrace&&e.ext.telemetryTrace.traceID?t.getHashCodeScore(e.ext.telemetryTrace.traceID):100*Math.random()}},yr=(Ir.prototype.isSampledIn=function(e){var t=this.sampleRate;return null===t||t===undefined||100<=t||e.baseType===xn.dataType||this.samplingScoreGenerator.getSamplingScore(e)<t},Ir);function Ir(e,t){this.INT_MAX_VALUE=2147483647;t=t||pt(null);(100<e||e<0)&&(t.throwInternal(M.WARNING,D.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 vr}function Cr(e){try{return e.responseText}catch(t){}return null}function Sr(){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={})[$t.dataType]=fr,e[Pn.dataType]=function(e,t,n){ur(e,t);var r=t[b].message,i=t[b].severityLevel,a=t[b][x]||{},o=t[b].measurements||{},n=(or(t.data,a,o),B(n)||sr(a,n),new Pn(e,r,i,a,o)),r=new Vn(Pn.dataType,n);return lr(e,Pn.envelopeType,t,r)},e[Ln.dataType]=function(e,t,n){ur(e,t);var r,i="duration",a=t[b],i=(B(a)||B(a[x])||B(a[x][i])?B(t.data)||B(t.data[i])||(r=t.data[i],delete t.data[i]):(r=a[x][i],delete a[x][i]),t[b]),a=(((t.ext||{}).trace||{}).traceID&&(o=t.ext.trace.traceID),i.id||o),o=i.name,s=i.uri,l=i[x]||{},u=i.measurements||{},i=(B(i.refUri)||(l.refUri=i.refUri),B(i.pageType)||(l.pageType=i.pageType),B(i.isLoggedIn)||(l.isLoggedIn=i.isLoggedIn.toString()),B(i[x])||k(i[x],function(e,t){l[e]=t}),or(t.data,l,u),B(n)||sr(l,n),new Ln(e,o,s,r,l,u,a)),n=new Vn(Ln.dataType,i);return lr(e,Ln.envelopeType,t,n)},e[jn.dataType]=function(e,t,n){ur(e,t);var r=t[b],i=r.name,a=r.uri||r.url,o=r[x]||{},s=r.measurements||{},n=(or(t.data,o,s),B(n)||sr(o,n),new jn(e,i,a,undefined,o,s,r)),i=new Vn(jn.dataType,n);return lr(e,jn.envelopeType,t,i)},e[gn.dataType]=function(e,t,n){ur(e,t);var r=t[b].measurements||{},i=t[b][x]||{},n=(or(t.data,i,r),B(n)||sr(i,n),t[b]),n=gn.CreateFromInterface(e,n,i,r),i=new Vn(gn.dataType,n);return lr(e,gn.envelopeType,t,i)},e[xn.dataType]=function(e,t,n){ur(e,t);var r=t[b],i=r[x]||{},a=r.measurements||{},n=(or(t.data,i,a),B(n)||sr(i,n),new xn(e,r.name,r.average,r.sampleCount,r.min,r.max,r.stdDev,i,a)),r=new Vn(xn.dataType,n);return lr(e,xn.envelopeType,t,r)},e[Mn.dataType]=function(e,t,n){ur(e,t);var r=t[b].measurements||{},i=t[b][x]||{},n=(or(t.data,i,r),B(n)||sr(i,n),t[b]);if(B(n))return e.warnToConsole("Invalid input for dependency data"),null;var a=n[x]&&n[x][Dt]?n[x][Dt]:"GET",a=new Mn(e,n.id,n.target,n.name,n.duration,n.success,n.responseCode,a,n.type,n.correlationContext,i,r),n=new Vn(Mn.dataType,a);return lr(e,Mn.envelopeType,t,n)};var Tr,wr=e,Xn=(t(br,Tr=be),br.constructEnvelope=function(e,t,n,r){e=t===e.iKey||B(t)?e:f(f({},e),{iKey:t});return(wr[e.baseType]||fr)(n,e,r)},br);function br(){var w,b,n,x,N,_,R,A=Tr.call(this)||this,L=(A.priority=1001,!(A.identifier="AppInsightsChannelPlugin")),F={},E=0;return A._senderConfig=Sr(),h(br,A,function(u,o){function c(e,t,n,r,i,a){var o=null;u._appId||(o=g(a))&&o.appId&&(u._appId=o.appId),(e<200||300<=e)&&0!==e?(301!==e&&307!==e&&308!==e||s(n))&&!u._senderConfig.isRetryDisabled()&&y(e)?(m(t),u.diagLog().throwInternal(M.WARNING,D.TransmissionFailed,". Response code "+e+". Will retry to send "+t.length+" items.")):u._onError(t,i):gr.isOffline()?u._senderConfig.isRetryDisabled()||(m(t,10),u.diagLog().throwInternal(M.WARNING,D.TransmissionFailed,". Offline - Response Code: ".concat(e,". Offline status: ").concat(gr.isOffline(),". Will retry to send ").concat(t.length," items."))):(s(n),206===e?(o=o||g(a))&&!u._senderConfig.isRetryDisabled()?u._onPartialSuccess(t,o):u._onError(t,i):(w=0,u._onSuccess(t,r)))}function s(e){return!(10<=N)&&!B(e)&&""!==e&&e!==u._senderConfig.endpointUrl()&&(u._senderConfig.endpointUrl=function(){return e},++N,1)}function t(e,t){R?R(e,!1):l(e)}function a(e){var t=nt(),n=u._buffer,r=u._senderConfig.endpointUrl(),i=u._buffer.batchPayloads(e),i=new Blob([i],{type:"text/plain;charset=UTF-8"}),r=t.sendBeacon(r,i);return r&&(n.markAsSent(e),u._onSuccess(e,e.length)),r}function l(e,t){if(P(e)&&0<e.length&&!a(e)){for(var n=[],r=0;r<e.length;r++){var i=e[r];a([i])||n.push(i)}0<n.length&&(_(n,!0),u.diagLog().throwInternal(M.WARNING,D.TransmissionFailed,". Failed to send telemetry with Beacon API, retried with normal sender."))}}function f(t,e){var n=new XMLHttpRequest,r=u._senderConfig.endpointUrl();try{n[Ft]=!0}catch(i){}n.open("POST",r,e),n.setRequestHeader("Content-type","application/json"),Gt(r)&&n.setRequestHeader("Sdk-Context","appId"),O(ze(F),function(e){n.setRequestHeader(e,F[e])}),n.onreadystatechange=function(){return u._xhrReadyStateChange(n,t,t.length)},n.onerror=function(e){return u._onError(t,I(n),e)};e=u._buffer.batchPayloads(t);n.send(e),u._buffer.markAsSent(t)}function d(e,t){if(P(e)){for(var n=e.length,r=0;r<e.length;r++)n+=e[r].length;E+n<=65e3?i(e,!1):it()?l(e):(_&&_(e,!0),u.diagLog().throwInternal(M.WARNING,D.TransmissionFailed,". Failed to send telemetry with Beacon API, retried with xhrSender."))}}function p(e,t){i(e,!0)}function i(n,r){var e=u._senderConfig.endpointUrl(),t=u._buffer.batchPayloads(n),i=new Blob([t],{type:"application/json"}),a=new Headers,o=t.length,t=!1,s=!1,e=(Gt(e)&&a.append("Sdk-Context","appId"),O(ze(F),function(e){a.append(e,F[e])}),(i={method:"POST",headers:a,body:i})[Ft]=!0,r||(t=i.keepalive=!0,E+=o),new Request(e,i));try{e[Ft]=!0}catch(l){}u._buffer.markAsSent(n);try{fetch(e).then(function(t){r||(E-=o,o=0),s||(s=!0,t.ok?t.text().then(function(e){c(t.status,n,t.url,n.length,t.statusText,e)}):u._onError(n,t.statusText))})["catch"](function(e){r||(E-=o,o=0),s||(s=!0,u._onError(n,e.message))})}catch(l){s||u._onError(n,j(l))}t&&!s&&(s=!0,u._onSuccess(n,n.length))}function g(e){try{if(e&&""!==e){var t=z().parse(e);if(t&&t.itemsReceived&&t.itemsReceived>=t.itemsAccepted&&t.itemsReceived-t.itemsAccepted===t.errors.length)return t}}catch(n){u.diagLog().throwInternal(M.CRITICAL,D.InvalidBackendResponse,"Cannot parse the response. "+U(n),{response:e})}return null}function m(e,t){if(void 0===t&&(t=1),e&&0!==e.length){var n=u._buffer;n.clearSent(e),w++;for(var r=0,i=e;r<i.length;r++){var a=i[r];n.enqueue(a)}t=w<=1?10:(e=1+Math.floor((Math.pow(2,w)-1)/2*Math.random()*10),Math.max(Math.min(e*=t,3600),10)),e=je()+1e3*t;b=e,h()}}function h(){var e;n||L||(e=b?Math.max(0,b-je()):0,e=Math.max(u._senderConfig.maxBatchInterval(),e),n=setTimeout(function(){n=null,u.triggerSend(!0,null,1)},e))}function v(){clearTimeout(n),b=n=null}function y(e){return 408===e||429===e||500===e||503===e}function I(e,t){return e?"XMLHttpRequest,Status:"+e.status+",Response:"+Cr(e)||e.response||"":t}function C(t,e){var n=u._buffer,r=Qe(),i=new XDomainRequest,r=(i.onload=function(){return u._xdrOnLoad(i,t)},i.onerror=function(e){return u._onError(t,S(i),e)},r&&r.location&&r.location.protocol||"");if(u._senderConfig.endpointUrl().lastIndexOf(r,0))return u.diagLog().throwInternal(M.WARNING,D.TransmissionFailed,". Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol."),void n.clear();r=u._senderConfig.endpointUrl().replace(/^(https?:)/,""),i.open("POST",r),r=n.batchPayloads(t);i.send(r),n.markAsSent(t)}function S(e,t){return e?"XDomainRequest,Response:"+Cr(e)||"":t}function T(e,t){var n="getNotifyMgr",n=u.core[n]?u.core[n]():u.core._notificationManager;if(n&&n.eventsSendRequest)try{n.eventsSendRequest(e,t)}catch(r){u.diagLog().throwInternal(M.CRITICAL,D.NotificationException,"send request notification failed: "+U(r),{exception:j(r)})}}u.pause=function(){v(),L=!0},u.resume=function(){L&&(L=!1,b=null,u._buffer.size()>u._senderConfig.maxBatchSizeInBytes()&&u.triggerSend(!0,null,10),h())},u.flush=function(){if(!L){v();try{u.triggerSend(!0,null,1)}catch(e){u.diagLog().throwInternal(M.CRITICAL,D.FlushFailed,"flush failed, telemetry will not be collected: "+U(e),{exception:j(e)})}}},u.onunloadFlush=function(){if(!L)if(!1!==u._senderConfig.onunloadDisableBeacon()&&!1!==u._senderConfig.isBeaconApiDisabled()||!it())u.flush();else try{u.triggerSend(!0,t,2)}catch(e){u.diagLog().throwInternal(M.CRITICAL,D.FailedToSendQueuedTelemetry,"failed to flush with beacon sender on page unload, telemetry will not be collected: "+U(e),{exception:j(e)})}},u.teardown=function(){throw Error("Method not implemented.")},u.addHeader=function(e,t){F[e]=t},u.initialize=function(e,t,n,r){o.initialize(e,t,n,r);var i=u._getTelCtx(),a=u.identifier,n=(x=new dr(t.logger),b=null,w=0,u._sender=null,N=0,u.diagLog()),r=(k(Sr(),function(e,t){u._senderConfig[e]=function(){return i.getConfig(a,e,t())}}),u._buffer=new(u._senderConfig.enableSessionStorageBuffer()&&Ot()?rr:er)(n,u._senderConfig),u._sample=new yr(u._senderConfig.samplingPercentage(),n),!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)||n.throwInternal(M.CRITICAL,D.InvalidInstrumentationKey,"Invalid Instrumentation key "+e.instrumentationKey),!Gt(u._senderConfig.endpointUrl())&&u._senderConfig.customHeaders()&&0<u._senderConfig.customHeaders().length&&O(u._senderConfig.customHeaders(),function(e){A.addHeader(e.header,e.value)}),u._senderConfig),t=null;!r.disableXhr()&&ot()?t=C:!r.disableXhr()&&st()&&(t=f),!t&&at()&&(t=p),_=t||f,!r.isBeaconApiDisabled()&&it()&&(t=l),u._sender=t||f,R=!r.onunloadDisableFetch()&&at(!0)?d:it()?l:!r.disableXhr()&&ot()?C:!r.disableXhr()&&st()?f:_},u.processTelemetry=function(e,n){n=u._getTelCtx(n);try{if(u._senderConfig.disableTelemetry())return;if(!e)return void n.diagLog().throwInternal(M.CRITICAL,D.CannotSendEmptyTelemetry,"Cannot send empty telemetry");if(e.baseData&&!e.baseType)return void n.diagLog().throwInternal(M.CRITICAL,D.InvalidEvent,"Cannot send telemetry without baseData and baseType");if(e.baseType||(e.baseType="EventData"),!u._sender)return void n.diagLog().throwInternal(M.CRITICAL,D.SenderNotInitialized,"Sender was not initialized");if(!u._sample.isSampledIn(e))return void n.diagLog().throwInternal(M.WARNING,D.TelemetrySampledAndNotSent,"Telemetry item was sampled out and not sent",{SampleRate:u._sample.sampleRate});e[Et]=u._sample.sampleRate;var t=u._senderConfig.convertUndefined()||undefined,r=e.iKey||u._senderConfig.instrumentationKey(),i=br.constructEnvelope(e,r,n.diagLog(),t);if(!i)return void n.diagLog().throwInternal(M.CRITICAL,D.CreateEnvelopeError,"Unable to create an AppInsights envelope");var a=!1;if(e.tags&&e.tags[Mt]&&(O(e.tags[Mt],function(e){try{e&&!1===e(i)&&(a=!0,n.diagLog().warnToConsole("Telemetry processor check returns false"))}catch(t){n.diagLog().throwInternal(M.CRITICAL,D.TelemetryInitializerFailed,"One of telemetry initializers failed, telemetry item will not be sent: "+U(t),{exception:j(t)},!0)}}),delete e.tags[Mt]),a)return;var o=x.serialize(i),s=u._buffer;s.size()+o.length>u._senderConfig.maxBatchSizeInBytes()&&u.triggerSend(!0,null,10),s.enqueue(o),h()}catch(l){n.diagLog().throwInternal(M.WARNING,D.FailedAddingTelemetryToBuffer,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+U(l),{exception:j(l)})}u.processNext(e,n)},u._xhrReadyStateChange=function(e,t,n){4===e.readyState&&c(e.status,t,e.responseURL,n,I(e),Cr(e)||e.response)},u.triggerSend=function(e,t,n){if(void 0===e&&(e=!0),!L)try{var r,i=u._buffer;u._senderConfig.disableTelemetry()?i.clear():0<i.count()&&(r=i.getItems(),T(n||0,e),t?t.call(A,r,e):u._sender(r,e)),v()}catch(a){i=function(e){var t=((e=(e=void 0===e?null:e)?e:(t=nt()||{})?(t.userAgent||"").toLowerCase():"")||"").toLowerCase();if(Me(t,"msie"))return e=et()||{},Math.max(parseInt(t.split("msie")[1]),e.documentMode||0);if(Me(t,Xe)){e=parseInt(t.split(Xe)[1]);if(e)return e+4}return null}();(!i||9<i)&&u.diagLog().throwInternal(M.CRITICAL,D.TransmissionFailed,"Telemetry transmission failed, some telemetry will be lost: "+U(a),{exception:j(a)})}},u._onError=function(e,t,n){u.diagLog().throwInternal(M.WARNING,D.OnError,"Failed to send telemetry.",{message:t}),u._buffer.clearSent(e)},u._onPartialSuccess=function(e,t){for(var n=[],r=[],i=0,a=t.errors.reverse();i<a.length;i++){var o=a[i],s=e.splice(o.index,1)[0];(y(o.statusCode)?r:n).push(s)}0<e.length&&u._onSuccess(e,t.itemsAccepted),0<n.length&&u._onError(n,I(null,["partial success",t.itemsAccepted,"of",t.itemsReceived].join(" "))),0<r.length&&(m(r),u.diagLog().throwInternal(M.WARNING,D.TransmissionFailed,"Partial success. Delivered: "+e.length+", Failed: "+n.length+". Will retry to send "+r.length+" our of "+t.itemsReceived+" items"))},u._onSuccess=function(e,t){u._buffer.clearSent(e)},u._xdrOnLoad=function(e,t){var n=Cr(e);!e||n+""!="200"&&""!==n?(n=g(n))&&n.itemsReceived&&n.itemsReceived>n.itemsAccepted&&!u._senderConfig.isRetryDisabled()?u._onPartialSuccess(t,n):u._onError(t,S(e)):(w=0,u._onSuccess(t,0))}}),A}_.Sender=Xn;I=_,Yn="__esModule",C={value:!0},S=Object.defineProperty;if(S)try{return void S(I,Yn,C)}catch(Ar){}typeof C.value!==undefined&&(I[Yn]=C.value)};"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(((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 R="function",A="object",F="undefined",o="prototype",L="hasOwnProperty",t=Object,E=t[o],K=t.assign,q=t.create,e=t.defineProperty,V=E[L],G=null;function W(e){return void 0===e&&(e=!0),G&&e||(typeof globalThis!==F&&globalThis&&(G=globalThis),typeof self!==F&&self&&(G=self),typeof window!==F&&window&&(G=window),typeof global!==F&&global&&(G=global)),G}function H(e){throw new TypeError(e)}(W()||{}).Symbol,(W()||{}).Reflect;var f=K||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var i in n=arguments[t])E[L].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[L](t)&&(e[t]=n[t])})(e,n)};function n(e,n){function t(){this.constructor=e}typeof n!==R&&null!==n&&H("Class extends value "+n+" is not a constructor or null"),X(e,n),e[o]=null===n?function(e){if(q)return q(e);if(null==e)return{};var n=typeof e;function t(){}return n!==A&&n!==R&&H("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,le=0;function m(e,n){return e&&se[g].hasOwnProperty.call(e,n)}function ce(e){return e&&(e===se[g]||e===Array[g])}function fe(e){return ce(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 he(e,n){for(var t=e.length-1;0<=t;t--)if(e[t]===n)return 1}function ve(e,n){return m(e,g)?e.name||n||re:((e||{})[Y]||{}).name||n||re}function h(e,r,n,t){m(e,g)||me("theClass is an invalid class definition.");var i,o,a,s,u,l,c=e[g],f=(function(e){if(ue)for(var n=[],t=de(r);t&&!fe(t)&&!he(n,t);){if(t===e)return 1;n.push(t),t=de(t)}}(c)||me("["+ve(e)+"] is not in class hierarchy of ["+ve(r)+"]"),null),e=(m(c,Q)?f=c[Q]:(f="_dynCls$"+ve(e,"_")+"$"+le,le++,c[Q]=f),h[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)&&!he(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}(c,r,p,d)),!!ue&&!!e[ae]);a=c,n=f,s=r,u=p,e=!1!==(d=d&&t?!!t[ae]:d),ce(a)||(c=s[Z]=s[Z]||{},l=c[n]=c[n]||{},!1!==c[ne]&&(c[ne]=!!e),pe(s,function(e){var t,r,i;ge(s,e,!1)&&s[e]!==u[e]&&(l[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)&&!he(u,s);){var l=s[n];if(l){a=l===r;break}u.push(s),s=de(s)}try{a&&(e[n]=i),i[ee]=1}catch(c){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)))}))}h[te]={setInstFuncs:!0,useBaseInst:!0},(be=M=M||{})[be.CRITICAL=1]="CRITICAL",be[be.WARNING=2]="WARNING";var M,D={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},ye="on",Ie="attachEvent",Ce="addEventListener",Se="toISOString",Te="indexOf",we="trim",be="toString",xe="constructor",Ne=e,e=t.freeze,_e=t.keys,Re=String[o][we],Ae=Date[o][Se],r=Array.isArray,Fe=E[be],Le=V[be],Ee=Le.call(t),Me=Object.getPrototypeOf;function De(e){return e===undefined||typeof e===F}function k(e){return null===e||De(e)}function ke(e){return!(!e||typeof e!==A)}function v(e){return!(!e||typeof e!==R)}function Be(e,n,t,r){void 0===r&&(r=!1);var i=!1;if(!k(e))try{k(e[Ce])?k(e[Ie])||(e[Ie](ye+n,t),i=!0):(e[Ce](n,t,r),i=!0)}catch(o){}return i}function B(e,n){if(e)for(var t in e)V.call(e,t)&&n.call(e,t,e[t])}function Pe(e,n){return e&&n&&~e.indexOf(n)}var P=r||function(e){return!(!e||"[object Array]"!==Fe.call(e))};function Oe(e){return e&&"[object Error]"===Fe.call(e)}function y(e){return"string"==typeof e}function Ue(e){return e&&"object"==typeof e&&(!(e=(Me||function(e){if(e){if(Me)return Me(e);e=e.__proto__||e[o]||e[xe];if(e)return e}return null})(e))||typeof(e=e[xe]&&V.call(e,xe)?e[xe]:e)===R&&Le.call(e)===Ee)}function ze(e){if(e){if(Ae)return e[Se]();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 je(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 Ke(e){return e&&(Re&&e[we]?e[we]():e.replace?e.replace(/^\s+|\s+$/g,""):e)}var qe=!{toString:null}.propertyIsEnumerable("toString"),Ve=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];function Ge(e){var n=typeof e;if(n===R||n===A&&null!==e||H("objKeys called on non-object"),!qe&&_e)return _e(e);var t,r=[];for(t in e)e&&V.call(e,t)&&r.push(t);if(qe)for(var i=Ve.length,o=0;o<i;o++)e&&V.call(e,Ve[o])&&r.push(Ve[o]);return r}var We=e||function(e){return e};function He(){var e=Date;return e.now?e.now():(new e).getTime()}function U(e){return Oe(e)?e.name:""}function Xe(e,n,t,r,i){var o=t;!e||(o=e[n])===t||i&&!i(o)||r&&!r(t)||(e[n]=o=t)}function Ye(e){return!!e}function Je(e){return e&&K?t(K({},e)):e}var Ze="window",$e="navigator",Qe="JSON",en="trident/",nn="XMLHttpRequest",tn=null,rn=null;function on(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=!De((new e)[n])}catch(i){}}return r}function l(e){var n=W();return n&&n[e]?n[e]:e===Ze&&an()?window:null}function an(){return typeof window===A&&window}function sn(){return an()?window:l(Ze)}function un(){return typeof document===A&&document?document:l("document")}function ln(){return!(typeof navigator!==A||!navigator)}function cn(){return ln()?navigator:l($e)}function fn(){return typeof JSON===A&&JSON||null!==l(Qe)}function z(){return fn()?JSON||l(Qe):null}function j(e){var n=Object[o].toString.call(e),t="";return"[object Error]"===n?t="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":fn()&&(t=z().stringify(e)),n+t}function dn(){return rn=null===rn?ln()&&!!cn().sendBeacon:rn}function pn(e){var n=!1;try{var n=!!l("fetch"),t=l("Request");n&&e&&t&&(n=on(t,"keepalive"))}catch(r){}return n}function gn(){return tn=null===tn&&(tn=typeof XDomainRequest!==F)&&mn()?tn&&!on(l(nn),"withCredentials"):tn}function mn(){var e=!1;try{e=!!l(nn)}catch(n){}return e}var hn=null;function vn(e){return e?'"'+e.replace(/\"/g,"")+'"':""}function yn(e,n){var t,r=typeof console!==F?console:l("console");r&&(t="log",v(r[t=r[e]?e:t])&&r[t](n))}Cn.dataType="MessageData";var In=Cn;function Cn(e,n,t,r){void 0===t&&(t=!1),this.messageId=e,this.message=(t?"AI: ":"AI (Internal): ")+e;t="",fn()&&(t=z().stringify(r)),e=(n?" message:"+vn(n):"")+(r?" props:"+vn(t):"");this.message+=e}function Sn(e,n){return(e||{}).logger||new Tn(n)}var Tn=function kr(i){this.identifier="DiagnosticLogger",this.queue=[];var s=0,u={};h(kr,this,function(o){function e(e,n){e=i[e];return k(e)?n:e}function a(e,n){var t,r=(t=(t=hn)||!0===i.disableDbgExt?t:hn||(r=l("Microsoft"),hn=r?r.ApplicationInsights:hn))?t.ChromeDbgExt:null;r&&r.diagLog&&r.diagLog(e,n)}k(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 In(n,t,i=void 0!==i&&i,r);if(o.enableDebugExceptions())throw n;t=e===M.CRITICAL?"errorToConsole":"warnToConsole";De(n.message)?a("throw"+(e===M.CRITICAL?"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){yn("warn",e),a("warning",e)},o.errorToConsole=function(e){yn("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(e===M.CRITICAL?"error":"warn",n)),s===o.maxInternalMessageLimit()&&(r=new In(D.MessageLimitPerPVExceeded,t="Internal events throttle limit per PageView reached for this app.",!1),o.queue.push(r),e===M.CRITICAL?o.errorToConsole(t):o.warnToConsole(t))))}})},wn=(s.ParentContextKey="parent",s.ChildrenContextKey="childEvts",s);function s(e,i,n){var r,o=this,a=!1;o.start=He(),o.name=e,o.isAsync=n,o.isChildEvt=function(){return!1},v(i)&&(a=function(e){if(Ne)try{var n={enumerable:!0,configurable:!0,get:function(){return!r&&v(i)&&(r=i(),i=null),r}};return Ne(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(P(n))for(var t=0;t<n.length;t++){var r=n[t];r&&(e+=r.time)}o.time=He()-o.start,o.exTime=o.time-e,o.complete=function(){},!a&&v(i)&&(o.payload=i())}}var bn="CoreUtils.doPerf";function xn(e,n,t,r,i){if(e)if(e=v(e.getPerfMgr)?e.getPerfMgr():e){var o,a=void 0,s=e.getCtx(bn);try{if(a=e.create(n(),r,i))return s&&a.setCtx&&(a.setCtx(wn.ParentContextKey,s),s.getCtx&&s.setCtx&&((o=s.getCtx(wn.ChildrenContextKey))||(o=[],s.setCtx(wn.ChildrenContextKey,o)),o.push(a))),e.setCtx(bn,a),t(a)}catch(u){a&&a.setCtx&&a.setCtx("exception",u)}finally{a&&e.fire(a),e.setCtx(bn,s)}}t()}var Nn="TelemetryPluginChain",_n="_hasRun",Rn="_getTelCtx",An=0;function Fn(e,a,t,n){var r=null,i=null,r=n?function(e,n,t,r){for(;e;){if(e.getPlugin()===r)return e;e=e.getNext()}return Ln([r],n,t)}(e,a,t,n):e,o={core:function(){return t},diagLog:function(){return Sn(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&&!k(e[n])?r=e[n]:a&&!k(a[n])&&(r=a[n]),k(r)?t:r},hasNext:function(){return null!=r},getNext:function(){return r},setNext:function(e){r=e},processNext:function(n){u(function(e){e.processTelemetry(n,o)})},iterate:function(n){for(;r;)u(function(e){e=e.getPlugin();e&&n(e)})},createNew:function(e,n){return Fn((e=P(e=void 0===e?null:e)?Ln(e,a,t,n):e)||r,a,t,n)},onComplete:function(e){i=e}};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,l=e[i],c=P(l),f=ke(l);for(o in l)(c&&o in l||f&&V.call(l,o))&&(a=l[o],s=void 0,r&&a&&((s=P(a))||Ue(a))&&(u=n[o],s?P(u)||(u=[]):Ue(u)||(u={}),a=d(r,u,a)),a!==undefined&&(n[o]=a))}return n}(!0,n,r),a&&2===t&&B(n,function(e){var n;k(o[e])&&!k(n=a[e])&&(o[e]=n)})):r=n,r}function u(e){var n=r;n?(r=n.getNext(),e(n)):i&&(i(),i=null)}return o}function Ln(e,n,t,r){var i,o=null,a=!r;return P(e)&&0<e.length&&(i=null,O(e,function(e){(a=!a&&r===e||a)&&e&&v(e.processTelemetry)&&(e=En(e,n,t),o=o||e,i&&i._setNext(e),i=e)})),r&&!o?Ln([r],n,t):o}function En(u,l,c){var f=null,t=v(u.processTelemetry),r=v(u.setNextPlugin),d=u?u.identifier+"-"+u.priority+"-"+An++:"Unknown-0-"+An++,p={getPlugin:function(){return u},getNext:function(){return f},processTelemetry:function(n,e){i(e,function(e){return!!t&&(r&&u.setNextPlugin(f),u.processTelemetry(n,e),!0)},function(e){f.processTelemetry(n,e)},"processTelemetry",function(){return{item:n}},!n.sync)},_id:d,_setNext:function(e){f=e}};function i(r,i,o,a,e,n){r=(r=r||(u&&v(u[Rn])?u[Rn]():r))||Fn(p,l,c);var t=u?u.identifier:Nn,s=(s=r[_n])||(r[_n]={});xn(r.core(),function(){return t+":"+a},function(){var e=!(s[d]=!0);if(r.setNext(f),u)try{var n=f?f._id:"";n&&(s[n]=!1),e=i(r)}catch(t){n=!f||s[f._id];n&&(e=!0),f&&n||r.diagLog().throwInternal(M.CRITICAL,D.PluginException,"Plugin ["+u.identifier+"] failed during "+a+" - "+j(t)+", run flags: "+j(s))}f&&!e&&o(r)},e,n)}return We(p)}var Mn="getPlugin",be=function Br(){var o,a,s,n,u=this;function t(e){var n,e=e=void 0===e?null:e;return e||(n=a||Fn(null,{},u.core),e=s&&s[Mn]?n.createNew(null,s[Mn]):n.createNew(null,s)),e}o=!1,u.core=null,s=a=null,n=[],h(Br,u,function(e){e.initialize=function(e,n,t,r){e&&Xe(e,"extensionConfig",[],null,k),!r&&n&&(r=n.getProcessTelContext().getNext());var i=s;s&&s[Mn]&&(i=s[Mn]()),u.core=n,a=Fn(r,e,n,i),o=!0},e._addHook=function(e){e&&(P(e)?n=n.concat(e):n.push(e))}}),u.diagLog=function(e){return t(e).diagLog()},u.isInitialized=function(){return o},u.setInitialized=function(e){o=e},u.setNextPlugin=function(e){s=e},u.processNext=function(e,n){n?n.processNext(e):s&&v(s.processTelemetry)&&s.processTelemetry(e,null)},u._getTelCtx=t};function Dn(e,n,t){var r,i,o=n.length,a=(e=e,(n=n)&&150<(n=Ke(n.toString())).length&&(i=n.substring(0,150),e&&e.throwInternal(M.WARNING,D.NameTooLong,"name is too long. It has been truncated to 150 characters.",{name:n},!0)),i||n);if(a.length!==o){for(var s=0,u=a;t[u]!==undefined;)s++,u=a.substring(0,147)+(r=void 0,(r="00"+s).substr(r.length-3));a=u}return a}function I(e,n,t){var r;return void 0===t&&(t=1024),n&&(t=t||1024,(n=Ke(n)).toString().length>t&&(r=n.toString().substring(0,t),e&&e.throwInternal(M.WARNING,D.StringValueTooLong,"string value is too long. It has been truncated to "+t+" characters.",{value:n},!0))),r||n}function kn(e,n){return Un(e,n,2048,D.UrlTooLong)}function Bn(e,n){var t;return n&&32768<n.length&&(t=n.substring(0,32768),e&&e.throwInternal(M.WARNING,D.MessageTruncated,"message is too long, it has been truncated to 32768 characters.",{message:n},!0)),t||n}function Pn(r,e){var i;return e&&(i={},B(e,function(e,n){if(ke(n)&&fn())try{n=z().stringify(n)}catch(t){r&&r.throwInternal(M.WARNING,D.CannotSerializeObjectNonSerializable,"custom property is not valid",{exception:t},!0)}n=I(r,n,8192),e=Dn(r,e,i),i[e]=n}),e=i),e}function On(t,e){var r;return e&&(r={},B(e,function(e,n){e=Dn(t,e,r),r[e]=n}),e=r),e}function Un(e,n,t,r){var i;return n&&(n=Ke(n)).length>t&&(i=n.substring(0,t),e&&e.throwInternal(M.WARNING,r,"input is too long, it has been truncated to "+t+" characters.",{data:n},!0)),i||n}function zn(e){var n=""+Math.floor((e=Math.round(e=isNaN(e)||e<0?0:e))/1e3)%60,t=""+Math.floor(e/6e4)%60,r=""+Math.floor(e/36e5)%24,i=Math.floor(e/864e5),e=1===(e=""+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;return(0<i?i+".":"")+(r=r.length<2?"0"+r:r)+":"+t+":"+n+"."+e}var jn,Kn="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",qn="sampleRate",Vn="ProcessLegacy",Gn="http.method",d="not_specified",Wn=((r=jn=jn||{})[r.LocalStorage=0]="LocalStorage",r[r.SessionStorage=1]="SessionStorage",undefined);function Hn(e){try{if(k(W()))return null;var n=new Date,t=l(e===jn.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 Xn(){return Yn()?Hn(jn.SessionStorage):null}function Yn(){return Wn=Wn===undefined?!!Hn(jn.SessionStorage):Wn}function Jn(e,n){var t=Xn();if(null!==t)try{return t.getItem(n)}catch(r){Wn=!1,e.throwInternal(M.WARNING,D.BrowserCannotReadSessionStorage,"Browser failed read of session storage. "+U(r),{exception:j(r)})}return null}function Zn(e,n,t){var r=Xn();if(null!==r)try{r.setItem(n,t)}catch(i){Wn=!1,e.throwInternal(M.WARNING,D.BrowserCannotWriteSessionStorage,"Browser failed write to session storage. "+U(i),{exception:j(i)})}}var $n=un()||{},Qn=0,et=[null,null,null,null,null];var nt=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"];function tt(e){return~nt.indexOf(e.toLowerCase())}n(it,rt=function(){});var rt,e=it;function it(){return rt.call(this)||this}n(st,ot=function(){this.ver=1,this.sampleRate=100,this.tags={}});var ot,at=st;function st(e,n,t){var r=ot.call(this)||this;return r.name=I(e,t)||d,r.data=n,r.time=ze(new Date),r.aiDataContract={time:1,iKey:1,name:1,sampleRate:function(){return 100===r.sampleRate?4:1},tags:1,data:1},r}var ut,r=function(){this.ver=2,this.properties={},this.measurements={}},lt=(n(ct,ut=r),ct.envelopeType="Microsoft.ApplicationInsights.{0}.Event",ct.dataType="EventData",ct);function ct(e,n,t,r){var i=ut.call(this)||this;return i.aiDataContract={ver:1,name:1,properties:0,measurements:0},i.name=I(e,n)||d,i.properties=Pn(e,t),i.measurements=On(e,r),i}var ft="error",u="stack",dt="stackDetails",pt="errorSrc",gt="message",mt="description";function ht(e,n){var t=e;return t&&!y(t)&&(JSON&&JSON.stringify?(t=JSON.stringify(e),!n||t&&"{}"!==t||(t=v(e.toString)?e.toString():""+e)):t=e+" - (Missing JSON.stringify)"),t||""}function vt(e,n){var t=e;return e&&((t=t&&!y(t)&&(e[gt]||e[mt])||t)&&!y(t)&&(t=ht(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 yt(e){return e&&e.src&&y(e.src)&&e.obj&&P(e.obj)}function It(e){var e=e||"",n=(e=y(e)?e:y(e[u])?e[u]:""+e).split("\n");return{src:e,obj:n}}function Ct(e){var n,t=null;if(e)try{e[u]?t=It(e[u]):e[ft]&&e[ft][u]?t=It(e[ft][u]):e.exception&&e.exception[u]?t=It(e.exception[u]):yt(e)?t=e:yt(e[dt])?t=e[dt]:window&&window.opera&&e[gt]?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):y(e)?t=It(e):(n=e[gt]||e[mt]||"",y(e[pt])&&(n&&(n+="\n"),n+=" from "+e[pt]),n&&(t=It(n)))}catch(r){t=It(r)}return t||{src:"",obj:null}}function St(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 Tt(e){if(e)try{var n,t;if(!y(e))return n=St(e),(t=ht(e,!1))&&"{}"!==t||(e[ft]&&(n=St(e=e[ft])),t=ht(e,!0)),t.indexOf(n)&&"String"!==n?n+":"+t:t}catch(r){}return""+(e||"")}n(a,wt=function(){this.ver=2,this.exceptions=[],this.properties={},this.measurements={}}),a.CreateAutoException=function(e,n,t,r,i,o,a,s){var u=St(i||o||e);return{message:vt(e,u),url:n,lineNumber:t,columnNumber:r,error:Tt(i||o||e),evt:Tt(o||e),typeName:u,stackDetails:Ct(a||i||o),errorSrc:s}},a.CreateFromInterface=function(n,e,t,r){var i=e.exceptions&&je(e.exceptions,function(e){return Nt.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&&je(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=Tt;var wt,bt=a;function a(e,n,t,r,i,o){var a=wt.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,k(n.isManual)||(a.isManual=n.isManual)):(a.exceptions=[new Nt(e,n,t=t||{})],a.properties=Pn(e,t),a.measurements=On(e,r),i&&(a.severityLevel=i),o&&(a.id=o)),a}n(_t,xt=function(){this.hasFullStack=!0,this.parsedStack=[]}),_t.prototype.toInterface=function(){var e=this.parsedStack instanceof Array&&je(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}},_t.CreateFromInterface=function(e,n){var t=n.parsedStack instanceof Array&&je(n.parsedStack,function(e){return Ft.CreateFromInterface(e)})||n.parsedStack;return new _t(e,f(f({},n),{parsedStack:t}))};var xt,Nt=_t;function _t(e,n,t){var l,r,i,o,a,s=xt.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,Oe(o)||(o=o[ft]||r||o),s.typeName=I(e,St(o))||d,s.message=Bn(e,vt(n||o,s.typeName))||d,l=n[dt]||Ct(n),s.parsedStack=function(){var e=l.obj;if(e&&0<e.length){var n=[],t=0,r=0;if(O(e,function(e){var e=e.toString();Ft.regex.test(e)&&(e=new Ft(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=l)&&(o.obj?O(o.obj,function(e){a+=e+"\n"}):a=o.src||""),(n=a)&&32768<(e=""+n).length&&(i=e.substring(0,32768),r&&r.throwInternal(M.WARNING,D.ExceptionTruncated,"exception is too long, it has been truncated to 32768 characters.",{exception:n},!0)),i||n),s.hasFullStack=P(s.parsedStack)&&0<s.parsedStack.length,t&&(t.typeName=t.typeName||s.typeName)),s}n(i,Rt=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 Rt,At,Ft=i;function i(e,n){var t,r=Rt.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=Ke(t),r.fileName="",r.line=0,(n=t.match(i.regex))&&5<=n.length&&(r.method=Ke(n[2])||r.method,r.fileName=Ke(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}At=0,n(Mt,Lt=function(){this.kind=At});var Lt,Et=Mt;function Mt(){var e=null!==Lt&&Lt.apply(this,arguments)||this;return e.aiDataContract={name:1,kind:0,value:1,count:0,min:0,max:0,stdDev:0},e}n(Bt,Dt=function(){this.ver=2,this.metrics=[],this.properties={},this.measurements={}}),Bt.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",Bt.dataType="MetricData";var Dt,kt=Bt;function Bt(e,n,t,r,i,o,a,s,u){var l=Dt.call(this)||this,c=(l.aiDataContract={ver:1,metrics:1,properties:0},new Et);return c.count=0<r?r:undefined,c.max=isNaN(o)||null===o?undefined:o,c.min=isNaN(i)||null===i?undefined:i,c.name=I(e,n)||d,c.value=t,c.stdDev=isNaN(a)||null===a?undefined:a,l.metrics=[c],l.properties=Pn(e,s),l.measurements=On(e,u),l}n(Ot,Pt=r);var Pt,r=Ot;function Ot(){var e=Pt.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}n(jt,Ut=r),jt.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",jt.dataType="PageviewData";var Ut,zt=jt;function jt(e,n,t,r,i,o,a){var s=Ut.call(this)||this;return s.aiDataContract={ver:1,name:0,url:0,duration:0,properties:0,measurements:0,id:0},s.id=a&&Un(e,a,128,D.IdTooLong).toString(),s.url=kn(e,t),s.name=I(e,n)||d,isNaN(r)||(s.duration=zn(r)),s.properties=Pn(e,i),s.measurements=On(e,o),s}n(Vt,Kt=function(){this.ver=2,this.success=!0,this.properties={},this.measurements={}}),Vt.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",Vt.dataType="RemoteDependencyData";var Kt,qt=Vt;function Vt(e,n,t,r,i,o,a,s,u,l,c,f){void 0===u&&(u="Ajax");var d,p,g,m=Kt.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=zn(i),m.success=o,m.resultCode=a+"",m.type=I(e,u),n=e,i=s,u=a=o=r,a=(s=t)&&0<s.length?(d=s,g=(t=et)[p=Qn],$n.createElement?t[p]||(g=t[p]=$n.createElement("a")):g={host:function(){e=null,d&&null!=(t=d.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i))&&2<t.length&&y(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&&y(t[2])&&0<t[2].length)return t[2]+(t[3]||"")}return n}()},g.href=d,++p>=t.length&&(p=0),Qn=p,p=(t=g).host,a||(null!=t.pathname?("/"!=((g=0===t.pathname.length?"/":t.pathname)[0]||"")&&(g="/"+g),u=t.pathname,I(n,i?i+" "+g:g)):I(n,s))):p=o,{target:p,name:a,data:u});return m.data=kn(e,r)||t.data,m.target=I(e,t.target),l&&(m.target="".concat(m.target," | ").concat(l)),m.name=I(e,t.name),m.properties=Pn(e,c),m.measurements=On(e,f),m}n(Xt,Gt=function(){this.ver=2,this.properties={},this.measurements={}}),Xt.envelopeType="Microsoft.ApplicationInsights.{0}.Message",Xt.dataType="MessageData";var Gt,Wt,Ht=Xt;function Xt(e,n,t,r,i){var o=Gt.call(this)||this;return o.aiDataContract={ver:1,message:1,severityLevel:0,properties:0},o.message=Bn(e,n=n||d),o.properties=Pn(e,r),o.measurements=On(e,i),t&&(o.severityLevel=t),o}function Yt(){var e=Wt.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}n(Yt,Wt=r),n($t,Jt=Yt),$t.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",$t.dataType="PageviewPerformanceData";var Jt,Zt=$t;function $t(e,n,t,r,i,o,a){var s=Jt.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=kn(e,t),s.name=I(e,n)||d,s.properties=Pn(e,i),s.measurements=On(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(nr,Qt=e);var Qt,er=nr;function nr(e,n){var t=Qt.call(this)||this;return t.aiDataContract={baseType:1,baseData:1},t.baseType=e,t.baseData=n,t}function c(e){var n="ai."+e+".";return function(e){return n+e}}var tr,rr,r=c("application"),e=c("device"),ir=c("location"),p=c("operation"),or=c("session"),C=c("user"),S=c("cloud"),ar=c("internal"),sr=(rr={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:ir("ip"),locationCountry:ir("country"),locationProvince:ir("province"),locationCity:ir("city"),operationId:p("id"),operationName:p("name"),operationParentId:p("parentId"),operationRootId:p("rootId"),operationSyntheticSource:p("syntheticSource"),operationCorrelationVector:p("correlationVector"),sessionId:or("id"),sessionIsFirst:or("isFirst"),sessionIsNew:or("isNew"),userAccountAcquisitionDate:C("accountAcquisitionDate"),userAccountId:C("accountId"),userAgent:C("userAgent"),userId:C("id"),userStoreRegion:C("storeRegion"),userAuthUserId:C("authUserId"),userAnonymousUserAcquisitionDate:C("anonUserAcquisitionDate"),userAuthenticatedUserAcquisitionDate:C("authUserAcquisitionDate"),cloudName:S("name"),cloudRole:S("role"),cloudRoleVer:S("roleVer"),cloudRoleInstance:S("roleInstance"),cloudEnvironment:S("environment"),cloudLocation:S("location"),cloudDeploymentUnit:S("deploymentUnit"),internalNodeName:ar("nodeName"),internalSdkVersion:ar("sdkVersion"),internalAgentVersion:ar("agentVersion"),internalSnippet:ar("snippet"),internalSdkSrc:ar("sdkSrc")},n(ur,tr=function(){var t=this;B(rr,function(e,n){t[e]=n})}),ur);function ur(){return tr.call(this)||this}var lr,T=new sr,r=function Pr(t,r){var i=[],o=!1;this._get=function(){return i},this._set=function(e){return i=e},h(Pr,this,function(n){n.enqueue=function(e){n.count()>=r.eventsLimitInMem()?o||(t.throwInternal(M.WARNING,D.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}})},cr=(n(fr,lr=r),fr);function fr(e,n){e=lr.call(this,e,n)||this;return h(fr,e,function(e,n){e.markAsSent=function(e){n.clear()},e.clearSent=function(e){}}),e}n(w,dr=r),w.BUFFER_KEY="AI_buffer",w.SENT_BUFFER_KEY="AI_sentBuffer",w.MAX_BUFFER_SIZE=2e3;var dr,pr=w;function w(s,u){var e=dr.call(this,s,u)||this,l=!1;return h(w,e,function(t,n){var e=o(w.BUFFER_KEY),r=o(w.SENT_BUFFER_KEY),r=t._set(e.concat(r));function i(n,e){var t=[];return O(e,function(e){v(e)||-1!==function(e,n){if(e){if(e[Te])return e[Te](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=Jn(s,e);if(n){var t=z().parse(n);if((t=y(t)?z().parse(t):t)&&P(t))return t}}catch(r){s.throwInternal(M.CRITICAL,D.FailedToRestoreStorageBuffer," storage key: "+e+", "+U(r),{exception:j(r)})}return[]}function a(e,n){try{var e=u.namePrefix&&u.namePrefix()?u.namePrefix()+"_"+e:e,t=JSON.stringify(n);Zn(s,e,t)}catch(r){Zn(s,e,JSON.stringify([])),s.throwInternal(M.WARNING,D.FailedToSetStorageBuffer," storage key: "+e+", "+U(r)+". Buffer cleared",{exception:j(r)})}}r.length>w.MAX_BUFFER_SIZE&&(r.length=w.MAX_BUFFER_SIZE),a(w.SENT_BUFFER_KEY,[]),a(w.BUFFER_KEY,r),t.enqueue=function(e){t.count()>=w.MAX_BUFFER_SIZE?l||(s.throwInternal(M.WARNING,D.SessionStorageBufferFull,"Maximum buffer size reached: "+t.count(),!0),l=!0):(n.enqueue(e),a(w.BUFFER_KEY,t._get()))},t.clear=function(){n.clear(),a(w.BUFFER_KEY,t._get()),a(w.SENT_BUFFER_KEY,[]),l=!1},t.markAsSent=function(e){a(w.BUFFER_KEY,t._set(i(e,t._get())));var n=o(w.SENT_BUFFER_KEY);n instanceof Array&&e instanceof Array&&((n=n.concat(e)).length>w.MAX_BUFFER_SIZE&&(s.throwInternal(M.CRITICAL,D.SessionStorageBufferFull,"Sent buffer reached its maximum size: "+n.length,!0),n.length=w.MAX_BUFFER_SIZE),a(w.SENT_BUFFER_KEY,n))},t.clearSent=function(e){e=i(e,o(w.SENT_BUFFER_KEY));a(w.SENT_BUFFER_KEY,e)}}),e}var gr="baseType",b="baseData",x="properties",mr="true";function N(e,n,t){Xe(e,n,t,Ye)}function hr(e,t,r){k(e)||B(e,function(e,n){"number"==typeof n?r[e]=n:y(n)?t[e]=n:fn()&&(t[e]=z().stringify(n))})}function vr(t,r){k(t)||B(t,function(e,n){t[e]=n||r})}function yr(e,n,t,r){for(var r=new at(e,r,n),n=(N(r,"sampleRate",t[qn]),(t[b]||{}).startTime&&(r.time=ze(t[b].startTime)),r.iKey=t.iKey,t.iKey.replace(/-/g,"")),n=(r.name=r.name.replace("{0}",n),e),e=t,i=r,o=i.tags=i.tags||{},a=e.ext=e.ext||{},s=e.tags=e.tags||[],u=a.user,u=(u&&(N(o,T.userAuthUserId,u.authId),N(o,T.userId,u.id||u.localId)),a.app),u=(u&&N(o,T.sessionId,u.sesId),a.device),u=(u&&(N(o,T.deviceId,u.id||u.localId),N(o,T.deviceType,u.deviceClass),N(o,T.deviceIp,u.ip),N(o,T.deviceModel,u.model),N(o,T.deviceType,u.deviceType)),e.ext.web),e=(u&&(N(o,T.deviceLanguage,u.browserLang),N(o,T.deviceBrowserVersion,u.browserVer),N(o,T.deviceBrowser,u.browser),N(e=(e=(e=i.data=i.data||{})[b]=e[b]||{})[x]=e[x]||{},"domain",u.domain),N(e,"isManual",u.isManual?mr:null),N(e,"screenRes",u.screenRes),N(e,"userConsent",u.userConsent?mr:null)),a.os),u=(e&&N(o,T.deviceOS,e.name),a.trace),l=(u&&(N(o,T.operationParentId,u.parentID),N(o,T.operationName,I(n,u.name)),N(o,T.operationId,u.traceID)),{}),c=s.length-1;0<=c;c--)B(s[c],function(e,n){l[e]=n}),s.splice(c,1);B(s,function(e,n){l[e]=n});e=f(f({},o),l);return e[T.internalSdkVersion]||(e[T.internalSdkVersion]="javascript:".concat(Cr.Version)),i.tags=Je(e),t.tags=t.tags||[],Je(r)}function Ir(e,n){k(n[b])&&e.throwInternal(M.CRITICAL,D.TelemetryEnvelopeInvalid,"telemetryItem.baseData cannot be null.")}var Cr={Version:"2.8.0-beta.2203-01"};function Sr(e,n,t){Ir(e,n);var r={},i={},t=(n[gr]!==lt.dataType&&(r.baseTypeSource=n[gr]),n[gr]===lt.dataType?(r=n[b][x]||{},i=n[b].measurements||{}):n[b]&&hr(n[b],r,i),hr(n.data,r,i),k(t)||vr(r,t),n[b].name),t=new lt(e,t,r,i),r=new er(lt.dataType,t);return yr(e,lt.envelopeType,n,r)}var Tr=function Or(f){h(Or,this,function(e){function l(a,s){var e="__aiCircularRefCheck",u={};if(!a)return f.throwInternal(M.CRITICAL,D.CannotSerializeObject,"cannot serialize object because it is null or undefined",{name:s},!0),u;if(a[e])return f.throwInternal(M.WARNING,D.CircularReferenceDetected,"Circular reference detected while serializing object",{name:s},!0),u;if(a.aiDataContract)return a[e]=!0,B(a.aiDataContract,function(e,n){var t=v(n)?1&n():1&n,r=v(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?c:l)(a[e],e):a[e])!==undefined&&(u[e]=t):f.throwInternal(M.CRITICAL,D.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(P(a))u=c(a,s);else{f.throwInternal(M.WARNING,D.CannotSerializeObjectNonSerializable,"Attempting to serialize an object which does not implement ISerializable",{name:s},!0);try{z().stringify(a),u=a}catch(n){f.throwInternal(M.CRITICAL,D.CannotSerializeObject,n&&v(n.toString)?n.toString():"Error serializing object",null,!0)}}return u}function c(e,n){if(e)if(P(e))for(var t=[],r=0;r<e.length;r++){var i=l(e[r],n+"["+r+"]");t.push(i)}else f.throwInternal(M.CRITICAL,D.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={},B(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(M.CRITICAL,i[e],null,!0))})),i}e.serialize=function(e){e=l(e,"root");try{return z().stringify(e)}catch(n){f.throwInternal(M.CRITICAL,D.CannotSerializeObject,n&&v(n.toString)?n.toString():"Error serializing object",null,!0)}}})};function wr(){var a=sn(),s=un(),u=!1,l=!0;h(wr,this,function(e){try{var n,t;a&&Be(a,"online",r)&&(Be(a,"offline",i),u=!0),s&&!De((n=s.body||s).ononline)&&(n.ononline=r,n.onoffline=i,u=!0),u&&(t=cn())&&!k(t.onLine)&&(l=t.onLine)}catch(o){u=!1}function r(){l=!0}function i(){l=!1}e.isListening=u,e.isOnline=function(){var e=!0,n=cn();return u?e=l:n&&!k(n.onLine)&&(e=n.onLine),e},e.isOffline=function(){return!e.isOnline()}})}var br=wr.Offline=new wr,xr=(Nr.prototype.getHashCodeScore=function(e){return this.getHashCode(e)/Nr.INT_MAX_VALUE*100},Nr.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)},Nr.INT_MAX_VALUE=2147483647,Nr);function Nr(){}var _r=function(){var n=new xr,t=new sr;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()}},Rr=(Ar.prototype.isSampledIn=function(e){var n=this.sampleRate;return null===n||n===undefined||100<=n||e.baseType===kt.dataType||this.samplingScoreGenerator.getSamplingScore(e)<n},Ar);function Ar(e,n){this.INT_MAX_VALUE=2147483647;n=n||Sn(null);(100<e||e<0)&&(n.throwInternal(M.WARNING,D.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 _r}function Fr(e){try{return e.responseText}catch(n){}return null}function Lr(){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={})[lt.dataType]=Sr,e[Ht.dataType]=function(e,n,t){Ir(e,n);var r=n[b].message,i=n[b].severityLevel,o=n[b][x]||{},a=n[b].measurements||{},t=(hr(n.data,o,a),k(t)||vr(o,t),new Ht(e,r,i,o,a)),r=new er(Ht.dataType,t);return yr(e,Ht.envelopeType,n,r)},e[zt.dataType]=function(e,n,t){Ir(e,n);var r,i="duration",o=n[b],i=(k(o)||k(o[x])||k(o[x][i])?k(n.data)||k(n.data[i])||(r=n.data[i],delete n.data[i]):(r=o[x][i],delete o[x][i]),n[b]),o=(((n.ext||{}).trace||{}).traceID&&(a=n.ext.trace.traceID),i.id||a),a=i.name,s=i.uri,u=i[x]||{},l=i.measurements||{},i=(k(i.refUri)||(u.refUri=i.refUri),k(i.pageType)||(u.pageType=i.pageType),k(i.isLoggedIn)||(u.isLoggedIn=i.isLoggedIn.toString()),k(i[x])||B(i[x],function(e,n){u[e]=n}),hr(n.data,u,l),k(t)||vr(u,t),new zt(e,a,s,r,u,l,o)),t=new er(zt.dataType,i);return yr(e,zt.envelopeType,n,t)},e[Zt.dataType]=function(e,n,t){Ir(e,n);var r=n[b],i=r.name,o=r.uri||r.url,a=r[x]||{},s=r.measurements||{},t=(hr(n.data,a,s),k(t)||vr(a,t),new Zt(e,i,o,undefined,a,s,r)),i=new er(Zt.dataType,t);return yr(e,Zt.envelopeType,n,i)},e[bt.dataType]=function(e,n,t){Ir(e,n);var r=n[b].measurements||{},i=n[b][x]||{},t=(hr(n.data,i,r),k(t)||vr(i,t),n[b]),t=bt.CreateFromInterface(e,t,i,r),i=new er(bt.dataType,t);return yr(e,bt.envelopeType,n,i)},e[kt.dataType]=function(e,n,t){Ir(e,n);var r=n[b],i=r[x]||{},o=r.measurements||{},t=(hr(n.data,i,o),k(t)||vr(i,t),new kt(e,r.name,r.average,r.sampleCount,r.min,r.max,r.stdDev,i,o)),r=new er(kt.dataType,t);return yr(e,kt.envelopeType,n,r)},e[qt.dataType]=function(e,n,t){Ir(e,n);var r=n[b].measurements||{},i=n[b][x]||{},t=(hr(n.data,i,r),k(t)||vr(i,t),n[b]);if(k(t))return e.warnToConsole("Invalid input for dependency data"),null;var o=t[x]&&t[x][Gn]?t[x][Gn]:"GET",o=new qt(e,t.id,t.target,t.name,t.duration,t.success,t.responseCode,o,t.type,t.correlationContext,i,r),t=new er(qt.dataType,o);return yr(e,qt.envelopeType,n,t)};var Er,Mr=e,ir=(n(Dr,Er=be),Dr.constructEnvelope=function(e,n,t,r){e=n===e.iKey||k(n)?e:f(f({},e),{iKey:n});return(Mr[e.baseType]||Sr)(t,e,r)},Dr);function Dr(){var w,b,t,x,N,_,R,A=Er.call(this)||this,F=(A.priority=1001,!(A.identifier="AppInsightsChannelPlugin")),L={},E=0;return A._senderConfig=Lr(),h(Dr,A,function(l,a){function c(e,n,t,r,i,o){var a=null;l._appId||(a=g(o))&&a.appId&&(l._appId=a.appId),(e<200||300<=e)&&0!==e?(301!==e&&307!==e&&308!==e||s(t))&&!l._senderConfig.isRetryDisabled()&&y(e)?(m(n),l.diagLog().throwInternal(M.WARNING,D.TransmissionFailed,". Response code "+e+". Will retry to send "+n.length+" items.")):l._onError(n,i):br.isOffline()?l._senderConfig.isRetryDisabled()||(m(n,10),l.diagLog().throwInternal(M.WARNING,D.TransmissionFailed,". Offline - Response Code: ".concat(e,". Offline status: ").concat(br.isOffline(),". Will retry to send ").concat(n.length," items."))):(s(t),206===e?(a=a||g(o))&&!l._senderConfig.isRetryDisabled()?l._onPartialSuccess(n,a):l._onError(n,i):(w=0,l._onSuccess(n,r)))}function s(e){return!(10<=N)&&!k(e)&&""!==e&&e!==l._senderConfig.endpointUrl()&&(l._senderConfig.endpointUrl=function(){return e},++N,1)}function n(e,n){R?R(e,!1):u(e)}function o(e){var n=cn(),t=l._buffer,r=l._senderConfig.endpointUrl(),i=l._buffer.batchPayloads(e),i=new Blob([i],{type:"text/plain;charset=UTF-8"}),r=n.sendBeacon(r,i);return r&&(t.markAsSent(e),l._onSuccess(e,e.length)),r}function u(e,n){if(P(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&&(_(t,!0),l.diagLog().throwInternal(M.WARNING,D.TransmissionFailed,". Failed to send telemetry with Beacon API, retried with normal sender."))}}function f(n,e){var t=new XMLHttpRequest,r=l._senderConfig.endpointUrl();try{t[Kn]=!0}catch(i){}t.open("POST",r,e),t.setRequestHeader("Content-type","application/json"),tt(r)&&t.setRequestHeader("Sdk-Context","appId"),O(Ge(L),function(e){t.setRequestHeader(e,L[e])}),t.onreadystatechange=function(){return l._xhrReadyStateChange(t,n,n.length)},t.onerror=function(e){return l._onError(n,I(t),e)};e=l._buffer.batchPayloads(n);t.send(e),l._buffer.markAsSent(n)}function d(e,n){if(P(e)){for(var t=e.length,r=0;r<e.length;r++)t+=e[r].length;E+t<=65e3?i(e,!1):dn()?u(e):(_&&_(e,!0),l.diagLog().throwInternal(M.WARNING,D.TransmissionFailed,". Failed to send telemetry with Beacon API, retried with xhrSender."))}}function p(e,n){i(e,!0)}function i(t,r){var e=l._senderConfig.endpointUrl(),n=l._buffer.batchPayloads(t),i=new Blob([n],{type:"application/json"}),o=new Headers,a=n.length,n=!1,s=!1,e=(tt(e)&&o.append("Sdk-Context","appId"),O(Ge(L),function(e){o.append(e,L[e])}),(i={method:"POST",headers:o,body:i})[Kn]=!0,r||(n=i.keepalive=!0,E+=a),new Request(e,i));try{e[Kn]=!0}catch(u){}l._buffer.markAsSent(t);try{fetch(e).then(function(n){r||(E-=a,a=0),s||(s=!0,n.ok?n.text().then(function(e){c(n.status,t,n.url,t.length,n.statusText,e)}):l._onError(t,n.statusText))})["catch"](function(e){r||(E-=a,a=0),s||(s=!0,l._onError(t,e.message))})}catch(u){s||l._onError(t,j(u))}n&&!s&&(s=!0,l._onSuccess(t,t.length))}function g(e){try{if(e&&""!==e){var n=z().parse(e);if(n&&n.itemsReceived&&n.itemsReceived>=n.itemsAccepted&&n.itemsReceived-n.itemsAccepted===n.errors.length)return n}}catch(t){l.diagLog().throwInternal(M.CRITICAL,D.InvalidBackendResponse,"Cannot parse the response. "+U(t),{response:e})}return null}function m(e,n){if(void 0===n&&(n=1),e&&0!==e.length){var t=l._buffer;t.clearSent(e),w++;for(var r=0,i=e;r<i.length;r++){var o=i[r];t.enqueue(o)}n=w<=1?10:(e=1+Math.floor((Math.pow(2,w)-1)/2*Math.random()*10),Math.max(Math.min(e*=n,3600),10)),e=He()+1e3*n;b=e,h()}}function h(){var e;t||F||(e=b?Math.max(0,b-He()):0,e=Math.max(l._senderConfig.maxBatchInterval(),e),t=setTimeout(function(){t=null,l.triggerSend(!0,null,1)},e))}function v(){clearTimeout(t),b=t=null}function y(e){return 408===e||429===e||500===e||503===e}function I(e,n){return e?"XMLHttpRequest,Status:"+e.status+",Response:"+Fr(e)||e.response||"":n}function C(n,e){var t=l._buffer,r=sn(),i=new XDomainRequest,r=(i.onload=function(){return l._xdrOnLoad(i,n)},i.onerror=function(e){return l._onError(n,S(i),e)},r&&r.location&&r.location.protocol||"");if(l._senderConfig.endpointUrl().lastIndexOf(r,0))return l.diagLog().throwInternal(M.WARNING,D.TransmissionFailed,". Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol."),void t.clear();r=l._senderConfig.endpointUrl().replace(/^(https?:)/,""),i.open("POST",r),r=t.batchPayloads(n);i.send(r),t.markAsSent(n)}function S(e,n){return e?"XDomainRequest,Response:"+Fr(e)||"":n}function T(e,n){var t="getNotifyMgr",t=l.core[t]?l.core[t]():l.core._notificationManager;if(t&&t.eventsSendRequest)try{t.eventsSendRequest(e,n)}catch(r){l.diagLog().throwInternal(M.CRITICAL,D.NotificationException,"send request notification failed: "+U(r),{exception:j(r)})}}l.pause=function(){v(),F=!0},l.resume=function(){F&&(F=!1,b=null,l._buffer.size()>l._senderConfig.maxBatchSizeInBytes()&&l.triggerSend(!0,null,10),h())},l.flush=function(e,n,t){if(void 0===e&&(e=!0),!F){v();try{l.triggerSend(e,null,t||1)}catch(r){l.diagLog().throwInternal(M.CRITICAL,D.FlushFailed,"flush failed, telemetry will not be collected: "+U(r),{exception:j(r)})}}},l.onunloadFlush=function(){if(!F)if(!1!==l._senderConfig.onunloadDisableBeacon()&&!1!==l._senderConfig.isBeaconApiDisabled()||!dn())l.flush();else try{l.triggerSend(!0,n,2)}catch(e){l.diagLog().throwInternal(M.CRITICAL,D.FailedToSendQueuedTelemetry,"failed to flush with beacon sender on page unload, telemetry will not be collected: "+U(e),{exception:j(e)})}},l.teardown=function(){throw Error("Method not implemented.")},l.addHeader=function(e,n){L[e]=n},l.initialize=function(e,n,t,r){a.initialize(e,n,t,r);var i=l._getTelCtx(),o=l.identifier,t=(x=new Tr(n.logger),b=null,w=0,l._sender=null,N=0,l.diagLog()),r=(B(Lr(),function(e,n){l._senderConfig[e]=function(){return i.getConfig(o,e,n())}}),l._buffer=new(l._senderConfig.enableSessionStorageBuffer()&&Yn()?pr:cr)(t,l._senderConfig),l._sample=new Rr(l._senderConfig.samplingPercentage(),t),!k(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)||t.throwInternal(M.CRITICAL,D.InvalidInstrumentationKey,"Invalid Instrumentation key "+e.instrumentationKey),!tt(l._senderConfig.endpointUrl())&&l._senderConfig.customHeaders()&&0<l._senderConfig.customHeaders().length&&O(l._senderConfig.customHeaders(),function(e){A.addHeader(e.header,e.value)}),l._senderConfig),n=null;!r.disableXhr()&&gn()?n=C:!r.disableXhr()&&mn()&&(n=f),!n&&pn()&&(n=p),_=n||f,!r.isBeaconApiDisabled()&&dn()&&(n=u),l._sender=n||f,R=!r.onunloadDisableFetch()&&pn(!0)?d:dn()?u:!r.disableXhr()&&gn()?C:!r.disableXhr()&&mn()?f:_},l.processTelemetry=function(e,t){t=l._getTelCtx(t);try{if(l._senderConfig.disableTelemetry())return;if(!e)return void t.diagLog().throwInternal(M.CRITICAL,D.CannotSendEmptyTelemetry,"Cannot send empty telemetry");if(e.baseData&&!e.baseType)return void t.diagLog().throwInternal(M.CRITICAL,D.InvalidEvent,"Cannot send telemetry without baseData and baseType");if(e.baseType||(e.baseType="EventData"),!l._sender)return void t.diagLog().throwInternal(M.CRITICAL,D.SenderNotInitialized,"Sender was not initialized");if(!l._sample.isSampledIn(e))return void t.diagLog().throwInternal(M.WARNING,D.TelemetrySampledAndNotSent,"Telemetry item was sampled out and not sent",{SampleRate:l._sample.sampleRate});e[qn]=l._sample.sampleRate;var n=l._senderConfig.convertUndefined()||undefined,r=e.iKey||l._senderConfig.instrumentationKey(),i=Dr.constructEnvelope(e,r,t.diagLog(),n);if(!i)return void t.diagLog().throwInternal(M.CRITICAL,D.CreateEnvelopeError,"Unable to create an AppInsights envelope");var o=!1;if(e.tags&&e.tags[Vn]&&(O(e.tags[Vn],function(e){try{e&&!1===e(i)&&(o=!0,t.diagLog().warnToConsole("Telemetry processor check returns false"))}catch(n){t.diagLog().throwInternal(M.CRITICAL,D.TelemetryInitializerFailed,"One of telemetry initializers failed, telemetry item will not be sent: "+U(n),{exception:j(n)},!0)}}),delete e.tags[Vn]),o)return;var a=x.serialize(i),s=l._buffer;s.size()+a.length>l._senderConfig.maxBatchSizeInBytes()&&l.triggerSend(!0,null,10),s.enqueue(a),h()}catch(u){t.diagLog().throwInternal(M.WARNING,D.FailedAddingTelemetryToBuffer,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+U(u),{exception:j(u)})}l.processNext(e,t)},l._xhrReadyStateChange=function(e,n,t){4===e.readyState&&c(e.status,n,e.responseURL,t,I(e),Fr(e)||e.response)},l.triggerSend=function(e,n,t){if(void 0===e&&(e=!0),!F)try{var r,i=l._buffer;l._senderConfig.disableTelemetry()?i.clear():0<i.count()&&(r=i.getItems(),T(t||0,e),n?n.call(A,r,e):l._sender(r,e)),v()}catch(o){i=function(e){var n=((e=(e=void 0===e?null:e)?e:(n=cn()||{})?(n.userAgent||"").toLowerCase():"")||"").toLowerCase();if(Pe(n,"msie"))return e=un()||{},Math.max(parseInt(n.split("msie")[1]),e.documentMode||0);if(Pe(n,en)){e=parseInt(n.split(en)[1]);if(e)return e+4}return null}();(!i||9<i)&&l.diagLog().throwInternal(M.CRITICAL,D.TransmissionFailed,"Telemetry transmission failed, some telemetry will be lost: "+U(o),{exception:j(o)})}},l._onError=function(e,n,t){l.diagLog().throwInternal(M.WARNING,D.OnError,"Failed to send telemetry.",{message:n}),l._buffer.clearSent(e)},l._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&&l._onSuccess(e,n.itemsAccepted),0<t.length&&l._onError(t,I(null,["partial success",n.itemsAccepted,"of",n.itemsReceived].join(" "))),0<r.length&&(m(r),l.diagLog().throwInternal(M.WARNING,D.TransmissionFailed,"Partial success. Delivered: "+e.length+", Failed: "+t.length+". Will retry to send "+r.length+" our of "+n.itemsReceived+" items"))},l._onSuccess=function(e,n){l._buffer.clearSent(e)},l._xdrOnLoad=function(e,n){var t=Fr(e);!e||t+""!="200"&&""!==t?(t=g(t))&&t.itemsReceived&&t.itemsReceived>t.itemsAccepted&&!l._senderConfig.isRetryDisabled()?l._onPartialSuccess(n,t):l._onError(n,S(e)):(w=0,l._onSuccess(n,0))}}),A}_.Sender=ir;p=_,or="__esModule",C={value:!0},S=Object.defineProperty;if(S)try{return void S(p,or,C)}catch(Ur){}typeof C.value!==undefined&&(p[or]=C.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