@microsoft/applicationinsights-web-basic 2.7.5 → 2.7.6

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 Web SDK - Basic, 2.7.5
2
+ * Application Insights JavaScript Web SDK - Basic, 2.7.6
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
- var e=this,n=function(N){"use strict";var _="function",R="object",A="undefined",o="prototype",L="hasOwnProperty",t=Object,E=t[o],F=t.assign,q=t.create,e=t.defineProperty,V=E[L],W=null;function G(e){return void 0===e&&(e=!0),W&&e||(typeof globalThis!==A&&globalThis&&(W=globalThis),typeof self!==A&&self&&(W=self),typeof window!==A&&window&&(W=window),typeof global!==A&&global&&(W=global)),W}function H(e){throw new TypeError(e)}function X(e){if(q)return q(e);if(null==e)return{};var n=typeof e;function t(){}return n!==R&&n!==_&&H("Object prototype may only be an Object:"+e),t[o]=e,new t}(G()||{}).Symbol,(G()||{}).Reflect;var Y=F||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},J=function(e,n){return(J=t.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)n[L](t)&&(e[t]=n[t])})(e,n)};function n(e,n){function t(){this.constructor=e}typeof n!==_&&null!==n&&H("Class extends value "+n+" is not a constructor or null"),J(e,n),e[o]=null===n?X(n):(t[o]=n[o],new t)}function Z(e,n){for(var t=0,r=n.length,i=e.length;t<r;t++,i++)e[i]=n[t];return e}var Q="constructor",p="prototype",$="function",ee="_dynInstFuncs",ne="_isDynProxy",te="_dynClass",re="_dynInstChk",ie=re,oe="_dfOpts",ae="_dynProto",se="_unknown_",ue="__proto__",le="useBaseInst",ce="setInstFuncs",fe=Object,de=fe.getPrototypeOf,ge=0;function pe(e,n){return e&&fe[p].hasOwnProperty.call(e,n)}function he(e){return e&&(e===fe[p]||e===Array[p])}function me(e){return he(e)||e===Function[p]}function ve(e){if(e){if(de)return de(e);var n=e[ae]||e[ue]||e[p]||(e[Q]?e[Q][p]:null);if(n)return e[ae]||(e[ae]=n),n}return null}function ye(e,n){var t=[],r=fe.getOwnPropertyNames;if(r)t=r(e);else for(var i in e)"string"==typeof i&&pe(e,i)&&t.push(i);if(t&&0<t.length)for(var o=0;o<t.length;o++)n(t[o])}function Ie(e,n,t){return n!==Q&&typeof e[n]===$&&(t||pe(e,n))}function Ce(e){throw new TypeError("DynamicProto: "+e)}function Se(e,n){for(var t=e.length-1;0<=t;t--)if(e[t]===n)return 1}function xe(e,n){return pe(e,p)?e.name||n||se:((e||{})[Q]||{}).name||n||se}function h(e,r,n,t){pe(e,p)||Ce("theClass is an invalid class definition.");var i,o,a,s,u,l,c=e[p],f=(function(e){if(!de)return 1;for(var n=[],t=ve(r);t&&!me(t)&&!Se(n,t);){if(t===e)return 1;n.push(t),t=ve(t)}}(c)||Ce("["+xe(e)+"] is not in class hierarchy of ["+xe(r)+"]"),null),e=(pe(c,te)?f=c[te]:(f="_dynCls$"+xe(e,"_")+"$"+ge,ge++,c[te]=f),h[oe]),d=!!e[le],g=(d&&t&&t[le]!==undefined&&(d=!!t[le]),o={},ye(i=r,function(e){!o[e]&&Ie(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[ne]&&o&&!1!==(r=e[ee]||{})[ie]&&(i=(r[n[te]]||{})[t]||i),function(){return i.apply(e,arguments)}}for(var i={},a=(ye(t,function(e){i[e]=r(n,t,e)}),ve(e)),s=[];a&&!me(a)&&!Se(s,a);)ye(a,function(e){!i[e]&&Ie(a,e,!de)&&(i[e]=r(n,a,e))}),s.push(a),a=ve(a);return i}(c,r,g,d)),!!de&&!!e[ce]);a=c,n=f,s=r,u=g,e=!1!==(d=d&&t?!!t[ce]:d),he(a)||(c=s[ee]=s[ee]||{},l=c[n]=c[n]||{},!1!==c[ie]&&(c[ie]=!!e),ye(s,function(e){var t,r,i;Ie(s,e,!1)&&s[e]!==u[e]&&(l[e]=s[e],delete s[e],pe(a,e)&&(!a[e]||a[e][ne])||(a[e]=(t=a,r=e,(i=function(){var e,n;return(function(e,n,t,r){var i=null;if(e&&pe(t,te)){var o=e[ee]||{};if((i=(o[t[te]]||{})[n])||Ce("Missing ["+n+"] "+$),!i[re]&&!1!==o[ie]){for(var a=!pe(e,n),s=ve(e),u=[];a&&s&&!me(s)&&!Se(u,s);){var l=s[n];if(l){a=l===r;break}u.push(s),s=ve(s)}try{a&&(e[n]=i),i[re]=1}catch(c){o[ie]=!1}}}return i}(this,r,t,i)||(typeof(n=(n=t[e=r])===i?ve(t)[e]:n)!==$&&Ce("["+e+"] is not a "+$),n)).apply(this,arguments)})[ne]=1,i)))}))}h[oe]={setInstFuncs:!0,useBaseInst:!0},(Ae=M=M||{})[Ae.CRITICAL=1]="CRITICAL",Ae[Ae.WARNING=2]="WARNING";var M,k={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},Te="attachEvent",we="addEventListener",be="toISOString",Ne="endsWith",_e="indexOf",Re="trim",Ae="toString",Le=e,Ee=(t.freeze,t.seal,t.keys),e=String[o],Fe=e[Re],Me=e[Ne],ke=(e.startsWith,Date[o][be]),e=Array.isArray,De=E[Ae];function g(e){return e===undefined||typeof e===A}function D(e){return null===e||g(e)}function Pe(e){return!D(e)}function Be(e){return!(!e||typeof e!==R)}function d(e){return!(!e||typeof e!==_)}function Ue(e,n,t,r){void 0===r&&(r=!1);var i=!1;if(!D(e))try{D(e[we])?D(e[Te])||(e[Te]("on"+n,t),i=!0):(e[we](n,t,r),i=!0)}catch(o){}return i}function P(e,n){if(e)for(var t in e)V.call(e,t)&&n.call(e,t,e[t])}function B(e,n){return!(!e||!n||!~e.indexOf(n))}V[Ae].call(t);var U=e||function(e){return!(!e||"[object Array]"!==De.call(e))};function Oe(e){return!(!e||"[object Error]"!==De.call(e))}function m(e){return"string"==typeof e}function ze(e){return"number"==typeof e}function je(e){return"boolean"==typeof e}function Ke(e){if(e){if(ke)return e[be]();var n;return e&&e.getUTCFullYear?(n=function(e){e=""+e;return 1===e.length?"0"+e:e},e.getUTCFullYear()+"-"+n(1+e.getUTCMonth())+"-"+n(e.getUTCDate())+"T"+n(e.getUTCHours())+":"+n(e.getUTCMinutes())+":"+n(e.getUTCSeconds())+"."+(e.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"):void 0}}function O(e,n,t){var r=e.length;try{for(var i=0;i<r&&!(i in e&&-1===n.call(t||e,e[i],i,e));i++);}catch(o){}}function qe(e,n,t){if(e){if(e[_e])return e[_e](n,t);var r=e.length,t=t||0;try{for(var i=Math.max(0<=t?t:r-Math.abs(t),0);i<r;i++)if(i in e&&e[i]===n)return i}catch(o){}}return-1}function Ve(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 v(e){return e&&(Fe&&e[Re]?e[Re]():e.replace?e.replace(/^\s+|\s+$/g,""):e)}var We=!{toString:null}.propertyIsEnumerable("toString"),Ge=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];function He(e){var n=typeof e;if(n===_||n===R&&null!==e||H("objKeys called on non-object"),!We&&Ee)return Ee(e);var t,r=[];for(t in e)e&&V.call(e,t)&&r.push(t);if(We)for(var i=Ge.length,o=0;o<i;o++)e&&V.call(e,Ge[o])&&r.push(Ge[o]);return r}function Xe(e,n,t,r){if(Le)try{var i={enumerable:!0,configurable:!0};return t&&(i.get=t),r&&(i.set=r),Le(e,n,i),!0}catch(o){}return!1}function Ye(){var e=Date;return e.now?e.now():(new e).getTime()}function z(e){return Oe(e)?e.name:""}function y(e,n,t,r,i){var o=t;!e||(o=e[n])===t||i&&!i(o)||r&&!r(t)||(e[n]=o=t)}function Je(e){return!e}function Ze(e){return!!e}function Qe(e){throw Error(e)}function $e(e){return e&&F?t(F({},e)):e}var en="window",nn="navigator",tn="location",rn="console",on="JSON",an="crypto",sn="msCrypto",un="msie",ln="trident/",cn=null,fn=null,dn=null,gn=null;function pn(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=!g((new e)[n])}catch(i){}}return r}function I(e){var n=G();return n&&n[e]?n[e]:e===en&&hn()?window:null}function hn(){return typeof window===R&&window}function mn(){return hn()?window:I(en)}function vn(){return typeof document===R&&document?document:I("document")}function yn(){return!(typeof navigator!==R||!navigator)}function In(){return yn()?navigator:I(nn)}function Cn(){return typeof JSON===R&&JSON||null!==I(on)}function j(){return Cn()?JSON||I(on):null}function Sn(){var e=In();return!e||e.userAgent===fn&&null!==cn||(e=((fn=e.userAgent)||"").toLowerCase(),cn=B(e,un)||B(e,ln)),cn}function K(e){var n=Object[o].toString.call(e),t="";return"[object Error]"===n?t="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":Cn()&&(t=j().stringify(e)),n+t}function xn(){return gn=null===gn?yn()&&!!In().sendBeacon:gn}function Tn(e){var n=!1;try{var n=!!I("fetch"),t=I("Request");n&&e&&t&&(n=pn(t,"keepalive"))}catch(r){}return n}function wn(){return dn=null===dn&&(dn="undefined"!=typeof XDomainRequest)&&bn()?dn&&!pn(I("XMLHttpRequest"),"withCredentials"):dn}function bn(){var e=!1;try{e=!!I("XMLHttpRequest")}catch(n){}return e}var Nn,_n=["eventsSent","eventsDiscarded","eventsSendRequest","perfEvent"],Rn=null;function An(e){var n=Rn;return(n=n||!0===e.disableDbgExt?n:Rn||(e=I("Microsoft"),Rn=e?e.ApplicationInsights:Rn))?n.ChromeDbgExt:null}function Ln(e){return e?'"'+e.replace(/\"/g,"")+'"':""}function En(e,n){var t,r=typeof console!==A?console:I(rn);r&&(t="log",d(r[t=r[e]?e:t])&&r[t](n))}Mn.dataType="MessageData";var Fn=Mn;function Mn(e,n,t,r){void 0===t&&(t=!1),this.messageId=e,this.message=(t?"AI: ":"AI (Internal): ")+e;t="",Cn()&&(t=j().stringify(r)),e=(n?" message:"+Ln(n):"")+(r?" props:"+Ln(t):"");this.message+=e}function kn(e,n){return(e||{}).logger||new Dn(n)}var Dn=function Xi(r){this.identifier="DiagnosticLogger",this.queue=[];var i=0,s={};h(Xi,this,function(o){function e(e,n){e=r[e];return D(e)?n:e}function a(e,n){var t=An(r);t&&t.diagLog&&t.diagLog(e,n)}D(r)&&(r={}),o.consoleLoggingLevel=function(){return e("loggingLevelConsole",0)},o.telemetryLoggingLevel=function(){return e("loggingLevelTelemetry",1)},o.maxInternalMessageLimit=function(){return e("maxMessageLimit",25)},o.enableDebugExceptions=function(){return e("enableDebugExceptions",!1)},o.throwInternal=function(e,n,t,r,i){n=new Fn(n,t,i=void 0!==i&&i,r);if(o.enableDebugExceptions())throw K(n);t=e===M.CRITICAL?"errorToConsole":"warnToConsole";g(n.message)?a("throw"+(e===M.CRITICAL?"Critical":"Warning"),n):(r=o.consoleLoggingLevel(),i?(i=+n.messageId,!s[i]&&e<=r&&(o[t](n.message),s[i]=!0)):e<=r&&o[t](n.message),o.logInternalMessage(e,n))},o.warnToConsole=function(e){En("warn",e),a("warning",e)},o.errorToConsole=function(e){En("error",e),a("error",e)},o.resetInternalMessageCount=function(){i=0,s={}},o.logInternalMessage=function(e,n){var t,r;i>=o.maxInternalMessageLimit()||(r=!0,t="AITR_"+n.messageId,s[t]?r=!1:s[t]=!0,r&&(e<=o.telemetryLoggingLevel()&&(o.queue.push(n),i++,a(e===M.CRITICAL?"error":"warn",n)),i===o.maxInternalMessageLimit()&&(r=new Fn(k.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))))}})},Pn=(Bn.ParentContextKey="parent",Bn.ChildrenContextKey="childEvts",Bn);function Bn(e,i,n){var t,o=this,a=!1;o.start=Ye(),o.name=e,o.isAsync=n,o.isChildEvt=function(){return!1},d(i)&&(a=Xe(o,"payload",function(){return!t&&d(i)&&(t=i(),i=null),t})),o.getCtx=function(e){return e?(e===Bn.ParentContextKey||e===Bn.ChildrenContextKey?o:o.ctx||{})[e]:null},o.setCtx=function(e,n){e&&(e===Bn.ParentContextKey?(o[e]||(o.isChildEvt=function(){return!0}),o[e]=n):e===Bn.ChildrenContextKey?o[e]=n:(o.ctx=o.ctx||{})[e]=n)},o.complete=function(){var e=0,n=o.getCtx(Bn.ChildrenContextKey);if(U(n))for(var t=0;t<n.length;t++){var r=n[t];r&&(e+=r.time)}o.time=Ye()-o.start,o.exTime=o.time-e,o.complete=function(){},!a&&d(i)&&(o.payload=i())}}var Un=function Yi(n){this.ctx={},h(Yi,this,function(t){t.create=function(e,n,t){return new Pn(e,n,t)},t.fire=function(e){e&&(e.complete(),n&&d(n.perfEvent)&&n.perfEvent(e))},t.setCtx=function(e,n){e&&((t.ctx=t.ctx||{})[e]=n)},t.getCtx=function(e){return(t.ctx||{})[e]}})},On="CoreUtils.doPerf";function zn(e,n,t,r,i){if(e)if(e=d(e.getPerfMgr)?e.getPerfMgr():e){var o,a=void 0,s=e.getCtx(On);try{if(a=e.create(n(),r,i))return s&&a.setCtx&&(a.setCtx(Pn.ParentContextKey,s),s.getCtx&&s.setCtx&&((o=s.getCtx(Pn.ChildrenContextKey))||(o=[],s.setCtx(Pn.ChildrenContextKey,o)),o.push(a))),e.setCtx(On,a),t(a)}catch(u){a&&a.setCtx&&a.setCtx("exception",u)}finally{a&&e.fire(a),e.setCtx(On,s)}}t()}var jn=function(i,n){var o=this,a=null,s=d(i.processTelemetry),u=d(i.setNextPlugin);o._hasRun=!1,o.getPlugin=function(){return i},o.getNext=function(){return a},o.setNext=function(e){a=e},o.processTelemetry=function(t,r){r=r||n;var e=i?i.identifier:"TelemetryPluginChain";zn(r?r.core():null,function(){return e+":processTelemetry"},function(){if(i&&s){o._hasRun=!0;try{r.setNext(a),u&&i.setNextPlugin(a),a&&(a._hasRun=!1),i.processTelemetry(t,r)}catch(n){var e=a&&a._hasRun;a&&e||r.diagLog().throwInternal(M.CRITICAL,k.PluginException,"Plugin ["+i.identifier+"] failed during processTelemetry - "+K(n)),a&&!e&&a.processTelemetry(t,r)}}else a&&(o._hasRun=!0,a.processTelemetry(t,r))},function(){return{item:t}},!t.sync)}};function Kn(e,n){var t=[];if(e&&0<e.length)for(var r=null,i=0;i<e.length;i++){var o=e[i];o&&d(o.processTelemetry)&&(o=new jn(o,n),t.push(o),r&&r.setNext(o),r=o)}return 0<t.length?t[0]:null}var qn=function Ji(e,i,t,n){var r,o,a,s,u=this,l=null;null!==n&&(e&&d(e.getPlugin)?l=function(e,n,t){var r=[],i=!t;if(e)for(;e;){var o=e.getPlugin();!i&&o!==t||(i=!0,r.push(o)),e=e.getNext()}return i||r.push(t),Kn(r,n)}(e,u,n||e.getPlugin()):n?(r=u,a=e,s=!1,(o=n)&&e&&(a=[],O(e,function(e){!s&&e!==o||(s=!0,a.push(e))})),o&&!s&&(a=a||[]).push(o),l=Kn(a,r)):g(n)&&(l=Kn(e,u))),u.core=function(){return t},u.diagLog=function(){return kn(t,i)},u.getCfg=function(){return i},u.getExtCfg=function(e,n){var t,r;return void 0===n&&(n={}),(t=i&&(r=i.extensionConfig)&&e?r[e]:t)||n},u.getConfig=function(e,n,t){void 0===t&&(t=!1);var r,e=u.getExtCfg(e,null);return e&&!D(e[n])?r=e[n]:i&&!D(i[n])&&(r=i[n]),D(r)?t:r},u.hasNext=function(){return null!=l},u.getNext=function(){return l},u.setNext=function(e){l=e},u.processNext=function(e){var n=l;n&&(l=n.getNext(),n.processTelemetry(e,u))},u.createNew=function(e,n){return new Ji((e=void 0===e?null:e)||l,i,t,n)}},Vn="extensionConfig",Wn="getPlugin",Ae=(Gn.prototype.initialize=function(e,n,t,r){this._baseTelInit(e,n,t,r)},Gn);function Gn(){var o=this,a=!1,s=null,u=null;o.core=null,o.diagLog=function(e){return o._getTelCtx(e).diagLog()},o.isInitialized=function(){return a},o.setInitialized=function(e){a=e},o.setNextPlugin=function(e){u=e},o.processNext=function(e,n){n?n.processNext(e):u&&d(u.processTelemetry)&&u.processTelemetry(e,null)},o._getTelCtx=function(e){var n,e=e=void 0===e?null:e;return e||(n=s||new qn(null,{},o.core),e=u&&u[Wn]?n.createNew(null,u[Wn]):n.createNew(null,u)),e},o._baseTelInit=function(e,n,t,r){e&&y(e,Vn,[],null,D),!r&&n&&(r=n.getProcessTelContext().getNext());var i=u;u&&u[Wn]&&(i=u[Wn]()),o.core=n,s=new qn(r,e,n,i),a=!0}}var Hn="processTelemetry",Xn="priority",Yn="setNextPlugin",Jn="isInitialized";function Zn(n,t){for(var e=[],r=null,i=n.getNext();i;){var o=i.getPlugin();o&&(r&&d(r[Yn])&&d(o[Hn])&&r[Yn](o),d(o[Jn])&&o[Jn]()||e.push(o),r=o,i=i.getNext())}O(e,function(e){e.initialize(n.getCfg(),n.core(),t,n.getNext())})}function Qn(e){return e.sort(function(e,n){var t=0,r=d(n[Hn]);return d(e[Hn])?t=r?e[Xn]-n[Xn]:1:r&&(t=-1),t})}n(nt,$n=Ae),nt._staticInit=(Xe(e=nt.prototype,"ChannelControls",e.getChannelControls),void Xe(e,"channelQueue",e.getChannelControls));var $n,et=nt;function nt(){var u,r=$n.call(this)||this;function l(e){e&&0<e.length&&(O(e=e.sort(function(e,n){return e.priority-n.priority}),function(e){e.priority<500&&Qe("Channel has invalid priority"+e.identifier)}),u.push(e))}return r.identifier="ChannelControllerPlugin",r.priority=500,h(nt,r,function(a,s){a.setNextPlugin=function(e){},a.processTelemetry=function(n,t){u&&O(u,function(e){0<e.length&&r._getTelCtx(t).createNew(e).processNext(n)})},a.getChannelControls=function(){return u},a.initialize=function(n,t,r){var e,i,o;a.isInitialized()||(s.initialize(n,t,r),e=(n||{}).channels,i=r,u=[],e&&O(e,l),i&&(o=[],O(i,function(e){500<e.priority&&o.push(e)}),l(o)),O(u,function(e){return Zn(new qn(e,n,t),r)}))}}),r}var tt="toGMTString",rt="toUTCString",it="cookie",ot="expires",at="enabled",st="isCookieUseDisabled",ut="disableCookiesUsage",lt="_ckMgr",C="",ct=null,ft=null,dt=null,gt=vn(),pt={},ht={};function mt(e){return!e||e.isEnabled()}function vt(e,i){y(t=(e=e||ht).cookieCfg=e.cookieCfg||{},"domain",e.cookieDomain,Pe,D),y(t,"path",e.cookiePath||"/",null,D),D(t[at])&&(n=void 0,g(e[st])||(n=!e[st]),g(e[ut])||(n=!e[ut]),t[at]=n);var n,t,l=t,c=l.path||"/",f=l.domain,r=!1!==l[at],d={isEnabled:function(){var e=r&&yt(i),n=ht[lt];return e&&n&&d!==n?mt(n):e},setEnabled:function(e){r=!1!==e},set:function(e,n,t,r,i){var o,a,s,u=!1;return mt(d)&&(o={},-1!=(s=(a=v(n||C)).indexOf(";"))&&(a=v(n.substring(0,s)),o=It(n.substring(1+s))),y(o,"domain",r||f,Ze,g),D(t)||(s=Sn(),g(o[ot])&&0<(n=Ye()+1e3*t)&&((r=new Date).setTime(n),y(o,ot,Ct(r,s?tt:rt)||Ct(r,s?tt:rt)||C,Ze)),s||y(o,"max-age",C+t,null,g)),(n=typeof location===R&&location?location:I(tn))&&"https:"===n.protocol&&(y(o,"secure",null,null,g),(ft=null===ft?!(m(r=(In()||{}).userAgent)&&(B(r,"CPU iPhone OS 12")||B(r,"iPad; CPU OS 12")||B(r,"Macintosh; Intel Mac OS X 10_14")&&B(r,"Version/")&&B(r,"Safari")||B(r,"Macintosh; Intel Mac OS X 10_14")&&function(e,n){var t=!1;if(!e||(t=e===n))return t;if(Me)return e[Ne](n);var r=e,i=n,t=!1,e=r?r.length:0;if(e&&40<=e&&!(t=r===i)){for(var o=e-1,a=39;0<=a;a--){if(r[o]!=i[a])return;o--}t=!0}return t}(r,"AppleWebKit/605.1.15 (KHTML, like Gecko)")||B(r,"Chrome/5")||B(r,"Chrome/6")||B(r,"UnrealEngine")&&!B(r,"Chrome")||B(r,"UCBrowser/12")||B(r,"UCBrowser/11"))):ft)&&y(o,"SameSite","None",null,g)),y(o,"path",i||c,null,g),(l.setCookie||xt)(e,St(a,o)),u=!0),u},get:function(e){var n=C;return mt(d)?(l.getCookie||function(e){var n,t=C;return gt&&(n=gt[it]||C,dt!==n&&(pt=It(n),dt=n),t=v(pt[e]||C)),t})(e):n},del:function(e,n){return!!mt(d)&&d.purge(e,n)},purge:function(e,n){var t,r=!1;return yt(i)&&((t={}).path=n||"/",t[ot]="Thu, 01 Jan 1970 00:00:01 GMT",n=t,Sn()||(n["max-age"]="0"),(l.delCookie||xt)(e,St(C,n)),r=!0),r}};return d[lt]=d}function yt(e){if(null===ct){ct=!1;try{ct=(gt||{})[it]!==undefined}catch(n){e&&e.throwInternal(M.WARNING,k.CannotAccessCookie,"Cannot access document.cookie - "+z(n),{exception:K(n)})}}return ct}function It(e){var t={};return e&&e.length&&O(v(e).split(";"),function(e){var n;(e=v(e||C))&&(-1==(n=e.indexOf("="))?t[e]=null:t[v(e.substring(0,n))]=v(e.substring(1+n)))}),t}function Ct(e,n){return d(e[n])?e[n]():null}function St(e,n){var t=e||C;return P(n,function(e,n){t+="; "+e+(D(n)?C:"="+n)}),t}function xt(e,n){gt&&(gt[it]=e+"="+n)}var Tt="_notificationManager";function wt(e,n){return new Un(n)}var bt,Nt=function Zi(e){this.listeners=[];var n=!!(e||{}).perfEvtsSendAll;h(Zi,this,function(i){i.addNotificationListener=function(e){i.listeners.push(e)},i.removeNotificationListener=function(e){for(var n=qe(i.listeners,e);-1<n;)i.listeners.splice(n,1),n=qe(i.listeners,e)},i.eventsSent=function(n){O(i.listeners,function(e){e&&e.eventsSent&&setTimeout(function(){return e.eventsSent(n)},0)})},i.eventsDiscarded=function(n,t){O(i.listeners,function(e){e&&e.eventsDiscarded&&setTimeout(function(){return e.eventsDiscarded(n,t)},0)})},i.eventsSendRequest=function(t,r){O(i.listeners,function(e){if(e&&e.eventsSendRequest)if(r)setTimeout(function(){return e.eventsSendRequest(t,r)},0);else try{e.eventsSendRequest(t,r)}catch(n){}})},i.perfEvent=function(t){!t||!n&&t.isChildEvt()||O(i.listeners,function(e){if(e&&e.perfEvent)if(t.isAsync)setTimeout(function(){return e.perfEvent(t)},0);else try{e.perfEvent(t)}catch(n){}})}})},_t=(n(Rt,bt=function Qi(){var n,l,c,t,r,f=!1;h(Qi,this,function(u){u._extensions=[],l=new et,u.logger=new Dn({loggingLevelConsole:M.CRITICAL}),n=[],u.isInitialized=function(){return f},u.initialize=function(e,n,r,t){u.isInitialized()&&Qe("Core should not be initialized more than once"),e&&!D(e.instrumentationKey)||Qe("Please provide instrumentation key"),c=t,u[Tt]=t,u.config=e||{},t&&!0!==u.config.disableDbgExt&&t.addNotificationListener(function(e){if(!Nn){Nn={};for(var n=0;n<_n.length;n++)Nn[_n[n]]=function(n,t){return function(){var e=An(t);e&&(e=e.listener)&&e[n]&&e[n].apply(e,arguments)}}(_n[n],e)}return Nn}(e)),u.config.enablePerfMgr&&y(u.config,"createPerfMgr",wt),e.extensions=D(e.extensions)?[]:e.extensions,e?!(i=e[Vn])&&D(i)&&(i=g(o)?{}:o,e[Vn]=i):i=g(o)?{}:o,i.NotificationManager=t,r&&(u.logger=r);var i,o=[],a=(o.push.apply(o,Z(Z([],n),e.extensions)),o=Qn(o),[]),s={};O(o,function(e){(D(e)||D(e.initialize))&&Qe("Extensions must provide callback to initialize");var n=e.priority,t=e.identifier;e&&n&&(D(s[n])?s[n]=t:r.warnToConsole("Two extensions have same priority #"+n+" - "+s[n]+", "+t)),(!n||n<l.priority)&&a.push(e)}),o.push(l),a.push(l),o=Qn(o),u._extensions=o,Zn(new qn([l],e,u),o),Zn(new qn(a,e,u),o),u._extensions=a,0===u.getTransmissionControls().length&&Qe("No channels available"),f=!0,u.releaseQueue()},u.getTransmissionControls=function(){return l.getChannelControls()},u.track=function(e){y(e,"iKey",u.config.instrumentationKey,null,Je),y(e,"time",Ke(new Date),null,Je),y(e,"ver","4.0",null,D),u.isInitialized()?u.getProcessTelContext().processNext(e):n.push(e)},u.getProcessTelContext=function(){var e=u._extensions,n=e;return e&&0!==e.length||(n=[l]),new qn(n,u.config,u)},u.getNotifyMgr=function(){return c||(c=X({addNotificationListener:function(e){},removeNotificationListener:function(e){},eventsSent:function(e){},eventsDiscarded:function(e,n){},eventsSendRequest:function(e,n){}}),u[Tt]=c),c},u.getCookieMgr=function(){return r=r||vt(u.config,u.logger)},u.setCookieMgr=function(e){r=e},u.getPerfMgr=function(){return t||u.config&&u.config.enablePerfMgr&&d(u.config.createPerfMgr)&&(t=u.config.createPerfMgr(u,u.getNotifyMgr())),t||null},u.setPerfMgr=function(e){t=e},u.eventCnt=function(){return n.length},u.releaseQueue=function(){0<n.length&&(O(n,function(e){u.getProcessTelContext().processNext(e)}),n=[])}})}),Rt);function Rt(){var e=bt.call(this)||this,r=0;return h(Rt,e,function(t,i){function n(e){var n=t.getNotifyMgr();n&&n.eventsDiscarded([e],2)}t.initialize=function(e,n,t,r){i.initialize(e,n,t||new Dn(e),r||new Nt(e))},t.track=function(e){zn(t.getPerfMgr(),function(){return"AppInsightsCore:track"},function(){if(null===e&&(n(e),Qe("Invalid telemetry item")),D(e.name))throw n(e),Error("telemetry name required");i.track(e)},function(){return{item:e}},!e.sync)},t.addNotificationListener=function(e){var n=t.getNotifyMgr();n&&n.addNotificationListener(e)},t.removeNotificationListener=function(e){var n=t.getNotifyMgr();n&&n.removeNotificationListener(e)},t.pollInternalLogs=function(n){var e=t.config.diagnosticLogInterval;return e&&0<e||(e=1e4),r&&t.stopPollingInternalLogs(),r=setInterval(function(){var e=t.logger?t.logger.queue:[];O(e,function(e){e={name:n||"InternalMessageId: "+e.messageId,iKey:t.config.instrumentationKey,time:Ke(new Date),baseType:Fn.dataType,baseData:{message:e.message}};t.track(e)}),e.length=0},e)},t.stopPollingInternalLogs=function(){r&&(clearInterval(r),r=0)}}),e}var At=4294967296,Lt=4294967295,Et=!1,Ft=123456789,Mt=987654321;function kt(e){e<0&&(e>>>=0),Ft=123456789+e&Lt,Mt=987654321-e&Lt,Et=!0}function Dt(){try{var e=2147483647&Ye();kt((Math.random()*At^e)+e)}catch(n){}}function Pt(e){return 0<e?Math.floor(Bt()/Lt*(e+1))>>>0:0}function Bt(e){var n=I(an)||I(sn),n=n&&n.getRandomValues?n.getRandomValues(new Uint32Array(1))[0]&Lt:Sn()?(Et||Dt(),Ut()&Lt):Math.floor(At*Math.random()|0);return e||(n>>>=0),n}function Ut(e){var n=((Mt=36969*(65535&Mt)+(Mt>>16)&Lt)<<16)+(65535&(Ft=18e3*(65535&Ft)+(Ft>>16)&Lt))>>>0&Lt|0;return e||(n>>>=0),n}var Ot,zt=null,jt={_canUseCookies:undefined,isTypeof:function(e,n){return typeof e===n},isUndefined:g,isNullOrUndefined:D,hasOwnProperty:function(e,n){return!(!e||!V.call(e,n))},isFunction:d,isObject:Be,isDate:function(e){return!(!e||"[object Date]"!==De.call(e))},isArray:U,isError:Oe,isString:m,isNumber:ze,isBoolean:je,toISOString:Ke,arrForEach:O,arrIndexOf:qe,arrMap:Ve,arrReduce:function(e,n,t){var r;if(e){if(e.reduce)return e.reduce(n,t);var i=e.length,o=0;if(3<=arguments.length)r=t;else{for(;o<i&&!(o in e);)o++;r=e[o++]}for(;o<i;)o in e&&(r=n(r,e[o],o,e)),o++}return r},strTrim:v,objCreate:X,objKeys:He,objDefineAccessors:Xe,addEventHandler:function(e,n){var t=!1,r=mn(),r=(r&&(t=Ue(r,e,n),t=Ue(r.body,e,n)||t),vn());return r&&Ue(r,e,n)||t},dateNow:Ye,isIE:Sn,disableCookies:function(){var e,n;(e=vt[lt]||ht[lt])||(e=vt[lt]=vt(void 0,void 0),ht[lt]=e),e=e,n=jt._canUseCookies,null===zt&&(zt=[],Ot=n,Xe(jt,"_canUseCookies",function(){return Ot},function(n){Ot=n,O(zt,function(e){e.setEnabled(n)})})),-1===qe(zt,e)&&zt.push(e),je(n)&&e.setEnabled(n),je(Ot)&&e.setEnabled(Ot),e.setEnabled(!1)},newGuid:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(Kt,function(e){var n=0|Pt(15);return("x"===e?n:3&n|8).toString(16)})},perfNow:function(){var e=I("performance");return e&&e.now?e.now():Ye()},newId:function(e){void 0===e&&(e=22);for(var n=Bt()>>>0,t=0,r="";r.length<e;)r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[0|63&n]||"",n>>>=6,5==++t&&(n=(Bt()<<2&4294967295|3&n)>>>0,t=0);return r},randomValue:Pt,random32:Bt,mwcRandomSeed:function(e){e?kt(e):Dt()},mwcRandom32:Ut,generateW3CId:function(){for(var e,n=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],t="",r=0;r<4;r++)t+=n[15&(e=Bt())]+n[e>>4&15]+n[e>>8&15]+n[e>>12&15]+n[e>>16&15]+n[e>>20&15]+n[e>>24&15]+n[e>>28&15];var i=n[8+(3&Bt())|0];return t.substr(0,8)+t.substr(9,4)+"4"+t.substr(13,3)+i+t.substr(16,3)+t.substr(19,12)}},Kt=/[xy]/g;function qt(e,n,t){var r,i,o=n.length,a=(e=e,(n=n)&&150<(n=v(n.toString())).length&&(i=n.substring(0,150),e&&e.throwInternal(M.WARNING,k.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 S(e,n,t){var r;return void 0===t&&(t=1024),n&&(t=t||1024,(n=v(n)).toString().length>t&&(r=n.toString().substring(0,t),e&&e.throwInternal(M.WARNING,k.StringValueTooLong,"string value is too long. It has been truncated to "+t+" characters.",{value:n},!0))),r||n}function Vt(e,n){return Xt(e,n,2048,k.UrlTooLong)}function Wt(e,n){var t;return n&&32768<n.length&&(t=n.substring(0,32768),e&&e.throwInternal(M.WARNING,k.MessageTruncated,"message is too long, it has been truncated to 32768 characters.",{message:n},!0)),t||n}function Gt(r,e){var i;return e&&(i={},P(e,function(e,n){if(Be(n)&&Cn())try{n=j().stringify(n)}catch(t){r&&r.throwInternal(M.WARNING,k.CannotSerializeObjectNonSerializable,"custom property is not valid",{exception:t},!0)}n=S(r,n,8192),e=qt(r,e,i),i[e]=n}),e=i),e}function Ht(t,e){var r;return e&&(r={},P(e,function(e,n){e=qt(t,e,r),r[e]=n}),e=r),e}function Xt(e,n,t,r){var i;return n&&(n=v(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 Yt(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 Jt,Zt="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",Qt="sampleRate",$t="ProcessLegacy",er="http.method",nr="not_specified",tr=((e=Jt=Jt||{})[e.LocalStorage=0]="LocalStorage",e[e.SessionStorage=1]="SessionStorage",undefined);function rr(e){try{if(D(G()))return null;var n=new Date,t=I(e===Jt.LocalStorage?"localStorage":"sessionStorage"),r=(t.setItem(n.toString(),n.toString()),t.getItem(n.toString())!==n.toString());if(t.removeItem(n.toString()),!r)return t}catch(i){}return null}function ir(){return or()?rr(Jt.SessionStorage):null}function or(){return tr=tr===undefined?!!rr(Jt.SessionStorage):tr}function ar(e,n){var t=ir();if(null!==t)try{return t.getItem(n)}catch(r){tr=!1,e.throwInternal(M.WARNING,k.BrowserCannotReadSessionStorage,"Browser failed read of session storage. "+z(r),{exception:K(r)})}return null}function sr(e,n,t){var r=ir();if(null!==r)try{r.setItem(n,t)}catch(i){tr=!1,e.throwInternal(M.WARNING,k.BrowserCannotWriteSessionStorage,"Browser failed write to session storage. "+z(i),{exception:K(i)})}}var ur=vn()||{},lr=0,cr=[null,null,null,null,null];var fr=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"];function dr(e){return-1!==qe(fr,e.toLowerCase())}n(pr,gr=function(){});var gr,e=pr;function pr(){return gr.call(this)||this}n(vr,hr=function(){this.ver=1,this.sampleRate=100,this.tags={}});var hr,mr=vr;function vr(e,n,t){var r=hr.call(this)||this;return r.name=S(e,t)||nr,r.data=n,r.time=Ke(new Date),r.aiDataContract={time:1,iKey:1,name:1,sampleRate:function(){return 100===r.sampleRate?4:1},tags:1,data:1},r}var yr,r=function(){this.ver=2,this.properties={},this.measurements={}},Ir=(n(Cr,yr=r),Cr.envelopeType="Microsoft.ApplicationInsights.{0}.Event",Cr.dataType="EventData",Cr);function Cr(e,n,t,r){var i=yr.call(this)||this;return i.aiDataContract={ver:1,name:1,properties:0,measurements:0},i.name=S(e,n)||nr,i.properties=Gt(e,t),i.measurements=Ht(e,r),i}var Sr="error",u="stack",xr="stackDetails",Tr="errorSrc",wr="message",br="description";function Nr(e,n){var t=e;return t&&!m(t)&&(JSON&&JSON.stringify?(t=JSON.stringify(e),!n||t&&"{}"!==t||(t=d(e.toString)?e.toString():""+e)):t=e+" - (Missing JSON.stringify)"),t||""}function _r(e,n){var t=e;return e&&((t=t&&!m(t)&&(e[wr]||e[br])||t)&&!m(t)&&(t=Nr(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 Rr(e){return e&&e.src&&m(e.src)&&e.obj&&U(e.obj)}function Ar(e){var e=e||"",n=(e=m(e)?e:m(e[u])?e[u]:""+e).split("\n");return{src:e,obj:n}}function Lr(e){var n,t=null;if(e)try{e[u]?t=Ar(e[u]):e[Sr]&&e[Sr][u]?t=Ar(e[Sr][u]):e.exception&&e.exception[u]?t=Ar(e.exception[u]):Rr(e)?t=e:Rr(e[xr])?t=e[xr]:window&&window.opera&&e[wr]?t=function(e){for(var n=[],t=e.split("\n"),r=0;r<t.length;r++){var i=t[r];t[r+1]&&(i+="@"+t[r+1],r++),n.push(i)}return{src:e,obj:n}}(e.message):m(e)?t=Ar(e):(n=e[wr]||e[br]||"",m(e[Tr])&&(n&&(n+="\n"),n+=" from "+e[Tr]),n&&(t=Ar(n)))}catch(r){t=Ar(r)}return t||{src:"",obj:null}}function Er(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 Fr(e){if(e)try{var n,t;if(!m(e))return n=Er(e),(t=Nr(e,!1))&&"{}"!==t||(e[Sr]&&(n=Er(e=e[Sr])),t=Nr(e,!0)),t.indexOf(n)&&"String"!==n?n+":"+t:t}catch(r){}return""+(e||"")}n(a,Mr=function(){this.ver=2,this.exceptions=[],this.properties={},this.measurements={}}),a.CreateAutoException=function(e,n,t,r,i,o,a,s){var u=Er(i||o||e);return{message:_r(e,u),url:n,lineNumber:t,columnNumber:r,error:Fr(i||o||e),evt:Fr(o||e),typeName:u,stackDetails:Lr(a||i||o),errorSrc:s}},a.CreateFromInterface=function(n,e,t,r){var i=e.exceptions&&Ve(e.exceptions,function(e){return Pr.CreateFromInterface(n,e)});return new a(n,Y(Y({},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&&Ve(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=Fr;var Mr,kr=a;function a(e,n,t,r,i,o){var a=Mr.call(this)||this;return a.aiDataContract={ver:1,exceptions:1,severityLevel:0,properties:0,measurements:0},function(e){try{if(Be(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,D(n.isManual)||(a.isManual=n.isManual)):(a.exceptions=[new Pr(e,n,t=t||{})],a.properties=Gt(e,t),a.measurements=Ht(e,r),i&&(a.severityLevel=i),o&&(a.id=o)),a}n(Br,Dr=function(){this.hasFullStack=!0,this.parsedStack=[]}),Br.prototype.toInterface=function(){var e=this.parsedStack instanceof Array&&Ve(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}},Br.CreateFromInterface=function(e,n){var t=n.parsedStack instanceof Array&&Ve(n.parsedStack,function(e){return zr.CreateFromInterface(e)})||n.parsedStack;return new Br(e,Y(Y({},n),{parsedStack:t}))};var Dr,Pr=Br;function Br(e,n,t){var l,r,i,o,a,s=Dr.call(this)||this;return s.aiDataContract={id:0,outerId:0,typeName:1,message:1,hasFullStack:0,stack:0,parsedStack:2},function(e){try{if(Be(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[Sr]||r||o),s.typeName=S(e,Er(o))||nr,s.message=Wt(e,_r(n||o,s.typeName))||nr,l=n[xr]||Lr(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();zr.regex.test(e)&&(e=new zr(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,k.ExceptionTruncated,"exception is too long, it has been truncated to 32768 characters.",{exception:n},!0)),i||n),s.hasFullStack=U(s.parsedStack)&&0<s.parsedStack.length,t&&(t.typeName=t.typeName||s.typeName)),s}n(i,Ur=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 Ur,Or,zr=i;function i(e,n){var t,r=Ur.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=v(t),r.fileName="",r.line=0,(n=t.match(i.regex))&&5<=n.length&&(r.method=v(n[2])||r.method,r.fileName=v(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}Or=0,n(qr,jr=function(){this.kind=Or});var jr,Kr=qr;function qr(){var e=null!==jr&&jr.apply(this,arguments)||this;return e.aiDataContract={name:1,kind:0,value:1,count:0,min:0,max:0,stdDev:0},e}n(Gr,Vr=function(){this.ver=2,this.metrics=[],this.properties={},this.measurements={}}),Gr.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",Gr.dataType="MetricData";var Vr,Wr=Gr;function Gr(e,n,t,r,i,o,a,s,u){var l=Vr.call(this)||this,c=(l.aiDataContract={ver:1,metrics:1,properties:0},new Kr);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=S(e,n)||nr,c.value=t,c.stdDev=isNaN(a)||null===a?undefined:a,l.metrics=[c],l.properties=Gt(e,s),l.measurements=Ht(e,u),l}n(Xr,Hr=r);var Hr,r=Xr;function Xr(){var e=Hr.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}n(Zr,Yr=r),Zr.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",Zr.dataType="PageviewData";var Yr,Jr=Zr;function Zr(e,n,t,r,i,o,a){var s=Yr.call(this)||this;return s.aiDataContract={ver:1,name:0,url:0,duration:0,properties:0,measurements:0,id:0},s.id=a&&Xt(e,a,128,k.IdTooLong).toString(),s.url=Vt(e,t),s.name=S(e,n)||nr,isNaN(r)||(s.duration=Yt(r)),s.properties=Gt(e,i),s.measurements=Ht(e,o),s}n(ei,Qr=function(){this.ver=2,this.success=!0,this.properties={},this.measurements={}}),ei.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",ei.dataType="RemoteDependencyData";var Qr,$r=ei;function ei(e,n,t,r,i,o,a,s,u,l,c,f){void 0===u&&(u="Ajax");var d,g,p,h=Qr.call(this)||this,t=(h.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},h.id=n,h.duration=Yt(i),h.success=o,h.resultCode=a+"",h.type=S(e,u),n=e,i=s,u=a=o=r,a=(s=t)&&0<s.length?(d=s,p=(t=cr)[g=lr],ur.createElement?t[g]||(p=t[g]=ur.createElement("a")):p={host:function(){e=null,d&&null!=(t=d.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i))&&2<t.length&&m(t[2])&&0<t[2].length&&(e=t[2]||"",2<t.length&&(n=(t[1]||"").toLowerCase(),t=t[3]||"",e+=t="http"==n&&":80"===t||"https"==n&&":443"===t?"":t));var e,n=e||"";if(n){var t=n.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i);if(null!=t&&3<t.length&&m(t[2])&&0<t[2].length)return t[2]+(t[3]||"")}return n}()},p.href=d,++g>=t.length&&(g=0),lr=g,g=(t=p).host,a||(null!=t.pathname?("/"!=((p=0===t.pathname.length?"/":t.pathname)[0]||"")&&(p="/"+p),u=t.pathname,S(n,i?i+" "+p:p)):S(n,s))):g=o,{target:g,name:a,data:u});return h.data=Vt(e,r)||t.data,h.target=S(e,t.target),l&&(h.target="".concat(h.target," | ").concat(l)),h.name=S(e,t.name),h.properties=Gt(e,c),h.measurements=Ht(e,f),h}n(ii,ni=function(){this.ver=2,this.properties={},this.measurements={}}),ii.envelopeType="Microsoft.ApplicationInsights.{0}.Message",ii.dataType="MessageData";var ni,ti,ri=ii;function ii(e,n,t,r,i){var o=ni.call(this)||this;return o.aiDataContract={ver:1,message:1,severityLevel:0,properties:0},o.message=Wt(e,n=n||nr),o.properties=Gt(e,r),o.measurements=Ht(e,i),t&&(o.severityLevel=t),o}function oi(){var e=ti.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}n(oi,ti=r),n(ui,ai=oi),ui.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",ui.dataType="PageviewPerformanceData";var ai,si=ui;function ui(e,n,t,r,i,o,a){var s=ai.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=Vt(e,t),s.name=S(e,n)||nr,s.properties=Gt(e,i),s.measurements=Ht(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(fi,li=e);var li,ci=fi;function fi(e,n){var t=li.call(this)||this;return t.aiDataContract={baseType:1,baseData:1},t.baseType=e,t.baseData=n,t}function di(e){var n="ai."+e+".";return function(e){return n+e}}N.SeverityLevel=void 0,(r=N.SeverityLevel||(N.SeverityLevel={}))[r.Verbose=0]="Verbose",r[r.Information=1]="Information",r[r.Warning=2]="Warning",r[r.Error=3]="Error",r[r.Critical=4]="Critical";var gi,pi,e=di("application"),r=di("device"),hi=di("location"),s=di("operation"),mi=di("session"),l=di("user"),c=di("cloud"),vi=di("internal"),yi=(pi={applicationVersion:e("ver"),applicationBuild:e("build"),applicationTypeId:e("typeId"),applicationId:e("applicationId"),applicationLayer:e("layer"),deviceId:r("id"),deviceIp:r("ip"),deviceLanguage:r("language"),deviceLocale:r("locale"),deviceModel:r("model"),deviceFriendlyName:r("friendlyName"),deviceNetwork:r("network"),deviceNetworkName:r("networkName"),deviceOEMName:r("oemName"),deviceOS:r("os"),deviceOSVersion:r("osVersion"),deviceRoleInstance:r("roleInstance"),deviceRoleName:r("roleName"),deviceScreenResolution:r("screenResolution"),deviceType:r("type"),deviceMachineName:r("machineName"),deviceVMName:r("vmName"),deviceBrowser:r("browser"),deviceBrowserVersion:r("browserVersion"),locationIp:hi("ip"),locationCountry:hi("country"),locationProvince:hi("province"),locationCity:hi("city"),operationId:s("id"),operationName:s("name"),operationParentId:s("parentId"),operationRootId:s("rootId"),operationSyntheticSource:s("syntheticSource"),operationCorrelationVector:s("correlationVector"),sessionId:mi("id"),sessionIsFirst:mi("isFirst"),sessionIsNew:mi("isNew"),userAccountAcquisitionDate:l("accountAcquisitionDate"),userAccountId:l("accountId"),userAgent:l("userAgent"),userId:l("id"),userStoreRegion:l("storeRegion"),userAuthUserId:l("authUserId"),userAnonymousUserAcquisitionDate:l("anonUserAcquisitionDate"),userAuthenticatedUserAcquisitionDate:l("authUserAcquisitionDate"),cloudName:c("name"),cloudRole:c("role"),cloudRoleVer:c("roleVer"),cloudRoleInstance:c("roleInstance"),cloudEnvironment:c("environment"),cloudLocation:c("location"),cloudDeploymentUnit:c("deploymentUnit"),internalNodeName:vi("nodeName"),internalSdkVersion:vi("sdkVersion"),internalAgentVersion:vi("agentVersion"),internalSnippet:vi("snippet"),internalSdkSrc:vi("sdkSrc")},n(Ii,gi=function(){var t=this;P(pi,function(e,n){t[e]=n})}),Ii);function Ii(){return gi.call(this)||this}var Ci,f=new yi,e=function $i(t,r){var i=[],o=!1;this._get=function(){return i},this._set=function(e){return i=e},h($i,this,function(n){n.enqueue=function(e){n.count()>=r.eventsLimitInMem()?o||(t.throwInternal(M.WARNING,k.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}})},Si=(n(xi,Ci=e),xi);function xi(e,n){e=Ci.call(this,e,n)||this;return h(xi,e,function(e,n){e.markAsSent=function(e){n.clear()},e.clearSent=function(e){}}),e}n(x,Ti=e),x.BUFFER_KEY="AI_buffer",x.SENT_BUFFER_KEY="AI_sentBuffer",x.MAX_BUFFER_SIZE=2e3;var Ti,wi=x;function x(s,u){var e=Ti.call(this,s,u)||this,l=!1;return h(x,e,function(t,n){var e=o(x.BUFFER_KEY),r=o(x.SENT_BUFFER_KEY),r=t._set(e.concat(r));function i(n,e){var t=[];return O(e,function(e){d(e)||-1!==qe(n,e)||t.push(e)}),t}function o(e){try{var e=u.namePrefix&&u.namePrefix()?u.namePrefix()+"_"+e:e,n=ar(s,e);if(n){var t=j().parse(n);if((t=m(t)?j().parse(t):t)&&U(t))return t}}catch(r){s.throwInternal(M.CRITICAL,k.FailedToRestoreStorageBuffer," storage key: "+e+", "+z(r),{exception:K(r)})}return[]}function a(e,n){try{var e=u.namePrefix&&u.namePrefix()?u.namePrefix()+"_"+e:e,t=JSON.stringify(n);sr(s,e,t)}catch(r){sr(s,e,JSON.stringify([])),s.throwInternal(M.WARNING,k.FailedToSetStorageBuffer," storage key: "+e+", "+z(r)+". Buffer cleared",{exception:K(r)})}}r.length>x.MAX_BUFFER_SIZE&&(r.length=x.MAX_BUFFER_SIZE),a(x.SENT_BUFFER_KEY,[]),a(x.BUFFER_KEY,r),t.enqueue=function(e){t.count()>=x.MAX_BUFFER_SIZE?l||(s.throwInternal(M.WARNING,k.SessionStorageBufferFull,"Maximum buffer size reached: "+t.count(),!0),l=!0):(n.enqueue(e),a(x.BUFFER_KEY,t._get()))},t.clear=function(){n.clear(),a(x.BUFFER_KEY,t._get()),a(x.SENT_BUFFER_KEY,[]),l=!1},t.markAsSent=function(e){a(x.BUFFER_KEY,t._set(i(e,t._get())));var n=o(x.SENT_BUFFER_KEY);n instanceof Array&&e instanceof Array&&((n=n.concat(e)).length>x.MAX_BUFFER_SIZE&&(s.throwInternal(M.CRITICAL,k.SessionStorageBufferFull,"Sent buffer reached its maximum size: "+n.length,!0),n.length=x.MAX_BUFFER_SIZE),a(x.SENT_BUFFER_KEY,n))},t.clearSent=function(e){e=i(e,o(x.SENT_BUFFER_KEY));a(x.SENT_BUFFER_KEY,e)}}),e}var bi="baseType",T="baseData",w="properties",Ni="true";function b(e,n,t){y(e,n,t,Ze)}function _i(e,t,r){D(e)||P(e,function(e,n){ze(n)?r[e]=n:m(n)?t[e]=n:Cn()&&(t[e]=j().stringify(n))})}function Ri(t,r){D(t)||P(t,function(e,n){t[e]=n||r})}function Ai(e,n,t,r){for(var r=new mr(e,r,n),n=(b(r,"sampleRate",t[Qt]),(t[T]||{}).startTime&&(r.time=Ke(t[T].startTime)),r.iKey=t.iKey,t.iKey.replace(/-/g,"")),n=(r.name=r.name.replace("{0}",n),e),e=t,i=r,o=i.tags=i.tags||{},a=e.ext=e.ext||{},s=e.tags=e.tags||[],u=a.user,u=(u&&(b(o,f.userAuthUserId,u.authId),b(o,f.userId,u.id||u.localId)),a.app),u=(u&&b(o,f.sessionId,u.sesId),a.device),u=(u&&(b(o,f.deviceId,u.id||u.localId),b(o,f.deviceType,u.deviceClass),b(o,f.deviceIp,u.ip),b(o,f.deviceModel,u.model),b(o,f.deviceType,u.deviceType)),e.ext.web),e=(u&&(b(o,f.deviceLanguage,u.browserLang),b(o,f.deviceBrowserVersion,u.browserVer),b(o,f.deviceBrowser,u.browser),b(e=(e=(e=i.data=i.data||{})[T]=e[T]||{})[w]=e[w]||{},"domain",u.domain),b(e,"isManual",u.isManual?Ni:null),b(e,"screenRes",u.screenRes),b(e,"userConsent",u.userConsent?Ni:null)),a.os),u=(e&&b(o,f.deviceOS,e.name),a.trace),l=(u&&(b(o,f.operationParentId,u.parentID),b(o,f.operationName,S(n,u.name)),b(o,f.operationId,u.traceID)),{}),c=s.length-1;0<=c;c--)P(s[c],function(e,n){l[e]=n}),s.splice(c,1);P(s,function(e,n){l[e]=n});e=Y(Y({},o),l);return e[f.internalSdkVersion]||(e[f.internalSdkVersion]="javascript:".concat(Ei.Version)),i.tags=$e(e),t.tags=t.tags||[],$e(r)}function Li(e,n){D(n[T])&&e.throwInternal(M.CRITICAL,k.TelemetryEnvelopeInvalid,"telemetryItem.baseData cannot be null.")}var Ei={Version:"2.7.5"};function Fi(e,n,t){Li(e,n);var r={},i={},t=(n[bi]!==Ir.dataType&&(r.baseTypeSource=n[bi]),n[bi]===Ir.dataType?(r=n[T][w]||{},i=n[T].measurements||{}):n[T]&&_i(n[T],r,i),_i(n.data,r,i),D(t)||Ri(r,t),n[T].name),t=new Ir(e,t,r,i),r=new ci(Ir.dataType,t);return Ai(e,Ir.envelopeType,n,r)}var Mi=function eo(f){h(eo,this,function(e){function l(a,s){var e="__aiCircularRefCheck",u={};if(!a)return f.throwInternal(M.CRITICAL,k.CannotSerializeObject,"cannot serialize object because it is null or undefined",{name:s},!0),u;if(a[e])return f.throwInternal(M.WARNING,k.CircularReferenceDetected,"Circular reference detected while serializing object",{name:s},!0),u;if(a.aiDataContract)return a[e]=!0,P(a.aiDataContract,function(e,n){var t=d(n)?1&n():1&n,r=d(n)?4&n():4&n,n=2&n,i=a[e]!==undefined,o=Be(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,k.MissingRequiredFieldSpecification,"Missing required field specification. The field is required but not present on source",{field:e,name:s})}),delete a[e],u;if("measurements"===s)u=t(a,"number",s);else if("properties"===s)u=t(a,"string",s);else if("tags"===s)u=t(a,"string",s);else if(U(a))u=c(a,s);else{f.throwInternal(M.WARNING,k.CannotSerializeObjectNonSerializable,"Attempting to serialize an object which does not implement ISerializable",{name:s},!0);try{j().stringify(a),u=a}catch(n){f.throwInternal(M.CRITICAL,k.CannotSerializeObject,n&&d(n.toString)?n.toString():"Error serializing object",null,!0)}}return u}function c(e,n){if(e)if(U(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,k.ItemNotInArray,"This field was specified as an array in the contract but the item is not an array.\r\n",{name:n},!0);return t}function t(e,t,r){var i;return e&&(i={},P(e,function(e,n){"string"===t?n===undefined?i[e]="undefined":null===n?i[e]="null":n.toString?i[e]=n.toString():i[e]="invalid field: toString() is not defined.":"number"===t?n===undefined?i[e]="undefined":i[e]=null===n?"null":isNaN(n=parseFloat(n))?"NaN":n:(i[e]="invalid field: "+r+" is of unknown type.",f.throwInternal(M.CRITICAL,i[e],null,!0))})),i}e.serialize=function(e){e=l(e,"root");try{return j().stringify(e)}catch(n){f.throwInternal(M.CRITICAL,k.CannotSerializeObject,n&&d(n.toString)?n.toString():"Error serializing object",null,!0)}}})};function ki(){var a=mn(),s=vn(),u=!1,l=!0;h(ki,this,function(e){try{var n,t;a&&Ue(a,"online",r)&&(Ue(a,"offline",i),u=!0),s&&!g((n=s.body||s).ononline)&&(n.ononline=r,n.onoffline=i,u=!0),u&&(t=In())&&!D(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=In();return u?e=l:n&&!D(n.onLine)&&(e=n.onLine),e},e.isOffline=function(){return!e.isOnline()}})}var Di=ki.Offline=new ki,Pi=(Bi.prototype.getHashCodeScore=function(e){return this.getHashCode(e)/Bi.INT_MAX_VALUE*100},Bi.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)},Bi.INT_MAX_VALUE=2147483647,Bi);function Bi(){}var Ui=function(){var n=new Pi,t=new yi;this.getSamplingScore=function(e){return e.tags&&e.tags[t.userId]?n.getHashCodeScore(e.tags[t.userId]):e.ext&&e.ext.user&&e.ext.user.id?n.getHashCodeScore(e.ext.user.id):e.tags&&e.tags[t.operationId]?n.getHashCodeScore(e.tags[t.operationId]):e.ext&&e.ext.telemetryTrace&&e.ext.telemetryTrace.traceID?n.getHashCodeScore(e.ext.telemetryTrace.traceID):100*Math.random()}},Oi=(zi.prototype.isSampledIn=function(e){var n=this.sampleRate;return null===n||n===undefined||100<=n||e.baseType===Wr.dataType||this.samplingScoreGenerator.getSamplingScore(e)<n},zi);function zi(e,n){this.INT_MAX_VALUE=2147483647;n=n||kn(null);(100<e||e<0)&&(n.throwInternal(M.WARNING,k.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 Ui}function ji(e){try{return e.responseText}catch(n){}return null}function Ki(){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}}}(r={})[Ir.dataType]=Fi,r[ri.dataType]=function(e,n,t){Li(e,n);var r=n[T].message,i=n[T].severityLevel,o=n[T][w]||{},a=n[T].measurements||{},t=(_i(n.data,o,a),D(t)||Ri(o,t),new ri(e,r,i,o,a)),r=new ci(ri.dataType,t);return Ai(e,ri.envelopeType,n,r)},r[Jr.dataType]=function(e,n,t){Li(e,n);var r,i="duration",o=n[T],i=(D(o)||D(o[w])||D(o[w][i])?D(n.data)||D(n.data[i])||(r=n.data[i],delete n.data[i]):(r=o[w][i],delete o[w][i]),n[T]),o=(((n.ext||{}).trace||{}).traceID&&(a=n.ext.trace.traceID),i.id||a),a=i.name,s=i.uri,u=i[w]||{},l=i.measurements||{},i=(D(i.refUri)||(u.refUri=i.refUri),D(i.pageType)||(u.pageType=i.pageType),D(i.isLoggedIn)||(u.isLoggedIn=i.isLoggedIn.toString()),D(i[w])||P(i[w],function(e,n){u[e]=n}),_i(n.data,u,l),D(t)||Ri(u,t),new Jr(e,a,s,r,u,l,o)),t=new ci(Jr.dataType,i);return Ai(e,Jr.envelopeType,n,t)},r[si.dataType]=function(e,n,t){Li(e,n);var r=n[T],i=r.name,o=r.uri||r.url,a=r[w]||{},s=r.measurements||{},t=(_i(n.data,a,s),D(t)||Ri(a,t),new si(e,i,o,undefined,a,s,r)),i=new ci(si.dataType,t);return Ai(e,si.envelopeType,n,i)},r[kr.dataType]=function(e,n,t){Li(e,n);var r=n[T].measurements||{},i=n[T][w]||{},t=(_i(n.data,i,r),D(t)||Ri(i,t),n[T]),t=kr.CreateFromInterface(e,t,i,r),i=new ci(kr.dataType,t);return Ai(e,kr.envelopeType,n,i)},r[Wr.dataType]=function(e,n,t){Li(e,n);var r=n[T],i=r[w]||{},o=r.measurements||{},t=(_i(n.data,i,o),D(t)||Ri(i,t),new Wr(e,r.name,r.average,r.sampleCount,r.min,r.max,r.stdDev,i,o)),r=new ci(Wr.dataType,t);return Ai(e,Wr.envelopeType,n,r)},r[$r.dataType]=function(e,n,t){Li(e,n);var r=n[T].measurements||{},i=n[T][w]||{},t=(_i(n.data,i,r),D(t)||Ri(i,t),n[T]);if(D(t))return e.warnToConsole("Invalid input for dependency data"),null;var o=t[w]&&t[w][er]?t[w][er]:"GET",o=new $r(e,t.id,t.target,t.name,t.duration,t.success,t.responseCode,o,t.type,t.correlationContext,i,r),t=new ci($r.dataType,o);return Ai(e,$r.envelopeType,n,t)};var qi,Vi=r,Wi=(n(Gi,qi=Ae),Gi.constructEnvelope=function(e,n,t,r){e=n===e.iKey||D(n)?e:Y(Y({},e),{iKey:n});return(Vi[e.baseType]||Fi)(t,e,r)},Gi);function Gi(){var T,w,t,b,N,_,R,A=qi.call(this)||this,L=(A.priority=1001,!(A.identifier="AppInsightsChannelPlugin")),E={},F=0;return A._senderConfig=Ki(),h(Gi,A,function(l,a){function c(e,n,t,r,i,o){var a=null;l._appId||(a=p(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)?(h(n),l.diagLog().throwInternal(M.WARNING,k.TransmissionFailed,". Response code "+e+". Will retry to send "+n.length+" items.")):l._onError(n,i):Di.isOffline()?l._senderConfig.isRetryDisabled()||(h(n,10),l.diagLog().throwInternal(M.WARNING,k.TransmissionFailed,". Offline - Response Code: ".concat(e,". Offline status: ").concat(Di.isOffline(),". Will retry to send ").concat(n.length," items."))):(s(t),206===e?(a=a||p(o))&&!l._senderConfig.isRetryDisabled()?l._onPartialSuccess(n,a):l._onError(n,i):(T=0,l._onSuccess(n,r)))}function s(e){return!(10<=N)&&!D(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=In(),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(U(e)&&0<e.length&&!o(e)){for(var t=[],r=0;r<e.length;r++){var i=e[r];o([i])||t.push(i)}0<t.length&&(_(t,!0),l.diagLog().throwInternal(M.WARNING,k.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[Zt]=!0}catch(i){}t.open("POST",r,e),t.setRequestHeader("Content-type","application/json"),dr(r)&&t.setRequestHeader("Sdk-Context","appId"),O(He(E),function(e){t.setRequestHeader(e,E[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(U(e)){for(var t=e.length,r=0;r<e.length;r++)t+=e[r].length;F+t<=65e3?i(e,!1):xn()?u(e):(_&&_(e,!0),l.diagLog().throwInternal(M.WARNING,k.TransmissionFailed,". Failed to send telemetry with Beacon API, retried with xhrSender."))}}function g(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=(dr(e)&&o.append("Sdk-Context","appId"),O(He(E),function(e){o.append(e,E[e])}),(i={method:"POST",headers:o,body:i})[Zt]=!0,r||(n=i.keepalive=!0,F+=a),new Request(e,i));try{e[Zt]=!0}catch(u){}l._buffer.markAsSent(t);try{fetch(e).then(function(n){r||(F-=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||(F-=a,a=0),s||(s=!0,l._onError(t,e.message))})}catch(u){s||l._onError(t,K(u))}n&&!s&&(s=!0,l._onSuccess(t,t.length))}function p(e){try{if(e&&""!==e){var n=j().parse(e);if(n&&n.itemsReceived&&n.itemsReceived>=n.itemsAccepted&&n.itemsReceived-n.itemsAccepted===n.errors.length)return n}}catch(t){l.diagLog().throwInternal(M.CRITICAL,k.InvalidBackendResponse,"Cannot parse the response. "+z(t),{response:e})}return null}function h(e,n){if(void 0===n&&(n=1),e&&0!==e.length){var t=l._buffer;t.clearSent(e),T++;for(var r=0,i=e;r<i.length;r++){var o=i[r];t.enqueue(o)}n=T<=1?10:(e=1+Math.floor((Math.pow(2,T)-1)/2*Math.random()*10),Math.max(Math.min(e*=n,3600),10)),e=Ye()+1e3*n;w=e,m()}}function m(){var e;t||L||(e=w?Math.max(0,w-Ye()):0,e=Math.max(l._senderConfig.maxBatchInterval(),e),t=setTimeout(function(){t=null,l.triggerSend(!0,null,1)},e))}function v(){clearTimeout(t),w=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:"+ji(e)||e.response||"":n}function C(n,e){var t=l._buffer,r=mn(),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,k.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:"+ji(e)||"":n}function x(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,k.NotificationException,"send request notification failed: "+z(r),{exception:K(r)})}}l.pause=function(){v(),L=!0},l.resume=function(){L&&(L=!1,w=null,l._buffer.size()>l._senderConfig.maxBatchSizeInBytes()&&l.triggerSend(!0,null,10),m())},l.flush=function(){if(!L){v();try{l.triggerSend(!0,null,1)}catch(e){l.diagLog().throwInternal(M.CRITICAL,k.FlushFailed,"flush failed, telemetry will not be collected: "+z(e),{exception:K(e)})}}},l.onunloadFlush=function(){if(!L)if(!1!==l._senderConfig.onunloadDisableBeacon()&&!1!==l._senderConfig.isBeaconApiDisabled()||!xn())l.flush();else try{l.triggerSend(!0,n,2)}catch(e){l.diagLog().throwInternal(M.CRITICAL,k.FailedToSendQueuedTelemetry,"failed to flush with beacon sender on page unload, telemetry will not be collected: "+z(e),{exception:K(e)})}},l.teardown=function(){Qe("Method not implemented.")},l.addHeader=function(e,n){E[e]=n},l.initialize=function(e,n,t,r){a.initialize(e,n,t,r);var i=l._getTelCtx(),o=l.identifier,t=(b=new Mi(n.logger),w=null,T=0,l._sender=null,N=0,l.diagLog()),r=(P(Ki(),function(e,n){l._senderConfig[e]=function(){return i.getConfig(o,e,n())}}),l._buffer=new(l._senderConfig.enableSessionStorageBuffer()&&or()?wi:Si)(t,l._senderConfig),l._sample=new Oi(l._senderConfig.samplingPercentage(),t),!D(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,k.InvalidInstrumentationKey,"Invalid Instrumentation key "+e.instrumentationKey),!dr(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()&&wn()?n=C:!r.disableXhr()&&bn()&&(n=f),!n&&Tn()&&(n=g),_=n||f,!r.isBeaconApiDisabled()&&xn()&&(n=u),l._sender=n||f,R=!r.onunloadDisableFetch()&&Tn(!0)?d:xn()?u:!r.disableXhr()&&wn()?C:!r.disableXhr()&&bn()?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,k.CannotSendEmptyTelemetry,"Cannot send empty telemetry");if(e.baseData&&!e.baseType)return void t.diagLog().throwInternal(M.CRITICAL,k.InvalidEvent,"Cannot send telemetry without baseData and baseType");if(e.baseType||(e.baseType="EventData"),!l._sender)return void t.diagLog().throwInternal(M.CRITICAL,k.SenderNotInitialized,"Sender was not initialized");if(!l._sample.isSampledIn(e))return void t.diagLog().throwInternal(M.WARNING,k.TelemetrySampledAndNotSent,"Telemetry item was sampled out and not sent",{SampleRate:l._sample.sampleRate});e[Qt]=l._sample.sampleRate;var n=l._senderConfig.convertUndefined()||undefined,r=e.iKey||l._senderConfig.instrumentationKey(),i=Gi.constructEnvelope(e,r,t.diagLog(),n);if(!i)return void t.diagLog().throwInternal(M.CRITICAL,k.CreateEnvelopeError,"Unable to create an AppInsights envelope");var o=!1;if(e.tags&&e.tags[$t]&&(O(e.tags[$t],function(e){try{e&&!1===e(i)&&(o=!0,t.diagLog().warnToConsole("Telemetry processor check returns false"))}catch(n){t.diagLog().throwInternal(M.CRITICAL,k.TelemetryInitializerFailed,"One of telemetry initializers failed, telemetry item will not be sent: "+z(n),{exception:K(n)},!0)}}),delete e.tags[$t]),o)return;var a=b.serialize(i),s=l._buffer;s.size()+a.length>l._senderConfig.maxBatchSizeInBytes()&&l.triggerSend(!0,null,10),s.enqueue(a),m()}catch(u){t.diagLog().throwInternal(M.WARNING,k.FailedAddingTelemetryToBuffer,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+z(u),{exception:K(u)})}l.processNext(e,t)},l._xhrReadyStateChange=function(e,n,t){4===e.readyState&&c(e.status,n,e.responseURL,t,I(e),ji(e)||e.response)},l.triggerSend=function(e,n,t){if(void 0===e&&(e=!0),!L)try{var r,i=l._buffer;l._senderConfig.disableTelemetry()?i.clear():0<i.count()&&(r=i.getItems(),x(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=In()||{})?(n.userAgent||"").toLowerCase():"")||"").toLowerCase();if(B(n,un))return e=vn()||{},Math.max(parseInt(n.split(un)[1]),e.documentMode||0);if(B(n,ln)){e=parseInt(n.split(ln)[1]);if(e)return e+4}return null}();(!i||9<i)&&l.diagLog().throwInternal(M.CRITICAL,k.TransmissionFailed,"Telemetry transmission failed, some telemetry will be lost: "+z(o),{exception:K(o)})}},l._onError=function(e,n,t){l.diagLog().throwInternal(M.WARNING,k.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&&(h(r),l.diagLog().throwInternal(M.WARNING,k.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=ji(e);!e||t+""!="200"&&""!==t?(t=p(t))&&t.itemsReceived&&t.itemsReceived>t.itemsAccepted&&!l._senderConfig.isRetryDisabled()?l._onPartialSuccess(n,t):l._onError(n,S(e)):(T=0,l._onSuccess(n,0))}}),A}Hi.prototype.initialize=function(){this.core=new _t;var e=[],n=new Wi;e.push(n),this.core.initialize(this.config,e),n.initialize(this.config,this.core,e),this.pollInternalLogs()},Hi.prototype.track=function(e){this.core.track(e)},Hi.prototype.flush=function(n){void 0===n&&(n=!0),O(this.core.getTransmissionControls(),function(e){O(e,function(e){n?e.flush():e.triggerSend(n,null,1)})})},Hi.prototype.pollInternalLogs=function(){this.core.pollInternalLogs()},Hi.prototype.stopPollingInternalLogs=function(){this.core.stopPollingInternalLogs()},Hi.prototype.getSKUDefaults=function(){this.config.diagnosticLogInterval=this.config.diagnosticLogInterval&&0<this.config.diagnosticLogInterval?this.config.diagnosticLogInterval:1e4};hi=Hi;function Hi(e){(D(e)||D(e.instrumentationKey))&&Qe("Invalid input configuration"),this.config=e,this.getSKUDefaults(),this.initialize()}N.AppInsightsCore=_t,N.ApplicationInsights=hi,N.CoreUtils=jt,N.Sender=Wi;s=N,mi="__esModule",l={value:!0},c=Object.defineProperty;if(c)try{return void c(s,mi,l)}catch(no){}typeof l.value!==undefined&&(s[mi]=l.value)};"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(((e="undefined"!=typeof globalThis?globalThis:e||self).Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights=e.Microsoft.ApplicationInsights||{}));
5
+ var e=this,n=function(N){"use strict";var _="function",R="object",A="undefined",o="prototype",L="hasOwnProperty",t=Object,E=t[o],F=t.assign,q=t.create,e=t.defineProperty,V=E[L],W=null;function G(e){return void 0===e&&(e=!0),W&&e||(typeof globalThis!==A&&globalThis&&(W=globalThis),typeof self!==A&&self&&(W=self),typeof window!==A&&window&&(W=window),typeof global!==A&&global&&(W=global)),W}function H(e){throw new TypeError(e)}function X(e){if(q)return q(e);if(null==e)return{};var n=typeof e;function t(){}return n!==R&&n!==_&&H("Object prototype may only be an Object:"+e),t[o]=e,new t}(G()||{}).Symbol,(G()||{}).Reflect;var Y=F||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},J=function(e,n){return(J=t.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)n[L](t)&&(e[t]=n[t])})(e,n)};function n(e,n){function t(){this.constructor=e}typeof n!==_&&null!==n&&H("Class extends value "+n+" is not a constructor or null"),J(e,n),e[o]=null===n?X(n):(t[o]=n[o],new t)}function Z(e,n){for(var t=0,r=n.length,i=e.length;t<r;t++,i++)e[i]=n[t];return e}var Q="constructor",p="prototype",$="function",ee="_dynInstFuncs",ne="_isDynProxy",te="_dynClass",re="_dynInstChk",ie=re,oe="_dfOpts",ae="_unknown_",se="__proto__",ue="_dyn"+se,le="_dynInstProto",ce="useBaseInst",fe="setInstFuncs",de=Object,ge=de.getPrototypeOf,pe=de.getOwnPropertyNames,he=0;function h(e,n){return e&&de[p].hasOwnProperty.call(e,n)}function me(e){return e&&(e===de[p]||e===Array[p])}function ve(e){return me(e)||e===Function[p]}function ye(e){if(e){if(ge)return ge(e);var n=e[se]||e[p]||(e[Q]?e[Q][p]:null),t=e[ue]||n;h(e,ue)||(delete e[le],t=e[ue]=e[le]||e[ue],e[le]=n)}return t}function Ie(e,n){var t=[];if(pe)t=pe(e);else for(var r in e)"string"==typeof r&&h(e,r)&&t.push(r);if(t&&0<t.length)for(var i=0;i<t.length;i++)n(t[i])}function Ce(e,n,t){return n!==Q&&typeof e[n]===$&&(t||h(e,n))}function Se(e){throw new TypeError("DynamicProto: "+e)}function xe(e,n){for(var t=e.length-1;0<=t;t--)if(e[t]===n)return 1}function Te(e,n){return h(e,p)?e.name||n||ae:((e||{})[Q]||{}).name||n||ae}function m(e,r,n,t){h(e,p)||Se("theClass is an invalid class definition.");var i,o,a,s,u,l,c=e[p],f=(function(e){if(!ge)return 1;for(var n=[],t=ye(r);t&&!ve(t)&&!xe(n,t);){if(t===e)return 1;n.push(t),t=ye(t)}}(c)||Se("["+Te(e)+"] is not in class hierarchy of ["+Te(r)+"]"),null),e=(h(c,te)?f=c[te]:(f="_dynCls$"+Te(e,"_")+"$"+he,he++,c[te]=f),m[oe]),d=!!e[ce],g=(d&&t&&t[ce]!==undefined&&(d=!!t[ce]),o={},Ie(i=r,function(e){!o[e]&&Ce(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[ne]&&o&&!1!==(r=e[ee]||{})[ie]&&(i=(r[n[te]]||{})[t]||i),function(){return i.apply(e,arguments)}}for(var i={},a=(Ie(t,function(e){i[e]=r(n,t,e)}),ye(e)),s=[];a&&!ve(a)&&!xe(s,a);)Ie(a,function(e){!i[e]&&Ce(a,e,!ge)&&(i[e]=r(n,a,e))}),s.push(a),a=ye(a);return i}(c,r,g,d)),!!ge&&!!e[fe]);a=c,n=f,s=r,u=g,e=!1!==(d=d&&t?!!t[fe]:d),me(a)||(c=s[ee]=s[ee]||{},l=c[n]=c[n]||{},!1!==c[ie]&&(c[ie]=!!e),Ie(s,function(e){var t,r,i;Ce(s,e,!1)&&s[e]!==u[e]&&(l[e]=s[e],delete s[e],h(a,e)&&(!a[e]||a[e][ne])||(a[e]=(t=a,r=e,(i=function(){var e,n;return(function(e,n,t,r){var i=null;if(e&&h(t,te)){var o=e[ee]||{};if((i=(o[t[te]]||{})[n])||Se("Missing ["+n+"] "+$),!i[re]&&!1!==o[ie]){for(var a=!h(e,n),s=ye(e),u=[];a&&s&&!ve(s)&&!xe(u,s);){var l=s[n];if(l){a=l===r;break}u.push(s),s=ye(s)}try{a&&(e[n]=i),i[re]=1}catch(c){o[ie]=!1}}}return i}(this,r,t,i)||(typeof(n=(n=t[e=r])===i?ye(t)[e]:n)!==$&&Se("["+e+"] is not a "+$),n)).apply(this,arguments)})[ne]=1,i)))}))}m[oe]={setInstFuncs:!0,useBaseInst:!0},(Le=M=M||{})[Le.CRITICAL=1]="CRITICAL",Le[Le.WARNING=2]="WARNING";var M,k={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},we="attachEvent",be="addEventListener",Ne="toISOString",_e="endsWith",Re="indexOf",Ae="trim",Le="toString",Ee=e,Fe=(t.freeze,t.seal,t.keys),e=String[o],Me=e[Ae],ke=e[_e],De=(e.startsWith,Date[o][Ne]),e=Array.isArray,Pe=E[Le];function g(e){return e===undefined||typeof e===A}function D(e){return null===e||g(e)}function Be(e){return!D(e)}function Ue(e){return!(!e||typeof e!==R)}function d(e){return!(!e||typeof e!==_)}function Oe(e,n,t,r){void 0===r&&(r=!1);var i=!1;if(!D(e))try{D(e[be])?D(e[we])||(e[we]("on"+n,t),i=!0):(e[be](n,t,r),i=!0)}catch(o){}return i}function P(e,n){if(e)for(var t in e)V.call(e,t)&&n.call(e,t,e[t])}function B(e,n){return!(!e||!n||!~e.indexOf(n))}V[Le].call(t);var U=e||function(e){return!(!e||"[object Array]"!==Pe.call(e))};function ze(e){return!(!e||"[object Error]"!==Pe.call(e))}function v(e){return"string"==typeof e}function je(e){return"number"==typeof e}function Ke(e){return"boolean"==typeof e}function qe(e){if(e){if(De)return e[Ne]();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 Ve(e,n,t){if(e){if(e[Re])return e[Re](n,t);var r=e.length,t=t||0;try{for(var i=Math.max(0<=t?t:r-Math.abs(t),0);i<r;i++)if(i in e&&e[i]===n)return i}catch(o){}}return-1}function We(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 y(e){return e&&(Me&&e[Ae]?e[Ae]():e.replace?e.replace(/^\s+|\s+$/g,""):e)}var Ge=!{toString:null}.propertyIsEnumerable("toString"),He=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];function Xe(e){var n=typeof e;if(n===_||n===R&&null!==e||H("objKeys called on non-object"),!Ge&&Fe)return Fe(e);var t,r=[];for(t in e)e&&V.call(e,t)&&r.push(t);if(Ge)for(var i=He.length,o=0;o<i;o++)e&&V.call(e,He[o])&&r.push(He[o]);return r}function Ye(e,n,t,r){if(Ee)try{var i={enumerable:!0,configurable:!0};return t&&(i.get=t),r&&(i.set=r),Ee(e,n,i),!0}catch(o){}return!1}function Je(){var e=Date;return e.now?e.now():(new e).getTime()}function z(e){return ze(e)?e.name:""}function I(e,n,t,r,i){var o=t;!e||(o=e[n])===t||i&&!i(o)||r&&!r(t)||(e[n]=o=t)}function Ze(e){return!e}function Qe(e){return!!e}function $e(e){throw Error(e)}function en(e){return e&&F?t(F({},e)):e}var nn="window",tn="navigator",rn="location",on="console",an="JSON",sn="crypto",un="msCrypto",ln="msie",cn="trident/",fn=null,dn=null,gn=null,pn=null;function hn(e,n){var t,r=!1;if(e){try{(r=n in e)||(t=e[o])&&(r=n in t)}catch(i){}if(!r)try{r=!g((new e)[n])}catch(i){}}return r}function C(e){var n=G();return n&&n[e]?n[e]:e===nn&&mn()?window:null}function mn(){return typeof window===R&&window}function vn(){return mn()?window:C(nn)}function yn(){return typeof document===R&&document?document:C("document")}function In(){return!(typeof navigator!==R||!navigator)}function Cn(){return In()?navigator:C(tn)}function Sn(){return typeof JSON===R&&JSON||null!==C(an)}function j(){return Sn()?JSON||C(an):null}function xn(){var e=Cn();return!e||e.userAgent===dn&&null!==fn||(e=((dn=e.userAgent)||"").toLowerCase(),fn=B(e,ln)||B(e,cn)),fn}function K(e){var n=Object[o].toString.call(e),t="";return"[object Error]"===n?t="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":Sn()&&(t=j().stringify(e)),n+t}function Tn(){return pn=null===pn?In()&&!!Cn().sendBeacon:pn}function wn(e){var n=!1;try{var n=!!C("fetch"),t=C("Request");n&&e&&t&&(n=hn(t,"keepalive"))}catch(r){}return n}function bn(){return gn=null===gn&&(gn="undefined"!=typeof XDomainRequest)&&Nn()?gn&&!hn(C("XMLHttpRequest"),"withCredentials"):gn}function Nn(){var e=!1;try{e=!!C("XMLHttpRequest")}catch(n){}return e}var _n,Rn=["eventsSent","eventsDiscarded","eventsSendRequest","perfEvent"],An=null;function Ln(e){var n=An;return(n=n||!0===e.disableDbgExt?n:An||(e=C("Microsoft"),An=e?e.ApplicationInsights:An))?n.ChromeDbgExt:null}function En(e){return e?'"'+e.replace(/\"/g,"")+'"':""}function Fn(e,n){var t,r=typeof console!==A?console:C(on);r&&(t="log",d(r[t=r[e]?e:t])&&r[t](n))}kn.dataType="MessageData";var Mn=kn;function kn(e,n,t,r){void 0===t&&(t=!1),this.messageId=e,this.message=(t?"AI: ":"AI (Internal): ")+e;t="",Sn()&&(t=j().stringify(r)),e=(n?" message:"+En(n):"")+(r?" props:"+En(t):"");this.message+=e}function Dn(e,n){return(e||{}).logger||new Pn(n)}var Pn=function Ji(r){this.identifier="DiagnosticLogger",this.queue=[];var i=0,s={};m(Ji,this,function(o){function e(e,n){e=r[e];return D(e)?n:e}function a(e,n){var t=Ln(r);t&&t.diagLog&&t.diagLog(e,n)}D(r)&&(r={}),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 Mn(n,t,i=void 0!==i&&i,r);if(o.enableDebugExceptions())throw K(n);t=e===M.CRITICAL?"errorToConsole":"warnToConsole";g(n.message)?a("throw"+(e===M.CRITICAL?"Critical":"Warning"),n):(r=o.consoleLoggingLevel(),i?(i=+n.messageId,!s[i]&&e<=r&&(o[t](n.message),s[i]=!0)):e<=r&&o[t](n.message),o.logInternalMessage(e,n))},o.warnToConsole=function(e){Fn("warn",e),a("warning",e)},o.errorToConsole=function(e){Fn("error",e),a("error",e)},o.resetInternalMessageCount=function(){i=0,s={}},o.logInternalMessage=function(e,n){var t,r;i>=o.maxInternalMessageLimit()||(r=!0,t="AITR_"+n.messageId,s[t]?r=!1:s[t]=!0,r&&(e<=o.telemetryLoggingLevel()&&(o.queue.push(n),i++,a(e===M.CRITICAL?"error":"warn",n)),i===o.maxInternalMessageLimit()&&(r=new Mn(k.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))))}})},Bn=(Un.ParentContextKey="parent",Un.ChildrenContextKey="childEvts",Un);function Un(e,i,n){var t,o=this,a=!1;o.start=Je(),o.name=e,o.isAsync=n,o.isChildEvt=function(){return!1},d(i)&&(a=Ye(o,"payload",function(){return!t&&d(i)&&(t=i(),i=null),t})),o.getCtx=function(e){return e?(e===Un.ParentContextKey||e===Un.ChildrenContextKey?o:o.ctx||{})[e]:null},o.setCtx=function(e,n){e&&(e===Un.ParentContextKey?(o[e]||(o.isChildEvt=function(){return!0}),o[e]=n):e===Un.ChildrenContextKey?o[e]=n:(o.ctx=o.ctx||{})[e]=n)},o.complete=function(){var e=0,n=o.getCtx(Un.ChildrenContextKey);if(U(n))for(var t=0;t<n.length;t++){var r=n[t];r&&(e+=r.time)}o.time=Je()-o.start,o.exTime=o.time-e,o.complete=function(){},!a&&d(i)&&(o.payload=i())}}var On=function Zi(n){this.ctx={},m(Zi,this,function(t){t.create=function(e,n,t){return new Bn(e,n,t)},t.fire=function(e){e&&(e.complete(),n&&d(n.perfEvent)&&n.perfEvent(e))},t.setCtx=function(e,n){e&&((t.ctx=t.ctx||{})[e]=n)},t.getCtx=function(e){return(t.ctx||{})[e]}})},zn="CoreUtils.doPerf";function jn(e,n,t,r,i){if(e)if(e=d(e.getPerfMgr)?e.getPerfMgr():e){var o,a=void 0,s=e.getCtx(zn);try{if(a=e.create(n(),r,i))return s&&a.setCtx&&(a.setCtx(Bn.ParentContextKey,s),s.getCtx&&s.setCtx&&((o=s.getCtx(Bn.ChildrenContextKey))||(o=[],s.setCtx(Bn.ChildrenContextKey,o)),o.push(a))),e.setCtx(zn,a),t(a)}catch(u){a&&a.setCtx&&a.setCtx("exception",u)}finally{a&&e.fire(a),e.setCtx(zn,s)}}t()}var Kn=function(i,n){var o=this,a=null,s=d(i.processTelemetry),u=d(i.setNextPlugin);o._hasRun=!1,o.getPlugin=function(){return i},o.getNext=function(){return a},o.setNext=function(e){a=e},o.processTelemetry=function(t,r){r=r||n;var e=i?i.identifier:"TelemetryPluginChain";jn(r?r.core():null,function(){return e+":processTelemetry"},function(){if(i&&s){o._hasRun=!0;try{r.setNext(a),u&&i.setNextPlugin(a),a&&(a._hasRun=!1),i.processTelemetry(t,r)}catch(n){var e=a&&a._hasRun;a&&e||r.diagLog().throwInternal(M.CRITICAL,k.PluginException,"Plugin ["+i.identifier+"] failed during processTelemetry - "+K(n)),a&&!e&&a.processTelemetry(t,r)}}else a&&(o._hasRun=!0,a.processTelemetry(t,r))},function(){return{item:t}},!t.sync)}};function qn(e,n){var t=[];if(e&&0<e.length)for(var r=null,i=0;i<e.length;i++){var o=e[i];o&&d(o.processTelemetry)&&(o=new Kn(o,n),t.push(o),r&&r.setNext(o),r=o)}return 0<t.length?t[0]:null}var Vn=function Qi(e,i,t,n){var r,o,a,s,u=this,l=null;null!==n&&(e&&d(e.getPlugin)?l=function(e,n,t){var r=[],i=!t;if(e)for(;e;){var o=e.getPlugin();!i&&o!==t||(i=!0,r.push(o)),e=e.getNext()}return i||r.push(t),qn(r,n)}(e,u,n||e.getPlugin()):n?(r=u,a=e,s=!1,(o=n)&&e&&(a=[],O(e,function(e){!s&&e!==o||(s=!0,a.push(e))})),o&&!s&&(a=a||[]).push(o),l=qn(a,r)):g(n)&&(l=qn(e,u))),u.core=function(){return t},u.diagLog=function(){return Dn(t,i)},u.getCfg=function(){return i},u.getExtCfg=function(e,n){var t,r;return void 0===n&&(n={}),(t=i&&(r=i.extensionConfig)&&e?r[e]:t)||n},u.getConfig=function(e,n,t){void 0===t&&(t=!1);var r,e=u.getExtCfg(e,null);return e&&!D(e[n])?r=e[n]:i&&!D(i[n])&&(r=i[n]),D(r)?t:r},u.hasNext=function(){return null!=l},u.getNext=function(){return l},u.setNext=function(e){l=e},u.processNext=function(e){var n=l;n&&(l=n.getNext(),n.processTelemetry(e,u))},u.createNew=function(e,n){return new Qi((e=void 0===e?null:e)||l,i,t,n)}},Wn="extensionConfig",Gn="getPlugin",Le=(Hn.prototype.initialize=function(e,n,t,r){this._baseTelInit(e,n,t,r)},Hn);function Hn(){var o=this,a=!1,s=null,u=null;o.core=null,o.diagLog=function(e){return o._getTelCtx(e).diagLog()},o.isInitialized=function(){return a},o.setInitialized=function(e){a=e},o.setNextPlugin=function(e){u=e},o.processNext=function(e,n){n?n.processNext(e):u&&d(u.processTelemetry)&&u.processTelemetry(e,null)},o._getTelCtx=function(e){var n,e=e=void 0===e?null:e;return e||(n=s||new Vn(null,{},o.core),e=u&&u[Gn]?n.createNew(null,u[Gn]):n.createNew(null,u)),e},o._baseTelInit=function(e,n,t,r){e&&I(e,Wn,[],null,D),!r&&n&&(r=n.getProcessTelContext().getNext());var i=u;u&&u[Gn]&&(i=u[Gn]()),o.core=n,s=new Vn(r,e,n,i),a=!0}}var Xn="processTelemetry",Yn="priority",Jn="setNextPlugin",Zn="isInitialized";function Qn(n,t){for(var e=[],r=null,i=n.getNext();i;){var o=i.getPlugin();o&&(r&&d(r[Jn])&&d(o[Xn])&&r[Jn](o),d(o[Zn])&&o[Zn]()||e.push(o),r=o,i=i.getNext())}O(e,function(e){e.initialize(n.getCfg(),n.core(),t,n.getNext())})}function $n(e){return e.sort(function(e,n){var t=0,r=d(n[Xn]);return d(e[Xn])?t=r?e[Yn]-n[Yn]:1:r&&(t=-1),t})}n(tt,et=Le),tt._staticInit=(Ye(e=tt.prototype,"ChannelControls",e.getChannelControls),void Ye(e,"channelQueue",e.getChannelControls));var et,nt=tt;function tt(){var u,r=et.call(this)||this;function l(e){e&&0<e.length&&(O(e=e.sort(function(e,n){return e.priority-n.priority}),function(e){e.priority<500&&$e("Channel has invalid priority"+e.identifier)}),u.push(e))}return r.identifier="ChannelControllerPlugin",r.priority=500,m(tt,r,function(a,s){a.setNextPlugin=function(e){},a.processTelemetry=function(n,t){u&&O(u,function(e){0<e.length&&r._getTelCtx(t).createNew(e).processNext(n)})},a.getChannelControls=function(){return u},a.initialize=function(n,t,r){var e,i,o;a.isInitialized()||(s.initialize(n,t,r),e=(n||{}).channels,i=r,u=[],e&&O(e,l),i&&(o=[],O(i,function(e){500<e.priority&&o.push(e)}),l(o)),O(u,function(e){return Qn(new Vn(e,n,t),r)}))}}),r}var rt="toGMTString",it="toUTCString",ot="cookie",at="expires",st="enabled",ut="isCookieUseDisabled",lt="disableCookiesUsage",ct="_ckMgr",S="",ft=null,dt=null,gt=null,pt=yn(),ht={},mt={};function vt(e){return!e||e.isEnabled()}function yt(e,i){I(t=(e=e||mt).cookieCfg=e.cookieCfg||{},"domain",e.cookieDomain,Be,D),I(t,"path",e.cookiePath||"/",null,D),D(t[st])&&(n=void 0,g(e[ut])||(n=!e[ut]),g(e[lt])||(n=!e[lt]),t[st]=n);var n,t,l=t,c=l.path||"/",f=l.domain,r=!1!==l[st],d={isEnabled:function(){var e=r&&It(i),n=mt[ct];return e&&n&&d!==n?vt(n):e},setEnabled:function(e){r=!1!==e},set:function(e,n,t,r,i){var o,a,s,u=!1;return vt(d)&&(o={},-1!=(s=(a=y(n||S)).indexOf(";"))&&(a=y(n.substring(0,s)),o=Ct(n.substring(1+s))),I(o,"domain",r||f,Qe,g),D(t)||(s=xn(),g(o[at])&&0<(n=Je()+1e3*t)&&((r=new Date).setTime(n),I(o,at,St(r,s?rt:it)||St(r,s?rt:it)||S,Qe)),s||I(o,"max-age",S+t,null,g)),(n=typeof location===R&&location?location:C(rn))&&"https:"===n.protocol&&(I(o,"secure",null,null,g),(dt=null===dt?!(v(r=(Cn()||{}).userAgent)&&(B(r,"CPU iPhone OS 12")||B(r,"iPad; CPU OS 12")||B(r,"Macintosh; Intel Mac OS X 10_14")&&B(r,"Version/")&&B(r,"Safari")||B(r,"Macintosh; Intel Mac OS X 10_14")&&function(e,n){var t=!1;if(!e||(t=e===n))return t;if(ke)return e[_e](n);var r=e,i=n,t=!1,e=r?r.length:0;if(e&&40<=e&&!(t=r===i)){for(var o=e-1,a=39;0<=a;a--){if(r[o]!=i[a])return;o--}t=!0}return t}(r,"AppleWebKit/605.1.15 (KHTML, like Gecko)")||B(r,"Chrome/5")||B(r,"Chrome/6")||B(r,"UnrealEngine")&&!B(r,"Chrome")||B(r,"UCBrowser/12")||B(r,"UCBrowser/11"))):dt)&&I(o,"SameSite","None",null,g)),I(o,"path",i||c,null,g),(l.setCookie||Tt)(e,xt(a,o)),u=!0),u},get:function(e){var n=S;return vt(d)?(l.getCookie||function(e){var n,t=S;return pt&&(n=pt[ot]||S,gt!==n&&(ht=Ct(n),gt=n),t=y(ht[e]||S)),t})(e):n},del:function(e,n){return!!vt(d)&&d.purge(e,n)},purge:function(e,n){var t,r=!1;return It(i)&&((t={}).path=n||"/",t[at]="Thu, 01 Jan 1970 00:00:01 GMT",n=t,xn()||(n["max-age"]="0"),(l.delCookie||Tt)(e,xt(S,n)),r=!0),r}};return d[ct]=d}function It(e){if(null===ft){ft=!1;try{ft=(pt||{})[ot]!==undefined}catch(n){e&&e.throwInternal(M.WARNING,k.CannotAccessCookie,"Cannot access document.cookie - "+z(n),{exception:K(n)})}}return ft}function Ct(e){var t={};return e&&e.length&&O(y(e).split(";"),function(e){var n;(e=y(e||S))&&(-1==(n=e.indexOf("="))?t[e]=null:t[y(e.substring(0,n))]=y(e.substring(1+n)))}),t}function St(e,n){return d(e[n])?e[n]():null}function xt(e,n){var t=e||S;return P(n,function(e,n){t+="; "+e+(D(n)?S:"="+n)}),t}function Tt(e,n){pt&&(pt[ot]=e+"="+n)}var wt="_notificationManager";function bt(e,n){return new On(n)}var Nt,_t=function $i(e){this.listeners=[];var n=!!(e||{}).perfEvtsSendAll;m($i,this,function(i){i.addNotificationListener=function(e){i.listeners.push(e)},i.removeNotificationListener=function(e){for(var n=Ve(i.listeners,e);-1<n;)i.listeners.splice(n,1),n=Ve(i.listeners,e)},i.eventsSent=function(n){O(i.listeners,function(e){e&&e.eventsSent&&setTimeout(function(){return e.eventsSent(n)},0)})},i.eventsDiscarded=function(n,t){O(i.listeners,function(e){e&&e.eventsDiscarded&&setTimeout(function(){return e.eventsDiscarded(n,t)},0)})},i.eventsSendRequest=function(t,r){O(i.listeners,function(e){if(e&&e.eventsSendRequest)if(r)setTimeout(function(){return e.eventsSendRequest(t,r)},0);else try{e.eventsSendRequest(t,r)}catch(n){}})},i.perfEvent=function(t){!t||!n&&t.isChildEvt()||O(i.listeners,function(e){if(e&&e.perfEvent)if(t.isAsync)setTimeout(function(){return e.perfEvent(t)},0);else try{e.perfEvent(t)}catch(n){}})}})},Rt=(n(At,Nt=function eo(){var n,l,c,t,r,f=!1;m(eo,this,function(u){u._extensions=[],l=new nt,u.logger=new Pn({loggingLevelConsole:M.CRITICAL}),n=[],u.isInitialized=function(){return f},u.initialize=function(e,n,r,t){u.isInitialized()&&$e("Core should not be initialized more than once"),e&&!D(e.instrumentationKey)||$e("Please provide instrumentation key"),c=t,u[wt]=t,u.config=e||{},t&&!0!==u.config.disableDbgExt&&t.addNotificationListener(function(e){if(!_n){_n={};for(var n=0;n<Rn.length;n++)_n[Rn[n]]=function(n,t){return function(){var e=Ln(t);e&&(e=e.listener)&&e[n]&&e[n].apply(e,arguments)}}(Rn[n],e)}return _n}(e)),u.config.enablePerfMgr&&I(u.config,"createPerfMgr",bt),e.extensions=D(e.extensions)?[]:e.extensions,e?!(i=e[Wn])&&D(i)&&(i=g(o)?{}:o,e[Wn]=i):i=g(o)?{}:o,i.NotificationManager=t,r&&(u.logger=r);var i,o=[],a=(o.push.apply(o,Z(Z([],n),e.extensions)),o=$n(o),[]),s={};O(o,function(e){(D(e)||D(e.initialize))&&$e("Extensions must provide callback to initialize");var n=e.priority,t=e.identifier;e&&n&&(D(s[n])?s[n]=t:r.warnToConsole("Two extensions have same priority #"+n+" - "+s[n]+", "+t)),(!n||n<l.priority)&&a.push(e)}),o.push(l),a.push(l),o=$n(o),u._extensions=o,Qn(new Vn([l],e,u),o),Qn(new Vn(a,e,u),o),u._extensions=a,0===u.getTransmissionControls().length&&$e("No channels available"),f=!0,u.releaseQueue()},u.getTransmissionControls=function(){return l.getChannelControls()},u.track=function(e){I(e,"iKey",u.config.instrumentationKey,null,Ze),I(e,"time",qe(new Date),null,Ze),I(e,"ver","4.0",null,D),u.isInitialized()?u.getProcessTelContext().processNext(e):n.push(e)},u.getProcessTelContext=function(){var e=u._extensions,n=e;return e&&0!==e.length||(n=[l]),new Vn(n,u.config,u)},u.getNotifyMgr=function(){return c||(c=X({addNotificationListener:function(e){},removeNotificationListener:function(e){},eventsSent:function(e){},eventsDiscarded:function(e,n){},eventsSendRequest:function(e,n){}}),u[wt]=c),c},u.getCookieMgr=function(){return r=r||yt(u.config,u.logger)},u.setCookieMgr=function(e){r=e},u.getPerfMgr=function(){return t||u.config&&u.config.enablePerfMgr&&d(u.config.createPerfMgr)&&(t=u.config.createPerfMgr(u,u.getNotifyMgr())),t||null},u.setPerfMgr=function(e){t=e},u.eventCnt=function(){return n.length},u.releaseQueue=function(){0<n.length&&(O(n,function(e){u.getProcessTelContext().processNext(e)}),n=[])}})}),At);function At(){var e=Nt.call(this)||this,r=0;return m(At,e,function(t,i){function n(e){var n=t.getNotifyMgr();n&&n.eventsDiscarded([e],2)}t.initialize=function(e,n,t,r){i.initialize(e,n,t||new Pn(e),r||new _t(e))},t.track=function(e){jn(t.getPerfMgr(),function(){return"AppInsightsCore:track"},function(){if(null===e&&(n(e),$e("Invalid telemetry item")),D(e.name))throw n(e),Error("telemetry name required");i.track(e)},function(){return{item:e}},!e.sync)},t.addNotificationListener=function(e){var n=t.getNotifyMgr();n&&n.addNotificationListener(e)},t.removeNotificationListener=function(e){var n=t.getNotifyMgr();n&&n.removeNotificationListener(e)},t.pollInternalLogs=function(n){var e=t.config.diagnosticLogInterval;return e&&0<e||(e=1e4),r&&t.stopPollingInternalLogs(),r=setInterval(function(){var e=t.logger?t.logger.queue:[];O(e,function(e){e={name:n||"InternalMessageId: "+e.messageId,iKey:t.config.instrumentationKey,time:qe(new Date),baseType:Mn.dataType,baseData:{message:e.message}};t.track(e)}),e.length=0},e)},t.stopPollingInternalLogs=function(){r&&(clearInterval(r),r=0)}}),e}var Lt=4294967296,Et=4294967295,Ft=!1,Mt=123456789,kt=987654321;function Dt(e){e<0&&(e>>>=0),Mt=123456789+e&Et,kt=987654321-e&Et,Ft=!0}function Pt(){try{var e=2147483647&Je();Dt((Math.random()*Lt^e)+e)}catch(n){}}function Bt(e){return 0<e?Math.floor(Ut()/Et*(e+1))>>>0:0}function Ut(e){var n=C(sn)||C(un),n=n&&n.getRandomValues?n.getRandomValues(new Uint32Array(1))[0]&Et:xn()?(Ft||Pt(),Ot()&Et):Math.floor(Lt*Math.random()|0);return e||(n>>>=0),n}function Ot(e){var n=((kt=36969*(65535&kt)+(kt>>16)&Et)<<16)+(65535&(Mt=18e3*(65535&Mt)+(Mt>>16)&Et))>>>0&Et|0;return e||(n>>>=0),n}var zt,jt=null,Kt={_canUseCookies:undefined,isTypeof:function(e,n){return typeof e===n},isUndefined:g,isNullOrUndefined:D,hasOwnProperty:function(e,n){return!(!e||!V.call(e,n))},isFunction:d,isObject:Ue,isDate:function(e){return!(!e||"[object Date]"!==Pe.call(e))},isArray:U,isError:ze,isString:v,isNumber:je,isBoolean:Ke,toISOString:qe,arrForEach:O,arrIndexOf:Ve,arrMap:We,arrReduce:function(e,n,t){var r;if(e){if(e.reduce)return e.reduce(n,t);var i=e.length,o=0;if(3<=arguments.length)r=t;else{for(;o<i&&!(o in e);)o++;r=e[o++]}for(;o<i;)o in e&&(r=n(r,e[o],o,e)),o++}return r},strTrim:y,objCreate:X,objKeys:Xe,objDefineAccessors:Ye,addEventHandler:function(e,n){var t=!1,r=vn(),r=(r&&(t=Oe(r,e,n),t=Oe(r.body,e,n)||t),yn());return r&&Oe(r,e,n)||t},dateNow:Je,isIE:xn,disableCookies:function(){var e,n;(e=yt[ct]||mt[ct])||(e=yt[ct]=yt(void 0,void 0),mt[ct]=e),e=e,n=Kt._canUseCookies,null===jt&&(jt=[],zt=n,Ye(Kt,"_canUseCookies",function(){return zt},function(n){zt=n,O(jt,function(e){e.setEnabled(n)})})),-1===Ve(jt,e)&&jt.push(e),Ke(n)&&e.setEnabled(n),Ke(zt)&&e.setEnabled(zt),e.setEnabled(!1)},newGuid:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(qt,function(e){var n=0|Bt(15);return("x"===e?n:3&n|8).toString(16)})},perfNow:function(){var e=C("performance");return e&&e.now?e.now():Je()},newId:function(e){void 0===e&&(e=22);for(var n=Ut()>>>0,t=0,r="";r.length<e;)r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[0|63&n]||"",n>>>=6,5==++t&&(n=(Ut()<<2&4294967295|3&n)>>>0,t=0);return r},randomValue:Bt,random32:Ut,mwcRandomSeed:function(e){e?Dt(e):Pt()},mwcRandom32:Ot,generateW3CId:function(){for(var e,n=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],t="",r=0;r<4;r++)t+=n[15&(e=Ut())]+n[e>>4&15]+n[e>>8&15]+n[e>>12&15]+n[e>>16&15]+n[e>>20&15]+n[e>>24&15]+n[e>>28&15];var i=n[8+(3&Ut())|0];return t.substr(0,8)+t.substr(9,4)+"4"+t.substr(13,3)+i+t.substr(16,3)+t.substr(19,12)}},qt=/[xy]/g;function Vt(e,n,t){var r,i,o=n.length,a=(e=e,(n=n)&&150<(n=y(n.toString())).length&&(i=n.substring(0,150),e&&e.throwInternal(M.WARNING,k.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 x(e,n,t){var r;return void 0===t&&(t=1024),n&&(t=t||1024,(n=y(n)).toString().length>t&&(r=n.toString().substring(0,t),e&&e.throwInternal(M.WARNING,k.StringValueTooLong,"string value is too long. It has been truncated to "+t+" characters.",{value:n},!0))),r||n}function Wt(e,n){return Yt(e,n,2048,k.UrlTooLong)}function Gt(e,n){var t;return n&&32768<n.length&&(t=n.substring(0,32768),e&&e.throwInternal(M.WARNING,k.MessageTruncated,"message is too long, it has been truncated to 32768 characters.",{message:n},!0)),t||n}function Ht(r,e){var i;return e&&(i={},P(e,function(e,n){if(Ue(n)&&Sn())try{n=j().stringify(n)}catch(t){r&&r.throwInternal(M.WARNING,k.CannotSerializeObjectNonSerializable,"custom property is not valid",{exception:t},!0)}n=x(r,n,8192),e=Vt(r,e,i),i[e]=n}),e=i),e}function Xt(t,e){var r;return e&&(r={},P(e,function(e,n){e=Vt(t,e,r),r[e]=n}),e=r),e}function Yt(e,n,t,r){var i;return n&&(n=y(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 Jt(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 Zt,Qt="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",$t="sampleRate",er="ProcessLegacy",nr="http.method",tr="not_specified",rr=((e=Zt=Zt||{})[e.LocalStorage=0]="LocalStorage",e[e.SessionStorage=1]="SessionStorage",undefined);function ir(e){try{if(D(G()))return null;var n=new Date,t=C(e===Zt.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 or(){return ar()?ir(Zt.SessionStorage):null}function ar(){return rr=rr===undefined?!!ir(Zt.SessionStorage):rr}function sr(e,n){var t=or();if(null!==t)try{return t.getItem(n)}catch(r){rr=!1,e.throwInternal(M.WARNING,k.BrowserCannotReadSessionStorage,"Browser failed read of session storage. "+z(r),{exception:K(r)})}return null}function ur(e,n,t){var r=or();if(null!==r)try{r.setItem(n,t)}catch(i){rr=!1,e.throwInternal(M.WARNING,k.BrowserCannotWriteSessionStorage,"Browser failed write to session storage. "+z(i),{exception:K(i)})}}var lr=yn()||{},cr=0,fr=[null,null,null,null,null];var dr=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"];function gr(e){return-1!==Ve(dr,e.toLowerCase())}n(hr,pr=function(){});var pr,e=hr;function hr(){return pr.call(this)||this}n(yr,mr=function(){this.ver=1,this.sampleRate=100,this.tags={}});var mr,vr=yr;function yr(e,n,t){var r=mr.call(this)||this;return r.name=x(e,t)||tr,r.data=n,r.time=qe(new Date),r.aiDataContract={time:1,iKey:1,name:1,sampleRate:function(){return 100===r.sampleRate?4:1},tags:1,data:1},r}var Ir,r=function(){this.ver=2,this.properties={},this.measurements={}},Cr=(n(Sr,Ir=r),Sr.envelopeType="Microsoft.ApplicationInsights.{0}.Event",Sr.dataType="EventData",Sr);function Sr(e,n,t,r){var i=Ir.call(this)||this;return i.aiDataContract={ver:1,name:1,properties:0,measurements:0},i.name=x(e,n)||tr,i.properties=Ht(e,t),i.measurements=Xt(e,r),i}var xr="error",u="stack",Tr="stackDetails",wr="errorSrc",br="message",Nr="description";function _r(e,n){var t=e;return t&&!v(t)&&(JSON&&JSON.stringify?(t=JSON.stringify(e),!n||t&&"{}"!==t||(t=d(e.toString)?e.toString():""+e)):t=e+" - (Missing JSON.stringify)"),t||""}function Rr(e,n){var t=e;return e&&((t=t&&!v(t)&&(e[br]||e[Nr])||t)&&!v(t)&&(t=_r(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 Ar(e){return e&&e.src&&v(e.src)&&e.obj&&U(e.obj)}function Lr(e){var e=e||"",n=(e=v(e)?e:v(e[u])?e[u]:""+e).split("\n");return{src:e,obj:n}}function Er(e){var n,t=null;if(e)try{e[u]?t=Lr(e[u]):e[xr]&&e[xr][u]?t=Lr(e[xr][u]):e.exception&&e.exception[u]?t=Lr(e.exception[u]):Ar(e)?t=e:Ar(e[Tr])?t=e[Tr]:window&&window.opera&&e[br]?t=function(e){for(var n=[],t=e.split("\n"),r=0;r<t.length;r++){var i=t[r];t[r+1]&&(i+="@"+t[r+1],r++),n.push(i)}return{src:e,obj:n}}(e.message):v(e)?t=Lr(e):(n=e[br]||e[Nr]||"",v(e[wr])&&(n&&(n+="\n"),n+=" from "+e[wr]),n&&(t=Lr(n)))}catch(r){t=Lr(r)}return t||{src:"",obj:null}}function Fr(e){var n="";if(e&&!(n=e.typeName||e.name||""))try{var t=/function (.{1,200})\(/.exec(e.constructor.toString()),n=t&&1<t.length?t[1]:""}catch(r){}return n}function Mr(e){if(e)try{var n,t;if(!v(e))return n=Fr(e),(t=_r(e,!1))&&"{}"!==t||(e[xr]&&(n=Fr(e=e[xr])),t=_r(e,!0)),t.indexOf(n)&&"String"!==n?n+":"+t:t}catch(r){}return""+(e||"")}n(a,kr=function(){this.ver=2,this.exceptions=[],this.properties={},this.measurements={}}),a.CreateAutoException=function(e,n,t,r,i,o,a,s){var u=Fr(i||o||e);return{message:Rr(e,u),url:n,lineNumber:t,columnNumber:r,error:Mr(i||o||e),evt:Mr(o||e),typeName:u,stackDetails:Er(a||i||o),errorSrc:s}},a.CreateFromInterface=function(n,e,t,r){var i=e.exceptions&&We(e.exceptions,function(e){return Br.CreateFromInterface(n,e)});return new a(n,Y(Y({},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&&We(n,function(e){return e.toInterface()})||undefined,severityLevel:i,properties:t,measurements:r,problemGroup:o,id:a,isManual:e}},a.CreateSimpleException=function(e,n,t,r,i,o){return{exceptions:[{hasFullStack:!0,message:e,stack:i,typeName:n}]}},a.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",a.dataType="ExceptionData",a.formatError=Mr;var kr,Dr=a;function a(e,n,t,r,i,o){var a=kr.call(this)||this;return a.aiDataContract={ver:1,exceptions:1,severityLevel:0,properties:0,measurements:0},function(e){try{if(Ue(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,D(n.isManual)||(a.isManual=n.isManual)):(a.exceptions=[new Br(e,n,t=t||{})],a.properties=Ht(e,t),a.measurements=Xt(e,r),i&&(a.severityLevel=i),o&&(a.id=o)),a}n(Ur,Pr=function(){this.hasFullStack=!0,this.parsedStack=[]}),Ur.prototype.toInterface=function(){var e=this.parsedStack instanceof Array&&We(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}},Ur.CreateFromInterface=function(e,n){var t=n.parsedStack instanceof Array&&We(n.parsedStack,function(e){return jr.CreateFromInterface(e)})||n.parsedStack;return new Ur(e,Y(Y({},n),{parsedStack:t}))};var Pr,Br=Ur;function Ur(e,n,t){var l,r,i,o,a,s=Pr.call(this)||this;return s.aiDataContract={id:0,outerId:0,typeName:1,message:1,hasFullStack:0,stack:0,parsedStack:2},function(e){try{if(Ue(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,ze(o)||(o=o[xr]||r||o),s.typeName=x(e,Fr(o))||tr,s.message=Gt(e,Rr(n||o,s.typeName))||tr,l=n[Tr]||Er(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();jr.regex.test(e)&&(e=new jr(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,k.ExceptionTruncated,"exception is too long, it has been truncated to 32768 characters.",{exception:n},!0)),i||n),s.hasFullStack=U(s.parsedStack)&&0<s.parsedStack.length,t&&(t.typeName=t.typeName||s.typeName)),s}n(i,Or=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 Or,zr,jr=i;function i(e,n){var t,r=Or.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=y(t),r.fileName="",r.line=0,(n=t.match(i.regex))&&5<=n.length&&(r.method=y(n[2])||r.method,r.fileName=y(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}zr=0,n(Vr,Kr=function(){this.kind=zr});var Kr,qr=Vr;function Vr(){var e=null!==Kr&&Kr.apply(this,arguments)||this;return e.aiDataContract={name:1,kind:0,value:1,count:0,min:0,max:0,stdDev:0},e}n(Hr,Wr=function(){this.ver=2,this.metrics=[],this.properties={},this.measurements={}}),Hr.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",Hr.dataType="MetricData";var Wr,Gr=Hr;function Hr(e,n,t,r,i,o,a,s,u){var l=Wr.call(this)||this,c=(l.aiDataContract={ver:1,metrics:1,properties:0},new qr);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=x(e,n)||tr,c.value=t,c.stdDev=isNaN(a)||null===a?undefined:a,l.metrics=[c],l.properties=Ht(e,s),l.measurements=Xt(e,u),l}n(Yr,Xr=r);var Xr,r=Yr;function Yr(){var e=Xr.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}n(Qr,Jr=r),Qr.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",Qr.dataType="PageviewData";var Jr,Zr=Qr;function Qr(e,n,t,r,i,o,a){var s=Jr.call(this)||this;return s.aiDataContract={ver:1,name:0,url:0,duration:0,properties:0,measurements:0,id:0},s.id=a&&Yt(e,a,128,k.IdTooLong).toString(),s.url=Wt(e,t),s.name=x(e,n)||tr,isNaN(r)||(s.duration=Jt(r)),s.properties=Ht(e,i),s.measurements=Xt(e,o),s}n(ni,$r=function(){this.ver=2,this.success=!0,this.properties={},this.measurements={}}),ni.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",ni.dataType="RemoteDependencyData";var $r,ei=ni;function ni(e,n,t,r,i,o,a,s,u,l,c,f){void 0===u&&(u="Ajax");var d,g,p,h=$r.call(this)||this,t=(h.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},h.id=n,h.duration=Jt(i),h.success=o,h.resultCode=a+"",h.type=x(e,u),n=e,i=s,u=a=o=r,a=(s=t)&&0<s.length?(d=s,p=(t=fr)[g=cr],lr.createElement?t[g]||(p=t[g]=lr.createElement("a")):p={host:function(){e=null,d&&null!=(t=d.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i))&&2<t.length&&v(t[2])&&0<t[2].length&&(e=t[2]||"",2<t.length&&(n=(t[1]||"").toLowerCase(),t=t[3]||"",e+=t="http"==n&&":80"===t||"https"==n&&":443"===t?"":t));var e,n=e||"";if(n){var t=n.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i);if(null!=t&&3<t.length&&v(t[2])&&0<t[2].length)return t[2]+(t[3]||"")}return n}()},p.href=d,++g>=t.length&&(g=0),cr=g,g=(t=p).host,a||(null!=t.pathname?("/"!=((p=0===t.pathname.length?"/":t.pathname)[0]||"")&&(p="/"+p),u=t.pathname,x(n,i?i+" "+p:p)):x(n,s))):g=o,{target:g,name:a,data:u});return h.data=Wt(e,r)||t.data,h.target=x(e,t.target),l&&(h.target="".concat(h.target," | ").concat(l)),h.name=x(e,t.name),h.properties=Ht(e,c),h.measurements=Xt(e,f),h}n(oi,ti=function(){this.ver=2,this.properties={},this.measurements={}}),oi.envelopeType="Microsoft.ApplicationInsights.{0}.Message",oi.dataType="MessageData";var ti,ri,ii=oi;function oi(e,n,t,r,i){var o=ti.call(this)||this;return o.aiDataContract={ver:1,message:1,severityLevel:0,properties:0},o.message=Gt(e,n=n||tr),o.properties=Ht(e,r),o.measurements=Xt(e,i),t&&(o.severityLevel=t),o}function ai(){var e=ri.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}n(ai,ri=r),n(li,si=ai),li.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",li.dataType="PageviewPerformanceData";var si,ui=li;function li(e,n,t,r,i,o,a){var s=si.call(this)||this;return s.aiDataContract={ver:1,name:0,url:0,duration:0,perfTotal:0,networkConnect:0,sentRequest:0,receivedResponse:0,domProcessing:0,properties:0,measurements:0},s.url=Wt(e,t),s.name=x(e,n)||tr,s.properties=Ht(e,i),s.measurements=Xt(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(di,ci=e);var ci,fi=di;function di(e,n){var t=ci.call(this)||this;return t.aiDataContract={baseType:1,baseData:1},t.baseType=e,t.baseData=n,t}function gi(e){var n="ai."+e+".";return function(e){return n+e}}N.SeverityLevel=void 0,(r=N.SeverityLevel||(N.SeverityLevel={}))[r.Verbose=0]="Verbose",r[r.Information=1]="Information",r[r.Warning=2]="Warning",r[r.Error=3]="Error",r[r.Critical=4]="Critical";var pi,hi,e=gi("application"),r=gi("device"),mi=gi("location"),vi=gi("operation"),yi=gi("session"),s=gi("user"),l=gi("cloud"),Ii=gi("internal"),Ci=(hi={applicationVersion:e("ver"),applicationBuild:e("build"),applicationTypeId:e("typeId"),applicationId:e("applicationId"),applicationLayer:e("layer"),deviceId:r("id"),deviceIp:r("ip"),deviceLanguage:r("language"),deviceLocale:r("locale"),deviceModel:r("model"),deviceFriendlyName:r("friendlyName"),deviceNetwork:r("network"),deviceNetworkName:r("networkName"),deviceOEMName:r("oemName"),deviceOS:r("os"),deviceOSVersion:r("osVersion"),deviceRoleInstance:r("roleInstance"),deviceRoleName:r("roleName"),deviceScreenResolution:r("screenResolution"),deviceType:r("type"),deviceMachineName:r("machineName"),deviceVMName:r("vmName"),deviceBrowser:r("browser"),deviceBrowserVersion:r("browserVersion"),locationIp:mi("ip"),locationCountry:mi("country"),locationProvince:mi("province"),locationCity:mi("city"),operationId:vi("id"),operationName:vi("name"),operationParentId:vi("parentId"),operationRootId:vi("rootId"),operationSyntheticSource:vi("syntheticSource"),operationCorrelationVector:vi("correlationVector"),sessionId:yi("id"),sessionIsFirst:yi("isFirst"),sessionIsNew:yi("isNew"),userAccountAcquisitionDate:s("accountAcquisitionDate"),userAccountId:s("accountId"),userAgent:s("userAgent"),userId:s("id"),userStoreRegion:s("storeRegion"),userAuthUserId:s("authUserId"),userAnonymousUserAcquisitionDate:s("anonUserAcquisitionDate"),userAuthenticatedUserAcquisitionDate:s("authUserAcquisitionDate"),cloudName:l("name"),cloudRole:l("role"),cloudRoleVer:l("roleVer"),cloudRoleInstance:l("roleInstance"),cloudEnvironment:l("environment"),cloudLocation:l("location"),cloudDeploymentUnit:l("deploymentUnit"),internalNodeName:Ii("nodeName"),internalSdkVersion:Ii("sdkVersion"),internalAgentVersion:Ii("agentVersion"),internalSnippet:Ii("snippet"),internalSdkSrc:Ii("sdkSrc")},n(Si,pi=function(){var t=this;P(hi,function(e,n){t[e]=n})}),Si);function Si(){return pi.call(this)||this}var xi,f=new Ci,e=function no(t,r){var i=[],o=!1;this._get=function(){return i},this._set=function(e){return i=e},m(no,this,function(n){n.enqueue=function(e){n.count()>=r.eventsLimitInMem()?o||(t.throwInternal(M.WARNING,k.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}})},Ti=(n(wi,xi=e),wi);function wi(e,n){e=xi.call(this,e,n)||this;return m(wi,e,function(e,n){e.markAsSent=function(e){n.clear()},e.clearSent=function(e){}}),e}n(c,bi=e),c.BUFFER_KEY="AI_buffer",c.SENT_BUFFER_KEY="AI_sentBuffer",c.MAX_BUFFER_SIZE=2e3;var bi,Ni=c;function c(s,u){var e=bi.call(this,s,u)||this,l=!1;return m(c,e,function(t,n){var e=o(c.BUFFER_KEY),r=o(c.SENT_BUFFER_KEY),r=t._set(e.concat(r));function i(n,e){var t=[];return O(e,function(e){d(e)||-1!==Ve(n,e)||t.push(e)}),t}function o(e){try{var e=u.namePrefix&&u.namePrefix()?u.namePrefix()+"_"+e:e,n=sr(s,e);if(n){var t=j().parse(n);if((t=v(t)?j().parse(t):t)&&U(t))return t}}catch(r){s.throwInternal(M.CRITICAL,k.FailedToRestoreStorageBuffer," storage key: "+e+", "+z(r),{exception:K(r)})}return[]}function a(e,n){try{var e=u.namePrefix&&u.namePrefix()?u.namePrefix()+"_"+e:e,t=JSON.stringify(n);ur(s,e,t)}catch(r){ur(s,e,JSON.stringify([])),s.throwInternal(M.WARNING,k.FailedToSetStorageBuffer," storage key: "+e+", "+z(r)+". Buffer cleared",{exception:K(r)})}}r.length>c.MAX_BUFFER_SIZE&&(r.length=c.MAX_BUFFER_SIZE),a(c.SENT_BUFFER_KEY,[]),a(c.BUFFER_KEY,r),t.enqueue=function(e){t.count()>=c.MAX_BUFFER_SIZE?l||(s.throwInternal(M.WARNING,k.SessionStorageBufferFull,"Maximum buffer size reached: "+t.count(),!0),l=!0):(n.enqueue(e),a(c.BUFFER_KEY,t._get()))},t.clear=function(){n.clear(),a(c.BUFFER_KEY,t._get()),a(c.SENT_BUFFER_KEY,[]),l=!1},t.markAsSent=function(e){a(c.BUFFER_KEY,t._set(i(e,t._get())));var n=o(c.SENT_BUFFER_KEY);n instanceof Array&&e instanceof Array&&((n=n.concat(e)).length>c.MAX_BUFFER_SIZE&&(s.throwInternal(M.CRITICAL,k.SessionStorageBufferFull,"Sent buffer reached its maximum size: "+n.length,!0),n.length=c.MAX_BUFFER_SIZE),a(c.SENT_BUFFER_KEY,n))},t.clearSent=function(e){e=i(e,o(c.SENT_BUFFER_KEY));a(c.SENT_BUFFER_KEY,e)}}),e}var _i="baseType",T="baseData",w="properties",Ri="true";function b(e,n,t){I(e,n,t,Qe)}function Ai(e,t,r){D(e)||P(e,function(e,n){je(n)?r[e]=n:v(n)?t[e]=n:Sn()&&(t[e]=j().stringify(n))})}function Li(t,r){D(t)||P(t,function(e,n){t[e]=n||r})}function Ei(e,n,t,r){for(var r=new vr(e,r,n),n=(b(r,"sampleRate",t[$t]),(t[T]||{}).startTime&&(r.time=qe(t[T].startTime)),r.iKey=t.iKey,t.iKey.replace(/-/g,"")),n=(r.name=r.name.replace("{0}",n),e),e=t,i=r,o=i.tags=i.tags||{},a=e.ext=e.ext||{},s=e.tags=e.tags||[],u=a.user,u=(u&&(b(o,f.userAuthUserId,u.authId),b(o,f.userId,u.id||u.localId)),a.app),u=(u&&b(o,f.sessionId,u.sesId),a.device),u=(u&&(b(o,f.deviceId,u.id||u.localId),b(o,f.deviceType,u.deviceClass),b(o,f.deviceIp,u.ip),b(o,f.deviceModel,u.model),b(o,f.deviceType,u.deviceType)),e.ext.web),e=(u&&(b(o,f.deviceLanguage,u.browserLang),b(o,f.deviceBrowserVersion,u.browserVer),b(o,f.deviceBrowser,u.browser),b(e=(e=(e=i.data=i.data||{})[T]=e[T]||{})[w]=e[w]||{},"domain",u.domain),b(e,"isManual",u.isManual?Ri:null),b(e,"screenRes",u.screenRes),b(e,"userConsent",u.userConsent?Ri:null)),a.os),u=(e&&b(o,f.deviceOS,e.name),a.trace),l=(u&&(b(o,f.operationParentId,u.parentID),b(o,f.operationName,x(n,u.name)),b(o,f.operationId,u.traceID)),{}),c=s.length-1;0<=c;c--)P(s[c],function(e,n){l[e]=n}),s.splice(c,1);P(s,function(e,n){l[e]=n});e=Y(Y({},o),l);return e[f.internalSdkVersion]||(e[f.internalSdkVersion]="javascript:".concat(Mi.Version)),i.tags=en(e),t.tags=t.tags||[],en(r)}function Fi(e,n){D(n[T])&&e.throwInternal(M.CRITICAL,k.TelemetryEnvelopeInvalid,"telemetryItem.baseData cannot be null.")}var Mi={Version:"2.7.6"};function ki(e,n,t){Fi(e,n);var r={},i={},t=(n[_i]!==Cr.dataType&&(r.baseTypeSource=n[_i]),n[_i]===Cr.dataType?(r=n[T][w]||{},i=n[T].measurements||{}):n[T]&&Ai(n[T],r,i),Ai(n.data,r,i),D(t)||Li(r,t),n[T].name),t=new Cr(e,t,r,i),r=new fi(Cr.dataType,t);return Ei(e,Cr.envelopeType,n,r)}var Di=function to(f){m(to,this,function(e){function l(a,s){var e="__aiCircularRefCheck",u={};if(!a)return f.throwInternal(M.CRITICAL,k.CannotSerializeObject,"cannot serialize object because it is null or undefined",{name:s},!0),u;if(a[e])return f.throwInternal(M.WARNING,k.CircularReferenceDetected,"Circular reference detected while serializing object",{name:s},!0),u;if(a.aiDataContract)return a[e]=!0,P(a.aiDataContract,function(e,n){var t=d(n)?1&n():1&n,r=d(n)?4&n():4&n,n=2&n,i=a[e]!==undefined,o=Ue(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,k.MissingRequiredFieldSpecification,"Missing required field specification. The field is required but not present on source",{field:e,name:s})}),delete a[e],u;if("measurements"===s)u=t(a,"number",s);else if("properties"===s)u=t(a,"string",s);else if("tags"===s)u=t(a,"string",s);else if(U(a))u=c(a,s);else{f.throwInternal(M.WARNING,k.CannotSerializeObjectNonSerializable,"Attempting to serialize an object which does not implement ISerializable",{name:s},!0);try{j().stringify(a),u=a}catch(n){f.throwInternal(M.CRITICAL,k.CannotSerializeObject,n&&d(n.toString)?n.toString():"Error serializing object",null,!0)}}return u}function c(e,n){if(e)if(U(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,k.ItemNotInArray,"This field was specified as an array in the contract but the item is not an array.\r\n",{name:n},!0);return t}function t(e,t,r){var i;return e&&(i={},P(e,function(e,n){"string"===t?n===undefined?i[e]="undefined":null===n?i[e]="null":n.toString?i[e]=n.toString():i[e]="invalid field: toString() is not defined.":"number"===t?n===undefined?i[e]="undefined":i[e]=null===n?"null":isNaN(n=parseFloat(n))?"NaN":n:(i[e]="invalid field: "+r+" is of unknown type.",f.throwInternal(M.CRITICAL,i[e],null,!0))})),i}e.serialize=function(e){e=l(e,"root");try{return j().stringify(e)}catch(n){f.throwInternal(M.CRITICAL,k.CannotSerializeObject,n&&d(n.toString)?n.toString():"Error serializing object",null,!0)}}})};function Pi(){var a=vn(),s=yn(),u=!1,l=!0;m(Pi,this,function(e){try{var n,t;a&&Oe(a,"online",r)&&(Oe(a,"offline",i),u=!0),s&&!g((n=s.body||s).ononline)&&(n.ononline=r,n.onoffline=i,u=!0),u&&(t=Cn())&&!D(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&&!D(n.onLine)&&(e=n.onLine),e},e.isOffline=function(){return!e.isOnline()}})}var Bi=Pi.Offline=new Pi,Ui=(Oi.prototype.getHashCodeScore=function(e){return this.getHashCode(e)/Oi.INT_MAX_VALUE*100},Oi.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)},Oi.INT_MAX_VALUE=2147483647,Oi);function Oi(){}var zi=function(){var n=new Ui,t=new Ci;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()}},ji=(Ki.prototype.isSampledIn=function(e){var n=this.sampleRate;return null===n||n===undefined||100<=n||e.baseType===Gr.dataType||this.samplingScoreGenerator.getSamplingScore(e)<n},Ki);function Ki(e,n){this.INT_MAX_VALUE=2147483647;n=n||Dn(null);(100<e||e<0)&&(n.throwInternal(M.WARNING,k.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 zi}function qi(e){try{return e.responseText}catch(n){}return null}function Vi(){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}}}(r={})[Cr.dataType]=ki,r[ii.dataType]=function(e,n,t){Fi(e,n);var r=n[T].message,i=n[T].severityLevel,o=n[T][w]||{},a=n[T].measurements||{},t=(Ai(n.data,o,a),D(t)||Li(o,t),new ii(e,r,i,o,a)),r=new fi(ii.dataType,t);return Ei(e,ii.envelopeType,n,r)},r[Zr.dataType]=function(e,n,t){Fi(e,n);var r,i="duration",o=n[T],i=(D(o)||D(o[w])||D(o[w][i])?D(n.data)||D(n.data[i])||(r=n.data[i],delete n.data[i]):(r=o[w][i],delete o[w][i]),n[T]),o=(((n.ext||{}).trace||{}).traceID&&(a=n.ext.trace.traceID),i.id||a),a=i.name,s=i.uri,u=i[w]||{},l=i.measurements||{},i=(D(i.refUri)||(u.refUri=i.refUri),D(i.pageType)||(u.pageType=i.pageType),D(i.isLoggedIn)||(u.isLoggedIn=i.isLoggedIn.toString()),D(i[w])||P(i[w],function(e,n){u[e]=n}),Ai(n.data,u,l),D(t)||Li(u,t),new Zr(e,a,s,r,u,l,o)),t=new fi(Zr.dataType,i);return Ei(e,Zr.envelopeType,n,t)},r[ui.dataType]=function(e,n,t){Fi(e,n);var r=n[T],i=r.name,o=r.uri||r.url,a=r[w]||{},s=r.measurements||{},t=(Ai(n.data,a,s),D(t)||Li(a,t),new ui(e,i,o,undefined,a,s,r)),i=new fi(ui.dataType,t);return Ei(e,ui.envelopeType,n,i)},r[Dr.dataType]=function(e,n,t){Fi(e,n);var r=n[T].measurements||{},i=n[T][w]||{},t=(Ai(n.data,i,r),D(t)||Li(i,t),n[T]),t=Dr.CreateFromInterface(e,t,i,r),i=new fi(Dr.dataType,t);return Ei(e,Dr.envelopeType,n,i)},r[Gr.dataType]=function(e,n,t){Fi(e,n);var r=n[T],i=r[w]||{},o=r.measurements||{},t=(Ai(n.data,i,o),D(t)||Li(i,t),new Gr(e,r.name,r.average,r.sampleCount,r.min,r.max,r.stdDev,i,o)),r=new fi(Gr.dataType,t);return Ei(e,Gr.envelopeType,n,r)},r[ei.dataType]=function(e,n,t){Fi(e,n);var r=n[T].measurements||{},i=n[T][w]||{},t=(Ai(n.data,i,r),D(t)||Li(i,t),n[T]);if(D(t))return e.warnToConsole("Invalid input for dependency data"),null;var o=t[w]&&t[w][nr]?t[w][nr]:"GET",o=new ei(e,t.id,t.target,t.name,t.duration,t.success,t.responseCode,o,t.type,t.correlationContext,i,r),t=new fi(ei.dataType,o);return Ei(e,ei.envelopeType,n,t)};var Wi,Gi=r,Hi=(n(Xi,Wi=Le),Xi.constructEnvelope=function(e,n,t,r){e=n===e.iKey||D(n)?e:Y(Y({},e),{iKey:n});return(Gi[e.baseType]||ki)(t,e,r)},Xi);function Xi(){var T,w,t,b,N,_,R,A=Wi.call(this)||this,L=(A.priority=1001,!(A.identifier="AppInsightsChannelPlugin")),E={},F=0;return A._senderConfig=Vi(),m(Xi,A,function(l,a){function c(e,n,t,r,i,o){var a=null;l._appId||(a=p(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)?(h(n),l.diagLog().throwInternal(M.WARNING,k.TransmissionFailed,". Response code "+e+". Will retry to send "+n.length+" items.")):l._onError(n,i):Bi.isOffline()?l._senderConfig.isRetryDisabled()||(h(n,10),l.diagLog().throwInternal(M.WARNING,k.TransmissionFailed,". Offline - Response Code: ".concat(e,". Offline status: ").concat(Bi.isOffline(),". Will retry to send ").concat(n.length," items."))):(s(t),206===e?(a=a||p(o))&&!l._senderConfig.isRetryDisabled()?l._onPartialSuccess(n,a):l._onError(n,i):(T=0,l._onSuccess(n,r)))}function s(e){return!(10<=N)&&!D(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(U(e)&&0<e.length&&!o(e)){for(var t=[],r=0;r<e.length;r++){var i=e[r];o([i])||t.push(i)}0<t.length&&(_(t,!0),l.diagLog().throwInternal(M.WARNING,k.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[Qt]=!0}catch(i){}t.open("POST",r,e),t.setRequestHeader("Content-type","application/json"),gr(r)&&t.setRequestHeader("Sdk-Context","appId"),O(Xe(E),function(e){t.setRequestHeader(e,E[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(U(e)){for(var t=e.length,r=0;r<e.length;r++)t+=e[r].length;F+t<=65e3?i(e,!1):Tn()?u(e):(_&&_(e,!0),l.diagLog().throwInternal(M.WARNING,k.TransmissionFailed,". Failed to send telemetry with Beacon API, retried with xhrSender."))}}function g(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=(gr(e)&&o.append("Sdk-Context","appId"),O(Xe(E),function(e){o.append(e,E[e])}),(i={method:"POST",headers:o,body:i})[Qt]=!0,r||(n=i.keepalive=!0,F+=a),new Request(e,i));try{e[Qt]=!0}catch(u){}l._buffer.markAsSent(t);try{fetch(e).then(function(n){r||(F-=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||(F-=a,a=0),s||(s=!0,l._onError(t,e.message))})}catch(u){s||l._onError(t,K(u))}n&&!s&&(s=!0,l._onSuccess(t,t.length))}function p(e){try{if(e&&""!==e){var n=j().parse(e);if(n&&n.itemsReceived&&n.itemsReceived>=n.itemsAccepted&&n.itemsReceived-n.itemsAccepted===n.errors.length)return n}}catch(t){l.diagLog().throwInternal(M.CRITICAL,k.InvalidBackendResponse,"Cannot parse the response. "+z(t),{response:e})}return null}function h(e,n){if(void 0===n&&(n=1),e&&0!==e.length){var t=l._buffer;t.clearSent(e),T++;for(var r=0,i=e;r<i.length;r++){var o=i[r];t.enqueue(o)}n=T<=1?10:(e=1+Math.floor((Math.pow(2,T)-1)/2*Math.random()*10),Math.max(Math.min(e*=n,3600),10)),e=Je()+1e3*n;w=e,m()}}function m(){var e;t||L||(e=w?Math.max(0,w-Je()):0,e=Math.max(l._senderConfig.maxBatchInterval(),e),t=setTimeout(function(){t=null,l.triggerSend(!0,null,1)},e))}function v(){clearTimeout(t),w=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:"+qi(e)||e.response||"":n}function C(n,e){var t=l._buffer,r=vn(),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,k.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:"+qi(e)||"":n}function x(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,k.NotificationException,"send request notification failed: "+z(r),{exception:K(r)})}}l.pause=function(){v(),L=!0},l.resume=function(){L&&(L=!1,w=null,l._buffer.size()>l._senderConfig.maxBatchSizeInBytes()&&l.triggerSend(!0,null,10),m())},l.flush=function(){if(!L){v();try{l.triggerSend(!0,null,1)}catch(e){l.diagLog().throwInternal(M.CRITICAL,k.FlushFailed,"flush failed, telemetry will not be collected: "+z(e),{exception:K(e)})}}},l.onunloadFlush=function(){if(!L)if(!1!==l._senderConfig.onunloadDisableBeacon()&&!1!==l._senderConfig.isBeaconApiDisabled()||!Tn())l.flush();else try{l.triggerSend(!0,n,2)}catch(e){l.diagLog().throwInternal(M.CRITICAL,k.FailedToSendQueuedTelemetry,"failed to flush with beacon sender on page unload, telemetry will not be collected: "+z(e),{exception:K(e)})}},l.teardown=function(){$e("Method not implemented.")},l.addHeader=function(e,n){E[e]=n},l.initialize=function(e,n,t,r){a.initialize(e,n,t,r);var i=l._getTelCtx(),o=l.identifier,t=(b=new Di(n.logger),w=null,T=0,l._sender=null,N=0,l.diagLog()),r=(P(Vi(),function(e,n){l._senderConfig[e]=function(){return i.getConfig(o,e,n())}}),l._buffer=new(l._senderConfig.enableSessionStorageBuffer()&&ar()?Ni:Ti)(t,l._senderConfig),l._sample=new ji(l._senderConfig.samplingPercentage(),t),!D(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,k.InvalidInstrumentationKey,"Invalid Instrumentation key "+e.instrumentationKey),!gr(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()&&bn()?n=C:!r.disableXhr()&&Nn()&&(n=f),!n&&wn()&&(n=g),_=n||f,!r.isBeaconApiDisabled()&&Tn()&&(n=u),l._sender=n||f,R=!r.onunloadDisableFetch()&&wn(!0)?d:Tn()?u:!r.disableXhr()&&bn()?C:!r.disableXhr()&&Nn()?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,k.CannotSendEmptyTelemetry,"Cannot send empty telemetry");if(e.baseData&&!e.baseType)return void t.diagLog().throwInternal(M.CRITICAL,k.InvalidEvent,"Cannot send telemetry without baseData and baseType");if(e.baseType||(e.baseType="EventData"),!l._sender)return void t.diagLog().throwInternal(M.CRITICAL,k.SenderNotInitialized,"Sender was not initialized");if(!l._sample.isSampledIn(e))return void t.diagLog().throwInternal(M.WARNING,k.TelemetrySampledAndNotSent,"Telemetry item was sampled out and not sent",{SampleRate:l._sample.sampleRate});e[$t]=l._sample.sampleRate;var n=l._senderConfig.convertUndefined()||undefined,r=e.iKey||l._senderConfig.instrumentationKey(),i=Xi.constructEnvelope(e,r,t.diagLog(),n);if(!i)return void t.diagLog().throwInternal(M.CRITICAL,k.CreateEnvelopeError,"Unable to create an AppInsights envelope");var o=!1;if(e.tags&&e.tags[er]&&(O(e.tags[er],function(e){try{e&&!1===e(i)&&(o=!0,t.diagLog().warnToConsole("Telemetry processor check returns false"))}catch(n){t.diagLog().throwInternal(M.CRITICAL,k.TelemetryInitializerFailed,"One of telemetry initializers failed, telemetry item will not be sent: "+z(n),{exception:K(n)},!0)}}),delete e.tags[er]),o)return;var a=b.serialize(i),s=l._buffer;s.size()+a.length>l._senderConfig.maxBatchSizeInBytes()&&l.triggerSend(!0,null,10),s.enqueue(a),m()}catch(u){t.diagLog().throwInternal(M.WARNING,k.FailedAddingTelemetryToBuffer,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+z(u),{exception:K(u)})}l.processNext(e,t)},l._xhrReadyStateChange=function(e,n,t){4===e.readyState&&c(e.status,n,e.responseURL,t,I(e),qi(e)||e.response)},l.triggerSend=function(e,n,t){if(void 0===e&&(e=!0),!L)try{var r,i=l._buffer;l._senderConfig.disableTelemetry()?i.clear():0<i.count()&&(r=i.getItems(),x(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(B(n,ln))return e=yn()||{},Math.max(parseInt(n.split(ln)[1]),e.documentMode||0);if(B(n,cn)){e=parseInt(n.split(cn)[1]);if(e)return e+4}return null}();(!i||9<i)&&l.diagLog().throwInternal(M.CRITICAL,k.TransmissionFailed,"Telemetry transmission failed, some telemetry will be lost: "+z(o),{exception:K(o)})}},l._onError=function(e,n,t){l.diagLog().throwInternal(M.WARNING,k.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&&(h(r),l.diagLog().throwInternal(M.WARNING,k.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=qi(e);!e||t+""!="200"&&""!==t?(t=p(t))&&t.itemsReceived&&t.itemsReceived>t.itemsAccepted&&!l._senderConfig.isRetryDisabled()?l._onPartialSuccess(n,t):l._onError(n,S(e)):(T=0,l._onSuccess(n,0))}}),A}Yi.prototype.initialize=function(){this.core=new Rt;var e=[],n=new Hi;e.push(n),this.core.initialize(this.config,e),n.initialize(this.config,this.core,e),this.pollInternalLogs()},Yi.prototype.track=function(e){this.core.track(e)},Yi.prototype.flush=function(n){void 0===n&&(n=!0),O(this.core.getTransmissionControls(),function(e){O(e,function(e){n?e.flush():e.triggerSend(n,null,1)})})},Yi.prototype.pollInternalLogs=function(){this.core.pollInternalLogs()},Yi.prototype.stopPollingInternalLogs=function(){this.core.stopPollingInternalLogs()},Yi.prototype.getSKUDefaults=function(){this.config.diagnosticLogInterval=this.config.diagnosticLogInterval&&0<this.config.diagnosticLogInterval?this.config.diagnosticLogInterval:1e4};mi=Yi;function Yi(e){(D(e)||D(e.instrumentationKey))&&$e("Invalid input configuration"),this.config=e,this.getSKUDefaults(),this.initialize()}N.AppInsightsCore=Rt,N.ApplicationInsights=mi,N.CoreUtils=Kt,N.Sender=Hi;vi=N,yi="__esModule",s={value:!0},l=Object.defineProperty;if(l)try{return void l(vi,yi,s)}catch(ro){}typeof s.value!==undefined&&(vi[yi]=s.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=aib.2.min.js.map