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