@microsoft/applicationinsights-web-basic 2.7.3-nightly.2112-07 → 2.7.3

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